From d0e3ccd162ccf4ca7bd9cb44f4a0965f5de79168 Mon Sep 17 00:00:00 2001 From: Jonah Bedouch Date: Mon, 10 Jul 2023 18:19:28 -0700 Subject: [PATCH] Fix Vite HMR errors (#64) * Separate vanilla JS functions into their own files * Refactor floating panel context, run prettier * Add build * Move context managers back into their files and change HMR port to 1025 * Add build --------- Co-authored-by: Brent Yi --- viser/client/.eslintrc.js | 3 +- .../{index-10ab1cd1.js => index-27c5f284.js} | 690 +++++++++--------- viser/client/build/index.html | 4 +- viser/client/package.json | 1 + viser/client/src/App.tsx | 262 +++++++ viser/client/src/CameraControls.tsx | 4 +- viser/client/src/ControlPanel/BottomPanel.tsx | 8 +- .../client/src/ControlPanel/ControlPanel.tsx | 2 +- .../client/src/ControlPanel/FloatingPanel.tsx | 5 +- viser/client/src/ControlPanel/Generated.tsx | 4 +- viser/client/src/ControlPanel/GuiState.tsx | 4 - .../src/ControlPanel/SceneTreeTable.tsx | 2 +- viser/client/src/ControlPanel/Server.tsx | 2 +- viser/client/src/SceneTree.tsx | 126 +--- viser/client/src/SceneTreeState.tsx | 123 ++++ viser/client/src/Titlebar.tsx | 2 +- viser/client/src/Utils.tsx | 7 + viser/client/src/WebsocketFunctions.tsx | 52 ++ viser/client/src/WebsocketInterface.tsx | 58 +- viser/client/src/index.tsx | 270 +------ viser/client/vite.config.ts | 3 +- viser/client/yarn.lock | 5 + 22 files changed, 829 insertions(+), 808 deletions(-) rename viser/client/build/assets/{index-10ab1cd1.js => index-27c5f284.js} (79%) create mode 100644 viser/client/src/App.tsx create mode 100644 viser/client/src/SceneTreeState.tsx create mode 100644 viser/client/src/WebsocketFunctions.tsx diff --git a/viser/client/.eslintrc.js b/viser/client/.eslintrc.js index 2f5185cb9..ab41456fc 100644 --- a/viser/client/.eslintrc.js +++ b/viser/client/.eslintrc.js @@ -21,7 +21,7 @@ module.exports = { ecmaVersion: "latest", sourceType: "module", }, - plugins: ["react", "@typescript-eslint"], + plugins: ["react", "@typescript-eslint", "react-refresh"], ignorePatterns: ["build/", ".eslintrc.js"], rules: { // https://github.com/jsx-eslint/eslint-plugin-react/issues/3423 @@ -37,5 +37,6 @@ module.exports = { skipUndeclared: true, }, ], + "react-refresh/only-export-components": "warn" }, }; diff --git a/viser/client/build/assets/index-10ab1cd1.js b/viser/client/build/assets/index-27c5f284.js similarity index 79% rename from viser/client/build/assets/index-10ab1cd1.js rename to viser/client/build/assets/index-27c5f284.js index 21eb8dae1..cf6b5e8e6 100644 --- a/viser/client/build/assets/index-10ab1cd1.js +++ b/viser/client/build/assets/index-27c5f284.js @@ -1,4 +1,4 @@ -function tJ(t,e){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var Gf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Tc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var H6={exports:{}},K1={},V6={exports:{}},_n={};/** +function nJ(t,e){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var Gf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Tc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var H6={exports:{}},K1={},V6={exports:{}},_n={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ function tJ(t,e){for(var n=0;n>>1,K=B[q];if(0>>1;qi(le,$))aei(oe,le)?(B[q]=oe,B[ae]=$,q=ae):(B[q]=le,B[J]=$,q=J);else if(aei(oe,$))B[q]=oe,B[ae]=$,q=ae;else break e}}return j}function i(B,j){var $=B.sortIndex-j.sortIndex;return $!==0?$:B.id-j.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();t.unstable_now=function(){return s.now()-a}}var l=[],c=[],u=1,d=null,f=3,h=!1,g=!1,y=!1,_=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(B){for(var j=n(c);j!==null;){if(j.callback===null)r(c);else if(j.startTime<=B)r(c),j.sortIndex=j.expirationTime,e(l,j);else break;j=n(c)}}function S(B){if(y=!1,w(B),!g)if(n(l)!==null)g=!0,G(E);else{var j=n(c);j!==null&&W(S,j.startTime-B)}}function E(B,j){g=!1,y&&(y=!1,v(R),R=-1),h=!0;var $=f;try{for(w(j),d=n(l);d!==null&&(!(d.expirationTime>j)||B&&!F());){var q=d.callback;if(typeof q=="function"){d.callback=null,f=d.priorityLevel;var K=q(d.expirationTime<=j);j=t.unstable_now(),typeof K=="function"?d.callback=K:d===n(l)&&r(l),w(j)}else r(l);d=n(l)}if(d!==null)var re=!0;else{var J=n(c);J!==null&&W(S,J.startTime-j),re=!1}return re}finally{d=null,f=$,h=!1}}var C=!1,O=null,R=-1,T=5,A=-1;function F(){return!(t.unstable_now()-AB||125q?(B.sortIndex=$,e(c,B),n(l)===null&&B===n(c)&&(y?(v(R),R=-1):y=!0,W(S,$-q))):(B.sortIndex=K,e(l,B),g||h||(g=!0,G(E))),B},t.unstable_shouldYield=F,t.unstable_wrapCallback=function(B){var j=f;return function(){var $=f;f=j;try{return B.apply(this,arguments)}finally{f=$}}}})(J6);Q6.exports=J6;var bJ=Q6.exports;/** + */(function(t){function e(B,j){var $=B.length;B.push(j);e:for(;0<$;){var q=$-1>>>1,K=B[q];if(0>>1;qi(le,$))aei(oe,le)?(B[q]=oe,B[ae]=$,q=ae):(B[q]=le,B[J]=$,q=J);else if(aei(oe,$))B[q]=oe,B[ae]=$,q=ae;else break e}}return j}function i(B,j){var $=B.sortIndex-j.sortIndex;return $!==0?$:B.id-j.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();t.unstable_now=function(){return s.now()-a}}var l=[],c=[],u=1,d=null,f=3,h=!1,g=!1,y=!1,_=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(B){for(var j=n(c);j!==null;){if(j.callback===null)r(c);else if(j.startTime<=B)r(c),j.sortIndex=j.expirationTime,e(l,j);else break;j=n(c)}}function S(B){if(y=!1,w(B),!g)if(n(l)!==null)g=!0,G(E);else{var j=n(c);j!==null&&W(S,j.startTime-B)}}function E(B,j){g=!1,y&&(y=!1,v(R),R=-1),h=!0;var $=f;try{for(w(j),d=n(l);d!==null&&(!(d.expirationTime>j)||B&&!F());){var q=d.callback;if(typeof q=="function"){d.callback=null,f=d.priorityLevel;var K=q(d.expirationTime<=j);j=t.unstable_now(),typeof K=="function"?d.callback=K:d===n(l)&&r(l),w(j)}else r(l);d=n(l)}if(d!==null)var re=!0;else{var J=n(c);J!==null&&W(S,J.startTime-j),re=!1}return re}finally{d=null,f=$,h=!1}}var C=!1,O=null,R=-1,T=5,A=-1;function F(){return!(t.unstable_now()-AB||125q?(B.sortIndex=$,e(c,B),n(l)===null&&B===n(c)&&(y?(v(R),R=-1):y=!0,W(S,$-q))):(B.sortIndex=K,e(l,B),g||h||(g=!0,G(E))),B},t.unstable_shouldYield=F,t.unstable_wrapCallback=function(B){var j=f;return function(){var $=f;f=j;try{return B.apply(this,arguments)}finally{f=$}}}})(J6);Q6.exports=J6;var MJ=Q6.exports;/** * @license React * react-dom.production.min.js * @@ -30,22 +30,22 @@ function tJ(t,e){for(var n=0;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),uC=Object.prototype.hasOwnProperty,MJ=/^[: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]*$/,OI={},RI={};function EJ(t){return uC.call(RI,t)?!0:uC.call(OI,t)?!1:MJ.test(t)?RI[t]=!0:(OI[t]=!0,!1)}function PJ(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function CJ(t,e,n,r){if(e===null||typeof e>"u"||PJ(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Ji(t,e,n,r,i,o,s){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=o,this.removeEmptyString=s}var wi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){wi[t]=new Ji(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];wi[e]=new Ji(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){wi[t]=new Ji(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){wi[t]=new Ji(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){wi[t]=new Ji(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){wi[t]=new Ji(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){wi[t]=new Ji(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){wi[t]=new Ji(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){wi[t]=new Ji(t,5,!1,t.toLowerCase(),null,!1,!1)});var XT=/[\-:]([a-z])/g;function ZT(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(XT,ZT);wi[e]=new Ji(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(XT,ZT);wi[e]=new Ji(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(XT,ZT);wi[e]=new Ji(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){wi[t]=new Ji(t,1,!1,t.toLowerCase(),null,!1,!1)});wi.xlinkHref=new Ji("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){wi[t]=new Ji(t,1,!1,t.toLowerCase(),null,!0,!0)});function qT(t,e,n,r){var i=wi.hasOwnProperty(e)?wi[e]:null;(i!==null?i.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),dC=Object.prototype.hasOwnProperty,EJ=/^[: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]*$/,OI={},RI={};function PJ(t){return dC.call(RI,t)?!0:dC.call(OI,t)?!1:EJ.test(t)?RI[t]=!0:(OI[t]=!0,!1)}function CJ(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function TJ(t,e,n,r){if(e===null||typeof e>"u"||CJ(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Ji(t,e,n,r,i,o,s){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=o,this.removeEmptyString=s}var wi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){wi[t]=new Ji(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];wi[e]=new Ji(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){wi[t]=new Ji(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){wi[t]=new Ji(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){wi[t]=new Ji(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){wi[t]=new Ji(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){wi[t]=new Ji(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){wi[t]=new Ji(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){wi[t]=new Ji(t,5,!1,t.toLowerCase(),null,!1,!1)});var ZT=/[\-:]([a-z])/g;function qT(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(ZT,qT);wi[e]=new Ji(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(ZT,qT);wi[e]=new Ji(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(ZT,qT);wi[e]=new Ji(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){wi[t]=new Ji(t,1,!1,t.toLowerCase(),null,!1,!1)});wi.xlinkHref=new Ji("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){wi[t]=new Ji(t,1,!1,t.toLowerCase(),null,!0,!0)});function KT(t,e,n,r){var i=wi.hasOwnProperty(e)?wi[e]:null;(i!==null?i.type!==0:r||!(2a||i[s]!==o[a]){var l=` -`+i[s].replace(" at new "," at ");return t.displayName&&l.includes("")&&(l=l.replace("",t.displayName)),l}while(1<=s&&0<=a);break}}}finally{AM=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?$p(t):""}function TJ(t){switch(t.tag){case 5:return $p(t.type);case 16:return $p("Lazy");case 13:return $p("Suspense");case 19:return $p("SuspenseList");case 0:case 2:case 15:return t=DM(t.type,!1),t;case 11:return t=DM(t.type.render,!1),t;case 1:return t=DM(t.type,!0),t;default:return""}}function pC(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case vf:return"Fragment";case gf:return"Portal";case dC:return"Profiler";case KT:return"StrictMode";case fC:return"Suspense";case hC:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case rH:return(t.displayName||"Context")+".Consumer";case nH:return(t._context.displayName||"Context")+".Provider";case QT:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case JT:return e=t.displayName||null,e!==null?e:pC(t.type)||"Memo";case Wl:e=t._payload,t=t._init;try{return pC(t(e))}catch{}}return null}function OJ(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return pC(e);case 8:return e===KT?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function vc(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function oH(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function RJ(t){var e=oH(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Jv(t){t._valueTracker||(t._valueTracker=RJ(t))}function sH(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=oH(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function Y_(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function mC(t,e){var n=e.checked;return xr({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function DI(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=vc(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function aH(t,e){e=e.checked,e!=null&&qT(t,"checked",e,!1)}function gC(t,e){aH(t,e);var n=vc(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?vC(t,e.type,n):e.hasOwnProperty("defaultValue")&&vC(t,e.type,vc(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function II(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function vC(t,e,n){(e!=="number"||Y_(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var Gp=Array.isArray;function kf(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=e0.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Om(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var tm={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},AJ=["Webkit","ms","Moz","O"];Object.keys(tm).forEach(function(t){AJ.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),tm[e]=tm[t]})});function dH(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||tm.hasOwnProperty(t)&&tm[t]?(""+e).trim():e+"px"}function fH(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=dH(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var DJ=xr({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 xC(t,e){if(e){if(DJ[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(tt(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(tt(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(tt(61))}if(e.style!=null&&typeof e.style!="object")throw Error(tt(62))}}function wC(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var SC=null;function eO(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var bC=null,Nf=null,Ff=null;function NI(t){if(t=wg(t)){if(typeof bC!="function")throw Error(tt(280));var e=t.stateNode;e&&(e=nS(e),bC(t.stateNode,t.type,e))}}function hH(t){Nf?Ff?Ff.push(t):Ff=[t]:Nf=t}function pH(){if(Nf){var t=Nf,e=Ff;if(Ff=Nf=null,NI(t),e)for(t=0;t>>=0,t===0?32:31-(jJ(t)/$J|0)|0}var t0=64,n0=4194304;function Wp(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function K_(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,o=t.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=Wp(a):(o&=s,o!==0&&(r=Wp(o)))}else s=n&~i,s!==0?r=Wp(s):o!==0&&(r=Wp(o));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,o=e&-e,i>=o||i===16&&(o&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0n;n++)e.push(t);return e}function _g(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Is(e),t[e]=n}function XJ(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0=rm),GI=String.fromCharCode(32),WI=!1;function LH(t,e){switch(t){case"keyup":return See.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function kH(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var yf=!1;function Mee(t,e){switch(t){case"compositionend":return kH(e);case"keypress":return e.which!==32?null:(WI=!0,GI);case"textInput":return t=e.data,t===GI&&WI?null:t;default:return null}}function Eee(t,e){if(yf)return t==="compositionend"||!lO&&LH(t,e)?(t=DH(),m_=oO=ql=null,yf=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=qI(n)}}function UH(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?UH(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function BH(){for(var t=window,e=Y_();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=Y_(t.document)}return e}function cO(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function Lee(t){var e=BH(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&UH(n.ownerDocument.documentElement,n)){if(r!==null&&cO(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!t.extend&&o>r&&(i=r,r=o,o=i),i=KI(n,o);var s=KI(n,r);i&&s&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==s.node||t.focusOffset!==s.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),o>r?(t.addRange(e),t.extend(s.node,s.offset)):(e.setEnd(s.node,s.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,_f=null,OC=null,om=null,RC=!1;function QI(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;RC||_f==null||_f!==Y_(r)||(r=_f,"selectionStart"in r&&cO(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}),om&&km(om,r)||(om=r,r=ex(OC,"onSelect"),0Sf||(t.current=NC[Sf],NC[Sf]=null,Sf--)}function Qn(t,e){Sf++,NC[Sf]=t.current,t.current=e}var yc={},Ni=Rc(yc),uo=Rc(!1),ju=yc;function Yf(t,e){var n=t.type.contextTypes;if(!n)return yc;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=e[o];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function fo(t){return t=t.childContextTypes,t!=null}function nx(){ar(uo),ar(Ni)}function o3(t,e,n){if(Ni.current!==yc)throw Error(tt(168));Qn(Ni,e),Qn(uo,n)}function ZH(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(tt(108,OJ(t)||"Unknown",i));return xr({},n,r)}function rx(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||yc,ju=Ni.current,Qn(Ni,t),Qn(uo,uo.current),!0}function s3(t,e,n){var r=t.stateNode;if(!r)throw Error(tt(169));n?(t=ZH(t,e,ju),r.__reactInternalMemoizedMergedChildContext=t,ar(uo),ar(Ni),Qn(Ni,t)):ar(uo),Qn(uo,n)}var Ka=null,rS=!1,WM=!1;function qH(t){Ka===null?Ka=[t]:Ka.push(t)}function Wee(t){rS=!0,qH(t)}function Ac(){if(!WM&&Ka!==null){WM=!0;var t=0,e=Gn;try{var n=Ka;for(Gn=1;t>=s,i-=s,el=1<<32-Is(e)+i|n<R?(T=O,O=null):T=O.sibling;var A=f(v,O,w[R],S);if(A===null){O===null&&(O=T);break}t&&O&&A.alternate===null&&e(v,O),x=o(A,x,R),C===null?E=A:C.sibling=A,C=A,O=T}if(R===w.length)return n(v,O),fr&&uu(v,R),E;if(O===null){for(;RR?(T=O,O=null):T=O.sibling;var F=f(v,O,A.value,S);if(F===null){O===null&&(O=T);break}t&&O&&F.alternate===null&&e(v,O),x=o(F,x,R),C===null?E=F:C.sibling=F,C=F,O=T}if(A.done)return n(v,O),fr&&uu(v,R),E;if(O===null){for(;!A.done;R++,A=w.next())A=d(v,A.value,S),A!==null&&(x=o(A,x,R),C===null?E=A:C.sibling=A,C=A);return fr&&uu(v,R),E}for(O=r(v,O);!A.done;R++,A=w.next())A=h(O,v,R,A.value,S),A!==null&&(t&&A.alternate!==null&&O.delete(A.key===null?R:A.key),x=o(A,x,R),C===null?E=A:C.sibling=A,C=A);return t&&O.forEach(function(N){return e(v,N)}),fr&&uu(v,R),E}function _(v,x,w,S){if(typeof w=="object"&&w!==null&&w.type===vf&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case Qv:e:{for(var E=w.key,C=x;C!==null;){if(C.key===E){if(E=w.type,E===vf){if(C.tag===7){n(v,C.sibling),x=i(C,w.props.children),x.return=v,v=x;break e}}else if(C.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Wl&&h3(E)===C.type){n(v,C.sibling),x=i(C,w.props),x.ref=np(v,C,w),x.return=v,v=x;break e}n(v,C);break}else e(v,C);C=C.sibling}w.type===vf?(x=ku(w.props.children,v.mode,S,w.key),x.return=v,v=x):(S=b_(w.type,w.key,w.props,null,v.mode,S),S.ref=np(v,x,w),S.return=v,v=S)}return s(v);case gf:e:{for(C=w.key;x!==null;){if(x.key===C)if(x.tag===4&&x.stateNode.containerInfo===w.containerInfo&&x.stateNode.implementation===w.implementation){n(v,x.sibling),x=i(x,w.children||[]),x.return=v,v=x;break e}else{n(v,x);break}else e(v,x);x=x.sibling}x=eE(w,v.mode,S),x.return=v,v=x}return s(v);case Wl:return C=w._init,_(v,x,C(w._payload),S)}if(Gp(w))return g(v,x,w,S);if(Kh(w))return y(v,x,w,S);c0(v,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,x!==null&&x.tag===6?(n(v,x.sibling),x=i(x,w),x.return=v,v=x):(n(v,x),x=JM(w,v.mode,S),x.return=v,v=x),s(v)):n(v,x)}return _}var Zf=iV(!0),oV=iV(!1),Sg={},Ma=Rc(Sg),Um=Rc(Sg),Bm=Rc(Sg);function Su(t){if(t===Sg)throw Error(tt(174));return t}function yO(t,e){switch(Qn(Bm,e),Qn(Um,t),Qn(Ma,Sg),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:_C(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=_C(e,t)}ar(Ma),Qn(Ma,e)}function qf(){ar(Ma),ar(Um),ar(Bm)}function sV(t){Su(Bm.current);var e=Su(Ma.current),n=_C(e,t.type);e!==n&&(Qn(Um,t),Qn(Ma,n))}function _O(t){Um.current===t&&(ar(Ma),ar(Um))}var gr=Rc(0);function cx(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var YM=[];function xO(){for(var t=0;tn?n:4,t(!0);var r=XM.transition;XM.transition={};try{t(!1),e()}finally{Gn=n,XM.transition=r}}function SV(){return ds().memoizedState}function qee(t,e,n){var r=uc(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},bV(t))MV(e,n);else if(n=eV(t,e,n,r),n!==null){var i=Zi();Ls(n,t,r,i),EV(n,e,r)}}function Kee(t,e,n){var r=uc(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(bV(t))MV(e,i);else{var o=t.alternate;if(t.lanes===0&&(o===null||o.lanes===0)&&(o=e.lastRenderedReducer,o!==null))try{var s=e.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,Hs(a,s)){var l=e.interleaved;l===null?(i.next=i,gO(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}n=eV(t,e,i,r),n!==null&&(i=Zi(),Ls(n,t,r,i),EV(n,e,r))}}function bV(t){var e=t.alternate;return t===_r||e!==null&&e===_r}function MV(t,e){sm=ux=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function EV(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,nO(t,n)}}var dx={readContext:us,useCallback:Ci,useContext:Ci,useEffect:Ci,useImperativeHandle:Ci,useInsertionEffect:Ci,useLayoutEffect:Ci,useMemo:Ci,useReducer:Ci,useRef:Ci,useState:Ci,useDebugValue:Ci,useDeferredValue:Ci,useTransition:Ci,useMutableSource:Ci,useSyncExternalStore:Ci,useId:Ci,unstable_isNewReconciler:!1},Qee={readContext:us,useCallback:function(t,e){return da().memoizedState=[t,e===void 0?null:e],t},useContext:us,useEffect:m3,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,__(4194308,4,vV.bind(null,e,t),n)},useLayoutEffect:function(t,e){return __(4194308,4,t,e)},useInsertionEffect:function(t,e){return __(4,2,t,e)},useMemo:function(t,e){var n=da();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=da();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=qee.bind(null,_r,t),[r.memoizedState,t]},useRef:function(t){var e=da();return t={current:t},e.memoizedState=t},useState:p3,useDebugValue:EO,useDeferredValue:function(t){return da().memoizedState=t},useTransition:function(){var t=p3(!1),e=t[0];return t=Zee.bind(null,t[1]),da().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=_r,i=da();if(fr){if(n===void 0)throw Error(tt(407));n=n()}else{if(n=e(),ui===null)throw Error(tt(349));Gu&30||cV(r,e,n)}i.memoizedState=n;var o={value:n,getSnapshot:e};return i.queue=o,m3(dV.bind(null,r,o,t),[t]),r.flags|=2048,jm(9,uV.bind(null,r,o,n,e),void 0,null),n},useId:function(){var t=da(),e=ui.identifierPrefix;if(fr){var n=tl,r=el;n=(r&~(1<<32-Is(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=Hm++,0")&&(l=l.replace("",t.displayName)),l}while(1<=s&&0<=a);break}}}finally{AM=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?$p(t):""}function OJ(t){switch(t.tag){case 5:return $p(t.type);case 16:return $p("Lazy");case 13:return $p("Suspense");case 19:return $p("SuspenseList");case 0:case 2:case 15:return t=DM(t.type,!1),t;case 11:return t=DM(t.type.render,!1),t;case 1:return t=DM(t.type,!0),t;default:return""}}function mC(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case vf:return"Fragment";case gf:return"Portal";case fC:return"Profiler";case QT:return"StrictMode";case hC:return"Suspense";case pC:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case rH:return(t.displayName||"Context")+".Consumer";case nH:return(t._context.displayName||"Context")+".Provider";case JT:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case eO:return e=t.displayName||null,e!==null?e:mC(t.type)||"Memo";case Wl:e=t._payload,t=t._init;try{return mC(t(e))}catch{}}return null}function RJ(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return mC(e);case 8:return e===QT?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function vc(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function oH(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function AJ(t){var e=oH(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Jv(t){t._valueTracker||(t._valueTracker=AJ(t))}function sH(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=oH(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function Y_(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function gC(t,e){var n=e.checked;return xr({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function DI(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=vc(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function aH(t,e){e=e.checked,e!=null&&KT(t,"checked",e,!1)}function vC(t,e){aH(t,e);var n=vc(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?yC(t,e.type,n):e.hasOwnProperty("defaultValue")&&yC(t,e.type,vc(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function II(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function yC(t,e,n){(e!=="number"||Y_(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var Gp=Array.isArray;function kf(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=e0.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Om(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var tm={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},DJ=["Webkit","ms","Moz","O"];Object.keys(tm).forEach(function(t){DJ.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),tm[e]=tm[t]})});function dH(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||tm.hasOwnProperty(t)&&tm[t]?(""+e).trim():e+"px"}function fH(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=dH(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var IJ=xr({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 wC(t,e){if(e){if(IJ[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(tt(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(tt(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(tt(61))}if(e.style!=null&&typeof e.style!="object")throw Error(tt(62))}}function SC(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var bC=null;function tO(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var MC=null,Nf=null,Ff=null;function NI(t){if(t=wg(t)){if(typeof MC!="function")throw Error(tt(280));var e=t.stateNode;e&&(e=nS(e),MC(t.stateNode,t.type,e))}}function hH(t){Nf?Ff?Ff.push(t):Ff=[t]:Nf=t}function pH(){if(Nf){var t=Nf,e=Ff;if(Ff=Nf=null,NI(t),e)for(t=0;t>>=0,t===0?32:31-($J(t)/GJ|0)|0}var t0=64,n0=4194304;function Wp(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function K_(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,o=t.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=Wp(a):(o&=s,o!==0&&(r=Wp(o)))}else s=n&~i,s!==0?r=Wp(s):o!==0&&(r=Wp(o));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,o=e&-e,i>=o||i===16&&(o&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0n;n++)e.push(t);return e}function _g(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Is(e),t[e]=n}function ZJ(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0=rm),GI=String.fromCharCode(32),WI=!1;function LH(t,e){switch(t){case"keyup":return bee.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function kH(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var yf=!1;function Eee(t,e){switch(t){case"compositionend":return kH(e);case"keypress":return e.which!==32?null:(WI=!0,GI);case"textInput":return t=e.data,t===GI&&WI?null:t;default:return null}}function Pee(t,e){if(yf)return t==="compositionend"||!cO&&LH(t,e)?(t=DH(),m_=sO=ql=null,yf=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=qI(n)}}function UH(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?UH(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function BH(){for(var t=window,e=Y_();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=Y_(t.document)}return e}function uO(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function kee(t){var e=BH(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&UH(n.ownerDocument.documentElement,n)){if(r!==null&&uO(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!t.extend&&o>r&&(i=r,r=o,o=i),i=KI(n,o);var s=KI(n,r);i&&s&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==s.node||t.focusOffset!==s.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),o>r?(t.addRange(e),t.extend(s.node,s.offset)):(e.setEnd(s.node,s.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,_f=null,RC=null,om=null,AC=!1;function QI(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;AC||_f==null||_f!==Y_(r)||(r=_f,"selectionStart"in r&&uO(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}),om&&km(om,r)||(om=r,r=ex(RC,"onSelect"),0Sf||(t.current=FC[Sf],FC[Sf]=null,Sf--)}function Qn(t,e){Sf++,FC[Sf]=t.current,t.current=e}var yc={},Ni=Rc(yc),uo=Rc(!1),ju=yc;function Yf(t,e){var n=t.type.contextTypes;if(!n)return yc;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=e[o];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function fo(t){return t=t.childContextTypes,t!=null}function nx(){ar(uo),ar(Ni)}function o3(t,e,n){if(Ni.current!==yc)throw Error(tt(168));Qn(Ni,e),Qn(uo,n)}function ZH(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(tt(108,RJ(t)||"Unknown",i));return xr({},n,r)}function rx(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||yc,ju=Ni.current,Qn(Ni,t),Qn(uo,uo.current),!0}function s3(t,e,n){var r=t.stateNode;if(!r)throw Error(tt(169));n?(t=ZH(t,e,ju),r.__reactInternalMemoizedMergedChildContext=t,ar(uo),ar(Ni),Qn(Ni,t)):ar(uo),Qn(uo,n)}var Ka=null,rS=!1,WM=!1;function qH(t){Ka===null?Ka=[t]:Ka.push(t)}function Yee(t){rS=!0,qH(t)}function Ac(){if(!WM&&Ka!==null){WM=!0;var t=0,e=Gn;try{var n=Ka;for(Gn=1;t>=s,i-=s,el=1<<32-Is(e)+i|n<R?(T=O,O=null):T=O.sibling;var A=f(v,O,w[R],S);if(A===null){O===null&&(O=T);break}t&&O&&A.alternate===null&&e(v,O),x=o(A,x,R),C===null?E=A:C.sibling=A,C=A,O=T}if(R===w.length)return n(v,O),fr&&uu(v,R),E;if(O===null){for(;RR?(T=O,O=null):T=O.sibling;var F=f(v,O,A.value,S);if(F===null){O===null&&(O=T);break}t&&O&&F.alternate===null&&e(v,O),x=o(F,x,R),C===null?E=F:C.sibling=F,C=F,O=T}if(A.done)return n(v,O),fr&&uu(v,R),E;if(O===null){for(;!A.done;R++,A=w.next())A=d(v,A.value,S),A!==null&&(x=o(A,x,R),C===null?E=A:C.sibling=A,C=A);return fr&&uu(v,R),E}for(O=r(v,O);!A.done;R++,A=w.next())A=h(O,v,R,A.value,S),A!==null&&(t&&A.alternate!==null&&O.delete(A.key===null?R:A.key),x=o(A,x,R),C===null?E=A:C.sibling=A,C=A);return t&&O.forEach(function(N){return e(v,N)}),fr&&uu(v,R),E}function _(v,x,w,S){if(typeof w=="object"&&w!==null&&w.type===vf&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case Qv:e:{for(var E=w.key,C=x;C!==null;){if(C.key===E){if(E=w.type,E===vf){if(C.tag===7){n(v,C.sibling),x=i(C,w.props.children),x.return=v,v=x;break e}}else if(C.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Wl&&h3(E)===C.type){n(v,C.sibling),x=i(C,w.props),x.ref=np(v,C,w),x.return=v,v=x;break e}n(v,C);break}else e(v,C);C=C.sibling}w.type===vf?(x=ku(w.props.children,v.mode,S,w.key),x.return=v,v=x):(S=b_(w.type,w.key,w.props,null,v.mode,S),S.ref=np(v,x,w),S.return=v,v=S)}return s(v);case gf:e:{for(C=w.key;x!==null;){if(x.key===C)if(x.tag===4&&x.stateNode.containerInfo===w.containerInfo&&x.stateNode.implementation===w.implementation){n(v,x.sibling),x=i(x,w.children||[]),x.return=v,v=x;break e}else{n(v,x);break}else e(v,x);x=x.sibling}x=eE(w,v.mode,S),x.return=v,v=x}return s(v);case Wl:return C=w._init,_(v,x,C(w._payload),S)}if(Gp(w))return g(v,x,w,S);if(Kh(w))return y(v,x,w,S);c0(v,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,x!==null&&x.tag===6?(n(v,x.sibling),x=i(x,w),x.return=v,v=x):(n(v,x),x=JM(w,v.mode,S),x.return=v,v=x),s(v)):n(v,x)}return _}var Zf=iV(!0),oV=iV(!1),Sg={},Ma=Rc(Sg),Um=Rc(Sg),Bm=Rc(Sg);function Su(t){if(t===Sg)throw Error(tt(174));return t}function _O(t,e){switch(Qn(Bm,e),Qn(Um,t),Qn(Ma,Sg),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:xC(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=xC(e,t)}ar(Ma),Qn(Ma,e)}function qf(){ar(Ma),ar(Um),ar(Bm)}function sV(t){Su(Bm.current);var e=Su(Ma.current),n=xC(e,t.type);e!==n&&(Qn(Um,t),Qn(Ma,n))}function xO(t){Um.current===t&&(ar(Ma),ar(Um))}var gr=Rc(0);function cx(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var YM=[];function wO(){for(var t=0;tn?n:4,t(!0);var r=XM.transition;XM.transition={};try{t(!1),e()}finally{Gn=n,XM.transition=r}}function SV(){return ds().memoizedState}function Kee(t,e,n){var r=uc(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},bV(t))MV(e,n);else if(n=eV(t,e,n,r),n!==null){var i=Zi();Ls(n,t,r,i),EV(n,e,r)}}function Qee(t,e,n){var r=uc(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(bV(t))MV(e,i);else{var o=t.alternate;if(t.lanes===0&&(o===null||o.lanes===0)&&(o=e.lastRenderedReducer,o!==null))try{var s=e.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,Hs(a,s)){var l=e.interleaved;l===null?(i.next=i,vO(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}n=eV(t,e,i,r),n!==null&&(i=Zi(),Ls(n,t,r,i),EV(n,e,r))}}function bV(t){var e=t.alternate;return t===_r||e!==null&&e===_r}function MV(t,e){sm=ux=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function EV(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,rO(t,n)}}var dx={readContext:us,useCallback:Ci,useContext:Ci,useEffect:Ci,useImperativeHandle:Ci,useInsertionEffect:Ci,useLayoutEffect:Ci,useMemo:Ci,useReducer:Ci,useRef:Ci,useState:Ci,useDebugValue:Ci,useDeferredValue:Ci,useTransition:Ci,useMutableSource:Ci,useSyncExternalStore:Ci,useId:Ci,unstable_isNewReconciler:!1},Jee={readContext:us,useCallback:function(t,e){return da().memoizedState=[t,e===void 0?null:e],t},useContext:us,useEffect:m3,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,__(4194308,4,vV.bind(null,e,t),n)},useLayoutEffect:function(t,e){return __(4194308,4,t,e)},useInsertionEffect:function(t,e){return __(4,2,t,e)},useMemo:function(t,e){var n=da();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=da();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=Kee.bind(null,_r,t),[r.memoizedState,t]},useRef:function(t){var e=da();return t={current:t},e.memoizedState=t},useState:p3,useDebugValue:PO,useDeferredValue:function(t){return da().memoizedState=t},useTransition:function(){var t=p3(!1),e=t[0];return t=qee.bind(null,t[1]),da().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=_r,i=da();if(fr){if(n===void 0)throw Error(tt(407));n=n()}else{if(n=e(),ui===null)throw Error(tt(349));Gu&30||cV(r,e,n)}i.memoizedState=n;var o={value:n,getSnapshot:e};return i.queue=o,m3(dV.bind(null,r,o,t),[t]),r.flags|=2048,jm(9,uV.bind(null,r,o,n,e),void 0,null),n},useId:function(){var t=da(),e=ui.identifierPrefix;if(fr){var n=tl,r=el;n=(r&~(1<<32-Is(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=Hm++,0<\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=s.createElement(n,{is:r.is}):(t=s.createElement(n),n==="select"&&(s=t,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):t=s.createElementNS(t,n),t[va]=e,t[zm]=r,LV(t,e,!1,!1),e.stateNode=t;e:{switch(s=wC(n,r),n){case"dialog":rr("cancel",t),rr("close",t),i=r;break;case"iframe":case"object":case"embed":rr("load",t),i=r;break;case"video":case"audio":for(i=0;iQf&&(e.flags|=128,r=!0,rp(o,!1),e.lanes=4194304)}else{if(!r)if(t=cx(s),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),rp(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!fr)return Ti(e),null}else 2*Tr()-o.renderingStartTime>Qf&&n!==1073741824&&(e.flags|=128,r=!0,rp(o,!1),e.lanes=4194304);o.isBackwards?(s.sibling=e.child,e.child=s):(n=o.last,n!==null?n.sibling=s:e.child=s,o.last=s)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=Tr(),e.sibling=null,n=gr.current,Qn(gr,r?n&1|2:n&1),e):(Ti(e),null);case 22:case 23:return AO(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?So&1073741824&&(Ti(e),e.subtreeFlags&6&&(e.flags|=8192)):Ti(e),null;case 24:return null;case 25:return null}throw Error(tt(156,e.tag))}function ste(t,e){switch(dO(e),e.tag){case 1:return fo(e.type)&&nx(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return qf(),ar(uo),ar(Ni),xO(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return _O(e),null;case 13:if(ar(gr),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(tt(340));Xf()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return ar(gr),null;case 4:return qf(),null;case 10:return mO(e.type._context),null;case 22:case 23:return AO(),null;case 24:return null;default:return null}}var d0=!1,Ii=!1,ate=typeof WeakSet=="function"?WeakSet:Set,Mt=null;function Pf(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){br(t,e,r)}else n.current=null}function XC(t,e,n){try{n()}catch(r){br(t,e,r)}}var M3=!1;function lte(t,e){if(AC=Q_,t=BH(),cO(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,c=0,u=0,d=t,f=null;t:for(;;){for(var h;d!==n||i!==0&&d.nodeType!==3||(a=s+i),d!==o||r!==0&&d.nodeType!==3||(l=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===t)break t;if(f===n&&++c===i&&(a=s),f===o&&++u===r&&(l=s),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(DC={focusedElem:t,selectionRange:n},Q_=!1,Mt=e;Mt!==null;)if(e=Mt,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Mt=t;else for(;Mt!==null;){e=Mt;try{var g=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var y=g.memoizedProps,_=g.memoizedState,v=e.stateNode,x=v.getSnapshotBeforeUpdate(e.elementType===e.type?y:bs(e.type,y),_);v.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var w=e.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(tt(163))}}catch(S){br(e,e.return,S)}if(t=e.sibling,t!==null){t.return=e.return,Mt=t;break}Mt=e.return}return g=M3,M3=!1,g}function am(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var o=i.destroy;i.destroy=void 0,o!==void 0&&XC(e,n,o)}i=i.next}while(i!==r)}}function sS(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function ZC(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function FV(t){var e=t.alternate;e!==null&&(t.alternate=null,FV(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[va],delete e[zm],delete e[kC],delete e[$ee],delete e[Gee])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function zV(t){return t.tag===5||t.tag===3||t.tag===4}function E3(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||zV(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function qC(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=tx));else if(r!==4&&(t=t.child,t!==null))for(qC(t,e,n),t=t.sibling;t!==null;)qC(t,e,n),t=t.sibling}function KC(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(KC(t,e,n),t=t.sibling;t!==null;)KC(t,e,n),t=t.sibling}var vi=null,Ms=!1;function Dl(t,e,n){for(n=n.child;n!==null;)UV(t,e,n),n=n.sibling}function UV(t,e,n){if(ba&&typeof ba.onCommitFiberUnmount=="function")try{ba.onCommitFiberUnmount(Q1,n)}catch{}switch(n.tag){case 5:Ii||Pf(n,e);case 6:var r=vi,i=Ms;vi=null,Dl(t,e,n),vi=r,Ms=i,vi!==null&&(Ms?(t=vi,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):vi.removeChild(n.stateNode));break;case 18:vi!==null&&(Ms?(t=vi,n=n.stateNode,t.nodeType===8?GM(t.parentNode,n):t.nodeType===1&&GM(t,n),Im(t)):GM(vi,n.stateNode));break;case 4:r=vi,i=Ms,vi=n.stateNode.containerInfo,Ms=!0,Dl(t,e,n),vi=r,Ms=i;break;case 0:case 11:case 14:case 15:if(!Ii&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&XC(n,e,s),i=i.next}while(i!==r)}Dl(t,e,n);break;case 1:if(!Ii&&(Pf(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){br(n,e,a)}Dl(t,e,n);break;case 21:Dl(t,e,n);break;case 22:n.mode&1?(Ii=(r=Ii)||n.memoizedState!==null,Dl(t,e,n),Ii=r):Dl(t,e,n);break;default:Dl(t,e,n)}}function P3(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new ate),e.forEach(function(r){var i=vte.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function vs(t,e){var n=e.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=Tr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ute(r/1960))-r,10t?16:t,Kl===null)var r=!1;else{if(t=Kl,Kl=null,px=0,bn&6)throw Error(tt(331));var i=bn;for(bn|=4,Mt=t.current;Mt!==null;){var o=Mt,s=o.child;if(Mt.flags&16){var a=o.deletions;if(a!==null){for(var l=0;lTr()-OO?Lu(t,0):TO|=n),ho(t,e)}function YV(t,e){e===0&&(t.mode&1?(e=n0,n0<<=1,!(n0&130023424)&&(n0=4194304)):e=1);var n=Zi();t=ul(t,e),t!==null&&(_g(t,e,n),ho(t,n))}function gte(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),YV(t,n)}function vte(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(tt(314))}r!==null&&r.delete(e),YV(t,n)}var XV;XV=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||uo.current)co=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return co=!1,ite(t,e,n);co=!!(t.flags&131072)}else co=!1,fr&&e.flags&1048576&&KH(e,ox,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;x_(t,e),t=e.pendingProps;var i=Yf(e,Ni.current);Uf(e,n),i=SO(null,e,r,t,i,n);var o=bO();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,fo(r)?(o=!0,rx(e)):o=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,vO(e),i.updater=iS,e.stateNode=i,i._reactInternals=e,HC(e,r,t,n),e=$C(null,e,r,!0,o,n)):(e.tag=0,fr&&o&&uO(e),Yi(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(x_(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=_te(r),t=bs(r,t),i){case 0:e=jC(null,e,r,t,n);break e;case 1:e=w3(null,e,r,t,n);break e;case 11:e=_3(null,e,r,t,n);break e;case 14:e=x3(null,e,r,bs(r.type,t),n);break e}throw Error(tt(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:bs(r,i),jC(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:bs(r,i),w3(t,e,r,i,n);case 3:e:{if(AV(e),t===null)throw Error(tt(387));r=e.pendingProps,o=e.memoizedState,i=o.element,tV(t,e),lx(e,r,null,n);var s=e.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},e.updateQueue.baseState=o,e.memoizedState=o,e.flags&256){i=Kf(Error(tt(423)),e),e=S3(t,e,r,n,i);break e}else if(r!==i){i=Kf(Error(tt(424)),e),e=S3(t,e,r,n,i);break e}else for(bo=ac(e.stateNode.containerInfo.firstChild),Po=e,fr=!0,Cs=null,n=oV(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Xf(),r===i){e=dl(t,e,n);break e}Yi(t,e,r,n)}e=e.child}return e;case 5:return sV(e),t===null&&zC(e),r=e.type,i=e.pendingProps,o=t!==null?t.memoizedProps:null,s=i.children,IC(r,i)?s=null:o!==null&&IC(r,o)&&(e.flags|=32),RV(t,e),Yi(t,e,s,n),e.child;case 6:return t===null&&zC(e),null;case 13:return DV(t,e,n);case 4:return yO(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=Zf(e,null,r,n):Yi(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:bs(r,i),_3(t,e,r,i,n);case 7:return Yi(t,e,e.pendingProps,n),e.child;case 8:return Yi(t,e,e.pendingProps.children,n),e.child;case 12:return Yi(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,o=e.memoizedProps,s=i.value,Qn(sx,r._currentValue),r._currentValue=s,o!==null)if(Hs(o.value,s)){if(o.children===i.children&&!uo.current){e=dl(t,e,n);break e}}else for(o=e.child,o!==null&&(o.return=e);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=il(-1,n&-n),l.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),UC(o.return,n,e),a.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===e.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(tt(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),UC(s,n,e),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===e){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Yi(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,Uf(e,n),i=us(i),r=r(i),e.flags|=1,Yi(t,e,r,n),e.child;case 14:return r=e.type,i=bs(r,e.pendingProps),i=bs(r.type,i),x3(t,e,r,i,n);case 15:return TV(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:bs(r,i),x_(t,e),e.tag=1,fo(r)?(t=!0,rx(e)):t=!1,Uf(e,n),rV(e,r,i),HC(e,r,i,n),$C(null,e,r,!0,t,n);case 19:return IV(t,e,n);case 22:return OV(t,e,n)}throw Error(tt(156,e.tag))};function ZV(t,e){return wH(t,e)}function yte(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function is(t,e,n,r){return new yte(t,e,n,r)}function IO(t){return t=t.prototype,!(!t||!t.isReactComponent)}function _te(t){if(typeof t=="function")return IO(t)?1:0;if(t!=null){if(t=t.$$typeof,t===QT)return 11;if(t===JT)return 14}return 2}function dc(t,e){var n=t.alternate;return n===null?(n=is(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function b_(t,e,n,r,i,o){var s=2;if(r=t,typeof t=="function")IO(t)&&(s=1);else if(typeof t=="string")s=5;else e:switch(t){case vf:return ku(n.children,i,o,e);case KT:s=8,i|=8;break;case dC:return t=is(12,n,e,i|2),t.elementType=dC,t.lanes=o,t;case fC:return t=is(13,n,e,i),t.elementType=fC,t.lanes=o,t;case hC:return t=is(19,n,e,i),t.elementType=hC,t.lanes=o,t;case iH:return lS(n,i,o,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case nH:s=10;break e;case rH:s=9;break e;case QT:s=11;break e;case JT:s=14;break e;case Wl:s=16,r=null;break e}throw Error(tt(130,t==null?t:typeof t,""))}return e=is(s,n,e,i),e.elementType=t,e.type=r,e.lanes=o,e}function ku(t,e,n,r){return t=is(7,t,r,e),t.lanes=n,t}function lS(t,e,n,r){return t=is(22,t,r,e),t.elementType=iH,t.lanes=n,t.stateNode={isHidden:!1},t}function JM(t,e,n){return t=is(6,t,null,e),t.lanes=n,t}function eE(t,e,n){return e=is(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function xte(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=LM(0),this.expirationTimes=LM(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=LM(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function LO(t,e,n,r,i,o,s,a,l){return t=new xte(t,e,n,a,l),e===1?(e=1,o===!0&&(e|=8)):e=0,o=is(3,null,null,e),t.current=o,o.stateNode=t,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},vO(o),t}function wte(t,e,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(JV)}catch(t){console.error(t)}}JV(),K6.exports=Lo;var bg=K6.exports,zO,L3=bg;zO=L3.createRoot,L3.hydrateRoot;/** +`+o.stack}return{value:t,source:e,stack:i,digest:null}}function KM(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function jC(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var nte=typeof WeakMap=="function"?WeakMap:Map;function PV(t,e,n){n=il(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){hx||(hx=!0,JC=r),jC(t,e)},n}function CV(t,e,n){n=il(-1,n),n.tag=3;var r=t.type.getDerivedStateFromError;if(typeof r=="function"){var i=e.value;n.payload=function(){return r(i)},n.callback=function(){jC(t,e)}}var o=t.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){jC(t,e),typeof r!="function"&&(cc===null?cc=new Set([this]):cc.add(this));var s=e.stack;this.componentDidCatch(e.value,{componentStack:s!==null?s:""})}),n}function g3(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new nte;var i=new Set;r.set(e,i)}else i=r.get(e),i===void 0&&(i=new Set,r.set(e,i));i.has(n)||(i.add(n),t=gte.bind(null,t,e,n),e.then(t,t))}function v3(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function y3(t,e,n,r,i){return t.mode&1?(t.flags|=65536,t.lanes=i,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=il(-1,1),e.tag=2,lc(n,e,1))),n.lanes|=1),t)}var rte=vl.ReactCurrentOwner,co=!1;function Yi(t,e,n,r){e.child=t===null?oV(e,null,n,r):Zf(e,t.child,n,r)}function _3(t,e,n,r,i){n=n.render;var o=e.ref;return Uf(e,i),r=bO(t,e,n,r,o,i),n=MO(),t!==null&&!co?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,dl(t,e,i)):(fr&&n&&dO(e),e.flags|=1,Yi(t,e,r,i),e.child)}function x3(t,e,n,r,i){if(t===null){var o=n.type;return typeof o=="function"&&!LO(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=o,TV(t,e,o,r,i)):(t=b_(n.type,null,r,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(o=t.child,!(t.lanes&i)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:km,n(s,r)&&t.ref===e.ref)return dl(t,e,i)}return e.flags|=1,t=dc(o,r),t.ref=e.ref,t.return=e,e.child=t}function TV(t,e,n,r,i){if(t!==null){var o=t.memoizedProps;if(km(o,r)&&t.ref===e.ref)if(co=!1,e.pendingProps=r=o,(t.lanes&i)!==0)t.flags&131072&&(co=!0);else return e.lanes=t.lanes,dl(t,e,i)}return $C(t,e,n,r,i)}function OV(t,e,n){var r=e.pendingProps,i=r.children,o=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},Qn(Cf,So),So|=n;else{if(!(n&1073741824))return t=o!==null?o.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,Qn(Cf,So),So|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Qn(Cf,So),So|=r}else o!==null?(r=o.baseLanes|n,e.memoizedState=null):r=n,Qn(Cf,So),So|=r;return Yi(t,e,i,n),e.child}function RV(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function $C(t,e,n,r,i){var o=fo(n)?ju:Ni.current;return o=Yf(e,o),Uf(e,i),n=bO(t,e,n,r,o,i),r=MO(),t!==null&&!co?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,dl(t,e,i)):(fr&&r&&dO(e),e.flags|=1,Yi(t,e,n,i),e.child)}function w3(t,e,n,r,i){if(fo(n)){var o=!0;rx(e)}else o=!1;if(Uf(e,i),e.stateNode===null)x_(t,e),rV(e,n,r),VC(e,n,r,i),r=!0;else if(t===null){var s=e.stateNode,a=e.memoizedProps;s.props=a;var l=s.context,c=n.contextType;typeof c=="object"&&c!==null?c=us(c):(c=fo(n)?ju:Ni.current,c=Yf(e,c));var u=n.getDerivedStateFromProps,d=typeof u=="function"||typeof s.getSnapshotBeforeUpdate=="function";d||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||l!==c)&&f3(e,s,r,c),Yl=!1;var f=e.memoizedState;s.state=f,lx(e,r,s,i),l=e.memoizedState,a!==r||f!==l||uo.current||Yl?(typeof u=="function"&&(HC(e,n,u,r),l=e.memoizedState),(a=Yl||d3(e,n,a,r,f,l,c))?(d||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(e.flags|=4194308)):(typeof s.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=l),s.props=r,s.state=l,s.context=c,r=a):(typeof s.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{s=e.stateNode,tV(t,e),a=e.memoizedProps,c=e.type===e.elementType?a:bs(e.type,a),s.props=c,d=e.pendingProps,f=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=us(l):(l=fo(n)?ju:Ni.current,l=Yf(e,l));var h=n.getDerivedStateFromProps;(u=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==d||f!==l)&&f3(e,s,r,l),Yl=!1,f=e.memoizedState,s.state=f,lx(e,r,s,i);var g=e.memoizedState;a!==d||f!==g||uo.current||Yl?(typeof h=="function"&&(HC(e,n,h,r),g=e.memoizedState),(c=Yl||d3(e,n,c,r,f,g,l)||!1)?(u||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,g,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,g,l)),typeof s.componentDidUpdate=="function"&&(e.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=g),s.props=r,s.state=g,s.context=l,r=c):(typeof s.componentDidUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),r=!1)}return GC(t,e,n,r,o,i)}function GC(t,e,n,r,i,o){RV(t,e);var s=(e.flags&128)!==0;if(!r&&!s)return i&&s3(e,n,!1),dl(t,e,o);r=e.stateNode,rte.current=e;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&s?(e.child=Zf(e,t.child,null,o),e.child=Zf(e,null,a,o)):Yi(t,e,a,o),e.memoizedState=r.state,i&&s3(e,n,!0),e.child}function AV(t){var e=t.stateNode;e.pendingContext?o3(t,e.pendingContext,e.pendingContext!==e.context):e.context&&o3(t,e.context,!1),_O(t,e.containerInfo)}function S3(t,e,n,r,i){return Xf(),hO(i),e.flags|=256,Yi(t,e,n,r),e.child}var WC={dehydrated:null,treeContext:null,retryLane:0};function YC(t){return{baseLanes:t,cachePool:null,transitions:null}}function DV(t,e,n){var r=e.pendingProps,i=gr.current,o=!1,s=(e.flags&128)!==0,a;if((a=s)||(a=t!==null&&t.memoizedState===null?!1:(i&2)!==0),a?(o=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),Qn(gr,i&1),t===null)return UC(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(s=r.children,t=r.fallback,o?(r=e.mode,o=e.child,s={mode:"hidden",children:s},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=s):o=lS(s,r,0,null),t=ku(t,r,n,null),o.return=e,t.return=e,o.sibling=t,e.child=o,e.child.memoizedState=YC(n),e.memoizedState=WC,t):CO(e,s));if(i=t.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return ite(t,e,s,r,a,i,n);if(o){o=r.fallback,s=e.mode,i=t.child,a=i.sibling;var l={mode:"hidden",children:r.children};return!(s&1)&&e.child!==i?(r=e.child,r.childLanes=0,r.pendingProps=l,e.deletions=null):(r=dc(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?o=dc(a,o):(o=ku(o,s,n,null),o.flags|=2),o.return=e,r.return=e,r.sibling=o,e.child=r,r=o,o=e.child,s=t.child.memoizedState,s=s===null?YC(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=t.childLanes&~n,e.memoizedState=WC,r}return o=t.child,t=o.sibling,r=dc(o,{mode:"visible",children:r.children}),!(e.mode&1)&&(r.lanes=n),r.return=e,r.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=r,e.memoizedState=null,r}function CO(t,e){return e=lS({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function u0(t,e,n,r){return r!==null&&hO(r),Zf(e,t.child,null,n),t=CO(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function ite(t,e,n,r,i,o,s){if(n)return e.flags&256?(e.flags&=-257,r=KM(Error(tt(422))),u0(t,e,s,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(o=r.fallback,i=e.mode,r=lS({mode:"visible",children:r.children},i,0,null),o=ku(o,i,s,null),o.flags|=2,r.return=e,o.return=e,r.sibling=o,e.child=r,e.mode&1&&Zf(e,t.child,null,s),e.child.memoizedState=YC(s),e.memoizedState=WC,o);if(!(e.mode&1))return u0(t,e,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,o=Error(tt(419)),r=KM(o,r,void 0),u0(t,e,s,r)}if(a=(s&t.childLanes)!==0,co||a){if(r=ui,r!==null){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|s)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,ul(t,i),Ls(r,t,i,-1))}return IO(),r=KM(Error(tt(421))),u0(t,e,s,r)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=vte.bind(null,t),i._reactRetry=e,null):(t=o.treeContext,bo=ac(i.nextSibling),Po=e,fr=!0,Cs=null,t!==null&&(es[ts++]=el,es[ts++]=tl,es[ts++]=$u,el=t.id,tl=t.overflow,$u=e),e=CO(e,r.children),e.flags|=4096,e)}function b3(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),BC(t.return,e,n)}function QM(t,e,n,r,i){var o=t.memoizedState;o===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=e,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function IV(t,e,n){var r=e.pendingProps,i=r.revealOrder,o=r.tail;if(Yi(t,e,r.children,n),r=gr.current,r&2)r=r&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&b3(t,n,e);else if(t.tag===19)b3(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(Qn(gr,r),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(n=e.child,i=null;n!==null;)t=n.alternate,t!==null&&cx(t)===null&&(i=n),n=n.sibling;n=i,n===null?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),QM(e,!1,i,n,o);break;case"backwards":for(n=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&cx(t)===null){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}QM(e,!0,n,null,o);break;case"together":QM(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function x_(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function dl(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),Wu|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(tt(153));if(e.child!==null){for(t=e.child,n=dc(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=dc(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function ote(t,e,n){switch(e.tag){case 3:AV(e),Xf();break;case 5:sV(e);break;case 1:fo(e.type)&&rx(e);break;case 4:_O(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,i=e.memoizedProps.value;Qn(sx,r._currentValue),r._currentValue=i;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(Qn(gr,gr.current&1),e.flags|=128,null):n&e.child.childLanes?DV(t,e,n):(Qn(gr,gr.current&1),t=dl(t,e,n),t!==null?t.sibling:null);Qn(gr,gr.current&1);break;case 19:if(r=(n&e.childLanes)!==0,t.flags&128){if(r)return IV(t,e,n);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Qn(gr,gr.current),r)break;return null;case 22:case 23:return e.lanes=0,OV(t,e,n)}return dl(t,e,n)}var LV,XC,kV,NV;LV=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};XC=function(){};kV=function(t,e,n,r){var i=t.memoizedProps;if(i!==r){t=e.stateNode,Su(Ma.current);var o=null;switch(n){case"input":i=gC(t,i),r=gC(t,r),o=[];break;case"select":i=xr({},i,{value:void 0}),r=xr({},r,{value:void 0}),o=[];break;case"textarea":i=_C(t,i),r=_C(t,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=tx)}wC(n,r);var s;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var a=i[c];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Tm.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in r){var l=r[c];if(a=i?.[c],r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(s in a)!a.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in l)l.hasOwnProperty(s)&&a[s]!==l[s]&&(n||(n={}),n[s]=l[s])}else n||(o||(o=[]),o.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(o=o||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Tm.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&rr("scroll",t),o||a===l||(o=[])):(o=o||[]).push(c,l))}n&&(o=o||[]).push("style",n);var c=o;(e.updateQueue=c)&&(e.flags|=4)}};NV=function(t,e,n,r){n!==r&&(e.flags|=4)};function rp(t,e){if(!fr)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function Ti(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,r=0;if(e)for(var i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function ste(t,e,n){var r=e.pendingProps;switch(fO(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ti(e),null;case 1:return fo(e.type)&&nx(),Ti(e),null;case 3:return r=e.stateNode,qf(),ar(uo),ar(Ni),wO(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(l0(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Cs!==null&&(n2(Cs),Cs=null))),XC(t,e),Ti(e),null;case 5:xO(e);var i=Su(Bm.current);if(n=e.type,t!==null&&e.stateNode!=null)kV(t,e,n,r,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(tt(166));return Ti(e),null}if(t=Su(Ma.current),l0(e)){r=e.stateNode,n=e.type;var o=e.memoizedProps;switch(r[va]=e,r[zm]=o,t=(e.mode&1)!==0,n){case"dialog":rr("cancel",r),rr("close",r);break;case"iframe":case"object":case"embed":rr("load",r);break;case"video":case"audio":for(i=0;i<\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=s.createElement(n,{is:r.is}):(t=s.createElement(n),n==="select"&&(s=t,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):t=s.createElementNS(t,n),t[va]=e,t[zm]=r,LV(t,e,!1,!1),e.stateNode=t;e:{switch(s=SC(n,r),n){case"dialog":rr("cancel",t),rr("close",t),i=r;break;case"iframe":case"object":case"embed":rr("load",t),i=r;break;case"video":case"audio":for(i=0;iQf&&(e.flags|=128,r=!0,rp(o,!1),e.lanes=4194304)}else{if(!r)if(t=cx(s),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),rp(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!fr)return Ti(e),null}else 2*Tr()-o.renderingStartTime>Qf&&n!==1073741824&&(e.flags|=128,r=!0,rp(o,!1),e.lanes=4194304);o.isBackwards?(s.sibling=e.child,e.child=s):(n=o.last,n!==null?n.sibling=s:e.child=s,o.last=s)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=Tr(),e.sibling=null,n=gr.current,Qn(gr,r?n&1|2:n&1),e):(Ti(e),null);case 22:case 23:return DO(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?So&1073741824&&(Ti(e),e.subtreeFlags&6&&(e.flags|=8192)):Ti(e),null;case 24:return null;case 25:return null}throw Error(tt(156,e.tag))}function ate(t,e){switch(fO(e),e.tag){case 1:return fo(e.type)&&nx(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return qf(),ar(uo),ar(Ni),wO(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return xO(e),null;case 13:if(ar(gr),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(tt(340));Xf()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return ar(gr),null;case 4:return qf(),null;case 10:return gO(e.type._context),null;case 22:case 23:return DO(),null;case 24:return null;default:return null}}var d0=!1,Ii=!1,lte=typeof WeakSet=="function"?WeakSet:Set,Mt=null;function Pf(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){br(t,e,r)}else n.current=null}function ZC(t,e,n){try{n()}catch(r){br(t,e,r)}}var M3=!1;function cte(t,e){if(DC=Q_,t=BH(),uO(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,c=0,u=0,d=t,f=null;t:for(;;){for(var h;d!==n||i!==0&&d.nodeType!==3||(a=s+i),d!==o||r!==0&&d.nodeType!==3||(l=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===t)break t;if(f===n&&++c===i&&(a=s),f===o&&++u===r&&(l=s),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(IC={focusedElem:t,selectionRange:n},Q_=!1,Mt=e;Mt!==null;)if(e=Mt,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Mt=t;else for(;Mt!==null;){e=Mt;try{var g=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var y=g.memoizedProps,_=g.memoizedState,v=e.stateNode,x=v.getSnapshotBeforeUpdate(e.elementType===e.type?y:bs(e.type,y),_);v.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var w=e.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(tt(163))}}catch(S){br(e,e.return,S)}if(t=e.sibling,t!==null){t.return=e.return,Mt=t;break}Mt=e.return}return g=M3,M3=!1,g}function am(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var o=i.destroy;i.destroy=void 0,o!==void 0&&ZC(e,n,o)}i=i.next}while(i!==r)}}function sS(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function qC(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function FV(t){var e=t.alternate;e!==null&&(t.alternate=null,FV(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[va],delete e[zm],delete e[NC],delete e[Gee],delete e[Wee])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function zV(t){return t.tag===5||t.tag===3||t.tag===4}function E3(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||zV(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function KC(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=tx));else if(r!==4&&(t=t.child,t!==null))for(KC(t,e,n),t=t.sibling;t!==null;)KC(t,e,n),t=t.sibling}function QC(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(QC(t,e,n),t=t.sibling;t!==null;)QC(t,e,n),t=t.sibling}var vi=null,Ms=!1;function Dl(t,e,n){for(n=n.child;n!==null;)UV(t,e,n),n=n.sibling}function UV(t,e,n){if(ba&&typeof ba.onCommitFiberUnmount=="function")try{ba.onCommitFiberUnmount(Q1,n)}catch{}switch(n.tag){case 5:Ii||Pf(n,e);case 6:var r=vi,i=Ms;vi=null,Dl(t,e,n),vi=r,Ms=i,vi!==null&&(Ms?(t=vi,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):vi.removeChild(n.stateNode));break;case 18:vi!==null&&(Ms?(t=vi,n=n.stateNode,t.nodeType===8?GM(t.parentNode,n):t.nodeType===1&&GM(t,n),Im(t)):GM(vi,n.stateNode));break;case 4:r=vi,i=Ms,vi=n.stateNode.containerInfo,Ms=!0,Dl(t,e,n),vi=r,Ms=i;break;case 0:case 11:case 14:case 15:if(!Ii&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&ZC(n,e,s),i=i.next}while(i!==r)}Dl(t,e,n);break;case 1:if(!Ii&&(Pf(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){br(n,e,a)}Dl(t,e,n);break;case 21:Dl(t,e,n);break;case 22:n.mode&1?(Ii=(r=Ii)||n.memoizedState!==null,Dl(t,e,n),Ii=r):Dl(t,e,n);break;default:Dl(t,e,n)}}function P3(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new lte),e.forEach(function(r){var i=yte.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function vs(t,e){var n=e.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=Tr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*dte(r/1960))-r,10t?16:t,Kl===null)var r=!1;else{if(t=Kl,Kl=null,px=0,bn&6)throw Error(tt(331));var i=bn;for(bn|=4,Mt=t.current;Mt!==null;){var o=Mt,s=o.child;if(Mt.flags&16){var a=o.deletions;if(a!==null){for(var l=0;lTr()-RO?Lu(t,0):OO|=n),ho(t,e)}function YV(t,e){e===0&&(t.mode&1?(e=n0,n0<<=1,!(n0&130023424)&&(n0=4194304)):e=1);var n=Zi();t=ul(t,e),t!==null&&(_g(t,e,n),ho(t,n))}function vte(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),YV(t,n)}function yte(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(tt(314))}r!==null&&r.delete(e),YV(t,n)}var XV;XV=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||uo.current)co=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return co=!1,ote(t,e,n);co=!!(t.flags&131072)}else co=!1,fr&&e.flags&1048576&&KH(e,ox,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;x_(t,e),t=e.pendingProps;var i=Yf(e,Ni.current);Uf(e,n),i=bO(null,e,r,t,i,n);var o=MO();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,fo(r)?(o=!0,rx(e)):o=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,yO(e),i.updater=iS,e.stateNode=i,i._reactInternals=e,VC(e,r,t,n),e=GC(null,e,r,!0,o,n)):(e.tag=0,fr&&o&&dO(e),Yi(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(x_(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=xte(r),t=bs(r,t),i){case 0:e=$C(null,e,r,t,n);break e;case 1:e=w3(null,e,r,t,n);break e;case 11:e=_3(null,e,r,t,n);break e;case 14:e=x3(null,e,r,bs(r.type,t),n);break e}throw Error(tt(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:bs(r,i),$C(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:bs(r,i),w3(t,e,r,i,n);case 3:e:{if(AV(e),t===null)throw Error(tt(387));r=e.pendingProps,o=e.memoizedState,i=o.element,tV(t,e),lx(e,r,null,n);var s=e.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},e.updateQueue.baseState=o,e.memoizedState=o,e.flags&256){i=Kf(Error(tt(423)),e),e=S3(t,e,r,n,i);break e}else if(r!==i){i=Kf(Error(tt(424)),e),e=S3(t,e,r,n,i);break e}else for(bo=ac(e.stateNode.containerInfo.firstChild),Po=e,fr=!0,Cs=null,n=oV(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Xf(),r===i){e=dl(t,e,n);break e}Yi(t,e,r,n)}e=e.child}return e;case 5:return sV(e),t===null&&UC(e),r=e.type,i=e.pendingProps,o=t!==null?t.memoizedProps:null,s=i.children,LC(r,i)?s=null:o!==null&&LC(r,o)&&(e.flags|=32),RV(t,e),Yi(t,e,s,n),e.child;case 6:return t===null&&UC(e),null;case 13:return DV(t,e,n);case 4:return _O(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=Zf(e,null,r,n):Yi(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:bs(r,i),_3(t,e,r,i,n);case 7:return Yi(t,e,e.pendingProps,n),e.child;case 8:return Yi(t,e,e.pendingProps.children,n),e.child;case 12:return Yi(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,o=e.memoizedProps,s=i.value,Qn(sx,r._currentValue),r._currentValue=s,o!==null)if(Hs(o.value,s)){if(o.children===i.children&&!uo.current){e=dl(t,e,n);break e}}else for(o=e.child,o!==null&&(o.return=e);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=il(-1,n&-n),l.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),BC(o.return,n,e),a.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===e.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(tt(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),BC(s,n,e),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===e){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Yi(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,Uf(e,n),i=us(i),r=r(i),e.flags|=1,Yi(t,e,r,n),e.child;case 14:return r=e.type,i=bs(r,e.pendingProps),i=bs(r.type,i),x3(t,e,r,i,n);case 15:return TV(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:bs(r,i),x_(t,e),e.tag=1,fo(r)?(t=!0,rx(e)):t=!1,Uf(e,n),rV(e,r,i),VC(e,r,i,n),GC(null,e,r,!0,t,n);case 19:return IV(t,e,n);case 22:return OV(t,e,n)}throw Error(tt(156,e.tag))};function ZV(t,e){return wH(t,e)}function _te(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function is(t,e,n,r){return new _te(t,e,n,r)}function LO(t){return t=t.prototype,!(!t||!t.isReactComponent)}function xte(t){if(typeof t=="function")return LO(t)?1:0;if(t!=null){if(t=t.$$typeof,t===JT)return 11;if(t===eO)return 14}return 2}function dc(t,e){var n=t.alternate;return n===null?(n=is(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function b_(t,e,n,r,i,o){var s=2;if(r=t,typeof t=="function")LO(t)&&(s=1);else if(typeof t=="string")s=5;else e:switch(t){case vf:return ku(n.children,i,o,e);case QT:s=8,i|=8;break;case fC:return t=is(12,n,e,i|2),t.elementType=fC,t.lanes=o,t;case hC:return t=is(13,n,e,i),t.elementType=hC,t.lanes=o,t;case pC:return t=is(19,n,e,i),t.elementType=pC,t.lanes=o,t;case iH:return lS(n,i,o,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case nH:s=10;break e;case rH:s=9;break e;case JT:s=11;break e;case eO:s=14;break e;case Wl:s=16,r=null;break e}throw Error(tt(130,t==null?t:typeof t,""))}return e=is(s,n,e,i),e.elementType=t,e.type=r,e.lanes=o,e}function ku(t,e,n,r){return t=is(7,t,r,e),t.lanes=n,t}function lS(t,e,n,r){return t=is(22,t,r,e),t.elementType=iH,t.lanes=n,t.stateNode={isHidden:!1},t}function JM(t,e,n){return t=is(6,t,null,e),t.lanes=n,t}function eE(t,e,n){return e=is(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function wte(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=LM(0),this.expirationTimes=LM(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=LM(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function kO(t,e,n,r,i,o,s,a,l){return t=new wte(t,e,n,a,l),e===1?(e=1,o===!0&&(e|=8)):e=0,o=is(3,null,null,e),t.current=o,o.stateNode=t,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},yO(o),t}function Ste(t,e,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(JV)}catch(t){console.error(t)}}JV(),K6.exports=Lo;var bg=K6.exports,ej,L3=bg;ej=uC.createRoot=L3.createRoot,uC.hydrateRoot=L3.hydrateRoot;function yn(){return yn=Object.assign?Object.assign.bind():function(t){for(var e=1;e>8&255]+Oi[t>>16&255]+Oi[t>>24&255]+"-"+Oi[e&255]+Oi[e>>8&255]+"-"+Oi[e>>16&15|64]+Oi[e>>24&255]+"-"+Oi[n&63|128]+Oi[n>>8&255]+"-"+Oi[n>>16&255]+Oi[n>>24&255]+Oi[r&255]+Oi[r>>8&255]+Oi[r>>16&255]+Oi[r>>24&255]).toLowerCase()}function Mr(t,e,n){return Math.max(e,Math.min(n,t))}function KO(t,e){return(t%e+e)%e}function one(t,e,n,r,i){return r+(t-e)*(i-r)/(n-e)}function sne(t,e,n){return t!==e?(n-t)/(e-t):0}function fm(t,e,n){return(1-n)*t+n*e}function ane(t,e,n,r){return fm(t,e,1-Math.exp(-n*r))}function lne(t,e=1){return e-Math.abs(KO(t,e*2)-e)}function cne(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*(3-2*t))}function une(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*t*(t*(t*6-15)+10))}function dne(t,e){return t+Math.floor(Math.random()*(e-t+1))}function fne(t,e){return t+Math.random()*(e-t)}function hne(t){return t*(.5-Math.random())}function pne(t){t!==void 0&&(k3=t);let e=k3+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function mne(t){return t*Fu}function gne(t){return t*th}function D2(t){return(t&t-1)===0&&t!==0}function Uj(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))}function Bj(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}function vne(t,e,n,r,i){const o=Math.cos,s=Math.sin,a=o(n/2),l=s(n/2),c=o((e+r)/2),u=s((e+r)/2),d=o((e-r)/2),f=s((e-r)/2),h=o((r-e)/2),g=s((r-e)/2);switch(i){case"XYX":t.set(a*u,l*d,l*f,a*c);break;case"YZY":t.set(l*f,a*u,l*d,a*c);break;case"ZXZ":t.set(l*d,l*f,a*u,a*c);break;case"XZX":t.set(a*u,l*g,l*h,a*c);break;case"YXY":t.set(l*h,a*u,l*g,a*c);break;case"ZYZ":t.set(l*g,l*h,a*u,a*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}function Mo(t,e){switch(e.constructor){case Float32Array:return t;case Uint16Array:return t/65535;case Uint8Array:return t/255;case Int16Array:return Math.max(t/32767,-1);case Int8Array:return Math.max(t/127,-1);default:throw new Error("Invalid component type.")}}function un(t,e){switch(e.constructor){case Float32Array:return t;case Uint16Array:return Math.round(t*65535);case Uint8Array:return Math.round(t*255);case Int16Array:return Math.round(t*32767);case Int8Array:return Math.round(t*127);default:throw new Error("Invalid component type.")}}const Pu={DEG2RAD:Fu,RAD2DEG:th,generateUUID:Co,clamp:Mr,euclideanModulo:KO,mapLinear:one,inverseLerp:sne,lerp:fm,damp:ane,pingpong:lne,smoothstep:cne,smootherstep:une,randInt:dne,randFloat:fne,randFloatSpread:hne,seededRandom:pne,degToRad:mne,radToDeg:gne,isPowerOfTwo:D2,ceilPowerOfTwo:Uj,floorPowerOfTwo:Bj,setQuaternionFromProperEuler:vne,normalize:un,denormalize:Mo};class Ee{constructor(e=0,n=0){Ee.prototype.isVector2=!0,this.x=e,this.y=n}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,n){return this.x=e,this.y=n,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const n=this.x,r=this.y,i=e.elements;return this.x=i[0]*n+i[3]*r+i[6],this.y=i[1]*n+i[4]*r+i[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(n,r)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const r=this.dot(e)/n;return Math.acos(Mr(r,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,r=this.y-e.y;return n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this}lerpVectors(e,n,r){return this.x=e.x+(n.x-e.x)*r,this.y=e.y+(n.y-e.y)*r,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this}rotateAround(e,n){const r=Math.cos(n),i=Math.sin(n),o=this.x-e.x,s=this.y-e.y;return this.x=o*r-s*i+e.x,this.y=o*i+s*r+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class mn{constructor(){mn.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1]}set(e,n,r,i,o,s,a,l,c){const u=this.elements;return u[0]=e,u[1]=i,u[2]=a,u[3]=n,u[4]=o,u[5]=l,u[6]=r,u[7]=s,u[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const n=this.elements,r=e.elements;return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3],n[4]=r[4],n[5]=r[5],n[6]=r[6],n[7]=r[7],n[8]=r[8],this}extractBasis(e,n,r){return e.setFromMatrix3Column(this,0),n.setFromMatrix3Column(this,1),r.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const n=e.elements;return this.set(n[0],n[4],n[8],n[1],n[5],n[9],n[2],n[6],n[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const r=e.elements,i=n.elements,o=this.elements,s=r[0],a=r[3],l=r[6],c=r[1],u=r[4],d=r[7],f=r[2],h=r[5],g=r[8],y=i[0],_=i[3],v=i[6],x=i[1],w=i[4],S=i[7],E=i[2],C=i[5],O=i[8];return o[0]=s*y+a*x+l*E,o[3]=s*_+a*w+l*C,o[6]=s*v+a*S+l*O,o[1]=c*y+u*x+d*E,o[4]=c*_+u*w+d*C,o[7]=c*v+u*S+d*O,o[2]=f*y+h*x+g*E,o[5]=f*_+h*w+g*C,o[8]=f*v+h*S+g*O,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=e,n[4]*=e,n[7]*=e,n[2]*=e,n[5]*=e,n[8]*=e,this}determinant(){const e=this.elements,n=e[0],r=e[1],i=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8];return n*s*u-n*a*c-r*o*u+r*a*l+i*o*c-i*s*l}invert(){const e=this.elements,n=e[0],r=e[1],i=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8],d=u*s-a*c,f=a*l-u*o,h=c*o-s*l,g=n*d+r*f+i*h;if(g===0)return this.set(0,0,0,0,0,0,0,0,0);const y=1/g;return e[0]=d*y,e[1]=(i*c-u*r)*y,e[2]=(a*r-i*s)*y,e[3]=f*y,e[4]=(u*n-i*l)*y,e[5]=(i*o-a*n)*y,e[6]=h*y,e[7]=(r*l-c*n)*y,e[8]=(s*n-r*o)*y,this}transpose(){let e;const n=this.elements;return e=n[1],n[1]=n[3],n[3]=e,e=n[2],n[2]=n[6],n[6]=e,e=n[5],n[5]=n[7],n[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const n=this.elements;return e[0]=n[0],e[1]=n[3],e[2]=n[6],e[3]=n[1],e[4]=n[4],e[5]=n[7],e[6]=n[2],e[7]=n[5],e[8]=n[8],this}setUvTransform(e,n,r,i,o,s,a){const l=Math.cos(o),c=Math.sin(o);return this.set(r*l,r*c,-r*(l*s+c*a)+s+e,-i*c,i*l,-i*(-c*s+l*a)+a+n,0,0,1),this}scale(e,n){return this.premultiply(tE.makeScale(e,n)),this}rotate(e){return this.premultiply(tE.makeRotation(-e)),this}translate(e,n){return this.premultiply(tE.makeTranslation(e,n)),this}makeTranslation(e,n){return this.set(1,0,e,0,1,n,0,0,1),this}makeRotation(e){const n=Math.cos(e),r=Math.sin(e);return this.set(n,-r,0,r,n,0,0,0,1),this}makeScale(e,n){return this.set(e,0,0,0,n,0,0,0,1),this}equals(e){const n=this.elements,r=e.elements;for(let i=0;i<9;i++)if(n[i]!==r[i])return!1;return!0}fromArray(e,n=0){for(let r=0;r<9;r++)this.elements[r]=e[r+n];return this}toArray(e=[],n=0){const r=this.elements;return e[n]=r[0],e[n+1]=r[1],e[n+2]=r[2],e[n+3]=r[3],e[n+4]=r[4],e[n+5]=r[5],e[n+6]=r[6],e[n+7]=r[7],e[n+8]=r[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const tE=new mn;function Hj(t){for(let e=t.length-1;e>=0;--e)if(t[e]>=65535)return!0;return!1}const yne={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function Tf(t,e){return new yne[t](e)}function Jm(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}function Hf(t){return t<.04045?t*.0773993808:Math.pow(t*.9478672986+.0521327014,2.4)}function nE(t){return t<.0031308?t*12.92:1.055*Math.pow(t,.41666)-.055}const _ne=new mn().fromArray([.8224621,.0331941,.0170827,.177538,.9668058,.0723974,-1e-7,1e-7,.9105199]),xne=new mn().fromArray([1.2249401,-.0420569,-.0196376,-.2249404,1.0420571,-.0786361,1e-7,0,1.0982735]);function wne(t){return t.convertSRGBToLinear().applyMatrix3(xne)}function Sne(t){return t.applyMatrix3(_ne).convertLinearToSRGB()}const bne={[eh]:t=>t,[Es]:t=>t.convertSRGBToLinear(),[qO]:wne},Mne={[eh]:t=>t,[Es]:t=>t.convertLinearToSRGB(),[qO]:Sne},Gi={enabled:!1,get legacyMode(){return console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),!this.enabled},set legacyMode(t){console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),this.enabled=!t},get workingColorSpace(){return eh},set workingColorSpace(t){console.warn("THREE.ColorManagement: .workingColorSpace is readonly.")},convert:function(t,e,n){if(this.enabled===!1||e===n||!e||!n)return t;const r=bne[e],i=Mne[n];if(r===void 0||i===void 0)throw new Error(`Unsupported color space conversion, "${e}" to "${n}".`);return i(r(t))},fromWorkingColorSpace:function(t,e){return this.convert(t,this.workingColorSpace,e)},toWorkingColorSpace:function(t,e){return this.convert(t,e,this.workingColorSpace)}};let Pd;class QO{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{Pd===void 0&&(Pd=Jm("canvas")),Pd.width=e.width,Pd.height=e.height;const r=Pd.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),n=Pd}return n.width>2048||n.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),n.toDataURL("image/jpeg",.6)):n.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const n=Jm("canvas");n.width=e.width,n.height=e.height;const r=n.getContext("2d");r.drawImage(e,0,0,e.width,e.height);const i=r.getImageData(0,0,e.width,e.height),o=i.data;for(let s=0;s0&&(r.userData=this.userData),n||(e.textures[this.uuid]=r),r}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==mS)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case Ro:e.x=e.x-Math.floor(e.x);break;case Xr:e.x=e.x<0?0:1;break;case Xm:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case Ro:e.y=e.y-Math.floor(e.y);break;case Xr:e.y=e.y<0?0:1;break;case Xm:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}}qn.DEFAULT_IMAGE=null;qn.DEFAULT_MAPPING=mS;qn.DEFAULT_ANISOTROPY=1;class an{constructor(e=0,n=0,r=0,i=1){an.prototype.isVector4=!0,this.x=e,this.y=n,this.z=r,this.w=i}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,n,r,i){return this.x=e,this.y=n,this.z=r,this.w=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;case 3:this.w=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this.w=e.w+n.w,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this.w+=e.w*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this.w=e.w-n.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const n=this.x,r=this.y,i=this.z,o=this.w,s=e.elements;return this.x=s[0]*n+s[4]*r+s[8]*i+s[12]*o,this.y=s[1]*n+s[5]*r+s[9]*i+s[13]*o,this.z=s[2]*n+s[6]*r+s[10]*i+s[14]*o,this.w=s[3]*n+s[7]*r+s[11]*i+s[15]*o,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const n=Math.sqrt(1-e.w*e.w);return n<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/n,this.y=e.y/n,this.z=e.z/n),this}setAxisAngleFromRotationMatrix(e){let n,r,i,o;const l=e.elements,c=l[0],u=l[4],d=l[8],f=l[1],h=l[5],g=l[9],y=l[2],_=l[6],v=l[10];if(Math.abs(u-f)<.01&&Math.abs(d-y)<.01&&Math.abs(g-_)<.01){if(Math.abs(u+f)<.1&&Math.abs(d+y)<.1&&Math.abs(g+_)<.1&&Math.abs(c+h+v-3)<.1)return this.set(1,0,0,0),this;n=Math.PI;const w=(c+1)/2,S=(h+1)/2,E=(v+1)/2,C=(u+f)/4,O=(d+y)/4,R=(g+_)/4;return w>S&&w>E?w<.01?(r=0,i=.707106781,o=.707106781):(r=Math.sqrt(w),i=C/r,o=O/r):S>E?S<.01?(r=.707106781,i=0,o=.707106781):(i=Math.sqrt(S),r=C/i,o=R/i):E<.01?(r=.707106781,i=.707106781,o=0):(o=Math.sqrt(E),r=O/o,i=R/o),this.set(r,i,o,n),this}let x=Math.sqrt((_-g)*(_-g)+(d-y)*(d-y)+(f-u)*(f-u));return Math.abs(x)<.001&&(x=1),this.x=(_-g)/x,this.y=(d-y)/x,this.z=(f-u)/x,this.w=Math.acos((c+h+v-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this.w=Math.max(e.w,Math.min(n.w,this.w)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this.w=Math.max(e,Math.min(n,this.w)),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(n,r)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this.w+=(e.w-this.w)*n,this}lerpVectors(e,n,r){return this.x=e.x+(n.x-e.x)*r,this.y=e.y+(n.y-e.y)*r,this.z=e.z+(n.z-e.z)*r,this.w=e.w+(n.w-e.w)*r,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this.w=e[n+3],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e[n+3]=this.w,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this.w=e.getW(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class gn extends hs{constructor(e=1,n=1,r={}){super(),this.isWebGLRenderTarget=!0,this.width=e,this.height=n,this.depth=1,this.scissor=new an(0,0,e,n),this.scissorTest=!1,this.viewport=new an(0,0,e,n);const i={width:e,height:n,depth:1};this.texture=new qn(i,r.mapping,r.wrapS,r.wrapT,r.magFilter,r.minFilter,r.format,r.type,r.anisotropy,r.encoding),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=r.generateMipmaps!==void 0?r.generateMipmaps:!1,this.texture.internalFormat=r.internalFormat!==void 0?r.internalFormat:null,this.texture.minFilter=r.minFilter!==void 0?r.minFilter:Dt,this.depthBuffer=r.depthBuffer!==void 0?r.depthBuffer:!0,this.stencilBuffer=r.stencilBuffer!==void 0?r.stencilBuffer:!1,this.depthTexture=r.depthTexture!==void 0?r.depthTexture:null,this.samples=r.samples!==void 0?r.samples:0}setSize(e,n,r=1){(this.width!==e||this.height!==n||this.depth!==r)&&(this.width=e,this.height=n,this.depth=r,this.texture.image.width=e,this.texture.image.height=n,this.texture.image.depth=r,this.dispose()),this.viewport.set(0,0,e,n),this.scissor.set(0,0,e,n)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;const n=Object.assign({},e.texture.image);return this.texture.source=new Cu(n),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class yS extends qn{constructor(e=null,n=1,r=1,i=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:n,height:r,depth:i},this.magFilter=Qt,this.minFilter=Qt,this.wrapR=Xr,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Pne extends gn{constructor(e=1,n=1,r=1){super(e,n),this.isWebGLArrayRenderTarget=!0,this.depth=r,this.texture=new yS(null,e,n,r),this.texture.isRenderTargetTexture=!0}}class zu extends qn{constructor(e=null,n=1,r=1,i=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:n,height:r,depth:i},this.magFilter=Qt,this.minFilter=Qt,this.wrapR=Xr,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Cne extends gn{constructor(e=1,n=1,r=1){super(e,n),this.isWebGL3DRenderTarget=!0,this.depth=r,this.texture=new zu(null,e,n,r),this.texture.isRenderTargetTexture=!0}}class JO extends gn{constructor(e=1,n=1,r=1,i={}){super(e,n,i),this.isWebGLMultipleRenderTargets=!0;const o=this.texture;this.texture=[];for(let s=0;s=0?1:-1,w=1-v*v;if(w>Number.EPSILON){const E=Math.sqrt(w),C=Math.atan2(E,v*x);_=Math.sin(_*C)/E,a=Math.sin(a*C)/E}const S=a*x;if(l=l*_+f*S,c=c*_+h*S,u=u*_+g*S,d=d*_+y*S,_===1-a){const E=1/Math.sqrt(l*l+c*c+u*u+d*d);l*=E,c*=E,u*=E,d*=E}}e[n]=l,e[n+1]=c,e[n+2]=u,e[n+3]=d}static multiplyQuaternionsFlat(e,n,r,i,o,s){const a=r[i],l=r[i+1],c=r[i+2],u=r[i+3],d=o[s],f=o[s+1],h=o[s+2],g=o[s+3];return e[n]=a*g+u*d+l*h-c*f,e[n+1]=l*g+u*f+c*d-a*h,e[n+2]=c*g+u*h+a*f-l*d,e[n+3]=u*g-a*d-l*f-c*h,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,n,r,i){return this._x=e,this._y=n,this._z=r,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,n){const r=e._x,i=e._y,o=e._z,s=e._order,a=Math.cos,l=Math.sin,c=a(r/2),u=a(i/2),d=a(o/2),f=l(r/2),h=l(i/2),g=l(o/2);switch(s){case"XYZ":this._x=f*u*d+c*h*g,this._y=c*h*d-f*u*g,this._z=c*u*g+f*h*d,this._w=c*u*d-f*h*g;break;case"YXZ":this._x=f*u*d+c*h*g,this._y=c*h*d-f*u*g,this._z=c*u*g-f*h*d,this._w=c*u*d+f*h*g;break;case"ZXY":this._x=f*u*d-c*h*g,this._y=c*h*d+f*u*g,this._z=c*u*g+f*h*d,this._w=c*u*d-f*h*g;break;case"ZYX":this._x=f*u*d-c*h*g,this._y=c*h*d+f*u*g,this._z=c*u*g-f*h*d,this._w=c*u*d+f*h*g;break;case"YZX":this._x=f*u*d+c*h*g,this._y=c*h*d+f*u*g,this._z=c*u*g-f*h*d,this._w=c*u*d-f*h*g;break;case"XZY":this._x=f*u*d-c*h*g,this._y=c*h*d-f*u*g,this._z=c*u*g+f*h*d,this._w=c*u*d+f*h*g;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+s)}return n!==!1&&this._onChangeCallback(),this}setFromAxisAngle(e,n){const r=n/2,i=Math.sin(r);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(r),this._onChangeCallback(),this}setFromRotationMatrix(e){const n=e.elements,r=n[0],i=n[4],o=n[8],s=n[1],a=n[5],l=n[9],c=n[2],u=n[6],d=n[10],f=r+a+d;if(f>0){const h=.5/Math.sqrt(f+1);this._w=.25/h,this._x=(u-l)*h,this._y=(o-c)*h,this._z=(s-i)*h}else if(r>a&&r>d){const h=2*Math.sqrt(1+r-a-d);this._w=(u-l)/h,this._x=.25*h,this._y=(i+s)/h,this._z=(o+c)/h}else if(a>d){const h=2*Math.sqrt(1+a-r-d);this._w=(o-c)/h,this._x=(i+s)/h,this._y=.25*h,this._z=(l+u)/h}else{const h=2*Math.sqrt(1+d-r-a);this._w=(s-i)/h,this._x=(o+c)/h,this._y=(l+u)/h,this._z=.25*h}return this._onChangeCallback(),this}setFromUnitVectors(e,n){let r=e.dot(n)+1;return rMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=r):(this._x=0,this._y=-e.z,this._z=e.y,this._w=r)):(this._x=e.y*n.z-e.z*n.y,this._y=e.z*n.x-e.x*n.z,this._z=e.x*n.y-e.y*n.x,this._w=r),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Mr(this.dot(e),-1,1)))}rotateTowards(e,n){const r=this.angleTo(e);if(r===0)return this;const i=Math.min(1,n/r);return this.slerp(e,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,n){const r=e._x,i=e._y,o=e._z,s=e._w,a=n._x,l=n._y,c=n._z,u=n._w;return this._x=r*u+s*a+i*c-o*l,this._y=i*u+s*l+o*a-r*c,this._z=o*u+s*c+r*l-i*a,this._w=s*u-r*a-i*l-o*c,this._onChangeCallback(),this}slerp(e,n){if(n===0)return this;if(n===1)return this.copy(e);const r=this._x,i=this._y,o=this._z,s=this._w;let a=s*e._w+r*e._x+i*e._y+o*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=s,this._x=r,this._y=i,this._z=o,this;const l=1-a*a;if(l<=Number.EPSILON){const h=1-n;return this._w=h*s+n*this._w,this._x=h*r+n*this._x,this._y=h*i+n*this._y,this._z=h*o+n*this._z,this.normalize(),this._onChangeCallback(),this}const c=Math.sqrt(l),u=Math.atan2(c,a),d=Math.sin((1-n)*u)/c,f=Math.sin(n*u)/c;return this._w=s*d+this._w*f,this._x=r*d+this._x*f,this._y=i*d+this._y*f,this._z=o*d+this._z*f,this._onChangeCallback(),this}slerpQuaternions(e,n,r){return this.copy(e).slerp(n,r)}random(){const e=Math.random(),n=Math.sqrt(1-e),r=Math.sqrt(e),i=2*Math.PI*Math.random(),o=2*Math.PI*Math.random();return this.set(n*Math.cos(i),r*Math.sin(o),r*Math.cos(o),n*Math.sin(i))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,n=0){return this._x=e[n],this._y=e[n+1],this._z=e[n+2],this._w=e[n+3],this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._w,e}fromBufferAttribute(e,n){return this._x=e.getX(n),this._y=e.getY(n),this._z=e.getZ(n),this._w=e.getW(n),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class Z{constructor(e=0,n=0,r=0){Z.prototype.isVector3=!0,this.x=e,this.y=n,this.z=r}set(e,n,r){return r===void 0&&(r=this.z),this.x=e,this.y=n,this.z=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,n){return this.x=e.x*n.x,this.y=e.y*n.y,this.z=e.z*n.z,this}applyEuler(e){return this.applyQuaternion(N3.setFromEuler(e))}applyAxisAngle(e,n){return this.applyQuaternion(N3.setFromAxisAngle(e,n))}applyMatrix3(e){const n=this.x,r=this.y,i=this.z,o=e.elements;return this.x=o[0]*n+o[3]*r+o[6]*i,this.y=o[1]*n+o[4]*r+o[7]*i,this.z=o[2]*n+o[5]*r+o[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const n=this.x,r=this.y,i=this.z,o=e.elements,s=1/(o[3]*n+o[7]*r+o[11]*i+o[15]);return this.x=(o[0]*n+o[4]*r+o[8]*i+o[12])*s,this.y=(o[1]*n+o[5]*r+o[9]*i+o[13])*s,this.z=(o[2]*n+o[6]*r+o[10]*i+o[14])*s,this}applyQuaternion(e){const n=this.x,r=this.y,i=this.z,o=e.x,s=e.y,a=e.z,l=e.w,c=l*n+s*i-a*r,u=l*r+a*n-o*i,d=l*i+o*r-s*n,f=-o*n-s*r-a*i;return this.x=c*l+f*-o+u*-a-d*-s,this.y=u*l+f*-s+d*-o-c*-a,this.z=d*l+f*-a+c*-s-u*-o,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const n=this.x,r=this.y,i=this.z,o=e.elements;return this.x=o[0]*n+o[4]*r+o[8]*i,this.y=o[1]*n+o[5]*r+o[9]*i,this.z=o[2]*n+o[6]*r+o[10]*i,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(n,r)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this}lerpVectors(e,n,r){return this.x=e.x+(n.x-e.x)*r,this.y=e.y+(n.y-e.y)*r,this.z=e.z+(n.z-e.z)*r,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,n){const r=e.x,i=e.y,o=e.z,s=n.x,a=n.y,l=n.z;return this.x=i*l-o*a,this.y=o*s-r*l,this.z=r*a-i*s,this}projectOnVector(e){const n=e.lengthSq();if(n===0)return this.set(0,0,0);const r=e.dot(this)/n;return this.copy(e).multiplyScalar(r)}projectOnPlane(e){return iE.copy(this).projectOnVector(e),this.sub(iE)}reflect(e){return this.sub(iE.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const r=this.dot(e)/n;return Math.acos(Mr(r,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,r=this.y-e.y,i=this.z-e.z;return n*n+r*r+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,n,r){const i=Math.sin(n)*e;return this.x=i*Math.sin(r),this.y=Math.cos(n)*e,this.z=i*Math.cos(r),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,n,r){return this.x=e*Math.sin(n),this.y=r,this.z=e*Math.cos(n),this}setFromMatrixPosition(e){const n=e.elements;return this.x=n[12],this.y=n[13],this.z=n[14],this}setFromMatrixScale(e){const n=this.setFromMatrixColumn(e,0).length(),r=this.setFromMatrixColumn(e,1).length(),i=this.setFromMatrixColumn(e,2).length();return this.x=n,this.y=r,this.z=i,this}setFromMatrixColumn(e,n){return this.fromArray(e.elements,n*4)}setFromMatrix3Column(e,n){return this.fromArray(e.elements,n*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=(Math.random()-.5)*2,n=Math.random()*Math.PI*2,r=Math.sqrt(1-e**2);return this.x=r*Math.cos(n),this.y=r*Math.sin(n),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const iE=new Z,N3=new Hn;class zi{constructor(e=new Z(1/0,1/0,1/0),n=new Z(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=n}set(e,n){return this.min.copy(e),this.max.copy(n),this}setFromArray(e){this.makeEmpty();for(let n=0,r=e.length;nthis.max.x||e.ythis.max.y||e.zthis.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,n){return n.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,Va),Va.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let n,r;return e.normal.x>0?(n=e.normal.x*this.min.x,r=e.normal.x*this.max.x):(n=e.normal.x*this.max.x,r=e.normal.x*this.min.x),e.normal.y>0?(n+=e.normal.y*this.min.y,r+=e.normal.y*this.max.y):(n+=e.normal.y*this.max.y,r+=e.normal.y*this.min.y),e.normal.z>0?(n+=e.normal.z*this.min.z,r+=e.normal.z*this.max.z):(n+=e.normal.z*this.max.z,r+=e.normal.z*this.min.z),n<=-e.constant&&r>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(op),p0.subVectors(this.max,op),Td.subVectors(e.a,op),Od.subVectors(e.b,op),Rd.subVectors(e.c,op),Il.subVectors(Od,Td),Ll.subVectors(Rd,Od),Zc.subVectors(Td,Rd);let n=[0,-Il.z,Il.y,0,-Ll.z,Ll.y,0,-Zc.z,Zc.y,Il.z,0,-Il.x,Ll.z,0,-Ll.x,Zc.z,0,-Zc.x,-Il.y,Il.x,0,-Ll.y,Ll.x,0,-Zc.y,Zc.x,0];return!oE(n,Td,Od,Rd,p0)||(n=[1,0,0,0,1,0,0,0,1],!oE(n,Td,Od,Rd,p0))?!1:(m0.crossVectors(Il,Ll),n=[m0.x,m0.y,m0.z],oE(n,Td,Od,Rd,p0))}clampPoint(e,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Va).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Va).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(Ha[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Ha[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Ha[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Ha[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Ha[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Ha[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Ha[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Ha[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Ha),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const Ha=[new Z,new Z,new Z,new Z,new Z,new Z,new Z,new Z],Va=new Z,Cd=new zi,Td=new Z,Od=new Z,Rd=new Z,Il=new Z,Ll=new Z,Zc=new Z,op=new Z,p0=new Z,m0=new Z,qc=new Z;function oE(t,e,n,r,i){for(let o=0,s=t.length-3;o<=s;o+=3){qc.fromArray(t,o);const a=i.x*Math.abs(qc.x)+i.y*Math.abs(qc.y)+i.z*Math.abs(qc.z),l=e.dot(qc),c=n.dot(qc),u=r.dot(qc);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>a)return!1}return!0}const Tne=new zi,sp=new Z,sE=new Z;class mo{constructor(e=new Z,n=-1){this.center=e,this.radius=n}set(e,n){return this.center.copy(e),this.radius=n,this}setFromPoints(e,n){const r=this.center;n!==void 0?r.copy(n):Tne.setFromPoints(e).getCenter(r);let i=0;for(let o=0,s=e.length;othis.radius*this.radius&&(n.sub(this.center).normalize(),n.multiplyScalar(this.radius).add(this.center)),n}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;sp.subVectors(e,this.center);const n=sp.lengthSq();if(n>this.radius*this.radius){const r=Math.sqrt(n),i=(r-this.radius)*.5;this.center.addScaledVector(sp,i/r),this.radius+=i}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(sE.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(sp.copy(e.center).add(sE)),this.expandByPoint(sp.copy(e.center).sub(sE))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const ja=new Z,aE=new Z,g0=new Z,kl=new Z,lE=new Z,v0=new Z,cE=new Z;class nd{constructor(e=new Z,n=new Z(0,0,-1)){this.origin=e,this.direction=n}set(e,n){return this.origin.copy(e),this.direction.copy(n),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,n){return n.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,ja)),this}closestPointToPoint(e,n){n.subVectors(e,this.origin);const r=n.dot(this.direction);return r<0?n.copy(this.origin):n.copy(this.origin).addScaledVector(this.direction,r)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const n=ja.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(ja.copy(this.origin).addScaledVector(this.direction,n),ja.distanceToSquared(e))}distanceSqToSegment(e,n,r,i){aE.copy(e).add(n).multiplyScalar(.5),g0.copy(n).sub(e).normalize(),kl.copy(this.origin).sub(aE);const o=e.distanceTo(n)*.5,s=-this.direction.dot(g0),a=kl.dot(this.direction),l=-kl.dot(g0),c=kl.lengthSq(),u=Math.abs(1-s*s);let d,f,h,g;if(u>0)if(d=s*l-a,f=s*a-l,g=o*u,d>=0)if(f>=-g)if(f<=g){const y=1/u;d*=y,f*=y,h=d*(d+s*f+2*a)+f*(s*d+f+2*l)+c}else f=o,d=Math.max(0,-(s*f+a)),h=-d*d+f*(f+2*l)+c;else f=-o,d=Math.max(0,-(s*f+a)),h=-d*d+f*(f+2*l)+c;else f<=-g?(d=Math.max(0,-(-s*o+a)),f=d>0?-o:Math.min(Math.max(-o,-l),o),h=-d*d+f*(f+2*l)+c):f<=g?(d=0,f=Math.min(Math.max(-o,-l),o),h=f*(f+2*l)+c):(d=Math.max(0,-(s*o+a)),f=d>0?o:Math.min(Math.max(-o,-l),o),h=-d*d+f*(f+2*l)+c);else f=s>0?-o:o,d=Math.max(0,-(s*f+a)),h=-d*d+f*(f+2*l)+c;return r&&r.copy(this.origin).addScaledVector(this.direction,d),i&&i.copy(aE).addScaledVector(g0,f),h}intersectSphere(e,n){ja.subVectors(e.center,this.origin);const r=ja.dot(this.direction),i=ja.dot(ja)-r*r,o=e.radius*e.radius;if(i>o)return null;const s=Math.sqrt(o-i),a=r-s,l=r+s;return l<0?null:a<0?this.at(l,n):this.at(a,n)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const n=e.normal.dot(this.direction);if(n===0)return e.distanceToPoint(this.origin)===0?0:null;const r=-(this.origin.dot(e.normal)+e.constant)/n;return r>=0?r:null}intersectPlane(e,n){const r=this.distanceToPlane(e);return r===null?null:this.at(r,n)}intersectsPlane(e){const n=e.distanceToPoint(this.origin);return n===0||e.normal.dot(this.direction)*n<0}intersectBox(e,n){let r,i,o,s,a,l;const c=1/this.direction.x,u=1/this.direction.y,d=1/this.direction.z,f=this.origin;return c>=0?(r=(e.min.x-f.x)*c,i=(e.max.x-f.x)*c):(r=(e.max.x-f.x)*c,i=(e.min.x-f.x)*c),u>=0?(o=(e.min.y-f.y)*u,s=(e.max.y-f.y)*u):(o=(e.max.y-f.y)*u,s=(e.min.y-f.y)*u),r>s||o>i||((o>r||isNaN(r))&&(r=o),(s=0?(a=(e.min.z-f.z)*d,l=(e.max.z-f.z)*d):(a=(e.max.z-f.z)*d,l=(e.min.z-f.z)*d),r>l||a>i)||((a>r||r!==r)&&(r=a),(l=0?r:i,n)}intersectsBox(e){return this.intersectBox(e,ja)!==null}intersectTriangle(e,n,r,i,o){lE.subVectors(n,e),v0.subVectors(r,e),cE.crossVectors(lE,v0);let s=this.direction.dot(cE),a;if(s>0){if(i)return null;a=1}else if(s<0)a=-1,s=-s;else return null;kl.subVectors(this.origin,e);const l=a*this.direction.dot(v0.crossVectors(kl,v0));if(l<0)return null;const c=a*this.direction.dot(lE.cross(kl));if(c<0||l+c>s)return null;const u=-a*kl.dot(cE);return u<0?null:this.at(u/s,o)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class rt{constructor(){rt.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}set(e,n,r,i,o,s,a,l,c,u,d,f,h,g,y,_){const v=this.elements;return v[0]=e,v[4]=n,v[8]=r,v[12]=i,v[1]=o,v[5]=s,v[9]=a,v[13]=l,v[2]=c,v[6]=u,v[10]=d,v[14]=f,v[3]=h,v[7]=g,v[11]=y,v[15]=_,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new rt().fromArray(this.elements)}copy(e){const n=this.elements,r=e.elements;return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3],n[4]=r[4],n[5]=r[5],n[6]=r[6],n[7]=r[7],n[8]=r[8],n[9]=r[9],n[10]=r[10],n[11]=r[11],n[12]=r[12],n[13]=r[13],n[14]=r[14],n[15]=r[15],this}copyPosition(e){const n=this.elements,r=e.elements;return n[12]=r[12],n[13]=r[13],n[14]=r[14],this}setFromMatrix3(e){const n=e.elements;return this.set(n[0],n[3],n[6],0,n[1],n[4],n[7],0,n[2],n[5],n[8],0,0,0,0,1),this}extractBasis(e,n,r){return e.setFromMatrixColumn(this,0),n.setFromMatrixColumn(this,1),r.setFromMatrixColumn(this,2),this}makeBasis(e,n,r){return this.set(e.x,n.x,r.x,0,e.y,n.y,r.y,0,e.z,n.z,r.z,0,0,0,0,1),this}extractRotation(e){const n=this.elements,r=e.elements,i=1/Ad.setFromMatrixColumn(e,0).length(),o=1/Ad.setFromMatrixColumn(e,1).length(),s=1/Ad.setFromMatrixColumn(e,2).length();return n[0]=r[0]*i,n[1]=r[1]*i,n[2]=r[2]*i,n[3]=0,n[4]=r[4]*o,n[5]=r[5]*o,n[6]=r[6]*o,n[7]=0,n[8]=r[8]*s,n[9]=r[9]*s,n[10]=r[10]*s,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromEuler(e){const n=this.elements,r=e.x,i=e.y,o=e.z,s=Math.cos(r),a=Math.sin(r),l=Math.cos(i),c=Math.sin(i),u=Math.cos(o),d=Math.sin(o);if(e.order==="XYZ"){const f=s*u,h=s*d,g=a*u,y=a*d;n[0]=l*u,n[4]=-l*d,n[8]=c,n[1]=h+g*c,n[5]=f-y*c,n[9]=-a*l,n[2]=y-f*c,n[6]=g+h*c,n[10]=s*l}else if(e.order==="YXZ"){const f=l*u,h=l*d,g=c*u,y=c*d;n[0]=f+y*a,n[4]=g*a-h,n[8]=s*c,n[1]=s*d,n[5]=s*u,n[9]=-a,n[2]=h*a-g,n[6]=y+f*a,n[10]=s*l}else if(e.order==="ZXY"){const f=l*u,h=l*d,g=c*u,y=c*d;n[0]=f-y*a,n[4]=-s*d,n[8]=g+h*a,n[1]=h+g*a,n[5]=s*u,n[9]=y-f*a,n[2]=-s*c,n[6]=a,n[10]=s*l}else if(e.order==="ZYX"){const f=s*u,h=s*d,g=a*u,y=a*d;n[0]=l*u,n[4]=g*c-h,n[8]=f*c+y,n[1]=l*d,n[5]=y*c+f,n[9]=h*c-g,n[2]=-c,n[6]=a*l,n[10]=s*l}else if(e.order==="YZX"){const f=s*l,h=s*c,g=a*l,y=a*c;n[0]=l*u,n[4]=y-f*d,n[8]=g*d+h,n[1]=d,n[5]=s*u,n[9]=-a*u,n[2]=-c*u,n[6]=h*d+g,n[10]=f-y*d}else if(e.order==="XZY"){const f=s*l,h=s*c,g=a*l,y=a*c;n[0]=l*u,n[4]=-d,n[8]=c*u,n[1]=f*d+y,n[5]=s*u,n[9]=h*d-g,n[2]=g*d-h,n[6]=a*u,n[10]=y*d+f}return n[3]=0,n[7]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromQuaternion(e){return this.compose(One,e,Rne)}lookAt(e,n,r){const i=this.elements;return xo.subVectors(e,n),xo.lengthSq()===0&&(xo.z=1),xo.normalize(),Nl.crossVectors(r,xo),Nl.lengthSq()===0&&(Math.abs(r.z)===1?xo.x+=1e-4:xo.z+=1e-4,xo.normalize(),Nl.crossVectors(r,xo)),Nl.normalize(),y0.crossVectors(xo,Nl),i[0]=Nl.x,i[4]=y0.x,i[8]=xo.x,i[1]=Nl.y,i[5]=y0.y,i[9]=xo.y,i[2]=Nl.z,i[6]=y0.z,i[10]=xo.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const r=e.elements,i=n.elements,o=this.elements,s=r[0],a=r[4],l=r[8],c=r[12],u=r[1],d=r[5],f=r[9],h=r[13],g=r[2],y=r[6],_=r[10],v=r[14],x=r[3],w=r[7],S=r[11],E=r[15],C=i[0],O=i[4],R=i[8],T=i[12],A=i[1],F=i[5],N=i[9],U=i[13],k=i[2],z=i[6],G=i[10],W=i[14],B=i[3],j=i[7],$=i[11],q=i[15];return o[0]=s*C+a*A+l*k+c*B,o[4]=s*O+a*F+l*z+c*j,o[8]=s*R+a*N+l*G+c*$,o[12]=s*T+a*U+l*W+c*q,o[1]=u*C+d*A+f*k+h*B,o[5]=u*O+d*F+f*z+h*j,o[9]=u*R+d*N+f*G+h*$,o[13]=u*T+d*U+f*W+h*q,o[2]=g*C+y*A+_*k+v*B,o[6]=g*O+y*F+_*z+v*j,o[10]=g*R+y*N+_*G+v*$,o[14]=g*T+y*U+_*W+v*q,o[3]=x*C+w*A+S*k+E*B,o[7]=x*O+w*F+S*z+E*j,o[11]=x*R+w*N+S*G+E*$,o[15]=x*T+w*U+S*W+E*q,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[4]*=e,n[8]*=e,n[12]*=e,n[1]*=e,n[5]*=e,n[9]*=e,n[13]*=e,n[2]*=e,n[6]*=e,n[10]*=e,n[14]*=e,n[3]*=e,n[7]*=e,n[11]*=e,n[15]*=e,this}determinant(){const e=this.elements,n=e[0],r=e[4],i=e[8],o=e[12],s=e[1],a=e[5],l=e[9],c=e[13],u=e[2],d=e[6],f=e[10],h=e[14],g=e[3],y=e[7],_=e[11],v=e[15];return g*(+o*l*d-i*c*d-o*a*f+r*c*f+i*a*h-r*l*h)+y*(+n*l*h-n*c*f+o*s*f-i*s*h+i*c*u-o*l*u)+_*(+n*c*d-n*a*h-o*s*d+r*s*h+o*a*u-r*c*u)+v*(-i*a*u-n*l*d+n*a*f+i*s*d-r*s*f+r*l*u)}transpose(){const e=this.elements;let n;return n=e[1],e[1]=e[4],e[4]=n,n=e[2],e[2]=e[8],e[8]=n,n=e[6],e[6]=e[9],e[9]=n,n=e[3],e[3]=e[12],e[12]=n,n=e[7],e[7]=e[13],e[13]=n,n=e[11],e[11]=e[14],e[14]=n,this}setPosition(e,n,r){const i=this.elements;return e.isVector3?(i[12]=e.x,i[13]=e.y,i[14]=e.z):(i[12]=e,i[13]=n,i[14]=r),this}invert(){const e=this.elements,n=e[0],r=e[1],i=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8],d=e[9],f=e[10],h=e[11],g=e[12],y=e[13],_=e[14],v=e[15],x=d*_*c-y*f*c+y*l*h-a*_*h-d*l*v+a*f*v,w=g*f*c-u*_*c-g*l*h+s*_*h+u*l*v-s*f*v,S=u*y*c-g*d*c+g*a*h-s*y*h-u*a*v+s*d*v,E=g*d*l-u*y*l-g*a*f+s*y*f+u*a*_-s*d*_,C=n*x+r*w+i*S+o*E;if(C===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const O=1/C;return e[0]=x*O,e[1]=(y*f*o-d*_*o-y*i*h+r*_*h+d*i*v-r*f*v)*O,e[2]=(a*_*o-y*l*o+y*i*c-r*_*c-a*i*v+r*l*v)*O,e[3]=(d*l*o-a*f*o-d*i*c+r*f*c+a*i*h-r*l*h)*O,e[4]=w*O,e[5]=(u*_*o-g*f*o+g*i*h-n*_*h-u*i*v+n*f*v)*O,e[6]=(g*l*o-s*_*o-g*i*c+n*_*c+s*i*v-n*l*v)*O,e[7]=(s*f*o-u*l*o+u*i*c-n*f*c-s*i*h+n*l*h)*O,e[8]=S*O,e[9]=(g*d*o-u*y*o-g*r*h+n*y*h+u*r*v-n*d*v)*O,e[10]=(s*y*o-g*a*o+g*r*c-n*y*c-s*r*v+n*a*v)*O,e[11]=(u*a*o-s*d*o-u*r*c+n*d*c+s*r*h-n*a*h)*O,e[12]=E*O,e[13]=(u*y*i-g*d*i+g*r*f-n*y*f-u*r*_+n*d*_)*O,e[14]=(g*a*i-s*y*i-g*r*l+n*y*l+s*r*_-n*a*_)*O,e[15]=(s*d*i-u*a*i+u*r*l-n*d*l-s*r*f+n*a*f)*O,this}scale(e){const n=this.elements,r=e.x,i=e.y,o=e.z;return n[0]*=r,n[4]*=i,n[8]*=o,n[1]*=r,n[5]*=i,n[9]*=o,n[2]*=r,n[6]*=i,n[10]*=o,n[3]*=r,n[7]*=i,n[11]*=o,this}getMaxScaleOnAxis(){const e=this.elements,n=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],r=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],i=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(n,r,i))}makeTranslation(e,n,r){return this.set(1,0,0,e,0,1,0,n,0,0,1,r,0,0,0,1),this}makeRotationX(e){const n=Math.cos(e),r=Math.sin(e);return this.set(1,0,0,0,0,n,-r,0,0,r,n,0,0,0,0,1),this}makeRotationY(e){const n=Math.cos(e),r=Math.sin(e);return this.set(n,0,r,0,0,1,0,0,-r,0,n,0,0,0,0,1),this}makeRotationZ(e){const n=Math.cos(e),r=Math.sin(e);return this.set(n,-r,0,0,r,n,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,n){const r=Math.cos(n),i=Math.sin(n),o=1-r,s=e.x,a=e.y,l=e.z,c=o*s,u=o*a;return this.set(c*s+r,c*a-i*l,c*l+i*a,0,c*a+i*l,u*a+r,u*l-i*s,0,c*l-i*a,u*l+i*s,o*l*l+r,0,0,0,0,1),this}makeScale(e,n,r){return this.set(e,0,0,0,0,n,0,0,0,0,r,0,0,0,0,1),this}makeShear(e,n,r,i,o,s){return this.set(1,r,o,0,e,1,s,0,n,i,1,0,0,0,0,1),this}compose(e,n,r){const i=this.elements,o=n._x,s=n._y,a=n._z,l=n._w,c=o+o,u=s+s,d=a+a,f=o*c,h=o*u,g=o*d,y=s*u,_=s*d,v=a*d,x=l*c,w=l*u,S=l*d,E=r.x,C=r.y,O=r.z;return i[0]=(1-(y+v))*E,i[1]=(h+S)*E,i[2]=(g-w)*E,i[3]=0,i[4]=(h-S)*C,i[5]=(1-(f+v))*C,i[6]=(_+x)*C,i[7]=0,i[8]=(g+w)*O,i[9]=(_-x)*O,i[10]=(1-(f+y))*O,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this}decompose(e,n,r){const i=this.elements;let o=Ad.set(i[0],i[1],i[2]).length();const s=Ad.set(i[4],i[5],i[6]).length(),a=Ad.set(i[8],i[9],i[10]).length();this.determinant()<0&&(o=-o),e.x=i[12],e.y=i[13],e.z=i[14],ys.copy(this);const c=1/o,u=1/s,d=1/a;return ys.elements[0]*=c,ys.elements[1]*=c,ys.elements[2]*=c,ys.elements[4]*=u,ys.elements[5]*=u,ys.elements[6]*=u,ys.elements[8]*=d,ys.elements[9]*=d,ys.elements[10]*=d,n.setFromRotationMatrix(ys),r.x=o,r.y=s,r.z=a,this}makePerspective(e,n,r,i,o,s){const a=this.elements,l=2*o/(n-e),c=2*o/(r-i),u=(n+e)/(n-e),d=(r+i)/(r-i),f=-(s+o)/(s-o),h=-2*s*o/(s-o);return a[0]=l,a[4]=0,a[8]=u,a[12]=0,a[1]=0,a[5]=c,a[9]=d,a[13]=0,a[2]=0,a[6]=0,a[10]=f,a[14]=h,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this}makeOrthographic(e,n,r,i,o,s){const a=this.elements,l=1/(n-e),c=1/(r-i),u=1/(s-o),d=(n+e)*l,f=(r+i)*c,h=(s+o)*u;return a[0]=2*l,a[4]=0,a[8]=0,a[12]=-d,a[1]=0,a[5]=2*c,a[9]=0,a[13]=-f,a[2]=0,a[6]=0,a[10]=-2*u,a[14]=-h,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this}equals(e){const n=this.elements,r=e.elements;for(let i=0;i<16;i++)if(n[i]!==r[i])return!1;return!0}fromArray(e,n=0){for(let r=0;r<16;r++)this.elements[r]=e[r+n];return this}toArray(e=[],n=0){const r=this.elements;return e[n]=r[0],e[n+1]=r[1],e[n+2]=r[2],e[n+3]=r[3],e[n+4]=r[4],e[n+5]=r[5],e[n+6]=r[6],e[n+7]=r[7],e[n+8]=r[8],e[n+9]=r[9],e[n+10]=r[10],e[n+11]=r[11],e[n+12]=r[12],e[n+13]=r[13],e[n+14]=r[14],e[n+15]=r[15],e}}const Ad=new Z,ys=new rt,One=new Z(0,0,0),Rne=new Z(1,1,1),Nl=new Z,y0=new Z,xo=new Z,F3=new rt,z3=new Hn;class ki{constructor(e=0,n=0,r=0,i=ki.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=n,this._z=r,this._order=i}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,n,r,i=this._order){return this._x=e,this._y=n,this._z=r,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,n=this._order,r=!0){const i=e.elements,o=i[0],s=i[4],a=i[8],l=i[1],c=i[5],u=i[9],d=i[2],f=i[6],h=i[10];switch(n){case"XYZ":this._y=Math.asin(Mr(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-u,h),this._z=Math.atan2(-s,o)):(this._x=Math.atan2(f,c),this._z=0);break;case"YXZ":this._x=Math.asin(-Mr(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(a,h),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-d,o),this._z=0);break;case"ZXY":this._x=Math.asin(Mr(f,-1,1)),Math.abs(f)<.9999999?(this._y=Math.atan2(-d,h),this._z=Math.atan2(-s,c)):(this._y=0,this._z=Math.atan2(l,o));break;case"ZYX":this._y=Math.asin(-Mr(d,-1,1)),Math.abs(d)<.9999999?(this._x=Math.atan2(f,h),this._z=Math.atan2(l,o)):(this._x=0,this._z=Math.atan2(-s,c));break;case"YZX":this._z=Math.asin(Mr(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,c),this._y=Math.atan2(-d,o)):(this._x=0,this._y=Math.atan2(a,h));break;case"XZY":this._z=Math.asin(-Mr(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(f,c),this._y=Math.atan2(a,o)):(this._x=Math.atan2(-u,h),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,r===!0&&this._onChangeCallback(),this}setFromQuaternion(e,n,r){return F3.makeRotationFromQuaternion(e),this.setFromRotationMatrix(F3,n,r)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return z3.setFromEuler(this),this.setFromQuaternion(z3,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}ki.DEFAULT_ORDER="XYZ";class Uu{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let n=0;n1){for(let r=0;r0&&(r=r.concat(s))}return r}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(ap,e,Dne),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(ap,Ine,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const n=this.matrixWorld.elements;return e.set(n[8],n[9],n[10]).normalize()}raycast(){}traverse(e){e(this);const n=this.children;for(let r=0,i=n.length;r0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),i.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(i.instanceColor=this.instanceColor.toJSON()));function o(a,l){return a[l.uuid]===void 0&&(a[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(i.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=o(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const l=a.shapes;if(Array.isArray(l))for(let c=0,u=l.length;c0){i.children=[];for(let a=0;a0){i.animations=[];for(let a=0;a0&&(r.geometries=a),l.length>0&&(r.materials=l),c.length>0&&(r.textures=c),u.length>0&&(r.images=u),d.length>0&&(r.shapes=d),f.length>0&&(r.skeletons=f),h.length>0&&(r.animations=h),g.length>0&&(r.nodes=g)}return r.object=i,r;function s(a){const l=[];for(const c in a){const u=a[c];delete u.metadata,l.push(u)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,n=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.userData=JSON.parse(JSON.stringify(e.userData)),n===!0)for(let r=0;r0?i.multiplyScalar(1/Math.sqrt(o)):i.set(0,0,0)}static getBarycoord(e,n,r,i,o){_s.subVectors(i,n),Ga.subVectors(r,n),uE.subVectors(e,n);const s=_s.dot(_s),a=_s.dot(Ga),l=_s.dot(uE),c=Ga.dot(Ga),u=Ga.dot(uE),d=s*c-a*a;if(d===0)return o.set(-2,-1,-1);const f=1/d,h=(c*l-a*u)*f,g=(s*u-a*l)*f;return o.set(1-h-g,g,h)}static containsPoint(e,n,r,i){return this.getBarycoord(e,n,r,i,Wa),Wa.x>=0&&Wa.y>=0&&Wa.x+Wa.y<=1}static getUV(e,n,r,i,o,s,a,l){return x0===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),x0=!0),this.getInterpolation(e,n,r,i,o,s,a,l)}static getInterpolation(e,n,r,i,o,s,a,l){return this.getBarycoord(e,n,r,i,Wa),l.setScalar(0),l.addScaledVector(o,Wa.x),l.addScaledVector(s,Wa.y),l.addScaledVector(a,Wa.z),l}static isFrontFacing(e,n,r,i){return _s.subVectors(r,n),Ga.subVectors(e,n),_s.cross(Ga).dot(i)<0}set(e,n,r){return this.a.copy(e),this.b.copy(n),this.c.copy(r),this}setFromPointsAndIndices(e,n,r,i){return this.a.copy(e[n]),this.b.copy(e[r]),this.c.copy(e[i]),this}setFromAttributeAndIndices(e,n,r,i){return this.a.fromBufferAttribute(e,n),this.b.fromBufferAttribute(e,r),this.c.fromBufferAttribute(e,i),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return _s.subVectors(this.c,this.b),Ga.subVectors(this.a,this.b),_s.cross(Ga).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return lo.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,n){return lo.getBarycoord(e,this.a,this.b,this.c,n)}getUV(e,n,r,i,o){return x0===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),x0=!0),lo.getInterpolation(e,this.a,this.b,this.c,n,r,i,o)}getInterpolation(e,n,r,i,o){return lo.getInterpolation(e,this.a,this.b,this.c,n,r,i,o)}containsPoint(e){return lo.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return lo.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,n){const r=this.a,i=this.b,o=this.c;let s,a;Id.subVectors(i,r),Ld.subVectors(o,r),dE.subVectors(e,r);const l=Id.dot(dE),c=Ld.dot(dE);if(l<=0&&c<=0)return n.copy(r);fE.subVectors(e,i);const u=Id.dot(fE),d=Ld.dot(fE);if(u>=0&&d<=u)return n.copy(i);const f=l*d-u*c;if(f<=0&&l>=0&&u<=0)return s=l/(l-u),n.copy(r).addScaledVector(Id,s);hE.subVectors(e,o);const h=Id.dot(hE),g=Ld.dot(hE);if(g>=0&&h<=g)return n.copy(o);const y=h*c-l*g;if(y<=0&&c>=0&&g<=0)return a=c/(c-g),n.copy(r).addScaledVector(Ld,a);const _=u*g-h*d;if(_<=0&&d-u>=0&&h-g>=0)return $3.subVectors(o,i),a=(d-u)/(d-u+(h-g)),n.copy(i).addScaledVector($3,a);const v=1/(_+y+f);return s=y*v,a=f*v,n.copy(r).addScaledVector(Id,s).addScaledVector(Ld,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}let kne=0;class jr extends hs{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:kne++}),this.uuid=Co(),this.name="",this.type="Material",this.blending=Nu,this.side=Vs,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=UO,this.blendDst=BO,this.blendEquation=mu,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=Gm,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=zj,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=R_,this.stencilZFail=R_,this.stencilZPass=R_,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const n in e){const r=e[n];if(r===void 0){console.warn(`THREE.Material: parameter '${n}' has value of undefined.`);continue}const i=this[n];if(i===void 0){console.warn(`THREE.Material: '${n}' is not a property of THREE.${this.type}.`);continue}i&&i.isColor?i.set(r):i&&i.isVector3&&r&&r.isVector3?i.copy(r):this[n]=r}}toJSON(e){const n=e===void 0||typeof e=="string";n&&(e={textures:{},images:{}});const r={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};r.uuid=this.uuid,r.type=this.type,this.name!==""&&(r.name=this.name),this.color&&this.color.isColor&&(r.color=this.color.getHex()),this.roughness!==void 0&&(r.roughness=this.roughness),this.metalness!==void 0&&(r.metalness=this.metalness),this.sheen!==void 0&&(r.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(r.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(r.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(r.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(r.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(r.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(r.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(r.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(r.shininess=this.shininess),this.clearcoat!==void 0&&(r.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(r.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(r.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(r.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(r.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,r.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(r.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(r.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(r.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(r.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(r.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(r.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(r.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(r.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(r.lightMap=this.lightMap.toJSON(e).uuid,r.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(r.aoMap=this.aoMap.toJSON(e).uuid,r.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(r.bumpMap=this.bumpMap.toJSON(e).uuid,r.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(r.normalMap=this.normalMap.toJSON(e).uuid,r.normalMapType=this.normalMapType,r.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(r.displacementMap=this.displacementMap.toJSON(e).uuid,r.displacementScale=this.displacementScale,r.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(r.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(r.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(r.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(r.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(r.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(r.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(r.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(r.combine=this.combine)),this.envMapIntensity!==void 0&&(r.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(r.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(r.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(r.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(r.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(r.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(r.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(r.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(r.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(r.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(r.size=this.size),this.shadowSide!==null&&(r.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(r.sizeAttenuation=this.sizeAttenuation),this.blending!==Nu&&(r.blending=this.blending),this.side!==Vs&&(r.side=this.side),this.vertexColors&&(r.vertexColors=!0),this.opacity<1&&(r.opacity=this.opacity),this.transparent===!0&&(r.transparent=this.transparent),r.depthFunc=this.depthFunc,r.depthTest=this.depthTest,r.depthWrite=this.depthWrite,r.colorWrite=this.colorWrite,r.stencilWrite=this.stencilWrite,r.stencilWriteMask=this.stencilWriteMask,r.stencilFunc=this.stencilFunc,r.stencilRef=this.stencilRef,r.stencilFuncMask=this.stencilFuncMask,r.stencilFail=this.stencilFail,r.stencilZFail=this.stencilZFail,r.stencilZPass=this.stencilZPass,this.rotation!==void 0&&this.rotation!==0&&(r.rotation=this.rotation),this.polygonOffset===!0&&(r.polygonOffset=!0),this.polygonOffsetFactor!==0&&(r.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(r.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(r.linewidth=this.linewidth),this.dashSize!==void 0&&(r.dashSize=this.dashSize),this.gapSize!==void 0&&(r.gapSize=this.gapSize),this.scale!==void 0&&(r.scale=this.scale),this.dithering===!0&&(r.dithering=!0),this.alphaTest>0&&(r.alphaTest=this.alphaTest),this.alphaToCoverage===!0&&(r.alphaToCoverage=this.alphaToCoverage),this.premultipliedAlpha===!0&&(r.premultipliedAlpha=this.premultipliedAlpha),this.forceSinglePass===!0&&(r.forceSinglePass=this.forceSinglePass),this.wireframe===!0&&(r.wireframe=this.wireframe),this.wireframeLinewidth>1&&(r.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(r.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(r.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(r.flatShading=this.flatShading),this.visible===!1&&(r.visible=!1),this.toneMapped===!1&&(r.toneMapped=!1),this.fog===!1&&(r.fog=!1),Object.keys(this.userData).length>0&&(r.userData=this.userData);function i(o){const s=[];for(const a in o){const l=o[a];delete l.metadata,s.push(l)}return s}if(n){const o=i(e.textures),s=i(e.images);o.length>0&&(r.textures=o),s.length>0&&(r.images=s)}return r}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const n=e.clippingPlanes;let r=null;if(n!==null){const i=n.length;r=new Array(i);for(let o=0;o!==i;++o)r[o]=n[o].clone()}return this.clippingPlanes=r,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}const Vj={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},xs={h:0,s:0,l:0},w0={h:0,s:0,l:0};function pE(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*6*(2/3-n):t}class lt{constructor(e,n,r){return this.isColor=!0,this.r=1,this.g=1,this.b=1,n===void 0&&r===void 0?this.set(e):this.setRGB(e,n,r)}set(e){return e&&e.isColor?this.copy(e):typeof e=="number"?this.setHex(e):typeof e=="string"&&this.setStyle(e),this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,n=Es){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Gi.toWorkingColorSpace(this,n),this}setRGB(e,n,r,i=Gi.workingColorSpace){return this.r=e,this.g=n,this.b=r,Gi.toWorkingColorSpace(this,i),this}setHSL(e,n,r,i=Gi.workingColorSpace){if(e=KO(e,1),n=Mr(n,0,1),r=Mr(r,0,1),n===0)this.r=this.g=this.b=r;else{const o=r<=.5?r*(1+n):r+n-r*n,s=2*r-o;this.r=pE(s,o,e+1/3),this.g=pE(s,o,e),this.b=pE(s,o,e-1/3)}return Gi.toWorkingColorSpace(this,i),this}setStyle(e,n=Es){function r(o){o!==void 0&&parseFloat(o)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(e)){let o;const s=i[1],a=i[2];switch(s){case"rgb":case"rgba":if(o=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return this.r=Math.min(255,parseInt(o[1],10))/255,this.g=Math.min(255,parseInt(o[2],10))/255,this.b=Math.min(255,parseInt(o[3],10))/255,Gi.toWorkingColorSpace(this,n),r(o[4]),this;if(o=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return this.r=Math.min(100,parseInt(o[1],10))/100,this.g=Math.min(100,parseInt(o[2],10))/100,this.b=Math.min(100,parseInt(o[3],10))/100,Gi.toWorkingColorSpace(this,n),r(o[4]),this;break;case"hsl":case"hsla":if(o=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a)){const l=parseFloat(o[1])/360,c=parseFloat(o[2])/100,u=parseFloat(o[3])/100;return r(o[4]),this.setHSL(l,c,u,n)}break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){const o=i[1],s=o.length;if(s===3)return this.setRGB(parseInt(o.charAt(0),16)/15,parseInt(o.charAt(1),16)/15,parseInt(o.charAt(2),16)/15,n);if(s===6)return this.setHex(parseInt(o,16),n);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,n);return this}setColorName(e,n=Es){const r=Vj[e.toLowerCase()];return r!==void 0?this.setHex(r,n):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Hf(e.r),this.g=Hf(e.g),this.b=Hf(e.b),this}copyLinearToSRGB(e){return this.r=nE(e.r),this.g=nE(e.g),this.b=nE(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Es){return Gi.fromWorkingColorSpace(Ri.copy(this),e),Mr(Ri.r*255,0,255)<<16^Mr(Ri.g*255,0,255)<<8^Mr(Ri.b*255,0,255)<<0}getHexString(e=Es){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,n=Gi.workingColorSpace){Gi.fromWorkingColorSpace(Ri.copy(this),n);const r=Ri.r,i=Ri.g,o=Ri.b,s=Math.max(r,i,o),a=Math.min(r,i,o);let l,c;const u=(a+s)/2;if(a===s)l=0,c=0;else{const d=s-a;switch(c=u<=.5?d/(s+a):d/(2-s-a),s){case r:l=(i-o)/d+(i>-c-14,r[l|256]=1024>>-c-14|32768,i[l]=-c-1,i[l|256]=-c-1):c<=15?(r[l]=c+15<<10,r[l|256]=c+15<<10|32768,i[l]=13,i[l|256]=13):c<128?(r[l]=31744,r[l|256]=64512,i[l]=24,i[l|256]=24):(r[l]=31744,r[l|256]=64512,i[l]=13,i[l|256]=13)}const o=new Uint32Array(2048),s=new Uint32Array(64),a=new Uint32Array(64);for(let l=1;l<1024;++l){let c=l<<13,u=0;for(;!(c&8388608);)c<<=1,u-=8388608;c&=-8388609,u+=947912704,o[l]=c|u}for(let l=1024;l<2048;++l)o[l]=939524096+(l-1024<<13);for(let l=1;l<31;++l)s[l]=l<<23;s[31]=1199570944,s[32]=2147483648;for(let l=33;l<63;++l)s[l]=2147483648+(l-32<<23);s[63]=3347054592;for(let l=1;l<64;++l)l!==32&&(a[l]=1024);return{floatView:e,uint32View:n,baseTable:r,shiftTable:i,mantissaTable:o,exponentTable:s,offsetTable:a}}function so(t){Math.abs(t)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),t=Mr(t,-65504,65504),Ja.floatView[0]=t;const e=Ja.uint32View[0],n=e>>23&511;return Ja.baseTable[n]+((e&8388607)>>Ja.shiftTable[n])}function Xp(t){const e=t>>10;return Ja.uint32View[0]=Ja.mantissaTable[Ja.offsetTable[e]+(t&1023)]+Ja.exponentTable[e],Ja.floatView[0]}const Tu={toHalfFloat:so,fromHalfFloat:Xp},Fr=new Z,S0=new Ee;class Mn{constructor(e,n,r=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=n,this.count=e!==void 0?e.length/n:0,this.normalized=r,this.usage=Qm,this.updateRange={offset:0,count:-1},this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this}copyAt(e,n,r){e*=this.itemSize,r*=n.itemSize;for(let i=0,o=this.itemSize;i0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};const n=this.index;n!==null&&(e.data.index={type:n.array.constructor.name,array:Array.prototype.slice.call(n.array)});const r=this.attributes;for(const l in r){const c=r[l];e.data.attributes[l]=c.toJSON(e.data)}const i={};let o=!1;for(const l in this.morphAttributes){const c=this.morphAttributes[l],u=[];for(let d=0,f=c.length;d0&&(i[l]=u,o=!0)}o&&(e.data.morphAttributes=i,e.data.morphTargetsRelative=this.morphTargetsRelative);const s=this.groups;s.length>0&&(e.data.groups=JSON.parse(JSON.stringify(s)));const a=this.boundingSphere;return a!==null&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const n={};this.name=e.name;const r=e.index;r!==null&&this.setIndex(r.clone(n));const i=e.attributes;for(const c in i){const u=i[c];this.setAttribute(c,u.clone(n))}const o=e.morphAttributes;for(const c in o){const u=[],d=o[c];for(let f=0,h=d.length;f0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=i.length;o(e.far-e.near)**2))||(G3.copy(o).invert(),ra.copy(e.ray).applyMatrix4(G3),r.boundingBox!==null&&ra.intersectsBox(r.boundingBox)===!1))return;let s;const a=r.index,l=r.attributes.position,c=r.attributes.uv,u=r.attributes.uv2,d=r.attributes.normal,f=r.groups,h=r.drawRange;if(a!==null)if(Array.isArray(i))for(let g=0,y=f.length;gn.far?null:{distance:c,point:O0.clone(),object:t}}function R0(t,e,n,r,i,o,s,a,l,c){t.getVertexPosition(a,Nd),t.getVertexPosition(l,Fd),t.getVertexPosition(c,zd);const u=Gne(t,e,n,r,Nd,Fd,zd,T0);if(u){i&&(E0.fromBufferAttribute(i,a),P0.fromBufferAttribute(i,l),C0.fromBufferAttribute(i,c),u.uv=lo.getInterpolation(T0,Nd,Fd,zd,E0,P0,C0,new Ee)),o&&(E0.fromBufferAttribute(o,a),P0.fromBufferAttribute(o,l),C0.fromBufferAttribute(o,c),u.uv2=lo.getInterpolation(T0,Nd,Fd,zd,E0,P0,C0,new Ee)),s&&(Y3.fromBufferAttribute(s,a),X3.fromBufferAttribute(s,l),Z3.fromBufferAttribute(s,c),u.normal=lo.getInterpolation(T0,Nd,Fd,zd,Y3,X3,Z3,new Z),u.normal.dot(r.direction)>0&&u.normal.multiplyScalar(-1));const d={a,b:l,c,normal:new Z,materialIndex:0};lo.getNormal(Nd,Fd,zd,d.normal),u.face=d}return u}class Dc extends Jt{constructor(e=1,n=1,r=1,i=1,o=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:n,depth:r,widthSegments:i,heightSegments:o,depthSegments:s};const a=this;i=Math.floor(i),o=Math.floor(o),s=Math.floor(s);const l=[],c=[],u=[],d=[];let f=0,h=0;g("z","y","x",-1,-1,r,n,e,s,o,0),g("z","y","x",1,-1,r,n,-e,s,o,1),g("x","z","y",1,1,e,r,n,i,s,2),g("x","z","y",1,-1,e,r,-n,i,s,3),g("x","y","z",1,-1,e,n,r,i,o,4),g("x","y","z",-1,-1,e,n,-r,i,o,5),this.setIndex(l),this.setAttribute("position",new Et(c,3)),this.setAttribute("normal",new Et(u,3)),this.setAttribute("uv",new Et(d,2));function g(y,_,v,x,w,S,E,C,O,R,T){const A=S/O,F=E/R,N=S/2,U=E/2,k=C/2,z=O+1,G=R+1;let W=0,B=0;const j=new Z;for(let $=0;$0?1:-1,u.push(j.x,j.y,j.z),d.push(K/O),d.push(1-$/R),W+=1}}for(let $=0;$>8&255]+Oi[t>>16&255]+Oi[t>>24&255]+"-"+Oi[e&255]+Oi[e>>8&255]+"-"+Oi[e>>16&15|64]+Oi[e>>24&255]+"-"+Oi[n&63|128]+Oi[n>>8&255]+"-"+Oi[n>>16&255]+Oi[n>>24&255]+Oi[r&255]+Oi[r>>8&255]+Oi[r>>16&255]+Oi[r>>24&255]).toLowerCase()}function Mr(t,e,n){return Math.max(e,Math.min(n,t))}function KO(t,e){return(t%e+e)%e}function sne(t,e,n,r,i){return r+(t-e)*(i-r)/(n-e)}function ane(t,e,n){return t!==e?(n-t)/(e-t):0}function fm(t,e,n){return(1-n)*t+n*e}function lne(t,e,n,r){return fm(t,e,1-Math.exp(-n*r))}function cne(t,e=1){return e-Math.abs(KO(t,e*2)-e)}function une(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*(3-2*t))}function dne(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*t*(t*(t*6-15)+10))}function fne(t,e){return t+Math.floor(Math.random()*(e-t+1))}function hne(t,e){return t+Math.random()*(e-t)}function pne(t){return t*(.5-Math.random())}function mne(t){t!==void 0&&(k3=t);let e=k3+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function gne(t){return t*Fu}function vne(t){return t*th}function I2(t){return(t&t-1)===0&&t!==0}function Bj(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))}function Hj(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}function yne(t,e,n,r,i){const o=Math.cos,s=Math.sin,a=o(n/2),l=s(n/2),c=o((e+r)/2),u=s((e+r)/2),d=o((e-r)/2),f=s((e-r)/2),h=o((r-e)/2),g=s((r-e)/2);switch(i){case"XYX":t.set(a*u,l*d,l*f,a*c);break;case"YZY":t.set(l*f,a*u,l*d,a*c);break;case"ZXZ":t.set(l*d,l*f,a*u,a*c);break;case"XZX":t.set(a*u,l*g,l*h,a*c);break;case"YXY":t.set(l*h,a*u,l*g,a*c);break;case"ZYZ":t.set(l*g,l*h,a*u,a*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}function Mo(t,e){switch(e.constructor){case Float32Array:return t;case Uint16Array:return t/65535;case Uint8Array:return t/255;case Int16Array:return Math.max(t/32767,-1);case Int8Array:return Math.max(t/127,-1);default:throw new Error("Invalid component type.")}}function un(t,e){switch(e.constructor){case Float32Array:return t;case Uint16Array:return Math.round(t*65535);case Uint8Array:return Math.round(t*255);case Int16Array:return Math.round(t*32767);case Int8Array:return Math.round(t*127);default:throw new Error("Invalid component type.")}}const Pu={DEG2RAD:Fu,RAD2DEG:th,generateUUID:Co,clamp:Mr,euclideanModulo:KO,mapLinear:sne,inverseLerp:ane,lerp:fm,damp:lne,pingpong:cne,smoothstep:une,smootherstep:dne,randInt:fne,randFloat:hne,randFloatSpread:pne,seededRandom:mne,degToRad:gne,radToDeg:vne,isPowerOfTwo:I2,ceilPowerOfTwo:Bj,floorPowerOfTwo:Hj,setQuaternionFromProperEuler:yne,normalize:un,denormalize:Mo};class Ee{constructor(e=0,n=0){Ee.prototype.isVector2=!0,this.x=e,this.y=n}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,n){return this.x=e,this.y=n,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const n=this.x,r=this.y,i=e.elements;return this.x=i[0]*n+i[3]*r+i[6],this.y=i[1]*n+i[4]*r+i[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(n,r)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const r=this.dot(e)/n;return Math.acos(Mr(r,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,r=this.y-e.y;return n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this}lerpVectors(e,n,r){return this.x=e.x+(n.x-e.x)*r,this.y=e.y+(n.y-e.y)*r,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this}rotateAround(e,n){const r=Math.cos(n),i=Math.sin(n),o=this.x-e.x,s=this.y-e.y;return this.x=o*r-s*i+e.x,this.y=o*i+s*r+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class mn{constructor(){mn.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1]}set(e,n,r,i,o,s,a,l,c){const u=this.elements;return u[0]=e,u[1]=i,u[2]=a,u[3]=n,u[4]=o,u[5]=l,u[6]=r,u[7]=s,u[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const n=this.elements,r=e.elements;return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3],n[4]=r[4],n[5]=r[5],n[6]=r[6],n[7]=r[7],n[8]=r[8],this}extractBasis(e,n,r){return e.setFromMatrix3Column(this,0),n.setFromMatrix3Column(this,1),r.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const n=e.elements;return this.set(n[0],n[4],n[8],n[1],n[5],n[9],n[2],n[6],n[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const r=e.elements,i=n.elements,o=this.elements,s=r[0],a=r[3],l=r[6],c=r[1],u=r[4],d=r[7],f=r[2],h=r[5],g=r[8],y=i[0],_=i[3],v=i[6],x=i[1],w=i[4],S=i[7],E=i[2],C=i[5],O=i[8];return o[0]=s*y+a*x+l*E,o[3]=s*_+a*w+l*C,o[6]=s*v+a*S+l*O,o[1]=c*y+u*x+d*E,o[4]=c*_+u*w+d*C,o[7]=c*v+u*S+d*O,o[2]=f*y+h*x+g*E,o[5]=f*_+h*w+g*C,o[8]=f*v+h*S+g*O,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=e,n[4]*=e,n[7]*=e,n[2]*=e,n[5]*=e,n[8]*=e,this}determinant(){const e=this.elements,n=e[0],r=e[1],i=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8];return n*s*u-n*a*c-r*o*u+r*a*l+i*o*c-i*s*l}invert(){const e=this.elements,n=e[0],r=e[1],i=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8],d=u*s-a*c,f=a*l-u*o,h=c*o-s*l,g=n*d+r*f+i*h;if(g===0)return this.set(0,0,0,0,0,0,0,0,0);const y=1/g;return e[0]=d*y,e[1]=(i*c-u*r)*y,e[2]=(a*r-i*s)*y,e[3]=f*y,e[4]=(u*n-i*l)*y,e[5]=(i*o-a*n)*y,e[6]=h*y,e[7]=(r*l-c*n)*y,e[8]=(s*n-r*o)*y,this}transpose(){let e;const n=this.elements;return e=n[1],n[1]=n[3],n[3]=e,e=n[2],n[2]=n[6],n[6]=e,e=n[5],n[5]=n[7],n[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const n=this.elements;return e[0]=n[0],e[1]=n[3],e[2]=n[6],e[3]=n[1],e[4]=n[4],e[5]=n[7],e[6]=n[2],e[7]=n[5],e[8]=n[8],this}setUvTransform(e,n,r,i,o,s,a){const l=Math.cos(o),c=Math.sin(o);return this.set(r*l,r*c,-r*(l*s+c*a)+s+e,-i*c,i*l,-i*(-c*s+l*a)+a+n,0,0,1),this}scale(e,n){return this.premultiply(tE.makeScale(e,n)),this}rotate(e){return this.premultiply(tE.makeRotation(-e)),this}translate(e,n){return this.premultiply(tE.makeTranslation(e,n)),this}makeTranslation(e,n){return this.set(1,0,e,0,1,n,0,0,1),this}makeRotation(e){const n=Math.cos(e),r=Math.sin(e);return this.set(n,-r,0,r,n,0,0,0,1),this}makeScale(e,n){return this.set(e,0,0,0,n,0,0,0,1),this}equals(e){const n=this.elements,r=e.elements;for(let i=0;i<9;i++)if(n[i]!==r[i])return!1;return!0}fromArray(e,n=0){for(let r=0;r<9;r++)this.elements[r]=e[r+n];return this}toArray(e=[],n=0){const r=this.elements;return e[n]=r[0],e[n+1]=r[1],e[n+2]=r[2],e[n+3]=r[3],e[n+4]=r[4],e[n+5]=r[5],e[n+6]=r[6],e[n+7]=r[7],e[n+8]=r[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const tE=new mn;function Vj(t){for(let e=t.length-1;e>=0;--e)if(t[e]>=65535)return!0;return!1}const _ne={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function Tf(t,e){return new _ne[t](e)}function Jm(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}function Hf(t){return t<.04045?t*.0773993808:Math.pow(t*.9478672986+.0521327014,2.4)}function nE(t){return t<.0031308?t*12.92:1.055*Math.pow(t,.41666)-.055}const xne=new mn().fromArray([.8224621,.0331941,.0170827,.177538,.9668058,.0723974,-1e-7,1e-7,.9105199]),wne=new mn().fromArray([1.2249401,-.0420569,-.0196376,-.2249404,1.0420571,-.0786361,1e-7,0,1.0982735]);function Sne(t){return t.convertSRGBToLinear().applyMatrix3(wne)}function bne(t){return t.applyMatrix3(xne).convertLinearToSRGB()}const Mne={[eh]:t=>t,[Es]:t=>t.convertSRGBToLinear(),[qO]:Sne},Ene={[eh]:t=>t,[Es]:t=>t.convertLinearToSRGB(),[qO]:bne},Gi={enabled:!1,get legacyMode(){return console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),!this.enabled},set legacyMode(t){console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),this.enabled=!t},get workingColorSpace(){return eh},set workingColorSpace(t){console.warn("THREE.ColorManagement: .workingColorSpace is readonly.")},convert:function(t,e,n){if(this.enabled===!1||e===n||!e||!n)return t;const r=Mne[e],i=Ene[n];if(r===void 0||i===void 0)throw new Error(`Unsupported color space conversion, "${e}" to "${n}".`);return i(r(t))},fromWorkingColorSpace:function(t,e){return this.convert(t,this.workingColorSpace,e)},toWorkingColorSpace:function(t,e){return this.convert(t,e,this.workingColorSpace)}};let Pd;class QO{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{Pd===void 0&&(Pd=Jm("canvas")),Pd.width=e.width,Pd.height=e.height;const r=Pd.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),n=Pd}return n.width>2048||n.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),n.toDataURL("image/jpeg",.6)):n.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const n=Jm("canvas");n.width=e.width,n.height=e.height;const r=n.getContext("2d");r.drawImage(e,0,0,e.width,e.height);const i=r.getImageData(0,0,e.width,e.height),o=i.data;for(let s=0;s0&&(r.userData=this.userData),n||(e.textures[this.uuid]=r),r}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==mS)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case Ro:e.x=e.x-Math.floor(e.x);break;case Xr:e.x=e.x<0?0:1;break;case Xm:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case Ro:e.y=e.y-Math.floor(e.y);break;case Xr:e.y=e.y<0?0:1;break;case Xm:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}}qn.DEFAULT_IMAGE=null;qn.DEFAULT_MAPPING=mS;qn.DEFAULT_ANISOTROPY=1;class an{constructor(e=0,n=0,r=0,i=1){an.prototype.isVector4=!0,this.x=e,this.y=n,this.z=r,this.w=i}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,n,r,i){return this.x=e,this.y=n,this.z=r,this.w=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;case 3:this.w=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this.w=e.w+n.w,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this.w+=e.w*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this.w=e.w-n.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const n=this.x,r=this.y,i=this.z,o=this.w,s=e.elements;return this.x=s[0]*n+s[4]*r+s[8]*i+s[12]*o,this.y=s[1]*n+s[5]*r+s[9]*i+s[13]*o,this.z=s[2]*n+s[6]*r+s[10]*i+s[14]*o,this.w=s[3]*n+s[7]*r+s[11]*i+s[15]*o,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const n=Math.sqrt(1-e.w*e.w);return n<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/n,this.y=e.y/n,this.z=e.z/n),this}setAxisAngleFromRotationMatrix(e){let n,r,i,o;const l=e.elements,c=l[0],u=l[4],d=l[8],f=l[1],h=l[5],g=l[9],y=l[2],_=l[6],v=l[10];if(Math.abs(u-f)<.01&&Math.abs(d-y)<.01&&Math.abs(g-_)<.01){if(Math.abs(u+f)<.1&&Math.abs(d+y)<.1&&Math.abs(g+_)<.1&&Math.abs(c+h+v-3)<.1)return this.set(1,0,0,0),this;n=Math.PI;const w=(c+1)/2,S=(h+1)/2,E=(v+1)/2,C=(u+f)/4,O=(d+y)/4,R=(g+_)/4;return w>S&&w>E?w<.01?(r=0,i=.707106781,o=.707106781):(r=Math.sqrt(w),i=C/r,o=O/r):S>E?S<.01?(r=.707106781,i=0,o=.707106781):(i=Math.sqrt(S),r=C/i,o=R/i):E<.01?(r=.707106781,i=.707106781,o=0):(o=Math.sqrt(E),r=O/o,i=R/o),this.set(r,i,o,n),this}let x=Math.sqrt((_-g)*(_-g)+(d-y)*(d-y)+(f-u)*(f-u));return Math.abs(x)<.001&&(x=1),this.x=(_-g)/x,this.y=(d-y)/x,this.z=(f-u)/x,this.w=Math.acos((c+h+v-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this.w=Math.max(e.w,Math.min(n.w,this.w)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this.w=Math.max(e,Math.min(n,this.w)),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(n,r)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this.w+=(e.w-this.w)*n,this}lerpVectors(e,n,r){return this.x=e.x+(n.x-e.x)*r,this.y=e.y+(n.y-e.y)*r,this.z=e.z+(n.z-e.z)*r,this.w=e.w+(n.w-e.w)*r,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this.w=e[n+3],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e[n+3]=this.w,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this.w=e.getW(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class gn extends hs{constructor(e=1,n=1,r={}){super(),this.isWebGLRenderTarget=!0,this.width=e,this.height=n,this.depth=1,this.scissor=new an(0,0,e,n),this.scissorTest=!1,this.viewport=new an(0,0,e,n);const i={width:e,height:n,depth:1};this.texture=new qn(i,r.mapping,r.wrapS,r.wrapT,r.magFilter,r.minFilter,r.format,r.type,r.anisotropy,r.encoding),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=r.generateMipmaps!==void 0?r.generateMipmaps:!1,this.texture.internalFormat=r.internalFormat!==void 0?r.internalFormat:null,this.texture.minFilter=r.minFilter!==void 0?r.minFilter:Dt,this.depthBuffer=r.depthBuffer!==void 0?r.depthBuffer:!0,this.stencilBuffer=r.stencilBuffer!==void 0?r.stencilBuffer:!1,this.depthTexture=r.depthTexture!==void 0?r.depthTexture:null,this.samples=r.samples!==void 0?r.samples:0}setSize(e,n,r=1){(this.width!==e||this.height!==n||this.depth!==r)&&(this.width=e,this.height=n,this.depth=r,this.texture.image.width=e,this.texture.image.height=n,this.texture.image.depth=r,this.dispose()),this.viewport.set(0,0,e,n),this.scissor.set(0,0,e,n)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;const n=Object.assign({},e.texture.image);return this.texture.source=new Cu(n),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class yS extends qn{constructor(e=null,n=1,r=1,i=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:n,height:r,depth:i},this.magFilter=Qt,this.minFilter=Qt,this.wrapR=Xr,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Cne extends gn{constructor(e=1,n=1,r=1){super(e,n),this.isWebGLArrayRenderTarget=!0,this.depth=r,this.texture=new yS(null,e,n,r),this.texture.isRenderTargetTexture=!0}}class zu extends qn{constructor(e=null,n=1,r=1,i=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:n,height:r,depth:i},this.magFilter=Qt,this.minFilter=Qt,this.wrapR=Xr,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Tne extends gn{constructor(e=1,n=1,r=1){super(e,n),this.isWebGL3DRenderTarget=!0,this.depth=r,this.texture=new zu(null,e,n,r),this.texture.isRenderTargetTexture=!0}}class JO extends gn{constructor(e=1,n=1,r=1,i={}){super(e,n,i),this.isWebGLMultipleRenderTargets=!0;const o=this.texture;this.texture=[];for(let s=0;s=0?1:-1,w=1-v*v;if(w>Number.EPSILON){const E=Math.sqrt(w),C=Math.atan2(E,v*x);_=Math.sin(_*C)/E,a=Math.sin(a*C)/E}const S=a*x;if(l=l*_+f*S,c=c*_+h*S,u=u*_+g*S,d=d*_+y*S,_===1-a){const E=1/Math.sqrt(l*l+c*c+u*u+d*d);l*=E,c*=E,u*=E,d*=E}}e[n]=l,e[n+1]=c,e[n+2]=u,e[n+3]=d}static multiplyQuaternionsFlat(e,n,r,i,o,s){const a=r[i],l=r[i+1],c=r[i+2],u=r[i+3],d=o[s],f=o[s+1],h=o[s+2],g=o[s+3];return e[n]=a*g+u*d+l*h-c*f,e[n+1]=l*g+u*f+c*d-a*h,e[n+2]=c*g+u*h+a*f-l*d,e[n+3]=u*g-a*d-l*f-c*h,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,n,r,i){return this._x=e,this._y=n,this._z=r,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,n){const r=e._x,i=e._y,o=e._z,s=e._order,a=Math.cos,l=Math.sin,c=a(r/2),u=a(i/2),d=a(o/2),f=l(r/2),h=l(i/2),g=l(o/2);switch(s){case"XYZ":this._x=f*u*d+c*h*g,this._y=c*h*d-f*u*g,this._z=c*u*g+f*h*d,this._w=c*u*d-f*h*g;break;case"YXZ":this._x=f*u*d+c*h*g,this._y=c*h*d-f*u*g,this._z=c*u*g-f*h*d,this._w=c*u*d+f*h*g;break;case"ZXY":this._x=f*u*d-c*h*g,this._y=c*h*d+f*u*g,this._z=c*u*g+f*h*d,this._w=c*u*d-f*h*g;break;case"ZYX":this._x=f*u*d-c*h*g,this._y=c*h*d+f*u*g,this._z=c*u*g-f*h*d,this._w=c*u*d+f*h*g;break;case"YZX":this._x=f*u*d+c*h*g,this._y=c*h*d+f*u*g,this._z=c*u*g-f*h*d,this._w=c*u*d-f*h*g;break;case"XZY":this._x=f*u*d-c*h*g,this._y=c*h*d-f*u*g,this._z=c*u*g+f*h*d,this._w=c*u*d+f*h*g;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+s)}return n!==!1&&this._onChangeCallback(),this}setFromAxisAngle(e,n){const r=n/2,i=Math.sin(r);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(r),this._onChangeCallback(),this}setFromRotationMatrix(e){const n=e.elements,r=n[0],i=n[4],o=n[8],s=n[1],a=n[5],l=n[9],c=n[2],u=n[6],d=n[10],f=r+a+d;if(f>0){const h=.5/Math.sqrt(f+1);this._w=.25/h,this._x=(u-l)*h,this._y=(o-c)*h,this._z=(s-i)*h}else if(r>a&&r>d){const h=2*Math.sqrt(1+r-a-d);this._w=(u-l)/h,this._x=.25*h,this._y=(i+s)/h,this._z=(o+c)/h}else if(a>d){const h=2*Math.sqrt(1+a-r-d);this._w=(o-c)/h,this._x=(i+s)/h,this._y=.25*h,this._z=(l+u)/h}else{const h=2*Math.sqrt(1+d-r-a);this._w=(s-i)/h,this._x=(o+c)/h,this._y=(l+u)/h,this._z=.25*h}return this._onChangeCallback(),this}setFromUnitVectors(e,n){let r=e.dot(n)+1;return rMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=r):(this._x=0,this._y=-e.z,this._z=e.y,this._w=r)):(this._x=e.y*n.z-e.z*n.y,this._y=e.z*n.x-e.x*n.z,this._z=e.x*n.y-e.y*n.x,this._w=r),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Mr(this.dot(e),-1,1)))}rotateTowards(e,n){const r=this.angleTo(e);if(r===0)return this;const i=Math.min(1,n/r);return this.slerp(e,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,n){const r=e._x,i=e._y,o=e._z,s=e._w,a=n._x,l=n._y,c=n._z,u=n._w;return this._x=r*u+s*a+i*c-o*l,this._y=i*u+s*l+o*a-r*c,this._z=o*u+s*c+r*l-i*a,this._w=s*u-r*a-i*l-o*c,this._onChangeCallback(),this}slerp(e,n){if(n===0)return this;if(n===1)return this.copy(e);const r=this._x,i=this._y,o=this._z,s=this._w;let a=s*e._w+r*e._x+i*e._y+o*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=s,this._x=r,this._y=i,this._z=o,this;const l=1-a*a;if(l<=Number.EPSILON){const h=1-n;return this._w=h*s+n*this._w,this._x=h*r+n*this._x,this._y=h*i+n*this._y,this._z=h*o+n*this._z,this.normalize(),this._onChangeCallback(),this}const c=Math.sqrt(l),u=Math.atan2(c,a),d=Math.sin((1-n)*u)/c,f=Math.sin(n*u)/c;return this._w=s*d+this._w*f,this._x=r*d+this._x*f,this._y=i*d+this._y*f,this._z=o*d+this._z*f,this._onChangeCallback(),this}slerpQuaternions(e,n,r){return this.copy(e).slerp(n,r)}random(){const e=Math.random(),n=Math.sqrt(1-e),r=Math.sqrt(e),i=2*Math.PI*Math.random(),o=2*Math.PI*Math.random();return this.set(n*Math.cos(i),r*Math.sin(o),r*Math.cos(o),n*Math.sin(i))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,n=0){return this._x=e[n],this._y=e[n+1],this._z=e[n+2],this._w=e[n+3],this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._w,e}fromBufferAttribute(e,n){return this._x=e.getX(n),this._y=e.getY(n),this._z=e.getZ(n),this._w=e.getW(n),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class Z{constructor(e=0,n=0,r=0){Z.prototype.isVector3=!0,this.x=e,this.y=n,this.z=r}set(e,n,r){return r===void 0&&(r=this.z),this.x=e,this.y=n,this.z=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,n){return this.x=e.x*n.x,this.y=e.y*n.y,this.z=e.z*n.z,this}applyEuler(e){return this.applyQuaternion(N3.setFromEuler(e))}applyAxisAngle(e,n){return this.applyQuaternion(N3.setFromAxisAngle(e,n))}applyMatrix3(e){const n=this.x,r=this.y,i=this.z,o=e.elements;return this.x=o[0]*n+o[3]*r+o[6]*i,this.y=o[1]*n+o[4]*r+o[7]*i,this.z=o[2]*n+o[5]*r+o[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const n=this.x,r=this.y,i=this.z,o=e.elements,s=1/(o[3]*n+o[7]*r+o[11]*i+o[15]);return this.x=(o[0]*n+o[4]*r+o[8]*i+o[12])*s,this.y=(o[1]*n+o[5]*r+o[9]*i+o[13])*s,this.z=(o[2]*n+o[6]*r+o[10]*i+o[14])*s,this}applyQuaternion(e){const n=this.x,r=this.y,i=this.z,o=e.x,s=e.y,a=e.z,l=e.w,c=l*n+s*i-a*r,u=l*r+a*n-o*i,d=l*i+o*r-s*n,f=-o*n-s*r-a*i;return this.x=c*l+f*-o+u*-a-d*-s,this.y=u*l+f*-s+d*-o-c*-a,this.z=d*l+f*-a+c*-s-u*-o,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const n=this.x,r=this.y,i=this.z,o=e.elements;return this.x=o[0]*n+o[4]*r+o[8]*i,this.y=o[1]*n+o[5]*r+o[9]*i,this.z=o[2]*n+o[6]*r+o[10]*i,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this}clampLength(e,n){const r=this.length();return this.divideScalar(r||1).multiplyScalar(Math.max(e,Math.min(n,r)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this}lerpVectors(e,n,r){return this.x=e.x+(n.x-e.x)*r,this.y=e.y+(n.y-e.y)*r,this.z=e.z+(n.z-e.z)*r,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,n){const r=e.x,i=e.y,o=e.z,s=n.x,a=n.y,l=n.z;return this.x=i*l-o*a,this.y=o*s-r*l,this.z=r*a-i*s,this}projectOnVector(e){const n=e.lengthSq();if(n===0)return this.set(0,0,0);const r=e.dot(this)/n;return this.copy(e).multiplyScalar(r)}projectOnPlane(e){return iE.copy(this).projectOnVector(e),this.sub(iE)}reflect(e){return this.sub(iE.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const r=this.dot(e)/n;return Math.acos(Mr(r,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,r=this.y-e.y,i=this.z-e.z;return n*n+r*r+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,n,r){const i=Math.sin(n)*e;return this.x=i*Math.sin(r),this.y=Math.cos(n)*e,this.z=i*Math.cos(r),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,n,r){return this.x=e*Math.sin(n),this.y=r,this.z=e*Math.cos(n),this}setFromMatrixPosition(e){const n=e.elements;return this.x=n[12],this.y=n[13],this.z=n[14],this}setFromMatrixScale(e){const n=this.setFromMatrixColumn(e,0).length(),r=this.setFromMatrixColumn(e,1).length(),i=this.setFromMatrixColumn(e,2).length();return this.x=n,this.y=r,this.z=i,this}setFromMatrixColumn(e,n){return this.fromArray(e.elements,n*4)}setFromMatrix3Column(e,n){return this.fromArray(e.elements,n*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=(Math.random()-.5)*2,n=Math.random()*Math.PI*2,r=Math.sqrt(1-e**2);return this.x=r*Math.cos(n),this.y=r*Math.sin(n),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const iE=new Z,N3=new Hn;class zi{constructor(e=new Z(1/0,1/0,1/0),n=new Z(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=n}set(e,n){return this.min.copy(e),this.max.copy(n),this}setFromArray(e){this.makeEmpty();for(let n=0,r=e.length;nthis.max.x||e.ythis.max.y||e.zthis.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,n){return n.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,Va),Va.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let n,r;return e.normal.x>0?(n=e.normal.x*this.min.x,r=e.normal.x*this.max.x):(n=e.normal.x*this.max.x,r=e.normal.x*this.min.x),e.normal.y>0?(n+=e.normal.y*this.min.y,r+=e.normal.y*this.max.y):(n+=e.normal.y*this.max.y,r+=e.normal.y*this.min.y),e.normal.z>0?(n+=e.normal.z*this.min.z,r+=e.normal.z*this.max.z):(n+=e.normal.z*this.max.z,r+=e.normal.z*this.min.z),n<=-e.constant&&r>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(op),p0.subVectors(this.max,op),Td.subVectors(e.a,op),Od.subVectors(e.b,op),Rd.subVectors(e.c,op),Il.subVectors(Od,Td),Ll.subVectors(Rd,Od),Zc.subVectors(Td,Rd);let n=[0,-Il.z,Il.y,0,-Ll.z,Ll.y,0,-Zc.z,Zc.y,Il.z,0,-Il.x,Ll.z,0,-Ll.x,Zc.z,0,-Zc.x,-Il.y,Il.x,0,-Ll.y,Ll.x,0,-Zc.y,Zc.x,0];return!oE(n,Td,Od,Rd,p0)||(n=[1,0,0,0,1,0,0,0,1],!oE(n,Td,Od,Rd,p0))?!1:(m0.crossVectors(Il,Ll),n=[m0.x,m0.y,m0.z],oE(n,Td,Od,Rd,p0))}clampPoint(e,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Va).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Va).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(Ha[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Ha[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Ha[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Ha[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Ha[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Ha[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Ha[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Ha[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Ha),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const Ha=[new Z,new Z,new Z,new Z,new Z,new Z,new Z,new Z],Va=new Z,Cd=new zi,Td=new Z,Od=new Z,Rd=new Z,Il=new Z,Ll=new Z,Zc=new Z,op=new Z,p0=new Z,m0=new Z,qc=new Z;function oE(t,e,n,r,i){for(let o=0,s=t.length-3;o<=s;o+=3){qc.fromArray(t,o);const a=i.x*Math.abs(qc.x)+i.y*Math.abs(qc.y)+i.z*Math.abs(qc.z),l=e.dot(qc),c=n.dot(qc),u=r.dot(qc);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>a)return!1}return!0}const One=new zi,sp=new Z,sE=new Z;class mo{constructor(e=new Z,n=-1){this.center=e,this.radius=n}set(e,n){return this.center.copy(e),this.radius=n,this}setFromPoints(e,n){const r=this.center;n!==void 0?r.copy(n):One.setFromPoints(e).getCenter(r);let i=0;for(let o=0,s=e.length;othis.radius*this.radius&&(n.sub(this.center).normalize(),n.multiplyScalar(this.radius).add(this.center)),n}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;sp.subVectors(e,this.center);const n=sp.lengthSq();if(n>this.radius*this.radius){const r=Math.sqrt(n),i=(r-this.radius)*.5;this.center.addScaledVector(sp,i/r),this.radius+=i}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(sE.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(sp.copy(e.center).add(sE)),this.expandByPoint(sp.copy(e.center).sub(sE))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const ja=new Z,aE=new Z,g0=new Z,kl=new Z,lE=new Z,v0=new Z,cE=new Z;class nd{constructor(e=new Z,n=new Z(0,0,-1)){this.origin=e,this.direction=n}set(e,n){return this.origin.copy(e),this.direction.copy(n),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,n){return n.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,ja)),this}closestPointToPoint(e,n){n.subVectors(e,this.origin);const r=n.dot(this.direction);return r<0?n.copy(this.origin):n.copy(this.origin).addScaledVector(this.direction,r)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const n=ja.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(ja.copy(this.origin).addScaledVector(this.direction,n),ja.distanceToSquared(e))}distanceSqToSegment(e,n,r,i){aE.copy(e).add(n).multiplyScalar(.5),g0.copy(n).sub(e).normalize(),kl.copy(this.origin).sub(aE);const o=e.distanceTo(n)*.5,s=-this.direction.dot(g0),a=kl.dot(this.direction),l=-kl.dot(g0),c=kl.lengthSq(),u=Math.abs(1-s*s);let d,f,h,g;if(u>0)if(d=s*l-a,f=s*a-l,g=o*u,d>=0)if(f>=-g)if(f<=g){const y=1/u;d*=y,f*=y,h=d*(d+s*f+2*a)+f*(s*d+f+2*l)+c}else f=o,d=Math.max(0,-(s*f+a)),h=-d*d+f*(f+2*l)+c;else f=-o,d=Math.max(0,-(s*f+a)),h=-d*d+f*(f+2*l)+c;else f<=-g?(d=Math.max(0,-(-s*o+a)),f=d>0?-o:Math.min(Math.max(-o,-l),o),h=-d*d+f*(f+2*l)+c):f<=g?(d=0,f=Math.min(Math.max(-o,-l),o),h=f*(f+2*l)+c):(d=Math.max(0,-(s*o+a)),f=d>0?o:Math.min(Math.max(-o,-l),o),h=-d*d+f*(f+2*l)+c);else f=s>0?-o:o,d=Math.max(0,-(s*f+a)),h=-d*d+f*(f+2*l)+c;return r&&r.copy(this.origin).addScaledVector(this.direction,d),i&&i.copy(aE).addScaledVector(g0,f),h}intersectSphere(e,n){ja.subVectors(e.center,this.origin);const r=ja.dot(this.direction),i=ja.dot(ja)-r*r,o=e.radius*e.radius;if(i>o)return null;const s=Math.sqrt(o-i),a=r-s,l=r+s;return l<0?null:a<0?this.at(l,n):this.at(a,n)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const n=e.normal.dot(this.direction);if(n===0)return e.distanceToPoint(this.origin)===0?0:null;const r=-(this.origin.dot(e.normal)+e.constant)/n;return r>=0?r:null}intersectPlane(e,n){const r=this.distanceToPlane(e);return r===null?null:this.at(r,n)}intersectsPlane(e){const n=e.distanceToPoint(this.origin);return n===0||e.normal.dot(this.direction)*n<0}intersectBox(e,n){let r,i,o,s,a,l;const c=1/this.direction.x,u=1/this.direction.y,d=1/this.direction.z,f=this.origin;return c>=0?(r=(e.min.x-f.x)*c,i=(e.max.x-f.x)*c):(r=(e.max.x-f.x)*c,i=(e.min.x-f.x)*c),u>=0?(o=(e.min.y-f.y)*u,s=(e.max.y-f.y)*u):(o=(e.max.y-f.y)*u,s=(e.min.y-f.y)*u),r>s||o>i||((o>r||isNaN(r))&&(r=o),(s=0?(a=(e.min.z-f.z)*d,l=(e.max.z-f.z)*d):(a=(e.max.z-f.z)*d,l=(e.min.z-f.z)*d),r>l||a>i)||((a>r||r!==r)&&(r=a),(l=0?r:i,n)}intersectsBox(e){return this.intersectBox(e,ja)!==null}intersectTriangle(e,n,r,i,o){lE.subVectors(n,e),v0.subVectors(r,e),cE.crossVectors(lE,v0);let s=this.direction.dot(cE),a;if(s>0){if(i)return null;a=1}else if(s<0)a=-1,s=-s;else return null;kl.subVectors(this.origin,e);const l=a*this.direction.dot(v0.crossVectors(kl,v0));if(l<0)return null;const c=a*this.direction.dot(lE.cross(kl));if(c<0||l+c>s)return null;const u=-a*kl.dot(cE);return u<0?null:this.at(u/s,o)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class rt{constructor(){rt.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}set(e,n,r,i,o,s,a,l,c,u,d,f,h,g,y,_){const v=this.elements;return v[0]=e,v[4]=n,v[8]=r,v[12]=i,v[1]=o,v[5]=s,v[9]=a,v[13]=l,v[2]=c,v[6]=u,v[10]=d,v[14]=f,v[3]=h,v[7]=g,v[11]=y,v[15]=_,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new rt().fromArray(this.elements)}copy(e){const n=this.elements,r=e.elements;return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3],n[4]=r[4],n[5]=r[5],n[6]=r[6],n[7]=r[7],n[8]=r[8],n[9]=r[9],n[10]=r[10],n[11]=r[11],n[12]=r[12],n[13]=r[13],n[14]=r[14],n[15]=r[15],this}copyPosition(e){const n=this.elements,r=e.elements;return n[12]=r[12],n[13]=r[13],n[14]=r[14],this}setFromMatrix3(e){const n=e.elements;return this.set(n[0],n[3],n[6],0,n[1],n[4],n[7],0,n[2],n[5],n[8],0,0,0,0,1),this}extractBasis(e,n,r){return e.setFromMatrixColumn(this,0),n.setFromMatrixColumn(this,1),r.setFromMatrixColumn(this,2),this}makeBasis(e,n,r){return this.set(e.x,n.x,r.x,0,e.y,n.y,r.y,0,e.z,n.z,r.z,0,0,0,0,1),this}extractRotation(e){const n=this.elements,r=e.elements,i=1/Ad.setFromMatrixColumn(e,0).length(),o=1/Ad.setFromMatrixColumn(e,1).length(),s=1/Ad.setFromMatrixColumn(e,2).length();return n[0]=r[0]*i,n[1]=r[1]*i,n[2]=r[2]*i,n[3]=0,n[4]=r[4]*o,n[5]=r[5]*o,n[6]=r[6]*o,n[7]=0,n[8]=r[8]*s,n[9]=r[9]*s,n[10]=r[10]*s,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromEuler(e){const n=this.elements,r=e.x,i=e.y,o=e.z,s=Math.cos(r),a=Math.sin(r),l=Math.cos(i),c=Math.sin(i),u=Math.cos(o),d=Math.sin(o);if(e.order==="XYZ"){const f=s*u,h=s*d,g=a*u,y=a*d;n[0]=l*u,n[4]=-l*d,n[8]=c,n[1]=h+g*c,n[5]=f-y*c,n[9]=-a*l,n[2]=y-f*c,n[6]=g+h*c,n[10]=s*l}else if(e.order==="YXZ"){const f=l*u,h=l*d,g=c*u,y=c*d;n[0]=f+y*a,n[4]=g*a-h,n[8]=s*c,n[1]=s*d,n[5]=s*u,n[9]=-a,n[2]=h*a-g,n[6]=y+f*a,n[10]=s*l}else if(e.order==="ZXY"){const f=l*u,h=l*d,g=c*u,y=c*d;n[0]=f-y*a,n[4]=-s*d,n[8]=g+h*a,n[1]=h+g*a,n[5]=s*u,n[9]=y-f*a,n[2]=-s*c,n[6]=a,n[10]=s*l}else if(e.order==="ZYX"){const f=s*u,h=s*d,g=a*u,y=a*d;n[0]=l*u,n[4]=g*c-h,n[8]=f*c+y,n[1]=l*d,n[5]=y*c+f,n[9]=h*c-g,n[2]=-c,n[6]=a*l,n[10]=s*l}else if(e.order==="YZX"){const f=s*l,h=s*c,g=a*l,y=a*c;n[0]=l*u,n[4]=y-f*d,n[8]=g*d+h,n[1]=d,n[5]=s*u,n[9]=-a*u,n[2]=-c*u,n[6]=h*d+g,n[10]=f-y*d}else if(e.order==="XZY"){const f=s*l,h=s*c,g=a*l,y=a*c;n[0]=l*u,n[4]=-d,n[8]=c*u,n[1]=f*d+y,n[5]=s*u,n[9]=h*d-g,n[2]=g*d-h,n[6]=a*u,n[10]=y*d+f}return n[3]=0,n[7]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromQuaternion(e){return this.compose(Rne,e,Ane)}lookAt(e,n,r){const i=this.elements;return xo.subVectors(e,n),xo.lengthSq()===0&&(xo.z=1),xo.normalize(),Nl.crossVectors(r,xo),Nl.lengthSq()===0&&(Math.abs(r.z)===1?xo.x+=1e-4:xo.z+=1e-4,xo.normalize(),Nl.crossVectors(r,xo)),Nl.normalize(),y0.crossVectors(xo,Nl),i[0]=Nl.x,i[4]=y0.x,i[8]=xo.x,i[1]=Nl.y,i[5]=y0.y,i[9]=xo.y,i[2]=Nl.z,i[6]=y0.z,i[10]=xo.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const r=e.elements,i=n.elements,o=this.elements,s=r[0],a=r[4],l=r[8],c=r[12],u=r[1],d=r[5],f=r[9],h=r[13],g=r[2],y=r[6],_=r[10],v=r[14],x=r[3],w=r[7],S=r[11],E=r[15],C=i[0],O=i[4],R=i[8],T=i[12],A=i[1],F=i[5],N=i[9],U=i[13],k=i[2],z=i[6],G=i[10],W=i[14],B=i[3],j=i[7],$=i[11],q=i[15];return o[0]=s*C+a*A+l*k+c*B,o[4]=s*O+a*F+l*z+c*j,o[8]=s*R+a*N+l*G+c*$,o[12]=s*T+a*U+l*W+c*q,o[1]=u*C+d*A+f*k+h*B,o[5]=u*O+d*F+f*z+h*j,o[9]=u*R+d*N+f*G+h*$,o[13]=u*T+d*U+f*W+h*q,o[2]=g*C+y*A+_*k+v*B,o[6]=g*O+y*F+_*z+v*j,o[10]=g*R+y*N+_*G+v*$,o[14]=g*T+y*U+_*W+v*q,o[3]=x*C+w*A+S*k+E*B,o[7]=x*O+w*F+S*z+E*j,o[11]=x*R+w*N+S*G+E*$,o[15]=x*T+w*U+S*W+E*q,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[4]*=e,n[8]*=e,n[12]*=e,n[1]*=e,n[5]*=e,n[9]*=e,n[13]*=e,n[2]*=e,n[6]*=e,n[10]*=e,n[14]*=e,n[3]*=e,n[7]*=e,n[11]*=e,n[15]*=e,this}determinant(){const e=this.elements,n=e[0],r=e[4],i=e[8],o=e[12],s=e[1],a=e[5],l=e[9],c=e[13],u=e[2],d=e[6],f=e[10],h=e[14],g=e[3],y=e[7],_=e[11],v=e[15];return g*(+o*l*d-i*c*d-o*a*f+r*c*f+i*a*h-r*l*h)+y*(+n*l*h-n*c*f+o*s*f-i*s*h+i*c*u-o*l*u)+_*(+n*c*d-n*a*h-o*s*d+r*s*h+o*a*u-r*c*u)+v*(-i*a*u-n*l*d+n*a*f+i*s*d-r*s*f+r*l*u)}transpose(){const e=this.elements;let n;return n=e[1],e[1]=e[4],e[4]=n,n=e[2],e[2]=e[8],e[8]=n,n=e[6],e[6]=e[9],e[9]=n,n=e[3],e[3]=e[12],e[12]=n,n=e[7],e[7]=e[13],e[13]=n,n=e[11],e[11]=e[14],e[14]=n,this}setPosition(e,n,r){const i=this.elements;return e.isVector3?(i[12]=e.x,i[13]=e.y,i[14]=e.z):(i[12]=e,i[13]=n,i[14]=r),this}invert(){const e=this.elements,n=e[0],r=e[1],i=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],u=e[8],d=e[9],f=e[10],h=e[11],g=e[12],y=e[13],_=e[14],v=e[15],x=d*_*c-y*f*c+y*l*h-a*_*h-d*l*v+a*f*v,w=g*f*c-u*_*c-g*l*h+s*_*h+u*l*v-s*f*v,S=u*y*c-g*d*c+g*a*h-s*y*h-u*a*v+s*d*v,E=g*d*l-u*y*l-g*a*f+s*y*f+u*a*_-s*d*_,C=n*x+r*w+i*S+o*E;if(C===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const O=1/C;return e[0]=x*O,e[1]=(y*f*o-d*_*o-y*i*h+r*_*h+d*i*v-r*f*v)*O,e[2]=(a*_*o-y*l*o+y*i*c-r*_*c-a*i*v+r*l*v)*O,e[3]=(d*l*o-a*f*o-d*i*c+r*f*c+a*i*h-r*l*h)*O,e[4]=w*O,e[5]=(u*_*o-g*f*o+g*i*h-n*_*h-u*i*v+n*f*v)*O,e[6]=(g*l*o-s*_*o-g*i*c+n*_*c+s*i*v-n*l*v)*O,e[7]=(s*f*o-u*l*o+u*i*c-n*f*c-s*i*h+n*l*h)*O,e[8]=S*O,e[9]=(g*d*o-u*y*o-g*r*h+n*y*h+u*r*v-n*d*v)*O,e[10]=(s*y*o-g*a*o+g*r*c-n*y*c-s*r*v+n*a*v)*O,e[11]=(u*a*o-s*d*o-u*r*c+n*d*c+s*r*h-n*a*h)*O,e[12]=E*O,e[13]=(u*y*i-g*d*i+g*r*f-n*y*f-u*r*_+n*d*_)*O,e[14]=(g*a*i-s*y*i-g*r*l+n*y*l+s*r*_-n*a*_)*O,e[15]=(s*d*i-u*a*i+u*r*l-n*d*l-s*r*f+n*a*f)*O,this}scale(e){const n=this.elements,r=e.x,i=e.y,o=e.z;return n[0]*=r,n[4]*=i,n[8]*=o,n[1]*=r,n[5]*=i,n[9]*=o,n[2]*=r,n[6]*=i,n[10]*=o,n[3]*=r,n[7]*=i,n[11]*=o,this}getMaxScaleOnAxis(){const e=this.elements,n=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],r=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],i=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(n,r,i))}makeTranslation(e,n,r){return this.set(1,0,0,e,0,1,0,n,0,0,1,r,0,0,0,1),this}makeRotationX(e){const n=Math.cos(e),r=Math.sin(e);return this.set(1,0,0,0,0,n,-r,0,0,r,n,0,0,0,0,1),this}makeRotationY(e){const n=Math.cos(e),r=Math.sin(e);return this.set(n,0,r,0,0,1,0,0,-r,0,n,0,0,0,0,1),this}makeRotationZ(e){const n=Math.cos(e),r=Math.sin(e);return this.set(n,-r,0,0,r,n,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,n){const r=Math.cos(n),i=Math.sin(n),o=1-r,s=e.x,a=e.y,l=e.z,c=o*s,u=o*a;return this.set(c*s+r,c*a-i*l,c*l+i*a,0,c*a+i*l,u*a+r,u*l-i*s,0,c*l-i*a,u*l+i*s,o*l*l+r,0,0,0,0,1),this}makeScale(e,n,r){return this.set(e,0,0,0,0,n,0,0,0,0,r,0,0,0,0,1),this}makeShear(e,n,r,i,o,s){return this.set(1,r,o,0,e,1,s,0,n,i,1,0,0,0,0,1),this}compose(e,n,r){const i=this.elements,o=n._x,s=n._y,a=n._z,l=n._w,c=o+o,u=s+s,d=a+a,f=o*c,h=o*u,g=o*d,y=s*u,_=s*d,v=a*d,x=l*c,w=l*u,S=l*d,E=r.x,C=r.y,O=r.z;return i[0]=(1-(y+v))*E,i[1]=(h+S)*E,i[2]=(g-w)*E,i[3]=0,i[4]=(h-S)*C,i[5]=(1-(f+v))*C,i[6]=(_+x)*C,i[7]=0,i[8]=(g+w)*O,i[9]=(_-x)*O,i[10]=(1-(f+y))*O,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this}decompose(e,n,r){const i=this.elements;let o=Ad.set(i[0],i[1],i[2]).length();const s=Ad.set(i[4],i[5],i[6]).length(),a=Ad.set(i[8],i[9],i[10]).length();this.determinant()<0&&(o=-o),e.x=i[12],e.y=i[13],e.z=i[14],ys.copy(this);const c=1/o,u=1/s,d=1/a;return ys.elements[0]*=c,ys.elements[1]*=c,ys.elements[2]*=c,ys.elements[4]*=u,ys.elements[5]*=u,ys.elements[6]*=u,ys.elements[8]*=d,ys.elements[9]*=d,ys.elements[10]*=d,n.setFromRotationMatrix(ys),r.x=o,r.y=s,r.z=a,this}makePerspective(e,n,r,i,o,s){const a=this.elements,l=2*o/(n-e),c=2*o/(r-i),u=(n+e)/(n-e),d=(r+i)/(r-i),f=-(s+o)/(s-o),h=-2*s*o/(s-o);return a[0]=l,a[4]=0,a[8]=u,a[12]=0,a[1]=0,a[5]=c,a[9]=d,a[13]=0,a[2]=0,a[6]=0,a[10]=f,a[14]=h,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this}makeOrthographic(e,n,r,i,o,s){const a=this.elements,l=1/(n-e),c=1/(r-i),u=1/(s-o),d=(n+e)*l,f=(r+i)*c,h=(s+o)*u;return a[0]=2*l,a[4]=0,a[8]=0,a[12]=-d,a[1]=0,a[5]=2*c,a[9]=0,a[13]=-f,a[2]=0,a[6]=0,a[10]=-2*u,a[14]=-h,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this}equals(e){const n=this.elements,r=e.elements;for(let i=0;i<16;i++)if(n[i]!==r[i])return!1;return!0}fromArray(e,n=0){for(let r=0;r<16;r++)this.elements[r]=e[r+n];return this}toArray(e=[],n=0){const r=this.elements;return e[n]=r[0],e[n+1]=r[1],e[n+2]=r[2],e[n+3]=r[3],e[n+4]=r[4],e[n+5]=r[5],e[n+6]=r[6],e[n+7]=r[7],e[n+8]=r[8],e[n+9]=r[9],e[n+10]=r[10],e[n+11]=r[11],e[n+12]=r[12],e[n+13]=r[13],e[n+14]=r[14],e[n+15]=r[15],e}}const Ad=new Z,ys=new rt,Rne=new Z(0,0,0),Ane=new Z(1,1,1),Nl=new Z,y0=new Z,xo=new Z,F3=new rt,z3=new Hn;class ki{constructor(e=0,n=0,r=0,i=ki.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=n,this._z=r,this._order=i}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,n,r,i=this._order){return this._x=e,this._y=n,this._z=r,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,n=this._order,r=!0){const i=e.elements,o=i[0],s=i[4],a=i[8],l=i[1],c=i[5],u=i[9],d=i[2],f=i[6],h=i[10];switch(n){case"XYZ":this._y=Math.asin(Mr(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-u,h),this._z=Math.atan2(-s,o)):(this._x=Math.atan2(f,c),this._z=0);break;case"YXZ":this._x=Math.asin(-Mr(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(a,h),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-d,o),this._z=0);break;case"ZXY":this._x=Math.asin(Mr(f,-1,1)),Math.abs(f)<.9999999?(this._y=Math.atan2(-d,h),this._z=Math.atan2(-s,c)):(this._y=0,this._z=Math.atan2(l,o));break;case"ZYX":this._y=Math.asin(-Mr(d,-1,1)),Math.abs(d)<.9999999?(this._x=Math.atan2(f,h),this._z=Math.atan2(l,o)):(this._x=0,this._z=Math.atan2(-s,c));break;case"YZX":this._z=Math.asin(Mr(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,c),this._y=Math.atan2(-d,o)):(this._x=0,this._y=Math.atan2(a,h));break;case"XZY":this._z=Math.asin(-Mr(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(f,c),this._y=Math.atan2(a,o)):(this._x=Math.atan2(-u,h),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,r===!0&&this._onChangeCallback(),this}setFromQuaternion(e,n,r){return F3.makeRotationFromQuaternion(e),this.setFromRotationMatrix(F3,n,r)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return z3.setFromEuler(this),this.setFromQuaternion(z3,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}ki.DEFAULT_ORDER="XYZ";class Uu{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let n=0;n1){for(let r=0;r0&&(r=r.concat(s))}return r}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(ap,e,Ine),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(ap,Lne,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const n=this.matrixWorld.elements;return e.set(n[8],n[9],n[10]).normalize()}raycast(){}traverse(e){e(this);const n=this.children;for(let r=0,i=n.length;r0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),i.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(i.instanceColor=this.instanceColor.toJSON()));function o(a,l){return a[l.uuid]===void 0&&(a[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(i.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=o(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const l=a.shapes;if(Array.isArray(l))for(let c=0,u=l.length;c0){i.children=[];for(let a=0;a0){i.animations=[];for(let a=0;a0&&(r.geometries=a),l.length>0&&(r.materials=l),c.length>0&&(r.textures=c),u.length>0&&(r.images=u),d.length>0&&(r.shapes=d),f.length>0&&(r.skeletons=f),h.length>0&&(r.animations=h),g.length>0&&(r.nodes=g)}return r.object=i,r;function s(a){const l=[];for(const c in a){const u=a[c];delete u.metadata,l.push(u)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,n=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.userData=JSON.parse(JSON.stringify(e.userData)),n===!0)for(let r=0;r0?i.multiplyScalar(1/Math.sqrt(o)):i.set(0,0,0)}static getBarycoord(e,n,r,i,o){_s.subVectors(i,n),Ga.subVectors(r,n),uE.subVectors(e,n);const s=_s.dot(_s),a=_s.dot(Ga),l=_s.dot(uE),c=Ga.dot(Ga),u=Ga.dot(uE),d=s*c-a*a;if(d===0)return o.set(-2,-1,-1);const f=1/d,h=(c*l-a*u)*f,g=(s*u-a*l)*f;return o.set(1-h-g,g,h)}static containsPoint(e,n,r,i){return this.getBarycoord(e,n,r,i,Wa),Wa.x>=0&&Wa.y>=0&&Wa.x+Wa.y<=1}static getUV(e,n,r,i,o,s,a,l){return x0===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),x0=!0),this.getInterpolation(e,n,r,i,o,s,a,l)}static getInterpolation(e,n,r,i,o,s,a,l){return this.getBarycoord(e,n,r,i,Wa),l.setScalar(0),l.addScaledVector(o,Wa.x),l.addScaledVector(s,Wa.y),l.addScaledVector(a,Wa.z),l}static isFrontFacing(e,n,r,i){return _s.subVectors(r,n),Ga.subVectors(e,n),_s.cross(Ga).dot(i)<0}set(e,n,r){return this.a.copy(e),this.b.copy(n),this.c.copy(r),this}setFromPointsAndIndices(e,n,r,i){return this.a.copy(e[n]),this.b.copy(e[r]),this.c.copy(e[i]),this}setFromAttributeAndIndices(e,n,r,i){return this.a.fromBufferAttribute(e,n),this.b.fromBufferAttribute(e,r),this.c.fromBufferAttribute(e,i),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return _s.subVectors(this.c,this.b),Ga.subVectors(this.a,this.b),_s.cross(Ga).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return lo.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,n){return lo.getBarycoord(e,this.a,this.b,this.c,n)}getUV(e,n,r,i,o){return x0===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),x0=!0),lo.getInterpolation(e,this.a,this.b,this.c,n,r,i,o)}getInterpolation(e,n,r,i,o){return lo.getInterpolation(e,this.a,this.b,this.c,n,r,i,o)}containsPoint(e){return lo.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return lo.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,n){const r=this.a,i=this.b,o=this.c;let s,a;Id.subVectors(i,r),Ld.subVectors(o,r),dE.subVectors(e,r);const l=Id.dot(dE),c=Ld.dot(dE);if(l<=0&&c<=0)return n.copy(r);fE.subVectors(e,i);const u=Id.dot(fE),d=Ld.dot(fE);if(u>=0&&d<=u)return n.copy(i);const f=l*d-u*c;if(f<=0&&l>=0&&u<=0)return s=l/(l-u),n.copy(r).addScaledVector(Id,s);hE.subVectors(e,o);const h=Id.dot(hE),g=Ld.dot(hE);if(g>=0&&h<=g)return n.copy(o);const y=h*c-l*g;if(y<=0&&c>=0&&g<=0)return a=c/(c-g),n.copy(r).addScaledVector(Ld,a);const _=u*g-h*d;if(_<=0&&d-u>=0&&h-g>=0)return $3.subVectors(o,i),a=(d-u)/(d-u+(h-g)),n.copy(i).addScaledVector($3,a);const v=1/(_+y+f);return s=y*v,a=f*v,n.copy(r).addScaledVector(Id,s).addScaledVector(Ld,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}let Nne=0;class jr extends hs{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:Nne++}),this.uuid=Co(),this.name="",this.type="Material",this.blending=Nu,this.side=Vs,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=UO,this.blendDst=BO,this.blendEquation=mu,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=Gm,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=Uj,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=R_,this.stencilZFail=R_,this.stencilZPass=R_,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const n in e){const r=e[n];if(r===void 0){console.warn(`THREE.Material: parameter '${n}' has value of undefined.`);continue}const i=this[n];if(i===void 0){console.warn(`THREE.Material: '${n}' is not a property of THREE.${this.type}.`);continue}i&&i.isColor?i.set(r):i&&i.isVector3&&r&&r.isVector3?i.copy(r):this[n]=r}}toJSON(e){const n=e===void 0||typeof e=="string";n&&(e={textures:{},images:{}});const r={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};r.uuid=this.uuid,r.type=this.type,this.name!==""&&(r.name=this.name),this.color&&this.color.isColor&&(r.color=this.color.getHex()),this.roughness!==void 0&&(r.roughness=this.roughness),this.metalness!==void 0&&(r.metalness=this.metalness),this.sheen!==void 0&&(r.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(r.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(r.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(r.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(r.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(r.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(r.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(r.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(r.shininess=this.shininess),this.clearcoat!==void 0&&(r.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(r.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(r.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(r.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(r.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,r.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(r.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(r.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(r.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(r.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(r.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(r.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(r.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(r.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(r.lightMap=this.lightMap.toJSON(e).uuid,r.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(r.aoMap=this.aoMap.toJSON(e).uuid,r.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(r.bumpMap=this.bumpMap.toJSON(e).uuid,r.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(r.normalMap=this.normalMap.toJSON(e).uuid,r.normalMapType=this.normalMapType,r.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(r.displacementMap=this.displacementMap.toJSON(e).uuid,r.displacementScale=this.displacementScale,r.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(r.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(r.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(r.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(r.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(r.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(r.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(r.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(r.combine=this.combine)),this.envMapIntensity!==void 0&&(r.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(r.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(r.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(r.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(r.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(r.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(r.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(r.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(r.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(r.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(r.size=this.size),this.shadowSide!==null&&(r.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(r.sizeAttenuation=this.sizeAttenuation),this.blending!==Nu&&(r.blending=this.blending),this.side!==Vs&&(r.side=this.side),this.vertexColors&&(r.vertexColors=!0),this.opacity<1&&(r.opacity=this.opacity),this.transparent===!0&&(r.transparent=this.transparent),r.depthFunc=this.depthFunc,r.depthTest=this.depthTest,r.depthWrite=this.depthWrite,r.colorWrite=this.colorWrite,r.stencilWrite=this.stencilWrite,r.stencilWriteMask=this.stencilWriteMask,r.stencilFunc=this.stencilFunc,r.stencilRef=this.stencilRef,r.stencilFuncMask=this.stencilFuncMask,r.stencilFail=this.stencilFail,r.stencilZFail=this.stencilZFail,r.stencilZPass=this.stencilZPass,this.rotation!==void 0&&this.rotation!==0&&(r.rotation=this.rotation),this.polygonOffset===!0&&(r.polygonOffset=!0),this.polygonOffsetFactor!==0&&(r.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(r.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(r.linewidth=this.linewidth),this.dashSize!==void 0&&(r.dashSize=this.dashSize),this.gapSize!==void 0&&(r.gapSize=this.gapSize),this.scale!==void 0&&(r.scale=this.scale),this.dithering===!0&&(r.dithering=!0),this.alphaTest>0&&(r.alphaTest=this.alphaTest),this.alphaToCoverage===!0&&(r.alphaToCoverage=this.alphaToCoverage),this.premultipliedAlpha===!0&&(r.premultipliedAlpha=this.premultipliedAlpha),this.forceSinglePass===!0&&(r.forceSinglePass=this.forceSinglePass),this.wireframe===!0&&(r.wireframe=this.wireframe),this.wireframeLinewidth>1&&(r.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(r.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(r.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(r.flatShading=this.flatShading),this.visible===!1&&(r.visible=!1),this.toneMapped===!1&&(r.toneMapped=!1),this.fog===!1&&(r.fog=!1),Object.keys(this.userData).length>0&&(r.userData=this.userData);function i(o){const s=[];for(const a in o){const l=o[a];delete l.metadata,s.push(l)}return s}if(n){const o=i(e.textures),s=i(e.images);o.length>0&&(r.textures=o),s.length>0&&(r.images=s)}return r}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const n=e.clippingPlanes;let r=null;if(n!==null){const i=n.length;r=new Array(i);for(let o=0;o!==i;++o)r[o]=n[o].clone()}return this.clippingPlanes=r,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}const jj={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},xs={h:0,s:0,l:0},w0={h:0,s:0,l:0};function pE(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*6*(2/3-n):t}class lt{constructor(e,n,r){return this.isColor=!0,this.r=1,this.g=1,this.b=1,n===void 0&&r===void 0?this.set(e):this.setRGB(e,n,r)}set(e){return e&&e.isColor?this.copy(e):typeof e=="number"?this.setHex(e):typeof e=="string"&&this.setStyle(e),this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,n=Es){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Gi.toWorkingColorSpace(this,n),this}setRGB(e,n,r,i=Gi.workingColorSpace){return this.r=e,this.g=n,this.b=r,Gi.toWorkingColorSpace(this,i),this}setHSL(e,n,r,i=Gi.workingColorSpace){if(e=KO(e,1),n=Mr(n,0,1),r=Mr(r,0,1),n===0)this.r=this.g=this.b=r;else{const o=r<=.5?r*(1+n):r+n-r*n,s=2*r-o;this.r=pE(s,o,e+1/3),this.g=pE(s,o,e),this.b=pE(s,o,e-1/3)}return Gi.toWorkingColorSpace(this,i),this}setStyle(e,n=Es){function r(o){o!==void 0&&parseFloat(o)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(e)){let o;const s=i[1],a=i[2];switch(s){case"rgb":case"rgba":if(o=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return this.r=Math.min(255,parseInt(o[1],10))/255,this.g=Math.min(255,parseInt(o[2],10))/255,this.b=Math.min(255,parseInt(o[3],10))/255,Gi.toWorkingColorSpace(this,n),r(o[4]),this;if(o=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return this.r=Math.min(100,parseInt(o[1],10))/100,this.g=Math.min(100,parseInt(o[2],10))/100,this.b=Math.min(100,parseInt(o[3],10))/100,Gi.toWorkingColorSpace(this,n),r(o[4]),this;break;case"hsl":case"hsla":if(o=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a)){const l=parseFloat(o[1])/360,c=parseFloat(o[2])/100,u=parseFloat(o[3])/100;return r(o[4]),this.setHSL(l,c,u,n)}break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){const o=i[1],s=o.length;if(s===3)return this.setRGB(parseInt(o.charAt(0),16)/15,parseInt(o.charAt(1),16)/15,parseInt(o.charAt(2),16)/15,n);if(s===6)return this.setHex(parseInt(o,16),n);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,n);return this}setColorName(e,n=Es){const r=jj[e.toLowerCase()];return r!==void 0?this.setHex(r,n):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Hf(e.r),this.g=Hf(e.g),this.b=Hf(e.b),this}copyLinearToSRGB(e){return this.r=nE(e.r),this.g=nE(e.g),this.b=nE(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Es){return Gi.fromWorkingColorSpace(Ri.copy(this),e),Mr(Ri.r*255,0,255)<<16^Mr(Ri.g*255,0,255)<<8^Mr(Ri.b*255,0,255)<<0}getHexString(e=Es){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,n=Gi.workingColorSpace){Gi.fromWorkingColorSpace(Ri.copy(this),n);const r=Ri.r,i=Ri.g,o=Ri.b,s=Math.max(r,i,o),a=Math.min(r,i,o);let l,c;const u=(a+s)/2;if(a===s)l=0,c=0;else{const d=s-a;switch(c=u<=.5?d/(s+a):d/(2-s-a),s){case r:l=(i-o)/d+(i>-c-14,r[l|256]=1024>>-c-14|32768,i[l]=-c-1,i[l|256]=-c-1):c<=15?(r[l]=c+15<<10,r[l|256]=c+15<<10|32768,i[l]=13,i[l|256]=13):c<128?(r[l]=31744,r[l|256]=64512,i[l]=24,i[l|256]=24):(r[l]=31744,r[l|256]=64512,i[l]=13,i[l|256]=13)}const o=new Uint32Array(2048),s=new Uint32Array(64),a=new Uint32Array(64);for(let l=1;l<1024;++l){let c=l<<13,u=0;for(;!(c&8388608);)c<<=1,u-=8388608;c&=-8388609,u+=947912704,o[l]=c|u}for(let l=1024;l<2048;++l)o[l]=939524096+(l-1024<<13);for(let l=1;l<31;++l)s[l]=l<<23;s[31]=1199570944,s[32]=2147483648;for(let l=33;l<63;++l)s[l]=2147483648+(l-32<<23);s[63]=3347054592;for(let l=1;l<64;++l)l!==32&&(a[l]=1024);return{floatView:e,uint32View:n,baseTable:r,shiftTable:i,mantissaTable:o,exponentTable:s,offsetTable:a}}function so(t){Math.abs(t)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),t=Mr(t,-65504,65504),Ja.floatView[0]=t;const e=Ja.uint32View[0],n=e>>23&511;return Ja.baseTable[n]+((e&8388607)>>Ja.shiftTable[n])}function Xp(t){const e=t>>10;return Ja.uint32View[0]=Ja.mantissaTable[Ja.offsetTable[e]+(t&1023)]+Ja.exponentTable[e],Ja.floatView[0]}const Tu={toHalfFloat:so,fromHalfFloat:Xp},Fr=new Z,S0=new Ee;class Mn{constructor(e,n,r=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=n,this.count=e!==void 0?e.length/n:0,this.normalized=r,this.usage=Qm,this.updateRange={offset:0,count:-1},this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this}copyAt(e,n,r){e*=this.itemSize,r*=n.itemSize;for(let i=0,o=this.itemSize;i0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};const n=this.index;n!==null&&(e.data.index={type:n.array.constructor.name,array:Array.prototype.slice.call(n.array)});const r=this.attributes;for(const l in r){const c=r[l];e.data.attributes[l]=c.toJSON(e.data)}const i={};let o=!1;for(const l in this.morphAttributes){const c=this.morphAttributes[l],u=[];for(let d=0,f=c.length;d0&&(i[l]=u,o=!0)}o&&(e.data.morphAttributes=i,e.data.morphTargetsRelative=this.morphTargetsRelative);const s=this.groups;s.length>0&&(e.data.groups=JSON.parse(JSON.stringify(s)));const a=this.boundingSphere;return a!==null&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const n={};this.name=e.name;const r=e.index;r!==null&&this.setIndex(r.clone(n));const i=e.attributes;for(const c in i){const u=i[c];this.setAttribute(c,u.clone(n))}const o=e.morphAttributes;for(const c in o){const u=[],d=o[c];for(let f=0,h=d.length;f0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=i.length;o(e.far-e.near)**2))||(G3.copy(o).invert(),ra.copy(e.ray).applyMatrix4(G3),r.boundingBox!==null&&ra.intersectsBox(r.boundingBox)===!1))return;let s;const a=r.index,l=r.attributes.position,c=r.attributes.uv,u=r.attributes.uv2,d=r.attributes.normal,f=r.groups,h=r.drawRange;if(a!==null)if(Array.isArray(i))for(let g=0,y=f.length;gn.far?null:{distance:c,point:O0.clone(),object:t}}function R0(t,e,n,r,i,o,s,a,l,c){t.getVertexPosition(a,Nd),t.getVertexPosition(l,Fd),t.getVertexPosition(c,zd);const u=Wne(t,e,n,r,Nd,Fd,zd,T0);if(u){i&&(E0.fromBufferAttribute(i,a),P0.fromBufferAttribute(i,l),C0.fromBufferAttribute(i,c),u.uv=lo.getInterpolation(T0,Nd,Fd,zd,E0,P0,C0,new Ee)),o&&(E0.fromBufferAttribute(o,a),P0.fromBufferAttribute(o,l),C0.fromBufferAttribute(o,c),u.uv2=lo.getInterpolation(T0,Nd,Fd,zd,E0,P0,C0,new Ee)),s&&(Y3.fromBufferAttribute(s,a),X3.fromBufferAttribute(s,l),Z3.fromBufferAttribute(s,c),u.normal=lo.getInterpolation(T0,Nd,Fd,zd,Y3,X3,Z3,new Z),u.normal.dot(r.direction)>0&&u.normal.multiplyScalar(-1));const d={a,b:l,c,normal:new Z,materialIndex:0};lo.getNormal(Nd,Fd,zd,d.normal),u.face=d}return u}class Dc extends Jt{constructor(e=1,n=1,r=1,i=1,o=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:n,depth:r,widthSegments:i,heightSegments:o,depthSegments:s};const a=this;i=Math.floor(i),o=Math.floor(o),s=Math.floor(s);const l=[],c=[],u=[],d=[];let f=0,h=0;g("z","y","x",-1,-1,r,n,e,s,o,0),g("z","y","x",1,-1,r,n,-e,s,o,1),g("x","z","y",1,1,e,r,n,i,s,2),g("x","z","y",1,-1,e,r,-n,i,s,3),g("x","y","z",1,-1,e,n,r,i,o,4),g("x","y","z",-1,-1,e,n,-r,i,o,5),this.setIndex(l),this.setAttribute("position",new Et(c,3)),this.setAttribute("normal",new Et(u,3)),this.setAttribute("uv",new Et(d,2));function g(y,_,v,x,w,S,E,C,O,R,T){const A=S/O,F=E/R,N=S/2,U=E/2,k=C/2,z=O+1,G=R+1;let W=0,B=0;const j=new Z;for(let $=0;$0?1:-1,u.push(j.x,j.y,j.z),d.push(K/O),d.push(1-$/R),W+=1}}for(let $=0;$0&&(n.defines=this.defines),n.vertexShader=this.vertexShader,n.fragmentShader=this.fragmentShader;const r={};for(const i in this.extensions)this.extensions[i]===!0&&(r[i]=!0);return Object.keys(r).length>0&&(n.extensions=r),n}}class vh extends Dn{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new rt,this.projectionMatrix=new rt,this.projectionMatrixInverse=new rt}copy(e,n){return super.copy(e,n),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const n=this.matrixWorld.elements;return e.set(-n[8],-n[9],-n[10]).normalize()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,n){super.updateWorldMatrix(e,n),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}class or extends vh{constructor(e=50,n=1,r=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=r,this.far=i,this.focus=10,this.aspect=n,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const n=.5*this.getFilmHeight()/e;this.fov=th*2*Math.atan(n),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(Fu*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return th*2*Math.atan(Math.tan(Fu*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,n,r,i,o,s){this.aspect=e/n,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=r,this.view.offsetY=i,this.view.width=o,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let n=e*Math.tan(Fu*.5*this.fov)/this.zoom,r=2*n,i=this.aspect*r,o=-.5*i;const s=this.view;if(this.view!==null&&this.view.enabled){const l=s.fullWidth,c=s.fullHeight;o+=s.offsetX*i/l,n-=s.offsetY*r/c,i*=s.width/l,r*=s.height/c}const a=this.filmOffset;a!==0&&(o+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(o,o+i,n,n-r,e,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.fov=this.fov,n.object.zoom=this.zoom,n.object.near=this.near,n.object.far=this.far,n.object.focus=this.focus,n.object.aspect=this.aspect,this.view!==null&&(n.object.view=Object.assign({},this.view)),n.object.filmGauge=this.filmGauge,n.object.filmOffset=this.filmOffset,n}}const Ud=-90,Bd=1;class tR extends Dn{constructor(e,n,r){super(),this.type="CubeCamera",this.renderTarget=r;const i=new or(Ud,Bd,e,n);i.layers=this.layers,i.up.set(0,1,0),i.lookAt(1,0,0),this.add(i);const o=new or(Ud,Bd,e,n);o.layers=this.layers,o.up.set(0,1,0),o.lookAt(-1,0,0),this.add(o);const s=new or(Ud,Bd,e,n);s.layers=this.layers,s.up.set(0,0,-1),s.lookAt(0,1,0),this.add(s);const a=new or(Ud,Bd,e,n);a.layers=this.layers,a.up.set(0,0,1),a.lookAt(0,-1,0),this.add(a);const l=new or(Ud,Bd,e,n);l.layers=this.layers,l.up.set(0,1,0),l.lookAt(0,0,1),this.add(l);const c=new or(Ud,Bd,e,n);c.layers=this.layers,c.up.set(0,1,0),c.lookAt(0,0,-1),this.add(c)}update(e,n){this.parent===null&&this.updateMatrixWorld();const r=this.renderTarget,[i,o,s,a,l,c]=this.children,u=e.getRenderTarget(),d=e.toneMapping,f=e.xr.enabled;e.toneMapping=ks,e.xr.enabled=!1;const h=r.texture.generateMipmaps;r.texture.generateMipmaps=!1,e.setRenderTarget(r,0),e.render(n,i),e.setRenderTarget(r,1),e.render(n,o),e.setRenderTarget(r,2),e.render(n,s),e.setRenderTarget(r,3),e.render(n,a),e.setRenderTarget(r,4),e.render(n,l),r.texture.generateMipmaps=h,e.setRenderTarget(r,5),e.render(n,c),e.setRenderTarget(u),e.toneMapping=d,e.xr.enabled=f,r.texture.needsPMREMUpdate=!0}}class Pg extends qn{constructor(e,n,r,i,o,s,a,l,c,u){e=e!==void 0?e:[],n=n!==void 0?n:fl,super(e,n,r,i,o,s,a,l,c,u),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class Cg extends gn{constructor(e=1,n={}){super(e,e,n),this.isWebGLCubeRenderTarget=!0;const r={width:e,height:e,depth:1},i=[r,r,r,r,r,r];this.texture=new Pg(i,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=n.generateMipmaps!==void 0?n.generateMipmaps:!1,this.texture.minFilter=n.minFilter!==void 0?n.minFilter:Dt}fromEquirectangularTexture(e,n){this.texture.type=n.type,this.texture.encoding=n.encoding,this.texture.generateMipmaps=n.generateMipmaps,this.texture.minFilter=n.minFilter,this.texture.magFilter=n.magFilter;const r={uniforms:{tEquirect:{value:null}},vertexShader:` +}`;class sn extends jr{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=Xne,this.fragmentShader=Zne,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,e!==void 0&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=nh(e.uniforms),this.uniformsGroups=Yne(e.uniformsGroups),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}toJSON(e){const n=super.toJSON(e);n.glslVersion=this.glslVersion,n.uniforms={};for(const i in this.uniforms){const s=this.uniforms[i].value;s&&s.isTexture?n.uniforms[i]={type:"t",value:s.toJSON(e).uuid}:s&&s.isColor?n.uniforms[i]={type:"c",value:s.getHex()}:s&&s.isVector2?n.uniforms[i]={type:"v2",value:s.toArray()}:s&&s.isVector3?n.uniforms[i]={type:"v3",value:s.toArray()}:s&&s.isVector4?n.uniforms[i]={type:"v4",value:s.toArray()}:s&&s.isMatrix3?n.uniforms[i]={type:"m3",value:s.toArray()}:s&&s.isMatrix4?n.uniforms[i]={type:"m4",value:s.toArray()}:n.uniforms[i]={value:s}}Object.keys(this.defines).length>0&&(n.defines=this.defines),n.vertexShader=this.vertexShader,n.fragmentShader=this.fragmentShader;const r={};for(const i in this.extensions)this.extensions[i]===!0&&(r[i]=!0);return Object.keys(r).length>0&&(n.extensions=r),n}}class vh extends Dn{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new rt,this.projectionMatrix=new rt,this.projectionMatrixInverse=new rt}copy(e,n){return super.copy(e,n),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const n=this.matrixWorld.elements;return e.set(-n[8],-n[9],-n[10]).normalize()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,n){super.updateWorldMatrix(e,n),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}class or extends vh{constructor(e=50,n=1,r=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=r,this.far=i,this.focus=10,this.aspect=n,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const n=.5*this.getFilmHeight()/e;this.fov=th*2*Math.atan(n),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(Fu*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return th*2*Math.atan(Math.tan(Fu*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,n,r,i,o,s){this.aspect=e/n,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=r,this.view.offsetY=i,this.view.width=o,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let n=e*Math.tan(Fu*.5*this.fov)/this.zoom,r=2*n,i=this.aspect*r,o=-.5*i;const s=this.view;if(this.view!==null&&this.view.enabled){const l=s.fullWidth,c=s.fullHeight;o+=s.offsetX*i/l,n-=s.offsetY*r/c,i*=s.width/l,r*=s.height/c}const a=this.filmOffset;a!==0&&(o+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(o,o+i,n,n-r,e,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.fov=this.fov,n.object.zoom=this.zoom,n.object.near=this.near,n.object.far=this.far,n.object.focus=this.focus,n.object.aspect=this.aspect,this.view!==null&&(n.object.view=Object.assign({},this.view)),n.object.filmGauge=this.filmGauge,n.object.filmOffset=this.filmOffset,n}}const Ud=-90,Bd=1;class tR extends Dn{constructor(e,n,r){super(),this.type="CubeCamera",this.renderTarget=r;const i=new or(Ud,Bd,e,n);i.layers=this.layers,i.up.set(0,1,0),i.lookAt(1,0,0),this.add(i);const o=new or(Ud,Bd,e,n);o.layers=this.layers,o.up.set(0,1,0),o.lookAt(-1,0,0),this.add(o);const s=new or(Ud,Bd,e,n);s.layers=this.layers,s.up.set(0,0,-1),s.lookAt(0,1,0),this.add(s);const a=new or(Ud,Bd,e,n);a.layers=this.layers,a.up.set(0,0,1),a.lookAt(0,-1,0),this.add(a);const l=new or(Ud,Bd,e,n);l.layers=this.layers,l.up.set(0,1,0),l.lookAt(0,0,1),this.add(l);const c=new or(Ud,Bd,e,n);c.layers=this.layers,c.up.set(0,1,0),c.lookAt(0,0,-1),this.add(c)}update(e,n){this.parent===null&&this.updateMatrixWorld();const r=this.renderTarget,[i,o,s,a,l,c]=this.children,u=e.getRenderTarget(),d=e.toneMapping,f=e.xr.enabled;e.toneMapping=ks,e.xr.enabled=!1;const h=r.texture.generateMipmaps;r.texture.generateMipmaps=!1,e.setRenderTarget(r,0),e.render(n,i),e.setRenderTarget(r,1),e.render(n,o),e.setRenderTarget(r,2),e.render(n,s),e.setRenderTarget(r,3),e.render(n,a),e.setRenderTarget(r,4),e.render(n,l),r.texture.generateMipmaps=h,e.setRenderTarget(r,5),e.render(n,c),e.setRenderTarget(u),e.toneMapping=d,e.xr.enabled=f,r.texture.needsPMREMUpdate=!0}}class Pg extends qn{constructor(e,n,r,i,o,s,a,l,c,u){e=e!==void 0?e:[],n=n!==void 0?n:fl,super(e,n,r,i,o,s,a,l,c,u),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class Cg extends gn{constructor(e=1,n={}){super(e,e,n),this.isWebGLCubeRenderTarget=!0;const r={width:e,height:e,depth:1},i=[r,r,r,r,r,r];this.texture=new Pg(i,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=n.generateMipmaps!==void 0?n.generateMipmaps:!1,this.texture.minFilter=n.minFilter!==void 0?n.minFilter:Dt}fromEquirectangularTexture(e,n){this.texture.type=n.type,this.texture.encoding=n.encoding,this.texture.generateMipmaps=n.generateMipmaps,this.texture.minFilter=n.minFilter,this.texture.magFilter=n.magFilter;const r={uniforms:{tEquirect:{value:null}},vertexShader:` varying vec3 vWorldDirection; @@ -80,28 +80,28 @@ Error generating stack: `+o.message+` gl_FragColor = texture2D( tEquirect, sampleUV ); } - `},i=new Dc(5,5,5),o=new sn({name:"CubemapFromEquirect",uniforms:nh(r.uniforms),vertexShader:r.vertexShader,fragmentShader:r.fragmentShader,side:Vr,blending:lr});o.uniforms.tEquirect.value=n;const s=new Er(i,o),a=n.minFilter;return n.minFilter===xc&&(n.minFilter=Dt),new tR(1,10,this).update(e,s),n.minFilter=a,s.geometry.dispose(),s.material.dispose(),this}clear(e,n,r,i){const o=e.getRenderTarget();for(let s=0;s<6;s++)e.setRenderTarget(this,s),e.clear(n,r,i);e.setRenderTarget(o)}}const vE=new Z,Zne=new Z,qne=new mn;class ha{constructor(e=new Z(1,0,0),n=0){this.isPlane=!0,this.normal=e,this.constant=n}set(e,n){return this.normal.copy(e),this.constant=n,this}setComponents(e,n,r,i){return this.normal.set(e,n,r),this.constant=i,this}setFromNormalAndCoplanarPoint(e,n){return this.normal.copy(e),this.constant=-n.dot(this.normal),this}setFromCoplanarPoints(e,n,r){const i=vE.subVectors(r,n).cross(Zne.subVectors(e,n)).normalize();return this.setFromNormalAndCoplanarPoint(i,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,n){return n.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,n){const r=e.delta(vE),i=this.normal.dot(r);if(i===0)return this.distanceToPoint(e.start)===0?n.copy(e.start):null;const o=-(e.start.dot(this.normal)+this.constant)/i;return o<0||o>1?null:n.copy(e.start).addScaledVector(r,o)}intersectsLine(e){const n=this.distanceToPoint(e.start),r=this.distanceToPoint(e.end);return n<0&&r>0||r<0&&n>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,n){const r=n||qne.getNormalMatrix(e),i=this.coplanarPoint(vE).applyMatrix4(e),o=this.normal.applyMatrix3(r).normalize();return this.constant=-i.dot(o),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const Kc=new mo,A0=new Z;class xS{constructor(e=new ha,n=new ha,r=new ha,i=new ha,o=new ha,s=new ha){this.planes=[e,n,r,i,o,s]}set(e,n,r,i,o,s){const a=this.planes;return a[0].copy(e),a[1].copy(n),a[2].copy(r),a[3].copy(i),a[4].copy(o),a[5].copy(s),this}copy(e){const n=this.planes;for(let r=0;r<6;r++)n[r].copy(e.planes[r]);return this}setFromProjectionMatrix(e){const n=this.planes,r=e.elements,i=r[0],o=r[1],s=r[2],a=r[3],l=r[4],c=r[5],u=r[6],d=r[7],f=r[8],h=r[9],g=r[10],y=r[11],_=r[12],v=r[13],x=r[14],w=r[15];return n[0].setComponents(a-i,d-l,y-f,w-_).normalize(),n[1].setComponents(a+i,d+l,y+f,w+_).normalize(),n[2].setComponents(a+o,d+c,y+h,w+v).normalize(),n[3].setComponents(a-o,d-c,y-h,w-v).normalize(),n[4].setComponents(a-s,d-u,y-g,w-x).normalize(),n[5].setComponents(a+s,d+u,y+g,w+x).normalize(),this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),Kc.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const n=e.geometry;n.boundingSphere===null&&n.computeBoundingSphere(),Kc.copy(n.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Kc)}intersectsSprite(e){return Kc.center.set(0,0,0),Kc.radius=.7071067811865476,Kc.applyMatrix4(e.matrixWorld),this.intersectsSphere(Kc)}intersectsSphere(e){const n=this.planes,r=e.center,i=-e.radius;for(let o=0;o<6;o++)if(n[o].distanceToPoint(r)0?e.max.x:e.min.x,A0.y=i.normal.y>0?e.max.y:e.min.y,A0.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint(A0)<0)return!1}return!0}containsPoint(e){const n=this.planes;for(let r=0;r<6;r++)if(n[r].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function $j(){let t=null,e=!1,n=null,r=null;function i(o,s){n(o,s),r=t.requestAnimationFrame(i)}return{start:function(){e!==!0&&n!==null&&(r=t.requestAnimationFrame(i),e=!0)},stop:function(){t.cancelAnimationFrame(r),e=!1},setAnimationLoop:function(o){n=o},setContext:function(o){t=o}}}function Kne(t,e){const n=e.isWebGL2,r=new WeakMap;function i(c,u){const d=c.array,f=c.usage,h=t.createBuffer();t.bindBuffer(u,h),t.bufferData(u,d,f),c.onUploadCallback();let g;if(d instanceof Float32Array)g=5126;else if(d instanceof Uint16Array)if(c.isFloat16BufferAttribute)if(n)g=5131;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else g=5123;else if(d instanceof Int16Array)g=5122;else if(d instanceof Uint32Array)g=5125;else if(d instanceof Int32Array)g=5124;else if(d instanceof Int8Array)g=5120;else if(d instanceof Uint8Array)g=5121;else if(d instanceof Uint8ClampedArray)g=5121;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+d);return{buffer:h,type:g,bytesPerElement:d.BYTES_PER_ELEMENT,version:c.version}}function o(c,u,d){const f=u.array,h=u.updateRange;t.bindBuffer(d,c),h.count===-1?t.bufferSubData(d,0,f):(n?t.bufferSubData(d,h.offset*f.BYTES_PER_ELEMENT,f,h.offset,h.count):t.bufferSubData(d,h.offset*f.BYTES_PER_ELEMENT,f.subarray(h.offset,h.offset+h.count)),h.count=-1),u.onUploadCallback()}function s(c){return c.isInterleavedBufferAttribute&&(c=c.data),r.get(c)}function a(c){c.isInterleavedBufferAttribute&&(c=c.data);const u=r.get(c);u&&(t.deleteBuffer(u.buffer),r.delete(c))}function l(c,u){if(c.isGLBufferAttribute){const f=r.get(c);(!f||f.version1?null:n.copy(e.start).addScaledVector(r,o)}intersectsLine(e){const n=this.distanceToPoint(e.start),r=this.distanceToPoint(e.end);return n<0&&r>0||r<0&&n>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,n){const r=n||Kne.getNormalMatrix(e),i=this.coplanarPoint(vE).applyMatrix4(e),o=this.normal.applyMatrix3(r).normalize();return this.constant=-i.dot(o),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const Kc=new mo,A0=new Z;class xS{constructor(e=new ha,n=new ha,r=new ha,i=new ha,o=new ha,s=new ha){this.planes=[e,n,r,i,o,s]}set(e,n,r,i,o,s){const a=this.planes;return a[0].copy(e),a[1].copy(n),a[2].copy(r),a[3].copy(i),a[4].copy(o),a[5].copy(s),this}copy(e){const n=this.planes;for(let r=0;r<6;r++)n[r].copy(e.planes[r]);return this}setFromProjectionMatrix(e){const n=this.planes,r=e.elements,i=r[0],o=r[1],s=r[2],a=r[3],l=r[4],c=r[5],u=r[6],d=r[7],f=r[8],h=r[9],g=r[10],y=r[11],_=r[12],v=r[13],x=r[14],w=r[15];return n[0].setComponents(a-i,d-l,y-f,w-_).normalize(),n[1].setComponents(a+i,d+l,y+f,w+_).normalize(),n[2].setComponents(a+o,d+c,y+h,w+v).normalize(),n[3].setComponents(a-o,d-c,y-h,w-v).normalize(),n[4].setComponents(a-s,d-u,y-g,w-x).normalize(),n[5].setComponents(a+s,d+u,y+g,w+x).normalize(),this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),Kc.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const n=e.geometry;n.boundingSphere===null&&n.computeBoundingSphere(),Kc.copy(n.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Kc)}intersectsSprite(e){return Kc.center.set(0,0,0),Kc.radius=.7071067811865476,Kc.applyMatrix4(e.matrixWorld),this.intersectsSphere(Kc)}intersectsSphere(e){const n=this.planes,r=e.center,i=-e.radius;for(let o=0;o<6;o++)if(n[o].distanceToPoint(r)0?e.max.x:e.min.x,A0.y=i.normal.y>0?e.max.y:e.min.y,A0.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint(A0)<0)return!1}return!0}containsPoint(e){const n=this.planes;for(let r=0;r<6;r++)if(n[r].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function Gj(){let t=null,e=!1,n=null,r=null;function i(o,s){n(o,s),r=t.requestAnimationFrame(i)}return{start:function(){e!==!0&&n!==null&&(r=t.requestAnimationFrame(i),e=!0)},stop:function(){t.cancelAnimationFrame(r),e=!1},setAnimationLoop:function(o){n=o},setContext:function(o){t=o}}}function Qne(t,e){const n=e.isWebGL2,r=new WeakMap;function i(c,u){const d=c.array,f=c.usage,h=t.createBuffer();t.bindBuffer(u,h),t.bufferData(u,d,f),c.onUploadCallback();let g;if(d instanceof Float32Array)g=5126;else if(d instanceof Uint16Array)if(c.isFloat16BufferAttribute)if(n)g=5131;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else g=5123;else if(d instanceof Int16Array)g=5122;else if(d instanceof Uint32Array)g=5125;else if(d instanceof Int32Array)g=5124;else if(d instanceof Int8Array)g=5120;else if(d instanceof Uint8Array)g=5121;else if(d instanceof Uint8ClampedArray)g=5121;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+d);return{buffer:h,type:g,bytesPerElement:d.BYTES_PER_ELEMENT,version:c.version}}function o(c,u,d){const f=u.array,h=u.updateRange;t.bindBuffer(d,c),h.count===-1?t.bufferSubData(d,0,f):(n?t.bufferSubData(d,h.offset*f.BYTES_PER_ELEMENT,f,h.offset,h.count):t.bufferSubData(d,h.offset*f.BYTES_PER_ELEMENT,f.subarray(h.offset,h.offset+h.count)),h.count=-1),u.onUploadCallback()}function s(c){return c.isInterleavedBufferAttribute&&(c=c.data),r.get(c)}function a(c){c.isInterleavedBufferAttribute&&(c=c.data);const u=r.get(c);u&&(t.deleteBuffer(u.buffer),r.delete(c))}function l(c,u){if(c.isGLBufferAttribute){const f=r.get(c);(!f||f.version 0 +#endif`,ure=`#if NUM_CLIPPING_PLANES > 0 vec4 plane; #pragma unroll_loop_start for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { @@ -218,26 +218,26 @@ vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in ve #pragma unroll_loop_end if ( clipped ) discard; #endif -#endif`,ure=`#if NUM_CLIPPING_PLANES > 0 - varying vec3 vClipPosition; - uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; #endif`,dre=`#if NUM_CLIPPING_PLANES > 0 varying vec3 vClipPosition; + uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; #endif`,fre=`#if NUM_CLIPPING_PLANES > 0 + varying vec3 vClipPosition; +#endif`,hre=`#if NUM_CLIPPING_PLANES > 0 vClipPosition = - mvPosition.xyz; -#endif`,hre=`#if defined( USE_COLOR_ALPHA ) +#endif`,pre=`#if defined( USE_COLOR_ALPHA ) diffuseColor *= vColor; #elif defined( USE_COLOR ) diffuseColor.rgb *= vColor; -#endif`,pre=`#if defined( USE_COLOR_ALPHA ) +#endif`,mre=`#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) varying vec3 vColor; -#endif`,mre=`#if defined( USE_COLOR_ALPHA ) +#endif`,gre=`#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) varying vec3 vColor; -#endif`,gre=`#if defined( USE_COLOR_ALPHA ) +#endif`,vre=`#if defined( USE_COLOR_ALPHA ) vColor = vec4( 1.0 ); #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) vColor = vec3( 1.0 ); @@ -247,7 +247,7 @@ vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in ve #endif #ifdef USE_INSTANCING_COLOR vColor.xyz *= instanceColor.xyz; -#endif`,vre=`#define PI 3.141592653589793 +#endif`,yre=`#define PI 3.141592653589793 #define PI2 6.283185307179586 #define PI_HALF 1.5707963267948966 #define RECIPROCAL_PI 0.3183098861837907 @@ -330,7 +330,7 @@ vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); -} // validated`,yre=`#ifdef ENVMAP_TYPE_CUBE_UV +} // validated`,_re=`#ifdef ENVMAP_TYPE_CUBE_UV #define cubeUV_minMipLevel 4.0 #define cubeUV_minTileSize 16.0 float getFace( vec3 direction ) { @@ -428,7 +428,7 @@ float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { return vec4( mix( color0, color1, mipF ), 1.0 ); } } -#endif`,_re=`vec3 transformedNormal = objectNormal; +#endif`,xre=`vec3 transformedNormal = objectNormal; #ifdef USE_INSTANCING mat3 m = mat3( instanceMatrix ); transformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) ); @@ -443,23 +443,23 @@ transformedNormal = normalMatrix * transformedNormal; #ifdef FLIP_SIDED transformedTangent = - transformedTangent; #endif -#endif`,xre=`#ifdef USE_DISPLACEMENTMAP +#endif`,wre=`#ifdef USE_DISPLACEMENTMAP uniform sampler2D displacementMap; uniform float displacementScale; uniform float displacementBias; -#endif`,wre=`#ifdef USE_DISPLACEMENTMAP +#endif`,Sre=`#ifdef USE_DISPLACEMENTMAP transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias ); -#endif`,Sre=`#ifdef USE_EMISSIVEMAP +#endif`,bre=`#ifdef USE_EMISSIVEMAP vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); totalEmissiveRadiance *= emissiveColor.rgb; -#endif`,bre=`#ifdef USE_EMISSIVEMAP +#endif`,Mre=`#ifdef USE_EMISSIVEMAP uniform sampler2D emissiveMap; -#endif`,Mre="gl_FragColor = linearToOutputTexel( gl_FragColor );",Ere=`vec4 LinearToLinear( in vec4 value ) { +#endif`,Ere="gl_FragColor = linearToOutputTexel( gl_FragColor );",Pre=`vec4 LinearToLinear( in vec4 value ) { return value; } vec4 LinearTosRGB( in vec4 value ) { return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a ); -}`,Pre=`#ifdef USE_ENVMAP +}`,Cre=`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vec3 cameraToFrag; if ( isOrthographic ) { @@ -488,7 +488,7 @@ vec4 LinearTosRGB( in vec4 value ) { #elif defined( ENVMAP_BLENDING_ADD ) outgoingLight += envColor.xyz * specularStrength * reflectivity; #endif -#endif`,Cre=`#ifdef USE_ENVMAP +#endif`,Tre=`#ifdef USE_ENVMAP uniform float envMapIntensity; uniform float flipEnvMap; #ifdef ENVMAP_TYPE_CUBE @@ -496,8 +496,8 @@ vec4 LinearTosRGB( in vec4 value ) { #else uniform sampler2D envMap; #endif - -#endif`,Tre=`#ifdef USE_ENVMAP + +#endif`,Ore=`#ifdef USE_ENVMAP uniform float reflectivity; #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) #define ENV_WORLDPOS @@ -508,18 +508,18 @@ vec4 LinearTosRGB( in vec4 value ) { #else varying vec3 vReflect; #endif -#endif`,Ore=`#ifdef USE_ENVMAP +#endif`,Rre=`#ifdef USE_ENVMAP #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) #define ENV_WORLDPOS #endif #ifdef ENV_WORLDPOS - + varying vec3 vWorldPosition; #else varying vec3 vReflect; uniform float refractionRatio; #endif -#endif`,Rre=`#ifdef USE_ENVMAP +#endif`,Are=`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vWorldPosition = worldPosition.xyz; #else @@ -536,18 +536,18 @@ vec4 LinearTosRGB( in vec4 value ) { vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); #endif #endif -#endif`,Are=`#ifdef USE_FOG - vFogDepth = - mvPosition.z; #endif`,Dre=`#ifdef USE_FOG - varying float vFogDepth; + vFogDepth = - mvPosition.z; #endif`,Ire=`#ifdef USE_FOG + varying float vFogDepth; +#endif`,Lre=`#ifdef USE_FOG #ifdef FOG_EXP2 float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); #else float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); #endif gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); -#endif`,Lre=`#ifdef USE_FOG +#endif`,kre=`#ifdef USE_FOG uniform vec3 fogColor; varying float vFogDepth; #ifdef FOG_EXP2 @@ -556,7 +556,7 @@ vec4 LinearTosRGB( in vec4 value ) { uniform float fogNear; uniform float fogFar; #endif -#endif`,kre=`#ifdef USE_GRADIENTMAP +#endif`,Nre=`#ifdef USE_GRADIENTMAP uniform sampler2D gradientMap; #endif vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { @@ -568,16 +568,16 @@ vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { vec2 fw = fwidth( coord ) * 0.5; return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) ); #endif -}`,Nre=`#ifdef USE_LIGHTMAP +}`,Fre=`#ifdef USE_LIGHTMAP vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; reflectedLight.indirectDiffuse += lightMapIrradiance; -#endif`,Fre=`#ifdef USE_LIGHTMAP +#endif`,zre=`#ifdef USE_LIGHTMAP uniform sampler2D lightMap; uniform float lightMapIntensity; -#endif`,zre=`LambertMaterial material; +#endif`,Ure=`LambertMaterial material; material.diffuseColor = diffuseColor.rgb; -material.specularStrength = specularStrength;`,Ure=`varying vec3 vViewPosition; +material.specularStrength = specularStrength;`,Bre=`varying vec3 vViewPosition; struct LambertMaterial { vec3 diffuseColor; float specularStrength; @@ -591,7 +591,7 @@ void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in GeometricCon reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_Lambert -#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,Bre=`uniform bool receiveShadow; +#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,Hre=`uniform bool receiveShadow; uniform vec3 ambientLightColor; uniform vec3 lightProbe[ 9 ]; vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) { @@ -712,7 +712,7 @@ float getSpotAttenuation( const in float coneCosine, const in float penumbraCosi vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); return irradiance; } -#endif`,Hre=`#if defined( USE_ENVMAP ) +#endif`,Vre=`#if defined( USE_ENVMAP ) vec3 getIBLIrradiance( const in vec3 normal ) { #if defined( ENVMAP_TYPE_CUBE_UV ) vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); @@ -733,8 +733,8 @@ float getSpotAttenuation( const in float coneCosine, const in float penumbraCosi return vec3( 0.0 ); #endif } -#endif`,Vre=`ToonMaterial material; -material.diffuseColor = diffuseColor.rgb;`,jre=`varying vec3 vViewPosition; +#endif`,jre=`ToonMaterial material; +material.diffuseColor = diffuseColor.rgb;`,$re=`varying vec3 vViewPosition; struct ToonMaterial { vec3 diffuseColor; }; @@ -746,11 +746,11 @@ void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContex reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_Toon -#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,$re=`BlinnPhongMaterial material; +#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,Gre=`BlinnPhongMaterial material; material.diffuseColor = diffuseColor.rgb; material.specularColor = specular; material.specularShininess = shininess; -material.specularStrength = specularStrength;`,Gre=`varying vec3 vViewPosition; +material.specularStrength = specularStrength;`,Wre=`varying vec3 vViewPosition; struct BlinnPhongMaterial { vec3 diffuseColor; vec3 specularColor; @@ -767,7 +767,7 @@ void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in Geometric reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_BlinnPhong -#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,Wre=`PhysicalMaterial material; +#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,Yre=`PhysicalMaterial material; material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); vec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) ); float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); @@ -831,7 +831,7 @@ material.roughness = min( material.roughness, 1.0 ); #ifdef USE_SHEEN_ROUGHNESSMAP material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a; #endif -#endif`,Yre=`struct PhysicalMaterial { +#endif`,Xre=`struct PhysicalMaterial { vec3 diffuseColor; float roughness; vec3 specularColor; @@ -1097,7 +1097,7 @@ void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradia #define RE_IndirectSpecular RE_IndirectSpecular_Physical float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); -}`,Xre=` +}`,Zre=` GeometricContext geometry; geometry.position = - vViewPosition; geometry.normal = normal; @@ -1210,7 +1210,7 @@ IncidentLight directLight; #if defined( RE_IndirectSpecular ) vec3 radiance = vec3( 0.0 ); vec3 clearcoatRadiance = vec3( 0.0 ); -#endif`,Zre=`#if defined( RE_IndirectDiffuse ) +#endif`,qre=`#if defined( RE_IndirectDiffuse ) #ifdef USE_LIGHTMAP vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; @@ -1225,25 +1225,25 @@ IncidentLight directLight; #ifdef USE_CLEARCOAT clearcoatRadiance += getIBLRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness ); #endif -#endif`,qre=`#if defined( RE_IndirectDiffuse ) +#endif`,Kre=`#if defined( RE_IndirectDiffuse ) RE_IndirectDiffuse( irradiance, geometry, material, reflectedLight ); #endif #if defined( RE_IndirectSpecular ) RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight ); -#endif`,Kre=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) - gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; #endif`,Qre=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) + gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; +#endif`,Jre=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) uniform float logDepthBufFC; varying float vFragDepth; varying float vIsPerspective; -#endif`,Jre=`#ifdef USE_LOGDEPTHBUF +#endif`,eie=`#ifdef USE_LOGDEPTHBUF #ifdef USE_LOGDEPTHBUF_EXT varying float vFragDepth; varying float vIsPerspective; #else uniform float logDepthBufFC; #endif -#endif`,eie=`#ifdef USE_LOGDEPTHBUF +#endif`,tie=`#ifdef USE_LOGDEPTHBUF #ifdef USE_LOGDEPTHBUF_EXT vFragDepth = 1.0 + gl_Position.w; vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); @@ -1253,15 +1253,15 @@ IncidentLight directLight; gl_Position.z *= gl_Position.w; } #endif -#endif`,tie=`#ifdef USE_MAP +#endif`,nie=`#ifdef USE_MAP vec4 sampledDiffuseColor = texture2D( map, vMapUv ); #ifdef DECODE_VIDEO_TEXTURE sampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w ); #endif diffuseColor *= sampledDiffuseColor; -#endif`,nie=`#ifdef USE_MAP +#endif`,rie=`#ifdef USE_MAP uniform sampler2D map; -#endif`,rie=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) +#endif`,iie=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) #if defined( USE_POINTS_UV ) vec2 uv = vUv; #else @@ -1273,7 +1273,7 @@ IncidentLight directLight; #endif #ifdef USE_ALPHAMAP diffuseColor.a *= texture2D( alphaMap, uv ).g; -#endif`,iie=`#if defined( USE_POINTS_UV ) +#endif`,oie=`#if defined( USE_POINTS_UV ) varying vec2 vUv; #else #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) @@ -1285,13 +1285,13 @@ IncidentLight directLight; #endif #ifdef USE_ALPHAMAP uniform sampler2D alphaMap; -#endif`,oie=`float metalnessFactor = metalness; +#endif`,sie=`float metalnessFactor = metalness; #ifdef USE_METALNESSMAP vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); metalnessFactor *= texelMetalness.b; -#endif`,sie=`#ifdef USE_METALNESSMAP +#endif`,aie=`#ifdef USE_METALNESSMAP uniform sampler2D metalnessMap; -#endif`,aie=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE ) +#endif`,lie=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE ) vColor *= morphTargetBaseInfluence; for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { #if defined( USE_COLOR_ALPHA ) @@ -1300,7 +1300,7 @@ IncidentLight directLight; if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; #endif } -#endif`,lie=`#ifdef USE_MORPHNORMALS +#endif`,cie=`#ifdef USE_MORPHNORMALS objectNormal *= morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { @@ -1312,7 +1312,7 @@ IncidentLight directLight; objectNormal += morphNormal2 * morphTargetInfluences[ 2 ]; objectNormal += morphNormal3 * morphTargetInfluences[ 3 ]; #endif -#endif`,cie=`#ifdef USE_MORPHTARGETS +#endif`,uie=`#ifdef USE_MORPHTARGETS uniform float morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; @@ -1332,7 +1332,7 @@ IncidentLight directLight; uniform float morphTargetInfluences[ 4 ]; #endif #endif -#endif`,uie=`#ifdef USE_MORPHTARGETS +#endif`,die=`#ifdef USE_MORPHTARGETS transformed *= morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { @@ -1350,7 +1350,7 @@ IncidentLight directLight; transformed += morphTarget7 * morphTargetInfluences[ 7 ]; #endif #endif -#endif`,die=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; +#endif`,fie=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; #ifdef FLAT_SHADED vec3 fdx = dFdx( vViewPosition ); vec3 fdy = dFdy( vViewPosition ); @@ -1383,7 +1383,7 @@ IncidentLight directLight; tbn2[1] *= faceDirection; #endif #endif -vec3 geometryNormal = normal;`,fie=`#ifdef USE_NORMALMAP_OBJECTSPACE +vec3 geometryNormal = normal;`,hie=`#ifdef USE_NORMALMAP_OBJECTSPACE normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; #ifdef FLIP_SIDED normal = - normal; @@ -1398,25 +1398,25 @@ vec3 geometryNormal = normal;`,fie=`#ifdef USE_NORMALMAP_OBJECTSPACE normal = normalize( tbn * mapN ); #elif defined( USE_BUMPMAP ) normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); -#endif`,hie=`#ifndef FLAT_SHADED +#endif`,pie=`#ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif -#endif`,pie=`#ifndef FLAT_SHADED +#endif`,mie=`#ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif -#endif`,mie=`#ifndef FLAT_SHADED +#endif`,gie=`#ifndef FLAT_SHADED vNormal = normalize( transformedNormal ); #ifdef USE_TANGENT vTangent = normalize( transformedTangent ); vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); #endif -#endif`,gie=`#ifdef USE_NORMALMAP +#endif`,vie=`#ifdef USE_NORMALMAP uniform sampler2D normalMap; uniform vec2 normalScale; #endif @@ -1438,13 +1438,13 @@ vec3 geometryNormal = normal;`,fie=`#ifdef USE_NORMALMAP_OBJECTSPACE float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); return mat3( T * scale, B * scale, N ); } -#endif`,vie=`#ifdef USE_CLEARCOAT +#endif`,yie=`#ifdef USE_CLEARCOAT vec3 clearcoatNormal = geometryNormal; -#endif`,yie=`#ifdef USE_CLEARCOAT_NORMALMAP +#endif`,_ie=`#ifdef USE_CLEARCOAT_NORMALMAP vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; clearcoatMapN.xy *= clearcoatNormalScale; clearcoatNormal = normalize( tbn2 * clearcoatMapN ); -#endif`,_ie=`#ifdef USE_CLEARCOATMAP +#endif`,xie=`#ifdef USE_CLEARCOATMAP uniform sampler2D clearcoatMap; #endif #ifdef USE_CLEARCOAT_NORMALMAP @@ -1453,18 +1453,18 @@ vec3 geometryNormal = normal;`,fie=`#ifdef USE_NORMALMAP_OBJECTSPACE #endif #ifdef USE_CLEARCOAT_ROUGHNESSMAP uniform sampler2D clearcoatRoughnessMap; -#endif`,xie=`#ifdef USE_IRIDESCENCEMAP +#endif`,wie=`#ifdef USE_IRIDESCENCEMAP uniform sampler2D iridescenceMap; #endif #ifdef USE_IRIDESCENCE_THICKNESSMAP uniform sampler2D iridescenceThicknessMap; -#endif`,wie=`#ifdef OPAQUE +#endif`,Sie=`#ifdef OPAQUE diffuseColor.a = 1.0; #endif #ifdef USE_TRANSMISSION diffuseColor.a *= material.transmissionAlpha + 0.1; #endif -gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,Sie=`vec3 packNormalToRGB( const in vec3 normal ) { +gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,bie=`vec3 packNormalToRGB( const in vec3 normal ) { return normalize( normal ) * 0.5 + 0.5; } vec3 unpackRGBToNormal( const in vec3 rgb ) { @@ -1505,29 +1505,29 @@ float viewZToPerspectiveDepth( const in float viewZ, const in float near, const } float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) { return ( near * far ) / ( ( far - near ) * depth - far ); -}`,bie=`#ifdef PREMULTIPLIED_ALPHA +}`,Mie=`#ifdef PREMULTIPLIED_ALPHA gl_FragColor.rgb *= gl_FragColor.a; -#endif`,Mie=`vec4 mvPosition = vec4( transformed, 1.0 ); +#endif`,Eie=`vec4 mvPosition = vec4( transformed, 1.0 ); #ifdef USE_INSTANCING mvPosition = instanceMatrix * mvPosition; #endif mvPosition = modelViewMatrix * mvPosition; -gl_Position = projectionMatrix * mvPosition;`,Eie=`#ifdef DITHERING +gl_Position = projectionMatrix * mvPosition;`,Pie=`#ifdef DITHERING gl_FragColor.rgb = dithering( gl_FragColor.rgb ); -#endif`,Pie=`#ifdef DITHERING +#endif`,Cie=`#ifdef DITHERING vec3 dithering( vec3 color ) { float grid_position = rand( gl_FragCoord.xy ); vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); return color + dither_shift_RGB; } -#endif`,Cie=`float roughnessFactor = roughness; +#endif`,Tie=`float roughnessFactor = roughness; #ifdef USE_ROUGHNESSMAP vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); roughnessFactor *= texelRoughness.g; -#endif`,Tie=`#ifdef USE_ROUGHNESSMAP +#endif`,Oie=`#ifdef USE_ROUGHNESSMAP uniform sampler2D roughnessMap; -#endif`,Oie=`#if NUM_SPOT_LIGHT_COORDS > 0 +#endif`,Rie=`#if NUM_SPOT_LIGHT_COORDS > 0 varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; #endif #if NUM_SPOT_LIGHT_MAPS > 0 @@ -1704,7 +1704,7 @@ gl_Position = projectionMatrix * mvPosition;`,Eie=`#ifdef DITHERING return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); #endif } -#endif`,Rie=`#if NUM_SPOT_LIGHT_COORDS > 0 +#endif`,Aie=`#if NUM_SPOT_LIGHT_COORDS > 0 uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; #endif @@ -1742,7 +1742,7 @@ gl_Position = projectionMatrix * mvPosition;`,Eie=`#ifdef DITHERING }; uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; #endif -#endif`,Aie=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) +#endif`,Die=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); vec4 shadowWorldPosition; #endif @@ -1774,7 +1774,7 @@ gl_Position = projectionMatrix * mvPosition;`,Eie=`#ifdef DITHERING vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; } #pragma unroll_loop_end -#endif`,Die=`float getShadowMask() { +#endif`,Iie=`float getShadowMask() { float shadow = 1.0; #ifdef USE_SHADOWMAP #if NUM_DIR_LIGHT_SHADOWS > 0 @@ -1806,12 +1806,12 @@ gl_Position = projectionMatrix * mvPosition;`,Eie=`#ifdef DITHERING #endif #endif return shadow; -}`,Iie=`#ifdef USE_SKINNING +}`,Lie=`#ifdef USE_SKINNING mat4 boneMatX = getBoneMatrix( skinIndex.x ); mat4 boneMatY = getBoneMatrix( skinIndex.y ); mat4 boneMatZ = getBoneMatrix( skinIndex.z ); mat4 boneMatW = getBoneMatrix( skinIndex.w ); -#endif`,Lie=`#ifdef USE_SKINNING +#endif`,kie=`#ifdef USE_SKINNING uniform mat4 bindMatrix; uniform mat4 bindMatrixInverse; uniform highp sampler2D boneTexture; @@ -1830,7 +1830,7 @@ gl_Position = projectionMatrix * mvPosition;`,Eie=`#ifdef DITHERING mat4 bone = mat4( v1, v2, v3, v4 ); return bone; } -#endif`,kie=`#ifdef USE_SKINNING +#endif`,Nie=`#ifdef USE_SKINNING vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); vec4 skinned = vec4( 0.0 ); skinned += boneMatX * skinVertex * skinWeight.x; @@ -1838,7 +1838,7 @@ gl_Position = projectionMatrix * mvPosition;`,Eie=`#ifdef DITHERING skinned += boneMatZ * skinVertex * skinWeight.z; skinned += boneMatW * skinVertex * skinWeight.w; transformed = ( bindMatrixInverse * skinned ).xyz; -#endif`,Nie=`#ifdef USE_SKINNING +#endif`,Fie=`#ifdef USE_SKINNING mat4 skinMatrix = mat4( 0.0 ); skinMatrix += skinWeight.x * boneMatX; skinMatrix += skinWeight.y * boneMatY; @@ -1849,17 +1849,17 @@ gl_Position = projectionMatrix * mvPosition;`,Eie=`#ifdef DITHERING #ifdef USE_TANGENT objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; #endif -#endif`,Fie=`float specularStrength; +#endif`,zie=`float specularStrength; #ifdef USE_SPECULARMAP vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); specularStrength = texelSpecular.r; #else specularStrength = 1.0; -#endif`,zie=`#ifdef USE_SPECULARMAP +#endif`,Uie=`#ifdef USE_SPECULARMAP uniform sampler2D specularMap; -#endif`,Uie=`#if defined( TONE_MAPPING ) +#endif`,Bie=`#if defined( TONE_MAPPING ) gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); -#endif`,Bie=`#ifndef saturate +#endif`,Hie=`#ifndef saturate #define saturate( a ) clamp( a, 0.0, 1.0 ) #endif uniform float toneMappingExposure; @@ -1895,7 +1895,7 @@ vec3 ACESFilmicToneMapping( vec3 color ) { color = ACESOutputMat * color; return saturate( color ); } -vec3 CustomToneMapping( vec3 color ) { return color; }`,Hie=`#ifdef USE_TRANSMISSION +vec3 CustomToneMapping( vec3 color ) { return color; }`,Vie=`#ifdef USE_TRANSMISSION material.transmission = transmission; material.transmissionAlpha = 1.0; material.thickness = thickness; @@ -1916,7 +1916,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,Hie=`#ifdef USE_TRANSMIS material.attenuationColor, material.attenuationDistance ); material.transmissionAlpha = mix( material.transmissionAlpha, transmission.a, material.transmission ); totalDiffuse = mix( totalDiffuse, transmission.rgb, material.transmission ); -#endif`,Vie=`#ifdef USE_TRANSMISSION +#endif`,jie=`#ifdef USE_TRANSMISSION uniform float transmission; uniform float thickness; uniform float attenuationDistance; @@ -1970,7 +1970,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,Hie=`#ifdef USE_TRANSMIS vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; - + vec2 lodFudge = pow( 1.95, lod ) / fullSize; return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) + g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) ); @@ -2023,7 +2023,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,Hie=`#ifdef USE_TRANSMIS vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness ); return vec4( ( 1.0 - F ) * attenuatedColor * diffuseColor, transmittedLight.a ); } -#endif`,jie=`#ifdef USE_UV +#endif`,$ie=`#ifdef USE_UV varying vec2 vUv; #endif #ifdef USE_MAP @@ -2090,7 +2090,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,Hie=`#ifdef USE_TRANSMIS #ifdef USE_THICKNESSMAP uniform mat3 thicknessMapTransform; varying vec2 vThicknessMapUv; -#endif`,$ie=`#ifdef USE_UV +#endif`,Gie=`#ifdef USE_UV varying vec2 vUv; #endif #ifdef USE_UV2 @@ -2183,7 +2183,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,Hie=`#ifdef USE_TRANSMIS #ifdef USE_THICKNESSMAP uniform mat3 thicknessMapTransform; varying vec2 vThicknessMapUv; -#endif`,Gie=`#ifdef USE_UV +#endif`,Wie=`#ifdef USE_UV vUv = vec3( uv, 1 ).xy; #endif #ifdef USE_MAP @@ -2251,18 +2251,18 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,Hie=`#ifdef USE_TRANSMIS #endif #ifdef USE_THICKNESSMAP vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; -#endif`,Wie=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 +#endif`,Yie=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 vec4 worldPosition = vec4( transformed, 1.0 ); #ifdef USE_INSTANCING worldPosition = instanceMatrix * worldPosition; #endif worldPosition = modelMatrix * worldPosition; -#endif`;const Yie=`varying vec2 vUv; +#endif`;const Xie=`varying vec2 vUv; uniform mat3 uvTransform; void main() { vUv = ( uvTransform * vec3( uv, 1 ) ).xy; gl_Position = vec4( position.xy, 1.0, 1.0 ); -}`,Xie=`uniform sampler2D t2D; +}`,Zie=`uniform sampler2D t2D; uniform float backgroundIntensity; varying vec2 vUv; void main() { @@ -2274,14 +2274,14 @@ void main() { gl_FragColor = texColor; #include #include -}`,Zie=`varying vec3 vWorldDirection; +}`,qie=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; -}`,qie=`#ifdef ENVMAP_TYPE_CUBE +}`,Kie=`#ifdef ENVMAP_TYPE_CUBE uniform samplerCube envMap; #elif defined( ENVMAP_TYPE_CUBE_UV ) uniform sampler2D envMap; @@ -2303,14 +2303,14 @@ void main() { gl_FragColor = texColor; #include #include -}`,Kie=`varying vec3 vWorldDirection; +}`,Qie=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; -}`,Qie=`uniform samplerCube tCube; +}`,Jie=`uniform samplerCube tCube; uniform float tFlip; uniform float opacity; varying vec3 vWorldDirection; @@ -2320,7 +2320,7 @@ void main() { gl_FragColor.a *= opacity; #include #include -}`,Jie=`#include +}`,eoe=`#include #include #include #include @@ -2344,7 +2344,7 @@ void main() { #include #include vHighPrecisionZW = gl_Position.zw; -}`,eoe=`#if DEPTH_PACKING == 3200 +}`,toe=`#if DEPTH_PACKING == 3200 uniform float opacity; #endif #include @@ -2372,7 +2372,7 @@ void main() { #elif DEPTH_PACKING == 3201 gl_FragColor = packDepthToRGBA( fragCoordZ ); #endif -}`,toe=`#define DISTANCE +}`,noe=`#define DISTANCE varying vec3 vWorldPosition; #include #include @@ -2396,7 +2396,7 @@ void main() { #include #include vWorldPosition = worldPosition.xyz; -}`,noe=`#define DISTANCE +}`,roe=`#define DISTANCE uniform vec3 referencePosition; uniform float nearDistance; uniform float farDistance; @@ -2418,13 +2418,13 @@ void main () { dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); dist = saturate( dist ); gl_FragColor = packDepthToRGBA( dist ); -}`,roe=`varying vec3 vWorldDirection; +}`,ioe=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include -}`,ioe=`uniform sampler2D tEquirect; +}`,ooe=`uniform sampler2D tEquirect; varying vec3 vWorldDirection; #include void main() { @@ -2433,7 +2433,7 @@ void main() { gl_FragColor = texture2D( tEquirect, sampleUV ); #include #include -}`,ooe=`uniform float scale; +}`,soe=`uniform float scale; attribute float lineDistance; varying float vLineDistance; #include @@ -2454,7 +2454,7 @@ void main() { #include #include #include -}`,soe=`uniform vec3 diffuse; +}`,aoe=`uniform vec3 diffuse; uniform float opacity; uniform float dashSize; uniform float totalSize; @@ -2482,7 +2482,7 @@ void main() { #include #include #include -}`,aoe=`#include +}`,loe=`#include #include #include #include @@ -2511,7 +2511,7 @@ void main() { #include #include #include -}`,loe=`uniform vec3 diffuse; +}`,coe=`uniform vec3 diffuse; uniform float opacity; #ifndef FLAT_SHADED varying vec3 vNormal; @@ -2557,7 +2557,7 @@ void main() { #include #include #include -}`,coe=`#define LAMBERT +}`,uoe=`#define LAMBERT varying vec3 vViewPosition; #include #include @@ -2593,7 +2593,7 @@ void main() { #include #include #include -}`,uoe=`#define LAMBERT +}`,doe=`#define LAMBERT uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; @@ -2648,7 +2648,7 @@ void main() { #include #include #include -}`,doe=`#define MATCAP +}`,foe=`#define MATCAP varying vec3 vViewPosition; #include #include @@ -2679,7 +2679,7 @@ void main() { #include #include vViewPosition = - mvPosition.xyz; -}`,foe=`#define MATCAP +}`,hoe=`#define MATCAP uniform vec3 diffuse; uniform float opacity; uniform sampler2D matcap; @@ -2723,7 +2723,7 @@ void main() { #include #include #include -}`,hoe=`#define NORMAL +}`,poe=`#define NORMAL #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) varying vec3 vViewPosition; #endif @@ -2753,7 +2753,7 @@ void main() { #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) vViewPosition = - mvPosition.xyz; #endif -}`,poe=`#define NORMAL +}`,moe=`#define NORMAL uniform float opacity; #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) varying vec3 vViewPosition; @@ -2774,7 +2774,7 @@ void main() { #ifdef OPAQUE gl_FragColor.a = 1.0; #endif -}`,moe=`#define PHONG +}`,goe=`#define PHONG varying vec3 vViewPosition; #include #include @@ -2810,7 +2810,7 @@ void main() { #include #include #include -}`,goe=`#define PHONG +}`,voe=`#define PHONG uniform vec3 diffuse; uniform vec3 emissive; uniform vec3 specular; @@ -2867,7 +2867,7 @@ void main() { #include #include #include -}`,voe=`#define STANDARD +}`,yoe=`#define STANDARD varying vec3 vViewPosition; #ifdef USE_TRANSMISSION varying vec3 vWorldPosition; @@ -2907,7 +2907,7 @@ void main() { #ifdef USE_TRANSMISSION vWorldPosition = worldPosition.xyz; #endif -}`,yoe=`#define STANDARD +}`,_oe=`#define STANDARD #ifdef PHYSICAL #define IOR #define USE_SPECULAR @@ -3021,7 +3021,7 @@ void main() { #include #include #include -}`,_oe=`#define TOON +}`,xoe=`#define TOON varying vec3 vViewPosition; #include #include @@ -3055,7 +3055,7 @@ void main() { #include #include #include -}`,xoe=`#define TOON +}`,woe=`#define TOON uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; @@ -3106,7 +3106,7 @@ void main() { #include #include #include -}`,woe=`uniform float size; +}`,Soe=`uniform float size; uniform float scale; #include #include @@ -3136,7 +3136,7 @@ void main() { #include #include #include -}`,Soe=`uniform vec3 diffuse; +}`,boe=`uniform vec3 diffuse; uniform float opacity; #include #include @@ -3159,7 +3159,7 @@ void main() { #include #include #include -}`,boe=`#include +}`,Moe=`#include #include #include #include @@ -3179,7 +3179,7 @@ void main() { #include #include #include -}`,Moe=`uniform vec3 color; +}`,Eoe=`uniform vec3 color; uniform float opacity; #include #include @@ -3195,7 +3195,7 @@ void main() { #include #include #include -}`,Eoe=`uniform float rotation; +}`,Poe=`uniform float rotation; uniform vec2 center; #include #include @@ -3221,7 +3221,7 @@ void main() { #include #include #include -}`,Poe=`uniform vec3 diffuse; +}`,Coe=`uniform vec3 diffuse; uniform float opacity; #include #include @@ -3244,7 +3244,7 @@ void main() { #include #include #include -}`,Vt={alphamap_fragment:Qne,alphamap_pars_fragment:Jne,alphatest_fragment:ere,alphatest_pars_fragment:tre,aomap_fragment:nre,aomap_pars_fragment:rre,begin_vertex:ire,beginnormal_vertex:ore,bsdfs:sre,iridescence_fragment:are,bumpmap_pars_fragment:lre,clipping_planes_fragment:cre,clipping_planes_pars_fragment:ure,clipping_planes_pars_vertex:dre,clipping_planes_vertex:fre,color_fragment:hre,color_pars_fragment:pre,color_pars_vertex:mre,color_vertex:gre,common:vre,cube_uv_reflection_fragment:yre,defaultnormal_vertex:_re,displacementmap_pars_vertex:xre,displacementmap_vertex:wre,emissivemap_fragment:Sre,emissivemap_pars_fragment:bre,encodings_fragment:Mre,encodings_pars_fragment:Ere,envmap_fragment:Pre,envmap_common_pars_fragment:Cre,envmap_pars_fragment:Tre,envmap_pars_vertex:Ore,envmap_physical_pars_fragment:Hre,envmap_vertex:Rre,fog_vertex:Are,fog_pars_vertex:Dre,fog_fragment:Ire,fog_pars_fragment:Lre,gradientmap_pars_fragment:kre,lightmap_fragment:Nre,lightmap_pars_fragment:Fre,lights_lambert_fragment:zre,lights_lambert_pars_fragment:Ure,lights_pars_begin:Bre,lights_toon_fragment:Vre,lights_toon_pars_fragment:jre,lights_phong_fragment:$re,lights_phong_pars_fragment:Gre,lights_physical_fragment:Wre,lights_physical_pars_fragment:Yre,lights_fragment_begin:Xre,lights_fragment_maps:Zre,lights_fragment_end:qre,logdepthbuf_fragment:Kre,logdepthbuf_pars_fragment:Qre,logdepthbuf_pars_vertex:Jre,logdepthbuf_vertex:eie,map_fragment:tie,map_pars_fragment:nie,map_particle_fragment:rie,map_particle_pars_fragment:iie,metalnessmap_fragment:oie,metalnessmap_pars_fragment:sie,morphcolor_vertex:aie,morphnormal_vertex:lie,morphtarget_pars_vertex:cie,morphtarget_vertex:uie,normal_fragment_begin:die,normal_fragment_maps:fie,normal_pars_fragment:hie,normal_pars_vertex:pie,normal_vertex:mie,normalmap_pars_fragment:gie,clearcoat_normal_fragment_begin:vie,clearcoat_normal_fragment_maps:yie,clearcoat_pars_fragment:_ie,iridescence_pars_fragment:xie,output_fragment:wie,packing:Sie,premultiplied_alpha_fragment:bie,project_vertex:Mie,dithering_fragment:Eie,dithering_pars_fragment:Pie,roughnessmap_fragment:Cie,roughnessmap_pars_fragment:Tie,shadowmap_pars_fragment:Oie,shadowmap_pars_vertex:Rie,shadowmap_vertex:Aie,shadowmask_pars_fragment:Die,skinbase_vertex:Iie,skinning_pars_vertex:Lie,skinning_vertex:kie,skinnormal_vertex:Nie,specularmap_fragment:Fie,specularmap_pars_fragment:zie,tonemapping_fragment:Uie,tonemapping_pars_fragment:Bie,transmission_fragment:Hie,transmission_pars_fragment:Vie,uv_pars_fragment:jie,uv_pars_vertex:$ie,uv_vertex:Gie,worldpos_vertex:Wie,background_vert:Yie,background_frag:Xie,backgroundCube_vert:Zie,backgroundCube_frag:qie,cube_vert:Kie,cube_frag:Qie,depth_vert:Jie,depth_frag:eoe,distanceRGBA_vert:toe,distanceRGBA_frag:noe,equirect_vert:roe,equirect_frag:ioe,linedashed_vert:ooe,linedashed_frag:soe,meshbasic_vert:aoe,meshbasic_frag:loe,meshlambert_vert:coe,meshlambert_frag:uoe,meshmatcap_vert:doe,meshmatcap_frag:foe,meshnormal_vert:hoe,meshnormal_frag:poe,meshphong_vert:moe,meshphong_frag:goe,meshphysical_vert:voe,meshphysical_frag:yoe,meshtoon_vert:_oe,meshtoon_frag:xoe,points_vert:woe,points_frag:Soe,shadow_vert:boe,shadow_frag:Moe,sprite_vert:Eoe,sprite_frag:Poe},pt={common:{diffuse:{value:new lt(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new mn},alphaMap:{value:null},alphaMapTransform:{value:new mn},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new mn}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new mn}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new mn}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new mn},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new mn},normalScale:{value:new Ee(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new mn},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new mn}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new mn}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new mn}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new lt(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new lt(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new mn}},sprite:{diffuse:{value:new lt(16777215)},opacity:{value:1},center:{value:new Ee(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new mn},alphaMap:{value:null},alphaTest:{value:0}}},Ts={basic:{uniforms:Wi([pt.common,pt.specularmap,pt.envmap,pt.aomap,pt.lightmap,pt.fog]),vertexShader:Vt.meshbasic_vert,fragmentShader:Vt.meshbasic_frag},lambert:{uniforms:Wi([pt.common,pt.specularmap,pt.envmap,pt.aomap,pt.lightmap,pt.emissivemap,pt.bumpmap,pt.normalmap,pt.displacementmap,pt.fog,pt.lights,{emissive:{value:new lt(0)}}]),vertexShader:Vt.meshlambert_vert,fragmentShader:Vt.meshlambert_frag},phong:{uniforms:Wi([pt.common,pt.specularmap,pt.envmap,pt.aomap,pt.lightmap,pt.emissivemap,pt.bumpmap,pt.normalmap,pt.displacementmap,pt.fog,pt.lights,{emissive:{value:new lt(0)},specular:{value:new lt(1118481)},shininess:{value:30}}]),vertexShader:Vt.meshphong_vert,fragmentShader:Vt.meshphong_frag},standard:{uniforms:Wi([pt.common,pt.envmap,pt.aomap,pt.lightmap,pt.emissivemap,pt.bumpmap,pt.normalmap,pt.displacementmap,pt.roughnessmap,pt.metalnessmap,pt.fog,pt.lights,{emissive:{value:new lt(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Vt.meshphysical_vert,fragmentShader:Vt.meshphysical_frag},toon:{uniforms:Wi([pt.common,pt.aomap,pt.lightmap,pt.emissivemap,pt.bumpmap,pt.normalmap,pt.displacementmap,pt.gradientmap,pt.fog,pt.lights,{emissive:{value:new lt(0)}}]),vertexShader:Vt.meshtoon_vert,fragmentShader:Vt.meshtoon_frag},matcap:{uniforms:Wi([pt.common,pt.bumpmap,pt.normalmap,pt.displacementmap,pt.fog,{matcap:{value:null}}]),vertexShader:Vt.meshmatcap_vert,fragmentShader:Vt.meshmatcap_frag},points:{uniforms:Wi([pt.points,pt.fog]),vertexShader:Vt.points_vert,fragmentShader:Vt.points_frag},dashed:{uniforms:Wi([pt.common,pt.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Vt.linedashed_vert,fragmentShader:Vt.linedashed_frag},depth:{uniforms:Wi([pt.common,pt.displacementmap]),vertexShader:Vt.depth_vert,fragmentShader:Vt.depth_frag},normal:{uniforms:Wi([pt.common,pt.bumpmap,pt.normalmap,pt.displacementmap,{opacity:{value:1}}]),vertexShader:Vt.meshnormal_vert,fragmentShader:Vt.meshnormal_frag},sprite:{uniforms:Wi([pt.sprite,pt.fog]),vertexShader:Vt.sprite_vert,fragmentShader:Vt.sprite_frag},background:{uniforms:{uvTransform:{value:new mn},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Vt.background_vert,fragmentShader:Vt.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:Vt.backgroundCube_vert,fragmentShader:Vt.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Vt.cube_vert,fragmentShader:Vt.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Vt.equirect_vert,fragmentShader:Vt.equirect_frag},distanceRGBA:{uniforms:Wi([pt.common,pt.displacementmap,{referencePosition:{value:new Z},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Vt.distanceRGBA_vert,fragmentShader:Vt.distanceRGBA_frag},shadow:{uniforms:Wi([pt.lights,pt.fog,{color:{value:new lt(0)},opacity:{value:1}}]),vertexShader:Vt.shadow_vert,fragmentShader:Vt.shadow_frag}};Ts.physical={uniforms:Wi([Ts.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new mn},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new mn},clearcoatNormalScale:{value:new Ee(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new mn},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new mn},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new mn},sheen:{value:0},sheenColor:{value:new lt(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new mn},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new mn},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new mn},transmissionSamplerSize:{value:new Ee},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new mn},attenuationDistance:{value:0},attenuationColor:{value:new lt(0)},specularColor:{value:new lt(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new mn},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new mn}}]),vertexShader:Vt.meshphysical_vert,fragmentShader:Vt.meshphysical_frag};const D0={r:0,b:0,g:0};function Coe(t,e,n,r,i,o,s){const a=new lt(0);let l=o===!0?0:1,c,u,d=null,f=0,h=null;function g(_,v){let x=!1,w=v.isScene===!0?v.background:null;w&&w.isTexture&&(w=(v.backgroundBlurriness>0?n:e).get(w));const S=t.xr,E=S.getSession&&S.getSession();E&&E.environmentBlendMode==="additive"&&(w=null),w===null?y(a,l):w&&w.isColor&&(y(w,1),x=!0),(t.autoClear||x)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),w&&(w.isCubeTexture||w.mapping===gh)?(u===void 0&&(u=new Er(new Dc(1,1,1),new sn({name:"BackgroundCubeMaterial",uniforms:nh(Ts.backgroundCube.uniforms),vertexShader:Ts.backgroundCube.vertexShader,fragmentShader:Ts.backgroundCube.fragmentShader,side:Vr,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),u.geometry.deleteAttribute("uv"),u.onBeforeRender=function(C,O,R){this.matrixWorld.copyPosition(R.matrixWorld)},Object.defineProperty(u.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(u)),u.material.uniforms.envMap.value=w,u.material.uniforms.flipEnvMap.value=w.isCubeTexture&&w.isRenderTargetTexture===!1?-1:1,u.material.uniforms.backgroundBlurriness.value=v.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=v.backgroundIntensity,u.material.toneMapped=w.encoding!==Nn,(d!==w||f!==w.version||h!==t.toneMapping)&&(u.material.needsUpdate=!0,d=w,f=w.version,h=t.toneMapping),u.layers.enableAll(),_.unshift(u,u.geometry,u.material,0,0,null)):w&&w.isTexture&&(c===void 0&&(c=new Er(new yh(2,2),new sn({name:"BackgroundMaterial",uniforms:nh(Ts.background.uniforms),vertexShader:Ts.background.vertexShader,fragmentShader:Ts.background.fragmentShader,side:Vs,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(c)),c.material.uniforms.t2D.value=w,c.material.uniforms.backgroundIntensity.value=v.backgroundIntensity,c.material.toneMapped=w.encoding!==Nn,w.matrixAutoUpdate===!0&&w.updateMatrix(),c.material.uniforms.uvTransform.value.copy(w.matrix),(d!==w||f!==w.version||h!==t.toneMapping)&&(c.material.needsUpdate=!0,d=w,f=w.version,h=t.toneMapping),c.layers.enableAll(),_.unshift(c,c.geometry,c.material,0,0,null))}function y(_,v){_.getRGB(D0,jj(t)),r.buffers.color.setClear(D0.r,D0.g,D0.b,v,s)}return{getClearColor:function(){return a},setClearColor:function(_,v=1){a.set(_),l=v,y(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(_){l=_,y(a,l)},render:g}}function Toe(t,e,n,r){const i=t.getParameter(34921),o=r.isWebGL2?null:e.get("OES_vertex_array_object"),s=r.isWebGL2||o!==null,a={},l=_(null);let c=l,u=!1;function d(k,z,G,W,B){let j=!1;if(s){const $=y(W,G,z);c!==$&&(c=$,h(c.object)),j=v(k,W,G,B),j&&x(k,W,G,B)}else{const $=z.wireframe===!0;(c.geometry!==W.id||c.program!==G.id||c.wireframe!==$)&&(c.geometry=W.id,c.program=G.id,c.wireframe=$,j=!0)}B!==null&&n.update(B,34963),(j||u)&&(u=!1,R(k,z,G,W),B!==null&&t.bindBuffer(34963,n.get(B).buffer))}function f(){return r.isWebGL2?t.createVertexArray():o.createVertexArrayOES()}function h(k){return r.isWebGL2?t.bindVertexArray(k):o.bindVertexArrayOES(k)}function g(k){return r.isWebGL2?t.deleteVertexArray(k):o.deleteVertexArrayOES(k)}function y(k,z,G){const W=G.wireframe===!0;let B=a[k.id];B===void 0&&(B={},a[k.id]=B);let j=B[z.id];j===void 0&&(j={},B[z.id]=j);let $=j[W];return $===void 0&&($=_(f()),j[W]=$),$}function _(k){const z=[],G=[],W=[];for(let B=0;B=0){const J=B[K];let le=j[K];if(le===void 0&&(K==="instanceMatrix"&&k.instanceMatrix&&(le=k.instanceMatrix),K==="instanceColor"&&k.instanceColor&&(le=k.instanceColor)),J===void 0||J.attribute!==le||le&&J.data!==le.data)return!0;$++}return c.attributesNum!==$||c.index!==W}function x(k,z,G,W){const B={},j=z.attributes;let $=0;const q=G.getAttributes();for(const K in q)if(q[K].location>=0){let J=j[K];J===void 0&&(K==="instanceMatrix"&&k.instanceMatrix&&(J=k.instanceMatrix),K==="instanceColor"&&k.instanceColor&&(J=k.instanceColor));const le={};le.attribute=J,J&&J.data&&(le.data=J.data),B[K]=le,$++}c.attributes=B,c.attributesNum=$,c.index=W}function w(){const k=c.newAttributes;for(let z=0,G=k.length;z=0){let re=B[q];if(re===void 0&&(q==="instanceMatrix"&&k.instanceMatrix&&(re=k.instanceMatrix),q==="instanceColor"&&k.instanceColor&&(re=k.instanceColor)),re!==void 0){const J=re.normalized,le=re.itemSize,ae=n.get(re);if(ae===void 0)continue;const oe=ae.buffer,De=ae.type,Te=ae.bytesPerElement;if(re.isInterleavedBufferAttribute){const ve=re.data,we=ve.stride,me=re.offset;if(ve.isInstancedInterleavedBuffer){for(let se=0;se0&&t.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";O="mediump"}return O==="mediump"&&t.getShaderPrecisionFormat(35633,36337).precision>0&&t.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}const s=typeof WebGL2RenderingContext<"u"&&t.constructor.name==="WebGL2RenderingContext";let a=n.precision!==void 0?n.precision:"highp";const l=o(a);l!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",l,"instead."),a=l);const c=s||e.has("WEBGL_draw_buffers"),u=n.logarithmicDepthBuffer===!0,d=t.getParameter(34930),f=t.getParameter(35660),h=t.getParameter(3379),g=t.getParameter(34076),y=t.getParameter(34921),_=t.getParameter(36347),v=t.getParameter(36348),x=t.getParameter(36349),w=f>0,S=s||e.has("OES_texture_float"),E=w&&S,C=s?t.getParameter(36183):0;return{isWebGL2:s,drawBuffers:c,getMaxAnisotropy:i,getMaxPrecision:o,precision:a,logarithmicDepthBuffer:u,maxTextures:d,maxVertexTextures:f,maxTextureSize:h,maxCubemapSize:g,maxAttributes:y,maxVertexUniforms:_,maxVaryings:v,maxFragmentUniforms:x,vertexTextures:w,floatFragmentTextures:S,floatVertexTextures:E,maxSamples:C}}function Aoe(t){const e=this;let n=null,r=0,i=!1,o=!1;const s=new ha,a=new mn,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(d,f){const h=d.length!==0||f||r!==0||i;return i=f,r=d.length,h},this.beginShadows=function(){o=!0,u(null)},this.endShadows=function(){o=!1},this.setGlobalState=function(d,f){n=u(d,f,0)},this.setState=function(d,f,h){const g=d.clippingPlanes,y=d.clipIntersection,_=d.clipShadows,v=t.get(d);if(!i||g===null||g.length===0||o&&!_)o?u(null):c();else{const x=o?0:r,w=x*4;let S=v.clippingState||null;l.value=S,S=u(g,f,w,h);for(let E=0;E!==w;++E)S[E]=n[E];v.clippingState=S,this.numIntersection=y?this.numPlanes:0,this.numPlanes+=x}};function c(){l.value!==n&&(l.value=n,l.needsUpdate=r>0),e.numPlanes=r,e.numIntersection=0}function u(d,f,h,g){const y=d!==null?d.length:0;let _=null;if(y!==0){if(_=l.value,g!==!0||_===null){const v=h+y*4,x=f.matrixWorldInverse;a.getNormalMatrix(x),(_===null||_.length0){const c=new Cg(l.height/2);return c.fromEquirectangularTexture(t,s),e.set(s,c),s.addEventListener("dispose",i),n(c.texture,s.mapping)}else return null}}return s}function i(s){const a=s.target;a.removeEventListener("dispose",i);const l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function o(){e=new WeakMap}return{get:r,dispose:o}}class Ic extends vh{constructor(e=-1,n=1,r=1,i=-1,o=.1,s=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=n,this.top=r,this.bottom=i,this.near=o,this.far=s,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,n,r,i,o,s){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=r,this.view.offsetY=i,this.view.width=o,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),n=(this.top-this.bottom)/(2*this.zoom),r=(this.right+this.left)/2,i=(this.top+this.bottom)/2;let o=r-e,s=r+e,a=i+n,l=i-n;if(this.view!==null&&this.view.enabled){const c=(this.right-this.left)/this.view.fullWidth/this.zoom,u=(this.top-this.bottom)/this.view.fullHeight/this.zoom;o+=c*this.view.offsetX,s=o+c*this.view.width,a-=u*this.view.offsetY,l=a-u*this.view.height}this.projectionMatrix.makeOrthographic(o,s,a,l,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.zoom=this.zoom,n.object.left=this.left,n.object.right=this.right,n.object.top=this.top,n.object.bottom=this.bottom,n.object.near=this.near,n.object.far=this.far,this.view!==null&&(n.object.view=Object.assign({},this.view)),n}}const Of=4,q3=[.125,.215,.35,.446,.526,.582],gu=20,yE=new Ic,K3=new lt;let _E=null;const fu=(1+Math.sqrt(5))/2,Hd=1/fu,Q3=[new Z(1,1,1),new Z(-1,1,1),new Z(1,1,-1),new Z(-1,1,-1),new Z(0,fu,Hd),new Z(0,fu,-Hd),new Z(Hd,0,fu),new Z(-Hd,0,fu),new Z(fu,Hd,0),new Z(-fu,Hd,0)];class Sx{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,n=0,r=.1,i=100){_E=this._renderer.getRenderTarget(),this._setSize(256);const o=this._allocateTargets();return o.depthBuffer=!0,this._sceneToCubeUV(e,r,i,o),n>0&&this._blur(o,0,0,n),this._applyPMREM(o),this._cleanup(o),o}fromEquirectangular(e,n=null){return this._fromTexture(e,n)}fromCubemap(e,n=null){return this._fromTexture(e,n)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=tL(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=eL(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e2?w:0,w,w),u.setRenderTarget(i),y&&u.render(g,a),u.render(e,a)}g.geometry.dispose(),g.material.dispose(),u.toneMapping=f,u.autoClear=d,e.background=_}_textureToCubeUV(e,n){const r=this._renderer,i=e.mapping===fl||e.mapping===_c;i?(this._cubemapMaterial===null&&(this._cubemapMaterial=tL()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=eL());const o=i?this._cubemapMaterial:this._equirectMaterial,s=new Er(this._lodPlanes[0],o),a=o.uniforms;a.envMap.value=e;const l=this._cubeSize;I0(n,0,0,3*l,2*l),r.setRenderTarget(n),r.render(s,yE)}_applyPMREM(e){const n=this._renderer,r=n.autoClear;n.autoClear=!1;for(let i=1;igu&&console.warn(`sigmaRadians, ${o}, is too large and will clip, as it requested ${_} samples when the maximum is set to ${gu}`);const v=[];let x=0;for(let O=0;Ow-Of?i-w+Of:0),C=4*(this._cubeSize-S);I0(n,E,C,3*S,2*S),l.setRenderTarget(n),l.render(d,yE)}}function Ioe(t){const e=[],n=[],r=[];let i=t;const o=t-Of+1+q3.length;for(let s=0;st-Of?l=q3[s-t+Of-1]:s===0&&(l=0),r.push(l);const c=1/(a-2),u=-c,d=1+c,f=[u,u,d,u,d,d,u,u,d,d,u,d],h=6,g=6,y=3,_=2,v=1,x=new Float32Array(y*g*h),w=new Float32Array(_*g*h),S=new Float32Array(v*g*h);for(let C=0;C2?0:-1,T=[O,R,0,O+2/3,R,0,O+2/3,R+1,0,O,R,0,O+2/3,R+1,0,O,R+1,0];x.set(T,y*g*C),w.set(f,_*g*C);const A=[C,C,C,C,C,C];S.set(A,v*g*C)}const E=new Jt;E.setAttribute("position",new Mn(x,y)),E.setAttribute("uv",new Mn(w,_)),E.setAttribute("faceIndex",new Mn(S,v)),e.push(E),i>Of&&i--}return{lodPlanes:e,sizeLods:n,sigmas:r}}function J3(t,e,n){const r=new gn(t,e,n);return r.texture.mapping=gh,r.texture.name="PMREM.cubeUv",r.scissorTest=!0,r}function I0(t,e,n,r,i){t.viewport.set(e,n,r,i),t.scissor.set(e,n,r,i)}function Loe(t,e,n){const r=new Float32Array(gu),i=new Z(0,1,0);return new sn({name:"SphericalGaussianBlur",defines:{n:gu,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${t}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:r},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:nR(),fragmentShader:` +}`,Vt={alphamap_fragment:Jne,alphamap_pars_fragment:ere,alphatest_fragment:tre,alphatest_pars_fragment:nre,aomap_fragment:rre,aomap_pars_fragment:ire,begin_vertex:ore,beginnormal_vertex:sre,bsdfs:are,iridescence_fragment:lre,bumpmap_pars_fragment:cre,clipping_planes_fragment:ure,clipping_planes_pars_fragment:dre,clipping_planes_pars_vertex:fre,clipping_planes_vertex:hre,color_fragment:pre,color_pars_fragment:mre,color_pars_vertex:gre,color_vertex:vre,common:yre,cube_uv_reflection_fragment:_re,defaultnormal_vertex:xre,displacementmap_pars_vertex:wre,displacementmap_vertex:Sre,emissivemap_fragment:bre,emissivemap_pars_fragment:Mre,encodings_fragment:Ere,encodings_pars_fragment:Pre,envmap_fragment:Cre,envmap_common_pars_fragment:Tre,envmap_pars_fragment:Ore,envmap_pars_vertex:Rre,envmap_physical_pars_fragment:Vre,envmap_vertex:Are,fog_vertex:Dre,fog_pars_vertex:Ire,fog_fragment:Lre,fog_pars_fragment:kre,gradientmap_pars_fragment:Nre,lightmap_fragment:Fre,lightmap_pars_fragment:zre,lights_lambert_fragment:Ure,lights_lambert_pars_fragment:Bre,lights_pars_begin:Hre,lights_toon_fragment:jre,lights_toon_pars_fragment:$re,lights_phong_fragment:Gre,lights_phong_pars_fragment:Wre,lights_physical_fragment:Yre,lights_physical_pars_fragment:Xre,lights_fragment_begin:Zre,lights_fragment_maps:qre,lights_fragment_end:Kre,logdepthbuf_fragment:Qre,logdepthbuf_pars_fragment:Jre,logdepthbuf_pars_vertex:eie,logdepthbuf_vertex:tie,map_fragment:nie,map_pars_fragment:rie,map_particle_fragment:iie,map_particle_pars_fragment:oie,metalnessmap_fragment:sie,metalnessmap_pars_fragment:aie,morphcolor_vertex:lie,morphnormal_vertex:cie,morphtarget_pars_vertex:uie,morphtarget_vertex:die,normal_fragment_begin:fie,normal_fragment_maps:hie,normal_pars_fragment:pie,normal_pars_vertex:mie,normal_vertex:gie,normalmap_pars_fragment:vie,clearcoat_normal_fragment_begin:yie,clearcoat_normal_fragment_maps:_ie,clearcoat_pars_fragment:xie,iridescence_pars_fragment:wie,output_fragment:Sie,packing:bie,premultiplied_alpha_fragment:Mie,project_vertex:Eie,dithering_fragment:Pie,dithering_pars_fragment:Cie,roughnessmap_fragment:Tie,roughnessmap_pars_fragment:Oie,shadowmap_pars_fragment:Rie,shadowmap_pars_vertex:Aie,shadowmap_vertex:Die,shadowmask_pars_fragment:Iie,skinbase_vertex:Lie,skinning_pars_vertex:kie,skinning_vertex:Nie,skinnormal_vertex:Fie,specularmap_fragment:zie,specularmap_pars_fragment:Uie,tonemapping_fragment:Bie,tonemapping_pars_fragment:Hie,transmission_fragment:Vie,transmission_pars_fragment:jie,uv_pars_fragment:$ie,uv_pars_vertex:Gie,uv_vertex:Wie,worldpos_vertex:Yie,background_vert:Xie,background_frag:Zie,backgroundCube_vert:qie,backgroundCube_frag:Kie,cube_vert:Qie,cube_frag:Jie,depth_vert:eoe,depth_frag:toe,distanceRGBA_vert:noe,distanceRGBA_frag:roe,equirect_vert:ioe,equirect_frag:ooe,linedashed_vert:soe,linedashed_frag:aoe,meshbasic_vert:loe,meshbasic_frag:coe,meshlambert_vert:uoe,meshlambert_frag:doe,meshmatcap_vert:foe,meshmatcap_frag:hoe,meshnormal_vert:poe,meshnormal_frag:moe,meshphong_vert:goe,meshphong_frag:voe,meshphysical_vert:yoe,meshphysical_frag:_oe,meshtoon_vert:xoe,meshtoon_frag:woe,points_vert:Soe,points_frag:boe,shadow_vert:Moe,shadow_frag:Eoe,sprite_vert:Poe,sprite_frag:Coe},pt={common:{diffuse:{value:new lt(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new mn},alphaMap:{value:null},alphaMapTransform:{value:new mn},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new mn}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new mn}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new mn}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new mn},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new mn},normalScale:{value:new Ee(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new mn},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new mn}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new mn}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new mn}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new lt(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new lt(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new mn}},sprite:{diffuse:{value:new lt(16777215)},opacity:{value:1},center:{value:new Ee(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new mn},alphaMap:{value:null},alphaTest:{value:0}}},Ts={basic:{uniforms:Wi([pt.common,pt.specularmap,pt.envmap,pt.aomap,pt.lightmap,pt.fog]),vertexShader:Vt.meshbasic_vert,fragmentShader:Vt.meshbasic_frag},lambert:{uniforms:Wi([pt.common,pt.specularmap,pt.envmap,pt.aomap,pt.lightmap,pt.emissivemap,pt.bumpmap,pt.normalmap,pt.displacementmap,pt.fog,pt.lights,{emissive:{value:new lt(0)}}]),vertexShader:Vt.meshlambert_vert,fragmentShader:Vt.meshlambert_frag},phong:{uniforms:Wi([pt.common,pt.specularmap,pt.envmap,pt.aomap,pt.lightmap,pt.emissivemap,pt.bumpmap,pt.normalmap,pt.displacementmap,pt.fog,pt.lights,{emissive:{value:new lt(0)},specular:{value:new lt(1118481)},shininess:{value:30}}]),vertexShader:Vt.meshphong_vert,fragmentShader:Vt.meshphong_frag},standard:{uniforms:Wi([pt.common,pt.envmap,pt.aomap,pt.lightmap,pt.emissivemap,pt.bumpmap,pt.normalmap,pt.displacementmap,pt.roughnessmap,pt.metalnessmap,pt.fog,pt.lights,{emissive:{value:new lt(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Vt.meshphysical_vert,fragmentShader:Vt.meshphysical_frag},toon:{uniforms:Wi([pt.common,pt.aomap,pt.lightmap,pt.emissivemap,pt.bumpmap,pt.normalmap,pt.displacementmap,pt.gradientmap,pt.fog,pt.lights,{emissive:{value:new lt(0)}}]),vertexShader:Vt.meshtoon_vert,fragmentShader:Vt.meshtoon_frag},matcap:{uniforms:Wi([pt.common,pt.bumpmap,pt.normalmap,pt.displacementmap,pt.fog,{matcap:{value:null}}]),vertexShader:Vt.meshmatcap_vert,fragmentShader:Vt.meshmatcap_frag},points:{uniforms:Wi([pt.points,pt.fog]),vertexShader:Vt.points_vert,fragmentShader:Vt.points_frag},dashed:{uniforms:Wi([pt.common,pt.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Vt.linedashed_vert,fragmentShader:Vt.linedashed_frag},depth:{uniforms:Wi([pt.common,pt.displacementmap]),vertexShader:Vt.depth_vert,fragmentShader:Vt.depth_frag},normal:{uniforms:Wi([pt.common,pt.bumpmap,pt.normalmap,pt.displacementmap,{opacity:{value:1}}]),vertexShader:Vt.meshnormal_vert,fragmentShader:Vt.meshnormal_frag},sprite:{uniforms:Wi([pt.sprite,pt.fog]),vertexShader:Vt.sprite_vert,fragmentShader:Vt.sprite_frag},background:{uniforms:{uvTransform:{value:new mn},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Vt.background_vert,fragmentShader:Vt.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:Vt.backgroundCube_vert,fragmentShader:Vt.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Vt.cube_vert,fragmentShader:Vt.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Vt.equirect_vert,fragmentShader:Vt.equirect_frag},distanceRGBA:{uniforms:Wi([pt.common,pt.displacementmap,{referencePosition:{value:new Z},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Vt.distanceRGBA_vert,fragmentShader:Vt.distanceRGBA_frag},shadow:{uniforms:Wi([pt.lights,pt.fog,{color:{value:new lt(0)},opacity:{value:1}}]),vertexShader:Vt.shadow_vert,fragmentShader:Vt.shadow_frag}};Ts.physical={uniforms:Wi([Ts.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new mn},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new mn},clearcoatNormalScale:{value:new Ee(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new mn},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new mn},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new mn},sheen:{value:0},sheenColor:{value:new lt(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new mn},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new mn},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new mn},transmissionSamplerSize:{value:new Ee},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new mn},attenuationDistance:{value:0},attenuationColor:{value:new lt(0)},specularColor:{value:new lt(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new mn},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new mn}}]),vertexShader:Vt.meshphysical_vert,fragmentShader:Vt.meshphysical_frag};const D0={r:0,b:0,g:0};function Toe(t,e,n,r,i,o,s){const a=new lt(0);let l=o===!0?0:1,c,u,d=null,f=0,h=null;function g(_,v){let x=!1,w=v.isScene===!0?v.background:null;w&&w.isTexture&&(w=(v.backgroundBlurriness>0?n:e).get(w));const S=t.xr,E=S.getSession&&S.getSession();E&&E.environmentBlendMode==="additive"&&(w=null),w===null?y(a,l):w&&w.isColor&&(y(w,1),x=!0),(t.autoClear||x)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),w&&(w.isCubeTexture||w.mapping===gh)?(u===void 0&&(u=new Er(new Dc(1,1,1),new sn({name:"BackgroundCubeMaterial",uniforms:nh(Ts.backgroundCube.uniforms),vertexShader:Ts.backgroundCube.vertexShader,fragmentShader:Ts.backgroundCube.fragmentShader,side:Vr,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),u.geometry.deleteAttribute("uv"),u.onBeforeRender=function(C,O,R){this.matrixWorld.copyPosition(R.matrixWorld)},Object.defineProperty(u.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(u)),u.material.uniforms.envMap.value=w,u.material.uniforms.flipEnvMap.value=w.isCubeTexture&&w.isRenderTargetTexture===!1?-1:1,u.material.uniforms.backgroundBlurriness.value=v.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=v.backgroundIntensity,u.material.toneMapped=w.encoding!==Nn,(d!==w||f!==w.version||h!==t.toneMapping)&&(u.material.needsUpdate=!0,d=w,f=w.version,h=t.toneMapping),u.layers.enableAll(),_.unshift(u,u.geometry,u.material,0,0,null)):w&&w.isTexture&&(c===void 0&&(c=new Er(new yh(2,2),new sn({name:"BackgroundMaterial",uniforms:nh(Ts.background.uniforms),vertexShader:Ts.background.vertexShader,fragmentShader:Ts.background.fragmentShader,side:Vs,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(c)),c.material.uniforms.t2D.value=w,c.material.uniforms.backgroundIntensity.value=v.backgroundIntensity,c.material.toneMapped=w.encoding!==Nn,w.matrixAutoUpdate===!0&&w.updateMatrix(),c.material.uniforms.uvTransform.value.copy(w.matrix),(d!==w||f!==w.version||h!==t.toneMapping)&&(c.material.needsUpdate=!0,d=w,f=w.version,h=t.toneMapping),c.layers.enableAll(),_.unshift(c,c.geometry,c.material,0,0,null))}function y(_,v){_.getRGB(D0,$j(t)),r.buffers.color.setClear(D0.r,D0.g,D0.b,v,s)}return{getClearColor:function(){return a},setClearColor:function(_,v=1){a.set(_),l=v,y(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(_){l=_,y(a,l)},render:g}}function Ooe(t,e,n,r){const i=t.getParameter(34921),o=r.isWebGL2?null:e.get("OES_vertex_array_object"),s=r.isWebGL2||o!==null,a={},l=_(null);let c=l,u=!1;function d(k,z,G,W,B){let j=!1;if(s){const $=y(W,G,z);c!==$&&(c=$,h(c.object)),j=v(k,W,G,B),j&&x(k,W,G,B)}else{const $=z.wireframe===!0;(c.geometry!==W.id||c.program!==G.id||c.wireframe!==$)&&(c.geometry=W.id,c.program=G.id,c.wireframe=$,j=!0)}B!==null&&n.update(B,34963),(j||u)&&(u=!1,R(k,z,G,W),B!==null&&t.bindBuffer(34963,n.get(B).buffer))}function f(){return r.isWebGL2?t.createVertexArray():o.createVertexArrayOES()}function h(k){return r.isWebGL2?t.bindVertexArray(k):o.bindVertexArrayOES(k)}function g(k){return r.isWebGL2?t.deleteVertexArray(k):o.deleteVertexArrayOES(k)}function y(k,z,G){const W=G.wireframe===!0;let B=a[k.id];B===void 0&&(B={},a[k.id]=B);let j=B[z.id];j===void 0&&(j={},B[z.id]=j);let $=j[W];return $===void 0&&($=_(f()),j[W]=$),$}function _(k){const z=[],G=[],W=[];for(let B=0;B=0){const J=B[K];let le=j[K];if(le===void 0&&(K==="instanceMatrix"&&k.instanceMatrix&&(le=k.instanceMatrix),K==="instanceColor"&&k.instanceColor&&(le=k.instanceColor)),J===void 0||J.attribute!==le||le&&J.data!==le.data)return!0;$++}return c.attributesNum!==$||c.index!==W}function x(k,z,G,W){const B={},j=z.attributes;let $=0;const q=G.getAttributes();for(const K in q)if(q[K].location>=0){let J=j[K];J===void 0&&(K==="instanceMatrix"&&k.instanceMatrix&&(J=k.instanceMatrix),K==="instanceColor"&&k.instanceColor&&(J=k.instanceColor));const le={};le.attribute=J,J&&J.data&&(le.data=J.data),B[K]=le,$++}c.attributes=B,c.attributesNum=$,c.index=W}function w(){const k=c.newAttributes;for(let z=0,G=k.length;z=0){let re=B[q];if(re===void 0&&(q==="instanceMatrix"&&k.instanceMatrix&&(re=k.instanceMatrix),q==="instanceColor"&&k.instanceColor&&(re=k.instanceColor)),re!==void 0){const J=re.normalized,le=re.itemSize,ae=n.get(re);if(ae===void 0)continue;const oe=ae.buffer,De=ae.type,Te=ae.bytesPerElement;if(re.isInterleavedBufferAttribute){const ve=re.data,we=ve.stride,me=re.offset;if(ve.isInstancedInterleavedBuffer){for(let se=0;se0&&t.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";O="mediump"}return O==="mediump"&&t.getShaderPrecisionFormat(35633,36337).precision>0&&t.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}const s=typeof WebGL2RenderingContext<"u"&&t.constructor.name==="WebGL2RenderingContext";let a=n.precision!==void 0?n.precision:"highp";const l=o(a);l!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",l,"instead."),a=l);const c=s||e.has("WEBGL_draw_buffers"),u=n.logarithmicDepthBuffer===!0,d=t.getParameter(34930),f=t.getParameter(35660),h=t.getParameter(3379),g=t.getParameter(34076),y=t.getParameter(34921),_=t.getParameter(36347),v=t.getParameter(36348),x=t.getParameter(36349),w=f>0,S=s||e.has("OES_texture_float"),E=w&&S,C=s?t.getParameter(36183):0;return{isWebGL2:s,drawBuffers:c,getMaxAnisotropy:i,getMaxPrecision:o,precision:a,logarithmicDepthBuffer:u,maxTextures:d,maxVertexTextures:f,maxTextureSize:h,maxCubemapSize:g,maxAttributes:y,maxVertexUniforms:_,maxVaryings:v,maxFragmentUniforms:x,vertexTextures:w,floatFragmentTextures:S,floatVertexTextures:E,maxSamples:C}}function Doe(t){const e=this;let n=null,r=0,i=!1,o=!1;const s=new ha,a=new mn,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(d,f){const h=d.length!==0||f||r!==0||i;return i=f,r=d.length,h},this.beginShadows=function(){o=!0,u(null)},this.endShadows=function(){o=!1},this.setGlobalState=function(d,f){n=u(d,f,0)},this.setState=function(d,f,h){const g=d.clippingPlanes,y=d.clipIntersection,_=d.clipShadows,v=t.get(d);if(!i||g===null||g.length===0||o&&!_)o?u(null):c();else{const x=o?0:r,w=x*4;let S=v.clippingState||null;l.value=S,S=u(g,f,w,h);for(let E=0;E!==w;++E)S[E]=n[E];v.clippingState=S,this.numIntersection=y?this.numPlanes:0,this.numPlanes+=x}};function c(){l.value!==n&&(l.value=n,l.needsUpdate=r>0),e.numPlanes=r,e.numIntersection=0}function u(d,f,h,g){const y=d!==null?d.length:0;let _=null;if(y!==0){if(_=l.value,g!==!0||_===null){const v=h+y*4,x=f.matrixWorldInverse;a.getNormalMatrix(x),(_===null||_.length0){const c=new Cg(l.height/2);return c.fromEquirectangularTexture(t,s),e.set(s,c),s.addEventListener("dispose",i),n(c.texture,s.mapping)}else return null}}return s}function i(s){const a=s.target;a.removeEventListener("dispose",i);const l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function o(){e=new WeakMap}return{get:r,dispose:o}}class Ic extends vh{constructor(e=-1,n=1,r=1,i=-1,o=.1,s=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=n,this.top=r,this.bottom=i,this.near=o,this.far=s,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,n,r,i,o,s){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=r,this.view.offsetY=i,this.view.width=o,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),n=(this.top-this.bottom)/(2*this.zoom),r=(this.right+this.left)/2,i=(this.top+this.bottom)/2;let o=r-e,s=r+e,a=i+n,l=i-n;if(this.view!==null&&this.view.enabled){const c=(this.right-this.left)/this.view.fullWidth/this.zoom,u=(this.top-this.bottom)/this.view.fullHeight/this.zoom;o+=c*this.view.offsetX,s=o+c*this.view.width,a-=u*this.view.offsetY,l=a-u*this.view.height}this.projectionMatrix.makeOrthographic(o,s,a,l,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.zoom=this.zoom,n.object.left=this.left,n.object.right=this.right,n.object.top=this.top,n.object.bottom=this.bottom,n.object.near=this.near,n.object.far=this.far,this.view!==null&&(n.object.view=Object.assign({},this.view)),n}}const Of=4,q3=[.125,.215,.35,.446,.526,.582],gu=20,yE=new Ic,K3=new lt;let _E=null;const fu=(1+Math.sqrt(5))/2,Hd=1/fu,Q3=[new Z(1,1,1),new Z(-1,1,1),new Z(1,1,-1),new Z(-1,1,-1),new Z(0,fu,Hd),new Z(0,fu,-Hd),new Z(Hd,0,fu),new Z(-Hd,0,fu),new Z(fu,Hd,0),new Z(-fu,Hd,0)];class Sx{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,n=0,r=.1,i=100){_E=this._renderer.getRenderTarget(),this._setSize(256);const o=this._allocateTargets();return o.depthBuffer=!0,this._sceneToCubeUV(e,r,i,o),n>0&&this._blur(o,0,0,n),this._applyPMREM(o),this._cleanup(o),o}fromEquirectangular(e,n=null){return this._fromTexture(e,n)}fromCubemap(e,n=null){return this._fromTexture(e,n)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=tL(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=eL(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e2?w:0,w,w),u.setRenderTarget(i),y&&u.render(g,a),u.render(e,a)}g.geometry.dispose(),g.material.dispose(),u.toneMapping=f,u.autoClear=d,e.background=_}_textureToCubeUV(e,n){const r=this._renderer,i=e.mapping===fl||e.mapping===_c;i?(this._cubemapMaterial===null&&(this._cubemapMaterial=tL()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=eL());const o=i?this._cubemapMaterial:this._equirectMaterial,s=new Er(this._lodPlanes[0],o),a=o.uniforms;a.envMap.value=e;const l=this._cubeSize;I0(n,0,0,3*l,2*l),r.setRenderTarget(n),r.render(s,yE)}_applyPMREM(e){const n=this._renderer,r=n.autoClear;n.autoClear=!1;for(let i=1;igu&&console.warn(`sigmaRadians, ${o}, is too large and will clip, as it requested ${_} samples when the maximum is set to ${gu}`);const v=[];let x=0;for(let O=0;Ow-Of?i-w+Of:0),C=4*(this._cubeSize-S);I0(n,E,C,3*S,2*S),l.setRenderTarget(n),l.render(d,yE)}}function Loe(t){const e=[],n=[],r=[];let i=t;const o=t-Of+1+q3.length;for(let s=0;st-Of?l=q3[s-t+Of-1]:s===0&&(l=0),r.push(l);const c=1/(a-2),u=-c,d=1+c,f=[u,u,d,u,d,d,u,u,d,d,u,d],h=6,g=6,y=3,_=2,v=1,x=new Float32Array(y*g*h),w=new Float32Array(_*g*h),S=new Float32Array(v*g*h);for(let C=0;C2?0:-1,T=[O,R,0,O+2/3,R,0,O+2/3,R+1,0,O,R,0,O+2/3,R+1,0,O,R+1,0];x.set(T,y*g*C),w.set(f,_*g*C);const A=[C,C,C,C,C,C];S.set(A,v*g*C)}const E=new Jt;E.setAttribute("position",new Mn(x,y)),E.setAttribute("uv",new Mn(w,_)),E.setAttribute("faceIndex",new Mn(S,v)),e.push(E),i>Of&&i--}return{lodPlanes:e,sizeLods:n,sigmas:r}}function J3(t,e,n){const r=new gn(t,e,n);return r.texture.mapping=gh,r.texture.name="PMREM.cubeUv",r.scissorTest=!0,r}function I0(t,e,n,r,i){t.viewport.set(e,n,r,i),t.scissor.set(e,n,r,i)}function koe(t,e,n){const r=new Float32Array(gu),i=new Z(0,1,0);return new sn({name:"SphericalGaussianBlur",defines:{n:gu,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${t}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:r},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:nR(),fragmentShader:` precision mediump float; precision mediump int; @@ -3394,28 +3394,28 @@ void main() { gl_Position = vec4( position, 1.0 ); } - `}function koe(t){let e=new WeakMap,n=null;function r(a){if(a&&a.isTexture){const l=a.mapping,c=l===Jf||l===Ym,u=l===fl||l===_c;if(c||u)if(a.isRenderTargetTexture&&a.needsPMREMUpdate===!0){a.needsPMREMUpdate=!1;let d=e.get(a);return n===null&&(n=new Sx(t)),d=c?n.fromEquirectangular(a,d):n.fromCubemap(a,d),e.set(a,d),d.texture}else{if(e.has(a))return e.get(a).texture;{const d=a.image;if(c&&d&&d.height>0||u&&d&&i(d)){n===null&&(n=new Sx(t));const f=c?n.fromEquirectangular(a):n.fromCubemap(a);return e.set(a,f),a.addEventListener("dispose",o),f.texture}else return null}}}return a}function i(a){let l=0;const c=6;for(let u=0;ue.maxTextureSize&&(F=Math.ceil(A/e.maxTextureSize),A=e.maxTextureSize);const N=new Float32Array(A*F*4*y),U=new yS(N,A,F,y);U.type=Yn,U.needsUpdate=!0;const k=T*4;for(let G=0;G0)return t;const i=e*n;let o=nL[i];if(o===void 0&&(o=new Float32Array(i),nL[i]=o),e!==0){r.toArray(o,0);for(let s=1,a=0;s!==e;++s)a+=n,t[s].toArray(o,a)}return o}function Jr(t,e){if(t.length!==e.length)return!1;for(let n=0,r=t.length;n0||u&&d&&i(d)){n===null&&(n=new Sx(t));const f=c?n.fromEquirectangular(a):n.fromCubemap(a);return e.set(a,f),a.addEventListener("dispose",o),f.texture}else return null}}}return a}function i(a){let l=0;const c=6;for(let u=0;ue.maxTextureSize&&(F=Math.ceil(A/e.maxTextureSize),A=e.maxTextureSize);const N=new Float32Array(A*F*4*y),U=new yS(N,A,F,y);U.type=Yn,U.needsUpdate=!0;const k=T*4;for(let G=0;G0)return t;const i=e*n;let o=nL[i];if(o===void 0&&(o=new Float32Array(i),nL[i]=o),e!==0){r.toArray(o,0);for(let s=1,a=0;s!==e;++s)a+=n,t[s].toArray(o,a)}return o}function Jr(t,e){if(t.length!==e.length)return!1;for(let n=0,r=t.length;n":" "} ${a}: ${n[s]}`)}return r.join(` -`)}function Nse(t){switch(t){case Oa:return["Linear","( value )"];case Nn:return["sRGB","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported encoding:",t),["Linear","( value )"]}}function cL(t,e,n){const r=t.getShaderParameter(e,35713),i=t.getShaderInfoLog(e).trim();if(r&&i==="")return"";const o=/ERROR: 0:(\d+)/.exec(i);if(o){const s=parseInt(o[1]);return n.toUpperCase()+` +`)}function Fse(t){switch(t){case Oa:return["Linear","( value )"];case Nn:return["sRGB","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported encoding:",t),["Linear","( value )"]}}function cL(t,e,n){const r=t.getShaderParameter(e,35713),i=t.getShaderInfoLog(e).trim();if(r&&i==="")return"";const o=/ERROR: 0:(\d+)/.exec(i);if(o){const s=parseInt(o[1]);return n.toUpperCase()+` `+i+` -`+kse(t.getShaderSource(e),s)}else return i}function Fse(t,e){const n=Nse(e);return"vec4 "+t+"( vec4 value ) { return LinearTo"+n[0]+n[1]+"; }"}function zse(t,e){let n;switch(e){case vj:n="Linear";break;case yj:n="Reinhard";break;case _j:n="OptimizedCineon";break;case GO:n="ACESFilmic";break;case xj:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),n="Linear"}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function Use(t){return[t.extensionDerivatives||t.envMapCubeUVHeight||t.bumpMap||t.normalMapTangentSpace||t.clearcoatNormalMap||t.flatShading||t.shaderID==="physical"?"#extension GL_OES_standard_derivatives : enable":"",(t.extensionFragDepth||t.logarithmicDepthBuffer)&&t.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",t.extensionDrawBuffers&&t.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(t.extensionShaderTextureLOD||t.envMap||t.transmission)&&t.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(Zp).join(` -`)}function Bse(t){const e=[];for(const n in t){const r=t[n];r!==!1&&e.push("#define "+n+" "+r)}return e.join(` -`)}function Hse(t,e){const n={},r=t.getProgramParameter(e,35721);for(let i=0;i/gm;function I2(t){return t.replace(Vse,jse)}function jse(t,e){const n=Vt[e];if(n===void 0)throw new Error("Can not resolve #include <"+e+">");return I2(n)}const $se=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function fL(t){return t.replace($se,Gse)}function Gse(t,e,n,r){let i="";for(let o=parseInt(e);o/gm;function L2(t){return t.replace(jse,$se)}function $se(t,e){const n=Vt[e];if(n===void 0)throw new Error("Can not resolve #include <"+e+">");return L2(n)}const Gse=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function fL(t){return t.replace(Gse,Wse)}function Wse(t,e,n,r){let i="";for(let o=parseInt(e);o0&&(_+=` `),v=[h,g].filter(Zp).join(` `),v.length>0&&(v+=` `)):(_=[hL(n),"#define SHADER_NAME "+n.shaderName,g,n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+u:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.displacementMap?"#define USE_DISPLACEMENTMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.mapUv?"#define MAP_UV "+n.mapUv:"",n.alphaMapUv?"#define ALPHAMAP_UV "+n.alphaMapUv:"",n.lightMapUv?"#define LIGHTMAP_UV "+n.lightMapUv:"",n.aoMapUv?"#define AOMAP_UV "+n.aoMapUv:"",n.emissiveMapUv?"#define EMISSIVEMAP_UV "+n.emissiveMapUv:"",n.bumpMapUv?"#define BUMPMAP_UV "+n.bumpMapUv:"",n.normalMapUv?"#define NORMALMAP_UV "+n.normalMapUv:"",n.displacementMapUv?"#define DISPLACEMENTMAP_UV "+n.displacementMapUv:"",n.metalnessMapUv?"#define METALNESSMAP_UV "+n.metalnessMapUv:"",n.roughnessMapUv?"#define ROUGHNESSMAP_UV "+n.roughnessMapUv:"",n.clearcoatMapUv?"#define CLEARCOATMAP_UV "+n.clearcoatMapUv:"",n.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+n.clearcoatNormalMapUv:"",n.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+n.clearcoatRoughnessMapUv:"",n.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+n.iridescenceMapUv:"",n.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+n.iridescenceThicknessMapUv:"",n.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+n.sheenColorMapUv:"",n.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+n.sheenRoughnessMapUv:"",n.specularMapUv?"#define SPECULARMAP_UV "+n.specularMapUv:"",n.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+n.specularColorMapUv:"",n.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+n.specularIntensityMapUv:"",n.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+n.transmissionMapUv:"",n.thicknessMapUv?"#define THICKNESSMAP_UV "+n.thicknessMapUv:"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUvs2?"#define USE_UV2":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&n.flatShading===!1?"#define USE_MORPHNORMALS":"",n.morphColors&&n.isWebGL2?"#define USE_MORPHCOLORS":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+n.morphTextureStride:"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_COUNT "+n.morphTargetsCount:"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` `].filter(Zp).join(` -`),v=[h,hL(n),"#define SHADER_NAME "+n.shaderName,g,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+c:"",n.envMap?"#define "+u:"",n.envMap?"#define "+d:"",f?"#define CUBEUV_TEXEL_WIDTH "+f.texelWidth:"",f?"#define CUBEUV_TEXEL_HEIGHT "+f.texelHeight:"",f?"#define CUBEUV_MAX_MIP "+f.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescence?"#define USE_IRIDESCENCE":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUvs2?"#define USE_UV2":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.useLegacyLights?"#define LEGACY_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==ks?"#define TONE_MAPPING":"",n.toneMapping!==ks?Vt.tonemapping_pars_fragment:"",n.toneMapping!==ks?zse("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",Vt.encodings_pars_fragment,Fse("linearToOutputTexel",n.outputEncoding),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"",` +`),v=[h,hL(n),"#define SHADER_NAME "+n.shaderName,g,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+c:"",n.envMap?"#define "+u:"",n.envMap?"#define "+d:"",f?"#define CUBEUV_TEXEL_WIDTH "+f.texelWidth:"",f?"#define CUBEUV_TEXEL_HEIGHT "+f.texelHeight:"",f?"#define CUBEUV_MAX_MIP "+f.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescence?"#define USE_IRIDESCENCE":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUvs2?"#define USE_UV2":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.useLegacyLights?"#define LEGACY_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==ks?"#define TONE_MAPPING":"",n.toneMapping!==ks?Vt.tonemapping_pars_fragment:"",n.toneMapping!==ks?Use("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",Vt.encodings_pars_fragment,zse("linearToOutputTexel",n.outputEncoding),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"",` `].filter(Zp).join(` -`)),s=I2(s),s=uL(s,n),s=dL(s,n),a=I2(a),a=uL(a,n),a=dL(a,n),s=fL(s),a=fL(a),n.isWebGL2&&n.isRawShaderMaterial!==!0&&(x=`#version 300 es +`)),s=L2(s),s=uL(s,n),s=dL(s,n),a=L2(a),a=uL(a,n),a=dL(a,n),s=fL(s),a=fL(a),n.isWebGL2&&n.isRawShaderMaterial!==!0&&(x=`#version 300 es `,_=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join(` `)+` `+_,v=["#define varying in",n.glslVersion===_x?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===_x?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(` @@ -3424,9 +3424,9 @@ precision `+t.precision+" int;";return t.precision==="highp"?e+=` Program Info Log: `+T+` `+k+` -`+z)}else T!==""?console.warn("THREE.WebGLProgram: Program Info Log:",T):(A===""||F==="")&&(U=!1);U&&(this.diagnostics={runnable:N,programLog:T,vertexShader:{log:A,prefix:_},fragmentShader:{log:F,prefix:v}})}i.deleteShader(E),i.deleteShader(C);let O;this.getUniforms=function(){return O===void 0&&(O=new A_(i,y)),O};let R;return this.getAttributes=function(){return R===void 0&&(R=Hse(i,y)),R},this.destroy=function(){r.releaseStatesOfProgram(this),i.deleteProgram(y),this.program=void 0},this.name=n.shaderName,this.id=Lse++,this.cacheKey=e,this.usedTimes=1,this.program=y,this.vertexShader=E,this.fragmentShader=C,this}let Qse=0;class Jse{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const n=e.vertexShader,r=e.fragmentShader,i=this._getShaderStage(n),o=this._getShaderStage(r),s=this._getShaderCacheForMaterial(e);return s.has(i)===!1&&(s.add(i),i.usedTimes++),s.has(o)===!1&&(s.add(o),o.usedTimes++),this}remove(e){const n=this.materialCache.get(e);for(const r of n)r.usedTimes--,r.usedTimes===0&&this.shaderCache.delete(r.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const n=this.materialCache;let r=n.get(e);return r===void 0&&(r=new Set,n.set(e,r)),r}_getShaderStage(e){const n=this.shaderCache;let r=n.get(e);return r===void 0&&(r=new eae(e),n.set(e,r)),r}}class eae{constructor(e){this.id=Qse++,this.code=e,this.usedTimes=0}}function tae(t,e,n,r,i,o,s){const a=new Uu,l=new Jse,c=[],u=i.isWebGL2,d=i.logarithmicDepthBuffer,f=i.vertexTextures;let h=i.precision;const g={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function y(T){return T===1?"uv2":"uv"}function _(T,A,F,N,U){const k=N.fog,z=U.geometry,G=T.isMeshStandardMaterial?N.environment:null,W=(T.isMeshStandardMaterial?n:e).get(T.envMap||G),B=W&&W.mapping===gh?W.image.height:null,j=g[T.type];T.precision!==null&&(h=i.getMaxPrecision(T.precision),h!==T.precision&&console.warn("THREE.WebGLProgram.getParameters:",T.precision,"not supported, using",h,"instead."));const $=z.morphAttributes.position||z.morphAttributes.normal||z.morphAttributes.color,q=$!==void 0?$.length:0;let K=0;z.morphAttributes.position!==void 0&&(K=1),z.morphAttributes.normal!==void 0&&(K=2),z.morphAttributes.color!==void 0&&(K=3);let re,J,le,ae;if(j){const st=Ts[j];re=st.vertexShader,J=st.fragmentShader}else re=T.vertexShader,J=T.fragmentShader,l.update(T),le=l.getVertexShaderID(T),ae=l.getFragmentShaderID(T);const oe=t.getRenderTarget(),De=U.isInstancedMesh===!0,Te=!!T.map,ve=!!T.matcap,we=!!W,me=!!T.aoMap,se=!!T.lightMap,de=!!T.bumpMap,ke=!!T.normalMap,Ve=!!T.displacementMap,Ze=!!T.emissiveMap,ot=!!T.metalnessMap,dt=!!T.roughnessMap,We=T.clearcoat>0,ht=T.iridescence>0,ee=T.sheen>0,Q=T.transmission>0,Pe=We&&!!T.clearcoatMap,$e=We&&!!T.clearcoatNormalMap,Ge=We&&!!T.clearcoatRoughnessMap,Ke=ht&&!!T.iridescenceMap,gt=ht&&!!T.iridescenceThicknessMap,ut=ee&&!!T.sheenColorMap,Ae=ee&&!!T.sheenRoughnessMap,vt=!!T.specularMap,xt=!!T.specularColorMap,ct=!!T.specularIntensityMap,Ie=Q&&!!T.transmissionMap,Ye=Q&&!!T.thicknessMap,Tt=!!T.gradientMap,Lt=!!T.alphaMap,Rt=T.alphaTest>0,he=!!T.extensions,ue=!!z.attributes.uv2;return{isWebGL2:u,shaderID:j,shaderName:T.type,vertexShader:re,fragmentShader:J,defines:T.defines,customVertexShaderID:le,customFragmentShaderID:ae,isRawShaderMaterial:T.isRawShaderMaterial===!0,glslVersion:T.glslVersion,precision:h,instancing:De,instancingColor:De&&U.instanceColor!==null,supportsVertexTextures:f,outputEncoding:oe===null?t.outputEncoding:oe.isXRRenderTarget===!0?oe.texture.encoding:Oa,map:Te,matcap:ve,envMap:we,envMapMode:we&&W.mapping,envMapCubeUVHeight:B,aoMap:me,lightMap:se,bumpMap:de,normalMap:ke,displacementMap:f&&Ve,emissiveMap:Ze,normalMapObjectSpace:ke&&T.normalMapType===Nj,normalMapTangentSpace:ke&&T.normalMapType===yl,decodeVideoTexture:Te&&T.map.isVideoTexture===!0&&T.map.encoding===Nn,metalnessMap:ot,roughnessMap:dt,clearcoat:We,clearcoatMap:Pe,clearcoatNormalMap:$e,clearcoatRoughnessMap:Ge,iridescence:ht,iridescenceMap:Ke,iridescenceThicknessMap:gt,sheen:ee,sheenColorMap:ut,sheenRoughnessMap:Ae,specularMap:vt,specularColorMap:xt,specularIntensityMap:ct,transmission:Q,transmissionMap:Ie,thicknessMap:Ye,gradientMap:Tt,opaque:T.transparent===!1&&T.blending===Nu,alphaMap:Lt,alphaTest:Rt,combine:T.combine,mapUv:Te&&y(T.map.channel),aoMapUv:me&&y(T.aoMap.channel),lightMapUv:se&&y(T.lightMap.channel),bumpMapUv:de&&y(T.bumpMap.channel),normalMapUv:ke&&y(T.normalMap.channel),displacementMapUv:Ve&&y(T.displacementMap.channel),emissiveMapUv:Ze&&y(T.emissiveMap.channel),metalnessMapUv:ot&&y(T.metalnessMap.channel),roughnessMapUv:dt&&y(T.roughnessMap.channel),clearcoatMapUv:Pe&&y(T.clearcoatMap.channel),clearcoatNormalMapUv:$e&&y(T.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Ge&&y(T.clearcoatRoughnessMap.channel),iridescenceMapUv:Ke&&y(T.iridescenceMap.channel),iridescenceThicknessMapUv:gt&&y(T.iridescenceThicknessMap.channel),sheenColorMapUv:ut&&y(T.sheenColorMap.channel),sheenRoughnessMapUv:Ae&&y(T.sheenRoughnessMap.channel),specularMapUv:vt&&y(T.specularMap.channel),specularColorMapUv:xt&&y(T.specularColorMap.channel),specularIntensityMapUv:ct&&y(T.specularIntensityMap.channel),transmissionMapUv:Ie&&y(T.transmissionMap.channel),thicknessMapUv:Ye&&y(T.thicknessMap.channel),alphaMapUv:Lt&&y(T.alphaMap.channel),vertexTangents:ke&&!!z.attributes.tangent,vertexColors:T.vertexColors,vertexAlphas:T.vertexColors===!0&&!!z.attributes.color&&z.attributes.color.itemSize===4,vertexUvs2:ue,pointsUvs:U.isPoints===!0&&!!z.attributes.uv&&(Te||Lt),fog:!!k,useFog:T.fog===!0,fogExp2:k&&k.isFogExp2,flatShading:T.flatShading===!0,sizeAttenuation:T.sizeAttenuation===!0,logarithmicDepthBuffer:d,skinning:U.isSkinnedMesh===!0,morphTargets:z.morphAttributes.position!==void 0,morphNormals:z.morphAttributes.normal!==void 0,morphColors:z.morphAttributes.color!==void 0,morphTargetsCount:q,morphTextureStride:K,numDirLights:A.directional.length,numPointLights:A.point.length,numSpotLights:A.spot.length,numSpotLightMaps:A.spotLightMap.length,numRectAreaLights:A.rectArea.length,numHemiLights:A.hemi.length,numDirLightShadows:A.directionalShadowMap.length,numPointLightShadows:A.pointShadowMap.length,numSpotLightShadows:A.spotShadowMap.length,numSpotLightShadowsWithMaps:A.numSpotLightShadowsWithMaps,numClippingPlanes:s.numPlanes,numClipIntersection:s.numIntersection,dithering:T.dithering,shadowMapEnabled:t.shadowMap.enabled&&F.length>0,shadowMapType:t.shadowMap.type,toneMapping:T.toneMapped?t.toneMapping:ks,useLegacyLights:t.useLegacyLights,premultipliedAlpha:T.premultipliedAlpha,doubleSided:T.side===Hr,flipSided:T.side===Vr,useDepthPacking:T.depthPacking>=0,depthPacking:T.depthPacking||0,index0AttributeName:T.index0AttributeName,extensionDerivatives:he&&T.extensions.derivatives===!0,extensionFragDepth:he&&T.extensions.fragDepth===!0,extensionDrawBuffers:he&&T.extensions.drawBuffers===!0,extensionShaderTextureLOD:he&&T.extensions.shaderTextureLOD===!0,rendererExtensionFragDepth:u||r.has("EXT_frag_depth"),rendererExtensionDrawBuffers:u||r.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:u||r.has("EXT_shader_texture_lod"),customProgramCacheKey:T.customProgramCacheKey()}}function v(T){const A=[];if(T.shaderID?A.push(T.shaderID):(A.push(T.customVertexShaderID),A.push(T.customFragmentShaderID)),T.defines!==void 0)for(const F in T.defines)A.push(F),A.push(T.defines[F]);return T.isRawShaderMaterial===!1&&(x(A,T),w(A,T),A.push(t.outputEncoding)),A.push(T.customProgramCacheKey),A.join()}function x(T,A){T.push(A.precision),T.push(A.outputEncoding),T.push(A.envMapMode),T.push(A.envMapCubeUVHeight),T.push(A.mapUv),T.push(A.alphaMapUv),T.push(A.lightMapUv),T.push(A.aoMapUv),T.push(A.bumpMapUv),T.push(A.normalMapUv),T.push(A.displacementMapUv),T.push(A.emissiveMapUv),T.push(A.metalnessMapUv),T.push(A.roughnessMapUv),T.push(A.clearcoatMapUv),T.push(A.clearcoatNormalMapUv),T.push(A.clearcoatRoughnessMapUv),T.push(A.iridescenceMapUv),T.push(A.iridescenceThicknessMapUv),T.push(A.sheenColorMapUv),T.push(A.sheenRoughnessMapUv),T.push(A.specularMapUv),T.push(A.specularColorMapUv),T.push(A.specularIntensityMapUv),T.push(A.transmissionMapUv),T.push(A.thicknessMapUv),T.push(A.combine),T.push(A.fogExp2),T.push(A.sizeAttenuation),T.push(A.morphTargetsCount),T.push(A.morphAttributeCount),T.push(A.numDirLights),T.push(A.numPointLights),T.push(A.numSpotLights),T.push(A.numSpotLightMaps),T.push(A.numHemiLights),T.push(A.numRectAreaLights),T.push(A.numDirLightShadows),T.push(A.numPointLightShadows),T.push(A.numSpotLightShadows),T.push(A.numSpotLightShadowsWithMaps),T.push(A.shadowMapType),T.push(A.toneMapping),T.push(A.numClippingPlanes),T.push(A.numClipIntersection),T.push(A.depthPacking)}function w(T,A){a.disableAll(),A.isWebGL2&&a.enable(0),A.supportsVertexTextures&&a.enable(1),A.instancing&&a.enable(2),A.instancingColor&&a.enable(3),A.matcap&&a.enable(4),A.envMap&&a.enable(5),A.normalMapObjectSpace&&a.enable(6),A.normalMapTangentSpace&&a.enable(7),A.clearcoat&&a.enable(8),A.iridescence&&a.enable(9),A.alphaTest&&a.enable(10),A.vertexColors&&a.enable(11),A.vertexAlphas&&a.enable(12),A.vertexUvs2&&a.enable(13),A.vertexTangents&&a.enable(14),T.push(a.mask),a.disableAll(),A.fog&&a.enable(0),A.useFog&&a.enable(1),A.flatShading&&a.enable(2),A.logarithmicDepthBuffer&&a.enable(3),A.skinning&&a.enable(4),A.morphTargets&&a.enable(5),A.morphNormals&&a.enable(6),A.morphColors&&a.enable(7),A.premultipliedAlpha&&a.enable(8),A.shadowMapEnabled&&a.enable(9),A.useLegacyLights&&a.enable(10),A.doubleSided&&a.enable(11),A.flipSided&&a.enable(12),A.useDepthPacking&&a.enable(13),A.dithering&&a.enable(14),A.transmission&&a.enable(15),A.sheen&&a.enable(16),A.decodeVideoTexture&&a.enable(17),A.opaque&&a.enable(18),A.pointsUvs&&a.enable(19),T.push(a.mask)}function S(T){const A=g[T.type];let F;if(A){const N=Ts[A];F=wx.clone(N.uniforms)}else F=T.uniforms;return F}function E(T,A){let F;for(let N=0,U=c.length;N0?r.push(v):h.transparent===!0?i.push(v):n.push(v)}function l(d,f,h,g,y,_){const v=s(d,f,h,g,y,_);h.transmission>0?r.unshift(v):h.transparent===!0?i.unshift(v):n.unshift(v)}function c(d,f){n.length>1&&n.sort(d||rae),r.length>1&&r.sort(f||pL),i.length>1&&i.sort(f||pL)}function u(){for(let d=e,f=t.length;d=o.length?(s=new mL,o.push(s)):s=o[i],s}function n(){t=new WeakMap}return{get:e,dispose:n}}function oae(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={direction:new Z,color:new lt};break;case"SpotLight":n={position:new Z,direction:new Z,color:new lt,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new Z,color:new lt,distance:0,decay:0};break;case"HemisphereLight":n={direction:new Z,skyColor:new lt,groundColor:new lt};break;case"RectAreaLight":n={color:new lt,position:new Z,halfWidth:new Z,halfHeight:new Z};break}return t[e.id]=n,n}}}function sae(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ee};break;case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ee};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ee,shadowCameraNear:1,shadowCameraFar:1e3};break}return t[e.id]=n,n}}}let aae=0;function lae(t,e){return(e.castShadow?2:0)-(t.castShadow?2:0)+(e.map?1:0)-(t.map?1:0)}function cae(t,e){const n=new oae,r=sae(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0};for(let u=0;u<9;u++)i.probe.push(new Z);const o=new Z,s=new rt,a=new rt;function l(u,d){let f=0,h=0,g=0;for(let F=0;F<9;F++)i.probe[F].set(0,0,0);let y=0,_=0,v=0,x=0,w=0,S=0,E=0,C=0,O=0,R=0;u.sort(lae);const T=d===!0?Math.PI:1;for(let F=0,N=u.length;F0&&(e.isWebGL2||t.has("OES_texture_float_linear")===!0?(i.rectAreaLTC1=pt.LTC_FLOAT_1,i.rectAreaLTC2=pt.LTC_FLOAT_2):t.has("OES_texture_half_float_linear")===!0?(i.rectAreaLTC1=pt.LTC_HALF_1,i.rectAreaLTC2=pt.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),i.ambient[0]=f,i.ambient[1]=h,i.ambient[2]=g;const A=i.hash;(A.directionalLength!==y||A.pointLength!==_||A.spotLength!==v||A.rectAreaLength!==x||A.hemiLength!==w||A.numDirectionalShadows!==S||A.numPointShadows!==E||A.numSpotShadows!==C||A.numSpotMaps!==O)&&(i.directional.length=y,i.spot.length=v,i.rectArea.length=x,i.point.length=_,i.hemi.length=w,i.directionalShadow.length=S,i.directionalShadowMap.length=S,i.pointShadow.length=E,i.pointShadowMap.length=E,i.spotShadow.length=C,i.spotShadowMap.length=C,i.directionalShadowMatrix.length=S,i.pointShadowMatrix.length=E,i.spotLightMatrix.length=C+O-R,i.spotLightMap.length=O,i.numSpotLightShadowsWithMaps=R,A.directionalLength=y,A.pointLength=_,A.spotLength=v,A.rectAreaLength=x,A.hemiLength=w,A.numDirectionalShadows=S,A.numPointShadows=E,A.numSpotShadows=C,A.numSpotMaps=O,i.version=aae++)}function c(u,d){let f=0,h=0,g=0,y=0,_=0;const v=d.matrixWorldInverse;for(let x=0,w=u.length;x=a.length?(l=new gL(t,e),a.push(l)):l=a[s],l}function i(){n=new WeakMap}return{get:r,dispose:i}}class SS extends jr{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=di,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class rR extends jr{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}const dae=`void main() { +`+z)}else T!==""?console.warn("THREE.WebGLProgram: Program Info Log:",T):(A===""||F==="")&&(U=!1);U&&(this.diagnostics={runnable:N,programLog:T,vertexShader:{log:A,prefix:_},fragmentShader:{log:F,prefix:v}})}i.deleteShader(E),i.deleteShader(C);let O;this.getUniforms=function(){return O===void 0&&(O=new A_(i,y)),O};let R;return this.getAttributes=function(){return R===void 0&&(R=Vse(i,y)),R},this.destroy=function(){r.releaseStatesOfProgram(this),i.deleteProgram(y),this.program=void 0},this.name=n.shaderName,this.id=kse++,this.cacheKey=e,this.usedTimes=1,this.program=y,this.vertexShader=E,this.fragmentShader=C,this}let Jse=0;class eae{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const n=e.vertexShader,r=e.fragmentShader,i=this._getShaderStage(n),o=this._getShaderStage(r),s=this._getShaderCacheForMaterial(e);return s.has(i)===!1&&(s.add(i),i.usedTimes++),s.has(o)===!1&&(s.add(o),o.usedTimes++),this}remove(e){const n=this.materialCache.get(e);for(const r of n)r.usedTimes--,r.usedTimes===0&&this.shaderCache.delete(r.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const n=this.materialCache;let r=n.get(e);return r===void 0&&(r=new Set,n.set(e,r)),r}_getShaderStage(e){const n=this.shaderCache;let r=n.get(e);return r===void 0&&(r=new tae(e),n.set(e,r)),r}}class tae{constructor(e){this.id=Jse++,this.code=e,this.usedTimes=0}}function nae(t,e,n,r,i,o,s){const a=new Uu,l=new eae,c=[],u=i.isWebGL2,d=i.logarithmicDepthBuffer,f=i.vertexTextures;let h=i.precision;const g={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function y(T){return T===1?"uv2":"uv"}function _(T,A,F,N,U){const k=N.fog,z=U.geometry,G=T.isMeshStandardMaterial?N.environment:null,W=(T.isMeshStandardMaterial?n:e).get(T.envMap||G),B=W&&W.mapping===gh?W.image.height:null,j=g[T.type];T.precision!==null&&(h=i.getMaxPrecision(T.precision),h!==T.precision&&console.warn("THREE.WebGLProgram.getParameters:",T.precision,"not supported, using",h,"instead."));const $=z.morphAttributes.position||z.morphAttributes.normal||z.morphAttributes.color,q=$!==void 0?$.length:0;let K=0;z.morphAttributes.position!==void 0&&(K=1),z.morphAttributes.normal!==void 0&&(K=2),z.morphAttributes.color!==void 0&&(K=3);let re,J,le,ae;if(j){const st=Ts[j];re=st.vertexShader,J=st.fragmentShader}else re=T.vertexShader,J=T.fragmentShader,l.update(T),le=l.getVertexShaderID(T),ae=l.getFragmentShaderID(T);const oe=t.getRenderTarget(),De=U.isInstancedMesh===!0,Te=!!T.map,ve=!!T.matcap,we=!!W,me=!!T.aoMap,se=!!T.lightMap,de=!!T.bumpMap,ke=!!T.normalMap,Ve=!!T.displacementMap,Ze=!!T.emissiveMap,ot=!!T.metalnessMap,dt=!!T.roughnessMap,We=T.clearcoat>0,ht=T.iridescence>0,ee=T.sheen>0,Q=T.transmission>0,Pe=We&&!!T.clearcoatMap,$e=We&&!!T.clearcoatNormalMap,Ge=We&&!!T.clearcoatRoughnessMap,Ke=ht&&!!T.iridescenceMap,gt=ht&&!!T.iridescenceThicknessMap,ut=ee&&!!T.sheenColorMap,Ae=ee&&!!T.sheenRoughnessMap,vt=!!T.specularMap,xt=!!T.specularColorMap,ct=!!T.specularIntensityMap,Ie=Q&&!!T.transmissionMap,Ye=Q&&!!T.thicknessMap,Tt=!!T.gradientMap,Lt=!!T.alphaMap,Rt=T.alphaTest>0,he=!!T.extensions,ue=!!z.attributes.uv2;return{isWebGL2:u,shaderID:j,shaderName:T.type,vertexShader:re,fragmentShader:J,defines:T.defines,customVertexShaderID:le,customFragmentShaderID:ae,isRawShaderMaterial:T.isRawShaderMaterial===!0,glslVersion:T.glslVersion,precision:h,instancing:De,instancingColor:De&&U.instanceColor!==null,supportsVertexTextures:f,outputEncoding:oe===null?t.outputEncoding:oe.isXRRenderTarget===!0?oe.texture.encoding:Oa,map:Te,matcap:ve,envMap:we,envMapMode:we&&W.mapping,envMapCubeUVHeight:B,aoMap:me,lightMap:se,bumpMap:de,normalMap:ke,displacementMap:f&&Ve,emissiveMap:Ze,normalMapObjectSpace:ke&&T.normalMapType===Fj,normalMapTangentSpace:ke&&T.normalMapType===yl,decodeVideoTexture:Te&&T.map.isVideoTexture===!0&&T.map.encoding===Nn,metalnessMap:ot,roughnessMap:dt,clearcoat:We,clearcoatMap:Pe,clearcoatNormalMap:$e,clearcoatRoughnessMap:Ge,iridescence:ht,iridescenceMap:Ke,iridescenceThicknessMap:gt,sheen:ee,sheenColorMap:ut,sheenRoughnessMap:Ae,specularMap:vt,specularColorMap:xt,specularIntensityMap:ct,transmission:Q,transmissionMap:Ie,thicknessMap:Ye,gradientMap:Tt,opaque:T.transparent===!1&&T.blending===Nu,alphaMap:Lt,alphaTest:Rt,combine:T.combine,mapUv:Te&&y(T.map.channel),aoMapUv:me&&y(T.aoMap.channel),lightMapUv:se&&y(T.lightMap.channel),bumpMapUv:de&&y(T.bumpMap.channel),normalMapUv:ke&&y(T.normalMap.channel),displacementMapUv:Ve&&y(T.displacementMap.channel),emissiveMapUv:Ze&&y(T.emissiveMap.channel),metalnessMapUv:ot&&y(T.metalnessMap.channel),roughnessMapUv:dt&&y(T.roughnessMap.channel),clearcoatMapUv:Pe&&y(T.clearcoatMap.channel),clearcoatNormalMapUv:$e&&y(T.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Ge&&y(T.clearcoatRoughnessMap.channel),iridescenceMapUv:Ke&&y(T.iridescenceMap.channel),iridescenceThicknessMapUv:gt&&y(T.iridescenceThicknessMap.channel),sheenColorMapUv:ut&&y(T.sheenColorMap.channel),sheenRoughnessMapUv:Ae&&y(T.sheenRoughnessMap.channel),specularMapUv:vt&&y(T.specularMap.channel),specularColorMapUv:xt&&y(T.specularColorMap.channel),specularIntensityMapUv:ct&&y(T.specularIntensityMap.channel),transmissionMapUv:Ie&&y(T.transmissionMap.channel),thicknessMapUv:Ye&&y(T.thicknessMap.channel),alphaMapUv:Lt&&y(T.alphaMap.channel),vertexTangents:ke&&!!z.attributes.tangent,vertexColors:T.vertexColors,vertexAlphas:T.vertexColors===!0&&!!z.attributes.color&&z.attributes.color.itemSize===4,vertexUvs2:ue,pointsUvs:U.isPoints===!0&&!!z.attributes.uv&&(Te||Lt),fog:!!k,useFog:T.fog===!0,fogExp2:k&&k.isFogExp2,flatShading:T.flatShading===!0,sizeAttenuation:T.sizeAttenuation===!0,logarithmicDepthBuffer:d,skinning:U.isSkinnedMesh===!0,morphTargets:z.morphAttributes.position!==void 0,morphNormals:z.morphAttributes.normal!==void 0,morphColors:z.morphAttributes.color!==void 0,morphTargetsCount:q,morphTextureStride:K,numDirLights:A.directional.length,numPointLights:A.point.length,numSpotLights:A.spot.length,numSpotLightMaps:A.spotLightMap.length,numRectAreaLights:A.rectArea.length,numHemiLights:A.hemi.length,numDirLightShadows:A.directionalShadowMap.length,numPointLightShadows:A.pointShadowMap.length,numSpotLightShadows:A.spotShadowMap.length,numSpotLightShadowsWithMaps:A.numSpotLightShadowsWithMaps,numClippingPlanes:s.numPlanes,numClipIntersection:s.numIntersection,dithering:T.dithering,shadowMapEnabled:t.shadowMap.enabled&&F.length>0,shadowMapType:t.shadowMap.type,toneMapping:T.toneMapped?t.toneMapping:ks,useLegacyLights:t.useLegacyLights,premultipliedAlpha:T.premultipliedAlpha,doubleSided:T.side===Hr,flipSided:T.side===Vr,useDepthPacking:T.depthPacking>=0,depthPacking:T.depthPacking||0,index0AttributeName:T.index0AttributeName,extensionDerivatives:he&&T.extensions.derivatives===!0,extensionFragDepth:he&&T.extensions.fragDepth===!0,extensionDrawBuffers:he&&T.extensions.drawBuffers===!0,extensionShaderTextureLOD:he&&T.extensions.shaderTextureLOD===!0,rendererExtensionFragDepth:u||r.has("EXT_frag_depth"),rendererExtensionDrawBuffers:u||r.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:u||r.has("EXT_shader_texture_lod"),customProgramCacheKey:T.customProgramCacheKey()}}function v(T){const A=[];if(T.shaderID?A.push(T.shaderID):(A.push(T.customVertexShaderID),A.push(T.customFragmentShaderID)),T.defines!==void 0)for(const F in T.defines)A.push(F),A.push(T.defines[F]);return T.isRawShaderMaterial===!1&&(x(A,T),w(A,T),A.push(t.outputEncoding)),A.push(T.customProgramCacheKey),A.join()}function x(T,A){T.push(A.precision),T.push(A.outputEncoding),T.push(A.envMapMode),T.push(A.envMapCubeUVHeight),T.push(A.mapUv),T.push(A.alphaMapUv),T.push(A.lightMapUv),T.push(A.aoMapUv),T.push(A.bumpMapUv),T.push(A.normalMapUv),T.push(A.displacementMapUv),T.push(A.emissiveMapUv),T.push(A.metalnessMapUv),T.push(A.roughnessMapUv),T.push(A.clearcoatMapUv),T.push(A.clearcoatNormalMapUv),T.push(A.clearcoatRoughnessMapUv),T.push(A.iridescenceMapUv),T.push(A.iridescenceThicknessMapUv),T.push(A.sheenColorMapUv),T.push(A.sheenRoughnessMapUv),T.push(A.specularMapUv),T.push(A.specularColorMapUv),T.push(A.specularIntensityMapUv),T.push(A.transmissionMapUv),T.push(A.thicknessMapUv),T.push(A.combine),T.push(A.fogExp2),T.push(A.sizeAttenuation),T.push(A.morphTargetsCount),T.push(A.morphAttributeCount),T.push(A.numDirLights),T.push(A.numPointLights),T.push(A.numSpotLights),T.push(A.numSpotLightMaps),T.push(A.numHemiLights),T.push(A.numRectAreaLights),T.push(A.numDirLightShadows),T.push(A.numPointLightShadows),T.push(A.numSpotLightShadows),T.push(A.numSpotLightShadowsWithMaps),T.push(A.shadowMapType),T.push(A.toneMapping),T.push(A.numClippingPlanes),T.push(A.numClipIntersection),T.push(A.depthPacking)}function w(T,A){a.disableAll(),A.isWebGL2&&a.enable(0),A.supportsVertexTextures&&a.enable(1),A.instancing&&a.enable(2),A.instancingColor&&a.enable(3),A.matcap&&a.enable(4),A.envMap&&a.enable(5),A.normalMapObjectSpace&&a.enable(6),A.normalMapTangentSpace&&a.enable(7),A.clearcoat&&a.enable(8),A.iridescence&&a.enable(9),A.alphaTest&&a.enable(10),A.vertexColors&&a.enable(11),A.vertexAlphas&&a.enable(12),A.vertexUvs2&&a.enable(13),A.vertexTangents&&a.enable(14),T.push(a.mask),a.disableAll(),A.fog&&a.enable(0),A.useFog&&a.enable(1),A.flatShading&&a.enable(2),A.logarithmicDepthBuffer&&a.enable(3),A.skinning&&a.enable(4),A.morphTargets&&a.enable(5),A.morphNormals&&a.enable(6),A.morphColors&&a.enable(7),A.premultipliedAlpha&&a.enable(8),A.shadowMapEnabled&&a.enable(9),A.useLegacyLights&&a.enable(10),A.doubleSided&&a.enable(11),A.flipSided&&a.enable(12),A.useDepthPacking&&a.enable(13),A.dithering&&a.enable(14),A.transmission&&a.enable(15),A.sheen&&a.enable(16),A.decodeVideoTexture&&a.enable(17),A.opaque&&a.enable(18),A.pointsUvs&&a.enable(19),T.push(a.mask)}function S(T){const A=g[T.type];let F;if(A){const N=Ts[A];F=wx.clone(N.uniforms)}else F=T.uniforms;return F}function E(T,A){let F;for(let N=0,U=c.length;N0?r.push(v):h.transparent===!0?i.push(v):n.push(v)}function l(d,f,h,g,y,_){const v=s(d,f,h,g,y,_);h.transmission>0?r.unshift(v):h.transparent===!0?i.unshift(v):n.unshift(v)}function c(d,f){n.length>1&&n.sort(d||iae),r.length>1&&r.sort(f||pL),i.length>1&&i.sort(f||pL)}function u(){for(let d=e,f=t.length;d=o.length?(s=new mL,o.push(s)):s=o[i],s}function n(){t=new WeakMap}return{get:e,dispose:n}}function sae(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={direction:new Z,color:new lt};break;case"SpotLight":n={position:new Z,direction:new Z,color:new lt,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new Z,color:new lt,distance:0,decay:0};break;case"HemisphereLight":n={direction:new Z,skyColor:new lt,groundColor:new lt};break;case"RectAreaLight":n={color:new lt,position:new Z,halfWidth:new Z,halfHeight:new Z};break}return t[e.id]=n,n}}}function aae(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ee};break;case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ee};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ee,shadowCameraNear:1,shadowCameraFar:1e3};break}return t[e.id]=n,n}}}let lae=0;function cae(t,e){return(e.castShadow?2:0)-(t.castShadow?2:0)+(e.map?1:0)-(t.map?1:0)}function uae(t,e){const n=new sae,r=aae(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0};for(let u=0;u<9;u++)i.probe.push(new Z);const o=new Z,s=new rt,a=new rt;function l(u,d){let f=0,h=0,g=0;for(let F=0;F<9;F++)i.probe[F].set(0,0,0);let y=0,_=0,v=0,x=0,w=0,S=0,E=0,C=0,O=0,R=0;u.sort(cae);const T=d===!0?Math.PI:1;for(let F=0,N=u.length;F0&&(e.isWebGL2||t.has("OES_texture_float_linear")===!0?(i.rectAreaLTC1=pt.LTC_FLOAT_1,i.rectAreaLTC2=pt.LTC_FLOAT_2):t.has("OES_texture_half_float_linear")===!0?(i.rectAreaLTC1=pt.LTC_HALF_1,i.rectAreaLTC2=pt.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),i.ambient[0]=f,i.ambient[1]=h,i.ambient[2]=g;const A=i.hash;(A.directionalLength!==y||A.pointLength!==_||A.spotLength!==v||A.rectAreaLength!==x||A.hemiLength!==w||A.numDirectionalShadows!==S||A.numPointShadows!==E||A.numSpotShadows!==C||A.numSpotMaps!==O)&&(i.directional.length=y,i.spot.length=v,i.rectArea.length=x,i.point.length=_,i.hemi.length=w,i.directionalShadow.length=S,i.directionalShadowMap.length=S,i.pointShadow.length=E,i.pointShadowMap.length=E,i.spotShadow.length=C,i.spotShadowMap.length=C,i.directionalShadowMatrix.length=S,i.pointShadowMatrix.length=E,i.spotLightMatrix.length=C+O-R,i.spotLightMap.length=O,i.numSpotLightShadowsWithMaps=R,A.directionalLength=y,A.pointLength=_,A.spotLength=v,A.rectAreaLength=x,A.hemiLength=w,A.numDirectionalShadows=S,A.numPointShadows=E,A.numSpotShadows=C,A.numSpotMaps=O,i.version=lae++)}function c(u,d){let f=0,h=0,g=0,y=0,_=0;const v=d.matrixWorldInverse;for(let x=0,w=u.length;x=a.length?(l=new gL(t,e),a.push(l)):l=a[s],l}function i(){n=new WeakMap}return{get:r,dispose:i}}class SS extends jr{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=di,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class rR extends jr{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}const fae=`void main() { gl_Position = vec4( position, 1.0 ); -}`,fae=`uniform sampler2D shadow_pass; +}`,hae=`uniform sampler2D shadow_pass; uniform vec2 resolution; uniform float radius; #include @@ -3452,7 +3452,7 @@ void main() { squared_mean = squared_mean / samples; float std_dev = sqrt( squared_mean - mean * mean ); gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); -}`;function hae(t,e,n){let r=new xS;const i=new Ee,o=new Ee,s=new an,a=new SS({depthPacking:Ra}),l=new rR,c={},u=n.maxTextureSize,d={[Vs]:Vr,[Vr]:Vs,[Hr]:Hr},f=new sn({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Ee},radius:{value:4}},vertexShader:dae,fragmentShader:fae}),h=f.clone();h.defines.HORIZONTAL_PASS=1;const g=new Jt;g.setAttribute("position",new Mn(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const y=new Er(g,f),_=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=hS,this.render=function(S,E,C){if(_.enabled===!1||_.autoUpdate===!1&&_.needsUpdate===!1||S.length===0)return;const O=t.getRenderTarget(),R=t.getActiveCubeFace(),T=t.getActiveMipmapLevel(),A=t.state;A.setBlending(lr),A.buffers.color.setClear(1,1,1,1),A.buffers.depth.setTest(!0),A.setScissorTest(!1);for(let F=0,N=S.length;Fu||i.y>u)&&(i.x>u&&(o.x=Math.floor(u/z.x),i.x=o.x*z.x,k.mapSize.x=o.x),i.y>u&&(o.y=Math.floor(u/z.y),i.y=o.y*z.y,k.mapSize.y=o.y)),k.map===null){const W=this.type!==bu?{minFilter:Qt,magFilter:Qt}:{};k.map=new gn(i.x,i.y,W),k.map.texture.name=U.name+".shadowMap",k.camera.updateProjectionMatrix()}t.setRenderTarget(k.map),t.clear();const G=k.getViewportCount();for(let W=0;W0||E.map&&E.alphaTest>0){const A=R.uuid,F=E.uuid;let N=c[A];N===void 0&&(N={},c[A]=N);let U=N[F];U===void 0&&(U=R.clone(),N[F]=U),R=U}if(R.visible=E.visible,R.wireframe=E.wireframe,O===bu?R.side=E.shadowSide!==null?E.shadowSide:E.side:R.side=E.shadowSide!==null?E.shadowSide:d[E.side],R.alphaMap=E.alphaMap,R.alphaTest=E.alphaTest,R.map=E.map,R.clipShadows=E.clipShadows,R.clippingPlanes=E.clippingPlanes,R.clipIntersection=E.clipIntersection,R.displacementMap=E.displacementMap,R.displacementScale=E.displacementScale,R.displacementBias=E.displacementBias,R.wireframeLinewidth=E.wireframeLinewidth,R.linewidth=E.linewidth,C.isPointLight===!0&&R.isMeshDistanceMaterial===!0){const A=t.properties.get(R);A.light=C}return R}function w(S,E,C,O,R){if(S.visible===!1)return;if(S.layers.test(E.layers)&&(S.isMesh||S.isLine||S.isPoints)&&(S.castShadow||S.receiveShadow&&R===bu)&&(!S.frustumCulled||r.intersectsObject(S))){S.modelViewMatrix.multiplyMatrices(C.matrixWorldInverse,S.matrixWorld);const F=e.update(S),N=S.material;if(Array.isArray(N)){const U=F.groups;for(let k=0,z=U.length;k=1):B.indexOf("OpenGL ES")!==-1&&(W=parseFloat(/^OpenGL ES (\d)/.exec(B)[1]),G=W>=2);let j=null,$={};const q=t.getParameter(3088),K=t.getParameter(2978),re=new an().fromArray(q),J=new an().fromArray(K);function le(he,ue,He){const st=new Uint8Array(4),wt=t.createTexture();t.bindTexture(he,wt),t.texParameteri(he,10241,9728),t.texParameteri(he,10240,9728);for(let Bt=0;Bt"u"?!1:/OculusBrowser/g.test(navigator.userAgent),g=new WeakMap;let y;const _=new WeakMap;let v=!1;try{v=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function x(ee,Q){return v?new OffscreenCanvas(ee,Q):Jm("canvas")}function w(ee,Q,Pe,$e){let Ge=1;if((ee.width>$e||ee.height>$e)&&(Ge=$e/Math.max(ee.width,ee.height)),Ge<1||Q===!0)if(typeof HTMLImageElement<"u"&&ee instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&ee instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&ee instanceof ImageBitmap){const Ke=Q?Bj:Math.floor,gt=Ke(Ge*ee.width),ut=Ke(Ge*ee.height);y===void 0&&(y=x(gt,ut));const Ae=Pe?x(gt,ut):y;return Ae.width=gt,Ae.height=ut,Ae.getContext("2d").drawImage(ee,0,0,gt,ut),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+ee.width+"x"+ee.height+") to ("+gt+"x"+ut+")."),Ae}else return"data"in ee&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+ee.width+"x"+ee.height+")."),ee;return ee}function S(ee){return D2(ee.width)&&D2(ee.height)}function E(ee){return a?!1:ee.wrapS!==Xr||ee.wrapT!==Xr||ee.minFilter!==Qt&&ee.minFilter!==Dt}function C(ee,Q){return ee.generateMipmaps&&Q&&ee.minFilter!==Qt&&ee.minFilter!==Dt}function O(ee){t.generateMipmap(ee)}function R(ee,Q,Pe,$e,Ge=!1){if(a===!1)return Q;if(ee!==null){if(t[ee]!==void 0)return t[ee];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+ee+"'")}let Ke=Q;return Q===6403&&(Pe===5126&&(Ke=33326),Pe===5131&&(Ke=33325),Pe===5121&&(Ke=33321)),Q===33319&&(Pe===5126&&(Ke=33328),Pe===5131&&(Ke=33327),Pe===5121&&(Ke=33323)),Q===6408&&(Pe===5126&&(Ke=34836),Pe===5131&&(Ke=34842),Pe===5121&&(Ke=$e===Nn&&Ge===!1?35907:32856),Pe===32819&&(Ke=32854),Pe===32820&&(Ke=32855)),(Ke===33325||Ke===33326||Ke===33327||Ke===33328||Ke===34842||Ke===34836)&&e.get("EXT_color_buffer_float"),Ke}function T(ee,Q,Pe){return C(ee,Pe)===!0||ee.isFramebufferTexture&&ee.minFilter!==Qt&&ee.minFilter!==Dt?Math.log2(Math.max(Q.width,Q.height))+1:ee.mipmaps!==void 0&&ee.mipmaps.length>0?ee.mipmaps.length:ee.isCompressedTexture&&Array.isArray(ee.image)?Q.mipmaps.length:1}function A(ee){return ee===Qt||ee===yx||ee===dm?9728:9729}function F(ee){const Q=ee.target;Q.removeEventListener("dispose",F),U(Q),Q.isVideoTexture&&g.delete(Q)}function N(ee){const Q=ee.target;Q.removeEventListener("dispose",N),z(Q)}function U(ee){const Q=r.get(ee);if(Q.__webglInit===void 0)return;const Pe=ee.source,$e=_.get(Pe);if($e){const Ge=$e[Q.__cacheKey];Ge.usedTimes--,Ge.usedTimes===0&&k(ee),Object.keys($e).length===0&&_.delete(Pe)}r.remove(ee)}function k(ee){const Q=r.get(ee);t.deleteTexture(Q.__webglTexture);const Pe=ee.source,$e=_.get(Pe);delete $e[Q.__cacheKey],s.memory.textures--}function z(ee){const Q=ee.texture,Pe=r.get(ee),$e=r.get(Q);if($e.__webglTexture!==void 0&&(t.deleteTexture($e.__webglTexture),s.memory.textures--),ee.depthTexture&&ee.depthTexture.dispose(),ee.isWebGLCubeRenderTarget)for(let Ge=0;Ge<6;Ge++)t.deleteFramebuffer(Pe.__webglFramebuffer[Ge]),Pe.__webglDepthbuffer&&t.deleteRenderbuffer(Pe.__webglDepthbuffer[Ge]);else{if(t.deleteFramebuffer(Pe.__webglFramebuffer),Pe.__webglDepthbuffer&&t.deleteRenderbuffer(Pe.__webglDepthbuffer),Pe.__webglMultisampledFramebuffer&&t.deleteFramebuffer(Pe.__webglMultisampledFramebuffer),Pe.__webglColorRenderbuffer)for(let Ge=0;Ge=l&&console.warn("THREE.WebGLTextures: Trying to use "+ee+" texture units while this GPU supports only "+l),G+=1,ee}function j(ee){const Q=[];return Q.push(ee.wrapS),Q.push(ee.wrapT),Q.push(ee.wrapR||0),Q.push(ee.magFilter),Q.push(ee.minFilter),Q.push(ee.anisotropy),Q.push(ee.internalFormat),Q.push(ee.format),Q.push(ee.type),Q.push(ee.generateMipmaps),Q.push(ee.premultiplyAlpha),Q.push(ee.flipY),Q.push(ee.unpackAlignment),Q.push(ee.encoding),Q.join()}function $(ee,Q){const Pe=r.get(ee);if(ee.isVideoTexture&&We(ee),ee.isRenderTargetTexture===!1&&ee.version>0&&Pe.__version!==ee.version){const $e=ee.image;if($e===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if($e.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{De(Pe,ee,Q);return}}n.bindTexture(3553,Pe.__webglTexture,33984+Q)}function q(ee,Q){const Pe=r.get(ee);if(ee.version>0&&Pe.__version!==ee.version){De(Pe,ee,Q);return}n.bindTexture(35866,Pe.__webglTexture,33984+Q)}function K(ee,Q){const Pe=r.get(ee);if(ee.version>0&&Pe.__version!==ee.version){De(Pe,ee,Q);return}n.bindTexture(32879,Pe.__webglTexture,33984+Q)}function re(ee,Q){const Pe=r.get(ee);if(ee.version>0&&Pe.__version!==ee.version){Te(Pe,ee,Q);return}n.bindTexture(34067,Pe.__webglTexture,33984+Q)}const J={[Ro]:10497,[Xr]:33071,[Xm]:33648},le={[Qt]:9728,[yx]:9984,[dm]:9986,[Dt]:9729,[WO]:9985,[xc]:9987};function ae(ee,Q,Pe){if(Pe?(t.texParameteri(ee,10242,J[Q.wrapS]),t.texParameteri(ee,10243,J[Q.wrapT]),(ee===32879||ee===35866)&&t.texParameteri(ee,32882,J[Q.wrapR]),t.texParameteri(ee,10240,le[Q.magFilter]),t.texParameteri(ee,10241,le[Q.minFilter])):(t.texParameteri(ee,10242,33071),t.texParameteri(ee,10243,33071),(ee===32879||ee===35866)&&t.texParameteri(ee,32882,33071),(Q.wrapS!==Xr||Q.wrapT!==Xr)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),t.texParameteri(ee,10240,A(Q.magFilter)),t.texParameteri(ee,10241,A(Q.minFilter)),Q.minFilter!==Qt&&Q.minFilter!==Dt&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),e.has("EXT_texture_filter_anisotropic")===!0){const $e=e.get("EXT_texture_filter_anisotropic");if(Q.magFilter===Qt||Q.minFilter!==dm&&Q.minFilter!==xc||Q.type===Yn&&e.has("OES_texture_float_linear")===!1||a===!1&&Q.type===yr&&e.has("OES_texture_half_float_linear")===!1)return;(Q.anisotropy>1||r.get(Q).__currentAnisotropy)&&(t.texParameterf(ee,$e.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(Q.anisotropy,i.getMaxAnisotropy())),r.get(Q).__currentAnisotropy=Q.anisotropy)}}function oe(ee,Q){let Pe=!1;ee.__webglInit===void 0&&(ee.__webglInit=!0,Q.addEventListener("dispose",F));const $e=Q.source;let Ge=_.get($e);Ge===void 0&&(Ge={},_.set($e,Ge));const Ke=j(Q);if(Ke!==ee.__cacheKey){Ge[Ke]===void 0&&(Ge[Ke]={texture:t.createTexture(),usedTimes:0},s.memory.textures++,Pe=!0),Ge[Ke].usedTimes++;const gt=Ge[ee.__cacheKey];gt!==void 0&&(Ge[ee.__cacheKey].usedTimes--,gt.usedTimes===0&&k(Q)),ee.__cacheKey=Ke,ee.__webglTexture=Ge[Ke].texture}return Pe}function De(ee,Q,Pe){let $e=3553;(Q.isDataArrayTexture||Q.isCompressedArrayTexture)&&($e=35866),Q.isData3DTexture&&($e=32879);const Ge=oe(ee,Q),Ke=Q.source;n.bindTexture($e,ee.__webglTexture,33984+Pe);const gt=r.get(Ke);if(Ke.version!==gt.__version||Ge===!0){n.activeTexture(33984+Pe),t.pixelStorei(37440,Q.flipY),t.pixelStorei(37441,Q.premultiplyAlpha),t.pixelStorei(3317,Q.unpackAlignment),t.pixelStorei(37443,0);const ut=E(Q)&&S(Q.image)===!1;let Ae=w(Q.image,ut,!1,u);Ae=ht(Q,Ae);const vt=S(Ae)||a,xt=o.convert(Q.format,Q.encoding);let ct=o.convert(Q.type),Ie=R(Q.internalFormat,xt,ct,Q.encoding,Q.isVideoTexture);ae($e,Q,vt);let Ye;const Tt=Q.mipmaps,Lt=a&&Q.isVideoTexture!==!0,Rt=gt.__version===void 0||Ge===!0,he=T(Q,Ae,vt);if(Q.isDepthTexture)Ie=6402,a?Q.type===Yn?Ie=36012:Q.type===nl?Ie=33190:Q.type===fc?Ie=35056:Ie=33189:Q.type===Yn&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),Q.format===hc&&Ie===6402&&Q.type!==YO&&Q.type!==nl&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),Q.type=nl,ct=o.convert(Q.type)),Q.format===wc&&Ie===6402&&(Ie=34041,Q.type!==fc&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),Q.type=fc,ct=o.convert(Q.type))),Rt&&(Lt?n.texStorage2D(3553,1,Ie,Ae.width,Ae.height):n.texImage2D(3553,0,Ie,Ae.width,Ae.height,0,xt,ct,null));else if(Q.isDataTexture)if(Tt.length>0&&vt){Lt&&Rt&&n.texStorage2D(3553,he,Ie,Tt[0].width,Tt[0].height);for(let ue=0,He=Tt.length;ue>=1,He>>=1}}else if(Tt.length>0&&vt){Lt&&Rt&&n.texStorage2D(3553,he,Ie,Tt[0].width,Tt[0].height);for(let ue=0,He=Tt.length;ue0&&Rt++,n.texStorage2D(34067,Rt,Ye,Ae[0].width,Ae[0].height));for(let ue=0;ue<6;ue++)if(ut){Tt?n.texSubImage2D(34069+ue,0,0,0,Ae[ue].width,Ae[ue].height,ct,Ie,Ae[ue].data):n.texImage2D(34069+ue,0,Ye,Ae[ue].width,Ae[ue].height,0,ct,Ie,Ae[ue].data);for(let He=0;He=34069&&Ge<=34074)&&t.framebufferTexture2D(36160,$e,Ge,r.get(Pe).__webglTexture,0),n.bindFramebuffer(36160,null)}function we(ee,Q,Pe){if(t.bindRenderbuffer(36161,ee),Q.depthBuffer&&!Q.stencilBuffer){let $e=33189;if(Pe||dt(Q)){const Ge=Q.depthTexture;Ge&&Ge.isDepthTexture&&(Ge.type===Yn?$e=36012:Ge.type===nl&&($e=33190));const Ke=ot(Q);dt(Q)?f.renderbufferStorageMultisampleEXT(36161,Ke,$e,Q.width,Q.height):t.renderbufferStorageMultisample(36161,Ke,$e,Q.width,Q.height)}else t.renderbufferStorage(36161,$e,Q.width,Q.height);t.framebufferRenderbuffer(36160,36096,36161,ee)}else if(Q.depthBuffer&&Q.stencilBuffer){const $e=ot(Q);Pe&&dt(Q)===!1?t.renderbufferStorageMultisample(36161,$e,35056,Q.width,Q.height):dt(Q)?f.renderbufferStorageMultisampleEXT(36161,$e,35056,Q.width,Q.height):t.renderbufferStorage(36161,34041,Q.width,Q.height),t.framebufferRenderbuffer(36160,33306,36161,ee)}else{const $e=Q.isWebGLMultipleRenderTargets===!0?Q.texture:[Q.texture];for(let Ge=0;Ge<$e.length;Ge++){const Ke=$e[Ge],gt=o.convert(Ke.format,Ke.encoding),ut=o.convert(Ke.type),Ae=R(Ke.internalFormat,gt,ut,Ke.encoding),vt=ot(Q);Pe&&dt(Q)===!1?t.renderbufferStorageMultisample(36161,vt,Ae,Q.width,Q.height):dt(Q)?f.renderbufferStorageMultisampleEXT(36161,vt,Ae,Q.width,Q.height):t.renderbufferStorage(36161,Ae,Q.width,Q.height)}}t.bindRenderbuffer(36161,null)}function me(ee,Q){if(Q&&Q.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(n.bindFramebuffer(36160,ee),!(Q.depthTexture&&Q.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");(!r.get(Q.depthTexture).__webglTexture||Q.depthTexture.image.width!==Q.width||Q.depthTexture.image.height!==Q.height)&&(Q.depthTexture.image.width=Q.width,Q.depthTexture.image.height=Q.height,Q.depthTexture.needsUpdate=!0),$(Q.depthTexture,0);const $e=r.get(Q.depthTexture).__webglTexture,Ge=ot(Q);if(Q.depthTexture.format===hc)dt(Q)?f.framebufferTexture2DMultisampleEXT(36160,36096,3553,$e,0,Ge):t.framebufferTexture2D(36160,36096,3553,$e,0);else if(Q.depthTexture.format===wc)dt(Q)?f.framebufferTexture2DMultisampleEXT(36160,33306,3553,$e,0,Ge):t.framebufferTexture2D(36160,33306,3553,$e,0);else throw new Error("Unknown depthTexture format")}function se(ee){const Q=r.get(ee),Pe=ee.isWebGLCubeRenderTarget===!0;if(ee.depthTexture&&!Q.__autoAllocateDepthBuffer){if(Pe)throw new Error("target.depthTexture not supported in Cube render targets");me(Q.__webglFramebuffer,ee)}else if(Pe){Q.__webglDepthbuffer=[];for(let $e=0;$e<6;$e++)n.bindFramebuffer(36160,Q.__webglFramebuffer[$e]),Q.__webglDepthbuffer[$e]=t.createRenderbuffer(),we(Q.__webglDepthbuffer[$e],ee,!1)}else n.bindFramebuffer(36160,Q.__webglFramebuffer),Q.__webglDepthbuffer=t.createRenderbuffer(),we(Q.__webglDepthbuffer,ee,!1);n.bindFramebuffer(36160,null)}function de(ee,Q,Pe){const $e=r.get(ee);Q!==void 0&&ve($e.__webglFramebuffer,ee,ee.texture,36064,3553),Pe!==void 0&&se(ee)}function ke(ee){const Q=ee.texture,Pe=r.get(ee),$e=r.get(Q);ee.addEventListener("dispose",N),ee.isWebGLMultipleRenderTargets!==!0&&($e.__webglTexture===void 0&&($e.__webglTexture=t.createTexture()),$e.__version=Q.version,s.memory.textures++);const Ge=ee.isWebGLCubeRenderTarget===!0,Ke=ee.isWebGLMultipleRenderTargets===!0,gt=S(ee)||a;if(Ge){Pe.__webglFramebuffer=[];for(let ut=0;ut<6;ut++)Pe.__webglFramebuffer[ut]=t.createFramebuffer()}else{if(Pe.__webglFramebuffer=t.createFramebuffer(),Ke)if(i.drawBuffers){const ut=ee.texture;for(let Ae=0,vt=ut.length;Ae0&&dt(ee)===!1){const ut=Ke?Q:[Q];Pe.__webglMultisampledFramebuffer=t.createFramebuffer(),Pe.__webglColorRenderbuffer=[],n.bindFramebuffer(36160,Pe.__webglMultisampledFramebuffer);for(let Ae=0;Ae0&&dt(ee)===!1){const Q=ee.isWebGLMultipleRenderTargets?ee.texture:[ee.texture],Pe=ee.width,$e=ee.height;let Ge=16384;const Ke=[],gt=ee.stencilBuffer?33306:36096,ut=r.get(ee),Ae=ee.isWebGLMultipleRenderTargets===!0;if(Ae)for(let vt=0;vt0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&Q.__useRenderToTexture!==!1}function We(ee){const Q=s.render.frame;g.get(ee)!==Q&&(g.set(ee,Q),ee.update())}function ht(ee,Q){const Pe=ee.encoding,$e=ee.format,Ge=ee.type;return ee.isCompressedTexture===!0||ee.isVideoTexture===!0||ee.format===xx||Pe!==Oa&&(Pe===Nn?a===!1?e.has("EXT_sRGB")===!0&&$e===Jn?(ee.format=xx,ee.minFilter=Dt,ee.generateMipmaps=!1):Q=QO.sRGBToLinear(Q):($e!==Jn||Ge!==nr)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture encoding:",Pe)),Q}this.allocateTextureUnit=B,this.resetTextureUnits=W,this.setTexture2D=$,this.setTexture2DArray=q,this.setTexture3D=K,this.setTextureCube=re,this.rebindTextures=de,this.setupRenderTarget=ke,this.updateRenderTargetMipmap=Ve,this.updateMultisampleRenderTarget=Ze,this.setupDepthRenderbuffer=se,this.setupFrameBufferTexture=ve,this.useMultisampledRTT=dt}function Zj(t,e,n){const r=n.isWebGL2;function i(o,s=null){let a;if(o===nr)return 5121;if(o===Mj)return 32819;if(o===Ej)return 32820;if(o===wj)return 5120;if(o===Sj)return 5122;if(o===YO)return 5123;if(o===bj)return 5124;if(o===nl)return 5125;if(o===Yn)return 5126;if(o===yr)return r?5131:(a=e.get("OES_texture_half_float"),a!==null?a.HALF_FLOAT_OES:null);if(o===Pj)return 6406;if(o===Jn)return 6408;if(o===gS)return 6409;if(o===Cj)return 6410;if(o===hc)return 6402;if(o===wc)return 34041;if(o===xx)return a=e.get("EXT_sRGB"),a!==null?a.SRGB_ALPHA_EXT:null;if(o===Eg)return 6403;if(o===Tj)return 36244;if(o===XO)return 33319;if(o===Oj)return 33320;if(o===Rj)return 36249;if(o===M_||o===E_||o===P_||o===C_)if(s===Nn)if(a=e.get("WEBGL_compressed_texture_s3tc_srgb"),a!==null){if(o===M_)return a.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(o===E_)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(o===P_)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(o===C_)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(a=e.get("WEBGL_compressed_texture_s3tc"),a!==null){if(o===M_)return a.COMPRESSED_RGB_S3TC_DXT1_EXT;if(o===E_)return a.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(o===P_)return a.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(o===C_)return a.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(o===l2||o===c2||o===u2||o===d2)if(a=e.get("WEBGL_compressed_texture_pvrtc"),a!==null){if(o===l2)return a.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(o===c2)return a.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(o===u2)return a.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(o===d2)return a.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(o===Aj)return a=e.get("WEBGL_compressed_texture_etc1"),a!==null?a.COMPRESSED_RGB_ETC1_WEBGL:null;if(o===f2||o===h2)if(a=e.get("WEBGL_compressed_texture_etc"),a!==null){if(o===f2)return s===Nn?a.COMPRESSED_SRGB8_ETC2:a.COMPRESSED_RGB8_ETC2;if(o===h2)return s===Nn?a.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:a.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(o===p2||o===m2||o===g2||o===v2||o===y2||o===_2||o===x2||o===w2||o===S2||o===b2||o===M2||o===E2||o===P2||o===C2)if(a=e.get("WEBGL_compressed_texture_astc"),a!==null){if(o===p2)return s===Nn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:a.COMPRESSED_RGBA_ASTC_4x4_KHR;if(o===m2)return s===Nn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:a.COMPRESSED_RGBA_ASTC_5x4_KHR;if(o===g2)return s===Nn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:a.COMPRESSED_RGBA_ASTC_5x5_KHR;if(o===v2)return s===Nn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:a.COMPRESSED_RGBA_ASTC_6x5_KHR;if(o===y2)return s===Nn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:a.COMPRESSED_RGBA_ASTC_6x6_KHR;if(o===_2)return s===Nn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:a.COMPRESSED_RGBA_ASTC_8x5_KHR;if(o===x2)return s===Nn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:a.COMPRESSED_RGBA_ASTC_8x6_KHR;if(o===w2)return s===Nn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:a.COMPRESSED_RGBA_ASTC_8x8_KHR;if(o===S2)return s===Nn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:a.COMPRESSED_RGBA_ASTC_10x5_KHR;if(o===b2)return s===Nn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:a.COMPRESSED_RGBA_ASTC_10x6_KHR;if(o===M2)return s===Nn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:a.COMPRESSED_RGBA_ASTC_10x8_KHR;if(o===E2)return s===Nn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:a.COMPRESSED_RGBA_ASTC_10x10_KHR;if(o===P2)return s===Nn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:a.COMPRESSED_RGBA_ASTC_12x10_KHR;if(o===C2)return s===Nn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:a.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(o===T_)if(a=e.get("EXT_texture_compression_bptc"),a!==null){if(o===T_)return s===Nn?a.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:a.COMPRESSED_RGBA_BPTC_UNORM_EXT}else return null;if(o===Dj||o===T2||o===O2||o===R2)if(a=e.get("EXT_texture_compression_rgtc"),a!==null){if(o===T_)return a.COMPRESSED_RED_RGTC1_EXT;if(o===T2)return a.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(o===O2)return a.COMPRESSED_RED_GREEN_RGTC2_EXT;if(o===R2)return a.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return o===fc?r?34042:(a=e.get("WEBGL_depth_texture"),a!==null?a.UNSIGNED_INT_24_8_WEBGL:null):t[o]!==void 0?t[o]:null}return{convert:i}}class qj extends or{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}let Ou=class extends Dn{constructor(){super(),this.isGroup=!0,this.type="Group"}};const gae={type:"move"};class wE{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Ou,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new Ou,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new Z,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new Z),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Ou,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new Z,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new Z),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const n=this._hand;if(n)for(const r of e.hand.values())this._getHandJoint(n,r)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,n,r){let i=null,o=null,s=null;const a=this._targetRay,l=this._grip,c=this._hand;if(e&&n.session.visibilityState!=="visible-blurred"){if(c&&e.hand){s=!0;for(const y of e.hand.values()){const _=n.getJointPose(y,r),v=this._getHandJoint(c,y);_!==null&&(v.matrix.fromArray(_.transform.matrix),v.matrix.decompose(v.position,v.rotation,v.scale),v.jointRadius=_.radius),v.visible=_!==null}const u=c.joints["index-finger-tip"],d=c.joints["thumb-tip"],f=u.position.distanceTo(d.position),h=.02,g=.005;c.inputState.pinching&&f>h+g?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&f<=h-g&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(o=n.getPose(e.gripSpace,r),o!==null&&(l.matrix.fromArray(o.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),o.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(o.linearVelocity)):l.hasLinearVelocity=!1,o.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(o.angularVelocity)):l.hasAngularVelocity=!1));a!==null&&(i=n.getPose(e.targetRaySpace,r),i===null&&o!==null&&(i=o),i!==null&&(a.matrix.fromArray(i.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),i.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(i.linearVelocity)):a.hasLinearVelocity=!1,i.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(i.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(gae)))}return a!==null&&(a.visible=i!==null),l!==null&&(l.visible=o!==null),c!==null&&(c.visible=s!==null),this}_getHandJoint(e,n){if(e.joints[n.jointName]===void 0){const r=new Ou;r.matrixAutoUpdate=!1,r.visible=!1,e.joints[n.jointName]=r,e.add(r)}return e.joints[n.jointName]}}class bS extends qn{constructor(e,n,r,i,o,s,a,l,c,u){if(u=u!==void 0?u:hc,u!==hc&&u!==wc)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");r===void 0&&u===hc&&(r=nl),r===void 0&&u===wc&&(r=fc),super(null,i,o,s,a,l,u,r,c),this.isDepthTexture=!0,this.image={width:e,height:n},this.magFilter=a!==void 0?a:Qt,this.minFilter=l!==void 0?l:Qt,this.flipY=!1,this.generateMipmaps=!1}}class vae extends hs{constructor(e,n){super();const r=this;let i=null,o=1,s=null,a="local-floor",l=1,c=null,u=null,d=null,f=null,h=null,g=null;const y=n.getContextAttributes();let _=null,v=null;const x=[],w=[],S=new Set,E=new Map,C=new or;C.layers.enable(1),C.viewport=new an;const O=new or;O.layers.enable(2),O.viewport=new an;const R=[C,O],T=new qj;T.layers.enable(1),T.layers.enable(2);let A=null,F=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(re){let J=x[re];return J===void 0&&(J=new wE,x[re]=J),J.getTargetRaySpace()},this.getControllerGrip=function(re){let J=x[re];return J===void 0&&(J=new wE,x[re]=J),J.getGripSpace()},this.getHand=function(re){let J=x[re];return J===void 0&&(J=new wE,x[re]=J),J.getHandSpace()};function N(re){const J=w.indexOf(re.inputSource);if(J===-1)return;const le=x[J];le!==void 0&&le.dispatchEvent({type:re.type,data:re.inputSource})}function U(){i.removeEventListener("select",N),i.removeEventListener("selectstart",N),i.removeEventListener("selectend",N),i.removeEventListener("squeeze",N),i.removeEventListener("squeezestart",N),i.removeEventListener("squeezeend",N),i.removeEventListener("end",U),i.removeEventListener("inputsourceschange",k);for(let re=0;re=0&&(w[ae]=null,x[ae].disconnect(le))}for(let J=0;J=w.length){w.push(le),ae=De;break}else if(w[De]===null){w[De]=le,ae=De;break}if(ae===-1)break}const oe=x[ae];oe&&oe.connect(le)}}const z=new Z,G=new Z;function W(re,J,le){z.setFromMatrixPosition(J.matrixWorld),G.setFromMatrixPosition(le.matrixWorld);const ae=z.distanceTo(G),oe=J.projectionMatrix.elements,De=le.projectionMatrix.elements,Te=oe[14]/(oe[10]-1),ve=oe[14]/(oe[10]+1),we=(oe[9]+1)/oe[5],me=(oe[9]-1)/oe[5],se=(oe[8]-1)/oe[0],de=(De[8]+1)/De[0],ke=Te*se,Ve=Te*de,Ze=ae/(-se+de),ot=Ze*-se;J.matrixWorld.decompose(re.position,re.quaternion,re.scale),re.translateX(ot),re.translateZ(Ze),re.matrixWorld.compose(re.position,re.quaternion,re.scale),re.matrixWorldInverse.copy(re.matrixWorld).invert();const dt=Te+Ze,We=ve+Ze,ht=ke-ot,ee=Ve+(ae-ot),Q=we*ve/We*dt,Pe=me*ve/We*dt;re.projectionMatrix.makePerspective(ht,ee,Q,Pe,dt,We),re.projectionMatrixInverse.copy(re.projectionMatrix).invert()}function B(re,J){J===null?re.matrixWorld.copy(re.matrix):re.matrixWorld.multiplyMatrices(J.matrixWorld,re.matrix),re.matrixWorldInverse.copy(re.matrixWorld).invert()}this.updateCamera=function(re){if(i===null)return;T.near=O.near=C.near=re.near,T.far=O.far=C.far=re.far,(A!==T.near||F!==T.far)&&(i.updateRenderState({depthNear:T.near,depthFar:T.far}),A=T.near,F=T.far);const J=re.parent,le=T.cameras;B(T,J);for(let ae=0;aeoe&&(E.set(ae,ae.lastChangedTime),r.dispatchEvent({type:"planechanged",data:ae}))}}g=null}const K=new $j;K.setAnimationLoop(q),this.setAnimationLoop=function(re){$=re},this.dispose=function(){}}}function yae(t,e){function n(_,v){_.matrixAutoUpdate===!0&&_.updateMatrix(),v.value.copy(_.matrix)}function r(_,v){v.color.getRGB(_.fogColor.value,jj(t)),v.isFog?(_.fogNear.value=v.near,_.fogFar.value=v.far):v.isFogExp2&&(_.fogDensity.value=v.density)}function i(_,v,x,w,S){v.isMeshBasicMaterial||v.isMeshLambertMaterial?o(_,v):v.isMeshToonMaterial?(o(_,v),d(_,v)):v.isMeshPhongMaterial?(o(_,v),u(_,v)):v.isMeshStandardMaterial?(o(_,v),f(_,v),v.isMeshPhysicalMaterial&&h(_,v,S)):v.isMeshMatcapMaterial?(o(_,v),g(_,v)):v.isMeshDepthMaterial?o(_,v):v.isMeshDistanceMaterial?(o(_,v),y(_,v)):v.isMeshNormalMaterial?o(_,v):v.isLineBasicMaterial?(s(_,v),v.isLineDashedMaterial&&a(_,v)):v.isPointsMaterial?l(_,v,x,w):v.isSpriteMaterial?c(_,v):v.isShadowMaterial?(_.color.value.copy(v.color),_.opacity.value=v.opacity):v.isShaderMaterial&&(v.uniformsNeedUpdate=!1)}function o(_,v){_.opacity.value=v.opacity,v.color&&_.diffuse.value.copy(v.color),v.emissive&&_.emissive.value.copy(v.emissive).multiplyScalar(v.emissiveIntensity),v.map&&(_.map.value=v.map,n(v.map,_.mapTransform)),v.alphaMap&&(_.alphaMap.value=v.alphaMap,n(v.alphaMap,_.alphaMapTransform)),v.bumpMap&&(_.bumpMap.value=v.bumpMap,n(v.bumpMap,_.bumpMapTransform),_.bumpScale.value=v.bumpScale,v.side===Vr&&(_.bumpScale.value*=-1)),v.normalMap&&(_.normalMap.value=v.normalMap,n(v.normalMap,_.normalMapTransform),_.normalScale.value.copy(v.normalScale),v.side===Vr&&_.normalScale.value.negate()),v.displacementMap&&(_.displacementMap.value=v.displacementMap,n(v.displacementMap,_.displacementMapTransform),_.displacementScale.value=v.displacementScale,_.displacementBias.value=v.displacementBias),v.emissiveMap&&(_.emissiveMap.value=v.emissiveMap,n(v.emissiveMap,_.emissiveMapTransform)),v.specularMap&&(_.specularMap.value=v.specularMap,n(v.specularMap,_.specularMapTransform)),v.alphaTest>0&&(_.alphaTest.value=v.alphaTest);const x=e.get(v).envMap;if(x&&(_.envMap.value=x,_.flipEnvMap.value=x.isCubeTexture&&x.isRenderTargetTexture===!1?-1:1,_.reflectivity.value=v.reflectivity,_.ior.value=v.ior,_.refractionRatio.value=v.refractionRatio),v.lightMap){_.lightMap.value=v.lightMap;const w=t.useLegacyLights===!0?Math.PI:1;_.lightMapIntensity.value=v.lightMapIntensity*w,n(v.lightMap,_.lightMapTransform)}v.aoMap&&(_.aoMap.value=v.aoMap,_.aoMapIntensity.value=v.aoMapIntensity,n(v.aoMap,_.aoMapTransform))}function s(_,v){_.diffuse.value.copy(v.color),_.opacity.value=v.opacity,v.map&&(_.map.value=v.map,n(v.map,_.mapTransform))}function a(_,v){_.dashSize.value=v.dashSize,_.totalSize.value=v.dashSize+v.gapSize,_.scale.value=v.scale}function l(_,v,x,w){_.diffuse.value.copy(v.color),_.opacity.value=v.opacity,_.size.value=v.size*x,_.scale.value=w*.5,v.map&&(_.map.value=v.map,n(v.map,_.uvTransform)),v.alphaMap&&(_.alphaMap.value=v.alphaMap),v.alphaTest>0&&(_.alphaTest.value=v.alphaTest)}function c(_,v){_.diffuse.value.copy(v.color),_.opacity.value=v.opacity,_.rotation.value=v.rotation,v.map&&(_.map.value=v.map,n(v.map,_.mapTransform)),v.alphaMap&&(_.alphaMap.value=v.alphaMap),v.alphaTest>0&&(_.alphaTest.value=v.alphaTest)}function u(_,v){_.specular.value.copy(v.specular),_.shininess.value=Math.max(v.shininess,1e-4)}function d(_,v){v.gradientMap&&(_.gradientMap.value=v.gradientMap)}function f(_,v){_.metalness.value=v.metalness,v.metalnessMap&&(_.metalnessMap.value=v.metalnessMap,n(v.metalnessMap,_.metalnessMapTransform)),_.roughness.value=v.roughness,v.roughnessMap&&(_.roughnessMap.value=v.roughnessMap,n(v.roughnessMap,_.roughnessMapTransform)),e.get(v).envMap&&(_.envMapIntensity.value=v.envMapIntensity)}function h(_,v,x){_.ior.value=v.ior,v.sheen>0&&(_.sheenColor.value.copy(v.sheenColor).multiplyScalar(v.sheen),_.sheenRoughness.value=v.sheenRoughness,v.sheenColorMap&&(_.sheenColorMap.value=v.sheenColorMap,n(v.sheenColorMap,_.sheenColorMapTransform)),v.sheenRoughnessMap&&(_.sheenRoughnessMap.value=v.sheenRoughnessMap,n(v.sheenRoughnessMap,_.sheenRoughnessMapTransform))),v.clearcoat>0&&(_.clearcoat.value=v.clearcoat,_.clearcoatRoughness.value=v.clearcoatRoughness,v.clearcoatMap&&(_.clearcoatMap.value=v.clearcoatMap,n(v.clearcoatMap,_.clearcoatMapTransform)),v.clearcoatRoughnessMap&&(_.clearcoatRoughnessMap.value=v.clearcoatRoughnessMap,n(v.clearcoatRoughnessMap,_.clearcoatRoughnessMapTransform)),v.clearcoatNormalMap&&(_.clearcoatNormalMap.value=v.clearcoatNormalMap,n(v.clearcoatNormalMap,_.clearcoatNormalMapTransform),_.clearcoatNormalScale.value.copy(v.clearcoatNormalScale),v.side===Vr&&_.clearcoatNormalScale.value.negate())),v.iridescence>0&&(_.iridescence.value=v.iridescence,_.iridescenceIOR.value=v.iridescenceIOR,_.iridescenceThicknessMinimum.value=v.iridescenceThicknessRange[0],_.iridescenceThicknessMaximum.value=v.iridescenceThicknessRange[1],v.iridescenceMap&&(_.iridescenceMap.value=v.iridescenceMap,n(v.iridescenceMap,_.iridescenceMapTransform)),v.iridescenceThicknessMap&&(_.iridescenceThicknessMap.value=v.iridescenceThicknessMap,n(v.iridescenceThicknessMap,_.iridescenceThicknessMapTransform))),v.transmission>0&&(_.transmission.value=v.transmission,_.transmissionSamplerMap.value=x.texture,_.transmissionSamplerSize.value.set(x.width,x.height),v.transmissionMap&&(_.transmissionMap.value=v.transmissionMap,n(v.transmissionMap,_.transmissionMapTransform)),_.thickness.value=v.thickness,v.thicknessMap&&(_.thicknessMap.value=v.thicknessMap,n(v.thicknessMap,_.thicknessMapTransform)),_.attenuationDistance.value=v.attenuationDistance,_.attenuationColor.value.copy(v.attenuationColor)),_.specularIntensity.value=v.specularIntensity,_.specularColor.value.copy(v.specularColor),v.specularColorMap&&(_.specularColorMap.value=v.specularColorMap,n(v.specularColorMap,_.specularColorMapTransform)),v.specularIntensityMap&&(_.specularIntensityMap.value=v.specularIntensityMap,n(v.specularIntensityMap,_.specularIntensityMapTransform))}function g(_,v){v.matcap&&(_.matcap.value=v.matcap)}function y(_,v){const x=e.get(v).light;_.referencePosition.value.setFromMatrixPosition(x.matrixWorld),_.nearDistance.value=x.shadow.camera.near,_.farDistance.value=x.shadow.camera.far}return{refreshFogUniforms:r,refreshMaterialUniforms:i}}function _ae(t,e,n,r){let i={},o={},s=[];const a=n.isWebGL2?t.getParameter(35375):0;function l(x,w){const S=w.program;r.uniformBlockBinding(x,S)}function c(x,w){let S=i[x.id];S===void 0&&(g(x),S=u(x),i[x.id]=S,x.addEventListener("dispose",_));const E=w.program;r.updateUBOMapping(x,E);const C=e.render.frame;o[x.id]!==C&&(f(x),o[x.id]=C)}function u(x){const w=d();x.__bindingPointIndex=w;const S=t.createBuffer(),E=x.__size,C=x.usage;return t.bindBuffer(35345,S),t.bufferData(35345,E,C),t.bindBuffer(35345,null),t.bindBufferBase(35345,w,S),S}function d(){for(let x=0;x0){C=S%E;const N=E-C;C!==0&&N-A.boundary<0&&(S+=E-C,T.__offset=S)}S+=A.storage}return C=S%E,C>0&&(S+=E-C),x.__size=S,x.__cache={},this}function y(x){const w={boundary:0,storage:0};return typeof x=="number"?(w.boundary=4,w.storage=4):x.isVector2?(w.boundary=8,w.storage=8):x.isVector3||x.isColor?(w.boundary=16,w.storage=12):x.isVector4?(w.boundary=16,w.storage=16):x.isMatrix3?(w.boundary=48,w.storage=48):x.isMatrix4?(w.boundary=64,w.storage=64):x.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",x),w}function _(x){const w=x.target;w.removeEventListener("dispose",_);const S=s.indexOf(w.__bindingPointIndex);s.splice(S,1),t.deleteBuffer(i[w.id]),delete i[w.id],delete o[w.id]}function v(){for(const x in i)t.deleteBuffer(i[x]);s=[],i={},o={}}return{bind:l,update:c,dispose:v}}function xae(){const t=Jm("canvas");return t.style.display="block",t}class iR{constructor(e={}){const{canvas:n=xae(),context:r=null,depth:i=!0,stencil:o=!0,alpha:s=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:c=!1,powerPreference:u="default",failIfMajorPerformanceCaveat:d=!1}=e;this.isWebGLRenderer=!0;let f;r!==null?f=r.getContextAttributes().alpha:f=s;let h=null,g=null;const y=[],_=[];this.domElement=n,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.outputEncoding=Oa,this.useLegacyLights=!0,this.toneMapping=ks,this.toneMappingExposure=1;const v=this;let x=!1,w=0,S=0,E=null,C=-1,O=null;const R=new an,T=new an;let A=null,F=n.width,N=n.height,U=1,k=null,z=null;const G=new an(0,0,F,N),W=new an(0,0,F,N);let B=!1;const j=new xS;let $=!1,q=!1,K=null;const re=new rt,J=new Z,le={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function ae(){return E===null?U:1}let oe=r;function De(te,pe){for(let Ne=0;Ne0?g=_[_.length-1]:g=null,y.pop(),y.length>0?h=y[y.length-1]:h=null};function jn(te,pe,Ne,ce){if(te.visible===!1)return;if(te.layers.test(pe.layers)){if(te.isGroup)Ne=te.renderOrder;else if(te.isLOD)te.autoUpdate===!0&&te.update(pe);else if(te.isLight)g.pushLight(te),te.castShadow&&g.pushShadow(te);else if(te.isSprite){if(!te.frustumCulled||j.intersectsSprite(te)){ce&&J.setFromMatrixPosition(te.matrixWorld).applyMatrix4(re);const ne=dt.update(te),fe=te.material;fe.visible&&h.push(te,ne,fe,Ne,J.z,null)}}else if((te.isMesh||te.isLine||te.isPoints)&&(te.isSkinnedMesh&&te.skeleton.frame!==me.render.frame&&(te.skeleton.update(),te.skeleton.frame=me.render.frame),!te.frustumCulled||j.intersectsObject(te))){ce&&J.setFromMatrixPosition(te.matrixWorld).applyMatrix4(re);const ne=dt.update(te),fe=te.material;if(Array.isArray(fe)){const _e=ne.groups;for(let Se=0,Fe=_e.length;Se0&&xn(L,Y,pe,Ne),ce&&we.viewport(R.copy(ce)),L.length>0&&Ft(L,pe,Ne),Y.length>0&&Ft(Y,pe,Ne),ne.length>0&&Ft(ne,pe,Ne),we.buffers.depth.setTest(!0),we.buffers.depth.setMask(!0),we.buffers.color.setMask(!0),we.setPolygonOffset(!1)}function xn(te,pe,Ne,ce){if(K===null){const fe=ve.isWebGL2;K=new gn(1024,1024,{generateMipmaps:!0,type:Te.has("EXT_color_buffer_half_float")?yr:nr,minFilter:xc,samples:fe&&a===!0?4:0})}const L=v.getRenderTarget();v.setRenderTarget(K),v.clear();const Y=v.toneMapping;v.toneMapping=ks,Ft(te,Ne,ce),de.updateMultisampleRenderTarget(K),de.updateRenderTargetMipmap(K);let ne=!1;for(let fe=0,_e=pe.length;fe<_e;fe++){const Se=pe[fe],Fe=Se.object,Ce=Se.geometry,je=Se.material,qe=Se.group;if(je.side===Hr&&Fe.layers.test(ce.layers)){const Qe=je.side;je.side=Vr,je.needsUpdate=!0,kt(Fe,Ne,ce,Ce,je,qe),je.side=Qe,je.needsUpdate=!0,ne=!0}}ne===!0&&(de.updateMultisampleRenderTarget(K),de.updateRenderTargetMipmap(K)),v.setRenderTarget(L),v.toneMapping=Y}function Ft(te,pe,Ne){const ce=pe.isScene===!0?pe.overrideMaterial:null;for(let L=0,Y=te.length;L0&&de.useMultisampledRTT(te)===!1?L=se.get(te).__webglMultisampledFramebuffer:L=Fe,R.copy(te.viewport),T.copy(te.scissor),A=te.scissorTest}else R.copy(G).multiplyScalar(U).floor(),T.copy(W).multiplyScalar(U).floor(),A=B;if(we.bindFramebuffer(36160,L)&&ve.drawBuffers&&ce&&we.drawBuffers(te,L),we.viewport(R),we.scissor(T),we.setScissorTest(A),Y){const _e=se.get(te.texture);oe.framebufferTexture2D(36160,36064,34069+pe,_e.__webglTexture,Ne)}else if(ne){const _e=se.get(te.texture),Se=pe||0;oe.framebufferTextureLayer(36160,36064,_e.__webglTexture,Ne||0,Se)}C=-1},this.readRenderTargetPixels=function(te,pe,Ne,ce,L,Y,ne){if(!(te&&te.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let fe=se.get(te).__webglFramebuffer;if(te.isWebGLCubeRenderTarget&&ne!==void 0&&(fe=fe[ne]),fe){we.bindFramebuffer(36160,fe);try{const _e=te.texture,Se=_e.format,Fe=_e.type;if(Se!==Jn&&Ae.convert(Se)!==oe.getParameter(35739)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const Ce=Fe===yr&&(Te.has("EXT_color_buffer_half_float")||ve.isWebGL2&&Te.has("EXT_color_buffer_float"));if(Fe!==nr&&Ae.convert(Fe)!==oe.getParameter(35738)&&!(Fe===Yn&&(ve.isWebGL2||Te.has("OES_texture_float")||Te.has("WEBGL_color_buffer_float")))&&!Ce){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}pe>=0&&pe<=te.width-ce&&Ne>=0&&Ne<=te.height-L&&oe.readPixels(pe,Ne,ce,L,Ae.convert(Se),Ae.convert(Fe),Y)}finally{const _e=E!==null?se.get(E).__webglFramebuffer:null;we.bindFramebuffer(36160,_e)}}},this.copyFramebufferToTexture=function(te,pe,Ne=0){const ce=Math.pow(2,-Ne),L=Math.floor(pe.image.width*ce),Y=Math.floor(pe.image.height*ce);de.setTexture2D(pe,0),oe.copyTexSubImage2D(3553,Ne,0,0,te.x,te.y,L,Y),we.unbindTexture()},this.copyTextureToTexture=function(te,pe,Ne,ce=0){const L=pe.image.width,Y=pe.image.height,ne=Ae.convert(Ne.format),fe=Ae.convert(Ne.type);de.setTexture2D(Ne,0),oe.pixelStorei(37440,Ne.flipY),oe.pixelStorei(37441,Ne.premultiplyAlpha),oe.pixelStorei(3317,Ne.unpackAlignment),pe.isDataTexture?oe.texSubImage2D(3553,ce,te.x,te.y,L,Y,ne,fe,pe.image.data):pe.isCompressedTexture?oe.compressedTexSubImage2D(3553,ce,te.x,te.y,pe.mipmaps[0].width,pe.mipmaps[0].height,ne,pe.mipmaps[0].data):oe.texSubImage2D(3553,ce,te.x,te.y,ne,fe,pe.image),ce===0&&Ne.generateMipmaps&&oe.generateMipmap(3553),we.unbindTexture()},this.copyTextureToTexture3D=function(te,pe,Ne,ce,L=0){if(v.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const Y=te.max.x-te.min.x+1,ne=te.max.y-te.min.y+1,fe=te.max.z-te.min.z+1,_e=Ae.convert(ce.format),Se=Ae.convert(ce.type);let Fe;if(ce.isData3DTexture)de.setTexture3D(ce,0),Fe=32879;else if(ce.isDataArrayTexture)de.setTexture2DArray(ce,0),Fe=35866;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}oe.pixelStorei(37440,ce.flipY),oe.pixelStorei(37441,ce.premultiplyAlpha),oe.pixelStorei(3317,ce.unpackAlignment);const Ce=oe.getParameter(3314),je=oe.getParameter(32878),qe=oe.getParameter(3316),Qe=oe.getParameter(3315),et=oe.getParameter(32877),jt=Ne.isCompressedTexture?Ne.mipmaps[0]:Ne.image;oe.pixelStorei(3314,jt.width),oe.pixelStorei(32878,jt.height),oe.pixelStorei(3316,te.min.x),oe.pixelStorei(3315,te.min.y),oe.pixelStorei(32877,te.min.z),Ne.isDataTexture||Ne.isData3DTexture?oe.texSubImage3D(Fe,L,pe.x,pe.y,pe.z,Y,ne,fe,_e,Se,jt.data):Ne.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),oe.compressedTexSubImage3D(Fe,L,pe.x,pe.y,pe.z,Y,ne,fe,_e,jt.data)):oe.texSubImage3D(Fe,L,pe.x,pe.y,pe.z,Y,ne,fe,_e,Se,jt),oe.pixelStorei(3314,Ce),oe.pixelStorei(32878,je),oe.pixelStorei(3316,qe),oe.pixelStorei(3315,Qe),oe.pixelStorei(32877,et),L===0&&ce.generateMipmaps&&oe.generateMipmap(Fe),we.unbindTexture()},this.initTexture=function(te){te.isCubeTexture?de.setTextureCube(te,0):te.isData3DTexture?de.setTexture3D(te,0):te.isDataArrayTexture||te.isCompressedArrayTexture?de.setTexture2DArray(te,0):de.setTexture2D(te,0),we.unbindTexture()},this.resetState=function(){w=0,S=0,E=null,we.reset(),vt.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get physicallyCorrectLights(){return console.warn("THREE.WebGLRenderer: the property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),!this.useLegacyLights}set physicallyCorrectLights(e){console.warn("THREE.WebGLRenderer: the property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),this.useLegacyLights=!e}}class Kj extends iR{}Kj.prototype.isWebGL1Renderer=!0;class MS{constructor(e,n=25e-5){this.isFogExp2=!0,this.name="",this.color=new lt(e),this.density=n}clone(){return new MS(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}}class ES{constructor(e,n=1,r=1e3){this.isFog=!0,this.name="",this.color=new lt(e),this.near=n,this.far=r}clone(){return new ES(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}}class Sc extends Dn{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,n){return super.copy(e,n),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const n=super.toJSON(e);return this.fog!==null&&(n.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(n.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(n.object.backgroundIntensity=this.backgroundIntensity),n}get autoUpdate(){return console.warn("THREE.Scene: autoUpdate was renamed to matrixWorldAutoUpdate in r144."),this.matrixWorldAutoUpdate}set autoUpdate(e){console.warn("THREE.Scene: autoUpdate was renamed to matrixWorldAutoUpdate in r144."),this.matrixWorldAutoUpdate=e}}class PS{constructor(e,n){this.isInterleavedBuffer=!0,this.array=e,this.stride=n,this.count=e!==void 0?e.length/n:0,this.usage=Qm,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=Co()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,n,r){e*=this.stride,r*=n.stride;for(let i=0,o=this.stride;ie.far||n.push({distance:l,point:cp.clone(),uv:lo.getInterpolation(cp,L0,dp,k0,vL,SE,yL,new Ee),face:null,object:this})}copy(e,n){return super.copy(e,n),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}}function N0(t,e,n,r,i,o){Gd.subVectors(t,n).addScalar(.5).multiply(r),i!==void 0?(up.x=o*Gd.x-i*Gd.y,up.y=i*Gd.x+o*Gd.y):up.copy(Gd),t.copy(e),t.x+=up.x,t.y+=up.y,t.applyMatrix4(Qj)}const F0=new Z,_L=new Z;class e8 extends Dn{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const n=e.levels;for(let r=0,i=n.length;r0){let r,i;for(r=1,i=n.length;r0){F0.setFromMatrixPosition(this.matrixWorld);const i=e.ray.origin.distanceTo(F0);this.getObjectForDistance(i).raycast(e,n)}}update(e){const n=this.levels;if(n.length>1){F0.setFromMatrixPosition(e.matrixWorld),_L.setFromMatrixPosition(this.matrixWorld);const r=F0.distanceTo(_L)/e.zoom;n[0].object.visible=!0;let i,o;for(i=1,o=n.length;i=s)n[i-1].object.visible=!1,n[i].object.visible=!0;else break}for(this._currentLevel=i-1;il)continue;f.applyMatrix4(this.matrixWorld);const R=e.ray.origin.distanceTo(f);Re.far||n.push({distance:R,point:d.clone().applyMatrix4(this.matrixWorld),index:w,face:null,faceIndex:null,object:this})}}else{const v=Math.max(0,s.start),x=Math.min(_.count,s.start+s.count);for(let w=v,S=x-1;wl)continue;f.applyMatrix4(this.matrixWorld);const C=e.ray.origin.distanceTo(f);Ce.far||n.push({distance:C,point:d.clone().applyMatrix4(this.matrixWorld),index:w,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const n=this.geometry.morphAttributes,r=Object.keys(n);if(r.length>0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=i.length;o0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=i.length;oi.far)return;o.push({distance:c,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,object:s})}}class a8 extends qn{constructor(e,n,r,i,o,s,a,l,c){super(e,n,r,i,o,s,a,l,c),this.isVideoTexture=!0,this.minFilter=s!==void 0?s:Dt,this.magFilter=o!==void 0?o:Dt,this.generateMipmaps=!1;const u=this;function d(){u.needsUpdate=!0,e.requestVideoFrameCallback(d)}"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback(d)}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;"requestVideoFrameCallback"in e===!1&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class k2 extends qn{constructor(e,n,r){super({width:e,height:n}),this.isFramebufferTexture=!0,this.format=r,this.magFilter=Qt,this.minFilter=Qt,this.generateMipmaps=!1,this.needsUpdate=!0}}class aR extends qn{constructor(e,n,r,i,o,s,a,l,c,u,d,f){super(null,s,a,l,c,u,i,o,d,f),this.isCompressedTexture=!0,this.image={width:n,height:r},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class Mae extends aR{constructor(e,n,r,i,o,s){super(e,n,r,o,s),this.isCompressedArrayTexture=!0,this.image.depth=i,this.wrapR=Xr}}class l8 extends qn{constructor(e,n,r,i,o,s,a,l,c){super(e,n,r,i,o,s,a,l,c),this.isCanvasTexture=!0,this.needsUpdate=!0}}class Gs{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,n){const r=this.getUtoTmapping(e);return this.getPoint(r,n)}getPoints(e=5){const n=[];for(let r=0;r<=e;r++)n.push(this.getPoint(r/e));return n}getSpacedPoints(e=5){const n=[];for(let r=0;r<=e;r++)n.push(this.getPointAt(r/e));return n}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const n=[];let r,i=this.getPoint(0),o=0;n.push(0);for(let s=1;s<=e;s++)r=this.getPoint(s/e),o+=r.distanceTo(i),n.push(o),i=r;return this.cacheArcLengths=n,n}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,n){const r=this.getLengths();let i=0;const o=r.length;let s;n?s=n:s=e*r[o-1];let a=0,l=o-1,c;for(;a<=l;)if(i=Math.floor(a+(l-a)/2),c=r[i]-s,c<0)a=i+1;else if(c>0)l=i-1;else{l=i;break}if(i=l,r[i]===s)return i/(o-1);const u=r[i],f=r[i+1]-u,h=(s-u)/f;return(i+h)/(o-1)}getTangent(e,n){let i=e-1e-4,o=e+1e-4;i<0&&(i=0),o>1&&(o=1);const s=this.getPoint(i),a=this.getPoint(o),l=n||(s.isVector2?new Ee:new Z);return l.copy(a).sub(s).normalize(),l}getTangentAt(e,n){const r=this.getUtoTmapping(e);return this.getTangent(r,n)}computeFrenetFrames(e,n){const r=new Z,i=[],o=[],s=[],a=new Z,l=new rt;for(let h=0;h<=e;h++){const g=h/e;i[h]=this.getTangentAt(g,new Z)}o[0]=new Z,s[0]=new Z;let c=Number.MAX_VALUE;const u=Math.abs(i[0].x),d=Math.abs(i[0].y),f=Math.abs(i[0].z);u<=c&&(c=u,r.set(1,0,0)),d<=c&&(c=d,r.set(0,1,0)),f<=c&&r.set(0,0,1),a.crossVectors(i[0],r).normalize(),o[0].crossVectors(i[0],a),s[0].crossVectors(i[0],o[0]);for(let h=1;h<=e;h++){if(o[h]=o[h-1].clone(),s[h]=s[h-1].clone(),a.crossVectors(i[h-1],i[h]),a.length()>Number.EPSILON){a.normalize();const g=Math.acos(Mr(i[h-1].dot(i[h]),-1,1));o[h].applyMatrix4(l.makeRotationAxis(a,g))}s[h].crossVectors(i[h],o[h])}if(n===!0){let h=Math.acos(Mr(o[0].dot(o[e]),-1,1));h/=e,i[0].dot(a.crossVectors(o[0],o[e]))>0&&(h=-h);for(let g=1;g<=e;g++)o[g].applyMatrix4(l.makeRotationAxis(i[g],h*g)),s[g].crossVectors(i[g],o[g])}return{tangents:i,normals:o,binormals:s}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class TS extends Gs{constructor(e=0,n=0,r=1,i=1,o=0,s=Math.PI*2,a=!1,l=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=n,this.xRadius=r,this.yRadius=i,this.aStartAngle=o,this.aEndAngle=s,this.aClockwise=a,this.aRotation=l}getPoint(e,n){const r=n||new Ee,i=Math.PI*2;let o=this.aEndAngle-this.aStartAngle;const s=Math.abs(o)i;)o-=i;o0?0:(Math.floor(Math.abs(a)/o)+1)*o:l===0&&a===o-1&&(a=o-2,l=1);let c,u;this.closed||a>0?c=i[(a-1)%o]:(V0.subVectors(i[0],i[1]).add(i[0]),c=V0);const d=i[a%o],f=i[(a+1)%o];if(this.closed||a+2i.length-2?i.length-1:s+1],d=i[s>i.length-3?i.length-1:s+2];return r.set(LL(a,l.x,c.x,u.x,d.x),LL(a,l.y,c.y,u.y,d.y)),r}copy(e){super.copy(e),this.points=[];for(let n=0,r=e.points.length;n=r){const s=i[o]-r,a=this.curves[o],l=a.getLength(),c=l===0?0:1-s/l;return a.getPointAt(c,n)}o++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let n=0;for(let r=0,i=this.curves.length;r1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n}copy(e){super.copy(e),this.curves=[];for(let n=0,r=e.curves.length;n0){const d=c.getPoint(0);d.equals(this.currentPoint)||this.lineTo(d.x,d.y)}this.curves.push(c);const u=c.getPoint(1);return this.currentPoint.copy(u),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class xh extends Jt{constructor(e=[new Ee(0,-.5),new Ee(.5,0),new Ee(0,.5)],n=12,r=0,i=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:e,segments:n,phiStart:r,phiLength:i},n=Math.floor(n),i=Mr(i,0,Math.PI*2);const o=[],s=[],a=[],l=[],c=[],u=1/n,d=new Z,f=new Ee,h=new Z,g=new Z,y=new Z;let _=0,v=0;for(let x=0;x<=e.length-1;x++)switch(x){case 0:_=e[x+1].x-e[x].x,v=e[x+1].y-e[x].y,h.x=v*1,h.y=-_,h.z=v*0,y.copy(h),h.normalize(),l.push(h.x,h.y,h.z);break;case e.length-1:l.push(y.x,y.y,y.z);break;default:_=e[x+1].x-e[x].x,v=e[x+1].y-e[x].y,h.x=v*1,h.y=-_,h.z=v*0,g.copy(h),h.x+=y.x,h.y+=y.y,h.z+=y.z,h.normalize(),l.push(h.x,h.y,h.z),y.copy(g)}for(let x=0;x<=n;x++){const w=r+x*u*i,S=Math.sin(w),E=Math.cos(w);for(let C=0;C<=e.length-1;C++){d.x=e[C].x*S,d.y=e[C].y,d.z=e[C].x*E,s.push(d.x,d.y,d.z),f.x=x/n,f.y=C/(e.length-1),a.push(f.x,f.y);const O=l[3*C+0]*S,R=l[3*C+1],T=l[3*C+0]*E;c.push(O,R,T)}}for(let x=0;x0&&w(!0),n>0&&w(!1)),this.setIndex(u),this.setAttribute("position",new Et(d,3)),this.setAttribute("normal",new Et(f,3)),this.setAttribute("uv",new Et(h,2));function x(){const S=new Z,E=new Z;let C=0;const O=(n-e)/r;for(let R=0;R<=o;R++){const T=[],A=R/o,F=A*(n-e)+e;for(let N=0;N<=i;N++){const U=N/i,k=U*l+a,z=Math.sin(k),G=Math.cos(k);E.x=F*z,E.y=-A*r+_,E.z=F*G,d.push(E.x,E.y,E.z),S.set(z,O,G).normalize(),f.push(S.x,S.y,S.z),h.push(U,1-A),T.push(g++)}y.push(T)}for(let R=0;R.9&&O<.1&&(w<.2&&(s[x+0]+=1),S<.2&&(s[x+2]+=1),E<.2&&(s[x+4]+=1))}}function f(x){o.push(x.x,x.y,x.z)}function h(x,w){const S=x*3;w.x=e[S+0],w.y=e[S+1],w.z=e[S+2]}function g(){const x=new Z,w=new Z,S=new Z,E=new Z,C=new Ee,O=new Ee,R=new Ee;for(let T=0,A=0;T80*n){a=c=t[0],l=u=t[1];for(let g=n;gc&&(c=d),f>u&&(u=f);h=Math.max(c-a,u-l),h=h!==0?32767/h:0}return tg(o,s,n,a,l,h,0),s}};function m8(t,e,n,r,i){let o,s;if(i===Xae(t,e,n,r)>0)for(o=e;o=e;o-=r)s=kL(o,t[o],t[o+1],s);return s&&RS(s,s.next)&&(rg(s),s=s.next),s}function Xu(t,e){if(!t)return t;e||(e=t);let n=t,r;do if(r=!1,!n.steiner&&(RS(n,n.next)||vr(n.prev,n,n.next)===0)){if(rg(n),n=e=n.prev,n===n.next)break;r=!0}else n=n.next;while(r||n!==e);return e}function tg(t,e,n,r,i,o,s){if(!t)return;!s&&o&&Vae(t,r,i,o);let a=t,l,c;for(;t.prev!==t.next;){if(l=t.prev,c=t.next,o?Lae(t,r,i,o):Iae(t)){e.push(l.i/n|0),e.push(t.i/n|0),e.push(c.i/n|0),rg(t),t=c.next,a=c.next;continue}if(t=c,t===a){s?s===1?(t=kae(Xu(t),e,n),tg(t,e,n,r,i,o,2)):s===2&&Nae(t,e,n,r,i,o):tg(Xu(t),e,n,r,i,o,1);break}}}function Iae(t){const e=t.prev,n=t,r=t.next;if(vr(e,n,r)>=0)return!1;const i=e.x,o=n.x,s=r.x,a=e.y,l=n.y,c=r.y,u=io?i>s?i:s:o>s?o:s,h=a>l?a>c?a:c:l>c?l:c;let g=r.next;for(;g!==e;){if(g.x>=u&&g.x<=f&&g.y>=d&&g.y<=h&&Rf(i,a,o,l,s,c,g.x,g.y)&&vr(g.prev,g,g.next)>=0)return!1;g=g.next}return!0}function Lae(t,e,n,r){const i=t.prev,o=t,s=t.next;if(vr(i,o,s)>=0)return!1;const a=i.x,l=o.x,c=s.x,u=i.y,d=o.y,f=s.y,h=al?a>c?a:c:l>c?l:c,_=u>d?u>f?u:f:d>f?d:f,v=N2(h,g,e,n,r),x=N2(y,_,e,n,r);let w=t.prevZ,S=t.nextZ;for(;w&&w.z>=v&&S&&S.z<=x;){if(w.x>=h&&w.x<=y&&w.y>=g&&w.y<=_&&w!==i&&w!==s&&Rf(a,u,l,d,c,f,w.x,w.y)&&vr(w.prev,w,w.next)>=0||(w=w.prevZ,S.x>=h&&S.x<=y&&S.y>=g&&S.y<=_&&S!==i&&S!==s&&Rf(a,u,l,d,c,f,S.x,S.y)&&vr(S.prev,S,S.next)>=0))return!1;S=S.nextZ}for(;w&&w.z>=v;){if(w.x>=h&&w.x<=y&&w.y>=g&&w.y<=_&&w!==i&&w!==s&&Rf(a,u,l,d,c,f,w.x,w.y)&&vr(w.prev,w,w.next)>=0)return!1;w=w.prevZ}for(;S&&S.z<=x;){if(S.x>=h&&S.x<=y&&S.y>=g&&S.y<=_&&S!==i&&S!==s&&Rf(a,u,l,d,c,f,S.x,S.y)&&vr(S.prev,S,S.next)>=0)return!1;S=S.nextZ}return!0}function kae(t,e,n){let r=t;do{const i=r.prev,o=r.next.next;!RS(i,o)&&g8(i,r,r.next,o)&&ng(i,o)&&ng(o,i)&&(e.push(i.i/n|0),e.push(r.i/n|0),e.push(o.i/n|0),rg(r),rg(r.next),r=t=o),r=r.next}while(r!==t);return Xu(r)}function Nae(t,e,n,r,i,o){let s=t;do{let a=s.next.next;for(;a!==s.prev;){if(s.i!==a.i&&Gae(s,a)){let l=v8(s,a);s=Xu(s,s.next),l=Xu(l,l.next),tg(s,e,n,r,i,o,0),tg(l,e,n,r,i,o,0);return}a=a.next}s=s.next}while(s!==t)}function Fae(t,e,n,r){const i=[];let o,s,a,l,c;for(o=0,s=e.length;o=n.next.y&&n.next.y!==n.y){const f=n.x+(s-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(f<=o&&f>r&&(r=f,i=n.x=n.x&&n.x>=l&&o!==n.x&&Rf(si.x||n.x===i.x&&Hae(i,n)))&&(i=n,u=d)),n=n.next;while(n!==a);return i}function Hae(t,e){return vr(t.prev,t,e.prev)<0&&vr(e.next,t,t.next)<0}function Vae(t,e,n,r){let i=t;do i.z===0&&(i.z=N2(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,jae(i)}function jae(t){let e,n,r,i,o,s,a,l,c=1;do{for(n=t,t=null,o=null,s=0;n;){for(s++,r=n,a=0,e=0;e0||l>0&&r;)a!==0&&(l===0||!r||n.z<=r.z)?(i=n,n=n.nextZ,a--):(i=r,r=r.nextZ,l--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,c*=2}while(s>1);return t}function N2(t,e,n,r,i){return t=(t-n)*i|0,e=(e-r)*i|0,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t|e<<1}function $ae(t){let e=t,n=t;do(e.x=(t-s)*(o-a)&&(t-s)*(r-a)>=(n-s)*(e-a)&&(n-s)*(o-a)>=(i-s)*(r-a)}function Gae(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!Wae(t,e)&&(ng(t,e)&&ng(e,t)&&Yae(t,e)&&(vr(t.prev,t,e.prev)||vr(t,e.prev,e))||RS(t,e)&&vr(t.prev,t,t.next)>0&&vr(e.prev,e,e.next)>0)}function vr(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function RS(t,e){return t.x===e.x&&t.y===e.y}function g8(t,e,n,r){const i=Y0(vr(t,e,n)),o=Y0(vr(t,e,r)),s=Y0(vr(n,r,t)),a=Y0(vr(n,r,e));return!!(i!==o&&s!==a||i===0&&W0(t,n,e)||o===0&&W0(t,r,e)||s===0&&W0(n,t,r)||a===0&&W0(n,e,r))}function W0(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function Y0(t){return t>0?1:t<0?-1:0}function Wae(t,e){let n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&g8(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}function ng(t,e){return vr(t.prev,t,t.next)<0?vr(t,e,t.next)>=0&&vr(t,t.prev,e)>=0:vr(t,e,t.prev)<0||vr(t,t.next,e)<0}function Yae(t,e){let n=t,r=!1;const i=(t.x+e.x)/2,o=(t.y+e.y)/2;do n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next;while(n!==t);return r}function v8(t,e){const n=new F2(t.i,t.x,t.y),r=new F2(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function kL(t,e,n,r){const i=new F2(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function rg(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function F2(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Xae(t,e,n,r){let i=0;for(let o=e,s=n-r;o2&&t[e-1].equals(t[0])&&t.pop()}function FL(t,e){for(let n=0;nNumber.EPSILON){const Pe=Math.sqrt(ee),$e=Math.sqrt(We*We+ht*ht),Ge=se.x-dt/Pe,Ke=se.y+ot/Pe,gt=de.x-ht/$e,ut=de.y+We/$e,Ae=((gt-Ge)*ht-(ut-Ke)*We)/(ot*ht-dt*We);ke=Ge+ot*Ae-me.x,Ve=Ke+dt*Ae-me.y;const vt=ke*ke+Ve*Ve;if(vt<=2)return new Ee(ke,Ve);Ze=Math.sqrt(vt/2)}else{let Pe=!1;ot>Number.EPSILON?We>Number.EPSILON&&(Pe=!0):ot<-Number.EPSILON?We<-Number.EPSILON&&(Pe=!0):Math.sign(dt)===Math.sign(ht)&&(Pe=!0),Pe?(ke=-dt,Ve=ot,Ze=Math.sqrt(ee)):(ke=ot,Ve=dt,Ze=Math.sqrt(ee/2))}return new Ee(ke/Ze,Ve/Ze)}const j=[];for(let me=0,se=k.length,de=se-1,ke=me+1;me=0;me--){const se=me/_,de=h*Math.cos(se*Math.PI/2),ke=g*Math.sin(se*Math.PI/2)+y;for(let Ve=0,Ze=k.length;Ve=0;){const ke=de;let Ve=de-1;Ve<0&&(Ve=me.length-1);for(let Ze=0,ot=u+_*2;Ze0)&&h.push(w,S,C),(v!==r-1||l0!=e>0&&this.version++,this._sheen=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class w8 extends jr{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new lt(16777215),this.specular=new lt(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new lt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=yl,this.normalScale=new Ee(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Mg,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class S8 extends jr{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new lt(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new lt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=yl,this.normalScale=new Ee(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}class mR extends jr{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=yl,this.normalScale=new Ee(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}}class b8 extends jr{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new lt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new lt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=yl,this.normalScale=new Ee(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Mg,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class M8 extends jr{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new lt(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=yl,this.normalScale=new Ee(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this.fog=e.fog,this}}class E8 extends eo{constructor(e){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}function qo(t,e,n){return gR(t)?new t.constructor(t.subarray(e,n!==void 0?n:t.length)):t.slice(e,n)}function Ru(t,e,n){return!t||!n&&t.constructor===e?t:typeof e.BYTES_PER_ELEMENT=="number"?new e(t):Array.prototype.slice.call(t)}function gR(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function P8(t){function e(i,o){return t[i]-t[o]}const n=t.length,r=new Array(n);for(let i=0;i!==n;++i)r[i]=i;return r.sort(e),r}function z2(t,e,n){const r=t.length,i=new t.constructor(r);for(let o=0,s=0;s!==r;++o){const a=n[o]*e;for(let l=0;l!==e;++l)i[s++]=t[a+l]}return i}function vR(t,e,n,r){let i=1,o=t[0];for(;o!==void 0&&o[r]===void 0;)o=t[i++];if(o===void 0)return;let s=o[r];if(s!==void 0)if(Array.isArray(s))do s=o[r],s!==void 0&&(e.push(o.time),n.push.apply(n,s)),o=t[i++];while(o!==void 0);else if(s.toArray!==void 0)do s=o[r],s!==void 0&&(e.push(o.time),s.toArray(n,n.length)),o=t[i++];while(o!==void 0);else do s=o[r],s!==void 0&&(e.push(o.time),n.push(s)),o=t[i++];while(o!==void 0)}function Qae(t,e,n,r,i=30){const o=t.clone();o.name=e;const s=[];for(let l=0;l=r)){d.push(c.times[h]);for(let y=0;yo.tracks[l].times[0]&&(a=o.tracks[l].times[0]);for(let l=0;l=a.times[g]){const v=g*d+u,x=v+d-u;y=qo(a.values,v,x)}else{const v=a.createInterpolant(),x=u,w=d-u;v.evaluate(o),y=qo(v.resultBuffer,x,w)}l==="quaternion"&&new Hn().fromArray(y).normalize().conjugate().toArray(y);const _=c.times.length;for(let v=0;v<_;++v){const x=v*h+f;if(l==="quaternion")Hn.multiplyQuaternionsFlat(c.values,x,y,0,c.values,x);else{const w=h-f*2;for(let S=0;S=o)){const a=n[1];e=o)break t}s=r,r=0;break n}break e}for(;r>>1;en;)--s;if(++s,o!==0||s!==i){o>=s&&(s=Math.max(s,1),o=s-1);const a=this.getValueSize();this.times=qo(r,o,s),this.values=qo(this.values,o*a,s*a)}return this}validate(){let e=!0;const n=this.getValueSize();n-Math.floor(n)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const r=this.times,i=this.values,o=r.length;o===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let s=null;for(let a=0;a!==o;a++){const l=r[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),e=!1;break}if(s!==null&&s>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,s),e=!1;break}s=l}if(i!==void 0&&gR(i))for(let a=0,l=i.length;a!==l;++a){const c=i[a];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,c),e=!1;break}}return e}optimize(){const e=qo(this.times),n=qo(this.values),r=this.getValueSize(),i=this.getInterpolation()===O_,o=e.length-1;let s=1;for(let a=1;a0){e[s]=e[o];for(let a=o*r,l=s*r,c=0;c!==r;++c)n[l+c]=n[a+c];++s}return s!==e.length?(this.times=qo(e,0,s),this.values=qo(n,0,s*r)):(this.times=e,this.values=n),this}clone(){const e=qo(this.times,0),n=qo(this.values,0),r=this.constructor,i=new r(this.name,e,n);return i.createInterpolant=this.createInterpolant,i}}Ws.prototype.TimeBufferType=Float32Array;Ws.prototype.ValueBufferType=Float32Array;Ws.prototype.DefaultInterpolation=qm;class id extends Ws{}id.prototype.ValueTypeName="bool";id.prototype.ValueBufferType=Array;id.prototype.DefaultInterpolation=Zm;id.prototype.InterpolantFactoryMethodLinear=void 0;id.prototype.InterpolantFactoryMethodSmooth=void 0;class _R extends Ws{}_R.prototype.ValueTypeName="color";class ig extends Ws{}ig.prototype.ValueTypeName="number";class O8 extends Ug{constructor(e,n,r,i){super(e,n,r,i)}interpolate_(e,n,r,i){const o=this.resultBuffer,s=this.sampleValues,a=this.valueSize,l=(r-n)/(i-n);let c=e*a;for(let u=c+a;c!==u;c+=4)Hn.slerpFlat(o,0,s,c-a,s,c,l);return o}}class bh extends Ws{InterpolantFactoryMethodLinear(e){return new O8(this.times,this.values,this.getValueSize(),e)}}bh.prototype.ValueTypeName="quaternion";bh.prototype.DefaultInterpolation=qm;bh.prototype.InterpolantFactoryMethodSmooth=void 0;class od extends Ws{}od.prototype.ValueTypeName="string";od.prototype.ValueBufferType=Array;od.prototype.DefaultInterpolation=Zm;od.prototype.InterpolantFactoryMethodLinear=void 0;od.prototype.InterpolantFactoryMethodSmooth=void 0;class og extends Ws{}og.prototype.ValueTypeName="vector";class sg{constructor(e,n=-1,r,i=vS){this.name=e,this.tracks=r,this.duration=n,this.blendMode=i,this.uuid=Co(),this.duration<0&&this.resetDuration()}static parse(e){const n=[],r=e.tracks,i=1/(e.fps||1);for(let s=0,a=r.length;s!==a;++s)n.push(nle(r[s]).scale(i));const o=new this(e.name,e.duration,n,e.blendMode);return o.uuid=e.uuid,o}static toJSON(e){const n=[],r=e.tracks,i={name:e.name,duration:e.duration,tracks:n,uuid:e.uuid,blendMode:e.blendMode};for(let o=0,s=r.length;o!==s;++o)n.push(Ws.toJSON(r[o]));return i}static CreateFromMorphTargetSequence(e,n,r,i){const o=n.length,s=[];for(let a=0;a1){const d=u[1];let f=i[d];f||(i[d]=f=[]),f.push(c)}}const s=[];for(const a in i)s.push(this.CreateFromMorphTargetSequence(a,i[a],n,r));return s}static parseAnimation(e,n){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const r=function(d,f,h,g,y){if(h.length!==0){const _=[],v=[];vR(h,_,v,g),_.length!==0&&y.push(new d(f,_,v))}},i=[],o=e.name||"default",s=e.fps||30,a=e.blendMode;let l=e.length||-1;const c=e.hierarchy||[];for(let d=0;d{n&&n(o),this.manager.itemEnd(e)},0),o;if(Ya[e]!==void 0){Ya[e].push({onLoad:n,onProgress:r,onError:i});return}Ya[e]=[],Ya[e].push({onLoad:n,onProgress:r,onError:i});const s=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,l=this.responseType;fetch(s).then(c=>{if(c.status===200||c.status===0){if(c.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||c.body===void 0||c.body.getReader===void 0)return c;const u=Ya[e],d=c.body.getReader(),f=c.headers.get("Content-Length")||c.headers.get("X-File-Size"),h=f?parseInt(f):0,g=h!==0;let y=0;const _=new ReadableStream({start(v){x();function x(){d.read().then(({done:w,value:S})=>{if(w)v.close();else{y+=S.byteLength;const E=new ProgressEvent("progress",{lengthComputable:g,loaded:y,total:h});for(let C=0,O=u.length;C{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(u=>new DOMParser().parseFromString(u,a));case"json":return c.json();default:if(a===void 0)return c.text();{const d=/charset="?([^;"\s]*)"?/i.exec(a),f=d&&d[1]?d[1].toLowerCase():void 0,h=new TextDecoder(f);return c.arrayBuffer().then(g=>h.decode(g))}}}).then(c=>{Zu.add(e,c);const u=Ya[e];delete Ya[e];for(let d=0,f=u.length;d{const u=Ya[e];if(u===void 0)throw this.manager.itemError(e),c;delete Ya[e];for(let d=0,f=u.length;d{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class ile extends No{constructor(e){super(e)}load(e,n,r,i){const o=this,s=new hl(this.manager);s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,function(a){try{n(o.parse(JSON.parse(a)))}catch(l){i?i(l):console.error(l),o.manager.itemError(e)}},r,i)}parse(e){const n=[];for(let r=0;r0:i.vertexColors=e.vertexColors),e.uniforms!==void 0)for(const o in e.uniforms){const s=e.uniforms[o];switch(i.uniforms[o]={},s.type){case"t":i.uniforms[o].value=r(s.value);break;case"c":i.uniforms[o].value=new lt().setHex(s.value);break;case"v2":i.uniforms[o].value=new Ee().fromArray(s.value);break;case"v3":i.uniforms[o].value=new Z().fromArray(s.value);break;case"v4":i.uniforms[o].value=new an().fromArray(s.value);break;case"m3":i.uniforms[o].value=new mn().fromArray(s.value);break;case"m4":i.uniforms[o].value=new rt().fromArray(s.value);break;default:i.uniforms[o].value=s.value}}if(e.defines!==void 0&&(i.defines=e.defines),e.vertexShader!==void 0&&(i.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(i.fragmentShader=e.fragmentShader),e.glslVersion!==void 0&&(i.glslVersion=e.glslVersion),e.extensions!==void 0)for(const o in e.extensions)i.extensions[o]=e.extensions[o];if(e.size!==void 0&&(i.size=e.size),e.sizeAttenuation!==void 0&&(i.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(i.map=r(e.map)),e.matcap!==void 0&&(i.matcap=r(e.matcap)),e.alphaMap!==void 0&&(i.alphaMap=r(e.alphaMap)),e.bumpMap!==void 0&&(i.bumpMap=r(e.bumpMap)),e.bumpScale!==void 0&&(i.bumpScale=e.bumpScale),e.normalMap!==void 0&&(i.normalMap=r(e.normalMap)),e.normalMapType!==void 0&&(i.normalMapType=e.normalMapType),e.normalScale!==void 0){let o=e.normalScale;Array.isArray(o)===!1&&(o=[o,o]),i.normalScale=new Ee().fromArray(o)}return e.displacementMap!==void 0&&(i.displacementMap=r(e.displacementMap)),e.displacementScale!==void 0&&(i.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(i.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(i.roughnessMap=r(e.roughnessMap)),e.metalnessMap!==void 0&&(i.metalnessMap=r(e.metalnessMap)),e.emissiveMap!==void 0&&(i.emissiveMap=r(e.emissiveMap)),e.emissiveIntensity!==void 0&&(i.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(i.specularMap=r(e.specularMap)),e.specularIntensityMap!==void 0&&(i.specularIntensityMap=r(e.specularIntensityMap)),e.specularColorMap!==void 0&&(i.specularColorMap=r(e.specularColorMap)),e.envMap!==void 0&&(i.envMap=r(e.envMap)),e.envMapIntensity!==void 0&&(i.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(i.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(i.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(i.lightMap=r(e.lightMap)),e.lightMapIntensity!==void 0&&(i.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(i.aoMap=r(e.aoMap)),e.aoMapIntensity!==void 0&&(i.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(i.gradientMap=r(e.gradientMap)),e.clearcoatMap!==void 0&&(i.clearcoatMap=r(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(i.clearcoatRoughnessMap=r(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(i.clearcoatNormalMap=r(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(i.clearcoatNormalScale=new Ee().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(i.iridescenceMap=r(e.iridescenceMap)),e.iridescenceThicknessMap!==void 0&&(i.iridescenceThicknessMap=r(e.iridescenceThicknessMap)),e.transmissionMap!==void 0&&(i.transmissionMap=r(e.transmissionMap)),e.thicknessMap!==void 0&&(i.thicknessMap=r(e.thicknessMap)),e.sheenColorMap!==void 0&&(i.sheenColorMap=r(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(i.sheenRoughnessMap=r(e.sheenRoughnessMap)),i}setTextures(e){return this.textures=e,this}static createMaterialFromType(e){const n={ShadowMaterial:y8,SpriteMaterial:oR,RawShaderMaterial:_8,ShaderMaterial:sn,PointsMaterial:CS,MeshPhysicalMaterial:x8,MeshStandardMaterial:AS,MeshPhongMaterial:w8,MeshToonMaterial:S8,MeshNormalMaterial:mR,MeshLambertMaterial:b8,MeshDepthMaterial:SS,MeshDistanceMaterial:rR,MeshBasicMaterial:_l,MeshMatcapMaterial:M8,LineDashedMaterial:E8,LineBasicMaterial:eo,Material:jr};return new n[e]}}class U2{static decodeText(e){if(typeof TextDecoder<"u")return new TextDecoder().decode(e);let n="";for(let r=0,i=e.length;r0){const l=new xR(n);o=new ag(l),o.setCrossOrigin(this.crossOrigin);for(let c=0,u=e.length;c0){i=new ag(this.manager),i.setCrossOrigin(this.crossOrigin);for(let s=0,a=e.length;s"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,n,r,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const o=this,s=Zu.get(e);if(s!==void 0)return o.manager.itemStart(e),setTimeout(function(){n&&n(s),o.manager.itemEnd(e)},0),s;const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader,fetch(e,a).then(function(l){return l.blob()}).then(function(l){return createImageBitmap(l,Object.assign(o.options,{colorSpaceConversion:"none"}))}).then(function(l){Zu.add(e,l),n&&n(l),o.manager.itemEnd(e)}).catch(function(l){i&&i(l),o.manager.itemError(e),o.manager.itemEnd(e)}),o.manager.itemStart(e)}}let X0;class MR{static getContext(){return X0===void 0&&(X0=new(window.AudioContext||window.webkitAudioContext)),X0}static setContext(e){X0=e}}class fle extends No{constructor(e){super(e)}load(e,n,r,i){const o=this,s=new hl(this.manager);s.setResponseType("arraybuffer"),s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,function(a){try{const l=a.slice(0);MR.getContext().decodeAudioData(l,function(u){n(u)})}catch(l){i?i(l):console.error(l),o.manager.itemError(e)}},r,i)}}class hle extends DS{constructor(e,n,r=1){super(void 0,r),this.isHemisphereLightProbe=!0;const i=new lt().set(e),o=new lt().set(n),s=new Z(i.r,i.g,i.b),a=new Z(o.r,o.g,o.b),l=Math.sqrt(Math.PI),c=l*Math.sqrt(.75);this.sh.coefficients[0].copy(s).add(a).multiplyScalar(l),this.sh.coefficients[1].copy(s).sub(a).multiplyScalar(c)}}class ple extends DS{constructor(e,n=1){super(void 0,n),this.isAmbientLightProbe=!0;const r=new lt().set(e);this.sh.coefficients[0].set(r.r,r.g,r.b).multiplyScalar(2*Math.sqrt(Math.PI))}}const GL=new rt,WL=new rt,Qc=new rt;class mle{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new or,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new or,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(e){const n=this._cache;if(n.focus!==e.focus||n.fov!==e.fov||n.aspect!==e.aspect*this.aspect||n.near!==e.near||n.far!==e.far||n.zoom!==e.zoom||n.eyeSep!==this.eyeSep){n.focus=e.focus,n.fov=e.fov,n.aspect=e.aspect*this.aspect,n.near=e.near,n.far=e.far,n.zoom=e.zoom,n.eyeSep=this.eyeSep,Qc.copy(e.projectionMatrix);const i=n.eyeSep/2,o=i*n.near/n.focus,s=n.near*Math.tan(Fu*n.fov*.5)/n.zoom;let a,l;WL.elements[12]=-i,GL.elements[12]=i,a=-s*n.aspect+o,l=s*n.aspect+o,Qc.elements[0]=2*n.near/(l-a),Qc.elements[8]=(l+a)/(l-a),this.cameraL.projectionMatrix.copy(Qc),a=-s*n.aspect-o,l=s*n.aspect-o,Qc.elements[0]=2*n.near/(l-a),Qc.elements[8]=(l+a)/(l-a),this.cameraR.projectionMatrix.copy(Qc)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(WL),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(GL)}}class ER{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=YL(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const n=YL();e=(n-this.oldTime)/1e3,this.oldTime=n,this.elapsedTime+=e}return e}}function YL(){return(typeof performance>"u"?Date:performance).now()}const Jc=new Z,XL=new Hn,gle=new Z,eu=new Z;class vle extends Dn{constructor(){super(),this.type="AudioListener",this.context=MR.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new ER}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);const n=this.context.listener,r=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(Jc,XL,gle),eu.set(0,0,-1).applyQuaternion(XL),n.positionX){const i=this.context.currentTime+this.timeDelta;n.positionX.linearRampToValueAtTime(Jc.x,i),n.positionY.linearRampToValueAtTime(Jc.y,i),n.positionZ.linearRampToValueAtTime(Jc.z,i),n.forwardX.linearRampToValueAtTime(eu.x,i),n.forwardY.linearRampToValueAtTime(eu.y,i),n.forwardZ.linearRampToValueAtTime(eu.z,i),n.upX.linearRampToValueAtTime(r.x,i),n.upY.linearRampToValueAtTime(r.y,i),n.upZ.linearRampToValueAtTime(r.z,i)}else n.setPosition(Jc.x,Jc.y,Jc.z),n.setOrientation(eu.x,eu.y,eu.z,r.x,r.y,r.z)}}class B8 extends Dn{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(this.isPlaying===!0){console.warn("THREE.Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+e;const n=this.context.createBufferSource();return n.buffer=this.buffer,n.loop=this.loop,n.loopStart=this.loopStart,n.loopEnd=this.loopEnd,n.onended=this.onEnded.bind(this),n.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=n,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this._progress=0,this.source!==null&&(this.source.stop(),this.source.onended=null),this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,n=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(let e=1,n=this.filters.length;e0&&this._mixBufferRegionAdditive(r,i,this._addIndex*n,1,n);for(let l=n,c=n+n;l!==c;++l)if(r[l]!==r[l+n]){a.setValue(r,i);break}}saveOriginalState(){const e=this.binding,n=this.buffer,r=this.valueSize,i=r*this._origIndex;e.getValue(n,i);for(let o=r,s=i;o!==s;++o)n[o]=n[i+o%r];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=this.valueSize*3;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,n=e+this.valueSize;for(let r=e;r=.5)for(let s=0;s!==o;++s)e[n+s]=e[r+s]}_slerp(e,n,r,i){Hn.slerpFlat(e,n,e,n,e,r,i)}_slerpAdditive(e,n,r,i,o){const s=this._workIndex*o;Hn.multiplyQuaternionsFlat(e,s,e,n,e,r),Hn.slerpFlat(e,n,e,n,e,s,i)}_lerp(e,n,r,i,o){const s=1-i;for(let a=0;a!==o;++a){const l=n+a;e[l]=e[l]*s+e[r+a]*i}}_lerpAdditive(e,n,r,i,o){for(let s=0;s!==o;++s){const a=n+s;e[a]=e[a]+e[r+s]*i}}}const PR="\\[\\]\\.:\\/",wle=new RegExp("["+PR+"]","g"),CR="[^"+PR+"]",Sle="[^"+PR.replace("\\.","")+"]",ble=/((?:WC+[\/:])*)/.source.replace("WC",CR),Mle=/(WCOD+)?/.source.replace("WCOD",Sle),Ele=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",CR),Ple=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",CR),Cle=new RegExp("^"+ble+Mle+Ele+Ple+"$"),Tle=["material","materials","bones","map"];class Ole{constructor(e,n,r){const i=r||Sn.parseTrackName(n);this._targetGroup=e,this._bindings=e.subscribe_(n,i)}getValue(e,n){this.bind();const r=this._targetGroup.nCachedObjects_,i=this._bindings[r];i!==void 0&&i.getValue(e,n)}setValue(e,n){const r=this._bindings;for(let i=this._targetGroup.nCachedObjects_,o=r.length;i!==o;++i)r[i].setValue(e,n)}bind(){const e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,r=e.length;n!==r;++n)e[n].bind()}unbind(){const e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,r=e.length;n!==r;++n)e[n].unbind()}}class Sn{constructor(e,n,r){this.path=n,this.parsedPath=r||Sn.parseTrackName(n),this.node=Sn.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,n,r){return e&&e.isAnimationObjectGroup?new Sn.Composite(e,n,r):new Sn(e,n,r)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(wle,"")}static parseTrackName(e){const n=Cle.exec(e);if(n===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const r={nodeName:n[2],objectName:n[3],objectIndex:n[4],propertyName:n[5],propertyIndex:n[6]},i=r.nodeName&&r.nodeName.lastIndexOf(".");if(i!==void 0&&i!==-1){const o=r.nodeName.substring(i+1);Tle.indexOf(o)!==-1&&(r.nodeName=r.nodeName.substring(0,i),r.objectName=o)}if(r.propertyName===null||r.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return r}static findNode(e,n){if(n===void 0||n===""||n==="."||n===-1||n===e.name||n===e.uuid)return e;if(e.skeleton){const r=e.skeleton.getBoneByName(n);if(r!==void 0)return r}if(e.children){const r=function(o){for(let s=0;s=o){const d=o++,f=e[d];n[f.uuid]=u,e[u]=f,n[c]=d,e[d]=l;for(let h=0,g=i;h!==g;++h){const y=r[h],_=y[d],v=y[u];y[u]=_,y[d]=v}}}this.nCachedObjects_=o}uncache(){const e=this._objects,n=this._indicesByUUID,r=this._bindings,i=r.length;let o=this.nCachedObjects_,s=e.length;for(let a=0,l=arguments.length;a!==l;++a){const c=arguments[a],u=c.uuid,d=n[u];if(d!==void 0)if(delete n[u],d0&&(n[h.uuid]=d),e[d]=h,e.pop();for(let g=0,y=i;g!==y;++g){const _=r[g];_[d]=_[f],_.pop()}}}this.nCachedObjects_=o}subscribe_(e,n){const r=this._bindingsIndicesByPath;let i=r[e];const o=this._bindings;if(i!==void 0)return o[i];const s=this._paths,a=this._parsedPaths,l=this._objects,c=l.length,u=this.nCachedObjects_,d=new Array(c);i=o.length,r[e]=i,s.push(e),a.push(n),o.push(d);for(let f=u,h=l.length;f!==h;++f){const g=l[f];d[f]=new Sn(g,e,n)}return d}unsubscribe_(e){const n=this._bindingsIndicesByPath,r=n[e];if(r!==void 0){const i=this._paths,o=this._parsedPaths,s=this._bindings,a=s.length-1,l=s[a],c=e[a];n[c]=r,s[r]=l,s.pop(),o[r]=o[a],o.pop(),i[r]=i[a],i.pop()}}}class V8{constructor(e,n,r=null,i=n.blendMode){this._mixer=e,this._clip=n,this._localRoot=r,this.blendMode=i;const o=n.tracks,s=o.length,a=new Array(s),l={endingStart:Mu,endingEnd:Mu};for(let c=0;c!==s;++c){const u=o[c].createInterpolant(null);a[c]=u,u.settings=l}this._interpolantSettings=l,this._interpolants=a,this._propertyBindings=new Array(s),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=Lj,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,n){return this.loop=e,this.repetitions=n,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,n,r){if(e.fadeOut(n),this.fadeIn(n),r){const i=this._clip.duration,o=e._clip.duration,s=o/i,a=i/o;e.warp(1,s,n),this.warp(a,1,n)}return this}crossFadeTo(e,n,r){return e.crossFadeFrom(this,n,r)}stopFading(){const e=this._weightInterpolant;return e!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,n,r){const i=this._mixer,o=i.time,s=this.timeScale;let a=this._timeScaleInterpolant;a===null&&(a=i._lendControlInterpolant(),this._timeScaleInterpolant=a);const l=a.parameterPositions,c=a.sampleValues;return l[0]=o,l[1]=o+r,c[0]=e/s,c[1]=n/s,this}stopWarping(){const e=this._timeScaleInterpolant;return e!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,n,r,i){if(!this.enabled){this._updateWeight(e);return}const o=this._startTime;if(o!==null){const l=(e-o)*r;l<0||r===0?n=0:(this._startTime=null,n=r*l)}n*=this._updateTimeScale(e);const s=this._updateTime(n),a=this._updateWeight(e);if(a>0){const l=this._interpolants,c=this._propertyBindings;switch(this.blendMode){case ZO:for(let u=0,d=l.length;u!==d;++u)l[u].evaluate(s),c[u].accumulateAdditive(a);break;case vS:default:for(let u=0,d=l.length;u!==d;++u)l[u].evaluate(s),c[u].accumulate(i,a)}}}_updateWeight(e){let n=0;if(this.enabled){n=this.weight;const r=this._weightInterpolant;if(r!==null){const i=r.evaluate(e)[0];n*=i,e>r.parameterPositions[1]&&(this.stopFading(),i===0&&(this.enabled=!1))}}return this._effectiveWeight=n,n}_updateTimeScale(e){let n=0;if(!this.paused){n=this.timeScale;const r=this._timeScaleInterpolant;if(r!==null){const i=r.evaluate(e)[0];n*=i,e>r.parameterPositions[1]&&(this.stopWarping(),n===0?this.paused=!0:this.timeScale=n)}}return this._effectiveTimeScale=n,n}_updateTime(e){const n=this._clip.duration,r=this.loop;let i=this.time+e,o=this._loopCount;const s=r===kj;if(e===0)return o===-1?i:s&&(o&1)===1?n-i:i;if(r===Ij){o===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(i>=n)i=n;else if(i<0)i=0;else{this.time=i;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(o===-1&&(e>=0?(o=0,this._setEndings(!0,this.repetitions===0,s)):this._setEndings(this.repetitions===0,!0,s)),i>=n||i<0){const a=Math.floor(i/n);i-=n*a,o+=Math.abs(a);const l=this.repetitions-o;if(l<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,i=e>0?n:0,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(l===1){const c=e<0;this._setEndings(c,!c,s)}else this._setEndings(!1,!1,s);this._loopCount=o,this.time=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}else this.time=i;if(s&&(o&1)===1)return n-i}return i}_setEndings(e,n,r){const i=this._interpolantSettings;r?(i.endingStart=Eu,i.endingEnd=Eu):(e?i.endingStart=this.zeroSlopeAtStart?Eu:Mu:i.endingStart=Km,n?i.endingEnd=this.zeroSlopeAtEnd?Eu:Mu:i.endingEnd=Km)}_scheduleFading(e,n,r){const i=this._mixer,o=i.time;let s=this._weightInterpolant;s===null&&(s=i._lendControlInterpolant(),this._weightInterpolant=s);const a=s.parameterPositions,l=s.sampleValues;return a[0]=o,l[0]=n,a[1]=o+e,l[1]=r,this}}const Ale=new Float32Array(1);class Dle extends hs{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,n){const r=e._localRoot||this._root,i=e._clip.tracks,o=i.length,s=e._propertyBindings,a=e._interpolants,l=r.uuid,c=this._bindingsByRootAndName;let u=c[l];u===void 0&&(u={},c[l]=u);for(let d=0;d!==o;++d){const f=i[d],h=f.name;let g=u[h];if(g!==void 0)++g.referenceCount,s[d]=g;else{if(g=s[d],g!==void 0){g._cacheIndex===null&&(++g.referenceCount,this._addInactiveBinding(g,l,h));continue}const y=n&&n._propertyBindings[d].binding.parsedPath;g=new H8(Sn.create(r,h,y),f.ValueTypeName,f.getValueSize()),++g.referenceCount,this._addInactiveBinding(g,l,h),s[d]=g}a[d].resultBuffer=g.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){const r=(e._localRoot||this._root).uuid,i=e._clip.uuid,o=this._actionsByClip[i];this._bindAction(e,o&&o.knownActions[0]),this._addInactiveAction(e,i,r)}const n=e._propertyBindings;for(let r=0,i=n.length;r!==i;++r){const o=n[r];o.useCount++===0&&(this._lendBinding(o),o.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const n=e._propertyBindings;for(let r=0,i=n.length;r!==i;++r){const o=n[r];--o.useCount===0&&(o.restoreOriginalState(),this._takeBackBinding(o))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const n=e._cacheIndex;return n!==null&&n=0;--r)e[r].stop();return this}update(e){e*=this.timeScale;const n=this._actions,r=this._nActiveActions,i=this.time+=e,o=Math.sign(e),s=this._accuIndex^=1;for(let c=0;c!==r;++c)n[c]._update(i,e,o,s);const a=this._bindings,l=this._nActiveBindings;for(let c=0;c!==l;++c)a[c].apply(s);return this}setTime(e){this.time=0;for(let n=0;nthis.max.x||e.ythis.max.y)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,n){return n.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y)}clampPoint(e,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,KL).distanceTo(e)}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const QL=new Z,Z0=new Z;class j8{constructor(e=new Z,n=new Z){this.start=e,this.end=n}set(e,n){return this.start.copy(e),this.end.copy(n),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,n){return this.delta(n).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,n){QL.subVectors(e,this.start),Z0.subVectors(this.end,this.start);const r=Z0.dot(Z0);let o=Z0.dot(QL)/r;return n&&(o=Mr(o,0,1)),o}closestPointToPoint(e,n,r){const i=this.closestPointToPointParameter(e,n);return this.delta(r).multiplyScalar(i).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const JL=new Z;class zle extends Dn{constructor(e,n){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,this.type="SpotLightHelper";const r=new Jt,i=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let s=0,a=1,l=32;s1)for(let d=0;d.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{ik.set(e.z,0,-e.x).normalize();const n=Math.acos(e.y);this.quaternion.setFromAxisAngle(ik,n)}}setLength(e,n=e*.2,r=n*.2){this.line.scale.set(1,Math.max(1e-4,e-n),1),this.line.updateMatrix(),this.cone.scale.set(r,n,r),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class Kle extends Aa{constructor(e=1){const n=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],r=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],i=new Jt;i.setAttribute("position",new Et(n,3)),i.setAttribute("color",new Et(r,3));const o=new eo({vertexColors:!0,toneMapped:!1});super(i,o),this.type="AxesHelper"}setColors(e,n,r){const i=new lt,o=this.geometry.attributes.color.array;return i.set(e),i.toArray(o,0),i.toArray(o,3),i.set(n),i.toArray(o,6),i.toArray(o,9),i.set(r),i.toArray(o,12),i.toArray(o,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class Qle{constructor(){this.type="ShapePath",this.color=new lt,this.subPaths=[],this.currentPath=null}moveTo(e,n){return this.currentPath=new eg,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,n),this}lineTo(e,n){return this.currentPath.lineTo(e,n),this}quadraticCurveTo(e,n,r,i){return this.currentPath.quadraticCurveTo(e,n,r,i),this}bezierCurveTo(e,n,r,i,o,s){return this.currentPath.bezierCurveTo(e,n,r,i,o,s),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function n(v){const x=[];for(let w=0,S=v.length;wNumber.EPSILON){if(A<0&&(O=x[C],T=-T,R=x[E],A=-A),v.yR.y)continue;if(v.y===O.y){if(v.x===O.x)return!0}else{const F=A*(v.x-O.x)-T*(v.y-O.y);if(F===0)return!0;if(F<0)continue;S=!S}}else{if(v.y!==O.y)continue;if(R.x<=v.x&&v.x<=O.x||O.x<=v.x&&v.x<=R.x)return!0}}return S}const i=Pa.isClockWise,o=this.subPaths;if(o.length===0)return[];let s,a,l;const c=[];if(o.length===1)return a=o[0],l=new Bu,l.curves=a.curves,c.push(l),c;let u=!i(o[0].getPoints());u=e?!u:u;const d=[],f=[];let h=[],g=0,y;f[g]=void 0,h[g]=[];for(let v=0,x=o.length;v1){let v=!1,x=0;for(let w=0,S=f.length;w0&&v===!1&&(h=d)}let _;for(let v=0,x=f.length;vu||i.y>u)&&(i.x>u&&(o.x=Math.floor(u/z.x),i.x=o.x*z.x,k.mapSize.x=o.x),i.y>u&&(o.y=Math.floor(u/z.y),i.y=o.y*z.y,k.mapSize.y=o.y)),k.map===null){const W=this.type!==bu?{minFilter:Qt,magFilter:Qt}:{};k.map=new gn(i.x,i.y,W),k.map.texture.name=U.name+".shadowMap",k.camera.updateProjectionMatrix()}t.setRenderTarget(k.map),t.clear();const G=k.getViewportCount();for(let W=0;W0||E.map&&E.alphaTest>0){const A=R.uuid,F=E.uuid;let N=c[A];N===void 0&&(N={},c[A]=N);let U=N[F];U===void 0&&(U=R.clone(),N[F]=U),R=U}if(R.visible=E.visible,R.wireframe=E.wireframe,O===bu?R.side=E.shadowSide!==null?E.shadowSide:E.side:R.side=E.shadowSide!==null?E.shadowSide:d[E.side],R.alphaMap=E.alphaMap,R.alphaTest=E.alphaTest,R.map=E.map,R.clipShadows=E.clipShadows,R.clippingPlanes=E.clippingPlanes,R.clipIntersection=E.clipIntersection,R.displacementMap=E.displacementMap,R.displacementScale=E.displacementScale,R.displacementBias=E.displacementBias,R.wireframeLinewidth=E.wireframeLinewidth,R.linewidth=E.linewidth,C.isPointLight===!0&&R.isMeshDistanceMaterial===!0){const A=t.properties.get(R);A.light=C}return R}function w(S,E,C,O,R){if(S.visible===!1)return;if(S.layers.test(E.layers)&&(S.isMesh||S.isLine||S.isPoints)&&(S.castShadow||S.receiveShadow&&R===bu)&&(!S.frustumCulled||r.intersectsObject(S))){S.modelViewMatrix.multiplyMatrices(C.matrixWorldInverse,S.matrixWorld);const F=e.update(S),N=S.material;if(Array.isArray(N)){const U=F.groups;for(let k=0,z=U.length;k=1):B.indexOf("OpenGL ES")!==-1&&(W=parseFloat(/^OpenGL ES (\d)/.exec(B)[1]),G=W>=2);let j=null,$={};const q=t.getParameter(3088),K=t.getParameter(2978),re=new an().fromArray(q),J=new an().fromArray(K);function le(he,ue,He){const st=new Uint8Array(4),wt=t.createTexture();t.bindTexture(he,wt),t.texParameteri(he,10241,9728),t.texParameteri(he,10240,9728);for(let Bt=0;Bt"u"?!1:/OculusBrowser/g.test(navigator.userAgent),g=new WeakMap;let y;const _=new WeakMap;let v=!1;try{v=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function x(ee,Q){return v?new OffscreenCanvas(ee,Q):Jm("canvas")}function w(ee,Q,Pe,$e){let Ge=1;if((ee.width>$e||ee.height>$e)&&(Ge=$e/Math.max(ee.width,ee.height)),Ge<1||Q===!0)if(typeof HTMLImageElement<"u"&&ee instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&ee instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&ee instanceof ImageBitmap){const Ke=Q?Hj:Math.floor,gt=Ke(Ge*ee.width),ut=Ke(Ge*ee.height);y===void 0&&(y=x(gt,ut));const Ae=Pe?x(gt,ut):y;return Ae.width=gt,Ae.height=ut,Ae.getContext("2d").drawImage(ee,0,0,gt,ut),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+ee.width+"x"+ee.height+") to ("+gt+"x"+ut+")."),Ae}else return"data"in ee&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+ee.width+"x"+ee.height+")."),ee;return ee}function S(ee){return I2(ee.width)&&I2(ee.height)}function E(ee){return a?!1:ee.wrapS!==Xr||ee.wrapT!==Xr||ee.minFilter!==Qt&&ee.minFilter!==Dt}function C(ee,Q){return ee.generateMipmaps&&Q&&ee.minFilter!==Qt&&ee.minFilter!==Dt}function O(ee){t.generateMipmap(ee)}function R(ee,Q,Pe,$e,Ge=!1){if(a===!1)return Q;if(ee!==null){if(t[ee]!==void 0)return t[ee];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+ee+"'")}let Ke=Q;return Q===6403&&(Pe===5126&&(Ke=33326),Pe===5131&&(Ke=33325),Pe===5121&&(Ke=33321)),Q===33319&&(Pe===5126&&(Ke=33328),Pe===5131&&(Ke=33327),Pe===5121&&(Ke=33323)),Q===6408&&(Pe===5126&&(Ke=34836),Pe===5131&&(Ke=34842),Pe===5121&&(Ke=$e===Nn&&Ge===!1?35907:32856),Pe===32819&&(Ke=32854),Pe===32820&&(Ke=32855)),(Ke===33325||Ke===33326||Ke===33327||Ke===33328||Ke===34842||Ke===34836)&&e.get("EXT_color_buffer_float"),Ke}function T(ee,Q,Pe){return C(ee,Pe)===!0||ee.isFramebufferTexture&&ee.minFilter!==Qt&&ee.minFilter!==Dt?Math.log2(Math.max(Q.width,Q.height))+1:ee.mipmaps!==void 0&&ee.mipmaps.length>0?ee.mipmaps.length:ee.isCompressedTexture&&Array.isArray(ee.image)?Q.mipmaps.length:1}function A(ee){return ee===Qt||ee===yx||ee===dm?9728:9729}function F(ee){const Q=ee.target;Q.removeEventListener("dispose",F),U(Q),Q.isVideoTexture&&g.delete(Q)}function N(ee){const Q=ee.target;Q.removeEventListener("dispose",N),z(Q)}function U(ee){const Q=r.get(ee);if(Q.__webglInit===void 0)return;const Pe=ee.source,$e=_.get(Pe);if($e){const Ge=$e[Q.__cacheKey];Ge.usedTimes--,Ge.usedTimes===0&&k(ee),Object.keys($e).length===0&&_.delete(Pe)}r.remove(ee)}function k(ee){const Q=r.get(ee);t.deleteTexture(Q.__webglTexture);const Pe=ee.source,$e=_.get(Pe);delete $e[Q.__cacheKey],s.memory.textures--}function z(ee){const Q=ee.texture,Pe=r.get(ee),$e=r.get(Q);if($e.__webglTexture!==void 0&&(t.deleteTexture($e.__webglTexture),s.memory.textures--),ee.depthTexture&&ee.depthTexture.dispose(),ee.isWebGLCubeRenderTarget)for(let Ge=0;Ge<6;Ge++)t.deleteFramebuffer(Pe.__webglFramebuffer[Ge]),Pe.__webglDepthbuffer&&t.deleteRenderbuffer(Pe.__webglDepthbuffer[Ge]);else{if(t.deleteFramebuffer(Pe.__webglFramebuffer),Pe.__webglDepthbuffer&&t.deleteRenderbuffer(Pe.__webglDepthbuffer),Pe.__webglMultisampledFramebuffer&&t.deleteFramebuffer(Pe.__webglMultisampledFramebuffer),Pe.__webglColorRenderbuffer)for(let Ge=0;Ge=l&&console.warn("THREE.WebGLTextures: Trying to use "+ee+" texture units while this GPU supports only "+l),G+=1,ee}function j(ee){const Q=[];return Q.push(ee.wrapS),Q.push(ee.wrapT),Q.push(ee.wrapR||0),Q.push(ee.magFilter),Q.push(ee.minFilter),Q.push(ee.anisotropy),Q.push(ee.internalFormat),Q.push(ee.format),Q.push(ee.type),Q.push(ee.generateMipmaps),Q.push(ee.premultiplyAlpha),Q.push(ee.flipY),Q.push(ee.unpackAlignment),Q.push(ee.encoding),Q.join()}function $(ee,Q){const Pe=r.get(ee);if(ee.isVideoTexture&&We(ee),ee.isRenderTargetTexture===!1&&ee.version>0&&Pe.__version!==ee.version){const $e=ee.image;if($e===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if($e.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{De(Pe,ee,Q);return}}n.bindTexture(3553,Pe.__webglTexture,33984+Q)}function q(ee,Q){const Pe=r.get(ee);if(ee.version>0&&Pe.__version!==ee.version){De(Pe,ee,Q);return}n.bindTexture(35866,Pe.__webglTexture,33984+Q)}function K(ee,Q){const Pe=r.get(ee);if(ee.version>0&&Pe.__version!==ee.version){De(Pe,ee,Q);return}n.bindTexture(32879,Pe.__webglTexture,33984+Q)}function re(ee,Q){const Pe=r.get(ee);if(ee.version>0&&Pe.__version!==ee.version){Te(Pe,ee,Q);return}n.bindTexture(34067,Pe.__webglTexture,33984+Q)}const J={[Ro]:10497,[Xr]:33071,[Xm]:33648},le={[Qt]:9728,[yx]:9984,[dm]:9986,[Dt]:9729,[WO]:9985,[xc]:9987};function ae(ee,Q,Pe){if(Pe?(t.texParameteri(ee,10242,J[Q.wrapS]),t.texParameteri(ee,10243,J[Q.wrapT]),(ee===32879||ee===35866)&&t.texParameteri(ee,32882,J[Q.wrapR]),t.texParameteri(ee,10240,le[Q.magFilter]),t.texParameteri(ee,10241,le[Q.minFilter])):(t.texParameteri(ee,10242,33071),t.texParameteri(ee,10243,33071),(ee===32879||ee===35866)&&t.texParameteri(ee,32882,33071),(Q.wrapS!==Xr||Q.wrapT!==Xr)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),t.texParameteri(ee,10240,A(Q.magFilter)),t.texParameteri(ee,10241,A(Q.minFilter)),Q.minFilter!==Qt&&Q.minFilter!==Dt&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),e.has("EXT_texture_filter_anisotropic")===!0){const $e=e.get("EXT_texture_filter_anisotropic");if(Q.magFilter===Qt||Q.minFilter!==dm&&Q.minFilter!==xc||Q.type===Yn&&e.has("OES_texture_float_linear")===!1||a===!1&&Q.type===yr&&e.has("OES_texture_half_float_linear")===!1)return;(Q.anisotropy>1||r.get(Q).__currentAnisotropy)&&(t.texParameterf(ee,$e.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(Q.anisotropy,i.getMaxAnisotropy())),r.get(Q).__currentAnisotropy=Q.anisotropy)}}function oe(ee,Q){let Pe=!1;ee.__webglInit===void 0&&(ee.__webglInit=!0,Q.addEventListener("dispose",F));const $e=Q.source;let Ge=_.get($e);Ge===void 0&&(Ge={},_.set($e,Ge));const Ke=j(Q);if(Ke!==ee.__cacheKey){Ge[Ke]===void 0&&(Ge[Ke]={texture:t.createTexture(),usedTimes:0},s.memory.textures++,Pe=!0),Ge[Ke].usedTimes++;const gt=Ge[ee.__cacheKey];gt!==void 0&&(Ge[ee.__cacheKey].usedTimes--,gt.usedTimes===0&&k(Q)),ee.__cacheKey=Ke,ee.__webglTexture=Ge[Ke].texture}return Pe}function De(ee,Q,Pe){let $e=3553;(Q.isDataArrayTexture||Q.isCompressedArrayTexture)&&($e=35866),Q.isData3DTexture&&($e=32879);const Ge=oe(ee,Q),Ke=Q.source;n.bindTexture($e,ee.__webglTexture,33984+Pe);const gt=r.get(Ke);if(Ke.version!==gt.__version||Ge===!0){n.activeTexture(33984+Pe),t.pixelStorei(37440,Q.flipY),t.pixelStorei(37441,Q.premultiplyAlpha),t.pixelStorei(3317,Q.unpackAlignment),t.pixelStorei(37443,0);const ut=E(Q)&&S(Q.image)===!1;let Ae=w(Q.image,ut,!1,u);Ae=ht(Q,Ae);const vt=S(Ae)||a,xt=o.convert(Q.format,Q.encoding);let ct=o.convert(Q.type),Ie=R(Q.internalFormat,xt,ct,Q.encoding,Q.isVideoTexture);ae($e,Q,vt);let Ye;const Tt=Q.mipmaps,Lt=a&&Q.isVideoTexture!==!0,Rt=gt.__version===void 0||Ge===!0,he=T(Q,Ae,vt);if(Q.isDepthTexture)Ie=6402,a?Q.type===Yn?Ie=36012:Q.type===nl?Ie=33190:Q.type===fc?Ie=35056:Ie=33189:Q.type===Yn&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),Q.format===hc&&Ie===6402&&Q.type!==YO&&Q.type!==nl&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),Q.type=nl,ct=o.convert(Q.type)),Q.format===wc&&Ie===6402&&(Ie=34041,Q.type!==fc&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),Q.type=fc,ct=o.convert(Q.type))),Rt&&(Lt?n.texStorage2D(3553,1,Ie,Ae.width,Ae.height):n.texImage2D(3553,0,Ie,Ae.width,Ae.height,0,xt,ct,null));else if(Q.isDataTexture)if(Tt.length>0&&vt){Lt&&Rt&&n.texStorage2D(3553,he,Ie,Tt[0].width,Tt[0].height);for(let ue=0,He=Tt.length;ue>=1,He>>=1}}else if(Tt.length>0&&vt){Lt&&Rt&&n.texStorage2D(3553,he,Ie,Tt[0].width,Tt[0].height);for(let ue=0,He=Tt.length;ue0&&Rt++,n.texStorage2D(34067,Rt,Ye,Ae[0].width,Ae[0].height));for(let ue=0;ue<6;ue++)if(ut){Tt?n.texSubImage2D(34069+ue,0,0,0,Ae[ue].width,Ae[ue].height,ct,Ie,Ae[ue].data):n.texImage2D(34069+ue,0,Ye,Ae[ue].width,Ae[ue].height,0,ct,Ie,Ae[ue].data);for(let He=0;He=34069&&Ge<=34074)&&t.framebufferTexture2D(36160,$e,Ge,r.get(Pe).__webglTexture,0),n.bindFramebuffer(36160,null)}function we(ee,Q,Pe){if(t.bindRenderbuffer(36161,ee),Q.depthBuffer&&!Q.stencilBuffer){let $e=33189;if(Pe||dt(Q)){const Ge=Q.depthTexture;Ge&&Ge.isDepthTexture&&(Ge.type===Yn?$e=36012:Ge.type===nl&&($e=33190));const Ke=ot(Q);dt(Q)?f.renderbufferStorageMultisampleEXT(36161,Ke,$e,Q.width,Q.height):t.renderbufferStorageMultisample(36161,Ke,$e,Q.width,Q.height)}else t.renderbufferStorage(36161,$e,Q.width,Q.height);t.framebufferRenderbuffer(36160,36096,36161,ee)}else if(Q.depthBuffer&&Q.stencilBuffer){const $e=ot(Q);Pe&&dt(Q)===!1?t.renderbufferStorageMultisample(36161,$e,35056,Q.width,Q.height):dt(Q)?f.renderbufferStorageMultisampleEXT(36161,$e,35056,Q.width,Q.height):t.renderbufferStorage(36161,34041,Q.width,Q.height),t.framebufferRenderbuffer(36160,33306,36161,ee)}else{const $e=Q.isWebGLMultipleRenderTargets===!0?Q.texture:[Q.texture];for(let Ge=0;Ge<$e.length;Ge++){const Ke=$e[Ge],gt=o.convert(Ke.format,Ke.encoding),ut=o.convert(Ke.type),Ae=R(Ke.internalFormat,gt,ut,Ke.encoding),vt=ot(Q);Pe&&dt(Q)===!1?t.renderbufferStorageMultisample(36161,vt,Ae,Q.width,Q.height):dt(Q)?f.renderbufferStorageMultisampleEXT(36161,vt,Ae,Q.width,Q.height):t.renderbufferStorage(36161,Ae,Q.width,Q.height)}}t.bindRenderbuffer(36161,null)}function me(ee,Q){if(Q&&Q.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(n.bindFramebuffer(36160,ee),!(Q.depthTexture&&Q.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");(!r.get(Q.depthTexture).__webglTexture||Q.depthTexture.image.width!==Q.width||Q.depthTexture.image.height!==Q.height)&&(Q.depthTexture.image.width=Q.width,Q.depthTexture.image.height=Q.height,Q.depthTexture.needsUpdate=!0),$(Q.depthTexture,0);const $e=r.get(Q.depthTexture).__webglTexture,Ge=ot(Q);if(Q.depthTexture.format===hc)dt(Q)?f.framebufferTexture2DMultisampleEXT(36160,36096,3553,$e,0,Ge):t.framebufferTexture2D(36160,36096,3553,$e,0);else if(Q.depthTexture.format===wc)dt(Q)?f.framebufferTexture2DMultisampleEXT(36160,33306,3553,$e,0,Ge):t.framebufferTexture2D(36160,33306,3553,$e,0);else throw new Error("Unknown depthTexture format")}function se(ee){const Q=r.get(ee),Pe=ee.isWebGLCubeRenderTarget===!0;if(ee.depthTexture&&!Q.__autoAllocateDepthBuffer){if(Pe)throw new Error("target.depthTexture not supported in Cube render targets");me(Q.__webglFramebuffer,ee)}else if(Pe){Q.__webglDepthbuffer=[];for(let $e=0;$e<6;$e++)n.bindFramebuffer(36160,Q.__webglFramebuffer[$e]),Q.__webglDepthbuffer[$e]=t.createRenderbuffer(),we(Q.__webglDepthbuffer[$e],ee,!1)}else n.bindFramebuffer(36160,Q.__webglFramebuffer),Q.__webglDepthbuffer=t.createRenderbuffer(),we(Q.__webglDepthbuffer,ee,!1);n.bindFramebuffer(36160,null)}function de(ee,Q,Pe){const $e=r.get(ee);Q!==void 0&&ve($e.__webglFramebuffer,ee,ee.texture,36064,3553),Pe!==void 0&&se(ee)}function ke(ee){const Q=ee.texture,Pe=r.get(ee),$e=r.get(Q);ee.addEventListener("dispose",N),ee.isWebGLMultipleRenderTargets!==!0&&($e.__webglTexture===void 0&&($e.__webglTexture=t.createTexture()),$e.__version=Q.version,s.memory.textures++);const Ge=ee.isWebGLCubeRenderTarget===!0,Ke=ee.isWebGLMultipleRenderTargets===!0,gt=S(ee)||a;if(Ge){Pe.__webglFramebuffer=[];for(let ut=0;ut<6;ut++)Pe.__webglFramebuffer[ut]=t.createFramebuffer()}else{if(Pe.__webglFramebuffer=t.createFramebuffer(),Ke)if(i.drawBuffers){const ut=ee.texture;for(let Ae=0,vt=ut.length;Ae0&&dt(ee)===!1){const ut=Ke?Q:[Q];Pe.__webglMultisampledFramebuffer=t.createFramebuffer(),Pe.__webglColorRenderbuffer=[],n.bindFramebuffer(36160,Pe.__webglMultisampledFramebuffer);for(let Ae=0;Ae0&&dt(ee)===!1){const Q=ee.isWebGLMultipleRenderTargets?ee.texture:[ee.texture],Pe=ee.width,$e=ee.height;let Ge=16384;const Ke=[],gt=ee.stencilBuffer?33306:36096,ut=r.get(ee),Ae=ee.isWebGLMultipleRenderTargets===!0;if(Ae)for(let vt=0;vt0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&Q.__useRenderToTexture!==!1}function We(ee){const Q=s.render.frame;g.get(ee)!==Q&&(g.set(ee,Q),ee.update())}function ht(ee,Q){const Pe=ee.encoding,$e=ee.format,Ge=ee.type;return ee.isCompressedTexture===!0||ee.isVideoTexture===!0||ee.format===xx||Pe!==Oa&&(Pe===Nn?a===!1?e.has("EXT_sRGB")===!0&&$e===Jn?(ee.format=xx,ee.minFilter=Dt,ee.generateMipmaps=!1):Q=QO.sRGBToLinear(Q):($e!==Jn||Ge!==nr)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture encoding:",Pe)),Q}this.allocateTextureUnit=B,this.resetTextureUnits=W,this.setTexture2D=$,this.setTexture2DArray=q,this.setTexture3D=K,this.setTextureCube=re,this.rebindTextures=de,this.setupRenderTarget=ke,this.updateRenderTargetMipmap=Ve,this.updateMultisampleRenderTarget=Ze,this.setupDepthRenderbuffer=se,this.setupFrameBufferTexture=ve,this.useMultisampledRTT=dt}function qj(t,e,n){const r=n.isWebGL2;function i(o,s=null){let a;if(o===nr)return 5121;if(o===Ej)return 32819;if(o===Pj)return 32820;if(o===Sj)return 5120;if(o===bj)return 5122;if(o===YO)return 5123;if(o===Mj)return 5124;if(o===nl)return 5125;if(o===Yn)return 5126;if(o===yr)return r?5131:(a=e.get("OES_texture_half_float"),a!==null?a.HALF_FLOAT_OES:null);if(o===Cj)return 6406;if(o===Jn)return 6408;if(o===gS)return 6409;if(o===Tj)return 6410;if(o===hc)return 6402;if(o===wc)return 34041;if(o===xx)return a=e.get("EXT_sRGB"),a!==null?a.SRGB_ALPHA_EXT:null;if(o===Eg)return 6403;if(o===Oj)return 36244;if(o===XO)return 33319;if(o===Rj)return 33320;if(o===Aj)return 36249;if(o===M_||o===E_||o===P_||o===C_)if(s===Nn)if(a=e.get("WEBGL_compressed_texture_s3tc_srgb"),a!==null){if(o===M_)return a.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(o===E_)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(o===P_)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(o===C_)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(a=e.get("WEBGL_compressed_texture_s3tc"),a!==null){if(o===M_)return a.COMPRESSED_RGB_S3TC_DXT1_EXT;if(o===E_)return a.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(o===P_)return a.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(o===C_)return a.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(o===c2||o===u2||o===d2||o===f2)if(a=e.get("WEBGL_compressed_texture_pvrtc"),a!==null){if(o===c2)return a.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(o===u2)return a.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(o===d2)return a.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(o===f2)return a.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(o===Dj)return a=e.get("WEBGL_compressed_texture_etc1"),a!==null?a.COMPRESSED_RGB_ETC1_WEBGL:null;if(o===h2||o===p2)if(a=e.get("WEBGL_compressed_texture_etc"),a!==null){if(o===h2)return s===Nn?a.COMPRESSED_SRGB8_ETC2:a.COMPRESSED_RGB8_ETC2;if(o===p2)return s===Nn?a.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:a.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(o===m2||o===g2||o===v2||o===y2||o===_2||o===x2||o===w2||o===S2||o===b2||o===M2||o===E2||o===P2||o===C2||o===T2)if(a=e.get("WEBGL_compressed_texture_astc"),a!==null){if(o===m2)return s===Nn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:a.COMPRESSED_RGBA_ASTC_4x4_KHR;if(o===g2)return s===Nn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:a.COMPRESSED_RGBA_ASTC_5x4_KHR;if(o===v2)return s===Nn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:a.COMPRESSED_RGBA_ASTC_5x5_KHR;if(o===y2)return s===Nn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:a.COMPRESSED_RGBA_ASTC_6x5_KHR;if(o===_2)return s===Nn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:a.COMPRESSED_RGBA_ASTC_6x6_KHR;if(o===x2)return s===Nn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:a.COMPRESSED_RGBA_ASTC_8x5_KHR;if(o===w2)return s===Nn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:a.COMPRESSED_RGBA_ASTC_8x6_KHR;if(o===S2)return s===Nn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:a.COMPRESSED_RGBA_ASTC_8x8_KHR;if(o===b2)return s===Nn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:a.COMPRESSED_RGBA_ASTC_10x5_KHR;if(o===M2)return s===Nn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:a.COMPRESSED_RGBA_ASTC_10x6_KHR;if(o===E2)return s===Nn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:a.COMPRESSED_RGBA_ASTC_10x8_KHR;if(o===P2)return s===Nn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:a.COMPRESSED_RGBA_ASTC_10x10_KHR;if(o===C2)return s===Nn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:a.COMPRESSED_RGBA_ASTC_12x10_KHR;if(o===T2)return s===Nn?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:a.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(o===T_)if(a=e.get("EXT_texture_compression_bptc"),a!==null){if(o===T_)return s===Nn?a.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:a.COMPRESSED_RGBA_BPTC_UNORM_EXT}else return null;if(o===Ij||o===O2||o===R2||o===A2)if(a=e.get("EXT_texture_compression_rgtc"),a!==null){if(o===T_)return a.COMPRESSED_RED_RGTC1_EXT;if(o===O2)return a.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(o===R2)return a.COMPRESSED_RED_GREEN_RGTC2_EXT;if(o===A2)return a.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return o===fc?r?34042:(a=e.get("WEBGL_depth_texture"),a!==null?a.UNSIGNED_INT_24_8_WEBGL:null):t[o]!==void 0?t[o]:null}return{convert:i}}class Kj extends or{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}let Ou=class extends Dn{constructor(){super(),this.isGroup=!0,this.type="Group"}};const vae={type:"move"};class wE{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Ou,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new Ou,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new Z,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new Z),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Ou,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new Z,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new Z),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const n=this._hand;if(n)for(const r of e.hand.values())this._getHandJoint(n,r)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,n,r){let i=null,o=null,s=null;const a=this._targetRay,l=this._grip,c=this._hand;if(e&&n.session.visibilityState!=="visible-blurred"){if(c&&e.hand){s=!0;for(const y of e.hand.values()){const _=n.getJointPose(y,r),v=this._getHandJoint(c,y);_!==null&&(v.matrix.fromArray(_.transform.matrix),v.matrix.decompose(v.position,v.rotation,v.scale),v.jointRadius=_.radius),v.visible=_!==null}const u=c.joints["index-finger-tip"],d=c.joints["thumb-tip"],f=u.position.distanceTo(d.position),h=.02,g=.005;c.inputState.pinching&&f>h+g?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&f<=h-g&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(o=n.getPose(e.gripSpace,r),o!==null&&(l.matrix.fromArray(o.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),o.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(o.linearVelocity)):l.hasLinearVelocity=!1,o.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(o.angularVelocity)):l.hasAngularVelocity=!1));a!==null&&(i=n.getPose(e.targetRaySpace,r),i===null&&o!==null&&(i=o),i!==null&&(a.matrix.fromArray(i.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),i.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(i.linearVelocity)):a.hasLinearVelocity=!1,i.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(i.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(vae)))}return a!==null&&(a.visible=i!==null),l!==null&&(l.visible=o!==null),c!==null&&(c.visible=s!==null),this}_getHandJoint(e,n){if(e.joints[n.jointName]===void 0){const r=new Ou;r.matrixAutoUpdate=!1,r.visible=!1,e.joints[n.jointName]=r,e.add(r)}return e.joints[n.jointName]}}class bS extends qn{constructor(e,n,r,i,o,s,a,l,c,u){if(u=u!==void 0?u:hc,u!==hc&&u!==wc)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");r===void 0&&u===hc&&(r=nl),r===void 0&&u===wc&&(r=fc),super(null,i,o,s,a,l,u,r,c),this.isDepthTexture=!0,this.image={width:e,height:n},this.magFilter=a!==void 0?a:Qt,this.minFilter=l!==void 0?l:Qt,this.flipY=!1,this.generateMipmaps=!1}}class yae extends hs{constructor(e,n){super();const r=this;let i=null,o=1,s=null,a="local-floor",l=1,c=null,u=null,d=null,f=null,h=null,g=null;const y=n.getContextAttributes();let _=null,v=null;const x=[],w=[],S=new Set,E=new Map,C=new or;C.layers.enable(1),C.viewport=new an;const O=new or;O.layers.enable(2),O.viewport=new an;const R=[C,O],T=new Kj;T.layers.enable(1),T.layers.enable(2);let A=null,F=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(re){let J=x[re];return J===void 0&&(J=new wE,x[re]=J),J.getTargetRaySpace()},this.getControllerGrip=function(re){let J=x[re];return J===void 0&&(J=new wE,x[re]=J),J.getGripSpace()},this.getHand=function(re){let J=x[re];return J===void 0&&(J=new wE,x[re]=J),J.getHandSpace()};function N(re){const J=w.indexOf(re.inputSource);if(J===-1)return;const le=x[J];le!==void 0&&le.dispatchEvent({type:re.type,data:re.inputSource})}function U(){i.removeEventListener("select",N),i.removeEventListener("selectstart",N),i.removeEventListener("selectend",N),i.removeEventListener("squeeze",N),i.removeEventListener("squeezestart",N),i.removeEventListener("squeezeend",N),i.removeEventListener("end",U),i.removeEventListener("inputsourceschange",k);for(let re=0;re=0&&(w[ae]=null,x[ae].disconnect(le))}for(let J=0;J=w.length){w.push(le),ae=De;break}else if(w[De]===null){w[De]=le,ae=De;break}if(ae===-1)break}const oe=x[ae];oe&&oe.connect(le)}}const z=new Z,G=new Z;function W(re,J,le){z.setFromMatrixPosition(J.matrixWorld),G.setFromMatrixPosition(le.matrixWorld);const ae=z.distanceTo(G),oe=J.projectionMatrix.elements,De=le.projectionMatrix.elements,Te=oe[14]/(oe[10]-1),ve=oe[14]/(oe[10]+1),we=(oe[9]+1)/oe[5],me=(oe[9]-1)/oe[5],se=(oe[8]-1)/oe[0],de=(De[8]+1)/De[0],ke=Te*se,Ve=Te*de,Ze=ae/(-se+de),ot=Ze*-se;J.matrixWorld.decompose(re.position,re.quaternion,re.scale),re.translateX(ot),re.translateZ(Ze),re.matrixWorld.compose(re.position,re.quaternion,re.scale),re.matrixWorldInverse.copy(re.matrixWorld).invert();const dt=Te+Ze,We=ve+Ze,ht=ke-ot,ee=Ve+(ae-ot),Q=we*ve/We*dt,Pe=me*ve/We*dt;re.projectionMatrix.makePerspective(ht,ee,Q,Pe,dt,We),re.projectionMatrixInverse.copy(re.projectionMatrix).invert()}function B(re,J){J===null?re.matrixWorld.copy(re.matrix):re.matrixWorld.multiplyMatrices(J.matrixWorld,re.matrix),re.matrixWorldInverse.copy(re.matrixWorld).invert()}this.updateCamera=function(re){if(i===null)return;T.near=O.near=C.near=re.near,T.far=O.far=C.far=re.far,(A!==T.near||F!==T.far)&&(i.updateRenderState({depthNear:T.near,depthFar:T.far}),A=T.near,F=T.far);const J=re.parent,le=T.cameras;B(T,J);for(let ae=0;aeoe&&(E.set(ae,ae.lastChangedTime),r.dispatchEvent({type:"planechanged",data:ae}))}}g=null}const K=new Gj;K.setAnimationLoop(q),this.setAnimationLoop=function(re){$=re},this.dispose=function(){}}}function _ae(t,e){function n(_,v){_.matrixAutoUpdate===!0&&_.updateMatrix(),v.value.copy(_.matrix)}function r(_,v){v.color.getRGB(_.fogColor.value,$j(t)),v.isFog?(_.fogNear.value=v.near,_.fogFar.value=v.far):v.isFogExp2&&(_.fogDensity.value=v.density)}function i(_,v,x,w,S){v.isMeshBasicMaterial||v.isMeshLambertMaterial?o(_,v):v.isMeshToonMaterial?(o(_,v),d(_,v)):v.isMeshPhongMaterial?(o(_,v),u(_,v)):v.isMeshStandardMaterial?(o(_,v),f(_,v),v.isMeshPhysicalMaterial&&h(_,v,S)):v.isMeshMatcapMaterial?(o(_,v),g(_,v)):v.isMeshDepthMaterial?o(_,v):v.isMeshDistanceMaterial?(o(_,v),y(_,v)):v.isMeshNormalMaterial?o(_,v):v.isLineBasicMaterial?(s(_,v),v.isLineDashedMaterial&&a(_,v)):v.isPointsMaterial?l(_,v,x,w):v.isSpriteMaterial?c(_,v):v.isShadowMaterial?(_.color.value.copy(v.color),_.opacity.value=v.opacity):v.isShaderMaterial&&(v.uniformsNeedUpdate=!1)}function o(_,v){_.opacity.value=v.opacity,v.color&&_.diffuse.value.copy(v.color),v.emissive&&_.emissive.value.copy(v.emissive).multiplyScalar(v.emissiveIntensity),v.map&&(_.map.value=v.map,n(v.map,_.mapTransform)),v.alphaMap&&(_.alphaMap.value=v.alphaMap,n(v.alphaMap,_.alphaMapTransform)),v.bumpMap&&(_.bumpMap.value=v.bumpMap,n(v.bumpMap,_.bumpMapTransform),_.bumpScale.value=v.bumpScale,v.side===Vr&&(_.bumpScale.value*=-1)),v.normalMap&&(_.normalMap.value=v.normalMap,n(v.normalMap,_.normalMapTransform),_.normalScale.value.copy(v.normalScale),v.side===Vr&&_.normalScale.value.negate()),v.displacementMap&&(_.displacementMap.value=v.displacementMap,n(v.displacementMap,_.displacementMapTransform),_.displacementScale.value=v.displacementScale,_.displacementBias.value=v.displacementBias),v.emissiveMap&&(_.emissiveMap.value=v.emissiveMap,n(v.emissiveMap,_.emissiveMapTransform)),v.specularMap&&(_.specularMap.value=v.specularMap,n(v.specularMap,_.specularMapTransform)),v.alphaTest>0&&(_.alphaTest.value=v.alphaTest);const x=e.get(v).envMap;if(x&&(_.envMap.value=x,_.flipEnvMap.value=x.isCubeTexture&&x.isRenderTargetTexture===!1?-1:1,_.reflectivity.value=v.reflectivity,_.ior.value=v.ior,_.refractionRatio.value=v.refractionRatio),v.lightMap){_.lightMap.value=v.lightMap;const w=t.useLegacyLights===!0?Math.PI:1;_.lightMapIntensity.value=v.lightMapIntensity*w,n(v.lightMap,_.lightMapTransform)}v.aoMap&&(_.aoMap.value=v.aoMap,_.aoMapIntensity.value=v.aoMapIntensity,n(v.aoMap,_.aoMapTransform))}function s(_,v){_.diffuse.value.copy(v.color),_.opacity.value=v.opacity,v.map&&(_.map.value=v.map,n(v.map,_.mapTransform))}function a(_,v){_.dashSize.value=v.dashSize,_.totalSize.value=v.dashSize+v.gapSize,_.scale.value=v.scale}function l(_,v,x,w){_.diffuse.value.copy(v.color),_.opacity.value=v.opacity,_.size.value=v.size*x,_.scale.value=w*.5,v.map&&(_.map.value=v.map,n(v.map,_.uvTransform)),v.alphaMap&&(_.alphaMap.value=v.alphaMap),v.alphaTest>0&&(_.alphaTest.value=v.alphaTest)}function c(_,v){_.diffuse.value.copy(v.color),_.opacity.value=v.opacity,_.rotation.value=v.rotation,v.map&&(_.map.value=v.map,n(v.map,_.mapTransform)),v.alphaMap&&(_.alphaMap.value=v.alphaMap),v.alphaTest>0&&(_.alphaTest.value=v.alphaTest)}function u(_,v){_.specular.value.copy(v.specular),_.shininess.value=Math.max(v.shininess,1e-4)}function d(_,v){v.gradientMap&&(_.gradientMap.value=v.gradientMap)}function f(_,v){_.metalness.value=v.metalness,v.metalnessMap&&(_.metalnessMap.value=v.metalnessMap,n(v.metalnessMap,_.metalnessMapTransform)),_.roughness.value=v.roughness,v.roughnessMap&&(_.roughnessMap.value=v.roughnessMap,n(v.roughnessMap,_.roughnessMapTransform)),e.get(v).envMap&&(_.envMapIntensity.value=v.envMapIntensity)}function h(_,v,x){_.ior.value=v.ior,v.sheen>0&&(_.sheenColor.value.copy(v.sheenColor).multiplyScalar(v.sheen),_.sheenRoughness.value=v.sheenRoughness,v.sheenColorMap&&(_.sheenColorMap.value=v.sheenColorMap,n(v.sheenColorMap,_.sheenColorMapTransform)),v.sheenRoughnessMap&&(_.sheenRoughnessMap.value=v.sheenRoughnessMap,n(v.sheenRoughnessMap,_.sheenRoughnessMapTransform))),v.clearcoat>0&&(_.clearcoat.value=v.clearcoat,_.clearcoatRoughness.value=v.clearcoatRoughness,v.clearcoatMap&&(_.clearcoatMap.value=v.clearcoatMap,n(v.clearcoatMap,_.clearcoatMapTransform)),v.clearcoatRoughnessMap&&(_.clearcoatRoughnessMap.value=v.clearcoatRoughnessMap,n(v.clearcoatRoughnessMap,_.clearcoatRoughnessMapTransform)),v.clearcoatNormalMap&&(_.clearcoatNormalMap.value=v.clearcoatNormalMap,n(v.clearcoatNormalMap,_.clearcoatNormalMapTransform),_.clearcoatNormalScale.value.copy(v.clearcoatNormalScale),v.side===Vr&&_.clearcoatNormalScale.value.negate())),v.iridescence>0&&(_.iridescence.value=v.iridescence,_.iridescenceIOR.value=v.iridescenceIOR,_.iridescenceThicknessMinimum.value=v.iridescenceThicknessRange[0],_.iridescenceThicknessMaximum.value=v.iridescenceThicknessRange[1],v.iridescenceMap&&(_.iridescenceMap.value=v.iridescenceMap,n(v.iridescenceMap,_.iridescenceMapTransform)),v.iridescenceThicknessMap&&(_.iridescenceThicknessMap.value=v.iridescenceThicknessMap,n(v.iridescenceThicknessMap,_.iridescenceThicknessMapTransform))),v.transmission>0&&(_.transmission.value=v.transmission,_.transmissionSamplerMap.value=x.texture,_.transmissionSamplerSize.value.set(x.width,x.height),v.transmissionMap&&(_.transmissionMap.value=v.transmissionMap,n(v.transmissionMap,_.transmissionMapTransform)),_.thickness.value=v.thickness,v.thicknessMap&&(_.thicknessMap.value=v.thicknessMap,n(v.thicknessMap,_.thicknessMapTransform)),_.attenuationDistance.value=v.attenuationDistance,_.attenuationColor.value.copy(v.attenuationColor)),_.specularIntensity.value=v.specularIntensity,_.specularColor.value.copy(v.specularColor),v.specularColorMap&&(_.specularColorMap.value=v.specularColorMap,n(v.specularColorMap,_.specularColorMapTransform)),v.specularIntensityMap&&(_.specularIntensityMap.value=v.specularIntensityMap,n(v.specularIntensityMap,_.specularIntensityMapTransform))}function g(_,v){v.matcap&&(_.matcap.value=v.matcap)}function y(_,v){const x=e.get(v).light;_.referencePosition.value.setFromMatrixPosition(x.matrixWorld),_.nearDistance.value=x.shadow.camera.near,_.farDistance.value=x.shadow.camera.far}return{refreshFogUniforms:r,refreshMaterialUniforms:i}}function xae(t,e,n,r){let i={},o={},s=[];const a=n.isWebGL2?t.getParameter(35375):0;function l(x,w){const S=w.program;r.uniformBlockBinding(x,S)}function c(x,w){let S=i[x.id];S===void 0&&(g(x),S=u(x),i[x.id]=S,x.addEventListener("dispose",_));const E=w.program;r.updateUBOMapping(x,E);const C=e.render.frame;o[x.id]!==C&&(f(x),o[x.id]=C)}function u(x){const w=d();x.__bindingPointIndex=w;const S=t.createBuffer(),E=x.__size,C=x.usage;return t.bindBuffer(35345,S),t.bufferData(35345,E,C),t.bindBuffer(35345,null),t.bindBufferBase(35345,w,S),S}function d(){for(let x=0;x0){C=S%E;const N=E-C;C!==0&&N-A.boundary<0&&(S+=E-C,T.__offset=S)}S+=A.storage}return C=S%E,C>0&&(S+=E-C),x.__size=S,x.__cache={},this}function y(x){const w={boundary:0,storage:0};return typeof x=="number"?(w.boundary=4,w.storage=4):x.isVector2?(w.boundary=8,w.storage=8):x.isVector3||x.isColor?(w.boundary=16,w.storage=12):x.isVector4?(w.boundary=16,w.storage=16):x.isMatrix3?(w.boundary=48,w.storage=48):x.isMatrix4?(w.boundary=64,w.storage=64):x.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",x),w}function _(x){const w=x.target;w.removeEventListener("dispose",_);const S=s.indexOf(w.__bindingPointIndex);s.splice(S,1),t.deleteBuffer(i[w.id]),delete i[w.id],delete o[w.id]}function v(){for(const x in i)t.deleteBuffer(i[x]);s=[],i={},o={}}return{bind:l,update:c,dispose:v}}function wae(){const t=Jm("canvas");return t.style.display="block",t}class iR{constructor(e={}){const{canvas:n=wae(),context:r=null,depth:i=!0,stencil:o=!0,alpha:s=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:c=!1,powerPreference:u="default",failIfMajorPerformanceCaveat:d=!1}=e;this.isWebGLRenderer=!0;let f;r!==null?f=r.getContextAttributes().alpha:f=s;let h=null,g=null;const y=[],_=[];this.domElement=n,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.outputEncoding=Oa,this.useLegacyLights=!0,this.toneMapping=ks,this.toneMappingExposure=1;const v=this;let x=!1,w=0,S=0,E=null,C=-1,O=null;const R=new an,T=new an;let A=null,F=n.width,N=n.height,U=1,k=null,z=null;const G=new an(0,0,F,N),W=new an(0,0,F,N);let B=!1;const j=new xS;let $=!1,q=!1,K=null;const re=new rt,J=new Z,le={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function ae(){return E===null?U:1}let oe=r;function De(te,pe){for(let Ne=0;Ne0?g=_[_.length-1]:g=null,y.pop(),y.length>0?h=y[y.length-1]:h=null};function jn(te,pe,Ne,ce){if(te.visible===!1)return;if(te.layers.test(pe.layers)){if(te.isGroup)Ne=te.renderOrder;else if(te.isLOD)te.autoUpdate===!0&&te.update(pe);else if(te.isLight)g.pushLight(te),te.castShadow&&g.pushShadow(te);else if(te.isSprite){if(!te.frustumCulled||j.intersectsSprite(te)){ce&&J.setFromMatrixPosition(te.matrixWorld).applyMatrix4(re);const ne=dt.update(te),fe=te.material;fe.visible&&h.push(te,ne,fe,Ne,J.z,null)}}else if((te.isMesh||te.isLine||te.isPoints)&&(te.isSkinnedMesh&&te.skeleton.frame!==me.render.frame&&(te.skeleton.update(),te.skeleton.frame=me.render.frame),!te.frustumCulled||j.intersectsObject(te))){ce&&J.setFromMatrixPosition(te.matrixWorld).applyMatrix4(re);const ne=dt.update(te),fe=te.material;if(Array.isArray(fe)){const _e=ne.groups;for(let Se=0,Fe=_e.length;Se0&&xn(L,Y,pe,Ne),ce&&we.viewport(R.copy(ce)),L.length>0&&Ft(L,pe,Ne),Y.length>0&&Ft(Y,pe,Ne),ne.length>0&&Ft(ne,pe,Ne),we.buffers.depth.setTest(!0),we.buffers.depth.setMask(!0),we.buffers.color.setMask(!0),we.setPolygonOffset(!1)}function xn(te,pe,Ne,ce){if(K===null){const fe=ve.isWebGL2;K=new gn(1024,1024,{generateMipmaps:!0,type:Te.has("EXT_color_buffer_half_float")?yr:nr,minFilter:xc,samples:fe&&a===!0?4:0})}const L=v.getRenderTarget();v.setRenderTarget(K),v.clear();const Y=v.toneMapping;v.toneMapping=ks,Ft(te,Ne,ce),de.updateMultisampleRenderTarget(K),de.updateRenderTargetMipmap(K);let ne=!1;for(let fe=0,_e=pe.length;fe<_e;fe++){const Se=pe[fe],Fe=Se.object,Ce=Se.geometry,je=Se.material,qe=Se.group;if(je.side===Hr&&Fe.layers.test(ce.layers)){const Qe=je.side;je.side=Vr,je.needsUpdate=!0,kt(Fe,Ne,ce,Ce,je,qe),je.side=Qe,je.needsUpdate=!0,ne=!0}}ne===!0&&(de.updateMultisampleRenderTarget(K),de.updateRenderTargetMipmap(K)),v.setRenderTarget(L),v.toneMapping=Y}function Ft(te,pe,Ne){const ce=pe.isScene===!0?pe.overrideMaterial:null;for(let L=0,Y=te.length;L0&&de.useMultisampledRTT(te)===!1?L=se.get(te).__webglMultisampledFramebuffer:L=Fe,R.copy(te.viewport),T.copy(te.scissor),A=te.scissorTest}else R.copy(G).multiplyScalar(U).floor(),T.copy(W).multiplyScalar(U).floor(),A=B;if(we.bindFramebuffer(36160,L)&&ve.drawBuffers&&ce&&we.drawBuffers(te,L),we.viewport(R),we.scissor(T),we.setScissorTest(A),Y){const _e=se.get(te.texture);oe.framebufferTexture2D(36160,36064,34069+pe,_e.__webglTexture,Ne)}else if(ne){const _e=se.get(te.texture),Se=pe||0;oe.framebufferTextureLayer(36160,36064,_e.__webglTexture,Ne||0,Se)}C=-1},this.readRenderTargetPixels=function(te,pe,Ne,ce,L,Y,ne){if(!(te&&te.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let fe=se.get(te).__webglFramebuffer;if(te.isWebGLCubeRenderTarget&&ne!==void 0&&(fe=fe[ne]),fe){we.bindFramebuffer(36160,fe);try{const _e=te.texture,Se=_e.format,Fe=_e.type;if(Se!==Jn&&Ae.convert(Se)!==oe.getParameter(35739)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const Ce=Fe===yr&&(Te.has("EXT_color_buffer_half_float")||ve.isWebGL2&&Te.has("EXT_color_buffer_float"));if(Fe!==nr&&Ae.convert(Fe)!==oe.getParameter(35738)&&!(Fe===Yn&&(ve.isWebGL2||Te.has("OES_texture_float")||Te.has("WEBGL_color_buffer_float")))&&!Ce){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}pe>=0&&pe<=te.width-ce&&Ne>=0&&Ne<=te.height-L&&oe.readPixels(pe,Ne,ce,L,Ae.convert(Se),Ae.convert(Fe),Y)}finally{const _e=E!==null?se.get(E).__webglFramebuffer:null;we.bindFramebuffer(36160,_e)}}},this.copyFramebufferToTexture=function(te,pe,Ne=0){const ce=Math.pow(2,-Ne),L=Math.floor(pe.image.width*ce),Y=Math.floor(pe.image.height*ce);de.setTexture2D(pe,0),oe.copyTexSubImage2D(3553,Ne,0,0,te.x,te.y,L,Y),we.unbindTexture()},this.copyTextureToTexture=function(te,pe,Ne,ce=0){const L=pe.image.width,Y=pe.image.height,ne=Ae.convert(Ne.format),fe=Ae.convert(Ne.type);de.setTexture2D(Ne,0),oe.pixelStorei(37440,Ne.flipY),oe.pixelStorei(37441,Ne.premultiplyAlpha),oe.pixelStorei(3317,Ne.unpackAlignment),pe.isDataTexture?oe.texSubImage2D(3553,ce,te.x,te.y,L,Y,ne,fe,pe.image.data):pe.isCompressedTexture?oe.compressedTexSubImage2D(3553,ce,te.x,te.y,pe.mipmaps[0].width,pe.mipmaps[0].height,ne,pe.mipmaps[0].data):oe.texSubImage2D(3553,ce,te.x,te.y,ne,fe,pe.image),ce===0&&Ne.generateMipmaps&&oe.generateMipmap(3553),we.unbindTexture()},this.copyTextureToTexture3D=function(te,pe,Ne,ce,L=0){if(v.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const Y=te.max.x-te.min.x+1,ne=te.max.y-te.min.y+1,fe=te.max.z-te.min.z+1,_e=Ae.convert(ce.format),Se=Ae.convert(ce.type);let Fe;if(ce.isData3DTexture)de.setTexture3D(ce,0),Fe=32879;else if(ce.isDataArrayTexture)de.setTexture2DArray(ce,0),Fe=35866;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}oe.pixelStorei(37440,ce.flipY),oe.pixelStorei(37441,ce.premultiplyAlpha),oe.pixelStorei(3317,ce.unpackAlignment);const Ce=oe.getParameter(3314),je=oe.getParameter(32878),qe=oe.getParameter(3316),Qe=oe.getParameter(3315),et=oe.getParameter(32877),jt=Ne.isCompressedTexture?Ne.mipmaps[0]:Ne.image;oe.pixelStorei(3314,jt.width),oe.pixelStorei(32878,jt.height),oe.pixelStorei(3316,te.min.x),oe.pixelStorei(3315,te.min.y),oe.pixelStorei(32877,te.min.z),Ne.isDataTexture||Ne.isData3DTexture?oe.texSubImage3D(Fe,L,pe.x,pe.y,pe.z,Y,ne,fe,_e,Se,jt.data):Ne.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),oe.compressedTexSubImage3D(Fe,L,pe.x,pe.y,pe.z,Y,ne,fe,_e,jt.data)):oe.texSubImage3D(Fe,L,pe.x,pe.y,pe.z,Y,ne,fe,_e,Se,jt),oe.pixelStorei(3314,Ce),oe.pixelStorei(32878,je),oe.pixelStorei(3316,qe),oe.pixelStorei(3315,Qe),oe.pixelStorei(32877,et),L===0&&ce.generateMipmaps&&oe.generateMipmap(Fe),we.unbindTexture()},this.initTexture=function(te){te.isCubeTexture?de.setTextureCube(te,0):te.isData3DTexture?de.setTexture3D(te,0):te.isDataArrayTexture||te.isCompressedArrayTexture?de.setTexture2DArray(te,0):de.setTexture2D(te,0),we.unbindTexture()},this.resetState=function(){w=0,S=0,E=null,we.reset(),vt.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get physicallyCorrectLights(){return console.warn("THREE.WebGLRenderer: the property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),!this.useLegacyLights}set physicallyCorrectLights(e){console.warn("THREE.WebGLRenderer: the property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),this.useLegacyLights=!e}}class Qj extends iR{}Qj.prototype.isWebGL1Renderer=!0;class MS{constructor(e,n=25e-5){this.isFogExp2=!0,this.name="",this.color=new lt(e),this.density=n}clone(){return new MS(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}}class ES{constructor(e,n=1,r=1e3){this.isFog=!0,this.name="",this.color=new lt(e),this.near=n,this.far=r}clone(){return new ES(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}}class Sc extends Dn{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,n){return super.copy(e,n),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const n=super.toJSON(e);return this.fog!==null&&(n.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(n.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(n.object.backgroundIntensity=this.backgroundIntensity),n}get autoUpdate(){return console.warn("THREE.Scene: autoUpdate was renamed to matrixWorldAutoUpdate in r144."),this.matrixWorldAutoUpdate}set autoUpdate(e){console.warn("THREE.Scene: autoUpdate was renamed to matrixWorldAutoUpdate in r144."),this.matrixWorldAutoUpdate=e}}class PS{constructor(e,n){this.isInterleavedBuffer=!0,this.array=e,this.stride=n,this.count=e!==void 0?e.length/n:0,this.usage=Qm,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=Co()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,n,r){e*=this.stride,r*=n.stride;for(let i=0,o=this.stride;ie.far||n.push({distance:l,point:cp.clone(),uv:lo.getInterpolation(cp,L0,dp,k0,vL,SE,yL,new Ee),face:null,object:this})}copy(e,n){return super.copy(e,n),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}}function N0(t,e,n,r,i,o){Gd.subVectors(t,n).addScalar(.5).multiply(r),i!==void 0?(up.x=o*Gd.x-i*Gd.y,up.y=i*Gd.x+o*Gd.y):up.copy(Gd),t.copy(e),t.x+=up.x,t.y+=up.y,t.applyMatrix4(Jj)}const F0=new Z,_L=new Z;class t8 extends Dn{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const n=e.levels;for(let r=0,i=n.length;r0){let r,i;for(r=1,i=n.length;r0){F0.setFromMatrixPosition(this.matrixWorld);const i=e.ray.origin.distanceTo(F0);this.getObjectForDistance(i).raycast(e,n)}}update(e){const n=this.levels;if(n.length>1){F0.setFromMatrixPosition(e.matrixWorld),_L.setFromMatrixPosition(this.matrixWorld);const r=F0.distanceTo(_L)/e.zoom;n[0].object.visible=!0;let i,o;for(i=1,o=n.length;i=s)n[i-1].object.visible=!1,n[i].object.visible=!0;else break}for(this._currentLevel=i-1;il)continue;f.applyMatrix4(this.matrixWorld);const R=e.ray.origin.distanceTo(f);Re.far||n.push({distance:R,point:d.clone().applyMatrix4(this.matrixWorld),index:w,face:null,faceIndex:null,object:this})}}else{const v=Math.max(0,s.start),x=Math.min(_.count,s.start+s.count);for(let w=v,S=x-1;wl)continue;f.applyMatrix4(this.matrixWorld);const C=e.ray.origin.distanceTo(f);Ce.far||n.push({distance:C,point:d.clone().applyMatrix4(this.matrixWorld),index:w,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const n=this.geometry.morphAttributes,r=Object.keys(n);if(r.length>0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=i.length;o0){const i=n[r[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=i.length;oi.far)return;o.push({distance:c,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,object:s})}}class l8 extends qn{constructor(e,n,r,i,o,s,a,l,c){super(e,n,r,i,o,s,a,l,c),this.isVideoTexture=!0,this.minFilter=s!==void 0?s:Dt,this.magFilter=o!==void 0?o:Dt,this.generateMipmaps=!1;const u=this;function d(){u.needsUpdate=!0,e.requestVideoFrameCallback(d)}"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback(d)}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;"requestVideoFrameCallback"in e===!1&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class N2 extends qn{constructor(e,n,r){super({width:e,height:n}),this.isFramebufferTexture=!0,this.format=r,this.magFilter=Qt,this.minFilter=Qt,this.generateMipmaps=!1,this.needsUpdate=!0}}class aR extends qn{constructor(e,n,r,i,o,s,a,l,c,u,d,f){super(null,s,a,l,c,u,i,o,d,f),this.isCompressedTexture=!0,this.image={width:n,height:r},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class Eae extends aR{constructor(e,n,r,i,o,s){super(e,n,r,o,s),this.isCompressedArrayTexture=!0,this.image.depth=i,this.wrapR=Xr}}class c8 extends qn{constructor(e,n,r,i,o,s,a,l,c){super(e,n,r,i,o,s,a,l,c),this.isCanvasTexture=!0,this.needsUpdate=!0}}class Gs{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,n){const r=this.getUtoTmapping(e);return this.getPoint(r,n)}getPoints(e=5){const n=[];for(let r=0;r<=e;r++)n.push(this.getPoint(r/e));return n}getSpacedPoints(e=5){const n=[];for(let r=0;r<=e;r++)n.push(this.getPointAt(r/e));return n}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const n=[];let r,i=this.getPoint(0),o=0;n.push(0);for(let s=1;s<=e;s++)r=this.getPoint(s/e),o+=r.distanceTo(i),n.push(o),i=r;return this.cacheArcLengths=n,n}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,n){const r=this.getLengths();let i=0;const o=r.length;let s;n?s=n:s=e*r[o-1];let a=0,l=o-1,c;for(;a<=l;)if(i=Math.floor(a+(l-a)/2),c=r[i]-s,c<0)a=i+1;else if(c>0)l=i-1;else{l=i;break}if(i=l,r[i]===s)return i/(o-1);const u=r[i],f=r[i+1]-u,h=(s-u)/f;return(i+h)/(o-1)}getTangent(e,n){let i=e-1e-4,o=e+1e-4;i<0&&(i=0),o>1&&(o=1);const s=this.getPoint(i),a=this.getPoint(o),l=n||(s.isVector2?new Ee:new Z);return l.copy(a).sub(s).normalize(),l}getTangentAt(e,n){const r=this.getUtoTmapping(e);return this.getTangent(r,n)}computeFrenetFrames(e,n){const r=new Z,i=[],o=[],s=[],a=new Z,l=new rt;for(let h=0;h<=e;h++){const g=h/e;i[h]=this.getTangentAt(g,new Z)}o[0]=new Z,s[0]=new Z;let c=Number.MAX_VALUE;const u=Math.abs(i[0].x),d=Math.abs(i[0].y),f=Math.abs(i[0].z);u<=c&&(c=u,r.set(1,0,0)),d<=c&&(c=d,r.set(0,1,0)),f<=c&&r.set(0,0,1),a.crossVectors(i[0],r).normalize(),o[0].crossVectors(i[0],a),s[0].crossVectors(i[0],o[0]);for(let h=1;h<=e;h++){if(o[h]=o[h-1].clone(),s[h]=s[h-1].clone(),a.crossVectors(i[h-1],i[h]),a.length()>Number.EPSILON){a.normalize();const g=Math.acos(Mr(i[h-1].dot(i[h]),-1,1));o[h].applyMatrix4(l.makeRotationAxis(a,g))}s[h].crossVectors(i[h],o[h])}if(n===!0){let h=Math.acos(Mr(o[0].dot(o[e]),-1,1));h/=e,i[0].dot(a.crossVectors(o[0],o[e]))>0&&(h=-h);for(let g=1;g<=e;g++)o[g].applyMatrix4(l.makeRotationAxis(i[g],h*g)),s[g].crossVectors(i[g],o[g])}return{tangents:i,normals:o,binormals:s}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class TS extends Gs{constructor(e=0,n=0,r=1,i=1,o=0,s=Math.PI*2,a=!1,l=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=n,this.xRadius=r,this.yRadius=i,this.aStartAngle=o,this.aEndAngle=s,this.aClockwise=a,this.aRotation=l}getPoint(e,n){const r=n||new Ee,i=Math.PI*2;let o=this.aEndAngle-this.aStartAngle;const s=Math.abs(o)i;)o-=i;o0?0:(Math.floor(Math.abs(a)/o)+1)*o:l===0&&a===o-1&&(a=o-2,l=1);let c,u;this.closed||a>0?c=i[(a-1)%o]:(V0.subVectors(i[0],i[1]).add(i[0]),c=V0);const d=i[a%o],f=i[(a+1)%o];if(this.closed||a+2i.length-2?i.length-1:s+1],d=i[s>i.length-3?i.length-1:s+2];return r.set(LL(a,l.x,c.x,u.x,d.x),LL(a,l.y,c.y,u.y,d.y)),r}copy(e){super.copy(e),this.points=[];for(let n=0,r=e.points.length;n=r){const s=i[o]-r,a=this.curves[o],l=a.getLength(),c=l===0?0:1-s/l;return a.getPointAt(c,n)}o++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let n=0;for(let r=0,i=this.curves.length;r1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n}copy(e){super.copy(e),this.curves=[];for(let n=0,r=e.curves.length;n0){const d=c.getPoint(0);d.equals(this.currentPoint)||this.lineTo(d.x,d.y)}this.curves.push(c);const u=c.getPoint(1);return this.currentPoint.copy(u),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class xh extends Jt{constructor(e=[new Ee(0,-.5),new Ee(.5,0),new Ee(0,.5)],n=12,r=0,i=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:e,segments:n,phiStart:r,phiLength:i},n=Math.floor(n),i=Mr(i,0,Math.PI*2);const o=[],s=[],a=[],l=[],c=[],u=1/n,d=new Z,f=new Ee,h=new Z,g=new Z,y=new Z;let _=0,v=0;for(let x=0;x<=e.length-1;x++)switch(x){case 0:_=e[x+1].x-e[x].x,v=e[x+1].y-e[x].y,h.x=v*1,h.y=-_,h.z=v*0,y.copy(h),h.normalize(),l.push(h.x,h.y,h.z);break;case e.length-1:l.push(y.x,y.y,y.z);break;default:_=e[x+1].x-e[x].x,v=e[x+1].y-e[x].y,h.x=v*1,h.y=-_,h.z=v*0,g.copy(h),h.x+=y.x,h.y+=y.y,h.z+=y.z,h.normalize(),l.push(h.x,h.y,h.z),y.copy(g)}for(let x=0;x<=n;x++){const w=r+x*u*i,S=Math.sin(w),E=Math.cos(w);for(let C=0;C<=e.length-1;C++){d.x=e[C].x*S,d.y=e[C].y,d.z=e[C].x*E,s.push(d.x,d.y,d.z),f.x=x/n,f.y=C/(e.length-1),a.push(f.x,f.y);const O=l[3*C+0]*S,R=l[3*C+1],T=l[3*C+0]*E;c.push(O,R,T)}}for(let x=0;x0&&w(!0),n>0&&w(!1)),this.setIndex(u),this.setAttribute("position",new Et(d,3)),this.setAttribute("normal",new Et(f,3)),this.setAttribute("uv",new Et(h,2));function x(){const S=new Z,E=new Z;let C=0;const O=(n-e)/r;for(let R=0;R<=o;R++){const T=[],A=R/o,F=A*(n-e)+e;for(let N=0;N<=i;N++){const U=N/i,k=U*l+a,z=Math.sin(k),G=Math.cos(k);E.x=F*z,E.y=-A*r+_,E.z=F*G,d.push(E.x,E.y,E.z),S.set(z,O,G).normalize(),f.push(S.x,S.y,S.z),h.push(U,1-A),T.push(g++)}y.push(T)}for(let R=0;R.9&&O<.1&&(w<.2&&(s[x+0]+=1),S<.2&&(s[x+2]+=1),E<.2&&(s[x+4]+=1))}}function f(x){o.push(x.x,x.y,x.z)}function h(x,w){const S=x*3;w.x=e[S+0],w.y=e[S+1],w.z=e[S+2]}function g(){const x=new Z,w=new Z,S=new Z,E=new Z,C=new Ee,O=new Ee,R=new Ee;for(let T=0,A=0;T80*n){a=c=t[0],l=u=t[1];for(let g=n;gc&&(c=d),f>u&&(u=f);h=Math.max(c-a,u-l),h=h!==0?32767/h:0}return tg(o,s,n,a,l,h,0),s}};function g8(t,e,n,r,i){let o,s;if(i===Zae(t,e,n,r)>0)for(o=e;o=e;o-=r)s=kL(o,t[o],t[o+1],s);return s&&RS(s,s.next)&&(rg(s),s=s.next),s}function Xu(t,e){if(!t)return t;e||(e=t);let n=t,r;do if(r=!1,!n.steiner&&(RS(n,n.next)||vr(n.prev,n,n.next)===0)){if(rg(n),n=e=n.prev,n===n.next)break;r=!0}else n=n.next;while(r||n!==e);return e}function tg(t,e,n,r,i,o,s){if(!t)return;!s&&o&&jae(t,r,i,o);let a=t,l,c;for(;t.prev!==t.next;){if(l=t.prev,c=t.next,o?kae(t,r,i,o):Lae(t)){e.push(l.i/n|0),e.push(t.i/n|0),e.push(c.i/n|0),rg(t),t=c.next,a=c.next;continue}if(t=c,t===a){s?s===1?(t=Nae(Xu(t),e,n),tg(t,e,n,r,i,o,2)):s===2&&Fae(t,e,n,r,i,o):tg(Xu(t),e,n,r,i,o,1);break}}}function Lae(t){const e=t.prev,n=t,r=t.next;if(vr(e,n,r)>=0)return!1;const i=e.x,o=n.x,s=r.x,a=e.y,l=n.y,c=r.y,u=io?i>s?i:s:o>s?o:s,h=a>l?a>c?a:c:l>c?l:c;let g=r.next;for(;g!==e;){if(g.x>=u&&g.x<=f&&g.y>=d&&g.y<=h&&Rf(i,a,o,l,s,c,g.x,g.y)&&vr(g.prev,g,g.next)>=0)return!1;g=g.next}return!0}function kae(t,e,n,r){const i=t.prev,o=t,s=t.next;if(vr(i,o,s)>=0)return!1;const a=i.x,l=o.x,c=s.x,u=i.y,d=o.y,f=s.y,h=al?a>c?a:c:l>c?l:c,_=u>d?u>f?u:f:d>f?d:f,v=F2(h,g,e,n,r),x=F2(y,_,e,n,r);let w=t.prevZ,S=t.nextZ;for(;w&&w.z>=v&&S&&S.z<=x;){if(w.x>=h&&w.x<=y&&w.y>=g&&w.y<=_&&w!==i&&w!==s&&Rf(a,u,l,d,c,f,w.x,w.y)&&vr(w.prev,w,w.next)>=0||(w=w.prevZ,S.x>=h&&S.x<=y&&S.y>=g&&S.y<=_&&S!==i&&S!==s&&Rf(a,u,l,d,c,f,S.x,S.y)&&vr(S.prev,S,S.next)>=0))return!1;S=S.nextZ}for(;w&&w.z>=v;){if(w.x>=h&&w.x<=y&&w.y>=g&&w.y<=_&&w!==i&&w!==s&&Rf(a,u,l,d,c,f,w.x,w.y)&&vr(w.prev,w,w.next)>=0)return!1;w=w.prevZ}for(;S&&S.z<=x;){if(S.x>=h&&S.x<=y&&S.y>=g&&S.y<=_&&S!==i&&S!==s&&Rf(a,u,l,d,c,f,S.x,S.y)&&vr(S.prev,S,S.next)>=0)return!1;S=S.nextZ}return!0}function Nae(t,e,n){let r=t;do{const i=r.prev,o=r.next.next;!RS(i,o)&&v8(i,r,r.next,o)&&ng(i,o)&&ng(o,i)&&(e.push(i.i/n|0),e.push(r.i/n|0),e.push(o.i/n|0),rg(r),rg(r.next),r=t=o),r=r.next}while(r!==t);return Xu(r)}function Fae(t,e,n,r,i,o){let s=t;do{let a=s.next.next;for(;a!==s.prev;){if(s.i!==a.i&&Wae(s,a)){let l=y8(s,a);s=Xu(s,s.next),l=Xu(l,l.next),tg(s,e,n,r,i,o,0),tg(l,e,n,r,i,o,0);return}a=a.next}s=s.next}while(s!==t)}function zae(t,e,n,r){const i=[];let o,s,a,l,c;for(o=0,s=e.length;o=n.next.y&&n.next.y!==n.y){const f=n.x+(s-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(f<=o&&f>r&&(r=f,i=n.x=n.x&&n.x>=l&&o!==n.x&&Rf(si.x||n.x===i.x&&Vae(i,n)))&&(i=n,u=d)),n=n.next;while(n!==a);return i}function Vae(t,e){return vr(t.prev,t,e.prev)<0&&vr(e.next,t,t.next)<0}function jae(t,e,n,r){let i=t;do i.z===0&&(i.z=F2(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,$ae(i)}function $ae(t){let e,n,r,i,o,s,a,l,c=1;do{for(n=t,t=null,o=null,s=0;n;){for(s++,r=n,a=0,e=0;e0||l>0&&r;)a!==0&&(l===0||!r||n.z<=r.z)?(i=n,n=n.nextZ,a--):(i=r,r=r.nextZ,l--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,c*=2}while(s>1);return t}function F2(t,e,n,r,i){return t=(t-n)*i|0,e=(e-r)*i|0,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t|e<<1}function Gae(t){let e=t,n=t;do(e.x=(t-s)*(o-a)&&(t-s)*(r-a)>=(n-s)*(e-a)&&(n-s)*(o-a)>=(i-s)*(r-a)}function Wae(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!Yae(t,e)&&(ng(t,e)&&ng(e,t)&&Xae(t,e)&&(vr(t.prev,t,e.prev)||vr(t,e.prev,e))||RS(t,e)&&vr(t.prev,t,t.next)>0&&vr(e.prev,e,e.next)>0)}function vr(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function RS(t,e){return t.x===e.x&&t.y===e.y}function v8(t,e,n,r){const i=Y0(vr(t,e,n)),o=Y0(vr(t,e,r)),s=Y0(vr(n,r,t)),a=Y0(vr(n,r,e));return!!(i!==o&&s!==a||i===0&&W0(t,n,e)||o===0&&W0(t,r,e)||s===0&&W0(n,t,r)||a===0&&W0(n,e,r))}function W0(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function Y0(t){return t>0?1:t<0?-1:0}function Yae(t,e){let n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&v8(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}function ng(t,e){return vr(t.prev,t,t.next)<0?vr(t,e,t.next)>=0&&vr(t,t.prev,e)>=0:vr(t,e,t.prev)<0||vr(t,t.next,e)<0}function Xae(t,e){let n=t,r=!1;const i=(t.x+e.x)/2,o=(t.y+e.y)/2;do n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next;while(n!==t);return r}function y8(t,e){const n=new z2(t.i,t.x,t.y),r=new z2(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function kL(t,e,n,r){const i=new z2(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function rg(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function z2(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Zae(t,e,n,r){let i=0;for(let o=e,s=n-r;o2&&t[e-1].equals(t[0])&&t.pop()}function FL(t,e){for(let n=0;nNumber.EPSILON){const Pe=Math.sqrt(ee),$e=Math.sqrt(We*We+ht*ht),Ge=se.x-dt/Pe,Ke=se.y+ot/Pe,gt=de.x-ht/$e,ut=de.y+We/$e,Ae=((gt-Ge)*ht-(ut-Ke)*We)/(ot*ht-dt*We);ke=Ge+ot*Ae-me.x,Ve=Ke+dt*Ae-me.y;const vt=ke*ke+Ve*Ve;if(vt<=2)return new Ee(ke,Ve);Ze=Math.sqrt(vt/2)}else{let Pe=!1;ot>Number.EPSILON?We>Number.EPSILON&&(Pe=!0):ot<-Number.EPSILON?We<-Number.EPSILON&&(Pe=!0):Math.sign(dt)===Math.sign(ht)&&(Pe=!0),Pe?(ke=-dt,Ve=ot,Ze=Math.sqrt(ee)):(ke=ot,Ve=dt,Ze=Math.sqrt(ee/2))}return new Ee(ke/Ze,Ve/Ze)}const j=[];for(let me=0,se=k.length,de=se-1,ke=me+1;me=0;me--){const se=me/_,de=h*Math.cos(se*Math.PI/2),ke=g*Math.sin(se*Math.PI/2)+y;for(let Ve=0,Ze=k.length;Ve=0;){const ke=de;let Ve=de-1;Ve<0&&(Ve=me.length-1);for(let Ze=0,ot=u+_*2;Ze0)&&h.push(w,S,C),(v!==r-1||l0!=e>0&&this.version++,this._sheen=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class S8 extends jr{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new lt(16777215),this.specular=new lt(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new lt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=yl,this.normalScale=new Ee(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Mg,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class b8 extends jr{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new lt(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new lt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=yl,this.normalScale=new Ee(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}class mR extends jr{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=yl,this.normalScale=new Ee(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}}class M8 extends jr{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new lt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new lt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=yl,this.normalScale=new Ee(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Mg,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class E8 extends jr{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new lt(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=yl,this.normalScale=new Ee(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this.fog=e.fog,this}}class P8 extends eo{constructor(e){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}function qo(t,e,n){return gR(t)?new t.constructor(t.subarray(e,n!==void 0?n:t.length)):t.slice(e,n)}function Ru(t,e,n){return!t||!n&&t.constructor===e?t:typeof e.BYTES_PER_ELEMENT=="number"?new e(t):Array.prototype.slice.call(t)}function gR(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function C8(t){function e(i,o){return t[i]-t[o]}const n=t.length,r=new Array(n);for(let i=0;i!==n;++i)r[i]=i;return r.sort(e),r}function U2(t,e,n){const r=t.length,i=new t.constructor(r);for(let o=0,s=0;s!==r;++o){const a=n[o]*e;for(let l=0;l!==e;++l)i[s++]=t[a+l]}return i}function vR(t,e,n,r){let i=1,o=t[0];for(;o!==void 0&&o[r]===void 0;)o=t[i++];if(o===void 0)return;let s=o[r];if(s!==void 0)if(Array.isArray(s))do s=o[r],s!==void 0&&(e.push(o.time),n.push.apply(n,s)),o=t[i++];while(o!==void 0);else if(s.toArray!==void 0)do s=o[r],s!==void 0&&(e.push(o.time),s.toArray(n,n.length)),o=t[i++];while(o!==void 0);else do s=o[r],s!==void 0&&(e.push(o.time),n.push(s)),o=t[i++];while(o!==void 0)}function Jae(t,e,n,r,i=30){const o=t.clone();o.name=e;const s=[];for(let l=0;l=r)){d.push(c.times[h]);for(let y=0;yo.tracks[l].times[0]&&(a=o.tracks[l].times[0]);for(let l=0;l=a.times[g]){const v=g*d+u,x=v+d-u;y=qo(a.values,v,x)}else{const v=a.createInterpolant(),x=u,w=d-u;v.evaluate(o),y=qo(v.resultBuffer,x,w)}l==="quaternion"&&new Hn().fromArray(y).normalize().conjugate().toArray(y);const _=c.times.length;for(let v=0;v<_;++v){const x=v*h+f;if(l==="quaternion")Hn.multiplyQuaternionsFlat(c.values,x,y,0,c.values,x);else{const w=h-f*2;for(let S=0;S=o)){const a=n[1];e=o)break t}s=r,r=0;break n}break e}for(;r>>1;en;)--s;if(++s,o!==0||s!==i){o>=s&&(s=Math.max(s,1),o=s-1);const a=this.getValueSize();this.times=qo(r,o,s),this.values=qo(this.values,o*a,s*a)}return this}validate(){let e=!0;const n=this.getValueSize();n-Math.floor(n)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const r=this.times,i=this.values,o=r.length;o===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let s=null;for(let a=0;a!==o;a++){const l=r[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),e=!1;break}if(s!==null&&s>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,s),e=!1;break}s=l}if(i!==void 0&&gR(i))for(let a=0,l=i.length;a!==l;++a){const c=i[a];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,c),e=!1;break}}return e}optimize(){const e=qo(this.times),n=qo(this.values),r=this.getValueSize(),i=this.getInterpolation()===O_,o=e.length-1;let s=1;for(let a=1;a0){e[s]=e[o];for(let a=o*r,l=s*r,c=0;c!==r;++c)n[l+c]=n[a+c];++s}return s!==e.length?(this.times=qo(e,0,s),this.values=qo(n,0,s*r)):(this.times=e,this.values=n),this}clone(){const e=qo(this.times,0),n=qo(this.values,0),r=this.constructor,i=new r(this.name,e,n);return i.createInterpolant=this.createInterpolant,i}}Ws.prototype.TimeBufferType=Float32Array;Ws.prototype.ValueBufferType=Float32Array;Ws.prototype.DefaultInterpolation=qm;class id extends Ws{}id.prototype.ValueTypeName="bool";id.prototype.ValueBufferType=Array;id.prototype.DefaultInterpolation=Zm;id.prototype.InterpolantFactoryMethodLinear=void 0;id.prototype.InterpolantFactoryMethodSmooth=void 0;class _R extends Ws{}_R.prototype.ValueTypeName="color";class ig extends Ws{}ig.prototype.ValueTypeName="number";class R8 extends Ug{constructor(e,n,r,i){super(e,n,r,i)}interpolate_(e,n,r,i){const o=this.resultBuffer,s=this.sampleValues,a=this.valueSize,l=(r-n)/(i-n);let c=e*a;for(let u=c+a;c!==u;c+=4)Hn.slerpFlat(o,0,s,c-a,s,c,l);return o}}class bh extends Ws{InterpolantFactoryMethodLinear(e){return new R8(this.times,this.values,this.getValueSize(),e)}}bh.prototype.ValueTypeName="quaternion";bh.prototype.DefaultInterpolation=qm;bh.prototype.InterpolantFactoryMethodSmooth=void 0;class od extends Ws{}od.prototype.ValueTypeName="string";od.prototype.ValueBufferType=Array;od.prototype.DefaultInterpolation=Zm;od.prototype.InterpolantFactoryMethodLinear=void 0;od.prototype.InterpolantFactoryMethodSmooth=void 0;class og extends Ws{}og.prototype.ValueTypeName="vector";class sg{constructor(e,n=-1,r,i=vS){this.name=e,this.tracks=r,this.duration=n,this.blendMode=i,this.uuid=Co(),this.duration<0&&this.resetDuration()}static parse(e){const n=[],r=e.tracks,i=1/(e.fps||1);for(let s=0,a=r.length;s!==a;++s)n.push(rle(r[s]).scale(i));const o=new this(e.name,e.duration,n,e.blendMode);return o.uuid=e.uuid,o}static toJSON(e){const n=[],r=e.tracks,i={name:e.name,duration:e.duration,tracks:n,uuid:e.uuid,blendMode:e.blendMode};for(let o=0,s=r.length;o!==s;++o)n.push(Ws.toJSON(r[o]));return i}static CreateFromMorphTargetSequence(e,n,r,i){const o=n.length,s=[];for(let a=0;a1){const d=u[1];let f=i[d];f||(i[d]=f=[]),f.push(c)}}const s=[];for(const a in i)s.push(this.CreateFromMorphTargetSequence(a,i[a],n,r));return s}static parseAnimation(e,n){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const r=function(d,f,h,g,y){if(h.length!==0){const _=[],v=[];vR(h,_,v,g),_.length!==0&&y.push(new d(f,_,v))}},i=[],o=e.name||"default",s=e.fps||30,a=e.blendMode;let l=e.length||-1;const c=e.hierarchy||[];for(let d=0;d{n&&n(o),this.manager.itemEnd(e)},0),o;if(Ya[e]!==void 0){Ya[e].push({onLoad:n,onProgress:r,onError:i});return}Ya[e]=[],Ya[e].push({onLoad:n,onProgress:r,onError:i});const s=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,l=this.responseType;fetch(s).then(c=>{if(c.status===200||c.status===0){if(c.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||c.body===void 0||c.body.getReader===void 0)return c;const u=Ya[e],d=c.body.getReader(),f=c.headers.get("Content-Length")||c.headers.get("X-File-Size"),h=f?parseInt(f):0,g=h!==0;let y=0;const _=new ReadableStream({start(v){x();function x(){d.read().then(({done:w,value:S})=>{if(w)v.close();else{y+=S.byteLength;const E=new ProgressEvent("progress",{lengthComputable:g,loaded:y,total:h});for(let C=0,O=u.length;C{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(u=>new DOMParser().parseFromString(u,a));case"json":return c.json();default:if(a===void 0)return c.text();{const d=/charset="?([^;"\s]*)"?/i.exec(a),f=d&&d[1]?d[1].toLowerCase():void 0,h=new TextDecoder(f);return c.arrayBuffer().then(g=>h.decode(g))}}}).then(c=>{Zu.add(e,c);const u=Ya[e];delete Ya[e];for(let d=0,f=u.length;d{const u=Ya[e];if(u===void 0)throw this.manager.itemError(e),c;delete Ya[e];for(let d=0,f=u.length;d{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class ole extends No{constructor(e){super(e)}load(e,n,r,i){const o=this,s=new hl(this.manager);s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,function(a){try{n(o.parse(JSON.parse(a)))}catch(l){i?i(l):console.error(l),o.manager.itemError(e)}},r,i)}parse(e){const n=[];for(let r=0;r0:i.vertexColors=e.vertexColors),e.uniforms!==void 0)for(const o in e.uniforms){const s=e.uniforms[o];switch(i.uniforms[o]={},s.type){case"t":i.uniforms[o].value=r(s.value);break;case"c":i.uniforms[o].value=new lt().setHex(s.value);break;case"v2":i.uniforms[o].value=new Ee().fromArray(s.value);break;case"v3":i.uniforms[o].value=new Z().fromArray(s.value);break;case"v4":i.uniforms[o].value=new an().fromArray(s.value);break;case"m3":i.uniforms[o].value=new mn().fromArray(s.value);break;case"m4":i.uniforms[o].value=new rt().fromArray(s.value);break;default:i.uniforms[o].value=s.value}}if(e.defines!==void 0&&(i.defines=e.defines),e.vertexShader!==void 0&&(i.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(i.fragmentShader=e.fragmentShader),e.glslVersion!==void 0&&(i.glslVersion=e.glslVersion),e.extensions!==void 0)for(const o in e.extensions)i.extensions[o]=e.extensions[o];if(e.size!==void 0&&(i.size=e.size),e.sizeAttenuation!==void 0&&(i.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(i.map=r(e.map)),e.matcap!==void 0&&(i.matcap=r(e.matcap)),e.alphaMap!==void 0&&(i.alphaMap=r(e.alphaMap)),e.bumpMap!==void 0&&(i.bumpMap=r(e.bumpMap)),e.bumpScale!==void 0&&(i.bumpScale=e.bumpScale),e.normalMap!==void 0&&(i.normalMap=r(e.normalMap)),e.normalMapType!==void 0&&(i.normalMapType=e.normalMapType),e.normalScale!==void 0){let o=e.normalScale;Array.isArray(o)===!1&&(o=[o,o]),i.normalScale=new Ee().fromArray(o)}return e.displacementMap!==void 0&&(i.displacementMap=r(e.displacementMap)),e.displacementScale!==void 0&&(i.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(i.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(i.roughnessMap=r(e.roughnessMap)),e.metalnessMap!==void 0&&(i.metalnessMap=r(e.metalnessMap)),e.emissiveMap!==void 0&&(i.emissiveMap=r(e.emissiveMap)),e.emissiveIntensity!==void 0&&(i.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(i.specularMap=r(e.specularMap)),e.specularIntensityMap!==void 0&&(i.specularIntensityMap=r(e.specularIntensityMap)),e.specularColorMap!==void 0&&(i.specularColorMap=r(e.specularColorMap)),e.envMap!==void 0&&(i.envMap=r(e.envMap)),e.envMapIntensity!==void 0&&(i.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(i.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(i.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(i.lightMap=r(e.lightMap)),e.lightMapIntensity!==void 0&&(i.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(i.aoMap=r(e.aoMap)),e.aoMapIntensity!==void 0&&(i.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(i.gradientMap=r(e.gradientMap)),e.clearcoatMap!==void 0&&(i.clearcoatMap=r(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(i.clearcoatRoughnessMap=r(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(i.clearcoatNormalMap=r(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(i.clearcoatNormalScale=new Ee().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(i.iridescenceMap=r(e.iridescenceMap)),e.iridescenceThicknessMap!==void 0&&(i.iridescenceThicknessMap=r(e.iridescenceThicknessMap)),e.transmissionMap!==void 0&&(i.transmissionMap=r(e.transmissionMap)),e.thicknessMap!==void 0&&(i.thicknessMap=r(e.thicknessMap)),e.sheenColorMap!==void 0&&(i.sheenColorMap=r(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(i.sheenRoughnessMap=r(e.sheenRoughnessMap)),i}setTextures(e){return this.textures=e,this}static createMaterialFromType(e){const n={ShadowMaterial:_8,SpriteMaterial:oR,RawShaderMaterial:x8,ShaderMaterial:sn,PointsMaterial:CS,MeshPhysicalMaterial:w8,MeshStandardMaterial:AS,MeshPhongMaterial:S8,MeshToonMaterial:b8,MeshNormalMaterial:mR,MeshLambertMaterial:M8,MeshDepthMaterial:SS,MeshDistanceMaterial:rR,MeshBasicMaterial:_l,MeshMatcapMaterial:E8,LineDashedMaterial:P8,LineBasicMaterial:eo,Material:jr};return new n[e]}}class B2{static decodeText(e){if(typeof TextDecoder<"u")return new TextDecoder().decode(e);let n="";for(let r=0,i=e.length;r0){const l=new xR(n);o=new ag(l),o.setCrossOrigin(this.crossOrigin);for(let c=0,u=e.length;c0){i=new ag(this.manager),i.setCrossOrigin(this.crossOrigin);for(let s=0,a=e.length;s"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,n,r,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const o=this,s=Zu.get(e);if(s!==void 0)return o.manager.itemStart(e),setTimeout(function(){n&&n(s),o.manager.itemEnd(e)},0),s;const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader,fetch(e,a).then(function(l){return l.blob()}).then(function(l){return createImageBitmap(l,Object.assign(o.options,{colorSpaceConversion:"none"}))}).then(function(l){Zu.add(e,l),n&&n(l),o.manager.itemEnd(e)}).catch(function(l){i&&i(l),o.manager.itemError(e),o.manager.itemEnd(e)}),o.manager.itemStart(e)}}let X0;class MR{static getContext(){return X0===void 0&&(X0=new(window.AudioContext||window.webkitAudioContext)),X0}static setContext(e){X0=e}}class hle extends No{constructor(e){super(e)}load(e,n,r,i){const o=this,s=new hl(this.manager);s.setResponseType("arraybuffer"),s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,function(a){try{const l=a.slice(0);MR.getContext().decodeAudioData(l,function(u){n(u)})}catch(l){i?i(l):console.error(l),o.manager.itemError(e)}},r,i)}}class ple extends DS{constructor(e,n,r=1){super(void 0,r),this.isHemisphereLightProbe=!0;const i=new lt().set(e),o=new lt().set(n),s=new Z(i.r,i.g,i.b),a=new Z(o.r,o.g,o.b),l=Math.sqrt(Math.PI),c=l*Math.sqrt(.75);this.sh.coefficients[0].copy(s).add(a).multiplyScalar(l),this.sh.coefficients[1].copy(s).sub(a).multiplyScalar(c)}}class mle extends DS{constructor(e,n=1){super(void 0,n),this.isAmbientLightProbe=!0;const r=new lt().set(e);this.sh.coefficients[0].set(r.r,r.g,r.b).multiplyScalar(2*Math.sqrt(Math.PI))}}const GL=new rt,WL=new rt,Qc=new rt;class gle{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new or,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new or,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(e){const n=this._cache;if(n.focus!==e.focus||n.fov!==e.fov||n.aspect!==e.aspect*this.aspect||n.near!==e.near||n.far!==e.far||n.zoom!==e.zoom||n.eyeSep!==this.eyeSep){n.focus=e.focus,n.fov=e.fov,n.aspect=e.aspect*this.aspect,n.near=e.near,n.far=e.far,n.zoom=e.zoom,n.eyeSep=this.eyeSep,Qc.copy(e.projectionMatrix);const i=n.eyeSep/2,o=i*n.near/n.focus,s=n.near*Math.tan(Fu*n.fov*.5)/n.zoom;let a,l;WL.elements[12]=-i,GL.elements[12]=i,a=-s*n.aspect+o,l=s*n.aspect+o,Qc.elements[0]=2*n.near/(l-a),Qc.elements[8]=(l+a)/(l-a),this.cameraL.projectionMatrix.copy(Qc),a=-s*n.aspect-o,l=s*n.aspect-o,Qc.elements[0]=2*n.near/(l-a),Qc.elements[8]=(l+a)/(l-a),this.cameraR.projectionMatrix.copy(Qc)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(WL),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(GL)}}class ER{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=YL(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const n=YL();e=(n-this.oldTime)/1e3,this.oldTime=n,this.elapsedTime+=e}return e}}function YL(){return(typeof performance>"u"?Date:performance).now()}const Jc=new Z,XL=new Hn,vle=new Z,eu=new Z;class yle extends Dn{constructor(){super(),this.type="AudioListener",this.context=MR.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new ER}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);const n=this.context.listener,r=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(Jc,XL,vle),eu.set(0,0,-1).applyQuaternion(XL),n.positionX){const i=this.context.currentTime+this.timeDelta;n.positionX.linearRampToValueAtTime(Jc.x,i),n.positionY.linearRampToValueAtTime(Jc.y,i),n.positionZ.linearRampToValueAtTime(Jc.z,i),n.forwardX.linearRampToValueAtTime(eu.x,i),n.forwardY.linearRampToValueAtTime(eu.y,i),n.forwardZ.linearRampToValueAtTime(eu.z,i),n.upX.linearRampToValueAtTime(r.x,i),n.upY.linearRampToValueAtTime(r.y,i),n.upZ.linearRampToValueAtTime(r.z,i)}else n.setPosition(Jc.x,Jc.y,Jc.z),n.setOrientation(eu.x,eu.y,eu.z,r.x,r.y,r.z)}}class H8 extends Dn{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(this.isPlaying===!0){console.warn("THREE.Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+e;const n=this.context.createBufferSource();return n.buffer=this.buffer,n.loop=this.loop,n.loopStart=this.loopStart,n.loopEnd=this.loopEnd,n.onended=this.onEnded.bind(this),n.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=n,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this._progress=0,this.source!==null&&(this.source.stop(),this.source.onended=null),this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,n=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(let e=1,n=this.filters.length;e0&&this._mixBufferRegionAdditive(r,i,this._addIndex*n,1,n);for(let l=n,c=n+n;l!==c;++l)if(r[l]!==r[l+n]){a.setValue(r,i);break}}saveOriginalState(){const e=this.binding,n=this.buffer,r=this.valueSize,i=r*this._origIndex;e.getValue(n,i);for(let o=r,s=i;o!==s;++o)n[o]=n[i+o%r];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=this.valueSize*3;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,n=e+this.valueSize;for(let r=e;r=.5)for(let s=0;s!==o;++s)e[n+s]=e[r+s]}_slerp(e,n,r,i){Hn.slerpFlat(e,n,e,n,e,r,i)}_slerpAdditive(e,n,r,i,o){const s=this._workIndex*o;Hn.multiplyQuaternionsFlat(e,s,e,n,e,r),Hn.slerpFlat(e,n,e,n,e,s,i)}_lerp(e,n,r,i,o){const s=1-i;for(let a=0;a!==o;++a){const l=n+a;e[l]=e[l]*s+e[r+a]*i}}_lerpAdditive(e,n,r,i,o){for(let s=0;s!==o;++s){const a=n+s;e[a]=e[a]+e[r+s]*i}}}const PR="\\[\\]\\.:\\/",Sle=new RegExp("["+PR+"]","g"),CR="[^"+PR+"]",ble="[^"+PR.replace("\\.","")+"]",Mle=/((?:WC+[\/:])*)/.source.replace("WC",CR),Ele=/(WCOD+)?/.source.replace("WCOD",ble),Ple=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",CR),Cle=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",CR),Tle=new RegExp("^"+Mle+Ele+Ple+Cle+"$"),Ole=["material","materials","bones","map"];class Rle{constructor(e,n,r){const i=r||Sn.parseTrackName(n);this._targetGroup=e,this._bindings=e.subscribe_(n,i)}getValue(e,n){this.bind();const r=this._targetGroup.nCachedObjects_,i=this._bindings[r];i!==void 0&&i.getValue(e,n)}setValue(e,n){const r=this._bindings;for(let i=this._targetGroup.nCachedObjects_,o=r.length;i!==o;++i)r[i].setValue(e,n)}bind(){const e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,r=e.length;n!==r;++n)e[n].bind()}unbind(){const e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,r=e.length;n!==r;++n)e[n].unbind()}}class Sn{constructor(e,n,r){this.path=n,this.parsedPath=r||Sn.parseTrackName(n),this.node=Sn.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,n,r){return e&&e.isAnimationObjectGroup?new Sn.Composite(e,n,r):new Sn(e,n,r)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(Sle,"")}static parseTrackName(e){const n=Tle.exec(e);if(n===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const r={nodeName:n[2],objectName:n[3],objectIndex:n[4],propertyName:n[5],propertyIndex:n[6]},i=r.nodeName&&r.nodeName.lastIndexOf(".");if(i!==void 0&&i!==-1){const o=r.nodeName.substring(i+1);Ole.indexOf(o)!==-1&&(r.nodeName=r.nodeName.substring(0,i),r.objectName=o)}if(r.propertyName===null||r.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return r}static findNode(e,n){if(n===void 0||n===""||n==="."||n===-1||n===e.name||n===e.uuid)return e;if(e.skeleton){const r=e.skeleton.getBoneByName(n);if(r!==void 0)return r}if(e.children){const r=function(o){for(let s=0;s=o){const d=o++,f=e[d];n[f.uuid]=u,e[u]=f,n[c]=d,e[d]=l;for(let h=0,g=i;h!==g;++h){const y=r[h],_=y[d],v=y[u];y[u]=_,y[d]=v}}}this.nCachedObjects_=o}uncache(){const e=this._objects,n=this._indicesByUUID,r=this._bindings,i=r.length;let o=this.nCachedObjects_,s=e.length;for(let a=0,l=arguments.length;a!==l;++a){const c=arguments[a],u=c.uuid,d=n[u];if(d!==void 0)if(delete n[u],d0&&(n[h.uuid]=d),e[d]=h,e.pop();for(let g=0,y=i;g!==y;++g){const _=r[g];_[d]=_[f],_.pop()}}}this.nCachedObjects_=o}subscribe_(e,n){const r=this._bindingsIndicesByPath;let i=r[e];const o=this._bindings;if(i!==void 0)return o[i];const s=this._paths,a=this._parsedPaths,l=this._objects,c=l.length,u=this.nCachedObjects_,d=new Array(c);i=o.length,r[e]=i,s.push(e),a.push(n),o.push(d);for(let f=u,h=l.length;f!==h;++f){const g=l[f];d[f]=new Sn(g,e,n)}return d}unsubscribe_(e){const n=this._bindingsIndicesByPath,r=n[e];if(r!==void 0){const i=this._paths,o=this._parsedPaths,s=this._bindings,a=s.length-1,l=s[a],c=e[a];n[c]=r,s[r]=l,s.pop(),o[r]=o[a],o.pop(),i[r]=i[a],i.pop()}}}class j8{constructor(e,n,r=null,i=n.blendMode){this._mixer=e,this._clip=n,this._localRoot=r,this.blendMode=i;const o=n.tracks,s=o.length,a=new Array(s),l={endingStart:Mu,endingEnd:Mu};for(let c=0;c!==s;++c){const u=o[c].createInterpolant(null);a[c]=u,u.settings=l}this._interpolantSettings=l,this._interpolants=a,this._propertyBindings=new Array(s),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=kj,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,n){return this.loop=e,this.repetitions=n,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,n,r){if(e.fadeOut(n),this.fadeIn(n),r){const i=this._clip.duration,o=e._clip.duration,s=o/i,a=i/o;e.warp(1,s,n),this.warp(a,1,n)}return this}crossFadeTo(e,n,r){return e.crossFadeFrom(this,n,r)}stopFading(){const e=this._weightInterpolant;return e!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,n,r){const i=this._mixer,o=i.time,s=this.timeScale;let a=this._timeScaleInterpolant;a===null&&(a=i._lendControlInterpolant(),this._timeScaleInterpolant=a);const l=a.parameterPositions,c=a.sampleValues;return l[0]=o,l[1]=o+r,c[0]=e/s,c[1]=n/s,this}stopWarping(){const e=this._timeScaleInterpolant;return e!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,n,r,i){if(!this.enabled){this._updateWeight(e);return}const o=this._startTime;if(o!==null){const l=(e-o)*r;l<0||r===0?n=0:(this._startTime=null,n=r*l)}n*=this._updateTimeScale(e);const s=this._updateTime(n),a=this._updateWeight(e);if(a>0){const l=this._interpolants,c=this._propertyBindings;switch(this.blendMode){case ZO:for(let u=0,d=l.length;u!==d;++u)l[u].evaluate(s),c[u].accumulateAdditive(a);break;case vS:default:for(let u=0,d=l.length;u!==d;++u)l[u].evaluate(s),c[u].accumulate(i,a)}}}_updateWeight(e){let n=0;if(this.enabled){n=this.weight;const r=this._weightInterpolant;if(r!==null){const i=r.evaluate(e)[0];n*=i,e>r.parameterPositions[1]&&(this.stopFading(),i===0&&(this.enabled=!1))}}return this._effectiveWeight=n,n}_updateTimeScale(e){let n=0;if(!this.paused){n=this.timeScale;const r=this._timeScaleInterpolant;if(r!==null){const i=r.evaluate(e)[0];n*=i,e>r.parameterPositions[1]&&(this.stopWarping(),n===0?this.paused=!0:this.timeScale=n)}}return this._effectiveTimeScale=n,n}_updateTime(e){const n=this._clip.duration,r=this.loop;let i=this.time+e,o=this._loopCount;const s=r===Nj;if(e===0)return o===-1?i:s&&(o&1)===1?n-i:i;if(r===Lj){o===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(i>=n)i=n;else if(i<0)i=0;else{this.time=i;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(o===-1&&(e>=0?(o=0,this._setEndings(!0,this.repetitions===0,s)):this._setEndings(this.repetitions===0,!0,s)),i>=n||i<0){const a=Math.floor(i/n);i-=n*a,o+=Math.abs(a);const l=this.repetitions-o;if(l<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,i=e>0?n:0,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(l===1){const c=e<0;this._setEndings(c,!c,s)}else this._setEndings(!1,!1,s);this._loopCount=o,this.time=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}else this.time=i;if(s&&(o&1)===1)return n-i}return i}_setEndings(e,n,r){const i=this._interpolantSettings;r?(i.endingStart=Eu,i.endingEnd=Eu):(e?i.endingStart=this.zeroSlopeAtStart?Eu:Mu:i.endingStart=Km,n?i.endingEnd=this.zeroSlopeAtEnd?Eu:Mu:i.endingEnd=Km)}_scheduleFading(e,n,r){const i=this._mixer,o=i.time;let s=this._weightInterpolant;s===null&&(s=i._lendControlInterpolant(),this._weightInterpolant=s);const a=s.parameterPositions,l=s.sampleValues;return a[0]=o,l[0]=n,a[1]=o+e,l[1]=r,this}}const Dle=new Float32Array(1);class Ile extends hs{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,n){const r=e._localRoot||this._root,i=e._clip.tracks,o=i.length,s=e._propertyBindings,a=e._interpolants,l=r.uuid,c=this._bindingsByRootAndName;let u=c[l];u===void 0&&(u={},c[l]=u);for(let d=0;d!==o;++d){const f=i[d],h=f.name;let g=u[h];if(g!==void 0)++g.referenceCount,s[d]=g;else{if(g=s[d],g!==void 0){g._cacheIndex===null&&(++g.referenceCount,this._addInactiveBinding(g,l,h));continue}const y=n&&n._propertyBindings[d].binding.parsedPath;g=new V8(Sn.create(r,h,y),f.ValueTypeName,f.getValueSize()),++g.referenceCount,this._addInactiveBinding(g,l,h),s[d]=g}a[d].resultBuffer=g.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){const r=(e._localRoot||this._root).uuid,i=e._clip.uuid,o=this._actionsByClip[i];this._bindAction(e,o&&o.knownActions[0]),this._addInactiveAction(e,i,r)}const n=e._propertyBindings;for(let r=0,i=n.length;r!==i;++r){const o=n[r];o.useCount++===0&&(this._lendBinding(o),o.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const n=e._propertyBindings;for(let r=0,i=n.length;r!==i;++r){const o=n[r];--o.useCount===0&&(o.restoreOriginalState(),this._takeBackBinding(o))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const n=e._cacheIndex;return n!==null&&n=0;--r)e[r].stop();return this}update(e){e*=this.timeScale;const n=this._actions,r=this._nActiveActions,i=this.time+=e,o=Math.sign(e),s=this._accuIndex^=1;for(let c=0;c!==r;++c)n[c]._update(i,e,o,s);const a=this._bindings,l=this._nActiveBindings;for(let c=0;c!==l;++c)a[c].apply(s);return this}setTime(e){this.time=0;for(let n=0;nthis.max.x||e.ythis.max.y)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,n){return n.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y)}clampPoint(e,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,KL).distanceTo(e)}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const QL=new Z,Z0=new Z;class $8{constructor(e=new Z,n=new Z){this.start=e,this.end=n}set(e,n){return this.start.copy(e),this.end.copy(n),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,n){return this.delta(n).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,n){QL.subVectors(e,this.start),Z0.subVectors(this.end,this.start);const r=Z0.dot(Z0);let o=Z0.dot(QL)/r;return n&&(o=Mr(o,0,1)),o}closestPointToPoint(e,n,r){const i=this.closestPointToPointParameter(e,n);return this.delta(r).multiplyScalar(i).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const JL=new Z;class Ule extends Dn{constructor(e,n){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,this.type="SpotLightHelper";const r=new Jt,i=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let s=0,a=1,l=32;s1)for(let d=0;d.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{ik.set(e.z,0,-e.x).normalize();const n=Math.acos(e.y);this.quaternion.setFromAxisAngle(ik,n)}}setLength(e,n=e*.2,r=n*.2){this.line.scale.set(1,Math.max(1e-4,e-n),1),this.line.updateMatrix(),this.cone.scale.set(r,n,r),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class Qle extends Aa{constructor(e=1){const n=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],r=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],i=new Jt;i.setAttribute("position",new Et(n,3)),i.setAttribute("color",new Et(r,3));const o=new eo({vertexColors:!0,toneMapped:!1});super(i,o),this.type="AxesHelper"}setColors(e,n,r){const i=new lt,o=this.geometry.attributes.color.array;return i.set(e),i.toArray(o,0),i.toArray(o,3),i.set(n),i.toArray(o,6),i.toArray(o,9),i.set(r),i.toArray(o,12),i.toArray(o,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class Jle{constructor(){this.type="ShapePath",this.color=new lt,this.subPaths=[],this.currentPath=null}moveTo(e,n){return this.currentPath=new eg,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,n),this}lineTo(e,n){return this.currentPath.lineTo(e,n),this}quadraticCurveTo(e,n,r,i){return this.currentPath.quadraticCurveTo(e,n,r,i),this}bezierCurveTo(e,n,r,i,o,s){return this.currentPath.bezierCurveTo(e,n,r,i,o,s),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function n(v){const x=[];for(let w=0,S=v.length;wNumber.EPSILON){if(A<0&&(O=x[C],T=-T,R=x[E],A=-A),v.yR.y)continue;if(v.y===O.y){if(v.x===O.x)return!0}else{const F=A*(v.x-O.x)-T*(v.y-O.y);if(F===0)return!0;if(F<0)continue;S=!S}}else{if(v.y!==O.y)continue;if(R.x<=v.x&&v.x<=O.x||O.x<=v.x&&v.x<=R.x)return!0}}return S}const i=Pa.isClockWise,o=this.subPaths;if(o.length===0)return[];let s,a,l;const c=[];if(o.length===1)return a=o[0],l=new Bu,l.curves=a.curves,c.push(l),c;let u=!i(o[0].getPoints());u=e?!u:u;const d=[],f=[];let h=[],g=0,y;f[g]=void 0,h[g]=[];for(let v=0,x=o.length;v1){let v=!1,x=0;for(let w=0,S=f.length;w0&&v===!1&&(h=d)}let _;for(let v=0,x=f.length;v{const d=typeof c=="function"?c(e):c;if(d!==e){const f=e;e=u?d:Object.assign({},e,d),n.forEach(h=>h(e,f))}},i=()=>e,o=(c,u=i,d=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let f=u(e);function h(){const g=u(e);if(!d(f,g)){const y=f;c(f=g,y)}}return n.add(h),()=>n.delete(h)},l={setState:r,getState:i,subscribe:(c,u,d)=>u||d?o(c,u,d):(n.add(c),()=>n.delete(c)),destroy:()=>n.clear()};return e=t(r,i,l),l}const xce=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),ok=xce?M.useEffect:M.useLayoutEffect;function W8(t){const e=typeof t=="function"?_ce(t):t,n=(r=e.getState,i=Object.is)=>{const[,o]=M.useReducer(_=>_+1,0),s=e.getState(),a=M.useRef(s),l=M.useRef(r),c=M.useRef(i),u=M.useRef(!1),d=M.useRef();d.current===void 0&&(d.current=r(s));let f,h=!1;(a.current!==s||l.current!==r||c.current!==i||u.current)&&(f=r(s),h=!i(d.current,f)),ok(()=>{h&&(d.current=f),a.current=s,l.current=r,c.current=i,u.current=!1});const g=M.useRef(s);ok(()=>{const _=()=>{try{const x=e.getState(),w=l.current(x);c.current(d.current,w)||(a.current=x,d.current=w,o())}catch{u.current=!0,o()}},v=e.subscribe(_);return e.getState()!==g.current&&_(),v},[]);const y=h?f:d.current;return M.useDebugValue(y),y};return Object.assign(n,e),n[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const r=[n,e];return{next(){const i=r.length<=0;return{value:r.shift(),done:i}}}},n}var Y8={exports:{}},X8={exports:{}},Z8={};/** + */sd.ConcurrentRoot=1;sd.ContinuousEventPriority=4;sd.DefaultEventPriority=16;sd.DiscreteEventPriority=1;sd.IdleEventPriority=536870912;sd.LegacyRoot=0;W8.exports=sd;var Af=W8.exports;function xce(t){let e;const n=new Set,r=(c,u)=>{const d=typeof c=="function"?c(e):c;if(d!==e){const f=e;e=u?d:Object.assign({},e,d),n.forEach(h=>h(e,f))}},i=()=>e,o=(c,u=i,d=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let f=u(e);function h(){const g=u(e);if(!d(f,g)){const y=f;c(f=g,y)}}return n.add(h),()=>n.delete(h)},l={setState:r,getState:i,subscribe:(c,u,d)=>u||d?o(c,u,d):(n.add(c),()=>n.delete(c)),destroy:()=>n.clear()};return e=t(r,i,l),l}const wce=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),ok=wce?M.useEffect:M.useLayoutEffect;function Y8(t){const e=typeof t=="function"?xce(t):t,n=(r=e.getState,i=Object.is)=>{const[,o]=M.useReducer(_=>_+1,0),s=e.getState(),a=M.useRef(s),l=M.useRef(r),c=M.useRef(i),u=M.useRef(!1),d=M.useRef();d.current===void 0&&(d.current=r(s));let f,h=!1;(a.current!==s||l.current!==r||c.current!==i||u.current)&&(f=r(s),h=!i(d.current,f)),ok(()=>{h&&(d.current=f),a.current=s,l.current=r,c.current=i,u.current=!1});const g=M.useRef(s);ok(()=>{const _=()=>{try{const x=e.getState(),w=l.current(x);c.current(d.current,w)||(a.current=x,d.current=w,o())}catch{u.current=!0,o()}},v=e.subscribe(_);return e.getState()!==g.current&&_(),v},[]);const y=h?f:d.current;return M.useDebugValue(y),y};return Object.assign(n,e),n[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const r=[n,e];return{next(){const i=r.length<=0;return{value:r.shift(),done:i}}}},n}var X8={exports:{}},Z8={exports:{}},q8={};/** * @license React * scheduler.production.min.js * @@ -3468,7 +3468,7 @@ void main() { * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */(function(t){function e(B,j){var $=B.length;B.push(j);e:for(;0<$;){var q=$-1>>>1,K=B[q];if(0>>1;qi(le,$))aei(oe,le)?(B[q]=oe,B[ae]=$,q=ae):(B[q]=le,B[J]=$,q=J);else if(aei(oe,$))B[q]=oe,B[ae]=$,q=ae;else break e}}return j}function i(B,j){var $=B.sortIndex-j.sortIndex;return $!==0?$:B.id-j.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();t.unstable_now=function(){return s.now()-a}}var l=[],c=[],u=1,d=null,f=3,h=!1,g=!1,y=!1,_=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(B){for(var j=n(c);j!==null;){if(j.callback===null)r(c);else if(j.startTime<=B)r(c),j.sortIndex=j.expirationTime,e(l,j);else break;j=n(c)}}function S(B){if(y=!1,w(B),!g)if(n(l)!==null)g=!0,G(E);else{var j=n(c);j!==null&&W(S,j.startTime-B)}}function E(B,j){g=!1,y&&(y=!1,v(R),R=-1),h=!0;var $=f;try{for(w(j),d=n(l);d!==null&&(!(d.expirationTime>j)||B&&!F());){var q=d.callback;if(typeof q=="function"){d.callback=null,f=d.priorityLevel;var K=q(d.expirationTime<=j);j=t.unstable_now(),typeof K=="function"?d.callback=K:d===n(l)&&r(l),w(j)}else r(l);d=n(l)}if(d!==null)var re=!0;else{var J=n(c);J!==null&&W(S,J.startTime-j),re=!1}return re}finally{d=null,f=$,h=!1}}var C=!1,O=null,R=-1,T=5,A=-1;function F(){return!(t.unstable_now()-AB||125q?(B.sortIndex=$,e(c,B),n(l)===null&&B===n(c)&&(y?(v(R),R=-1):y=!0,W(S,$-q))):(B.sortIndex=K,e(l,B),g||h||(g=!0,G(E))),B},t.unstable_shouldYield=F,t.unstable_wrapCallback=function(B){var j=f;return function(){var $=f;f=j;try{return B.apply(this,arguments)}finally{f=$}}}})(Z8);X8.exports=Z8;var H2=X8.exports;/** + */(function(t){function e(B,j){var $=B.length;B.push(j);e:for(;0<$;){var q=$-1>>>1,K=B[q];if(0>>1;qi(le,$))aei(oe,le)?(B[q]=oe,B[ae]=$,q=ae):(B[q]=le,B[J]=$,q=J);else if(aei(oe,$))B[q]=oe,B[ae]=$,q=ae;else break e}}return j}function i(B,j){var $=B.sortIndex-j.sortIndex;return $!==0?$:B.id-j.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();t.unstable_now=function(){return s.now()-a}}var l=[],c=[],u=1,d=null,f=3,h=!1,g=!1,y=!1,_=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(B){for(var j=n(c);j!==null;){if(j.callback===null)r(c);else if(j.startTime<=B)r(c),j.sortIndex=j.expirationTime,e(l,j);else break;j=n(c)}}function S(B){if(y=!1,w(B),!g)if(n(l)!==null)g=!0,G(E);else{var j=n(c);j!==null&&W(S,j.startTime-B)}}function E(B,j){g=!1,y&&(y=!1,v(R),R=-1),h=!0;var $=f;try{for(w(j),d=n(l);d!==null&&(!(d.expirationTime>j)||B&&!F());){var q=d.callback;if(typeof q=="function"){d.callback=null,f=d.priorityLevel;var K=q(d.expirationTime<=j);j=t.unstable_now(),typeof K=="function"?d.callback=K:d===n(l)&&r(l),w(j)}else r(l);d=n(l)}if(d!==null)var re=!0;else{var J=n(c);J!==null&&W(S,J.startTime-j),re=!1}return re}finally{d=null,f=$,h=!1}}var C=!1,O=null,R=-1,T=5,A=-1;function F(){return!(t.unstable_now()-AB||125q?(B.sortIndex=$,e(c,B),n(l)===null&&B===n(c)&&(y?(v(R),R=-1):y=!0,W(S,$-q))):(B.sortIndex=K,e(l,B),g||h||(g=!0,G(E))),B},t.unstable_shouldYield=F,t.unstable_wrapCallback=function(B){var j=f;return function(){var $=f;f=j;try{return B.apply(this,arguments)}finally{f=$}}}})(q8);Z8.exports=q8;var V2=Z8.exports;/** * @license React * react-reconciler.production.min.js * @@ -3476,29 +3476,29 @@ void main() { * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var wce=function(e){var n={},r=M,i=H2,o=Object.assign;function s(p){for(var m="https://reactjs.org/docs/error-decoder.html?invariant="+p,b=1;bge||D[ie]!==V[ge]){var Ue=` -`+D[ie].replace(" at new "," at ");return p.displayName&&Ue.includes("")&&(Ue=Ue.replace("",p.displayName)),Ue}while(1<=ie&&0<=ge);break}}}finally{Je=!1,Error.prepareStackTrace=b}return(p=p?p.displayName||p.name:"")?jt(p):""}var Pt=Object.prototype.hasOwnProperty,Ht=[],it=-1;function St(p){return{current:p}}function At(p){0>it||(p.current=Ht[it],Ht[it]=null,it--)}function bt(p,m){it++,Ht[it]=p.current,p.current=m}var Gt={},rn=St(Gt),It=St(!1),pn=Gt;function ni(p,m){var b=p.type.contextTypes;if(!b)return Gt;var P=p.stateNode;if(P&&P.__reactInternalMemoizedUnmaskedChildContext===m)return P.__reactInternalMemoizedMaskedChildContext;var D={},V;for(V in b)D[V]=m[V];return P&&(p=p.stateNode,p.__reactInternalMemoizedUnmaskedChildContext=m,p.__reactInternalMemoizedMaskedChildContext=D),D}function hr(p){return p=p.childContextTypes,p!=null}function hi(){At(It),At(rn)}function zn(p,m,b){if(rn.current!==Gt)throw Error(s(168));bt(rn,m),bt(It,b)}function $r(p,m,b){var P=p.stateNode;if(m=m.childContextTypes,typeof P.getChildContext!="function")return b;P=P.getChildContext();for(var D in P)if(!(D in m))throw Error(s(108,R(p)||"Unknown",D));return o({},b,P)}function $n(p){return p=(p=p.stateNode)&&p.__reactInternalMemoizedMergedChildContext||Gt,pn=rn.current,bt(rn,p),bt(It,It.current),!0}function En(p,m,b){var P=p.stateNode;if(!P)throw Error(s(169));b?(p=$r(p,m,pn),P.__reactInternalMemoizedMergedChildContext=p,At(It),At(rn),bt(rn,p)):At(It),bt(It,b)}var cr=Math.clz32?Math.clz32:Xs,La=Math.log,Bi=Math.LN2;function Xs(p){return p>>>=0,p===0?32:31-(La(p)/Bi|0)|0}var ov=64,sv=4194304;function Dh(p){switch(p&-p){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 p&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return p&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return p}}function av(p,m){var b=p.pendingLanes;if(b===0)return 0;var P=0,D=p.suspendedLanes,V=p.pingedLanes,ie=b&268435455;if(ie!==0){var ge=ie&~D;ge!==0?P=Dh(ge):(V&=ie,V!==0&&(P=Dh(V)))}else ie=b&~D,ie!==0?P=Dh(ie):V!==0&&(P=Dh(V));if(P===0)return 0;if(m!==0&&m!==P&&!(m&D)&&(D=P&-P,V=m&-m,D>=V||D===16&&(V&4194240)!==0))return m;if(P&4&&(P|=b&16),m=p.entangledLanes,m!==0)for(p=p.entanglements,m&=P;0b;b++)m.push(p);return m}function Ih(p,m,b){p.pendingLanes|=m,m!==536870912&&(p.suspendedLanes=0,p.pingedLanes=0),p=p.eventTimes,m=31-cr(m),p[m]=b}function mQ(p,m){var b=p.pendingLanes&~m;p.pendingLanes=m,p.suspendedLanes=0,p.pingedLanes=0,p.expiredLanes&=m,p.mutableReadLanes&=m,p.entangledLanes&=m,m=p.entanglements;var P=p.eventTimes;for(p=p.expirationTimes;0>=ie,D-=ie,Fa=1<<32-cr(m)+D|b<Cn?(oi=tn,tn=null):oi=tn.sibling;var Tn=$t(Re,tn,ze[Cn],_t);if(Tn===null){tn===null&&(tn=oi);break}p&&tn&&Tn.alternate===null&&m(Re,tn),xe=V(Tn,xe,Cn),ln===null?zt=Tn:ln.sibling=Tn,ln=Tn,tn=oi}if(Cn===ze.length)return b(Re,tn),ur&&Hc(Re,Cn),zt;if(tn===null){for(;CnCn?(oi=tn,tn=null):oi=tn.sibling;var Al=$t(Re,tn,Tn.value,_t);if(Al===null){tn===null&&(tn=oi);break}p&&tn&&Al.alternate===null&&m(Re,tn),xe=V(Al,xe,Cn),ln===null?zt=Al:ln.sibling=Al,ln=Al,tn=oi}if(Tn.done)return b(Re,tn),ur&&Hc(Re,Cn),zt;if(tn===null){for(;!Tn.done;Cn++,Tn=ze.next())Tn=en(Re,Tn.value,_t),Tn!==null&&(xe=V(Tn,xe,Cn),ln===null?zt=Tn:ln.sibling=Tn,ln=Tn);return ur&&Hc(Re,Cn),zt}for(tn=P(Re,tn);!Tn.done;Cn++,Tn=ze.next())Tn=Xn(tn,Re,Cn,Tn.value,_t),Tn!==null&&(p&&Tn.alternate!==null&&tn.delete(Tn.key===null?Cn:Tn.key),xe=V(Tn,xe,Cn),ln===null?zt=Tn:ln.sibling=Tn,ln=Tn);return p&&tn.forEach(function(eJ){return m(Re,eJ)}),ur&&Hc(Re,Cn),zt}function Wo(Re,xe,ze,_t){if(typeof ze=="object"&&ze!==null&&ze.type===u&&ze.key===null&&(ze=ze.props.children),typeof ze=="object"&&ze!==null){switch(ze.$$typeof){case l:e:{for(var zt=ze.key,ln=xe;ln!==null;){if(ln.key===zt){if(zt=ze.type,zt===u){if(ln.tag===7){b(Re,ln.sibling),xe=D(ln,ze.props.children),xe.return=Re,Re=xe;break e}}else if(ln.elementType===zt||typeof zt=="object"&&zt!==null&&zt.$$typeof===w&&uD(zt)===ln.type){b(Re,ln.sibling),xe=D(ln,ze.props),xe.ref=Nh(Re,ln,ze),xe.return=Re,Re=xe;break e}b(Re,ln);break}else m(Re,ln);ln=ln.sibling}ze.type===u?(xe=Xc(ze.props.children,Re.mode,_t,ze.key),xe.return=Re,Re=xe):(_t=Zv(ze.type,ze.key,ze.props,null,Re.mode,_t),_t.ref=Nh(Re,xe,ze),_t.return=Re,Re=_t)}return ie(Re);case c:e:{for(ln=ze.key;xe!==null;){if(xe.key===ln)if(xe.tag===4&&xe.stateNode.containerInfo===ze.containerInfo&&xe.stateNode.implementation===ze.implementation){b(Re,xe.sibling),xe=D(xe,ze.children||[]),xe.return=Re,Re=xe;break e}else{b(Re,xe);break}else m(Re,xe);xe=xe.sibling}xe=CM(ze,Re.mode,_t),xe.return=Re,Re=xe}return ie(Re);case w:return ln=ze._init,Wo(Re,xe,ln(ze._payload),_t)}if(z(ze))return Ut(Re,xe,ze,_t);if(C(ze))return Pi(Re,xe,ze,_t);yv(Re,ze)}return typeof ze=="string"&&ze!==""||typeof ze=="number"?(ze=""+ze,xe!==null&&xe.tag===6?(b(Re,xe.sibling),xe=D(xe,ze),xe.return=Re,Re=xe):(b(Re,xe),xe=PM(ze,Re.mode,_t),xe.return=Re,Re=xe),ie(Re)):b(Re,xe)}return Wo}var yd=dD(!0),fD=dD(!1),Fh={},Vo=St(Fh),zh=St(Fh),_d=St(Fh);function Js(p){if(p===Fh)throw Error(s(174));return p}function $b(p,m){bt(_d,m),bt(zh,p),bt(Vo,Fh),p=W(m),At(Vo),bt(Vo,p)}function xd(){At(Vo),At(zh),At(_d)}function hD(p){var m=Js(_d.current),b=Js(Vo.current);m=B(b,p.type,m),b!==m&&(bt(zh,p),bt(Vo,m))}function Gb(p){zh.current===p&&(At(Vo),At(zh))}var pr=St(0);function _v(p){for(var m=p;m!==null;){if(m.tag===13){var b=m.memoizedState;if(b!==null&&(b=b.dehydrated,b===null||Fn(b)||Lr(b)))return m}else if(m.tag===19&&m.memoizedProps.revealOrder!==void 0){if(m.flags&128)return m}else if(m.child!==null){m.child.return=m,m=m.child;continue}if(m===p)break;for(;m.sibling===null;){if(m.return===null||m.return===p)return null;m=m.return}m.sibling.return=m.return,m=m.sibling}return null}var Wb=[];function Yb(){for(var p=0;pb?b:4,p(!0);var P=jo.transition;jo.transition={};try{p(!1),m()}finally{Pn=b,jo.transition=P}}function CD(){return ea().memoizedState}function CQ(p,m,b){var P=Tl(p);b={lane:P,action:b,hasEagerState:!1,eagerState:null,next:null},TD(p)?OD(m,b):(RD(p,m,b),b=Vi(),p=$o(p,P,b),p!==null&&AD(p,m,P))}function TQ(p,m,b){var P=Tl(p),D={lane:P,action:b,hasEagerState:!1,eagerState:null,next:null};if(TD(p))OD(m,D);else{RD(p,m,D);var V=p.alternate;if(p.lanes===0&&(V===null||V.lanes===0)&&(V=m.lastRenderedReducer,V!==null))try{var ie=m.lastRenderedState,ge=V(ie,b);if(D.hasEagerState=!0,D.eagerState=ge,qs(ge,ie))return}catch{}finally{}b=Vi(),p=$o(p,P,b),p!==null&&AD(p,m,P)}}function TD(p){var m=p.alternate;return p===wr||m!==null&&m===wr}function OD(p,m){Uh=wv=!0;var b=p.pending;b===null?m.next=m:(m.next=b.next,b.next=m),p.pending=m}function RD(p,m,b){kr!==null&&p.mode&1&&!(hn&2)?(p=m.interleaved,p===null?(b.next=b,Qs===null?Qs=[m]:Qs.push(m)):(b.next=p.next,p.next=b),m.interleaved=b):(p=m.pending,p===null?b.next=b:(b.next=p.next,p.next=b),m.pending=b)}function AD(p,m,b){if(b&4194240){var P=m.lanes;P&=p.pendingLanes,b|=P,m.lanes=b,Cb(p,b)}}var Pv={readContext:Uo,useCallback:Mi,useContext:Mi,useEffect:Mi,useImperativeHandle:Mi,useInsertionEffect:Mi,useLayoutEffect:Mi,useMemo:Mi,useReducer:Mi,useRef:Mi,useState:Mi,useDebugValue:Mi,useDeferredValue:Mi,useTransition:Mi,useMutableSource:Mi,useSyncExternalStore:Mi,useId:Mi,unstable_isNewReconciler:!1},OQ={readContext:Uo,useCallback:function(p,m){return Ua().memoizedState=[p,m===void 0?null:m],p},useContext:Uo,useEffect:Qb,useImperativeHandle:function(p,m,b){return b=b!=null?b.concat([p]):null,Mv(4194308,4,bD.bind(null,m,p),b)},useLayoutEffect:function(p,m){return Mv(4194308,4,p,m)},useInsertionEffect:function(p,m){return Mv(4,2,p,m)},useMemo:function(p,m){var b=Ua();return m=m===void 0?null:m,p=p(),b.memoizedState=[p,m],p},useReducer:function(p,m,b){var P=Ua();return m=b!==void 0?b(m):m,P.memoizedState=P.baseState=m,p={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:p,lastRenderedState:m},P.queue=p,p=p.dispatch=CQ.bind(null,wr,p),[P.memoizedState,p]},useRef:function(p){var m=Ua();return p={current:p},m.memoizedState=p},useState:Kb,useDebugValue:Jb,useDeferredValue:function(p){var m=Kb(p),b=m[0],P=m[1];return Qb(function(){var D=jo.transition;jo.transition={};try{P(p)}finally{jo.transition=D}},[p]),b},useTransition:function(){var p=Kb(!1),m=p[0];return p=PQ.bind(null,p[1]),Ua().memoizedState=p,[m,p]},useMutableSource:function(){},useSyncExternalStore:function(p,m,b){var P=wr,D=Ua();if(ur){if(b===void 0)throw Error(s(407));b=b()}else{if(b=m(),kr===null)throw Error(s(349));wd&30||gD(P,m,b)}D.memoizedState=b;var V={value:b,getSnapshot:m};return D.queue=V,Qb(yD.bind(null,P,V,p),[p]),P.flags|=2048,Hh(9,vD.bind(null,P,V,b,m),void 0,null),b},useId:function(){var p=Ua(),m=kr.identifierPrefix;if(ur){var b=za,P=Fa;b=(P&~(1<<32-cr(P)-1)).toString(32)+b,m=":"+m+"R"+b,b=Bh++,0")&&(Ue=Ue.replace("",p.displayName)),Ue}while(1<=ie&&0<=ge);break}}}finally{Je=!1,Error.prepareStackTrace=b}return(p=p?p.displayName||p.name:"")?jt(p):""}var Pt=Object.prototype.hasOwnProperty,Ht=[],it=-1;function St(p){return{current:p}}function At(p){0>it||(p.current=Ht[it],Ht[it]=null,it--)}function bt(p,m){it++,Ht[it]=p.current,p.current=m}var Gt={},rn=St(Gt),It=St(!1),pn=Gt;function ni(p,m){var b=p.type.contextTypes;if(!b)return Gt;var P=p.stateNode;if(P&&P.__reactInternalMemoizedUnmaskedChildContext===m)return P.__reactInternalMemoizedMaskedChildContext;var D={},V;for(V in b)D[V]=m[V];return P&&(p=p.stateNode,p.__reactInternalMemoizedUnmaskedChildContext=m,p.__reactInternalMemoizedMaskedChildContext=D),D}function hr(p){return p=p.childContextTypes,p!=null}function hi(){At(It),At(rn)}function zn(p,m,b){if(rn.current!==Gt)throw Error(s(168));bt(rn,m),bt(It,b)}function $r(p,m,b){var P=p.stateNode;if(m=m.childContextTypes,typeof P.getChildContext!="function")return b;P=P.getChildContext();for(var D in P)if(!(D in m))throw Error(s(108,R(p)||"Unknown",D));return o({},b,P)}function $n(p){return p=(p=p.stateNode)&&p.__reactInternalMemoizedMergedChildContext||Gt,pn=rn.current,bt(rn,p),bt(It,It.current),!0}function En(p,m,b){var P=p.stateNode;if(!P)throw Error(s(169));b?(p=$r(p,m,pn),P.__reactInternalMemoizedMergedChildContext=p,At(It),At(rn),bt(rn,p)):At(It),bt(It,b)}var cr=Math.clz32?Math.clz32:Xs,La=Math.log,Bi=Math.LN2;function Xs(p){return p>>>=0,p===0?32:31-(La(p)/Bi|0)|0}var ov=64,sv=4194304;function Dh(p){switch(p&-p){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 p&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return p&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return p}}function av(p,m){var b=p.pendingLanes;if(b===0)return 0;var P=0,D=p.suspendedLanes,V=p.pingedLanes,ie=b&268435455;if(ie!==0){var ge=ie&~D;ge!==0?P=Dh(ge):(V&=ie,V!==0&&(P=Dh(V)))}else ie=b&~D,ie!==0?P=Dh(ie):V!==0&&(P=Dh(V));if(P===0)return 0;if(m!==0&&m!==P&&!(m&D)&&(D=P&-P,V=m&-m,D>=V||D===16&&(V&4194240)!==0))return m;if(P&4&&(P|=b&16),m=p.entangledLanes,m!==0)for(p=p.entanglements,m&=P;0b;b++)m.push(p);return m}function Ih(p,m,b){p.pendingLanes|=m,m!==536870912&&(p.suspendedLanes=0,p.pingedLanes=0),p=p.eventTimes,m=31-cr(m),p[m]=b}function gQ(p,m){var b=p.pendingLanes&~m;p.pendingLanes=m,p.suspendedLanes=0,p.pingedLanes=0,p.expiredLanes&=m,p.mutableReadLanes&=m,p.entangledLanes&=m,m=p.entanglements;var P=p.eventTimes;for(p=p.expirationTimes;0>=ie,D-=ie,Fa=1<<32-cr(m)+D|b<Cn?(oi=tn,tn=null):oi=tn.sibling;var Tn=$t(Re,tn,ze[Cn],_t);if(Tn===null){tn===null&&(tn=oi);break}p&&tn&&Tn.alternate===null&&m(Re,tn),xe=V(Tn,xe,Cn),ln===null?zt=Tn:ln.sibling=Tn,ln=Tn,tn=oi}if(Cn===ze.length)return b(Re,tn),ur&&Hc(Re,Cn),zt;if(tn===null){for(;CnCn?(oi=tn,tn=null):oi=tn.sibling;var Al=$t(Re,tn,Tn.value,_t);if(Al===null){tn===null&&(tn=oi);break}p&&tn&&Al.alternate===null&&m(Re,tn),xe=V(Al,xe,Cn),ln===null?zt=Al:ln.sibling=Al,ln=Al,tn=oi}if(Tn.done)return b(Re,tn),ur&&Hc(Re,Cn),zt;if(tn===null){for(;!Tn.done;Cn++,Tn=ze.next())Tn=en(Re,Tn.value,_t),Tn!==null&&(xe=V(Tn,xe,Cn),ln===null?zt=Tn:ln.sibling=Tn,ln=Tn);return ur&&Hc(Re,Cn),zt}for(tn=P(Re,tn);!Tn.done;Cn++,Tn=ze.next())Tn=Xn(tn,Re,Cn,Tn.value,_t),Tn!==null&&(p&&Tn.alternate!==null&&tn.delete(Tn.key===null?Cn:Tn.key),xe=V(Tn,xe,Cn),ln===null?zt=Tn:ln.sibling=Tn,ln=Tn);return p&&tn.forEach(function(tJ){return m(Re,tJ)}),ur&&Hc(Re,Cn),zt}function Wo(Re,xe,ze,_t){if(typeof ze=="object"&&ze!==null&&ze.type===u&&ze.key===null&&(ze=ze.props.children),typeof ze=="object"&&ze!==null){switch(ze.$$typeof){case l:e:{for(var zt=ze.key,ln=xe;ln!==null;){if(ln.key===zt){if(zt=ze.type,zt===u){if(ln.tag===7){b(Re,ln.sibling),xe=D(ln,ze.props.children),xe.return=Re,Re=xe;break e}}else if(ln.elementType===zt||typeof zt=="object"&&zt!==null&&zt.$$typeof===w&&uD(zt)===ln.type){b(Re,ln.sibling),xe=D(ln,ze.props),xe.ref=Nh(Re,ln,ze),xe.return=Re,Re=xe;break e}b(Re,ln);break}else m(Re,ln);ln=ln.sibling}ze.type===u?(xe=Xc(ze.props.children,Re.mode,_t,ze.key),xe.return=Re,Re=xe):(_t=Zv(ze.type,ze.key,ze.props,null,Re.mode,_t),_t.ref=Nh(Re,xe,ze),_t.return=Re,Re=_t)}return ie(Re);case c:e:{for(ln=ze.key;xe!==null;){if(xe.key===ln)if(xe.tag===4&&xe.stateNode.containerInfo===ze.containerInfo&&xe.stateNode.implementation===ze.implementation){b(Re,xe.sibling),xe=D(xe,ze.children||[]),xe.return=Re,Re=xe;break e}else{b(Re,xe);break}else m(Re,xe);xe=xe.sibling}xe=CM(ze,Re.mode,_t),xe.return=Re,Re=xe}return ie(Re);case w:return ln=ze._init,Wo(Re,xe,ln(ze._payload),_t)}if(z(ze))return Ut(Re,xe,ze,_t);if(C(ze))return Pi(Re,xe,ze,_t);yv(Re,ze)}return typeof ze=="string"&&ze!==""||typeof ze=="number"?(ze=""+ze,xe!==null&&xe.tag===6?(b(Re,xe.sibling),xe=D(xe,ze),xe.return=Re,Re=xe):(b(Re,xe),xe=PM(ze,Re.mode,_t),xe.return=Re,Re=xe),ie(Re)):b(Re,xe)}return Wo}var yd=dD(!0),fD=dD(!1),Fh={},Vo=St(Fh),zh=St(Fh),_d=St(Fh);function Js(p){if(p===Fh)throw Error(s(174));return p}function $b(p,m){bt(_d,m),bt(zh,p),bt(Vo,Fh),p=W(m),At(Vo),bt(Vo,p)}function xd(){At(Vo),At(zh),At(_d)}function hD(p){var m=Js(_d.current),b=Js(Vo.current);m=B(b,p.type,m),b!==m&&(bt(zh,p),bt(Vo,m))}function Gb(p){zh.current===p&&(At(Vo),At(zh))}var pr=St(0);function _v(p){for(var m=p;m!==null;){if(m.tag===13){var b=m.memoizedState;if(b!==null&&(b=b.dehydrated,b===null||Fn(b)||Lr(b)))return m}else if(m.tag===19&&m.memoizedProps.revealOrder!==void 0){if(m.flags&128)return m}else if(m.child!==null){m.child.return=m,m=m.child;continue}if(m===p)break;for(;m.sibling===null;){if(m.return===null||m.return===p)return null;m=m.return}m.sibling.return=m.return,m=m.sibling}return null}var Wb=[];function Yb(){for(var p=0;pb?b:4,p(!0);var P=jo.transition;jo.transition={};try{p(!1),m()}finally{Pn=b,jo.transition=P}}function CD(){return ea().memoizedState}function TQ(p,m,b){var P=Tl(p);b={lane:P,action:b,hasEagerState:!1,eagerState:null,next:null},TD(p)?OD(m,b):(RD(p,m,b),b=Vi(),p=$o(p,P,b),p!==null&&AD(p,m,P))}function OQ(p,m,b){var P=Tl(p),D={lane:P,action:b,hasEagerState:!1,eagerState:null,next:null};if(TD(p))OD(m,D);else{RD(p,m,D);var V=p.alternate;if(p.lanes===0&&(V===null||V.lanes===0)&&(V=m.lastRenderedReducer,V!==null))try{var ie=m.lastRenderedState,ge=V(ie,b);if(D.hasEagerState=!0,D.eagerState=ge,qs(ge,ie))return}catch{}finally{}b=Vi(),p=$o(p,P,b),p!==null&&AD(p,m,P)}}function TD(p){var m=p.alternate;return p===wr||m!==null&&m===wr}function OD(p,m){Uh=wv=!0;var b=p.pending;b===null?m.next=m:(m.next=b.next,b.next=m),p.pending=m}function RD(p,m,b){kr!==null&&p.mode&1&&!(hn&2)?(p=m.interleaved,p===null?(b.next=b,Qs===null?Qs=[m]:Qs.push(m)):(b.next=p.next,p.next=b),m.interleaved=b):(p=m.pending,p===null?b.next=b:(b.next=p.next,p.next=b),m.pending=b)}function AD(p,m,b){if(b&4194240){var P=m.lanes;P&=p.pendingLanes,b|=P,m.lanes=b,Cb(p,b)}}var Pv={readContext:Uo,useCallback:Mi,useContext:Mi,useEffect:Mi,useImperativeHandle:Mi,useInsertionEffect:Mi,useLayoutEffect:Mi,useMemo:Mi,useReducer:Mi,useRef:Mi,useState:Mi,useDebugValue:Mi,useDeferredValue:Mi,useTransition:Mi,useMutableSource:Mi,useSyncExternalStore:Mi,useId:Mi,unstable_isNewReconciler:!1},RQ={readContext:Uo,useCallback:function(p,m){return Ua().memoizedState=[p,m===void 0?null:m],p},useContext:Uo,useEffect:Qb,useImperativeHandle:function(p,m,b){return b=b!=null?b.concat([p]):null,Mv(4194308,4,bD.bind(null,m,p),b)},useLayoutEffect:function(p,m){return Mv(4194308,4,p,m)},useInsertionEffect:function(p,m){return Mv(4,2,p,m)},useMemo:function(p,m){var b=Ua();return m=m===void 0?null:m,p=p(),b.memoizedState=[p,m],p},useReducer:function(p,m,b){var P=Ua();return m=b!==void 0?b(m):m,P.memoizedState=P.baseState=m,p={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:p,lastRenderedState:m},P.queue=p,p=p.dispatch=TQ.bind(null,wr,p),[P.memoizedState,p]},useRef:function(p){var m=Ua();return p={current:p},m.memoizedState=p},useState:Kb,useDebugValue:Jb,useDeferredValue:function(p){var m=Kb(p),b=m[0],P=m[1];return Qb(function(){var D=jo.transition;jo.transition={};try{P(p)}finally{jo.transition=D}},[p]),b},useTransition:function(){var p=Kb(!1),m=p[0];return p=CQ.bind(null,p[1]),Ua().memoizedState=p,[m,p]},useMutableSource:function(){},useSyncExternalStore:function(p,m,b){var P=wr,D=Ua();if(ur){if(b===void 0)throw Error(s(407));b=b()}else{if(b=m(),kr===null)throw Error(s(349));wd&30||gD(P,m,b)}D.memoizedState=b;var V={value:b,getSnapshot:m};return D.queue=V,Qb(yD.bind(null,P,V,p),[p]),P.flags|=2048,Hh(9,vD.bind(null,P,V,b,m),void 0,null),b},useId:function(){var p=Ua(),m=kr.identifierPrefix;if(ur){var b=za,P=Fa;b=(P&~(1<<32-cr(P)-1)).toString(32)+b,m=":"+m+"R"+b,b=Bh++,0yM&&(m.flags|=128,P=!0,Gh(D,!1),m.lanes=4194304)}else{if(!P)if(p=_v(V),p!==null){if(m.flags|=128,P=!0,p=p.updateQueue,p!==null&&(m.updateQueue=p,m.flags|=4),Gh(D,!0),D.tail===null&&D.tailMode==="hidden"&&!V.alternate&&!ur)return Ei(m),null}else 2*ri()-D.renderingStartTime>yM&&b!==1073741824&&(m.flags|=128,P=!0,Gh(D,!1),m.lanes=4194304);D.isBackwards?(V.sibling=m.child,m.child=V):(p=D.last,p!==null?p.sibling=V:m.child=V,D.last=V)}return D.tail!==null?(m=D.tail,D.rendering=m,D.tail=m.sibling,D.renderingStartTime=ri(),m.sibling=null,p=pr.current,bt(pr,P?p&1|2:p&1),m):(Ei(m),null);case 22:case 23:return bM(),P=m.memoizedState!==null,p!==null&&p.memoizedState!==null!==P&&(m.flags|=8192),P&&m.mode&1?_o&1073741824&&(Ei(m),we&&m.subtreeFlags&6&&(m.flags|=8192)):Ei(m),null;case 24:return null;case 25:return null}throw Error(s(156,m.tag))}var LQ=a.ReactCurrentOwner,yo=!1;function Hi(p,m,b,P){m.child=p===null?fD(m,null,b,P):yd(m,p.child,b,P)}function UD(p,m,b,P,D){b=b.render;var V=m.ref;return pd(m,D),P=Zb(p,m,b,P,V,D),b=qb(),p!==null&&!yo?(m.updateQueue=p.updateQueue,m.flags&=-2053,p.lanes&=~D,Ba(p,m,D)):(ur&&b&&Ub(m),m.flags|=1,Hi(p,m,P,D),m.child)}function BD(p,m,b,P,D){if(p===null){var V=b.type;return typeof V=="function"&&!EM(V)&&V.defaultProps===void 0&&b.compare===null&&b.defaultProps===void 0?(m.tag=15,m.type=V,HD(p,m,V,P,D)):(p=Zv(b.type,null,P,m,m.mode,D),p.ref=m.ref,p.return=m,m.child=p)}if(V=p.child,!(p.lanes&D)){var ie=V.memoizedProps;if(b=b.compare,b=b!==null?b:uv,b(ie,P)&&p.ref===m.ref)return Ba(p,m,D)}return m.flags|=1,p=Rl(V,P),p.ref=m.ref,p.return=m,m.child=p}function HD(p,m,b,P,D){if(p!==null&&uv(p.memoizedProps,P)&&p.ref===m.ref)if(yo=!1,(p.lanes&D)!==0)p.flags&131072&&(yo=!0);else return m.lanes=p.lanes,Ba(p,m,D);return nM(p,m,b,P,D)}function VD(p,m,b){var P=m.pendingProps,D=P.children,V=p!==null?p.memoizedState:null;if(P.mode==="hidden")if(!(m.mode&1))m.memoizedState={baseLanes:0,cachePool:null},bt(Sd,_o),_o|=b;else if(b&1073741824)m.memoizedState={baseLanes:0,cachePool:null},P=V!==null?V.baseLanes:b,bt(Sd,_o),_o|=P;else return p=V!==null?V.baseLanes|b:b,m.lanes=m.childLanes=1073741824,m.memoizedState={baseLanes:p,cachePool:null},m.updateQueue=null,bt(Sd,_o),_o|=p,null;else V!==null?(P=V.baseLanes|b,m.memoizedState=null):P=b,bt(Sd,_o),_o|=P;return Hi(p,m,D,b),m.child}function jD(p,m){var b=m.ref;(p===null&&b!==null||p!==null&&p.ref!==b)&&(m.flags|=512,m.flags|=2097152)}function nM(p,m,b,P,D){var V=hr(b)?pn:rn.current;return V=ni(m,V),pd(m,D),b=Zb(p,m,b,P,V,D),P=qb(),p!==null&&!yo?(m.updateQueue=p.updateQueue,m.flags&=-2053,p.lanes&=~D,Ba(p,m,D)):(ur&&P&&Ub(m),m.flags|=1,Hi(p,m,b,D),m.child)}function $D(p,m,b,P,D){if(hr(b)){var V=!0;$n(m)}else V=!1;if(pd(m,D),m.stateNode===null)p!==null&&(p.alternate=null,m.alternate=null,m.flags|=2),iD(m,b,P),zb(m,b,P,D),P=!0;else if(p===null){var ie=m.stateNode,ge=m.memoizedProps;ie.props=ge;var Ue=ie.context,at=b.contextType;typeof at=="object"&&at!==null?at=Uo(at):(at=hr(b)?pn:rn.current,at=ni(m,at));var Ct=b.getDerivedStateFromProps,en=typeof Ct=="function"||typeof ie.getSnapshotBeforeUpdate=="function";en||typeof ie.UNSAFE_componentWillReceiveProps!="function"&&typeof ie.componentWillReceiveProps!="function"||(ge!==P||Ue!==at)&&oD(m,ie,P,at),Ml=!1;var $t=m.memoizedState;ie.state=$t,pv(m,P,ie,D),Ue=m.memoizedState,ge!==P||$t!==Ue||It.current||Ml?(typeof Ct=="function"&&(Fb(m,b,Ct,P),Ue=m.memoizedState),(ge=Ml||rD(m,b,ge,P,$t,Ue,at))?(en||typeof ie.UNSAFE_componentWillMount!="function"&&typeof ie.componentWillMount!="function"||(typeof ie.componentWillMount=="function"&&ie.componentWillMount(),typeof ie.UNSAFE_componentWillMount=="function"&&ie.UNSAFE_componentWillMount()),typeof ie.componentDidMount=="function"&&(m.flags|=4194308)):(typeof ie.componentDidMount=="function"&&(m.flags|=4194308),m.memoizedProps=P,m.memoizedState=Ue),ie.props=P,ie.state=Ue,ie.context=at,P=ge):(typeof ie.componentDidMount=="function"&&(m.flags|=4194308),P=!1)}else{ie=m.stateNode,JA(p,m),ge=m.memoizedProps,at=m.type===m.elementType?ge:ms(m.type,ge),ie.props=at,en=m.pendingProps,$t=ie.context,Ue=b.contextType,typeof Ue=="object"&&Ue!==null?Ue=Uo(Ue):(Ue=hr(b)?pn:rn.current,Ue=ni(m,Ue));var Xn=b.getDerivedStateFromProps;(Ct=typeof Xn=="function"||typeof ie.getSnapshotBeforeUpdate=="function")||typeof ie.UNSAFE_componentWillReceiveProps!="function"&&typeof ie.componentWillReceiveProps!="function"||(ge!==en||$t!==Ue)&&oD(m,ie,P,Ue),Ml=!1,$t=m.memoizedState,ie.state=$t,pv(m,P,ie,D);var Ut=m.memoizedState;ge!==en||$t!==Ut||It.current||Ml?(typeof Xn=="function"&&(Fb(m,b,Xn,P),Ut=m.memoizedState),(at=Ml||rD(m,b,at,P,$t,Ut,Ue)||!1)?(Ct||typeof ie.UNSAFE_componentWillUpdate!="function"&&typeof ie.componentWillUpdate!="function"||(typeof ie.componentWillUpdate=="function"&&ie.componentWillUpdate(P,Ut,Ue),typeof ie.UNSAFE_componentWillUpdate=="function"&&ie.UNSAFE_componentWillUpdate(P,Ut,Ue)),typeof ie.componentDidUpdate=="function"&&(m.flags|=4),typeof ie.getSnapshotBeforeUpdate=="function"&&(m.flags|=1024)):(typeof ie.componentDidUpdate!="function"||ge===p.memoizedProps&&$t===p.memoizedState||(m.flags|=4),typeof ie.getSnapshotBeforeUpdate!="function"||ge===p.memoizedProps&&$t===p.memoizedState||(m.flags|=1024),m.memoizedProps=P,m.memoizedState=Ut),ie.props=P,ie.state=Ut,ie.context=Ue,P=at):(typeof ie.componentDidUpdate!="function"||ge===p.memoizedProps&&$t===p.memoizedState||(m.flags|=4),typeof ie.getSnapshotBeforeUpdate!="function"||ge===p.memoizedProps&&$t===p.memoizedState||(m.flags|=1024),P=!1)}return rM(p,m,b,P,V,D)}function rM(p,m,b,P,D,V){jD(p,m);var ie=(m.flags&128)!==0;if(!P&&!ie)return D&&En(m,b,!1),Ba(p,m,V);P=m.stateNode,LQ.current=m;var ge=ie&&typeof b.getDerivedStateFromError!="function"?null:P.render();return m.flags|=1,p!==null&&ie?(m.child=yd(m,p.child,null,V),m.child=yd(m,null,ge,V)):Hi(p,m,ge,V),m.memoizedState=P.state,D&&En(m,b,!0),m.child}function GD(p){var m=p.stateNode;m.pendingContext?zn(p,m.pendingContext,m.pendingContext!==m.context):m.context&&zn(p,m.context,!1),$b(p,m.containerInfo)}function WD(p,m,b,P,D){return vd(),jb(D),m.flags|=256,Hi(p,m,b,P),m.child}var Ov={dehydrated:null,treeContext:null,retryLane:0};function Rv(p){return{baseLanes:p,cachePool:null}}function YD(p,m,b){var P=m.pendingProps,D=pr.current,V=!1,ie=(m.flags&128)!==0,ge;if((ge=ie)||(ge=p!==null&&p.memoizedState===null?!1:(D&2)!==0),ge?(V=!0,m.flags&=-129):(p===null||p.memoizedState!==null)&&(D|=1),bt(pr,D&1),p===null)return Vb(m),p=m.memoizedState,p!==null&&(p=p.dehydrated,p!==null)?(m.mode&1?Lr(p)?m.lanes=8:m.lanes=1073741824:m.lanes=1,null):(D=P.children,p=P.fallback,V?(P=m.mode,V=m.child,D={mode:"hidden",children:D},!(P&1)&&V!==null?(V.childLanes=0,V.pendingProps=D):V=qv(D,P,0,null),p=Xc(p,P,b,null),V.return=m,p.return=m,V.sibling=p,m.child=V,m.child.memoizedState=Rv(b),m.memoizedState=Ov,p):iM(m,D));if(D=p.memoizedState,D!==null){if(ge=D.dehydrated,ge!==null){if(ie)return m.flags&256?(m.flags&=-257,Av(p,m,b,Error(s(422)))):m.memoizedState!==null?(m.child=p.child,m.flags|=128,null):(V=P.fallback,D=m.mode,P=qv({mode:"visible",children:P.children},D,0,null),V=Xc(V,D,b,null),V.flags|=2,P.return=m,V.return=m,P.sibling=V,m.child=P,m.mode&1&&yd(m,p.child,null,b),m.child.memoizedState=Rv(b),m.memoizedState=Ov,V);if(!(m.mode&1))m=Av(p,m,b,null);else if(Lr(ge))m=Av(p,m,b,Error(s(419)));else if(P=(b&p.childLanes)!==0,yo||P){if(P=kr,P!==null){switch(b&-b){case 4:V=2;break;case 16:V=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:V=32;break;case 536870912:V=268435456;break;default:V=0}P=V&(P.suspendedLanes|b)?0:V,P!==0&&P!==D.retryLane&&(D.retryLane=P,$o(p,P,-1))}MM(),m=Av(p,m,b,Error(s(421)))}else Fn(ge)?(m.flags|=128,m.child=p.child,m=YQ.bind(null,p),ti(ge,m),m=null):(b=D.treeContext,se&&(vo=ce(ge),go=m,ur=!0,gs=null,Lh=!1,b!==null&&(Bo[Ho++]=Fa,Bo[Ho++]=za,Bo[Ho++]=Bc,Fa=b.id,za=b.overflow,Bc=m)),m=iM(m,m.pendingProps.children),m.flags|=4096);return m}return V?(P=ZD(p,m,P.children,P.fallback,b),V=m.child,D=p.child.memoizedState,V.memoizedState=D===null?Rv(b):{baseLanes:D.baseLanes|b,cachePool:null},V.childLanes=p.childLanes&~b,m.memoizedState=Ov,P):(b=XD(p,m,P.children,b),m.memoizedState=null,b)}return V?(P=ZD(p,m,P.children,P.fallback,b),V=m.child,D=p.child.memoizedState,V.memoizedState=D===null?Rv(b):{baseLanes:D.baseLanes|b,cachePool:null},V.childLanes=p.childLanes&~b,m.memoizedState=Ov,P):(b=XD(p,m,P.children,b),m.memoizedState=null,b)}function iM(p,m){return m=qv({mode:"visible",children:m},p.mode,0,null),m.return=p,p.child=m}function XD(p,m,b,P){var D=p.child;return p=D.sibling,b=Rl(D,{mode:"visible",children:b}),!(m.mode&1)&&(b.lanes=P),b.return=m,b.sibling=null,p!==null&&(P=m.deletions,P===null?(m.deletions=[p],m.flags|=16):P.push(p)),m.child=b}function ZD(p,m,b,P,D){var V=m.mode;p=p.child;var ie=p.sibling,ge={mode:"hidden",children:b};return!(V&1)&&m.child!==p?(b=m.child,b.childLanes=0,b.pendingProps=ge,m.deletions=null):(b=Rl(p,ge),b.subtreeFlags=p.subtreeFlags&14680064),ie!==null?P=Rl(ie,P):(P=Xc(P,V,D,null),P.flags|=2),P.return=m,b.return=m,b.sibling=P,m.child=b,P}function Av(p,m,b,P){return P!==null&&jb(P),yd(m,p.child,null,b),p=iM(m,m.pendingProps.children),p.flags|=2,m.memoizedState=null,p}function qD(p,m,b){p.lanes|=m;var P=p.alternate;P!==null&&(P.lanes|=m),kb(p.return,m,b)}function oM(p,m,b,P,D){var V=p.memoizedState;V===null?p.memoizedState={isBackwards:m,rendering:null,renderingStartTime:0,last:P,tail:b,tailMode:D}:(V.isBackwards=m,V.rendering=null,V.renderingStartTime=0,V.last=P,V.tail=b,V.tailMode=D)}function KD(p,m,b){var P=m.pendingProps,D=P.revealOrder,V=P.tail;if(Hi(p,m,P.children,b),P=pr.current,P&2)P=P&1|2,m.flags|=128;else{if(p!==null&&p.flags&128)e:for(p=m.child;p!==null;){if(p.tag===13)p.memoizedState!==null&&qD(p,b,m);else if(p.tag===19)qD(p,b,m);else if(p.child!==null){p.child.return=p,p=p.child;continue}if(p===m)break e;for(;p.sibling===null;){if(p.return===null||p.return===m)break e;p=p.return}p.sibling.return=p.return,p=p.sibling}P&=1}if(bt(pr,P),!(m.mode&1))m.memoizedState=null;else switch(D){case"forwards":for(b=m.child,D=null;b!==null;)p=b.alternate,p!==null&&_v(p)===null&&(D=b),b=b.sibling;b=D,b===null?(D=m.child,m.child=null):(D=b.sibling,b.sibling=null),oM(m,!1,D,b,V);break;case"backwards":for(b=null,D=m.child,m.child=null;D!==null;){if(p=D.alternate,p!==null&&_v(p)===null){m.child=D;break}p=D.sibling,D.sibling=b,b=D,D=p}oM(m,!0,b,null,V);break;case"together":oM(m,!1,null,null,void 0);break;default:m.memoizedState=null}return m.child}function Ba(p,m,b){if(p!==null&&(m.dependencies=p.dependencies),bd|=m.lanes,!(b&m.childLanes))return null;if(p!==null&&m.child!==p.child)throw Error(s(153));if(m.child!==null){for(p=m.child,b=Rl(p,p.pendingProps),m.child=b,b.return=m;p.sibling!==null;)p=p.sibling,b=b.sibling=Rl(p,p.pendingProps),b.return=m;b.sibling=null}return m.child}function kQ(p,m,b){switch(m.tag){case 3:GD(m),vd();break;case 5:hD(m);break;case 1:hr(m.type)&&$n(m);break;case 4:$b(m,m.stateNode.containerInfo);break;case 10:QA(m,m.type._context,m.memoizedProps.value);break;case 13:var P=m.memoizedState;if(P!==null)return P.dehydrated!==null?(bt(pr,pr.current&1),m.flags|=128,null):b&m.child.childLanes?YD(p,m,b):(bt(pr,pr.current&1),p=Ba(p,m,b),p!==null?p.sibling:null);bt(pr,pr.current&1);break;case 19:if(P=(b&m.childLanes)!==0,p.flags&128){if(P)return KD(p,m,b);m.flags|=128}var D=m.memoizedState;if(D!==null&&(D.rendering=null,D.tail=null,D.lastEffect=null),bt(pr,pr.current),P)break;return null;case 22:case 23:return m.lanes=0,VD(p,m,b)}return Ba(p,m,b)}function NQ(p,m){switch(Bb(m),m.tag){case 1:return hr(m.type)&&hi(),p=m.flags,p&65536?(m.flags=p&-65537|128,m):null;case 3:return xd(),At(It),At(rn),Yb(),p=m.flags,p&65536&&!(p&128)?(m.flags=p&-65537|128,m):null;case 5:return Gb(m),null;case 13:if(At(pr),p=m.memoizedState,p!==null&&p.dehydrated!==null){if(m.alternate===null)throw Error(s(340));vd()}return p=m.flags,p&65536?(m.flags=p&-65537|128,m):null;case 19:return At(pr),null;case 4:return xd(),null;case 10:return Lb(m.type._context),null;case 22:case 23:return bM(),null;case 24:return null;default:return null}}var Dv=!1,jc=!1,FQ=typeof WeakSet=="function"?WeakSet:Set,yt=null;function Iv(p,m){var b=p.ref;if(b!==null)if(typeof b=="function")try{b(null)}catch(P){ro(p,m,P)}else b.current=null}function sM(p,m,b){try{b()}catch(P){ro(p,m,P)}}var QD=!1;function zQ(p,m){for(j(p.containerInfo),yt=m;yt!==null;)if(p=yt,m=p.child,(p.subtreeFlags&1028)!==0&&m!==null)m.return=p,yt=m;else for(;yt!==null;){p=yt;try{var b=p.alternate;if(p.flags&1024)switch(p.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var P=b.memoizedProps,D=b.memoizedState,V=p.stateNode,ie=V.getSnapshotBeforeUpdate(p.elementType===p.type?P:ms(p.type,P),D);V.__reactInternalSnapshotBeforeUpdate=ie}break;case 3:we&&st(p.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(ge){ro(p,p.return,ge)}if(m=p.sibling,m!==null){m.return=p.return,yt=m;break}yt=p.return}return b=QD,QD=!1,b}function $c(p,m,b){var P=m.updateQueue;if(P=P!==null?P.lastEffect:null,P!==null){var D=P=P.next;do{if((D.tag&p)===p){var V=D.destroy;D.destroy=void 0,V!==void 0&&sM(m,b,V)}D=D.next}while(D!==P)}}function Wh(p,m){if(m=m.updateQueue,m=m!==null?m.lastEffect:null,m!==null){var b=m=m.next;do{if((b.tag&p)===p){var P=b.create;b.destroy=P()}b=b.next}while(b!==m)}}function aM(p){var m=p.ref;if(m!==null){var b=p.stateNode;switch(p.tag){case 5:p=G(b);break;default:p=b}typeof m=="function"?m(p):m.current=p}}function JD(p,m,b){if(Zs&&typeof Zs.onCommitFiberUnmount=="function")try{Zs.onCommitFiberUnmount(lv,m)}catch{}switch(m.tag){case 0:case 11:case 14:case 15:if(p=m.updateQueue,p!==null&&(p=p.lastEffect,p!==null)){var P=p=p.next;do{var D=P,V=D.destroy;D=D.tag,V!==void 0&&(D&2||D&4)&&sM(m,b,V),P=P.next}while(P!==p)}break;case 1:if(Iv(m,b),p=m.stateNode,typeof p.componentWillUnmount=="function")try{p.props=m.memoizedProps,p.state=m.memoizedState,p.componentWillUnmount()}catch(ie){ro(m,b,ie)}break;case 5:Iv(m,b);break;case 4:we?oI(p,m,b):me&&me&&(m=m.stateNode.containerInfo,b=Bt(m),Nt(m,b))}}function eI(p,m,b){for(var P=m;;)if(JD(p,P,b),P.child===null||we&&P.tag===4){if(P===m)break;for(;P.sibling===null;){if(P.return===null||P.return===m)return;P=P.return}P.sibling.return=P.return,P=P.sibling}else P.child.return=P,P=P.child}function tI(p){var m=p.alternate;m!==null&&(p.alternate=null,tI(m)),p.child=null,p.deletions=null,p.sibling=null,p.tag===5&&(m=p.stateNode,m!==null&&Ze(m)),p.stateNode=null,p.return=null,p.dependencies=null,p.memoizedProps=null,p.memoizedState=null,p.pendingProps=null,p.stateNode=null,p.updateQueue=null}function nI(p){return p.tag===5||p.tag===3||p.tag===4}function rI(p){e:for(;;){for(;p.sibling===null;){if(p.return===null||nI(p.return))return null;p=p.return}for(p.sibling.return=p.return,p=p.sibling;p.tag!==5&&p.tag!==6&&p.tag!==18;){if(p.flags&2||p.child===null||p.tag===4)continue e;p.child.return=p,p=p.child}if(!(p.flags&2))return p.stateNode}}function iI(p){if(we){e:{for(var m=p.return;m!==null;){if(nI(m))break e;m=m.return}throw Error(s(160))}var b=m;switch(b.tag){case 5:m=b.stateNode,b.flags&32&&(Lt(m),b.flags&=-33),b=rI(p),cM(p,b,m);break;case 3:case 4:m=b.stateNode.containerInfo,b=rI(p),lM(p,b,m);break;default:throw Error(s(161))}}}function lM(p,m,b){var P=p.tag;if(P===5||P===6)p=p.stateNode,m?Ie(b,p,m):ut(b,p);else if(P!==4&&(p=p.child,p!==null))for(lM(p,m,b),p=p.sibling;p!==null;)lM(p,m,b),p=p.sibling}function cM(p,m,b){var P=p.tag;if(P===5||P===6)p=p.stateNode,m?ct(b,p,m):gt(b,p);else if(P!==4&&(p=p.child,p!==null))for(cM(p,m,b),p=p.sibling;p!==null;)cM(p,m,b),p=p.sibling}function oI(p,m,b){for(var P=m,D=!1,V,ie;;){if(!D){D=P.return;e:for(;;){if(D===null)throw Error(s(160));switch(V=D.stateNode,D.tag){case 5:ie=!1;break e;case 3:V=V.containerInfo,ie=!0;break e;case 4:V=V.containerInfo,ie=!0;break e}D=D.return}D=!0}if(P.tag===5||P.tag===6)eI(p,P,b),ie?Tt(V,P.stateNode):Ye(V,P.stateNode);else if(P.tag===18)ie?Ce(V,P.stateNode):Fe(V,P.stateNode);else if(P.tag===4){if(P.child!==null){V=P.stateNode.containerInfo,ie=!0,P.child.return=P,P=P.child;continue}}else if(JD(p,P,b),P.child!==null){P.child.return=P,P=P.child;continue}if(P===m)break;for(;P.sibling===null;){if(P.return===null||P.return===m)return;P=P.return,P.tag===4&&(D=!1)}P.sibling.return=P.return,P=P.sibling}}function uM(p,m){if(we){switch(m.tag){case 0:case 11:case 14:case 15:$c(3,m,m.return),Wh(3,m),$c(5,m,m.return);return;case 1:return;case 5:var b=m.stateNode;if(b!=null){var P=m.memoizedProps;p=p!==null?p.memoizedProps:P;var D=m.type,V=m.updateQueue;m.updateQueue=null,V!==null&&xt(b,V,D,p,P,m)}return;case 6:if(m.stateNode===null)throw Error(s(162));b=m.memoizedProps,Ae(m.stateNode,p!==null?p.memoizedProps:b,b);return;case 3:se&&p!==null&&p.memoizedState.isDehydrated&&_e(m.stateNode.containerInfo);return;case 12:return;case 13:Lv(m);return;case 19:Lv(m);return;case 17:return}throw Error(s(163))}switch(m.tag){case 0:case 11:case 14:case 15:$c(3,m,m.return),Wh(3,m),$c(5,m,m.return);return;case 12:return;case 13:Lv(m);return;case 19:Lv(m);return;case 3:se&&p!==null&&p.memoizedState.isDehydrated&&_e(m.stateNode.containerInfo);break;case 22:case 23:return}e:if(me){switch(m.tag){case 1:case 5:case 6:break e;case 3:case 4:m=m.stateNode,Nt(m.containerInfo,m.pendingChildren);break e}throw Error(s(163))}}function Lv(p){var m=p.updateQueue;if(m!==null){p.updateQueue=null;var b=p.stateNode;b===null&&(b=p.stateNode=new FQ),m.forEach(function(P){var D=XQ.bind(null,p,P);b.has(P)||(b.add(P),P.then(D,D))})}}function UQ(p,m){for(yt=m;yt!==null;){m=yt;var b=m.deletions;if(b!==null)for(var P=0;P";case Nv:return":has("+(hM(p)||"")+")";case Fv:return'[role="'+p.value+'"]';case Uv:return'"'+p.value+'"';case zv:return'[data-testname="'+p.value+'"]';default:throw Error(s(365))}}function uI(p,m){var b=[];p=[p,0];for(var P=0;PD&&(D=ie),P&=~V}if(P=D,P=ri()-P,P=(120>P?120:480>P?480:1080>P?1080:1920>P?1920:3e3>P?3e3:4320>P?4320:1960*HQ(P/1960))-P,10p?16:p,Cl===null)var P=!1;else{if(p=Cl,Cl=null,$v=0,hn&6)throw Error(s(331));var D=hn;for(hn|=4,yt=p.current;yt!==null;){var V=yt,ie=V.child;if(yt.flags&16){var ge=V.deletions;if(ge!==null){for(var Ue=0;Ueri()-vM?Gc(p,0):gM|=b),no(p,m)}function _I(p,m){m===0&&(p.mode&1?(m=sv,sv<<=1,!(sv&130023424)&&(sv=4194304)):m=1);var b=Vi();p=Yv(p,m),p!==null&&(Ih(p,m,b),no(p,b))}function YQ(p){var m=p.memoizedState,b=0;m!==null&&(b=m.retryLane),_I(p,b)}function XQ(p,m){var b=0;switch(p.tag){case 13:var P=p.stateNode,D=p.memoizedState;D!==null&&(b=D.retryLane);break;case 19:P=p.stateNode;break;default:throw Error(s(314))}P!==null&&P.delete(m),_I(p,b)}var xI;xI=function(p,m,b){if(p!==null)if(p.memoizedProps!==m.pendingProps||It.current)yo=!0;else{if(!(p.lanes&b)&&!(m.flags&128))return yo=!1,kQ(p,m,b);yo=!!(p.flags&131072)}else yo=!1,ur&&m.flags&1048576&&sD(m,vv,m.index);switch(m.lanes=0,m.tag){case 2:var P=m.type;p!==null&&(p.alternate=null,m.alternate=null,m.flags|=2),p=m.pendingProps;var D=ni(m,rn.current);pd(m,b),D=Zb(null,m,P,p,D,b);var V=qb();return m.flags|=1,typeof D=="object"&&D!==null&&typeof D.render=="function"&&D.$$typeof===void 0?(m.tag=1,m.memoizedState=null,m.updateQueue=null,hr(P)?(V=!0,$n(m)):V=!1,m.memoizedState=D.state!==null&&D.state!==void 0?D.state:null,Nb(m),D.updater=mv,m.stateNode=D,D._reactInternals=m,zb(m,P,p,b),m=rM(null,m,P,!0,V,b)):(m.tag=0,ur&&V&&Ub(m),Hi(null,m,D,b),m=m.child),m;case 16:P=m.elementType;e:{switch(p!==null&&(p.alternate=null,m.alternate=null,m.flags|=2),p=m.pendingProps,D=P._init,P=D(P._payload),m.type=P,D=m.tag=qQ(P),p=ms(P,p),D){case 0:m=nM(null,m,P,p,b);break e;case 1:m=$D(null,m,P,p,b);break e;case 11:m=UD(null,m,P,p,b);break e;case 14:m=BD(null,m,P,ms(P.type,p),b);break e}throw Error(s(306,P,""))}return m;case 0:return P=m.type,D=m.pendingProps,D=m.elementType===P?D:ms(P,D),nM(p,m,P,D,b);case 1:return P=m.type,D=m.pendingProps,D=m.elementType===P?D:ms(P,D),$D(p,m,P,D,b);case 3:e:{if(GD(m),p===null)throw Error(s(387));P=m.pendingProps,V=m.memoizedState,D=V.element,JA(p,m),pv(m,P,null,b);var ie=m.memoizedState;if(P=ie.element,se&&V.isDehydrated)if(V={element:P,isDehydrated:!1,cache:ie.cache,transitions:ie.transitions},m.updateQueue.baseState=V,m.memoizedState=V,m.flags&256){D=Error(s(423)),m=WD(p,m,P,b,D);break e}else if(P!==D){D=Error(s(424)),m=WD(p,m,P,b,D);break e}else for(se&&(vo=Ne(m.stateNode.containerInfo),go=m,ur=!0,gs=null,Lh=!1),b=fD(m,null,P,b),m.child=b;b;)b.flags=b.flags&-3|4096,b=b.sibling;else{if(vd(),P===D){m=Ba(p,m,b);break e}Hi(p,m,P,b)}m=m.child}return m;case 5:return hD(m),p===null&&Vb(m),P=m.type,D=m.pendingProps,V=p!==null?p.memoizedProps:null,ie=D.children,le(P,D)?ie=null:V!==null&&le(P,V)&&(m.flags|=32),jD(p,m),Hi(p,m,ie,b),m.child;case 6:return p===null&&Vb(m),null;case 13:return YD(p,m,b);case 4:return $b(m,m.stateNode.containerInfo),P=m.pendingProps,p===null?m.child=yd(m,null,P,b):Hi(p,m,P,b),m.child;case 11:return P=m.type,D=m.pendingProps,D=m.elementType===P?D:ms(P,D),UD(p,m,P,D,b);case 7:return Hi(p,m,m.pendingProps,b),m.child;case 8:return Hi(p,m,m.pendingProps.children,b),m.child;case 12:return Hi(p,m,m.pendingProps.children,b),m.child;case 10:e:{if(P=m.type._context,D=m.pendingProps,V=m.memoizedProps,ie=D.value,QA(m,P,ie),V!==null)if(qs(V.value,ie)){if(V.children===D.children&&!It.current){m=Ba(p,m,b);break e}}else for(V=m.child,V!==null&&(V.return=m);V!==null;){var ge=V.dependencies;if(ge!==null){ie=V.child;for(var Ue=ge.firstContext;Ue!==null;){if(Ue.context===P){if(V.tag===1){Ue=Na(-1,b&-b),Ue.tag=2;var at=V.updateQueue;if(at!==null){at=at.shared;var Ct=at.pending;Ct===null?Ue.next=Ue:(Ue.next=Ct.next,Ct.next=Ue),at.pending=Ue}}V.lanes|=b,Ue=V.alternate,Ue!==null&&(Ue.lanes|=b),kb(V.return,b,m),ge.lanes|=b;break}Ue=Ue.next}}else if(V.tag===10)ie=V.type===m.type?null:V.child;else if(V.tag===18){if(ie=V.return,ie===null)throw Error(s(341));ie.lanes|=b,ge=ie.alternate,ge!==null&&(ge.lanes|=b),kb(ie,b,m),ie=V.sibling}else ie=V.child;if(ie!==null)ie.return=V;else for(ie=V;ie!==null;){if(ie===m){ie=null;break}if(V=ie.sibling,V!==null){V.return=ie.return,ie=V;break}ie=ie.return}V=ie}Hi(p,m,D.children,b),m=m.child}return m;case 9:return D=m.type,P=m.pendingProps.children,pd(m,b),D=Uo(D),P=P(D),m.flags|=1,Hi(p,m,P,b),m.child;case 14:return P=m.type,D=ms(P,m.pendingProps),D=ms(P.type,D),BD(p,m,P,D,b);case 15:return HD(p,m,m.type,m.pendingProps,b);case 17:return P=m.type,D=m.pendingProps,D=m.elementType===P?D:ms(P,D),p!==null&&(p.alternate=null,m.alternate=null,m.flags|=2),m.tag=1,hr(P)?(p=!0,$n(m)):p=!1,pd(m,b),iD(m,P,D),zb(m,P,D,b),rM(null,m,P,!0,p,b);case 19:return KD(p,m,b);case 22:return VD(p,m,b)}throw Error(s(156,m.tag))};function wI(p,m){return Tb(p,m)}function ZQ(p,m,b,P){this.tag=p,this.key=b,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=m,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=P,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Go(p,m,b,P){return new ZQ(p,m,b,P)}function EM(p){return p=p.prototype,!(!p||!p.isReactComponent)}function qQ(p){if(typeof p=="function")return EM(p)?1:0;if(p!=null){if(p=p.$$typeof,p===y)return 11;if(p===x)return 14}return 2}function Rl(p,m){var b=p.alternate;return b===null?(b=Go(p.tag,m,p.key,p.mode),b.elementType=p.elementType,b.type=p.type,b.stateNode=p.stateNode,b.alternate=p,p.alternate=b):(b.pendingProps=m,b.type=p.type,b.flags=0,b.subtreeFlags=0,b.deletions=null),b.flags=p.flags&14680064,b.childLanes=p.childLanes,b.lanes=p.lanes,b.child=p.child,b.memoizedProps=p.memoizedProps,b.memoizedState=p.memoizedState,b.updateQueue=p.updateQueue,m=p.dependencies,b.dependencies=m===null?null:{lanes:m.lanes,firstContext:m.firstContext},b.sibling=p.sibling,b.index=p.index,b.ref=p.ref,b}function Zv(p,m,b,P,D,V){var ie=2;if(P=p,typeof p=="function")EM(p)&&(ie=1);else if(typeof p=="string")ie=5;else e:switch(p){case u:return Xc(b.children,D,V,m);case d:ie=8,D|=8;break;case f:return p=Go(12,b,m,D|2),p.elementType=f,p.lanes=V,p;case _:return p=Go(13,b,m,D),p.elementType=_,p.lanes=V,p;case v:return p=Go(19,b,m,D),p.elementType=v,p.lanes=V,p;case S:return qv(b,D,V,m);default:if(typeof p=="object"&&p!==null)switch(p.$$typeof){case h:ie=10;break e;case g:ie=9;break e;case y:ie=11;break e;case x:ie=14;break e;case w:ie=16,P=null;break e}throw Error(s(130,p==null?p:typeof p,""))}return m=Go(ie,b,m,D),m.elementType=p,m.type=P,m.lanes=V,m}function Xc(p,m,b,P){return p=Go(7,p,P,m),p.lanes=b,p}function qv(p,m,b,P){return p=Go(22,p,P,m),p.elementType=S,p.lanes=b,p.stateNode={},p}function PM(p,m,b){return p=Go(6,p,null,m),p.lanes=b,p}function CM(p,m,b){return m=Go(4,p.children!==null?p.children:[],p.key,m),m.lanes=b,m.stateNode={containerInfo:p.containerInfo,pendingChildren:null,implementation:p.implementation},m}function KQ(p,m,b,P,D){this.tag=m,this.containerInfo=p,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Te,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Pb(0),this.expirationTimes=Pb(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Pb(0),this.identifierPrefix=P,this.onRecoverableError=D,se&&(this.mutableSourceEagerHydrationData=null)}function SI(p,m,b,P,D,V,ie,ge,Ue){return p=new KQ(p,m,b,ge,Ue),m===1?(m=1,V===!0&&(m|=8)):m=0,V=Go(3,null,null,m),p.current=V,V.stateNode=p,V.memoizedState={element:P,isDehydrated:b,cache:null,transitions:null},Nb(V),p}function bI(p){if(!p)return Gt;p=p._reactInternals;e:{if(T(p)!==p||p.tag!==1)throw Error(s(170));var m=p;do{switch(m.tag){case 3:m=m.stateNode.context;break e;case 1:if(hr(m.type)){m=m.stateNode.__reactInternalMemoizedMergedChildContext;break e}}m=m.return}while(m!==null);throw Error(s(171))}if(p.tag===1){var b=p.type;if(hr(b))return $r(p,b,m)}return m}function MI(p){var m=p._reactInternals;if(m===void 0)throw typeof p.render=="function"?Error(s(188)):(p=Object.keys(p).join(","),Error(s(268,p)));return p=N(m),p===null?null:p.stateNode}function EI(p,m){if(p=p.memoizedState,p!==null&&p.dehydrated!==null){var b=p.retryLane;p.retryLane=b!==0&&b=at&&V>=en&&D<=Ct&&ie<=$t){p.splice(m,1);break}else if(P!==at||b.width!==Ue.width||$tie){if(!(V!==en||b.height!==Ue.height||CtD)){at>P&&(Ue.width+=at-P,Ue.x=P),CtV&&(Ue.height+=en-V,Ue.y=V),$tb&&(b=ie)),ieyM&&(m.flags|=128,P=!0,Gh(D,!1),m.lanes=4194304)}else{if(!P)if(p=_v(V),p!==null){if(m.flags|=128,P=!0,p=p.updateQueue,p!==null&&(m.updateQueue=p,m.flags|=4),Gh(D,!0),D.tail===null&&D.tailMode==="hidden"&&!V.alternate&&!ur)return Ei(m),null}else 2*ri()-D.renderingStartTime>yM&&b!==1073741824&&(m.flags|=128,P=!0,Gh(D,!1),m.lanes=4194304);D.isBackwards?(V.sibling=m.child,m.child=V):(p=D.last,p!==null?p.sibling=V:m.child=V,D.last=V)}return D.tail!==null?(m=D.tail,D.rendering=m,D.tail=m.sibling,D.renderingStartTime=ri(),m.sibling=null,p=pr.current,bt(pr,P?p&1|2:p&1),m):(Ei(m),null);case 22:case 23:return bM(),P=m.memoizedState!==null,p!==null&&p.memoizedState!==null!==P&&(m.flags|=8192),P&&m.mode&1?_o&1073741824&&(Ei(m),we&&m.subtreeFlags&6&&(m.flags|=8192)):Ei(m),null;case 24:return null;case 25:return null}throw Error(s(156,m.tag))}var kQ=a.ReactCurrentOwner,yo=!1;function Hi(p,m,b,P){m.child=p===null?fD(m,null,b,P):yd(m,p.child,b,P)}function UD(p,m,b,P,D){b=b.render;var V=m.ref;return pd(m,D),P=Zb(p,m,b,P,V,D),b=qb(),p!==null&&!yo?(m.updateQueue=p.updateQueue,m.flags&=-2053,p.lanes&=~D,Ba(p,m,D)):(ur&&b&&Ub(m),m.flags|=1,Hi(p,m,P,D),m.child)}function BD(p,m,b,P,D){if(p===null){var V=b.type;return typeof V=="function"&&!EM(V)&&V.defaultProps===void 0&&b.compare===null&&b.defaultProps===void 0?(m.tag=15,m.type=V,HD(p,m,V,P,D)):(p=Zv(b.type,null,P,m,m.mode,D),p.ref=m.ref,p.return=m,m.child=p)}if(V=p.child,!(p.lanes&D)){var ie=V.memoizedProps;if(b=b.compare,b=b!==null?b:uv,b(ie,P)&&p.ref===m.ref)return Ba(p,m,D)}return m.flags|=1,p=Rl(V,P),p.ref=m.ref,p.return=m,m.child=p}function HD(p,m,b,P,D){if(p!==null&&uv(p.memoizedProps,P)&&p.ref===m.ref)if(yo=!1,(p.lanes&D)!==0)p.flags&131072&&(yo=!0);else return m.lanes=p.lanes,Ba(p,m,D);return nM(p,m,b,P,D)}function VD(p,m,b){var P=m.pendingProps,D=P.children,V=p!==null?p.memoizedState:null;if(P.mode==="hidden")if(!(m.mode&1))m.memoizedState={baseLanes:0,cachePool:null},bt(Sd,_o),_o|=b;else if(b&1073741824)m.memoizedState={baseLanes:0,cachePool:null},P=V!==null?V.baseLanes:b,bt(Sd,_o),_o|=P;else return p=V!==null?V.baseLanes|b:b,m.lanes=m.childLanes=1073741824,m.memoizedState={baseLanes:p,cachePool:null},m.updateQueue=null,bt(Sd,_o),_o|=p,null;else V!==null?(P=V.baseLanes|b,m.memoizedState=null):P=b,bt(Sd,_o),_o|=P;return Hi(p,m,D,b),m.child}function jD(p,m){var b=m.ref;(p===null&&b!==null||p!==null&&p.ref!==b)&&(m.flags|=512,m.flags|=2097152)}function nM(p,m,b,P,D){var V=hr(b)?pn:rn.current;return V=ni(m,V),pd(m,D),b=Zb(p,m,b,P,V,D),P=qb(),p!==null&&!yo?(m.updateQueue=p.updateQueue,m.flags&=-2053,p.lanes&=~D,Ba(p,m,D)):(ur&&P&&Ub(m),m.flags|=1,Hi(p,m,b,D),m.child)}function $D(p,m,b,P,D){if(hr(b)){var V=!0;$n(m)}else V=!1;if(pd(m,D),m.stateNode===null)p!==null&&(p.alternate=null,m.alternate=null,m.flags|=2),iD(m,b,P),zb(m,b,P,D),P=!0;else if(p===null){var ie=m.stateNode,ge=m.memoizedProps;ie.props=ge;var Ue=ie.context,at=b.contextType;typeof at=="object"&&at!==null?at=Uo(at):(at=hr(b)?pn:rn.current,at=ni(m,at));var Ct=b.getDerivedStateFromProps,en=typeof Ct=="function"||typeof ie.getSnapshotBeforeUpdate=="function";en||typeof ie.UNSAFE_componentWillReceiveProps!="function"&&typeof ie.componentWillReceiveProps!="function"||(ge!==P||Ue!==at)&&oD(m,ie,P,at),Ml=!1;var $t=m.memoizedState;ie.state=$t,pv(m,P,ie,D),Ue=m.memoizedState,ge!==P||$t!==Ue||It.current||Ml?(typeof Ct=="function"&&(Fb(m,b,Ct,P),Ue=m.memoizedState),(ge=Ml||rD(m,b,ge,P,$t,Ue,at))?(en||typeof ie.UNSAFE_componentWillMount!="function"&&typeof ie.componentWillMount!="function"||(typeof ie.componentWillMount=="function"&&ie.componentWillMount(),typeof ie.UNSAFE_componentWillMount=="function"&&ie.UNSAFE_componentWillMount()),typeof ie.componentDidMount=="function"&&(m.flags|=4194308)):(typeof ie.componentDidMount=="function"&&(m.flags|=4194308),m.memoizedProps=P,m.memoizedState=Ue),ie.props=P,ie.state=Ue,ie.context=at,P=ge):(typeof ie.componentDidMount=="function"&&(m.flags|=4194308),P=!1)}else{ie=m.stateNode,JA(p,m),ge=m.memoizedProps,at=m.type===m.elementType?ge:ms(m.type,ge),ie.props=at,en=m.pendingProps,$t=ie.context,Ue=b.contextType,typeof Ue=="object"&&Ue!==null?Ue=Uo(Ue):(Ue=hr(b)?pn:rn.current,Ue=ni(m,Ue));var Xn=b.getDerivedStateFromProps;(Ct=typeof Xn=="function"||typeof ie.getSnapshotBeforeUpdate=="function")||typeof ie.UNSAFE_componentWillReceiveProps!="function"&&typeof ie.componentWillReceiveProps!="function"||(ge!==en||$t!==Ue)&&oD(m,ie,P,Ue),Ml=!1,$t=m.memoizedState,ie.state=$t,pv(m,P,ie,D);var Ut=m.memoizedState;ge!==en||$t!==Ut||It.current||Ml?(typeof Xn=="function"&&(Fb(m,b,Xn,P),Ut=m.memoizedState),(at=Ml||rD(m,b,at,P,$t,Ut,Ue)||!1)?(Ct||typeof ie.UNSAFE_componentWillUpdate!="function"&&typeof ie.componentWillUpdate!="function"||(typeof ie.componentWillUpdate=="function"&&ie.componentWillUpdate(P,Ut,Ue),typeof ie.UNSAFE_componentWillUpdate=="function"&&ie.UNSAFE_componentWillUpdate(P,Ut,Ue)),typeof ie.componentDidUpdate=="function"&&(m.flags|=4),typeof ie.getSnapshotBeforeUpdate=="function"&&(m.flags|=1024)):(typeof ie.componentDidUpdate!="function"||ge===p.memoizedProps&&$t===p.memoizedState||(m.flags|=4),typeof ie.getSnapshotBeforeUpdate!="function"||ge===p.memoizedProps&&$t===p.memoizedState||(m.flags|=1024),m.memoizedProps=P,m.memoizedState=Ut),ie.props=P,ie.state=Ut,ie.context=Ue,P=at):(typeof ie.componentDidUpdate!="function"||ge===p.memoizedProps&&$t===p.memoizedState||(m.flags|=4),typeof ie.getSnapshotBeforeUpdate!="function"||ge===p.memoizedProps&&$t===p.memoizedState||(m.flags|=1024),P=!1)}return rM(p,m,b,P,V,D)}function rM(p,m,b,P,D,V){jD(p,m);var ie=(m.flags&128)!==0;if(!P&&!ie)return D&&En(m,b,!1),Ba(p,m,V);P=m.stateNode,kQ.current=m;var ge=ie&&typeof b.getDerivedStateFromError!="function"?null:P.render();return m.flags|=1,p!==null&&ie?(m.child=yd(m,p.child,null,V),m.child=yd(m,null,ge,V)):Hi(p,m,ge,V),m.memoizedState=P.state,D&&En(m,b,!0),m.child}function GD(p){var m=p.stateNode;m.pendingContext?zn(p,m.pendingContext,m.pendingContext!==m.context):m.context&&zn(p,m.context,!1),$b(p,m.containerInfo)}function WD(p,m,b,P,D){return vd(),jb(D),m.flags|=256,Hi(p,m,b,P),m.child}var Ov={dehydrated:null,treeContext:null,retryLane:0};function Rv(p){return{baseLanes:p,cachePool:null}}function YD(p,m,b){var P=m.pendingProps,D=pr.current,V=!1,ie=(m.flags&128)!==0,ge;if((ge=ie)||(ge=p!==null&&p.memoizedState===null?!1:(D&2)!==0),ge?(V=!0,m.flags&=-129):(p===null||p.memoizedState!==null)&&(D|=1),bt(pr,D&1),p===null)return Vb(m),p=m.memoizedState,p!==null&&(p=p.dehydrated,p!==null)?(m.mode&1?Lr(p)?m.lanes=8:m.lanes=1073741824:m.lanes=1,null):(D=P.children,p=P.fallback,V?(P=m.mode,V=m.child,D={mode:"hidden",children:D},!(P&1)&&V!==null?(V.childLanes=0,V.pendingProps=D):V=qv(D,P,0,null),p=Xc(p,P,b,null),V.return=m,p.return=m,V.sibling=p,m.child=V,m.child.memoizedState=Rv(b),m.memoizedState=Ov,p):iM(m,D));if(D=p.memoizedState,D!==null){if(ge=D.dehydrated,ge!==null){if(ie)return m.flags&256?(m.flags&=-257,Av(p,m,b,Error(s(422)))):m.memoizedState!==null?(m.child=p.child,m.flags|=128,null):(V=P.fallback,D=m.mode,P=qv({mode:"visible",children:P.children},D,0,null),V=Xc(V,D,b,null),V.flags|=2,P.return=m,V.return=m,P.sibling=V,m.child=P,m.mode&1&&yd(m,p.child,null,b),m.child.memoizedState=Rv(b),m.memoizedState=Ov,V);if(!(m.mode&1))m=Av(p,m,b,null);else if(Lr(ge))m=Av(p,m,b,Error(s(419)));else if(P=(b&p.childLanes)!==0,yo||P){if(P=kr,P!==null){switch(b&-b){case 4:V=2;break;case 16:V=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:V=32;break;case 536870912:V=268435456;break;default:V=0}P=V&(P.suspendedLanes|b)?0:V,P!==0&&P!==D.retryLane&&(D.retryLane=P,$o(p,P,-1))}MM(),m=Av(p,m,b,Error(s(421)))}else Fn(ge)?(m.flags|=128,m.child=p.child,m=XQ.bind(null,p),ti(ge,m),m=null):(b=D.treeContext,se&&(vo=ce(ge),go=m,ur=!0,gs=null,Lh=!1,b!==null&&(Bo[Ho++]=Fa,Bo[Ho++]=za,Bo[Ho++]=Bc,Fa=b.id,za=b.overflow,Bc=m)),m=iM(m,m.pendingProps.children),m.flags|=4096);return m}return V?(P=ZD(p,m,P.children,P.fallback,b),V=m.child,D=p.child.memoizedState,V.memoizedState=D===null?Rv(b):{baseLanes:D.baseLanes|b,cachePool:null},V.childLanes=p.childLanes&~b,m.memoizedState=Ov,P):(b=XD(p,m,P.children,b),m.memoizedState=null,b)}return V?(P=ZD(p,m,P.children,P.fallback,b),V=m.child,D=p.child.memoizedState,V.memoizedState=D===null?Rv(b):{baseLanes:D.baseLanes|b,cachePool:null},V.childLanes=p.childLanes&~b,m.memoizedState=Ov,P):(b=XD(p,m,P.children,b),m.memoizedState=null,b)}function iM(p,m){return m=qv({mode:"visible",children:m},p.mode,0,null),m.return=p,p.child=m}function XD(p,m,b,P){var D=p.child;return p=D.sibling,b=Rl(D,{mode:"visible",children:b}),!(m.mode&1)&&(b.lanes=P),b.return=m,b.sibling=null,p!==null&&(P=m.deletions,P===null?(m.deletions=[p],m.flags|=16):P.push(p)),m.child=b}function ZD(p,m,b,P,D){var V=m.mode;p=p.child;var ie=p.sibling,ge={mode:"hidden",children:b};return!(V&1)&&m.child!==p?(b=m.child,b.childLanes=0,b.pendingProps=ge,m.deletions=null):(b=Rl(p,ge),b.subtreeFlags=p.subtreeFlags&14680064),ie!==null?P=Rl(ie,P):(P=Xc(P,V,D,null),P.flags|=2),P.return=m,b.return=m,b.sibling=P,m.child=b,P}function Av(p,m,b,P){return P!==null&&jb(P),yd(m,p.child,null,b),p=iM(m,m.pendingProps.children),p.flags|=2,m.memoizedState=null,p}function qD(p,m,b){p.lanes|=m;var P=p.alternate;P!==null&&(P.lanes|=m),kb(p.return,m,b)}function oM(p,m,b,P,D){var V=p.memoizedState;V===null?p.memoizedState={isBackwards:m,rendering:null,renderingStartTime:0,last:P,tail:b,tailMode:D}:(V.isBackwards=m,V.rendering=null,V.renderingStartTime=0,V.last=P,V.tail=b,V.tailMode=D)}function KD(p,m,b){var P=m.pendingProps,D=P.revealOrder,V=P.tail;if(Hi(p,m,P.children,b),P=pr.current,P&2)P=P&1|2,m.flags|=128;else{if(p!==null&&p.flags&128)e:for(p=m.child;p!==null;){if(p.tag===13)p.memoizedState!==null&&qD(p,b,m);else if(p.tag===19)qD(p,b,m);else if(p.child!==null){p.child.return=p,p=p.child;continue}if(p===m)break e;for(;p.sibling===null;){if(p.return===null||p.return===m)break e;p=p.return}p.sibling.return=p.return,p=p.sibling}P&=1}if(bt(pr,P),!(m.mode&1))m.memoizedState=null;else switch(D){case"forwards":for(b=m.child,D=null;b!==null;)p=b.alternate,p!==null&&_v(p)===null&&(D=b),b=b.sibling;b=D,b===null?(D=m.child,m.child=null):(D=b.sibling,b.sibling=null),oM(m,!1,D,b,V);break;case"backwards":for(b=null,D=m.child,m.child=null;D!==null;){if(p=D.alternate,p!==null&&_v(p)===null){m.child=D;break}p=D.sibling,D.sibling=b,b=D,D=p}oM(m,!0,b,null,V);break;case"together":oM(m,!1,null,null,void 0);break;default:m.memoizedState=null}return m.child}function Ba(p,m,b){if(p!==null&&(m.dependencies=p.dependencies),bd|=m.lanes,!(b&m.childLanes))return null;if(p!==null&&m.child!==p.child)throw Error(s(153));if(m.child!==null){for(p=m.child,b=Rl(p,p.pendingProps),m.child=b,b.return=m;p.sibling!==null;)p=p.sibling,b=b.sibling=Rl(p,p.pendingProps),b.return=m;b.sibling=null}return m.child}function NQ(p,m,b){switch(m.tag){case 3:GD(m),vd();break;case 5:hD(m);break;case 1:hr(m.type)&&$n(m);break;case 4:$b(m,m.stateNode.containerInfo);break;case 10:QA(m,m.type._context,m.memoizedProps.value);break;case 13:var P=m.memoizedState;if(P!==null)return P.dehydrated!==null?(bt(pr,pr.current&1),m.flags|=128,null):b&m.child.childLanes?YD(p,m,b):(bt(pr,pr.current&1),p=Ba(p,m,b),p!==null?p.sibling:null);bt(pr,pr.current&1);break;case 19:if(P=(b&m.childLanes)!==0,p.flags&128){if(P)return KD(p,m,b);m.flags|=128}var D=m.memoizedState;if(D!==null&&(D.rendering=null,D.tail=null,D.lastEffect=null),bt(pr,pr.current),P)break;return null;case 22:case 23:return m.lanes=0,VD(p,m,b)}return Ba(p,m,b)}function FQ(p,m){switch(Bb(m),m.tag){case 1:return hr(m.type)&&hi(),p=m.flags,p&65536?(m.flags=p&-65537|128,m):null;case 3:return xd(),At(It),At(rn),Yb(),p=m.flags,p&65536&&!(p&128)?(m.flags=p&-65537|128,m):null;case 5:return Gb(m),null;case 13:if(At(pr),p=m.memoizedState,p!==null&&p.dehydrated!==null){if(m.alternate===null)throw Error(s(340));vd()}return p=m.flags,p&65536?(m.flags=p&-65537|128,m):null;case 19:return At(pr),null;case 4:return xd(),null;case 10:return Lb(m.type._context),null;case 22:case 23:return bM(),null;case 24:return null;default:return null}}var Dv=!1,jc=!1,zQ=typeof WeakSet=="function"?WeakSet:Set,yt=null;function Iv(p,m){var b=p.ref;if(b!==null)if(typeof b=="function")try{b(null)}catch(P){ro(p,m,P)}else b.current=null}function sM(p,m,b){try{b()}catch(P){ro(p,m,P)}}var QD=!1;function UQ(p,m){for(j(p.containerInfo),yt=m;yt!==null;)if(p=yt,m=p.child,(p.subtreeFlags&1028)!==0&&m!==null)m.return=p,yt=m;else for(;yt!==null;){p=yt;try{var b=p.alternate;if(p.flags&1024)switch(p.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var P=b.memoizedProps,D=b.memoizedState,V=p.stateNode,ie=V.getSnapshotBeforeUpdate(p.elementType===p.type?P:ms(p.type,P),D);V.__reactInternalSnapshotBeforeUpdate=ie}break;case 3:we&&st(p.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(ge){ro(p,p.return,ge)}if(m=p.sibling,m!==null){m.return=p.return,yt=m;break}yt=p.return}return b=QD,QD=!1,b}function $c(p,m,b){var P=m.updateQueue;if(P=P!==null?P.lastEffect:null,P!==null){var D=P=P.next;do{if((D.tag&p)===p){var V=D.destroy;D.destroy=void 0,V!==void 0&&sM(m,b,V)}D=D.next}while(D!==P)}}function Wh(p,m){if(m=m.updateQueue,m=m!==null?m.lastEffect:null,m!==null){var b=m=m.next;do{if((b.tag&p)===p){var P=b.create;b.destroy=P()}b=b.next}while(b!==m)}}function aM(p){var m=p.ref;if(m!==null){var b=p.stateNode;switch(p.tag){case 5:p=G(b);break;default:p=b}typeof m=="function"?m(p):m.current=p}}function JD(p,m,b){if(Zs&&typeof Zs.onCommitFiberUnmount=="function")try{Zs.onCommitFiberUnmount(lv,m)}catch{}switch(m.tag){case 0:case 11:case 14:case 15:if(p=m.updateQueue,p!==null&&(p=p.lastEffect,p!==null)){var P=p=p.next;do{var D=P,V=D.destroy;D=D.tag,V!==void 0&&(D&2||D&4)&&sM(m,b,V),P=P.next}while(P!==p)}break;case 1:if(Iv(m,b),p=m.stateNode,typeof p.componentWillUnmount=="function")try{p.props=m.memoizedProps,p.state=m.memoizedState,p.componentWillUnmount()}catch(ie){ro(m,b,ie)}break;case 5:Iv(m,b);break;case 4:we?oI(p,m,b):me&&me&&(m=m.stateNode.containerInfo,b=Bt(m),Nt(m,b))}}function eI(p,m,b){for(var P=m;;)if(JD(p,P,b),P.child===null||we&&P.tag===4){if(P===m)break;for(;P.sibling===null;){if(P.return===null||P.return===m)return;P=P.return}P.sibling.return=P.return,P=P.sibling}else P.child.return=P,P=P.child}function tI(p){var m=p.alternate;m!==null&&(p.alternate=null,tI(m)),p.child=null,p.deletions=null,p.sibling=null,p.tag===5&&(m=p.stateNode,m!==null&&Ze(m)),p.stateNode=null,p.return=null,p.dependencies=null,p.memoizedProps=null,p.memoizedState=null,p.pendingProps=null,p.stateNode=null,p.updateQueue=null}function nI(p){return p.tag===5||p.tag===3||p.tag===4}function rI(p){e:for(;;){for(;p.sibling===null;){if(p.return===null||nI(p.return))return null;p=p.return}for(p.sibling.return=p.return,p=p.sibling;p.tag!==5&&p.tag!==6&&p.tag!==18;){if(p.flags&2||p.child===null||p.tag===4)continue e;p.child.return=p,p=p.child}if(!(p.flags&2))return p.stateNode}}function iI(p){if(we){e:{for(var m=p.return;m!==null;){if(nI(m))break e;m=m.return}throw Error(s(160))}var b=m;switch(b.tag){case 5:m=b.stateNode,b.flags&32&&(Lt(m),b.flags&=-33),b=rI(p),cM(p,b,m);break;case 3:case 4:m=b.stateNode.containerInfo,b=rI(p),lM(p,b,m);break;default:throw Error(s(161))}}}function lM(p,m,b){var P=p.tag;if(P===5||P===6)p=p.stateNode,m?Ie(b,p,m):ut(b,p);else if(P!==4&&(p=p.child,p!==null))for(lM(p,m,b),p=p.sibling;p!==null;)lM(p,m,b),p=p.sibling}function cM(p,m,b){var P=p.tag;if(P===5||P===6)p=p.stateNode,m?ct(b,p,m):gt(b,p);else if(P!==4&&(p=p.child,p!==null))for(cM(p,m,b),p=p.sibling;p!==null;)cM(p,m,b),p=p.sibling}function oI(p,m,b){for(var P=m,D=!1,V,ie;;){if(!D){D=P.return;e:for(;;){if(D===null)throw Error(s(160));switch(V=D.stateNode,D.tag){case 5:ie=!1;break e;case 3:V=V.containerInfo,ie=!0;break e;case 4:V=V.containerInfo,ie=!0;break e}D=D.return}D=!0}if(P.tag===5||P.tag===6)eI(p,P,b),ie?Tt(V,P.stateNode):Ye(V,P.stateNode);else if(P.tag===18)ie?Ce(V,P.stateNode):Fe(V,P.stateNode);else if(P.tag===4){if(P.child!==null){V=P.stateNode.containerInfo,ie=!0,P.child.return=P,P=P.child;continue}}else if(JD(p,P,b),P.child!==null){P.child.return=P,P=P.child;continue}if(P===m)break;for(;P.sibling===null;){if(P.return===null||P.return===m)return;P=P.return,P.tag===4&&(D=!1)}P.sibling.return=P.return,P=P.sibling}}function uM(p,m){if(we){switch(m.tag){case 0:case 11:case 14:case 15:$c(3,m,m.return),Wh(3,m),$c(5,m,m.return);return;case 1:return;case 5:var b=m.stateNode;if(b!=null){var P=m.memoizedProps;p=p!==null?p.memoizedProps:P;var D=m.type,V=m.updateQueue;m.updateQueue=null,V!==null&&xt(b,V,D,p,P,m)}return;case 6:if(m.stateNode===null)throw Error(s(162));b=m.memoizedProps,Ae(m.stateNode,p!==null?p.memoizedProps:b,b);return;case 3:se&&p!==null&&p.memoizedState.isDehydrated&&_e(m.stateNode.containerInfo);return;case 12:return;case 13:Lv(m);return;case 19:Lv(m);return;case 17:return}throw Error(s(163))}switch(m.tag){case 0:case 11:case 14:case 15:$c(3,m,m.return),Wh(3,m),$c(5,m,m.return);return;case 12:return;case 13:Lv(m);return;case 19:Lv(m);return;case 3:se&&p!==null&&p.memoizedState.isDehydrated&&_e(m.stateNode.containerInfo);break;case 22:case 23:return}e:if(me){switch(m.tag){case 1:case 5:case 6:break e;case 3:case 4:m=m.stateNode,Nt(m.containerInfo,m.pendingChildren);break e}throw Error(s(163))}}function Lv(p){var m=p.updateQueue;if(m!==null){p.updateQueue=null;var b=p.stateNode;b===null&&(b=p.stateNode=new zQ),m.forEach(function(P){var D=ZQ.bind(null,p,P);b.has(P)||(b.add(P),P.then(D,D))})}}function BQ(p,m){for(yt=m;yt!==null;){m=yt;var b=m.deletions;if(b!==null)for(var P=0;P";case Nv:return":has("+(hM(p)||"")+")";case Fv:return'[role="'+p.value+'"]';case Uv:return'"'+p.value+'"';case zv:return'[data-testname="'+p.value+'"]';default:throw Error(s(365))}}function uI(p,m){var b=[];p=[p,0];for(var P=0;PD&&(D=ie),P&=~V}if(P=D,P=ri()-P,P=(120>P?120:480>P?480:1080>P?1080:1920>P?1920:3e3>P?3e3:4320>P?4320:1960*VQ(P/1960))-P,10p?16:p,Cl===null)var P=!1;else{if(p=Cl,Cl=null,$v=0,hn&6)throw Error(s(331));var D=hn;for(hn|=4,yt=p.current;yt!==null;){var V=yt,ie=V.child;if(yt.flags&16){var ge=V.deletions;if(ge!==null){for(var Ue=0;Ueri()-vM?Gc(p,0):gM|=b),no(p,m)}function _I(p,m){m===0&&(p.mode&1?(m=sv,sv<<=1,!(sv&130023424)&&(sv=4194304)):m=1);var b=Vi();p=Yv(p,m),p!==null&&(Ih(p,m,b),no(p,b))}function XQ(p){var m=p.memoizedState,b=0;m!==null&&(b=m.retryLane),_I(p,b)}function ZQ(p,m){var b=0;switch(p.tag){case 13:var P=p.stateNode,D=p.memoizedState;D!==null&&(b=D.retryLane);break;case 19:P=p.stateNode;break;default:throw Error(s(314))}P!==null&&P.delete(m),_I(p,b)}var xI;xI=function(p,m,b){if(p!==null)if(p.memoizedProps!==m.pendingProps||It.current)yo=!0;else{if(!(p.lanes&b)&&!(m.flags&128))return yo=!1,NQ(p,m,b);yo=!!(p.flags&131072)}else yo=!1,ur&&m.flags&1048576&&sD(m,vv,m.index);switch(m.lanes=0,m.tag){case 2:var P=m.type;p!==null&&(p.alternate=null,m.alternate=null,m.flags|=2),p=m.pendingProps;var D=ni(m,rn.current);pd(m,b),D=Zb(null,m,P,p,D,b);var V=qb();return m.flags|=1,typeof D=="object"&&D!==null&&typeof D.render=="function"&&D.$$typeof===void 0?(m.tag=1,m.memoizedState=null,m.updateQueue=null,hr(P)?(V=!0,$n(m)):V=!1,m.memoizedState=D.state!==null&&D.state!==void 0?D.state:null,Nb(m),D.updater=mv,m.stateNode=D,D._reactInternals=m,zb(m,P,p,b),m=rM(null,m,P,!0,V,b)):(m.tag=0,ur&&V&&Ub(m),Hi(null,m,D,b),m=m.child),m;case 16:P=m.elementType;e:{switch(p!==null&&(p.alternate=null,m.alternate=null,m.flags|=2),p=m.pendingProps,D=P._init,P=D(P._payload),m.type=P,D=m.tag=KQ(P),p=ms(P,p),D){case 0:m=nM(null,m,P,p,b);break e;case 1:m=$D(null,m,P,p,b);break e;case 11:m=UD(null,m,P,p,b);break e;case 14:m=BD(null,m,P,ms(P.type,p),b);break e}throw Error(s(306,P,""))}return m;case 0:return P=m.type,D=m.pendingProps,D=m.elementType===P?D:ms(P,D),nM(p,m,P,D,b);case 1:return P=m.type,D=m.pendingProps,D=m.elementType===P?D:ms(P,D),$D(p,m,P,D,b);case 3:e:{if(GD(m),p===null)throw Error(s(387));P=m.pendingProps,V=m.memoizedState,D=V.element,JA(p,m),pv(m,P,null,b);var ie=m.memoizedState;if(P=ie.element,se&&V.isDehydrated)if(V={element:P,isDehydrated:!1,cache:ie.cache,transitions:ie.transitions},m.updateQueue.baseState=V,m.memoizedState=V,m.flags&256){D=Error(s(423)),m=WD(p,m,P,b,D);break e}else if(P!==D){D=Error(s(424)),m=WD(p,m,P,b,D);break e}else for(se&&(vo=Ne(m.stateNode.containerInfo),go=m,ur=!0,gs=null,Lh=!1),b=fD(m,null,P,b),m.child=b;b;)b.flags=b.flags&-3|4096,b=b.sibling;else{if(vd(),P===D){m=Ba(p,m,b);break e}Hi(p,m,P,b)}m=m.child}return m;case 5:return hD(m),p===null&&Vb(m),P=m.type,D=m.pendingProps,V=p!==null?p.memoizedProps:null,ie=D.children,le(P,D)?ie=null:V!==null&&le(P,V)&&(m.flags|=32),jD(p,m),Hi(p,m,ie,b),m.child;case 6:return p===null&&Vb(m),null;case 13:return YD(p,m,b);case 4:return $b(m,m.stateNode.containerInfo),P=m.pendingProps,p===null?m.child=yd(m,null,P,b):Hi(p,m,P,b),m.child;case 11:return P=m.type,D=m.pendingProps,D=m.elementType===P?D:ms(P,D),UD(p,m,P,D,b);case 7:return Hi(p,m,m.pendingProps,b),m.child;case 8:return Hi(p,m,m.pendingProps.children,b),m.child;case 12:return Hi(p,m,m.pendingProps.children,b),m.child;case 10:e:{if(P=m.type._context,D=m.pendingProps,V=m.memoizedProps,ie=D.value,QA(m,P,ie),V!==null)if(qs(V.value,ie)){if(V.children===D.children&&!It.current){m=Ba(p,m,b);break e}}else for(V=m.child,V!==null&&(V.return=m);V!==null;){var ge=V.dependencies;if(ge!==null){ie=V.child;for(var Ue=ge.firstContext;Ue!==null;){if(Ue.context===P){if(V.tag===1){Ue=Na(-1,b&-b),Ue.tag=2;var at=V.updateQueue;if(at!==null){at=at.shared;var Ct=at.pending;Ct===null?Ue.next=Ue:(Ue.next=Ct.next,Ct.next=Ue),at.pending=Ue}}V.lanes|=b,Ue=V.alternate,Ue!==null&&(Ue.lanes|=b),kb(V.return,b,m),ge.lanes|=b;break}Ue=Ue.next}}else if(V.tag===10)ie=V.type===m.type?null:V.child;else if(V.tag===18){if(ie=V.return,ie===null)throw Error(s(341));ie.lanes|=b,ge=ie.alternate,ge!==null&&(ge.lanes|=b),kb(ie,b,m),ie=V.sibling}else ie=V.child;if(ie!==null)ie.return=V;else for(ie=V;ie!==null;){if(ie===m){ie=null;break}if(V=ie.sibling,V!==null){V.return=ie.return,ie=V;break}ie=ie.return}V=ie}Hi(p,m,D.children,b),m=m.child}return m;case 9:return D=m.type,P=m.pendingProps.children,pd(m,b),D=Uo(D),P=P(D),m.flags|=1,Hi(p,m,P,b),m.child;case 14:return P=m.type,D=ms(P,m.pendingProps),D=ms(P.type,D),BD(p,m,P,D,b);case 15:return HD(p,m,m.type,m.pendingProps,b);case 17:return P=m.type,D=m.pendingProps,D=m.elementType===P?D:ms(P,D),p!==null&&(p.alternate=null,m.alternate=null,m.flags|=2),m.tag=1,hr(P)?(p=!0,$n(m)):p=!1,pd(m,b),iD(m,P,D),zb(m,P,D,b),rM(null,m,P,!0,p,b);case 19:return KD(p,m,b);case 22:return VD(p,m,b)}throw Error(s(156,m.tag))};function wI(p,m){return Tb(p,m)}function qQ(p,m,b,P){this.tag=p,this.key=b,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=m,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=P,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Go(p,m,b,P){return new qQ(p,m,b,P)}function EM(p){return p=p.prototype,!(!p||!p.isReactComponent)}function KQ(p){if(typeof p=="function")return EM(p)?1:0;if(p!=null){if(p=p.$$typeof,p===y)return 11;if(p===x)return 14}return 2}function Rl(p,m){var b=p.alternate;return b===null?(b=Go(p.tag,m,p.key,p.mode),b.elementType=p.elementType,b.type=p.type,b.stateNode=p.stateNode,b.alternate=p,p.alternate=b):(b.pendingProps=m,b.type=p.type,b.flags=0,b.subtreeFlags=0,b.deletions=null),b.flags=p.flags&14680064,b.childLanes=p.childLanes,b.lanes=p.lanes,b.child=p.child,b.memoizedProps=p.memoizedProps,b.memoizedState=p.memoizedState,b.updateQueue=p.updateQueue,m=p.dependencies,b.dependencies=m===null?null:{lanes:m.lanes,firstContext:m.firstContext},b.sibling=p.sibling,b.index=p.index,b.ref=p.ref,b}function Zv(p,m,b,P,D,V){var ie=2;if(P=p,typeof p=="function")EM(p)&&(ie=1);else if(typeof p=="string")ie=5;else e:switch(p){case u:return Xc(b.children,D,V,m);case d:ie=8,D|=8;break;case f:return p=Go(12,b,m,D|2),p.elementType=f,p.lanes=V,p;case _:return p=Go(13,b,m,D),p.elementType=_,p.lanes=V,p;case v:return p=Go(19,b,m,D),p.elementType=v,p.lanes=V,p;case S:return qv(b,D,V,m);default:if(typeof p=="object"&&p!==null)switch(p.$$typeof){case h:ie=10;break e;case g:ie=9;break e;case y:ie=11;break e;case x:ie=14;break e;case w:ie=16,P=null;break e}throw Error(s(130,p==null?p:typeof p,""))}return m=Go(ie,b,m,D),m.elementType=p,m.type=P,m.lanes=V,m}function Xc(p,m,b,P){return p=Go(7,p,P,m),p.lanes=b,p}function qv(p,m,b,P){return p=Go(22,p,P,m),p.elementType=S,p.lanes=b,p.stateNode={},p}function PM(p,m,b){return p=Go(6,p,null,m),p.lanes=b,p}function CM(p,m,b){return m=Go(4,p.children!==null?p.children:[],p.key,m),m.lanes=b,m.stateNode={containerInfo:p.containerInfo,pendingChildren:null,implementation:p.implementation},m}function QQ(p,m,b,P,D){this.tag=m,this.containerInfo=p,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Te,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Pb(0),this.expirationTimes=Pb(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Pb(0),this.identifierPrefix=P,this.onRecoverableError=D,se&&(this.mutableSourceEagerHydrationData=null)}function SI(p,m,b,P,D,V,ie,ge,Ue){return p=new QQ(p,m,b,ge,Ue),m===1?(m=1,V===!0&&(m|=8)):m=0,V=Go(3,null,null,m),p.current=V,V.stateNode=p,V.memoizedState={element:P,isDehydrated:b,cache:null,transitions:null},Nb(V),p}function bI(p){if(!p)return Gt;p=p._reactInternals;e:{if(T(p)!==p||p.tag!==1)throw Error(s(170));var m=p;do{switch(m.tag){case 3:m=m.stateNode.context;break e;case 1:if(hr(m.type)){m=m.stateNode.__reactInternalMemoizedMergedChildContext;break e}}m=m.return}while(m!==null);throw Error(s(171))}if(p.tag===1){var b=p.type;if(hr(b))return $r(p,b,m)}return m}function MI(p){var m=p._reactInternals;if(m===void 0)throw typeof p.render=="function"?Error(s(188)):(p=Object.keys(p).join(","),Error(s(268,p)));return p=N(m),p===null?null:p.stateNode}function EI(p,m){if(p=p.memoizedState,p!==null&&p.dehydrated!==null){var b=p.retryLane;p.retryLane=b!==0&&b=at&&V>=en&&D<=Ct&&ie<=$t){p.splice(m,1);break}else if(P!==at||b.width!==Ue.width||$tie){if(!(V!==en||b.height!==Ue.height||CtD)){at>P&&(Ue.width+=at-P,Ue.x=P),CtV&&(Ue.height+=en-V,Ue.y=V),$tb&&(b=ie)),ie ")+` No matching component was found for: - `)+p.join(" > ")}return null},n.getPublicRootInstance=function(p){if(p=p.current,!p.child)return null;switch(p.child.tag){case 5:return G(p.child.stateNode);default:return p.child.stateNode}},n.injectIntoDevTools=function(p){if(p={bundleType:p.bundleType,version:p.version,rendererPackageName:p.rendererPackageName,rendererConfig:p.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:a.ReactCurrentDispatcher,findHostInstanceByFiber:QQ,findFiberByHostInstance:p.findFiberByHostInstance||JQ,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.0.0-fc46dba67-20220329"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")p=!1;else{var m=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(m.isDisabled||!m.supportsFiber)p=!0;else{try{lv=m.inject(p),Zs=m}catch{}p=!!m.checkDCE}}return p},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(p,m,b,P){if(!We)throw Error(s(363));p=pM(p,m);var D=Ke(p,b,P).disconnect;return{disconnect:function(){D()}}},n.registerMutableSourceForHydration=function(p,m){var b=m._getVersion;b=b(m._source),p.mutableSourceEagerHydrationData==null?p.mutableSourceEagerHydrationData=[m,b]:p.mutableSourceEagerHydrationData.push(m,b)},n.runWithPriority=function(p,m){var b=Pn;try{return Pn=p,m()}finally{Pn=b}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(p,m,b,P){var D=m.current,V=Vi(),ie=Tl(D);return b=bI(b),m.context===null?m.context=b:m.pendingContext=b,m=Na(V,ie),m.payload={element:p},P=P===void 0?null:P,P!==null&&(m.callback=P),El(D,m),p=$o(D,ie,V),p!==null&&hv(p,D,ie),ie},n};Y8.exports=wce;var Sce=Y8.exports;const bce=Tc(Sce),Mce=t=>typeof t=="object"&&typeof t.then=="function",Au=[];function q8(t,e,n=(r,i)=>r===i){if(t===e)return!0;if(!t||!e)return!1;const r=t.length;if(e.length!==r)return!1;for(let i=0;i0&&(o.timeout&&clearTimeout(o.timeout),o.timeout=setTimeout(o.remove,r.lifespan)),o.response;if(!n)throw o.promise}const i={keys:e,equal:r.equal,remove:()=>{const o=Au.indexOf(i);o!==-1&&Au.splice(o,1)},promise:(Mce(t)?t:t(...e)).then(o=>{i.response=o,r.lifespan&&r.lifespan>0&&(i.timeout=setTimeout(i.remove,r.lifespan))}).catch(o=>i.error=o)};if(Au.push(i),!n)throw i.promise}const Ece=(t,e,n)=>K8(t,e,!1,n),Pce=(t,e,n)=>void K8(t,e,!0,n),Cce=t=>{if(t===void 0||t.length===0)Au.splice(0,Au.length);else{const e=Au.find(n=>q8(t,n.keys,n.equal));e&&e.remove()}},OR={},kS=t=>void Object.assign(OR,t);function Tce(t,e){function n(u,{args:d=[],attach:f,...h},g){let y=`${u[0].toUpperCase()}${u.slice(1)}`,_;if(u==="primitive"){if(h.object===void 0)throw new Error("R3F: Primitives without 'object' are invalid!");const v=h.object;_=ff(v,{type:u,root:g,attach:f,primitive:!0})}else{const v=OR[y];if(!v)throw new Error(`R3F: ${y} is not part of the THREE namespace! Did you forget to extend? See: https://docs.pmnd.rs/react-three-fiber/api/objects#using-3rd-party-objects-declaratively`);if(!Array.isArray(d))throw new Error("R3F: The args prop must be an array!");_=ff(new v(...d),{type:u,root:g,attach:f,memoizedProps:{args:d}})}return _.__r3f.attach===void 0&&(_ instanceof Jt?_.__r3f.attach="geometry":_ instanceof jr&&(_.__r3f.attach="material")),y!=="inject"&&LE(_,h),_}function r(u,d){let f=!1;if(d){var h,g;(h=d.__r3f)!=null&&h.attach?IE(u,d,d.__r3f.attach):d.isObject3D&&u.isObject3D&&(u.add(d),f=!0),f||(g=u.__r3f)==null||g.objects.push(d),d.__r3f||ff(d,{}),d.__r3f.parent=u,j2(d),hf(d)}}function i(u,d,f){let h=!1;if(d){var g,y;if((g=d.__r3f)!=null&&g.attach)IE(u,d,d.__r3f.attach);else if(d.isObject3D&&u.isObject3D){d.parent=u,d.dispatchEvent({type:"added"});const _=u.children.filter(x=>x!==d),v=_.indexOf(f);u.children=[..._.slice(0,v),d,..._.slice(v)],h=!0}h||(y=u.__r3f)==null||y.objects.push(d),d.__r3f||ff(d,{}),d.__r3f.parent=u,j2(d),hf(d)}}function o(u,d,f=!1){u&&[...u].forEach(h=>s(d,h,f))}function s(u,d,f){if(d){var h,g,y;if(d.__r3f&&(d.__r3f.parent=null),(h=u.__r3f)!=null&&h.objects&&(u.__r3f.objects=u.__r3f.objects.filter(S=>S!==d)),(g=d.__r3f)!=null&&g.attach)uk(u,d,d.__r3f.attach);else if(d.isObject3D&&u.isObject3D){var _;u.remove(d),(_=d.__r3f)!=null&&_.root&&kce(d.__r3f.root,d)}const x=(y=d.__r3f)==null?void 0:y.primitive,w=f===void 0?d.dispose!==null&&!x:f;if(!x){var v;o((v=d.__r3f)==null?void 0:v.objects,d,w),o(d.children,d,w)}delete d.__r3f,w&&d.dispose&&d.type!=="Scene"&&H2.unstable_scheduleCallback(H2.unstable_IdlePriority,()=>{try{d.dispose()}catch{}}),hf(u)}}function a(u,d,f,h){var g;const y=(g=u.__r3f)==null?void 0:g.parent;if(!y)return;const _=n(d,f,u.__r3f.root);if(u.children){for(const v of u.children)v.__r3f&&r(_,v);u.children=u.children.filter(v=>!v.__r3f)}u.__r3f.objects.forEach(v=>r(_,v)),u.__r3f.objects=[],u.__r3f.autoRemovedBeforeAppend||s(y,u),_.parent&&(_.__r3f.autoRemovedBeforeAppend=!0),r(y,_),_.raycast&&_.__r3f.eventCount&&_.__r3f.root.getState().internal.interaction.push(_),[h,h.alternate].forEach(v=>{v!==null&&(v.stateNode=_,v.ref&&(typeof v.ref=="function"?v.ref(_):v.ref.current=_))})}const l=()=>console.warn("Text is not allowed in the R3F tree! This could be stray whitespace or characters.");return{reconciler:bce({createInstance:n,removeChild:s,appendChild:r,appendInitialChild:r,insertBefore:i,supportsMutation:!0,isPrimaryRenderer:!1,supportsPersistence:!1,supportsHydration:!1,noTimeout:-1,appendChildToContainer:(u,d)=>{if(!d)return;const f=u.getState().scene;f.__r3f&&(f.__r3f.root=u,r(f,d))},removeChildFromContainer:(u,d)=>{d&&s(u.getState().scene,d)},insertInContainerBefore:(u,d,f)=>{if(!d||!f)return;const h=u.getState().scene;h.__r3f&&i(h,d,f)},getRootHostContext:()=>null,getChildHostContext:u=>u,finalizeInitialChildren(u){var d;return!!((d=u?.__r3f)!=null?d:{}).handlers},prepareUpdate(u,d,f,h){if(u.__r3f.primitive&&h.object&&h.object!==u)return[!0];{const{args:g=[],children:y,..._}=h,{args:v=[],children:x,...w}=f;if(!Array.isArray(g))throw new Error("R3F: the args prop must be an array!");if(g.some((E,C)=>E!==v[C]))return[!0];const S=i$(u,_,w,!0);return S.changes.length?[!1,S]:null}},commitUpdate(u,[d,f],h,g,y,_){d?a(u,h,y,_):LE(u,f)},commitMount(u,d,f,h){var g;const y=(g=u.__r3f)!=null?g:{};u.raycast&&y.handlers&&y.eventCount&&u.__r3f.root.getState().internal.interaction.push(u)},getPublicInstance:u=>u,prepareForCommit:()=>null,preparePortalMount:u=>ff(u.getState().scene),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance(u){var d;const{attach:f,parent:h}=(d=u.__r3f)!=null?d:{};f&&h&&uk(h,u,f),u.isObject3D&&(u.visible=!1),hf(u)},unhideInstance(u,d){var f;const{attach:h,parent:g}=(f=u.__r3f)!=null?f:{};h&&g&&IE(g,u,h),(u.isObject3D&&d.visible==null||d.visible)&&(u.visible=!0),hf(u)},createTextInstance:l,hideTextInstance:l,unhideTextInstance:l,getCurrentEventPriority:()=>e?e():Af.DefaultEventPriority,beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},detachDeletedInstance:()=>{},now:typeof performance<"u"&&ir.fun(performance.now)?performance.now:ir.fun(Date.now)?Date.now:()=>0,scheduleTimeout:ir.fun(setTimeout)?setTimeout:void 0,cancelTimeout:ir.fun(clearTimeout)?clearTimeout:void 0}),applyProps:LE}}var sk,ak;const DE=t=>"colorSpace"in t||"outputColorSpace"in t,Q8=()=>{var t;return(t=OR.ColorManagement)!=null?t:null},J8=t=>t&&t.isOrthographicCamera,Oce=t=>t&&t.hasOwnProperty("current"),Mh=typeof window<"u"&&((sk=window.document)!=null&&sk.createElement||((ak=window.navigator)==null?void 0:ak.product)==="ReactNative")?M.useLayoutEffect:M.useEffect;function e$(t){const e=M.useRef(t);return Mh(()=>void(e.current=t),[t]),e}function Rce({set:t}){return Mh(()=>(t(new Promise(()=>null)),()=>t(!1)),[t]),null}class t$ extends M.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}}t$.getDerivedStateFromError=()=>({error:!0});const n$="__default",lk=new Map,Ace=t=>t&&!!t.memoized&&!!t.changes;function r$(t){var e;const n=typeof window<"u"?(e=window.devicePixelRatio)!=null?e:2:1;return Array.isArray(t)?Math.min(Math.max(t[0],n),t[1]):t}const mp=t=>{var e;return(e=t.__r3f)==null?void 0:e.root.getState()},ir={obj:t=>t===Object(t)&&!ir.arr(t)&&typeof t!="function",fun:t=>typeof t=="function",str:t=>typeof t=="string",num:t=>typeof t=="number",boo:t=>typeof t=="boolean",und:t=>t===void 0,arr:t=>Array.isArray(t),equ(t,e,{arrays:n="shallow",objects:r="reference",strict:i=!0}={}){if(typeof t!=typeof e||!!t!=!!e)return!1;if(ir.str(t)||ir.num(t))return t===e;const o=ir.obj(t);if(o&&r==="reference")return t===e;const s=ir.arr(t);if(s&&n==="reference")return t===e;if((s||o)&&t===e)return!0;let a;for(a in t)if(!(a in e))return!1;if(o&&n==="shallow"&&r==="shallow"){for(a in i?e:t)if(!ir.equ(t[a],e[a],{strict:i,objects:"reference"}))return!1}else for(a in i?e:t)if(t[a]!==e[a])return!1;if(ir.und(a)){if(s&&t.length===0&&e.length===0||o&&Object.keys(t).length===0&&Object.keys(e).length===0)return!0;if(t!==e)return!1}return!0}};function Dce(t){const e={nodes:{},materials:{}};return t&&t.traverse(n=>{n.name&&(e.nodes[n.name]=n),n.material&&!e.materials[n.material.name]&&(e.materials[n.material.name]=n.material)}),e}function Ice(t){t.dispose&&t.type!=="Scene"&&t.dispose();for(const e in t)e.dispose==null||e.dispose(),delete t[e]}function ff(t,e){const n=t;return(e!=null&&e.primitive||!n.__r3f)&&(n.__r3f={type:"",root:null,previousAttach:null,memoizedProps:{},eventCount:0,handlers:{},objects:[],parent:null,...e}),t}function V2(t,e){let n=t;if(e.includes("-")){const r=e.split("-"),i=r.pop();return n=r.reduce((o,s)=>o[s],t),{target:n,key:i}}else return{target:n,key:e}}const ck=/-\d+$/;function IE(t,e,n){if(ir.str(n)){if(ck.test(n)){const o=n.replace(ck,""),{target:s,key:a}=V2(t,o);Array.isArray(s[a])||(s[a]=[])}const{target:r,key:i}=V2(t,n);e.__r3f.previousAttach=r[i],r[i]=e}else e.__r3f.previousAttach=n(t,e)}function uk(t,e,n){var r,i;if(ir.str(n)){const{target:o,key:s}=V2(t,n),a=e.__r3f.previousAttach;a===void 0?delete o[s]:o[s]=a}else(r=e.__r3f)==null||r.previousAttach==null||r.previousAttach(t,e);(i=e.__r3f)==null||delete i.previousAttach}function i$(t,{children:e,key:n,ref:r,...i},{children:o,key:s,ref:a,...l}={},c=!1){var u;const d=(u=t?.__r3f)!=null?u:{},f=Object.entries(i),h=[];if(c){const y=Object.keys(l);for(let _=0;_{var v;if((v=t.__r3f)!=null&&v.primitive&&y==="object"||ir.equ(_,l[y]))return;if(/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(y))return h.push([y,_,!0,[]]);let x=[];y.includes("-")&&(x=y.split("-")),h.push([y,_,!1,x]);for(const w in i){const S=i[w];w.startsWith(`${y}-`)&&h.push([w,S,!1,w.split("-")])}});const g={...i};return d.memoizedProps&&d.memoizedProps.args&&(g.args=d.memoizedProps.args),d.memoizedProps&&d.memoizedProps.attach&&(g.attach=d.memoizedProps.attach),{memoized:g,changes:h}}function LE(t,e){var n,r,i;const o=(n=t.__r3f)!=null?n:{},s=o.root,a=(r=s==null||s.getState==null?void 0:s.getState())!=null?r:{},{memoized:l,changes:c}=Ace(e)?e:i$(t,e),u=o.eventCount;t.__r3f&&(t.__r3f.memoizedProps=l);for(let f=0;fw[S],t),!(x&&x.set))){const[w,...S]=_.reverse();v=S.reverse().reduce((E,C)=>E[C],t),h=w}if(g===n$+"remove")if(v.constructor){let w=lk.get(v.constructor);w||(w=new v.constructor,lk.set(v.constructor,w)),g=w[h]}else g=0;if(y)g?o.handlers[h]=g:delete o.handlers[h],o.eventCount=Object.keys(o.handlers).length;else if(x&&x.set&&(x.copy||x instanceof Uu)){if(Array.isArray(g))x.fromArray?x.fromArray(g):x.set(...g);else if(x.copy&&g&&g.constructor&&x.constructor===g.constructor)x.copy(g);else if(g!==void 0){const w=x instanceof lt;!w&&x.setScalar?x.setScalar(g):x instanceof Uu&&g instanceof Uu?x.mask=g.mask:x.set(g),!Q8()&&!a.linear&&w&&x.convertSRGBToLinear()}}else if(v[h]=g,v[h]instanceof qn&&v[h].format===Jn&&v[h].type===nr){const w=v[h];DE(w)&&DE(a.gl)?w.colorSpace=a.gl.outputColorSpace:w.encoding=a.gl.outputEncoding}hf(t)}if(o.parent&&a.internal&&t.raycast&&u!==o.eventCount){const f=a.internal.interaction.indexOf(t);f>-1&&a.internal.interaction.splice(f,1),o.eventCount&&a.internal.interaction.push(t)}return!(c.length===1&&c[0][0]==="onUpdate")&&c.length&&(i=t.__r3f)!=null&&i.parent&&j2(t),t}function hf(t){var e,n;const r=(e=t.__r3f)==null||(n=e.root)==null||n.getState==null?void 0:n.getState();r&&r.internal.frames===0&&r.invalidate()}function j2(t){t.onUpdate==null||t.onUpdate(t)}function o$(t,e){t.manual||(J8(t)?(t.left=e.width/-2,t.right=e.width/2,t.top=e.height/2,t.bottom=e.height/-2):t.aspect=e.width/e.height,t.updateProjectionMatrix(),t.updateMatrixWorld())}function ty(t){return(t.eventObject||t.object).uuid+"/"+t.index+t.instanceId}function Lce(){var t;const e=typeof self<"u"&&self||typeof window<"u"&&window;if(!e)return Af.DefaultEventPriority;switch((t=e.event)==null?void 0:t.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return Af.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return Af.ContinuousEventPriority;default:return Af.DefaultEventPriority}}function s$(t,e,n,r){const i=n.get(e);i&&(n.delete(e),n.size===0&&(t.delete(r),i.target.releasePointerCapture(r)))}function kce(t,e){const{internal:n}=t.getState();n.interaction=n.interaction.filter(r=>r!==e),n.initialHits=n.initialHits.filter(r=>r!==e),n.hovered.forEach((r,i)=>{(r.eventObject===e||r.object===e)&&n.hovered.delete(i)}),n.capturedMap.forEach((r,i)=>{s$(n.capturedMap,e,r,i)})}function Nce(t){function e(l){const{internal:c}=t.getState(),u=l.offsetX-c.initialClick[0],d=l.offsetY-c.initialClick[1];return Math.round(Math.sqrt(u*u+d*d))}function n(l){return l.filter(c=>["Move","Over","Enter","Out","Leave"].some(u=>{var d;return(d=c.__r3f)==null?void 0:d.handlers["onPointer"+u]}))}function r(l,c){const u=t.getState(),d=new Set,f=[],h=c?c(u.internal.interaction):u.internal.interaction;for(let v=0;v{const w=mp(v.object),S=mp(x.object);return!w||!S?v.distance-x.distance:S.events.priority-w.events.priority||v.distance-x.distance}).filter(v=>{const x=ty(v);return d.has(x)?!1:(d.add(x),!0)});u.events.filter&&(y=u.events.filter(y,u));for(const v of y){let x=v.object;for(;x;){var _;(_=x.__r3f)!=null&&_.eventCount&&f.push({...v,eventObject:x}),x=x.parent}}if("pointerId"in l&&u.internal.capturedMap.has(l.pointerId))for(let v of u.internal.capturedMap.get(l.pointerId).values())d.has(ty(v.intersection))||f.push(v.intersection);return f}function i(l,c,u,d){const f=t.getState();if(l.length){const h={stopped:!1};for(const g of l){const y=mp(g.object)||f,{raycaster:_,pointer:v,camera:x,internal:w}=y,S=new Z(v.x,v.y,0).unproject(x),E=A=>{var F,N;return(F=(N=w.capturedMap.get(A))==null?void 0:N.has(g.eventObject))!=null?F:!1},C=A=>{const F={intersection:g,target:c.target};w.capturedMap.has(A)?w.capturedMap.get(A).set(g.eventObject,F):w.capturedMap.set(A,new Map([[g.eventObject,F]])),c.target.setPointerCapture(A)},O=A=>{const F=w.capturedMap.get(A);F&&s$(w.capturedMap,g.eventObject,F,A)};let R={};for(let A in c){let F=c[A];typeof F!="function"&&(R[A]=F)}let T={...g,...R,pointer:v,intersections:l,stopped:h.stopped,delta:u,unprojectedPoint:S,ray:_.ray,camera:x,stopPropagation(){const A="pointerId"in c&&w.capturedMap.get(c.pointerId);if((!A||A.has(g.eventObject))&&(T.stopped=h.stopped=!0,w.hovered.size&&Array.from(w.hovered.values()).find(F=>F.eventObject===g.eventObject))){const F=l.slice(0,l.indexOf(g));o([...F,g])}},target:{hasPointerCapture:E,setPointerCapture:C,releasePointerCapture:O},currentTarget:{hasPointerCapture:E,setPointerCapture:C,releasePointerCapture:O},nativeEvent:c};if(d(T),h.stopped===!0)break}}return l}function o(l){const{internal:c}=t.getState();for(const u of c.hovered.values())if(!l.length||!l.find(d=>d.object===u.object&&d.index===u.index&&d.instanceId===u.instanceId)){const f=u.eventObject.__r3f,h=f?.handlers;if(c.hovered.delete(ty(u)),f!=null&&f.eventCount){const g={...u,intersections:l};h.onPointerOut==null||h.onPointerOut(g),h.onPointerLeave==null||h.onPointerLeave(g)}}}function s(l,c){for(let u=0;uo([]);case"onLostPointerCapture":return c=>{const{internal:u}=t.getState();"pointerId"in c&&u.capturedMap.has(c.pointerId)&&requestAnimationFrame(()=>{u.capturedMap.has(c.pointerId)&&(u.capturedMap.delete(c.pointerId),o([]))})}}return function(u){const{onPointerMissed:d,internal:f}=t.getState();f.lastEvent.current=u;const h=l==="onPointerMove",g=l==="onClick"||l==="onContextMenu"||l==="onDoubleClick",_=r(u,h?n:void 0),v=g?e(u):0;l==="onPointerDown"&&(f.initialClick=[u.offsetX,u.offsetY],f.initialHits=_.map(w=>w.eventObject)),g&&!_.length&&v<=2&&(s(u,f.interaction),d&&d(u)),h&&o(_);function x(w){const S=w.eventObject,E=S.__r3f,C=E?.handlers;if(E!=null&&E.eventCount)if(h){if(C.onPointerOver||C.onPointerEnter||C.onPointerOut||C.onPointerLeave){const O=ty(w),R=f.hovered.get(O);R?R.stopped&&w.stopPropagation():(f.hovered.set(O,w),C.onPointerOver==null||C.onPointerOver(w),C.onPointerEnter==null||C.onPointerEnter(w))}C.onPointerMove==null||C.onPointerMove(w)}else{const O=C[l];O?(!g||f.initialHits.includes(S))&&(s(u,f.interaction.filter(R=>!f.initialHits.includes(R))),O(w)):g&&f.initialHits.includes(S)&&s(u,f.interaction.filter(R=>!f.initialHits.includes(R)))}}i(_,u,v,x)}}return{handlePointer:a}}const Fce=["set","get","setSize","setFrameloop","setDpr","events","invalidate","advance","size","viewport"],a$=t=>!!(t!=null&&t.render),RR=M.createContext(null),zce=(t,e)=>{const n=W8((a,l)=>{const c=new Z,u=new Z,d=new Z;function f(v=l().camera,x=u,w=l().size){const{width:S,height:E,top:C,left:O}=w,R=S/E;x instanceof Z?d.copy(x):d.set(...x);const T=v.getWorldPosition(c).distanceTo(d);if(J8(v))return{width:S/v.zoom,height:E/v.zoom,top:C,left:O,factor:1,distance:T,aspect:R};{const A=v.fov*Math.PI/180,F=2*Math.tan(A/2)*T,N=F*(S/E);return{width:N,height:F,top:C,left:O,factor:S/N,distance:T,aspect:R}}}let h;const g=v=>a(x=>({performance:{...x.performance,current:v}})),y=new Ee;return{set:a,get:l,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},xr:null,scene:null,invalidate:(v=1)=>t(l(),v),advance:(v,x)=>e(v,x,l()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new ER,pointer:y,mouse:y,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const v=l();h&&clearTimeout(h),v.performance.current!==v.performance.min&&g(v.performance.min),h=setTimeout(()=>g(l().performance.max),v.performance.debounce)}},size:{width:0,height:0,top:0,left:0,updateStyle:!1},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:f},setEvents:v=>a(x=>({...x,events:{...x.events,...v}})),setSize:(v,x,w,S,E)=>{const C=l().camera,O={width:v,height:x,top:S||0,left:E||0,updateStyle:w};a(R=>({size:O,viewport:{...R.viewport,...f(C,u,O)}}))},setDpr:v=>a(x=>{const w=r$(v);return{viewport:{...x.viewport,dpr:w,initialDpr:x.viewport.initialDpr||w}}}),setFrameloop:(v="always")=>{const x=l().clock;x.stop(),x.elapsedTime=0,v!=="never"&&(x.start(),x.elapsedTime=0),a(()=>({frameloop:v}))},previousRoot:void 0,internal:{active:!1,priority:0,frames:0,lastEvent:M.createRef(),interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,subscribe:(v,x,w)=>{const S=l().internal;return S.priority=S.priority+(x>0?1:0),S.subscribers.push({ref:v,priority:x,store:w}),S.subscribers=S.subscribers.sort((E,C)=>E.priority-C.priority),()=>{const E=l().internal;E!=null&&E.subscribers&&(E.priority=E.priority-(x>0?1:0),E.subscribers=E.subscribers.filter(C=>C.ref!==v))}}}}}),r=n.getState();let i=r.size,o=r.viewport.dpr,s=r.camera;return n.subscribe(()=>{const{camera:a,size:l,viewport:c,gl:u,set:d}=n.getState();if(l!==i||c.dpr!==o){var f;i=l,o=c.dpr,o$(a,l),u.setPixelRatio(c.dpr);const h=(f=l.updateStyle)!=null?f:typeof HTMLCanvasElement<"u"&&u.domElement instanceof HTMLCanvasElement;u.setSize(l.width,l.height,h)}a!==s&&(s=a,d(h=>({viewport:{...h.viewport,...h.viewport.getCurrentViewport(a)}})))}),n.subscribe(a=>t(a)),n};function l$(t,e){const n={callback:t};return e.add(n),()=>void e.delete(n)}let ny,c$=new Set,u$=new Set,Uce=new Set;const Bce=t=>l$(t,c$),Hce=t=>l$(t,u$);function kE(t,e){if(t.size)for(const{callback:n}of t.values())n(e)}function gp(t,e){switch(t){case"before":return kE(c$,e);case"after":return kE(u$,e);case"tail":return kE(Uce,e)}}let NE,FE;function zE(t,e,n){let r=e.clock.getDelta();for(e.frameloop==="never"&&typeof t=="number"&&(r=t-e.clock.elapsedTime,e.clock.oldTime=e.clock.elapsedTime,e.clock.elapsedTime=t),NE=e.internal.subscribers,ny=0;ny0)&&!((c=i.gl.xr)!=null&&c.isPresenting)&&(n+=zE(l,i))}if(gp("after",l),n===0)return gp("tail",l),e=!1,cancelAnimationFrame(r)}function s(l,c=1){var u;if(!l)return t.forEach(d=>s(d.store.getState()),c);(u=l.gl.xr)!=null&&u.isPresenting||!l.internal.active||l.frameloop==="never"||(l.internal.frames=Math.min(60,l.internal.frames+c),e||(e=!0,requestAnimationFrame(o)))}function a(l,c=!0,u,d){if(c&&gp("before",l),u)zE(l,u,d);else for(const f of t.values())zE(l,f.store.getState());c&&gp("after",l)}return{loop:o,invalidate:s,advance:a}}function jce(t){const e=M.useRef(null);return Mh(()=>void(e.current=t.current.__r3f),[t]),e}function AR(){const t=M.useContext(RR);if(!t)throw new Error("R3F: Hooks can only be used within the Canvas component!");return t}function dn(t=n=>n,e){return AR()(t,e)}function kc(t,e=0){const n=AR(),r=n.getState().internal.subscribe,i=e$(t);return Mh(()=>r(i,e,n),[e,r,n]),null}function d$(t,e){return function(n,...r){const i=new n;return t&&t(i),Promise.all(r.map(o=>new Promise((s,a)=>i.load(o,l=>{l.scene&&Object.assign(l,Dce(l.scene)),s(l)},e,l=>a(new Error(`Could not load ${o}: ${l.message})`))))))}}function NS(t,e,n,r){const i=Array.isArray(e)?e:[e],o=Ece(d$(n,r),[t,...i],{equal:ir.equ});return Array.isArray(e)?o:o[0]}NS.preload=function(t,e,n){const r=Array.isArray(e)?e:[e];return Pce(d$(n),[t,...r])};NS.clear=function(t,e){const n=Array.isArray(e)?e:[e];return Cce([t,...n])};const ih=new Map,{invalidate:dk,advance:fk}=Vce(ih),{reconciler:lg,applyProps:hu}=Tce(ih,Lce),Xd={objects:"shallow",strict:!1},$ce=(t,e)=>{const n=typeof t=="function"?t(e):t;return a$(n)?n:new iR({powerPreference:"high-performance",canvas:e,antialias:!0,alpha:!0,...t})};function Gce(t,e){if(e)return e;if(typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement&&t.parentElement){const{width:n,height:r,top:i,left:o}=t.parentElement.getBoundingClientRect();return{width:n,height:r,top:i,left:o}}else if(typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas)return{width:t.width,height:t.height,top:0,left:0};return{width:0,height:0,top:0,left:0}}function Wce(t){const e=ih.get(t),n=e?.fiber,r=e?.store;e&&console.warn("R3F.createRoot should only be called once!");const i=typeof reportError=="function"?reportError:console.error,o=r||zce(dk,fk),s=n||lg.createContainer(o,Af.ConcurrentRoot,null,!1,null,"",i,null);e||ih.set(t,{fiber:s,store:o});let a,l=!1,c;return{configure(u={}){let{gl:d,size:f,scene:h,events:g,onCreated:y,shadows:_=!1,linear:v=!1,flat:x=!1,legacy:w=!1,orthographic:S=!1,frameloop:E="always",dpr:C=[1,2],performance:O,raycaster:R,camera:T,onPointerMissed:A}=u,F=o.getState(),N=F.gl;F.gl||F.set({gl:N=$ce(d,t)});let U=F.raycaster;U||F.set({raycaster:U=new LS});const{params:k,...z}=R||{};if(ir.equ(z,U,Xd)||hu(U,{...z}),ir.equ(k,U.params,Xd)||hu(U,{params:{...U.params,...k}}),!F.camera||F.camera===c&&!ir.equ(c,T,Xd)){c=T;const q=T instanceof vh,K=q?T:S?new Ic(0,0,0,0,.1,1e3):new or(75,0,.1,1e3);q||(K.position.z=5,T&&hu(K,T),!F.camera&&!(T!=null&&T.rotation)&&K.lookAt(0,0,0)),F.set({camera:K})}if(!F.scene){let q;h instanceof Sc?q=h:(q=new Sc,h&&hu(q,h)),F.set({scene:ff(q)})}if(!F.xr){const q=(J,le)=>{const ae=o.getState();ae.frameloop!=="never"&&fk(J,!0,ae,le)},K=()=>{const J=o.getState();J.gl.xr.enabled=J.gl.xr.isPresenting,J.gl.xr.setAnimationLoop(J.gl.xr.isPresenting?q:null),J.gl.xr.isPresenting||dk(J)},re={connect(){const J=o.getState().gl;J.xr.addEventListener("sessionstart",K),J.xr.addEventListener("sessionend",K)},disconnect(){const J=o.getState().gl;J.xr.removeEventListener("sessionstart",K),J.xr.removeEventListener("sessionend",K)}};N.xr&&re.connect(),F.set({xr:re})}if(N.shadowMap){const q=N.shadowMap.enabled,K=N.shadowMap.type;if(N.shadowMap.enabled=!!_,ir.boo(_))N.shadowMap.type=um;else if(ir.str(_)){var G;const re={basic:nj,percentage:hS,soft:um,variance:bu};N.shadowMap.type=(G=re[_])!=null?G:um}else ir.obj(_)&&Object.assign(N.shadowMap,_);(q!==N.shadowMap.enabled||K!==N.shadowMap.type)&&(N.shadowMap.needsUpdate=!0)}const W=Q8();W&&("enabled"in W?W.enabled=!w:"legacyMode"in W&&(W.legacyMode=w)),hu(N,{outputEncoding:v?3e3:3001,toneMapping:x?ks:GO}),F.legacy!==w&&F.set(()=>({legacy:w})),F.linear!==v&&F.set(()=>({linear:v})),F.flat!==x&&F.set(()=>({flat:x})),d&&!ir.fun(d)&&!a$(d)&&!ir.equ(d,N,Xd)&&hu(N,d),g&&!F.events.handlers&&F.set({events:g(o)});const $=Gce(t,f);return ir.equ($,F.size,Xd)||F.setSize($.width,$.height,$.updateStyle,$.top,$.left),C&&F.viewport.dpr!==r$(C)&&F.setDpr(C),F.frameloop!==E&&F.setFrameloop(E),F.onPointerMissed||F.set({onPointerMissed:A}),O&&!ir.equ(O,F.performance,Xd)&&F.set(q=>({performance:{...q.performance,...O}})),a=y,l=!0,this},render(u){return l||this.configure(),lg.updateContainer(M.createElement(Yce,{store:o,children:u,onCreated:a,rootElement:t}),s,null,()=>{}),o},unmount(){f$(t)}}}function Yce({store:t,children:e,onCreated:n,rootElement:r}){return Mh(()=>{const i=t.getState();i.set(o=>({internal:{...o.internal,active:!0}})),n&&n(i),t.getState().events.connected||i.events.connect==null||i.events.connect(r)},[]),M.createElement(RR.Provider,{value:t},e)}function f$(t,e){const n=ih.get(t),r=n?.fiber;if(r){const i=n?.store.getState();i&&(i.internal.active=!1),lg.updateContainer(null,r,null,()=>{i&&setTimeout(()=>{try{var o,s,a,l;i.events.disconnect==null||i.events.disconnect(),(o=i.gl)==null||(s=o.renderLists)==null||s.dispose==null||s.dispose(),(a=i.gl)==null||a.forceContextLoss==null||a.forceContextLoss(),(l=i.gl)!=null&&l.xr&&i.xr.disconnect(),Ice(i),ih.delete(t),e&&e(t)}catch{}},500)})}}function DR(t,e,n){return M.createElement(Xce,{key:e.uuid,children:t,container:e,state:n})}function Xce({state:t={},children:e,container:n}){const{events:r,size:i,...o}=t,s=AR(),[a]=M.useState(()=>new LS),[l]=M.useState(()=>new Ee),c=M.useCallback((d,f)=>{const h={...d};Object.keys(d).forEach(y=>{(Fce.includes(y)||d[y]!==f[y]&&f[y])&&delete h[y]});let g;if(f&&i){const y=f.camera;g=d.viewport.getCurrentViewport(y,new Z,i),y!==d.camera&&o$(y,i)}return{...h,scene:n,raycaster:a,pointer:l,mouse:l,previousRoot:s,events:{...d.events,...f?.events,...r},size:{...d.size,...i},viewport:{...d.viewport,...g},...o}},[t]),[u]=M.useState(()=>{const d=s.getState();return W8((h,g)=>({...d,scene:n,raycaster:a,pointer:l,mouse:l,previousRoot:s,events:{...d.events,...r},size:{...d.size,...i},...o,set:h,get:g,setEvents:y=>h(_=>({..._,events:{..._.events,...y}}))}))});return M.useEffect(()=>{const d=s.subscribe(f=>u.setState(h=>c(f,h)));return()=>{d(),u.destroy()}},[]),M.useEffect(()=>{u.setState(d=>c(s.getState(),d))},[c]),M.createElement(M.Fragment,null,lg.createPortal(M.createElement(RR.Provider,{value:u},e),u,null))}lg.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:M.version});function $2(t,e,n){var r,i,o,s,a;e==null&&(e=100);function l(){var u=Date.now()-s;u=0?r=setTimeout(l,e-u):(r=null,n||(a=t.apply(o,i),o=i=null))}var c=function(){o=this,i=arguments,s=Date.now();var u=n&&!r;return r||(r=setTimeout(l,e)),u&&(a=t.apply(o,i),o=i=null),a};return c.clear=function(){r&&(clearTimeout(r),r=null)},c.flush=function(){r&&(a=t.apply(o,i),o=i=null,clearTimeout(r),r=null)},c}$2.debounce=$2;var Zce=$2;const hk=Tc(Zce);function qce(t){let{debounce:e,scroll:n,polyfill:r,offsetSize:i}=t===void 0?{debounce:0,scroll:!1,offsetSize:!1}:t;const o=r||(typeof window>"u"?class{}:window.ResizeObserver);if(!o)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[s,a]=M.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=M.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:s}),c=e?typeof e=="number"?e:e.scroll:null,u=e?typeof e=="number"?e:e.resize:null,d=M.useRef(!1);M.useEffect(()=>(d.current=!0,()=>void(d.current=!1)));const[f,h,g]=M.useMemo(()=>{const x=()=>{if(!l.current.element)return;const{left:w,top:S,width:E,height:C,bottom:O,right:R,x:T,y:A}=l.current.element.getBoundingClientRect(),F={left:w,top:S,width:E,height:C,bottom:O,right:R,x:T,y:A};l.current.element instanceof HTMLElement&&i&&(F.height=l.current.element.offsetHeight,F.width=l.current.element.offsetWidth),Object.freeze(F),d.current&&!eue(l.current.lastBounds,F)&&a(l.current.lastBounds=F)};return[x,u?hk(x,u):x,c?hk(x,c):x]},[a,i,c,u]);function y(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(x=>x.removeEventListener("scroll",g,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null)}function _(){l.current.element&&(l.current.resizeObserver=new o(g),l.current.resizeObserver.observe(l.current.element),n&&l.current.scrollContainers&&l.current.scrollContainers.forEach(x=>x.addEventListener("scroll",g,{capture:!0,passive:!0})))}const v=x=>{!x||x===l.current.element||(y(),l.current.element=x,l.current.scrollContainers=h$(x),_())};return Qce(g,!!n),Kce(h),M.useEffect(()=>{y(),_()},[n,g,h]),M.useEffect(()=>y,[]),[v,s,f]}function Kce(t){M.useEffect(()=>{const e=t;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[t])}function Qce(t,e){M.useEffect(()=>{if(e){const n=t;return window.addEventListener("scroll",n,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",n,!0)}},[t,e])}function h$(t){const e=[];if(!t||t===document.body)return e;const{overflow:n,overflowX:r,overflowY:i}=window.getComputedStyle(t);return[n,r,i].some(o=>o==="auto"||o==="scroll")&&e.push(t),[...e,...h$(t.parentElement)]}const Jce=["x","y","top","bottom","left","right","width","height"],eue=(t,e)=>Jce.every(n=>t[n]===e[n]);var tue=Object.defineProperty,nue=Object.defineProperties,rue=Object.getOwnPropertyDescriptors,pk=Object.getOwnPropertySymbols,iue=Object.prototype.hasOwnProperty,oue=Object.prototype.propertyIsEnumerable,mk=(t,e,n)=>e in t?tue(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,gk=(t,e)=>{for(var n in e||(e={}))iue.call(e,n)&&mk(t,n,e[n]);if(pk)for(var n of pk(e))oue.call(e,n)&&mk(t,n,e[n]);return t},sue=(t,e)=>nue(t,rue(e));function p$(t,e,n){if(!t)return;if(n(t)===!0)return t;let r=e?t.return:t.child;for(;r;){const i=p$(r,e,n);if(i)return i;r=e?null:r.sibling}}function m$(t){try{return Object.defineProperties(t,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return t}}const IR=m$(M.createContext(null));class g$ extends M.Component{render(){return M.createElement(IR.Provider,{value:this._reactInternals},this.props.children)}}const{ReactCurrentOwner:vk,ReactCurrentDispatcher:yk}=M.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function aue(){const t=M.useContext(IR);if(t===null)throw new Error("its-fine: useFiber must be called within a !");const e=M.useId();return M.useMemo(()=>{for(const r of[vk?.current,t,t?.alternate]){if(!r)continue;const i=p$(r,!1,o=>{let s=o.memoizedState;for(;s;){if(s.memoizedState===e)return!0;s=s.next}});if(i)return i}},[t,e])}function lue(){var t,e;const n=aue(),[r]=M.useState(()=>new Map);r.clear();let i=n;for(;i;){const o=(t=i.type)==null?void 0:t._context;o&&o!==IR&&!r.has(o)&&r.set(o,(e=yk?.current)==null?void 0:e.readContext(m$(o))),i=i.return}return r}function cue(){const t=lue();return M.useMemo(()=>Array.from(t.keys()).reduce((e,n)=>r=>M.createElement(e,null,M.createElement(n.Provider,sue(gk({},r),{value:t.get(n)}))),e=>M.createElement(g$,gk({},e))),[t])}const UE={onClick:["click",!1],onContextMenu:["contextmenu",!1],onDoubleClick:["dblclick",!1],onWheel:["wheel",!0],onPointerDown:["pointerdown",!0],onPointerUp:["pointerup",!0],onPointerLeave:["pointerleave",!0],onPointerMove:["pointermove",!0],onPointerCancel:["pointercancel",!0],onLostPointerCapture:["lostpointercapture",!0]};function uue(t){const{handlePointer:e}=Nce(t);return{priority:1,enabled:!0,compute(n,r,i){r.pointer.set(n.offsetX/r.size.width*2-1,-(n.offsetY/r.size.height)*2+1),r.raycaster.setFromCamera(r.pointer,r.camera)},connected:void 0,handlers:Object.keys(UE).reduce((n,r)=>({...n,[r]:e(r)}),{}),update:()=>{var n;const{events:r,internal:i}=t.getState();(n=i.lastEvent)!=null&&n.current&&r.handlers&&r.handlers.onPointerMove(i.lastEvent.current)},connect:n=>{var r;const{set:i,events:o}=t.getState();o.disconnect==null||o.disconnect(),i(s=>({events:{...s.events,connected:n}})),Object.entries((r=o.handlers)!=null?r:[]).forEach(([s,a])=>{const[l,c]=UE[s];n.addEventListener(l,a,{passive:c})})},disconnect:()=>{const{set:n,events:r}=t.getState();if(r.connected){var i;Object.entries((i=r.handlers)!=null?i:[]).forEach(([o,s])=>{if(r&&r.connected instanceof HTMLElement){const[a]=UE[o];r.connected.removeEventListener(a,s)}}),n(o=>({events:{...o.events,connected:void 0}}))}}}}const due=M.forwardRef(function({children:e,fallback:n,resize:r,style:i,gl:o,events:s=uue,eventSource:a,eventPrefix:l,shadows:c,linear:u,flat:d,legacy:f,orthographic:h,frameloop:g,dpr:y,performance:_,raycaster:v,camera:x,onPointerMissed:w,onCreated:S,...E},C){M.useMemo(()=>kS(yce),[]);const O=cue(),[R,T]=qce({scroll:!0,debounce:{scroll:50,resize:0},...r}),A=M.useRef(null),F=M.useRef(null);M.useImperativeHandle(C,()=>A.current);const N=e$(w),[U,k]=M.useState(!1),[z,G]=M.useState(!1);if(U)throw U;if(z)throw z;const W=M.useRef(null);Mh(()=>{const j=A.current;T.width>0&&T.height>0&&j&&(W.current||(W.current=Wce(j)),W.current.configure({gl:o,events:s,shadows:c,linear:u,flat:d,legacy:f,orthographic:h,frameloop:g,dpr:y,performance:_,raycaster:v,camera:x,size:T,onPointerMissed:(...$)=>N.current==null?void 0:N.current(...$),onCreated:$=>{$.events.connect==null||$.events.connect(a?Oce(a)?a.current:a:F.current),l&&$.setEvents({compute:(q,K)=>{const re=q[l+"X"],J=q[l+"Y"];K.pointer.set(re/K.size.width*2-1,-(J/K.size.height)*2+1),K.raycaster.setFromCamera(K.pointer,K.camera)}}),S?.($)}}),W.current.render(M.createElement(O,null,M.createElement(t$,{set:G},M.createElement(M.Suspense,{fallback:M.createElement(Rce,{set:k})},e)))))}),M.useEffect(()=>{const j=A.current;if(j)return()=>f$(j)},[]);const B=a?"none":"auto";return M.createElement("div",yn({ref:F,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:B,...i}},E),M.createElement("div",{ref:R,style:{width:"100%",height:"100%"}},M.createElement("canvas",{ref:A,style:{display:"block"}},n)))}),fue=M.forwardRef(function(e,n){return M.createElement(g$,null,M.createElement(due,yn({},e,{ref:n})))}),Bg=new Z,LR=new Z,hue=new Z;function pue(t,e,n){const r=Bg.setFromMatrixPosition(t.matrixWorld);r.project(e);const i=n.width/2,o=n.height/2;return[r.x*i+i,-(r.y*o)+o]}function mue(t,e){const n=Bg.setFromMatrixPosition(t.matrixWorld),r=LR.setFromMatrixPosition(e.matrixWorld),i=n.sub(r),o=e.getWorldDirection(hue);return i.angleTo(o)>Math.PI/2}function gue(t,e,n,r){const i=Bg.setFromMatrixPosition(t.matrixWorld),o=i.clone();o.project(e),n.setFromCamera(o,e);const s=n.intersectObjects(r,!0);if(s.length){const a=s[0].distance;return i.distanceTo(n.ray.origin)Math.abs(t)<1e-10?0:t;function v$(t,e,n=""){let r="matrix3d(";for(let i=0;i!==16;i++)r+=G2(e[i]*t.elements[i])+(i!==15?",":")");return n+r}const _ue=(t=>e=>v$(e,t))([1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1]),xue=(t=>(e,n)=>v$(e,t(n),"translate(-50%,-50%)"))(t=>[1/t,1/t,1/t,1,-1/t,-1/t,-1/t,-1,1/t,1/t,1/t,1,1,1,1,1]);function wue(t){return t&&typeof t=="object"&&"current"in t}const Hg=M.forwardRef(({children:t,eps:e=.001,style:n,className:r,prepend:i,center:o,fullscreen:s,portal:a,distanceFactor:l,sprite:c=!1,transform:u=!1,occlude:d,onOcclude:f,castShadow:h,receiveShadow:g,material:y,geometry:_,zIndexRange:v=[16777271,0],calculatePosition:x=pue,as:w="div",wrapperClass:S,pointerEvents:E="auto",...C},O)=>{const{gl:R,camera:T,scene:A,size:F,raycaster:N,events:U,viewport:k}=dn(),[z]=M.useState(()=>document.createElement(w)),G=M.useRef(),W=M.useRef(null),B=M.useRef(0),j=M.useRef([0,0]),$=M.useRef(null),q=M.useRef(null),K=a?.current||U.connected||R.domElement.parentNode,re=M.useRef(null),J=M.useRef(!1),le=M.useMemo(()=>d&&d!=="blending"||Array.isArray(d)&&d.length&&wue(d[0]),[d]);M.useLayoutEffect(()=>{const ve=R.domElement;d&&d==="blending"?(ve.style.zIndex=`${Math.floor(v[0]/2)}`,ve.style.position="absolute",ve.style.pointerEvents="none"):(ve.style.zIndex=null,ve.style.position=null,ve.style.pointerEvents=null)},[d]),M.useLayoutEffect(()=>{if(W.current){const ve=G.current=zO(z);if(A.updateMatrixWorld(),u)z.style.cssText="position:absolute;top:0;left:0;pointer-events:none;overflow:hidden;";else{const we=x(W.current,T,F);z.style.cssText=`position:absolute;top:0;left:0;transform:translate3d(${we[0]}px,${we[1]}px,0);transform-origin:0 0;`}return K&&(i?K.prepend(z):K.appendChild(z)),()=>{K&&K.removeChild(z),ve.unmount()}}},[K,u]),M.useLayoutEffect(()=>{S&&(z.className=S)},[S]);const ae=M.useMemo(()=>u?{position:"absolute",top:0,left:0,width:F.width,height:F.height,transformStyle:"preserve-3d",pointerEvents:"none"}:{position:"absolute",transform:o?"translate3d(-50%,-50%,0)":"none",...s&&{top:-F.height/2,left:-F.width/2,width:F.width,height:F.height},...n},[n,o,s,F,u]),oe=M.useMemo(()=>({position:"absolute",pointerEvents:E}),[E]);M.useLayoutEffect(()=>{if(J.current=!1,u){var ve;(ve=G.current)==null||ve.render(M.createElement("div",{ref:$,style:ae},M.createElement("div",{ref:q,style:oe},M.createElement("div",{ref:O,className:r,style:n,children:t}))))}else{var we;(we=G.current)==null||we.render(M.createElement("div",{ref:O,style:ae,className:r,children:t}))}});const De=M.useRef(!0);kc(ve=>{if(W.current){T.updateMatrixWorld(),W.current.updateWorldMatrix(!0,!1);const we=u?j.current:x(W.current,T,F);if(u||Math.abs(B.current-T.zoom)>e||Math.abs(j.current[0]-we[0])>e||Math.abs(j.current[1]-we[1])>e){const me=mue(W.current,T);let se=!1;le&&(d!=="blending"?se=[A]:Array.isArray(d)&&(se=d.map(Ze=>Ze.current)));const de=De.current;if(se){const Ze=gue(W.current,T,N,se);De.current=Ze&&!me}else De.current=!me;de!==De.current&&(f?f(!De.current):z.style.display=De.current?"block":"none");const ke=Math.floor(v[0]/2),Ve=d?le?[v[0],ke]:[ke-1,0]:v;if(z.style.zIndex=`${yue(W.current,T,Ve)}`,u){const[Ze,ot]=[F.width/2,F.height/2],dt=T.projectionMatrix.elements[5]*ot,{isOrthographicCamera:We,top:ht,left:ee,bottom:Q,right:Pe}=T,$e=_ue(T.matrixWorldInverse),Ge=We?`scale(${dt})translate(${G2(-(Pe+ee)/2)}px,${G2((ht+Q)/2)}px)`:`translateZ(${dt}px)`;let Ke=W.current.matrixWorld;c&&(Ke=T.matrixWorldInverse.clone().transpose().copyPosition(Ke).scale(W.current.scale),Ke.elements[3]=Ke.elements[7]=Ke.elements[11]=0,Ke.elements[15]=1),z.style.width=F.width+"px",z.style.height=F.height+"px",z.style.perspective=We?"":`${dt}px`,$.current&&q.current&&($.current.style.transform=`${Ge}${$e}translate(${Ze}px,${ot}px)`,q.current.style.transform=xue(Ke,1/((l||10)/400)))}else{const Ze=l===void 0?1:vue(W.current,T)*l;z.style.transform=`translate3d(${we[0]}px,${we[1]}px,0) scale(${Ze})`}j.current=we,B.current=T.zoom}}if(!le&&re.current&&!J.current)if(u){if($.current){const we=$.current.children[0];if(we!=null&&we.clientWidth&&we!=null&&we.clientHeight){const{isOrthographicCamera:me}=T;if(me||_)C.scale&&(Array.isArray(C.scale)?C.scale instanceof Z?re.current.scale.copy(C.scale.clone().divideScalar(1)):re.current.scale.set(1/C.scale[0],1/C.scale[1],1/C.scale[2]):re.current.scale.setScalar(1/C.scale));else{const se=(l||10)/400,de=we.clientWidth*se,ke=we.clientHeight*se;re.current.scale.set(de,ke,1)}J.current=!0}}}else{const we=z.children[0];if(we!=null&&we.clientWidth&&we!=null&&we.clientHeight){const me=1/k.factor,se=we.clientWidth*me,de=we.clientHeight*me;re.current.scale.set(se,de,1),J.current=!0}re.current.lookAt(ve.camera.position)}});const Te=M.useMemo(()=>({vertexShader:u?void 0:` + `)+p.join(" > ")}return null},n.getPublicRootInstance=function(p){if(p=p.current,!p.child)return null;switch(p.child.tag){case 5:return G(p.child.stateNode);default:return p.child.stateNode}},n.injectIntoDevTools=function(p){if(p={bundleType:p.bundleType,version:p.version,rendererPackageName:p.rendererPackageName,rendererConfig:p.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:a.ReactCurrentDispatcher,findHostInstanceByFiber:JQ,findFiberByHostInstance:p.findFiberByHostInstance||eJ,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.0.0-fc46dba67-20220329"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")p=!1;else{var m=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(m.isDisabled||!m.supportsFiber)p=!0;else{try{lv=m.inject(p),Zs=m}catch{}p=!!m.checkDCE}}return p},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(p,m,b,P){if(!We)throw Error(s(363));p=pM(p,m);var D=Ke(p,b,P).disconnect;return{disconnect:function(){D()}}},n.registerMutableSourceForHydration=function(p,m){var b=m._getVersion;b=b(m._source),p.mutableSourceEagerHydrationData==null?p.mutableSourceEagerHydrationData=[m,b]:p.mutableSourceEagerHydrationData.push(m,b)},n.runWithPriority=function(p,m){var b=Pn;try{return Pn=p,m()}finally{Pn=b}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(p,m,b,P){var D=m.current,V=Vi(),ie=Tl(D);return b=bI(b),m.context===null?m.context=b:m.pendingContext=b,m=Na(V,ie),m.payload={element:p},P=P===void 0?null:P,P!==null&&(m.callback=P),El(D,m),p=$o(D,ie,V),p!==null&&hv(p,D,ie),ie},n};X8.exports=Sce;var bce=X8.exports;const Mce=Tc(bce),Ece=t=>typeof t=="object"&&typeof t.then=="function",Au=[];function K8(t,e,n=(r,i)=>r===i){if(t===e)return!0;if(!t||!e)return!1;const r=t.length;if(e.length!==r)return!1;for(let i=0;i0&&(o.timeout&&clearTimeout(o.timeout),o.timeout=setTimeout(o.remove,r.lifespan)),o.response;if(!n)throw o.promise}const i={keys:e,equal:r.equal,remove:()=>{const o=Au.indexOf(i);o!==-1&&Au.splice(o,1)},promise:(Ece(t)?t:t(...e)).then(o=>{i.response=o,r.lifespan&&r.lifespan>0&&(i.timeout=setTimeout(i.remove,r.lifespan))}).catch(o=>i.error=o)};if(Au.push(i),!n)throw i.promise}const Pce=(t,e,n)=>Q8(t,e,!1,n),Cce=(t,e,n)=>void Q8(t,e,!0,n),Tce=t=>{if(t===void 0||t.length===0)Au.splice(0,Au.length);else{const e=Au.find(n=>K8(t,n.keys,n.equal));e&&e.remove()}},OR={},kS=t=>void Object.assign(OR,t);function Oce(t,e){function n(u,{args:d=[],attach:f,...h},g){let y=`${u[0].toUpperCase()}${u.slice(1)}`,_;if(u==="primitive"){if(h.object===void 0)throw new Error("R3F: Primitives without 'object' are invalid!");const v=h.object;_=ff(v,{type:u,root:g,attach:f,primitive:!0})}else{const v=OR[y];if(!v)throw new Error(`R3F: ${y} is not part of the THREE namespace! Did you forget to extend? See: https://docs.pmnd.rs/react-three-fiber/api/objects#using-3rd-party-objects-declaratively`);if(!Array.isArray(d))throw new Error("R3F: The args prop must be an array!");_=ff(new v(...d),{type:u,root:g,attach:f,memoizedProps:{args:d}})}return _.__r3f.attach===void 0&&(_ instanceof Jt?_.__r3f.attach="geometry":_ instanceof jr&&(_.__r3f.attach="material")),y!=="inject"&&LE(_,h),_}function r(u,d){let f=!1;if(d){var h,g;(h=d.__r3f)!=null&&h.attach?IE(u,d,d.__r3f.attach):d.isObject3D&&u.isObject3D&&(u.add(d),f=!0),f||(g=u.__r3f)==null||g.objects.push(d),d.__r3f||ff(d,{}),d.__r3f.parent=u,$2(d),hf(d)}}function i(u,d,f){let h=!1;if(d){var g,y;if((g=d.__r3f)!=null&&g.attach)IE(u,d,d.__r3f.attach);else if(d.isObject3D&&u.isObject3D){d.parent=u,d.dispatchEvent({type:"added"});const _=u.children.filter(x=>x!==d),v=_.indexOf(f);u.children=[..._.slice(0,v),d,..._.slice(v)],h=!0}h||(y=u.__r3f)==null||y.objects.push(d),d.__r3f||ff(d,{}),d.__r3f.parent=u,$2(d),hf(d)}}function o(u,d,f=!1){u&&[...u].forEach(h=>s(d,h,f))}function s(u,d,f){if(d){var h,g,y;if(d.__r3f&&(d.__r3f.parent=null),(h=u.__r3f)!=null&&h.objects&&(u.__r3f.objects=u.__r3f.objects.filter(S=>S!==d)),(g=d.__r3f)!=null&&g.attach)uk(u,d,d.__r3f.attach);else if(d.isObject3D&&u.isObject3D){var _;u.remove(d),(_=d.__r3f)!=null&&_.root&&Nce(d.__r3f.root,d)}const x=(y=d.__r3f)==null?void 0:y.primitive,w=f===void 0?d.dispose!==null&&!x:f;if(!x){var v;o((v=d.__r3f)==null?void 0:v.objects,d,w),o(d.children,d,w)}delete d.__r3f,w&&d.dispose&&d.type!=="Scene"&&V2.unstable_scheduleCallback(V2.unstable_IdlePriority,()=>{try{d.dispose()}catch{}}),hf(u)}}function a(u,d,f,h){var g;const y=(g=u.__r3f)==null?void 0:g.parent;if(!y)return;const _=n(d,f,u.__r3f.root);if(u.children){for(const v of u.children)v.__r3f&&r(_,v);u.children=u.children.filter(v=>!v.__r3f)}u.__r3f.objects.forEach(v=>r(_,v)),u.__r3f.objects=[],u.__r3f.autoRemovedBeforeAppend||s(y,u),_.parent&&(_.__r3f.autoRemovedBeforeAppend=!0),r(y,_),_.raycast&&_.__r3f.eventCount&&_.__r3f.root.getState().internal.interaction.push(_),[h,h.alternate].forEach(v=>{v!==null&&(v.stateNode=_,v.ref&&(typeof v.ref=="function"?v.ref(_):v.ref.current=_))})}const l=()=>console.warn("Text is not allowed in the R3F tree! This could be stray whitespace or characters.");return{reconciler:Mce({createInstance:n,removeChild:s,appendChild:r,appendInitialChild:r,insertBefore:i,supportsMutation:!0,isPrimaryRenderer:!1,supportsPersistence:!1,supportsHydration:!1,noTimeout:-1,appendChildToContainer:(u,d)=>{if(!d)return;const f=u.getState().scene;f.__r3f&&(f.__r3f.root=u,r(f,d))},removeChildFromContainer:(u,d)=>{d&&s(u.getState().scene,d)},insertInContainerBefore:(u,d,f)=>{if(!d||!f)return;const h=u.getState().scene;h.__r3f&&i(h,d,f)},getRootHostContext:()=>null,getChildHostContext:u=>u,finalizeInitialChildren(u){var d;return!!((d=u?.__r3f)!=null?d:{}).handlers},prepareUpdate(u,d,f,h){if(u.__r3f.primitive&&h.object&&h.object!==u)return[!0];{const{args:g=[],children:y,..._}=h,{args:v=[],children:x,...w}=f;if(!Array.isArray(g))throw new Error("R3F: the args prop must be an array!");if(g.some((E,C)=>E!==v[C]))return[!0];const S=o$(u,_,w,!0);return S.changes.length?[!1,S]:null}},commitUpdate(u,[d,f],h,g,y,_){d?a(u,h,y,_):LE(u,f)},commitMount(u,d,f,h){var g;const y=(g=u.__r3f)!=null?g:{};u.raycast&&y.handlers&&y.eventCount&&u.__r3f.root.getState().internal.interaction.push(u)},getPublicInstance:u=>u,prepareForCommit:()=>null,preparePortalMount:u=>ff(u.getState().scene),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance(u){var d;const{attach:f,parent:h}=(d=u.__r3f)!=null?d:{};f&&h&&uk(h,u,f),u.isObject3D&&(u.visible=!1),hf(u)},unhideInstance(u,d){var f;const{attach:h,parent:g}=(f=u.__r3f)!=null?f:{};h&&g&&IE(g,u,h),(u.isObject3D&&d.visible==null||d.visible)&&(u.visible=!0),hf(u)},createTextInstance:l,hideTextInstance:l,unhideTextInstance:l,getCurrentEventPriority:()=>e?e():Af.DefaultEventPriority,beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},detachDeletedInstance:()=>{},now:typeof performance<"u"&&ir.fun(performance.now)?performance.now:ir.fun(Date.now)?Date.now:()=>0,scheduleTimeout:ir.fun(setTimeout)?setTimeout:void 0,cancelTimeout:ir.fun(clearTimeout)?clearTimeout:void 0}),applyProps:LE}}var sk,ak;const DE=t=>"colorSpace"in t||"outputColorSpace"in t,J8=()=>{var t;return(t=OR.ColorManagement)!=null?t:null},e$=t=>t&&t.isOrthographicCamera,Rce=t=>t&&t.hasOwnProperty("current"),Mh=typeof window<"u"&&((sk=window.document)!=null&&sk.createElement||((ak=window.navigator)==null?void 0:ak.product)==="ReactNative")?M.useLayoutEffect:M.useEffect;function t$(t){const e=M.useRef(t);return Mh(()=>void(e.current=t),[t]),e}function Ace({set:t}){return Mh(()=>(t(new Promise(()=>null)),()=>t(!1)),[t]),null}class n$ extends M.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}}n$.getDerivedStateFromError=()=>({error:!0});const r$="__default",lk=new Map,Dce=t=>t&&!!t.memoized&&!!t.changes;function i$(t){var e;const n=typeof window<"u"?(e=window.devicePixelRatio)!=null?e:2:1;return Array.isArray(t)?Math.min(Math.max(t[0],n),t[1]):t}const mp=t=>{var e;return(e=t.__r3f)==null?void 0:e.root.getState()},ir={obj:t=>t===Object(t)&&!ir.arr(t)&&typeof t!="function",fun:t=>typeof t=="function",str:t=>typeof t=="string",num:t=>typeof t=="number",boo:t=>typeof t=="boolean",und:t=>t===void 0,arr:t=>Array.isArray(t),equ(t,e,{arrays:n="shallow",objects:r="reference",strict:i=!0}={}){if(typeof t!=typeof e||!!t!=!!e)return!1;if(ir.str(t)||ir.num(t))return t===e;const o=ir.obj(t);if(o&&r==="reference")return t===e;const s=ir.arr(t);if(s&&n==="reference")return t===e;if((s||o)&&t===e)return!0;let a;for(a in t)if(!(a in e))return!1;if(o&&n==="shallow"&&r==="shallow"){for(a in i?e:t)if(!ir.equ(t[a],e[a],{strict:i,objects:"reference"}))return!1}else for(a in i?e:t)if(t[a]!==e[a])return!1;if(ir.und(a)){if(s&&t.length===0&&e.length===0||o&&Object.keys(t).length===0&&Object.keys(e).length===0)return!0;if(t!==e)return!1}return!0}};function Ice(t){const e={nodes:{},materials:{}};return t&&t.traverse(n=>{n.name&&(e.nodes[n.name]=n),n.material&&!e.materials[n.material.name]&&(e.materials[n.material.name]=n.material)}),e}function Lce(t){t.dispose&&t.type!=="Scene"&&t.dispose();for(const e in t)e.dispose==null||e.dispose(),delete t[e]}function ff(t,e){const n=t;return(e!=null&&e.primitive||!n.__r3f)&&(n.__r3f={type:"",root:null,previousAttach:null,memoizedProps:{},eventCount:0,handlers:{},objects:[],parent:null,...e}),t}function j2(t,e){let n=t;if(e.includes("-")){const r=e.split("-"),i=r.pop();return n=r.reduce((o,s)=>o[s],t),{target:n,key:i}}else return{target:n,key:e}}const ck=/-\d+$/;function IE(t,e,n){if(ir.str(n)){if(ck.test(n)){const o=n.replace(ck,""),{target:s,key:a}=j2(t,o);Array.isArray(s[a])||(s[a]=[])}const{target:r,key:i}=j2(t,n);e.__r3f.previousAttach=r[i],r[i]=e}else e.__r3f.previousAttach=n(t,e)}function uk(t,e,n){var r,i;if(ir.str(n)){const{target:o,key:s}=j2(t,n),a=e.__r3f.previousAttach;a===void 0?delete o[s]:o[s]=a}else(r=e.__r3f)==null||r.previousAttach==null||r.previousAttach(t,e);(i=e.__r3f)==null||delete i.previousAttach}function o$(t,{children:e,key:n,ref:r,...i},{children:o,key:s,ref:a,...l}={},c=!1){var u;const d=(u=t?.__r3f)!=null?u:{},f=Object.entries(i),h=[];if(c){const y=Object.keys(l);for(let _=0;_{var v;if((v=t.__r3f)!=null&&v.primitive&&y==="object"||ir.equ(_,l[y]))return;if(/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(y))return h.push([y,_,!0,[]]);let x=[];y.includes("-")&&(x=y.split("-")),h.push([y,_,!1,x]);for(const w in i){const S=i[w];w.startsWith(`${y}-`)&&h.push([w,S,!1,w.split("-")])}});const g={...i};return d.memoizedProps&&d.memoizedProps.args&&(g.args=d.memoizedProps.args),d.memoizedProps&&d.memoizedProps.attach&&(g.attach=d.memoizedProps.attach),{memoized:g,changes:h}}function LE(t,e){var n,r,i;const o=(n=t.__r3f)!=null?n:{},s=o.root,a=(r=s==null||s.getState==null?void 0:s.getState())!=null?r:{},{memoized:l,changes:c}=Dce(e)?e:o$(t,e),u=o.eventCount;t.__r3f&&(t.__r3f.memoizedProps=l);for(let f=0;fw[S],t),!(x&&x.set))){const[w,...S]=_.reverse();v=S.reverse().reduce((E,C)=>E[C],t),h=w}if(g===r$+"remove")if(v.constructor){let w=lk.get(v.constructor);w||(w=new v.constructor,lk.set(v.constructor,w)),g=w[h]}else g=0;if(y)g?o.handlers[h]=g:delete o.handlers[h],o.eventCount=Object.keys(o.handlers).length;else if(x&&x.set&&(x.copy||x instanceof Uu)){if(Array.isArray(g))x.fromArray?x.fromArray(g):x.set(...g);else if(x.copy&&g&&g.constructor&&x.constructor===g.constructor)x.copy(g);else if(g!==void 0){const w=x instanceof lt;!w&&x.setScalar?x.setScalar(g):x instanceof Uu&&g instanceof Uu?x.mask=g.mask:x.set(g),!J8()&&!a.linear&&w&&x.convertSRGBToLinear()}}else if(v[h]=g,v[h]instanceof qn&&v[h].format===Jn&&v[h].type===nr){const w=v[h];DE(w)&&DE(a.gl)?w.colorSpace=a.gl.outputColorSpace:w.encoding=a.gl.outputEncoding}hf(t)}if(o.parent&&a.internal&&t.raycast&&u!==o.eventCount){const f=a.internal.interaction.indexOf(t);f>-1&&a.internal.interaction.splice(f,1),o.eventCount&&a.internal.interaction.push(t)}return!(c.length===1&&c[0][0]==="onUpdate")&&c.length&&(i=t.__r3f)!=null&&i.parent&&$2(t),t}function hf(t){var e,n;const r=(e=t.__r3f)==null||(n=e.root)==null||n.getState==null?void 0:n.getState();r&&r.internal.frames===0&&r.invalidate()}function $2(t){t.onUpdate==null||t.onUpdate(t)}function s$(t,e){t.manual||(e$(t)?(t.left=e.width/-2,t.right=e.width/2,t.top=e.height/2,t.bottom=e.height/-2):t.aspect=e.width/e.height,t.updateProjectionMatrix(),t.updateMatrixWorld())}function ty(t){return(t.eventObject||t.object).uuid+"/"+t.index+t.instanceId}function kce(){var t;const e=typeof self<"u"&&self||typeof window<"u"&&window;if(!e)return Af.DefaultEventPriority;switch((t=e.event)==null?void 0:t.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return Af.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return Af.ContinuousEventPriority;default:return Af.DefaultEventPriority}}function a$(t,e,n,r){const i=n.get(e);i&&(n.delete(e),n.size===0&&(t.delete(r),i.target.releasePointerCapture(r)))}function Nce(t,e){const{internal:n}=t.getState();n.interaction=n.interaction.filter(r=>r!==e),n.initialHits=n.initialHits.filter(r=>r!==e),n.hovered.forEach((r,i)=>{(r.eventObject===e||r.object===e)&&n.hovered.delete(i)}),n.capturedMap.forEach((r,i)=>{a$(n.capturedMap,e,r,i)})}function Fce(t){function e(l){const{internal:c}=t.getState(),u=l.offsetX-c.initialClick[0],d=l.offsetY-c.initialClick[1];return Math.round(Math.sqrt(u*u+d*d))}function n(l){return l.filter(c=>["Move","Over","Enter","Out","Leave"].some(u=>{var d;return(d=c.__r3f)==null?void 0:d.handlers["onPointer"+u]}))}function r(l,c){const u=t.getState(),d=new Set,f=[],h=c?c(u.internal.interaction):u.internal.interaction;for(let v=0;v{const w=mp(v.object),S=mp(x.object);return!w||!S?v.distance-x.distance:S.events.priority-w.events.priority||v.distance-x.distance}).filter(v=>{const x=ty(v);return d.has(x)?!1:(d.add(x),!0)});u.events.filter&&(y=u.events.filter(y,u));for(const v of y){let x=v.object;for(;x;){var _;(_=x.__r3f)!=null&&_.eventCount&&f.push({...v,eventObject:x}),x=x.parent}}if("pointerId"in l&&u.internal.capturedMap.has(l.pointerId))for(let v of u.internal.capturedMap.get(l.pointerId).values())d.has(ty(v.intersection))||f.push(v.intersection);return f}function i(l,c,u,d){const f=t.getState();if(l.length){const h={stopped:!1};for(const g of l){const y=mp(g.object)||f,{raycaster:_,pointer:v,camera:x,internal:w}=y,S=new Z(v.x,v.y,0).unproject(x),E=A=>{var F,N;return(F=(N=w.capturedMap.get(A))==null?void 0:N.has(g.eventObject))!=null?F:!1},C=A=>{const F={intersection:g,target:c.target};w.capturedMap.has(A)?w.capturedMap.get(A).set(g.eventObject,F):w.capturedMap.set(A,new Map([[g.eventObject,F]])),c.target.setPointerCapture(A)},O=A=>{const F=w.capturedMap.get(A);F&&a$(w.capturedMap,g.eventObject,F,A)};let R={};for(let A in c){let F=c[A];typeof F!="function"&&(R[A]=F)}let T={...g,...R,pointer:v,intersections:l,stopped:h.stopped,delta:u,unprojectedPoint:S,ray:_.ray,camera:x,stopPropagation(){const A="pointerId"in c&&w.capturedMap.get(c.pointerId);if((!A||A.has(g.eventObject))&&(T.stopped=h.stopped=!0,w.hovered.size&&Array.from(w.hovered.values()).find(F=>F.eventObject===g.eventObject))){const F=l.slice(0,l.indexOf(g));o([...F,g])}},target:{hasPointerCapture:E,setPointerCapture:C,releasePointerCapture:O},currentTarget:{hasPointerCapture:E,setPointerCapture:C,releasePointerCapture:O},nativeEvent:c};if(d(T),h.stopped===!0)break}}return l}function o(l){const{internal:c}=t.getState();for(const u of c.hovered.values())if(!l.length||!l.find(d=>d.object===u.object&&d.index===u.index&&d.instanceId===u.instanceId)){const f=u.eventObject.__r3f,h=f?.handlers;if(c.hovered.delete(ty(u)),f!=null&&f.eventCount){const g={...u,intersections:l};h.onPointerOut==null||h.onPointerOut(g),h.onPointerLeave==null||h.onPointerLeave(g)}}}function s(l,c){for(let u=0;uo([]);case"onLostPointerCapture":return c=>{const{internal:u}=t.getState();"pointerId"in c&&u.capturedMap.has(c.pointerId)&&requestAnimationFrame(()=>{u.capturedMap.has(c.pointerId)&&(u.capturedMap.delete(c.pointerId),o([]))})}}return function(u){const{onPointerMissed:d,internal:f}=t.getState();f.lastEvent.current=u;const h=l==="onPointerMove",g=l==="onClick"||l==="onContextMenu"||l==="onDoubleClick",_=r(u,h?n:void 0),v=g?e(u):0;l==="onPointerDown"&&(f.initialClick=[u.offsetX,u.offsetY],f.initialHits=_.map(w=>w.eventObject)),g&&!_.length&&v<=2&&(s(u,f.interaction),d&&d(u)),h&&o(_);function x(w){const S=w.eventObject,E=S.__r3f,C=E?.handlers;if(E!=null&&E.eventCount)if(h){if(C.onPointerOver||C.onPointerEnter||C.onPointerOut||C.onPointerLeave){const O=ty(w),R=f.hovered.get(O);R?R.stopped&&w.stopPropagation():(f.hovered.set(O,w),C.onPointerOver==null||C.onPointerOver(w),C.onPointerEnter==null||C.onPointerEnter(w))}C.onPointerMove==null||C.onPointerMove(w)}else{const O=C[l];O?(!g||f.initialHits.includes(S))&&(s(u,f.interaction.filter(R=>!f.initialHits.includes(R))),O(w)):g&&f.initialHits.includes(S)&&s(u,f.interaction.filter(R=>!f.initialHits.includes(R)))}}i(_,u,v,x)}}return{handlePointer:a}}const zce=["set","get","setSize","setFrameloop","setDpr","events","invalidate","advance","size","viewport"],l$=t=>!!(t!=null&&t.render),RR=M.createContext(null),Uce=(t,e)=>{const n=Y8((a,l)=>{const c=new Z,u=new Z,d=new Z;function f(v=l().camera,x=u,w=l().size){const{width:S,height:E,top:C,left:O}=w,R=S/E;x instanceof Z?d.copy(x):d.set(...x);const T=v.getWorldPosition(c).distanceTo(d);if(e$(v))return{width:S/v.zoom,height:E/v.zoom,top:C,left:O,factor:1,distance:T,aspect:R};{const A=v.fov*Math.PI/180,F=2*Math.tan(A/2)*T,N=F*(S/E);return{width:N,height:F,top:C,left:O,factor:S/N,distance:T,aspect:R}}}let h;const g=v=>a(x=>({performance:{...x.performance,current:v}})),y=new Ee;return{set:a,get:l,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},xr:null,scene:null,invalidate:(v=1)=>t(l(),v),advance:(v,x)=>e(v,x,l()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new ER,pointer:y,mouse:y,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const v=l();h&&clearTimeout(h),v.performance.current!==v.performance.min&&g(v.performance.min),h=setTimeout(()=>g(l().performance.max),v.performance.debounce)}},size:{width:0,height:0,top:0,left:0,updateStyle:!1},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:f},setEvents:v=>a(x=>({...x,events:{...x.events,...v}})),setSize:(v,x,w,S,E)=>{const C=l().camera,O={width:v,height:x,top:S||0,left:E||0,updateStyle:w};a(R=>({size:O,viewport:{...R.viewport,...f(C,u,O)}}))},setDpr:v=>a(x=>{const w=i$(v);return{viewport:{...x.viewport,dpr:w,initialDpr:x.viewport.initialDpr||w}}}),setFrameloop:(v="always")=>{const x=l().clock;x.stop(),x.elapsedTime=0,v!=="never"&&(x.start(),x.elapsedTime=0),a(()=>({frameloop:v}))},previousRoot:void 0,internal:{active:!1,priority:0,frames:0,lastEvent:M.createRef(),interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,subscribe:(v,x,w)=>{const S=l().internal;return S.priority=S.priority+(x>0?1:0),S.subscribers.push({ref:v,priority:x,store:w}),S.subscribers=S.subscribers.sort((E,C)=>E.priority-C.priority),()=>{const E=l().internal;E!=null&&E.subscribers&&(E.priority=E.priority-(x>0?1:0),E.subscribers=E.subscribers.filter(C=>C.ref!==v))}}}}}),r=n.getState();let i=r.size,o=r.viewport.dpr,s=r.camera;return n.subscribe(()=>{const{camera:a,size:l,viewport:c,gl:u,set:d}=n.getState();if(l!==i||c.dpr!==o){var f;i=l,o=c.dpr,s$(a,l),u.setPixelRatio(c.dpr);const h=(f=l.updateStyle)!=null?f:typeof HTMLCanvasElement<"u"&&u.domElement instanceof HTMLCanvasElement;u.setSize(l.width,l.height,h)}a!==s&&(s=a,d(h=>({viewport:{...h.viewport,...h.viewport.getCurrentViewport(a)}})))}),n.subscribe(a=>t(a)),n};function c$(t,e){const n={callback:t};return e.add(n),()=>void e.delete(n)}let ny,u$=new Set,d$=new Set,Bce=new Set;const Hce=t=>c$(t,u$),Vce=t=>c$(t,d$);function kE(t,e){if(t.size)for(const{callback:n}of t.values())n(e)}function gp(t,e){switch(t){case"before":return kE(u$,e);case"after":return kE(d$,e);case"tail":return kE(Bce,e)}}let NE,FE;function zE(t,e,n){let r=e.clock.getDelta();for(e.frameloop==="never"&&typeof t=="number"&&(r=t-e.clock.elapsedTime,e.clock.oldTime=e.clock.elapsedTime,e.clock.elapsedTime=t),NE=e.internal.subscribers,ny=0;ny0)&&!((c=i.gl.xr)!=null&&c.isPresenting)&&(n+=zE(l,i))}if(gp("after",l),n===0)return gp("tail",l),e=!1,cancelAnimationFrame(r)}function s(l,c=1){var u;if(!l)return t.forEach(d=>s(d.store.getState()),c);(u=l.gl.xr)!=null&&u.isPresenting||!l.internal.active||l.frameloop==="never"||(l.internal.frames=Math.min(60,l.internal.frames+c),e||(e=!0,requestAnimationFrame(o)))}function a(l,c=!0,u,d){if(c&&gp("before",l),u)zE(l,u,d);else for(const f of t.values())zE(l,f.store.getState());c&&gp("after",l)}return{loop:o,invalidate:s,advance:a}}function $ce(t){const e=M.useRef(null);return Mh(()=>void(e.current=t.current.__r3f),[t]),e}function AR(){const t=M.useContext(RR);if(!t)throw new Error("R3F: Hooks can only be used within the Canvas component!");return t}function dn(t=n=>n,e){return AR()(t,e)}function kc(t,e=0){const n=AR(),r=n.getState().internal.subscribe,i=t$(t);return Mh(()=>r(i,e,n),[e,r,n]),null}function f$(t,e){return function(n,...r){const i=new n;return t&&t(i),Promise.all(r.map(o=>new Promise((s,a)=>i.load(o,l=>{l.scene&&Object.assign(l,Ice(l.scene)),s(l)},e,l=>a(new Error(`Could not load ${o}: ${l.message})`))))))}}function NS(t,e,n,r){const i=Array.isArray(e)?e:[e],o=Pce(f$(n,r),[t,...i],{equal:ir.equ});return Array.isArray(e)?o:o[0]}NS.preload=function(t,e,n){const r=Array.isArray(e)?e:[e];return Cce(f$(n),[t,...r])};NS.clear=function(t,e){const n=Array.isArray(e)?e:[e];return Tce([t,...n])};const ih=new Map,{invalidate:dk,advance:fk}=jce(ih),{reconciler:lg,applyProps:hu}=Oce(ih,kce),Xd={objects:"shallow",strict:!1},Gce=(t,e)=>{const n=typeof t=="function"?t(e):t;return l$(n)?n:new iR({powerPreference:"high-performance",canvas:e,antialias:!0,alpha:!0,...t})};function Wce(t,e){if(e)return e;if(typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement&&t.parentElement){const{width:n,height:r,top:i,left:o}=t.parentElement.getBoundingClientRect();return{width:n,height:r,top:i,left:o}}else if(typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas)return{width:t.width,height:t.height,top:0,left:0};return{width:0,height:0,top:0,left:0}}function Yce(t){const e=ih.get(t),n=e?.fiber,r=e?.store;e&&console.warn("R3F.createRoot should only be called once!");const i=typeof reportError=="function"?reportError:console.error,o=r||Uce(dk,fk),s=n||lg.createContainer(o,Af.ConcurrentRoot,null,!1,null,"",i,null);e||ih.set(t,{fiber:s,store:o});let a,l=!1,c;return{configure(u={}){let{gl:d,size:f,scene:h,events:g,onCreated:y,shadows:_=!1,linear:v=!1,flat:x=!1,legacy:w=!1,orthographic:S=!1,frameloop:E="always",dpr:C=[1,2],performance:O,raycaster:R,camera:T,onPointerMissed:A}=u,F=o.getState(),N=F.gl;F.gl||F.set({gl:N=Gce(d,t)});let U=F.raycaster;U||F.set({raycaster:U=new LS});const{params:k,...z}=R||{};if(ir.equ(z,U,Xd)||hu(U,{...z}),ir.equ(k,U.params,Xd)||hu(U,{params:{...U.params,...k}}),!F.camera||F.camera===c&&!ir.equ(c,T,Xd)){c=T;const q=T instanceof vh,K=q?T:S?new Ic(0,0,0,0,.1,1e3):new or(75,0,.1,1e3);q||(K.position.z=5,T&&hu(K,T),!F.camera&&!(T!=null&&T.rotation)&&K.lookAt(0,0,0)),F.set({camera:K})}if(!F.scene){let q;h instanceof Sc?q=h:(q=new Sc,h&&hu(q,h)),F.set({scene:ff(q)})}if(!F.xr){const q=(J,le)=>{const ae=o.getState();ae.frameloop!=="never"&&fk(J,!0,ae,le)},K=()=>{const J=o.getState();J.gl.xr.enabled=J.gl.xr.isPresenting,J.gl.xr.setAnimationLoop(J.gl.xr.isPresenting?q:null),J.gl.xr.isPresenting||dk(J)},re={connect(){const J=o.getState().gl;J.xr.addEventListener("sessionstart",K),J.xr.addEventListener("sessionend",K)},disconnect(){const J=o.getState().gl;J.xr.removeEventListener("sessionstart",K),J.xr.removeEventListener("sessionend",K)}};N.xr&&re.connect(),F.set({xr:re})}if(N.shadowMap){const q=N.shadowMap.enabled,K=N.shadowMap.type;if(N.shadowMap.enabled=!!_,ir.boo(_))N.shadowMap.type=um;else if(ir.str(_)){var G;const re={basic:rj,percentage:hS,soft:um,variance:bu};N.shadowMap.type=(G=re[_])!=null?G:um}else ir.obj(_)&&Object.assign(N.shadowMap,_);(q!==N.shadowMap.enabled||K!==N.shadowMap.type)&&(N.shadowMap.needsUpdate=!0)}const W=J8();W&&("enabled"in W?W.enabled=!w:"legacyMode"in W&&(W.legacyMode=w)),hu(N,{outputEncoding:v?3e3:3001,toneMapping:x?ks:GO}),F.legacy!==w&&F.set(()=>({legacy:w})),F.linear!==v&&F.set(()=>({linear:v})),F.flat!==x&&F.set(()=>({flat:x})),d&&!ir.fun(d)&&!l$(d)&&!ir.equ(d,N,Xd)&&hu(N,d),g&&!F.events.handlers&&F.set({events:g(o)});const $=Wce(t,f);return ir.equ($,F.size,Xd)||F.setSize($.width,$.height,$.updateStyle,$.top,$.left),C&&F.viewport.dpr!==i$(C)&&F.setDpr(C),F.frameloop!==E&&F.setFrameloop(E),F.onPointerMissed||F.set({onPointerMissed:A}),O&&!ir.equ(O,F.performance,Xd)&&F.set(q=>({performance:{...q.performance,...O}})),a=y,l=!0,this},render(u){return l||this.configure(),lg.updateContainer(M.createElement(Xce,{store:o,children:u,onCreated:a,rootElement:t}),s,null,()=>{}),o},unmount(){h$(t)}}}function Xce({store:t,children:e,onCreated:n,rootElement:r}){return Mh(()=>{const i=t.getState();i.set(o=>({internal:{...o.internal,active:!0}})),n&&n(i),t.getState().events.connected||i.events.connect==null||i.events.connect(r)},[]),M.createElement(RR.Provider,{value:t},e)}function h$(t,e){const n=ih.get(t),r=n?.fiber;if(r){const i=n?.store.getState();i&&(i.internal.active=!1),lg.updateContainer(null,r,null,()=>{i&&setTimeout(()=>{try{var o,s,a,l;i.events.disconnect==null||i.events.disconnect(),(o=i.gl)==null||(s=o.renderLists)==null||s.dispose==null||s.dispose(),(a=i.gl)==null||a.forceContextLoss==null||a.forceContextLoss(),(l=i.gl)!=null&&l.xr&&i.xr.disconnect(),Lce(i),ih.delete(t),e&&e(t)}catch{}},500)})}}function DR(t,e,n){return M.createElement(Zce,{key:e.uuid,children:t,container:e,state:n})}function Zce({state:t={},children:e,container:n}){const{events:r,size:i,...o}=t,s=AR(),[a]=M.useState(()=>new LS),[l]=M.useState(()=>new Ee),c=M.useCallback((d,f)=>{const h={...d};Object.keys(d).forEach(y=>{(zce.includes(y)||d[y]!==f[y]&&f[y])&&delete h[y]});let g;if(f&&i){const y=f.camera;g=d.viewport.getCurrentViewport(y,new Z,i),y!==d.camera&&s$(y,i)}return{...h,scene:n,raycaster:a,pointer:l,mouse:l,previousRoot:s,events:{...d.events,...f?.events,...r},size:{...d.size,...i},viewport:{...d.viewport,...g},...o}},[t]),[u]=M.useState(()=>{const d=s.getState();return Y8((h,g)=>({...d,scene:n,raycaster:a,pointer:l,mouse:l,previousRoot:s,events:{...d.events,...r},size:{...d.size,...i},...o,set:h,get:g,setEvents:y=>h(_=>({..._,events:{..._.events,...y}}))}))});return M.useEffect(()=>{const d=s.subscribe(f=>u.setState(h=>c(f,h)));return()=>{d(),u.destroy()}},[]),M.useEffect(()=>{u.setState(d=>c(s.getState(),d))},[c]),M.createElement(M.Fragment,null,lg.createPortal(M.createElement(RR.Provider,{value:u},e),u,null))}lg.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:M.version});function G2(t,e,n){var r,i,o,s,a;e==null&&(e=100);function l(){var u=Date.now()-s;u=0?r=setTimeout(l,e-u):(r=null,n||(a=t.apply(o,i),o=i=null))}var c=function(){o=this,i=arguments,s=Date.now();var u=n&&!r;return r||(r=setTimeout(l,e)),u&&(a=t.apply(o,i),o=i=null),a};return c.clear=function(){r&&(clearTimeout(r),r=null)},c.flush=function(){r&&(a=t.apply(o,i),o=i=null,clearTimeout(r),r=null)},c}G2.debounce=G2;var qce=G2;const hk=Tc(qce);function Kce(t){let{debounce:e,scroll:n,polyfill:r,offsetSize:i}=t===void 0?{debounce:0,scroll:!1,offsetSize:!1}:t;const o=r||(typeof window>"u"?class{}:window.ResizeObserver);if(!o)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[s,a]=M.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=M.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:s}),c=e?typeof e=="number"?e:e.scroll:null,u=e?typeof e=="number"?e:e.resize:null,d=M.useRef(!1);M.useEffect(()=>(d.current=!0,()=>void(d.current=!1)));const[f,h,g]=M.useMemo(()=>{const x=()=>{if(!l.current.element)return;const{left:w,top:S,width:E,height:C,bottom:O,right:R,x:T,y:A}=l.current.element.getBoundingClientRect(),F={left:w,top:S,width:E,height:C,bottom:O,right:R,x:T,y:A};l.current.element instanceof HTMLElement&&i&&(F.height=l.current.element.offsetHeight,F.width=l.current.element.offsetWidth),Object.freeze(F),d.current&&!tue(l.current.lastBounds,F)&&a(l.current.lastBounds=F)};return[x,u?hk(x,u):x,c?hk(x,c):x]},[a,i,c,u]);function y(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(x=>x.removeEventListener("scroll",g,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null)}function _(){l.current.element&&(l.current.resizeObserver=new o(g),l.current.resizeObserver.observe(l.current.element),n&&l.current.scrollContainers&&l.current.scrollContainers.forEach(x=>x.addEventListener("scroll",g,{capture:!0,passive:!0})))}const v=x=>{!x||x===l.current.element||(y(),l.current.element=x,l.current.scrollContainers=p$(x),_())};return Jce(g,!!n),Qce(h),M.useEffect(()=>{y(),_()},[n,g,h]),M.useEffect(()=>y,[]),[v,s,f]}function Qce(t){M.useEffect(()=>{const e=t;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[t])}function Jce(t,e){M.useEffect(()=>{if(e){const n=t;return window.addEventListener("scroll",n,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",n,!0)}},[t,e])}function p$(t){const e=[];if(!t||t===document.body)return e;const{overflow:n,overflowX:r,overflowY:i}=window.getComputedStyle(t);return[n,r,i].some(o=>o==="auto"||o==="scroll")&&e.push(t),[...e,...p$(t.parentElement)]}const eue=["x","y","top","bottom","left","right","width","height"],tue=(t,e)=>eue.every(n=>t[n]===e[n]);var nue=Object.defineProperty,rue=Object.defineProperties,iue=Object.getOwnPropertyDescriptors,pk=Object.getOwnPropertySymbols,oue=Object.prototype.hasOwnProperty,sue=Object.prototype.propertyIsEnumerable,mk=(t,e,n)=>e in t?nue(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,gk=(t,e)=>{for(var n in e||(e={}))oue.call(e,n)&&mk(t,n,e[n]);if(pk)for(var n of pk(e))sue.call(e,n)&&mk(t,n,e[n]);return t},aue=(t,e)=>rue(t,iue(e));function m$(t,e,n){if(!t)return;if(n(t)===!0)return t;let r=e?t.return:t.child;for(;r;){const i=m$(r,e,n);if(i)return i;r=e?null:r.sibling}}function g$(t){try{return Object.defineProperties(t,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return t}}const IR=g$(M.createContext(null));class v$ extends M.Component{render(){return M.createElement(IR.Provider,{value:this._reactInternals},this.props.children)}}const{ReactCurrentOwner:vk,ReactCurrentDispatcher:yk}=M.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function lue(){const t=M.useContext(IR);if(t===null)throw new Error("its-fine: useFiber must be called within a !");const e=M.useId();return M.useMemo(()=>{for(const r of[vk?.current,t,t?.alternate]){if(!r)continue;const i=m$(r,!1,o=>{let s=o.memoizedState;for(;s;){if(s.memoizedState===e)return!0;s=s.next}});if(i)return i}},[t,e])}function cue(){var t,e;const n=lue(),[r]=M.useState(()=>new Map);r.clear();let i=n;for(;i;){const o=(t=i.type)==null?void 0:t._context;o&&o!==IR&&!r.has(o)&&r.set(o,(e=yk?.current)==null?void 0:e.readContext(g$(o))),i=i.return}return r}function uue(){const t=cue();return M.useMemo(()=>Array.from(t.keys()).reduce((e,n)=>r=>M.createElement(e,null,M.createElement(n.Provider,aue(gk({},r),{value:t.get(n)}))),e=>M.createElement(v$,gk({},e))),[t])}const UE={onClick:["click",!1],onContextMenu:["contextmenu",!1],onDoubleClick:["dblclick",!1],onWheel:["wheel",!0],onPointerDown:["pointerdown",!0],onPointerUp:["pointerup",!0],onPointerLeave:["pointerleave",!0],onPointerMove:["pointermove",!0],onPointerCancel:["pointercancel",!0],onLostPointerCapture:["lostpointercapture",!0]};function due(t){const{handlePointer:e}=Fce(t);return{priority:1,enabled:!0,compute(n,r,i){r.pointer.set(n.offsetX/r.size.width*2-1,-(n.offsetY/r.size.height)*2+1),r.raycaster.setFromCamera(r.pointer,r.camera)},connected:void 0,handlers:Object.keys(UE).reduce((n,r)=>({...n,[r]:e(r)}),{}),update:()=>{var n;const{events:r,internal:i}=t.getState();(n=i.lastEvent)!=null&&n.current&&r.handlers&&r.handlers.onPointerMove(i.lastEvent.current)},connect:n=>{var r;const{set:i,events:o}=t.getState();o.disconnect==null||o.disconnect(),i(s=>({events:{...s.events,connected:n}})),Object.entries((r=o.handlers)!=null?r:[]).forEach(([s,a])=>{const[l,c]=UE[s];n.addEventListener(l,a,{passive:c})})},disconnect:()=>{const{set:n,events:r}=t.getState();if(r.connected){var i;Object.entries((i=r.handlers)!=null?i:[]).forEach(([o,s])=>{if(r&&r.connected instanceof HTMLElement){const[a]=UE[o];r.connected.removeEventListener(a,s)}}),n(o=>({events:{...o.events,connected:void 0}}))}}}}const fue=M.forwardRef(function({children:e,fallback:n,resize:r,style:i,gl:o,events:s=due,eventSource:a,eventPrefix:l,shadows:c,linear:u,flat:d,legacy:f,orthographic:h,frameloop:g,dpr:y,performance:_,raycaster:v,camera:x,onPointerMissed:w,onCreated:S,...E},C){M.useMemo(()=>kS(_ce),[]);const O=uue(),[R,T]=Kce({scroll:!0,debounce:{scroll:50,resize:0},...r}),A=M.useRef(null),F=M.useRef(null);M.useImperativeHandle(C,()=>A.current);const N=t$(w),[U,k]=M.useState(!1),[z,G]=M.useState(!1);if(U)throw U;if(z)throw z;const W=M.useRef(null);Mh(()=>{const j=A.current;T.width>0&&T.height>0&&j&&(W.current||(W.current=Yce(j)),W.current.configure({gl:o,events:s,shadows:c,linear:u,flat:d,legacy:f,orthographic:h,frameloop:g,dpr:y,performance:_,raycaster:v,camera:x,size:T,onPointerMissed:(...$)=>N.current==null?void 0:N.current(...$),onCreated:$=>{$.events.connect==null||$.events.connect(a?Rce(a)?a.current:a:F.current),l&&$.setEvents({compute:(q,K)=>{const re=q[l+"X"],J=q[l+"Y"];K.pointer.set(re/K.size.width*2-1,-(J/K.size.height)*2+1),K.raycaster.setFromCamera(K.pointer,K.camera)}}),S?.($)}}),W.current.render(M.createElement(O,null,M.createElement(n$,{set:G},M.createElement(M.Suspense,{fallback:M.createElement(Ace,{set:k})},e)))))}),M.useEffect(()=>{const j=A.current;if(j)return()=>h$(j)},[]);const B=a?"none":"auto";return M.createElement("div",yn({ref:F,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:B,...i}},E),M.createElement("div",{ref:R,style:{width:"100%",height:"100%"}},M.createElement("canvas",{ref:A,style:{display:"block"}},n)))}),hue=M.forwardRef(function(e,n){return M.createElement(v$,null,M.createElement(fue,yn({},e,{ref:n})))}),Bg=new Z,LR=new Z,pue=new Z;function mue(t,e,n){const r=Bg.setFromMatrixPosition(t.matrixWorld);r.project(e);const i=n.width/2,o=n.height/2;return[r.x*i+i,-(r.y*o)+o]}function gue(t,e){const n=Bg.setFromMatrixPosition(t.matrixWorld),r=LR.setFromMatrixPosition(e.matrixWorld),i=n.sub(r),o=e.getWorldDirection(pue);return i.angleTo(o)>Math.PI/2}function vue(t,e,n,r){const i=Bg.setFromMatrixPosition(t.matrixWorld),o=i.clone();o.project(e),n.setFromCamera(o,e);const s=n.intersectObjects(r,!0);if(s.length){const a=s[0].distance;return i.distanceTo(n.ray.origin)Math.abs(t)<1e-10?0:t;function y$(t,e,n=""){let r="matrix3d(";for(let i=0;i!==16;i++)r+=W2(e[i]*t.elements[i])+(i!==15?",":")");return n+r}const xue=(t=>e=>y$(e,t))([1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1]),wue=(t=>(e,n)=>y$(e,t(n),"translate(-50%,-50%)"))(t=>[1/t,1/t,1/t,1,-1/t,-1/t,-1/t,-1,1/t,1/t,1/t,1,1,1,1,1]);function Sue(t){return t&&typeof t=="object"&&"current"in t}const Hg=M.forwardRef(({children:t,eps:e=.001,style:n,className:r,prepend:i,center:o,fullscreen:s,portal:a,distanceFactor:l,sprite:c=!1,transform:u=!1,occlude:d,onOcclude:f,castShadow:h,receiveShadow:g,material:y,geometry:_,zIndexRange:v=[16777271,0],calculatePosition:x=mue,as:w="div",wrapperClass:S,pointerEvents:E="auto",...C},O)=>{const{gl:R,camera:T,scene:A,size:F,raycaster:N,events:U,viewport:k}=dn(),[z]=M.useState(()=>document.createElement(w)),G=M.useRef(),W=M.useRef(null),B=M.useRef(0),j=M.useRef([0,0]),$=M.useRef(null),q=M.useRef(null),K=a?.current||U.connected||R.domElement.parentNode,re=M.useRef(null),J=M.useRef(!1),le=M.useMemo(()=>d&&d!=="blending"||Array.isArray(d)&&d.length&&Sue(d[0]),[d]);M.useLayoutEffect(()=>{const ve=R.domElement;d&&d==="blending"?(ve.style.zIndex=`${Math.floor(v[0]/2)}`,ve.style.position="absolute",ve.style.pointerEvents="none"):(ve.style.zIndex=null,ve.style.position=null,ve.style.pointerEvents=null)},[d]),M.useLayoutEffect(()=>{if(W.current){const ve=G.current=ej(z);if(A.updateMatrixWorld(),u)z.style.cssText="position:absolute;top:0;left:0;pointer-events:none;overflow:hidden;";else{const we=x(W.current,T,F);z.style.cssText=`position:absolute;top:0;left:0;transform:translate3d(${we[0]}px,${we[1]}px,0);transform-origin:0 0;`}return K&&(i?K.prepend(z):K.appendChild(z)),()=>{K&&K.removeChild(z),ve.unmount()}}},[K,u]),M.useLayoutEffect(()=>{S&&(z.className=S)},[S]);const ae=M.useMemo(()=>u?{position:"absolute",top:0,left:0,width:F.width,height:F.height,transformStyle:"preserve-3d",pointerEvents:"none"}:{position:"absolute",transform:o?"translate3d(-50%,-50%,0)":"none",...s&&{top:-F.height/2,left:-F.width/2,width:F.width,height:F.height},...n},[n,o,s,F,u]),oe=M.useMemo(()=>({position:"absolute",pointerEvents:E}),[E]);M.useLayoutEffect(()=>{if(J.current=!1,u){var ve;(ve=G.current)==null||ve.render(M.createElement("div",{ref:$,style:ae},M.createElement("div",{ref:q,style:oe},M.createElement("div",{ref:O,className:r,style:n,children:t}))))}else{var we;(we=G.current)==null||we.render(M.createElement("div",{ref:O,style:ae,className:r,children:t}))}});const De=M.useRef(!0);kc(ve=>{if(W.current){T.updateMatrixWorld(),W.current.updateWorldMatrix(!0,!1);const we=u?j.current:x(W.current,T,F);if(u||Math.abs(B.current-T.zoom)>e||Math.abs(j.current[0]-we[0])>e||Math.abs(j.current[1]-we[1])>e){const me=gue(W.current,T);let se=!1;le&&(d!=="blending"?se=[A]:Array.isArray(d)&&(se=d.map(Ze=>Ze.current)));const de=De.current;if(se){const Ze=vue(W.current,T,N,se);De.current=Ze&&!me}else De.current=!me;de!==De.current&&(f?f(!De.current):z.style.display=De.current?"block":"none");const ke=Math.floor(v[0]/2),Ve=d?le?[v[0],ke]:[ke-1,0]:v;if(z.style.zIndex=`${_ue(W.current,T,Ve)}`,u){const[Ze,ot]=[F.width/2,F.height/2],dt=T.projectionMatrix.elements[5]*ot,{isOrthographicCamera:We,top:ht,left:ee,bottom:Q,right:Pe}=T,$e=xue(T.matrixWorldInverse),Ge=We?`scale(${dt})translate(${W2(-(Pe+ee)/2)}px,${W2((ht+Q)/2)}px)`:`translateZ(${dt}px)`;let Ke=W.current.matrixWorld;c&&(Ke=T.matrixWorldInverse.clone().transpose().copyPosition(Ke).scale(W.current.scale),Ke.elements[3]=Ke.elements[7]=Ke.elements[11]=0,Ke.elements[15]=1),z.style.width=F.width+"px",z.style.height=F.height+"px",z.style.perspective=We?"":`${dt}px`,$.current&&q.current&&($.current.style.transform=`${Ge}${$e}translate(${Ze}px,${ot}px)`,q.current.style.transform=wue(Ke,1/((l||10)/400)))}else{const Ze=l===void 0?1:yue(W.current,T)*l;z.style.transform=`translate3d(${we[0]}px,${we[1]}px,0) scale(${Ze})`}j.current=we,B.current=T.zoom}}if(!le&&re.current&&!J.current)if(u){if($.current){const we=$.current.children[0];if(we!=null&&we.clientWidth&&we!=null&&we.clientHeight){const{isOrthographicCamera:me}=T;if(me||_)C.scale&&(Array.isArray(C.scale)?C.scale instanceof Z?re.current.scale.copy(C.scale.clone().divideScalar(1)):re.current.scale.set(1/C.scale[0],1/C.scale[1],1/C.scale[2]):re.current.scale.setScalar(1/C.scale));else{const se=(l||10)/400,de=we.clientWidth*se,ke=we.clientHeight*se;re.current.scale.set(de,ke,1)}J.current=!0}}}else{const we=z.children[0];if(we!=null&&we.clientWidth&&we!=null&&we.clientHeight){const me=1/k.factor,se=we.clientWidth*me,de=we.clientHeight*me;re.current.scale.set(se,de,1),J.current=!0}re.current.lookAt(ve.camera.position)}});const Te=M.useMemo(()=>({vertexShader:u?void 0:` /* This shader is from the THREE's SpriteMaterial. We need to turn the backing plane into a Sprite - (make it always face the camera) if "transfrom" - is false. + (make it always face the camera) if "transfrom" + is false. */ #include void main() { vec2 center = vec2(0., 1.); float rotation = 0.0; - + // This is somewhat arbitrary, but it seems to work well // Need to figure out how to derive this dynamically if it even matters float size = 0.03; @@ -3523,13 +3523,13 @@ No matching component was found for: void main() { gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); } - `}),[u]);return M.createElement("group",yn({},C,{ref:W}),d&&!le&&M.createElement("mesh",{castShadow:h,receiveShadow:g,ref:re},_||M.createElement("planeGeometry",null),y||M.createElement("shaderMaterial",{side:Hr,vertexShader:Te.vertexShader,fragmentShader:Te.fragmentShader})))});function Sue(t,e="pointer",n="auto"){M.useEffect(()=>{if(t)return document.body.style.cursor=e,()=>void(document.body.style.cursor=n)},[t])}function y$(t){return function(e){t.forEach(function(n){typeof n=="function"?n(e):n!=null&&(n.current=e)})}}let vp;function bue(){var t;if(vp!==void 0)return vp;try{let e;const n=document.createElement("canvas");return vp=!!(window.WebGL2RenderingContext&&(e=n.getContext("webgl2"))),e&&((t=e.getExtension("WEBGL_lose_context"))==null||t.loseContext()),vp}catch{return vp=!1}}var ns=Uint8Array,Ql=Uint16Array,W2=Uint32Array,_$=new ns([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),x$=new ns([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Mue=new ns([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),w$=function(t,e){for(var n=new Ql(31),r=0;r<31;++r)n[r]=e+=1<>>1|(sr&21845)<<1;zl=(zl&52428)>>>2|(zl&13107)<<2,zl=(zl&61680)>>>4|(zl&3855)<<4,Y2[sr]=((zl&65280)>>>8|(zl&255)<<8)>>>1}var gm=function(t,e,n){for(var r=t.length,i=0,o=new Ql(e);i>>l]=c}else for(a=new Ql(r),i=0;i>>15-t[i]);return a},Vg=new ns(288);for(var sr=0;sr<144;++sr)Vg[sr]=8;for(var sr=144;sr<256;++sr)Vg[sr]=9;for(var sr=256;sr<280;++sr)Vg[sr]=7;for(var sr=280;sr<288;++sr)Vg[sr]=8;var M$=new ns(32);for(var sr=0;sr<32;++sr)M$[sr]=5;var Tue=gm(Vg,9,1),Oue=gm(M$,5,1),BE=function(t){for(var e=t[0],n=1;ne&&(e=t[n]);return e},ws=function(t,e,n){var r=e/8|0;return(t[r]|t[r+1]<<8)>>(e&7)&n},HE=function(t,e){var n=e/8|0;return(t[n]|t[n+1]<<8|t[n+2]<<16)>>(e&7)},Rue=function(t){return(t/8|0)+(t&7&&1)},Aue=function(t,e,n){(e==null||e<0)&&(e=0),(n==null||n>t.length)&&(n=t.length);var r=new(t instanceof Ql?Ql:t instanceof W2?W2:ns)(n-e);return r.set(t.subarray(e,n)),r},Due=function(t,e,n){var r=t.length;if(!r||n&&!n.l&&r<5)return e||new ns(0);var i=!e||n,o=!n||n.i;n||(n={}),e||(e=new ns(r*3));var s=function(ae){var oe=e.length;if(ae>oe){var De=new ns(Math.max(oe*2,ae));De.set(e),e=De}},a=n.f||0,l=n.p||0,c=n.b||0,u=n.l,d=n.d,f=n.m,h=n.n,g=r*8;do{if(!u){n.f=a=ws(t,l,1);var y=ws(t,l+1,3);if(l+=3,y)if(y==1)u=Tue,d=Oue,f=9,h=5;else if(y==2){var w=ws(t,l,31)+257,S=ws(t,l+10,15)+4,E=w+ws(t,l+5,31)+1;l+=14;for(var C=new ns(E),O=new ns(19),R=0;R>>4;if(_<16)C[R++]=_;else{var U=0,k=0;for(_==16?(k=3+ws(t,l,3),l+=2,U=C[R-1]):_==17?(k=3+ws(t,l,7),l+=3):_==18&&(k=11+ws(t,l,127),l+=7);k--;)C[R++]=U}}var z=C.subarray(0,w),G=C.subarray(w);f=BE(z),h=BE(G),u=gm(z,f,1),d=gm(G,h,1)}else throw"invalid block type";else{var _=Rue(l)+4,v=t[_-4]|t[_-3]<<8,x=_+v;if(x>r){if(o)throw"unexpected EOF";break}i&&s(c+v),e.set(t.subarray(_,x),c),n.b=c+=v,n.p=l=x*8;continue}if(l>g){if(o)throw"unexpected EOF";break}}i&&s(c+131072);for(var W=(1<>>4;if(l+=U&15,l>g){if(o)throw"unexpected EOF";break}if(!U)throw"invalid length/literal";if($<256)e[c++]=$;else if($==256){j=l,u=null;break}else{var q=$-254;if($>264){var R=$-257,K=_$[R];q=ws(t,l,(1<>>4;if(!re)throw"invalid distance";l+=re&15;var G=Cue[J];if(J>3){var K=x$[J];G+=HE(t,l)&(1<g){if(o)throw"unexpected EOF";break}i&&s(c+131072);for(var le=c+q;c>>4>7||(t[0]<<8|t[1])%31)throw"invalid zlib data";if(t[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function ry(t,e){return Due((Lue(t),t.subarray(2,-4)),e)}var kue=typeof TextDecoder<"u"&&new TextDecoder,Nue=0;try{kue.decode(Iue,{stream:!0}),Nue=1}catch{}const Fue=t=>t&&t.isCubeTexture;class zue extends Er{constructor(e,n){var r,i;const o=Fue(e),a=((i=o?(r=e.image[0])==null?void 0:r.width:e.image.width)!=null?i:1024)/4,l=Math.floor(Math.log2(a)),c=Math.pow(2,l),u=3*Math.max(c,16*7),d=4*c,f=[o?"#define ENVMAP_TYPE_CUBE":"",`#define CUBEUV_TEXEL_WIDTH ${1/u}`,`#define CUBEUV_TEXEL_HEIGHT ${1/d}`,`#define CUBEUV_MAX_MIP ${l}.0`],h=` + `}),[u]);return M.createElement("group",yn({},C,{ref:W}),d&&!le&&M.createElement("mesh",{castShadow:h,receiveShadow:g,ref:re},_||M.createElement("planeGeometry",null),y||M.createElement("shaderMaterial",{side:Hr,vertexShader:Te.vertexShader,fragmentShader:Te.fragmentShader})))});function bue(t,e="pointer",n="auto"){M.useEffect(()=>{if(t)return document.body.style.cursor=e,()=>void(document.body.style.cursor=n)},[t])}function _$(t){return function(e){t.forEach(function(n){typeof n=="function"?n(e):n!=null&&(n.current=e)})}}let vp;function Mue(){var t;if(vp!==void 0)return vp;try{let e;const n=document.createElement("canvas");return vp=!!(window.WebGL2RenderingContext&&(e=n.getContext("webgl2"))),e&&((t=e.getExtension("WEBGL_lose_context"))==null||t.loseContext()),vp}catch{return vp=!1}}var ns=Uint8Array,Ql=Uint16Array,Y2=Uint32Array,x$=new ns([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),w$=new ns([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Eue=new ns([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),S$=function(t,e){for(var n=new Ql(31),r=0;r<31;++r)n[r]=e+=1<>>1|(sr&21845)<<1;zl=(zl&52428)>>>2|(zl&13107)<<2,zl=(zl&61680)>>>4|(zl&3855)<<4,X2[sr]=((zl&65280)>>>8|(zl&255)<<8)>>>1}var gm=function(t,e,n){for(var r=t.length,i=0,o=new Ql(e);i>>l]=c}else for(a=new Ql(r),i=0;i>>15-t[i]);return a},Vg=new ns(288);for(var sr=0;sr<144;++sr)Vg[sr]=8;for(var sr=144;sr<256;++sr)Vg[sr]=9;for(var sr=256;sr<280;++sr)Vg[sr]=7;for(var sr=280;sr<288;++sr)Vg[sr]=8;var E$=new ns(32);for(var sr=0;sr<32;++sr)E$[sr]=5;var Oue=gm(Vg,9,1),Rue=gm(E$,5,1),BE=function(t){for(var e=t[0],n=1;ne&&(e=t[n]);return e},ws=function(t,e,n){var r=e/8|0;return(t[r]|t[r+1]<<8)>>(e&7)&n},HE=function(t,e){var n=e/8|0;return(t[n]|t[n+1]<<8|t[n+2]<<16)>>(e&7)},Aue=function(t){return(t/8|0)+(t&7&&1)},Due=function(t,e,n){(e==null||e<0)&&(e=0),(n==null||n>t.length)&&(n=t.length);var r=new(t instanceof Ql?Ql:t instanceof Y2?Y2:ns)(n-e);return r.set(t.subarray(e,n)),r},Iue=function(t,e,n){var r=t.length;if(!r||n&&!n.l&&r<5)return e||new ns(0);var i=!e||n,o=!n||n.i;n||(n={}),e||(e=new ns(r*3));var s=function(ae){var oe=e.length;if(ae>oe){var De=new ns(Math.max(oe*2,ae));De.set(e),e=De}},a=n.f||0,l=n.p||0,c=n.b||0,u=n.l,d=n.d,f=n.m,h=n.n,g=r*8;do{if(!u){n.f=a=ws(t,l,1);var y=ws(t,l+1,3);if(l+=3,y)if(y==1)u=Oue,d=Rue,f=9,h=5;else if(y==2){var w=ws(t,l,31)+257,S=ws(t,l+10,15)+4,E=w+ws(t,l+5,31)+1;l+=14;for(var C=new ns(E),O=new ns(19),R=0;R>>4;if(_<16)C[R++]=_;else{var U=0,k=0;for(_==16?(k=3+ws(t,l,3),l+=2,U=C[R-1]):_==17?(k=3+ws(t,l,7),l+=3):_==18&&(k=11+ws(t,l,127),l+=7);k--;)C[R++]=U}}var z=C.subarray(0,w),G=C.subarray(w);f=BE(z),h=BE(G),u=gm(z,f,1),d=gm(G,h,1)}else throw"invalid block type";else{var _=Aue(l)+4,v=t[_-4]|t[_-3]<<8,x=_+v;if(x>r){if(o)throw"unexpected EOF";break}i&&s(c+v),e.set(t.subarray(_,x),c),n.b=c+=v,n.p=l=x*8;continue}if(l>g){if(o)throw"unexpected EOF";break}}i&&s(c+131072);for(var W=(1<>>4;if(l+=U&15,l>g){if(o)throw"unexpected EOF";break}if(!U)throw"invalid length/literal";if($<256)e[c++]=$;else if($==256){j=l,u=null;break}else{var q=$-254;if($>264){var R=$-257,K=x$[R];q=ws(t,l,(1<>>4;if(!re)throw"invalid distance";l+=re&15;var G=Tue[J];if(J>3){var K=w$[J];G+=HE(t,l)&(1<g){if(o)throw"unexpected EOF";break}i&&s(c+131072);for(var le=c+q;c>>4>7||(t[0]<<8|t[1])%31)throw"invalid zlib data";if(t[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function ry(t,e){return Iue((kue(t),t.subarray(2,-4)),e)}var Nue=typeof TextDecoder<"u"&&new TextDecoder,Fue=0;try{Nue.decode(Lue,{stream:!0}),Fue=1}catch{}const zue=t=>t&&t.isCubeTexture;class Uue extends Er{constructor(e,n){var r,i;const o=zue(e),a=((i=o?(r=e.image[0])==null?void 0:r.width:e.image.width)!=null?i:1024)/4,l=Math.floor(Math.log2(a)),c=Math.pow(2,l),u=3*Math.max(c,16*7),d=4*c,f=[o?"#define ENVMAP_TYPE_CUBE":"",`#define CUBEUV_TEXEL_WIDTH ${1/u}`,`#define CUBEUV_TEXEL_HEIGHT ${1/d}`,`#define CUBEUV_MAX_MIP ${l}.0`],h=` varying vec3 vWorldPosition; - void main() + void main() { vec4 worldPosition = ( modelMatrix * vec4( position, 1.0 ) ); vWorldPosition = worldPosition.xyz; - + gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); } `,g=f.join(` @@ -3545,40 +3545,40 @@ No matching component was found for: uniform sampler2D map; #endif // From: https://www.shadertoy.com/view/4tsBD7 - float diskIntersectWithBackFaceCulling( vec3 ro, vec3 rd, vec3 c, vec3 n, float r ) + float diskIntersectWithBackFaceCulling( vec3 ro, vec3 rd, vec3 c, vec3 n, float r ) { float d = dot ( rd, n ); - + if( d > 0.0 ) { return 1e6; } - + vec3 o = ro - c; float t = - dot( n, o ) / d; vec3 q = o + rd * t; - + return ( dot( q, q ) < r * r ) ? t : 1e6; } // From: https://www.iquilezles.org/www/articles/intersectors/intersectors.htm - float sphereIntersect( vec3 ro, vec3 rd, vec3 ce, float ra ) + float sphereIntersect( vec3 ro, vec3 rd, vec3 ce, float ra ) { vec3 oc = ro - ce; float b = dot( oc, rd ); float c = dot( oc, oc ) - ra * ra; float h = b * b - c; - + if( h < 0.0 ) { return -1.0; } - + h = sqrt( h ); - + return - b + h; } - vec3 project() + vec3 project() { vec3 p = normalize( vWorldPosition ); vec3 camPos = cameraPosition; camPos.y -= height; float intersection = sphereIntersect( camPos, p, vec3( 0.0 ), radius ); if( intersection > 0.0 ) { - + vec3 h = vec3( 0.0, - height, 0.0 ); float intersection2 = diskIntersectWithBackFaceCulling( camPos, p, h, vec3( 0.0, 1.0, 0.0 ), radius ); p = ( camPos + min( intersection, intersection2 ) * p ) / radius; @@ -3589,10 +3589,10 @@ No matching component was found for: } #include #include - void main() + void main() { vec3 projectedWorldPosition = project(); - + #ifdef ENVMAP_TYPE_CUBE vec3 outcolor = textureCube( map, projectedWorldPosition ).rgb; #else @@ -3604,11 +3604,11 @@ No matching component was found for: #include #include } - `,y={map:{value:e},height:{value:n?.height||15},radius:{value:n?.radius||100}},_=new wh(1,16),v=new sn({uniforms:y,fragmentShader:g,vertexShader:h,side:Hr});super(_,v)}set radius(e){this.material.uniforms.radius.value=e}get radius(){return this.material.uniforms.radius.value}set height(e){this.material.uniforms.height.value=e}get height(){return this.material.uniforms.height.value}}class Uue extends wR{constructor(e){super(e),this.type=yr}parse(e){const a=function(w,S){switch(w){case 1:console.error("THREE.RGBELoader Read Error: "+(S||""));break;case 2:console.error("THREE.RGBELoader Write Error: "+(S||""));break;case 3:console.error("THREE.RGBELoader Bad File Format: "+(S||""));break;default:case 4:console.error("THREE.RGBELoader: Error: "+(S||""))}return-1},d=` + `,y={map:{value:e},height:{value:n?.height||15},radius:{value:n?.radius||100}},_=new wh(1,16),v=new sn({uniforms:y,fragmentShader:g,vertexShader:h,side:Hr});super(_,v)}set radius(e){this.material.uniforms.radius.value=e}get radius(){return this.material.uniforms.radius.value}set height(e){this.material.uniforms.height.value=e}get height(){return this.material.uniforms.height.value}}class Bue extends wR{constructor(e){super(e),this.type=yr}parse(e){const a=function(w,S){switch(w){case 1:console.error("THREE.RGBELoader Read Error: "+(S||""));break;case 2:console.error("THREE.RGBELoader Write Error: "+(S||""));break;case 3:console.error("THREE.RGBELoader Bad File Format: "+(S||""));break;default:case 4:console.error("THREE.RGBELoader: Error: "+(S||""))}return-1},d=` `,f=function(w,S,E){S=S||1024;let O=w.pos,R=-1,T=0,A="",F=String.fromCharCode.apply(null,new Uint16Array(w.subarray(O,O+128)));for(;0>(R=F.indexOf(d))&&T=w.byteLength||!(A=f(w)))return a(1,"no header found");if(!(F=A.match(S)))return a(3,"bad initial token");for(T.valid|=1,T.programtype=F[1],T.string+=A+` `;A=f(w),A!==!1;){if(T.string+=A+` `,A.charAt(0)==="#"){T.comments+=A+` -`;continue}if((F=A.match(E))&&(T.gamma=parseFloat(F[1])),(F=A.match(C))&&(T.exposure=parseFloat(F[1])),(F=A.match(O))&&(T.valid|=2,T.format=F[1]),(F=A.match(R))&&(T.valid|=4,T.height=parseInt(F[1],10),T.width=parseInt(F[2],10)),T.valid&2&&T.valid&4)break}return T.valid&2?T.valid&4?T:a(3,"missing image size specifier"):a(3,"missing format specifier")},g=function(w,S,E){const C=S;if(C<8||C>32767||w[0]!==2||w[1]!==2||w[2]&128)return new Uint8Array(w);if(C!==(w[2]<<8|w[3]))return a(3,"wrong scanline width");const O=new Uint8Array(4*S*E);if(!O.length)return a(4,"unable to allocate buffer space");let R=0,T=0;const A=4*C,F=new Uint8Array(4),N=new Uint8Array(A);let U=E;for(;U>0&&Tw.byteLength)return a(1);if(F[0]=w[T++],F[1]=w[T++],F[2]=w[T++],F[3]=w[T++],F[0]!=2||F[1]!=2||(F[2]<<8|F[3])!=C)return a(3,"bad rgbe scanline format");let k=0,z;for(;k128;if(W&&(z-=128),z===0||k+z>A)return a(3,"bad scanline data");if(W){const B=w[T++];for(let j=0;j>3]&1<<(fe&7))&&(Y[ne++]=fe);for(var _e=ne-1;ne<65536;)Y[ne++]=0;return _e}function F(L){for(var Y=0;Y<16384;Y++)L[Y]={},L[Y].len=0,L[Y].lit=0,L[Y].p=null}const N={l:0,c:0,lc:0};function U(L,Y,ne,fe,_e){for(;ne>ne&(1<0;--Y){var fe=ne+k[Y]>>1;k[Y]=ne,ne=fe}for(var Y=0;Y<65537;++Y){var _e=L[Y];_e>0&&(L[Y]=_e|k[_e]++<<6)}}function G(L,Y,ne,fe,_e,Se,Fe){for(var Ce=ne,je=0,qe=0;_e<=Se;_e++){if(Ce.value-ne.value>fe)return!1;U(6,je,qe,L,Ce);var Qe=N.l;if(je=N.c,qe=N.lc,Fe[_e]=Qe,Qe==63){if(Ce.value-ne.value>fe)throw"Something wrong with hufUnpackEncTable";U(8,je,qe,L,Ce);var et=N.l+6;if(je=N.c,qe=N.lc,_e+et>Se+1)throw"Something wrong with hufUnpackEncTable";for(;et--;)Fe[_e++]=0;_e--}else if(Qe>=59){var et=Qe-59+2;if(_e+et>Se+1)throw"Something wrong with hufUnpackEncTable";for(;et--;)Fe[_e++]=0;_e--}}z(Fe)}function W(L){return L&63}function B(L){return L>>6}function j(L,Y,ne,fe){for(;Y<=ne;Y++){var _e=B(L[Y]),Se=W(L[Y]);if(_e>>Se)throw"Invalid table entry";if(Se>14){var Fe=fe[_e>>Se-14];if(Fe.len)throw"Invalid table entry";if(Fe.lit++,Fe.p){var Ce=Fe.p;Fe.p=new Array(Fe.lit);for(var je=0;je0;je--){var Fe=fe[(_e<<14-Se)+qe];if(Fe.len||Fe.p)throw"Invalid table entry";Fe.len=Se,Fe.lit=Y,qe++}}return!0}const $={c:0,lc:0};function q(L,Y,ne,fe){L=L<<8|Ye(ne,fe),Y+=8,$.c=L,$.lc=Y}const K={c:0,lc:0};function re(L,Y,ne,fe,_e,Se,Fe,Ce,je,qe){if(L==Y){fe<8&&(q(ne,fe,_e,Fe),ne=$.c,fe=$.lc),fe-=8;var Qe=ne>>fe,Qe=new Uint8Array([Qe])[0];if(je.value+Qe>qe)return!1;for(var et=Ce[je.value-1];Qe-- >0;)Ce[je.value++]=et}else if(je.value32767?Y-65536:Y}const ae={a:0,b:0};function oe(L,Y){var ne=le(L),fe=le(Y),_e=fe,Se=ne+(_e&1)+(_e>>1),Fe=Se,Ce=Se-_e;ae.a=Fe,ae.b=Ce}function De(L,Y){var ne=J(L),fe=J(Y),_e=ne-(fe>>1)&65535,Se=fe+_e-32768&65535;ae.a=Se,ae.b=_e}function Te(L,Y,ne,fe,_e,Se,Fe){for(var Ce=Fe<16384,je=ne>_e?_e:ne,qe=1,Qe;qe<=je;)qe<<=1;for(qe>>=1,Qe=qe,qe>>=1;qe>=1;){for(var et=0,jt=et+Se*(_e-Qe),Je=Se*qe,Ot=Se*Qe,Pt=fe*qe,Ht=fe*Qe,it,St,At,bt;et<=jt;et+=Ot){for(var Gt=et,rn=et+fe*(ne-Qe);Gt<=rn;Gt+=Ht){var It=Gt+Pt,pn=Gt+Je,ni=pn+Pt;Ce?(oe(L[Gt+Y],L[pn+Y]),it=ae.a,At=ae.b,oe(L[It+Y],L[ni+Y]),St=ae.a,bt=ae.b,oe(it,St),L[Gt+Y]=ae.a,L[It+Y]=ae.b,oe(At,bt),L[pn+Y]=ae.a,L[ni+Y]=ae.b):(De(L[Gt+Y],L[pn+Y]),it=ae.a,At=ae.b,De(L[It+Y],L[ni+Y]),St=ae.a,bt=ae.b,De(it,St),L[Gt+Y]=ae.a,L[It+Y]=ae.b,De(At,bt),L[pn+Y]=ae.a,L[ni+Y]=ae.b)}if(ne&qe){var pn=Gt+Je;Ce?oe(L[Gt+Y],L[pn+Y]):De(L[Gt+Y],L[pn+Y]),it=ae.a,L[pn+Y]=ae.b,L[Gt+Y]=it}}if(_e&qe)for(var Gt=et,rn=et+fe*(ne-Qe);Gt<=rn;Gt+=Ht){var It=Gt+Pt;Ce?oe(L[Gt+Y],L[It+Y]):De(L[Gt+Y],L[It+Y]),it=ae.a,L[It+Y]=ae.b,L[Gt+Y]=it}Qe=qe,qe>>=1}return et}function ve(L,Y,ne,fe,_e,Se,Fe,Ce,je,qe){for(var Qe=0,et=0,jt=Ce,Je=Math.trunc(_e.value+(Se+7)/8);_e.value=14;){var Ot=Qe>>et-14&16383,Pt=Y[Ot];if(Pt.len)et-=Pt.len,re(Pt.lit,Fe,Qe,et,ne,fe,_e,je,qe,jt),Qe=K.c,et=K.lc;else{if(!Pt.p)throw"hufDecode issues";var Ht;for(Ht=0;Ht=it&&B(L[Pt.p[Ht]])==(Qe>>et-it&(1<>=St,et-=St;et>0;){var Pt=Y[Qe<<14-et&16383];if(Pt.len)et-=Pt.len,re(Pt.lit,Fe,Qe,et,ne,fe,_e,je,qe,jt),Qe=K.c,et=K.lc;else throw"hufDecode issues"}return!0}function we(L,Y,ne,fe,_e,Se){var Fe={value:0},Ce=ne.value,je=Ie(Y,ne),qe=Ie(Y,ne);ne.value+=4;var Qe=Ie(Y,ne);if(ne.value+=4,je<0||je>=65537||qe<0||qe>=65537)throw"Something wrong with HUF_ENCSIZE";var et=new Array(65537),jt=new Array(16384);F(jt);var Je=fe-(ne.value-Ce);if(G(L,Y,ne,Je,je,qe,et),Qe>8*(fe-(ne.value-Ce)))throw"Something wrong with hufUncompress";j(et,je,qe,jt),ve(et,jt,L,Y,ne,Qe,qe,Se,_e,Fe)}function me(L,Y,ne){for(var fe=0;feSe||(Y[_e++]=L[ne++],_e>Se));)Y[_e++]=L[fe++]}function ke(L){for(var Y=L.byteLength,ne=new Array,fe=0,_e=new DataView(L);Y>0;){var Se=_e.getInt8(fe++);if(Se<0){var Fe=-Se;Y-=Fe+1;for(var Ce=0;Ce>8==255?_e+=fe&255:(ne[_e]=fe,_e++),L.value++}function ot(L,Y){Y[0]=ue(L[0]),Y[1]=ue(L[1]),Y[2]=ue(L[5]),Y[3]=ue(L[6]),Y[4]=ue(L[14]),Y[5]=ue(L[15]),Y[6]=ue(L[27]),Y[7]=ue(L[28]),Y[8]=ue(L[2]),Y[9]=ue(L[4]),Y[10]=ue(L[7]),Y[11]=ue(L[13]),Y[12]=ue(L[16]),Y[13]=ue(L[26]),Y[14]=ue(L[29]),Y[15]=ue(L[42]),Y[16]=ue(L[3]),Y[17]=ue(L[8]),Y[18]=ue(L[12]),Y[19]=ue(L[17]),Y[20]=ue(L[25]),Y[21]=ue(L[30]),Y[22]=ue(L[41]),Y[23]=ue(L[43]),Y[24]=ue(L[9]),Y[25]=ue(L[11]),Y[26]=ue(L[18]),Y[27]=ue(L[24]),Y[28]=ue(L[31]),Y[29]=ue(L[40]),Y[30]=ue(L[44]),Y[31]=ue(L[53]),Y[32]=ue(L[10]),Y[33]=ue(L[19]),Y[34]=ue(L[23]),Y[35]=ue(L[32]),Y[36]=ue(L[39]),Y[37]=ue(L[45]),Y[38]=ue(L[52]),Y[39]=ue(L[54]),Y[40]=ue(L[20]),Y[41]=ue(L[22]),Y[42]=ue(L[33]),Y[43]=ue(L[38]),Y[44]=ue(L[46]),Y[45]=ue(L[51]),Y[46]=ue(L[55]),Y[47]=ue(L[60]),Y[48]=ue(L[21]),Y[49]=ue(L[34]),Y[50]=ue(L[37]),Y[51]=ue(L[47]),Y[52]=ue(L[50]),Y[53]=ue(L[56]),Y[54]=ue(L[59]),Y[55]=ue(L[61]),Y[56]=ue(L[35]),Y[57]=ue(L[36]),Y[58]=ue(L[48]),Y[59]=ue(L[49]),Y[60]=ue(L[57]),Y[61]=ue(L[58]),Y[62]=ue(L[62]),Y[63]=ue(L[63])}function dt(L){const Y=.5*Math.cos(.7853975),ne=.5*Math.cos(3.14159/16),fe=.5*Math.cos(3.14159/8),_e=.5*Math.cos(3*3.14159/16),Se=.5*Math.cos(5*3.14159/16),Fe=.5*Math.cos(3*3.14159/8),Ce=.5*Math.cos(7*3.14159/16);for(var je=new Array(4),qe=new Array(4),Qe=new Array(4),et=new Array(4),jt=0;jt<8;++jt){var Je=jt*8;je[0]=fe*L[Je+2],je[1]=Fe*L[Je+2],je[2]=fe*L[Je+6],je[3]=Fe*L[Je+6],qe[0]=ne*L[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e[3],L[32+Ot]=et[3]-qe[3],L[40+Ot]=et[2]-qe[2],L[48+Ot]=et[1]-qe[1],L[56+Ot]=et[0]-qe[0]}function We(L){for(var Y=0;Y<64;++Y){var ne=L[0][Y],fe=L[1][Y],_e=L[2][Y];L[0][Y]=ne+1.5747*_e,L[1][Y]=ne-.1873*fe-.4682*_e,L[2][Y]=ne+1.8556*fe}}function ht(L,Y,ne){for(var fe=0;fe<64;++fe)Y[ne+fe]=Tu.toHalfFloat(ee(L[fe]))}function ee(L){return L<=1?Math.sign(L)*Math.pow(Math.abs(L),2.2):Math.sign(L)*Math.pow(T,Math.abs(L)-1)}function Q(L){return new DataView(L.array.buffer,L.offset.value,L.size)}function Pe(L){var Y=L.viewer.buffer.slice(L.offset.value,L.offset.value+L.size),ne=new Uint8Array(ke(Y)),fe=new Uint8Array(ne.length);return se(ne),de(ne,fe),new DataView(fe.buffer)}function $e(L){var Y=L.array.slice(L.offset.value,L.offset.value+L.size),ne=ry(Y),fe=new Uint8Array(ne.length);return se(ne),de(ne,fe),new DataView(fe.buffer)}function Ge(L){for(var Y=L.viewer,ne={value:L.offset.value},fe=new Uint16Array(L.width*L.scanlineBlockSize*(L.channels*L.type)),_e=new Uint8Array(8192),Se=0,Fe=new Array(L.channels),Ce=0;Ce=8192)throw"Something is wrong with PIZ_COMPRESSION BITMAP_SIZE";if(je<=qe)for(var Ce=0;Ce0;){var Ce=ut(Y.buffer,ne),je=Tt(Y,ne),qe=je>>2&3,Qe=(je>>4)-1,et=new Int8Array([Qe])[0],jt=Tt(Y,ne);Se.push({name:Ce,index:et,type:jt,compression:qe}),Fe-=Ce.length+3}for(var Je=te.channels,Ot=new Array(L.channels),Pt=0;Pt=0&&(St.idx[bt.index]=At),Ht.offset=At)}if(_e.acCompressedSize>0)switch(_e.acCompression){case 0:var It=new Uint16Array(_e.totalAcUncompressedCount);we(L.array,Y,ne,_e.acCompressedSize,It,_e.totalAcUncompressedCount);break;case 1:var Gt=L.array.slice(ne.value,ne.value+_e.totalAcUncompressedCount),rn=ry(Gt),It=new Uint16Array(rn.buffer);ne.value+=_e.totalAcUncompressedCount;break}if(_e.dcCompressedSize>0){var pn={array:L.array,offset:ne,size:_e.dcCompressedSize},ni=new Uint16Array($e(pn).buffer);ne.value+=_e.dcCompressedSize}if(_e.rleRawSize>0){var Gt=L.array.slice(ne.value,ne.value+_e.rleCompressedSize),rn=ry(Gt),hr=ke(rn.buffer);ne.value+=_e.rleCompressedSize}for(var hi=0,zn=new Array(Ot.length),Pt=0;Pt>10,ne=L&1023;return(L>>15?-1:1)*(Y?Y===31?ne?NaN:1/0:Math.pow(2,Y-15)*(1+ne/1024):6103515625e-14*(ne/1024))}function He(L,Y){var ne=L.getUint16(Y.value,!0);return Y.value+=2,ne}function st(L,Y){return ue(He(L,Y))}function wt(L,Y,ne,fe){for(var _e=ne.value,Se=[];ne.value<_e+fe-1;){var Fe=ut(Y,ne),Ce=ct(L,ne),je=Tt(L,ne);ne.value+=3;var qe=ct(L,ne),Qe=ct(L,ne);Se.push({name:Fe,pixelType:Ce,pLinear:je,xSampling:qe,ySampling:Qe})}return ne.value+=1,Se}function Bt(L,Y){var ne=Rt(L,Y),fe=Rt(L,Y),_e=Rt(L,Y),Se=Rt(L,Y),Fe=Rt(L,Y),Ce=Rt(L,Y),je=Rt(L,Y),qe=Rt(L,Y);return{redX:ne,redY:fe,greenX:_e,greenY:Se,blueX:Fe,blueY:Ce,whiteX:je,whiteY:qe}}function Yt(L,Y){var ne=["NO_COMPRESSION","RLE_COMPRESSION","ZIPS_COMPRESSION","ZIP_COMPRESSION","PIZ_COMPRESSION","PXR24_COMPRESSION","B44_COMPRESSION","B44A_COMPRESSION","DWAA_COMPRESSION","DWAB_COMPRESSION"],fe=Tt(L,Y);return ne[fe]}function jn(L,Y){var ne=Ie(L,Y),fe=Ie(L,Y),_e=Ie(L,Y),Se=Ie(L,Y);return{xMin:ne,yMin:fe,xMax:_e,yMax:Se}}function Nt(L,Y){var ne=["INCREASING_Y"],fe=Tt(L,Y);return ne[fe]}function xn(L,Y){var ne=Rt(L,Y),fe=Rt(L,Y);return[ne,fe]}function Ft(L,Y){var ne=Rt(L,Y),fe=Rt(L,Y),_e=Rt(L,Y);return[ne,fe,_e]}function kt(L,Y,ne,fe,_e){if(fe==="string"||fe==="stringvector"||fe==="iccProfile")return Ae(Y,ne,_e);if(fe==="chlist")return wt(L,Y,ne,_e);if(fe==="chromaticities")return Bt(L,ne);if(fe==="compression")return Yt(L,ne);if(fe==="box2i")return jn(L,ne);if(fe==="lineOrder")return Nt(L,ne);if(fe==="float")return Rt(L,ne);if(fe==="v2f")return xn(L,ne);if(fe==="v3f")return Ft(L,ne);if(fe==="int")return ct(L,ne);if(fe==="rational")return vt(L,ne);if(fe==="timecode")return xt(L,ne);if(fe==="preview")return ne.value+=_e,"skipped";ne.value+=_e}function fn(L,Y,ne){const fe={};if(L.getUint32(0,!0)!=20000630)throw"THREE.EXRLoader: provided file doesn't appear to be in OpenEXR format.";fe.version=L.getUint8(4);const _e=L.getUint8(5);fe.spec={singleTile:!!(_e&2),longName:!!(_e&4),deepFormat:!!(_e&8),multiPart:!!(_e&16)},ne.value=8;for(var Se=!0;Se;){var Fe=ut(Y,ne);if(Fe==0)Se=!1;else{var Ce=ut(Y,ne),je=Ie(L,ne),qe=kt(L,Y,ne,Ce,je);qe===void 0?console.warn(`EXRLoader.parse: skipped unknown header attribute type '${Ce}'.`):fe[Fe]=qe}}if(_e!=0)throw console.error("EXRHeader:",fe),"THREE.EXRLoader: provided file is currently unsupported.";return fe}function In(L,Y,ne,fe,_e){const Se={size:0,viewer:Y,array:ne,offset:fe,width:L.dataWindow.xMax-L.dataWindow.xMin+1,height:L.dataWindow.yMax-L.dataWindow.yMin+1,channels:L.channels.length,bytesPerLine:null,lines:null,inputSize:null,type:L.channels[0].pixelType,uncompress:null,getter:null,format:null,[yp?"colorSpace":"encoding"]:null};switch(L.compression){case"NO_COMPRESSION":Se.lines=1,Se.uncompress=Q;break;case"RLE_COMPRESSION":Se.lines=1,Se.uncompress=Pe;break;case"ZIPS_COMPRESSION":Se.lines=1,Se.uncompress=$e;break;case"ZIP_COMPRESSION":Se.lines=16,Se.uncompress=$e;break;case"PIZ_COMPRESSION":Se.lines=32,Se.uncompress=Ge;break;case"PXR24_COMPRESSION":Se.lines=16,Se.uncompress=Ke;break;case"DWAA_COMPRESSION":Se.lines=32,Se.uncompress=gt;break;case"DWAB_COMPRESSION":Se.lines=256,Se.uncompress=gt;break;default:throw"EXRLoader.parse: "+L.compression+" is unsupported"}if(Se.scanlineBlockSize=Se.lines,Se.type==1)switch(_e){case Yn:Se.getter=st,Se.inputSize=2;break;case yr:Se.getter=He,Se.inputSize=2;break}else if(Se.type==2)switch(_e){case Yn:Se.getter=Rt,Se.inputSize=4;break;case yr:Se.getter=he,Se.inputSize=4}else throw"EXRLoader.parse: unsupported pixelType "+Se.type+" for "+L.compression+".";Se.blockCount=(L.dataWindow.yMax+1)/Se.scanlineBlockSize;for(var Fe=0;Fepe.height?pe.height-Y:pe.scanlineBlockSize;const fe=pe.size=pe.height)break;for(let Fe=0;Fe32767||w[0]!==2||w[1]!==2||w[2]&128)return new Uint8Array(w);if(C!==(w[2]<<8|w[3]))return a(3,"wrong scanline width");const O=new Uint8Array(4*S*E);if(!O.length)return a(4,"unable to allocate buffer space");let R=0,T=0;const A=4*C,F=new Uint8Array(4),N=new Uint8Array(A);let U=E;for(;U>0&&Tw.byteLength)return a(1);if(F[0]=w[T++],F[1]=w[T++],F[2]=w[T++],F[3]=w[T++],F[0]!=2||F[1]!=2||(F[2]<<8|F[3])!=C)return a(3,"bad rgbe scanline format");let k=0,z;for(;k128;if(W&&(z-=128),z===0||k+z>A)return a(3,"bad scanline data");if(W){const B=w[T++];for(let j=0;j>3]&1<<(fe&7))&&(Y[ne++]=fe);for(var _e=ne-1;ne<65536;)Y[ne++]=0;return _e}function F(L){for(var Y=0;Y<16384;Y++)L[Y]={},L[Y].len=0,L[Y].lit=0,L[Y].p=null}const N={l:0,c:0,lc:0};function U(L,Y,ne,fe,_e){for(;ne>ne&(1<0;--Y){var fe=ne+k[Y]>>1;k[Y]=ne,ne=fe}for(var Y=0;Y<65537;++Y){var _e=L[Y];_e>0&&(L[Y]=_e|k[_e]++<<6)}}function G(L,Y,ne,fe,_e,Se,Fe){for(var Ce=ne,je=0,qe=0;_e<=Se;_e++){if(Ce.value-ne.value>fe)return!1;U(6,je,qe,L,Ce);var Qe=N.l;if(je=N.c,qe=N.lc,Fe[_e]=Qe,Qe==63){if(Ce.value-ne.value>fe)throw"Something wrong with hufUnpackEncTable";U(8,je,qe,L,Ce);var et=N.l+6;if(je=N.c,qe=N.lc,_e+et>Se+1)throw"Something wrong with hufUnpackEncTable";for(;et--;)Fe[_e++]=0;_e--}else if(Qe>=59){var et=Qe-59+2;if(_e+et>Se+1)throw"Something wrong with hufUnpackEncTable";for(;et--;)Fe[_e++]=0;_e--}}z(Fe)}function W(L){return L&63}function B(L){return L>>6}function j(L,Y,ne,fe){for(;Y<=ne;Y++){var _e=B(L[Y]),Se=W(L[Y]);if(_e>>Se)throw"Invalid table entry";if(Se>14){var Fe=fe[_e>>Se-14];if(Fe.len)throw"Invalid table entry";if(Fe.lit++,Fe.p){var Ce=Fe.p;Fe.p=new Array(Fe.lit);for(var je=0;je0;je--){var Fe=fe[(_e<<14-Se)+qe];if(Fe.len||Fe.p)throw"Invalid table entry";Fe.len=Se,Fe.lit=Y,qe++}}return!0}const $={c:0,lc:0};function q(L,Y,ne,fe){L=L<<8|Ye(ne,fe),Y+=8,$.c=L,$.lc=Y}const K={c:0,lc:0};function re(L,Y,ne,fe,_e,Se,Fe,Ce,je,qe){if(L==Y){fe<8&&(q(ne,fe,_e,Fe),ne=$.c,fe=$.lc),fe-=8;var Qe=ne>>fe,Qe=new Uint8Array([Qe])[0];if(je.value+Qe>qe)return!1;for(var et=Ce[je.value-1];Qe-- >0;)Ce[je.value++]=et}else if(je.value32767?Y-65536:Y}const ae={a:0,b:0};function oe(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se+7)/8);_e.value=14;){var Ot=Qe>>et-14&16383,Pt=Y[Ot];if(Pt.len)et-=Pt.len,re(Pt.lit,Fe,Qe,et,ne,fe,_e,je,qe,jt),Qe=K.c,et=K.lc;else{if(!Pt.p)throw"hufDecode issues";var Ht;for(Ht=0;Ht=it&&B(L[Pt.p[Ht]])==(Qe>>et-it&(1<>=St,et-=St;et>0;){var Pt=Y[Qe<<14-et&16383];if(Pt.len)et-=Pt.len,re(Pt.lit,Fe,Qe,et,ne,fe,_e,je,qe,jt),Qe=K.c,et=K.lc;else throw"hufDecode issues"}return!0}function we(L,Y,ne,fe,_e,Se){var Fe={value:0},Ce=ne.value,je=Ie(Y,ne),qe=Ie(Y,ne);ne.value+=4;var Qe=Ie(Y,ne);if(ne.value+=4,je<0||je>=65537||qe<0||qe>=65537)throw"Something wrong with HUF_ENCSIZE";var et=new Array(65537),jt=new Array(16384);F(jt);var Je=fe-(ne.value-Ce);if(G(L,Y,ne,Je,je,qe,et),Qe>8*(fe-(ne.value-Ce)))throw"Something wrong with hufUncompress";j(et,je,qe,jt),ve(et,jt,L,Y,ne,Qe,qe,Se,_e,Fe)}function me(L,Y,ne){for(var fe=0;feSe||(Y[_e++]=L[ne++],_e>Se));)Y[_e++]=L[fe++]}function ke(L){for(var Y=L.byteLength,ne=new Array,fe=0,_e=new DataView(L);Y>0;){var Se=_e.getInt8(fe++);if(Se<0){var Fe=-Se;Y-=Fe+1;for(var Ce=0;Ce>8==255?_e+=fe&255:(ne[_e]=fe,_e++),L.value++}function ot(L,Y){Y[0]=ue(L[0]),Y[1]=ue(L[1]),Y[2]=ue(L[5]),Y[3]=ue(L[6]),Y[4]=ue(L[14]),Y[5]=ue(L[15]),Y[6]=ue(L[27]),Y[7]=ue(L[28]),Y[8]=ue(L[2]),Y[9]=ue(L[4]),Y[10]=ue(L[7]),Y[11]=ue(L[13]),Y[12]=ue(L[16]),Y[13]=ue(L[26]),Y[14]=ue(L[29]),Y[15]=ue(L[42]),Y[16]=ue(L[3]),Y[17]=ue(L[8]),Y[18]=ue(L[12]),Y[19]=ue(L[17]),Y[20]=ue(L[25]),Y[21]=ue(L[30]),Y[22]=ue(L[41]),Y[23]=ue(L[43]),Y[24]=ue(L[9]),Y[25]=ue(L[11]),Y[26]=ue(L[18]),Y[27]=ue(L[24]),Y[28]=ue(L[31]),Y[29]=ue(L[40]),Y[30]=ue(L[44]),Y[31]=ue(L[53]),Y[32]=ue(L[10]),Y[33]=ue(L[19]),Y[34]=ue(L[23]),Y[35]=ue(L[32]),Y[36]=ue(L[39]),Y[37]=ue(L[45]),Y[38]=ue(L[52]),Y[39]=ue(L[54]),Y[40]=ue(L[20]),Y[41]=ue(L[22]),Y[42]=ue(L[33]),Y[43]=ue(L[38]),Y[44]=ue(L[46]),Y[45]=ue(L[51]),Y[46]=ue(L[55]),Y[47]=ue(L[60]),Y[48]=ue(L[21]),Y[49]=ue(L[34]),Y[50]=ue(L[37]),Y[51]=ue(L[47]),Y[52]=ue(L[50]),Y[53]=ue(L[56]),Y[54]=ue(L[59]),Y[55]=ue(L[61]),Y[56]=ue(L[35]),Y[57]=ue(L[36]),Y[58]=ue(L[48]),Y[59]=ue(L[49]),Y[60]=ue(L[57]),Y[61]=ue(L[58]),Y[62]=ue(L[62]),Y[63]=ue(L[63])}function dt(L){const Y=.5*Math.cos(.7853975),ne=.5*Math.cos(3.14159/16),fe=.5*Math.cos(3.14159/8),_e=.5*Math.cos(3*3.14159/16),Se=.5*Math.cos(5*3.14159/16),Fe=.5*Math.cos(3*3.14159/8),Ce=.5*Math.cos(7*3.14159/16);for(var je=new Array(4),qe=new Array(4),Qe=new Array(4),et=new Array(4),jt=0;jt<8;++jt){var Je=jt*8;je[0]=fe*L[Je+2],je[1]=Fe*L[Je+2],je[2]=fe*L[Je+6],je[3]=Fe*L[Je+6],qe[0]=ne*L[Je+1]+_e*L[Je+3]+Se*L[Je+5]+Ce*L[Je+7],qe[1]=_e*L[Je+1]-Ce*L[Je+3]-ne*L[Je+5]-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]}function We(L){for(var Y=0;Y<64;++Y){var ne=L[0][Y],fe=L[1][Y],_e=L[2][Y];L[0][Y]=ne+1.5747*_e,L[1][Y]=ne-.1873*fe-.4682*_e,L[2][Y]=ne+1.8556*fe}}function ht(L,Y,ne){for(var fe=0;fe<64;++fe)Y[ne+fe]=Tu.toHalfFloat(ee(L[fe]))}function ee(L){return L<=1?Math.sign(L)*Math.pow(Math.abs(L),2.2):Math.sign(L)*Math.pow(T,Math.abs(L)-1)}function Q(L){return new DataView(L.array.buffer,L.offset.value,L.size)}function Pe(L){var Y=L.viewer.buffer.slice(L.offset.value,L.offset.value+L.size),ne=new Uint8Array(ke(Y)),fe=new Uint8Array(ne.length);return se(ne),de(ne,fe),new DataView(fe.buffer)}function $e(L){var Y=L.array.slice(L.offset.value,L.offset.value+L.size),ne=ry(Y),fe=new Uint8Array(ne.length);return se(ne),de(ne,fe),new DataView(fe.buffer)}function Ge(L){for(var Y=L.viewer,ne={value:L.offset.value},fe=new Uint16Array(L.width*L.scanlineBlockSize*(L.channels*L.type)),_e=new Uint8Array(8192),Se=0,Fe=new Array(L.channels),Ce=0;Ce=8192)throw"Something is wrong with PIZ_COMPRESSION BITMAP_SIZE";if(je<=qe)for(var Ce=0;Ce0;){var Ce=ut(Y.buffer,ne),je=Tt(Y,ne),qe=je>>2&3,Qe=(je>>4)-1,et=new Int8Array([Qe])[0],jt=Tt(Y,ne);Se.push({name:Ce,index:et,type:jt,compression:qe}),Fe-=Ce.length+3}for(var Je=te.channels,Ot=new Array(L.channels),Pt=0;Pt=0&&(St.idx[bt.index]=At),Ht.offset=At)}if(_e.acCompressedSize>0)switch(_e.acCompression){case 0:var It=new Uint16Array(_e.totalAcUncompressedCount);we(L.array,Y,ne,_e.acCompressedSize,It,_e.totalAcUncompressedCount);break;case 1:var Gt=L.array.slice(ne.value,ne.value+_e.totalAcUncompressedCount),rn=ry(Gt),It=new Uint16Array(rn.buffer);ne.value+=_e.totalAcUncompressedCount;break}if(_e.dcCompressedSize>0){var pn={array:L.array,offset:ne,size:_e.dcCompressedSize},ni=new Uint16Array($e(pn).buffer);ne.value+=_e.dcCompressedSize}if(_e.rleRawSize>0){var Gt=L.array.slice(ne.value,ne.value+_e.rleCompressedSize),rn=ry(Gt),hr=ke(rn.buffer);ne.value+=_e.rleCompressedSize}for(var hi=0,zn=new Array(Ot.length),Pt=0;Pt>10,ne=L&1023;return(L>>15?-1:1)*(Y?Y===31?ne?NaN:1/0:Math.pow(2,Y-15)*(1+ne/1024):6103515625e-14*(ne/1024))}function He(L,Y){var ne=L.getUint16(Y.value,!0);return Y.value+=2,ne}function st(L,Y){return ue(He(L,Y))}function wt(L,Y,ne,fe){for(var _e=ne.value,Se=[];ne.value<_e+fe-1;){var Fe=ut(Y,ne),Ce=ct(L,ne),je=Tt(L,ne);ne.value+=3;var qe=ct(L,ne),Qe=ct(L,ne);Se.push({name:Fe,pixelType:Ce,pLinear:je,xSampling:qe,ySampling:Qe})}return ne.value+=1,Se}function Bt(L,Y){var ne=Rt(L,Y),fe=Rt(L,Y),_e=Rt(L,Y),Se=Rt(L,Y),Fe=Rt(L,Y),Ce=Rt(L,Y),je=Rt(L,Y),qe=Rt(L,Y);return{redX:ne,redY:fe,greenX:_e,greenY:Se,blueX:Fe,blueY:Ce,whiteX:je,whiteY:qe}}function Yt(L,Y){var ne=["NO_COMPRESSION","RLE_COMPRESSION","ZIPS_COMPRESSION","ZIP_COMPRESSION","PIZ_COMPRESSION","PXR24_COMPRESSION","B44_COMPRESSION","B44A_COMPRESSION","DWAA_COMPRESSION","DWAB_COMPRESSION"],fe=Tt(L,Y);return ne[fe]}function jn(L,Y){var ne=Ie(L,Y),fe=Ie(L,Y),_e=Ie(L,Y),Se=Ie(L,Y);return{xMin:ne,yMin:fe,xMax:_e,yMax:Se}}function Nt(L,Y){var ne=["INCREASING_Y"],fe=Tt(L,Y);return ne[fe]}function xn(L,Y){var ne=Rt(L,Y),fe=Rt(L,Y);return[ne,fe]}function Ft(L,Y){var ne=Rt(L,Y),fe=Rt(L,Y),_e=Rt(L,Y);return[ne,fe,_e]}function kt(L,Y,ne,fe,_e){if(fe==="string"||fe==="stringvector"||fe==="iccProfile")return Ae(Y,ne,_e);if(fe==="chlist")return wt(L,Y,ne,_e);if(fe==="chromaticities")return Bt(L,ne);if(fe==="compression")return Yt(L,ne);if(fe==="box2i")return jn(L,ne);if(fe==="lineOrder")return Nt(L,ne);if(fe==="float")return Rt(L,ne);if(fe==="v2f")return xn(L,ne);if(fe==="v3f")return Ft(L,ne);if(fe==="int")return ct(L,ne);if(fe==="rational")return vt(L,ne);if(fe==="timecode")return xt(L,ne);if(fe==="preview")return ne.value+=_e,"skipped";ne.value+=_e}function fn(L,Y,ne){const fe={};if(L.getUint32(0,!0)!=20000630)throw"THREE.EXRLoader: provided file doesn't appear to be in OpenEXR format.";fe.version=L.getUint8(4);const _e=L.getUint8(5);fe.spec={singleTile:!!(_e&2),longName:!!(_e&4),deepFormat:!!(_e&8),multiPart:!!(_e&16)},ne.value=8;for(var Se=!0;Se;){var Fe=ut(Y,ne);if(Fe==0)Se=!1;else{var Ce=ut(Y,ne),je=Ie(L,ne),qe=kt(L,Y,ne,Ce,je);qe===void 0?console.warn(`EXRLoader.parse: skipped unknown header attribute type '${Ce}'.`):fe[Fe]=qe}}if(_e!=0)throw console.error("EXRHeader:",fe),"THREE.EXRLoader: provided file is currently unsupported.";return fe}function In(L,Y,ne,fe,_e){const Se={size:0,viewer:Y,array:ne,offset:fe,width:L.dataWindow.xMax-L.dataWindow.xMin+1,height:L.dataWindow.yMax-L.dataWindow.yMin+1,channels:L.channels.length,bytesPerLine:null,lines:null,inputSize:null,type:L.channels[0].pixelType,uncompress:null,getter:null,format:null,[yp?"colorSpace":"encoding"]:null};switch(L.compression){case"NO_COMPRESSION":Se.lines=1,Se.uncompress=Q;break;case"RLE_COMPRESSION":Se.lines=1,Se.uncompress=Pe;break;case"ZIPS_COMPRESSION":Se.lines=1,Se.uncompress=$e;break;case"ZIP_COMPRESSION":Se.lines=16,Se.uncompress=$e;break;case"PIZ_COMPRESSION":Se.lines=32,Se.uncompress=Ge;break;case"PXR24_COMPRESSION":Se.lines=16,Se.uncompress=Ke;break;case"DWAA_COMPRESSION":Se.lines=32,Se.uncompress=gt;break;case"DWAB_COMPRESSION":Se.lines=256,Se.uncompress=gt;break;default:throw"EXRLoader.parse: "+L.compression+" is unsupported"}if(Se.scanlineBlockSize=Se.lines,Se.type==1)switch(_e){case Yn:Se.getter=st,Se.inputSize=2;break;case yr:Se.getter=He,Se.inputSize=2;break}else if(Se.type==2)switch(_e){case Yn:Se.getter=Rt,Se.inputSize=4;break;case yr:Se.getter=he,Se.inputSize=4}else throw"EXRLoader.parse: unsupported pixelType "+Se.type+" for "+L.compression+".";Se.blockCount=(L.dataWindow.yMax+1)/Se.scanlineBlockSize;for(var Fe=0;Fepe.height?pe.height-Y:pe.scanlineBlockSize;const fe=pe.size=pe.height)break;for(let Fe=0;Fe #include #include @@ -3995,17 +3995,17 @@ No matching component was found for: #include } - `,clipping:!0}),this.isLineMaterial=!0,Object.defineProperties(this,{color:{enumerable:!0,get:function(){return this.uniforms.diffuse.value},set:function(n){this.uniforms.diffuse.value=n}},worldUnits:{enumerable:!0,get:function(){return"WORLD_UNITS"in this.defines},set:function(n){n===!0?this.defines.WORLD_UNITS="":delete this.defines.WORLD_UNITS}},linewidth:{enumerable:!0,get:function(){return this.uniforms.linewidth.value},set:function(n){this.uniforms.linewidth.value=n}},dashed:{enumerable:!0,get:function(){return"USE_DASH"in this.defines},set(n){!!n!="USE_DASH"in this.defines&&(this.needsUpdate=!0),n===!0?this.defines.USE_DASH="":delete this.defines.USE_DASH}},dashScale:{enumerable:!0,get:function(){return this.uniforms.dashScale.value},set:function(n){this.uniforms.dashScale.value=n}},dashSize:{enumerable:!0,get:function(){return this.uniforms.dashSize.value},set:function(n){this.uniforms.dashSize.value=n}},dashOffset:{enumerable:!0,get:function(){return this.uniforms.dashOffset.value},set:function(n){this.uniforms.dashOffset.value=n}},gapSize:{enumerable:!0,get:function(){return this.uniforms.gapSize.value},set:function(n){this.uniforms.gapSize.value=n}},opacity:{enumerable:!0,get:function(){return this.uniforms.opacity.value},set:function(n){this.uniforms.opacity.value=n}},resolution:{enumerable:!0,get:function(){return this.uniforms.resolution.value},set:function(n){this.uniforms.resolution.value.copy(n)}},alphaToCoverage:{enumerable:!0,get:function(){return"USE_ALPHA_TO_COVERAGE"in this.defines},set:function(n){!!n!="USE_ALPHA_TO_COVERAGE"in this.defines&&(this.needsUpdate=!0),n===!0?(this.defines.USE_ALPHA_TO_COVERAGE="",this.extensions.derivatives=!0):(delete this.defines.USE_ALPHA_TO_COVERAGE,this.extensions.derivatives=!1)}}}),this.setValues(e)}}const xk=new Z,wk=new Z,mi=new an,gi=new an,ia=new an,VE=new Z,jE=new rt,Di=new j8,Sk=new Z,oy=new zi,sy=new mo,oa=new an;let ya,X2,P$,Hu;function bk(t,e,n){return oa.set(0,0,-e,1).applyMatrix4(t.projectionMatrix),oa.multiplyScalar(1/oa.w),oa.x=Hu/n.width,oa.y=Hu/n.height,oa.applyMatrix4(t.projectionMatrixInverse),oa.multiplyScalar(1/oa.w),Math.abs(Math.max(oa.x,oa.y))}function Hue(t,e){for(let n=0,r=X2.count;nu&&gi.z>u)continue;if(mi.z>u){const x=mi.z-gi.z,w=(mi.z-u)/x;mi.lerp(gi,w)}else if(gi.z>u){const x=gi.z-mi.z,w=(gi.z-u)/x;gi.lerp(mi,w)}mi.applyMatrix4(r),gi.applyMatrix4(r),mi.multiplyScalar(1/mi.w),gi.multiplyScalar(1/gi.w),mi.x*=o.x/2,mi.y*=o.y/2,gi.x*=o.x/2,gi.y*=o.y/2,Di.start.copy(mi),Di.start.z=0,Di.end.copy(gi),Di.end.z=0;const g=Di.closestPointToPointParameter(VE,!0);Di.at(g,Sk);const y=Pu.lerp(mi.z,gi.z,g),_=y>=-1&&y<=1,v=VE.distanceTo(Sk)g.size),d=M.useMemo(()=>s?new C$:new jue,[s]),[f]=M.useState(()=>new NR),h=M.useMemo(()=>{const g=s?new kR:new E$,y=e.map(_=>{const v=Array.isArray(_);return _ instanceof Z?[_.x,_.y,_.z]:_ instanceof Ee?[_.x,_.y,0]:v&&_.length===3?[_[0],_[1],_[2]]:v&&_.length===2?[_[0],_[1],0]:_});if(g.setPositions(y.flat()),r){const _=r.map(v=>v instanceof lt?v.toArray():v);g.setColors(_.flat())}return g},[e,s,r]);return M.useLayoutEffect(()=>{d.computeLineDistances()},[e,d]),M.useLayoutEffect(()=>{a?f.defines.USE_DASH="":delete f.defines.USE_DASH,f.needsUpdate=!0},[a,f]),M.useEffect(()=>()=>h.dispose(),[h]),M.createElement("primitive",yn({object:d,ref:c},l),M.createElement("primitive",{object:h,attach:"geometry"}),M.createElement("primitive",yn({object:f,attach:"material",color:n,vertexColors:!!r,resolution:[u.width,u.height],linewidth:i??o,dashed:a},l)))});/*! + `,clipping:!0}),this.isLineMaterial=!0,Object.defineProperties(this,{color:{enumerable:!0,get:function(){return this.uniforms.diffuse.value},set:function(n){this.uniforms.diffuse.value=n}},worldUnits:{enumerable:!0,get:function(){return"WORLD_UNITS"in this.defines},set:function(n){n===!0?this.defines.WORLD_UNITS="":delete this.defines.WORLD_UNITS}},linewidth:{enumerable:!0,get:function(){return this.uniforms.linewidth.value},set:function(n){this.uniforms.linewidth.value=n}},dashed:{enumerable:!0,get:function(){return"USE_DASH"in this.defines},set(n){!!n!="USE_DASH"in this.defines&&(this.needsUpdate=!0),n===!0?this.defines.USE_DASH="":delete this.defines.USE_DASH}},dashScale:{enumerable:!0,get:function(){return this.uniforms.dashScale.value},set:function(n){this.uniforms.dashScale.value=n}},dashSize:{enumerable:!0,get:function(){return this.uniforms.dashSize.value},set:function(n){this.uniforms.dashSize.value=n}},dashOffset:{enumerable:!0,get:function(){return this.uniforms.dashOffset.value},set:function(n){this.uniforms.dashOffset.value=n}},gapSize:{enumerable:!0,get:function(){return this.uniforms.gapSize.value},set:function(n){this.uniforms.gapSize.value=n}},opacity:{enumerable:!0,get:function(){return this.uniforms.opacity.value},set:function(n){this.uniforms.opacity.value=n}},resolution:{enumerable:!0,get:function(){return this.uniforms.resolution.value},set:function(n){this.uniforms.resolution.value.copy(n)}},alphaToCoverage:{enumerable:!0,get:function(){return"USE_ALPHA_TO_COVERAGE"in this.defines},set:function(n){!!n!="USE_ALPHA_TO_COVERAGE"in this.defines&&(this.needsUpdate=!0),n===!0?(this.defines.USE_ALPHA_TO_COVERAGE="",this.extensions.derivatives=!0):(delete this.defines.USE_ALPHA_TO_COVERAGE,this.extensions.derivatives=!1)}}}),this.setValues(e)}}const xk=new Z,wk=new Z,mi=new an,gi=new an,ia=new an,VE=new Z,jE=new rt,Di=new $8,Sk=new Z,oy=new zi,sy=new mo,oa=new an;let ya,Z2,C$,Hu;function bk(t,e,n){return oa.set(0,0,-e,1).applyMatrix4(t.projectionMatrix),oa.multiplyScalar(1/oa.w),oa.x=Hu/n.width,oa.y=Hu/n.height,oa.applyMatrix4(t.projectionMatrixInverse),oa.multiplyScalar(1/oa.w),Math.abs(Math.max(oa.x,oa.y))}function Vue(t,e){for(let n=0,r=Z2.count;nu&&gi.z>u)continue;if(mi.z>u){const x=mi.z-gi.z,w=(mi.z-u)/x;mi.lerp(gi,w)}else if(gi.z>u){const x=gi.z-mi.z,w=(gi.z-u)/x;gi.lerp(mi,w)}mi.applyMatrix4(r),gi.applyMatrix4(r),mi.multiplyScalar(1/mi.w),gi.multiplyScalar(1/gi.w),mi.x*=o.x/2,mi.y*=o.y/2,gi.x*=o.x/2,gi.y*=o.y/2,Di.start.copy(mi),Di.start.z=0,Di.end.copy(gi),Di.end.z=0;const g=Di.closestPointToPointParameter(VE,!0);Di.at(g,Sk);const y=Pu.lerp(mi.z,gi.z,g),_=y>=-1&&y<=1,v=VE.distanceTo(Sk)g.size),d=M.useMemo(()=>s?new T$:new $ue,[s]),[f]=M.useState(()=>new NR),h=M.useMemo(()=>{const g=s?new kR:new P$,y=e.map(_=>{const v=Array.isArray(_);return _ instanceof Z?[_.x,_.y,_.z]:_ instanceof Ee?[_.x,_.y,0]:v&&_.length===3?[_[0],_[1],_[2]]:v&&_.length===2?[_[0],_[1],0]:_});if(g.setPositions(y.flat()),r){const _=r.map(v=>v instanceof lt?v.toArray():v);g.setColors(_.flat())}return g},[e,s,r]);return M.useLayoutEffect(()=>{d.computeLineDistances()},[e,d]),M.useLayoutEffect(()=>{a?f.defines.USE_DASH="":delete f.defines.USE_DASH,f.needsUpdate=!0},[a,f]),M.useEffect(()=>()=>h.dispose(),[h]),M.createElement("primitive",yn({object:d,ref:c},l),M.createElement("primitive",{object:h,attach:"geometry"}),M.createElement("primitive",yn({object:f,attach:"material",color:n,vertexColors:!!r,resolution:[u.width,u.height],linewidth:i??o,dashed:a},l)))});/*! * camera-controls * https://github.com/yomotsu/camera-controls * (c) 2017 @yomotsu * Released under the MIT License. - */const Xt={LEFT:1,RIGHT:2,MIDDLE:4},Be=Object.freeze({NONE:0,ROTATE:1,TRUCK:2,OFFSET:4,DOLLY:8,ZOOM:16,TOUCH_ROTATE:32,TOUCH_TRUCK:64,TOUCH_OFFSET:128,TOUCH_DOLLY:256,TOUCH_ZOOM:512,TOUCH_DOLLY_TRUCK:1024,TOUCH_DOLLY_OFFSET:2048,TOUCH_DOLLY_ROTATE:4096,TOUCH_ZOOM_TRUCK:8192,TOUCH_ZOOM_OFFSET:16384,TOUCH_ZOOM_ROTATE:32768}),Zd={NONE:0,IN:1,OUT:-1};function ru(t){return t.isPerspectiveCamera}function $l(t){return t.isOrthographicCamera}const qd=Math.PI*2,Mk=Math.PI/2,T$=1e-5,_p=Math.PI/180;function pf(t,e,n){return Math.max(e,Math.min(n,t))}function Kn(t,e=T$){return Math.abs(t)0==h>u&&(h=u,n.value=(h-u)/o),h}function Pk(t,e,n,r,i=1/0,o,s){r=Math.max(1e-4,r);const a=2/r,l=a*o,c=1/(1+l+.48*l*l+.235*l*l*l);let u=e.x,d=e.y,f=e.z,h=t.x-u,g=t.y-d,y=t.z-f;const _=u,v=d,x=f,w=i*r,S=w*w,E=h*h+g*g+y*y;if(E>S){const z=Math.sqrt(E);h=h/z*w,g=g/z*w,y=y/z*w}u=t.x-h,d=t.y-g,f=t.z-y;const C=(n.x+a*h)*o,O=(n.y+a*g)*o,R=(n.z+a*y)*o;n.x=(n.x-a*C)*c,n.y=(n.y-a*O)*c,n.z=(n.z-a*R)*c,s.x=u+(h+C)*c,s.y=d+(g+O)*c,s.z=f+(y+R)*c;const T=_-t.x,A=v-t.y,F=x-t.z,N=s.x-_,U=s.y-v,k=s.z-x;return T*N+A*U+F*k>0&&(s.x=_,s.y=v,s.z=x,n.x=(s.x-_)/o,n.y=(s.y-v)/o,n.z=(s.z-x)/o),s}function $E(t,e){e.set(0,0),t.forEach(n=>{e.x+=n.clientX,e.y+=n.clientY}),e.x/=t.length,e.y/=t.length}function GE(t,e){return $l(t)?(console.warn(`${e} is not supported in OrthographicCamera`),!0):!1}let $ue=class{constructor(){this._listeners={}}addEventListener(e,n){const r=this._listeners;r[e]===void 0&&(r[e]=[]),r[e].indexOf(n)===-1&&r[e].push(n)}hasEventListener(e,n){const r=this._listeners;return r[e]!==void 0&&r[e].indexOf(n)!==-1}removeEventListener(e,n){const i=this._listeners[e];if(i!==void 0){const o=i.indexOf(n);o!==-1&&i.splice(o,1)}}removeAllEventListeners(e){if(!e){this._listeners={};return}Array.isArray(this._listeners[e])&&(this._listeners[e].length=0)}dispatchEvent(e){const r=this._listeners[e.type];if(r!==void 0){e.target=this;const i=r.slice(0);for(let o=0,s=i.length;o{},this._enabled=!0,this._state=Be.NONE,this._viewport=null,this._changedDolly=0,this._changedZoom=0,this._hasRested=!0,this._boundaryEnclosesCamera=!1,this._needsUpdate=!0,this._updatedLastTime=!1,this._elementRect=new DOMRect,this._isDragging=!1,this._activePointers=[],this._lockedPointer=null,this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._isUserControllingOffset=!1,this._isUserControllingZoom=!1,this._lastDollyDirection=Zd.NONE,this._thetaVelocity={value:0},this._phiVelocity={value:0},this._radiusVelocity={value:0},this._targetVelocity=new Wt.Vector3,this._focalOffsetVelocity=new Wt.Vector3,this._zoomVelocity={value:0},this._truckInternal=(S,E,C)=>{let O,R;if(ru(this._camera)){const T=on.copy(this._camera.position).sub(this._target),A=this._camera.getEffectiveFOV()*_p,F=T.length()*Math.tan(A*.5);O=this.truckSpeed*S*F/this._elementRect.height,R=this.truckSpeed*E*F/this._elementRect.height}else if($l(this._camera)){const T=this._camera;O=S*(T.right-T.left)/T.zoom/this._elementRect.width,R=E*(T.top-T.bottom)/T.zoom/this._elementRect.height}else return;this.verticalDragToForward?(C?this.setFocalOffset(this._focalOffsetEnd.x+O,this._focalOffsetEnd.y,this._focalOffsetEnd.z,!0):this.truck(O,0,!0),this.forward(-R,!0)):C?this.setFocalOffset(this._focalOffsetEnd.x+O,this._focalOffsetEnd.y+R,this._focalOffsetEnd.z,!0):this.truck(O,R,!0)},this._rotateInternal=(S,E)=>{const C=qd*this.azimuthRotateSpeed*S/this._elementRect.height,O=qd*this.polarRotateSpeed*E/this._elementRect.height;this.rotate(C,O,!0)},this._dollyInternal=(S,E,C)=>{const O=Math.pow(.95,-S*this.dollySpeed),R=this._sphericalEnd.radius,T=this._sphericalEnd.radius*O,A=Wt.MathUtils.clamp(T,this.minDistance,this.maxDistance),F=A-T;this.infinityDolly&&this.dollyToCursor?this._dollyToNoClamp(T,!0):this.infinityDolly&&!this.dollyToCursor?(this.dollyInFixed(F,!0),this._dollyToNoClamp(A,!0)):this._dollyToNoClamp(A,!0),this.dollyToCursor&&(this._changedDolly+=(this.infinityDolly?T:A)-R,this._dollyControlCoord.set(E,C)),this._lastDollyDirection=Math.sign(-S)},this._zoomInternal=(S,E,C)=>{const O=Math.pow(.95,S*this.dollySpeed),R=this._zoom,T=this._zoom*O;this.zoomTo(T,!0),this.dollyToCursor&&(this._changedZoom+=T-R,this._dollyControlCoord.set(E,C))},typeof Wt>"u"&&console.error("camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information."),this._camera=e,this._yAxisUpSpace=new Wt.Quaternion().setFromUnitVectors(this._camera.up,cy),this._yAxisUpSpaceInverse=this._yAxisUpSpace.clone().invert(),this._state=Be.NONE,this._target=new Wt.Vector3,this._targetEnd=this._target.clone(),this._focalOffset=new Wt.Vector3,this._focalOffsetEnd=this._focalOffset.clone(),this._spherical=new Wt.Spherical().setFromVector3(on.copy(this._camera.position).applyQuaternion(this._yAxisUpSpace)),this._sphericalEnd=this._spherical.clone(),this._lastDistance=this._spherical.radius,this._zoom=this._camera.zoom,this._zoomEnd=this._zoom,this._lastZoom=this._zoom,this._nearPlaneCorners=[new Wt.Vector3,new Wt.Vector3,new Wt.Vector3,new Wt.Vector3],this._updateNearPlaneCorners(),this._boundary=new Wt.Box3(new Wt.Vector3(-1/0,-1/0,-1/0),new Wt.Vector3(1/0,1/0,1/0)),this._cameraUp0=this._camera.up.clone(),this._target0=this._target.clone(),this._position0=this._camera.position.clone(),this._zoom0=this._zoom,this._focalOffset0=this._focalOffset.clone(),this._dollyControlCoord=new Wt.Vector2,this.mouseButtons={left:Be.ROTATE,middle:Be.DOLLY,right:Be.TRUCK,wheel:ru(this._camera)?Be.DOLLY:$l(this._camera)?Be.ZOOM:Be.NONE},this.touches={one:Be.TOUCH_ROTATE,two:ru(this._camera)?Be.TOUCH_DOLLY_TRUCK:$l(this._camera)?Be.TOUCH_ZOOM_TRUCK:Be.NONE,three:Be.TOUCH_TRUCK};const r=new Wt.Vector2,i=new Wt.Vector2,o=new Wt.Vector2,s=S=>{if(!this._enabled||!this._domElement)return;const E=S.pointerType!=="mouse"?null:(S.buttons&Xt.LEFT)===Xt.LEFT?Xt.LEFT:(S.buttons&Xt.MIDDLE)===Xt.MIDDLE?Xt.MIDDLE:(S.buttons&Xt.RIGHT)===Xt.RIGHT?Xt.RIGHT:null;if(E!==null){const O=this._findPointerByMouseButton(E);O&&this._disposePointer(O)}if((S.buttons&Xt.LEFT)===Xt.LEFT&&this._lockedPointer)return;const C={pointerId:S.pointerId,clientX:S.clientX,clientY:S.clientY,deltaX:0,deltaY:0,mouseButton:E};this._activePointers.push(C),this._domElement.ownerDocument.removeEventListener("pointermove",l,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",u),this._domElement.ownerDocument.addEventListener("pointermove",l,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",u),this._isDragging=!0,y(S)},a=S=>{if(!this._enabled||!this._domElement||this._lockedPointer)return;const E=(S.buttons&Xt.LEFT)===Xt.LEFT?Xt.LEFT:(S.buttons&Xt.MIDDLE)===Xt.MIDDLE?Xt.MIDDLE:(S.buttons&Xt.RIGHT)===Xt.RIGHT?Xt.RIGHT:null;if(E!==null){const O=this._findPointerByMouseButton(E);O&&this._disposePointer(O)}const C={pointerId:1,clientX:S.clientX,clientY:S.clientY,deltaX:0,deltaY:0,mouseButton:(S.buttons&Xt.LEFT)===Xt.LEFT?Xt.LEFT:(S.buttons&Xt.MIDDLE)===Xt.LEFT?Xt.MIDDLE:(S.buttons&Xt.RIGHT)===Xt.LEFT?Xt.RIGHT:null};this._activePointers.push(C),this._domElement.ownerDocument.removeEventListener("mousemove",c),this._domElement.ownerDocument.removeEventListener("mouseup",d),this._domElement.ownerDocument.addEventListener("mousemove",c),this._domElement.ownerDocument.addEventListener("mouseup",d),this._isDragging=!0,y(S)},l=S=>{S.cancelable&&S.preventDefault();const E=S.pointerId,C=this._lockedPointer||this._findPointerById(E);if(C){if(C.clientX=S.clientX,C.clientY=S.clientY,C.deltaX=S.movementX,C.deltaY=S.movementY,this._state=0,S.pointerType==="touch")switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else(!this._isDragging&&this._lockedPointer||this._isDragging&&(S.buttons&Xt.LEFT)===Xt.LEFT)&&(this._state=this._state|this.mouseButtons.left),this._isDragging&&(S.buttons&Xt.MIDDLE)===Xt.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),this._isDragging&&(S.buttons&Xt.RIGHT)===Xt.RIGHT&&(this._state=this._state|this.mouseButtons.right);_()}},c=S=>{const E=this._lockedPointer||this._findPointerById(1);E&&(E.clientX=S.clientX,E.clientY=S.clientY,E.deltaX=S.movementX,E.deltaY=S.movementY,this._state=0,(this._lockedPointer||(S.buttons&Xt.LEFT)===Xt.LEFT)&&(this._state=this._state|this.mouseButtons.left),(S.buttons&Xt.MIDDLE)===Xt.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(S.buttons&Xt.RIGHT)===Xt.RIGHT&&(this._state=this._state|this.mouseButtons.right),_())},u=S=>{const E=this._findPointerById(S.pointerId);if(!(E&&E===this._lockedPointer)){if(E&&this._disposePointer(E),S.pointerType==="touch")switch(this._activePointers.length){case 0:this._state=Be.NONE;break;case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else this._state=Be.NONE;v()}},d=()=>{const S=this._findPointerById(1);S&&S===this._lockedPointer||(S&&this._disposePointer(S),this._state=Be.NONE,v())};let f=-1;const h=S=>{if(!this._enabled||this.mouseButtons.wheel===Be.NONE)return;if(S.preventDefault(),this.dollyToCursor||this.mouseButtons.wheel===Be.ROTATE||this.mouseButtons.wheel===Be.TRUCK){const T=performance.now();f-T<1e3&&this._getClientRect(this._elementRect),f=T}const E=Wue?-1:-3,C=S.deltaMode===1?S.deltaY/E:S.deltaY/(E*10),O=this.dollyToCursor?(S.clientX-this._elementRect.x)/this._elementRect.width*2-1:0,R=this.dollyToCursor?(S.clientY-this._elementRect.y)/this._elementRect.height*-2+1:0;switch(this.mouseButtons.wheel){case Be.ROTATE:{this._rotateInternal(S.deltaX,S.deltaY),this._isUserControllingRotate=!0;break}case Be.TRUCK:{this._truckInternal(S.deltaX,S.deltaY,!1),this._isUserControllingTruck=!0;break}case Be.OFFSET:{this._truckInternal(S.deltaX,S.deltaY,!0),this._isUserControllingOffset=!0;break}case Be.DOLLY:{this._dollyInternal(-C,O,R),this._isUserControllingDolly=!0;break}case Be.ZOOM:{this._zoomInternal(-C,O,R),this._isUserControllingZoom=!0;break}}this.dispatchEvent({type:"control"})},g=S=>{if(!(!this._domElement||!this._enabled)){if(this.mouseButtons.right===Z2.ACTION.NONE){const E=S instanceof PointerEvent?S.pointerId:(S instanceof MouseEvent,0),C=this._findPointerById(E);C&&this._disposePointer(C),this._domElement.ownerDocument.removeEventListener("pointermove",l,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",u),this._domElement.ownerDocument.removeEventListener("mousemove",c),this._domElement.ownerDocument.removeEventListener("mouseup",d);return}S.preventDefault()}},y=S=>{if(!this._enabled)return;if($E(this._activePointers,io),this._getClientRect(this._elementRect),r.copy(io),i.copy(io),this._activePointers.length>=2){const C=io.x-this._activePointers[1].clientX,O=io.y-this._activePointers[1].clientY,R=Math.sqrt(C*C+O*O);o.set(0,R);const T=(this._activePointers[0].clientX+this._activePointers[1].clientX)*.5,A=(this._activePointers[0].clientY+this._activePointers[1].clientY)*.5;i.set(T,A)}if(this._state=0,!S)this._lockedPointer&&(this._state=this._state|this.mouseButtons.left);else if("pointerType"in S&&S.pointerType==="touch")switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else!this._lockedPointer&&(S.buttons&Xt.LEFT)===Xt.LEFT&&(this._state=this._state|this.mouseButtons.left),(S.buttons&Xt.MIDDLE)===Xt.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(S.buttons&Xt.RIGHT)===Xt.RIGHT&&(this._state=this._state|this.mouseButtons.right);((this._state&Be.ROTATE)===Be.ROTATE||(this._state&Be.TOUCH_ROTATE)===Be.TOUCH_ROTATE||(this._state&Be.TOUCH_DOLLY_ROTATE)===Be.TOUCH_DOLLY_ROTATE||(this._state&Be.TOUCH_ZOOM_ROTATE)===Be.TOUCH_ZOOM_ROTATE)&&(this._sphericalEnd.theta=this._spherical.theta,this._sphericalEnd.phi=this._spherical.phi,this._thetaVelocity.value=0,this._phiVelocity.value=0),((this._state&Be.TRUCK)===Be.TRUCK||(this._state&Be.TOUCH_TRUCK)===Be.TOUCH_TRUCK||(this._state&Be.TOUCH_DOLLY_TRUCK)===Be.TOUCH_DOLLY_TRUCK||(this._state&Be.TOUCH_ZOOM_TRUCK)===Be.TOUCH_ZOOM_TRUCK)&&(this._targetEnd.copy(this._target),this._targetVelocity.set(0,0,0)),((this._state&Be.DOLLY)===Be.DOLLY||(this._state&Be.TOUCH_DOLLY)===Be.TOUCH_DOLLY||(this._state&Be.TOUCH_DOLLY_TRUCK)===Be.TOUCH_DOLLY_TRUCK||(this._state&Be.TOUCH_DOLLY_OFFSET)===Be.TOUCH_DOLLY_OFFSET||(this._state&Be.TOUCH_DOLLY_ROTATE)===Be.TOUCH_DOLLY_ROTATE)&&(this._sphericalEnd.radius=this._spherical.radius,this._radiusVelocity.value=0),((this._state&Be.ZOOM)===Be.ZOOM||(this._state&Be.TOUCH_ZOOM)===Be.TOUCH_ZOOM||(this._state&Be.TOUCH_ZOOM_TRUCK)===Be.TOUCH_ZOOM_TRUCK||(this._state&Be.TOUCH_ZOOM_OFFSET)===Be.TOUCH_ZOOM_OFFSET||(this._state&Be.TOUCH_ZOOM_ROTATE)===Be.TOUCH_ZOOM_ROTATE)&&(this._zoomEnd=this._zoom,this._zoomVelocity.value=0),((this._state&Be.OFFSET)===Be.OFFSET||(this._state&Be.TOUCH_OFFSET)===Be.TOUCH_OFFSET||(this._state&Be.TOUCH_DOLLY_OFFSET)===Be.TOUCH_DOLLY_OFFSET||(this._state&Be.TOUCH_ZOOM_OFFSET)===Be.TOUCH_ZOOM_OFFSET)&&(this._focalOffsetEnd.copy(this._focalOffset),this._focalOffsetVelocity.set(0,0,0)),this.dispatchEvent({type:"controlstart"})},_=()=>{if(!this._enabled)return;$E(this._activePointers,io);const E=this._domElement&&document.pointerLockElement===this._domElement?this._lockedPointer||this._activePointers[0]:null,C=E?-E.deltaX:i.x-io.x,O=E?-E.deltaY:i.y-io.y;if(i.copy(io),((this._state&Be.ROTATE)===Be.ROTATE||(this._state&Be.TOUCH_ROTATE)===Be.TOUCH_ROTATE||(this._state&Be.TOUCH_DOLLY_ROTATE)===Be.TOUCH_DOLLY_ROTATE||(this._state&Be.TOUCH_ZOOM_ROTATE)===Be.TOUCH_ZOOM_ROTATE)&&(this._rotateInternal(C,O),this._isUserControllingRotate=!0),(this._state&Be.DOLLY)===Be.DOLLY||(this._state&Be.ZOOM)===Be.ZOOM){const R=this.dollyToCursor?(r.x-this._elementRect.x)/this._elementRect.width*2-1:0,T=this.dollyToCursor?(r.y-this._elementRect.y)/this._elementRect.height*-2+1:0,A=this.dollyDragInverted?-1:1;(this._state&Be.DOLLY)===Be.DOLLY?(this._dollyInternal(A*O*ly,R,T),this._isUserControllingDolly=!0):(this._zoomInternal(A*O*ly,R,T),this._isUserControllingZoom=!0)}if((this._state&Be.TOUCH_DOLLY)===Be.TOUCH_DOLLY||(this._state&Be.TOUCH_ZOOM)===Be.TOUCH_ZOOM||(this._state&Be.TOUCH_DOLLY_TRUCK)===Be.TOUCH_DOLLY_TRUCK||(this._state&Be.TOUCH_ZOOM_TRUCK)===Be.TOUCH_ZOOM_TRUCK||(this._state&Be.TOUCH_DOLLY_OFFSET)===Be.TOUCH_DOLLY_OFFSET||(this._state&Be.TOUCH_ZOOM_OFFSET)===Be.TOUCH_ZOOM_OFFSET||(this._state&Be.TOUCH_DOLLY_ROTATE)===Be.TOUCH_DOLLY_ROTATE||(this._state&Be.TOUCH_ZOOM_ROTATE)===Be.TOUCH_ZOOM_ROTATE){const R=io.x-this._activePointers[1].clientX,T=io.y-this._activePointers[1].clientY,A=Math.sqrt(R*R+T*T),F=o.y-A;o.set(0,A);const N=this.dollyToCursor?(i.x-this._elementRect.x)/this._elementRect.width*2-1:0,U=this.dollyToCursor?(i.y-this._elementRect.y)/this._elementRect.height*-2+1:0;(this._state&Be.TOUCH_DOLLY)===Be.TOUCH_DOLLY||(this._state&Be.TOUCH_DOLLY_ROTATE)===Be.TOUCH_DOLLY_ROTATE||(this._state&Be.TOUCH_DOLLY_TRUCK)===Be.TOUCH_DOLLY_TRUCK||(this._state&Be.TOUCH_DOLLY_OFFSET)===Be.TOUCH_DOLLY_OFFSET?(this._dollyInternal(F*ly,N,U),this._isUserControllingDolly=!0):(this._zoomInternal(F*ly,N,U),this._isUserControllingZoom=!0)}((this._state&Be.TRUCK)===Be.TRUCK||(this._state&Be.TOUCH_TRUCK)===Be.TOUCH_TRUCK||(this._state&Be.TOUCH_DOLLY_TRUCK)===Be.TOUCH_DOLLY_TRUCK||(this._state&Be.TOUCH_ZOOM_TRUCK)===Be.TOUCH_ZOOM_TRUCK)&&(this._truckInternal(C,O,!1),this._isUserControllingTruck=!0),((this._state&Be.OFFSET)===Be.OFFSET||(this._state&Be.TOUCH_OFFSET)===Be.TOUCH_OFFSET||(this._state&Be.TOUCH_DOLLY_OFFSET)===Be.TOUCH_DOLLY_OFFSET||(this._state&Be.TOUCH_ZOOM_OFFSET)===Be.TOUCH_ZOOM_OFFSET)&&(this._truckInternal(C,O,!0),this._isUserControllingOffset=!0),this.dispatchEvent({type:"control"})},v=()=>{$E(this._activePointers,io),i.copy(io),(this._activePointers.length===0||this._activePointers.length===1&&this._activePointers[0]===this._lockedPointer)&&(this._isDragging=!1),this._activePointers.length===0&&this._domElement&&(this._domElement.ownerDocument.removeEventListener("pointermove",l,{passive:!1}),this._domElement.ownerDocument.removeEventListener("mousemove",c),this._domElement.ownerDocument.removeEventListener("pointerup",u),this._domElement.ownerDocument.removeEventListener("mouseup",d),this.dispatchEvent({type:"controlend"}))};this.lockPointer=()=>{!this._enabled||!this._domElement||(this.cancel(),this._lockedPointer={pointerId:-1,clientX:0,clientY:0,deltaX:0,deltaY:0,mouseButton:null},this._activePointers.push(this._lockedPointer),this._domElement.ownerDocument.removeEventListener("pointermove",l,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",u),this._domElement.requestPointerLock(),this._domElement.ownerDocument.addEventListener("pointerlockchange",x),this._domElement.ownerDocument.addEventListener("pointerlockerror",w),this._domElement.ownerDocument.addEventListener("pointermove",l,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",u),y())},this.unlockPointer=()=>{this._lockedPointer!==null&&(this._disposePointer(this._lockedPointer),this._lockedPointer=null),document.exitPointerLock(),this.cancel(),this._domElement&&(this._domElement.ownerDocument.removeEventListener("pointerlockchange",x),this._domElement.ownerDocument.removeEventListener("pointerlockerror",w))};const x=()=>{this._domElement&&this._domElement.ownerDocument.pointerLockElement===this._domElement||this.unlockPointer()},w=()=>{this.unlockPointer()};this._addAllEventListeners=S=>{this._domElement=S,this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none",this._domElement.addEventListener("pointerdown",s),Yue&&this._domElement.addEventListener("mousedown",a),this._domElement.addEventListener("pointercancel",u),this._domElement.addEventListener("wheel",h,{passive:!1}),this._domElement.addEventListener("contextmenu",g)},this._removeAllEventListeners=()=>{this._domElement&&(this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect="",this._domElement.removeEventListener("pointerdown",s),this._domElement.removeEventListener("mousedown",a),this._domElement.removeEventListener("pointercancel",u),this._domElement.removeEventListener("wheel",h,{passive:!1}),this._domElement.removeEventListener("contextmenu",g),this._domElement.ownerDocument.removeEventListener("pointermove",l,{passive:!1}),this._domElement.ownerDocument.removeEventListener("mousemove",c),this._domElement.ownerDocument.removeEventListener("pointerup",u),this._domElement.ownerDocument.removeEventListener("mouseup",d),this._domElement.ownerDocument.removeEventListener("pointerlockchange",x),this._domElement.ownerDocument.removeEventListener("pointerlockerror",w))},this.cancel=()=>{this._state!==Be.NONE&&(this._state=Be.NONE,this._activePointers.length=0,v())},n&&this.connect(n),this.update(0)}get camera(){return this._camera}set camera(e){this._camera=e,this.updateCameraUp(),this._camera.updateProjectionMatrix(),this._updateNearPlaneCorners(),this._needsUpdate=!0}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this._domElement&&(e?(this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none"):(this.cancel(),this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect=""))}get active(){return!this._hasRested}get currentAction(){return this._state}get distance(){return this._spherical.radius}set distance(e){this._spherical.radius===e&&this._sphericalEnd.radius===e||(this._spherical.radius=e,this._sphericalEnd.radius=e,this._needsUpdate=!0)}get azimuthAngle(){return this._spherical.theta}set azimuthAngle(e){this._spherical.theta===e&&this._sphericalEnd.theta===e||(this._spherical.theta=e,this._sphericalEnd.theta=e,this._needsUpdate=!0)}get polarAngle(){return this._spherical.phi}set polarAngle(e){this._spherical.phi===e&&this._sphericalEnd.phi===e||(this._spherical.phi=e,this._sphericalEnd.phi=e,this._needsUpdate=!0)}get boundaryEnclosesCamera(){return this._boundaryEnclosesCamera}set boundaryEnclosesCamera(e){this._boundaryEnclosesCamera=e,this._needsUpdate=!0}addEventListener(e,n){super.addEventListener(e,n)}removeEventListener(e,n){super.removeEventListener(e,n)}rotate(e,n,r=!1){return this.rotateTo(this._sphericalEnd.theta+e,this._sphericalEnd.phi+n,r)}rotateAzimuthTo(e,n=!1){return this.rotateTo(e,this._sphericalEnd.phi,n)}rotatePolarTo(e,n=!1){return this.rotateTo(this._sphericalEnd.theta,e,n)}rotateTo(e,n,r=!1){this._isUserControllingRotate=!1;const i=pf(e,this.minAzimuthAngle,this.maxAzimuthAngle),o=pf(n,this.minPolarAngle,this.maxPolarAngle);this._sphericalEnd.theta=i,this._sphericalEnd.phi=o,this._sphericalEnd.makeSafe(),this._needsUpdate=!0,r||(this._spherical.theta=this._sphericalEnd.theta,this._spherical.phi=this._sphericalEnd.phi);const s=!r||Un(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&Un(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold);return this._createOnRestPromise(s)}dolly(e,n=!1){return this.dollyTo(this._sphericalEnd.radius-e,n)}dollyTo(e,n=!1){return this._isUserControllingDolly=!1,this._lastDollyDirection=Zd.NONE,this._changedDolly=0,this._dollyToNoClamp(pf(e,this.minDistance,this.maxDistance),n)}_dollyToNoClamp(e,n=!1){const r=this._sphericalEnd.radius;if(this.colliderMeshes.length>=1){const s=this._collisionTest(),a=Un(s,this._spherical.radius);if(!(r>e)&&a)return Promise.resolve();this._sphericalEnd.radius=Math.min(e,s)}else this._sphericalEnd.radius=e;this._needsUpdate=!0,n||(this._spherical.radius=this._sphericalEnd.radius);const o=!n||Un(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(o)}dollyInFixed(e,n=!1){this._targetEnd.add(this._getCameraDirection(Sp).multiplyScalar(e)),n||this._target.copy(this._targetEnd);const r=!n||Un(this._target.x,this._targetEnd.x,this.restThreshold)&&Un(this._target.y,this._targetEnd.y,this.restThreshold)&&Un(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(r)}zoom(e,n=!1){return this.zoomTo(this._zoomEnd+e,n)}zoomTo(e,n=!1){this._isUserControllingZoom=!1,this._zoomEnd=pf(e,this.minZoom,this.maxZoom),this._needsUpdate=!0,n||(this._zoom=this._zoomEnd);const r=!n||Un(this._zoom,this._zoomEnd,this.restThreshold);return this._createOnRestPromise(r)}pan(e,n,r=!1){return console.warn("`pan` has been renamed to `truck`"),this.truck(e,n,r)}truck(e,n,r=!1){this._camera.updateMatrix(),sa.setFromMatrixColumn(this._camera.matrix,0),aa.setFromMatrixColumn(this._camera.matrix,1),sa.multiplyScalar(e),aa.multiplyScalar(-n);const i=on.copy(sa).add(aa),o=On.copy(this._targetEnd).add(i);return this.moveTo(o.x,o.y,o.z,r)}forward(e,n=!1){on.setFromMatrixColumn(this._camera.matrix,0),on.crossVectors(this._camera.up,on),on.multiplyScalar(e);const r=On.copy(this._targetEnd).add(on);return this.moveTo(r.x,r.y,r.z,n)}elevate(e,n=!1){return on.copy(this._camera.up).multiplyScalar(e),this.moveTo(this._targetEnd.x+on.x,this._targetEnd.y+on.y,this._targetEnd.z+on.z,n)}moveTo(e,n,r,i=!1){this._isUserControllingTruck=!1;const o=on.set(e,n,r).sub(this._targetEnd);this._encloseToBoundary(this._targetEnd,o,this.boundaryFriction),this._needsUpdate=!0,i||this._target.copy(this._targetEnd);const s=!i||Un(this._target.x,this._targetEnd.x,this.restThreshold)&&Un(this._target.y,this._targetEnd.y,this.restThreshold)&&Un(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(s)}lookInDirectionOf(e,n,r,i=!1){const a=on.set(e,n,r).sub(this._targetEnd).normalize().multiplyScalar(-this._sphericalEnd.radius);return this.setPosition(a.x,a.y,a.z,i)}fitToBox(e,n,{cover:r=!1,paddingLeft:i=0,paddingRight:o=0,paddingBottom:s=0,paddingTop:a=0}={}){const l=[],c=e.isBox3?Qd.copy(e):Qd.setFromObject(e);c.isEmpty()&&(console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"),Promise.resolve());const u=Ek(this._sphericalEnd.theta,Mk),d=Ek(this._sphericalEnd.phi,Mk);l.push(this.rotateTo(u,d,n));const f=on.setFromSpherical(this._sphericalEnd).normalize(),h=Ak.setFromUnitVectors(f,WE),g=Un(Math.abs(f.y),1);g&&h.multiply(XE.setFromAxisAngle(cy,u)),h.multiply(this._yAxisUpSpaceInverse);const y=Rk.makeEmpty();On.copy(c.min).applyQuaternion(h),y.expandByPoint(On),On.copy(c.min).setX(c.max.x).applyQuaternion(h),y.expandByPoint(On),On.copy(c.min).setY(c.max.y).applyQuaternion(h),y.expandByPoint(On),On.copy(c.max).setZ(c.min.z).applyQuaternion(h),y.expandByPoint(On),On.copy(c.min).setZ(c.max.z).applyQuaternion(h),y.expandByPoint(On),On.copy(c.max).setY(c.min.y).applyQuaternion(h),y.expandByPoint(On),On.copy(c.max).setX(c.min.x).applyQuaternion(h),y.expandByPoint(On),On.copy(c.max).applyQuaternion(h),y.expandByPoint(On),y.min.x-=i,y.min.y-=s,y.max.x+=o,y.max.y+=a,h.setFromUnitVectors(WE,f),g&&h.premultiply(XE.invert()),h.premultiply(this._yAxisUpSpace);const _=y.getSize(on),v=y.getCenter(On).applyQuaternion(h);if(ru(this._camera)){const x=this.getDistanceToFitBox(_.x,_.y,_.z,r);l.push(this.moveTo(v.x,v.y,v.z,n)),l.push(this.dollyTo(x,n)),l.push(this.setFocalOffset(0,0,0,n))}else if($l(this._camera)){const x=this._camera,w=x.right-x.left,S=x.top-x.bottom,E=r?Math.max(w/_.x,S/_.y):Math.min(w/_.x,S/_.y);l.push(this.moveTo(v.x,v.y,v.z,n)),l.push(this.zoomTo(E,n)),l.push(this.setFocalOffset(0,0,0,n))}return Promise.all(l)}fitToSphere(e,n){const r=[],o=e instanceof Wt.Sphere?YE.copy(e):Z2.createBoundingSphere(e,YE);if(r.push(this.moveTo(o.center.x,o.center.y,o.center.z,n)),ru(this._camera)){const s=this.getDistanceToFitSphere(o.radius);r.push(this.dollyTo(s,n))}else if($l(this._camera)){const s=this._camera.right-this._camera.left,a=this._camera.top-this._camera.bottom,l=2*o.radius,c=Math.min(s/l,a/l);r.push(this.zoomTo(c,n))}return r.push(this.setFocalOffset(0,0,0,n)),Promise.all(r)}setLookAt(e,n,r,i,o,s,a=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=Zd.NONE,this._changedDolly=0;const l=On.set(i,o,s),c=on.set(e,n,r);this._targetEnd.copy(l),this._sphericalEnd.setFromVector3(c.sub(l).applyQuaternion(this._yAxisUpSpace)),this.normalizeRotations(),this._needsUpdate=!0,a||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const u=!a||Un(this._target.x,this._targetEnd.x,this.restThreshold)&&Un(this._target.y,this._targetEnd.y,this.restThreshold)&&Un(this._target.z,this._targetEnd.z,this.restThreshold)&&Un(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&Un(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&Un(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(u)}lerpLookAt(e,n,r,i,o,s,a,l,c,u,d,f,h,g=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=Zd.NONE,this._changedDolly=0;const y=on.set(i,o,s),_=On.set(e,n,r);Xo.setFromVector3(_.sub(y).applyQuaternion(this._yAxisUpSpace));const v=Kd.set(u,d,f),x=On.set(a,l,c);bp.setFromVector3(x.sub(v).applyQuaternion(this._yAxisUpSpace)),this._targetEnd.copy(y.lerp(v,h));const w=bp.theta-Xo.theta,S=bp.phi-Xo.phi,E=bp.radius-Xo.radius;this._sphericalEnd.set(Xo.radius+E*h,Xo.phi+S*h,Xo.theta+w*h),this.normalizeRotations(),this._needsUpdate=!0,g||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const C=!g||Un(this._target.x,this._targetEnd.x,this.restThreshold)&&Un(this._target.y,this._targetEnd.y,this.restThreshold)&&Un(this._target.z,this._targetEnd.z,this.restThreshold)&&Un(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&Un(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&Un(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(C)}setPosition(e,n,r,i=!1){return this.setLookAt(e,n,r,this._targetEnd.x,this._targetEnd.y,this._targetEnd.z,i)}setTarget(e,n,r,i=!1){const o=this.getPosition(on),s=this.setLookAt(o.x,o.y,o.z,e,n,r,i);return this._sphericalEnd.phi=pf(this._sphericalEnd.phi,this.minPolarAngle,this.maxPolarAngle),s}setFocalOffset(e,n,r,i=!1){this._isUserControllingOffset=!1,this._focalOffsetEnd.set(e,n,r),this._needsUpdate=!0,i||this._focalOffset.copy(this._focalOffsetEnd);const o=!i||Un(this._focalOffset.x,this._focalOffsetEnd.x,this.restThreshold)&&Un(this._focalOffset.y,this._focalOffsetEnd.y,this.restThreshold)&&Un(this._focalOffset.z,this._focalOffsetEnd.z,this.restThreshold);return this._createOnRestPromise(o)}setOrbitPoint(e,n,r){this._camera.updateMatrixWorld(),sa.setFromMatrixColumn(this._camera.matrixWorldInverse,0),aa.setFromMatrixColumn(this._camera.matrixWorldInverse,1),iu.setFromMatrixColumn(this._camera.matrixWorldInverse,2);const i=on.set(e,n,r),o=i.distanceTo(this._camera.position),s=i.sub(this._camera.position);sa.multiplyScalar(s.x),aa.multiplyScalar(s.y),iu.multiplyScalar(s.z),on.copy(sa).add(aa).add(iu),on.z=on.z+o,this.dollyTo(o,!1),this.setFocalOffset(-on.x,on.y,-on.z,!1),this.moveTo(e,n,r,!1)}setBoundary(e){if(!e){this._boundary.min.set(-1/0,-1/0,-1/0),this._boundary.max.set(1/0,1/0,1/0),this._needsUpdate=!0;return}this._boundary.copy(e),this._boundary.clampPoint(this._targetEnd,this._targetEnd),this._needsUpdate=!0}setViewport(e,n,r,i){if(e===null){this._viewport=null;return}this._viewport=this._viewport||new Wt.Vector4,typeof e=="number"?this._viewport.set(e,n,r,i):this._viewport.copy(e)}getDistanceToFitBox(e,n,r,i=!1){if(GE(this._camera,"getDistanceToFitBox"))return this._spherical.radius;const o=e/n,s=this._camera.getEffectiveFOV()*_p,a=this._camera.aspect;return((i?o>a:on.pointerId===e)}_findPointerByMouseButton(e){return this._activePointers.find(n=>n.mouseButton===e)}_disposePointer(e){this._activePointers.splice(this._activePointers.indexOf(e),1)}_encloseToBoundary(e,n,r){const i=n.lengthSq();if(i===0)return e;const o=On.copy(n).add(e),a=this._boundary.clampPoint(o,Kd).sub(o),l=a.lengthSq();if(l===0)return e.add(n);if(l===i)return e;if(r===0)return e.add(n).add(a);{const c=1+r*l/n.dot(a);return e.add(On.copy(n).multiplyScalar(c)).add(a.multiplyScalar(1-r))}}_updateNearPlaneCorners(){if(ru(this._camera)){const e=this._camera,n=e.near,r=e.getEffectiveFOV()*_p,i=Math.tan(r*.5)*n,o=i*e.aspect;this._nearPlaneCorners[0].set(-o,-i,0),this._nearPlaneCorners[1].set(o,-i,0),this._nearPlaneCorners[2].set(o,i,0),this._nearPlaneCorners[3].set(-o,i,0)}else if($l(this._camera)){const e=this._camera,n=1/e.zoom,r=e.left*n,i=e.right*n,o=e.top*n,s=e.bottom*n;this._nearPlaneCorners[0].set(r,o,0),this._nearPlaneCorners[1].set(i,o,0),this._nearPlaneCorners[2].set(i,s,0),this._nearPlaneCorners[3].set(r,s,0)}}_collisionTest(){let e=1/0;if(!(this.colliderMeshes.length>=1)||GE(this._camera,"_collisionTest"))return e;const r=this._getTargetDirection(Sp);ZE.lookAt(Ck,r,this._camera.up);for(let i=0;i<4;i++){const o=On.copy(this._nearPlaneCorners[i]);o.applyMatrix4(ZE);const s=Kd.addVectors(this._target,o);uy.set(s,r),uy.far=this._spherical.radius+1;const a=uy.intersectObjects(this.colliderMeshes);a.length!==0&&a[0].distance{const r=()=>{this.removeEventListener("rest",r),n()};this.addEventListener("rest",r)}))}_addAllEventListeners(e){}_removeAllEventListeners(){}get dampingFactor(){return console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead."),0}set dampingFactor(e){console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead.")}get draggingDampingFactor(){return console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead."),0}set draggingDampingFactor(e){console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead.")}static createBoundingSphere(e,n=new Wt.Sphere){const r=n,i=r.center;Qd.makeEmpty(),e.traverseVisible(s=>{s.isMesh&&Qd.expandByObject(s)}),Qd.getCenter(i);let o=0;return e.traverseVisible(s=>{if(!s.isMesh)return;const a=s,l=a.geometry.clone();l.applyMatrix4(a.matrixWorld);const u=l.attributes.position;for(let d=0,f=u.count;d{M.useMemo(()=>{const E={Box3:zi,MathUtils:{clamp:Pu.clamp},Matrix4:rt,Quaternion:Hn,Raycaster:LS,Sphere:mo,Spherical:TR,Vector2:Ee,Vector3:Z,Vector4:an};qE.install({THREE:E}),kS({CameraControlsImpl:qE})},[]);const{camera:n,domElement:r,makeDefault:i,onStart:o,onEnd:s,onChange:a,regress:l,...c}=t,u=dn(E=>E.camera),d=dn(E=>E.gl),f=dn(E=>E.invalidate),h=dn(E=>E.events),g=dn(E=>E.setEvents),y=dn(E=>E.set),_=dn(E=>E.get),v=dn(E=>E.performance),x=n||u,w=r||h.connected||d.domElement,S=M.useMemo(()=>new qE(x),[x]);return kc((E,C)=>{S.enabled&&S.update(C)},-1),M.useEffect(()=>(S.connect(w),()=>void S.disconnect()),[w,S]),M.useEffect(()=>{const E=R=>{f(),l&&v.regress(),a&&a(R)},C=R=>{o&&o(R)},O=R=>{s&&s(R)};return S.addEventListener("update",E),S.addEventListener("controlstart",C),S.addEventListener("controlend",O),S.addEventListener("control",E),S.addEventListener("transitionstart",E),S.addEventListener("wake",E),()=>{S.removeEventListener("update",E),S.removeEventListener("controlstart",C),S.removeEventListener("controlend",O),S.removeEventListener("control",E),S.removeEventListener("transitionstart",E),S.removeEventListener("wake",E)}},[S,o,s,f,g,l,a]),M.useEffect(()=>{if(i){const E=_().controls;return y({controls:S}),()=>y({controls:E})}},[i,S]),M.createElement("primitive",yn({ref:e,object:S},c))});var R$={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Gf,function(){var n=function(){function r(h){return s.appendChild(h.dom),h}function i(h){for(var g=0;gl+1e3&&(u.update(1e3*c/(h-l),100),l=h,c=0,f)){var g=performance.memory;f.update(g.usedJSHeapSize/1048576,g.jsHeapSizeLimit/1048576)}return h},update:function(){a=this.end()},domElement:s,setMode:i}};return n.Panel=function(r,i,o){var s=1/0,a=0,l=Math.round,c=l(window.devicePixelRatio||1),u=80*c,d=48*c,f=3*c,h=2*c,g=3*c,y=15*c,_=74*c,v=30*c,x=document.createElement("canvas");x.width=u,x.height=d,x.style.cssText="width:80px;height:48px";var w=x.getContext("2d");return w.font="bold "+9*c+"px Helvetica,Arial,sans-serif",w.textBaseline="top",w.fillStyle=o,w.fillRect(0,0,u,d),w.fillStyle=i,w.fillText(r,f,h),w.fillRect(g,y,_,v),w.fillStyle=o,w.globalAlpha=.9,w.fillRect(g,y,_,v),{dom:x,update:function(S,E){s=Math.min(s,S),a=Math.max(a,S),w.fillStyle=o,w.globalAlpha=1,w.fillRect(0,0,u,y),w.fillStyle=i,w.fillText(l(S)+" "+r+" ("+l(s)+"-"+l(a)+")",f,h),w.drawImage(x,g+c,y,_-c,v,g,y,_-c,v),w.fillRect(g+_-c,y,c,v),w.fillStyle=o,w.globalAlpha=.9,w.fillRect(g+_-c,y,c,l((1-S/E)*v))}}},n})})(R$);var Zue=R$.exports;const que=Tc(Zue);function Dk(t,e){typeof t=="function"?t(e):t!=null&&(t.current=e)}function Kue(t,e=[],n){const[r,i]=M.useState();return M.useLayoutEffect(()=>{const o=t();return i(o),Dk(n,o),()=>Dk(n,null)},e),r}function Que({showPanel:t=0,className:e,parent:n}){const r=Kue(()=>new que,[]);return M.useEffect(()=>{if(r){const i=n&&n.current||document.body;r.showPanel(t),i?.appendChild(r.dom),e&&r.dom.classList.add(...e.split(" ").filter(a=>a));const o=Bce(()=>r.begin()),s=Hce(()=>r.end());return()=>{i?.removeChild(r.dom),o(),s()}}},[n,r,e,t]),null}const KE={apartment:"lebombo_1k.hdr",city:"potsdamer_platz_1k.hdr",dawn:"kiara_1_dawn_1k.hdr",forest:"forest_slope_1k.hdr",lobby:"st_fagans_interior_1k.hdr",night:"dikhololo_night_1k.hdr",park:"rooitou_park_1k.hdr",studio:"studio_small_03_1k.hdr",sunset:"venice_sunset_1k.hdr",warehouse:"empty_warehouse_01_1k.hdr"},Jue="https://raw.githack.com/pmndrs/drei-assets/456060a26bbeb8fdf79326f224b6d99b8bcce736/hdri/",Ik=t=>Array.isArray(t);function A$({files:t=["/px.png","/nx.png","/py.png","/ny.png","/pz.png","/nz.png"],path:e="",preset:n=void 0,encoding:r=void 0,extensions:i}={}){var o;let s=null,a=!1,l;if(n){if(!(n in KE))throw new Error("Preset must be one of: "+Object.keys(KE).join(", "));t=KE[n],e=Jue}if(a=Ik(t),l=Ik(t)?"cube":t.startsWith("data:application/exr")?"exr":t.startsWith("data:application/hdr")?"hdr":(o=t.split(".").pop())==null?void 0:o.toLowerCase(),s=a?A8:l==="hdr"?Uue:l==="exr"?Bue:null,!s)throw new Error("useEnvironment: Unrecognized file extension: "+t);const c=NS(s,a?[t]:t,h=>{h.setPath==null||h.setPath(e),i&&i(h)}),u=a?c[0]:c;u.mapping=a?fl:Jf;const d=3001,f=3e3;return"colorSpace"in u?u.colorSpace=r??a?"srgb":"srgb-linear":u.encoding=r??a?d:f,u}const ede=t=>t.current&&t.current.isScene,tde=t=>ede(t)?t.current:t;function FR(t,e,n,r,i=0){const o=tde(e||n),s=o.background,a=o.environment,l=o.backgroundBlurriness||0;return t!=="only"&&(o.environment=r),t&&(o.background=r),t&&o.backgroundBlurriness!==void 0&&(o.backgroundBlurriness=i),()=>{t!=="only"&&(o.environment=a),t&&(o.background=s),t&&o.backgroundBlurriness!==void 0&&(o.backgroundBlurriness=l)}}function zR({scene:t,background:e=!1,blur:n,map:r}){const i=dn(o=>o.scene);return M.useLayoutEffect(()=>{if(r)return FR(e,t,i,r,n)},[i,t,r,e,n]),null}function D$({background:t=!1,scene:e,blur:n,...r}){const i=A$(r),o=dn(s=>s.scene);return M.useLayoutEffect(()=>FR(t,e,o,i,n),[i,t,e,o,n]),null}function nde({children:t,near:e=1,far:n=1e3,resolution:r=256,frames:i=1,map:o,background:s=!1,blur:a,scene:l,files:c,path:u,preset:d=void 0,extensions:f}){const h=dn(w=>w.gl),g=dn(w=>w.scene),y=M.useRef(null),[_]=M.useState(()=>new Sc),v=M.useMemo(()=>{const w=new Cg(r);return w.texture.type=yr,w},[r]);M.useLayoutEffect(()=>(i===1&&y.current.update(h,_),FR(s,l,g,v.texture,a)),[t,_,v.texture,l,g,s,i,h]);let x=1;return kc(()=>{(i===1/0||xkS({GroundProjectedEnvImpl:zue}),[]);const a=M.useMemo(()=>[s],[s]),l=(e=t.ground)==null?void 0:e.height,c=(n=t.ground)==null?void 0:n.radius,u=(r=(i=t.ground)==null?void 0:i.scale)!==null&&r!==void 0?r:1e3;return M.createElement(M.Fragment,null,M.createElement(zR,yn({},t,{map:s})),M.createElement("groundProjectedEnvImpl",{args:a,scale:u,height:l,radius:c}))}function ide(t){return t.ground?M.createElement(rde,t):t.map?M.createElement(zR,t):t.children?M.createElement(nde,t):M.createElement(D$,t)}var I$={exports:{}},ode="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",sde=ode,ade=sde;function L$(){}function k$(){}k$.resetWarningCache=L$;var lde=function(){function t(r,i,o,s,a,l){if(l!==ade){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:k$,resetWarningCache:L$};return n.PropTypes=n,n};I$.exports=lde();var cde=I$.exports;const Jo=Tc(cde);Jo.func.isRequired,Jo.arrayOf(Jo.oneOfType([Jo.element,Jo.func])).isRequired;const Lk=new rt,kk=new rt,dy=[],Mp=new Er;class ude extends Ou{constructor(){super(),this.color=new lt("white"),this.instance={current:void 0},this.instanceKey={current:void 0}}get geometry(){var e;return(e=this.instance.current)==null?void 0:e.geometry}raycast(e,n){const r=this.instance.current;if(!r||!r.geometry||!r.material)return;Mp.geometry=r.geometry;const i=r.matrixWorld,o=r.userData.instances.indexOf(this.instanceKey);if(!(o===-1||o>r.count)){r.getMatrixAt(o,Lk),kk.multiplyMatrices(i,Lk),Mp.matrixWorld=kk,r.material instanceof jr?Mp.material.side=r.material.side:Mp.material.side=r.material[0].side,Mp.raycast(e,dy);for(let s=0,a=dy.length;s{M.useMemo(()=>kS({PositionMesh:ude}),[]);const i=M.useRef(),{subscribe:o,getParent:s}=M.useContext(t||N$);return M.useLayoutEffect(()=>o(i),[]),M.createElement("positionMesh",yn({instance:s(),instanceKey:i,ref:y$([r,i])},n),e)}),F$=M.forwardRef(({children:t,range:e,limit:n=1e3,frames:r=1/0,...i},o)=>{const[{context:s,instance:a}]=M.useState(()=>{const _=M.createContext(null);return{context:_,instance:M.forwardRef((v,x)=>M.createElement(vm,yn({context:_},v,{ref:x})))}}),l=M.useRef(null),[c,u]=M.useState([]),[[d,f]]=M.useState(()=>{const _=new Float32Array(n*16);for(let v=0;v1))]});M.useEffect(()=>{l.current.instanceMatrix.needsUpdate=!0});let h=0,g=0;kc(()=>{if(r===1/0||h({getParent:()=>l,subscribe:_=>(u(v=>[...v,_]),()=>u(v=>v.filter(x=>x.current!==_.current)))}),[]);return M.createElement("instancedMesh",yn({userData:{instances:c},matrixAutoUpdate:!1,ref:y$([o,l]),args:[null,null,0],raycast:()=>null},i),M.createElement("instancedBufferAttribute",{attach:"instanceMatrix",count:d.length/16,array:d,itemSize:16,usage:A2}),M.createElement("instancedBufferAttribute",{attach:"instanceColor",count:f.length/3,array:f,itemSize:3,usage:A2}),typeof t=="function"?M.createElement(s.Provider,{value:y},t(a)):M.createElement(N$.Provider,{value:y},t))});function fde({pixelated:t}){const e=dn(s=>s.gl),n=dn(s=>s.internal.active),r=dn(s=>s.performance.current),i=dn(s=>s.viewport.initialDpr),o=dn(s=>s.setDpr);return M.useEffect(()=>{const s=e.domElement;return()=>{n&&o(i),t&&s&&(s.style.imageRendering="auto")}},[]),M.useEffect(()=>{o(r*i),t&&e.domElement&&(e.domElement.style.imageRendering=r===1?"auto":"pixelated")},[r]),null}function hde(){const t=dn(r=>r.get),e=dn(r=>r.setEvents),n=dn(r=>r.performance.current);return M.useEffect(()=>{const r=t().events.enabled;return()=>e({enabled:r})},[]),M.useEffect(()=>e({enabled:n===1}),[n]),null}const FS=M.createContext(null),fy=new Z,Hk=new Z,pde=(t,e,n,r)=>{const i=e.dot(e),o=e.dot(t)-e.dot(n),s=e.dot(r);return s===0?-o/i:(fy.copy(r).multiplyScalar(i/s).sub(e),Hk.copy(r).multiplyScalar(o/s).add(n).sub(t),-fy.dot(Hk)/fy.dot(fy))},mde=new Z(0,1,0),Vk=new rt,QE=({direction:t,axis:e})=>{const{translation:n,translationLimits:r,annotations:i,annotationsClass:o,depthTest:s,scale:a,lineWidth:l,fixed:c,axisColors:u,hoveredColor:d,opacity:f,onDragStart:h,onDrag:g,onDragEnd:y,userData:_}=M.useContext(FS),v=dn(W=>W.controls),x=M.useRef(null),w=M.useRef(null),S=M.useRef(null),E=M.useRef(0),[C,O]=M.useState(!1),R=M.useCallback(W=>{i&&(x.current.innerText=`${n.current[e].toFixed(2)}`,x.current.style.display="block"),W.stopPropagation();const B=new rt().extractRotation(w.current.matrixWorld),j=W.point.clone(),$=new Z().setFromMatrixPosition(w.current.matrixWorld),q=t.clone().applyMatrix4(B).normalize();S.current={clickPoint:j,dir:q},E.current=n.current[e],h({component:"Arrow",axis:e,origin:$,directions:[q]}),v&&(v.enabled=!1),W.target.setPointerCapture(W.pointerId)},[i,t,v,h,n,e]),T=M.useCallback(W=>{if(W.stopPropagation(),C||O(!0),S.current){const{clickPoint:B,dir:j}=S.current,[$,q]=r?.[e]||[void 0,void 0];let K=pde(B,j,W.ray.origin,W.ray.direction);$!==void 0&&(K=Math.max(K,$-E.current)),q!==void 0&&(K=Math.min(K,q-E.current)),n.current[e]=E.current+K,i&&(x.current.innerText=`${n.current[e].toFixed(2)}`),Vk.makeTranslation(j.x*K,j.y*K,j.z*K),g(Vk)}},[i,g,C,n,r,e]),A=M.useCallback(W=>{i&&(x.current.style.display="none"),W.stopPropagation(),S.current=null,y(),v&&(v.enabled=!0),W.target.releasePointerCapture(W.pointerId)},[i,v,y]),F=M.useCallback(W=>{W.stopPropagation(),O(!1)},[]),{cylinderLength:N,coneWidth:U,coneLength:k,matrixL:z}=M.useMemo(()=>{const W=c?l/a*1.6:a/20,B=c?.2:a/5,j=c?1-B:a-B,$=new Hn().setFromUnitVectors(mde,t.clone().normalize()),q=new rt().makeRotationFromQuaternion($);return{cylinderLength:j,coneWidth:W,coneLength:B,matrixL:q}},[t,a,l,c]),G=C?d:u[e];return M.createElement("group",{ref:w},M.createElement("group",{matrix:z,matrixAutoUpdate:!1,onPointerDown:R,onPointerMove:T,onPointerUp:A,onPointerOut:F},i&&M.createElement(Hg,{position:[0,-k,0]},M.createElement("div",{style:{display:"none",background:"#151520",color:"white",padding:"6px 8px",borderRadius:7,whiteSpace:"nowrap"},className:o,ref:x})),M.createElement("mesh",{visible:!1,position:[0,(N+k)/2,0],userData:_},M.createElement("cylinderGeometry",{args:[U*1.4,U*1.4,N+k,8,1]})),M.createElement(Mx,{transparent:!0,raycast:()=>null,depthTest:s,points:[0,0,0,0,N,0],lineWidth:l,color:G,opacity:f,polygonOffset:!0,renderOrder:1,polygonOffsetFactor:-10,fog:!1}),M.createElement("mesh",{raycast:()=>null,position:[0,N+k/2,0],renderOrder:500},M.createElement("coneGeometry",{args:[U,k,24,1]}),M.createElement("meshBasicMaterial",{transparent:!0,depthTest:s,color:G,opacity:f,polygonOffset:!0,polygonOffsetFactor:-10,fog:!1}))))},gde=(t,e,n)=>{const r=Math.abs(t.x)>=Math.abs(t.y)&&Math.abs(t.x)>=Math.abs(t.z)?0:Math.abs(t.y)>=Math.abs(t.x)&&Math.abs(t.y)>=Math.abs(t.z)?1:2,i=[0,1,2].sort((g,y)=>Math.abs(e.getComponent(y))-Math.abs(e.getComponent(g))),o=r===i[0]?i[1]:i[0],s=t.getComponent(r),a=t.getComponent(o),l=e.getComponent(r),c=e.getComponent(o),u=n.getComponent(r),f=(n.getComponent(o)-u*(a/s))/(c-l*(a/s));return[(u-f*l)/s,f]},hy=new nd,py=new Z,jk=new rt,JE=({dir1:t,dir2:e,axis:n})=>{const{translation:r,translationLimits:i,annotations:o,annotationsClass:s,depthTest:a,scale:l,lineWidth:c,fixed:u,axisColors:d,hoveredColor:f,opacity:h,onDragStart:g,onDrag:y,onDragEnd:_,userData:v}=M.useContext(FS),x=dn(j=>j.controls),w=M.useRef(null),S=M.useRef(null),E=M.useRef(null),C=M.useRef(0),O=M.useRef(0),[R,T]=M.useState(!1),A=M.useCallback(j=>{o&&(w.current.innerText=`${r.current[(n+1)%3].toFixed(2)}, ${r.current[(n+2)%3].toFixed(2)}`,w.current.style.display="block"),j.stopPropagation();const $=j.point.clone(),q=new Z().setFromMatrixPosition(S.current.matrixWorld),K=new Z().setFromMatrixColumn(S.current.matrixWorld,0).normalize(),re=new Z().setFromMatrixColumn(S.current.matrixWorld,1).normalize(),J=new Z().setFromMatrixColumn(S.current.matrixWorld,2).normalize(),le=new ha().setFromNormalAndCoplanarPoint(J,q);E.current={clickPoint:$,e1:K,e2:re,plane:le},C.current=r.current[(n+1)%3],O.current=r.current[(n+2)%3],g({component:"Slider",axis:n,origin:q,directions:[K,re,J]}),x&&(x.enabled=!1),j.target.setPointerCapture(j.pointerId)},[o,x,g,n]),F=M.useCallback(j=>{if(j.stopPropagation(),R||T(!0),E.current){const{clickPoint:$,e1:q,e2:K,plane:re}=E.current,[J,le]=i?.[(n+1)%3]||[void 0,void 0],[ae,oe]=i?.[(n+2)%3]||[void 0,void 0];hy.copy(j.ray),hy.intersectPlane(re,py),hy.direction.negate(),hy.intersectPlane(re,py),py.sub($);let[De,Te]=gde(q,K,py);J!==void 0&&(De=Math.max(De,J-C.current)),le!==void 0&&(De=Math.min(De,le-C.current)),ae!==void 0&&(Te=Math.max(Te,ae-O.current)),oe!==void 0&&(Te=Math.min(Te,oe-O.current)),r.current[(n+1)%3]=C.current+De,r.current[(n+2)%3]=O.current+Te,o&&(w.current.innerText=`${r.current[(n+1)%3].toFixed(2)}, ${r.current[(n+2)%3].toFixed(2)}`),jk.makeTranslation(De*q.x+Te*K.x,De*q.y+Te*K.y,De*q.z+Te*K.z),y(jk)}},[o,y,R,r,i,n]),N=M.useCallback(j=>{o&&(w.current.style.display="none"),j.stopPropagation(),E.current=null,_(),x&&(x.enabled=!0),j.target.releasePointerCapture(j.pointerId)},[o,x,_]),U=M.useCallback(j=>{j.stopPropagation(),T(!1)},[]),k=M.useMemo(()=>{const j=t.clone().normalize(),$=e.clone().normalize();return new rt().makeBasis(j,$,j.clone().cross($))},[t,e]),z=u?1/7:l/7,G=u?.225:l*.225,W=R?f:d[n],B=M.useMemo(()=>[new Z(0,0,0),new Z(0,G,0),new Z(G,G,0),new Z(G,0,0),new Z(0,0,0)],[G]);return M.createElement("group",{ref:S,matrix:k,matrixAutoUpdate:!1},o&&M.createElement(Hg,{position:[0,0,0]},M.createElement("div",{style:{display:"none",background:"#151520",color:"white",padding:"6px 8px",borderRadius:7,whiteSpace:"nowrap"},className:s,ref:w})),M.createElement("group",{position:[z*1.7,z*1.7,0]},M.createElement("mesh",{visible:!0,onPointerDown:A,onPointerMove:F,onPointerUp:N,onPointerOut:U,scale:G,userData:v},M.createElement("planeGeometry",null),M.createElement("meshBasicMaterial",{transparent:!0,depthTest:a,color:W,polygonOffset:!0,polygonOffsetFactor:-10,side:Hr,fog:!1})),M.createElement(Mx,{position:[-G/2,-G/2,0],transparent:!0,depthTest:a,points:B,lineWidth:c,color:W,opacity:h,polygonOffset:!0,polygonOffsetFactor:-10,userData:v,fog:!1})))};var $k=0/0,vde="[object Symbol]",yde=/^\s+|\s+$/g,_de=/^[-+]0x[0-9a-f]+$/i,xde=/^0b[01]+$/i,wde=/^0o[0-7]+$/i,Sde=parseInt,bde=Object.prototype,Mde=bde.toString;function Ede(t,e,n){return t===t&&(n!==void 0&&(t=t<=n?t:n),e!==void 0&&(t=t>=e?t:e)),t}function Gk(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function Pde(t){return!!t&&typeof t=="object"}function Cde(t){return typeof t=="symbol"||Pde(t)&&Mde.call(t)==vde}function eP(t){if(typeof t=="number")return t;if(Cde(t))return $k;if(Gk(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Gk(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(yde,"");var n=xde.test(t);return n||wde.test(t)?Sde(t.slice(2),n?2:8):_de.test(t)?$k:+t}function Tde(t,e,n){return n===void 0&&(n=e,e=void 0),n!==void 0&&(n=eP(n),n=n===n?n:0),e!==void 0&&(e=eP(e),e=e===e?e:0),Ede(eP(t),e,n)}var Ode=Tde;const Rde=Tc(Ode),tP=new Z,nP=new Z,rP=t=>t*180/Math.PI,Ade=t=>t*Math.PI/180,Dde=(t,e,n,r,i)=>{tP.copy(t).sub(n),nP.copy(e).sub(n);const o=r.dot(r),s=i.dot(i),a=tP.dot(r)/o,l=tP.dot(i)/s,c=nP.dot(r)/o,u=nP.dot(i)/s,d=Math.atan2(l,a);return Math.atan2(u,c)-d},Ide=(t,e)=>{let n=Math.floor(t/e);return n=n<0?n+1:n,t-n*e},Wk=t=>{let e=Ide(t,2*Math.PI);return Math.abs(e)<1e-6?0:(e<0&&(e+=2*Math.PI),e)},my=new rt,Yk=new Z,gy=new nd,iP=new Z,oP=({dir1:t,dir2:e,axis:n})=>{const{rotationLimits:r,annotations:i,annotationsClass:o,depthTest:s,scale:a,lineWidth:l,fixed:c,axisColors:u,hoveredColor:d,opacity:f,onDragStart:h,onDrag:g,onDragEnd:y,userData:_}=M.useContext(FS),v=dn(G=>G.controls),x=M.useRef(null),w=M.useRef(null),S=M.useRef(0),E=M.useRef(0),C=M.useRef(null),[O,R]=M.useState(!1),T=M.useCallback(G=>{i&&(x.current.innerText=`${rP(E.current).toFixed(0)}º`,x.current.style.display="block"),G.stopPropagation();const W=G.point.clone(),B=new Z().setFromMatrixPosition(w.current.matrixWorld),j=new Z().setFromMatrixColumn(w.current.matrixWorld,0).normalize(),$=new Z().setFromMatrixColumn(w.current.matrixWorld,1).normalize(),q=new Z().setFromMatrixColumn(w.current.matrixWorld,2).normalize(),K=new ha().setFromNormalAndCoplanarPoint(q,B);C.current={clickPoint:W,origin:B,e1:j,e2:$,normal:q,plane:K},h({component:"Rotator",axis:n,origin:B,directions:[j,$,q]}),v&&(v.enabled=!1),G.target.setPointerCapture(G.pointerId)},[i,v,h,n]),A=M.useCallback(G=>{if(G.stopPropagation(),O||R(!0),C.current){const{clickPoint:W,origin:B,e1:j,e2:$,normal:q,plane:K}=C.current,[re,J]=r?.[n]||[void 0,void 0];gy.copy(G.ray),gy.intersectPlane(K,iP),gy.direction.negate(),gy.intersectPlane(K,iP);let le=Dde(W,iP,B,j,$),ae=rP(le);G.shiftKey&&(ae=Math.round(ae/10)*10,le=Ade(ae)),re!==void 0&&J!==void 0&&J-re<2*Math.PI?(le=Wk(le),le=le>Math.PI?le-2*Math.PI:le,le=Rde(le,re-S.current,J-S.current),E.current=S.current+le):(E.current=Wk(S.current+le),E.current=E.current>Math.PI?E.current-2*Math.PI:E.current),i&&(ae=rP(E.current),x.current.innerText=`${ae.toFixed(0)}º`),my.makeRotationAxis(q,le),Yk.copy(B).applyMatrix4(my).sub(B).negate(),my.setPosition(Yk),g(my)}},[i,g,O,r,n]),F=M.useCallback(G=>{i&&(x.current.style.display="none"),G.stopPropagation(),S.current=E.current,C.current=null,y(),v&&(v.enabled=!0),G.target.releasePointerCapture(G.pointerId)},[i,v,y]),N=M.useCallback(G=>{G.stopPropagation(),R(!1)},[]),U=M.useMemo(()=>{const G=t.clone().normalize(),W=e.clone().normalize();return new rt().makeBasis(G,W,G.clone().cross(W))},[t,e]),k=c?.65:a*.65,z=M.useMemo(()=>{const W=[];for(let B=0;B<=32;B++){const j=B*(Math.PI/2)/32;W.push(new Z(Math.cos(j)*k,Math.sin(j)*k,0))}return W},[k]);return M.createElement("group",{ref:w,onPointerDown:T,onPointerMove:A,onPointerUp:F,onPointerOut:N,matrix:U,matrixAutoUpdate:!1},i&&M.createElement(Hg,{position:[k,k,0]},M.createElement("div",{style:{display:"none",background:"#151520",color:"white",padding:"6px 8px",borderRadius:7,whiteSpace:"nowrap"},className:o,ref:x})),M.createElement(Mx,{points:z,lineWidth:l*4,visible:!1,userData:_}),M.createElement(Mx,{transparent:!0,raycast:()=>null,depthTest:s,points:z,lineWidth:l,color:O?d:u[n],opacity:f,polygonOffset:!0,polygonOffsetFactor:-10,fog:!1}))},Lde=new Z,kde=new Z,Nde=new Z,Fde=(t,e,n)=>{const r=n.width/2,i=n.height/2;e.updateMatrixWorld(!1);const o=t.project(e);return o.x=o.x*r+r,o.y=-(o.y*i)+i,o},zde=(t,e,n,r=1)=>{const i=Lde.set(t.x/n.width*2-1,-(t.y/n.height)*2+1,r);return i.unproject(e),i},Ude=(t,e,n,r)=>{const i=Fde(Nde.copy(t),n,r);let o=0;for(let s=0;s<2;++s){const a=kde.copy(i).setComponent(s,i.getComponent(s)+e),l=zde(a,n,r,a.z);o=Math.max(o,t.distanceTo(l))}return o},Xk=new rt,Zk=new rt,qk=new rt,vy=new rt,sP=new rt,Jd=new rt,Kk=new rt,Qk=new rt,ef=new zi,aP=new zi,Jk=new Z,eN=new Z,tN=new Z,nN=new Z,Ep=new Z(1,0,0),Pp=new Z(0,1,0),Cp=new Z(0,0,1),Bde=M.forwardRef(({matrix:t,onDragStart:e,onDrag:n,onDragEnd:r,autoTransform:i=!0,anchor:o,disableAxes:s=!1,disableSliders:a=!1,disableRotations:l=!1,activeAxes:c=[!0,!0,!0],offset:u=[0,0,0],rotation:d=[0,0,0],scale:f=1,lineWidth:h=4,fixed:g=!1,translationLimits:y,rotationLimits:_,depthTest:v=!0,axisColors:x=["#ff2060","#20df80","#2080ff"],hoveredColor:w="#ffff40",annotations:S=!1,annotationsClass:E,opacity:C=1,visible:O=!0,userData:R,children:T,...A},F)=>{const N=dn($=>$.invalidate),U=M.useRef(null),k=M.useRef(null),z=M.useRef(null),G=M.useRef(null),W=M.useRef([0,0,0]);M.useLayoutEffect(()=>{o&&(G.current.updateWorldMatrix(!0,!0),vy.copy(G.current.matrixWorld).invert(),ef.makeEmpty(),G.current.traverse($=>{$.geometry&&($.geometry.boundingBox||$.geometry.computeBoundingBox(),Jd.copy($.matrixWorld).premultiply(vy),aP.copy($.geometry.boundingBox),aP.applyMatrix4(Jd),ef.union(aP))}),Jk.copy(ef.max).add(ef.min).multiplyScalar(.5),eN.copy(ef.max).sub(ef.min).multiplyScalar(.5),tN.copy(eN).multiply(new Z(...o)).add(Jk),nN.set(...u).add(tN),z.current.position.copy(nN),N())});const B=M.useMemo(()=>({onDragStart:$=>{Xk.copy(k.current.matrix),Zk.copy(k.current.matrixWorld),e&&e($),N()},onDrag:$=>{qk.copy(U.current.matrixWorld),vy.copy(qk).invert(),sP.copy(Zk).premultiply($),Jd.copy(sP).premultiply(vy),Kk.copy(Xk).invert(),Qk.copy(Jd).multiply(Kk),i&&k.current.matrix.copy(Jd),n&&n(Jd,Qk,sP,$),N()},onDragEnd:()=>{r&&r(),N()},translation:W,translationLimits:y,rotationLimits:_,axisColors:x,hoveredColor:w,opacity:C,scale:f,lineWidth:h,fixed:g,depthTest:v,userData:R,annotations:S,annotationsClass:E}),[e,n,r,W,y,_,v,f,h,g,...x,w,C,R,i,S,E]),j=new Z;return kc($=>{if(g){const J=Ude(z.current.getWorldPosition(j),f,$.camera,$.size);if(z.current){var q,K,re;(((q=z.current)==null?void 0:q.scale.x)!==J||((K=z.current)==null?void 0:K.scale.y)!==J||((re=z.current)==null?void 0:re.scale.z)!==J)&&(z.current.scale.setScalar(J),$.invalidate())}}}),M.useImperativeHandle(F,()=>k.current,[]),M.useLayoutEffect(()=>{t&&t instanceof rt&&(k.current.matrix=t)},[t]),M.createElement(FS.Provider,{value:B},M.createElement("group",{ref:U},M.createElement("group",yn({ref:k,matrix:t,matrixAutoUpdate:!1},A),M.createElement("group",{visible:O,ref:z,position:u,rotation:d},!s&&c[0]&&M.createElement(QE,{axis:0,direction:Ep}),!s&&c[1]&&M.createElement(QE,{axis:1,direction:Pp}),!s&&c[2]&&M.createElement(QE,{axis:2,direction:Cp}),!a&&c[0]&&c[1]&&M.createElement(JE,{axis:2,dir1:Ep,dir2:Pp}),!a&&c[0]&&c[2]&&M.createElement(JE,{axis:1,dir1:Cp,dir2:Ep}),!a&&c[2]&&c[1]&&M.createElement(JE,{axis:0,dir1:Pp,dir2:Cp}),!l&&c[0]&&c[1]&&M.createElement(oP,{axis:2,dir1:Ep,dir2:Pp}),!l&&c[0]&&c[2]&&M.createElement(oP,{axis:1,dir1:Cp,dir2:Ep}),!l&&c[2]&&c[1]&&M.createElement(oP,{axis:0,dir1:Pp,dir2:Cp})),M.createElement("group",{ref:G},T))))});/** + */const Xt={LEFT:1,RIGHT:2,MIDDLE:4},Be=Object.freeze({NONE:0,ROTATE:1,TRUCK:2,OFFSET:4,DOLLY:8,ZOOM:16,TOUCH_ROTATE:32,TOUCH_TRUCK:64,TOUCH_OFFSET:128,TOUCH_DOLLY:256,TOUCH_ZOOM:512,TOUCH_DOLLY_TRUCK:1024,TOUCH_DOLLY_OFFSET:2048,TOUCH_DOLLY_ROTATE:4096,TOUCH_ZOOM_TRUCK:8192,TOUCH_ZOOM_OFFSET:16384,TOUCH_ZOOM_ROTATE:32768}),Zd={NONE:0,IN:1,OUT:-1};function ru(t){return t.isPerspectiveCamera}function $l(t){return t.isOrthographicCamera}const qd=Math.PI*2,Mk=Math.PI/2,O$=1e-5,_p=Math.PI/180;function pf(t,e,n){return Math.max(e,Math.min(n,t))}function Kn(t,e=O$){return Math.abs(t)0==h>u&&(h=u,n.value=(h-u)/o),h}function Pk(t,e,n,r,i=1/0,o,s){r=Math.max(1e-4,r);const a=2/r,l=a*o,c=1/(1+l+.48*l*l+.235*l*l*l);let u=e.x,d=e.y,f=e.z,h=t.x-u,g=t.y-d,y=t.z-f;const _=u,v=d,x=f,w=i*r,S=w*w,E=h*h+g*g+y*y;if(E>S){const z=Math.sqrt(E);h=h/z*w,g=g/z*w,y=y/z*w}u=t.x-h,d=t.y-g,f=t.z-y;const C=(n.x+a*h)*o,O=(n.y+a*g)*o,R=(n.z+a*y)*o;n.x=(n.x-a*C)*c,n.y=(n.y-a*O)*c,n.z=(n.z-a*R)*c,s.x=u+(h+C)*c,s.y=d+(g+O)*c,s.z=f+(y+R)*c;const T=_-t.x,A=v-t.y,F=x-t.z,N=s.x-_,U=s.y-v,k=s.z-x;return T*N+A*U+F*k>0&&(s.x=_,s.y=v,s.z=x,n.x=(s.x-_)/o,n.y=(s.y-v)/o,n.z=(s.z-x)/o),s}function $E(t,e){e.set(0,0),t.forEach(n=>{e.x+=n.clientX,e.y+=n.clientY}),e.x/=t.length,e.y/=t.length}function GE(t,e){return $l(t)?(console.warn(`${e} is not supported in OrthographicCamera`),!0):!1}let Gue=class{constructor(){this._listeners={}}addEventListener(e,n){const r=this._listeners;r[e]===void 0&&(r[e]=[]),r[e].indexOf(n)===-1&&r[e].push(n)}hasEventListener(e,n){const r=this._listeners;return r[e]!==void 0&&r[e].indexOf(n)!==-1}removeEventListener(e,n){const i=this._listeners[e];if(i!==void 0){const o=i.indexOf(n);o!==-1&&i.splice(o,1)}}removeAllEventListeners(e){if(!e){this._listeners={};return}Array.isArray(this._listeners[e])&&(this._listeners[e].length=0)}dispatchEvent(e){const r=this._listeners[e.type];if(r!==void 0){e.target=this;const i=r.slice(0);for(let o=0,s=i.length;o{},this._enabled=!0,this._state=Be.NONE,this._viewport=null,this._changedDolly=0,this._changedZoom=0,this._hasRested=!0,this._boundaryEnclosesCamera=!1,this._needsUpdate=!0,this._updatedLastTime=!1,this._elementRect=new DOMRect,this._isDragging=!1,this._activePointers=[],this._lockedPointer=null,this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._isUserControllingOffset=!1,this._isUserControllingZoom=!1,this._lastDollyDirection=Zd.NONE,this._thetaVelocity={value:0},this._phiVelocity={value:0},this._radiusVelocity={value:0},this._targetVelocity=new Wt.Vector3,this._focalOffsetVelocity=new Wt.Vector3,this._zoomVelocity={value:0},this._truckInternal=(S,E,C)=>{let O,R;if(ru(this._camera)){const T=on.copy(this._camera.position).sub(this._target),A=this._camera.getEffectiveFOV()*_p,F=T.length()*Math.tan(A*.5);O=this.truckSpeed*S*F/this._elementRect.height,R=this.truckSpeed*E*F/this._elementRect.height}else if($l(this._camera)){const T=this._camera;O=S*(T.right-T.left)/T.zoom/this._elementRect.width,R=E*(T.top-T.bottom)/T.zoom/this._elementRect.height}else return;this.verticalDragToForward?(C?this.setFocalOffset(this._focalOffsetEnd.x+O,this._focalOffsetEnd.y,this._focalOffsetEnd.z,!0):this.truck(O,0,!0),this.forward(-R,!0)):C?this.setFocalOffset(this._focalOffsetEnd.x+O,this._focalOffsetEnd.y+R,this._focalOffsetEnd.z,!0):this.truck(O,R,!0)},this._rotateInternal=(S,E)=>{const C=qd*this.azimuthRotateSpeed*S/this._elementRect.height,O=qd*this.polarRotateSpeed*E/this._elementRect.height;this.rotate(C,O,!0)},this._dollyInternal=(S,E,C)=>{const O=Math.pow(.95,-S*this.dollySpeed),R=this._sphericalEnd.radius,T=this._sphericalEnd.radius*O,A=Wt.MathUtils.clamp(T,this.minDistance,this.maxDistance),F=A-T;this.infinityDolly&&this.dollyToCursor?this._dollyToNoClamp(T,!0):this.infinityDolly&&!this.dollyToCursor?(this.dollyInFixed(F,!0),this._dollyToNoClamp(A,!0)):this._dollyToNoClamp(A,!0),this.dollyToCursor&&(this._changedDolly+=(this.infinityDolly?T:A)-R,this._dollyControlCoord.set(E,C)),this._lastDollyDirection=Math.sign(-S)},this._zoomInternal=(S,E,C)=>{const O=Math.pow(.95,S*this.dollySpeed),R=this._zoom,T=this._zoom*O;this.zoomTo(T,!0),this.dollyToCursor&&(this._changedZoom+=T-R,this._dollyControlCoord.set(E,C))},typeof Wt>"u"&&console.error("camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information."),this._camera=e,this._yAxisUpSpace=new Wt.Quaternion().setFromUnitVectors(this._camera.up,cy),this._yAxisUpSpaceInverse=this._yAxisUpSpace.clone().invert(),this._state=Be.NONE,this._target=new Wt.Vector3,this._targetEnd=this._target.clone(),this._focalOffset=new Wt.Vector3,this._focalOffsetEnd=this._focalOffset.clone(),this._spherical=new Wt.Spherical().setFromVector3(on.copy(this._camera.position).applyQuaternion(this._yAxisUpSpace)),this._sphericalEnd=this._spherical.clone(),this._lastDistance=this._spherical.radius,this._zoom=this._camera.zoom,this._zoomEnd=this._zoom,this._lastZoom=this._zoom,this._nearPlaneCorners=[new Wt.Vector3,new Wt.Vector3,new Wt.Vector3,new Wt.Vector3],this._updateNearPlaneCorners(),this._boundary=new Wt.Box3(new Wt.Vector3(-1/0,-1/0,-1/0),new Wt.Vector3(1/0,1/0,1/0)),this._cameraUp0=this._camera.up.clone(),this._target0=this._target.clone(),this._position0=this._camera.position.clone(),this._zoom0=this._zoom,this._focalOffset0=this._focalOffset.clone(),this._dollyControlCoord=new Wt.Vector2,this.mouseButtons={left:Be.ROTATE,middle:Be.DOLLY,right:Be.TRUCK,wheel:ru(this._camera)?Be.DOLLY:$l(this._camera)?Be.ZOOM:Be.NONE},this.touches={one:Be.TOUCH_ROTATE,two:ru(this._camera)?Be.TOUCH_DOLLY_TRUCK:$l(this._camera)?Be.TOUCH_ZOOM_TRUCK:Be.NONE,three:Be.TOUCH_TRUCK};const r=new Wt.Vector2,i=new Wt.Vector2,o=new Wt.Vector2,s=S=>{if(!this._enabled||!this._domElement)return;const E=S.pointerType!=="mouse"?null:(S.buttons&Xt.LEFT)===Xt.LEFT?Xt.LEFT:(S.buttons&Xt.MIDDLE)===Xt.MIDDLE?Xt.MIDDLE:(S.buttons&Xt.RIGHT)===Xt.RIGHT?Xt.RIGHT:null;if(E!==null){const O=this._findPointerByMouseButton(E);O&&this._disposePointer(O)}if((S.buttons&Xt.LEFT)===Xt.LEFT&&this._lockedPointer)return;const C={pointerId:S.pointerId,clientX:S.clientX,clientY:S.clientY,deltaX:0,deltaY:0,mouseButton:E};this._activePointers.push(C),this._domElement.ownerDocument.removeEventListener("pointermove",l,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",u),this._domElement.ownerDocument.addEventListener("pointermove",l,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",u),this._isDragging=!0,y(S)},a=S=>{if(!this._enabled||!this._domElement||this._lockedPointer)return;const E=(S.buttons&Xt.LEFT)===Xt.LEFT?Xt.LEFT:(S.buttons&Xt.MIDDLE)===Xt.MIDDLE?Xt.MIDDLE:(S.buttons&Xt.RIGHT)===Xt.RIGHT?Xt.RIGHT:null;if(E!==null){const O=this._findPointerByMouseButton(E);O&&this._disposePointer(O)}const C={pointerId:1,clientX:S.clientX,clientY:S.clientY,deltaX:0,deltaY:0,mouseButton:(S.buttons&Xt.LEFT)===Xt.LEFT?Xt.LEFT:(S.buttons&Xt.MIDDLE)===Xt.LEFT?Xt.MIDDLE:(S.buttons&Xt.RIGHT)===Xt.LEFT?Xt.RIGHT:null};this._activePointers.push(C),this._domElement.ownerDocument.removeEventListener("mousemove",c),this._domElement.ownerDocument.removeEventListener("mouseup",d),this._domElement.ownerDocument.addEventListener("mousemove",c),this._domElement.ownerDocument.addEventListener("mouseup",d),this._isDragging=!0,y(S)},l=S=>{S.cancelable&&S.preventDefault();const E=S.pointerId,C=this._lockedPointer||this._findPointerById(E);if(C){if(C.clientX=S.clientX,C.clientY=S.clientY,C.deltaX=S.movementX,C.deltaY=S.movementY,this._state=0,S.pointerType==="touch")switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else(!this._isDragging&&this._lockedPointer||this._isDragging&&(S.buttons&Xt.LEFT)===Xt.LEFT)&&(this._state=this._state|this.mouseButtons.left),this._isDragging&&(S.buttons&Xt.MIDDLE)===Xt.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),this._isDragging&&(S.buttons&Xt.RIGHT)===Xt.RIGHT&&(this._state=this._state|this.mouseButtons.right);_()}},c=S=>{const E=this._lockedPointer||this._findPointerById(1);E&&(E.clientX=S.clientX,E.clientY=S.clientY,E.deltaX=S.movementX,E.deltaY=S.movementY,this._state=0,(this._lockedPointer||(S.buttons&Xt.LEFT)===Xt.LEFT)&&(this._state=this._state|this.mouseButtons.left),(S.buttons&Xt.MIDDLE)===Xt.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(S.buttons&Xt.RIGHT)===Xt.RIGHT&&(this._state=this._state|this.mouseButtons.right),_())},u=S=>{const E=this._findPointerById(S.pointerId);if(!(E&&E===this._lockedPointer)){if(E&&this._disposePointer(E),S.pointerType==="touch")switch(this._activePointers.length){case 0:this._state=Be.NONE;break;case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else this._state=Be.NONE;v()}},d=()=>{const S=this._findPointerById(1);S&&S===this._lockedPointer||(S&&this._disposePointer(S),this._state=Be.NONE,v())};let f=-1;const h=S=>{if(!this._enabled||this.mouseButtons.wheel===Be.NONE)return;if(S.preventDefault(),this.dollyToCursor||this.mouseButtons.wheel===Be.ROTATE||this.mouseButtons.wheel===Be.TRUCK){const T=performance.now();f-T<1e3&&this._getClientRect(this._elementRect),f=T}const E=Yue?-1:-3,C=S.deltaMode===1?S.deltaY/E:S.deltaY/(E*10),O=this.dollyToCursor?(S.clientX-this._elementRect.x)/this._elementRect.width*2-1:0,R=this.dollyToCursor?(S.clientY-this._elementRect.y)/this._elementRect.height*-2+1:0;switch(this.mouseButtons.wheel){case Be.ROTATE:{this._rotateInternal(S.deltaX,S.deltaY),this._isUserControllingRotate=!0;break}case Be.TRUCK:{this._truckInternal(S.deltaX,S.deltaY,!1),this._isUserControllingTruck=!0;break}case Be.OFFSET:{this._truckInternal(S.deltaX,S.deltaY,!0),this._isUserControllingOffset=!0;break}case Be.DOLLY:{this._dollyInternal(-C,O,R),this._isUserControllingDolly=!0;break}case Be.ZOOM:{this._zoomInternal(-C,O,R),this._isUserControllingZoom=!0;break}}this.dispatchEvent({type:"control"})},g=S=>{if(!(!this._domElement||!this._enabled)){if(this.mouseButtons.right===q2.ACTION.NONE){const E=S instanceof PointerEvent?S.pointerId:(S instanceof MouseEvent,0),C=this._findPointerById(E);C&&this._disposePointer(C),this._domElement.ownerDocument.removeEventListener("pointermove",l,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",u),this._domElement.ownerDocument.removeEventListener("mousemove",c),this._domElement.ownerDocument.removeEventListener("mouseup",d);return}S.preventDefault()}},y=S=>{if(!this._enabled)return;if($E(this._activePointers,io),this._getClientRect(this._elementRect),r.copy(io),i.copy(io),this._activePointers.length>=2){const C=io.x-this._activePointers[1].clientX,O=io.y-this._activePointers[1].clientY,R=Math.sqrt(C*C+O*O);o.set(0,R);const T=(this._activePointers[0].clientX+this._activePointers[1].clientX)*.5,A=(this._activePointers[0].clientY+this._activePointers[1].clientY)*.5;i.set(T,A)}if(this._state=0,!S)this._lockedPointer&&(this._state=this._state|this.mouseButtons.left);else if("pointerType"in S&&S.pointerType==="touch")switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else!this._lockedPointer&&(S.buttons&Xt.LEFT)===Xt.LEFT&&(this._state=this._state|this.mouseButtons.left),(S.buttons&Xt.MIDDLE)===Xt.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(S.buttons&Xt.RIGHT)===Xt.RIGHT&&(this._state=this._state|this.mouseButtons.right);((this._state&Be.ROTATE)===Be.ROTATE||(this._state&Be.TOUCH_ROTATE)===Be.TOUCH_ROTATE||(this._state&Be.TOUCH_DOLLY_ROTATE)===Be.TOUCH_DOLLY_ROTATE||(this._state&Be.TOUCH_ZOOM_ROTATE)===Be.TOUCH_ZOOM_ROTATE)&&(this._sphericalEnd.theta=this._spherical.theta,this._sphericalEnd.phi=this._spherical.phi,this._thetaVelocity.value=0,this._phiVelocity.value=0),((this._state&Be.TRUCK)===Be.TRUCK||(this._state&Be.TOUCH_TRUCK)===Be.TOUCH_TRUCK||(this._state&Be.TOUCH_DOLLY_TRUCK)===Be.TOUCH_DOLLY_TRUCK||(this._state&Be.TOUCH_ZOOM_TRUCK)===Be.TOUCH_ZOOM_TRUCK)&&(this._targetEnd.copy(this._target),this._targetVelocity.set(0,0,0)),((this._state&Be.DOLLY)===Be.DOLLY||(this._state&Be.TOUCH_DOLLY)===Be.TOUCH_DOLLY||(this._state&Be.TOUCH_DOLLY_TRUCK)===Be.TOUCH_DOLLY_TRUCK||(this._state&Be.TOUCH_DOLLY_OFFSET)===Be.TOUCH_DOLLY_OFFSET||(this._state&Be.TOUCH_DOLLY_ROTATE)===Be.TOUCH_DOLLY_ROTATE)&&(this._sphericalEnd.radius=this._spherical.radius,this._radiusVelocity.value=0),((this._state&Be.ZOOM)===Be.ZOOM||(this._state&Be.TOUCH_ZOOM)===Be.TOUCH_ZOOM||(this._state&Be.TOUCH_ZOOM_TRUCK)===Be.TOUCH_ZOOM_TRUCK||(this._state&Be.TOUCH_ZOOM_OFFSET)===Be.TOUCH_ZOOM_OFFSET||(this._state&Be.TOUCH_ZOOM_ROTATE)===Be.TOUCH_ZOOM_ROTATE)&&(this._zoomEnd=this._zoom,this._zoomVelocity.value=0),((this._state&Be.OFFSET)===Be.OFFSET||(this._state&Be.TOUCH_OFFSET)===Be.TOUCH_OFFSET||(this._state&Be.TOUCH_DOLLY_OFFSET)===Be.TOUCH_DOLLY_OFFSET||(this._state&Be.TOUCH_ZOOM_OFFSET)===Be.TOUCH_ZOOM_OFFSET)&&(this._focalOffsetEnd.copy(this._focalOffset),this._focalOffsetVelocity.set(0,0,0)),this.dispatchEvent({type:"controlstart"})},_=()=>{if(!this._enabled)return;$E(this._activePointers,io);const E=this._domElement&&document.pointerLockElement===this._domElement?this._lockedPointer||this._activePointers[0]:null,C=E?-E.deltaX:i.x-io.x,O=E?-E.deltaY:i.y-io.y;if(i.copy(io),((this._state&Be.ROTATE)===Be.ROTATE||(this._state&Be.TOUCH_ROTATE)===Be.TOUCH_ROTATE||(this._state&Be.TOUCH_DOLLY_ROTATE)===Be.TOUCH_DOLLY_ROTATE||(this._state&Be.TOUCH_ZOOM_ROTATE)===Be.TOUCH_ZOOM_ROTATE)&&(this._rotateInternal(C,O),this._isUserControllingRotate=!0),(this._state&Be.DOLLY)===Be.DOLLY||(this._state&Be.ZOOM)===Be.ZOOM){const R=this.dollyToCursor?(r.x-this._elementRect.x)/this._elementRect.width*2-1:0,T=this.dollyToCursor?(r.y-this._elementRect.y)/this._elementRect.height*-2+1:0,A=this.dollyDragInverted?-1:1;(this._state&Be.DOLLY)===Be.DOLLY?(this._dollyInternal(A*O*ly,R,T),this._isUserControllingDolly=!0):(this._zoomInternal(A*O*ly,R,T),this._isUserControllingZoom=!0)}if((this._state&Be.TOUCH_DOLLY)===Be.TOUCH_DOLLY||(this._state&Be.TOUCH_ZOOM)===Be.TOUCH_ZOOM||(this._state&Be.TOUCH_DOLLY_TRUCK)===Be.TOUCH_DOLLY_TRUCK||(this._state&Be.TOUCH_ZOOM_TRUCK)===Be.TOUCH_ZOOM_TRUCK||(this._state&Be.TOUCH_DOLLY_OFFSET)===Be.TOUCH_DOLLY_OFFSET||(this._state&Be.TOUCH_ZOOM_OFFSET)===Be.TOUCH_ZOOM_OFFSET||(this._state&Be.TOUCH_DOLLY_ROTATE)===Be.TOUCH_DOLLY_ROTATE||(this._state&Be.TOUCH_ZOOM_ROTATE)===Be.TOUCH_ZOOM_ROTATE){const R=io.x-this._activePointers[1].clientX,T=io.y-this._activePointers[1].clientY,A=Math.sqrt(R*R+T*T),F=o.y-A;o.set(0,A);const N=this.dollyToCursor?(i.x-this._elementRect.x)/this._elementRect.width*2-1:0,U=this.dollyToCursor?(i.y-this._elementRect.y)/this._elementRect.height*-2+1:0;(this._state&Be.TOUCH_DOLLY)===Be.TOUCH_DOLLY||(this._state&Be.TOUCH_DOLLY_ROTATE)===Be.TOUCH_DOLLY_ROTATE||(this._state&Be.TOUCH_DOLLY_TRUCK)===Be.TOUCH_DOLLY_TRUCK||(this._state&Be.TOUCH_DOLLY_OFFSET)===Be.TOUCH_DOLLY_OFFSET?(this._dollyInternal(F*ly,N,U),this._isUserControllingDolly=!0):(this._zoomInternal(F*ly,N,U),this._isUserControllingZoom=!0)}((this._state&Be.TRUCK)===Be.TRUCK||(this._state&Be.TOUCH_TRUCK)===Be.TOUCH_TRUCK||(this._state&Be.TOUCH_DOLLY_TRUCK)===Be.TOUCH_DOLLY_TRUCK||(this._state&Be.TOUCH_ZOOM_TRUCK)===Be.TOUCH_ZOOM_TRUCK)&&(this._truckInternal(C,O,!1),this._isUserControllingTruck=!0),((this._state&Be.OFFSET)===Be.OFFSET||(this._state&Be.TOUCH_OFFSET)===Be.TOUCH_OFFSET||(this._state&Be.TOUCH_DOLLY_OFFSET)===Be.TOUCH_DOLLY_OFFSET||(this._state&Be.TOUCH_ZOOM_OFFSET)===Be.TOUCH_ZOOM_OFFSET)&&(this._truckInternal(C,O,!0),this._isUserControllingOffset=!0),this.dispatchEvent({type:"control"})},v=()=>{$E(this._activePointers,io),i.copy(io),(this._activePointers.length===0||this._activePointers.length===1&&this._activePointers[0]===this._lockedPointer)&&(this._isDragging=!1),this._activePointers.length===0&&this._domElement&&(this._domElement.ownerDocument.removeEventListener("pointermove",l,{passive:!1}),this._domElement.ownerDocument.removeEventListener("mousemove",c),this._domElement.ownerDocument.removeEventListener("pointerup",u),this._domElement.ownerDocument.removeEventListener("mouseup",d),this.dispatchEvent({type:"controlend"}))};this.lockPointer=()=>{!this._enabled||!this._domElement||(this.cancel(),this._lockedPointer={pointerId:-1,clientX:0,clientY:0,deltaX:0,deltaY:0,mouseButton:null},this._activePointers.push(this._lockedPointer),this._domElement.ownerDocument.removeEventListener("pointermove",l,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",u),this._domElement.requestPointerLock(),this._domElement.ownerDocument.addEventListener("pointerlockchange",x),this._domElement.ownerDocument.addEventListener("pointerlockerror",w),this._domElement.ownerDocument.addEventListener("pointermove",l,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",u),y())},this.unlockPointer=()=>{this._lockedPointer!==null&&(this._disposePointer(this._lockedPointer),this._lockedPointer=null),document.exitPointerLock(),this.cancel(),this._domElement&&(this._domElement.ownerDocument.removeEventListener("pointerlockchange",x),this._domElement.ownerDocument.removeEventListener("pointerlockerror",w))};const x=()=>{this._domElement&&this._domElement.ownerDocument.pointerLockElement===this._domElement||this.unlockPointer()},w=()=>{this.unlockPointer()};this._addAllEventListeners=S=>{this._domElement=S,this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none",this._domElement.addEventListener("pointerdown",s),Xue&&this._domElement.addEventListener("mousedown",a),this._domElement.addEventListener("pointercancel",u),this._domElement.addEventListener("wheel",h,{passive:!1}),this._domElement.addEventListener("contextmenu",g)},this._removeAllEventListeners=()=>{this._domElement&&(this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect="",this._domElement.removeEventListener("pointerdown",s),this._domElement.removeEventListener("mousedown",a),this._domElement.removeEventListener("pointercancel",u),this._domElement.removeEventListener("wheel",h,{passive:!1}),this._domElement.removeEventListener("contextmenu",g),this._domElement.ownerDocument.removeEventListener("pointermove",l,{passive:!1}),this._domElement.ownerDocument.removeEventListener("mousemove",c),this._domElement.ownerDocument.removeEventListener("pointerup",u),this._domElement.ownerDocument.removeEventListener("mouseup",d),this._domElement.ownerDocument.removeEventListener("pointerlockchange",x),this._domElement.ownerDocument.removeEventListener("pointerlockerror",w))},this.cancel=()=>{this._state!==Be.NONE&&(this._state=Be.NONE,this._activePointers.length=0,v())},n&&this.connect(n),this.update(0)}get camera(){return this._camera}set camera(e){this._camera=e,this.updateCameraUp(),this._camera.updateProjectionMatrix(),this._updateNearPlaneCorners(),this._needsUpdate=!0}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this._domElement&&(e?(this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none"):(this.cancel(),this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect=""))}get active(){return!this._hasRested}get currentAction(){return this._state}get distance(){return this._spherical.radius}set distance(e){this._spherical.radius===e&&this._sphericalEnd.radius===e||(this._spherical.radius=e,this._sphericalEnd.radius=e,this._needsUpdate=!0)}get azimuthAngle(){return this._spherical.theta}set azimuthAngle(e){this._spherical.theta===e&&this._sphericalEnd.theta===e||(this._spherical.theta=e,this._sphericalEnd.theta=e,this._needsUpdate=!0)}get polarAngle(){return this._spherical.phi}set polarAngle(e){this._spherical.phi===e&&this._sphericalEnd.phi===e||(this._spherical.phi=e,this._sphericalEnd.phi=e,this._needsUpdate=!0)}get boundaryEnclosesCamera(){return this._boundaryEnclosesCamera}set boundaryEnclosesCamera(e){this._boundaryEnclosesCamera=e,this._needsUpdate=!0}addEventListener(e,n){super.addEventListener(e,n)}removeEventListener(e,n){super.removeEventListener(e,n)}rotate(e,n,r=!1){return this.rotateTo(this._sphericalEnd.theta+e,this._sphericalEnd.phi+n,r)}rotateAzimuthTo(e,n=!1){return this.rotateTo(e,this._sphericalEnd.phi,n)}rotatePolarTo(e,n=!1){return this.rotateTo(this._sphericalEnd.theta,e,n)}rotateTo(e,n,r=!1){this._isUserControllingRotate=!1;const i=pf(e,this.minAzimuthAngle,this.maxAzimuthAngle),o=pf(n,this.minPolarAngle,this.maxPolarAngle);this._sphericalEnd.theta=i,this._sphericalEnd.phi=o,this._sphericalEnd.makeSafe(),this._needsUpdate=!0,r||(this._spherical.theta=this._sphericalEnd.theta,this._spherical.phi=this._sphericalEnd.phi);const s=!r||Un(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&Un(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold);return this._createOnRestPromise(s)}dolly(e,n=!1){return this.dollyTo(this._sphericalEnd.radius-e,n)}dollyTo(e,n=!1){return this._isUserControllingDolly=!1,this._lastDollyDirection=Zd.NONE,this._changedDolly=0,this._dollyToNoClamp(pf(e,this.minDistance,this.maxDistance),n)}_dollyToNoClamp(e,n=!1){const r=this._sphericalEnd.radius;if(this.colliderMeshes.length>=1){const s=this._collisionTest(),a=Un(s,this._spherical.radius);if(!(r>e)&&a)return Promise.resolve();this._sphericalEnd.radius=Math.min(e,s)}else this._sphericalEnd.radius=e;this._needsUpdate=!0,n||(this._spherical.radius=this._sphericalEnd.radius);const o=!n||Un(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(o)}dollyInFixed(e,n=!1){this._targetEnd.add(this._getCameraDirection(Sp).multiplyScalar(e)),n||this._target.copy(this._targetEnd);const r=!n||Un(this._target.x,this._targetEnd.x,this.restThreshold)&&Un(this._target.y,this._targetEnd.y,this.restThreshold)&&Un(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(r)}zoom(e,n=!1){return this.zoomTo(this._zoomEnd+e,n)}zoomTo(e,n=!1){this._isUserControllingZoom=!1,this._zoomEnd=pf(e,this.minZoom,this.maxZoom),this._needsUpdate=!0,n||(this._zoom=this._zoomEnd);const r=!n||Un(this._zoom,this._zoomEnd,this.restThreshold);return this._createOnRestPromise(r)}pan(e,n,r=!1){return console.warn("`pan` has been renamed to `truck`"),this.truck(e,n,r)}truck(e,n,r=!1){this._camera.updateMatrix(),sa.setFromMatrixColumn(this._camera.matrix,0),aa.setFromMatrixColumn(this._camera.matrix,1),sa.multiplyScalar(e),aa.multiplyScalar(-n);const i=on.copy(sa).add(aa),o=On.copy(this._targetEnd).add(i);return this.moveTo(o.x,o.y,o.z,r)}forward(e,n=!1){on.setFromMatrixColumn(this._camera.matrix,0),on.crossVectors(this._camera.up,on),on.multiplyScalar(e);const r=On.copy(this._targetEnd).add(on);return this.moveTo(r.x,r.y,r.z,n)}elevate(e,n=!1){return on.copy(this._camera.up).multiplyScalar(e),this.moveTo(this._targetEnd.x+on.x,this._targetEnd.y+on.y,this._targetEnd.z+on.z,n)}moveTo(e,n,r,i=!1){this._isUserControllingTruck=!1;const o=on.set(e,n,r).sub(this._targetEnd);this._encloseToBoundary(this._targetEnd,o,this.boundaryFriction),this._needsUpdate=!0,i||this._target.copy(this._targetEnd);const s=!i||Un(this._target.x,this._targetEnd.x,this.restThreshold)&&Un(this._target.y,this._targetEnd.y,this.restThreshold)&&Un(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(s)}lookInDirectionOf(e,n,r,i=!1){const a=on.set(e,n,r).sub(this._targetEnd).normalize().multiplyScalar(-this._sphericalEnd.radius);return this.setPosition(a.x,a.y,a.z,i)}fitToBox(e,n,{cover:r=!1,paddingLeft:i=0,paddingRight:o=0,paddingBottom:s=0,paddingTop:a=0}={}){const l=[],c=e.isBox3?Qd.copy(e):Qd.setFromObject(e);c.isEmpty()&&(console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"),Promise.resolve());const u=Ek(this._sphericalEnd.theta,Mk),d=Ek(this._sphericalEnd.phi,Mk);l.push(this.rotateTo(u,d,n));const f=on.setFromSpherical(this._sphericalEnd).normalize(),h=Ak.setFromUnitVectors(f,WE),g=Un(Math.abs(f.y),1);g&&h.multiply(XE.setFromAxisAngle(cy,u)),h.multiply(this._yAxisUpSpaceInverse);const y=Rk.makeEmpty();On.copy(c.min).applyQuaternion(h),y.expandByPoint(On),On.copy(c.min).setX(c.max.x).applyQuaternion(h),y.expandByPoint(On),On.copy(c.min).setY(c.max.y).applyQuaternion(h),y.expandByPoint(On),On.copy(c.max).setZ(c.min.z).applyQuaternion(h),y.expandByPoint(On),On.copy(c.min).setZ(c.max.z).applyQuaternion(h),y.expandByPoint(On),On.copy(c.max).setY(c.min.y).applyQuaternion(h),y.expandByPoint(On),On.copy(c.max).setX(c.min.x).applyQuaternion(h),y.expandByPoint(On),On.copy(c.max).applyQuaternion(h),y.expandByPoint(On),y.min.x-=i,y.min.y-=s,y.max.x+=o,y.max.y+=a,h.setFromUnitVectors(WE,f),g&&h.premultiply(XE.invert()),h.premultiply(this._yAxisUpSpace);const _=y.getSize(on),v=y.getCenter(On).applyQuaternion(h);if(ru(this._camera)){const x=this.getDistanceToFitBox(_.x,_.y,_.z,r);l.push(this.moveTo(v.x,v.y,v.z,n)),l.push(this.dollyTo(x,n)),l.push(this.setFocalOffset(0,0,0,n))}else if($l(this._camera)){const x=this._camera,w=x.right-x.left,S=x.top-x.bottom,E=r?Math.max(w/_.x,S/_.y):Math.min(w/_.x,S/_.y);l.push(this.moveTo(v.x,v.y,v.z,n)),l.push(this.zoomTo(E,n)),l.push(this.setFocalOffset(0,0,0,n))}return Promise.all(l)}fitToSphere(e,n){const r=[],o=e instanceof Wt.Sphere?YE.copy(e):q2.createBoundingSphere(e,YE);if(r.push(this.moveTo(o.center.x,o.center.y,o.center.z,n)),ru(this._camera)){const s=this.getDistanceToFitSphere(o.radius);r.push(this.dollyTo(s,n))}else if($l(this._camera)){const s=this._camera.right-this._camera.left,a=this._camera.top-this._camera.bottom,l=2*o.radius,c=Math.min(s/l,a/l);r.push(this.zoomTo(c,n))}return r.push(this.setFocalOffset(0,0,0,n)),Promise.all(r)}setLookAt(e,n,r,i,o,s,a=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=Zd.NONE,this._changedDolly=0;const l=On.set(i,o,s),c=on.set(e,n,r);this._targetEnd.copy(l),this._sphericalEnd.setFromVector3(c.sub(l).applyQuaternion(this._yAxisUpSpace)),this.normalizeRotations(),this._needsUpdate=!0,a||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const u=!a||Un(this._target.x,this._targetEnd.x,this.restThreshold)&&Un(this._target.y,this._targetEnd.y,this.restThreshold)&&Un(this._target.z,this._targetEnd.z,this.restThreshold)&&Un(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&Un(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&Un(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(u)}lerpLookAt(e,n,r,i,o,s,a,l,c,u,d,f,h,g=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=Zd.NONE,this._changedDolly=0;const y=on.set(i,o,s),_=On.set(e,n,r);Xo.setFromVector3(_.sub(y).applyQuaternion(this._yAxisUpSpace));const v=Kd.set(u,d,f),x=On.set(a,l,c);bp.setFromVector3(x.sub(v).applyQuaternion(this._yAxisUpSpace)),this._targetEnd.copy(y.lerp(v,h));const w=bp.theta-Xo.theta,S=bp.phi-Xo.phi,E=bp.radius-Xo.radius;this._sphericalEnd.set(Xo.radius+E*h,Xo.phi+S*h,Xo.theta+w*h),this.normalizeRotations(),this._needsUpdate=!0,g||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const C=!g||Un(this._target.x,this._targetEnd.x,this.restThreshold)&&Un(this._target.y,this._targetEnd.y,this.restThreshold)&&Un(this._target.z,this._targetEnd.z,this.restThreshold)&&Un(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&Un(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&Un(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(C)}setPosition(e,n,r,i=!1){return this.setLookAt(e,n,r,this._targetEnd.x,this._targetEnd.y,this._targetEnd.z,i)}setTarget(e,n,r,i=!1){const o=this.getPosition(on),s=this.setLookAt(o.x,o.y,o.z,e,n,r,i);return this._sphericalEnd.phi=pf(this._sphericalEnd.phi,this.minPolarAngle,this.maxPolarAngle),s}setFocalOffset(e,n,r,i=!1){this._isUserControllingOffset=!1,this._focalOffsetEnd.set(e,n,r),this._needsUpdate=!0,i||this._focalOffset.copy(this._focalOffsetEnd);const o=!i||Un(this._focalOffset.x,this._focalOffsetEnd.x,this.restThreshold)&&Un(this._focalOffset.y,this._focalOffsetEnd.y,this.restThreshold)&&Un(this._focalOffset.z,this._focalOffsetEnd.z,this.restThreshold);return this._createOnRestPromise(o)}setOrbitPoint(e,n,r){this._camera.updateMatrixWorld(),sa.setFromMatrixColumn(this._camera.matrixWorldInverse,0),aa.setFromMatrixColumn(this._camera.matrixWorldInverse,1),iu.setFromMatrixColumn(this._camera.matrixWorldInverse,2);const i=on.set(e,n,r),o=i.distanceTo(this._camera.position),s=i.sub(this._camera.position);sa.multiplyScalar(s.x),aa.multiplyScalar(s.y),iu.multiplyScalar(s.z),on.copy(sa).add(aa).add(iu),on.z=on.z+o,this.dollyTo(o,!1),this.setFocalOffset(-on.x,on.y,-on.z,!1),this.moveTo(e,n,r,!1)}setBoundary(e){if(!e){this._boundary.min.set(-1/0,-1/0,-1/0),this._boundary.max.set(1/0,1/0,1/0),this._needsUpdate=!0;return}this._boundary.copy(e),this._boundary.clampPoint(this._targetEnd,this._targetEnd),this._needsUpdate=!0}setViewport(e,n,r,i){if(e===null){this._viewport=null;return}this._viewport=this._viewport||new Wt.Vector4,typeof e=="number"?this._viewport.set(e,n,r,i):this._viewport.copy(e)}getDistanceToFitBox(e,n,r,i=!1){if(GE(this._camera,"getDistanceToFitBox"))return this._spherical.radius;const o=e/n,s=this._camera.getEffectiveFOV()*_p,a=this._camera.aspect;return((i?o>a:on.pointerId===e)}_findPointerByMouseButton(e){return this._activePointers.find(n=>n.mouseButton===e)}_disposePointer(e){this._activePointers.splice(this._activePointers.indexOf(e),1)}_encloseToBoundary(e,n,r){const i=n.lengthSq();if(i===0)return e;const o=On.copy(n).add(e),a=this._boundary.clampPoint(o,Kd).sub(o),l=a.lengthSq();if(l===0)return e.add(n);if(l===i)return e;if(r===0)return e.add(n).add(a);{const c=1+r*l/n.dot(a);return e.add(On.copy(n).multiplyScalar(c)).add(a.multiplyScalar(1-r))}}_updateNearPlaneCorners(){if(ru(this._camera)){const e=this._camera,n=e.near,r=e.getEffectiveFOV()*_p,i=Math.tan(r*.5)*n,o=i*e.aspect;this._nearPlaneCorners[0].set(-o,-i,0),this._nearPlaneCorners[1].set(o,-i,0),this._nearPlaneCorners[2].set(o,i,0),this._nearPlaneCorners[3].set(-o,i,0)}else if($l(this._camera)){const e=this._camera,n=1/e.zoom,r=e.left*n,i=e.right*n,o=e.top*n,s=e.bottom*n;this._nearPlaneCorners[0].set(r,o,0),this._nearPlaneCorners[1].set(i,o,0),this._nearPlaneCorners[2].set(i,s,0),this._nearPlaneCorners[3].set(r,s,0)}}_collisionTest(){let e=1/0;if(!(this.colliderMeshes.length>=1)||GE(this._camera,"_collisionTest"))return e;const r=this._getTargetDirection(Sp);ZE.lookAt(Ck,r,this._camera.up);for(let i=0;i<4;i++){const o=On.copy(this._nearPlaneCorners[i]);o.applyMatrix4(ZE);const s=Kd.addVectors(this._target,o);uy.set(s,r),uy.far=this._spherical.radius+1;const a=uy.intersectObjects(this.colliderMeshes);a.length!==0&&a[0].distance{const r=()=>{this.removeEventListener("rest",r),n()};this.addEventListener("rest",r)}))}_addAllEventListeners(e){}_removeAllEventListeners(){}get dampingFactor(){return console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead."),0}set dampingFactor(e){console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead.")}get draggingDampingFactor(){return console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead."),0}set draggingDampingFactor(e){console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead.")}static createBoundingSphere(e,n=new Wt.Sphere){const r=n,i=r.center;Qd.makeEmpty(),e.traverseVisible(s=>{s.isMesh&&Qd.expandByObject(s)}),Qd.getCenter(i);let o=0;return e.traverseVisible(s=>{if(!s.isMesh)return;const a=s,l=a.geometry.clone();l.applyMatrix4(a.matrixWorld);const u=l.attributes.position;for(let d=0,f=u.count;d{M.useMemo(()=>{const E={Box3:zi,MathUtils:{clamp:Pu.clamp},Matrix4:rt,Quaternion:Hn,Raycaster:LS,Sphere:mo,Spherical:TR,Vector2:Ee,Vector3:Z,Vector4:an};qE.install({THREE:E}),kS({CameraControlsImpl:qE})},[]);const{camera:n,domElement:r,makeDefault:i,onStart:o,onEnd:s,onChange:a,regress:l,...c}=t,u=dn(E=>E.camera),d=dn(E=>E.gl),f=dn(E=>E.invalidate),h=dn(E=>E.events),g=dn(E=>E.setEvents),y=dn(E=>E.set),_=dn(E=>E.get),v=dn(E=>E.performance),x=n||u,w=r||h.connected||d.domElement,S=M.useMemo(()=>new qE(x),[x]);return kc((E,C)=>{S.enabled&&S.update(C)},-1),M.useEffect(()=>(S.connect(w),()=>void S.disconnect()),[w,S]),M.useEffect(()=>{const E=R=>{f(),l&&v.regress(),a&&a(R)},C=R=>{o&&o(R)},O=R=>{s&&s(R)};return S.addEventListener("update",E),S.addEventListener("controlstart",C),S.addEventListener("controlend",O),S.addEventListener("control",E),S.addEventListener("transitionstart",E),S.addEventListener("wake",E),()=>{S.removeEventListener("update",E),S.removeEventListener("controlstart",C),S.removeEventListener("controlend",O),S.removeEventListener("control",E),S.removeEventListener("transitionstart",E),S.removeEventListener("wake",E)}},[S,o,s,f,g,l,a]),M.useEffect(()=>{if(i){const E=_().controls;return y({controls:S}),()=>y({controls:E})}},[i,S]),M.createElement("primitive",yn({ref:e,object:S},c))});var A$={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Gf,function(){var n=function(){function r(h){return s.appendChild(h.dom),h}function i(h){for(var g=0;gl+1e3&&(u.update(1e3*c/(h-l),100),l=h,c=0,f)){var g=performance.memory;f.update(g.usedJSHeapSize/1048576,g.jsHeapSizeLimit/1048576)}return h},update:function(){a=this.end()},domElement:s,setMode:i}};return n.Panel=function(r,i,o){var s=1/0,a=0,l=Math.round,c=l(window.devicePixelRatio||1),u=80*c,d=48*c,f=3*c,h=2*c,g=3*c,y=15*c,_=74*c,v=30*c,x=document.createElement("canvas");x.width=u,x.height=d,x.style.cssText="width:80px;height:48px";var w=x.getContext("2d");return w.font="bold "+9*c+"px Helvetica,Arial,sans-serif",w.textBaseline="top",w.fillStyle=o,w.fillRect(0,0,u,d),w.fillStyle=i,w.fillText(r,f,h),w.fillRect(g,y,_,v),w.fillStyle=o,w.globalAlpha=.9,w.fillRect(g,y,_,v),{dom:x,update:function(S,E){s=Math.min(s,S),a=Math.max(a,S),w.fillStyle=o,w.globalAlpha=1,w.fillRect(0,0,u,y),w.fillStyle=i,w.fillText(l(S)+" "+r+" ("+l(s)+"-"+l(a)+")",f,h),w.drawImage(x,g+c,y,_-c,v,g,y,_-c,v),w.fillRect(g+_-c,y,c,v),w.fillStyle=o,w.globalAlpha=.9,w.fillRect(g+_-c,y,c,l((1-S/E)*v))}}},n})})(A$);var que=A$.exports;const Kue=Tc(que);function Dk(t,e){typeof t=="function"?t(e):t!=null&&(t.current=e)}function Que(t,e=[],n){const[r,i]=M.useState();return M.useLayoutEffect(()=>{const o=t();return i(o),Dk(n,o),()=>Dk(n,null)},e),r}function Jue({showPanel:t=0,className:e,parent:n}){const r=Que(()=>new Kue,[]);return M.useEffect(()=>{if(r){const i=n&&n.current||document.body;r.showPanel(t),i?.appendChild(r.dom),e&&r.dom.classList.add(...e.split(" ").filter(a=>a));const o=Hce(()=>r.begin()),s=Vce(()=>r.end());return()=>{i?.removeChild(r.dom),o(),s()}}},[n,r,e,t]),null}const KE={apartment:"lebombo_1k.hdr",city:"potsdamer_platz_1k.hdr",dawn:"kiara_1_dawn_1k.hdr",forest:"forest_slope_1k.hdr",lobby:"st_fagans_interior_1k.hdr",night:"dikhololo_night_1k.hdr",park:"rooitou_park_1k.hdr",studio:"studio_small_03_1k.hdr",sunset:"venice_sunset_1k.hdr",warehouse:"empty_warehouse_01_1k.hdr"},ede="https://raw.githack.com/pmndrs/drei-assets/456060a26bbeb8fdf79326f224b6d99b8bcce736/hdri/",Ik=t=>Array.isArray(t);function D$({files:t=["/px.png","/nx.png","/py.png","/ny.png","/pz.png","/nz.png"],path:e="",preset:n=void 0,encoding:r=void 0,extensions:i}={}){var o;let s=null,a=!1,l;if(n){if(!(n in KE))throw new Error("Preset must be one of: "+Object.keys(KE).join(", "));t=KE[n],e=ede}if(a=Ik(t),l=Ik(t)?"cube":t.startsWith("data:application/exr")?"exr":t.startsWith("data:application/hdr")?"hdr":(o=t.split(".").pop())==null?void 0:o.toLowerCase(),s=a?D8:l==="hdr"?Bue:l==="exr"?Hue:null,!s)throw new Error("useEnvironment: Unrecognized file extension: "+t);const c=NS(s,a?[t]:t,h=>{h.setPath==null||h.setPath(e),i&&i(h)}),u=a?c[0]:c;u.mapping=a?fl:Jf;const d=3001,f=3e3;return"colorSpace"in u?u.colorSpace=r??a?"srgb":"srgb-linear":u.encoding=r??a?d:f,u}const tde=t=>t.current&&t.current.isScene,nde=t=>tde(t)?t.current:t;function FR(t,e,n,r,i=0){const o=nde(e||n),s=o.background,a=o.environment,l=o.backgroundBlurriness||0;return t!=="only"&&(o.environment=r),t&&(o.background=r),t&&o.backgroundBlurriness!==void 0&&(o.backgroundBlurriness=i),()=>{t!=="only"&&(o.environment=a),t&&(o.background=s),t&&o.backgroundBlurriness!==void 0&&(o.backgroundBlurriness=l)}}function zR({scene:t,background:e=!1,blur:n,map:r}){const i=dn(o=>o.scene);return M.useLayoutEffect(()=>{if(r)return FR(e,t,i,r,n)},[i,t,r,e,n]),null}function I$({background:t=!1,scene:e,blur:n,...r}){const i=D$(r),o=dn(s=>s.scene);return M.useLayoutEffect(()=>FR(t,e,o,i,n),[i,t,e,o,n]),null}function rde({children:t,near:e=1,far:n=1e3,resolution:r=256,frames:i=1,map:o,background:s=!1,blur:a,scene:l,files:c,path:u,preset:d=void 0,extensions:f}){const h=dn(w=>w.gl),g=dn(w=>w.scene),y=M.useRef(null),[_]=M.useState(()=>new Sc),v=M.useMemo(()=>{const w=new Cg(r);return w.texture.type=yr,w},[r]);M.useLayoutEffect(()=>(i===1&&y.current.update(h,_),FR(s,l,g,v.texture,a)),[t,_,v.texture,l,g,s,i,h]);let x=1;return kc(()=>{(i===1/0||xkS({GroundProjectedEnvImpl:Uue}),[]);const a=M.useMemo(()=>[s],[s]),l=(e=t.ground)==null?void 0:e.height,c=(n=t.ground)==null?void 0:n.radius,u=(r=(i=t.ground)==null?void 0:i.scale)!==null&&r!==void 0?r:1e3;return M.createElement(M.Fragment,null,M.createElement(zR,yn({},t,{map:s})),M.createElement("groundProjectedEnvImpl",{args:a,scale:u,height:l,radius:c}))}function ode(t){return t.ground?M.createElement(ide,t):t.map?M.createElement(zR,t):t.children?M.createElement(rde,t):M.createElement(I$,t)}var L$={exports:{}},sde="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",ade=sde,lde=ade;function k$(){}function N$(){}N$.resetWarningCache=k$;var cde=function(){function t(r,i,o,s,a,l){if(l!==lde){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:N$,resetWarningCache:k$};return n.PropTypes=n,n};L$.exports=cde();var ude=L$.exports;const Jo=Tc(ude);Jo.func.isRequired,Jo.arrayOf(Jo.oneOfType([Jo.element,Jo.func])).isRequired;const Lk=new rt,kk=new rt,dy=[],Mp=new Er;class dde extends Ou{constructor(){super(),this.color=new lt("white"),this.instance={current:void 0},this.instanceKey={current:void 0}}get geometry(){var e;return(e=this.instance.current)==null?void 0:e.geometry}raycast(e,n){const r=this.instance.current;if(!r||!r.geometry||!r.material)return;Mp.geometry=r.geometry;const i=r.matrixWorld,o=r.userData.instances.indexOf(this.instanceKey);if(!(o===-1||o>r.count)){r.getMatrixAt(o,Lk),kk.multiplyMatrices(i,Lk),Mp.matrixWorld=kk,r.material instanceof jr?Mp.material.side=r.material.side:Mp.material.side=r.material[0].side,Mp.raycast(e,dy);for(let s=0,a=dy.length;s{M.useMemo(()=>kS({PositionMesh:dde}),[]);const i=M.useRef(),{subscribe:o,getParent:s}=M.useContext(t||F$);return M.useLayoutEffect(()=>o(i),[]),M.createElement("positionMesh",yn({instance:s(),instanceKey:i,ref:_$([r,i])},n),e)}),z$=M.forwardRef(({children:t,range:e,limit:n=1e3,frames:r=1/0,...i},o)=>{const[{context:s,instance:a}]=M.useState(()=>{const _=M.createContext(null);return{context:_,instance:M.forwardRef((v,x)=>M.createElement(vm,yn({context:_},v,{ref:x})))}}),l=M.useRef(null),[c,u]=M.useState([]),[[d,f]]=M.useState(()=>{const _=new Float32Array(n*16);for(let v=0;v1))]});M.useEffect(()=>{l.current.instanceMatrix.needsUpdate=!0});let h=0,g=0;kc(()=>{if(r===1/0||h({getParent:()=>l,subscribe:_=>(u(v=>[...v,_]),()=>u(v=>v.filter(x=>x.current!==_.current)))}),[]);return M.createElement("instancedMesh",yn({userData:{instances:c},matrixAutoUpdate:!1,ref:_$([o,l]),args:[null,null,0],raycast:()=>null},i),M.createElement("instancedBufferAttribute",{attach:"instanceMatrix",count:d.length/16,array:d,itemSize:16,usage:D2}),M.createElement("instancedBufferAttribute",{attach:"instanceColor",count:f.length/3,array:f,itemSize:3,usage:D2}),typeof t=="function"?M.createElement(s.Provider,{value:y},t(a)):M.createElement(F$.Provider,{value:y},t))});function hde({pixelated:t}){const e=dn(s=>s.gl),n=dn(s=>s.internal.active),r=dn(s=>s.performance.current),i=dn(s=>s.viewport.initialDpr),o=dn(s=>s.setDpr);return M.useEffect(()=>{const s=e.domElement;return()=>{n&&o(i),t&&s&&(s.style.imageRendering="auto")}},[]),M.useEffect(()=>{o(r*i),t&&e.domElement&&(e.domElement.style.imageRendering=r===1?"auto":"pixelated")},[r]),null}function pde(){const t=dn(r=>r.get),e=dn(r=>r.setEvents),n=dn(r=>r.performance.current);return M.useEffect(()=>{const r=t().events.enabled;return()=>e({enabled:r})},[]),M.useEffect(()=>e({enabled:n===1}),[n]),null}const FS=M.createContext(null),fy=new Z,Hk=new Z,mde=(t,e,n,r)=>{const i=e.dot(e),o=e.dot(t)-e.dot(n),s=e.dot(r);return s===0?-o/i:(fy.copy(r).multiplyScalar(i/s).sub(e),Hk.copy(r).multiplyScalar(o/s).add(n).sub(t),-fy.dot(Hk)/fy.dot(fy))},gde=new Z(0,1,0),Vk=new rt,QE=({direction:t,axis:e})=>{const{translation:n,translationLimits:r,annotations:i,annotationsClass:o,depthTest:s,scale:a,lineWidth:l,fixed:c,axisColors:u,hoveredColor:d,opacity:f,onDragStart:h,onDrag:g,onDragEnd:y,userData:_}=M.useContext(FS),v=dn(W=>W.controls),x=M.useRef(null),w=M.useRef(null),S=M.useRef(null),E=M.useRef(0),[C,O]=M.useState(!1),R=M.useCallback(W=>{i&&(x.current.innerText=`${n.current[e].toFixed(2)}`,x.current.style.display="block"),W.stopPropagation();const B=new rt().extractRotation(w.current.matrixWorld),j=W.point.clone(),$=new Z().setFromMatrixPosition(w.current.matrixWorld),q=t.clone().applyMatrix4(B).normalize();S.current={clickPoint:j,dir:q},E.current=n.current[e],h({component:"Arrow",axis:e,origin:$,directions:[q]}),v&&(v.enabled=!1),W.target.setPointerCapture(W.pointerId)},[i,t,v,h,n,e]),T=M.useCallback(W=>{if(W.stopPropagation(),C||O(!0),S.current){const{clickPoint:B,dir:j}=S.current,[$,q]=r?.[e]||[void 0,void 0];let K=mde(B,j,W.ray.origin,W.ray.direction);$!==void 0&&(K=Math.max(K,$-E.current)),q!==void 0&&(K=Math.min(K,q-E.current)),n.current[e]=E.current+K,i&&(x.current.innerText=`${n.current[e].toFixed(2)}`),Vk.makeTranslation(j.x*K,j.y*K,j.z*K),g(Vk)}},[i,g,C,n,r,e]),A=M.useCallback(W=>{i&&(x.current.style.display="none"),W.stopPropagation(),S.current=null,y(),v&&(v.enabled=!0),W.target.releasePointerCapture(W.pointerId)},[i,v,y]),F=M.useCallback(W=>{W.stopPropagation(),O(!1)},[]),{cylinderLength:N,coneWidth:U,coneLength:k,matrixL:z}=M.useMemo(()=>{const W=c?l/a*1.6:a/20,B=c?.2:a/5,j=c?1-B:a-B,$=new Hn().setFromUnitVectors(gde,t.clone().normalize()),q=new rt().makeRotationFromQuaternion($);return{cylinderLength:j,coneWidth:W,coneLength:B,matrixL:q}},[t,a,l,c]),G=C?d:u[e];return M.createElement("group",{ref:w},M.createElement("group",{matrix:z,matrixAutoUpdate:!1,onPointerDown:R,onPointerMove:T,onPointerUp:A,onPointerOut:F},i&&M.createElement(Hg,{position:[0,-k,0]},M.createElement("div",{style:{display:"none",background:"#151520",color:"white",padding:"6px 8px",borderRadius:7,whiteSpace:"nowrap"},className:o,ref:x})),M.createElement("mesh",{visible:!1,position:[0,(N+k)/2,0],userData:_},M.createElement("cylinderGeometry",{args:[U*1.4,U*1.4,N+k,8,1]})),M.createElement(Mx,{transparent:!0,raycast:()=>null,depthTest:s,points:[0,0,0,0,N,0],lineWidth:l,color:G,opacity:f,polygonOffset:!0,renderOrder:1,polygonOffsetFactor:-10,fog:!1}),M.createElement("mesh",{raycast:()=>null,position:[0,N+k/2,0],renderOrder:500},M.createElement("coneGeometry",{args:[U,k,24,1]}),M.createElement("meshBasicMaterial",{transparent:!0,depthTest:s,color:G,opacity:f,polygonOffset:!0,polygonOffsetFactor:-10,fog:!1}))))},vde=(t,e,n)=>{const r=Math.abs(t.x)>=Math.abs(t.y)&&Math.abs(t.x)>=Math.abs(t.z)?0:Math.abs(t.y)>=Math.abs(t.x)&&Math.abs(t.y)>=Math.abs(t.z)?1:2,i=[0,1,2].sort((g,y)=>Math.abs(e.getComponent(y))-Math.abs(e.getComponent(g))),o=r===i[0]?i[1]:i[0],s=t.getComponent(r),a=t.getComponent(o),l=e.getComponent(r),c=e.getComponent(o),u=n.getComponent(r),f=(n.getComponent(o)-u*(a/s))/(c-l*(a/s));return[(u-f*l)/s,f]},hy=new nd,py=new Z,jk=new rt,JE=({dir1:t,dir2:e,axis:n})=>{const{translation:r,translationLimits:i,annotations:o,annotationsClass:s,depthTest:a,scale:l,lineWidth:c,fixed:u,axisColors:d,hoveredColor:f,opacity:h,onDragStart:g,onDrag:y,onDragEnd:_,userData:v}=M.useContext(FS),x=dn(j=>j.controls),w=M.useRef(null),S=M.useRef(null),E=M.useRef(null),C=M.useRef(0),O=M.useRef(0),[R,T]=M.useState(!1),A=M.useCallback(j=>{o&&(w.current.innerText=`${r.current[(n+1)%3].toFixed(2)}, ${r.current[(n+2)%3].toFixed(2)}`,w.current.style.display="block"),j.stopPropagation();const $=j.point.clone(),q=new Z().setFromMatrixPosition(S.current.matrixWorld),K=new Z().setFromMatrixColumn(S.current.matrixWorld,0).normalize(),re=new Z().setFromMatrixColumn(S.current.matrixWorld,1).normalize(),J=new Z().setFromMatrixColumn(S.current.matrixWorld,2).normalize(),le=new ha().setFromNormalAndCoplanarPoint(J,q);E.current={clickPoint:$,e1:K,e2:re,plane:le},C.current=r.current[(n+1)%3],O.current=r.current[(n+2)%3],g({component:"Slider",axis:n,origin:q,directions:[K,re,J]}),x&&(x.enabled=!1),j.target.setPointerCapture(j.pointerId)},[o,x,g,n]),F=M.useCallback(j=>{if(j.stopPropagation(),R||T(!0),E.current){const{clickPoint:$,e1:q,e2:K,plane:re}=E.current,[J,le]=i?.[(n+1)%3]||[void 0,void 0],[ae,oe]=i?.[(n+2)%3]||[void 0,void 0];hy.copy(j.ray),hy.intersectPlane(re,py),hy.direction.negate(),hy.intersectPlane(re,py),py.sub($);let[De,Te]=vde(q,K,py);J!==void 0&&(De=Math.max(De,J-C.current)),le!==void 0&&(De=Math.min(De,le-C.current)),ae!==void 0&&(Te=Math.max(Te,ae-O.current)),oe!==void 0&&(Te=Math.min(Te,oe-O.current)),r.current[(n+1)%3]=C.current+De,r.current[(n+2)%3]=O.current+Te,o&&(w.current.innerText=`${r.current[(n+1)%3].toFixed(2)}, ${r.current[(n+2)%3].toFixed(2)}`),jk.makeTranslation(De*q.x+Te*K.x,De*q.y+Te*K.y,De*q.z+Te*K.z),y(jk)}},[o,y,R,r,i,n]),N=M.useCallback(j=>{o&&(w.current.style.display="none"),j.stopPropagation(),E.current=null,_(),x&&(x.enabled=!0),j.target.releasePointerCapture(j.pointerId)},[o,x,_]),U=M.useCallback(j=>{j.stopPropagation(),T(!1)},[]),k=M.useMemo(()=>{const j=t.clone().normalize(),$=e.clone().normalize();return new rt().makeBasis(j,$,j.clone().cross($))},[t,e]),z=u?1/7:l/7,G=u?.225:l*.225,W=R?f:d[n],B=M.useMemo(()=>[new Z(0,0,0),new Z(0,G,0),new Z(G,G,0),new Z(G,0,0),new Z(0,0,0)],[G]);return M.createElement("group",{ref:S,matrix:k,matrixAutoUpdate:!1},o&&M.createElement(Hg,{position:[0,0,0]},M.createElement("div",{style:{display:"none",background:"#151520",color:"white",padding:"6px 8px",borderRadius:7,whiteSpace:"nowrap"},className:s,ref:w})),M.createElement("group",{position:[z*1.7,z*1.7,0]},M.createElement("mesh",{visible:!0,onPointerDown:A,onPointerMove:F,onPointerUp:N,onPointerOut:U,scale:G,userData:v},M.createElement("planeGeometry",null),M.createElement("meshBasicMaterial",{transparent:!0,depthTest:a,color:W,polygonOffset:!0,polygonOffsetFactor:-10,side:Hr,fog:!1})),M.createElement(Mx,{position:[-G/2,-G/2,0],transparent:!0,depthTest:a,points:B,lineWidth:c,color:W,opacity:h,polygonOffset:!0,polygonOffsetFactor:-10,userData:v,fog:!1})))};var $k=0/0,yde="[object Symbol]",_de=/^\s+|\s+$/g,xde=/^[-+]0x[0-9a-f]+$/i,wde=/^0b[01]+$/i,Sde=/^0o[0-7]+$/i,bde=parseInt,Mde=Object.prototype,Ede=Mde.toString;function Pde(t,e,n){return t===t&&(n!==void 0&&(t=t<=n?t:n),e!==void 0&&(t=t>=e?t:e)),t}function Gk(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function Cde(t){return!!t&&typeof t=="object"}function Tde(t){return typeof t=="symbol"||Cde(t)&&Ede.call(t)==yde}function eP(t){if(typeof t=="number")return t;if(Tde(t))return $k;if(Gk(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Gk(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(_de,"");var n=wde.test(t);return n||Sde.test(t)?bde(t.slice(2),n?2:8):xde.test(t)?$k:+t}function Ode(t,e,n){return n===void 0&&(n=e,e=void 0),n!==void 0&&(n=eP(n),n=n===n?n:0),e!==void 0&&(e=eP(e),e=e===e?e:0),Pde(eP(t),e,n)}var Rde=Ode;const Ade=Tc(Rde),tP=new Z,nP=new Z,rP=t=>t*180/Math.PI,Dde=t=>t*Math.PI/180,Ide=(t,e,n,r,i)=>{tP.copy(t).sub(n),nP.copy(e).sub(n);const o=r.dot(r),s=i.dot(i),a=tP.dot(r)/o,l=tP.dot(i)/s,c=nP.dot(r)/o,u=nP.dot(i)/s,d=Math.atan2(l,a);return Math.atan2(u,c)-d},Lde=(t,e)=>{let n=Math.floor(t/e);return n=n<0?n+1:n,t-n*e},Wk=t=>{let e=Lde(t,2*Math.PI);return Math.abs(e)<1e-6?0:(e<0&&(e+=2*Math.PI),e)},my=new rt,Yk=new Z,gy=new nd,iP=new Z,oP=({dir1:t,dir2:e,axis:n})=>{const{rotationLimits:r,annotations:i,annotationsClass:o,depthTest:s,scale:a,lineWidth:l,fixed:c,axisColors:u,hoveredColor:d,opacity:f,onDragStart:h,onDrag:g,onDragEnd:y,userData:_}=M.useContext(FS),v=dn(G=>G.controls),x=M.useRef(null),w=M.useRef(null),S=M.useRef(0),E=M.useRef(0),C=M.useRef(null),[O,R]=M.useState(!1),T=M.useCallback(G=>{i&&(x.current.innerText=`${rP(E.current).toFixed(0)}º`,x.current.style.display="block"),G.stopPropagation();const W=G.point.clone(),B=new Z().setFromMatrixPosition(w.current.matrixWorld),j=new Z().setFromMatrixColumn(w.current.matrixWorld,0).normalize(),$=new Z().setFromMatrixColumn(w.current.matrixWorld,1).normalize(),q=new Z().setFromMatrixColumn(w.current.matrixWorld,2).normalize(),K=new ha().setFromNormalAndCoplanarPoint(q,B);C.current={clickPoint:W,origin:B,e1:j,e2:$,normal:q,plane:K},h({component:"Rotator",axis:n,origin:B,directions:[j,$,q]}),v&&(v.enabled=!1),G.target.setPointerCapture(G.pointerId)},[i,v,h,n]),A=M.useCallback(G=>{if(G.stopPropagation(),O||R(!0),C.current){const{clickPoint:W,origin:B,e1:j,e2:$,normal:q,plane:K}=C.current,[re,J]=r?.[n]||[void 0,void 0];gy.copy(G.ray),gy.intersectPlane(K,iP),gy.direction.negate(),gy.intersectPlane(K,iP);let le=Ide(W,iP,B,j,$),ae=rP(le);G.shiftKey&&(ae=Math.round(ae/10)*10,le=Dde(ae)),re!==void 0&&J!==void 0&&J-re<2*Math.PI?(le=Wk(le),le=le>Math.PI?le-2*Math.PI:le,le=Ade(le,re-S.current,J-S.current),E.current=S.current+le):(E.current=Wk(S.current+le),E.current=E.current>Math.PI?E.current-2*Math.PI:E.current),i&&(ae=rP(E.current),x.current.innerText=`${ae.toFixed(0)}º`),my.makeRotationAxis(q,le),Yk.copy(B).applyMatrix4(my).sub(B).negate(),my.setPosition(Yk),g(my)}},[i,g,O,r,n]),F=M.useCallback(G=>{i&&(x.current.style.display="none"),G.stopPropagation(),S.current=E.current,C.current=null,y(),v&&(v.enabled=!0),G.target.releasePointerCapture(G.pointerId)},[i,v,y]),N=M.useCallback(G=>{G.stopPropagation(),R(!1)},[]),U=M.useMemo(()=>{const G=t.clone().normalize(),W=e.clone().normalize();return new rt().makeBasis(G,W,G.clone().cross(W))},[t,e]),k=c?.65:a*.65,z=M.useMemo(()=>{const W=[];for(let B=0;B<=32;B++){const j=B*(Math.PI/2)/32;W.push(new Z(Math.cos(j)*k,Math.sin(j)*k,0))}return W},[k]);return M.createElement("group",{ref:w,onPointerDown:T,onPointerMove:A,onPointerUp:F,onPointerOut:N,matrix:U,matrixAutoUpdate:!1},i&&M.createElement(Hg,{position:[k,k,0]},M.createElement("div",{style:{display:"none",background:"#151520",color:"white",padding:"6px 8px",borderRadius:7,whiteSpace:"nowrap"},className:o,ref:x})),M.createElement(Mx,{points:z,lineWidth:l*4,visible:!1,userData:_}),M.createElement(Mx,{transparent:!0,raycast:()=>null,depthTest:s,points:z,lineWidth:l,color:O?d:u[n],opacity:f,polygonOffset:!0,polygonOffsetFactor:-10,fog:!1}))},kde=new Z,Nde=new Z,Fde=new Z,zde=(t,e,n)=>{const r=n.width/2,i=n.height/2;e.updateMatrixWorld(!1);const o=t.project(e);return o.x=o.x*r+r,o.y=-(o.y*i)+i,o},Ude=(t,e,n,r=1)=>{const i=kde.set(t.x/n.width*2-1,-(t.y/n.height)*2+1,r);return i.unproject(e),i},Bde=(t,e,n,r)=>{const i=zde(Fde.copy(t),n,r);let o=0;for(let s=0;s<2;++s){const a=Nde.copy(i).setComponent(s,i.getComponent(s)+e),l=Ude(a,n,r,a.z);o=Math.max(o,t.distanceTo(l))}return o},Xk=new rt,Zk=new rt,qk=new rt,vy=new rt,sP=new rt,Jd=new rt,Kk=new rt,Qk=new rt,ef=new zi,aP=new zi,Jk=new Z,eN=new Z,tN=new Z,nN=new Z,Ep=new Z(1,0,0),Pp=new Z(0,1,0),Cp=new Z(0,0,1),Hde=M.forwardRef(({matrix:t,onDragStart:e,onDrag:n,onDragEnd:r,autoTransform:i=!0,anchor:o,disableAxes:s=!1,disableSliders:a=!1,disableRotations:l=!1,activeAxes:c=[!0,!0,!0],offset:u=[0,0,0],rotation:d=[0,0,0],scale:f=1,lineWidth:h=4,fixed:g=!1,translationLimits:y,rotationLimits:_,depthTest:v=!0,axisColors:x=["#ff2060","#20df80","#2080ff"],hoveredColor:w="#ffff40",annotations:S=!1,annotationsClass:E,opacity:C=1,visible:O=!0,userData:R,children:T,...A},F)=>{const N=dn($=>$.invalidate),U=M.useRef(null),k=M.useRef(null),z=M.useRef(null),G=M.useRef(null),W=M.useRef([0,0,0]);M.useLayoutEffect(()=>{o&&(G.current.updateWorldMatrix(!0,!0),vy.copy(G.current.matrixWorld).invert(),ef.makeEmpty(),G.current.traverse($=>{$.geometry&&($.geometry.boundingBox||$.geometry.computeBoundingBox(),Jd.copy($.matrixWorld).premultiply(vy),aP.copy($.geometry.boundingBox),aP.applyMatrix4(Jd),ef.union(aP))}),Jk.copy(ef.max).add(ef.min).multiplyScalar(.5),eN.copy(ef.max).sub(ef.min).multiplyScalar(.5),tN.copy(eN).multiply(new Z(...o)).add(Jk),nN.set(...u).add(tN),z.current.position.copy(nN),N())});const B=M.useMemo(()=>({onDragStart:$=>{Xk.copy(k.current.matrix),Zk.copy(k.current.matrixWorld),e&&e($),N()},onDrag:$=>{qk.copy(U.current.matrixWorld),vy.copy(qk).invert(),sP.copy(Zk).premultiply($),Jd.copy(sP).premultiply(vy),Kk.copy(Xk).invert(),Qk.copy(Jd).multiply(Kk),i&&k.current.matrix.copy(Jd),n&&n(Jd,Qk,sP,$),N()},onDragEnd:()=>{r&&r(),N()},translation:W,translationLimits:y,rotationLimits:_,axisColors:x,hoveredColor:w,opacity:C,scale:f,lineWidth:h,fixed:g,depthTest:v,userData:R,annotations:S,annotationsClass:E}),[e,n,r,W,y,_,v,f,h,g,...x,w,C,R,i,S,E]),j=new Z;return kc($=>{if(g){const J=Bde(z.current.getWorldPosition(j),f,$.camera,$.size);if(z.current){var q,K,re;(((q=z.current)==null?void 0:q.scale.x)!==J||((K=z.current)==null?void 0:K.scale.y)!==J||((re=z.current)==null?void 0:re.scale.z)!==J)&&(z.current.scale.setScalar(J),$.invalidate())}}}),M.useImperativeHandle(F,()=>k.current,[]),M.useLayoutEffect(()=>{t&&t instanceof rt&&(k.current.matrix=t)},[t]),M.createElement(FS.Provider,{value:B},M.createElement("group",{ref:U},M.createElement("group",yn({ref:k,matrix:t,matrixAutoUpdate:!1},A),M.createElement("group",{visible:O,ref:z,position:u,rotation:d},!s&&c[0]&&M.createElement(QE,{axis:0,direction:Ep}),!s&&c[1]&&M.createElement(QE,{axis:1,direction:Pp}),!s&&c[2]&&M.createElement(QE,{axis:2,direction:Cp}),!a&&c[0]&&c[1]&&M.createElement(JE,{axis:2,dir1:Ep,dir2:Pp}),!a&&c[0]&&c[2]&&M.createElement(JE,{axis:1,dir1:Cp,dir2:Ep}),!a&&c[2]&&c[1]&&M.createElement(JE,{axis:0,dir1:Pp,dir2:Cp}),!l&&c[0]&&c[1]&&M.createElement(oP,{axis:2,dir1:Ep,dir2:Pp}),!l&&c[0]&&c[2]&&M.createElement(oP,{axis:1,dir1:Cp,dir2:Ep}),!l&&c[2]&&c[1]&&M.createElement(oP,{axis:0,dir1:Pp,dir2:Cp})),M.createElement("group",{ref:G},T))))});/** * postprocessing v6.32.0 build Sat Jun 17 2023 * https://github.com/pmndrs/postprocessing * Copyright 2015-2023 Raoul van Rüschen * @license Zlib - */var ad="varying vec2 vUv;void main(){vUv=position.xy*0.5+0.5;gl_Position=vec4(position.xy,1.0,1.0);}",Hde=`#ifdef FRAMEBUFFER_PRECISION_HIGH + */var ad="varying vec2 vUv;void main(){vUv=position.xy*0.5+0.5;gl_Position=vec4(position.xy,1.0,1.0);}",Vde=`#ifdef FRAMEBUFFER_PRECISION_HIGH uniform mediump sampler2D inputBuffer; #else uniform lowp sampler2D inputBuffer; @@ -4032,7 +4032,7 @@ vec4 acc=vec4(0.0);for(int i=0;i<32;++i){vec4 kernel=kernel64[i];vec2 uv=step*ke #else vec4 maxValue=texture2D(inputBuffer,vUv);for(int i=0;i<8;++i){vec4 kernel=kernel16[i];vec2 uv=step*kernel.xy+vUv;maxValue=max(texture2D(inputBuffer,uv),maxValue);uv=step*kernel.zw+vUv;maxValue=max(texture2D(inputBuffer,uv),maxValue);}gl_FragColor=maxValue; #endif -}}`,yy=class extends sn{constructor(t=!1,e=!1){super({name:"BokehMaterial",defines:{PASS:t?"2":"1"},uniforms:{inputBuffer:new Me(null),cocBuffer:new Me(null),texelSize:new Me(new Ee),kernel64:new Me(null),kernel16:new Me(null),scale:new Me(1)},blending:lr,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:Hde,vertexShader:ad}),e&&(this.defines.FOREGROUND="1"),this.generateKernel()}set inputBuffer(t){this.uniforms.inputBuffer.value=t}setInputBuffer(t){this.uniforms.inputBuffer.value=t}set cocBuffer(t){this.uniforms.cocBuffer.value=t}setCoCBuffer(t){this.uniforms.cocBuffer.value=t}get scale(){return this.uniforms.scale.value}set scale(t){this.uniforms.scale.value=t}getScale(t){return this.scale}setScale(t){this.scale=t}generateKernel(){const t=2.39996323,e=new Float64Array(128),n=new Float64Array(32);let r=0,i=0;for(let o=0,s=Math.sqrt(80);o<80;++o){const a=o*t,l=Math.sqrt(o)/s,c=l*Math.cos(a),u=l*Math.sin(a);o%5===0?(n[i++]=c,n[i++]=u):(e[r++]=c,e[r++]=u)}this.uniforms.kernel64.value=e,this.uniforms.kernel16.value=n}setTexelSize(t,e){this.uniforms.texelSize.value.set(t,e)}setSize(t,e){this.uniforms.texelSize.value.set(1/t,1/e)}},z$="",Bn="srgb",oh="srgb-linear",Vde=Number(td.replace(/\D+/g,"")),UR=Vde>=152,U$=new Map([[Oa,oh],[Nn,Bn]]),jde=new Map([[oh,Oa],[Bn,Nn]]);function pl(t){return t===null?null:UR?t.outputColorSpace:U$.get(t.outputEncoding)}function qr(t,e){t!==null&&(UR?t.colorSpace=e:t.encoding=jde.get(e))}function lP(t,e){t===null||e===null||(UR?e.colorSpace=t.colorSpace:e.encoding=t.encoding)}function Df(t,e,n){return t*(e-n)-e}function Du(t,e,n){return Math.min(Math.max((t+e)/(e-n),0),1)}var $de=`#include +}}`,yy=class extends sn{constructor(t=!1,e=!1){super({name:"BokehMaterial",defines:{PASS:t?"2":"1"},uniforms:{inputBuffer:new Me(null),cocBuffer:new Me(null),texelSize:new Me(new Ee),kernel64:new Me(null),kernel16:new Me(null),scale:new Me(1)},blending:lr,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:Vde,vertexShader:ad}),e&&(this.defines.FOREGROUND="1"),this.generateKernel()}set inputBuffer(t){this.uniforms.inputBuffer.value=t}setInputBuffer(t){this.uniforms.inputBuffer.value=t}set cocBuffer(t){this.uniforms.cocBuffer.value=t}setCoCBuffer(t){this.uniforms.cocBuffer.value=t}get scale(){return this.uniforms.scale.value}set scale(t){this.uniforms.scale.value=t}getScale(t){return this.scale}setScale(t){this.scale=t}generateKernel(){const t=2.39996323,e=new Float64Array(128),n=new Float64Array(32);let r=0,i=0;for(let o=0,s=Math.sqrt(80);o<80;++o){const a=o*t,l=Math.sqrt(o)/s,c=l*Math.cos(a),u=l*Math.sin(a);o%5===0?(n[i++]=c,n[i++]=u):(e[r++]=c,e[r++]=u)}this.uniforms.kernel64.value=e,this.uniforms.kernel16.value=n}setTexelSize(t,e){this.uniforms.texelSize.value.set(t,e)}setSize(t,e){this.uniforms.texelSize.value.set(1/t,1/e)}},U$="",Bn="srgb",oh="srgb-linear",jde=Number(td.replace(/\D+/g,"")),UR=jde>=152,B$=new Map([[Oa,oh],[Nn,Bn]]),$de=new Map([[oh,Oa],[Bn,Nn]]);function pl(t){return t===null?null:UR?t.outputColorSpace:B$.get(t.outputEncoding)}function qr(t,e){t!==null&&(UR?t.colorSpace=e:t.encoding=$de.get(e))}function lP(t,e){t===null||e===null||(UR?e.colorSpace=t.colorSpace:e.encoding=t.encoding)}function Df(t,e,n){return t*(e-n)-e}function Du(t,e,n){return Math.min(Math.max((t+e)/(e-n),0),1)}var Gde=`#include #include #ifdef GL_FRAGMENT_PRECISION_HIGH uniform highp sampler2D depthBuffer; @@ -4054,14 +4054,14 @@ float viewZ=perspectiveDepthToViewZ(depth,cameraNear,cameraFar);float linearDept #else float linearDepth=depth; #endif -float signedDistance=linearDepth-focusDistance;float magnitude=smoothstep(0.0,focusRange,abs(signedDistance));gl_FragColor.rg=magnitude*vec2(step(signedDistance,0.0),step(0.0,signedDistance));}`,Gde=class extends sn{constructor(t){super({name:"CircleOfConfusionMaterial",defines:{DEPTH_PACKING:"0"},uniforms:{depthBuffer:new Me(null),focusDistance:new Me(0),focusRange:new Me(0),cameraNear:new Me(.3),cameraFar:new Me(1e3)},blending:lr,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:$de,vertexShader:ad}),this.uniforms.focalLength=this.uniforms.focusRange,this.copyCameraSettings(t)}get near(){return this.uniforms.cameraNear.value}get far(){return this.uniforms.cameraFar.value}set depthBuffer(t){this.uniforms.depthBuffer.value=t}set depthPacking(t){this.defines.DEPTH_PACKING=t.toFixed(0),this.needsUpdate=!0}setDepthBuffer(t,e=di){this.depthBuffer=t,this.depthPacking=e}get focusDistance(){return this.uniforms.focusDistance.value}set focusDistance(t){this.uniforms.focusDistance.value=t}get worldFocusDistance(){return-Df(this.focusDistance,this.near,this.far)}set worldFocusDistance(t){this.focusDistance=Du(-t,this.near,this.far)}getFocusDistance(t){this.uniforms.focusDistance.value=t}setFocusDistance(t){this.uniforms.focusDistance.value=t}get focalLength(){return this.focusRange}set focalLength(t){this.focusRange=t}get focusRange(){return this.uniforms.focusRange.value}set focusRange(t){this.uniforms.focusRange.value=t}get worldFocusRange(){return-Df(this.focusRange,this.near,this.far)}set worldFocusRange(t){this.focusRange=Du(-t,this.near,this.far)}getFocalLength(t){return this.focusRange}setFocalLength(t){this.focusRange=t}adoptCameraSettings(t){this.copyCameraSettings(t)}copyCameraSettings(t){t&&(this.uniforms.cameraNear.value=t.near,this.uniforms.cameraFar.value=t.far,t instanceof or?this.defines.PERSPECTIVE_CAMERA="1":delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}},Kt={SKIP:9,SET:30,ADD:0,ALPHA:1,AVERAGE:2,COLOR:3,COLOR_BURN:4,COLOR_DODGE:5,DARKEN:6,DIFFERENCE:7,DIVIDE:8,DST:9,EXCLUSION:10,HARD_LIGHT:11,HARD_MIX:12,HUE:13,INVERT:14,INVERT_RGB:15,LIGHTEN:16,LINEAR_BURN:17,LINEAR_DODGE:18,LINEAR_LIGHT:19,LUMINOSITY:20,MULTIPLY:21,NEGATION:22,NORMAL:23,OVERLAY:24,PIN_LIGHT:25,REFLECT:26,SATURATION:27,SCREEN:28,SOFT_LIGHT:29,SRC:30,SUBTRACT:31,VIVID_LIGHT:32},If={RED:0,GREEN:1,BLUE:2,ALPHA:3},qp={FULL:0,SINGLE:1},ym={DEFAULT:0,KEEP_MAX_DEPTH:1,DISCARD_MAX_DEPTH:2},as={NONE:0,DEPTH:1,CONVOLUTION:2},Rn={FRAGMENT_HEAD:"FRAGMENT_HEAD",FRAGMENT_MAIN_UV:"FRAGMENT_MAIN_UV",FRAGMENT_MAIN_IMAGE:"FRAGMENT_MAIN_IMAGE",VERTEX_HEAD:"VERTEX_HEAD",VERTEX_MAIN_SUPPORT:"VERTEX_MAIN_SUPPORT"},vu={DISABLED:0,SPORADIC:1,CONSTANT_MILD:2,CONSTANT_WILD:3},ld={VERY_SMALL:0,SMALL:1,MEDIUM:2,LARGE:3,VERY_LARGE:4,HUGE:5},Wde={SCALE_UP:"lut.scaleup"},_m={DISCARD:0,MULTIPLY:1,MULTIPLY_RGB_SET_ALPHA:2},Yde=`#ifdef FRAMEBUFFER_PRECISION_HIGH +float signedDistance=linearDepth-focusDistance;float magnitude=smoothstep(0.0,focusRange,abs(signedDistance));gl_FragColor.rg=magnitude*vec2(step(signedDistance,0.0),step(0.0,signedDistance));}`,Wde=class extends sn{constructor(t){super({name:"CircleOfConfusionMaterial",defines:{DEPTH_PACKING:"0"},uniforms:{depthBuffer:new Me(null),focusDistance:new Me(0),focusRange:new Me(0),cameraNear:new Me(.3),cameraFar:new Me(1e3)},blending:lr,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:Gde,vertexShader:ad}),this.uniforms.focalLength=this.uniforms.focusRange,this.copyCameraSettings(t)}get near(){return this.uniforms.cameraNear.value}get far(){return this.uniforms.cameraFar.value}set depthBuffer(t){this.uniforms.depthBuffer.value=t}set depthPacking(t){this.defines.DEPTH_PACKING=t.toFixed(0),this.needsUpdate=!0}setDepthBuffer(t,e=di){this.depthBuffer=t,this.depthPacking=e}get focusDistance(){return this.uniforms.focusDistance.value}set focusDistance(t){this.uniforms.focusDistance.value=t}get worldFocusDistance(){return-Df(this.focusDistance,this.near,this.far)}set worldFocusDistance(t){this.focusDistance=Du(-t,this.near,this.far)}getFocusDistance(t){this.uniforms.focusDistance.value=t}setFocusDistance(t){this.uniforms.focusDistance.value=t}get focalLength(){return this.focusRange}set focalLength(t){this.focusRange=t}get focusRange(){return this.uniforms.focusRange.value}set focusRange(t){this.uniforms.focusRange.value=t}get worldFocusRange(){return-Df(this.focusRange,this.near,this.far)}set worldFocusRange(t){this.focusRange=Du(-t,this.near,this.far)}getFocalLength(t){return this.focusRange}setFocalLength(t){this.focusRange=t}adoptCameraSettings(t){this.copyCameraSettings(t)}copyCameraSettings(t){t&&(this.uniforms.cameraNear.value=t.near,this.uniforms.cameraFar.value=t.far,t instanceof or?this.defines.PERSPECTIVE_CAMERA="1":delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}},Kt={SKIP:9,SET:30,ADD:0,ALPHA:1,AVERAGE:2,COLOR:3,COLOR_BURN:4,COLOR_DODGE:5,DARKEN:6,DIFFERENCE:7,DIVIDE:8,DST:9,EXCLUSION:10,HARD_LIGHT:11,HARD_MIX:12,HUE:13,INVERT:14,INVERT_RGB:15,LIGHTEN:16,LINEAR_BURN:17,LINEAR_DODGE:18,LINEAR_LIGHT:19,LUMINOSITY:20,MULTIPLY:21,NEGATION:22,NORMAL:23,OVERLAY:24,PIN_LIGHT:25,REFLECT:26,SATURATION:27,SCREEN:28,SOFT_LIGHT:29,SRC:30,SUBTRACT:31,VIVID_LIGHT:32},If={RED:0,GREEN:1,BLUE:2,ALPHA:3},qp={FULL:0,SINGLE:1},ym={DEFAULT:0,KEEP_MAX_DEPTH:1,DISCARD_MAX_DEPTH:2},as={NONE:0,DEPTH:1,CONVOLUTION:2},Rn={FRAGMENT_HEAD:"FRAGMENT_HEAD",FRAGMENT_MAIN_UV:"FRAGMENT_MAIN_UV",FRAGMENT_MAIN_IMAGE:"FRAGMENT_MAIN_IMAGE",VERTEX_HEAD:"VERTEX_HEAD",VERTEX_MAIN_SUPPORT:"VERTEX_MAIN_SUPPORT"},vu={DISABLED:0,SPORADIC:1,CONSTANT_MILD:2,CONSTANT_WILD:3},ld={VERY_SMALL:0,SMALL:1,MEDIUM:2,LARGE:3,VERY_LARGE:4,HUGE:5},Yde={SCALE_UP:"lut.scaleup"},_m={DISCARD:0,MULTIPLY:1,MULTIPLY_RGB_SET_ALPHA:2},Xde=`#ifdef FRAMEBUFFER_PRECISION_HIGH uniform mediump sampler2D inputBuffer; #else uniform lowp sampler2D inputBuffer; #endif varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec4 sum=texture2D(inputBuffer,vUv0);sum+=texture2D(inputBuffer,vUv1);sum+=texture2D(inputBuffer,vUv2);sum+=texture2D(inputBuffer,vUv3);gl_FragColor=sum*0.25; #include -}`,Xde="uniform vec4 texelSize;uniform float kernel;uniform float scale;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 uv=position.xy*0.5+0.5;vec2 dUv=(texelSize.xy*vec2(kernel)+texelSize.zw)*scale;vUv0=vec2(uv.x-dUv.x,uv.y+dUv.y);vUv1=vec2(uv.x+dUv.x,uv.y+dUv.y);vUv2=vec2(uv.x+dUv.x,uv.y-dUv.y);vUv3=vec2(uv.x-dUv.x,uv.y-dUv.y);gl_Position=vec4(position.xy,1.0,1.0);}",Zde=[new Float32Array([0,0]),new Float32Array([0,1,1]),new Float32Array([0,1,1,2]),new Float32Array([0,1,2,2,3]),new Float32Array([0,1,2,3,4,4,5]),new Float32Array([0,1,2,3,4,5,7,8,9,10])],qde=class extends sn{constructor(t=new an){super({name:"KawaseBlurMaterial",uniforms:{inputBuffer:new Me(null),texelSize:new Me(new an),scale:new Me(1),kernel:new Me(0)},blending:lr,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:Yde,vertexShader:Xde}),this.setTexelSize(t.x,t.y),this.kernelSize=ld.MEDIUM}set inputBuffer(t){this.uniforms.inputBuffer.value=t}setInputBuffer(t){this.inputBuffer=t}get kernelSequence(){return Zde[this.kernelSize]}get scale(){return this.uniforms.scale.value}set scale(t){this.uniforms.scale.value=t}getScale(){return this.uniforms.scale.value}setScale(t){this.uniforms.scale.value=t}getKernel(){return null}get kernel(){return this.uniforms.kernel.value}set kernel(t){this.uniforms.kernel.value=t}setKernel(t){this.kernel=t}setTexelSize(t,e){this.uniforms.texelSize.value.set(t,e,t*.5,e*.5)}setSize(t,e){const n=1/t,r=1/e;this.uniforms.texelSize.value.set(n,r,n*.5,r*.5)}},Kde=`#include +}`,Zde="uniform vec4 texelSize;uniform float kernel;uniform float scale;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 uv=position.xy*0.5+0.5;vec2 dUv=(texelSize.xy*vec2(kernel)+texelSize.zw)*scale;vUv0=vec2(uv.x-dUv.x,uv.y+dUv.y);vUv1=vec2(uv.x+dUv.x,uv.y+dUv.y);vUv2=vec2(uv.x+dUv.x,uv.y-dUv.y);vUv3=vec2(uv.x-dUv.x,uv.y-dUv.y);gl_Position=vec4(position.xy,1.0,1.0);}",qde=[new Float32Array([0,0]),new Float32Array([0,1,1]),new Float32Array([0,1,1,2]),new Float32Array([0,1,2,2,3]),new Float32Array([0,1,2,3,4,4,5]),new Float32Array([0,1,2,3,4,5,7,8,9,10])],Kde=class extends sn{constructor(t=new an){super({name:"KawaseBlurMaterial",uniforms:{inputBuffer:new Me(null),texelSize:new Me(new an),scale:new Me(1),kernel:new Me(0)},blending:lr,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:Xde,vertexShader:Zde}),this.setTexelSize(t.x,t.y),this.kernelSize=ld.MEDIUM}set inputBuffer(t){this.uniforms.inputBuffer.value=t}setInputBuffer(t){this.inputBuffer=t}get kernelSequence(){return qde[this.kernelSize]}get scale(){return this.uniforms.scale.value}set scale(t){this.uniforms.scale.value=t}getScale(){return this.uniforms.scale.value}setScale(t){this.uniforms.scale.value=t}getKernel(){return null}get kernel(){return this.uniforms.kernel.value}set kernel(t){this.uniforms.kernel.value=t}setKernel(t){this.kernel=t}setTexelSize(t,e){this.uniforms.texelSize.value.set(t,e,t*.5,e*.5)}setSize(t,e){const n=1/t,r=1/e;this.uniforms.texelSize.value.set(n,r,n*.5,r*.5)}},Qde=`#include #include #ifdef FRAMEBUFFER_PRECISION_HIGH uniform mediump sampler2D inputBuffer; @@ -4071,7 +4071,7 @@ uniform lowp sampler2D inputBuffer; uniform float opacity;varying vec2 vUv;void main(){vec4 texel=texture2D(inputBuffer,vUv);gl_FragColor=opacity*texel; #include #include -}`,B$=class extends sn{constructor(){super({name:"CopyMaterial",uniforms:{inputBuffer:new Me(null),opacity:new Me(1)},blending:lr,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:Kde,vertexShader:ad})}set inputBuffer(t){this.uniforms.inputBuffer.value=t}setInputBuffer(t){this.uniforms.inputBuffer.value=t}getOpacity(t){return this.uniforms.opacity.value}setOpacity(t){this.uniforms.opacity.value=t}},Qde=`#include +}`,H$=class extends sn{constructor(){super({name:"CopyMaterial",uniforms:{inputBuffer:new Me(null),opacity:new Me(1)},blending:lr,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:Qde,vertexShader:ad})}set inputBuffer(t){this.uniforms.inputBuffer.value=t}setInputBuffer(t){this.uniforms.inputBuffer.value=t}getOpacity(t){return this.uniforms.opacity.value}setOpacity(t){this.uniforms.opacity.value=t}},Jde=`#include #include #ifdef GL_FRAGMENT_PRECISION_HIGH uniform highp sampler2D depthBuffer; @@ -4091,7 +4091,7 @@ float viewZ=perspectiveDepthToViewZ(fragCoordZ,cameraNear,cameraFar); #else float viewZ=orthographicDepthToViewZ(fragCoordZ,cameraNear,cameraFar); #endif -float depthTest=(-vViewZ>-viewZ)?1.0:0.0;gl_FragColor.rg=vec2(0.0,depthTest);}`,Jde=`#include +float depthTest=(-vViewZ>-viewZ)?1.0:0.0;gl_FragColor.rg=vec2(0.0,depthTest);}`,efe=`#include #include #include #include @@ -4103,7 +4103,7 @@ varying float vViewZ;varying vec4 vProjTexCoord;void main(){ #include vViewZ=mvPosition.z;vProjTexCoord=gl_Position; #include -}`,efe=class extends sn{constructor(t=null,e){super({name:"DepthComparisonMaterial",defines:{DEPTH_PACKING:"0"},uniforms:{depthBuffer:new Me(null),cameraNear:new Me(.3),cameraFar:new Me(1e3)},blending:lr,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:Qde,vertexShader:Jde}),this.depthBuffer=t,this.depthPacking=Ra,this.copyCameraSettings(e)}set depthBuffer(t){this.uniforms.depthBuffer.value=t}set depthPacking(t){this.defines.DEPTH_PACKING=t.toFixed(0),this.needsUpdate=!0}setDepthBuffer(t,e=Ra){this.depthBuffer=t,this.depthPacking=e}adoptCameraSettings(t){this.copyCameraSettings(t)}copyCameraSettings(t){t&&(this.uniforms.cameraNear.value=t.near,this.uniforms.cameraFar.value=t.far,t instanceof or?this.defines.PERSPECTIVE_CAMERA="1":delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}},tfe=`#include +}`,tfe=class extends sn{constructor(t=null,e){super({name:"DepthComparisonMaterial",defines:{DEPTH_PACKING:"0"},uniforms:{depthBuffer:new Me(null),cameraNear:new Me(.3),cameraFar:new Me(1e3)},blending:lr,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:Jde,vertexShader:efe}),this.depthBuffer=t,this.depthPacking=Ra,this.copyCameraSettings(e)}set depthBuffer(t){this.uniforms.depthBuffer.value=t}set depthPacking(t){this.defines.DEPTH_PACKING=t.toFixed(0),this.needsUpdate=!0}setDepthBuffer(t,e=Ra){this.depthBuffer=t,this.depthPacking=e}adoptCameraSettings(t){this.copyCameraSettings(t)}copyCameraSettings(t){t&&(this.uniforms.cameraNear.value=t.near,this.uniforms.cameraFar.value=t.far,t instanceof or?this.defines.PERSPECTIVE_CAMERA="1":delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}},nfe=`#include varying vec2 vUv; #ifdef NORMAL_DEPTH #ifdef GL_FRAGMENT_PRECISION_HIGH @@ -4139,7 +4139,7 @@ gl_FragColor=(depth==1.0)?vec4(1.0):packDepthToRGBA(depth); gl_FragColor=vec4(vec3(depth),1.0); #endif #endif -}`,nfe=`varying vec2 vUv; +}`,rfe=`varying vec2 vUv; #if DEPTH_COPY_MODE == 1 uniform vec2 texelPosition; #endif @@ -4149,7 +4149,7 @@ vUv=texelPosition; #else vUv=position.xy*0.5+0.5; #endif -gl_Position=vec4(position.xy,1.0,1.0);}`,rfe=class extends sn{constructor(){super({name:"DepthCopyMaterial",defines:{INPUT_DEPTH_PACKING:"0",OUTPUT_DEPTH_PACKING:"0",DEPTH_COPY_MODE:"0"},uniforms:{depthBuffer:new Me(null),texelPosition:new Me(new Ee)},blending:lr,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:tfe,vertexShader:nfe}),this.depthCopyMode=qp.FULL}get depthBuffer(){return this.uniforms.depthBuffer.value}set depthBuffer(t){this.uniforms.depthBuffer.value=t}set inputDepthPacking(t){this.defines.INPUT_DEPTH_PACKING=t.toFixed(0),this.needsUpdate=!0}get outputDepthPacking(){return Number(this.defines.OUTPUT_DEPTH_PACKING)}set outputDepthPacking(t){this.defines.OUTPUT_DEPTH_PACKING=t.toFixed(0),this.needsUpdate=!0}setDepthBuffer(t,e=di){this.depthBuffer=t,this.inputDepthPacking=e}getInputDepthPacking(){return Number(this.defines.INPUT_DEPTH_PACKING)}setInputDepthPacking(t){this.defines.INPUT_DEPTH_PACKING=t.toFixed(0),this.needsUpdate=!0}getOutputDepthPacking(){return Number(this.defines.OUTPUT_DEPTH_PACKING)}setOutputDepthPacking(t){this.defines.OUTPUT_DEPTH_PACKING=t.toFixed(0),this.needsUpdate=!0}get texelPosition(){return this.uniforms.texelPosition.value}getTexelPosition(){return this.uniforms.texelPosition.value}setTexelPosition(t){this.uniforms.texelPosition.value=t}get mode(){return this.depthCopyMode}set mode(t){this.depthCopyMode=t,this.defines.DEPTH_COPY_MODE=t.toFixed(0),this.needsUpdate=!0}getMode(){return this.mode}setMode(t){this.mode=t}},ife=`#include +gl_Position=vec4(position.xy,1.0,1.0);}`,ife=class extends sn{constructor(){super({name:"DepthCopyMaterial",defines:{INPUT_DEPTH_PACKING:"0",OUTPUT_DEPTH_PACKING:"0",DEPTH_COPY_MODE:"0"},uniforms:{depthBuffer:new Me(null),texelPosition:new Me(new Ee)},blending:lr,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:nfe,vertexShader:rfe}),this.depthCopyMode=qp.FULL}get depthBuffer(){return this.uniforms.depthBuffer.value}set depthBuffer(t){this.uniforms.depthBuffer.value=t}set inputDepthPacking(t){this.defines.INPUT_DEPTH_PACKING=t.toFixed(0),this.needsUpdate=!0}get outputDepthPacking(){return Number(this.defines.OUTPUT_DEPTH_PACKING)}set outputDepthPacking(t){this.defines.OUTPUT_DEPTH_PACKING=t.toFixed(0),this.needsUpdate=!0}setDepthBuffer(t,e=di){this.depthBuffer=t,this.inputDepthPacking=e}getInputDepthPacking(){return Number(this.defines.INPUT_DEPTH_PACKING)}setInputDepthPacking(t){this.defines.INPUT_DEPTH_PACKING=t.toFixed(0),this.needsUpdate=!0}getOutputDepthPacking(){return Number(this.defines.OUTPUT_DEPTH_PACKING)}setOutputDepthPacking(t){this.defines.OUTPUT_DEPTH_PACKING=t.toFixed(0),this.needsUpdate=!0}get texelPosition(){return this.uniforms.texelPosition.value}getTexelPosition(){return this.uniforms.texelPosition.value}setTexelPosition(t){this.uniforms.texelPosition.value=t}get mode(){return this.depthCopyMode}set mode(t){this.depthCopyMode=t,this.defines.DEPTH_COPY_MODE=t.toFixed(0),this.needsUpdate=!0}getMode(){return this.mode}setMode(t){this.mode=t}},ofe=`#include #ifdef GL_FRAGMENT_PRECISION_HIGH uniform highp sampler2D depthBuffer; #else @@ -4170,7 +4170,7 @@ vec3 n[]=vec3[4](texture2D(normalBuffer,vUv0).rgb,texture2D(normalBuffer,vUv1).r #else vec3 n[]=vec3[4](vec3(0.0),vec3(0.0),vec3(0.0),vec3(0.0)); #endif -gl_FragColor=vec4(n[index],d[index]);}`,ofe="uniform vec2 texelSize;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 uv=position.xy*0.5+0.5;vUv0=uv;vUv1=vec2(uv.x,uv.y+texelSize.y);vUv2=vec2(uv.x+texelSize.x,uv.y);vUv3=uv+texelSize;gl_Position=vec4(position.xy,1.0,1.0);}",sfe=class extends sn{constructor(){super({name:"DepthDownsamplingMaterial",defines:{DEPTH_PACKING:"0"},uniforms:{depthBuffer:new Me(null),normalBuffer:new Me(null),texelSize:new Me(new Ee)},blending:lr,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:ife,vertexShader:ofe})}set depthBuffer(t){this.uniforms.depthBuffer.value=t}set depthPacking(t){this.defines.DEPTH_PACKING=t.toFixed(0),this.needsUpdate=!0}setDepthBuffer(t,e=di){this.depthBuffer=t,this.depthPacking=e}set normalBuffer(t){this.uniforms.normalBuffer.value=t,t!==null?this.defines.DOWNSAMPLE_NORMALS="1":delete this.defines.DOWNSAMPLE_NORMALS,this.needsUpdate=!0}setNormalBuffer(t){this.normalBuffer=t}setTexelSize(t,e){this.uniforms.texelSize.value.set(t,e)}setSize(t,e){this.uniforms.texelSize.value.set(1/t,1/e)}},afe=`#include +gl_FragColor=vec4(n[index],d[index]);}`,sfe="uniform vec2 texelSize;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 uv=position.xy*0.5+0.5;vUv0=uv;vUv1=vec2(uv.x,uv.y+texelSize.y);vUv2=vec2(uv.x+texelSize.x,uv.y);vUv3=uv+texelSize;gl_Position=vec4(position.xy,1.0,1.0);}",afe=class extends sn{constructor(){super({name:"DepthDownsamplingMaterial",defines:{DEPTH_PACKING:"0"},uniforms:{depthBuffer:new Me(null),normalBuffer:new Me(null),texelSize:new Me(new Ee)},blending:lr,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:ofe,vertexShader:sfe})}set depthBuffer(t){this.uniforms.depthBuffer.value=t}set depthPacking(t){this.defines.DEPTH_PACKING=t.toFixed(0),this.needsUpdate=!0}setDepthBuffer(t,e=di){this.depthBuffer=t,this.depthPacking=e}set normalBuffer(t){this.uniforms.normalBuffer.value=t,t!==null?this.defines.DOWNSAMPLE_NORMALS="1":delete this.defines.DOWNSAMPLE_NORMALS,this.needsUpdate=!0}setNormalBuffer(t){this.normalBuffer=t}setTexelSize(t,e){this.uniforms.texelSize.value.set(t,e)}setSize(t,e){this.uniforms.texelSize.value.set(1/t,1/e)}},lfe=`#include #include #ifdef GL_FRAGMENT_PRECISION_HIGH uniform highp sampler2D depthBuffer0;uniform highp sampler2D depthBuffer1; @@ -4211,7 +4211,7 @@ bool keep=isMaxDepth||depthTest(depth.x,depth.y); #else bool keep=!isMaxDepth&&depthTest(depth.x,depth.y); #endif -if(keep){gl_FragColor=texture2D(inputBuffer,vUv);}else{discard;}}`,H$=class extends sn{constructor(){super({name:"DepthMaskMaterial",defines:{DEPTH_EPSILON:"0.0001",DEPTH_PACKING_0:"0",DEPTH_PACKING_1:"0",DEPTH_TEST_STRATEGY:ym.KEEP_MAX_DEPTH},uniforms:{inputBuffer:new Me(null),depthBuffer0:new Me(null),depthBuffer1:new Me(null),cameraNearFar:new Me(new Ee(1,1))},blending:lr,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:afe,vertexShader:ad}),this.depthMode=vx}set depthBuffer0(t){this.uniforms.depthBuffer0.value=t}set depthPacking0(t){this.defines.DEPTH_PACKING_0=t.toFixed(0),this.needsUpdate=!0}setDepthBuffer0(t,e=di){this.depthBuffer0=t,this.depthPacking0=e}set depthBuffer1(t){this.uniforms.depthBuffer1.value=t}set depthPacking1(t){this.defines.DEPTH_PACKING_1=t.toFixed(0),this.needsUpdate=!0}setDepthBuffer1(t,e=di){this.depthBuffer1=t,this.depthPacking1=e}get maxDepthStrategy(){return Number(this.defines.DEPTH_TEST_STRATEGY)}set maxDepthStrategy(t){this.defines.DEPTH_TEST_STRATEGY=t.toFixed(0),this.needsUpdate=!0}get keepFar(){return this.maxDepthStrategy}set keepFar(t){this.maxDepthStrategy=t?ym.KEEP_MAX_DEPTH:ym.DISCARD_MAX_DEPTH}getMaxDepthStrategy(){return this.maxDepthStrategy}setMaxDepthStrategy(t){this.maxDepthStrategy=t}get epsilon(){return Number(this.defines.DEPTH_EPSILON)}set epsilon(t){this.defines.DEPTH_EPSILON=t.toFixed(16),this.needsUpdate=!0}getEpsilon(){return this.epsilon}setEpsilon(t){this.epsilon=t}get depthMode(){return Number(this.defines.DEPTH_MODE)}set depthMode(t){let e;switch(t){case HO:e="false";break;case VO:e="true";break;case Wm:e="abs(d1 - d0) <= DEPTH_EPSILON";break;case pS:e="abs(d1 - d0) > DEPTH_EPSILON";break;case vx:e="d0 > d1";break;case Gm:e="d0 >= d1";break;case jO:e="d0 <= d1";break;case $O:default:e="d0 < d1";break}this.defines.DEPTH_MODE=t.toFixed(0),this.defines["depthTest(d0, d1)"]=e,this.needsUpdate=!0}getDepthMode(){return this.depthMode}setDepthMode(t){this.depthMode=t}adoptCameraSettings(t){this.copyCameraSettings(t)}copyCameraSettings(t){t&&(this.uniforms.cameraNearFar.value.set(t.near,t.far),t instanceof or?this.defines.PERSPECTIVE_CAMERA="1":delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}},lfe=`#ifdef FRAMEBUFFER_PRECISION_HIGH +if(keep){gl_FragColor=texture2D(inputBuffer,vUv);}else{discard;}}`,V$=class extends sn{constructor(){super({name:"DepthMaskMaterial",defines:{DEPTH_EPSILON:"0.0001",DEPTH_PACKING_0:"0",DEPTH_PACKING_1:"0",DEPTH_TEST_STRATEGY:ym.KEEP_MAX_DEPTH},uniforms:{inputBuffer:new Me(null),depthBuffer0:new Me(null),depthBuffer1:new Me(null),cameraNearFar:new Me(new Ee(1,1))},blending:lr,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:lfe,vertexShader:ad}),this.depthMode=vx}set depthBuffer0(t){this.uniforms.depthBuffer0.value=t}set depthPacking0(t){this.defines.DEPTH_PACKING_0=t.toFixed(0),this.needsUpdate=!0}setDepthBuffer0(t,e=di){this.depthBuffer0=t,this.depthPacking0=e}set depthBuffer1(t){this.uniforms.depthBuffer1.value=t}set depthPacking1(t){this.defines.DEPTH_PACKING_1=t.toFixed(0),this.needsUpdate=!0}setDepthBuffer1(t,e=di){this.depthBuffer1=t,this.depthPacking1=e}get maxDepthStrategy(){return Number(this.defines.DEPTH_TEST_STRATEGY)}set maxDepthStrategy(t){this.defines.DEPTH_TEST_STRATEGY=t.toFixed(0),this.needsUpdate=!0}get keepFar(){return this.maxDepthStrategy}set keepFar(t){this.maxDepthStrategy=t?ym.KEEP_MAX_DEPTH:ym.DISCARD_MAX_DEPTH}getMaxDepthStrategy(){return this.maxDepthStrategy}setMaxDepthStrategy(t){this.maxDepthStrategy=t}get epsilon(){return Number(this.defines.DEPTH_EPSILON)}set epsilon(t){this.defines.DEPTH_EPSILON=t.toFixed(16),this.needsUpdate=!0}getEpsilon(){return this.epsilon}setEpsilon(t){this.epsilon=t}get depthMode(){return Number(this.defines.DEPTH_MODE)}set depthMode(t){let e;switch(t){case HO:e="false";break;case VO:e="true";break;case Wm:e="abs(d1 - d0) <= DEPTH_EPSILON";break;case pS:e="abs(d1 - d0) > DEPTH_EPSILON";break;case vx:e="d0 > d1";break;case Gm:e="d0 >= d1";break;case jO:e="d0 <= d1";break;case $O:default:e="d0 < d1";break}this.defines.DEPTH_MODE=t.toFixed(0),this.defines["depthTest(d0, d1)"]=e,this.needsUpdate=!0}getDepthMode(){return this.depthMode}setDepthMode(t){this.depthMode=t}adoptCameraSettings(t){this.copyCameraSettings(t)}copyCameraSettings(t){t&&(this.uniforms.cameraNearFar.value.set(t.near,t.far),t instanceof or?this.defines.PERSPECTIVE_CAMERA="1":delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}},cfe=`#ifdef FRAMEBUFFER_PRECISION_HIGH uniform mediump sampler2D inputBuffer; #else uniform lowp sampler2D inputBuffer; @@ -4220,7 +4220,7 @@ uniform lowp sampler2D inputBuffer; #define WEIGHT_OUTER 0.0555555 varying vec2 vUv;varying vec2 vUv00;varying vec2 vUv01;varying vec2 vUv02;varying vec2 vUv03;varying vec2 vUv04;varying vec2 vUv05;varying vec2 vUv06;varying vec2 vUv07;varying vec2 vUv08;varying vec2 vUv09;varying vec2 vUv10;varying vec2 vUv11;float clampToBorder(const in vec2 uv){return float(uv.s>=0.0&&uv.s<=1.0&&uv.t>=0.0&&uv.t<=1.0);}void main(){vec4 c=vec4(0.0);vec4 w=WEIGHT_INNER*vec4(clampToBorder(vUv00),clampToBorder(vUv01),clampToBorder(vUv02),clampToBorder(vUv03));c+=w.x*texture2D(inputBuffer,vUv00);c+=w.y*texture2D(inputBuffer,vUv01);c+=w.z*texture2D(inputBuffer,vUv02);c+=w.w*texture2D(inputBuffer,vUv03);w=WEIGHT_OUTER*vec4(clampToBorder(vUv04),clampToBorder(vUv05),clampToBorder(vUv06),clampToBorder(vUv07));c+=w.x*texture2D(inputBuffer,vUv04);c+=w.y*texture2D(inputBuffer,vUv05);c+=w.z*texture2D(inputBuffer,vUv06);c+=w.w*texture2D(inputBuffer,vUv07);w=WEIGHT_OUTER*vec4(clampToBorder(vUv08),clampToBorder(vUv09),clampToBorder(vUv10),clampToBorder(vUv11));c+=w.x*texture2D(inputBuffer,vUv08);c+=w.y*texture2D(inputBuffer,vUv09);c+=w.z*texture2D(inputBuffer,vUv10);c+=w.w*texture2D(inputBuffer,vUv11);c+=WEIGHT_OUTER*texture2D(inputBuffer,vUv);gl_FragColor=c; #include -}`,cfe="uniform vec2 texelSize;varying vec2 vUv;varying vec2 vUv00;varying vec2 vUv01;varying vec2 vUv02;varying vec2 vUv03;varying vec2 vUv04;varying vec2 vUv05;varying vec2 vUv06;varying vec2 vUv07;varying vec2 vUv08;varying vec2 vUv09;varying vec2 vUv10;varying vec2 vUv11;void main(){vUv=position.xy*0.5+0.5;vUv00=vUv+texelSize*vec2(-1.0,1.0);vUv01=vUv+texelSize*vec2(1.0,1.0);vUv02=vUv+texelSize*vec2(-1.0,-1.0);vUv03=vUv+texelSize*vec2(1.0,-1.0);vUv04=vUv+texelSize*vec2(-2.0,2.0);vUv05=vUv+texelSize*vec2(0.0,2.0);vUv06=vUv+texelSize*vec2(2.0,2.0);vUv07=vUv+texelSize*vec2(-2.0,0.0);vUv08=vUv+texelSize*vec2(2.0,0.0);vUv09=vUv+texelSize*vec2(-2.0,-2.0);vUv10=vUv+texelSize*vec2(0.0,-2.0);vUv11=vUv+texelSize*vec2(2.0,-2.0);gl_Position=vec4(position.xy,1.0,1.0);}",ufe=class extends sn{constructor(){super({name:"DownsamplingMaterial",uniforms:{inputBuffer:new Me(null),texelSize:new Me(new Ee)},blending:lr,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:lfe,vertexShader:cfe})}set inputBuffer(t){this.uniforms.inputBuffer.value=t}setSize(t,e){this.uniforms.texelSize.value.set(1/t,1/e)}},dfe=`#include +}`,ufe="uniform vec2 texelSize;varying vec2 vUv;varying vec2 vUv00;varying vec2 vUv01;varying vec2 vUv02;varying vec2 vUv03;varying vec2 vUv04;varying vec2 vUv05;varying vec2 vUv06;varying vec2 vUv07;varying vec2 vUv08;varying vec2 vUv09;varying vec2 vUv10;varying vec2 vUv11;void main(){vUv=position.xy*0.5+0.5;vUv00=vUv+texelSize*vec2(-1.0,1.0);vUv01=vUv+texelSize*vec2(1.0,1.0);vUv02=vUv+texelSize*vec2(-1.0,-1.0);vUv03=vUv+texelSize*vec2(1.0,-1.0);vUv04=vUv+texelSize*vec2(-2.0,2.0);vUv05=vUv+texelSize*vec2(0.0,2.0);vUv06=vUv+texelSize*vec2(2.0,2.0);vUv07=vUv+texelSize*vec2(-2.0,0.0);vUv08=vUv+texelSize*vec2(2.0,0.0);vUv09=vUv+texelSize*vec2(-2.0,-2.0);vUv10=vUv+texelSize*vec2(0.0,-2.0);vUv11=vUv+texelSize*vec2(2.0,-2.0);gl_Position=vec4(position.xy,1.0,1.0);}",dfe=class extends sn{constructor(){super({name:"DownsamplingMaterial",uniforms:{inputBuffer:new Me(null),texelSize:new Me(new Ee)},blending:lr,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:cfe,vertexShader:ufe})}set inputBuffer(t){this.uniforms.inputBuffer.value=t}setSize(t,e){this.uniforms.texelSize.value.set(1/t,1/e)}},ffe=`#include #include #include #define packFloatToRGBA(v) packDepthToRGBA(v) @@ -4261,7 +4261,7 @@ return orthographicDepthToViewZ(depth,cameraNear,cameraFar); #include #endif #include -}`,ffe="uniform vec2 resolution;uniform vec2 texelSize;uniform float cameraNear;uniform float cameraFar;uniform float aspect;uniform float time;varying vec2 vUv;VERTEX_HEAD void main(){vUv=position.xy*0.5+0.5;VERTEX_MAIN_SUPPORT gl_Position=vec4(position.xy,1.0,1.0);}",hfe=class extends sn{constructor(t,e,n,r,i=!1){super({name:"EffectMaterial",defines:{THREE_REVISION:td.replace(/\D+/g,""),DEPTH_PACKING:"0",ENCODE_OUTPUT:"1"},uniforms:{inputBuffer:new Me(null),depthBuffer:new Me(null),resolution:new Me(new Ee),texelSize:new Me(new Ee),cameraNear:new Me(.3),cameraFar:new Me(1e3),aspect:new Me(1),time:new Me(0)},blending:lr,toneMapped:!1,depthWrite:!1,depthTest:!1,dithering:i}),t&&this.setShaderParts(t),e&&this.setDefines(e),n&&this.setUniforms(n),this.copyCameraSettings(r)}set inputBuffer(t){this.uniforms.inputBuffer.value=t}setInputBuffer(t){this.uniforms.inputBuffer.value=t}get depthBuffer(){return this.uniforms.depthBuffer.value}set depthBuffer(t){this.uniforms.depthBuffer.value=t}get depthPacking(){return Number(this.defines.DEPTH_PACKING)}set depthPacking(t){this.defines.DEPTH_PACKING=t.toFixed(0),this.needsUpdate=!0}setDepthBuffer(t,e=di){this.depthBuffer=t,this.depthPacking=e}setShaderData(t){this.setShaderParts(t.shaderParts),this.setDefines(t.defines),this.setUniforms(t.uniforms),this.setExtensions(t.extensions)}setShaderParts(t){return this.fragmentShader=dfe.replace(Rn.FRAGMENT_HEAD,t.get(Rn.FRAGMENT_HEAD)||"").replace(Rn.FRAGMENT_MAIN_UV,t.get(Rn.FRAGMENT_MAIN_UV)||"").replace(Rn.FRAGMENT_MAIN_IMAGE,t.get(Rn.FRAGMENT_MAIN_IMAGE)||""),this.vertexShader=ffe.replace(Rn.VERTEX_HEAD,t.get(Rn.VERTEX_HEAD)||"").replace(Rn.VERTEX_MAIN_SUPPORT,t.get(Rn.VERTEX_MAIN_SUPPORT)||""),this.needsUpdate=!0,this}setDefines(t){for(const e of t.entries())this.defines[e[0]]=e[1];return this.needsUpdate=!0,this}setUniforms(t){for(const e of t.entries())this.uniforms[e[0]]=e[1];return this}setExtensions(t){this.extensions={};for(const e of t)this.extensions[e]=!0;return this}get encodeOutput(){return this.defines.ENCODE_OUTPUT!==void 0}set encodeOutput(t){this.encodeOutput!==t&&(t?this.defines.ENCODE_OUTPUT="1":delete this.defines.ENCODE_OUTPUT,this.needsUpdate=!0)}isOutputEncodingEnabled(t){return this.encodeOutput}setOutputEncodingEnabled(t){this.encodeOutput=t}get time(){return this.uniforms.time.value}set time(t){this.uniforms.time.value=t}setDeltaTime(t){this.uniforms.time.value+=t}adoptCameraSettings(t){this.copyCameraSettings(t)}copyCameraSettings(t){t&&(this.uniforms.cameraNear.value=t.near,this.uniforms.cameraFar.value=t.far,t instanceof or?this.defines.PERSPECTIVE_CAMERA="1":delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}setSize(t,e){const n=this.uniforms;n.resolution.value.set(t,e),n.texelSize.value.set(1/t,1/e),n.aspect.value=t/e}static get Section(){return Rn}},pfe=`#include +}`,hfe="uniform vec2 resolution;uniform vec2 texelSize;uniform float cameraNear;uniform float cameraFar;uniform float aspect;uniform float time;varying vec2 vUv;VERTEX_HEAD void main(){vUv=position.xy*0.5+0.5;VERTEX_MAIN_SUPPORT gl_Position=vec4(position.xy,1.0,1.0);}",pfe=class extends sn{constructor(t,e,n,r,i=!1){super({name:"EffectMaterial",defines:{THREE_REVISION:td.replace(/\D+/g,""),DEPTH_PACKING:"0",ENCODE_OUTPUT:"1"},uniforms:{inputBuffer:new Me(null),depthBuffer:new Me(null),resolution:new Me(new Ee),texelSize:new Me(new Ee),cameraNear:new Me(.3),cameraFar:new Me(1e3),aspect:new Me(1),time:new Me(0)},blending:lr,toneMapped:!1,depthWrite:!1,depthTest:!1,dithering:i}),t&&this.setShaderParts(t),e&&this.setDefines(e),n&&this.setUniforms(n),this.copyCameraSettings(r)}set inputBuffer(t){this.uniforms.inputBuffer.value=t}setInputBuffer(t){this.uniforms.inputBuffer.value=t}get depthBuffer(){return this.uniforms.depthBuffer.value}set depthBuffer(t){this.uniforms.depthBuffer.value=t}get depthPacking(){return Number(this.defines.DEPTH_PACKING)}set depthPacking(t){this.defines.DEPTH_PACKING=t.toFixed(0),this.needsUpdate=!0}setDepthBuffer(t,e=di){this.depthBuffer=t,this.depthPacking=e}setShaderData(t){this.setShaderParts(t.shaderParts),this.setDefines(t.defines),this.setUniforms(t.uniforms),this.setExtensions(t.extensions)}setShaderParts(t){return this.fragmentShader=ffe.replace(Rn.FRAGMENT_HEAD,t.get(Rn.FRAGMENT_HEAD)||"").replace(Rn.FRAGMENT_MAIN_UV,t.get(Rn.FRAGMENT_MAIN_UV)||"").replace(Rn.FRAGMENT_MAIN_IMAGE,t.get(Rn.FRAGMENT_MAIN_IMAGE)||""),this.vertexShader=hfe.replace(Rn.VERTEX_HEAD,t.get(Rn.VERTEX_HEAD)||"").replace(Rn.VERTEX_MAIN_SUPPORT,t.get(Rn.VERTEX_MAIN_SUPPORT)||""),this.needsUpdate=!0,this}setDefines(t){for(const e of t.entries())this.defines[e[0]]=e[1];return this.needsUpdate=!0,this}setUniforms(t){for(const e of t.entries())this.uniforms[e[0]]=e[1];return this}setExtensions(t){this.extensions={};for(const e of t)this.extensions[e]=!0;return this}get encodeOutput(){return this.defines.ENCODE_OUTPUT!==void 0}set encodeOutput(t){this.encodeOutput!==t&&(t?this.defines.ENCODE_OUTPUT="1":delete this.defines.ENCODE_OUTPUT,this.needsUpdate=!0)}isOutputEncodingEnabled(t){return this.encodeOutput}setOutputEncodingEnabled(t){this.encodeOutput=t}get time(){return this.uniforms.time.value}set time(t){this.uniforms.time.value=t}setDeltaTime(t){this.uniforms.time.value+=t}adoptCameraSettings(t){this.copyCameraSettings(t)}copyCameraSettings(t){t&&(this.uniforms.cameraNear.value=t.near,this.uniforms.cameraFar.value=t.far,t instanceof or?this.defines.PERSPECTIVE_CAMERA="1":delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}setSize(t,e){const n=this.uniforms;n.resolution.value.set(t,e),n.texelSize.value.set(1/t,1/e),n.aspect.value=t/e}static get Section(){return Rn}},mfe=`#include #include #ifdef FRAMEBUFFER_PRECISION_HIGH uniform mediump sampler2D inputBuffer; @@ -4270,7 +4270,7 @@ uniform lowp sampler2D inputBuffer; #endif uniform vec2 lightPosition;uniform float exposure;uniform float decay;uniform float density;uniform float weight;uniform float clampMax;varying vec2 vUv;void main(){vec2 coord=vUv;vec2 delta=lightPosition-coord;delta*=1.0/SAMPLES_FLOAT*density;float illuminationDecay=1.0;vec4 color=vec4(0.0);for(int i=0;i -}`,mfe=class extends sn{constructor(t){super({name:"GodRaysMaterial",defines:{SAMPLES_INT:"60",SAMPLES_FLOAT:"60.0"},uniforms:{inputBuffer:new Me(null),lightPosition:new Me(t),density:new Me(1),decay:new Me(1),weight:new Me(1),exposure:new Me(1),clampMax:new Me(1)},blending:lr,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:pfe,vertexShader:ad})}set inputBuffer(t){this.uniforms.inputBuffer.value=t}setInputBuffer(t){this.uniforms.inputBuffer.value=t}get lightPosition(){return this.uniforms.lightPosition.value}getLightPosition(){return this.uniforms.lightPosition.value}setLightPosition(t){this.uniforms.lightPosition.value=t}get density(){return this.uniforms.density.value}set density(t){this.uniforms.density.value=t}getDensity(){return this.uniforms.density.value}setDensity(t){this.uniforms.density.value=t}get decay(){return this.uniforms.decay.value}set decay(t){this.uniforms.decay.value=t}getDecay(){return this.uniforms.decay.value}setDecay(t){this.uniforms.decay.value=t}get weight(){return this.uniforms.weight.value}set weight(t){this.uniforms.weight.value=t}getWeight(){return this.uniforms.weight.value}setWeight(t){this.uniforms.weight.value=t}get exposure(){return this.uniforms.exposure.value}set exposure(t){this.uniforms.exposure.value=t}getExposure(){return this.uniforms.exposure.value}setExposure(t){this.uniforms.exposure.value=t}get maxIntensity(){return this.uniforms.clampMax.value}set maxIntensity(t){this.uniforms.clampMax.value=t}getMaxIntensity(){return this.uniforms.clampMax.value}setMaxIntensity(t){this.uniforms.clampMax.value=t}get samples(){return Number(this.defines.SAMPLES_INT)}set samples(t){const e=Math.floor(t);this.defines.SAMPLES_INT=e.toFixed(0),this.defines.SAMPLES_FLOAT=e.toFixed(1),this.needsUpdate=!0}getSamples(){return this.samples}setSamples(t){this.samples=t}},gfe=`#include +}`,gfe=class extends sn{constructor(t){super({name:"GodRaysMaterial",defines:{SAMPLES_INT:"60",SAMPLES_FLOAT:"60.0"},uniforms:{inputBuffer:new Me(null),lightPosition:new Me(t),density:new Me(1),decay:new Me(1),weight:new Me(1),exposure:new Me(1),clampMax:new Me(1)},blending:lr,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:mfe,vertexShader:ad})}set inputBuffer(t){this.uniforms.inputBuffer.value=t}setInputBuffer(t){this.uniforms.inputBuffer.value=t}get lightPosition(){return this.uniforms.lightPosition.value}getLightPosition(){return this.uniforms.lightPosition.value}setLightPosition(t){this.uniforms.lightPosition.value=t}get density(){return this.uniforms.density.value}set density(t){this.uniforms.density.value=t}getDensity(){return this.uniforms.density.value}setDensity(t){this.uniforms.density.value=t}get decay(){return this.uniforms.decay.value}set decay(t){this.uniforms.decay.value=t}getDecay(){return this.uniforms.decay.value}setDecay(t){this.uniforms.decay.value=t}get weight(){return this.uniforms.weight.value}set weight(t){this.uniforms.weight.value=t}getWeight(){return this.uniforms.weight.value}setWeight(t){this.uniforms.weight.value=t}get exposure(){return this.uniforms.exposure.value}set exposure(t){this.uniforms.exposure.value=t}getExposure(){return this.uniforms.exposure.value}setExposure(t){this.uniforms.exposure.value=t}get maxIntensity(){return this.uniforms.clampMax.value}set maxIntensity(t){this.uniforms.clampMax.value=t}getMaxIntensity(){return this.uniforms.clampMax.value}setMaxIntensity(t){this.uniforms.clampMax.value=t}get samples(){return Number(this.defines.SAMPLES_INT)}set samples(t){const e=Math.floor(t);this.defines.SAMPLES_INT=e.toFixed(0),this.defines.SAMPLES_FLOAT=e.toFixed(1),this.needsUpdate=!0}getSamples(){return this.samples}setSamples(t){this.samples=t}},vfe=`#include #if THREE_REVISION < 143 #define luminance(v) linearToRelativeLuminance(v) #endif @@ -4295,7 +4295,7 @@ gl_FragColor=vec4(texel.rgb*l,l); #else gl_FragColor=vec4(l); #endif -}`,vfe=class extends sn{constructor(t=!1,e=null){super({name:"LuminanceMaterial",defines:{THREE_REVISION:td.replace(/\D+/g,"")},uniforms:{inputBuffer:new Me(null),threshold:new Me(0),smoothing:new Me(1),range:new Me(null)},blending:lr,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:gfe,vertexShader:ad}),this.colorOutput=t,this.luminanceRange=e}set inputBuffer(t){this.uniforms.inputBuffer.value=t}setInputBuffer(t){this.uniforms.inputBuffer.value=t}get threshold(){return this.uniforms.threshold.value}set threshold(t){this.smoothing>0||t>0?this.defines.THRESHOLD="1":delete this.defines.THRESHOLD,this.uniforms.threshold.value=t}getThreshold(){return this.threshold}setThreshold(t){this.threshold=t}get smoothing(){return this.uniforms.smoothing.value}set smoothing(t){this.threshold>0||t>0?this.defines.THRESHOLD="1":delete this.defines.THRESHOLD,this.uniforms.smoothing.value=t}getSmoothingFactor(){return this.smoothing}setSmoothingFactor(t){this.smoothing=t}get useThreshold(){return this.threshold>0||this.smoothing>0}set useThreshold(t){}get colorOutput(){return this.defines.COLOR!==void 0}set colorOutput(t){t?this.defines.COLOR="1":delete this.defines.COLOR,this.needsUpdate=!0}isColorOutputEnabled(t){return this.colorOutput}setColorOutputEnabled(t){this.colorOutput=t}get useRange(){return this.luminanceRange!==null}set useRange(t){this.luminanceRange=null}get luminanceRange(){return this.uniforms.range.value}set luminanceRange(t){t!==null?this.defines.RANGE="1":delete this.defines.RANGE,this.uniforms.range.value=t,this.needsUpdate=!0}getLuminanceRange(){return this.luminanceRange}setLuminanceRange(t){this.luminanceRange=t}},yfe=`#ifdef FRAMEBUFFER_PRECISION_HIGH +}`,yfe=class extends sn{constructor(t=!1,e=null){super({name:"LuminanceMaterial",defines:{THREE_REVISION:td.replace(/\D+/g,"")},uniforms:{inputBuffer:new Me(null),threshold:new Me(0),smoothing:new Me(1),range:new Me(null)},blending:lr,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:vfe,vertexShader:ad}),this.colorOutput=t,this.luminanceRange=e}set inputBuffer(t){this.uniforms.inputBuffer.value=t}setInputBuffer(t){this.uniforms.inputBuffer.value=t}get threshold(){return this.uniforms.threshold.value}set threshold(t){this.smoothing>0||t>0?this.defines.THRESHOLD="1":delete this.defines.THRESHOLD,this.uniforms.threshold.value=t}getThreshold(){return this.threshold}setThreshold(t){this.threshold=t}get smoothing(){return this.uniforms.smoothing.value}set smoothing(t){this.threshold>0||t>0?this.defines.THRESHOLD="1":delete this.defines.THRESHOLD,this.uniforms.smoothing.value=t}getSmoothingFactor(){return this.smoothing}setSmoothingFactor(t){this.smoothing=t}get useThreshold(){return this.threshold>0||this.smoothing>0}set useThreshold(t){}get colorOutput(){return this.defines.COLOR!==void 0}set colorOutput(t){t?this.defines.COLOR="1":delete this.defines.COLOR,this.needsUpdate=!0}isColorOutputEnabled(t){return this.colorOutput}setColorOutputEnabled(t){this.colorOutput=t}get useRange(){return this.luminanceRange!==null}set useRange(t){this.luminanceRange=null}get luminanceRange(){return this.uniforms.range.value}set luminanceRange(t){t!==null?this.defines.RANGE="1":delete this.defines.RANGE,this.uniforms.range.value=t,this.needsUpdate=!0}getLuminanceRange(){return this.luminanceRange}setLuminanceRange(t){this.luminanceRange=t}},_fe=`#ifdef FRAMEBUFFER_PRECISION_HIGH uniform mediump sampler2D inputBuffer; #else uniform lowp sampler2D inputBuffer; @@ -4335,7 +4335,7 @@ gl_FragColor=vec4(mask*texture2D(inputBuffer,vUv).rgb,mask); #else gl_FragColor=mask*texture2D(inputBuffer,vUv); #endif -}`,_fe=class extends sn{constructor(t=null){super({name:"MaskMaterial",uniforms:{maskTexture:new Me(t),inputBuffer:new Me(null),strength:new Me(1)},blending:lr,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:yfe,vertexShader:ad}),this.colorChannel=If.RED,this.maskFunction=_m.DISCARD}set inputBuffer(t){this.uniforms.inputBuffer.value=t}setInputBuffer(t){this.uniforms.inputBuffer.value=t}set maskTexture(t){this.uniforms.maskTexture.value=t,delete this.defines.MASK_PRECISION_HIGH,t.type!==nr&&(this.defines.MASK_PRECISION_HIGH="1"),this.needsUpdate=!0}setMaskTexture(t){this.maskTexture=t}set colorChannel(t){this.defines.COLOR_CHANNEL=t.toFixed(0),this.needsUpdate=!0}setColorChannel(t){this.colorChannel=t}set maskFunction(t){this.defines.MASK_FUNCTION=t.toFixed(0),this.needsUpdate=!0}setMaskFunction(t){this.maskFunction=t}get inverted(){return this.defines.INVERTED!==void 0}set inverted(t){this.inverted&&!t?delete this.defines.INVERTED:t&&(this.defines.INVERTED="1"),this.needsUpdate=!0}isInverted(){return this.inverted}setInverted(t){this.inverted=t}get strength(){return this.uniforms.strength.value}set strength(t){this.uniforms.strength.value=t}getStrength(){return this.strength}setStrength(t){this.strength=t}},xfe="uniform lowp sampler2D inputBuffer;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 c0=texture2D(inputBuffer,vUv0).rg;vec2 c1=texture2D(inputBuffer,vUv1).rg;vec2 c2=texture2D(inputBuffer,vUv2).rg;vec2 c3=texture2D(inputBuffer,vUv3).rg;float d0=(c0.x-c1.x)*0.5;float d1=(c2.x-c3.x)*0.5;float d=length(vec2(d0,d1));float a0=min(c0.y,c1.y);float a1=min(c2.y,c3.y);float visibilityFactor=min(a0,a1);gl_FragColor.rg=(1.0-visibilityFactor>0.001)?vec2(d,0.0):vec2(0.0,d);}",wfe="uniform vec2 texelSize;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 uv=position.xy*0.5+0.5;vUv0=vec2(uv.x+texelSize.x,uv.y);vUv1=vec2(uv.x-texelSize.x,uv.y);vUv2=vec2(uv.x,uv.y+texelSize.y);vUv3=vec2(uv.x,uv.y-texelSize.y);gl_Position=vec4(position.xy,1.0,1.0);}",Sfe=class extends sn{constructor(t=new Ee){super({name:"OutlineMaterial",uniforms:{inputBuffer:new Me(null),texelSize:new Me(new Ee)},blending:lr,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:xfe,vertexShader:wfe}),this.uniforms.texelSize.value.set(t.x,t.y),this.uniforms.maskTexture=this.uniforms.inputBuffer}set inputBuffer(t){this.uniforms.inputBuffer.value=t}setInputBuffer(t){this.uniforms.inputBuffer.value=t}setTexelSize(t,e){this.uniforms.texelSize.value.set(t,e)}setSize(t,e){this.uniforms.texelSize.value.set(1/t,1/e)}},bfe=`#include +}`,xfe=class extends sn{constructor(t=null){super({name:"MaskMaterial",uniforms:{maskTexture:new Me(t),inputBuffer:new Me(null),strength:new Me(1)},blending:lr,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:_fe,vertexShader:ad}),this.colorChannel=If.RED,this.maskFunction=_m.DISCARD}set inputBuffer(t){this.uniforms.inputBuffer.value=t}setInputBuffer(t){this.uniforms.inputBuffer.value=t}set maskTexture(t){this.uniforms.maskTexture.value=t,delete this.defines.MASK_PRECISION_HIGH,t.type!==nr&&(this.defines.MASK_PRECISION_HIGH="1"),this.needsUpdate=!0}setMaskTexture(t){this.maskTexture=t}set colorChannel(t){this.defines.COLOR_CHANNEL=t.toFixed(0),this.needsUpdate=!0}setColorChannel(t){this.colorChannel=t}set maskFunction(t){this.defines.MASK_FUNCTION=t.toFixed(0),this.needsUpdate=!0}setMaskFunction(t){this.maskFunction=t}get inverted(){return this.defines.INVERTED!==void 0}set inverted(t){this.inverted&&!t?delete this.defines.INVERTED:t&&(this.defines.INVERTED="1"),this.needsUpdate=!0}isInverted(){return this.inverted}setInverted(t){this.inverted=t}get strength(){return this.uniforms.strength.value}set strength(t){this.uniforms.strength.value=t}getStrength(){return this.strength}setStrength(t){this.strength=t}},wfe="uniform lowp sampler2D inputBuffer;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 c0=texture2D(inputBuffer,vUv0).rg;vec2 c1=texture2D(inputBuffer,vUv1).rg;vec2 c2=texture2D(inputBuffer,vUv2).rg;vec2 c3=texture2D(inputBuffer,vUv3).rg;float d0=(c0.x-c1.x)*0.5;float d1=(c2.x-c3.x)*0.5;float d=length(vec2(d0,d1));float a0=min(c0.y,c1.y);float a1=min(c2.y,c3.y);float visibilityFactor=min(a0,a1);gl_FragColor.rg=(1.0-visibilityFactor>0.001)?vec2(d,0.0):vec2(0.0,d);}",Sfe="uniform vec2 texelSize;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 uv=position.xy*0.5+0.5;vUv0=vec2(uv.x+texelSize.x,uv.y);vUv1=vec2(uv.x-texelSize.x,uv.y);vUv2=vec2(uv.x,uv.y+texelSize.y);vUv3=vec2(uv.x,uv.y-texelSize.y);gl_Position=vec4(position.xy,1.0,1.0);}",bfe=class extends sn{constructor(t=new Ee){super({name:"OutlineMaterial",uniforms:{inputBuffer:new Me(null),texelSize:new Me(new Ee)},blending:lr,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:wfe,vertexShader:Sfe}),this.uniforms.texelSize.value.set(t.x,t.y),this.uniforms.maskTexture=this.uniforms.inputBuffer}set inputBuffer(t){this.uniforms.inputBuffer.value=t}setInputBuffer(t){this.uniforms.inputBuffer.value=t}setTexelSize(t,e){this.uniforms.texelSize.value.set(t,e)}setSize(t,e){this.uniforms.texelSize.value.set(1/t,1/e)}},Mfe=`#include #include #ifdef NORMAL_DEPTH #ifdef GL_FRAGMENT_PRECISION_HIGH @@ -4389,37 +4389,37 @@ if(linearDepth -}`,Cfe="uniform vec2 texelSize;varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;varying vec2 vUv6;varying vec2 vUv7;void main(){vUv=position.xy*0.5+0.5;vUv0=vUv+texelSize*vec2(-1.0,1.0);vUv1=vUv+texelSize*vec2(0.0,1.0);vUv2=vUv+texelSize*vec2(1.0,1.0);vUv3=vUv+texelSize*vec2(-1.0,0.0);vUv4=vUv+texelSize*vec2(1.0,0.0);vUv5=vUv+texelSize*vec2(-1.0,-1.0);vUv6=vUv+texelSize*vec2(0.0,-1.0);vUv7=vUv+texelSize*vec2(1.0,-1.0);gl_Position=vec4(position.xy,1.0,1.0);}",Tfe=class extends sn{constructor(){super({name:"UpsamplingMaterial",uniforms:{inputBuffer:new Me(null),supportBuffer:new Me(null),texelSize:new Me(new Ee),radius:new Me(.85)},blending:lr,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:Pfe,vertexShader:Cfe})}set inputBuffer(t){this.uniforms.inputBuffer.value=t}set supportBuffer(t){this.uniforms.supportBuffer.value=t}get radius(){return this.uniforms.radius.value}set radius(t){this.uniforms.radius.value=t}setSize(t,e){this.uniforms.texelSize.value.set(1/t,1/e)}},Ofe=new vh,Ul=null;function Rfe(){if(Ul===null){const t=new Float32Array([-1,-1,0,3,-1,0,-1,3,0]),e=new Float32Array([0,0,2,0,0,2]);Ul=new Jt,Ul.setAttribute!==void 0?(Ul.setAttribute("position",new Mn(t,3)),Ul.setAttribute("uv",new Mn(e,2))):(Ul.addAttribute("position",new Mn(t,3)),Ul.addAttribute("uv",new Mn(e,2)))}return Ul}var Dr=class{constructor(t="Pass",e=new Sc,n=Ofe){this.name=t,this.renderer=null,this.scene=e,this.camera=n,this.screen=null,this.rtt=!0,this.needsSwap=!0,this.needsDepthTexture=!1,this.enabled=!0}get renderToScreen(){return!this.rtt}set renderToScreen(t){if(this.rtt===t){const e=this.fullscreenMaterial;e!==null&&(e.needsUpdate=!0),this.rtt=!t}}set mainScene(t){}set mainCamera(t){}setRenderer(t){this.renderer=t}isEnabled(){return this.enabled}setEnabled(t){this.enabled=t}get fullscreenMaterial(){return this.screen!==null?this.screen.material:null}set fullscreenMaterial(t){let e=this.screen;e!==null?e.material=t:(e=new Er(Rfe(),t),e.frustumCulled=!1,this.scene===null&&(this.scene=new Sc),this.scene.add(e),this.screen=e)}getFullscreenMaterial(){return this.fullscreenMaterial}setFullscreenMaterial(t){this.fullscreenMaterial=t}getDepthTexture(){return null}setDepthTexture(t,e=di){}render(t,e,n,r,i){throw new Error("Render method not implemented!")}setSize(t,e){}initialize(t,e,n){}dispose(){for(const t of Object.keys(this)){const e=this[t];(e instanceof gn||e instanceof jr||e instanceof qn||e instanceof Dr)&&this[t].dispose()}}},V$=class extends Dr{constructor(t,e=!0){super("CopyPass"),this.fullscreenMaterial=new B$,this.needsSwap=!1,this.renderTarget=t,t===void 0&&(this.renderTarget=new gn(1,1,{minFilter:Dt,magFilter:Dt,stencilBuffer:!1,depthBuffer:!1}),this.renderTarget.texture.name="CopyPass.Target"),this.autoResize=e}get resize(){return this.autoResize}set resize(t){this.autoResize=t}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}setAutoResizeEnabled(t){this.autoResize=t}render(t,e,n,r,i){this.fullscreenMaterial.inputBuffer=e.texture,t.setRenderTarget(this.renderToScreen?null:this.renderTarget),t.render(this.scene,this.camera)}setSize(t,e){this.autoResize&&this.renderTarget.setSize(t,e)}initialize(t,e,n){n!==void 0&&(this.renderTarget.texture.type=n,n!==nr?this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1":pl(t)===Bn&&qr(this.renderTarget.texture,Bn))}},Afe=class extends Dr{constructor(){super("ClearMaskPass",null,null),this.needsSwap=!1}render(t,e,n,r,i){const o=t.state.buffers.stencil;o.setLocked(!1),o.setTest(!1)}},rN=new lt,jg=class extends Dr{constructor(t=!0,e=!0,n=!1){super("ClearPass",null,null),this.needsSwap=!1,this.color=t,this.depth=e,this.stencil=n,this.overrideClearColor=null,this.overrideClearAlpha=-1}setClearFlags(t,e,n){this.color=t,this.depth=e,this.stencil=n}getOverrideClearColor(){return this.overrideClearColor}setOverrideClearColor(t){this.overrideClearColor=t}getOverrideClearAlpha(){return this.overrideClearAlpha}setOverrideClearAlpha(t){this.overrideClearAlpha=t}render(t,e,n,r,i){const o=this.overrideClearColor,s=this.overrideClearAlpha,a=t.getClearAlpha(),l=o!==null,c=s>=0;l?(t.getClearColor(rN),t.setClearColor(o,c?s:a)):c&&t.setClearAlpha(s),t.setRenderTarget(this.renderToScreen?null:e),t.clear(this.color,this.depth,this.stencil),l?t.setClearColor(rN,a):c&&t.setClearAlpha(a)}},Bl=-1,Vn=class extends hs{constructor(t,e=Bl,n=Bl,r=1){super(),this.resizable=t,this.baseSize=new Ee(1,1),this.preferredSize=new Ee(e,n),this.target=this.preferredSize,this.s=r,this.effectiveSize=new Ee,this.addEventListener("change",()=>this.updateEffectiveSize()),this.updateEffectiveSize()}updateEffectiveSize(){const t=this.baseSize,e=this.preferredSize,n=this.effectiveSize,r=this.scale;e.width!==Bl?n.width=e.width:e.height!==Bl?n.width=Math.round(e.height*(t.width/Math.max(t.height,1))):n.width=Math.round(t.width*r),e.height!==Bl?n.height=e.height:e.width!==Bl?n.height=Math.round(e.width/Math.max(t.width/Math.max(t.height,1),1)):n.height=Math.round(t.height*r)}get width(){return this.effectiveSize.width}set width(t){this.preferredWidth=t}get height(){return this.effectiveSize.height}set height(t){this.preferredHeight=t}getWidth(){return this.width}getHeight(){return this.height}get scale(){return this.s}set scale(t){this.s!==t&&(this.s=t,this.preferredSize.setScalar(Bl),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getScale(){return this.scale}setScale(t){this.scale=t}get baseWidth(){return this.baseSize.width}set baseWidth(t){this.baseSize.width!==t&&(this.baseSize.width=t,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getBaseWidth(){return this.baseWidth}setBaseWidth(t){this.baseWidth=t}get baseHeight(){return this.baseSize.height}set baseHeight(t){this.baseSize.height!==t&&(this.baseSize.height=t,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getBaseHeight(){return this.baseHeight}setBaseHeight(t){this.baseHeight=t}setBaseSize(t,e){(this.baseSize.width!==t||this.baseSize.height!==e)&&(this.baseSize.set(t,e),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}get preferredWidth(){return this.preferredSize.width}set preferredWidth(t){this.preferredSize.width!==t&&(this.preferredSize.width=t,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getPreferredWidth(){return this.preferredWidth}setPreferredWidth(t){this.preferredWidth=t}get preferredHeight(){return this.preferredSize.height}set preferredHeight(t){this.preferredSize.height!==t&&(this.preferredSize.height=t,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getPreferredHeight(){return this.preferredHeight}setPreferredHeight(t){this.preferredHeight=t}setPreferredSize(t,e){(this.preferredSize.width!==t||this.preferredSize.height!==e)&&(this.preferredSize.set(t,e),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}copy(t){this.s=t.scale,this.baseSize.set(t.baseWidth,t.baseHeight),this.preferredSize.set(t.preferredWidth,t.preferredHeight),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height)}static get AUTO_SIZE(){return Bl}},cP=!1,iN=class{constructor(t=null){this.originalMaterials=new Map,this.material=null,this.materials=null,this.materialsBackSide=null,this.materialsDoubleSide=null,this.materialsFlatShaded=null,this.materialsFlatShadedBackSide=null,this.materialsFlatShadedDoubleSide=null,this.setMaterial(t),this.meshCount=0,this.replaceMaterial=e=>{if(e.isMesh){let n;if(e.material.flatShading)switch(e.material.side){case Hr:n=this.materialsFlatShadedDoubleSide;break;case Vr:n=this.materialsFlatShadedBackSide;break;default:n=this.materialsFlatShaded;break}else switch(e.material.side){case Hr:n=this.materialsDoubleSide;break;case Vr:n=this.materialsBackSide;break;default:n=this.materials;break}this.originalMaterials.set(e,e.material),e.isSkinnedMesh?e.material=n[2]:e.isInstancedMesh?e.material=n[1]:e.material=n[0],++this.meshCount}}}cloneMaterial(t){if(!(t instanceof sn))return t.clone();const e=t.uniforms,n=new Map;for(const i in e){const o=e[i].value;o.isRenderTargetTexture&&(e[i].value=null,n.set(i,o))}const r=t.clone();for(const i of n)e[i[0]].value=i[1],r.uniforms[i[0]].value=i[1];return r}setMaterial(t){if(this.disposeMaterials(),this.material=t,t!==null){const e=this.materials=[this.cloneMaterial(t),this.cloneMaterial(t),this.cloneMaterial(t)];for(const n of e)n.uniforms=Object.assign({},t.uniforms),n.side=Vs;e[2].skinning=!0,this.materialsBackSide=e.map(n=>{const r=this.cloneMaterial(n);return r.uniforms=Object.assign({},t.uniforms),r.side=Vr,r}),this.materialsDoubleSide=e.map(n=>{const r=this.cloneMaterial(n);return r.uniforms=Object.assign({},t.uniforms),r.side=Hr,r}),this.materialsFlatShaded=e.map(n=>{const r=this.cloneMaterial(n);return r.uniforms=Object.assign({},t.uniforms),r.flatShading=!0,r}),this.materialsFlatShadedBackSide=e.map(n=>{const r=this.cloneMaterial(n);return r.uniforms=Object.assign({},t.uniforms),r.flatShading=!0,r.side=Vr,r}),this.materialsFlatShadedDoubleSide=e.map(n=>{const r=this.cloneMaterial(n);return r.uniforms=Object.assign({},t.uniforms),r.flatShading=!0,r.side=Hr,r})}}render(t,e,n){const r=t.shadowMap.enabled;if(t.shadowMap.enabled=!1,cP){const i=this.originalMaterials;this.meshCount=0,e.traverse(this.replaceMaterial),t.render(e,n);for(const o of i)o[0].material=o[1];this.meshCount!==i.size&&i.clear()}else{const i=e.overrideMaterial;e.overrideMaterial=this.material,t.render(e,n),e.overrideMaterial=i}t.shadowMap.enabled=r}disposeMaterials(){if(this.material!==null){const t=this.materials.concat(this.materialsBackSide).concat(this.materialsDoubleSide).concat(this.materialsFlatShaded).concat(this.materialsFlatShadedBackSide).concat(this.materialsFlatShadedDoubleSide);for(const e of t)e.dispose()}}dispose(){this.originalMaterials.clear(),this.disposeMaterials()}static get workaroundEnabled(){return cP}static set workaroundEnabled(t){cP=t}},Eh=class extends Dr{constructor(t,e,n=null){super("RenderPass",t,e),this.needsSwap=!1,this.clearPass=new jg,this.overrideMaterialManager=n===null?null:new iN(n),this.ignoreBackground=!1,this.skipShadowMapUpdate=!1,this.selection=null}set mainScene(t){this.scene=t}set mainCamera(t){this.camera=t}get renderToScreen(){return super.renderToScreen}set renderToScreen(t){super.renderToScreen=t,this.clearPass.renderToScreen=t}get overrideMaterial(){const t=this.overrideMaterialManager;return t!==null?t.material:null}set overrideMaterial(t){const e=this.overrideMaterialManager;t!==null?e!==null?e.setMaterial(t):this.overrideMaterialManager=new iN(t):e!==null&&(e.dispose(),this.overrideMaterialManager=null)}getOverrideMaterial(){return this.overrideMaterial}setOverrideMaterial(t){this.overrideMaterial=t}get clear(){return this.clearPass.enabled}set clear(t){this.clearPass.enabled=t}getSelection(){return this.selection}setSelection(t){this.selection=t}isBackgroundDisabled(){return this.ignoreBackground}setBackgroundDisabled(t){this.ignoreBackground=t}isShadowMapDisabled(){return this.skipShadowMapUpdate}setShadowMapDisabled(t){this.skipShadowMapUpdate=t}getClearPass(){return this.clearPass}render(t,e,n,r,i){const o=this.scene,s=this.camera,a=this.selection,l=s.layers.mask,c=o.background,u=t.shadowMap.autoUpdate,d=this.renderToScreen?null:e;a!==null&&s.layers.set(a.getLayer()),this.skipShadowMapUpdate&&(t.shadowMap.autoUpdate=!1),(this.ignoreBackground||this.clearPass.overrideClearColor!==null)&&(o.background=null),this.clearPass.enabled&&this.clearPass.render(t,e),t.setRenderTarget(d),this.overrideMaterialManager!==null?this.overrideMaterialManager.render(t,o,s):t.render(o,s),s.layers.mask=l,o.background=c,t.shadowMap.autoUpdate=u}},BR=class extends Dr{constructor(t,e,{renderTarget:n,resolutionScale:r=1,width:i=Vn.AUTO_SIZE,height:o=Vn.AUTO_SIZE,resolutionX:s=i,resolutionY:a=o}={}){super("DepthPass"),this.needsSwap=!1,this.renderPass=new Eh(t,e,new SS({depthPacking:Ra}));const l=this.renderPass;l.skipShadowMapUpdate=!0,l.ignoreBackground=!0;const c=l.clearPass;c.overrideClearColor=new lt(16777215),c.overrideClearAlpha=1,this.renderTarget=n,this.renderTarget===void 0&&(this.renderTarget=new gn(1,1,{minFilter:Qt,magFilter:Qt}),this.renderTarget.texture.name="DepthPass.Target");const u=this.resolution=new Vn(this,s,a,r);u.addEventListener("change",d=>this.setSize(u.baseWidth,u.baseHeight))}set mainScene(t){this.renderPass.mainScene=t}set mainCamera(t){this.renderPass.mainCamera=t}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}getResolutionScale(){return this.resolution.scale}setResolutionScale(t){this.resolution.scale=t}render(t,e,n,r,i){const o=this.renderToScreen?null:this.renderTarget;this.renderPass.render(t,o)}setSize(t,e){const n=this.resolution;n.setBaseSize(t,e),this.renderTarget.setSize(n.width,n.height)}},j$=class extends Dr{constructor({normalBuffer:t=null,resolutionScale:e=.5,width:n=Vn.AUTO_SIZE,height:r=Vn.AUTO_SIZE,resolutionX:i=n,resolutionY:o=r}={}){super("DepthDownsamplingPass");const s=new sfe;s.normalBuffer=t,this.fullscreenMaterial=s,this.needsDepthTexture=!0,this.needsSwap=!1,this.renderTarget=new gn(1,1,{minFilter:Qt,magFilter:Qt,depthBuffer:!1,type:Yn}),this.renderTarget.texture.name="DepthDownsamplingPass.Target",this.renderTarget.texture.generateMipmaps=!1;const a=this.resolution=new Vn(this,i,o,e);a.addEventListener("change",l=>this.setSize(a.baseWidth,a.baseHeight))}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}setDepthTexture(t,e=di){this.fullscreenMaterial.depthBuffer=t,this.fullscreenMaterial.depthPacking=e}render(t,e,n,r,i){t.setRenderTarget(this.renderToScreen?null:this.renderTarget),t.render(this.scene,this.camera)}setSize(t,e){const n=this.resolution;n.setBaseSize(t,e),this.renderTarget.setSize(n.width,n.height),this.fullscreenMaterial.setSize(t,e)}initialize(t,e,n){const r=t.getContext();if(!(r.getExtension("EXT_color_buffer_float")||r.getExtension("EXT_color_buffer_half_float")))throw new Error("Rendering to float texture is not supported.")}},Dfe=class extends Dr{constructor({depthPacking:t=Ra}={}){super("DepthCopyPass");const e=new rfe;e.outputDepthPacking=t,this.fullscreenMaterial=e,this.needsDepthTexture=!0,this.needsSwap=!1,this.renderTarget=new gn(1,1,{type:t===Ra?nr:Yn,minFilter:Qt,magFilter:Qt,depthBuffer:!1}),this.renderTarget.texture.name="DepthCopyPass.Target"}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}get depthPacking(){return this.fullscreenMaterial.outputDepthPacking}getDepthPacking(){return this.fullscreenMaterial.outputDepthPacking}setDepthTexture(t,e=di){this.fullscreenMaterial.depthBuffer=t,this.fullscreenMaterial.inputDepthPacking=e}render(t,e,n,r,i){t.setRenderTarget(this.renderToScreen?null:this.renderTarget),t.render(this.scene,this.camera)}setSize(t,e){this.renderTarget.setSize(t,e)}},_y=new Float32Array([255/256/256**3,255/256/256**2,255/256/256,255/256]);function Ife(t){return(t[0]*_y[0]+t[1]*_y[1]+t[2]*_y[2]+t[3]*_y[3])/255}var Lfe=class extends Dfe{constructor({depthPacking:t=Ra,mode:e=qp.SINGLE}={}){super({depthPacking:t}),this.name="DepthPickingPass",this.fullscreenMaterial.mode=e,this.pixelBuffer=t===Ra?new Uint8Array(4):new Float32Array(4),this.callback=null}readDepth(t){return this.fullscreenMaterial.texelPosition.set(t.x*.5+.5,t.y*.5+.5),new Promise(e=>{this.callback=e})}render(t,e,n,r,i){const o=this.fullscreenMaterial,s=o.mode;if(s===qp.FULL&&super.render(t),this.callback!==null){const a=this.renderTarget,l=this.pixelBuffer,c=a.texture.type!==Yn;let u=0,d=0;if(s===qp.SINGLE)super.render(t);else{const f=o.texelPosition;u=Math.round(f.x*a.width),d=Math.round(f.y*a.height)}t.readRenderTargetPixels(a,u,d,1,1,l),this.callback(c?Ife(l):l[0]),this.callback=null}}setSize(t,e){this.fullscreenMaterial.mode===qp.FULL&&super.setSize(t,e)}};function oN(t,e,n){for(const r of e){const i="$1"+t+r.charAt(0).toUpperCase()+r.slice(1),o=new RegExp("([^\\.])(\\b"+r+"\\b)","g");for(const s of n.entries())s[1]!==null&&n.set(s[0],s[1].replace(o,i))}}function kfe(t,e,n){let r=e.getFragmentShader(),i=e.getVertexShader();const o=r!==void 0&&/mainImage/.test(r),s=r!==void 0&&/mainUv/.test(r);if(n.attributes|=e.getAttributes(),r===void 0)throw new Error(`Missing fragment shader (${e.name})`);if(s&&n.attributes&as.CONVOLUTION)throw new Error(`Effects that transform UVs are incompatible with convolution effects (${e.name})`);if(!o&&!s)throw new Error(`Could not find mainImage or mainUv function (${e.name})`);{const a=/\w+\s+(\w+)\([\w\s,]*\)\s*{/g,l=n.shaderParts;let c=l.get(Rn.FRAGMENT_HEAD)||"",u=l.get(Rn.FRAGMENT_MAIN_UV)||"",d=l.get(Rn.FRAGMENT_MAIN_IMAGE)||"",f=l.get(Rn.VERTEX_HEAD)||"",h=l.get(Rn.VERTEX_MAIN_SUPPORT)||"";const g=new Set,y=new Set;if(s&&(u+=` ${t}MainUv(UV); +}`,Tfe="uniform vec2 texelSize;varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;varying vec2 vUv6;varying vec2 vUv7;void main(){vUv=position.xy*0.5+0.5;vUv0=vUv+texelSize*vec2(-1.0,1.0);vUv1=vUv+texelSize*vec2(0.0,1.0);vUv2=vUv+texelSize*vec2(1.0,1.0);vUv3=vUv+texelSize*vec2(-1.0,0.0);vUv4=vUv+texelSize*vec2(1.0,0.0);vUv5=vUv+texelSize*vec2(-1.0,-1.0);vUv6=vUv+texelSize*vec2(0.0,-1.0);vUv7=vUv+texelSize*vec2(1.0,-1.0);gl_Position=vec4(position.xy,1.0,1.0);}",Ofe=class extends sn{constructor(){super({name:"UpsamplingMaterial",uniforms:{inputBuffer:new Me(null),supportBuffer:new Me(null),texelSize:new Me(new Ee),radius:new Me(.85)},blending:lr,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:Cfe,vertexShader:Tfe})}set inputBuffer(t){this.uniforms.inputBuffer.value=t}set supportBuffer(t){this.uniforms.supportBuffer.value=t}get radius(){return this.uniforms.radius.value}set radius(t){this.uniforms.radius.value=t}setSize(t,e){this.uniforms.texelSize.value.set(1/t,1/e)}},Rfe=new vh,Ul=null;function Afe(){if(Ul===null){const t=new Float32Array([-1,-1,0,3,-1,0,-1,3,0]),e=new Float32Array([0,0,2,0,0,2]);Ul=new Jt,Ul.setAttribute!==void 0?(Ul.setAttribute("position",new Mn(t,3)),Ul.setAttribute("uv",new Mn(e,2))):(Ul.addAttribute("position",new Mn(t,3)),Ul.addAttribute("uv",new Mn(e,2)))}return Ul}var Dr=class{constructor(t="Pass",e=new Sc,n=Rfe){this.name=t,this.renderer=null,this.scene=e,this.camera=n,this.screen=null,this.rtt=!0,this.needsSwap=!0,this.needsDepthTexture=!1,this.enabled=!0}get renderToScreen(){return!this.rtt}set renderToScreen(t){if(this.rtt===t){const e=this.fullscreenMaterial;e!==null&&(e.needsUpdate=!0),this.rtt=!t}}set mainScene(t){}set mainCamera(t){}setRenderer(t){this.renderer=t}isEnabled(){return this.enabled}setEnabled(t){this.enabled=t}get fullscreenMaterial(){return this.screen!==null?this.screen.material:null}set fullscreenMaterial(t){let e=this.screen;e!==null?e.material=t:(e=new Er(Afe(),t),e.frustumCulled=!1,this.scene===null&&(this.scene=new Sc),this.scene.add(e),this.screen=e)}getFullscreenMaterial(){return this.fullscreenMaterial}setFullscreenMaterial(t){this.fullscreenMaterial=t}getDepthTexture(){return null}setDepthTexture(t,e=di){}render(t,e,n,r,i){throw new Error("Render method not implemented!")}setSize(t,e){}initialize(t,e,n){}dispose(){for(const t of Object.keys(this)){const e=this[t];(e instanceof gn||e instanceof jr||e instanceof qn||e instanceof Dr)&&this[t].dispose()}}},j$=class extends Dr{constructor(t,e=!0){super("CopyPass"),this.fullscreenMaterial=new H$,this.needsSwap=!1,this.renderTarget=t,t===void 0&&(this.renderTarget=new gn(1,1,{minFilter:Dt,magFilter:Dt,stencilBuffer:!1,depthBuffer:!1}),this.renderTarget.texture.name="CopyPass.Target"),this.autoResize=e}get resize(){return this.autoResize}set resize(t){this.autoResize=t}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}setAutoResizeEnabled(t){this.autoResize=t}render(t,e,n,r,i){this.fullscreenMaterial.inputBuffer=e.texture,t.setRenderTarget(this.renderToScreen?null:this.renderTarget),t.render(this.scene,this.camera)}setSize(t,e){this.autoResize&&this.renderTarget.setSize(t,e)}initialize(t,e,n){n!==void 0&&(this.renderTarget.texture.type=n,n!==nr?this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1":pl(t)===Bn&&qr(this.renderTarget.texture,Bn))}},Dfe=class extends Dr{constructor(){super("ClearMaskPass",null,null),this.needsSwap=!1}render(t,e,n,r,i){const o=t.state.buffers.stencil;o.setLocked(!1),o.setTest(!1)}},rN=new lt,jg=class extends Dr{constructor(t=!0,e=!0,n=!1){super("ClearPass",null,null),this.needsSwap=!1,this.color=t,this.depth=e,this.stencil=n,this.overrideClearColor=null,this.overrideClearAlpha=-1}setClearFlags(t,e,n){this.color=t,this.depth=e,this.stencil=n}getOverrideClearColor(){return this.overrideClearColor}setOverrideClearColor(t){this.overrideClearColor=t}getOverrideClearAlpha(){return this.overrideClearAlpha}setOverrideClearAlpha(t){this.overrideClearAlpha=t}render(t,e,n,r,i){const o=this.overrideClearColor,s=this.overrideClearAlpha,a=t.getClearAlpha(),l=o!==null,c=s>=0;l?(t.getClearColor(rN),t.setClearColor(o,c?s:a)):c&&t.setClearAlpha(s),t.setRenderTarget(this.renderToScreen?null:e),t.clear(this.color,this.depth,this.stencil),l?t.setClearColor(rN,a):c&&t.setClearAlpha(a)}},Bl=-1,Vn=class extends hs{constructor(t,e=Bl,n=Bl,r=1){super(),this.resizable=t,this.baseSize=new Ee(1,1),this.preferredSize=new Ee(e,n),this.target=this.preferredSize,this.s=r,this.effectiveSize=new Ee,this.addEventListener("change",()=>this.updateEffectiveSize()),this.updateEffectiveSize()}updateEffectiveSize(){const t=this.baseSize,e=this.preferredSize,n=this.effectiveSize,r=this.scale;e.width!==Bl?n.width=e.width:e.height!==Bl?n.width=Math.round(e.height*(t.width/Math.max(t.height,1))):n.width=Math.round(t.width*r),e.height!==Bl?n.height=e.height:e.width!==Bl?n.height=Math.round(e.width/Math.max(t.width/Math.max(t.height,1),1)):n.height=Math.round(t.height*r)}get width(){return this.effectiveSize.width}set width(t){this.preferredWidth=t}get height(){return this.effectiveSize.height}set height(t){this.preferredHeight=t}getWidth(){return this.width}getHeight(){return this.height}get scale(){return this.s}set scale(t){this.s!==t&&(this.s=t,this.preferredSize.setScalar(Bl),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getScale(){return this.scale}setScale(t){this.scale=t}get baseWidth(){return this.baseSize.width}set baseWidth(t){this.baseSize.width!==t&&(this.baseSize.width=t,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getBaseWidth(){return this.baseWidth}setBaseWidth(t){this.baseWidth=t}get baseHeight(){return this.baseSize.height}set baseHeight(t){this.baseSize.height!==t&&(this.baseSize.height=t,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getBaseHeight(){return this.baseHeight}setBaseHeight(t){this.baseHeight=t}setBaseSize(t,e){(this.baseSize.width!==t||this.baseSize.height!==e)&&(this.baseSize.set(t,e),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}get preferredWidth(){return this.preferredSize.width}set preferredWidth(t){this.preferredSize.width!==t&&(this.preferredSize.width=t,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getPreferredWidth(){return this.preferredWidth}setPreferredWidth(t){this.preferredWidth=t}get preferredHeight(){return this.preferredSize.height}set preferredHeight(t){this.preferredSize.height!==t&&(this.preferredSize.height=t,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getPreferredHeight(){return this.preferredHeight}setPreferredHeight(t){this.preferredHeight=t}setPreferredSize(t,e){(this.preferredSize.width!==t||this.preferredSize.height!==e)&&(this.preferredSize.set(t,e),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}copy(t){this.s=t.scale,this.baseSize.set(t.baseWidth,t.baseHeight),this.preferredSize.set(t.preferredWidth,t.preferredHeight),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height)}static get AUTO_SIZE(){return Bl}},cP=!1,iN=class{constructor(t=null){this.originalMaterials=new Map,this.material=null,this.materials=null,this.materialsBackSide=null,this.materialsDoubleSide=null,this.materialsFlatShaded=null,this.materialsFlatShadedBackSide=null,this.materialsFlatShadedDoubleSide=null,this.setMaterial(t),this.meshCount=0,this.replaceMaterial=e=>{if(e.isMesh){let n;if(e.material.flatShading)switch(e.material.side){case Hr:n=this.materialsFlatShadedDoubleSide;break;case Vr:n=this.materialsFlatShadedBackSide;break;default:n=this.materialsFlatShaded;break}else switch(e.material.side){case Hr:n=this.materialsDoubleSide;break;case Vr:n=this.materialsBackSide;break;default:n=this.materials;break}this.originalMaterials.set(e,e.material),e.isSkinnedMesh?e.material=n[2]:e.isInstancedMesh?e.material=n[1]:e.material=n[0],++this.meshCount}}}cloneMaterial(t){if(!(t instanceof sn))return t.clone();const e=t.uniforms,n=new Map;for(const i in e){const o=e[i].value;o.isRenderTargetTexture&&(e[i].value=null,n.set(i,o))}const r=t.clone();for(const i of n)e[i[0]].value=i[1],r.uniforms[i[0]].value=i[1];return r}setMaterial(t){if(this.disposeMaterials(),this.material=t,t!==null){const e=this.materials=[this.cloneMaterial(t),this.cloneMaterial(t),this.cloneMaterial(t)];for(const n of e)n.uniforms=Object.assign({},t.uniforms),n.side=Vs;e[2].skinning=!0,this.materialsBackSide=e.map(n=>{const r=this.cloneMaterial(n);return r.uniforms=Object.assign({},t.uniforms),r.side=Vr,r}),this.materialsDoubleSide=e.map(n=>{const r=this.cloneMaterial(n);return r.uniforms=Object.assign({},t.uniforms),r.side=Hr,r}),this.materialsFlatShaded=e.map(n=>{const r=this.cloneMaterial(n);return r.uniforms=Object.assign({},t.uniforms),r.flatShading=!0,r}),this.materialsFlatShadedBackSide=e.map(n=>{const r=this.cloneMaterial(n);return r.uniforms=Object.assign({},t.uniforms),r.flatShading=!0,r.side=Vr,r}),this.materialsFlatShadedDoubleSide=e.map(n=>{const r=this.cloneMaterial(n);return r.uniforms=Object.assign({},t.uniforms),r.flatShading=!0,r.side=Hr,r})}}render(t,e,n){const r=t.shadowMap.enabled;if(t.shadowMap.enabled=!1,cP){const i=this.originalMaterials;this.meshCount=0,e.traverse(this.replaceMaterial),t.render(e,n);for(const o of i)o[0].material=o[1];this.meshCount!==i.size&&i.clear()}else{const i=e.overrideMaterial;e.overrideMaterial=this.material,t.render(e,n),e.overrideMaterial=i}t.shadowMap.enabled=r}disposeMaterials(){if(this.material!==null){const t=this.materials.concat(this.materialsBackSide).concat(this.materialsDoubleSide).concat(this.materialsFlatShaded).concat(this.materialsFlatShadedBackSide).concat(this.materialsFlatShadedDoubleSide);for(const e of t)e.dispose()}}dispose(){this.originalMaterials.clear(),this.disposeMaterials()}static get workaroundEnabled(){return cP}static set workaroundEnabled(t){cP=t}},Eh=class extends Dr{constructor(t,e,n=null){super("RenderPass",t,e),this.needsSwap=!1,this.clearPass=new jg,this.overrideMaterialManager=n===null?null:new iN(n),this.ignoreBackground=!1,this.skipShadowMapUpdate=!1,this.selection=null}set mainScene(t){this.scene=t}set mainCamera(t){this.camera=t}get renderToScreen(){return super.renderToScreen}set renderToScreen(t){super.renderToScreen=t,this.clearPass.renderToScreen=t}get overrideMaterial(){const t=this.overrideMaterialManager;return t!==null?t.material:null}set overrideMaterial(t){const e=this.overrideMaterialManager;t!==null?e!==null?e.setMaterial(t):this.overrideMaterialManager=new iN(t):e!==null&&(e.dispose(),this.overrideMaterialManager=null)}getOverrideMaterial(){return this.overrideMaterial}setOverrideMaterial(t){this.overrideMaterial=t}get clear(){return this.clearPass.enabled}set clear(t){this.clearPass.enabled=t}getSelection(){return this.selection}setSelection(t){this.selection=t}isBackgroundDisabled(){return this.ignoreBackground}setBackgroundDisabled(t){this.ignoreBackground=t}isShadowMapDisabled(){return this.skipShadowMapUpdate}setShadowMapDisabled(t){this.skipShadowMapUpdate=t}getClearPass(){return this.clearPass}render(t,e,n,r,i){const o=this.scene,s=this.camera,a=this.selection,l=s.layers.mask,c=o.background,u=t.shadowMap.autoUpdate,d=this.renderToScreen?null:e;a!==null&&s.layers.set(a.getLayer()),this.skipShadowMapUpdate&&(t.shadowMap.autoUpdate=!1),(this.ignoreBackground||this.clearPass.overrideClearColor!==null)&&(o.background=null),this.clearPass.enabled&&this.clearPass.render(t,e),t.setRenderTarget(d),this.overrideMaterialManager!==null?this.overrideMaterialManager.render(t,o,s):t.render(o,s),s.layers.mask=l,o.background=c,t.shadowMap.autoUpdate=u}},BR=class extends Dr{constructor(t,e,{renderTarget:n,resolutionScale:r=1,width:i=Vn.AUTO_SIZE,height:o=Vn.AUTO_SIZE,resolutionX:s=i,resolutionY:a=o}={}){super("DepthPass"),this.needsSwap=!1,this.renderPass=new Eh(t,e,new SS({depthPacking:Ra}));const l=this.renderPass;l.skipShadowMapUpdate=!0,l.ignoreBackground=!0;const c=l.clearPass;c.overrideClearColor=new lt(16777215),c.overrideClearAlpha=1,this.renderTarget=n,this.renderTarget===void 0&&(this.renderTarget=new gn(1,1,{minFilter:Qt,magFilter:Qt}),this.renderTarget.texture.name="DepthPass.Target");const u=this.resolution=new Vn(this,s,a,r);u.addEventListener("change",d=>this.setSize(u.baseWidth,u.baseHeight))}set mainScene(t){this.renderPass.mainScene=t}set mainCamera(t){this.renderPass.mainCamera=t}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}getResolutionScale(){return this.resolution.scale}setResolutionScale(t){this.resolution.scale=t}render(t,e,n,r,i){const o=this.renderToScreen?null:this.renderTarget;this.renderPass.render(t,o)}setSize(t,e){const n=this.resolution;n.setBaseSize(t,e),this.renderTarget.setSize(n.width,n.height)}},$$=class extends Dr{constructor({normalBuffer:t=null,resolutionScale:e=.5,width:n=Vn.AUTO_SIZE,height:r=Vn.AUTO_SIZE,resolutionX:i=n,resolutionY:o=r}={}){super("DepthDownsamplingPass");const s=new afe;s.normalBuffer=t,this.fullscreenMaterial=s,this.needsDepthTexture=!0,this.needsSwap=!1,this.renderTarget=new gn(1,1,{minFilter:Qt,magFilter:Qt,depthBuffer:!1,type:Yn}),this.renderTarget.texture.name="DepthDownsamplingPass.Target",this.renderTarget.texture.generateMipmaps=!1;const a=this.resolution=new Vn(this,i,o,e);a.addEventListener("change",l=>this.setSize(a.baseWidth,a.baseHeight))}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}setDepthTexture(t,e=di){this.fullscreenMaterial.depthBuffer=t,this.fullscreenMaterial.depthPacking=e}render(t,e,n,r,i){t.setRenderTarget(this.renderToScreen?null:this.renderTarget),t.render(this.scene,this.camera)}setSize(t,e){const n=this.resolution;n.setBaseSize(t,e),this.renderTarget.setSize(n.width,n.height),this.fullscreenMaterial.setSize(t,e)}initialize(t,e,n){const r=t.getContext();if(!(r.getExtension("EXT_color_buffer_float")||r.getExtension("EXT_color_buffer_half_float")))throw new Error("Rendering to float texture is not supported.")}},Ife=class extends Dr{constructor({depthPacking:t=Ra}={}){super("DepthCopyPass");const e=new ife;e.outputDepthPacking=t,this.fullscreenMaterial=e,this.needsDepthTexture=!0,this.needsSwap=!1,this.renderTarget=new gn(1,1,{type:t===Ra?nr:Yn,minFilter:Qt,magFilter:Qt,depthBuffer:!1}),this.renderTarget.texture.name="DepthCopyPass.Target"}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}get depthPacking(){return this.fullscreenMaterial.outputDepthPacking}getDepthPacking(){return this.fullscreenMaterial.outputDepthPacking}setDepthTexture(t,e=di){this.fullscreenMaterial.depthBuffer=t,this.fullscreenMaterial.inputDepthPacking=e}render(t,e,n,r,i){t.setRenderTarget(this.renderToScreen?null:this.renderTarget),t.render(this.scene,this.camera)}setSize(t,e){this.renderTarget.setSize(t,e)}},_y=new Float32Array([255/256/256**3,255/256/256**2,255/256/256,255/256]);function Lfe(t){return(t[0]*_y[0]+t[1]*_y[1]+t[2]*_y[2]+t[3]*_y[3])/255}var kfe=class extends Ife{constructor({depthPacking:t=Ra,mode:e=qp.SINGLE}={}){super({depthPacking:t}),this.name="DepthPickingPass",this.fullscreenMaterial.mode=e,this.pixelBuffer=t===Ra?new Uint8Array(4):new Float32Array(4),this.callback=null}readDepth(t){return this.fullscreenMaterial.texelPosition.set(t.x*.5+.5,t.y*.5+.5),new Promise(e=>{this.callback=e})}render(t,e,n,r,i){const o=this.fullscreenMaterial,s=o.mode;if(s===qp.FULL&&super.render(t),this.callback!==null){const a=this.renderTarget,l=this.pixelBuffer,c=a.texture.type!==Yn;let u=0,d=0;if(s===qp.SINGLE)super.render(t);else{const f=o.texelPosition;u=Math.round(f.x*a.width),d=Math.round(f.y*a.height)}t.readRenderTargetPixels(a,u,d,1,1,l),this.callback(c?Lfe(l):l[0]),this.callback=null}}setSize(t,e){this.fullscreenMaterial.mode===qp.FULL&&super.setSize(t,e)}};function oN(t,e,n){for(const r of e){const i="$1"+t+r.charAt(0).toUpperCase()+r.slice(1),o=new RegExp("([^\\.])(\\b"+r+"\\b)","g");for(const s of n.entries())s[1]!==null&&n.set(s[0],s[1].replace(o,i))}}function Nfe(t,e,n){let r=e.getFragmentShader(),i=e.getVertexShader();const o=r!==void 0&&/mainImage/.test(r),s=r!==void 0&&/mainUv/.test(r);if(n.attributes|=e.getAttributes(),r===void 0)throw new Error(`Missing fragment shader (${e.name})`);if(s&&n.attributes&as.CONVOLUTION)throw new Error(`Effects that transform UVs are incompatible with convolution effects (${e.name})`);if(!o&&!s)throw new Error(`Could not find mainImage or mainUv function (${e.name})`);{const a=/\w+\s+(\w+)\([\w\s,]*\)\s*{/g,l=n.shaderParts;let c=l.get(Rn.FRAGMENT_HEAD)||"",u=l.get(Rn.FRAGMENT_MAIN_UV)||"",d=l.get(Rn.FRAGMENT_MAIN_IMAGE)||"",f=l.get(Rn.VERTEX_HEAD)||"",h=l.get(Rn.VERTEX_MAIN_SUPPORT)||"";const g=new Set,y=new Set;if(s&&(u+=` ${t}MainUv(UV); `,n.uvTransformation=!0),i!==null&&/mainSupport/.test(i)){const x=/mainSupport *\([\w\s]*?uv\s*?\)/.test(i);h+=` ${t}MainSupport(`,h+=x?`vUv); `:`); `;for(const w of i.matchAll(/(?:varying\s+\w+\s+([\S\s]*?);)/g))for(const S of w[1].split(/\s*,\s*/))n.varyings.add(S),g.add(S),y.add(S);for(const w of i.matchAll(a))y.add(w[1])}for(const x of r.matchAll(a))y.add(x[1]);for(const x of e.defines.keys())y.add(x.replace(/\([\w\s,]*\)/g,""));for(const x of e.uniforms.keys())y.add(x);y.delete("while"),y.delete("for"),y.delete("if"),e.uniforms.forEach((x,w)=>n.uniforms.set(t+w.charAt(0).toUpperCase()+w.slice(1),x)),e.defines.forEach((x,w)=>n.defines.set(t+w.charAt(0).toUpperCase()+w.slice(1),x));const _=new Map([["fragment",r],["vertex",i]]);oN(t,y,n.defines),oN(t,y,_),r=_.get("fragment"),i=_.get("vertex");const v=e.blendMode;if(n.blendModes.set(v.blendFunction,v),o){e.inputColorSpace!==null&&e.inputColorSpace!==n.colorSpace&&(d+=e.inputColorSpace===Bn?`color0 = LinearTosRGB(color0); `:`color0 = sRGBToLinear(color0); - `),e.outputColorSpace!==z$?n.colorSpace=e.outputColorSpace:e.inputColorSpace!==null&&(n.colorSpace=e.inputColorSpace);const x=/MainImage *\([\w\s,]*?depth[\w\s,]*?\)/;d+=`${t}MainImage(color0, UV, `,n.attributes&as.DEPTH&&x.test(r)&&(d+="depth, ",n.readDepth=!0),d+=`color1); + `),e.outputColorSpace!==U$?n.colorSpace=e.outputColorSpace:e.inputColorSpace!==null&&(n.colorSpace=e.inputColorSpace);const x=/MainImage *\([\w\s,]*?depth[\w\s,]*?\)/;d+=`${t}MainImage(color0, UV, `,n.attributes&as.DEPTH&&x.test(r)&&(d+="depth, ",n.readDepth=!0),d+=`color1); `;const w=t+"BlendOpacity";n.uniforms.set(w,v.opacity),d+=`color0 = blend${v.blendFunction}(color0, color1, ${w}); `,c+=`uniform float ${w}; `}if(c+=r+` `,i!==null&&(f+=i+` -`),l.set(Rn.FRAGMENT_HEAD,c),l.set(Rn.FRAGMENT_MAIN_UV,u),l.set(Rn.FRAGMENT_MAIN_IMAGE,d),l.set(Rn.VERTEX_HEAD,f),l.set(Rn.VERTEX_MAIN_SUPPORT,h),e.extensions!==null)for(const x of e.extensions)n.extensions.add(x)}}var Nfe=class extends Dr{constructor(t,...e){super("EffectPass"),this.fullscreenMaterial=new hfe(null,null,null,t),this.listener=n=>this.handleEvent(n),this.effects=[],this.setEffects(e),this.skipRendering=!1,this.minTime=1,this.maxTime=Number.POSITIVE_INFINITY,this.timeScale=1}set mainScene(t){for(const e of this.effects)e.mainScene=t}set mainCamera(t){this.fullscreenMaterial.copyCameraSettings(t);for(const e of this.effects)e.mainCamera=t}get encodeOutput(){return this.fullscreenMaterial.encodeOutput}set encodeOutput(t){this.fullscreenMaterial.encodeOutput=t}get dithering(){return this.fullscreenMaterial.dithering}set dithering(t){const e=this.fullscreenMaterial;e.dithering=t,e.needsUpdate=!0}setEffects(t){for(const e of this.effects)e.removeEventListener("change",this.listener);this.effects=t.sort((e,n)=>n.attributes-e.attributes);for(const e of this.effects)e.addEventListener("change",this.listener)}updateMaterial(){const t=new $fe;let e=0;for(const s of this.effects)if(s.blendMode.blendFunction===Kt.DST)t.attributes|=s.getAttributes()&as.DEPTH;else{if(t.attributes&s.getAttributes()&as.CONVOLUTION)throw new Error(`Convolution effects cannot be merged (${s.name})`);kfe("e"+e++,s,t)}let n=t.shaderParts.get(Rn.FRAGMENT_HEAD),r=t.shaderParts.get(Rn.FRAGMENT_MAIN_IMAGE),i=t.shaderParts.get(Rn.FRAGMENT_MAIN_UV);const o=/\bblend\b/g;for(const s of t.blendModes.values())n+=s.getShaderCode().replace(o,`blend${s.blendFunction}`)+` +`),l.set(Rn.FRAGMENT_HEAD,c),l.set(Rn.FRAGMENT_MAIN_UV,u),l.set(Rn.FRAGMENT_MAIN_IMAGE,d),l.set(Rn.VERTEX_HEAD,f),l.set(Rn.VERTEX_MAIN_SUPPORT,h),e.extensions!==null)for(const x of e.extensions)n.extensions.add(x)}}var Ffe=class extends Dr{constructor(t,...e){super("EffectPass"),this.fullscreenMaterial=new pfe(null,null,null,t),this.listener=n=>this.handleEvent(n),this.effects=[],this.setEffects(e),this.skipRendering=!1,this.minTime=1,this.maxTime=Number.POSITIVE_INFINITY,this.timeScale=1}set mainScene(t){for(const e of this.effects)e.mainScene=t}set mainCamera(t){this.fullscreenMaterial.copyCameraSettings(t);for(const e of this.effects)e.mainCamera=t}get encodeOutput(){return this.fullscreenMaterial.encodeOutput}set encodeOutput(t){this.fullscreenMaterial.encodeOutput=t}get dithering(){return this.fullscreenMaterial.dithering}set dithering(t){const e=this.fullscreenMaterial;e.dithering=t,e.needsUpdate=!0}setEffects(t){for(const e of this.effects)e.removeEventListener("change",this.listener);this.effects=t.sort((e,n)=>n.attributes-e.attributes);for(const e of this.effects)e.addEventListener("change",this.listener)}updateMaterial(){const t=new Gfe;let e=0;for(const s of this.effects)if(s.blendMode.blendFunction===Kt.DST)t.attributes|=s.getAttributes()&as.DEPTH;else{if(t.attributes&s.getAttributes()&as.CONVOLUTION)throw new Error(`Convolution effects cannot be merged (${s.name})`);Nfe("e"+e++,s,t)}let n=t.shaderParts.get(Rn.FRAGMENT_HEAD),r=t.shaderParts.get(Rn.FRAGMENT_MAIN_IMAGE),i=t.shaderParts.get(Rn.FRAGMENT_MAIN_UV);const o=/\bblend\b/g;for(const s of t.blendModes.values())n+=s.getShaderCode().replace(o,`blend${s.blendFunction}`)+` `;t.attributes&as.DEPTH?(t.readDepth&&(r=`float depth = readDepth(UV); `+r),this.needsDepthTexture=this.getDepthTexture()===null):this.needsDepthTexture=!1,t.colorSpace===Bn&&(r+=`color0 = sRGBToLinear(color0); `),t.uvTransformation?(i=`vec2 transformedUv = vUv; `+i,t.defines.set("UV","transformedUv")):t.defines.set("UV","vUv"),t.shaderParts.set(Rn.FRAGMENT_HEAD,n),t.shaderParts.set(Rn.FRAGMENT_MAIN_IMAGE,r),t.shaderParts.set(Rn.FRAGMENT_MAIN_UV,i);for(const[s,a]of t.shaderParts)a!==null&&t.shaderParts.set(s,a.trim().replace(/^#/,` -#`));this.skipRendering=e===0,this.needsSwap=!this.skipRendering,this.fullscreenMaterial.setShaderData(t)}recompile(){this.updateMaterial()}getDepthTexture(){return this.fullscreenMaterial.depthBuffer}setDepthTexture(t,e=di){this.fullscreenMaterial.depthBuffer=t,this.fullscreenMaterial.depthPacking=e;for(const n of this.effects)n.setDepthTexture(t,e)}render(t,e,n,r,i){for(const o of this.effects)o.update(t,e,r);if(!this.skipRendering||this.renderToScreen){const o=this.fullscreenMaterial;o.inputBuffer=e.texture,o.time+=r*this.timeScale,t.setRenderTarget(this.renderToScreen?null:n),t.render(this.scene,this.camera)}}setSize(t,e){this.fullscreenMaterial.setSize(t,e);for(const n of this.effects)n.setSize(t,e)}initialize(t,e,n){this.renderer=t;for(const r of this.effects)r.initialize(t,e,n);this.updateMaterial(),n!==void 0&&n!==nr&&(this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}dispose(){super.dispose();for(const t of this.effects)t.removeEventListener("change",this.listener),t.dispose()}handleEvent(t){switch(t.type){case"change":this.recompile();break}}},zS=class extends Dr{constructor({kernelSize:t=ld.MEDIUM,resolutionScale:e=.5,width:n=Vn.AUTO_SIZE,height:r=Vn.AUTO_SIZE,resolutionX:i=n,resolutionY:o=r}={}){super("KawaseBlurPass"),this.renderTargetA=new gn(1,1,{depthBuffer:!1}),this.renderTargetA.texture.name="Blur.Target.A",this.renderTargetB=this.renderTargetA.clone(),this.renderTargetB.texture.name="Blur.Target.B";const s=this.resolution=new Vn(this,i,o,e);s.addEventListener("change",a=>this.setSize(s.baseWidth,s.baseHeight)),this._blurMaterial=new qde,this._blurMaterial.kernelSize=t,this.copyMaterial=new B$}getResolution(){return this.resolution}get blurMaterial(){return this._blurMaterial}set blurMaterial(t){this._blurMaterial=t}get dithering(){return this.copyMaterial.dithering}set dithering(t){this.copyMaterial.dithering=t}get kernelSize(){return this.blurMaterial.kernelSize}set kernelSize(t){this.blurMaterial.kernelSize=t}get width(){return this.resolution.width}set width(t){this.resolution.preferredWidth=t}get height(){return this.resolution.height}set height(t){this.resolution.preferredHeight=t}get scale(){return this.blurMaterial.scale}set scale(t){this.blurMaterial.scale=t}getScale(){return this.blurMaterial.scale}setScale(t){this.blurMaterial.scale=t}getKernelSize(){return this.kernelSize}setKernelSize(t){this.kernelSize=t}getResolutionScale(){return this.resolution.scale}setResolutionScale(t){this.resolution.scale=t}render(t,e,n,r,i){const o=this.scene,s=this.camera,a=this.renderTargetA,l=this.renderTargetB,c=this.blurMaterial,u=c.kernelSequence;let d=e;this.fullscreenMaterial=c;for(let f=0,h=u.length;fthis.setSize(l.baseWidth,l.baseHeight))}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}render(t,e,n,r,i){const o=this.fullscreenMaterial;o.inputBuffer=e.texture,t.setRenderTarget(this.renderToScreen?null:this.renderTarget),t.render(this.scene,this.camera)}setSize(t,e){const n=this.resolution;n.setBaseSize(t,e),this.renderTarget.setSize(n.width,n.height)}initialize(t,e,n){n!==void 0&&n!==nr&&(this.renderTarget.texture.type=n,this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}},zfe=class extends Dr{constructor(t,e){super("MaskPass",t,e),this.needsSwap=!1,this.clearPass=new jg(!1,!1,!0),this.inverse=!1}set mainScene(t){this.scene=t}set mainCamera(t){this.camera=t}get inverted(){return this.inverse}set inverted(t){this.inverse=t}get clear(){return this.clearPass.enabled}set clear(t){this.clearPass.enabled=t}getClearPass(){return this.clearPass}isInverted(){return this.inverted}setInverted(t){this.inverted=t}render(t,e,n,r,i){const o=t.getContext(),s=t.state.buffers,a=this.scene,l=this.camera,c=this.clearPass,u=this.inverted?0:1,d=1-u;s.color.setMask(!1),s.depth.setMask(!1),s.color.setLocked(!0),s.depth.setLocked(!0),s.stencil.setTest(!0),s.stencil.setOp(o.REPLACE,o.REPLACE,o.REPLACE),s.stencil.setFunc(o.ALWAYS,u,4294967295),s.stencil.setClear(d),s.stencil.setLocked(!0),this.clearPass.enabled&&(this.renderToScreen?c.render(t,null):(c.render(t,e),c.render(t,n))),this.renderToScreen?(t.setRenderTarget(null),t.render(a,l)):(t.setRenderTarget(e),t.render(a,l),t.setRenderTarget(n),t.render(a,l)),s.color.setLocked(!1),s.depth.setLocked(!1),s.stencil.setLocked(!1),s.stencil.setFunc(o.EQUAL,1,4294967295),s.stencil.setOp(o.KEEP,o.KEEP,o.KEEP),s.stencil.setLocked(!0)}},Ufe=class extends Dr{constructor(){super("MipmapBlurPass"),this.needsSwap=!1,this.renderTarget=new gn(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="Upsampling.Mipmap0",this.downsamplingMipmaps=[],this.upsamplingMipmaps=[],this.downsamplingMaterial=new ufe,this.upsamplingMaterial=new Tfe,this.resolution=new Ee}get texture(){return this.renderTarget.texture}get levels(){return this.downsamplingMipmaps.length}set levels(t){if(this.levels!==t){const e=this.renderTarget;this.dispose(),this.downsamplingMipmaps=[],this.upsamplingMipmaps=[];for(let n=0;n=0;--f){const h=u[f];l.setSize(d.width,d.height),l.inputBuffer=d.texture,l.supportBuffer=c[f].texture,t.setRenderTarget(h),t.render(o,s),d=h}}setSize(t,e){const n=this.resolution;n.set(t,e);let r=n.width,i=n.height;for(let o=0,s=this.downsamplingMipmaps.length;othis.setSize(u.baseWidth,u.baseHeight))}set mainScene(t){this.renderPass.mainScene=t}set mainCamera(t){this.renderPass.mainCamera=t}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}getResolutionScale(){return this.resolution.scale}setResolutionScale(t){this.resolution.scale=t}render(t,e,n,r,i){const o=this.renderToScreen?null:this.renderTarget;this.renderPass.render(t,o,o)}setSize(t,e){const n=this.resolution;n.setBaseSize(t,e),this.renderTarget.setSize(n.width,n.height)}},Os=class extends Dr{constructor(t,e="inputBuffer"){super("ShaderPass"),this.fullscreenMaterial=t,this.input=e}setInput(t){this.input=t}render(t,e,n,r,i){const o=this.fullscreenMaterial.uniforms;e!==null&&o!==void 0&&o[this.input]!==void 0&&(o[this.input].value=e.texture),t.setRenderTarget(this.renderToScreen?null:n),t.render(this.scene,this.camera)}initialize(t,e,n){n!==void 0&&n!==nr&&(this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}},uP=1/1e3,Hfe=1e3,Vfe=class{constructor(){this.startTime=performance.now(),this.previousTime=0,this.currentTime=0,this._delta=0,this._elapsed=0,this._fixedDelta=1e3/60,this.timescale=1,this.useFixedDelta=!1,this._autoReset=!1}get autoReset(){return this._autoReset}set autoReset(t){typeof document<"u"&&document.hidden!==void 0&&(t?document.addEventListener("visibilitychange",this):document.removeEventListener("visibilitychange",this),this._autoReset=t)}get delta(){return this._delta*uP}get fixedDelta(){return this._fixedDelta*uP}set fixedDelta(t){this._fixedDelta=t*Hfe}get elapsed(){return this._elapsed*uP}update(t){this.useFixedDelta?this._delta=this.fixedDelta:(this.previousTime=this.currentTime,this.currentTime=(t!==void 0?t:performance.now())-this.startTime,this._delta=this.currentTime-this.previousTime),this._delta*=this.timescale,this._elapsed+=this._delta}reset(){this._delta=0,this._elapsed=0,this.currentTime=performance.now()-this.startTime}handleEvent(t){document.hidden||(this.currentTime=performance.now()-this.startTime)}dispose(){this.autoReset=!1}},jfe=class{constructor(e=null,{depthBuffer:n=!0,stencilBuffer:r=!1,multisampling:i=0,frameBufferType:o}={}){this.renderer=null,this.inputBuffer=this.createBuffer(n,r,o,i),this.outputBuffer=this.inputBuffer.clone(),this.copyPass=new V$,this.depthTexture=null,this.passes=[],this.timer=new Vfe,this.autoRenderToScreen=!0,this.setRenderer(e)}get multisampling(){return this.inputBuffer.samples||0}set multisampling(e){const n=this.inputBuffer,r=this.multisampling;r>0&&e>0?(this.inputBuffer.samples=e,this.outputBuffer.samples=e,this.inputBuffer.dispose(),this.outputBuffer.dispose()):r!==e&&(this.inputBuffer.dispose(),this.outputBuffer.dispose(),this.inputBuffer=this.createBuffer(n.depthBuffer,n.stencilBuffer,n.texture.type,e),this.inputBuffer.depthTexture=this.depthTexture,this.outputBuffer=this.inputBuffer.clone())}getTimer(){return this.timer}getRenderer(){return this.renderer}setRenderer(e){if(this.renderer=e,e!==null){const n=e.getSize(new Ee),r=e.getContext().getContextAttributes().alpha,i=this.inputBuffer.texture.type;i===nr&&pl(e)===Bn&&(qr(this.inputBuffer.texture,Bn),qr(this.outputBuffer.texture,Bn),this.inputBuffer.dispose(),this.outputBuffer.dispose()),e.autoClear=!1,this.setSize(n.width,n.height);for(const o of this.passes)o.initialize(e,r,i)}}replaceRenderer(e,n=!0){const r=this.renderer,i=r.domElement.parentNode;return this.setRenderer(e),n&&i!==null&&(i.removeChild(r.domElement),i.appendChild(e.domElement)),r}createDepthTexture(){const e=this.depthTexture=new bS;return this.inputBuffer.depthTexture=e,this.inputBuffer.dispose(),this.inputBuffer.stencilBuffer?(e.format=wc,e.type=fc):e.type=nl,e}deleteDepthTexture(){if(this.depthTexture!==null){this.depthTexture.dispose(),this.depthTexture=null,this.inputBuffer.depthTexture=null,this.inputBuffer.dispose();for(const e of this.passes)e.setDepthTexture(null)}}createBuffer(e,n,r,i){const o=this.renderer,s=o===null?new Ee:o.getDrawingBufferSize(new Ee),a={minFilter:Dt,magFilter:Dt,stencilBuffer:n,depthBuffer:e,type:r},l=new gn(s.width,s.height,a);return i>0&&(l.ignoreDepthForMultisampleCopy=!1,l.samples=i),r===nr&&pl(o)===Bn&&qr(l.texture,Bn),l.texture.name="EffectComposer.Buffer",l.texture.generateMipmaps=!1,l}setMainScene(e){for(const n of this.passes)n.mainScene=e}setMainCamera(e){for(const n of this.passes)n.mainCamera=e}addPass(e,n){const r=this.passes,i=this.renderer,o=i.getDrawingBufferSize(new Ee),s=i.getContext().getContextAttributes().alpha,a=this.inputBuffer.texture.type;if(e.setRenderer(i),e.setSize(o.width,o.height),e.initialize(i,s,a),this.autoRenderToScreen&&(r.length>0&&(r[r.length-1].renderToScreen=!1),e.renderToScreen&&(this.autoRenderToScreen=!1)),n!==void 0?r.splice(n,0,e):r.push(e),this.autoRenderToScreen&&(r[r.length-1].renderToScreen=!0),e.needsDepthTexture||this.depthTexture!==null)if(this.depthTexture===null){const l=this.createDepthTexture();for(e of r)e.setDepthTexture(l)}else e.setDepthTexture(this.depthTexture)}removePass(e){const n=this.passes,r=n.indexOf(e);if(r!==-1&&n.splice(r,1).length>0){if(this.depthTexture!==null){const s=(l,c)=>l||c.needsDepthTexture;n.reduce(s,!1)||(e.getDepthTexture()===this.depthTexture&&e.setDepthTexture(null),this.deleteDepthTexture())}this.autoRenderToScreen&&r===n.length&&(e.renderToScreen=!1,n.length>0&&(n[n.length-1].renderToScreen=!0))}}removeAllPasses(){const e=this.passes;this.deleteDepthTexture(),e.length>0&&(this.autoRenderToScreen&&(e[e.length-1].renderToScreen=!1),this.passes=[])}render(e){const n=this.renderer,r=this.copyPass;let i=this.inputBuffer,o=this.outputBuffer,s=!1,a,l,c;e===void 0&&(this.timer.update(),e=this.timer.delta);for(const u of this.passes)u.enabled&&(u.render(n,i,o,e,s),u.needsSwap&&(s&&(r.renderToScreen=u.renderToScreen,a=n.getContext(),l=n.state.buffers.stencil,l.setFunc(a.NOTEQUAL,1,4294967295),r.render(n,i,o,e,s),l.setFunc(a.EQUAL,1,4294967295)),c=i,i=o,o=c),u instanceof zfe?s=!0:u instanceof Afe&&(s=!1))}setSize(e,n,r){const i=this.renderer,o=i.getSize(new Ee);(e===void 0||n===void 0)&&(e=o.width,n=o.height),(o.width!==e||o.height!==n)&&i.setSize(e,n,r);const s=i.getDrawingBufferSize(new Ee);this.inputBuffer.setSize(s.width,s.height),this.outputBuffer.setSize(s.width,s.height);for(const a of this.passes)a.setSize(s.width,s.height)}reset(){const e=this.timer.autoReset;this.dispose(),this.autoRenderToScreen=!0,this.timer.autoReset=e}dispose(){for(const e of this.passes)e.dispose();this.passes=[],this.inputBuffer!==null&&this.inputBuffer.dispose(),this.outputBuffer!==null&&this.outputBuffer.dispose(),this.deleteDepthTexture(),this.copyPass.dispose(),this.timer.dispose()}},$fe=class{constructor(){this.shaderParts=new Map([[Rn.FRAGMENT_HEAD,null],[Rn.FRAGMENT_MAIN_UV,null],[Rn.FRAGMENT_MAIN_IMAGE,null],[Rn.VERTEX_HEAD,null],[Rn.VERTEX_MAIN_SUPPORT,null]]),this.defines=new Map,this.uniforms=new Map,this.blendModes=new Map,this.extensions=new Set,this.attributes=as.NONE,this.varyings=new Set,this.uvTransformation=!1,this.readDepth=!1,this.colorSpace=oh}},HR=class extends Set{constructor(e,n=10){super(),this.l=n,this.exclusive=!1,e!==void 0&&this.set(e)}get layer(){return this.l}set layer(e){const n=this.l;for(const r of this)r.layers.disable(n),r.layers.enable(e);this.l=e}getLayer(){return this.layer}setLayer(e){this.layer=e}isExclusive(){return this.exclusive}setExclusive(e){this.exclusive=e}clear(){const e=this.layer;for(const n of this)n.layers.disable(e);return super.clear()}set(e){this.clear();for(const n of e)this.add(n);return this}indexOf(e){return this.has(e)?0:-1}add(e){return this.exclusive?e.layers.set(this.layer):e.layers.enable(this.layer),super.add(e)}delete(e){return this.has(e)&&e.layers.disable(this.layer),super.delete(e)}toggle(e){let n;return this.has(e)?(this.delete(e),n=!1):(this.add(e),n=!0),n}setVisible(e){for(const n of this)e?n.layers.enable(0):n.layers.disable(0);return this}},Gfe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x+y,opacity);}",Wfe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,y,min(y.a,opacity));}",Yfe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,(x+y)*0.5,opacity);}",Xfe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(yHSL.rg,xHSL.b));return vec4(mix(x.rgb,z,opacity),y.a);}",Zfe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(step(0.0,y)*(1.0-min(vec4(1.0),(1.0-x)/y)),vec4(1.0),step(1.0,x));return mix(x,z,opacity);}",qfe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=step(0.0,x)*mix(min(vec4(1.0),x/max(1.0-y,1e-9)),vec4(1.0),step(1.0,y));return mix(x,z,opacity);}",Kfe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,min(x,y),opacity);}",Qfe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,abs(x-y),opacity);}",Jfe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x/max(y,1e-12),opacity);}",ehe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,(x+y-2.0*x*y),opacity);}",the="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 a=min(x,1.0),b=min(y,1.0);vec4 z=mix(2.0*a*b,1.0-2.0*(1.0-a)*(1.0-b),step(0.5,y));return mix(x,z,opacity);}",nhe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,step(1.0,x+y),opacity);}",rhe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(yHSL.r,xHSL.gb));return vec4(mix(x.rgb,z,opacity),y.a);}",ihe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,1.0-y,opacity);}",ohe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,y*(1.0-x),opacity);}",she="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,max(x,y),opacity);}",ahe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,clamp(y+x-1.0,0.0,1.0),opacity);}",lhe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,min(x+y,1.0),opacity);}",che="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,clamp(2.0*y+x-1.0,0.0,1.0),opacity);}",uhe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(xHSL.rg,yHSL.b));return vec4(mix(x.rgb,z,opacity),y.a);}",dhe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x*y,opacity);}",fhe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,1.0-abs(1.0-x-y),opacity);}",hhe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,y,opacity);}",phe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(2.0*y*x,1.0-2.0*(1.0-y)*(1.0-x),step(0.5,x));return mix(x,z,opacity);}",mhe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 y2=2.0*y;vec4 z=mix(mix(y2,x,step(0.5*x,y)),max(vec4(0.0),y2-1.0),step(x,(y2-1.0)));return mix(x,z,opacity);}",ghe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(min(x*x/max(1.0-y,1e-12),1.0),y,step(1.0,y));return mix(x,z,opacity);}",vhe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(xHSL.r,yHSL.g,xHSL.b));return vec4(mix(x.rgb,z,opacity),y.a);}",yhe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x+y-min(x*y,1.0),opacity);}",_he="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 y2=2.0*y;vec4 w=step(0.5,y);vec4 z=mix(x-(1.0-y2)*x*(1.0-x),mix(x+(y2-1.0)*(sqrt(x)-x),x+(y2-1.0)*x*((16.0*x-12.0)*x+3.0),w*(1.0-step(0.25,x))),w);return mix(x,z,opacity);}",xhe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return y;}",whe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,max(x+y-1.0,0.0),opacity);}",She="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(max(1.0-min((1.0-x)/(2.0*y),1.0),0.0),min(x/(2.0*(1.0-y)),1.0),step(0.5,y));return mix(x,z,opacity);}",bhe=new Map([[Kt.ADD,Gfe],[Kt.ALPHA,Wfe],[Kt.AVERAGE,Yfe],[Kt.COLOR,Xfe],[Kt.COLOR_BURN,Zfe],[Kt.COLOR_DODGE,qfe],[Kt.DARKEN,Kfe],[Kt.DIFFERENCE,Qfe],[Kt.DIVIDE,Jfe],[Kt.DST,null],[Kt.EXCLUSION,ehe],[Kt.HARD_LIGHT,the],[Kt.HARD_MIX,nhe],[Kt.HUE,rhe],[Kt.INVERT,ihe],[Kt.INVERT_RGB,ohe],[Kt.LIGHTEN,she],[Kt.LINEAR_BURN,ahe],[Kt.LINEAR_DODGE,lhe],[Kt.LINEAR_LIGHT,che],[Kt.LUMINOSITY,uhe],[Kt.MULTIPLY,dhe],[Kt.NEGATION,fhe],[Kt.NORMAL,hhe],[Kt.OVERLAY,phe],[Kt.PIN_LIGHT,mhe],[Kt.REFLECT,ghe],[Kt.SATURATION,vhe],[Kt.SCREEN,yhe],[Kt.SOFT_LIGHT,_he],[Kt.SRC,xhe],[Kt.SUBTRACT,whe],[Kt.VIVID_LIGHT,She]]),Mhe=class extends hs{constructor(t,e=1){super(),this._blendFunction=t,this.opacity=new Me(e)}getOpacity(){return this.opacity.value}setOpacity(t){this.opacity.value=t}get blendFunction(){return this._blendFunction}set blendFunction(t){this._blendFunction=t,this.dispatchEvent({type:"change"})}getBlendFunction(){return this.blendFunction}setBlendFunction(t){this.blendFunction=t}getShaderCode(){return bhe.get(this.blendFunction)}},Fi=class extends hs{constructor(t,e,{attributes:n=as.NONE,blendFunction:r=Kt.NORMAL,defines:i=new Map,uniforms:o=new Map,extensions:s=null,vertexShader:a=null}={}){super(),this.name=t,this.renderer=null,this.attributes=n,this.fragmentShader=e,this.vertexShader=a,this.defines=i,this.uniforms=o,this.extensions=s,this.blendMode=new Mhe(r),this.blendMode.addEventListener("change",l=>this.setChanged()),this._inputColorSpace=oh,this._outputColorSpace=z$}get inputColorSpace(){return this._inputColorSpace}set inputColorSpace(t){this._inputColorSpace=t,this.setChanged()}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(t){this._outputColorSpace=t,this.setChanged()}set mainScene(t){}set mainCamera(t){}getName(){return this.name}setRenderer(t){this.renderer=t}getDefines(){return this.defines}getUniforms(){return this.uniforms}getExtensions(){return this.extensions}getBlendMode(){return this.blendMode}getAttributes(){return this.attributes}setAttributes(t){this.attributes=t,this.setChanged()}getFragmentShader(){return this.fragmentShader}setFragmentShader(t){this.fragmentShader=t,this.setChanged()}getVertexShader(){return this.vertexShader}setVertexShader(t){this.vertexShader=t,this.setChanged()}setChanged(){this.dispatchEvent({type:"change"})}setDepthTexture(t,e=di){}update(t,e,n){}setSize(t,e){}initialize(t,e,n){}dispose(){for(const t of Object.keys(this)){const e=this[t];(e instanceof gn||e instanceof jr||e instanceof qn||e instanceof Dr)&&this[t].dispose()}}},Ehe=`#ifdef FRAMEBUFFER_PRECISION_HIGH +#`));this.skipRendering=e===0,this.needsSwap=!this.skipRendering,this.fullscreenMaterial.setShaderData(t)}recompile(){this.updateMaterial()}getDepthTexture(){return this.fullscreenMaterial.depthBuffer}setDepthTexture(t,e=di){this.fullscreenMaterial.depthBuffer=t,this.fullscreenMaterial.depthPacking=e;for(const n of this.effects)n.setDepthTexture(t,e)}render(t,e,n,r,i){for(const o of this.effects)o.update(t,e,r);if(!this.skipRendering||this.renderToScreen){const o=this.fullscreenMaterial;o.inputBuffer=e.texture,o.time+=r*this.timeScale,t.setRenderTarget(this.renderToScreen?null:n),t.render(this.scene,this.camera)}}setSize(t,e){this.fullscreenMaterial.setSize(t,e);for(const n of this.effects)n.setSize(t,e)}initialize(t,e,n){this.renderer=t;for(const r of this.effects)r.initialize(t,e,n);this.updateMaterial(),n!==void 0&&n!==nr&&(this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}dispose(){super.dispose();for(const t of this.effects)t.removeEventListener("change",this.listener),t.dispose()}handleEvent(t){switch(t.type){case"change":this.recompile();break}}},zS=class extends Dr{constructor({kernelSize:t=ld.MEDIUM,resolutionScale:e=.5,width:n=Vn.AUTO_SIZE,height:r=Vn.AUTO_SIZE,resolutionX:i=n,resolutionY:o=r}={}){super("KawaseBlurPass"),this.renderTargetA=new gn(1,1,{depthBuffer:!1}),this.renderTargetA.texture.name="Blur.Target.A",this.renderTargetB=this.renderTargetA.clone(),this.renderTargetB.texture.name="Blur.Target.B";const s=this.resolution=new Vn(this,i,o,e);s.addEventListener("change",a=>this.setSize(s.baseWidth,s.baseHeight)),this._blurMaterial=new Kde,this._blurMaterial.kernelSize=t,this.copyMaterial=new H$}getResolution(){return this.resolution}get blurMaterial(){return this._blurMaterial}set blurMaterial(t){this._blurMaterial=t}get dithering(){return this.copyMaterial.dithering}set dithering(t){this.copyMaterial.dithering=t}get kernelSize(){return this.blurMaterial.kernelSize}set kernelSize(t){this.blurMaterial.kernelSize=t}get width(){return this.resolution.width}set width(t){this.resolution.preferredWidth=t}get height(){return this.resolution.height}set height(t){this.resolution.preferredHeight=t}get scale(){return this.blurMaterial.scale}set scale(t){this.blurMaterial.scale=t}getScale(){return this.blurMaterial.scale}setScale(t){this.blurMaterial.scale=t}getKernelSize(){return this.kernelSize}setKernelSize(t){this.kernelSize=t}getResolutionScale(){return this.resolution.scale}setResolutionScale(t){this.resolution.scale=t}render(t,e,n,r,i){const o=this.scene,s=this.camera,a=this.renderTargetA,l=this.renderTargetB,c=this.blurMaterial,u=c.kernelSequence;let d=e;this.fullscreenMaterial=c;for(let f=0,h=u.length;fthis.setSize(l.baseWidth,l.baseHeight))}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}render(t,e,n,r,i){const o=this.fullscreenMaterial;o.inputBuffer=e.texture,t.setRenderTarget(this.renderToScreen?null:this.renderTarget),t.render(this.scene,this.camera)}setSize(t,e){const n=this.resolution;n.setBaseSize(t,e),this.renderTarget.setSize(n.width,n.height)}initialize(t,e,n){n!==void 0&&n!==nr&&(this.renderTarget.texture.type=n,this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}},Ufe=class extends Dr{constructor(t,e){super("MaskPass",t,e),this.needsSwap=!1,this.clearPass=new jg(!1,!1,!0),this.inverse=!1}set mainScene(t){this.scene=t}set mainCamera(t){this.camera=t}get inverted(){return this.inverse}set inverted(t){this.inverse=t}get clear(){return this.clearPass.enabled}set clear(t){this.clearPass.enabled=t}getClearPass(){return this.clearPass}isInverted(){return this.inverted}setInverted(t){this.inverted=t}render(t,e,n,r,i){const o=t.getContext(),s=t.state.buffers,a=this.scene,l=this.camera,c=this.clearPass,u=this.inverted?0:1,d=1-u;s.color.setMask(!1),s.depth.setMask(!1),s.color.setLocked(!0),s.depth.setLocked(!0),s.stencil.setTest(!0),s.stencil.setOp(o.REPLACE,o.REPLACE,o.REPLACE),s.stencil.setFunc(o.ALWAYS,u,4294967295),s.stencil.setClear(d),s.stencil.setLocked(!0),this.clearPass.enabled&&(this.renderToScreen?c.render(t,null):(c.render(t,e),c.render(t,n))),this.renderToScreen?(t.setRenderTarget(null),t.render(a,l)):(t.setRenderTarget(e),t.render(a,l),t.setRenderTarget(n),t.render(a,l)),s.color.setLocked(!1),s.depth.setLocked(!1),s.stencil.setLocked(!1),s.stencil.setFunc(o.EQUAL,1,4294967295),s.stencil.setOp(o.KEEP,o.KEEP,o.KEEP),s.stencil.setLocked(!0)}},Bfe=class extends Dr{constructor(){super("MipmapBlurPass"),this.needsSwap=!1,this.renderTarget=new gn(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="Upsampling.Mipmap0",this.downsamplingMipmaps=[],this.upsamplingMipmaps=[],this.downsamplingMaterial=new dfe,this.upsamplingMaterial=new Ofe,this.resolution=new Ee}get texture(){return this.renderTarget.texture}get levels(){return this.downsamplingMipmaps.length}set levels(t){if(this.levels!==t){const e=this.renderTarget;this.dispose(),this.downsamplingMipmaps=[],this.upsamplingMipmaps=[];for(let n=0;n=0;--f){const h=u[f];l.setSize(d.width,d.height),l.inputBuffer=d.texture,l.supportBuffer=c[f].texture,t.setRenderTarget(h),t.render(o,s),d=h}}setSize(t,e){const n=this.resolution;n.set(t,e);let r=n.width,i=n.height;for(let o=0,s=this.downsamplingMipmaps.length;othis.setSize(u.baseWidth,u.baseHeight))}set mainScene(t){this.renderPass.mainScene=t}set mainCamera(t){this.renderPass.mainCamera=t}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}getResolutionScale(){return this.resolution.scale}setResolutionScale(t){this.resolution.scale=t}render(t,e,n,r,i){const o=this.renderToScreen?null:this.renderTarget;this.renderPass.render(t,o,o)}setSize(t,e){const n=this.resolution;n.setBaseSize(t,e),this.renderTarget.setSize(n.width,n.height)}},Os=class extends Dr{constructor(t,e="inputBuffer"){super("ShaderPass"),this.fullscreenMaterial=t,this.input=e}setInput(t){this.input=t}render(t,e,n,r,i){const o=this.fullscreenMaterial.uniforms;e!==null&&o!==void 0&&o[this.input]!==void 0&&(o[this.input].value=e.texture),t.setRenderTarget(this.renderToScreen?null:n),t.render(this.scene,this.camera)}initialize(t,e,n){n!==void 0&&n!==nr&&(this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}},uP=1/1e3,Vfe=1e3,jfe=class{constructor(){this.startTime=performance.now(),this.previousTime=0,this.currentTime=0,this._delta=0,this._elapsed=0,this._fixedDelta=1e3/60,this.timescale=1,this.useFixedDelta=!1,this._autoReset=!1}get autoReset(){return this._autoReset}set autoReset(t){typeof document<"u"&&document.hidden!==void 0&&(t?document.addEventListener("visibilitychange",this):document.removeEventListener("visibilitychange",this),this._autoReset=t)}get delta(){return this._delta*uP}get fixedDelta(){return this._fixedDelta*uP}set fixedDelta(t){this._fixedDelta=t*Vfe}get elapsed(){return this._elapsed*uP}update(t){this.useFixedDelta?this._delta=this.fixedDelta:(this.previousTime=this.currentTime,this.currentTime=(t!==void 0?t:performance.now())-this.startTime,this._delta=this.currentTime-this.previousTime),this._delta*=this.timescale,this._elapsed+=this._delta}reset(){this._delta=0,this._elapsed=0,this.currentTime=performance.now()-this.startTime}handleEvent(t){document.hidden||(this.currentTime=performance.now()-this.startTime)}dispose(){this.autoReset=!1}},$fe=class{constructor(e=null,{depthBuffer:n=!0,stencilBuffer:r=!1,multisampling:i=0,frameBufferType:o}={}){this.renderer=null,this.inputBuffer=this.createBuffer(n,r,o,i),this.outputBuffer=this.inputBuffer.clone(),this.copyPass=new j$,this.depthTexture=null,this.passes=[],this.timer=new jfe,this.autoRenderToScreen=!0,this.setRenderer(e)}get multisampling(){return this.inputBuffer.samples||0}set multisampling(e){const n=this.inputBuffer,r=this.multisampling;r>0&&e>0?(this.inputBuffer.samples=e,this.outputBuffer.samples=e,this.inputBuffer.dispose(),this.outputBuffer.dispose()):r!==e&&(this.inputBuffer.dispose(),this.outputBuffer.dispose(),this.inputBuffer=this.createBuffer(n.depthBuffer,n.stencilBuffer,n.texture.type,e),this.inputBuffer.depthTexture=this.depthTexture,this.outputBuffer=this.inputBuffer.clone())}getTimer(){return this.timer}getRenderer(){return this.renderer}setRenderer(e){if(this.renderer=e,e!==null){const n=e.getSize(new Ee),r=e.getContext().getContextAttributes().alpha,i=this.inputBuffer.texture.type;i===nr&&pl(e)===Bn&&(qr(this.inputBuffer.texture,Bn),qr(this.outputBuffer.texture,Bn),this.inputBuffer.dispose(),this.outputBuffer.dispose()),e.autoClear=!1,this.setSize(n.width,n.height);for(const o of this.passes)o.initialize(e,r,i)}}replaceRenderer(e,n=!0){const r=this.renderer,i=r.domElement.parentNode;return this.setRenderer(e),n&&i!==null&&(i.removeChild(r.domElement),i.appendChild(e.domElement)),r}createDepthTexture(){const e=this.depthTexture=new bS;return this.inputBuffer.depthTexture=e,this.inputBuffer.dispose(),this.inputBuffer.stencilBuffer?(e.format=wc,e.type=fc):e.type=nl,e}deleteDepthTexture(){if(this.depthTexture!==null){this.depthTexture.dispose(),this.depthTexture=null,this.inputBuffer.depthTexture=null,this.inputBuffer.dispose();for(const e of this.passes)e.setDepthTexture(null)}}createBuffer(e,n,r,i){const o=this.renderer,s=o===null?new Ee:o.getDrawingBufferSize(new Ee),a={minFilter:Dt,magFilter:Dt,stencilBuffer:n,depthBuffer:e,type:r},l=new gn(s.width,s.height,a);return i>0&&(l.ignoreDepthForMultisampleCopy=!1,l.samples=i),r===nr&&pl(o)===Bn&&qr(l.texture,Bn),l.texture.name="EffectComposer.Buffer",l.texture.generateMipmaps=!1,l}setMainScene(e){for(const n of this.passes)n.mainScene=e}setMainCamera(e){for(const n of this.passes)n.mainCamera=e}addPass(e,n){const r=this.passes,i=this.renderer,o=i.getDrawingBufferSize(new Ee),s=i.getContext().getContextAttributes().alpha,a=this.inputBuffer.texture.type;if(e.setRenderer(i),e.setSize(o.width,o.height),e.initialize(i,s,a),this.autoRenderToScreen&&(r.length>0&&(r[r.length-1].renderToScreen=!1),e.renderToScreen&&(this.autoRenderToScreen=!1)),n!==void 0?r.splice(n,0,e):r.push(e),this.autoRenderToScreen&&(r[r.length-1].renderToScreen=!0),e.needsDepthTexture||this.depthTexture!==null)if(this.depthTexture===null){const l=this.createDepthTexture();for(e of r)e.setDepthTexture(l)}else e.setDepthTexture(this.depthTexture)}removePass(e){const n=this.passes,r=n.indexOf(e);if(r!==-1&&n.splice(r,1).length>0){if(this.depthTexture!==null){const s=(l,c)=>l||c.needsDepthTexture;n.reduce(s,!1)||(e.getDepthTexture()===this.depthTexture&&e.setDepthTexture(null),this.deleteDepthTexture())}this.autoRenderToScreen&&r===n.length&&(e.renderToScreen=!1,n.length>0&&(n[n.length-1].renderToScreen=!0))}}removeAllPasses(){const e=this.passes;this.deleteDepthTexture(),e.length>0&&(this.autoRenderToScreen&&(e[e.length-1].renderToScreen=!1),this.passes=[])}render(e){const n=this.renderer,r=this.copyPass;let i=this.inputBuffer,o=this.outputBuffer,s=!1,a,l,c;e===void 0&&(this.timer.update(),e=this.timer.delta);for(const u of this.passes)u.enabled&&(u.render(n,i,o,e,s),u.needsSwap&&(s&&(r.renderToScreen=u.renderToScreen,a=n.getContext(),l=n.state.buffers.stencil,l.setFunc(a.NOTEQUAL,1,4294967295),r.render(n,i,o,e,s),l.setFunc(a.EQUAL,1,4294967295)),c=i,i=o,o=c),u instanceof Ufe?s=!0:u instanceof Dfe&&(s=!1))}setSize(e,n,r){const i=this.renderer,o=i.getSize(new Ee);(e===void 0||n===void 0)&&(e=o.width,n=o.height),(o.width!==e||o.height!==n)&&i.setSize(e,n,r);const s=i.getDrawingBufferSize(new Ee);this.inputBuffer.setSize(s.width,s.height),this.outputBuffer.setSize(s.width,s.height);for(const a of this.passes)a.setSize(s.width,s.height)}reset(){const e=this.timer.autoReset;this.dispose(),this.autoRenderToScreen=!0,this.timer.autoReset=e}dispose(){for(const e of this.passes)e.dispose();this.passes=[],this.inputBuffer!==null&&this.inputBuffer.dispose(),this.outputBuffer!==null&&this.outputBuffer.dispose(),this.deleteDepthTexture(),this.copyPass.dispose(),this.timer.dispose()}},Gfe=class{constructor(){this.shaderParts=new Map([[Rn.FRAGMENT_HEAD,null],[Rn.FRAGMENT_MAIN_UV,null],[Rn.FRAGMENT_MAIN_IMAGE,null],[Rn.VERTEX_HEAD,null],[Rn.VERTEX_MAIN_SUPPORT,null]]),this.defines=new Map,this.uniforms=new Map,this.blendModes=new Map,this.extensions=new Set,this.attributes=as.NONE,this.varyings=new Set,this.uvTransformation=!1,this.readDepth=!1,this.colorSpace=oh}},HR=class extends Set{constructor(e,n=10){super(),this.l=n,this.exclusive=!1,e!==void 0&&this.set(e)}get layer(){return this.l}set layer(e){const n=this.l;for(const r of this)r.layers.disable(n),r.layers.enable(e);this.l=e}getLayer(){return this.layer}setLayer(e){this.layer=e}isExclusive(){return this.exclusive}setExclusive(e){this.exclusive=e}clear(){const e=this.layer;for(const n of this)n.layers.disable(e);return super.clear()}set(e){this.clear();for(const n of e)this.add(n);return this}indexOf(e){return this.has(e)?0:-1}add(e){return this.exclusive?e.layers.set(this.layer):e.layers.enable(this.layer),super.add(e)}delete(e){return this.has(e)&&e.layers.disable(this.layer),super.delete(e)}toggle(e){let n;return this.has(e)?(this.delete(e),n=!1):(this.add(e),n=!0),n}setVisible(e){for(const n of this)e?n.layers.enable(0):n.layers.disable(0);return this}},Wfe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x+y,opacity);}",Yfe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,y,min(y.a,opacity));}",Xfe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,(x+y)*0.5,opacity);}",Zfe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(yHSL.rg,xHSL.b));return vec4(mix(x.rgb,z,opacity),y.a);}",qfe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(step(0.0,y)*(1.0-min(vec4(1.0),(1.0-x)/y)),vec4(1.0),step(1.0,x));return mix(x,z,opacity);}",Kfe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=step(0.0,x)*mix(min(vec4(1.0),x/max(1.0-y,1e-9)),vec4(1.0),step(1.0,y));return mix(x,z,opacity);}",Qfe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,min(x,y),opacity);}",Jfe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,abs(x-y),opacity);}",ehe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x/max(y,1e-12),opacity);}",the="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,(x+y-2.0*x*y),opacity);}",nhe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 a=min(x,1.0),b=min(y,1.0);vec4 z=mix(2.0*a*b,1.0-2.0*(1.0-a)*(1.0-b),step(0.5,y));return mix(x,z,opacity);}",rhe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,step(1.0,x+y),opacity);}",ihe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(yHSL.r,xHSL.gb));return vec4(mix(x.rgb,z,opacity),y.a);}",ohe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,1.0-y,opacity);}",she="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,y*(1.0-x),opacity);}",ahe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,max(x,y),opacity);}",lhe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,clamp(y+x-1.0,0.0,1.0),opacity);}",che="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,min(x+y,1.0),opacity);}",uhe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,clamp(2.0*y+x-1.0,0.0,1.0),opacity);}",dhe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(xHSL.rg,yHSL.b));return vec4(mix(x.rgb,z,opacity),y.a);}",fhe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x*y,opacity);}",hhe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,1.0-abs(1.0-x-y),opacity);}",phe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,y,opacity);}",mhe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(2.0*y*x,1.0-2.0*(1.0-y)*(1.0-x),step(0.5,x));return mix(x,z,opacity);}",ghe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 y2=2.0*y;vec4 z=mix(mix(y2,x,step(0.5*x,y)),max(vec4(0.0),y2-1.0),step(x,(y2-1.0)));return mix(x,z,opacity);}",vhe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(min(x*x/max(1.0-y,1e-12),1.0),y,step(1.0,y));return mix(x,z,opacity);}",yhe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(xHSL.r,yHSL.g,xHSL.b));return vec4(mix(x.rgb,z,opacity),y.a);}",_he="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x+y-min(x*y,1.0),opacity);}",xhe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 y2=2.0*y;vec4 w=step(0.5,y);vec4 z=mix(x-(1.0-y2)*x*(1.0-x),mix(x+(y2-1.0)*(sqrt(x)-x),x+(y2-1.0)*x*((16.0*x-12.0)*x+3.0),w*(1.0-step(0.25,x))),w);return mix(x,z,opacity);}",whe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return y;}",She="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,max(x+y-1.0,0.0),opacity);}",bhe="vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(max(1.0-min((1.0-x)/(2.0*y),1.0),0.0),min(x/(2.0*(1.0-y)),1.0),step(0.5,y));return mix(x,z,opacity);}",Mhe=new Map([[Kt.ADD,Wfe],[Kt.ALPHA,Yfe],[Kt.AVERAGE,Xfe],[Kt.COLOR,Zfe],[Kt.COLOR_BURN,qfe],[Kt.COLOR_DODGE,Kfe],[Kt.DARKEN,Qfe],[Kt.DIFFERENCE,Jfe],[Kt.DIVIDE,ehe],[Kt.DST,null],[Kt.EXCLUSION,the],[Kt.HARD_LIGHT,nhe],[Kt.HARD_MIX,rhe],[Kt.HUE,ihe],[Kt.INVERT,ohe],[Kt.INVERT_RGB,she],[Kt.LIGHTEN,ahe],[Kt.LINEAR_BURN,lhe],[Kt.LINEAR_DODGE,che],[Kt.LINEAR_LIGHT,uhe],[Kt.LUMINOSITY,dhe],[Kt.MULTIPLY,fhe],[Kt.NEGATION,hhe],[Kt.NORMAL,phe],[Kt.OVERLAY,mhe],[Kt.PIN_LIGHT,ghe],[Kt.REFLECT,vhe],[Kt.SATURATION,yhe],[Kt.SCREEN,_he],[Kt.SOFT_LIGHT,xhe],[Kt.SRC,whe],[Kt.SUBTRACT,She],[Kt.VIVID_LIGHT,bhe]]),Ehe=class extends hs{constructor(t,e=1){super(),this._blendFunction=t,this.opacity=new Me(e)}getOpacity(){return this.opacity.value}setOpacity(t){this.opacity.value=t}get blendFunction(){return this._blendFunction}set blendFunction(t){this._blendFunction=t,this.dispatchEvent({type:"change"})}getBlendFunction(){return this.blendFunction}setBlendFunction(t){this.blendFunction=t}getShaderCode(){return Mhe.get(this.blendFunction)}},Fi=class extends hs{constructor(t,e,{attributes:n=as.NONE,blendFunction:r=Kt.NORMAL,defines:i=new Map,uniforms:o=new Map,extensions:s=null,vertexShader:a=null}={}){super(),this.name=t,this.renderer=null,this.attributes=n,this.fragmentShader=e,this.vertexShader=a,this.defines=i,this.uniforms=o,this.extensions=s,this.blendMode=new Ehe(r),this.blendMode.addEventListener("change",l=>this.setChanged()),this._inputColorSpace=oh,this._outputColorSpace=U$}get inputColorSpace(){return this._inputColorSpace}set inputColorSpace(t){this._inputColorSpace=t,this.setChanged()}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(t){this._outputColorSpace=t,this.setChanged()}set mainScene(t){}set mainCamera(t){}getName(){return this.name}setRenderer(t){this.renderer=t}getDefines(){return this.defines}getUniforms(){return this.uniforms}getExtensions(){return this.extensions}getBlendMode(){return this.blendMode}getAttributes(){return this.attributes}setAttributes(t){this.attributes=t,this.setChanged()}getFragmentShader(){return this.fragmentShader}setFragmentShader(t){this.fragmentShader=t,this.setChanged()}getVertexShader(){return this.vertexShader}setVertexShader(t){this.vertexShader=t,this.setChanged()}setChanged(){this.dispatchEvent({type:"change"})}setDepthTexture(t,e=di){}update(t,e,n){}setSize(t,e){}initialize(t,e,n){}dispose(){for(const t of Object.keys(this)){const e=this[t];(e instanceof gn||e instanceof jr||e instanceof qn||e instanceof Dr)&&this[t].dispose()}}},Phe=`#ifdef FRAMEBUFFER_PRECISION_HIGH uniform mediump sampler2D map; #else uniform lowp sampler2D map; #endif -uniform float intensity;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){outputColor=texture2D(map,uv)*intensity;}`,Phe=class extends Fi{constructor({blendFunction:t=Kt.SCREEN,luminanceThreshold:e=.9,luminanceSmoothing:n=.025,mipmapBlur:r=!1,intensity:i=1,radius:o=.85,levels:s=8,kernelSize:a=ld.LARGE,resolutionScale:l=.5,width:c=Vn.AUTO_SIZE,height:u=Vn.AUTO_SIZE,resolutionX:d=c,resolutionY:f=u}={}){super("BloomEffect",Ehe,{blendFunction:t,uniforms:new Map([["map",new Me(null)],["intensity",new Me(i)]])}),this.renderTarget=new gn(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="Bloom.Target",this.blurPass=new zS({kernelSize:a}),this.luminancePass=new Ffe({colorOutput:!0}),this.luminanceMaterial.threshold=e,this.luminanceMaterial.smoothing=n,this.mipmapBlurPass=new Ufe,this.mipmapBlurPass.enabled=r,this.mipmapBlurPass.radius=o,this.mipmapBlurPass.levels=s,this.uniforms.get("map").value=r?this.mipmapBlurPass.texture:this.renderTarget.texture;const h=this.resolution=new Vn(this,d,f,l);h.addEventListener("change",g=>this.setSize(h.baseWidth,h.baseHeight))}get texture(){return this.mipmapBlurPass.enabled?this.mipmapBlurPass.texture:this.renderTarget.texture}getTexture(){return this.texture}getResolution(){return this.resolution}getBlurPass(){return this.blurPass}getLuminancePass(){return this.luminancePass}get luminanceMaterial(){return this.luminancePass.fullscreenMaterial}getLuminanceMaterial(){return this.luminancePass.fullscreenMaterial}get width(){return this.resolution.width}set width(t){this.resolution.preferredWidth=t}get height(){return this.resolution.height}set height(t){this.resolution.preferredHeight=t}get dithering(){return this.blurPass.dithering}set dithering(t){this.blurPass.dithering=t}get kernelSize(){return this.blurPass.kernelSize}set kernelSize(t){this.blurPass.kernelSize=t}get distinction(){return console.warn(this.name,"distinction was removed"),1}set distinction(t){console.warn(this.name,"distinction was removed")}get intensity(){return this.uniforms.get("intensity").value}set intensity(t){this.uniforms.get("intensity").value=t}getIntensity(){return this.intensity}setIntensity(t){this.intensity=t}getResolutionScale(){return this.resolution.scale}setResolutionScale(t){this.resolution.scale=t}update(t,e,n){const r=this.renderTarget,i=this.luminancePass;i.enabled?(i.render(t,e),this.mipmapBlurPass.enabled?this.mipmapBlurPass.render(t,i.renderTarget):this.blurPass.render(t,i.renderTarget,r)):this.mipmapBlurPass.enabled?this.mipmapBlurPass.render(t,e):this.blurPass.render(t,e,r)}setSize(t,e){const n=this.resolution;n.setBaseSize(t,e),this.renderTarget.setSize(n.width,n.height),this.blurPass.resolution.copy(n),this.luminancePass.setSize(t,e),this.mipmapBlurPass.setSize(t,e)}initialize(t,e,n){this.blurPass.initialize(t,e,n),this.luminancePass.initialize(t,e,n),this.mipmapBlurPass.initialize(t,e,n),n!==void 0&&(this.renderTarget.texture.type=n,pl(t)===Bn&&qr(this.renderTarget.texture,Bn))}},Che="void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){outputColor=vec4(vec3(average(inputColor.rgb)),inputColor.a);}",The=class extends Fi{constructor(t){super("ColorAverageEffect",Che,{blendFunction:t})}},Ohe=`#ifdef RADIAL_MODULATION +uniform float intensity;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){outputColor=texture2D(map,uv)*intensity;}`,Che=class extends Fi{constructor({blendFunction:t=Kt.SCREEN,luminanceThreshold:e=.9,luminanceSmoothing:n=.025,mipmapBlur:r=!1,intensity:i=1,radius:o=.85,levels:s=8,kernelSize:a=ld.LARGE,resolutionScale:l=.5,width:c=Vn.AUTO_SIZE,height:u=Vn.AUTO_SIZE,resolutionX:d=c,resolutionY:f=u}={}){super("BloomEffect",Phe,{blendFunction:t,uniforms:new Map([["map",new Me(null)],["intensity",new Me(i)]])}),this.renderTarget=new gn(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="Bloom.Target",this.blurPass=new zS({kernelSize:a}),this.luminancePass=new zfe({colorOutput:!0}),this.luminanceMaterial.threshold=e,this.luminanceMaterial.smoothing=n,this.mipmapBlurPass=new Bfe,this.mipmapBlurPass.enabled=r,this.mipmapBlurPass.radius=o,this.mipmapBlurPass.levels=s,this.uniforms.get("map").value=r?this.mipmapBlurPass.texture:this.renderTarget.texture;const h=this.resolution=new Vn(this,d,f,l);h.addEventListener("change",g=>this.setSize(h.baseWidth,h.baseHeight))}get texture(){return this.mipmapBlurPass.enabled?this.mipmapBlurPass.texture:this.renderTarget.texture}getTexture(){return this.texture}getResolution(){return this.resolution}getBlurPass(){return this.blurPass}getLuminancePass(){return this.luminancePass}get luminanceMaterial(){return this.luminancePass.fullscreenMaterial}getLuminanceMaterial(){return this.luminancePass.fullscreenMaterial}get width(){return this.resolution.width}set width(t){this.resolution.preferredWidth=t}get height(){return this.resolution.height}set height(t){this.resolution.preferredHeight=t}get dithering(){return this.blurPass.dithering}set dithering(t){this.blurPass.dithering=t}get kernelSize(){return this.blurPass.kernelSize}set kernelSize(t){this.blurPass.kernelSize=t}get distinction(){return console.warn(this.name,"distinction was removed"),1}set distinction(t){console.warn(this.name,"distinction was removed")}get intensity(){return this.uniforms.get("intensity").value}set intensity(t){this.uniforms.get("intensity").value=t}getIntensity(){return this.intensity}setIntensity(t){this.intensity=t}getResolutionScale(){return this.resolution.scale}setResolutionScale(t){this.resolution.scale=t}update(t,e,n){const r=this.renderTarget,i=this.luminancePass;i.enabled?(i.render(t,e),this.mipmapBlurPass.enabled?this.mipmapBlurPass.render(t,i.renderTarget):this.blurPass.render(t,i.renderTarget,r)):this.mipmapBlurPass.enabled?this.mipmapBlurPass.render(t,e):this.blurPass.render(t,e,r)}setSize(t,e){const n=this.resolution;n.setBaseSize(t,e),this.renderTarget.setSize(n.width,n.height),this.blurPass.resolution.copy(n),this.luminancePass.setSize(t,e),this.mipmapBlurPass.setSize(t,e)}initialize(t,e,n){this.blurPass.initialize(t,e,n),this.luminancePass.initialize(t,e,n),this.mipmapBlurPass.initialize(t,e,n),n!==void 0&&(this.renderTarget.texture.type=n,pl(t)===Bn&&qr(this.renderTarget.texture,Bn))}},The="void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){outputColor=vec4(vec3(average(inputColor.rgb)),inputColor.a);}",Ohe=class extends Fi{constructor(t){super("ColorAverageEffect",The,{blendFunction:t})}},Rhe=`#ifdef RADIAL_MODULATION uniform float modulationOffset; #endif varying float vActive;varying vec2 vUvR;varying vec2 vUvB;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec2 ra=inputColor.ra;vec2 ba=inputColor.ba; @@ -4428,18 +4428,18 @@ const vec2 center=vec2(0.5);float d=distance(uv,center)*2.0;d=max(d-modulationOf #else if(vActive>0.0){ra=texture2D(inputBuffer,vUvR).ra;ba=texture2D(inputBuffer,vUvB).ba;} #endif -outputColor=vec4(ra.x,inputColor.g,ba.x,max(max(ra.y,ba.y),inputColor.a));}`,Rhe="uniform vec2 offset;varying float vActive;varying vec2 vUvR;varying vec2 vUvB;void mainSupport(const in vec2 uv){vec2 shift=offset*vec2(1.0,aspect);vActive=(shift.x!=0.0||shift.y!=0.0)?1.0:0.0;vUvR=uv+shift;vUvB=uv-shift;}",Ahe=class extends Fi{constructor({offset:t=new Ee(.001,5e-4),radialModulation:e=!1,modulationOffset:n=.15}={}){super("ChromaticAberrationEffect",Ohe,{vertexShader:Rhe,attributes:as.CONVOLUTION,uniforms:new Map([["offset",new Me(t)],["modulationOffset",new Me(n)]])}),this.radialModulation=e}get offset(){return this.uniforms.get("offset").value}set offset(t){this.uniforms.get("offset").value=t}get radialModulation(){return this.defines.has("RADIAL_MODULATION")}set radialModulation(t){t?this.defines.set("RADIAL_MODULATION","1"):this.defines.delete("RADIAL_MODULATION"),this.setChanged()}get modulationOffset(){return this.uniforms.get("modulationOffset").value}set modulationOffset(t){this.uniforms.get("modulationOffset").value=t}getOffset(){return this.offset}setOffset(t){this.offset=t}},Dhe=`#ifdef FRAMEBUFFER_PRECISION_HIGH +outputColor=vec4(ra.x,inputColor.g,ba.x,max(max(ra.y,ba.y),inputColor.a));}`,Ahe="uniform vec2 offset;varying float vActive;varying vec2 vUvR;varying vec2 vUvB;void mainSupport(const in vec2 uv){vec2 shift=offset*vec2(1.0,aspect);vActive=(shift.x!=0.0||shift.y!=0.0)?1.0:0.0;vUvR=uv+shift;vUvB=uv-shift;}",Dhe=class extends Fi{constructor({offset:t=new Ee(.001,5e-4),radialModulation:e=!1,modulationOffset:n=.15}={}){super("ChromaticAberrationEffect",Rhe,{vertexShader:Ahe,attributes:as.CONVOLUTION,uniforms:new Map([["offset",new Me(t)],["modulationOffset",new Me(n)]])}),this.radialModulation=e}get offset(){return this.uniforms.get("offset").value}set offset(t){this.uniforms.get("offset").value=t}get radialModulation(){return this.defines.has("RADIAL_MODULATION")}set radialModulation(t){t?this.defines.set("RADIAL_MODULATION","1"):this.defines.delete("RADIAL_MODULATION"),this.setChanged()}get modulationOffset(){return this.uniforms.get("modulationOffset").value}set modulationOffset(t){this.uniforms.get("modulationOffset").value=t}getOffset(){return this.offset}setOffset(t){this.offset=t}},Ihe=`#ifdef FRAMEBUFFER_PRECISION_HIGH uniform mediump sampler2D nearColorBuffer;uniform mediump sampler2D farColorBuffer; #else uniform lowp sampler2D nearColorBuffer;uniform lowp sampler2D farColorBuffer; #endif -uniform lowp sampler2D nearCoCBuffer;uniform float scale;void mainImage(const in vec4 inputColor,const in vec2 uv,const in float depth,out vec4 outputColor){vec4 colorNear=texture2D(nearColorBuffer,uv);vec4 colorFar=texture2D(farColorBuffer,uv);float cocNear=texture2D(nearCoCBuffer,uv).r;cocNear=min(cocNear*scale,1.0);vec4 result=inputColor*(1.0-colorFar.a)+colorFar;result=mix(result,colorNear,cocNear);outputColor=result;}`,Ihe=class extends Fi{constructor(t,{blendFunction:e,worldFocusDistance:n,worldFocusRange:r,focusDistance:i=0,focalLength:o=.1,focusRange:s=o,bokehScale:a=1,resolutionScale:l=1,width:c=Vn.AUTO_SIZE,height:u=Vn.AUTO_SIZE,resolutionX:d=c,resolutionY:f=u}={}){super("DepthOfFieldEffect",Dhe,{blendFunction:e,attributes:as.DEPTH,uniforms:new Map([["nearColorBuffer",new Me(null)],["farColorBuffer",new Me(null)],["nearCoCBuffer",new Me(null)],["scale",new Me(1)]])}),this.camera=t,this.renderTarget=new gn(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="DoF.Intermediate",this.renderTargetMasked=this.renderTarget.clone(),this.renderTargetMasked.texture.name="DoF.Masked.Far",this.renderTargetNear=this.renderTarget.clone(),this.renderTargetNear.texture.name="DoF.Bokeh.Near",this.uniforms.get("nearColorBuffer").value=this.renderTargetNear.texture,this.renderTargetFar=this.renderTarget.clone(),this.renderTargetFar.texture.name="DoF.Bokeh.Far",this.uniforms.get("farColorBuffer").value=this.renderTargetFar.texture,this.renderTargetCoC=this.renderTarget.clone(),this.renderTargetCoC.texture.name="DoF.CoC",this.renderTargetCoCBlurred=this.renderTargetCoC.clone(),this.renderTargetCoCBlurred.texture.name="DoF.CoC.Blurred",this.uniforms.get("nearCoCBuffer").value=this.renderTargetCoCBlurred.texture,this.cocPass=new Os(new Gde(t));const h=this.cocMaterial;h.focusDistance=i,h.focusRange=s,n!==void 0&&(h.worldFocusDistance=n),r!==void 0&&(h.worldFocusRange=r),this.blurPass=new zS({resolutionScale:l,resolutionX:d,resolutionY:f,kernelSize:ld.MEDIUM}),this.maskPass=new Os(new _fe(this.renderTargetCoC.texture));const g=this.maskPass.fullscreenMaterial;g.maskFunction=_m.MULTIPLY,g.colorChannel=If.GREEN,this.bokehNearBasePass=new Os(new yy(!1,!0)),this.bokehNearBasePass.fullscreenMaterial.cocBuffer=this.renderTargetCoCBlurred.texture,this.bokehNearFillPass=new Os(new yy(!0,!0)),this.bokehNearFillPass.fullscreenMaterial.cocBuffer=this.renderTargetCoCBlurred.texture,this.bokehFarBasePass=new Os(new yy(!1,!1)),this.bokehFarBasePass.fullscreenMaterial.cocBuffer=this.renderTargetCoC.texture,this.bokehFarFillPass=new Os(new yy(!0,!1)),this.bokehFarFillPass.fullscreenMaterial.cocBuffer=this.renderTargetCoC.texture,this.target=null;const y=this.resolution=new Vn(this,d,f,l);y.addEventListener("change",_=>this.setSize(y.baseWidth,y.baseHeight)),this.bokehScale=a}set mainCamera(t){this.camera=t,this.cocMaterial.copyCameraSettings(t)}get cocTexture(){return this.renderTargetCoC.texture}get cocMaterial(){return this.cocPass.fullscreenMaterial}get circleOfConfusionMaterial(){return this.cocMaterial}getCircleOfConfusionMaterial(){return this.circleOfConfusionMaterial}getBlurPass(){return this.blurPass}getResolution(){return this.resolution}get bokehScale(){return this.uniforms.get("scale").value}set bokehScale(t){this.bokehNearBasePass.fullscreenMaterial.scale=t,this.bokehNearFillPass.fullscreenMaterial.scale=t,this.bokehFarBasePass.fullscreenMaterial.scale=t,this.bokehFarFillPass.fullscreenMaterial.scale=t,this.maskPass.fullscreenMaterial.strength=t,this.uniforms.get("scale").value=t}getBokehScale(){return this.bokehScale}setBokehScale(t){this.bokehScale=t}getTarget(){return this.target}setTarget(t){this.target=t}calculateFocusDistance(t){const e=this.camera,n=e.position.distanceTo(t);return Du(-n,e.near,e.far)}setDepthTexture(t,e=di){this.circleOfConfusionMaterial.depthBuffer=t,this.circleOfConfusionMaterial.depthPacking=e}update(t,e,n){const r=this.renderTarget,i=this.renderTargetCoC,o=this.renderTargetCoCBlurred,s=this.renderTargetMasked;if(this.target!==null){const a=this.calculateFocusDistance(this.target);this.cocMaterial.focusDistance=a}this.cocPass.render(t,null,i),this.blurPass.render(t,i,o),this.maskPass.render(t,e,s),this.bokehFarBasePass.render(t,s,r),this.bokehFarFillPass.render(t,r,this.renderTargetFar),this.bokehNearBasePass.render(t,e,r),this.bokehNearFillPass.render(t,r,this.renderTargetNear)}setSize(t,e){const n=this.resolution;n.setBaseSize(t,e);const r=n.width,i=n.height;this.cocPass.setSize(t,e),this.blurPass.setSize(t,e),this.maskPass.setSize(t,e),this.renderTargetCoC.setSize(t,e),this.renderTargetMasked.setSize(t,e),this.renderTarget.setSize(r,i),this.renderTargetNear.setSize(r,i),this.renderTargetFar.setSize(r,i),this.renderTargetCoCBlurred.setSize(r,i),this.bokehNearBasePass.fullscreenMaterial.setSize(t,e),this.bokehNearFillPass.fullscreenMaterial.setSize(t,e),this.bokehFarBasePass.fullscreenMaterial.setSize(t,e),this.bokehFarFillPass.fullscreenMaterial.setSize(t,e)}initialize(t,e,n){this.cocPass.initialize(t,e,n),this.maskPass.initialize(t,e,n),this.bokehNearBasePass.initialize(t,e,n),this.bokehNearFillPass.initialize(t,e,n),this.bokehFarBasePass.initialize(t,e,n),this.bokehFarFillPass.initialize(t,e,n),this.blurPass.initialize(t,e,nr);const r=this.maskPass.fullscreenMaterial;r.maskFunction=e?_m.MULTIPLY:_m.MULTIPLY_RGB_SET_ALPHA,t.capabilities.logarithmicDepthBuffer&&(this.cocPass.fullscreenMaterial.defines.LOG_DEPTH="1"),n!==void 0&&(this.renderTarget.texture.type=n,this.renderTargetNear.texture.type=n,this.renderTargetFar.texture.type=n,this.renderTargetMasked.texture.type=n,pl(t)===Bn&&(qr(this.renderTarget.texture,Bn),qr(this.renderTargetNear.texture,Bn),qr(this.renderTargetFar.texture,Bn),qr(this.renderTargetMasked.texture,Bn)))}};function Lhe(t,e,n){const r=new Map([[gS,1],[Eg,1],[XO,2],[Jn,4]]);let i;if(r.has(e)||console.error("Invalid noise texture format"),n===nr){i=new Uint8Array(t*r.get(e));for(let o=0,s=i.length;odistortion.x-columns*random){float sx=clamp(ceil(seeds.x),0.0,1.0);uv.y=sx*(1.0-(uv.y+distortion.y))+(1.0-sx)*distortion.y;}if(uv.xdistortion.y-columns*random){float sy=clamp(ceil(seeds.y),0.0,1.0);uv.x=sy*distortion.x+(1.0-sy)*(1.0-(uv.x+distortion.x));}vec2 normal=texture2D(perturbationMap,uv*random*random).rg;uv+=normal*seeds*(random*0.2);}}",xy="Glitch.Generated";function oo(t,e){return t+Math.random()*(e-t)}var Nhe=class extends Fi{constructor({chromaticAberrationOffset:t=null,delay:e=new Ee(1.5,3.5),duration:n=new Ee(.6,1),strength:r=new Ee(.3,1),columns:i=.05,ratio:o=.85,perturbationMap:s=null,dtSize:a=64}={}){if(super("GlitchEffect",khe,{uniforms:new Map([["perturbationMap",new Me(null)],["columns",new Me(i)],["active",new Me(!1)],["random",new Me(1)],["seeds",new Me(new Ee)],["distortion",new Me(new Ee)]])}),s===null){const l=new q2(a,a,Jn);l.name=xy,this.perturbationMap=l}else this.perturbationMap=s;this.time=0,this.distortion=this.uniforms.get("distortion").value,this.delay=e,this.duration=n,this.breakPoint=new Ee(oo(this.delay.x,this.delay.y),oo(this.duration.x,this.duration.y)),this.strength=r,this.mode=vu.SPORADIC,this.ratio=o,this.chromaticAberrationOffset=t}get seeds(){return this.uniforms.get("seeds").value}get active(){return this.uniforms.get("active").value}isActive(){return this.active}get minDelay(){return this.delay.x}set minDelay(t){this.delay.x=t}getMinDelay(){return this.delay.x}setMinDelay(t){this.delay.x=t}get maxDelay(){return this.delay.y}set maxDelay(t){this.delay.y=t}getMaxDelay(){return this.delay.y}setMaxDelay(t){this.delay.y=t}get minDuration(){return this.duration.x}set minDuration(t){this.duration.x=t}getMinDuration(){return this.duration.x}setMinDuration(t){this.duration.x=t}get maxDuration(){return this.duration.y}set maxDuration(t){this.duration.y=t}getMaxDuration(){return this.duration.y}setMaxDuration(t){this.duration.y=t}get minStrength(){return this.strength.x}set minStrength(t){this.strength.x=t}getMinStrength(){return this.strength.x}setMinStrength(t){this.strength.x=t}get maxStrength(){return this.strength.y}set maxStrength(t){this.strength.y=t}getMaxStrength(){return this.strength.y}setMaxStrength(t){this.strength.y=t}getMode(){return this.mode}setMode(t){this.mode=t}getGlitchRatio(){return 1-this.ratio}setGlitchRatio(t){this.ratio=Math.min(Math.max(1-t,0),1)}get columns(){return this.uniforms.get("columns").value}set columns(t){this.uniforms.get("columns").value=t}getGlitchColumns(){return this.columns}setGlitchColumns(t){this.columns=t}getChromaticAberrationOffset(){return this.chromaticAberrationOffset}setChromaticAberrationOffset(t){this.chromaticAberrationOffset=t}get perturbationMap(){return this.uniforms.get("perturbationMap").value}set perturbationMap(t){const e=this.perturbationMap;e!==null&&e.name===xy&&e.dispose(),t.minFilter=t.magFilter=Qt,t.wrapS=t.wrapT=Ro,t.generateMipmaps=!1,this.uniforms.get("perturbationMap").value=t}getPerturbationMap(){return this.perturbationMap}setPerturbationMap(t){this.perturbationMap=t}generatePerturbationMap(t=64){const e=new q2(t,t,Jn);return e.name=xy,e}update(t,e,n){const r=this.mode,i=this.breakPoint,o=this.chromaticAberrationOffset,s=this.strength;let a=this.time,l=!1,c=0,u=0,d;r!==vu.DISABLED&&(r===vu.SPORADIC&&(a+=n,d=a>i.x,a>=i.x+i.y&&(i.set(oo(this.delay.x,this.delay.y),oo(this.duration.x,this.duration.y)),a=0)),c=Math.random(),this.uniforms.get("random").value=c,d&&c>this.ratio||r===vu.CONSTANT_WILD?(l=!0,c*=s.y*.03,u=oo(-Math.PI,Math.PI),this.seeds.set(oo(-s.y,s.y),oo(-s.y,s.y)),this.distortion.set(oo(0,1),oo(0,1))):(d||r===vu.CONSTANT_MILD)&&(l=!0,c*=s.x*.03,u=oo(-Math.PI,Math.PI),this.seeds.set(oo(-s.x,s.x),oo(-s.x,s.x)),this.distortion.set(oo(0,1),oo(0,1))),this.time=a),o!==null&&(l?o.set(Math.cos(u),Math.sin(u)).multiplyScalar(c):o.set(0,0)),this.uniforms.get("active").value=l}dispose(){const t=this.perturbationMap;t!==null&&t.name===xy&&t.dispose()}},Fhe=`#ifdef FRAMEBUFFER_PRECISION_HIGH +uniform lowp sampler2D nearCoCBuffer;uniform float scale;void mainImage(const in vec4 inputColor,const in vec2 uv,const in float depth,out vec4 outputColor){vec4 colorNear=texture2D(nearColorBuffer,uv);vec4 colorFar=texture2D(farColorBuffer,uv);float cocNear=texture2D(nearCoCBuffer,uv).r;cocNear=min(cocNear*scale,1.0);vec4 result=inputColor*(1.0-colorFar.a)+colorFar;result=mix(result,colorNear,cocNear);outputColor=result;}`,Lhe=class extends Fi{constructor(t,{blendFunction:e,worldFocusDistance:n,worldFocusRange:r,focusDistance:i=0,focalLength:o=.1,focusRange:s=o,bokehScale:a=1,resolutionScale:l=1,width:c=Vn.AUTO_SIZE,height:u=Vn.AUTO_SIZE,resolutionX:d=c,resolutionY:f=u}={}){super("DepthOfFieldEffect",Ihe,{blendFunction:e,attributes:as.DEPTH,uniforms:new Map([["nearColorBuffer",new Me(null)],["farColorBuffer",new Me(null)],["nearCoCBuffer",new Me(null)],["scale",new Me(1)]])}),this.camera=t,this.renderTarget=new gn(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="DoF.Intermediate",this.renderTargetMasked=this.renderTarget.clone(),this.renderTargetMasked.texture.name="DoF.Masked.Far",this.renderTargetNear=this.renderTarget.clone(),this.renderTargetNear.texture.name="DoF.Bokeh.Near",this.uniforms.get("nearColorBuffer").value=this.renderTargetNear.texture,this.renderTargetFar=this.renderTarget.clone(),this.renderTargetFar.texture.name="DoF.Bokeh.Far",this.uniforms.get("farColorBuffer").value=this.renderTargetFar.texture,this.renderTargetCoC=this.renderTarget.clone(),this.renderTargetCoC.texture.name="DoF.CoC",this.renderTargetCoCBlurred=this.renderTargetCoC.clone(),this.renderTargetCoCBlurred.texture.name="DoF.CoC.Blurred",this.uniforms.get("nearCoCBuffer").value=this.renderTargetCoCBlurred.texture,this.cocPass=new Os(new Wde(t));const h=this.cocMaterial;h.focusDistance=i,h.focusRange=s,n!==void 0&&(h.worldFocusDistance=n),r!==void 0&&(h.worldFocusRange=r),this.blurPass=new zS({resolutionScale:l,resolutionX:d,resolutionY:f,kernelSize:ld.MEDIUM}),this.maskPass=new Os(new xfe(this.renderTargetCoC.texture));const g=this.maskPass.fullscreenMaterial;g.maskFunction=_m.MULTIPLY,g.colorChannel=If.GREEN,this.bokehNearBasePass=new Os(new yy(!1,!0)),this.bokehNearBasePass.fullscreenMaterial.cocBuffer=this.renderTargetCoCBlurred.texture,this.bokehNearFillPass=new Os(new yy(!0,!0)),this.bokehNearFillPass.fullscreenMaterial.cocBuffer=this.renderTargetCoCBlurred.texture,this.bokehFarBasePass=new Os(new yy(!1,!1)),this.bokehFarBasePass.fullscreenMaterial.cocBuffer=this.renderTargetCoC.texture,this.bokehFarFillPass=new Os(new yy(!0,!1)),this.bokehFarFillPass.fullscreenMaterial.cocBuffer=this.renderTargetCoC.texture,this.target=null;const y=this.resolution=new Vn(this,d,f,l);y.addEventListener("change",_=>this.setSize(y.baseWidth,y.baseHeight)),this.bokehScale=a}set mainCamera(t){this.camera=t,this.cocMaterial.copyCameraSettings(t)}get cocTexture(){return this.renderTargetCoC.texture}get cocMaterial(){return this.cocPass.fullscreenMaterial}get circleOfConfusionMaterial(){return this.cocMaterial}getCircleOfConfusionMaterial(){return this.circleOfConfusionMaterial}getBlurPass(){return this.blurPass}getResolution(){return this.resolution}get bokehScale(){return this.uniforms.get("scale").value}set bokehScale(t){this.bokehNearBasePass.fullscreenMaterial.scale=t,this.bokehNearFillPass.fullscreenMaterial.scale=t,this.bokehFarBasePass.fullscreenMaterial.scale=t,this.bokehFarFillPass.fullscreenMaterial.scale=t,this.maskPass.fullscreenMaterial.strength=t,this.uniforms.get("scale").value=t}getBokehScale(){return this.bokehScale}setBokehScale(t){this.bokehScale=t}getTarget(){return this.target}setTarget(t){this.target=t}calculateFocusDistance(t){const e=this.camera,n=e.position.distanceTo(t);return Du(-n,e.near,e.far)}setDepthTexture(t,e=di){this.circleOfConfusionMaterial.depthBuffer=t,this.circleOfConfusionMaterial.depthPacking=e}update(t,e,n){const r=this.renderTarget,i=this.renderTargetCoC,o=this.renderTargetCoCBlurred,s=this.renderTargetMasked;if(this.target!==null){const a=this.calculateFocusDistance(this.target);this.cocMaterial.focusDistance=a}this.cocPass.render(t,null,i),this.blurPass.render(t,i,o),this.maskPass.render(t,e,s),this.bokehFarBasePass.render(t,s,r),this.bokehFarFillPass.render(t,r,this.renderTargetFar),this.bokehNearBasePass.render(t,e,r),this.bokehNearFillPass.render(t,r,this.renderTargetNear)}setSize(t,e){const n=this.resolution;n.setBaseSize(t,e);const r=n.width,i=n.height;this.cocPass.setSize(t,e),this.blurPass.setSize(t,e),this.maskPass.setSize(t,e),this.renderTargetCoC.setSize(t,e),this.renderTargetMasked.setSize(t,e),this.renderTarget.setSize(r,i),this.renderTargetNear.setSize(r,i),this.renderTargetFar.setSize(r,i),this.renderTargetCoCBlurred.setSize(r,i),this.bokehNearBasePass.fullscreenMaterial.setSize(t,e),this.bokehNearFillPass.fullscreenMaterial.setSize(t,e),this.bokehFarBasePass.fullscreenMaterial.setSize(t,e),this.bokehFarFillPass.fullscreenMaterial.setSize(t,e)}initialize(t,e,n){this.cocPass.initialize(t,e,n),this.maskPass.initialize(t,e,n),this.bokehNearBasePass.initialize(t,e,n),this.bokehNearFillPass.initialize(t,e,n),this.bokehFarBasePass.initialize(t,e,n),this.bokehFarFillPass.initialize(t,e,n),this.blurPass.initialize(t,e,nr);const r=this.maskPass.fullscreenMaterial;r.maskFunction=e?_m.MULTIPLY:_m.MULTIPLY_RGB_SET_ALPHA,t.capabilities.logarithmicDepthBuffer&&(this.cocPass.fullscreenMaterial.defines.LOG_DEPTH="1"),n!==void 0&&(this.renderTarget.texture.type=n,this.renderTargetNear.texture.type=n,this.renderTargetFar.texture.type=n,this.renderTargetMasked.texture.type=n,pl(t)===Bn&&(qr(this.renderTarget.texture,Bn),qr(this.renderTargetNear.texture,Bn),qr(this.renderTargetFar.texture,Bn),qr(this.renderTargetMasked.texture,Bn)))}};function khe(t,e,n){const r=new Map([[gS,1],[Eg,1],[XO,2],[Jn,4]]);let i;if(r.has(e)||console.error("Invalid noise texture format"),n===nr){i=new Uint8Array(t*r.get(e));for(let o=0,s=i.length;odistortion.x-columns*random){float sx=clamp(ceil(seeds.x),0.0,1.0);uv.y=sx*(1.0-(uv.y+distortion.y))+(1.0-sx)*distortion.y;}if(uv.xdistortion.y-columns*random){float sy=clamp(ceil(seeds.y),0.0,1.0);uv.x=sy*distortion.x+(1.0-sy)*(1.0-(uv.x+distortion.x));}vec2 normal=texture2D(perturbationMap,uv*random*random).rg;uv+=normal*seeds*(random*0.2);}}",xy="Glitch.Generated";function oo(t,e){return t+Math.random()*(e-t)}var Fhe=class extends Fi{constructor({chromaticAberrationOffset:t=null,delay:e=new Ee(1.5,3.5),duration:n=new Ee(.6,1),strength:r=new Ee(.3,1),columns:i=.05,ratio:o=.85,perturbationMap:s=null,dtSize:a=64}={}){if(super("GlitchEffect",Nhe,{uniforms:new Map([["perturbationMap",new Me(null)],["columns",new Me(i)],["active",new Me(!1)],["random",new Me(1)],["seeds",new Me(new Ee)],["distortion",new Me(new Ee)]])}),s===null){const l=new K2(a,a,Jn);l.name=xy,this.perturbationMap=l}else this.perturbationMap=s;this.time=0,this.distortion=this.uniforms.get("distortion").value,this.delay=e,this.duration=n,this.breakPoint=new Ee(oo(this.delay.x,this.delay.y),oo(this.duration.x,this.duration.y)),this.strength=r,this.mode=vu.SPORADIC,this.ratio=o,this.chromaticAberrationOffset=t}get seeds(){return this.uniforms.get("seeds").value}get active(){return this.uniforms.get("active").value}isActive(){return this.active}get minDelay(){return this.delay.x}set minDelay(t){this.delay.x=t}getMinDelay(){return this.delay.x}setMinDelay(t){this.delay.x=t}get maxDelay(){return this.delay.y}set maxDelay(t){this.delay.y=t}getMaxDelay(){return this.delay.y}setMaxDelay(t){this.delay.y=t}get minDuration(){return this.duration.x}set minDuration(t){this.duration.x=t}getMinDuration(){return this.duration.x}setMinDuration(t){this.duration.x=t}get maxDuration(){return this.duration.y}set maxDuration(t){this.duration.y=t}getMaxDuration(){return this.duration.y}setMaxDuration(t){this.duration.y=t}get minStrength(){return this.strength.x}set minStrength(t){this.strength.x=t}getMinStrength(){return this.strength.x}setMinStrength(t){this.strength.x=t}get maxStrength(){return this.strength.y}set maxStrength(t){this.strength.y=t}getMaxStrength(){return this.strength.y}setMaxStrength(t){this.strength.y=t}getMode(){return this.mode}setMode(t){this.mode=t}getGlitchRatio(){return 1-this.ratio}setGlitchRatio(t){this.ratio=Math.min(Math.max(1-t,0),1)}get columns(){return this.uniforms.get("columns").value}set columns(t){this.uniforms.get("columns").value=t}getGlitchColumns(){return this.columns}setGlitchColumns(t){this.columns=t}getChromaticAberrationOffset(){return this.chromaticAberrationOffset}setChromaticAberrationOffset(t){this.chromaticAberrationOffset=t}get perturbationMap(){return this.uniforms.get("perturbationMap").value}set perturbationMap(t){const e=this.perturbationMap;e!==null&&e.name===xy&&e.dispose(),t.minFilter=t.magFilter=Qt,t.wrapS=t.wrapT=Ro,t.generateMipmaps=!1,this.uniforms.get("perturbationMap").value=t}getPerturbationMap(){return this.perturbationMap}setPerturbationMap(t){this.perturbationMap=t}generatePerturbationMap(t=64){const e=new K2(t,t,Jn);return e.name=xy,e}update(t,e,n){const r=this.mode,i=this.breakPoint,o=this.chromaticAberrationOffset,s=this.strength;let a=this.time,l=!1,c=0,u=0,d;r!==vu.DISABLED&&(r===vu.SPORADIC&&(a+=n,d=a>i.x,a>=i.x+i.y&&(i.set(oo(this.delay.x,this.delay.y),oo(this.duration.x,this.duration.y)),a=0)),c=Math.random(),this.uniforms.get("random").value=c,d&&c>this.ratio||r===vu.CONSTANT_WILD?(l=!0,c*=s.y*.03,u=oo(-Math.PI,Math.PI),this.seeds.set(oo(-s.y,s.y),oo(-s.y,s.y)),this.distortion.set(oo(0,1),oo(0,1))):(d||r===vu.CONSTANT_MILD)&&(l=!0,c*=s.x*.03,u=oo(-Math.PI,Math.PI),this.seeds.set(oo(-s.x,s.x),oo(-s.x,s.x)),this.distortion.set(oo(0,1),oo(0,1))),this.time=a),o!==null&&(l?o.set(Math.cos(u),Math.sin(u)).multiplyScalar(c):o.set(0,0)),this.uniforms.get("active").value=l}dispose(){const t=this.perturbationMap;t!==null&&t.name===xy&&t.dispose()}},zhe=`#ifdef FRAMEBUFFER_PRECISION_HIGH uniform mediump sampler2D map; #else uniform lowp sampler2D map; #endif -void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){outputColor=texture2D(map,uv);}`,dP=new Z,sN=new rt,zhe=class extends Fi{constructor(t,e,{blendFunction:n=Kt.SCREEN,samples:r=60,density:i=.96,decay:o=.9,weight:s=.4,exposure:a=.6,clampMax:l=1,blur:c=!0,kernelSize:u=ld.SMALL,resolutionScale:d=.5,width:f=Vn.AUTO_SIZE,height:h=Vn.AUTO_SIZE,resolutionX:g=f,resolutionY:y=h}={}){super("GodRaysEffect",Fhe,{blendFunction:n,attributes:as.DEPTH,uniforms:new Map([["map",new Me(null)]])}),this.camera=t,this._lightSource=e,this.lightSource=e,this.lightScene=new Sc,this.screenPosition=new Ee,this.renderTargetA=new gn(1,1,{depthBuffer:!1}),this.renderTargetA.texture.name="GodRays.Target.A",this.renderTargetB=this.renderTargetA.clone(),this.renderTargetB.texture.name="GodRays.Target.B",this.uniforms.get("map").value=this.renderTargetB.texture,this.renderTargetLight=new gn(1,1),this.renderTargetLight.texture.name="GodRays.Light",this.renderTargetLight.depthTexture=new bS,this.renderPassLight=new Eh(this.lightScene,t),this.renderPassLight.clearPass.overrideClearColor=new lt(0),this.clearPass=new jg(!0,!1,!1),this.clearPass.overrideClearColor=new lt(0),this.blurPass=new zS({kernelSize:u}),this.blurPass.enabled=c,this.depthMaskPass=new Os(new H$);const _=this.depthMaskMaterial;_.depthBuffer1=this.renderTargetLight.depthTexture,_.copyCameraSettings(t),this.godRaysPass=new Os(new mfe(this.screenPosition));const v=this.godRaysMaterial;v.density=i,v.decay=o,v.weight=s,v.exposure=a,v.maxIntensity=l,v.samples=r;const x=this.resolution=new Vn(this,g,y,d);x.addEventListener("change",w=>this.setSize(x.baseWidth,x.baseHeight))}set mainCamera(t){this.camera=t,this.renderPassLight.mainCamera=t,this.depthMaskMaterial.copyCameraSettings(t)}get lightSource(){return this._lightSource}set lightSource(t){this._lightSource=t,t!==null&&(t.material.depthWrite=!1,t.material.transparent=!0)}getBlurPass(){return this.blurPass}get texture(){return this.renderTargetB.texture}getTexture(){return this.texture}get depthMaskMaterial(){return this.depthMaskPass.fullscreenMaterial}get godRaysMaterial(){return this.godRaysPass.fullscreenMaterial}getGodRaysMaterial(){return this.godRaysMaterial}getResolution(){return this.resolution}get width(){return this.resolution.width}set width(t){this.resolution.preferredWidth=t}get height(){return this.resolution.height}set height(t){this.resolution.preferredHeight=t}get dithering(){return this.godRaysMaterial.dithering}set dithering(t){const e=this.godRaysMaterial;e.dithering=t,e.needsUpdate=!0}get blur(){return this.blurPass.enabled}set blur(t){this.blurPass.enabled=t}get kernelSize(){return this.blurPass.kernelSize}set kernelSize(t){this.blurPass.kernelSize=t}getResolutionScale(){return this.resolution.scale}setResolutionScale(t){this.resolution.scale=t}get samples(){return this.godRaysMaterial.samples}set samples(t){this.godRaysMaterial.samples=t}setDepthTexture(t,e=di){this.depthMaskPass.fullscreenMaterial.depthBuffer0=t,this.depthMaskPass.fullscreenMaterial.depthPacking0=e}update(t,e,n){const r=this.lightSource,i=r.parent,o=r.matrixAutoUpdate,s=this.renderTargetA,a=this.renderTargetLight;r.material.depthWrite=!0,r.matrixAutoUpdate=!1,r.updateWorldMatrix(!0,!1),i!==null&&(o||sN.copy(r.matrix),r.matrix.copy(r.matrixWorld)),this.lightScene.add(r),this.renderPassLight.render(t,a),this.clearPass.render(t,s),this.depthMaskPass.render(t,a,s),r.material.depthWrite=!1,r.matrixAutoUpdate=o,i!==null&&(o||r.matrix.copy(sN),i.add(r)),dP.setFromMatrixPosition(r.matrixWorld).project(this.camera),this.screenPosition.set(Math.min(Math.max((dP.x+1)*.5,-1),2),Math.min(Math.max((dP.y+1)*.5,-1),2)),this.blurPass.enabled&&this.blurPass.render(t,s,s),this.godRaysPass.render(t,s,this.renderTargetB)}setSize(t,e){const n=this.resolution;n.setBaseSize(t,e);const r=n.width,i=n.height;this.renderTargetA.setSize(r,i),this.renderTargetB.setSize(r,i),this.renderTargetLight.setSize(r,i),this.blurPass.resolution.copy(n)}initialize(t,e,n){this.blurPass.initialize(t,e,n),this.renderPassLight.initialize(t,e,n),this.depthMaskPass.initialize(t,e,n),this.godRaysPass.initialize(t,e,n),n!==void 0&&(this.renderTargetA.texture.type=n,this.renderTargetB.texture.type=n,this.renderTargetLight.texture.type=n,pl(t)===Bn&&(qr(this.renderTargetA.texture,Bn),qr(this.renderTargetB.texture,Bn),qr(this.renderTargetLight.texture,Bn)))}},Uhe="uniform vec2 scale;uniform float lineWidth;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){float grid=0.5-max(abs(mod(uv.x*scale.x,1.0)-0.5),abs(mod(uv.y*scale.y,1.0)-0.5));outputColor=vec4(vec3(smoothstep(0.0,lineWidth,grid)),inputColor.a);}",Bhe=class extends Fi{constructor({blendFunction:t=Kt.OVERLAY,scale:e=1,lineWidth:n=0}={}){super("GridEffect",Uhe,{blendFunction:t,uniforms:new Map([["scale",new Me(new Ee)],["lineWidth",new Me(n)]])}),this.resolution=new Ee,this.s=0,this.scale=e,this.l=0,this.lineWidth=n}get scale(){return this.s}set scale(t){this.s=Math.max(t,1e-6),this.setSize(this.resolution.width,this.resolution.height)}getScale(){return this.scale}setScale(t){this.scale=t}get lineWidth(){return this.l}set lineWidth(t){this.l=t,this.setSize(this.resolution.width,this.resolution.height)}getLineWidth(){return this.lineWidth}setLineWidth(t){this.lineWidth=t}setSize(t,e){this.resolution.set(t,e);const n=t/e,r=this.scale*(e*.125);this.uniforms.get("scale").value.set(n*r,r),this.uniforms.get("lineWidth").value=r/e+this.lineWidth}};function aN(t,e,n){const r=document.createElement("canvas"),i=r.getContext("2d");if(r.width=t,r.height=e,n instanceof Image)i.drawImage(n,0,0);else{const o=i.createImageData(t,e);o.data.set(n),i.putImageData(o,0,0)}return r}var $$=class{constructor(t=0,e=0,n=null){this.width=t,this.height=e,this.data=n}toCanvas(){return typeof document>"u"?null:aN(this.width,this.height,this.data)}static from(t){const{width:e,height:n}=t;let r;if(t instanceof Image){const i=aN(e,n,t);i!==null&&(r=i.getContext("2d").getImageData(0,0,e,n).data)}else r=t.data;return new $$(e,n,r)}},Hhe=`"use strict";(()=>{var O={SCALE_UP:"lut.scaleup"};var _=[new Float32Array(3),new Float32Array(3)],n=[new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array(3)],Z=[[new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,0,1]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([1,0,1]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([0,1,1]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([0,1,1]),new Float32Array([1,1,1])]];function d(a,t,r,m){let i=r[0]-t[0],e=r[1]-t[1],y=r[2]-t[2],h=a[0]-t[0],A=a[1]-t[1],w=a[2]-t[2],c=e*w-y*A,l=y*h-i*w,x=i*A-e*h,u=Math.sqrt(c*c+l*l+x*x),b=u*.5,s=c/u,F=l/u,f=x/u,p=-(a[0]*s+a[1]*F+a[2]*f),M=m[0]*s+m[1]*F+m[2]*f;return Math.abs(M+p)*b/3}function V(a,t,r,m,i,e){let y=(r+m*t+i*t*t)*4;e[0]=a[y+0],e[1]=a[y+1],e[2]=a[y+2]}function k(a,t,r,m,i,e){let y=r*(t-1),h=m*(t-1),A=i*(t-1),w=Math.floor(y),c=Math.floor(h),l=Math.floor(A),x=Math.ceil(y),u=Math.ceil(h),b=Math.ceil(A),s=y-w,F=h-c,f=A-l;if(w===y&&c===h&&l===A)V(a,t,y,h,A,e);else{let p;s>=F&&F>=f?p=Z[0]:s>=f&&f>=F?p=Z[1]:f>=s&&s>=F?p=Z[2]:F>=s&&s>=f?p=Z[3]:F>=f&&f>=s?p=Z[4]:f>=F&&F>=s&&(p=Z[5]);let[M,g,X,Y]=p,P=_[0];P[0]=s,P[1]=F,P[2]=f;let o=_[1],L=x-w,S=u-c,U=b-l;o[0]=L*M[0]+w,o[1]=S*M[1]+c,o[2]=U*M[2]+l,V(a,t,o[0],o[1],o[2],n[0]),o[0]=L*g[0]+w,o[1]=S*g[1]+c,o[2]=U*g[2]+l,V(a,t,o[0],o[1],o[2],n[1]),o[0]=L*X[0]+w,o[1]=S*X[1]+c,o[2]=U*X[2]+l,V(a,t,o[0],o[1],o[2],n[2]),o[0]=L*Y[0]+w,o[1]=S*Y[1]+c,o[2]=U*Y[2]+l,V(a,t,o[0],o[1],o[2],n[3]);let T=d(g,X,Y,P)*6,q=d(M,X,Y,P)*6,C=d(M,g,Y,P)*6,E=d(M,g,X,P)*6;n[0][0]*=T,n[0][1]*=T,n[0][2]*=T,n[1][0]*=q,n[1][1]*=q,n[1][2]*=q,n[2][0]*=C,n[2][1]*=C,n[2][2]*=C,n[3][0]*=E,n[3][1]*=E,n[3][2]*=E,e[0]=n[0][0]+n[1][0]+n[2][0]+n[3][0],e[1]=n[0][1]+n[1][1]+n[2][1]+n[3][1],e[2]=n[0][2]+n[1][2]+n[2][2]+n[3][2]}}var v=class{static expand(t,r){let m=Math.cbrt(t.length/4),i=new Float32Array(3),e=new t.constructor(r**3*4),y=t instanceof Uint8Array?255:1,h=r**2,A=1/(r-1);for(let w=0;w{let t=a.data,r=t.data;switch(t.operation){case O.SCALE_UP:r=v.expand(r,t.size);break}postMessage(r,[r.buffer]),close()});})(); -`,lN=new lt,D_=class extends zu{constructor(t,e){super(t,e,e,e),this.type=Yn,this.format=Jn,this.minFilter=Dt,this.magFilter=Dt,this.wrapS=Xr,this.wrapT=Xr,this.wrapR=Xr,this.unpackAlignment=1,this.needsUpdate=!0,qr(this,oh),this.domainMin=new Z(0,0,0),this.domainMax=new Z(1,1,1)}get isLookupTexture3D(){return!0}scaleUp(t,e=!0){const n=this.image;let r;return t<=n.width?r=Promise.reject(new Error("The target size must be greater than the current size")):r=new Promise((i,o)=>{const s=URL.createObjectURL(new Blob([Hhe],{type:"text/javascript"})),a=new Worker(s);a.addEventListener("error",c=>o(c.error)),a.addEventListener("message",c=>{const u=new D_(c.data,t);lP(this,u),u.type=this.type,u.name=this.name,URL.revokeObjectURL(s),i(u)});const l=e?[n.data.buffer]:[];a.postMessage({operation:Wde.SCALE_UP,data:n.data,size:t},l)}),r}applyLUT(t){const e=this.image,n=t.image,r=Math.min(e.width,e.height,e.depth),i=Math.min(n.width,n.height,n.depth);if(r!==i)console.error("Size mismatch");else if(t.type!==Yn||this.type!==Yn)console.error("Both LUTs must be FloatType textures");else if(t.format!==Jn||this.format!==Jn)console.error("Both LUTs must be RGBA textures");else{const o=e.data,s=n.data,a=r,l=a**2,c=a-1;for(let u=0,d=a**3;ur){o=new Uint8Array(l.length);for(let c=0;cthis.setSize(x.baseWidth,x.baseHeight))}set mainCamera(t){this.camera=t,this.renderPassLight.mainCamera=t,this.depthMaskMaterial.copyCameraSettings(t)}get lightSource(){return this._lightSource}set lightSource(t){this._lightSource=t,t!==null&&(t.material.depthWrite=!1,t.material.transparent=!0)}getBlurPass(){return this.blurPass}get texture(){return this.renderTargetB.texture}getTexture(){return this.texture}get depthMaskMaterial(){return this.depthMaskPass.fullscreenMaterial}get godRaysMaterial(){return this.godRaysPass.fullscreenMaterial}getGodRaysMaterial(){return this.godRaysMaterial}getResolution(){return this.resolution}get width(){return this.resolution.width}set width(t){this.resolution.preferredWidth=t}get height(){return this.resolution.height}set height(t){this.resolution.preferredHeight=t}get dithering(){return this.godRaysMaterial.dithering}set dithering(t){const e=this.godRaysMaterial;e.dithering=t,e.needsUpdate=!0}get blur(){return this.blurPass.enabled}set blur(t){this.blurPass.enabled=t}get kernelSize(){return this.blurPass.kernelSize}set kernelSize(t){this.blurPass.kernelSize=t}getResolutionScale(){return this.resolution.scale}setResolutionScale(t){this.resolution.scale=t}get samples(){return this.godRaysMaterial.samples}set samples(t){this.godRaysMaterial.samples=t}setDepthTexture(t,e=di){this.depthMaskPass.fullscreenMaterial.depthBuffer0=t,this.depthMaskPass.fullscreenMaterial.depthPacking0=e}update(t,e,n){const r=this.lightSource,i=r.parent,o=r.matrixAutoUpdate,s=this.renderTargetA,a=this.renderTargetLight;r.material.depthWrite=!0,r.matrixAutoUpdate=!1,r.updateWorldMatrix(!0,!1),i!==null&&(o||sN.copy(r.matrix),r.matrix.copy(r.matrixWorld)),this.lightScene.add(r),this.renderPassLight.render(t,a),this.clearPass.render(t,s),this.depthMaskPass.render(t,a,s),r.material.depthWrite=!1,r.matrixAutoUpdate=o,i!==null&&(o||r.matrix.copy(sN),i.add(r)),dP.setFromMatrixPosition(r.matrixWorld).project(this.camera),this.screenPosition.set(Math.min(Math.max((dP.x+1)*.5,-1),2),Math.min(Math.max((dP.y+1)*.5,-1),2)),this.blurPass.enabled&&this.blurPass.render(t,s,s),this.godRaysPass.render(t,s,this.renderTargetB)}setSize(t,e){const n=this.resolution;n.setBaseSize(t,e);const r=n.width,i=n.height;this.renderTargetA.setSize(r,i),this.renderTargetB.setSize(r,i),this.renderTargetLight.setSize(r,i),this.blurPass.resolution.copy(n)}initialize(t,e,n){this.blurPass.initialize(t,e,n),this.renderPassLight.initialize(t,e,n),this.depthMaskPass.initialize(t,e,n),this.godRaysPass.initialize(t,e,n),n!==void 0&&(this.renderTargetA.texture.type=n,this.renderTargetB.texture.type=n,this.renderTargetLight.texture.type=n,pl(t)===Bn&&(qr(this.renderTargetA.texture,Bn),qr(this.renderTargetB.texture,Bn),qr(this.renderTargetLight.texture,Bn)))}},Bhe="uniform vec2 scale;uniform float lineWidth;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){float grid=0.5-max(abs(mod(uv.x*scale.x,1.0)-0.5),abs(mod(uv.y*scale.y,1.0)-0.5));outputColor=vec4(vec3(smoothstep(0.0,lineWidth,grid)),inputColor.a);}",Hhe=class extends Fi{constructor({blendFunction:t=Kt.OVERLAY,scale:e=1,lineWidth:n=0}={}){super("GridEffect",Bhe,{blendFunction:t,uniforms:new Map([["scale",new Me(new Ee)],["lineWidth",new Me(n)]])}),this.resolution=new Ee,this.s=0,this.scale=e,this.l=0,this.lineWidth=n}get scale(){return this.s}set scale(t){this.s=Math.max(t,1e-6),this.setSize(this.resolution.width,this.resolution.height)}getScale(){return this.scale}setScale(t){this.scale=t}get lineWidth(){return this.l}set lineWidth(t){this.l=t,this.setSize(this.resolution.width,this.resolution.height)}getLineWidth(){return this.lineWidth}setLineWidth(t){this.lineWidth=t}setSize(t,e){this.resolution.set(t,e);const n=t/e,r=this.scale*(e*.125);this.uniforms.get("scale").value.set(n*r,r),this.uniforms.get("lineWidth").value=r/e+this.lineWidth}};function aN(t,e,n){const r=document.createElement("canvas"),i=r.getContext("2d");if(r.width=t,r.height=e,n instanceof Image)i.drawImage(n,0,0);else{const o=i.createImageData(t,e);o.data.set(n),i.putImageData(o,0,0)}return r}var G$=class{constructor(t=0,e=0,n=null){this.width=t,this.height=e,this.data=n}toCanvas(){return typeof document>"u"?null:aN(this.width,this.height,this.data)}static from(t){const{width:e,height:n}=t;let r;if(t instanceof Image){const i=aN(e,n,t);i!==null&&(r=i.getContext("2d").getImageData(0,0,e,n).data)}else r=t.data;return new G$(e,n,r)}},Vhe=`"use strict";(()=>{var O={SCALE_UP:"lut.scaleup"};var _=[new Float32Array(3),new Float32Array(3)],n=[new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array(3)],Z=[[new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,0,1]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([1,0,1]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([0,1,1]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([0,1,1]),new Float32Array([1,1,1])]];function d(a,t,r,m){let i=r[0]-t[0],e=r[1]-t[1],y=r[2]-t[2],h=a[0]-t[0],A=a[1]-t[1],w=a[2]-t[2],c=e*w-y*A,l=y*h-i*w,x=i*A-e*h,u=Math.sqrt(c*c+l*l+x*x),b=u*.5,s=c/u,F=l/u,f=x/u,p=-(a[0]*s+a[1]*F+a[2]*f),M=m[0]*s+m[1]*F+m[2]*f;return Math.abs(M+p)*b/3}function V(a,t,r,m,i,e){let y=(r+m*t+i*t*t)*4;e[0]=a[y+0],e[1]=a[y+1],e[2]=a[y+2]}function k(a,t,r,m,i,e){let y=r*(t-1),h=m*(t-1),A=i*(t-1),w=Math.floor(y),c=Math.floor(h),l=Math.floor(A),x=Math.ceil(y),u=Math.ceil(h),b=Math.ceil(A),s=y-w,F=h-c,f=A-l;if(w===y&&c===h&&l===A)V(a,t,y,h,A,e);else{let p;s>=F&&F>=f?p=Z[0]:s>=f&&f>=F?p=Z[1]:f>=s&&s>=F?p=Z[2]:F>=s&&s>=f?p=Z[3]:F>=f&&f>=s?p=Z[4]:f>=F&&F>=s&&(p=Z[5]);let[M,g,X,Y]=p,P=_[0];P[0]=s,P[1]=F,P[2]=f;let o=_[1],L=x-w,S=u-c,U=b-l;o[0]=L*M[0]+w,o[1]=S*M[1]+c,o[2]=U*M[2]+l,V(a,t,o[0],o[1],o[2],n[0]),o[0]=L*g[0]+w,o[1]=S*g[1]+c,o[2]=U*g[2]+l,V(a,t,o[0],o[1],o[2],n[1]),o[0]=L*X[0]+w,o[1]=S*X[1]+c,o[2]=U*X[2]+l,V(a,t,o[0],o[1],o[2],n[2]),o[0]=L*Y[0]+w,o[1]=S*Y[1]+c,o[2]=U*Y[2]+l,V(a,t,o[0],o[1],o[2],n[3]);let T=d(g,X,Y,P)*6,q=d(M,X,Y,P)*6,C=d(M,g,Y,P)*6,E=d(M,g,X,P)*6;n[0][0]*=T,n[0][1]*=T,n[0][2]*=T,n[1][0]*=q,n[1][1]*=q,n[1][2]*=q,n[2][0]*=C,n[2][1]*=C,n[2][2]*=C,n[3][0]*=E,n[3][1]*=E,n[3][2]*=E,e[0]=n[0][0]+n[1][0]+n[2][0]+n[3][0],e[1]=n[0][1]+n[1][1]+n[2][1]+n[3][1],e[2]=n[0][2]+n[1][2]+n[2][2]+n[3][2]}}var v=class{static expand(t,r){let m=Math.cbrt(t.length/4),i=new Float32Array(3),e=new t.constructor(r**3*4),y=t instanceof Uint8Array?255:1,h=r**2,A=1/(r-1);for(let w=0;w{let t=a.data,r=t.data;switch(t.operation){case O.SCALE_UP:r=v.expand(r,t.size);break}postMessage(r,[r.buffer]),close()});})(); +`,lN=new lt,D_=class extends zu{constructor(t,e){super(t,e,e,e),this.type=Yn,this.format=Jn,this.minFilter=Dt,this.magFilter=Dt,this.wrapS=Xr,this.wrapT=Xr,this.wrapR=Xr,this.unpackAlignment=1,this.needsUpdate=!0,qr(this,oh),this.domainMin=new Z(0,0,0),this.domainMax=new Z(1,1,1)}get isLookupTexture3D(){return!0}scaleUp(t,e=!0){const n=this.image;let r;return t<=n.width?r=Promise.reject(new Error("The target size must be greater than the current size")):r=new Promise((i,o)=>{const s=URL.createObjectURL(new Blob([Vhe],{type:"text/javascript"})),a=new Worker(s);a.addEventListener("error",c=>o(c.error)),a.addEventListener("message",c=>{const u=new D_(c.data,t);lP(this,u),u.type=this.type,u.name=this.name,URL.revokeObjectURL(s),i(u)});const l=e?[n.data.buffer]:[];a.postMessage({operation:Yde.SCALE_UP,data:n.data,size:t},l)}),r}applyLUT(t){const e=this.image,n=t.image,r=Math.min(e.width,e.height,e.depth),i=Math.min(n.width,n.height,n.depth);if(r!==i)console.error("Size mismatch");else if(t.type!==Yn||this.type!==Yn)console.error("Both LUTs must be FloatType textures");else if(t.format!==Jn||this.format!==Jn)console.error("Both LUTs must be RGBA textures");else{const o=e.data,s=n.data,a=r,l=a**2,c=a-1;for(let u=0,d=a**3;ur){o=new Uint8Array(l.length);for(let c=0;cr.height?e.set("LUT_STRIP_HORIZONTAL","1"):t instanceof zu&&e.set("LUT_3D","1"),t instanceof D_){const o=t.domainMin,s=t.domainMax;(o.x!==0||o.y!==0||o.z!==0||s.x!==1||s.y!==1||s.z!==1)&&(e.set("CUSTOM_INPUT_DOMAIN","1"),n.get("domainMin").value=o.clone(),n.get("domainMax").value=s.clone())}this.tetrahedralInterpolation=i}}getLUT(){return this.lut}setLUT(t){this.lut=t}updateScaleOffset(){const t=this.lut;if(t!==null){const e=Math.min(t.image.width,t.image.height),n=this.uniforms.get("scale").value,r=this.uniforms.get("offset").value;if(this.tetrahedralInterpolation&&t instanceof zu)if(this.defines.has("CUSTOM_INPUT_DOMAIN")){const i=t.domainMax.clone().sub(t.domainMin);n.setScalar(e-1).divide(i),r.copy(t.domainMin).negate().multiply(n)}else n.setScalar(e-1),r.setScalar(0);else if(this.defines.has("CUSTOM_INPUT_DOMAIN")){const i=t.domainMax.clone().sub(t.domainMin).multiplyScalar(e);n.setScalar(e-1).divide(i),r.copy(t.domainMin).negate().multiply(n).addScalar(1/(2*e))}else n.setScalar((e-1)/e),r.setScalar(1/(2*e))}}configureTetrahedralInterpolation(){const t=this.lut;t!==null&&(t.minFilter=Dt,t.magFilter=Dt,this.tetrahedralInterpolation&&(t instanceof zu?(t.minFilter=Qt,t.magFilter=Qt):console.warn("Tetrahedral interpolation requires a 3D texture")),t.source===void 0&&(t.needsUpdate=!0))}get tetrahedralInterpolation(){return this.defines.has("TETRAHEDRAL_INTERPOLATION")}set tetrahedralInterpolation(t){t?this.defines.set("TETRAHEDRAL_INTERPOLATION","1"):this.defines.delete("TETRAHEDRAL_INTERPOLATION"),this.configureTetrahedralInterpolation(),this.updateScaleOffset(),this.setChanged()}setTetrahedralInterpolationEnabled(t){this.tetrahedralInterpolation=t}},$he=`uniform lowp sampler2D edgeTexture;uniform lowp sampler2D maskTexture;uniform vec3 visibleEdgeColor;uniform vec3 hiddenEdgeColor;uniform float pulse;uniform float edgeStrength; +outputColor=vec4(c,inputColor.a);}`,$he=class extends Fi{constructor(t,{blendFunction:e=Kt.SRC,tetrahedralInterpolation:n=!1,inputEncoding:r=Nn,inputColorSpace:i}={}){super("LUT3DEffect",jhe,{blendFunction:e,uniforms:new Map([["lut",new Me(null)],["scale",new Me(new Z)],["offset",new Me(new Z)],["domainMin",new Me(null)],["domainMax",new Me(null)]])}),this.tetrahedralInterpolation=n,this.inputColorSpace=i||B$.get(r),this.lut=t}get inputEncoding(){return this.inputColorSpace}set inputEncoding(t){this.inputColorSpace=t}getInputEncoding(){return this.inputColorSpace}setInputEncoding(t){this.inputColorSpace=t}getOutputEncoding(){return this.outputColorSpace}get lut(){return this.uniforms.get("lut").value}set lut(t){const e=this.defines,n=this.uniforms;if(this.lut!==t&&(n.get("lut").value=t,t!==null)){const r=t.image,i=this.tetrahedralInterpolation;if(e.clear(),e.set("LUT_SIZE",Math.min(r.width,r.height).toFixed(16)),e.set("LUT_TEXEL_WIDTH",(1/r.width).toFixed(16)),e.set("LUT_TEXEL_HEIGHT",(1/r.height).toFixed(16)),n.get("domainMin").value=null,n.get("domainMax").value=null,(t.type===Yn||t.type===yr)&&e.set("LUT_PRECISION_HIGH","1"),r.width>r.height?e.set("LUT_STRIP_HORIZONTAL","1"):t instanceof zu&&e.set("LUT_3D","1"),t instanceof D_){const o=t.domainMin,s=t.domainMax;(o.x!==0||o.y!==0||o.z!==0||s.x!==1||s.y!==1||s.z!==1)&&(e.set("CUSTOM_INPUT_DOMAIN","1"),n.get("domainMin").value=o.clone(),n.get("domainMax").value=s.clone())}this.tetrahedralInterpolation=i}}getLUT(){return this.lut}setLUT(t){this.lut=t}updateScaleOffset(){const t=this.lut;if(t!==null){const e=Math.min(t.image.width,t.image.height),n=this.uniforms.get("scale").value,r=this.uniforms.get("offset").value;if(this.tetrahedralInterpolation&&t instanceof zu)if(this.defines.has("CUSTOM_INPUT_DOMAIN")){const i=t.domainMax.clone().sub(t.domainMin);n.setScalar(e-1).divide(i),r.copy(t.domainMin).negate().multiply(n)}else n.setScalar(e-1),r.setScalar(0);else if(this.defines.has("CUSTOM_INPUT_DOMAIN")){const i=t.domainMax.clone().sub(t.domainMin).multiplyScalar(e);n.setScalar(e-1).divide(i),r.copy(t.domainMin).negate().multiply(n).addScalar(1/(2*e))}else n.setScalar((e-1)/e),r.setScalar(1/(2*e))}}configureTetrahedralInterpolation(){const t=this.lut;t!==null&&(t.minFilter=Dt,t.magFilter=Dt,this.tetrahedralInterpolation&&(t instanceof zu?(t.minFilter=Qt,t.magFilter=Qt):console.warn("Tetrahedral interpolation requires a 3D texture")),t.source===void 0&&(t.needsUpdate=!0))}get tetrahedralInterpolation(){return this.defines.has("TETRAHEDRAL_INTERPOLATION")}set tetrahedralInterpolation(t){t?this.defines.set("TETRAHEDRAL_INTERPOLATION","1"):this.defines.delete("TETRAHEDRAL_INTERPOLATION"),this.configureTetrahedralInterpolation(),this.updateScaleOffset(),this.setChanged()}setTetrahedralInterpolationEnabled(t){this.tetrahedralInterpolation=t}},Ghe=`uniform lowp sampler2D edgeTexture;uniform lowp sampler2D maskTexture;uniform vec3 visibleEdgeColor;uniform vec3 hiddenEdgeColor;uniform float pulse;uniform float edgeStrength; #ifdef USE_PATTERN uniform lowp sampler2D patternTexture;varying vec2 vUvPattern; #endif @@ -4511,7 +4511,7 @@ outputColor=vec4(color,alpha); #else outputColor=vec4(color,max(alpha,inputColor.a)); #endif -}`,Ghe="uniform float patternScale;varying vec2 vUvPattern;void mainSupport(const in vec2 uv){vUvPattern=uv*vec2(aspect,1.0)*patternScale;}",Whe=class extends Fi{constructor(t,e,{blendFunction:n=Kt.SCREEN,patternTexture:r=null,patternScale:i=1,edgeStrength:o=1,pulseSpeed:s=0,visibleEdgeColor:a=16777215,hiddenEdgeColor:l=2230538,kernelSize:c=ld.VERY_SMALL,blur:u=!1,xRay:d=!0,multisampling:f=0,resolutionScale:h=.5,width:g=Vn.AUTO_SIZE,height:y=Vn.AUTO_SIZE,resolutionX:_=g,resolutionY:v=y}={}){super("OutlineEffect",$he,{uniforms:new Map([["maskTexture",new Me(null)],["edgeTexture",new Me(null)],["edgeStrength",new Me(o)],["visibleEdgeColor",new Me(new lt(a))],["hiddenEdgeColor",new Me(new lt(l))],["pulse",new Me(1)],["patternScale",new Me(i)],["patternTexture",new Me(null)]])}),this.blendMode.addEventListener("change",E=>{this.blendMode.blendFunction===Kt.ALPHA?this.defines.set("ALPHA","1"):this.defines.delete("ALPHA"),this.setChanged()}),this.blendMode.blendFunction=n,this.patternTexture=r,this.xRay=d,this.scene=t,this.camera=e,this.renderTargetMask=new gn(1,1),this.renderTargetMask.samples=f,this.renderTargetMask.texture.name="Outline.Mask",this.uniforms.get("maskTexture").value=this.renderTargetMask.texture,this.renderTargetOutline=new gn(1,1,{depthBuffer:!1}),this.renderTargetOutline.texture.name="Outline.Edges",this.uniforms.get("edgeTexture").value=this.renderTargetOutline.texture,this.clearPass=new jg,this.clearPass.overrideClearColor=new lt(0),this.clearPass.overrideClearAlpha=1,this.depthPass=new BR(t,e),this.maskPass=new Eh(t,e,new efe(this.depthPass.texture,e));const x=this.maskPass.clearPass;x.overrideClearColor=new lt(16777215),x.overrideClearAlpha=1,this.blurPass=new zS({resolutionScale:h,resolutionX:_,resolutionY:v,kernelSize:c}),this.blurPass.enabled=u;const w=this.blurPass.resolution;w.addEventListener("change",E=>this.setSize(w.baseWidth,w.baseHeight)),this.outlinePass=new Os(new Sfe);const S=this.outlinePass.fullscreenMaterial;S.inputBuffer=this.renderTargetMask.texture,this.time=0,this.active=!1,this.selection=new HR,this.selection.layer=10,this.pulseSpeed=s}set mainScene(t){this.scene=t,this.depthPass.mainScene=t,this.maskPass.mainScene=t}set mainCamera(t){this.camera=t,this.depthPass.mainCamera=t,this.maskPass.mainCamera=t,this.maskPass.overrideMaterial.copyCameraSettings(t)}get resolution(){return this.blurPass.resolution}getResolution(){return this.blurPass.getResolution()}get multisampling(){return this.renderTargetMask.samples}set multisampling(t){this.renderTargetMask.samples=t,this.renderTargetMask.dispose()}get patternScale(){return this.uniforms.get("patternScale").value}set patternScale(t){this.uniforms.get("patternScale").value=t}get edgeStrength(){return this.uniforms.get("edgeStrength").value}set edgeStrength(t){this.uniforms.get("edgeStrength").value=t}get visibleEdgeColor(){return this.uniforms.get("visibleEdgeColor").value}set visibleEdgeColor(t){this.uniforms.get("visibleEdgeColor").value=t}get hiddenEdgeColor(){return this.uniforms.get("hiddenEdgeColor").value}set hiddenEdgeColor(t){this.uniforms.get("hiddenEdgeColor").value=t}getBlurPass(){return this.blurPass}getSelection(){return this.selection}getPulseSpeed(){return this.pulseSpeed}setPulseSpeed(t){this.pulseSpeed=t}get width(){return this.resolution.width}set width(t){this.resolution.preferredWidth=t}get height(){return this.resolution.height}set height(t){this.resolution.preferredHeight=t}get selectionLayer(){return this.selection.layer}set selectionLayer(t){this.selection.layer=t}get dithering(){return this.blurPass.dithering}set dithering(t){this.blurPass.dithering=t}get kernelSize(){return this.blurPass.kernelSize}set kernelSize(t){this.blurPass.kernelSize=t}get blur(){return this.blurPass.enabled}set blur(t){this.blurPass.enabled=t}get xRay(){return this.defines.has("X_RAY")}set xRay(t){this.xRay!==t&&(t?this.defines.set("X_RAY","1"):this.defines.delete("X_RAY"),this.setChanged())}isXRayEnabled(){return this.xRay}setXRayEnabled(t){this.xRay=t}get patternTexture(){return this.uniforms.get("patternTexture").value}set patternTexture(t){t!==null?(t.wrapS=t.wrapT=Ro,this.defines.set("USE_PATTERN","1"),this.setVertexShader(Ghe)):(this.defines.delete("USE_PATTERN"),this.setVertexShader(null)),this.uniforms.get("patternTexture").value=t,this.setChanged()}setPatternTexture(t){this.patternTexture=t}getResolutionScale(){return this.resolution.scale}setResolutionScale(t){this.resolution.scale=t}setSelection(t){return this.selection.set(t),this}clearSelection(){return this.selection.clear(),this}selectObject(t){return this.selection.add(t),this}deselectObject(t){return this.selection.delete(t),this}update(t,e,n){const r=this.scene,i=this.camera,o=this.selection,a=this.uniforms.get("pulse"),l=r.background,c=i.layers.mask;o.size>0?(r.background=null,a.value=1,this.pulseSpeed>0&&(a.value=Math.cos(this.time*this.pulseSpeed*10)*.375+.625),this.active=!0,this.time+=n,o.setVisible(!1),this.depthPass.render(t),o.setVisible(!0),i.layers.set(o.layer),this.maskPass.render(t,this.renderTargetMask),i.layers.mask=c,r.background=l,this.outlinePass.render(t,null,this.renderTargetOutline),this.blurPass.enabled&&this.blurPass.render(t,this.renderTargetOutline,this.renderTargetOutline)):this.active&&(this.clearPass.render(t,this.renderTargetOutline),this.active=!1)}setSize(t,e){this.blurPass.setSize(t,e),this.renderTargetMask.setSize(t,e);const n=this.resolution;n.setBaseSize(t,e);const r=n.width,i=n.height;this.depthPass.setSize(r,i),this.renderTargetOutline.setSize(r,i),this.outlinePass.fullscreenMaterial.setSize(r,i)}initialize(t,e,n){this.blurPass.initialize(t,e,nr),n!==void 0&&(this.depthPass.initialize(t,e,n),this.maskPass.initialize(t,e,n),this.outlinePass.initialize(t,e,n))}},Yhe="uniform bool active;uniform vec4 d;void mainUv(inout vec2 uv){if(active){uv=d.xy*(floor(uv*d.zw)+0.5);}}",Xhe=class extends Fi{constructor(t=30){super("PixelationEffect",Yhe,{uniforms:new Map([["active",new Me(!1)],["d",new Me(new an)]])}),this.resolution=new Ee,this._granularity=0,this.granularity=t}get granularity(){return this._granularity}set granularity(t){let e=Math.floor(t);e%2>0&&(e+=1),this._granularity=e,this.uniforms.get("active").value=e>0,this.setSize(this.resolution.width,this.resolution.height)}getGranularity(){return this.granularity}setGranularity(t){this.granularity=t}setSize(t,e){const n=this.resolution;n.set(t,e);const r=this.granularity,i=r/n.x,o=r/n.y;this.uniforms.get("d").value.set(i,o,1/i,1/o)}};new Z;new Z;var Zhe=class extends Phe{constructor(t,e,n){super(n),this.setAttributes(this.getAttributes()|as.DEPTH),this.camera=e,this.depthPass=new BR(t,e),this.clearPass=new jg(!0,!1,!1),this.clearPass.overrideClearColor=new lt(0),this.depthMaskPass=new Os(new H$);const r=this.depthMaskMaterial;r.copyCameraSettings(e),r.depthBuffer1=this.depthPass.texture,r.depthPacking1=Ra,r.depthMode=Wm,this.renderTargetMasked=new gn(1,1,{depthBuffer:!1}),this.renderTargetMasked.texture.name="Bloom.Masked",this.selection=new HR,this.selection.layer=11,this._inverted=!1,this._ignoreBackground=!1}set mainScene(t){this.depthPass.mainScene=t}set mainCamera(t){this.camera=t,this.depthPass.mainCamera=t,this.depthMaskMaterial.copyCameraSettings(t)}getSelection(){return this.selection}get depthMaskMaterial(){return this.depthMaskPass.fullscreenMaterial}get inverted(){return this._inverted}set inverted(t){this._inverted=t,this.depthMaskMaterial.depthMode=t?pS:Wm}isInverted(){return this.inverted}setInverted(t){this.inverted=t}get ignoreBackground(){return this._ignoreBackground}set ignoreBackground(t){this._ignoreBackground=t,this.depthMaskMaterial.maxDepthStrategy=t?ym.DISCARD_MAX_DEPTH:ym.KEEP_MAX_DEPTH}isBackgroundDisabled(){return this.ignoreBackground}setBackgroundDisabled(t){this.ignoreBackground=t}setDepthTexture(t,e=di){this.depthMaskMaterial.depthBuffer0=t,this.depthMaskMaterial.depthPacking0=e}update(t,e,n){const r=this.camera,i=this.selection,o=this.inverted;let s=e;if(this.ignoreBackground||!o||i.size>0){const a=r.layers.mask;r.layers.set(i.layer),this.depthPass.render(t),r.layers.mask=a,s=this.renderTargetMasked,this.clearPass.render(t,s),this.depthMaskPass.render(t,e,s)}super.update(t,s,n)}setSize(t,e){super.setSize(t,e),this.renderTargetMasked.setSize(t,e),this.depthPass.setSize(t,e)}initialize(t,e,n){super.initialize(t,e,n),this.clearPass.initialize(t,e,n),this.depthPass.initialize(t,e,n),this.depthMaskPass.initialize(t,e,n),t.capabilities.logarithmicDepthBuffer&&(this.depthMaskPass.fullscreenMaterial.defines.LOG_DEPTH="1"),n!==void 0&&(this.renderTargetMasked.texture.type=n,pl(t)===Bn&&qr(this.renderTargetMasked.texture,Bn))}},qhe=`uniform lowp sampler2D aoBuffer;uniform float luminanceInfluence;uniform float intensity; +}`,Whe="uniform float patternScale;varying vec2 vUvPattern;void mainSupport(const in vec2 uv){vUvPattern=uv*vec2(aspect,1.0)*patternScale;}",Yhe=class extends Fi{constructor(t,e,{blendFunction:n=Kt.SCREEN,patternTexture:r=null,patternScale:i=1,edgeStrength:o=1,pulseSpeed:s=0,visibleEdgeColor:a=16777215,hiddenEdgeColor:l=2230538,kernelSize:c=ld.VERY_SMALL,blur:u=!1,xRay:d=!0,multisampling:f=0,resolutionScale:h=.5,width:g=Vn.AUTO_SIZE,height:y=Vn.AUTO_SIZE,resolutionX:_=g,resolutionY:v=y}={}){super("OutlineEffect",Ghe,{uniforms:new Map([["maskTexture",new Me(null)],["edgeTexture",new Me(null)],["edgeStrength",new Me(o)],["visibleEdgeColor",new Me(new lt(a))],["hiddenEdgeColor",new Me(new lt(l))],["pulse",new Me(1)],["patternScale",new Me(i)],["patternTexture",new Me(null)]])}),this.blendMode.addEventListener("change",E=>{this.blendMode.blendFunction===Kt.ALPHA?this.defines.set("ALPHA","1"):this.defines.delete("ALPHA"),this.setChanged()}),this.blendMode.blendFunction=n,this.patternTexture=r,this.xRay=d,this.scene=t,this.camera=e,this.renderTargetMask=new gn(1,1),this.renderTargetMask.samples=f,this.renderTargetMask.texture.name="Outline.Mask",this.uniforms.get("maskTexture").value=this.renderTargetMask.texture,this.renderTargetOutline=new gn(1,1,{depthBuffer:!1}),this.renderTargetOutline.texture.name="Outline.Edges",this.uniforms.get("edgeTexture").value=this.renderTargetOutline.texture,this.clearPass=new jg,this.clearPass.overrideClearColor=new lt(0),this.clearPass.overrideClearAlpha=1,this.depthPass=new BR(t,e),this.maskPass=new Eh(t,e,new tfe(this.depthPass.texture,e));const x=this.maskPass.clearPass;x.overrideClearColor=new lt(16777215),x.overrideClearAlpha=1,this.blurPass=new zS({resolutionScale:h,resolutionX:_,resolutionY:v,kernelSize:c}),this.blurPass.enabled=u;const w=this.blurPass.resolution;w.addEventListener("change",E=>this.setSize(w.baseWidth,w.baseHeight)),this.outlinePass=new Os(new bfe);const S=this.outlinePass.fullscreenMaterial;S.inputBuffer=this.renderTargetMask.texture,this.time=0,this.active=!1,this.selection=new HR,this.selection.layer=10,this.pulseSpeed=s}set mainScene(t){this.scene=t,this.depthPass.mainScene=t,this.maskPass.mainScene=t}set mainCamera(t){this.camera=t,this.depthPass.mainCamera=t,this.maskPass.mainCamera=t,this.maskPass.overrideMaterial.copyCameraSettings(t)}get resolution(){return this.blurPass.resolution}getResolution(){return this.blurPass.getResolution()}get multisampling(){return this.renderTargetMask.samples}set multisampling(t){this.renderTargetMask.samples=t,this.renderTargetMask.dispose()}get patternScale(){return this.uniforms.get("patternScale").value}set patternScale(t){this.uniforms.get("patternScale").value=t}get edgeStrength(){return this.uniforms.get("edgeStrength").value}set edgeStrength(t){this.uniforms.get("edgeStrength").value=t}get visibleEdgeColor(){return this.uniforms.get("visibleEdgeColor").value}set visibleEdgeColor(t){this.uniforms.get("visibleEdgeColor").value=t}get hiddenEdgeColor(){return this.uniforms.get("hiddenEdgeColor").value}set hiddenEdgeColor(t){this.uniforms.get("hiddenEdgeColor").value=t}getBlurPass(){return this.blurPass}getSelection(){return this.selection}getPulseSpeed(){return this.pulseSpeed}setPulseSpeed(t){this.pulseSpeed=t}get width(){return this.resolution.width}set width(t){this.resolution.preferredWidth=t}get height(){return this.resolution.height}set height(t){this.resolution.preferredHeight=t}get selectionLayer(){return this.selection.layer}set selectionLayer(t){this.selection.layer=t}get dithering(){return this.blurPass.dithering}set dithering(t){this.blurPass.dithering=t}get kernelSize(){return this.blurPass.kernelSize}set kernelSize(t){this.blurPass.kernelSize=t}get blur(){return this.blurPass.enabled}set blur(t){this.blurPass.enabled=t}get xRay(){return this.defines.has("X_RAY")}set xRay(t){this.xRay!==t&&(t?this.defines.set("X_RAY","1"):this.defines.delete("X_RAY"),this.setChanged())}isXRayEnabled(){return this.xRay}setXRayEnabled(t){this.xRay=t}get patternTexture(){return this.uniforms.get("patternTexture").value}set patternTexture(t){t!==null?(t.wrapS=t.wrapT=Ro,this.defines.set("USE_PATTERN","1"),this.setVertexShader(Whe)):(this.defines.delete("USE_PATTERN"),this.setVertexShader(null)),this.uniforms.get("patternTexture").value=t,this.setChanged()}setPatternTexture(t){this.patternTexture=t}getResolutionScale(){return this.resolution.scale}setResolutionScale(t){this.resolution.scale=t}setSelection(t){return this.selection.set(t),this}clearSelection(){return this.selection.clear(),this}selectObject(t){return this.selection.add(t),this}deselectObject(t){return this.selection.delete(t),this}update(t,e,n){const r=this.scene,i=this.camera,o=this.selection,a=this.uniforms.get("pulse"),l=r.background,c=i.layers.mask;o.size>0?(r.background=null,a.value=1,this.pulseSpeed>0&&(a.value=Math.cos(this.time*this.pulseSpeed*10)*.375+.625),this.active=!0,this.time+=n,o.setVisible(!1),this.depthPass.render(t),o.setVisible(!0),i.layers.set(o.layer),this.maskPass.render(t,this.renderTargetMask),i.layers.mask=c,r.background=l,this.outlinePass.render(t,null,this.renderTargetOutline),this.blurPass.enabled&&this.blurPass.render(t,this.renderTargetOutline,this.renderTargetOutline)):this.active&&(this.clearPass.render(t,this.renderTargetOutline),this.active=!1)}setSize(t,e){this.blurPass.setSize(t,e),this.renderTargetMask.setSize(t,e);const n=this.resolution;n.setBaseSize(t,e);const r=n.width,i=n.height;this.depthPass.setSize(r,i),this.renderTargetOutline.setSize(r,i),this.outlinePass.fullscreenMaterial.setSize(r,i)}initialize(t,e,n){this.blurPass.initialize(t,e,nr),n!==void 0&&(this.depthPass.initialize(t,e,n),this.maskPass.initialize(t,e,n),this.outlinePass.initialize(t,e,n))}},Xhe="uniform bool active;uniform vec4 d;void mainUv(inout vec2 uv){if(active){uv=d.xy*(floor(uv*d.zw)+0.5);}}",Zhe=class extends Fi{constructor(t=30){super("PixelationEffect",Xhe,{uniforms:new Map([["active",new Me(!1)],["d",new Me(new an)]])}),this.resolution=new Ee,this._granularity=0,this.granularity=t}get granularity(){return this._granularity}set granularity(t){let e=Math.floor(t);e%2>0&&(e+=1),this._granularity=e,this.uniforms.get("active").value=e>0,this.setSize(this.resolution.width,this.resolution.height)}getGranularity(){return this.granularity}setGranularity(t){this.granularity=t}setSize(t,e){const n=this.resolution;n.set(t,e);const r=this.granularity,i=r/n.x,o=r/n.y;this.uniforms.get("d").value.set(i,o,1/i,1/o)}};new Z;new Z;var qhe=class extends Che{constructor(t,e,n){super(n),this.setAttributes(this.getAttributes()|as.DEPTH),this.camera=e,this.depthPass=new BR(t,e),this.clearPass=new jg(!0,!1,!1),this.clearPass.overrideClearColor=new lt(0),this.depthMaskPass=new Os(new V$);const r=this.depthMaskMaterial;r.copyCameraSettings(e),r.depthBuffer1=this.depthPass.texture,r.depthPacking1=Ra,r.depthMode=Wm,this.renderTargetMasked=new gn(1,1,{depthBuffer:!1}),this.renderTargetMasked.texture.name="Bloom.Masked",this.selection=new HR,this.selection.layer=11,this._inverted=!1,this._ignoreBackground=!1}set mainScene(t){this.depthPass.mainScene=t}set mainCamera(t){this.camera=t,this.depthPass.mainCamera=t,this.depthMaskMaterial.copyCameraSettings(t)}getSelection(){return this.selection}get depthMaskMaterial(){return this.depthMaskPass.fullscreenMaterial}get inverted(){return this._inverted}set inverted(t){this._inverted=t,this.depthMaskMaterial.depthMode=t?pS:Wm}isInverted(){return this.inverted}setInverted(t){this.inverted=t}get ignoreBackground(){return this._ignoreBackground}set ignoreBackground(t){this._ignoreBackground=t,this.depthMaskMaterial.maxDepthStrategy=t?ym.DISCARD_MAX_DEPTH:ym.KEEP_MAX_DEPTH}isBackgroundDisabled(){return this.ignoreBackground}setBackgroundDisabled(t){this.ignoreBackground=t}setDepthTexture(t,e=di){this.depthMaskMaterial.depthBuffer0=t,this.depthMaskMaterial.depthPacking0=e}update(t,e,n){const r=this.camera,i=this.selection,o=this.inverted;let s=e;if(this.ignoreBackground||!o||i.size>0){const a=r.layers.mask;r.layers.set(i.layer),this.depthPass.render(t),r.layers.mask=a,s=this.renderTargetMasked,this.clearPass.render(t,s),this.depthMaskPass.render(t,e,s)}super.update(t,s,n)}setSize(t,e){super.setSize(t,e),this.renderTargetMasked.setSize(t,e),this.depthPass.setSize(t,e)}initialize(t,e,n){super.initialize(t,e,n),this.clearPass.initialize(t,e,n),this.depthPass.initialize(t,e,n),this.depthMaskPass.initialize(t,e,n),t.capabilities.logarithmicDepthBuffer&&(this.depthMaskPass.fullscreenMaterial.defines.LOG_DEPTH="1"),n!==void 0&&(this.renderTargetMasked.texture.type=n,pl(t)===Bn&&qr(this.renderTargetMasked.texture,Bn))}},Khe=`uniform lowp sampler2D aoBuffer;uniform float luminanceInfluence;uniform float intensity; #if THREE_REVISION < 143 #define luminance(v) linearToRelativeLuminance(v) #endif @@ -4537,7 +4537,7 @@ outputColor=vec4(1.0-ao*(1.0-color),inputColor.a); #else outputColor=vec4(vec3(1.0-ao),inputColor.a); #endif -}`,cN=64,Khe=class extends Fi{constructor(t,e,{blendFunction:n=Kt.MULTIPLY,samples:r=9,rings:i=7,normalDepthBuffer:o=null,depthAwareUpsampling:s=!0,worldDistanceThreshold:a,worldDistanceFalloff:l,worldProximityThreshold:c,worldProximityFalloff:u,distanceThreshold:d=.97,distanceFalloff:f=.03,rangeThreshold:h=5e-4,rangeFalloff:g=.001,minRadiusScale:y=.1,luminanceInfluence:_=.7,radius:v=.1825,intensity:x=1,bias:w=.025,fade:S=.01,color:E=null,resolutionScale:C=1,width:O=Vn.AUTO_SIZE,height:R=Vn.AUTO_SIZE,resolutionX:T=O,resolutionY:A=R}={}){super("SSAOEffect",qhe,{blendFunction:n,attributes:as.DEPTH,defines:new Map([["THRESHOLD","0.997"]]),uniforms:new Map([["aoBuffer",new Me(null)],["normalDepthBuffer",new Me(o)],["luminanceInfluence",new Me(_)],["color",new Me(null)],["intensity",new Me(x)],["scale",new Me(0)]])}),this.renderTarget=new gn(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="AO.Target",this.uniforms.get("aoBuffer").value=this.renderTarget.texture;const F=this.resolution=new Vn(this,T,A,C);F.addEventListener("change",k=>this.setSize(F.baseWidth,F.baseHeight)),this.camera=t,this.depthDownsamplingPass=new j$({normalBuffer:e,resolutionScale:C}),this.depthDownsamplingPass.enabled=o===null,this.ssaoPass=new Os(new Efe(t));const N=new q2(cN,cN,Jn);N.wrapS=N.wrapT=Ro;const U=this.ssaoMaterial;U.normalBuffer=e,U.noiseTexture=N,U.minRadiusScale=y,U.samples=r,U.radius=v,U.rings=i,U.fade=S,U.bias=w,U.distanceThreshold=d,U.distanceFalloff=f,U.proximityThreshold=h,U.proximityFalloff=g,a!==void 0&&(U.worldDistanceThreshold=a),l!==void 0&&(U.worldDistanceFalloff=l),c!==void 0&&(U.worldProximityThreshold=c),u!==void 0&&(U.worldProximityFalloff=u),o!==null&&(this.ssaoMaterial.normalDepthBuffer=o,this.defines.set("NORMAL_DEPTH","1")),this.depthAwareUpsampling=s,this.color=E}set mainCamera(t){this.camera=t,this.ssaoMaterial.copyCameraSettings(t)}get normalBuffer(){return this.ssaoMaterial.normalBuffer}set normalBuffer(t){this.ssaoMaterial.normalBuffer=t,this.depthDownsamplingPass.fullscreenMaterial.normalBuffer=t}getResolution(){return this.resolution}get ssaoMaterial(){return this.ssaoPass.fullscreenMaterial}getSSAOMaterial(){return this.ssaoMaterial}get samples(){return this.ssaoMaterial.samples}set samples(t){this.ssaoMaterial.samples=t}get rings(){return this.ssaoMaterial.rings}set rings(t){this.ssaoMaterial.rings=t}get radius(){return this.ssaoMaterial.radius}set radius(t){this.ssaoMaterial.radius=t}get depthAwareUpsampling(){return this.defines.has("DEPTH_AWARE_UPSAMPLING")}set depthAwareUpsampling(t){this.depthAwareUpsampling!==t&&(t?this.defines.set("DEPTH_AWARE_UPSAMPLING","1"):this.defines.delete("DEPTH_AWARE_UPSAMPLING"),this.setChanged())}isDepthAwareUpsamplingEnabled(){return this.depthAwareUpsampling}setDepthAwareUpsamplingEnabled(t){this.depthAwareUpsampling=t}get distanceScaling(){return!0}set distanceScaling(t){}get color(){return this.uniforms.get("color").value}set color(t){const e=this.uniforms,n=this.defines;t!==null?n.has("COLORIZE")?e.get("color").value.set(t):(n.set("COLORIZE","1"),e.get("color").value=new lt(t),this.setChanged()):n.has("COLORIZE")&&(n.delete("COLORIZE"),e.get("color").value=null,this.setChanged())}get luminanceInfluence(){return this.uniforms.get("luminanceInfluence").value}set luminanceInfluence(t){this.uniforms.get("luminanceInfluence").value=t}get intensity(){return this.uniforms.get("intensity").value}set intensity(t){this.uniforms.get("intensity").value=t}getColor(){return this.color}setColor(t){this.color=t}setDistanceCutoff(t,e){this.ssaoMaterial.distanceThreshold=t,this.ssaoMaterial.distanceFalloff=e}setProximityCutoff(t,e){this.ssaoMaterial.proximityThreshold=t,this.ssaoMaterial.proximityFalloff=e}setDepthTexture(t,e=di){this.depthDownsamplingPass.setDepthTexture(t,e),this.ssaoMaterial.depthBuffer=t,this.ssaoMaterial.depthPacking=e}update(t,e,n){const r=this.renderTarget;this.depthDownsamplingPass.enabled&&this.depthDownsamplingPass.render(t),this.ssaoPass.render(t,null,r)}setSize(t,e){const n=this.resolution;n.setBaseSize(t,e);const r=n.width,i=n.height;this.ssaoMaterial.copyCameraSettings(this.camera),this.ssaoMaterial.setSize(r,i),this.renderTarget.setSize(r,i),this.depthDownsamplingPass.resolution.scale=n.scale,this.depthDownsamplingPass.setSize(t,e)}initialize(t,e,n){try{let r=this.uniforms.get("normalDepthBuffer").value;r===null&&(this.depthDownsamplingPass.initialize(t,e,n),r=this.depthDownsamplingPass.texture,this.uniforms.get("normalDepthBuffer").value=r,this.ssaoMaterial.normalDepthBuffer=r,this.defines.set("NORMAL_DEPTH","1"))}catch{this.depthDownsamplingPass.enabled=!1}}},Qhe=`#ifdef TEXTURE_PRECISION_HIGH +}`,cN=64,Qhe=class extends Fi{constructor(t,e,{blendFunction:n=Kt.MULTIPLY,samples:r=9,rings:i=7,normalDepthBuffer:o=null,depthAwareUpsampling:s=!0,worldDistanceThreshold:a,worldDistanceFalloff:l,worldProximityThreshold:c,worldProximityFalloff:u,distanceThreshold:d=.97,distanceFalloff:f=.03,rangeThreshold:h=5e-4,rangeFalloff:g=.001,minRadiusScale:y=.1,luminanceInfluence:_=.7,radius:v=.1825,intensity:x=1,bias:w=.025,fade:S=.01,color:E=null,resolutionScale:C=1,width:O=Vn.AUTO_SIZE,height:R=Vn.AUTO_SIZE,resolutionX:T=O,resolutionY:A=R}={}){super("SSAOEffect",Khe,{blendFunction:n,attributes:as.DEPTH,defines:new Map([["THRESHOLD","0.997"]]),uniforms:new Map([["aoBuffer",new Me(null)],["normalDepthBuffer",new Me(o)],["luminanceInfluence",new Me(_)],["color",new Me(null)],["intensity",new Me(x)],["scale",new Me(0)]])}),this.renderTarget=new gn(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="AO.Target",this.uniforms.get("aoBuffer").value=this.renderTarget.texture;const F=this.resolution=new Vn(this,T,A,C);F.addEventListener("change",k=>this.setSize(F.baseWidth,F.baseHeight)),this.camera=t,this.depthDownsamplingPass=new $$({normalBuffer:e,resolutionScale:C}),this.depthDownsamplingPass.enabled=o===null,this.ssaoPass=new Os(new Pfe(t));const N=new K2(cN,cN,Jn);N.wrapS=N.wrapT=Ro;const U=this.ssaoMaterial;U.normalBuffer=e,U.noiseTexture=N,U.minRadiusScale=y,U.samples=r,U.radius=v,U.rings=i,U.fade=S,U.bias=w,U.distanceThreshold=d,U.distanceFalloff=f,U.proximityThreshold=h,U.proximityFalloff=g,a!==void 0&&(U.worldDistanceThreshold=a),l!==void 0&&(U.worldDistanceFalloff=l),c!==void 0&&(U.worldProximityThreshold=c),u!==void 0&&(U.worldProximityFalloff=u),o!==null&&(this.ssaoMaterial.normalDepthBuffer=o,this.defines.set("NORMAL_DEPTH","1")),this.depthAwareUpsampling=s,this.color=E}set mainCamera(t){this.camera=t,this.ssaoMaterial.copyCameraSettings(t)}get normalBuffer(){return this.ssaoMaterial.normalBuffer}set normalBuffer(t){this.ssaoMaterial.normalBuffer=t,this.depthDownsamplingPass.fullscreenMaterial.normalBuffer=t}getResolution(){return this.resolution}get ssaoMaterial(){return this.ssaoPass.fullscreenMaterial}getSSAOMaterial(){return this.ssaoMaterial}get samples(){return this.ssaoMaterial.samples}set samples(t){this.ssaoMaterial.samples=t}get rings(){return this.ssaoMaterial.rings}set rings(t){this.ssaoMaterial.rings=t}get radius(){return this.ssaoMaterial.radius}set radius(t){this.ssaoMaterial.radius=t}get depthAwareUpsampling(){return this.defines.has("DEPTH_AWARE_UPSAMPLING")}set depthAwareUpsampling(t){this.depthAwareUpsampling!==t&&(t?this.defines.set("DEPTH_AWARE_UPSAMPLING","1"):this.defines.delete("DEPTH_AWARE_UPSAMPLING"),this.setChanged())}isDepthAwareUpsamplingEnabled(){return this.depthAwareUpsampling}setDepthAwareUpsamplingEnabled(t){this.depthAwareUpsampling=t}get distanceScaling(){return!0}set distanceScaling(t){}get color(){return this.uniforms.get("color").value}set color(t){const e=this.uniforms,n=this.defines;t!==null?n.has("COLORIZE")?e.get("color").value.set(t):(n.set("COLORIZE","1"),e.get("color").value=new lt(t),this.setChanged()):n.has("COLORIZE")&&(n.delete("COLORIZE"),e.get("color").value=null,this.setChanged())}get luminanceInfluence(){return this.uniforms.get("luminanceInfluence").value}set luminanceInfluence(t){this.uniforms.get("luminanceInfluence").value=t}get intensity(){return this.uniforms.get("intensity").value}set intensity(t){this.uniforms.get("intensity").value=t}getColor(){return this.color}setColor(t){this.color=t}setDistanceCutoff(t,e){this.ssaoMaterial.distanceThreshold=t,this.ssaoMaterial.distanceFalloff=e}setProximityCutoff(t,e){this.ssaoMaterial.proximityThreshold=t,this.ssaoMaterial.proximityFalloff=e}setDepthTexture(t,e=di){this.depthDownsamplingPass.setDepthTexture(t,e),this.ssaoMaterial.depthBuffer=t,this.ssaoMaterial.depthPacking=e}update(t,e,n){const r=this.renderTarget;this.depthDownsamplingPass.enabled&&this.depthDownsamplingPass.render(t),this.ssaoPass.render(t,null,r)}setSize(t,e){const n=this.resolution;n.setBaseSize(t,e);const r=n.width,i=n.height;this.ssaoMaterial.copyCameraSettings(this.camera),this.ssaoMaterial.setSize(r,i),this.renderTarget.setSize(r,i),this.depthDownsamplingPass.resolution.scale=n.scale,this.depthDownsamplingPass.setSize(t,e)}initialize(t,e,n){try{let r=this.uniforms.get("normalDepthBuffer").value;r===null&&(this.depthDownsamplingPass.initialize(t,e,n),r=this.depthDownsamplingPass.texture,this.uniforms.get("normalDepthBuffer").value=r,this.ssaoMaterial.normalDepthBuffer=r,this.defines.set("NORMAL_DEPTH","1"))}catch{this.depthDownsamplingPass.enabled=!1}}},Jhe=`#ifdef TEXTURE_PRECISION_HIGH uniform mediump sampler2D map; #else uniform lowp sampler2D map; @@ -4548,7 +4548,7 @@ vec4 texel=texture2D(map,vUv2); #else vec4 texel=texture2D(map,uv); #endif -outputColor=TEXEL;}`,Jhe=`#ifdef ASPECT_CORRECTION +outputColor=TEXEL;}`,epe=`#ifdef ASPECT_CORRECTION uniform float scale; #else uniform mat3 uvTransform; @@ -4559,9 +4559,9 @@ vUv2=uv*vec2(aspect,1.0)*scale; #else vUv2=(uvTransform*vec3(uv,1.0)).xy; #endif -}`,epe=class extends Fi{constructor({blendFunction:t,texture:e=null,aspectCorrection:n=!1}={}){super("TextureEffect",Qhe,{blendFunction:t,defines:new Map([["TEXEL","texel"]]),uniforms:new Map([["map",new Me(null)],["scale",new Me(1)],["uvTransform",new Me(null)]])}),this.texture=e,this.aspectCorrection=n}get texture(){return this.uniforms.get("map").value}set texture(t){const e=this.texture,n=this.uniforms,r=this.defines;e!==t&&(n.get("map").value=t,n.get("uvTransform").value=t.matrix,r.delete("TEXTURE_PRECISION_HIGH"),t!==null&&(t.matrixAutoUpdate?(r.set("UV_TRANSFORM","1"),this.setVertexShader(Jhe)):(r.delete("UV_TRANSFORM"),this.setVertexShader(null)),t.type!==nr&&r.set("TEXTURE_PRECISION_HIGH","1"),(e===null||e.type!==t.type||e.encoding!==t.encoding)&&this.setChanged()))}getTexture(){return this.texture}setTexture(t){this.texture=t}get aspectCorrection(){return this.defines.has("ASPECT_CORRECTION")}set aspectCorrection(t){this.aspectCorrection!==t&&(t?this.defines.set("ASPECT_CORRECTION","1"):this.defines.delete("ASPECT_CORRECTION"),this.setChanged())}get uvTransform(){const t=this.texture;return t!==null&&t.matrixAutoUpdate}set uvTransform(t){const e=this.texture;e!==null&&(e.matrixAutoUpdate=t)}setTextureSwizzleRGBA(t,e=t,n=t,r=t){const i="rgba";let o="";(t!==If.RED||e!==If.GREEN||n!==If.BLUE||r!==If.ALPHA)&&(o=[".",i[t],i[e],i[n],i[r]].join("")),this.defines.set("TEXEL","texel"+o),this.setChanged()}update(t,e,n){this.texture.matrixAutoUpdate&&this.texture.updateMatrix()}};function xm(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function K2(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);nMath.PI&&(n-=Math.PI*2),n}function G$(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Zo=function t(e,n,r){var i=this;G$(this,t),xm(this,"dot2",function(o,s){return i.x*o+i.y*s}),xm(this,"dot3",function(o,s,a){return i.x*o+i.y*s+i.z*a}),this.x=e,this.y=n,this.z=r},cpe=[new Zo(1,1,0),new Zo(-1,1,0),new Zo(1,-1,0),new Zo(-1,-1,0),new Zo(1,0,1),new Zo(-1,0,1),new Zo(1,0,-1),new Zo(-1,0,-1),new Zo(0,1,1),new Zo(0,-1,1),new Zo(0,1,-1),new Zo(0,-1,-1)],uN=[151,160,137,91,90,15,131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23,190,6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33,88,237,149,56,87,174,20,125,136,171,168,68,175,74,165,71,134,139,48,27,166,77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244,102,143,54,65,25,63,161,1,216,80,73,209,76,132,187,208,89,18,169,200,196,135,130,116,188,159,86,164,100,109,198,173,186,3,64,52,217,226,250,124,123,5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42,223,183,170,213,119,248,152,2,44,154,163,70,221,153,101,155,167,43,172,9,129,22,39,253,19,98,108,110,79,113,224,232,178,185,112,104,218,246,97,228,251,34,242,193,238,210,144,12,191,179,162,241,81,51,145,235,249,14,239,107,49,192,214,31,181,199,106,157,184,84,204,176,115,121,50,45,127,4,150,254,138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180],dN=new Array(512),fN=new Array(512),upe=function(e){e>0&&e<1&&(e*=65536),e=Math.floor(e),e<256&&(e|=e<<8);for(var n=0;n<256;n++){var r;n&1?r=uN[n]^e&255:r=uN[n]^e>>8&255,dN[n]=dN[n+256]=r,fN[n]=fN[n+256]=cpe[r%12]}};upe(0);function dpe(t){if(typeof t=="number")t=Math.abs(t);else if(typeof t=="string"){var e=t;t=0;for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:.01,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1/(2*Math.PI);return r/Math.atan(1/n)*Math.atan(Math.sin(2*Math.PI*e*i)/n)},W$=function(e){return 1/(1+e+.48*e*e+.235*e*e*e)};function Kr(t,e,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:.25,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:.01,o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:1/0,s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:W$,a=arguments.length>7&&arguments[7]!==void 0?arguments[7]:.001,l="velocity_"+e;if(t.__damp===void 0&&(t.__damp={}),t.__damp[l]===void 0&&(t.__damp[l]=0),Math.abs(t[e]-n)<=a)return t[e]=n,!1;r=Math.max(1e-4,r);var c=2/r,u=s(c*i),d=t[e]-n,f=n,h=o*r;d=Math.min(Math.max(d,-h),h),n=t[e]-d;var g=(t.__damp[l]+c*d)*i;t.__damp[l]=(t.__damp[l]-c*g)*u;var y=n+(d+g)*u;return f-t[e]>0==y>f&&(y=f,t.__damp[l]=(y-f)/i),t[e]=y,!0}function Vf(t,e,n,r,i,o,s,a){return Kr(t,e,t[e]+lpe(t[e],n),r,i,o,s,a)}var Tp=new Ee,pN,mN;function ppe(t,e,n,r,i,o,s){return typeof e=="number"?Tp.setScalar(e):Array.isArray(e)?Tp.set(e[0],e[1]):Tp.copy(e),pN=Kr(t,"x",Tp.x,n,r,i,o,s),mN=Kr(t,"y",Tp.y,n,r,i,o,s),pN||mN}var tf=new Z,gN,vN,yN;function Q2(t,e,n,r,i,o,s){return typeof e=="number"?tf.setScalar(e):Array.isArray(e)?tf.set(e[0],e[1],e[2]):tf.copy(e),gN=Kr(t,"x",tf.x,n,r,i,o,s),vN=Kr(t,"y",tf.y,n,r,i,o,s),yN=Kr(t,"z",tf.z,n,r,i,o,s),gN||vN||yN}var ou=new an,_N,xN,wN,SN;function mpe(t,e,n,r,i,o,s){return typeof e=="number"?ou.setScalar(e):Array.isArray(e)?ou.set(e[0],e[1],e[2],e[3]):ou.copy(e),_N=Kr(t,"x",ou.x,n,r,i,o,s),xN=Kr(t,"y",ou.y,n,r,i,o,s),wN=Kr(t,"z",ou.z,n,r,i,o,s),SN=Kr(t,"w",ou.w,n,r,i,o,s),_N||xN||wN||SN}var Op=new ki,bN,MN,EN;function gpe(t,e,n,r,i,o,s){return Array.isArray(e)?Op.set(e[0],e[1],e[2],e[3]):Op.copy(e),bN=Vf(t,"x",Op.x,n,r,i,o,s),MN=Vf(t,"y",Op.y,n,r,i,o,s),EN=Vf(t,"z",Op.z,n,r,i,o,s),bN||MN||EN}var nf=new lt,PN,CN,TN;function vpe(t,e,n,r,i,o,s){return e instanceof lt?nf.copy(e):Array.isArray(e)?nf.setRGB(e[0],e[1],e[2]):nf.set(e),PN=Kr(t,"r",nf.r,n,r,i,o,s),CN=Kr(t,"g",nf.g,n,r,i,o,s),TN=Kr(t,"b",nf.b,n,r,i,o,s),PN||CN||TN}var Ss=new Hn,Xa=new an,ON=new an,Rp=new an,RN,AN,DN,IN;function Y$(t,e,n,r,i,o,s){var a=t;Array.isArray(e)?Ss.set(e[0],e[1],e[2],e[3]):Ss.copy(e);var l=t.dot(Ss)>0?1:-1;return Ss.x*=l,Ss.y*=l,Ss.z*=l,Ss.w*=l,RN=Kr(t,"x",Ss.x,n,r,i,o,s),AN=Kr(t,"y",Ss.y,n,r,i,o,s),DN=Kr(t,"z",Ss.z,n,r,i,o,s),IN=Kr(t,"w",Ss.w,n,r,i,o,s),Xa.set(t.x,t.y,t.z,t.w).normalize(),ON.set(a.__damp.velocity_x,a.__damp.velocity_y,a.__damp.velocity_z,a.__damp.velocity_w),Rp.copy(Xa).multiplyScalar(ON.dot(Xa)/Xa.dot(Xa)),a.__damp.velocity_x-=Rp.x,a.__damp.velocity_y-=Rp.y,a.__damp.velocity_z-=Rp.z,a.__damp.velocity_w-=Rp.w,t.set(Xa.x,Xa.y,Xa.z,Xa.w),RN||AN||DN||IN}var Ap=new TR,LN,kN,NN;function ype(t,e,n,r,i,o,s){return Array.isArray(e)?Ap.set(e[0],e[1],e[2]):Ap.copy(e),LN=Kr(t,"radius",Ap.radius,n,r,i,o,s),kN=Vf(t,"phi",Ap.phi,n,r,i,o,s),NN=Vf(t,"theta",Ap.theta,n,r,i,o,s),LN||kN||NN}var wy=new rt,FN=new Z,zN=new Hn,UN=new Z,BN,HN,VN;function _pe(t,e,n,r,i,o,s){var a=t;return a.__damp===void 0&&(a.__damp={position:new Z,rotation:new Hn,scale:new Z},t.decompose(a.__damp.position,a.__damp.rotation,a.__damp.scale)),Array.isArray(e)?wy.set.apply(wy,ope(e)):wy.copy(e),wy.decompose(FN,zN,UN),BN=Q2(a.__damp.position,FN,n,r,i,o,s),HN=Y$(a.__damp.rotation,zN,n,r,i,o,s),VN=Q2(a.__damp.scale,UN,n,r,i,o,s),t.compose(a.__damp.position,a.__damp.rotation,a.__damp.scale),BN||HN||VN}var xpe=Object.freeze({__proto__:null,rsqw:hpe,exp:W$,damp:Kr,dampAngle:Vf,damp2:ppe,damp3:Q2,damp4:mpe,dampE:gpe,dampC:vpe,dampQ:Y$,dampS:ype,dampM:_pe});function J2(){return J2=Object.assign?Object.assign.bind():function(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=new Array(e);nMath.PI&&(n-=Math.PI*2),n}function W$(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Zo=function t(e,n,r){var i=this;W$(this,t),xm(this,"dot2",function(o,s){return i.x*o+i.y*s}),xm(this,"dot3",function(o,s,a){return i.x*o+i.y*s+i.z*a}),this.x=e,this.y=n,this.z=r},upe=[new Zo(1,1,0),new Zo(-1,1,0),new Zo(1,-1,0),new Zo(-1,-1,0),new Zo(1,0,1),new Zo(-1,0,1),new Zo(1,0,-1),new Zo(-1,0,-1),new Zo(0,1,1),new Zo(0,-1,1),new Zo(0,1,-1),new Zo(0,-1,-1)],uN=[151,160,137,91,90,15,131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23,190,6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33,88,237,149,56,87,174,20,125,136,171,168,68,175,74,165,71,134,139,48,27,166,77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244,102,143,54,65,25,63,161,1,216,80,73,209,76,132,187,208,89,18,169,200,196,135,130,116,188,159,86,164,100,109,198,173,186,3,64,52,217,226,250,124,123,5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42,223,183,170,213,119,248,152,2,44,154,163,70,221,153,101,155,167,43,172,9,129,22,39,253,19,98,108,110,79,113,224,232,178,185,112,104,218,246,97,228,251,34,242,193,238,210,144,12,191,179,162,241,81,51,145,235,249,14,239,107,49,192,214,31,181,199,106,157,184,84,204,176,115,121,50,45,127,4,150,254,138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180],dN=new Array(512),fN=new Array(512),dpe=function(e){e>0&&e<1&&(e*=65536),e=Math.floor(e),e<256&&(e|=e<<8);for(var n=0;n<256;n++){var r;n&1?r=uN[n]^e&255:r=uN[n]^e>>8&255,dN[n]=dN[n+256]=r,fN[n]=fN[n+256]=upe[r%12]}};dpe(0);function fpe(t){if(typeof t=="number")t=Math.abs(t);else if(typeof t=="string"){var e=t;t=0;for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:.01,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1/(2*Math.PI);return r/Math.atan(1/n)*Math.atan(Math.sin(2*Math.PI*e*i)/n)},Y$=function(e){return 1/(1+e+.48*e*e+.235*e*e*e)};function Kr(t,e,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:.25,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:.01,o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:1/0,s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:Y$,a=arguments.length>7&&arguments[7]!==void 0?arguments[7]:.001,l="velocity_"+e;if(t.__damp===void 0&&(t.__damp={}),t.__damp[l]===void 0&&(t.__damp[l]=0),Math.abs(t[e]-n)<=a)return t[e]=n,!1;r=Math.max(1e-4,r);var c=2/r,u=s(c*i),d=t[e]-n,f=n,h=o*r;d=Math.min(Math.max(d,-h),h),n=t[e]-d;var g=(t.__damp[l]+c*d)*i;t.__damp[l]=(t.__damp[l]-c*g)*u;var y=n+(d+g)*u;return f-t[e]>0==y>f&&(y=f,t.__damp[l]=(y-f)/i),t[e]=y,!0}function Vf(t,e,n,r,i,o,s,a){return Kr(t,e,t[e]+cpe(t[e],n),r,i,o,s,a)}var Tp=new Ee,pN,mN;function mpe(t,e,n,r,i,o,s){return typeof e=="number"?Tp.setScalar(e):Array.isArray(e)?Tp.set(e[0],e[1]):Tp.copy(e),pN=Kr(t,"x",Tp.x,n,r,i,o,s),mN=Kr(t,"y",Tp.y,n,r,i,o,s),pN||mN}var tf=new Z,gN,vN,yN;function J2(t,e,n,r,i,o,s){return typeof e=="number"?tf.setScalar(e):Array.isArray(e)?tf.set(e[0],e[1],e[2]):tf.copy(e),gN=Kr(t,"x",tf.x,n,r,i,o,s),vN=Kr(t,"y",tf.y,n,r,i,o,s),yN=Kr(t,"z",tf.z,n,r,i,o,s),gN||vN||yN}var ou=new an,_N,xN,wN,SN;function gpe(t,e,n,r,i,o,s){return typeof e=="number"?ou.setScalar(e):Array.isArray(e)?ou.set(e[0],e[1],e[2],e[3]):ou.copy(e),_N=Kr(t,"x",ou.x,n,r,i,o,s),xN=Kr(t,"y",ou.y,n,r,i,o,s),wN=Kr(t,"z",ou.z,n,r,i,o,s),SN=Kr(t,"w",ou.w,n,r,i,o,s),_N||xN||wN||SN}var Op=new ki,bN,MN,EN;function vpe(t,e,n,r,i,o,s){return Array.isArray(e)?Op.set(e[0],e[1],e[2],e[3]):Op.copy(e),bN=Vf(t,"x",Op.x,n,r,i,o,s),MN=Vf(t,"y",Op.y,n,r,i,o,s),EN=Vf(t,"z",Op.z,n,r,i,o,s),bN||MN||EN}var nf=new lt,PN,CN,TN;function ype(t,e,n,r,i,o,s){return e instanceof lt?nf.copy(e):Array.isArray(e)?nf.setRGB(e[0],e[1],e[2]):nf.set(e),PN=Kr(t,"r",nf.r,n,r,i,o,s),CN=Kr(t,"g",nf.g,n,r,i,o,s),TN=Kr(t,"b",nf.b,n,r,i,o,s),PN||CN||TN}var Ss=new Hn,Xa=new an,ON=new an,Rp=new an,RN,AN,DN,IN;function X$(t,e,n,r,i,o,s){var a=t;Array.isArray(e)?Ss.set(e[0],e[1],e[2],e[3]):Ss.copy(e);var l=t.dot(Ss)>0?1:-1;return Ss.x*=l,Ss.y*=l,Ss.z*=l,Ss.w*=l,RN=Kr(t,"x",Ss.x,n,r,i,o,s),AN=Kr(t,"y",Ss.y,n,r,i,o,s),DN=Kr(t,"z",Ss.z,n,r,i,o,s),IN=Kr(t,"w",Ss.w,n,r,i,o,s),Xa.set(t.x,t.y,t.z,t.w).normalize(),ON.set(a.__damp.velocity_x,a.__damp.velocity_y,a.__damp.velocity_z,a.__damp.velocity_w),Rp.copy(Xa).multiplyScalar(ON.dot(Xa)/Xa.dot(Xa)),a.__damp.velocity_x-=Rp.x,a.__damp.velocity_y-=Rp.y,a.__damp.velocity_z-=Rp.z,a.__damp.velocity_w-=Rp.w,t.set(Xa.x,Xa.y,Xa.z,Xa.w),RN||AN||DN||IN}var Ap=new TR,LN,kN,NN;function _pe(t,e,n,r,i,o,s){return Array.isArray(e)?Ap.set(e[0],e[1],e[2]):Ap.copy(e),LN=Kr(t,"radius",Ap.radius,n,r,i,o,s),kN=Vf(t,"phi",Ap.phi,n,r,i,o,s),NN=Vf(t,"theta",Ap.theta,n,r,i,o,s),LN||kN||NN}var wy=new rt,FN=new Z,zN=new Hn,UN=new Z,BN,HN,VN;function xpe(t,e,n,r,i,o,s){var a=t;return a.__damp===void 0&&(a.__damp={position:new Z,rotation:new Hn,scale:new Z},t.decompose(a.__damp.position,a.__damp.rotation,a.__damp.scale)),Array.isArray(e)?wy.set.apply(wy,spe(e)):wy.copy(e),wy.decompose(FN,zN,UN),BN=J2(a.__damp.position,FN,n,r,i,o,s),HN=X$(a.__damp.rotation,zN,n,r,i,o,s),VN=J2(a.__damp.scale,UN,n,r,i,o,s),t.compose(a.__damp.position,a.__damp.rotation,a.__damp.scale),BN||HN||VN}var wpe=Object.freeze({__proto__:null,rsqw:ppe,exp:Y$,damp:Kr,dampAngle:Vf,damp2:mpe,damp3:J2,damp4:gpe,dampE:vpe,dampC:ype,dampQ:X$,dampS:_pe,dampM:xpe});function eT(){return eT=Object.assign?Object.assign.bind():function(t){for(var e=1;e0.0){g=sqrt(g);float A=(g-c)/(g+c);float B=(c*(g+c)-1.0)/(c*(g-c)+1.0);result=0.5*A*A*(1.0+B*B);}else{result=1.0;}return result;}float fresnel_dielectric(vec3 Incoming,vec3 Normal,float eta){float cosine=dot(Incoming,Normal);return min(1.0,5.0*fresnel_dielectric_cos(cosine,eta));}`,bpe=`#define GLSLIFY 1 +vec3 hash(vec3 a){a=fract(a*Scale);a+=dot(a,a.yxz+K);return fract((a.xxy+a.yxx)*a.zyx);}float fresnel_dielectric_cos(float cosi,float eta){float c=abs(cosi);float g=eta*eta-1.0+c*c;float result;if(g>0.0){g=sqrt(g);float A=(g-c)/(g+c);float B=(c*(g+c)-1.0)/(c*(g-c)+1.0);result=0.5*A*A*(1.0+B*B);}else{result=1.0;}return result;}float fresnel_dielectric(vec3 Incoming,vec3 Normal,float eta){float cosine=dot(Incoming,Normal);return min(1.0,5.0*fresnel_dielectric_cos(cosine,eta));}`,Mpe=`#define GLSLIFY 1 #define INV_EULER 0.36787944117144233 alpha=velocityDisocclusion0.5; #ifdef boxBlur if(needsBlur)inputColor=boxBlurredColor; #endif -if(alpha==1.0){outputColor=accumulatedColor;}else{float m=mix(alpha,1.0,blend);if(needsBlur)m=0.0;outputColor=accumulatedColor*m+inputColor*(1.0-m);}`;class Mpe extends sn{constructor(){super({type:"MRTMaterial",defines:{USE_UV:"",TEMPORAL_RESOLVE:""},uniforms:{opacity:new Me(1),normalMap:new Me(null),normalScale:new Me(new Ee(1,1)),uvTransform:new Me(new mn),roughness:new Me(1),roughnessMap:new Me(null)},vertexShader:` +if(alpha==1.0){outputColor=accumulatedColor;}else{float m=mix(alpha,1.0,blend);if(needsBlur)m=0.0;outputColor=accumulatedColor*m+inputColor*(1.0-m);}`;class Epe extends sn{constructor(){super({type:"MRTMaterial",defines:{USE_UV:"",TEMPORAL_RESOLVE:""},uniforms:{opacity:new Me(1),normalMap:new Me(null),normalScale:new Me(new Ee(1,1)),uvTransform:new Me(new mn),roughness:new Me(1),roughnessMap:new Me(null)},vertexShader:` #ifdef USE_MRT varying vec2 vHighPrecisionZW; #endif @@ -4642,7 +4642,7 @@ if(alpha==1.0){outputColor=accumulatedColor;}else{float m=mix(alpha,1.0,blend);i #endif #ifdef USE_MRT vHighPrecisionZW = gl_Position.zw; - #endif + #endif #ifdef USE_UV vUv = ( uvTransform * vec3( uv, 1 ) ).xy; #endif @@ -4660,11 +4660,11 @@ if(alpha==1.0){outputColor=accumulatedColor;}else{float m=mix(alpha,1.0,blend);i #include #include #include - + #ifdef USE_MRT layout(location = 0) out vec4 gNormal; layout(location = 1) out vec4 gDepth; - + varying vec2 vHighPrecisionZW; #endif uniform float roughness; @@ -4675,7 +4675,7 @@ if(alpha==1.0){outputColor=accumulatedColor;}else{float m=mix(alpha,1.0,blend);i #include float roughnessFactor = roughness; - + if(roughness > 10.0e9){ roughnessFactor = 1.; }else{ @@ -4696,8 +4696,8 @@ if(alpha==1.0){outputColor=accumulatedColor;}else{float m=mix(alpha,1.0,blend);i gl_FragColor = vec4(normalColor, roughnessFactor); #endif } - `,toneMapped:!1}),this.normalMapType=yl,this.normalScale=new Ee(1,1),Object.defineProperty(this,"glslVersion",{get(){return"USE_MRT"in this.defines?_x:null},set(e){}})}}var Epe=`#define GLSLIFY 1 -varying vec2 vUv;void main(){vUv=position.xy*0.5+0.5;gl_Position=vec4(position.xy,1.0,1.0);}`,Ppe=`#define GLSLIFY 1 + `,toneMapped:!1}),this.normalMapType=yl,this.normalScale=new Ee(1,1),Object.defineProperty(this,"glslVersion",{get(){return"USE_MRT"in this.defines?_x:null},set(e){}})}}var Ppe=`#define GLSLIFY 1 +varying vec2 vUv;void main(){vUv=position.xy*0.5+0.5;gl_Position=vec4(position.xy,1.0,1.0);}`,Cpe=`#define GLSLIFY 1 varying vec2 vUv;uniform sampler2D inputTexture;uniform sampler2D accumulatedTexture;uniform sampler2D normalTexture;uniform sampler2D depthTexture;uniform sampler2D envMap;uniform mat4 _projectionMatrix;uniform mat4 _inverseProjectionMatrix;uniform mat4 cameraMatrixWorld;uniform float cameraNear;uniform float cameraFar;uniform float rayDistance;uniform float intensity;uniform float maxDepthDifference;uniform float roughnessFade;uniform float maxRoughness;uniform float fade;uniform float thickness;uniform float ior;uniform float samples;uniform float jitter;uniform float jitterRoughness; #define INVALID_RAY_COORDS vec2(-1.0); #define EARLY_OUT_COLOR vec4(0.0, 0.0, 0.0, 1.0) @@ -4738,8 +4738,8 @@ vec3 reflectVec=reflect(-viewDir,normal);reflectVec=normalize(mix(reflectVec,nor #else return vec3(0.0); #endif -}`;class Cpe extends sn{constructor(){super({type:"ReflectionsMaterial",uniforms:{inputTexture:new Me(null),accumulatedTexture:new Me(null),normalTexture:new Me(null),depthTexture:new Me(null),_projectionMatrix:new Me(new rt),_inverseProjectionMatrix:new Me(new rt),cameraMatrixWorld:new Me(new rt),cameraNear:new Me(0),cameraFar:new Me(0),rayDistance:new Me(0),intensity:new Me(0),roughnessFade:new Me(0),fade:new Me(0),thickness:new Me(0),ior:new Me(0),maxDepthDifference:new Me(0),jitter:new Me(0),jitterRoughness:new Me(0),maxRoughness:new Me(0),samples:new Me(0),envMap:new Me(null),envMapPosition:new Me(new Z),envMapSize:new Me(new Z),viewMatrix:new Me(new rt)},defines:{steps:20,refineSteps:5,CUBEUV_TEXEL_WIDTH:0,CUBEUV_TEXEL_HEIGHT:0,CUBEUV_MAX_MIP:0,vWorldPosition:"worldPos"},fragmentShader:Ppe.replace("#include ",X$),vertexShader:Epe,toneMapped:!1,depthWrite:!1,depthTest:!1})}}const Z$=t=>{const e=[t],n=[];for(;e.length!==0;){const r=e.shift();r.material&&n.push(r);for(const i of r.children)i.visible&&e.push(i)}return n},Tpe=t=>{const e=t.envMapCubeUVHeight;if(e===null)return null;const n=Math.log2(e)-2,r=1/e;return{texelWidth:1/(3*Math.max(Math.pow(2,n),7*16)),texelHeight:r,maxMip:n}},jN=(t,e,n)=>{t.uniforms.envMap.value=e;const r=Tpe({envMapCubeUVHeight:n});t.defines.ENVMAP_TYPE_CUBE_UV="",t.defines.CUBEUV_TEXEL_WIDTH=r.texelWidth,t.defines.CUBEUV_TEXEL_HEIGHT=r.texelHeight,t.defines.CUBEUV_MAX_MIP=r.maxMip+".0",t.needsUpdate=!0},Ope=()=>{try{const t=document.createElement("canvas");return!!(window.WebGL2RenderingContext&&t.getContext("webgl2"))}catch{return!1}};class Rpe extends Dr{constructor(e,n={}){super("ReflectionsPass"),this.ssrEffect=void 0,this.cachedMaterials=new WeakMap,this.USE_MRT=!1,this.webgl1DepthPass=null,this.visibleMeshes=[],this.ssrEffect=e,this._scene=e._scene,this._camera=e._camera,this.fullscreenMaterial=new Cpe,e._camera.isPerspectiveCamera&&(this.fullscreenMaterial.defines.PERSPECTIVE_CAMERA="");const r=n.width||typeof window<"u"?window.innerWidth:2e3,i=n.height||typeof window<"u"?window.innerHeight:1e3;this.renderTarget=new gn(r,i,{minFilter:Dt,magFilter:Dt,type:yr,depthBuffer:!1}),this.renderPass=new Eh(this._scene,this._camera),this.USE_MRT=Ope(),this.USE_MRT?(this.gBuffersRenderTarget=new JO(r,i,2,{minFilter:Dt,magFilter:Dt}),this.normalTexture=this.gBuffersRenderTarget.texture[0],this.depthTexture=this.gBuffersRenderTarget.texture[1]):(this.webgl1DepthPass=new BR(this._scene,this._camera),this.webgl1DepthPass.renderTarget.minFilter=Dt,this.webgl1DepthPass.renderTarget.magFilter=Dt,this.webgl1DepthPass.renderTarget.texture.minFilter=Dt,this.webgl1DepthPass.renderTarget.texture.magFilter=Dt,this.webgl1DepthPass.setSize(typeof window<"u"?window.innerWidth:2e3,typeof window<"u"?window.innerHeight:1e3),this.gBuffersRenderTarget=new gn(r,i,{minFilter:Dt,magFilter:Dt}),this.normalTexture=this.gBuffersRenderTarget.texture,this.depthTexture=this.webgl1DepthPass.texture),this.fullscreenMaterial.uniforms.normalTexture.value=this.normalTexture,this.fullscreenMaterial.uniforms.depthTexture.value=this.depthTexture,this.fullscreenMaterial.uniforms.accumulatedTexture.value=this.ssrEffect.temporalResolvePass.accumulatedTexture,this.fullscreenMaterial.uniforms.cameraMatrixWorld.value=this._camera.matrixWorld,this.fullscreenMaterial.uniforms._projectionMatrix.value=this._camera.projectionMatrix,this.fullscreenMaterial.uniforms._inverseProjectionMatrix.value=this._camera.projectionMatrixInverse}setSize(e,n){this.renderTarget.setSize(e*this.ssrEffect.resolutionScale,n*this.ssrEffect.resolutionScale),this.gBuffersRenderTarget.setSize(e*this.ssrEffect.resolutionScale,n*this.ssrEffect.resolutionScale),this.fullscreenMaterial.uniforms.accumulatedTexture.value=this.ssrEffect.temporalResolvePass.accumulatedTexture,this.fullscreenMaterial.needsUpdate=!0}dispose(){this.renderTarget.dispose(),this.gBuffersRenderTarget.dispose(),this.renderPass.dispose(),this.USE_MRT||this.webgl1DepthPass.dispose(),this.fullscreenMaterial.dispose(),this.normalTexture=null,this.depthTexture=null,this.velocityTexture=null}keepMaterialMapUpdated(e,n,r,i){this.ssrEffect[i]?n[r]!==e[r]&&(e[r]=n[r],e.uniforms[r].value=n[r],n[r]?e.defines[i]="":delete e.defines[i],e.needsUpdate=!0):e[r]!==void 0&&(e[r]=void 0,e.uniforms[r].value=void 0,delete e.defines[i],e.needsUpdate=!0)}setMRTMaterialInScene(){this.visibleMeshes=Z$(this._scene);for(const e of this.visibleMeshes)if(e.material){const n=e.material;let[r,i]=this.cachedMaterials.get(e)||[];if(n!==r){i&&i.dispose(),i=new Mpe,this.USE_MRT&&(i.defines.USE_MRT=""),i.normalScale=n.normalScale,i.uniforms.normalScale.value=n.normalScale;const o=n.map||n.normalMap||n.roughnessMap||n.metalnessMap;o&&(i.uniforms.uvTransform.value=o.matrix),this.cachedMaterials.set(e,[n,i])}this.keepMaterialMapUpdated(i,n,"normalMap","useNormalMap"),this.keepMaterialMapUpdated(i,n,"roughnessMap","useRoughnessMap"),i.uniforms.roughness.value=this.ssrEffect.selection.size===0||this.ssrEffect.selection.has(e)?n.roughness||0:1e11,e.material=i}}unsetMRTMaterialInScene(){for(const n of this.visibleMeshes){var e;if(((e=n.material)==null?void 0:e.type)==="MRTMaterial"){n.visible=!0;const[r]=this.cachedMaterials.get(n);n.material=r}}}render(e,n){this.setMRTMaterialInScene(),e.setRenderTarget(this.gBuffersRenderTarget),this.renderPass.render(e,this.gBuffersRenderTarget),this.unsetMRTMaterialInScene(),this.USE_MRT||this.webgl1DepthPass.renderPass.render(e,this.webgl1DepthPass.renderTarget),this.fullscreenMaterial.uniforms.inputTexture.value=n.texture,this.fullscreenMaterial.uniforms.samples.value=this.ssrEffect.temporalResolvePass.samples,this.fullscreenMaterial.uniforms.cameraNear.value=this._camera.near,this.fullscreenMaterial.uniforms.cameraFar.value=this._camera.far,this.fullscreenMaterial.uniforms.viewMatrix.value.copy(this._camera.matrixWorldInverse),e.setRenderTarget(this.renderTarget),e.render(this.scene,this.camera)}}const $N={intensity:1,exponent:1,distance:10,fade:0,roughnessFade:1,thickness:10,ior:1.45,maxRoughness:1,maxDepthDifference:10,blend:.9,correction:1,correctionRadius:1,blur:.5,blurKernel:1,blurSharpness:10,jitter:0,jitterRoughness:0,steps:20,refineSteps:5,missedRays:!0,useNormalMap:!0,useRoughnessMap:!0,resolutionScale:1,velocityResolutionScale:1};var Ape=`#define GLSLIFY 1 -varying vec2 vUv;void main(){vUv=position.xy*0.5+0.5;gl_Position=vec4(position.xy,1.0,1.0);}`,Dpe=`#define GLSLIFY 1 +}`;class Tpe extends sn{constructor(){super({type:"ReflectionsMaterial",uniforms:{inputTexture:new Me(null),accumulatedTexture:new Me(null),normalTexture:new Me(null),depthTexture:new Me(null),_projectionMatrix:new Me(new rt),_inverseProjectionMatrix:new Me(new rt),cameraMatrixWorld:new Me(new rt),cameraNear:new Me(0),cameraFar:new Me(0),rayDistance:new Me(0),intensity:new Me(0),roughnessFade:new Me(0),fade:new Me(0),thickness:new Me(0),ior:new Me(0),maxDepthDifference:new Me(0),jitter:new Me(0),jitterRoughness:new Me(0),maxRoughness:new Me(0),samples:new Me(0),envMap:new Me(null),envMapPosition:new Me(new Z),envMapSize:new Me(new Z),viewMatrix:new Me(new rt)},defines:{steps:20,refineSteps:5,CUBEUV_TEXEL_WIDTH:0,CUBEUV_TEXEL_HEIGHT:0,CUBEUV_MAX_MIP:0,vWorldPosition:"worldPos"},fragmentShader:Cpe.replace("#include ",Z$),vertexShader:Ppe,toneMapped:!1,depthWrite:!1,depthTest:!1})}}const q$=t=>{const e=[t],n=[];for(;e.length!==0;){const r=e.shift();r.material&&n.push(r);for(const i of r.children)i.visible&&e.push(i)}return n},Ope=t=>{const e=t.envMapCubeUVHeight;if(e===null)return null;const n=Math.log2(e)-2,r=1/e;return{texelWidth:1/(3*Math.max(Math.pow(2,n),7*16)),texelHeight:r,maxMip:n}},jN=(t,e,n)=>{t.uniforms.envMap.value=e;const r=Ope({envMapCubeUVHeight:n});t.defines.ENVMAP_TYPE_CUBE_UV="",t.defines.CUBEUV_TEXEL_WIDTH=r.texelWidth,t.defines.CUBEUV_TEXEL_HEIGHT=r.texelHeight,t.defines.CUBEUV_MAX_MIP=r.maxMip+".0",t.needsUpdate=!0},Rpe=()=>{try{const t=document.createElement("canvas");return!!(window.WebGL2RenderingContext&&t.getContext("webgl2"))}catch{return!1}};class Ape extends Dr{constructor(e,n={}){super("ReflectionsPass"),this.ssrEffect=void 0,this.cachedMaterials=new WeakMap,this.USE_MRT=!1,this.webgl1DepthPass=null,this.visibleMeshes=[],this.ssrEffect=e,this._scene=e._scene,this._camera=e._camera,this.fullscreenMaterial=new Tpe,e._camera.isPerspectiveCamera&&(this.fullscreenMaterial.defines.PERSPECTIVE_CAMERA="");const r=n.width||typeof window<"u"?window.innerWidth:2e3,i=n.height||typeof window<"u"?window.innerHeight:1e3;this.renderTarget=new gn(r,i,{minFilter:Dt,magFilter:Dt,type:yr,depthBuffer:!1}),this.renderPass=new Eh(this._scene,this._camera),this.USE_MRT=Rpe(),this.USE_MRT?(this.gBuffersRenderTarget=new JO(r,i,2,{minFilter:Dt,magFilter:Dt}),this.normalTexture=this.gBuffersRenderTarget.texture[0],this.depthTexture=this.gBuffersRenderTarget.texture[1]):(this.webgl1DepthPass=new BR(this._scene,this._camera),this.webgl1DepthPass.renderTarget.minFilter=Dt,this.webgl1DepthPass.renderTarget.magFilter=Dt,this.webgl1DepthPass.renderTarget.texture.minFilter=Dt,this.webgl1DepthPass.renderTarget.texture.magFilter=Dt,this.webgl1DepthPass.setSize(typeof window<"u"?window.innerWidth:2e3,typeof window<"u"?window.innerHeight:1e3),this.gBuffersRenderTarget=new gn(r,i,{minFilter:Dt,magFilter:Dt}),this.normalTexture=this.gBuffersRenderTarget.texture,this.depthTexture=this.webgl1DepthPass.texture),this.fullscreenMaterial.uniforms.normalTexture.value=this.normalTexture,this.fullscreenMaterial.uniforms.depthTexture.value=this.depthTexture,this.fullscreenMaterial.uniforms.accumulatedTexture.value=this.ssrEffect.temporalResolvePass.accumulatedTexture,this.fullscreenMaterial.uniforms.cameraMatrixWorld.value=this._camera.matrixWorld,this.fullscreenMaterial.uniforms._projectionMatrix.value=this._camera.projectionMatrix,this.fullscreenMaterial.uniforms._inverseProjectionMatrix.value=this._camera.projectionMatrixInverse}setSize(e,n){this.renderTarget.setSize(e*this.ssrEffect.resolutionScale,n*this.ssrEffect.resolutionScale),this.gBuffersRenderTarget.setSize(e*this.ssrEffect.resolutionScale,n*this.ssrEffect.resolutionScale),this.fullscreenMaterial.uniforms.accumulatedTexture.value=this.ssrEffect.temporalResolvePass.accumulatedTexture,this.fullscreenMaterial.needsUpdate=!0}dispose(){this.renderTarget.dispose(),this.gBuffersRenderTarget.dispose(),this.renderPass.dispose(),this.USE_MRT||this.webgl1DepthPass.dispose(),this.fullscreenMaterial.dispose(),this.normalTexture=null,this.depthTexture=null,this.velocityTexture=null}keepMaterialMapUpdated(e,n,r,i){this.ssrEffect[i]?n[r]!==e[r]&&(e[r]=n[r],e.uniforms[r].value=n[r],n[r]?e.defines[i]="":delete e.defines[i],e.needsUpdate=!0):e[r]!==void 0&&(e[r]=void 0,e.uniforms[r].value=void 0,delete e.defines[i],e.needsUpdate=!0)}setMRTMaterialInScene(){this.visibleMeshes=q$(this._scene);for(const e of this.visibleMeshes)if(e.material){const n=e.material;let[r,i]=this.cachedMaterials.get(e)||[];if(n!==r){i&&i.dispose(),i=new Epe,this.USE_MRT&&(i.defines.USE_MRT=""),i.normalScale=n.normalScale,i.uniforms.normalScale.value=n.normalScale;const o=n.map||n.normalMap||n.roughnessMap||n.metalnessMap;o&&(i.uniforms.uvTransform.value=o.matrix),this.cachedMaterials.set(e,[n,i])}this.keepMaterialMapUpdated(i,n,"normalMap","useNormalMap"),this.keepMaterialMapUpdated(i,n,"roughnessMap","useRoughnessMap"),i.uniforms.roughness.value=this.ssrEffect.selection.size===0||this.ssrEffect.selection.has(e)?n.roughness||0:1e11,e.material=i}}unsetMRTMaterialInScene(){for(const n of this.visibleMeshes){var e;if(((e=n.material)==null?void 0:e.type)==="MRTMaterial"){n.visible=!0;const[r]=this.cachedMaterials.get(n);n.material=r}}}render(e,n){this.setMRTMaterialInScene(),e.setRenderTarget(this.gBuffersRenderTarget),this.renderPass.render(e,this.gBuffersRenderTarget),this.unsetMRTMaterialInScene(),this.USE_MRT||this.webgl1DepthPass.renderPass.render(e,this.webgl1DepthPass.renderTarget),this.fullscreenMaterial.uniforms.inputTexture.value=n.texture,this.fullscreenMaterial.uniforms.samples.value=this.ssrEffect.temporalResolvePass.samples,this.fullscreenMaterial.uniforms.cameraNear.value=this._camera.near,this.fullscreenMaterial.uniforms.cameraFar.value=this._camera.far,this.fullscreenMaterial.uniforms.viewMatrix.value.copy(this._camera.matrixWorldInverse),e.setRenderTarget(this.renderTarget),e.render(this.scene,this.camera)}}const $N={intensity:1,exponent:1,distance:10,fade:0,roughnessFade:1,thickness:10,ior:1.45,maxRoughness:1,maxDepthDifference:10,blend:.9,correction:1,correctionRadius:1,blur:.5,blurKernel:1,blurSharpness:10,jitter:0,jitterRoughness:0,steps:20,refineSteps:5,missedRays:!0,useNormalMap:!0,useRoughnessMap:!0,resolutionScale:1,velocityResolutionScale:1};var Dpe=`#define GLSLIFY 1 +varying vec2 vUv;void main(){vUv=position.xy*0.5+0.5;gl_Position=vec4(position.xy,1.0,1.0);}`,Ipe=`#define GLSLIFY 1 uniform sampler2D inputTexture;uniform sampler2D accumulatedTexture;uniform sampler2D velocityTexture;uniform sampler2D lastVelocityTexture;uniform float blend;uniform float correction;uniform float exponent;uniform float samples;uniform vec2 invTexSize;uniform mat4 curInverseProjectionMatrix;uniform mat4 curCameraMatrixWorld;uniform mat4 prevInverseProjectionMatrix;uniform mat4 prevCameraMatrixWorld;varying vec2 vUv; #define MAX_NEIGHBOR_DEPTH_DIFFERENCE 0.001 #define FLOAT_EPSILON 0.00001 @@ -4768,7 +4768,7 @@ accumulatedColor=inputColor; #endif }if(velocity.r>FLOAT_ONE_MINUS_EPSILON&&velocity.g>FLOAT_ONE_MINUS_EPSILON){alpha=0.0;velocityDisocclusion=1.0;}}else{accumulatedColor=transformColor(textureLod(accumulatedTexture,vUv,0.0).rgb);}vec3 outputColor=inputColor; #include -gl_FragColor=vec4(undoColorTransform(outputColor),alpha);}`;class Ipe extends sn{constructor(e){const n=Dpe.replace("#include ",e);super({type:"TemporalResolveMaterial",uniforms:{inputTexture:new Me(null),accumulatedTexture:new Me(null),velocityTexture:new Me(null),lastVelocityTexture:new Me(null),samples:new Me(1),blend:new Me(.5),correction:new Me(1),exponent:new Me(1),invTexSize:new Me(new Ee)},defines:{correctionRadius:1},vertexShader:Ape,fragmentShader:n})}}const Lpe=` +gl_FragColor=vec4(undoColorTransform(outputColor),alpha);}`;class Lpe extends sn{constructor(e){const n=Ipe.replace("#include ",e);super({type:"TemporalResolveMaterial",uniforms:{inputTexture:new Me(null),accumulatedTexture:new Me(null),velocityTexture:new Me(null),lastVelocityTexture:new Me(null),samples:new Me(1),blend:new Me(.5),correction:new Me(1),exponent:new Me(1),invTexSize:new Me(new Ee)},defines:{correctionRadius:1},vertexShader:Dpe,fragmentShader:n})}}const kpe=` #ifdef USE_SKINNING #ifdef BONE_TEXTURE uniform sampler2D prevBoneTexture; @@ -4794,7 +4794,7 @@ gl_FragColor=vec4(undoColorTransform(outputColor),alpha);}`;class Ipe extends sn } #endif #endif -`,kpe=` +`,Npe=` vec3 transformed; // Get the normal @@ -4815,31 +4815,31 @@ gl_FragColor=vec4(undoColorTransform(outputColor),alpha);}`;class Ipe extends sn prevPosition = prevVelocityMatrix * vec4( transformed, 1.0 ); gl_Position = newPosition; -`;class Npe extends sn{constructor(){super({uniforms:{prevVelocityMatrix:{value:new rt},velocityMatrix:{value:new rt},prevBoneTexture:{value:null},interpolateGeometry:{value:0},intensity:{value:1},boneTexture:{value:null},alphaTest:{value:0},map:{value:null},alphaMap:{value:null},opacity:{value:1}},vertexShader:` +`;class Fpe extends sn{constructor(){super({uniforms:{prevVelocityMatrix:{value:new rt},velocityMatrix:{value:new rt},prevBoneTexture:{value:null},interpolateGeometry:{value:0},intensity:{value:1},boneTexture:{value:null},alphaTest:{value:0},map:{value:null},alphaMap:{value:null},opacity:{value:1}},vertexShader:` #define MAX_BONES 1024 - + ${Vt.skinning_pars_vertex} - ${Lpe} - + ${kpe} + uniform mat4 velocityMatrix; uniform mat4 prevVelocityMatrix; uniform float interpolateGeometry; varying vec4 prevPosition; varying vec4 newPosition; varying vec2 vHighPrecisionZW; - + void main() { - - ${kpe} + + ${Npe} vHighPrecisionZW = gl_Position.zw; - + }`,fragmentShader:` uniform float intensity; varying vec4 prevPosition; varying vec4 newPosition; varying vec2 vHighPrecisionZW; - + void main() { #ifdef FULL_MOVEMENT gl_FragColor = vec4( 1., 1., 1. - gl_FragCoord.z, 0. ); @@ -4848,14 +4848,14 @@ gl_FragColor=vec4(undoColorTransform(outputColor),alpha);}`;class Ipe extends sn vec2 pos0 = (prevPosition.xy / prevPosition.w) * 0.5 + 0.5; vec2 pos1 = (newPosition.xy / newPosition.w) * 0.5 + 0.5; - + vec2 vel = pos1 - pos0; float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5; - + gl_FragColor = vec4( vel, 1. - fragCoordZ, 0. ); - - }`}),this.isVelocityMaterial=!0}}const Fpe=new lt(0),zpe=["visible","wireframe","side"];class Upe extends Dr{constructor(e,n){var r,i;super("VelocityPass"),this.cachedMaterials=new WeakMap,this.lastCameraTransform={position:new Z,quaternion:new Hn},this.visibleMeshes=[],this.renderedMeshesThisFrame=0,this.renderedMeshesLastFrame=0,this._scene=e,this._camera=n,this.renderTarget=new gn(((r=window)==null?void 0:r.innerWidth)||1e3,((i=window)==null?void 0:i.innerHeight)||1e3,{type:yr})}setVelocityMaterialInScene(){this.renderedMeshesThisFrame=0,this.visibleMeshes=Z$(this._scene);for(const r of this.visibleMeshes){var e;const i=r.material;let[o,s]=this.cachedMaterials.get(r)||[];if(i!==o){var n;s=new Npe,s.lastMatrixWorld=new rt,r.material=s,(n=r.skeleton)!=null&&n.boneTexture&&this.saveBoneTexture(r),this.cachedMaterials.set(r,[i,s])}if(s.uniforms.velocityMatrix.value.multiplyMatrices(this._camera.projectionMatrix,r.modelViewMatrix),r.userData.needsUpdatedReflections||i.map instanceof a8?("FULL_MOVEMENT"in s.defines||(s.needsUpdate=!0),s.defines.FULL_MOVEMENT=""):"FULL_MOVEMENT"in s.defines&&(delete s.defines.FULL_MOVEMENT,s.needsUpdate=!0),r.visible=this.cameraMovedThisFrame||!r.matrixWorld.equals(s.lastMatrixWorld)||r.skeleton||"FULL_MOVEMENT"in s.defines,r.material=s,!!r.visible){this.renderedMeshesThisFrame++;for(const a of zpe)s[a]=i[a];(e=r.skeleton)!=null&&e.boneTexture&&(s.defines.USE_SKINNING="",s.defines.BONE_TEXTURE="",s.uniforms.boneTexture.value=r.skeleton.boneTexture)}}}saveBoneTexture(e){let n=e.material.uniforms.prevBoneTexture.value;if(n&&n.image.width===e.skeleton.boneTexture.width)n=e.material.uniforms.prevBoneTexture.value,n.image.data.set(e.skeleton.boneTexture.image.data);else{var r;(r=n)==null||r.dispose();const i=e.skeleton.boneTexture.image.data.slice(),o=e.skeleton.boneTexture.image.width;n=new Ea(i,o,o,Jn,Yn),e.material.uniforms.prevBoneTexture.value=n,n.needsUpdate=!0}}unsetVelocityMaterialInScene(){for(const n of this.visibleMeshes)if(n.material.isVelocityMaterial){var e;n.visible=!0,n.material.lastMatrixWorld.copy(n.matrixWorld),n.material.uniforms.prevVelocityMatrix.value.multiplyMatrices(this._camera.projectionMatrix,n.modelViewMatrix),(e=n.skeleton)!=null&&e.boneTexture&&this.saveBoneTexture(n),n.material=this.cachedMaterials.get(n)[0]}}setSize(e,n){this.renderTarget.setSize(e,n)}renderVelocity(e){if(e.setRenderTarget(this.renderTarget),this.renderedMeshesThisFrame>0){const{background:n}=this._scene;this._scene.background=Fpe,e.render(this._scene,this._camera),this._scene.background=n}else e.clearColor()}checkCameraMoved(){const e=this.lastCameraTransform.position.distanceToSquared(this._camera.position),n=8*(1-this.lastCameraTransform.quaternion.dot(this._camera.quaternion));return e>1e-6||n>1e-6?(this.lastCameraTransform.position.copy(this._camera.position),this.lastCameraTransform.quaternion.copy(this._camera.quaternion),!0):!1}render(e){this.cameraMovedThisFrame=this.checkCameraMoved(),this.setVelocityMaterialInScene(),(this.renderedMeshesThisFrame>0||this.renderedMeshesLastFrame>0)&&this.renderVelocity(e),this.unsetVelocityMaterialInScene(),this.renderedMeshesLastFrame=this.renderedMeshesThisFrame}}const GN=new Ee;class Bpe extends Dr{constructor(e,n,r,i={}){super("TemporalResolvePass"),this.velocityPass=null,this.velocityResolutionScale=1,this.samples=1,this.lastCameraTransform={position:new Z,quaternion:new Hn},this._scene=e,this._camera=n,this.renderTarget=new gn(1,1,{minFilter:Dt,magFilter:Dt,type:yr,depthBuffer:!1}),this.velocityPass=new Upe(e,n),this.fullscreenMaterial=new Ipe(r),this.fullscreenMaterial.defines.correctionRadius=i.correctionRadius||1,i.dilation&&(this.fullscreenMaterial.defines.dilation=""),i.boxBlur&&(this.fullscreenMaterial.defines.boxBlur=""),this.setupFramebuffers(1,1),this.checkCanUseSharedVelocityTexture()}dispose(){this._scene.userData.velocityTexture===this.velocityPass.renderTarget.texture&&(delete this._scene.userData.velocityTexture,delete this._scene.userData.lastVelocityTexture),this.renderTarget.dispose(),this.accumulatedTexture.dispose(),this.fullscreenMaterial.dispose(),this.velocityPass.dispose()}setSize(e,n){this.renderTarget.setSize(e,n),this.velocityPass.setSize(e*this.velocityResolutionScale,n*this.velocityResolutionScale),this.velocityPass.renderTarget.texture.minFilter=this.velocityResolutionScale===1?Qt:Dt,this.velocityPass.renderTarget.texture.magFilter=this.velocityResolutionScale===1?Qt:Dt,this.velocityPass.renderTarget.texture.needsUpdate=!0,this.fullscreenMaterial.uniforms.invTexSize.value.set(1/e,1/n),this.setupFramebuffers(e,n)}setupFramebuffers(e,n){this.accumulatedTexture&&this.accumulatedTexture.dispose(),this.lastVelocityTexture&&this.lastVelocityTexture.dispose(),this.accumulatedTexture=new k2(e,n,Jn),this.accumulatedTexture.minFilter=Dt,this.accumulatedTexture.magFilter=Dt,this.accumulatedTexture.type=yr,this.lastVelocityTexture=new k2(e*this.velocityResolutionScale,n*this.velocityResolutionScale,Jn),this.lastVelocityTexture.minFilter=this.velocityResolutionScale===1?Qt:Dt,this.lastVelocityTexture.magFilter=this.velocityResolutionScale===1?Qt:Dt,this.lastVelocityTexture.type=yr,this.fullscreenMaterial.uniforms.accumulatedTexture.value=this.accumulatedTexture,this.fullscreenMaterial.uniforms.lastVelocityTexture.value=this.lastVelocityTexture,this.fullscreenMaterial.needsUpdate=!0}checkCanUseSharedVelocityTexture(){return this._scene.userData.velocityTexture&&this.velocityPass.renderTarget.texture!==this._scene.userData.velocityTexture?this.velocityPass.renderTarget.texture===this.fullscreenMaterial.uniforms.velocityTexture.value&&(this.fullscreenMaterial.uniforms.lastVelocityTexture.value=this._scene.userData.lastVelocityTexture,this.fullscreenMaterial.uniforms.velocityTexture.value=this._scene.userData.velocityTexture,this.fullscreenMaterial.needsUpdate=!0):this.velocityPass.renderTarget.texture!==this.fullscreenMaterial.uniforms.velocityTexture.value&&(this.fullscreenMaterial.uniforms.velocityTexture.value=this.velocityPass.renderTarget.texture,this.fullscreenMaterial.uniforms.lastVelocityTexture.value=this.lastVelocityTexture,this.fullscreenMaterial.needsUpdate=!0,this._scene.userData.velocityTexture||(this._scene.userData.velocityTexture=this.velocityPass.renderTarget.texture,this._scene.userData.lastVelocityTexture=this.lastVelocityTexture)),this.velocityPass.renderTarget.texture!==this.fullscreenMaterial.uniforms.velocityTexture.value}checkNeedsResample(){const e=this.lastCameraTransform.position.distanceToSquared(this._camera.position),n=8*(1-this.lastCameraTransform.quaternion.dot(this._camera.quaternion));(e>1e-6||n>1e-6)&&(this.samples=1,this.lastCameraTransform.position.copy(this._camera.position),this.lastCameraTransform.quaternion.copy(this._camera.quaternion))}render(e){this.samples++,this.checkNeedsResample(),this.fullscreenMaterial.uniforms.samples.value=this.samples,e.setRenderTarget(this.renderTarget),e.render(this.scene,this.camera),e.copyFramebufferToTexture(GN,this.accumulatedTexture),e.setRenderTarget(this.velocityPass.renderTarget),e.copyFramebufferToTexture(GN,this.lastVelocityTexture)}}const WN=function(e,n){let r=1,i=0;for(;e>0;)r/=n,i+=r*(e%n),e=~~(e/n);return i},Hpe=t=>{const e=[];let n=1;const r=n+t;for(;n0){const{background:n}=this._scene;this._scene.background=zpe,e.render(this._scene,this._camera),this._scene.background=n}else e.clearColor()}checkCameraMoved(){const e=this.lastCameraTransform.position.distanceToSquared(this._camera.position),n=8*(1-this.lastCameraTransform.quaternion.dot(this._camera.quaternion));return e>1e-6||n>1e-6?(this.lastCameraTransform.position.copy(this._camera.position),this.lastCameraTransform.quaternion.copy(this._camera.quaternion),!0):!1}render(e){this.cameraMovedThisFrame=this.checkCameraMoved(),this.setVelocityMaterialInScene(),(this.renderedMeshesThisFrame>0||this.renderedMeshesLastFrame>0)&&this.renderVelocity(e),this.unsetVelocityMaterialInScene(),this.renderedMeshesLastFrame=this.renderedMeshesThisFrame}}const GN=new Ee;class Hpe extends Dr{constructor(e,n,r,i={}){super("TemporalResolvePass"),this.velocityPass=null,this.velocityResolutionScale=1,this.samples=1,this.lastCameraTransform={position:new Z,quaternion:new Hn},this._scene=e,this._camera=n,this.renderTarget=new gn(1,1,{minFilter:Dt,magFilter:Dt,type:yr,depthBuffer:!1}),this.velocityPass=new Bpe(e,n),this.fullscreenMaterial=new Lpe(r),this.fullscreenMaterial.defines.correctionRadius=i.correctionRadius||1,i.dilation&&(this.fullscreenMaterial.defines.dilation=""),i.boxBlur&&(this.fullscreenMaterial.defines.boxBlur=""),this.setupFramebuffers(1,1),this.checkCanUseSharedVelocityTexture()}dispose(){this._scene.userData.velocityTexture===this.velocityPass.renderTarget.texture&&(delete this._scene.userData.velocityTexture,delete this._scene.userData.lastVelocityTexture),this.renderTarget.dispose(),this.accumulatedTexture.dispose(),this.fullscreenMaterial.dispose(),this.velocityPass.dispose()}setSize(e,n){this.renderTarget.setSize(e,n),this.velocityPass.setSize(e*this.velocityResolutionScale,n*this.velocityResolutionScale),this.velocityPass.renderTarget.texture.minFilter=this.velocityResolutionScale===1?Qt:Dt,this.velocityPass.renderTarget.texture.magFilter=this.velocityResolutionScale===1?Qt:Dt,this.velocityPass.renderTarget.texture.needsUpdate=!0,this.fullscreenMaterial.uniforms.invTexSize.value.set(1/e,1/n),this.setupFramebuffers(e,n)}setupFramebuffers(e,n){this.accumulatedTexture&&this.accumulatedTexture.dispose(),this.lastVelocityTexture&&this.lastVelocityTexture.dispose(),this.accumulatedTexture=new N2(e,n,Jn),this.accumulatedTexture.minFilter=Dt,this.accumulatedTexture.magFilter=Dt,this.accumulatedTexture.type=yr,this.lastVelocityTexture=new N2(e*this.velocityResolutionScale,n*this.velocityResolutionScale,Jn),this.lastVelocityTexture.minFilter=this.velocityResolutionScale===1?Qt:Dt,this.lastVelocityTexture.magFilter=this.velocityResolutionScale===1?Qt:Dt,this.lastVelocityTexture.type=yr,this.fullscreenMaterial.uniforms.accumulatedTexture.value=this.accumulatedTexture,this.fullscreenMaterial.uniforms.lastVelocityTexture.value=this.lastVelocityTexture,this.fullscreenMaterial.needsUpdate=!0}checkCanUseSharedVelocityTexture(){return this._scene.userData.velocityTexture&&this.velocityPass.renderTarget.texture!==this._scene.userData.velocityTexture?this.velocityPass.renderTarget.texture===this.fullscreenMaterial.uniforms.velocityTexture.value&&(this.fullscreenMaterial.uniforms.lastVelocityTexture.value=this._scene.userData.lastVelocityTexture,this.fullscreenMaterial.uniforms.velocityTexture.value=this._scene.userData.velocityTexture,this.fullscreenMaterial.needsUpdate=!0):this.velocityPass.renderTarget.texture!==this.fullscreenMaterial.uniforms.velocityTexture.value&&(this.fullscreenMaterial.uniforms.velocityTexture.value=this.velocityPass.renderTarget.texture,this.fullscreenMaterial.uniforms.lastVelocityTexture.value=this.lastVelocityTexture,this.fullscreenMaterial.needsUpdate=!0,this._scene.userData.velocityTexture||(this._scene.userData.velocityTexture=this.velocityPass.renderTarget.texture,this._scene.userData.lastVelocityTexture=this.lastVelocityTexture)),this.velocityPass.renderTarget.texture!==this.fullscreenMaterial.uniforms.velocityTexture.value}checkNeedsResample(){const e=this.lastCameraTransform.position.distanceToSquared(this._camera.position),n=8*(1-this.lastCameraTransform.quaternion.dot(this._camera.quaternion));(e>1e-6||n>1e-6)&&(this.samples=1,this.lastCameraTransform.position.copy(this._camera.position),this.lastCameraTransform.quaternion.copy(this._camera.quaternion))}render(e){this.samples++,this.checkNeedsResample(),this.fullscreenMaterial.uniforms.samples.value=this.samples,e.setRenderTarget(this.renderTarget),e.render(this.scene,this.camera),e.copyFramebufferToTexture(GN,this.accumulatedTexture),e.setRenderTarget(this.velocityPass.renderTarget),e.copyFramebufferToTexture(GN,this.lastVelocityTexture)}}const WN=function(e,n){let r=1,i=0;for(;e>0;)r/=n,i+=r*(e%n),e=~~(e/n);return i},Vpe=t=>{const e=[];let n=1;const r=n+t;for(;n",Vpe),t.fragmentShader=jpe+` +`;function Ype(t,e,n){t.defines.BOX_PROJECTED_ENV_MAP="",t.uniforms.envMapPosition={value:e},t.uniforms.envMapSize={value:n};const r=new RegExp(YN("vec3 worldNormal = inverseTransformDirection ( normal , viewMatrix ) ;").replaceAll(" ","\\s*"),"g"),i=new RegExp(YN("reflectVec = inverseTransformDirection ( reflectVec , viewMatrix ) ;").replaceAll(" ","\\s*"),"g");t.vertexShader=`varying vec3 vWorldPosition; +`+t.vertexShader.replace("#include ",jpe),t.fragmentShader=$pe+` `+t.fragmentShader.replace("#include ",Vt.envmap_physical_pars_fragment).replace(r,`vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); - ${$pe}`).replace(i,`reflectVec = inverseTransformDirection( reflectVec, viewMatrix ); - ${Gpe}`)}const Ype=Spe.replace("#include ",X$).replace("#include ",wpe),Xpe=["blur","blurSharpness","blurKernel"],Zpe=new Cg(1);let Sy;class qpe extends Fi{constructor(e,n,r=$N){super("SSREffect",Ype,{type:"FinalSSRMaterial",uniforms:new Map([["reflectionsTexture",new Me(null)],["blur",new Me(0)],["blurSharpness",new Me(0)],["blurKernel",new Me(0)]]),defines:new Map([["RENDER_MODE","0"]])}),this.haltonSequence=Hpe(1024),this.haltonIndex=0,this.selection=new HR,this.lastSize=void 0,this.cubeCamera=new tR(.001,1e3,Zpe),this.usingBoxProjectedEnvMap=!1,this._scene=e,this._camera=n,r=J2({},$N,r,{boxBlur:!0,dilation:!0}),this.temporalResolvePass=new Bpe(e,n,bpe,r),this.uniforms.get("reflectionsTexture").value=this.temporalResolvePass.renderTarget.texture,this.reflectionsPass=new Rpe(this,r),this.temporalResolvePass.fullscreenMaterial.uniforms.inputTexture.value=this.reflectionsPass.renderTarget.texture,this.lastSize={width:r.width,height:r.height,resolutionScale:r.resolutionScale,velocityResolutionScale:r.velocityResolutionScale},this.setSize(r.width,r.height),this.makeOptionsReactive(r)}makeOptionsReactive(e){let n=!1;const r=this.reflectionsPass.fullscreenMaterial.uniforms,i=Object.keys(r);for(const o of Object.keys(e))Object.defineProperty(this,o,{get(){return e[o]},set(s){if(!(e[o]===s&&n))switch(e[o]=s,Xpe.includes(o)||this.setSize(this.lastSize.width,this.lastSize.height,!0),o){case"resolutionScale":this.setSize(this.lastSize.width,this.lastSize.height);break;case"velocityResolutionScale":this.temporalResolvePass.velocityResolutionScale=s,this.setSize(this.lastSize.width,this.lastSize.height,!0);break;case"blur":this.uniforms.get("blur").value=s;break;case"blurSharpness":this.uniforms.get("blurSharpness").value=s;break;case"blurKernel":this.uniforms.get("blurKernel").value=s;break;case"steps":this.reflectionsPass.fullscreenMaterial.defines.steps=parseInt(s),this.reflectionsPass.fullscreenMaterial.needsUpdate=n;break;case"refineSteps":this.reflectionsPass.fullscreenMaterial.defines.refineSteps=parseInt(s),this.reflectionsPass.fullscreenMaterial.needsUpdate=n;break;case"missedRays":s?this.reflectionsPass.fullscreenMaterial.defines.missedRays="":delete this.reflectionsPass.fullscreenMaterial.defines.missedRays,this.reflectionsPass.fullscreenMaterial.needsUpdate=n;break;case"correctionRadius":this.temporalResolvePass.fullscreenMaterial.defines.correctionRadius=Math.round(s),this.temporalResolvePass.fullscreenMaterial.needsUpdate=n;break;case"blend":this.temporalResolvePass.fullscreenMaterial.uniforms.blend.value=s;break;case"correction":this.temporalResolvePass.fullscreenMaterial.uniforms.correction.value=s;break;case"exponent":this.temporalResolvePass.fullscreenMaterial.uniforms.exponent.value=s;break;case"distance":r.rayDistance.value=s;default:i.includes(o)&&(r[o].value=s)}}}),this[o]=e[o];n=!0}setSize(e,n,r=!1){!r&&e===this.lastSize.width&&n===this.lastSize.height&&this.resolutionScale===this.lastSize.resolutionScale&&this.velocityResolutionScale===this.lastSize.velocityResolutionScale||(this.temporalResolvePass.setSize(e,n),this.reflectionsPass.setSize(e,n),this.lastSize={width:e,height:n,resolutionScale:this.resolutionScale,velocityResolutionScale:this.velocityResolutionScale})}generateBoxProjectedEnvMapFallback(e,n=new Z,r=new Z,i=512){this.cubeCamera.renderTarget.dispose(),this.cubeCamera.renderTarget=new Cg(i),this.cubeCamera.position.copy(n),this.cubeCamera.updateMatrixWorld(),this.cubeCamera.update(e,this._scene),Sy||(Sy=new Sx(e),Sy.compileCubemapShader());const o=Sy.fromCubemap(this.cubeCamera.renderTarget.texture).texture;o.minFilter=Dt,o.magFilter=Dt;const s=this.reflectionsPass.fullscreenMaterial;return Wpe(s,n,r),s.fragmentShader=s.fragmentShader.replace("vec3 worldPos","worldPos").replace("varying vec3 vWorldPosition;","vec3 worldPos;"),s.uniforms.envMapPosition.value.copy(n),s.uniforms.envMapSize.value.copy(r),jN(s,o,i),this.usingBoxProjectedEnvMap=!0,o}setIBLRadiance(e,n){this._scene.traverse(r=>{if(r.material){var i;const o=(i=n.properties.get(r.material))==null?void 0:i.uniforms;o&&"disableIBLRadiance"in o&&(o.disableIBLRadiance.value=e)}})}deleteBoxProjectedEnvMapFallback(){const e=this.reflectionsPass.fullscreenMaterial;e.uniforms.envMap.value=null,e.fragmentShader=e.fragmentShader.replace("worldPos = ","vec3 worldPos = "),delete e.defines.BOX_PROJECTED_ENV_MAP,e.needsUpdate=!0,this.usingBoxProjectedEnvMap=!1}dispose(){super.dispose(),this.reflectionsPass.dispose(),this.temporalResolvePass.dispose()}update(e,n){if(!this.usingBoxProjectedEnvMap&&this._scene.environment){const a=this.reflectionsPass.fullscreenMaterial;let l=null;if(this._scene.traverse(c=>{if(!l&&c.material&&!c.material.envMap){const u=e.properties.get(c.material);"envMap"in u&&u.envMap instanceof qn&&(l=u.envMap)}}),l){const c=this._scene.environment.image.height;jN(a,l,c)}}this.haltonIndex=(this.haltonIndex+1)%this.haltonSequence.length;const[r,i]=this.haltonSequence[this.haltonIndex],{width:o,height:s}=this.lastSize;this.temporalResolvePass.velocityPass.render(e),this._camera.setViewOffset&&this._camera.setViewOffset(o,s,r,i,o,s),this.reflectionsPass.render(e,n),this.temporalResolvePass.render(e),this._camera.clearViewOffset()}static patchDirectEnvIntensity(e=0){e===0?Vt.envmap_physical_pars_fragment=Vt.envmap_physical_pars_fragment.replace("vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {","vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) { return vec3(0.0);"):Vt.envmap_physical_pars_fragment=Vt.envmap_physical_pars_fragment.replace("vec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );","vec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness ) * "+e.toFixed(5)+";")}}const $g=M.createContext(null);function Kpe({children:t,enabled:e=!0}){const[n,r]=M.useState([]),i=M.useMemo(()=>({selected:n,select:r,enabled:e}),[n,r,e]);return I.jsx($g.Provider,{value:i,children:t})}function Qpe({enabled:t=!1,children:e,...n}){const r=M.useRef(null),i=M.useContext($g);return M.useEffect(()=>{if(i&&t){let o=!1;const s=[];if(r.current.traverse(a=>{a.type==="Mesh"&&s.push(a),i.selected.indexOf(a)===-1&&(o=!0)}),o)return i.select(a=>[...a,...s]),()=>{i.select(a=>a.filter(l=>!s.includes(l)))}}},[t,e,i]),I.jsx("group",{ref:r,...n,children:e})}const Nc=M.createContext(null),Jpe=H.memo(M.forwardRef(({children:t,camera:e,scene:n,resolutionScale:r,enabled:i=!0,renderPriority:o=1,autoClear:s=!0,depthBuffer:a,disableNormalPass:l,stencilBuffer:c,multisampling:u=8,frameBufferType:d=yr},f)=>{const{gl:h,scene:g,camera:y,size:_}=dn(),v=n||g,x=e||y,[w,S,E]=M.useMemo(()=>{const T=bue(),A=new jfe(h,{depthBuffer:a,stencilBuffer:c,multisampling:u>0&&T?u:0,frameBufferType:d});A.addPass(new Eh(v,x));let F=null,N=null;return l||(N=new Bfe(v,x),N.enabled=!1,A.addPass(N),r!==void 0&&T&&(F=new j$({normalBuffer:N.texture,resolutionScale:r}),F.enabled=!1,A.addPass(F))),[A,N,F]},[x,h,a,c,u,d,v,l,r]);M.useEffect(()=>w?.setSize(_.width,_.height),[w,_]),kc((T,A)=>{if(i){const F=h.autoClear;h.autoClear=s,c&&!s&&h.clearStencil(),w.render(A),h.autoClear=F}},i?o:0);const C=M.useRef(null),O=jce(C);M.useLayoutEffect(()=>{const T=[];if(C.current&&O.current&&w){const A=O.current.objects;for(let F=0;F{for(const A of T)w?.removePass(A);S&&(S.enabled=!1),E&&(E.enabled=!1)}},[w,t,x,S,E,O]);const R=M.useMemo(()=>({composer:w,normalPass:S,downSamplingPass:E,resolutionScale:r,camera:x,scene:v}),[w,S,E,r,x,v]);return M.useImperativeHandle(f,()=>w,[w]),I.jsx(Nc.Provider,{value:R,children:I.jsx("group",{ref:C,children:t})})})),Jl=t=>typeof t=="object"&&t!=null&&"current"in t?t.current:t,Kp=(t,e)=>{const n=t[e];return H.useMemo(()=>typeof n=="number"?new Ee(n,n):n?new Ee(...n):new Ee,[n])},eme=M.forwardRef(function({target:e,depthTexture:n,...r},i){const o=dn(l=>l.invalidate),{camera:s}=M.useContext(Nc),a=M.useMemo(()=>{const l=new Ihe(s,r),c=l.maskPass.getFullscreenMaterial();return c.maskFunction=_m.MULTIPLY_RGB_SET_ALPHA,l},[s,r]);return M.useLayoutEffect(()=>{if(e&&typeof e!="number"){const l=e instanceof Z?new Z().set(e.x,e.y,e.z):new Z().set(e[0],e[1],e[2]);a.target=l}n&&a.setDepthTexture(n.texture,n.packing),o()},[e,n,a]),I.jsx("primitive",{ref:i,object:a,dispose:null})});M.forwardRef(({target:t=void 0,mouse:e=!1,debug:n=void 0,manual:r=!1,smoothTime:i=.25,...o},s)=>{const a=M.useRef(null),l=M.useRef(null),c=M.useRef(null),u=dn(({scene:E})=>E),d=dn(({pointer:E})=>E),{composer:f,camera:h}=M.useContext(Nc),[g]=M.useState(()=>new Lfe),[y]=M.useState(()=>new V$);M.useEffect(()=>(f.addPass(g),f.addPass(y),()=>{f.removePass(g),f.removePass(y)}),[f,g,y]),M.useEffect(()=>()=>{g.dispose(),y.dispose()},[g,y]);const[_]=M.useState(()=>new Z(0,0,0)),[v]=M.useState(()=>new Z(0,0,0)),x=M.useCallback(async(E,C)=>(v.x=E,v.y=C,v.z=await g.readDepth(v),v.z=v.z*2-1,1-v.z>1e-7?v.unproject(h):!1),[v,g,h]),w=M.useCallback(async(E,C=!0)=>{var O;if(t)_.set(...t);else{const{x:R,y:T}=e?d:{x:0,y:0},A=await x(R,T);A&&_.copy(A)}C&&((O=a.current)!=null&&O.target)&&(i>0&&E>0?xpe.damp3(a.current.target,_,i,E):a.current.target.copy(_))},[t,_,e,x,i,d]);kc(async(E,C)=>{var O;r||w(C),l.current&&l.current.position.copy(_),c.current&&((O=a.current)!=null&&O.target)&&c.current.position.copy(a.current.target)});const S=M.useMemo(()=>({dofRef:a,hitpoint:_,update:w}),[_,w]);return M.useImperativeHandle(s,()=>S,[S]),I.jsxs(I.Fragment,{children:[n?DR(I.jsxs(I.Fragment,{children:[I.jsxs("mesh",{ref:l,children:[I.jsx("sphereGeometry",{args:[n,16,16]}),I.jsx("meshBasicMaterial",{color:"#00ff00",opacity:1,transparent:!0,depthWrite:!1})]}),I.jsxs("mesh",{ref:c,children:[I.jsx("sphereGeometry",{args:[n/2,16,16]}),I.jsx("meshBasicMaterial",{color:"#00ff00",opacity:.5,transparent:!0,depthWrite:!1})]})]}),u):null,I.jsx(eme,{ref:a,...o,target:_})]})});M.forwardRef(function(e,n){const r=Kp(e,"offset"),i=M.useMemo(()=>new Ahe({...e,offset:r}),[r,e]);return I.jsx("primitive",{ref:n,object:i,dispose:null})});M.forwardRef(function({blendFunction:e=Kt.NORMAL},n){const r=M.useMemo(()=>new The(e),[e]);return I.jsx("primitive",{ref:n,object:r,dispose:null})});M.forwardRef(function({active:e=!0,...n},r){const i=dn(u=>u.invalidate),o=Kp(n,"delay"),s=Kp(n,"duration"),a=Kp(n,"strength"),l=Kp(n,"chromaticAberrationOffset"),c=M.useMemo(()=>new Nhe({...n,delay:o,duration:s,strength:a,chromaticAberrationOffset:l}),[o,s,n,a,l]);return M.useLayoutEffect(()=>{c.mode=e?n.mode||vu.SPORADIC:vu.DISABLED,i()},[e,c,i,n.mode]),M.useEffect(()=>()=>{c.dispose()},[c]),I.jsx("primitive",{ref:r,object:c,dispose:null})});M.forwardRef(function(e,n){const{camera:r}=M.useContext(Nc),i=M.useMemo(()=>new zhe(r,Jl(e.sun),e),[r,e]);return M.useLayoutEffect(()=>void(i.lightSource=Jl(e.sun)),[i,e.sun]),I.jsx("primitive",{ref:n,object:i,dispose:null})});M.forwardRef(function({size:e,...n},r){const i=dn(s=>s.invalidate),o=M.useMemo(()=>new Bhe(n),[n]);return M.useLayoutEffect(()=>{e&&o.setSize(e.width,e.height),i()},[o,e]),I.jsx("primitive",{ref:r,object:o,dispose:null})});const tme=M.forwardRef(function({selection:e=[],selectionLayer:n=10,blendFunction:r,patternTexture:i,edgeStrength:o,pulseSpeed:s,visibleEdgeColor:a,hiddenEdgeColor:l,width:c,height:u,kernelSize:d,blur:f,xRay:h,...g},y){const _=dn(E=>E.invalidate),{scene:v,camera:x}=M.useContext(Nc),w=M.useMemo(()=>new Whe(v,x,{blendFunction:r,patternTexture:i,edgeStrength:o,pulseSpeed:s,visibleEdgeColor:a,hiddenEdgeColor:l,width:c,height:u,kernelSize:d,blur:f,xRay:h,...g}),[r,f,x,o,u,l,d,i,s,v,a,c,h]),S=M.useContext($g);return M.useEffect(()=>{if(!S&&e)return w.selection.set(Array.isArray(e)?e.map(Jl):[Jl(e)]),_(),()=>{w.selection.clear(),_()}},[w,e,S,_]),M.useEffect(()=>{w.selectionLayer=n,_()},[w,_,n]),M.useRef(),M.useEffect(()=>{var E;if(S&&S.enabled&&(E=S.selected)!=null&&E.length)return w.selection.set(S.selected),_(),()=>{w.selection.clear(),_()}},[S,w.selection,_]),I.jsx("primitive",{ref:y,object:w})});M.forwardRef(function({granularity:e=5},n){const r=M.useMemo(()=>new Xhe(e),[e]);return I.jsx("primitive",{ref:n,object:r,dispose:null})});const nme=(t,e)=>t.layers.enable(e.selection.layer),rme=(t,e)=>t.layers.disable(e.selection.layer);M.forwardRef(function({selection:e=[],selectionLayer:n=10,lights:r=[],luminanceThreshold:i,luminanceSmoothing:o,intensity:s,width:a,height:l,kernelSize:c,mipmapBlur:u,...d},f){r.length===0&&console.warn("SelectiveBloom requires lights to work.");const h=dn(x=>x.invalidate),{scene:g,camera:y}=M.useContext(Nc),_=M.useMemo(()=>new Zhe(g,y,{blendFunction:Kt.ADD,luminanceThreshold:i,luminanceSmoothing:o,intensity:s,width:a,height:l,kernelSize:c,mipmapBlur:u,...d}),[g,y,i,o,s,a,l,c,u,d]),v=M.useContext($g);return M.useEffect(()=>{if(!v&&e)return _.selection.set(Array.isArray(e)?e.map(Jl):[Jl(e)]),h(),()=>{_.selection.clear(),h()}},[_,e,v,h]),M.useEffect(()=>{_.selection.layer=n,h()},[_,h,n]),M.useEffect(()=>{if(r&&r.length>0)return r.forEach(x=>nme(Jl(x),_)),h(),()=>{r.forEach(x=>rme(Jl(x),_)),h()}},[_,h,r,n]),M.useEffect(()=>{var x;if(v&&v.enabled&&(x=v.selected)!=null&&x.length)return _.selection.set(v.selected),h(),()=>{_.selection.clear(),h()}},[v,_.selection,h]),I.jsx("primitive",{ref:f,object:_,dispose:null})});M.forwardRef(function(e,n){const{camera:r,normalPass:i,downSamplingPass:o,resolutionScale:s}=M.useContext(Nc),a=M.useMemo(()=>i===null&&o===null?(console.error("Please enable the NormalPass in the EffectComposer in order to use SSAO."),{}):new Khe(r,i&&!o?i.texture:null,{blendFunction:Kt.MULTIPLY,samples:30,rings:4,distanceThreshold:1,distanceFalloff:0,rangeThreshold:.5,rangeFalloff:.1,luminanceInfluence:.9,radius:20,bias:.5,intensity:1,color:void 0,normalDepthBuffer:o?o.texture:null,resolutionScale:s??1,depthAwareUpsampling:!0,...e}),[r,i,e]);return I.jsx("primitive",{ref:n,object:a,dispose:null})});M.forwardRef(function({textureSrc:e,texture:n,...r},i){const o=NS(mm,e);M.useLayoutEffect(()=>{o.encoding=Nn,o.wrapS=o.wrapT=Ro},[o]);const s=M.useMemo(()=>new epe({...r,texture:o||n}),[r,o,n]);return I.jsx("primitive",{ref:i,object:s,dispose:null})});M.forwardRef(function({lut:e,tetrahedralInterpolation:n,...r},i){const o=M.useMemo(()=>new jhe(e,r),[e,r]),s=dn(a=>a.invalidate);return M.useLayoutEffect(()=>{n&&(o.tetrahedralInterpolation=n),e&&(o.lut=e),s()},[o,s,e,n]),I.jsx("primitive",{ref:i,object:o,dispose:null})});const ime=` + ${Gpe}`).replace(i,`reflectVec = inverseTransformDirection( reflectVec, viewMatrix ); + ${Wpe}`)}const Xpe=bpe.replace("#include ",Z$).replace("#include ",Spe),Zpe=["blur","blurSharpness","blurKernel"],qpe=new Cg(1);let Sy;class Kpe extends Fi{constructor(e,n,r=$N){super("SSREffect",Xpe,{type:"FinalSSRMaterial",uniforms:new Map([["reflectionsTexture",new Me(null)],["blur",new Me(0)],["blurSharpness",new Me(0)],["blurKernel",new Me(0)]]),defines:new Map([["RENDER_MODE","0"]])}),this.haltonSequence=Vpe(1024),this.haltonIndex=0,this.selection=new HR,this.lastSize=void 0,this.cubeCamera=new tR(.001,1e3,qpe),this.usingBoxProjectedEnvMap=!1,this._scene=e,this._camera=n,r=eT({},$N,r,{boxBlur:!0,dilation:!0}),this.temporalResolvePass=new Hpe(e,n,Mpe,r),this.uniforms.get("reflectionsTexture").value=this.temporalResolvePass.renderTarget.texture,this.reflectionsPass=new Ape(this,r),this.temporalResolvePass.fullscreenMaterial.uniforms.inputTexture.value=this.reflectionsPass.renderTarget.texture,this.lastSize={width:r.width,height:r.height,resolutionScale:r.resolutionScale,velocityResolutionScale:r.velocityResolutionScale},this.setSize(r.width,r.height),this.makeOptionsReactive(r)}makeOptionsReactive(e){let n=!1;const r=this.reflectionsPass.fullscreenMaterial.uniforms,i=Object.keys(r);for(const o of Object.keys(e))Object.defineProperty(this,o,{get(){return e[o]},set(s){if(!(e[o]===s&&n))switch(e[o]=s,Zpe.includes(o)||this.setSize(this.lastSize.width,this.lastSize.height,!0),o){case"resolutionScale":this.setSize(this.lastSize.width,this.lastSize.height);break;case"velocityResolutionScale":this.temporalResolvePass.velocityResolutionScale=s,this.setSize(this.lastSize.width,this.lastSize.height,!0);break;case"blur":this.uniforms.get("blur").value=s;break;case"blurSharpness":this.uniforms.get("blurSharpness").value=s;break;case"blurKernel":this.uniforms.get("blurKernel").value=s;break;case"steps":this.reflectionsPass.fullscreenMaterial.defines.steps=parseInt(s),this.reflectionsPass.fullscreenMaterial.needsUpdate=n;break;case"refineSteps":this.reflectionsPass.fullscreenMaterial.defines.refineSteps=parseInt(s),this.reflectionsPass.fullscreenMaterial.needsUpdate=n;break;case"missedRays":s?this.reflectionsPass.fullscreenMaterial.defines.missedRays="":delete this.reflectionsPass.fullscreenMaterial.defines.missedRays,this.reflectionsPass.fullscreenMaterial.needsUpdate=n;break;case"correctionRadius":this.temporalResolvePass.fullscreenMaterial.defines.correctionRadius=Math.round(s),this.temporalResolvePass.fullscreenMaterial.needsUpdate=n;break;case"blend":this.temporalResolvePass.fullscreenMaterial.uniforms.blend.value=s;break;case"correction":this.temporalResolvePass.fullscreenMaterial.uniforms.correction.value=s;break;case"exponent":this.temporalResolvePass.fullscreenMaterial.uniforms.exponent.value=s;break;case"distance":r.rayDistance.value=s;default:i.includes(o)&&(r[o].value=s)}}}),this[o]=e[o];n=!0}setSize(e,n,r=!1){!r&&e===this.lastSize.width&&n===this.lastSize.height&&this.resolutionScale===this.lastSize.resolutionScale&&this.velocityResolutionScale===this.lastSize.velocityResolutionScale||(this.temporalResolvePass.setSize(e,n),this.reflectionsPass.setSize(e,n),this.lastSize={width:e,height:n,resolutionScale:this.resolutionScale,velocityResolutionScale:this.velocityResolutionScale})}generateBoxProjectedEnvMapFallback(e,n=new Z,r=new Z,i=512){this.cubeCamera.renderTarget.dispose(),this.cubeCamera.renderTarget=new Cg(i),this.cubeCamera.position.copy(n),this.cubeCamera.updateMatrixWorld(),this.cubeCamera.update(e,this._scene),Sy||(Sy=new Sx(e),Sy.compileCubemapShader());const o=Sy.fromCubemap(this.cubeCamera.renderTarget.texture).texture;o.minFilter=Dt,o.magFilter=Dt;const s=this.reflectionsPass.fullscreenMaterial;return Ype(s,n,r),s.fragmentShader=s.fragmentShader.replace("vec3 worldPos","worldPos").replace("varying vec3 vWorldPosition;","vec3 worldPos;"),s.uniforms.envMapPosition.value.copy(n),s.uniforms.envMapSize.value.copy(r),jN(s,o,i),this.usingBoxProjectedEnvMap=!0,o}setIBLRadiance(e,n){this._scene.traverse(r=>{if(r.material){var i;const o=(i=n.properties.get(r.material))==null?void 0:i.uniforms;o&&"disableIBLRadiance"in o&&(o.disableIBLRadiance.value=e)}})}deleteBoxProjectedEnvMapFallback(){const e=this.reflectionsPass.fullscreenMaterial;e.uniforms.envMap.value=null,e.fragmentShader=e.fragmentShader.replace("worldPos = ","vec3 worldPos = "),delete e.defines.BOX_PROJECTED_ENV_MAP,e.needsUpdate=!0,this.usingBoxProjectedEnvMap=!1}dispose(){super.dispose(),this.reflectionsPass.dispose(),this.temporalResolvePass.dispose()}update(e,n){if(!this.usingBoxProjectedEnvMap&&this._scene.environment){const a=this.reflectionsPass.fullscreenMaterial;let l=null;if(this._scene.traverse(c=>{if(!l&&c.material&&!c.material.envMap){const u=e.properties.get(c.material);"envMap"in u&&u.envMap instanceof qn&&(l=u.envMap)}}),l){const c=this._scene.environment.image.height;jN(a,l,c)}}this.haltonIndex=(this.haltonIndex+1)%this.haltonSequence.length;const[r,i]=this.haltonSequence[this.haltonIndex],{width:o,height:s}=this.lastSize;this.temporalResolvePass.velocityPass.render(e),this._camera.setViewOffset&&this._camera.setViewOffset(o,s,r,i,o,s),this.reflectionsPass.render(e,n),this.temporalResolvePass.render(e),this._camera.clearViewOffset()}static patchDirectEnvIntensity(e=0){e===0?Vt.envmap_physical_pars_fragment=Vt.envmap_physical_pars_fragment.replace("vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {","vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) { return vec3(0.0);"):Vt.envmap_physical_pars_fragment=Vt.envmap_physical_pars_fragment.replace("vec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );","vec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness ) * "+e.toFixed(5)+";")}}const $g=M.createContext(null);function Qpe({children:t,enabled:e=!0}){const[n,r]=M.useState([]),i=M.useMemo(()=>({selected:n,select:r,enabled:e}),[n,r,e]);return I.jsx($g.Provider,{value:i,children:t})}function Jpe({enabled:t=!1,children:e,...n}){const r=M.useRef(null),i=M.useContext($g);return M.useEffect(()=>{if(i&&t){let o=!1;const s=[];if(r.current.traverse(a=>{a.type==="Mesh"&&s.push(a),i.selected.indexOf(a)===-1&&(o=!0)}),o)return i.select(a=>[...a,...s]),()=>{i.select(a=>a.filter(l=>!s.includes(l)))}}},[t,e,i]),I.jsx("group",{ref:r,...n,children:e})}const Nc=M.createContext(null),eme=H.memo(M.forwardRef(({children:t,camera:e,scene:n,resolutionScale:r,enabled:i=!0,renderPriority:o=1,autoClear:s=!0,depthBuffer:a,disableNormalPass:l,stencilBuffer:c,multisampling:u=8,frameBufferType:d=yr},f)=>{const{gl:h,scene:g,camera:y,size:_}=dn(),v=n||g,x=e||y,[w,S,E]=M.useMemo(()=>{const T=Mue(),A=new $fe(h,{depthBuffer:a,stencilBuffer:c,multisampling:u>0&&T?u:0,frameBufferType:d});A.addPass(new Eh(v,x));let F=null,N=null;return l||(N=new Hfe(v,x),N.enabled=!1,A.addPass(N),r!==void 0&&T&&(F=new $$({normalBuffer:N.texture,resolutionScale:r}),F.enabled=!1,A.addPass(F))),[A,N,F]},[x,h,a,c,u,d,v,l,r]);M.useEffect(()=>w?.setSize(_.width,_.height),[w,_]),kc((T,A)=>{if(i){const F=h.autoClear;h.autoClear=s,c&&!s&&h.clearStencil(),w.render(A),h.autoClear=F}},i?o:0);const C=M.useRef(null),O=$ce(C);M.useLayoutEffect(()=>{const T=[];if(C.current&&O.current&&w){const A=O.current.objects;for(let F=0;F{for(const A of T)w?.removePass(A);S&&(S.enabled=!1),E&&(E.enabled=!1)}},[w,t,x,S,E,O]);const R=M.useMemo(()=>({composer:w,normalPass:S,downSamplingPass:E,resolutionScale:r,camera:x,scene:v}),[w,S,E,r,x,v]);return M.useImperativeHandle(f,()=>w,[w]),I.jsx(Nc.Provider,{value:R,children:I.jsx("group",{ref:C,children:t})})})),Jl=t=>typeof t=="object"&&t!=null&&"current"in t?t.current:t,Kp=(t,e)=>{const n=t[e];return H.useMemo(()=>typeof n=="number"?new Ee(n,n):n?new Ee(...n):new Ee,[n])},tme=M.forwardRef(function({target:e,depthTexture:n,...r},i){const o=dn(l=>l.invalidate),{camera:s}=M.useContext(Nc),a=M.useMemo(()=>{const l=new Lhe(s,r),c=l.maskPass.getFullscreenMaterial();return c.maskFunction=_m.MULTIPLY_RGB_SET_ALPHA,l},[s,r]);return M.useLayoutEffect(()=>{if(e&&typeof e!="number"){const l=e instanceof Z?new Z().set(e.x,e.y,e.z):new Z().set(e[0],e[1],e[2]);a.target=l}n&&a.setDepthTexture(n.texture,n.packing),o()},[e,n,a]),I.jsx("primitive",{ref:i,object:a,dispose:null})});M.forwardRef(({target:t=void 0,mouse:e=!1,debug:n=void 0,manual:r=!1,smoothTime:i=.25,...o},s)=>{const a=M.useRef(null),l=M.useRef(null),c=M.useRef(null),u=dn(({scene:E})=>E),d=dn(({pointer:E})=>E),{composer:f,camera:h}=M.useContext(Nc),[g]=M.useState(()=>new kfe),[y]=M.useState(()=>new j$);M.useEffect(()=>(f.addPass(g),f.addPass(y),()=>{f.removePass(g),f.removePass(y)}),[f,g,y]),M.useEffect(()=>()=>{g.dispose(),y.dispose()},[g,y]);const[_]=M.useState(()=>new Z(0,0,0)),[v]=M.useState(()=>new Z(0,0,0)),x=M.useCallback(async(E,C)=>(v.x=E,v.y=C,v.z=await g.readDepth(v),v.z=v.z*2-1,1-v.z>1e-7?v.unproject(h):!1),[v,g,h]),w=M.useCallback(async(E,C=!0)=>{var O;if(t)_.set(...t);else{const{x:R,y:T}=e?d:{x:0,y:0},A=await x(R,T);A&&_.copy(A)}C&&((O=a.current)!=null&&O.target)&&(i>0&&E>0?wpe.damp3(a.current.target,_,i,E):a.current.target.copy(_))},[t,_,e,x,i,d]);kc(async(E,C)=>{var O;r||w(C),l.current&&l.current.position.copy(_),c.current&&((O=a.current)!=null&&O.target)&&c.current.position.copy(a.current.target)});const S=M.useMemo(()=>({dofRef:a,hitpoint:_,update:w}),[_,w]);return M.useImperativeHandle(s,()=>S,[S]),I.jsxs(I.Fragment,{children:[n?DR(I.jsxs(I.Fragment,{children:[I.jsxs("mesh",{ref:l,children:[I.jsx("sphereGeometry",{args:[n,16,16]}),I.jsx("meshBasicMaterial",{color:"#00ff00",opacity:1,transparent:!0,depthWrite:!1})]}),I.jsxs("mesh",{ref:c,children:[I.jsx("sphereGeometry",{args:[n/2,16,16]}),I.jsx("meshBasicMaterial",{color:"#00ff00",opacity:.5,transparent:!0,depthWrite:!1})]})]}),u):null,I.jsx(tme,{ref:a,...o,target:_})]})});M.forwardRef(function(e,n){const r=Kp(e,"offset"),i=M.useMemo(()=>new Dhe({...e,offset:r}),[r,e]);return I.jsx("primitive",{ref:n,object:i,dispose:null})});M.forwardRef(function({blendFunction:e=Kt.NORMAL},n){const r=M.useMemo(()=>new Ohe(e),[e]);return I.jsx("primitive",{ref:n,object:r,dispose:null})});M.forwardRef(function({active:e=!0,...n},r){const i=dn(u=>u.invalidate),o=Kp(n,"delay"),s=Kp(n,"duration"),a=Kp(n,"strength"),l=Kp(n,"chromaticAberrationOffset"),c=M.useMemo(()=>new Fhe({...n,delay:o,duration:s,strength:a,chromaticAberrationOffset:l}),[o,s,n,a,l]);return M.useLayoutEffect(()=>{c.mode=e?n.mode||vu.SPORADIC:vu.DISABLED,i()},[e,c,i,n.mode]),M.useEffect(()=>()=>{c.dispose()},[c]),I.jsx("primitive",{ref:r,object:c,dispose:null})});M.forwardRef(function(e,n){const{camera:r}=M.useContext(Nc),i=M.useMemo(()=>new Uhe(r,Jl(e.sun),e),[r,e]);return M.useLayoutEffect(()=>void(i.lightSource=Jl(e.sun)),[i,e.sun]),I.jsx("primitive",{ref:n,object:i,dispose:null})});M.forwardRef(function({size:e,...n},r){const i=dn(s=>s.invalidate),o=M.useMemo(()=>new Hhe(n),[n]);return M.useLayoutEffect(()=>{e&&o.setSize(e.width,e.height),i()},[o,e]),I.jsx("primitive",{ref:r,object:o,dispose:null})});const nme=M.forwardRef(function({selection:e=[],selectionLayer:n=10,blendFunction:r,patternTexture:i,edgeStrength:o,pulseSpeed:s,visibleEdgeColor:a,hiddenEdgeColor:l,width:c,height:u,kernelSize:d,blur:f,xRay:h,...g},y){const _=dn(E=>E.invalidate),{scene:v,camera:x}=M.useContext(Nc),w=M.useMemo(()=>new Yhe(v,x,{blendFunction:r,patternTexture:i,edgeStrength:o,pulseSpeed:s,visibleEdgeColor:a,hiddenEdgeColor:l,width:c,height:u,kernelSize:d,blur:f,xRay:h,...g}),[r,f,x,o,u,l,d,i,s,v,a,c,h]),S=M.useContext($g);return M.useEffect(()=>{if(!S&&e)return w.selection.set(Array.isArray(e)?e.map(Jl):[Jl(e)]),_(),()=>{w.selection.clear(),_()}},[w,e,S,_]),M.useEffect(()=>{w.selectionLayer=n,_()},[w,_,n]),M.useRef(),M.useEffect(()=>{var E;if(S&&S.enabled&&(E=S.selected)!=null&&E.length)return w.selection.set(S.selected),_(),()=>{w.selection.clear(),_()}},[S,w.selection,_]),I.jsx("primitive",{ref:y,object:w})});M.forwardRef(function({granularity:e=5},n){const r=M.useMemo(()=>new Zhe(e),[e]);return I.jsx("primitive",{ref:n,object:r,dispose:null})});const rme=(t,e)=>t.layers.enable(e.selection.layer),ime=(t,e)=>t.layers.disable(e.selection.layer);M.forwardRef(function({selection:e=[],selectionLayer:n=10,lights:r=[],luminanceThreshold:i,luminanceSmoothing:o,intensity:s,width:a,height:l,kernelSize:c,mipmapBlur:u,...d},f){r.length===0&&console.warn("SelectiveBloom requires lights to work.");const h=dn(x=>x.invalidate),{scene:g,camera:y}=M.useContext(Nc),_=M.useMemo(()=>new qhe(g,y,{blendFunction:Kt.ADD,luminanceThreshold:i,luminanceSmoothing:o,intensity:s,width:a,height:l,kernelSize:c,mipmapBlur:u,...d}),[g,y,i,o,s,a,l,c,u,d]),v=M.useContext($g);return M.useEffect(()=>{if(!v&&e)return _.selection.set(Array.isArray(e)?e.map(Jl):[Jl(e)]),h(),()=>{_.selection.clear(),h()}},[_,e,v,h]),M.useEffect(()=>{_.selection.layer=n,h()},[_,h,n]),M.useEffect(()=>{if(r&&r.length>0)return r.forEach(x=>rme(Jl(x),_)),h(),()=>{r.forEach(x=>ime(Jl(x),_)),h()}},[_,h,r,n]),M.useEffect(()=>{var x;if(v&&v.enabled&&(x=v.selected)!=null&&x.length)return _.selection.set(v.selected),h(),()=>{_.selection.clear(),h()}},[v,_.selection,h]),I.jsx("primitive",{ref:f,object:_,dispose:null})});M.forwardRef(function(e,n){const{camera:r,normalPass:i,downSamplingPass:o,resolutionScale:s}=M.useContext(Nc),a=M.useMemo(()=>i===null&&o===null?(console.error("Please enable the NormalPass in the EffectComposer in order to use SSAO."),{}):new Qhe(r,i&&!o?i.texture:null,{blendFunction:Kt.MULTIPLY,samples:30,rings:4,distanceThreshold:1,distanceFalloff:0,rangeThreshold:.5,rangeFalloff:.1,luminanceInfluence:.9,radius:20,bias:.5,intensity:1,color:void 0,normalDepthBuffer:o?o.texture:null,resolutionScale:s??1,depthAwareUpsampling:!0,...e}),[r,i,e]);return I.jsx("primitive",{ref:n,object:a,dispose:null})});M.forwardRef(function({textureSrc:e,texture:n,...r},i){const o=NS(mm,e);M.useLayoutEffect(()=>{o.encoding=Nn,o.wrapS=o.wrapT=Ro},[o]);const s=M.useMemo(()=>new tpe({...r,texture:o||n}),[r,o,n]);return I.jsx("primitive",{ref:i,object:s,dispose:null})});M.forwardRef(function({lut:e,tetrahedralInterpolation:n,...r},i){const o=M.useMemo(()=>new $he(e,r),[e,r]),s=dn(a=>a.invalidate);return M.useLayoutEffect(()=>{n&&(o.tetrahedralInterpolation=n),e&&(o.lut=e),s()},[o,s,e,n]),I.jsx("primitive",{ref:i,object:o,dispose:null})});const ome=` uniform sampler2D uCharacters; uniform float uCharactersCount; uniform float uCellSize; @@ -4938,7 +4938,7 @@ void mainImage(const in vec4 inputColor, const in vec2 uv, out vec4 outputColor) asciiCharacter.a = pixelized.a; outputColor = asciiCharacter; } -`;class ome extends Fi{constructor({characters:e=" .:,'-^=*+?!|0#X%WM@",fontSize:n=54,cellSize:r=16,color:i="#ffffff",invert:o=!1}={}){const s=new Map([["uCharacters",new Me(new qn)],["uCellSize",new Me(r)],["uCharactersCount",new Me(e.length)],["uColor",new Me(new lt(i))],["uInvert",new Me(o)]]);super("ASCIIEffect",ime,{uniforms:s});const a=this.uniforms.get("uCharacters");a&&(a.value=this.createCharactersTexture(e,n))}createCharactersTexture(e,n){const r=document.createElement("canvas"),i=1024,o=16,s=i/o;r.width=r.height=i;const a=new l8(r,void 0,Ro,Ro,Qt,Qt),l=r.getContext("2d");if(!l)throw new Error("Context not available");l.clearRect(0,0,i,i),l.font=`${n}px arial`,l.textAlign="center",l.textBaseline="middle",l.fillStyle="#fff";for(let c=0;c{const s=M.useMemo(()=>new ome({characters:t,fontSize:e,cellSize:n,color:r,invert:i}),[t,e,n,r,i]);return I.jsx("primitive",{ref:o,object:s})});M.forwardRef(function({ENABLE_BLUR:e=!0,USE_MRT:n=!0,...r},i){const{invalidate:o}=dn(),{scene:s,camera:a}=M.useContext(Nc),l=M.useMemo(()=>new qpe(s,a,{ENABLE_BLUR:e,USE_MRT:n,...r}),[s,a,e,n,r]),c=M.useContext($g);return M.useEffect(()=>{var u;if(c&&c.enabled&&(u=c.selected)!=null&&u.length)return l.selection.set(c.selected),o(),()=>{l.selection.clear(),o()}},[c]),I.jsx("primitive",{ref:i,object:l,...r})});const Gg=new Jt;Gg.setAttribute("position",new Mn(new Float32Array([-1,-1,3,-1,-1,3]),2));Gg.setAttribute("uv",new Mn(new Float32Array([0,0,2,0,0,2]),2));Gg.boundingSphere=new mo;Gg.computeBoundingSphere=function(){};const sme=new Ic;class Dp{constructor(e){this._mesh=new Er(Gg,e),this._mesh.frustumCulled=!1}render(e){e.render(this._mesh,sme)}get material(){return this._mesh.material}set material(e){this._mesh.material=e}dispose(){this._mesh.material.dispose(),this._mesh.geometry.dispose()}}const ame={uniforms:{sceneDiffuse:{value:null},sceneDepth:{value:null},sceneNormal:{value:null},projMat:{value:new rt},viewMat:{value:new rt},projViewMat:{value:new rt},projectionMatrixInv:{value:new rt},viewMatrixInv:{value:new rt},cameraPos:{value:new Z},resolution:{value:new Ee},time:{value:0},samples:{value:[]},samplesR:{value:[]},bluenoise:{value:null},distanceFalloff:{value:1},radius:{value:5},near:{value:.1},far:{value:1e3},logDepth:{value:!1},ortho:{value:!1},screenSpaceRadius:{value:!1}},vertexShader:` +`;class sme extends Fi{constructor({characters:e=" .:,'-^=*+?!|0#X%WM@",fontSize:n=54,cellSize:r=16,color:i="#ffffff",invert:o=!1}={}){const s=new Map([["uCharacters",new Me(new qn)],["uCellSize",new Me(r)],["uCharactersCount",new Me(e.length)],["uColor",new Me(new lt(i))],["uInvert",new Me(o)]]);super("ASCIIEffect",ome,{uniforms:s});const a=this.uniforms.get("uCharacters");a&&(a.value=this.createCharactersTexture(e,n))}createCharactersTexture(e,n){const r=document.createElement("canvas"),i=1024,o=16,s=i/o;r.width=r.height=i;const a=new c8(r,void 0,Ro,Ro,Qt,Qt),l=r.getContext("2d");if(!l)throw new Error("Context not available");l.clearRect(0,0,i,i),l.font=`${n}px arial`,l.textAlign="center",l.textBaseline="middle",l.fillStyle="#fff";for(let c=0;c{const s=M.useMemo(()=>new sme({characters:t,fontSize:e,cellSize:n,color:r,invert:i}),[t,e,n,r,i]);return I.jsx("primitive",{ref:o,object:s})});M.forwardRef(function({ENABLE_BLUR:e=!0,USE_MRT:n=!0,...r},i){const{invalidate:o}=dn(),{scene:s,camera:a}=M.useContext(Nc),l=M.useMemo(()=>new Kpe(s,a,{ENABLE_BLUR:e,USE_MRT:n,...r}),[s,a,e,n,r]),c=M.useContext($g);return M.useEffect(()=>{var u;if(c&&c.enabled&&(u=c.selected)!=null&&u.length)return l.selection.set(c.selected),o(),()=>{l.selection.clear(),o()}},[c]),I.jsx("primitive",{ref:i,object:l,...r})});const Gg=new Jt;Gg.setAttribute("position",new Mn(new Float32Array([-1,-1,3,-1,-1,3]),2));Gg.setAttribute("uv",new Mn(new Float32Array([0,0,2,0,0,2]),2));Gg.boundingSphere=new mo;Gg.computeBoundingSphere=function(){};const ame=new Ic;class Dp{constructor(e){this._mesh=new Er(Gg,e),this._mesh.frustumCulled=!1}render(e){e.render(this._mesh,ame)}get material(){return this._mesh.material}set material(e){this._mesh.material=e}dispose(){this._mesh.material.dispose(),this._mesh.geometry.dispose()}}const lme={uniforms:{sceneDiffuse:{value:null},sceneDepth:{value:null},sceneNormal:{value:null},projMat:{value:new rt},viewMat:{value:new rt},projViewMat:{value:new rt},projectionMatrixInv:{value:new rt},viewMatrixInv:{value:new rt},cameraPos:{value:new Z},resolution:{value:new Ee},time:{value:0},samples:{value:[]},samplesR:{value:[]},bluenoise:{value:null},distanceFalloff:{value:1},radius:{value:5},near:{value:.1},far:{value:1e3},logDepth:{value:!1},ortho:{value:!1},screenSpaceRadius:{value:!1}},vertexShader:` varying vec2 vUv; void main() { vUv = uv; @@ -5063,11 +5063,11 @@ void main() { float totalWeight = 0.0; /* float radiusScreen = distance( worldPos, - getWorldPos(depth, vUv + + getWorldPos(depth, vUv + vec2(48.0, 0.0) / resolution) );/*vUv.x < 0.5 ? radius : min(distance( worldPos, - getWorldPos(depth, vUv + + getWorldPos(depth, vUv + vec2(100.0, 0.0) / resolution) ), radius); float distanceFalloffScreen = radiusScreen * 0.2;*/ @@ -5081,8 +5081,8 @@ void main() { : distanceFalloff; float bias = (0.1 / near) * fwidth(distance(worldPos, cameraPos)) / radiusToUse; for(float i = 0.0; i < FSAMPLES; i++) { - vec3 sampleDirection = - tbn * + vec3 sampleDirection = + tbn * samples[int(i)]; ; float moveAmt = samplesR[int(mod(i + noise.a * FSAMPLES, FSAMPLES))]; @@ -5091,7 +5091,7 @@ void main() { offset.xyz /= offset.w; offset.xyz = offset.xyz * 0.5 + 0.5; float sampleDepth = textureLod(sceneDepth, offset.xy, 0.0).x; - /*float distSample = logDepth ? linearize_depth_log(sampleDepth, near, far) + /*float distSample = logDepth ? linearize_depth_log(sampleDepth, near, far) (ortho ? linearize_depth_ortho(sampleDepth, near, far) : linearize_depth(sampleDepth, near, far));*/ #ifdef LOGDEPTH float distSample = linearize_depth_log(sampleDepth, near, far); @@ -5102,13 +5102,13 @@ void main() { float rangeCheck = smoothstep(0.0, 1.0, distanceFalloffToUse / (abs(distSample - distWorld))); vec2 diff = gl_FragCoord.xy - ( offset.xy * resolution); float weight = dot(sampleDirection, normal); - occluded += rangeCheck * weight * + occluded += rangeCheck * weight * (distSample + bias < distWorld ? 1.0 : 0.0) * ( (dot( diff, diff - + ) < 1.0 || (sampleDepth == depth) || ( offset.x < 0.0 || offset.x > 1.0 || offset.y < 0.0 || offset.y > 1.0 ) ? 0.0 : 1.0) @@ -5117,7 +5117,7 @@ void main() { } float occ = clamp(1.0 - occluded / totalWeight, 0.0, 1.0); gl_FragColor = vec4(0.5 + 0.5 * normal, occ); -}`},lme={uniforms:{sceneDiffuse:{value:null},sceneDepth:{value:null},tDiffuse:{value:null},projMat:{value:new rt},viewMat:{value:new rt},projectionMatrixInv:{value:new rt},viewMatrixInv:{value:new rt},cameraPos:{value:new Z},resolution:{value:new Ee},color:{value:new Z(0,0,0)},blueNoise:{value:null},downsampledDepth:{value:null},time:{value:0},intensity:{value:10},renderMode:{value:0},gammaCorrection:{value:!1},logDepth:{value:!1},ortho:{value:!1},near:{value:.1},far:{value:1e3},screenSpaceRadius:{value:!1},radius:{value:0},distanceFalloff:{value:1},fog:{value:!1},fogExp:{value:!1},fogDensity:{value:0},fogNear:{value:1/0},fogFar:{value:1/0},colorMultiply:{value:!0}},vertexShader:` +}`},cme={uniforms:{sceneDiffuse:{value:null},sceneDepth:{value:null},tDiffuse:{value:null},projMat:{value:new rt},viewMat:{value:new rt},projectionMatrixInv:{value:new rt},viewMatrixInv:{value:new rt},cameraPos:{value:new Z},resolution:{value:new Ee},color:{value:new Z(0,0,0)},blueNoise:{value:null},downsampledDepth:{value:null},time:{value:0},intensity:{value:10},renderMode:{value:0},gammaCorrection:{value:!1},logDepth:{value:!1},ortho:{value:!1},near:{value:.1},far:{value:1e3},screenSpaceRadius:{value:!1},radius:{value:0},distanceFalloff:{value:1},fog:{value:!1},fogExp:{value:!1},fogDensity:{value:0},fogNear:{value:1/0},fogFar:{value:1/0},colorMultiply:{value:!0}},vertexShader:` varying vec2 vUv; void main() { vUv = uv; @@ -5195,7 +5195,7 @@ void main() { worldSpacePosition.xyz /= worldSpacePosition.w; return worldSpacePosition.xyz; } - + vec3 computeNormal(vec3 worldPos, vec2 vUv) { ivec2 p = ivec2(vUv * resolution); float c0 = texelFetch(sceneDepth, p, 0).x; @@ -5207,19 +5207,19 @@ void main() { float b1 = texelFetch(sceneDepth, p - ivec2(0, 1), 0).x; float t1 = texelFetch(sceneDepth, p + ivec2(0, 1), 0).x; float t2 = texelFetch(sceneDepth, p + ivec2(0, 2), 0).x; - + float dl = abs((2.0 * l1 - l2) - c0); float dr = abs((2.0 * r1 - r2) - c0); float db = abs((2.0 * b1 - b2) - c0); float dt = abs((2.0 * t1 - t2) - c0); - + vec3 ce = getWorldPos(c0, vUv).xyz; - + vec3 dpdx = (dl < dr) ? ce - getWorldPos(l1, (vUv - vec2(1.0 / resolution.x, 0.0))).xyz : -ce + getWorldPos(r1, (vUv + vec2(1.0 / resolution.x, 0.0))).xyz; vec3 dpdy = (db < dt) ? ce - getWorldPos(b1, (vUv - vec2(0.0, 1.0 / resolution.y))).xyz : -ce + getWorldPos(t1, (vUv + vec2(0.0, 1.0 / resolution.y))).xyz; - + return normalize(cross(dpdx, dpdy)); } @@ -5232,7 +5232,7 @@ void main() { sceneDepth, vUv ).x; - #ifdef HALFRES + #ifdef HALFRES vec4 texel; if (depth == 1.0) { texel = vec4(0.0, 0.0, 0.0, 1.0); @@ -5278,7 +5278,7 @@ void main() { vec4 texel = texture2D(tDiffuse, vUv); #endif - + float finalAo = pow(texel.a, intensity); float fogFactor; float fogDepth = distance( @@ -5322,7 +5322,7 @@ void main() { gl_FragColor = LinearTosRGB(gl_FragColor); } } - `},cme={uniforms:{sceneDiffuse:{value:null},sceneDepth:{value:null},tDiffuse:{value:null},projMat:{value:new rt},viewMat:{value:new rt},projectionMatrixInv:{value:new rt},viewMatrixInv:{value:new rt},cameraPos:{value:new Z},resolution:{value:new Ee},time:{value:0},r:{value:5},blueNoise:{value:null},radius:{value:12},worldRadius:{value:5},index:{value:0},poissonDisk:{value:[]},distanceFalloff:{value:1},near:{value:.1},far:{value:1e3},logDepth:{value:!1},screenSpaceRadius:{value:!1}},vertexShader:` + `},ume={uniforms:{sceneDiffuse:{value:null},sceneDepth:{value:null},tDiffuse:{value:null},projMat:{value:new rt},viewMat:{value:new rt},projectionMatrixInv:{value:new rt},viewMatrixInv:{value:new rt},cameraPos:{value:new Z},resolution:{value:new Ee},time:{value:0},r:{value:5},blueNoise:{value:null},radius:{value:12},worldRadius:{value:5},index:{value:0},poissonDisk:{value:[]},distanceFalloff:{value:1},near:{value:.1},far:{value:1e3},logDepth:{value:!1},screenSpaceRadius:{value:!1}},vertexShader:` varying vec2 vUv; void main() { vUv = uv; @@ -5378,7 +5378,7 @@ void main() { #ifdef LOGDEPTH return getWorldPosLog(vec3(coord, depth)); #endif - + float z = depth * 2.0 - 1.0; vec4 clipSpacePosition = vec4(coord * 2.0 - 1.0, z, 1.0); vec4 viewSpacePosition = projectionMatrixInv * clipSpacePosition; @@ -5439,7 +5439,7 @@ void main() { occlusion /= count; gl_FragColor = vec4(0.5 + 0.5 * normal, occlusion); } - `},ume={uniforms:{sceneDepth:{value:null},resolution:{value:new Ee},near:{value:.1},far:{value:1e3},viewMatrixInv:{value:new rt},projectionMatrixInv:{value:new rt},logDepth:{value:!1}},vertexShader:` + `},dme={uniforms:{sceneDepth:{value:null},resolution:{value:new Ee},near:{value:.1},far:{value:1e3},viewMatrixInv:{value:new rt},projectionMatrixInv:{value:new rt},logDepth:{value:!1}},vertexShader:` varying vec2 vUv; void main() { vUv = uv; @@ -5479,7 +5479,7 @@ void main() { worldSpacePosition.xyz /= worldSpacePosition.w; return worldSpacePosition.xyz; } - + vec3 computeNormal(vec3 worldPos, vec2 vUv) { ivec2 p = ivec2(vUv * resolution); float c0 = texelFetch(sceneDepth, p, 0).x; @@ -5491,19 +5491,19 @@ void main() { float b1 = texelFetch(sceneDepth, p - ivec2(0, 1), 0).x; float t1 = texelFetch(sceneDepth, p + ivec2(0, 1), 0).x; float t2 = texelFetch(sceneDepth, p + ivec2(0, 2), 0).x; - + float dl = abs((2.0 * l1 - l2) - c0); float dr = abs((2.0 * r1 - r2) - c0); float db = abs((2.0 * b1 - b2) - c0); float dt = abs((2.0 * t1 - t2) - c0); - + vec3 ce = getWorldPos(c0, vUv).xyz; - + vec3 dpdx = (dl < dr) ? ce - getWorldPos(l1, (vUv - vec2(1.0 / resolution.x, 0.0))).xyz : -ce + getWorldPos(r1, (vUv + vec2(1.0 / resolution.x, 0.0))).xyz; vec3 dpdy = (db < dt) ? ce - getWorldPos(b1, (vUv - vec2(0.0, 1.0 / resolution.y))).xyz : -ce + getWorldPos(t1, (vUv + vec2(0.0, 1.0 / resolution.y))).xyz; - + return normalize(cross(dpdx, dpdy)); } void main() { @@ -5523,7 +5523,7 @@ void main() { float maxDepth = max(max(depth00, depth10), max(depth01, depth11)); float targetDepth = minDepth; // Checkerboard pattern to avoid artifacts - if (mod(gl_FragCoord.x + gl_FragCoord.y, 2.0) > 0.5) { + if (mod(gl_FragCoord.x + gl_FragCoord.y, 2.0) > 0.5) { targetDepth = maxDepth; } int chosenIndex = 0; @@ -5579,7 +5579,7 @@ void main() { gNormal = vec4(computeNormal( getWorldPos(samples[remaining[i]], uvSamples[remaining[i]]), uvSamples[remaining[i]] ), 0.0);*/ - }`};var q$="5L7pP4UXrOIr/VZ1G3f6p89FIWU7lqc7J3DPxKjJUXODJoHQzf/aNVM+ABlvhXeBGN7iC0WkmTjEaAqOItBfBdaK5KSGV1ET5SOKl3x9JOX5w2sAl6+6KjDhVUHgbqq7DZ5EeYzbdSNxtrQLW/KkPJoOTG4u5CBUZkCKHniY9l7DUgjuz708zG1HIC8qfohi1vPjPH9Lq47ksjRrjwXD4MlVCjdAqYFGodQ8tRmHkOfq4wVRIAHvoavPHvN1lpk3X4Y1yzAPGe8S9KBs3crc4GwlU1dEOXiWol/mgQqxkNqB1xd04+0Bmpwj0GcCc4NUi+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b326vT2hS1JAZ9E6sujFtKTiJ7bxI6o4cBhDaX+adXREThhR+MwA4TqD7rga/o9iY7d6TVRe14CS2S3iSQsD0R6ApnhG/2Wa0A0AY2NtWTjmabdKU+KgIRDP9RQYVjXiF1qC+xyNVG03I9vpmEpY/G/zC4nLOKgXAZ/uTikHI9Afbkhfgfgo9arWbix5eH7WUo9RQygDzwCnVSjbXc7MihEufVj6WGbK963pw8VjY3RS8IH1cy2yZbIcKLO5CgAUcXJfF2+McnDLKtXxyZaf7SPA6KJq+zF2NHyfoeTOwHhGqNcnHVr1hT73pcoyXyfvCYBnG1Bp/aR9t8hoI7CXM3UZOisWGA1SHZ2jf7k9GlRnp3mF/c1AV+JjvUsnZrsybEOQJg/dn/9eJkyykQHjbF56zgcPX6DdMG03WKUMlYz+uOZ+5DZy9E9MZOZ9GMoLFdrIPPQQLjv+GlCMpoyHPXkzIODjHAID2PrnaRpqWVHh0rnieDILKq+Emrd5RnjgE9pDUXWTmHaKuqqYlcgEz4zbi46dbWrAAFBjsQq1rLHIiPJEcwFLCOY4JNlXRXQJqCUKXk2d1RSBGzDP6HDSpo863BhVRFFF6uIpjQV7j5ebFe3UkkO/+coIo2BTAcgBqOtQ134s9a4QJvofuqBYMGOBMsWZ+sn/2AOxDx6SfAnDFGw==";const dme=Uint8Array.from(atob(q$),t=>t.charCodeAt(0));function K$(t,e,n){if(e.getQueryParameter(t,e.QUERY_RESULT_AVAILABLE)){const o=e.getQueryParameter(t,e.QUERY_RESULT)/1e6;n.lastTime=o}else setTimeout(()=>{K$(t,e,n)},1)}class fme extends Dr{constructor(e,n,r=512,i=512){super(),this.width=r,this.height=i,this.clear=!0,this.camera=n,this.scene=e,this.autosetGamma=!0,this.configuration=new Proxy({aoSamples:16,aoRadius:5,denoiseSamples:8,denoiseRadius:12,distanceFalloff:1,intensity:5,denoiseIterations:2,renderMode:0,color:new lt(0,0,0),gammaCorrection:!0,logarithmicDepthBuffer:!1,screenSpaceRadius:!1,halfRes:!1,depthAwareUpsampling:!0,colorMultiply:!0},{set:(o,s,a)=>{const l=o[s];return o[s]=a,s==="aoSamples"&&l!==a&&this.configureAOPass(this.configuration.logarithmicDepthBuffer),s==="denoiseSamples"&&l!==a&&this.configureDenoisePass(this.configuration.logarithmicDepthBuffer),s==="halfRes"&&l!==a&&(this.configureAOPass(this.configuration.logarithmicDepthBuffer),this.configureHalfResTargets(),this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer),this.setSize(this.width,this.height)),s==="depthAwareUpsampling"&&l!==a&&this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer),s==="gammaCorrection"&&(this.autosetGamma=!1),!0}}),this.samples=[],this.samplesR=[],this.samplesDenoise=[],this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer),this.configureSampleDependentPasses(),this.configureHalfResTargets(),this.copyQuad=new Dp(new sn({uniforms:{tDiffuse:{value:null}},depthWrite:!1,vertexShader:` + }`};var K$="5L7pP4UXrOIr/VZ1G3f6p89FIWU7lqc7J3DPxKjJUXODJoHQzf/aNVM+ABlvhXeBGN7iC0WkmTjEaAqOItBfBdaK5KSGV1ET5SOKl3x9JOX5w2sAl6+6KjDhVUHgbqq7DZ5EeYzbdSNxtrQLW/KkPJoOTG4u5CBUZkCKHniY9l7DUgjuz708zG1HIC8qfohi1vPjPH9Lq47ksjRrjwXD4MlVCjdAqYFGodQ8tRmHkOfq4wVRIAHvoavPHvN1lpk3X4Y1yzAPGe8S9KBs3crc4GwlU1dEOXiWol/mgQqxkNqB1xd04+0Bmpwj0GcCc4NUi+c731FUxjvaexCkCJ0qhrJJ++htWqetNC4NewClu8aFRSwrqiJEGe+qtTg4CYCHaF1wJI0sy/ZBQAI0qAMyBvVjWZlv2pdkCaro9eWDLK5I4mbb8E4d7hZr9dDJiTJm6Bmb5S+2F7yal/JPdeLUfwq7jmVLaQfhv4tWMJAt7V4sG9LuAv2oPJgSj1nnlBvPibfHM2TrlWHwGCLGxW/5Jm2TotaDL+pHDM5pn1r0UuTZ24N8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bIcKLO5CgAUcXJfF2+McnDLKtXxyZaf7SPA6KJq+zF2NHyfoeTOwHhGqNcnHVr1hT73pcoyXyfvCYBnG1Bp/aR9t8hoI7CXM3UZOisWGA1SHZ2jf7k9GlRnp3mF/c1AV+JjvUsnZrsybEOQJg/dn/9eJkyykQHjbF56zgcPX6DdMG03WKUMlYz+uOZ+5DZy9E9MZOZ9GMoLFdrIPPQQLjv+GlCMpoyHPXkzIODjHAID2PrnaRpqWVHh0rnieDILKq+Emrd5RnjgE9pDUXWTmHaKuqqYlcgEz4zbi46dbWrAAFBjsQq1rLHIiPJEcwFLCOY4JNlXRXQJqCUKXk2d1RSBGzDP6HDSpo863BhVRFFF6uIpjQV7j5ebFe3UkkO/+coIo2BTAcgBqOtQ134s9a4QJvofuqBYMGOBMsWZ+sn/2AOxDx6SfAnDFGw==";const fme=Uint8Array.from(atob(K$),t=>t.charCodeAt(0));function Q$(t,e,n){if(e.getQueryParameter(t,e.QUERY_RESULT_AVAILABLE)){const o=e.getQueryParameter(t,e.QUERY_RESULT)/1e6;n.lastTime=o}else setTimeout(()=>{Q$(t,e,n)},1)}class hme extends Dr{constructor(e,n,r=512,i=512){super(),this.width=r,this.height=i,this.clear=!0,this.camera=n,this.scene=e,this.autosetGamma=!0,this.configuration=new Proxy({aoSamples:16,aoRadius:5,denoiseSamples:8,denoiseRadius:12,distanceFalloff:1,intensity:5,denoiseIterations:2,renderMode:0,color:new lt(0,0,0),gammaCorrection:!0,logarithmicDepthBuffer:!1,screenSpaceRadius:!1,halfRes:!1,depthAwareUpsampling:!0,colorMultiply:!0},{set:(o,s,a)=>{const l=o[s];return o[s]=a,s==="aoSamples"&&l!==a&&this.configureAOPass(this.configuration.logarithmicDepthBuffer),s==="denoiseSamples"&&l!==a&&this.configureDenoisePass(this.configuration.logarithmicDepthBuffer),s==="halfRes"&&l!==a&&(this.configureAOPass(this.configuration.logarithmicDepthBuffer),this.configureHalfResTargets(),this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer),this.setSize(this.width,this.height)),s==="depthAwareUpsampling"&&l!==a&&this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer),s==="gammaCorrection"&&(this.autosetGamma=!1),!0}}),this.samples=[],this.samplesR=[],this.samplesDenoise=[],this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer),this.configureSampleDependentPasses(),this.configureHalfResTargets(),this.copyQuad=new Dp(new sn({uniforms:{tDiffuse:{value:null}},depthWrite:!1,vertexShader:` varying vec2 vUv; void main() { vUv = uv; @@ -5591,29 +5591,18 @@ void main() { void main() { gl_FragColor = texture2D(tDiffuse, vUv); } - `})),this.writeTargetInternal=new gn(this.width,this.height,{minFilter:Dt,magFilter:Dt,depthBuffer:!1}),this.readTargetInternal=new gn(this.width,this.height,{minFilter:Dt,magFilter:Dt,depthBuffer:!1}),this.outputTargetInternal=new gn(this.width,this.height,{minFilter:Dt,magFilter:Dt,depthBuffer:!1}),this.bluenoise=new Ea(dme,128,128),this.bluenoise.colorSpace=Fj,this.bluenoise.wrapS=Ro,this.bluenoise.wrapT=Ro,this.bluenoise.minFilter=Qt,this.bluenoise.magFilter=Qt,this.bluenoise.needsUpdate=!0,this.lastTime=0,this.needsDepthTexture=!0,this.needsSwap=!0,this._r=new Ee,this._c=new lt}configureHalfResTargets(){this.configuration.halfRes?(this.depthDownsampleTarget=new JO(this.width/2,this.height/2,2),this.depthDownsampleTarget.texture[0].format=Eg,this.depthDownsampleTarget.texture[0].type=Yn,this.depthDownsampleTarget.texture[0].minFilter=Qt,this.depthDownsampleTarget.texture[0].magFilter=Qt,this.depthDownsampleTarget.texture[0].depthBuffer=!1,this.depthDownsampleTarget.texture[1].format=Jn,this.depthDownsampleTarget.texture[1].type=yr,this.depthDownsampleTarget.texture[1].minFilter=Qt,this.depthDownsampleTarget.texture[1].magFilter=Qt,this.depthDownsampleTarget.texture[1].depthBuffer=!1,this.depthDownsampleQuad=new Dp(new sn(ume))):(this.depthDownsampleTarget&&(this.depthDownsampleTarget.dispose(),this.depthDownsampleTarget=null),this.depthDownsampleQuad&&(this.depthDownsampleQuad.dispose(),this.depthDownsampleQuad=null))}configureSampleDependentPasses(){this.configureAOPass(this.configuration.logarithmicDepthBuffer),this.configureDenoisePass(this.configuration.logarithmicDepthBuffer)}configureAOPass(e=!1){this.samples=this.generateHemisphereSamples(this.configuration.aoSamples),this.samplesR=this.generateHemisphereSamplesR(this.configuration.aoSamples);const n={...ame};n.fragmentShader=n.fragmentShader.replace("16",this.configuration.aoSamples).replace("16.0",this.configuration.aoSamples+".0"),e&&(n.fragmentShader=`#define LOGDEPTH + `})),this.writeTargetInternal=new gn(this.width,this.height,{minFilter:Dt,magFilter:Dt,depthBuffer:!1}),this.readTargetInternal=new gn(this.width,this.height,{minFilter:Dt,magFilter:Dt,depthBuffer:!1}),this.outputTargetInternal=new gn(this.width,this.height,{minFilter:Dt,magFilter:Dt,depthBuffer:!1}),this.bluenoise=new Ea(fme,128,128),this.bluenoise.colorSpace=zj,this.bluenoise.wrapS=Ro,this.bluenoise.wrapT=Ro,this.bluenoise.minFilter=Qt,this.bluenoise.magFilter=Qt,this.bluenoise.needsUpdate=!0,this.lastTime=0,this.needsDepthTexture=!0,this.needsSwap=!0,this._r=new Ee,this._c=new lt}configureHalfResTargets(){this.configuration.halfRes?(this.depthDownsampleTarget=new JO(this.width/2,this.height/2,2),this.depthDownsampleTarget.texture[0].format=Eg,this.depthDownsampleTarget.texture[0].type=Yn,this.depthDownsampleTarget.texture[0].minFilter=Qt,this.depthDownsampleTarget.texture[0].magFilter=Qt,this.depthDownsampleTarget.texture[0].depthBuffer=!1,this.depthDownsampleTarget.texture[1].format=Jn,this.depthDownsampleTarget.texture[1].type=yr,this.depthDownsampleTarget.texture[1].minFilter=Qt,this.depthDownsampleTarget.texture[1].magFilter=Qt,this.depthDownsampleTarget.texture[1].depthBuffer=!1,this.depthDownsampleQuad=new Dp(new sn(dme))):(this.depthDownsampleTarget&&(this.depthDownsampleTarget.dispose(),this.depthDownsampleTarget=null),this.depthDownsampleQuad&&(this.depthDownsampleQuad.dispose(),this.depthDownsampleQuad=null))}configureSampleDependentPasses(){this.configureAOPass(this.configuration.logarithmicDepthBuffer),this.configureDenoisePass(this.configuration.logarithmicDepthBuffer)}configureAOPass(e=!1){this.samples=this.generateHemisphereSamples(this.configuration.aoSamples),this.samplesR=this.generateHemisphereSamplesR(this.configuration.aoSamples);const n={...lme};n.fragmentShader=n.fragmentShader.replace("16",this.configuration.aoSamples).replace("16.0",this.configuration.aoSamples+".0"),e&&(n.fragmentShader=`#define LOGDEPTH `+n.fragmentShader),this.configuration.halfRes&&(n.fragmentShader=`#define HALFRES -`+n.fragmentShader),this.effectShaderQuad?(this.effectShaderQuad.material.dispose(),this.effectShaderQuad.material=new sn(n)):this.effectShaderQuad=new Dp(new sn(n))}configureDenoisePass(e=!1){this.samplesDenoise=this.generateDenoiseSamples(this.configuration.denoiseSamples,11);const n={...cme};n.fragmentShader=n.fragmentShader.replace("16",this.configuration.denoiseSamples),e&&(n.fragmentShader=`#define LOGDEPTH -`+n.fragmentShader),this.poissonBlurQuad?(this.poissonBlurQuad.material.dispose(),this.poissonBlurQuad.material=new sn(n)):this.poissonBlurQuad=new Dp(new sn(n))}configureEffectCompositer(e=!1){const n={...lme};e&&(n.fragmentShader=`#define LOGDEPTH +`+n.fragmentShader),this.effectShaderQuad?(this.effectShaderQuad.material.dispose(),this.effectShaderQuad.material=new sn(n)):this.effectShaderQuad=new Dp(new sn(n))}configureDenoisePass(e=!1){this.samplesDenoise=this.generateDenoiseSamples(this.configuration.denoiseSamples,11);const n={...ume};n.fragmentShader=n.fragmentShader.replace("16",this.configuration.denoiseSamples),e&&(n.fragmentShader=`#define LOGDEPTH +`+n.fragmentShader),this.poissonBlurQuad?(this.poissonBlurQuad.material.dispose(),this.poissonBlurQuad.material=new sn(n)):this.poissonBlurQuad=new Dp(new sn(n))}configureEffectCompositer(e=!1){const n={...cme};e&&(n.fragmentShader=`#define LOGDEPTH `+n.fragmentShader),this.configuration.halfRes&&this.configuration.depthAwareUpsampling&&(n.fragmentShader=`#define HALFRES -`+n.fragmentShader),this.effectCompositerQuad?(this.effectCompositerQuad.material.dispose(),this.effectCompositerQuad.material=new sn(n)):this.effectCompositerQuad=new Dp(new sn(n))}generateHemisphereSamples(e){const n=[];for(let r=0;rt.charCodeAt(0));M.forwardRef(({halfRes:t,screenSpaceRadius:e,quality:n,depthAwareUpsampling:r=!0,aoRadius:i=5,aoSamples:o=16,denoiseSamples:s=4,denoiseRadius:a=12,distanceFalloff:l=1,intensity:c=1,color:u,renderMode:d=0},f)=>{const{camera:h,scene:g}=dn(),y=M.useMemo(()=>new fme(g,h),[]);return M.useLayoutEffect(()=>{hu(y.configuration,{color:u,aoRadius:i,distanceFalloff:l,intensity:c,aoSamples:o,denoiseSamples:s,denoiseRadius:a,screenSpaceRadius:e,renderMode:d,halfRes:t,depthAwareUpsampling:r})},[e,u,i,l,c,o,s,a,d,t,r]),M.useLayoutEffect(()=>{n&&y.setQualityMode(n.charAt(0).toUpperCase()+n.slice(1))},[n]),I.jsx("primitive",{ref:f,object:y})});var Q$={},la=Gf&&Gf.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},fP=Gf&&Gf.__classPrivateFieldSet||function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},Za,Gl;Object.defineProperty(Q$,"__esModule",{value:!0});class hme{constructor(){Za.set(this,!1),Gl.set(this,new Set)}get acquired(){return la(this,Za,"f")}acquireAsync({timeout:e}={}){if(!la(this,Za,"f"))return fP(this,Za,!0,"f"),Promise.resolve();if(e==null)return new Promise(i=>{la(this,Gl,"f").add(i)});let n,r;return Promise.race([new Promise(i=>{n=()=>{clearTimeout(r),i()},la(this,Gl,"f").add(n)}),new Promise((i,o)=>{r=setTimeout(()=>{la(this,Gl,"f").delete(n),o(new Error("Timed out waiting for lock"))},e)})])}tryAcquire(){return la(this,Za,"f")?!1:(fP(this,Za,!0,"f"),!0)}release(){if(!la(this,Za,"f"))throw new Error("Cannot release an unacquired lock");if(la(this,Gl,"f").size>0){const[e]=la(this,Gl,"f");la(this,Gl,"f").delete(e),e()}else fP(this,Za,!1,"f")}}var pme=Q$.default=hme;Za=new WeakMap,Gl=new WeakMap;var eT;try{eT=new TextDecoder}catch{}var mt,rs,ye=0,dr={},wn,ec,Ko=0,_a=0,ci,ol,Ao=[],vn,XN={useRecords:!1,mapsAsObjects:!0};class J${}const eG=new J$;eG.name="MessagePack 0xC1";var pc=!1,tG=2,ZN;try{new Function("")}catch{tG=1/0}class cg{constructor(e){e&&(e.useRecords===!1&&e.mapsAsObjects===void 0&&(e.mapsAsObjects=!0),e.sequential&&e.trusted!==!1&&(e.trusted=!0,!e.structures&&e.useRecords!=!1&&(e.structures=[],e.maxSharedStructures||(e.maxSharedStructures=0))),e.structures?e.structures.sharedLength=e.structures.length:e.getStructures&&((e.structures=[]).uninitialized=!0,e.structures.sharedLength=0),e.int64AsNumber&&(e.int64AsType="number")),Object.assign(this,e)}unpack(e,n){if(mt)return sG(()=>(nT(),this?this.unpack(e,n):cg.prototype.unpack.call(XN,e,n)));!e.buffer&&e.constructor===ArrayBuffer&&(e=typeof Buffer<"u"?Buffer.from(e):new Uint8Array(e)),typeof n=="object"?(rs=n.end||e.length,ye=n.start||0):(ye=0,rs=n>-1?n:e.length),_a=0,ec=null,ci=null,mt=e;try{vn=e.dataView||(e.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength))}catch(r){throw mt=null,e instanceof Uint8Array?r:new Error("Source must be a Uint8Array or Buffer but was a "+(e&&typeof e=="object"?e.constructor.name:typeof e))}if(this instanceof cg){if(dr=this,this.structures)return wn=this.structures,by(n);(!wn||wn.length>0)&&(wn=[])}else dr=XN,(!wn||wn.length>0)&&(wn=[]);return by(n)}unpackMultiple(e,n){let r,i=0;try{pc=!0;let o=e.length,s=this?this.unpack(e,o):US.unpack(e,o);if(n){if(n(s,i,ye)===!1)return;for(;yer.slice(0)));for(let r=0,i=e.length;r=32&&(o.highByte=r-32>>5))}e.sharedLength=e.length;for(let r in n||[])if(r>=0){let i=e[r],o=n[r];o&&(i&&((e.restoreStructures||(e.restoreStructures=[]))[r]=i),e[r]=o)}return this.structures=e}decode(e,n){return this.unpack(e,n)}}function by(t){try{if(!dr.trusted&&!pc){let n=wn.sharedLength||0;n=32&&ZN?(e=ZN(mt,ye,rs,dr),mt=null,!(t&&t.lazy)&&e&&(e=e.toJSON()),ye=rs):e=Or(),ci&&(ye=ci.postBundlePosition,ci=null),pc&&(wn.restoreStructures=null),ye==rs)wn&&wn.restoreStructures&&qN(),wn=null,mt=null,ol&&(ol=null);else{if(ye>rs)throw new Error("Unexpected end of MessagePack data");if(!pc){let n;try{n=JSON.stringify(e,(r,i)=>typeof i=="bigint"?`${i}n`:i).slice(0,100)}catch(r){n="(JSON view not available "+r+")"}throw new Error("Data read, but end of buffer not reached "+n)}}return e}catch(e){throw wn&&wn.restoreStructures&&qN(),nT(),(e instanceof RangeError||e.message.startsWith("Unexpected end of buffer")||ye>rs)&&(e.incomplete=!0),e}}function qN(){for(let t in wn.restoreStructures)wn[t]=wn.restoreStructures[t];wn.restoreStructures=null}function Or(){let t=mt[ye++];if(t<160)if(t<128){if(t<64)return t;{let e=wn[t&63]||dr.getStructures&&nG()[t&63];return e?(e.read||(e.read=VR(e,t&63)),e.read()):t}}else if(t<144)if(t-=128,dr.mapsAsObjects){let e={};for(let n=0;n=ye)return ec.slice(ye-Ko,(ye+=e)-Ko);if(_a==0&&rs<140){let n=e<16?jR(e):rG(e);if(n!=null)return n}return tT(e)}else{let e;switch(t){case 192:return null;case 193:return ci?(e=Or(),e>0?ci[1].slice(ci.position1,ci.position1+=e):ci[0].slice(ci.position0,ci.position0-=e)):eG;case 194:return!1;case 195:return!0;case 196:if(e=mt[ye++],e===void 0)throw new Error("Unexpected end of buffer");return hP(e);case 197:return e=vn.getUint16(ye),ye+=2,hP(e);case 198:return e=vn.getUint32(ye),ye+=4,hP(e);case 199:return su(mt[ye++]);case 200:return e=vn.getUint16(ye),ye+=2,su(e);case 201:return e=vn.getUint32(ye),ye+=4,su(e);case 202:if(e=vn.getFloat32(ye),dr.useFloat32>2){let n=$R[(mt[ye]&127)<<1|mt[ye+1]>>7];return ye+=4,(n*e+(e>0?.5:-.5)>>0)/n}return ye+=4,e;case 203:return e=vn.getFloat64(ye),ye+=8,e;case 204:return mt[ye++];case 205:return e=vn.getUint16(ye),ye+=2,e;case 206:return e=vn.getUint32(ye),ye+=4,e;case 207:return dr.int64AsType==="number"?(e=vn.getUint32(ye)*4294967296,e+=vn.getUint32(ye+4)):dr.int64AsType==="string"?e=vn.getBigUint64(ye).toString():dr.int64AsType==="auto"?(e=vn.getBigUint64(ye),e<=BigInt(2)<=BigInt(-2)<=ye?ec.slice(ye-Ko,(ye+=e)-Ko):gme(e);case 218:return e=vn.getUint16(ye),ye+=2,_a>=ye?ec.slice(ye-Ko,(ye+=e)-Ko):vme(e);case 219:return e=vn.getUint32(ye),ye+=4,_a>=ye?ec.slice(ye-Ko,(ye+=e)-Ko):yme(e);case 220:return e=vn.getUint16(ye),ye+=2,QN(e);case 221:return e=vn.getUint32(ye),ye+=4,QN(e);case 222:return e=vn.getUint16(ye),ye+=2,JN(e);case 223:return e=vn.getUint32(ye),ye+=4,JN(e);default:if(t>=224)return t-256;if(t===void 0){let n=new Error("Unexpected end of MessagePack data");throw n.incomplete=!0,n}throw new Error("Unknown MessagePack token "+t)}}}const mme=/^[a-zA-Z_$][a-zA-Z\d_$]*$/;function VR(t,e){function n(){if(n.count++>tG){let i=t.read=new Function("r","return function(){return "+(dr.freezeData?"Object.freeze":"")+"({"+t.map(o=>o==="__proto__"?"__proto_:r()":mme.test(o)?o+":r()":"["+JSON.stringify(o)+"]:r()").join(",")+"})}")(Or);return t.highByte===0&&(t.read=KN(e,t.read)),i()}let r={};for(let i=0,o=t.length;ifunction(){let n=mt[ye++];if(n===0)return e();let r=t<32?-(t+(n<<5)):t+(n<<5),i=wn[r]||nG()[r];if(!i)throw new Error("Record id is not defined for "+r);return i.read||(i.read=VR(i,t)),i.read()};function nG(){let t=sG(()=>(mt=null,dr.getStructures()));return wn=dr._mergeStructures(t,wn)}var tT=Wg,gme=Wg,vme=Wg,yme=Wg;function Wg(t){let e;if(t<16&&(e=jR(t)))return e;if(t>64&&eT)return eT.decode(mt.subarray(ye,ye+=t));const n=ye+t,r=[];for(e="";ye65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|l&1023),r.push(l)}else r.push(i);r.length>=4096&&(e+=ai.apply(String,r),r.length=0)}return r.length>0&&(e+=ai.apply(String,r)),e}function QN(t){let e=new Array(t);for(let n=0;n0){ye=e;return}n[r]=i}return ai.apply(String,n)}function jR(t){if(t<4)if(t<2){if(t===0)return"";{let e=mt[ye++];if((e&128)>1){ye-=1;return}return ai(e)}}else{let e=mt[ye++],n=mt[ye++];if((e&128)>0||(n&128)>0){ye-=2;return}if(t<3)return ai(e,n);let r=mt[ye++];if((r&128)>0){ye-=3;return}return ai(e,n,r)}else{let e=mt[ye++],n=mt[ye++],r=mt[ye++],i=mt[ye++];if((e&128)>0||(n&128)>0||(r&128)>0||(i&128)>0){ye-=4;return}if(t<6){if(t===4)return ai(e,n,r,i);{let o=mt[ye++];if((o&128)>0){ye-=5;return}return ai(e,n,r,i,o)}}else if(t<8){let o=mt[ye++],s=mt[ye++];if((o&128)>0||(s&128)>0){ye-=6;return}if(t<7)return ai(e,n,r,i,o,s);let a=mt[ye++];if((a&128)>0){ye-=7;return}return ai(e,n,r,i,o,s,a)}else{let o=mt[ye++],s=mt[ye++],a=mt[ye++],l=mt[ye++];if((o&128)>0||(s&128)>0||(a&128)>0||(l&128)>0){ye-=8;return}if(t<10){if(t===8)return ai(e,n,r,i,o,s,a,l);{let c=mt[ye++];if((c&128)>0){ye-=9;return}return ai(e,n,r,i,o,s,a,l,c)}}else if(t<12){let c=mt[ye++],u=mt[ye++];if((c&128)>0||(u&128)>0){ye-=10;return}if(t<11)return ai(e,n,r,i,o,s,a,l,c,u);let d=mt[ye++];if((d&128)>0){ye-=11;return}return ai(e,n,r,i,o,s,a,l,c,u,d)}else{let c=mt[ye++],u=mt[ye++],d=mt[ye++],f=mt[ye++];if((c&128)>0||(u&128)>0||(d&128)>0||(f&128)>0){ye-=12;return}if(t<14){if(t===12)return ai(e,n,r,i,o,s,a,l,c,u,d,f);{let h=mt[ye++];if((h&128)>0){ye-=13;return}return ai(e,n,r,i,o,s,a,l,c,u,d,f,h)}}else{let h=mt[ye++],g=mt[ye++];if((h&128)>0||(g&128)>0){ye-=14;return}if(t<15)return ai(e,n,r,i,o,s,a,l,c,u,d,f,h,g);let y=mt[ye++];if((y&128)>0){ye-=15;return}return ai(e,n,r,i,o,s,a,l,c,u,d,f,h,g,y)}}}}}function eF(){let t=mt[ye++],e;if(t<192)e=t-160;else switch(t){case 217:e=mt[ye++];break;case 218:e=vn.getUint16(ye),ye+=2;break;case 219:e=vn.getUint32(ye),ye+=4;break;default:throw new Error("Expected string")}return Wg(e)}function hP(t){return dr.copyBuffers?Uint8Array.prototype.slice.call(mt,ye,ye+=t):mt.subarray(ye,ye+=t)}function su(t){let e=mt[ye++];if(Ao[e]){let n;return Ao[e](mt.subarray(ye,n=ye+=t),r=>{ye=r;try{return Or()}finally{ye=n}})}else throw new Error("Unknown extension type "+e)}var tF=new Array(4096);function iG(){let t=mt[ye++];if(t>=160&&t<192){if(t=t-160,_a>=ye)return ec.slice(ye-Ko,(ye+=t)-Ko);if(!(_a==0&&rs<180))return tT(t)}else return ye--,Or().toString();let e=(t<<5^(t>1?vn.getUint16(ye):t>0?mt[ye]:0))&4095,n=tF[e],r=ye,i=ye+t-3,o,s=0;if(n&&n.bytes==t){for(;r{let n=Or().map(o=>o.toString()),r=t;e!==void 0&&(t=t<32?-((e<<5)+t):(e<<5)+t,n.highByte=e);let i=wn[t];return i&&(i.isShared||pc)&&((wn.restoreStructures||(wn.restoreStructures=[]))[t]=i),wn[t]=n,n.read=VR(n,r),n.read()};Ao[0]=()=>{};Ao[0].noBuffer=!0;let _me={Error,TypeError,ReferenceError};Ao[101]=()=>{let t=Or();return(_me[t[0]]||Error)(t[1])};Ao[105]=t=>{let e=vn.getUint32(ye-4);ol||(ol=new Map);let n=mt[ye],r;n>=144&&n<160||n==220||n==221?r=[]:r={};let i={target:r};ol.set(e,i);let o=Or();return i.used?Object.assign(r,o):(i.target=o,o)};Ao[112]=t=>{let e=vn.getUint32(ye-4),n=ol.get(e);return n.used=!0,n.target};Ao[115]=()=>new Set(Or());const oG=["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64","BigInt64","BigUint64"].map(t=>t+"Array");let xme=typeof globalThis=="object"?globalThis:window;Ao[116]=t=>{let e=t[0],n=oG[e];if(!n)throw new Error("Could not find typed array for code "+e);return new xme[n](Uint8Array.prototype.slice.call(t,1).buffer)};Ao[120]=()=>{let t=Or();return new RegExp(t[0],t[1])};const wme=[];Ao[98]=t=>{let e=(t[0]<<24)+(t[1]<<16)+(t[2]<<8)+t[3],n=ye;return ye+=e-t.length,ci=wme,ci=[eF(),eF()],ci.position0=0,ci.position1=0,ci.postBundlePosition=ye,ye=n,Or()};Ao[255]=t=>t.length==4?new Date((t[0]*16777216+(t[1]<<16)+(t[2]<<8)+t[3])*1e3):t.length==8?new Date(((t[0]<<22)+(t[1]<<14)+(t[2]<<6)+(t[3]>>2))/1e6+((t[3]&3)*4294967296+t[4]*16777216+(t[5]<<16)+(t[6]<<8)+t[7])*1e3):t.length==12?new Date(((t[0]<<24)+(t[1]<<16)+(t[2]<<8)+t[3])/1e6+((t[4]&128?-281474976710656:0)+t[6]*1099511627776+t[7]*4294967296+t[8]*16777216+(t[9]<<16)+(t[10]<<8)+t[11])*1e3):new Date("invalid");function sG(t){let e=rs,n=ye,r=Ko,i=_a,o=ec,s=ol,a=ci,l=new Uint8Array(mt.slice(0,rs)),c=wn,u=wn.slice(0,wn.length),d=dr,f=pc,h=t();return rs=e,ye=n,Ko=r,_a=i,ec=o,ol=s,ci=a,mt=l,pc=f,wn=c,wn.splice(0,wn.length,...u),dr=d,vn=new DataView(mt.buffer,mt.byteOffset,mt.byteLength),h}function nT(){mt=null,ol=null,wn=null}const $R=new Array(147);for(let t=0;t<256;t++)$R[t]=+("1e"+Math.floor(45.15-t*.30103));var US=new cg({useRecords:!1});const Sme=US.unpack;US.unpackMultiple;US.unpack;let bme=new Float32Array(1);new Uint8Array(bme.buffer,0,4);let I_;try{I_=new TextEncoder}catch{}let rT,aG;const BS=typeof Buffer<"u",My=BS?function(t){return Buffer.allocUnsafeSlow(t)}:Uint8Array,lG=BS?Buffer:Uint8Array,rF=BS?4294967296:2144337920;let Le,Ip,Zn,be=0,$i,mr=null,Mme;const Eme=21760,Pme=/[\u0080-\uFFFF]/,rf=Symbol("record-id");class Cme extends cg{constructor(e){super(e),this.offset=0;let n,r,i,o,s=lG.prototype.utf8Write?function(N,U){return Le.utf8Write(N,U,4294967295)}:I_&&I_.encodeInto?function(N,U){return I_.encodeInto(N,Le.subarray(U)).written}:!1,a=this;e||(e={});let l=e&&e.sequential,c=e.structures||e.saveStructures,u=e.maxSharedStructures;if(u==null&&(u=c?32:0),u>8160)throw new Error("Maximum maxSharedStructure is 8160");e.structuredClone&&e.moreTypes==null&&(this.moreTypes=!0);let d=e.maxOwnStructures;d==null&&(d=c?32:64),!this.structures&&e.useRecords!=!1&&(this.structures=[]);let f=u>32||d+u>64,h=u+64,g=u+d+64;if(g>8256)throw new Error("Maximum maxSharedStructure + maxOwnStructure is 8192");let y=[],_=0,v=0;this.pack=this.encode=function(N,U){if(Le||(Le=new My(8192),Zn=Le.dataView||(Le.dataView=new DataView(Le.buffer,0,8192)),be=0),$i=Le.length-10,$i-be<2048?(Le=new My(Le.length),Zn=Le.dataView||(Le.dataView=new DataView(Le.buffer,0,Le.length)),$i=Le.length-10,be=0):be=be+7&2147483640,n=be,o=a.structuredClone?new Map:null,a.bundleStrings&&typeof N!="string"?(mr=[],mr.size=1/0):mr=null,i=a.structures,i){i.uninitialized&&(i=a._mergeStructures(a.getStructures()));let k=i.sharedLength||0;if(k>u)throw new Error("Shared structures is larger than maximum shared structures, try increasing maxSharedStructures to "+i.sharedLength);if(!i.transitions){i.transitions=Object.create(null);for(let z=0;zj.offset>$.offset?1:-1),G=z.length,W=-1;for(;k&&G>0;){let j=z[--G].offset+n;jk.position+n?W>=0&&(W+=6):(W>=0&&(Zn.setUint32(k.position+n,Zn.getUint32(k.position+n)+W),W=-1),k=k.previous,G++)}W>=0&&k&&Zn.setUint32(k.position+n,Zn.getUint32(k.position+n)+W),be+=z.length*6,be>$i&&R(be),a.offset=be;let B=Ome(Le.subarray(n,be),z);return o=null,B}return a.offset=be,U&Dme?(Le.start=n,Le.end=be,Le):Le.subarray(n,be)}finally{if(i){v<10&&v++;let k=i.sharedLength||0;if(i.length>k&&!l&&(i.length=k),_>1e4)i.transitions=null,v=0,_=0,y.length>0&&(y=[]);else if(y.length>0&&!l){for(let z=0,G=y.length;z{var U=N.length;U<16?Le[be++]=144|U:U<65536?(Le[be++]=220,Le[be++]=U>>8,Le[be++]=U&255):(Le[be++]=221,Zn.setUint32(be,U),be+=4);for(let k=0;k{be>$i&&(Le=R(be));var U=typeof N,k;if(U==="string"){let z=N.length;if(mr&&z>=4&&z<4096){if((mr.size+=z)>Eme){let j,$=(mr[0]?mr[0].length*3+mr[1].length:0)+10;be+$>$i&&(Le=R(be+$));let q;mr.position?(q=mr,Le[be]=200,be+=3,Le[be++]=98,j=be-n,be+=4,sF(n,w,0),Zn.setUint16(j+n-3,be-n-j)):(Le[be++]=214,Le[be++]=98,j=be-n,be+=4),mr=["",""],mr.previous=q,mr.size=0,mr.position=j}let B=Pme.test(N);mr[B?0:1]+=N,Le[be++]=193,w(B?-z:z);return}let G;z<32?G=1:z<256?G=2:z<65536?G=3:G=5;let W=z*3;if(be+W>$i&&(Le=R(be+W)),z<64||!s){let B,j,$,q=be+G;for(B=0;B>6|192,Le[q++]=j&63|128):(j&64512)===55296&&(($=N.charCodeAt(B+1))&64512)===56320?(j=65536+((j&1023)<<10)+($&1023),B++,Le[q++]=j>>18|240,Le[q++]=j>>12&63|128,Le[q++]=j>>6&63|128,Le[q++]=j&63|128):(Le[q++]=j>>12|224,Le[q++]=j>>6&63|128,Le[q++]=j&63|128);k=q-be-G}else k=s(N,be+G);k<32?Le[be++]=160|k:k<256?(G<2&&Le.copyWithin(be+2,be+1,be+1+k),Le[be++]=217,Le[be++]=k):k<65536?(G<3&&Le.copyWithin(be+3,be+2,be+2+k),Le[be++]=218,Le[be++]=k>>8,Le[be++]=k&255):(G<5&&Le.copyWithin(be+5,be+3,be+3+k),Le[be++]=219,Zn.setUint32(be,k),be+=4),be+=k}else if(U==="number")if(N>>>0===N)N<32||N<128&&this.useRecords===!1||N<64&&!this.randomAccessStructure?Le[be++]=N:N<256?(Le[be++]=204,Le[be++]=N):N<65536?(Le[be++]=205,Le[be++]=N>>8,Le[be++]=N&255):(Le[be++]=206,Zn.setUint32(be,N),be+=4);else if(N>>0===N)N>=-32?Le[be++]=256+N:N>=-128?(Le[be++]=208,Le[be++]=N+256):N>=-32768?(Le[be++]=209,Zn.setInt16(be,N),be+=2):(Le[be++]=210,Zn.setInt32(be,N),be+=4);else{let z;if((z=this.useFloat32)>0&&N<4294967296&&N>=-2147483648){Le[be++]=202,Zn.setFloat32(be,N);let G;if(z<4||(G=N*$R[(Le[be]&127)<<1|Le[be+1]>>7])>>0===G){be+=4;return}else be--}Le[be++]=203,Zn.setFloat64(be,N),be+=8}else if(U==="object"||U==="function")if(!N)Le[be++]=192;else{if(o){let G=o.get(N);if(G){if(!G.id){let W=o.idsToInsert||(o.idsToInsert=[]);G.id=W.push(G)}Le[be++]=214,Le[be++]=112,Zn.setUint32(be,G.id),be+=4;return}else o.set(N,{offset:be-n})}let z=N.constructor;if(z===Object)O(N,!0);else if(z===Array)x(N);else if(z===Map)if(this.mapAsEmptyObject)Le[be++]=128;else{k=N.size,k<16?Le[be++]=128|k:k<65536?(Le[be++]=222,Le[be++]=k>>8,Le[be++]=k&255):(Le[be++]=223,Zn.setUint32(be,k),be+=4);for(let[G,W]of N)w(G),w(W)}else{for(let G=0,W=rT.length;G(Le=$,$=null,be+=J,be>$i&&R(be),{target:Le,targetView:Zn,position:be-J}),w)}finally{$&&(Le=$,Zn=q,be=K,$i=Le.length-10)}re&&(re.length+be>$i&&R(re.length+be),be=Tme(re,Le,be,j.type));return}}if(Array.isArray(N))x(N);else{if(N.toJSON){const G=N.toJSON();if(G!==N)return w(G)}if(U==="function")return w(this.writeFunction&&this.writeFunction(N));O(N,!N.hasOwnProperty)}}}else if(U==="boolean")Le[be++]=N?195:194;else if(U==="bigint"){if(N=-(BigInt(1)<0)Le[be++]=207,Zn.setBigUint64(be,N);else if(this.largeBigIntToFloat)Le[be++]=203,Zn.setFloat64(be,Number(N));else throw new RangeError(N+" was too large to fit in MessagePack 64-bit integer format, set largeBigIntToFloat to convert to float-64");be+=8}else if(U==="undefined")this.encodeUndefinedAsNil?Le[be++]=192:(Le[be++]=212,Le[be++]=0,Le[be++]=0);else throw new Error("Unknown type: "+U)},S=this.variableMapSize||this.coercibleKeyAsNumber?N=>{let U=Object.keys(N),k=U.length;k<16?Le[be++]=128|k:k<65536?(Le[be++]=222,Le[be++]=k>>8,Le[be++]=k&255):(Le[be++]=223,Zn.setUint32(be,k),be+=4);let z;if(this.coercibleKeyAsNumber)for(let G=0;G{Le[be++]=222;let k=be-n;be+=2;let z=0;for(let G in N)(U||N.hasOwnProperty(G))&&(w(G),w(N[G]),z++);Le[k+++n]=z>>8,Le[k+n]=z&255},E=this.useRecords===!1?S:e.progressiveRecords&&!f?(N,U)=>{let k,z=i.transitions||(i.transitions=Object.create(null)),G=be++-n,W;for(let B in N)if(U||N.hasOwnProperty(B)){if(k=z[B],k)z=k;else{let j=Object.keys(N),$=z;z=i.transitions;let q=0;for(let K=0,re=j.length;K{let k,z=i.transitions||(i.transitions=Object.create(null)),G=0;for(let B in N)(U||N.hasOwnProperty(B))&&(k=z[B],k||(k=z[B]=Object.create(null),G++),z=k);let W=z[rf];W?W>=96&&f?(Le[be++]=((W-=96)&31)+96,Le[be++]=W>>5):Le[be++]=W:T(z,z.__keys__||Object.keys(N),G);for(let B in N)(U||N.hasOwnProperty(B))&&w(N[B])},C=typeof this.useRecords=="function"&&this.useRecords,O=C?(N,U)=>{C(N)?E(N,U):S(N,U)}:E,R=N=>{let U;if(N>16777216){if(N-n>rF)throw new Error("Packed buffer would be larger than maximum buffer size");U=Math.min(rF,Math.round(Math.max((N-n)*(N>67108864?1.25:2),4194304)/4096)*4096)}else U=(Math.max(N-n<<2,Le.length-1)>>12)+1<<12;let k=new My(U);return Zn=k.dataView||(k.dataView=new DataView(k.buffer,0,U)),N=Math.min(N,Le.length),Le.copy?Le.copy(k,0,n,N):k.set(Le.slice(n,N)),be-=n,n=0,$i=k.length-10,Le=k},T=(N,U,k)=>{let z=i.nextId;z||(z=64),z=g&&(z=h),i.nextId=z+1);let G=U.highByte=z>=96&&f?z-96>>5:-1;N[rf]=z,N.__keys__=U,i[z-64]=U,z=0?(Le[be++]=(z&31)+96,Le[be++]=G):Le[be++]=z):(G>=0?(Le[be++]=213,Le[be++]=114,Le[be++]=(z&31)+96,Le[be++]=G):(Le[be++]=212,Le[be++]=114,Le[be++]=z),k&&(_+=v*k),y.length>=d&&(y.shift()[rf]=0),y.push(N),w(U))},A=(N,U,k,z)=>{let G=Le,W=be,B=$i,j=n;Le=Ip,be=0,n=0,Le||(Ip=Le=new My(8192)),$i=Le.length-10,T(N,U,z),Ip=Le;let $=be;if(Le=G,be=W,$i=B,n=j,$>1){let q=be+$-1;q>$i&&R(q);let K=k+n;Le.copyWithin(K+$,K+1,be),Le.set(Ip.slice(0,$),K),be=q}else Le[k+n]=Ip[0]},F=(N,U)=>{let k=Mme(N,Le,be,i,R,(z,G,W)=>{if(W)return r=!0;be=G;let B=Le;return w(z),B!==Le?{position:be,targetView:Zn,target:Le}:be},this);if(k===0)return O(N,!0);be=k}}useBuffer(e){Le=e,Zn=new DataView(Le.buffer,Le.byteOffset,Le.byteLength),be=0}clearSharedData(){this.structures&&(this.structures=[]),this.typedStructs&&(this.typedStructs=[])}}aG=[Date,Set,Error,RegExp,ArrayBuffer,Object.getPrototypeOf(Uint8Array.prototype).constructor,J$];rT=[{pack(t,e,n){let r=t.getTime()/1e3;if((this.useTimestamp32||t.getMilliseconds()===0)&&r>=0&&r<4294967296){let{target:i,targetView:o,position:s}=e(6);i[s++]=214,i[s++]=255,o.setUint32(s,r)}else if(r>0&&r<4294967296){let{target:i,targetView:o,position:s}=e(10);i[s++]=215,i[s++]=255,o.setUint32(s,t.getMilliseconds()*4e6+(r/1e3/4294967296>>0)),o.setUint32(s+4,r)}else if(isNaN(r)){if(this.onInvalidDate)return e(0),n(this.onInvalidDate());let{target:i,targetView:o,position:s}=e(3);i[s++]=212,i[s++]=255,i[s++]=255}else{let{target:i,targetView:o,position:s}=e(15);i[s++]=199,i[s++]=12,i[s++]=255,o.setUint32(s,t.getMilliseconds()*1e6),o.setBigInt64(s+4,BigInt(Math.floor(r)))}}},{pack(t,e,n){if(this.setAsEmptyObject)return e(0),n({});let r=Array.from(t),{target:i,position:o}=e(this.moreTypes?3:0);this.moreTypes&&(i[o++]=212,i[o++]=115,i[o++]=0),n(r)}},{pack(t,e,n){let{target:r,position:i}=e(this.moreTypes?3:0);this.moreTypes&&(r[i++]=212,r[i++]=101,r[i++]=0),n([t.name,t.message])}},{pack(t,e,n){let{target:r,position:i}=e(this.moreTypes?3:0);this.moreTypes&&(r[i++]=212,r[i++]=120,r[i++]=0),n([t.source,t.flags])}},{pack(t,e){this.moreTypes?iF(t,16,e):oF(BS?Buffer.from(t):new Uint8Array(t),e)}},{pack(t,e){let n=t.constructor;n!==lG&&this.moreTypes?iF(t,oG.indexOf(n.name),e):oF(t,e)}},{pack(t,e){let{target:n,position:r}=e(1);n[r]=193}}];function iF(t,e,n,r){let i=t.byteLength;if(i+1<256){var{target:o,position:s}=n(4+i);o[s++]=199,o[s++]=i+1}else if(i+1<65536){var{target:o,position:s}=n(5+i);o[s++]=200,o[s++]=i+1>>8,o[s++]=i+1&255}else{var{target:o,position:s,targetView:a}=n(7+i);o[s++]=201,a.setUint32(s,i+1),s+=4}o[s++]=116,o[s++]=e,o.set(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),s)}function oF(t,e){let n=t.byteLength;var r,i;if(n<256){var{target:r,position:i}=e(n+2);r[i++]=196,r[i++]=n}else if(n<65536){var{target:r,position:i}=e(n+3);r[i++]=197,r[i++]=n>>8,r[i++]=n&255}else{var{target:r,position:i,targetView:o}=e(n+5);r[i++]=198,o.setUint32(i,n),i+=4}r.set(t,i)}function Tme(t,e,n,r){let i=t.length;switch(i){case 1:e[n++]=212;break;case 2:e[n++]=213;break;case 4:e[n++]=214;break;case 8:e[n++]=215;break;case 16:e[n++]=216;break;default:i<256?(e[n++]=199,e[n++]=i):i<65536?(e[n++]=200,e[n++]=i>>8,e[n++]=i&255):(e[n++]=201,e[n++]=i>>24,e[n++]=i>>16&255,e[n++]=i>>8&255,e[n++]=i&255)}return e[n++]=r,e.set(t,n),n+=i,n}function Ome(t,e){let n,r=e.length*6,i=t.length-r;for(;n=e.pop();){let o=n.offset,s=n.id;t.copyWithin(o+r,o,i),r-=6;let a=o+r;t[a++]=214,t[a++]=105,t[a++]=s>>24,t[a++]=s>>16&255,t[a++]=s>>8&255,t[a++]=s&255,i=o}return t}function sF(t,e,n){if(mr.length>0){Zn.setUint32(mr.position+t,be+n-mr.position-t),mr.stringsPosition=be-t;let r=mr;mr=null,e(r[0]),e(r[1])}}function Rme(t,e){return t.isCompatible=n=>{let r=!n||(e.lastNamedStructuresLength||0)===n.length;return r||e._mergeStructures(n),r},t}let cG=new Cme({useRecords:!1});const Ame=cG.pack;cG.pack;const Dme=512,Ime=1024,aF=t=>{let e;const n=new Set,r=(l,c)=>{const u=typeof l=="function"?l(e):l;if(!Object.is(u,e)){const d=e;e=c??typeof u!="object"?u:Object.assign({},e,u),n.forEach(f=>f(e,d))}},i=()=>e,a={setState:r,getState:i,subscribe:l=>(n.add(l),()=>n.delete(l)),destroy:()=>{({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1}&&"production")!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return e=t(r,i,a),a},Lme=t=>t?aF(t):aF;var uG={exports:{}},dG={},fG={exports:{}},hG={};/** - * @license React - * use-sync-external-store-shim.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var sh=M;function kme(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Nme=typeof Object.is=="function"?Object.is:kme,Fme=sh.useState,zme=sh.useEffect,Ume=sh.useLayoutEffect,Bme=sh.useDebugValue;function Hme(t,e){var n=e(),r=Fme({inst:{value:n,getSnapshot:e}}),i=r[0].inst,o=r[1];return Ume(function(){i.value=n,i.getSnapshot=e,pP(i)&&o({inst:i})},[t,n,e]),zme(function(){return pP(i)&&o({inst:i}),t(function(){pP(i)&&o({inst:i})})},[t]),Bme(n),n}function pP(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Nme(t,n)}catch{return!0}}function Vme(t,e){return e()}var jme=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Vme:Hme;hG.useSyncExternalStore=sh.useSyncExternalStore!==void 0?sh.useSyncExternalStore:jme;fG.exports=hG;var $me=fG.exports;/** - * @license React - * use-sync-external-store-shim/with-selector.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var HS=M,Gme=$me;function Wme(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Yme=typeof Object.is=="function"?Object.is:Wme,Xme=Gme.useSyncExternalStore,Zme=HS.useRef,qme=HS.useEffect,Kme=HS.useMemo,Qme=HS.useDebugValue;dG.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var o=Zme(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=Kme(function(){function l(h){if(!c){if(c=!0,u=h,h=r(h),i!==void 0&&s.hasValue){var g=s.value;if(i(g,h))return d=g}return d=h}if(g=d,Yme(u,h))return g;var y=r(h);return i!==void 0&&i(g,y)?g:(u=h,d=y)}var c=!1,u,d,f=n===void 0?null:n;return[function(){return l(e())},f===null?void 0:function(){return l(f())}]},[e,n,r,i]);var a=Xme(t,o[0],o[1]);return qme(function(){s.hasValue=!0,s.value=a},[a]),Qme(a),a};uG.exports=dG;var Jme=uG.exports;const ege=Tc(Jme),{useSyncExternalStoreWithSelector:tge}=ege;function nge(t,e=t.getState,n){const r=tge(t.subscribe,t.getState,t.getServerState||t.getState,e,n);return M.useDebugValue(r),r}const lF=t=>{({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1}&&"production")!=="production"&&typeof t!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const e=typeof t=="function"?Lme(t):t,n=(r,i)=>nge(e,r,i);return Object.assign(n,e),n},pG=t=>t?lF(t):lF;function As(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r3?e.i-4:e.i:Array.isArray(t)?1:GR(t)?2:WR(t)?3:0}function iT(t,e){return Ph(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function rge(t,e){return Ph(t)===2?t.get(e):t[e]}function mG(t,e,n){var r=Ph(t);r===2?t.set(e,n):r===3?t.add(n):t[e]=n}function ige(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function GR(t){return lge&&t instanceof Map}function WR(t){return cge&&t instanceof Set}function pu(t){return t.o||t.t}function YR(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=dge(t);delete e[Do];for(var n=KR(e),r=0;r1&&(t.set=t.add=t.clear=t.delete=oge),Object.freeze(t),e&&ug(t,function(n,r){return XR(r,!0)},!0)),t}function oge(){As(2)}function ZR(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function Ca(t){var e=fge[t];return e||As(18,t),e}function cF(){return dg}function mP(t,e){e&&(Ca("Patches"),t.u=[],t.s=[],t.v=e)}function Ex(t){oT(t),t.p.forEach(sge),t.p=null}function oT(t){t===dg&&(dg=t.l)}function uF(t){return dg={p:[],l:dg,h:t,m:!0,_:0}}function sge(t){var e=t[Do];e.i===0||e.i===1?e.j():e.g=!0}function gP(t,e){e._=e.p.length;var n=e.p[0],r=t!==void 0&&t!==n;return e.h.O||Ca("ES5").S(e,t,r),r?(n[Do].P&&(Ex(e),As(4)),qu(t)&&(t=Px(e,t),e.l||Cx(e,t)),e.u&&Ca("Patches").M(n[Do].t,t,e.u,e.s)):t=Px(e,n,[]),Ex(e),e.u&&e.v(e.u,e.s),t!==gG?t:void 0}function Px(t,e,n){if(ZR(e))return e;var r=e[Do];if(!r)return ug(e,function(a,l){return dF(t,r,e,a,l,n)},!0),e;if(r.A!==t)return e;if(!r.P)return Cx(t,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=YR(r.k):r.o,o=i,s=!1;r.i===3&&(o=new Set(i),i.clear(),s=!0),ug(o,function(a,l){return dF(t,r,i,a,l,n,s)}),Cx(t,i,!1),n&&t.u&&Ca("Patches").N(r,n,t.u,t.s)}return r.o}function dF(t,e,n,r,i,o,s){if(ah(i)){var a=Px(t,i,o&&e&&e.i!==3&&!iT(e.R,r)?o.concat(r):void 0);if(mG(n,r,a),!ah(a))return;t.m=!1}else s&&n.add(i);if(qu(i)&&!ZR(i)){if(!t.h.D&&t._<1)return;Px(t,i),e&&e.A.l||Cx(t,i)}}function Cx(t,e,n){n===void 0&&(n=!1),!t.l&&t.h.D&&t.m&&XR(e,n)}function vP(t,e){var n=t[Do];return(n?pu(n):t)[e]}function fF(t,e){if(e in t)for(var n=Object.getPrototypeOf(t);n;){var r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function sT(t){t.P||(t.P=!0,t.l&&sT(t.l))}function yP(t){t.o||(t.o=YR(t.t))}function aT(t,e,n){var r=GR(e)?Ca("MapSet").F(e,n):WR(e)?Ca("MapSet").T(e,n):t.O?function(i,o){var s=Array.isArray(i),a={i:s?1:0,A:o?o.A:cF(),P:!1,I:!1,R:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=a,c=cT;s&&(l=[a],c=Qp);var u=Proxy.revocable(l,c),d=u.revoke,f=u.proxy;return a.k=f,a.j=d,f}(e,n):Ca("ES5").J(e,n);return(n?n.A:cF()).p.push(r),r}function age(t){return ah(t)||As(22,t),function e(n){if(!qu(n))return n;var r,i=n[Do],o=Ph(n);if(i){if(!i.P&&(i.i<4||!Ca("ES5").K(i)))return i.t;i.I=!0,r=hF(n,o),i.I=!1}else r=hF(n,o);return ug(r,function(s,a){i&&rge(i.t,s)===a||mG(r,s,e(a))}),o===3?new Set(r):r}(t)}function hF(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return YR(t)}var pF,dg,qR=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",lge=typeof Map<"u",cge=typeof Set<"u",mF=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",gG=qR?Symbol.for("immer-nothing"):((pF={})["immer-nothing"]=!0,pF),lT=qR?Symbol.for("immer-draftable"):"__$immer_draftable",Do=qR?Symbol.for("immer-state"):"__$immer_state",uge=""+Object.prototype.constructor,KR=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,dge=Object.getOwnPropertyDescriptors||function(t){var e={};return KR(t).forEach(function(n){e[n]=Object.getOwnPropertyDescriptor(t,n)}),e},fge={},cT={get:function(t,e){if(e===Do)return t;var n=pu(t);if(!iT(n,e))return function(i,o,s){var a,l=fF(o,s);return l?"value"in l?l.value:(a=l.get)===null||a===void 0?void 0:a.call(i.k):void 0}(t,n,e);var r=n[e];return t.I||!qu(r)?r:r===vP(t.t,e)?(yP(t),t.o[e]=aT(t.A.h,r,t)):r},has:function(t,e){return e in pu(t)},ownKeys:function(t){return Reflect.ownKeys(pu(t))},set:function(t,e,n){var r=fF(pu(t),e);if(r?.set)return r.set.call(t.k,n),!0;if(!t.P){var i=vP(pu(t),e),o=i?.[Do];if(o&&o.t===n)return t.o[e]=n,t.R[e]=!1,!0;if(ige(n,i)&&(n!==void 0||iT(t.t,e)))return!0;yP(t),sT(t)}return t.o[e]===n&&(n!==void 0||e in t.o)||Number.isNaN(n)&&Number.isNaN(t.o[e])||(t.o[e]=n,t.R[e]=!0),!0},deleteProperty:function(t,e){return vP(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,yP(t),sT(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var n=pu(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:r.enumerable,value:n[e]}},defineProperty:function(){As(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){As(12)}},Qp={};ug(cT,function(t,e){Qp[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Qp.deleteProperty=function(t,e){return Qp.set.call(this,t,e,void 0)},Qp.set=function(t,e,n){return cT.set.call(this,t[0],e,n,t[0])};var hge=function(){function t(n){var r=this;this.O=mF,this.D=!0,this.produce=function(i,o,s){if(typeof i=="function"&&typeof o!="function"){var a=o;o=i;var l=r;return function(y){var _=this;y===void 0&&(y=a);for(var v=arguments.length,x=Array(v>1?v-1:0),w=1;w1?u-1:0),f=1;f=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var s=Ca("Patches").$;return ah(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},t}(),Io=new hge,pge=Io.produce;Io.produceWithPatches.bind(Io);Io.setAutoFreeze.bind(Io);Io.setUseProxies.bind(Io);Io.applyPatches.bind(Io);Io.createDraft.bind(Io);Io.finishDraft.bind(Io);const mge=t=>(e,n,r)=>(r.setState=(i,o,...s)=>{const a=typeof i=="function"?pge(i):i;return e(a,o,...s)},t(r.setState,n,r)),vG=mge;function gge(t){return t.type.startsWith("GuiAdd")}const vge={theme:{type:"ThemeConfigurationMessage",titlebar_content:null,fixed_sidebar:!1},label:"",server:"ws://localhost:8080",websocketConnected:!1,backgroundAvailable:!1,guiConfigFromId:{},guiValueFromId:{},guiAttributeFromId:{}};function yge(t){return H.useState(()=>pG(vG(e=>({...vge,server:t,setTheme:n=>e(r=>{r.theme=n}),addGui:n=>e(r=>{r.guiConfigFromId[n.id]=n}),setGuiValue:(n,r)=>e(i=>{i.guiValueFromId[n]=r}),setGuiVisible:(n,r)=>e(i=>{i.guiAttributeFromId[n]={...i.guiAttributeFromId[n],visible:r}}),setGuiDisabled:(n,r)=>e(i=>{i.guiAttributeFromId[n]={...i.guiAttributeFromId[n],disabled:r}}),removeGui:n=>e(r=>{delete r.guiConfigFromId[n],delete r.guiValueFromId[n],delete r.guiAttributeFromId[n]}),resetGui:()=>e(n=>{n.guiConfigFromId={}})}))))[0]}const _ge=new xl(1,1,1,16,1),xge=new rd(1),wge=new _l({color:15526912}),uT=H.forwardRef(function({show_axes:e=!0,axes_length:n=.5,axes_radius:r=.0125},i){return I.jsx("group",{ref:i,children:e&&I.jsxs(I.Fragment,{children:[I.jsx("mesh",{geometry:xge,material:wge,scale:new Z(r*2.5,r*2.5,r*2.5)}),I.jsxs(F$,{geometry:_ge,children:[I.jsx("meshBasicMaterial",{}),I.jsx(vm,{rotation:new ki(0,0,3*Math.PI/2),position:[.5*n,0,0],scale:new Z(r,n,r),color:13369344}),I.jsx(vm,{position:[0,.5*n,0],scale:new Z(r,n,r),color:52224}),I.jsx(vm,{rotation:new ki(Math.PI/2,0,0),position:[0,0,.5*n],scale:new Z(r,n,r),color:204})]})]})})}),Sge=new xl(1,1,1,3,1),bge=H.forwardRef(function(e,n){const r=Math.tan(e.fov/2),i=r*e.aspect,o=1;function s(a){return a=a.map(l=>[l[0]*i,l[1]*r,l[2]*o]),[...Array(a.length-1).keys()].map(l=>I.jsx(Mge,{radius:.015*e.scale,start:new Z().fromArray(a[l]).multiplyScalar(e.scale),end:new Z().fromArray(a[l+1]).multiplyScalar(e.scale),color:e.color},l))}return I.jsx("group",{ref:n,children:I.jsxs(F$,{limit:9,geometry:Sge,children:[I.jsx("meshBasicMaterial",{color:e.color}),s([[-1,-1,1],[1,-1,1],[1,1,1],[-1,1,1],[-1,-1,1]]),s([[-1,-1,1],[0,0,0],[1,-1,1]]),s([[-1,1,1],[0,0,0],[1,1,1]]),s([[0,-1.2,1],[0,-.9,1]])]})})});function Mge(t){const e=new Z().subVectors(t.end,t.start).normalize(),n=new Z(0,1,0),r=new Z().copy(n).cross(e).normalize(),i=Math.acos(e.dot(n)),o=t.start.distanceTo(t.end),s=new Z().addVectors(t.start,t.end).divideScalar(2),a=new Hn().setFromAxisAngle(r,i);return I.jsx(I.Fragment,{children:I.jsx(vm,{position:s,quaternion:a,scale:[t.radius,o,t.radius]})})}const Ege=t=>(e,n,r)=>{const i=r.subscribe;return r.subscribe=(s,a,l)=>{let c=s;if(a){const u=l?.equalityFn||Object.is;let d=s(r.getState());c=f=>{const h=s(f);if(!u(d,h)){const g=d;a(d=h,g)}},l?.fireImmediately&&a(d,d)}return i(c)},t(e,n,r)},Pge=Ege;var xa=function(){return xa=Object.assign||function(e){for(var n,r=1,i=arguments.length;r"u")return jge;var e=$ge(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},Wge=wG(),Yge=function(t,e,n,r){var i=t.left,o=t.top,s=t.right,a=t.gap;return n===void 0&&(n="margin"),` - .`.concat(Tge,` { +`+n.fragmentShader),this.effectCompositerQuad?(this.effectCompositerQuad.material.dispose(),this.effectCompositerQuad.material=new sn(n)):this.effectCompositerQuad=new Dp(new sn(n))}generateHemisphereSamples(e){const n=[];for(let r=0;rt.charCodeAt(0));M.forwardRef(({halfRes:t,screenSpaceRadius:e,quality:n,depthAwareUpsampling:r=!0,aoRadius:i=5,aoSamples:o=16,denoiseSamples:s=4,denoiseRadius:a=12,distanceFalloff:l=1,intensity:c=1,color:u,renderMode:d=0},f)=>{const{camera:h,scene:g}=dn(),y=M.useMemo(()=>new hme(g,h),[]);return M.useLayoutEffect(()=>{hu(y.configuration,{color:u,aoRadius:i,distanceFalloff:l,intensity:c,aoSamples:o,denoiseSamples:s,denoiseRadius:a,screenSpaceRadius:e,renderMode:d,halfRes:t,depthAwareUpsampling:r})},[e,u,i,l,c,o,s,a,d,t,r]),M.useLayoutEffect(()=>{n&&y.setQualityMode(n.charAt(0).toUpperCase()+n.slice(1))},[n]),I.jsx("primitive",{ref:f,object:y})});var tT;try{tT=new TextDecoder}catch{}var mt,rs,ye=0,dr={},wn,ec,Ko=0,_a=0,ci,ol,Ao=[],vn,XN={useRecords:!1,mapsAsObjects:!0};class J${}const eG=new J$;eG.name="MessagePack 0xC1";var pc=!1,tG=2,ZN;try{new Function("")}catch{tG=1/0}class cg{constructor(e){e&&(e.useRecords===!1&&e.mapsAsObjects===void 0&&(e.mapsAsObjects=!0),e.sequential&&e.trusted!==!1&&(e.trusted=!0,!e.structures&&e.useRecords!=!1&&(e.structures=[],e.maxSharedStructures||(e.maxSharedStructures=0))),e.structures?e.structures.sharedLength=e.structures.length:e.getStructures&&((e.structures=[]).uninitialized=!0,e.structures.sharedLength=0),e.int64AsNumber&&(e.int64AsType="number")),Object.assign(this,e)}unpack(e,n){if(mt)return sG(()=>(rT(),this?this.unpack(e,n):cg.prototype.unpack.call(XN,e,n)));!e.buffer&&e.constructor===ArrayBuffer&&(e=typeof Buffer<"u"?Buffer.from(e):new Uint8Array(e)),typeof n=="object"?(rs=n.end||e.length,ye=n.start||0):(ye=0,rs=n>-1?n:e.length),_a=0,ec=null,ci=null,mt=e;try{vn=e.dataView||(e.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength))}catch(r){throw mt=null,e instanceof Uint8Array?r:new Error("Source must be a Uint8Array or Buffer but was a "+(e&&typeof e=="object"?e.constructor.name:typeof e))}if(this instanceof cg){if(dr=this,this.structures)return wn=this.structures,by(n);(!wn||wn.length>0)&&(wn=[])}else dr=XN,(!wn||wn.length>0)&&(wn=[]);return by(n)}unpackMultiple(e,n){let r,i=0;try{pc=!0;let o=e.length,s=this?this.unpack(e,o):US.unpack(e,o);if(n){if(n(s,i,ye)===!1)return;for(;yer.slice(0)));for(let r=0,i=e.length;r=32&&(o.highByte=r-32>>5))}e.sharedLength=e.length;for(let r in n||[])if(r>=0){let i=e[r],o=n[r];o&&(i&&((e.restoreStructures||(e.restoreStructures=[]))[r]=i),e[r]=o)}return this.structures=e}decode(e,n){return this.unpack(e,n)}}function by(t){try{if(!dr.trusted&&!pc){let n=wn.sharedLength||0;n=32&&ZN?(e=ZN(mt,ye,rs,dr),mt=null,!(t&&t.lazy)&&e&&(e=e.toJSON()),ye=rs):e=Or(),ci&&(ye=ci.postBundlePosition,ci=null),pc&&(wn.restoreStructures=null),ye==rs)wn&&wn.restoreStructures&&qN(),wn=null,mt=null,ol&&(ol=null);else{if(ye>rs)throw new Error("Unexpected end of MessagePack data");if(!pc){let n;try{n=JSON.stringify(e,(r,i)=>typeof i=="bigint"?`${i}n`:i).slice(0,100)}catch(r){n="(JSON view not available "+r+")"}throw new Error("Data read, but end of buffer not reached "+n)}}return e}catch(e){throw wn&&wn.restoreStructures&&qN(),rT(),(e instanceof RangeError||e.message.startsWith("Unexpected end of buffer")||ye>rs)&&(e.incomplete=!0),e}}function qN(){for(let t in wn.restoreStructures)wn[t]=wn.restoreStructures[t];wn.restoreStructures=null}function Or(){let t=mt[ye++];if(t<160)if(t<128){if(t<64)return t;{let e=wn[t&63]||dr.getStructures&&nG()[t&63];return e?(e.read||(e.read=VR(e,t&63)),e.read()):t}}else if(t<144)if(t-=128,dr.mapsAsObjects){let e={};for(let n=0;n=ye)return ec.slice(ye-Ko,(ye+=e)-Ko);if(_a==0&&rs<140){let n=e<16?jR(e):rG(e);if(n!=null)return n}return nT(e)}else{let e;switch(t){case 192:return null;case 193:return ci?(e=Or(),e>0?ci[1].slice(ci.position1,ci.position1+=e):ci[0].slice(ci.position0,ci.position0-=e)):eG;case 194:return!1;case 195:return!0;case 196:if(e=mt[ye++],e===void 0)throw new Error("Unexpected end of buffer");return fP(e);case 197:return e=vn.getUint16(ye),ye+=2,fP(e);case 198:return e=vn.getUint32(ye),ye+=4,fP(e);case 199:return su(mt[ye++]);case 200:return e=vn.getUint16(ye),ye+=2,su(e);case 201:return e=vn.getUint32(ye),ye+=4,su(e);case 202:if(e=vn.getFloat32(ye),dr.useFloat32>2){let n=$R[(mt[ye]&127)<<1|mt[ye+1]>>7];return ye+=4,(n*e+(e>0?.5:-.5)>>0)/n}return ye+=4,e;case 203:return e=vn.getFloat64(ye),ye+=8,e;case 204:return mt[ye++];case 205:return e=vn.getUint16(ye),ye+=2,e;case 206:return e=vn.getUint32(ye),ye+=4,e;case 207:return dr.int64AsType==="number"?(e=vn.getUint32(ye)*4294967296,e+=vn.getUint32(ye+4)):dr.int64AsType==="string"?e=vn.getBigUint64(ye).toString():dr.int64AsType==="auto"?(e=vn.getBigUint64(ye),e<=BigInt(2)<=BigInt(-2)<=ye?ec.slice(ye-Ko,(ye+=e)-Ko):mme(e);case 218:return e=vn.getUint16(ye),ye+=2,_a>=ye?ec.slice(ye-Ko,(ye+=e)-Ko):gme(e);case 219:return e=vn.getUint32(ye),ye+=4,_a>=ye?ec.slice(ye-Ko,(ye+=e)-Ko):vme(e);case 220:return e=vn.getUint16(ye),ye+=2,QN(e);case 221:return e=vn.getUint32(ye),ye+=4,QN(e);case 222:return e=vn.getUint16(ye),ye+=2,JN(e);case 223:return e=vn.getUint32(ye),ye+=4,JN(e);default:if(t>=224)return t-256;if(t===void 0){let n=new Error("Unexpected end of MessagePack data");throw n.incomplete=!0,n}throw new Error("Unknown MessagePack token "+t)}}}const pme=/^[a-zA-Z_$][a-zA-Z\d_$]*$/;function VR(t,e){function n(){if(n.count++>tG){let i=t.read=new Function("r","return function(){return "+(dr.freezeData?"Object.freeze":"")+"({"+t.map(o=>o==="__proto__"?"__proto_:r()":pme.test(o)?o+":r()":"["+JSON.stringify(o)+"]:r()").join(",")+"})}")(Or);return t.highByte===0&&(t.read=KN(e,t.read)),i()}let r={};for(let i=0,o=t.length;ifunction(){let n=mt[ye++];if(n===0)return e();let r=t<32?-(t+(n<<5)):t+(n<<5),i=wn[r]||nG()[r];if(!i)throw new Error("Record id is not defined for "+r);return i.read||(i.read=VR(i,t)),i.read()};function nG(){let t=sG(()=>(mt=null,dr.getStructures()));return wn=dr._mergeStructures(t,wn)}var nT=Wg,mme=Wg,gme=Wg,vme=Wg;function Wg(t){let e;if(t<16&&(e=jR(t)))return e;if(t>64&&tT)return tT.decode(mt.subarray(ye,ye+=t));const n=ye+t,r=[];for(e="";ye65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|l&1023),r.push(l)}else r.push(i);r.length>=4096&&(e+=ai.apply(String,r),r.length=0)}return r.length>0&&(e+=ai.apply(String,r)),e}function QN(t){let e=new Array(t);for(let n=0;n0){ye=e;return}n[r]=i}return ai.apply(String,n)}function jR(t){if(t<4)if(t<2){if(t===0)return"";{let e=mt[ye++];if((e&128)>1){ye-=1;return}return ai(e)}}else{let e=mt[ye++],n=mt[ye++];if((e&128)>0||(n&128)>0){ye-=2;return}if(t<3)return ai(e,n);let r=mt[ye++];if((r&128)>0){ye-=3;return}return ai(e,n,r)}else{let e=mt[ye++],n=mt[ye++],r=mt[ye++],i=mt[ye++];if((e&128)>0||(n&128)>0||(r&128)>0||(i&128)>0){ye-=4;return}if(t<6){if(t===4)return ai(e,n,r,i);{let o=mt[ye++];if((o&128)>0){ye-=5;return}return ai(e,n,r,i,o)}}else if(t<8){let o=mt[ye++],s=mt[ye++];if((o&128)>0||(s&128)>0){ye-=6;return}if(t<7)return ai(e,n,r,i,o,s);let a=mt[ye++];if((a&128)>0){ye-=7;return}return ai(e,n,r,i,o,s,a)}else{let o=mt[ye++],s=mt[ye++],a=mt[ye++],l=mt[ye++];if((o&128)>0||(s&128)>0||(a&128)>0||(l&128)>0){ye-=8;return}if(t<10){if(t===8)return ai(e,n,r,i,o,s,a,l);{let c=mt[ye++];if((c&128)>0){ye-=9;return}return ai(e,n,r,i,o,s,a,l,c)}}else if(t<12){let c=mt[ye++],u=mt[ye++];if((c&128)>0||(u&128)>0){ye-=10;return}if(t<11)return ai(e,n,r,i,o,s,a,l,c,u);let d=mt[ye++];if((d&128)>0){ye-=11;return}return ai(e,n,r,i,o,s,a,l,c,u,d)}else{let c=mt[ye++],u=mt[ye++],d=mt[ye++],f=mt[ye++];if((c&128)>0||(u&128)>0||(d&128)>0||(f&128)>0){ye-=12;return}if(t<14){if(t===12)return ai(e,n,r,i,o,s,a,l,c,u,d,f);{let h=mt[ye++];if((h&128)>0){ye-=13;return}return ai(e,n,r,i,o,s,a,l,c,u,d,f,h)}}else{let h=mt[ye++],g=mt[ye++];if((h&128)>0||(g&128)>0){ye-=14;return}if(t<15)return ai(e,n,r,i,o,s,a,l,c,u,d,f,h,g);let y=mt[ye++];if((y&128)>0){ye-=15;return}return ai(e,n,r,i,o,s,a,l,c,u,d,f,h,g,y)}}}}}function eF(){let t=mt[ye++],e;if(t<192)e=t-160;else switch(t){case 217:e=mt[ye++];break;case 218:e=vn.getUint16(ye),ye+=2;break;case 219:e=vn.getUint32(ye),ye+=4;break;default:throw new Error("Expected string")}return Wg(e)}function fP(t){return dr.copyBuffers?Uint8Array.prototype.slice.call(mt,ye,ye+=t):mt.subarray(ye,ye+=t)}function su(t){let e=mt[ye++];if(Ao[e]){let n;return Ao[e](mt.subarray(ye,n=ye+=t),r=>{ye=r;try{return Or()}finally{ye=n}})}else throw new Error("Unknown extension type "+e)}var tF=new Array(4096);function iG(){let t=mt[ye++];if(t>=160&&t<192){if(t=t-160,_a>=ye)return ec.slice(ye-Ko,(ye+=t)-Ko);if(!(_a==0&&rs<180))return nT(t)}else return ye--,Or().toString();let e=(t<<5^(t>1?vn.getUint16(ye):t>0?mt[ye]:0))&4095,n=tF[e],r=ye,i=ye+t-3,o,s=0;if(n&&n.bytes==t){for(;r{let n=Or().map(o=>o.toString()),r=t;e!==void 0&&(t=t<32?-((e<<5)+t):(e<<5)+t,n.highByte=e);let i=wn[t];return i&&(i.isShared||pc)&&((wn.restoreStructures||(wn.restoreStructures=[]))[t]=i),wn[t]=n,n.read=VR(n,r),n.read()};Ao[0]=()=>{};Ao[0].noBuffer=!0;let yme={Error,TypeError,ReferenceError};Ao[101]=()=>{let t=Or();return(yme[t[0]]||Error)(t[1])};Ao[105]=t=>{let e=vn.getUint32(ye-4);ol||(ol=new Map);let n=mt[ye],r;n>=144&&n<160||n==220||n==221?r=[]:r={};let i={target:r};ol.set(e,i);let o=Or();return i.used?Object.assign(r,o):(i.target=o,o)};Ao[112]=t=>{let e=vn.getUint32(ye-4),n=ol.get(e);return n.used=!0,n.target};Ao[115]=()=>new Set(Or());const oG=["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64","BigInt64","BigUint64"].map(t=>t+"Array");let _me=typeof globalThis=="object"?globalThis:window;Ao[116]=t=>{let e=t[0],n=oG[e];if(!n)throw new Error("Could not find typed array for code "+e);return new _me[n](Uint8Array.prototype.slice.call(t,1).buffer)};Ao[120]=()=>{let t=Or();return new RegExp(t[0],t[1])};const xme=[];Ao[98]=t=>{let e=(t[0]<<24)+(t[1]<<16)+(t[2]<<8)+t[3],n=ye;return ye+=e-t.length,ci=xme,ci=[eF(),eF()],ci.position0=0,ci.position1=0,ci.postBundlePosition=ye,ye=n,Or()};Ao[255]=t=>t.length==4?new Date((t[0]*16777216+(t[1]<<16)+(t[2]<<8)+t[3])*1e3):t.length==8?new Date(((t[0]<<22)+(t[1]<<14)+(t[2]<<6)+(t[3]>>2))/1e6+((t[3]&3)*4294967296+t[4]*16777216+(t[5]<<16)+(t[6]<<8)+t[7])*1e3):t.length==12?new Date(((t[0]<<24)+(t[1]<<16)+(t[2]<<8)+t[3])/1e6+((t[4]&128?-281474976710656:0)+t[6]*1099511627776+t[7]*4294967296+t[8]*16777216+(t[9]<<16)+(t[10]<<8)+t[11])*1e3):new Date("invalid");function sG(t){let e=rs,n=ye,r=Ko,i=_a,o=ec,s=ol,a=ci,l=new Uint8Array(mt.slice(0,rs)),c=wn,u=wn.slice(0,wn.length),d=dr,f=pc,h=t();return rs=e,ye=n,Ko=r,_a=i,ec=o,ol=s,ci=a,mt=l,pc=f,wn=c,wn.splice(0,wn.length,...u),dr=d,vn=new DataView(mt.buffer,mt.byteOffset,mt.byteLength),h}function rT(){mt=null,ol=null,wn=null}const $R=new Array(147);for(let t=0;t<256;t++)$R[t]=+("1e"+Math.floor(45.15-t*.30103));var US=new cg({useRecords:!1});const wme=US.unpack;US.unpackMultiple;US.unpack;let Sme=new Float32Array(1);new Uint8Array(Sme.buffer,0,4);let I_;try{I_=new TextEncoder}catch{}let iT,aG;const BS=typeof Buffer<"u",My=BS?function(t){return Buffer.allocUnsafeSlow(t)}:Uint8Array,lG=BS?Buffer:Uint8Array,rF=BS?4294967296:2144337920;let Le,Ip,Zn,be=0,$i,mr=null,bme;const Mme=21760,Eme=/[\u0080-\uFFFF]/,rf=Symbol("record-id");class Pme extends cg{constructor(e){super(e),this.offset=0;let n,r,i,o,s=lG.prototype.utf8Write?function(N,U){return Le.utf8Write(N,U,4294967295)}:I_&&I_.encodeInto?function(N,U){return I_.encodeInto(N,Le.subarray(U)).written}:!1,a=this;e||(e={});let l=e&&e.sequential,c=e.structures||e.saveStructures,u=e.maxSharedStructures;if(u==null&&(u=c?32:0),u>8160)throw new Error("Maximum maxSharedStructure is 8160");e.structuredClone&&e.moreTypes==null&&(this.moreTypes=!0);let d=e.maxOwnStructures;d==null&&(d=c?32:64),!this.structures&&e.useRecords!=!1&&(this.structures=[]);let f=u>32||d+u>64,h=u+64,g=u+d+64;if(g>8256)throw new Error("Maximum maxSharedStructure + maxOwnStructure is 8192");let y=[],_=0,v=0;this.pack=this.encode=function(N,U){if(Le||(Le=new My(8192),Zn=Le.dataView||(Le.dataView=new DataView(Le.buffer,0,8192)),be=0),$i=Le.length-10,$i-be<2048?(Le=new My(Le.length),Zn=Le.dataView||(Le.dataView=new DataView(Le.buffer,0,Le.length)),$i=Le.length-10,be=0):be=be+7&2147483640,n=be,o=a.structuredClone?new Map:null,a.bundleStrings&&typeof N!="string"?(mr=[],mr.size=1/0):mr=null,i=a.structures,i){i.uninitialized&&(i=a._mergeStructures(a.getStructures()));let k=i.sharedLength||0;if(k>u)throw new Error("Shared structures is larger than maximum shared structures, try increasing maxSharedStructures to "+i.sharedLength);if(!i.transitions){i.transitions=Object.create(null);for(let z=0;zj.offset>$.offset?1:-1),G=z.length,W=-1;for(;k&&G>0;){let j=z[--G].offset+n;jk.position+n?W>=0&&(W+=6):(W>=0&&(Zn.setUint32(k.position+n,Zn.getUint32(k.position+n)+W),W=-1),k=k.previous,G++)}W>=0&&k&&Zn.setUint32(k.position+n,Zn.getUint32(k.position+n)+W),be+=z.length*6,be>$i&&R(be),a.offset=be;let B=Tme(Le.subarray(n,be),z);return o=null,B}return a.offset=be,U&Ame?(Le.start=n,Le.end=be,Le):Le.subarray(n,be)}finally{if(i){v<10&&v++;let k=i.sharedLength||0;if(i.length>k&&!l&&(i.length=k),_>1e4)i.transitions=null,v=0,_=0,y.length>0&&(y=[]);else if(y.length>0&&!l){for(let z=0,G=y.length;z{var U=N.length;U<16?Le[be++]=144|U:U<65536?(Le[be++]=220,Le[be++]=U>>8,Le[be++]=U&255):(Le[be++]=221,Zn.setUint32(be,U),be+=4);for(let k=0;k{be>$i&&(Le=R(be));var U=typeof N,k;if(U==="string"){let z=N.length;if(mr&&z>=4&&z<4096){if((mr.size+=z)>Mme){let j,$=(mr[0]?mr[0].length*3+mr[1].length:0)+10;be+$>$i&&(Le=R(be+$));let q;mr.position?(q=mr,Le[be]=200,be+=3,Le[be++]=98,j=be-n,be+=4,sF(n,w,0),Zn.setUint16(j+n-3,be-n-j)):(Le[be++]=214,Le[be++]=98,j=be-n,be+=4),mr=["",""],mr.previous=q,mr.size=0,mr.position=j}let B=Eme.test(N);mr[B?0:1]+=N,Le[be++]=193,w(B?-z:z);return}let G;z<32?G=1:z<256?G=2:z<65536?G=3:G=5;let W=z*3;if(be+W>$i&&(Le=R(be+W)),z<64||!s){let B,j,$,q=be+G;for(B=0;B>6|192,Le[q++]=j&63|128):(j&64512)===55296&&(($=N.charCodeAt(B+1))&64512)===56320?(j=65536+((j&1023)<<10)+($&1023),B++,Le[q++]=j>>18|240,Le[q++]=j>>12&63|128,Le[q++]=j>>6&63|128,Le[q++]=j&63|128):(Le[q++]=j>>12|224,Le[q++]=j>>6&63|128,Le[q++]=j&63|128);k=q-be-G}else k=s(N,be+G);k<32?Le[be++]=160|k:k<256?(G<2&&Le.copyWithin(be+2,be+1,be+1+k),Le[be++]=217,Le[be++]=k):k<65536?(G<3&&Le.copyWithin(be+3,be+2,be+2+k),Le[be++]=218,Le[be++]=k>>8,Le[be++]=k&255):(G<5&&Le.copyWithin(be+5,be+3,be+3+k),Le[be++]=219,Zn.setUint32(be,k),be+=4),be+=k}else if(U==="number")if(N>>>0===N)N<32||N<128&&this.useRecords===!1||N<64&&!this.randomAccessStructure?Le[be++]=N:N<256?(Le[be++]=204,Le[be++]=N):N<65536?(Le[be++]=205,Le[be++]=N>>8,Le[be++]=N&255):(Le[be++]=206,Zn.setUint32(be,N),be+=4);else if(N>>0===N)N>=-32?Le[be++]=256+N:N>=-128?(Le[be++]=208,Le[be++]=N+256):N>=-32768?(Le[be++]=209,Zn.setInt16(be,N),be+=2):(Le[be++]=210,Zn.setInt32(be,N),be+=4);else{let z;if((z=this.useFloat32)>0&&N<4294967296&&N>=-2147483648){Le[be++]=202,Zn.setFloat32(be,N);let G;if(z<4||(G=N*$R[(Le[be]&127)<<1|Le[be+1]>>7])>>0===G){be+=4;return}else be--}Le[be++]=203,Zn.setFloat64(be,N),be+=8}else if(U==="object"||U==="function")if(!N)Le[be++]=192;else{if(o){let G=o.get(N);if(G){if(!G.id){let W=o.idsToInsert||(o.idsToInsert=[]);G.id=W.push(G)}Le[be++]=214,Le[be++]=112,Zn.setUint32(be,G.id),be+=4;return}else o.set(N,{offset:be-n})}let z=N.constructor;if(z===Object)O(N,!0);else if(z===Array)x(N);else if(z===Map)if(this.mapAsEmptyObject)Le[be++]=128;else{k=N.size,k<16?Le[be++]=128|k:k<65536?(Le[be++]=222,Le[be++]=k>>8,Le[be++]=k&255):(Le[be++]=223,Zn.setUint32(be,k),be+=4);for(let[G,W]of N)w(G),w(W)}else{for(let G=0,W=iT.length;G(Le=$,$=null,be+=J,be>$i&&R(be),{target:Le,targetView:Zn,position:be-J}),w)}finally{$&&(Le=$,Zn=q,be=K,$i=Le.length-10)}re&&(re.length+be>$i&&R(re.length+be),be=Cme(re,Le,be,j.type));return}}if(Array.isArray(N))x(N);else{if(N.toJSON){const G=N.toJSON();if(G!==N)return w(G)}if(U==="function")return w(this.writeFunction&&this.writeFunction(N));O(N,!N.hasOwnProperty)}}}else if(U==="boolean")Le[be++]=N?195:194;else if(U==="bigint"){if(N=-(BigInt(1)<0)Le[be++]=207,Zn.setBigUint64(be,N);else if(this.largeBigIntToFloat)Le[be++]=203,Zn.setFloat64(be,Number(N));else throw new RangeError(N+" was too large to fit in MessagePack 64-bit integer format, set largeBigIntToFloat to convert to float-64");be+=8}else if(U==="undefined")this.encodeUndefinedAsNil?Le[be++]=192:(Le[be++]=212,Le[be++]=0,Le[be++]=0);else throw new Error("Unknown type: "+U)},S=this.variableMapSize||this.coercibleKeyAsNumber?N=>{let U=Object.keys(N),k=U.length;k<16?Le[be++]=128|k:k<65536?(Le[be++]=222,Le[be++]=k>>8,Le[be++]=k&255):(Le[be++]=223,Zn.setUint32(be,k),be+=4);let z;if(this.coercibleKeyAsNumber)for(let G=0;G{Le[be++]=222;let k=be-n;be+=2;let z=0;for(let G in N)(U||N.hasOwnProperty(G))&&(w(G),w(N[G]),z++);Le[k+++n]=z>>8,Le[k+n]=z&255},E=this.useRecords===!1?S:e.progressiveRecords&&!f?(N,U)=>{let k,z=i.transitions||(i.transitions=Object.create(null)),G=be++-n,W;for(let B in N)if(U||N.hasOwnProperty(B)){if(k=z[B],k)z=k;else{let j=Object.keys(N),$=z;z=i.transitions;let q=0;for(let K=0,re=j.length;K{let k,z=i.transitions||(i.transitions=Object.create(null)),G=0;for(let B in N)(U||N.hasOwnProperty(B))&&(k=z[B],k||(k=z[B]=Object.create(null),G++),z=k);let W=z[rf];W?W>=96&&f?(Le[be++]=((W-=96)&31)+96,Le[be++]=W>>5):Le[be++]=W:T(z,z.__keys__||Object.keys(N),G);for(let B in N)(U||N.hasOwnProperty(B))&&w(N[B])},C=typeof this.useRecords=="function"&&this.useRecords,O=C?(N,U)=>{C(N)?E(N,U):S(N,U)}:E,R=N=>{let U;if(N>16777216){if(N-n>rF)throw new Error("Packed buffer would be larger than maximum buffer size");U=Math.min(rF,Math.round(Math.max((N-n)*(N>67108864?1.25:2),4194304)/4096)*4096)}else U=(Math.max(N-n<<2,Le.length-1)>>12)+1<<12;let k=new My(U);return Zn=k.dataView||(k.dataView=new DataView(k.buffer,0,U)),N=Math.min(N,Le.length),Le.copy?Le.copy(k,0,n,N):k.set(Le.slice(n,N)),be-=n,n=0,$i=k.length-10,Le=k},T=(N,U,k)=>{let z=i.nextId;z||(z=64),z=g&&(z=h),i.nextId=z+1);let G=U.highByte=z>=96&&f?z-96>>5:-1;N[rf]=z,N.__keys__=U,i[z-64]=U,z=0?(Le[be++]=(z&31)+96,Le[be++]=G):Le[be++]=z):(G>=0?(Le[be++]=213,Le[be++]=114,Le[be++]=(z&31)+96,Le[be++]=G):(Le[be++]=212,Le[be++]=114,Le[be++]=z),k&&(_+=v*k),y.length>=d&&(y.shift()[rf]=0),y.push(N),w(U))},A=(N,U,k,z)=>{let G=Le,W=be,B=$i,j=n;Le=Ip,be=0,n=0,Le||(Ip=Le=new My(8192)),$i=Le.length-10,T(N,U,z),Ip=Le;let $=be;if(Le=G,be=W,$i=B,n=j,$>1){let q=be+$-1;q>$i&&R(q);let K=k+n;Le.copyWithin(K+$,K+1,be),Le.set(Ip.slice(0,$),K),be=q}else Le[k+n]=Ip[0]},F=(N,U)=>{let k=bme(N,Le,be,i,R,(z,G,W)=>{if(W)return r=!0;be=G;let B=Le;return w(z),B!==Le?{position:be,targetView:Zn,target:Le}:be},this);if(k===0)return O(N,!0);be=k}}useBuffer(e){Le=e,Zn=new DataView(Le.buffer,Le.byteOffset,Le.byteLength),be=0}clearSharedData(){this.structures&&(this.structures=[]),this.typedStructs&&(this.typedStructs=[])}}aG=[Date,Set,Error,RegExp,ArrayBuffer,Object.getPrototypeOf(Uint8Array.prototype).constructor,J$];iT=[{pack(t,e,n){let r=t.getTime()/1e3;if((this.useTimestamp32||t.getMilliseconds()===0)&&r>=0&&r<4294967296){let{target:i,targetView:o,position:s}=e(6);i[s++]=214,i[s++]=255,o.setUint32(s,r)}else if(r>0&&r<4294967296){let{target:i,targetView:o,position:s}=e(10);i[s++]=215,i[s++]=255,o.setUint32(s,t.getMilliseconds()*4e6+(r/1e3/4294967296>>0)),o.setUint32(s+4,r)}else if(isNaN(r)){if(this.onInvalidDate)return e(0),n(this.onInvalidDate());let{target:i,targetView:o,position:s}=e(3);i[s++]=212,i[s++]=255,i[s++]=255}else{let{target:i,targetView:o,position:s}=e(15);i[s++]=199,i[s++]=12,i[s++]=255,o.setUint32(s,t.getMilliseconds()*1e6),o.setBigInt64(s+4,BigInt(Math.floor(r)))}}},{pack(t,e,n){if(this.setAsEmptyObject)return e(0),n({});let r=Array.from(t),{target:i,position:o}=e(this.moreTypes?3:0);this.moreTypes&&(i[o++]=212,i[o++]=115,i[o++]=0),n(r)}},{pack(t,e,n){let{target:r,position:i}=e(this.moreTypes?3:0);this.moreTypes&&(r[i++]=212,r[i++]=101,r[i++]=0),n([t.name,t.message])}},{pack(t,e,n){let{target:r,position:i}=e(this.moreTypes?3:0);this.moreTypes&&(r[i++]=212,r[i++]=120,r[i++]=0),n([t.source,t.flags])}},{pack(t,e){this.moreTypes?iF(t,16,e):oF(BS?Buffer.from(t):new Uint8Array(t),e)}},{pack(t,e){let n=t.constructor;n!==lG&&this.moreTypes?iF(t,oG.indexOf(n.name),e):oF(t,e)}},{pack(t,e){let{target:n,position:r}=e(1);n[r]=193}}];function iF(t,e,n,r){let i=t.byteLength;if(i+1<256){var{target:o,position:s}=n(4+i);o[s++]=199,o[s++]=i+1}else if(i+1<65536){var{target:o,position:s}=n(5+i);o[s++]=200,o[s++]=i+1>>8,o[s++]=i+1&255}else{var{target:o,position:s,targetView:a}=n(7+i);o[s++]=201,a.setUint32(s,i+1),s+=4}o[s++]=116,o[s++]=e,o.set(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),s)}function oF(t,e){let n=t.byteLength;var r,i;if(n<256){var{target:r,position:i}=e(n+2);r[i++]=196,r[i++]=n}else if(n<65536){var{target:r,position:i}=e(n+3);r[i++]=197,r[i++]=n>>8,r[i++]=n&255}else{var{target:r,position:i,targetView:o}=e(n+5);r[i++]=198,o.setUint32(i,n),i+=4}r.set(t,i)}function Cme(t,e,n,r){let i=t.length;switch(i){case 1:e[n++]=212;break;case 2:e[n++]=213;break;case 4:e[n++]=214;break;case 8:e[n++]=215;break;case 16:e[n++]=216;break;default:i<256?(e[n++]=199,e[n++]=i):i<65536?(e[n++]=200,e[n++]=i>>8,e[n++]=i&255):(e[n++]=201,e[n++]=i>>24,e[n++]=i>>16&255,e[n++]=i>>8&255,e[n++]=i&255)}return e[n++]=r,e.set(t,n),n+=i,n}function Tme(t,e){let n,r=e.length*6,i=t.length-r;for(;n=e.pop();){let o=n.offset,s=n.id;t.copyWithin(o+r,o,i),r-=6;let a=o+r;t[a++]=214,t[a++]=105,t[a++]=s>>24,t[a++]=s>>16&255,t[a++]=s>>8&255,t[a++]=s&255,i=o}return t}function sF(t,e,n){if(mr.length>0){Zn.setUint32(mr.position+t,be+n-mr.position-t),mr.stringsPosition=be-t;let r=mr;mr=null,e(r[0]),e(r[1])}}function Ome(t,e){return t.isCompatible=n=>{let r=!n||(e.lastNamedStructuresLength||0)===n.length;return r||e._mergeStructures(n),r},t}let cG=new Pme({useRecords:!1});const Rme=cG.pack;cG.pack;const Ame=512,Dme=1024;function HS(t,e){let n=!0,r=!1,i=null;function o(s){t.current!==null&&(i=s,n?(t.current.send(Rme(s)),r=!1,n=!1,setTimeout(()=>{n=!0,r&&i&&o(i)},e)):r=!0)}return o}function aF(t){return t!=null&&t.isTexture!==void 0}/*! + * hold-event + * https://github.com/yomotsu/hold-event + * (c) 2020 @yomotsu + * Released under the MIT License. + */var wm;(function(t){t.HOLD_START="holdStart",t.HOLD_END="holdEnd",t.HOLDING="holding"})(wm||(wm={}));class Ime{constructor(){this._listeners={}}addEventListener(e,n){const r=this._listeners;r[e]===void 0&&(r[e]=[]),r[e].indexOf(n)===-1&&r[e].push(n)}removeEventListener(e,n){const i=this._listeners[e];if(i!==void 0){const o=i.indexOf(n);o!==-1&&i.splice(o,1)}}dispatchEvent(e){const r=this._listeners[e.type];if(r!==void 0){e.target=this;const i=r.slice(0);for(let o=0,s=i.length;o{if(!this._enabled||this._holding)return;this._deltaTime=0,this._elapsedTime=0,this._lastTime=performance.now(),this.dispatchEvent({type:wm.HOLD_START,deltaTime:this._deltaTime,elapsedTime:this._elapsedTime,originalEvent:n}),this._holding=!0;const r=()=>{this._intervalId=this.holdIntervalDelay?window.setTimeout(r,this.holdIntervalDelay):window.requestAnimationFrame(r);const i=performance.now();this._deltaTime=i-this._lastTime,this._elapsedTime+=this._deltaTime,this._lastTime=performance.now(),this.dispatchEvent({type:wm.HOLDING,deltaTime:this._deltaTime,elapsedTime:this._elapsedTime,originalEvent:n})};this._intervalId=this.holdIntervalDelay?window.setTimeout(r,this.holdIntervalDelay):window.requestAnimationFrame(r)},this._holdEnd=n=>{if(!this._enabled||!this._holding)return;const r=performance.now();this._deltaTime=r-this._lastTime,this._elapsedTime+=this._deltaTime,this._lastTime=performance.now(),this.dispatchEvent({type:wm.HOLD_END,deltaTime:this._deltaTime,elapsedTime:this._elapsedTime,originalEvent:n}),window.clearTimeout(this._intervalId),window.cancelAnimationFrame(this._intervalId),this._holding=!1},this.holdIntervalDelay=e}get enabled(){return this._enabled}set enabled(e){this._enabled!==e&&(this._enabled=e,this._enabled||this._holdEnd())}}class Hl extends Lme{constructor(e,n){super(n),this._holdStart=this._holdStart.bind(this),this._holdEnd=this._holdEnd.bind(this);const r=o=>{kme(o)||o.keyCode===e&&this._holdStart(o)},i=o=>{o.keyCode===e&&this._holdEnd(o)};document.addEventListener("keydown",r),document.addEventListener("keyup",i),window.addEventListener("blur",this._holdEnd)}}function kme(t){const e=t.target;return e.tagName==="INPUT"||e.tagName==="SELECT"||e.tagName==="TEXTAREA"||e.isContentEditable}function Nme(){const t=M.useContext(Ui),e=dn(o=>o.camera),n=HS(t.websocketRef,20),r=H.useCallback(()=>{const o=e,s=t.cameraControlRef.current;if(s===null){setTimeout(r,10);return}const a=new Hn,l=new Hn;a.setFromEuler(new ki(Math.PI,0,0)),l.setFromEuler(new ki(Math.PI/2,0,0));const c=l.clone().multiply(o.quaternion).multiply(a),u=s.getTarget(new Z).applyQuaternion(l),d=o.up.clone().applyQuaternion(l);n({type:"ViewerCameraMessage",wxyz:[c.w,c.x,c.y,c.z],position:o.position.clone().applyQuaternion(l).toArray(),aspect:o.aspect,fov:o.fov*Math.PI/180,look_at:[u.x,u.y,u.z],up_direction:[d.x,d.y,d.z]})},[e,n]),i=t.useGui(o=>o.websocketConnected);return H.useEffect(()=>{i&&setTimeout(()=>r(),50)},[i,r]),H.useEffect(()=>(window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r)}),[e]),H.useEffect(()=>{const o={W:87,A:65,S:83,D:68,ARROW_LEFT:37,ARROW_UP:38,ARROW_RIGHT:39,ARROW_DOWN:40},s=t.cameraControlRef.current,a=new Hl(o.W,20),l=new Hl(o.A,20),c=new Hl(o.S,20),u=new Hl(o.D,20);l.addEventListener("holding",y=>{s.truck(-.002*y?.deltaTime,0,!1)}),u.addEventListener("holding",y=>{s.truck(.002*y?.deltaTime,0,!1)}),a.addEventListener("holding",y=>{s.forward(.002*y?.deltaTime,!1)}),c.addEventListener("holding",y=>{s.forward(-.002*y?.deltaTime,!1)});const d=new Hl(o.ARROW_LEFT,20),f=new Hl(o.ARROW_RIGHT,20),h=new Hl(o.ARROW_UP,20),g=new Hl(o.ARROW_DOWN,20);d.addEventListener("holding",y=>{s.rotate(-.1*Pu.DEG2RAD*y?.deltaTime,0,!0)}),f.addEventListener("holding",y=>{s.rotate(.1*Pu.DEG2RAD*y?.deltaTime,0,!0)}),h.addEventListener("holding",y=>{s.rotate(0,-.05*Pu.DEG2RAD*y?.deltaTime,!0)}),g.addEventListener("holding",y=>{s.rotate(0,.05*Pu.DEG2RAD*y?.deltaTime,!0)})}),I.jsx(Zue,{ref:t.cameraControlRef,minDistance:.1,maxDistance:200,dollySpeed:.3,smoothTime:0,draggingSmoothTime:0,onChange:r,makeDefault:!0})}var xa=function(){return xa=Object.assign||function(e){for(var n,r=1,i=arguments.length;r"u")return Jme;var e=ege(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},nge=hG(),rge=function(t,e,n,r){var i=t.left,o=t.top,s=t.right,a=t.gap;return n===void 0&&(n="margin"),` + .`.concat(zme,` { overflow: hidden `).concat(r,`; padding-right: `).concat(a,"px ").concat(r,`; } @@ -5629,61 +5618,53 @@ void main() { margin-right: `).concat(a,"px ").concat(r,`; `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),` } - + .`).concat(L_,` { right: `).concat(a,"px ").concat(r,`; } - + .`).concat(k_,` { margin-right: `).concat(a,"px ").concat(r,`; } - + .`).concat(L_," .").concat(L_,` { right: 0 `).concat(r,`; } - + .`).concat(k_," .").concat(k_,` { margin-right: 0 `).concat(r,`; } - + body { - `).concat(Oge,": ").concat(a,`px; + `).concat(Ume,": ").concat(a,`px; } -`)},Xge=function(t){var e=t.noRelative,n=t.noImportant,r=t.gapMode,i=r===void 0?"margin":r,o=M.useMemo(function(){return Gge(i)},[i]);return M.createElement(Wge,{styles:Yge(o,!e,i,n?"":"!important")})},dT=!1;if(typeof window<"u")try{var Ey=Object.defineProperty({},"passive",{get:function(){return dT=!0,!0}});window.addEventListener("test",Ey,Ey),window.removeEventListener("test",Ey,Ey)}catch{dT=!1}var of=dT?{passive:!1}:!1,Zge=function(t){return t.tagName==="TEXTAREA"},SG=function(t,e){var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!Zge(t)&&n[e]==="visible")},qge=function(t){return SG(t,"overflowY")},Kge=function(t){return SG(t,"overflowX")},vF=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=bG(t,r);if(i){var o=MG(t,r),s=o[1],a=o[2];if(s>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Qge=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},Jge=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},bG=function(t,e){return t==="v"?qge(e):Kge(e)},MG=function(t,e){return t==="v"?Qge(e):Jge(e)},eve=function(t,e){return t==="h"&&e==="rtl"?-1:1},tve=function(t,e,n,r,i){var o=eve(t,window.getComputedStyle(e).direction),s=o*r,a=n.target,l=e.contains(a),c=!1,u=s>0,d=0,f=0;do{var h=MG(t,a),g=h[0],y=h[1],_=h[2],v=y-_-o*g;(g||v)&&bG(t,a)&&(d+=v,f+=g),a=a.parentNode}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(u&&(i&&d===0||!i&&s>d)||!u&&(i&&f===0||!i&&-s>f))&&(c=!0),c},Py=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},yF=function(t){return[t.deltaX,t.deltaY]},_F=function(t){return t&&"current"in t?t.current:t},nve=function(t,e){return t[0]===e[0]&&t[1]===e[1]},rve=function(t){return` +`)},ige=function(t){var e=t.noRelative,n=t.noImportant,r=t.gapMode,i=r===void 0?"margin":r,o=M.useMemo(function(){return tge(i)},[i]);return M.createElement(nge,{styles:rge(o,!e,i,n?"":"!important")})},oT=!1;if(typeof window<"u")try{var Ey=Object.defineProperty({},"passive",{get:function(){return oT=!0,!0}});window.addEventListener("test",Ey,Ey),window.removeEventListener("test",Ey,Ey)}catch{oT=!1}var of=oT?{passive:!1}:!1,oge=function(t){return t.tagName==="TEXTAREA"},pG=function(t,e){var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!oge(t)&&n[e]==="visible")},sge=function(t){return pG(t,"overflowY")},age=function(t){return pG(t,"overflowX")},cF=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=mG(t,r);if(i){var o=gG(t,r),s=o[1],a=o[2];if(s>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},lge=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},cge=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},mG=function(t,e){return t==="v"?sge(e):age(e)},gG=function(t,e){return t==="v"?lge(e):cge(e)},uge=function(t,e){return t==="h"&&e==="rtl"?-1:1},dge=function(t,e,n,r,i){var o=uge(t,window.getComputedStyle(e).direction),s=o*r,a=n.target,l=e.contains(a),c=!1,u=s>0,d=0,f=0;do{var h=gG(t,a),g=h[0],y=h[1],_=h[2],v=y-_-o*g;(g||v)&&mG(t,a)&&(d+=v,f+=g),a=a.parentNode}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(u&&(i&&d===0||!i&&s>d)||!u&&(i&&f===0||!i&&-s>f))&&(c=!0),c},Py=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},uF=function(t){return[t.deltaX,t.deltaY]},dF=function(t){return t&&"current"in t?t.current:t},fge=function(t,e){return t[0]===e[0]&&t[1]===e[1]},hge=function(t){return` .block-interactivity-`.concat(t,` {pointer-events: none;} .allow-interactivity-`).concat(t,` {pointer-events: all;} -`)},ive=0,sf=[];function ove(t){var e=M.useRef([]),n=M.useRef([0,0]),r=M.useRef(),i=M.useState(ive++)[0],o=M.useState(wG)[0],s=M.useRef(t);M.useEffect(function(){s.current=t},[t]),M.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var y=Cge([t.lockRef.current],(t.shards||[]).map(_F),!0).filter(Boolean);return y.forEach(function(_){return _.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),y.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var a=M.useCallback(function(y,_){if("touches"in y&&y.touches.length===2)return!s.current.allowPinchZoom;var v=Py(y),x=n.current,w="deltaX"in y?y.deltaX:x[0]-v[0],S="deltaY"in y?y.deltaY:x[1]-v[1],E,C=y.target,O=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in y&&O==="h"&&C.type==="range")return!1;var R=vF(O,C);if(!R)return!0;if(R?E=O:(E=O==="v"?"h":"v",R=vF(O,C)),!R)return!1;if(!r.current&&"changedTouches"in y&&(w||S)&&(r.current=E),!E)return!0;var T=r.current||E;return tve(T,_,y,T==="h"?w:S,!0)},[]),l=M.useCallback(function(y){var _=y;if(!(!sf.length||sf[sf.length-1]!==o)){var v="deltaY"in _?yF(_):Py(_),x=e.current.filter(function(E){return E.name===_.type&&E.target===_.target&&nve(E.delta,v)})[0];if(x&&x.should){_.cancelable&&_.preventDefault();return}if(!x){var w=(s.current.shards||[]).map(_F).filter(Boolean).filter(function(E){return E.contains(_.target)}),S=w.length>0?a(_,w[0]):!s.current.noIsolation;S&&_.cancelable&&_.preventDefault()}}},[]),c=M.useCallback(function(y,_,v,x){var w={name:y,delta:_,target:v,should:x};e.current.push(w),setTimeout(function(){e.current=e.current.filter(function(S){return S!==w})},1)},[]),u=M.useCallback(function(y){n.current=Py(y),r.current=void 0},[]),d=M.useCallback(function(y){c(y.type,yF(y),y.target,a(y,t.lockRef.current))},[]),f=M.useCallback(function(y){c(y.type,Py(y),y.target,a(y,t.lockRef.current))},[]);M.useEffect(function(){return sf.push(o),t.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,of),document.addEventListener("touchmove",l,of),document.addEventListener("touchstart",u,of),function(){sf=sf.filter(function(y){return y!==o}),document.removeEventListener("wheel",l,of),document.removeEventListener("touchmove",l,of),document.removeEventListener("touchstart",u,of)}},[]);var h=t.removeScrollBar,g=t.inert;return M.createElement(M.Fragment,null,g?M.createElement(o,{styles:rve(i)}):null,h?M.createElement(Xge,{gapMode:t.gapMode}):null)}const sve=Nge(xG,ove);var EG=M.forwardRef(function(t,e){return M.createElement(VS,xa({},t,{ref:e,sideCar:sve}))});EG.classNames=VS.classNames;const ave=EG;function Tx(t,e){let n=t;for(;(n=n.parentElement)&&!n.matches(e););return n}function lve(t,e,n){for(let r=t-1;r>=0;r-=1)if(!e[r].disabled)return r;if(n){for(let r=e.length-1;r>-1;r-=1)if(!e[r].disabled)return r}return t}function cve(t,e,n){for(let r=t+1;r{var l;n?.(a);const c=Array.from(((l=Tx(a.currentTarget,t))==null?void 0:l.querySelectorAll(e))||[]).filter(y=>uve(a.currentTarget,y,t)),u=c.findIndex(y=>a.currentTarget===y),d=cve(u,c,r),f=lve(u,c,r),h=o==="rtl"?f:d,g=o==="rtl"?d:f;switch(a.key){case"ArrowRight":{s==="horizontal"&&(a.stopPropagation(),a.preventDefault(),c[h].focus(),i&&c[h].click());break}case"ArrowLeft":{s==="horizontal"&&(a.stopPropagation(),a.preventDefault(),c[g].focus(),i&&c[g].click());break}case"ArrowUp":{s==="vertical"&&(a.stopPropagation(),a.preventDefault(),c[f].focus(),i&&c[f].click());break}case"ArrowDown":{s==="vertical"&&(a.stopPropagation(),a.preventDefault(),c[d].focus(),i&&c[d].click());break}case"Home":{a.stopPropagation(),a.preventDefault(),!c[0].disabled&&c[0].focus();break}case"End":{a.stopPropagation(),a.preventDefault();const y=c.length-1;!c[y].disabled&&c[y].focus();break}}}}function dve(t,e,n){var r;return n?Array.from(((r=Tx(n,e))==null?void 0:r.querySelectorAll(t))||[]).findIndex(i=>i===n):null}function cd(t){const e=M.createContext(null);return[({children:i,value:o})=>H.createElement(e.Provider,{value:o},i),()=>{const i=M.useContext(e);if(i===null)throw new Error(t);return i}]}function Ch(t){return Array.isArray(t)?t:[t]}function Ox(t,e){return n=>{if(typeof n!="string"||n.trim().length===0)throw new Error(e);return`${t}-${n}`}}const PG=()=>{};function fve(t,e={active:!0}){return typeof t!="function"||!e.active?e.onKeyDown||PG:n=>{var r;n.key==="Escape"&&(t(n),(r=e.onTrigger)==null||r.call(e))}}function rl(t,e){return n=>{t?.(n),e?.(n)}}function hve(){const[t,e]=M.useState(-1);return[t,{setHovered:e,resetHovered:()=>e(-1)}]}function CG({data:t}){const e=[],n=[],r=t.reduce((i,o,s)=>(o.group?i[o.group]?i[o.group].push(s):i[o.group]=[s]:n.push(s),i),{});return Object.keys(r).forEach(i=>{e.push(...r[i].map(o=>t[o]))}),e.push(...n.map(i=>t[i])),e}function Yg(t){return Array.isArray(t)||t===null?!1:typeof t=="object"?t.type!==H.Fragment:!1}function TG(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e({fontFamily:t.fontFamily||"sans-serif"})}var gve=Object.defineProperty,xF=Object.getOwnPropertySymbols,vve=Object.prototype.hasOwnProperty,yve=Object.prototype.propertyIsEnumerable,wF=(t,e,n)=>e in t?gve(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,SF=(t,e)=>{for(var n in e||(e={}))vve.call(e,n)&&wF(t,n,e[n]);if(xF)for(var n of xF(e))yve.call(e,n)&&wF(t,n,e[n]);return t};function _ve(t){return e=>({WebkitTapHighlightColor:"transparent",[e||"&:focus"]:SF({},t.focusRing==="always"||t.focusRing==="auto"?t.focusRingStyles.styles(t):t.focusRingStyles.resetStyles(t)),[e?e.replace(":focus",":focus:not(:focus-visible)"):"&:focus:not(:focus-visible)"]:SF({},t.focusRing==="auto"||t.focusRing==="never"?t.focusRingStyles.resetStyles(t):null)})}function Xg(t){return e=>typeof t.primaryShade=="number"?t.primaryShade:t.primaryShade[e||t.colorScheme]}function JR(t){const e=Xg(t);return(n,r,i=!0,o=!0)=>{if(typeof n=="string"&&n.includes(".")){const[a,l]=n.split("."),c=parseInt(l,10);if(a in t.colors&&c>=0&&c<10)return t.colors[a][typeof r=="number"&&!o?r:c]}const s=typeof r=="number"?r:e();return n in t.colors?t.colors[n][s]:i?t.colors[t.primaryColor][s]:n}}function RG(t){let e="";for(let n=1;n{const i={from:r?.from||t.defaultGradient.from,to:r?.to||t.defaultGradient.to,deg:r?.deg||t.defaultGradient.deg};return`linear-gradient(${i.deg}deg, ${e(i.from,n(),!1)} 0%, ${e(i.to,n(),!1)} 100%)`}}function DG(t){return e=>{if(typeof e=="number")return`${e/16}${t}`;if(typeof e=="string"){const n=e.replace("px","");if(!Number.isNaN(Number(n)))return`${Number(n)/16}${t}`}return e}}const X=DG("rem"),ls=DG("em");function Oe({size:t,sizes:e,units:n}){return t in e?e[t]:typeof t=="number"?n==="em"?ls(t):X(t):t||e.md}function js(t){return typeof t=="number"?t:typeof t=="string"&&t.includes("rem")?Number(t.replace("rem",""))*16:typeof t=="string"&&t.includes("em")?Number(t.replace("em",""))*16:Number(t)}function Sve(t){return e=>`@media (min-width: ${ls(js(Oe({size:e,sizes:t.breakpoints})))})`}function bve(t){return e=>`@media (max-width: ${ls(js(Oe({size:e,sizes:t.breakpoints}))-1)})`}function Mve(t){return/^#?([0-9A-F]{3}){1,2}$/i.test(t)}function Eve(t){let e=t.replace("#","");if(e.length===3){const s=e.split("");e=[s[0],s[0],s[1],s[1],s[2],s[2]].join("")}const n=parseInt(e,16),r=n>>16&255,i=n>>8&255,o=n&255;return{r,g:i,b:o,a:1}}function Pve(t){const[e,n,r,i]=t.replace(/[^0-9,.]/g,"").split(",").map(Number);return{r:e,g:n,b:r,a:i||1}}function eA(t){return Mve(t)?Eve(t):t.startsWith("rgb")?Pve(t):{r:0,g:0,b:0,a:1}}function mf(t,e){if(typeof t!="string"||e>1||e<0)return"rgba(0, 0, 0, 1)";if(t.startsWith("var(--"))return t;const{r:n,g:r,b:i}=eA(t);return`rgba(${n}, ${r}, ${i}, ${e})`}function Cve(t=0){return{position:"absolute",top:X(t),right:X(t),left:X(t),bottom:X(t)}}function Tve(t,e){if(typeof t=="string"&&t.startsWith("var(--"))return t;const{r:n,g:r,b:i,a:o}=eA(t),s=1-e,a=l=>Math.round(l*s);return`rgba(${a(n)}, ${a(r)}, ${a(i)}, ${o})`}function Ove(t,e){if(typeof t=="string"&&t.startsWith("var(--"))return t;const{r:n,g:r,b:i,a:o}=eA(t),s=a=>Math.round(a+(255-a)*e);return`rgba(${s(n)}, ${s(r)}, ${s(i)}, ${o})`}function Rve(t){return e=>{if(typeof e=="number")return X(e);const n=typeof t.defaultRadius=="number"?t.defaultRadius:t.radius[t.defaultRadius]||t.defaultRadius;return t.radius[e]||e||n}}function Ave(t,e){if(typeof t=="string"&&t.includes(".")){const[n,r]=t.split("."),i=parseInt(r,10);if(n in e.colors&&i>=0&&i<10)return{isSplittedColor:!0,key:n,shade:i}}return{isSplittedColor:!1}}function Dve(t){const e=JR(t),n=Xg(t),r=AG(t);return({variant:i,color:o,gradient:s,primaryFallback:a})=>{const l=Ave(o,t);switch(i){case"light":return{border:"transparent",background:mf(e(o,t.colorScheme==="dark"?8:0,a,!1),t.colorScheme==="dark"?.2:1),color:o==="dark"?t.colorScheme==="dark"?t.colors.dark[0]:t.colors.dark[9]:e(o,t.colorScheme==="dark"?2:n("light")),hover:mf(e(o,t.colorScheme==="dark"?7:1,a,!1),t.colorScheme==="dark"?.25:.65)};case"subtle":return{border:"transparent",background:"transparent",color:o==="dark"?t.colorScheme==="dark"?t.colors.dark[0]:t.colors.dark[9]:e(o,t.colorScheme==="dark"?2:n("light")),hover:mf(e(o,t.colorScheme==="dark"?8:0,a,!1),t.colorScheme==="dark"?.2:1)};case"outline":return{border:e(o,t.colorScheme==="dark"?5:n("light")),background:"transparent",color:e(o,t.colorScheme==="dark"?5:n("light")),hover:t.colorScheme==="dark"?mf(e(o,5,a,!1),.05):mf(e(o,0,a,!1),.35)};case"default":return{border:t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[4],background:t.colorScheme==="dark"?t.colors.dark[6]:t.white,color:t.colorScheme==="dark"?t.white:t.black,hover:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[0]};case"white":return{border:"transparent",background:t.white,color:e(o,n()),hover:null};case"transparent":return{border:"transparent",color:o==="dark"?t.colorScheme==="dark"?t.colors.dark[0]:t.colors.dark[9]:e(o,t.colorScheme==="dark"?2:n("light")),background:"transparent",hover:null};case"gradient":return{background:r(s),color:t.white,border:"transparent",hover:null};default:{const c=n(),u=l.isSplittedColor?l.shade:c,d=l.isSplittedColor?l.key:o;return{border:"transparent",background:e(d,u,a),color:t.white,hover:e(d,u===9?8:u+1)}}}}}function Ive(t){return e=>{const n=Xg(t)(e);return t.colors[t.primaryColor][n]}}function Lve(t){return{"@media (hover: hover)":{"&:hover":t},"@media (hover: none)":{"&:active":t}}}function kve(t){return()=>({userSelect:"none",color:t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[5]})}function Nve(t){return()=>t.colorScheme==="dark"?t.colors.dark[2]:t.colors.gray[6]}const Wr={fontStyles:mve,themeColor:JR,focusStyles:_ve,linearGradient:xve,radialGradient:wve,smallerThan:bve,largerThan:Sve,rgba:mf,cover:Cve,darken:Tve,lighten:Ove,radius:Rve,variant:Dve,primaryShade:Xg,hover:Lve,gradient:AG,primaryColor:Ive,placeholderStyles:kve,dimmed:Nve};var Fve=Object.defineProperty,zve=Object.defineProperties,Uve=Object.getOwnPropertyDescriptors,bF=Object.getOwnPropertySymbols,Bve=Object.prototype.hasOwnProperty,Hve=Object.prototype.propertyIsEnumerable,MF=(t,e,n)=>e in t?Fve(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Vve=(t,e)=>{for(var n in e||(e={}))Bve.call(e,n)&&MF(t,n,e[n]);if(bF)for(var n of bF(e))Hve.call(e,n)&&MF(t,n,e[n]);return t},jve=(t,e)=>zve(t,Uve(e));function IG(t){return jve(Vve({},t),{fn:{fontStyles:Wr.fontStyles(t),themeColor:Wr.themeColor(t),focusStyles:Wr.focusStyles(t),largerThan:Wr.largerThan(t),smallerThan:Wr.smallerThan(t),radialGradient:Wr.radialGradient,linearGradient:Wr.linearGradient,gradient:Wr.gradient(t),rgba:Wr.rgba,cover:Wr.cover,lighten:Wr.lighten,darken:Wr.darken,primaryShade:Wr.primaryShade(t),radius:Wr.radius(t),variant:Wr.variant(t),hover:Wr.hover,primaryColor:Wr.primaryColor(t),placeholderStyles:Wr.placeholderStyles(t),dimmed:Wr.dimmed(t)}})}const $ve={dir:"ltr",primaryShade:{light:6,dark:8},focusRing:"auto",loader:"oval",colorScheme:"light",white:"#fff",black:"#000",defaultRadius:"sm",transitionTimingFunction:"ease",colors:pve,lineHeight:1.55,fontFamily:"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",primaryColor:"blue",respectReducedMotion:!0,cursorType:"default",defaultGradient:{from:"indigo",to:"cyan",deg:45},shadows:{xs:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.1)",sm:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 0.625rem 0.9375rem -0.3125rem, rgba(0, 0, 0, 0.04) 0 0.4375rem 0.4375rem -0.3125rem",md:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 1.25rem 1.5625rem -0.3125rem, rgba(0, 0, 0, 0.04) 0 0.625rem 0.625rem -0.3125rem",lg:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 1.75rem 1.4375rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 0.75rem 0.75rem -0.4375rem",xl:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 2.25rem 1.75rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 1.0625rem 1.0625rem -0.4375rem"},fontSizes:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem"},radius:{xs:"0.125rem",sm:"0.25rem",md:"0.5rem",lg:"1rem",xl:"2rem"},spacing:{xs:"0.625rem",sm:"0.75rem",md:"1rem",lg:"1.25rem",xl:"1.5rem"},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},headings:{fontFamily:"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",fontWeight:700,sizes:{h1:{fontSize:"2.125rem",lineHeight:1.3,fontWeight:void 0},h2:{fontSize:"1.625rem",lineHeight:1.35,fontWeight:void 0},h3:{fontSize:"1.375rem",lineHeight:1.4,fontWeight:void 0},h4:{fontSize:"1.125rem",lineHeight:1.45,fontWeight:void 0},h5:{fontSize:"1rem",lineHeight:1.5,fontWeight:void 0},h6:{fontSize:"0.875rem",lineHeight:1.5,fontWeight:void 0}}},other:{},components:{},activeStyles:{transform:"translateY(0.0625rem)"},datesLocale:"en",globalStyles:void 0,focusRingStyles:{styles:t=>({outlineOffset:"0.125rem",outline:`0.125rem solid ${t.colors[t.primaryColor][t.colorScheme==="dark"?7:5]}`}),resetStyles:()=>({outline:"none"}),inputStyles:t=>({outline:"none",borderColor:t.colors[t.primaryColor][typeof t.primaryShade=="object"?t.primaryShade[t.colorScheme]:t.primaryShade]})}},tA=IG($ve);function Gve(t){if(t.sheet)return t.sheet;for(var e=0;e0?_i(Th,--po):0,lh--,zr===10&&(lh=1,$S--),zr}function To(){return zr=po2||hg(zr)>3?"":" "}function i0e(t,e){for(;--e&&To()&&!(zr<48||zr>102||zr>57&&zr<65||zr>70&&zr<97););return Zg(t,N_()+(e<6&&Ta()==32&&To()==32))}function hT(t){for(;To();)switch(zr){case t:return po;case 34:case 39:t!==34&&t!==39&&hT(zr);break;case 40:t===41&&hT(t);break;case 92:To();break}return po}function o0e(t,e){for(;To()&&t+zr!==47+10;)if(t+zr===42+42&&Ta()===47)break;return"/*"+Zg(e,po-1)+"*"+jS(t===47?t:To())}function s0e(t){for(;!hg(Ta());)To();return Zg(t,po)}function a0e(t){return UG(z_("",null,null,null,[""],t=zG(t),0,[0],t))}function z_(t,e,n,r,i,o,s,a,l){for(var c=0,u=0,d=s,f=0,h=0,g=0,y=1,_=1,v=1,x=0,w="",S=i,E=o,C=r,O=w;_;)switch(g=x,x=To()){case 40:if(g!=108&&_i(O,d-1)==58){fT(O+=kn(F_(x),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:O+=F_(x);break;case 9:case 10:case 13:case 32:O+=r0e(g);break;case 92:O+=i0e(N_()-1,7);continue;case 47:switch(Ta()){case 42:case 47:Cy(l0e(o0e(To(),N_()),e,n),l);break;default:O+="/"}break;case 123*y:a[c++]=pa(O)*v;case 125*y:case 59:case 0:switch(x){case 0:case 125:_=0;case 59+u:v==-1&&(O=kn(O,/\f/g,"")),h>0&&pa(O)-d&&Cy(h>32?PF(O+";",r,n,d-1):PF(kn(O," ","")+";",r,n,d-2),l);break;case 59:O+=";";default:if(Cy(C=EF(O,e,n,c,u,i,a,w,S=[],E=[],d),o),x===123)if(u===0)z_(O,e,C,C,S,o,d,a,E);else switch(f===99&&_i(O,3)===110?100:f){case 100:case 108:case 109:case 115:z_(t,C,C,r&&Cy(EF(t,C,C,0,0,i,a,w,i,S=[],d),E),i,E,d,a,r?S:E);break;default:z_(O,C,C,C,[""],E,0,a,E)}}c=u=h=0,y=v=1,w=O="",d=s;break;case 58:d=1+pa(O),h=g;default:if(y<1){if(x==123)--y;else if(x==125&&y++==0&&n0e()==125)continue}switch(O+=jS(x),x*y){case 38:v=u>0?1:(O+="\f",-1);break;case 44:a[c++]=(pa(O)-1)*v,v=1;break;case 64:Ta()===45&&(O+=F_(To())),f=Ta(),u=d=pa(w=O+=s0e(N_())),x++;break;case 45:g===45&&pa(O)==2&&(y=0)}}return o}function EF(t,e,n,r,i,o,s,a,l,c,u){for(var d=i-1,f=i===0?o:[""],h=iA(f),g=0,y=0,_=0;g0?f[v]+" "+x:kn(x,/&\f/g,f[v])))&&(l[_++]=w);return GS(t,e,n,i===0?nA:a,l,c,u)}function l0e(t,e,n){return GS(t,e,n,LG,jS(t0e()),fg(t,2,-2),0)}function PF(t,e,n,r){return GS(t,e,n,rA,fg(t,0,r),fg(t,r+1,-1),r)}function jf(t,e){for(var n="",r=iA(t),i=0;i6)switch(_i(t,e+1)){case 109:if(_i(t,e+4)!==45)break;case 102:return kn(t,/(.+:)(.+)-([^]+)/,"$1"+Ln+"$2-$3$1"+Rx+(_i(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~fT(t,"stretch")?HG(kn(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(_i(t,e+1)!==115)break;case 6444:switch(_i(t,pa(t)-3-(~fT(t,"!important")&&10))){case 107:return kn(t,":",":"+Ln)+t;case 101:return kn(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ln+(_i(t,14)===45?"inline-":"")+"box$3$1"+Ln+"$2$3$1"+Ai+"$2box$3")+t}break;case 5936:switch(_i(t,e+11)){case 114:return Ln+t+Ai+kn(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return Ln+t+Ai+kn(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return Ln+t+Ai+kn(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return Ln+t+Ai+t+t}return t}var v0e=function(e,n,r,i){if(e.length>-1&&!e.return)switch(e.type){case rA:e.return=HG(e.value,e.length);break;case kG:return jf([Lp(e,{value:kn(e.value,"@","@"+Ln)})],i);case nA:if(e.length)return e0e(e.props,function(o){switch(Jve(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return jf([Lp(e,{props:[kn(o,/:(read-\w+)/,":"+Rx+"$1")]})],i);case"::placeholder":return jf([Lp(e,{props:[kn(o,/:(plac\w+)/,":"+Ln+"input-$1")]}),Lp(e,{props:[kn(o,/:(plac\w+)/,":"+Rx+"$1")]}),Lp(e,{props:[kn(o,/:(plac\w+)/,Ai+"input-$1")]})],i)}return""})}},y0e=[v0e],VG=function(e){var n=e.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(y){var _=y.getAttribute("data-emotion");_.indexOf(" ")!==-1&&(document.head.appendChild(y),y.setAttribute("data-s",""))})}var i=e.stylisPlugins||y0e,o={},s,a=[];s=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(y){for(var _=y.getAttribute("data-emotion").split(" "),v=1;v<_.length;v++)o[_[v]]=!0;a.push(y)});var l,c=[m0e,g0e];{var u,d=[c0e,d0e(function(y){u.insert(y)})],f=u0e(c.concat(i,d)),h=function(_){return jf(a0e(_),f)};l=function(_,v,x,w){u=x,h(_?_+"{"+v.styles+"}":v.styles),w&&(g.inserted[v.name]=!0)}}var g={key:n,sheet:new Yve({key:n,container:s,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:l};return g.sheet.hydrate(a),g},jG={exports:{}},Wn={};/** @license React v16.13.1 +`)},pge=0,sf=[];function mge(t){var e=M.useRef([]),n=M.useRef([0,0]),r=M.useRef(),i=M.useState(pge++)[0],o=M.useState(hG)[0],s=M.useRef(t);M.useEffect(function(){s.current=t},[t]),M.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var y=Fme([t.lockRef.current],(t.shards||[]).map(dF),!0).filter(Boolean);return y.forEach(function(_){return _.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),y.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var a=M.useCallback(function(y,_){if("touches"in y&&y.touches.length===2)return!s.current.allowPinchZoom;var v=Py(y),x=n.current,w="deltaX"in y?y.deltaX:x[0]-v[0],S="deltaY"in y?y.deltaY:x[1]-v[1],E,C=y.target,O=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in y&&O==="h"&&C.type==="range")return!1;var R=cF(O,C);if(!R)return!0;if(R?E=O:(E=O==="v"?"h":"v",R=cF(O,C)),!R)return!1;if(!r.current&&"changedTouches"in y&&(w||S)&&(r.current=E),!E)return!0;var T=r.current||E;return dge(T,_,y,T==="h"?w:S,!0)},[]),l=M.useCallback(function(y){var _=y;if(!(!sf.length||sf[sf.length-1]!==o)){var v="deltaY"in _?uF(_):Py(_),x=e.current.filter(function(E){return E.name===_.type&&E.target===_.target&&fge(E.delta,v)})[0];if(x&&x.should){_.cancelable&&_.preventDefault();return}if(!x){var w=(s.current.shards||[]).map(dF).filter(Boolean).filter(function(E){return E.contains(_.target)}),S=w.length>0?a(_,w[0]):!s.current.noIsolation;S&&_.cancelable&&_.preventDefault()}}},[]),c=M.useCallback(function(y,_,v,x){var w={name:y,delta:_,target:v,should:x};e.current.push(w),setTimeout(function(){e.current=e.current.filter(function(S){return S!==w})},1)},[]),u=M.useCallback(function(y){n.current=Py(y),r.current=void 0},[]),d=M.useCallback(function(y){c(y.type,uF(y),y.target,a(y,t.lockRef.current))},[]),f=M.useCallback(function(y){c(y.type,Py(y),y.target,a(y,t.lockRef.current))},[]);M.useEffect(function(){return sf.push(o),t.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,of),document.addEventListener("touchmove",l,of),document.addEventListener("touchstart",u,of),function(){sf=sf.filter(function(y){return y!==o}),document.removeEventListener("wheel",l,of),document.removeEventListener("touchmove",l,of),document.removeEventListener("touchstart",u,of)}},[]);var h=t.removeScrollBar,g=t.inert;return M.createElement(M.Fragment,null,g?M.createElement(o,{styles:hge(i)}):null,h?M.createElement(ige,{gapMode:t.gapMode}):null)}const gge=Wme(fG,mge);var vG=M.forwardRef(function(t,e){return M.createElement(VS,xa({},t,{ref:e,sideCar:gge}))});vG.classNames=VS.classNames;const vge=vG;function Ex(t,e){let n=t;for(;(n=n.parentElement)&&!n.matches(e););return n}function yge(t,e,n){for(let r=t-1;r>=0;r-=1)if(!e[r].disabled)return r;if(n){for(let r=e.length-1;r>-1;r-=1)if(!e[r].disabled)return r}return t}function _ge(t,e,n){for(let r=t+1;r{var l;n?.(a);const c=Array.from(((l=Ex(a.currentTarget,t))==null?void 0:l.querySelectorAll(e))||[]).filter(y=>xge(a.currentTarget,y,t)),u=c.findIndex(y=>a.currentTarget===y),d=_ge(u,c,r),f=yge(u,c,r),h=o==="rtl"?f:d,g=o==="rtl"?d:f;switch(a.key){case"ArrowRight":{s==="horizontal"&&(a.stopPropagation(),a.preventDefault(),c[h].focus(),i&&c[h].click());break}case"ArrowLeft":{s==="horizontal"&&(a.stopPropagation(),a.preventDefault(),c[g].focus(),i&&c[g].click());break}case"ArrowUp":{s==="vertical"&&(a.stopPropagation(),a.preventDefault(),c[f].focus(),i&&c[f].click());break}case"ArrowDown":{s==="vertical"&&(a.stopPropagation(),a.preventDefault(),c[d].focus(),i&&c[d].click());break}case"Home":{a.stopPropagation(),a.preventDefault(),!c[0].disabled&&c[0].focus();break}case"End":{a.stopPropagation(),a.preventDefault();const y=c.length-1;!c[y].disabled&&c[y].focus();break}}}}function wge(t,e,n){var r;return n?Array.from(((r=Ex(n,e))==null?void 0:r.querySelectorAll(t))||[]).findIndex(i=>i===n):null}function cd(t){const e=M.createContext(null);return[({children:i,value:o})=>H.createElement(e.Provider,{value:o},i),()=>{const i=M.useContext(e);if(i===null)throw new Error(t);return i}]}function Ph(t){return Array.isArray(t)?t:[t]}function Px(t,e){return n=>{if(typeof n!="string"||n.trim().length===0)throw new Error(e);return`${t}-${n}`}}const yG=()=>{};function Sge(t,e={active:!0}){return typeof t!="function"||!e.active?e.onKeyDown||yG:n=>{var r;n.key==="Escape"&&(t(n),(r=e.onTrigger)==null||r.call(e))}}function rl(t,e){return n=>{t?.(n),e?.(n)}}function bge(){const[t,e]=M.useState(-1);return[t,{setHovered:e,resetHovered:()=>e(-1)}]}function _G({data:t}){const e=[],n=[],r=t.reduce((i,o,s)=>(o.group?i[o.group]?i[o.group].push(s):i[o.group]=[s]:n.push(s),i),{});return Object.keys(r).forEach(i=>{e.push(...r[i].map(o=>t[o]))}),e.push(...n.map(i=>t[i])),e}function Yg(t){return Array.isArray(t)||t===null?!1:typeof t=="object"?t.type!==H.Fragment:!1}function xG(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e({fontFamily:t.fontFamily||"sans-serif"})}var Pge=Object.defineProperty,fF=Object.getOwnPropertySymbols,Cge=Object.prototype.hasOwnProperty,Tge=Object.prototype.propertyIsEnumerable,hF=(t,e,n)=>e in t?Pge(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,pF=(t,e)=>{for(var n in e||(e={}))Cge.call(e,n)&&hF(t,n,e[n]);if(fF)for(var n of fF(e))Tge.call(e,n)&&hF(t,n,e[n]);return t};function Oge(t){return e=>({WebkitTapHighlightColor:"transparent",[e||"&:focus"]:pF({},t.focusRing==="always"||t.focusRing==="auto"?t.focusRingStyles.styles(t):t.focusRingStyles.resetStyles(t)),[e?e.replace(":focus",":focus:not(:focus-visible)"):"&:focus:not(:focus-visible)"]:pF({},t.focusRing==="auto"||t.focusRing==="never"?t.focusRingStyles.resetStyles(t):null)})}function Xg(t){return e=>typeof t.primaryShade=="number"?t.primaryShade:t.primaryShade[e||t.colorScheme]}function WR(t){const e=Xg(t);return(n,r,i=!0,o=!0)=>{if(typeof n=="string"&&n.includes(".")){const[a,l]=n.split("."),c=parseInt(l,10);if(a in t.colors&&c>=0&&c<10)return t.colors[a][typeof r=="number"&&!o?r:c]}const s=typeof r=="number"?r:e();return n in t.colors?t.colors[n][s]:i?t.colors[t.primaryColor][s]:n}}function SG(t){let e="";for(let n=1;n{const i={from:r?.from||t.defaultGradient.from,to:r?.to||t.defaultGradient.to,deg:r?.deg||t.defaultGradient.deg};return`linear-gradient(${i.deg}deg, ${e(i.from,n(),!1)} 0%, ${e(i.to,n(),!1)} 100%)`}}function MG(t){return e=>{if(typeof e=="number")return`${e/16}${t}`;if(typeof e=="string"){const n=e.replace("px","");if(!Number.isNaN(Number(n)))return`${Number(n)/16}${t}`}return e}}const X=MG("rem"),ls=MG("em");function Oe({size:t,sizes:e,units:n}){return t in e?e[t]:typeof t=="number"?n==="em"?ls(t):X(t):t||e.md}function js(t){return typeof t=="number"?t:typeof t=="string"&&t.includes("rem")?Number(t.replace("rem",""))*16:typeof t=="string"&&t.includes("em")?Number(t.replace("em",""))*16:Number(t)}function Dge(t){return e=>`@media (min-width: ${ls(js(Oe({size:e,sizes:t.breakpoints})))})`}function Ige(t){return e=>`@media (max-width: ${ls(js(Oe({size:e,sizes:t.breakpoints}))-1)})`}function Lge(t){return/^#?([0-9A-F]{3}){1,2}$/i.test(t)}function kge(t){let e=t.replace("#","");if(e.length===3){const s=e.split("");e=[s[0],s[0],s[1],s[1],s[2],s[2]].join("")}const n=parseInt(e,16),r=n>>16&255,i=n>>8&255,o=n&255;return{r,g:i,b:o,a:1}}function Nge(t){const[e,n,r,i]=t.replace(/[^0-9,.]/g,"").split(",").map(Number);return{r:e,g:n,b:r,a:i||1}}function YR(t){return Lge(t)?kge(t):t.startsWith("rgb")?Nge(t):{r:0,g:0,b:0,a:1}}function mf(t,e){if(typeof t!="string"||e>1||e<0)return"rgba(0, 0, 0, 1)";if(t.startsWith("var(--"))return t;const{r:n,g:r,b:i}=YR(t);return`rgba(${n}, ${r}, ${i}, ${e})`}function Fge(t=0){return{position:"absolute",top:X(t),right:X(t),left:X(t),bottom:X(t)}}function zge(t,e){if(typeof t=="string"&&t.startsWith("var(--"))return t;const{r:n,g:r,b:i,a:o}=YR(t),s=1-e,a=l=>Math.round(l*s);return`rgba(${a(n)}, ${a(r)}, ${a(i)}, ${o})`}function Uge(t,e){if(typeof t=="string"&&t.startsWith("var(--"))return t;const{r:n,g:r,b:i,a:o}=YR(t),s=a=>Math.round(a+(255-a)*e);return`rgba(${s(n)}, ${s(r)}, ${s(i)}, ${o})`}function Bge(t){return e=>{if(typeof e=="number")return X(e);const n=typeof t.defaultRadius=="number"?t.defaultRadius:t.radius[t.defaultRadius]||t.defaultRadius;return t.radius[e]||e||n}}function Hge(t,e){if(typeof t=="string"&&t.includes(".")){const[n,r]=t.split("."),i=parseInt(r,10);if(n in e.colors&&i>=0&&i<10)return{isSplittedColor:!0,key:n,shade:i}}return{isSplittedColor:!1}}function Vge(t){const e=WR(t),n=Xg(t),r=bG(t);return({variant:i,color:o,gradient:s,primaryFallback:a})=>{const l=Hge(o,t);switch(i){case"light":return{border:"transparent",background:mf(e(o,t.colorScheme==="dark"?8:0,a,!1),t.colorScheme==="dark"?.2:1),color:o==="dark"?t.colorScheme==="dark"?t.colors.dark[0]:t.colors.dark[9]:e(o,t.colorScheme==="dark"?2:n("light")),hover:mf(e(o,t.colorScheme==="dark"?7:1,a,!1),t.colorScheme==="dark"?.25:.65)};case"subtle":return{border:"transparent",background:"transparent",color:o==="dark"?t.colorScheme==="dark"?t.colors.dark[0]:t.colors.dark[9]:e(o,t.colorScheme==="dark"?2:n("light")),hover:mf(e(o,t.colorScheme==="dark"?8:0,a,!1),t.colorScheme==="dark"?.2:1)};case"outline":return{border:e(o,t.colorScheme==="dark"?5:n("light")),background:"transparent",color:e(o,t.colorScheme==="dark"?5:n("light")),hover:t.colorScheme==="dark"?mf(e(o,5,a,!1),.05):mf(e(o,0,a,!1),.35)};case"default":return{border:t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[4],background:t.colorScheme==="dark"?t.colors.dark[6]:t.white,color:t.colorScheme==="dark"?t.white:t.black,hover:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[0]};case"white":return{border:"transparent",background:t.white,color:e(o,n()),hover:null};case"transparent":return{border:"transparent",color:o==="dark"?t.colorScheme==="dark"?t.colors.dark[0]:t.colors.dark[9]:e(o,t.colorScheme==="dark"?2:n("light")),background:"transparent",hover:null};case"gradient":return{background:r(s),color:t.white,border:"transparent",hover:null};default:{const c=n(),u=l.isSplittedColor?l.shade:c,d=l.isSplittedColor?l.key:o;return{border:"transparent",background:e(d,u,a),color:t.white,hover:e(d,u===9?8:u+1)}}}}}function jge(t){return e=>{const n=Xg(t)(e);return t.colors[t.primaryColor][n]}}function $ge(t){return{"@media (hover: hover)":{"&:hover":t},"@media (hover: none)":{"&:active":t}}}function Gge(t){return()=>({userSelect:"none",color:t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[5]})}function Wge(t){return()=>t.colorScheme==="dark"?t.colors.dark[2]:t.colors.gray[6]}const Wr={fontStyles:Ege,themeColor:WR,focusStyles:Oge,linearGradient:Rge,radialGradient:Age,smallerThan:Ige,largerThan:Dge,rgba:mf,cover:Fge,darken:zge,lighten:Uge,radius:Bge,variant:Vge,primaryShade:Xg,hover:$ge,gradient:bG,primaryColor:jge,placeholderStyles:Gge,dimmed:Wge};var Yge=Object.defineProperty,Xge=Object.defineProperties,Zge=Object.getOwnPropertyDescriptors,mF=Object.getOwnPropertySymbols,qge=Object.prototype.hasOwnProperty,Kge=Object.prototype.propertyIsEnumerable,gF=(t,e,n)=>e in t?Yge(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Qge=(t,e)=>{for(var n in e||(e={}))qge.call(e,n)&&gF(t,n,e[n]);if(mF)for(var n of mF(e))Kge.call(e,n)&&gF(t,n,e[n]);return t},Jge=(t,e)=>Xge(t,Zge(e));function EG(t){return Jge(Qge({},t),{fn:{fontStyles:Wr.fontStyles(t),themeColor:Wr.themeColor(t),focusStyles:Wr.focusStyles(t),largerThan:Wr.largerThan(t),smallerThan:Wr.smallerThan(t),radialGradient:Wr.radialGradient,linearGradient:Wr.linearGradient,gradient:Wr.gradient(t),rgba:Wr.rgba,cover:Wr.cover,lighten:Wr.lighten,darken:Wr.darken,primaryShade:Wr.primaryShade(t),radius:Wr.radius(t),variant:Wr.variant(t),hover:Wr.hover,primaryColor:Wr.primaryColor(t),placeholderStyles:Wr.placeholderStyles(t),dimmed:Wr.dimmed(t)}})}const eve={dir:"ltr",primaryShade:{light:6,dark:8},focusRing:"auto",loader:"oval",colorScheme:"light",white:"#fff",black:"#000",defaultRadius:"sm",transitionTimingFunction:"ease",colors:Mge,lineHeight:1.55,fontFamily:"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",primaryColor:"blue",respectReducedMotion:!0,cursorType:"default",defaultGradient:{from:"indigo",to:"cyan",deg:45},shadows:{xs:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.1)",sm:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 0.625rem 0.9375rem -0.3125rem, rgba(0, 0, 0, 0.04) 0 0.4375rem 0.4375rem -0.3125rem",md:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 1.25rem 1.5625rem -0.3125rem, rgba(0, 0, 0, 0.04) 0 0.625rem 0.625rem -0.3125rem",lg:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 1.75rem 1.4375rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 0.75rem 0.75rem -0.4375rem",xl:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 2.25rem 1.75rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 1.0625rem 1.0625rem -0.4375rem"},fontSizes:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem"},radius:{xs:"0.125rem",sm:"0.25rem",md:"0.5rem",lg:"1rem",xl:"2rem"},spacing:{xs:"0.625rem",sm:"0.75rem",md:"1rem",lg:"1.25rem",xl:"1.5rem"},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},headings:{fontFamily:"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",fontWeight:700,sizes:{h1:{fontSize:"2.125rem",lineHeight:1.3,fontWeight:void 0},h2:{fontSize:"1.625rem",lineHeight:1.35,fontWeight:void 0},h3:{fontSize:"1.375rem",lineHeight:1.4,fontWeight:void 0},h4:{fontSize:"1.125rem",lineHeight:1.45,fontWeight:void 0},h5:{fontSize:"1rem",lineHeight:1.5,fontWeight:void 0},h6:{fontSize:"0.875rem",lineHeight:1.5,fontWeight:void 0}}},other:{},components:{},activeStyles:{transform:"translateY(0.0625rem)"},datesLocale:"en",globalStyles:void 0,focusRingStyles:{styles:t=>({outlineOffset:"0.125rem",outline:`0.125rem solid ${t.colors[t.primaryColor][t.colorScheme==="dark"?7:5]}`}),resetStyles:()=>({outline:"none"}),inputStyles:t=>({outline:"none",borderColor:t.colors[t.primaryColor][typeof t.primaryShade=="object"?t.primaryShade[t.colorScheme]:t.primaryShade]})}},XR=EG(eve);function tve(t){if(t.sheet)return t.sheet;for(var e=0;e0?_i(Ch,--po):0,sh--,zr===10&&(sh=1,$S--),zr}function To(){return zr=po2||dg(zr)>3?"":" "}function pve(t,e){for(;--e&&To()&&!(zr<48||zr>102||zr>57&&zr<65||zr>70&&zr<97););return Zg(t,N_()+(e<6&&Ca()==32&&To()==32))}function aT(t){for(;To();)switch(zr){case t:return po;case 34:case 39:t!==34&&t!==39&&aT(zr);break;case 40:t===41&&aT(t);break;case 92:To();break}return po}function mve(t,e){for(;To()&&t+zr!==47+10;)if(t+zr===42+42&&Ca()===47)break;return"/*"+Zg(e,po-1)+"*"+jS(t===47?t:To())}function gve(t){for(;!dg(Ca());)To();return Zg(t,po)}function vve(t){return AG(z_("",null,null,null,[""],t=RG(t),0,[0],t))}function z_(t,e,n,r,i,o,s,a,l){for(var c=0,u=0,d=s,f=0,h=0,g=0,y=1,_=1,v=1,x=0,w="",S=i,E=o,C=r,O=w;_;)switch(g=x,x=To()){case 40:if(g!=108&&_i(O,d-1)==58){sT(O+=kn(F_(x),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:O+=F_(x);break;case 9:case 10:case 13:case 32:O+=hve(g);break;case 92:O+=pve(N_()-1,7);continue;case 47:switch(Ca()){case 42:case 47:Cy(yve(mve(To(),N_()),e,n),l);break;default:O+="/"}break;case 123*y:a[c++]=pa(O)*v;case 125*y:case 59:case 0:switch(x){case 0:case 125:_=0;case 59+u:v==-1&&(O=kn(O,/\f/g,"")),h>0&&pa(O)-d&&Cy(h>32?yF(O+";",r,n,d-1):yF(kn(O," ","")+";",r,n,d-2),l);break;case 59:O+=";";default:if(Cy(C=vF(O,e,n,c,u,i,a,w,S=[],E=[],d),o),x===123)if(u===0)z_(O,e,C,C,S,o,d,a,E);else switch(f===99&&_i(O,3)===110?100:f){case 100:case 108:case 109:case 115:z_(t,C,C,r&&Cy(vF(t,C,C,0,0,i,a,w,i,S=[],d),E),i,E,d,a,r?S:E);break;default:z_(O,C,C,C,[""],E,0,a,E)}}c=u=h=0,y=v=1,w=O="",d=s;break;case 58:d=1+pa(O),h=g;default:if(y<1){if(x==123)--y;else if(x==125&&y++==0&&fve()==125)continue}switch(O+=jS(x),x*y){case 38:v=u>0?1:(O+="\f",-1);break;case 44:a[c++]=(pa(O)-1)*v,v=1;break;case 64:Ca()===45&&(O+=F_(To())),f=Ca(),u=d=pa(w=O+=gve(N_())),x++;break;case 45:g===45&&pa(O)==2&&(y=0)}}return o}function vF(t,e,n,r,i,o,s,a,l,c,u){for(var d=i-1,f=i===0?o:[""],h=KR(f),g=0,y=0,_=0;g0?f[v]+" "+x:kn(x,/&\f/g,f[v])))&&(l[_++]=w);return GS(t,e,n,i===0?ZR:a,l,c,u)}function yve(t,e,n){return GS(t,e,n,PG,jS(dve()),ug(t,2,-2),0)}function yF(t,e,n,r){return GS(t,e,n,qR,ug(t,0,r),ug(t,r+1,-1),r)}function jf(t,e){for(var n="",r=KR(t),i=0;i6)switch(_i(t,e+1)){case 109:if(_i(t,e+4)!==45)break;case 102:return kn(t,/(.+:)(.+)-([^]+)/,"$1"+Ln+"$2-$3$1"+Cx+(_i(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~sT(t,"stretch")?IG(kn(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(_i(t,e+1)!==115)break;case 6444:switch(_i(t,pa(t)-3-(~sT(t,"!important")&&10))){case 107:return kn(t,":",":"+Ln)+t;case 101:return kn(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ln+(_i(t,14)===45?"inline-":"")+"box$3$1"+Ln+"$2$3$1"+Ai+"$2box$3")+t}break;case 5936:switch(_i(t,e+11)){case 114:return Ln+t+Ai+kn(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return Ln+t+Ai+kn(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return Ln+t+Ai+kn(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return Ln+t+Ai+t+t}return t}var Cve=function(e,n,r,i){if(e.length>-1&&!e.return)switch(e.type){case qR:e.return=IG(e.value,e.length);break;case CG:return jf([Lp(e,{value:kn(e.value,"@","@"+Ln)})],i);case ZR:if(e.length)return uve(e.props,function(o){switch(cve(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return jf([Lp(e,{props:[kn(o,/:(read-\w+)/,":"+Cx+"$1")]})],i);case"::placeholder":return jf([Lp(e,{props:[kn(o,/:(plac\w+)/,":"+Ln+"input-$1")]}),Lp(e,{props:[kn(o,/:(plac\w+)/,":"+Cx+"$1")]}),Lp(e,{props:[kn(o,/:(plac\w+)/,Ai+"input-$1")]})],i)}return""})}},Tve=[Cve],LG=function(e){var n=e.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(y){var _=y.getAttribute("data-emotion");_.indexOf(" ")!==-1&&(document.head.appendChild(y),y.setAttribute("data-s",""))})}var i=e.stylisPlugins||Tve,o={},s,a=[];s=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(y){for(var _=y.getAttribute("data-emotion").split(" "),v=1;v<_.length;v++)o[_[v]]=!0;a.push(y)});var l,c=[Eve,Pve];{var u,d=[_ve,wve(function(y){u.insert(y)})],f=xve(c.concat(i,d)),h=function(_){return jf(vve(_),f)};l=function(_,v,x,w){u=x,h(_?_+"{"+v.styles+"}":v.styles),w&&(g.inserted[v.name]=!0)}}var g={key:n,sheet:new rve({key:n,container:s,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:l};return g.sheet.hydrate(a),g},kG={exports:{}},Wn={};/** @license React v16.13.1 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var fi=typeof Symbol=="function"&&Symbol.for,oA=fi?Symbol.for("react.element"):60103,sA=fi?Symbol.for("react.portal"):60106,WS=fi?Symbol.for("react.fragment"):60107,YS=fi?Symbol.for("react.strict_mode"):60108,XS=fi?Symbol.for("react.profiler"):60114,ZS=fi?Symbol.for("react.provider"):60109,qS=fi?Symbol.for("react.context"):60110,aA=fi?Symbol.for("react.async_mode"):60111,KS=fi?Symbol.for("react.concurrent_mode"):60111,QS=fi?Symbol.for("react.forward_ref"):60112,JS=fi?Symbol.for("react.suspense"):60113,_0e=fi?Symbol.for("react.suspense_list"):60120,eb=fi?Symbol.for("react.memo"):60115,tb=fi?Symbol.for("react.lazy"):60116,x0e=fi?Symbol.for("react.block"):60121,w0e=fi?Symbol.for("react.fundamental"):60117,S0e=fi?Symbol.for("react.responder"):60118,b0e=fi?Symbol.for("react.scope"):60119;function Fo(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case oA:switch(t=t.type,t){case aA:case KS:case WS:case XS:case YS:case JS:return t;default:switch(t=t&&t.$$typeof,t){case qS:case QS:case tb:case eb:case ZS:return t;default:return e}}case sA:return e}}}function $G(t){return Fo(t)===KS}Wn.AsyncMode=aA;Wn.ConcurrentMode=KS;Wn.ContextConsumer=qS;Wn.ContextProvider=ZS;Wn.Element=oA;Wn.ForwardRef=QS;Wn.Fragment=WS;Wn.Lazy=tb;Wn.Memo=eb;Wn.Portal=sA;Wn.Profiler=XS;Wn.StrictMode=YS;Wn.Suspense=JS;Wn.isAsyncMode=function(t){return $G(t)||Fo(t)===aA};Wn.isConcurrentMode=$G;Wn.isContextConsumer=function(t){return Fo(t)===qS};Wn.isContextProvider=function(t){return Fo(t)===ZS};Wn.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===oA};Wn.isForwardRef=function(t){return Fo(t)===QS};Wn.isFragment=function(t){return Fo(t)===WS};Wn.isLazy=function(t){return Fo(t)===tb};Wn.isMemo=function(t){return Fo(t)===eb};Wn.isPortal=function(t){return Fo(t)===sA};Wn.isProfiler=function(t){return Fo(t)===XS};Wn.isStrictMode=function(t){return Fo(t)===YS};Wn.isSuspense=function(t){return Fo(t)===JS};Wn.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===WS||t===KS||t===XS||t===YS||t===JS||t===_0e||typeof t=="object"&&t!==null&&(t.$$typeof===tb||t.$$typeof===eb||t.$$typeof===ZS||t.$$typeof===qS||t.$$typeof===QS||t.$$typeof===w0e||t.$$typeof===S0e||t.$$typeof===b0e||t.$$typeof===x0e)};Wn.typeOf=Fo;jG.exports=Wn;var M0e=jG.exports,GG=M0e,E0e={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},P0e={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},WG={};WG[GG.ForwardRef]=E0e;WG[GG.Memo]=P0e;var C0e=!0;function YG(t,e,n){var r="";return n.split(" ").forEach(function(i){t[i]!==void 0?e.push(t[i]+";"):r+=i+" "}),r}var XG=function(e,n,r){var i=e.key+"-"+n.name;(r===!1||C0e===!1)&&e.registered[i]===void 0&&(e.registered[i]=n.styles)},lA=function(e,n,r){XG(e,n,r);var i=e.key+"-"+n.name;if(e.inserted[n.name]===void 0){var o=n;do e.insert(n===o?"."+i:"",o,e.sheet,!0),o=o.next;while(o!==void 0)}};function T0e(t){for(var e=0,n,r=0,i=t.length;i>=4;++r,i-=4)n=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(r+2)&255)<<16;case 2:e^=(t.charCodeAt(r+1)&255)<<8;case 1:e^=t.charCodeAt(r)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var O0e={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},R0e=/[A-Z]|^ms/g,A0e=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ZG=function(e){return e.charCodeAt(1)===45},OF=function(e){return e!=null&&typeof e!="boolean"},wP=BG(function(t){return ZG(t)?t:t.replace(R0e,"-$&").toLowerCase()}),RF=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(A0e,function(r,i,o){return ma={name:i,styles:o,next:ma},i})}return O0e[e]!==1&&!ZG(e)&&typeof n=="number"&&n!==0?n+"px":n};function pg(t,e,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return ma={name:n.name,styles:n.styles,next:ma},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)ma={name:r.name,styles:r.styles,next:ma},r=r.next;var i=n.styles+";";return i}return D0e(t,e,n)}case"function":{if(t!==void 0){var o=ma,s=n(t);return ma=o,pg(t,e,s)}break}}if(e==null)return n;var a=e[n];return a!==void 0?a:n}function D0e(t,e,n){var r="";if(Array.isArray(n))for(var i=0;ie in t?z0e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,j0e=(t,e)=>{for(var n in e||(e={}))H0e.call(e,n)&&LF(t,n,e[n]);if(IF)for(var n of IF(e))V0e.call(e,n)&&LF(t,n,e[n]);return t},$0e=(t,e)=>U0e(t,B0e(e));function G0e({theme:t}){return H.createElement(qg,{styles:{"*, *::before, *::after":{boxSizing:"border-box"},html:{colorScheme:t.colorScheme==="dark"?"dark":"light"},body:$0e(j0e({},t.fn.fontStyles()),{backgroundColor:t.colorScheme==="dark"?t.colors.dark[7]:t.white,color:t.colorScheme==="dark"?t.colors.dark[0]:t.black,lineHeight:t.lineHeight,fontSize:t.fontSizes.md,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"})}})}function kp(t,e,n,r=X){Object.keys(e).forEach(i=>{t[`--mantine-${n}-${i}`]=r(e[i])})}function W0e({theme:t}){const e={"--mantine-color-white":t.white,"--mantine-color-black":t.black,"--mantine-transition-timing-function":t.transitionTimingFunction,"--mantine-line-height":`${t.lineHeight}`,"--mantine-font-family":t.fontFamily,"--mantine-font-family-monospace":t.fontFamilyMonospace,"--mantine-font-family-headings":t.headings.fontFamily,"--mantine-heading-font-weight":`${t.headings.fontWeight}`};kp(e,t.shadows,"shadow"),kp(e,t.fontSizes,"font-size"),kp(e,t.radius,"radius"),kp(e,t.spacing,"spacing"),kp(e,t.breakpoints,"breakpoints",ls),Object.keys(t.colors).forEach(r=>{t.colors[r].forEach((i,o)=>{e[`--mantine-color-${r}-${o}`]=i})});const n=t.headings.sizes;return Object.keys(n).forEach(r=>{e[`--mantine-${r}-font-size`]=n[r].fontSize,e[`--mantine-${r}-line-height`]=`${n[r].lineHeight}`}),H.createElement(qg,{styles:{":root":e}})}var Y0e=Object.defineProperty,X0e=Object.defineProperties,Z0e=Object.getOwnPropertyDescriptors,kF=Object.getOwnPropertySymbols,q0e=Object.prototype.hasOwnProperty,K0e=Object.prototype.propertyIsEnumerable,NF=(t,e,n)=>e in t?Y0e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ca=(t,e)=>{for(var n in e||(e={}))q0e.call(e,n)&&NF(t,n,e[n]);if(kF)for(var n of kF(e))K0e.call(e,n)&&NF(t,n,e[n]);return t},SP=(t,e)=>X0e(t,Z0e(e));function Q0e(t,e){var n;if(!e)return t;const r=Object.keys(t).reduce((i,o)=>{if(o==="headings"&&e.headings){const s=e.headings.sizes?Object.keys(t.headings.sizes).reduce((a,l)=>(a[l]=ca(ca({},t.headings.sizes[l]),e.headings.sizes[l]),a),{}):t.headings.sizes;return SP(ca({},i),{headings:SP(ca(ca({},t.headings),e.headings),{sizes:s})})}if(o==="breakpoints"&&e.breakpoints){const s=ca(ca({},t.breakpoints),e.breakpoints);return SP(ca({},i),{breakpoints:Object.fromEntries(Object.entries(s).sort((a,l)=>js(a[1])-js(l[1])))})}return i[o]=typeof e[o]=="object"?ca(ca({},t[o]),e[o]):typeof e[o]=="number"||typeof e[o]=="boolean"||typeof e[o]=="function"?e[o]:e[o]||t[o],i},{});if(e?.fontFamily&&!((n=e?.headings)!=null&&n.fontFamily)&&(r.headings.fontFamily=e.fontFamily),!(r.primaryColor in r.colors))throw new Error("MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color");return r}function J0e(t,e){return IG(Q0e(t,e))}function eW(t){return Object.keys(t).reduce((e,n)=>(t[n]!==void 0&&(e[n]=t[n]),e),{})}const eye={html:{fontFamily:"sans-serif",lineHeight:"1.15",textSizeAdjust:"100%"},body:{margin:0},"article, aside, footer, header, nav, section, figcaption, figure, main":{display:"block"},h1:{fontSize:"2em"},hr:{boxSizing:"content-box",height:0,overflow:"visible"},pre:{fontFamily:"monospace, monospace",fontSize:"1em"},a:{background:"transparent",textDecorationSkip:"objects"},"a:active, a:hover":{outlineWidth:0},"abbr[title]":{borderBottom:"none",textDecoration:"underline"},"b, strong":{fontWeight:"bolder"},"code, kbp, samp":{fontFamily:"monospace, monospace",fontSize:"1em"},dfn:{fontStyle:"italic"},mark:{backgroundColor:"#ff0",color:"#000"},small:{fontSize:"80%"},"sub, sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sup:{top:"-0.5em"},sub:{bottom:"-0.25em"},"audio, video":{display:"inline-block"},"audio:not([controls])":{display:"none",height:0},img:{borderStyle:"none",verticalAlign:"middle"},"svg:not(:root)":{overflow:"hidden"},"button, input, optgroup, select, textarea":{fontFamily:"sans-serif",fontSize:"100%",lineHeight:"1.15",margin:0},"button, input":{overflow:"visible"},"button, select":{textTransform:"none"},"button, [type=reset], [type=submit]":{WebkitAppearance:"button"},"button::-moz-focus-inner, [type=button]::-moz-focus-inner, [type=reset]::-moz-focus-inner, [type=submit]::-moz-focus-inner":{borderStyle:"none",padding:0},"button:-moz-focusring, [type=button]:-moz-focusring, [type=reset]:-moz-focusring, [type=submit]:-moz-focusring":{outline:`${X(1)} dotted ButtonText`},legend:{boxSizing:"border-box",color:"inherit",display:"table",maxWidth:"100%",padding:0,whiteSpace:"normal"},progress:{display:"inline-block",verticalAlign:"baseline"},textarea:{overflow:"auto"},"[type=checkbox], [type=radio]":{boxSizing:"border-box",padding:0},"[type=number]::-webkit-inner-spin-button, [type=number]::-webkit-outer-spin-button":{height:"auto"},"[type=search]":{appearance:"none"},"[type=search]::-webkit-search-cancel-button, [type=search]::-webkit-search-decoration":{appearance:"none"},"::-webkit-file-upload-button":{appearance:"button",font:"inherit"},"details, menu":{display:"block"},summary:{display:"list-item"},canvas:{display:"inline-block"},template:{display:"none"}};function tye(){return H.createElement(qg,{styles:eye})}var nye=Object.defineProperty,FF=Object.getOwnPropertySymbols,rye=Object.prototype.hasOwnProperty,iye=Object.prototype.propertyIsEnumerable,zF=(t,e,n)=>e in t?nye(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,wm=(t,e)=>{for(var n in e||(e={}))rye.call(e,n)&&zF(t,n,e[n]);if(FF)for(var n of FF(e))iye.call(e,n)&&zF(t,n,e[n]);return t};const Dx=M.createContext({theme:tA});function Ir(){var t;return((t=M.useContext(Dx))==null?void 0:t.theme)||tA}function oye(t){const e=Ir(),n=r=>{var i,o,s,a;return{styles:((i=e.components[r])==null?void 0:i.styles)||{},classNames:((o=e.components[r])==null?void 0:o.classNames)||{},variants:(s=e.components[r])==null?void 0:s.variants,sizes:(a=e.components[r])==null?void 0:a.sizes}};return Array.isArray(t)?t.map(n):[n(t)]}function tW(){var t;return(t=M.useContext(Dx))==null?void 0:t.emotionCache}function nt(t,e,n){var r;const i=Ir(),o=(r=i.components[t])==null?void 0:r.defaultProps,s=typeof o=="function"?o(i):o;return wm(wm(wm({},e),s),eW(n))}function nW({theme:t,emotionCache:e,withNormalizeCSS:n=!1,withGlobalStyles:r=!1,withCSSVariables:i=!1,inherit:o=!1,children:s}){const a=M.useContext(Dx),l=J0e(tA,o?wm(wm({},a.theme),t):t);return H.createElement(F0e,{theme:l},H.createElement(Dx.Provider,{value:{theme:l,emotionCache:e}},n&&H.createElement(tye,null),r&&H.createElement(G0e,{theme:l}),i&&H.createElement(W0e,{theme:l}),typeof l.globalStyles=="function"&&H.createElement(qg,{styles:l.globalStyles(l)}),s))}nW.displayName="@mantine/core/MantineProvider";const sye={app:100,modal:200,popover:300,overlay:400,max:9999};function Ys(t){return sye[t]}function aye(t,e){const n=M.useRef();return(!n.current||e.length!==n.current.prevDeps.length||n.current.prevDeps.map((r,i)=>r===e[i]).indexOf(!1)>=0)&&(n.current={v:t(),prevDeps:[...e]}),n.current.v}const lye=VG({key:"mantine",prepend:!0});function cye(){return tW()||lye}var uye=Object.defineProperty,UF=Object.getOwnPropertySymbols,dye=Object.prototype.hasOwnProperty,fye=Object.prototype.propertyIsEnumerable,BF=(t,e,n)=>e in t?uye(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,hye=(t,e)=>{for(var n in e||(e={}))dye.call(e,n)&&BF(t,n,e[n]);if(UF)for(var n of UF(e))fye.call(e,n)&&BF(t,n,e[n]);return t};const bP="ref";function pye(t){let e;if(t.length!==1)return{args:t,ref:e};const[n]=t;if(!(n instanceof Object))return{args:t,ref:e};if(!(bP in n))return{args:t,ref:e};e=n[bP];const r=hye({},n);return delete r[bP],{args:[r],ref:e}}const{cssFactory:mye}=(()=>{function t(n,r,i){const o=[],s=YG(n,o,i);return o.length<2?i:s+r(o)}function e(n){const{cache:r}=n,i=(...s)=>{const{ref:a,args:l}=pye(s),c=nb(l,r.registered);return lA(r,c,!1),`${r.key}-${c.name}${a===void 0?"":` ${a}`}`};return{css:i,cx:(...s)=>t(r.registered,i,OG(s))}}return{cssFactory:e}})();function rW(){const t=cye();return aye(()=>mye({cache:t}),[t])}function gye({cx:t,classes:e,context:n,classNames:r,name:i,cache:o}){const s=n.reduce((a,l)=>(Object.keys(l.classNames).forEach(c=>{typeof a[c]!="string"?a[c]=`${l.classNames[c]}`:a[c]=`${a[c]} ${l.classNames[c]}`}),a),{});return Object.keys(e).reduce((a,l)=>(a[l]=t(e[l],s[l],r!=null&&r[l],Array.isArray(i)?i.filter(Boolean).map(c=>`${o?.key||"mantine"}-${c}-${l}`).join(" "):i?`${o?.key||"mantine"}-${i}-${l}`:null),a),{})}var vye=Object.defineProperty,HF=Object.getOwnPropertySymbols,yye=Object.prototype.hasOwnProperty,_ye=Object.prototype.propertyIsEnumerable,VF=(t,e,n)=>e in t?vye(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,MP=(t,e)=>{for(var n in e||(e={}))yye.call(e,n)&&VF(t,n,e[n]);if(HF)for(var n of HF(e))_ye.call(e,n)&&VF(t,n,e[n]);return t};function pT(t,e){return e&&Object.keys(e).forEach(n=>{t[n]?t[n]=MP(MP({},t[n]),e[n]):t[n]=MP({},e[n])}),t}function jF(t,e,n,r){const i=o=>typeof o=="function"?o(e,n||{},r):o||{};return Array.isArray(t)?t.map(o=>i(o.styles)).reduce((o,s)=>pT(o,s),{}):i(t)}function xye({ctx:t,theme:e,params:n,variant:r,size:i}){return t.reduce((o,s)=>(s.variants&&r in s.variants&&pT(o,s.variants[r](e,n,{variant:r,size:i})),s.sizes&&i in s.sizes&&pT(o,s.sizes[i](e,n,{variant:r,size:i})),o),{})}function ft(t){const e=typeof t=="function"?t:()=>t;function n(r,i){const o=Ir(),s=oye(i?.name),a=tW(),l={variant:i?.variant,size:i?.size},{css:c,cx:u}=rW(),d=e(o,r,l),f=jF(i?.styles,o,r,l),h=jF(s,o,r,l),g=xye({ctx:s,theme:o,params:r,variant:i?.variant,size:i?.size}),y=Object.fromEntries(Object.keys(d).map(_=>{const v=u({[c(d[_])]:!i?.unstyled},c(g[_]),c(h[_]),c(f[_]));return[_,v]}));return{classes:gye({cx:u,classes:y,context:s,classNames:i?.classNames,name:i?.name,cache:a}),cx:u,theme:o}}return n}function Ur(t){return`___ref-${t||""}`}function iW({styles:t}){const e=Ir();return H.createElement(qg,{styles:JG(typeof t=="function"?t(e):t)})}var wye=Object.defineProperty,Sye=Object.defineProperties,bye=Object.getOwnPropertyDescriptors,$F=Object.getOwnPropertySymbols,Mye=Object.prototype.hasOwnProperty,Eye=Object.prototype.propertyIsEnumerable,GF=(t,e,n)=>e in t?wye(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Np=(t,e)=>{for(var n in e||(e={}))Mye.call(e,n)&&GF(t,n,e[n]);if($F)for(var n of $F(e))Eye.call(e,n)&&GF(t,n,e[n]);return t},Fp=(t,e)=>Sye(t,bye(e));const zp={in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${X(10)})`},transitionProperty:"transform, opacity"},Ty={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:"opacity"},scale:{in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:"scale(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-y":{in:{opacity:1,transform:"scaleY(1)"},out:{opacity:0,transform:"scaleY(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-x":{in:{opacity:1,transform:"scaleX(1)"},out:{opacity:0,transform:"scaleX(0)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"skew-up":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:`translateY(-${X(20)}) skew(-10deg, -5deg)`},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"skew-down":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:`translateY(${X(20)}) skew(-10deg, -5deg)`},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-left":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:`translateY(${X(20)}) rotate(-5deg)`},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-right":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:`translateY(${X(20)}) rotate(5deg)`},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-100%)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(100%)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"slide-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(100%)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"slide-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-100%)"},common:{transformOrigin:"right"},transitionProperty:"transform, opacity"},pop:Fp(Np({},zp),{common:{transformOrigin:"center center"}}),"pop-bottom-left":Fp(Np({},zp),{common:{transformOrigin:"bottom left"}}),"pop-bottom-right":Fp(Np({},zp),{common:{transformOrigin:"bottom right"}}),"pop-top-left":Fp(Np({},zp),{common:{transformOrigin:"top left"}}),"pop-top-right":Fp(Np({},zp),{common:{transformOrigin:"top right"}})},WF=["mousedown","touchstart"];function Pye(t,e,n){const r=M.useRef();return M.useEffect(()=>{const i=o=>{const{target:s}=o??{};if(Array.isArray(n)){const a=s?.hasAttribute("data-ignore-outside-clicks")||!document.body.contains(s)&&s.tagName!=="HTML";n.every(c=>!!c&&!o.composedPath().includes(c))&&!a&&t()}else r.current&&!r.current.contains(s)&&t()};return(e||WF).forEach(o=>document.addEventListener(o,i)),()=>{(e||WF).forEach(o=>document.removeEventListener(o,i))}},[r,t,n]),r}function Cye({timeout:t=2e3}={}){const[e,n]=M.useState(null),[r,i]=M.useState(!1),[o,s]=M.useState(null),a=u=>{clearTimeout(o),s(setTimeout(()=>i(!1),t)),i(u)};return{copy:u=>{"clipboard"in navigator?navigator.clipboard.writeText(u).then(()=>a(!0)).catch(d=>n(d)):n(new Error("useClipboard: navigator.clipboard is not supported"))},reset:()=>{i(!1),n(null),clearTimeout(o)},error:e,copied:r}}function Tye(t,e){try{return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}catch{return t.addListener(e),()=>t.removeListener(e)}}function Oye(t,e){return typeof e=="boolean"?e:typeof window<"u"&&"matchMedia"in window?window.matchMedia(t).matches:!1}function rb(t,e,{getInitialValueInEffect:n}={getInitialValueInEffect:!0}){const[r,i]=M.useState(n?e:Oye(t,e)),o=M.useRef();return M.useEffect(()=>{if("matchMedia"in window)return o.current=window.matchMedia(t),i(o.current.matches),Tye(o.current,s=>i(s.matches))},[t]),r}function Ns(t,e,n){return Math.min(Math.max(t,e),n)}function oW(t,e,n={leading:!1}){const[r,i]=M.useState(t),o=M.useRef(!1),s=M.useRef(null),a=M.useRef(!1),l=()=>window.clearTimeout(s.current);return M.useEffect(()=>{o.current&&(!a.current&&n.leading?(a.current=!0,i(t)):(l(),s.current=window.setTimeout(()=>{a.current=!1,i(t)},e)))},[t,n.leading,e]),M.useEffect(()=>(o.current=!0,l),[]),[r,l]}const ib=typeof document<"u"?M.useLayoutEffect:M.useEffect;function Qr(t,e){const n=M.useRef(!1);M.useEffect(()=>()=>{n.current=!1},[]),M.useEffect(()=>{if(n.current)return t();n.current=!0},e)}function sW({opened:t,shouldReturnFocus:e=!0}){const n=M.useRef(),r=()=>{var i;n.current&&"focus"in n.current&&typeof n.current.focus=="function"&&((i=n.current)==null||i.focus({preventScroll:!0}))};return Qr(()=>{let i=-1;const o=s=>{s.key==="Tab"&&window.clearTimeout(i)};return document.addEventListener("keydown",o),t?n.current=document.activeElement:e&&(i=window.setTimeout(r,10)),()=>{window.clearTimeout(i),document.removeEventListener("keydown",o)}},[t,e]),r}const Rye=/input|select|textarea|button|object/,aW="a, input, select, textarea, button, object, [tabindex]";function Aye(t){return t.style.display==="none"}function Dye(t){if(t.getAttribute("aria-hidden")||t.getAttribute("hidden")||t.getAttribute("type")==="hidden")return!1;let n=t;for(;n&&!(n===document.body||n.nodeType===11);){if(Aye(n))return!1;n=n.parentNode}return!0}function lW(t){let e=t.getAttribute("tabindex");return e===null&&(e=void 0),parseInt(e,10)}function mT(t){const e=t.nodeName.toLowerCase(),n=!Number.isNaN(lW(t));return(Rye.test(e)&&!t.disabled||t instanceof HTMLAnchorElement&&t.href||n)&&Dye(t)}function cW(t){const e=lW(t);return(Number.isNaN(e)||e>=0)&&mT(t)}function Iye(t){return Array.from(t.querySelectorAll(aW)).filter(cW)}function Lye(t,e){const n=Iye(t);if(!n.length){e.preventDefault();return}const r=n[e.shiftKey?0:n.length-1],i=t.getRootNode();if(!(r===i.activeElement||t===i.activeElement))return;e.preventDefault();const s=n[e.shiftKey?n.length-1:0];s&&s.focus()}function uA(){return`mantine-${Math.random().toString(36).slice(2,11)}`}function kye(t,e="body > :not(script)"){const n=uA(),r=Array.from(document.querySelectorAll(e)).map(i=>{var o;if((o=i?.shadowRoot)!=null&&o.contains(t)||i.contains(t))return;const s=i.getAttribute("aria-hidden"),a=i.getAttribute("data-hidden"),l=i.getAttribute("data-focus-id");return i.setAttribute("data-focus-id",n),s===null||s==="false"?i.setAttribute("aria-hidden","true"):!a&&!l&&i.setAttribute("data-hidden",s),{node:i,ariaHidden:a||null}});return()=>{r.forEach(i=>{!i||n!==i.node.getAttribute("data-focus-id")||(i.ariaHidden===null?i.node.removeAttribute("aria-hidden"):i.node.setAttribute("aria-hidden",i.ariaHidden),i.node.removeAttribute("data-focus-id"),i.node.removeAttribute("data-hidden"))})}}function Nye(t=!0){const e=M.useRef(),n=M.useRef(null),r=o=>{let s=o.querySelector("[data-autofocus]");if(!s){const a=Array.from(o.querySelectorAll(aW));s=a.find(cW)||a.find(mT)||null,!s&&mT(o)&&(s=o)}s&&s.focus({preventScroll:!0})},i=M.useCallback(o=>{if(t){if(o===null){n.current&&(n.current(),n.current=null);return}n.current=kye(o),e.current!==o&&(o?(setTimeout(()=>{o.getRootNode()&&r(o)}),e.current=o):e.current=null)}},[t]);return M.useEffect(()=>{if(!t)return;e.current&&setTimeout(()=>r(e.current));const o=s=>{s.key==="Tab"&&e.current&&Lye(e.current,s)};return document.addEventListener("keydown",o),()=>{document.removeEventListener("keydown",o),n.current&&n.current()}},[t]),i}const Fye=H["useId".toString()]||(()=>{});function zye(){const t=Fye();return t?`mantine-${t.replace(/:/g,"")}`:""}function zo(t){const e=zye(),[n,r]=M.useState(e);return ib(()=>{r(uA())},[]),typeof t=="string"?t:typeof window>"u"?e:n}function gT(t,e,n){M.useEffect(()=>(window.addEventListener(t,e,n),()=>window.removeEventListener(t,e,n)),[t,e])}function uW(t,e){typeof t=="function"?t(e):typeof t=="object"&&t!==null&&"current"in t&&(t.current=e)}function dW(...t){return e=>{t.forEach(n=>uW(n,e))}}function Da(...t){return M.useCallback(dW(...t),t)}const fW=t=>({x:Ns(t.x,0,1),y:Ns(t.y,0,1)});function dA(t,e,n="ltr"){const r=M.useRef(),i=M.useRef(!1),o=M.useRef(!1),s=M.useRef(0),[a,l]=M.useState(!1);return M.useEffect(()=>{i.current=!0},[]),M.useEffect(()=>{const c=({x,y:w})=>{cancelAnimationFrame(s.current),s.current=requestAnimationFrame(()=>{if(i.current&&r.current){r.current.style.userSelect="none";const S=r.current.getBoundingClientRect();if(S.width&&S.height){const E=Ns((x-S.left)/S.width,0,1);t({x:n==="ltr"?E:1-E,y:Ns((w-S.top)/S.height,0,1)})}}})},u=()=>{document.addEventListener("mousemove",y),document.addEventListener("mouseup",h),document.addEventListener("touchmove",v),document.addEventListener("touchend",h)},d=()=>{document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",h),document.removeEventListener("touchmove",v),document.removeEventListener("touchend",h)},f=()=>{!o.current&&i.current&&(o.current=!0,typeof e?.onScrubStart=="function"&&e.onScrubStart(),l(!0),u())},h=()=>{o.current&&i.current&&(o.current=!1,l(!1),d(),setTimeout(()=>{typeof e?.onScrubEnd=="function"&&e.onScrubEnd()},0))},g=x=>{f(),x.preventDefault(),y(x)},y=x=>c({x:x.clientX,y:x.clientY}),_=x=>{x.cancelable&&x.preventDefault(),f(),v(x)},v=x=>{x.cancelable&&x.preventDefault(),c({x:x.changedTouches[0].clientX,y:x.changedTouches[0].clientY})};return r.current.addEventListener("mousedown",g),r.current.addEventListener("touchstart",_,{passive:!1}),()=>{r.current&&(r.current.removeEventListener("mousedown",g),r.current.removeEventListener("touchstart",_))}},[n,t]),{ref:r,active:a}}function Ar({value:t,defaultValue:e,finalValue:n,onChange:r=()=>{}}){const[i,o]=M.useState(e!==void 0?e:n),s=a=>{o(a),r?.(a)};return t!==void 0?[t,r,!0]:[i,s,!1]}function ob(t,e){return rb("(prefers-reduced-motion: reduce)",t,e)}const Uye=t=>t<.5?2*t*t:-1+(4-2*t)*t,Bye=({axis:t,target:e,parent:n,alignment:r,offset:i,isList:o})=>{if(!e||!n&&typeof document>"u")return 0;const s=!!n,l=(n||document.body).getBoundingClientRect(),c=e.getBoundingClientRect(),u=d=>c[d]-l[d];if(t==="y"){const d=u("top");if(d===0)return 0;if(r==="start"){const h=d-i;return h<=c.height*(o?0:1)||!o?h:0}const f=s?l.height:window.innerHeight;if(r==="end"){const h=d+i-f+c.height;return h>=-c.height*(o?0:1)||!o?h:0}return r==="center"?d-f/2+c.height/2:0}if(t==="x"){const d=u("left");if(d===0)return 0;if(r==="start"){const h=d-i;return h<=c.width||!o?h:0}const f=s?l.width:window.innerWidth;if(r==="end"){const h=d+i-f+c.width;return h>=-c.width||!o?h:0}return r==="center"?d-f/2+c.width/2:0}return 0},Hye=({axis:t,parent:e})=>{if(!e&&typeof document>"u")return 0;const n=t==="y"?"scrollTop":"scrollLeft";if(e)return e[n];const{body:r,documentElement:i}=document;return r[n]+i[n]},Vye=({axis:t,parent:e,distance:n})=>{if(!e&&typeof document>"u")return;const r=t==="y"?"scrollTop":"scrollLeft";if(e)e[r]=n;else{const{body:i,documentElement:o}=document;i[r]=n,o[r]=n}};function hW({duration:t=1250,axis:e="y",onScrollFinish:n,easing:r=Uye,offset:i=0,cancelable:o=!0,isList:s=!1}={}){const a=M.useRef(0),l=M.useRef(0),c=M.useRef(!1),u=M.useRef(null),d=M.useRef(null),f=ob(),h=()=>{a.current&&cancelAnimationFrame(a.current)},g=M.useCallback(({alignment:_="start"}={})=>{var v;c.current=!1,a.current&&h();const x=(v=Hye({parent:u.current,axis:e}))!=null?v:0,w=Bye({parent:u.current,target:d.current,axis:e,alignment:_,offset:i,isList:s})-(u.current?0:x);function S(){l.current===0&&(l.current=performance.now());const C=performance.now()-l.current,O=f||t===0?1:C/t,R=x+w*r(O);Vye({parent:u.current,axis:e,distance:R}),!c.current&&O<1?a.current=requestAnimationFrame(S):(typeof n=="function"&&n(),l.current=0,a.current=0,h())}S()},[e,t,r,s,i,n,f]),y=()=>{o&&(c.current=!0)};return gT("wheel",y,{passive:!0}),gT("touchmove",y,{passive:!0}),M.useEffect(()=>h,[]),{scrollableRef:u,targetRef:d,scrollIntoView:g,cancel:h}}function YF(){if(typeof window>"u")return"undetermined";const{userAgent:t}=window.navigator,e=/(Macintosh)|(MacIntel)|(MacPPC)|(Mac68K)/i,n=/(Win32)|(Win64)|(Windows)|(WinCE)/i,r=/(iPhone)|(iPad)|(iPod)/i;return e.test(t)?"macos":r.test(t)?"ios":n.test(t)?"windows":/Android/i.test(t)?"android":/Linux/i.test(t)?"linux":"undetermined"}function jye(t={getValueInEffect:!0}){const[e,n]=M.useState(t.getValueInEffect?"undetermined":YF());return ib(()=>{t.getValueInEffect&&n(YF)},[]),e}function pW(t=!1,e){const{onOpen:n,onClose:r}=e||{},[i,o]=M.useState(t),s=M.useCallback(()=>{o(c=>c||(n?.(),!0))},[n]),a=M.useCallback(()=>{o(c=>c&&(r?.(),!1))},[r]),l=M.useCallback(()=>{i?a():s()},[a,s,i]);return[i,{open:s,close:a,toggle:l}]}function $ye(){const[t,e]=M.useState(!1);ib(()=>{e(typeof window<"u"&&"EyeDropper"in window)},[]);const n=M.useCallback((r={})=>{if(t)return new window.EyeDropper().open(r)},[t]);return{supported:t,open:n}}const Ix={context:"Accordion component was not found in the tree",itemContext:"Accordion.Item component was not found in the tree",value:"Accordion.Item component was rendered with invalid value or without value"},[Gye,Lx]=cd(Ix.context);function Wye({children:t,multiple:e,value:n,defaultValue:r,onChange:i,id:o,loop:s,transitionDuration:a,disableChevronRotation:l,chevronPosition:c,chevronSize:u,order:d,chevron:f,variant:h,radius:g,classNames:y,styles:_,unstyled:v}){const x=zo(o),[w,S]=Ar({value:n,defaultValue:r,finalValue:e?[]:null,onChange:i}),E=O=>Array.isArray(w)?w.includes(O):O===w,C=O=>{const R=Array.isArray(w)?w.includes(O)?w.filter(T=>T!==O):[...w,O]:O===w?null:O;S(R)};return H.createElement(Gye,{value:{isItemActive:E,onChange:C,getControlId:Ox(`${x}-control`,Ix.value),getRegionId:Ox(`${x}-panel`,Ix.value),transitionDuration:a,disableChevronRotation:l,chevronPosition:c,chevronSize:u,order:d,chevron:f,loop:s,variant:h,radius:g,classNames:y,styles:_,unstyled:v}},t)}const[Yye,mW]=cd(Ix.itemContext);function Xye(t,e,{radius:n}){const r=t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[3],i=t.colorScheme==="dark"?t.colors.dark[6]:t.colors.gray[0],o=t.fn.radius(n);return e==="default"?{color:t.colorScheme==="dark"?t.colors.dark[0]:t.black,borderBottom:`${X(1)} solid ${r}`}:e==="contained"?{border:`${X(1)} solid ${r}`,transition:"background-color 150ms ease","&[data-active]":{backgroundColor:i},"&:first-of-type":{borderTopRightRadius:o,borderTopLeftRadius:o,"& > [data-accordion-control]":{borderTopRightRadius:o,borderTopLeftRadius:o}},"&:last-of-type":{borderBottomRightRadius:o,borderBottomLeftRadius:o,"& > [data-accordion-control]":{borderBottomRightRadius:o,borderBottomLeftRadius:o}},"& + &":{borderTop:0}}:e==="filled"?{borderRadius:o,"&[data-active]":{backgroundColor:i}}:e==="separated"?{borderRadius:o,backgroundColor:i,border:`${X(1)} solid transparent`,transition:"background-color 150ms ease","& + &":{marginTop:t.spacing.md},"&[data-active]":{backgroundColor:t.colorScheme==="dark"?t.colors.dark[7]:t.white,borderColor:r}}:{}}var Zye=ft((t,e,{variant:n})=>({item:Xye(t,n,e)}));const qye=Zye;var XF=Object.getOwnPropertySymbols,Kye=Object.prototype.hasOwnProperty,Qye=Object.prototype.propertyIsEnumerable,Jye=(t,e)=>{var n={};for(var r in t)Kye.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&XF)for(var r of XF(t))e.indexOf(r)<0&&Qye.call(t,r)&&(n[r]=t[r]);return n};function Sl(t){const e=t,{m:n,mx:r,my:i,mt:o,mb:s,ml:a,mr:l,p:c,px:u,py:d,pt:f,pb:h,pl:g,pr:y,bg:_,c:v,opacity:x,ff:w,fz:S,fw:E,lts:C,ta:O,lh:R,fs:T,tt:A,td:F,w:N,miw:U,maw:k,h:z,mih:G,mah:W,bgsz:B,bgp:j,bgr:$,bga:q,pos:K,top:re,left:J,bottom:le,right:ae,inset:oe,display:De}=e,Te=Jye(e,["m","mx","my","mt","mb","ml","mr","p","px","py","pt","pb","pl","pr","bg","c","opacity","ff","fz","fw","lts","ta","lh","fs","tt","td","w","miw","maw","h","mih","mah","bgsz","bgp","bgr","bga","pos","top","left","bottom","right","inset","display"]);return{systemStyles:eW({m:n,mx:r,my:i,mt:o,mb:s,ml:a,mr:l,p:c,px:u,py:d,pt:f,pb:h,pl:g,pr:y,bg:_,c:v,opacity:x,ff:w,fz:S,fw:E,lts:C,ta:O,lh:R,fs:T,tt:A,td:F,w:N,miw:U,maw:k,h:z,mih:G,mah:W,bgsz:B,bgp:j,bgr:$,bga:q,pos:K,top:re,left:J,bottom:le,right:ae,inset:oe,display:De}),rest:Te}}function e_e(t,e){const n=Object.keys(t).filter(r=>r!=="base").sort((r,i)=>js(Oe({size:r,sizes:e.breakpoints}))-js(Oe({size:i,sizes:e.breakpoints})));return"base"in t?["base",...n]:n}function t_e({value:t,theme:e,getValue:n,property:r}){if(t==null)return;if(typeof t=="object")return e_e(t,e).reduce((s,a)=>{if(a==="base"&&t.base!==void 0){const c=n(t.base,e);return Array.isArray(r)?(r.forEach(u=>{s[u]=c}),s):(s[r]=c,s)}const l=n(t[a],e);return Array.isArray(r)?(s[e.fn.largerThan(a)]={},r.forEach(c=>{s[e.fn.largerThan(a)][c]=l}),s):(s[e.fn.largerThan(a)]={[r]:l},s)},{});const i=n(t,e);return Array.isArray(r)?r.reduce((o,s)=>(o[s]=i,o),{}):{[r]:i}}function n_e(t,e){return t==="dimmed"?e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]:e.fn.variant({variant:"filled",color:t,primaryFallback:!1}).background}function r_e(t){return X(t)}function i_e(t){return t}function o_e(t,e){return Oe({size:t,sizes:e.fontSizes})}const s_e=["-xs","-sm","-md","-lg","-xl"];function a_e(t,e){return s_e.includes(t)?`calc(${Oe({size:t.replace("-",""),sizes:e.spacing})} * -1)`:Oe({size:t,sizes:e.spacing})}const l_e={identity:i_e,color:n_e,size:r_e,fontSize:o_e,spacing:a_e},c_e={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},mx:{type:"spacing",property:["marginRight","marginLeft"]},my:{type:"spacing",property:["marginTop","marginBottom"]},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},px:{type:"spacing",property:["paddingRight","paddingLeft"]},py:{type:"spacing",property:["paddingTop","paddingBottom"]},bg:{type:"color",property:"background"},c:{type:"color",property:"color"},opacity:{type:"identity",property:"opacity"},ff:{type:"identity",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"identity",property:"fontWeight"},lts:{type:"size",property:"letterSpacing"},ta:{type:"identity",property:"textAlign"},lh:{type:"identity",property:"lineHeight"},fs:{type:"identity",property:"fontStyle"},tt:{type:"identity",property:"textTransform"},td:{type:"identity",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"size",property:"backgroundSize"},bgp:{type:"identity",property:"backgroundPosition"},bgr:{type:"identity",property:"backgroundRepeat"},bga:{type:"identity",property:"backgroundAttachment"},pos:{type:"identity",property:"position"},top:{type:"identity",property:"top"},left:{type:"size",property:"left"},bottom:{type:"size",property:"bottom"},right:{type:"size",property:"right"},inset:{type:"size",property:"inset"},display:{type:"identity",property:"display"}};var u_e=Object.defineProperty,ZF=Object.getOwnPropertySymbols,d_e=Object.prototype.hasOwnProperty,f_e=Object.prototype.propertyIsEnumerable,qF=(t,e,n)=>e in t?u_e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,KF=(t,e)=>{for(var n in e||(e={}))d_e.call(e,n)&&qF(t,n,e[n]);if(ZF)for(var n of ZF(e))f_e.call(e,n)&&qF(t,n,e[n]);return t};function vT(t,e,n=c_e){return Object.keys(n).reduce((i,o)=>(o in t&&t[o]!==void 0&&i.push(t_e({value:t[o],getValue:l_e[n[o].type],property:n[o].property,theme:e})),i),[]).reduce((i,o)=>(Object.keys(o).forEach(s=>{typeof o[s]=="object"&&o[s]!==null&&s in i?i[s]=KF(KF({},i[s]),o[s]):i[s]=o[s]}),i),{})}function QF(t,e){return typeof t=="function"?t(e):t}function h_e(t,e,n){const r=Ir(),{css:i,cx:o}=rW();return Array.isArray(t)?o(n,i(vT(e,r)),t.map(s=>i(QF(s,r)))):o(n,i(QF(t,r)),i(vT(e,r)))}var p_e=Object.defineProperty,kx=Object.getOwnPropertySymbols,gW=Object.prototype.hasOwnProperty,vW=Object.prototype.propertyIsEnumerable,JF=(t,e,n)=>e in t?p_e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,m_e=(t,e)=>{for(var n in e||(e={}))gW.call(e,n)&&JF(t,n,e[n]);if(kx)for(var n of kx(e))vW.call(e,n)&&JF(t,n,e[n]);return t},g_e=(t,e)=>{var n={};for(var r in t)gW.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&kx)for(var r of kx(t))e.indexOf(r)<0&&vW.call(t,r)&&(n[r]=t[r]);return n};const yW=M.forwardRef((t,e)=>{var n=t,{className:r,component:i,style:o,sx:s}=n,a=g_e(n,["className","component","style","sx"]);const{systemStyles:l,rest:c}=Sl(a),u=i||"div";return H.createElement(u,m_e({ref:e,className:h_e(s,l,r),style:o},c))});yW.displayName="@mantine/core/Box";const Xe=yW;var v_e=Object.defineProperty,Nx=Object.getOwnPropertySymbols,_W=Object.prototype.hasOwnProperty,xW=Object.prototype.propertyIsEnumerable,ez=(t,e,n)=>e in t?v_e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,y_e=(t,e)=>{for(var n in e||(e={}))_W.call(e,n)&&ez(t,n,e[n]);if(Nx)for(var n of Nx(e))xW.call(e,n)&&ez(t,n,e[n]);return t},__e=(t,e)=>{var n={};for(var r in t)_W.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Nx)for(var r of Nx(t))e.indexOf(r)<0&&xW.call(t,r)&&(n[r]=t[r]);return n};const x_e={},wW=M.forwardRef((t,e)=>{const n=nt("AccordionItem",x_e,t),{children:r,className:i,value:o}=n,s=__e(n,["children","className","value"]),a=Lx(),{classes:l,cx:c}=qye({radius:a.radius},{name:"Accordion",classNames:a.classNames,styles:a.styles,unstyled:a.unstyled,variant:a.variant});return H.createElement(Yye,{value:{value:o}},H.createElement(Xe,y_e({ref:e,className:c(l.item,i),"data-active":a.isItemActive(o)||void 0},s),r))});wW.displayName="@mantine/core/AccordionItem";var w_e=Object.defineProperty,S_e=Object.defineProperties,b_e=Object.getOwnPropertyDescriptors,tz=Object.getOwnPropertySymbols,M_e=Object.prototype.hasOwnProperty,E_e=Object.prototype.propertyIsEnumerable,nz=(t,e,n)=>e in t?w_e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Oy=(t,e)=>{for(var n in e||(e={}))M_e.call(e,n)&&nz(t,n,e[n]);if(tz)for(var n of tz(e))E_e.call(e,n)&&nz(t,n,e[n]);return t},P_e=(t,e)=>S_e(t,b_e(e));function C_e(t,e){return e==="default"||e==="contained"?t.fn.hover({backgroundColor:t.colorScheme==="dark"?t.colors.dark[6]:t.colors.gray[0]}):{}}var T_e=ft((t,{transitionDuration:e,chevronPosition:n,chevronSize:r},{variant:i})=>({icon:{display:"flex",alignItems:"center",justifyContent:"center",marginRight:n==="left"?0:t.spacing.sm,marginLeft:n==="left"?t.spacing.lg:0},chevron:{display:"flex",alignItems:"center",justifyContent:"center",transition:`transform ${e}ms ease`,marginRight:n==="right"?0:t.spacing.sm,marginLeft:n==="right"?t.spacing.lg:0,width:X(r),minWidth:X(r),"&[data-rotate]":{transform:"rotate(180deg)"}},label:{color:"inherit",fontWeight:400,flex:1,overflow:"hidden",textOverflow:"ellipsis",paddingTop:t.spacing.md,paddingBottom:t.spacing.md},itemTitle:{margin:0,padding:0},control:P_e(Oy(Oy(Oy({},t.fn.focusStyles()),t.fn.fontStyles()),C_e(t,i)),{width:"100%",display:"flex",alignItems:"center",flexDirection:n==="right"?"row-reverse":"row",paddingRight:t.spacing.md,paddingLeft:n==="right"?`calc(${t.spacing.md} + ${X(4)})`:t.spacing.xs,textAlign:"left",color:t.colorScheme==="dark"?t.colors.dark[0]:t.black,"&:disabled":Oy({opacity:.4,cursor:"not-allowed"},t.fn.hover({backgroundColor:"transparent"}))})}));const O_e=T_e;var R_e=Object.defineProperty,A_e=Object.defineProperties,D_e=Object.getOwnPropertyDescriptors,rz=Object.getOwnPropertySymbols,I_e=Object.prototype.hasOwnProperty,L_e=Object.prototype.propertyIsEnumerable,iz=(t,e,n)=>e in t?R_e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,oz=(t,e)=>{for(var n in e||(e={}))I_e.call(e,n)&&iz(t,n,e[n]);if(rz)for(var n of rz(e))L_e.call(e,n)&&iz(t,n,e[n]);return t},k_e=(t,e)=>A_e(t,D_e(e)),N_e=ft(t=>({root:k_e(oz(oz({},t.fn.focusStyles()),t.fn.fontStyles()),{cursor:"pointer",border:0,padding:0,appearance:"none",fontSize:t.fontSizes.md,backgroundColor:"transparent",textAlign:"left",color:t.colorScheme==="dark"?t.colors.dark[0]:t.black,textDecoration:"none",boxSizing:"border-box"})}));const F_e=N_e;var z_e=Object.defineProperty,Fx=Object.getOwnPropertySymbols,SW=Object.prototype.hasOwnProperty,bW=Object.prototype.propertyIsEnumerable,sz=(t,e,n)=>e in t?z_e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,U_e=(t,e)=>{for(var n in e||(e={}))SW.call(e,n)&&sz(t,n,e[n]);if(Fx)for(var n of Fx(e))bW.call(e,n)&&sz(t,n,e[n]);return t},B_e=(t,e)=>{var n={};for(var r in t)SW.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Fx)for(var r of Fx(t))e.indexOf(r)<0&&bW.call(t,r)&&(n[r]=t[r]);return n};const MW=M.forwardRef((t,e)=>{const n=nt("UnstyledButton",{},t),{className:r,component:i="button",unstyled:o,variant:s}=n,a=B_e(n,["className","component","unstyled","variant"]),{classes:l,cx:c}=F_e(null,{name:"UnstyledButton",unstyled:o,variant:s});return H.createElement(Xe,U_e({component:i,ref:e,className:c(l.root,r),type:i==="button"?"button":void 0},a))});MW.displayName="@mantine/core/UnstyledButton";const Fs=MW;var H_e=Object.defineProperty,V_e=Object.defineProperties,j_e=Object.getOwnPropertyDescriptors,zx=Object.getOwnPropertySymbols,EW=Object.prototype.hasOwnProperty,PW=Object.prototype.propertyIsEnumerable,az=(t,e,n)=>e in t?H_e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$_e=(t,e)=>{for(var n in e||(e={}))EW.call(e,n)&&az(t,n,e[n]);if(zx)for(var n of zx(e))PW.call(e,n)&&az(t,n,e[n]);return t},G_e=(t,e)=>V_e(t,j_e(e)),W_e=(t,e)=>{var n={};for(var r in t)EW.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&zx)for(var r of zx(t))e.indexOf(r)<0&&PW.call(t,r)&&(n[r]=t[r]);return n};const Y_e={},CW=M.forwardRef((t,e)=>{const n=nt("AccordionControl",Y_e,t),{disabled:r,onKeyDown:i,onClick:o,chevron:s,children:a,className:l,icon:c}=n,u=W_e(n,["disabled","onKeyDown","onClick","chevron","children","className","icon"]),d=Lx(),{value:f}=mW(),{classes:h,cx:g}=O_e({transitionDuration:d.transitionDuration,chevronPosition:d.chevronPosition,chevronSize:d.chevronSize,radius:d.radius},{name:"Accordion",classNames:d.classNames,styles:d.styles,unstyled:d.unstyled,variant:d.variant}),y=d.isItemActive(f),_=typeof d.order=="number",v=`h${d.order}`,x=H.createElement(Fs,G_e($_e({},u),{ref:e,"data-accordion-control":!0,disabled:r,className:g(h.control,l),onClick:w=>{o?.(w),d.onChange(f)},type:"button","data-active":y||void 0,"aria-expanded":y,"aria-controls":d.getRegionId(f),id:d.getControlId(f),unstyled:d.unstyled,onKeyDown:QR({siblingSelector:"[data-accordion-control]",parentSelector:"[data-accordion]",activateOnFocus:!1,loop:d.loop,orientation:"vertical",onKeyDown:i})}),H.createElement("span",{className:h.chevron,"data-rotate":!d.disableChevronRotation&&y||void 0},s||d.chevron),H.createElement("span",{className:h.label},a),c&&H.createElement("span",{className:h.icon},c));return _?H.createElement(v,{className:h.itemTitle},x):x});CW.displayName="@mantine/core/AccordionControl";var X_e=Object.defineProperty,Z_e=Object.defineProperties,q_e=Object.getOwnPropertyDescriptors,lz=Object.getOwnPropertySymbols,K_e=Object.prototype.hasOwnProperty,Q_e=Object.prototype.propertyIsEnumerable,cz=(t,e,n)=>e in t?X_e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,J_e=(t,e)=>{for(var n in e||(e={}))K_e.call(e,n)&&cz(t,n,e[n]);if(lz)for(var n of lz(e))Q_e.call(e,n)&&cz(t,n,e[n]);return t},exe=(t,e)=>Z_e(t,q_e(e)),txe=ft((t,e)=>({panel:exe(J_e({},t.fn.fontStyles()),{wordBreak:"break-word",lineHeight:t.lineHeight}),content:{padding:t.spacing.md,paddingTop:`calc(${t.spacing.xs} / 2)`}}));const nxe=txe;var rxe=Object.defineProperty,ixe=Object.defineProperties,oxe=Object.getOwnPropertyDescriptors,Ux=Object.getOwnPropertySymbols,TW=Object.prototype.hasOwnProperty,OW=Object.prototype.propertyIsEnumerable,uz=(t,e,n)=>e in t?rxe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,au=(t,e)=>{for(var n in e||(e={}))TW.call(e,n)&&uz(t,n,e[n]);if(Ux)for(var n of Ux(e))OW.call(e,n)&&uz(t,n,e[n]);return t},EP=(t,e)=>ixe(t,oxe(e)),sxe=(t,e)=>{var n={};for(var r in t)TW.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Ux)for(var r of Ux(t))e.indexOf(r)<0&&OW.call(t,r)&&(n[r]=t[r]);return n};function axe(t){if(!t||typeof t=="string")return 0;const e=t/36;return Math.round((4+15*e**.25+e/5)*10)}function PP(t){return t?.current?t.current.scrollHeight:"auto"}const Ry=typeof window<"u"&&window.requestAnimationFrame;function lxe({transitionDuration:t,transitionTimingFunction:e="ease",onTransitionEnd:n=()=>{},opened:r}){const i=M.useRef(null),o=0,s={display:"none",height:0,overflow:"hidden"},[a,l]=M.useState(r?{}:s),c=g=>{bg.flushSync(()=>l(g))},u=g=>{c(y=>au(au({},y),g))};function d(g){return{transition:`height ${t||axe(g)}ms ${e}`}}Qr(()=>{Ry(r?()=>{u({willChange:"height",display:"block",overflow:"hidden"}),Ry(()=>{const g=PP(i);u(EP(au({},d(g)),{height:g}))})}:()=>{const g=PP(i);u(EP(au({},d(g)),{willChange:"height",height:g})),Ry(()=>u({height:o,overflow:"hidden"}))})},[r]);const f=g=>{if(!(g.target!==i.current||g.propertyName!=="height"))if(r){const y=PP(i);y===a.height?c({}):u({height:y}),n()}else a.height===o&&(c(s),n())};function h(g={}){var y=g,{style:_={},refKey:v="ref"}=y,x=sxe(y,["style","refKey"]);const w=x[v];return EP(au({"aria-hidden":!r},x),{[v]:dW(i,w),onTransitionEnd:f,style:au(au({boxSizing:"border-box"},_),a)})}return h}var cxe=Object.defineProperty,Bx=Object.getOwnPropertySymbols,RW=Object.prototype.hasOwnProperty,AW=Object.prototype.propertyIsEnumerable,dz=(t,e,n)=>e in t?cxe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ay=(t,e)=>{for(var n in e||(e={}))RW.call(e,n)&&dz(t,n,e[n]);if(Bx)for(var n of Bx(e))AW.call(e,n)&&dz(t,n,e[n]);return t},uxe=(t,e)=>{var n={};for(var r in t)RW.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Bx)for(var r of Bx(t))e.indexOf(r)<0&&AW.call(t,r)&&(n[r]=t[r]);return n};const dxe={transitionDuration:200,transitionTimingFunction:"ease",animateOpacity:!0},ud=M.forwardRef((t,e)=>{const n=nt("Collapse",dxe,t),{children:r,in:i,transitionDuration:o,transitionTimingFunction:s,style:a,onTransitionEnd:l,animateOpacity:c}=n,u=uxe(n,["children","in","transitionDuration","transitionTimingFunction","style","onTransitionEnd","animateOpacity"]),d=Ir(),f=ob(),g=(d.respectReducedMotion?f:!1)?0:o,{systemStyles:y,rest:_}=Sl(u),v=lxe({opened:i,transitionDuration:g,transitionTimingFunction:s,onTransitionEnd:l});return g===0?i?H.createElement(Xe,Ay({},_),r):null:H.createElement(Xe,Ay({},v(Ay(Ay({style:a,ref:e},_),y))),H.createElement("div",{style:{opacity:i||!c?1:0,transition:c?`opacity ${g}ms ${s}`:"none"}},r))});ud.displayName="@mantine/core/Collapse";var fxe=Object.defineProperty,hxe=Object.defineProperties,pxe=Object.getOwnPropertyDescriptors,Hx=Object.getOwnPropertySymbols,DW=Object.prototype.hasOwnProperty,IW=Object.prototype.propertyIsEnumerable,fz=(t,e,n)=>e in t?fxe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,mxe=(t,e)=>{for(var n in e||(e={}))DW.call(e,n)&&fz(t,n,e[n]);if(Hx)for(var n of Hx(e))IW.call(e,n)&&fz(t,n,e[n]);return t},gxe=(t,e)=>hxe(t,pxe(e)),vxe=(t,e)=>{var n={};for(var r in t)DW.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Hx)for(var r of Hx(t))e.indexOf(r)<0&&IW.call(t,r)&&(n[r]=t[r]);return n};const yxe={};function LW(t){const e=nt("AccordionPanel",yxe,t),{children:n,className:r}=e,i=vxe(e,["children","className"]),o=Lx(),{value:s}=mW(),{classNames:a,styles:l,unstyled:c}=Lx(),{classes:u,cx:d}=nxe({radius:o.radius},{name:"Accordion",classNames:a,styles:l,unstyled:c,variant:o.variant});return H.createElement(ud,gxe(mxe({},i),{className:d(u.panel,r),in:o.isItemActive(s),transitionDuration:o.transitionDuration,role:"region",id:o.getRegionId(s),"aria-labelledby":o.getControlId(s)}),H.createElement("div",{className:u.content},n))}LW.displayName="@mantine/core/AccordionPanel";var _xe=Object.defineProperty,hz=Object.getOwnPropertySymbols,xxe=Object.prototype.hasOwnProperty,wxe=Object.prototype.propertyIsEnumerable,pz=(t,e,n)=>e in t?_xe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Sxe=(t,e)=>{for(var n in e||(e={}))xxe.call(e,n)&&pz(t,n,e[n]);if(hz)for(var n of hz(e))wxe.call(e,n)&&pz(t,n,e[n]);return t};function kW(t){return H.createElement("svg",Sxe({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem"},t),H.createElement("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}var bxe=Object.defineProperty,Mxe=Object.defineProperties,Exe=Object.getOwnPropertyDescriptors,Vx=Object.getOwnPropertySymbols,NW=Object.prototype.hasOwnProperty,FW=Object.prototype.propertyIsEnumerable,mz=(t,e,n)=>e in t?bxe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Pxe=(t,e)=>{for(var n in e||(e={}))NW.call(e,n)&&mz(t,n,e[n]);if(Vx)for(var n of Vx(e))FW.call(e,n)&&mz(t,n,e[n]);return t},Cxe=(t,e)=>Mxe(t,Exe(e)),Txe=(t,e)=>{var n={};for(var r in t)NW.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Vx)for(var r of Vx(t))e.indexOf(r)<0&&FW.call(t,r)&&(n[r]=t[r]);return n};const Oxe={multiple:!1,disableChevronRotation:!1,transitionDuration:200,chevronPosition:"right",variant:"default",chevronSize:24,chevron:H.createElement(kW,null)};function tc(t){const e=nt("Accordion",Oxe,t),{id:n,loop:r,children:i,multiple:o,value:s,defaultValue:a,onChange:l,transitionDuration:c,disableChevronRotation:u,chevronPosition:d,chevronSize:f,order:h,chevron:g,classNames:y,styles:_,unstyled:v,variant:x,radius:w}=e,S=Txe(e,["id","loop","children","multiple","value","defaultValue","onChange","transitionDuration","disableChevronRotation","chevronPosition","chevronSize","order","chevron","classNames","styles","unstyled","variant","radius"]);return H.createElement(Wye,{id:n,multiple:o,value:s,defaultValue:a,onChange:l,loop:r,transitionDuration:c,disableChevronRotation:u,chevronPosition:d,chevronSize:f,order:h,chevron:g,variant:x,radius:w,classNames:y,styles:_,unstyled:v},H.createElement(Xe,Cxe(Pxe({},S),{"data-accordion":!0}),i))}tc.Item=wW;tc.Control=CW;tc.Panel=LW;tc.displayName="@mantine/core/Accordion";var Rxe=Object.defineProperty,Axe=Object.defineProperties,Dxe=Object.getOwnPropertyDescriptors,gz=Object.getOwnPropertySymbols,Ixe=Object.prototype.hasOwnProperty,Lxe=Object.prototype.propertyIsEnumerable,vz=(t,e,n)=>e in t?Rxe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,yT=(t,e)=>{for(var n in e||(e={}))Ixe.call(e,n)&&vz(t,n,e[n]);if(gz)for(var n of gz(e))Lxe.call(e,n)&&vz(t,n,e[n]);return t},yz=(t,e)=>Axe(t,Dxe(e));const kxe=["subtle","filled","outline","light","default","transparent","gradient"],Dy={xs:X(18),sm:X(22),md:X(28),lg:X(34),xl:X(44)};function Nxe({variant:t,theme:e,color:n,gradient:r}){const i=e.fn.variant({color:n,variant:t,gradient:r});return t==="gradient"?{border:0,backgroundImage:i.background,color:i.color,"&:hover":e.fn.hover({backgroundSize:"200%"})}:kxe.includes(t)?yT({border:`${X(1)} solid ${i.border}`,backgroundColor:i.background,color:i.color},e.fn.hover({backgroundColor:i.hover})):null}var Fxe=ft((t,{radius:e,color:n,gradient:r},{variant:i,size:o})=>({root:yz(yT({position:"relative",borderRadius:t.fn.radius(e),padding:0,lineHeight:1,display:"flex",alignItems:"center",justifyContent:"center",height:Oe({size:o,sizes:Dy}),minHeight:Oe({size:o,sizes:Dy}),width:Oe({size:o,sizes:Dy}),minWidth:Oe({size:o,sizes:Dy})},Nxe({variant:i,theme:t,color:n,gradient:r})),{"&:active":t.activeStyles,"& [data-action-icon-loader]":{maxWidth:"70%"},"&:disabled, &[data-disabled]":{color:t.colors.gray[t.colorScheme==="dark"?6:4],cursor:"not-allowed",backgroundColor:i==="transparent"?void 0:t.fn.themeColor("gray",t.colorScheme==="dark"?8:1),borderColor:i==="transparent"?void 0:t.fn.themeColor("gray",t.colorScheme==="dark"?8:1),backgroundImage:"none",pointerEvents:"none","&:active":{transform:"none"}},"&[data-loading]":{pointerEvents:"none","&::before":yz(yT({content:'""'},t.fn.cover(X(-1))),{backgroundColor:t.colorScheme==="dark"?t.fn.rgba(t.colors.dark[7],.5):"rgba(255, 255, 255, .5)",borderRadius:t.fn.radius(e),cursor:"not-allowed"})}})}));const zxe=Fxe;var Uxe=Object.defineProperty,jx=Object.getOwnPropertySymbols,zW=Object.prototype.hasOwnProperty,UW=Object.prototype.propertyIsEnumerable,_z=(t,e,n)=>e in t?Uxe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Bxe=(t,e)=>{for(var n in e||(e={}))zW.call(e,n)&&_z(t,n,e[n]);if(jx)for(var n of jx(e))UW.call(e,n)&&_z(t,n,e[n]);return t},Hxe=(t,e)=>{var n={};for(var r in t)zW.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&jx)for(var r of jx(t))e.indexOf(r)<0&&UW.call(t,r)&&(n[r]=t[r]);return n};function Vxe(t){var e=t,{size:n,color:r}=e,i=Hxe(e,["size","color"]);return H.createElement("svg",Bxe({viewBox:"0 0 135 140",xmlns:"http://www.w3.org/2000/svg",fill:r,width:n},i),H.createElement("rect",{y:"10",width:"15",height:"120",rx:"6"},H.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),H.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),H.createElement("rect",{x:"30",y:"10",width:"15",height:"120",rx:"6"},H.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),H.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),H.createElement("rect",{x:"60",width:"15",height:"140",rx:"6"},H.createElement("animate",{attributeName:"height",begin:"0s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),H.createElement("animate",{attributeName:"y",begin:"0s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),H.createElement("rect",{x:"90",y:"10",width:"15",height:"120",rx:"6"},H.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),H.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),H.createElement("rect",{x:"120",y:"10",width:"15",height:"120",rx:"6"},H.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),H.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})))}var jxe=Object.defineProperty,$x=Object.getOwnPropertySymbols,BW=Object.prototype.hasOwnProperty,HW=Object.prototype.propertyIsEnumerable,xz=(t,e,n)=>e in t?jxe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$xe=(t,e)=>{for(var n in e||(e={}))BW.call(e,n)&&xz(t,n,e[n]);if($x)for(var n of $x(e))HW.call(e,n)&&xz(t,n,e[n]);return t},Gxe=(t,e)=>{var n={};for(var r in t)BW.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&$x)for(var r of $x(t))e.indexOf(r)<0&&HW.call(t,r)&&(n[r]=t[r]);return n};function Wxe(t){var e=t,{size:n,color:r}=e,i=Gxe(e,["size","color"]);return H.createElement("svg",$xe({width:n,height:n,viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg",stroke:r},i),H.createElement("g",{fill:"none",fillRule:"evenodd"},H.createElement("g",{transform:"translate(2.5 2.5)",strokeWidth:"5"},H.createElement("circle",{strokeOpacity:".5",cx:"16",cy:"16",r:"16"}),H.createElement("path",{d:"M32 16c0-9.94-8.06-16-16-16"},H.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 16 16",to:"360 16 16",dur:"1s",repeatCount:"indefinite"})))))}var Yxe=Object.defineProperty,Gx=Object.getOwnPropertySymbols,VW=Object.prototype.hasOwnProperty,jW=Object.prototype.propertyIsEnumerable,wz=(t,e,n)=>e in t?Yxe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Xxe=(t,e)=>{for(var n in e||(e={}))VW.call(e,n)&&wz(t,n,e[n]);if(Gx)for(var n of Gx(e))jW.call(e,n)&&wz(t,n,e[n]);return t},Zxe=(t,e)=>{var n={};for(var r in t)VW.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Gx)for(var r of Gx(t))e.indexOf(r)<0&&jW.call(t,r)&&(n[r]=t[r]);return n};function qxe(t){var e=t,{size:n,color:r}=e,i=Zxe(e,["size","color"]);return H.createElement("svg",Xxe({width:n,viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg",fill:r},i),H.createElement("circle",{cx:"15",cy:"15",r:"15"},H.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),H.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})),H.createElement("circle",{cx:"60",cy:"15",r:"9",fillOpacity:"0.3"},H.createElement("animate",{attributeName:"r",from:"9",to:"9",begin:"0s",dur:"0.8s",values:"9;15;9",calcMode:"linear",repeatCount:"indefinite"}),H.createElement("animate",{attributeName:"fill-opacity",from:"0.5",to:"0.5",begin:"0s",dur:"0.8s",values:".5;1;.5",calcMode:"linear",repeatCount:"indefinite"})),H.createElement("circle",{cx:"105",cy:"15",r:"15"},H.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),H.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})))}var Kxe=Object.defineProperty,Wx=Object.getOwnPropertySymbols,$W=Object.prototype.hasOwnProperty,GW=Object.prototype.propertyIsEnumerable,Sz=(t,e,n)=>e in t?Kxe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Qxe=(t,e)=>{for(var n in e||(e={}))$W.call(e,n)&&Sz(t,n,e[n]);if(Wx)for(var n of Wx(e))GW.call(e,n)&&Sz(t,n,e[n]);return t},Jxe=(t,e)=>{var n={};for(var r in t)$W.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Wx)for(var r of Wx(t))e.indexOf(r)<0&&GW.call(t,r)&&(n[r]=t[r]);return n};const CP={bars:Vxe,oval:Wxe,dots:qxe},ewe={xs:X(18),sm:X(22),md:X(36),lg:X(44),xl:X(58)},twe={size:"md"};function fA(t){const e=nt("Loader",twe,t),{size:n,color:r,variant:i}=e,o=Jxe(e,["size","color","variant"]),s=Ir(),a=i in CP?i:s.loader;return H.createElement(Xe,Qxe({role:"presentation",component:CP[a]||CP.bars,size:Oe({size:n,sizes:ewe}),color:s.fn.variant({variant:"filled",primaryFallback:!1,color:r||s.primaryColor}).background},o))}fA.displayName="@mantine/core/Loader";var nwe=Object.defineProperty,Yx=Object.getOwnPropertySymbols,WW=Object.prototype.hasOwnProperty,YW=Object.prototype.propertyIsEnumerable,bz=(t,e,n)=>e in t?nwe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Mz=(t,e)=>{for(var n in e||(e={}))WW.call(e,n)&&bz(t,n,e[n]);if(Yx)for(var n of Yx(e))YW.call(e,n)&&bz(t,n,e[n]);return t},rwe=(t,e)=>{var n={};for(var r in t)WW.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Yx)for(var r of Yx(t))e.indexOf(r)<0&&YW.call(t,r)&&(n[r]=t[r]);return n};const iwe={color:"gray",size:"md",variant:"subtle"},XW=M.forwardRef((t,e)=>{const n=nt("ActionIcon",iwe,t),{className:r,color:i,children:o,radius:s,size:a,variant:l,gradient:c,disabled:u,loaderProps:d,loading:f,unstyled:h,__staticSelector:g}=n,y=rwe(n,["className","color","children","radius","size","variant","gradient","disabled","loaderProps","loading","unstyled","__staticSelector"]),{classes:_,cx:v,theme:x}=zxe({radius:s,color:i,gradient:c},{name:["ActionIcon",g],unstyled:h,size:a,variant:l}),w=H.createElement(fA,Mz({color:x.fn.variant({color:i,variant:l}).color,size:"100%","data-action-icon-loader":!0},d));return H.createElement(Fs,Mz({className:v(_.root,r),ref:e,disabled:u,"data-disabled":u||void 0,"data-loading":f||void 0,unstyled:h},y),f?w:o)});XW.displayName="@mantine/core/ActionIcon";const An=XW;var owe=Object.defineProperty,swe=Object.defineProperties,awe=Object.getOwnPropertyDescriptors,Xx=Object.getOwnPropertySymbols,ZW=Object.prototype.hasOwnProperty,qW=Object.prototype.propertyIsEnumerable,Ez=(t,e,n)=>e in t?owe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,lwe=(t,e)=>{for(var n in e||(e={}))ZW.call(e,n)&&Ez(t,n,e[n]);if(Xx)for(var n of Xx(e))qW.call(e,n)&&Ez(t,n,e[n]);return t},cwe=(t,e)=>swe(t,awe(e)),uwe=(t,e)=>{var n={};for(var r in t)ZW.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Xx)for(var r of Xx(t))e.indexOf(r)<0&&qW.call(t,r)&&(n[r]=t[r]);return n};function KW(t){const e=nt("Portal",{},t),{children:n,target:r,className:i,innerRef:o}=e,s=uwe(e,["children","target","className","innerRef"]),a=Ir(),[l,c]=M.useState(!1),u=M.useRef();return ib(()=>(c(!0),u.current=r?typeof r=="string"?document.querySelector(r):r:document.createElement("div"),r||document.body.appendChild(u.current),()=>{!r&&document.body.removeChild(u.current)}),[r]),l?bg.createPortal(H.createElement("div",cwe(lwe({className:i,dir:a.dir},s),{ref:o}),n),u.current):null}KW.displayName="@mantine/core/Portal";var dwe=Object.defineProperty,Zx=Object.getOwnPropertySymbols,QW=Object.prototype.hasOwnProperty,JW=Object.prototype.propertyIsEnumerable,Pz=(t,e,n)=>e in t?dwe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,fwe=(t,e)=>{for(var n in e||(e={}))QW.call(e,n)&&Pz(t,n,e[n]);if(Zx)for(var n of Zx(e))JW.call(e,n)&&Pz(t,n,e[n]);return t},hwe=(t,e)=>{var n={};for(var r in t)QW.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Zx)for(var r of Zx(t))e.indexOf(r)<0&&JW.call(t,r)&&(n[r]=t[r]);return n};function Kg(t){var e=t,{withinPortal:n=!0,children:r}=e,i=hwe(e,["withinPortal","children"]);return n?H.createElement(KW,fwe({},i),r):H.createElement(H.Fragment,null,r)}Kg.displayName="@mantine/core/OptionalPortal";var pwe=Object.defineProperty,mwe=Object.defineProperties,gwe=Object.getOwnPropertyDescriptors,Cz=Object.getOwnPropertySymbols,vwe=Object.prototype.hasOwnProperty,ywe=Object.prototype.propertyIsEnumerable,Tz=(t,e,n)=>e in t?pwe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,TP=(t,e)=>{for(var n in e||(e={}))vwe.call(e,n)&&Tz(t,n,e[n]);if(Cz)for(var n of Cz(e))ywe.call(e,n)&&Tz(t,n,e[n]);return t},Oz=(t,e)=>mwe(t,gwe(e));function _we({variant:t,color:e,theme:n}){if(t==="filled")return{backgroundColor:n.fn.variant({variant:"filled",color:e}).background,color:n.white};if(t==="outline"){const r=n.fn.variant({variant:"outline",color:e});return{color:r.color,borderColor:r.border,backgroundColor:n.colorScheme==="dark"?n.colors.dark[6]:n.white}}if(t==="light"){const r=n.fn.variant({variant:"light",color:e});return{backgroundColor:r.background,color:r.color}}return null}var xwe=ft((t,{radius:e,color:n},{variant:r})=>({root:TP(Oz(TP({},t.fn.fontStyles()),{position:"relative",overflow:"hidden",paddingTop:t.spacing.sm,paddingBottom:t.spacing.sm,paddingLeft:t.spacing.md,paddingRight:t.spacing.sm,borderRadius:t.fn.radius(e),border:`${X(1)} solid transparent`}),_we({variant:r,color:n,theme:t})),wrapper:{display:"flex"},body:{flex:1},title:{boxSizing:"border-box",margin:0,marginBottom:t.spacing.xs,display:"flex",alignItems:"center",justifyContent:"space-between",lineHeight:t.lineHeight,fontSize:t.fontSizes.sm,fontWeight:700,"&[data-with-close-button]":{paddingRight:t.spacing.md}},label:{display:"block",overflow:"hidden",textOverflow:"ellipsis"},icon:{lineHeight:1,width:X(20),height:X(20),display:"flex",alignItems:"center",justifyContent:"flex-start",marginRight:t.spacing.md,marginTop:1},message:Oz(TP({},t.fn.fontStyles()),{lineHeight:t.lineHeight,textOverflow:"ellipsis",overflow:"hidden",fontSize:t.fontSizes.sm,color:r==="filled"?t.white:t.colorScheme==="dark"?r==="light"?t.white:t.colors.dark[0]:t.black}),closeButton:{width:X(10),height:X(10)}}));const wwe=xwe;var Swe=Object.defineProperty,Rz=Object.getOwnPropertySymbols,bwe=Object.prototype.hasOwnProperty,Mwe=Object.prototype.propertyIsEnumerable,Az=(t,e,n)=>e in t?Swe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ewe=(t,e)=>{for(var n in e||(e={}))bwe.call(e,n)&&Az(t,n,e[n]);if(Rz)for(var n of Rz(e))Mwe.call(e,n)&&Az(t,n,e[n]);return t};function e7(t){return H.createElement("svg",Ewe({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),H.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}e7.displayName="@mantine/core/CloseIcon";var Pwe=Object.defineProperty,qx=Object.getOwnPropertySymbols,t7=Object.prototype.hasOwnProperty,n7=Object.prototype.propertyIsEnumerable,Dz=(t,e,n)=>e in t?Pwe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Cwe=(t,e)=>{for(var n in e||(e={}))t7.call(e,n)&&Dz(t,n,e[n]);if(qx)for(var n of qx(e))n7.call(e,n)&&Dz(t,n,e[n]);return t},Twe=(t,e)=>{var n={};for(var r in t)t7.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&qx)for(var r of qx(t))e.indexOf(r)<0&&n7.call(t,r)&&(n[r]=t[r]);return n};const Owe={xs:X(12),sm:X(16),md:X(20),lg:X(28),xl:X(34)},Rwe={size:"sm"},r7=M.forwardRef((t,e)=>{const n=nt("CloseButton",Rwe,t),{iconSize:r,size:i,children:o}=n,s=Twe(n,["iconSize","size","children"]),a=X(r||Owe[i]);return H.createElement(An,Cwe({ref:e,__staticSelector:"CloseButton",size:i},s),o||H.createElement(e7,{width:a,height:a}))});r7.displayName="@mantine/core/CloseButton";const Qg=r7;var Awe=Object.defineProperty,Kx=Object.getOwnPropertySymbols,i7=Object.prototype.hasOwnProperty,o7=Object.prototype.propertyIsEnumerable,Iz=(t,e,n)=>e in t?Awe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Dwe=(t,e)=>{for(var n in e||(e={}))i7.call(e,n)&&Iz(t,n,e[n]);if(Kx)for(var n of Kx(e))o7.call(e,n)&&Iz(t,n,e[n]);return t},Iwe=(t,e)=>{var n={};for(var r in t)i7.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Kx)for(var r of Kx(t))e.indexOf(r)<0&&o7.call(t,r)&&(n[r]=t[r]);return n};const Lwe={variant:"light"},s7=M.forwardRef((t,e)=>{const n=nt("Alert",Lwe,t),{id:r,className:i,title:o,variant:s,children:a,color:l,classNames:c,icon:u,styles:d,onClose:f,radius:h,withCloseButton:g,closeButtonLabel:y,unstyled:_}=n,v=Iwe(n,["id","className","title","variant","children","color","classNames","icon","styles","onClose","radius","withCloseButton","closeButtonLabel","unstyled"]),{classes:x,cx:w}=wwe({color:l,radius:h},{classNames:c,styles:d,unstyled:_,variant:s,name:"Alert"}),S=zo(r),E=o&&`${S}-title`,C=`${S}-body`;return H.createElement(Xe,Dwe({id:S,role:"alert","aria-labelledby":E,"aria-describedby":C,className:w(x.root,x[s],i),ref:e},v),H.createElement("div",{className:x.wrapper},u&&H.createElement("div",{className:x.icon},u),H.createElement("div",{className:x.body},o&&H.createElement("div",{className:x.title,"data-with-close-button":g||void 0},H.createElement("span",{id:E,className:x.label},o)),H.createElement("div",{id:C,className:x.message},a)),g&&H.createElement(Qg,{className:x.closeButton,onClick:f,variant:"transparent",size:16,iconSize:16,"aria-label":y})))});s7.displayName="@mantine/core/Alert";var kwe=Object.defineProperty,Nwe=Object.defineProperties,Fwe=Object.getOwnPropertyDescriptors,Lz=Object.getOwnPropertySymbols,zwe=Object.prototype.hasOwnProperty,Uwe=Object.prototype.propertyIsEnumerable,kz=(t,e,n)=>e in t?kwe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Iy=(t,e)=>{for(var n in e||(e={}))zwe.call(e,n)&&kz(t,n,e[n]);if(Lz)for(var n of Lz(e))Uwe.call(e,n)&&kz(t,n,e[n]);return t},Bwe=(t,e)=>Nwe(t,Fwe(e));function Hwe({underline:t,strikethrough:e}){const n=[];return t&&n.push("underline"),e&&n.push("line-through"),n.length>0?n.join(" "):"none"}function Vwe({theme:t,color:e}){return e==="dimmed"?t.fn.dimmed():typeof e=="string"&&(e in t.colors||e.split(".")[0]in t.colors)?t.fn.variant({variant:"filled",color:e}).background:e||"inherit"}function jwe(t){return typeof t=="number"?{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:t,WebkitBoxOrient:"vertical"}:null}function $we({theme:t,truncate:e}){return e==="start"?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",direction:t.dir==="ltr"?"rtl":"ltr",textAlign:t.dir==="ltr"?"right":"left"}:e?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}:null}var Gwe=ft((t,{color:e,lineClamp:n,truncate:r,inline:i,inherit:o,underline:s,gradient:a,weight:l,transform:c,align:u,strikethrough:d,italic:f},{size:h})=>{const g=t.fn.variant({variant:"gradient",gradient:a});return{root:Bwe(Iy(Iy(Iy(Iy({},t.fn.fontStyles()),t.fn.focusStyles()),jwe(n)),$we({theme:t,truncate:r})),{color:Vwe({color:e,theme:t}),fontFamily:o?"inherit":t.fontFamily,fontSize:o||h===void 0?"inherit":Oe({size:h,sizes:t.fontSizes}),lineHeight:o?"inherit":i?1:t.lineHeight,textDecoration:Hwe({underline:s,strikethrough:d}),WebkitTapHighlightColor:"transparent",fontWeight:o?"inherit":l,textTransform:c,textAlign:u,fontStyle:f?"italic":void 0}),gradient:{backgroundImage:g.background,WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"}}});const Wwe=Gwe;var Ywe=Object.defineProperty,Qx=Object.getOwnPropertySymbols,a7=Object.prototype.hasOwnProperty,l7=Object.prototype.propertyIsEnumerable,Nz=(t,e,n)=>e in t?Ywe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Xwe=(t,e)=>{for(var n in e||(e={}))a7.call(e,n)&&Nz(t,n,e[n]);if(Qx)for(var n of Qx(e))l7.call(e,n)&&Nz(t,n,e[n]);return t},Zwe=(t,e)=>{var n={};for(var r in t)a7.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Qx)for(var r of Qx(t))e.indexOf(r)<0&&l7.call(t,r)&&(n[r]=t[r]);return n};const qwe={variant:"text"},c7=M.forwardRef((t,e)=>{const n=nt("Text",qwe,t),{className:r,size:i,weight:o,transform:s,color:a,align:l,variant:c,lineClamp:u,truncate:d,gradient:f,inline:h,inherit:g,underline:y,strikethrough:_,italic:v,classNames:x,styles:w,unstyled:S,span:E,__staticSelector:C}=n,O=Zwe(n,["className","size","weight","transform","color","align","variant","lineClamp","truncate","gradient","inline","inherit","underline","strikethrough","italic","classNames","styles","unstyled","span","__staticSelector"]),{classes:R,cx:T}=Wwe({color:a,lineClamp:u,truncate:d,inline:h,inherit:g,underline:y,strikethrough:_,italic:v,weight:o,transform:s,align:l,gradient:f},{unstyled:S,name:C||"Text",variant:c,size:i});return H.createElement(Xe,Xwe({ref:e,className:T(R.root,{[R.gradient]:c==="gradient"},r),component:E?"span":"div"},O))});c7.displayName="@mantine/core/Text";const Si=c7,u7=M.createContext({zIndex:1e3,fixed:!1,layout:"default"});u7.Provider;function d7(){return M.useContext(u7)}function sb(t,e){if(!t)return[];const n=Object.keys(t).filter(r=>r!=="base").map(r=>[Oe({size:r,sizes:e.breakpoints,units:"em"}),t[r]]);return n.sort((r,i)=>js(r[0])-js(i[0])),n}var Kwe=Object.defineProperty,Qwe=Object.defineProperties,Jwe=Object.getOwnPropertyDescriptors,Fz=Object.getOwnPropertySymbols,e1e=Object.prototype.hasOwnProperty,t1e=Object.prototype.propertyIsEnumerable,zz=(t,e,n)=>e in t?Kwe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ly=(t,e)=>{for(var n in e||(e={}))e1e.call(e,n)&&zz(t,n,e[n]);if(Fz)for(var n of Fz(e))t1e.call(e,n)&&zz(t,n,e[n]);return t},Uz=(t,e)=>Qwe(t,Jwe(e)),n1e=ft((t,{height:e,width:n,fixed:r,position:i,hiddenBreakpoint:o,zIndex:s,section:a,withBorder:l,layout:c})=>{const u=typeof n=="object"&&n!==null?sb(n,t).reduce((f,[h,g])=>(f[`@media (min-width: ${ls(h)})`]={width:X(g),minWidth:X(g)},f),{}):null,d=l?{[a==="navbar"?"borderRight":"borderLeft"]:`${X(1)} solid ${t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[2]}`}:{};return{root:Uz(Ly(Ly(Uz(Ly(Ly({},t.fn.fontStyles()),i),{top:c==="alt"?0:i?.top||"var(--mantine-header-height)",bottom:0,zIndex:s,height:e?X(e):c==="alt"?"auto":"calc(100vh - var(--mantine-header-height, 0rem) - var(--mantine-footer-height, 0rem))",width:n?.base?X(n?.base):"100%",position:r?"fixed":"static",boxSizing:"border-box",display:"flex",flexDirection:"column",backgroundColor:t.colorScheme==="dark"?t.colors.dark[7]:t.white}),d),u),{"&[data-hidden]":{[`@media (max-width: ${ls(js(Oe({size:o,sizes:t.breakpoints}))-1)})`]:{display:"none"}}})}});const r1e=n1e;var i1e=Object.defineProperty,Jx=Object.getOwnPropertySymbols,f7=Object.prototype.hasOwnProperty,h7=Object.prototype.propertyIsEnumerable,Bz=(t,e,n)=>e in t?i1e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Hz=(t,e)=>{for(var n in e||(e={}))f7.call(e,n)&&Bz(t,n,e[n]);if(Jx)for(var n of Jx(e))h7.call(e,n)&&Bz(t,n,e[n]);return t},o1e=(t,e)=>{var n={};for(var r in t)f7.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Jx)for(var r of Jx(t))e.indexOf(r)<0&&h7.call(t,r)&&(n[r]=t[r]);return n};const p7=M.forwardRef((t,e)=>{var n=t,{width:r,height:i,fixed:o=!1,position:s,zIndex:a,hiddenBreakpoint:l="md",hidden:c=!1,withBorder:u=!0,className:d,classNames:f,styles:h,children:g,section:y,__staticSelector:_,unstyled:v,variant:x}=n,w=o1e(n,["width","height","fixed","position","zIndex","hiddenBreakpoint","hidden","withBorder","className","classNames","styles","children","section","__staticSelector","unstyled","variant"]);const S=d7(),{classes:E,cx:C,theme:O}=r1e({width:r,height:i,fixed:S.fixed||o,position:s,hiddenBreakpoint:l,zIndex:a||S.zIndex||Ys("app"),section:y,withBorder:u,layout:S.layout},{classNames:f,styles:h,name:_,unstyled:v,variant:x}),R=sb(r,O).reduce((T,[A,F])=>(T[`@media (min-width: ${ls(A)})`]={[`--mantine-${y}-width`]:X(F)},T),{});return H.createElement(Xe,Hz({component:y==="navbar"?"nav":"aside",ref:e,"data-hidden":c||void 0,className:C(E.root,d)},w),g,H.createElement(iW,{styles:()=>({":root":Hz({[`--mantine-${y}-width`]:r?.base?X(r.base):"0rem"},R)})}))});p7.displayName="@mantine/core/HorizontalSection";var s1e=Object.defineProperty,ew=Object.getOwnPropertySymbols,m7=Object.prototype.hasOwnProperty,g7=Object.prototype.propertyIsEnumerable,Vz=(t,e,n)=>e in t?s1e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,a1e=(t,e)=>{for(var n in e||(e={}))m7.call(e,n)&&Vz(t,n,e[n]);if(ew)for(var n of ew(e))g7.call(e,n)&&Vz(t,n,e[n]);return t},l1e=(t,e)=>{var n={};for(var r in t)m7.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&ew)for(var r of ew(t))e.indexOf(r)<0&&g7.call(t,r)&&(n[r]=t[r]);return n};const v7=M.forwardRef((t,e)=>{var n=t,{children:r,grow:i=!1,sx:o}=n,s=l1e(n,["children","grow","sx"]);return H.createElement(Xe,a1e({ref:e,sx:[{flex:i?1:0,boxSizing:"border-box"},...Ch(o)]},s),r)});v7.displayName="@mantine/core/Section";const c1e=v7;var u1e=Object.defineProperty,d1e=Object.defineProperties,f1e=Object.getOwnPropertyDescriptors,jz=Object.getOwnPropertySymbols,h1e=Object.prototype.hasOwnProperty,p1e=Object.prototype.propertyIsEnumerable,$z=(t,e,n)=>e in t?u1e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,OP=(t,e)=>{for(var n in e||(e={}))h1e.call(e,n)&&$z(t,n,e[n]);if(jz)for(var n of jz(e))p1e.call(e,n)&&$z(t,n,e[n]);return t},Gz=(t,e)=>d1e(t,f1e(e)),m1e=ft((t,{height:e,fixed:n,position:r,zIndex:i,borderPosition:o,layout:s})=>{const a=typeof e=="object"&&e!==null?sb(e,t).reduce((l,[c,u])=>(l[`@media (min-width: ${ls(c)})`]={height:X(u),minHeight:X(u)},l),{}):null;return{root:Gz(OP(Gz(OP(OP({},t.fn.fontStyles()),r),{zIndex:i,left:s==="alt"?"var(--mantine-navbar-width, 0)":0,right:s==="alt"?"var(--mantine-aside-width, 0)":0,height:typeof e=="object"?X(e?.base)||"100%":X(e),maxHeight:typeof e=="object"?X(e?.base)||"100%":X(e),position:n?"fixed":"static",boxSizing:"border-box",backgroundColor:t.colorScheme==="dark"?t.colors.dark[7]:t.white}),a),{borderBottom:o==="bottom"?`${X(1)} solid ${t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[2]}`:void 0,borderTop:o==="top"?`${X(1)} solid ${t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[2]}`:void 0})}});const g1e=m1e;var v1e=Object.defineProperty,tw=Object.getOwnPropertySymbols,y7=Object.prototype.hasOwnProperty,_7=Object.prototype.propertyIsEnumerable,Wz=(t,e,n)=>e in t?v1e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Yz=(t,e)=>{for(var n in e||(e={}))y7.call(e,n)&&Wz(t,n,e[n]);if(tw)for(var n of tw(e))_7.call(e,n)&&Wz(t,n,e[n]);return t},y1e=(t,e)=>{var n={};for(var r in t)y7.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&tw)for(var r of tw(t))e.indexOf(r)<0&&_7.call(t,r)&&(n[r]=t[r]);return n};const x7=M.forwardRef((t,e)=>{var n=t,{children:r,className:i,classNames:o,styles:s,height:a,fixed:l=!1,withBorder:c=!0,position:u,zIndex:d,section:f,unstyled:h,__staticSelector:g,variant:y}=n,_=y1e(n,["children","className","classNames","styles","height","fixed","withBorder","position","zIndex","section","unstyled","__staticSelector","variant"]);const v=d7(),x=d||v.zIndex||Ys("app"),{classes:w,cx:S,theme:E}=g1e({height:a,fixed:v.fixed||l,position:u,zIndex:typeof x=="number"&&v.layout==="default"?x+1:x,layout:v.layout,borderPosition:c?f==="header"?"bottom":"top":"none"},{name:g,classNames:o,styles:s,unstyled:h,variant:y}),C=typeof a=="object"&&a!==null?sb(a,E).reduce((O,[R,T])=>(O[`@media (min-width: ${ls(R)})`]={[`--mantine-${f}-height`]:X(T)},O),{}):null;return H.createElement(Xe,Yz({component:f==="header"?"header":"footer",className:S(w.root,i),ref:e},_),r,H.createElement(iW,{styles:()=>({":root":Yz({[`--mantine-${f}-height`]:typeof a=="object"?X(a?.base)||"100%":X(a)},C)})}))});x7.displayName="@mantine/core/VerticalSection";var _1e=Object.defineProperty,x1e=Object.defineProperties,w1e=Object.getOwnPropertyDescriptors,Xz=Object.getOwnPropertySymbols,S1e=Object.prototype.hasOwnProperty,b1e=Object.prototype.propertyIsEnumerable,Zz=(t,e,n)=>e in t?_1e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,M1e=(t,e)=>{for(var n in e||(e={}))S1e.call(e,n)&&Zz(t,n,e[n]);if(Xz)for(var n of Xz(e))b1e.call(e,n)&&Zz(t,n,e[n]);return t},E1e=(t,e)=>x1e(t,w1e(e));const P1e={fixed:!1,position:{top:0,left:0,right:0}},w7=M.forwardRef((t,e)=>{const n=nt("Header",P1e,t);return H.createElement(x7,E1e(M1e({section:"header",__staticSelector:"Header"},n),{ref:e}))});w7.displayName="@mantine/core/Header";var C1e=Object.defineProperty,qz=Object.getOwnPropertySymbols,T1e=Object.prototype.hasOwnProperty,O1e=Object.prototype.propertyIsEnumerable,Kz=(t,e,n)=>e in t?C1e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,R1e=(t,e)=>{for(var n in e||(e={}))T1e.call(e,n)&&Kz(t,n,e[n]);if(qz)for(var n of qz(e))O1e.call(e,n)&&Kz(t,n,e[n]);return t};const A1e={fixed:!1,position:{top:0,right:0},hiddenBreakpoint:"md",hidden:!1},hA=M.forwardRef((t,e)=>{const n=nt("Aside",A1e,t);return H.createElement(p7,R1e({section:"aside",__staticSelector:"Aside",ref:e},n))});hA.Section=c1e;hA.displayName="@mantine/core/Aside";const ky={xs:X(1),sm:X(2),md:X(3),lg:X(4),xl:X(5)};function Ny(t,e){const n=t.fn.variant({variant:"outline",color:e}).border;return typeof e=="string"&&(e in t.colors||e.split(".")[0]in t.colors)?n:e===void 0?t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[4]:e}var D1e=ft((t,{color:e},{size:n,variant:r})=>({root:{},withLabel:{borderTop:"0 !important"},left:{"&::before":{display:"none"}},right:{"&::after":{display:"none"}},label:{display:"flex",alignItems:"center","&::before":{content:'""',flex:1,height:X(1),borderTop:`${Oe({size:n,sizes:ky})} ${r} ${Ny(t,e)}`,marginRight:t.spacing.xs},"&::after":{content:'""',flex:1,borderTop:`${Oe({size:n,sizes:ky})} ${r} ${Ny(t,e)}`,marginLeft:t.spacing.xs}},labelDefaultStyles:{color:e==="dark"?t.colors.dark[1]:t.fn.themeColor(e,t.colorScheme==="dark"?5:t.fn.primaryShade(),!1)},horizontal:{border:0,borderTopWidth:X(Oe({size:n,sizes:ky})),borderTopColor:Ny(t,e),borderTopStyle:r,margin:0},vertical:{border:0,alignSelf:"stretch",height:"auto",borderLeftWidth:X(Oe({size:n,sizes:ky})),borderLeftColor:Ny(t,e),borderLeftStyle:r}}));const I1e=D1e;var L1e=Object.defineProperty,k1e=Object.defineProperties,N1e=Object.getOwnPropertyDescriptors,nw=Object.getOwnPropertySymbols,S7=Object.prototype.hasOwnProperty,b7=Object.prototype.propertyIsEnumerable,Qz=(t,e,n)=>e in t?L1e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Jz=(t,e)=>{for(var n in e||(e={}))S7.call(e,n)&&Qz(t,n,e[n]);if(nw)for(var n of nw(e))b7.call(e,n)&&Qz(t,n,e[n]);return t},F1e=(t,e)=>k1e(t,N1e(e)),z1e=(t,e)=>{var n={};for(var r in t)S7.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&nw)for(var r of nw(t))e.indexOf(r)<0&&b7.call(t,r)&&(n[r]=t[r]);return n};const U1e={orientation:"horizontal",size:"xs",labelPosition:"left",variant:"solid"},mg=M.forwardRef((t,e)=>{const n=nt("Divider",U1e,t),{className:r,color:i,orientation:o,size:s,label:a,labelPosition:l,labelProps:c,variant:u,styles:d,classNames:f,unstyled:h}=n,g=z1e(n,["className","color","orientation","size","label","labelPosition","labelProps","variant","styles","classNames","unstyled"]),{classes:y,cx:_}=I1e({color:i},{classNames:f,styles:d,unstyled:h,name:"Divider",variant:u,size:s}),v=o==="vertical",x=o==="horizontal",w=!!a&&x,S=!c?.color;return H.createElement(Xe,Jz({ref:e,className:_(y.root,{[y.vertical]:v,[y.horizontal]:x,[y.withLabel]:w},r),role:"separator"},g),w&&H.createElement(Si,F1e(Jz({},c),{size:c?.size||"xs",mt:X(2),className:_(y.label,y[l],{[y.labelDefaultStyles]:S})}),a))});mg.displayName="@mantine/core/Divider";var B1e=Object.defineProperty,H1e=Object.defineProperties,V1e=Object.getOwnPropertyDescriptors,e4=Object.getOwnPropertySymbols,j1e=Object.prototype.hasOwnProperty,$1e=Object.prototype.propertyIsEnumerable,t4=(t,e,n)=>e in t?B1e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,n4=(t,e)=>{for(var n in e||(e={}))j1e.call(e,n)&&t4(t,n,e[n]);if(e4)for(var n of e4(e))$1e.call(e,n)&&t4(t,n,e[n]);return t},G1e=(t,e)=>H1e(t,V1e(e)),W1e=ft((t,e,{size:n})=>({item:G1e(n4({},t.fn.fontStyles()),{boxSizing:"border-box",wordBreak:"break-all",textAlign:"left",width:"100%",padding:`calc(${Oe({size:n,sizes:t.spacing})} / 1.5) ${Oe({size:n,sizes:t.spacing})}`,cursor:"pointer",fontSize:Oe({size:n,sizes:t.fontSizes}),color:t.colorScheme==="dark"?t.colors.dark[0]:t.black,borderRadius:t.fn.radius(),"&[data-hovered]":{backgroundColor:t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[1]},"&[data-selected]":n4({backgroundColor:t.fn.variant({variant:"filled"}).background,color:t.fn.variant({variant:"filled"}).color},t.fn.hover({backgroundColor:t.fn.variant({variant:"filled"}).hover})),"&[data-disabled]":{cursor:"default",color:t.colors.dark[2]}}),nothingFound:{boxSizing:"border-box",color:t.colors.gray[6],paddingTop:`calc(${Oe({size:n,sizes:t.spacing})} / 2)`,paddingBottom:`calc(${Oe({size:n,sizes:t.spacing})} / 2)`,textAlign:"center"},separator:{boxSizing:"border-box",textAlign:"left",width:"100%",padding:`calc(${Oe({size:n,sizes:t.spacing})} / 1.5) ${Oe({size:n,sizes:t.spacing})}`},separatorLabel:{color:t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[5]}}));const Y1e=W1e;var X1e=Object.defineProperty,r4=Object.getOwnPropertySymbols,Z1e=Object.prototype.hasOwnProperty,q1e=Object.prototype.propertyIsEnumerable,i4=(t,e,n)=>e in t?X1e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,K1e=(t,e)=>{for(var n in e||(e={}))Z1e.call(e,n)&&i4(t,n,e[n]);if(r4)for(var n of r4(e))q1e.call(e,n)&&i4(t,n,e[n]);return t};function pA({data:t,hovered:e,classNames:n,styles:r,isItemSelected:i,uuid:o,__staticSelector:s,onItemHover:a,onItemSelect:l,itemsRefs:c,itemComponent:u,size:d,nothingFound:f,creatable:h,createLabel:g,unstyled:y,variant:_}){const{classes:v}=Y1e(null,{classNames:n,styles:r,unstyled:y,name:s,variant:_,size:d}),x=[],w=[];let S=null;const E=(O,R)=>{const T=typeof i=="function"?i(O.value):!1;return H.createElement(u,K1e({key:O.value,className:v.item,"data-disabled":O.disabled||void 0,"data-hovered":!O.disabled&&e===R||void 0,"data-selected":!O.disabled&&T||void 0,selected:T,onMouseEnter:()=>a(R),id:`${o}-${R}`,role:"option",tabIndex:-1,"aria-selected":e===R,ref:A=>{c&&c.current&&(c.current[O.value]=A)},onMouseDown:O.disabled?null:A=>{A.preventDefault(),l(O)},disabled:O.disabled,variant:_},O))};let C=null;if(t.forEach((O,R)=>{O.creatable?S=R:O.group?(C!==O.group&&(C=O.group,w.push(H.createElement("div",{className:v.separator,key:`__mantine-divider-${R}`},H.createElement(mg,{classNames:{label:v.separatorLabel},label:O.group})))),w.push(E(O,R))):x.push(E(O,R))}),h){const O=t[S];x.push(H.createElement("div",{key:uA(),className:v.item,"data-hovered":e===S||void 0,onMouseEnter:()=>a(S),onMouseDown:R=>{R.preventDefault(),l(O)},tabIndex:-1,ref:R=>{c&&c.current&&(c.current[O.value]=R)}},g))}return w.length>0&&x.length>0&&x.unshift(H.createElement("div",{className:v.separator,key:"empty-group-separator"},H.createElement(mg,null))),w.length>0||x.length>0?H.createElement(H.Fragment,null,w,x):H.createElement(Si,{size:d,unstyled:y,className:v.nothingFound},f)}pA.displayName="@mantine/core/SelectItems";var Q1e=Object.defineProperty,rw=Object.getOwnPropertySymbols,M7=Object.prototype.hasOwnProperty,E7=Object.prototype.propertyIsEnumerable,o4=(t,e,n)=>e in t?Q1e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,J1e=(t,e)=>{for(var n in e||(e={}))M7.call(e,n)&&o4(t,n,e[n]);if(rw)for(var n of rw(e))E7.call(e,n)&&o4(t,n,e[n]);return t},eSe=(t,e)=>{var n={};for(var r in t)M7.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&rw)for(var r of rw(t))e.indexOf(r)<0&&E7.call(t,r)&&(n[r]=t[r]);return n};const mA=M.forwardRef((t,e)=>{var n=t,{label:r,value:i}=n,o=eSe(n,["label","value"]);return H.createElement("div",J1e({ref:e},o),r||i)});mA.displayName="@mantine/core/DefaultItem";function tSe(t,e){typeof t=="function"?t(e):t!=null&&(t.current=e)}function P7(...t){return e=>t.forEach(n=>tSe(n,e))}function dd(...t){return M.useCallback(P7(...t),t)}const C7=M.forwardRef((t,e)=>{const{children:n,...r}=t,i=M.Children.toArray(n),o=i.find(rSe);if(o){const s=o.props.children,a=i.map(l=>l===o?M.Children.count(s)>1?M.Children.only(null):M.isValidElement(s)?s.props.children:null:l);return M.createElement(_T,yn({},r,{ref:e}),M.isValidElement(s)?M.cloneElement(s,void 0,a):null)}return M.createElement(_T,yn({},r,{ref:e}),n)});C7.displayName="Slot";const _T=M.forwardRef((t,e)=>{const{children:n,...r}=t;return M.isValidElement(n)?M.cloneElement(n,{...iSe(r,n.props),ref:P7(e,n.ref)}):M.Children.count(n)>1?M.Children.only(null):null});_T.displayName="SlotClone";const nSe=({children:t})=>M.createElement(M.Fragment,null,t);function rSe(t){return M.isValidElement(t)&&t.type===nSe}function iSe(t,e){const n={...e};for(const r in e){const i=t[r],o=e[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...a)=>{o(...a),i(...a)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...t,...n}}const oSe=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],Jg=oSe.reduce((t,e)=>{const n=M.forwardRef((r,i)=>{const{asChild:o,...s}=r,a=o?C7:e;return M.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),M.createElement(a,yn({},s,{ref:i}))});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{}),xT=globalThis?.document?M.useLayoutEffect:()=>{};function sSe(t,e){return M.useReducer((n,r)=>{const i=e[n][r];return i??n},t)}const ev=t=>{const{present:e,children:n}=t,r=aSe(e),i=typeof n=="function"?n({present:r.isPresent}):M.Children.only(n),o=dd(r.ref,i.ref);return typeof n=="function"||r.isPresent?M.cloneElement(i,{ref:o}):null};ev.displayName="Presence";function aSe(t){const[e,n]=M.useState(),r=M.useRef({}),i=M.useRef(t),o=M.useRef("none"),s=t?"mounted":"unmounted",[a,l]=sSe(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return M.useEffect(()=>{const c=Fy(r.current);o.current=a==="mounted"?c:"none"},[a]),xT(()=>{const c=r.current,u=i.current;if(u!==t){const f=o.current,h=Fy(c);t?l("MOUNT"):h==="none"||c?.display==="none"?l("UNMOUNT"):l(u&&f!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,l]),xT(()=>{if(e){const c=d=>{const h=Fy(r.current).includes(d.animationName);d.target===e&&h&&bg.flushSync(()=>l("ANIMATION_END"))},u=d=>{d.target===e&&(o.current=Fy(r.current))};return e.addEventListener("animationstart",u),e.addEventListener("animationcancel",c),e.addEventListener("animationend",c),()=>{e.removeEventListener("animationstart",u),e.removeEventListener("animationcancel",c),e.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:M.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function Fy(t){return t?.animationName||"none"}function lSe(t,e=[]){let n=[];function r(o,s){const a=M.createContext(s),l=n.length;n=[...n,s];function c(d){const{scope:f,children:h,...g}=d,y=f?.[t][l]||a,_=M.useMemo(()=>g,Object.values(g));return M.createElement(y.Provider,{value:_},h)}function u(d,f){const h=f?.[t][l]||a,g=M.useContext(h);if(g)return g;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${o}\``)}return c.displayName=o+"Provider",[c,u]}const i=()=>{const o=n.map(s=>M.createContext(s));return function(a){const l=a?.[t]||o;return M.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return i.scopeName=t,[r,cSe(i,...e)]}function cSe(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=r.reduce((a,{useScope:l,scopeName:c})=>{const d=l(o)[`__scope${c}`];return{...a,...d}},{});return M.useMemo(()=>({[`__scope${e.scopeName}`]:s}),[s])}};return n.scopeName=e.scopeName,n}function yu(t){const e=M.useRef(t);return M.useEffect(()=>{e.current=t}),M.useMemo(()=>(...n)=>{var r;return(r=e.current)===null||r===void 0?void 0:r.call(e,...n)},[])}const uSe=M.createContext(void 0);function dSe(t){const e=M.useContext(uSe);return t||e||"ltr"}function fSe(t,[e,n]){return Math.min(n,Math.max(e,t))}function Vu(t,e,{checkForDefaultPrevented:n=!0}={}){return function(i){if(t?.(i),n===!1||!i.defaultPrevented)return e?.(i)}}function hSe(t,e){return M.useReducer((n,r)=>{const i=e[n][r];return i??n},t)}const T7="ScrollArea",[O7,T5e]=lSe(T7),[pSe,ps]=O7(T7),mSe=M.forwardRef((t,e)=>{const{__scopeScrollArea:n,type:r="hover",dir:i,scrollHideDelay:o=600,...s}=t,[a,l]=M.useState(null),[c,u]=M.useState(null),[d,f]=M.useState(null),[h,g]=M.useState(null),[y,_]=M.useState(null),[v,x]=M.useState(0),[w,S]=M.useState(0),[E,C]=M.useState(!1),[O,R]=M.useState(!1),T=dd(e,F=>l(F)),A=dSe(i);return M.createElement(pSe,{scope:n,type:r,dir:A,scrollHideDelay:o,scrollArea:a,viewport:c,onViewportChange:u,content:d,onContentChange:f,scrollbarX:h,onScrollbarXChange:g,scrollbarXEnabled:E,onScrollbarXEnabledChange:C,scrollbarY:y,onScrollbarYChange:_,scrollbarYEnabled:O,onScrollbarYEnabledChange:R,onCornerWidthChange:x,onCornerHeightChange:S},M.createElement(Jg.div,yn({dir:A},s,{ref:T,style:{position:"relative",["--radix-scroll-area-corner-width"]:v+"px",["--radix-scroll-area-corner-height"]:w+"px",...t.style}})))}),gSe="ScrollAreaViewport",vSe=M.forwardRef((t,e)=>{const{__scopeScrollArea:n,children:r,...i}=t,o=ps(gSe,n),s=M.useRef(null),a=dd(e,s,o.onViewportChange);return M.createElement(M.Fragment,null,M.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"}}),M.createElement(Jg.div,yn({"data-radix-scroll-area-viewport":""},i,{ref:a,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...t.style}}),M.createElement("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"}},r)))}),bl="ScrollAreaScrollbar",ySe=M.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=ps(bl,t.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:s}=i,a=t.orientation==="horizontal";return M.useEffect(()=>(a?o(!0):s(!0),()=>{a?o(!1):s(!1)}),[a,o,s]),i.type==="hover"?M.createElement(_Se,yn({},r,{ref:e,forceMount:n})):i.type==="scroll"?M.createElement(xSe,yn({},r,{ref:e,forceMount:n})):i.type==="auto"?M.createElement(R7,yn({},r,{ref:e,forceMount:n})):i.type==="always"?M.createElement(gA,yn({},r,{ref:e})):null}),_Se=M.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=ps(bl,t.__scopeScrollArea),[o,s]=M.useState(!1);return M.useEffect(()=>{const a=i.scrollArea;let l=0;if(a){const c=()=>{window.clearTimeout(l),s(!0)},u=()=>{l=window.setTimeout(()=>s(!1),i.scrollHideDelay)};return a.addEventListener("pointerenter",c),a.addEventListener("pointerleave",u),()=>{window.clearTimeout(l),a.removeEventListener("pointerenter",c),a.removeEventListener("pointerleave",u)}}},[i.scrollArea,i.scrollHideDelay]),M.createElement(ev,{present:n||o},M.createElement(R7,yn({"data-state":o?"visible":"hidden"},r,{ref:e})))}),xSe=M.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=ps(bl,t.__scopeScrollArea),o=t.orientation==="horizontal",s=lb(()=>l("SCROLL_END"),100),[a,l]=hSe("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return M.useEffect(()=>{if(a==="idle"){const c=window.setTimeout(()=>l("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(c)}},[a,i.scrollHideDelay,l]),M.useEffect(()=>{const c=i.viewport,u=o?"scrollLeft":"scrollTop";if(c){let d=c[u];const f=()=>{const h=c[u];d!==h&&(l("SCROLL"),s()),d=h};return c.addEventListener("scroll",f),()=>c.removeEventListener("scroll",f)}},[i.viewport,o,l,s]),M.createElement(ev,{present:n||a!=="hidden"},M.createElement(gA,yn({"data-state":a==="hidden"?"hidden":"visible"},r,{ref:e,onPointerEnter:Vu(t.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:Vu(t.onPointerLeave,()=>l("POINTER_LEAVE"))})))}),R7=M.forwardRef((t,e)=>{const n=ps(bl,t.__scopeScrollArea),{forceMount:r,...i}=t,[o,s]=M.useState(!1),a=t.orientation==="horizontal",l=lb(()=>{if(n.viewport){const c=n.viewport.offsetWidth{const{orientation:n="vertical",...r}=t,i=ps(bl,t.__scopeScrollArea),o=M.useRef(null),s=M.useRef(0),[a,l]=M.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=L7(a.viewport,a.content),u={...r,sizes:a,onSizesChange:l,hasThumb:c>0&&c<1,onThumbChange:f=>o.current=f,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:f=>s.current=f};function d(f,h){return TSe(f,s.current,a,h)}return n==="horizontal"?M.createElement(wSe,yn({},u,{ref:e,onThumbPositionChange:()=>{if(i.viewport&&o.current){const f=i.viewport.scrollLeft,h=s4(f,a,i.dir);o.current.style.transform=`translate3d(${h}px, 0, 0)`}},onWheelScroll:f=>{i.viewport&&(i.viewport.scrollLeft=f)},onDragScroll:f=>{i.viewport&&(i.viewport.scrollLeft=d(f,i.dir))}})):n==="vertical"?M.createElement(SSe,yn({},u,{ref:e,onThumbPositionChange:()=>{if(i.viewport&&o.current){const f=i.viewport.scrollTop,h=s4(f,a);o.current.style.transform=`translate3d(0, ${h}px, 0)`}},onWheelScroll:f=>{i.viewport&&(i.viewport.scrollTop=f)},onDragScroll:f=>{i.viewport&&(i.viewport.scrollTop=d(f))}})):null}),wSe=M.forwardRef((t,e)=>{const{sizes:n,onSizesChange:r,...i}=t,o=ps(bl,t.__scopeScrollArea),[s,a]=M.useState(),l=M.useRef(null),c=dd(e,l,o.onScrollbarXChange);return M.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),M.createElement(D7,yn({"data-orientation":"horizontal"},i,{ref:c,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,["--radix-scroll-area-thumb-width"]:ab(n)+"px",...t.style},onThumbPointerDown:u=>t.onThumbPointerDown(u.x),onDragScroll:u=>t.onDragScroll(u.x),onWheelScroll:(u,d)=>{if(o.viewport){const f=o.viewport.scrollLeft+u.deltaX;t.onWheelScroll(f),N7(f,d)&&u.preventDefault()}},onResize:()=>{l.current&&o.viewport&&s&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:iw(s.paddingLeft),paddingEnd:iw(s.paddingRight)}})}}))}),SSe=M.forwardRef((t,e)=>{const{sizes:n,onSizesChange:r,...i}=t,o=ps(bl,t.__scopeScrollArea),[s,a]=M.useState(),l=M.useRef(null),c=dd(e,l,o.onScrollbarYChange);return M.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),M.createElement(D7,yn({"data-orientation":"vertical"},i,{ref:c,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)",["--radix-scroll-area-thumb-height"]:ab(n)+"px",...t.style},onThumbPointerDown:u=>t.onThumbPointerDown(u.y),onDragScroll:u=>t.onDragScroll(u.y),onWheelScroll:(u,d)=>{if(o.viewport){const f=o.viewport.scrollTop+u.deltaY;t.onWheelScroll(f),N7(f,d)&&u.preventDefault()}},onResize:()=>{l.current&&o.viewport&&s&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:iw(s.paddingTop),paddingEnd:iw(s.paddingBottom)}})}}))}),[bSe,A7]=O7(bl),D7=M.forwardRef((t,e)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:o,onThumbPointerUp:s,onThumbPointerDown:a,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:u,onResize:d,...f}=t,h=ps(bl,n),[g,y]=M.useState(null),_=dd(e,T=>y(T)),v=M.useRef(null),x=M.useRef(""),w=h.viewport,S=r.content-r.viewport,E=yu(u),C=yu(l),O=lb(d,10);function R(T){if(v.current){const A=T.clientX-v.current.left,F=T.clientY-v.current.top;c({x:A,y:F})}}return M.useEffect(()=>{const T=A=>{const F=A.target;g?.contains(F)&&E(A,S)};return document.addEventListener("wheel",T,{passive:!1}),()=>document.removeEventListener("wheel",T,{passive:!1})},[w,g,S,E]),M.useEffect(C,[r,C]),ch(g,O),ch(h.content,O),M.createElement(bSe,{scope:n,scrollbar:g,hasThumb:i,onThumbChange:yu(o),onThumbPointerUp:yu(s),onThumbPositionChange:C,onThumbPointerDown:yu(a)},M.createElement(Jg.div,yn({},f,{ref:_,style:{position:"absolute",...f.style},onPointerDown:Vu(t.onPointerDown,T=>{T.button===0&&(T.target.setPointerCapture(T.pointerId),v.current=g.getBoundingClientRect(),x.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",R(T))}),onPointerMove:Vu(t.onPointerMove,R),onPointerUp:Vu(t.onPointerUp,T=>{const A=T.target;A.hasPointerCapture(T.pointerId)&&A.releasePointerCapture(T.pointerId),document.body.style.webkitUserSelect=x.current,v.current=null})})))}),wT="ScrollAreaThumb",MSe=M.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=A7(wT,t.__scopeScrollArea);return M.createElement(ev,{present:n||i.hasThumb},M.createElement(ESe,yn({ref:e},r)))}),ESe=M.forwardRef((t,e)=>{const{__scopeScrollArea:n,style:r,...i}=t,o=ps(wT,n),s=A7(wT,n),{onThumbPositionChange:a}=s,l=dd(e,d=>s.onThumbChange(d)),c=M.useRef(),u=lb(()=>{c.current&&(c.current(),c.current=void 0)},100);return M.useEffect(()=>{const d=o.viewport;if(d){const f=()=>{if(u(),!c.current){const h=OSe(d,a);c.current=h,a()}};return a(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[o.viewport,u,a]),M.createElement(Jg.div,yn({"data-state":s.hasThumb?"visible":"hidden"},i,{ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Vu(t.onPointerDownCapture,d=>{const h=d.target.getBoundingClientRect(),g=d.clientX-h.left,y=d.clientY-h.top;s.onThumbPointerDown({x:g,y})}),onPointerUp:Vu(t.onPointerUp,s.onThumbPointerUp)}))}),I7="ScrollAreaCorner",PSe=M.forwardRef((t,e)=>{const n=ps(I7,t.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?M.createElement(CSe,yn({},t,{ref:e})):null}),CSe=M.forwardRef((t,e)=>{const{__scopeScrollArea:n,...r}=t,i=ps(I7,n),[o,s]=M.useState(0),[a,l]=M.useState(0),c=!!(o&&a);return ch(i.scrollbarX,()=>{var u;const d=((u=i.scrollbarX)===null||u===void 0?void 0:u.offsetHeight)||0;i.onCornerHeightChange(d),l(d)}),ch(i.scrollbarY,()=>{var u;const d=((u=i.scrollbarY)===null||u===void 0?void 0:u.offsetWidth)||0;i.onCornerWidthChange(d),s(d)}),c?M.createElement(Jg.div,yn({},r,{ref:e,style:{width:o,height:a,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...t.style}})):null});function iw(t){return t?parseInt(t,10):0}function L7(t,e){const n=t/e;return isNaN(n)?0:n}function ab(t){const e=L7(t.viewport,t.content),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,r=(t.scrollbar.size-n)*e;return Math.max(r,18)}function TSe(t,e,n,r="ltr"){const i=ab(n),o=i/2,s=e||o,a=i-s,l=n.scrollbar.paddingStart+s,c=n.scrollbar.size-n.scrollbar.paddingEnd-a,u=n.content-n.viewport,d=r==="ltr"?[0,u]:[u*-1,0];return k7([l,c],d)(t)}function s4(t,e,n="ltr"){const r=ab(e),i=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,o=e.scrollbar.size-i,s=e.content-e.viewport,a=o-r,l=n==="ltr"?[0,s]:[s*-1,0],c=fSe(t,l);return k7([0,s],[0,a])(c)}function k7(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(t[1]-t[0]);return e[0]+r*(n-t[0])}}function N7(t,e){return t>0&&t{})=>{let n={left:t.scrollLeft,top:t.scrollTop},r=0;return function i(){const o={left:t.scrollLeft,top:t.scrollTop},s=n.left!==o.left,a=n.top!==o.top;(s||a)&&e(),n=o,r=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(r)};function lb(t,e){const n=yu(t),r=M.useRef(0);return M.useEffect(()=>()=>window.clearTimeout(r.current),[]),M.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,e)},[n,e])}function ch(t,e){const n=yu(e);xT(()=>{let r=0;if(t){const i=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return i.observe(t),()=>{window.cancelAnimationFrame(r),i.unobserve(t)}}},[t,n])}const RSe=mSe,ASe=vSe,a4=ySe,l4=MSe,DSe=PSe;var ISe=ft((t,{scrollbarSize:e,offsetScrollbars:n,scrollbarHovered:r,hidden:i})=>({root:{overflow:"hidden"},viewport:{width:"100%",height:"100%",paddingRight:n?X(e):void 0,paddingBottom:n?X(e):void 0},scrollbar:{display:i?"none":"flex",userSelect:"none",touchAction:"none",boxSizing:"border-box",padding:`calc(${X(e)} / 5)`,transition:"background-color 150ms ease, opacity 150ms ease","&:hover":{backgroundColor:t.colorScheme==="dark"?t.colors.dark[8]:t.colors.gray[0],[`& .${Ur("thumb")}`]:{backgroundColor:t.colorScheme==="dark"?t.fn.rgba(t.white,.5):t.fn.rgba(t.black,.5)}},'&[data-orientation="vertical"]':{width:X(e)},'&[data-orientation="horizontal"]':{flexDirection:"column",height:X(e)},'&[data-state="hidden"]':{display:"none",opacity:0}},thumb:{ref:Ur("thumb"),flex:1,backgroundColor:t.colorScheme==="dark"?t.fn.rgba(t.white,.4):t.fn.rgba(t.black,.4),borderRadius:X(e),position:"relative",transition:"background-color 150ms ease",display:i?"none":void 0,overflow:"hidden","&::before":{content:'""',position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"100%",height:"100%",minWidth:X(44),minHeight:X(44)}},corner:{backgroundColor:t.colorScheme==="dark"?t.colors.dark[6]:t.colors.gray[0],transition:"opacity 150ms ease",opacity:r?1:0,display:i?"none":void 0}}));const LSe=ISe;var kSe=Object.defineProperty,NSe=Object.defineProperties,FSe=Object.getOwnPropertyDescriptors,ow=Object.getOwnPropertySymbols,F7=Object.prototype.hasOwnProperty,z7=Object.prototype.propertyIsEnumerable,c4=(t,e,n)=>e in t?kSe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ST=(t,e)=>{for(var n in e||(e={}))F7.call(e,n)&&c4(t,n,e[n]);if(ow)for(var n of ow(e))z7.call(e,n)&&c4(t,n,e[n]);return t},U7=(t,e)=>NSe(t,FSe(e)),B7=(t,e)=>{var n={};for(var r in t)F7.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&ow)for(var r of ow(t))e.indexOf(r)<0&&z7.call(t,r)&&(n[r]=t[r]);return n};const H7={scrollbarSize:12,scrollHideDelay:1e3,type:"hover",offsetScrollbars:!1},cb=M.forwardRef((t,e)=>{const n=nt("ScrollArea",H7,t),{children:r,className:i,classNames:o,styles:s,scrollbarSize:a,scrollHideDelay:l,type:c,dir:u,offsetScrollbars:d,viewportRef:f,onScrollPositionChange:h,unstyled:g,variant:y,viewportProps:_}=n,v=B7(n,["children","className","classNames","styles","scrollbarSize","scrollHideDelay","type","dir","offsetScrollbars","viewportRef","onScrollPositionChange","unstyled","variant","viewportProps"]),[x,w]=M.useState(!1),S=Ir(),{classes:E,cx:C}=LSe({scrollbarSize:a,offsetScrollbars:d,scrollbarHovered:x,hidden:c==="never"},{name:"ScrollArea",classNames:o,styles:s,unstyled:g,variant:y});return H.createElement(RSe,{type:c==="never"?"always":c,scrollHideDelay:l,dir:u||S.dir,ref:e,asChild:!0},H.createElement(Xe,ST({className:C(E.root,i)},v),H.createElement(ASe,U7(ST({},_),{className:E.viewport,ref:f,onScroll:typeof h=="function"?({currentTarget:O})=>h({x:O.scrollLeft,y:O.scrollTop}):void 0}),r),H.createElement(a4,{orientation:"horizontal",className:E.scrollbar,forceMount:!0,onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1)},H.createElement(l4,{className:E.thumb})),H.createElement(a4,{orientation:"vertical",className:E.scrollbar,forceMount:!0,onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1)},H.createElement(l4,{className:E.thumb})),H.createElement(DSe,{className:E.corner})))}),V7=M.forwardRef((t,e)=>{const n=nt("ScrollAreaAutosize",H7,t),{children:r,classNames:i,styles:o,scrollbarSize:s,scrollHideDelay:a,type:l,dir:c,offsetScrollbars:u,viewportRef:d,onScrollPositionChange:f,unstyled:h,sx:g,variant:y,viewportProps:_}=n,v=B7(n,["children","classNames","styles","scrollbarSize","scrollHideDelay","type","dir","offsetScrollbars","viewportRef","onScrollPositionChange","unstyled","sx","variant","viewportProps"]);return H.createElement(Xe,U7(ST({},v),{ref:e,sx:[{display:"flex"},...Ch(g)]}),H.createElement(Xe,{sx:{display:"flex",flexDirection:"column",flex:1}},H.createElement(cb,{classNames:i,styles:o,scrollHideDelay:a,scrollbarSize:s,type:l,dir:c,offsetScrollbars:u,viewportRef:d,onScrollPositionChange:f,unstyled:h,variant:y,viewportProps:_},r)))});V7.displayName="@mantine/core/ScrollAreaAutosize";cb.displayName="@mantine/core/ScrollArea";cb.Autosize=V7;const j7=cb;var zSe=Object.defineProperty,USe=Object.defineProperties,BSe=Object.getOwnPropertyDescriptors,sw=Object.getOwnPropertySymbols,$7=Object.prototype.hasOwnProperty,G7=Object.prototype.propertyIsEnumerable,u4=(t,e,n)=>e in t?zSe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,d4=(t,e)=>{for(var n in e||(e={}))$7.call(e,n)&&u4(t,n,e[n]);if(sw)for(var n of sw(e))G7.call(e,n)&&u4(t,n,e[n]);return t},HSe=(t,e)=>USe(t,BSe(e)),VSe=(t,e)=>{var n={};for(var r in t)$7.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&sw)for(var r of sw(t))e.indexOf(r)<0&&G7.call(t,r)&&(n[r]=t[r]);return n};const ub=M.forwardRef((t,e)=>{var n=t,{style:r}=n,i=VSe(n,["style"]);return H.createElement(j7,HSe(d4({},i),{style:d4({width:"100%"},r),viewportProps:{tabIndex:-1},viewportRef:e}),i.children)});ub.displayName="@mantine/core/SelectScrollArea";var jSe=ft(()=>({dropdown:{},itemsWrapper:{padding:X(4),display:"flex",width:"100%",boxSizing:"border-box"}}));const $Se=jSe;function Oh(t){return t.split("-")[1]}function vA(t){return t==="y"?"height":"width"}function zs(t){return t.split("-")[0]}function Fc(t){return["top","bottom"].includes(zs(t))?"x":"y"}function f4(t,e,n){let{reference:r,floating:i}=t;const o=r.x+r.width/2-i.width/2,s=r.y+r.height/2-i.height/2,a=Fc(e),l=vA(a),c=r[l]/2-i[l]/2,u=a==="x";let d;switch(zs(e)){case"top":d={x:o,y:r.y-i.height};break;case"bottom":d={x:o,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:s};break;case"left":d={x:r.x-i.width,y:s};break;default:d={x:r.x,y:r.y}}switch(Oh(e)){case"start":d[a]-=c*(n&&u?-1:1);break;case"end":d[a]+=c*(n&&u?-1:1)}return d}const GSe=async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,a=o.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:d}=f4(c,r,l),f=r,h={},g=0;for(let y=0;y({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:i,rects:o,platform:s,elements:a}=e,{element:l,padding:c=0}=ml(t,e)||{};if(l==null)return{};const u=yA(c),d={x:n,y:r},f=Fc(i),h=vA(f),g=await s.getDimensions(l),y=f==="y",_=y?"top":"left",v=y?"bottom":"right",x=y?"clientHeight":"clientWidth",w=o.reference[h]+o.reference[f]-d[f]-o.floating[h],S=d[f]-o.reference[f],E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l));let C=E?E[x]:0;C&&await(s.isElement==null?void 0:s.isElement(E))||(C=a.floating[x]||o.floating[h]);const O=w/2-S/2,R=C/2-g[h]/2-1,T=Mc(u[_],R),A=Mc(u[v],R),F=T,N=C-g[h]-A,U=C/2-g[h]/2+O,k=bT(F,U,N),z=Oh(i)!=null&&U!=k&&o.reference[h]/2-(Ut.concat(e,e+"-start",e+"-end"),[]);const YSe={left:"right",right:"left",bottom:"top",top:"bottom"};function aw(t){return t.replace(/left|right|bottom|top/g,e=>YSe[e])}function XSe(t,e,n){n===void 0&&(n=!1);const r=Oh(t),i=Fc(t),o=vA(i);let s=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=aw(s)),{main:s,cross:aw(s)}}const ZSe={start:"end",end:"start"};function RP(t){return t.replace(/start|end/g,e=>ZSe[e])}const W7=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:s,platform:a,elements:l}=e,{mainAxis:c=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...y}=ml(t,e),_=zs(r),v=zs(s)===s,x=await(a.isRTL==null?void 0:a.isRTL(l.floating)),w=d||(v||!g?[aw(s)]:function(F){const N=aw(F);return[RP(F),N,RP(N)]}(s));d||h==="none"||w.push(...function(F,N,U,k){const z=Oh(F);let G=function(W,B,j){const $=["left","right"],q=["right","left"],K=["top","bottom"],re=["bottom","top"];switch(W){case"top":case"bottom":return j?B?q:$:B?$:q;case"left":case"right":return B?K:re;default:return[]}}(zs(F),U==="start",k);return z&&(G=G.map(W=>W+"-"+z),N&&(G=G.concat(G.map(RP)))),G}(s,g,h,x));const S=[s,...w],E=await _A(e,y),C=[];let O=((n=i.flip)==null?void 0:n.overflows)||[];if(c&&C.push(E[_]),u){const{main:F,cross:N}=XSe(r,o,x);C.push(E[F],E[N])}if(O=[...O,{placement:r,overflows:C}],!C.every(F=>F<=0)){var R,T;const F=(((R=i.flip)==null?void 0:R.index)||0)+1,N=S[F];if(N)return{data:{index:F,overflows:O},reset:{placement:N}};let U=(T=O.filter(k=>k.overflows[0]<=0).sort((k,z)=>k.overflows[1]-z.overflows[1])[0])==null?void 0:T.placement;if(!U)switch(f){case"bestFit":{var A;const k=(A=O.map(z=>[z.placement,z.overflows.filter(G=>G>0).reduce((G,W)=>G+W,0)]).sort((z,G)=>z[1]-G[1])[0])==null?void 0:A[0];k&&(U=k);break}case"initialPlacement":U=s}if(r!==U)return{reset:{placement:U}}}return{}}}};function p4(t){const e=Mc(...t.map(r=>r.left)),n=Mc(...t.map(r=>r.top));return{x:e,y:n,width:ga(...t.map(r=>r.right))-e,height:ga(...t.map(r=>r.bottom))-n}}const Y7=function(t){return t===void 0&&(t={}),{name:"inline",options:t,async fn(e){const{placement:n,elements:r,rects:i,platform:o,strategy:s}=e,{padding:a=2,x:l,y:c}=ml(t,e),u=Array.from(await(o.getClientRects==null?void 0:o.getClientRects(r.reference))||[]),d=function(y){const _=y.slice().sort((w,S)=>w.y-S.y),v=[];let x=null;for(let w=0;w<_.length;w++){const S=_[w];!x||S.y-x.y>x.height/2?v.push([S]):v[v.length-1].push(S),x=S}return v.map(w=>uh(p4(w)))}(u),f=uh(p4(u)),h=yA(a),g=await o.getElementRects({reference:{getBoundingClientRect:function(){if(d.length===2&&d[0].left>d[1].right&&l!=null&&c!=null)return d.find(y=>l>y.left-h.left&&ly.top-h.top&&c=2){if(Fc(n)==="x"){const E=d[0],C=d[d.length-1],O=zs(n)==="top",R=E.top,T=C.bottom,A=O?E.left:C.left,F=O?E.right:C.right;return{top:R,bottom:T,left:A,right:F,width:F-A,height:T-R,x:A,y:R}}const y=zs(n)==="left",_=ga(...d.map(E=>E.right)),v=Mc(...d.map(E=>E.left)),x=d.filter(E=>y?E.left===v:E.right===_),w=x[0].top,S=x[x.length-1].bottom;return{top:w,bottom:S,left:v,right:_,width:_-v,height:S-w,x:v,y:w}}return f}},floating:r.floating,strategy:s});return i.reference.x!==g.reference.x||i.reference.y!==g.reference.y||i.reference.width!==g.reference.width||i.reference.height!==g.reference.height?{reset:{rects:g}}:{}}}},X7=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){const{x:n,y:r}=e,i=await async function(o,s){const{placement:a,platform:l,elements:c}=o,u=await(l.isRTL==null?void 0:l.isRTL(c.floating)),d=zs(a),f=Oh(a),h=Fc(a)==="x",g=["left","top"].includes(d)?-1:1,y=u&&h?-1:1,_=ml(s,o);let{mainAxis:v,crossAxis:x,alignmentAxis:w}=typeof _=="number"?{mainAxis:_,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,..._};return f&&typeof w=="number"&&(x=f==="end"?-1*w:w),h?{x:x*y,y:v*g}:{x:v*g,y:x*y}}(e,t);return{x:n+i.x,y:r+i.y,data:i}}}};function Z7(t){return t==="x"?"y":"x"}const xA=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:i}=e,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:_=>{let{x:v,y:x}=_;return{x:v,y:x}}},...l}=ml(t,e),c={x:n,y:r},u=await _A(e,l),d=Fc(zs(i)),f=Z7(d);let h=c[d],g=c[f];if(o){const _=d==="y"?"bottom":"right";h=bT(h+u[d==="y"?"top":"left"],h,h-u[_])}if(s){const _=f==="y"?"bottom":"right";g=bT(g+u[f==="y"?"top":"left"],g,g-u[_])}const y=a.fn({...e,[d]:h,[f]:g});return{...y,data:{x:y.x-n,y:y.y-r}}}}},qSe=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:i,rects:o,middlewareData:s}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=ml(t,e),u={x:n,y:r},d=Fc(i),f=Z7(d);let h=u[d],g=u[f];const y=ml(a,e),_=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const w=d==="y"?"height":"width",S=o.reference[d]-o.floating[w]+_.mainAxis,E=o.reference[d]+o.reference[w]-_.mainAxis;hE&&(h=E)}if(c){var v,x;const w=d==="y"?"width":"height",S=["top","left"].includes(zs(i)),E=o.reference[f]-o.floating[w]+(S&&((v=s.offset)==null?void 0:v[f])||0)+(S?0:_.crossAxis),C=o.reference[f]+o.reference[w]+(S?0:((x=s.offset)==null?void 0:x[f])||0)-(S?_.crossAxis:0);gC&&(g=C)}return{[d]:h,[f]:g}}}},KSe=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:r,platform:i,elements:o}=e,{apply:s=()=>{},...a}=ml(t,e),l=await _A(e,a),c=zs(n),u=Oh(n),d=Fc(n)==="x",{width:f,height:h}=r.floating;let g,y;c==="top"||c==="bottom"?(g=c,y=u===(await(i.isRTL==null?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(y=c,g=u==="end"?"top":"bottom");const _=h-l[g],v=f-l[y],x=!e.middlewareData.shift;let w=_,S=v;if(d){const C=f-l.left-l.right;S=u||x?Mc(v,C):C}else{const C=h-l.top-l.bottom;w=u||x?Mc(_,C):C}if(x&&!u){const C=ga(l.left,0),O=ga(l.right,0),R=ga(l.top,0),T=ga(l.bottom,0);d?S=f-2*(C!==0||O!==0?C+O:ga(l.left,l.right)):w=h-2*(R!==0||T!==0?R+T:ga(l.top,l.bottom))}await s({...e,availableWidth:S,availableHeight:w});const E=await i.getDimensions(o.floating);return f!==E.width||h!==E.height?{reset:{rects:!0}}:{}}}};function cs(t){var e;return((e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Us(t){return cs(t).getComputedStyle(t)}function q7(t){return t instanceof cs(t).Node}function Ec(t){return q7(t)?(t.nodeName||"").toLowerCase():"#document"}function $s(t){return t instanceof cs(t).HTMLElement}function sl(t){return t instanceof cs(t).Element}function m4(t){return typeof ShadowRoot<"u"&&(t instanceof cs(t).ShadowRoot||t instanceof ShadowRoot)}function gg(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=Us(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function QSe(t){return["table","td","th"].includes(Ec(t))}function MT(t){const e=wA(),n=Us(t);return n.transform!=="none"||n.perspective!=="none"||!e&&!!n.backdropFilter&&n.backdropFilter!=="none"||!e&&!!n.filter&&n.filter!=="none"||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function wA(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function db(t){return["html","body","#document"].includes(Ec(t))}const g4=Math.min,Sm=Math.max,lw=Math.round,zy=Math.floor,Ku=t=>({x:t,y:t});function K7(t){const e=Us(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=$s(t),o=i?t.offsetWidth:n,s=i?t.offsetHeight:r,a=lw(n)!==o||lw(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function SA(t){return sl(t)?t:t.contextElement}function $f(t){const e=SA(t);if(!$s(e))return Ku(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:o}=K7(e);let s=(o?lw(n.width):n.width)/r,a=(o?lw(n.height):n.height)/i;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const v4=Ku(0);function Q7(t,e,n){var r,i;if(e===void 0&&(e=!0),!wA())return v4;const o=t?cs(t):window;return!n||e&&n!==o?v4:{x:((r=o.visualViewport)==null?void 0:r.offsetLeft)||0,y:((i=o.visualViewport)==null?void 0:i.offsetTop)||0}}function Qu(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),o=SA(t);let s=Ku(1);e&&(r?sl(r)&&(s=$f(r)):s=$f(t));const a=Q7(o,n,r);let l=(i.left+a.x)/s.x,c=(i.top+a.y)/s.y,u=i.width/s.x,d=i.height/s.y;if(o){const f=cs(o),h=r&&sl(r)?cs(r):r;let g=f.frameElement;for(;g&&r&&h!==f;){const y=$f(g),_=g.getBoundingClientRect(),v=getComputedStyle(g),x=_.left+(g.clientLeft+parseFloat(v.paddingLeft))*y.x,w=_.top+(g.clientTop+parseFloat(v.paddingTop))*y.y;l*=y.x,c*=y.y,u*=y.x,d*=y.y,l+=x,c+=w,g=cs(g).frameElement}}return uh({width:u,height:d,x:l,y:c})}function al(t){return((q7(t)?t.ownerDocument:t.document)||window.document).documentElement}function fb(t){return sl(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function J7(t){return Qu(al(t)).left+fb(t).scrollLeft}function dh(t){if(Ec(t)==="html")return t;const e=t.assignedSlot||t.parentNode||m4(t)&&t.host||al(t);return m4(e)?e.host:e}function e9(t){const e=dh(t);return db(e)?t.ownerDocument?t.ownerDocument.body:t.body:$s(e)&&gg(e)?e:e9(e)}function mc(t,e){var n;e===void 0&&(e=[]);const r=e9(t),i=r===((n=t.ownerDocument)==null?void 0:n.body),o=cs(r);return i?e.concat(o,o.visualViewport||[],gg(r)?r:[]):e.concat(r,mc(r))}function y4(t,e,n){let r;if(e==="viewport")r=function(i,o){const s=cs(i),a=al(i),l=s.visualViewport;let c=a.clientWidth,u=a.clientHeight,d=0,f=0;if(l){c=l.width,u=l.height;const h=wA();(!h||h&&o==="fixed")&&(d=l.offsetLeft,f=l.offsetTop)}return{width:c,height:u,x:d,y:f}}(t,n);else if(e==="document")r=function(i){const o=al(i),s=fb(i),a=i.ownerDocument.body,l=Sm(o.scrollWidth,o.clientWidth,a.scrollWidth,a.clientWidth),c=Sm(o.scrollHeight,o.clientHeight,a.scrollHeight,a.clientHeight);let u=-s.scrollLeft+J7(i);const d=-s.scrollTop;return Us(a).direction==="rtl"&&(u+=Sm(o.clientWidth,a.clientWidth)-l),{width:l,height:c,x:u,y:d}}(al(t));else if(sl(e))r=function(i,o){const s=Qu(i,!0,o==="fixed"),a=s.top+i.clientTop,l=s.left+i.clientLeft,c=$s(i)?$f(i):Ku(1);return{width:i.clientWidth*c.x,height:i.clientHeight*c.y,x:l*c.x,y:a*c.y}}(e,n);else{const i=Q7(t);r={...e,x:e.x-i.x,y:e.y-i.y}}return uh(r)}function t9(t,e){const n=dh(t);return!(n===e||!sl(n)||db(n))&&(Us(n).position==="fixed"||t9(n,e))}function _4(t,e){return $s(t)&&Us(t).position!=="fixed"?e?e(t):t.offsetParent:null}function x4(t,e){const n=cs(t);if(!$s(t))return n;let r=_4(t,e);for(;r&&QSe(r)&&Us(r).position==="static";)r=_4(r,e);return r&&(Ec(r)==="html"||Ec(r)==="body"&&Us(r).position==="static"&&!MT(r))?n:r||function(i){let o=dh(i);for(;$s(o)&&!db(o);){if(MT(o))return o;o=dh(o)}return null}(t)||n}function JSe(t,e,n){const r=$s(e),i=al(e),o=n==="fixed",s=Qu(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=Ku(0);if(r||!r&&!o)if((Ec(e)!=="body"||gg(i))&&(a=fb(e)),$s(e)){const c=Qu(e,!0,o,e);l.x=c.x+e.clientLeft,l.y=c.y+e.clientTop}else i&&(l.x=J7(i));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}const ebe={getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const o=n==="clippingAncestors"?function(c,u){const d=u.get(c);if(d)return d;let f=mc(c).filter(_=>sl(_)&&Ec(_)!=="body"),h=null;const g=Us(c).position==="fixed";let y=g?dh(c):c;for(;sl(y)&&!db(y);){const _=Us(y),v=MT(y);v||_.position!=="fixed"||(h=null),(g?!v&&!h:!v&&_.position==="static"&&h&&["absolute","fixed"].includes(h.position)||gg(y)&&!v&&t9(c,y))?f=f.filter(x=>x!==y):h=_,y=dh(y)}return u.set(c,f),f}(e,this._c):[].concat(n),s=[...o,r],a=s[0],l=s.reduce((c,u)=>{const d=y4(e,u,i);return c.top=Sm(d.top,c.top),c.right=g4(d.right,c.right),c.bottom=g4(d.bottom,c.bottom),c.left=Sm(d.left,c.left),c},y4(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:n,strategy:r}=t;const i=$s(n),o=al(n);if(n===o)return e;let s={scrollLeft:0,scrollTop:0},a=Ku(1);const l=Ku(0);if((i||!i&&r!=="fixed")&&((Ec(n)!=="body"||gg(o))&&(s=fb(n)),$s(n))){const c=Qu(n);a=$f(n),l.x=c.x+n.clientLeft,l.y=c.y+n.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-s.scrollLeft*a.x+l.x,y:e.y*a.y-s.scrollTop*a.y+l.y}},isElement:sl,getDimensions:function(t){return K7(t)},getOffsetParent:x4,getDocumentElement:al,getScale:$f,async getElementRects(t){let{reference:e,floating:n,strategy:r}=t;const i=this.getOffsetParent||x4,o=this.getDimensions;return{reference:JSe(e,await i(n),r),floating:{x:0,y:0,...await o(n)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>Us(t).direction==="rtl"};function tbe(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=!0,layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=SA(t),u=i||o?[...c?mc(c):[],...mc(e)]:[];u.forEach(y=>{i&&y.addEventListener("scroll",n,{passive:!0}),o&&y.addEventListener("resize",n)});const d=c&&a?function(y,_){let v=null;const x=al(y);function w(){v&&v.disconnect(),v=null}return function S(E){E===void 0&&(E=!1),w();const{left:C,top:O,width:R,height:T}=y.getBoundingClientRect();if(E||_(),!R||!T)return;const A=zy(O),F=zy(x.clientWidth-(C+R)),N=zy(x.clientHeight-(O+T)),U=zy(C);let k=!0;v=new IntersectionObserver(z=>{z[0].intersectionRatio===1||k||S(),k=!1},{rootMargin:-A+"px "+-F+"px "+-N+"px "+-U+"px",threshold:1}),v.observe(y)}(!0),w}(c,n):null;let f,h=null;s&&(h=new ResizeObserver(n),c&&!l&&h.observe(c),h.observe(e));let g=l?Qu(t):null;return l&&function y(){const _=Qu(t);!g||_.x===g.x&&_.y===g.y&&_.width===g.width&&_.height===g.height||n(),g=_,f=requestAnimationFrame(y)}(),n(),()=>{u.forEach(y=>{i&&y.removeEventListener("scroll",n),o&&y.removeEventListener("resize",n)}),d&&d(),h&&h.disconnect(),h=null,l&&cancelAnimationFrame(f)}}const nbe=(t,e,n)=>{const r=new Map,i={platform:ebe,...n},o={...i.platform,_c:r};return GSe(t,e,{...i,platform:o})},n9=t=>{const{element:e,padding:n}=t;function r(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:t,fn(i){return r(e)?e.current!=null?h4({element:e.current,padding:n}).fn(i):{}:e?h4({element:e,padding:n}).fn(i):{}}}};var U_=typeof document<"u"?M.useLayoutEffect:M.useEffect;function cw(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!=e.length)return!1;for(r=n;r--!==0;)if(!cw(t[r],e[r]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&t.$$typeof)&&!cw(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function w4(t){const e=M.useRef(t);return U_(()=>{e.current=t}),e}function rbe(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:i,whileElementsMounted:o,open:s}=t,[a,l]=M.useState({x:null,y:null,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[c,u]=M.useState(r);cw(c,r)||u(r);const d=M.useRef(null),f=M.useRef(null),h=M.useRef(a),g=w4(o),y=w4(i),[_,v]=M.useState(null),[x,w]=M.useState(null),S=M.useCallback(A=>{d.current!==A&&(d.current=A,v(A))},[]),E=M.useCallback(A=>{f.current!==A&&(f.current=A,w(A))},[]),C=M.useCallback(()=>{if(!d.current||!f.current)return;const A={placement:e,strategy:n,middleware:c};y.current&&(A.platform=y.current),nbe(d.current,f.current,A).then(F=>{const N={...F,isPositioned:!0};O.current&&!cw(h.current,N)&&(h.current=N,bg.flushSync(()=>{l(N)}))})},[c,e,n,y]);U_(()=>{s===!1&&h.current.isPositioned&&(h.current.isPositioned=!1,l(A=>({...A,isPositioned:!1})))},[s]);const O=M.useRef(!1);U_(()=>(O.current=!0,()=>{O.current=!1}),[]),U_(()=>{if(_&&x){if(g.current)return g.current(_,x,C);C()}},[_,x,C,g]);const R=M.useMemo(()=>({reference:d,floating:f,setReference:S,setFloating:E}),[S,E]),T=M.useMemo(()=>({reference:_,floating:x}),[_,x]);return M.useMemo(()=>({...a,update:C,refs:R,elements:T,reference:S,floating:E}),[a,C,R,T,S,E])}var fh=typeof document<"u"?M.useLayoutEffect:M.useEffect;let AP=!1,ibe=0;const S4=()=>"floating-ui-"+ibe++;function obe(){const[t,e]=M.useState(()=>AP?S4():void 0);return fh(()=>{t==null&&e(S4())},[]),M.useEffect(()=>{AP||(AP=!0)},[]),t}const sbe=W_["useId".toString()],b4=sbe||obe;function abe(){const t=new Map;return{emit(e,n){var r;(r=t.get(e))==null||r.forEach(i=>i(n))},on(e,n){t.set(e,[...t.get(e)||[],n])},off(e,n){t.set(e,(t.get(e)||[]).filter(r=>r!==n))}}}const lbe=M.createContext(null),cbe=M.createContext(null),r9=()=>{var t;return((t=M.useContext(lbe))==null?void 0:t.id)||null},bA=()=>M.useContext(cbe);function nc(t){return t?.ownerDocument||document}function ube(){const t=navigator.userAgentData;return t!=null&&t.platform?t.platform:navigator.platform}function dbe(){const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map(e=>{let{brand:n,version:r}=e;return n+"/"+r}).join(" "):navigator.userAgent}function MA(t){return nc(t).defaultView||window}function Sa(t){return t?t instanceof MA(t).Element:!1}function i9(t){return t?t instanceof MA(t).HTMLElement:!1}function fbe(t){if(typeof ShadowRoot>"u")return!1;const e=MA(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function hbe(t){if(t.mozInputSource===0&&t.isTrusted)return!0;const e=/Android/i;return(e.test(ube())||e.test(dbe()))&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function pbe(t){return t.width===0&&t.height===0||t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType!=="mouse"||t.width<1&&t.height<1&&t.pressure===0&&t.detail===0}function o9(t,e){const n=["mouse","pen"];return e||n.push("",void 0),n.includes(t)}function M4(t){const e=M.useRef(t);return fh(()=>{e.current=t}),e}const E4="data-floating-ui-safe-polygon";function B_(t,e,n){return n&&!o9(n)?0:typeof t=="number"?t:t?.[e]}const mbe=function(t,e){let{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:o=!1,restMs:s=0,move:a=!0}=e===void 0?{}:e;const{open:l,onOpenChange:c,dataRef:u,events:d,elements:{domReference:f,floating:h},refs:g}=t,y=bA(),_=r9(),v=M4(i),x=M4(r),w=M.useRef(),S=M.useRef(),E=M.useRef(),C=M.useRef(),O=M.useRef(!0),R=M.useRef(!1),T=M.useRef(()=>{}),A=M.useCallback(()=>{var k;const z=(k=u.current.openEvent)==null?void 0:k.type;return z?.includes("mouse")&&z!=="mousedown"},[u]);M.useEffect(()=>{if(!n)return;function k(){clearTimeout(S.current),clearTimeout(C.current),O.current=!0}return d.on("dismiss",k),()=>{d.off("dismiss",k)}},[n,d]),M.useEffect(()=>{if(!n||!v.current||!l)return;function k(){A()&&c(!1)}const z=nc(h).documentElement;return z.addEventListener("mouseleave",k),()=>{z.removeEventListener("mouseleave",k)}},[h,l,c,n,v,u,A]);const F=M.useCallback(function(k){k===void 0&&(k=!0);const z=B_(x.current,"close",w.current);z&&!E.current?(clearTimeout(S.current),S.current=setTimeout(()=>c(!1),z)):k&&(clearTimeout(S.current),c(!1))},[x,c]),N=M.useCallback(()=>{T.current(),E.current=void 0},[]),U=M.useCallback(()=>{if(R.current){const k=nc(g.floating.current).body;k.style.pointerEvents="",k.removeAttribute(E4),R.current=!1}},[g]);return M.useEffect(()=>{if(!n)return;function k(){return u.current.openEvent?["click","mousedown"].includes(u.current.openEvent.type):!1}function z(B){if(clearTimeout(S.current),O.current=!1,o&&!o9(w.current)||s>0&&B_(x.current,"open")===0)return;u.current.openEvent=B;const j=B_(x.current,"open",w.current);j?S.current=setTimeout(()=>{c(!0)},j):c(!0)}function G(B){if(k())return;T.current();const j=nc(h);if(clearTimeout(C.current),v.current){l||clearTimeout(S.current),E.current=v.current({...t,tree:y,x:B.clientX,y:B.clientY,onClose(){U(),N(),F()}});const $=E.current;j.addEventListener("mousemove",$),T.current=()=>{j.removeEventListener("mousemove",$)};return}F()}function W(B){k()||v.current==null||v.current({...t,tree:y,x:B.clientX,y:B.clientY,onClose(){U(),N(),F()}})(B)}if(Sa(f)){const B=f;return l&&B.addEventListener("mouseleave",W),h?.addEventListener("mouseleave",W),a&&B.addEventListener("mousemove",z,{once:!0}),B.addEventListener("mouseenter",z),B.addEventListener("mouseleave",G),()=>{l&&B.removeEventListener("mouseleave",W),h?.removeEventListener("mouseleave",W),a&&B.removeEventListener("mousemove",z),B.removeEventListener("mouseenter",z),B.removeEventListener("mouseleave",G)}}},[f,h,n,t,o,s,a,F,N,U,c,l,y,x,v,u]),fh(()=>{var k;if(n&&l&&(k=v.current)!=null&&k.__options.blockPointerEvents&&A()){const W=nc(h).body;if(W.setAttribute(E4,""),W.style.pointerEvents="none",R.current=!0,Sa(f)&&h){var z,G;const B=f,j=y==null||(z=y.nodesRef.current.find($=>$.id===_))==null||(G=z.context)==null?void 0:G.elements.floating;return j&&(j.style.pointerEvents=""),B.style.pointerEvents="auto",h.style.pointerEvents="auto",()=>{B.style.pointerEvents="",h.style.pointerEvents=""}}}},[n,l,_,h,f,y,v,u,A]),fh(()=>{l||(w.current=void 0,N(),U())},[l,N,U]),M.useEffect(()=>()=>{N(),clearTimeout(S.current),clearTimeout(C.current),U()},[n,N,U]),M.useMemo(()=>{if(!n)return{};function k(z){w.current=z.pointerType}return{reference:{onPointerDown:k,onPointerEnter:k,onMouseMove(){l||s===0||(clearTimeout(C.current),C.current=setTimeout(()=>{O.current||c(!0)},s))}},floating:{onMouseEnter(){clearTimeout(S.current)},onMouseLeave(){d.emit("dismiss",{type:"mouseLeave",data:{returnFocus:!1}}),F(!1)}}}},[d,n,s,l,c,F])},s9=M.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:()=>{},setState:()=>{},isInstantPhase:!1}),a9=()=>M.useContext(s9),gbe=t=>{let{children:e,delay:n,timeoutMs:r=0}=t;const[i,o]=M.useReducer((l,c)=>({...l,...c}),{delay:n,timeoutMs:r,initialDelay:n,currentId:null,isInstantPhase:!1}),s=M.useRef(null),a=M.useCallback(l=>{o({currentId:l})},[]);return fh(()=>{i.currentId?s.current===null?s.current=i.currentId:o({isInstantPhase:!0}):(o({isInstantPhase:!1}),s.current=null)},[i.currentId]),M.createElement(s9.Provider,{value:M.useMemo(()=>({...i,setState:o,setCurrentId:a}),[i,o,a])},e)},vbe=(t,e)=>{let{open:n,onOpenChange:r}=t,{id:i}=e;const{currentId:o,setCurrentId:s,initialDelay:a,setState:l,timeoutMs:c}=a9();M.useEffect(()=>{o&&(l({delay:{open:1,close:B_(a,"close")}}),o!==i&&r(!1))},[i,r,l,o,a]),M.useEffect(()=>{function u(){r(!1),l({delay:a,currentId:null})}if(!n&&o===i)if(c){const d=window.setTimeout(u,c);return()=>{clearTimeout(d)}}else u()},[n,l,o,i,r,a,c]),M.useEffect(()=>{n&&s(i)},[n,s,i])};function ybe(t){let e=t.activeElement;for(;((n=e)==null||(r=n.shadowRoot)==null?void 0:r.activeElement)!=null;){var n,r;e=e.shadowRoot.activeElement}return e}function P4(t,e){if(!t||!e)return!1;const n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&fbe(n)){let r=e;do{if(r&&t===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function DP(t,e){let n=t.filter(i=>{var o;return i.parentId===e&&((o=i.context)==null?void 0:o.open)})||[],r=n;for(;r.length;)r=t.filter(i=>{var o;return(o=r)==null?void 0:o.some(s=>{var a;return i.parentId===s.id&&((a=i.context)==null?void 0:a.open)})})||[],n=n.concat(r);return n}function _be(t){return"composedPath"in t?t.composedPath()[0]:t.target}const xbe=W_["useInsertionEffect".toString()],wbe=xbe||(t=>t());function l9(t){const e=M.useRef(()=>{});return wbe(()=>{e.current=t}),M.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i!1),E=typeof f=="function"?S:f,C=M.useRef(!1),{escapeKeyBubbles:O,outsidePressBubbles:R}=Mbe(v);return M.useEffect(()=>{if(!n||!u)return;c.current.__escapeKeyBubbles=O,c.current.__outsidePressBubbles=R;function T(k){if(k.key==="Escape"){const z=x?DP(x.nodesRef.current,o):[];if(z.length>0){let G=!0;if(z.forEach(W=>{var B;if((B=W.context)!=null&&B.open&&!W.context.dataRef.current.__escapeKeyBubbles){G=!1;return}}),!G)return}i.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1)}}function A(k){const z=C.current;if(C.current=!1,z||typeof E=="function"&&!E(k))return;const G=_be(k);if(i9(G)&&l){const j=l.ownerDocument.defaultView||window,$=G.scrollWidth>G.clientWidth,q=G.scrollHeight>G.clientHeight;let K=q&&k.offsetX>G.clientWidth;if(q&&j.getComputedStyle(G).direction==="rtl"&&(K=k.offsetX<=G.offsetWidth-G.clientWidth),K||$&&k.offsetY>G.clientHeight)return}const W=x&&DP(x.nodesRef.current,o).some(j=>{var $;return H_(k,($=j.context)==null?void 0:$.elements.floating)});if(H_(k,l)||H_(k,a)||W)return;const B=x?DP(x.nodesRef.current,o):[];if(B.length>0){let j=!0;if(B.forEach($=>{var q;if((q=$.context)!=null&&q.open&&!$.context.dataRef.current.__outsidePressBubbles){j=!1;return}}),!j)return}i.emit("dismiss",{type:"outsidePress",data:{returnFocus:w?{preventScroll:!0}:hbe(k)||pbe(k)}}),r(!1)}function F(){r(!1)}const N=nc(l);d&&N.addEventListener("keydown",T),E&&N.addEventListener(h,A);let U=[];return _&&(Sa(a)&&(U=mc(a)),Sa(l)&&(U=U.concat(mc(l))),!Sa(s)&&s&&s.contextElement&&(U=U.concat(mc(s.contextElement)))),U=U.filter(k=>{var z;return k!==((z=N.defaultView)==null?void 0:z.visualViewport)}),U.forEach(k=>{k.addEventListener("scroll",F,{passive:!0})}),()=>{d&&N.removeEventListener("keydown",T),E&&N.removeEventListener(h,A),U.forEach(k=>{k.removeEventListener("scroll",F)})}},[c,l,a,s,d,E,h,i,x,o,n,r,_,u,O,R,w]),M.useEffect(()=>{C.current=!1},[E,h]),M.useMemo(()=>u?{reference:{[Sbe[y]]:()=>{g&&(i.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1))}},floating:{[bbe[h]]:()=>{C.current=!0}}}:{},[u,i,g,h,y,r])},Pbe=function(t,e){let{open:n,onOpenChange:r,dataRef:i,events:o,refs:s,elements:{floating:a,domReference:l}}=t,{enabled:c=!0,keyboardOnly:u=!0}=e===void 0?{}:e;const d=M.useRef(""),f=M.useRef(!1),h=M.useRef();return M.useEffect(()=>{if(!c)return;const y=nc(a).defaultView||window;function _(){!n&&i9(l)&&l===ybe(nc(l))&&(f.current=!0)}return y.addEventListener("blur",_),()=>{y.removeEventListener("blur",_)}},[a,l,n,c]),M.useEffect(()=>{if(!c)return;function g(y){(y.type==="referencePress"||y.type==="escapeKey")&&(f.current=!0)}return o.on("dismiss",g),()=>{o.off("dismiss",g)}},[o,c]),M.useEffect(()=>()=>{clearTimeout(h.current)},[]),M.useMemo(()=>c?{reference:{onPointerDown(g){let{pointerType:y}=g;d.current=y,f.current=!!(y&&u)},onMouseLeave(){f.current=!1},onFocus(g){var y;f.current||g.type==="focus"&&((y=i.current.openEvent)==null?void 0:y.type)==="mousedown"&&i.current.openEvent&&H_(i.current.openEvent,l)||(i.current.openEvent=g.nativeEvent,r(!0))},onBlur(g){f.current=!1;const y=g.relatedTarget,_=Sa(y)&&y.hasAttribute("data-floating-ui-focus-guard")&&y.getAttribute("data-type")==="outside";h.current=setTimeout(()=>{P4(s.floating.current,y)||P4(l,y)||_||r(!1)})}}}:{},[c,u,l,s,i,r])},Cbe=function(t,e){let{open:n}=t,{enabled:r=!0,role:i="dialog"}=e===void 0?{}:e;const o=b4(),s=b4();return M.useMemo(()=>{const a={id:o,role:i};return r?i==="tooltip"?{reference:{"aria-describedby":n?o:void 0},floating:a}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":i==="alertdialog"?"dialog":i,"aria-controls":n?o:void 0,...i==="listbox"&&{role:"combobox"},...i==="menu"&&{id:s}},floating:{...a,...i==="menu"&&{"aria-labelledby":s}}}:{}},[r,i,n,o,s])};function EA(t){t===void 0&&(t={});const{open:e=!1,onOpenChange:n,nodeId:r}=t,i=rbe(t),o=bA(),s=M.useRef(null),a=M.useRef({}),l=M.useState(()=>abe())[0],[c,u]=M.useState(null),d=M.useCallback(v=>{const x=Sa(v)?{getBoundingClientRect:()=>v.getBoundingClientRect(),contextElement:v}:v;i.refs.setReference(x)},[i.refs]),f=M.useCallback(v=>{(Sa(v)||v===null)&&(s.current=v,u(v)),(Sa(i.refs.reference.current)||i.refs.reference.current===null||v!==null&&!Sa(v))&&i.refs.setReference(v)},[i.refs]),h=M.useMemo(()=>({...i.refs,setReference:f,setPositionReference:d,domReference:s}),[i.refs,f,d]),g=M.useMemo(()=>({...i.elements,domReference:c}),[i.elements,c]),y=l9(n),_=M.useMemo(()=>({...i,refs:h,elements:g,dataRef:a,nodeId:r,events:l,open:e,onOpenChange:y}),[i,r,l,e,y,h,g]);return fh(()=>{const v=o?.nodesRef.current.find(x=>x.id===r);v&&(v.context=_)}),M.useMemo(()=>({...i,context:_,refs:h,reference:f,positionReference:d}),[i,h,_,f,d])}function IP(t,e,n){const r=new Map;return{...n==="floating"&&{tabIndex:-1},...t,...e.map(i=>i?i[n]:null).concat(t).reduce((i,o)=>(o&&Object.entries(o).forEach(s=>{let[a,l]=s;if(a.indexOf("on")===0){if(r.has(a)||r.set(a,[]),typeof l=="function"){var c;(c=r.get(a))==null||c.push(l),i[a]=function(){for(var u,d=arguments.length,f=new Array(d),h=0;hg(...f))}}}else i[a]=l}),i),{})}}const Tbe=function(t){t===void 0&&(t=[]);const e=t,n=M.useCallback(o=>IP(o,t,"reference"),e),r=M.useCallback(o=>IP(o,t,"floating"),e),i=M.useCallback(o=>IP(o,t,"item"),t.map(o=>o?.item));return M.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:i}),[n,r,i])};function c9({opened:t,floating:e,position:n,positionDependencies:r}){const[i,o]=M.useState(0);M.useEffect(()=>{if(e.refs.reference.current&&e.refs.floating.current)return tbe(e.refs.reference.current,e.refs.floating.current,e.update)},[e.refs.reference.current,e.refs.floating.current,t,i,n]),Qr(()=>{e.update()},r),Qr(()=>{o(s=>s+1)},[t])}function Obe(t){const e=[X7(t.offset)];return t.middlewares.shift&&e.push(xA({limiter:qSe()})),t.middlewares.flip&&e.push(W7()),t.middlewares.inline&&e.push(Y7()),e.push(n9({element:t.arrowRef,padding:t.arrowOffset})),e}function Rbe(t){const[e,n]=Ar({value:t.opened,defaultValue:t.defaultOpened,finalValue:!1,onChange:t.onChange}),r=()=>{var s;(s=t.onClose)==null||s.call(t),n(!1)},i=()=>{var s,a;e?((s=t.onClose)==null||s.call(t),n(!1)):((a=t.onOpen)==null||a.call(t),n(!0))},o=EA({placement:t.position,middleware:[...Obe(t),...t.width==="target"?[KSe({apply({rects:s}){var a,l;Object.assign((l=(a=o.refs.floating.current)==null?void 0:a.style)!=null?l:{},{width:`${s.reference.width}px`})}})]:[]]});return c9({opened:t.opened,position:t.position,positionDependencies:t.positionDependencies,floating:o}),Qr(()=>{var s;(s=t.onPositionChange)==null||s.call(t,o.placement)},[o.placement]),Qr(()=>{var s,a;t.opened?(a=t.onOpen)==null||a.call(t):(s=t.onClose)==null||s.call(t)},[t.opened]),{floating:o,controlled:typeof t.opened=="boolean",opened:e,onClose:r,onToggle:i}}const u9={context:"Popover component was not found in the tree",children:"Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"},[Abe,d9]=cd(u9.context);var Dbe=Object.defineProperty,Ibe=Object.defineProperties,Lbe=Object.getOwnPropertyDescriptors,uw=Object.getOwnPropertySymbols,f9=Object.prototype.hasOwnProperty,h9=Object.prototype.propertyIsEnumerable,C4=(t,e,n)=>e in t?Dbe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Uy=(t,e)=>{for(var n in e||(e={}))f9.call(e,n)&&C4(t,n,e[n]);if(uw)for(var n of uw(e))h9.call(e,n)&&C4(t,n,e[n]);return t},kbe=(t,e)=>Ibe(t,Lbe(e)),Nbe=(t,e)=>{var n={};for(var r in t)f9.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&uw)for(var r of uw(t))e.indexOf(r)<0&&h9.call(t,r)&&(n[r]=t[r]);return n};const Fbe={refProp:"ref",popupType:"dialog"},p9=M.forwardRef((t,e)=>{const n=nt("PopoverTarget",Fbe,t),{children:r,refProp:i,popupType:o}=n,s=Nbe(n,["children","refProp","popupType"]);if(!Yg(r))throw new Error(u9.children);const a=s,l=d9(),c=Da(l.reference,r.ref,e),u=l.withRoles?{"aria-haspopup":o,"aria-expanded":l.opened,"aria-controls":l.getDropdownId(),id:l.getTargetId()}:{};return M.cloneElement(r,Uy(kbe(Uy(Uy(Uy({},a),u),l.targetProps),{className:OG(l.targetProps.className,a.className,r.props.className),[i]:c}),l.controlled?null:{onClick:l.onToggle}))});p9.displayName="@mantine/core/PopoverTarget";var zbe=ft((t,{radius:e,shadow:n})=>({dropdown:{position:"absolute",backgroundColor:t.white,background:t.colorScheme==="dark"?t.colors.dark[6]:t.white,border:`${X(1)} solid ${t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[2]}`,padding:`${t.spacing.sm} ${t.spacing.md}`,boxShadow:t.shadows[n]||n||"none",borderRadius:t.fn.radius(e),"&:focus":{outline:0}},arrow:{backgroundColor:"inherit",border:`${X(1)} solid ${t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[2]}`,zIndex:1}}));const Ube=zbe;var Bbe=Object.defineProperty,T4=Object.getOwnPropertySymbols,Hbe=Object.prototype.hasOwnProperty,Vbe=Object.prototype.propertyIsEnumerable,O4=(t,e,n)=>e in t?Bbe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,af=(t,e)=>{for(var n in e||(e={}))Hbe.call(e,n)&&O4(t,n,e[n]);if(T4)for(var n of T4(e))Vbe.call(e,n)&&O4(t,n,e[n]);return t};const R4={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function jbe({transition:t,state:e,duration:n,timingFunction:r}){const i={transitionDuration:`${n}ms`,transitionTimingFunction:r};return typeof t=="string"?t in Ty?af(af(af({transitionProperty:Ty[t].transitionProperty},i),Ty[t].common),Ty[t][R4[e]]):null:af(af(af({transitionProperty:t.transitionProperty},i),t.common),t[R4[e]])}function $be({duration:t,exitDuration:e,timingFunction:n,mounted:r,onEnter:i,onExit:o,onEntered:s,onExited:a}){const l=Ir(),c=ob(),u=l.respectReducedMotion?c:!1,[d,f]=M.useState(u?0:t),[h,g]=M.useState(r?"entered":"exited"),y=M.useRef(-1),_=v=>{const x=v?i:o,w=v?s:a;g(v?"pre-entering":"pre-exiting"),window.clearTimeout(y.current);const S=u?0:v?t:e;if(f(S),S===0)typeof x=="function"&&x(),typeof w=="function"&&w(),g(v?"entered":"exited");else{const E=window.setTimeout(()=>{typeof x=="function"&&x(),g(v?"entering":"exiting")},10);y.current=window.setTimeout(()=>{window.clearTimeout(E),typeof w=="function"&&w(),g(v?"entered":"exited")},S)}};return Qr(()=>{_(r)},[r]),M.useEffect(()=>()=>window.clearTimeout(y.current),[]),{transitionDuration:d,transitionStatus:h,transitionTimingFunction:n||l.transitionTimingFunction}}function zc({keepMounted:t,transition:e,duration:n=250,exitDuration:r=n,mounted:i,children:o,timingFunction:s,onExit:a,onEntered:l,onEnter:c,onExited:u}){const{transitionDuration:d,transitionStatus:f,transitionTimingFunction:h}=$be({mounted:i,exitDuration:r,duration:n,timingFunction:s,onExit:a,onEntered:l,onEnter:c,onExited:u});return d===0?i?H.createElement(H.Fragment,null,o({})):t?o({display:"none"}):null:f==="exited"?t?o({display:"none"}):null:H.createElement(H.Fragment,null,o(jbe({transition:e,duration:d,state:f,timingFunction:h})))}zc.displayName="@mantine/core/Transition";function PA({children:t,active:e=!0,refProp:n="ref"}){const r=Nye(e),i=Da(r,t?.ref);return Yg(t)?M.cloneElement(t,{[n]:i}):t}PA.displayName="@mantine/core/FocusTrap";var Gbe=Object.defineProperty,Wbe=Object.defineProperties,Ybe=Object.getOwnPropertyDescriptors,A4=Object.getOwnPropertySymbols,Xbe=Object.prototype.hasOwnProperty,Zbe=Object.prototype.propertyIsEnumerable,D4=(t,e,n)=>e in t?Gbe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Hl=(t,e)=>{for(var n in e||(e={}))Xbe.call(e,n)&&D4(t,n,e[n]);if(A4)for(var n of A4(e))Zbe.call(e,n)&&D4(t,n,e[n]);return t},By=(t,e)=>Wbe(t,Ybe(e));function I4(t,e,n,r){return t==="center"||r==="center"?{top:e}:t==="end"?{bottom:n}:t==="start"?{top:n}:{}}function L4(t,e,n,r,i){return t==="center"||r==="center"?{left:e}:t==="end"?{[i==="ltr"?"right":"left"]:n}:t==="start"?{[i==="ltr"?"left":"right"]:n}:{}}const qbe={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function Kbe({position:t,arrowSize:e,arrowOffset:n,arrowRadius:r,arrowPosition:i,arrowX:o,arrowY:s,dir:a}){const[l,c="center"]=t.split("-"),u={width:X(e),height:X(e),transform:"rotate(45deg)",position:"absolute",[qbe[l]]:X(r)},d=X(-e/2);return l==="left"?By(Hl(Hl({},u),I4(c,s,n,i)),{right:d,borderLeftColor:"transparent",borderBottomColor:"transparent"}):l==="right"?By(Hl(Hl({},u),I4(c,s,n,i)),{left:d,borderRightColor:"transparent",borderTopColor:"transparent"}):l==="top"?By(Hl(Hl({},u),L4(c,o,n,i,a)),{bottom:d,borderTopColor:"transparent",borderLeftColor:"transparent"}):l==="bottom"?By(Hl(Hl({},u),L4(c,o,n,i,a)),{top:d,borderBottomColor:"transparent",borderRightColor:"transparent"}):{}}var Qbe=Object.defineProperty,Jbe=Object.defineProperties,eMe=Object.getOwnPropertyDescriptors,dw=Object.getOwnPropertySymbols,m9=Object.prototype.hasOwnProperty,g9=Object.prototype.propertyIsEnumerable,k4=(t,e,n)=>e in t?Qbe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,tMe=(t,e)=>{for(var n in e||(e={}))m9.call(e,n)&&k4(t,n,e[n]);if(dw)for(var n of dw(e))g9.call(e,n)&&k4(t,n,e[n]);return t},nMe=(t,e)=>Jbe(t,eMe(e)),rMe=(t,e)=>{var n={};for(var r in t)m9.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&dw)for(var r of dw(t))e.indexOf(r)<0&&g9.call(t,r)&&(n[r]=t[r]);return n};const CA=M.forwardRef((t,e)=>{var n=t,{position:r,arrowSize:i,arrowOffset:o,arrowRadius:s,arrowPosition:a,visible:l,arrowX:c,arrowY:u}=n,d=rMe(n,["position","arrowSize","arrowOffset","arrowRadius","arrowPosition","visible","arrowX","arrowY"]);const f=Ir();return l?H.createElement("div",nMe(tMe({},d),{ref:e,style:Kbe({position:r,arrowSize:i,arrowOffset:o,arrowRadius:s,arrowPosition:a,dir:f.dir,arrowX:c,arrowY:u})})):null});CA.displayName="@mantine/core/FloatingArrow";var iMe=Object.defineProperty,oMe=Object.defineProperties,sMe=Object.getOwnPropertyDescriptors,fw=Object.getOwnPropertySymbols,v9=Object.prototype.hasOwnProperty,y9=Object.prototype.propertyIsEnumerable,N4=(t,e,n)=>e in t?iMe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,lf=(t,e)=>{for(var n in e||(e={}))v9.call(e,n)&&N4(t,n,e[n]);if(fw)for(var n of fw(e))y9.call(e,n)&&N4(t,n,e[n]);return t},Hy=(t,e)=>oMe(t,sMe(e)),aMe=(t,e)=>{var n={};for(var r in t)v9.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&fw)for(var r of fw(t))e.indexOf(r)<0&&y9.call(t,r)&&(n[r]=t[r]);return n};const lMe={};function _9(t){var e;const n=nt("PopoverDropdown",lMe,t),{style:r,className:i,children:o,onKeyDownCapture:s}=n,a=aMe(n,["style","className","children","onKeyDownCapture"]),l=d9(),{classes:c,cx:u}=Ube({radius:l.radius,shadow:l.shadow},{name:l.__staticSelector,classNames:l.classNames,styles:l.styles,unstyled:l.unstyled,variant:l.variant}),d=sW({opened:l.opened,shouldReturnFocus:l.returnFocus}),f=l.withRoles?{"aria-labelledby":l.getTargetId(),id:l.getDropdownId(),role:"dialog"}:{};return l.disabled?null:H.createElement(Kg,Hy(lf({},l.portalProps),{withinPortal:l.withinPortal}),H.createElement(zc,Hy(lf({mounted:l.opened},l.transitionProps),{transition:l.transitionProps.transition||"fade",duration:(e=l.transitionProps.duration)!=null?e:150,keepMounted:l.keepMounted,exitDuration:typeof l.transitionProps.exitDuration=="number"?l.transitionProps.exitDuration:l.transitionProps.duration}),h=>{var g,y;return H.createElement(PA,{active:l.trapFocus},H.createElement(Xe,lf(Hy(lf({},f),{tabIndex:-1,ref:l.floating,style:Hy(lf(lf({},r),h),{zIndex:l.zIndex,top:(g=l.y)!=null?g:0,left:(y=l.x)!=null?y:0,width:l.width==="target"?void 0:X(l.width)}),className:u(c.dropdown,i),onKeyDownCapture:fve(l.onClose,{active:l.closeOnEscape,onTrigger:d,onKeyDown:s}),"data-position":l.placement}),a),o,H.createElement(CA,{ref:l.arrowRef,arrowX:l.arrowX,arrowY:l.arrowY,visible:l.withArrow,position:l.placement,arrowSize:l.arrowSize,arrowRadius:l.arrowRadius,arrowOffset:l.arrowOffset,arrowPosition:l.arrowPosition,className:c.arrow})))}))}_9.displayName="@mantine/core/PopoverDropdown";function x9(t,e){if(t==="rtl"&&(e.includes("right")||e.includes("left"))){const[n,r]=e.split("-"),i=n==="right"?"left":"right";return r===void 0?i:`${i}-${r}`}return e}var F4=Object.getOwnPropertySymbols,cMe=Object.prototype.hasOwnProperty,uMe=Object.prototype.propertyIsEnumerable,dMe=(t,e)=>{var n={};for(var r in t)cMe.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&F4)for(var r of F4(t))e.indexOf(r)<0&&uMe.call(t,r)&&(n[r]=t[r]);return n};const fMe={position:"bottom",offset:8,positionDependencies:[],transitionProps:{transition:"fade",duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:"side",closeOnClickOutside:!0,withinPortal:!1,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,clickOutsideEvents:["mousedown","touchstart"],zIndex:Ys("popover"),__staticSelector:"Popover",width:"max-content"};function qi(t){var e,n,r,i,o,s;const a=M.useRef(null),l=nt("Popover",fMe,t),{children:c,position:u,offset:d,onPositionChange:f,positionDependencies:h,opened:g,transitionProps:y,width:_,middlewares:v,withArrow:x,arrowSize:w,arrowOffset:S,arrowRadius:E,arrowPosition:C,unstyled:O,classNames:R,styles:T,closeOnClickOutside:A,withinPortal:F,portalProps:N,closeOnEscape:U,clickOutsideEvents:k,trapFocus:z,onClose:G,onOpen:W,onChange:B,zIndex:j,radius:$,shadow:q,id:K,defaultOpened:re,__staticSelector:J,withRoles:le,disabled:ae,returnFocus:oe,variant:De,keepMounted:Te}=l,ve=dMe(l,["children","position","offset","onPositionChange","positionDependencies","opened","transitionProps","width","middlewares","withArrow","arrowSize","arrowOffset","arrowRadius","arrowPosition","unstyled","classNames","styles","closeOnClickOutside","withinPortal","portalProps","closeOnEscape","clickOutsideEvents","trapFocus","onClose","onOpen","onChange","zIndex","radius","shadow","id","defaultOpened","__staticSelector","withRoles","disabled","returnFocus","variant","keepMounted"]),[we,me]=M.useState(null),[se,de]=M.useState(null),ke=zo(K),Ve=Ir(),Ze=Rbe({middlewares:v,width:_,position:x9(Ve.dir,u),offset:typeof d=="number"?d+(x?w/2:0):d,arrowRef:a,arrowOffset:S,onPositionChange:f,positionDependencies:h,opened:g,defaultOpened:re,onChange:B,onOpen:W,onClose:G});Pye(()=>Ze.opened&&A&&Ze.onClose(),k,[we,se]);const ot=M.useCallback(We=>{me(We),Ze.floating.reference(We)},[Ze.floating.reference]),dt=M.useCallback(We=>{de(We),Ze.floating.floating(We)},[Ze.floating.floating]);return H.createElement(Abe,{value:{returnFocus:oe,disabled:ae,controlled:Ze.controlled,reference:ot,floating:dt,x:Ze.floating.x,y:Ze.floating.y,arrowX:(r=(n=(e=Ze.floating)==null?void 0:e.middlewareData)==null?void 0:n.arrow)==null?void 0:r.x,arrowY:(s=(o=(i=Ze.floating)==null?void 0:i.middlewareData)==null?void 0:o.arrow)==null?void 0:s.y,opened:Ze.opened,arrowRef:a,transitionProps:y,width:_,withArrow:x,arrowSize:w,arrowOffset:S,arrowRadius:E,arrowPosition:C,placement:Ze.floating.placement,trapFocus:z,withinPortal:F,portalProps:N,zIndex:j,radius:$,shadow:q,closeOnEscape:U,onClose:Ze.onClose,onToggle:Ze.onToggle,getTargetId:()=>`${ke}-target`,getDropdownId:()=>`${ke}-dropdown`,withRoles:le,targetProps:ve,__staticSelector:J,classNames:R,styles:T,unstyled:O,variant:De,keepMounted:Te}},c)}qi.Target=p9;qi.Dropdown=_9;qi.displayName="@mantine/core/Popover";var hMe=Object.defineProperty,hw=Object.getOwnPropertySymbols,w9=Object.prototype.hasOwnProperty,S9=Object.prototype.propertyIsEnumerable,z4=(t,e,n)=>e in t?hMe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,pMe=(t,e)=>{for(var n in e||(e={}))w9.call(e,n)&&z4(t,n,e[n]);if(hw)for(var n of hw(e))S9.call(e,n)&&z4(t,n,e[n]);return t},mMe=(t,e)=>{var n={};for(var r in t)w9.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&hw)for(var r of hw(t))e.indexOf(r)<0&&S9.call(t,r)&&(n[r]=t[r]);return n};function gMe(t){var e=t,{children:n,component:r="div",maxHeight:i=220,direction:o="column",id:s,innerRef:a,__staticSelector:l,styles:c,classNames:u,unstyled:d}=e,f=mMe(e,["children","component","maxHeight","direction","id","innerRef","__staticSelector","styles","classNames","unstyled"]);const{classes:h}=$Se(null,{name:l,styles:c,classNames:u,unstyled:d});return H.createElement(qi.Dropdown,pMe({p:0,onMouseDown:g=>g.preventDefault()},f),H.createElement("div",{style:{maxHeight:X(i),display:"flex"}},H.createElement(Xe,{component:r||"div",id:`${s}-items`,"aria-labelledby":`${s}-label`,role:"listbox",onMouseDown:g=>g.preventDefault(),style:{flex:1,overflowY:r!==ub?"auto":void 0},"data-combobox-popover":!0,tabIndex:-1,ref:a},H.createElement("div",{className:h.itemsWrapper,style:{flexDirection:o}},n))))}function gc({opened:t,transitionProps:e={transition:"fade",duration:0},shadow:n,withinPortal:r,portalProps:i,children:o,__staticSelector:s,onDirectionChange:a,switchDirectionOnFlip:l,zIndex:c,dropdownPosition:u,positionDependencies:d=[],classNames:f,styles:h,unstyled:g,readOnly:y,variant:_}){return H.createElement(qi,{unstyled:g,classNames:f,styles:h,width:"target",withRoles:!1,opened:t,middlewares:{flip:u==="flip",shift:!1},position:u==="flip"?"bottom":u,positionDependencies:d,zIndex:c,__staticSelector:s,withinPortal:r,portalProps:i,transitionProps:e,shadow:n,disabled:y,onPositionChange:v=>l&&a?.(v==="top"?"column-reverse":"column"),variant:_},o)}gc.Target=qi.Target;gc.Dropdown=gMe;var vMe=Object.defineProperty,yMe=Object.defineProperties,_Me=Object.getOwnPropertyDescriptors,pw=Object.getOwnPropertySymbols,b9=Object.prototype.hasOwnProperty,M9=Object.prototype.propertyIsEnumerable,U4=(t,e,n)=>e in t?vMe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Vy=(t,e)=>{for(var n in e||(e={}))b9.call(e,n)&&U4(t,n,e[n]);if(pw)for(var n of pw(e))M9.call(e,n)&&U4(t,n,e[n]);return t},xMe=(t,e)=>yMe(t,_Me(e)),wMe=(t,e)=>{var n={};for(var r in t)b9.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&pw)for(var r of pw(t))e.indexOf(r)<0&&M9.call(t,r)&&(n[r]=t[r]);return n};function hb(t,e,n){const r=nt(t,e,n),{label:i,description:o,error:s,required:a,classNames:l,styles:c,className:u,unstyled:d,__staticSelector:f,sx:h,errorProps:g,labelProps:y,descriptionProps:_,wrapperProps:v,id:x,size:w,style:S,inputContainer:E,inputWrapperOrder:C,withAsterisk:O,variant:R}=r,T=wMe(r,["label","description","error","required","classNames","styles","className","unstyled","__staticSelector","sx","errorProps","labelProps","descriptionProps","wrapperProps","id","size","style","inputContainer","inputWrapperOrder","withAsterisk","variant"]),A=zo(x),{systemStyles:F,rest:N}=Sl(T),U=Vy({label:i,description:o,error:s,required:a,classNames:l,className:u,__staticSelector:f,sx:h,errorProps:g,labelProps:y,descriptionProps:_,unstyled:d,styles:c,id:A,size:w,style:S,inputContainer:E,inputWrapperOrder:C,withAsterisk:O,variant:R},v);return xMe(Vy({},N),{classNames:l,styles:c,unstyled:d,wrapperProps:Vy(Vy({},U),F),inputProps:{required:a,classNames:l,styles:c,unstyled:d,id:A,size:w,__staticSelector:f,error:s,variant:R}})}var SMe=ft((t,e,{size:n})=>({label:{display:"inline-block",fontSize:Oe({size:n,sizes:t.fontSizes}),fontWeight:500,color:t.colorScheme==="dark"?t.colors.dark[0]:t.colors.gray[9],wordBreak:"break-word",cursor:"default",WebkitTapHighlightColor:"transparent"},required:{color:t.fn.variant({variant:"filled",color:"red"}).background}}));const bMe=SMe;var MMe=Object.defineProperty,mw=Object.getOwnPropertySymbols,E9=Object.prototype.hasOwnProperty,P9=Object.prototype.propertyIsEnumerable,B4=(t,e,n)=>e in t?MMe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,EMe=(t,e)=>{for(var n in e||(e={}))E9.call(e,n)&&B4(t,n,e[n]);if(mw)for(var n of mw(e))P9.call(e,n)&&B4(t,n,e[n]);return t},PMe=(t,e)=>{var n={};for(var r in t)E9.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&mw)for(var r of mw(t))e.indexOf(r)<0&&P9.call(t,r)&&(n[r]=t[r]);return n};const CMe={labelElement:"label",size:"sm"},TA=M.forwardRef((t,e)=>{const n=nt("InputLabel",CMe,t),{labelElement:r,children:i,required:o,size:s,classNames:a,styles:l,unstyled:c,className:u,htmlFor:d,__staticSelector:f,variant:h,onMouseDown:g}=n,y=PMe(n,["labelElement","children","required","size","classNames","styles","unstyled","className","htmlFor","__staticSelector","variant","onMouseDown"]),{classes:_,cx:v}=bMe(null,{name:["InputWrapper",f],classNames:a,styles:l,unstyled:c,variant:h,size:s});return H.createElement(Xe,EMe({component:r,ref:e,className:v(_.label,u),htmlFor:r==="label"?d:void 0,onMouseDown:x=>{g?.(x),!x.defaultPrevented&&x.detail>1&&x.preventDefault()}},y),i,o&&H.createElement("span",{className:_.required,"aria-hidden":!0}," *"))});TA.displayName="@mantine/core/InputLabel";var TMe=ft((t,e,{size:n})=>({error:{wordBreak:"break-word",color:t.fn.variant({variant:"filled",color:"red"}).background,fontSize:`calc(${Oe({size:n,sizes:t.fontSizes})} - ${X(2)})`,lineHeight:1.2,display:"block"}}));const OMe=TMe;var RMe=Object.defineProperty,gw=Object.getOwnPropertySymbols,C9=Object.prototype.hasOwnProperty,T9=Object.prototype.propertyIsEnumerable,H4=(t,e,n)=>e in t?RMe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,AMe=(t,e)=>{for(var n in e||(e={}))C9.call(e,n)&&H4(t,n,e[n]);if(gw)for(var n of gw(e))T9.call(e,n)&&H4(t,n,e[n]);return t},DMe=(t,e)=>{var n={};for(var r in t)C9.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&gw)for(var r of gw(t))e.indexOf(r)<0&&T9.call(t,r)&&(n[r]=t[r]);return n};const IMe={size:"sm"},OA=M.forwardRef((t,e)=>{const n=nt("InputError",IMe,t),{children:r,className:i,classNames:o,styles:s,unstyled:a,size:l,__staticSelector:c,variant:u}=n,d=DMe(n,["children","className","classNames","styles","unstyled","size","__staticSelector","variant"]),{classes:f,cx:h}=OMe(null,{name:["InputWrapper",c],classNames:o,styles:s,unstyled:a,variant:u,size:l});return H.createElement(Si,AMe({className:h(f.error,i),ref:e},d),r)});OA.displayName="@mantine/core/InputError";var LMe=ft((t,e,{size:n})=>({description:{wordBreak:"break-word",color:t.colorScheme==="dark"?t.colors.dark[2]:t.colors.gray[6],fontSize:`calc(${Oe({size:n,sizes:t.fontSizes})} - ${X(2)})`,lineHeight:1.2,display:"block"}}));const kMe=LMe;var NMe=Object.defineProperty,vw=Object.getOwnPropertySymbols,O9=Object.prototype.hasOwnProperty,R9=Object.prototype.propertyIsEnumerable,V4=(t,e,n)=>e in t?NMe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,FMe=(t,e)=>{for(var n in e||(e={}))O9.call(e,n)&&V4(t,n,e[n]);if(vw)for(var n of vw(e))R9.call(e,n)&&V4(t,n,e[n]);return t},zMe=(t,e)=>{var n={};for(var r in t)O9.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&vw)for(var r of vw(t))e.indexOf(r)<0&&R9.call(t,r)&&(n[r]=t[r]);return n};const UMe={size:"sm"},RA=M.forwardRef((t,e)=>{const n=nt("InputDescription",UMe,t),{children:r,className:i,classNames:o,styles:s,unstyled:a,size:l,__staticSelector:c,variant:u}=n,d=zMe(n,["children","className","classNames","styles","unstyled","size","__staticSelector","variant"]),{classes:f,cx:h}=kMe(null,{name:["InputWrapper",c],classNames:o,styles:s,unstyled:a,variant:u,size:l});return H.createElement(Si,FMe({color:"dimmed",className:h(f.description,i),ref:e,unstyled:a},d),r)});RA.displayName="@mantine/core/InputDescription";const A9=M.createContext({offsetBottom:!1,offsetTop:!1,describedBy:void 0}),BMe=A9.Provider,HMe=()=>M.useContext(A9);function VMe(t,{hasDescription:e,hasError:n}){const r=t.findIndex(l=>l==="input"),i=t[r-1],o=t[r+1];return{offsetBottom:e&&o==="description"||n&&o==="error",offsetTop:e&&i==="description"||n&&i==="error"}}var jMe=Object.defineProperty,$Me=Object.defineProperties,GMe=Object.getOwnPropertyDescriptors,j4=Object.getOwnPropertySymbols,WMe=Object.prototype.hasOwnProperty,YMe=Object.prototype.propertyIsEnumerable,$4=(t,e,n)=>e in t?jMe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,XMe=(t,e)=>{for(var n in e||(e={}))WMe.call(e,n)&&$4(t,n,e[n]);if(j4)for(var n of j4(e))YMe.call(e,n)&&$4(t,n,e[n]);return t},ZMe=(t,e)=>$Me(t,GMe(e)),qMe=ft(t=>({root:ZMe(XMe({},t.fn.fontStyles()),{lineHeight:t.lineHeight})}));const KMe=qMe;var QMe=Object.defineProperty,JMe=Object.defineProperties,eEe=Object.getOwnPropertyDescriptors,yw=Object.getOwnPropertySymbols,D9=Object.prototype.hasOwnProperty,I9=Object.prototype.propertyIsEnumerable,G4=(t,e,n)=>e in t?QMe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Vl=(t,e)=>{for(var n in e||(e={}))D9.call(e,n)&&G4(t,n,e[n]);if(yw)for(var n of yw(e))I9.call(e,n)&&G4(t,n,e[n]);return t},W4=(t,e)=>JMe(t,eEe(e)),tEe=(t,e)=>{var n={};for(var r in t)D9.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&yw)for(var r of yw(t))e.indexOf(r)<0&&I9.call(t,r)&&(n[r]=t[r]);return n};const nEe={labelElement:"label",size:"sm",inputContainer:t=>t,inputWrapperOrder:["label","description","input","error"]},L9=M.forwardRef((t,e)=>{const n=nt("InputWrapper",nEe,t),{className:r,label:i,children:o,required:s,id:a,error:l,description:c,labelElement:u,labelProps:d,descriptionProps:f,errorProps:h,classNames:g,styles:y,size:_,inputContainer:v,__staticSelector:x,unstyled:w,inputWrapperOrder:S,withAsterisk:E,variant:C}=n,O=tEe(n,["className","label","children","required","id","error","description","labelElement","labelProps","descriptionProps","errorProps","classNames","styles","size","inputContainer","__staticSelector","unstyled","inputWrapperOrder","withAsterisk","variant"]),{classes:R,cx:T}=KMe(null,{classNames:g,styles:y,name:["InputWrapper",x],unstyled:w,variant:C,size:_}),A={classNames:g,styles:y,unstyled:w,size:_,variant:C,__staticSelector:x},F=typeof E=="boolean"?E:s,N=a?`${a}-error`:h?.id,U=a?`${a}-description`:f?.id,z=`${!!l&&typeof l!="boolean"?N:""} ${c?U:""}`,G=z.trim().length>0?z.trim():void 0,W=i&&H.createElement(TA,Vl(Vl({key:"label",labelElement:u,id:a?`${a}-label`:void 0,htmlFor:a,required:F},A),d),i),B=c&&H.createElement(RA,W4(Vl(Vl({key:"description"},f),A),{size:f?.size||A.size,id:f?.id||U}),c),j=H.createElement(M.Fragment,{key:"input"},v(o)),$=typeof l!="boolean"&&l&&H.createElement(OA,W4(Vl(Vl({},h),A),{size:h?.size||A.size,key:"error",id:h?.id||N}),l),q=S.map(K=>{switch(K){case"label":return W;case"input":return j;case"description":return B;case"error":return $;default:return null}});return H.createElement(BMe,{value:Vl({describedBy:G},VMe(S,{hasDescription:!!B,hasError:!!$}))},H.createElement(Xe,Vl({className:T(R.root,r),ref:e},O),q))});L9.displayName="@mantine/core/InputWrapper";var rEe=Object.defineProperty,_w=Object.getOwnPropertySymbols,k9=Object.prototype.hasOwnProperty,N9=Object.prototype.propertyIsEnumerable,Y4=(t,e,n)=>e in t?rEe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,iEe=(t,e)=>{for(var n in e||(e={}))k9.call(e,n)&&Y4(t,n,e[n]);if(_w)for(var n of _w(e))N9.call(e,n)&&Y4(t,n,e[n]);return t},oEe=(t,e)=>{var n={};for(var r in t)k9.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&_w)for(var r of _w(t))e.indexOf(r)<0&&N9.call(t,r)&&(n[r]=t[r]);return n};const sEe={},F9=M.forwardRef((t,e)=>{const n=nt("InputPlaceholder",sEe,t),{sx:r}=n,i=oEe(n,["sx"]);return H.createElement(Xe,iEe({component:"span",sx:[o=>o.fn.placeholderStyles(),...Ch(r)],ref:e},i))});F9.displayName="@mantine/core/InputPlaceholder";var aEe=Object.defineProperty,lEe=Object.defineProperties,cEe=Object.getOwnPropertyDescriptors,X4=Object.getOwnPropertySymbols,uEe=Object.prototype.hasOwnProperty,dEe=Object.prototype.propertyIsEnumerable,Z4=(t,e,n)=>e in t?aEe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,jy=(t,e)=>{for(var n in e||(e={}))uEe.call(e,n)&&Z4(t,n,e[n]);if(X4)for(var n of X4(e))dEe.call(e,n)&&Z4(t,n,e[n]);return t},LP=(t,e)=>lEe(t,cEe(e));const yi={xs:X(30),sm:X(36),md:X(42),lg:X(50),xl:X(60)},fEe=["default","filled","unstyled"];function hEe({theme:t,variant:e}){return fEe.includes(e)?e==="default"?{border:`${X(1)} solid ${t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[4]}`,backgroundColor:t.colorScheme==="dark"?t.colors.dark[6]:t.white,transition:"border-color 100ms ease","&:focus, &:focus-within":t.focusRingStyles.inputStyles(t)}:e==="filled"?{border:`${X(1)} solid transparent`,backgroundColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[1],"&:focus, &:focus-within":t.focusRingStyles.inputStyles(t)}:{borderWidth:0,color:t.colorScheme==="dark"?t.colors.dark[0]:t.black,backgroundColor:"transparent",minHeight:X(28),outline:0,"&:focus, &:focus-within":{outline:"none",borderColor:"transparent"},"&:disabled":{backgroundColor:"transparent","&:focus, &:focus-within":{outline:"none",borderColor:"transparent"}}}:null}var pEe=ft((t,{multiline:e,radius:n,invalid:r,rightSectionWidth:i,withRightSection:o,iconWidth:s,offsetBottom:a,offsetTop:l,pointer:c},{variant:u,size:d})=>{const f=t.fn.variant({variant:"filled",color:"red"}).background,h=u==="default"||u==="filled"?{minHeight:Oe({size:d,sizes:yi}),paddingLeft:`calc(${Oe({size:d,sizes:yi})} / 3)`,paddingRight:o?i||Oe({size:d,sizes:yi}):`calc(${Oe({size:d,sizes:yi})} / 3)`,borderRadius:t.fn.radius(n)}:u==="unstyled"&&o?{paddingRight:i||Oe({size:d,sizes:yi})}:null;return{wrapper:{position:"relative",marginTop:l?`calc(${t.spacing.xs} / 2)`:void 0,marginBottom:a?`calc(${t.spacing.xs} / 2)`:void 0,"&:has(input:disabled)":{"& .mantine-Input-rightSection":{display:"none"}}},input:LP(jy(jy(LP(jy({},t.fn.fontStyles()),{height:e?u==="unstyled"?void 0:"auto":Oe({size:d,sizes:yi}),WebkitTapHighlightColor:"transparent",lineHeight:e?t.lineHeight:`calc(${Oe({size:d,sizes:yi})} - ${X(2)})`,appearance:"none",resize:"none",boxSizing:"border-box",fontSize:Oe({size:d,sizes:t.fontSizes}),width:"100%",color:t.colorScheme==="dark"?t.colors.dark[0]:t.black,display:"block",textAlign:"left",cursor:c?"pointer":void 0}),hEe({theme:t,variant:u})),h),{"&:disabled, &[data-disabled]":{backgroundColor:t.colorScheme==="dark"?t.colors.dark[6]:t.colors.gray[1],color:t.colors.dark[2],opacity:.6,cursor:"not-allowed",pointerEvents:"none","&::placeholder":{color:t.colors.dark[2]}},"&[data-invalid]":{color:f,borderColor:f,"&::placeholder":{opacity:1,color:f}},"&[data-with-icon]":{paddingLeft:typeof s=="number"?X(s):Oe({size:d,sizes:yi})},"&::placeholder":LP(jy({},t.fn.placeholderStyles()),{opacity:1}),"&::-webkit-inner-spin-button, &::-webkit-outer-spin-button, &::-webkit-search-decoration, &::-webkit-search-cancel-button, &::-webkit-search-results-button, &::-webkit-search-results-decoration":{appearance:"none"},"&[type=number]":{MozAppearance:"textfield"}}),icon:{pointerEvents:"none",position:"absolute",zIndex:1,left:0,top:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",width:s?X(s):Oe({size:d,sizes:yi}),color:r?t.colors.red[t.colorScheme==="dark"?6:7]:t.colorScheme==="dark"?t.colors.dark[2]:t.colors.gray[5]},rightSection:{position:"absolute",top:0,bottom:0,right:0,display:"flex",alignItems:"center",justifyContent:"center",width:i||Oe({size:d,sizes:yi})}}});const mEe=pEe;var gEe=Object.defineProperty,vEe=Object.defineProperties,yEe=Object.getOwnPropertyDescriptors,xw=Object.getOwnPropertySymbols,z9=Object.prototype.hasOwnProperty,U9=Object.prototype.propertyIsEnumerable,q4=(t,e,n)=>e in t?gEe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$y=(t,e)=>{for(var n in e||(e={}))z9.call(e,n)&&q4(t,n,e[n]);if(xw)for(var n of xw(e))U9.call(e,n)&&q4(t,n,e[n]);return t},K4=(t,e)=>vEe(t,yEe(e)),_Ee=(t,e)=>{var n={};for(var r in t)z9.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&xw)for(var r of xw(t))e.indexOf(r)<0&&U9.call(t,r)&&(n[r]=t[r]);return n};const xEe={size:"sm",variant:"default"},fd=M.forwardRef((t,e)=>{const n=nt("Input",xEe,t),{className:r,error:i,required:o,disabled:s,variant:a,icon:l,style:c,rightSectionWidth:u,iconWidth:d,rightSection:f,rightSectionProps:h,radius:g,size:y,wrapperProps:_,classNames:v,styles:x,__staticSelector:w,multiline:S,sx:E,unstyled:C,pointer:O}=n,R=_Ee(n,["className","error","required","disabled","variant","icon","style","rightSectionWidth","iconWidth","rightSection","rightSectionProps","radius","size","wrapperProps","classNames","styles","__staticSelector","multiline","sx","unstyled","pointer"]),{offsetBottom:T,offsetTop:A,describedBy:F}=HMe(),{classes:N,cx:U}=mEe({radius:g,multiline:S,invalid:!!i,rightSectionWidth:u?X(u):void 0,iconWidth:d,withRightSection:!!f,offsetBottom:T,offsetTop:A,pointer:O},{classNames:v,styles:x,name:["Input",w],unstyled:C,variant:a,size:y}),{systemStyles:k,rest:z}=Sl(R);return H.createElement(Xe,$y($y({className:U(N.wrapper,r),sx:E,style:c},k),_),l&&H.createElement("div",{className:N.icon},l),H.createElement(Xe,K4($y({component:"input"},z),{ref:e,required:o,"aria-invalid":!!i,"aria-describedby":F,disabled:s,"data-disabled":s||void 0,"data-with-icon":!!l||void 0,"data-invalid":!!i||void 0,className:N.input})),f&&H.createElement("div",K4($y({},h),{className:N.rightSection}),f))});fd.displayName="@mantine/core/Input";fd.Wrapper=L9;fd.Label=TA;fd.Description=RA;fd.Error=OA;fd.Placeholder=F9;const Ki=fd,wEe={xs:X(12),sm:X(18),md:X(24),lg:X(34),xl:X(42)};var SEe=ft((t,{color:e,transitionDuration:n},{size:r})=>{const i=Oe({size:r,sizes:wEe}),o=e||(t.colorScheme==="dark"?t.white:t.black);return{root:{borderRadius:t.radius.sm,width:`calc(${i} + ${t.spacing.xs})`,height:`calc(${i} + ${t.spacing.xs})`,padding:`calc(${t.spacing.xs} / 2)`,cursor:"pointer"},burger:{position:"relative",userSelect:"none",boxSizing:"border-box","&, &::before, &::after":{display:"block",width:i,height:`calc(${i} / 12)`,backgroundColor:o,outline:`${X(1)} solid transparent`,transitionProperty:"background-color, transform",transitionDuration:`${n}ms`,"@media (prefers-reduced-motion)":{transitionDuration:t.respectReducedMotion?"0ms":void 0}},"&::before, &::after":{position:"absolute",content:'""',left:0},"&::before":{top:`calc((${i} / 3) * -1)`},"&::after":{top:`calc(${i} / 3)`},"&[data-opened]":{backgroundColor:"transparent","&::before":{transform:`translateY(calc(${i} / 3)) rotate(45deg)`},"&::after":{transform:`translateY(calc(-${i} / 3)) rotate(-45deg)`}}}}});const bEe=SEe;var MEe=Object.defineProperty,ww=Object.getOwnPropertySymbols,B9=Object.prototype.hasOwnProperty,H9=Object.prototype.propertyIsEnumerable,Q4=(t,e,n)=>e in t?MEe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,EEe=(t,e)=>{for(var n in e||(e={}))B9.call(e,n)&&Q4(t,n,e[n]);if(ww)for(var n of ww(e))H9.call(e,n)&&Q4(t,n,e[n]);return t},PEe=(t,e)=>{var n={};for(var r in t)B9.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&ww)for(var r of ww(t))e.indexOf(r)<0&&H9.call(t,r)&&(n[r]=t[r]);return n};const CEe={size:"md",transitionDuration:300},V9=M.forwardRef((t,e)=>{const n=nt("Burger",CEe,t),{className:r,opened:i,color:o,size:s,classNames:a,styles:l,transitionDuration:c,variant:u}=n,d=PEe(n,["className","opened","color","size","classNames","styles","transitionDuration","variant"]),{classes:f,cx:h}=bEe({color:o,transitionDuration:c},{classNames:a,styles:l,name:"Burger",variant:u,size:s});return H.createElement(Fs,EEe({className:h(f.root,r),ref:e},d),H.createElement("div",{"data-opened":i||void 0,className:f.burger}))});V9.displayName="@mantine/core/Burger";var TEe=ft((t,{orientation:e,buttonBorderWidth:n})=>({root:{display:"flex",flexDirection:e==="vertical"?"column":"row","& [data-button]":{"&:first-of-type:not(:last-of-type)":{borderBottomRightRadius:0,[e==="vertical"?"borderBottomLeftRadius":"borderTopRightRadius"]:0,[e==="vertical"?"borderBottomWidth":"borderRightWidth"]:`calc(${X(n)} / 2)`},"&:last-of-type:not(:first-of-type)":{borderTopLeftRadius:0,[e==="vertical"?"borderTopRightRadius":"borderBottomLeftRadius"]:0,[e==="vertical"?"borderTopWidth":"borderLeftWidth"]:`calc(${X(n)} / 2)`},"&:not(:first-of-type):not(:last-of-type)":{borderRadius:0,[e==="vertical"?"borderTopWidth":"borderLeftWidth"]:`calc(${X(n)} / 2)`,[e==="vertical"?"borderBottomWidth":"borderRightWidth"]:`calc(${X(n)} / 2)`},"& + [data-button]":{[e==="vertical"?"marginTop":"marginLeft"]:`calc(${n} * -1)`,"@media (min-resolution: 192dpi)":{[e==="vertical"?"marginTop":"marginLeft"]:0}}}}}));const OEe=TEe;var REe=Object.defineProperty,Sw=Object.getOwnPropertySymbols,j9=Object.prototype.hasOwnProperty,$9=Object.prototype.propertyIsEnumerable,J4=(t,e,n)=>e in t?REe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,AEe=(t,e)=>{for(var n in e||(e={}))j9.call(e,n)&&J4(t,n,e[n]);if(Sw)for(var n of Sw(e))$9.call(e,n)&&J4(t,n,e[n]);return t},DEe=(t,e)=>{var n={};for(var r in t)j9.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Sw)for(var r of Sw(t))e.indexOf(r)<0&&$9.call(t,r)&&(n[r]=t[r]);return n};const IEe={orientation:"horizontal",buttonBorderWidth:1},G9=M.forwardRef((t,e)=>{const n=nt("ButtonGroup",IEe,t),{className:r,orientation:i,buttonBorderWidth:o,unstyled:s}=n,a=DEe(n,["className","orientation","buttonBorderWidth","unstyled"]),{classes:l,cx:c}=OEe({orientation:i,buttonBorderWidth:o},{name:"ButtonGroup",unstyled:s});return H.createElement(Xe,AEe({className:c(l.root,r),ref:e},a))});G9.displayName="@mantine/core/ButtonGroup";var LEe=Object.defineProperty,kEe=Object.defineProperties,NEe=Object.getOwnPropertyDescriptors,eU=Object.getOwnPropertySymbols,FEe=Object.prototype.hasOwnProperty,zEe=Object.prototype.propertyIsEnumerable,tU=(t,e,n)=>e in t?LEe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Qa=(t,e)=>{for(var n in e||(e={}))FEe.call(e,n)&&tU(t,n,e[n]);if(eU)for(var n of eU(e))zEe.call(e,n)&&tU(t,n,e[n]);return t},V_=(t,e)=>kEe(t,NEe(e));const UEe=["filled","outline","light","white","default","subtle","gradient"],ET={xs:{height:yi.xs,paddingLeft:X(14),paddingRight:X(14)},sm:{height:yi.sm,paddingLeft:X(18),paddingRight:X(18)},md:{height:yi.md,paddingLeft:X(22),paddingRight:X(22)},lg:{height:yi.lg,paddingLeft:X(26),paddingRight:X(26)},xl:{height:yi.xl,paddingLeft:X(32),paddingRight:X(32)},"compact-xs":{height:X(22),paddingLeft:X(7),paddingRight:X(7)},"compact-sm":{height:X(26),paddingLeft:X(8),paddingRight:X(8)},"compact-md":{height:X(30),paddingLeft:X(10),paddingRight:X(10)},"compact-lg":{height:X(34),paddingLeft:X(12),paddingRight:X(12)},"compact-xl":{height:X(40),paddingLeft:X(14),paddingRight:X(14)}};function BEe({compact:t,size:e,withLeftIcon:n,withRightIcon:r}){if(t)return ET[`compact-${e}`];const i=ET[e];return i?V_(Qa({},i),{paddingLeft:n?`calc(${i.paddingLeft} / 1.5)`:i.paddingLeft,paddingRight:r?`calc(${i.paddingRight} / 1.5)`:i.paddingRight}):{}}const HEe=t=>({display:t?"block":"inline-block",width:t?"100%":"auto"});function VEe({variant:t,theme:e,color:n,gradient:r}){if(!UEe.includes(t))return null;const i=e.fn.variant({color:n,variant:t,gradient:r});return t==="gradient"?Qa({border:0,backgroundImage:i.background,color:i.color},e.fn.hover({backgroundSize:"200%"})):Qa({border:`${X(1)} solid ${i.border}`,backgroundColor:i.background,color:i.color},e.fn.hover({backgroundColor:i.hover}))}var jEe=ft((t,{radius:e,fullWidth:n,compact:r,withLeftIcon:i,withRightIcon:o,color:s,gradient:a},{variant:l,size:c})=>({root:V_(Qa(V_(Qa(Qa(Qa(Qa({},BEe({compact:r,size:c,withLeftIcon:i,withRightIcon:o})),t.fn.fontStyles()),t.fn.focusStyles()),HEe(n)),{borderRadius:t.fn.radius(e),fontWeight:600,position:"relative",lineHeight:1,fontSize:Oe({size:c,sizes:t.fontSizes}),userSelect:"none",cursor:"pointer"}),VEe({variant:l,theme:t,color:s,gradient:a})),{"&:active":t.activeStyles,"&:disabled, &[data-disabled]":{borderColor:"transparent",backgroundColor:t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[2],color:t.colorScheme==="dark"?t.colors.dark[6]:t.colors.gray[5],cursor:"not-allowed",backgroundImage:"none",pointerEvents:"none","&:active":{transform:"none"}},"&[data-loading]":{pointerEvents:"none","&::before":V_(Qa({content:'""'},t.fn.cover(X(-1))),{backgroundColor:t.colorScheme==="dark"?t.fn.rgba(t.colors.dark[7],.5):"rgba(255, 255, 255, .5)",borderRadius:t.fn.radius(e),cursor:"not-allowed"})}}),icon:{display:"flex",alignItems:"center"},leftIcon:{marginRight:t.spacing.xs},rightIcon:{marginLeft:t.spacing.xs},centerLoader:{position:"absolute",left:"50%",transform:"translateX(-50%)",opacity:.5},inner:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",overflow:"visible"},label:{whiteSpace:"nowrap",height:"100%",overflow:"hidden",display:"flex",alignItems:"center"}}));const $Ee=jEe;var GEe=Object.defineProperty,bw=Object.getOwnPropertySymbols,W9=Object.prototype.hasOwnProperty,Y9=Object.prototype.propertyIsEnumerable,nU=(t,e,n)=>e in t?GEe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,rU=(t,e)=>{for(var n in e||(e={}))W9.call(e,n)&&nU(t,n,e[n]);if(bw)for(var n of bw(e))Y9.call(e,n)&&nU(t,n,e[n]);return t},WEe=(t,e)=>{var n={};for(var r in t)W9.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&bw)for(var r of bw(t))e.indexOf(r)<0&&Y9.call(t,r)&&(n[r]=t[r]);return n};const YEe={size:"sm",type:"button",variant:"filled",loaderPosition:"left"},AA=M.forwardRef((t,e)=>{const n=nt("Button",YEe,t),{className:r,size:i,color:o,type:s,disabled:a,children:l,leftIcon:c,rightIcon:u,fullWidth:d,variant:f,radius:h,uppercase:g,compact:y,loading:_,loaderPosition:v,loaderProps:x,gradient:w,classNames:S,styles:E,unstyled:C}=n,O=WEe(n,["className","size","color","type","disabled","children","leftIcon","rightIcon","fullWidth","variant","radius","uppercase","compact","loading","loaderPosition","loaderProps","gradient","classNames","styles","unstyled"]),{classes:R,cx:T,theme:A}=$Ee({radius:h,color:o,fullWidth:d,compact:y,gradient:w,withLeftIcon:!!c,withRightIcon:!!u},{name:"Button",unstyled:C,classNames:S,styles:E,variant:f,size:i}),F=A.fn.variant({color:o,variant:f}),N=H.createElement(fA,rU({color:F.color,size:`calc(${Oe({size:i,sizes:ET}).height} / 2)`},x));return H.createElement(Fs,rU({className:T(R.root,r),type:s,disabled:a,"data-button":!0,"data-disabled":a||void 0,"data-loading":_||void 0,ref:e,unstyled:C},O),H.createElement("div",{className:R.inner},(c||_&&v==="left")&&H.createElement("span",{className:T(R.icon,R.leftIcon)},_&&v==="left"?N:c),_&&v==="center"&&H.createElement("span",{className:R.centerLoader},N),H.createElement("span",{className:R.label,style:{textTransform:g?"uppercase":void 0}},l),(u||_&&v==="right")&&H.createElement("span",{className:T(R.icon,R.rightIcon)},_&&v==="right"?N:u)))});AA.displayName="@mantine/core/Button";AA.Group=G9;const Ds=AA;var XEe=ft((t,{radius:e,shadow:n})=>({root:{outline:0,WebkitTapHighlightColor:"transparent",display:"block",textDecoration:"none",color:t.colorScheme==="dark"?t.colors.dark[0]:t.black,backgroundColor:t.colorScheme==="dark"?t.colors.dark[7]:t.white,boxSizing:"border-box",borderRadius:t.fn.radius(e),boxShadow:t.shadows[n]||n||"none","&[data-with-border]":{border:`${X(1)} solid ${t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[3]}`}}}));const ZEe=XEe;var qEe=Object.defineProperty,Mw=Object.getOwnPropertySymbols,X9=Object.prototype.hasOwnProperty,Z9=Object.prototype.propertyIsEnumerable,iU=(t,e,n)=>e in t?qEe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,KEe=(t,e)=>{for(var n in e||(e={}))X9.call(e,n)&&iU(t,n,e[n]);if(Mw)for(var n of Mw(e))Z9.call(e,n)&&iU(t,n,e[n]);return t},QEe=(t,e)=>{var n={};for(var r in t)X9.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Mw)for(var r of Mw(t))e.indexOf(r)<0&&Z9.call(t,r)&&(n[r]=t[r]);return n};const JEe={},q9=M.forwardRef((t,e)=>{const n=nt("Paper",JEe,t),{className:r,children:i,radius:o,withBorder:s,shadow:a,unstyled:l,variant:c}=n,u=QEe(n,["className","children","radius","withBorder","shadow","unstyled","variant"]),{classes:d,cx:f}=ZEe({radius:o,shadow:a},{name:"Paper",unstyled:l,variant:c});return H.createElement(Xe,KEe({className:f(d.root,r),"data-with-border":s||void 0,ref:e},u),i)});q9.displayName="@mantine/core/Paper";const tv=q9,K9=M.createContext(null),ePe=K9.Provider,tPe=()=>M.useContext(K9);var nPe=Object.defineProperty,Ew=Object.getOwnPropertySymbols,Q9=Object.prototype.hasOwnProperty,J9=Object.prototype.propertyIsEnumerable,oU=(t,e,n)=>e in t?nPe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,sU=(t,e)=>{for(var n in e||(e={}))Q9.call(e,n)&&oU(t,n,e[n]);if(Ew)for(var n of Ew(e))J9.call(e,n)&&oU(t,n,e[n]);return t},rPe=(t,e)=>{var n={};for(var r in t)Q9.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Ew)for(var r of Ew(t))e.indexOf(r)<0&&J9.call(t,r)&&(n[r]=t[r]);return n};const iPe={size:"sm"},eY=M.forwardRef((t,e)=>{const n=nt("CheckboxGroup",iPe,t),{children:r,value:i,defaultValue:o,onChange:s,size:a,wrapperProps:l}=n,c=rPe(n,["children","value","defaultValue","onChange","size","wrapperProps"]),[u,d]=Ar({value:i,defaultValue:o,finalValue:[],onChange:s}),f=h=>{const g=h.currentTarget.value;d(u.includes(g)?u.filter(y=>y!==g):[...u,g])};return H.createElement(ePe,{value:{value:u,onChange:f,size:a}},H.createElement(Ki.Wrapper,sU(sU({labelElement:"div",size:a,__staticSelector:"CheckboxGroup",ref:e},l),c),r))});eY.displayName="@mantine/core/CheckboxGroup";var oPe=Object.defineProperty,Pw=Object.getOwnPropertySymbols,tY=Object.prototype.hasOwnProperty,nY=Object.prototype.propertyIsEnumerable,aU=(t,e,n)=>e in t?oPe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,PT=(t,e)=>{for(var n in e||(e={}))tY.call(e,n)&&aU(t,n,e[n]);if(Pw)for(var n of Pw(e))nY.call(e,n)&&aU(t,n,e[n]);return t},sPe=(t,e)=>{var n={};for(var r in t)tY.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Pw)for(var r of Pw(t))e.indexOf(r)<0&&nY.call(t,r)&&(n[r]=t[r]);return n};function rY(t){return H.createElement("svg",PT({viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),H.createElement("path",{d:"M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}function aPe(t){var e=t,{indeterminate:n}=e,r=sPe(e,["indeterminate"]);return n?H.createElement("svg",PT({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 6"},r),H.createElement("rect",{width:"32",height:"6",fill:"currentColor",rx:"3"})):H.createElement(rY,PT({},r))}var lPe=Object.defineProperty,cPe=Object.defineProperties,uPe=Object.getOwnPropertyDescriptors,lU=Object.getOwnPropertySymbols,dPe=Object.prototype.hasOwnProperty,fPe=Object.prototype.propertyIsEnumerable,cU=(t,e,n)=>e in t?lPe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,uU=(t,e)=>{for(var n in e||(e={}))dPe.call(e,n)&&cU(t,n,e[n]);if(lU)for(var n of lU(e))fPe.call(e,n)&&cU(t,n,e[n]);return t},dU=(t,e)=>cPe(t,uPe(e));const hPe={xs:X(16),sm:X(20),md:X(24),lg:X(30),xl:X(36)};var pPe=ft((t,{radius:e,color:n,transitionDuration:r,labelPosition:i,error:o,indeterminate:s},{size:a})=>{const l=Oe({size:a,sizes:hPe}),c=t.fn.variant({variant:"filled",color:n});return{icon:dU(uU({},t.fn.cover()),{ref:Ur("icon"),color:s?"inherit":t.white,transform:s?"none":`translateY(${X(5)}) scale(0.5)`,opacity:s?1:0,transitionProperty:"opacity, transform",transitionTimingFunction:"ease",transitionDuration:`${r}ms`,pointerEvents:"none",width:"60%",position:"absolute",zIndex:1,margin:"auto","@media (prefers-reduced-motion)":{transitionDuration:t.respectReducedMotion?"0ms":void 0}}),inner:{position:"relative",width:l,height:l,order:i==="left"?2:1},input:dU(uU({},t.fn.focusStyles()),{appearance:"none",backgroundColor:t.colorScheme==="dark"?t.colors.dark[6]:t.white,border:`${X(1)} solid ${o?t.fn.variant({variant:"filled",color:"red"}).background:t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[4]}`,width:l,height:l,borderRadius:t.fn.radius(e),padding:0,display:"block",margin:0,transition:`border-color ${r}ms ease, background-color ${r}ms ease`,cursor:t.cursorType,"&:checked":{backgroundColor:c.background,borderColor:c.background,[`& + .${Ur("icon")}`]:{opacity:1,color:t.white,transform:"translateY(0) scale(1)"}},"&:disabled":{backgroundColor:t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[2],borderColor:t.colorScheme==="dark"?t.colors.dark[6]:t.colors.gray[3],cursor:"not-allowed",pointerEvents:"none",[`& + .${Ur("icon")}`]:{color:t.colorScheme==="dark"?t.colors.dark[6]:t.colors.gray[5]}}})}});const mPe=pPe;var gPe=Object.defineProperty,vPe=Object.defineProperties,yPe=Object.getOwnPropertyDescriptors,fU=Object.getOwnPropertySymbols,_Pe=Object.prototype.hasOwnProperty,xPe=Object.prototype.propertyIsEnumerable,hU=(t,e,n)=>e in t?gPe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,wPe=(t,e)=>{for(var n in e||(e={}))_Pe.call(e,n)&&hU(t,n,e[n]);if(fU)for(var n of fU(e))xPe.call(e,n)&&hU(t,n,e[n]);return t},SPe=(t,e)=>vPe(t,yPe(e));const kP={xs:X(16),sm:X(20),md:X(24),lg:X(30),xl:X(36)};var bPe=ft((t,{labelPosition:e},{size:n})=>({root:{},body:{display:"flex","&:has(input:disabled) label":{color:t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[5]}},labelWrapper:SPe(wPe({},t.fn.fontStyles()),{display:"inline-flex",flexDirection:"column",WebkitTapHighlightColor:"transparent",fontSize:n in kP?Oe({size:n,sizes:t.fontSizes}):void 0,lineHeight:n in kP?Oe({size:n,sizes:kP}):void 0,color:t.colorScheme==="dark"?t.colors.dark[0]:t.black,cursor:t.cursorType,order:e==="left"?1:2}),description:{marginTop:`calc(${t.spacing.xs} / 2)`,[e==="left"?"paddingRight":"paddingLeft"]:t.spacing.sm},error:{marginTop:`calc(${t.spacing.xs} / 2)`,[e==="left"?"paddingRight":"paddingLeft"]:t.spacing.sm},label:{cursor:t.cursorType,[e==="left"?"paddingRight":"paddingLeft"]:t.spacing.sm,"&:disabled, &[data-disabled]":{color:t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[5]}}}));const MPe=bPe;var EPe=Object.defineProperty,Cw=Object.getOwnPropertySymbols,iY=Object.prototype.hasOwnProperty,oY=Object.prototype.propertyIsEnumerable,pU=(t,e,n)=>e in t?EPe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,PPe=(t,e)=>{for(var n in e||(e={}))iY.call(e,n)&&pU(t,n,e[n]);if(Cw)for(var n of Cw(e))oY.call(e,n)&&pU(t,n,e[n]);return t},CPe=(t,e)=>{var n={};for(var r in t)iY.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Cw)for(var r of Cw(t))e.indexOf(r)<0&&oY.call(t,r)&&(n[r]=t[r]);return n};const pb=M.forwardRef((t,e)=>{var n=t,{__staticSelector:r,className:i,classNames:o,styles:s,unstyled:a,children:l,label:c,description:u,id:d,disabled:f,error:h,size:g,labelPosition:y,variant:_}=n,v=CPe(n,["__staticSelector","className","classNames","styles","unstyled","children","label","description","id","disabled","error","size","labelPosition","variant"]);const{classes:x,cx:w}=MPe({labelPosition:y},{name:r,styles:s,classNames:o,unstyled:a,variant:_,size:g});return H.createElement(Xe,PPe({className:w(x.root,i),ref:e},v),H.createElement("div",{className:w(x.body)},l,H.createElement("div",{className:x.labelWrapper},c&&H.createElement("label",{className:x.label,"data-disabled":f||void 0,htmlFor:d},c),u&&H.createElement(Ki.Description,{className:x.description},u),h&&h!=="boolean"&&H.createElement(Ki.Error,{className:x.error},h))))});pb.displayName="@mantine/core/InlineInput";var TPe=Object.defineProperty,Tw=Object.getOwnPropertySymbols,sY=Object.prototype.hasOwnProperty,aY=Object.prototype.propertyIsEnumerable,mU=(t,e,n)=>e in t?TPe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Gy=(t,e)=>{for(var n in e||(e={}))sY.call(e,n)&&mU(t,n,e[n]);if(Tw)for(var n of Tw(e))aY.call(e,n)&&mU(t,n,e[n]);return t},OPe=(t,e)=>{var n={};for(var r in t)sY.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Tw)for(var r of Tw(t))e.indexOf(r)<0&&aY.call(t,r)&&(n[r]=t[r]);return n};const RPe={size:"sm",transitionDuration:100,icon:aPe,labelPosition:"right"},nv=M.forwardRef((t,e)=>{const n=nt("Checkbox",RPe,t),{className:r,style:i,sx:o,checked:s,disabled:a,color:l,label:c,indeterminate:u,id:d,size:f,radius:h,wrapperProps:g,children:y,classNames:_,styles:v,transitionDuration:x,icon:w,unstyled:S,labelPosition:E,description:C,error:O,variant:R}=n,T=OPe(n,["className","style","sx","checked","disabled","color","label","indeterminate","id","size","radius","wrapperProps","children","classNames","styles","transitionDuration","icon","unstyled","labelPosition","description","error","variant"]),A=tPe(),F=zo(d),{systemStyles:N,rest:U}=Sl(T),{classes:k}=mPe({radius:h,color:l,transitionDuration:x,labelPosition:E,error:!!O,indeterminate:u},{name:"Checkbox",classNames:_,styles:v,unstyled:S,variant:R,size:A?.size||f}),z=A?{checked:A.value.includes(U.value),onChange:A.onChange}:{};return H.createElement(pb,Gy(Gy({className:r,sx:o,style:i,id:F,size:A?.size||f,labelPosition:E,label:c,description:C,error:O,disabled:a,__staticSelector:"Checkbox",classNames:_,styles:v,unstyled:S,"data-checked":z.checked||void 0,variant:R},N),g),H.createElement("div",{className:k.inner},H.createElement("input",Gy(Gy({id:F,ref:e,type:"checkbox",className:k.input,checked:s,disabled:a},U),z)),H.createElement(w,{indeterminate:u,className:k.icon})))});nv.displayName="@mantine/core/Checkbox";nv.Group=eY;const lY=M.createContext(null),APe=lY.Provider,DPe=()=>M.useContext(lY),IPe={};function cY(t){const{value:e,defaultValue:n,onChange:r,multiple:i,children:o}=nt("ChipGroup",IPe,t),[s,a]=Ar({value:e,defaultValue:n,finalValue:i?[]:null,onChange:r}),l=u=>Array.isArray(s)?s.includes(u):u===s,c=u=>{const d=u.currentTarget.value;Array.isArray(s)?a(s.includes(d)?s.filter(f=>f!==d):[...s,d]):a(d)};return H.createElement(APe,{value:{isChipSelected:l,onChange:c,multiple:i}},o)}cY.displayName="@mantine/core/ChipGroup";var LPe=Object.defineProperty,kPe=Object.defineProperties,NPe=Object.getOwnPropertyDescriptors,gU=Object.getOwnPropertySymbols,FPe=Object.prototype.hasOwnProperty,zPe=Object.prototype.propertyIsEnumerable,vU=(t,e,n)=>e in t?LPe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Rs=(t,e)=>{for(var n in e||(e={}))FPe.call(e,n)&&vU(t,n,e[n]);if(gU)for(var n of gU(e))zPe.call(e,n)&&vU(t,n,e[n]);return t},Jp=(t,e)=>kPe(t,NPe(e));const yU={xs:X(24),sm:X(28),md:X(32),lg:X(36),xl:X(40)},Up={xs:X(10),sm:X(12),md:X(14),lg:X(16),xl:X(18)},_U={xs:X(16),sm:X(20),md:X(24),lg:X(28),xl:X(32)},Wy={xs:X(7.5),sm:X(10),md:X(11.5),lg:X(13),xl:X(15)};function UPe(t,{color:e},n){const r=t.fn.variant({variant:"filled",color:e}),i=t.fn.variant({variant:"light",color:e});return n==="light"?{label:Rs({backgroundColor:t.colorScheme==="dark"?t.colors.dark[6]:t.colors.gray[1]},t.fn.hover({backgroundColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[0]})),checked:Jp(Rs({color:i.color,backgroundColor:i.background},t.fn.hover({backgroundColor:i.hover})),{"&, &:hover":{backgroundColor:t.fn.variant({variant:"light",color:e}).background}})}:n==="filled"?{label:Rs({backgroundColor:t.colorScheme==="dark"?t.colors.dark[6]:t.colors.gray[1]},t.fn.hover({backgroundColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[0]})),checked:Rs({color:r.color,backgroundColor:r.background},t.fn.hover({backgroundColor:r.hover}))}:n==="outline"?{label:Rs({backgroundColor:t.colorScheme==="dark"?t.colors.dark[6]:t.white,borderColor:t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[4]},t.fn.hover({backgroundColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[0]})),checked:{border:`${X(1)} solid ${r.background}`}}:{label:null,checked:null}}var BPe=ft((t,{radius:e,color:n},{size:r,variant:i})=>{const o=UPe(t,{color:n},i);return{root:{},label:Jp(Rs(Jp(Rs({ref:Ur("label")},t.fn.fontStyles()),{boxSizing:"border-box",color:t.colorScheme==="dark"?t.colors.dark[0]:t.black,display:"inline-flex",alignItems:"center",userSelect:"none",border:`${X(1)} solid transparent`,borderRadius:t.fn.radius(e),height:Oe({size:r,sizes:yU}),fontSize:Oe({size:r,sizes:t.fontSizes}),lineHeight:`calc(${Oe({size:r,sizes:yU})} - ${X(2)})`,paddingLeft:Oe({size:r,sizes:_U}),paddingRight:Oe({size:r,sizes:_U}),cursor:"pointer",whiteSpace:"nowrap",transition:"background-color 100ms ease",WebkitTapHighlightColor:"transparent"}),o.label),{"&[data-disabled]":Jp(Rs({backgroundColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[1],borderColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[1],color:t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[5],cursor:"not-allowed",pointerEvents:"none"},t.fn.hover({backgroundColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[1]})),{[`& .${Ur("iconWrapper")}`]:{color:t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[5]}}),"&[data-checked]":{paddingLeft:Oe({size:r,sizes:Wy}),paddingRight:Oe({size:r,sizes:Wy}),"&:not([data-disabled])":o.checked}}),iconWrapper:{ref:Ur("iconWrapper"),color:i==="filled"?t.white:t.fn.variant({variant:"filled",color:n}).background,width:`calc(${Oe({size:r,sizes:Up})} + (${Oe({size:r,sizes:t.spacing})} / 1.5))`,maxWidth:`calc(${Oe({size:r,sizes:Up})} + (${Oe({size:r,sizes:t.spacing})} / 1.5))`,height:Oe({size:r,sizes:Up}),display:"inline-block",verticalAlign:"middle",overflow:"hidden"},checkIcon:{width:Oe({size:r,sizes:Up}),height:`calc(${Oe({size:r,sizes:Up})} / 1.1)`,display:"block"},input:{width:0,height:0,padding:0,opacity:0,margin:0,"&:disabled + label":Jp(Rs({backgroundColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[1],borderColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[1],color:t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[5],cursor:"not-allowed",pointerEvents:"none"},t.fn.hover({backgroundColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[1]})),{[`& .${Ur("iconWrapper")}`]:{color:t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[5]},"&[data-checked]":{paddingLeft:Oe({size:r,sizes:Wy}),paddingRight:Oe({size:r,sizes:Wy}),"&:not([data-disabled])":{backgroundColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[1],borderColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[1],color:t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[5]}}}),"&:focus":{outline:"none",[`& + .${Ur("label")}`]:Rs({},t.focusRing==="always"||t.focusRing==="auto"?t.focusRingStyles.styles(t):t.focusRingStyles.resetStyles(t)),"&:focus:not(:focus-visible)":{[`& + .${Ur("label")}`]:Rs({},t.focusRing==="auto"||t.focusRing==="never"?t.focusRingStyles.resetStyles(t):null)}}}}});const HPe=BPe;var VPe=Object.defineProperty,Ow=Object.getOwnPropertySymbols,uY=Object.prototype.hasOwnProperty,dY=Object.prototype.propertyIsEnumerable,xU=(t,e,n)=>e in t?VPe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Yy=(t,e)=>{for(var n in e||(e={}))uY.call(e,n)&&xU(t,n,e[n]);if(Ow)for(var n of Ow(e))dY.call(e,n)&&xU(t,n,e[n]);return t},jPe=(t,e)=>{var n={};for(var r in t)uY.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Ow)for(var r of Ow(t))e.indexOf(r)<0&&dY.call(t,r)&&(n[r]=t[r]);return n};const $Pe={type:"checkbox",size:"sm",radius:"xl",variant:"outline"},mb=M.forwardRef((t,e)=>{const n=nt("Chip",$Pe,t),{radius:r,type:i,size:o,variant:s,disabled:a,id:l,color:c,children:u,className:d,classNames:f,style:h,styles:g,checked:y,defaultChecked:_,onChange:v,sx:x,wrapperProps:w,value:S,unstyled:E}=n,C=jPe(n,["radius","type","size","variant","disabled","id","color","children","className","classNames","style","styles","checked","defaultChecked","onChange","sx","wrapperProps","value","unstyled"]),O=DPe(),R=zo(l),{systemStyles:T,rest:A}=Sl(C),{classes:F,cx:N}=HPe({radius:r,color:c},{classNames:f,styles:g,unstyled:E,name:"Chip",variant:s,size:o}),[U,k]=Ar({value:y,defaultValue:_,finalValue:!1,onChange:v}),z=O?{checked:O.isChipSelected(S),onChange:O.onChange,type:O.multiple?"checkbox":"radio"}:{},G=z.checked||U;return H.createElement(Xe,Yy(Yy({className:N(F.root,d),style:h,sx:x},T),w),H.createElement("input",Yy(Yy({type:i,className:F.input,checked:G,onChange:W=>k(W.currentTarget.checked),id:R,disabled:a,ref:e,value:S},z),A)),H.createElement("label",{htmlFor:R,"data-checked":G||void 0,"data-disabled":a||void 0,className:F.label},G&&H.createElement("span",{className:F.iconWrapper},H.createElement(rY,{className:F.checkIcon})),u))});mb.displayName="@mantine/core/Chip";mb.Group=cY;var GPe=Object.defineProperty,WPe=Object.defineProperties,YPe=Object.getOwnPropertyDescriptors,wU=Object.getOwnPropertySymbols,XPe=Object.prototype.hasOwnProperty,ZPe=Object.prototype.propertyIsEnumerable,SU=(t,e,n)=>e in t?GPe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,bU=(t,e)=>{for(var n in e||(e={}))XPe.call(e,n)&&SU(t,n,e[n]);if(wU)for(var n of wU(e))ZPe.call(e,n)&&SU(t,n,e[n]);return t},MU=(t,e)=>WPe(t,YPe(e)),qPe=ft((t,{radius:e},{size:n})=>{const r=t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[3];return{root:MU(bU({},t.fn.focusStyles()),{width:X(n),height:X(n),WebkitTapHighlightColor:"transparent",border:0,borderRadius:t.fn.radius(e),appearance:"none",WebkitAppearance:"none",padding:0,position:"relative",overflow:"hidden"}),overlay:MU(bU({},t.fn.cover()),{position:"absolute",borderRadius:t.fn.radius(e)}),children:{display:"inline-flex",justifyContent:"center",alignItems:"center"},shadowOverlay:{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${X(1)} inset, rgb(0, 0, 0, .15) 0 0 ${X(4)} inset`,zIndex:1},alphaOverlay:{backgroundImage:`linear-gradient(45deg, ${r} 25%, transparent 25%), linear-gradient(-45deg, ${r} 25%, transparent 25%), linear-gradient(45deg, transparent 75%, ${r} 75%), linear-gradient(-45deg, ${t.colorScheme==="dark"?t.colors.dark[7]:t.white} 75%, ${r} 75%)`,backgroundSize:`${X(8)} ${X(8)}`,backgroundPosition:`0 0, 0 ${X(4)}, ${X(4)} -${X(4)}, -${X(4)} 0`}}});const KPe=qPe;var QPe=Object.defineProperty,Rw=Object.getOwnPropertySymbols,fY=Object.prototype.hasOwnProperty,hY=Object.prototype.propertyIsEnumerable,EU=(t,e,n)=>e in t?QPe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,JPe=(t,e)=>{for(var n in e||(e={}))fY.call(e,n)&&EU(t,n,e[n]);if(Rw)for(var n of Rw(e))hY.call(e,n)&&EU(t,n,e[n]);return t},eCe=(t,e)=>{var n={};for(var r in t)fY.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Rw)for(var r of Rw(t))e.indexOf(r)<0&&hY.call(t,r)&&(n[r]=t[r]);return n};const tCe={size:X(25),radius:X(25),withShadow:!0},pY=M.forwardRef((t,e)=>{const n=nt("ColorSwatch",tCe,t),{color:r,size:i,radius:o,className:s,children:a,classNames:l,styles:c,unstyled:u,withShadow:d,variant:f}=n,h=eCe(n,["color","size","radius","className","children","classNames","styles","unstyled","withShadow","variant"]),{classes:g,cx:y}=KPe({radius:o},{classNames:l,styles:c,unstyled:u,name:"ColorSwatch",size:i,variant:f});return H.createElement(Xe,JPe({className:y(g.root,s),ref:e},h),H.createElement("div",{className:y(g.alphaOverlay,g.overlay)}),d&&H.createElement("div",{className:y(g.shadowOverlay,g.overlay)}),H.createElement("div",{className:g.overlay,style:{backgroundColor:r}}),H.createElement("div",{className:y(g.children,g.overlay)},a))});pY.displayName="@mantine/core/ColorSwatch";const DA=pY,wa={xs:X(8),sm:X(12),md:X(16),lg:X(20),xl:X(22)};var nCe=ft((t,e,{size:n})=>{const r=Oe({size:n,sizes:wa});return{thumb:{overflow:"hidden",boxSizing:"border-box",position:"absolute",boxShadow:`0 0 ${X(1)} rgba(0, 0, 0, .6)`,border:`${X(2)} solid ${t.white}`,backgroundColor:"transparent",width:r,height:r,borderRadius:r}}});const rCe=nCe;var iCe=Object.defineProperty,PU=Object.getOwnPropertySymbols,oCe=Object.prototype.hasOwnProperty,sCe=Object.prototype.propertyIsEnumerable,CU=(t,e,n)=>e in t?iCe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,aCe=(t,e)=>{for(var n in e||(e={}))oCe.call(e,n)&&CU(t,n,e[n]);if(PU)for(var n of PU(e))sCe.call(e,n)&&CU(t,n,e[n]);return t};function IA({position:t,className:e,styles:n,classNames:r,style:i,size:o,__staticSelector:s,unstyled:a,variant:l}){const{classes:c,cx:u}=rCe(null,{classNames:r,styles:n,name:s,unstyled:a,size:o,variant:l});return H.createElement("div",{className:u(c.thumb,e),style:aCe({left:`calc(${t.x*100}% - ${wa[o]} / 2)`,top:`calc(${t.y*100}% - ${wa[o]} / 2)`},i)})}IA.displayName="@mantine/core/Thumb";var lCe=Object.defineProperty,TU=Object.getOwnPropertySymbols,cCe=Object.prototype.hasOwnProperty,uCe=Object.prototype.propertyIsEnumerable,OU=(t,e,n)=>e in t?lCe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,RU=(t,e)=>{for(var n in e||(e={}))cCe.call(e,n)&&OU(t,n,e[n]);if(TU)for(var n of TU(e))uCe.call(e,n)&&OU(t,n,e[n]);return t},dCe=ft((t,e,{size:n})=>({sliderThumb:{ref:Ur("sliderThumb")},slider:{position:"relative",height:`calc(${Oe({size:n,sizes:wa})} + ${X(2)})`,boxSizing:"border-box",marginLeft:`calc(${Oe({size:n,sizes:wa})} / 2)`,marginRight:`calc(${Oe({size:n,sizes:wa})} / 2)`,outline:0,[`&:focus .${Ur("sliderThumb")}`]:RU({},t.focusRing==="always"||t.focusRing==="auto"?t.focusRingStyles.styles(t):t.focusRingStyles.resetStyles(t)),[`&:focus:not(:focus-visible) .${Ur("sliderThumb")}`]:RU({},t.focusRing==="auto"||t.focusRing==="never"?t.focusRingStyles.resetStyles(t):null)},sliderOverlay:{position:"absolute",boxSizing:"border-box",top:0,bottom:0,left:`calc(${Oe({size:n,sizes:wa})} * -1 / 2 - ${X(1)})`,right:`calc(${Oe({size:n,sizes:wa})} * -1 / 2 - ${X(1)})`,borderRadius:1e3}}));const fCe=dCe;var hCe=Object.defineProperty,pCe=Object.defineProperties,mCe=Object.getOwnPropertyDescriptors,Aw=Object.getOwnPropertySymbols,mY=Object.prototype.hasOwnProperty,gY=Object.prototype.propertyIsEnumerable,AU=(t,e,n)=>e in t?hCe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,gCe=(t,e)=>{for(var n in e||(e={}))mY.call(e,n)&&AU(t,n,e[n]);if(Aw)for(var n of Aw(e))gY.call(e,n)&&AU(t,n,e[n]);return t},vCe=(t,e)=>pCe(t,mCe(e)),yCe=(t,e)=>{var n={};for(var r in t)mY.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Aw)for(var r of Aw(t))e.indexOf(r)<0&&gY.call(t,r)&&(n[r]=t[r]);return n};const LA=M.forwardRef((t,e)=>{var n=t,{value:r,onChange:i,onChangeEnd:o,maxValue:s,round:a,size:l="md",thumbColor:c="transparent",__staticSelector:u="ColorSlider",focusable:d=!0,overlays:f,classNames:h,styles:g,className:y,unstyled:_,variant:v}=n,x=yCe(n,["value","onChange","onChangeEnd","maxValue","round","size","thumbColor","__staticSelector","focusable","overlays","classNames","styles","className","unstyled","variant"]);const{classes:w,cx:S}=fCe(null,{classNames:h,styles:g,name:u,unstyled:_,variant:v,size:l}),[E,C]=M.useState({y:0,x:r/s}),O=M.useRef(E),R=U=>a?Math.round(U*s):U*s,{ref:T}=dA(({x:U,y:k})=>{O.current={x:U,y:k},i(R(U))},{onScrubEnd:()=>{const{x:U}=O.current;o(R(U))}});Qr(()=>{C({y:0,x:r/s})},[r]);const A=(U,k)=>{U.preventDefault();const z=fW(k);i(R(z.x)),o(R(z.x))},F=U=>{switch(U.key){case"ArrowRight":{A(U,{x:E.x+.05,y:E.y});break}case"ArrowLeft":{A(U,{x:E.x-.05,y:E.y});break}}},N=f.map((U,k)=>H.createElement("div",{className:w.sliderOverlay,style:U,key:k}));return H.createElement(Xe,vCe(gCe({},x),{ref:Da(T,e),className:S(w.slider,y),role:"slider","aria-valuenow":r,"aria-valuemax":s,"aria-valuemin":0,tabIndex:d?0:-1,onKeyDown:F}),N,H.createElement(IA,{__staticSelector:u,classNames:h,styles:g,position:E,style:{top:X(1),backgroundColor:c},className:w.sliderThumb,size:l}))});LA.displayName="@mantine/core/ColorSlider";var _Ce=Object.defineProperty,xCe=Object.defineProperties,wCe=Object.getOwnPropertyDescriptors,Dw=Object.getOwnPropertySymbols,vY=Object.prototype.hasOwnProperty,yY=Object.prototype.propertyIsEnumerable,DU=(t,e,n)=>e in t?_Ce(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,SCe=(t,e)=>{for(var n in e||(e={}))vY.call(e,n)&&DU(t,n,e[n]);if(Dw)for(var n of Dw(e))yY.call(e,n)&&DU(t,n,e[n]);return t},bCe=(t,e)=>xCe(t,wCe(e)),MCe=(t,e)=>{var n={};for(var r in t)vY.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Dw)for(var r of Dw(t))e.indexOf(r)<0&&yY.call(t,r)&&(n[r]=t[r]);return n};const ECe={},_Y=M.forwardRef((t,e)=>{const n=nt("HueSlider",ECe,t),{value:r,onChange:i,onChangeEnd:o,__staticSelector:s}=n,a=MCe(n,["value","onChange","onChangeEnd","__staticSelector"]);return H.createElement(LA,bCe(SCe({},a),{ref:e,value:r,onChange:i,onChangeEnd:o,maxValue:360,thumbColor:`hsl(${r}, 100%, 50%)`,round:!0,__staticSelector:s||"HueSlider",overlays:[{backgroundImage:"linear-gradient(to right,hsl(0,100%,50%),hsl(60,100%,50%),hsl(120,100%,50%),hsl(170,100%,50%),hsl(240,100%,50%),hsl(300,100%,50%),hsl(360,100%,50%))"},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${X(1)} inset, rgb(0, 0, 0, .15) 0 0 ${X(4)} inset`}]}))});_Y.displayName="@mantine/core/HueSlider";var PCe=Object.defineProperty,CCe=Object.defineProperties,TCe=Object.getOwnPropertyDescriptors,IU=Object.getOwnPropertySymbols,OCe=Object.prototype.hasOwnProperty,RCe=Object.prototype.propertyIsEnumerable,LU=(t,e,n)=>e in t?PCe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,kU=(t,e)=>{for(var n in e||(e={}))OCe.call(e,n)&&LU(t,n,e[n]);if(IU)for(var n of IU(e))RCe.call(e,n)&&LU(t,n,e[n]);return t},NU=(t,e)=>CCe(t,TCe(e));function os(t,e=0,n=10**e){return Math.round(n*t)/n}function ACe({h:t,s:e,l:n,a:r}){const i=e*((n<50?n:100-n)/100);return{h:t,s:i>0?2*i/(n+i)*100:0,v:n+i,a:r}}const DCe={grad:360/400,turn:360,rad:360/(Math.PI*2)};function ICe(t,e="deg"){return Number(t)*(DCe[e]||1)}const LCe=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function FU(t){const e=LCe.exec(t);return e?ACe({h:ICe(e[1],e[2]),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)}):{h:0,s:0,v:0,a:1}}function CT({r:t,g:e,b:n,a:r}){const i=Math.max(t,e,n),o=i-Math.min(t,e,n),s=o?i===t?(e-n)/o:i===e?2+(n-t)/o:4+(t-e)/o:0;return{h:os(60*(s<0?s+6:s),3),s:os(i?o/i*100:0,3),v:os(i/255*100,3),a:r}}function TT(t){const e=t[0]==="#"?t.slice(1):t;return e.length===3?CT({r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:1}):CT({r:parseInt(e.slice(0,2),16),g:parseInt(e.slice(2,4),16),b:parseInt(e.slice(4,6),16),a:1})}function kCe(t){const e=t[0]==="#"?t.slice(1):t,n=s=>os(parseInt(s,16)/255,3);if(e.length===4){const s=e.slice(0,3),a=n(e[3]+e[3]);return NU(kU({},TT(s)),{a})}const r=e.slice(0,6),i=n(e.slice(6,8));return NU(kU({},TT(r)),{a:i})}const NCe=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function zU(t){const e=NCe.exec(t);return e?CT({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):{h:0,s:0,v:0,a:1}}const xY={hex:/^#?([0-9A-F]{3}){1,2}$/i,hexa:/^#?([0-9A-F]{4}){1,2}$/i,rgb:/^rgb\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/i,rgba:/^rgba\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/i,hsl:/hsl\(\s*(\d+)\s*,\s*(\d+(?:\.\d+)?%)\s*,\s*(\d+(?:\.\d+)?%)\)/i,hsla:/^hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*(\d*(?:\.\d+)?)\)$/i},FCe={hex:TT,hexa:kCe,rgb:zU,rgba:zU,hsl:FU,hsla:FU};function em(t){for(const[,e]of Object.entries(xY))if(e.test(t))return!0;return!1}function Iu(t){if(typeof t!="string")return{h:0,s:0,v:0,a:1};if(t==="transparent")return{h:0,s:0,v:0,a:0};const e=t.trim();for(const[n,r]of Object.entries(xY))if(r.test(e))return FCe[n](e);return{h:0,s:0,v:0,a:1}}var zCe=Object.defineProperty,UCe=Object.defineProperties,BCe=Object.getOwnPropertyDescriptors,Iw=Object.getOwnPropertySymbols,wY=Object.prototype.hasOwnProperty,SY=Object.prototype.propertyIsEnumerable,UU=(t,e,n)=>e in t?zCe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,HCe=(t,e)=>{for(var n in e||(e={}))wY.call(e,n)&&UU(t,n,e[n]);if(Iw)for(var n of Iw(e))SY.call(e,n)&&UU(t,n,e[n]);return t},VCe=(t,e)=>UCe(t,BCe(e)),jCe=(t,e)=>{var n={};for(var r in t)wY.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Iw)for(var r of Iw(t))e.indexOf(r)<0&&SY.call(t,r)&&(n[r]=t[r]);return n};const $Ce={},bY=M.forwardRef((t,e)=>{const n=nt("AlphaSlider",$Ce,t),{value:r,onChange:i,onChangeEnd:o,color:s,__staticSelector:a}=n,l=jCe(n,["value","onChange","onChangeEnd","color","__staticSelector"]),c=Ir(),u=c.colorScheme==="dark"?c.colors.dark[4]:c.colors.gray[3];return H.createElement(LA,VCe(HCe({},l),{ref:e,value:r,onChange:d=>i(os(d,2)),onChangeEnd:d=>o(os(d,2)),maxValue:1,round:!1,__staticSelector:a||"AlphaSlider",overlays:[{backgroundImage:`linear-gradient(45deg, ${u} 25%, transparent 25%), linear-gradient(-45deg, ${u} 25%, transparent 25%), linear-gradient(45deg, transparent 75%, ${u} 75%), linear-gradient(-45deg, ${c.colorScheme==="dark"?c.colors.dark[7]:c.white} 75%, ${u} 75%)`,backgroundSize:`${X(8)} ${X(8)}`,backgroundPosition:`0 0, 0 ${X(4)}, ${X(4)} -${X(4)}, -${X(4)} 0`},{backgroundImage:`linear-gradient(90deg, transparent, ${s})`},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${X(1)} inset, rgb(0, 0, 0, .15) 0 0 ${X(4)} inset`}]}))});bY.displayName="@mantine/core/AlphaSlider";var GCe=Object.defineProperty,BU=Object.getOwnPropertySymbols,WCe=Object.prototype.hasOwnProperty,YCe=Object.prototype.propertyIsEnumerable,HU=(t,e,n)=>e in t?GCe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,NP=(t,e)=>{for(var n in e||(e={}))WCe.call(e,n)&&HU(t,n,e[n]);if(BU)for(var n of BU(e))YCe.call(e,n)&&HU(t,n,e[n]);return t};const XCe={xs:X(100),sm:X(110),md:X(120),lg:X(140),xl:X(160)};var ZCe=ft((t,e,{size:n})=>({saturationThumb:{ref:Ur("saturationThumb")},saturation:{boxSizing:"border-box",position:"relative",height:Oe({size:n,sizes:XCe}),borderRadius:t.radius.sm,margin:`calc(${Oe({size:n,sizes:wa})} / 2)`,WebkitTapHighlightColor:"transparent",[`&:focus .${Ur("saturationThumb")}`]:NP({},t.focusRing==="always"||t.focusRing==="auto"?t.focusRingStyles.styles(t):t.focusRingStyles.resetStyles(t)),[`&:focus:not(:focus-visible) .${Ur("saturationThumb")}`]:NP({},t.focusRing==="auto"||t.focusRing==="never"?t.focusRingStyles.resetStyles(t):null)},saturationOverlay:NP({boxSizing:"border-box",borderRadius:t.radius.sm},t.fn.cover(`calc(${Oe({size:n,sizes:wa})} * -1 / 2 - ${X(1)})`))}));const qCe=ZCe;function MY({h:t,s:e,v:n,a:r}){const i=t/360*6,o=e/100,s=n/100,a=Math.floor(i),l=s*(1-o),c=s*(1-(i-a)*o),u=s*(1-(1-i+a)*o),d=a%6;return{r:os([s,c,l,l,u,s][d]*255),g:os([u,s,s,c,l,l][d]*255),b:os([l,l,u,s,s,c][d]*255),a:os(r,2)}}function VU(t,e){const{r:n,g:r,b:i,a:o}=MY(t);return e?`rgba(${n}, ${r}, ${i}, ${os(o,2)})`:`rgb(${n}, ${r}, ${i})`}function jU({h:t,s:e,v:n,a:r},i){const o=(200-e)*n/100,s={h:Math.round(t),s:Math.round(o>0&&o<200?e*n/100/(o<=100?o:200-o)*100:0),l:Math.round(o/2)};return i?`hsla(${s.h}, ${s.s}%, ${s.l}%, ${os(r,2)})`:`hsl(${s.h}, ${s.s}%, ${s.l}%)`}function j_(t){const e=t.toString(16);return e.length<2?`0${e}`:e}function EY(t){const{r:e,g:n,b:r}=MY(t);return`#${j_(e)}${j_(n)}${j_(r)}`}function KCe(t){const e=Math.round(t.a*255);return`${EY(t)}${j_(e)}`}const FP={hex:EY,hexa:t=>KCe(t),rgb:t=>VU(t,!1),rgba:t=>VU(t,!0),hsl:t=>jU(t,!1),hsla:t=>jU(t,!0)};function Ps(t,e){return e?t in FP?FP[t](e):FP.hex(e):"#000000"}function PY({value:t,onChange:e,onChangeEnd:n,focusable:r=!0,__staticSelector:i="saturation",size:o,color:s,saturationLabel:a,classNames:l,styles:c,unstyled:u,variant:d}){const{classes:f}=qCe(null,{classNames:l,styles:c,name:i,unstyled:u,variant:d,size:o}),[h,g]=M.useState({x:t.s/100,y:1-t.v/100}),y=M.useRef(h),{ref:_}=dA(({x:w,y:S})=>{y.current={x:w,y:S},e({s:Math.round(w*100),v:Math.round((1-S)*100)})},{onScrubEnd:()=>{const{x:w,y:S}=y.current;n({s:Math.round(w*100),v:Math.round((1-S)*100)})}});M.useEffect(()=>{g({x:t.s/100,y:1-t.v/100})},[t.s,t.v]);const v=(w,S)=>{w.preventDefault();const E=fW(S);e({s:Math.round(E.x*100),v:Math.round((1-E.y)*100)}),n({s:Math.round(E.x*100),v:Math.round((1-E.y)*100)})},x=w=>{switch(w.key){case"ArrowUp":{v(w,{y:h.y-.05,x:h.x});break}case"ArrowDown":{v(w,{y:h.y+.05,x:h.x});break}case"ArrowRight":{v(w,{x:h.x+.05,y:h.y});break}case"ArrowLeft":{v(w,{x:h.x-.05,y:h.y});break}}};return H.createElement("div",{className:f.saturation,ref:_,role:"slider","aria-label":a,"aria-valuenow":h.x,"aria-valuetext":Ps("rgba",t),tabIndex:r?0:-1,onKeyDown:x},H.createElement("div",{className:f.saturationOverlay,style:{backgroundColor:`hsl(${t.h}, 100%, 50%)`}}),H.createElement("div",{className:f.saturationOverlay,style:{backgroundImage:"linear-gradient(90deg, #fff, transparent)"}}),H.createElement("div",{className:f.saturationOverlay,style:{backgroundImage:"linear-gradient(0deg, #000, transparent)"}}),H.createElement(IA,{__staticSelector:i,classNames:l,styles:c,position:h,className:f.saturationThumb,style:{backgroundColor:s},size:o}))}PY.displayName="@mantine/core/Saturation";var QCe=ft((t,{swatchesPerRow:e})=>({swatch:{width:`calc(${100/e}% - ${X(4)})`,height:0,paddingBottom:`calc(${100/e}% - ${X(4)})`,margin:X(2),boxSizing:"content-box"},swatches:{boxSizing:"border-box",marginLeft:X(-2),marginRight:X(-2),display:"flex",flexWrap:"wrap"}}));const JCe=QCe;var e2e=Object.defineProperty,Lw=Object.getOwnPropertySymbols,CY=Object.prototype.hasOwnProperty,TY=Object.prototype.propertyIsEnumerable,$U=(t,e,n)=>e in t?e2e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,t2e=(t,e)=>{for(var n in e||(e={}))CY.call(e,n)&&$U(t,n,e[n]);if(Lw)for(var n of Lw(e))TY.call(e,n)&&$U(t,n,e[n]);return t},n2e=(t,e)=>{var n={};for(var r in t)CY.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Lw)for(var r of Lw(t))e.indexOf(r)<0&&TY.call(t,r)&&(n[r]=t[r]);return n};function OY(t){var e=t,{data:n,swatchesPerRow:r=10,focusable:i=!0,classNames:o,styles:s,__staticSelector:a="color-picker",unstyled:l,setValue:c,onChangeEnd:u,variant:d,size:f}=e,h=n2e(e,["data","swatchesPerRow","focusable","classNames","styles","__staticSelector","unstyled","setValue","onChangeEnd","variant","size"]);const{classes:g}=JCe({swatchesPerRow:r},{classNames:o,styles:s,name:a,unstyled:l,variant:d,size:f}),y=n.map((_,v)=>H.createElement(DA,{className:g.swatch,component:"button",type:"button",color:_,key:v,radius:"sm",onClick:()=>{c(_),u?.(_)},style:{cursor:"pointer"},"aria-label":_,tabIndex:i?0:-1}));return H.createElement("div",t2e({className:g.swatches},h),y)}OY.displayName="@mantine/core/Swatches";const r2e={xs:X(180),sm:X(200),md:X(240),lg:X(280),xl:X(320)};var i2e=ft((t,{fullWidth:e},{size:n})=>({preview:{},wrapper:{boxSizing:"border-box",width:e?"100%":Oe({size:n,sizes:r2e}),padding:X(1)},body:{display:"flex",boxSizing:"border-box",paddingTop:`calc(${Oe({size:n,sizes:t.spacing})} / 2)`},sliders:{flex:1,boxSizing:"border-box","&:not(:only-child)":{marginRight:t.spacing.xs}},slider:{boxSizing:"border-box","& + &":{marginTop:X(5)}},swatch:{cursor:"pointer"}}));const o2e=i2e;var s2e=Object.defineProperty,a2e=Object.defineProperties,l2e=Object.getOwnPropertyDescriptors,kw=Object.getOwnPropertySymbols,RY=Object.prototype.hasOwnProperty,AY=Object.prototype.propertyIsEnumerable,GU=(t,e,n)=>e in t?s2e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,cf=(t,e)=>{for(var n in e||(e={}))RY.call(e,n)&&GU(t,n,e[n]);if(kw)for(var n of kw(e))AY.call(e,n)&&GU(t,n,e[n]);return t},zP=(t,e)=>a2e(t,l2e(e)),c2e=(t,e)=>{var n={};for(var r in t)RY.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&kw)for(var r of kw(t))e.indexOf(r)<0&&AY.call(t,r)&&(n[r]=t[r]);return n};const u2e={xs:26,sm:34,md:42,lg:50,xl:54},d2e={swatchesPerRow:10,size:"sm",withPicker:!0,focusable:!0,__staticSelector:"ColorPicker"},DY=M.forwardRef((t,e)=>{const n=nt("ColorPicker",d2e,t),{value:r,defaultValue:i,onChange:o,onChangeEnd:s,format:a,swatches:l,swatchesPerRow:c,size:u,withPicker:d,fullWidth:f,focusable:h,__staticSelector:g,saturationLabel:y,hueLabel:_,alphaLabel:v,className:x,styles:w,classNames:S,unstyled:E,onColorSwatchClick:C,variant:O}=n,R=c2e(n,["value","defaultValue","onChange","onChangeEnd","format","swatches","swatchesPerRow","size","withPicker","fullWidth","focusable","__staticSelector","saturationLabel","hueLabel","alphaLabel","className","styles","classNames","unstyled","onColorSwatchClick","variant"]),{classes:T,cx:A}=o2e({fullWidth:f},{classNames:S,styles:w,name:g,unstyled:E,variant:O,size:u}),F=M.useRef(a),N=M.useRef(null),U=M.useRef(!0),k=a==="hexa"||a==="rgba"||a==="hsla",[z,G,W]=Ar({value:r,defaultValue:i,finalValue:"#FFFFFF",onChange:o}),[B,j]=M.useState(Iu(z)),$=q=>{U.current=!1,j(K=>{const re=cf(cf({},K),q);return N.current=Ps(F.current,re),re}),G(N.current),setTimeout(()=>{U.current=!0},0)};return Qr(()=>{em(r)&&U.current&&(j(Iu(r)),U.current=!0)},[r]),Qr(()=>{F.current=a,G(Ps(a,B))},[a]),H.createElement(Xe,cf({className:A(T.wrapper,x),ref:e},R),d&&H.createElement(H.Fragment,null,H.createElement(PY,{value:B,onChange:$,onChangeEnd:({s:q,v:K})=>s?.(Ps(F.current,zP(cf({},B),{s:q,v:K}))),color:z,styles:w,classNames:S,size:u,focusable:h,saturationLabel:y,__staticSelector:g}),H.createElement("div",{className:T.body},H.createElement("div",{className:T.sliders},H.createElement(_Y,{value:B.h,onChange:q=>$({h:q}),onChangeEnd:q=>s?.(Ps(F.current,zP(cf({},B),{h:q}))),size:u,styles:w,classNames:S,focusable:h,"aria-label":_,__staticSelector:g}),k&&H.createElement(bY,{value:B.a,onChange:q=>$({a:q}),onChangeEnd:q=>{s?.(Ps(F.current,zP(cf({},B),{a:q})))},size:u,color:Ps("hex",B),style:{marginTop:X(6)},styles:w,classNames:S,focusable:h,"aria-label":v,__staticSelector:g})),k&&H.createElement(DA,{color:z,radius:"sm",size:Oe({size:u,sizes:u2e}),className:T.preview}))),Array.isArray(l)&&H.createElement(OY,{data:l,style:{marginTop:X(5)},swatchesPerRow:c,focusable:h,classNames:S,styles:w,__staticSelector:g,setValue:G,onChangeEnd:q=>{const K=Ps(a,Iu(q));C?.(K),s?.(K),W||j(Iu(q))}}))});DY.displayName="@mantine/core/ColorPicker";var f2e=Object.defineProperty,Nw=Object.getOwnPropertySymbols,IY=Object.prototype.hasOwnProperty,LY=Object.prototype.propertyIsEnumerable,WU=(t,e,n)=>e in t?f2e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,h2e=(t,e)=>{for(var n in e||(e={}))IY.call(e,n)&&WU(t,n,e[n]);if(Nw)for(var n of Nw(e))LY.call(e,n)&&WU(t,n,e[n]);return t},p2e=(t,e)=>{var n={};for(var r in t)IY.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Nw)for(var r of Nw(t))e.indexOf(r)<0&&LY.call(t,r)&&(n[r]=t[r]);return n};function m2e(t){var e=t,{size:n}=e,r=p2e(e,["size"]);return H.createElement("svg",h2e({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-color-picker",width:n,height:n,viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},r),H.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),H.createElement("path",{d:"M11 7l6 6"}),H.createElement("path",{d:"M4 16l11.7 -11.7a1 1 0 0 1 1.4 0l2.6 2.6a1 1 0 0 1 0 1.4l-11.7 11.7h-4v-4z"}))}var g2e=Object.defineProperty,v2e=Object.defineProperties,y2e=Object.getOwnPropertyDescriptors,Fw=Object.getOwnPropertySymbols,kY=Object.prototype.hasOwnProperty,NY=Object.prototype.propertyIsEnumerable,YU=(t,e,n)=>e in t?g2e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,UP=(t,e)=>{for(var n in e||(e={}))kY.call(e,n)&&YU(t,n,e[n]);if(Fw)for(var n of Fw(e))NY.call(e,n)&&YU(t,n,e[n]);return t},XU=(t,e)=>v2e(t,y2e(e)),_2e=(t,e)=>{var n={};for(var r in t)kY.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Fw)for(var r of Fw(t))e.indexOf(r)<0&&NY.call(t,r)&&(n[r]=t[r]);return n};const x2e={xs:X(16),sm:X(18),md:X(22),lg:X(28),xl:X(36)},w2e={xs:X(14),sm:X(16),md:X(18),lg:X(20),xl:X(22)},S2e={size:"sm",format:"hex",fixOnBlur:!0,withPreview:!0,swatchesPerRow:10,withPicker:!0,transitionProps:{transition:"fade",duration:0},dropdownZIndex:Ys("popover"),withinPortal:!0,shadow:"md",withEyeDropper:!0},OT=M.forwardRef((t,e)=>{const n=hb("ColorInput",S2e,t),{wrapperProps:r,inputProps:i,format:o,onChange:s,onChangeEnd:a,onFocus:l,onBlur:c,onClick:u,value:d,defaultValue:f,disallowInput:h,fixOnBlur:g,withPreview:y,swatchesPerRow:_,withPicker:v,icon:x,transitionProps:w,dropdownZIndex:S,withinPortal:E,portalProps:C,swatches:O,shadow:R,classNames:T,styles:A,unstyled:F,readOnly:N,withEyeDropper:U,eyeDropperIcon:k,rightSection:z,closeOnColorSwatchClick:G,disabled:W,eyeDropperLabel:B}=n,j=_2e(n,["wrapperProps","inputProps","format","onChange","onChangeEnd","onFocus","onBlur","onClick","value","defaultValue","disallowInput","fixOnBlur","withPreview","swatchesPerRow","withPicker","icon","transitionProps","dropdownZIndex","withinPortal","portalProps","swatches","shadow","classNames","styles","unstyled","readOnly","withEyeDropper","eyeDropperIcon","rightSection","closeOnColorSwatchClick","disabled","eyeDropperLabel"]),$=Ir(),[q,K]=M.useState(!1),[re,J]=M.useState(""),[le,ae]=Ar({value:d,defaultValue:f,finalValue:"",onChange:s}),{supported:oe,open:De}=$ye(),Te=H.createElement(An,{sx:{color:$.colorScheme==="dark"?$.colors.dark[0]:$.black},size:i.size,"aria-label":B,onClick:()=>De().then(({sRGBHex:se})=>{const de=Ps(o,Iu(se));ae(de),a?.(de)}).catch(PG)},k||H.createElement(m2e,{size:Oe({size:i.size,sizes:w2e})})),ve=se=>{l?.(se),K(!0)},we=se=>{g&&ae(re),c?.(se),K(!1)},me=se=>{u?.(se),K(!0)};return M.useEffect(()=>{(em(le)||le.trim()==="")&&J(le)},[le]),Qr(()=>{em(le)&&ae(Ps(o,Iu(le)))},[o]),H.createElement(Ki.Wrapper,XU(UP({},r),{__staticSelector:"ColorInput"}),H.createElement(qi,{__staticSelector:"ColorInput",position:"bottom-start",offset:5,zIndex:S,withinPortal:E,portalProps:C,transitionProps:w,opened:q,shadow:R,classNames:T,styles:A,unstyled:F,disabled:N||v===!1&&(!Array.isArray(O)||O.length===0)},H.createElement(qi.Target,null,H.createElement("div",null,H.createElement(Ki,XU(UP(UP({autoComplete:"off"},j),i),{disabled:W,ref:e,__staticSelector:"ColorInput",onFocus:ve,onBlur:we,onClick:me,spellCheck:!1,value:le,onChange:se=>{const de=se.currentTarget.value;ae(de),em(de)&&a?.(Ps(o,Iu(de)))},icon:x||(y?H.createElement(DA,{color:em(le)?le:"#fff",size:Oe({size:i.size,sizes:x2e})}):null),readOnly:h||N,sx:{cursor:h?"pointer":void 0},unstyled:F,classNames:T,styles:A,rightSection:z||(U&&!W&&!N&&oe?Te:null)})))),H.createElement(qi.Dropdown,{onMouseDown:se=>se.preventDefault(),p:i.size},H.createElement(DY,{__staticSelector:"ColorInput",value:le,onChange:ae,onChangeEnd:a,format:o,swatches:O,swatchesPerRow:_,withPicker:v,size:i.size,focusable:!1,unstyled:F,styles:A,classNames:T,onColorSwatchClick:()=>G&&K(!1)}))))});OT.displayName="@mantine/core/ColorInput";var b2e=ft((t,{fluid:e,sizes:n},{size:r})=>({root:{paddingLeft:t.spacing.md,paddingRight:t.spacing.md,maxWidth:e?"100%":Oe({size:r,sizes:n}),marginLeft:"auto",marginRight:"auto"}}));const M2e=b2e;var E2e=Object.defineProperty,zw=Object.getOwnPropertySymbols,FY=Object.prototype.hasOwnProperty,zY=Object.prototype.propertyIsEnumerable,ZU=(t,e,n)=>e in t?E2e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,P2e=(t,e)=>{for(var n in e||(e={}))FY.call(e,n)&&ZU(t,n,e[n]);if(zw)for(var n of zw(e))zY.call(e,n)&&ZU(t,n,e[n]);return t},C2e=(t,e)=>{var n={};for(var r in t)FY.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&zw)for(var r of zw(t))e.indexOf(r)<0&&zY.call(t,r)&&(n[r]=t[r]);return n};const T2e={sizes:{xs:X(540),sm:X(720),md:X(960),lg:X(1140),xl:X(1320)}},UY=M.forwardRef((t,e)=>{const n=nt("Container",T2e,t),{className:r,fluid:i,size:o,unstyled:s,sizes:a,variant:l}=n,c=C2e(n,["className","fluid","size","unstyled","sizes","variant"]),{classes:u,cx:d}=M2e({fluid:i,sizes:a},{unstyled:s,name:"Container",variant:l,size:o});return H.createElement(Xe,P2e({className:d(u.root,r),ref:e},c))});UY.displayName="@mantine/core/Container";var O2e=Object.defineProperty,Uw=Object.getOwnPropertySymbols,BY=Object.prototype.hasOwnProperty,HY=Object.prototype.propertyIsEnumerable,qU=(t,e,n)=>e in t?O2e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,R2e=(t,e)=>{for(var n in e||(e={}))BY.call(e,n)&&qU(t,n,e[n]);if(Uw)for(var n of Uw(e))HY.call(e,n)&&qU(t,n,e[n]);return t},A2e=(t,e)=>{var n={};for(var r in t)BY.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Uw)for(var r of Uw(t))e.indexOf(r)<0&&HY.call(t,r)&&(n[r]=t[r]);return n};const D2e={timeout:1e3};function VY(t){const e=nt("CopyButton",D2e,t),{children:n,timeout:r,value:i}=e,o=A2e(e,["children","timeout","value"]),s=Cye({timeout:r}),a=()=>s.copy(i);return H.createElement(H.Fragment,null,n(R2e({copy:a,copied:s.copied},o)))}VY.displayName="@mantine/core/CopyButton";const[I2e,Rh]=cd("ModalBase component was not found in tree");var L2e=ft(()=>({close:{marginLeft:"auto",marginRight:0}}));const k2e=L2e;var N2e=Object.defineProperty,Bw=Object.getOwnPropertySymbols,jY=Object.prototype.hasOwnProperty,$Y=Object.prototype.propertyIsEnumerable,KU=(t,e,n)=>e in t?N2e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,F2e=(t,e)=>{for(var n in e||(e={}))jY.call(e,n)&&KU(t,n,e[n]);if(Bw)for(var n of Bw(e))$Y.call(e,n)&&KU(t,n,e[n]);return t},z2e=(t,e)=>{var n={};for(var r in t)jY.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Bw)for(var r of Bw(t))e.indexOf(r)<0&&$Y.call(t,r)&&(n[r]=t[r]);return n};const U2e={size:"sm"},B2e=M.forwardRef((t,e)=>{const n=Rh(),r=nt(`${n.__staticSelector}CloseButton`,U2e,t),{className:i}=r,o=z2e(r,["className"]),{classes:s,cx:a}=k2e(null,n.stylesApi);return H.createElement(Qg,F2e({className:a(s.close,i),ref:e,onClick:n.onClose},o))});var H2e=ft(()=>({overlay:{}}));const V2e=H2e;var j2e=Object.defineProperty,$2e=Object.defineProperties,G2e=Object.getOwnPropertyDescriptors,QU=Object.getOwnPropertySymbols,W2e=Object.prototype.hasOwnProperty,Y2e=Object.prototype.propertyIsEnumerable,JU=(t,e,n)=>e in t?j2e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,X2e=(t,e)=>{for(var n in e||(e={}))W2e.call(e,n)&&JU(t,n,e[n]);if(QU)for(var n of QU(e))Y2e.call(e,n)&&JU(t,n,e[n]);return t},Z2e=(t,e)=>$2e(t,G2e(e)),q2e=ft((t,{color:e,opacity:n,blur:r,radius:i,gradient:o,fixed:s,zIndex:a})=>({root:Z2e(X2e({},t.fn.cover(0)),{position:s?"fixed":"absolute",backgroundColor:o?void 0:t.fn.rgba(e,n),backgroundImage:o,backdropFilter:r?`blur(${X(r)})`:void 0,borderRadius:t.fn.radius(i),zIndex:a,"&[data-center]":{display:"flex",alignItems:"center",justifyContent:"center"}})}));const K2e=q2e;var Q2e=Object.defineProperty,Hw=Object.getOwnPropertySymbols,GY=Object.prototype.hasOwnProperty,WY=Object.prototype.propertyIsEnumerable,e5=(t,e,n)=>e in t?Q2e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,J2e=(t,e)=>{for(var n in e||(e={}))GY.call(e,n)&&e5(t,n,e[n]);if(Hw)for(var n of Hw(e))WY.call(e,n)&&e5(t,n,e[n]);return t},eTe=(t,e)=>{var n={};for(var r in t)GY.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Hw)for(var r of Hw(t))e.indexOf(r)<0&&WY.call(t,r)&&(n[r]=t[r]);return n};const tTe={opacity:.6,color:"#000",zIndex:Ys("modal"),radius:0},YY=M.forwardRef((t,e)=>{const n=nt("Overlay",tTe,t),{variant:r,opacity:i,color:o,blur:s,gradient:a,zIndex:l,radius:c,children:u,className:d,classNames:f,styles:h,unstyled:g,center:y,fixed:_}=n,v=eTe(n,["variant","opacity","color","blur","gradient","zIndex","radius","children","className","classNames","styles","unstyled","center","fixed"]),{classes:x,cx:w}=K2e({color:o,opacity:i,blur:s,radius:c,gradient:a,fixed:_,zIndex:l},{name:"Overlay",classNames:f,styles:h,unstyled:g,variant:r});return H.createElement(Xe,J2e({ref:e,className:w(x.root,d),"data-center":y||void 0},v),u)});YY.displayName="@mantine/core/Overlay";const nTe=YY;var rTe=Object.defineProperty,iTe=Object.defineProperties,oTe=Object.getOwnPropertyDescriptors,Vw=Object.getOwnPropertySymbols,XY=Object.prototype.hasOwnProperty,ZY=Object.prototype.propertyIsEnumerable,t5=(t,e,n)=>e in t?rTe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Bp=(t,e)=>{for(var n in e||(e={}))XY.call(e,n)&&t5(t,n,e[n]);if(Vw)for(var n of Vw(e))ZY.call(e,n)&&t5(t,n,e[n]);return t},sTe=(t,e)=>iTe(t,oTe(e)),aTe=(t,e)=>{var n={};for(var r in t)XY.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Vw)for(var r of Vw(t))e.indexOf(r)<0&&ZY.call(t,r)&&(n[r]=t[r]);return n};const lTe={},cTe=M.forwardRef((t,e)=>{const n=Rh(),r=nt(`${n.__staticSelector}Overlay`,lTe,t),{onClick:i,transitionProps:o,style:s,className:a}=r,l=aTe(r,["onClick","transitionProps","style","className"]),{classes:c,cx:u}=V2e(null,n.stylesApi),d=f=>{i?.(f),n.closeOnClickOutside&&n.onClose()};return H.createElement(zc,sTe(Bp(Bp({mounted:n.opened},n.transitionProps),o),{transition:"fade"}),f=>H.createElement(nTe,Bp({ref:e,onClick:d,fixed:!0,style:Bp(Bp({},s),f),className:u(c.overlay,a),zIndex:n.zIndex},l)))});var uTe=ft((t,{zIndex:e})=>({inner:{position:"fixed",width:"100%",top:0,bottom:0,maxHeight:"100%",zIndex:e,pointerEvents:"none"},content:{pointerEvents:"all"}}));const dTe=uTe;var fTe=Object.defineProperty,jw=Object.getOwnPropertySymbols,qY=Object.prototype.hasOwnProperty,KY=Object.prototype.propertyIsEnumerable,n5=(t,e,n)=>e in t?fTe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Hp=(t,e)=>{for(var n in e||(e={}))qY.call(e,n)&&n5(t,n,e[n]);if(jw)for(var n of jw(e))KY.call(e,n)&&n5(t,n,e[n]);return t},hTe=(t,e)=>{var n={};for(var r in t)qY.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&jw)for(var r of jw(t))e.indexOf(r)<0&&KY.call(t,r)&&(n[r]=t[r]);return n};const pTe={},mTe=M.forwardRef((t,e)=>{const n=Rh(),r=nt(`${n.__staticSelector}Content`,pTe,t),{className:i,transitionProps:o,style:s,onKeyDown:a}=r,l=hTe(r,["className","transitionProps","style","onKeyDown"]),{classes:c,cx:u}=dTe({zIndex:n.zIndex+1},n.stylesApi),d=f=>{var h;((h=f.target)==null?void 0:h.getAttribute("data-mantine-stop-propagation"))!=="true"&&f.key==="Escape"&&n.closeOnEscape&&n.onClose(),a?.(f)};return H.createElement(zc,Hp(Hp({mounted:n.opened,transition:"pop"},n.transitionProps),o),f=>H.createElement("div",{className:u(c.inner)},H.createElement(PA,{active:n.opened&&n.trapFocus},H.createElement(tv,Hp({component:"section",role:"dialog",tabIndex:-1,"aria-modal":!0,"aria-describedby":n.bodyMounted?n.getBodyId():void 0,"aria-labelledby":n.titleMounted?n.getTitleId():void 0,onKeyDown:d,ref:e,className:u(c.content,i),style:Hp(Hp({},s),f),shadow:n.shadow},l),l.children))))});var gTe=ft((t,{padding:e})=>{const n=Oe({size:e,sizes:t.spacing});return{header:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:n,paddingRight:`calc(${n} - ${X(5)})`,position:"sticky",top:0,backgroundColor:t.colorScheme==="dark"?t.colors.dark[7]:t.white,zIndex:1e3}}});const vTe=gTe;var yTe=Object.defineProperty,$w=Object.getOwnPropertySymbols,QY=Object.prototype.hasOwnProperty,JY=Object.prototype.propertyIsEnumerable,r5=(t,e,n)=>e in t?yTe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,_Te=(t,e)=>{for(var n in e||(e={}))QY.call(e,n)&&r5(t,n,e[n]);if($w)for(var n of $w(e))JY.call(e,n)&&r5(t,n,e[n]);return t},xTe=(t,e)=>{var n={};for(var r in t)QY.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&$w)for(var r of $w(t))e.indexOf(r)<0&&JY.call(t,r)&&(n[r]=t[r]);return n};const wTe={},STe=M.forwardRef((t,e)=>{const n=Rh(),r=nt(`${n.__staticSelector}Header`,wTe,t),{className:i}=r,o=xTe(r,["className"]),{classes:s,cx:a}=vTe({padding:n.padding},n.stylesApi);return H.createElement(Xe,_Te({ref:e,className:a(s.header,i)},o))});var bTe=ft(t=>({title:{lineHeight:1,padding:0,margin:0,fontWeight:400,fontSize:t.fontSizes.md}}));const MTe=bTe;var ETe=Object.defineProperty,Gw=Object.getOwnPropertySymbols,eX=Object.prototype.hasOwnProperty,tX=Object.prototype.propertyIsEnumerable,i5=(t,e,n)=>e in t?ETe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,PTe=(t,e)=>{for(var n in e||(e={}))eX.call(e,n)&&i5(t,n,e[n]);if(Gw)for(var n of Gw(e))tX.call(e,n)&&i5(t,n,e[n]);return t},CTe=(t,e)=>{var n={};for(var r in t)eX.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Gw)for(var r of Gw(t))e.indexOf(r)<0&&tX.call(t,r)&&(n[r]=t[r]);return n};const TTe={},OTe=M.forwardRef((t,e)=>{const n=Rh(),r=nt(`${n.__staticSelector}Title`,TTe,t),{className:i}=r,o=CTe(r,["className"]),{classes:s,cx:a}=MTe(null,n.stylesApi);return M.useEffect(()=>(n.setTitleMounted(!0),()=>n.setTitleMounted(!1)),[]),H.createElement(Xe,PTe({component:"h2",id:n.getTitleId(),className:a(s.title,i),ref:e},o))});var RTe=ft((t,{padding:e})=>({body:{padding:Oe({size:e,sizes:t.spacing}),"&:not(:only-child)":{paddingTop:0}}}));const ATe=RTe;var DTe=Object.defineProperty,Ww=Object.getOwnPropertySymbols,nX=Object.prototype.hasOwnProperty,rX=Object.prototype.propertyIsEnumerable,o5=(t,e,n)=>e in t?DTe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ITe=(t,e)=>{for(var n in e||(e={}))nX.call(e,n)&&o5(t,n,e[n]);if(Ww)for(var n of Ww(e))rX.call(e,n)&&o5(t,n,e[n]);return t},LTe=(t,e)=>{var n={};for(var r in t)nX.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Ww)for(var r of Ww(t))e.indexOf(r)<0&&rX.call(t,r)&&(n[r]=t[r]);return n};const kTe={},NTe=M.forwardRef((t,e)=>{const n=Rh(),r=nt(`${n.__staticSelector}Body`,kTe,t),{className:i}=r,o=LTe(r,["className"]),{classes:s,cx:a}=ATe({padding:n.padding},n.stylesApi);return M.useEffect(()=>(n.setBodyMounted(!0),()=>n.setBodyMounted(!1)),[]),H.createElement(Xe,ITe({id:n.getBodyId(),className:a(s.body,i),ref:e},o))});function FTe({children:t}){return H.createElement(H.Fragment,null,t)}function zTe({opened:t,transitionDuration:e}){const[n,r]=M.useState(t),i=M.useRef(),s=ob()?0:e;return M.useEffect(()=>(t?(r(!0),window.clearTimeout(i.current)):s===0?r(!1):i.current=window.setTimeout(()=>r(!1),s),()=>window.clearTimeout(i.current)),[t,s]),n}var UTe=ft(()=>({root:{}}));const BTe=UTe;var HTe=Object.defineProperty,VTe=Object.defineProperties,jTe=Object.getOwnPropertyDescriptors,Yw=Object.getOwnPropertySymbols,iX=Object.prototype.hasOwnProperty,oX=Object.prototype.propertyIsEnumerable,s5=(t,e,n)=>e in t?HTe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,BP=(t,e)=>{for(var n in e||(e={}))iX.call(e,n)&&s5(t,n,e[n]);if(Yw)for(var n of Yw(e))oX.call(e,n)&&s5(t,n,e[n]);return t},a5=(t,e)=>VTe(t,jTe(e)),$Te=(t,e)=>{var n={};for(var r in t)iX.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Yw)for(var r of Yw(t))e.indexOf(r)<0&&oX.call(t,r)&&(n[r]=t[r]);return n};const kA={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:Ys("modal"),padding:"md",size:"md",shadow:"xl"};function Rr(t){const e=nt("ModalBase",kA,t),{opened:n,onClose:r,children:i,closeOnClickOutside:o,__staticSelector:s,transitionProps:a,withinPortal:l,portalProps:c,keepMounted:u,target:d,zIndex:f,lockScroll:h,trapFocus:g,closeOnEscape:y,returnFocus:_,padding:v,shadow:x,id:w,size:S,variant:E,classNames:C,unstyled:O,styles:R,className:T}=e,A=$Te(e,["opened","onClose","children","closeOnClickOutside","__staticSelector","transitionProps","withinPortal","portalProps","keepMounted","target","zIndex","lockScroll","trapFocus","closeOnEscape","returnFocus","padding","shadow","id","size","variant","classNames","unstyled","styles","className"]),{classes:F,cx:N}=BTe(null,{name:s,classNames:C,styles:R,unstyled:O,variant:E,size:S}),U=zo(w),[k,z]=M.useState(!1),[G,W]=M.useState(!1),B=typeof a?.duration=="number"?a?.duration:200,j=zTe({opened:n,transitionDuration:B});return gT("keydown",$=>{!g&&$.key==="Escape"&&y&&r()}),sW({opened:n,shouldReturnFocus:g&&_}),H.createElement(Kg,a5(BP({},c),{withinPortal:l,target:d}),H.createElement(I2e,{value:{__staticSelector:s,opened:n,onClose:r,closeOnClickOutside:o,transitionProps:a5(BP({},a),{duration:B,keepMounted:u}),zIndex:f,padding:v,id:U,getTitleId:()=>`${U}-title`,getBodyId:()=>`${U}-body`,titleMounted:k,bodyMounted:G,setTitleMounted:z,setBodyMounted:W,trapFocus:g,closeOnEscape:y,shadow:x,stylesApi:{name:s,size:S,variant:E,classNames:C,styles:R,unstyled:O}}},H.createElement(ave,{enabled:j&&h},H.createElement(Xe,BP({className:N(F.root,T)},A),i))))}Rr.CloseButton=B2e;Rr.Overlay=cTe;Rr.Content=mTe;Rr.Header=STe;Rr.Title=OTe;Rr.Body=NTe;Rr.NativeScrollArea=FTe;const GTe={gap:{type:"spacing",property:"gap"},rowGap:{type:"spacing",property:"rowGap"},columnGap:{type:"spacing",property:"columnGap"},align:{type:"identity",property:"alignItems"},justify:{type:"identity",property:"justifyContent"},wrap:{type:"identity",property:"flexWrap"},direction:{type:"identity",property:"flexDirection"}};var WTe=Object.defineProperty,YTe=Object.defineProperties,XTe=Object.getOwnPropertyDescriptors,Xw=Object.getOwnPropertySymbols,sX=Object.prototype.hasOwnProperty,aX=Object.prototype.propertyIsEnumerable,l5=(t,e,n)=>e in t?WTe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ZTe=(t,e)=>{for(var n in e||(e={}))sX.call(e,n)&&l5(t,n,e[n]);if(Xw)for(var n of Xw(e))aX.call(e,n)&&l5(t,n,e[n]);return t},qTe=(t,e)=>YTe(t,XTe(e)),KTe=(t,e)=>{var n={};for(var r in t)sX.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Xw)for(var r of Xw(t))e.indexOf(r)<0&&aX.call(t,r)&&(n[r]=t[r]);return n};const QTe={},er=M.forwardRef((t,e)=>{const n=nt("Flex",QTe,t),{gap:r,rowGap:i,columnGap:o,align:s,justify:a,wrap:l,direction:c,sx:u}=n,d=KTe(n,["gap","rowGap","columnGap","align","justify","wrap","direction","sx"]);return H.createElement(Xe,qTe(ZTe({},d),{sx:[{display:"flex"},f=>vT({gap:r,rowGap:i,columnGap:o,align:s,justify:a,wrap:l,direction:c},f,GTe),...Ch(u)],ref:e}))});er.displayName="@mantine/core/Flex";function JTe(t){return M.Children.toArray(t).filter(Boolean)}const lX={left:"flex-start",center:"center",right:"flex-end",apart:"space-between"};var eOe=ft((t,{spacing:e,position:n,noWrap:r,grow:i,align:o,count:s})=>({root:{boxSizing:"border-box",display:"flex",flexDirection:"row",alignItems:o||"center",flexWrap:r?"nowrap":"wrap",justifyContent:lX[n],gap:Oe({size:e,sizes:t.spacing}),"& > *":{boxSizing:"border-box",maxWidth:i?`calc(${100/s}% - (${X(Oe({size:e,sizes:t.spacing}))} - ${Oe({size:e,sizes:t.spacing})} / ${s}))`:void 0,flexGrow:i?1:0}}}));const tOe=eOe;var nOe=Object.defineProperty,Zw=Object.getOwnPropertySymbols,cX=Object.prototype.hasOwnProperty,uX=Object.prototype.propertyIsEnumerable,c5=(t,e,n)=>e in t?nOe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,rOe=(t,e)=>{for(var n in e||(e={}))cX.call(e,n)&&c5(t,n,e[n]);if(Zw)for(var n of Zw(e))uX.call(e,n)&&c5(t,n,e[n]);return t},iOe=(t,e)=>{var n={};for(var r in t)cX.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Zw)for(var r of Zw(t))e.indexOf(r)<0&&uX.call(t,r)&&(n[r]=t[r]);return n};const oOe={position:"left",spacing:"md"},RT=M.forwardRef((t,e)=>{const n=nt("Group",oOe,t),{className:r,position:i,align:o,children:s,noWrap:a,grow:l,spacing:c,unstyled:u,variant:d}=n,f=iOe(n,["className","position","align","children","noWrap","grow","spacing","unstyled","variant"]),h=JTe(s),{classes:g,cx:y}=tOe({align:o,grow:l,noWrap:a,spacing:c,position:i,count:h.length},{unstyled:u,name:"Group",variant:d});return H.createElement(Xe,rOe({className:y(g.root,r),ref:e},f),h)});RT.displayName="@mantine/core/Group";function sOe({open:t,close:e,openDelay:n,closeDelay:r}){const i=M.useRef(-1),o=M.useRef(-1),s=()=>{window.clearTimeout(i.current),window.clearTimeout(o.current)},a=()=>{s(),n===0?t():i.current=window.setTimeout(t,n)},l=()=>{s(),r===0?e():o.current=window.setTimeout(e,r)};return M.useEffect(()=>s,[]),{openDropdown:a,closeDropdown:l}}var aOe=Object.defineProperty,lOe=Object.defineProperties,cOe=Object.getOwnPropertyDescriptors,u5=Object.getOwnPropertySymbols,uOe=Object.prototype.hasOwnProperty,dOe=Object.prototype.propertyIsEnumerable,d5=(t,e,n)=>e in t?aOe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,f5=(t,e)=>{for(var n in e||(e={}))uOe.call(e,n)&&d5(t,n,e[n]);if(u5)for(var n of u5(e))dOe.call(e,n)&&d5(t,n,e[n]);return t},h5=(t,e)=>lOe(t,cOe(e));const fOe=t=>cA({from:{boxShadow:`0 0 ${X(.5)} 0 ${t}`,opacity:.6},to:{boxShadow:`0 0 ${X(.5)} ${X(4.4)} ${t}`,opacity:0}});function p5(t,e=0){const n={},[r,i]=t.split("-");let o="",s="";return r==="top"&&(n.top=e,s="-50%"),r==="middle"&&(n.top="50%",s="-50%"),r==="bottom"&&(n.bottom=e,s="50%"),i==="start"&&(n.left=e,o="-50%"),i==="center"&&(n.left="50%",o="-50%"),i==="end"&&(n.right=e,o="50%"),n.transform=`translate(${o}, ${s})`,n}var hOe=ft((t,{radius:e,color:n,position:r,offset:i,inline:o,withBorder:s,withLabel:a,zIndex:l},{size:c})=>{const{background:u}=t.fn.variant({variant:"filled",primaryFallback:!1,color:n||t.primaryColor}),d=X(c);return{root:{position:"relative",display:o?"inline-block":"block"},indicator:h5(f5({},p5(r,i)),{zIndex:l,position:"absolute",[a?"minWidth":"width"]:d,height:d,display:"flex",justifyContent:"center",alignItems:"center",fontSize:t.fontSizes.xs,paddingLeft:a?`calc(${t.spacing.xs} / 2)`:0,paddingRight:a?`calc(${t.spacing.xs} / 2)`:0,borderRadius:t.fn.radius(e),backgroundColor:t.fn.variant({variant:"filled",primaryFallback:!1,color:n||t.primaryColor}).background,border:s?`${X(2)} solid ${t.colorScheme==="dark"?t.colors.dark[7]:t.white}`:void 0,color:t.white,whiteSpace:"nowrap"}),processing:{animation:`${fOe(u)} 1000ms linear infinite`},common:h5(f5({},p5(r,i)),{position:"absolute",[a?"minWidth":"width"]:d,height:d,borderRadius:t.fn.radius(e)})}});const pOe=hOe;var mOe=Object.defineProperty,qw=Object.getOwnPropertySymbols,dX=Object.prototype.hasOwnProperty,fX=Object.prototype.propertyIsEnumerable,m5=(t,e,n)=>e in t?mOe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,gOe=(t,e)=>{for(var n in e||(e={}))dX.call(e,n)&&m5(t,n,e[n]);if(qw)for(var n of qw(e))fX.call(e,n)&&m5(t,n,e[n]);return t},vOe=(t,e)=>{var n={};for(var r in t)dX.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&qw)for(var r of qw(t))e.indexOf(r)<0&&fX.call(t,r)&&(n[r]=t[r]);return n};const yOe={position:"top-end",offset:0,inline:!1,withBorder:!1,disabled:!1,processing:!1,size:10,radius:1e3,zIndex:Ys("app")},hX=M.forwardRef((t,e)=>{const n=nt("Indicator",yOe,t),{children:r,position:i,offset:o,size:s,radius:a,inline:l,withBorder:c,className:u,color:d,styles:f,label:h,classNames:g,disabled:y,zIndex:_,unstyled:v,processing:x,variant:w}=n,S=vOe(n,["children","position","offset","size","radius","inline","withBorder","className","color","styles","label","classNames","disabled","zIndex","unstyled","processing","variant"]),{classes:E,cx:C}=pOe({position:i,offset:o,radius:a,inline:l,color:d,withBorder:c,zIndex:_,withLabel:!!h},{name:"Indicator",classNames:g,styles:f,unstyled:v,variant:w,size:s});return H.createElement(Xe,gOe({ref:e,className:C(E.root,u)},S),!y&&H.createElement(H.Fragment,null,H.createElement("div",{className:C(E.indicator,E.common)},h),x&&H.createElement("div",{className:C(E.processing,E.common)})),r)});hX.displayName="@mantine/core/Indicator";var _Oe=ft((t,{smallerThan:e,largerThan:n,query:r,styles:i})=>{const o={},s=Oe({size:n,sizes:t.breakpoints}),a=Oe({size:e,sizes:t.breakpoints}),l=typeof i=="function"?i(t):i;return n!==void 0&&e!==void 0?o[`@media (min-width: ${ls(s)}) and (max-width: ${ls(js(a)-1)})`]=l:(n!==void 0&&(o[`@media (min-width: ${Oe({size:n,sizes:t.breakpoints})})`]=l),e!==void 0&&(o[`@media (max-width: ${ls(js(Oe({size:e,sizes:t.breakpoints}))-1)})`]=l)),r&&(o[`@media ${r}`]=l),{media:o}});const xOe=_Oe;function pX(t){var e;const{children:n,smallerThan:r,largerThan:i,query:o,styles:s,className:a}=nt("MediaQuery",{},t),{classes:l,cx:c}=xOe({smallerThan:r,largerThan:i,query:o,styles:s},{name:"MediaQuery"}),u=M.Children.only(n);return typeof u=="object"&&u!==null&&"props"in u?H.cloneElement(u,{className:c(l.media,(e=u.props)==null?void 0:e.className,a)}):u}pX.displayName="@mantine/core/MediaQuery";const mX={context:"Menu component was not found in the tree",children:"Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"},[wOe,rv]=cd(mX.context);var SOe=ft(t=>({divider:{marginTop:X(4),marginBottom:X(4),borderTop:`${X(1)} solid ${t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[2]}`}}));const bOe=SOe;var MOe=Object.defineProperty,Kw=Object.getOwnPropertySymbols,gX=Object.prototype.hasOwnProperty,vX=Object.prototype.propertyIsEnumerable,g5=(t,e,n)=>e in t?MOe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,EOe=(t,e)=>{for(var n in e||(e={}))gX.call(e,n)&&g5(t,n,e[n]);if(Kw)for(var n of Kw(e))vX.call(e,n)&&g5(t,n,e[n]);return t},POe=(t,e)=>{var n={};for(var r in t)gX.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Kw)for(var r of Kw(t))e.indexOf(r)<0&&vX.call(t,r)&&(n[r]=t[r]);return n};const COe={},yX=M.forwardRef((t,e)=>{const n=nt("MenuDivider",COe,t),{children:r,className:i}=n,o=POe(n,["children","className"]),{classNames:s,styles:a,unstyled:l,variant:c}=rv(),{classes:u,cx:d}=bOe(null,{name:"Menu",classNames:s,styles:a,unstyled:l,variant:c});return H.createElement(Xe,EOe({className:d(u.divider,i),ref:e},o))});yX.displayName="@mantine/core/MenuDivider";var TOe=Object.defineProperty,Qw=Object.getOwnPropertySymbols,_X=Object.prototype.hasOwnProperty,xX=Object.prototype.propertyIsEnumerable,v5=(t,e,n)=>e in t?TOe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,OOe=(t,e)=>{for(var n in e||(e={}))_X.call(e,n)&&v5(t,n,e[n]);if(Qw)for(var n of Qw(e))xX.call(e,n)&&v5(t,n,e[n]);return t},ROe=(t,e)=>{var n={};for(var r in t)_X.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Qw)for(var r of Qw(t))e.indexOf(r)<0&&xX.call(t,r)&&(n[r]=t[r]);return n};const AOe={};function wX(t){const e=nt("MenuDropdown",AOe,t),{children:n,onMouseEnter:r,onMouseLeave:i}=e,o=ROe(e,["children","onMouseEnter","onMouseLeave"]),s=M.useRef(),a=rv(),l=d=>{(d.key==="ArrowUp"||d.key==="ArrowDown")&&(d.preventDefault(),s.current.querySelectorAll("[data-menu-item]")[0].focus())},c=rl(r,()=>a.trigger==="hover"&&a.openDropdown()),u=rl(i,()=>a.trigger==="hover"&&a.closeDropdown());return H.createElement(qi.Dropdown,OOe({onMouseEnter:c,onMouseLeave:u,role:"menu","aria-orientation":"vertical"},o),H.createElement("div",{tabIndex:-1,"data-menu-dropdown":!0,"data-autofocus":!0,onKeyDown:l,ref:s,style:{outline:0}},n))}wX.displayName="@mantine/core/MenuDropdown";var DOe=Object.defineProperty,IOe=Object.defineProperties,LOe=Object.getOwnPropertyDescriptors,y5=Object.getOwnPropertySymbols,kOe=Object.prototype.hasOwnProperty,NOe=Object.prototype.propertyIsEnumerable,_5=(t,e,n)=>e in t?DOe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,FOe=(t,e)=>{for(var n in e||(e={}))kOe.call(e,n)&&_5(t,n,e[n]);if(y5)for(var n of y5(e))NOe.call(e,n)&&_5(t,n,e[n]);return t},zOe=(t,e)=>IOe(t,LOe(e)),UOe=ft((t,{color:e,radius:n})=>({item:zOe(FOe({},t.fn.fontStyles()),{WebkitTapHighlightColor:"transparent",fontSize:t.fontSizes.sm,border:0,backgroundColor:"transparent",outline:0,width:"100%",textAlign:"left",textDecoration:"none",boxSizing:"border-box",padding:`${t.spacing.xs} ${t.spacing.sm}`,cursor:"pointer",borderRadius:t.fn.radius(n),color:e?t.fn.variant({variant:"filled",primaryFallback:!1,color:e}).background:t.colorScheme==="dark"?t.colors.dark[0]:t.black,display:"flex",alignItems:"center","&:disabled":{color:t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[5],pointerEvents:"none",userSelect:"none"},"&[data-hovered]":{backgroundColor:e?t.fn.variant({variant:"light",color:e}).background:t.colorScheme==="dark"?t.fn.rgba(t.colors.dark[3],.35):t.colors.gray[1]}}),itemLabel:{flex:1},itemIcon:{display:"flex",justifyContent:"center",alignItems:"center",marginRight:t.spacing.xs},itemRightSection:{}}));const BOe=UOe;var HOe=Object.defineProperty,VOe=Object.defineProperties,jOe=Object.getOwnPropertyDescriptors,Jw=Object.getOwnPropertySymbols,SX=Object.prototype.hasOwnProperty,bX=Object.prototype.propertyIsEnumerable,x5=(t,e,n)=>e in t?HOe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$Oe=(t,e)=>{for(var n in e||(e={}))SX.call(e,n)&&x5(t,n,e[n]);if(Jw)for(var n of Jw(e))bX.call(e,n)&&x5(t,n,e[n]);return t},GOe=(t,e)=>VOe(t,jOe(e)),WOe=(t,e)=>{var n={};for(var r in t)SX.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Jw)for(var r of Jw(t))e.indexOf(r)<0&&bX.call(t,r)&&(n[r]=t[r]);return n};const YOe={},MX=M.forwardRef((t,e)=>{const n=nt("MenuItem",YOe,t),{children:r,className:i,color:o,closeMenuOnClick:s,icon:a,rightSection:l}=n,c=WOe(n,["children","className","color","closeMenuOnClick","icon","rightSection"]),u=rv(),{classes:d,cx:f,theme:h}=BOe({radius:u.radius,color:o},{name:"Menu",classNames:u.classNames,styles:u.styles,unstyled:u.unstyled,variant:u.variant}),g=M.useRef(),y=u.getItemIndex(g.current),_=c,v=rl(_.onMouseLeave,()=>u.setHovered(-1)),x=rl(_.onMouseEnter,()=>u.setHovered(u.getItemIndex(g.current))),w=rl(_.onClick,()=>{typeof s=="boolean"?s&&u.closeDropdownImmediately():u.closeOnItemClick&&u.closeDropdownImmediately()}),S=rl(_.onFocus,()=>u.setHovered(u.getItemIndex(g.current)));return H.createElement(Xe,GOe($Oe({component:"button",type:"button"},c),{tabIndex:-1,onFocus:S,className:f(d.item,i),ref:Da(g,e),role:"menuitem","data-menu-item":!0,"data-hovered":u.hovered===y?!0:void 0,onMouseEnter:x,onMouseLeave:v,onClick:w,onKeyDown:QR({siblingSelector:"[data-menu-item]",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:u.loop,dir:h.dir,orientation:"vertical",onKeyDown:_.onKeydown})}),a&&H.createElement("div",{className:d.itemIcon},a),r&&H.createElement("div",{className:d.itemLabel},r),l&&H.createElement("div",{className:d.itemRightSection},l))});MX.displayName="@mantine/core/MenuItem";const XOe=MX;var ZOe=ft(t=>({label:{color:t.colorScheme==="dark"?t.colors.dark[2]:t.colors.gray[6],fontWeight:500,fontSize:t.fontSizes.xs,padding:`calc(${t.spacing.xs} / 2) ${t.spacing.sm}`,cursor:"default"}}));const qOe=ZOe;var KOe=Object.defineProperty,e1=Object.getOwnPropertySymbols,EX=Object.prototype.hasOwnProperty,PX=Object.prototype.propertyIsEnumerable,w5=(t,e,n)=>e in t?KOe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,QOe=(t,e)=>{for(var n in e||(e={}))EX.call(e,n)&&w5(t,n,e[n]);if(e1)for(var n of e1(e))PX.call(e,n)&&w5(t,n,e[n]);return t},JOe=(t,e)=>{var n={};for(var r in t)EX.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&e1)for(var r of e1(t))e.indexOf(r)<0&&PX.call(t,r)&&(n[r]=t[r]);return n};const eRe={},CX=M.forwardRef((t,e)=>{const n=nt("MenuLabel",eRe,t),{children:r,className:i}=n,o=JOe(n,["children","className"]),{classNames:s,styles:a,unstyled:l,variant:c}=rv(),{classes:u,cx:d}=qOe(null,{name:"Menu",classNames:s,styles:a,unstyled:l,variant:c});return H.createElement(Si,QOe({className:d(u.label,i),ref:e},o),r)});CX.displayName="@mantine/core/MenuLabel";var tRe=Object.defineProperty,t1=Object.getOwnPropertySymbols,TX=Object.prototype.hasOwnProperty,OX=Object.prototype.propertyIsEnumerable,S5=(t,e,n)=>e in t?tRe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,nRe=(t,e)=>{for(var n in e||(e={}))TX.call(e,n)&&S5(t,n,e[n]);if(t1)for(var n of t1(e))OX.call(e,n)&&S5(t,n,e[n]);return t},rRe=(t,e)=>{var n={};for(var r in t)TX.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&t1)for(var r of t1(t))e.indexOf(r)<0&&OX.call(t,r)&&(n[r]=t[r]);return n};const iRe={refProp:"ref"},RX=M.forwardRef((t,e)=>{const n=nt("MenuTarget",iRe,t),{children:r,refProp:i}=n,o=rRe(n,["children","refProp"]);if(!Yg(r))throw new Error(mX.children);const s=rv(),a=rl(r.props.onClick,()=>s.trigger==="click"&&s.toggleDropdown()),l=rl(r.props.onMouseEnter,()=>s.trigger==="hover"&&s.openDropdown()),c=rl(r.props.onMouseLeave,()=>s.trigger==="hover"&&s.closeDropdown());return H.createElement(qi.Target,nRe({refProp:i,popupType:"menu",ref:e},o),M.cloneElement(r,{onClick:a,onMouseEnter:l,onMouseLeave:c,"data-expanded":s.opened?!0:void 0}))});RX.displayName="@mantine/core/MenuTarget";var oRe=ft({dropdown:{padding:X(4)}});const sRe=oRe;var aRe=Object.defineProperty,lRe=Object.defineProperties,cRe=Object.getOwnPropertyDescriptors,n1=Object.getOwnPropertySymbols,AX=Object.prototype.hasOwnProperty,DX=Object.prototype.propertyIsEnumerable,b5=(t,e,n)=>e in t?aRe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,M5=(t,e)=>{for(var n in e||(e={}))AX.call(e,n)&&b5(t,n,e[n]);if(n1)for(var n of n1(e))DX.call(e,n)&&b5(t,n,e[n]);return t},E5=(t,e)=>lRe(t,cRe(e)),uRe=(t,e)=>{var n={};for(var r in t)AX.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&n1)for(var r of n1(t))e.indexOf(r)<0&&DX.call(t,r)&&(n[r]=t[r]);return n};const dRe={closeOnItemClick:!0,loop:!0,trigger:"click",openDelay:0,closeDelay:100};function cn(t){const e=nt("Menu",dRe,t),{children:n,onOpen:r,onClose:i,opened:o,defaultOpened:s,onChange:a,closeOnItemClick:l,loop:c,closeOnEscape:u,trigger:d,openDelay:f,closeDelay:h,classNames:g,styles:y,unstyled:_,radius:v,variant:x}=e,w=uRe(e,["children","onOpen","onClose","opened","defaultOpened","onChange","closeOnItemClick","loop","closeOnEscape","trigger","openDelay","closeDelay","classNames","styles","unstyled","radius","variant"]),{classes:S,cx:E}=sRe(),[C,{setHovered:O,resetHovered:R}]=hve(),[T,A]=Ar({value:o,defaultValue:s,finalValue:!1,onChange:a}),F=()=>{A(!1),T&&i?.()},N=()=>{A(!0),!T&&r?.()},U=()=>T?F():N(),{openDropdown:k,closeDropdown:z}=sOe({open:N,close:F,closeDelay:h,openDelay:f}),G=W=>dve("[data-menu-item]","[data-menu-dropdown]",W);return Qr(()=>{R()},[T]),H.createElement(wOe,{value:{opened:T,toggleDropdown:U,getItemIndex:G,hovered:C,setHovered:O,closeOnItemClick:l,closeDropdown:d==="click"?F:z,openDropdown:d==="click"?N:k,closeDropdownImmediately:F,loop:c,trigger:d,radius:v,classNames:g,styles:y,unstyled:_,variant:x}},H.createElement(qi,E5(M5({},w),{radius:v,opened:T,onChange:U,defaultOpened:s,trapFocus:d==="click",closeOnEscape:u&&d==="click",__staticSelector:"Menu",classNames:E5(M5({},g),{dropdown:E(S.dropdown,g?.dropdown)}),styles:y,unstyled:_,variant:x}),n))}cn.displayName="@mantine/core/Menu";cn.Item=XOe;cn.Label=CX;cn.Dropdown=wX;cn.Target=RX;cn.Divider=yX;const[fRe,hRe]=cd("Modal component was not found in tree"),pRe={xs:X(320),sm:X(380),md:X(440),lg:X(620),xl:X(780)};var mRe=ft((t,{yOffset:e,xOffset:n,centered:r,fullScreen:i},{size:o})=>({content:{flex:i?"0 0 100%":`0 0 ${Oe({size:o,sizes:pRe})}`,maxWidth:"100%",maxHeight:i?void 0:`calc(100vh - (${X(e)} * 2))`,height:i?"100vh":void 0,borderRadius:i?0:void 0,overflowY:"auto"},inner:{paddingTop:i?0:e,paddingBottom:i?0:e,paddingLeft:i?0:n,paddingRight:i?0:n,display:"flex",justifyContent:"center",alignItems:r?"center":"flex-start"}}));const gRe=mRe;var vRe=Object.defineProperty,yRe=Object.defineProperties,_Re=Object.getOwnPropertyDescriptors,r1=Object.getOwnPropertySymbols,IX=Object.prototype.hasOwnProperty,LX=Object.prototype.propertyIsEnumerable,P5=(t,e,n)=>e in t?vRe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,AT=(t,e)=>{for(var n in e||(e={}))IX.call(e,n)&&P5(t,n,e[n]);if(r1)for(var n of r1(e))LX.call(e,n)&&P5(t,n,e[n]);return t},kX=(t,e)=>yRe(t,_Re(e)),xRe=(t,e)=>{var n={};for(var r in t)IX.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&r1)for(var r of r1(t))e.indexOf(r)<0&&LX.call(t,r)&&(n[r]=t[r]);return n};const wRe=kX(AT({},kA),{yOffset:"5vh",xOffset:"5vw"});function NX(t){const e=nt("ModalRoot",wRe,t),{classNames:n,variant:r,size:i,yOffset:o,xOffset:s,scrollAreaComponent:a,radius:l,centered:c,fullScreen:u}=e,d=xRe(e,["classNames","variant","size","yOffset","xOffset","scrollAreaComponent","radius","centered","fullScreen"]),{classes:f,cx:h}=gRe({yOffset:o,xOffset:s,centered:c,fullScreen:u},{name:"Modal",variant:r,size:i});return H.createElement(fRe,{value:{yOffset:o,scrollAreaComponent:a,radius:l}},H.createElement(Rr,AT({__staticSelector:"Modal",size:i,variant:r,classNames:kX(AT({},n),{content:h(f.content,n?.content),inner:h(f.inner,n?.inner)})},d)))}var SRe=Object.defineProperty,i1=Object.getOwnPropertySymbols,FX=Object.prototype.hasOwnProperty,zX=Object.prototype.propertyIsEnumerable,C5=(t,e,n)=>e in t?SRe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,bRe=(t,e)=>{for(var n in e||(e={}))FX.call(e,n)&&C5(t,n,e[n]);if(i1)for(var n of i1(e))zX.call(e,n)&&C5(t,n,e[n]);return t},MRe=(t,e)=>{var n={};for(var r in t)FX.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&i1)for(var r of i1(t))e.indexOf(r)<0&&zX.call(t,r)&&(n[r]=t[r]);return n};const ERe={shadow:"xl"},UX=M.forwardRef((t,e)=>{const n=nt("ModalContent",ERe,t),{children:r,scrollAreaComponent:i}=n,o=MRe(n,["children","scrollAreaComponent"]),s=hRe(),a=i||s.scrollAreaComponent||Rr.NativeScrollArea;return H.createElement(Rr.Content,bRe({ref:e,radius:s.radius},o),H.createElement(a,{style:{maxHeight:`calc(100vh - (${X(s.yOffset)} * 2))`}},r))});var PRe=Object.defineProperty,CRe=Object.defineProperties,TRe=Object.getOwnPropertyDescriptors,o1=Object.getOwnPropertySymbols,BX=Object.prototype.hasOwnProperty,HX=Object.prototype.propertyIsEnumerable,T5=(t,e,n)=>e in t?PRe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$_=(t,e)=>{for(var n in e||(e={}))BX.call(e,n)&&T5(t,n,e[n]);if(o1)for(var n of o1(e))HX.call(e,n)&&T5(t,n,e[n]);return t},ORe=(t,e)=>CRe(t,TRe(e)),RRe=(t,e)=>{var n={};for(var r in t)BX.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&o1)for(var r of o1(t))e.indexOf(r)<0&&HX.call(t,r)&&(n[r]=t[r]);return n};const ARe=ORe($_({},kA),{transitionProps:{duration:200,transition:"pop"},withOverlay:!0,withCloseButton:!0});function Ia(t){const e=nt("Modal",ARe,t),{title:n,withOverlay:r,overlayProps:i,withCloseButton:o,closeButtonProps:s,children:a}=e,l=RRe(e,["title","withOverlay","overlayProps","withCloseButton","closeButtonProps","children"]),c=!!n||o;return H.createElement(NX,$_({},l),r&&H.createElement(Rr.Overlay,$_({},i)),H.createElement(UX,null,c&&H.createElement(Rr.Header,null,n&&H.createElement(Rr.Title,null,n),o&&H.createElement(Rr.CloseButton,$_({},s))),H.createElement(Rr.Body,null,a)))}Ia.Root=NX;Ia.CloseButton=Rr.CloseButton;Ia.Overlay=Rr.Overlay;Ia.Content=UX;Ia.Header=Rr.Header;Ia.Title=Rr.Title;Ia.Body=Rr.Body;Ia.NativeScrollArea=Rr.NativeScrollArea;const VX={xs:X(16),sm:X(22),md:X(26),lg:X(30),xl:X(36)},DRe={xs:X(10),sm:X(12),md:X(14),lg:X(16),xl:X(18)};var IRe=ft((t,{disabled:e,radius:n,readOnly:r},{size:i,variant:o})=>({defaultValue:{display:"flex",alignItems:"center",backgroundColor:e?t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[3]:t.colorScheme==="dark"?t.colors.dark[7]:o==="filled"?t.white:t.colors.gray[1],color:e?t.colorScheme==="dark"?t.colors.dark[1]:t.colors.gray[7]:t.colorScheme==="dark"?t.colors.dark[0]:t.colors.gray[7],height:Oe({size:i,sizes:VX}),paddingLeft:`calc(${Oe({size:i,sizes:t.spacing})} / 1.5)`,paddingRight:e||r?Oe({size:i,sizes:t.spacing}):0,fontWeight:500,fontSize:Oe({size:i,sizes:DRe}),borderRadius:Oe({size:n,sizes:t.radius}),cursor:e?"not-allowed":"default",userSelect:"none",maxWidth:`calc(100% - ${X(10)})`},defaultValueRemove:{color:t.colorScheme==="dark"?t.colors.dark[0]:t.colors.gray[7],marginLeft:`calc(${Oe({size:i,sizes:t.spacing})} / 6)`},defaultValueLabel:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}));const LRe=IRe;var kRe=Object.defineProperty,s1=Object.getOwnPropertySymbols,jX=Object.prototype.hasOwnProperty,$X=Object.prototype.propertyIsEnumerable,O5=(t,e,n)=>e in t?kRe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,NRe=(t,e)=>{for(var n in e||(e={}))jX.call(e,n)&&O5(t,n,e[n]);if(s1)for(var n of s1(e))$X.call(e,n)&&O5(t,n,e[n]);return t},FRe=(t,e)=>{var n={};for(var r in t)jX.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&s1)for(var r of s1(t))e.indexOf(r)<0&&$X.call(t,r)&&(n[r]=t[r]);return n};const zRe={xs:16,sm:22,md:24,lg:26,xl:30};function GX(t){var e=t,{label:n,classNames:r,styles:i,className:o,onRemove:s,disabled:a,readOnly:l,size:c,radius:u="sm",variant:d,unstyled:f}=e,h=FRe(e,["label","classNames","styles","className","onRemove","disabled","readOnly","size","radius","variant","unstyled"]);const{classes:g,cx:y}=LRe({disabled:a,readOnly:l,radius:u},{name:"MultiSelect",classNames:r,styles:i,unstyled:f,size:c,variant:d});return H.createElement("div",NRe({className:y(g.defaultValue,o)},h),H.createElement("span",{className:g.defaultValueLabel},n),!a&&!l&&H.createElement(Qg,{"aria-hidden":!0,onMouseDown:s,size:zRe[c],radius:2,color:"blue",variant:"transparent",iconSize:"70%",className:g.defaultValueRemove,tabIndex:-1,unstyled:f}))}GX.displayName="@mantine/core/MultiSelect/DefaultValue";function URe({data:t,searchable:e,limit:n,searchValue:r,filter:i,value:o,disableSelectedItemFiltering:s}){if(!e&&o.length===0)return t;if(!e){const l=[];for(let c=0;cu===t[c].value&&!t[c].disabled))&&l.push(t[c]);return l}const a=[];for(let l=0;lc===t[l].value&&!t[l].disabled),t[l])&&a.push(t[l]),!(a.length>=n));l+=1);return a}var BRe=Object.defineProperty,a1=Object.getOwnPropertySymbols,WX=Object.prototype.hasOwnProperty,YX=Object.prototype.propertyIsEnumerable,R5=(t,e,n)=>e in t?BRe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,A5=(t,e)=>{for(var n in e||(e={}))WX.call(e,n)&&R5(t,n,e[n]);if(a1)for(var n of a1(e))YX.call(e,n)&&R5(t,n,e[n]);return t},HRe=(t,e)=>{var n={};for(var r in t)WX.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&a1)for(var r of a1(t))e.indexOf(r)<0&&YX.call(t,r)&&(n[r]=t[r]);return n};const VRe={xs:X(14),sm:X(18),md:X(20),lg:X(24),xl:X(28)};function jRe(t){var e=t,{size:n,error:r,style:i}=e,o=HRe(e,["size","error","style"]);const s=Ir(),a=Oe({size:n,sizes:VRe});return H.createElement("svg",A5({width:a,height:a,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:A5({color:r?s.colors.red[6]:s.colors.gray[6]},i),"data-chevron":!0},o),H.createElement("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}var $Re=Object.defineProperty,GRe=Object.defineProperties,WRe=Object.getOwnPropertyDescriptors,D5=Object.getOwnPropertySymbols,YRe=Object.prototype.hasOwnProperty,XRe=Object.prototype.propertyIsEnumerable,I5=(t,e,n)=>e in t?$Re(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ZRe=(t,e)=>{for(var n in e||(e={}))YRe.call(e,n)&&I5(t,n,e[n]);if(D5)for(var n of D5(e))XRe.call(e,n)&&I5(t,n,e[n]);return t},qRe=(t,e)=>GRe(t,WRe(e));function XX({shouldClear:t,clearButtonProps:e,onClear:n,size:r,error:i}){return t?H.createElement(Qg,qRe(ZRe({},e),{variant:"transparent",onClick:n,size:r,onMouseDown:o=>o.preventDefault()})):H.createElement(jRe,{error:i,size:r})}XX.displayName="@mantine/core/SelectRightSection";var KRe=Object.defineProperty,QRe=Object.defineProperties,JRe=Object.getOwnPropertyDescriptors,l1=Object.getOwnPropertySymbols,ZX=Object.prototype.hasOwnProperty,qX=Object.prototype.propertyIsEnumerable,L5=(t,e,n)=>e in t?KRe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,HP=(t,e)=>{for(var n in e||(e={}))ZX.call(e,n)&&L5(t,n,e[n]);if(l1)for(var n of l1(e))qX.call(e,n)&&L5(t,n,e[n]);return t},k5=(t,e)=>QRe(t,JRe(e)),eAe=(t,e)=>{var n={};for(var r in t)ZX.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&l1)for(var r of l1(t))e.indexOf(r)<0&&qX.call(t,r)&&(n[r]=t[r]);return n};function KX(t){var e=t,{styles:n,rightSection:r,rightSectionWidth:i,theme:o}=e,s=eAe(e,["styles","rightSection","rightSectionWidth","theme"]);if(r)return{rightSection:r,rightSectionWidth:i,styles:n};const a=typeof n=="function"?n(o):n;return{rightSection:!s.readOnly&&!(s.disabled&&s.shouldClear)&&H.createElement(XX,HP({},s)),styles:k5(HP({},a),{rightSection:k5(HP({},a?.rightSection),{pointerEvents:s.shouldClear?void 0:"none"})})}}var tAe=Object.defineProperty,nAe=Object.defineProperties,rAe=Object.getOwnPropertyDescriptors,N5=Object.getOwnPropertySymbols,iAe=Object.prototype.hasOwnProperty,oAe=Object.prototype.propertyIsEnumerable,F5=(t,e,n)=>e in t?tAe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,sAe=(t,e)=>{for(var n in e||(e={}))iAe.call(e,n)&&F5(t,n,e[n]);if(N5)for(var n of N5(e))oAe.call(e,n)&&F5(t,n,e[n]);return t},aAe=(t,e)=>nAe(t,rAe(e)),lAe=ft((t,{invalid:e},{size:n})=>({wrapper:{position:"relative","&:has(input:disabled)":{cursor:"not-allowed",pointerEvents:"none","& .mantine-MultiSelect-input":{backgroundColor:t.colorScheme==="dark"?t.colors.dark[6]:t.colors.gray[1],color:t.colors.dark[2],opacity:.6,"&::placeholder":{color:t.colors.dark[2]}},"& .mantine-MultiSelect-defaultValue":{backgroundColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[3],color:t.colorScheme==="dark"?t.colors.dark[1]:t.colors.gray[7]}}},values:{minHeight:`calc(${Oe({size:n,sizes:yi})} - ${X(2)})`,display:"flex",alignItems:"center",flexWrap:"wrap",marginLeft:`calc(-${t.spacing.xs} / 2)`,boxSizing:"border-box","&[data-clearable]":{marginRight:Oe({size:n,sizes:yi})}},value:{margin:`calc(${t.spacing.xs} / 2 - ${X(2)}) calc(${t.spacing.xs} / 2)`},searchInput:aAe(sAe({},t.fn.fontStyles()),{flex:1,minWidth:X(60),backgroundColor:"transparent",border:0,outline:0,fontSize:Oe({size:n,sizes:t.fontSizes}),padding:0,marginLeft:`calc(${t.spacing.xs} / 2)`,appearance:"none",color:"inherit",maxHeight:Oe({size:n,sizes:VX}),"&::placeholder":{opacity:1,color:e?t.colors.red[t.fn.primaryShade()]:t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[5]},"&:disabled":{cursor:"not-allowed",pointerEvents:"none"}}),searchInputEmpty:{width:"100%"},searchInputInputHidden:{flex:0,width:0,minWidth:0,margin:0,overflow:"hidden"},searchInputPointer:{cursor:"pointer","&:disabled":{cursor:"not-allowed",pointerEvents:"none"}},input:{cursor:"pointer","&:disabled":{cursor:"not-allowed",pointerEvents:"none"}}}));const cAe=lAe;var uAe=Object.defineProperty,dAe=Object.defineProperties,fAe=Object.getOwnPropertyDescriptors,c1=Object.getOwnPropertySymbols,QX=Object.prototype.hasOwnProperty,JX=Object.prototype.propertyIsEnumerable,z5=(t,e,n)=>e in t?uAe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,uf=(t,e)=>{for(var n in e||(e={}))QX.call(e,n)&&z5(t,n,e[n]);if(c1)for(var n of c1(e))JX.call(e,n)&&z5(t,n,e[n]);return t},U5=(t,e)=>dAe(t,fAe(e)),hAe=(t,e)=>{var n={};for(var r in t)QX.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&c1)for(var r of c1(t))e.indexOf(r)<0&&JX.call(t,r)&&(n[r]=t[r]);return n};function pAe(t,e,n){return e?!1:n.label.toLowerCase().trim().includes(t.toLowerCase().trim())}function mAe(t,e){return!!t&&!e.some(n=>n.value.toLowerCase()===t.toLowerCase())}function B5(t,e){if(!Array.isArray(t))return;if(e.length===0)return[];const n=e.map(r=>typeof r=="object"?r.value:r);return t.filter(r=>n.includes(r))}const gAe={size:"sm",valueComponent:GX,itemComponent:mA,transitionProps:{transition:"fade",duration:0},maxDropdownHeight:220,shadow:"sm",searchable:!1,filter:pAe,limit:1/0,clearSearchOnChange:!0,clearable:!1,clearSearchOnBlur:!1,disabled:!1,initiallyOpened:!1,creatable:!1,shouldCreate:mAe,switchDirectionOnFlip:!1,zIndex:Ys("popover"),selectOnBlur:!1,positionDependencies:[],dropdownPosition:"flip"},eZ=M.forwardRef((t,e)=>{const n=nt("MultiSelect",gAe,t),{className:r,style:i,required:o,label:s,description:a,size:l,error:c,classNames:u,styles:d,wrapperProps:f,value:h,defaultValue:g,data:y,onChange:_,valueComponent:v,itemComponent:x,id:w,transitionProps:S,maxDropdownHeight:E,shadow:C,nothingFound:O,onFocus:R,onBlur:T,searchable:A,placeholder:F,filter:N,limit:U,clearSearchOnChange:k,clearable:z,clearSearchOnBlur:G,variant:W,onSearchChange:B,searchValue:j,disabled:$,initiallyOpened:q,radius:K,icon:re,rightSection:J,rightSectionWidth:le,creatable:ae,getCreateLabel:oe,shouldCreate:De,onCreate:Te,sx:ve,dropdownComponent:we,onDropdownClose:me,onDropdownOpen:se,maxSelectedValues:de,withinPortal:ke,switchDirectionOnFlip:Ve,zIndex:Ze,selectOnBlur:ot,name:dt,dropdownPosition:We,errorProps:ht,labelProps:ee,descriptionProps:Q,form:Pe,positionDependencies:$e,onKeyDown:Ge,unstyled:Ke,inputContainer:gt,inputWrapperOrder:ut,readOnly:Ae,withAsterisk:vt,clearButtonProps:xt,hoverOnSearchChange:ct,disableSelectedItemFiltering:Ie}=n,Ye=hAe(n,["className","style","required","label","description","size","error","classNames","styles","wrapperProps","value","defaultValue","data","onChange","valueComponent","itemComponent","id","transitionProps","maxDropdownHeight","shadow","nothingFound","onFocus","onBlur","searchable","placeholder","filter","limit","clearSearchOnChange","clearable","clearSearchOnBlur","variant","onSearchChange","searchValue","disabled","initiallyOpened","radius","icon","rightSection","rightSectionWidth","creatable","getCreateLabel","shouldCreate","onCreate","sx","dropdownComponent","onDropdownClose","onDropdownOpen","maxSelectedValues","withinPortal","switchDirectionOnFlip","zIndex","selectOnBlur","name","dropdownPosition","errorProps","labelProps","descriptionProps","form","positionDependencies","onKeyDown","unstyled","inputContainer","inputWrapperOrder","readOnly","withAsterisk","clearButtonProps","hoverOnSearchChange","disableSelectedItemFiltering"]),{classes:Tt,cx:Lt,theme:Rt}=cAe({invalid:!!c},{name:"MultiSelect",classNames:u,styles:d,unstyled:Ke,size:l,variant:W}),{systemStyles:he,rest:ue}=Sl(Ye),He=M.useRef(),st=M.useRef({}),wt=zo(w),[Bt,Yt]=M.useState(q),[jn,Nt]=M.useState(-1),[xn,Ft]=M.useState("column"),[kt,fn]=Ar({value:j,defaultValue:"",finalValue:void 0,onChange:B}),[In,Fn]=M.useState(!1),{scrollIntoView:Lr,targetRef:ti,scrollableRef:te}=hW({duration:0,offset:5,cancelable:!1,isList:!0}),pe=ae&&typeof oe=="function";let Ne=null;const ce=y.map(it=>typeof it=="string"?{label:it,value:it}:it),L=CG({data:ce}),[Y,ne]=Ar({value:B5(h,y),defaultValue:B5(g,y),finalValue:[],onChange:_}),fe=M.useRef(!!de&&de{if(!Ae){const St=Y.filter(At=>At!==it);ne(St),de&&St.length{fn(it.currentTarget.value),!$&&!fe.current&&A&&Yt(!0)},Fe=it=>{typeof R=="function"&&R(it),!$&&!fe.current&&A&&Yt(!0)},Ce=URe({data:L,searchable:A,searchValue:kt,limit:U,filter:N,value:Y,disableSelectedItemFiltering:Ie}),je=Math.min(jn,Ce.length-1),qe=(it,St,At)=>{let bt=it;for(;At(bt);)if(bt=St(bt),!Ce[bt].disabled)return bt;return it};Qr(()=>{Nt(ct&&kt?0:-1)},[kt,ct]),Qr(()=>{!$&&Y.length>y.length&&Yt(!1),de&&Y.length=de&&(fe.current=!0,Yt(!1))},[Y]);const Qe=it=>{if(!Ae)if(k&&fn(""),Y.includes(it.value))_e(it.value);else{if(it.creatable&&typeof Te=="function"){const St=Te(it.value);typeof St<"u"&&St!==null&&ne(typeof St=="string"?[...Y,St]:[...Y,St.value])}else ne([...Y,it.value]);Y.length===de-1&&(fe.current=!0,Yt(!1)),Ce.length===1&&Yt(!1)}},et=it=>{typeof T=="function"&&T(it),ot&&Ce[je]&&Bt&&Qe(Ce[je]),G&&fn(""),Yt(!1)},jt=it=>{if(In||(Ge?.(it),Ae)||it.key!=="Backspace"&&de&&fe.current)return;const St=xn==="column",At=()=>{Nt(Gt=>{var rn;const It=qe(Gt,pn=>pn+1,pn=>pn{Nt(Gt=>{var rn;const It=qe(Gt,pn=>pn-1,pn=>pn>0);return Bt&&(ti.current=st.current[(rn=Ce[It])==null?void 0:rn.value],Lr({alignment:St?"start":"end"})),It})};switch(it.key){case"ArrowUp":{it.preventDefault(),Yt(!0),St?bt():At();break}case"ArrowDown":{it.preventDefault(),Yt(!0),St?At():bt();break}case"Enter":{it.preventDefault(),Ce[je]&&Bt?Qe(Ce[je]):Yt(!0);break}case" ":{A||(it.preventDefault(),Ce[je]&&Bt?Qe(Ce[je]):Yt(!0));break}case"Backspace":{Y.length>0&&kt.length===0&&(ne(Y.slice(0,-1)),Yt(!0),de&&(fe.current=!1));break}case"Home":{if(!A){it.preventDefault(),Bt||Yt(!0);const Gt=Ce.findIndex(rn=>!rn.disabled);Nt(Gt),Lr({alignment:St?"end":"start"})}break}case"End":{if(!A){it.preventDefault(),Bt||Yt(!0);const Gt=Ce.map(rn=>!!rn.disabled).lastIndexOf(!1);Nt(Gt),Lr({alignment:St?"end":"start"})}break}case"Escape":Yt(!1)}},Je=Y.map(it=>{let St=L.find(At=>At.value===it&&!At.disabled);return!St&&pe&&(St={value:it,label:it}),St}).filter(it=>!!it).map((it,St)=>H.createElement(v,U5(uf({},it),{variant:W,disabled:$,className:Tt.value,readOnly:Ae,onRemove:At=>{At.preventDefault(),At.stopPropagation(),_e(it.value)},key:it.value,size:l,styles:d,classNames:u,radius:K,index:St}))),Ot=it=>Y.includes(it),Pt=()=>{var it;fn(""),ne([]),(it=He.current)==null||it.focus(),de&&(fe.current=!1)};pe&&De(kt,L)&&(Ne=oe(kt),Ce.push({label:kt,value:kt,creatable:!0}));const Ht=!Ae&&(Ce.length>0?Bt:Bt&&!!O);return Qr(()=>{const it=Ht?se:me;typeof it=="function"&&it()},[Ht]),H.createElement(Ki.Wrapper,uf(uf({required:o,id:wt,label:s,error:c,description:a,size:l,className:r,style:i,classNames:u,styles:d,__staticSelector:"MultiSelect",sx:ve,errorProps:ht,descriptionProps:Q,labelProps:ee,inputContainer:gt,inputWrapperOrder:ut,unstyled:Ke,withAsterisk:vt,variant:W},he),f),H.createElement(gc,{opened:Ht,transitionProps:S,shadow:"sm",withinPortal:ke,__staticSelector:"MultiSelect",onDirectionChange:Ft,switchDirectionOnFlip:Ve,zIndex:Ze,dropdownPosition:We,positionDependencies:[...$e,kt],classNames:u,styles:d,unstyled:Ke,variant:W},H.createElement(gc.Target,null,H.createElement("div",{className:Tt.wrapper,role:"combobox","aria-haspopup":"listbox","aria-owns":Bt&&Ht?`${wt}-items`:null,"aria-controls":wt,"aria-expanded":Bt,onMouseLeave:()=>Nt(-1),tabIndex:-1},H.createElement("input",{type:"hidden",name:dt,value:Y.join(","),form:Pe,disabled:$}),H.createElement(Ki,uf({__staticSelector:"MultiSelect",style:{overflow:"hidden"},component:"div",multiline:!0,size:l,variant:W,disabled:$,error:c,required:o,radius:K,icon:re,unstyled:Ke,onMouseDown:it=>{var St;it.preventDefault(),!$&&!fe.current&&Yt(!Bt),(St=He.current)==null||St.focus()},classNames:U5(uf({},u),{input:Lt({[Tt.input]:!A},u?.input)})},KX({theme:Rt,rightSection:J,rightSectionWidth:le,styles:d,size:l,shouldClear:z&&Y.length>0,onClear:Pt,error:c,disabled:$,clearButtonProps:xt,readOnly:Ae})),H.createElement("div",{className:Tt.values,"data-clearable":z||void 0},Je,H.createElement("input",uf({ref:Da(e,He),type:"search",id:wt,className:Lt(Tt.searchInput,{[Tt.searchInputPointer]:!A,[Tt.searchInputInputHidden]:!Bt&&Y.length>0||!A&&Y.length>0,[Tt.searchInputEmpty]:Y.length===0}),onKeyDown:jt,value:kt,onChange:Se,onFocus:Fe,onBlur:et,readOnly:!A||fe.current||Ae,placeholder:Y.length===0?F:void 0,disabled:$,"data-mantine-stop-propagation":Bt,autoComplete:"off",onCompositionStart:()=>Fn(!0),onCompositionEnd:()=>Fn(!1)},ue)))))),H.createElement(gc.Dropdown,{component:we||ub,maxHeight:E,direction:xn,id:wt,innerRef:te,__staticSelector:"MultiSelect",classNames:u,styles:d},H.createElement(pA,{data:Ce,hovered:je,classNames:u,styles:d,uuid:wt,__staticSelector:"MultiSelect",onItemHover:Nt,onItemSelect:Qe,itemsRefs:st,itemComponent:x,size:l,nothingFound:O,isItemSelected:Ot,creatable:ae&&!!Ne,createLabel:Ne,unstyled:Ke,variant:W}))))});eZ.displayName="@mantine/core/MultiSelect";const vAe=(t,e,n)=>Number.isInteger(t)&&t>=0&&e===0?"numeric":!Number.isInteger(t)&&t>=0&&e!==0?"decimal":Number.isInteger(t)&&t<0&&e===0||!Number.isInteger(t)&&t<0&&e!==0?n==="ios"?"text":"decimal":"numeric";function H5({direction:t,size:e}){return H.createElement("svg",{style:{transform:t==="up"?"rotate(180deg)":void 0},width:X(e),height:X(e),viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},H.createElement("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}const tZ={xs:X(20),sm:X(24),md:X(30),lg:X(34),xl:X(36)};var yAe=ft((t,{radius:e},{size:n})=>({rightSection:{display:"flex",flexDirection:"column",height:`calc(100% - ${X(2)})`,margin:X(1),overflow:"hidden",borderTopRightRadius:t.fn.radius(e),borderBottomRightRadius:t.fn.radius(e)},control:{margin:0,position:"relative",flex:"0 0 50%",display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",width:Oe({size:n,sizes:tZ}),padding:0,WebkitTapHighlightColor:"transparent",borderBottom:`${X(1)} solid ${t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[4]}`,borderLeft:`${X(1)} solid ${t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[4]}`,borderTop:0,borderRight:0,backgroundColor:"transparent",marginRight:X(1),color:t.colorScheme==="dark"?t.colors.dark[0]:t.black,"&:not(:disabled):hover":{backgroundColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[0]},"&:disabled":{color:t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[4]}},controlUp:{},controlDown:{borderBottom:0}}));const _Ae=yAe;var xAe=Object.defineProperty,wAe=Object.defineProperties,SAe=Object.getOwnPropertyDescriptors,u1=Object.getOwnPropertySymbols,nZ=Object.prototype.hasOwnProperty,rZ=Object.prototype.propertyIsEnumerable,V5=(t,e,n)=>e in t?xAe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,VP=(t,e)=>{for(var n in e||(e={}))nZ.call(e,n)&&V5(t,n,e[n]);if(u1)for(var n of u1(e))rZ.call(e,n)&&V5(t,n,e[n]);return t},bAe=(t,e)=>wAe(t,SAe(e)),MAe=(t,e)=>{var n={};for(var r in t)nZ.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&u1)for(var r of u1(t))e.indexOf(r)<0&&rZ.call(t,r)&&(n[r]=t[r]);return n};const EAe={type:"text",size:"sm",__staticSelector:"TextInput"},Pc=M.forwardRef((t,e)=>{const n=hb("TextInput",EAe,t),{inputProps:r,wrapperProps:i}=n,o=MAe(n,["inputProps","wrapperProps"]);return H.createElement(Ki.Wrapper,VP({},i),H.createElement(Ki,bAe(VP(VP({},r),o),{ref:e})))});Pc.displayName="@mantine/core/TextInput";var PAe=Object.defineProperty,CAe=Object.defineProperties,TAe=Object.getOwnPropertyDescriptors,d1=Object.getOwnPropertySymbols,iZ=Object.prototype.hasOwnProperty,oZ=Object.prototype.propertyIsEnumerable,j5=(t,e,n)=>e in t?PAe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,OAe=(t,e)=>{for(var n in e||(e={}))iZ.call(e,n)&&j5(t,n,e[n]);if(d1)for(var n of d1(e))oZ.call(e,n)&&j5(t,n,e[n]);return t},RAe=(t,e)=>CAe(t,TAe(e)),AAe=(t,e)=>{var n={};for(var r in t)iZ.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&d1)for(var r of d1(t))e.indexOf(r)<0&&oZ.call(t,r)&&(n[r]=t[r]);return n};const DAe=t=>t||"",IAe=t=>{if(t==="-")return t;let e=t;e[0]==="."&&(e=`0${t}`);const n=parseFloat(e);return Number.isNaN(n)?"":t},$5={xs:X(10),sm:X(14),md:X(16),lg:X(18),xl:X(20)},LAe={step:1,hideControls:!1,size:"sm",precision:0,noClampOnBlur:!1,removeTrailingZeros:!1,decimalSeparator:".",formatter:DAe,parser:IAe,type:"text"},f1=M.forwardRef((t,e)=>{const n=nt("NumberInput",LAe,t),{readOnly:r,disabled:i,value:o,onChange:s,decimalSeparator:a,thousandsSeparator:l,min:c,max:u,startValue:d,step:f,stepHoldInterval:h,stepHoldDelay:g,onFocus:y,onBlur:_,onKeyDown:v,onKeyUp:x,hideControls:w,radius:S,variant:E,precision:C,removeTrailingZeros:O,defaultValue:R,noClampOnBlur:T,handlersRef:A,classNames:F,styles:N,size:U,rightSection:k,rightSectionWidth:z,formatter:G,parser:W,inputMode:B,unstyled:j,type:$}=n,q=AAe(n,["readOnly","disabled","value","onChange","decimalSeparator","thousandsSeparator","min","max","startValue","step","stepHoldInterval","stepHoldDelay","onFocus","onBlur","onKeyDown","onKeyUp","hideControls","radius","variant","precision","removeTrailingZeros","defaultValue","noClampOnBlur","handlersRef","classNames","styles","size","rightSection","rightSectionWidth","formatter","parser","inputMode","unstyled","type"]),{classes:K,cx:re}=_Ae({radius:S},{classNames:F,styles:N,unstyled:j,name:"NumberInput",variant:E,size:U}),J=Ie=>{if(Ie==="")return"";let Ye=Ie.toFixed(C);return O&&C>0&&(Ye=Ye.replace(new RegExp(`[0]{0,${C}}$`),""),Ye.endsWith(".")&&(Ye=Ye.slice(0,-1))),Ye},le=Ie=>{let Ye=Ie;return a&&(Ye=Ye.replace(".",a)),G(Ye)},ae=Ie=>{let Ye=Ie;return a&&(Ye=Ye.replaceAll(l,"").replace(a,".")),W(Ye)},oe=Ie=>le(J(Ie)),[De,Te]=M.useState(typeof o=="number"?o:typeof R=="number"?R:""),[ve,we]=M.useState(()=>oe(De)),me=M.useRef(),[se,de]=M.useState(!1),ke=(Ie,Ye)=>{if(!se||Ye){const Tt=oe(Ie);Tt!==ve&&we(Tt)}Ie!==De&&Te(Ie)},Ve=typeof c=="number"?c:-1/0,Ze=typeof u=="number"?u:1/0,ot=M.useRef();ot.current=()=>{var Ie;let Ye;De===""?Ye=(Ie=d??c)!=null?Ie:0:Ye=parseFloat(J(Ns(De+f,Ve,Ze))),ke(Ye,!0),s?.(Ye)};const dt=M.useRef();dt.current=()=>{var Ie;let Ye;De===""?Ye=(Ie=d??c)!=null?Ie:0:Ye=parseFloat(J(Ns(De-f,Ve,Ze))),ke(Ye,!0),s?.(Ye)},uW(A,{increment:ot.current,decrement:dt.current}),M.useEffect(()=>{se||ke(o===void 0?De:o,!0)},[o,se]);const We=g!==void 0&&h!==void 0,ht=M.useRef(null),ee=M.useRef(0),Q=()=>{ht.current&&window.clearTimeout(ht.current),ht.current=null,ee.current=0},Pe=Ie=>{Ie?ot.current():dt.current(),ee.current+=1},$e=Ie=>{if(Pe(Ie),We){const Ye=typeof h=="number"?h:h(ee.current);ht.current=window.setTimeout(()=>$e(Ie),Ye)}},Ge=(Ie,Ye)=>{Ie.preventDefault(),me.current.focus(),Pe(Ye),We&&(ht.current=window.setTimeout(()=>$e(Ye),g))};M.useEffect(()=>(Q(),Q),[]);const Ke=H.createElement("div",{className:K.rightSection},H.createElement("button",{type:"button",tabIndex:-1,"aria-hidden":!0,disabled:De>=u,className:re(K.control,K.controlUp),onPointerDown:Ie=>{Ge(Ie,!0)},onPointerUp:Q,onPointerLeave:Q},H.createElement(H5,{size:Oe({size:U,sizes:$5}),direction:"up"})),H.createElement("button",{type:"button",tabIndex:-1,"aria-hidden":!0,disabled:De<=c,className:re(K.control,K.controlDown),onPointerDown:Ie=>{Ge(Ie,!1)},onPointerUp:Q,onPointerLeave:Q},H.createElement(H5,{size:Oe({size:U,sizes:$5}),direction:"down"}))),gt=Ie=>{let Ye=Ie;(Ye[0]===`${a}`||Ye[0]===".")&&(Ye=`0${Ye}`);const Tt=parseFloat(J(parseFloat(ae(Ye)))),Lt=T?Tt:Ns(Tt,Ve,Ze),Rt=Number.isNaN(Lt)?"":Lt,he=De!==Rt;we(Ie),ke(Rt),he&&s?.(Rt)},ut=Ie=>{Ie.nativeEvent.isComposing||gt(Ie.target.value)},Ae=Ie=>{de(!0),y?.(Ie)},vt=Ie=>{de(!1),_?.(Ie)},xt=Ie=>{if(typeof v=="function"&&v(Ie),Ie.repeat&&We&&(Ie.key==="ArrowUp"||Ie.key==="ArrowDown")){Ie.preventDefault();return}r||(Ie.key==="ArrowUp"?Ge(Ie,!0):Ie.key==="ArrowDown"&&Ge(Ie,!1))},ct=Ie=>{typeof x=="function"&&x(Ie),(Ie.key==="ArrowUp"||Ie.key==="ArrowDown")&&Q()};return H.createElement(Pc,RAe(OAe({},q),{type:$,variant:E,value:ve,disabled:i,readOnly:r,ref:Da(me,e),onChange:ut,onFocus:Ae,onBlur:vt,onKeyDown:xt,onKeyUp:ct,rightSection:k||(i||r||w||E==="unstyled"?null:Ke),rightSectionWidth:z??`calc(${Oe({size:U,sizes:tZ})} + ${X(1)})`,radius:S,max:u,min:c,step:f,size:U,styles:N,classNames:F,inputMode:B||vAe(f,C,jye()),__staticSelector:"NumberInput",unstyled:j}))});f1.displayName="@mantine/core/NumberInput";const G5={xs:X(3),sm:X(5),md:X(8),lg:X(12),xl:X(16)},kAe=cA({from:{backgroundPosition:"0 0"},to:{backgroundPosition:`${X(40)} 0`}});var NAe=ft((t,{color:e,radius:n},{size:r})=>({root:{position:"relative",height:Oe({size:r,sizes:G5}),backgroundColor:t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[2],borderRadius:t.fn.radius(n),overflow:"hidden"},bar:{position:"absolute",top:0,bottom:0,left:0,height:"100%",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:t.fn.variant({variant:"filled",primaryFallback:!1,color:e||t.primaryColor}).background,transition:"width 100ms linear","&[data-animate]":{animation:`${kAe} 1000ms linear infinite`},"&[data-striped]":{backgroundSize:`${X(20)} ${X(20)}`,backgroundImage:"linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent)"},"&:last-of-type":{borderTopRightRadius:t.fn.radius(n),borderBottomRightRadius:t.fn.radius(n)},"&:first-of-type":{borderTopLeftRadius:t.fn.radius(n),borderBottomLeftRadius:t.fn.radius(n)},"@media (prefers-reduced-motion)":{transitionDuration:t.respectReducedMotion?"0ms":void 0}},label:{color:t.white,fontSize:`calc(${Oe({size:r,sizes:G5})} * 0.65)`,fontWeight:700,userSelect:"none",overflow:"hidden",whiteSpace:"nowrap"}}));const FAe=NAe,sZ=M.createContext(!1),zAe=sZ.Provider,UAe=()=>M.useContext(sZ);function aZ({children:t,openDelay:e=0,closeDelay:n=0}){return H.createElement(zAe,{value:!0},H.createElement(gbe,{delay:{open:e,close:n}},t))}aZ.displayName="@mantine/core/TooltipGroup";var BAe=Object.defineProperty,HAe=Object.defineProperties,VAe=Object.getOwnPropertyDescriptors,W5=Object.getOwnPropertySymbols,jAe=Object.prototype.hasOwnProperty,$Ae=Object.prototype.propertyIsEnumerable,Y5=(t,e,n)=>e in t?BAe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,X5=(t,e)=>{for(var n in e||(e={}))jAe.call(e,n)&&Y5(t,n,e[n]);if(W5)for(var n of W5(e))$Ae.call(e,n)&&Y5(t,n,e[n]);return t},GAe=(t,e)=>HAe(t,VAe(e));function WAe(t,e){if(!e)return{backgroundColor:t.colorScheme==="dark"?t.colors.gray[2]:t.colors.gray[9],color:t.colorScheme==="dark"?t.black:t.white};const n=t.fn.variant({variant:"filled",color:e,primaryFallback:!1});return{backgroundColor:n.background,color:n.color}}var YAe=ft((t,{color:e,radius:n,width:r,multiline:i})=>({tooltip:GAe(X5(X5({},t.fn.fontStyles()),WAe(t,e)),{lineHeight:t.lineHeight,fontSize:t.fontSizes.sm,borderRadius:t.fn.radius(n),padding:`calc(${t.spacing.xs} / 2) ${t.spacing.xs}`,position:"absolute",whiteSpace:i?"unset":"nowrap",pointerEvents:"none",width:r}),arrow:{backgroundColor:"inherit",border:0,zIndex:1}}));const lZ=YAe,cZ={children:"Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported"};function XAe({offset:t,position:e}){const[n,r]=M.useState(!1),i=M.useRef(),{x:o,y:s,reference:a,floating:l,refs:c,update:u,placement:d}=EA({placement:e,middleware:[xA({crossAxis:!0,padding:5,rootBoundary:"document"})]}),f=d.includes("right")?t:e.includes("left")?t*-1:0,h=d.includes("bottom")?t:e.includes("top")?t*-1:0,g=M.useCallback(({clientX:y,clientY:_})=>{a({getBoundingClientRect(){return{width:0,height:0,x:y,y:_,left:y+f,top:_+h,right:y,bottom:_}}})},[a]);return M.useEffect(()=>{if(c.floating.current){const y=i.current;y.addEventListener("mousemove",g);const _=mc(c.floating.current);return _.forEach(v=>{v.addEventListener("scroll",u)}),()=>{y.removeEventListener("mousemove",g),_.forEach(v=>{v.removeEventListener("scroll",u)})}}},[a,c.floating.current,u,g,n]),{handleMouseMove:g,x:o,y:s,opened:n,setOpened:r,boundaryRef:i,floating:l}}var ZAe=Object.defineProperty,qAe=Object.defineProperties,KAe=Object.getOwnPropertyDescriptors,h1=Object.getOwnPropertySymbols,uZ=Object.prototype.hasOwnProperty,dZ=Object.prototype.propertyIsEnumerable,Z5=(t,e,n)=>e in t?ZAe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Xy=(t,e)=>{for(var n in e||(e={}))uZ.call(e,n)&&Z5(t,n,e[n]);if(h1)for(var n of h1(e))dZ.call(e,n)&&Z5(t,n,e[n]);return t},Zy=(t,e)=>qAe(t,KAe(e)),QAe=(t,e)=>{var n={};for(var r in t)uZ.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&h1)for(var r of h1(t))e.indexOf(r)<0&&dZ.call(t,r)&&(n[r]=t[r]);return n};const JAe={refProp:"ref",withinPortal:!0,offset:10,position:"right",zIndex:Ys("popover")};function fZ(t){var e;const n=nt("TooltipFloating",JAe,t),{children:r,refProp:i,withinPortal:o,portalProps:s,style:a,className:l,classNames:c,styles:u,unstyled:d,radius:f,color:h,label:g,offset:y,position:_,multiline:v,width:x,zIndex:w,disabled:S,variant:E}=n,C=QAe(n,["children","refProp","withinPortal","portalProps","style","className","classNames","styles","unstyled","radius","color","label","offset","position","multiline","width","zIndex","disabled","variant"]),{handleMouseMove:O,x:R,y:T,opened:A,boundaryRef:F,floating:N,setOpened:U}=XAe({offset:y,position:_}),{classes:k,cx:z}=lZ({radius:f,color:h,multiline:v,width:x},{name:"TooltipFloating",classNames:c,styles:u,unstyled:d,variant:E});if(!Yg(r))throw new Error(cZ.children);const G=Da(F,r.ref),W=j=>{var $,q;(q=($=r.props).onMouseEnter)==null||q.call($,j),O(j),U(!0)},B=j=>{var $,q;(q=($=r.props).onMouseLeave)==null||q.call($,j),U(!1)};return H.createElement(H.Fragment,null,H.createElement(Kg,Zy(Xy({},s),{withinPortal:o}),H.createElement(Xe,Zy(Xy({},C),{ref:N,className:z(k.tooltip,l),style:Zy(Xy({},a),{zIndex:w,display:!S&&A?"block":"none",top:T??"",left:(e=Math.round(R))!=null?e:""})}),g)),M.cloneElement(r,Zy(Xy({},r.props),{[i]:G,onMouseEnter:W,onMouseLeave:B})))}fZ.displayName="@mantine/core/TooltipFloating";function eDe(t){const[e,n]=M.useState(!1),i=typeof t.opened=="boolean"?t.opened:e,o=UAe(),s=zo(),{delay:a,currentId:l,setCurrentId:c}=a9(),u=M.useCallback(R=>{n(R),R&&c(s)},[c,s]),{x:d,y:f,reference:h,floating:g,context:y,refs:_,update:v,placement:x,middlewareData:{arrow:{x:w,y:S}={}}}=EA({placement:t.position,open:i,onOpenChange:u,middleware:[X7(t.offset),xA({padding:8}),W7(),n9({element:t.arrowRef,padding:t.arrowOffset}),...t.inline?[Y7()]:[]]}),{getReferenceProps:E,getFloatingProps:C}=Tbe([mbe(y,{enabled:t.events.hover,delay:o?a:{open:t.openDelay,close:t.closeDelay},mouseOnly:!t.events.touch}),Pbe(y,{enabled:t.events.focus,keyboardOnly:!0}),Cbe(y,{role:"tooltip"}),Ebe(y,{enabled:typeof t.opened===void 0}),vbe(y,{id:s})]);return c9({opened:i,position:t.position,positionDependencies:t.positionDependencies,floating:{refs:_,update:v}}),Qr(()=>{var R;(R=t.onPositionChange)==null||R.call(t,x)},[x]),{x:d,y:f,arrowX:w,arrowY:S,reference:h,floating:g,getFloatingProps:C,getReferenceProps:E,isGroupPhase:i&&l&&l!==s,opened:i,placement:x}}var tDe=Object.defineProperty,nDe=Object.defineProperties,rDe=Object.getOwnPropertyDescriptors,p1=Object.getOwnPropertySymbols,hZ=Object.prototype.hasOwnProperty,pZ=Object.prototype.propertyIsEnumerable,q5=(t,e,n)=>e in t?tDe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,lu=(t,e)=>{for(var n in e||(e={}))hZ.call(e,n)&&q5(t,n,e[n]);if(p1)for(var n of p1(e))pZ.call(e,n)&&q5(t,n,e[n]);return t},jP=(t,e)=>nDe(t,rDe(e)),iDe=(t,e)=>{var n={};for(var r in t)hZ.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&p1)for(var r of p1(t))e.indexOf(r)<0&&pZ.call(t,r)&&(n[r]=t[r]);return n};const oDe={position:"top",refProp:"ref",withinPortal:!1,inline:!1,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:"side",offset:5,transitionProps:{duration:100,transition:"fade"},width:"auto",events:{hover:!0,focus:!1,touch:!1},zIndex:Ys("popover"),positionDependencies:[]},gb=M.forwardRef((t,e)=>{var n;const r=M.useRef(null),i=nt("Tooltip",oDe,t),{children:o,position:s,refProp:a,label:l,openDelay:c,closeDelay:u,onPositionChange:d,opened:f,withinPortal:h,portalProps:g,radius:y,color:_,classNames:v,styles:x,unstyled:w,style:S,className:E,withArrow:C,arrowSize:O,arrowOffset:R,arrowRadius:T,arrowPosition:A,offset:F,transitionProps:N,multiline:U,width:k,events:z,zIndex:G,disabled:W,positionDependencies:B,onClick:j,onMouseEnter:$,onMouseLeave:q,inline:K,variant:re,keepMounted:J}=i,le=iDe(i,["children","position","refProp","label","openDelay","closeDelay","onPositionChange","opened","withinPortal","portalProps","radius","color","classNames","styles","unstyled","style","className","withArrow","arrowSize","arrowOffset","arrowRadius","arrowPosition","offset","transitionProps","multiline","width","events","zIndex","disabled","positionDependencies","onClick","onMouseEnter","onMouseLeave","inline","variant","keepMounted"]),{classes:ae,cx:oe,theme:De}=lZ({radius:y,color:_,width:k,multiline:U},{name:"Tooltip",classNames:v,styles:x,unstyled:w,variant:re}),Te=eDe({position:x9(De.dir,s),closeDelay:u,openDelay:c,onPositionChange:d,opened:f,events:z,arrowRef:r,arrowOffset:R,offset:F+(C?O/2:0),positionDependencies:[...B,o],inline:K});if(!Yg(o))throw new Error(cZ.children);const ve=Da(Te.reference,o.ref,e);return H.createElement(H.Fragment,null,H.createElement(Kg,jP(lu({},g),{withinPortal:h}),H.createElement(zc,jP(lu({keepMounted:J,mounted:!W&&Te.opened},N),{transition:N.transition||"fade",duration:Te.isGroupPhase?10:(n=N.duration)!=null?n:100}),we=>{var me,se;return H.createElement(Xe,lu(lu({},le),Te.getFloatingProps({ref:Te.floating,className:ae.tooltip,style:jP(lu(lu({},S),we),{zIndex:G,top:(me=Te.y)!=null?me:0,left:(se=Te.x)!=null?se:0})})),l,H.createElement(CA,{ref:r,arrowX:Te.arrowX,arrowY:Te.arrowY,visible:C,position:Te.placement,arrowSize:O,arrowOffset:R,arrowRadius:T,arrowPosition:A,className:ae.arrow}))})),M.cloneElement(o,Te.getReferenceProps(lu({onClick:j,onMouseEnter:$,onMouseLeave:q,onMouseMove:t.onMouseMove,onPointerDown:t.onPointerDown,onPointerEnter:t.onPointerEnter,[a]:ve,className:oe(E,o.props.className)},o.props))))});gb.Group=aZ;gb.Floating=fZ;gb.displayName="@mantine/core/Tooltip";const tr=gb;var sDe=Object.defineProperty,aDe=Object.defineProperties,lDe=Object.getOwnPropertyDescriptors,m1=Object.getOwnPropertySymbols,mZ=Object.prototype.hasOwnProperty,gZ=Object.prototype.propertyIsEnumerable,K5=(t,e,n)=>e in t?sDe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,DT=(t,e)=>{for(var n in e||(e={}))mZ.call(e,n)&&K5(t,n,e[n]);if(m1)for(var n of m1(e))gZ.call(e,n)&&K5(t,n,e[n]);return t},vZ=(t,e)=>aDe(t,lDe(e)),Q5=(t,e)=>{var n={};for(var r in t)mZ.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&m1)for(var r of m1(t))e.indexOf(r)<0&&gZ.call(t,r)&&(n[r]=t[r]);return n};function cDe(t){return t.reduce((e,n)=>(e.sections.push(vZ(DT({},n),{accumulated:e.accumulated})),e.accumulated+=n.value,e),{accumulated:0,sections:[]}).sections}const uDe={size:"md",radius:"sm",striped:!1,animate:!1,label:""},yZ=M.forwardRef((t,e)=>{const n=nt("Progress",uDe,t),{className:r,value:i,color:o,size:s,radius:a,striped:l,animate:c,label:u,"aria-label":d,classNames:f,styles:h,sections:g,unstyled:y,variant:_}=n,v=Q5(n,["className","value","color","size","radius","striped","animate","label","aria-label","classNames","styles","sections","unstyled","variant"]),{classes:x,cx:w,theme:S}=FAe({color:o,radius:a},{name:"Progress",classNames:f,styles:h,unstyled:y,variant:_,size:s}),E=Array.isArray(g)?cDe(g).map((C,O)=>{var R=C,{tooltip:T,accumulated:A,value:F,label:N,color:U}=R,k=Q5(R,["tooltip","accumulated","value","label","color"]);return H.createElement(tr.Floating,{label:T,disabled:!T,key:O},H.createElement(Xe,vZ(DT({},k),{className:w(x.bar,k.className),"data-striped":l||c||void 0,"data-animate":c||void 0,sx:{width:`${F}%`,left:`${A}%`,backgroundColor:S.fn.variant({variant:"filled",primaryFallback:!1,color:U||S.primaryColor}).background}}),N&&H.createElement(Si,{className:x.label},N)))}):null;return H.createElement(Xe,DT({className:w(x.root,r),ref:e},v),E||H.createElement("div",{role:"progressbar","aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":i,"aria-label":d,className:x.bar,style:{width:`${i}%`},"data-striped":l||c||void 0,"data-animate":c||void 0},u?H.createElement(Si,{className:x.label},u):""))});yZ.displayName="@mantine/core/Progress";var dDe=Object.defineProperty,J5=Object.getOwnPropertySymbols,fDe=Object.prototype.hasOwnProperty,hDe=Object.prototype.propertyIsEnumerable,eB=(t,e,n)=>e in t?dDe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,pDe=(t,e)=>{for(var n in e||(e={}))fDe.call(e,n)&&eB(t,n,e[n]);if(J5)for(var n of J5(e))hDe.call(e,n)&&eB(t,n,e[n]);return t};function mDe(t){return H.createElement("svg",pDe({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 5 5"},t),H.createElement("path",{fill:"currentColor",d:"M0 2.5a2.5 2.5 0 115 0 2.5 2.5 0 01-5 0z"}))}const _Z=M.createContext(null),gDe=_Z.Provider,vDe=()=>M.useContext(_Z);var yDe=Object.defineProperty,g1=Object.getOwnPropertySymbols,xZ=Object.prototype.hasOwnProperty,wZ=Object.prototype.propertyIsEnumerable,tB=(t,e,n)=>e in t?yDe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,nB=(t,e)=>{for(var n in e||(e={}))xZ.call(e,n)&&tB(t,n,e[n]);if(g1)for(var n of g1(e))wZ.call(e,n)&&tB(t,n,e[n]);return t},_De=(t,e)=>{var n={};for(var r in t)xZ.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&g1)for(var r of g1(t))e.indexOf(r)<0&&wZ.call(t,r)&&(n[r]=t[r]);return n};const xDe={size:"sm"},SZ=M.forwardRef((t,e)=>{const n=nt("RadioGroup",xDe,t),{children:r,value:i,defaultValue:o,onChange:s,size:a,wrapperProps:l,unstyled:c,name:u}=n,d=_De(n,["children","value","defaultValue","onChange","size","wrapperProps","unstyled","name"]),f=zo(u),[h,g]=Ar({value:i,defaultValue:o,finalValue:"",onChange:s}),y=_=>g(_.currentTarget.value);return H.createElement(gDe,{value:{value:h,onChange:y,size:a,name:f}},H.createElement(Ki.Wrapper,nB(nB({labelElement:"div",size:a,__staticSelector:"RadioGroup",ref:e,unstyled:c},l),d),r))});SZ.displayName="@mantine/core/RadioGroup";var wDe=Object.defineProperty,SDe=Object.defineProperties,bDe=Object.getOwnPropertyDescriptors,rB=Object.getOwnPropertySymbols,MDe=Object.prototype.hasOwnProperty,EDe=Object.prototype.propertyIsEnumerable,iB=(t,e,n)=>e in t?wDe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,PDe=(t,e)=>{for(var n in e||(e={}))MDe.call(e,n)&&iB(t,n,e[n]);if(rB)for(var n of rB(e))EDe.call(e,n)&&iB(t,n,e[n]);return t},CDe=(t,e)=>SDe(t,bDe(e));const $P={xs:X(16),sm:X(20),md:X(24),lg:X(30),xl:X(36)},qy={xs:X(6),sm:X(8),md:X(10),lg:X(14),xl:X(16)};var TDe=ft((t,{color:e,transitionDuration:n,labelPosition:r,error:i},{size:o})=>{const s=t.fn.variant({variant:"filled",color:e}),a=t.fn.variant({variant:"filled",color:"red"}).background;return{inner:{order:r==="left"?2:1,position:"relative",alignSelf:"flex-start"},icon:{ref:Ur("icon"),color:t.white,opacity:0,transform:`scale(0.75) translateY(${X(2)})`,transition:`opacity ${n}ms ${t.transitionTimingFunction}`,pointerEvents:"none",width:Oe({sizes:qy,size:o}),height:Oe({sizes:qy,size:o}),position:"absolute",top:`calc(50% - ${Oe({sizes:qy,size:o})} / 2)`,left:`calc(50% - ${Oe({sizes:qy,size:o})} / 2)`},radio:CDe(PDe({},t.fn.focusStyles()),{backgroundColor:t.colorScheme==="dark"?t.colors.dark[6]:t.white,border:`${X(1)} solid ${i?a:t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[4]}`,position:"relative",appearance:"none",width:Oe({sizes:$P,size:o}),height:Oe({sizes:$P,size:o}),borderRadius:Oe({sizes:$P,size:o}),margin:0,display:"flex",alignItems:"center",justifyContent:"center",transitionProperty:"background-color, border-color",transitionTimingFunction:t.transitionTimingFunction,transitionDuration:`${n}ms`,cursor:t.cursorType,"&:checked":{background:s.background,borderColor:s.background,[`& + .${Ur("icon")}`]:{opacity:1,transform:"scale(1)"}},"&:disabled":{borderColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[4],backgroundColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[1],[`& + .${Ur("icon")}`]:{color:t.colorScheme==="dark"?t.colors.dark[6]:t.colors.gray[4]}}})}});const ODe=TDe;var RDe=Object.defineProperty,v1=Object.getOwnPropertySymbols,bZ=Object.prototype.hasOwnProperty,MZ=Object.prototype.propertyIsEnumerable,oB=(t,e,n)=>e in t?RDe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ky=(t,e)=>{for(var n in e||(e={}))bZ.call(e,n)&&oB(t,n,e[n]);if(v1)for(var n of v1(e))MZ.call(e,n)&&oB(t,n,e[n]);return t},ADe=(t,e)=>{var n={};for(var r in t)bZ.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&v1)for(var r of v1(t))e.indexOf(r)<0&&MZ.call(t,r)&&(n[r]=t[r]);return n};const DDe={icon:mDe,transitionDuration:100,size:"sm",labelPosition:"right"},NA=M.forwardRef((t,e)=>{var n,r;const i=nt("Radio",DDe,t),{className:o,style:s,id:a,label:l,size:c,title:u,disabled:d,color:f,classNames:h,styles:g,sx:y,icon:_,transitionDuration:v,wrapperProps:x,unstyled:w,labelPosition:S,description:E,error:C,variant:O}=i,R=ADe(i,["className","style","id","label","size","title","disabled","color","classNames","styles","sx","icon","transitionDuration","wrapperProps","unstyled","labelPosition","description","error","variant"]),T=vDe(),A=(n=T?.size)!=null?n:c,F=t.size?c:A,{classes:N}=ODe({color:f,transitionDuration:v,labelPosition:S,error:!!C},{name:"Radio",classNames:h,styles:g,unstyled:w,variant:O,size:F}),{systemStyles:U,rest:k}=Sl(R),z=zo(a),G=T?{checked:T.value===k.value,name:(r=k.name)!=null?r:T.name,onChange:T.onChange}:{};return H.createElement(pb,Ky(Ky({className:o,sx:y,style:s,id:z,size:F,labelPosition:S,label:l,description:E,error:C,disabled:d,__staticSelector:"Radio",classNames:h,styles:g,unstyled:w,"data-checked":G.checked||void 0,variant:O},U),x),H.createElement("div",{className:N.inner},H.createElement("input",Ky(Ky({ref:e,className:N.radio,type:"radio",id:z,disabled:d},k),G)),H.createElement(_,{className:N.icon,"aria-hidden":!0})))});NA.displayName="@mantine/core/Radio";NA.Group=SZ;function IDe({data:t,searchable:e,limit:n,searchValue:r,filter:i,value:o,filterDataOnExactSearchMatch:s}){if(!e)return t;const a=o!=null&&t.find(c=>c.value===o)||null;if(a&&!s&&a?.label===r){if(n){if(n>=t.length)return t;const c=t.indexOf(a),u=c+n,d=u-t.length;return d>0?t.slice(c-d):t.slice(c,u)}return t}const l=[];for(let c=0;c=n));c+=1);return l}var LDe=ft(()=>({input:{"&:not(:disabled)":{cursor:"pointer","&::selection":{backgroundColor:"transparent"}}}}));const kDe=LDe;var NDe=Object.defineProperty,FDe=Object.defineProperties,zDe=Object.getOwnPropertyDescriptors,y1=Object.getOwnPropertySymbols,EZ=Object.prototype.hasOwnProperty,PZ=Object.prototype.propertyIsEnumerable,sB=(t,e,n)=>e in t?NDe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Vp=(t,e)=>{for(var n in e||(e={}))EZ.call(e,n)&&sB(t,n,e[n]);if(y1)for(var n of y1(e))PZ.call(e,n)&&sB(t,n,e[n]);return t},GP=(t,e)=>FDe(t,zDe(e)),UDe=(t,e)=>{var n={};for(var r in t)EZ.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&y1)for(var r of y1(t))e.indexOf(r)<0&&PZ.call(t,r)&&(n[r]=t[r]);return n};function BDe(t,e){return e.label.toLowerCase().trim().includes(t.toLowerCase().trim())}function HDe(t,e){return!!t&&!e.some(n=>n.label.toLowerCase()===t.toLowerCase())}const VDe={required:!1,size:"sm",shadow:"sm",itemComponent:mA,transitionProps:{transition:"fade",duration:0},initiallyOpened:!1,filter:BDe,maxDropdownHeight:220,searchable:!1,clearable:!1,limit:1/0,disabled:!1,creatable:!1,shouldCreate:HDe,selectOnBlur:!1,switchDirectionOnFlip:!1,filterDataOnExactSearchMatch:!1,zIndex:Ys("popover"),positionDependencies:[],dropdownPosition:"flip"},iv=M.forwardRef((t,e)=>{const n=hb("Select",VDe,t),{inputProps:r,wrapperProps:i,shadow:o,data:s,value:a,defaultValue:l,onChange:c,itemComponent:u,onKeyDown:d,onBlur:f,onFocus:h,transitionProps:g,initiallyOpened:y,unstyled:_,classNames:v,styles:x,filter:w,maxDropdownHeight:S,searchable:E,clearable:C,nothingFound:O,limit:R,disabled:T,onSearchChange:A,searchValue:F,rightSection:N,rightSectionWidth:U,creatable:k,getCreateLabel:z,shouldCreate:G,selectOnBlur:W,onCreate:B,dropdownComponent:j,onDropdownClose:$,onDropdownOpen:q,withinPortal:K,portalProps:re,switchDirectionOnFlip:J,zIndex:le,name:ae,dropdownPosition:oe,allowDeselect:De,placeholder:Te,filterDataOnExactSearchMatch:ve,form:we,positionDependencies:me,readOnly:se,clearButtonProps:de,hoverOnSearchChange:ke}=n,Ve=UDe(n,["inputProps","wrapperProps","shadow","data","value","defaultValue","onChange","itemComponent","onKeyDown","onBlur","onFocus","transitionProps","initiallyOpened","unstyled","classNames","styles","filter","maxDropdownHeight","searchable","clearable","nothingFound","limit","disabled","onSearchChange","searchValue","rightSection","rightSectionWidth","creatable","getCreateLabel","shouldCreate","selectOnBlur","onCreate","dropdownComponent","onDropdownClose","onDropdownOpen","withinPortal","portalProps","switchDirectionOnFlip","zIndex","name","dropdownPosition","allowDeselect","placeholder","filterDataOnExactSearchMatch","form","positionDependencies","readOnly","clearButtonProps","hoverOnSearchChange"]),{classes:Ze,cx:ot,theme:dt}=kDe(),[We,ht]=M.useState(y),[ee,Q]=M.useState(-1),Pe=M.useRef(),$e=M.useRef({}),[Ge,Ke]=M.useState("column"),gt=Ge==="column",{scrollIntoView:ut,targetRef:Ae,scrollableRef:vt}=hW({duration:0,offset:5,cancelable:!1,isList:!0}),xt=De===void 0?C:De,ct=ce=>{if(We!==ce){ht(ce);const L=ce?q:$;typeof L=="function"&&L()}},Ie=k&&typeof z=="function";let Ye=null;const Tt=s.map(ce=>typeof ce=="string"?{label:ce,value:ce}:ce),Lt=CG({data:Tt}),[Rt,he,ue]=Ar({value:a,defaultValue:l,finalValue:null,onChange:c}),He=Lt.find(ce=>ce.value===Rt),[st,wt]=Ar({value:F,defaultValue:He?.label||"",finalValue:void 0,onChange:A}),Bt=ce=>{wt(ce),E&&typeof A=="function"&&A(ce)},Yt=()=>{var ce;se||(he(null),ue||Bt(""),(ce=Pe.current)==null||ce.focus())};M.useEffect(()=>{const ce=Lt.find(L=>L.value===Rt);ce?Bt(ce.label):(!Ie||!Rt)&&Bt("")},[Rt]),M.useEffect(()=>{He&&(!E||!We)&&Bt(He.label)},[He?.label]);const jn=ce=>{if(!se)if(xt&&He?.value===ce.value)he(null),ct(!1);else{if(ce.creatable&&typeof B=="function"){const L=B(ce.value);typeof L<"u"&&L!==null&&he(typeof L=="string"?L:L.value)}else he(ce.value);ue||Bt(ce.label),Q(-1),ct(!1),Pe.current.focus()}},Nt=IDe({data:Lt,searchable:E,limit:R,searchValue:st,filter:w,filterDataOnExactSearchMatch:ve,value:Rt});Ie&&G(st,Nt)&&(Ye=z(st),Nt.push({label:st,value:st,creatable:!0}));const xn=(ce,L,Y)=>{let ne=ce;for(;Y(ne);)if(ne=L(ne),!Nt[ne].disabled)return ne;return ce};Qr(()=>{Q(ke&&st?0:-1)},[st,ke]);const Ft=Rt?Nt.findIndex(ce=>ce.value===Rt):0,kt=!se&&(Nt.length>0?We:We&&!!O),fn=()=>{Q(ce=>{var L;const Y=xn(ce,ne=>ne-1,ne=>ne>0);return Ae.current=$e.current[(L=Nt[Y])==null?void 0:L.value],kt&&ut({alignment:gt?"start":"end"}),Y})},In=()=>{Q(ce=>{var L;const Y=xn(ce,ne=>ne+1,ne=>newindow.setTimeout(()=>{var ce;Ae.current=$e.current[(ce=Nt[Ft])==null?void 0:ce.value],ut({alignment:gt?"end":"start"})},50);Qr(()=>{kt&&Fn()},[kt]);const Lr=ce=>{switch(typeof d=="function"&&d(ce),ce.key){case"ArrowUp":{ce.preventDefault(),We?gt?fn():In():(Q(Ft),ct(!0),Fn());break}case"ArrowDown":{ce.preventDefault(),We?gt?In():fn():(Q(Ft),ct(!0),Fn());break}case"Home":{if(!E){ce.preventDefault(),We||ct(!0);const L=Nt.findIndex(Y=>!Y.disabled);Q(L),kt&&ut({alignment:gt?"end":"start"})}break}case"End":{if(!E){ce.preventDefault(),We||ct(!0);const L=Nt.map(Y=>!!Y.disabled).lastIndexOf(!1);Q(L),kt&&ut({alignment:gt?"end":"start"})}break}case"Escape":{ce.preventDefault(),ct(!1),Q(-1);break}case" ":{E||(ce.preventDefault(),Nt[ee]&&We?jn(Nt[ee]):(ct(!0),Q(Ft),Fn()));break}case"Enter":E||ce.preventDefault(),Nt[ee]&&We&&(ce.preventDefault(),jn(Nt[ee]))}},ti=ce=>{typeof f=="function"&&f(ce);const L=Lt.find(Y=>Y.value===Rt);W&&Nt[ee]&&We&&jn(Nt[ee]),Bt(L?.label||""),ct(!1)},te=ce=>{typeof h=="function"&&h(ce),E&&ct(!0)},pe=ce=>{se||(Bt(ce.currentTarget.value),C&&ce.currentTarget.value===""&&he(null),Q(-1),ct(!0))},Ne=()=>{se||(ct(!We),Rt&&!We&&Q(Ft))};return H.createElement(Ki.Wrapper,GP(Vp({},i),{__staticSelector:"Select"}),H.createElement(gc,{opened:kt,transitionProps:g,shadow:o,withinPortal:K,portalProps:re,__staticSelector:"Select",onDirectionChange:Ke,switchDirectionOnFlip:J,zIndex:le,dropdownPosition:oe,positionDependencies:[...me,st],classNames:v,styles:x,unstyled:_,variant:r.variant},H.createElement(gc.Target,null,H.createElement("div",{role:"combobox","aria-haspopup":"listbox","aria-owns":kt?`${r.id}-items`:null,"aria-controls":r.id,"aria-expanded":kt,onMouseLeave:()=>Q(-1),tabIndex:-1},H.createElement("input",{type:"hidden",name:ae,value:Rt||"",form:we,disabled:T}),H.createElement(Ki,Vp(GP(Vp(Vp({autoComplete:"off",type:"search"},r),Ve),{ref:Da(e,Pe),onKeyDown:Lr,__staticSelector:"Select",value:st,placeholder:Te,onChange:pe,"aria-autocomplete":"list","aria-controls":kt?`${r.id}-items`:null,"aria-activedescendant":ee>=0?`${r.id}-${ee}`:null,onMouseDown:Ne,onBlur:ti,onFocus:te,readOnly:!E||se,disabled:T,"data-mantine-stop-propagation":kt,name:null,classNames:GP(Vp({},v),{input:ot({[Ze.input]:!E},v?.input)})}),KX({theme:dt,rightSection:N,rightSectionWidth:U,styles:x,size:r.size,shouldClear:C&&!!He,onClear:Yt,error:i.error,clearButtonProps:de,disabled:T,readOnly:se}))))),H.createElement(gc.Dropdown,{component:j||ub,maxHeight:S,direction:Ge,id:r.id,innerRef:vt,__staticSelector:"Select",classNames:v,styles:x},H.createElement(pA,{data:Nt,hovered:ee,classNames:v,styles:x,isItemSelected:ce=>ce===Rt,uuid:r.id,__staticSelector:"Select",onItemHover:Q,onItemSelect:jn,itemsRefs:$e,itemComponent:u,size:r.size,nothingFound:O,creatable:Ie&&!!Ye,createLabel:Ye,"aria-label":i.label,unstyled:_,variant:r.variant}))))});iv.displayName="@mantine/core/Select";var jDe=Object.defineProperty,$De=Object.defineProperties,GDe=Object.getOwnPropertyDescriptors,aB=Object.getOwnPropertySymbols,WDe=Object.prototype.hasOwnProperty,YDe=Object.prototype.propertyIsEnumerable,lB=(t,e,n)=>e in t?jDe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,cB=(t,e)=>{for(var n in e||(e={}))WDe.call(e,n)&&lB(t,n,e[n]);if(aB)for(var n of aB(e))YDe.call(e,n)&&lB(t,n,e[n]);return t},uB=(t,e)=>$De(t,GDe(e));const XDe=cA({"from, to":{opacity:.4},"50%":{opacity:1}});var ZDe=ft((t,{height:e,width:n,radius:r,circle:i,animate:o})=>({root:{height:X(e),width:X(i?e:n),borderRadius:i?X(e):t.fn.radius(r),position:"relative",WebkitTransform:"translateZ(0)"},visible:{overflow:"hidden","&::before":uB(cB({},t.fn.cover(0)),{content:'""',background:t.colorScheme==="dark"?t.colors.dark[7]:t.white,zIndex:10}),"&::after":uB(cB({},t.fn.cover(0)),{content:'""',background:t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[3],animation:o?`${XDe} 1500ms linear infinite`:"none",zIndex:11})}}));const qDe=ZDe;var KDe=Object.defineProperty,_1=Object.getOwnPropertySymbols,CZ=Object.prototype.hasOwnProperty,TZ=Object.prototype.propertyIsEnumerable,dB=(t,e,n)=>e in t?KDe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,QDe=(t,e)=>{for(var n in e||(e={}))CZ.call(e,n)&&dB(t,n,e[n]);if(_1)for(var n of _1(e))TZ.call(e,n)&&dB(t,n,e[n]);return t},JDe=(t,e)=>{var n={};for(var r in t)CZ.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&_1)for(var r of _1(t))e.indexOf(r)<0&&TZ.call(t,r)&&(n[r]=t[r]);return n};const eIe={height:"auto",width:"100%",visible:!0,animate:!0},OZ=M.forwardRef((t,e)=>{const n=nt("Skeleton",eIe,t),{height:r,width:i,visible:o,animate:s,className:a,circle:l,radius:c,unstyled:u,variant:d}=n,f=JDe(n,["height","width","visible","animate","className","circle","radius","unstyled","variant"]),{classes:h,cx:g}=qDe({height:r,width:i,circle:l,radius:c,animate:s},{name:"Skeleton",unstyled:u,variant:d});return H.createElement(Xe,QDe({className:g(h.root,{[h.visible]:o},a),ref:e},f))});OZ.displayName="@mantine/core/Skeleton";function RZ({value:t,min:e,max:n}){const r=(t-e)/(n-e)*100;return Math.min(Math.max(r,0),100)}function tIe({value:t,containerWidth:e,min:n,max:r,step:i,precision:o}){const a=(e?Math.min(Math.max(t,0),e)/e:t)*(r-n),l=(a!==0?Math.round(a/i)*i:0)+n,c=Math.max(l,n);return o!==void 0?Number(c.toFixed(o)):c}var nIe=Object.defineProperty,rIe=Object.defineProperties,iIe=Object.getOwnPropertyDescriptors,fB=Object.getOwnPropertySymbols,oIe=Object.prototype.hasOwnProperty,sIe=Object.prototype.propertyIsEnumerable,hB=(t,e,n)=>e in t?nIe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,aIe=(t,e)=>{for(var n in e||(e={}))oIe.call(e,n)&&hB(t,n,e[n]);if(fB)for(var n of fB(e))sIe.call(e,n)&&hB(t,n,e[n]);return t},lIe=(t,e)=>rIe(t,iIe(e));const Li={xs:X(4),sm:X(6),md:X(8),lg:X(10),xl:X(12)};var cIe=ft(t=>({root:lIe(aIe({},t.fn.fontStyles()),{WebkitTapHighlightColor:"transparent",outline:0,display:"flex",flexDirection:"column",alignItems:"center",touchAction:"none",position:"relative"})}));const uIe=cIe;var dIe=Object.defineProperty,fIe=Object.defineProperties,hIe=Object.getOwnPropertyDescriptors,pB=Object.getOwnPropertySymbols,pIe=Object.prototype.hasOwnProperty,mIe=Object.prototype.propertyIsEnumerable,mB=(t,e,n)=>e in t?dIe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,gIe=(t,e)=>{for(var n in e||(e={}))pIe.call(e,n)&&mB(t,n,e[n]);if(pB)for(var n of pB(e))mIe.call(e,n)&&mB(t,n,e[n]);return t},vIe=(t,e)=>fIe(t,hIe(e)),yIe=ft((t,{color:e,disabled:n,thumbSize:r},{size:i})=>({label:{position:"absolute",top:X(-36),backgroundColor:t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[9],fontSize:t.fontSizes.xs,color:t.white,padding:`calc(${t.spacing.xs} / 2)`,borderRadius:t.radius.sm,whiteSpace:"nowrap",pointerEvents:"none",userSelect:"none",touchAction:"none"},thumb:vIe(gIe({},t.fn.focusStyles()),{boxSizing:"border-box",position:"absolute",display:n?"none":"flex",height:r?X(r):`calc(${Oe({sizes:Li,size:i})} * 2)`,width:r?X(r):`calc(${Oe({sizes:Li,size:i})} * 2)`,backgroundColor:t.colorScheme==="dark"?t.fn.themeColor(e,t.fn.primaryShade()):t.white,border:`${X(4)} solid ${t.colorScheme==="dark"?t.white:t.fn.themeColor(e,t.fn.primaryShade())}`,color:t.colorScheme==="dark"?t.white:t.fn.themeColor(e,t.fn.primaryShade()),transform:"translate(-50%, -50%)",top:"50%",cursor:"pointer",borderRadius:1e3,alignItems:"center",justifyContent:"center",transitionDuration:"100ms",transitionProperty:"box-shadow, transform",transitionTimingFunction:t.transitionTimingFunction,zIndex:3,userSelect:"none",touchAction:"none"}),dragging:{transform:"translate(-50%, -50%) scale(1.05)",boxShadow:t.shadows.sm}}));const _Ie=yIe,AZ=M.forwardRef(({max:t,min:e,value:n,position:r,label:i,dragging:o,onMouseDown:s,onKeyDownCapture:a,color:l,classNames:c,styles:u,size:d,labelTransition:f,labelTransitionDuration:h,labelTransitionTimingFunction:g,labelAlwaysOn:y,thumbLabel:_,onFocus:v,onBlur:x,showLabelOnHover:w,isHovered:S,children:E=null,disabled:C,unstyled:O,thumbSize:R,variant:T},A)=>{const{classes:F,cx:N,theme:U}=_Ie({color:l,disabled:C,thumbSize:R},{name:"Slider",classNames:c,styles:u,unstyled:O,variant:T,size:d}),[k,z]=M.useState(!1),G=y||o||k||w&&S;return H.createElement(Xe,{tabIndex:0,role:"slider","aria-label":_,"aria-valuemax":t,"aria-valuemin":e,"aria-valuenow":n,ref:A,className:N(F.thumb,{[F.dragging]:o}),onFocus:()=>{z(!0),typeof v=="function"&&v()},onBlur:()=>{z(!1),typeof x=="function"&&x()},onTouchStart:s,onMouseDown:s,onKeyDownCapture:a,onClick:W=>W.stopPropagation(),style:{[U.dir==="rtl"?"right":"left"]:`${r}%`}},E,H.createElement(zc,{mounted:i!=null&&G,duration:h,transition:f,timingFunction:g||U.transitionTimingFunction},W=>H.createElement("div",{style:W,className:F.label},i)))});AZ.displayName="@mantine/core/SliderThumb";function xIe({mark:t,offset:e,value:n,inverted:r=!1}){return r?typeof e=="number"&&t.value<=e||t.value>=n:typeof e=="number"?t.value>=e&&t.value<=n:t.value<=n}var wIe=ft((t,{color:e,disabled:n,thumbSize:r},{size:i})=>({marksContainer:{position:"absolute",right:r?X(r/2):Oe({sizes:Li,size:i}),left:r?X(r/2):Oe({sizes:Li,size:i}),"&:has(~ input:disabled)":{"& .mantine-Slider-markFilled":{border:`${X(2)} solid ${t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[2]}`,borderColor:t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[4]}}},markWrapper:{position:"absolute",top:`calc(${X(Oe({sizes:Li,size:i}))} / 2)`,zIndex:2,height:0},mark:{boxSizing:"border-box",border:`${X(2)} solid ${t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[2]}`,height:Oe({sizes:Li,size:i}),width:Oe({sizes:Li,size:i}),borderRadius:1e3,transform:`translateX(calc(-${Oe({sizes:Li,size:i})} / 2))`,backgroundColor:t.white,pointerEvents:"none"},markFilled:{borderColor:n?t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[4]:t.fn.variant({variant:"filled",color:e}).background},markLabel:{transform:`translate(-50%, calc(${t.spacing.xs} / 2))`,fontSize:t.fontSizes.sm,color:t.colorScheme==="dark"?t.colors.dark[2]:t.colors.gray[6],whiteSpace:"nowrap",cursor:"pointer",userSelect:"none"}}));const SIe=wIe;function DZ({marks:t,color:e,size:n,thumbSize:r,min:i,max:o,value:s,classNames:a,styles:l,offset:c,onChange:u,disabled:d,unstyled:f,inverted:h,variant:g}){const{classes:y,cx:_}=SIe({color:e,disabled:d,thumbSize:r},{name:"Slider",classNames:a,styles:l,unstyled:f,variant:g,size:n}),v=t.map((x,w)=>H.createElement(Xe,{className:y.markWrapper,sx:{left:`${RZ({value:x.value,min:i,max:o})}%`},key:w},H.createElement("div",{className:_(y.mark,{[y.markFilled]:xIe({mark:x,value:s,offset:c,inverted:h})})}),x.label&&H.createElement("div",{className:y.markLabel,onMouseDown:S=>{S.stopPropagation(),!d&&u(x.value)},onTouchStart:S=>{S.stopPropagation(),!d&&u(x.value)}},x.label)));return H.createElement("div",{className:y.marksContainer},v)}DZ.displayName="@mantine/core/SliderMarks";var bIe=ft((t,{radius:e,color:n,disabled:r,inverted:i,thumbSize:o},{size:s})=>({trackContainer:{display:"flex",alignItems:"center",width:"100%",height:`calc(${Oe({sizes:Li,size:s})} * 2)`,cursor:"pointer","&:has(~ input:disabled)":{"&":{pointerEvents:"none"},"& .mantine-Slider-thumb":{display:"none"},"& .mantine-Slider-track::before":{content:'""',backgroundColor:i?t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[4]:t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[2]},"& .mantine-Slider-bar":{backgroundColor:i?t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[2]:t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[4]}}},track:{position:"relative",height:Oe({sizes:Li,size:s}),width:"100%",marginRight:o?X(o/2):Oe({size:s,sizes:Li}),marginLeft:o?X(o/2):Oe({size:s,sizes:Li}),"&::before":{content:'""',position:"absolute",top:0,bottom:0,borderRadius:t.fn.radius(e),right:`calc(${o?X(o/2):Oe({size:s,sizes:Li})} * -1)`,left:`calc(${o?X(o/2):Oe({size:s,sizes:Li})} * -1)`,backgroundColor:i?r?t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[4]:t.fn.variant({variant:"filled",color:n}).background:t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[2],zIndex:0}},bar:{position:"absolute",zIndex:1,top:0,bottom:0,backgroundColor:i?t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[2]:r?t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[4]:t.fn.variant({variant:"filled",color:n}).background,borderRadius:t.fn.radius(e)}}));const MIe=bIe;var EIe=Object.defineProperty,PIe=Object.defineProperties,CIe=Object.getOwnPropertyDescriptors,x1=Object.getOwnPropertySymbols,IZ=Object.prototype.hasOwnProperty,LZ=Object.prototype.propertyIsEnumerable,gB=(t,e,n)=>e in t?EIe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,vB=(t,e)=>{for(var n in e||(e={}))IZ.call(e,n)&&gB(t,n,e[n]);if(x1)for(var n of x1(e))LZ.call(e,n)&&gB(t,n,e[n]);return t},TIe=(t,e)=>PIe(t,CIe(e)),OIe=(t,e)=>{var n={};for(var r in t)IZ.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&x1)for(var r of x1(t))e.indexOf(r)<0&&LZ.call(t,r)&&(n[r]=t[r]);return n};function kZ(t){var e=t,{filled:n,size:r,thumbSize:i,color:o,classNames:s,styles:a,radius:l,children:c,offset:u,disabled:d,marksOffset:f,unstyled:h,inverted:g,variant:y,containerProps:_}=e,v=OIe(e,["filled","size","thumbSize","color","classNames","styles","radius","children","offset","disabled","marksOffset","unstyled","inverted","variant","containerProps"]);const{classes:x}=MIe({color:o,radius:l,disabled:d,inverted:g,thumbSize:i},{name:"Slider",classNames:s,styles:a,unstyled:h,variant:y,size:r});return H.createElement(H.Fragment,null,H.createElement("div",vB({className:x.trackContainer},_),H.createElement("div",{className:x.track},H.createElement(Xe,{className:x.bar,sx:{left:`calc(${u}% - ${i?X(i/2):Oe({size:r,sizes:Li})})`,width:`calc(${n}% + 2 * ${i?X(i/2):Oe({size:r,sizes:Li})})`}}),c)),H.createElement(DZ,TIe(vB({},v),{size:r,thumbSize:i,color:o,offset:f,classNames:s,styles:a,disabled:d,unstyled:h,inverted:g,variant:y})))}kZ.displayName="@mantine/core/SliderTrack";var RIe=Object.defineProperty,AIe=Object.defineProperties,DIe=Object.getOwnPropertyDescriptors,w1=Object.getOwnPropertySymbols,NZ=Object.prototype.hasOwnProperty,FZ=Object.prototype.propertyIsEnumerable,yB=(t,e,n)=>e in t?RIe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,IIe=(t,e)=>{for(var n in e||(e={}))NZ.call(e,n)&&yB(t,n,e[n]);if(w1)for(var n of w1(e))FZ.call(e,n)&&yB(t,n,e[n]);return t},LIe=(t,e)=>AIe(t,DIe(e)),kIe=(t,e)=>{var n={};for(var r in t)NZ.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&w1)for(var r of w1(t))e.indexOf(r)<0&&FZ.call(t,r)&&(n[r]=t[r]);return n};const zZ=M.forwardRef((t,e)=>{var n=t,{className:r,size:i,classNames:o,styles:s,disabled:a,unstyled:l,variant:c}=n,u=kIe(n,["className","size","classNames","styles","disabled","unstyled","variant"]);const{classes:d,cx:f}=uIe(null,{name:"Slider",classNames:o,styles:s,unstyled:l,variant:c,size:i});return H.createElement(Xe,LIe(IIe({},u),{tabIndex:-1,className:f(d.root,r),ref:e}))});zZ.displayName="@mantine/core/SliderRoot";var NIe=Object.defineProperty,FIe=Object.defineProperties,zIe=Object.getOwnPropertyDescriptors,S1=Object.getOwnPropertySymbols,UZ=Object.prototype.hasOwnProperty,BZ=Object.prototype.propertyIsEnumerable,_B=(t,e,n)=>e in t?NIe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,UIe=(t,e)=>{for(var n in e||(e={}))UZ.call(e,n)&&_B(t,n,e[n]);if(S1)for(var n of S1(e))BZ.call(e,n)&&_B(t,n,e[n]);return t},BIe=(t,e)=>FIe(t,zIe(e)),HIe=(t,e)=>{var n={};for(var r in t)UZ.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&S1)for(var r of S1(t))e.indexOf(r)<0&&BZ.call(t,r)&&(n[r]=t[r]);return n};const VIe={size:"md",radius:"xl",min:0,max:100,step:1,marks:[],label:t=>t,labelTransition:"skew-down",labelTransitionDuration:0,labelAlwaysOn:!1,thumbLabel:"",showLabelOnHover:!0,disabled:!1,scale:t=>t},HZ=M.forwardRef((t,e)=>{const n=nt("Slider",VIe,t),{classNames:r,styles:i,color:o,value:s,onChange:a,onChangeEnd:l,size:c,radius:u,min:d,max:f,step:h,precision:g,defaultValue:y,name:_,marks:v,label:x,labelTransition:w,labelTransitionDuration:S,labelTransitionTimingFunction:E,labelAlwaysOn:C,thumbLabel:O,showLabelOnHover:R,thumbChildren:T,disabled:A,unstyled:F,thumbSize:N,scale:U,inverted:k,variant:z}=n,G=HIe(n,["classNames","styles","color","value","onChange","onChangeEnd","size","radius","min","max","step","precision","defaultValue","name","marks","label","labelTransition","labelTransitionDuration","labelTransitionTimingFunction","labelAlwaysOn","thumbLabel","showLabelOnHover","thumbChildren","disabled","unstyled","thumbSize","scale","inverted","variant"]),W=Ir(),[B,j]=M.useState(!1),[$,q]=Ar({value:typeof s=="number"?Ns(s,d,f):s,defaultValue:typeof y=="number"?Ns(y,d,f):y,finalValue:Ns(0,d,f),onChange:a}),K=M.useRef($),re=M.useRef(),J=M.useRef(),le=RZ({value:$,min:d,max:f}),ae=U($),oe=typeof x=="function"?x(ae):x,De=M.useCallback(({x:me})=>{if(!A){const se=tIe({value:me,min:d,max:f,step:h,precision:g});q(se),K.current=se}},[A,d,f,h,g]),{ref:Te,active:ve}=dA(De,{onScrubEnd:()=>l?.(K.current)},W.dir),we=me=>{if(!A)switch(me.key){case"ArrowUp":{me.preventDefault(),J.current.focus();const se=Math.min(Math.max($+h,d),f);l?.(se),q(se);break}case"ArrowRight":{me.preventDefault(),J.current.focus();const se=Math.min(Math.max(W.dir==="rtl"?$-h:$+h,d),f);l?.(se),q(se);break}case"ArrowDown":{me.preventDefault(),J.current.focus();const se=Math.min(Math.max($-h,d),f);l?.(se),q(se);break}case"ArrowLeft":{me.preventDefault(),J.current.focus();const se=Math.min(Math.max(W.dir==="rtl"?$+h:$-h,d),f);l?.(se),q(se);break}case"Home":{me.preventDefault(),J.current.focus(),l?.(d),q(d);break}case"End":{me.preventDefault(),J.current.focus(),l?.(f),q(f);break}}};return H.createElement(zZ,BIe(UIe({},G),{ref:Da(e,re),onKeyDownCapture:we,onMouseDownCapture:()=>{var me;return(me=re.current)==null?void 0:me.focus()},size:c,classNames:r,styles:i,disabled:A,unstyled:F,variant:z}),H.createElement(kZ,{inverted:k,offset:0,filled:le,marks:v,size:c,thumbSize:N,radius:u,color:o,min:d,max:f,value:ae,onChange:q,classNames:r,styles:i,disabled:A,unstyled:F,variant:z,containerProps:{ref:Te,onMouseEnter:R?()=>j(!0):void 0,onMouseLeave:R?()=>j(!1):void 0}},H.createElement(AZ,{max:f,min:d,value:ae,position:le,dragging:ve,color:o,size:c,label:oe,ref:J,labelTransition:w,labelTransitionDuration:S,labelTransitionTimingFunction:E,labelAlwaysOn:C,classNames:r,styles:i,thumbLabel:O,showLabelOnHover:R,isHovered:B,disabled:A,unstyled:F,thumbSize:N,variant:z},T)),H.createElement("input",{type:"hidden",name:_,value:ae}))});HZ.displayName="@mantine/core/Slider";var jIe=ft((t,{spacing:e,align:n,justify:r})=>({root:{display:"flex",flexDirection:"column",alignItems:n,justifyContent:r,gap:Oe({size:e,sizes:t.spacing})}}));const $Ie=jIe;var GIe=Object.defineProperty,b1=Object.getOwnPropertySymbols,VZ=Object.prototype.hasOwnProperty,jZ=Object.prototype.propertyIsEnumerable,xB=(t,e,n)=>e in t?GIe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,WIe=(t,e)=>{for(var n in e||(e={}))VZ.call(e,n)&&xB(t,n,e[n]);if(b1)for(var n of b1(e))jZ.call(e,n)&&xB(t,n,e[n]);return t},YIe=(t,e)=>{var n={};for(var r in t)VZ.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&b1)for(var r of b1(t))e.indexOf(r)<0&&jZ.call(t,r)&&(n[r]=t[r]);return n};const XIe={spacing:"md",align:"stretch",justify:"flex-start"},vb=M.forwardRef((t,e)=>{const n=nt("Stack",XIe,t),{spacing:r,className:i,align:o,justify:s,unstyled:a,variant:l}=n,c=YIe(n,["spacing","className","align","justify","unstyled","variant"]),{classes:u,cx:d}=$Ie({spacing:r,align:o,justify:s},{name:"Stack",unstyled:a,variant:l});return H.createElement(Xe,WIe({className:d(u.root,i),ref:e},c))});vb.displayName="@mantine/core/Stack";const $Z=M.createContext(null),ZIe=$Z.Provider,qIe=()=>M.useContext($Z);var KIe=Object.defineProperty,M1=Object.getOwnPropertySymbols,GZ=Object.prototype.hasOwnProperty,WZ=Object.prototype.propertyIsEnumerable,wB=(t,e,n)=>e in t?KIe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,SB=(t,e)=>{for(var n in e||(e={}))GZ.call(e,n)&&wB(t,n,e[n]);if(M1)for(var n of M1(e))WZ.call(e,n)&&wB(t,n,e[n]);return t},QIe=(t,e)=>{var n={};for(var r in t)GZ.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&M1)for(var r of M1(t))e.indexOf(r)<0&&WZ.call(t,r)&&(n[r]=t[r]);return n};const JIe={size:"sm"},YZ=M.forwardRef((t,e)=>{const n=nt("SwitchGroup",JIe,t),{children:r,value:i,defaultValue:o,onChange:s,size:a,wrapperProps:l}=n,c=QIe(n,["children","value","defaultValue","onChange","size","wrapperProps"]),[u,d]=Ar({value:i,defaultValue:o,finalValue:[],onChange:s}),f=h=>{const g=h.currentTarget.value;d(u.includes(g)?u.filter(y=>y!==g):[...u,g])};return H.createElement(ZIe,{value:{value:u,onChange:f,size:a}},H.createElement(Ki.Wrapper,SB(SB({labelElement:"div",size:a,__staticSelector:"SwitchGroup",ref:e},l),c),r))});YZ.displayName="@mantine/core/SwitchGroup";var e3e=Object.defineProperty,t3e=Object.defineProperties,n3e=Object.getOwnPropertyDescriptors,bB=Object.getOwnPropertySymbols,r3e=Object.prototype.hasOwnProperty,i3e=Object.prototype.propertyIsEnumerable,MB=(t,e,n)=>e in t?e3e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,o3e=(t,e)=>{for(var n in e||(e={}))r3e.call(e,n)&&MB(t,n,e[n]);if(bB)for(var n of bB(e))i3e.call(e,n)&&MB(t,n,e[n]);return t},s3e=(t,e)=>t3e(t,n3e(e));const a3e={xs:X(16),sm:X(20),md:X(24),lg:X(30),xl:X(36)},l3e={xs:X(32),sm:X(38),md:X(46),lg:X(56),xl:X(72)},c3e={xs:X(12),sm:X(14),md:X(18),lg:X(22),xl:X(28)},u3e={xs:X(5),sm:X(6),md:X(7),lg:X(9),xl:X(11)},d3e={xs:X(4),sm:X(5),md:X(6),lg:X(8),xl:X(10)};var f3e=ft((t,{radius:e,color:n,labelPosition:r,error:i},{size:o})=>{const s=Oe({size:o,sizes:c3e}),a=Oe({size:e,sizes:t.radius}),l=t.fn.variant({variant:"filled",color:n}),c=Oe({size:o,sizes:l3e}),u=X(o==="xs"?1:2),d=t.fn.variant({variant:"filled",color:"red"}).background;return{root:{position:"relative"},input:{height:0,width:0,overflow:"hidden",whiteSpace:"nowrap",padding:0,WebkitClipPath:"inset(50%)",clipPath:"inset(50%)",position:"absolute"},track:s3e(o3e({},t.fn.focusStyles("input:focus + &")),{cursor:t.cursorType,overflow:"hidden",WebkitTapHighlightColor:"transparent",position:"relative",borderRadius:a,backgroundColor:t.colorScheme==="dark"?t.colors.dark[6]:t.colors.gray[2],border:`${X(1)} solid ${i?d:t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[3]}`,height:Oe({size:o,sizes:a3e}),minWidth:c,margin:0,transitionProperty:"background-color, border-color",transitionTimingFunction:t.transitionTimingFunction,transitionDuration:"150ms",boxSizing:"border-box",appearance:"none",display:"flex",alignItems:"center",fontSize:Oe({size:o,sizes:u3e}),fontWeight:600,order:r==="left"?2:1,userSelect:"none",zIndex:0,lineHeight:0,color:t.colorScheme==="dark"?t.colors.dark[1]:t.colors.gray[6],transition:`color 150ms ${t.transitionTimingFunction}`,"input:checked + &":{backgroundColor:l.background,borderColor:l.background,color:t.white,transition:`color 150ms ${t.transitionTimingFunction}`},"input:disabled + &":{backgroundColor:t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[2],borderColor:t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[2],cursor:"not-allowed",pointerEvents:"none"}}),thumb:{position:"absolute",zIndex:1,borderRadius:a,boxSizing:"border-box",display:"flex",backgroundColor:t.white,height:s,width:s,border:`${X(1)} solid ${t.colorScheme==="dark"?t.white:t.colors.gray[3]}`,left:u,transition:`left 150ms ${t.transitionTimingFunction}`,"& > *":{margin:"auto"},"@media (prefers-reduced-motion)":{transitionDuration:t.respectReducedMotion?"0ms":""},"input:checked + * > &":{left:`calc(100% - ${s} - ${u})`,borderColor:t.white},"input:disabled + * > &":{borderColor:t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[2],backgroundColor:t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[0]}},trackLabel:{height:"100%",display:"grid",placeContent:"center",minWidth:`calc(${c} - ${s})`,paddingInline:Oe({size:o,sizes:d3e}),margin:`0 0 0 calc(${s} + ${u})`,transition:`margin 150ms ${t.transitionTimingFunction}`,"input:checked + * > &":{margin:`0 calc(${s} + ${u}) 0 0`}}}});const h3e=f3e;var p3e=Object.defineProperty,m3e=Object.defineProperties,g3e=Object.getOwnPropertyDescriptors,E1=Object.getOwnPropertySymbols,XZ=Object.prototype.hasOwnProperty,ZZ=Object.prototype.propertyIsEnumerable,EB=(t,e,n)=>e in t?p3e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,WP=(t,e)=>{for(var n in e||(e={}))XZ.call(e,n)&&EB(t,n,e[n]);if(E1)for(var n of E1(e))ZZ.call(e,n)&&EB(t,n,e[n]);return t},v3e=(t,e)=>m3e(t,g3e(e)),y3e=(t,e)=>{var n={};for(var r in t)XZ.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&E1)for(var r of E1(t))e.indexOf(r)<0&&ZZ.call(t,r)&&(n[r]=t[r]);return n};const _3e={offLabel:"",onLabel:"",size:"sm",radius:"xl",error:!1},yb=M.forwardRef((t,e)=>{var n;const r=nt("Switch",_3e,t),{className:i,color:o,label:s,offLabel:a,onLabel:l,id:c,style:u,size:d,radius:f,wrapperProps:h,children:g,unstyled:y,styles:_,classNames:v,thumbIcon:x,sx:w,checked:S,defaultChecked:E,onChange:C,labelPosition:O,description:R,error:T,disabled:A,variant:F}=r,N=y3e(r,["className","color","label","offLabel","onLabel","id","style","size","radius","wrapperProps","children","unstyled","styles","classNames","thumbIcon","sx","checked","defaultChecked","onChange","labelPosition","description","error","disabled","variant"]),U=qIe(),k=U?.size||d,{classes:z,cx:G}=h3e({color:o,radius:f,labelPosition:O,error:!!T},{name:"Switch",classNames:v,styles:_,unstyled:y,size:k,variant:F}),{systemStyles:W,rest:B}=Sl(N),j=zo(c),$=U?{checked:U.value.includes(B.value),onChange:U.onChange}:{},[q,K]=Ar({value:(n=$.checked)!=null?n:S,defaultValue:E,finalValue:!1});return H.createElement(pb,WP(WP({className:G(i,z.root),sx:w,style:u,id:j,size:U?.size||d,labelPosition:O,label:s,description:R,error:T,disabled:A,__staticSelector:"Switch",classNames:v,styles:_,unstyled:y,"data-checked":$.checked||void 0,variant:F},W),h),H.createElement("input",v3e(WP({},B),{disabled:A,checked:q,onChange:re=>{U?$.onChange(re):C?.(re),K(re.currentTarget.checked)},id:j,ref:e,type:"checkbox",className:z.input})),H.createElement("label",{htmlFor:j,className:z.track},H.createElement("div",{className:z.thumb},x),H.createElement("div",{className:z.trackLabel},q?l:a)))});yb.displayName="@mantine/core/Switch";yb.Group=YZ;var x3e=Object.defineProperty,w3e=Object.defineProperties,S3e=Object.getOwnPropertyDescriptors,PB=Object.getOwnPropertySymbols,b3e=Object.prototype.hasOwnProperty,M3e=Object.prototype.propertyIsEnumerable,CB=(t,e,n)=>e in t?x3e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,E3e=(t,e)=>{for(var n in e||(e={}))b3e.call(e,n)&&CB(t,n,e[n]);if(PB)for(var n of PB(e))M3e.call(e,n)&&CB(t,n,e[n]);return t},P3e=(t,e)=>w3e(t,S3e(e)),C3e=ft((t,{captionSide:e,horizontalSpacing:n,verticalSpacing:r,fontSize:i,withBorder:o,withColumnBorders:s})=>{const a=`${X(1)} solid ${t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[3]}`;return{root:P3e(E3e({},t.fn.fontStyles()),{width:"100%",borderCollapse:"collapse",captionSide:e,color:t.colorScheme==="dark"?t.colors.dark[0]:t.black,lineHeight:t.lineHeight,border:o?a:void 0,"& caption":{marginTop:e==="top"?0:t.spacing.xs,marginBottom:e==="bottom"?0:t.spacing.xs,fontSize:t.fontSizes.sm,color:t.colorScheme==="dark"?t.colors.dark[2]:t.colors.gray[6]},"& thead tr th, & tfoot tr th, & tbody tr th":{textAlign:"left",fontWeight:"bold",color:t.colorScheme==="dark"?t.colors.dark[0]:t.colors.gray[7],fontSize:Oe({size:i,sizes:t.fontSizes}),padding:`${Oe({size:r,sizes:t.spacing})} ${Oe({size:n,sizes:t.spacing})}`},"& thead tr th":{borderBottom:a},"& tfoot tr th, & tbody tr th":{borderTop:a},"& tbody tr td":{padding:`${Oe({size:r,sizes:t.spacing})} ${Oe({size:n,sizes:t.spacing})}`,borderTop:a,fontSize:Oe({size:i,sizes:t.fontSizes})},"& tbody tr:first-of-type td, & tbody tr:first-of-type th":{borderTop:"none"},"& thead th, & tbody td":{borderRight:s?a:"none","&:last-of-type":{borderRight:"none",borderLeft:s?a:"none"}},"& tbody tr th":{borderRight:s?a:"none"},"&[data-striped] tbody tr:nth-of-type(odd)":{backgroundColor:t.colorScheme==="dark"?t.colors.dark[6]:t.colors.gray[0]},"&[data-hover] tbody tr":t.fn.hover({backgroundColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[1]})})}});const T3e=C3e;var O3e=Object.defineProperty,R3e=Object.defineProperties,A3e=Object.getOwnPropertyDescriptors,P1=Object.getOwnPropertySymbols,qZ=Object.prototype.hasOwnProperty,KZ=Object.prototype.propertyIsEnumerable,TB=(t,e,n)=>e in t?O3e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,D3e=(t,e)=>{for(var n in e||(e={}))qZ.call(e,n)&&TB(t,n,e[n]);if(P1)for(var n of P1(e))KZ.call(e,n)&&TB(t,n,e[n]);return t},I3e=(t,e)=>R3e(t,A3e(e)),L3e=(t,e)=>{var n={};for(var r in t)qZ.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&P1)for(var r of P1(t))e.indexOf(r)<0&&KZ.call(t,r)&&(n[r]=t[r]);return n};const k3e={striped:!1,highlightOnHover:!1,captionSide:"top",horizontalSpacing:"xs",fontSize:"sm",verticalSpacing:7,withBorder:!1,withColumnBorders:!1},QZ=M.forwardRef((t,e)=>{const n=nt("Table",k3e,t),{className:r,children:i,striped:o,highlightOnHover:s,captionSide:a,horizontalSpacing:l,verticalSpacing:c,fontSize:u,unstyled:d,withBorder:f,withColumnBorders:h,variant:g}=n,y=L3e(n,["className","children","striped","highlightOnHover","captionSide","horizontalSpacing","verticalSpacing","fontSize","unstyled","withBorder","withColumnBorders","variant"]),{classes:_,cx:v}=T3e({captionSide:a,verticalSpacing:c,horizontalSpacing:l,fontSize:u,withBorder:f,withColumnBorders:h},{unstyled:d,name:"Table",variant:g});return H.createElement(Xe,I3e(D3e({},y),{component:"table",ref:e,className:v(_.root,r),"data-striped":o||void 0,"data-hover":s||void 0}),i)});QZ.displayName="@mantine/core/Table";const IT={context:"Tabs component was not found in the tree",value:"Tabs.Tab or Tabs.Panel component was rendered with invalid value or without value"},[N3e,FA]=cd(IT.context);var F3e=Object.defineProperty,OB=Object.getOwnPropertySymbols,z3e=Object.prototype.hasOwnProperty,U3e=Object.prototype.propertyIsEnumerable,RB=(t,e,n)=>e in t?F3e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,B3e=(t,e)=>{for(var n in e||(e={}))z3e.call(e,n)&&RB(t,n,e[n]);if(OB)for(var n of OB(e))U3e.call(e,n)&&RB(t,n,e[n]);return t};function H3e({orientation:t,inverted:e,placement:n},r,i){const o=t==="vertical";return i==="default"?{[o?n==="left"?"borderRight":"borderLeft":e?"borderTop":"borderBottom"]:`${X(2)} solid ${r.colorScheme==="dark"?r.colors.dark[4]:r.colors.gray[3]}`}:i==="outline"?{[o?n==="left"?"borderRight":"borderLeft":e?"borderTop":"borderBottom"]:`${X(1)} solid ${r.colorScheme==="dark"?r.colors.dark[4]:r.colors.gray[3]}`}:i==="pills"?{gap:`calc(${r.spacing.sm} / 2)`}:{}}var V3e=ft((t,e,{variant:n})=>{const r=e.orientation==="vertical";return{tabsList:B3e({display:"flex",flexWrap:"wrap",flexDirection:r?"column":"row",justifyContent:lX[e.position],'& [role="tab"]':{flex:e.grow?1:void 0}},H3e(e,t,n))}});const j3e=V3e;var $3e=Object.defineProperty,G3e=Object.defineProperties,W3e=Object.getOwnPropertyDescriptors,C1=Object.getOwnPropertySymbols,JZ=Object.prototype.hasOwnProperty,eq=Object.prototype.propertyIsEnumerable,AB=(t,e,n)=>e in t?$3e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Y3e=(t,e)=>{for(var n in e||(e={}))JZ.call(e,n)&&AB(t,n,e[n]);if(C1)for(var n of C1(e))eq.call(e,n)&&AB(t,n,e[n]);return t},X3e=(t,e)=>G3e(t,W3e(e)),Z3e=(t,e)=>{var n={};for(var r in t)JZ.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&C1)for(var r of C1(t))e.indexOf(r)<0&&eq.call(t,r)&&(n[r]=t[r]);return n};const q3e={grow:!1,position:"left"},tq=M.forwardRef((t,e)=>{const n=nt("TabsList",q3e,t),{children:r,className:i,grow:o,position:s}=n,a=Z3e(n,["children","className","grow","position"]),{orientation:l,variant:c,color:u,radius:d,inverted:f,placement:h,classNames:g,styles:y,unstyled:_}=FA(),{classes:v,cx:x}=j3e({orientation:l,grow:o,color:u,position:s,radius:d,inverted:f,placement:h},{name:"Tabs",unstyled:_,classNames:g,styles:y,variant:c});return H.createElement(Xe,X3e(Y3e({},a),{className:x(v.tabsList,i),ref:e,role:"tablist","aria-orientation":l}),r)});tq.displayName="@mantine/core/TabsList";var K3e=ft((t,{orientation:e})=>({panel:{flex:e==="vertical"?1:void 0}}));const Q3e=K3e;var J3e=Object.defineProperty,eLe=Object.defineProperties,tLe=Object.getOwnPropertyDescriptors,T1=Object.getOwnPropertySymbols,nq=Object.prototype.hasOwnProperty,rq=Object.prototype.propertyIsEnumerable,DB=(t,e,n)=>e in t?J3e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,nLe=(t,e)=>{for(var n in e||(e={}))nq.call(e,n)&&DB(t,n,e[n]);if(T1)for(var n of T1(e))rq.call(e,n)&&DB(t,n,e[n]);return t},rLe=(t,e)=>eLe(t,tLe(e)),iLe=(t,e)=>{var n={};for(var r in t)nq.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&T1)for(var r of T1(t))e.indexOf(r)<0&&rq.call(t,r)&&(n[r]=t[r]);return n};const oLe={},iq=M.forwardRef((t,e)=>{const n=nt("TabsPanel",oLe,t),{value:r,children:i,sx:o,className:s}=n,a=iLe(n,["value","children","sx","className"]),l=FA(),{classes:c,cx:u}=Q3e({orientation:l.orientation,color:l.color,radius:l.radius,inverted:l.inverted,placement:l.placement},{name:"Tabs",unstyled:l.unstyled,classNames:l.classNames,styles:l.styles,variant:l.variant}),d=l.getPanelId(r),f=l.value===r,h=l.keepMounted||f?i:null;return M.useEffect(()=>(l.setMountedPanelIds(g=>[...g,d]),l.setMountedPanelIds(g=>g.filter(y=>y!==d))),[d]),H.createElement(Xe,rLe(nLe({},a),{ref:e,sx:[{display:f?void 0:"none"},...Ch(o)],className:u(c.panel,s),role:"tabpanel",id:d,"aria-labelledby":l.getTabId(r)}),h)});iq.displayName="@mantine/core/TabsPanel";var sLe=Object.defineProperty,aLe=Object.defineProperties,lLe=Object.getOwnPropertyDescriptors,IB=Object.getOwnPropertySymbols,cLe=Object.prototype.hasOwnProperty,uLe=Object.prototype.propertyIsEnumerable,LB=(t,e,n)=>e in t?sLe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Lf=(t,e)=>{for(var n in e||(e={}))cLe.call(e,n)&&LB(t,n,e[n]);if(IB)for(var n of IB(e))uLe.call(e,n)&&LB(t,n,e[n]);return t},kB=(t,e)=>aLe(t,lLe(e));function dLe(t,{orientation:e,color:n,radius:r,inverted:i,placement:o},s){const a=e==="vertical",l=t.fn.variant({color:n,variant:"filled"}),c=X(t.fn.radius(r)),u=e==="vertical"?o==="left"?`${c} 0 0 ${c}`:` 0 ${c} ${c} 0`:i?`0 0 ${c} ${c}`:`${c} ${c} 0 0`;return s==="default"?kB(Lf({[a?o==="left"?"borderRight":"borderLeft":i?"borderTop":"borderBottom"]:`${X(2)} solid transparent`,[a?o==="left"?"marginRight":"marginLeft":i?"marginTop":"marginBottom"]:X(-2),borderRadius:u},t.fn.hover({backgroundColor:t.colorScheme==="dark"?t.colors.dark[6]:t.colors.gray[0],borderColor:t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[3]})),{"&[data-active]":Lf({borderColor:l.background,color:t.colorScheme==="dark"?t.white:t.black},t.fn.hover({borderColor:l.background}))}):s==="outline"?{borderRadius:u,border:`${X(1)} solid transparent`,[a?o==="left"?"borderRight":"borderLeft":i?"borderTop":"borderBottom"]:"none","&[data-active]":{borderColor:t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[3],"&::before":{content:'""',backgroundColor:t.colorScheme==="dark"?t.colors.dark[7]:t.white,position:"absolute",bottom:a?0:i?"unset":X(-1),top:a?0:i?X(-1):"unset",[a?"width":"height"]:X(1),right:a?o==="left"?X(-1):"unset":0,left:a?o==="left"?"unset":X(-1):0}}}:s==="pills"?kB(Lf({borderRadius:t.fn.radius(r)},t.fn.hover({backgroundColor:t.colorScheme==="dark"?t.colors.dark[6]:t.colors.gray[0]})),{"&[data-active]":Lf({backgroundColor:l.background,color:t.white},t.fn.hover({backgroundColor:l.background}))}):{}}var fLe=ft((t,e,{variant:n})=>({tabLabel:{},tab:Lf({position:"relative",padding:`${t.spacing.xs} ${t.spacing.md}`,paddingLeft:e.withIcon?t.spacing.xs:void 0,paddingRight:e.withRightSection?t.spacing.xs:void 0,fontSize:t.fontSizes.sm,whiteSpace:"nowrap",zIndex:0,display:"flex",alignItems:"center",justifyContent:e.orientation==="horizontal"?"center":void 0,lineHeight:1,"&:disabled":Lf({opacity:.5,cursor:"not-allowed"},t.fn.hover({backgroundColor:"transparent"})),"&:focus":{zIndex:1}},dLe(t,e,n)),tabRightSection:{display:"flex",justifyContent:"center",alignItems:"center","&:not(:only-child)":{marginLeft:X(7)}},tabIcon:{display:"flex",justifyContent:"center",alignItems:"center","&:not(:only-child)":{marginRight:X(7)}}}));const hLe=fLe;var pLe=Object.defineProperty,mLe=Object.defineProperties,gLe=Object.getOwnPropertyDescriptors,O1=Object.getOwnPropertySymbols,oq=Object.prototype.hasOwnProperty,sq=Object.prototype.propertyIsEnumerable,NB=(t,e,n)=>e in t?pLe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,vLe=(t,e)=>{for(var n in e||(e={}))oq.call(e,n)&&NB(t,n,e[n]);if(O1)for(var n of O1(e))sq.call(e,n)&&NB(t,n,e[n]);return t},yLe=(t,e)=>mLe(t,gLe(e)),_Le=(t,e)=>{var n={};for(var r in t)oq.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&O1)for(var r of O1(t))e.indexOf(r)<0&&sq.call(t,r)&&(n[r]=t[r]);return n};const xLe={},aq=M.forwardRef((t,e)=>{const n=nt("TabsTab",xLe,t),{value:r,children:i,onKeyDown:o,onClick:s,className:a,icon:l,rightSection:c,color:u}=n,d=_Le(n,["value","children","onKeyDown","onClick","className","icon","rightSection","color"]),f=FA(),h=!!l,g=!!c,{theme:y,classes:_,cx:v}=hLe({withIcon:h||g&&!i,withRightSection:g||h&&!i,orientation:f.orientation,color:u||f.color,radius:f.radius,inverted:f.inverted,placement:f.placement},{name:"Tabs",unstyled:f.unstyled,classNames:f.classNames,styles:f.styles,variant:f.variant}),x=r===f.value,w=f.getPanelId(r),S=f.mountedPanelIds.includes(r)?w:void 0,E=C=>{f.onTabChange(f.allowTabDeactivation&&r===f.value?null:r),s?.(C)};return H.createElement(Fs,yLe(vLe({},d),{unstyled:f.unstyled,className:v(_.tab,a),"data-active":x||void 0,ref:e,type:"button",role:"tab",id:f.getTabId(r),"aria-selected":x,tabIndex:x||f.value===null?0:-1,"aria-controls":S,onClick:E,onKeyDown:QR({siblingSelector:'[role="tab"]',parentSelector:'[role="tablist"]',activateOnFocus:f.activateTabWithKeyboard,loop:f.loop,dir:y.dir,orientation:f.orientation,onKeyDown:o})}),l&&H.createElement("span",{className:_.tabIcon},l),i&&H.createElement("span",{className:_.tabLabel},i),c&&H.createElement("span",{className:_.tabRightSection},c))});aq.displayName="@mantine/core/Tab";function lq({defaultValue:t,value:e,onTabChange:n,orientation:r,children:i,loop:o,id:s,activateTabWithKeyboard:a,allowTabDeactivation:l,variant:c,color:u,radius:d,inverted:f,placement:h,keepMounted:g=!0,classNames:y,styles:_,unstyled:v}){const x=zo(s),[w,S]=M.useState([]),[E,C]=Ar({value:e,defaultValue:t,finalValue:null,onChange:n});return H.createElement(N3e,{value:{placement:h,value:E,orientation:r,id:x,loop:o,activateTabWithKeyboard:a,getTabId:Ox(`${x}-tab`,IT.value),getPanelId:Ox(`${x}-panel`,IT.value),onTabChange:C,setMountedPanelIds:S,mountedPanelIds:w,allowTabDeactivation:l,variant:c,color:u,radius:d,inverted:f,keepMounted:g,classNames:y,styles:_,unstyled:v}},i)}lq.displayName="@mantine/core/TabsProvider";var wLe=ft((t,{orientation:e,placement:n})=>({root:{display:e==="vertical"?"flex":void 0,flexDirection:n==="right"?"row-reverse":"row"}}));const SLe=wLe;var bLe=Object.defineProperty,MLe=Object.defineProperties,ELe=Object.getOwnPropertyDescriptors,R1=Object.getOwnPropertySymbols,cq=Object.prototype.hasOwnProperty,uq=Object.prototype.propertyIsEnumerable,FB=(t,e,n)=>e in t?bLe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,PLe=(t,e)=>{for(var n in e||(e={}))cq.call(e,n)&&FB(t,n,e[n]);if(R1)for(var n of R1(e))uq.call(e,n)&&FB(t,n,e[n]);return t},CLe=(t,e)=>MLe(t,ELe(e)),TLe=(t,e)=>{var n={};for(var r in t)cq.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&R1)for(var r of R1(t))e.indexOf(r)<0&&uq.call(t,r)&&(n[r]=t[r]);return n};const OLe={orientation:"horizontal",loop:!0,activateTabWithKeyboard:!0,allowTabDeactivation:!1,unstyled:!1,inverted:!1,variant:"default",placement:"left"},Qo=M.forwardRef((t,e)=>{const n=nt("Tabs",OLe,t),{defaultValue:r,value:i,orientation:o,loop:s,activateTabWithKeyboard:a,allowTabDeactivation:l,children:c,id:u,onTabChange:d,variant:f,color:h,className:g,unstyled:y,classNames:_,styles:v,radius:x,inverted:w,keepMounted:S,placement:E}=n,C=TLe(n,["defaultValue","value","orientation","loop","activateTabWithKeyboard","allowTabDeactivation","children","id","onTabChange","variant","color","className","unstyled","classNames","styles","radius","inverted","keepMounted","placement"]),{classes:O,cx:R}=SLe({orientation:o,color:h,radius:x,inverted:w,placement:E},{unstyled:y,name:"Tabs",classNames:_,styles:v,variant:f});return H.createElement(lq,{activateTabWithKeyboard:a,defaultValue:r,orientation:o,onTabChange:d,value:i,id:u,loop:s,allowTabDeactivation:l,color:h,variant:f,radius:x,inverted:w,keepMounted:S,placement:E,classNames:_,styles:v,unstyled:y},H.createElement(Xe,CLe(PLe({},C),{className:R(O.root,g),id:u,ref:e}),c))});Qo.List=tq;Qo.Tab=aq;Qo.Panel=iq;Qo.displayName="@mantine/core/Tabs";class fa{constructor(e,n,r){this.name=e,this.makeObject=n,this.cleanup=r,this.children=[],this.clickable=!1}[lT]=!0;children;clickable}const RLe=t=>I.jsx("group",{ref:t,quaternion:new Hn().setFromEuler(new ki(-Math.PI/2,0,0))}),ALe=t=>I.jsx(uT,{ref:t}),dq=new fa("",RLe),DLe=new fa("/WorldAxes",ALe);dq.children.push("/WorldAxes");function ILe(){return H.useState(()=>pG(Pge(vG(t=>({nodeFromName:{"":dq,"/WorldAxes":DLe},labelVisibleFromName:{},setClickable:(e,n)=>t(r=>{const i=r.nodeFromName[e];i!==void 0&&(i.clickable=n)}),addSceneNode:e=>t(n=>{const r=n.nodeFromName[e.name];if(r)n.nodeFromName[e.name]={...e,children:r.children};else{const i=e.name.split("/").slice(0,-1).join("/");n.nodeFromName[e.name]=e,n.nodeFromName[i].children.push(e.name)}}),removeSceneNode:e=>t(n=>{if(!(e in n.nodeFromName)){console.log("Skipping scene node removal for "+e);return}const r=[];function i(s){r.push(s),n.nodeFromName[s].children.forEach(i)}i(e),r.forEach(s=>{delete n.nodeFromName[s]});const o=e.split("/").slice(0,-1).join("/");n.nodeFromName[o].children=n.nodeFromName[o].children.filter(s=>s!==e)}),resetScene:()=>t(e=>{for(const n of Object.keys(e.nodeFromName))n!==""&&n!=="/WorldAxes"&&delete e.nodeFromName[n];e.nodeFromName[""].children=["/WorldAxes"],e.nodeFromName["/WorldAxes"].children=[]}),setLabelVisibility:(e,n)=>t(r=>{r.labelVisibleFromName[e]=n})})))))[0]}function LLe(t){const e=H.useContext(Ui),[n,r]=H.useState([]);return H.useEffect(()=>{let i=!0,o;function s(){const l=e.useSceneTree.getState().nodeFromName[t.name]?.children;l===void 0||n==l||i&&(r(l),i=!1,o=setTimeout(()=>{i=!0,s()},50))}const a=e.useSceneTree.subscribe(l=>l.nodeFromName[t.name],s);return s(),()=>{clearTimeout(o),a()}},[n]),DR(I.jsx("group",{children:n.map(i=>I.jsx(fq,{name:i},i))}),t.parent)}function zB(t){return H.useContext(Ui).useSceneTree(r=>r.labelVisibleFromName[t.name])?I.jsx(Hg,{children:I.jsx(Si,{style:{backgroundColor:"rgba(240, 240, 240, 0.9)",borderRadius:"0.2rem",userSelect:"none"},px:"xs",py:"0.1rem",children:t.name})}):null}function fq(t){const e=H.useContext(Ui),n=e.useSceneTree(h=>h.nodeFromName[t.name]?.makeObject),r=e.useSceneTree(h=>h.nodeFromName[t.name]?.cleanup),i=e.useSceneTree(h=>h.nodeFromName[t.name]?.clickable)??!1,[o,s]=H.useState(null),a=H.useMemo(()=>n&&n(s),[s,n]),l=H.useMemo(()=>o===null?null:I.jsx(LLe,{name:t.name,parent:o}),[t.name,o]);kc(()=>{if(o===null)return;const h=e.nodeAttributesFromName.current[t.name];if(h===void 0)return;const g=h.visibility;g!==void 0&&(o.visible=g);let y=!1;const _=h.wxyz;_!==void 0&&(y=!0,o.quaternion.set(_[1],_[2],_[3],_[0]));const v=h.position;v!==void 0&&(y=!0,o.position.set(v[0],v[1],v[2])),y&&(o.matrixAutoUpdate||o.updateMatrix(),o.matrixWorldAutoUpdate||o.updateMatrixWorld())}),H.useEffect(()=>r);const c=_b(e.websocketRef,50),[u,d]=H.useState(!1);Sue(u),!i&&u&&d(!1);function f(){return e.nodeAttributesFromName.current[t.name]?.visibility??!1}return i?I.jsxs(I.Fragment,{children:[I.jsx("group",{onClick:i?h=>{f()&&(h.stopPropagation(),c({type:"SceneNodeClickedMessage",name:t.name}))}:void 0,onPointerOver:i?h=>{f()&&(h.stopPropagation(),d(!0))}:void 0,onPointerOut:i?()=>{f()&&d(!1)}:void 0,children:I.jsx(Qpe,{enabled:u,children:a})}),I.jsx(zB,{name:t.name}),l]}):I.jsxs(I.Fragment,{children:[a,I.jsx(zB,{name:t.name}),l]})}const hq="websocket";function kLe(t){NLe([t])}function NLe(t){t.length===1&&window.location.host.includes(t[0].replace("ws://","").replace("/",""))&&(t=[]),window.history.replaceState(null,"Viser",t.length===0?window.location.href.split("?")[0]:`?${t.map(e=>`${hq}=${e}`).join("&")}`)}var FLe=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,zLe=BG(function(t){return FLe.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91}),ULe=zLe,BLe=function(e){return e!=="theme"},UB=function(e){return typeof e=="string"&&e.charCodeAt(0)>96?ULe:BLe},BB=function(e,n,r){var i;if(n){var o=n.shouldForwardProp;i=e.__emotion_forwardProp&&o?function(s){return e.__emotion_forwardProp(s)&&o(s)}:o}return typeof i!="function"&&r&&(i=e.__emotion_forwardProp),i},HLe=function(e){var n=e.cache,r=e.serialized,i=e.isStringTag;return XG(n,r,i),L0e(function(){return lA(n,r,i)}),null},VLe=function t(e,n){var r=e.__emotion_real===e,i=r&&e.__emotion_base||e,o,s;n!==void 0&&(o=n.label,s=n.target);var a=BB(e,n,r),l=a||UB(i),c=!l("as");return function(){var u=arguments,d=r&&e.__emotion_styles!==void 0?e.__emotion_styles.slice(0):[];if(o!==void 0&&d.push("label:"+o+";"),u[0]==null||u[0].raw===void 0)d.push.apply(d,u);else{d.push(u[0][0]);for(var f=u.length,h=1;h{n=!0,r&&i&&o(i)},e)):r=!0)}return o}function HB(t){return t!=null&&t.isTexture!==void 0}function VB(t){return new Et(new Float32Array(new Uint8Array(t)).map(e=>(e=e/255,e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4))),3)}function $Le(){const t=M.useContext(Ui),e=t.useSceneTree(f=>f.removeSceneNode),n=t.useSceneTree(f=>f.resetScene),r=t.useSceneTree(f=>f.addSceneNode),i=t.useGui(f=>f.setTheme),o=t.useGui(f=>f.addGui),s=t.useGui(f=>f.removeGui),a=t.useGui(f=>f.setGuiValue),l=t.useGui(f=>f.setGuiVisible),c=t.useGui(f=>f.setGuiDisabled),u=t.useSceneTree(f=>f.setClickable);function d(f){const h=t.useSceneTree.getState().nodeFromName,g=f.name.split("/").slice(0,-1).join("/");g in h||d(new fa(g,y=>I.jsx(uT,{ref:y,show_axes:!1}))),r(f)}return f=>{if(gge(f)){o(f);return}switch(f.type){case"ThemeConfigurationMessage":{i(f);return}case"FrameMessage":{d(new fa(f.name,h=>I.jsx(uT,{ref:h,show_axes:f.show_axes,axes_length:f.axes_length,axes_radius:f.axes_radius})));return}case"PointCloudMessage":{const h=new Jt,g=new CS({size:f.point_size,vertexColors:!0,toneMapped:!1});h.setAttribute("position",new Et(new Float32Array(f.points.buffer.slice(f.points.byteOffset,f.points.byteOffset+f.points.byteLength)),3)),h.computeBoundingSphere(),h.setAttribute("color",VB(f.colors)),d(new fa(f.name,y=>I.jsx("points",{ref:y,geometry:h,material:g}),()=>{h.dispose(),g.dispose()}));return}case"MeshMessage":{const h=new Jt,g=new AS({color:f.color||void 0,vertexColors:f.vertex_colors!==null,wireframe:f.wireframe,side:{front:Vs,back:Vr,double:Hr}[f.side]});h.setAttribute("position",new Et(new Float32Array(f.vertices.buffer.slice(f.vertices.byteOffset,f.vertices.byteOffset+f.vertices.byteLength)),3)),f.vertex_colors!==null&&h.setAttribute("color",VB(f.vertex_colors)),h.setIndex(new _S(new Uint32Array(f.faces.buffer.slice(f.faces.byteOffset,f.faces.byteOffset+f.faces.byteLength)),1)),h.computeVertexNormals(),h.computeBoundingSphere(),d(new fa(f.name,y=>I.jsx("mesh",{ref:y,geometry:h,material:g}),()=>{h.dispose(),g.dispose()}));return}case"CameraFrustumMessage":{const h=f.image_media_type!==null&&f.image_base64_data!==null?new mm().load(`data:${f.image_media_type};base64,${f.image_base64_data}`):void 0,g=f.scale*Math.tan(f.fov/2)*2;d(new fa(f.name,y=>I.jsxs("group",{ref:y,children:[I.jsx(bge,{fov:f.fov,aspect:f.aspect,scale:f.scale,color:f.color}),h&&I.jsxs("mesh",{position:[0,0,f.scale],rotation:new ki(Math.PI,0,0),children:[I.jsx("planeGeometry",{attach:"geometry",args:[f.aspect*g,g]}),I.jsx("meshBasicMaterial",{attach:"material",transparent:!0,side:Hr,map:h})]})]}),()=>h?.dispose()));return}case"TransformControlsMessage":{const h=f.name,g=_b(t.websocketRef,50);d(new fa(f.name,y=>I.jsx(Bde,{ref:y,scale:f.scale,lineWidth:f.line_width,fixed:f.fixed,autoTransform:f.auto_transform,activeAxes:f.active_axes,disableAxes:f.disable_axes,disableSliders:f.disable_sliders,disableRotations:f.disable_rotations,translationLimits:f.translation_limits,rotationLimits:f.rotation_limits,depthTest:f.depth_test,opacity:f.opacity,onDrag:_=>{const v=t.nodeAttributesFromName.current;v[f.name]===void 0&&(v[f.name]={});const x=new Hn;x.setFromRotationMatrix(_);const w=new Z().setFromMatrixPosition(_),S=v[f.name];S.wxyz=[x.w,x.x,x.y,x.z],S.position=w.toArray(),g({type:"TransformControlsUpdateMessage",name:h,wxyz:S.wxyz,position:S.position})}})));return}case"SetCameraLookAtMessage":{const h=t.cameraControlRef.current,g=new Hn;g.setFromEuler(new ki(-Math.PI/2,0,0));const y=new Z(f.look_at[0],f.look_at[1],f.look_at[2]);y.applyQuaternion(g),h.setTarget(y.x,y.y,y.z);return}case"SetCameraUpDirectionMessage":{const h=t.cameraRef.current,g=t.cameraControlRef.current,y=new Hn;y.setFromEuler(new ki(-Math.PI/2,0,0));const _=new Z(f.position[0],f.position[1],f.position[2]).applyQuaternion(y);h.up.set(_.x,_.y,_.z),g.applyCameraUp();return}case"SetCameraPositionMessage":{const h=t.cameraControlRef.current,g=new Z(f.position[0],f.position[1],f.position[2]),y=new Hn;y.setFromEuler(new ki(-Math.PI/2,0,0)),g.applyQuaternion(y),h.setPosition(g.x,g.y,g.z);return}case"SetCameraFovMessage":{const h=t.cameraRef.current;h.setFocalLength(.5*h.getFilmHeight()/Math.tan(f.fov/2));return}case"SetOrientationMessage":{const h=t.nodeAttributesFromName.current;h[f.name]===void 0&&(h[f.name]={}),h[f.name].wxyz=f.wxyz;break}case"SetPositionMessage":{const h=t.nodeAttributesFromName.current;h[f.name]===void 0&&(h[f.name]={}),h[f.name].position=f.position;break}case"SetSceneNodeVisibilityMessage":{const h=t.nodeAttributesFromName.current;h[f.name]===void 0&&(h[f.name]={}),h[f.name].visibility=f.visible;break}case"BackgroundImageMessage":{new mm().load(`data:${f.media_type};base64,${f.base64_data}`,h=>{h.encoding=Nn;const g=t.sceneRef.current?.background;t.sceneRef.current.background=h,HB(g)&&g.dispose(),t.useGui.setState({backgroundAvailable:!0})});return}case"LabelMessage":{const h=LT.span` - background-color: rgba(255, 255, 255, 0.85); - padding: 0.2em; - border-radius: 0.2em; - border: 1px solid #777; - color: #333; - - &:before { - content: ""; - position: absolute; - top: -1em; - left: 1em; - width: 0; - height: 0; - border-left: 1px solid #777; - box-sizing: border-box; - height: 0.8em; - box-shadow: 0 0 1em 0.1em rgba(255, 255, 255, 1); - } - `;d(new fa(f.name,g=>I.jsx("group",{ref:g,children:I.jsx(Hg,{children:I.jsx("div",{style:{width:"10em",fontSize:"0.8em",transform:"translateX(-1em) translateY(1em)"},children:I.jsx(h,{children:f.text})})})})));return}case"ImageMessage":{new mm().load(`data:${f.media_type};base64,${f.base64_data}`,h=>{d(new fa(f.name,g=>I.jsx("group",{ref:g,children:I.jsxs("mesh",{rotation:new ki(Math.PI,0,0),children:[I.jsx("planeGeometry",{attach:"geometry",args:[f.render_width,f.render_height]}),I.jsx("meshBasicMaterial",{attach:"material",transparent:!0,side:Hr,map:h,toneMapped:!1})]})}),()=>h.dispose()))});return}case"RemoveSceneNodeMessage":{console.log("Removing scene node:",f.name),e(f.name);return}case"SetSceneNodeClickableMessage":{u(f.name,f.clickable);return}case"ResetSceneMessage":{n();const h=t.sceneRef.current?.background;t.sceneRef.current.background=null,HB(h)&&h.dispose(),t.useGui.setState({backgroundAvailable:!1});return}case"GuiSetValueMessage":{a(f.id,f.value);return}case"GuiSetVisibleMessage":{l(f.id,f.visible);return}case"GuiSetDisabledMessage":{c(f.id,f.disabled);return}case"GuiRemoveMessage":{s(f.id);return}default:{console.log("Received message did not match any known types:",f);return}}}}function GLe(){const t=M.useContext(Ui),e=$Le(),n=t.useGui(i=>i.server),r=t.useGui(i=>i.resetGui);return kLe(n),H.useEffect(()=>{const i=new pme;let o=null,s=!1;function a(){if(s)return;o=new WebSocket(n);const c=setTimeout(()=>{o?.close()},5e3);o.onopen=()=>{clearTimeout(c),console.log(`Connected!${n}`),t.websocketRef.current=o,t.useGui.setState({websocketConnected:!0})},o.onclose=()=>{console.log(`Disconnected! ${n}`),clearTimeout(c),t.websocketRef.current=null,t.useGui.setState({websocketConnected:!1}),r(),l=setTimeout(a,1e3)};const u=[],d=[];let f=!1;setInterval(()=>{const h=u.length,g=u.slice(0,h);u.splice(0,h),g.forEach(e)},5),o.onmessage=async h=>{const g=new Promise(y=>{h.data.arrayBuffer().then(_=>{y(Sme(new Uint8Array(_)))})});await i.acquireAsync({timeout:1e3}).catch(()=>{console.log("Order lock timed out."),i.release()});try{const y=await g;y.type==="MessageGroupStart"?f=!0:y.type==="MessageGroupEnd"?(u.push(...d),d.length=0,f=!1):f?d.push(y):u.push(y)}finally{i.acquired&&i.release()}}}let l=setTimeout(a,500);return()=>{s=!0,clearTimeout(l),t.useGui.setState({websocketConnected:!1}),o?.close(),clearTimeout(l)}},[n,e,r]),I.jsx(I.Fragment,{})}/*! - * hold-event - * https://github.com/yomotsu/hold-event - * (c) 2020 @yomotsu - * Released under the MIT License. - */var bm;(function(t){t.HOLD_START="holdStart",t.HOLD_END="holdEnd",t.HOLDING="holding"})(bm||(bm={}));class WLe{constructor(){this._listeners={}}addEventListener(e,n){const r=this._listeners;r[e]===void 0&&(r[e]=[]),r[e].indexOf(n)===-1&&r[e].push(n)}removeEventListener(e,n){const i=this._listeners[e];if(i!==void 0){const o=i.indexOf(n);o!==-1&&i.splice(o,1)}}dispatchEvent(e){const r=this._listeners[e.type];if(r!==void 0){e.target=this;const i=r.slice(0);for(let o=0,s=i.length;o{if(!this._enabled||this._holding)return;this._deltaTime=0,this._elapsedTime=0,this._lastTime=performance.now(),this.dispatchEvent({type:bm.HOLD_START,deltaTime:this._deltaTime,elapsedTime:this._elapsedTime,originalEvent:n}),this._holding=!0;const r=()=>{this._intervalId=this.holdIntervalDelay?window.setTimeout(r,this.holdIntervalDelay):window.requestAnimationFrame(r);const i=performance.now();this._deltaTime=i-this._lastTime,this._elapsedTime+=this._deltaTime,this._lastTime=performance.now(),this.dispatchEvent({type:bm.HOLDING,deltaTime:this._deltaTime,elapsedTime:this._elapsedTime,originalEvent:n})};this._intervalId=this.holdIntervalDelay?window.setTimeout(r,this.holdIntervalDelay):window.requestAnimationFrame(r)},this._holdEnd=n=>{if(!this._enabled||!this._holding)return;const r=performance.now();this._deltaTime=r-this._lastTime,this._elapsedTime+=this._deltaTime,this._lastTime=performance.now(),this.dispatchEvent({type:bm.HOLD_END,deltaTime:this._deltaTime,elapsedTime:this._elapsedTime,originalEvent:n}),window.clearTimeout(this._intervalId),window.cancelAnimationFrame(this._intervalId),this._holding=!1},this.holdIntervalDelay=e}get enabled(){return this._enabled}set enabled(e){this._enabled!==e&&(this._enabled=e,this._enabled||this._holdEnd())}}class jl extends YLe{constructor(e,n){super(n),this._holdStart=this._holdStart.bind(this),this._holdEnd=this._holdEnd.bind(this);const r=o=>{XLe(o)||o.keyCode===e&&this._holdStart(o)},i=o=>{o.keyCode===e&&this._holdEnd(o)};document.addEventListener("keydown",r),document.addEventListener("keyup",i),window.addEventListener("blur",this._holdEnd)}}function XLe(t){const e=t.target;return e.tagName==="INPUT"||e.tagName==="SELECT"||e.tagName==="TEXTAREA"||e.isContentEditable}function ZLe(){const t=M.useContext(Ui),e=dn(o=>o.camera),n=_b(t.websocketRef,20),r=H.useCallback(()=>{const o=e,s=t.cameraControlRef.current;if(s===null){setTimeout(r,10);return}const a=new Hn,l=new Hn;a.setFromEuler(new ki(Math.PI,0,0)),l.setFromEuler(new ki(Math.PI/2,0,0));const c=l.clone().multiply(o.quaternion).multiply(a),u=s.getTarget(new Z).applyQuaternion(l),d=o.up.clone().applyQuaternion(l);n({type:"ViewerCameraMessage",wxyz:[c.w,c.x,c.y,c.z],position:o.position.clone().applyQuaternion(l).toArray(),aspect:o.aspect,fov:o.fov*Math.PI/180,look_at:[u.x,u.y,u.z],up_direction:[d.x,d.y,d.z]})},[e,n]),i=t.useGui(o=>o.websocketConnected);return H.useEffect(()=>{i&&setTimeout(()=>r(),50)},[i,r]),H.useEffect(()=>(window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r)}),[e]),H.useEffect(()=>{const o={W:87,A:65,S:83,D:68,ARROW_LEFT:37,ARROW_UP:38,ARROW_RIGHT:39,ARROW_DOWN:40},s=t.cameraControlRef.current,a=new jl(o.W,20),l=new jl(o.A,20),c=new jl(o.S,20),u=new jl(o.D,20);l.addEventListener("holding",y=>{s.truck(-.002*y?.deltaTime,0,!1)}),u.addEventListener("holding",y=>{s.truck(.002*y?.deltaTime,0,!1)}),a.addEventListener("holding",y=>{s.forward(.002*y?.deltaTime,!1)}),c.addEventListener("holding",y=>{s.forward(-.002*y?.deltaTime,!1)});const d=new jl(o.ARROW_LEFT,20),f=new jl(o.ARROW_RIGHT,20),h=new jl(o.ARROW_UP,20),g=new jl(o.ARROW_DOWN,20);d.addEventListener("holding",y=>{s.rotate(-.1*Pu.DEG2RAD*y?.deltaTime,0,!0)}),f.addEventListener("holding",y=>{s.rotate(.1*Pu.DEG2RAD*y?.deltaTime,0,!0)}),h.addEventListener("holding",y=>{s.rotate(0,-.05*Pu.DEG2RAD*y?.deltaTime,!0)}),g.addEventListener("holding",y=>{s.rotate(0,.05*Pu.DEG2RAD*y?.deltaTime,!0)})}),I.jsx(Xue,{ref:t.cameraControlRef,minDistance:.1,maxDistance:200,dollySpeed:.3,smoothTime:0,draggingSmoothTime:0,onChange:r,makeDefault:!0})}function qLe(){const e=H.useContext(Ui).useGui(r=>r.guiConfigFromId),n={inputs:[],subfolders:{}};return[...Object.keys(e)].sort((r,i)=>e[r].order-e[i].order).forEach(r=>{const i=e[r];let o=n;i.folder_labels.forEach(s=>{o.subfolders[s]===void 0&&(o.subfolders[s]={inputs:[],subfolders:{}}),o=o.subfolders[s]}),o.inputs.push(i)}),I.jsx(I.Fragment,{children:I.jsx(pq,{folder:n})})}function pq({folder:t}){return I.jsxs(vb,{spacing:"xs",pt:"0.25rem",children:[t.inputs.map(e=>I.jsx(KLe,{conf:e},e.id)),I.jsx(tc,{chevronPosition:"right",multiple:!0,defaultValue:[...Object.keys(t.subfolders)],styles:e=>({label:{padding:"0.625rem 0.2rem"},item:{border:0},control:{paddingLeft:0},content:{borderLeft:"1px solid",borderLeftColor:e.colorScheme==="light"?e.colors.gray[3]:e.colors.dark[5],paddingRight:"0",paddingLeft:"0.5rem",paddingBottom:0,paddingTop:0,marginBottom:"0.5rem",marginLeft:"0.05rem"}}),children:Object.keys(t.subfolders).map(e=>I.jsxs(tc.Item,{value:e,children:[I.jsx(tc.Control,{children:e}),I.jsx(tc.Panel,{children:I.jsx(pq,{folder:t.subfolders[e]})})]},e))})]})}function KLe({conf:t}){const e=H.useContext(Ui),n=_b(e.websocketRef,50);function r(u){i(t.id,u),n({type:"GuiUpdateMessage",id:t.id,value:u})}const i=e.useGui(u=>u.setGuiValue),o=e.useGui(u=>u.guiValueFromId[t.id])??t.initial_value;let{visible:s,disabled:a}=e.useGui(u=>u.guiAttributeFromId[t.id])||{};if(s=s??!0,a=a??!1,!s)return I.jsx(I.Fragment,{});let l=!0,c=null;switch(t.type){case"GuiAddButtonMessage":l=!1,c=I.jsx(Ds,{id:t.id,fullWidth:!0,onClick:()=>n({type:"GuiUpdateMessage",id:t.id,value:!0}),style:{height:"1.875rem"},disabled:a,size:"sm",children:t.label});break;case"GuiAddSliderMessage":c=I.jsxs(er,{justify:"space-between",children:[I.jsxs(Xe,{sx:{flexGrow:1},children:[I.jsx(HZ,{id:t.id,size:"sm",pt:"0.3rem",showLabelOnHover:!1,min:t.min,max:t.max,step:t.step??void 0,precision:t.precision,value:o,onChange:r,marks:[{value:t.min},{value:t.max}],disabled:a}),I.jsxs(er,{justify:"space-between",sx:{marginTop:"-0.2em"},children:[I.jsx(Si,{fz:"0.7rem",c:"dimmed",children:t.min}),I.jsx(Si,{fz:"0.7rem",c:"dimmed",children:t.max})]})]}),I.jsx(f1,{value:o,onChange:r,size:"xs",min:t.min,max:t.max,hideControls:!0,step:t.step??void 0,precision:t.precision,sx:{width:"3rem",height:"1rem",minHeight:"1rem"},styles:{input:{padding:"0.3rem"}},ml:"xs"})]});break;case"GuiAddNumberMessage":c=I.jsx(f1,{id:t.id,value:o??t.initial_value,precision:t.precision,min:t.min??void 0,max:t.max??void 0,step:t.step,size:"xs",onChange:r,disabled:a,stepHoldDelay:500,stepHoldInterval:u=>Math.max(1e3/u**2,25)});break;case"GuiAddTextMessage":c=I.jsx(Pc,{value:o??t.initial_value,size:"xs",onChange:u=>{r(u.target.value)},disabled:a});break;case"GuiAddCheckboxMessage":c=I.jsx(nv,{id:t.id,checked:o??t.initial_value,size:"xs",onChange:u=>{r(u.target.checked)},disabled:a});break;case"GuiAddVector2Message":c=I.jsx(jB,{id:t.id,n:2,value:o??t.initial_value,onChange:r,min:t.min,max:t.max,step:t.step,precision:t.precision,disabled:a});break;case"GuiAddVector3Message":c=I.jsx(jB,{id:t.id,n:3,value:o??t.initial_value,onChange:r,min:t.min,max:t.max,step:t.step,precision:t.precision,disabled:a});break;case"GuiAddDropdownMessage":c=I.jsx(iv,{id:t.id,value:o,data:t.options,onChange:r,searchable:!0,maxDropdownHeight:400});break;case"GuiAddRgbMessage":c=I.jsx(OT,{disabled:a,size:"xs",value:JLe(o),onChange:u=>r(eke(u)),format:"hex"});break;case"GuiAddRgbaMessage":c=I.jsx(OT,{disabled:a,size:"xs",value:tke(o),onChange:u=>r(nke(u)),format:"hexa"});break;case"GuiAddButtonGroupMessage":c=I.jsx(er,{justify:"space-between",columnGap:"xs",children:t.options.map((u,d)=>I.jsx(Ds,{onClick:()=>n({type:"GuiUpdateMessage",id:t.id,value:u}),style:{flexGrow:1,width:0},disabled:a,compact:!0,size:"sm",variant:"outline",children:u},d))})}return t.hint!==null&&(c=I.jsx(tr,{label:t.hint,multiline:!0,w:"15rem",withArrow:!0,openDelay:500,children:I.jsx(Xe,{children:c})})),l?I.jsx(QLe,{id:t.id,label:t.label,input:c}):c}function jB(t){return I.jsx(er,{justify:"space-between",style:{columnGap:"0.3rem"},children:[...Array(t.n).keys()].map(e=>I.jsx(f1,{id:e===0?t.id:void 0,value:t.value[e],onChange:n=>{const r=[...t.value];r[e]=n===""?0:n,t.onChange(r)},size:"xs",styles:{root:{flexGrow:1,width:0},input:{paddingLeft:"0.3rem",paddingRight:"1.1rem",textAlign:"right"},rightSection:{width:"1.0rem"},control:{width:"0.875rem"}},precision:t.precision,step:t.step,min:t.min===null?void 0:t.min[e],max:t.max===null?void 0:t.max[e],stepHoldDelay:500,stepHoldInterval:n=>Math.max(1e3/n**2,25),disabled:t.disabled},e))})}function QLe(t){return I.jsxs(er,{align:"center",children:[I.jsx(Xe,{w:"6em",pr:"xs",children:I.jsx(Si,{c:"dimmed",fz:"sm",lh:"1.15em",unselectable:"off",sx:{wordWrap:"break-word"},children:I.jsxs("label",{htmlFor:t.id,children:[" ",t.label]})})}),I.jsx(Xe,{sx:{flexGrow:1},children:t.input})]})}function JLe([t,e,n]){const r=t.toString(16).padStart(2,"0"),i=e.toString(16).padStart(2,"0"),o=n.toString(16).padStart(2,"0");return`#${r}${i}${o}`}function eke(t){const e=t.slice(1),n=parseInt(e.substring(0,2),16),r=parseInt(e.substring(2,4),16),i=parseInt(e.substring(4,6),16);return[n,r,i]}function tke([t,e,n,r]){const i=t.toString(16).padStart(2,"0"),o=e.toString(16).padStart(2,"0"),s=n.toString(16).padStart(2,"0"),a=r.toString(16).padStart(2,"0");return`#${i}${o}${s}${a}`}function nke(t){const e=t.slice(1),n=parseInt(e.substring(0,2),16),r=parseInt(e.substring(2,4),16),i=parseInt(e.substring(4,6),16),o=parseInt(e.substring(6,8),16);return[n,r,i,o]}var rke={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"},ike=Object.defineProperty,oke=Object.defineProperties,ske=Object.getOwnPropertyDescriptors,A1=Object.getOwnPropertySymbols,mq=Object.prototype.hasOwnProperty,gq=Object.prototype.propertyIsEnumerable,$B=(t,e,n)=>e in t?ike(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,GB=(t,e)=>{for(var n in e||(e={}))mq.call(e,n)&&$B(t,n,e[n]);if(A1)for(var n of A1(e))gq.call(e,n)&&$B(t,n,e[n]);return t},ake=(t,e)=>oke(t,ske(e)),lke=(t,e)=>{var n={};for(var r in t)mq.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&A1)for(var r of A1(t))e.indexOf(r)<0&&gq.call(t,r)&&(n[r]=t[r]);return n},nn=(t,e,n)=>{const r=M.forwardRef((i,o)=>{var s=i,{color:a="currentColor",size:l=24,stroke:c=2,children:u}=s,d=lke(s,["color","size","stroke","children"]);return M.createElement("svg",GB(ake(GB({ref:o},rke),{width:l,height:l,stroke:a,strokeWidth:c,className:`tabler-icon tabler-icon-${t}`}),d),[...n.map(([f,h])=>M.createElement(f,h)),...u||[]])});return r.propTypes={color:Jo.string,size:Jo.oneOfType([Jo.string,Jo.number]),stroke:Jo.oneOfType([Jo.string,Jo.number])},r.displayName=`${e}`,r},cke=nn("adjustments","IconAdjustments",[["path",{d:"M4 10a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M6 4v4",key:"svg-1"}],["path",{d:"M6 12v8",key:"svg-2"}],["path",{d:"M10 16a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-3"}],["path",{d:"M12 4v10",key:"svg-4"}],["path",{d:"M12 18v2",key:"svg-5"}],["path",{d:"M16 7a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-6"}],["path",{d:"M18 4v1",key:"svg-7"}],["path",{d:"M18 9v11",key:"svg-8"}]]),uke=nn("arrow-autofit-content","IconArrowAutofitContent",[["path",{d:"M6 4l-3 3l3 3",key:"svg-0"}],["path",{d:"M18 4l3 3l-3 3",key:"svg-1"}],["path",{d:"M4 14m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z",key:"svg-2"}],["path",{d:"M10 7h-7",key:"svg-3"}],["path",{d:"M21 7h-7",key:"svg-4"}]]),dke=nn("arrows-sort","IconArrowsSort",[["path",{d:"M3 9l4 -4l4 4m-4 -4v14",key:"svg-0"}],["path",{d:"M21 15l-4 4l-4 -4m4 4v-14",key:"svg-1"}]]),fke=nn("baseline-density-large","IconBaselineDensityLarge",[["path",{d:"M4 4h16",key:"svg-0"}],["path",{d:"M4 20h16",key:"svg-1"}]]),hke=nn("baseline-density-medium","IconBaselineDensityMedium",[["path",{d:"M4 20h16",key:"svg-0"}],["path",{d:"M4 12h16",key:"svg-1"}],["path",{d:"M4 4h16",key:"svg-2"}]]),pke=nn("baseline-density-small","IconBaselineDensitySmall",[["path",{d:"M4 3h16",key:"svg-0"}],["path",{d:"M4 9h16",key:"svg-1"}],["path",{d:"M4 15h16",key:"svg-2"}],["path",{d:"M4 21h16",key:"svg-3"}]]),mke=nn("binary-tree-2","IconBinaryTree2",[["path",{d:"M14 6a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z",key:"svg-0"}],["path",{d:"M7 14a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z",key:"svg-1"}],["path",{d:"M21 14a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z",key:"svg-2"}],["path",{d:"M14 18a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z",key:"svg-3"}],["path",{d:"M12 8v8",key:"svg-4"}],["path",{d:"M6.316 12.496l4.368 -4.992",key:"svg-5"}],["path",{d:"M17.684 12.496l-4.366 -4.99",key:"svg-6"}]]),gke=nn("box-multiple","IconBoxMultiple",[["path",{d:"M7 3m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M17 17v2a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-10a2 2 0 0 1 2 -2h2",key:"svg-1"}]]),vke=nn("brand-github","IconBrandGithub",[["path",{d:"M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5",key:"svg-0"}]]),vq=nn("caret-down","IconCaretDown",[["path",{d:"M6 10l6 6l6 -6h-12",key:"svg-0"}]]),yke=nn("caret-right","IconCaretRight",[["path",{d:"M10 18l6 -6l-6 -6v12",key:"svg-0"}]]),_ke=nn("caret-up","IconCaretUp",[["path",{d:"M18 14l-6 -6l-6 6h12",key:"svg-0"}]]),xke=nn("chevron-down","IconChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]),wke=nn("chevron-left","IconChevronLeft",[["path",{d:"M15 6l-6 6l6 6",key:"svg-0"}]]),Ske=nn("chevron-right","IconChevronRight",[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]]),bke=nn("chevrons-down","IconChevronsDown",[["path",{d:"M7 7l5 5l5 -5",key:"svg-0"}],["path",{d:"M7 13l5 5l5 -5",key:"svg-1"}]]),Mke=nn("circle-x","IconCircleX",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M10 10l4 4m0 -4l-4 4",key:"svg-1"}]]),Eke=nn("clear-all","IconClearAll",[["path",{d:"M8 6h12",key:"svg-0"}],["path",{d:"M6 12h12",key:"svg-1"}],["path",{d:"M4 18h12",key:"svg-2"}]]),Pke=nn("cloud-check","IconCloudCheck",[["path",{d:"M11 18.004h-4.343c-2.572 -.004 -4.657 -2.011 -4.657 -4.487c0 -2.475 2.085 -4.482 4.657 -4.482c.393 -1.762 1.794 -3.2 3.675 -3.773c1.88 -.572 3.956 -.193 5.444 1c1.488 1.19 2.162 3.007 1.77 4.769h.99c1.388 0 2.585 .82 3.138 2.007",key:"svg-0"}],["path",{d:"M15 19l2 2l4 -4",key:"svg-1"}]]),Cke=nn("cloud-off","IconCloudOff",[["path",{d:"M9.58 5.548c.24 -.11 .492 -.207 .752 -.286c1.88 -.572 3.956 -.193 5.444 1c1.488 1.19 2.162 3.007 1.77 4.769h.99c1.913 0 3.464 1.56 3.464 3.486c0 .957 -.383 1.824 -1.003 2.454m-2.997 1.033h-11.343c-2.572 -.004 -4.657 -2.011 -4.657 -4.487c0 -2.475 2.085 -4.482 4.657 -4.482c.13 -.582 .37 -1.128 .7 -1.62",key:"svg-0"}],["path",{d:"M3 3l18 18",key:"svg-1"}]]),Tke=nn("columns","IconColumns",[["path",{d:"M4 6l5.5 0",key:"svg-0"}],["path",{d:"M4 10l5.5 0",key:"svg-1"}],["path",{d:"M4 14l5.5 0",key:"svg-2"}],["path",{d:"M4 18l5.5 0",key:"svg-3"}],["path",{d:"M14.5 6l5.5 0",key:"svg-4"}],["path",{d:"M14.5 10l5.5 0",key:"svg-5"}],["path",{d:"M14.5 14l5.5 0",key:"svg-6"}],["path",{d:"M14.5 18l5.5 0",key:"svg-7"}]]),Oke=nn("device-floppy","IconDeviceFloppy",[["path",{d:"M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2",key:"svg-0"}],["path",{d:"M12 14m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-1"}],["path",{d:"M14 4l0 4l-6 0l0 -4",key:"svg-2"}]]),Rke=nn("dots-vertical","IconDotsVertical",[["path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]]),Ake=nn("dots","IconDots",[["path",{d:"M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]]),Dke=nn("edit","IconEdit",[["path",{d:"M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1",key:"svg-0"}],["path",{d:"M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415z",key:"svg-1"}],["path",{d:"M16 5l3 3",key:"svg-2"}]]),kT=nn("eye-off","IconEyeOff",[["path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828",key:"svg-0"}],["path",{d:"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87",key:"svg-1"}],["path",{d:"M3 3l18 18",key:"svg-2"}]]),WB=nn("eye","IconEye",[["path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6",key:"svg-1"}]]),Ike=nn("file-description","IconFileDescription",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M9 17h6",key:"svg-2"}],["path",{d:"M9 13h6",key:"svg-3"}]]),Lke=nn("filter-off","IconFilterOff",[["path",{d:"M8 4h12v2.172a2 2 0 0 1 -.586 1.414l-3.914 3.914m-.5 3.5v4l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227",key:"svg-0"}],["path",{d:"M3 3l18 18",key:"svg-1"}]]),kke=nn("filter","IconFilter",[["path",{d:"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z",key:"svg-0"}]]),Nke=nn("grip-horizontal","IconGripHorizontal",[["path",{d:"M5 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M5 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M12 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}],["path",{d:"M12 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-3"}],["path",{d:"M19 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-4"}],["path",{d:"M19 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-5"}]]),Fke=nn("keyboard","IconKeyboard",[["path",{d:"M2 6m0 2a2 2 0 0 1 2 -2h16a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-16a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M6 10l0 .01",key:"svg-1"}],["path",{d:"M10 10l0 .01",key:"svg-2"}],["path",{d:"M14 10l0 .01",key:"svg-3"}],["path",{d:"M18 10l0 .01",key:"svg-4"}],["path",{d:"M6 14l0 .01",key:"svg-5"}],["path",{d:"M18 14l0 .01",key:"svg-6"}],["path",{d:"M10 14l4 .01",key:"svg-7"}]]),yq=nn("maximize","IconMaximize",[["path",{d:"M4 8v-2a2 2 0 0 1 2 -2h2",key:"svg-0"}],["path",{d:"M4 16v2a2 2 0 0 0 2 2h2",key:"svg-1"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v2",key:"svg-2"}],["path",{d:"M16 20h2a2 2 0 0 0 2 -2v-2",key:"svg-3"}]]),zke=nn("minimize","IconMinimize",[["path",{d:"M15 19v-2a2 2 0 0 1 2 -2h2",key:"svg-0"}],["path",{d:"M15 5v2a2 2 0 0 0 2 2h2",key:"svg-1"}],["path",{d:"M5 15h2a2 2 0 0 1 2 2v2",key:"svg-2"}],["path",{d:"M5 9h2a2 2 0 0 0 2 -2v-2",key:"svg-3"}]]),Uke=nn("photo","IconPhoto",[["path",{d:"M15 8h.01",key:"svg-0"}],["path",{d:"M3 6a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3v-12z",key:"svg-1"}],["path",{d:"M3 16l5 -5c.928 -.893 2.072 -.893 3 0l5 5",key:"svg-2"}],["path",{d:"M14 14l1 -1c.928 -.893 2.072 -.893 3 0l3 3",key:"svg-3"}]]),Bke=nn("pinned-off","IconPinnedOff",[["path",{d:"M3 3l18 18",key:"svg-0"}],["path",{d:"M15 4.5l-3.249 3.249m-2.57 1.433l-2.181 .818l-1.5 1.5l7 7l1.5 -1.5l.82 -2.186m1.43 -2.563l3.25 -3.251",key:"svg-1"}],["path",{d:"M9 15l-4.5 4.5",key:"svg-2"}],["path",{d:"M14.5 4l5.5 5.5",key:"svg-3"}]]),Hke=nn("pinned","IconPinned",[["path",{d:"M9 4v6l-2 4v2h10v-2l-2 -4v-6",key:"svg-0"}],["path",{d:"M12 16l0 5",key:"svg-1"}],["path",{d:"M8 4l8 0",key:"svg-2"}]]),Vke=nn("search-off","IconSearchOff",[["path",{d:"M5.039 5.062a7 7 0 0 0 9.91 9.89m1.584 -2.434a7 7 0 0 0 -9.038 -9.057",key:"svg-0"}],["path",{d:"M3 3l18 18",key:"svg-1"}]]),jke=nn("search","IconSearch",[["path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}]]),$ke=nn("sort-ascending","IconSortAscending",[["path",{d:"M4 6l7 0",key:"svg-0"}],["path",{d:"M4 12l7 0",key:"svg-1"}],["path",{d:"M4 18l9 0",key:"svg-2"}],["path",{d:"M15 9l3 -3l3 3",key:"svg-3"}],["path",{d:"M18 6l0 12",key:"svg-4"}]]),Gke=nn("sort-descending","IconSortDescending",[["path",{d:"M4 6l9 0",key:"svg-0"}],["path",{d:"M4 12l7 0",key:"svg-1"}],["path",{d:"M4 18l7 0",key:"svg-2"}],["path",{d:"M15 15l3 3l3 -3",key:"svg-3"}],["path",{d:"M18 6l0 12",key:"svg-4"}]]),Wke=nn("tool","IconTool",[["path",{d:"M7 10h3v-3l-3.5 -3.5a6 6 0 0 1 8 8l6 6a2 2 0 0 1 -3 3l-6 -6a6 6 0 0 1 -8 -8l3.5 3.5",key:"svg-0"}]]),Yke=nn("x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);/** + */var fi=typeof Symbol=="function"&&Symbol.for,QR=fi?Symbol.for("react.element"):60103,JR=fi?Symbol.for("react.portal"):60106,WS=fi?Symbol.for("react.fragment"):60107,YS=fi?Symbol.for("react.strict_mode"):60108,XS=fi?Symbol.for("react.profiler"):60114,ZS=fi?Symbol.for("react.provider"):60109,qS=fi?Symbol.for("react.context"):60110,eA=fi?Symbol.for("react.async_mode"):60111,KS=fi?Symbol.for("react.concurrent_mode"):60111,QS=fi?Symbol.for("react.forward_ref"):60112,JS=fi?Symbol.for("react.suspense"):60113,Ove=fi?Symbol.for("react.suspense_list"):60120,eb=fi?Symbol.for("react.memo"):60115,tb=fi?Symbol.for("react.lazy"):60116,Rve=fi?Symbol.for("react.block"):60121,Ave=fi?Symbol.for("react.fundamental"):60117,Dve=fi?Symbol.for("react.responder"):60118,Ive=fi?Symbol.for("react.scope"):60119;function Fo(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case QR:switch(t=t.type,t){case eA:case KS:case WS:case XS:case YS:case JS:return t;default:switch(t=t&&t.$$typeof,t){case qS:case QS:case tb:case eb:case ZS:return t;default:return e}}case JR:return e}}}function NG(t){return Fo(t)===KS}Wn.AsyncMode=eA;Wn.ConcurrentMode=KS;Wn.ContextConsumer=qS;Wn.ContextProvider=ZS;Wn.Element=QR;Wn.ForwardRef=QS;Wn.Fragment=WS;Wn.Lazy=tb;Wn.Memo=eb;Wn.Portal=JR;Wn.Profiler=XS;Wn.StrictMode=YS;Wn.Suspense=JS;Wn.isAsyncMode=function(t){return NG(t)||Fo(t)===eA};Wn.isConcurrentMode=NG;Wn.isContextConsumer=function(t){return Fo(t)===qS};Wn.isContextProvider=function(t){return Fo(t)===ZS};Wn.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===QR};Wn.isForwardRef=function(t){return Fo(t)===QS};Wn.isFragment=function(t){return Fo(t)===WS};Wn.isLazy=function(t){return Fo(t)===tb};Wn.isMemo=function(t){return Fo(t)===eb};Wn.isPortal=function(t){return Fo(t)===JR};Wn.isProfiler=function(t){return Fo(t)===XS};Wn.isStrictMode=function(t){return Fo(t)===YS};Wn.isSuspense=function(t){return Fo(t)===JS};Wn.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===WS||t===KS||t===XS||t===YS||t===JS||t===Ove||typeof t=="object"&&t!==null&&(t.$$typeof===tb||t.$$typeof===eb||t.$$typeof===ZS||t.$$typeof===qS||t.$$typeof===QS||t.$$typeof===Ave||t.$$typeof===Dve||t.$$typeof===Ive||t.$$typeof===Rve)};Wn.typeOf=Fo;kG.exports=Wn;var Lve=kG.exports,FG=Lve,kve={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Nve={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},zG={};zG[FG.ForwardRef]=kve;zG[FG.Memo]=Nve;var Fve=!0;function UG(t,e,n){var r="";return n.split(" ").forEach(function(i){t[i]!==void 0?e.push(t[i]+";"):r+=i+" "}),r}var BG=function(e,n,r){var i=e.key+"-"+n.name;(r===!1||Fve===!1)&&e.registered[i]===void 0&&(e.registered[i]=n.styles)},tA=function(e,n,r){BG(e,n,r);var i=e.key+"-"+n.name;if(e.inserted[n.name]===void 0){var o=n;do e.insert(n===o?"."+i:"",o,e.sheet,!0),o=o.next;while(o!==void 0)}};function zve(t){for(var e=0,n,r=0,i=t.length;i>=4;++r,i-=4)n=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(r+2)&255)<<16;case 2:e^=(t.charCodeAt(r+1)&255)<<8;case 1:e^=t.charCodeAt(r)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var Uve={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Bve=/[A-Z]|^ms/g,Hve=/_EMO_([^_]+?)_([^]*?)_EMO_/g,HG=function(e){return e.charCodeAt(1)===45},wF=function(e){return e!=null&&typeof e!="boolean"},mP=DG(function(t){return HG(t)?t:t.replace(Bve,"-$&").toLowerCase()}),SF=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(Hve,function(r,i,o){return ma={name:i,styles:o,next:ma},i})}return Uve[e]!==1&&!HG(e)&&typeof n=="number"&&n!==0?n+"px":n};function fg(t,e,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return ma={name:n.name,styles:n.styles,next:ma},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)ma={name:r.name,styles:r.styles,next:ma},r=r.next;var i=n.styles+";";return i}return Vve(t,e,n)}case"function":{if(t!==void 0){var o=ma,s=n(t);return ma=o,fg(t,e,s)}break}}if(e==null)return n;var a=e[n];return a!==void 0?a:n}function Vve(t,e,n){var r="";if(Array.isArray(n))for(var i=0;ie in t?Xve(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Jve=(t,e)=>{for(var n in e||(e={}))Kve.call(e,n)&&PF(t,n,e[n]);if(EF)for(var n of EF(e))Qve.call(e,n)&&PF(t,n,e[n]);return t},e0e=(t,e)=>Zve(t,qve(e));function t0e({theme:t}){return H.createElement(qg,{styles:{"*, *::before, *::after":{boxSizing:"border-box"},html:{colorScheme:t.colorScheme==="dark"?"dark":"light"},body:e0e(Jve({},t.fn.fontStyles()),{backgroundColor:t.colorScheme==="dark"?t.colors.dark[7]:t.white,color:t.colorScheme==="dark"?t.colors.dark[0]:t.black,lineHeight:t.lineHeight,fontSize:t.fontSizes.md,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"})}})}function kp(t,e,n,r=X){Object.keys(e).forEach(i=>{t[`--mantine-${n}-${i}`]=r(e[i])})}function n0e({theme:t}){const e={"--mantine-color-white":t.white,"--mantine-color-black":t.black,"--mantine-transition-timing-function":t.transitionTimingFunction,"--mantine-line-height":`${t.lineHeight}`,"--mantine-font-family":t.fontFamily,"--mantine-font-family-monospace":t.fontFamilyMonospace,"--mantine-font-family-headings":t.headings.fontFamily,"--mantine-heading-font-weight":`${t.headings.fontWeight}`};kp(e,t.shadows,"shadow"),kp(e,t.fontSizes,"font-size"),kp(e,t.radius,"radius"),kp(e,t.spacing,"spacing"),kp(e,t.breakpoints,"breakpoints",ls),Object.keys(t.colors).forEach(r=>{t.colors[r].forEach((i,o)=>{e[`--mantine-color-${r}-${o}`]=i})});const n=t.headings.sizes;return Object.keys(n).forEach(r=>{e[`--mantine-${r}-font-size`]=n[r].fontSize,e[`--mantine-${r}-line-height`]=`${n[r].lineHeight}`}),H.createElement(qg,{styles:{":root":e}})}var r0e=Object.defineProperty,i0e=Object.defineProperties,o0e=Object.getOwnPropertyDescriptors,CF=Object.getOwnPropertySymbols,s0e=Object.prototype.hasOwnProperty,a0e=Object.prototype.propertyIsEnumerable,TF=(t,e,n)=>e in t?r0e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,la=(t,e)=>{for(var n in e||(e={}))s0e.call(e,n)&&TF(t,n,e[n]);if(CF)for(var n of CF(e))a0e.call(e,n)&&TF(t,n,e[n]);return t},gP=(t,e)=>i0e(t,o0e(e));function l0e(t,e){var n;if(!e)return t;const r=Object.keys(t).reduce((i,o)=>{if(o==="headings"&&e.headings){const s=e.headings.sizes?Object.keys(t.headings.sizes).reduce((a,l)=>(a[l]=la(la({},t.headings.sizes[l]),e.headings.sizes[l]),a),{}):t.headings.sizes;return gP(la({},i),{headings:gP(la(la({},t.headings),e.headings),{sizes:s})})}if(o==="breakpoints"&&e.breakpoints){const s=la(la({},t.breakpoints),e.breakpoints);return gP(la({},i),{breakpoints:Object.fromEntries(Object.entries(s).sort((a,l)=>js(a[1])-js(l[1])))})}return i[o]=typeof e[o]=="object"?la(la({},t[o]),e[o]):typeof e[o]=="number"||typeof e[o]=="boolean"||typeof e[o]=="function"?e[o]:e[o]||t[o],i},{});if(e?.fontFamily&&!((n=e?.headings)!=null&&n.fontFamily)&&(r.headings.fontFamily=e.fontFamily),!(r.primaryColor in r.colors))throw new Error("MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color");return r}function c0e(t,e){return EG(l0e(t,e))}function WG(t){return Object.keys(t).reduce((e,n)=>(t[n]!==void 0&&(e[n]=t[n]),e),{})}const u0e={html:{fontFamily:"sans-serif",lineHeight:"1.15",textSizeAdjust:"100%"},body:{margin:0},"article, aside, footer, header, nav, section, figcaption, figure, main":{display:"block"},h1:{fontSize:"2em"},hr:{boxSizing:"content-box",height:0,overflow:"visible"},pre:{fontFamily:"monospace, monospace",fontSize:"1em"},a:{background:"transparent",textDecorationSkip:"objects"},"a:active, a:hover":{outlineWidth:0},"abbr[title]":{borderBottom:"none",textDecoration:"underline"},"b, strong":{fontWeight:"bolder"},"code, kbp, samp":{fontFamily:"monospace, monospace",fontSize:"1em"},dfn:{fontStyle:"italic"},mark:{backgroundColor:"#ff0",color:"#000"},small:{fontSize:"80%"},"sub, sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sup:{top:"-0.5em"},sub:{bottom:"-0.25em"},"audio, video":{display:"inline-block"},"audio:not([controls])":{display:"none",height:0},img:{borderStyle:"none",verticalAlign:"middle"},"svg:not(:root)":{overflow:"hidden"},"button, input, optgroup, select, textarea":{fontFamily:"sans-serif",fontSize:"100%",lineHeight:"1.15",margin:0},"button, input":{overflow:"visible"},"button, select":{textTransform:"none"},"button, [type=reset], [type=submit]":{WebkitAppearance:"button"},"button::-moz-focus-inner, [type=button]::-moz-focus-inner, [type=reset]::-moz-focus-inner, [type=submit]::-moz-focus-inner":{borderStyle:"none",padding:0},"button:-moz-focusring, [type=button]:-moz-focusring, [type=reset]:-moz-focusring, [type=submit]:-moz-focusring":{outline:`${X(1)} dotted ButtonText`},legend:{boxSizing:"border-box",color:"inherit",display:"table",maxWidth:"100%",padding:0,whiteSpace:"normal"},progress:{display:"inline-block",verticalAlign:"baseline"},textarea:{overflow:"auto"},"[type=checkbox], [type=radio]":{boxSizing:"border-box",padding:0},"[type=number]::-webkit-inner-spin-button, [type=number]::-webkit-outer-spin-button":{height:"auto"},"[type=search]":{appearance:"none"},"[type=search]::-webkit-search-cancel-button, [type=search]::-webkit-search-decoration":{appearance:"none"},"::-webkit-file-upload-button":{appearance:"button",font:"inherit"},"details, menu":{display:"block"},summary:{display:"list-item"},canvas:{display:"inline-block"},template:{display:"none"}};function d0e(){return H.createElement(qg,{styles:u0e})}var f0e=Object.defineProperty,OF=Object.getOwnPropertySymbols,h0e=Object.prototype.hasOwnProperty,p0e=Object.prototype.propertyIsEnumerable,RF=(t,e,n)=>e in t?f0e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Sm=(t,e)=>{for(var n in e||(e={}))h0e.call(e,n)&&RF(t,n,e[n]);if(OF)for(var n of OF(e))p0e.call(e,n)&&RF(t,n,e[n]);return t};const Ox=M.createContext({theme:XR});function Ir(){var t;return((t=M.useContext(Ox))==null?void 0:t.theme)||XR}function m0e(t){const e=Ir(),n=r=>{var i,o,s,a;return{styles:((i=e.components[r])==null?void 0:i.styles)||{},classNames:((o=e.components[r])==null?void 0:o.classNames)||{},variants:(s=e.components[r])==null?void 0:s.variants,sizes:(a=e.components[r])==null?void 0:a.sizes}};return Array.isArray(t)?t.map(n):[n(t)]}function YG(){var t;return(t=M.useContext(Ox))==null?void 0:t.emotionCache}function nt(t,e,n){var r;const i=Ir(),o=(r=i.components[t])==null?void 0:r.defaultProps,s=typeof o=="function"?o(i):o;return Sm(Sm(Sm({},e),s),WG(n))}function XG({theme:t,emotionCache:e,withNormalizeCSS:n=!1,withGlobalStyles:r=!1,withCSSVariables:i=!1,inherit:o=!1,children:s}){const a=M.useContext(Ox),l=c0e(XR,o?Sm(Sm({},a.theme),t):t);return H.createElement(Yve,{theme:l},H.createElement(Ox.Provider,{value:{theme:l,emotionCache:e}},n&&H.createElement(d0e,null),r&&H.createElement(t0e,{theme:l}),i&&H.createElement(n0e,{theme:l}),typeof l.globalStyles=="function"&&H.createElement(qg,{styles:l.globalStyles(l)}),s))}XG.displayName="@mantine/core/MantineProvider";const g0e={app:100,modal:200,popover:300,overlay:400,max:9999};function Ys(t){return g0e[t]}function v0e(t,e){const n=M.useRef();return(!n.current||e.length!==n.current.prevDeps.length||n.current.prevDeps.map((r,i)=>r===e[i]).indexOf(!1)>=0)&&(n.current={v:t(),prevDeps:[...e]}),n.current.v}const y0e=LG({key:"mantine",prepend:!0});function _0e(){return YG()||y0e}var x0e=Object.defineProperty,AF=Object.getOwnPropertySymbols,w0e=Object.prototype.hasOwnProperty,S0e=Object.prototype.propertyIsEnumerable,DF=(t,e,n)=>e in t?x0e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,b0e=(t,e)=>{for(var n in e||(e={}))w0e.call(e,n)&&DF(t,n,e[n]);if(AF)for(var n of AF(e))S0e.call(e,n)&&DF(t,n,e[n]);return t};const vP="ref";function M0e(t){let e;if(t.length!==1)return{args:t,ref:e};const[n]=t;if(!(n instanceof Object))return{args:t,ref:e};if(!(vP in n))return{args:t,ref:e};e=n[vP];const r=b0e({},n);return delete r[vP],{args:[r],ref:e}}const{cssFactory:E0e}=(()=>{function t(n,r,i){const o=[],s=UG(n,o,i);return o.length<2?i:s+r(o)}function e(n){const{cache:r}=n,i=(...s)=>{const{ref:a,args:l}=M0e(s),c=nb(l,r.registered);return tA(r,c,!1),`${r.key}-${c.name}${a===void 0?"":` ${a}`}`};return{css:i,cx:(...s)=>t(r.registered,i,wG(s))}}return{cssFactory:e}})();function ZG(){const t=_0e();return v0e(()=>E0e({cache:t}),[t])}function P0e({cx:t,classes:e,context:n,classNames:r,name:i,cache:o}){const s=n.reduce((a,l)=>(Object.keys(l.classNames).forEach(c=>{typeof a[c]!="string"?a[c]=`${l.classNames[c]}`:a[c]=`${a[c]} ${l.classNames[c]}`}),a),{});return Object.keys(e).reduce((a,l)=>(a[l]=t(e[l],s[l],r!=null&&r[l],Array.isArray(i)?i.filter(Boolean).map(c=>`${o?.key||"mantine"}-${c}-${l}`).join(" "):i?`${o?.key||"mantine"}-${i}-${l}`:null),a),{})}var C0e=Object.defineProperty,IF=Object.getOwnPropertySymbols,T0e=Object.prototype.hasOwnProperty,O0e=Object.prototype.propertyIsEnumerable,LF=(t,e,n)=>e in t?C0e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,yP=(t,e)=>{for(var n in e||(e={}))T0e.call(e,n)&&LF(t,n,e[n]);if(IF)for(var n of IF(e))O0e.call(e,n)&&LF(t,n,e[n]);return t};function lT(t,e){return e&&Object.keys(e).forEach(n=>{t[n]?t[n]=yP(yP({},t[n]),e[n]):t[n]=yP({},e[n])}),t}function kF(t,e,n,r){const i=o=>typeof o=="function"?o(e,n||{},r):o||{};return Array.isArray(t)?t.map(o=>i(o.styles)).reduce((o,s)=>lT(o,s),{}):i(t)}function R0e({ctx:t,theme:e,params:n,variant:r,size:i}){return t.reduce((o,s)=>(s.variants&&r in s.variants&&lT(o,s.variants[r](e,n,{variant:r,size:i})),s.sizes&&i in s.sizes&&lT(o,s.sizes[i](e,n,{variant:r,size:i})),o),{})}function ft(t){const e=typeof t=="function"?t:()=>t;function n(r,i){const o=Ir(),s=m0e(i?.name),a=YG(),l={variant:i?.variant,size:i?.size},{css:c,cx:u}=ZG(),d=e(o,r,l),f=kF(i?.styles,o,r,l),h=kF(s,o,r,l),g=R0e({ctx:s,theme:o,params:r,variant:i?.variant,size:i?.size}),y=Object.fromEntries(Object.keys(d).map(_=>{const v=u({[c(d[_])]:!i?.unstyled},c(g[_]),c(h[_]),c(f[_]));return[_,v]}));return{classes:P0e({cx:u,classes:y,context:s,classNames:i?.classNames,name:i?.name,cache:a}),cx:u,theme:o}}return n}function Ur(t){return`___ref-${t||""}`}function qG({styles:t}){const e=Ir();return H.createElement(qg,{styles:GG(typeof t=="function"?t(e):t)})}var A0e=Object.defineProperty,D0e=Object.defineProperties,I0e=Object.getOwnPropertyDescriptors,NF=Object.getOwnPropertySymbols,L0e=Object.prototype.hasOwnProperty,k0e=Object.prototype.propertyIsEnumerable,FF=(t,e,n)=>e in t?A0e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Np=(t,e)=>{for(var n in e||(e={}))L0e.call(e,n)&&FF(t,n,e[n]);if(NF)for(var n of NF(e))k0e.call(e,n)&&FF(t,n,e[n]);return t},Fp=(t,e)=>D0e(t,I0e(e));const zp={in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${X(10)})`},transitionProperty:"transform, opacity"},Ty={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:"opacity"},scale:{in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:"scale(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-y":{in:{opacity:1,transform:"scaleY(1)"},out:{opacity:0,transform:"scaleY(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-x":{in:{opacity:1,transform:"scaleX(1)"},out:{opacity:0,transform:"scaleX(0)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"skew-up":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:`translateY(-${X(20)}) skew(-10deg, -5deg)`},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"skew-down":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:`translateY(${X(20)}) skew(-10deg, -5deg)`},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-left":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:`translateY(${X(20)}) rotate(-5deg)`},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-right":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:`translateY(${X(20)}) rotate(5deg)`},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-100%)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(100%)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"slide-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(100%)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"slide-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-100%)"},common:{transformOrigin:"right"},transitionProperty:"transform, opacity"},pop:Fp(Np({},zp),{common:{transformOrigin:"center center"}}),"pop-bottom-left":Fp(Np({},zp),{common:{transformOrigin:"bottom left"}}),"pop-bottom-right":Fp(Np({},zp),{common:{transformOrigin:"bottom right"}}),"pop-top-left":Fp(Np({},zp),{common:{transformOrigin:"top left"}}),"pop-top-right":Fp(Np({},zp),{common:{transformOrigin:"top right"}})},zF=["mousedown","touchstart"];function N0e(t,e,n){const r=M.useRef();return M.useEffect(()=>{const i=o=>{const{target:s}=o??{};if(Array.isArray(n)){const a=s?.hasAttribute("data-ignore-outside-clicks")||!document.body.contains(s)&&s.tagName!=="HTML";n.every(c=>!!c&&!o.composedPath().includes(c))&&!a&&t()}else r.current&&!r.current.contains(s)&&t()};return(e||zF).forEach(o=>document.addEventListener(o,i)),()=>{(e||zF).forEach(o=>document.removeEventListener(o,i))}},[r,t,n]),r}function F0e({timeout:t=2e3}={}){const[e,n]=M.useState(null),[r,i]=M.useState(!1),[o,s]=M.useState(null),a=u=>{clearTimeout(o),s(setTimeout(()=>i(!1),t)),i(u)};return{copy:u=>{"clipboard"in navigator?navigator.clipboard.writeText(u).then(()=>a(!0)).catch(d=>n(d)):n(new Error("useClipboard: navigator.clipboard is not supported"))},reset:()=>{i(!1),n(null),clearTimeout(o)},error:e,copied:r}}function z0e(t,e){try{return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}catch{return t.addListener(e),()=>t.removeListener(e)}}function U0e(t,e){return typeof e=="boolean"?e:typeof window<"u"&&"matchMedia"in window?window.matchMedia(t).matches:!1}function rb(t,e,{getInitialValueInEffect:n}={getInitialValueInEffect:!0}){const[r,i]=M.useState(n?e:U0e(t,e)),o=M.useRef();return M.useEffect(()=>{if("matchMedia"in window)return o.current=window.matchMedia(t),i(o.current.matches),z0e(o.current,s=>i(s.matches))},[t]),r}function Ns(t,e,n){return Math.min(Math.max(t,e),n)}function KG(t,e,n={leading:!1}){const[r,i]=M.useState(t),o=M.useRef(!1),s=M.useRef(null),a=M.useRef(!1),l=()=>window.clearTimeout(s.current);return M.useEffect(()=>{o.current&&(!a.current&&n.leading?(a.current=!0,i(t)):(l(),s.current=window.setTimeout(()=>{a.current=!1,i(t)},e)))},[t,n.leading,e]),M.useEffect(()=>(o.current=!0,l),[]),[r,l]}const ib=typeof document<"u"?M.useLayoutEffect:M.useEffect;function Qr(t,e){const n=M.useRef(!1);M.useEffect(()=>()=>{n.current=!1},[]),M.useEffect(()=>{if(n.current)return t();n.current=!0},e)}function QG({opened:t,shouldReturnFocus:e=!0}){const n=M.useRef(),r=()=>{var i;n.current&&"focus"in n.current&&typeof n.current.focus=="function"&&((i=n.current)==null||i.focus({preventScroll:!0}))};return Qr(()=>{let i=-1;const o=s=>{s.key==="Tab"&&window.clearTimeout(i)};return document.addEventListener("keydown",o),t?n.current=document.activeElement:e&&(i=window.setTimeout(r,10)),()=>{window.clearTimeout(i),document.removeEventListener("keydown",o)}},[t,e]),r}const B0e=/input|select|textarea|button|object/,JG="a, input, select, textarea, button, object, [tabindex]";function H0e(t){return t.style.display==="none"}function V0e(t){if(t.getAttribute("aria-hidden")||t.getAttribute("hidden")||t.getAttribute("type")==="hidden")return!1;let n=t;for(;n&&!(n===document.body||n.nodeType===11);){if(H0e(n))return!1;n=n.parentNode}return!0}function eW(t){let e=t.getAttribute("tabindex");return e===null&&(e=void 0),parseInt(e,10)}function cT(t){const e=t.nodeName.toLowerCase(),n=!Number.isNaN(eW(t));return(B0e.test(e)&&!t.disabled||t instanceof HTMLAnchorElement&&t.href||n)&&V0e(t)}function tW(t){const e=eW(t);return(Number.isNaN(e)||e>=0)&&cT(t)}function j0e(t){return Array.from(t.querySelectorAll(JG)).filter(tW)}function $0e(t,e){const n=j0e(t);if(!n.length){e.preventDefault();return}const r=n[e.shiftKey?0:n.length-1],i=t.getRootNode();if(!(r===i.activeElement||t===i.activeElement))return;e.preventDefault();const s=n[e.shiftKey?n.length-1:0];s&&s.focus()}function rA(){return`mantine-${Math.random().toString(36).slice(2,11)}`}function G0e(t,e="body > :not(script)"){const n=rA(),r=Array.from(document.querySelectorAll(e)).map(i=>{var o;if((o=i?.shadowRoot)!=null&&o.contains(t)||i.contains(t))return;const s=i.getAttribute("aria-hidden"),a=i.getAttribute("data-hidden"),l=i.getAttribute("data-focus-id");return i.setAttribute("data-focus-id",n),s===null||s==="false"?i.setAttribute("aria-hidden","true"):!a&&!l&&i.setAttribute("data-hidden",s),{node:i,ariaHidden:a||null}});return()=>{r.forEach(i=>{!i||n!==i.node.getAttribute("data-focus-id")||(i.ariaHidden===null?i.node.removeAttribute("aria-hidden"):i.node.setAttribute("aria-hidden",i.ariaHidden),i.node.removeAttribute("data-focus-id"),i.node.removeAttribute("data-hidden"))})}}function W0e(t=!0){const e=M.useRef(),n=M.useRef(null),r=o=>{let s=o.querySelector("[data-autofocus]");if(!s){const a=Array.from(o.querySelectorAll(JG));s=a.find(tW)||a.find(cT)||null,!s&&cT(o)&&(s=o)}s&&s.focus({preventScroll:!0})},i=M.useCallback(o=>{if(t){if(o===null){n.current&&(n.current(),n.current=null);return}n.current=G0e(o),e.current!==o&&(o?(setTimeout(()=>{o.getRootNode()&&r(o)}),e.current=o):e.current=null)}},[t]);return M.useEffect(()=>{if(!t)return;e.current&&setTimeout(()=>r(e.current));const o=s=>{s.key==="Tab"&&e.current&&$0e(e.current,s)};return document.addEventListener("keydown",o),()=>{document.removeEventListener("keydown",o),n.current&&n.current()}},[t]),i}const Y0e=H["useId".toString()]||(()=>{});function X0e(){const t=Y0e();return t?`mantine-${t.replace(/:/g,"")}`:""}function zo(t){const e=X0e(),[n,r]=M.useState(e);return ib(()=>{r(rA())},[]),typeof t=="string"?t:typeof window>"u"?e:n}function uT(t,e,n){M.useEffect(()=>(window.addEventListener(t,e,n),()=>window.removeEventListener(t,e,n)),[t,e])}function nW(t,e){typeof t=="function"?t(e):typeof t=="object"&&t!==null&&"current"in t&&(t.current=e)}function rW(...t){return e=>{t.forEach(n=>nW(n,e))}}function Da(...t){return M.useCallback(rW(...t),t)}const iW=t=>({x:Ns(t.x,0,1),y:Ns(t.y,0,1)});function iA(t,e,n="ltr"){const r=M.useRef(),i=M.useRef(!1),o=M.useRef(!1),s=M.useRef(0),[a,l]=M.useState(!1);return M.useEffect(()=>{i.current=!0},[]),M.useEffect(()=>{const c=({x,y:w})=>{cancelAnimationFrame(s.current),s.current=requestAnimationFrame(()=>{if(i.current&&r.current){r.current.style.userSelect="none";const S=r.current.getBoundingClientRect();if(S.width&&S.height){const E=Ns((x-S.left)/S.width,0,1);t({x:n==="ltr"?E:1-E,y:Ns((w-S.top)/S.height,0,1)})}}})},u=()=>{document.addEventListener("mousemove",y),document.addEventListener("mouseup",h),document.addEventListener("touchmove",v),document.addEventListener("touchend",h)},d=()=>{document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",h),document.removeEventListener("touchmove",v),document.removeEventListener("touchend",h)},f=()=>{!o.current&&i.current&&(o.current=!0,typeof e?.onScrubStart=="function"&&e.onScrubStart(),l(!0),u())},h=()=>{o.current&&i.current&&(o.current=!1,l(!1),d(),setTimeout(()=>{typeof e?.onScrubEnd=="function"&&e.onScrubEnd()},0))},g=x=>{f(),x.preventDefault(),y(x)},y=x=>c({x:x.clientX,y:x.clientY}),_=x=>{x.cancelable&&x.preventDefault(),f(),v(x)},v=x=>{x.cancelable&&x.preventDefault(),c({x:x.changedTouches[0].clientX,y:x.changedTouches[0].clientY})};return r.current.addEventListener("mousedown",g),r.current.addEventListener("touchstart",_,{passive:!1}),()=>{r.current&&(r.current.removeEventListener("mousedown",g),r.current.removeEventListener("touchstart",_))}},[n,t]),{ref:r,active:a}}function Ar({value:t,defaultValue:e,finalValue:n,onChange:r=()=>{}}){const[i,o]=M.useState(e!==void 0?e:n),s=a=>{o(a),r?.(a)};return t!==void 0?[t,r,!0]:[i,s,!1]}function ob(t,e){return rb("(prefers-reduced-motion: reduce)",t,e)}const Z0e=t=>t<.5?2*t*t:-1+(4-2*t)*t,q0e=({axis:t,target:e,parent:n,alignment:r,offset:i,isList:o})=>{if(!e||!n&&typeof document>"u")return 0;const s=!!n,l=(n||document.body).getBoundingClientRect(),c=e.getBoundingClientRect(),u=d=>c[d]-l[d];if(t==="y"){const d=u("top");if(d===0)return 0;if(r==="start"){const h=d-i;return h<=c.height*(o?0:1)||!o?h:0}const f=s?l.height:window.innerHeight;if(r==="end"){const h=d+i-f+c.height;return h>=-c.height*(o?0:1)||!o?h:0}return r==="center"?d-f/2+c.height/2:0}if(t==="x"){const d=u("left");if(d===0)return 0;if(r==="start"){const h=d-i;return h<=c.width||!o?h:0}const f=s?l.width:window.innerWidth;if(r==="end"){const h=d+i-f+c.width;return h>=-c.width||!o?h:0}return r==="center"?d-f/2+c.width/2:0}return 0},K0e=({axis:t,parent:e})=>{if(!e&&typeof document>"u")return 0;const n=t==="y"?"scrollTop":"scrollLeft";if(e)return e[n];const{body:r,documentElement:i}=document;return r[n]+i[n]},Q0e=({axis:t,parent:e,distance:n})=>{if(!e&&typeof document>"u")return;const r=t==="y"?"scrollTop":"scrollLeft";if(e)e[r]=n;else{const{body:i,documentElement:o}=document;i[r]=n,o[r]=n}};function oW({duration:t=1250,axis:e="y",onScrollFinish:n,easing:r=Z0e,offset:i=0,cancelable:o=!0,isList:s=!1}={}){const a=M.useRef(0),l=M.useRef(0),c=M.useRef(!1),u=M.useRef(null),d=M.useRef(null),f=ob(),h=()=>{a.current&&cancelAnimationFrame(a.current)},g=M.useCallback(({alignment:_="start"}={})=>{var v;c.current=!1,a.current&&h();const x=(v=K0e({parent:u.current,axis:e}))!=null?v:0,w=q0e({parent:u.current,target:d.current,axis:e,alignment:_,offset:i,isList:s})-(u.current?0:x);function S(){l.current===0&&(l.current=performance.now());const C=performance.now()-l.current,O=f||t===0?1:C/t,R=x+w*r(O);Q0e({parent:u.current,axis:e,distance:R}),!c.current&&O<1?a.current=requestAnimationFrame(S):(typeof n=="function"&&n(),l.current=0,a.current=0,h())}S()},[e,t,r,s,i,n,f]),y=()=>{o&&(c.current=!0)};return uT("wheel",y,{passive:!0}),uT("touchmove",y,{passive:!0}),M.useEffect(()=>h,[]),{scrollableRef:u,targetRef:d,scrollIntoView:g,cancel:h}}function UF(){if(typeof window>"u")return"undetermined";const{userAgent:t}=window.navigator,e=/(Macintosh)|(MacIntel)|(MacPPC)|(Mac68K)/i,n=/(Win32)|(Win64)|(Windows)|(WinCE)/i,r=/(iPhone)|(iPad)|(iPod)/i;return e.test(t)?"macos":r.test(t)?"ios":n.test(t)?"windows":/Android/i.test(t)?"android":/Linux/i.test(t)?"linux":"undetermined"}function J0e(t={getValueInEffect:!0}){const[e,n]=M.useState(t.getValueInEffect?"undetermined":UF());return ib(()=>{t.getValueInEffect&&n(UF)},[]),e}function sW(t=!1,e){const{onOpen:n,onClose:r}=e||{},[i,o]=M.useState(t),s=M.useCallback(()=>{o(c=>c||(n?.(),!0))},[n]),a=M.useCallback(()=>{o(c=>c&&(r?.(),!1))},[r]),l=M.useCallback(()=>{i?a():s()},[a,s,i]);return[i,{open:s,close:a,toggle:l}]}function eye(){const[t,e]=M.useState(!1);ib(()=>{e(typeof window<"u"&&"EyeDropper"in window)},[]);const n=M.useCallback((r={})=>{if(t)return new window.EyeDropper().open(r)},[t]);return{supported:t,open:n}}const Rx={context:"Accordion component was not found in the tree",itemContext:"Accordion.Item component was not found in the tree",value:"Accordion.Item component was rendered with invalid value or without value"},[tye,Ax]=cd(Rx.context);function nye({children:t,multiple:e,value:n,defaultValue:r,onChange:i,id:o,loop:s,transitionDuration:a,disableChevronRotation:l,chevronPosition:c,chevronSize:u,order:d,chevron:f,variant:h,radius:g,classNames:y,styles:_,unstyled:v}){const x=zo(o),[w,S]=Ar({value:n,defaultValue:r,finalValue:e?[]:null,onChange:i}),E=O=>Array.isArray(w)?w.includes(O):O===w,C=O=>{const R=Array.isArray(w)?w.includes(O)?w.filter(T=>T!==O):[...w,O]:O===w?null:O;S(R)};return H.createElement(tye,{value:{isItemActive:E,onChange:C,getControlId:Px(`${x}-control`,Rx.value),getRegionId:Px(`${x}-panel`,Rx.value),transitionDuration:a,disableChevronRotation:l,chevronPosition:c,chevronSize:u,order:d,chevron:f,loop:s,variant:h,radius:g,classNames:y,styles:_,unstyled:v}},t)}const[rye,aW]=cd(Rx.itemContext);function iye(t,e,{radius:n}){const r=t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[3],i=t.colorScheme==="dark"?t.colors.dark[6]:t.colors.gray[0],o=t.fn.radius(n);return e==="default"?{color:t.colorScheme==="dark"?t.colors.dark[0]:t.black,borderBottom:`${X(1)} solid ${r}`}:e==="contained"?{border:`${X(1)} solid ${r}`,transition:"background-color 150ms ease","&[data-active]":{backgroundColor:i},"&:first-of-type":{borderTopRightRadius:o,borderTopLeftRadius:o,"& > [data-accordion-control]":{borderTopRightRadius:o,borderTopLeftRadius:o}},"&:last-of-type":{borderBottomRightRadius:o,borderBottomLeftRadius:o,"& > [data-accordion-control]":{borderBottomRightRadius:o,borderBottomLeftRadius:o}},"& + &":{borderTop:0}}:e==="filled"?{borderRadius:o,"&[data-active]":{backgroundColor:i}}:e==="separated"?{borderRadius:o,backgroundColor:i,border:`${X(1)} solid transparent`,transition:"background-color 150ms ease","& + &":{marginTop:t.spacing.md},"&[data-active]":{backgroundColor:t.colorScheme==="dark"?t.colors.dark[7]:t.white,borderColor:r}}:{}}var oye=ft((t,e,{variant:n})=>({item:iye(t,n,e)}));const sye=oye;var BF=Object.getOwnPropertySymbols,aye=Object.prototype.hasOwnProperty,lye=Object.prototype.propertyIsEnumerable,cye=(t,e)=>{var n={};for(var r in t)aye.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&BF)for(var r of BF(t))e.indexOf(r)<0&&lye.call(t,r)&&(n[r]=t[r]);return n};function Sl(t){const e=t,{m:n,mx:r,my:i,mt:o,mb:s,ml:a,mr:l,p:c,px:u,py:d,pt:f,pb:h,pl:g,pr:y,bg:_,c:v,opacity:x,ff:w,fz:S,fw:E,lts:C,ta:O,lh:R,fs:T,tt:A,td:F,w:N,miw:U,maw:k,h:z,mih:G,mah:W,bgsz:B,bgp:j,bgr:$,bga:q,pos:K,top:re,left:J,bottom:le,right:ae,inset:oe,display:De}=e,Te=cye(e,["m","mx","my","mt","mb","ml","mr","p","px","py","pt","pb","pl","pr","bg","c","opacity","ff","fz","fw","lts","ta","lh","fs","tt","td","w","miw","maw","h","mih","mah","bgsz","bgp","bgr","bga","pos","top","left","bottom","right","inset","display"]);return{systemStyles:WG({m:n,mx:r,my:i,mt:o,mb:s,ml:a,mr:l,p:c,px:u,py:d,pt:f,pb:h,pl:g,pr:y,bg:_,c:v,opacity:x,ff:w,fz:S,fw:E,lts:C,ta:O,lh:R,fs:T,tt:A,td:F,w:N,miw:U,maw:k,h:z,mih:G,mah:W,bgsz:B,bgp:j,bgr:$,bga:q,pos:K,top:re,left:J,bottom:le,right:ae,inset:oe,display:De}),rest:Te}}function uye(t,e){const n=Object.keys(t).filter(r=>r!=="base").sort((r,i)=>js(Oe({size:r,sizes:e.breakpoints}))-js(Oe({size:i,sizes:e.breakpoints})));return"base"in t?["base",...n]:n}function dye({value:t,theme:e,getValue:n,property:r}){if(t==null)return;if(typeof t=="object")return uye(t,e).reduce((s,a)=>{if(a==="base"&&t.base!==void 0){const c=n(t.base,e);return Array.isArray(r)?(r.forEach(u=>{s[u]=c}),s):(s[r]=c,s)}const l=n(t[a],e);return Array.isArray(r)?(s[e.fn.largerThan(a)]={},r.forEach(c=>{s[e.fn.largerThan(a)][c]=l}),s):(s[e.fn.largerThan(a)]={[r]:l},s)},{});const i=n(t,e);return Array.isArray(r)?r.reduce((o,s)=>(o[s]=i,o),{}):{[r]:i}}function fye(t,e){return t==="dimmed"?e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]:e.fn.variant({variant:"filled",color:t,primaryFallback:!1}).background}function hye(t){return X(t)}function pye(t){return t}function mye(t,e){return Oe({size:t,sizes:e.fontSizes})}const gye=["-xs","-sm","-md","-lg","-xl"];function vye(t,e){return gye.includes(t)?`calc(${Oe({size:t.replace("-",""),sizes:e.spacing})} * -1)`:Oe({size:t,sizes:e.spacing})}const yye={identity:pye,color:fye,size:hye,fontSize:mye,spacing:vye},_ye={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},mx:{type:"spacing",property:["marginRight","marginLeft"]},my:{type:"spacing",property:["marginTop","marginBottom"]},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},px:{type:"spacing",property:["paddingRight","paddingLeft"]},py:{type:"spacing",property:["paddingTop","paddingBottom"]},bg:{type:"color",property:"background"},c:{type:"color",property:"color"},opacity:{type:"identity",property:"opacity"},ff:{type:"identity",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"identity",property:"fontWeight"},lts:{type:"size",property:"letterSpacing"},ta:{type:"identity",property:"textAlign"},lh:{type:"identity",property:"lineHeight"},fs:{type:"identity",property:"fontStyle"},tt:{type:"identity",property:"textTransform"},td:{type:"identity",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"size",property:"backgroundSize"},bgp:{type:"identity",property:"backgroundPosition"},bgr:{type:"identity",property:"backgroundRepeat"},bga:{type:"identity",property:"backgroundAttachment"},pos:{type:"identity",property:"position"},top:{type:"identity",property:"top"},left:{type:"size",property:"left"},bottom:{type:"size",property:"bottom"},right:{type:"size",property:"right"},inset:{type:"size",property:"inset"},display:{type:"identity",property:"display"}};var xye=Object.defineProperty,HF=Object.getOwnPropertySymbols,wye=Object.prototype.hasOwnProperty,Sye=Object.prototype.propertyIsEnumerable,VF=(t,e,n)=>e in t?xye(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,jF=(t,e)=>{for(var n in e||(e={}))wye.call(e,n)&&VF(t,n,e[n]);if(HF)for(var n of HF(e))Sye.call(e,n)&&VF(t,n,e[n]);return t};function dT(t,e,n=_ye){return Object.keys(n).reduce((i,o)=>(o in t&&t[o]!==void 0&&i.push(dye({value:t[o],getValue:yye[n[o].type],property:n[o].property,theme:e})),i),[]).reduce((i,o)=>(Object.keys(o).forEach(s=>{typeof o[s]=="object"&&o[s]!==null&&s in i?i[s]=jF(jF({},i[s]),o[s]):i[s]=o[s]}),i),{})}function $F(t,e){return typeof t=="function"?t(e):t}function bye(t,e,n){const r=Ir(),{css:i,cx:o}=ZG();return Array.isArray(t)?o(n,i(dT(e,r)),t.map(s=>i($F(s,r)))):o(n,i($F(t,r)),i(dT(e,r)))}var Mye=Object.defineProperty,Dx=Object.getOwnPropertySymbols,lW=Object.prototype.hasOwnProperty,cW=Object.prototype.propertyIsEnumerable,GF=(t,e,n)=>e in t?Mye(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Eye=(t,e)=>{for(var n in e||(e={}))lW.call(e,n)&&GF(t,n,e[n]);if(Dx)for(var n of Dx(e))cW.call(e,n)&&GF(t,n,e[n]);return t},Pye=(t,e)=>{var n={};for(var r in t)lW.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Dx)for(var r of Dx(t))e.indexOf(r)<0&&cW.call(t,r)&&(n[r]=t[r]);return n};const uW=M.forwardRef((t,e)=>{var n=t,{className:r,component:i,style:o,sx:s}=n,a=Pye(n,["className","component","style","sx"]);const{systemStyles:l,rest:c}=Sl(a),u=i||"div";return H.createElement(u,Eye({ref:e,className:bye(s,l,r),style:o},c))});uW.displayName="@mantine/core/Box";const Xe=uW;var Cye=Object.defineProperty,Ix=Object.getOwnPropertySymbols,dW=Object.prototype.hasOwnProperty,fW=Object.prototype.propertyIsEnumerable,WF=(t,e,n)=>e in t?Cye(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Tye=(t,e)=>{for(var n in e||(e={}))dW.call(e,n)&&WF(t,n,e[n]);if(Ix)for(var n of Ix(e))fW.call(e,n)&&WF(t,n,e[n]);return t},Oye=(t,e)=>{var n={};for(var r in t)dW.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Ix)for(var r of Ix(t))e.indexOf(r)<0&&fW.call(t,r)&&(n[r]=t[r]);return n};const Rye={},hW=M.forwardRef((t,e)=>{const n=nt("AccordionItem",Rye,t),{children:r,className:i,value:o}=n,s=Oye(n,["children","className","value"]),a=Ax(),{classes:l,cx:c}=sye({radius:a.radius},{name:"Accordion",classNames:a.classNames,styles:a.styles,unstyled:a.unstyled,variant:a.variant});return H.createElement(rye,{value:{value:o}},H.createElement(Xe,Tye({ref:e,className:c(l.item,i),"data-active":a.isItemActive(o)||void 0},s),r))});hW.displayName="@mantine/core/AccordionItem";var Aye=Object.defineProperty,Dye=Object.defineProperties,Iye=Object.getOwnPropertyDescriptors,YF=Object.getOwnPropertySymbols,Lye=Object.prototype.hasOwnProperty,kye=Object.prototype.propertyIsEnumerable,XF=(t,e,n)=>e in t?Aye(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Oy=(t,e)=>{for(var n in e||(e={}))Lye.call(e,n)&&XF(t,n,e[n]);if(YF)for(var n of YF(e))kye.call(e,n)&&XF(t,n,e[n]);return t},Nye=(t,e)=>Dye(t,Iye(e));function Fye(t,e){return e==="default"||e==="contained"?t.fn.hover({backgroundColor:t.colorScheme==="dark"?t.colors.dark[6]:t.colors.gray[0]}):{}}var zye=ft((t,{transitionDuration:e,chevronPosition:n,chevronSize:r},{variant:i})=>({icon:{display:"flex",alignItems:"center",justifyContent:"center",marginRight:n==="left"?0:t.spacing.sm,marginLeft:n==="left"?t.spacing.lg:0},chevron:{display:"flex",alignItems:"center",justifyContent:"center",transition:`transform ${e}ms ease`,marginRight:n==="right"?0:t.spacing.sm,marginLeft:n==="right"?t.spacing.lg:0,width:X(r),minWidth:X(r),"&[data-rotate]":{transform:"rotate(180deg)"}},label:{color:"inherit",fontWeight:400,flex:1,overflow:"hidden",textOverflow:"ellipsis",paddingTop:t.spacing.md,paddingBottom:t.spacing.md},itemTitle:{margin:0,padding:0},control:Nye(Oy(Oy(Oy({},t.fn.focusStyles()),t.fn.fontStyles()),Fye(t,i)),{width:"100%",display:"flex",alignItems:"center",flexDirection:n==="right"?"row-reverse":"row",paddingRight:t.spacing.md,paddingLeft:n==="right"?`calc(${t.spacing.md} + ${X(4)})`:t.spacing.xs,textAlign:"left",color:t.colorScheme==="dark"?t.colors.dark[0]:t.black,"&:disabled":Oy({opacity:.4,cursor:"not-allowed"},t.fn.hover({backgroundColor:"transparent"}))})}));const Uye=zye;var Bye=Object.defineProperty,Hye=Object.defineProperties,Vye=Object.getOwnPropertyDescriptors,ZF=Object.getOwnPropertySymbols,jye=Object.prototype.hasOwnProperty,$ye=Object.prototype.propertyIsEnumerable,qF=(t,e,n)=>e in t?Bye(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,KF=(t,e)=>{for(var n in e||(e={}))jye.call(e,n)&&qF(t,n,e[n]);if(ZF)for(var n of ZF(e))$ye.call(e,n)&&qF(t,n,e[n]);return t},Gye=(t,e)=>Hye(t,Vye(e)),Wye=ft(t=>({root:Gye(KF(KF({},t.fn.focusStyles()),t.fn.fontStyles()),{cursor:"pointer",border:0,padding:0,appearance:"none",fontSize:t.fontSizes.md,backgroundColor:"transparent",textAlign:"left",color:t.colorScheme==="dark"?t.colors.dark[0]:t.black,textDecoration:"none",boxSizing:"border-box"})}));const Yye=Wye;var Xye=Object.defineProperty,Lx=Object.getOwnPropertySymbols,pW=Object.prototype.hasOwnProperty,mW=Object.prototype.propertyIsEnumerable,QF=(t,e,n)=>e in t?Xye(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Zye=(t,e)=>{for(var n in e||(e={}))pW.call(e,n)&&QF(t,n,e[n]);if(Lx)for(var n of Lx(e))mW.call(e,n)&&QF(t,n,e[n]);return t},qye=(t,e)=>{var n={};for(var r in t)pW.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Lx)for(var r of Lx(t))e.indexOf(r)<0&&mW.call(t,r)&&(n[r]=t[r]);return n};const gW=M.forwardRef((t,e)=>{const n=nt("UnstyledButton",{},t),{className:r,component:i="button",unstyled:o,variant:s}=n,a=qye(n,["className","component","unstyled","variant"]),{classes:l,cx:c}=Yye(null,{name:"UnstyledButton",unstyled:o,variant:s});return H.createElement(Xe,Zye({component:i,ref:e,className:c(l.root,r),type:i==="button"?"button":void 0},a))});gW.displayName="@mantine/core/UnstyledButton";const Fs=gW;var Kye=Object.defineProperty,Qye=Object.defineProperties,Jye=Object.getOwnPropertyDescriptors,kx=Object.getOwnPropertySymbols,vW=Object.prototype.hasOwnProperty,yW=Object.prototype.propertyIsEnumerable,JF=(t,e,n)=>e in t?Kye(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,e_e=(t,e)=>{for(var n in e||(e={}))vW.call(e,n)&&JF(t,n,e[n]);if(kx)for(var n of kx(e))yW.call(e,n)&&JF(t,n,e[n]);return t},t_e=(t,e)=>Qye(t,Jye(e)),n_e=(t,e)=>{var n={};for(var r in t)vW.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&kx)for(var r of kx(t))e.indexOf(r)<0&&yW.call(t,r)&&(n[r]=t[r]);return n};const r_e={},_W=M.forwardRef((t,e)=>{const n=nt("AccordionControl",r_e,t),{disabled:r,onKeyDown:i,onClick:o,chevron:s,children:a,className:l,icon:c}=n,u=n_e(n,["disabled","onKeyDown","onClick","chevron","children","className","icon"]),d=Ax(),{value:f}=aW(),{classes:h,cx:g}=Uye({transitionDuration:d.transitionDuration,chevronPosition:d.chevronPosition,chevronSize:d.chevronSize,radius:d.radius},{name:"Accordion",classNames:d.classNames,styles:d.styles,unstyled:d.unstyled,variant:d.variant}),y=d.isItemActive(f),_=typeof d.order=="number",v=`h${d.order}`,x=H.createElement(Fs,t_e(e_e({},u),{ref:e,"data-accordion-control":!0,disabled:r,className:g(h.control,l),onClick:w=>{o?.(w),d.onChange(f)},type:"button","data-active":y||void 0,"aria-expanded":y,"aria-controls":d.getRegionId(f),id:d.getControlId(f),unstyled:d.unstyled,onKeyDown:GR({siblingSelector:"[data-accordion-control]",parentSelector:"[data-accordion]",activateOnFocus:!1,loop:d.loop,orientation:"vertical",onKeyDown:i})}),H.createElement("span",{className:h.chevron,"data-rotate":!d.disableChevronRotation&&y||void 0},s||d.chevron),H.createElement("span",{className:h.label},a),c&&H.createElement("span",{className:h.icon},c));return _?H.createElement(v,{className:h.itemTitle},x):x});_W.displayName="@mantine/core/AccordionControl";var i_e=Object.defineProperty,o_e=Object.defineProperties,s_e=Object.getOwnPropertyDescriptors,ez=Object.getOwnPropertySymbols,a_e=Object.prototype.hasOwnProperty,l_e=Object.prototype.propertyIsEnumerable,tz=(t,e,n)=>e in t?i_e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,c_e=(t,e)=>{for(var n in e||(e={}))a_e.call(e,n)&&tz(t,n,e[n]);if(ez)for(var n of ez(e))l_e.call(e,n)&&tz(t,n,e[n]);return t},u_e=(t,e)=>o_e(t,s_e(e)),d_e=ft((t,e)=>({panel:u_e(c_e({},t.fn.fontStyles()),{wordBreak:"break-word",lineHeight:t.lineHeight}),content:{padding:t.spacing.md,paddingTop:`calc(${t.spacing.xs} / 2)`}}));const f_e=d_e;var h_e=Object.defineProperty,p_e=Object.defineProperties,m_e=Object.getOwnPropertyDescriptors,Nx=Object.getOwnPropertySymbols,xW=Object.prototype.hasOwnProperty,wW=Object.prototype.propertyIsEnumerable,nz=(t,e,n)=>e in t?h_e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,au=(t,e)=>{for(var n in e||(e={}))xW.call(e,n)&&nz(t,n,e[n]);if(Nx)for(var n of Nx(e))wW.call(e,n)&&nz(t,n,e[n]);return t},_P=(t,e)=>p_e(t,m_e(e)),g_e=(t,e)=>{var n={};for(var r in t)xW.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Nx)for(var r of Nx(t))e.indexOf(r)<0&&wW.call(t,r)&&(n[r]=t[r]);return n};function v_e(t){if(!t||typeof t=="string")return 0;const e=t/36;return Math.round((4+15*e**.25+e/5)*10)}function xP(t){return t?.current?t.current.scrollHeight:"auto"}const Ry=typeof window<"u"&&window.requestAnimationFrame;function y_e({transitionDuration:t,transitionTimingFunction:e="ease",onTransitionEnd:n=()=>{},opened:r}){const i=M.useRef(null),o=0,s={display:"none",height:0,overflow:"hidden"},[a,l]=M.useState(r?{}:s),c=g=>{bg.flushSync(()=>l(g))},u=g=>{c(y=>au(au({},y),g))};function d(g){return{transition:`height ${t||v_e(g)}ms ${e}`}}Qr(()=>{Ry(r?()=>{u({willChange:"height",display:"block",overflow:"hidden"}),Ry(()=>{const g=xP(i);u(_P(au({},d(g)),{height:g}))})}:()=>{const g=xP(i);u(_P(au({},d(g)),{willChange:"height",height:g})),Ry(()=>u({height:o,overflow:"hidden"}))})},[r]);const f=g=>{if(!(g.target!==i.current||g.propertyName!=="height"))if(r){const y=xP(i);y===a.height?c({}):u({height:y}),n()}else a.height===o&&(c(s),n())};function h(g={}){var y=g,{style:_={},refKey:v="ref"}=y,x=g_e(y,["style","refKey"]);const w=x[v];return _P(au({"aria-hidden":!r},x),{[v]:rW(i,w),onTransitionEnd:f,style:au(au({boxSizing:"border-box"},_),a)})}return h}var __e=Object.defineProperty,Fx=Object.getOwnPropertySymbols,SW=Object.prototype.hasOwnProperty,bW=Object.prototype.propertyIsEnumerable,rz=(t,e,n)=>e in t?__e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ay=(t,e)=>{for(var n in e||(e={}))SW.call(e,n)&&rz(t,n,e[n]);if(Fx)for(var n of Fx(e))bW.call(e,n)&&rz(t,n,e[n]);return t},x_e=(t,e)=>{var n={};for(var r in t)SW.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Fx)for(var r of Fx(t))e.indexOf(r)<0&&bW.call(t,r)&&(n[r]=t[r]);return n};const w_e={transitionDuration:200,transitionTimingFunction:"ease",animateOpacity:!0},ud=M.forwardRef((t,e)=>{const n=nt("Collapse",w_e,t),{children:r,in:i,transitionDuration:o,transitionTimingFunction:s,style:a,onTransitionEnd:l,animateOpacity:c}=n,u=x_e(n,["children","in","transitionDuration","transitionTimingFunction","style","onTransitionEnd","animateOpacity"]),d=Ir(),f=ob(),g=(d.respectReducedMotion?f:!1)?0:o,{systemStyles:y,rest:_}=Sl(u),v=y_e({opened:i,transitionDuration:g,transitionTimingFunction:s,onTransitionEnd:l});return g===0?i?H.createElement(Xe,Ay({},_),r):null:H.createElement(Xe,Ay({},v(Ay(Ay({style:a,ref:e},_),y))),H.createElement("div",{style:{opacity:i||!c?1:0,transition:c?`opacity ${g}ms ${s}`:"none"}},r))});ud.displayName="@mantine/core/Collapse";var S_e=Object.defineProperty,b_e=Object.defineProperties,M_e=Object.getOwnPropertyDescriptors,zx=Object.getOwnPropertySymbols,MW=Object.prototype.hasOwnProperty,EW=Object.prototype.propertyIsEnumerable,iz=(t,e,n)=>e in t?S_e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,E_e=(t,e)=>{for(var n in e||(e={}))MW.call(e,n)&&iz(t,n,e[n]);if(zx)for(var n of zx(e))EW.call(e,n)&&iz(t,n,e[n]);return t},P_e=(t,e)=>b_e(t,M_e(e)),C_e=(t,e)=>{var n={};for(var r in t)MW.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&zx)for(var r of zx(t))e.indexOf(r)<0&&EW.call(t,r)&&(n[r]=t[r]);return n};const T_e={};function PW(t){const e=nt("AccordionPanel",T_e,t),{children:n,className:r}=e,i=C_e(e,["children","className"]),o=Ax(),{value:s}=aW(),{classNames:a,styles:l,unstyled:c}=Ax(),{classes:u,cx:d}=f_e({radius:o.radius},{name:"Accordion",classNames:a,styles:l,unstyled:c,variant:o.variant});return H.createElement(ud,P_e(E_e({},i),{className:d(u.panel,r),in:o.isItemActive(s),transitionDuration:o.transitionDuration,role:"region",id:o.getRegionId(s),"aria-labelledby":o.getControlId(s)}),H.createElement("div",{className:u.content},n))}PW.displayName="@mantine/core/AccordionPanel";var O_e=Object.defineProperty,oz=Object.getOwnPropertySymbols,R_e=Object.prototype.hasOwnProperty,A_e=Object.prototype.propertyIsEnumerable,sz=(t,e,n)=>e in t?O_e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,D_e=(t,e)=>{for(var n in e||(e={}))R_e.call(e,n)&&sz(t,n,e[n]);if(oz)for(var n of oz(e))A_e.call(e,n)&&sz(t,n,e[n]);return t};function CW(t){return H.createElement("svg",D_e({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem"},t),H.createElement("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}var I_e=Object.defineProperty,L_e=Object.defineProperties,k_e=Object.getOwnPropertyDescriptors,Ux=Object.getOwnPropertySymbols,TW=Object.prototype.hasOwnProperty,OW=Object.prototype.propertyIsEnumerable,az=(t,e,n)=>e in t?I_e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,N_e=(t,e)=>{for(var n in e||(e={}))TW.call(e,n)&&az(t,n,e[n]);if(Ux)for(var n of Ux(e))OW.call(e,n)&&az(t,n,e[n]);return t},F_e=(t,e)=>L_e(t,k_e(e)),z_e=(t,e)=>{var n={};for(var r in t)TW.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Ux)for(var r of Ux(t))e.indexOf(r)<0&&OW.call(t,r)&&(n[r]=t[r]);return n};const U_e={multiple:!1,disableChevronRotation:!1,transitionDuration:200,chevronPosition:"right",variant:"default",chevronSize:24,chevron:H.createElement(CW,null)};function tc(t){const e=nt("Accordion",U_e,t),{id:n,loop:r,children:i,multiple:o,value:s,defaultValue:a,onChange:l,transitionDuration:c,disableChevronRotation:u,chevronPosition:d,chevronSize:f,order:h,chevron:g,classNames:y,styles:_,unstyled:v,variant:x,radius:w}=e,S=z_e(e,["id","loop","children","multiple","value","defaultValue","onChange","transitionDuration","disableChevronRotation","chevronPosition","chevronSize","order","chevron","classNames","styles","unstyled","variant","radius"]);return H.createElement(nye,{id:n,multiple:o,value:s,defaultValue:a,onChange:l,loop:r,transitionDuration:c,disableChevronRotation:u,chevronPosition:d,chevronSize:f,order:h,chevron:g,variant:x,radius:w,classNames:y,styles:_,unstyled:v},H.createElement(Xe,F_e(N_e({},S),{"data-accordion":!0}),i))}tc.Item=hW;tc.Control=_W;tc.Panel=PW;tc.displayName="@mantine/core/Accordion";var B_e=Object.defineProperty,H_e=Object.defineProperties,V_e=Object.getOwnPropertyDescriptors,lz=Object.getOwnPropertySymbols,j_e=Object.prototype.hasOwnProperty,$_e=Object.prototype.propertyIsEnumerable,cz=(t,e,n)=>e in t?B_e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,fT=(t,e)=>{for(var n in e||(e={}))j_e.call(e,n)&&cz(t,n,e[n]);if(lz)for(var n of lz(e))$_e.call(e,n)&&cz(t,n,e[n]);return t},uz=(t,e)=>H_e(t,V_e(e));const G_e=["subtle","filled","outline","light","default","transparent","gradient"],Dy={xs:X(18),sm:X(22),md:X(28),lg:X(34),xl:X(44)};function W_e({variant:t,theme:e,color:n,gradient:r}){const i=e.fn.variant({color:n,variant:t,gradient:r});return t==="gradient"?{border:0,backgroundImage:i.background,color:i.color,"&:hover":e.fn.hover({backgroundSize:"200%"})}:G_e.includes(t)?fT({border:`${X(1)} solid ${i.border}`,backgroundColor:i.background,color:i.color},e.fn.hover({backgroundColor:i.hover})):null}var Y_e=ft((t,{radius:e,color:n,gradient:r},{variant:i,size:o})=>({root:uz(fT({position:"relative",borderRadius:t.fn.radius(e),padding:0,lineHeight:1,display:"flex",alignItems:"center",justifyContent:"center",height:Oe({size:o,sizes:Dy}),minHeight:Oe({size:o,sizes:Dy}),width:Oe({size:o,sizes:Dy}),minWidth:Oe({size:o,sizes:Dy})},W_e({variant:i,theme:t,color:n,gradient:r})),{"&:active":t.activeStyles,"& [data-action-icon-loader]":{maxWidth:"70%"},"&:disabled, &[data-disabled]":{color:t.colors.gray[t.colorScheme==="dark"?6:4],cursor:"not-allowed",backgroundColor:i==="transparent"?void 0:t.fn.themeColor("gray",t.colorScheme==="dark"?8:1),borderColor:i==="transparent"?void 0:t.fn.themeColor("gray",t.colorScheme==="dark"?8:1),backgroundImage:"none",pointerEvents:"none","&:active":{transform:"none"}},"&[data-loading]":{pointerEvents:"none","&::before":uz(fT({content:'""'},t.fn.cover(X(-1))),{backgroundColor:t.colorScheme==="dark"?t.fn.rgba(t.colors.dark[7],.5):"rgba(255, 255, 255, .5)",borderRadius:t.fn.radius(e),cursor:"not-allowed"})}})}));const X_e=Y_e;var Z_e=Object.defineProperty,Bx=Object.getOwnPropertySymbols,RW=Object.prototype.hasOwnProperty,AW=Object.prototype.propertyIsEnumerable,dz=(t,e,n)=>e in t?Z_e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,q_e=(t,e)=>{for(var n in e||(e={}))RW.call(e,n)&&dz(t,n,e[n]);if(Bx)for(var n of Bx(e))AW.call(e,n)&&dz(t,n,e[n]);return t},K_e=(t,e)=>{var n={};for(var r in t)RW.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Bx)for(var r of Bx(t))e.indexOf(r)<0&&AW.call(t,r)&&(n[r]=t[r]);return n};function Q_e(t){var e=t,{size:n,color:r}=e,i=K_e(e,["size","color"]);return H.createElement("svg",q_e({viewBox:"0 0 135 140",xmlns:"http://www.w3.org/2000/svg",fill:r,width:n},i),H.createElement("rect",{y:"10",width:"15",height:"120",rx:"6"},H.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),H.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),H.createElement("rect",{x:"30",y:"10",width:"15",height:"120",rx:"6"},H.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),H.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),H.createElement("rect",{x:"60",width:"15",height:"140",rx:"6"},H.createElement("animate",{attributeName:"height",begin:"0s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),H.createElement("animate",{attributeName:"y",begin:"0s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),H.createElement("rect",{x:"90",y:"10",width:"15",height:"120",rx:"6"},H.createElement("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),H.createElement("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})),H.createElement("rect",{x:"120",y:"10",width:"15",height:"120",rx:"6"},H.createElement("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),H.createElement("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})))}var J_e=Object.defineProperty,Hx=Object.getOwnPropertySymbols,DW=Object.prototype.hasOwnProperty,IW=Object.prototype.propertyIsEnumerable,fz=(t,e,n)=>e in t?J_e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,exe=(t,e)=>{for(var n in e||(e={}))DW.call(e,n)&&fz(t,n,e[n]);if(Hx)for(var n of Hx(e))IW.call(e,n)&&fz(t,n,e[n]);return t},txe=(t,e)=>{var n={};for(var r in t)DW.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Hx)for(var r of Hx(t))e.indexOf(r)<0&&IW.call(t,r)&&(n[r]=t[r]);return n};function nxe(t){var e=t,{size:n,color:r}=e,i=txe(e,["size","color"]);return H.createElement("svg",exe({width:n,height:n,viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg",stroke:r},i),H.createElement("g",{fill:"none",fillRule:"evenodd"},H.createElement("g",{transform:"translate(2.5 2.5)",strokeWidth:"5"},H.createElement("circle",{strokeOpacity:".5",cx:"16",cy:"16",r:"16"}),H.createElement("path",{d:"M32 16c0-9.94-8.06-16-16-16"},H.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 16 16",to:"360 16 16",dur:"1s",repeatCount:"indefinite"})))))}var rxe=Object.defineProperty,Vx=Object.getOwnPropertySymbols,LW=Object.prototype.hasOwnProperty,kW=Object.prototype.propertyIsEnumerable,hz=(t,e,n)=>e in t?rxe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ixe=(t,e)=>{for(var n in e||(e={}))LW.call(e,n)&&hz(t,n,e[n]);if(Vx)for(var n of Vx(e))kW.call(e,n)&&hz(t,n,e[n]);return t},oxe=(t,e)=>{var n={};for(var r in t)LW.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Vx)for(var r of Vx(t))e.indexOf(r)<0&&kW.call(t,r)&&(n[r]=t[r]);return n};function sxe(t){var e=t,{size:n,color:r}=e,i=oxe(e,["size","color"]);return H.createElement("svg",ixe({width:n,viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg",fill:r},i),H.createElement("circle",{cx:"15",cy:"15",r:"15"},H.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),H.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})),H.createElement("circle",{cx:"60",cy:"15",r:"9",fillOpacity:"0.3"},H.createElement("animate",{attributeName:"r",from:"9",to:"9",begin:"0s",dur:"0.8s",values:"9;15;9",calcMode:"linear",repeatCount:"indefinite"}),H.createElement("animate",{attributeName:"fill-opacity",from:"0.5",to:"0.5",begin:"0s",dur:"0.8s",values:".5;1;.5",calcMode:"linear",repeatCount:"indefinite"})),H.createElement("circle",{cx:"105",cy:"15",r:"15"},H.createElement("animate",{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}),H.createElement("animate",{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"})))}var axe=Object.defineProperty,jx=Object.getOwnPropertySymbols,NW=Object.prototype.hasOwnProperty,FW=Object.prototype.propertyIsEnumerable,pz=(t,e,n)=>e in t?axe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,lxe=(t,e)=>{for(var n in e||(e={}))NW.call(e,n)&&pz(t,n,e[n]);if(jx)for(var n of jx(e))FW.call(e,n)&&pz(t,n,e[n]);return t},cxe=(t,e)=>{var n={};for(var r in t)NW.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&jx)for(var r of jx(t))e.indexOf(r)<0&&FW.call(t,r)&&(n[r]=t[r]);return n};const wP={bars:Q_e,oval:nxe,dots:sxe},uxe={xs:X(18),sm:X(22),md:X(36),lg:X(44),xl:X(58)},dxe={size:"md"};function oA(t){const e=nt("Loader",dxe,t),{size:n,color:r,variant:i}=e,o=cxe(e,["size","color","variant"]),s=Ir(),a=i in wP?i:s.loader;return H.createElement(Xe,lxe({role:"presentation",component:wP[a]||wP.bars,size:Oe({size:n,sizes:uxe}),color:s.fn.variant({variant:"filled",primaryFallback:!1,color:r||s.primaryColor}).background},o))}oA.displayName="@mantine/core/Loader";var fxe=Object.defineProperty,$x=Object.getOwnPropertySymbols,zW=Object.prototype.hasOwnProperty,UW=Object.prototype.propertyIsEnumerable,mz=(t,e,n)=>e in t?fxe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,gz=(t,e)=>{for(var n in e||(e={}))zW.call(e,n)&&mz(t,n,e[n]);if($x)for(var n of $x(e))UW.call(e,n)&&mz(t,n,e[n]);return t},hxe=(t,e)=>{var n={};for(var r in t)zW.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&$x)for(var r of $x(t))e.indexOf(r)<0&&UW.call(t,r)&&(n[r]=t[r]);return n};const pxe={color:"gray",size:"md",variant:"subtle"},BW=M.forwardRef((t,e)=>{const n=nt("ActionIcon",pxe,t),{className:r,color:i,children:o,radius:s,size:a,variant:l,gradient:c,disabled:u,loaderProps:d,loading:f,unstyled:h,__staticSelector:g}=n,y=hxe(n,["className","color","children","radius","size","variant","gradient","disabled","loaderProps","loading","unstyled","__staticSelector"]),{classes:_,cx:v,theme:x}=X_e({radius:s,color:i,gradient:c},{name:["ActionIcon",g],unstyled:h,size:a,variant:l}),w=H.createElement(oA,gz({color:x.fn.variant({color:i,variant:l}).color,size:"100%","data-action-icon-loader":!0},d));return H.createElement(Fs,gz({className:v(_.root,r),ref:e,disabled:u,"data-disabled":u||void 0,"data-loading":f||void 0,unstyled:h},y),f?w:o)});BW.displayName="@mantine/core/ActionIcon";const An=BW;var mxe=Object.defineProperty,gxe=Object.defineProperties,vxe=Object.getOwnPropertyDescriptors,Gx=Object.getOwnPropertySymbols,HW=Object.prototype.hasOwnProperty,VW=Object.prototype.propertyIsEnumerable,vz=(t,e,n)=>e in t?mxe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,yxe=(t,e)=>{for(var n in e||(e={}))HW.call(e,n)&&vz(t,n,e[n]);if(Gx)for(var n of Gx(e))VW.call(e,n)&&vz(t,n,e[n]);return t},_xe=(t,e)=>gxe(t,vxe(e)),xxe=(t,e)=>{var n={};for(var r in t)HW.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Gx)for(var r of Gx(t))e.indexOf(r)<0&&VW.call(t,r)&&(n[r]=t[r]);return n};function jW(t){const e=nt("Portal",{},t),{children:n,target:r,className:i,innerRef:o}=e,s=xxe(e,["children","target","className","innerRef"]),a=Ir(),[l,c]=M.useState(!1),u=M.useRef();return ib(()=>(c(!0),u.current=r?typeof r=="string"?document.querySelector(r):r:document.createElement("div"),r||document.body.appendChild(u.current),()=>{!r&&document.body.removeChild(u.current)}),[r]),l?bg.createPortal(H.createElement("div",_xe(yxe({className:i,dir:a.dir},s),{ref:o}),n),u.current):null}jW.displayName="@mantine/core/Portal";var wxe=Object.defineProperty,Wx=Object.getOwnPropertySymbols,$W=Object.prototype.hasOwnProperty,GW=Object.prototype.propertyIsEnumerable,yz=(t,e,n)=>e in t?wxe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Sxe=(t,e)=>{for(var n in e||(e={}))$W.call(e,n)&&yz(t,n,e[n]);if(Wx)for(var n of Wx(e))GW.call(e,n)&&yz(t,n,e[n]);return t},bxe=(t,e)=>{var n={};for(var r in t)$W.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Wx)for(var r of Wx(t))e.indexOf(r)<0&&GW.call(t,r)&&(n[r]=t[r]);return n};function Kg(t){var e=t,{withinPortal:n=!0,children:r}=e,i=bxe(e,["withinPortal","children"]);return n?H.createElement(jW,Sxe({},i),r):H.createElement(H.Fragment,null,r)}Kg.displayName="@mantine/core/OptionalPortal";var Mxe=Object.defineProperty,Exe=Object.defineProperties,Pxe=Object.getOwnPropertyDescriptors,_z=Object.getOwnPropertySymbols,Cxe=Object.prototype.hasOwnProperty,Txe=Object.prototype.propertyIsEnumerable,xz=(t,e,n)=>e in t?Mxe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,SP=(t,e)=>{for(var n in e||(e={}))Cxe.call(e,n)&&xz(t,n,e[n]);if(_z)for(var n of _z(e))Txe.call(e,n)&&xz(t,n,e[n]);return t},wz=(t,e)=>Exe(t,Pxe(e));function Oxe({variant:t,color:e,theme:n}){if(t==="filled")return{backgroundColor:n.fn.variant({variant:"filled",color:e}).background,color:n.white};if(t==="outline"){const r=n.fn.variant({variant:"outline",color:e});return{color:r.color,borderColor:r.border,backgroundColor:n.colorScheme==="dark"?n.colors.dark[6]:n.white}}if(t==="light"){const r=n.fn.variant({variant:"light",color:e});return{backgroundColor:r.background,color:r.color}}return null}var Rxe=ft((t,{radius:e,color:n},{variant:r})=>({root:SP(wz(SP({},t.fn.fontStyles()),{position:"relative",overflow:"hidden",paddingTop:t.spacing.sm,paddingBottom:t.spacing.sm,paddingLeft:t.spacing.md,paddingRight:t.spacing.sm,borderRadius:t.fn.radius(e),border:`${X(1)} solid transparent`}),Oxe({variant:r,color:n,theme:t})),wrapper:{display:"flex"},body:{flex:1},title:{boxSizing:"border-box",margin:0,marginBottom:t.spacing.xs,display:"flex",alignItems:"center",justifyContent:"space-between",lineHeight:t.lineHeight,fontSize:t.fontSizes.sm,fontWeight:700,"&[data-with-close-button]":{paddingRight:t.spacing.md}},label:{display:"block",overflow:"hidden",textOverflow:"ellipsis"},icon:{lineHeight:1,width:X(20),height:X(20),display:"flex",alignItems:"center",justifyContent:"flex-start",marginRight:t.spacing.md,marginTop:1},message:wz(SP({},t.fn.fontStyles()),{lineHeight:t.lineHeight,textOverflow:"ellipsis",overflow:"hidden",fontSize:t.fontSizes.sm,color:r==="filled"?t.white:t.colorScheme==="dark"?r==="light"?t.white:t.colors.dark[0]:t.black}),closeButton:{width:X(10),height:X(10)}}));const Axe=Rxe;var Dxe=Object.defineProperty,Sz=Object.getOwnPropertySymbols,Ixe=Object.prototype.hasOwnProperty,Lxe=Object.prototype.propertyIsEnumerable,bz=(t,e,n)=>e in t?Dxe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,kxe=(t,e)=>{for(var n in e||(e={}))Ixe.call(e,n)&&bz(t,n,e[n]);if(Sz)for(var n of Sz(e))Lxe.call(e,n)&&bz(t,n,e[n]);return t};function WW(t){return H.createElement("svg",kxe({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),H.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}WW.displayName="@mantine/core/CloseIcon";var Nxe=Object.defineProperty,Yx=Object.getOwnPropertySymbols,YW=Object.prototype.hasOwnProperty,XW=Object.prototype.propertyIsEnumerable,Mz=(t,e,n)=>e in t?Nxe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Fxe=(t,e)=>{for(var n in e||(e={}))YW.call(e,n)&&Mz(t,n,e[n]);if(Yx)for(var n of Yx(e))XW.call(e,n)&&Mz(t,n,e[n]);return t},zxe=(t,e)=>{var n={};for(var r in t)YW.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Yx)for(var r of Yx(t))e.indexOf(r)<0&&XW.call(t,r)&&(n[r]=t[r]);return n};const Uxe={xs:X(12),sm:X(16),md:X(20),lg:X(28),xl:X(34)},Bxe={size:"sm"},ZW=M.forwardRef((t,e)=>{const n=nt("CloseButton",Bxe,t),{iconSize:r,size:i,children:o}=n,s=zxe(n,["iconSize","size","children"]),a=X(r||Uxe[i]);return H.createElement(An,Fxe({ref:e,__staticSelector:"CloseButton",size:i},s),o||H.createElement(WW,{width:a,height:a}))});ZW.displayName="@mantine/core/CloseButton";const Qg=ZW;var Hxe=Object.defineProperty,Xx=Object.getOwnPropertySymbols,qW=Object.prototype.hasOwnProperty,KW=Object.prototype.propertyIsEnumerable,Ez=(t,e,n)=>e in t?Hxe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Vxe=(t,e)=>{for(var n in e||(e={}))qW.call(e,n)&&Ez(t,n,e[n]);if(Xx)for(var n of Xx(e))KW.call(e,n)&&Ez(t,n,e[n]);return t},jxe=(t,e)=>{var n={};for(var r in t)qW.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Xx)for(var r of Xx(t))e.indexOf(r)<0&&KW.call(t,r)&&(n[r]=t[r]);return n};const $xe={variant:"light"},QW=M.forwardRef((t,e)=>{const n=nt("Alert",$xe,t),{id:r,className:i,title:o,variant:s,children:a,color:l,classNames:c,icon:u,styles:d,onClose:f,radius:h,withCloseButton:g,closeButtonLabel:y,unstyled:_}=n,v=jxe(n,["id","className","title","variant","children","color","classNames","icon","styles","onClose","radius","withCloseButton","closeButtonLabel","unstyled"]),{classes:x,cx:w}=Axe({color:l,radius:h},{classNames:c,styles:d,unstyled:_,variant:s,name:"Alert"}),S=zo(r),E=o&&`${S}-title`,C=`${S}-body`;return H.createElement(Xe,Vxe({id:S,role:"alert","aria-labelledby":E,"aria-describedby":C,className:w(x.root,x[s],i),ref:e},v),H.createElement("div",{className:x.wrapper},u&&H.createElement("div",{className:x.icon},u),H.createElement("div",{className:x.body},o&&H.createElement("div",{className:x.title,"data-with-close-button":g||void 0},H.createElement("span",{id:E,className:x.label},o)),H.createElement("div",{id:C,className:x.message},a)),g&&H.createElement(Qg,{className:x.closeButton,onClick:f,variant:"transparent",size:16,iconSize:16,"aria-label":y})))});QW.displayName="@mantine/core/Alert";var Gxe=Object.defineProperty,Wxe=Object.defineProperties,Yxe=Object.getOwnPropertyDescriptors,Pz=Object.getOwnPropertySymbols,Xxe=Object.prototype.hasOwnProperty,Zxe=Object.prototype.propertyIsEnumerable,Cz=(t,e,n)=>e in t?Gxe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Iy=(t,e)=>{for(var n in e||(e={}))Xxe.call(e,n)&&Cz(t,n,e[n]);if(Pz)for(var n of Pz(e))Zxe.call(e,n)&&Cz(t,n,e[n]);return t},qxe=(t,e)=>Wxe(t,Yxe(e));function Kxe({underline:t,strikethrough:e}){const n=[];return t&&n.push("underline"),e&&n.push("line-through"),n.length>0?n.join(" "):"none"}function Qxe({theme:t,color:e}){return e==="dimmed"?t.fn.dimmed():typeof e=="string"&&(e in t.colors||e.split(".")[0]in t.colors)?t.fn.variant({variant:"filled",color:e}).background:e||"inherit"}function Jxe(t){return typeof t=="number"?{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:t,WebkitBoxOrient:"vertical"}:null}function ewe({theme:t,truncate:e}){return e==="start"?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",direction:t.dir==="ltr"?"rtl":"ltr",textAlign:t.dir==="ltr"?"right":"left"}:e?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}:null}var twe=ft((t,{color:e,lineClamp:n,truncate:r,inline:i,inherit:o,underline:s,gradient:a,weight:l,transform:c,align:u,strikethrough:d,italic:f},{size:h})=>{const g=t.fn.variant({variant:"gradient",gradient:a});return{root:qxe(Iy(Iy(Iy(Iy({},t.fn.fontStyles()),t.fn.focusStyles()),Jxe(n)),ewe({theme:t,truncate:r})),{color:Qxe({color:e,theme:t}),fontFamily:o?"inherit":t.fontFamily,fontSize:o||h===void 0?"inherit":Oe({size:h,sizes:t.fontSizes}),lineHeight:o?"inherit":i?1:t.lineHeight,textDecoration:Kxe({underline:s,strikethrough:d}),WebkitTapHighlightColor:"transparent",fontWeight:o?"inherit":l,textTransform:c,textAlign:u,fontStyle:f?"italic":void 0}),gradient:{backgroundImage:g.background,WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"}}});const nwe=twe;var rwe=Object.defineProperty,Zx=Object.getOwnPropertySymbols,JW=Object.prototype.hasOwnProperty,e7=Object.prototype.propertyIsEnumerable,Tz=(t,e,n)=>e in t?rwe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,iwe=(t,e)=>{for(var n in e||(e={}))JW.call(e,n)&&Tz(t,n,e[n]);if(Zx)for(var n of Zx(e))e7.call(e,n)&&Tz(t,n,e[n]);return t},owe=(t,e)=>{var n={};for(var r in t)JW.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Zx)for(var r of Zx(t))e.indexOf(r)<0&&e7.call(t,r)&&(n[r]=t[r]);return n};const swe={variant:"text"},t7=M.forwardRef((t,e)=>{const n=nt("Text",swe,t),{className:r,size:i,weight:o,transform:s,color:a,align:l,variant:c,lineClamp:u,truncate:d,gradient:f,inline:h,inherit:g,underline:y,strikethrough:_,italic:v,classNames:x,styles:w,unstyled:S,span:E,__staticSelector:C}=n,O=owe(n,["className","size","weight","transform","color","align","variant","lineClamp","truncate","gradient","inline","inherit","underline","strikethrough","italic","classNames","styles","unstyled","span","__staticSelector"]),{classes:R,cx:T}=nwe({color:a,lineClamp:u,truncate:d,inline:h,inherit:g,underline:y,strikethrough:_,italic:v,weight:o,transform:s,align:l,gradient:f},{unstyled:S,name:C||"Text",variant:c,size:i});return H.createElement(Xe,iwe({ref:e,className:T(R.root,{[R.gradient]:c==="gradient"},r),component:E?"span":"div"},O))});t7.displayName="@mantine/core/Text";const Si=t7,n7=M.createContext({zIndex:1e3,fixed:!1,layout:"default"});n7.Provider;function r7(){return M.useContext(n7)}function sb(t,e){if(!t)return[];const n=Object.keys(t).filter(r=>r!=="base").map(r=>[Oe({size:r,sizes:e.breakpoints,units:"em"}),t[r]]);return n.sort((r,i)=>js(r[0])-js(i[0])),n}var awe=Object.defineProperty,lwe=Object.defineProperties,cwe=Object.getOwnPropertyDescriptors,Oz=Object.getOwnPropertySymbols,uwe=Object.prototype.hasOwnProperty,dwe=Object.prototype.propertyIsEnumerable,Rz=(t,e,n)=>e in t?awe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ly=(t,e)=>{for(var n in e||(e={}))uwe.call(e,n)&&Rz(t,n,e[n]);if(Oz)for(var n of Oz(e))dwe.call(e,n)&&Rz(t,n,e[n]);return t},Az=(t,e)=>lwe(t,cwe(e)),fwe=ft((t,{height:e,width:n,fixed:r,position:i,hiddenBreakpoint:o,zIndex:s,section:a,withBorder:l,layout:c})=>{const u=typeof n=="object"&&n!==null?sb(n,t).reduce((f,[h,g])=>(f[`@media (min-width: ${ls(h)})`]={width:X(g),minWidth:X(g)},f),{}):null,d=l?{[a==="navbar"?"borderRight":"borderLeft"]:`${X(1)} solid ${t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[2]}`}:{};return{root:Az(Ly(Ly(Az(Ly(Ly({},t.fn.fontStyles()),i),{top:c==="alt"?0:i?.top||"var(--mantine-header-height)",bottom:0,zIndex:s,height:e?X(e):c==="alt"?"auto":"calc(100vh - var(--mantine-header-height, 0rem) - var(--mantine-footer-height, 0rem))",width:n?.base?X(n?.base):"100%",position:r?"fixed":"static",boxSizing:"border-box",display:"flex",flexDirection:"column",backgroundColor:t.colorScheme==="dark"?t.colors.dark[7]:t.white}),d),u),{"&[data-hidden]":{[`@media (max-width: ${ls(js(Oe({size:o,sizes:t.breakpoints}))-1)})`]:{display:"none"}}})}});const hwe=fwe;var pwe=Object.defineProperty,qx=Object.getOwnPropertySymbols,i7=Object.prototype.hasOwnProperty,o7=Object.prototype.propertyIsEnumerable,Dz=(t,e,n)=>e in t?pwe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Iz=(t,e)=>{for(var n in e||(e={}))i7.call(e,n)&&Dz(t,n,e[n]);if(qx)for(var n of qx(e))o7.call(e,n)&&Dz(t,n,e[n]);return t},mwe=(t,e)=>{var n={};for(var r in t)i7.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&qx)for(var r of qx(t))e.indexOf(r)<0&&o7.call(t,r)&&(n[r]=t[r]);return n};const s7=M.forwardRef((t,e)=>{var n=t,{width:r,height:i,fixed:o=!1,position:s,zIndex:a,hiddenBreakpoint:l="md",hidden:c=!1,withBorder:u=!0,className:d,classNames:f,styles:h,children:g,section:y,__staticSelector:_,unstyled:v,variant:x}=n,w=mwe(n,["width","height","fixed","position","zIndex","hiddenBreakpoint","hidden","withBorder","className","classNames","styles","children","section","__staticSelector","unstyled","variant"]);const S=r7(),{classes:E,cx:C,theme:O}=hwe({width:r,height:i,fixed:S.fixed||o,position:s,hiddenBreakpoint:l,zIndex:a||S.zIndex||Ys("app"),section:y,withBorder:u,layout:S.layout},{classNames:f,styles:h,name:_,unstyled:v,variant:x}),R=sb(r,O).reduce((T,[A,F])=>(T[`@media (min-width: ${ls(A)})`]={[`--mantine-${y}-width`]:X(F)},T),{});return H.createElement(Xe,Iz({component:y==="navbar"?"nav":"aside",ref:e,"data-hidden":c||void 0,className:C(E.root,d)},w),g,H.createElement(qG,{styles:()=>({":root":Iz({[`--mantine-${y}-width`]:r?.base?X(r.base):"0rem"},R)})}))});s7.displayName="@mantine/core/HorizontalSection";var gwe=Object.defineProperty,Kx=Object.getOwnPropertySymbols,a7=Object.prototype.hasOwnProperty,l7=Object.prototype.propertyIsEnumerable,Lz=(t,e,n)=>e in t?gwe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,vwe=(t,e)=>{for(var n in e||(e={}))a7.call(e,n)&&Lz(t,n,e[n]);if(Kx)for(var n of Kx(e))l7.call(e,n)&&Lz(t,n,e[n]);return t},ywe=(t,e)=>{var n={};for(var r in t)a7.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Kx)for(var r of Kx(t))e.indexOf(r)<0&&l7.call(t,r)&&(n[r]=t[r]);return n};const c7=M.forwardRef((t,e)=>{var n=t,{children:r,grow:i=!1,sx:o}=n,s=ywe(n,["children","grow","sx"]);return H.createElement(Xe,vwe({ref:e,sx:[{flex:i?1:0,boxSizing:"border-box"},...Ph(o)]},s),r)});c7.displayName="@mantine/core/Section";const _we=c7;var xwe=Object.defineProperty,wwe=Object.defineProperties,Swe=Object.getOwnPropertyDescriptors,kz=Object.getOwnPropertySymbols,bwe=Object.prototype.hasOwnProperty,Mwe=Object.prototype.propertyIsEnumerable,Nz=(t,e,n)=>e in t?xwe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,bP=(t,e)=>{for(var n in e||(e={}))bwe.call(e,n)&&Nz(t,n,e[n]);if(kz)for(var n of kz(e))Mwe.call(e,n)&&Nz(t,n,e[n]);return t},Fz=(t,e)=>wwe(t,Swe(e)),Ewe=ft((t,{height:e,fixed:n,position:r,zIndex:i,borderPosition:o,layout:s})=>{const a=typeof e=="object"&&e!==null?sb(e,t).reduce((l,[c,u])=>(l[`@media (min-width: ${ls(c)})`]={height:X(u),minHeight:X(u)},l),{}):null;return{root:Fz(bP(Fz(bP(bP({},t.fn.fontStyles()),r),{zIndex:i,left:s==="alt"?"var(--mantine-navbar-width, 0)":0,right:s==="alt"?"var(--mantine-aside-width, 0)":0,height:typeof e=="object"?X(e?.base)||"100%":X(e),maxHeight:typeof e=="object"?X(e?.base)||"100%":X(e),position:n?"fixed":"static",boxSizing:"border-box",backgroundColor:t.colorScheme==="dark"?t.colors.dark[7]:t.white}),a),{borderBottom:o==="bottom"?`${X(1)} solid ${t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[2]}`:void 0,borderTop:o==="top"?`${X(1)} solid ${t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[2]}`:void 0})}});const Pwe=Ewe;var Cwe=Object.defineProperty,Qx=Object.getOwnPropertySymbols,u7=Object.prototype.hasOwnProperty,d7=Object.prototype.propertyIsEnumerable,zz=(t,e,n)=>e in t?Cwe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Uz=(t,e)=>{for(var n in e||(e={}))u7.call(e,n)&&zz(t,n,e[n]);if(Qx)for(var n of Qx(e))d7.call(e,n)&&zz(t,n,e[n]);return t},Twe=(t,e)=>{var n={};for(var r in t)u7.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Qx)for(var r of Qx(t))e.indexOf(r)<0&&d7.call(t,r)&&(n[r]=t[r]);return n};const f7=M.forwardRef((t,e)=>{var n=t,{children:r,className:i,classNames:o,styles:s,height:a,fixed:l=!1,withBorder:c=!0,position:u,zIndex:d,section:f,unstyled:h,__staticSelector:g,variant:y}=n,_=Twe(n,["children","className","classNames","styles","height","fixed","withBorder","position","zIndex","section","unstyled","__staticSelector","variant"]);const v=r7(),x=d||v.zIndex||Ys("app"),{classes:w,cx:S,theme:E}=Pwe({height:a,fixed:v.fixed||l,position:u,zIndex:typeof x=="number"&&v.layout==="default"?x+1:x,layout:v.layout,borderPosition:c?f==="header"?"bottom":"top":"none"},{name:g,classNames:o,styles:s,unstyled:h,variant:y}),C=typeof a=="object"&&a!==null?sb(a,E).reduce((O,[R,T])=>(O[`@media (min-width: ${ls(R)})`]={[`--mantine-${f}-height`]:X(T)},O),{}):null;return H.createElement(Xe,Uz({component:f==="header"?"header":"footer",className:S(w.root,i),ref:e},_),r,H.createElement(qG,{styles:()=>({":root":Uz({[`--mantine-${f}-height`]:typeof a=="object"?X(a?.base)||"100%":X(a)},C)})}))});f7.displayName="@mantine/core/VerticalSection";var Owe=Object.defineProperty,Rwe=Object.defineProperties,Awe=Object.getOwnPropertyDescriptors,Bz=Object.getOwnPropertySymbols,Dwe=Object.prototype.hasOwnProperty,Iwe=Object.prototype.propertyIsEnumerable,Hz=(t,e,n)=>e in t?Owe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Lwe=(t,e)=>{for(var n in e||(e={}))Dwe.call(e,n)&&Hz(t,n,e[n]);if(Bz)for(var n of Bz(e))Iwe.call(e,n)&&Hz(t,n,e[n]);return t},kwe=(t,e)=>Rwe(t,Awe(e));const Nwe={fixed:!1,position:{top:0,left:0,right:0}},h7=M.forwardRef((t,e)=>{const n=nt("Header",Nwe,t);return H.createElement(f7,kwe(Lwe({section:"header",__staticSelector:"Header"},n),{ref:e}))});h7.displayName="@mantine/core/Header";var Fwe=Object.defineProperty,Vz=Object.getOwnPropertySymbols,zwe=Object.prototype.hasOwnProperty,Uwe=Object.prototype.propertyIsEnumerable,jz=(t,e,n)=>e in t?Fwe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Bwe=(t,e)=>{for(var n in e||(e={}))zwe.call(e,n)&&jz(t,n,e[n]);if(Vz)for(var n of Vz(e))Uwe.call(e,n)&&jz(t,n,e[n]);return t};const Hwe={fixed:!1,position:{top:0,right:0},hiddenBreakpoint:"md",hidden:!1},sA=M.forwardRef((t,e)=>{const n=nt("Aside",Hwe,t);return H.createElement(s7,Bwe({section:"aside",__staticSelector:"Aside",ref:e},n))});sA.Section=_we;sA.displayName="@mantine/core/Aside";const ky={xs:X(1),sm:X(2),md:X(3),lg:X(4),xl:X(5)};function Ny(t,e){const n=t.fn.variant({variant:"outline",color:e}).border;return typeof e=="string"&&(e in t.colors||e.split(".")[0]in t.colors)?n:e===void 0?t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[4]:e}var Vwe=ft((t,{color:e},{size:n,variant:r})=>({root:{},withLabel:{borderTop:"0 !important"},left:{"&::before":{display:"none"}},right:{"&::after":{display:"none"}},label:{display:"flex",alignItems:"center","&::before":{content:'""',flex:1,height:X(1),borderTop:`${Oe({size:n,sizes:ky})} ${r} ${Ny(t,e)}`,marginRight:t.spacing.xs},"&::after":{content:'""',flex:1,borderTop:`${Oe({size:n,sizes:ky})} ${r} ${Ny(t,e)}`,marginLeft:t.spacing.xs}},labelDefaultStyles:{color:e==="dark"?t.colors.dark[1]:t.fn.themeColor(e,t.colorScheme==="dark"?5:t.fn.primaryShade(),!1)},horizontal:{border:0,borderTopWidth:X(Oe({size:n,sizes:ky})),borderTopColor:Ny(t,e),borderTopStyle:r,margin:0},vertical:{border:0,alignSelf:"stretch",height:"auto",borderLeftWidth:X(Oe({size:n,sizes:ky})),borderLeftColor:Ny(t,e),borderLeftStyle:r}}));const jwe=Vwe;var $we=Object.defineProperty,Gwe=Object.defineProperties,Wwe=Object.getOwnPropertyDescriptors,Jx=Object.getOwnPropertySymbols,p7=Object.prototype.hasOwnProperty,m7=Object.prototype.propertyIsEnumerable,$z=(t,e,n)=>e in t?$we(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Gz=(t,e)=>{for(var n in e||(e={}))p7.call(e,n)&&$z(t,n,e[n]);if(Jx)for(var n of Jx(e))m7.call(e,n)&&$z(t,n,e[n]);return t},Ywe=(t,e)=>Gwe(t,Wwe(e)),Xwe=(t,e)=>{var n={};for(var r in t)p7.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Jx)for(var r of Jx(t))e.indexOf(r)<0&&m7.call(t,r)&&(n[r]=t[r]);return n};const Zwe={orientation:"horizontal",size:"xs",labelPosition:"left",variant:"solid"},hg=M.forwardRef((t,e)=>{const n=nt("Divider",Zwe,t),{className:r,color:i,orientation:o,size:s,label:a,labelPosition:l,labelProps:c,variant:u,styles:d,classNames:f,unstyled:h}=n,g=Xwe(n,["className","color","orientation","size","label","labelPosition","labelProps","variant","styles","classNames","unstyled"]),{classes:y,cx:_}=jwe({color:i},{classNames:f,styles:d,unstyled:h,name:"Divider",variant:u,size:s}),v=o==="vertical",x=o==="horizontal",w=!!a&&x,S=!c?.color;return H.createElement(Xe,Gz({ref:e,className:_(y.root,{[y.vertical]:v,[y.horizontal]:x,[y.withLabel]:w},r),role:"separator"},g),w&&H.createElement(Si,Ywe(Gz({},c),{size:c?.size||"xs",mt:X(2),className:_(y.label,y[l],{[y.labelDefaultStyles]:S})}),a))});hg.displayName="@mantine/core/Divider";var qwe=Object.defineProperty,Kwe=Object.defineProperties,Qwe=Object.getOwnPropertyDescriptors,Wz=Object.getOwnPropertySymbols,Jwe=Object.prototype.hasOwnProperty,e1e=Object.prototype.propertyIsEnumerable,Yz=(t,e,n)=>e in t?qwe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Xz=(t,e)=>{for(var n in e||(e={}))Jwe.call(e,n)&&Yz(t,n,e[n]);if(Wz)for(var n of Wz(e))e1e.call(e,n)&&Yz(t,n,e[n]);return t},t1e=(t,e)=>Kwe(t,Qwe(e)),n1e=ft((t,e,{size:n})=>({item:t1e(Xz({},t.fn.fontStyles()),{boxSizing:"border-box",wordBreak:"break-all",textAlign:"left",width:"100%",padding:`calc(${Oe({size:n,sizes:t.spacing})} / 1.5) ${Oe({size:n,sizes:t.spacing})}`,cursor:"pointer",fontSize:Oe({size:n,sizes:t.fontSizes}),color:t.colorScheme==="dark"?t.colors.dark[0]:t.black,borderRadius:t.fn.radius(),"&[data-hovered]":{backgroundColor:t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[1]},"&[data-selected]":Xz({backgroundColor:t.fn.variant({variant:"filled"}).background,color:t.fn.variant({variant:"filled"}).color},t.fn.hover({backgroundColor:t.fn.variant({variant:"filled"}).hover})),"&[data-disabled]":{cursor:"default",color:t.colors.dark[2]}}),nothingFound:{boxSizing:"border-box",color:t.colors.gray[6],paddingTop:`calc(${Oe({size:n,sizes:t.spacing})} / 2)`,paddingBottom:`calc(${Oe({size:n,sizes:t.spacing})} / 2)`,textAlign:"center"},separator:{boxSizing:"border-box",textAlign:"left",width:"100%",padding:`calc(${Oe({size:n,sizes:t.spacing})} / 1.5) ${Oe({size:n,sizes:t.spacing})}`},separatorLabel:{color:t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[5]}}));const r1e=n1e;var i1e=Object.defineProperty,Zz=Object.getOwnPropertySymbols,o1e=Object.prototype.hasOwnProperty,s1e=Object.prototype.propertyIsEnumerable,qz=(t,e,n)=>e in t?i1e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,a1e=(t,e)=>{for(var n in e||(e={}))o1e.call(e,n)&&qz(t,n,e[n]);if(Zz)for(var n of Zz(e))s1e.call(e,n)&&qz(t,n,e[n]);return t};function aA({data:t,hovered:e,classNames:n,styles:r,isItemSelected:i,uuid:o,__staticSelector:s,onItemHover:a,onItemSelect:l,itemsRefs:c,itemComponent:u,size:d,nothingFound:f,creatable:h,createLabel:g,unstyled:y,variant:_}){const{classes:v}=r1e(null,{classNames:n,styles:r,unstyled:y,name:s,variant:_,size:d}),x=[],w=[];let S=null;const E=(O,R)=>{const T=typeof i=="function"?i(O.value):!1;return H.createElement(u,a1e({key:O.value,className:v.item,"data-disabled":O.disabled||void 0,"data-hovered":!O.disabled&&e===R||void 0,"data-selected":!O.disabled&&T||void 0,selected:T,onMouseEnter:()=>a(R),id:`${o}-${R}`,role:"option",tabIndex:-1,"aria-selected":e===R,ref:A=>{c&&c.current&&(c.current[O.value]=A)},onMouseDown:O.disabled?null:A=>{A.preventDefault(),l(O)},disabled:O.disabled,variant:_},O))};let C=null;if(t.forEach((O,R)=>{O.creatable?S=R:O.group?(C!==O.group&&(C=O.group,w.push(H.createElement("div",{className:v.separator,key:`__mantine-divider-${R}`},H.createElement(hg,{classNames:{label:v.separatorLabel},label:O.group})))),w.push(E(O,R))):x.push(E(O,R))}),h){const O=t[S];x.push(H.createElement("div",{key:rA(),className:v.item,"data-hovered":e===S||void 0,onMouseEnter:()=>a(S),onMouseDown:R=>{R.preventDefault(),l(O)},tabIndex:-1,ref:R=>{c&&c.current&&(c.current[O.value]=R)}},g))}return w.length>0&&x.length>0&&x.unshift(H.createElement("div",{className:v.separator,key:"empty-group-separator"},H.createElement(hg,null))),w.length>0||x.length>0?H.createElement(H.Fragment,null,w,x):H.createElement(Si,{size:d,unstyled:y,className:v.nothingFound},f)}aA.displayName="@mantine/core/SelectItems";var l1e=Object.defineProperty,ew=Object.getOwnPropertySymbols,g7=Object.prototype.hasOwnProperty,v7=Object.prototype.propertyIsEnumerable,Kz=(t,e,n)=>e in t?l1e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,c1e=(t,e)=>{for(var n in e||(e={}))g7.call(e,n)&&Kz(t,n,e[n]);if(ew)for(var n of ew(e))v7.call(e,n)&&Kz(t,n,e[n]);return t},u1e=(t,e)=>{var n={};for(var r in t)g7.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&ew)for(var r of ew(t))e.indexOf(r)<0&&v7.call(t,r)&&(n[r]=t[r]);return n};const lA=M.forwardRef((t,e)=>{var n=t,{label:r,value:i}=n,o=u1e(n,["label","value"]);return H.createElement("div",c1e({ref:e},o),r||i)});lA.displayName="@mantine/core/DefaultItem";function d1e(t,e){typeof t=="function"?t(e):t!=null&&(t.current=e)}function y7(...t){return e=>t.forEach(n=>d1e(n,e))}function dd(...t){return M.useCallback(y7(...t),t)}const _7=M.forwardRef((t,e)=>{const{children:n,...r}=t,i=M.Children.toArray(n),o=i.find(h1e);if(o){const s=o.props.children,a=i.map(l=>l===o?M.Children.count(s)>1?M.Children.only(null):M.isValidElement(s)?s.props.children:null:l);return M.createElement(hT,yn({},r,{ref:e}),M.isValidElement(s)?M.cloneElement(s,void 0,a):null)}return M.createElement(hT,yn({},r,{ref:e}),n)});_7.displayName="Slot";const hT=M.forwardRef((t,e)=>{const{children:n,...r}=t;return M.isValidElement(n)?M.cloneElement(n,{...p1e(r,n.props),ref:y7(e,n.ref)}):M.Children.count(n)>1?M.Children.only(null):null});hT.displayName="SlotClone";const f1e=({children:t})=>M.createElement(M.Fragment,null,t);function h1e(t){return M.isValidElement(t)&&t.type===f1e}function p1e(t,e){const n={...e};for(const r in e){const i=t[r],o=e[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...a)=>{o(...a),i(...a)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...t,...n}}const m1e=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],Jg=m1e.reduce((t,e)=>{const n=M.forwardRef((r,i)=>{const{asChild:o,...s}=r,a=o?_7:e;return M.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),M.createElement(a,yn({},s,{ref:i}))});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{}),pT=globalThis?.document?M.useLayoutEffect:()=>{};function g1e(t,e){return M.useReducer((n,r)=>{const i=e[n][r];return i??n},t)}const ev=t=>{const{present:e,children:n}=t,r=v1e(e),i=typeof n=="function"?n({present:r.isPresent}):M.Children.only(n),o=dd(r.ref,i.ref);return typeof n=="function"||r.isPresent?M.cloneElement(i,{ref:o}):null};ev.displayName="Presence";function v1e(t){const[e,n]=M.useState(),r=M.useRef({}),i=M.useRef(t),o=M.useRef("none"),s=t?"mounted":"unmounted",[a,l]=g1e(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return M.useEffect(()=>{const c=Fy(r.current);o.current=a==="mounted"?c:"none"},[a]),pT(()=>{const c=r.current,u=i.current;if(u!==t){const f=o.current,h=Fy(c);t?l("MOUNT"):h==="none"||c?.display==="none"?l("UNMOUNT"):l(u&&f!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,l]),pT(()=>{if(e){const c=d=>{const h=Fy(r.current).includes(d.animationName);d.target===e&&h&&bg.flushSync(()=>l("ANIMATION_END"))},u=d=>{d.target===e&&(o.current=Fy(r.current))};return e.addEventListener("animationstart",u),e.addEventListener("animationcancel",c),e.addEventListener("animationend",c),()=>{e.removeEventListener("animationstart",u),e.removeEventListener("animationcancel",c),e.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:M.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function Fy(t){return t?.animationName||"none"}function y1e(t,e=[]){let n=[];function r(o,s){const a=M.createContext(s),l=n.length;n=[...n,s];function c(d){const{scope:f,children:h,...g}=d,y=f?.[t][l]||a,_=M.useMemo(()=>g,Object.values(g));return M.createElement(y.Provider,{value:_},h)}function u(d,f){const h=f?.[t][l]||a,g=M.useContext(h);if(g)return g;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${o}\``)}return c.displayName=o+"Provider",[c,u]}const i=()=>{const o=n.map(s=>M.createContext(s));return function(a){const l=a?.[t]||o;return M.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return i.scopeName=t,[r,_1e(i,...e)]}function _1e(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=r.reduce((a,{useScope:l,scopeName:c})=>{const d=l(o)[`__scope${c}`];return{...a,...d}},{});return M.useMemo(()=>({[`__scope${e.scopeName}`]:s}),[s])}};return n.scopeName=e.scopeName,n}function yu(t){const e=M.useRef(t);return M.useEffect(()=>{e.current=t}),M.useMemo(()=>(...n)=>{var r;return(r=e.current)===null||r===void 0?void 0:r.call(e,...n)},[])}const x1e=M.createContext(void 0);function w1e(t){const e=M.useContext(x1e);return t||e||"ltr"}function S1e(t,[e,n]){return Math.min(n,Math.max(e,t))}function Vu(t,e,{checkForDefaultPrevented:n=!0}={}){return function(i){if(t?.(i),n===!1||!i.defaultPrevented)return e?.(i)}}function b1e(t,e){return M.useReducer((n,r)=>{const i=e[n][r];return i??n},t)}const x7="ScrollArea",[w7,O5e]=y1e(x7),[M1e,ps]=w7(x7),E1e=M.forwardRef((t,e)=>{const{__scopeScrollArea:n,type:r="hover",dir:i,scrollHideDelay:o=600,...s}=t,[a,l]=M.useState(null),[c,u]=M.useState(null),[d,f]=M.useState(null),[h,g]=M.useState(null),[y,_]=M.useState(null),[v,x]=M.useState(0),[w,S]=M.useState(0),[E,C]=M.useState(!1),[O,R]=M.useState(!1),T=dd(e,F=>l(F)),A=w1e(i);return M.createElement(M1e,{scope:n,type:r,dir:A,scrollHideDelay:o,scrollArea:a,viewport:c,onViewportChange:u,content:d,onContentChange:f,scrollbarX:h,onScrollbarXChange:g,scrollbarXEnabled:E,onScrollbarXEnabledChange:C,scrollbarY:y,onScrollbarYChange:_,scrollbarYEnabled:O,onScrollbarYEnabledChange:R,onCornerWidthChange:x,onCornerHeightChange:S},M.createElement(Jg.div,yn({dir:A},s,{ref:T,style:{position:"relative",["--radix-scroll-area-corner-width"]:v+"px",["--radix-scroll-area-corner-height"]:w+"px",...t.style}})))}),P1e="ScrollAreaViewport",C1e=M.forwardRef((t,e)=>{const{__scopeScrollArea:n,children:r,...i}=t,o=ps(P1e,n),s=M.useRef(null),a=dd(e,s,o.onViewportChange);return M.createElement(M.Fragment,null,M.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"}}),M.createElement(Jg.div,yn({"data-radix-scroll-area-viewport":""},i,{ref:a,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...t.style}}),M.createElement("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"}},r)))}),bl="ScrollAreaScrollbar",T1e=M.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=ps(bl,t.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:s}=i,a=t.orientation==="horizontal";return M.useEffect(()=>(a?o(!0):s(!0),()=>{a?o(!1):s(!1)}),[a,o,s]),i.type==="hover"?M.createElement(O1e,yn({},r,{ref:e,forceMount:n})):i.type==="scroll"?M.createElement(R1e,yn({},r,{ref:e,forceMount:n})):i.type==="auto"?M.createElement(S7,yn({},r,{ref:e,forceMount:n})):i.type==="always"?M.createElement(cA,yn({},r,{ref:e})):null}),O1e=M.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=ps(bl,t.__scopeScrollArea),[o,s]=M.useState(!1);return M.useEffect(()=>{const a=i.scrollArea;let l=0;if(a){const c=()=>{window.clearTimeout(l),s(!0)},u=()=>{l=window.setTimeout(()=>s(!1),i.scrollHideDelay)};return a.addEventListener("pointerenter",c),a.addEventListener("pointerleave",u),()=>{window.clearTimeout(l),a.removeEventListener("pointerenter",c),a.removeEventListener("pointerleave",u)}}},[i.scrollArea,i.scrollHideDelay]),M.createElement(ev,{present:n||o},M.createElement(S7,yn({"data-state":o?"visible":"hidden"},r,{ref:e})))}),R1e=M.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=ps(bl,t.__scopeScrollArea),o=t.orientation==="horizontal",s=lb(()=>l("SCROLL_END"),100),[a,l]=b1e("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return M.useEffect(()=>{if(a==="idle"){const c=window.setTimeout(()=>l("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(c)}},[a,i.scrollHideDelay,l]),M.useEffect(()=>{const c=i.viewport,u=o?"scrollLeft":"scrollTop";if(c){let d=c[u];const f=()=>{const h=c[u];d!==h&&(l("SCROLL"),s()),d=h};return c.addEventListener("scroll",f),()=>c.removeEventListener("scroll",f)}},[i.viewport,o,l,s]),M.createElement(ev,{present:n||a!=="hidden"},M.createElement(cA,yn({"data-state":a==="hidden"?"hidden":"visible"},r,{ref:e,onPointerEnter:Vu(t.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:Vu(t.onPointerLeave,()=>l("POINTER_LEAVE"))})))}),S7=M.forwardRef((t,e)=>{const n=ps(bl,t.__scopeScrollArea),{forceMount:r,...i}=t,[o,s]=M.useState(!1),a=t.orientation==="horizontal",l=lb(()=>{if(n.viewport){const c=n.viewport.offsetWidth{const{orientation:n="vertical",...r}=t,i=ps(bl,t.__scopeScrollArea),o=M.useRef(null),s=M.useRef(0),[a,l]=M.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=P7(a.viewport,a.content),u={...r,sizes:a,onSizesChange:l,hasThumb:c>0&&c<1,onThumbChange:f=>o.current=f,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:f=>s.current=f};function d(f,h){return z1e(f,s.current,a,h)}return n==="horizontal"?M.createElement(A1e,yn({},u,{ref:e,onThumbPositionChange:()=>{if(i.viewport&&o.current){const f=i.viewport.scrollLeft,h=Qz(f,a,i.dir);o.current.style.transform=`translate3d(${h}px, 0, 0)`}},onWheelScroll:f=>{i.viewport&&(i.viewport.scrollLeft=f)},onDragScroll:f=>{i.viewport&&(i.viewport.scrollLeft=d(f,i.dir))}})):n==="vertical"?M.createElement(D1e,yn({},u,{ref:e,onThumbPositionChange:()=>{if(i.viewport&&o.current){const f=i.viewport.scrollTop,h=Qz(f,a);o.current.style.transform=`translate3d(0, ${h}px, 0)`}},onWheelScroll:f=>{i.viewport&&(i.viewport.scrollTop=f)},onDragScroll:f=>{i.viewport&&(i.viewport.scrollTop=d(f))}})):null}),A1e=M.forwardRef((t,e)=>{const{sizes:n,onSizesChange:r,...i}=t,o=ps(bl,t.__scopeScrollArea),[s,a]=M.useState(),l=M.useRef(null),c=dd(e,l,o.onScrollbarXChange);return M.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),M.createElement(M7,yn({"data-orientation":"horizontal"},i,{ref:c,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,["--radix-scroll-area-thumb-width"]:ab(n)+"px",...t.style},onThumbPointerDown:u=>t.onThumbPointerDown(u.x),onDragScroll:u=>t.onDragScroll(u.x),onWheelScroll:(u,d)=>{if(o.viewport){const f=o.viewport.scrollLeft+u.deltaX;t.onWheelScroll(f),T7(f,d)&&u.preventDefault()}},onResize:()=>{l.current&&o.viewport&&s&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:tw(s.paddingLeft),paddingEnd:tw(s.paddingRight)}})}}))}),D1e=M.forwardRef((t,e)=>{const{sizes:n,onSizesChange:r,...i}=t,o=ps(bl,t.__scopeScrollArea),[s,a]=M.useState(),l=M.useRef(null),c=dd(e,l,o.onScrollbarYChange);return M.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),M.createElement(M7,yn({"data-orientation":"vertical"},i,{ref:c,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)",["--radix-scroll-area-thumb-height"]:ab(n)+"px",...t.style},onThumbPointerDown:u=>t.onThumbPointerDown(u.y),onDragScroll:u=>t.onDragScroll(u.y),onWheelScroll:(u,d)=>{if(o.viewport){const f=o.viewport.scrollTop+u.deltaY;t.onWheelScroll(f),T7(f,d)&&u.preventDefault()}},onResize:()=>{l.current&&o.viewport&&s&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:tw(s.paddingTop),paddingEnd:tw(s.paddingBottom)}})}}))}),[I1e,b7]=w7(bl),M7=M.forwardRef((t,e)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:o,onThumbPointerUp:s,onThumbPointerDown:a,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:u,onResize:d,...f}=t,h=ps(bl,n),[g,y]=M.useState(null),_=dd(e,T=>y(T)),v=M.useRef(null),x=M.useRef(""),w=h.viewport,S=r.content-r.viewport,E=yu(u),C=yu(l),O=lb(d,10);function R(T){if(v.current){const A=T.clientX-v.current.left,F=T.clientY-v.current.top;c({x:A,y:F})}}return M.useEffect(()=>{const T=A=>{const F=A.target;g?.contains(F)&&E(A,S)};return document.addEventListener("wheel",T,{passive:!1}),()=>document.removeEventListener("wheel",T,{passive:!1})},[w,g,S,E]),M.useEffect(C,[r,C]),ah(g,O),ah(h.content,O),M.createElement(I1e,{scope:n,scrollbar:g,hasThumb:i,onThumbChange:yu(o),onThumbPointerUp:yu(s),onThumbPositionChange:C,onThumbPointerDown:yu(a)},M.createElement(Jg.div,yn({},f,{ref:_,style:{position:"absolute",...f.style},onPointerDown:Vu(t.onPointerDown,T=>{T.button===0&&(T.target.setPointerCapture(T.pointerId),v.current=g.getBoundingClientRect(),x.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",R(T))}),onPointerMove:Vu(t.onPointerMove,R),onPointerUp:Vu(t.onPointerUp,T=>{const A=T.target;A.hasPointerCapture(T.pointerId)&&A.releasePointerCapture(T.pointerId),document.body.style.webkitUserSelect=x.current,v.current=null})})))}),mT="ScrollAreaThumb",L1e=M.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=b7(mT,t.__scopeScrollArea);return M.createElement(ev,{present:n||i.hasThumb},M.createElement(k1e,yn({ref:e},r)))}),k1e=M.forwardRef((t,e)=>{const{__scopeScrollArea:n,style:r,...i}=t,o=ps(mT,n),s=b7(mT,n),{onThumbPositionChange:a}=s,l=dd(e,d=>s.onThumbChange(d)),c=M.useRef(),u=lb(()=>{c.current&&(c.current(),c.current=void 0)},100);return M.useEffect(()=>{const d=o.viewport;if(d){const f=()=>{if(u(),!c.current){const h=U1e(d,a);c.current=h,a()}};return a(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[o.viewport,u,a]),M.createElement(Jg.div,yn({"data-state":s.hasThumb?"visible":"hidden"},i,{ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Vu(t.onPointerDownCapture,d=>{const h=d.target.getBoundingClientRect(),g=d.clientX-h.left,y=d.clientY-h.top;s.onThumbPointerDown({x:g,y})}),onPointerUp:Vu(t.onPointerUp,s.onThumbPointerUp)}))}),E7="ScrollAreaCorner",N1e=M.forwardRef((t,e)=>{const n=ps(E7,t.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?M.createElement(F1e,yn({},t,{ref:e})):null}),F1e=M.forwardRef((t,e)=>{const{__scopeScrollArea:n,...r}=t,i=ps(E7,n),[o,s]=M.useState(0),[a,l]=M.useState(0),c=!!(o&&a);return ah(i.scrollbarX,()=>{var u;const d=((u=i.scrollbarX)===null||u===void 0?void 0:u.offsetHeight)||0;i.onCornerHeightChange(d),l(d)}),ah(i.scrollbarY,()=>{var u;const d=((u=i.scrollbarY)===null||u===void 0?void 0:u.offsetWidth)||0;i.onCornerWidthChange(d),s(d)}),c?M.createElement(Jg.div,yn({},r,{ref:e,style:{width:o,height:a,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...t.style}})):null});function tw(t){return t?parseInt(t,10):0}function P7(t,e){const n=t/e;return isNaN(n)?0:n}function ab(t){const e=P7(t.viewport,t.content),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,r=(t.scrollbar.size-n)*e;return Math.max(r,18)}function z1e(t,e,n,r="ltr"){const i=ab(n),o=i/2,s=e||o,a=i-s,l=n.scrollbar.paddingStart+s,c=n.scrollbar.size-n.scrollbar.paddingEnd-a,u=n.content-n.viewport,d=r==="ltr"?[0,u]:[u*-1,0];return C7([l,c],d)(t)}function Qz(t,e,n="ltr"){const r=ab(e),i=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,o=e.scrollbar.size-i,s=e.content-e.viewport,a=o-r,l=n==="ltr"?[0,s]:[s*-1,0],c=S1e(t,l);return C7([0,s],[0,a])(c)}function C7(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(t[1]-t[0]);return e[0]+r*(n-t[0])}}function T7(t,e){return t>0&&t{})=>{let n={left:t.scrollLeft,top:t.scrollTop},r=0;return function i(){const o={left:t.scrollLeft,top:t.scrollTop},s=n.left!==o.left,a=n.top!==o.top;(s||a)&&e(),n=o,r=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(r)};function lb(t,e){const n=yu(t),r=M.useRef(0);return M.useEffect(()=>()=>window.clearTimeout(r.current),[]),M.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,e)},[n,e])}function ah(t,e){const n=yu(e);pT(()=>{let r=0;if(t){const i=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return i.observe(t),()=>{window.cancelAnimationFrame(r),i.unobserve(t)}}},[t,n])}const B1e=E1e,H1e=C1e,Jz=T1e,e4=L1e,V1e=N1e;var j1e=ft((t,{scrollbarSize:e,offsetScrollbars:n,scrollbarHovered:r,hidden:i})=>({root:{overflow:"hidden"},viewport:{width:"100%",height:"100%",paddingRight:n?X(e):void 0,paddingBottom:n?X(e):void 0},scrollbar:{display:i?"none":"flex",userSelect:"none",touchAction:"none",boxSizing:"border-box",padding:`calc(${X(e)} / 5)`,transition:"background-color 150ms ease, opacity 150ms ease","&:hover":{backgroundColor:t.colorScheme==="dark"?t.colors.dark[8]:t.colors.gray[0],[`& .${Ur("thumb")}`]:{backgroundColor:t.colorScheme==="dark"?t.fn.rgba(t.white,.5):t.fn.rgba(t.black,.5)}},'&[data-orientation="vertical"]':{width:X(e)},'&[data-orientation="horizontal"]':{flexDirection:"column",height:X(e)},'&[data-state="hidden"]':{display:"none",opacity:0}},thumb:{ref:Ur("thumb"),flex:1,backgroundColor:t.colorScheme==="dark"?t.fn.rgba(t.white,.4):t.fn.rgba(t.black,.4),borderRadius:X(e),position:"relative",transition:"background-color 150ms ease",display:i?"none":void 0,overflow:"hidden","&::before":{content:'""',position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"100%",height:"100%",minWidth:X(44),minHeight:X(44)}},corner:{backgroundColor:t.colorScheme==="dark"?t.colors.dark[6]:t.colors.gray[0],transition:"opacity 150ms ease",opacity:r?1:0,display:i?"none":void 0}}));const $1e=j1e;var G1e=Object.defineProperty,W1e=Object.defineProperties,Y1e=Object.getOwnPropertyDescriptors,nw=Object.getOwnPropertySymbols,O7=Object.prototype.hasOwnProperty,R7=Object.prototype.propertyIsEnumerable,t4=(t,e,n)=>e in t?G1e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,gT=(t,e)=>{for(var n in e||(e={}))O7.call(e,n)&&t4(t,n,e[n]);if(nw)for(var n of nw(e))R7.call(e,n)&&t4(t,n,e[n]);return t},A7=(t,e)=>W1e(t,Y1e(e)),D7=(t,e)=>{var n={};for(var r in t)O7.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&nw)for(var r of nw(t))e.indexOf(r)<0&&R7.call(t,r)&&(n[r]=t[r]);return n};const I7={scrollbarSize:12,scrollHideDelay:1e3,type:"hover",offsetScrollbars:!1},cb=M.forwardRef((t,e)=>{const n=nt("ScrollArea",I7,t),{children:r,className:i,classNames:o,styles:s,scrollbarSize:a,scrollHideDelay:l,type:c,dir:u,offsetScrollbars:d,viewportRef:f,onScrollPositionChange:h,unstyled:g,variant:y,viewportProps:_}=n,v=D7(n,["children","className","classNames","styles","scrollbarSize","scrollHideDelay","type","dir","offsetScrollbars","viewportRef","onScrollPositionChange","unstyled","variant","viewportProps"]),[x,w]=M.useState(!1),S=Ir(),{classes:E,cx:C}=$1e({scrollbarSize:a,offsetScrollbars:d,scrollbarHovered:x,hidden:c==="never"},{name:"ScrollArea",classNames:o,styles:s,unstyled:g,variant:y});return H.createElement(B1e,{type:c==="never"?"always":c,scrollHideDelay:l,dir:u||S.dir,ref:e,asChild:!0},H.createElement(Xe,gT({className:C(E.root,i)},v),H.createElement(H1e,A7(gT({},_),{className:E.viewport,ref:f,onScroll:typeof h=="function"?({currentTarget:O})=>h({x:O.scrollLeft,y:O.scrollTop}):void 0}),r),H.createElement(Jz,{orientation:"horizontal",className:E.scrollbar,forceMount:!0,onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1)},H.createElement(e4,{className:E.thumb})),H.createElement(Jz,{orientation:"vertical",className:E.scrollbar,forceMount:!0,onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1)},H.createElement(e4,{className:E.thumb})),H.createElement(V1e,{className:E.corner})))}),L7=M.forwardRef((t,e)=>{const n=nt("ScrollAreaAutosize",I7,t),{children:r,classNames:i,styles:o,scrollbarSize:s,scrollHideDelay:a,type:l,dir:c,offsetScrollbars:u,viewportRef:d,onScrollPositionChange:f,unstyled:h,sx:g,variant:y,viewportProps:_}=n,v=D7(n,["children","classNames","styles","scrollbarSize","scrollHideDelay","type","dir","offsetScrollbars","viewportRef","onScrollPositionChange","unstyled","sx","variant","viewportProps"]);return H.createElement(Xe,A7(gT({},v),{ref:e,sx:[{display:"flex"},...Ph(g)]}),H.createElement(Xe,{sx:{display:"flex",flexDirection:"column",flex:1}},H.createElement(cb,{classNames:i,styles:o,scrollHideDelay:a,scrollbarSize:s,type:l,dir:c,offsetScrollbars:u,viewportRef:d,onScrollPositionChange:f,unstyled:h,variant:y,viewportProps:_},r)))});L7.displayName="@mantine/core/ScrollAreaAutosize";cb.displayName="@mantine/core/ScrollArea";cb.Autosize=L7;const k7=cb;var X1e=Object.defineProperty,Z1e=Object.defineProperties,q1e=Object.getOwnPropertyDescriptors,rw=Object.getOwnPropertySymbols,N7=Object.prototype.hasOwnProperty,F7=Object.prototype.propertyIsEnumerable,n4=(t,e,n)=>e in t?X1e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,r4=(t,e)=>{for(var n in e||(e={}))N7.call(e,n)&&n4(t,n,e[n]);if(rw)for(var n of rw(e))F7.call(e,n)&&n4(t,n,e[n]);return t},K1e=(t,e)=>Z1e(t,q1e(e)),Q1e=(t,e)=>{var n={};for(var r in t)N7.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&rw)for(var r of rw(t))e.indexOf(r)<0&&F7.call(t,r)&&(n[r]=t[r]);return n};const ub=M.forwardRef((t,e)=>{var n=t,{style:r}=n,i=Q1e(n,["style"]);return H.createElement(k7,K1e(r4({},i),{style:r4({width:"100%"},r),viewportProps:{tabIndex:-1},viewportRef:e}),i.children)});ub.displayName="@mantine/core/SelectScrollArea";var J1e=ft(()=>({dropdown:{},itemsWrapper:{padding:X(4),display:"flex",width:"100%",boxSizing:"border-box"}}));const eSe=J1e;function Th(t){return t.split("-")[1]}function uA(t){return t==="y"?"height":"width"}function zs(t){return t.split("-")[0]}function Fc(t){return["top","bottom"].includes(zs(t))?"x":"y"}function i4(t,e,n){let{reference:r,floating:i}=t;const o=r.x+r.width/2-i.width/2,s=r.y+r.height/2-i.height/2,a=Fc(e),l=uA(a),c=r[l]/2-i[l]/2,u=a==="x";let d;switch(zs(e)){case"top":d={x:o,y:r.y-i.height};break;case"bottom":d={x:o,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:s};break;case"left":d={x:r.x-i.width,y:s};break;default:d={x:r.x,y:r.y}}switch(Th(e)){case"start":d[a]-=c*(n&&u?-1:1);break;case"end":d[a]+=c*(n&&u?-1:1)}return d}const tSe=async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,a=o.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:d}=i4(c,r,l),f=r,h={},g=0;for(let y=0;y({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:i,rects:o,platform:s,elements:a}=e,{element:l,padding:c=0}=ml(t,e)||{};if(l==null)return{};const u=dA(c),d={x:n,y:r},f=Fc(i),h=uA(f),g=await s.getDimensions(l),y=f==="y",_=y?"top":"left",v=y?"bottom":"right",x=y?"clientHeight":"clientWidth",w=o.reference[h]+o.reference[f]-d[f]-o.floating[h],S=d[f]-o.reference[f],E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l));let C=E?E[x]:0;C&&await(s.isElement==null?void 0:s.isElement(E))||(C=a.floating[x]||o.floating[h]);const O=w/2-S/2,R=C/2-g[h]/2-1,T=Mc(u[_],R),A=Mc(u[v],R),F=T,N=C-g[h]-A,U=C/2-g[h]/2+O,k=vT(F,U,N),z=Th(i)!=null&&U!=k&&o.reference[h]/2-(Ut.concat(e,e+"-start",e+"-end"),[]);const rSe={left:"right",right:"left",bottom:"top",top:"bottom"};function iw(t){return t.replace(/left|right|bottom|top/g,e=>rSe[e])}function iSe(t,e,n){n===void 0&&(n=!1);const r=Th(t),i=Fc(t),o=uA(i);let s=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=iw(s)),{main:s,cross:iw(s)}}const oSe={start:"end",end:"start"};function MP(t){return t.replace(/start|end/g,e=>oSe[e])}const z7=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n;const{placement:r,middlewareData:i,rects:o,initialPlacement:s,platform:a,elements:l}=e,{mainAxis:c=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...y}=ml(t,e),_=zs(r),v=zs(s)===s,x=await(a.isRTL==null?void 0:a.isRTL(l.floating)),w=d||(v||!g?[iw(s)]:function(F){const N=iw(F);return[MP(F),N,MP(N)]}(s));d||h==="none"||w.push(...function(F,N,U,k){const z=Th(F);let G=function(W,B,j){const $=["left","right"],q=["right","left"],K=["top","bottom"],re=["bottom","top"];switch(W){case"top":case"bottom":return j?B?q:$:B?$:q;case"left":case"right":return B?K:re;default:return[]}}(zs(F),U==="start",k);return z&&(G=G.map(W=>W+"-"+z),N&&(G=G.concat(G.map(MP)))),G}(s,g,h,x));const S=[s,...w],E=await fA(e,y),C=[];let O=((n=i.flip)==null?void 0:n.overflows)||[];if(c&&C.push(E[_]),u){const{main:F,cross:N}=iSe(r,o,x);C.push(E[F],E[N])}if(O=[...O,{placement:r,overflows:C}],!C.every(F=>F<=0)){var R,T;const F=(((R=i.flip)==null?void 0:R.index)||0)+1,N=S[F];if(N)return{data:{index:F,overflows:O},reset:{placement:N}};let U=(T=O.filter(k=>k.overflows[0]<=0).sort((k,z)=>k.overflows[1]-z.overflows[1])[0])==null?void 0:T.placement;if(!U)switch(f){case"bestFit":{var A;const k=(A=O.map(z=>[z.placement,z.overflows.filter(G=>G>0).reduce((G,W)=>G+W,0)]).sort((z,G)=>z[1]-G[1])[0])==null?void 0:A[0];k&&(U=k);break}case"initialPlacement":U=s}if(r!==U)return{reset:{placement:U}}}return{}}}};function s4(t){const e=Mc(...t.map(r=>r.left)),n=Mc(...t.map(r=>r.top));return{x:e,y:n,width:ga(...t.map(r=>r.right))-e,height:ga(...t.map(r=>r.bottom))-n}}const U7=function(t){return t===void 0&&(t={}),{name:"inline",options:t,async fn(e){const{placement:n,elements:r,rects:i,platform:o,strategy:s}=e,{padding:a=2,x:l,y:c}=ml(t,e),u=Array.from(await(o.getClientRects==null?void 0:o.getClientRects(r.reference))||[]),d=function(y){const _=y.slice().sort((w,S)=>w.y-S.y),v=[];let x=null;for(let w=0;w<_.length;w++){const S=_[w];!x||S.y-x.y>x.height/2?v.push([S]):v[v.length-1].push(S),x=S}return v.map(w=>lh(s4(w)))}(u),f=lh(s4(u)),h=dA(a),g=await o.getElementRects({reference:{getBoundingClientRect:function(){if(d.length===2&&d[0].left>d[1].right&&l!=null&&c!=null)return d.find(y=>l>y.left-h.left&&ly.top-h.top&&c=2){if(Fc(n)==="x"){const E=d[0],C=d[d.length-1],O=zs(n)==="top",R=E.top,T=C.bottom,A=O?E.left:C.left,F=O?E.right:C.right;return{top:R,bottom:T,left:A,right:F,width:F-A,height:T-R,x:A,y:R}}const y=zs(n)==="left",_=ga(...d.map(E=>E.right)),v=Mc(...d.map(E=>E.left)),x=d.filter(E=>y?E.left===v:E.right===_),w=x[0].top,S=x[x.length-1].bottom;return{top:w,bottom:S,left:v,right:_,width:_-v,height:S-w,x:v,y:w}}return f}},floating:r.floating,strategy:s});return i.reference.x!==g.reference.x||i.reference.y!==g.reference.y||i.reference.width!==g.reference.width||i.reference.height!==g.reference.height?{reset:{rects:g}}:{}}}},B7=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){const{x:n,y:r}=e,i=await async function(o,s){const{placement:a,platform:l,elements:c}=o,u=await(l.isRTL==null?void 0:l.isRTL(c.floating)),d=zs(a),f=Th(a),h=Fc(a)==="x",g=["left","top"].includes(d)?-1:1,y=u&&h?-1:1,_=ml(s,o);let{mainAxis:v,crossAxis:x,alignmentAxis:w}=typeof _=="number"?{mainAxis:_,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,..._};return f&&typeof w=="number"&&(x=f==="end"?-1*w:w),h?{x:x*y,y:v*g}:{x:v*g,y:x*y}}(e,t);return{x:n+i.x,y:r+i.y,data:i}}}};function H7(t){return t==="x"?"y":"x"}const hA=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:i}=e,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:_=>{let{x:v,y:x}=_;return{x:v,y:x}}},...l}=ml(t,e),c={x:n,y:r},u=await fA(e,l),d=Fc(zs(i)),f=H7(d);let h=c[d],g=c[f];if(o){const _=d==="y"?"bottom":"right";h=vT(h+u[d==="y"?"top":"left"],h,h-u[_])}if(s){const _=f==="y"?"bottom":"right";g=vT(g+u[f==="y"?"top":"left"],g,g-u[_])}const y=a.fn({...e,[d]:h,[f]:g});return{...y,data:{x:y.x-n,y:y.y-r}}}}},sSe=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:i,rects:o,middlewareData:s}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=ml(t,e),u={x:n,y:r},d=Fc(i),f=H7(d);let h=u[d],g=u[f];const y=ml(a,e),_=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const w=d==="y"?"height":"width",S=o.reference[d]-o.floating[w]+_.mainAxis,E=o.reference[d]+o.reference[w]-_.mainAxis;hE&&(h=E)}if(c){var v,x;const w=d==="y"?"width":"height",S=["top","left"].includes(zs(i)),E=o.reference[f]-o.floating[w]+(S&&((v=s.offset)==null?void 0:v[f])||0)+(S?0:_.crossAxis),C=o.reference[f]+o.reference[w]+(S?0:((x=s.offset)==null?void 0:x[f])||0)-(S?_.crossAxis:0);gC&&(g=C)}return{[d]:h,[f]:g}}}},aSe=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:r,platform:i,elements:o}=e,{apply:s=()=>{},...a}=ml(t,e),l=await fA(e,a),c=zs(n),u=Th(n),d=Fc(n)==="x",{width:f,height:h}=r.floating;let g,y;c==="top"||c==="bottom"?(g=c,y=u===(await(i.isRTL==null?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(y=c,g=u==="end"?"top":"bottom");const _=h-l[g],v=f-l[y],x=!e.middlewareData.shift;let w=_,S=v;if(d){const C=f-l.left-l.right;S=u||x?Mc(v,C):C}else{const C=h-l.top-l.bottom;w=u||x?Mc(_,C):C}if(x&&!u){const C=ga(l.left,0),O=ga(l.right,0),R=ga(l.top,0),T=ga(l.bottom,0);d?S=f-2*(C!==0||O!==0?C+O:ga(l.left,l.right)):w=h-2*(R!==0||T!==0?R+T:ga(l.top,l.bottom))}await s({...e,availableWidth:S,availableHeight:w});const E=await i.getDimensions(o.floating);return f!==E.width||h!==E.height?{reset:{rects:!0}}:{}}}};function cs(t){var e;return((e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Us(t){return cs(t).getComputedStyle(t)}function V7(t){return t instanceof cs(t).Node}function Ec(t){return V7(t)?(t.nodeName||"").toLowerCase():"#document"}function $s(t){return t instanceof cs(t).HTMLElement}function sl(t){return t instanceof cs(t).Element}function a4(t){return typeof ShadowRoot<"u"&&(t instanceof cs(t).ShadowRoot||t instanceof ShadowRoot)}function pg(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=Us(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function lSe(t){return["table","td","th"].includes(Ec(t))}function yT(t){const e=pA(),n=Us(t);return n.transform!=="none"||n.perspective!=="none"||!e&&!!n.backdropFilter&&n.backdropFilter!=="none"||!e&&!!n.filter&&n.filter!=="none"||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function pA(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function db(t){return["html","body","#document"].includes(Ec(t))}const l4=Math.min,bm=Math.max,ow=Math.round,zy=Math.floor,qu=t=>({x:t,y:t});function j7(t){const e=Us(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=$s(t),o=i?t.offsetWidth:n,s=i?t.offsetHeight:r,a=ow(n)!==o||ow(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function mA(t){return sl(t)?t:t.contextElement}function $f(t){const e=mA(t);if(!$s(e))return qu(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:o}=j7(e);let s=(o?ow(n.width):n.width)/r,a=(o?ow(n.height):n.height)/i;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const c4=qu(0);function $7(t,e,n){var r,i;if(e===void 0&&(e=!0),!pA())return c4;const o=t?cs(t):window;return!n||e&&n!==o?c4:{x:((r=o.visualViewport)==null?void 0:r.offsetLeft)||0,y:((i=o.visualViewport)==null?void 0:i.offsetTop)||0}}function Ku(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),o=mA(t);let s=qu(1);e&&(r?sl(r)&&(s=$f(r)):s=$f(t));const a=$7(o,n,r);let l=(i.left+a.x)/s.x,c=(i.top+a.y)/s.y,u=i.width/s.x,d=i.height/s.y;if(o){const f=cs(o),h=r&&sl(r)?cs(r):r;let g=f.frameElement;for(;g&&r&&h!==f;){const y=$f(g),_=g.getBoundingClientRect(),v=getComputedStyle(g),x=_.left+(g.clientLeft+parseFloat(v.paddingLeft))*y.x,w=_.top+(g.clientTop+parseFloat(v.paddingTop))*y.y;l*=y.x,c*=y.y,u*=y.x,d*=y.y,l+=x,c+=w,g=cs(g).frameElement}}return lh({width:u,height:d,x:l,y:c})}function al(t){return((V7(t)?t.ownerDocument:t.document)||window.document).documentElement}function fb(t){return sl(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function G7(t){return Ku(al(t)).left+fb(t).scrollLeft}function ch(t){if(Ec(t)==="html")return t;const e=t.assignedSlot||t.parentNode||a4(t)&&t.host||al(t);return a4(e)?e.host:e}function W7(t){const e=ch(t);return db(e)?t.ownerDocument?t.ownerDocument.body:t.body:$s(e)&&pg(e)?e:W7(e)}function mc(t,e){var n;e===void 0&&(e=[]);const r=W7(t),i=r===((n=t.ownerDocument)==null?void 0:n.body),o=cs(r);return i?e.concat(o,o.visualViewport||[],pg(r)?r:[]):e.concat(r,mc(r))}function u4(t,e,n){let r;if(e==="viewport")r=function(i,o){const s=cs(i),a=al(i),l=s.visualViewport;let c=a.clientWidth,u=a.clientHeight,d=0,f=0;if(l){c=l.width,u=l.height;const h=pA();(!h||h&&o==="fixed")&&(d=l.offsetLeft,f=l.offsetTop)}return{width:c,height:u,x:d,y:f}}(t,n);else if(e==="document")r=function(i){const o=al(i),s=fb(i),a=i.ownerDocument.body,l=bm(o.scrollWidth,o.clientWidth,a.scrollWidth,a.clientWidth),c=bm(o.scrollHeight,o.clientHeight,a.scrollHeight,a.clientHeight);let u=-s.scrollLeft+G7(i);const d=-s.scrollTop;return Us(a).direction==="rtl"&&(u+=bm(o.clientWidth,a.clientWidth)-l),{width:l,height:c,x:u,y:d}}(al(t));else if(sl(e))r=function(i,o){const s=Ku(i,!0,o==="fixed"),a=s.top+i.clientTop,l=s.left+i.clientLeft,c=$s(i)?$f(i):qu(1);return{width:i.clientWidth*c.x,height:i.clientHeight*c.y,x:l*c.x,y:a*c.y}}(e,n);else{const i=$7(t);r={...e,x:e.x-i.x,y:e.y-i.y}}return lh(r)}function Y7(t,e){const n=ch(t);return!(n===e||!sl(n)||db(n))&&(Us(n).position==="fixed"||Y7(n,e))}function d4(t,e){return $s(t)&&Us(t).position!=="fixed"?e?e(t):t.offsetParent:null}function f4(t,e){const n=cs(t);if(!$s(t))return n;let r=d4(t,e);for(;r&&lSe(r)&&Us(r).position==="static";)r=d4(r,e);return r&&(Ec(r)==="html"||Ec(r)==="body"&&Us(r).position==="static"&&!yT(r))?n:r||function(i){let o=ch(i);for(;$s(o)&&!db(o);){if(yT(o))return o;o=ch(o)}return null}(t)||n}function cSe(t,e,n){const r=$s(e),i=al(e),o=n==="fixed",s=Ku(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=qu(0);if(r||!r&&!o)if((Ec(e)!=="body"||pg(i))&&(a=fb(e)),$s(e)){const c=Ku(e,!0,o,e);l.x=c.x+e.clientLeft,l.y=c.y+e.clientTop}else i&&(l.x=G7(i));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}const uSe={getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const o=n==="clippingAncestors"?function(c,u){const d=u.get(c);if(d)return d;let f=mc(c).filter(_=>sl(_)&&Ec(_)!=="body"),h=null;const g=Us(c).position==="fixed";let y=g?ch(c):c;for(;sl(y)&&!db(y);){const _=Us(y),v=yT(y);v||_.position!=="fixed"||(h=null),(g?!v&&!h:!v&&_.position==="static"&&h&&["absolute","fixed"].includes(h.position)||pg(y)&&!v&&Y7(c,y))?f=f.filter(x=>x!==y):h=_,y=ch(y)}return u.set(c,f),f}(e,this._c):[].concat(n),s=[...o,r],a=s[0],l=s.reduce((c,u)=>{const d=u4(e,u,i);return c.top=bm(d.top,c.top),c.right=l4(d.right,c.right),c.bottom=l4(d.bottom,c.bottom),c.left=bm(d.left,c.left),c},u4(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:n,strategy:r}=t;const i=$s(n),o=al(n);if(n===o)return e;let s={scrollLeft:0,scrollTop:0},a=qu(1);const l=qu(0);if((i||!i&&r!=="fixed")&&((Ec(n)!=="body"||pg(o))&&(s=fb(n)),$s(n))){const c=Ku(n);a=$f(n),l.x=c.x+n.clientLeft,l.y=c.y+n.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-s.scrollLeft*a.x+l.x,y:e.y*a.y-s.scrollTop*a.y+l.y}},isElement:sl,getDimensions:function(t){return j7(t)},getOffsetParent:f4,getDocumentElement:al,getScale:$f,async getElementRects(t){let{reference:e,floating:n,strategy:r}=t;const i=this.getOffsetParent||f4,o=this.getDimensions;return{reference:cSe(e,await i(n),r),floating:{x:0,y:0,...await o(n)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>Us(t).direction==="rtl"};function dSe(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=!0,layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=mA(t),u=i||o?[...c?mc(c):[],...mc(e)]:[];u.forEach(y=>{i&&y.addEventListener("scroll",n,{passive:!0}),o&&y.addEventListener("resize",n)});const d=c&&a?function(y,_){let v=null;const x=al(y);function w(){v&&v.disconnect(),v=null}return function S(E){E===void 0&&(E=!1),w();const{left:C,top:O,width:R,height:T}=y.getBoundingClientRect();if(E||_(),!R||!T)return;const A=zy(O),F=zy(x.clientWidth-(C+R)),N=zy(x.clientHeight-(O+T)),U=zy(C);let k=!0;v=new IntersectionObserver(z=>{z[0].intersectionRatio===1||k||S(),k=!1},{rootMargin:-A+"px "+-F+"px "+-N+"px "+-U+"px",threshold:1}),v.observe(y)}(!0),w}(c,n):null;let f,h=null;s&&(h=new ResizeObserver(n),c&&!l&&h.observe(c),h.observe(e));let g=l?Ku(t):null;return l&&function y(){const _=Ku(t);!g||_.x===g.x&&_.y===g.y&&_.width===g.width&&_.height===g.height||n(),g=_,f=requestAnimationFrame(y)}(),n(),()=>{u.forEach(y=>{i&&y.removeEventListener("scroll",n),o&&y.removeEventListener("resize",n)}),d&&d(),h&&h.disconnect(),h=null,l&&cancelAnimationFrame(f)}}const fSe=(t,e,n)=>{const r=new Map,i={platform:uSe,...n},o={...i.platform,_c:r};return tSe(t,e,{...i,platform:o})},X7=t=>{const{element:e,padding:n}=t;function r(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:t,fn(i){return r(e)?e.current!=null?o4({element:e.current,padding:n}).fn(i):{}:e?o4({element:e,padding:n}).fn(i):{}}}};var U_=typeof document<"u"?M.useLayoutEffect:M.useEffect;function sw(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!=e.length)return!1;for(r=n;r--!==0;)if(!sw(t[r],e[r]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&t.$$typeof)&&!sw(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function h4(t){const e=M.useRef(t);return U_(()=>{e.current=t}),e}function hSe(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:i,whileElementsMounted:o,open:s}=t,[a,l]=M.useState({x:null,y:null,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[c,u]=M.useState(r);sw(c,r)||u(r);const d=M.useRef(null),f=M.useRef(null),h=M.useRef(a),g=h4(o),y=h4(i),[_,v]=M.useState(null),[x,w]=M.useState(null),S=M.useCallback(A=>{d.current!==A&&(d.current=A,v(A))},[]),E=M.useCallback(A=>{f.current!==A&&(f.current=A,w(A))},[]),C=M.useCallback(()=>{if(!d.current||!f.current)return;const A={placement:e,strategy:n,middleware:c};y.current&&(A.platform=y.current),fSe(d.current,f.current,A).then(F=>{const N={...F,isPositioned:!0};O.current&&!sw(h.current,N)&&(h.current=N,bg.flushSync(()=>{l(N)}))})},[c,e,n,y]);U_(()=>{s===!1&&h.current.isPositioned&&(h.current.isPositioned=!1,l(A=>({...A,isPositioned:!1})))},[s]);const O=M.useRef(!1);U_(()=>(O.current=!0,()=>{O.current=!1}),[]),U_(()=>{if(_&&x){if(g.current)return g.current(_,x,C);C()}},[_,x,C,g]);const R=M.useMemo(()=>({reference:d,floating:f,setReference:S,setFloating:E}),[S,E]),T=M.useMemo(()=>({reference:_,floating:x}),[_,x]);return M.useMemo(()=>({...a,update:C,refs:R,elements:T,reference:S,floating:E}),[a,C,R,T,S,E])}var uh=typeof document<"u"?M.useLayoutEffect:M.useEffect;let EP=!1,pSe=0;const p4=()=>"floating-ui-"+pSe++;function mSe(){const[t,e]=M.useState(()=>EP?p4():void 0);return uh(()=>{t==null&&e(p4())},[]),M.useEffect(()=>{EP||(EP=!0)},[]),t}const gSe=W_["useId".toString()],m4=gSe||mSe;function vSe(){const t=new Map;return{emit(e,n){var r;(r=t.get(e))==null||r.forEach(i=>i(n))},on(e,n){t.set(e,[...t.get(e)||[],n])},off(e,n){t.set(e,(t.get(e)||[]).filter(r=>r!==n))}}}const ySe=M.createContext(null),_Se=M.createContext(null),Z7=()=>{var t;return((t=M.useContext(ySe))==null?void 0:t.id)||null},gA=()=>M.useContext(_Se);function nc(t){return t?.ownerDocument||document}function xSe(){const t=navigator.userAgentData;return t!=null&&t.platform?t.platform:navigator.platform}function wSe(){const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?t.brands.map(e=>{let{brand:n,version:r}=e;return n+"/"+r}).join(" "):navigator.userAgent}function vA(t){return nc(t).defaultView||window}function Sa(t){return t?t instanceof vA(t).Element:!1}function q7(t){return t?t instanceof vA(t).HTMLElement:!1}function SSe(t){if(typeof ShadowRoot>"u")return!1;const e=vA(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function bSe(t){if(t.mozInputSource===0&&t.isTrusted)return!0;const e=/Android/i;return(e.test(xSe())||e.test(wSe()))&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function MSe(t){return t.width===0&&t.height===0||t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType!=="mouse"||t.width<1&&t.height<1&&t.pressure===0&&t.detail===0}function K7(t,e){const n=["mouse","pen"];return e||n.push("",void 0),n.includes(t)}function g4(t){const e=M.useRef(t);return uh(()=>{e.current=t}),e}const v4="data-floating-ui-safe-polygon";function B_(t,e,n){return n&&!K7(n)?0:typeof t=="number"?t:t?.[e]}const ESe=function(t,e){let{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:o=!1,restMs:s=0,move:a=!0}=e===void 0?{}:e;const{open:l,onOpenChange:c,dataRef:u,events:d,elements:{domReference:f,floating:h},refs:g}=t,y=gA(),_=Z7(),v=g4(i),x=g4(r),w=M.useRef(),S=M.useRef(),E=M.useRef(),C=M.useRef(),O=M.useRef(!0),R=M.useRef(!1),T=M.useRef(()=>{}),A=M.useCallback(()=>{var k;const z=(k=u.current.openEvent)==null?void 0:k.type;return z?.includes("mouse")&&z!=="mousedown"},[u]);M.useEffect(()=>{if(!n)return;function k(){clearTimeout(S.current),clearTimeout(C.current),O.current=!0}return d.on("dismiss",k),()=>{d.off("dismiss",k)}},[n,d]),M.useEffect(()=>{if(!n||!v.current||!l)return;function k(){A()&&c(!1)}const z=nc(h).documentElement;return z.addEventListener("mouseleave",k),()=>{z.removeEventListener("mouseleave",k)}},[h,l,c,n,v,u,A]);const F=M.useCallback(function(k){k===void 0&&(k=!0);const z=B_(x.current,"close",w.current);z&&!E.current?(clearTimeout(S.current),S.current=setTimeout(()=>c(!1),z)):k&&(clearTimeout(S.current),c(!1))},[x,c]),N=M.useCallback(()=>{T.current(),E.current=void 0},[]),U=M.useCallback(()=>{if(R.current){const k=nc(g.floating.current).body;k.style.pointerEvents="",k.removeAttribute(v4),R.current=!1}},[g]);return M.useEffect(()=>{if(!n)return;function k(){return u.current.openEvent?["click","mousedown"].includes(u.current.openEvent.type):!1}function z(B){if(clearTimeout(S.current),O.current=!1,o&&!K7(w.current)||s>0&&B_(x.current,"open")===0)return;u.current.openEvent=B;const j=B_(x.current,"open",w.current);j?S.current=setTimeout(()=>{c(!0)},j):c(!0)}function G(B){if(k())return;T.current();const j=nc(h);if(clearTimeout(C.current),v.current){l||clearTimeout(S.current),E.current=v.current({...t,tree:y,x:B.clientX,y:B.clientY,onClose(){U(),N(),F()}});const $=E.current;j.addEventListener("mousemove",$),T.current=()=>{j.removeEventListener("mousemove",$)};return}F()}function W(B){k()||v.current==null||v.current({...t,tree:y,x:B.clientX,y:B.clientY,onClose(){U(),N(),F()}})(B)}if(Sa(f)){const B=f;return l&&B.addEventListener("mouseleave",W),h?.addEventListener("mouseleave",W),a&&B.addEventListener("mousemove",z,{once:!0}),B.addEventListener("mouseenter",z),B.addEventListener("mouseleave",G),()=>{l&&B.removeEventListener("mouseleave",W),h?.removeEventListener("mouseleave",W),a&&B.removeEventListener("mousemove",z),B.removeEventListener("mouseenter",z),B.removeEventListener("mouseleave",G)}}},[f,h,n,t,o,s,a,F,N,U,c,l,y,x,v,u]),uh(()=>{var k;if(n&&l&&(k=v.current)!=null&&k.__options.blockPointerEvents&&A()){const W=nc(h).body;if(W.setAttribute(v4,""),W.style.pointerEvents="none",R.current=!0,Sa(f)&&h){var z,G;const B=f,j=y==null||(z=y.nodesRef.current.find($=>$.id===_))==null||(G=z.context)==null?void 0:G.elements.floating;return j&&(j.style.pointerEvents=""),B.style.pointerEvents="auto",h.style.pointerEvents="auto",()=>{B.style.pointerEvents="",h.style.pointerEvents=""}}}},[n,l,_,h,f,y,v,u,A]),uh(()=>{l||(w.current=void 0,N(),U())},[l,N,U]),M.useEffect(()=>()=>{N(),clearTimeout(S.current),clearTimeout(C.current),U()},[n,N,U]),M.useMemo(()=>{if(!n)return{};function k(z){w.current=z.pointerType}return{reference:{onPointerDown:k,onPointerEnter:k,onMouseMove(){l||s===0||(clearTimeout(C.current),C.current=setTimeout(()=>{O.current||c(!0)},s))}},floating:{onMouseEnter(){clearTimeout(S.current)},onMouseLeave(){d.emit("dismiss",{type:"mouseLeave",data:{returnFocus:!1}}),F(!1)}}}},[d,n,s,l,c,F])},Q7=M.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:()=>{},setState:()=>{},isInstantPhase:!1}),J7=()=>M.useContext(Q7),PSe=t=>{let{children:e,delay:n,timeoutMs:r=0}=t;const[i,o]=M.useReducer((l,c)=>({...l,...c}),{delay:n,timeoutMs:r,initialDelay:n,currentId:null,isInstantPhase:!1}),s=M.useRef(null),a=M.useCallback(l=>{o({currentId:l})},[]);return uh(()=>{i.currentId?s.current===null?s.current=i.currentId:o({isInstantPhase:!0}):(o({isInstantPhase:!1}),s.current=null)},[i.currentId]),M.createElement(Q7.Provider,{value:M.useMemo(()=>({...i,setState:o,setCurrentId:a}),[i,o,a])},e)},CSe=(t,e)=>{let{open:n,onOpenChange:r}=t,{id:i}=e;const{currentId:o,setCurrentId:s,initialDelay:a,setState:l,timeoutMs:c}=J7();M.useEffect(()=>{o&&(l({delay:{open:1,close:B_(a,"close")}}),o!==i&&r(!1))},[i,r,l,o,a]),M.useEffect(()=>{function u(){r(!1),l({delay:a,currentId:null})}if(!n&&o===i)if(c){const d=window.setTimeout(u,c);return()=>{clearTimeout(d)}}else u()},[n,l,o,i,r,a,c]),M.useEffect(()=>{n&&s(i)},[n,s,i])};function TSe(t){let e=t.activeElement;for(;((n=e)==null||(r=n.shadowRoot)==null?void 0:r.activeElement)!=null;){var n,r;e=e.shadowRoot.activeElement}return e}function y4(t,e){if(!t||!e)return!1;const n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&SSe(n)){let r=e;do{if(r&&t===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function PP(t,e){let n=t.filter(i=>{var o;return i.parentId===e&&((o=i.context)==null?void 0:o.open)})||[],r=n;for(;r.length;)r=t.filter(i=>{var o;return(o=r)==null?void 0:o.some(s=>{var a;return i.parentId===s.id&&((a=i.context)==null?void 0:a.open)})})||[],n=n.concat(r);return n}function OSe(t){return"composedPath"in t?t.composedPath()[0]:t.target}const RSe=W_["useInsertionEffect".toString()],ASe=RSe||(t=>t());function e9(t){const e=M.useRef(()=>{});return ASe(()=>{e.current=t}),M.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i!1),E=typeof f=="function"?S:f,C=M.useRef(!1),{escapeKeyBubbles:O,outsidePressBubbles:R}=LSe(v);return M.useEffect(()=>{if(!n||!u)return;c.current.__escapeKeyBubbles=O,c.current.__outsidePressBubbles=R;function T(k){if(k.key==="Escape"){const z=x?PP(x.nodesRef.current,o):[];if(z.length>0){let G=!0;if(z.forEach(W=>{var B;if((B=W.context)!=null&&B.open&&!W.context.dataRef.current.__escapeKeyBubbles){G=!1;return}}),!G)return}i.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1)}}function A(k){const z=C.current;if(C.current=!1,z||typeof E=="function"&&!E(k))return;const G=OSe(k);if(q7(G)&&l){const j=l.ownerDocument.defaultView||window,$=G.scrollWidth>G.clientWidth,q=G.scrollHeight>G.clientHeight;let K=q&&k.offsetX>G.clientWidth;if(q&&j.getComputedStyle(G).direction==="rtl"&&(K=k.offsetX<=G.offsetWidth-G.clientWidth),K||$&&k.offsetY>G.clientHeight)return}const W=x&&PP(x.nodesRef.current,o).some(j=>{var $;return H_(k,($=j.context)==null?void 0:$.elements.floating)});if(H_(k,l)||H_(k,a)||W)return;const B=x?PP(x.nodesRef.current,o):[];if(B.length>0){let j=!0;if(B.forEach($=>{var q;if((q=$.context)!=null&&q.open&&!$.context.dataRef.current.__outsidePressBubbles){j=!1;return}}),!j)return}i.emit("dismiss",{type:"outsidePress",data:{returnFocus:w?{preventScroll:!0}:bSe(k)||MSe(k)}}),r(!1)}function F(){r(!1)}const N=nc(l);d&&N.addEventListener("keydown",T),E&&N.addEventListener(h,A);let U=[];return _&&(Sa(a)&&(U=mc(a)),Sa(l)&&(U=U.concat(mc(l))),!Sa(s)&&s&&s.contextElement&&(U=U.concat(mc(s.contextElement)))),U=U.filter(k=>{var z;return k!==((z=N.defaultView)==null?void 0:z.visualViewport)}),U.forEach(k=>{k.addEventListener("scroll",F,{passive:!0})}),()=>{d&&N.removeEventListener("keydown",T),E&&N.removeEventListener(h,A),U.forEach(k=>{k.removeEventListener("scroll",F)})}},[c,l,a,s,d,E,h,i,x,o,n,r,_,u,O,R,w]),M.useEffect(()=>{C.current=!1},[E,h]),M.useMemo(()=>u?{reference:{[DSe[y]]:()=>{g&&(i.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1))}},floating:{[ISe[h]]:()=>{C.current=!0}}}:{},[u,i,g,h,y,r])},NSe=function(t,e){let{open:n,onOpenChange:r,dataRef:i,events:o,refs:s,elements:{floating:a,domReference:l}}=t,{enabled:c=!0,keyboardOnly:u=!0}=e===void 0?{}:e;const d=M.useRef(""),f=M.useRef(!1),h=M.useRef();return M.useEffect(()=>{if(!c)return;const y=nc(a).defaultView||window;function _(){!n&&q7(l)&&l===TSe(nc(l))&&(f.current=!0)}return y.addEventListener("blur",_),()=>{y.removeEventListener("blur",_)}},[a,l,n,c]),M.useEffect(()=>{if(!c)return;function g(y){(y.type==="referencePress"||y.type==="escapeKey")&&(f.current=!0)}return o.on("dismiss",g),()=>{o.off("dismiss",g)}},[o,c]),M.useEffect(()=>()=>{clearTimeout(h.current)},[]),M.useMemo(()=>c?{reference:{onPointerDown(g){let{pointerType:y}=g;d.current=y,f.current=!!(y&&u)},onMouseLeave(){f.current=!1},onFocus(g){var y;f.current||g.type==="focus"&&((y=i.current.openEvent)==null?void 0:y.type)==="mousedown"&&i.current.openEvent&&H_(i.current.openEvent,l)||(i.current.openEvent=g.nativeEvent,r(!0))},onBlur(g){f.current=!1;const y=g.relatedTarget,_=Sa(y)&&y.hasAttribute("data-floating-ui-focus-guard")&&y.getAttribute("data-type")==="outside";h.current=setTimeout(()=>{y4(s.floating.current,y)||y4(l,y)||_||r(!1)})}}}:{},[c,u,l,s,i,r])},FSe=function(t,e){let{open:n}=t,{enabled:r=!0,role:i="dialog"}=e===void 0?{}:e;const o=m4(),s=m4();return M.useMemo(()=>{const a={id:o,role:i};return r?i==="tooltip"?{reference:{"aria-describedby":n?o:void 0},floating:a}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":i==="alertdialog"?"dialog":i,"aria-controls":n?o:void 0,...i==="listbox"&&{role:"combobox"},...i==="menu"&&{id:s}},floating:{...a,...i==="menu"&&{"aria-labelledby":s}}}:{}},[r,i,n,o,s])};function yA(t){t===void 0&&(t={});const{open:e=!1,onOpenChange:n,nodeId:r}=t,i=hSe(t),o=gA(),s=M.useRef(null),a=M.useRef({}),l=M.useState(()=>vSe())[0],[c,u]=M.useState(null),d=M.useCallback(v=>{const x=Sa(v)?{getBoundingClientRect:()=>v.getBoundingClientRect(),contextElement:v}:v;i.refs.setReference(x)},[i.refs]),f=M.useCallback(v=>{(Sa(v)||v===null)&&(s.current=v,u(v)),(Sa(i.refs.reference.current)||i.refs.reference.current===null||v!==null&&!Sa(v))&&i.refs.setReference(v)},[i.refs]),h=M.useMemo(()=>({...i.refs,setReference:f,setPositionReference:d,domReference:s}),[i.refs,f,d]),g=M.useMemo(()=>({...i.elements,domReference:c}),[i.elements,c]),y=e9(n),_=M.useMemo(()=>({...i,refs:h,elements:g,dataRef:a,nodeId:r,events:l,open:e,onOpenChange:y}),[i,r,l,e,y,h,g]);return uh(()=>{const v=o?.nodesRef.current.find(x=>x.id===r);v&&(v.context=_)}),M.useMemo(()=>({...i,context:_,refs:h,reference:f,positionReference:d}),[i,h,_,f,d])}function CP(t,e,n){const r=new Map;return{...n==="floating"&&{tabIndex:-1},...t,...e.map(i=>i?i[n]:null).concat(t).reduce((i,o)=>(o&&Object.entries(o).forEach(s=>{let[a,l]=s;if(a.indexOf("on")===0){if(r.has(a)||r.set(a,[]),typeof l=="function"){var c;(c=r.get(a))==null||c.push(l),i[a]=function(){for(var u,d=arguments.length,f=new Array(d),h=0;hg(...f))}}}else i[a]=l}),i),{})}}const zSe=function(t){t===void 0&&(t=[]);const e=t,n=M.useCallback(o=>CP(o,t,"reference"),e),r=M.useCallback(o=>CP(o,t,"floating"),e),i=M.useCallback(o=>CP(o,t,"item"),t.map(o=>o?.item));return M.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:i}),[n,r,i])};function t9({opened:t,floating:e,position:n,positionDependencies:r}){const[i,o]=M.useState(0);M.useEffect(()=>{if(e.refs.reference.current&&e.refs.floating.current)return dSe(e.refs.reference.current,e.refs.floating.current,e.update)},[e.refs.reference.current,e.refs.floating.current,t,i,n]),Qr(()=>{e.update()},r),Qr(()=>{o(s=>s+1)},[t])}function USe(t){const e=[B7(t.offset)];return t.middlewares.shift&&e.push(hA({limiter:sSe()})),t.middlewares.flip&&e.push(z7()),t.middlewares.inline&&e.push(U7()),e.push(X7({element:t.arrowRef,padding:t.arrowOffset})),e}function BSe(t){const[e,n]=Ar({value:t.opened,defaultValue:t.defaultOpened,finalValue:!1,onChange:t.onChange}),r=()=>{var s;(s=t.onClose)==null||s.call(t),n(!1)},i=()=>{var s,a;e?((s=t.onClose)==null||s.call(t),n(!1)):((a=t.onOpen)==null||a.call(t),n(!0))},o=yA({placement:t.position,middleware:[...USe(t),...t.width==="target"?[aSe({apply({rects:s}){var a,l;Object.assign((l=(a=o.refs.floating.current)==null?void 0:a.style)!=null?l:{},{width:`${s.reference.width}px`})}})]:[]]});return t9({opened:t.opened,position:t.position,positionDependencies:t.positionDependencies,floating:o}),Qr(()=>{var s;(s=t.onPositionChange)==null||s.call(t,o.placement)},[o.placement]),Qr(()=>{var s,a;t.opened?(a=t.onOpen)==null||a.call(t):(s=t.onClose)==null||s.call(t)},[t.opened]),{floating:o,controlled:typeof t.opened=="boolean",opened:e,onClose:r,onToggle:i}}const n9={context:"Popover component was not found in the tree",children:"Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"},[HSe,r9]=cd(n9.context);var VSe=Object.defineProperty,jSe=Object.defineProperties,$Se=Object.getOwnPropertyDescriptors,aw=Object.getOwnPropertySymbols,i9=Object.prototype.hasOwnProperty,o9=Object.prototype.propertyIsEnumerable,_4=(t,e,n)=>e in t?VSe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Uy=(t,e)=>{for(var n in e||(e={}))i9.call(e,n)&&_4(t,n,e[n]);if(aw)for(var n of aw(e))o9.call(e,n)&&_4(t,n,e[n]);return t},GSe=(t,e)=>jSe(t,$Se(e)),WSe=(t,e)=>{var n={};for(var r in t)i9.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&aw)for(var r of aw(t))e.indexOf(r)<0&&o9.call(t,r)&&(n[r]=t[r]);return n};const YSe={refProp:"ref",popupType:"dialog"},s9=M.forwardRef((t,e)=>{const n=nt("PopoverTarget",YSe,t),{children:r,refProp:i,popupType:o}=n,s=WSe(n,["children","refProp","popupType"]);if(!Yg(r))throw new Error(n9.children);const a=s,l=r9(),c=Da(l.reference,r.ref,e),u=l.withRoles?{"aria-haspopup":o,"aria-expanded":l.opened,"aria-controls":l.getDropdownId(),id:l.getTargetId()}:{};return M.cloneElement(r,Uy(GSe(Uy(Uy(Uy({},a),u),l.targetProps),{className:wG(l.targetProps.className,a.className,r.props.className),[i]:c}),l.controlled?null:{onClick:l.onToggle}))});s9.displayName="@mantine/core/PopoverTarget";var XSe=ft((t,{radius:e,shadow:n})=>({dropdown:{position:"absolute",backgroundColor:t.white,background:t.colorScheme==="dark"?t.colors.dark[6]:t.white,border:`${X(1)} solid ${t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[2]}`,padding:`${t.spacing.sm} ${t.spacing.md}`,boxShadow:t.shadows[n]||n||"none",borderRadius:t.fn.radius(e),"&:focus":{outline:0}},arrow:{backgroundColor:"inherit",border:`${X(1)} solid ${t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[2]}`,zIndex:1}}));const ZSe=XSe;var qSe=Object.defineProperty,x4=Object.getOwnPropertySymbols,KSe=Object.prototype.hasOwnProperty,QSe=Object.prototype.propertyIsEnumerable,w4=(t,e,n)=>e in t?qSe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,af=(t,e)=>{for(var n in e||(e={}))KSe.call(e,n)&&w4(t,n,e[n]);if(x4)for(var n of x4(e))QSe.call(e,n)&&w4(t,n,e[n]);return t};const S4={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function JSe({transition:t,state:e,duration:n,timingFunction:r}){const i={transitionDuration:`${n}ms`,transitionTimingFunction:r};return typeof t=="string"?t in Ty?af(af(af({transitionProperty:Ty[t].transitionProperty},i),Ty[t].common),Ty[t][S4[e]]):null:af(af(af({transitionProperty:t.transitionProperty},i),t.common),t[S4[e]])}function ebe({duration:t,exitDuration:e,timingFunction:n,mounted:r,onEnter:i,onExit:o,onEntered:s,onExited:a}){const l=Ir(),c=ob(),u=l.respectReducedMotion?c:!1,[d,f]=M.useState(u?0:t),[h,g]=M.useState(r?"entered":"exited"),y=M.useRef(-1),_=v=>{const x=v?i:o,w=v?s:a;g(v?"pre-entering":"pre-exiting"),window.clearTimeout(y.current);const S=u?0:v?t:e;if(f(S),S===0)typeof x=="function"&&x(),typeof w=="function"&&w(),g(v?"entered":"exited");else{const E=window.setTimeout(()=>{typeof x=="function"&&x(),g(v?"entering":"exiting")},10);y.current=window.setTimeout(()=>{window.clearTimeout(E),typeof w=="function"&&w(),g(v?"entered":"exited")},S)}};return Qr(()=>{_(r)},[r]),M.useEffect(()=>()=>window.clearTimeout(y.current),[]),{transitionDuration:d,transitionStatus:h,transitionTimingFunction:n||l.transitionTimingFunction}}function zc({keepMounted:t,transition:e,duration:n=250,exitDuration:r=n,mounted:i,children:o,timingFunction:s,onExit:a,onEntered:l,onEnter:c,onExited:u}){const{transitionDuration:d,transitionStatus:f,transitionTimingFunction:h}=ebe({mounted:i,exitDuration:r,duration:n,timingFunction:s,onExit:a,onEntered:l,onEnter:c,onExited:u});return d===0?i?H.createElement(H.Fragment,null,o({})):t?o({display:"none"}):null:f==="exited"?t?o({display:"none"}):null:H.createElement(H.Fragment,null,o(JSe({transition:e,duration:d,state:f,timingFunction:h})))}zc.displayName="@mantine/core/Transition";function _A({children:t,active:e=!0,refProp:n="ref"}){const r=W0e(e),i=Da(r,t?.ref);return Yg(t)?M.cloneElement(t,{[n]:i}):t}_A.displayName="@mantine/core/FocusTrap";var tbe=Object.defineProperty,nbe=Object.defineProperties,rbe=Object.getOwnPropertyDescriptors,b4=Object.getOwnPropertySymbols,ibe=Object.prototype.hasOwnProperty,obe=Object.prototype.propertyIsEnumerable,M4=(t,e,n)=>e in t?tbe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Vl=(t,e)=>{for(var n in e||(e={}))ibe.call(e,n)&&M4(t,n,e[n]);if(b4)for(var n of b4(e))obe.call(e,n)&&M4(t,n,e[n]);return t},By=(t,e)=>nbe(t,rbe(e));function E4(t,e,n,r){return t==="center"||r==="center"?{top:e}:t==="end"?{bottom:n}:t==="start"?{top:n}:{}}function P4(t,e,n,r,i){return t==="center"||r==="center"?{left:e}:t==="end"?{[i==="ltr"?"right":"left"]:n}:t==="start"?{[i==="ltr"?"left":"right"]:n}:{}}const sbe={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function abe({position:t,arrowSize:e,arrowOffset:n,arrowRadius:r,arrowPosition:i,arrowX:o,arrowY:s,dir:a}){const[l,c="center"]=t.split("-"),u={width:X(e),height:X(e),transform:"rotate(45deg)",position:"absolute",[sbe[l]]:X(r)},d=X(-e/2);return l==="left"?By(Vl(Vl({},u),E4(c,s,n,i)),{right:d,borderLeftColor:"transparent",borderBottomColor:"transparent"}):l==="right"?By(Vl(Vl({},u),E4(c,s,n,i)),{left:d,borderRightColor:"transparent",borderTopColor:"transparent"}):l==="top"?By(Vl(Vl({},u),P4(c,o,n,i,a)),{bottom:d,borderTopColor:"transparent",borderLeftColor:"transparent"}):l==="bottom"?By(Vl(Vl({},u),P4(c,o,n,i,a)),{top:d,borderBottomColor:"transparent",borderRightColor:"transparent"}):{}}var lbe=Object.defineProperty,cbe=Object.defineProperties,ube=Object.getOwnPropertyDescriptors,lw=Object.getOwnPropertySymbols,a9=Object.prototype.hasOwnProperty,l9=Object.prototype.propertyIsEnumerable,C4=(t,e,n)=>e in t?lbe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,dbe=(t,e)=>{for(var n in e||(e={}))a9.call(e,n)&&C4(t,n,e[n]);if(lw)for(var n of lw(e))l9.call(e,n)&&C4(t,n,e[n]);return t},fbe=(t,e)=>cbe(t,ube(e)),hbe=(t,e)=>{var n={};for(var r in t)a9.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&lw)for(var r of lw(t))e.indexOf(r)<0&&l9.call(t,r)&&(n[r]=t[r]);return n};const xA=M.forwardRef((t,e)=>{var n=t,{position:r,arrowSize:i,arrowOffset:o,arrowRadius:s,arrowPosition:a,visible:l,arrowX:c,arrowY:u}=n,d=hbe(n,["position","arrowSize","arrowOffset","arrowRadius","arrowPosition","visible","arrowX","arrowY"]);const f=Ir();return l?H.createElement("div",fbe(dbe({},d),{ref:e,style:abe({position:r,arrowSize:i,arrowOffset:o,arrowRadius:s,arrowPosition:a,dir:f.dir,arrowX:c,arrowY:u})})):null});xA.displayName="@mantine/core/FloatingArrow";var pbe=Object.defineProperty,mbe=Object.defineProperties,gbe=Object.getOwnPropertyDescriptors,cw=Object.getOwnPropertySymbols,c9=Object.prototype.hasOwnProperty,u9=Object.prototype.propertyIsEnumerable,T4=(t,e,n)=>e in t?pbe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,lf=(t,e)=>{for(var n in e||(e={}))c9.call(e,n)&&T4(t,n,e[n]);if(cw)for(var n of cw(e))u9.call(e,n)&&T4(t,n,e[n]);return t},Hy=(t,e)=>mbe(t,gbe(e)),vbe=(t,e)=>{var n={};for(var r in t)c9.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&cw)for(var r of cw(t))e.indexOf(r)<0&&u9.call(t,r)&&(n[r]=t[r]);return n};const ybe={};function d9(t){var e;const n=nt("PopoverDropdown",ybe,t),{style:r,className:i,children:o,onKeyDownCapture:s}=n,a=vbe(n,["style","className","children","onKeyDownCapture"]),l=r9(),{classes:c,cx:u}=ZSe({radius:l.radius,shadow:l.shadow},{name:l.__staticSelector,classNames:l.classNames,styles:l.styles,unstyled:l.unstyled,variant:l.variant}),d=QG({opened:l.opened,shouldReturnFocus:l.returnFocus}),f=l.withRoles?{"aria-labelledby":l.getTargetId(),id:l.getDropdownId(),role:"dialog"}:{};return l.disabled?null:H.createElement(Kg,Hy(lf({},l.portalProps),{withinPortal:l.withinPortal}),H.createElement(zc,Hy(lf({mounted:l.opened},l.transitionProps),{transition:l.transitionProps.transition||"fade",duration:(e=l.transitionProps.duration)!=null?e:150,keepMounted:l.keepMounted,exitDuration:typeof l.transitionProps.exitDuration=="number"?l.transitionProps.exitDuration:l.transitionProps.duration}),h=>{var g,y;return H.createElement(_A,{active:l.trapFocus},H.createElement(Xe,lf(Hy(lf({},f),{tabIndex:-1,ref:l.floating,style:Hy(lf(lf({},r),h),{zIndex:l.zIndex,top:(g=l.y)!=null?g:0,left:(y=l.x)!=null?y:0,width:l.width==="target"?void 0:X(l.width)}),className:u(c.dropdown,i),onKeyDownCapture:Sge(l.onClose,{active:l.closeOnEscape,onTrigger:d,onKeyDown:s}),"data-position":l.placement}),a),o,H.createElement(xA,{ref:l.arrowRef,arrowX:l.arrowX,arrowY:l.arrowY,visible:l.withArrow,position:l.placement,arrowSize:l.arrowSize,arrowRadius:l.arrowRadius,arrowOffset:l.arrowOffset,arrowPosition:l.arrowPosition,className:c.arrow})))}))}d9.displayName="@mantine/core/PopoverDropdown";function f9(t,e){if(t==="rtl"&&(e.includes("right")||e.includes("left"))){const[n,r]=e.split("-"),i=n==="right"?"left":"right";return r===void 0?i:`${i}-${r}`}return e}var O4=Object.getOwnPropertySymbols,_be=Object.prototype.hasOwnProperty,xbe=Object.prototype.propertyIsEnumerable,wbe=(t,e)=>{var n={};for(var r in t)_be.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&O4)for(var r of O4(t))e.indexOf(r)<0&&xbe.call(t,r)&&(n[r]=t[r]);return n};const Sbe={position:"bottom",offset:8,positionDependencies:[],transitionProps:{transition:"fade",duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:"side",closeOnClickOutside:!0,withinPortal:!1,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,clickOutsideEvents:["mousedown","touchstart"],zIndex:Ys("popover"),__staticSelector:"Popover",width:"max-content"};function qi(t){var e,n,r,i,o,s;const a=M.useRef(null),l=nt("Popover",Sbe,t),{children:c,position:u,offset:d,onPositionChange:f,positionDependencies:h,opened:g,transitionProps:y,width:_,middlewares:v,withArrow:x,arrowSize:w,arrowOffset:S,arrowRadius:E,arrowPosition:C,unstyled:O,classNames:R,styles:T,closeOnClickOutside:A,withinPortal:F,portalProps:N,closeOnEscape:U,clickOutsideEvents:k,trapFocus:z,onClose:G,onOpen:W,onChange:B,zIndex:j,radius:$,shadow:q,id:K,defaultOpened:re,__staticSelector:J,withRoles:le,disabled:ae,returnFocus:oe,variant:De,keepMounted:Te}=l,ve=wbe(l,["children","position","offset","onPositionChange","positionDependencies","opened","transitionProps","width","middlewares","withArrow","arrowSize","arrowOffset","arrowRadius","arrowPosition","unstyled","classNames","styles","closeOnClickOutside","withinPortal","portalProps","closeOnEscape","clickOutsideEvents","trapFocus","onClose","onOpen","onChange","zIndex","radius","shadow","id","defaultOpened","__staticSelector","withRoles","disabled","returnFocus","variant","keepMounted"]),[we,me]=M.useState(null),[se,de]=M.useState(null),ke=zo(K),Ve=Ir(),Ze=BSe({middlewares:v,width:_,position:f9(Ve.dir,u),offset:typeof d=="number"?d+(x?w/2:0):d,arrowRef:a,arrowOffset:S,onPositionChange:f,positionDependencies:h,opened:g,defaultOpened:re,onChange:B,onOpen:W,onClose:G});N0e(()=>Ze.opened&&A&&Ze.onClose(),k,[we,se]);const ot=M.useCallback(We=>{me(We),Ze.floating.reference(We)},[Ze.floating.reference]),dt=M.useCallback(We=>{de(We),Ze.floating.floating(We)},[Ze.floating.floating]);return H.createElement(HSe,{value:{returnFocus:oe,disabled:ae,controlled:Ze.controlled,reference:ot,floating:dt,x:Ze.floating.x,y:Ze.floating.y,arrowX:(r=(n=(e=Ze.floating)==null?void 0:e.middlewareData)==null?void 0:n.arrow)==null?void 0:r.x,arrowY:(s=(o=(i=Ze.floating)==null?void 0:i.middlewareData)==null?void 0:o.arrow)==null?void 0:s.y,opened:Ze.opened,arrowRef:a,transitionProps:y,width:_,withArrow:x,arrowSize:w,arrowOffset:S,arrowRadius:E,arrowPosition:C,placement:Ze.floating.placement,trapFocus:z,withinPortal:F,portalProps:N,zIndex:j,radius:$,shadow:q,closeOnEscape:U,onClose:Ze.onClose,onToggle:Ze.onToggle,getTargetId:()=>`${ke}-target`,getDropdownId:()=>`${ke}-dropdown`,withRoles:le,targetProps:ve,__staticSelector:J,classNames:R,styles:T,unstyled:O,variant:De,keepMounted:Te}},c)}qi.Target=s9;qi.Dropdown=d9;qi.displayName="@mantine/core/Popover";var bbe=Object.defineProperty,uw=Object.getOwnPropertySymbols,h9=Object.prototype.hasOwnProperty,p9=Object.prototype.propertyIsEnumerable,R4=(t,e,n)=>e in t?bbe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Mbe=(t,e)=>{for(var n in e||(e={}))h9.call(e,n)&&R4(t,n,e[n]);if(uw)for(var n of uw(e))p9.call(e,n)&&R4(t,n,e[n]);return t},Ebe=(t,e)=>{var n={};for(var r in t)h9.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&uw)for(var r of uw(t))e.indexOf(r)<0&&p9.call(t,r)&&(n[r]=t[r]);return n};function Pbe(t){var e=t,{children:n,component:r="div",maxHeight:i=220,direction:o="column",id:s,innerRef:a,__staticSelector:l,styles:c,classNames:u,unstyled:d}=e,f=Ebe(e,["children","component","maxHeight","direction","id","innerRef","__staticSelector","styles","classNames","unstyled"]);const{classes:h}=eSe(null,{name:l,styles:c,classNames:u,unstyled:d});return H.createElement(qi.Dropdown,Mbe({p:0,onMouseDown:g=>g.preventDefault()},f),H.createElement("div",{style:{maxHeight:X(i),display:"flex"}},H.createElement(Xe,{component:r||"div",id:`${s}-items`,"aria-labelledby":`${s}-label`,role:"listbox",onMouseDown:g=>g.preventDefault(),style:{flex:1,overflowY:r!==ub?"auto":void 0},"data-combobox-popover":!0,tabIndex:-1,ref:a},H.createElement("div",{className:h.itemsWrapper,style:{flexDirection:o}},n))))}function gc({opened:t,transitionProps:e={transition:"fade",duration:0},shadow:n,withinPortal:r,portalProps:i,children:o,__staticSelector:s,onDirectionChange:a,switchDirectionOnFlip:l,zIndex:c,dropdownPosition:u,positionDependencies:d=[],classNames:f,styles:h,unstyled:g,readOnly:y,variant:_}){return H.createElement(qi,{unstyled:g,classNames:f,styles:h,width:"target",withRoles:!1,opened:t,middlewares:{flip:u==="flip",shift:!1},position:u==="flip"?"bottom":u,positionDependencies:d,zIndex:c,__staticSelector:s,withinPortal:r,portalProps:i,transitionProps:e,shadow:n,disabled:y,onPositionChange:v=>l&&a?.(v==="top"?"column-reverse":"column"),variant:_},o)}gc.Target=qi.Target;gc.Dropdown=Pbe;var Cbe=Object.defineProperty,Tbe=Object.defineProperties,Obe=Object.getOwnPropertyDescriptors,dw=Object.getOwnPropertySymbols,m9=Object.prototype.hasOwnProperty,g9=Object.prototype.propertyIsEnumerable,A4=(t,e,n)=>e in t?Cbe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Vy=(t,e)=>{for(var n in e||(e={}))m9.call(e,n)&&A4(t,n,e[n]);if(dw)for(var n of dw(e))g9.call(e,n)&&A4(t,n,e[n]);return t},Rbe=(t,e)=>Tbe(t,Obe(e)),Abe=(t,e)=>{var n={};for(var r in t)m9.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&dw)for(var r of dw(t))e.indexOf(r)<0&&g9.call(t,r)&&(n[r]=t[r]);return n};function hb(t,e,n){const r=nt(t,e,n),{label:i,description:o,error:s,required:a,classNames:l,styles:c,className:u,unstyled:d,__staticSelector:f,sx:h,errorProps:g,labelProps:y,descriptionProps:_,wrapperProps:v,id:x,size:w,style:S,inputContainer:E,inputWrapperOrder:C,withAsterisk:O,variant:R}=r,T=Abe(r,["label","description","error","required","classNames","styles","className","unstyled","__staticSelector","sx","errorProps","labelProps","descriptionProps","wrapperProps","id","size","style","inputContainer","inputWrapperOrder","withAsterisk","variant"]),A=zo(x),{systemStyles:F,rest:N}=Sl(T),U=Vy({label:i,description:o,error:s,required:a,classNames:l,className:u,__staticSelector:f,sx:h,errorProps:g,labelProps:y,descriptionProps:_,unstyled:d,styles:c,id:A,size:w,style:S,inputContainer:E,inputWrapperOrder:C,withAsterisk:O,variant:R},v);return Rbe(Vy({},N),{classNames:l,styles:c,unstyled:d,wrapperProps:Vy(Vy({},U),F),inputProps:{required:a,classNames:l,styles:c,unstyled:d,id:A,size:w,__staticSelector:f,error:s,variant:R}})}var Dbe=ft((t,e,{size:n})=>({label:{display:"inline-block",fontSize:Oe({size:n,sizes:t.fontSizes}),fontWeight:500,color:t.colorScheme==="dark"?t.colors.dark[0]:t.colors.gray[9],wordBreak:"break-word",cursor:"default",WebkitTapHighlightColor:"transparent"},required:{color:t.fn.variant({variant:"filled",color:"red"}).background}}));const Ibe=Dbe;var Lbe=Object.defineProperty,fw=Object.getOwnPropertySymbols,v9=Object.prototype.hasOwnProperty,y9=Object.prototype.propertyIsEnumerable,D4=(t,e,n)=>e in t?Lbe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,kbe=(t,e)=>{for(var n in e||(e={}))v9.call(e,n)&&D4(t,n,e[n]);if(fw)for(var n of fw(e))y9.call(e,n)&&D4(t,n,e[n]);return t},Nbe=(t,e)=>{var n={};for(var r in t)v9.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&fw)for(var r of fw(t))e.indexOf(r)<0&&y9.call(t,r)&&(n[r]=t[r]);return n};const Fbe={labelElement:"label",size:"sm"},wA=M.forwardRef((t,e)=>{const n=nt("InputLabel",Fbe,t),{labelElement:r,children:i,required:o,size:s,classNames:a,styles:l,unstyled:c,className:u,htmlFor:d,__staticSelector:f,variant:h,onMouseDown:g}=n,y=Nbe(n,["labelElement","children","required","size","classNames","styles","unstyled","className","htmlFor","__staticSelector","variant","onMouseDown"]),{classes:_,cx:v}=Ibe(null,{name:["InputWrapper",f],classNames:a,styles:l,unstyled:c,variant:h,size:s});return H.createElement(Xe,kbe({component:r,ref:e,className:v(_.label,u),htmlFor:r==="label"?d:void 0,onMouseDown:x=>{g?.(x),!x.defaultPrevented&&x.detail>1&&x.preventDefault()}},y),i,o&&H.createElement("span",{className:_.required,"aria-hidden":!0}," *"))});wA.displayName="@mantine/core/InputLabel";var zbe=ft((t,e,{size:n})=>({error:{wordBreak:"break-word",color:t.fn.variant({variant:"filled",color:"red"}).background,fontSize:`calc(${Oe({size:n,sizes:t.fontSizes})} - ${X(2)})`,lineHeight:1.2,display:"block"}}));const Ube=zbe;var Bbe=Object.defineProperty,hw=Object.getOwnPropertySymbols,_9=Object.prototype.hasOwnProperty,x9=Object.prototype.propertyIsEnumerable,I4=(t,e,n)=>e in t?Bbe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Hbe=(t,e)=>{for(var n in e||(e={}))_9.call(e,n)&&I4(t,n,e[n]);if(hw)for(var n of hw(e))x9.call(e,n)&&I4(t,n,e[n]);return t},Vbe=(t,e)=>{var n={};for(var r in t)_9.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&hw)for(var r of hw(t))e.indexOf(r)<0&&x9.call(t,r)&&(n[r]=t[r]);return n};const jbe={size:"sm"},SA=M.forwardRef((t,e)=>{const n=nt("InputError",jbe,t),{children:r,className:i,classNames:o,styles:s,unstyled:a,size:l,__staticSelector:c,variant:u}=n,d=Vbe(n,["children","className","classNames","styles","unstyled","size","__staticSelector","variant"]),{classes:f,cx:h}=Ube(null,{name:["InputWrapper",c],classNames:o,styles:s,unstyled:a,variant:u,size:l});return H.createElement(Si,Hbe({className:h(f.error,i),ref:e},d),r)});SA.displayName="@mantine/core/InputError";var $be=ft((t,e,{size:n})=>({description:{wordBreak:"break-word",color:t.colorScheme==="dark"?t.colors.dark[2]:t.colors.gray[6],fontSize:`calc(${Oe({size:n,sizes:t.fontSizes})} - ${X(2)})`,lineHeight:1.2,display:"block"}}));const Gbe=$be;var Wbe=Object.defineProperty,pw=Object.getOwnPropertySymbols,w9=Object.prototype.hasOwnProperty,S9=Object.prototype.propertyIsEnumerable,L4=(t,e,n)=>e in t?Wbe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ybe=(t,e)=>{for(var n in e||(e={}))w9.call(e,n)&&L4(t,n,e[n]);if(pw)for(var n of pw(e))S9.call(e,n)&&L4(t,n,e[n]);return t},Xbe=(t,e)=>{var n={};for(var r in t)w9.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&pw)for(var r of pw(t))e.indexOf(r)<0&&S9.call(t,r)&&(n[r]=t[r]);return n};const Zbe={size:"sm"},bA=M.forwardRef((t,e)=>{const n=nt("InputDescription",Zbe,t),{children:r,className:i,classNames:o,styles:s,unstyled:a,size:l,__staticSelector:c,variant:u}=n,d=Xbe(n,["children","className","classNames","styles","unstyled","size","__staticSelector","variant"]),{classes:f,cx:h}=Gbe(null,{name:["InputWrapper",c],classNames:o,styles:s,unstyled:a,variant:u,size:l});return H.createElement(Si,Ybe({color:"dimmed",className:h(f.description,i),ref:e,unstyled:a},d),r)});bA.displayName="@mantine/core/InputDescription";const b9=M.createContext({offsetBottom:!1,offsetTop:!1,describedBy:void 0}),qbe=b9.Provider,Kbe=()=>M.useContext(b9);function Qbe(t,{hasDescription:e,hasError:n}){const r=t.findIndex(l=>l==="input"),i=t[r-1],o=t[r+1];return{offsetBottom:e&&o==="description"||n&&o==="error",offsetTop:e&&i==="description"||n&&i==="error"}}var Jbe=Object.defineProperty,eMe=Object.defineProperties,tMe=Object.getOwnPropertyDescriptors,k4=Object.getOwnPropertySymbols,nMe=Object.prototype.hasOwnProperty,rMe=Object.prototype.propertyIsEnumerable,N4=(t,e,n)=>e in t?Jbe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,iMe=(t,e)=>{for(var n in e||(e={}))nMe.call(e,n)&&N4(t,n,e[n]);if(k4)for(var n of k4(e))rMe.call(e,n)&&N4(t,n,e[n]);return t},oMe=(t,e)=>eMe(t,tMe(e)),sMe=ft(t=>({root:oMe(iMe({},t.fn.fontStyles()),{lineHeight:t.lineHeight})}));const aMe=sMe;var lMe=Object.defineProperty,cMe=Object.defineProperties,uMe=Object.getOwnPropertyDescriptors,mw=Object.getOwnPropertySymbols,M9=Object.prototype.hasOwnProperty,E9=Object.prototype.propertyIsEnumerable,F4=(t,e,n)=>e in t?lMe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,jl=(t,e)=>{for(var n in e||(e={}))M9.call(e,n)&&F4(t,n,e[n]);if(mw)for(var n of mw(e))E9.call(e,n)&&F4(t,n,e[n]);return t},z4=(t,e)=>cMe(t,uMe(e)),dMe=(t,e)=>{var n={};for(var r in t)M9.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&mw)for(var r of mw(t))e.indexOf(r)<0&&E9.call(t,r)&&(n[r]=t[r]);return n};const fMe={labelElement:"label",size:"sm",inputContainer:t=>t,inputWrapperOrder:["label","description","input","error"]},P9=M.forwardRef((t,e)=>{const n=nt("InputWrapper",fMe,t),{className:r,label:i,children:o,required:s,id:a,error:l,description:c,labelElement:u,labelProps:d,descriptionProps:f,errorProps:h,classNames:g,styles:y,size:_,inputContainer:v,__staticSelector:x,unstyled:w,inputWrapperOrder:S,withAsterisk:E,variant:C}=n,O=dMe(n,["className","label","children","required","id","error","description","labelElement","labelProps","descriptionProps","errorProps","classNames","styles","size","inputContainer","__staticSelector","unstyled","inputWrapperOrder","withAsterisk","variant"]),{classes:R,cx:T}=aMe(null,{classNames:g,styles:y,name:["InputWrapper",x],unstyled:w,variant:C,size:_}),A={classNames:g,styles:y,unstyled:w,size:_,variant:C,__staticSelector:x},F=typeof E=="boolean"?E:s,N=a?`${a}-error`:h?.id,U=a?`${a}-description`:f?.id,z=`${!!l&&typeof l!="boolean"?N:""} ${c?U:""}`,G=z.trim().length>0?z.trim():void 0,W=i&&H.createElement(wA,jl(jl({key:"label",labelElement:u,id:a?`${a}-label`:void 0,htmlFor:a,required:F},A),d),i),B=c&&H.createElement(bA,z4(jl(jl({key:"description"},f),A),{size:f?.size||A.size,id:f?.id||U}),c),j=H.createElement(M.Fragment,{key:"input"},v(o)),$=typeof l!="boolean"&&l&&H.createElement(SA,z4(jl(jl({},h),A),{size:h?.size||A.size,key:"error",id:h?.id||N}),l),q=S.map(K=>{switch(K){case"label":return W;case"input":return j;case"description":return B;case"error":return $;default:return null}});return H.createElement(qbe,{value:jl({describedBy:G},Qbe(S,{hasDescription:!!B,hasError:!!$}))},H.createElement(Xe,jl({className:T(R.root,r),ref:e},O),q))});P9.displayName="@mantine/core/InputWrapper";var hMe=Object.defineProperty,gw=Object.getOwnPropertySymbols,C9=Object.prototype.hasOwnProperty,T9=Object.prototype.propertyIsEnumerable,U4=(t,e,n)=>e in t?hMe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,pMe=(t,e)=>{for(var n in e||(e={}))C9.call(e,n)&&U4(t,n,e[n]);if(gw)for(var n of gw(e))T9.call(e,n)&&U4(t,n,e[n]);return t},mMe=(t,e)=>{var n={};for(var r in t)C9.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&gw)for(var r of gw(t))e.indexOf(r)<0&&T9.call(t,r)&&(n[r]=t[r]);return n};const gMe={},O9=M.forwardRef((t,e)=>{const n=nt("InputPlaceholder",gMe,t),{sx:r}=n,i=mMe(n,["sx"]);return H.createElement(Xe,pMe({component:"span",sx:[o=>o.fn.placeholderStyles(),...Ph(r)],ref:e},i))});O9.displayName="@mantine/core/InputPlaceholder";var vMe=Object.defineProperty,yMe=Object.defineProperties,_Me=Object.getOwnPropertyDescriptors,B4=Object.getOwnPropertySymbols,xMe=Object.prototype.hasOwnProperty,wMe=Object.prototype.propertyIsEnumerable,H4=(t,e,n)=>e in t?vMe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,jy=(t,e)=>{for(var n in e||(e={}))xMe.call(e,n)&&H4(t,n,e[n]);if(B4)for(var n of B4(e))wMe.call(e,n)&&H4(t,n,e[n]);return t},TP=(t,e)=>yMe(t,_Me(e));const yi={xs:X(30),sm:X(36),md:X(42),lg:X(50),xl:X(60)},SMe=["default","filled","unstyled"];function bMe({theme:t,variant:e}){return SMe.includes(e)?e==="default"?{border:`${X(1)} solid ${t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[4]}`,backgroundColor:t.colorScheme==="dark"?t.colors.dark[6]:t.white,transition:"border-color 100ms ease","&:focus, &:focus-within":t.focusRingStyles.inputStyles(t)}:e==="filled"?{border:`${X(1)} solid transparent`,backgroundColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[1],"&:focus, &:focus-within":t.focusRingStyles.inputStyles(t)}:{borderWidth:0,color:t.colorScheme==="dark"?t.colors.dark[0]:t.black,backgroundColor:"transparent",minHeight:X(28),outline:0,"&:focus, &:focus-within":{outline:"none",borderColor:"transparent"},"&:disabled":{backgroundColor:"transparent","&:focus, &:focus-within":{outline:"none",borderColor:"transparent"}}}:null}var MMe=ft((t,{multiline:e,radius:n,invalid:r,rightSectionWidth:i,withRightSection:o,iconWidth:s,offsetBottom:a,offsetTop:l,pointer:c},{variant:u,size:d})=>{const f=t.fn.variant({variant:"filled",color:"red"}).background,h=u==="default"||u==="filled"?{minHeight:Oe({size:d,sizes:yi}),paddingLeft:`calc(${Oe({size:d,sizes:yi})} / 3)`,paddingRight:o?i||Oe({size:d,sizes:yi}):`calc(${Oe({size:d,sizes:yi})} / 3)`,borderRadius:t.fn.radius(n)}:u==="unstyled"&&o?{paddingRight:i||Oe({size:d,sizes:yi})}:null;return{wrapper:{position:"relative",marginTop:l?`calc(${t.spacing.xs} / 2)`:void 0,marginBottom:a?`calc(${t.spacing.xs} / 2)`:void 0,"&:has(input:disabled)":{"& .mantine-Input-rightSection":{display:"none"}}},input:TP(jy(jy(TP(jy({},t.fn.fontStyles()),{height:e?u==="unstyled"?void 0:"auto":Oe({size:d,sizes:yi}),WebkitTapHighlightColor:"transparent",lineHeight:e?t.lineHeight:`calc(${Oe({size:d,sizes:yi})} - ${X(2)})`,appearance:"none",resize:"none",boxSizing:"border-box",fontSize:Oe({size:d,sizes:t.fontSizes}),width:"100%",color:t.colorScheme==="dark"?t.colors.dark[0]:t.black,display:"block",textAlign:"left",cursor:c?"pointer":void 0}),bMe({theme:t,variant:u})),h),{"&:disabled, &[data-disabled]":{backgroundColor:t.colorScheme==="dark"?t.colors.dark[6]:t.colors.gray[1],color:t.colors.dark[2],opacity:.6,cursor:"not-allowed",pointerEvents:"none","&::placeholder":{color:t.colors.dark[2]}},"&[data-invalid]":{color:f,borderColor:f,"&::placeholder":{opacity:1,color:f}},"&[data-with-icon]":{paddingLeft:typeof s=="number"?X(s):Oe({size:d,sizes:yi})},"&::placeholder":TP(jy({},t.fn.placeholderStyles()),{opacity:1}),"&::-webkit-inner-spin-button, &::-webkit-outer-spin-button, &::-webkit-search-decoration, &::-webkit-search-cancel-button, &::-webkit-search-results-button, &::-webkit-search-results-decoration":{appearance:"none"},"&[type=number]":{MozAppearance:"textfield"}}),icon:{pointerEvents:"none",position:"absolute",zIndex:1,left:0,top:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",width:s?X(s):Oe({size:d,sizes:yi}),color:r?t.colors.red[t.colorScheme==="dark"?6:7]:t.colorScheme==="dark"?t.colors.dark[2]:t.colors.gray[5]},rightSection:{position:"absolute",top:0,bottom:0,right:0,display:"flex",alignItems:"center",justifyContent:"center",width:i||Oe({size:d,sizes:yi})}}});const EMe=MMe;var PMe=Object.defineProperty,CMe=Object.defineProperties,TMe=Object.getOwnPropertyDescriptors,vw=Object.getOwnPropertySymbols,R9=Object.prototype.hasOwnProperty,A9=Object.prototype.propertyIsEnumerable,V4=(t,e,n)=>e in t?PMe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$y=(t,e)=>{for(var n in e||(e={}))R9.call(e,n)&&V4(t,n,e[n]);if(vw)for(var n of vw(e))A9.call(e,n)&&V4(t,n,e[n]);return t},j4=(t,e)=>CMe(t,TMe(e)),OMe=(t,e)=>{var n={};for(var r in t)R9.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&vw)for(var r of vw(t))e.indexOf(r)<0&&A9.call(t,r)&&(n[r]=t[r]);return n};const RMe={size:"sm",variant:"default"},fd=M.forwardRef((t,e)=>{const n=nt("Input",RMe,t),{className:r,error:i,required:o,disabled:s,variant:a,icon:l,style:c,rightSectionWidth:u,iconWidth:d,rightSection:f,rightSectionProps:h,radius:g,size:y,wrapperProps:_,classNames:v,styles:x,__staticSelector:w,multiline:S,sx:E,unstyled:C,pointer:O}=n,R=OMe(n,["className","error","required","disabled","variant","icon","style","rightSectionWidth","iconWidth","rightSection","rightSectionProps","radius","size","wrapperProps","classNames","styles","__staticSelector","multiline","sx","unstyled","pointer"]),{offsetBottom:T,offsetTop:A,describedBy:F}=Kbe(),{classes:N,cx:U}=EMe({radius:g,multiline:S,invalid:!!i,rightSectionWidth:u?X(u):void 0,iconWidth:d,withRightSection:!!f,offsetBottom:T,offsetTop:A,pointer:O},{classNames:v,styles:x,name:["Input",w],unstyled:C,variant:a,size:y}),{systemStyles:k,rest:z}=Sl(R);return H.createElement(Xe,$y($y({className:U(N.wrapper,r),sx:E,style:c},k),_),l&&H.createElement("div",{className:N.icon},l),H.createElement(Xe,j4($y({component:"input"},z),{ref:e,required:o,"aria-invalid":!!i,"aria-describedby":F,disabled:s,"data-disabled":s||void 0,"data-with-icon":!!l||void 0,"data-invalid":!!i||void 0,className:N.input})),f&&H.createElement("div",j4($y({},h),{className:N.rightSection}),f))});fd.displayName="@mantine/core/Input";fd.Wrapper=P9;fd.Label=wA;fd.Description=bA;fd.Error=SA;fd.Placeholder=O9;const Ki=fd,AMe={xs:X(12),sm:X(18),md:X(24),lg:X(34),xl:X(42)};var DMe=ft((t,{color:e,transitionDuration:n},{size:r})=>{const i=Oe({size:r,sizes:AMe}),o=e||(t.colorScheme==="dark"?t.white:t.black);return{root:{borderRadius:t.radius.sm,width:`calc(${i} + ${t.spacing.xs})`,height:`calc(${i} + ${t.spacing.xs})`,padding:`calc(${t.spacing.xs} / 2)`,cursor:"pointer"},burger:{position:"relative",userSelect:"none",boxSizing:"border-box","&, &::before, &::after":{display:"block",width:i,height:`calc(${i} / 12)`,backgroundColor:o,outline:`${X(1)} solid transparent`,transitionProperty:"background-color, transform",transitionDuration:`${n}ms`,"@media (prefers-reduced-motion)":{transitionDuration:t.respectReducedMotion?"0ms":void 0}},"&::before, &::after":{position:"absolute",content:'""',left:0},"&::before":{top:`calc((${i} / 3) * -1)`},"&::after":{top:`calc(${i} / 3)`},"&[data-opened]":{backgroundColor:"transparent","&::before":{transform:`translateY(calc(${i} / 3)) rotate(45deg)`},"&::after":{transform:`translateY(calc(-${i} / 3)) rotate(-45deg)`}}}}});const IMe=DMe;var LMe=Object.defineProperty,yw=Object.getOwnPropertySymbols,D9=Object.prototype.hasOwnProperty,I9=Object.prototype.propertyIsEnumerable,$4=(t,e,n)=>e in t?LMe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,kMe=(t,e)=>{for(var n in e||(e={}))D9.call(e,n)&&$4(t,n,e[n]);if(yw)for(var n of yw(e))I9.call(e,n)&&$4(t,n,e[n]);return t},NMe=(t,e)=>{var n={};for(var r in t)D9.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&yw)for(var r of yw(t))e.indexOf(r)<0&&I9.call(t,r)&&(n[r]=t[r]);return n};const FMe={size:"md",transitionDuration:300},L9=M.forwardRef((t,e)=>{const n=nt("Burger",FMe,t),{className:r,opened:i,color:o,size:s,classNames:a,styles:l,transitionDuration:c,variant:u}=n,d=NMe(n,["className","opened","color","size","classNames","styles","transitionDuration","variant"]),{classes:f,cx:h}=IMe({color:o,transitionDuration:c},{classNames:a,styles:l,name:"Burger",variant:u,size:s});return H.createElement(Fs,kMe({className:h(f.root,r),ref:e},d),H.createElement("div",{"data-opened":i||void 0,className:f.burger}))});L9.displayName="@mantine/core/Burger";var zMe=ft((t,{orientation:e,buttonBorderWidth:n})=>({root:{display:"flex",flexDirection:e==="vertical"?"column":"row","& [data-button]":{"&:first-of-type:not(:last-of-type)":{borderBottomRightRadius:0,[e==="vertical"?"borderBottomLeftRadius":"borderTopRightRadius"]:0,[e==="vertical"?"borderBottomWidth":"borderRightWidth"]:`calc(${X(n)} / 2)`},"&:last-of-type:not(:first-of-type)":{borderTopLeftRadius:0,[e==="vertical"?"borderTopRightRadius":"borderBottomLeftRadius"]:0,[e==="vertical"?"borderTopWidth":"borderLeftWidth"]:`calc(${X(n)} / 2)`},"&:not(:first-of-type):not(:last-of-type)":{borderRadius:0,[e==="vertical"?"borderTopWidth":"borderLeftWidth"]:`calc(${X(n)} / 2)`,[e==="vertical"?"borderBottomWidth":"borderRightWidth"]:`calc(${X(n)} / 2)`},"& + [data-button]":{[e==="vertical"?"marginTop":"marginLeft"]:`calc(${n} * -1)`,"@media (min-resolution: 192dpi)":{[e==="vertical"?"marginTop":"marginLeft"]:0}}}}}));const UMe=zMe;var BMe=Object.defineProperty,_w=Object.getOwnPropertySymbols,k9=Object.prototype.hasOwnProperty,N9=Object.prototype.propertyIsEnumerable,G4=(t,e,n)=>e in t?BMe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,HMe=(t,e)=>{for(var n in e||(e={}))k9.call(e,n)&&G4(t,n,e[n]);if(_w)for(var n of _w(e))N9.call(e,n)&&G4(t,n,e[n]);return t},VMe=(t,e)=>{var n={};for(var r in t)k9.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&_w)for(var r of _w(t))e.indexOf(r)<0&&N9.call(t,r)&&(n[r]=t[r]);return n};const jMe={orientation:"horizontal",buttonBorderWidth:1},F9=M.forwardRef((t,e)=>{const n=nt("ButtonGroup",jMe,t),{className:r,orientation:i,buttonBorderWidth:o,unstyled:s}=n,a=VMe(n,["className","orientation","buttonBorderWidth","unstyled"]),{classes:l,cx:c}=UMe({orientation:i,buttonBorderWidth:o},{name:"ButtonGroup",unstyled:s});return H.createElement(Xe,HMe({className:c(l.root,r),ref:e},a))});F9.displayName="@mantine/core/ButtonGroup";var $Me=Object.defineProperty,GMe=Object.defineProperties,WMe=Object.getOwnPropertyDescriptors,W4=Object.getOwnPropertySymbols,YMe=Object.prototype.hasOwnProperty,XMe=Object.prototype.propertyIsEnumerable,Y4=(t,e,n)=>e in t?$Me(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Qa=(t,e)=>{for(var n in e||(e={}))YMe.call(e,n)&&Y4(t,n,e[n]);if(W4)for(var n of W4(e))XMe.call(e,n)&&Y4(t,n,e[n]);return t},V_=(t,e)=>GMe(t,WMe(e));const ZMe=["filled","outline","light","white","default","subtle","gradient"],_T={xs:{height:yi.xs,paddingLeft:X(14),paddingRight:X(14)},sm:{height:yi.sm,paddingLeft:X(18),paddingRight:X(18)},md:{height:yi.md,paddingLeft:X(22),paddingRight:X(22)},lg:{height:yi.lg,paddingLeft:X(26),paddingRight:X(26)},xl:{height:yi.xl,paddingLeft:X(32),paddingRight:X(32)},"compact-xs":{height:X(22),paddingLeft:X(7),paddingRight:X(7)},"compact-sm":{height:X(26),paddingLeft:X(8),paddingRight:X(8)},"compact-md":{height:X(30),paddingLeft:X(10),paddingRight:X(10)},"compact-lg":{height:X(34),paddingLeft:X(12),paddingRight:X(12)},"compact-xl":{height:X(40),paddingLeft:X(14),paddingRight:X(14)}};function qMe({compact:t,size:e,withLeftIcon:n,withRightIcon:r}){if(t)return _T[`compact-${e}`];const i=_T[e];return i?V_(Qa({},i),{paddingLeft:n?`calc(${i.paddingLeft} / 1.5)`:i.paddingLeft,paddingRight:r?`calc(${i.paddingRight} / 1.5)`:i.paddingRight}):{}}const KMe=t=>({display:t?"block":"inline-block",width:t?"100%":"auto"});function QMe({variant:t,theme:e,color:n,gradient:r}){if(!ZMe.includes(t))return null;const i=e.fn.variant({color:n,variant:t,gradient:r});return t==="gradient"?Qa({border:0,backgroundImage:i.background,color:i.color},e.fn.hover({backgroundSize:"200%"})):Qa({border:`${X(1)} solid ${i.border}`,backgroundColor:i.background,color:i.color},e.fn.hover({backgroundColor:i.hover}))}var JMe=ft((t,{radius:e,fullWidth:n,compact:r,withLeftIcon:i,withRightIcon:o,color:s,gradient:a},{variant:l,size:c})=>({root:V_(Qa(V_(Qa(Qa(Qa(Qa({},qMe({compact:r,size:c,withLeftIcon:i,withRightIcon:o})),t.fn.fontStyles()),t.fn.focusStyles()),KMe(n)),{borderRadius:t.fn.radius(e),fontWeight:600,position:"relative",lineHeight:1,fontSize:Oe({size:c,sizes:t.fontSizes}),userSelect:"none",cursor:"pointer"}),QMe({variant:l,theme:t,color:s,gradient:a})),{"&:active":t.activeStyles,"&:disabled, &[data-disabled]":{borderColor:"transparent",backgroundColor:t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[2],color:t.colorScheme==="dark"?t.colors.dark[6]:t.colors.gray[5],cursor:"not-allowed",backgroundImage:"none",pointerEvents:"none","&:active":{transform:"none"}},"&[data-loading]":{pointerEvents:"none","&::before":V_(Qa({content:'""'},t.fn.cover(X(-1))),{backgroundColor:t.colorScheme==="dark"?t.fn.rgba(t.colors.dark[7],.5):"rgba(255, 255, 255, .5)",borderRadius:t.fn.radius(e),cursor:"not-allowed"})}}),icon:{display:"flex",alignItems:"center"},leftIcon:{marginRight:t.spacing.xs},rightIcon:{marginLeft:t.spacing.xs},centerLoader:{position:"absolute",left:"50%",transform:"translateX(-50%)",opacity:.5},inner:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",overflow:"visible"},label:{whiteSpace:"nowrap",height:"100%",overflow:"hidden",display:"flex",alignItems:"center"}}));const eEe=JMe;var tEe=Object.defineProperty,xw=Object.getOwnPropertySymbols,z9=Object.prototype.hasOwnProperty,U9=Object.prototype.propertyIsEnumerable,X4=(t,e,n)=>e in t?tEe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Z4=(t,e)=>{for(var n in e||(e={}))z9.call(e,n)&&X4(t,n,e[n]);if(xw)for(var n of xw(e))U9.call(e,n)&&X4(t,n,e[n]);return t},nEe=(t,e)=>{var n={};for(var r in t)z9.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&xw)for(var r of xw(t))e.indexOf(r)<0&&U9.call(t,r)&&(n[r]=t[r]);return n};const rEe={size:"sm",type:"button",variant:"filled",loaderPosition:"left"},MA=M.forwardRef((t,e)=>{const n=nt("Button",rEe,t),{className:r,size:i,color:o,type:s,disabled:a,children:l,leftIcon:c,rightIcon:u,fullWidth:d,variant:f,radius:h,uppercase:g,compact:y,loading:_,loaderPosition:v,loaderProps:x,gradient:w,classNames:S,styles:E,unstyled:C}=n,O=nEe(n,["className","size","color","type","disabled","children","leftIcon","rightIcon","fullWidth","variant","radius","uppercase","compact","loading","loaderPosition","loaderProps","gradient","classNames","styles","unstyled"]),{classes:R,cx:T,theme:A}=eEe({radius:h,color:o,fullWidth:d,compact:y,gradient:w,withLeftIcon:!!c,withRightIcon:!!u},{name:"Button",unstyled:C,classNames:S,styles:E,variant:f,size:i}),F=A.fn.variant({color:o,variant:f}),N=H.createElement(oA,Z4({color:F.color,size:`calc(${Oe({size:i,sizes:_T}).height} / 2)`},x));return H.createElement(Fs,Z4({className:T(R.root,r),type:s,disabled:a,"data-button":!0,"data-disabled":a||void 0,"data-loading":_||void 0,ref:e,unstyled:C},O),H.createElement("div",{className:R.inner},(c||_&&v==="left")&&H.createElement("span",{className:T(R.icon,R.leftIcon)},_&&v==="left"?N:c),_&&v==="center"&&H.createElement("span",{className:R.centerLoader},N),H.createElement("span",{className:R.label,style:{textTransform:g?"uppercase":void 0}},l),(u||_&&v==="right")&&H.createElement("span",{className:T(R.icon,R.rightIcon)},_&&v==="right"?N:u)))});MA.displayName="@mantine/core/Button";MA.Group=F9;const Ds=MA;var iEe=ft((t,{radius:e,shadow:n})=>({root:{outline:0,WebkitTapHighlightColor:"transparent",display:"block",textDecoration:"none",color:t.colorScheme==="dark"?t.colors.dark[0]:t.black,backgroundColor:t.colorScheme==="dark"?t.colors.dark[7]:t.white,boxSizing:"border-box",borderRadius:t.fn.radius(e),boxShadow:t.shadows[n]||n||"none","&[data-with-border]":{border:`${X(1)} solid ${t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[3]}`}}}));const oEe=iEe;var sEe=Object.defineProperty,ww=Object.getOwnPropertySymbols,B9=Object.prototype.hasOwnProperty,H9=Object.prototype.propertyIsEnumerable,q4=(t,e,n)=>e in t?sEe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,aEe=(t,e)=>{for(var n in e||(e={}))B9.call(e,n)&&q4(t,n,e[n]);if(ww)for(var n of ww(e))H9.call(e,n)&&q4(t,n,e[n]);return t},lEe=(t,e)=>{var n={};for(var r in t)B9.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&ww)for(var r of ww(t))e.indexOf(r)<0&&H9.call(t,r)&&(n[r]=t[r]);return n};const cEe={},V9=M.forwardRef((t,e)=>{const n=nt("Paper",cEe,t),{className:r,children:i,radius:o,withBorder:s,shadow:a,unstyled:l,variant:c}=n,u=lEe(n,["className","children","radius","withBorder","shadow","unstyled","variant"]),{classes:d,cx:f}=oEe({radius:o,shadow:a},{name:"Paper",unstyled:l,variant:c});return H.createElement(Xe,aEe({className:f(d.root,r),"data-with-border":s||void 0,ref:e},u),i)});V9.displayName="@mantine/core/Paper";const tv=V9,j9=M.createContext(null),uEe=j9.Provider,dEe=()=>M.useContext(j9);var fEe=Object.defineProperty,Sw=Object.getOwnPropertySymbols,$9=Object.prototype.hasOwnProperty,G9=Object.prototype.propertyIsEnumerable,K4=(t,e,n)=>e in t?fEe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Q4=(t,e)=>{for(var n in e||(e={}))$9.call(e,n)&&K4(t,n,e[n]);if(Sw)for(var n of Sw(e))G9.call(e,n)&&K4(t,n,e[n]);return t},hEe=(t,e)=>{var n={};for(var r in t)$9.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Sw)for(var r of Sw(t))e.indexOf(r)<0&&G9.call(t,r)&&(n[r]=t[r]);return n};const pEe={size:"sm"},W9=M.forwardRef((t,e)=>{const n=nt("CheckboxGroup",pEe,t),{children:r,value:i,defaultValue:o,onChange:s,size:a,wrapperProps:l}=n,c=hEe(n,["children","value","defaultValue","onChange","size","wrapperProps"]),[u,d]=Ar({value:i,defaultValue:o,finalValue:[],onChange:s}),f=h=>{const g=h.currentTarget.value;d(u.includes(g)?u.filter(y=>y!==g):[...u,g])};return H.createElement(uEe,{value:{value:u,onChange:f,size:a}},H.createElement(Ki.Wrapper,Q4(Q4({labelElement:"div",size:a,__staticSelector:"CheckboxGroup",ref:e},l),c),r))});W9.displayName="@mantine/core/CheckboxGroup";var mEe=Object.defineProperty,bw=Object.getOwnPropertySymbols,Y9=Object.prototype.hasOwnProperty,X9=Object.prototype.propertyIsEnumerable,J4=(t,e,n)=>e in t?mEe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,xT=(t,e)=>{for(var n in e||(e={}))Y9.call(e,n)&&J4(t,n,e[n]);if(bw)for(var n of bw(e))X9.call(e,n)&&J4(t,n,e[n]);return t},gEe=(t,e)=>{var n={};for(var r in t)Y9.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&bw)for(var r of bw(t))e.indexOf(r)<0&&X9.call(t,r)&&(n[r]=t[r]);return n};function Z9(t){return H.createElement("svg",xT({viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),H.createElement("path",{d:"M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}function vEe(t){var e=t,{indeterminate:n}=e,r=gEe(e,["indeterminate"]);return n?H.createElement("svg",xT({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 6"},r),H.createElement("rect",{width:"32",height:"6",fill:"currentColor",rx:"3"})):H.createElement(Z9,xT({},r))}var yEe=Object.defineProperty,_Ee=Object.defineProperties,xEe=Object.getOwnPropertyDescriptors,eU=Object.getOwnPropertySymbols,wEe=Object.prototype.hasOwnProperty,SEe=Object.prototype.propertyIsEnumerable,tU=(t,e,n)=>e in t?yEe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,nU=(t,e)=>{for(var n in e||(e={}))wEe.call(e,n)&&tU(t,n,e[n]);if(eU)for(var n of eU(e))SEe.call(e,n)&&tU(t,n,e[n]);return t},rU=(t,e)=>_Ee(t,xEe(e));const bEe={xs:X(16),sm:X(20),md:X(24),lg:X(30),xl:X(36)};var MEe=ft((t,{radius:e,color:n,transitionDuration:r,labelPosition:i,error:o,indeterminate:s},{size:a})=>{const l=Oe({size:a,sizes:bEe}),c=t.fn.variant({variant:"filled",color:n});return{icon:rU(nU({},t.fn.cover()),{ref:Ur("icon"),color:s?"inherit":t.white,transform:s?"none":`translateY(${X(5)}) scale(0.5)`,opacity:s?1:0,transitionProperty:"opacity, transform",transitionTimingFunction:"ease",transitionDuration:`${r}ms`,pointerEvents:"none",width:"60%",position:"absolute",zIndex:1,margin:"auto","@media (prefers-reduced-motion)":{transitionDuration:t.respectReducedMotion?"0ms":void 0}}),inner:{position:"relative",width:l,height:l,order:i==="left"?2:1},input:rU(nU({},t.fn.focusStyles()),{appearance:"none",backgroundColor:t.colorScheme==="dark"?t.colors.dark[6]:t.white,border:`${X(1)} solid ${o?t.fn.variant({variant:"filled",color:"red"}).background:t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[4]}`,width:l,height:l,borderRadius:t.fn.radius(e),padding:0,display:"block",margin:0,transition:`border-color ${r}ms ease, background-color ${r}ms ease`,cursor:t.cursorType,"&:checked":{backgroundColor:c.background,borderColor:c.background,[`& + .${Ur("icon")}`]:{opacity:1,color:t.white,transform:"translateY(0) scale(1)"}},"&:disabled":{backgroundColor:t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[2],borderColor:t.colorScheme==="dark"?t.colors.dark[6]:t.colors.gray[3],cursor:"not-allowed",pointerEvents:"none",[`& + .${Ur("icon")}`]:{color:t.colorScheme==="dark"?t.colors.dark[6]:t.colors.gray[5]}}})}});const EEe=MEe;var PEe=Object.defineProperty,CEe=Object.defineProperties,TEe=Object.getOwnPropertyDescriptors,iU=Object.getOwnPropertySymbols,OEe=Object.prototype.hasOwnProperty,REe=Object.prototype.propertyIsEnumerable,oU=(t,e,n)=>e in t?PEe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,AEe=(t,e)=>{for(var n in e||(e={}))OEe.call(e,n)&&oU(t,n,e[n]);if(iU)for(var n of iU(e))REe.call(e,n)&&oU(t,n,e[n]);return t},DEe=(t,e)=>CEe(t,TEe(e));const OP={xs:X(16),sm:X(20),md:X(24),lg:X(30),xl:X(36)};var IEe=ft((t,{labelPosition:e},{size:n})=>({root:{},body:{display:"flex","&:has(input:disabled) label":{color:t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[5]}},labelWrapper:DEe(AEe({},t.fn.fontStyles()),{display:"inline-flex",flexDirection:"column",WebkitTapHighlightColor:"transparent",fontSize:n in OP?Oe({size:n,sizes:t.fontSizes}):void 0,lineHeight:n in OP?Oe({size:n,sizes:OP}):void 0,color:t.colorScheme==="dark"?t.colors.dark[0]:t.black,cursor:t.cursorType,order:e==="left"?1:2}),description:{marginTop:`calc(${t.spacing.xs} / 2)`,[e==="left"?"paddingRight":"paddingLeft"]:t.spacing.sm},error:{marginTop:`calc(${t.spacing.xs} / 2)`,[e==="left"?"paddingRight":"paddingLeft"]:t.spacing.sm},label:{cursor:t.cursorType,[e==="left"?"paddingRight":"paddingLeft"]:t.spacing.sm,"&:disabled, &[data-disabled]":{color:t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[5]}}}));const LEe=IEe;var kEe=Object.defineProperty,Mw=Object.getOwnPropertySymbols,q9=Object.prototype.hasOwnProperty,K9=Object.prototype.propertyIsEnumerable,sU=(t,e,n)=>e in t?kEe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,NEe=(t,e)=>{for(var n in e||(e={}))q9.call(e,n)&&sU(t,n,e[n]);if(Mw)for(var n of Mw(e))K9.call(e,n)&&sU(t,n,e[n]);return t},FEe=(t,e)=>{var n={};for(var r in t)q9.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Mw)for(var r of Mw(t))e.indexOf(r)<0&&K9.call(t,r)&&(n[r]=t[r]);return n};const pb=M.forwardRef((t,e)=>{var n=t,{__staticSelector:r,className:i,classNames:o,styles:s,unstyled:a,children:l,label:c,description:u,id:d,disabled:f,error:h,size:g,labelPosition:y,variant:_}=n,v=FEe(n,["__staticSelector","className","classNames","styles","unstyled","children","label","description","id","disabled","error","size","labelPosition","variant"]);const{classes:x,cx:w}=LEe({labelPosition:y},{name:r,styles:s,classNames:o,unstyled:a,variant:_,size:g});return H.createElement(Xe,NEe({className:w(x.root,i),ref:e},v),H.createElement("div",{className:w(x.body)},l,H.createElement("div",{className:x.labelWrapper},c&&H.createElement("label",{className:x.label,"data-disabled":f||void 0,htmlFor:d},c),u&&H.createElement(Ki.Description,{className:x.description},u),h&&h!=="boolean"&&H.createElement(Ki.Error,{className:x.error},h))))});pb.displayName="@mantine/core/InlineInput";var zEe=Object.defineProperty,Ew=Object.getOwnPropertySymbols,Q9=Object.prototype.hasOwnProperty,J9=Object.prototype.propertyIsEnumerable,aU=(t,e,n)=>e in t?zEe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Gy=(t,e)=>{for(var n in e||(e={}))Q9.call(e,n)&&aU(t,n,e[n]);if(Ew)for(var n of Ew(e))J9.call(e,n)&&aU(t,n,e[n]);return t},UEe=(t,e)=>{var n={};for(var r in t)Q9.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Ew)for(var r of Ew(t))e.indexOf(r)<0&&J9.call(t,r)&&(n[r]=t[r]);return n};const BEe={size:"sm",transitionDuration:100,icon:vEe,labelPosition:"right"},nv=M.forwardRef((t,e)=>{const n=nt("Checkbox",BEe,t),{className:r,style:i,sx:o,checked:s,disabled:a,color:l,label:c,indeterminate:u,id:d,size:f,radius:h,wrapperProps:g,children:y,classNames:_,styles:v,transitionDuration:x,icon:w,unstyled:S,labelPosition:E,description:C,error:O,variant:R}=n,T=UEe(n,["className","style","sx","checked","disabled","color","label","indeterminate","id","size","radius","wrapperProps","children","classNames","styles","transitionDuration","icon","unstyled","labelPosition","description","error","variant"]),A=dEe(),F=zo(d),{systemStyles:N,rest:U}=Sl(T),{classes:k}=EEe({radius:h,color:l,transitionDuration:x,labelPosition:E,error:!!O,indeterminate:u},{name:"Checkbox",classNames:_,styles:v,unstyled:S,variant:R,size:A?.size||f}),z=A?{checked:A.value.includes(U.value),onChange:A.onChange}:{};return H.createElement(pb,Gy(Gy({className:r,sx:o,style:i,id:F,size:A?.size||f,labelPosition:E,label:c,description:C,error:O,disabled:a,__staticSelector:"Checkbox",classNames:_,styles:v,unstyled:S,"data-checked":z.checked||void 0,variant:R},N),g),H.createElement("div",{className:k.inner},H.createElement("input",Gy(Gy({id:F,ref:e,type:"checkbox",className:k.input,checked:s,disabled:a},U),z)),H.createElement(w,{indeterminate:u,className:k.icon})))});nv.displayName="@mantine/core/Checkbox";nv.Group=W9;const eY=M.createContext(null),HEe=eY.Provider,VEe=()=>M.useContext(eY),jEe={};function tY(t){const{value:e,defaultValue:n,onChange:r,multiple:i,children:o}=nt("ChipGroup",jEe,t),[s,a]=Ar({value:e,defaultValue:n,finalValue:i?[]:null,onChange:r}),l=u=>Array.isArray(s)?s.includes(u):u===s,c=u=>{const d=u.currentTarget.value;Array.isArray(s)?a(s.includes(d)?s.filter(f=>f!==d):[...s,d]):a(d)};return H.createElement(HEe,{value:{isChipSelected:l,onChange:c,multiple:i}},o)}tY.displayName="@mantine/core/ChipGroup";var $Ee=Object.defineProperty,GEe=Object.defineProperties,WEe=Object.getOwnPropertyDescriptors,lU=Object.getOwnPropertySymbols,YEe=Object.prototype.hasOwnProperty,XEe=Object.prototype.propertyIsEnumerable,cU=(t,e,n)=>e in t?$Ee(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Rs=(t,e)=>{for(var n in e||(e={}))YEe.call(e,n)&&cU(t,n,e[n]);if(lU)for(var n of lU(e))XEe.call(e,n)&&cU(t,n,e[n]);return t},Qp=(t,e)=>GEe(t,WEe(e));const uU={xs:X(24),sm:X(28),md:X(32),lg:X(36),xl:X(40)},Up={xs:X(10),sm:X(12),md:X(14),lg:X(16),xl:X(18)},dU={xs:X(16),sm:X(20),md:X(24),lg:X(28),xl:X(32)},Wy={xs:X(7.5),sm:X(10),md:X(11.5),lg:X(13),xl:X(15)};function ZEe(t,{color:e},n){const r=t.fn.variant({variant:"filled",color:e}),i=t.fn.variant({variant:"light",color:e});return n==="light"?{label:Rs({backgroundColor:t.colorScheme==="dark"?t.colors.dark[6]:t.colors.gray[1]},t.fn.hover({backgroundColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[0]})),checked:Qp(Rs({color:i.color,backgroundColor:i.background},t.fn.hover({backgroundColor:i.hover})),{"&, &:hover":{backgroundColor:t.fn.variant({variant:"light",color:e}).background}})}:n==="filled"?{label:Rs({backgroundColor:t.colorScheme==="dark"?t.colors.dark[6]:t.colors.gray[1]},t.fn.hover({backgroundColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[0]})),checked:Rs({color:r.color,backgroundColor:r.background},t.fn.hover({backgroundColor:r.hover}))}:n==="outline"?{label:Rs({backgroundColor:t.colorScheme==="dark"?t.colors.dark[6]:t.white,borderColor:t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[4]},t.fn.hover({backgroundColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[0]})),checked:{border:`${X(1)} solid ${r.background}`}}:{label:null,checked:null}}var qEe=ft((t,{radius:e,color:n},{size:r,variant:i})=>{const o=ZEe(t,{color:n},i);return{root:{},label:Qp(Rs(Qp(Rs({ref:Ur("label")},t.fn.fontStyles()),{boxSizing:"border-box",color:t.colorScheme==="dark"?t.colors.dark[0]:t.black,display:"inline-flex",alignItems:"center",userSelect:"none",border:`${X(1)} solid transparent`,borderRadius:t.fn.radius(e),height:Oe({size:r,sizes:uU}),fontSize:Oe({size:r,sizes:t.fontSizes}),lineHeight:`calc(${Oe({size:r,sizes:uU})} - ${X(2)})`,paddingLeft:Oe({size:r,sizes:dU}),paddingRight:Oe({size:r,sizes:dU}),cursor:"pointer",whiteSpace:"nowrap",transition:"background-color 100ms ease",WebkitTapHighlightColor:"transparent"}),o.label),{"&[data-disabled]":Qp(Rs({backgroundColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[1],borderColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[1],color:t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[5],cursor:"not-allowed",pointerEvents:"none"},t.fn.hover({backgroundColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[1]})),{[`& .${Ur("iconWrapper")}`]:{color:t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[5]}}),"&[data-checked]":{paddingLeft:Oe({size:r,sizes:Wy}),paddingRight:Oe({size:r,sizes:Wy}),"&:not([data-disabled])":o.checked}}),iconWrapper:{ref:Ur("iconWrapper"),color:i==="filled"?t.white:t.fn.variant({variant:"filled",color:n}).background,width:`calc(${Oe({size:r,sizes:Up})} + (${Oe({size:r,sizes:t.spacing})} / 1.5))`,maxWidth:`calc(${Oe({size:r,sizes:Up})} + (${Oe({size:r,sizes:t.spacing})} / 1.5))`,height:Oe({size:r,sizes:Up}),display:"inline-block",verticalAlign:"middle",overflow:"hidden"},checkIcon:{width:Oe({size:r,sizes:Up}),height:`calc(${Oe({size:r,sizes:Up})} / 1.1)`,display:"block"},input:{width:0,height:0,padding:0,opacity:0,margin:0,"&:disabled + label":Qp(Rs({backgroundColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[1],borderColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[1],color:t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[5],cursor:"not-allowed",pointerEvents:"none"},t.fn.hover({backgroundColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[1]})),{[`& .${Ur("iconWrapper")}`]:{color:t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[5]},"&[data-checked]":{paddingLeft:Oe({size:r,sizes:Wy}),paddingRight:Oe({size:r,sizes:Wy}),"&:not([data-disabled])":{backgroundColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[1],borderColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[1],color:t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[5]}}}),"&:focus":{outline:"none",[`& + .${Ur("label")}`]:Rs({},t.focusRing==="always"||t.focusRing==="auto"?t.focusRingStyles.styles(t):t.focusRingStyles.resetStyles(t)),"&:focus:not(:focus-visible)":{[`& + .${Ur("label")}`]:Rs({},t.focusRing==="auto"||t.focusRing==="never"?t.focusRingStyles.resetStyles(t):null)}}}}});const KEe=qEe;var QEe=Object.defineProperty,Pw=Object.getOwnPropertySymbols,nY=Object.prototype.hasOwnProperty,rY=Object.prototype.propertyIsEnumerable,fU=(t,e,n)=>e in t?QEe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Yy=(t,e)=>{for(var n in e||(e={}))nY.call(e,n)&&fU(t,n,e[n]);if(Pw)for(var n of Pw(e))rY.call(e,n)&&fU(t,n,e[n]);return t},JEe=(t,e)=>{var n={};for(var r in t)nY.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Pw)for(var r of Pw(t))e.indexOf(r)<0&&rY.call(t,r)&&(n[r]=t[r]);return n};const ePe={type:"checkbox",size:"sm",radius:"xl",variant:"outline"},mb=M.forwardRef((t,e)=>{const n=nt("Chip",ePe,t),{radius:r,type:i,size:o,variant:s,disabled:a,id:l,color:c,children:u,className:d,classNames:f,style:h,styles:g,checked:y,defaultChecked:_,onChange:v,sx:x,wrapperProps:w,value:S,unstyled:E}=n,C=JEe(n,["radius","type","size","variant","disabled","id","color","children","className","classNames","style","styles","checked","defaultChecked","onChange","sx","wrapperProps","value","unstyled"]),O=VEe(),R=zo(l),{systemStyles:T,rest:A}=Sl(C),{classes:F,cx:N}=KEe({radius:r,color:c},{classNames:f,styles:g,unstyled:E,name:"Chip",variant:s,size:o}),[U,k]=Ar({value:y,defaultValue:_,finalValue:!1,onChange:v}),z=O?{checked:O.isChipSelected(S),onChange:O.onChange,type:O.multiple?"checkbox":"radio"}:{},G=z.checked||U;return H.createElement(Xe,Yy(Yy({className:N(F.root,d),style:h,sx:x},T),w),H.createElement("input",Yy(Yy({type:i,className:F.input,checked:G,onChange:W=>k(W.currentTarget.checked),id:R,disabled:a,ref:e,value:S},z),A)),H.createElement("label",{htmlFor:R,"data-checked":G||void 0,"data-disabled":a||void 0,className:F.label},G&&H.createElement("span",{className:F.iconWrapper},H.createElement(Z9,{className:F.checkIcon})),u))});mb.displayName="@mantine/core/Chip";mb.Group=tY;var tPe=Object.defineProperty,nPe=Object.defineProperties,rPe=Object.getOwnPropertyDescriptors,hU=Object.getOwnPropertySymbols,iPe=Object.prototype.hasOwnProperty,oPe=Object.prototype.propertyIsEnumerable,pU=(t,e,n)=>e in t?tPe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,mU=(t,e)=>{for(var n in e||(e={}))iPe.call(e,n)&&pU(t,n,e[n]);if(hU)for(var n of hU(e))oPe.call(e,n)&&pU(t,n,e[n]);return t},gU=(t,e)=>nPe(t,rPe(e)),sPe=ft((t,{radius:e},{size:n})=>{const r=t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[3];return{root:gU(mU({},t.fn.focusStyles()),{width:X(n),height:X(n),WebkitTapHighlightColor:"transparent",border:0,borderRadius:t.fn.radius(e),appearance:"none",WebkitAppearance:"none",padding:0,position:"relative",overflow:"hidden"}),overlay:gU(mU({},t.fn.cover()),{position:"absolute",borderRadius:t.fn.radius(e)}),children:{display:"inline-flex",justifyContent:"center",alignItems:"center"},shadowOverlay:{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${X(1)} inset, rgb(0, 0, 0, .15) 0 0 ${X(4)} inset`,zIndex:1},alphaOverlay:{backgroundImage:`linear-gradient(45deg, ${r} 25%, transparent 25%), linear-gradient(-45deg, ${r} 25%, transparent 25%), linear-gradient(45deg, transparent 75%, ${r} 75%), linear-gradient(-45deg, ${t.colorScheme==="dark"?t.colors.dark[7]:t.white} 75%, ${r} 75%)`,backgroundSize:`${X(8)} ${X(8)}`,backgroundPosition:`0 0, 0 ${X(4)}, ${X(4)} -${X(4)}, -${X(4)} 0`}}});const aPe=sPe;var lPe=Object.defineProperty,Cw=Object.getOwnPropertySymbols,iY=Object.prototype.hasOwnProperty,oY=Object.prototype.propertyIsEnumerable,vU=(t,e,n)=>e in t?lPe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,cPe=(t,e)=>{for(var n in e||(e={}))iY.call(e,n)&&vU(t,n,e[n]);if(Cw)for(var n of Cw(e))oY.call(e,n)&&vU(t,n,e[n]);return t},uPe=(t,e)=>{var n={};for(var r in t)iY.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Cw)for(var r of Cw(t))e.indexOf(r)<0&&oY.call(t,r)&&(n[r]=t[r]);return n};const dPe={size:X(25),radius:X(25),withShadow:!0},sY=M.forwardRef((t,e)=>{const n=nt("ColorSwatch",dPe,t),{color:r,size:i,radius:o,className:s,children:a,classNames:l,styles:c,unstyled:u,withShadow:d,variant:f}=n,h=uPe(n,["color","size","radius","className","children","classNames","styles","unstyled","withShadow","variant"]),{classes:g,cx:y}=aPe({radius:o},{classNames:l,styles:c,unstyled:u,name:"ColorSwatch",size:i,variant:f});return H.createElement(Xe,cPe({className:y(g.root,s),ref:e},h),H.createElement("div",{className:y(g.alphaOverlay,g.overlay)}),d&&H.createElement("div",{className:y(g.shadowOverlay,g.overlay)}),H.createElement("div",{className:g.overlay,style:{backgroundColor:r}}),H.createElement("div",{className:y(g.children,g.overlay)},a))});sY.displayName="@mantine/core/ColorSwatch";const EA=sY,wa={xs:X(8),sm:X(12),md:X(16),lg:X(20),xl:X(22)};var fPe=ft((t,e,{size:n})=>{const r=Oe({size:n,sizes:wa});return{thumb:{overflow:"hidden",boxSizing:"border-box",position:"absolute",boxShadow:`0 0 ${X(1)} rgba(0, 0, 0, .6)`,border:`${X(2)} solid ${t.white}`,backgroundColor:"transparent",width:r,height:r,borderRadius:r}}});const hPe=fPe;var pPe=Object.defineProperty,yU=Object.getOwnPropertySymbols,mPe=Object.prototype.hasOwnProperty,gPe=Object.prototype.propertyIsEnumerable,_U=(t,e,n)=>e in t?pPe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,vPe=(t,e)=>{for(var n in e||(e={}))mPe.call(e,n)&&_U(t,n,e[n]);if(yU)for(var n of yU(e))gPe.call(e,n)&&_U(t,n,e[n]);return t};function PA({position:t,className:e,styles:n,classNames:r,style:i,size:o,__staticSelector:s,unstyled:a,variant:l}){const{classes:c,cx:u}=hPe(null,{classNames:r,styles:n,name:s,unstyled:a,size:o,variant:l});return H.createElement("div",{className:u(c.thumb,e),style:vPe({left:`calc(${t.x*100}% - ${wa[o]} / 2)`,top:`calc(${t.y*100}% - ${wa[o]} / 2)`},i)})}PA.displayName="@mantine/core/Thumb";var yPe=Object.defineProperty,xU=Object.getOwnPropertySymbols,_Pe=Object.prototype.hasOwnProperty,xPe=Object.prototype.propertyIsEnumerable,wU=(t,e,n)=>e in t?yPe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,SU=(t,e)=>{for(var n in e||(e={}))_Pe.call(e,n)&&wU(t,n,e[n]);if(xU)for(var n of xU(e))xPe.call(e,n)&&wU(t,n,e[n]);return t},wPe=ft((t,e,{size:n})=>({sliderThumb:{ref:Ur("sliderThumb")},slider:{position:"relative",height:`calc(${Oe({size:n,sizes:wa})} + ${X(2)})`,boxSizing:"border-box",marginLeft:`calc(${Oe({size:n,sizes:wa})} / 2)`,marginRight:`calc(${Oe({size:n,sizes:wa})} / 2)`,outline:0,[`&:focus .${Ur("sliderThumb")}`]:SU({},t.focusRing==="always"||t.focusRing==="auto"?t.focusRingStyles.styles(t):t.focusRingStyles.resetStyles(t)),[`&:focus:not(:focus-visible) .${Ur("sliderThumb")}`]:SU({},t.focusRing==="auto"||t.focusRing==="never"?t.focusRingStyles.resetStyles(t):null)},sliderOverlay:{position:"absolute",boxSizing:"border-box",top:0,bottom:0,left:`calc(${Oe({size:n,sizes:wa})} * -1 / 2 - ${X(1)})`,right:`calc(${Oe({size:n,sizes:wa})} * -1 / 2 - ${X(1)})`,borderRadius:1e3}}));const SPe=wPe;var bPe=Object.defineProperty,MPe=Object.defineProperties,EPe=Object.getOwnPropertyDescriptors,Tw=Object.getOwnPropertySymbols,aY=Object.prototype.hasOwnProperty,lY=Object.prototype.propertyIsEnumerable,bU=(t,e,n)=>e in t?bPe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,PPe=(t,e)=>{for(var n in e||(e={}))aY.call(e,n)&&bU(t,n,e[n]);if(Tw)for(var n of Tw(e))lY.call(e,n)&&bU(t,n,e[n]);return t},CPe=(t,e)=>MPe(t,EPe(e)),TPe=(t,e)=>{var n={};for(var r in t)aY.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Tw)for(var r of Tw(t))e.indexOf(r)<0&&lY.call(t,r)&&(n[r]=t[r]);return n};const CA=M.forwardRef((t,e)=>{var n=t,{value:r,onChange:i,onChangeEnd:o,maxValue:s,round:a,size:l="md",thumbColor:c="transparent",__staticSelector:u="ColorSlider",focusable:d=!0,overlays:f,classNames:h,styles:g,className:y,unstyled:_,variant:v}=n,x=TPe(n,["value","onChange","onChangeEnd","maxValue","round","size","thumbColor","__staticSelector","focusable","overlays","classNames","styles","className","unstyled","variant"]);const{classes:w,cx:S}=SPe(null,{classNames:h,styles:g,name:u,unstyled:_,variant:v,size:l}),[E,C]=M.useState({y:0,x:r/s}),O=M.useRef(E),R=U=>a?Math.round(U*s):U*s,{ref:T}=iA(({x:U,y:k})=>{O.current={x:U,y:k},i(R(U))},{onScrubEnd:()=>{const{x:U}=O.current;o(R(U))}});Qr(()=>{C({y:0,x:r/s})},[r]);const A=(U,k)=>{U.preventDefault();const z=iW(k);i(R(z.x)),o(R(z.x))},F=U=>{switch(U.key){case"ArrowRight":{A(U,{x:E.x+.05,y:E.y});break}case"ArrowLeft":{A(U,{x:E.x-.05,y:E.y});break}}},N=f.map((U,k)=>H.createElement("div",{className:w.sliderOverlay,style:U,key:k}));return H.createElement(Xe,CPe(PPe({},x),{ref:Da(T,e),className:S(w.slider,y),role:"slider","aria-valuenow":r,"aria-valuemax":s,"aria-valuemin":0,tabIndex:d?0:-1,onKeyDown:F}),N,H.createElement(PA,{__staticSelector:u,classNames:h,styles:g,position:E,style:{top:X(1),backgroundColor:c},className:w.sliderThumb,size:l}))});CA.displayName="@mantine/core/ColorSlider";var OPe=Object.defineProperty,RPe=Object.defineProperties,APe=Object.getOwnPropertyDescriptors,Ow=Object.getOwnPropertySymbols,cY=Object.prototype.hasOwnProperty,uY=Object.prototype.propertyIsEnumerable,MU=(t,e,n)=>e in t?OPe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,DPe=(t,e)=>{for(var n in e||(e={}))cY.call(e,n)&&MU(t,n,e[n]);if(Ow)for(var n of Ow(e))uY.call(e,n)&&MU(t,n,e[n]);return t},IPe=(t,e)=>RPe(t,APe(e)),LPe=(t,e)=>{var n={};for(var r in t)cY.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Ow)for(var r of Ow(t))e.indexOf(r)<0&&uY.call(t,r)&&(n[r]=t[r]);return n};const kPe={},dY=M.forwardRef((t,e)=>{const n=nt("HueSlider",kPe,t),{value:r,onChange:i,onChangeEnd:o,__staticSelector:s}=n,a=LPe(n,["value","onChange","onChangeEnd","__staticSelector"]);return H.createElement(CA,IPe(DPe({},a),{ref:e,value:r,onChange:i,onChangeEnd:o,maxValue:360,thumbColor:`hsl(${r}, 100%, 50%)`,round:!0,__staticSelector:s||"HueSlider",overlays:[{backgroundImage:"linear-gradient(to right,hsl(0,100%,50%),hsl(60,100%,50%),hsl(120,100%,50%),hsl(170,100%,50%),hsl(240,100%,50%),hsl(300,100%,50%),hsl(360,100%,50%))"},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${X(1)} inset, rgb(0, 0, 0, .15) 0 0 ${X(4)} inset`}]}))});dY.displayName="@mantine/core/HueSlider";var NPe=Object.defineProperty,FPe=Object.defineProperties,zPe=Object.getOwnPropertyDescriptors,EU=Object.getOwnPropertySymbols,UPe=Object.prototype.hasOwnProperty,BPe=Object.prototype.propertyIsEnumerable,PU=(t,e,n)=>e in t?NPe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,CU=(t,e)=>{for(var n in e||(e={}))UPe.call(e,n)&&PU(t,n,e[n]);if(EU)for(var n of EU(e))BPe.call(e,n)&&PU(t,n,e[n]);return t},TU=(t,e)=>FPe(t,zPe(e));function os(t,e=0,n=10**e){return Math.round(n*t)/n}function HPe({h:t,s:e,l:n,a:r}){const i=e*((n<50?n:100-n)/100);return{h:t,s:i>0?2*i/(n+i)*100:0,v:n+i,a:r}}const VPe={grad:360/400,turn:360,rad:360/(Math.PI*2)};function jPe(t,e="deg"){return Number(t)*(VPe[e]||1)}const $Pe=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function OU(t){const e=$Pe.exec(t);return e?HPe({h:jPe(e[1],e[2]),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)}):{h:0,s:0,v:0,a:1}}function wT({r:t,g:e,b:n,a:r}){const i=Math.max(t,e,n),o=i-Math.min(t,e,n),s=o?i===t?(e-n)/o:i===e?2+(n-t)/o:4+(t-e)/o:0;return{h:os(60*(s<0?s+6:s),3),s:os(i?o/i*100:0,3),v:os(i/255*100,3),a:r}}function ST(t){const e=t[0]==="#"?t.slice(1):t;return e.length===3?wT({r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:1}):wT({r:parseInt(e.slice(0,2),16),g:parseInt(e.slice(2,4),16),b:parseInt(e.slice(4,6),16),a:1})}function GPe(t){const e=t[0]==="#"?t.slice(1):t,n=s=>os(parseInt(s,16)/255,3);if(e.length===4){const s=e.slice(0,3),a=n(e[3]+e[3]);return TU(CU({},ST(s)),{a})}const r=e.slice(0,6),i=n(e.slice(6,8));return TU(CU({},ST(r)),{a:i})}const WPe=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i;function RU(t){const e=WPe.exec(t);return e?wT({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):{h:0,s:0,v:0,a:1}}const fY={hex:/^#?([0-9A-F]{3}){1,2}$/i,hexa:/^#?([0-9A-F]{4}){1,2}$/i,rgb:/^rgb\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/i,rgba:/^rgba\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/i,hsl:/hsl\(\s*(\d+)\s*,\s*(\d+(?:\.\d+)?%)\s*,\s*(\d+(?:\.\d+)?%)\)/i,hsla:/^hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*(\d*(?:\.\d+)?)\)$/i},YPe={hex:ST,hexa:GPe,rgb:RU,rgba:RU,hsl:OU,hsla:OU};function Jp(t){for(const[,e]of Object.entries(fY))if(e.test(t))return!0;return!1}function Iu(t){if(typeof t!="string")return{h:0,s:0,v:0,a:1};if(t==="transparent")return{h:0,s:0,v:0,a:0};const e=t.trim();for(const[n,r]of Object.entries(fY))if(r.test(e))return YPe[n](e);return{h:0,s:0,v:0,a:1}}var XPe=Object.defineProperty,ZPe=Object.defineProperties,qPe=Object.getOwnPropertyDescriptors,Rw=Object.getOwnPropertySymbols,hY=Object.prototype.hasOwnProperty,pY=Object.prototype.propertyIsEnumerable,AU=(t,e,n)=>e in t?XPe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,KPe=(t,e)=>{for(var n in e||(e={}))hY.call(e,n)&&AU(t,n,e[n]);if(Rw)for(var n of Rw(e))pY.call(e,n)&&AU(t,n,e[n]);return t},QPe=(t,e)=>ZPe(t,qPe(e)),JPe=(t,e)=>{var n={};for(var r in t)hY.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Rw)for(var r of Rw(t))e.indexOf(r)<0&&pY.call(t,r)&&(n[r]=t[r]);return n};const eCe={},mY=M.forwardRef((t,e)=>{const n=nt("AlphaSlider",eCe,t),{value:r,onChange:i,onChangeEnd:o,color:s,__staticSelector:a}=n,l=JPe(n,["value","onChange","onChangeEnd","color","__staticSelector"]),c=Ir(),u=c.colorScheme==="dark"?c.colors.dark[4]:c.colors.gray[3];return H.createElement(CA,QPe(KPe({},l),{ref:e,value:r,onChange:d=>i(os(d,2)),onChangeEnd:d=>o(os(d,2)),maxValue:1,round:!1,__staticSelector:a||"AlphaSlider",overlays:[{backgroundImage:`linear-gradient(45deg, ${u} 25%, transparent 25%), linear-gradient(-45deg, ${u} 25%, transparent 25%), linear-gradient(45deg, transparent 75%, ${u} 75%), linear-gradient(-45deg, ${c.colorScheme==="dark"?c.colors.dark[7]:c.white} 75%, ${u} 75%)`,backgroundSize:`${X(8)} ${X(8)}`,backgroundPosition:`0 0, 0 ${X(4)}, ${X(4)} -${X(4)}, -${X(4)} 0`},{backgroundImage:`linear-gradient(90deg, transparent, ${s})`},{boxShadow:`rgba(0, 0, 0, .1) 0 0 0 ${X(1)} inset, rgb(0, 0, 0, .15) 0 0 ${X(4)} inset`}]}))});mY.displayName="@mantine/core/AlphaSlider";var tCe=Object.defineProperty,DU=Object.getOwnPropertySymbols,nCe=Object.prototype.hasOwnProperty,rCe=Object.prototype.propertyIsEnumerable,IU=(t,e,n)=>e in t?tCe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,RP=(t,e)=>{for(var n in e||(e={}))nCe.call(e,n)&&IU(t,n,e[n]);if(DU)for(var n of DU(e))rCe.call(e,n)&&IU(t,n,e[n]);return t};const iCe={xs:X(100),sm:X(110),md:X(120),lg:X(140),xl:X(160)};var oCe=ft((t,e,{size:n})=>({saturationThumb:{ref:Ur("saturationThumb")},saturation:{boxSizing:"border-box",position:"relative",height:Oe({size:n,sizes:iCe}),borderRadius:t.radius.sm,margin:`calc(${Oe({size:n,sizes:wa})} / 2)`,WebkitTapHighlightColor:"transparent",[`&:focus .${Ur("saturationThumb")}`]:RP({},t.focusRing==="always"||t.focusRing==="auto"?t.focusRingStyles.styles(t):t.focusRingStyles.resetStyles(t)),[`&:focus:not(:focus-visible) .${Ur("saturationThumb")}`]:RP({},t.focusRing==="auto"||t.focusRing==="never"?t.focusRingStyles.resetStyles(t):null)},saturationOverlay:RP({boxSizing:"border-box",borderRadius:t.radius.sm},t.fn.cover(`calc(${Oe({size:n,sizes:wa})} * -1 / 2 - ${X(1)})`))}));const sCe=oCe;function gY({h:t,s:e,v:n,a:r}){const i=t/360*6,o=e/100,s=n/100,a=Math.floor(i),l=s*(1-o),c=s*(1-(i-a)*o),u=s*(1-(1-i+a)*o),d=a%6;return{r:os([s,c,l,l,u,s][d]*255),g:os([u,s,s,c,l,l][d]*255),b:os([l,l,u,s,s,c][d]*255),a:os(r,2)}}function LU(t,e){const{r:n,g:r,b:i,a:o}=gY(t);return e?`rgba(${n}, ${r}, ${i}, ${os(o,2)})`:`rgb(${n}, ${r}, ${i})`}function kU({h:t,s:e,v:n,a:r},i){const o=(200-e)*n/100,s={h:Math.round(t),s:Math.round(o>0&&o<200?e*n/100/(o<=100?o:200-o)*100:0),l:Math.round(o/2)};return i?`hsla(${s.h}, ${s.s}%, ${s.l}%, ${os(r,2)})`:`hsl(${s.h}, ${s.s}%, ${s.l}%)`}function j_(t){const e=t.toString(16);return e.length<2?`0${e}`:e}function vY(t){const{r:e,g:n,b:r}=gY(t);return`#${j_(e)}${j_(n)}${j_(r)}`}function aCe(t){const e=Math.round(t.a*255);return`${vY(t)}${j_(e)}`}const AP={hex:vY,hexa:t=>aCe(t),rgb:t=>LU(t,!1),rgba:t=>LU(t,!0),hsl:t=>kU(t,!1),hsla:t=>kU(t,!0)};function Ps(t,e){return e?t in AP?AP[t](e):AP.hex(e):"#000000"}function yY({value:t,onChange:e,onChangeEnd:n,focusable:r=!0,__staticSelector:i="saturation",size:o,color:s,saturationLabel:a,classNames:l,styles:c,unstyled:u,variant:d}){const{classes:f}=sCe(null,{classNames:l,styles:c,name:i,unstyled:u,variant:d,size:o}),[h,g]=M.useState({x:t.s/100,y:1-t.v/100}),y=M.useRef(h),{ref:_}=iA(({x:w,y:S})=>{y.current={x:w,y:S},e({s:Math.round(w*100),v:Math.round((1-S)*100)})},{onScrubEnd:()=>{const{x:w,y:S}=y.current;n({s:Math.round(w*100),v:Math.round((1-S)*100)})}});M.useEffect(()=>{g({x:t.s/100,y:1-t.v/100})},[t.s,t.v]);const v=(w,S)=>{w.preventDefault();const E=iW(S);e({s:Math.round(E.x*100),v:Math.round((1-E.y)*100)}),n({s:Math.round(E.x*100),v:Math.round((1-E.y)*100)})},x=w=>{switch(w.key){case"ArrowUp":{v(w,{y:h.y-.05,x:h.x});break}case"ArrowDown":{v(w,{y:h.y+.05,x:h.x});break}case"ArrowRight":{v(w,{x:h.x+.05,y:h.y});break}case"ArrowLeft":{v(w,{x:h.x-.05,y:h.y});break}}};return H.createElement("div",{className:f.saturation,ref:_,role:"slider","aria-label":a,"aria-valuenow":h.x,"aria-valuetext":Ps("rgba",t),tabIndex:r?0:-1,onKeyDown:x},H.createElement("div",{className:f.saturationOverlay,style:{backgroundColor:`hsl(${t.h}, 100%, 50%)`}}),H.createElement("div",{className:f.saturationOverlay,style:{backgroundImage:"linear-gradient(90deg, #fff, transparent)"}}),H.createElement("div",{className:f.saturationOverlay,style:{backgroundImage:"linear-gradient(0deg, #000, transparent)"}}),H.createElement(PA,{__staticSelector:i,classNames:l,styles:c,position:h,className:f.saturationThumb,style:{backgroundColor:s},size:o}))}yY.displayName="@mantine/core/Saturation";var lCe=ft((t,{swatchesPerRow:e})=>({swatch:{width:`calc(${100/e}% - ${X(4)})`,height:0,paddingBottom:`calc(${100/e}% - ${X(4)})`,margin:X(2),boxSizing:"content-box"},swatches:{boxSizing:"border-box",marginLeft:X(-2),marginRight:X(-2),display:"flex",flexWrap:"wrap"}}));const cCe=lCe;var uCe=Object.defineProperty,Aw=Object.getOwnPropertySymbols,_Y=Object.prototype.hasOwnProperty,xY=Object.prototype.propertyIsEnumerable,NU=(t,e,n)=>e in t?uCe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,dCe=(t,e)=>{for(var n in e||(e={}))_Y.call(e,n)&&NU(t,n,e[n]);if(Aw)for(var n of Aw(e))xY.call(e,n)&&NU(t,n,e[n]);return t},fCe=(t,e)=>{var n={};for(var r in t)_Y.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Aw)for(var r of Aw(t))e.indexOf(r)<0&&xY.call(t,r)&&(n[r]=t[r]);return n};function wY(t){var e=t,{data:n,swatchesPerRow:r=10,focusable:i=!0,classNames:o,styles:s,__staticSelector:a="color-picker",unstyled:l,setValue:c,onChangeEnd:u,variant:d,size:f}=e,h=fCe(e,["data","swatchesPerRow","focusable","classNames","styles","__staticSelector","unstyled","setValue","onChangeEnd","variant","size"]);const{classes:g}=cCe({swatchesPerRow:r},{classNames:o,styles:s,name:a,unstyled:l,variant:d,size:f}),y=n.map((_,v)=>H.createElement(EA,{className:g.swatch,component:"button",type:"button",color:_,key:v,radius:"sm",onClick:()=>{c(_),u?.(_)},style:{cursor:"pointer"},"aria-label":_,tabIndex:i?0:-1}));return H.createElement("div",dCe({className:g.swatches},h),y)}wY.displayName="@mantine/core/Swatches";const hCe={xs:X(180),sm:X(200),md:X(240),lg:X(280),xl:X(320)};var pCe=ft((t,{fullWidth:e},{size:n})=>({preview:{},wrapper:{boxSizing:"border-box",width:e?"100%":Oe({size:n,sizes:hCe}),padding:X(1)},body:{display:"flex",boxSizing:"border-box",paddingTop:`calc(${Oe({size:n,sizes:t.spacing})} / 2)`},sliders:{flex:1,boxSizing:"border-box","&:not(:only-child)":{marginRight:t.spacing.xs}},slider:{boxSizing:"border-box","& + &":{marginTop:X(5)}},swatch:{cursor:"pointer"}}));const mCe=pCe;var gCe=Object.defineProperty,vCe=Object.defineProperties,yCe=Object.getOwnPropertyDescriptors,Dw=Object.getOwnPropertySymbols,SY=Object.prototype.hasOwnProperty,bY=Object.prototype.propertyIsEnumerable,FU=(t,e,n)=>e in t?gCe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,cf=(t,e)=>{for(var n in e||(e={}))SY.call(e,n)&&FU(t,n,e[n]);if(Dw)for(var n of Dw(e))bY.call(e,n)&&FU(t,n,e[n]);return t},DP=(t,e)=>vCe(t,yCe(e)),_Ce=(t,e)=>{var n={};for(var r in t)SY.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Dw)for(var r of Dw(t))e.indexOf(r)<0&&bY.call(t,r)&&(n[r]=t[r]);return n};const xCe={xs:26,sm:34,md:42,lg:50,xl:54},wCe={swatchesPerRow:10,size:"sm",withPicker:!0,focusable:!0,__staticSelector:"ColorPicker"},MY=M.forwardRef((t,e)=>{const n=nt("ColorPicker",wCe,t),{value:r,defaultValue:i,onChange:o,onChangeEnd:s,format:a,swatches:l,swatchesPerRow:c,size:u,withPicker:d,fullWidth:f,focusable:h,__staticSelector:g,saturationLabel:y,hueLabel:_,alphaLabel:v,className:x,styles:w,classNames:S,unstyled:E,onColorSwatchClick:C,variant:O}=n,R=_Ce(n,["value","defaultValue","onChange","onChangeEnd","format","swatches","swatchesPerRow","size","withPicker","fullWidth","focusable","__staticSelector","saturationLabel","hueLabel","alphaLabel","className","styles","classNames","unstyled","onColorSwatchClick","variant"]),{classes:T,cx:A}=mCe({fullWidth:f},{classNames:S,styles:w,name:g,unstyled:E,variant:O,size:u}),F=M.useRef(a),N=M.useRef(null),U=M.useRef(!0),k=a==="hexa"||a==="rgba"||a==="hsla",[z,G,W]=Ar({value:r,defaultValue:i,finalValue:"#FFFFFF",onChange:o}),[B,j]=M.useState(Iu(z)),$=q=>{U.current=!1,j(K=>{const re=cf(cf({},K),q);return N.current=Ps(F.current,re),re}),G(N.current),setTimeout(()=>{U.current=!0},0)};return Qr(()=>{Jp(r)&&U.current&&(j(Iu(r)),U.current=!0)},[r]),Qr(()=>{F.current=a,G(Ps(a,B))},[a]),H.createElement(Xe,cf({className:A(T.wrapper,x),ref:e},R),d&&H.createElement(H.Fragment,null,H.createElement(yY,{value:B,onChange:$,onChangeEnd:({s:q,v:K})=>s?.(Ps(F.current,DP(cf({},B),{s:q,v:K}))),color:z,styles:w,classNames:S,size:u,focusable:h,saturationLabel:y,__staticSelector:g}),H.createElement("div",{className:T.body},H.createElement("div",{className:T.sliders},H.createElement(dY,{value:B.h,onChange:q=>$({h:q}),onChangeEnd:q=>s?.(Ps(F.current,DP(cf({},B),{h:q}))),size:u,styles:w,classNames:S,focusable:h,"aria-label":_,__staticSelector:g}),k&&H.createElement(mY,{value:B.a,onChange:q=>$({a:q}),onChangeEnd:q=>{s?.(Ps(F.current,DP(cf({},B),{a:q})))},size:u,color:Ps("hex",B),style:{marginTop:X(6)},styles:w,classNames:S,focusable:h,"aria-label":v,__staticSelector:g})),k&&H.createElement(EA,{color:z,radius:"sm",size:Oe({size:u,sizes:xCe}),className:T.preview}))),Array.isArray(l)&&H.createElement(wY,{data:l,style:{marginTop:X(5)},swatchesPerRow:c,focusable:h,classNames:S,styles:w,__staticSelector:g,setValue:G,onChangeEnd:q=>{const K=Ps(a,Iu(q));C?.(K),s?.(K),W||j(Iu(q))}}))});MY.displayName="@mantine/core/ColorPicker";var SCe=Object.defineProperty,Iw=Object.getOwnPropertySymbols,EY=Object.prototype.hasOwnProperty,PY=Object.prototype.propertyIsEnumerable,zU=(t,e,n)=>e in t?SCe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,bCe=(t,e)=>{for(var n in e||(e={}))EY.call(e,n)&&zU(t,n,e[n]);if(Iw)for(var n of Iw(e))PY.call(e,n)&&zU(t,n,e[n]);return t},MCe=(t,e)=>{var n={};for(var r in t)EY.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Iw)for(var r of Iw(t))e.indexOf(r)<0&&PY.call(t,r)&&(n[r]=t[r]);return n};function ECe(t){var e=t,{size:n}=e,r=MCe(e,["size"]);return H.createElement("svg",bCe({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-color-picker",width:n,height:n,viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},r),H.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),H.createElement("path",{d:"M11 7l6 6"}),H.createElement("path",{d:"M4 16l11.7 -11.7a1 1 0 0 1 1.4 0l2.6 2.6a1 1 0 0 1 0 1.4l-11.7 11.7h-4v-4z"}))}var PCe=Object.defineProperty,CCe=Object.defineProperties,TCe=Object.getOwnPropertyDescriptors,Lw=Object.getOwnPropertySymbols,CY=Object.prototype.hasOwnProperty,TY=Object.prototype.propertyIsEnumerable,UU=(t,e,n)=>e in t?PCe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,IP=(t,e)=>{for(var n in e||(e={}))CY.call(e,n)&&UU(t,n,e[n]);if(Lw)for(var n of Lw(e))TY.call(e,n)&&UU(t,n,e[n]);return t},BU=(t,e)=>CCe(t,TCe(e)),OCe=(t,e)=>{var n={};for(var r in t)CY.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Lw)for(var r of Lw(t))e.indexOf(r)<0&&TY.call(t,r)&&(n[r]=t[r]);return n};const RCe={xs:X(16),sm:X(18),md:X(22),lg:X(28),xl:X(36)},ACe={xs:X(14),sm:X(16),md:X(18),lg:X(20),xl:X(22)},DCe={size:"sm",format:"hex",fixOnBlur:!0,withPreview:!0,swatchesPerRow:10,withPicker:!0,transitionProps:{transition:"fade",duration:0},dropdownZIndex:Ys("popover"),withinPortal:!0,shadow:"md",withEyeDropper:!0},bT=M.forwardRef((t,e)=>{const n=hb("ColorInput",DCe,t),{wrapperProps:r,inputProps:i,format:o,onChange:s,onChangeEnd:a,onFocus:l,onBlur:c,onClick:u,value:d,defaultValue:f,disallowInput:h,fixOnBlur:g,withPreview:y,swatchesPerRow:_,withPicker:v,icon:x,transitionProps:w,dropdownZIndex:S,withinPortal:E,portalProps:C,swatches:O,shadow:R,classNames:T,styles:A,unstyled:F,readOnly:N,withEyeDropper:U,eyeDropperIcon:k,rightSection:z,closeOnColorSwatchClick:G,disabled:W,eyeDropperLabel:B}=n,j=OCe(n,["wrapperProps","inputProps","format","onChange","onChangeEnd","onFocus","onBlur","onClick","value","defaultValue","disallowInput","fixOnBlur","withPreview","swatchesPerRow","withPicker","icon","transitionProps","dropdownZIndex","withinPortal","portalProps","swatches","shadow","classNames","styles","unstyled","readOnly","withEyeDropper","eyeDropperIcon","rightSection","closeOnColorSwatchClick","disabled","eyeDropperLabel"]),$=Ir(),[q,K]=M.useState(!1),[re,J]=M.useState(""),[le,ae]=Ar({value:d,defaultValue:f,finalValue:"",onChange:s}),{supported:oe,open:De}=eye(),Te=H.createElement(An,{sx:{color:$.colorScheme==="dark"?$.colors.dark[0]:$.black},size:i.size,"aria-label":B,onClick:()=>De().then(({sRGBHex:se})=>{const de=Ps(o,Iu(se));ae(de),a?.(de)}).catch(yG)},k||H.createElement(ECe,{size:Oe({size:i.size,sizes:ACe})})),ve=se=>{l?.(se),K(!0)},we=se=>{g&&ae(re),c?.(se),K(!1)},me=se=>{u?.(se),K(!0)};return M.useEffect(()=>{(Jp(le)||le.trim()==="")&&J(le)},[le]),Qr(()=>{Jp(le)&&ae(Ps(o,Iu(le)))},[o]),H.createElement(Ki.Wrapper,BU(IP({},r),{__staticSelector:"ColorInput"}),H.createElement(qi,{__staticSelector:"ColorInput",position:"bottom-start",offset:5,zIndex:S,withinPortal:E,portalProps:C,transitionProps:w,opened:q,shadow:R,classNames:T,styles:A,unstyled:F,disabled:N||v===!1&&(!Array.isArray(O)||O.length===0)},H.createElement(qi.Target,null,H.createElement("div",null,H.createElement(Ki,BU(IP(IP({autoComplete:"off"},j),i),{disabled:W,ref:e,__staticSelector:"ColorInput",onFocus:ve,onBlur:we,onClick:me,spellCheck:!1,value:le,onChange:se=>{const de=se.currentTarget.value;ae(de),Jp(de)&&a?.(Ps(o,Iu(de)))},icon:x||(y?H.createElement(EA,{color:Jp(le)?le:"#fff",size:Oe({size:i.size,sizes:RCe})}):null),readOnly:h||N,sx:{cursor:h?"pointer":void 0},unstyled:F,classNames:T,styles:A,rightSection:z||(U&&!W&&!N&&oe?Te:null)})))),H.createElement(qi.Dropdown,{onMouseDown:se=>se.preventDefault(),p:i.size},H.createElement(MY,{__staticSelector:"ColorInput",value:le,onChange:ae,onChangeEnd:a,format:o,swatches:O,swatchesPerRow:_,withPicker:v,size:i.size,focusable:!1,unstyled:F,styles:A,classNames:T,onColorSwatchClick:()=>G&&K(!1)}))))});bT.displayName="@mantine/core/ColorInput";var ICe=ft((t,{fluid:e,sizes:n},{size:r})=>({root:{paddingLeft:t.spacing.md,paddingRight:t.spacing.md,maxWidth:e?"100%":Oe({size:r,sizes:n}),marginLeft:"auto",marginRight:"auto"}}));const LCe=ICe;var kCe=Object.defineProperty,kw=Object.getOwnPropertySymbols,OY=Object.prototype.hasOwnProperty,RY=Object.prototype.propertyIsEnumerable,HU=(t,e,n)=>e in t?kCe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,NCe=(t,e)=>{for(var n in e||(e={}))OY.call(e,n)&&HU(t,n,e[n]);if(kw)for(var n of kw(e))RY.call(e,n)&&HU(t,n,e[n]);return t},FCe=(t,e)=>{var n={};for(var r in t)OY.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&kw)for(var r of kw(t))e.indexOf(r)<0&&RY.call(t,r)&&(n[r]=t[r]);return n};const zCe={sizes:{xs:X(540),sm:X(720),md:X(960),lg:X(1140),xl:X(1320)}},AY=M.forwardRef((t,e)=>{const n=nt("Container",zCe,t),{className:r,fluid:i,size:o,unstyled:s,sizes:a,variant:l}=n,c=FCe(n,["className","fluid","size","unstyled","sizes","variant"]),{classes:u,cx:d}=LCe({fluid:i,sizes:a},{unstyled:s,name:"Container",variant:l,size:o});return H.createElement(Xe,NCe({className:d(u.root,r),ref:e},c))});AY.displayName="@mantine/core/Container";var UCe=Object.defineProperty,Nw=Object.getOwnPropertySymbols,DY=Object.prototype.hasOwnProperty,IY=Object.prototype.propertyIsEnumerable,VU=(t,e,n)=>e in t?UCe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,BCe=(t,e)=>{for(var n in e||(e={}))DY.call(e,n)&&VU(t,n,e[n]);if(Nw)for(var n of Nw(e))IY.call(e,n)&&VU(t,n,e[n]);return t},HCe=(t,e)=>{var n={};for(var r in t)DY.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Nw)for(var r of Nw(t))e.indexOf(r)<0&&IY.call(t,r)&&(n[r]=t[r]);return n};const VCe={timeout:1e3};function LY(t){const e=nt("CopyButton",VCe,t),{children:n,timeout:r,value:i}=e,o=HCe(e,["children","timeout","value"]),s=F0e({timeout:r}),a=()=>s.copy(i);return H.createElement(H.Fragment,null,n(BCe({copy:a,copied:s.copied},o)))}LY.displayName="@mantine/core/CopyButton";const[jCe,Oh]=cd("ModalBase component was not found in tree");var $Ce=ft(()=>({close:{marginLeft:"auto",marginRight:0}}));const GCe=$Ce;var WCe=Object.defineProperty,Fw=Object.getOwnPropertySymbols,kY=Object.prototype.hasOwnProperty,NY=Object.prototype.propertyIsEnumerable,jU=(t,e,n)=>e in t?WCe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,YCe=(t,e)=>{for(var n in e||(e={}))kY.call(e,n)&&jU(t,n,e[n]);if(Fw)for(var n of Fw(e))NY.call(e,n)&&jU(t,n,e[n]);return t},XCe=(t,e)=>{var n={};for(var r in t)kY.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Fw)for(var r of Fw(t))e.indexOf(r)<0&&NY.call(t,r)&&(n[r]=t[r]);return n};const ZCe={size:"sm"},qCe=M.forwardRef((t,e)=>{const n=Oh(),r=nt(`${n.__staticSelector}CloseButton`,ZCe,t),{className:i}=r,o=XCe(r,["className"]),{classes:s,cx:a}=GCe(null,n.stylesApi);return H.createElement(Qg,YCe({className:a(s.close,i),ref:e,onClick:n.onClose},o))});var KCe=ft(()=>({overlay:{}}));const QCe=KCe;var JCe=Object.defineProperty,e2e=Object.defineProperties,t2e=Object.getOwnPropertyDescriptors,$U=Object.getOwnPropertySymbols,n2e=Object.prototype.hasOwnProperty,r2e=Object.prototype.propertyIsEnumerable,GU=(t,e,n)=>e in t?JCe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,i2e=(t,e)=>{for(var n in e||(e={}))n2e.call(e,n)&&GU(t,n,e[n]);if($U)for(var n of $U(e))r2e.call(e,n)&&GU(t,n,e[n]);return t},o2e=(t,e)=>e2e(t,t2e(e)),s2e=ft((t,{color:e,opacity:n,blur:r,radius:i,gradient:o,fixed:s,zIndex:a})=>({root:o2e(i2e({},t.fn.cover(0)),{position:s?"fixed":"absolute",backgroundColor:o?void 0:t.fn.rgba(e,n),backgroundImage:o,backdropFilter:r?`blur(${X(r)})`:void 0,borderRadius:t.fn.radius(i),zIndex:a,"&[data-center]":{display:"flex",alignItems:"center",justifyContent:"center"}})}));const a2e=s2e;var l2e=Object.defineProperty,zw=Object.getOwnPropertySymbols,FY=Object.prototype.hasOwnProperty,zY=Object.prototype.propertyIsEnumerable,WU=(t,e,n)=>e in t?l2e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,c2e=(t,e)=>{for(var n in e||(e={}))FY.call(e,n)&&WU(t,n,e[n]);if(zw)for(var n of zw(e))zY.call(e,n)&&WU(t,n,e[n]);return t},u2e=(t,e)=>{var n={};for(var r in t)FY.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&zw)for(var r of zw(t))e.indexOf(r)<0&&zY.call(t,r)&&(n[r]=t[r]);return n};const d2e={opacity:.6,color:"#000",zIndex:Ys("modal"),radius:0},UY=M.forwardRef((t,e)=>{const n=nt("Overlay",d2e,t),{variant:r,opacity:i,color:o,blur:s,gradient:a,zIndex:l,radius:c,children:u,className:d,classNames:f,styles:h,unstyled:g,center:y,fixed:_}=n,v=u2e(n,["variant","opacity","color","blur","gradient","zIndex","radius","children","className","classNames","styles","unstyled","center","fixed"]),{classes:x,cx:w}=a2e({color:o,opacity:i,blur:s,radius:c,gradient:a,fixed:_,zIndex:l},{name:"Overlay",classNames:f,styles:h,unstyled:g,variant:r});return H.createElement(Xe,c2e({ref:e,className:w(x.root,d),"data-center":y||void 0},v),u)});UY.displayName="@mantine/core/Overlay";const f2e=UY;var h2e=Object.defineProperty,p2e=Object.defineProperties,m2e=Object.getOwnPropertyDescriptors,Uw=Object.getOwnPropertySymbols,BY=Object.prototype.hasOwnProperty,HY=Object.prototype.propertyIsEnumerable,YU=(t,e,n)=>e in t?h2e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Bp=(t,e)=>{for(var n in e||(e={}))BY.call(e,n)&&YU(t,n,e[n]);if(Uw)for(var n of Uw(e))HY.call(e,n)&&YU(t,n,e[n]);return t},g2e=(t,e)=>p2e(t,m2e(e)),v2e=(t,e)=>{var n={};for(var r in t)BY.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Uw)for(var r of Uw(t))e.indexOf(r)<0&&HY.call(t,r)&&(n[r]=t[r]);return n};const y2e={},_2e=M.forwardRef((t,e)=>{const n=Oh(),r=nt(`${n.__staticSelector}Overlay`,y2e,t),{onClick:i,transitionProps:o,style:s,className:a}=r,l=v2e(r,["onClick","transitionProps","style","className"]),{classes:c,cx:u}=QCe(null,n.stylesApi),d=f=>{i?.(f),n.closeOnClickOutside&&n.onClose()};return H.createElement(zc,g2e(Bp(Bp({mounted:n.opened},n.transitionProps),o),{transition:"fade"}),f=>H.createElement(f2e,Bp({ref:e,onClick:d,fixed:!0,style:Bp(Bp({},s),f),className:u(c.overlay,a),zIndex:n.zIndex},l)))});var x2e=ft((t,{zIndex:e})=>({inner:{position:"fixed",width:"100%",top:0,bottom:0,maxHeight:"100%",zIndex:e,pointerEvents:"none"},content:{pointerEvents:"all"}}));const w2e=x2e;var S2e=Object.defineProperty,Bw=Object.getOwnPropertySymbols,VY=Object.prototype.hasOwnProperty,jY=Object.prototype.propertyIsEnumerable,XU=(t,e,n)=>e in t?S2e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Hp=(t,e)=>{for(var n in e||(e={}))VY.call(e,n)&&XU(t,n,e[n]);if(Bw)for(var n of Bw(e))jY.call(e,n)&&XU(t,n,e[n]);return t},b2e=(t,e)=>{var n={};for(var r in t)VY.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Bw)for(var r of Bw(t))e.indexOf(r)<0&&jY.call(t,r)&&(n[r]=t[r]);return n};const M2e={},E2e=M.forwardRef((t,e)=>{const n=Oh(),r=nt(`${n.__staticSelector}Content`,M2e,t),{className:i,transitionProps:o,style:s,onKeyDown:a}=r,l=b2e(r,["className","transitionProps","style","onKeyDown"]),{classes:c,cx:u}=w2e({zIndex:n.zIndex+1},n.stylesApi),d=f=>{var h;((h=f.target)==null?void 0:h.getAttribute("data-mantine-stop-propagation"))!=="true"&&f.key==="Escape"&&n.closeOnEscape&&n.onClose(),a?.(f)};return H.createElement(zc,Hp(Hp({mounted:n.opened,transition:"pop"},n.transitionProps),o),f=>H.createElement("div",{className:u(c.inner)},H.createElement(_A,{active:n.opened&&n.trapFocus},H.createElement(tv,Hp({component:"section",role:"dialog",tabIndex:-1,"aria-modal":!0,"aria-describedby":n.bodyMounted?n.getBodyId():void 0,"aria-labelledby":n.titleMounted?n.getTitleId():void 0,onKeyDown:d,ref:e,className:u(c.content,i),style:Hp(Hp({},s),f),shadow:n.shadow},l),l.children))))});var P2e=ft((t,{padding:e})=>{const n=Oe({size:e,sizes:t.spacing});return{header:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:n,paddingRight:`calc(${n} - ${X(5)})`,position:"sticky",top:0,backgroundColor:t.colorScheme==="dark"?t.colors.dark[7]:t.white,zIndex:1e3}}});const C2e=P2e;var T2e=Object.defineProperty,Hw=Object.getOwnPropertySymbols,$Y=Object.prototype.hasOwnProperty,GY=Object.prototype.propertyIsEnumerable,ZU=(t,e,n)=>e in t?T2e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,O2e=(t,e)=>{for(var n in e||(e={}))$Y.call(e,n)&&ZU(t,n,e[n]);if(Hw)for(var n of Hw(e))GY.call(e,n)&&ZU(t,n,e[n]);return t},R2e=(t,e)=>{var n={};for(var r in t)$Y.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Hw)for(var r of Hw(t))e.indexOf(r)<0&&GY.call(t,r)&&(n[r]=t[r]);return n};const A2e={},D2e=M.forwardRef((t,e)=>{const n=Oh(),r=nt(`${n.__staticSelector}Header`,A2e,t),{className:i}=r,o=R2e(r,["className"]),{classes:s,cx:a}=C2e({padding:n.padding},n.stylesApi);return H.createElement(Xe,O2e({ref:e,className:a(s.header,i)},o))});var I2e=ft(t=>({title:{lineHeight:1,padding:0,margin:0,fontWeight:400,fontSize:t.fontSizes.md}}));const L2e=I2e;var k2e=Object.defineProperty,Vw=Object.getOwnPropertySymbols,WY=Object.prototype.hasOwnProperty,YY=Object.prototype.propertyIsEnumerable,qU=(t,e,n)=>e in t?k2e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,N2e=(t,e)=>{for(var n in e||(e={}))WY.call(e,n)&&qU(t,n,e[n]);if(Vw)for(var n of Vw(e))YY.call(e,n)&&qU(t,n,e[n]);return t},F2e=(t,e)=>{var n={};for(var r in t)WY.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Vw)for(var r of Vw(t))e.indexOf(r)<0&&YY.call(t,r)&&(n[r]=t[r]);return n};const z2e={},U2e=M.forwardRef((t,e)=>{const n=Oh(),r=nt(`${n.__staticSelector}Title`,z2e,t),{className:i}=r,o=F2e(r,["className"]),{classes:s,cx:a}=L2e(null,n.stylesApi);return M.useEffect(()=>(n.setTitleMounted(!0),()=>n.setTitleMounted(!1)),[]),H.createElement(Xe,N2e({component:"h2",id:n.getTitleId(),className:a(s.title,i),ref:e},o))});var B2e=ft((t,{padding:e})=>({body:{padding:Oe({size:e,sizes:t.spacing}),"&:not(:only-child)":{paddingTop:0}}}));const H2e=B2e;var V2e=Object.defineProperty,jw=Object.getOwnPropertySymbols,XY=Object.prototype.hasOwnProperty,ZY=Object.prototype.propertyIsEnumerable,KU=(t,e,n)=>e in t?V2e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,j2e=(t,e)=>{for(var n in e||(e={}))XY.call(e,n)&&KU(t,n,e[n]);if(jw)for(var n of jw(e))ZY.call(e,n)&&KU(t,n,e[n]);return t},$2e=(t,e)=>{var n={};for(var r in t)XY.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&jw)for(var r of jw(t))e.indexOf(r)<0&&ZY.call(t,r)&&(n[r]=t[r]);return n};const G2e={},W2e=M.forwardRef((t,e)=>{const n=Oh(),r=nt(`${n.__staticSelector}Body`,G2e,t),{className:i}=r,o=$2e(r,["className"]),{classes:s,cx:a}=H2e({padding:n.padding},n.stylesApi);return M.useEffect(()=>(n.setBodyMounted(!0),()=>n.setBodyMounted(!1)),[]),H.createElement(Xe,j2e({id:n.getBodyId(),className:a(s.body,i),ref:e},o))});function Y2e({children:t}){return H.createElement(H.Fragment,null,t)}function X2e({opened:t,transitionDuration:e}){const[n,r]=M.useState(t),i=M.useRef(),s=ob()?0:e;return M.useEffect(()=>(t?(r(!0),window.clearTimeout(i.current)):s===0?r(!1):i.current=window.setTimeout(()=>r(!1),s),()=>window.clearTimeout(i.current)),[t,s]),n}var Z2e=ft(()=>({root:{}}));const q2e=Z2e;var K2e=Object.defineProperty,Q2e=Object.defineProperties,J2e=Object.getOwnPropertyDescriptors,$w=Object.getOwnPropertySymbols,qY=Object.prototype.hasOwnProperty,KY=Object.prototype.propertyIsEnumerable,QU=(t,e,n)=>e in t?K2e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,LP=(t,e)=>{for(var n in e||(e={}))qY.call(e,n)&&QU(t,n,e[n]);if($w)for(var n of $w(e))KY.call(e,n)&&QU(t,n,e[n]);return t},JU=(t,e)=>Q2e(t,J2e(e)),eTe=(t,e)=>{var n={};for(var r in t)qY.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&$w)for(var r of $w(t))e.indexOf(r)<0&&KY.call(t,r)&&(n[r]=t[r]);return n};const TA={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:Ys("modal"),padding:"md",size:"md",shadow:"xl"};function Rr(t){const e=nt("ModalBase",TA,t),{opened:n,onClose:r,children:i,closeOnClickOutside:o,__staticSelector:s,transitionProps:a,withinPortal:l,portalProps:c,keepMounted:u,target:d,zIndex:f,lockScroll:h,trapFocus:g,closeOnEscape:y,returnFocus:_,padding:v,shadow:x,id:w,size:S,variant:E,classNames:C,unstyled:O,styles:R,className:T}=e,A=eTe(e,["opened","onClose","children","closeOnClickOutside","__staticSelector","transitionProps","withinPortal","portalProps","keepMounted","target","zIndex","lockScroll","trapFocus","closeOnEscape","returnFocus","padding","shadow","id","size","variant","classNames","unstyled","styles","className"]),{classes:F,cx:N}=q2e(null,{name:s,classNames:C,styles:R,unstyled:O,variant:E,size:S}),U=zo(w),[k,z]=M.useState(!1),[G,W]=M.useState(!1),B=typeof a?.duration=="number"?a?.duration:200,j=X2e({opened:n,transitionDuration:B});return uT("keydown",$=>{!g&&$.key==="Escape"&&y&&r()}),QG({opened:n,shouldReturnFocus:g&&_}),H.createElement(Kg,JU(LP({},c),{withinPortal:l,target:d}),H.createElement(jCe,{value:{__staticSelector:s,opened:n,onClose:r,closeOnClickOutside:o,transitionProps:JU(LP({},a),{duration:B,keepMounted:u}),zIndex:f,padding:v,id:U,getTitleId:()=>`${U}-title`,getBodyId:()=>`${U}-body`,titleMounted:k,bodyMounted:G,setTitleMounted:z,setBodyMounted:W,trapFocus:g,closeOnEscape:y,shadow:x,stylesApi:{name:s,size:S,variant:E,classNames:C,styles:R,unstyled:O}}},H.createElement(vge,{enabled:j&&h},H.createElement(Xe,LP({className:N(F.root,T)},A),i))))}Rr.CloseButton=qCe;Rr.Overlay=_2e;Rr.Content=E2e;Rr.Header=D2e;Rr.Title=U2e;Rr.Body=W2e;Rr.NativeScrollArea=Y2e;const tTe={gap:{type:"spacing",property:"gap"},rowGap:{type:"spacing",property:"rowGap"},columnGap:{type:"spacing",property:"columnGap"},align:{type:"identity",property:"alignItems"},justify:{type:"identity",property:"justifyContent"},wrap:{type:"identity",property:"flexWrap"},direction:{type:"identity",property:"flexDirection"}};var nTe=Object.defineProperty,rTe=Object.defineProperties,iTe=Object.getOwnPropertyDescriptors,Gw=Object.getOwnPropertySymbols,QY=Object.prototype.hasOwnProperty,JY=Object.prototype.propertyIsEnumerable,e5=(t,e,n)=>e in t?nTe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,oTe=(t,e)=>{for(var n in e||(e={}))QY.call(e,n)&&e5(t,n,e[n]);if(Gw)for(var n of Gw(e))JY.call(e,n)&&e5(t,n,e[n]);return t},sTe=(t,e)=>rTe(t,iTe(e)),aTe=(t,e)=>{var n={};for(var r in t)QY.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Gw)for(var r of Gw(t))e.indexOf(r)<0&&JY.call(t,r)&&(n[r]=t[r]);return n};const lTe={},er=M.forwardRef((t,e)=>{const n=nt("Flex",lTe,t),{gap:r,rowGap:i,columnGap:o,align:s,justify:a,wrap:l,direction:c,sx:u}=n,d=aTe(n,["gap","rowGap","columnGap","align","justify","wrap","direction","sx"]);return H.createElement(Xe,sTe(oTe({},d),{sx:[{display:"flex"},f=>dT({gap:r,rowGap:i,columnGap:o,align:s,justify:a,wrap:l,direction:c},f,tTe),...Ph(u)],ref:e}))});er.displayName="@mantine/core/Flex";function cTe(t){return M.Children.toArray(t).filter(Boolean)}const eX={left:"flex-start",center:"center",right:"flex-end",apart:"space-between"};var uTe=ft((t,{spacing:e,position:n,noWrap:r,grow:i,align:o,count:s})=>({root:{boxSizing:"border-box",display:"flex",flexDirection:"row",alignItems:o||"center",flexWrap:r?"nowrap":"wrap",justifyContent:eX[n],gap:Oe({size:e,sizes:t.spacing}),"& > *":{boxSizing:"border-box",maxWidth:i?`calc(${100/s}% - (${X(Oe({size:e,sizes:t.spacing}))} - ${Oe({size:e,sizes:t.spacing})} / ${s}))`:void 0,flexGrow:i?1:0}}}));const dTe=uTe;var fTe=Object.defineProperty,Ww=Object.getOwnPropertySymbols,tX=Object.prototype.hasOwnProperty,nX=Object.prototype.propertyIsEnumerable,t5=(t,e,n)=>e in t?fTe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,hTe=(t,e)=>{for(var n in e||(e={}))tX.call(e,n)&&t5(t,n,e[n]);if(Ww)for(var n of Ww(e))nX.call(e,n)&&t5(t,n,e[n]);return t},pTe=(t,e)=>{var n={};for(var r in t)tX.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Ww)for(var r of Ww(t))e.indexOf(r)<0&&nX.call(t,r)&&(n[r]=t[r]);return n};const mTe={position:"left",spacing:"md"},MT=M.forwardRef((t,e)=>{const n=nt("Group",mTe,t),{className:r,position:i,align:o,children:s,noWrap:a,grow:l,spacing:c,unstyled:u,variant:d}=n,f=pTe(n,["className","position","align","children","noWrap","grow","spacing","unstyled","variant"]),h=cTe(s),{classes:g,cx:y}=dTe({align:o,grow:l,noWrap:a,spacing:c,position:i,count:h.length},{unstyled:u,name:"Group",variant:d});return H.createElement(Xe,hTe({className:y(g.root,r),ref:e},f),h)});MT.displayName="@mantine/core/Group";function gTe({open:t,close:e,openDelay:n,closeDelay:r}){const i=M.useRef(-1),o=M.useRef(-1),s=()=>{window.clearTimeout(i.current),window.clearTimeout(o.current)},a=()=>{s(),n===0?t():i.current=window.setTimeout(t,n)},l=()=>{s(),r===0?e():o.current=window.setTimeout(e,r)};return M.useEffect(()=>s,[]),{openDropdown:a,closeDropdown:l}}var vTe=Object.defineProperty,yTe=Object.defineProperties,_Te=Object.getOwnPropertyDescriptors,n5=Object.getOwnPropertySymbols,xTe=Object.prototype.hasOwnProperty,wTe=Object.prototype.propertyIsEnumerable,r5=(t,e,n)=>e in t?vTe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,i5=(t,e)=>{for(var n in e||(e={}))xTe.call(e,n)&&r5(t,n,e[n]);if(n5)for(var n of n5(e))wTe.call(e,n)&&r5(t,n,e[n]);return t},o5=(t,e)=>yTe(t,_Te(e));const STe=t=>nA({from:{boxShadow:`0 0 ${X(.5)} 0 ${t}`,opacity:.6},to:{boxShadow:`0 0 ${X(.5)} ${X(4.4)} ${t}`,opacity:0}});function s5(t,e=0){const n={},[r,i]=t.split("-");let o="",s="";return r==="top"&&(n.top=e,s="-50%"),r==="middle"&&(n.top="50%",s="-50%"),r==="bottom"&&(n.bottom=e,s="50%"),i==="start"&&(n.left=e,o="-50%"),i==="center"&&(n.left="50%",o="-50%"),i==="end"&&(n.right=e,o="50%"),n.transform=`translate(${o}, ${s})`,n}var bTe=ft((t,{radius:e,color:n,position:r,offset:i,inline:o,withBorder:s,withLabel:a,zIndex:l},{size:c})=>{const{background:u}=t.fn.variant({variant:"filled",primaryFallback:!1,color:n||t.primaryColor}),d=X(c);return{root:{position:"relative",display:o?"inline-block":"block"},indicator:o5(i5({},s5(r,i)),{zIndex:l,position:"absolute",[a?"minWidth":"width"]:d,height:d,display:"flex",justifyContent:"center",alignItems:"center",fontSize:t.fontSizes.xs,paddingLeft:a?`calc(${t.spacing.xs} / 2)`:0,paddingRight:a?`calc(${t.spacing.xs} / 2)`:0,borderRadius:t.fn.radius(e),backgroundColor:t.fn.variant({variant:"filled",primaryFallback:!1,color:n||t.primaryColor}).background,border:s?`${X(2)} solid ${t.colorScheme==="dark"?t.colors.dark[7]:t.white}`:void 0,color:t.white,whiteSpace:"nowrap"}),processing:{animation:`${STe(u)} 1000ms linear infinite`},common:o5(i5({},s5(r,i)),{position:"absolute",[a?"minWidth":"width"]:d,height:d,borderRadius:t.fn.radius(e)})}});const MTe=bTe;var ETe=Object.defineProperty,Yw=Object.getOwnPropertySymbols,rX=Object.prototype.hasOwnProperty,iX=Object.prototype.propertyIsEnumerable,a5=(t,e,n)=>e in t?ETe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,PTe=(t,e)=>{for(var n in e||(e={}))rX.call(e,n)&&a5(t,n,e[n]);if(Yw)for(var n of Yw(e))iX.call(e,n)&&a5(t,n,e[n]);return t},CTe=(t,e)=>{var n={};for(var r in t)rX.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Yw)for(var r of Yw(t))e.indexOf(r)<0&&iX.call(t,r)&&(n[r]=t[r]);return n};const TTe={position:"top-end",offset:0,inline:!1,withBorder:!1,disabled:!1,processing:!1,size:10,radius:1e3,zIndex:Ys("app")},oX=M.forwardRef((t,e)=>{const n=nt("Indicator",TTe,t),{children:r,position:i,offset:o,size:s,radius:a,inline:l,withBorder:c,className:u,color:d,styles:f,label:h,classNames:g,disabled:y,zIndex:_,unstyled:v,processing:x,variant:w}=n,S=CTe(n,["children","position","offset","size","radius","inline","withBorder","className","color","styles","label","classNames","disabled","zIndex","unstyled","processing","variant"]),{classes:E,cx:C}=MTe({position:i,offset:o,radius:a,inline:l,color:d,withBorder:c,zIndex:_,withLabel:!!h},{name:"Indicator",classNames:g,styles:f,unstyled:v,variant:w,size:s});return H.createElement(Xe,PTe({ref:e,className:C(E.root,u)},S),!y&&H.createElement(H.Fragment,null,H.createElement("div",{className:C(E.indicator,E.common)},h),x&&H.createElement("div",{className:C(E.processing,E.common)})),r)});oX.displayName="@mantine/core/Indicator";var OTe=ft((t,{smallerThan:e,largerThan:n,query:r,styles:i})=>{const o={},s=Oe({size:n,sizes:t.breakpoints}),a=Oe({size:e,sizes:t.breakpoints}),l=typeof i=="function"?i(t):i;return n!==void 0&&e!==void 0?o[`@media (min-width: ${ls(s)}) and (max-width: ${ls(js(a)-1)})`]=l:(n!==void 0&&(o[`@media (min-width: ${Oe({size:n,sizes:t.breakpoints})})`]=l),e!==void 0&&(o[`@media (max-width: ${ls(js(Oe({size:e,sizes:t.breakpoints}))-1)})`]=l)),r&&(o[`@media ${r}`]=l),{media:o}});const RTe=OTe;function sX(t){var e;const{children:n,smallerThan:r,largerThan:i,query:o,styles:s,className:a}=nt("MediaQuery",{},t),{classes:l,cx:c}=RTe({smallerThan:r,largerThan:i,query:o,styles:s},{name:"MediaQuery"}),u=M.Children.only(n);return typeof u=="object"&&u!==null&&"props"in u?H.cloneElement(u,{className:c(l.media,(e=u.props)==null?void 0:e.className,a)}):u}sX.displayName="@mantine/core/MediaQuery";const aX={context:"Menu component was not found in the tree",children:"Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported"},[ATe,rv]=cd(aX.context);var DTe=ft(t=>({divider:{marginTop:X(4),marginBottom:X(4),borderTop:`${X(1)} solid ${t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[2]}`}}));const ITe=DTe;var LTe=Object.defineProperty,Xw=Object.getOwnPropertySymbols,lX=Object.prototype.hasOwnProperty,cX=Object.prototype.propertyIsEnumerable,l5=(t,e,n)=>e in t?LTe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,kTe=(t,e)=>{for(var n in e||(e={}))lX.call(e,n)&&l5(t,n,e[n]);if(Xw)for(var n of Xw(e))cX.call(e,n)&&l5(t,n,e[n]);return t},NTe=(t,e)=>{var n={};for(var r in t)lX.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Xw)for(var r of Xw(t))e.indexOf(r)<0&&cX.call(t,r)&&(n[r]=t[r]);return n};const FTe={},uX=M.forwardRef((t,e)=>{const n=nt("MenuDivider",FTe,t),{children:r,className:i}=n,o=NTe(n,["children","className"]),{classNames:s,styles:a,unstyled:l,variant:c}=rv(),{classes:u,cx:d}=ITe(null,{name:"Menu",classNames:s,styles:a,unstyled:l,variant:c});return H.createElement(Xe,kTe({className:d(u.divider,i),ref:e},o))});uX.displayName="@mantine/core/MenuDivider";var zTe=Object.defineProperty,Zw=Object.getOwnPropertySymbols,dX=Object.prototype.hasOwnProperty,fX=Object.prototype.propertyIsEnumerable,c5=(t,e,n)=>e in t?zTe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,UTe=(t,e)=>{for(var n in e||(e={}))dX.call(e,n)&&c5(t,n,e[n]);if(Zw)for(var n of Zw(e))fX.call(e,n)&&c5(t,n,e[n]);return t},BTe=(t,e)=>{var n={};for(var r in t)dX.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Zw)for(var r of Zw(t))e.indexOf(r)<0&&fX.call(t,r)&&(n[r]=t[r]);return n};const HTe={};function hX(t){const e=nt("MenuDropdown",HTe,t),{children:n,onMouseEnter:r,onMouseLeave:i}=e,o=BTe(e,["children","onMouseEnter","onMouseLeave"]),s=M.useRef(),a=rv(),l=d=>{(d.key==="ArrowUp"||d.key==="ArrowDown")&&(d.preventDefault(),s.current.querySelectorAll("[data-menu-item]")[0].focus())},c=rl(r,()=>a.trigger==="hover"&&a.openDropdown()),u=rl(i,()=>a.trigger==="hover"&&a.closeDropdown());return H.createElement(qi.Dropdown,UTe({onMouseEnter:c,onMouseLeave:u,role:"menu","aria-orientation":"vertical"},o),H.createElement("div",{tabIndex:-1,"data-menu-dropdown":!0,"data-autofocus":!0,onKeyDown:l,ref:s,style:{outline:0}},n))}hX.displayName="@mantine/core/MenuDropdown";var VTe=Object.defineProperty,jTe=Object.defineProperties,$Te=Object.getOwnPropertyDescriptors,u5=Object.getOwnPropertySymbols,GTe=Object.prototype.hasOwnProperty,WTe=Object.prototype.propertyIsEnumerable,d5=(t,e,n)=>e in t?VTe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,YTe=(t,e)=>{for(var n in e||(e={}))GTe.call(e,n)&&d5(t,n,e[n]);if(u5)for(var n of u5(e))WTe.call(e,n)&&d5(t,n,e[n]);return t},XTe=(t,e)=>jTe(t,$Te(e)),ZTe=ft((t,{color:e,radius:n})=>({item:XTe(YTe({},t.fn.fontStyles()),{WebkitTapHighlightColor:"transparent",fontSize:t.fontSizes.sm,border:0,backgroundColor:"transparent",outline:0,width:"100%",textAlign:"left",textDecoration:"none",boxSizing:"border-box",padding:`${t.spacing.xs} ${t.spacing.sm}`,cursor:"pointer",borderRadius:t.fn.radius(n),color:e?t.fn.variant({variant:"filled",primaryFallback:!1,color:e}).background:t.colorScheme==="dark"?t.colors.dark[0]:t.black,display:"flex",alignItems:"center","&:disabled":{color:t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[5],pointerEvents:"none",userSelect:"none"},"&[data-hovered]":{backgroundColor:e?t.fn.variant({variant:"light",color:e}).background:t.colorScheme==="dark"?t.fn.rgba(t.colors.dark[3],.35):t.colors.gray[1]}}),itemLabel:{flex:1},itemIcon:{display:"flex",justifyContent:"center",alignItems:"center",marginRight:t.spacing.xs},itemRightSection:{}}));const qTe=ZTe;var KTe=Object.defineProperty,QTe=Object.defineProperties,JTe=Object.getOwnPropertyDescriptors,qw=Object.getOwnPropertySymbols,pX=Object.prototype.hasOwnProperty,mX=Object.prototype.propertyIsEnumerable,f5=(t,e,n)=>e in t?KTe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,eOe=(t,e)=>{for(var n in e||(e={}))pX.call(e,n)&&f5(t,n,e[n]);if(qw)for(var n of qw(e))mX.call(e,n)&&f5(t,n,e[n]);return t},tOe=(t,e)=>QTe(t,JTe(e)),nOe=(t,e)=>{var n={};for(var r in t)pX.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&qw)for(var r of qw(t))e.indexOf(r)<0&&mX.call(t,r)&&(n[r]=t[r]);return n};const rOe={},gX=M.forwardRef((t,e)=>{const n=nt("MenuItem",rOe,t),{children:r,className:i,color:o,closeMenuOnClick:s,icon:a,rightSection:l}=n,c=nOe(n,["children","className","color","closeMenuOnClick","icon","rightSection"]),u=rv(),{classes:d,cx:f,theme:h}=qTe({radius:u.radius,color:o},{name:"Menu",classNames:u.classNames,styles:u.styles,unstyled:u.unstyled,variant:u.variant}),g=M.useRef(),y=u.getItemIndex(g.current),_=c,v=rl(_.onMouseLeave,()=>u.setHovered(-1)),x=rl(_.onMouseEnter,()=>u.setHovered(u.getItemIndex(g.current))),w=rl(_.onClick,()=>{typeof s=="boolean"?s&&u.closeDropdownImmediately():u.closeOnItemClick&&u.closeDropdownImmediately()}),S=rl(_.onFocus,()=>u.setHovered(u.getItemIndex(g.current)));return H.createElement(Xe,tOe(eOe({component:"button",type:"button"},c),{tabIndex:-1,onFocus:S,className:f(d.item,i),ref:Da(g,e),role:"menuitem","data-menu-item":!0,"data-hovered":u.hovered===y?!0:void 0,onMouseEnter:x,onMouseLeave:v,onClick:w,onKeyDown:GR({siblingSelector:"[data-menu-item]",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:u.loop,dir:h.dir,orientation:"vertical",onKeyDown:_.onKeydown})}),a&&H.createElement("div",{className:d.itemIcon},a),r&&H.createElement("div",{className:d.itemLabel},r),l&&H.createElement("div",{className:d.itemRightSection},l))});gX.displayName="@mantine/core/MenuItem";const iOe=gX;var oOe=ft(t=>({label:{color:t.colorScheme==="dark"?t.colors.dark[2]:t.colors.gray[6],fontWeight:500,fontSize:t.fontSizes.xs,padding:`calc(${t.spacing.xs} / 2) ${t.spacing.sm}`,cursor:"default"}}));const sOe=oOe;var aOe=Object.defineProperty,Kw=Object.getOwnPropertySymbols,vX=Object.prototype.hasOwnProperty,yX=Object.prototype.propertyIsEnumerable,h5=(t,e,n)=>e in t?aOe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,lOe=(t,e)=>{for(var n in e||(e={}))vX.call(e,n)&&h5(t,n,e[n]);if(Kw)for(var n of Kw(e))yX.call(e,n)&&h5(t,n,e[n]);return t},cOe=(t,e)=>{var n={};for(var r in t)vX.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Kw)for(var r of Kw(t))e.indexOf(r)<0&&yX.call(t,r)&&(n[r]=t[r]);return n};const uOe={},_X=M.forwardRef((t,e)=>{const n=nt("MenuLabel",uOe,t),{children:r,className:i}=n,o=cOe(n,["children","className"]),{classNames:s,styles:a,unstyled:l,variant:c}=rv(),{classes:u,cx:d}=sOe(null,{name:"Menu",classNames:s,styles:a,unstyled:l,variant:c});return H.createElement(Si,lOe({className:d(u.label,i),ref:e},o),r)});_X.displayName="@mantine/core/MenuLabel";var dOe=Object.defineProperty,Qw=Object.getOwnPropertySymbols,xX=Object.prototype.hasOwnProperty,wX=Object.prototype.propertyIsEnumerable,p5=(t,e,n)=>e in t?dOe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,fOe=(t,e)=>{for(var n in e||(e={}))xX.call(e,n)&&p5(t,n,e[n]);if(Qw)for(var n of Qw(e))wX.call(e,n)&&p5(t,n,e[n]);return t},hOe=(t,e)=>{var n={};for(var r in t)xX.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Qw)for(var r of Qw(t))e.indexOf(r)<0&&wX.call(t,r)&&(n[r]=t[r]);return n};const pOe={refProp:"ref"},SX=M.forwardRef((t,e)=>{const n=nt("MenuTarget",pOe,t),{children:r,refProp:i}=n,o=hOe(n,["children","refProp"]);if(!Yg(r))throw new Error(aX.children);const s=rv(),a=rl(r.props.onClick,()=>s.trigger==="click"&&s.toggleDropdown()),l=rl(r.props.onMouseEnter,()=>s.trigger==="hover"&&s.openDropdown()),c=rl(r.props.onMouseLeave,()=>s.trigger==="hover"&&s.closeDropdown());return H.createElement(qi.Target,fOe({refProp:i,popupType:"menu",ref:e},o),M.cloneElement(r,{onClick:a,onMouseEnter:l,onMouseLeave:c,"data-expanded":s.opened?!0:void 0}))});SX.displayName="@mantine/core/MenuTarget";var mOe=ft({dropdown:{padding:X(4)}});const gOe=mOe;var vOe=Object.defineProperty,yOe=Object.defineProperties,_Oe=Object.getOwnPropertyDescriptors,Jw=Object.getOwnPropertySymbols,bX=Object.prototype.hasOwnProperty,MX=Object.prototype.propertyIsEnumerable,m5=(t,e,n)=>e in t?vOe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,g5=(t,e)=>{for(var n in e||(e={}))bX.call(e,n)&&m5(t,n,e[n]);if(Jw)for(var n of Jw(e))MX.call(e,n)&&m5(t,n,e[n]);return t},v5=(t,e)=>yOe(t,_Oe(e)),xOe=(t,e)=>{var n={};for(var r in t)bX.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Jw)for(var r of Jw(t))e.indexOf(r)<0&&MX.call(t,r)&&(n[r]=t[r]);return n};const wOe={closeOnItemClick:!0,loop:!0,trigger:"click",openDelay:0,closeDelay:100};function cn(t){const e=nt("Menu",wOe,t),{children:n,onOpen:r,onClose:i,opened:o,defaultOpened:s,onChange:a,closeOnItemClick:l,loop:c,closeOnEscape:u,trigger:d,openDelay:f,closeDelay:h,classNames:g,styles:y,unstyled:_,radius:v,variant:x}=e,w=xOe(e,["children","onOpen","onClose","opened","defaultOpened","onChange","closeOnItemClick","loop","closeOnEscape","trigger","openDelay","closeDelay","classNames","styles","unstyled","radius","variant"]),{classes:S,cx:E}=gOe(),[C,{setHovered:O,resetHovered:R}]=bge(),[T,A]=Ar({value:o,defaultValue:s,finalValue:!1,onChange:a}),F=()=>{A(!1),T&&i?.()},N=()=>{A(!0),!T&&r?.()},U=()=>T?F():N(),{openDropdown:k,closeDropdown:z}=gTe({open:N,close:F,closeDelay:h,openDelay:f}),G=W=>wge("[data-menu-item]","[data-menu-dropdown]",W);return Qr(()=>{R()},[T]),H.createElement(ATe,{value:{opened:T,toggleDropdown:U,getItemIndex:G,hovered:C,setHovered:O,closeOnItemClick:l,closeDropdown:d==="click"?F:z,openDropdown:d==="click"?N:k,closeDropdownImmediately:F,loop:c,trigger:d,radius:v,classNames:g,styles:y,unstyled:_,variant:x}},H.createElement(qi,v5(g5({},w),{radius:v,opened:T,onChange:U,defaultOpened:s,trapFocus:d==="click",closeOnEscape:u&&d==="click",__staticSelector:"Menu",classNames:v5(g5({},g),{dropdown:E(S.dropdown,g?.dropdown)}),styles:y,unstyled:_,variant:x}),n))}cn.displayName="@mantine/core/Menu";cn.Item=iOe;cn.Label=_X;cn.Dropdown=hX;cn.Target=SX;cn.Divider=uX;const[SOe,bOe]=cd("Modal component was not found in tree"),MOe={xs:X(320),sm:X(380),md:X(440),lg:X(620),xl:X(780)};var EOe=ft((t,{yOffset:e,xOffset:n,centered:r,fullScreen:i},{size:o})=>({content:{flex:i?"0 0 100%":`0 0 ${Oe({size:o,sizes:MOe})}`,maxWidth:"100%",maxHeight:i?void 0:`calc(100vh - (${X(e)} * 2))`,height:i?"100vh":void 0,borderRadius:i?0:void 0,overflowY:"auto"},inner:{paddingTop:i?0:e,paddingBottom:i?0:e,paddingLeft:i?0:n,paddingRight:i?0:n,display:"flex",justifyContent:"center",alignItems:r?"center":"flex-start"}}));const POe=EOe;var COe=Object.defineProperty,TOe=Object.defineProperties,OOe=Object.getOwnPropertyDescriptors,e1=Object.getOwnPropertySymbols,EX=Object.prototype.hasOwnProperty,PX=Object.prototype.propertyIsEnumerable,y5=(t,e,n)=>e in t?COe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ET=(t,e)=>{for(var n in e||(e={}))EX.call(e,n)&&y5(t,n,e[n]);if(e1)for(var n of e1(e))PX.call(e,n)&&y5(t,n,e[n]);return t},CX=(t,e)=>TOe(t,OOe(e)),ROe=(t,e)=>{var n={};for(var r in t)EX.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&e1)for(var r of e1(t))e.indexOf(r)<0&&PX.call(t,r)&&(n[r]=t[r]);return n};const AOe=CX(ET({},TA),{yOffset:"5vh",xOffset:"5vw"});function TX(t){const e=nt("ModalRoot",AOe,t),{classNames:n,variant:r,size:i,yOffset:o,xOffset:s,scrollAreaComponent:a,radius:l,centered:c,fullScreen:u}=e,d=ROe(e,["classNames","variant","size","yOffset","xOffset","scrollAreaComponent","radius","centered","fullScreen"]),{classes:f,cx:h}=POe({yOffset:o,xOffset:s,centered:c,fullScreen:u},{name:"Modal",variant:r,size:i});return H.createElement(SOe,{value:{yOffset:o,scrollAreaComponent:a,radius:l}},H.createElement(Rr,ET({__staticSelector:"Modal",size:i,variant:r,classNames:CX(ET({},n),{content:h(f.content,n?.content),inner:h(f.inner,n?.inner)})},d)))}var DOe=Object.defineProperty,t1=Object.getOwnPropertySymbols,OX=Object.prototype.hasOwnProperty,RX=Object.prototype.propertyIsEnumerable,_5=(t,e,n)=>e in t?DOe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,IOe=(t,e)=>{for(var n in e||(e={}))OX.call(e,n)&&_5(t,n,e[n]);if(t1)for(var n of t1(e))RX.call(e,n)&&_5(t,n,e[n]);return t},LOe=(t,e)=>{var n={};for(var r in t)OX.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&t1)for(var r of t1(t))e.indexOf(r)<0&&RX.call(t,r)&&(n[r]=t[r]);return n};const kOe={shadow:"xl"},AX=M.forwardRef((t,e)=>{const n=nt("ModalContent",kOe,t),{children:r,scrollAreaComponent:i}=n,o=LOe(n,["children","scrollAreaComponent"]),s=bOe(),a=i||s.scrollAreaComponent||Rr.NativeScrollArea;return H.createElement(Rr.Content,IOe({ref:e,radius:s.radius},o),H.createElement(a,{style:{maxHeight:`calc(100vh - (${X(s.yOffset)} * 2))`}},r))});var NOe=Object.defineProperty,FOe=Object.defineProperties,zOe=Object.getOwnPropertyDescriptors,n1=Object.getOwnPropertySymbols,DX=Object.prototype.hasOwnProperty,IX=Object.prototype.propertyIsEnumerable,x5=(t,e,n)=>e in t?NOe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$_=(t,e)=>{for(var n in e||(e={}))DX.call(e,n)&&x5(t,n,e[n]);if(n1)for(var n of n1(e))IX.call(e,n)&&x5(t,n,e[n]);return t},UOe=(t,e)=>FOe(t,zOe(e)),BOe=(t,e)=>{var n={};for(var r in t)DX.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&n1)for(var r of n1(t))e.indexOf(r)<0&&IX.call(t,r)&&(n[r]=t[r]);return n};const HOe=UOe($_({},TA),{transitionProps:{duration:200,transition:"pop"},withOverlay:!0,withCloseButton:!0});function Ia(t){const e=nt("Modal",HOe,t),{title:n,withOverlay:r,overlayProps:i,withCloseButton:o,closeButtonProps:s,children:a}=e,l=BOe(e,["title","withOverlay","overlayProps","withCloseButton","closeButtonProps","children"]),c=!!n||o;return H.createElement(TX,$_({},l),r&&H.createElement(Rr.Overlay,$_({},i)),H.createElement(AX,null,c&&H.createElement(Rr.Header,null,n&&H.createElement(Rr.Title,null,n),o&&H.createElement(Rr.CloseButton,$_({},s))),H.createElement(Rr.Body,null,a)))}Ia.Root=TX;Ia.CloseButton=Rr.CloseButton;Ia.Overlay=Rr.Overlay;Ia.Content=AX;Ia.Header=Rr.Header;Ia.Title=Rr.Title;Ia.Body=Rr.Body;Ia.NativeScrollArea=Rr.NativeScrollArea;const LX={xs:X(16),sm:X(22),md:X(26),lg:X(30),xl:X(36)},VOe={xs:X(10),sm:X(12),md:X(14),lg:X(16),xl:X(18)};var jOe=ft((t,{disabled:e,radius:n,readOnly:r},{size:i,variant:o})=>({defaultValue:{display:"flex",alignItems:"center",backgroundColor:e?t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[3]:t.colorScheme==="dark"?t.colors.dark[7]:o==="filled"?t.white:t.colors.gray[1],color:e?t.colorScheme==="dark"?t.colors.dark[1]:t.colors.gray[7]:t.colorScheme==="dark"?t.colors.dark[0]:t.colors.gray[7],height:Oe({size:i,sizes:LX}),paddingLeft:`calc(${Oe({size:i,sizes:t.spacing})} / 1.5)`,paddingRight:e||r?Oe({size:i,sizes:t.spacing}):0,fontWeight:500,fontSize:Oe({size:i,sizes:VOe}),borderRadius:Oe({size:n,sizes:t.radius}),cursor:e?"not-allowed":"default",userSelect:"none",maxWidth:`calc(100% - ${X(10)})`},defaultValueRemove:{color:t.colorScheme==="dark"?t.colors.dark[0]:t.colors.gray[7],marginLeft:`calc(${Oe({size:i,sizes:t.spacing})} / 6)`},defaultValueLabel:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}));const $Oe=jOe;var GOe=Object.defineProperty,r1=Object.getOwnPropertySymbols,kX=Object.prototype.hasOwnProperty,NX=Object.prototype.propertyIsEnumerable,w5=(t,e,n)=>e in t?GOe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,WOe=(t,e)=>{for(var n in e||(e={}))kX.call(e,n)&&w5(t,n,e[n]);if(r1)for(var n of r1(e))NX.call(e,n)&&w5(t,n,e[n]);return t},YOe=(t,e)=>{var n={};for(var r in t)kX.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&r1)for(var r of r1(t))e.indexOf(r)<0&&NX.call(t,r)&&(n[r]=t[r]);return n};const XOe={xs:16,sm:22,md:24,lg:26,xl:30};function FX(t){var e=t,{label:n,classNames:r,styles:i,className:o,onRemove:s,disabled:a,readOnly:l,size:c,radius:u="sm",variant:d,unstyled:f}=e,h=YOe(e,["label","classNames","styles","className","onRemove","disabled","readOnly","size","radius","variant","unstyled"]);const{classes:g,cx:y}=$Oe({disabled:a,readOnly:l,radius:u},{name:"MultiSelect",classNames:r,styles:i,unstyled:f,size:c,variant:d});return H.createElement("div",WOe({className:y(g.defaultValue,o)},h),H.createElement("span",{className:g.defaultValueLabel},n),!a&&!l&&H.createElement(Qg,{"aria-hidden":!0,onMouseDown:s,size:XOe[c],radius:2,color:"blue",variant:"transparent",iconSize:"70%",className:g.defaultValueRemove,tabIndex:-1,unstyled:f}))}FX.displayName="@mantine/core/MultiSelect/DefaultValue";function ZOe({data:t,searchable:e,limit:n,searchValue:r,filter:i,value:o,disableSelectedItemFiltering:s}){if(!e&&o.length===0)return t;if(!e){const l=[];for(let c=0;cu===t[c].value&&!t[c].disabled))&&l.push(t[c]);return l}const a=[];for(let l=0;lc===t[l].value&&!t[l].disabled),t[l])&&a.push(t[l]),!(a.length>=n));l+=1);return a}var qOe=Object.defineProperty,i1=Object.getOwnPropertySymbols,zX=Object.prototype.hasOwnProperty,UX=Object.prototype.propertyIsEnumerable,S5=(t,e,n)=>e in t?qOe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,b5=(t,e)=>{for(var n in e||(e={}))zX.call(e,n)&&S5(t,n,e[n]);if(i1)for(var n of i1(e))UX.call(e,n)&&S5(t,n,e[n]);return t},KOe=(t,e)=>{var n={};for(var r in t)zX.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&i1)for(var r of i1(t))e.indexOf(r)<0&&UX.call(t,r)&&(n[r]=t[r]);return n};const QOe={xs:X(14),sm:X(18),md:X(20),lg:X(24),xl:X(28)};function JOe(t){var e=t,{size:n,error:r,style:i}=e,o=KOe(e,["size","error","style"]);const s=Ir(),a=Oe({size:n,sizes:QOe});return H.createElement("svg",b5({width:a,height:a,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:b5({color:r?s.colors.red[6]:s.colors.gray[6]},i),"data-chevron":!0},o),H.createElement("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}var eRe=Object.defineProperty,tRe=Object.defineProperties,nRe=Object.getOwnPropertyDescriptors,M5=Object.getOwnPropertySymbols,rRe=Object.prototype.hasOwnProperty,iRe=Object.prototype.propertyIsEnumerable,E5=(t,e,n)=>e in t?eRe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,oRe=(t,e)=>{for(var n in e||(e={}))rRe.call(e,n)&&E5(t,n,e[n]);if(M5)for(var n of M5(e))iRe.call(e,n)&&E5(t,n,e[n]);return t},sRe=(t,e)=>tRe(t,nRe(e));function BX({shouldClear:t,clearButtonProps:e,onClear:n,size:r,error:i}){return t?H.createElement(Qg,sRe(oRe({},e),{variant:"transparent",onClick:n,size:r,onMouseDown:o=>o.preventDefault()})):H.createElement(JOe,{error:i,size:r})}BX.displayName="@mantine/core/SelectRightSection";var aRe=Object.defineProperty,lRe=Object.defineProperties,cRe=Object.getOwnPropertyDescriptors,o1=Object.getOwnPropertySymbols,HX=Object.prototype.hasOwnProperty,VX=Object.prototype.propertyIsEnumerable,P5=(t,e,n)=>e in t?aRe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,kP=(t,e)=>{for(var n in e||(e={}))HX.call(e,n)&&P5(t,n,e[n]);if(o1)for(var n of o1(e))VX.call(e,n)&&P5(t,n,e[n]);return t},C5=(t,e)=>lRe(t,cRe(e)),uRe=(t,e)=>{var n={};for(var r in t)HX.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&o1)for(var r of o1(t))e.indexOf(r)<0&&VX.call(t,r)&&(n[r]=t[r]);return n};function jX(t){var e=t,{styles:n,rightSection:r,rightSectionWidth:i,theme:o}=e,s=uRe(e,["styles","rightSection","rightSectionWidth","theme"]);if(r)return{rightSection:r,rightSectionWidth:i,styles:n};const a=typeof n=="function"?n(o):n;return{rightSection:!s.readOnly&&!(s.disabled&&s.shouldClear)&&H.createElement(BX,kP({},s)),styles:C5(kP({},a),{rightSection:C5(kP({},a?.rightSection),{pointerEvents:s.shouldClear?void 0:"none"})})}}var dRe=Object.defineProperty,fRe=Object.defineProperties,hRe=Object.getOwnPropertyDescriptors,T5=Object.getOwnPropertySymbols,pRe=Object.prototype.hasOwnProperty,mRe=Object.prototype.propertyIsEnumerable,O5=(t,e,n)=>e in t?dRe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,gRe=(t,e)=>{for(var n in e||(e={}))pRe.call(e,n)&&O5(t,n,e[n]);if(T5)for(var n of T5(e))mRe.call(e,n)&&O5(t,n,e[n]);return t},vRe=(t,e)=>fRe(t,hRe(e)),yRe=ft((t,{invalid:e},{size:n})=>({wrapper:{position:"relative","&:has(input:disabled)":{cursor:"not-allowed",pointerEvents:"none","& .mantine-MultiSelect-input":{backgroundColor:t.colorScheme==="dark"?t.colors.dark[6]:t.colors.gray[1],color:t.colors.dark[2],opacity:.6,"&::placeholder":{color:t.colors.dark[2]}},"& .mantine-MultiSelect-defaultValue":{backgroundColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[3],color:t.colorScheme==="dark"?t.colors.dark[1]:t.colors.gray[7]}}},values:{minHeight:`calc(${Oe({size:n,sizes:yi})} - ${X(2)})`,display:"flex",alignItems:"center",flexWrap:"wrap",marginLeft:`calc(-${t.spacing.xs} / 2)`,boxSizing:"border-box","&[data-clearable]":{marginRight:Oe({size:n,sizes:yi})}},value:{margin:`calc(${t.spacing.xs} / 2 - ${X(2)}) calc(${t.spacing.xs} / 2)`},searchInput:vRe(gRe({},t.fn.fontStyles()),{flex:1,minWidth:X(60),backgroundColor:"transparent",border:0,outline:0,fontSize:Oe({size:n,sizes:t.fontSizes}),padding:0,marginLeft:`calc(${t.spacing.xs} / 2)`,appearance:"none",color:"inherit",maxHeight:Oe({size:n,sizes:LX}),"&::placeholder":{opacity:1,color:e?t.colors.red[t.fn.primaryShade()]:t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[5]},"&:disabled":{cursor:"not-allowed",pointerEvents:"none"}}),searchInputEmpty:{width:"100%"},searchInputInputHidden:{flex:0,width:0,minWidth:0,margin:0,overflow:"hidden"},searchInputPointer:{cursor:"pointer","&:disabled":{cursor:"not-allowed",pointerEvents:"none"}},input:{cursor:"pointer","&:disabled":{cursor:"not-allowed",pointerEvents:"none"}}}));const _Re=yRe;var xRe=Object.defineProperty,wRe=Object.defineProperties,SRe=Object.getOwnPropertyDescriptors,s1=Object.getOwnPropertySymbols,$X=Object.prototype.hasOwnProperty,GX=Object.prototype.propertyIsEnumerable,R5=(t,e,n)=>e in t?xRe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,uf=(t,e)=>{for(var n in e||(e={}))$X.call(e,n)&&R5(t,n,e[n]);if(s1)for(var n of s1(e))GX.call(e,n)&&R5(t,n,e[n]);return t},A5=(t,e)=>wRe(t,SRe(e)),bRe=(t,e)=>{var n={};for(var r in t)$X.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&s1)for(var r of s1(t))e.indexOf(r)<0&&GX.call(t,r)&&(n[r]=t[r]);return n};function MRe(t,e,n){return e?!1:n.label.toLowerCase().trim().includes(t.toLowerCase().trim())}function ERe(t,e){return!!t&&!e.some(n=>n.value.toLowerCase()===t.toLowerCase())}function D5(t,e){if(!Array.isArray(t))return;if(e.length===0)return[];const n=e.map(r=>typeof r=="object"?r.value:r);return t.filter(r=>n.includes(r))}const PRe={size:"sm",valueComponent:FX,itemComponent:lA,transitionProps:{transition:"fade",duration:0},maxDropdownHeight:220,shadow:"sm",searchable:!1,filter:MRe,limit:1/0,clearSearchOnChange:!0,clearable:!1,clearSearchOnBlur:!1,disabled:!1,initiallyOpened:!1,creatable:!1,shouldCreate:ERe,switchDirectionOnFlip:!1,zIndex:Ys("popover"),selectOnBlur:!1,positionDependencies:[],dropdownPosition:"flip"},WX=M.forwardRef((t,e)=>{const n=nt("MultiSelect",PRe,t),{className:r,style:i,required:o,label:s,description:a,size:l,error:c,classNames:u,styles:d,wrapperProps:f,value:h,defaultValue:g,data:y,onChange:_,valueComponent:v,itemComponent:x,id:w,transitionProps:S,maxDropdownHeight:E,shadow:C,nothingFound:O,onFocus:R,onBlur:T,searchable:A,placeholder:F,filter:N,limit:U,clearSearchOnChange:k,clearable:z,clearSearchOnBlur:G,variant:W,onSearchChange:B,searchValue:j,disabled:$,initiallyOpened:q,radius:K,icon:re,rightSection:J,rightSectionWidth:le,creatable:ae,getCreateLabel:oe,shouldCreate:De,onCreate:Te,sx:ve,dropdownComponent:we,onDropdownClose:me,onDropdownOpen:se,maxSelectedValues:de,withinPortal:ke,switchDirectionOnFlip:Ve,zIndex:Ze,selectOnBlur:ot,name:dt,dropdownPosition:We,errorProps:ht,labelProps:ee,descriptionProps:Q,form:Pe,positionDependencies:$e,onKeyDown:Ge,unstyled:Ke,inputContainer:gt,inputWrapperOrder:ut,readOnly:Ae,withAsterisk:vt,clearButtonProps:xt,hoverOnSearchChange:ct,disableSelectedItemFiltering:Ie}=n,Ye=bRe(n,["className","style","required","label","description","size","error","classNames","styles","wrapperProps","value","defaultValue","data","onChange","valueComponent","itemComponent","id","transitionProps","maxDropdownHeight","shadow","nothingFound","onFocus","onBlur","searchable","placeholder","filter","limit","clearSearchOnChange","clearable","clearSearchOnBlur","variant","onSearchChange","searchValue","disabled","initiallyOpened","radius","icon","rightSection","rightSectionWidth","creatable","getCreateLabel","shouldCreate","onCreate","sx","dropdownComponent","onDropdownClose","onDropdownOpen","maxSelectedValues","withinPortal","switchDirectionOnFlip","zIndex","selectOnBlur","name","dropdownPosition","errorProps","labelProps","descriptionProps","form","positionDependencies","onKeyDown","unstyled","inputContainer","inputWrapperOrder","readOnly","withAsterisk","clearButtonProps","hoverOnSearchChange","disableSelectedItemFiltering"]),{classes:Tt,cx:Lt,theme:Rt}=_Re({invalid:!!c},{name:"MultiSelect",classNames:u,styles:d,unstyled:Ke,size:l,variant:W}),{systemStyles:he,rest:ue}=Sl(Ye),He=M.useRef(),st=M.useRef({}),wt=zo(w),[Bt,Yt]=M.useState(q),[jn,Nt]=M.useState(-1),[xn,Ft]=M.useState("column"),[kt,fn]=Ar({value:j,defaultValue:"",finalValue:void 0,onChange:B}),[In,Fn]=M.useState(!1),{scrollIntoView:Lr,targetRef:ti,scrollableRef:te}=oW({duration:0,offset:5,cancelable:!1,isList:!0}),pe=ae&&typeof oe=="function";let Ne=null;const ce=y.map(it=>typeof it=="string"?{label:it,value:it}:it),L=_G({data:ce}),[Y,ne]=Ar({value:D5(h,y),defaultValue:D5(g,y),finalValue:[],onChange:_}),fe=M.useRef(!!de&&de{if(!Ae){const St=Y.filter(At=>At!==it);ne(St),de&&St.length{fn(it.currentTarget.value),!$&&!fe.current&&A&&Yt(!0)},Fe=it=>{typeof R=="function"&&R(it),!$&&!fe.current&&A&&Yt(!0)},Ce=ZOe({data:L,searchable:A,searchValue:kt,limit:U,filter:N,value:Y,disableSelectedItemFiltering:Ie}),je=Math.min(jn,Ce.length-1),qe=(it,St,At)=>{let bt=it;for(;At(bt);)if(bt=St(bt),!Ce[bt].disabled)return bt;return it};Qr(()=>{Nt(ct&&kt?0:-1)},[kt,ct]),Qr(()=>{!$&&Y.length>y.length&&Yt(!1),de&&Y.length=de&&(fe.current=!0,Yt(!1))},[Y]);const Qe=it=>{if(!Ae)if(k&&fn(""),Y.includes(it.value))_e(it.value);else{if(it.creatable&&typeof Te=="function"){const St=Te(it.value);typeof St<"u"&&St!==null&&ne(typeof St=="string"?[...Y,St]:[...Y,St.value])}else ne([...Y,it.value]);Y.length===de-1&&(fe.current=!0,Yt(!1)),Ce.length===1&&Yt(!1)}},et=it=>{typeof T=="function"&&T(it),ot&&Ce[je]&&Bt&&Qe(Ce[je]),G&&fn(""),Yt(!1)},jt=it=>{if(In||(Ge?.(it),Ae)||it.key!=="Backspace"&&de&&fe.current)return;const St=xn==="column",At=()=>{Nt(Gt=>{var rn;const It=qe(Gt,pn=>pn+1,pn=>pn{Nt(Gt=>{var rn;const It=qe(Gt,pn=>pn-1,pn=>pn>0);return Bt&&(ti.current=st.current[(rn=Ce[It])==null?void 0:rn.value],Lr({alignment:St?"start":"end"})),It})};switch(it.key){case"ArrowUp":{it.preventDefault(),Yt(!0),St?bt():At();break}case"ArrowDown":{it.preventDefault(),Yt(!0),St?At():bt();break}case"Enter":{it.preventDefault(),Ce[je]&&Bt?Qe(Ce[je]):Yt(!0);break}case" ":{A||(it.preventDefault(),Ce[je]&&Bt?Qe(Ce[je]):Yt(!0));break}case"Backspace":{Y.length>0&&kt.length===0&&(ne(Y.slice(0,-1)),Yt(!0),de&&(fe.current=!1));break}case"Home":{if(!A){it.preventDefault(),Bt||Yt(!0);const Gt=Ce.findIndex(rn=>!rn.disabled);Nt(Gt),Lr({alignment:St?"end":"start"})}break}case"End":{if(!A){it.preventDefault(),Bt||Yt(!0);const Gt=Ce.map(rn=>!!rn.disabled).lastIndexOf(!1);Nt(Gt),Lr({alignment:St?"end":"start"})}break}case"Escape":Yt(!1)}},Je=Y.map(it=>{let St=L.find(At=>At.value===it&&!At.disabled);return!St&&pe&&(St={value:it,label:it}),St}).filter(it=>!!it).map((it,St)=>H.createElement(v,A5(uf({},it),{variant:W,disabled:$,className:Tt.value,readOnly:Ae,onRemove:At=>{At.preventDefault(),At.stopPropagation(),_e(it.value)},key:it.value,size:l,styles:d,classNames:u,radius:K,index:St}))),Ot=it=>Y.includes(it),Pt=()=>{var it;fn(""),ne([]),(it=He.current)==null||it.focus(),de&&(fe.current=!1)};pe&&De(kt,L)&&(Ne=oe(kt),Ce.push({label:kt,value:kt,creatable:!0}));const Ht=!Ae&&(Ce.length>0?Bt:Bt&&!!O);return Qr(()=>{const it=Ht?se:me;typeof it=="function"&&it()},[Ht]),H.createElement(Ki.Wrapper,uf(uf({required:o,id:wt,label:s,error:c,description:a,size:l,className:r,style:i,classNames:u,styles:d,__staticSelector:"MultiSelect",sx:ve,errorProps:ht,descriptionProps:Q,labelProps:ee,inputContainer:gt,inputWrapperOrder:ut,unstyled:Ke,withAsterisk:vt,variant:W},he),f),H.createElement(gc,{opened:Ht,transitionProps:S,shadow:"sm",withinPortal:ke,__staticSelector:"MultiSelect",onDirectionChange:Ft,switchDirectionOnFlip:Ve,zIndex:Ze,dropdownPosition:We,positionDependencies:[...$e,kt],classNames:u,styles:d,unstyled:Ke,variant:W},H.createElement(gc.Target,null,H.createElement("div",{className:Tt.wrapper,role:"combobox","aria-haspopup":"listbox","aria-owns":Bt&&Ht?`${wt}-items`:null,"aria-controls":wt,"aria-expanded":Bt,onMouseLeave:()=>Nt(-1),tabIndex:-1},H.createElement("input",{type:"hidden",name:dt,value:Y.join(","),form:Pe,disabled:$}),H.createElement(Ki,uf({__staticSelector:"MultiSelect",style:{overflow:"hidden"},component:"div",multiline:!0,size:l,variant:W,disabled:$,error:c,required:o,radius:K,icon:re,unstyled:Ke,onMouseDown:it=>{var St;it.preventDefault(),!$&&!fe.current&&Yt(!Bt),(St=He.current)==null||St.focus()},classNames:A5(uf({},u),{input:Lt({[Tt.input]:!A},u?.input)})},jX({theme:Rt,rightSection:J,rightSectionWidth:le,styles:d,size:l,shouldClear:z&&Y.length>0,onClear:Pt,error:c,disabled:$,clearButtonProps:xt,readOnly:Ae})),H.createElement("div",{className:Tt.values,"data-clearable":z||void 0},Je,H.createElement("input",uf({ref:Da(e,He),type:"search",id:wt,className:Lt(Tt.searchInput,{[Tt.searchInputPointer]:!A,[Tt.searchInputInputHidden]:!Bt&&Y.length>0||!A&&Y.length>0,[Tt.searchInputEmpty]:Y.length===0}),onKeyDown:jt,value:kt,onChange:Se,onFocus:Fe,onBlur:et,readOnly:!A||fe.current||Ae,placeholder:Y.length===0?F:void 0,disabled:$,"data-mantine-stop-propagation":Bt,autoComplete:"off",onCompositionStart:()=>Fn(!0),onCompositionEnd:()=>Fn(!1)},ue)))))),H.createElement(gc.Dropdown,{component:we||ub,maxHeight:E,direction:xn,id:wt,innerRef:te,__staticSelector:"MultiSelect",classNames:u,styles:d},H.createElement(aA,{data:Ce,hovered:je,classNames:u,styles:d,uuid:wt,__staticSelector:"MultiSelect",onItemHover:Nt,onItemSelect:Qe,itemsRefs:st,itemComponent:x,size:l,nothingFound:O,isItemSelected:Ot,creatable:ae&&!!Ne,createLabel:Ne,unstyled:Ke,variant:W}))))});WX.displayName="@mantine/core/MultiSelect";const CRe=(t,e,n)=>Number.isInteger(t)&&t>=0&&e===0?"numeric":!Number.isInteger(t)&&t>=0&&e!==0?"decimal":Number.isInteger(t)&&t<0&&e===0||!Number.isInteger(t)&&t<0&&e!==0?n==="ios"?"text":"decimal":"numeric";function I5({direction:t,size:e}){return H.createElement("svg",{style:{transform:t==="up"?"rotate(180deg)":void 0},width:X(e),height:X(e),viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},H.createElement("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}const YX={xs:X(20),sm:X(24),md:X(30),lg:X(34),xl:X(36)};var TRe=ft((t,{radius:e},{size:n})=>({rightSection:{display:"flex",flexDirection:"column",height:`calc(100% - ${X(2)})`,margin:X(1),overflow:"hidden",borderTopRightRadius:t.fn.radius(e),borderBottomRightRadius:t.fn.radius(e)},control:{margin:0,position:"relative",flex:"0 0 50%",display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",width:Oe({size:n,sizes:YX}),padding:0,WebkitTapHighlightColor:"transparent",borderBottom:`${X(1)} solid ${t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[4]}`,borderLeft:`${X(1)} solid ${t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[4]}`,borderTop:0,borderRight:0,backgroundColor:"transparent",marginRight:X(1),color:t.colorScheme==="dark"?t.colors.dark[0]:t.black,"&:not(:disabled):hover":{backgroundColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[0]},"&:disabled":{color:t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[4]}},controlUp:{},controlDown:{borderBottom:0}}));const ORe=TRe;var RRe=Object.defineProperty,ARe=Object.defineProperties,DRe=Object.getOwnPropertyDescriptors,a1=Object.getOwnPropertySymbols,XX=Object.prototype.hasOwnProperty,ZX=Object.prototype.propertyIsEnumerable,L5=(t,e,n)=>e in t?RRe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,NP=(t,e)=>{for(var n in e||(e={}))XX.call(e,n)&&L5(t,n,e[n]);if(a1)for(var n of a1(e))ZX.call(e,n)&&L5(t,n,e[n]);return t},IRe=(t,e)=>ARe(t,DRe(e)),LRe=(t,e)=>{var n={};for(var r in t)XX.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&a1)for(var r of a1(t))e.indexOf(r)<0&&ZX.call(t,r)&&(n[r]=t[r]);return n};const kRe={type:"text",size:"sm",__staticSelector:"TextInput"},Pc=M.forwardRef((t,e)=>{const n=hb("TextInput",kRe,t),{inputProps:r,wrapperProps:i}=n,o=LRe(n,["inputProps","wrapperProps"]);return H.createElement(Ki.Wrapper,NP({},i),H.createElement(Ki,IRe(NP(NP({},r),o),{ref:e})))});Pc.displayName="@mantine/core/TextInput";var NRe=Object.defineProperty,FRe=Object.defineProperties,zRe=Object.getOwnPropertyDescriptors,l1=Object.getOwnPropertySymbols,qX=Object.prototype.hasOwnProperty,KX=Object.prototype.propertyIsEnumerable,k5=(t,e,n)=>e in t?NRe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,URe=(t,e)=>{for(var n in e||(e={}))qX.call(e,n)&&k5(t,n,e[n]);if(l1)for(var n of l1(e))KX.call(e,n)&&k5(t,n,e[n]);return t},BRe=(t,e)=>FRe(t,zRe(e)),HRe=(t,e)=>{var n={};for(var r in t)qX.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&l1)for(var r of l1(t))e.indexOf(r)<0&&KX.call(t,r)&&(n[r]=t[r]);return n};const VRe=t=>t||"",jRe=t=>{if(t==="-")return t;let e=t;e[0]==="."&&(e=`0${t}`);const n=parseFloat(e);return Number.isNaN(n)?"":t},N5={xs:X(10),sm:X(14),md:X(16),lg:X(18),xl:X(20)},$Re={step:1,hideControls:!1,size:"sm",precision:0,noClampOnBlur:!1,removeTrailingZeros:!1,decimalSeparator:".",formatter:VRe,parser:jRe,type:"text"},c1=M.forwardRef((t,e)=>{const n=nt("NumberInput",$Re,t),{readOnly:r,disabled:i,value:o,onChange:s,decimalSeparator:a,thousandsSeparator:l,min:c,max:u,startValue:d,step:f,stepHoldInterval:h,stepHoldDelay:g,onFocus:y,onBlur:_,onKeyDown:v,onKeyUp:x,hideControls:w,radius:S,variant:E,precision:C,removeTrailingZeros:O,defaultValue:R,noClampOnBlur:T,handlersRef:A,classNames:F,styles:N,size:U,rightSection:k,rightSectionWidth:z,formatter:G,parser:W,inputMode:B,unstyled:j,type:$}=n,q=HRe(n,["readOnly","disabled","value","onChange","decimalSeparator","thousandsSeparator","min","max","startValue","step","stepHoldInterval","stepHoldDelay","onFocus","onBlur","onKeyDown","onKeyUp","hideControls","radius","variant","precision","removeTrailingZeros","defaultValue","noClampOnBlur","handlersRef","classNames","styles","size","rightSection","rightSectionWidth","formatter","parser","inputMode","unstyled","type"]),{classes:K,cx:re}=ORe({radius:S},{classNames:F,styles:N,unstyled:j,name:"NumberInput",variant:E,size:U}),J=Ie=>{if(Ie==="")return"";let Ye=Ie.toFixed(C);return O&&C>0&&(Ye=Ye.replace(new RegExp(`[0]{0,${C}}$`),""),Ye.endsWith(".")&&(Ye=Ye.slice(0,-1))),Ye},le=Ie=>{let Ye=Ie;return a&&(Ye=Ye.replace(".",a)),G(Ye)},ae=Ie=>{let Ye=Ie;return a&&(Ye=Ye.replaceAll(l,"").replace(a,".")),W(Ye)},oe=Ie=>le(J(Ie)),[De,Te]=M.useState(typeof o=="number"?o:typeof R=="number"?R:""),[ve,we]=M.useState(()=>oe(De)),me=M.useRef(),[se,de]=M.useState(!1),ke=(Ie,Ye)=>{if(!se||Ye){const Tt=oe(Ie);Tt!==ve&&we(Tt)}Ie!==De&&Te(Ie)},Ve=typeof c=="number"?c:-1/0,Ze=typeof u=="number"?u:1/0,ot=M.useRef();ot.current=()=>{var Ie;let Ye;De===""?Ye=(Ie=d??c)!=null?Ie:0:Ye=parseFloat(J(Ns(De+f,Ve,Ze))),ke(Ye,!0),s?.(Ye)};const dt=M.useRef();dt.current=()=>{var Ie;let Ye;De===""?Ye=(Ie=d??c)!=null?Ie:0:Ye=parseFloat(J(Ns(De-f,Ve,Ze))),ke(Ye,!0),s?.(Ye)},nW(A,{increment:ot.current,decrement:dt.current}),M.useEffect(()=>{se||ke(o===void 0?De:o,!0)},[o,se]);const We=g!==void 0&&h!==void 0,ht=M.useRef(null),ee=M.useRef(0),Q=()=>{ht.current&&window.clearTimeout(ht.current),ht.current=null,ee.current=0},Pe=Ie=>{Ie?ot.current():dt.current(),ee.current+=1},$e=Ie=>{if(Pe(Ie),We){const Ye=typeof h=="number"?h:h(ee.current);ht.current=window.setTimeout(()=>$e(Ie),Ye)}},Ge=(Ie,Ye)=>{Ie.preventDefault(),me.current.focus(),Pe(Ye),We&&(ht.current=window.setTimeout(()=>$e(Ye),g))};M.useEffect(()=>(Q(),Q),[]);const Ke=H.createElement("div",{className:K.rightSection},H.createElement("button",{type:"button",tabIndex:-1,"aria-hidden":!0,disabled:De>=u,className:re(K.control,K.controlUp),onPointerDown:Ie=>{Ge(Ie,!0)},onPointerUp:Q,onPointerLeave:Q},H.createElement(I5,{size:Oe({size:U,sizes:N5}),direction:"up"})),H.createElement("button",{type:"button",tabIndex:-1,"aria-hidden":!0,disabled:De<=c,className:re(K.control,K.controlDown),onPointerDown:Ie=>{Ge(Ie,!1)},onPointerUp:Q,onPointerLeave:Q},H.createElement(I5,{size:Oe({size:U,sizes:N5}),direction:"down"}))),gt=Ie=>{let Ye=Ie;(Ye[0]===`${a}`||Ye[0]===".")&&(Ye=`0${Ye}`);const Tt=parseFloat(J(parseFloat(ae(Ye)))),Lt=T?Tt:Ns(Tt,Ve,Ze),Rt=Number.isNaN(Lt)?"":Lt,he=De!==Rt;we(Ie),ke(Rt),he&&s?.(Rt)},ut=Ie=>{Ie.nativeEvent.isComposing||gt(Ie.target.value)},Ae=Ie=>{de(!0),y?.(Ie)},vt=Ie=>{de(!1),_?.(Ie)},xt=Ie=>{if(typeof v=="function"&&v(Ie),Ie.repeat&&We&&(Ie.key==="ArrowUp"||Ie.key==="ArrowDown")){Ie.preventDefault();return}r||(Ie.key==="ArrowUp"?Ge(Ie,!0):Ie.key==="ArrowDown"&&Ge(Ie,!1))},ct=Ie=>{typeof x=="function"&&x(Ie),(Ie.key==="ArrowUp"||Ie.key==="ArrowDown")&&Q()};return H.createElement(Pc,BRe(URe({},q),{type:$,variant:E,value:ve,disabled:i,readOnly:r,ref:Da(me,e),onChange:ut,onFocus:Ae,onBlur:vt,onKeyDown:xt,onKeyUp:ct,rightSection:k||(i||r||w||E==="unstyled"?null:Ke),rightSectionWidth:z??`calc(${Oe({size:U,sizes:YX})} + ${X(1)})`,radius:S,max:u,min:c,step:f,size:U,styles:N,classNames:F,inputMode:B||CRe(f,C,J0e()),__staticSelector:"NumberInput",unstyled:j}))});c1.displayName="@mantine/core/NumberInput";const F5={xs:X(3),sm:X(5),md:X(8),lg:X(12),xl:X(16)},GRe=nA({from:{backgroundPosition:"0 0"},to:{backgroundPosition:`${X(40)} 0`}});var WRe=ft((t,{color:e,radius:n},{size:r})=>({root:{position:"relative",height:Oe({size:r,sizes:F5}),backgroundColor:t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[2],borderRadius:t.fn.radius(n),overflow:"hidden"},bar:{position:"absolute",top:0,bottom:0,left:0,height:"100%",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:t.fn.variant({variant:"filled",primaryFallback:!1,color:e||t.primaryColor}).background,transition:"width 100ms linear","&[data-animate]":{animation:`${GRe} 1000ms linear infinite`},"&[data-striped]":{backgroundSize:`${X(20)} ${X(20)}`,backgroundImage:"linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent)"},"&:last-of-type":{borderTopRightRadius:t.fn.radius(n),borderBottomRightRadius:t.fn.radius(n)},"&:first-of-type":{borderTopLeftRadius:t.fn.radius(n),borderBottomLeftRadius:t.fn.radius(n)},"@media (prefers-reduced-motion)":{transitionDuration:t.respectReducedMotion?"0ms":void 0}},label:{color:t.white,fontSize:`calc(${Oe({size:r,sizes:F5})} * 0.65)`,fontWeight:700,userSelect:"none",overflow:"hidden",whiteSpace:"nowrap"}}));const YRe=WRe,QX=M.createContext(!1),XRe=QX.Provider,ZRe=()=>M.useContext(QX);function JX({children:t,openDelay:e=0,closeDelay:n=0}){return H.createElement(XRe,{value:!0},H.createElement(PSe,{delay:{open:e,close:n}},t))}JX.displayName="@mantine/core/TooltipGroup";var qRe=Object.defineProperty,KRe=Object.defineProperties,QRe=Object.getOwnPropertyDescriptors,z5=Object.getOwnPropertySymbols,JRe=Object.prototype.hasOwnProperty,eAe=Object.prototype.propertyIsEnumerable,U5=(t,e,n)=>e in t?qRe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,B5=(t,e)=>{for(var n in e||(e={}))JRe.call(e,n)&&U5(t,n,e[n]);if(z5)for(var n of z5(e))eAe.call(e,n)&&U5(t,n,e[n]);return t},tAe=(t,e)=>KRe(t,QRe(e));function nAe(t,e){if(!e)return{backgroundColor:t.colorScheme==="dark"?t.colors.gray[2]:t.colors.gray[9],color:t.colorScheme==="dark"?t.black:t.white};const n=t.fn.variant({variant:"filled",color:e,primaryFallback:!1});return{backgroundColor:n.background,color:n.color}}var rAe=ft((t,{color:e,radius:n,width:r,multiline:i})=>({tooltip:tAe(B5(B5({},t.fn.fontStyles()),nAe(t,e)),{lineHeight:t.lineHeight,fontSize:t.fontSizes.sm,borderRadius:t.fn.radius(n),padding:`calc(${t.spacing.xs} / 2) ${t.spacing.xs}`,position:"absolute",whiteSpace:i?"unset":"nowrap",pointerEvents:"none",width:r}),arrow:{backgroundColor:"inherit",border:0,zIndex:1}}));const eZ=rAe,tZ={children:"Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported"};function iAe({offset:t,position:e}){const[n,r]=M.useState(!1),i=M.useRef(),{x:o,y:s,reference:a,floating:l,refs:c,update:u,placement:d}=yA({placement:e,middleware:[hA({crossAxis:!0,padding:5,rootBoundary:"document"})]}),f=d.includes("right")?t:e.includes("left")?t*-1:0,h=d.includes("bottom")?t:e.includes("top")?t*-1:0,g=M.useCallback(({clientX:y,clientY:_})=>{a({getBoundingClientRect(){return{width:0,height:0,x:y,y:_,left:y+f,top:_+h,right:y,bottom:_}}})},[a]);return M.useEffect(()=>{if(c.floating.current){const y=i.current;y.addEventListener("mousemove",g);const _=mc(c.floating.current);return _.forEach(v=>{v.addEventListener("scroll",u)}),()=>{y.removeEventListener("mousemove",g),_.forEach(v=>{v.removeEventListener("scroll",u)})}}},[a,c.floating.current,u,g,n]),{handleMouseMove:g,x:o,y:s,opened:n,setOpened:r,boundaryRef:i,floating:l}}var oAe=Object.defineProperty,sAe=Object.defineProperties,aAe=Object.getOwnPropertyDescriptors,u1=Object.getOwnPropertySymbols,nZ=Object.prototype.hasOwnProperty,rZ=Object.prototype.propertyIsEnumerable,H5=(t,e,n)=>e in t?oAe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Xy=(t,e)=>{for(var n in e||(e={}))nZ.call(e,n)&&H5(t,n,e[n]);if(u1)for(var n of u1(e))rZ.call(e,n)&&H5(t,n,e[n]);return t},Zy=(t,e)=>sAe(t,aAe(e)),lAe=(t,e)=>{var n={};for(var r in t)nZ.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&u1)for(var r of u1(t))e.indexOf(r)<0&&rZ.call(t,r)&&(n[r]=t[r]);return n};const cAe={refProp:"ref",withinPortal:!0,offset:10,position:"right",zIndex:Ys("popover")};function iZ(t){var e;const n=nt("TooltipFloating",cAe,t),{children:r,refProp:i,withinPortal:o,portalProps:s,style:a,className:l,classNames:c,styles:u,unstyled:d,radius:f,color:h,label:g,offset:y,position:_,multiline:v,width:x,zIndex:w,disabled:S,variant:E}=n,C=lAe(n,["children","refProp","withinPortal","portalProps","style","className","classNames","styles","unstyled","radius","color","label","offset","position","multiline","width","zIndex","disabled","variant"]),{handleMouseMove:O,x:R,y:T,opened:A,boundaryRef:F,floating:N,setOpened:U}=iAe({offset:y,position:_}),{classes:k,cx:z}=eZ({radius:f,color:h,multiline:v,width:x},{name:"TooltipFloating",classNames:c,styles:u,unstyled:d,variant:E});if(!Yg(r))throw new Error(tZ.children);const G=Da(F,r.ref),W=j=>{var $,q;(q=($=r.props).onMouseEnter)==null||q.call($,j),O(j),U(!0)},B=j=>{var $,q;(q=($=r.props).onMouseLeave)==null||q.call($,j),U(!1)};return H.createElement(H.Fragment,null,H.createElement(Kg,Zy(Xy({},s),{withinPortal:o}),H.createElement(Xe,Zy(Xy({},C),{ref:N,className:z(k.tooltip,l),style:Zy(Xy({},a),{zIndex:w,display:!S&&A?"block":"none",top:T??"",left:(e=Math.round(R))!=null?e:""})}),g)),M.cloneElement(r,Zy(Xy({},r.props),{[i]:G,onMouseEnter:W,onMouseLeave:B})))}iZ.displayName="@mantine/core/TooltipFloating";function uAe(t){const[e,n]=M.useState(!1),i=typeof t.opened=="boolean"?t.opened:e,o=ZRe(),s=zo(),{delay:a,currentId:l,setCurrentId:c}=J7(),u=M.useCallback(R=>{n(R),R&&c(s)},[c,s]),{x:d,y:f,reference:h,floating:g,context:y,refs:_,update:v,placement:x,middlewareData:{arrow:{x:w,y:S}={}}}=yA({placement:t.position,open:i,onOpenChange:u,middleware:[B7(t.offset),hA({padding:8}),z7(),X7({element:t.arrowRef,padding:t.arrowOffset}),...t.inline?[U7()]:[]]}),{getReferenceProps:E,getFloatingProps:C}=zSe([ESe(y,{enabled:t.events.hover,delay:o?a:{open:t.openDelay,close:t.closeDelay},mouseOnly:!t.events.touch}),NSe(y,{enabled:t.events.focus,keyboardOnly:!0}),FSe(y,{role:"tooltip"}),kSe(y,{enabled:typeof t.opened===void 0}),CSe(y,{id:s})]);return t9({opened:i,position:t.position,positionDependencies:t.positionDependencies,floating:{refs:_,update:v}}),Qr(()=>{var R;(R=t.onPositionChange)==null||R.call(t,x)},[x]),{x:d,y:f,arrowX:w,arrowY:S,reference:h,floating:g,getFloatingProps:C,getReferenceProps:E,isGroupPhase:i&&l&&l!==s,opened:i,placement:x}}var dAe=Object.defineProperty,fAe=Object.defineProperties,hAe=Object.getOwnPropertyDescriptors,d1=Object.getOwnPropertySymbols,oZ=Object.prototype.hasOwnProperty,sZ=Object.prototype.propertyIsEnumerable,V5=(t,e,n)=>e in t?dAe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,lu=(t,e)=>{for(var n in e||(e={}))oZ.call(e,n)&&V5(t,n,e[n]);if(d1)for(var n of d1(e))sZ.call(e,n)&&V5(t,n,e[n]);return t},FP=(t,e)=>fAe(t,hAe(e)),pAe=(t,e)=>{var n={};for(var r in t)oZ.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&d1)for(var r of d1(t))e.indexOf(r)<0&&sZ.call(t,r)&&(n[r]=t[r]);return n};const mAe={position:"top",refProp:"ref",withinPortal:!1,inline:!1,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:"side",offset:5,transitionProps:{duration:100,transition:"fade"},width:"auto",events:{hover:!0,focus:!1,touch:!1},zIndex:Ys("popover"),positionDependencies:[]},gb=M.forwardRef((t,e)=>{var n;const r=M.useRef(null),i=nt("Tooltip",mAe,t),{children:o,position:s,refProp:a,label:l,openDelay:c,closeDelay:u,onPositionChange:d,opened:f,withinPortal:h,portalProps:g,radius:y,color:_,classNames:v,styles:x,unstyled:w,style:S,className:E,withArrow:C,arrowSize:O,arrowOffset:R,arrowRadius:T,arrowPosition:A,offset:F,transitionProps:N,multiline:U,width:k,events:z,zIndex:G,disabled:W,positionDependencies:B,onClick:j,onMouseEnter:$,onMouseLeave:q,inline:K,variant:re,keepMounted:J}=i,le=pAe(i,["children","position","refProp","label","openDelay","closeDelay","onPositionChange","opened","withinPortal","portalProps","radius","color","classNames","styles","unstyled","style","className","withArrow","arrowSize","arrowOffset","arrowRadius","arrowPosition","offset","transitionProps","multiline","width","events","zIndex","disabled","positionDependencies","onClick","onMouseEnter","onMouseLeave","inline","variant","keepMounted"]),{classes:ae,cx:oe,theme:De}=eZ({radius:y,color:_,width:k,multiline:U},{name:"Tooltip",classNames:v,styles:x,unstyled:w,variant:re}),Te=uAe({position:f9(De.dir,s),closeDelay:u,openDelay:c,onPositionChange:d,opened:f,events:z,arrowRef:r,arrowOffset:R,offset:F+(C?O/2:0),positionDependencies:[...B,o],inline:K});if(!Yg(o))throw new Error(tZ.children);const ve=Da(Te.reference,o.ref,e);return H.createElement(H.Fragment,null,H.createElement(Kg,FP(lu({},g),{withinPortal:h}),H.createElement(zc,FP(lu({keepMounted:J,mounted:!W&&Te.opened},N),{transition:N.transition||"fade",duration:Te.isGroupPhase?10:(n=N.duration)!=null?n:100}),we=>{var me,se;return H.createElement(Xe,lu(lu({},le),Te.getFloatingProps({ref:Te.floating,className:ae.tooltip,style:FP(lu(lu({},S),we),{zIndex:G,top:(me=Te.y)!=null?me:0,left:(se=Te.x)!=null?se:0})})),l,H.createElement(xA,{ref:r,arrowX:Te.arrowX,arrowY:Te.arrowY,visible:C,position:Te.placement,arrowSize:O,arrowOffset:R,arrowRadius:T,arrowPosition:A,className:ae.arrow}))})),M.cloneElement(o,Te.getReferenceProps(lu({onClick:j,onMouseEnter:$,onMouseLeave:q,onMouseMove:t.onMouseMove,onPointerDown:t.onPointerDown,onPointerEnter:t.onPointerEnter,[a]:ve,className:oe(E,o.props.className)},o.props))))});gb.Group=JX;gb.Floating=iZ;gb.displayName="@mantine/core/Tooltip";const tr=gb;var gAe=Object.defineProperty,vAe=Object.defineProperties,yAe=Object.getOwnPropertyDescriptors,f1=Object.getOwnPropertySymbols,aZ=Object.prototype.hasOwnProperty,lZ=Object.prototype.propertyIsEnumerable,j5=(t,e,n)=>e in t?gAe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,PT=(t,e)=>{for(var n in e||(e={}))aZ.call(e,n)&&j5(t,n,e[n]);if(f1)for(var n of f1(e))lZ.call(e,n)&&j5(t,n,e[n]);return t},cZ=(t,e)=>vAe(t,yAe(e)),$5=(t,e)=>{var n={};for(var r in t)aZ.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&f1)for(var r of f1(t))e.indexOf(r)<0&&lZ.call(t,r)&&(n[r]=t[r]);return n};function _Ae(t){return t.reduce((e,n)=>(e.sections.push(cZ(PT({},n),{accumulated:e.accumulated})),e.accumulated+=n.value,e),{accumulated:0,sections:[]}).sections}const xAe={size:"md",radius:"sm",striped:!1,animate:!1,label:""},uZ=M.forwardRef((t,e)=>{const n=nt("Progress",xAe,t),{className:r,value:i,color:o,size:s,radius:a,striped:l,animate:c,label:u,"aria-label":d,classNames:f,styles:h,sections:g,unstyled:y,variant:_}=n,v=$5(n,["className","value","color","size","radius","striped","animate","label","aria-label","classNames","styles","sections","unstyled","variant"]),{classes:x,cx:w,theme:S}=YRe({color:o,radius:a},{name:"Progress",classNames:f,styles:h,unstyled:y,variant:_,size:s}),E=Array.isArray(g)?_Ae(g).map((C,O)=>{var R=C,{tooltip:T,accumulated:A,value:F,label:N,color:U}=R,k=$5(R,["tooltip","accumulated","value","label","color"]);return H.createElement(tr.Floating,{label:T,disabled:!T,key:O},H.createElement(Xe,cZ(PT({},k),{className:w(x.bar,k.className),"data-striped":l||c||void 0,"data-animate":c||void 0,sx:{width:`${F}%`,left:`${A}%`,backgroundColor:S.fn.variant({variant:"filled",primaryFallback:!1,color:U||S.primaryColor}).background}}),N&&H.createElement(Si,{className:x.label},N)))}):null;return H.createElement(Xe,PT({className:w(x.root,r),ref:e},v),E||H.createElement("div",{role:"progressbar","aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":i,"aria-label":d,className:x.bar,style:{width:`${i}%`},"data-striped":l||c||void 0,"data-animate":c||void 0},u?H.createElement(Si,{className:x.label},u):""))});uZ.displayName="@mantine/core/Progress";var wAe=Object.defineProperty,G5=Object.getOwnPropertySymbols,SAe=Object.prototype.hasOwnProperty,bAe=Object.prototype.propertyIsEnumerable,W5=(t,e,n)=>e in t?wAe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,MAe=(t,e)=>{for(var n in e||(e={}))SAe.call(e,n)&&W5(t,n,e[n]);if(G5)for(var n of G5(e))bAe.call(e,n)&&W5(t,n,e[n]);return t};function EAe(t){return H.createElement("svg",MAe({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 5 5"},t),H.createElement("path",{fill:"currentColor",d:"M0 2.5a2.5 2.5 0 115 0 2.5 2.5 0 01-5 0z"}))}const dZ=M.createContext(null),PAe=dZ.Provider,CAe=()=>M.useContext(dZ);var TAe=Object.defineProperty,h1=Object.getOwnPropertySymbols,fZ=Object.prototype.hasOwnProperty,hZ=Object.prototype.propertyIsEnumerable,Y5=(t,e,n)=>e in t?TAe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,X5=(t,e)=>{for(var n in e||(e={}))fZ.call(e,n)&&Y5(t,n,e[n]);if(h1)for(var n of h1(e))hZ.call(e,n)&&Y5(t,n,e[n]);return t},OAe=(t,e)=>{var n={};for(var r in t)fZ.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&h1)for(var r of h1(t))e.indexOf(r)<0&&hZ.call(t,r)&&(n[r]=t[r]);return n};const RAe={size:"sm"},pZ=M.forwardRef((t,e)=>{const n=nt("RadioGroup",RAe,t),{children:r,value:i,defaultValue:o,onChange:s,size:a,wrapperProps:l,unstyled:c,name:u}=n,d=OAe(n,["children","value","defaultValue","onChange","size","wrapperProps","unstyled","name"]),f=zo(u),[h,g]=Ar({value:i,defaultValue:o,finalValue:"",onChange:s}),y=_=>g(_.currentTarget.value);return H.createElement(PAe,{value:{value:h,onChange:y,size:a,name:f}},H.createElement(Ki.Wrapper,X5(X5({labelElement:"div",size:a,__staticSelector:"RadioGroup",ref:e,unstyled:c},l),d),r))});pZ.displayName="@mantine/core/RadioGroup";var AAe=Object.defineProperty,DAe=Object.defineProperties,IAe=Object.getOwnPropertyDescriptors,Z5=Object.getOwnPropertySymbols,LAe=Object.prototype.hasOwnProperty,kAe=Object.prototype.propertyIsEnumerable,q5=(t,e,n)=>e in t?AAe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,NAe=(t,e)=>{for(var n in e||(e={}))LAe.call(e,n)&&q5(t,n,e[n]);if(Z5)for(var n of Z5(e))kAe.call(e,n)&&q5(t,n,e[n]);return t},FAe=(t,e)=>DAe(t,IAe(e));const zP={xs:X(16),sm:X(20),md:X(24),lg:X(30),xl:X(36)},qy={xs:X(6),sm:X(8),md:X(10),lg:X(14),xl:X(16)};var zAe=ft((t,{color:e,transitionDuration:n,labelPosition:r,error:i},{size:o})=>{const s=t.fn.variant({variant:"filled",color:e}),a=t.fn.variant({variant:"filled",color:"red"}).background;return{inner:{order:r==="left"?2:1,position:"relative",alignSelf:"flex-start"},icon:{ref:Ur("icon"),color:t.white,opacity:0,transform:`scale(0.75) translateY(${X(2)})`,transition:`opacity ${n}ms ${t.transitionTimingFunction}`,pointerEvents:"none",width:Oe({sizes:qy,size:o}),height:Oe({sizes:qy,size:o}),position:"absolute",top:`calc(50% - ${Oe({sizes:qy,size:o})} / 2)`,left:`calc(50% - ${Oe({sizes:qy,size:o})} / 2)`},radio:FAe(NAe({},t.fn.focusStyles()),{backgroundColor:t.colorScheme==="dark"?t.colors.dark[6]:t.white,border:`${X(1)} solid ${i?a:t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[4]}`,position:"relative",appearance:"none",width:Oe({sizes:zP,size:o}),height:Oe({sizes:zP,size:o}),borderRadius:Oe({sizes:zP,size:o}),margin:0,display:"flex",alignItems:"center",justifyContent:"center",transitionProperty:"background-color, border-color",transitionTimingFunction:t.transitionTimingFunction,transitionDuration:`${n}ms`,cursor:t.cursorType,"&:checked":{background:s.background,borderColor:s.background,[`& + .${Ur("icon")}`]:{opacity:1,transform:"scale(1)"}},"&:disabled":{borderColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[4],backgroundColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[1],[`& + .${Ur("icon")}`]:{color:t.colorScheme==="dark"?t.colors.dark[6]:t.colors.gray[4]}}})}});const UAe=zAe;var BAe=Object.defineProperty,p1=Object.getOwnPropertySymbols,mZ=Object.prototype.hasOwnProperty,gZ=Object.prototype.propertyIsEnumerable,K5=(t,e,n)=>e in t?BAe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ky=(t,e)=>{for(var n in e||(e={}))mZ.call(e,n)&&K5(t,n,e[n]);if(p1)for(var n of p1(e))gZ.call(e,n)&&K5(t,n,e[n]);return t},HAe=(t,e)=>{var n={};for(var r in t)mZ.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&p1)for(var r of p1(t))e.indexOf(r)<0&&gZ.call(t,r)&&(n[r]=t[r]);return n};const VAe={icon:EAe,transitionDuration:100,size:"sm",labelPosition:"right"},OA=M.forwardRef((t,e)=>{var n,r;const i=nt("Radio",VAe,t),{className:o,style:s,id:a,label:l,size:c,title:u,disabled:d,color:f,classNames:h,styles:g,sx:y,icon:_,transitionDuration:v,wrapperProps:x,unstyled:w,labelPosition:S,description:E,error:C,variant:O}=i,R=HAe(i,["className","style","id","label","size","title","disabled","color","classNames","styles","sx","icon","transitionDuration","wrapperProps","unstyled","labelPosition","description","error","variant"]),T=CAe(),A=(n=T?.size)!=null?n:c,F=t.size?c:A,{classes:N}=UAe({color:f,transitionDuration:v,labelPosition:S,error:!!C},{name:"Radio",classNames:h,styles:g,unstyled:w,variant:O,size:F}),{systemStyles:U,rest:k}=Sl(R),z=zo(a),G=T?{checked:T.value===k.value,name:(r=k.name)!=null?r:T.name,onChange:T.onChange}:{};return H.createElement(pb,Ky(Ky({className:o,sx:y,style:s,id:z,size:F,labelPosition:S,label:l,description:E,error:C,disabled:d,__staticSelector:"Radio",classNames:h,styles:g,unstyled:w,"data-checked":G.checked||void 0,variant:O},U),x),H.createElement("div",{className:N.inner},H.createElement("input",Ky(Ky({ref:e,className:N.radio,type:"radio",id:z,disabled:d},k),G)),H.createElement(_,{className:N.icon,"aria-hidden":!0})))});OA.displayName="@mantine/core/Radio";OA.Group=pZ;function jAe({data:t,searchable:e,limit:n,searchValue:r,filter:i,value:o,filterDataOnExactSearchMatch:s}){if(!e)return t;const a=o!=null&&t.find(c=>c.value===o)||null;if(a&&!s&&a?.label===r){if(n){if(n>=t.length)return t;const c=t.indexOf(a),u=c+n,d=u-t.length;return d>0?t.slice(c-d):t.slice(c,u)}return t}const l=[];for(let c=0;c=n));c+=1);return l}var $Ae=ft(()=>({input:{"&:not(:disabled)":{cursor:"pointer","&::selection":{backgroundColor:"transparent"}}}}));const GAe=$Ae;var WAe=Object.defineProperty,YAe=Object.defineProperties,XAe=Object.getOwnPropertyDescriptors,m1=Object.getOwnPropertySymbols,vZ=Object.prototype.hasOwnProperty,yZ=Object.prototype.propertyIsEnumerable,Q5=(t,e,n)=>e in t?WAe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Vp=(t,e)=>{for(var n in e||(e={}))vZ.call(e,n)&&Q5(t,n,e[n]);if(m1)for(var n of m1(e))yZ.call(e,n)&&Q5(t,n,e[n]);return t},UP=(t,e)=>YAe(t,XAe(e)),ZAe=(t,e)=>{var n={};for(var r in t)vZ.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&m1)for(var r of m1(t))e.indexOf(r)<0&&yZ.call(t,r)&&(n[r]=t[r]);return n};function qAe(t,e){return e.label.toLowerCase().trim().includes(t.toLowerCase().trim())}function KAe(t,e){return!!t&&!e.some(n=>n.label.toLowerCase()===t.toLowerCase())}const QAe={required:!1,size:"sm",shadow:"sm",itemComponent:lA,transitionProps:{transition:"fade",duration:0},initiallyOpened:!1,filter:qAe,maxDropdownHeight:220,searchable:!1,clearable:!1,limit:1/0,disabled:!1,creatable:!1,shouldCreate:KAe,selectOnBlur:!1,switchDirectionOnFlip:!1,filterDataOnExactSearchMatch:!1,zIndex:Ys("popover"),positionDependencies:[],dropdownPosition:"flip"},iv=M.forwardRef((t,e)=>{const n=hb("Select",QAe,t),{inputProps:r,wrapperProps:i,shadow:o,data:s,value:a,defaultValue:l,onChange:c,itemComponent:u,onKeyDown:d,onBlur:f,onFocus:h,transitionProps:g,initiallyOpened:y,unstyled:_,classNames:v,styles:x,filter:w,maxDropdownHeight:S,searchable:E,clearable:C,nothingFound:O,limit:R,disabled:T,onSearchChange:A,searchValue:F,rightSection:N,rightSectionWidth:U,creatable:k,getCreateLabel:z,shouldCreate:G,selectOnBlur:W,onCreate:B,dropdownComponent:j,onDropdownClose:$,onDropdownOpen:q,withinPortal:K,portalProps:re,switchDirectionOnFlip:J,zIndex:le,name:ae,dropdownPosition:oe,allowDeselect:De,placeholder:Te,filterDataOnExactSearchMatch:ve,form:we,positionDependencies:me,readOnly:se,clearButtonProps:de,hoverOnSearchChange:ke}=n,Ve=ZAe(n,["inputProps","wrapperProps","shadow","data","value","defaultValue","onChange","itemComponent","onKeyDown","onBlur","onFocus","transitionProps","initiallyOpened","unstyled","classNames","styles","filter","maxDropdownHeight","searchable","clearable","nothingFound","limit","disabled","onSearchChange","searchValue","rightSection","rightSectionWidth","creatable","getCreateLabel","shouldCreate","selectOnBlur","onCreate","dropdownComponent","onDropdownClose","onDropdownOpen","withinPortal","portalProps","switchDirectionOnFlip","zIndex","name","dropdownPosition","allowDeselect","placeholder","filterDataOnExactSearchMatch","form","positionDependencies","readOnly","clearButtonProps","hoverOnSearchChange"]),{classes:Ze,cx:ot,theme:dt}=GAe(),[We,ht]=M.useState(y),[ee,Q]=M.useState(-1),Pe=M.useRef(),$e=M.useRef({}),[Ge,Ke]=M.useState("column"),gt=Ge==="column",{scrollIntoView:ut,targetRef:Ae,scrollableRef:vt}=oW({duration:0,offset:5,cancelable:!1,isList:!0}),xt=De===void 0?C:De,ct=ce=>{if(We!==ce){ht(ce);const L=ce?q:$;typeof L=="function"&&L()}},Ie=k&&typeof z=="function";let Ye=null;const Tt=s.map(ce=>typeof ce=="string"?{label:ce,value:ce}:ce),Lt=_G({data:Tt}),[Rt,he,ue]=Ar({value:a,defaultValue:l,finalValue:null,onChange:c}),He=Lt.find(ce=>ce.value===Rt),[st,wt]=Ar({value:F,defaultValue:He?.label||"",finalValue:void 0,onChange:A}),Bt=ce=>{wt(ce),E&&typeof A=="function"&&A(ce)},Yt=()=>{var ce;se||(he(null),ue||Bt(""),(ce=Pe.current)==null||ce.focus())};M.useEffect(()=>{const ce=Lt.find(L=>L.value===Rt);ce?Bt(ce.label):(!Ie||!Rt)&&Bt("")},[Rt]),M.useEffect(()=>{He&&(!E||!We)&&Bt(He.label)},[He?.label]);const jn=ce=>{if(!se)if(xt&&He?.value===ce.value)he(null),ct(!1);else{if(ce.creatable&&typeof B=="function"){const L=B(ce.value);typeof L<"u"&&L!==null&&he(typeof L=="string"?L:L.value)}else he(ce.value);ue||Bt(ce.label),Q(-1),ct(!1),Pe.current.focus()}},Nt=jAe({data:Lt,searchable:E,limit:R,searchValue:st,filter:w,filterDataOnExactSearchMatch:ve,value:Rt});Ie&&G(st,Nt)&&(Ye=z(st),Nt.push({label:st,value:st,creatable:!0}));const xn=(ce,L,Y)=>{let ne=ce;for(;Y(ne);)if(ne=L(ne),!Nt[ne].disabled)return ne;return ce};Qr(()=>{Q(ke&&st?0:-1)},[st,ke]);const Ft=Rt?Nt.findIndex(ce=>ce.value===Rt):0,kt=!se&&(Nt.length>0?We:We&&!!O),fn=()=>{Q(ce=>{var L;const Y=xn(ce,ne=>ne-1,ne=>ne>0);return Ae.current=$e.current[(L=Nt[Y])==null?void 0:L.value],kt&&ut({alignment:gt?"start":"end"}),Y})},In=()=>{Q(ce=>{var L;const Y=xn(ce,ne=>ne+1,ne=>newindow.setTimeout(()=>{var ce;Ae.current=$e.current[(ce=Nt[Ft])==null?void 0:ce.value],ut({alignment:gt?"end":"start"})},50);Qr(()=>{kt&&Fn()},[kt]);const Lr=ce=>{switch(typeof d=="function"&&d(ce),ce.key){case"ArrowUp":{ce.preventDefault(),We?gt?fn():In():(Q(Ft),ct(!0),Fn());break}case"ArrowDown":{ce.preventDefault(),We?gt?In():fn():(Q(Ft),ct(!0),Fn());break}case"Home":{if(!E){ce.preventDefault(),We||ct(!0);const L=Nt.findIndex(Y=>!Y.disabled);Q(L),kt&&ut({alignment:gt?"end":"start"})}break}case"End":{if(!E){ce.preventDefault(),We||ct(!0);const L=Nt.map(Y=>!!Y.disabled).lastIndexOf(!1);Q(L),kt&&ut({alignment:gt?"end":"start"})}break}case"Escape":{ce.preventDefault(),ct(!1),Q(-1);break}case" ":{E||(ce.preventDefault(),Nt[ee]&&We?jn(Nt[ee]):(ct(!0),Q(Ft),Fn()));break}case"Enter":E||ce.preventDefault(),Nt[ee]&&We&&(ce.preventDefault(),jn(Nt[ee]))}},ti=ce=>{typeof f=="function"&&f(ce);const L=Lt.find(Y=>Y.value===Rt);W&&Nt[ee]&&We&&jn(Nt[ee]),Bt(L?.label||""),ct(!1)},te=ce=>{typeof h=="function"&&h(ce),E&&ct(!0)},pe=ce=>{se||(Bt(ce.currentTarget.value),C&&ce.currentTarget.value===""&&he(null),Q(-1),ct(!0))},Ne=()=>{se||(ct(!We),Rt&&!We&&Q(Ft))};return H.createElement(Ki.Wrapper,UP(Vp({},i),{__staticSelector:"Select"}),H.createElement(gc,{opened:kt,transitionProps:g,shadow:o,withinPortal:K,portalProps:re,__staticSelector:"Select",onDirectionChange:Ke,switchDirectionOnFlip:J,zIndex:le,dropdownPosition:oe,positionDependencies:[...me,st],classNames:v,styles:x,unstyled:_,variant:r.variant},H.createElement(gc.Target,null,H.createElement("div",{role:"combobox","aria-haspopup":"listbox","aria-owns":kt?`${r.id}-items`:null,"aria-controls":r.id,"aria-expanded":kt,onMouseLeave:()=>Q(-1),tabIndex:-1},H.createElement("input",{type:"hidden",name:ae,value:Rt||"",form:we,disabled:T}),H.createElement(Ki,Vp(UP(Vp(Vp({autoComplete:"off",type:"search"},r),Ve),{ref:Da(e,Pe),onKeyDown:Lr,__staticSelector:"Select",value:st,placeholder:Te,onChange:pe,"aria-autocomplete":"list","aria-controls":kt?`${r.id}-items`:null,"aria-activedescendant":ee>=0?`${r.id}-${ee}`:null,onMouseDown:Ne,onBlur:ti,onFocus:te,readOnly:!E||se,disabled:T,"data-mantine-stop-propagation":kt,name:null,classNames:UP(Vp({},v),{input:ot({[Ze.input]:!E},v?.input)})}),jX({theme:dt,rightSection:N,rightSectionWidth:U,styles:x,size:r.size,shouldClear:C&&!!He,onClear:Yt,error:i.error,clearButtonProps:de,disabled:T,readOnly:se}))))),H.createElement(gc.Dropdown,{component:j||ub,maxHeight:S,direction:Ge,id:r.id,innerRef:vt,__staticSelector:"Select",classNames:v,styles:x},H.createElement(aA,{data:Nt,hovered:ee,classNames:v,styles:x,isItemSelected:ce=>ce===Rt,uuid:r.id,__staticSelector:"Select",onItemHover:Q,onItemSelect:jn,itemsRefs:$e,itemComponent:u,size:r.size,nothingFound:O,creatable:Ie&&!!Ye,createLabel:Ye,"aria-label":i.label,unstyled:_,variant:r.variant}))))});iv.displayName="@mantine/core/Select";var JAe=Object.defineProperty,eDe=Object.defineProperties,tDe=Object.getOwnPropertyDescriptors,J5=Object.getOwnPropertySymbols,nDe=Object.prototype.hasOwnProperty,rDe=Object.prototype.propertyIsEnumerable,eB=(t,e,n)=>e in t?JAe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,tB=(t,e)=>{for(var n in e||(e={}))nDe.call(e,n)&&eB(t,n,e[n]);if(J5)for(var n of J5(e))rDe.call(e,n)&&eB(t,n,e[n]);return t},nB=(t,e)=>eDe(t,tDe(e));const iDe=nA({"from, to":{opacity:.4},"50%":{opacity:1}});var oDe=ft((t,{height:e,width:n,radius:r,circle:i,animate:o})=>({root:{height:X(e),width:X(i?e:n),borderRadius:i?X(e):t.fn.radius(r),position:"relative",WebkitTransform:"translateZ(0)"},visible:{overflow:"hidden","&::before":nB(tB({},t.fn.cover(0)),{content:'""',background:t.colorScheme==="dark"?t.colors.dark[7]:t.white,zIndex:10}),"&::after":nB(tB({},t.fn.cover(0)),{content:'""',background:t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[3],animation:o?`${iDe} 1500ms linear infinite`:"none",zIndex:11})}}));const sDe=oDe;var aDe=Object.defineProperty,g1=Object.getOwnPropertySymbols,_Z=Object.prototype.hasOwnProperty,xZ=Object.prototype.propertyIsEnumerable,rB=(t,e,n)=>e in t?aDe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,lDe=(t,e)=>{for(var n in e||(e={}))_Z.call(e,n)&&rB(t,n,e[n]);if(g1)for(var n of g1(e))xZ.call(e,n)&&rB(t,n,e[n]);return t},cDe=(t,e)=>{var n={};for(var r in t)_Z.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&g1)for(var r of g1(t))e.indexOf(r)<0&&xZ.call(t,r)&&(n[r]=t[r]);return n};const uDe={height:"auto",width:"100%",visible:!0,animate:!0},wZ=M.forwardRef((t,e)=>{const n=nt("Skeleton",uDe,t),{height:r,width:i,visible:o,animate:s,className:a,circle:l,radius:c,unstyled:u,variant:d}=n,f=cDe(n,["height","width","visible","animate","className","circle","radius","unstyled","variant"]),{classes:h,cx:g}=sDe({height:r,width:i,circle:l,radius:c,animate:s},{name:"Skeleton",unstyled:u,variant:d});return H.createElement(Xe,lDe({className:g(h.root,{[h.visible]:o},a),ref:e},f))});wZ.displayName="@mantine/core/Skeleton";function SZ({value:t,min:e,max:n}){const r=(t-e)/(n-e)*100;return Math.min(Math.max(r,0),100)}function dDe({value:t,containerWidth:e,min:n,max:r,step:i,precision:o}){const a=(e?Math.min(Math.max(t,0),e)/e:t)*(r-n),l=(a!==0?Math.round(a/i)*i:0)+n,c=Math.max(l,n);return o!==void 0?Number(c.toFixed(o)):c}var fDe=Object.defineProperty,hDe=Object.defineProperties,pDe=Object.getOwnPropertyDescriptors,iB=Object.getOwnPropertySymbols,mDe=Object.prototype.hasOwnProperty,gDe=Object.prototype.propertyIsEnumerable,oB=(t,e,n)=>e in t?fDe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,vDe=(t,e)=>{for(var n in e||(e={}))mDe.call(e,n)&&oB(t,n,e[n]);if(iB)for(var n of iB(e))gDe.call(e,n)&&oB(t,n,e[n]);return t},yDe=(t,e)=>hDe(t,pDe(e));const Li={xs:X(4),sm:X(6),md:X(8),lg:X(10),xl:X(12)};var _De=ft(t=>({root:yDe(vDe({},t.fn.fontStyles()),{WebkitTapHighlightColor:"transparent",outline:0,display:"flex",flexDirection:"column",alignItems:"center",touchAction:"none",position:"relative"})}));const xDe=_De;var wDe=Object.defineProperty,SDe=Object.defineProperties,bDe=Object.getOwnPropertyDescriptors,sB=Object.getOwnPropertySymbols,MDe=Object.prototype.hasOwnProperty,EDe=Object.prototype.propertyIsEnumerable,aB=(t,e,n)=>e in t?wDe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,PDe=(t,e)=>{for(var n in e||(e={}))MDe.call(e,n)&&aB(t,n,e[n]);if(sB)for(var n of sB(e))EDe.call(e,n)&&aB(t,n,e[n]);return t},CDe=(t,e)=>SDe(t,bDe(e)),TDe=ft((t,{color:e,disabled:n,thumbSize:r},{size:i})=>({label:{position:"absolute",top:X(-36),backgroundColor:t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[9],fontSize:t.fontSizes.xs,color:t.white,padding:`calc(${t.spacing.xs} / 2)`,borderRadius:t.radius.sm,whiteSpace:"nowrap",pointerEvents:"none",userSelect:"none",touchAction:"none"},thumb:CDe(PDe({},t.fn.focusStyles()),{boxSizing:"border-box",position:"absolute",display:n?"none":"flex",height:r?X(r):`calc(${Oe({sizes:Li,size:i})} * 2)`,width:r?X(r):`calc(${Oe({sizes:Li,size:i})} * 2)`,backgroundColor:t.colorScheme==="dark"?t.fn.themeColor(e,t.fn.primaryShade()):t.white,border:`${X(4)} solid ${t.colorScheme==="dark"?t.white:t.fn.themeColor(e,t.fn.primaryShade())}`,color:t.colorScheme==="dark"?t.white:t.fn.themeColor(e,t.fn.primaryShade()),transform:"translate(-50%, -50%)",top:"50%",cursor:"pointer",borderRadius:1e3,alignItems:"center",justifyContent:"center",transitionDuration:"100ms",transitionProperty:"box-shadow, transform",transitionTimingFunction:t.transitionTimingFunction,zIndex:3,userSelect:"none",touchAction:"none"}),dragging:{transform:"translate(-50%, -50%) scale(1.05)",boxShadow:t.shadows.sm}}));const ODe=TDe,bZ=M.forwardRef(({max:t,min:e,value:n,position:r,label:i,dragging:o,onMouseDown:s,onKeyDownCapture:a,color:l,classNames:c,styles:u,size:d,labelTransition:f,labelTransitionDuration:h,labelTransitionTimingFunction:g,labelAlwaysOn:y,thumbLabel:_,onFocus:v,onBlur:x,showLabelOnHover:w,isHovered:S,children:E=null,disabled:C,unstyled:O,thumbSize:R,variant:T},A)=>{const{classes:F,cx:N,theme:U}=ODe({color:l,disabled:C,thumbSize:R},{name:"Slider",classNames:c,styles:u,unstyled:O,variant:T,size:d}),[k,z]=M.useState(!1),G=y||o||k||w&&S;return H.createElement(Xe,{tabIndex:0,role:"slider","aria-label":_,"aria-valuemax":t,"aria-valuemin":e,"aria-valuenow":n,ref:A,className:N(F.thumb,{[F.dragging]:o}),onFocus:()=>{z(!0),typeof v=="function"&&v()},onBlur:()=>{z(!1),typeof x=="function"&&x()},onTouchStart:s,onMouseDown:s,onKeyDownCapture:a,onClick:W=>W.stopPropagation(),style:{[U.dir==="rtl"?"right":"left"]:`${r}%`}},E,H.createElement(zc,{mounted:i!=null&&G,duration:h,transition:f,timingFunction:g||U.transitionTimingFunction},W=>H.createElement("div",{style:W,className:F.label},i)))});bZ.displayName="@mantine/core/SliderThumb";function RDe({mark:t,offset:e,value:n,inverted:r=!1}){return r?typeof e=="number"&&t.value<=e||t.value>=n:typeof e=="number"?t.value>=e&&t.value<=n:t.value<=n}var ADe=ft((t,{color:e,disabled:n,thumbSize:r},{size:i})=>({marksContainer:{position:"absolute",right:r?X(r/2):Oe({sizes:Li,size:i}),left:r?X(r/2):Oe({sizes:Li,size:i}),"&:has(~ input:disabled)":{"& .mantine-Slider-markFilled":{border:`${X(2)} solid ${t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[2]}`,borderColor:t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[4]}}},markWrapper:{position:"absolute",top:`calc(${X(Oe({sizes:Li,size:i}))} / 2)`,zIndex:2,height:0},mark:{boxSizing:"border-box",border:`${X(2)} solid ${t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[2]}`,height:Oe({sizes:Li,size:i}),width:Oe({sizes:Li,size:i}),borderRadius:1e3,transform:`translateX(calc(-${Oe({sizes:Li,size:i})} / 2))`,backgroundColor:t.white,pointerEvents:"none"},markFilled:{borderColor:n?t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[4]:t.fn.variant({variant:"filled",color:e}).background},markLabel:{transform:`translate(-50%, calc(${t.spacing.xs} / 2))`,fontSize:t.fontSizes.sm,color:t.colorScheme==="dark"?t.colors.dark[2]:t.colors.gray[6],whiteSpace:"nowrap",cursor:"pointer",userSelect:"none"}}));const DDe=ADe;function MZ({marks:t,color:e,size:n,thumbSize:r,min:i,max:o,value:s,classNames:a,styles:l,offset:c,onChange:u,disabled:d,unstyled:f,inverted:h,variant:g}){const{classes:y,cx:_}=DDe({color:e,disabled:d,thumbSize:r},{name:"Slider",classNames:a,styles:l,unstyled:f,variant:g,size:n}),v=t.map((x,w)=>H.createElement(Xe,{className:y.markWrapper,sx:{left:`${SZ({value:x.value,min:i,max:o})}%`},key:w},H.createElement("div",{className:_(y.mark,{[y.markFilled]:RDe({mark:x,value:s,offset:c,inverted:h})})}),x.label&&H.createElement("div",{className:y.markLabel,onMouseDown:S=>{S.stopPropagation(),!d&&u(x.value)},onTouchStart:S=>{S.stopPropagation(),!d&&u(x.value)}},x.label)));return H.createElement("div",{className:y.marksContainer},v)}MZ.displayName="@mantine/core/SliderMarks";var IDe=ft((t,{radius:e,color:n,disabled:r,inverted:i,thumbSize:o},{size:s})=>({trackContainer:{display:"flex",alignItems:"center",width:"100%",height:`calc(${Oe({sizes:Li,size:s})} * 2)`,cursor:"pointer","&:has(~ input:disabled)":{"&":{pointerEvents:"none"},"& .mantine-Slider-thumb":{display:"none"},"& .mantine-Slider-track::before":{content:'""',backgroundColor:i?t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[4]:t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[2]},"& .mantine-Slider-bar":{backgroundColor:i?t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[2]:t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[4]}}},track:{position:"relative",height:Oe({sizes:Li,size:s}),width:"100%",marginRight:o?X(o/2):Oe({size:s,sizes:Li}),marginLeft:o?X(o/2):Oe({size:s,sizes:Li}),"&::before":{content:'""',position:"absolute",top:0,bottom:0,borderRadius:t.fn.radius(e),right:`calc(${o?X(o/2):Oe({size:s,sizes:Li})} * -1)`,left:`calc(${o?X(o/2):Oe({size:s,sizes:Li})} * -1)`,backgroundColor:i?r?t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[4]:t.fn.variant({variant:"filled",color:n}).background:t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[2],zIndex:0}},bar:{position:"absolute",zIndex:1,top:0,bottom:0,backgroundColor:i?t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[2]:r?t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[4]:t.fn.variant({variant:"filled",color:n}).background,borderRadius:t.fn.radius(e)}}));const LDe=IDe;var kDe=Object.defineProperty,NDe=Object.defineProperties,FDe=Object.getOwnPropertyDescriptors,v1=Object.getOwnPropertySymbols,EZ=Object.prototype.hasOwnProperty,PZ=Object.prototype.propertyIsEnumerable,lB=(t,e,n)=>e in t?kDe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,cB=(t,e)=>{for(var n in e||(e={}))EZ.call(e,n)&&lB(t,n,e[n]);if(v1)for(var n of v1(e))PZ.call(e,n)&&lB(t,n,e[n]);return t},zDe=(t,e)=>NDe(t,FDe(e)),UDe=(t,e)=>{var n={};for(var r in t)EZ.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&v1)for(var r of v1(t))e.indexOf(r)<0&&PZ.call(t,r)&&(n[r]=t[r]);return n};function CZ(t){var e=t,{filled:n,size:r,thumbSize:i,color:o,classNames:s,styles:a,radius:l,children:c,offset:u,disabled:d,marksOffset:f,unstyled:h,inverted:g,variant:y,containerProps:_}=e,v=UDe(e,["filled","size","thumbSize","color","classNames","styles","radius","children","offset","disabled","marksOffset","unstyled","inverted","variant","containerProps"]);const{classes:x}=LDe({color:o,radius:l,disabled:d,inverted:g,thumbSize:i},{name:"Slider",classNames:s,styles:a,unstyled:h,variant:y,size:r});return H.createElement(H.Fragment,null,H.createElement("div",cB({className:x.trackContainer},_),H.createElement("div",{className:x.track},H.createElement(Xe,{className:x.bar,sx:{left:`calc(${u}% - ${i?X(i/2):Oe({size:r,sizes:Li})})`,width:`calc(${n}% + 2 * ${i?X(i/2):Oe({size:r,sizes:Li})})`}}),c)),H.createElement(MZ,zDe(cB({},v),{size:r,thumbSize:i,color:o,offset:f,classNames:s,styles:a,disabled:d,unstyled:h,inverted:g,variant:y})))}CZ.displayName="@mantine/core/SliderTrack";var BDe=Object.defineProperty,HDe=Object.defineProperties,VDe=Object.getOwnPropertyDescriptors,y1=Object.getOwnPropertySymbols,TZ=Object.prototype.hasOwnProperty,OZ=Object.prototype.propertyIsEnumerable,uB=(t,e,n)=>e in t?BDe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,jDe=(t,e)=>{for(var n in e||(e={}))TZ.call(e,n)&&uB(t,n,e[n]);if(y1)for(var n of y1(e))OZ.call(e,n)&&uB(t,n,e[n]);return t},$De=(t,e)=>HDe(t,VDe(e)),GDe=(t,e)=>{var n={};for(var r in t)TZ.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&y1)for(var r of y1(t))e.indexOf(r)<0&&OZ.call(t,r)&&(n[r]=t[r]);return n};const RZ=M.forwardRef((t,e)=>{var n=t,{className:r,size:i,classNames:o,styles:s,disabled:a,unstyled:l,variant:c}=n,u=GDe(n,["className","size","classNames","styles","disabled","unstyled","variant"]);const{classes:d,cx:f}=xDe(null,{name:"Slider",classNames:o,styles:s,unstyled:l,variant:c,size:i});return H.createElement(Xe,$De(jDe({},u),{tabIndex:-1,className:f(d.root,r),ref:e}))});RZ.displayName="@mantine/core/SliderRoot";var WDe=Object.defineProperty,YDe=Object.defineProperties,XDe=Object.getOwnPropertyDescriptors,_1=Object.getOwnPropertySymbols,AZ=Object.prototype.hasOwnProperty,DZ=Object.prototype.propertyIsEnumerable,dB=(t,e,n)=>e in t?WDe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ZDe=(t,e)=>{for(var n in e||(e={}))AZ.call(e,n)&&dB(t,n,e[n]);if(_1)for(var n of _1(e))DZ.call(e,n)&&dB(t,n,e[n]);return t},qDe=(t,e)=>YDe(t,XDe(e)),KDe=(t,e)=>{var n={};for(var r in t)AZ.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&_1)for(var r of _1(t))e.indexOf(r)<0&&DZ.call(t,r)&&(n[r]=t[r]);return n};const QDe={size:"md",radius:"xl",min:0,max:100,step:1,marks:[],label:t=>t,labelTransition:"skew-down",labelTransitionDuration:0,labelAlwaysOn:!1,thumbLabel:"",showLabelOnHover:!0,disabled:!1,scale:t=>t},IZ=M.forwardRef((t,e)=>{const n=nt("Slider",QDe,t),{classNames:r,styles:i,color:o,value:s,onChange:a,onChangeEnd:l,size:c,radius:u,min:d,max:f,step:h,precision:g,defaultValue:y,name:_,marks:v,label:x,labelTransition:w,labelTransitionDuration:S,labelTransitionTimingFunction:E,labelAlwaysOn:C,thumbLabel:O,showLabelOnHover:R,thumbChildren:T,disabled:A,unstyled:F,thumbSize:N,scale:U,inverted:k,variant:z}=n,G=KDe(n,["classNames","styles","color","value","onChange","onChangeEnd","size","radius","min","max","step","precision","defaultValue","name","marks","label","labelTransition","labelTransitionDuration","labelTransitionTimingFunction","labelAlwaysOn","thumbLabel","showLabelOnHover","thumbChildren","disabled","unstyled","thumbSize","scale","inverted","variant"]),W=Ir(),[B,j]=M.useState(!1),[$,q]=Ar({value:typeof s=="number"?Ns(s,d,f):s,defaultValue:typeof y=="number"?Ns(y,d,f):y,finalValue:Ns(0,d,f),onChange:a}),K=M.useRef($),re=M.useRef(),J=M.useRef(),le=SZ({value:$,min:d,max:f}),ae=U($),oe=typeof x=="function"?x(ae):x,De=M.useCallback(({x:me})=>{if(!A){const se=dDe({value:me,min:d,max:f,step:h,precision:g});q(se),K.current=se}},[A,d,f,h,g]),{ref:Te,active:ve}=iA(De,{onScrubEnd:()=>l?.(K.current)},W.dir),we=me=>{if(!A)switch(me.key){case"ArrowUp":{me.preventDefault(),J.current.focus();const se=Math.min(Math.max($+h,d),f);l?.(se),q(se);break}case"ArrowRight":{me.preventDefault(),J.current.focus();const se=Math.min(Math.max(W.dir==="rtl"?$-h:$+h,d),f);l?.(se),q(se);break}case"ArrowDown":{me.preventDefault(),J.current.focus();const se=Math.min(Math.max($-h,d),f);l?.(se),q(se);break}case"ArrowLeft":{me.preventDefault(),J.current.focus();const se=Math.min(Math.max(W.dir==="rtl"?$+h:$-h,d),f);l?.(se),q(se);break}case"Home":{me.preventDefault(),J.current.focus(),l?.(d),q(d);break}case"End":{me.preventDefault(),J.current.focus(),l?.(f),q(f);break}}};return H.createElement(RZ,qDe(ZDe({},G),{ref:Da(e,re),onKeyDownCapture:we,onMouseDownCapture:()=>{var me;return(me=re.current)==null?void 0:me.focus()},size:c,classNames:r,styles:i,disabled:A,unstyled:F,variant:z}),H.createElement(CZ,{inverted:k,offset:0,filled:le,marks:v,size:c,thumbSize:N,radius:u,color:o,min:d,max:f,value:ae,onChange:q,classNames:r,styles:i,disabled:A,unstyled:F,variant:z,containerProps:{ref:Te,onMouseEnter:R?()=>j(!0):void 0,onMouseLeave:R?()=>j(!1):void 0}},H.createElement(bZ,{max:f,min:d,value:ae,position:le,dragging:ve,color:o,size:c,label:oe,ref:J,labelTransition:w,labelTransitionDuration:S,labelTransitionTimingFunction:E,labelAlwaysOn:C,classNames:r,styles:i,thumbLabel:O,showLabelOnHover:R,isHovered:B,disabled:A,unstyled:F,thumbSize:N,variant:z},T)),H.createElement("input",{type:"hidden",name:_,value:ae}))});IZ.displayName="@mantine/core/Slider";var JDe=ft((t,{spacing:e,align:n,justify:r})=>({root:{display:"flex",flexDirection:"column",alignItems:n,justifyContent:r,gap:Oe({size:e,sizes:t.spacing})}}));const eIe=JDe;var tIe=Object.defineProperty,x1=Object.getOwnPropertySymbols,LZ=Object.prototype.hasOwnProperty,kZ=Object.prototype.propertyIsEnumerable,fB=(t,e,n)=>e in t?tIe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,nIe=(t,e)=>{for(var n in e||(e={}))LZ.call(e,n)&&fB(t,n,e[n]);if(x1)for(var n of x1(e))kZ.call(e,n)&&fB(t,n,e[n]);return t},rIe=(t,e)=>{var n={};for(var r in t)LZ.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&x1)for(var r of x1(t))e.indexOf(r)<0&&kZ.call(t,r)&&(n[r]=t[r]);return n};const iIe={spacing:"md",align:"stretch",justify:"flex-start"},vb=M.forwardRef((t,e)=>{const n=nt("Stack",iIe,t),{spacing:r,className:i,align:o,justify:s,unstyled:a,variant:l}=n,c=rIe(n,["spacing","className","align","justify","unstyled","variant"]),{classes:u,cx:d}=eIe({spacing:r,align:o,justify:s},{name:"Stack",unstyled:a,variant:l});return H.createElement(Xe,nIe({className:d(u.root,i),ref:e},c))});vb.displayName="@mantine/core/Stack";const NZ=M.createContext(null),oIe=NZ.Provider,sIe=()=>M.useContext(NZ);var aIe=Object.defineProperty,w1=Object.getOwnPropertySymbols,FZ=Object.prototype.hasOwnProperty,zZ=Object.prototype.propertyIsEnumerable,hB=(t,e,n)=>e in t?aIe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,pB=(t,e)=>{for(var n in e||(e={}))FZ.call(e,n)&&hB(t,n,e[n]);if(w1)for(var n of w1(e))zZ.call(e,n)&&hB(t,n,e[n]);return t},lIe=(t,e)=>{var n={};for(var r in t)FZ.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&w1)for(var r of w1(t))e.indexOf(r)<0&&zZ.call(t,r)&&(n[r]=t[r]);return n};const cIe={size:"sm"},UZ=M.forwardRef((t,e)=>{const n=nt("SwitchGroup",cIe,t),{children:r,value:i,defaultValue:o,onChange:s,size:a,wrapperProps:l}=n,c=lIe(n,["children","value","defaultValue","onChange","size","wrapperProps"]),[u,d]=Ar({value:i,defaultValue:o,finalValue:[],onChange:s}),f=h=>{const g=h.currentTarget.value;d(u.includes(g)?u.filter(y=>y!==g):[...u,g])};return H.createElement(oIe,{value:{value:u,onChange:f,size:a}},H.createElement(Ki.Wrapper,pB(pB({labelElement:"div",size:a,__staticSelector:"SwitchGroup",ref:e},l),c),r))});UZ.displayName="@mantine/core/SwitchGroup";var uIe=Object.defineProperty,dIe=Object.defineProperties,fIe=Object.getOwnPropertyDescriptors,mB=Object.getOwnPropertySymbols,hIe=Object.prototype.hasOwnProperty,pIe=Object.prototype.propertyIsEnumerable,gB=(t,e,n)=>e in t?uIe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,mIe=(t,e)=>{for(var n in e||(e={}))hIe.call(e,n)&&gB(t,n,e[n]);if(mB)for(var n of mB(e))pIe.call(e,n)&&gB(t,n,e[n]);return t},gIe=(t,e)=>dIe(t,fIe(e));const vIe={xs:X(16),sm:X(20),md:X(24),lg:X(30),xl:X(36)},yIe={xs:X(32),sm:X(38),md:X(46),lg:X(56),xl:X(72)},_Ie={xs:X(12),sm:X(14),md:X(18),lg:X(22),xl:X(28)},xIe={xs:X(5),sm:X(6),md:X(7),lg:X(9),xl:X(11)},wIe={xs:X(4),sm:X(5),md:X(6),lg:X(8),xl:X(10)};var SIe=ft((t,{radius:e,color:n,labelPosition:r,error:i},{size:o})=>{const s=Oe({size:o,sizes:_Ie}),a=Oe({size:e,sizes:t.radius}),l=t.fn.variant({variant:"filled",color:n}),c=Oe({size:o,sizes:yIe}),u=X(o==="xs"?1:2),d=t.fn.variant({variant:"filled",color:"red"}).background;return{root:{position:"relative"},input:{height:0,width:0,overflow:"hidden",whiteSpace:"nowrap",padding:0,WebkitClipPath:"inset(50%)",clipPath:"inset(50%)",position:"absolute"},track:gIe(mIe({},t.fn.focusStyles("input:focus + &")),{cursor:t.cursorType,overflow:"hidden",WebkitTapHighlightColor:"transparent",position:"relative",borderRadius:a,backgroundColor:t.colorScheme==="dark"?t.colors.dark[6]:t.colors.gray[2],border:`${X(1)} solid ${i?d:t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[3]}`,height:Oe({size:o,sizes:vIe}),minWidth:c,margin:0,transitionProperty:"background-color, border-color",transitionTimingFunction:t.transitionTimingFunction,transitionDuration:"150ms",boxSizing:"border-box",appearance:"none",display:"flex",alignItems:"center",fontSize:Oe({size:o,sizes:xIe}),fontWeight:600,order:r==="left"?2:1,userSelect:"none",zIndex:0,lineHeight:0,color:t.colorScheme==="dark"?t.colors.dark[1]:t.colors.gray[6],transition:`color 150ms ${t.transitionTimingFunction}`,"input:checked + &":{backgroundColor:l.background,borderColor:l.background,color:t.white,transition:`color 150ms ${t.transitionTimingFunction}`},"input:disabled + &":{backgroundColor:t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[2],borderColor:t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[2],cursor:"not-allowed",pointerEvents:"none"}}),thumb:{position:"absolute",zIndex:1,borderRadius:a,boxSizing:"border-box",display:"flex",backgroundColor:t.white,height:s,width:s,border:`${X(1)} solid ${t.colorScheme==="dark"?t.white:t.colors.gray[3]}`,left:u,transition:`left 150ms ${t.transitionTimingFunction}`,"& > *":{margin:"auto"},"@media (prefers-reduced-motion)":{transitionDuration:t.respectReducedMotion?"0ms":""},"input:checked + * > &":{left:`calc(100% - ${s} - ${u})`,borderColor:t.white},"input:disabled + * > &":{borderColor:t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[2],backgroundColor:t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[0]}},trackLabel:{height:"100%",display:"grid",placeContent:"center",minWidth:`calc(${c} - ${s})`,paddingInline:Oe({size:o,sizes:wIe}),margin:`0 0 0 calc(${s} + ${u})`,transition:`margin 150ms ${t.transitionTimingFunction}`,"input:checked + * > &":{margin:`0 calc(${s} + ${u}) 0 0`}}}});const bIe=SIe;var MIe=Object.defineProperty,EIe=Object.defineProperties,PIe=Object.getOwnPropertyDescriptors,S1=Object.getOwnPropertySymbols,BZ=Object.prototype.hasOwnProperty,HZ=Object.prototype.propertyIsEnumerable,vB=(t,e,n)=>e in t?MIe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,BP=(t,e)=>{for(var n in e||(e={}))BZ.call(e,n)&&vB(t,n,e[n]);if(S1)for(var n of S1(e))HZ.call(e,n)&&vB(t,n,e[n]);return t},CIe=(t,e)=>EIe(t,PIe(e)),TIe=(t,e)=>{var n={};for(var r in t)BZ.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&S1)for(var r of S1(t))e.indexOf(r)<0&&HZ.call(t,r)&&(n[r]=t[r]);return n};const OIe={offLabel:"",onLabel:"",size:"sm",radius:"xl",error:!1},yb=M.forwardRef((t,e)=>{var n;const r=nt("Switch",OIe,t),{className:i,color:o,label:s,offLabel:a,onLabel:l,id:c,style:u,size:d,radius:f,wrapperProps:h,children:g,unstyled:y,styles:_,classNames:v,thumbIcon:x,sx:w,checked:S,defaultChecked:E,onChange:C,labelPosition:O,description:R,error:T,disabled:A,variant:F}=r,N=TIe(r,["className","color","label","offLabel","onLabel","id","style","size","radius","wrapperProps","children","unstyled","styles","classNames","thumbIcon","sx","checked","defaultChecked","onChange","labelPosition","description","error","disabled","variant"]),U=sIe(),k=U?.size||d,{classes:z,cx:G}=bIe({color:o,radius:f,labelPosition:O,error:!!T},{name:"Switch",classNames:v,styles:_,unstyled:y,size:k,variant:F}),{systemStyles:W,rest:B}=Sl(N),j=zo(c),$=U?{checked:U.value.includes(B.value),onChange:U.onChange}:{},[q,K]=Ar({value:(n=$.checked)!=null?n:S,defaultValue:E,finalValue:!1});return H.createElement(pb,BP(BP({className:G(i,z.root),sx:w,style:u,id:j,size:U?.size||d,labelPosition:O,label:s,description:R,error:T,disabled:A,__staticSelector:"Switch",classNames:v,styles:_,unstyled:y,"data-checked":$.checked||void 0,variant:F},W),h),H.createElement("input",CIe(BP({},B),{disabled:A,checked:q,onChange:re=>{U?$.onChange(re):C?.(re),K(re.currentTarget.checked)},id:j,ref:e,type:"checkbox",className:z.input})),H.createElement("label",{htmlFor:j,className:z.track},H.createElement("div",{className:z.thumb},x),H.createElement("div",{className:z.trackLabel},q?l:a)))});yb.displayName="@mantine/core/Switch";yb.Group=UZ;var RIe=Object.defineProperty,AIe=Object.defineProperties,DIe=Object.getOwnPropertyDescriptors,yB=Object.getOwnPropertySymbols,IIe=Object.prototype.hasOwnProperty,LIe=Object.prototype.propertyIsEnumerable,_B=(t,e,n)=>e in t?RIe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,kIe=(t,e)=>{for(var n in e||(e={}))IIe.call(e,n)&&_B(t,n,e[n]);if(yB)for(var n of yB(e))LIe.call(e,n)&&_B(t,n,e[n]);return t},NIe=(t,e)=>AIe(t,DIe(e)),FIe=ft((t,{captionSide:e,horizontalSpacing:n,verticalSpacing:r,fontSize:i,withBorder:o,withColumnBorders:s})=>{const a=`${X(1)} solid ${t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[3]}`;return{root:NIe(kIe({},t.fn.fontStyles()),{width:"100%",borderCollapse:"collapse",captionSide:e,color:t.colorScheme==="dark"?t.colors.dark[0]:t.black,lineHeight:t.lineHeight,border:o?a:void 0,"& caption":{marginTop:e==="top"?0:t.spacing.xs,marginBottom:e==="bottom"?0:t.spacing.xs,fontSize:t.fontSizes.sm,color:t.colorScheme==="dark"?t.colors.dark[2]:t.colors.gray[6]},"& thead tr th, & tfoot tr th, & tbody tr th":{textAlign:"left",fontWeight:"bold",color:t.colorScheme==="dark"?t.colors.dark[0]:t.colors.gray[7],fontSize:Oe({size:i,sizes:t.fontSizes}),padding:`${Oe({size:r,sizes:t.spacing})} ${Oe({size:n,sizes:t.spacing})}`},"& thead tr th":{borderBottom:a},"& tfoot tr th, & tbody tr th":{borderTop:a},"& tbody tr td":{padding:`${Oe({size:r,sizes:t.spacing})} ${Oe({size:n,sizes:t.spacing})}`,borderTop:a,fontSize:Oe({size:i,sizes:t.fontSizes})},"& tbody tr:first-of-type td, & tbody tr:first-of-type th":{borderTop:"none"},"& thead th, & tbody td":{borderRight:s?a:"none","&:last-of-type":{borderRight:"none",borderLeft:s?a:"none"}},"& tbody tr th":{borderRight:s?a:"none"},"&[data-striped] tbody tr:nth-of-type(odd)":{backgroundColor:t.colorScheme==="dark"?t.colors.dark[6]:t.colors.gray[0]},"&[data-hover] tbody tr":t.fn.hover({backgroundColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[1]})})}});const zIe=FIe;var UIe=Object.defineProperty,BIe=Object.defineProperties,HIe=Object.getOwnPropertyDescriptors,b1=Object.getOwnPropertySymbols,VZ=Object.prototype.hasOwnProperty,jZ=Object.prototype.propertyIsEnumerable,xB=(t,e,n)=>e in t?UIe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,VIe=(t,e)=>{for(var n in e||(e={}))VZ.call(e,n)&&xB(t,n,e[n]);if(b1)for(var n of b1(e))jZ.call(e,n)&&xB(t,n,e[n]);return t},jIe=(t,e)=>BIe(t,HIe(e)),$Ie=(t,e)=>{var n={};for(var r in t)VZ.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&b1)for(var r of b1(t))e.indexOf(r)<0&&jZ.call(t,r)&&(n[r]=t[r]);return n};const GIe={striped:!1,highlightOnHover:!1,captionSide:"top",horizontalSpacing:"xs",fontSize:"sm",verticalSpacing:7,withBorder:!1,withColumnBorders:!1},$Z=M.forwardRef((t,e)=>{const n=nt("Table",GIe,t),{className:r,children:i,striped:o,highlightOnHover:s,captionSide:a,horizontalSpacing:l,verticalSpacing:c,fontSize:u,unstyled:d,withBorder:f,withColumnBorders:h,variant:g}=n,y=$Ie(n,["className","children","striped","highlightOnHover","captionSide","horizontalSpacing","verticalSpacing","fontSize","unstyled","withBorder","withColumnBorders","variant"]),{classes:_,cx:v}=zIe({captionSide:a,verticalSpacing:c,horizontalSpacing:l,fontSize:u,withBorder:f,withColumnBorders:h},{unstyled:d,name:"Table",variant:g});return H.createElement(Xe,jIe(VIe({},y),{component:"table",ref:e,className:v(_.root,r),"data-striped":o||void 0,"data-hover":s||void 0}),i)});$Z.displayName="@mantine/core/Table";const CT={context:"Tabs component was not found in the tree",value:"Tabs.Tab or Tabs.Panel component was rendered with invalid value or without value"},[WIe,RA]=cd(CT.context);var YIe=Object.defineProperty,wB=Object.getOwnPropertySymbols,XIe=Object.prototype.hasOwnProperty,ZIe=Object.prototype.propertyIsEnumerable,SB=(t,e,n)=>e in t?YIe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,qIe=(t,e)=>{for(var n in e||(e={}))XIe.call(e,n)&&SB(t,n,e[n]);if(wB)for(var n of wB(e))ZIe.call(e,n)&&SB(t,n,e[n]);return t};function KIe({orientation:t,inverted:e,placement:n},r,i){const o=t==="vertical";return i==="default"?{[o?n==="left"?"borderRight":"borderLeft":e?"borderTop":"borderBottom"]:`${X(2)} solid ${r.colorScheme==="dark"?r.colors.dark[4]:r.colors.gray[3]}`}:i==="outline"?{[o?n==="left"?"borderRight":"borderLeft":e?"borderTop":"borderBottom"]:`${X(1)} solid ${r.colorScheme==="dark"?r.colors.dark[4]:r.colors.gray[3]}`}:i==="pills"?{gap:`calc(${r.spacing.sm} / 2)`}:{}}var QIe=ft((t,e,{variant:n})=>{const r=e.orientation==="vertical";return{tabsList:qIe({display:"flex",flexWrap:"wrap",flexDirection:r?"column":"row",justifyContent:eX[e.position],'& [role="tab"]':{flex:e.grow?1:void 0}},KIe(e,t,n))}});const JIe=QIe;var e3e=Object.defineProperty,t3e=Object.defineProperties,n3e=Object.getOwnPropertyDescriptors,M1=Object.getOwnPropertySymbols,GZ=Object.prototype.hasOwnProperty,WZ=Object.prototype.propertyIsEnumerable,bB=(t,e,n)=>e in t?e3e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,r3e=(t,e)=>{for(var n in e||(e={}))GZ.call(e,n)&&bB(t,n,e[n]);if(M1)for(var n of M1(e))WZ.call(e,n)&&bB(t,n,e[n]);return t},i3e=(t,e)=>t3e(t,n3e(e)),o3e=(t,e)=>{var n={};for(var r in t)GZ.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&M1)for(var r of M1(t))e.indexOf(r)<0&&WZ.call(t,r)&&(n[r]=t[r]);return n};const s3e={grow:!1,position:"left"},YZ=M.forwardRef((t,e)=>{const n=nt("TabsList",s3e,t),{children:r,className:i,grow:o,position:s}=n,a=o3e(n,["children","className","grow","position"]),{orientation:l,variant:c,color:u,radius:d,inverted:f,placement:h,classNames:g,styles:y,unstyled:_}=RA(),{classes:v,cx:x}=JIe({orientation:l,grow:o,color:u,position:s,radius:d,inverted:f,placement:h},{name:"Tabs",unstyled:_,classNames:g,styles:y,variant:c});return H.createElement(Xe,i3e(r3e({},a),{className:x(v.tabsList,i),ref:e,role:"tablist","aria-orientation":l}),r)});YZ.displayName="@mantine/core/TabsList";var a3e=ft((t,{orientation:e})=>({panel:{flex:e==="vertical"?1:void 0}}));const l3e=a3e;var c3e=Object.defineProperty,u3e=Object.defineProperties,d3e=Object.getOwnPropertyDescriptors,E1=Object.getOwnPropertySymbols,XZ=Object.prototype.hasOwnProperty,ZZ=Object.prototype.propertyIsEnumerable,MB=(t,e,n)=>e in t?c3e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,f3e=(t,e)=>{for(var n in e||(e={}))XZ.call(e,n)&&MB(t,n,e[n]);if(E1)for(var n of E1(e))ZZ.call(e,n)&&MB(t,n,e[n]);return t},h3e=(t,e)=>u3e(t,d3e(e)),p3e=(t,e)=>{var n={};for(var r in t)XZ.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&E1)for(var r of E1(t))e.indexOf(r)<0&&ZZ.call(t,r)&&(n[r]=t[r]);return n};const m3e={},qZ=M.forwardRef((t,e)=>{const n=nt("TabsPanel",m3e,t),{value:r,children:i,sx:o,className:s}=n,a=p3e(n,["value","children","sx","className"]),l=RA(),{classes:c,cx:u}=l3e({orientation:l.orientation,color:l.color,radius:l.radius,inverted:l.inverted,placement:l.placement},{name:"Tabs",unstyled:l.unstyled,classNames:l.classNames,styles:l.styles,variant:l.variant}),d=l.getPanelId(r),f=l.value===r,h=l.keepMounted||f?i:null;return M.useEffect(()=>(l.setMountedPanelIds(g=>[...g,d]),l.setMountedPanelIds(g=>g.filter(y=>y!==d))),[d]),H.createElement(Xe,h3e(f3e({},a),{ref:e,sx:[{display:f?void 0:"none"},...Ph(o)],className:u(c.panel,s),role:"tabpanel",id:d,"aria-labelledby":l.getTabId(r)}),h)});qZ.displayName="@mantine/core/TabsPanel";var g3e=Object.defineProperty,v3e=Object.defineProperties,y3e=Object.getOwnPropertyDescriptors,EB=Object.getOwnPropertySymbols,_3e=Object.prototype.hasOwnProperty,x3e=Object.prototype.propertyIsEnumerable,PB=(t,e,n)=>e in t?g3e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Lf=(t,e)=>{for(var n in e||(e={}))_3e.call(e,n)&&PB(t,n,e[n]);if(EB)for(var n of EB(e))x3e.call(e,n)&&PB(t,n,e[n]);return t},CB=(t,e)=>v3e(t,y3e(e));function w3e(t,{orientation:e,color:n,radius:r,inverted:i,placement:o},s){const a=e==="vertical",l=t.fn.variant({color:n,variant:"filled"}),c=X(t.fn.radius(r)),u=e==="vertical"?o==="left"?`${c} 0 0 ${c}`:` 0 ${c} ${c} 0`:i?`0 0 ${c} ${c}`:`${c} ${c} 0 0`;return s==="default"?CB(Lf({[a?o==="left"?"borderRight":"borderLeft":i?"borderTop":"borderBottom"]:`${X(2)} solid transparent`,[a?o==="left"?"marginRight":"marginLeft":i?"marginTop":"marginBottom"]:X(-2),borderRadius:u},t.fn.hover({backgroundColor:t.colorScheme==="dark"?t.colors.dark[6]:t.colors.gray[0],borderColor:t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[3]})),{"&[data-active]":Lf({borderColor:l.background,color:t.colorScheme==="dark"?t.white:t.black},t.fn.hover({borderColor:l.background}))}):s==="outline"?{borderRadius:u,border:`${X(1)} solid transparent`,[a?o==="left"?"borderRight":"borderLeft":i?"borderTop":"borderBottom"]:"none","&[data-active]":{borderColor:t.colorScheme==="dark"?t.colors.dark[4]:t.colors.gray[3],"&::before":{content:'""',backgroundColor:t.colorScheme==="dark"?t.colors.dark[7]:t.white,position:"absolute",bottom:a?0:i?"unset":X(-1),top:a?0:i?X(-1):"unset",[a?"width":"height"]:X(1),right:a?o==="left"?X(-1):"unset":0,left:a?o==="left"?"unset":X(-1):0}}}:s==="pills"?CB(Lf({borderRadius:t.fn.radius(r)},t.fn.hover({backgroundColor:t.colorScheme==="dark"?t.colors.dark[6]:t.colors.gray[0]})),{"&[data-active]":Lf({backgroundColor:l.background,color:t.white},t.fn.hover({backgroundColor:l.background}))}):{}}var S3e=ft((t,e,{variant:n})=>({tabLabel:{},tab:Lf({position:"relative",padding:`${t.spacing.xs} ${t.spacing.md}`,paddingLeft:e.withIcon?t.spacing.xs:void 0,paddingRight:e.withRightSection?t.spacing.xs:void 0,fontSize:t.fontSizes.sm,whiteSpace:"nowrap",zIndex:0,display:"flex",alignItems:"center",justifyContent:e.orientation==="horizontal"?"center":void 0,lineHeight:1,"&:disabled":Lf({opacity:.5,cursor:"not-allowed"},t.fn.hover({backgroundColor:"transparent"})),"&:focus":{zIndex:1}},w3e(t,e,n)),tabRightSection:{display:"flex",justifyContent:"center",alignItems:"center","&:not(:only-child)":{marginLeft:X(7)}},tabIcon:{display:"flex",justifyContent:"center",alignItems:"center","&:not(:only-child)":{marginRight:X(7)}}}));const b3e=S3e;var M3e=Object.defineProperty,E3e=Object.defineProperties,P3e=Object.getOwnPropertyDescriptors,P1=Object.getOwnPropertySymbols,KZ=Object.prototype.hasOwnProperty,QZ=Object.prototype.propertyIsEnumerable,TB=(t,e,n)=>e in t?M3e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,C3e=(t,e)=>{for(var n in e||(e={}))KZ.call(e,n)&&TB(t,n,e[n]);if(P1)for(var n of P1(e))QZ.call(e,n)&&TB(t,n,e[n]);return t},T3e=(t,e)=>E3e(t,P3e(e)),O3e=(t,e)=>{var n={};for(var r in t)KZ.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&P1)for(var r of P1(t))e.indexOf(r)<0&&QZ.call(t,r)&&(n[r]=t[r]);return n};const R3e={},JZ=M.forwardRef((t,e)=>{const n=nt("TabsTab",R3e,t),{value:r,children:i,onKeyDown:o,onClick:s,className:a,icon:l,rightSection:c,color:u}=n,d=O3e(n,["value","children","onKeyDown","onClick","className","icon","rightSection","color"]),f=RA(),h=!!l,g=!!c,{theme:y,classes:_,cx:v}=b3e({withIcon:h||g&&!i,withRightSection:g||h&&!i,orientation:f.orientation,color:u||f.color,radius:f.radius,inverted:f.inverted,placement:f.placement},{name:"Tabs",unstyled:f.unstyled,classNames:f.classNames,styles:f.styles,variant:f.variant}),x=r===f.value,w=f.getPanelId(r),S=f.mountedPanelIds.includes(r)?w:void 0,E=C=>{f.onTabChange(f.allowTabDeactivation&&r===f.value?null:r),s?.(C)};return H.createElement(Fs,T3e(C3e({},d),{unstyled:f.unstyled,className:v(_.tab,a),"data-active":x||void 0,ref:e,type:"button",role:"tab",id:f.getTabId(r),"aria-selected":x,tabIndex:x||f.value===null?0:-1,"aria-controls":S,onClick:E,onKeyDown:GR({siblingSelector:'[role="tab"]',parentSelector:'[role="tablist"]',activateOnFocus:f.activateTabWithKeyboard,loop:f.loop,dir:y.dir,orientation:f.orientation,onKeyDown:o})}),l&&H.createElement("span",{className:_.tabIcon},l),i&&H.createElement("span",{className:_.tabLabel},i),c&&H.createElement("span",{className:_.tabRightSection},c))});JZ.displayName="@mantine/core/Tab";function eq({defaultValue:t,value:e,onTabChange:n,orientation:r,children:i,loop:o,id:s,activateTabWithKeyboard:a,allowTabDeactivation:l,variant:c,color:u,radius:d,inverted:f,placement:h,keepMounted:g=!0,classNames:y,styles:_,unstyled:v}){const x=zo(s),[w,S]=M.useState([]),[E,C]=Ar({value:e,defaultValue:t,finalValue:null,onChange:n});return H.createElement(WIe,{value:{placement:h,value:E,orientation:r,id:x,loop:o,activateTabWithKeyboard:a,getTabId:Px(`${x}-tab`,CT.value),getPanelId:Px(`${x}-panel`,CT.value),onTabChange:C,setMountedPanelIds:S,mountedPanelIds:w,allowTabDeactivation:l,variant:c,color:u,radius:d,inverted:f,keepMounted:g,classNames:y,styles:_,unstyled:v}},i)}eq.displayName="@mantine/core/TabsProvider";var A3e=ft((t,{orientation:e,placement:n})=>({root:{display:e==="vertical"?"flex":void 0,flexDirection:n==="right"?"row-reverse":"row"}}));const D3e=A3e;var I3e=Object.defineProperty,L3e=Object.defineProperties,k3e=Object.getOwnPropertyDescriptors,C1=Object.getOwnPropertySymbols,tq=Object.prototype.hasOwnProperty,nq=Object.prototype.propertyIsEnumerable,OB=(t,e,n)=>e in t?I3e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,N3e=(t,e)=>{for(var n in e||(e={}))tq.call(e,n)&&OB(t,n,e[n]);if(C1)for(var n of C1(e))nq.call(e,n)&&OB(t,n,e[n]);return t},F3e=(t,e)=>L3e(t,k3e(e)),z3e=(t,e)=>{var n={};for(var r in t)tq.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&C1)for(var r of C1(t))e.indexOf(r)<0&&nq.call(t,r)&&(n[r]=t[r]);return n};const U3e={orientation:"horizontal",loop:!0,activateTabWithKeyboard:!0,allowTabDeactivation:!1,unstyled:!1,inverted:!1,variant:"default",placement:"left"},Qo=M.forwardRef((t,e)=>{const n=nt("Tabs",U3e,t),{defaultValue:r,value:i,orientation:o,loop:s,activateTabWithKeyboard:a,allowTabDeactivation:l,children:c,id:u,onTabChange:d,variant:f,color:h,className:g,unstyled:y,classNames:_,styles:v,radius:x,inverted:w,keepMounted:S,placement:E}=n,C=z3e(n,["defaultValue","value","orientation","loop","activateTabWithKeyboard","allowTabDeactivation","children","id","onTabChange","variant","color","className","unstyled","classNames","styles","radius","inverted","keepMounted","placement"]),{classes:O,cx:R}=D3e({orientation:o,color:h,radius:x,inverted:w,placement:E},{unstyled:y,name:"Tabs",classNames:_,styles:v,variant:f});return H.createElement(eq,{activateTabWithKeyboard:a,defaultValue:r,orientation:o,onTabChange:d,value:i,id:u,loop:s,allowTabDeactivation:l,color:h,variant:f,radius:x,inverted:w,keepMounted:S,placement:E,classNames:_,styles:v,unstyled:y},H.createElement(Xe,F3e(N3e({},C),{className:R(O.root,g),id:u,ref:e}),c))});Qo.List=YZ;Qo.Tab=JZ;Qo.Panel=qZ;Qo.displayName="@mantine/core/Tabs";function As(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r3?e.i-4:e.i:Array.isArray(t)?1:AA(t)?2:DA(t)?3:0}function TT(t,e){return Rh(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function B3e(t,e){return Rh(t)===2?t.get(e):t[e]}function rq(t,e,n){var r=Rh(t);r===2?t.set(e,n):r===3?t.add(n):t[e]=n}function H3e(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function AA(t){return G3e&&t instanceof Map}function DA(t){return W3e&&t instanceof Set}function pu(t){return t.o||t.t}function IA(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=X3e(t);delete e[Do];for(var n=FA(e),r=0;r1&&(t.set=t.add=t.clear=t.delete=V3e),Object.freeze(t),e&&mg(t,function(n,r){return LA(r,!0)},!0)),t}function V3e(){As(2)}function kA(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function Ta(t){var e=Z3e[t];return e||As(18,t),e}function RB(){return gg}function HP(t,e){e&&(Ta("Patches"),t.u=[],t.s=[],t.v=e)}function T1(t){OT(t),t.p.forEach(j3e),t.p=null}function OT(t){t===gg&&(gg=t.l)}function AB(t){return gg={p:[],l:gg,h:t,m:!0,_:0}}function j3e(t){var e=t[Do];e.i===0||e.i===1?e.j():e.g=!0}function VP(t,e){e._=e.p.length;var n=e.p[0],r=t!==void 0&&t!==n;return e.h.O||Ta("ES5").S(e,t,r),r?(n[Do].P&&(T1(e),As(4)),Qu(t)&&(t=O1(e,t),e.l||R1(e,t)),e.u&&Ta("Patches").M(n[Do].t,t,e.u,e.s)):t=O1(e,n,[]),T1(e),e.u&&e.v(e.u,e.s),t!==iq?t:void 0}function O1(t,e,n){if(kA(e))return e;var r=e[Do];if(!r)return mg(e,function(a,l){return DB(t,r,e,a,l,n)},!0),e;if(r.A!==t)return e;if(!r.P)return R1(t,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=IA(r.k):r.o,o=i,s=!1;r.i===3&&(o=new Set(i),i.clear(),s=!0),mg(o,function(a,l){return DB(t,r,i,a,l,n,s)}),R1(t,i,!1),n&&t.u&&Ta("Patches").N(r,n,t.u,t.s)}return r.o}function DB(t,e,n,r,i,o,s){if(dh(i)){var a=O1(t,i,o&&e&&e.i!==3&&!TT(e.R,r)?o.concat(r):void 0);if(rq(n,r,a),!dh(a))return;t.m=!1}else s&&n.add(i);if(Qu(i)&&!kA(i)){if(!t.h.D&&t._<1)return;O1(t,i),e&&e.A.l||R1(t,i)}}function R1(t,e,n){n===void 0&&(n=!1),!t.l&&t.h.D&&t.m&&LA(e,n)}function jP(t,e){var n=t[Do];return(n?pu(n):t)[e]}function IB(t,e){if(e in t)for(var n=Object.getPrototypeOf(t);n;){var r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function RT(t){t.P||(t.P=!0,t.l&&RT(t.l))}function $P(t){t.o||(t.o=IA(t.t))}function AT(t,e,n){var r=AA(e)?Ta("MapSet").F(e,n):DA(e)?Ta("MapSet").T(e,n):t.O?function(i,o){var s=Array.isArray(i),a={i:s?1:0,A:o?o.A:RB(),P:!1,I:!1,R:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=a,c=IT;s&&(l=[a],c=em);var u=Proxy.revocable(l,c),d=u.revoke,f=u.proxy;return a.k=f,a.j=d,f}(e,n):Ta("ES5").J(e,n);return(n?n.A:RB()).p.push(r),r}function $3e(t){return dh(t)||As(22,t),function e(n){if(!Qu(n))return n;var r,i=n[Do],o=Rh(n);if(i){if(!i.P&&(i.i<4||!Ta("ES5").K(i)))return i.t;i.I=!0,r=LB(n,o),i.I=!1}else r=LB(n,o);return mg(r,function(s,a){i&&B3e(i.t,s)===a||rq(r,s,e(a))}),o===3?new Set(r):r}(t)}function LB(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return IA(t)}var kB,gg,NA=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",G3e=typeof Map<"u",W3e=typeof Set<"u",NB=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",iq=NA?Symbol.for("immer-nothing"):((kB={})["immer-nothing"]=!0,kB),DT=NA?Symbol.for("immer-draftable"):"__$immer_draftable",Do=NA?Symbol.for("immer-state"):"__$immer_state",Y3e=""+Object.prototype.constructor,FA=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,X3e=Object.getOwnPropertyDescriptors||function(t){var e={};return FA(t).forEach(function(n){e[n]=Object.getOwnPropertyDescriptor(t,n)}),e},Z3e={},IT={get:function(t,e){if(e===Do)return t;var n=pu(t);if(!TT(n,e))return function(i,o,s){var a,l=IB(o,s);return l?"value"in l?l.value:(a=l.get)===null||a===void 0?void 0:a.call(i.k):void 0}(t,n,e);var r=n[e];return t.I||!Qu(r)?r:r===jP(t.t,e)?($P(t),t.o[e]=AT(t.A.h,r,t)):r},has:function(t,e){return e in pu(t)},ownKeys:function(t){return Reflect.ownKeys(pu(t))},set:function(t,e,n){var r=IB(pu(t),e);if(r?.set)return r.set.call(t.k,n),!0;if(!t.P){var i=jP(pu(t),e),o=i?.[Do];if(o&&o.t===n)return t.o[e]=n,t.R[e]=!1,!0;if(H3e(n,i)&&(n!==void 0||TT(t.t,e)))return!0;$P(t),RT(t)}return t.o[e]===n&&(n!==void 0||e in t.o)||Number.isNaN(n)&&Number.isNaN(t.o[e])||(t.o[e]=n,t.R[e]=!0),!0},deleteProperty:function(t,e){return jP(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,$P(t),RT(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var n=pu(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:r.enumerable,value:n[e]}},defineProperty:function(){As(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){As(12)}},em={};mg(IT,function(t,e){em[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),em.deleteProperty=function(t,e){return em.set.call(this,t,e,void 0)},em.set=function(t,e,n){return IT.set.call(this,t[0],e,n,t[0])};var q3e=function(){function t(n){var r=this;this.O=NB,this.D=!0,this.produce=function(i,o,s){if(typeof i=="function"&&typeof o!="function"){var a=o;o=i;var l=r;return function(y){var _=this;y===void 0&&(y=a);for(var v=arguments.length,x=Array(v>1?v-1:0),w=1;w1?u-1:0),f=1;f=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var s=Ta("Patches").$;return dh(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},t}(),Io=new q3e,K3e=Io.produce;Io.produceWithPatches.bind(Io);Io.setAutoFreeze.bind(Io);Io.setUseProxies.bind(Io);Io.applyPatches.bind(Io);Io.createDraft.bind(Io);Io.finishDraft.bind(Io);class fa{constructor(e,n,r){this.name=e,this.makeObject=n,this.cleanup=r,this.children=[],this.clickable=!1}[DT]=!0;children;clickable}function Q3e(t){const e=H.useContext(Ui),[n,r]=H.useState([]);return H.useEffect(()=>{let i=!0,o;function s(){const l=e.useSceneTree.getState().nodeFromName[t.name]?.children;l===void 0||n==l||i&&(r(l),i=!1,o=setTimeout(()=>{i=!0,s()},50))}const a=e.useSceneTree.subscribe(l=>l.nodeFromName[t.name],s);return s(),()=>{clearTimeout(o),a()}},[n]),DR(I.jsx("group",{children:n.map(i=>I.jsx(oq,{name:i},i))}),t.parent)}function FB(t){return H.useContext(Ui).useSceneTree(r=>r.labelVisibleFromName[t.name])?I.jsx(Hg,{children:I.jsx(Si,{style:{backgroundColor:"rgba(240, 240, 240, 0.9)",borderRadius:"0.2rem",userSelect:"none"},px:"xs",py:"0.1rem",children:t.name})}):null}function oq(t){const e=H.useContext(Ui),n=e.useSceneTree(h=>h.nodeFromName[t.name]?.makeObject),r=e.useSceneTree(h=>h.nodeFromName[t.name]?.cleanup),i=e.useSceneTree(h=>h.nodeFromName[t.name]?.clickable)??!1,[o,s]=H.useState(null),a=H.useMemo(()=>n&&n(s),[s,n]),l=H.useMemo(()=>o===null?null:I.jsx(Q3e,{name:t.name,parent:o}),[t.name,o]);kc(()=>{if(o===null)return;const h=e.nodeAttributesFromName.current[t.name];if(h===void 0)return;const g=h.visibility;g!==void 0&&(o.visible=g);let y=!1;const _=h.wxyz;_!==void 0&&(y=!0,o.quaternion.set(_[1],_[2],_[3],_[0]));const v=h.position;v!==void 0&&(y=!0,o.position.set(v[0],v[1],v[2])),y&&(o.matrixAutoUpdate||o.updateMatrix(),o.matrixWorldAutoUpdate||o.updateMatrixWorld())}),H.useEffect(()=>r);const c=HS(e.websocketRef,50),[u,d]=H.useState(!1);bue(u),!i&&u&&d(!1);function f(){return e.nodeAttributesFromName.current[t.name]?.visibility??!1}return i?I.jsxs(I.Fragment,{children:[I.jsx("group",{onClick:i?h=>{f()&&(h.stopPropagation(),c({type:"SceneNodeClickedMessage",name:t.name}))}:void 0,onPointerOver:i?h=>{f()&&(h.stopPropagation(),d(!0))}:void 0,onPointerOut:i?()=>{f()&&d(!1)}:void 0,children:I.jsx(Jpe,{enabled:u,children:a})}),I.jsx(FB,{name:t.name}),l]}):I.jsxs(I.Fragment,{children:[a,I.jsx(FB,{name:t.name}),l]})}const J3e=new xl(1,1,1,16,1),eLe=new rd(1),tLe=new _l({color:15526912}),LT=H.forwardRef(function({show_axes:e=!0,axes_length:n=.5,axes_radius:r=.0125},i){return I.jsx("group",{ref:i,children:e&&I.jsxs(I.Fragment,{children:[I.jsx("mesh",{geometry:eLe,material:tLe,scale:new Z(r*2.5,r*2.5,r*2.5)}),I.jsxs(z$,{geometry:J3e,children:[I.jsx("meshBasicMaterial",{}),I.jsx(vm,{rotation:new ki(0,0,3*Math.PI/2),position:[.5*n,0,0],scale:new Z(r,n,r),color:13369344}),I.jsx(vm,{position:[0,.5*n,0],scale:new Z(r,n,r),color:52224}),I.jsx(vm,{rotation:new ki(Math.PI/2,0,0),position:[0,0,.5*n],scale:new Z(r,n,r),color:204})]})]})})}),nLe=new xl(1,1,1,3,1),rLe=H.forwardRef(function(e,n){const r=Math.tan(e.fov/2),i=r*e.aspect,o=1;function s(a){return a=a.map(l=>[l[0]*i,l[1]*r,l[2]*o]),[...Array(a.length-1).keys()].map(l=>I.jsx(iLe,{radius:.015*e.scale,start:new Z().fromArray(a[l]).multiplyScalar(e.scale),end:new Z().fromArray(a[l+1]).multiplyScalar(e.scale),color:e.color},l))}return I.jsx("group",{ref:n,children:I.jsxs(z$,{limit:9,geometry:nLe,children:[I.jsx("meshBasicMaterial",{color:e.color}),s([[-1,-1,1],[1,-1,1],[1,1,1],[-1,1,1],[-1,-1,1]]),s([[-1,-1,1],[0,0,0],[1,-1,1]]),s([[-1,1,1],[0,0,0],[1,1,1]]),s([[0,-1.2,1],[0,-.9,1]])]})})});function iLe(t){const e=new Z().subVectors(t.end,t.start).normalize(),n=new Z(0,1,0),r=new Z().copy(n).cross(e).normalize(),i=Math.acos(e.dot(n)),o=t.start.distanceTo(t.end),s=new Z().addVectors(t.start,t.end).divideScalar(2),a=new Hn().setFromAxisAngle(r,i);return I.jsx(I.Fragment,{children:I.jsx(vm,{position:s,quaternion:a,scale:[t.radius,o,t.radius]})})}const zB=t=>{let e;const n=new Set,r=(l,c)=>{const u=typeof l=="function"?l(e):l;if(!Object.is(u,e)){const d=e;e=c??typeof u!="object"?u:Object.assign({},e,u),n.forEach(f=>f(e,d))}},i=()=>e,a={setState:r,getState:i,subscribe:l=>(n.add(l),()=>n.delete(l)),destroy:()=>{({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1}&&"production")!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return e=t(r,i,a),a},oLe=t=>t?zB(t):zB;var sq={exports:{}},aq={},lq={exports:{}},cq={};/** + * @license React + * use-sync-external-store-shim.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var fh=M;function sLe(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var aLe=typeof Object.is=="function"?Object.is:sLe,lLe=fh.useState,cLe=fh.useEffect,uLe=fh.useLayoutEffect,dLe=fh.useDebugValue;function fLe(t,e){var n=e(),r=lLe({inst:{value:n,getSnapshot:e}}),i=r[0].inst,o=r[1];return uLe(function(){i.value=n,i.getSnapshot=e,GP(i)&&o({inst:i})},[t,n,e]),cLe(function(){return GP(i)&&o({inst:i}),t(function(){GP(i)&&o({inst:i})})},[t]),dLe(n),n}function GP(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!aLe(t,n)}catch{return!0}}function hLe(t,e){return e()}var pLe=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?hLe:fLe;cq.useSyncExternalStore=fh.useSyncExternalStore!==void 0?fh.useSyncExternalStore:pLe;lq.exports=cq;var mLe=lq.exports;/** + * @license React + * use-sync-external-store-shim/with-selector.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var _b=M,gLe=mLe;function vLe(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var yLe=typeof Object.is=="function"?Object.is:vLe,_Le=gLe.useSyncExternalStore,xLe=_b.useRef,wLe=_b.useEffect,SLe=_b.useMemo,bLe=_b.useDebugValue;aq.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var o=xLe(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=SLe(function(){function l(h){if(!c){if(c=!0,u=h,h=r(h),i!==void 0&&s.hasValue){var g=s.value;if(i(g,h))return d=g}return d=h}if(g=d,yLe(u,h))return g;var y=r(h);return i!==void 0&&i(g,y)?g:(u=h,d=y)}var c=!1,u,d,f=n===void 0?null:n;return[function(){return l(e())},f===null?void 0:function(){return l(f())}]},[e,n,r,i]);var a=_Le(t,o[0],o[1]);return wLe(function(){s.hasValue=!0,s.value=a},[a]),bLe(a),a};sq.exports=aq;var MLe=sq.exports;const ELe=Tc(MLe),{useSyncExternalStoreWithSelector:PLe}=ELe;function CLe(t,e=t.getState,n){const r=PLe(t.subscribe,t.getState,t.getServerState||t.getState,e,n);return M.useDebugValue(r),r}const UB=t=>{({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1}&&"production")!=="production"&&typeof t!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const e=typeof t=="function"?oLe(t):t,n=(r,i)=>CLe(e,r,i);return Object.assign(n,e),n},uq=t=>t?UB(t):UB,TLe=t=>(e,n,r)=>{const i=r.subscribe;return r.subscribe=(s,a,l)=>{let c=s;if(a){const u=l?.equalityFn||Object.is;let d=s(r.getState());c=f=>{const h=s(f);if(!u(d,h)){const g=d;a(d=h,g)}},l?.fireImmediately&&a(d,d)}return i(c)},t(e,n,r)},OLe=TLe,RLe=t=>(e,n,r)=>(r.setState=(i,o,...s)=>{const a=typeof i=="function"?K3e(i):i;return e(a,o,...s)},t(r.setState,n,r)),dq=RLe,ALe=t=>I.jsx("group",{ref:t,quaternion:new Hn().setFromEuler(new ki(-Math.PI/2,0,0))}),DLe=t=>I.jsx(LT,{ref:t}),fq=new fa("",ALe),ILe=new fa("/WorldAxes",DLe);fq.children.push("/WorldAxes");function LLe(){return H.useState(()=>uq(OLe(dq(t=>({nodeFromName:{"":fq,"/WorldAxes":ILe},labelVisibleFromName:{},setClickable:(e,n)=>t(r=>{const i=r.nodeFromName[e];i!==void 0&&(i.clickable=n)}),addSceneNode:e=>t(n=>{const r=n.nodeFromName[e.name];if(r)n.nodeFromName[e.name]={...e,children:r.children};else{const i=e.name.split("/").slice(0,-1).join("/");n.nodeFromName[e.name]=e,n.nodeFromName[i].children.push(e.name)}}),removeSceneNode:e=>t(n=>{if(!(e in n.nodeFromName)){console.log("Skipping scene node removal for "+e);return}const r=[];function i(s){r.push(s),n.nodeFromName[s].children.forEach(i)}i(e),r.forEach(s=>{delete n.nodeFromName[s]});const o=e.split("/").slice(0,-1).join("/");n.nodeFromName[o].children=n.nodeFromName[o].children.filter(s=>s!==e)}),resetScene:()=>t(e=>{for(const n of Object.keys(e.nodeFromName))n!==""&&n!=="/WorldAxes"&&delete e.nodeFromName[n];e.nodeFromName[""].children=["/WorldAxes"],e.nodeFromName["/WorldAxes"].children=[]}),setLabelVisibility:(e,n)=>t(r=>{r.labelVisibleFromName[e]=n})})))))[0]}function kLe(){const e=H.useContext(Ui).useGui(r=>r.guiConfigFromId),n={inputs:[],subfolders:{}};return[...Object.keys(e)].sort((r,i)=>e[r].order-e[i].order).forEach(r=>{const i=e[r];let o=n;i.folder_labels.forEach(s=>{o.subfolders[s]===void 0&&(o.subfolders[s]={inputs:[],subfolders:{}}),o=o.subfolders[s]}),o.inputs.push(i)}),I.jsx(I.Fragment,{children:I.jsx(hq,{folder:n})})}function hq({folder:t}){return I.jsxs(vb,{spacing:"xs",pt:"0.25rem",children:[t.inputs.map(e=>I.jsx(NLe,{conf:e},e.id)),I.jsx(tc,{chevronPosition:"right",multiple:!0,defaultValue:[...Object.keys(t.subfolders)],styles:e=>({label:{padding:"0.625rem 0.2rem"},item:{border:0},control:{paddingLeft:0},content:{borderLeft:"1px solid",borderLeftColor:e.colorScheme==="light"?e.colors.gray[3]:e.colors.dark[5],paddingRight:"0",paddingLeft:"0.5rem",paddingBottom:0,paddingTop:0,marginBottom:"0.5rem",marginLeft:"0.05rem"}}),children:Object.keys(t.subfolders).map(e=>I.jsxs(tc.Item,{value:e,children:[I.jsx(tc.Control,{children:e}),I.jsx(tc.Panel,{children:I.jsx(hq,{folder:t.subfolders[e]})})]},e))})]})}function NLe({conf:t}){const e=H.useContext(Ui),n=HS(e.websocketRef,50);function r(u){i(t.id,u),n({type:"GuiUpdateMessage",id:t.id,value:u})}const i=e.useGui(u=>u.setGuiValue),o=e.useGui(u=>u.guiValueFromId[t.id])??t.initial_value;let{visible:s,disabled:a}=e.useGui(u=>u.guiAttributeFromId[t.id])||{};if(s=s??!0,a=a??!1,!s)return I.jsx(I.Fragment,{});let l=!0,c=null;switch(t.type){case"GuiAddButtonMessage":l=!1,c=I.jsx(Ds,{id:t.id,fullWidth:!0,onClick:()=>n({type:"GuiUpdateMessage",id:t.id,value:!0}),style:{height:"1.875rem"},disabled:a,size:"sm",children:t.label});break;case"GuiAddSliderMessage":c=I.jsxs(er,{justify:"space-between",children:[I.jsxs(Xe,{sx:{flexGrow:1},children:[I.jsx(IZ,{id:t.id,size:"sm",pt:"0.3rem",showLabelOnHover:!1,min:t.min,max:t.max,step:t.step??void 0,precision:t.precision,value:o,onChange:r,marks:[{value:t.min},{value:t.max}],disabled:a}),I.jsxs(er,{justify:"space-between",sx:{marginTop:"-0.2em"},children:[I.jsx(Si,{fz:"0.7rem",c:"dimmed",children:t.min}),I.jsx(Si,{fz:"0.7rem",c:"dimmed",children:t.max})]})]}),I.jsx(c1,{value:o,onChange:r,size:"xs",min:t.min,max:t.max,hideControls:!0,step:t.step??void 0,precision:t.precision,sx:{width:"3rem",height:"1rem",minHeight:"1rem"},styles:{input:{padding:"0.3rem"}},ml:"xs"})]});break;case"GuiAddNumberMessage":c=I.jsx(c1,{id:t.id,value:o??t.initial_value,precision:t.precision,min:t.min??void 0,max:t.max??void 0,step:t.step,size:"xs",onChange:r,disabled:a,stepHoldDelay:500,stepHoldInterval:u=>Math.max(1e3/u**2,25)});break;case"GuiAddTextMessage":c=I.jsx(Pc,{value:o??t.initial_value,size:"xs",onChange:u=>{r(u.target.value)},disabled:a});break;case"GuiAddCheckboxMessage":c=I.jsx(nv,{id:t.id,checked:o??t.initial_value,size:"xs",onChange:u=>{r(u.target.checked)},disabled:a});break;case"GuiAddVector2Message":c=I.jsx(BB,{id:t.id,n:2,value:o??t.initial_value,onChange:r,min:t.min,max:t.max,step:t.step,precision:t.precision,disabled:a});break;case"GuiAddVector3Message":c=I.jsx(BB,{id:t.id,n:3,value:o??t.initial_value,onChange:r,min:t.min,max:t.max,step:t.step,precision:t.precision,disabled:a});break;case"GuiAddDropdownMessage":c=I.jsx(iv,{id:t.id,value:o,data:t.options,onChange:r,searchable:!0,maxDropdownHeight:400});break;case"GuiAddRgbMessage":c=I.jsx(bT,{disabled:a,size:"xs",value:zLe(o),onChange:u=>r(ULe(u)),format:"hex"});break;case"GuiAddRgbaMessage":c=I.jsx(bT,{disabled:a,size:"xs",value:BLe(o),onChange:u=>r(HLe(u)),format:"hexa"});break;case"GuiAddButtonGroupMessage":c=I.jsx(er,{justify:"space-between",columnGap:"xs",children:t.options.map((u,d)=>I.jsx(Ds,{onClick:()=>n({type:"GuiUpdateMessage",id:t.id,value:u}),style:{flexGrow:1,width:0},disabled:a,compact:!0,size:"sm",variant:"outline",children:u},d))})}return t.hint!==null&&(c=I.jsx(tr,{label:t.hint,multiline:!0,w:"15rem",withArrow:!0,openDelay:500,children:I.jsx(Xe,{children:c})})),l?I.jsx(FLe,{id:t.id,label:t.label,input:c}):c}function BB(t){return I.jsx(er,{justify:"space-between",style:{columnGap:"0.3rem"},children:[...Array(t.n).keys()].map(e=>I.jsx(c1,{id:e===0?t.id:void 0,value:t.value[e],onChange:n=>{const r=[...t.value];r[e]=n===""?0:n,t.onChange(r)},size:"xs",styles:{root:{flexGrow:1,width:0},input:{paddingLeft:"0.3rem",paddingRight:"1.1rem",textAlign:"right"},rightSection:{width:"1.0rem"},control:{width:"0.875rem"}},precision:t.precision,step:t.step,min:t.min===null?void 0:t.min[e],max:t.max===null?void 0:t.max[e],stepHoldDelay:500,stepHoldInterval:n=>Math.max(1e3/n**2,25),disabled:t.disabled},e))})}function FLe(t){return I.jsxs(er,{align:"center",children:[I.jsx(Xe,{w:"6em",pr:"xs",children:I.jsx(Si,{c:"dimmed",fz:"sm",lh:"1.15em",unselectable:"off",sx:{wordWrap:"break-word"},children:I.jsxs("label",{htmlFor:t.id,children:[" ",t.label]})})}),I.jsx(Xe,{sx:{flexGrow:1},children:t.input})]})}function zLe([t,e,n]){const r=t.toString(16).padStart(2,"0"),i=e.toString(16).padStart(2,"0"),o=n.toString(16).padStart(2,"0");return`#${r}${i}${o}`}function ULe(t){const e=t.slice(1),n=parseInt(e.substring(0,2),16),r=parseInt(e.substring(2,4),16),i=parseInt(e.substring(4,6),16);return[n,r,i]}function BLe([t,e,n,r]){const i=t.toString(16).padStart(2,"0"),o=e.toString(16).padStart(2,"0"),s=n.toString(16).padStart(2,"0"),a=r.toString(16).padStart(2,"0");return`#${i}${o}${s}${a}`}function HLe(t){const e=t.slice(1),n=parseInt(e.substring(0,2),16),r=parseInt(e.substring(2,4),16),i=parseInt(e.substring(4,6),16),o=parseInt(e.substring(6,8),16);return[n,r,i,o]}var VLe={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"},jLe=Object.defineProperty,$Le=Object.defineProperties,GLe=Object.getOwnPropertyDescriptors,A1=Object.getOwnPropertySymbols,pq=Object.prototype.hasOwnProperty,mq=Object.prototype.propertyIsEnumerable,HB=(t,e,n)=>e in t?jLe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,VB=(t,e)=>{for(var n in e||(e={}))pq.call(e,n)&&HB(t,n,e[n]);if(A1)for(var n of A1(e))mq.call(e,n)&&HB(t,n,e[n]);return t},WLe=(t,e)=>$Le(t,GLe(e)),YLe=(t,e)=>{var n={};for(var r in t)pq.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&A1)for(var r of A1(t))e.indexOf(r)<0&&mq.call(t,r)&&(n[r]=t[r]);return n},nn=(t,e,n)=>{const r=M.forwardRef((i,o)=>{var s=i,{color:a="currentColor",size:l=24,stroke:c=2,children:u}=s,d=YLe(s,["color","size","stroke","children"]);return M.createElement("svg",VB(WLe(VB({ref:o},VLe),{width:l,height:l,stroke:a,strokeWidth:c,className:`tabler-icon tabler-icon-${t}`}),d),[...n.map(([f,h])=>M.createElement(f,h)),...u||[]])});return r.propTypes={color:Jo.string,size:Jo.oneOfType([Jo.string,Jo.number]),stroke:Jo.oneOfType([Jo.string,Jo.number])},r.displayName=`${e}`,r},XLe=nn("adjustments","IconAdjustments",[["path",{d:"M4 10a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M6 4v4",key:"svg-1"}],["path",{d:"M6 12v8",key:"svg-2"}],["path",{d:"M10 16a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-3"}],["path",{d:"M12 4v10",key:"svg-4"}],["path",{d:"M12 18v2",key:"svg-5"}],["path",{d:"M16 7a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-6"}],["path",{d:"M18 4v1",key:"svg-7"}],["path",{d:"M18 9v11",key:"svg-8"}]]),ZLe=nn("arrow-autofit-content","IconArrowAutofitContent",[["path",{d:"M6 4l-3 3l3 3",key:"svg-0"}],["path",{d:"M18 4l3 3l-3 3",key:"svg-1"}],["path",{d:"M4 14m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z",key:"svg-2"}],["path",{d:"M10 7h-7",key:"svg-3"}],["path",{d:"M21 7h-7",key:"svg-4"}]]),qLe=nn("arrows-sort","IconArrowsSort",[["path",{d:"M3 9l4 -4l4 4m-4 -4v14",key:"svg-0"}],["path",{d:"M21 15l-4 4l-4 -4m4 4v-14",key:"svg-1"}]]),KLe=nn("baseline-density-large","IconBaselineDensityLarge",[["path",{d:"M4 4h16",key:"svg-0"}],["path",{d:"M4 20h16",key:"svg-1"}]]),QLe=nn("baseline-density-medium","IconBaselineDensityMedium",[["path",{d:"M4 20h16",key:"svg-0"}],["path",{d:"M4 12h16",key:"svg-1"}],["path",{d:"M4 4h16",key:"svg-2"}]]),JLe=nn("baseline-density-small","IconBaselineDensitySmall",[["path",{d:"M4 3h16",key:"svg-0"}],["path",{d:"M4 9h16",key:"svg-1"}],["path",{d:"M4 15h16",key:"svg-2"}],["path",{d:"M4 21h16",key:"svg-3"}]]),eke=nn("binary-tree-2","IconBinaryTree2",[["path",{d:"M14 6a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z",key:"svg-0"}],["path",{d:"M7 14a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z",key:"svg-1"}],["path",{d:"M21 14a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z",key:"svg-2"}],["path",{d:"M14 18a2 2 0 1 0 -4 0a2 2 0 0 0 4 0z",key:"svg-3"}],["path",{d:"M12 8v8",key:"svg-4"}],["path",{d:"M6.316 12.496l4.368 -4.992",key:"svg-5"}],["path",{d:"M17.684 12.496l-4.366 -4.99",key:"svg-6"}]]),tke=nn("box-multiple","IconBoxMultiple",[["path",{d:"M7 3m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M17 17v2a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-10a2 2 0 0 1 2 -2h2",key:"svg-1"}]]),nke=nn("brand-github","IconBrandGithub",[["path",{d:"M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5",key:"svg-0"}]]),gq=nn("caret-down","IconCaretDown",[["path",{d:"M6 10l6 6l6 -6h-12",key:"svg-0"}]]),rke=nn("caret-right","IconCaretRight",[["path",{d:"M10 18l6 -6l-6 -6v12",key:"svg-0"}]]),ike=nn("caret-up","IconCaretUp",[["path",{d:"M18 14l-6 -6l-6 6h12",key:"svg-0"}]]),oke=nn("chevron-down","IconChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]),ske=nn("chevron-left","IconChevronLeft",[["path",{d:"M15 6l-6 6l6 6",key:"svg-0"}]]),ake=nn("chevron-right","IconChevronRight",[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]]),lke=nn("chevrons-down","IconChevronsDown",[["path",{d:"M7 7l5 5l5 -5",key:"svg-0"}],["path",{d:"M7 13l5 5l5 -5",key:"svg-1"}]]),cke=nn("circle-x","IconCircleX",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M10 10l4 4m0 -4l-4 4",key:"svg-1"}]]),uke=nn("clear-all","IconClearAll",[["path",{d:"M8 6h12",key:"svg-0"}],["path",{d:"M6 12h12",key:"svg-1"}],["path",{d:"M4 18h12",key:"svg-2"}]]),dke=nn("cloud-check","IconCloudCheck",[["path",{d:"M11 18.004h-4.343c-2.572 -.004 -4.657 -2.011 -4.657 -4.487c0 -2.475 2.085 -4.482 4.657 -4.482c.393 -1.762 1.794 -3.2 3.675 -3.773c1.88 -.572 3.956 -.193 5.444 1c1.488 1.19 2.162 3.007 1.77 4.769h.99c1.388 0 2.585 .82 3.138 2.007",key:"svg-0"}],["path",{d:"M15 19l2 2l4 -4",key:"svg-1"}]]),fke=nn("cloud-off","IconCloudOff",[["path",{d:"M9.58 5.548c.24 -.11 .492 -.207 .752 -.286c1.88 -.572 3.956 -.193 5.444 1c1.488 1.19 2.162 3.007 1.77 4.769h.99c1.913 0 3.464 1.56 3.464 3.486c0 .957 -.383 1.824 -1.003 2.454m-2.997 1.033h-11.343c-2.572 -.004 -4.657 -2.011 -4.657 -4.487c0 -2.475 2.085 -4.482 4.657 -4.482c.13 -.582 .37 -1.128 .7 -1.62",key:"svg-0"}],["path",{d:"M3 3l18 18",key:"svg-1"}]]),hke=nn("columns","IconColumns",[["path",{d:"M4 6l5.5 0",key:"svg-0"}],["path",{d:"M4 10l5.5 0",key:"svg-1"}],["path",{d:"M4 14l5.5 0",key:"svg-2"}],["path",{d:"M4 18l5.5 0",key:"svg-3"}],["path",{d:"M14.5 6l5.5 0",key:"svg-4"}],["path",{d:"M14.5 10l5.5 0",key:"svg-5"}],["path",{d:"M14.5 14l5.5 0",key:"svg-6"}],["path",{d:"M14.5 18l5.5 0",key:"svg-7"}]]),pke=nn("device-floppy","IconDeviceFloppy",[["path",{d:"M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2",key:"svg-0"}],["path",{d:"M12 14m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-1"}],["path",{d:"M14 4l0 4l-6 0l0 -4",key:"svg-2"}]]),mke=nn("dots-vertical","IconDotsVertical",[["path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]]),gke=nn("dots","IconDots",[["path",{d:"M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]]),vke=nn("edit","IconEdit",[["path",{d:"M7 7h-1a2 2 0 0 0 -2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2 -2v-1",key:"svg-0"}],["path",{d:"M20.385 6.585a2.1 2.1 0 0 0 -2.97 -2.97l-8.415 8.385v3h3l8.385 -8.415z",key:"svg-1"}],["path",{d:"M16 5l3 3",key:"svg-2"}]]),kT=nn("eye-off","IconEyeOff",[["path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828",key:"svg-0"}],["path",{d:"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87",key:"svg-1"}],["path",{d:"M3 3l18 18",key:"svg-2"}]]),jB=nn("eye","IconEye",[["path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6",key:"svg-1"}]]),yke=nn("file-description","IconFileDescription",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M9 17h6",key:"svg-2"}],["path",{d:"M9 13h6",key:"svg-3"}]]),_ke=nn("filter-off","IconFilterOff",[["path",{d:"M8 4h12v2.172a2 2 0 0 1 -.586 1.414l-3.914 3.914m-.5 3.5v4l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227",key:"svg-0"}],["path",{d:"M3 3l18 18",key:"svg-1"}]]),xke=nn("filter","IconFilter",[["path",{d:"M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227z",key:"svg-0"}]]),wke=nn("grip-horizontal","IconGripHorizontal",[["path",{d:"M5 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M5 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M12 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}],["path",{d:"M12 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-3"}],["path",{d:"M19 9m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-4"}],["path",{d:"M19 15m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-5"}]]),Ske=nn("keyboard","IconKeyboard",[["path",{d:"M2 6m0 2a2 2 0 0 1 2 -2h16a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-16a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M6 10l0 .01",key:"svg-1"}],["path",{d:"M10 10l0 .01",key:"svg-2"}],["path",{d:"M14 10l0 .01",key:"svg-3"}],["path",{d:"M18 10l0 .01",key:"svg-4"}],["path",{d:"M6 14l0 .01",key:"svg-5"}],["path",{d:"M18 14l0 .01",key:"svg-6"}],["path",{d:"M10 14l4 .01",key:"svg-7"}]]),vq=nn("maximize","IconMaximize",[["path",{d:"M4 8v-2a2 2 0 0 1 2 -2h2",key:"svg-0"}],["path",{d:"M4 16v2a2 2 0 0 0 2 2h2",key:"svg-1"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v2",key:"svg-2"}],["path",{d:"M16 20h2a2 2 0 0 0 2 -2v-2",key:"svg-3"}]]),bke=nn("minimize","IconMinimize",[["path",{d:"M15 19v-2a2 2 0 0 1 2 -2h2",key:"svg-0"}],["path",{d:"M15 5v2a2 2 0 0 0 2 2h2",key:"svg-1"}],["path",{d:"M5 15h2a2 2 0 0 1 2 2v2",key:"svg-2"}],["path",{d:"M5 9h2a2 2 0 0 0 2 -2v-2",key:"svg-3"}]]),Mke=nn("photo","IconPhoto",[["path",{d:"M15 8h.01",key:"svg-0"}],["path",{d:"M3 6a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3v-12z",key:"svg-1"}],["path",{d:"M3 16l5 -5c.928 -.893 2.072 -.893 3 0l5 5",key:"svg-2"}],["path",{d:"M14 14l1 -1c.928 -.893 2.072 -.893 3 0l3 3",key:"svg-3"}]]),Eke=nn("pinned-off","IconPinnedOff",[["path",{d:"M3 3l18 18",key:"svg-0"}],["path",{d:"M15 4.5l-3.249 3.249m-2.57 1.433l-2.181 .818l-1.5 1.5l7 7l1.5 -1.5l.82 -2.186m1.43 -2.563l3.25 -3.251",key:"svg-1"}],["path",{d:"M9 15l-4.5 4.5",key:"svg-2"}],["path",{d:"M14.5 4l5.5 5.5",key:"svg-3"}]]),Pke=nn("pinned","IconPinned",[["path",{d:"M9 4v6l-2 4v2h10v-2l-2 -4v-6",key:"svg-0"}],["path",{d:"M12 16l0 5",key:"svg-1"}],["path",{d:"M8 4l8 0",key:"svg-2"}]]),Cke=nn("search-off","IconSearchOff",[["path",{d:"M5.039 5.062a7 7 0 0 0 9.91 9.89m1.584 -2.434a7 7 0 0 0 -9.038 -9.057",key:"svg-0"}],["path",{d:"M3 3l18 18",key:"svg-1"}]]),Tke=nn("search","IconSearch",[["path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}]]),Oke=nn("sort-ascending","IconSortAscending",[["path",{d:"M4 6l7 0",key:"svg-0"}],["path",{d:"M4 12l7 0",key:"svg-1"}],["path",{d:"M4 18l9 0",key:"svg-2"}],["path",{d:"M15 9l3 -3l3 3",key:"svg-3"}],["path",{d:"M18 6l0 12",key:"svg-4"}]]),Rke=nn("sort-descending","IconSortDescending",[["path",{d:"M4 6l9 0",key:"svg-0"}],["path",{d:"M4 12l7 0",key:"svg-1"}],["path",{d:"M4 18l7 0",key:"svg-2"}],["path",{d:"M15 15l3 3l3 -3",key:"svg-3"}],["path",{d:"M18 6l0 12",key:"svg-4"}]]),Ake=nn("tool","IconTool",[["path",{d:"M7 10h3v-3l-3.5 -3.5a6 6 0 0 1 8 8l6 6a2 2 0 0 1 -3 3l-6 -6a6 6 0 0 1 -8 -8l3.5 3.5",key:"svg-0"}]]),Dke=nn("x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);/** * table-core * * Copyright (c) TanStack @@ -5692,10 +5673,10 @@ void main() { * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function rc(t,e){return typeof t=="function"?t(e):t}function fs(t,e){return n=>{e.setState(r=>({...r,[t]:rc(n,r[t])}))}}function D1(t){return t instanceof Function}function Xke(t){return Array.isArray(t)&&t.every(e=>typeof e=="number")}function _q(t,e){const n=[],r=i=>{i.forEach(o=>{n.push(o);const s=e(o);s!=null&&s.length&&r(s)})};return r(t),n}function Zt(t,e,n){let r=[],i;return()=>{let o;n.key&&n.debug&&(o=Date.now());const s=t();if(!(s.length!==r.length||s.some((c,u)=>r[u]!==c)))return i;r=s;let l;if(n.key&&n.debug&&(l=Date.now()),i=e(...s),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const c=Math.round((Date.now()-o)*100)/100,u=Math.round((Date.now()-l)*100)/100,d=u/16,f=(h,g)=>{for(h=String(h);h.length{e.setState(r=>({...r,[t]:rc(n,r[t])}))}}function D1(t){return t instanceof Function}function Ike(t){return Array.isArray(t)&&t.every(e=>typeof e=="number")}function yq(t,e){const n=[],r=i=>{i.forEach(o=>{n.push(o);const s=e(o);s!=null&&s.length&&r(s)})};return r(t),n}function Zt(t,e,n){let r=[],i;return()=>{let o;n.key&&n.debug&&(o=Date.now());const s=t();if(!(s.length!==r.length||s.some((c,u)=>r[u]!==c)))return i;r=s;let l;if(n.key&&n.debug&&(l=Date.now()),i=e(...s),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const c=Math.round((Date.now()-o)*100)/100,u=Math.round((Date.now()-l)*100)/100,d=u/16,f=(h,g)=>{for(h=String(h);h.length{let h=f;for(const y of l.split(".")){var g;h=(g=h)==null?void 0:g[y]}return h}:u=f=>f[a.accessorKey]),!c)throw new Error;let d={id:`${String(c)}`,accessorFn:u,parent:r,depth:n,columnDef:a,columns:[],getFlatColumns:Zt(()=>[!0],()=>{var f;return[d,...(f=d.columns)==null?void 0:f.flatMap(h=>h.getFlatColumns())]},{key:"column.getFlatColumns",debug:()=>{var f;return(f=t.options.debugAll)!=null?f:t.options.debugColumns}}),getLeafColumns:Zt(()=>[t._getOrderColumnsFn()],f=>{var h;if((h=d.columns)!=null&&h.length){let g=d.columns.flatMap(y=>y.getLeafColumns());return f(g)}return[d]},{key:"column.getLeafColumns",debug:()=>{var f;return(f=t.options.debugAll)!=null?f:t.options.debugColumns}})};return d=t._features.reduce((f,h)=>Object.assign(f,h.createColumn==null?void 0:h.createColumn(d,t)),d),d}function YB(t,e,n){var r;let o={id:(r=n.id)!=null?r:e.id,column:e,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const s=[],a=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(a),s.push(l)};return a(o),s},getContext:()=>({table:t,header:o,column:e})};return t._features.forEach(s=>{Object.assign(o,s.createHeader==null?void 0:s.createHeader(o,t))}),o}const qke={createTable:t=>({getHeaderGroups:Zt(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,n,r,i)=>{var o,s;const a=(o=r?.map(d=>n.find(f=>f.id===d)).filter(Boolean))!=null?o:[],l=(s=i?.map(d=>n.find(f=>f.id===d)).filter(Boolean))!=null?s:[],c=n.filter(d=>!(r!=null&&r.includes(d.id))&&!(i!=null&&i.includes(d.id)));return Qy(e,[...a,...c,...l],t)},{key:!1,debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),getCenterHeaderGroups:Zt(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,n,r,i)=>(n=n.filter(o=>!(r!=null&&r.includes(o.id))&&!(i!=null&&i.includes(o.id))),Qy(e,n,t,"center")),{key:!1,debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),getLeftHeaderGroups:Zt(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left],(e,n,r)=>{var i;const o=(i=r?.map(s=>n.find(a=>a.id===s)).filter(Boolean))!=null?i:[];return Qy(e,o,t,"left")},{key:!1,debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),getRightHeaderGroups:Zt(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.right],(e,n,r)=>{var i;const o=(i=r?.map(s=>n.find(a=>a.id===s)).filter(Boolean))!=null?i:[];return Qy(e,o,t,"right")},{key:!1,debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),getFooterGroups:Zt(()=>[t.getHeaderGroups()],e=>[...e].reverse(),{key:!1,debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),getLeftFooterGroups:Zt(()=>[t.getLeftHeaderGroups()],e=>[...e].reverse(),{key:!1,debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),getCenterFooterGroups:Zt(()=>[t.getCenterHeaderGroups()],e=>[...e].reverse(),{key:!1,debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),getRightFooterGroups:Zt(()=>[t.getRightHeaderGroups()],e=>[...e].reverse(),{key:!1,debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),getFlatHeaders:Zt(()=>[t.getHeaderGroups()],e=>e.map(n=>n.headers).flat(),{key:!1,debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),getLeftFlatHeaders:Zt(()=>[t.getLeftHeaderGroups()],e=>e.map(n=>n.headers).flat(),{key:!1,debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),getCenterFlatHeaders:Zt(()=>[t.getCenterHeaderGroups()],e=>e.map(n=>n.headers).flat(),{key:!1,debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),getRightFlatHeaders:Zt(()=>[t.getRightHeaderGroups()],e=>e.map(n=>n.headers).flat(),{key:!1,debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),getCenterLeafHeaders:Zt(()=>[t.getCenterFlatHeaders()],e=>e.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),{key:!1,debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),getLeftLeafHeaders:Zt(()=>[t.getLeftFlatHeaders()],e=>e.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),{key:!1,debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),getRightLeafHeaders:Zt(()=>[t.getRightFlatHeaders()],e=>e.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),{key:!1,debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),getLeafHeaders:Zt(()=>[t.getLeftHeaderGroups(),t.getCenterHeaderGroups(),t.getRightHeaderGroups()],(e,n,r)=>{var i,o,s,a,l,c;return[...(i=(o=e[0])==null?void 0:o.headers)!=null?i:[],...(s=(a=n[0])==null?void 0:a.headers)!=null?s:[],...(l=(c=r[0])==null?void 0:c.headers)!=null?l:[]].map(u=>u.getLeafHeaders()).flat()},{key:!1,debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}})})};function Qy(t,e,n,r){var i,o;let s=0;const a=function(f,h){h===void 0&&(h=1),s=Math.max(s,h),f.filter(g=>g.getIsVisible()).forEach(g=>{var y;(y=g.columns)!=null&&y.length&&a(g.columns,h+1)},0)};a(t);let l=[];const c=(f,h)=>{const g={depth:h,id:[r,`${h}`].filter(Boolean).join("_"),headers:[]},y=[];f.forEach(_=>{const v=[...y].reverse()[0],x=_.column.depth===g.depth;let w,S=!1;if(x&&_.column.parent?w=_.column.parent:(w=_.column,S=!0),v&&v?.column===w)v.subHeaders.push(_);else{const E=YB(n,w,{id:[r,h,w.id,_?.id].filter(Boolean).join("_"),isPlaceholder:S,placeholderId:S?`${y.filter(C=>C.column===w).length}`:void 0,depth:h,index:y.length});E.subHeaders.push(_),y.push(E)}g.headers.push(_),_.headerGroup=g}),l.push(g),h>0&&c(y,h-1)},u=e.map((f,h)=>YB(n,f,{depth:s,index:h}));c(u,s-1),l.reverse();const d=f=>f.filter(g=>g.column.getIsVisible()).map(g=>{let y=0,_=0,v=[0];g.subHeaders&&g.subHeaders.length?(v=[],d(g.subHeaders).forEach(w=>{let{colSpan:S,rowSpan:E}=w;y+=S,v.push(E)})):y=1;const x=Math.min(...v);return _=_+x,g.colSpan=y,g.rowSpan=_,{colSpan:y,rowSpan:_}});return d((i=(o=l[0])==null?void 0:o.headers)!=null?i:[]),l}const Jy={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},YP=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Kke={getDefaultColumnDef:()=>Jy,getInitialState:t=>({columnSizing:{},columnSizingInfo:YP(),...t}),getDefaultOptions:t=>({columnResizeMode:"onEnd",onColumnSizingChange:fs("columnSizing",t),onColumnSizingInfoChange:fs("columnSizingInfo",t)}),createColumn:(t,e)=>({getSize:()=>{var n,r,i;const o=e.getState().columnSizing[t.id];return Math.min(Math.max((n=t.columnDef.minSize)!=null?n:Jy.minSize,(r=o??t.columnDef.size)!=null?r:Jy.size),(i=t.columnDef.maxSize)!=null?i:Jy.maxSize)},getStart:n=>{const r=n?n==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns(),i=r.findIndex(o=>o.id===t.id);if(i>0){const o=r[i-1];return o.getStart(n)+o.getSize()}return 0},resetSize:()=>{e.setColumnSizing(n=>{let{[t.id]:r,...i}=n;return i})},getCanResize:()=>{var n,r;return((n=t.columnDef.enableResizing)!=null?n:!0)&&((r=e.options.enableColumnResizing)!=null?r:!0)},getIsResizing:()=>e.getState().columnSizingInfo.isResizingColumn===t.id}),createHeader:(t,e)=>({getSize:()=>{let n=0;const r=i=>{if(i.subHeaders.length)i.subHeaders.forEach(r);else{var o;n+=(o=i.column.getSize())!=null?o:0}};return r(t),n},getStart:()=>{if(t.index>0){const n=t.headerGroup.headers[t.index-1];return n.getStart()+n.getSize()}return 0},getResizeHandler:()=>{const n=e.getColumn(t.column.id),r=n?.getCanResize();return i=>{if(!n||!r||(i.persist==null||i.persist(),XP(i)&&i.touches&&i.touches.length>1))return;const o=t.getSize(),s=t?t.getLeafHeaders().map(y=>[y.column.id,y.column.getSize()]):[[n.id,n.getSize()]],a=XP(i)?Math.round(i.touches[0].clientX):i.clientX,l={},c=(y,_)=>{typeof _=="number"&&(e.setColumnSizingInfo(v=>{var x,w;const S=_-((x=v?.startOffset)!=null?x:0),E=Math.max(S/((w=v?.startSize)!=null?w:0),-.999999);return v.columnSizingStart.forEach(C=>{let[O,R]=C;l[O]=Math.round(Math.max(R+R*E,0)*100)/100}),{...v,deltaOffset:S,deltaPercentage:E}}),(e.options.columnResizeMode==="onChange"||y==="end")&&e.setColumnSizing(v=>({...v,...l})))},u=y=>c("move",y),d=y=>{c("end",y),e.setColumnSizingInfo(_=>({..._,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},f={moveHandler:y=>u(y.clientX),upHandler:y=>{document.removeEventListener("mousemove",f.moveHandler),document.removeEventListener("mouseup",f.upHandler),d(y.clientX)}},h={moveHandler:y=>(y.cancelable&&(y.preventDefault(),y.stopPropagation()),u(y.touches[0].clientX),!1),upHandler:y=>{var _;document.removeEventListener("touchmove",h.moveHandler),document.removeEventListener("touchend",h.upHandler),y.cancelable&&(y.preventDefault(),y.stopPropagation()),d((_=y.touches[0])==null?void 0:_.clientX)}},g=Qke()?{passive:!1}:!1;XP(i)?(document.addEventListener("touchmove",h.moveHandler,g),document.addEventListener("touchend",h.upHandler,g)):(document.addEventListener("mousemove",f.moveHandler,g),document.addEventListener("mouseup",f.upHandler,g)),e.setColumnSizingInfo(y=>({...y,startOffset:a,startSize:o,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,isResizingColumn:n.id}))}}}),createTable:t=>({setColumnSizing:e=>t.options.onColumnSizingChange==null?void 0:t.options.onColumnSizingChange(e),setColumnSizingInfo:e=>t.options.onColumnSizingInfoChange==null?void 0:t.options.onColumnSizingInfoChange(e),resetColumnSizing:e=>{var n;t.setColumnSizing(e?{}:(n=t.initialState.columnSizing)!=null?n:{})},resetHeaderSizeInfo:e=>{var n;t.setColumnSizingInfo(e?YP():(n=t.initialState.columnSizingInfo)!=null?n:YP())},getTotalSize:()=>{var e,n;return(e=(n=t.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?e:0},getLeftTotalSize:()=>{var e,n;return(e=(n=t.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?e:0},getCenterTotalSize:()=>{var e,n;return(e=(n=t.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?e:0},getRightTotalSize:()=>{var e,n;return(e=(n=t.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?e:0}})};let e_=null;function Qke(){if(typeof e_=="boolean")return e_;let t=!1;try{const e={get passive(){return t=!0,!1}},n=()=>{};window.addEventListener("test",n,e),window.removeEventListener("test",n)}catch{t=!1}return e_=t,e_}function XP(t){return t.type==="touchstart"}const Jke={getInitialState:t=>({expanded:{},...t}),getDefaultOptions:t=>({onExpandedChange:fs("expanded",t),paginateExpandedRows:!0}),createTable:t=>{let e=!1,n=!1;return{_autoResetExpanded:()=>{var r,i;if(!e){t._queue(()=>{e=!0});return}if((r=(i=t.options.autoResetAll)!=null?i:t.options.autoResetExpanded)!=null?r:!t.options.manualExpanding){if(n)return;n=!0,t._queue(()=>{t.resetExpanded(),n=!1})}},setExpanded:r=>t.options.onExpandedChange==null?void 0:t.options.onExpandedChange(r),toggleAllRowsExpanded:r=>{r??!t.getIsAllRowsExpanded()?t.setExpanded(!0):t.setExpanded({})},resetExpanded:r=>{var i,o;t.setExpanded(r?{}:(i=(o=t.initialState)==null?void 0:o.expanded)!=null?i:{})},getCanSomeRowsExpand:()=>t.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),getToggleAllRowsExpandedHandler:()=>r=>{r.persist==null||r.persist(),t.toggleAllRowsExpanded()},getIsSomeRowsExpanded:()=>{const r=t.getState().expanded;return r===!0||Object.values(r).some(Boolean)},getIsAllRowsExpanded:()=>{const r=t.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||t.getRowModel().flatRows.some(i=>!i.getIsExpanded()))},getExpandedDepth:()=>{let r=0;return(t.getState().expanded===!0?Object.keys(t.getRowModel().rowsById):Object.keys(t.getState().expanded)).forEach(o=>{const s=o.split(".");r=Math.max(r,s.length)}),r},getPreExpandedRowModel:()=>t.getSortedRowModel(),getExpandedRowModel:()=>(!t._getExpandedRowModel&&t.options.getExpandedRowModel&&(t._getExpandedRowModel=t.options.getExpandedRowModel(t)),t.options.manualExpanding||!t._getExpandedRowModel?t.getPreExpandedRowModel():t._getExpandedRowModel())}},createRow:(t,e)=>({toggleExpanded:n=>{e.setExpanded(r=>{var i;const o=r===!0?!0:!!(r!=null&&r[t.id]);let s={};if(r===!0?Object.keys(e.getRowModel().rowsById).forEach(a=>{s[a]=!0}):s=r,n=(i=n)!=null?i:!o,!o&&n)return{...s,[t.id]:!0};if(o&&!n){const{[t.id]:a,...l}=s;return l}return r})},getIsExpanded:()=>{var n;const r=e.getState().expanded;return!!((n=e.options.getIsRowExpanded==null?void 0:e.options.getIsRowExpanded(t))!=null?n:r===!0||r?.[t.id])},getCanExpand:()=>{var n,r,i;return(n=e.options.getRowCanExpand==null?void 0:e.options.getRowCanExpand(t))!=null?n:((r=e.options.enableExpanding)!=null?r:!0)&&!!((i=t.subRows)!=null&&i.length)},getToggleExpandedHandler:()=>{const n=t.getCanExpand();return()=>{n&&t.toggleExpanded()}}})},xq=(t,e,n)=>{var r,i,o;const s=n.toLowerCase();return!!(!((r=t.getValue(e))==null||(i=r.toString())==null||(o=i.toLowerCase())==null)&&o.includes(s))};xq.autoRemove=t=>Bs(t);const wq=(t,e,n)=>{var r,i;return!!(!((r=t.getValue(e))==null||(i=r.toString())==null)&&i.includes(n))};wq.autoRemove=t=>Bs(t);const Sq=(t,e,n)=>{var r,i;return((r=t.getValue(e))==null||(i=r.toString())==null?void 0:i.toLowerCase())===n?.toLowerCase()};Sq.autoRemove=t=>Bs(t);const bq=(t,e,n)=>{var r;return(r=t.getValue(e))==null?void 0:r.includes(n)};bq.autoRemove=t=>Bs(t)||!(t!=null&&t.length);const Mq=(t,e,n)=>!n.some(r=>{var i;return!((i=t.getValue(e))!=null&&i.includes(r))});Mq.autoRemove=t=>Bs(t)||!(t!=null&&t.length);const Eq=(t,e,n)=>n.some(r=>{var i;return(i=t.getValue(e))==null?void 0:i.includes(r)});Eq.autoRemove=t=>Bs(t)||!(t!=null&&t.length);const Pq=(t,e,n)=>t.getValue(e)===n;Pq.autoRemove=t=>Bs(t);const Cq=(t,e,n)=>t.getValue(e)==n;Cq.autoRemove=t=>Bs(t);const zA=(t,e,n)=>{let[r,i]=n;const o=t.getValue(e);return o>=r&&o<=i};zA.resolveFilterValue=t=>{let[e,n]=t,r=typeof e!="number"?parseFloat(e):e,i=typeof n!="number"?parseFloat(n):n,o=e===null||Number.isNaN(r)?-1/0:r,s=n===null||Number.isNaN(i)?1/0:i;if(o>s){const a=o;o=s,s=a}return[o,s]};zA.autoRemove=t=>Bs(t)||Bs(t[0])&&Bs(t[1]);const ua={includesString:xq,includesStringSensitive:wq,equalsString:Sq,arrIncludes:bq,arrIncludesAll:Mq,arrIncludesSome:Eq,equals:Pq,weakEquals:Cq,inNumberRange:zA};function Bs(t){return t==null||t===""}const eNe={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:t=>({columnFilters:[],globalFilter:void 0,...t}),getDefaultOptions:t=>({onColumnFiltersChange:fs("columnFilters",t),onGlobalFilterChange:fs("globalFilter",t),filterFromLeafRows:!1,maxLeafRowFilterDepth:100,globalFilterFn:"auto",getColumnCanGlobalFilter:e=>{var n,r;const i=(n=t.getCoreRowModel().flatRows[0])==null||(r=n._getAllCellsByColumnId()[e.id])==null?void 0:r.getValue();return typeof i=="string"||typeof i=="number"}}),createColumn:(t,e)=>({getAutoFilterFn:()=>{const n=e.getCoreRowModel().flatRows[0],r=n?.getValue(t.id);return typeof r=="string"?ua.includesString:typeof r=="number"?ua.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?ua.equals:Array.isArray(r)?ua.arrIncludes:ua.weakEquals},getFilterFn:()=>{var n,r;return D1(t.columnDef.filterFn)?t.columnDef.filterFn:t.columnDef.filterFn==="auto"?t.getAutoFilterFn():(n=(r=e.options.filterFns)==null?void 0:r[t.columnDef.filterFn])!=null?n:ua[t.columnDef.filterFn]},getCanFilter:()=>{var n,r,i;return((n=t.columnDef.enableColumnFilter)!=null?n:!0)&&((r=e.options.enableColumnFilters)!=null?r:!0)&&((i=e.options.enableFilters)!=null?i:!0)&&!!t.accessorFn},getCanGlobalFilter:()=>{var n,r,i,o;return((n=t.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=e.options.enableGlobalFilter)!=null?r:!0)&&((i=e.options.enableFilters)!=null?i:!0)&&((o=e.options.getColumnCanGlobalFilter==null?void 0:e.options.getColumnCanGlobalFilter(t))!=null?o:!0)&&!!t.accessorFn},getIsFiltered:()=>t.getFilterIndex()>-1,getFilterValue:()=>{var n,r;return(n=e.getState().columnFilters)==null||(r=n.find(i=>i.id===t.id))==null?void 0:r.value},getFilterIndex:()=>{var n,r;return(n=(r=e.getState().columnFilters)==null?void 0:r.findIndex(i=>i.id===t.id))!=null?n:-1},setFilterValue:n=>{e.setColumnFilters(r=>{const i=t.getFilterFn(),o=r?.find(u=>u.id===t.id),s=rc(n,o?o.value:void 0);if(XB(i,s,t)){var a;return(a=r?.filter(u=>u.id!==t.id))!=null?a:[]}const l={id:t.id,value:s};if(o){var c;return(c=r?.map(u=>u.id===t.id?l:u))!=null?c:[]}return r!=null&&r.length?[...r,l]:[l]})},_getFacetedRowModel:e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,t.id),getFacetedRowModel:()=>t._getFacetedRowModel?t._getFacetedRowModel():e.getPreFilteredRowModel(),_getFacetedUniqueValues:e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,t.id),getFacetedUniqueValues:()=>t._getFacetedUniqueValues?t._getFacetedUniqueValues():new Map,_getFacetedMinMaxValues:e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,t.id),getFacetedMinMaxValues:()=>{if(t._getFacetedMinMaxValues)return t._getFacetedMinMaxValues()}}),createRow:(t,e)=>({columnFilters:{},columnFiltersMeta:{}}),createTable:t=>({getGlobalAutoFilterFn:()=>ua.includesString,getGlobalFilterFn:()=>{var e,n;const{globalFilterFn:r}=t.options;return D1(r)?r:r==="auto"?t.getGlobalAutoFilterFn():(e=(n=t.options.filterFns)==null?void 0:n[r])!=null?e:ua[r]},setColumnFilters:e=>{const n=t.getAllLeafColumns(),r=i=>{var o;return(o=rc(e,i))==null?void 0:o.filter(s=>{const a=n.find(l=>l.id===s.id);if(a){const l=a.getFilterFn();if(XB(l,s.value,a))return!1}return!0})};t.options.onColumnFiltersChange==null||t.options.onColumnFiltersChange(r)},setGlobalFilter:e=>{t.options.onGlobalFilterChange==null||t.options.onGlobalFilterChange(e)},resetGlobalFilter:e=>{t.setGlobalFilter(e?void 0:t.initialState.globalFilter)},resetColumnFilters:e=>{var n,r;t.setColumnFilters(e?[]:(n=(r=t.initialState)==null?void 0:r.columnFilters)!=null?n:[])},getPreFilteredRowModel:()=>t.getCoreRowModel(),getFilteredRowModel:()=>(!t._getFilteredRowModel&&t.options.getFilteredRowModel&&(t._getFilteredRowModel=t.options.getFilteredRowModel(t)),t.options.manualFiltering||!t._getFilteredRowModel?t.getPreFilteredRowModel():t._getFilteredRowModel()),_getGlobalFacetedRowModel:t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,"__global__"),getGlobalFacetedRowModel:()=>t.options.manualFiltering||!t._getGlobalFacetedRowModel?t.getPreFilteredRowModel():t._getGlobalFacetedRowModel(),_getGlobalFacetedUniqueValues:t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,"__global__"),getGlobalFacetedUniqueValues:()=>t._getGlobalFacetedUniqueValues?t._getGlobalFacetedUniqueValues():new Map,_getGlobalFacetedMinMaxValues:t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,"__global__"),getGlobalFacetedMinMaxValues:()=>{if(t._getGlobalFacetedMinMaxValues)return t._getGlobalFacetedMinMaxValues()}})};function XB(t,e,n){return(t&&t.autoRemove?t.autoRemove(e,n):!1)||typeof e>"u"||typeof e=="string"&&!e}const tNe=(t,e,n)=>n.reduce((r,i)=>{const o=i.getValue(t);return r+(typeof o=="number"?o:0)},0),nNe=(t,e,n)=>{let r;return n.forEach(i=>{const o=i.getValue(t);o!=null&&(r>o||r===void 0&&o>=o)&&(r=o)}),r},rNe=(t,e,n)=>{let r;return n.forEach(i=>{const o=i.getValue(t);o!=null&&(r=o)&&(r=o)}),r},iNe=(t,e,n)=>{let r,i;return n.forEach(o=>{const s=o.getValue(t);s!=null&&(r===void 0?s>=s&&(r=i=s):(r>s&&(r=s),i{let n=0,r=0;if(e.forEach(i=>{let o=i.getValue(t);o!=null&&(o=+o)>=o&&(++n,r+=o)}),n)return r/n},sNe=(t,e)=>{if(!e.length)return;const n=e.map(o=>o.getValue(t));if(!Xke(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),i=n.sort((o,s)=>o-s);return n.length%2!==0?i[r]:(i[r-1]+i[r])/2},aNe=(t,e)=>Array.from(new Set(e.map(n=>n.getValue(t))).values()),lNe=(t,e)=>new Set(e.map(n=>n.getValue(t))).size,cNe=(t,e)=>e.length,G_={sum:tNe,min:nNe,max:rNe,extent:iNe,mean:oNe,median:sNe,unique:aNe,uniqueCount:lNe,count:cNe},uNe={getDefaultColumnDef:()=>({aggregatedCell:t=>{var e,n;return(e=(n=t.getValue())==null||n.toString==null?void 0:n.toString())!=null?e:null},aggregationFn:"auto"}),getInitialState:t=>({grouping:[],...t}),getDefaultOptions:t=>({onGroupingChange:fs("grouping",t),groupedColumnMode:"reorder"}),createColumn:(t,e)=>({toggleGrouping:()=>{e.setGrouping(n=>n!=null&&n.includes(t.id)?n.filter(r=>r!==t.id):[...n??[],t.id])},getCanGroup:()=>{var n,r,i,o;return(n=(r=(i=(o=t.columnDef.enableGrouping)!=null?o:!0)!=null?i:e.options.enableGrouping)!=null?r:!0)!=null?n:!!t.accessorFn},getIsGrouped:()=>{var n;return(n=e.getState().grouping)==null?void 0:n.includes(t.id)},getGroupedIndex:()=>{var n;return(n=e.getState().grouping)==null?void 0:n.indexOf(t.id)},getToggleGroupingHandler:()=>{const n=t.getCanGroup();return()=>{n&&t.toggleGrouping()}},getAutoAggregationFn:()=>{const n=e.getCoreRowModel().flatRows[0],r=n?.getValue(t.id);if(typeof r=="number")return G_.sum;if(Object.prototype.toString.call(r)==="[object Date]")return G_.extent},getAggregationFn:()=>{var n,r;if(!t)throw new Error;return D1(t.columnDef.aggregationFn)?t.columnDef.aggregationFn:t.columnDef.aggregationFn==="auto"?t.getAutoAggregationFn():(n=(r=e.options.aggregationFns)==null?void 0:r[t.columnDef.aggregationFn])!=null?n:G_[t.columnDef.aggregationFn]}}),createTable:t=>({setGrouping:e=>t.options.onGroupingChange==null?void 0:t.options.onGroupingChange(e),resetGrouping:e=>{var n,r;t.setGrouping(e?[]:(n=(r=t.initialState)==null?void 0:r.grouping)!=null?n:[])},getPreGroupedRowModel:()=>t.getFilteredRowModel(),getGroupedRowModel:()=>(!t._getGroupedRowModel&&t.options.getGroupedRowModel&&(t._getGroupedRowModel=t.options.getGroupedRowModel(t)),t.options.manualGrouping||!t._getGroupedRowModel?t.getPreGroupedRowModel():t._getGroupedRowModel())}),createRow:(t,e)=>({getIsGrouped:()=>!!t.groupingColumnId,getGroupingValue:n=>{if(t._groupingValuesCache.hasOwnProperty(n))return t._groupingValuesCache[n];const r=e.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(t._groupingValuesCache[n]=r.columnDef.getGroupingValue(t.original),t._groupingValuesCache[n]):t.getValue(n)},_groupingValuesCache:{}}),createCell:(t,e,n,r)=>({getIsGrouped:()=>e.getIsGrouped()&&e.id===n.groupingColumnId,getIsPlaceholder:()=>!t.getIsGrouped()&&e.getIsGrouped(),getIsAggregated:()=>{var i;return!t.getIsGrouped()&&!t.getIsPlaceholder()&&!!((i=n.subRows)!=null&&i.length)}})};function dNe(t,e,n){if(!(e!=null&&e.length)||!n)return t;const r=t.filter(o=>!e.includes(o.id));return n==="remove"?r:[...e.map(o=>t.find(s=>s.id===o)).filter(Boolean),...r]}const fNe={getInitialState:t=>({columnOrder:[],...t}),getDefaultOptions:t=>({onColumnOrderChange:fs("columnOrder",t)}),createTable:t=>({setColumnOrder:e=>t.options.onColumnOrderChange==null?void 0:t.options.onColumnOrderChange(e),resetColumnOrder:e=>{var n;t.setColumnOrder(e?[]:(n=t.initialState.columnOrder)!=null?n:[])},_getOrderColumnsFn:Zt(()=>[t.getState().columnOrder,t.getState().grouping,t.options.groupedColumnMode],(e,n,r)=>i=>{let o=[];if(!(e!=null&&e.length))o=i;else{const s=[...e],a=[...i];for(;a.length&&s.length;){const l=s.shift(),c=a.findIndex(u=>u.id===l);c>-1&&o.push(a.splice(c,1)[0])}o=[...o,...a]}return dNe(o,n,r)},{key:!1})})},NT=0,FT=10,ZP=()=>({pageIndex:NT,pageSize:FT}),hNe={getInitialState:t=>({...t,pagination:{...ZP(),...t?.pagination}}),getDefaultOptions:t=>({onPaginationChange:fs("pagination",t)}),createTable:t=>{let e=!1,n=!1;return{_autoResetPageIndex:()=>{var r,i;if(!e){t._queue(()=>{e=!0});return}if((r=(i=t.options.autoResetAll)!=null?i:t.options.autoResetPageIndex)!=null?r:!t.options.manualPagination){if(n)return;n=!0,t._queue(()=>{t.resetPageIndex(),n=!1})}},setPagination:r=>{const i=o=>rc(r,o);return t.options.onPaginationChange==null?void 0:t.options.onPaginationChange(i)},resetPagination:r=>{var i;t.setPagination(r?ZP():(i=t.initialState.pagination)!=null?i:ZP())},setPageIndex:r=>{t.setPagination(i=>{let o=rc(r,i.pageIndex);const s=typeof t.options.pageCount>"u"||t.options.pageCount===-1?Number.MAX_SAFE_INTEGER:t.options.pageCount-1;return o=Math.max(0,Math.min(o,s)),{...i,pageIndex:o}})},resetPageIndex:r=>{var i,o,s;t.setPageIndex(r?NT:(i=(o=t.initialState)==null||(s=o.pagination)==null?void 0:s.pageIndex)!=null?i:NT)},resetPageSize:r=>{var i,o,s;t.setPageSize(r?FT:(i=(o=t.initialState)==null||(s=o.pagination)==null?void 0:s.pageSize)!=null?i:FT)},setPageSize:r=>{t.setPagination(i=>{const o=Math.max(1,rc(r,i.pageSize)),s=i.pageSize*i.pageIndex,a=Math.floor(s/o);return{...i,pageIndex:a,pageSize:o}})},setPageCount:r=>t.setPagination(i=>{var o;let s=rc(r,(o=t.options.pageCount)!=null?o:-1);return typeof s=="number"&&(s=Math.max(-1,s)),{...i,pageCount:s}}),getPageOptions:Zt(()=>[t.getPageCount()],r=>{let i=[];return r&&r>0&&(i=[...new Array(r)].fill(null).map((o,s)=>s)),i},{key:!1,debug:()=>{var r;return(r=t.options.debugAll)!=null?r:t.options.debugTable}}),getCanPreviousPage:()=>t.getState().pagination.pageIndex>0,getCanNextPage:()=>{const{pageIndex:r}=t.getState().pagination,i=t.getPageCount();return i===-1?!0:i===0?!1:rt.setPageIndex(r=>r-1),nextPage:()=>t.setPageIndex(r=>r+1),getPrePaginationRowModel:()=>t.getExpandedRowModel(),getPaginationRowModel:()=>(!t._getPaginationRowModel&&t.options.getPaginationRowModel&&(t._getPaginationRowModel=t.options.getPaginationRowModel(t)),t.options.manualPagination||!t._getPaginationRowModel?t.getPrePaginationRowModel():t._getPaginationRowModel()),getPageCount:()=>{var r;return(r=t.options.pageCount)!=null?r:Math.ceil(t.getPrePaginationRowModel().rows.length/t.getState().pagination.pageSize)}}}},qP=()=>({left:[],right:[]}),pNe={getInitialState:t=>({columnPinning:qP(),...t}),getDefaultOptions:t=>({onColumnPinningChange:fs("columnPinning",t)}),createColumn:(t,e)=>({pin:n=>{const r=t.getLeafColumns().map(i=>i.id).filter(Boolean);e.setColumnPinning(i=>{var o,s;if(n==="right"){var a,l;return{left:((a=i?.left)!=null?a:[]).filter(d=>!(r!=null&&r.includes(d))),right:[...((l=i?.right)!=null?l:[]).filter(d=>!(r!=null&&r.includes(d))),...r]}}if(n==="left"){var c,u;return{left:[...((c=i?.left)!=null?c:[]).filter(d=>!(r!=null&&r.includes(d))),...r],right:((u=i?.right)!=null?u:[]).filter(d=>!(r!=null&&r.includes(d)))}}return{left:((o=i?.left)!=null?o:[]).filter(d=>!(r!=null&&r.includes(d))),right:((s=i?.right)!=null?s:[]).filter(d=>!(r!=null&&r.includes(d)))}})},getCanPin:()=>t.getLeafColumns().some(r=>{var i,o;return((i=r.columnDef.enablePinning)!=null?i:!0)&&((o=e.options.enablePinning)!=null?o:!0)}),getIsPinned:()=>{const n=t.getLeafColumns().map(a=>a.id),{left:r,right:i}=e.getState().columnPinning,o=n.some(a=>r?.includes(a)),s=n.some(a=>i?.includes(a));return o?"left":s?"right":!1},getPinnedIndex:()=>{var n,r,i;const o=t.getIsPinned();return o?(n=(r=e.getState().columnPinning)==null||(i=r[o])==null?void 0:i.indexOf(t.id))!=null?n:-1:0}}),createRow:(t,e)=>({getCenterVisibleCells:Zt(()=>[t._getAllVisibleCells(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,r,i)=>{const o=[...r??[],...i??[]];return n.filter(s=>!o.includes(s.column.id))},{key:"row.getCenterVisibleCells",debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugRows}}),getLeftVisibleCells:Zt(()=>[t._getAllVisibleCells(),e.getState().columnPinning.left,,],(n,r)=>(r??[]).map(o=>n.find(s=>s.column.id===o)).filter(Boolean).map(o=>({...o,position:"left"})),{key:"row.getLeftVisibleCells",debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugRows}}),getRightVisibleCells:Zt(()=>[t._getAllVisibleCells(),e.getState().columnPinning.right],(n,r)=>(r??[]).map(o=>n.find(s=>s.column.id===o)).filter(Boolean).map(o=>({...o,position:"right"})),{key:"row.getRightVisibleCells",debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugRows}})}),createTable:t=>({setColumnPinning:e=>t.options.onColumnPinningChange==null?void 0:t.options.onColumnPinningChange(e),resetColumnPinning:e=>{var n,r;return t.setColumnPinning(e?qP():(n=(r=t.initialState)==null?void 0:r.columnPinning)!=null?n:qP())},getIsSomeColumnsPinned:e=>{var n;const r=t.getState().columnPinning;if(!e){var i,o;return!!((i=r.left)!=null&&i.length||(o=r.right)!=null&&o.length)}return!!((n=r[e])!=null&&n.length)},getLeftLeafColumns:Zt(()=>[t.getAllLeafColumns(),t.getState().columnPinning.left],(e,n)=>(n??[]).map(r=>e.find(i=>i.id===r)).filter(Boolean),{key:!1,debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugColumns}}),getRightLeafColumns:Zt(()=>[t.getAllLeafColumns(),t.getState().columnPinning.right],(e,n)=>(n??[]).map(r=>e.find(i=>i.id===r)).filter(Boolean),{key:!1,debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugColumns}}),getCenterLeafColumns:Zt(()=>[t.getAllLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,n,r)=>{const i=[...n??[],...r??[]];return e.filter(o=>!i.includes(o.id))},{key:!1,debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugColumns}})})},mNe={getInitialState:t=>({rowSelection:{},...t}),getDefaultOptions:t=>({onRowSelectionChange:fs("rowSelection",t),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:t=>({setRowSelection:e=>t.options.onRowSelectionChange==null?void 0:t.options.onRowSelectionChange(e),resetRowSelection:e=>{var n;return t.setRowSelection(e?{}:(n=t.initialState.rowSelection)!=null?n:{})},toggleAllRowsSelected:e=>{t.setRowSelection(n=>{e=typeof e<"u"?e:!t.getIsAllRowsSelected();const r={...n},i=t.getPreGroupedRowModel().flatRows;return e?i.forEach(o=>{o.getCanSelect()&&(r[o.id]=!0)}):i.forEach(o=>{delete r[o.id]}),r})},toggleAllPageRowsSelected:e=>t.setRowSelection(n=>{const r=typeof e<"u"?e:!t.getIsAllPageRowsSelected(),i={...n};return t.getRowModel().rows.forEach(o=>{zT(i,o.id,r,t)}),i}),getPreSelectedRowModel:()=>t.getCoreRowModel(),getSelectedRowModel:Zt(()=>[t.getState().rowSelection,t.getCoreRowModel()],(e,n)=>Object.keys(e).length?KP(t,n):{rows:[],flatRows:[],rowsById:{}},{key:!1,debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugTable}}),getFilteredSelectedRowModel:Zt(()=>[t.getState().rowSelection,t.getFilteredRowModel()],(e,n)=>Object.keys(e).length?KP(t,n):{rows:[],flatRows:[],rowsById:{}},{key:"getFilteredSelectedRowModel",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugTable}}),getGroupedSelectedRowModel:Zt(()=>[t.getState().rowSelection,t.getSortedRowModel()],(e,n)=>Object.keys(e).length?KP(t,n):{rows:[],flatRows:[],rowsById:{}},{key:"getGroupedSelectedRowModel",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugTable}}),getIsAllRowsSelected:()=>{const e=t.getFilteredRowModel().flatRows,{rowSelection:n}=t.getState();let r=!!(e.length&&Object.keys(n).length);return r&&e.some(i=>i.getCanSelect()&&!n[i.id])&&(r=!1),r},getIsAllPageRowsSelected:()=>{const e=t.getPaginationRowModel().flatRows.filter(i=>i.getCanSelect()),{rowSelection:n}=t.getState();let r=!!e.length;return r&&e.some(i=>!n[i.id])&&(r=!1),r},getIsSomeRowsSelected:()=>{var e;const n=Object.keys((e=t.getState().rowSelection)!=null?e:{}).length;return n>0&&n{const e=t.getPaginationRowModel().flatRows;return t.getIsAllPageRowsSelected()?!1:e.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},getToggleAllRowsSelectedHandler:()=>e=>{t.toggleAllRowsSelected(e.target.checked)},getToggleAllPageRowsSelectedHandler:()=>e=>{t.toggleAllPageRowsSelected(e.target.checked)}}),createRow:(t,e)=>({toggleSelected:n=>{const r=t.getIsSelected();e.setRowSelection(i=>{if(n=typeof n<"u"?n:!r,r===n)return i;const o={...i};return zT(o,t.id,n,e),o})},getIsSelected:()=>{const{rowSelection:n}=e.getState();return UA(t,n)},getIsSomeSelected:()=>{const{rowSelection:n}=e.getState();return ZB(t,n)==="some"},getIsAllSubRowsSelected:()=>{const{rowSelection:n}=e.getState();return ZB(t,n)==="all"},getCanSelect:()=>{var n;return typeof e.options.enableRowSelection=="function"?e.options.enableRowSelection(t):(n=e.options.enableRowSelection)!=null?n:!0},getCanSelectSubRows:()=>{var n;return typeof e.options.enableSubRowSelection=="function"?e.options.enableSubRowSelection(t):(n=e.options.enableSubRowSelection)!=null?n:!0},getCanMultiSelect:()=>{var n;return typeof e.options.enableMultiRowSelection=="function"?e.options.enableMultiRowSelection(t):(n=e.options.enableMultiRowSelection)!=null?n:!0},getToggleSelectedHandler:()=>{const n=t.getCanSelect();return r=>{var i;n&&t.toggleSelected((i=r.target)==null?void 0:i.checked)}}})},zT=(t,e,n,r)=>{var i;const o=r.getRow(e);n?(o.getCanMultiSelect()||Object.keys(t).forEach(s=>delete t[s]),o.getCanSelect()&&(t[e]=!0)):delete t[e],(i=o.subRows)!=null&&i.length&&o.getCanSelectSubRows()&&o.subRows.forEach(s=>zT(t,s.id,n,r))};function KP(t,e){const n=t.getState().rowSelection,r=[],i={},o=function(s,a){return s.map(l=>{var c;const u=UA(l,n);if(u&&(r.push(l),i[l.id]=l),(c=l.subRows)!=null&&c.length&&(l={...l,subRows:o(l.subRows)}),u)return l}).filter(Boolean)};return{rows:o(e.rows),flatRows:r,rowsById:i}}function UA(t,e){var n;return(n=e[t.id])!=null?n:!1}function ZB(t,e,n){if(t.subRows&&t.subRows.length){let r=!0,i=!1;return t.subRows.forEach(o=>{i&&!r||(UA(o,e)?i=!0:r=!1)}),r?"all":i?"some":!1}return!1}const UT=/([0-9]+)/gm,gNe=(t,e,n)=>Tq(Cc(t.getValue(n)).toLowerCase(),Cc(e.getValue(n)).toLowerCase()),vNe=(t,e,n)=>Tq(Cc(t.getValue(n)),Cc(e.getValue(n))),yNe=(t,e,n)=>BA(Cc(t.getValue(n)).toLowerCase(),Cc(e.getValue(n)).toLowerCase()),_Ne=(t,e,n)=>BA(Cc(t.getValue(n)),Cc(e.getValue(n))),xNe=(t,e,n)=>{const r=t.getValue(n),i=e.getValue(n);return r>i?1:rBA(t.getValue(n),e.getValue(n));function BA(t,e){return t===e?0:t>e?1:-1}function Cc(t){return typeof t=="number"?isNaN(t)||t===1/0||t===-1/0?"":String(t):typeof t=="string"?t:""}function Tq(t,e){const n=t.split(UT).filter(Boolean),r=e.split(UT).filter(Boolean);for(;n.length&&r.length;){const i=n.shift(),o=r.shift(),s=parseInt(i,10),a=parseInt(o,10),l=[s,a].sort();if(isNaN(l[0])){if(i>o)return 1;if(o>i)return-1;continue}if(isNaN(l[1]))return isNaN(s)?-1:1;if(s>a)return 1;if(a>s)return-1}return n.length-r.length}const _u={alphanumeric:gNe,alphanumericCaseSensitive:vNe,text:yNe,textCaseSensitive:_Ne,datetime:xNe,basic:wNe},SNe={getInitialState:t=>({sorting:[],...t}),getDefaultColumnDef:()=>({sortingFn:"auto"}),getDefaultOptions:t=>({onSortingChange:fs("sorting",t),isMultiSortEvent:e=>e.shiftKey}),createColumn:(t,e)=>({getAutoSortingFn:()=>{const n=e.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const i of n){const o=i?.getValue(t.id);if(Object.prototype.toString.call(o)==="[object Date]")return _u.datetime;if(typeof o=="string"&&(r=!0,o.split(UT).length>1))return _u.alphanumeric}return r?_u.text:_u.basic},getAutoSortDir:()=>{const n=e.getFilteredRowModel().flatRows[0];return typeof n?.getValue(t.id)=="string"?"asc":"desc"},getSortingFn:()=>{var n,r;if(!t)throw new Error;return D1(t.columnDef.sortingFn)?t.columnDef.sortingFn:t.columnDef.sortingFn==="auto"?t.getAutoSortingFn():(n=(r=e.options.sortingFns)==null?void 0:r[t.columnDef.sortingFn])!=null?n:_u[t.columnDef.sortingFn]},toggleSorting:(n,r)=>{const i=t.getNextSortingOrder(),o=typeof n<"u"&&n!==null;e.setSorting(s=>{const a=s?.find(h=>h.id===t.id),l=s?.findIndex(h=>h.id===t.id);let c=[],u,d=o?n:i==="desc";if(s!=null&&s.length&&t.getCanMultiSort()&&r?a?u="toggle":u="add":s!=null&&s.length&&l!==s.length-1?u="replace":a?u="toggle":u="replace",u==="toggle"&&(o||i||(u="remove")),u==="add"){var f;c=[...s,{id:t.id,desc:d}],c.splice(0,c.length-((f=e.options.maxMultiSortColCount)!=null?f:Number.MAX_SAFE_INTEGER))}else u==="toggle"?c=s.map(h=>h.id===t.id?{...h,desc:d}:h):u==="remove"?c=s.filter(h=>h.id!==t.id):c=[{id:t.id,desc:d}];return c})},getFirstSortDir:()=>{var n,r;return((n=(r=t.columnDef.sortDescFirst)!=null?r:e.options.sortDescFirst)!=null?n:t.getAutoSortDir()==="desc")?"desc":"asc"},getNextSortingOrder:n=>{var r,i;const o=t.getFirstSortDir(),s=t.getIsSorted();return s?s!==o&&((r=e.options.enableSortingRemoval)==null||r)&&(!(n&&(i=e.options.enableMultiRemove)!=null)||i)?!1:s==="desc"?"asc":"desc":o},getCanSort:()=>{var n,r;return((n=t.columnDef.enableSorting)!=null?n:!0)&&((r=e.options.enableSorting)!=null?r:!0)&&!!t.accessorFn},getCanMultiSort:()=>{var n,r;return(n=(r=t.columnDef.enableMultiSort)!=null?r:e.options.enableMultiSort)!=null?n:!!t.accessorFn},getIsSorted:()=>{var n;const r=(n=e.getState().sorting)==null?void 0:n.find(i=>i.id===t.id);return r?r.desc?"desc":"asc":!1},getSortIndex:()=>{var n,r;return(n=(r=e.getState().sorting)==null?void 0:r.findIndex(i=>i.id===t.id))!=null?n:-1},clearSorting:()=>{e.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==t.id):[])},getToggleSortingHandler:()=>{const n=t.getCanSort();return r=>{n&&(r.persist==null||r.persist(),t.toggleSorting==null||t.toggleSorting(void 0,t.getCanMultiSort()?e.options.isMultiSortEvent==null?void 0:e.options.isMultiSortEvent(r):!1))}}}),createTable:t=>({setSorting:e=>t.options.onSortingChange==null?void 0:t.options.onSortingChange(e),resetSorting:e=>{var n,r;t.setSorting(e?[]:(n=(r=t.initialState)==null?void 0:r.sorting)!=null?n:[])},getPreSortedRowModel:()=>t.getGroupedRowModel(),getSortedRowModel:()=>(!t._getSortedRowModel&&t.options.getSortedRowModel&&(t._getSortedRowModel=t.options.getSortedRowModel(t)),t.options.manualSorting||!t._getSortedRowModel?t.getPreSortedRowModel():t._getSortedRowModel())})},bNe={getInitialState:t=>({columnVisibility:{},...t}),getDefaultOptions:t=>({onColumnVisibilityChange:fs("columnVisibility",t)}),createColumn:(t,e)=>({toggleVisibility:n=>{t.getCanHide()&&e.setColumnVisibility(r=>({...r,[t.id]:n??!t.getIsVisible()}))},getIsVisible:()=>{var n,r;return(n=(r=e.getState().columnVisibility)==null?void 0:r[t.id])!=null?n:!0},getCanHide:()=>{var n,r;return((n=t.columnDef.enableHiding)!=null?n:!0)&&((r=e.options.enableHiding)!=null?r:!0)},getToggleVisibilityHandler:()=>n=>{t.toggleVisibility==null||t.toggleVisibility(n.target.checked)}}),createRow:(t,e)=>({_getAllVisibleCells:Zt(()=>[t.getAllCells(),e.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),{key:"row._getAllVisibleCells",debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugRows}}),getVisibleCells:Zt(()=>[t.getLeftVisibleCells(),t.getCenterVisibleCells(),t.getRightVisibleCells()],(n,r,i)=>[...n,...r,...i],{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugRows}})}),createTable:t=>{const e=(n,r)=>Zt(()=>[r(),r().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(o=>o.getIsVisible==null?void 0:o.getIsVisible()),{key:n,debug:()=>{var i;return(i=t.options.debugAll)!=null?i:t.options.debugColumns}});return{getVisibleFlatColumns:e("getVisibleFlatColumns",()=>t.getAllFlatColumns()),getVisibleLeafColumns:e("getVisibleLeafColumns",()=>t.getAllLeafColumns()),getLeftVisibleLeafColumns:e("getLeftVisibleLeafColumns",()=>t.getLeftLeafColumns()),getRightVisibleLeafColumns:e("getRightVisibleLeafColumns",()=>t.getRightLeafColumns()),getCenterVisibleLeafColumns:e("getCenterVisibleLeafColumns",()=>t.getCenterLeafColumns()),setColumnVisibility:n=>t.options.onColumnVisibilityChange==null?void 0:t.options.onColumnVisibilityChange(n),resetColumnVisibility:n=>{var r;t.setColumnVisibility(n?{}:(r=t.initialState.columnVisibility)!=null?r:{})},toggleAllColumnsVisible:n=>{var r;n=(r=n)!=null?r:!t.getIsAllColumnsVisible(),t.setColumnVisibility(t.getAllLeafColumns().reduce((i,o)=>({...i,[o.id]:n||!(o.getCanHide!=null&&o.getCanHide())}),{}))},getIsAllColumnsVisible:()=>!t.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),getIsSomeColumnsVisible:()=>t.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),getToggleAllColumnsVisibilityHandler:()=>n=>{var r;t.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}}},qB=[qke,bNe,fNe,pNe,eNe,SNe,uNe,Jke,hNe,mNe,Kke];function MNe(t){var e;(t.debugAll||t.debugTable)&&console.info("Creating Table Instance...");let n={_features:qB};const r=n._features.reduce((u,d)=>Object.assign(u,d.getDefaultOptions==null?void 0:d.getDefaultOptions(n)),{}),i=u=>n.options.mergeOptions?n.options.mergeOptions(r,u):{...r,...u};let s={...{},...(e=t.initialState)!=null?e:{}};n._features.forEach(u=>{var d;s=(d=u.getInitialState==null?void 0:u.getInitialState(s))!=null?d:s});const a=[];let l=!1;const c={_features:qB,options:{...r,...t},initialState:s,_queue:u=>{a.push(u),l||(l=!0,Promise.resolve().then(()=>{for(;a.length;)a.shift()();l=!1}).catch(d=>setTimeout(()=>{throw d})))},reset:()=>{n.setState(n.initialState)},setOptions:u=>{const d=rc(u,n.options);n.options=i(d)},getState:()=>n.options.state,setState:u=>{n.options.onStateChange==null||n.options.onStateChange(u)},_getRowId:(u,d,f)=>{var h;return(h=n.options.getRowId==null?void 0:n.options.getRowId(u,d,f))!=null?h:`${f?[f.id,d].join("."):d}`},getCoreRowModel:()=>(n._getCoreRowModel||(n._getCoreRowModel=n.options.getCoreRowModel(n)),n._getCoreRowModel()),getRowModel:()=>n.getPaginationRowModel(),getRow:u=>{const d=n.getRowModel().rowsById[u];if(!d)throw new Error;return d},_getDefaultColumnDef:Zt(()=>[n.options.defaultColumn],u=>{var d;return u=(d=u)!=null?d:{},{header:f=>{const h=f.header.column.columnDef;return h.accessorKey?h.accessorKey:h.accessorFn?h.id:null},cell:f=>{var h,g;return(h=(g=f.renderValue())==null||g.toString==null?void 0:g.toString())!=null?h:null},...n._features.reduce((f,h)=>Object.assign(f,h.getDefaultColumnDef==null?void 0:h.getDefaultColumnDef()),{}),...u}},{debug:()=>{var u;return(u=n.options.debugAll)!=null?u:n.options.debugColumns},key:!1}),_getColumnDefs:()=>n.options.columns,getAllColumns:Zt(()=>[n._getColumnDefs()],u=>{const d=function(f,h,g){return g===void 0&&(g=0),f.map(y=>{const _=Zke(n,y,g,h),v=y;return _.columns=v.columns?d(v.columns,_,g+1):[],_})};return d(u)},{key:!1,debug:()=>{var u;return(u=n.options.debugAll)!=null?u:n.options.debugColumns}}),getAllFlatColumns:Zt(()=>[n.getAllColumns()],u=>u.flatMap(d=>d.getFlatColumns()),{key:!1,debug:()=>{var u;return(u=n.options.debugAll)!=null?u:n.options.debugColumns}}),_getAllFlatColumnsById:Zt(()=>[n.getAllFlatColumns()],u=>u.reduce((d,f)=>(d[f.id]=f,d),{}),{key:!1,debug:()=>{var u;return(u=n.options.debugAll)!=null?u:n.options.debugColumns}}),getAllLeafColumns:Zt(()=>[n.getAllColumns(),n._getOrderColumnsFn()],(u,d)=>{let f=u.flatMap(h=>h.getLeafColumns());return d(f)},{key:!1,debug:()=>{var u;return(u=n.options.debugAll)!=null?u:n.options.debugColumns}}),getColumn:u=>n._getAllFlatColumnsById()[u]};return Object.assign(n,c),n._features.forEach(u=>Object.assign(n,u.createTable==null?void 0:u.createTable(n))),n}function ENe(t,e,n,r){const i=()=>{var s;return(s=o.getValue())!=null?s:t.options.renderFallbackValue},o={id:`${e.id}_${n.id}`,row:e,column:n,getValue:()=>e.getValue(r),renderValue:i,getContext:Zt(()=>[t,n,e,o],(s,a,l,c)=>({table:s,column:a,row:l,cell:c,getValue:c.getValue,renderValue:c.renderValue}),{key:!1,debug:()=>t.options.debugAll})};return t._features.forEach(s=>{Object.assign(o,s.createCell==null?void 0:s.createCell(o,n,e,t))},{}),o}const xb=(t,e,n,r,i,o,s)=>{let a={id:e,index:r,original:n,depth:i,parentId:s,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(a._valuesCache.hasOwnProperty(l))return a._valuesCache[l];const c=t.getColumn(l);if(c!=null&&c.accessorFn)return a._valuesCache[l]=c.accessorFn(a.original,r),a._valuesCache[l]},getUniqueValues:l=>{if(a._uniqueValuesCache.hasOwnProperty(l))return a._uniqueValuesCache[l];const c=t.getColumn(l);if(c!=null&&c.accessorFn)return c.columnDef.getUniqueValues?(a._uniqueValuesCache[l]=c.columnDef.getUniqueValues(a.original,r),a._uniqueValuesCache[l]):(a._uniqueValuesCache[l]=[a.getValue(l)],a._uniqueValuesCache[l])},renderValue:l=>{var c;return(c=a.getValue(l))!=null?c:t.options.renderFallbackValue},subRows:o??[],getLeafRows:()=>_q(a.subRows,l=>l.subRows),getParentRow:()=>a.parentId?t.getRow(a.parentId):void 0,getParentRows:()=>{let l=[],c=a;for(;;){const u=c.getParentRow();if(!u)break;l.push(u),c=u}return l.reverse()},getAllCells:Zt(()=>[t.getAllLeafColumns()],l=>l.map(c=>ENe(t,a,c,c.id)),{key:!1,debug:()=>{var l;return(l=t.options.debugAll)!=null?l:t.options.debugRows}}),_getAllCellsByColumnId:Zt(()=>[a.getAllCells()],l=>l.reduce((c,u)=>(c[u.column.id]=u,c),{}),{key:"row.getAllCellsByColumnId",debug:()=>{var l;return(l=t.options.debugAll)!=null?l:t.options.debugRows}})};for(let l=0;lZt(()=>[t.options.data],e=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(i,o,s){o===void 0&&(o=0);const a=[];for(let c=0;c{var e;return(e=t.options.debugAll)!=null?e:t.options.debugTable},onChange:()=>{t._autoResetPageIndex()}})}function Oq(t,e,n){return n.options.filterFromLeafRows?CNe(t,e,n):TNe(t,e,n)}function CNe(t,e,n){var r;const i=[],o={},s=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,a=function(l,c){c===void 0&&(c=0);const u=[];for(let f=0;fZt(()=>[t.getPreFilteredRowModel(),t.getState().columnFilters,t.getState().globalFilter],(e,n,r)=>{if(!e.rows.length||!(n!=null&&n.length)&&!r){for(let f=0;f{var h;const g=t.getColumn(f.id);if(!g)return;const y=g.getFilterFn();y&&i.push({id:f.id,filterFn:y,resolvedValue:(h=y.resolveFilterValue==null?void 0:y.resolveFilterValue(f.value))!=null?h:f.value})});const s=n.map(f=>f.id),a=t.getGlobalFilterFn(),l=t.getAllLeafColumns().filter(f=>f.getCanGlobalFilter());r&&a&&l.length&&(s.push("__global__"),l.forEach(f=>{var h;o.push({id:f.id,filterFn:a,resolvedValue:(h=a.resolveFilterValue==null?void 0:a.resolveFilterValue(r))!=null?h:r})}));let c,u;for(let f=0;f{h.columnFiltersMeta[y]=_})}if(o.length){for(let g=0;g{h.columnFiltersMeta[y]=_})){h.columnFilters.__global__=!0;break}}h.columnFilters.__global__!==!0&&(h.columnFilters.__global__=!1)}}const d=f=>{for(let h=0;h{var e;return(e=t.options.debugAll)!=null?e:t.options.debugTable},onChange:()=>{t._autoResetPageIndex()}})}function RNe(){return(t,e)=>Zt(()=>[t.getPreFilteredRowModel(),t.getState().columnFilters,t.getState().globalFilter,t.getFilteredRowModel()],(n,r,i)=>{if(!n.rows.length||!(r!=null&&r.length)&&!i)return n;const o=[...r.map(a=>a.id).filter(a=>a!==e),i?"__global__":void 0].filter(Boolean),s=a=>{for(let l=0;l{var n;return(n=t.options.debugAll)!=null?n:t.options.debugTable},onChange:()=>{}})}function ANe(){return t=>Zt(()=>[t.getState().sorting,t.getPreSortedRowModel()],(e,n)=>{if(!n.rows.length||!(e!=null&&e.length))return n;const r=t.getState().sorting,i=[],o=r.filter(l=>{var c;return(c=t.getColumn(l.id))==null?void 0:c.getCanSort()}),s={};o.forEach(l=>{const c=t.getColumn(l.id);c&&(s[l.id]={sortUndefined:c.columnDef.sortUndefined,invertSorting:c.columnDef.invertSorting,sortingFn:c.getSortingFn()})});const a=l=>{const c=[...l];return c.sort((u,d)=>{for(let h=0;h"u",E=typeof w>"u";if(S||E){let C=S&&E?0:S?y.sortUndefined:-y.sortUndefined;return _&&C!==0&&(C*=-1),C}}let v=y.sortingFn(u,d,g.id);if(v!==0)return _&&(v*=-1),y.invertSorting&&(v*=-1),v}return u.index-d.index}),c.forEach(u=>{var d;i.push(u),(d=u.subRows)!=null&&d.length&&(u.subRows=a(u.subRows))}),c};return{rows:a(n.rows),flatRows:i,rowsById:n.rowsById}},{key:!1,debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugTable},onChange:()=>{t._autoResetPageIndex()}})}function DNe(){return t=>Zt(()=>[t.getState().grouping,t.getPreGroupedRowModel()],(e,n)=>{if(!n.rows.length||!e.length)return n;const r=e.filter(l=>t.getColumn(l)),i=[],o={},s=function(l,c,u){if(c===void 0&&(c=0),c>=r.length)return l.map(g=>(g.depth=c,i.push(g),o[g.id]=g,g.subRows&&(g.subRows=s(g.subRows,c+1,g.id)),g));const d=r[c],f=INe(l,d);return Array.from(f.entries()).map((g,y)=>{let[_,v]=g,x=`${d}:${_}`;x=u?`${u}>${x}`:x;const w=s(v,c+1,x),S=c?_q(v,C=>C.subRows):v,E=xb(t,x,S[0].original,y,c,void 0,u);return Object.assign(E,{groupingColumnId:d,groupingValue:_,subRows:w,leafRows:S,getValue:C=>{if(r.includes(C)){if(E._valuesCache.hasOwnProperty(C))return E._valuesCache[C];if(v[0]){var O;E._valuesCache[C]=(O=v[0].getValue(C))!=null?O:void 0}return E._valuesCache[C]}if(E._groupingValuesCache.hasOwnProperty(C))return E._groupingValuesCache[C];const R=t.getColumn(C),T=R?.getAggregationFn();if(T)return E._groupingValuesCache[C]=T(C,S,v),E._groupingValuesCache[C]}}),w.forEach(C=>{i.push(C),o[C.id]=C}),E})},a=s(n.rows,0);return a.forEach(l=>{i.push(l),o[l.id]=l}),{rows:a,flatRows:i,rowsById:o}},{key:!1,debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugTable},onChange:()=>{t._queue(()=>{t._autoResetExpanded(),t._autoResetPageIndex()})}})}function INe(t,e){const n=new Map;return t.reduce((r,i)=>{const o=`${i.getGroupingValue(e)}`,s=r.get(o);return s?s.push(i):r.set(o,[i]),r},n)}function LNe(){return t=>Zt(()=>[t.getState().expanded,t.getPreExpandedRowModel(),t.options.paginateExpandedRows],(e,n,r)=>!n.rows.length||e!==!0&&!Object.keys(e??{}).length||!r?n:Rq(n),{key:!1,debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugTable}})}function Rq(t){const e=[],n=r=>{var i;e.push(r),(i=r.subRows)!=null&&i.length&&r.getIsExpanded()&&r.subRows.forEach(n)};return t.rows.forEach(n),{rows:e,flatRows:t.flatRows,rowsById:t.rowsById}}function kNe(t){return e=>Zt(()=>[e.getState().pagination,e.getPrePaginationRowModel(),e.options.paginateExpandedRows?void 0:e.getState().expanded],(n,r)=>{if(!r.rows.length)return r;const{pageSize:i,pageIndex:o}=n;let{rows:s,flatRows:a,rowsById:l}=r;const c=i*o,u=c+i;s=s.slice(c,u);let d;e.options.paginateExpandedRows?d={rows:s,flatRows:a,rowsById:l}:d=Rq({rows:s,flatRows:a,rowsById:l}),d.flatRows=[];const f=h=>{d.flatRows.push(h),h.subRows.length&&h.subRows.forEach(f)};return d.rows.forEach(f),d},{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugTable}})}/** + color: hsl(${Math.max(0,Math.min(120-120*d,120))}deg 100% 31%);`,n?.key)}return i}}function Lke(t,e,n,r){var i,o;const a={...t._getDefaultColumnDef(),...e},l=a.accessorKey;let c=(i=(o=a.id)!=null?o:l?l.replace(".","_"):void 0)!=null?i:typeof a.header=="string"?a.header:void 0,u;if(a.accessorFn?u=a.accessorFn:l&&(l.includes(".")?u=f=>{let h=f;for(const y of l.split(".")){var g;h=(g=h)==null?void 0:g[y]}return h}:u=f=>f[a.accessorKey]),!c)throw new Error;let d={id:`${String(c)}`,accessorFn:u,parent:r,depth:n,columnDef:a,columns:[],getFlatColumns:Zt(()=>[!0],()=>{var f;return[d,...(f=d.columns)==null?void 0:f.flatMap(h=>h.getFlatColumns())]},{key:"column.getFlatColumns",debug:()=>{var f;return(f=t.options.debugAll)!=null?f:t.options.debugColumns}}),getLeafColumns:Zt(()=>[t._getOrderColumnsFn()],f=>{var h;if((h=d.columns)!=null&&h.length){let g=d.columns.flatMap(y=>y.getLeafColumns());return f(g)}return[d]},{key:"column.getLeafColumns",debug:()=>{var f;return(f=t.options.debugAll)!=null?f:t.options.debugColumns}})};return d=t._features.reduce((f,h)=>Object.assign(f,h.createColumn==null?void 0:h.createColumn(d,t)),d),d}function $B(t,e,n){var r;let o={id:(r=n.id)!=null?r:e.id,column:e,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const s=[],a=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(a),s.push(l)};return a(o),s},getContext:()=>({table:t,header:o,column:e})};return t._features.forEach(s=>{Object.assign(o,s.createHeader==null?void 0:s.createHeader(o,t))}),o}const kke={createTable:t=>({getHeaderGroups:Zt(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,n,r,i)=>{var o,s;const a=(o=r?.map(d=>n.find(f=>f.id===d)).filter(Boolean))!=null?o:[],l=(s=i?.map(d=>n.find(f=>f.id===d)).filter(Boolean))!=null?s:[],c=n.filter(d=>!(r!=null&&r.includes(d.id))&&!(i!=null&&i.includes(d.id)));return Qy(e,[...a,...c,...l],t)},{key:!1,debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),getCenterHeaderGroups:Zt(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,n,r,i)=>(n=n.filter(o=>!(r!=null&&r.includes(o.id))&&!(i!=null&&i.includes(o.id))),Qy(e,n,t,"center")),{key:!1,debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),getLeftHeaderGroups:Zt(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left],(e,n,r)=>{var i;const o=(i=r?.map(s=>n.find(a=>a.id===s)).filter(Boolean))!=null?i:[];return Qy(e,o,t,"left")},{key:!1,debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),getRightHeaderGroups:Zt(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.right],(e,n,r)=>{var i;const o=(i=r?.map(s=>n.find(a=>a.id===s)).filter(Boolean))!=null?i:[];return Qy(e,o,t,"right")},{key:!1,debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),getFooterGroups:Zt(()=>[t.getHeaderGroups()],e=>[...e].reverse(),{key:!1,debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),getLeftFooterGroups:Zt(()=>[t.getLeftHeaderGroups()],e=>[...e].reverse(),{key:!1,debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),getCenterFooterGroups:Zt(()=>[t.getCenterHeaderGroups()],e=>[...e].reverse(),{key:!1,debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),getRightFooterGroups:Zt(()=>[t.getRightHeaderGroups()],e=>[...e].reverse(),{key:!1,debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),getFlatHeaders:Zt(()=>[t.getHeaderGroups()],e=>e.map(n=>n.headers).flat(),{key:!1,debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),getLeftFlatHeaders:Zt(()=>[t.getLeftHeaderGroups()],e=>e.map(n=>n.headers).flat(),{key:!1,debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),getCenterFlatHeaders:Zt(()=>[t.getCenterHeaderGroups()],e=>e.map(n=>n.headers).flat(),{key:!1,debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),getRightFlatHeaders:Zt(()=>[t.getRightHeaderGroups()],e=>e.map(n=>n.headers).flat(),{key:!1,debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),getCenterLeafHeaders:Zt(()=>[t.getCenterFlatHeaders()],e=>e.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),{key:!1,debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),getLeftLeafHeaders:Zt(()=>[t.getLeftFlatHeaders()],e=>e.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),{key:!1,debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),getRightLeafHeaders:Zt(()=>[t.getRightFlatHeaders()],e=>e.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),{key:!1,debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}}),getLeafHeaders:Zt(()=>[t.getLeftHeaderGroups(),t.getCenterHeaderGroups(),t.getRightHeaderGroups()],(e,n,r)=>{var i,o,s,a,l,c;return[...(i=(o=e[0])==null?void 0:o.headers)!=null?i:[],...(s=(a=n[0])==null?void 0:a.headers)!=null?s:[],...(l=(c=r[0])==null?void 0:c.headers)!=null?l:[]].map(u=>u.getLeafHeaders()).flat()},{key:!1,debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugHeaders}})})};function Qy(t,e,n,r){var i,o;let s=0;const a=function(f,h){h===void 0&&(h=1),s=Math.max(s,h),f.filter(g=>g.getIsVisible()).forEach(g=>{var y;(y=g.columns)!=null&&y.length&&a(g.columns,h+1)},0)};a(t);let l=[];const c=(f,h)=>{const g={depth:h,id:[r,`${h}`].filter(Boolean).join("_"),headers:[]},y=[];f.forEach(_=>{const v=[...y].reverse()[0],x=_.column.depth===g.depth;let w,S=!1;if(x&&_.column.parent?w=_.column.parent:(w=_.column,S=!0),v&&v?.column===w)v.subHeaders.push(_);else{const E=$B(n,w,{id:[r,h,w.id,_?.id].filter(Boolean).join("_"),isPlaceholder:S,placeholderId:S?`${y.filter(C=>C.column===w).length}`:void 0,depth:h,index:y.length});E.subHeaders.push(_),y.push(E)}g.headers.push(_),_.headerGroup=g}),l.push(g),h>0&&c(y,h-1)},u=e.map((f,h)=>$B(n,f,{depth:s,index:h}));c(u,s-1),l.reverse();const d=f=>f.filter(g=>g.column.getIsVisible()).map(g=>{let y=0,_=0,v=[0];g.subHeaders&&g.subHeaders.length?(v=[],d(g.subHeaders).forEach(w=>{let{colSpan:S,rowSpan:E}=w;y+=S,v.push(E)})):y=1;const x=Math.min(...v);return _=_+x,g.colSpan=y,g.rowSpan=_,{colSpan:y,rowSpan:_}});return d((i=(o=l[0])==null?void 0:o.headers)!=null?i:[]),l}const Jy={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},WP=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Nke={getDefaultColumnDef:()=>Jy,getInitialState:t=>({columnSizing:{},columnSizingInfo:WP(),...t}),getDefaultOptions:t=>({columnResizeMode:"onEnd",onColumnSizingChange:fs("columnSizing",t),onColumnSizingInfoChange:fs("columnSizingInfo",t)}),createColumn:(t,e)=>({getSize:()=>{var n,r,i;const o=e.getState().columnSizing[t.id];return Math.min(Math.max((n=t.columnDef.minSize)!=null?n:Jy.minSize,(r=o??t.columnDef.size)!=null?r:Jy.size),(i=t.columnDef.maxSize)!=null?i:Jy.maxSize)},getStart:n=>{const r=n?n==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns(),i=r.findIndex(o=>o.id===t.id);if(i>0){const o=r[i-1];return o.getStart(n)+o.getSize()}return 0},resetSize:()=>{e.setColumnSizing(n=>{let{[t.id]:r,...i}=n;return i})},getCanResize:()=>{var n,r;return((n=t.columnDef.enableResizing)!=null?n:!0)&&((r=e.options.enableColumnResizing)!=null?r:!0)},getIsResizing:()=>e.getState().columnSizingInfo.isResizingColumn===t.id}),createHeader:(t,e)=>({getSize:()=>{let n=0;const r=i=>{if(i.subHeaders.length)i.subHeaders.forEach(r);else{var o;n+=(o=i.column.getSize())!=null?o:0}};return r(t),n},getStart:()=>{if(t.index>0){const n=t.headerGroup.headers[t.index-1];return n.getStart()+n.getSize()}return 0},getResizeHandler:()=>{const n=e.getColumn(t.column.id),r=n?.getCanResize();return i=>{if(!n||!r||(i.persist==null||i.persist(),YP(i)&&i.touches&&i.touches.length>1))return;const o=t.getSize(),s=t?t.getLeafHeaders().map(y=>[y.column.id,y.column.getSize()]):[[n.id,n.getSize()]],a=YP(i)?Math.round(i.touches[0].clientX):i.clientX,l={},c=(y,_)=>{typeof _=="number"&&(e.setColumnSizingInfo(v=>{var x,w;const S=_-((x=v?.startOffset)!=null?x:0),E=Math.max(S/((w=v?.startSize)!=null?w:0),-.999999);return v.columnSizingStart.forEach(C=>{let[O,R]=C;l[O]=Math.round(Math.max(R+R*E,0)*100)/100}),{...v,deltaOffset:S,deltaPercentage:E}}),(e.options.columnResizeMode==="onChange"||y==="end")&&e.setColumnSizing(v=>({...v,...l})))},u=y=>c("move",y),d=y=>{c("end",y),e.setColumnSizingInfo(_=>({..._,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},f={moveHandler:y=>u(y.clientX),upHandler:y=>{document.removeEventListener("mousemove",f.moveHandler),document.removeEventListener("mouseup",f.upHandler),d(y.clientX)}},h={moveHandler:y=>(y.cancelable&&(y.preventDefault(),y.stopPropagation()),u(y.touches[0].clientX),!1),upHandler:y=>{var _;document.removeEventListener("touchmove",h.moveHandler),document.removeEventListener("touchend",h.upHandler),y.cancelable&&(y.preventDefault(),y.stopPropagation()),d((_=y.touches[0])==null?void 0:_.clientX)}},g=Fke()?{passive:!1}:!1;YP(i)?(document.addEventListener("touchmove",h.moveHandler,g),document.addEventListener("touchend",h.upHandler,g)):(document.addEventListener("mousemove",f.moveHandler,g),document.addEventListener("mouseup",f.upHandler,g)),e.setColumnSizingInfo(y=>({...y,startOffset:a,startSize:o,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,isResizingColumn:n.id}))}}}),createTable:t=>({setColumnSizing:e=>t.options.onColumnSizingChange==null?void 0:t.options.onColumnSizingChange(e),setColumnSizingInfo:e=>t.options.onColumnSizingInfoChange==null?void 0:t.options.onColumnSizingInfoChange(e),resetColumnSizing:e=>{var n;t.setColumnSizing(e?{}:(n=t.initialState.columnSizing)!=null?n:{})},resetHeaderSizeInfo:e=>{var n;t.setColumnSizingInfo(e?WP():(n=t.initialState.columnSizingInfo)!=null?n:WP())},getTotalSize:()=>{var e,n;return(e=(n=t.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?e:0},getLeftTotalSize:()=>{var e,n;return(e=(n=t.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?e:0},getCenterTotalSize:()=>{var e,n;return(e=(n=t.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?e:0},getRightTotalSize:()=>{var e,n;return(e=(n=t.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?e:0}})};let e_=null;function Fke(){if(typeof e_=="boolean")return e_;let t=!1;try{const e={get passive(){return t=!0,!1}},n=()=>{};window.addEventListener("test",n,e),window.removeEventListener("test",n)}catch{t=!1}return e_=t,e_}function YP(t){return t.type==="touchstart"}const zke={getInitialState:t=>({expanded:{},...t}),getDefaultOptions:t=>({onExpandedChange:fs("expanded",t),paginateExpandedRows:!0}),createTable:t=>{let e=!1,n=!1;return{_autoResetExpanded:()=>{var r,i;if(!e){t._queue(()=>{e=!0});return}if((r=(i=t.options.autoResetAll)!=null?i:t.options.autoResetExpanded)!=null?r:!t.options.manualExpanding){if(n)return;n=!0,t._queue(()=>{t.resetExpanded(),n=!1})}},setExpanded:r=>t.options.onExpandedChange==null?void 0:t.options.onExpandedChange(r),toggleAllRowsExpanded:r=>{r??!t.getIsAllRowsExpanded()?t.setExpanded(!0):t.setExpanded({})},resetExpanded:r=>{var i,o;t.setExpanded(r?{}:(i=(o=t.initialState)==null?void 0:o.expanded)!=null?i:{})},getCanSomeRowsExpand:()=>t.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),getToggleAllRowsExpandedHandler:()=>r=>{r.persist==null||r.persist(),t.toggleAllRowsExpanded()},getIsSomeRowsExpanded:()=>{const r=t.getState().expanded;return r===!0||Object.values(r).some(Boolean)},getIsAllRowsExpanded:()=>{const r=t.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||t.getRowModel().flatRows.some(i=>!i.getIsExpanded()))},getExpandedDepth:()=>{let r=0;return(t.getState().expanded===!0?Object.keys(t.getRowModel().rowsById):Object.keys(t.getState().expanded)).forEach(o=>{const s=o.split(".");r=Math.max(r,s.length)}),r},getPreExpandedRowModel:()=>t.getSortedRowModel(),getExpandedRowModel:()=>(!t._getExpandedRowModel&&t.options.getExpandedRowModel&&(t._getExpandedRowModel=t.options.getExpandedRowModel(t)),t.options.manualExpanding||!t._getExpandedRowModel?t.getPreExpandedRowModel():t._getExpandedRowModel())}},createRow:(t,e)=>({toggleExpanded:n=>{e.setExpanded(r=>{var i;const o=r===!0?!0:!!(r!=null&&r[t.id]);let s={};if(r===!0?Object.keys(e.getRowModel().rowsById).forEach(a=>{s[a]=!0}):s=r,n=(i=n)!=null?i:!o,!o&&n)return{...s,[t.id]:!0};if(o&&!n){const{[t.id]:a,...l}=s;return l}return r})},getIsExpanded:()=>{var n;const r=e.getState().expanded;return!!((n=e.options.getIsRowExpanded==null?void 0:e.options.getIsRowExpanded(t))!=null?n:r===!0||r?.[t.id])},getCanExpand:()=>{var n,r,i;return(n=e.options.getRowCanExpand==null?void 0:e.options.getRowCanExpand(t))!=null?n:((r=e.options.enableExpanding)!=null?r:!0)&&!!((i=t.subRows)!=null&&i.length)},getToggleExpandedHandler:()=>{const n=t.getCanExpand();return()=>{n&&t.toggleExpanded()}}})},_q=(t,e,n)=>{var r,i,o;const s=n.toLowerCase();return!!(!((r=t.getValue(e))==null||(i=r.toString())==null||(o=i.toLowerCase())==null)&&o.includes(s))};_q.autoRemove=t=>Bs(t);const xq=(t,e,n)=>{var r,i;return!!(!((r=t.getValue(e))==null||(i=r.toString())==null)&&i.includes(n))};xq.autoRemove=t=>Bs(t);const wq=(t,e,n)=>{var r,i;return((r=t.getValue(e))==null||(i=r.toString())==null?void 0:i.toLowerCase())===n?.toLowerCase()};wq.autoRemove=t=>Bs(t);const Sq=(t,e,n)=>{var r;return(r=t.getValue(e))==null?void 0:r.includes(n)};Sq.autoRemove=t=>Bs(t)||!(t!=null&&t.length);const bq=(t,e,n)=>!n.some(r=>{var i;return!((i=t.getValue(e))!=null&&i.includes(r))});bq.autoRemove=t=>Bs(t)||!(t!=null&&t.length);const Mq=(t,e,n)=>n.some(r=>{var i;return(i=t.getValue(e))==null?void 0:i.includes(r)});Mq.autoRemove=t=>Bs(t)||!(t!=null&&t.length);const Eq=(t,e,n)=>t.getValue(e)===n;Eq.autoRemove=t=>Bs(t);const Pq=(t,e,n)=>t.getValue(e)==n;Pq.autoRemove=t=>Bs(t);const zA=(t,e,n)=>{let[r,i]=n;const o=t.getValue(e);return o>=r&&o<=i};zA.resolveFilterValue=t=>{let[e,n]=t,r=typeof e!="number"?parseFloat(e):e,i=typeof n!="number"?parseFloat(n):n,o=e===null||Number.isNaN(r)?-1/0:r,s=n===null||Number.isNaN(i)?1/0:i;if(o>s){const a=o;o=s,s=a}return[o,s]};zA.autoRemove=t=>Bs(t)||Bs(t[0])&&Bs(t[1]);const ua={includesString:_q,includesStringSensitive:xq,equalsString:wq,arrIncludes:Sq,arrIncludesAll:bq,arrIncludesSome:Mq,equals:Eq,weakEquals:Pq,inNumberRange:zA};function Bs(t){return t==null||t===""}const Uke={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:t=>({columnFilters:[],globalFilter:void 0,...t}),getDefaultOptions:t=>({onColumnFiltersChange:fs("columnFilters",t),onGlobalFilterChange:fs("globalFilter",t),filterFromLeafRows:!1,maxLeafRowFilterDepth:100,globalFilterFn:"auto",getColumnCanGlobalFilter:e=>{var n,r;const i=(n=t.getCoreRowModel().flatRows[0])==null||(r=n._getAllCellsByColumnId()[e.id])==null?void 0:r.getValue();return typeof i=="string"||typeof i=="number"}}),createColumn:(t,e)=>({getAutoFilterFn:()=>{const n=e.getCoreRowModel().flatRows[0],r=n?.getValue(t.id);return typeof r=="string"?ua.includesString:typeof r=="number"?ua.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?ua.equals:Array.isArray(r)?ua.arrIncludes:ua.weakEquals},getFilterFn:()=>{var n,r;return D1(t.columnDef.filterFn)?t.columnDef.filterFn:t.columnDef.filterFn==="auto"?t.getAutoFilterFn():(n=(r=e.options.filterFns)==null?void 0:r[t.columnDef.filterFn])!=null?n:ua[t.columnDef.filterFn]},getCanFilter:()=>{var n,r,i;return((n=t.columnDef.enableColumnFilter)!=null?n:!0)&&((r=e.options.enableColumnFilters)!=null?r:!0)&&((i=e.options.enableFilters)!=null?i:!0)&&!!t.accessorFn},getCanGlobalFilter:()=>{var n,r,i,o;return((n=t.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=e.options.enableGlobalFilter)!=null?r:!0)&&((i=e.options.enableFilters)!=null?i:!0)&&((o=e.options.getColumnCanGlobalFilter==null?void 0:e.options.getColumnCanGlobalFilter(t))!=null?o:!0)&&!!t.accessorFn},getIsFiltered:()=>t.getFilterIndex()>-1,getFilterValue:()=>{var n,r;return(n=e.getState().columnFilters)==null||(r=n.find(i=>i.id===t.id))==null?void 0:r.value},getFilterIndex:()=>{var n,r;return(n=(r=e.getState().columnFilters)==null?void 0:r.findIndex(i=>i.id===t.id))!=null?n:-1},setFilterValue:n=>{e.setColumnFilters(r=>{const i=t.getFilterFn(),o=r?.find(u=>u.id===t.id),s=rc(n,o?o.value:void 0);if(GB(i,s,t)){var a;return(a=r?.filter(u=>u.id!==t.id))!=null?a:[]}const l={id:t.id,value:s};if(o){var c;return(c=r?.map(u=>u.id===t.id?l:u))!=null?c:[]}return r!=null&&r.length?[...r,l]:[l]})},_getFacetedRowModel:e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,t.id),getFacetedRowModel:()=>t._getFacetedRowModel?t._getFacetedRowModel():e.getPreFilteredRowModel(),_getFacetedUniqueValues:e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,t.id),getFacetedUniqueValues:()=>t._getFacetedUniqueValues?t._getFacetedUniqueValues():new Map,_getFacetedMinMaxValues:e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,t.id),getFacetedMinMaxValues:()=>{if(t._getFacetedMinMaxValues)return t._getFacetedMinMaxValues()}}),createRow:(t,e)=>({columnFilters:{},columnFiltersMeta:{}}),createTable:t=>({getGlobalAutoFilterFn:()=>ua.includesString,getGlobalFilterFn:()=>{var e,n;const{globalFilterFn:r}=t.options;return D1(r)?r:r==="auto"?t.getGlobalAutoFilterFn():(e=(n=t.options.filterFns)==null?void 0:n[r])!=null?e:ua[r]},setColumnFilters:e=>{const n=t.getAllLeafColumns(),r=i=>{var o;return(o=rc(e,i))==null?void 0:o.filter(s=>{const a=n.find(l=>l.id===s.id);if(a){const l=a.getFilterFn();if(GB(l,s.value,a))return!1}return!0})};t.options.onColumnFiltersChange==null||t.options.onColumnFiltersChange(r)},setGlobalFilter:e=>{t.options.onGlobalFilterChange==null||t.options.onGlobalFilterChange(e)},resetGlobalFilter:e=>{t.setGlobalFilter(e?void 0:t.initialState.globalFilter)},resetColumnFilters:e=>{var n,r;t.setColumnFilters(e?[]:(n=(r=t.initialState)==null?void 0:r.columnFilters)!=null?n:[])},getPreFilteredRowModel:()=>t.getCoreRowModel(),getFilteredRowModel:()=>(!t._getFilteredRowModel&&t.options.getFilteredRowModel&&(t._getFilteredRowModel=t.options.getFilteredRowModel(t)),t.options.manualFiltering||!t._getFilteredRowModel?t.getPreFilteredRowModel():t._getFilteredRowModel()),_getGlobalFacetedRowModel:t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,"__global__"),getGlobalFacetedRowModel:()=>t.options.manualFiltering||!t._getGlobalFacetedRowModel?t.getPreFilteredRowModel():t._getGlobalFacetedRowModel(),_getGlobalFacetedUniqueValues:t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,"__global__"),getGlobalFacetedUniqueValues:()=>t._getGlobalFacetedUniqueValues?t._getGlobalFacetedUniqueValues():new Map,_getGlobalFacetedMinMaxValues:t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,"__global__"),getGlobalFacetedMinMaxValues:()=>{if(t._getGlobalFacetedMinMaxValues)return t._getGlobalFacetedMinMaxValues()}})};function GB(t,e,n){return(t&&t.autoRemove?t.autoRemove(e,n):!1)||typeof e>"u"||typeof e=="string"&&!e}const Bke=(t,e,n)=>n.reduce((r,i)=>{const o=i.getValue(t);return r+(typeof o=="number"?o:0)},0),Hke=(t,e,n)=>{let r;return n.forEach(i=>{const o=i.getValue(t);o!=null&&(r>o||r===void 0&&o>=o)&&(r=o)}),r},Vke=(t,e,n)=>{let r;return n.forEach(i=>{const o=i.getValue(t);o!=null&&(r=o)&&(r=o)}),r},jke=(t,e,n)=>{let r,i;return n.forEach(o=>{const s=o.getValue(t);s!=null&&(r===void 0?s>=s&&(r=i=s):(r>s&&(r=s),i{let n=0,r=0;if(e.forEach(i=>{let o=i.getValue(t);o!=null&&(o=+o)>=o&&(++n,r+=o)}),n)return r/n},Gke=(t,e)=>{if(!e.length)return;const n=e.map(o=>o.getValue(t));if(!Ike(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),i=n.sort((o,s)=>o-s);return n.length%2!==0?i[r]:(i[r-1]+i[r])/2},Wke=(t,e)=>Array.from(new Set(e.map(n=>n.getValue(t))).values()),Yke=(t,e)=>new Set(e.map(n=>n.getValue(t))).size,Xke=(t,e)=>e.length,G_={sum:Bke,min:Hke,max:Vke,extent:jke,mean:$ke,median:Gke,unique:Wke,uniqueCount:Yke,count:Xke},Zke={getDefaultColumnDef:()=>({aggregatedCell:t=>{var e,n;return(e=(n=t.getValue())==null||n.toString==null?void 0:n.toString())!=null?e:null},aggregationFn:"auto"}),getInitialState:t=>({grouping:[],...t}),getDefaultOptions:t=>({onGroupingChange:fs("grouping",t),groupedColumnMode:"reorder"}),createColumn:(t,e)=>({toggleGrouping:()=>{e.setGrouping(n=>n!=null&&n.includes(t.id)?n.filter(r=>r!==t.id):[...n??[],t.id])},getCanGroup:()=>{var n,r,i,o;return(n=(r=(i=(o=t.columnDef.enableGrouping)!=null?o:!0)!=null?i:e.options.enableGrouping)!=null?r:!0)!=null?n:!!t.accessorFn},getIsGrouped:()=>{var n;return(n=e.getState().grouping)==null?void 0:n.includes(t.id)},getGroupedIndex:()=>{var n;return(n=e.getState().grouping)==null?void 0:n.indexOf(t.id)},getToggleGroupingHandler:()=>{const n=t.getCanGroup();return()=>{n&&t.toggleGrouping()}},getAutoAggregationFn:()=>{const n=e.getCoreRowModel().flatRows[0],r=n?.getValue(t.id);if(typeof r=="number")return G_.sum;if(Object.prototype.toString.call(r)==="[object Date]")return G_.extent},getAggregationFn:()=>{var n,r;if(!t)throw new Error;return D1(t.columnDef.aggregationFn)?t.columnDef.aggregationFn:t.columnDef.aggregationFn==="auto"?t.getAutoAggregationFn():(n=(r=e.options.aggregationFns)==null?void 0:r[t.columnDef.aggregationFn])!=null?n:G_[t.columnDef.aggregationFn]}}),createTable:t=>({setGrouping:e=>t.options.onGroupingChange==null?void 0:t.options.onGroupingChange(e),resetGrouping:e=>{var n,r;t.setGrouping(e?[]:(n=(r=t.initialState)==null?void 0:r.grouping)!=null?n:[])},getPreGroupedRowModel:()=>t.getFilteredRowModel(),getGroupedRowModel:()=>(!t._getGroupedRowModel&&t.options.getGroupedRowModel&&(t._getGroupedRowModel=t.options.getGroupedRowModel(t)),t.options.manualGrouping||!t._getGroupedRowModel?t.getPreGroupedRowModel():t._getGroupedRowModel())}),createRow:(t,e)=>({getIsGrouped:()=>!!t.groupingColumnId,getGroupingValue:n=>{if(t._groupingValuesCache.hasOwnProperty(n))return t._groupingValuesCache[n];const r=e.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(t._groupingValuesCache[n]=r.columnDef.getGroupingValue(t.original),t._groupingValuesCache[n]):t.getValue(n)},_groupingValuesCache:{}}),createCell:(t,e,n,r)=>({getIsGrouped:()=>e.getIsGrouped()&&e.id===n.groupingColumnId,getIsPlaceholder:()=>!t.getIsGrouped()&&e.getIsGrouped(),getIsAggregated:()=>{var i;return!t.getIsGrouped()&&!t.getIsPlaceholder()&&!!((i=n.subRows)!=null&&i.length)}})};function qke(t,e,n){if(!(e!=null&&e.length)||!n)return t;const r=t.filter(o=>!e.includes(o.id));return n==="remove"?r:[...e.map(o=>t.find(s=>s.id===o)).filter(Boolean),...r]}const Kke={getInitialState:t=>({columnOrder:[],...t}),getDefaultOptions:t=>({onColumnOrderChange:fs("columnOrder",t)}),createTable:t=>({setColumnOrder:e=>t.options.onColumnOrderChange==null?void 0:t.options.onColumnOrderChange(e),resetColumnOrder:e=>{var n;t.setColumnOrder(e?[]:(n=t.initialState.columnOrder)!=null?n:[])},_getOrderColumnsFn:Zt(()=>[t.getState().columnOrder,t.getState().grouping,t.options.groupedColumnMode],(e,n,r)=>i=>{let o=[];if(!(e!=null&&e.length))o=i;else{const s=[...e],a=[...i];for(;a.length&&s.length;){const l=s.shift(),c=a.findIndex(u=>u.id===l);c>-1&&o.push(a.splice(c,1)[0])}o=[...o,...a]}return qke(o,n,r)},{key:!1})})},NT=0,FT=10,XP=()=>({pageIndex:NT,pageSize:FT}),Qke={getInitialState:t=>({...t,pagination:{...XP(),...t?.pagination}}),getDefaultOptions:t=>({onPaginationChange:fs("pagination",t)}),createTable:t=>{let e=!1,n=!1;return{_autoResetPageIndex:()=>{var r,i;if(!e){t._queue(()=>{e=!0});return}if((r=(i=t.options.autoResetAll)!=null?i:t.options.autoResetPageIndex)!=null?r:!t.options.manualPagination){if(n)return;n=!0,t._queue(()=>{t.resetPageIndex(),n=!1})}},setPagination:r=>{const i=o=>rc(r,o);return t.options.onPaginationChange==null?void 0:t.options.onPaginationChange(i)},resetPagination:r=>{var i;t.setPagination(r?XP():(i=t.initialState.pagination)!=null?i:XP())},setPageIndex:r=>{t.setPagination(i=>{let o=rc(r,i.pageIndex);const s=typeof t.options.pageCount>"u"||t.options.pageCount===-1?Number.MAX_SAFE_INTEGER:t.options.pageCount-1;return o=Math.max(0,Math.min(o,s)),{...i,pageIndex:o}})},resetPageIndex:r=>{var i,o,s;t.setPageIndex(r?NT:(i=(o=t.initialState)==null||(s=o.pagination)==null?void 0:s.pageIndex)!=null?i:NT)},resetPageSize:r=>{var i,o,s;t.setPageSize(r?FT:(i=(o=t.initialState)==null||(s=o.pagination)==null?void 0:s.pageSize)!=null?i:FT)},setPageSize:r=>{t.setPagination(i=>{const o=Math.max(1,rc(r,i.pageSize)),s=i.pageSize*i.pageIndex,a=Math.floor(s/o);return{...i,pageIndex:a,pageSize:o}})},setPageCount:r=>t.setPagination(i=>{var o;let s=rc(r,(o=t.options.pageCount)!=null?o:-1);return typeof s=="number"&&(s=Math.max(-1,s)),{...i,pageCount:s}}),getPageOptions:Zt(()=>[t.getPageCount()],r=>{let i=[];return r&&r>0&&(i=[...new Array(r)].fill(null).map((o,s)=>s)),i},{key:!1,debug:()=>{var r;return(r=t.options.debugAll)!=null?r:t.options.debugTable}}),getCanPreviousPage:()=>t.getState().pagination.pageIndex>0,getCanNextPage:()=>{const{pageIndex:r}=t.getState().pagination,i=t.getPageCount();return i===-1?!0:i===0?!1:rt.setPageIndex(r=>r-1),nextPage:()=>t.setPageIndex(r=>r+1),getPrePaginationRowModel:()=>t.getExpandedRowModel(),getPaginationRowModel:()=>(!t._getPaginationRowModel&&t.options.getPaginationRowModel&&(t._getPaginationRowModel=t.options.getPaginationRowModel(t)),t.options.manualPagination||!t._getPaginationRowModel?t.getPrePaginationRowModel():t._getPaginationRowModel()),getPageCount:()=>{var r;return(r=t.options.pageCount)!=null?r:Math.ceil(t.getPrePaginationRowModel().rows.length/t.getState().pagination.pageSize)}}}},ZP=()=>({left:[],right:[]}),Jke={getInitialState:t=>({columnPinning:ZP(),...t}),getDefaultOptions:t=>({onColumnPinningChange:fs("columnPinning",t)}),createColumn:(t,e)=>({pin:n=>{const r=t.getLeafColumns().map(i=>i.id).filter(Boolean);e.setColumnPinning(i=>{var o,s;if(n==="right"){var a,l;return{left:((a=i?.left)!=null?a:[]).filter(d=>!(r!=null&&r.includes(d))),right:[...((l=i?.right)!=null?l:[]).filter(d=>!(r!=null&&r.includes(d))),...r]}}if(n==="left"){var c,u;return{left:[...((c=i?.left)!=null?c:[]).filter(d=>!(r!=null&&r.includes(d))),...r],right:((u=i?.right)!=null?u:[]).filter(d=>!(r!=null&&r.includes(d)))}}return{left:((o=i?.left)!=null?o:[]).filter(d=>!(r!=null&&r.includes(d))),right:((s=i?.right)!=null?s:[]).filter(d=>!(r!=null&&r.includes(d)))}})},getCanPin:()=>t.getLeafColumns().some(r=>{var i,o;return((i=r.columnDef.enablePinning)!=null?i:!0)&&((o=e.options.enablePinning)!=null?o:!0)}),getIsPinned:()=>{const n=t.getLeafColumns().map(a=>a.id),{left:r,right:i}=e.getState().columnPinning,o=n.some(a=>r?.includes(a)),s=n.some(a=>i?.includes(a));return o?"left":s?"right":!1},getPinnedIndex:()=>{var n,r,i;const o=t.getIsPinned();return o?(n=(r=e.getState().columnPinning)==null||(i=r[o])==null?void 0:i.indexOf(t.id))!=null?n:-1:0}}),createRow:(t,e)=>({getCenterVisibleCells:Zt(()=>[t._getAllVisibleCells(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,r,i)=>{const o=[...r??[],...i??[]];return n.filter(s=>!o.includes(s.column.id))},{key:"row.getCenterVisibleCells",debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugRows}}),getLeftVisibleCells:Zt(()=>[t._getAllVisibleCells(),e.getState().columnPinning.left,,],(n,r)=>(r??[]).map(o=>n.find(s=>s.column.id===o)).filter(Boolean).map(o=>({...o,position:"left"})),{key:"row.getLeftVisibleCells",debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugRows}}),getRightVisibleCells:Zt(()=>[t._getAllVisibleCells(),e.getState().columnPinning.right],(n,r)=>(r??[]).map(o=>n.find(s=>s.column.id===o)).filter(Boolean).map(o=>({...o,position:"right"})),{key:"row.getRightVisibleCells",debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugRows}})}),createTable:t=>({setColumnPinning:e=>t.options.onColumnPinningChange==null?void 0:t.options.onColumnPinningChange(e),resetColumnPinning:e=>{var n,r;return t.setColumnPinning(e?ZP():(n=(r=t.initialState)==null?void 0:r.columnPinning)!=null?n:ZP())},getIsSomeColumnsPinned:e=>{var n;const r=t.getState().columnPinning;if(!e){var i,o;return!!((i=r.left)!=null&&i.length||(o=r.right)!=null&&o.length)}return!!((n=r[e])!=null&&n.length)},getLeftLeafColumns:Zt(()=>[t.getAllLeafColumns(),t.getState().columnPinning.left],(e,n)=>(n??[]).map(r=>e.find(i=>i.id===r)).filter(Boolean),{key:!1,debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugColumns}}),getRightLeafColumns:Zt(()=>[t.getAllLeafColumns(),t.getState().columnPinning.right],(e,n)=>(n??[]).map(r=>e.find(i=>i.id===r)).filter(Boolean),{key:!1,debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugColumns}}),getCenterLeafColumns:Zt(()=>[t.getAllLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,n,r)=>{const i=[...n??[],...r??[]];return e.filter(o=>!i.includes(o.id))},{key:!1,debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugColumns}})})},eNe={getInitialState:t=>({rowSelection:{},...t}),getDefaultOptions:t=>({onRowSelectionChange:fs("rowSelection",t),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:t=>({setRowSelection:e=>t.options.onRowSelectionChange==null?void 0:t.options.onRowSelectionChange(e),resetRowSelection:e=>{var n;return t.setRowSelection(e?{}:(n=t.initialState.rowSelection)!=null?n:{})},toggleAllRowsSelected:e=>{t.setRowSelection(n=>{e=typeof e<"u"?e:!t.getIsAllRowsSelected();const r={...n},i=t.getPreGroupedRowModel().flatRows;return e?i.forEach(o=>{o.getCanSelect()&&(r[o.id]=!0)}):i.forEach(o=>{delete r[o.id]}),r})},toggleAllPageRowsSelected:e=>t.setRowSelection(n=>{const r=typeof e<"u"?e:!t.getIsAllPageRowsSelected(),i={...n};return t.getRowModel().rows.forEach(o=>{zT(i,o.id,r,t)}),i}),getPreSelectedRowModel:()=>t.getCoreRowModel(),getSelectedRowModel:Zt(()=>[t.getState().rowSelection,t.getCoreRowModel()],(e,n)=>Object.keys(e).length?qP(t,n):{rows:[],flatRows:[],rowsById:{}},{key:!1,debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugTable}}),getFilteredSelectedRowModel:Zt(()=>[t.getState().rowSelection,t.getFilteredRowModel()],(e,n)=>Object.keys(e).length?qP(t,n):{rows:[],flatRows:[],rowsById:{}},{key:"getFilteredSelectedRowModel",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugTable}}),getGroupedSelectedRowModel:Zt(()=>[t.getState().rowSelection,t.getSortedRowModel()],(e,n)=>Object.keys(e).length?qP(t,n):{rows:[],flatRows:[],rowsById:{}},{key:"getGroupedSelectedRowModel",debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugTable}}),getIsAllRowsSelected:()=>{const e=t.getFilteredRowModel().flatRows,{rowSelection:n}=t.getState();let r=!!(e.length&&Object.keys(n).length);return r&&e.some(i=>i.getCanSelect()&&!n[i.id])&&(r=!1),r},getIsAllPageRowsSelected:()=>{const e=t.getPaginationRowModel().flatRows.filter(i=>i.getCanSelect()),{rowSelection:n}=t.getState();let r=!!e.length;return r&&e.some(i=>!n[i.id])&&(r=!1),r},getIsSomeRowsSelected:()=>{var e;const n=Object.keys((e=t.getState().rowSelection)!=null?e:{}).length;return n>0&&n{const e=t.getPaginationRowModel().flatRows;return t.getIsAllPageRowsSelected()?!1:e.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},getToggleAllRowsSelectedHandler:()=>e=>{t.toggleAllRowsSelected(e.target.checked)},getToggleAllPageRowsSelectedHandler:()=>e=>{t.toggleAllPageRowsSelected(e.target.checked)}}),createRow:(t,e)=>({toggleSelected:n=>{const r=t.getIsSelected();e.setRowSelection(i=>{if(n=typeof n<"u"?n:!r,r===n)return i;const o={...i};return zT(o,t.id,n,e),o})},getIsSelected:()=>{const{rowSelection:n}=e.getState();return UA(t,n)},getIsSomeSelected:()=>{const{rowSelection:n}=e.getState();return WB(t,n)==="some"},getIsAllSubRowsSelected:()=>{const{rowSelection:n}=e.getState();return WB(t,n)==="all"},getCanSelect:()=>{var n;return typeof e.options.enableRowSelection=="function"?e.options.enableRowSelection(t):(n=e.options.enableRowSelection)!=null?n:!0},getCanSelectSubRows:()=>{var n;return typeof e.options.enableSubRowSelection=="function"?e.options.enableSubRowSelection(t):(n=e.options.enableSubRowSelection)!=null?n:!0},getCanMultiSelect:()=>{var n;return typeof e.options.enableMultiRowSelection=="function"?e.options.enableMultiRowSelection(t):(n=e.options.enableMultiRowSelection)!=null?n:!0},getToggleSelectedHandler:()=>{const n=t.getCanSelect();return r=>{var i;n&&t.toggleSelected((i=r.target)==null?void 0:i.checked)}}})},zT=(t,e,n,r)=>{var i;const o=r.getRow(e);n?(o.getCanMultiSelect()||Object.keys(t).forEach(s=>delete t[s]),o.getCanSelect()&&(t[e]=!0)):delete t[e],(i=o.subRows)!=null&&i.length&&o.getCanSelectSubRows()&&o.subRows.forEach(s=>zT(t,s.id,n,r))};function qP(t,e){const n=t.getState().rowSelection,r=[],i={},o=function(s,a){return s.map(l=>{var c;const u=UA(l,n);if(u&&(r.push(l),i[l.id]=l),(c=l.subRows)!=null&&c.length&&(l={...l,subRows:o(l.subRows)}),u)return l}).filter(Boolean)};return{rows:o(e.rows),flatRows:r,rowsById:i}}function UA(t,e){var n;return(n=e[t.id])!=null?n:!1}function WB(t,e,n){if(t.subRows&&t.subRows.length){let r=!0,i=!1;return t.subRows.forEach(o=>{i&&!r||(UA(o,e)?i=!0:r=!1)}),r?"all":i?"some":!1}return!1}const UT=/([0-9]+)/gm,tNe=(t,e,n)=>Cq(Cc(t.getValue(n)).toLowerCase(),Cc(e.getValue(n)).toLowerCase()),nNe=(t,e,n)=>Cq(Cc(t.getValue(n)),Cc(e.getValue(n))),rNe=(t,e,n)=>BA(Cc(t.getValue(n)).toLowerCase(),Cc(e.getValue(n)).toLowerCase()),iNe=(t,e,n)=>BA(Cc(t.getValue(n)),Cc(e.getValue(n))),oNe=(t,e,n)=>{const r=t.getValue(n),i=e.getValue(n);return r>i?1:rBA(t.getValue(n),e.getValue(n));function BA(t,e){return t===e?0:t>e?1:-1}function Cc(t){return typeof t=="number"?isNaN(t)||t===1/0||t===-1/0?"":String(t):typeof t=="string"?t:""}function Cq(t,e){const n=t.split(UT).filter(Boolean),r=e.split(UT).filter(Boolean);for(;n.length&&r.length;){const i=n.shift(),o=r.shift(),s=parseInt(i,10),a=parseInt(o,10),l=[s,a].sort();if(isNaN(l[0])){if(i>o)return 1;if(o>i)return-1;continue}if(isNaN(l[1]))return isNaN(s)?-1:1;if(s>a)return 1;if(a>s)return-1}return n.length-r.length}const _u={alphanumeric:tNe,alphanumericCaseSensitive:nNe,text:rNe,textCaseSensitive:iNe,datetime:oNe,basic:sNe},aNe={getInitialState:t=>({sorting:[],...t}),getDefaultColumnDef:()=>({sortingFn:"auto"}),getDefaultOptions:t=>({onSortingChange:fs("sorting",t),isMultiSortEvent:e=>e.shiftKey}),createColumn:(t,e)=>({getAutoSortingFn:()=>{const n=e.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const i of n){const o=i?.getValue(t.id);if(Object.prototype.toString.call(o)==="[object Date]")return _u.datetime;if(typeof o=="string"&&(r=!0,o.split(UT).length>1))return _u.alphanumeric}return r?_u.text:_u.basic},getAutoSortDir:()=>{const n=e.getFilteredRowModel().flatRows[0];return typeof n?.getValue(t.id)=="string"?"asc":"desc"},getSortingFn:()=>{var n,r;if(!t)throw new Error;return D1(t.columnDef.sortingFn)?t.columnDef.sortingFn:t.columnDef.sortingFn==="auto"?t.getAutoSortingFn():(n=(r=e.options.sortingFns)==null?void 0:r[t.columnDef.sortingFn])!=null?n:_u[t.columnDef.sortingFn]},toggleSorting:(n,r)=>{const i=t.getNextSortingOrder(),o=typeof n<"u"&&n!==null;e.setSorting(s=>{const a=s?.find(h=>h.id===t.id),l=s?.findIndex(h=>h.id===t.id);let c=[],u,d=o?n:i==="desc";if(s!=null&&s.length&&t.getCanMultiSort()&&r?a?u="toggle":u="add":s!=null&&s.length&&l!==s.length-1?u="replace":a?u="toggle":u="replace",u==="toggle"&&(o||i||(u="remove")),u==="add"){var f;c=[...s,{id:t.id,desc:d}],c.splice(0,c.length-((f=e.options.maxMultiSortColCount)!=null?f:Number.MAX_SAFE_INTEGER))}else u==="toggle"?c=s.map(h=>h.id===t.id?{...h,desc:d}:h):u==="remove"?c=s.filter(h=>h.id!==t.id):c=[{id:t.id,desc:d}];return c})},getFirstSortDir:()=>{var n,r;return((n=(r=t.columnDef.sortDescFirst)!=null?r:e.options.sortDescFirst)!=null?n:t.getAutoSortDir()==="desc")?"desc":"asc"},getNextSortingOrder:n=>{var r,i;const o=t.getFirstSortDir(),s=t.getIsSorted();return s?s!==o&&((r=e.options.enableSortingRemoval)==null||r)&&(!(n&&(i=e.options.enableMultiRemove)!=null)||i)?!1:s==="desc"?"asc":"desc":o},getCanSort:()=>{var n,r;return((n=t.columnDef.enableSorting)!=null?n:!0)&&((r=e.options.enableSorting)!=null?r:!0)&&!!t.accessorFn},getCanMultiSort:()=>{var n,r;return(n=(r=t.columnDef.enableMultiSort)!=null?r:e.options.enableMultiSort)!=null?n:!!t.accessorFn},getIsSorted:()=>{var n;const r=(n=e.getState().sorting)==null?void 0:n.find(i=>i.id===t.id);return r?r.desc?"desc":"asc":!1},getSortIndex:()=>{var n,r;return(n=(r=e.getState().sorting)==null?void 0:r.findIndex(i=>i.id===t.id))!=null?n:-1},clearSorting:()=>{e.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==t.id):[])},getToggleSortingHandler:()=>{const n=t.getCanSort();return r=>{n&&(r.persist==null||r.persist(),t.toggleSorting==null||t.toggleSorting(void 0,t.getCanMultiSort()?e.options.isMultiSortEvent==null?void 0:e.options.isMultiSortEvent(r):!1))}}}),createTable:t=>({setSorting:e=>t.options.onSortingChange==null?void 0:t.options.onSortingChange(e),resetSorting:e=>{var n,r;t.setSorting(e?[]:(n=(r=t.initialState)==null?void 0:r.sorting)!=null?n:[])},getPreSortedRowModel:()=>t.getGroupedRowModel(),getSortedRowModel:()=>(!t._getSortedRowModel&&t.options.getSortedRowModel&&(t._getSortedRowModel=t.options.getSortedRowModel(t)),t.options.manualSorting||!t._getSortedRowModel?t.getPreSortedRowModel():t._getSortedRowModel())})},lNe={getInitialState:t=>({columnVisibility:{},...t}),getDefaultOptions:t=>({onColumnVisibilityChange:fs("columnVisibility",t)}),createColumn:(t,e)=>({toggleVisibility:n=>{t.getCanHide()&&e.setColumnVisibility(r=>({...r,[t.id]:n??!t.getIsVisible()}))},getIsVisible:()=>{var n,r;return(n=(r=e.getState().columnVisibility)==null?void 0:r[t.id])!=null?n:!0},getCanHide:()=>{var n,r;return((n=t.columnDef.enableHiding)!=null?n:!0)&&((r=e.options.enableHiding)!=null?r:!0)},getToggleVisibilityHandler:()=>n=>{t.toggleVisibility==null||t.toggleVisibility(n.target.checked)}}),createRow:(t,e)=>({_getAllVisibleCells:Zt(()=>[t.getAllCells(),e.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),{key:"row._getAllVisibleCells",debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugRows}}),getVisibleCells:Zt(()=>[t.getLeftVisibleCells(),t.getCenterVisibleCells(),t.getRightVisibleCells()],(n,r,i)=>[...n,...r,...i],{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugRows}})}),createTable:t=>{const e=(n,r)=>Zt(()=>[r(),r().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(o=>o.getIsVisible==null?void 0:o.getIsVisible()),{key:n,debug:()=>{var i;return(i=t.options.debugAll)!=null?i:t.options.debugColumns}});return{getVisibleFlatColumns:e("getVisibleFlatColumns",()=>t.getAllFlatColumns()),getVisibleLeafColumns:e("getVisibleLeafColumns",()=>t.getAllLeafColumns()),getLeftVisibleLeafColumns:e("getLeftVisibleLeafColumns",()=>t.getLeftLeafColumns()),getRightVisibleLeafColumns:e("getRightVisibleLeafColumns",()=>t.getRightLeafColumns()),getCenterVisibleLeafColumns:e("getCenterVisibleLeafColumns",()=>t.getCenterLeafColumns()),setColumnVisibility:n=>t.options.onColumnVisibilityChange==null?void 0:t.options.onColumnVisibilityChange(n),resetColumnVisibility:n=>{var r;t.setColumnVisibility(n?{}:(r=t.initialState.columnVisibility)!=null?r:{})},toggleAllColumnsVisible:n=>{var r;n=(r=n)!=null?r:!t.getIsAllColumnsVisible(),t.setColumnVisibility(t.getAllLeafColumns().reduce((i,o)=>({...i,[o.id]:n||!(o.getCanHide!=null&&o.getCanHide())}),{}))},getIsAllColumnsVisible:()=>!t.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),getIsSomeColumnsVisible:()=>t.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),getToggleAllColumnsVisibilityHandler:()=>n=>{var r;t.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}}},YB=[kke,lNe,Kke,Jke,Uke,aNe,Zke,zke,Qke,eNe,Nke];function cNe(t){var e;(t.debugAll||t.debugTable)&&console.info("Creating Table Instance...");let n={_features:YB};const r=n._features.reduce((u,d)=>Object.assign(u,d.getDefaultOptions==null?void 0:d.getDefaultOptions(n)),{}),i=u=>n.options.mergeOptions?n.options.mergeOptions(r,u):{...r,...u};let s={...{},...(e=t.initialState)!=null?e:{}};n._features.forEach(u=>{var d;s=(d=u.getInitialState==null?void 0:u.getInitialState(s))!=null?d:s});const a=[];let l=!1;const c={_features:YB,options:{...r,...t},initialState:s,_queue:u=>{a.push(u),l||(l=!0,Promise.resolve().then(()=>{for(;a.length;)a.shift()();l=!1}).catch(d=>setTimeout(()=>{throw d})))},reset:()=>{n.setState(n.initialState)},setOptions:u=>{const d=rc(u,n.options);n.options=i(d)},getState:()=>n.options.state,setState:u=>{n.options.onStateChange==null||n.options.onStateChange(u)},_getRowId:(u,d,f)=>{var h;return(h=n.options.getRowId==null?void 0:n.options.getRowId(u,d,f))!=null?h:`${f?[f.id,d].join("."):d}`},getCoreRowModel:()=>(n._getCoreRowModel||(n._getCoreRowModel=n.options.getCoreRowModel(n)),n._getCoreRowModel()),getRowModel:()=>n.getPaginationRowModel(),getRow:u=>{const d=n.getRowModel().rowsById[u];if(!d)throw new Error;return d},_getDefaultColumnDef:Zt(()=>[n.options.defaultColumn],u=>{var d;return u=(d=u)!=null?d:{},{header:f=>{const h=f.header.column.columnDef;return h.accessorKey?h.accessorKey:h.accessorFn?h.id:null},cell:f=>{var h,g;return(h=(g=f.renderValue())==null||g.toString==null?void 0:g.toString())!=null?h:null},...n._features.reduce((f,h)=>Object.assign(f,h.getDefaultColumnDef==null?void 0:h.getDefaultColumnDef()),{}),...u}},{debug:()=>{var u;return(u=n.options.debugAll)!=null?u:n.options.debugColumns},key:!1}),_getColumnDefs:()=>n.options.columns,getAllColumns:Zt(()=>[n._getColumnDefs()],u=>{const d=function(f,h,g){return g===void 0&&(g=0),f.map(y=>{const _=Lke(n,y,g,h),v=y;return _.columns=v.columns?d(v.columns,_,g+1):[],_})};return d(u)},{key:!1,debug:()=>{var u;return(u=n.options.debugAll)!=null?u:n.options.debugColumns}}),getAllFlatColumns:Zt(()=>[n.getAllColumns()],u=>u.flatMap(d=>d.getFlatColumns()),{key:!1,debug:()=>{var u;return(u=n.options.debugAll)!=null?u:n.options.debugColumns}}),_getAllFlatColumnsById:Zt(()=>[n.getAllFlatColumns()],u=>u.reduce((d,f)=>(d[f.id]=f,d),{}),{key:!1,debug:()=>{var u;return(u=n.options.debugAll)!=null?u:n.options.debugColumns}}),getAllLeafColumns:Zt(()=>[n.getAllColumns(),n._getOrderColumnsFn()],(u,d)=>{let f=u.flatMap(h=>h.getLeafColumns());return d(f)},{key:!1,debug:()=>{var u;return(u=n.options.debugAll)!=null?u:n.options.debugColumns}}),getColumn:u=>n._getAllFlatColumnsById()[u]};return Object.assign(n,c),n._features.forEach(u=>Object.assign(n,u.createTable==null?void 0:u.createTable(n))),n}function uNe(t,e,n,r){const i=()=>{var s;return(s=o.getValue())!=null?s:t.options.renderFallbackValue},o={id:`${e.id}_${n.id}`,row:e,column:n,getValue:()=>e.getValue(r),renderValue:i,getContext:Zt(()=>[t,n,e,o],(s,a,l,c)=>({table:s,column:a,row:l,cell:c,getValue:c.getValue,renderValue:c.renderValue}),{key:!1,debug:()=>t.options.debugAll})};return t._features.forEach(s=>{Object.assign(o,s.createCell==null?void 0:s.createCell(o,n,e,t))},{}),o}const xb=(t,e,n,r,i,o,s)=>{let a={id:e,index:r,original:n,depth:i,parentId:s,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(a._valuesCache.hasOwnProperty(l))return a._valuesCache[l];const c=t.getColumn(l);if(c!=null&&c.accessorFn)return a._valuesCache[l]=c.accessorFn(a.original,r),a._valuesCache[l]},getUniqueValues:l=>{if(a._uniqueValuesCache.hasOwnProperty(l))return a._uniqueValuesCache[l];const c=t.getColumn(l);if(c!=null&&c.accessorFn)return c.columnDef.getUniqueValues?(a._uniqueValuesCache[l]=c.columnDef.getUniqueValues(a.original,r),a._uniqueValuesCache[l]):(a._uniqueValuesCache[l]=[a.getValue(l)],a._uniqueValuesCache[l])},renderValue:l=>{var c;return(c=a.getValue(l))!=null?c:t.options.renderFallbackValue},subRows:o??[],getLeafRows:()=>yq(a.subRows,l=>l.subRows),getParentRow:()=>a.parentId?t.getRow(a.parentId):void 0,getParentRows:()=>{let l=[],c=a;for(;;){const u=c.getParentRow();if(!u)break;l.push(u),c=u}return l.reverse()},getAllCells:Zt(()=>[t.getAllLeafColumns()],l=>l.map(c=>uNe(t,a,c,c.id)),{key:!1,debug:()=>{var l;return(l=t.options.debugAll)!=null?l:t.options.debugRows}}),_getAllCellsByColumnId:Zt(()=>[a.getAllCells()],l=>l.reduce((c,u)=>(c[u.column.id]=u,c),{}),{key:"row.getAllCellsByColumnId",debug:()=>{var l;return(l=t.options.debugAll)!=null?l:t.options.debugRows}})};for(let l=0;lZt(()=>[t.options.data],e=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(i,o,s){o===void 0&&(o=0);const a=[];for(let c=0;c{var e;return(e=t.options.debugAll)!=null?e:t.options.debugTable},onChange:()=>{t._autoResetPageIndex()}})}function Tq(t,e,n){return n.options.filterFromLeafRows?fNe(t,e,n):hNe(t,e,n)}function fNe(t,e,n){var r;const i=[],o={},s=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,a=function(l,c){c===void 0&&(c=0);const u=[];for(let f=0;fZt(()=>[t.getPreFilteredRowModel(),t.getState().columnFilters,t.getState().globalFilter],(e,n,r)=>{if(!e.rows.length||!(n!=null&&n.length)&&!r){for(let f=0;f{var h;const g=t.getColumn(f.id);if(!g)return;const y=g.getFilterFn();y&&i.push({id:f.id,filterFn:y,resolvedValue:(h=y.resolveFilterValue==null?void 0:y.resolveFilterValue(f.value))!=null?h:f.value})});const s=n.map(f=>f.id),a=t.getGlobalFilterFn(),l=t.getAllLeafColumns().filter(f=>f.getCanGlobalFilter());r&&a&&l.length&&(s.push("__global__"),l.forEach(f=>{var h;o.push({id:f.id,filterFn:a,resolvedValue:(h=a.resolveFilterValue==null?void 0:a.resolveFilterValue(r))!=null?h:r})}));let c,u;for(let f=0;f{h.columnFiltersMeta[y]=_})}if(o.length){for(let g=0;g{h.columnFiltersMeta[y]=_})){h.columnFilters.__global__=!0;break}}h.columnFilters.__global__!==!0&&(h.columnFilters.__global__=!1)}}const d=f=>{for(let h=0;h{var e;return(e=t.options.debugAll)!=null?e:t.options.debugTable},onChange:()=>{t._autoResetPageIndex()}})}function mNe(){return(t,e)=>Zt(()=>[t.getPreFilteredRowModel(),t.getState().columnFilters,t.getState().globalFilter,t.getFilteredRowModel()],(n,r,i)=>{if(!n.rows.length||!(r!=null&&r.length)&&!i)return n;const o=[...r.map(a=>a.id).filter(a=>a!==e),i?"__global__":void 0].filter(Boolean),s=a=>{for(let l=0;l{var n;return(n=t.options.debugAll)!=null?n:t.options.debugTable},onChange:()=>{}})}function gNe(){return t=>Zt(()=>[t.getState().sorting,t.getPreSortedRowModel()],(e,n)=>{if(!n.rows.length||!(e!=null&&e.length))return n;const r=t.getState().sorting,i=[],o=r.filter(l=>{var c;return(c=t.getColumn(l.id))==null?void 0:c.getCanSort()}),s={};o.forEach(l=>{const c=t.getColumn(l.id);c&&(s[l.id]={sortUndefined:c.columnDef.sortUndefined,invertSorting:c.columnDef.invertSorting,sortingFn:c.getSortingFn()})});const a=l=>{const c=[...l];return c.sort((u,d)=>{for(let h=0;h"u",E=typeof w>"u";if(S||E){let C=S&&E?0:S?y.sortUndefined:-y.sortUndefined;return _&&C!==0&&(C*=-1),C}}let v=y.sortingFn(u,d,g.id);if(v!==0)return _&&(v*=-1),y.invertSorting&&(v*=-1),v}return u.index-d.index}),c.forEach(u=>{var d;i.push(u),(d=u.subRows)!=null&&d.length&&(u.subRows=a(u.subRows))}),c};return{rows:a(n.rows),flatRows:i,rowsById:n.rowsById}},{key:!1,debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugTable},onChange:()=>{t._autoResetPageIndex()}})}function vNe(){return t=>Zt(()=>[t.getState().grouping,t.getPreGroupedRowModel()],(e,n)=>{if(!n.rows.length||!e.length)return n;const r=e.filter(l=>t.getColumn(l)),i=[],o={},s=function(l,c,u){if(c===void 0&&(c=0),c>=r.length)return l.map(g=>(g.depth=c,i.push(g),o[g.id]=g,g.subRows&&(g.subRows=s(g.subRows,c+1,g.id)),g));const d=r[c],f=yNe(l,d);return Array.from(f.entries()).map((g,y)=>{let[_,v]=g,x=`${d}:${_}`;x=u?`${u}>${x}`:x;const w=s(v,c+1,x),S=c?yq(v,C=>C.subRows):v,E=xb(t,x,S[0].original,y,c,void 0,u);return Object.assign(E,{groupingColumnId:d,groupingValue:_,subRows:w,leafRows:S,getValue:C=>{if(r.includes(C)){if(E._valuesCache.hasOwnProperty(C))return E._valuesCache[C];if(v[0]){var O;E._valuesCache[C]=(O=v[0].getValue(C))!=null?O:void 0}return E._valuesCache[C]}if(E._groupingValuesCache.hasOwnProperty(C))return E._groupingValuesCache[C];const R=t.getColumn(C),T=R?.getAggregationFn();if(T)return E._groupingValuesCache[C]=T(C,S,v),E._groupingValuesCache[C]}}),w.forEach(C=>{i.push(C),o[C.id]=C}),E})},a=s(n.rows,0);return a.forEach(l=>{i.push(l),o[l.id]=l}),{rows:a,flatRows:i,rowsById:o}},{key:!1,debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugTable},onChange:()=>{t._queue(()=>{t._autoResetExpanded(),t._autoResetPageIndex()})}})}function yNe(t,e){const n=new Map;return t.reduce((r,i)=>{const o=`${i.getGroupingValue(e)}`,s=r.get(o);return s?s.push(i):r.set(o,[i]),r},n)}function _Ne(){return t=>Zt(()=>[t.getState().expanded,t.getPreExpandedRowModel(),t.options.paginateExpandedRows],(e,n,r)=>!n.rows.length||e!==!0&&!Object.keys(e??{}).length||!r?n:Oq(n),{key:!1,debug:()=>{var e;return(e=t.options.debugAll)!=null?e:t.options.debugTable}})}function Oq(t){const e=[],n=r=>{var i;e.push(r),(i=r.subRows)!=null&&i.length&&r.getIsExpanded()&&r.subRows.forEach(n)};return t.rows.forEach(n),{rows:e,flatRows:t.flatRows,rowsById:t.rowsById}}function xNe(t){return e=>Zt(()=>[e.getState().pagination,e.getPrePaginationRowModel(),e.options.paginateExpandedRows?void 0:e.getState().expanded],(n,r)=>{if(!r.rows.length)return r;const{pageSize:i,pageIndex:o}=n;let{rows:s,flatRows:a,rowsById:l}=r;const c=i*o,u=c+i;s=s.slice(c,u);let d;e.options.paginateExpandedRows?d={rows:s,flatRows:a,rowsById:l}:d=Oq({rows:s,flatRows:a,rowsById:l}),d.flatRows=[];const f=h=>{d.flatRows.push(h),h.subRows.length&&h.subRows.forEach(f)};return d.rows.forEach(f),d},{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugTable}})}/** * react-table * * Copyright (c) TanStack @@ -5704,7 +5685,7 @@ void main() { * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function NNe(t){const e={state:{},onStateChange:()=>{},renderFallbackValue:null,...t},[n]=M.useState(()=>({current:MNe(e)})),[r,i]=M.useState(()=>n.current.initialState);return n.current.setOptions(o=>({...o,...t,state:{...r,...t.state},onStateChange:s=>{i(s),t.onStateChange==null||t.onStateChange(s)}})),n.current}/** + */function wNe(t){const e={state:{},onStateChange:()=>{},renderFallbackValue:null,...t},[n]=M.useState(()=>({current:cNe(e)})),[r,i]=M.useState(()=>n.current.initialState);return n.current.setOptions(o=>({...o,...t,state:{...r,...t.state},onStateChange:s=>{i(s),t.onStateChange==null||t.onStateChange(s)}})),n.current}/** * match-sorter-utils * * Copyright (c) TanStack @@ -5713,12 +5694,12 @@ void main() { * LICENSE.md file in the root directory of this source tree. * * @license MIT - */const Aq={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",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̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z"},SNe=Object.keys(Rq).join("|"),bNe=new RegExp(SNe,"g");function MNe(t){return t.replace(bNe,e=>Rq[e])}/** * @name match-sorter * @license MIT license. * @copyright (c) 2099 Kent C. Dodds * @author Kent C. Dodds (https://kentcdodds.com) - */const Xi={CASE_SENSITIVE_EQUAL:7,EQUAL:6,STARTS_WITH:5,WORD_STARTS_WITH:4,CONTAINS:3,ACRONYM:2,MATCHES:1,NO_MATCH:0};function BNe(t,e,n){var r;if(n=n||{},n.threshold=(r=n.threshold)!=null?r:Xi.MATCHES,!n.accessors){const s=KB(t,e,n);return{rankedValue:t,rank:s,accessorIndex:-1,accessorThreshold:n.threshold,passed:s>=n.threshold}}const i=GNe(t,n.accessors),o={rankedValue:t,rank:Xi.NO_MATCH,accessorIndex:-1,accessorThreshold:n.threshold,passed:!1};for(let s=0;s=Xi.MATCHES?l=c:l>u&&(l=u),l=Math.min(l,u),l>=d&&l>o.rank&&(o.rank=l,o.passed=!0,o.accessorIndex=s,o.accessorThreshold=d,o.rankedValue=a.itemValue)}return o}function KB(t,e,n){return t=QB(t,n),e=QB(e,n),e.length>t.length?Xi.NO_MATCH:t===e?Xi.CASE_SENSITIVE_EQUAL:(t=t.toLowerCase(),e=e.toLowerCase(),t===e?Xi.EQUAL:t.startsWith(e)?Xi.STARTS_WITH:t.includes(` ${e}`)?Xi.WORD_STARTS_WITH:t.includes(e)?Xi.CONTAINS:e.length===1?Xi.NO_MATCH:HNe(t).includes(e)?Xi.ACRONYM:VNe(t,e))}function HNe(t){let e="";return t.split(" ").forEach(r=>{r.split("-").forEach(o=>{e+=o.substr(0,1)})}),e}function VNe(t,e){let n=0,r=0;function i(l,c,u){for(let d=u,f=c.length;d-1))return Xi.NO_MATCH}const a=r-s;return o(a)}function jNe(t,e){return t.rank===e.rank?0:t.rank>e.rank?-1:1}function QB(t,e){let{keepDiacritics:n}=e;return t=`${t}`,n||(t=UNe(t)),t}function $Ne(t,e){let n=e;typeof e=="object"&&(n=e.accessor);const r=n(t);return r==null?[]:Array.isArray(r)?r:[String(r)]}function GNe(t,e){const n=[];for(let r=0,i=e.length;r=n.threshold}}const i=RNe(t,n.accessors),o={rankedValue:t,rank:Xi.NO_MATCH,accessorIndex:-1,accessorThreshold:n.threshold,passed:!1};for(let s=0;s=Xi.MATCHES?l=c:l>u&&(l=u),l=Math.min(l,u),l>=d&&l>o.rank&&(o.rank=l,o.passed=!0,o.accessorIndex=s,o.accessorThreshold=d,o.rankedValue=a.itemValue)}return o}function XB(t,e,n){return t=ZB(t,n),e=ZB(e,n),e.length>t.length?Xi.NO_MATCH:t===e?Xi.CASE_SENSITIVE_EQUAL:(t=t.toLowerCase(),e=e.toLowerCase(),t===e?Xi.EQUAL:t.startsWith(e)?Xi.STARTS_WITH:t.includes(` ${e}`)?Xi.WORD_STARTS_WITH:t.includes(e)?Xi.CONTAINS:e.length===1?Xi.NO_MATCH:PNe(t).includes(e)?Xi.ACRONYM:CNe(t,e))}function PNe(t){let e="";return t.split(" ").forEach(r=>{r.split("-").forEach(o=>{e+=o.substr(0,1)})}),e}function CNe(t,e){let n=0,r=0;function i(l,c,u){for(let d=u,f=c.length;d-1))return Xi.NO_MATCH}const a=r-s;return o(a)}function TNe(t,e){return t.rank===e.rank?0:t.rank>e.rank?-1:1}function ZB(t,e){let{keepDiacritics:n}=e;return t=`${t}`,n||(t=MNe(t)),t}function ONe(t,e){let n=e;typeof e=="object"&&(n=e.accessor);const r=n(t);return r==null?[]:Array.isArray(r)?r:[String(r)]}function RNe(t,e){const n=[];for(let r=0,i=e.length;r"u"&&delete r[o]}),n.options=L1({debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:XNe,rangeExtractor:Dq,onChange:function(){},measureElement:KNe,initialRect:{width:0,height:0},scrollMargin:0,scrollingDelay:150,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1},r)},this.notify=function(){n.options.onChange==null||n.options.onChange(n)},this.cleanup=function(){n.unsubs.filter(Boolean).forEach(function(r){return r()}),n.unsubs=[],n.scrollElement=null},this._didMount=function(){return n.measureElementCache.forEach(n.observer.observe),function(){n.observer.disconnect(),n.cleanup()}},this._willUpdate=function(){var r=n.options.getScrollElement();n.scrollElement!==r&&(n.cleanup(),n.scrollElement=r,n._scrollToOffset(n.scrollOffset,{adjustments:void 0,behavior:void 0}),n.unsubs.push(n.options.observeElementRect(n,function(i){var o=n.scrollRect;n.scrollRect=i,(n.options.horizontal?i.width!==o.width:i.height!==o.height)&&n.maybeNotify()})),n.unsubs.push(n.options.observeElementOffset(n,function(i){n.scrollAdjustments=0,n.scrollOffset!==i&&(n.isScrollingTimeoutId!==null&&(clearTimeout(n.isScrollingTimeoutId),n.isScrollingTimeoutId=null),n.isScrolling=!0,n.scrollDirection=n.scrollOffset=0;a--){var l=r[a];if(!o.has(l.lane)){var c=s.get(l.lane);if(c==null||l.end>c.end?s.set(l.lane,l):l.end0?Math.min.apply(Math,n.pendingMeasuredCacheIndexes):0;n.pendingMeasuredCacheIndexes=[];for(var u=n.measurementsCache.slice(0,c),d=c;d=n.scrollOffset+o?i="end":i="start"),i==="start"?r=r:i==="end"?r=r-o:i==="center"&&(r=r-o/2);var s=n.options.horizontal?"scrollWidth":"scrollHeight",a=n.scrollElement?"document"in n.scrollElement?n.scrollElement.document.documentElement[s]:n.scrollElement[s]:0,l=a-n.getSize();return Math.max(Math.min(l,r),0)},this.getOffsetForIndex=function(r,i){i===void 0&&(i="auto"),r=Math.max(0,Math.min(r,n.options.count-1));var o=QP(n.getMeasurements()[r]);if(i==="auto")if(o.end>=n.scrollOffset+n.getSize()-n.options.scrollPaddingEnd)i="end";else if(o.start<=n.scrollOffset+n.options.scrollPaddingStart)i="start";else return[n.scrollOffset,i];var s=i==="end"?o.end+n.options.scrollPaddingEnd:o.start-n.options.scrollPaddingStart;return[n.getOffsetForAlignment(s,i),i]},this.isDynamicMode=function(){return n.measureElementCache.size>0},this.cancelScrollToIndex=function(){n.scrollToIndexTimeoutId!==null&&(clearTimeout(n.scrollToIndexTimeoutId),n.scrollToIndexTimeoutId=null)},this.scrollToOffset=function(r,i){var o=i===void 0?{}:i,s=o.align,a=s===void 0?"start":s,l=o.behavior;n.cancelScrollToIndex(),l==="smooth"&&n.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),n._scrollToOffset(n.getOffsetForAlignment(r,a),{adjustments:void 0,behavior:l})},this.scrollToIndex=function(r,i){var o=i===void 0?{}:i,s=o.align,a=s===void 0?"auto":s,l=o.behavior;r=Math.max(0,Math.min(r,n.options.count-1)),n.cancelScrollToIndex(),l==="smooth"&&n.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");var c=n.getOffsetForIndex(r,a),u=c[0],d=c[1];n._scrollToOffset(u,{adjustments:void 0,behavior:l}),l!=="smooth"&&n.isDynamicMode()&&(n.scrollToIndexTimeoutId=setTimeout(function(){n.scrollToIndexTimeoutId=null;var f=n.measureElementCache.has(n.options.getItemKey(r));if(f){var h=n.getOffsetForIndex(r,d),g=h[0];YNe(g,n.scrollOffset)||n.scrollToIndex(r,{align:d,behavior:l})}else n.scrollToIndex(r,{align:d,behavior:l})}))},this.scrollBy=function(r,i){var o=i===void 0?{}:i,s=o.behavior;n.cancelScrollToIndex(),s==="smooth"&&n.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),n._scrollToOffset(n.scrollOffset+r,{adjustments:void 0,behavior:s})},this.getTotalSize=function(){var r;return(((r=n.getMeasurements()[n.options.count-1])==null?void 0:r.end)||n.options.paddingStart)-n.options.scrollMargin+n.options.paddingEnd},this._scrollToOffset=function(r,i){var o=i.adjustments,s=i.behavior;n.options.scrollToFn(r,{behavior:s,adjustments:o},n)},this.measure=function(){n.itemSizeCache=new Map,n.notify()},this.setOptions(e),this.scrollRect=this.options.initialRect,this.scrollOffset=this.options.initialOffset,this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(function(r){n.itemSizeCache.set(r.key,r.size)}),this.maybeNotify()},Iq=function(e,n,r,i){for(;e<=n;){var o=(e+n)/2|0,s=r(o);if(si)n=o-1;else return o}return e>0?e-1:0};function eFe(t){for(var e=t.measurements,n=t.outerSize,r=t.scrollOffset,i=e.length-1,o=function(c){return e[c].start},s=Iq(0,i,o,r),a=s;a"u"&&delete r[o]}),n.options=L1({debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:INe,rangeExtractor:Aq,onChange:function(){},measureElement:NNe,initialRect:{width:0,height:0},scrollMargin:0,scrollingDelay:150,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1},r)},this.notify=function(){n.options.onChange==null||n.options.onChange(n)},this.cleanup=function(){n.unsubs.filter(Boolean).forEach(function(r){return r()}),n.unsubs=[],n.scrollElement=null},this._didMount=function(){return n.measureElementCache.forEach(n.observer.observe),function(){n.observer.disconnect(),n.cleanup()}},this._willUpdate=function(){var r=n.options.getScrollElement();n.scrollElement!==r&&(n.cleanup(),n.scrollElement=r,n._scrollToOffset(n.scrollOffset,{adjustments:void 0,behavior:void 0}),n.unsubs.push(n.options.observeElementRect(n,function(i){var o=n.scrollRect;n.scrollRect=i,(n.options.horizontal?i.width!==o.width:i.height!==o.height)&&n.maybeNotify()})),n.unsubs.push(n.options.observeElementOffset(n,function(i){n.scrollAdjustments=0,n.scrollOffset!==i&&(n.isScrollingTimeoutId!==null&&(clearTimeout(n.isScrollingTimeoutId),n.isScrollingTimeoutId=null),n.isScrolling=!0,n.scrollDirection=n.scrollOffset=0;a--){var l=r[a];if(!o.has(l.lane)){var c=s.get(l.lane);if(c==null||l.end>c.end?s.set(l.lane,l):l.end0?Math.min.apply(Math,n.pendingMeasuredCacheIndexes):0;n.pendingMeasuredCacheIndexes=[];for(var u=n.measurementsCache.slice(0,c),d=c;d=n.scrollOffset+o?i="end":i="start"),i==="start"?r=r:i==="end"?r=r-o:i==="center"&&(r=r-o/2);var s=n.options.horizontal?"scrollWidth":"scrollHeight",a=n.scrollElement?"document"in n.scrollElement?n.scrollElement.document.documentElement[s]:n.scrollElement[s]:0,l=a-n.getSize();return Math.max(Math.min(l,r),0)},this.getOffsetForIndex=function(r,i){i===void 0&&(i="auto"),r=Math.max(0,Math.min(r,n.options.count-1));var o=KP(n.getMeasurements()[r]);if(i==="auto")if(o.end>=n.scrollOffset+n.getSize()-n.options.scrollPaddingEnd)i="end";else if(o.start<=n.scrollOffset+n.options.scrollPaddingStart)i="start";else return[n.scrollOffset,i];var s=i==="end"?o.end+n.options.scrollPaddingEnd:o.start-n.options.scrollPaddingStart;return[n.getOffsetForAlignment(s,i),i]},this.isDynamicMode=function(){return n.measureElementCache.size>0},this.cancelScrollToIndex=function(){n.scrollToIndexTimeoutId!==null&&(clearTimeout(n.scrollToIndexTimeoutId),n.scrollToIndexTimeoutId=null)},this.scrollToOffset=function(r,i){var o=i===void 0?{}:i,s=o.align,a=s===void 0?"start":s,l=o.behavior;n.cancelScrollToIndex(),l==="smooth"&&n.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),n._scrollToOffset(n.getOffsetForAlignment(r,a),{adjustments:void 0,behavior:l})},this.scrollToIndex=function(r,i){var o=i===void 0?{}:i,s=o.align,a=s===void 0?"auto":s,l=o.behavior;r=Math.max(0,Math.min(r,n.options.count-1)),n.cancelScrollToIndex(),l==="smooth"&&n.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");var c=n.getOffsetForIndex(r,a),u=c[0],d=c[1];n._scrollToOffset(u,{adjustments:void 0,behavior:l}),l!=="smooth"&&n.isDynamicMode()&&(n.scrollToIndexTimeoutId=setTimeout(function(){n.scrollToIndexTimeoutId=null;var f=n.measureElementCache.has(n.options.getItemKey(r));if(f){var h=n.getOffsetForIndex(r,d),g=h[0];DNe(g,n.scrollOffset)||n.scrollToIndex(r,{align:d,behavior:l})}else n.scrollToIndex(r,{align:d,behavior:l})}))},this.scrollBy=function(r,i){var o=i===void 0?{}:i,s=o.behavior;n.cancelScrollToIndex(),s==="smooth"&&n.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),n._scrollToOffset(n.scrollOffset+r,{adjustments:void 0,behavior:s})},this.getTotalSize=function(){var r;return(((r=n.getMeasurements()[n.options.count-1])==null?void 0:r.end)||n.options.paddingStart)-n.options.scrollMargin+n.options.paddingEnd},this._scrollToOffset=function(r,i){var o=i.adjustments,s=i.behavior;n.options.scrollToFn(r,{behavior:s,adjustments:o},n)},this.measure=function(){n.itemSizeCache=new Map,n.notify()},this.setOptions(e),this.scrollRect=this.options.initialRect,this.scrollOffset=this.options.initialOffset,this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(function(r){n.itemSizeCache.set(r.key,r.size)}),this.maybeNotify()},Dq=function(e,n,r,i){for(;e<=n;){var o=(e+n)/2|0,s=r(o);if(si)n=o-1;else return o}return e>0?e-1:0};function UNe(t){for(var e=t.measurements,n=t.outerSize,r=t.scrollOffset,i=e.length-1,o=function(c){return e[c].start},s=Dq(0,i,o,r),a=s;ae in t?rFe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,t6=(t,e)=>{for(var n in e||(e={}))kq.call(e,n)&&e6(t,n,e[n]);if(k1)for(var n of k1(e))Nq.call(e,n)&&e6(t,n,e[n]);return t},n6=(t,e)=>iFe(t,oFe(e)),sFe=(t,e)=>{var n={};for(var r in t)kq.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&k1)for(var r of k1(t))e.indexOf(r)<0&&Nq.call(t,r)&&(n[r]=t[r]);return n};function BT(t){var e=t,{direction:n,style:r}=e,i=sFe(e,["direction","style"]);const o=Ir();return H.createElement(kW,n6(t6({},i),{style:n6(t6({},r),{transform:n==="next"&&o.dir==="ltr"||n==="previous"&&o.dir==="rtl"?"rotate(270deg)":"rotate(90deg)"})}))}BT.displayName="@mantine/dates/Chevron";var aFe=Object.defineProperty,lFe=Object.defineProperties,cFe=Object.getOwnPropertyDescriptors,r6=Object.getOwnPropertySymbols,uFe=Object.prototype.hasOwnProperty,dFe=Object.prototype.propertyIsEnumerable,i6=(t,e,n)=>e in t?aFe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,t_=(t,e)=>{for(var n in e||(e={}))uFe.call(e,n)&&i6(t,n,e[n]);if(r6)for(var n of r6(e))dFe.call(e,n)&&i6(t,n,e[n]);return t},o6=(t,e)=>lFe(t,cFe(e));const vg={xs:X(30),sm:X(36),md:X(42),lg:X(48),xl:X(54)};var fFe=ft((t,{radius:e,isStatic:n},{size:r})=>{const i=t.fn.variant({variant:"filled"}),o=t.fn.variant({variant:"light"});return{day:o6(t_({width:Oe({size:r,sizes:vg}),height:Oe({size:r,sizes:vg}),fontSize:Oe({size:r,sizes:t.fontSizes}),display:"inline-flex",justifyContent:"center",alignItems:"center",userSelect:n?void 0:"none",cursor:n?"default":"pointer",borderRadius:t.fn.radius(e)},n?null:t.fn.hover({backgroundColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[0]})),{"&:active":n?void 0:t.activeStyles,"&[data-disabled]":o6(t_({color:t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[4],cursor:"not-allowed"},t.fn.hover({backgroundColor:"transparent"})),{"&:active":{transform:"none"}}),"&[data-weekend]":{color:t.colors.red[t.fn.primaryShade()]},"&[data-outside]":{color:t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[4]},"&[data-in-range]":t_({backgroundColor:o.background,borderRadius:0},n?null:t.fn.hover({backgroundColor:o.hover})),"&[data-first-in-range]":{borderTopLeftRadius:t.radius.sm,borderBottomLeftRadius:t.radius.sm},"&[data-last-in-range]":{borderTopRightRadius:t.radius.sm,borderBottomRightRadius:t.radius.sm},"&[data-selected]":t_({color:i.color,backgroundColor:i.background},n?null:t.fn.hover({backgroundColor:i.hover})),"&[data-hidden]":{display:"none"}})}});const hFe=fFe;var pFe=Object.defineProperty,mFe=Object.defineProperties,gFe=Object.getOwnPropertyDescriptors,s6=Object.getOwnPropertySymbols,vFe=Object.prototype.hasOwnProperty,yFe=Object.prototype.propertyIsEnumerable,a6=(t,e,n)=>e in t?pFe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,n_=(t,e)=>{for(var n in e||(e={}))vFe.call(e,n)&&a6(t,n,e[n]);if(s6)for(var n of s6(e))yFe.call(e,n)&&a6(t,n,e[n]);return t},r_=(t,e)=>mFe(t,gFe(e)),_Fe=ft((t,e,{size:n})=>{const r=Oe({size:n,sizes:vg});return{calendarHeaderControlIcon:{},calendarHeader:{display:"flex",maxWidth:`calc(${r} * 7 + ${X(7)})`},calendarHeaderControl:r_(n_({width:r,height:r,borderRadius:t.fn.radius(),display:"flex",justifyContent:"center",alignItems:"center",userSelect:"none"},t.fn.hover({backgroundColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[0]})),{"&:active":t.activeStyles,"&[data-disabled]":r_(n_({opacity:.2,cursor:"not-allowed"},t.fn.hover({backgroundColor:"transparent"})),{"&:active":{transform:"none"}})}),calendarHeaderLevel:r_(n_({height:r,borderRadius:t.fn.radius(),display:"flex",justifyContent:"center",alignItems:"center",userSelect:"none",flex:1,fontSize:Oe({size:n,sizes:t.fontSizes}),fontWeight:500,textTransform:"capitalize"},t.fn.hover({backgroundColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[0]})),{"&:active":t.activeStyles,"&[data-static]":r_(n_({cursor:"default",userSelect:"unset"},t.fn.hover({backgroundColor:"transparent"})),{"&:active":{transform:"none"}})})}});const xFe=_Fe;var wFe=Object.defineProperty,N1=Object.getOwnPropertySymbols,Fq=Object.prototype.hasOwnProperty,zq=Object.prototype.propertyIsEnumerable,l6=(t,e,n)=>e in t?wFe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,SFe=(t,e)=>{for(var n in e||(e={}))Fq.call(e,n)&&l6(t,n,e[n]);if(N1)for(var n of N1(e))zq.call(e,n)&&l6(t,n,e[n]);return t},bFe=(t,e)=>{var n={};for(var r in t)Fq.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&N1)for(var r of N1(t))e.indexOf(r)<0&&zq.call(t,r)&&(n[r]=t[r]);return n};const MFe={nextDisabled:!1,previousDisabled:!1,hasNextLevel:!0,withNext:!0,withPrevious:!0,size:"sm"},wb=M.forwardRef((t,e)=>{const n=nt("CalendarHeader",MFe,t),{className:r,nextIcon:i,previousIcon:o,nextLabel:s,previousLabel:a,onNext:l,onPrevious:c,onLevelClick:u,label:d,classNames:f,styles:h,unstyled:g,nextDisabled:y,previousDisabled:_,hasNextLevel:v,levelControlAriaLabel:x,withNext:w,withPrevious:S,__staticSelector:E,__preventFocus:C,__stopPropagation:O,size:R,variant:T}=n,A=bFe(n,["className","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","label","classNames","styles","unstyled","nextDisabled","previousDisabled","hasNextLevel","levelControlAriaLabel","withNext","withPrevious","__staticSelector","__preventFocus","__stopPropagation","size","variant"]),{classes:F,cx:N}=xFe(null,{name:["CalendarHeader",E],classNames:f,styles:h,unstyled:g,size:R,variant:T}),U=C?k=>k.preventDefault():void 0;return H.createElement(Xe,SFe({className:N(F.calendarHeader,r),ref:e},A),S&&H.createElement(Fs,{className:F.calendarHeaderControl,"data-previous":!0,"aria-label":a,onClick:c,unstyled:g,onMouseDown:U,disabled:_,"data-disabled":_||void 0,tabIndex:C?-1:0,"data-mantine-stop-propagation":O||void 0},o||H.createElement(BT,{className:F.calendarHeaderControlIcon,direction:"previous","data-previous":!0})),H.createElement(Fs,{component:v?"button":"div",className:F.calendarHeaderLevel,onClick:v?u:void 0,unstyled:g,onMouseDown:v?U:void 0,disabled:!v,"data-static":!v||void 0,"aria-label":x,tabIndex:C||!v?-1:0,"data-mantine-stop-propagation":O||void 0},d),w&&H.createElement(Fs,{className:F.calendarHeaderControl,"data-next":!0,"aria-label":s,onClick:l,unstyled:g,onMouseDown:U,disabled:y,"data-disabled":y||void 0,tabIndex:C?-1:0,"data-mantine-stop-propagation":O||void 0},i||H.createElement(BT,{className:F.calendarHeaderControlIcon,direction:"next","data-next":!0})))});wb.displayName="@mantine/dates/CalendarHeader";var Uq={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Gf,function(){var n=1e3,r=6e4,i=36e5,o="millisecond",s="second",a="minute",l="hour",c="day",u="week",d="month",f="quarter",h="year",g="date",y="Invalid Date",_=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,x={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(U){var k=["th","st","nd","rd"],z=U%100;return"["+U+(k[(z-20)%10]||k[z]||k[0])+"]"}},w=function(U,k,z){var G=String(U);return!G||G.length>=k?U:""+Array(k+1-G.length).join(z)+U},S={s:w,z:function(U){var k=-U.utcOffset(),z=Math.abs(k),G=Math.floor(z/60),W=z%60;return(k<=0?"+":"-")+w(G,2,"0")+":"+w(W,2,"0")},m:function U(k,z){if(k.date()1)return U(j[0])}else{var $=k.name;C[$]=k,W=$}return!G&&W&&(E=W),W||!G&&E},T=function(U,k){if(O(U))return U.clone();var z=typeof k=="object"?k:{};return z.date=U,z.args=arguments,new F(z)},A=S;A.l=R,A.i=O,A.w=function(U,k){return T(U,{locale:k.$L,utc:k.$u,x:k.$x,$offset:k.$offset})};var F=function(){function U(z){this.$L=R(z.locale,null,!0),this.parse(z)}var k=U.prototype;return k.parse=function(z){this.$d=function(G){var W=G.date,B=G.utc;if(W===null)return new Date(NaN);if(A.u(W))return new Date;if(W instanceof Date)return new Date(W);if(typeof W=="string"&&!/Z$/i.test(W)){var j=W.match(_);if(j){var $=j[2]-1||0,q=(j[7]||"0").substring(0,3);return B?new Date(Date.UTC(j[1],$,j[3]||1,j[4]||0,j[5]||0,j[6]||0,q)):new Date(j[1],$,j[3]||1,j[4]||0,j[5]||0,j[6]||0,q)}}return new Date(W)}(z),this.$x=z.x||{},this.init()},k.init=function(){var z=this.$d;this.$y=z.getFullYear(),this.$M=z.getMonth(),this.$D=z.getDate(),this.$W=z.getDay(),this.$H=z.getHours(),this.$m=z.getMinutes(),this.$s=z.getSeconds(),this.$ms=z.getMilliseconds()},k.$utils=function(){return A},k.isValid=function(){return this.$d.toString()!==y},k.isSame=function(z,G){var W=T(z);return this.startOf(G)<=W&&W<=this.endOf(G)},k.isAfter=function(z,G){return T(z)({calendar:{}}));const TFe=CFe;var OFe=ft((t,e,{size:n})=>({monthLevelGroup:{display:"flex","& [data-month-level]:not(:last-of-type)":{marginRight:Oe({size:n,sizes:t.spacing})}}}));const RFe=OFe;var AFe=ft(t=>({monthLevel:{},calendarHeader:{marginBottom:t.spacing.xs}}));const DFe=AFe,IFe={locale:"en",firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:"–"},LFe=M.createContext(IFe);var kFe=Object.defineProperty,NFe=Object.defineProperties,FFe=Object.getOwnPropertyDescriptors,c6=Object.getOwnPropertySymbols,zFe=Object.prototype.hasOwnProperty,UFe=Object.prototype.propertyIsEnumerable,u6=(t,e,n)=>e in t?kFe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,BFe=(t,e)=>{for(var n in e||(e={}))zFe.call(e,n)&&u6(t,n,e[n]);if(c6)for(var n of c6(e))UFe.call(e,n)&&u6(t,n,e[n]);return t},HFe=(t,e)=>NFe(t,FFe(e));function Uc(){const t=M.useContext(LFe),e=M.useCallback(o=>o||t.locale,[t.locale]),n=M.useCallback(o=>typeof o=="number"?o:t.firstDayOfWeek,[t.firstDayOfWeek]),r=M.useCallback(o=>Array.isArray(o)?o:t.weekendDays,[t.weekendDays]),i=M.useCallback(o=>typeof o=="string"?o:t.labelSeparator,[t.labelSeparator]);return HFe(BFe({},t),{getLocale:e,getFirstDayOfWeek:n,getWeekendDays:r,getLabelSeparator:i})}function VFe(t,e=1){const n=new Date(t);for(;n.getDay()!==e;)n.setDate(n.getDate()-1);return n}function jFe(t,e=1){const n=new Date(t),r=e===0?6:e-1;for(;n.getDay()!==r;)n.setDate(n.getDate()+1);return n}function $Fe(t,e=1){const n=t.getMonth(),r=new Date(t.getFullYear(),n,1),i=new Date(t.getFullYear(),t.getMonth()+1,0),o=jFe(i,e),s=VFe(r,e),a=[];for(;s<=o;){const l=[];for(let c=0;c<7;c+=1)l.push(new Date(s)),s.setDate(s.getDate()+1);a.push(l)}return a}function Bq(t,e){return t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()}function Hq(t,e){return e instanceof Date?qt(t).isBefore(qt(e).add(1,"day"),"day"):!0}function Vq(t,e){return e instanceof Date?qt(t).isAfter(qt(e).subtract(1,"day"),"day"):!0}var GFe=Object.defineProperty,WFe=Object.defineProperties,YFe=Object.getOwnPropertyDescriptors,d6=Object.getOwnPropertySymbols,XFe=Object.prototype.hasOwnProperty,ZFe=Object.prototype.propertyIsEnumerable,f6=(t,e,n)=>e in t?GFe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,qFe=(t,e)=>{for(var n in e||(e={}))XFe.call(e,n)&&f6(t,n,e[n]);if(d6)for(var n of d6(e))ZFe.call(e,n)&&f6(t,n,e[n]);return t},KFe=(t,e)=>WFe(t,YFe(e)),QFe=ft(t=>({monthThead:{},monthRow:{},monthTbody:{},monthCell:{padding:0,"&[data-with-spacing]":{padding:X(.5)}},month:KFe(qFe({},t.fn.fontStyles()),{borderCollapse:"collapse",tableLayout:"fixed","& *":{boxSizing:"border-box"}})}));const JFe=QFe;function eze(t,e,n,r,i,o,s){const a=t.flat().filter(u=>{var d;return Hq(u,n)&&Vq(u,e)&&!i?.(u)&&!((d=r?.(u))!=null&&d.disabled)&&(!o||Bq(u,s))}),l=a.find(u=>{var d;return(d=r?.(u))==null?void 0:d.selected});if(l)return l;const c=a.find(u=>qt().isSame(u,"date"));return c||a[0]}var tze=Object.defineProperty,F1=Object.getOwnPropertySymbols,jq=Object.prototype.hasOwnProperty,$q=Object.prototype.propertyIsEnumerable,h6=(t,e,n)=>e in t?tze(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,nze=(t,e)=>{for(var n in e||(e={}))jq.call(e,n)&&h6(t,n,e[n]);if(F1)for(var n of F1(e))$q.call(e,n)&&h6(t,n,e[n]);return t},rze=(t,e)=>{var n={};for(var r in t)jq.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&F1)for(var r of F1(t))e.indexOf(r)<0&&$q.call(t,r)&&(n[r]=t[r]);return n};const ize={tabIndex:0,size:"sm"},Gq=M.forwardRef((t,e)=>{const n=nt("Day",ize,t),{className:r,date:i,radius:o,disabled:s,styles:a,classNames:l,unstyled:c,__staticSelector:u,weekend:d,outside:f,selected:h,renderDay:g,inRange:y,firstInRange:_,lastInRange:v,hidden:x,static:w,variant:S,size:E}=n,C=rze(n,["className","date","radius","disabled","styles","classNames","unstyled","__staticSelector","weekend","outside","selected","renderDay","inRange","firstInRange","lastInRange","hidden","static","variant","size"]),{classes:O,cx:R}=hFe({radius:o,isStatic:w},{name:["Day",u],classNames:l,styles:a,unstyled:c,variant:S,size:E});return H.createElement(Fs,nze({component:w?"div":"button",ref:e,className:R(O.day,r),disabled:s,"data-today":qt(i).isSame(new Date,"day")||void 0,"data-hidden":x||void 0,"data-disabled":s||void 0,"data-weekend":!s&&!f&&d||void 0,"data-outside":!s&&f||void 0,"data-selected":!s&&h||void 0,"data-in-range":y&&!s||void 0,"data-first-in-range":_&&!s||void 0,"data-last-in-range":v&&!s||void 0,unstyled:c},C),g?.(i)||i.getDate())});Gq.displayName="@mantine/dates/Day";function oze({locale:t,format:e="dd",firstDayOfWeek:n=1}){const r=qt().day(n),i=[];for(let o=0;o<7;o+=1)typeof e=="string"?i.push(qt(r).add(o,"days").locale(t).format(e)):i.push(e(qt(r).add(o,"days").toDate()));return i}var sze=ft((t,e,{size:n})=>({weekdaysRow:{},weekday:{color:t.colorScheme==="dark"?t.colors.dark[1]:t.colors.gray[5],fontWeight:400,fontSize:Oe({size:n,sizes:t.fontSizes}),textTransform:"capitalize",paddingBottom:`calc(${Oe({size:n,sizes:t.spacing})} / 2)`}}));const aze=sze;var lze=Object.defineProperty,z1=Object.getOwnPropertySymbols,Wq=Object.prototype.hasOwnProperty,Yq=Object.prototype.propertyIsEnumerable,p6=(t,e,n)=>e in t?lze(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,cze=(t,e)=>{for(var n in e||(e={}))Wq.call(e,n)&&p6(t,n,e[n]);if(z1)for(var n of z1(e))Yq.call(e,n)&&p6(t,n,e[n]);return t},uze=(t,e)=>{var n={};for(var r in t)Wq.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&z1)for(var r of z1(t))e.indexOf(r)<0&&Yq.call(t,r)&&(n[r]=t[r]);return n};const dze={weekdayFormat:"dd",cellComponent:"th",size:"sm"},Xq=M.forwardRef((t,e)=>{const n=nt("WeekdaysRow",dze,t),{className:r,locale:i,firstDayOfWeek:o,weekdayFormat:s,cellComponent:a,__staticSelector:l,classNames:c,styles:u,unstyled:d,variant:f,size:h}=n,g=uze(n,["className","locale","firstDayOfWeek","weekdayFormat","cellComponent","__staticSelector","classNames","styles","unstyled","variant","size"]),y=Uc(),{classes:_,cx:v}=aze(null,{name:["WeekdaysRow",l],classNames:c,styles:u,unstyled:d,variant:f,size:h}),x=oze({locale:y.getLocale(i),format:s,firstDayOfWeek:y.getFirstDayOfWeek(o)}).map((w,S)=>H.createElement(a,{key:S,className:_.weekday},w));return H.createElement(Xe,cze({component:"tr",ref:e,className:v(_.weekdaysRow,r)},g),x)});Xq.displayName="@mantine/dates/WeekdaysRow";var fze=Object.defineProperty,hze=Object.defineProperties,pze=Object.getOwnPropertyDescriptors,U1=Object.getOwnPropertySymbols,Zq=Object.prototype.hasOwnProperty,qq=Object.prototype.propertyIsEnumerable,m6=(t,e,n)=>e in t?fze(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,i_=(t,e)=>{for(var n in e||(e={}))Zq.call(e,n)&&m6(t,n,e[n]);if(U1)for(var n of U1(e))qq.call(e,n)&&m6(t,n,e[n]);return t},eC=(t,e)=>hze(t,pze(e)),mze=(t,e)=>{var n={};for(var r in t)Zq.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&U1)for(var r of U1(t))e.indexOf(r)<0&&qq.call(t,r)&&(n[r]=t[r]);return n};const gze={size:"sm",withCellSpacing:!0},Kq=M.forwardRef((t,e)=>{const n=nt("Month",gze,t),{className:r,classNames:i,styles:o,unstyled:s,__staticSelector:a,locale:l,firstDayOfWeek:c,weekdayFormat:u,month:d,weekendDays:f,getDayProps:h,excludeDate:g,minDate:y,maxDate:_,renderDay:v,hideOutsideDates:x,hideWeekdays:w,getDayAriaLabel:S,static:E,__getDayRef:C,__onDayKeyDown:O,__onDayClick:R,__onDayMouseEnter:T,__preventFocus:A,__stopPropagation:F,withCellSpacing:N,size:U,variant:k}=n,z=mze(n,["className","classNames","styles","unstyled","__staticSelector","locale","firstDayOfWeek","weekdayFormat","month","weekendDays","getDayProps","excludeDate","minDate","maxDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","static","__getDayRef","__onDayKeyDown","__onDayClick","__onDayMouseEnter","__preventFocus","__stopPropagation","withCellSpacing","size","variant"]),G=Uc(),{classes:W,cx:B}=JFe(null,{name:["Month",a],classNames:i,styles:o,unstyled:s,variant:k,size:U}),j={__staticSelector:a||"Month",classNames:i,styles:o,unstyled:s,variant:k,size:U},$=$Fe(d,G.getFirstDayOfWeek(c)),q=eze($,y,_,h,g,x,d),K=$.map((re,J)=>{const le=re.map((ae,oe)=>{const De=!Bq(ae,d),Te=S?.(ae)||qt(ae).locale(l||G.locale).format("D MMMM YYYY"),ve=h?.(ae),we=qt(ae).isSame(q,"date");return H.createElement("td",{key:ae.toString(),className:W.monthCell,"data-with-spacing":N||void 0},H.createElement(Gq,eC(i_(eC(i_({},j),{"data-mantine-stop-propagation":F||void 0,renderDay:v,date:ae,weekend:G.getWeekendDays(f).includes(ae.getDay()),outside:De,hidden:x?De:!1,"aria-label":Te,static:E,disabled:g?.(ae)||!Hq(ae,_)||!Vq(ae,y),ref:me=>C?.(J,oe,me)}),ve),{onKeyDown:me=>{var se;(se=ve?.onKeyDown)==null||se.call(ve,me),O?.(me,{rowIndex:J,cellIndex:oe,date:ae})},onMouseEnter:me=>{var se;(se=ve?.onMouseEnter)==null||se.call(ve,me),T?.(me,ae)},onClick:me=>{var se;(se=ve?.onClick)==null||se.call(ve,me),R?.(me,ae)},onMouseDown:me=>{var se;(se=ve?.onMouseDown)==null||se.call(ve,me),A&&me.preventDefault()},tabIndex:A||!we?-1:0})))});return H.createElement("tr",{key:J,className:W.monthRow},le)});return H.createElement(Xe,i_({component:"table",className:B(W.month,r),ref:e},z),!w&&H.createElement("thead",{className:W.monthThead},H.createElement(Xq,eC(i_({},j),{locale:l,firstDayOfWeek:c,weekdayFormat:u}))),H.createElement("tbody",{className:W.monthTbody},K))});Kq.displayName="@mantine/dates/Month";var vze=Object.defineProperty,B1=Object.getOwnPropertySymbols,Qq=Object.prototype.hasOwnProperty,Jq=Object.prototype.propertyIsEnumerable,g6=(t,e,n)=>e in t?vze(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,tC=(t,e)=>{for(var n in e||(e={}))Qq.call(e,n)&&g6(t,n,e[n]);if(B1)for(var n of B1(e))Jq.call(e,n)&&g6(t,n,e[n]);return t},yze=(t,e)=>{var n={};for(var r in t)Qq.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&B1)for(var r of B1(t))e.indexOf(r)<0&&Jq.call(t,r)&&(n[r]=t[r]);return n};const _ze={monthLabelFormat:"MMMM YYYY"},eK=M.forwardRef((t,e)=>{const n=nt("MonthLevel",_ze,t),{month:r,locale:i,firstDayOfWeek:o,weekdayFormat:s,weekendDays:a,getDayProps:l,excludeDate:c,minDate:u,maxDate:d,renderDay:f,hideOutsideDates:h,hideWeekdays:g,getDayAriaLabel:y,__getDayRef:_,__onDayKeyDown:v,__onDayClick:x,__onDayMouseEnter:w,withCellSpacing:S,__preventFocus:E,__stopPropagation:C,nextIcon:O,previousIcon:R,nextLabel:T,previousLabel:A,onNext:F,onPrevious:N,onLevelClick:U,nextDisabled:k,previousDisabled:z,hasNextLevel:G,levelControlAriaLabel:W,withNext:B,withPrevious:j,className:$,monthLabelFormat:q,classNames:K,styles:re,unstyled:J,__staticSelector:le,size:ae,variant:oe,static:De}=n,Te=yze(n,["month","locale","firstDayOfWeek","weekdayFormat","weekendDays","getDayProps","excludeDate","minDate","maxDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","__getDayRef","__onDayKeyDown","__onDayClick","__onDayMouseEnter","withCellSpacing","__preventFocus","__stopPropagation","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","nextDisabled","previousDisabled","hasNextLevel","levelControlAriaLabel","withNext","withPrevious","className","monthLabelFormat","classNames","styles","unstyled","__staticSelector","size","variant","static"]),{classes:ve,cx:we}=DFe(null,{name:["MonthLevel",le],classNames:K,styles:re,unstyled:J,variant:oe,size:ae}),me=Uc(),se={__staticSelector:le||"MonthLevel",classNames:K,styles:re,unstyled:J,variant:oe,size:ae},de=typeof k=="boolean"?k:d?!qt(r).endOf("month").isBefore(d):!1,ke=typeof z=="boolean"?z:u?!qt(r).startOf("month").isAfter(u):!1;return H.createElement(Xe,tC({className:we(ve.monthLevel,$),"data-month-level":!0,ref:e},Te),H.createElement(wb,tC({label:typeof q=="function"?q(r):qt(r).locale(i||me.locale).format(q),className:ve.calendarHeader,__preventFocus:E,__stopPropagation:C,nextIcon:O,previousIcon:R,nextLabel:T,previousLabel:A,onNext:F,onPrevious:N,onLevelClick:U,nextDisabled:de,previousDisabled:ke,hasNextLevel:G,levelControlAriaLabel:W,withNext:B,withPrevious:j},se)),H.createElement(Kq,tC({month:r,locale:i,firstDayOfWeek:o,weekdayFormat:s,weekendDays:a,getDayProps:l,excludeDate:c,minDate:u,maxDate:d,renderDay:f,hideOutsideDates:h,hideWeekdays:g,getDayAriaLabel:y,__getDayRef:_,__onDayKeyDown:v,__onDayClick:x,__onDayMouseEnter:w,__preventFocus:E,__stopPropagation:C,static:De,withCellSpacing:S},se)))});eK.displayName="@mantine/dates/MonthLevel";function xze({direction:t,levelIndex:e,rowIndex:n,cellIndex:r,size:i}){switch(t){case"up":return e===0&&n===0?null:n===0?{levelIndex:e-1,rowIndex:r<=i[e-1][i[e-1].length-1]-1?i[e-1].length-1:i[e-1].length-2,cellIndex:r}:{levelIndex:e,rowIndex:n-1,cellIndex:r};case"down":return n===i[e].length-1?{levelIndex:e+1,rowIndex:0,cellIndex:r}:n===i[e].length-2&&r>=i[e][i[e].length-1]?{levelIndex:e+1,rowIndex:0,cellIndex:r}:{levelIndex:e,rowIndex:n+1,cellIndex:r};case"left":return e===0&&n===0&&r===0?null:n===0&&r===0?{levelIndex:e-1,rowIndex:i[e-1].length-1,cellIndex:i[e-1][i[e-1].length-1]-1}:r===0?{levelIndex:e,rowIndex:n-1,cellIndex:i[e][n-1]-1}:{levelIndex:e,rowIndex:n,cellIndex:r-1};case"right":return n===i[e].length-1&&r===i[e][n]-1?{levelIndex:e+1,rowIndex:0,cellIndex:0}:r===i[e][n]-1?{levelIndex:e,rowIndex:n+1,cellIndex:0}:{levelIndex:e,rowIndex:n,cellIndex:r+1};default:return{levelIndex:e,rowIndex:n,cellIndex:r}}}function tK({controlsRef:t,direction:e,levelIndex:n,rowIndex:r,cellIndex:i,size:o}){var s,a;const l=xze({direction:e,size:o,rowIndex:r,cellIndex:i,levelIndex:n});if(!l)return;const c=(a=(s=t.current[l.levelIndex])==null?void 0:s[l.rowIndex])==null?void 0:a[l.cellIndex];c&&(c.disabled||c.getAttribute("data-hidden")||c.getAttribute("data-outside")?tK({controlsRef:t,direction:e,levelIndex:l.levelIndex,cellIndex:l.cellIndex,rowIndex:l.rowIndex,size:o}):c.focus())}function wze(t){switch(t){case"ArrowDown":return"down";case"ArrowUp":return"up";case"ArrowRight":return"right";case"ArrowLeft":return"left";default:return null}}function Sze(t){return t.current.map(e=>e.map(n=>n.length))}function HA({controlsRef:t,levelIndex:e,rowIndex:n,cellIndex:r,event:i}){const o=wze(i.key);if(o){i.preventDefault();const s=Sze(t);tK({controlsRef:t,direction:o,levelIndex:e,rowIndex:n,cellIndex:r,size:s})}}var bze=Object.defineProperty,H1=Object.getOwnPropertySymbols,nK=Object.prototype.hasOwnProperty,rK=Object.prototype.propertyIsEnumerable,v6=(t,e,n)=>e in t?bze(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Mze=(t,e)=>{for(var n in e||(e={}))nK.call(e,n)&&v6(t,n,e[n]);if(H1)for(var n of H1(e))rK.call(e,n)&&v6(t,n,e[n]);return t},Eze=(t,e)=>{var n={};for(var r in t)nK.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&H1)for(var r of H1(t))e.indexOf(r)<0&&rK.call(t,r)&&(n[r]=t[r]);return n};const Pze={numberOfColumns:1},iK=M.forwardRef((t,e)=>{const n=nt("MonthLevelGroup",Pze,t),{month:r,locale:i,firstDayOfWeek:o,weekdayFormat:s,weekendDays:a,getDayProps:l,excludeDate:c,minDate:u,maxDate:d,renderDay:f,hideOutsideDates:h,hideWeekdays:g,getDayAriaLabel:y,__onDayClick:_,__onDayMouseEnter:v,withCellSpacing:x,__preventFocus:w,nextIcon:S,previousIcon:E,nextLabel:C,previousLabel:O,onNext:R,onPrevious:T,onLevelClick:A,nextDisabled:F,previousDisabled:N,hasNextLevel:U,className:k,classNames:z,styles:G,unstyled:W,numberOfColumns:B,levelControlAriaLabel:j,monthLabelFormat:$,__staticSelector:q,__stopPropagation:K,size:re,variant:J,static:le}=n,ae=Eze(n,["month","locale","firstDayOfWeek","weekdayFormat","weekendDays","getDayProps","excludeDate","minDate","maxDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","__onDayClick","__onDayMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","nextDisabled","previousDisabled","hasNextLevel","className","classNames","styles","unstyled","numberOfColumns","levelControlAriaLabel","monthLabelFormat","__staticSelector","__stopPropagation","size","variant","static"]),{classes:oe,cx:De}=RFe(null,{name:["MonthLevelGroup",q],classNames:z,styles:G,unstyled:W,variant:J,size:re}),Te=M.useRef([]),ve=Array(B).fill(0).map((we,me)=>{const se=qt(r).add(me,"months").toDate();return H.createElement(eK,{key:me,month:se,withNext:me===B-1,withPrevious:me===0,monthLabelFormat:$,__stopPropagation:K,__onDayClick:_,__onDayMouseEnter:v,__onDayKeyDown:(de,ke)=>HA({levelIndex:me,rowIndex:ke.rowIndex,cellIndex:ke.cellIndex,event:de,controlsRef:Te}),__getDayRef:(de,ke,Ve)=>{Array.isArray(Te.current[me])||(Te.current[me]=[]),Array.isArray(Te.current[me][de])||(Te.current[me][de]=[]),Te.current[me][de][ke]=Ve},levelControlAriaLabel:typeof j=="function"?j(se):j,locale:i,firstDayOfWeek:o,weekdayFormat:s,weekendDays:a,getDayProps:l,excludeDate:c,minDate:u,maxDate:d,renderDay:f,hideOutsideDates:h,hideWeekdays:g,getDayAriaLabel:y,__preventFocus:w,nextIcon:S,previousIcon:E,nextLabel:C,previousLabel:O,onNext:R,onPrevious:T,onLevelClick:A,nextDisabled:F,previousDisabled:N,hasNextLevel:U,classNames:z,styles:G,unstyled:W,__staticSelector:q||"MonthLevelGroup",size:re,variant:J,static:le,withCellSpacing:x})});return H.createElement(Xe,Mze({className:De(oe.monthLevelGroup,k),ref:e},ae),ve)});iK.displayName="@mantine/dates/MonthLevelGroup";var Cze=ft((t,e,{size:n})=>({yearLevelGroup:{display:"flex","& [data-year-level]:not(:last-of-type)":{marginRight:Oe({size:n,sizes:t.spacing})}}}));const Tze=Cze;var Oze=ft(t=>({yearLevel:{},calendarHeader:{marginBottom:t.spacing.xs}}));const Rze=Oze;function Aze(t){const e=qt(t).startOf("year").toDate(),n=[[],[],[],[]];let r=0;for(let i=0;i<4;i+=1)for(let o=0;o<3;o+=1)n[i].push(qt(e).add(r,"months").toDate()),r+=1;return n}function oK(t,e,n){return!e&&!n?!1:!!(e&&qt(t).isBefore(e,"month")||n&&qt(t).isAfter(n,"month"))}var Dze=ft(()=>({monthsList:{borderCollapse:"collapse",borderWidth:0,cursor:"pointer"},monthsListCell:{padding:0,"&[data-with-spacing]":{padding:X(.5)}},monthsListRow:{}}));const Ize=Dze;function Lze(t,e,n,r){const i=t.flat().filter(a=>{var l;return!oK(a,e,n)&&!((l=r?.(a))!=null&&l.disabled)}),o=i.find(a=>{var l;return(l=r?.(a))==null?void 0:l.selected});if(o)return o;const s=i.find(a=>qt().isSame(a,"month"));return s||i[0]}var kze=Object.defineProperty,Nze=Object.defineProperties,Fze=Object.getOwnPropertyDescriptors,y6=Object.getOwnPropertySymbols,zze=Object.prototype.hasOwnProperty,Uze=Object.prototype.propertyIsEnumerable,_6=(t,e,n)=>e in t?kze(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,o_=(t,e)=>{for(var n in e||(e={}))zze.call(e,n)&&_6(t,n,e[n]);if(y6)for(var n of y6(e))Uze.call(e,n)&&_6(t,n,e[n]);return t},x6=(t,e)=>Nze(t,Fze(e)),Bze=ft((t,e,{size:n})=>{const r=t.fn.variant({variant:"filled"}),i=t.fn.variant({variant:"light"});return{pickerControl:x6(o_({fontSize:Oe({size:n,sizes:t.fontSizes}),height:Oe({size:n,sizes:vg}),width:`calc((${Oe({size:n,sizes:vg})} * 7) / 3 + ${X(1.5)})`,display:"flex",justifyContent:"center",alignItems:"center",userSelect:"none",borderRadius:t.fn.radius()},t.fn.hover({backgroundColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[0]})),{"&:active":t.activeStyles,"&[data-in-range]":o_({backgroundColor:i.background,borderRadius:0},t.fn.hover({backgroundColor:i.hover})),"&[data-first-in-range]":{borderRadius:0,borderTopLeftRadius:t.radius.sm,borderBottomLeftRadius:t.radius.sm},"&[data-last-in-range]":{borderRadius:0,borderTopRightRadius:t.radius.sm,borderBottomRightRadius:t.radius.sm},"&[data-last-in-range][data-first-in-range]":{borderRadius:t.radius.sm},"&[data-selected]":o_({color:r.color,backgroundColor:r.background},t.fn.hover({backgroundColor:r.hover})),"&[data-disabled]":x6(o_({color:t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[4],cursor:"not-allowed"},t.fn.hover({backgroundColor:"transparent"})),{"&:active":{transform:"none"}})})}});const Hze=Bze;var Vze=Object.defineProperty,V1=Object.getOwnPropertySymbols,sK=Object.prototype.hasOwnProperty,aK=Object.prototype.propertyIsEnumerable,w6=(t,e,n)=>e in t?Vze(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,jze=(t,e)=>{for(var n in e||(e={}))sK.call(e,n)&&w6(t,n,e[n]);if(V1)for(var n of V1(e))aK.call(e,n)&&w6(t,n,e[n]);return t},$ze=(t,e)=>{var n={};for(var r in t)sK.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&V1)for(var r of V1(t))e.indexOf(r)<0&&aK.call(t,r)&&(n[r]=t[r]);return n};const Gze={size:"sm"},VA=M.forwardRef((t,e)=>{const n=nt("PickerControl",Gze,t),{className:r,children:i,disabled:o,selected:s,classNames:a,styles:l,unstyled:c,firstInRange:u,lastInRange:d,inRange:f,__staticSelector:h,size:g,variant:y}=n,_=$ze(n,["className","children","disabled","selected","classNames","styles","unstyled","firstInRange","lastInRange","inRange","__staticSelector","size","variant"]),{classes:v,cx:x}=Hze(null,{name:["PickerControl",h],classNames:a,styles:l,unstyled:c,variant:y,size:g});return H.createElement(Fs,jze({className:x(v.pickerControl,r),ref:e,unstyled:c,"data-picker-control":!0,"data-selected":s&&!o||void 0,"data-disabled":o||void 0,"data-in-range":f&&!o&&!s||void 0,"data-first-in-range":u&&!o||void 0,"data-last-in-range":d&&!o||void 0,disabled:o},_),i)});VA.displayName="@mantine/dates/PickerControl";var Wze=Object.defineProperty,Yze=Object.defineProperties,Xze=Object.getOwnPropertyDescriptors,j1=Object.getOwnPropertySymbols,lK=Object.prototype.hasOwnProperty,cK=Object.prototype.propertyIsEnumerable,S6=(t,e,n)=>e in t?Wze(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,b6=(t,e)=>{for(var n in e||(e={}))lK.call(e,n)&&S6(t,n,e[n]);if(j1)for(var n of j1(e))cK.call(e,n)&&S6(t,n,e[n]);return t},Zze=(t,e)=>Yze(t,Xze(e)),qze=(t,e)=>{var n={};for(var r in t)lK.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&j1)for(var r of j1(t))e.indexOf(r)<0&&cK.call(t,r)&&(n[r]=t[r]);return n};const Kze={monthsListFormat:"MMM",size:"sm",withCellSpacing:!0},uK=M.forwardRef((t,e)=>{const n=nt("MonthsList",Kze,t),{year:r,className:i,monthsListFormat:o,locale:s,minDate:a,maxDate:l,getMonthControlProps:c,classNames:u,styles:d,unstyled:f,__staticSelector:h,__getControlRef:g,__onControlKeyDown:y,__onControlClick:_,__onControlMouseEnter:v,__preventFocus:x,size:w,variant:S,__stopPropagation:E,withCellSpacing:C}=n,O=qze(n,["year","className","monthsListFormat","locale","minDate","maxDate","getMonthControlProps","classNames","styles","unstyled","__staticSelector","__getControlRef","__onControlKeyDown","__onControlClick","__onControlMouseEnter","__preventFocus","size","variant","__stopPropagation","withCellSpacing"]),{classes:R,cx:T}=Ize(null,{name:["MonthsList",h],classNames:u,styles:d,unstyled:f,variant:S,size:w}),A=Uc(),F=Aze(r),N=Lze(F,a,l,c),U=F.map((k,z)=>{const G=k.map((W,B)=>{const j=c?.(W),$=qt(W).isSame(N,"month");return H.createElement("td",{key:B,className:R.monthsListCell,"data-with-spacing":C||void 0},H.createElement(VA,Zze(b6({variant:S,size:w,classNames:u,styles:d,unstyled:f,__staticSelector:h||"MonthsList","data-mantine-stop-propagation":E||void 0,disabled:oK(W,a,l),ref:q=>g?.(z,B,q)},j),{onKeyDown:q=>{var K;(K=j?.onKeyDown)==null||K.call(j,q),y?.(q,{rowIndex:z,cellIndex:B,date:W})},onClick:q=>{var K;(K=j?.onClick)==null||K.call(j,q),_?.(q,W)},onMouseEnter:q=>{var K;(K=j?.onMouseEnter)==null||K.call(j,q),v?.(q,W)},onMouseDown:q=>{var K;(K=j?.onMouseDown)==null||K.call(j,q),x&&q.preventDefault()},tabIndex:x||!$?-1:0}),qt(W).locale(A.getLocale(s)).format(o)))});return H.createElement("tr",{key:z,className:R.monthsListRow},G)});return H.createElement(Xe,b6({component:"table",ref:e,className:T(R.monthsList,i)},O),H.createElement("tbody",null,U))});uK.displayName="@mantine/dates/MonthsList";var Qze=Object.defineProperty,$1=Object.getOwnPropertySymbols,dK=Object.prototype.hasOwnProperty,fK=Object.prototype.propertyIsEnumerable,M6=(t,e,n)=>e in t?Qze(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,nC=(t,e)=>{for(var n in e||(e={}))dK.call(e,n)&&M6(t,n,e[n]);if($1)for(var n of $1(e))fK.call(e,n)&&M6(t,n,e[n]);return t},Jze=(t,e)=>{var n={};for(var r in t)dK.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&$1)for(var r of $1(t))e.indexOf(r)<0&&fK.call(t,r)&&(n[r]=t[r]);return n};const e4e={yearLabelFormat:"YYYY",size:"sm"},hK=M.forwardRef((t,e)=>{const n=nt("YearLevel",e4e,t),{year:r,locale:i,minDate:o,maxDate:s,monthsListFormat:a,getMonthControlProps:l,__getControlRef:c,__onControlKeyDown:u,__onControlClick:d,__onControlMouseEnter:f,withCellSpacing:h,__preventFocus:g,nextIcon:y,previousIcon:_,nextLabel:v,previousLabel:x,onNext:w,onPrevious:S,onLevelClick:E,nextDisabled:C,previousDisabled:O,hasNextLevel:R,levelControlAriaLabel:T,withNext:A,withPrevious:F,className:N,yearLabelFormat:U,classNames:k,styles:z,unstyled:G,__staticSelector:W,__stopPropagation:B,size:j,variant:$}=n,q=Jze(n,["year","locale","minDate","maxDate","monthsListFormat","getMonthControlProps","__getControlRef","__onControlKeyDown","__onControlClick","__onControlMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","nextDisabled","previousDisabled","hasNextLevel","levelControlAriaLabel","withNext","withPrevious","className","yearLabelFormat","classNames","styles","unstyled","__staticSelector","__stopPropagation","size","variant"]),{classes:K,cx:re}=Rze(null,{name:["YearLevel",W],classNames:k,styles:z,unstyled:G,size:j,variant:$}),J=Uc(),le={__staticSelector:W||"YearLevel",classNames:k,styles:z,unstyled:G,size:j,variant:$},ae=typeof C=="boolean"?C:s?!qt(r).endOf("year").isBefore(s):!1,oe=typeof O=="boolean"?O:o?!qt(r).startOf("year").isAfter(o):!1;return H.createElement(Xe,nC({className:re(K.yearLevel,N),"data-year-level":!0,ref:e},q),H.createElement(wb,nC({label:typeof U=="function"?U(r):qt(r).locale(i||J.locale).format(U),className:K.calendarHeader,__preventFocus:g,__stopPropagation:B,nextIcon:y,previousIcon:_,nextLabel:v,previousLabel:x,onNext:w,onPrevious:S,onLevelClick:E,nextDisabled:ae,previousDisabled:oe,hasNextLevel:R,levelControlAriaLabel:T,withNext:A,withPrevious:F},le)),H.createElement(uK,nC({year:r,locale:i,minDate:o,maxDate:s,monthsListFormat:a,getMonthControlProps:l,__getControlRef:c,__onControlKeyDown:u,__onControlClick:d,__onControlMouseEnter:f,__preventFocus:g,__stopPropagation:B,withCellSpacing:h},le)))});hK.displayName="@mantine/dates/YearLevel";var t4e=Object.defineProperty,G1=Object.getOwnPropertySymbols,pK=Object.prototype.hasOwnProperty,mK=Object.prototype.propertyIsEnumerable,E6=(t,e,n)=>e in t?t4e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,n4e=(t,e)=>{for(var n in e||(e={}))pK.call(e,n)&&E6(t,n,e[n]);if(G1)for(var n of G1(e))mK.call(e,n)&&E6(t,n,e[n]);return t},r4e=(t,e)=>{var n={};for(var r in t)pK.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&G1)for(var r of G1(t))e.indexOf(r)<0&&mK.call(t,r)&&(n[r]=t[r]);return n};const i4e={numberOfColumns:1,size:"sm"},gK=M.forwardRef((t,e)=>{const n=nt("YearLevelGroup",i4e,t),{year:r,locale:i,minDate:o,maxDate:s,monthsListFormat:a,getMonthControlProps:l,__onControlClick:c,__onControlMouseEnter:u,withCellSpacing:d,__preventFocus:f,nextIcon:h,previousIcon:g,nextLabel:y,previousLabel:_,onNext:v,onPrevious:x,onLevelClick:w,nextDisabled:S,previousDisabled:E,hasNextLevel:C,className:O,classNames:R,styles:T,unstyled:A,__staticSelector:F,__stopPropagation:N,numberOfColumns:U,levelControlAriaLabel:k,yearLabelFormat:z,variant:G,size:W}=n,B=r4e(n,["year","locale","minDate","maxDate","monthsListFormat","getMonthControlProps","__onControlClick","__onControlMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","nextDisabled","previousDisabled","hasNextLevel","className","classNames","styles","unstyled","__staticSelector","__stopPropagation","numberOfColumns","levelControlAriaLabel","yearLabelFormat","variant","size"]),{classes:j,cx:$}=Tze(null,{name:["YearLevelGroup",F],styles:T,classNames:R,unstyled:A,variant:G,size:W}),q=M.useRef([]),K=Array(U).fill(0).map((re,J)=>{const le=qt(r).add(J,"years").toDate();return H.createElement(hK,{key:J,variant:G,size:W,monthsListFormat:a,year:le,withNext:J===U-1,withPrevious:J===0,yearLabelFormat:z,__stopPropagation:N,__onControlClick:c,__onControlMouseEnter:u,__onControlKeyDown:(ae,oe)=>HA({levelIndex:J,rowIndex:oe.rowIndex,cellIndex:oe.cellIndex,event:ae,controlsRef:q}),__getControlRef:(ae,oe,De)=>{Array.isArray(q.current[J])||(q.current[J]=[]),Array.isArray(q.current[J][ae])||(q.current[J][ae]=[]),q.current[J][ae][oe]=De},levelControlAriaLabel:typeof k=="function"?k(le):k,locale:i,minDate:o,maxDate:s,__preventFocus:f,nextIcon:h,previousIcon:g,nextLabel:y,previousLabel:_,onNext:v,onPrevious:x,onLevelClick:w,nextDisabled:S,previousDisabled:E,hasNextLevel:C,getMonthControlProps:l,classNames:R,styles:T,unstyled:A,__staticSelector:F||"YearLevelGroup",withCellSpacing:d})});return H.createElement(Xe,n4e({className:$(j.yearLevelGroup,O),ref:e},B),K)});gK.displayName="@mantine/dates/YearLevelGroup";var o4e=ft(t=>({decadeLevelGroup:{display:"flex",gap:t.spacing.md}}));const s4e=o4e;function vK(t){const e=t.getFullYear(),n=e-e%10;let r=0;const i=[[],[],[],[]];for(let o=0;o<4;o+=1){const s=o===3?1:3;for(let a=0;a({decadeLevel:{},calendarHeader:{marginBottom:t.spacing.xs}}));const c4e=l4e;function yK(t,e,n){return!e&&!n?!1:!!(e&&qt(t).isBefore(e,"year")||n&&qt(t).isAfter(n,"year"))}var u4e=ft(()=>({yearsList:{borderCollapse:"collapse",borderWidth:0},yearsListCell:{padding:0,"&[data-with-spacing]":{padding:X(.5)}},yearsListRow:{}}));const d4e=u4e;function f4e(t,e,n,r){const i=t.flat().filter(a=>{var l;return!yK(a,e,n)&&!((l=r?.(a))!=null&&l.disabled)}),o=i.find(a=>{var l;return(l=r?.(a))==null?void 0:l.selected});if(o)return o;const s=i.find(a=>qt().isSame(a,"year"));return s||i[0]}var h4e=Object.defineProperty,p4e=Object.defineProperties,m4e=Object.getOwnPropertyDescriptors,W1=Object.getOwnPropertySymbols,_K=Object.prototype.hasOwnProperty,xK=Object.prototype.propertyIsEnumerable,P6=(t,e,n)=>e in t?h4e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,C6=(t,e)=>{for(var n in e||(e={}))_K.call(e,n)&&P6(t,n,e[n]);if(W1)for(var n of W1(e))xK.call(e,n)&&P6(t,n,e[n]);return t},g4e=(t,e)=>p4e(t,m4e(e)),v4e=(t,e)=>{var n={};for(var r in t)_K.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&W1)for(var r of W1(t))e.indexOf(r)<0&&xK.call(t,r)&&(n[r]=t[r]);return n};const y4e={yearsListFormat:"YYYY",size:"sm",withCellSpacing:!0},wK=M.forwardRef((t,e)=>{const n=nt("YearsList",y4e,t),{decade:r,className:i,yearsListFormat:o,locale:s,minDate:a,maxDate:l,getYearControlProps:c,classNames:u,styles:d,unstyled:f,__staticSelector:h,__getControlRef:g,__onControlKeyDown:y,__onControlClick:_,__onControlMouseEnter:v,__preventFocus:x,__stopPropagation:w,size:S,variant:E,withCellSpacing:C}=n,O=v4e(n,["decade","className","yearsListFormat","locale","minDate","maxDate","getYearControlProps","classNames","styles","unstyled","__staticSelector","__getControlRef","__onControlKeyDown","__onControlClick","__onControlMouseEnter","__preventFocus","__stopPropagation","size","variant","withCellSpacing"]),{classes:R,cx:T}=d4e(null,{name:["YearsList",h],classNames:u,styles:d,unstyled:f,variant:E,size:S}),A=Uc(),F=vK(r),N=f4e(F,a,l,c),U=F.map((k,z)=>{const G=k.map((W,B)=>{const j=c?.(W),$=qt(W).isSame(N,"year");return H.createElement("td",{key:B,className:R.yearsListCell,"data-with-spacing":C||void 0},H.createElement(VA,g4e(C6({size:S,variant:E,classNames:u,styles:d,unstyled:f,__staticSelector:h||"YearsList","data-mantine-stop-propagation":w||void 0,disabled:yK(W,a,l),ref:q=>g?.(z,B,q)},j),{onKeyDown:q=>{var K;(K=j?.onKeyDown)==null||K.call(j,q),y?.(q,{rowIndex:z,cellIndex:B,date:W})},onClick:q=>{var K;(K=j?.onClick)==null||K.call(j,q),_?.(q,W)},onMouseEnter:q=>{var K;(K=j?.onMouseEnter)==null||K.call(j,q),v?.(q,W)},onMouseDown:q=>{var K;(K=j?.onMouseDown)==null||K.call(j,q),x&&q.preventDefault()},tabIndex:x||!$?-1:0}),qt(W).locale(A.getLocale(s)).format(o)))});return H.createElement("tr",{key:z,className:R.yearsListRow},G)});return H.createElement(Xe,C6({component:"table",ref:e,className:T(R.yearsList,i)},O),H.createElement("tbody",null,U))});wK.displayName="@mantine/dates/YearsList";var _4e=Object.defineProperty,Y1=Object.getOwnPropertySymbols,SK=Object.prototype.hasOwnProperty,bK=Object.prototype.propertyIsEnumerable,T6=(t,e,n)=>e in t?_4e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,rC=(t,e)=>{for(var n in e||(e={}))SK.call(e,n)&&T6(t,n,e[n]);if(Y1)for(var n of Y1(e))bK.call(e,n)&&T6(t,n,e[n]);return t},x4e=(t,e)=>{var n={};for(var r in t)SK.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Y1)for(var r of Y1(t))e.indexOf(r)<0&&bK.call(t,r)&&(n[r]=t[r]);return n};const w4e={decadeLabelFormat:"YYYY"},MK=M.forwardRef((t,e)=>{const n=nt("DecadeLevel",w4e,t),{decade:r,locale:i,minDate:o,maxDate:s,yearsListFormat:a,getYearControlProps:l,__getControlRef:c,__onControlKeyDown:u,__onControlClick:d,__onControlMouseEnter:f,withCellSpacing:h,__preventFocus:g,nextIcon:y,previousIcon:_,nextLabel:v,previousLabel:x,onNext:w,onPrevious:S,nextDisabled:E,previousDisabled:C,levelControlAriaLabel:O,withNext:R,withPrevious:T,className:A,decadeLabelFormat:F,classNames:N,styles:U,unstyled:k,__staticSelector:z,__stopPropagation:G,variant:W,size:B}=n,j=x4e(n,["decade","locale","minDate","maxDate","yearsListFormat","getYearControlProps","__getControlRef","__onControlKeyDown","__onControlClick","__onControlMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","nextDisabled","previousDisabled","levelControlAriaLabel","withNext","withPrevious","className","decadeLabelFormat","classNames","styles","unstyled","__staticSelector","__stopPropagation","variant","size"]),{classes:$,cx:q}=c4e(null,{name:["DecadeLevel",z],classNames:N,styles:U,unstyled:k,variant:W,size:B}),K=Uc(),[re,J]=a4e(r),le={__staticSelector:z||"DecadeLevel",classNames:N,styles:U,unstyled:k,variant:W,size:B},ae=typeof E=="boolean"?E:s?!qt(J).endOf("year").isBefore(s):!1,oe=typeof C=="boolean"?C:o?!qt(re).startOf("year").isAfter(o):!1,De=(Te,ve)=>qt(Te).locale(i||K.locale).format(ve);return H.createElement(Xe,rC({className:q($.decadeLevel,A),"data-decade-level":!0,ref:e},j),H.createElement(wb,rC({label:typeof F=="function"?F(re,J):`${De(re,F)} – ${De(J,F)}`,className:$.calendarHeader,__preventFocus:g,__stopPropagation:G,nextIcon:y,previousIcon:_,nextLabel:v,previousLabel:x,onNext:w,onPrevious:S,nextDisabled:ae,previousDisabled:oe,hasNextLevel:!1,levelControlAriaLabel:O,withNext:R,withPrevious:T},le)),H.createElement(wK,rC({decade:r,locale:i,minDate:o,maxDate:s,yearsListFormat:a,getYearControlProps:l,__getControlRef:c,__onControlKeyDown:u,__onControlClick:d,__onControlMouseEnter:f,__preventFocus:g,__stopPropagation:G,withCellSpacing:h},le)))});MK.displayName="@mantine/dates/DecadeLevel";var S4e=Object.defineProperty,X1=Object.getOwnPropertySymbols,EK=Object.prototype.hasOwnProperty,PK=Object.prototype.propertyIsEnumerable,O6=(t,e,n)=>e in t?S4e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,b4e=(t,e)=>{for(var n in e||(e={}))EK.call(e,n)&&O6(t,n,e[n]);if(X1)for(var n of X1(e))PK.call(e,n)&&O6(t,n,e[n]);return t},M4e=(t,e)=>{var n={};for(var r in t)EK.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&X1)for(var r of X1(t))e.indexOf(r)<0&&PK.call(t,r)&&(n[r]=t[r]);return n};const E4e={numberOfColumns:1},CK=M.forwardRef((t,e)=>{const n=nt("DecadeLevelGroup",E4e,t),{decade:r,locale:i,minDate:o,maxDate:s,yearsListFormat:a,getYearControlProps:l,__onControlClick:c,__onControlMouseEnter:u,withCellSpacing:d,__preventFocus:f,nextIcon:h,previousIcon:g,nextLabel:y,previousLabel:_,onNext:v,onPrevious:x,nextDisabled:w,previousDisabled:S,className:E,classNames:C,styles:O,unstyled:R,__staticSelector:T,__stopPropagation:A,numberOfColumns:F,levelControlAriaLabel:N,decadeLabelFormat:U,variant:k,size:z}=n,G=M4e(n,["decade","locale","minDate","maxDate","yearsListFormat","getYearControlProps","__onControlClick","__onControlMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","nextDisabled","previousDisabled","className","classNames","styles","unstyled","__staticSelector","__stopPropagation","numberOfColumns","levelControlAriaLabel","decadeLabelFormat","variant","size"]),{classes:W,cx:B}=s4e(null,{name:["DecadeLevelGroup",T],styles:O,classNames:C,unstyled:R,variant:k,size:z}),j=M.useRef([]),$=Array(F).fill(0).map((q,K)=>{const re=qt(r).add(K*10,"years").toDate();return H.createElement(MK,{key:K,variant:k,size:z,yearsListFormat:a,decade:re,withNext:K===F-1,withPrevious:K===0,decadeLabelFormat:U,__onControlClick:c,__onControlMouseEnter:u,__onControlKeyDown:(J,le)=>HA({levelIndex:K,rowIndex:le.rowIndex,cellIndex:le.cellIndex,event:J,controlsRef:j}),__getControlRef:(J,le,ae)=>{Array.isArray(j.current[K])||(j.current[K]=[]),Array.isArray(j.current[K][J])||(j.current[K][J]=[]),j.current[K][J][le]=ae},levelControlAriaLabel:typeof N=="function"?N(re):N,locale:i,minDate:o,maxDate:s,__preventFocus:f,__stopPropagation:A,nextIcon:h,previousIcon:g,nextLabel:y,previousLabel:_,onNext:v,onPrevious:x,nextDisabled:w,previousDisabled:S,getYearControlProps:l,__staticSelector:T||"DecadeLevelGroup",classNames:C,styles:O,unstyled:R,withCellSpacing:d})});return H.createElement(Xe,b4e({className:B(W.decadeLevelGroup,E),ref:e},G),$)});CK.displayName="@mantine/dates/DecadeLevelGroup";var P4e=Object.defineProperty,Z1=Object.getOwnPropertySymbols,TK=Object.prototype.hasOwnProperty,OK=Object.prototype.propertyIsEnumerable,R6=(t,e,n)=>e in t?P4e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,s_=(t,e)=>{for(var n in e||(e={}))TK.call(e,n)&&R6(t,n,e[n]);if(Z1)for(var n of Z1(e))OK.call(e,n)&&R6(t,n,e[n]);return t},C4e=(t,e)=>{var n={};for(var r in t)TK.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Z1)for(var r of Z1(t))e.indexOf(r)<0&&OK.call(t,r)&&(n[r]=t[r]);return n};const T4e={maxLevel:"decade",minLevel:"month",__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0},RK=M.forwardRef((t,e)=>{const n=nt("Calendar",T4e,t),{maxLevel:r,minLevel:i,defaultLevel:o,level:s,onLevelChange:a,date:l,defaultDate:c,onDateChange:u,numberOfColumns:d,columnsToScroll:f,ariaLabels:h,onYearSelect:g,onMonthSelect:y,onYearMouseEnter:_,onMonthMouseEnter:v,__updateDateOnYearSelect:x,__updateDateOnMonthSelect:w,firstDayOfWeek:S,weekdayFormat:E,weekendDays:C,getDayProps:O,excludeDate:R,renderDay:T,hideOutsideDates:A,hideWeekdays:F,getDayAriaLabel:N,monthLabelFormat:U,nextIcon:k,previousIcon:z,__onDayClick:G,__onDayMouseEnter:W,withCellSpacing:B,monthsListFormat:j,getMonthControlProps:$,yearLabelFormat:q,yearsListFormat:K,getYearControlProps:re,decadeLabelFormat:J,minDate:le,maxDate:ae,locale:oe,className:De,classNames:Te,styles:ve,__staticSelector:we,unstyled:me,variant:se,size:de,__preventFocus:ke,__stopPropagation:Ve,onNextDecade:Ze,onPreviousDecade:ot,onNextYear:dt,onPreviousYear:We,onNextMonth:ht,onPreviousMonth:ee,static:Q}=n,Pe=C4e(n,["maxLevel","minLevel","defaultLevel","level","onLevelChange","date","defaultDate","onDateChange","numberOfColumns","columnsToScroll","ariaLabels","onYearSelect","onMonthSelect","onYearMouseEnter","onMonthMouseEnter","__updateDateOnYearSelect","__updateDateOnMonthSelect","firstDayOfWeek","weekdayFormat","weekendDays","getDayProps","excludeDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","monthLabelFormat","nextIcon","previousIcon","__onDayClick","__onDayMouseEnter","withCellSpacing","monthsListFormat","getMonthControlProps","yearLabelFormat","yearsListFormat","getYearControlProps","decadeLabelFormat","minDate","maxDate","locale","className","classNames","styles","__staticSelector","unstyled","variant","size","__preventFocus","__stopPropagation","onNextDecade","onPreviousDecade","onNextYear","onPreviousYear","onNextMonth","onPreviousMonth","static"]),{classes:$e,cx:Ge}=TFe(null,{name:["Calendar",we],classNames:Te,styles:ve,unstyled:me,variant:se,size:de}),[Ke,gt]=Ar({value:s?jp(s,i,r):void 0,defaultValue:o?jp(o,i,r):void 0,finalValue:jp(void 0,i,r),onChange:a}),[ut,Ae]=Ar({value:l,defaultValue:c,finalValue:null,onChange:u}),vt={__staticSelector:we||"Calendar",styles:ve,classNames:Te,unstyled:me,variant:se,size:de},xt=f||d||1,ct=ut||new Date,Ie=()=>{const ue=qt(ct).add(xt,"month").toDate();ht?.(ue),Ae(ue)},Ye=()=>{const ue=qt(ct).subtract(xt,"month").toDate();ee?.(ue),Ae(ue)},Tt=()=>{const ue=qt(ct).add(xt,"year").toDate();dt?.(ue),Ae(ue)},Lt=()=>{const ue=qt(ct).subtract(xt,"year").toDate();We?.(ue),Ae(ue)},Rt=()=>{const ue=qt(ct).add(10*xt,"year").toDate();Ze?.(ue),Ae(ue)},he=()=>{const ue=qt(ct).subtract(10*xt,"year").toDate();ot?.(ue),Ae(ue)};return H.createElement(Xe,s_({className:Ge($e.calendar,De),ref:e},Pe),Ke==="month"&&H.createElement(iK,s_({month:ct,minDate:le,maxDate:ae,firstDayOfWeek:S,weekdayFormat:E,weekendDays:C,getDayProps:O,excludeDate:R,renderDay:T,hideOutsideDates:A,hideWeekdays:F,getDayAriaLabel:N,onNext:Ie,onPrevious:Ye,hasNextLevel:r!=="month",onLevelClick:()=>gt("year"),numberOfColumns:d,locale:oe,levelControlAriaLabel:h?.monthLevelControl,nextLabel:h?.nextMonth,nextIcon:k,previousLabel:h?.previousMonth,previousIcon:z,monthLabelFormat:U,__onDayClick:G,__onDayMouseEnter:W,__preventFocus:ke,__stopPropagation:Ve,static:Q,withCellSpacing:B},vt)),Ke==="year"&&H.createElement(gK,s_({year:ct,numberOfColumns:d,minDate:le,maxDate:ae,monthsListFormat:j,getMonthControlProps:$,locale:oe,onNext:Tt,onPrevious:Lt,hasNextLevel:r!=="month"&&r!=="year",onLevelClick:()=>gt("decade"),levelControlAriaLabel:h?.yearLevelControl,nextLabel:h?.nextYear,nextIcon:k,previousLabel:h?.previousYear,previousIcon:z,yearLabelFormat:q,__onControlMouseEnter:v,__onControlClick:(ue,He)=>{w&&Ae(He),gt(jp("month",i,r)),y?.(He)},__preventFocus:ke,__stopPropagation:Ve,withCellSpacing:B},vt)),Ke==="decade"&&H.createElement(CK,s_({decade:ct,minDate:le,maxDate:ae,yearsListFormat:K,getYearControlProps:re,locale:oe,onNext:Rt,onPrevious:he,numberOfColumns:d,nextLabel:h?.nextDecade,nextIcon:k,previousLabel:h?.previousDecade,previousIcon:z,decadeLabelFormat:J,__onControlMouseEnter:_,__onControlClick:(ue,He)=>{x&&Ae(He),gt(jp("year",i,r)),g?.(He)},__preventFocus:ke,__stopPropagation:Ve,withCellSpacing:B},vt)))});RK.displayName="@mantine/dates/Calendar";var A6=Object.getOwnPropertySymbols,O4e=Object.prototype.hasOwnProperty,R4e=Object.prototype.propertyIsEnumerable,A4e=(t,e)=>{var n={};for(var r in t)O4e.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&A6)for(var r of A6(t))e.indexOf(r)<0&&R4e.call(t,r)&&(n[r]=t[r]);return n};function D4e(t){const e=t,{maxLevel:n,minLevel:r,defaultLevel:i,level:o,onLevelChange:s,nextIcon:a,previousIcon:l,date:c,defaultDate:u,onDateChange:d,numberOfColumns:f,columnsToScroll:h,ariaLabels:g,onYearSelect:y,onMonthSelect:_,onYearMouseEnter:v,onMonthMouseEnter:x,onNextMonth:w,onPreviousMonth:S,onNextYear:E,onPreviousYear:C,onNextDecade:O,onPreviousDecade:R,withCellSpacing:T,__updateDateOnYearSelect:A,__updateDateOnMonthSelect:F,firstDayOfWeek:N,weekdayFormat:U,weekendDays:k,getDayProps:z,excludeDate:G,renderDay:W,hideOutsideDates:B,hideWeekdays:j,getDayAriaLabel:$,monthLabelFormat:q,monthsListFormat:K,getMonthControlProps:re,yearLabelFormat:J,yearsListFormat:le,getYearControlProps:ae,decadeLabelFormat:oe,allowSingleDateInRange:De,allowDeselect:Te,minDate:ve,maxDate:we,locale:me}=e,se=A4e(e,["maxLevel","minLevel","defaultLevel","level","onLevelChange","nextIcon","previousIcon","date","defaultDate","onDateChange","numberOfColumns","columnsToScroll","ariaLabels","onYearSelect","onMonthSelect","onYearMouseEnter","onMonthMouseEnter","onNextMonth","onPreviousMonth","onNextYear","onPreviousYear","onNextDecade","onPreviousDecade","withCellSpacing","__updateDateOnYearSelect","__updateDateOnMonthSelect","firstDayOfWeek","weekdayFormat","weekendDays","getDayProps","excludeDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","monthLabelFormat","monthsListFormat","getMonthControlProps","yearLabelFormat","yearsListFormat","getYearControlProps","decadeLabelFormat","allowSingleDateInRange","allowDeselect","minDate","maxDate","locale"]);return{calendarProps:{maxLevel:n,minLevel:r,defaultLevel:i,level:o,onLevelChange:s,nextIcon:a,previousIcon:l,date:c,defaultDate:u,onDateChange:d,numberOfColumns:f,columnsToScroll:h,ariaLabels:g,onYearSelect:y,onMonthSelect:_,onYearMouseEnter:v,onMonthMouseEnter:x,onNextMonth:w,onPreviousMonth:S,onNextYear:E,onPreviousYear:C,onNextDecade:O,onPreviousDecade:R,withCellSpacing:T,__updateDateOnYearSelect:A,__updateDateOnMonthSelect:F,firstDayOfWeek:N,weekdayFormat:U,weekendDays:k,getDayProps:z,excludeDate:G,renderDay:W,hideOutsideDates:B,hideWeekdays:j,getDayAriaLabel:$,monthLabelFormat:q,monthsListFormat:K,getMonthControlProps:re,yearLabelFormat:J,yearsListFormat:le,getYearControlProps:ae,decadeLabelFormat:oe,allowSingleDateInRange:De,allowDeselect:Te,minDate:ve,maxDate:we,locale:me},others:se}}function I4e({date:t,maxDate:e,minDate:n}){return!(t==null||Number.isNaN(t.getTime())||e&&qt(t).isAfter(e,"date")||n&&qt(t).isBefore(n,"date"))}function L4e(t){const e=new Date(t);return Number.isNaN(e.getTime())||!t?null:e}function k4e(t,e){if(e==="range"&&Array.isArray(t)){const[n,r]=t;return n?r?`${n.toISOString()} – ${r.toISOString()}`:`${n.toISOString()} –`:""}return e==="multiple"&&Array.isArray(t)?t.map(n=>n.toISOString()).join(", "):!Array.isArray(t)&&t?t.toISOString():""}function AK({value:t,type:e,name:n,form:r}){return H.createElement("input",{type:"hidden",value:k4e(t,e),name:n,form:r})}AK.displayName="@mantine/dates/HiddenDatesInput";function N4e(t,e){if(!t||!e)return e;const n=t.getHours(),r=t.getMinutes(),i=t.getSeconds(),o=t.getMilliseconds(),s=new Date(e);return s.setHours(n),s.setMinutes(r),s.setSeconds(i),s.setMilliseconds(o),s}var F4e=Object.defineProperty,z4e=Object.defineProperties,U4e=Object.getOwnPropertyDescriptors,q1=Object.getOwnPropertySymbols,DK=Object.prototype.hasOwnProperty,IK=Object.prototype.propertyIsEnumerable,D6=(t,e,n)=>e in t?F4e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,cu=(t,e)=>{for(var n in e||(e={}))DK.call(e,n)&&D6(t,n,e[n]);if(q1)for(var n of q1(e))IK.call(e,n)&&D6(t,n,e[n]);return t},a_=(t,e)=>z4e(t,U4e(e)),B4e=(t,e)=>{var n={};for(var r in t)DK.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&q1)for(var r of q1(t))e.indexOf(r)<0&&IK.call(t,r)&&(n[r]=t[r]);return n};const H4e={valueFormat:"MMMM D, YYYY",fixOnBlur:!0,preserveTime:!0,size:"sm"},LK=M.forwardRef((t,e)=>{const n=hb("DateInput",H4e,t),{inputProps:r,wrapperProps:i,value:o,defaultValue:s,onChange:a,clearable:l,clearButtonProps:c,popoverProps:u,getDayProps:d,locale:f,valueFormat:h,dateParser:g,minDate:y,maxDate:_,fixOnBlur:v,onFocus:x,onBlur:w,onClick:S,readOnly:E,name:C,form:O,rightSection:R,unstyled:T,classNames:A,styles:F,allowDeselect:N,preserveTime:U,date:k,defaultDate:z,onDateChange:G}=n,W=B4e(n,["inputProps","wrapperProps","value","defaultValue","onChange","clearable","clearButtonProps","popoverProps","getDayProps","locale","valueFormat","dateParser","minDate","maxDate","fixOnBlur","onFocus","onBlur","onClick","readOnly","name","form","rightSection","unstyled","classNames","styles","allowDeselect","preserveTime","date","defaultDate","onDateChange"]),{calendarProps:B,others:j}=D4e(W),$=Uc(),K=g||(We=>{const ht=qt(We,h,$.getLocale(f)).toDate();return Number.isNaN(ht.getTime())?L4e(We):ht}),re=l||N,J=We=>We?qt(We).locale($.getLocale(f)).format(h):"",[le,ae,oe]=Ar({value:o,defaultValue:s,finalValue:null,onChange:a}),[De,Te]=Ar({value:k,defaultValue:s||z,finalValue:null,onChange:G});M.useEffect(()=>{oe&&Te(o)},[oe,o]);const[ve,we]=M.useState(J(le));M.useEffect(()=>{we(J(le))},[$.getLocale(f)]);const[me,se]=M.useState(!1),de=We=>{const ht=We.currentTarget.value;if(we(ht),ht.trim()===""&&re)ae(null);else{const ee=K(ht);I4e({date:ee,minDate:y,maxDate:_})&&(ae(ee),Te(ee))}},ke=We=>{w?.(We),se(!1),v&&we(J(le))},Ve=We=>{x?.(We),se(!0)},Ze=We=>{S?.(We),se(!0)},ot=We=>a_(cu({},d?.(We)),{selected:qt(le).isSame(We,"day"),onClick:()=>{const ht=U?N4e(le,We):We,ee=re&&qt(le).isSame(We,"day")?null:ht;ae(ee),!oe&&we(J(ee)),se(!1)}}),dt=R||(l&&le&&!E?H.createElement(Qg,cu({variant:"transparent",onMouseDown:We=>We.preventDefault(),tabIndex:-1,onClick:()=>{ae(null),!oe&&we("")},unstyled:T},c)):null);return Qr(()=>{o!==void 0&&!me&&we(J(o))},[o]),H.createElement(H.Fragment,null,H.createElement(Ki.Wrapper,a_(cu({},i),{__staticSelector:"DateInput"}),H.createElement(qi,cu({opened:me,trapFocus:!1,position:"bottom-start",disabled:E,withRoles:!1},u),H.createElement(qi.Target,null,H.createElement(Ki,a_(cu(cu({"data-dates-input":!0,"data-read-only":E||void 0,autoComplete:"off",ref:e,value:ve,onChange:de,onBlur:ke,onFocus:Ve,onClick:Ze,readOnly:E,rightSection:dt},r),j),{__staticSelector:"DateInput"}))),H.createElement(qi.Dropdown,{onMouseDown:We=>We.preventDefault(),"data-dates-dropdown":!0},H.createElement(RK,a_(cu({__staticSelector:"DateInput"},B),{classNames:A,styles:F,unstyled:T,__preventFocus:!0,minDate:y,maxDate:_,locale:f,getDayProps:ot,size:r.size,date:De,onDateChange:Te}))))),H.createElement(AK,{name:C,form:O,value:le,type:"default"}))});LK.displayName="@mantine/dates/DateInput";let I6=36,kK="";for(;I6--;)kK+=I6.toString(36);function L6(t=11){let e="",n=t;for(;n--;)e+=kK[Math.random()*36|0];return e}const V4e=t=>t.replace(/[|\\{}()[\]^$+*?.-]/g,e=>`\\${e}`),j4e=t=>t.replace(/\s{2,}/g," ").split(" ").join("|"),$4e=({terms:t,matchExactly:e=!1})=>{if(typeof t!="string")throw new TypeError("Expected a string");const n=V4e(t.trim());return`(${e?n:j4e(n)})`},G4e=({terms:t,matchExactly:e=!1})=>{try{const n=/^([/~@;%#'])(.*?)\1([gimsuy]*)$/.exec(t);return n?new RegExp(n[2],n[3]):new RegExp($4e({terms:t,matchExactly:e}),"ig")}catch{throw new TypeError("Expected terms to be either a string or a RegExp!")}},W4e=t=>e=>e!==null&&typeof e=="object"&&t in e,l_=W4e("match"),c_=t=>typeof t<"u";function Y4e({curr:t,next:e,prev:n,clipBy:r=3}){const i=t.text.split(" "),o=i.length;if(t.match||r>=o)return t.text;const s="...";return c_(e)&&c_(n)&&l_(n)&&l_(e)?o>r*2?[...i.slice(0,r),s,...i.slice(-r)].join(" "):t.text:c_(e)&&l_(e)?[s,...i.slice(-r)].join(" "):c_(n)&&l_(n)?[...i.slice(0,r),s].join(" "):t.text}var X4e=Object.defineProperty,Z4e=Object.defineProperties,q4e=Object.getOwnPropertyDescriptors,k6=Object.getOwnPropertySymbols,K4e=Object.prototype.hasOwnProperty,Q4e=Object.prototype.propertyIsEnumerable,N6=(t,e,n)=>e in t?X4e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,u_=(t,e)=>{for(var n in e||(e={}))K4e.call(e,n)&&N6(t,n,e[n]);if(k6)for(var n of k6(e))Q4e.call(e,n)&&N6(t,n,e[n]);return t},J4e=(t,e)=>Z4e(t,q4e(e));const eUe=t=>t.length>0,iC=({text:t,query:e,clipBy:n,matchExactly:r=!1})=>{const i=typeof e=="string"?e.trim():e;if(i==="")return[{key:L6(),text:t,match:!1}];const o=G4e({terms:e,matchExactly:r});return t.split(o).filter(eUe).map(s=>({key:L6(),text:s,match:r?s.toLowerCase()===i.toLowerCase():o.test(s)})).map((s,a,l)=>u_(u_({},s),typeof n=="number"&&{text:Y4e(J4e(u_(u_({curr:s},a0&&{prev:l[a-1]}),{clipBy:n}))}))};function Ah(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var e,n,r,i;return(i=(e=t.id)!==null&&e!==void 0?e:(r=(n=t.accessorKey)===null||n===void 0?void 0:n.toString)===null||r===void 0?void 0:r.call(n))!==null&&i!==void 0?i:t.header},HT=t=>{const e=[],n=r=>{r.forEach(i=>{i.columns?n(i.columns):e.push(i)})};return n(t),e},NK=({aggregationFns:t,columnDefs:e,columnFilterFns:n,defaultDisplayColumn:r,filterFns:i,sortingFns:o})=>e.map(s=>{var a,l;if(s.id||(s.id=Mm(s)),s.columnDefType||(s.columnDefType="data"),!((a=s.columns)===null||a===void 0)&&a.length)s.columnDefType="group",s.columns=NK({aggregationFns:t,columnDefs:s.columns,columnFilterFns:n,defaultDisplayColumn:r,filterFns:i,sortingFns:o});else if(s.columnDefType==="data"){if(Array.isArray(s.aggregationFn)){const c=s.aggregationFn;s.aggregationFn=(u,d,f)=>c.map(h=>{var g;return(g=t[h])===null||g===void 0?void 0:g.call(t,u,d,f)})}Object.keys(i).includes(n[s.id])&&(s.filterFn=(l=i[n[s.id]])!==null&&l!==void 0?l:i.fuzzy,s._filterFn=n[s.id]),Object.keys(o).includes(s.sortingFn)&&(s.sortingFn=o[s.sortingFn])}else s.columnDefType==="display"&&(s=Object.assign(Object.assign({},r),s));return s}),FK=(t,e,n)=>(t.getCanPin()&&t.pin(e.getIsPinned()),n.splice(n.indexOf(e.id),0,n.splice(n.indexOf(t.id),1)[0]),[...n]),jA=(t,e)=>!!(t.enableExpanding||t.enableGrouping&&(e===void 0||e?.length)||t.renderDetailPanel),nUe=t=>{var e;return[(t.enableRowDragging||t.enableRowOrdering)&&"mrt-row-drag",t.positionActionsColumn==="first"&&(t.enableRowActions||t.enableEditing&&["row","modal"].includes((e=t.editingMode)!==null&&e!==void 0?e:""))&&"mrt-row-actions",t.positionExpandColumn==="first"&&jA(t)&&"mrt-row-expand",t.enableRowSelection&&"mrt-row-select",t.enableRowNumbers&&"mrt-row-numbers"].filter(Boolean)},rUe=t=>{var e;return[t.positionActionsColumn==="last"&&(t.enableRowActions||t.enableEditing&&["row","modal"].includes((e=t.editingMode)!==null&&e!==void 0?e:""))&&"mrt-row-actions",t.positionExpandColumn==="last"&&jA(t)&&"mrt-row-expand"].filter(Boolean)},zK=t=>{const e=nUe(t),n=rUe(t),r=HT(t.columns).map(i=>Mm(i)).filter(i=>!e.includes(i)&&!n.includes(i));return[...e,...r,...n]},iUe=t=>t.filterVariant==="multi-select"?"arrIncludesSome":t.filterVariant==="range"||t.filterVariant==="date-range"?"betweenInclusive":t.filterVariant==="select"||t.filterVariant==="checkbox"||t.filterVariant==="date"?"equals":"fuzzy",oUe=(t,e)=>e.getVisibleLeafColumns()[0].id===t.id,sUe=(t,e)=>{const n=e.getVisibleLeafColumns();return n[n.length-1].id===t.id},aUe=(t,e)=>e.getIsPinned()==="left"&&t.getLeftLeafHeaders().length-1===e.getPinnedIndex(),lUe=t=>t.getIsPinned()==="right"&&t.getPinnedIndex()===0,cUe=(t,e)=>t.getRightLeafHeaders().slice(e.getPinnedIndex()+1).reduce((n,r)=>n+r.getSize(),0),$A=({column:t,header:e,isStriped:n,row:r,table:i,tableCellProps:o,theme:s})=>{var a,l,c,u,d,f,h,g,y,_;const v={minWidth:`max(calc(var(--${e?"header":"col"}-${Em((a=e?.id)!==null&&a!==void 0?a:t.id)}-size) * 1px), ${(l=t.columnDef.minSize)!==null&&l!==void 0?l:30}px)`,width:`calc(var(--${e?"header":"col"}-${Em((c=e?.id)!==null&&c!==void 0?c:t.id)}-size) * 1px)`};return Object.assign(Object.assign(Object.assign({backgroundColor:r?r?.getIsSelected()?s.fn.rgba(gl(s),.1):t.getIsPinned()&&t.columnDef.columnDefType!=="group"?s.fn.rgba(s.colorScheme==="dark"?s.fn.darken(s.colors.dark[7],.02):s.white,.97):n?"inherit":s.colorScheme==="dark"?s.fn.lighten(s.colors.dark[7],.02):s.white:"inherit",backgroundClip:"padding-box",boxShadow:aUe(i,t)?`-4px 0 8px -6px ${s.fn.rgba(s.black,.2)} inset`:lUe(t)?`4px 0 8px -6px ${s.fn.rgba(s.black,.2)} inset`:void 0,display:i.options.layoutMode==="grid"?"flex":"table-cell",flex:i.options.layoutMode==="grid"?`var(--${e?"header":"col"}-${Em((u=e?.id)!==null&&u!==void 0?u:t.id)}-size) 0 auto`:void 0,left:t.getIsPinned()==="left"?`${t.getStart("left")}px`:void 0,ml:i.options.enableColumnVirtualization&&t.getIsPinned()==="left"&&t.getPinnedIndex()===0?`-${t.getSize()*((f=(d=i.getState().columnPinning.left)===null||d===void 0?void 0:d.length)!==null&&f!==void 0?f:1)}px`:void 0,mr:i.options.enableColumnVirtualization&&t.getIsPinned()==="right"&&t.getPinnedIndex()===i.getVisibleLeafColumns().length-1?`-${t.getSize()*((g=(h=i.getState().columnPinning.right)===null||h===void 0?void 0:h.length)!==null&&g!==void 0?g:1)*1.2}px`:void 0,opacity:((y=i.getState().draggingColumn)===null||y===void 0?void 0:y.id)===t.id||((_=i.getState().hoveredColumn)===null||_===void 0?void 0:_.id)===t.id?.5:1,position:t.getIsPinned()&&t.columnDef.columnDefType!=="group"?"sticky":void 0,right:t.getIsPinned()==="right"?`${cUe(i,t)}px`:void 0,transition:i.options.enableColumnVirtualization?"none":"padding 100ms ease-in-out"},!i.options.enableColumnResizing&&v),o?.sx instanceof Function?o.sx(s):o?.sx),i.options.enableColumnResizing&&v)},uUe={filterVariant:"text",minSize:40,maxSize:1e3,size:180},dUe={columnDefType:"display",enableClickToCopy:!1,enableColumnActions:!1,enableColumnDragging:!1,enableColumnFilter:!1,enableColumnOrdering:!1,enableEditing:!1,enableGlobalFilter:!1,enableGrouping:!1,enableHiding:!1,enableResizing:!1,enableSorting:!1},fUe=t=>{var e,n,r,i,o;return(o=t.colorScheme==="dark"?(n=(e=t.primaryShade)===null||e===void 0?void 0:e.dark)!==null&&n!==void 0?n:t.primaryShade:(i=(r=t.primaryShade)===null||r===void 0?void 0:r.light)!==null&&i!==void 0?i:t.primaryShade)!==null&&o!==void 0?o:7},gl=(t,e)=>t.colors[t.primaryColor][e??fUe(t)],Em=t=>t.replace(/[^a-zA-Z0-9]/g,"_"),UK=(t,e,n,r)=>{const i=BNe(t.getValue(e),n,{threshold:Xi.MATCHES});return r(i),i.passed};UK.autoRemove=t=>!t;const BK=(t,e,n)=>t.getValue(e).toString().toLowerCase().trim().includes(n.toString().toLowerCase().trim());BK.autoRemove=t=>!t;const HK=(t,e,n)=>t.getValue(e).toString().toLowerCase().trim().startsWith(n.toString().toLowerCase().trim());HK.autoRemove=t=>!t;const VK=(t,e,n)=>t.getValue(e).toString().toLowerCase().trim().endsWith(n.toString().toLowerCase().trim());VK.autoRemove=t=>!t;const Sb=(t,e,n)=>n===null?!0:t.getValue(e).toString().toLowerCase().trim()===n.toString().toLowerCase().trim();Sb.autoRemove=t=>!t;const jK=(t,e,n)=>t.getValue(e).toString().toLowerCase().trim()!==n.toString().toLowerCase().trim();jK.autoRemove=t=>!t;const bb=(t,e,n)=>n===null?!0:!isNaN(+n)&&!isNaN(+t.getValue(e))?+t.getValue(e)>+n:t.getValue(e).toString().toLowerCase().trim()>n.toString().toLowerCase().trim();bb.autoRemove=t=>!t;const GA=(t,e,n)=>Sb(t,e,n)||bb(t,e,n);GA.autoRemove=t=>!t;const Mb=(t,e,n)=>n===null?!0:!isNaN(+n)&&!isNaN(+t.getValue(e))?+t.getValue(e)<+n:t.getValue(e).toString().toLowerCase().trim()!t;const WA=(t,e,n)=>Sb(t,e,n)||Mb(t,e,n);WA.autoRemove=t=>!t;const $K=(t,e,n)=>(["",void 0].includes(n[0])||bb(t,e,n[0]))&&(!isNaN(+n[0])&&!isNaN(+n[1])&&+n[0]>+n[1]||["",void 0].includes(n[1])||Mb(t,e,n[1]));$K.autoRemove=t=>!t;const GK=(t,e,n)=>(["",void 0].includes(n[0])||GA(t,e,n[0]))&&(!isNaN(+n[0])&&!isNaN(+n[1])&&+n[0]>+n[1]||["",void 0].includes(n[1])||WA(t,e,n[1]));GK.autoRemove=t=>!t;const WK=(t,e,n)=>!t.getValue(e).toString().trim();WK.autoRemove=t=>!t;const YK=(t,e,n)=>!!t.getValue(e).toString().trim();YK.autoRemove=t=>!t;const hUe=Object.assign(Object.assign({},ua),{between:$K,betweenInclusive:GK,contains:BK,empty:WK,endsWith:VK,equals:Sb,fuzzy:UK,greaterThan:bb,greaterThanOrEqualTo:GA,lessThan:Mb,lessThanOrEqualTo:WA,notEmpty:YK,notEquals:jK,startsWith:HK}),pUe={IconArrowAutofitContent:uke,IconArrowsSort:dke,IconBaselineDensityLarge:fke,IconBaselineDensityMedium:hke,IconBaselineDensitySmall:pke,IconBoxMultiple:gke,IconChevronDown:xke,IconChevronLeft:wke,IconChevronRight:Ske,IconChevronsDown:bke,IconCircleX:Mke,IconClearAll:Eke,IconColumns:Tke,IconDeviceFloppy:Oke,IconDots:Ake,IconDotsVertical:Rke,IconEdit:Dke,IconEyeOff:kT,IconFilter:kke,IconFilterOff:Lke,IconGripHorizontal:Nke,IconMaximize:yq,IconMinimize:zke,IconPinned:Hke,IconPinnedOff:Bke,IconSearch:jke,IconSearchOff:Vke,IconSortAscending:$ke,IconSortDescending:Gke,IconX:Yke},mUe=(t,e,n)=>{let r=0;return t.columnFiltersMeta[n]&&(r=jNe(t.columnFiltersMeta[n],e.columnFiltersMeta[n])),r===0?_u.alphanumeric(t,e,n):r},gUe=Object.assign(Object.assign({},_u),{fuzzy:mUe}),vUe=(t,e)=>Math.max(...Object.values(e.columnFiltersMeta).map(n=>n.rank))-Math.max(...Object.values(t.columnFiltersMeta).map(n=>n.rank)),yUe=({table:t})=>{var e,n;const{getIsAllRowsExpanded:r,getIsSomeRowsExpanded:i,getCanSomeRowsExpand:o,getState:s,options:{icons:{IconChevronsDown:a},localization:l,mantineExpandAllButtonProps:c,renderDetailPanel:u},toggleAllRowsExpanded:d}=t,{density:f,isLoading:h}=s(),g=c instanceof Function?c({table:t}):c,y=r();return I.jsx(tr,{withinPortal:!0,withArrow:!0,openDelay:1e3,label:((e=g?.title)!==null&&e!==void 0?e:y)?l.collapseAll:l.expandAll,children:I.jsx(An,Object.assign({"aria-label":l.expandAll,disabled:h||!u&&!o(),onClick:()=>d(!y)},g,{sx:_=>Object.assign({marginLeft:f==="xl"?"-6px":f==="md"?"0":"6px","&:disabled":{backgroundColor:"transparent",border:"none"}},g?.sx instanceof Function?g?.sx(_):g?.sx),title:void 0,children:(n=g?.children)!==null&&n!==void 0?n:I.jsx(a,{style:{transform:`rotate(${y?-180:i()?-90:0}deg)`,transition:"transform 100ms"}})}))})},_Ue=({row:t,table:e})=>{var n,r;const{options:{icons:{IconChevronDown:i},localization:o,mantineExpandButtonProps:s,renderDetailPanel:a}}=e,l=s instanceof Function?s({table:e,row:t}):s,c=t.getCanExpand(),u=t.getIsExpanded(),d=f=>{var h;f.stopPropagation(),t.toggleExpanded(),(h=l?.onClick)===null||h===void 0||h.call(l,f)};return I.jsx(tr,{withinPortal:!0,withArrow:!0,disabled:!c&&!a,openDelay:1e3,label:((n=l?.title)!==null&&n!==void 0?n:u)?o.collapse:o.expand,children:I.jsx(An,Object.assign({"aria-label":o.expand,disabled:!c&&!a},l,{onClick:d,sx:f=>Object.assign({"&:disabled":{backgroundColor:"transparent",border:"none"}},l?.sx instanceof Function?l.sx(f):l?.sx),title:void 0,children:(r=l?.children)!==null&&r!==void 0?r:I.jsx(i,{style:{transform:`rotate(${!c&&!a?-90:u?-180:0}deg)`,transition:"transform 100ms"}})}))})},xUe=({handleEdit:t,row:e,table:n})=>{const{options:{editingMode:r,enableEditing:i,icons:{IconEdit:o,IconDots:s},localization:a,renderRowActionMenuItems:l}}=n;return I.jsxs(cn,{closeOnItemClick:!0,withinPortal:!0,children:[I.jsx(tr,{withinPortal:!0,withArrow:!0,openDelay:1e3,label:a.rowActions,children:I.jsx(cn.Target,{children:I.jsx(An,{"aria-label":a.rowActions,onClick:c=>c.stopPropagation(),size:"sm",children:I.jsx(s,{})})})}),I.jsxs(cn.Dropdown,{onClick:c=>c.stopPropagation(),children:[i&&r!=="table"&&I.jsx(cn.Item,{icon:I.jsx(o,{}),onClick:t,children:a.edit}),l?.({row:e,table:n})]})]})},XK=({row:t,table:e,variant:n="icon"})=>{const{getState:r,options:{icons:{IconCircleX:i,IconDeviceFloppy:o},localization:s,onEditingRowSave:a,onEditingRowCancel:l},refs:{editInputRefs:c},setEditingRow:u}=e,{editingRow:d}=r(),f=()=>{l?.({row:t,table:e}),u(null)},h=()=>{var g,y;(g=Object.values(c?.current))===null||g===void 0||g.forEach(_=>{_.value!==void 0&&Object.hasOwn(d?._valuesCache,_.name)&&(d._valuesCache[_.name]=_.value)}),a?.({exitEditingMode:()=>u(null),row:d??t,table:e,values:(y=d?._valuesCache)!==null&&y!==void 0?y:Object.assign({},t.original)})};return I.jsx(Xe,{onClick:g=>g.stopPropagation(),sx:{display:"flex",gap:"12px"},children:n==="icon"?I.jsxs(I.Fragment,{children:[I.jsx(tr,{withinPortal:!0,withArrow:!0,label:s.cancel,children:I.jsx(An,{"aria-label":s.cancel,onClick:f,children:I.jsx(i,{})})}),I.jsx(tr,{withinPortal:!0,withArrow:!0,label:s.save,children:I.jsx(An,{"aria-label":s.save,color:"blue",onClick:h,children:I.jsx(o,{})})})]}):I.jsxs(I.Fragment,{children:[I.jsx(Ds,{onClick:f,variant:"subtle",children:s.cancel}),I.jsx(Ds,{onClick:h,variant:"filled",children:s.save})]})})},wUe=({cell:t,row:e,table:n})=>{const{getState:r,options:{editingMode:i,enableEditing:o,icons:{IconEdit:s},localization:a,renderRowActionMenuItems:l,renderRowActions:c},setEditingRow:u}=n,{editingRow:d}=r(),f=h=>{h.stopPropagation(),u(Object.assign({},e))};return I.jsx(I.Fragment,{children:c?I.jsx(I.Fragment,{children:c({cell:t,row:e,table:n})}):e.id===d?.id&&i==="row"?I.jsx(XK,{row:e,table:n}):!l&&(o instanceof Function?o(e):o)?I.jsx(tr,{withinPortal:!0,position:"right",withArrow:!0,label:a.edit,children:I.jsx(An,{"aria-label":a.edit,onClick:f,children:I.jsx(s,{})})}):l?I.jsx(xUe,{handleEdit:f,row:e,table:n}):null})},F6=({row:t,selectAll:e,table:n})=>{var r;const{getState:i,options:{localization:o,enableMultiRowSelection:s,mantineSelectCheckboxProps:a,mantineSelectAllCheckboxProps:l,selectAllMode:c}}=n,{density:u,isLoading:d}=i(),f=t?a instanceof Function?a({row:t,table:n}):a:l instanceof Function?l({table:n}):l,h=e?c==="page"?n.getIsAllPageRowsSelected():n.getIsAllRowsSelected():void 0,g=Object.assign(Object.assign({"aria-label":e?o.toggleSelectAll:o.toggleSelectRow,checked:e?h:t?.getIsSelected(),disabled:d||t&&!t.getCanSelect(),onChange:t?t.getToggleSelectedHandler():c==="all"?n.getToggleAllRowsSelectedHandler():n.getToggleAllPageRowsSelectedHandler(),size:u==="xs"?"sm":"md"},f),{onClick:y=>{var _;y.stopPropagation(),(_=f?.onClick)===null||_===void 0||_.call(f,y)},title:void 0});return I.jsx(tr,{withinPortal:!0,withArrow:!0,openDelay:1e3,label:(r=f?.title)!==null&&r!==void 0?r:e?o.toggleSelectAll:o.toggleSelectRow,children:s===!1?I.jsx(NA,Object.assign({},g)):I.jsx(nv,Object.assign({indeterminate:e?n.getIsSomeRowsSelected()&&!h:t?.getIsSomeSelected()},g))})},SUe=t=>[{option:"fuzzy",symbol:"≈",label:t.filterFuzzy,divider:!1},{option:"contains",symbol:"*",label:t.filterContains,divider:!1},{option:"startsWith",symbol:"a",label:t.filterStartsWith,divider:!1},{option:"endsWith",symbol:"z",label:t.filterEndsWith,divider:!0},{option:"equals",symbol:"=",label:t.filterEquals,divider:!1},{option:"notEquals",symbol:"≠",label:t.filterNotEquals,divider:!0},{option:"between",symbol:"⇿",label:t.filterBetween,divider:!1},{option:"betweenInclusive",symbol:"⬌",label:t.filterBetweenInclusive,divider:!0},{option:"greaterThan",symbol:">",label:t.filterGreaterThan,divider:!1},{option:"greaterThanOrEqualTo",symbol:"≥",label:t.filterGreaterThanOrEqualTo,divider:!1},{option:"lessThan",symbol:"<",label:t.filterLessThan,divider:!1},{option:"lessThanOrEqualTo",symbol:"≤",label:t.filterLessThanOrEqualTo,divider:!0},{option:"empty",symbol:"∅",label:t.filterEmpty,divider:!1},{option:"notEmpty",symbol:"!∅",label:t.filterNotEmpty,divider:!1}],z6=["between","betweenInclusive","inNumberRange"],U6=["empty","notEmpty"],bUe=["arrIncludesSome","arrIncludesAll","arrIncludes"],ZK=({header:t,onSelect:e,table:n})=>{var r,i,o,s;const{getState:a,options:{columnFilterModeOptions:l,globalFilterModeOptions:c,localization:u,renderColumnFilterModeMenuItems:d,renderGlobalFilterModeMenuItems:f},setColumnFilterFns:h,setGlobalFilterFn:g}=n,{globalFilterFn:y}=a(),{column:_}=t??{},{columnDef:v}=_??{},x=_?.getFilterValue(),w=(r=v?.columnFilterModeOptions)!==null&&r!==void 0?r:l,S=M.useMemo(()=>SUe(u).filter(O=>v?w===void 0||w?.includes(O.option):(!c||c.includes(O.option))&&["fuzzy","contains","startsWith"].includes(O.option)),[]),E=O=>{var R;const T=(R=v?._filterFn)!==null&&R!==void 0?R:"";!t||!_?g(O):O!==T&&(h(A=>Object.assign(Object.assign({},A),{[t.id]:O})),U6.includes(O)?x!==" "&&!U6.includes(T)?_.setFilterValue(" "):x&&_.setFilterValue(x):v?.filterVariant==="multi-select"||bUe.includes(O)?x instanceof String||x?.length?_.setFilterValue([]):x&&_.setFilterValue(x):["range","date-range"].includes(v?.filterVariant)||z6.includes(O)?!Array.isArray(x)||!x?.every(A=>A==="")&&!z6.includes(T)?_.setFilterValue(["",""]):_.setFilterValue(x):Array.isArray(x)?_.setFilterValue(""):_.setFilterValue(x)),e?.()},C=t&&v?v._filterFn:y;return I.jsx(cn.Dropdown,{children:(s=t&&_&&v?(o=(i=v.renderColumnFilterModeMenuItems)===null||i===void 0?void 0:i.call(v,{column:_,internalFilterOptions:S,onSelectFilterMode:E,table:n}))!==null&&o!==void 0?o:d?.({column:_,internalFilterOptions:S,onSelectFilterMode:E,table:n}):f?.({internalFilterOptions:S,onSelectFilterMode:E,table:n}))!==null&&s!==void 0?s:S.map(({option:O,label:R,divider:T,symbol:A},F)=>I.jsxs(M.Fragment,{children:[I.jsxs(cn.Item,{onClick:()=>E(O),color:O===C?"blue":void 0,sx:{"& > .mantine-Menu-itemLabel":{display:"flex",flexWrap:"nowrap",gap:"1ch"}},value:O,children:[I.jsx(er,{sx:{fontSize:"20px",transform:"translateY(-2px)",width:"2ch"},children:A}),I.jsx(er,{align:"center",children:R})]}),T&&I.jsx(cn.Divider,{})]},F))})},oC=({table:t})=>{var e;const{getState:n,setGlobalFilter:r,options:{enableGlobalFilterModes:i,icons:{IconSearch:o,IconX:s},localization:a,manualFiltering:l,mantineSearchTextInputProps:c},refs:{searchInputRef:u}}=t,{globalFilter:d,showGlobalFilter:f}=n(),h=c instanceof Function?c({table:t}):c,g=M.useRef(!1),[y,_]=M.useState(d??""),[v]=oW(y,l?500:250);M.useEffect(()=>{r(v||void 0)},[v]);const x=()=>{_(""),r(void 0)};return M.useEffect(()=>{g.current&&(d===void 0?x():_(d)),g.current=!0},[d]),I.jsxs(ud,{in:f,sx:{"& > div":{display:"flex",alignItems:"center",gap:"16px",flexWrap:"nowrap"}},children:[i&&I.jsxs(cn,{withinPortal:!0,children:[I.jsx(cn.Target,{children:I.jsx(An,{"aria-label":a.changeSearchMode,size:"sm",children:I.jsx(o,{})})}),I.jsx(ZK,{table:t,onSelect:x})]}),I.jsx(Pc,Object.assign({placeholder:a.search,onChange:w=>_(w.target.value),value:y??"",variant:"filled",icon:!i&&I.jsx(o,{}),rightSection:I.jsx(An,{"aria-label":a.clearSearch,disabled:!y?.length,onClick:x,size:"sm",sx:{"&:disabled":{backgroundColor:"transparent",border:"none"}},children:I.jsx(tr,{withinPortal:!0,withArrow:!0,label:(e=a.clearSearch)!==null&&e!==void 0?e:"",children:I.jsx(s,{})})})},h,{ref:w=>{w&&(u.current=w,h?.ref&&(h.ref=w))}}))]})},qK=({isTopToolbar:t,table:e})=>{const{options:{mantineProgressProps:n},getState:r}=e,{isLoading:i,showProgressBars:o}=r(),s=n instanceof Function?n({isTopToolbar:t,table:e}):n;return I.jsx(ud,{in:i||o,sx:{bottom:t?0:void 0,position:"absolute",top:t?void 0:0,width:"100%"},children:I.jsx(yZ,Object.assign({animate:!0,"aria-label":"Loading","aria-busy":"true",sx:{position:"relative"},value:100},s))})},d_={userSelect:"none","&:disabled":{backgroundColor:"transparent",border:"none"}},KK=({table:t,position:e="bottom"})=>{var n;const{getPrePaginationRowModel:r,getState:i,setPageIndex:o,setPageSize:s,options:{enableToolbarInternalActions:a,icons:{IconChevronLeft:l,IconChevronRight:c},localization:u,mantinePaginationProps:d,rowCount:f}}=t,{pagination:{pageSize:h=10,pageIndex:g=0},showGlobalFilter:y}=i(),_=d instanceof Function?d({table:t}):d,v=f??r().rows.length,x=v/h>2&&_?.showFirstLastPageButtons!==!1,w=g*h,S=Math.min(g*h+h,v);return I.jsxs(er,Object.assign({align:"center",justify:"space-between",gap:"lg",py:"xs",px:"sm",mt:e==="top"&&a&&!y?"3rem":void 0,p:"relative",sx:{zIndex:2}},_,{children:[_?.showRowsPerPage!==!1&&I.jsx(iv,{data:(n=_?.rowsPerPageOptions)!==null&&n!==void 0?n:["5","10","15","20","25","30","50","100"],label:u.rowsPerPage,onChange:E=>s(+E),value:h.toString(),sx:{"@media (min-width: 720px)":{display:"flex",alignItems:"center",gap:"8px"},"& .mantine-Select-input":{width:"90px"}},withinPortal:!0}),I.jsx(Si,{children:`${S===0?0:w+1}-${S} ${u.of} ${v}`}),I.jsxs(er,{gap:"xs",children:[x&&I.jsxs(An,{"aria-label":u.goToFirstPage,disabled:g<=0,onClick:()=>o(0),sx:d_,children:[I.jsx("b",{style:{transform:"translate(2px, -1.5px)"},children:"|"}),I.jsx(l,{})]}),I.jsx(An,{"aria-label":u.goToPreviousPage,disabled:g<=0,onClick:()=>o(g-1),sx:d_,children:I.jsx(l,{})}),I.jsx(An,{"aria-label":u.goToNextPage,disabled:S>=v,onClick:()=>o(g+1),sx:d_,children:I.jsx(c,{})}),x&&I.jsxs(An,{"aria-label":u.goToLastPage,disabled:S>=v,onClick:()=>o(Math.ceil(v/h)-1),sx:d_,children:[I.jsx(c,{}),I.jsx("b",{style:{transform:"translate(-2px, -1.5px)"},children:"|"})]})]})]}))},QK=({stackAlertBanner:t,table:e})=>{var n,r;const{getPrePaginationRowModel:i,getSelectedRowModel:o,getState:s,options:{icons:{IconX:a},localization:l,mantineToolbarAlertBannerProps:c,mantineToolbarAlertBannerChipProps:u,positionToolbarAlertBanner:d,rowCount:f}}=e,{grouping:h,showAlertBanner:g}=s(),y=c instanceof Function?c({table:e}):c,_=u instanceof Function?u({table:e}):u,v=o().rows.length>0?(r=(n=l.selectedCountOfRowCountRowsSelected)===null||n===void 0?void 0:n.replace("{selectedCount}",o().rows.length.toString()))===null||r===void 0?void 0:r.replace("{rowCount}",(f??i().rows.length).toString()):null,x=h.length>0?I.jsxs(er,{children:[l.groupedBy," ",h.map((w,S)=>I.jsxs(M.Fragment,{children:[S>0?l.thenBy:"",I.jsxs(mb,Object.assign({onChange:()=>e.getColumn(w).toggleGrouping(),sx:{paddingLeft:"1ch"}},_,{children:[e.getColumn(w).columnDef.header," ",I.jsx(a,{size:"12pt",style:{transform:"translate(6px, 3px)"}})]}))]},`${S}-${w}`))]}):null;return I.jsx(ud,{in:g||!!v||!!x,transitionDuration:t?200:0,children:I.jsxs(s7,Object.assign({color:"blue",icon:!1},y,{sx:w=>Object.assign({borderRadius:0,fontSize:"16px",left:0,position:"relative",marginBottom:t?0:d==="bottom"?"-16px":void 0,padding:"8px",right:0,top:0,width:"100%",zIndex:2},y?.sx instanceof Function?y.sx(w):y?.sx),children:[y?.title&&I.jsx(Xe,{children:y.title}),I.jsxs(er,{sx:{padding:"8px 16px"},children:[y?.children,y?.children&&(v||x)&&I.jsx("br",{}),v,v&&x&&I.jsx("br",{}),x]})]}))})},MUe=t=>{var e,{table:n}=t,r=Ah(t,["table"]);const{getState:i,options:{icons:{IconMinimize:o,IconMaximize:s},localization:a},setIsFullScreen:l}=n,{isFullScreen:c}=i(),u=()=>{l(!c)};return I.jsx(tr,{withinPortal:!0,withArrow:!0,label:(e=r?.title)!==null&&e!==void 0?e:a.toggleFullScreen,children:I.jsx(An,Object.assign({"aria-label":a.showHideFilters,onClick:u,size:"lg"},r,{title:void 0,children:c?I.jsx(o,{}):I.jsx(s,{})}))})},EUe=({column:t,table:e})=>{const{options:{icons:{IconPinned:n,IconPinnedOff:r},localization:i}}=e,o=s=>{t.pin(s)};return I.jsx(er,{sx:{minWidth:"70px",alignContent:"center",justifyContent:"center"},children:t.getIsPinned()?I.jsx(tr,{withinPortal:!0,withArrow:!0,label:i.unpin,children:I.jsx(An,{onClick:()=>o(!1),size:"md",children:I.jsx(r,{})})}):I.jsxs(I.Fragment,{children:[I.jsx(tr,{withinPortal:!0,withArrow:!0,label:i.pinToLeft,children:I.jsx(An,{onClick:()=>o("left"),size:"md",children:I.jsx(n,{style:{transform:"rotate(90deg)"}})})}),I.jsx(tr,{withinPortal:!0,withArrow:!0,label:i.pinToRight,children:I.jsx(An,{onClick:()=>o("right"),size:"md",children:I.jsx(n,{style:{transform:"rotate(-90deg)"}})})})]})})},YA=({actionIconProps:t,onDragEnd:e,onDragStart:n,table:r})=>{var i;const{options:{icons:{IconGripHorizontal:o},localization:s}}=r;return I.jsx(tr,{withinPortal:!0,withArrow:!0,openDelay:1e3,position:"top",label:(i=t?.title)!==null&&i!==void 0?i:s.move,children:I.jsx(An,Object.assign({draggable:"true",size:"sm"},t,{onClick:a=>{var l;a.stopPropagation(),(l=t?.onClick)===null||l===void 0||l.call(t,a)},onDragStart:n,onDragEnd:e,sx:a=>Object.assign({cursor:"grab",margin:"0 -0.16px",opacity:.5,padding:"2px",transition:"opacity 100ms ease-in-out","&:hover":{backgroundColor:"transparent",opacity:1},"&:active":{cursor:"grabbing"}},t?.sx instanceof Function?t?.sx(a):t?.sx),title:void 0,children:I.jsx(o,{})}))})},JK=({allColumns:t,hoveredColumn:e,setHoveredColumn:n,column:r,isSubMenu:i,table:o})=>{var s;const{getState:a,options:{enableColumnOrdering:l,enableHiding:c,enablePinning:u,localization:d},setColumnOrder:f}=o,{columnOrder:h}=a(),{columnDef:g}=r,{columnDefType:y}=g,_=y!=="group"&&r.getIsVisible()||y==="group"&&r.getLeafColumns().some(R=>R.getIsVisible()),v=R=>{var T,A;y==="group"?(A=(T=R?.columns)===null||T===void 0?void 0:T.forEach)===null||A===void 0||A.call(T,F=>{F.toggleVisibility(!_)}):R.toggleVisibility()},x=M.useRef(null),[w,S]=M.useState(!1),E=R=>{S(!0),R.dataTransfer.setDragImage(x.current,0,0)},C=R=>{S(!1),n(null),e&&f(FK(r,e,h))},O=R=>{!w&&g.enableColumnOrdering!==!1&&n(r)};return I.jsxs(I.Fragment,{children:[I.jsx(cn.Item,{component:"span",ref:x,onDragEnter:O,sx:R=>({alignItems:"center",cursor:"default",justifyContent:"flex-start",opacity:w?.5:1,outline:w?`1px dashed ${R.colors.gray[7]}`:e?.id===r.id?`2px dashed ${gl(R)}`:"none",paddingLeft:`${(r.depth+.5)*2}rem`,paddingTop:"6px",paddingBottom:"6px"}),children:I.jsxs(Xe,{sx:{display:"flex",flexWrap:"nowrap",gap:"8px"},children:[!i&&y!=="group"&&l&&!t.some(R=>R.columnDef.columnDefType==="group")&&(g.enableColumnOrdering!==!1?I.jsx(YA,{onDragEnd:C,onDragStart:E,table:o}):I.jsx(Xe,{sx:{width:"22px"}})),!i&&u&&(r.getCanPin()?I.jsx(EUe,{column:r,table:o}):I.jsx(Xe,{sx:{width:"70px"}})),c?I.jsx(tr,{withinPortal:!0,withArrow:!0,openDelay:1e3,label:d.toggleVisibility,children:I.jsx(yb,{checked:_,disabled:i&&_||!r.getCanHide(),label:g.header,onChange:()=>v(r),sx:{cursor:"pointer !important"}})}):I.jsx(Si,{sx:{alignSelf:"center"},children:g.header})]})}),(s=r.columns)===null||s===void 0?void 0:s.map((R,T)=>I.jsx(JK,{allColumns:t,column:R,hoveredColumn:e,isSubMenu:i,setHoveredColumn:n,table:o},`${T}-${R.id}`))]})},PUe=({isSubMenu:t,table:e})=>{const{getAllColumns:n,getAllLeafColumns:r,getCenterLeafColumns:i,getIsAllColumnsVisible:o,getIsSomeColumnsPinned:s,getIsSomeColumnsVisible:a,getLeftLeafColumns:l,getRightLeafColumns:c,getState:u,toggleAllColumnsVisible:d,options:{enableColumnOrdering:f,enableHiding:h,enablePinning:g,localization:y}}=e,{columnOrder:_,columnPinning:v}=u(),x=()=>{r().filter(C=>C.columnDef.enableHiding!==!1).forEach(C=>C.toggleVisibility(!1))},w=M.useMemo(()=>{const C=n();return _.length>0&&!C.some(O=>O.columnDef.columnDefType==="group")?[...l(),...Array.from(new Set(_)).map(O=>i().find(R=>R?.id===O)),...c()].filter(Boolean):C},[_,v,n(),i(),l(),c()]),[S,E]=M.useState(null);return I.jsxs(cn.Dropdown,{sx:{maxHeight:"calc(80vh - 100px)",overflowY:"auto"},children:[I.jsxs(er,{sx:{justifyContent:t?"center":"space-between",padding:"8px",gap:"8px"},children:[!t&&h&&I.jsx(Ds,{disabled:!a(),onClick:x,variant:"subtle",children:y.hideAll}),!t&&f&&I.jsx(Ds,{onClick:()=>e.setColumnOrder(zK(e.options)),variant:"subtle",children:y.resetOrder}),!t&&g&&I.jsx(Ds,{disabled:!s(),onClick:()=>e.resetColumnPinning(!0),variant:"subtle",children:y.unpinAll}),h&&I.jsx(Ds,{disabled:o(),onClick:()=>d(!0),variant:"subtle",children:y.showAll})]}),I.jsx(mg,{}),w.map((C,O)=>I.jsx(JK,{allColumns:w,column:C,hoveredColumn:S,isSubMenu:t,setHoveredColumn:E,table:e},`${O}-${C.id}`))]})},CUe=t=>{var e,{table:n}=t,r=Ah(t,["table"]);const{options:{icons:{IconColumns:i},localization:o}}=n;return I.jsxs(cn,{closeOnItemClick:!1,withinPortal:!0,children:[I.jsx(tr,{withinPortal:!0,withArrow:!0,label:(e=r?.title)!==null&&e!==void 0?e:o.showHideColumns,children:I.jsx(cn.Target,{children:I.jsx(An,Object.assign({"aria-label":o.showHideColumns,size:"lg"},r,{title:void 0,children:I.jsx(i,{})}))})}),I.jsx(PUe,{table:n})]})},sC=["xs","md","xl"],TUe=t=>{var e,{table:n}=t,r=Ah(t,["table"]);const{getState:i,options:{icons:{IconBaselineDensityLarge:o,IconBaselineDensityMedium:s,IconBaselineDensitySmall:a},localization:l},setDensity:c}=n,{density:u}=i(),d=()=>{var f;c((f=sC[(sC.indexOf(u)-1)%sC.length])!==null&&f!==void 0?f:"xl")};return I.jsx(tr,{withinPortal:!0,withArrow:!0,label:(e=r?.title)!==null&&e!==void 0?e:l.toggleDensity,children:I.jsx(An,Object.assign({"aria-label":l.toggleDensity,onClick:d,size:"lg"},r,{title:void 0,children:u==="xs"?I.jsx(a,{}):u==="md"?I.jsx(s,{}):I.jsx(o,{})}))})},OUe=t=>{var e,{table:n}=t,r=Ah(t,["table"]);const{getState:i,options:{icons:{IconFilter:o,IconFilterOff:s},localization:a},setShowColumnFilters:l}=n,{showColumnFilters:c}=i(),u=()=>{l(!c)};return I.jsx(tr,{withinPortal:!0,withArrow:!0,label:(e=r?.title)!==null&&e!==void 0?e:a.showHideFilters,children:I.jsx(An,Object.assign({"aria-label":a.showHideFilters,onClick:u,size:"lg"},r,{title:void 0,children:c?I.jsx(s,{}):I.jsx(o,{})}))})},RUe=t=>{var e,n,{table:r}=t,i=Ah(t,["table"]);const{getState:o,options:{icons:{IconSearch:s,IconSearchOff:a},localization:l},refs:{searchInputRef:c},setShowGlobalFilter:u}=r,{globalFilter:d,showGlobalFilter:f}=o(),h=()=>{u(!f),setTimeout(()=>{var g;return(g=c.current)===null||g===void 0?void 0:g.focus()},100)};return I.jsx(tr,{withinPortal:!0,withArrow:!0,label:(e=i?.title)!==null&&e!==void 0?e:l.showHideSearch,children:I.jsx(An,Object.assign({"aria-label":(n=i?.title)!==null&&n!==void 0?n:l.showHideSearch,disabled:!!d,onClick:h,size:"lg"},i,{title:void 0,children:f?I.jsx(a,{}):I.jsx(s,{})}))})},AUe=({table:t})=>{var e;const{options:{enableColumnFilters:n,enableColumnOrdering:r,enableDensityToggle:i,enableFilters:o,enableFullScreenToggle:s,enableGlobalFilter:a,enableHiding:l,enablePinning:c,initialState:u,renderToolbarInternalActions:d}}=t;return I.jsx(er,{sx:{alignItems:"center",gap:"2px",zIndex:3},children:(e=d?.({table:t}))!==null&&e!==void 0?e:I.jsxs(I.Fragment,{children:[o&&a&&!u?.showGlobalFilter&&I.jsx(RUe,{table:t}),o&&n&&I.jsx(OUe,{table:t}),(l||r||c)&&I.jsx(CUe,{table:t}),i&&I.jsx(TUe,{table:t}),s&&I.jsx(MUe,{table:t})]})})},eQ=({table:t})=>{const{getState:e,options:{enableGrouping:n,localization:r},setHoveredColumn:i,setShowToolbarDropZone:o}=t,{draggingColumn:s,hoveredColumn:a,grouping:l,showToolbarDropZone:c}=e(),u=d=>{i({id:"drop-zone"})};return M.useEffect(()=>{var d;((d=t.options.state)===null||d===void 0?void 0:d.showToolbarDropZone)!==void 0&&o(!!n&&!!s&&s.columnDef.enableGrouping!==!1&&!l.includes(s.id))},[n,s,l]),I.jsx(zc,{mounted:c,transition:"fade",children:d=>{var f,h;return I.jsx(er,{className:"mantine-ToolbarDropZone",sx:g=>({alignItems:"center",backgroundColor:g.fn.rgba(gl(g),a?.id==="drop-zone"?.2:.1),border:`dashed ${gl(g)} 2px`,justifyContent:"center",height:"calc(100%)",position:"absolute",width:"calc(100%)",zIndex:2}),onDragEnter:u,style:d,children:I.jsx(Si,{children:r.dropToGroupBy.replace("{column}",(h=(f=s?.columnDef)===null||f===void 0?void 0:f.header)!==null&&h!==void 0?h:"")})})}})},tQ=({theme:t})=>({alignItems:"flex-start",backgroundColor:t.colorScheme==="dark"?t.colors.dark[7]:t.white,backgroundImage:"none",display:"grid",flexWrap:"wrap-reverse",minHeight:"3.5rem",overflow:"visible",padding:"0 !important",transition:"all 100ms ease-in-out",zIndex:3}),DUe=({table:t})=>{var e;const{getState:n,options:{enableGlobalFilter:r,enablePagination:i,enableToolbarInternalActions:o,mantineTopToolbarProps:s,positionGlobalFilter:a,positionPagination:l,positionToolbarAlertBanner:c,positionToolbarDropZone:u,renderTopToolbarCustomActions:d},refs:{topToolbarRef:f}}=t,{isFullScreen:h,showGlobalFilter:g}=n(),y=rb("(max-width: 720px)"),_=s instanceof Function?s({table:t}):s,v=y||!!d||g;return I.jsxs(Xe,Object.assign({},_,{ref:x=>{x&&(f.current=x,_?.ref&&(_.ref.current=x))},sx:x=>Object.assign(Object.assign({position:h?"sticky":"relative",top:h?"0":void 0},tQ({theme:x})),_?.sx instanceof Function?_.sx(x):_?.sx),children:[c==="top"&&I.jsx(QK,{stackAlertBanner:v,table:t}),["both","top"].includes(u??"")&&I.jsx(eQ,{table:t}),I.jsxs(er,{sx:{alignItems:"flex-start",boxSizing:"border-box",justifyContent:"space-between",padding:"8px",position:v?"relative":"absolute",right:0,top:0,width:"100%"},children:[r&&a==="left"&&I.jsx(oC,{table:t}),(e=d?.({table:t}))!==null&&e!==void 0?e:I.jsx("span",{}),o?I.jsxs(er,{sx:{flexWrap:"wrap-reverse",justifyContent:"flex-end"},children:[r&&a==="right"&&I.jsx(oC,{table:t}),I.jsx(AUe,{table:t})]}):r&&a==="right"&&I.jsx(oC,{table:t})]}),i&&["top","both"].includes(l??"")&&I.jsx(er,{justify:"end",children:I.jsx(KK,{table:t,position:"top"})}),I.jsx(qK,{isTopToolbar:!0,table:t})]}))},IUe=({table:t})=>{const{getState:e,options:{enablePagination:n,mantineBottomToolbarProps:r,positionPagination:i,positionToolbarAlertBanner:o,positionToolbarDropZone:s,renderBottomToolbarCustomActions:a},refs:{bottomToolbarRef:l}}=t,{isFullScreen:c}=e(),u=rb("(max-width: 720px)"),d=r instanceof Function?r({table:t}):r,f=u||!!a;return I.jsxs(Xe,Object.assign({},d,{ref:h=>{h&&(l.current=h,d?.ref&&(d.ref.current=h))},sx:h=>Object.assign(Object.assign(Object.assign({},tQ({theme:h})),{bottom:c?"0":void 0,boxShadow:`0 1px 2px -1px ${h.fn.rgba(h.black,.1)} inset`,left:0,position:c?"fixed":"relative",right:0}),d?.sx instanceof Function?d.sx(h):d?.sx),children:[I.jsx(qK,{isTopToolbar:!1,table:t}),o==="bottom"&&I.jsx(QK,{stackAlertBanner:f,table:t}),["both","bottom"].includes(s??"")&&I.jsx(eQ,{table:t}),I.jsxs(Xe,{sx:{alignItems:"center",boxSizing:"border-box",display:"flex",justifyContent:"space-between",padding:"8px",width:"100%"},children:[a?a({table:t}):I.jsx("span",{}),I.jsx(Xe,{sx:{display:"flex",justifyContent:"flex-end",position:f?"relative":"absolute",right:0,top:0},children:n&&["bottom","both"].includes(i??"")&&I.jsx(KK,{table:t,position:"bottom"})})]})]}))},LUe=({header:t,table:e})=>{var n,r,i,o,s,a,l,c,u,d;const{getState:f,toggleAllColumnsVisible:h,setColumnOrder:g,options:{enableColumnFilters:y,enableColumnResizing:_,enableGrouping:v,enableHiding:x,enablePinning:w,enableSorting:S,enableSortingRemoval:E,icons:{IconArrowAutofitContent:C,IconBoxMultiple:O,IconClearAll:R,IconColumns:T,IconDotsVertical:A,IconEyeOff:F,IconFilter:N,IconFilterOff:U,IconPinned:k,IconPinnedOff:z,IconSortAscending:G,IconSortDescending:W},localization:B,mantineColumnActionsButtonProps:j,renderColumnActionsMenuItems:$},refs:{filterInputRefs:q},setColumnSizingInfo:K,setShowColumnFilters:re}=e,{column:J}=t,{columnDef:le}=J,{columnSizing:ae,columnVisibility:oe}=f(),De=j instanceof Function?j({column:J,table:e}):j,Te=le.mantineColumnActionsButtonProps instanceof Function?le.mantineColumnActionsButtonProps({column:J,table:e}):le.mantineColumnActionsButtonProps,ve=Object.assign(Object.assign({},De),Te),we=()=>{J.clearSorting()},me=()=>{J.toggleSorting(!1)},se=()=>{J.toggleSorting(!0)},de=()=>{K(ht=>Object.assign(Object.assign({},ht),{isResizingColumn:!1})),J.resetSize()},ke=()=>{J.toggleVisibility(!1)},Ve=ht=>{J.pin(ht)},Ze=()=>{J.toggleGrouping(),g(ht=>["mrt-row-expand",...ht])},ot=()=>{J.setFilterValue("")},dt=()=>{re(!0),setTimeout(()=>{var ht;return(ht=q.current[`${J.id}-0`])===null||ht===void 0?void 0:ht.focus()},100)},We=()=>{h(!0)};return I.jsxs(cn,{closeOnItemClick:!0,withinPortal:!0,children:[I.jsx(tr,{withinPortal:!0,withArrow:!0,openDelay:1e3,position:"top",label:(n=ve?.title)!==null&&n!==void 0?n:B.columnActions,children:I.jsx(cn.Target,{children:I.jsx(An,Object.assign({"aria-label":B.columnActions,size:"sm"},ve,{sx:ht=>Object.assign({opacity:.5,transition:"opacity 100ms","&:hover":{opacity:1}},ve?.sx instanceof Function?ve.sx(ht):ve?.sx),children:I.jsx(A,{})}))})}),I.jsx(cn.Dropdown,{children:(o=(i=(r=le.renderColumnActionsMenuItems)===null||r===void 0?void 0:r.call(le,{column:J,table:e}))!==null&&i!==void 0?i:$?.({column:J,table:e}))!==null&&o!==void 0?o:I.jsxs(I.Fragment,{children:[S&&J.getCanSort()&&I.jsxs(I.Fragment,{children:[E!==!1&&I.jsx(cn.Item,{disabled:!J.getIsSorted(),icon:I.jsx(R,{}),onClick:we,children:B.clearSort}),I.jsx(cn.Item,{disabled:J.getIsSorted()==="asc",icon:I.jsx(G,{}),onClick:me,children:(s=B.sortByColumnAsc)===null||s===void 0?void 0:s.replace("{column}",String(le.header))}),I.jsx(cn.Item,{icon:I.jsx(W,{}),disabled:J.getIsSorted()==="desc",onClick:se,children:(a=B.sortByColumnDesc)===null||a===void 0?void 0:a.replace("{column}",String(le.header))}),(y||v||x)&&I.jsx(cn.Divider,{},3)]}),y&&J.getCanFilter()&&I.jsxs(I.Fragment,{children:[I.jsx(cn.Item,{disabled:!J.getFilterValue(),icon:I.jsx(U,{}),onClick:ot,children:B.clearFilter}),I.jsx(cn.Item,{icon:I.jsx(N,{}),onClick:dt,children:(l=B.filterByColumn)===null||l===void 0?void 0:l.replace("{column}",String(le.header))}),(v||x)&&I.jsx(cn.Divider,{},2)]}),v&&J.getCanGroup()&&I.jsxs(I.Fragment,{children:[I.jsx(cn.Item,{icon:I.jsx(O,{}),onClick:Ze,children:(c=B[J.getIsGrouped()?"ungroupByColumn":"groupByColumn"])===null||c===void 0?void 0:c.replace("{column}",String(le.header))}),w&&I.jsx(cn.Divider,{})]}),w&&J.getCanPin()&&I.jsxs(I.Fragment,{children:[I.jsx(cn.Item,{disabled:J.getIsPinned()==="left"||!J.getCanPin(),icon:I.jsx(k,{style:{transform:"rotate(90deg)"}}),onClick:()=>Ve("left"),children:B.pinToLeft}),I.jsx(cn.Item,{disabled:J.getIsPinned()==="right"||!J.getCanPin(),icon:I.jsx(k,{style:{transform:"rotate(-90deg)"}}),onClick:()=>Ve("right"),children:B.pinToRight}),I.jsx(cn.Item,{disabled:!J.getIsPinned(),icon:I.jsx(z,{}),onClick:()=>Ve(!1),children:B.unpin}),x&&I.jsx(cn.Divider,{})]}),_&&J.getCanResize()&&I.jsx(cn.Item,{disabled:!ae[J.id],icon:I.jsx(C,{}),onClick:de,children:B.resetColumnSize},0),x&&I.jsxs(I.Fragment,{children:[I.jsx(cn.Item,{disabled:!J.getCanHide(),icon:I.jsx(F,{}),onClick:ke,children:(u=B.hideColumn)===null||u===void 0?void 0:u.replace("{column}",String(le.header))},0),I.jsx(cn.Item,{disabled:!Object.values(oe).filter(ht=>!ht).length,icon:I.jsx(T,{}),onClick:We,children:(d=B.showAllColumns)===null||d===void 0?void 0:d.replace("{column}",String(le.header))},1)]})]})})]})},VT=({header:t,rangeFilterIndex:e,table:n})=>{var r,i,o,s,a,l,c,u;const{options:{columnFilterModeOptions:d,icons:{IconX:f},localization:h,mantineFilterDateInputProps:g,mantineFilterMultiSelectProps:y,mantineFilterSelectProps:_,mantineFilterTextInputProps:v,manualFiltering:x},refs:{filterInputRefs:w},setColumnFilterFns:S}=n,{column:E}=t,{columnDef:C}=E,O=v instanceof Function?v({column:E,table:n,rangeFilterIndex:e}):v,R=C.mantineFilterTextInputProps instanceof Function?C.mantineFilterTextInputProps({column:E,table:n,rangeFilterIndex:e}):C.mantineFilterTextInputProps,T=Object.assign(Object.assign({},O),R),A=_ instanceof Function?_({column:E,table:n,rangeFilterIndex:e}):_,F=C.mantineFilterSelectProps instanceof Function?C.mantineFilterSelectProps({column:E,table:n,rangeFilterIndex:e}):C.mantineFilterSelectProps,N=Object.assign(Object.assign({},A),F),U=y instanceof Function?y({column:E,table:n,rangeFilterIndex:e}):y,k=C.mantineFilterMultiSelectProps instanceof Function?C.mantineFilterMultiSelectProps({column:E,table:n,rangeFilterIndex:e}):C.mantineFilterMultiSelectProps,z=Object.assign(Object.assign({},U),k),G=g instanceof Function?g({column:E,table:n,rangeFilterIndex:e}):g,W=C.mantineFilterDateInputProps instanceof Function?C.mantineFilterDateInputProps({column:E,table:n,rangeFilterIndex:e}):C.mantineFilterDateInputProps,B=Object.assign(Object.assign({},G),W),j=C.filterVariant==="range"||C.filterVariant==="date-range"||e!==void 0,$=C.filterVariant==="select",q=C.filterVariant==="multi-select",K=C.filterVariant==="date"||C.filterVariant==="date-range",re=(r=C?.columnFilterModeOptions)!==null&&r!==void 0?r:d,J=C._filterFn,le=["empty","notEmpty"].includes(J)?h[`filter${((o=(i=J?.charAt)===null||i===void 0?void 0:i.call(J,0))===null||o===void 0?void 0:o.toUpperCase())+J?.slice(1)}`]:"",ae=j?e===0?h.min:e===1?h.max:"":(s=T?.placeholder)!==null&&s!==void 0?s:(a=h.filterByColumn)===null||a===void 0?void 0:a.replace("{column}",String(C.header)),oe=M.useRef(!1),[De,Te]=M.useState(()=>{var de,ke;return q?E.getFilterValue()||[]:j?((de=E.getFilterValue())===null||de===void 0?void 0:de[e])||"":(ke=E.getFilterValue())!==null&&ke!==void 0?ke:""}),[ve]=oW(De,x?400:200);M.useEffect(()=>{oe.current&&(j?E.setFilterValue(de=>{const ke=Array.isArray(de)?de:["",""];return ke[e]=ve,ke}):E.setFilterValue(ve??void 0))},[ve]),M.useEffect(()=>{if(!oe.current){oe.current=!0;return}const de=E.getFilterValue();de===void 0?we():Te(j&&e!==void 0?(de??["",""])[e]:de??"")},[E.getFilterValue()]);const we=()=>{q?(Te([]),E.setFilterValue([])):j?(Te(""),E.setFilterValue(de=>{const ke=de??["",""];return ke[e]=void 0,ke})):(Te(""),E.setFilterValue(void 0))};if(C.Filter)return I.jsx(I.Fragment,{children:(l=C.Filter)===null||l===void 0?void 0:l.call(C,{column:E,header:t,rangeFilterIndex:e,table:n})});const me=()=>{Te(""),E.setFilterValue(void 0),S(de=>{var ke;return Object.assign(Object.assign({},de),{[t.id]:(ke=re?.[0])!==null&&ke!==void 0?ke:"fuzzy"})})},se={disabled:!!le,placeholder:ae,title:ae,onClick:de=>de.stopPropagation(),onChange:Te,value:De,variant:"unstyled",sx:de=>Object.assign({borderBottom:`2px solid ${de.colors.gray[de.colorScheme==="dark"?7:3]}`,minWidth:K?"125px":j?"80px":le?"auto":"100px",width:"100%","& .mantine-TextInput-input":{overflow:"hidden",textOverflow:"ellipsis"},"& .mantine-DateInput-input":{height:"2.1rem"}},Ch(q?z.sx:$?N.sx:K?B.sx:T?.sx))};return le?I.jsx(Xe,{sx:se.sx,children:I.jsxs(mb,{onClick:me,sx:{margin:"4px"},children:[le," ",I.jsx(f,{size:"12pt",style:{transform:"translate(6px, 3px)"}})]})}):q?I.jsx(eZ,Object.assign({},se,{data:z.data,searchable:!0,withinPortal:!0},z,{ref:de=>{de&&(w.current[`${E.id}-${e??0}`]=de,z.ref&&(z.ref.current=de))},sx:se.sx})):$?I.jsx(iv,Object.assign({},se,{clearable:!0,data:N.data,searchable:!0,withinPortal:!0},N,{ref:de=>{de&&(w.current[`${E.id}-${e??0}`]=de,N.ref&&(N.ref.current=de))},sx:se.sx})):K?I.jsx(LK,Object.assign({},se,{allowDeselect:!0,clearable:!0,popoverProps:{withinPortal:!0}},B,{ref:de=>{de&&(w.current[`${E.id}-${e??0}`]=de,B.ref&&(B.ref.current=de))},sx:se.sx})):I.jsx(Pc,Object.assign({},se,{rightSection:!le&&(!((c=De?.toString())===null||c===void 0)&&c.length)?I.jsx(An,{"aria-label":h.clearFilter,onClick:we,size:"sm",sx:{"&:disabled":{backgroundColor:"transparent",border:"none"}},title:(u=h.clearFilter)!==null&&u!==void 0?u:"",children:I.jsx(f,{})}):null,onChange:de=>Te(de.target.value)},T,{ref:de=>{de&&(w.current[`${E.id}-${e??0}`]=de,T.ref&&(T.ref.current=de))},sx:se.sx}))},kUe=({header:t,table:e})=>I.jsxs(Xe,{sx:{display:"grid",gridTemplateColumns:"6fr 6fr",gap:"16px"},children:[I.jsx(VT,{header:t,rangeFilterIndex:0,table:e}),I.jsx(VT,{header:t,rangeFilterIndex:1,table:e})]}),NUe=({column:t,table:e})=>{var n,r,i;const{getState:o,options:{localization:s,mantineFilterCheckboxProps:a}}=e,{density:l}=o(),{columnDef:c}=t,u=a instanceof Function?a({column:t,table:e}):a,d=c.mantineFilterCheckboxProps instanceof Function?c.mantineFilterCheckboxProps({column:t,table:e}):c.mantineFilterCheckboxProps,f=Object.assign(Object.assign({},u),d),h=(n=s.filterByColumn)===null||n===void 0?void 0:n.replace("{column}",c.header);return I.jsx(tr,{withinPortal:!0,withArrow:!0,openDelay:1e3,label:(r=f?.title)!==null&&r!==void 0?r:h,children:I.jsx(nv,Object.assign({checked:t.getFilterValue()==="true",indeterminate:t.getFilterValue()===void 0,color:t.getFilterValue()===void 0?"default":"primary",size:l==="xs"?"sm":"md",label:(i=f.title)!==null&&i!==void 0?i:h},f,{onClick:g=>{var y;g.stopPropagation(),(y=f?.onClick)===null||y===void 0||y.call(f,g)},onChange:g=>{var y;t.setFilterValue(t.getFilterValue()===void 0?"true":t.getFilterValue()==="true"?"false":void 0),(y=f?.onChange)===null||y===void 0||y.call(f,g)},sx:g=>Object.assign({fontWeight:"normal",marginTop:"8px"},f?.sx instanceof Function?f.sx(g):f?.sx),title:void 0}))})},FUe=({header:t,table:e})=>{var n,r;const{getState:i,options:{enableColumnFilterModes:o,columnFilterModeOptions:s,icons:{IconFilter:a},localization:l}}=e,{showColumnFilters:c}=i(),{column:u}=t,{columnDef:d}=u,f=d._filterFn,h=(n=d?.columnFilterModeOptions)!==null&&n!==void 0?n:s,g=o&&d.enableColumnFilterModes!==!1&&(h===void 0||!!h?.length);return I.jsx(ud,{in:c,children:I.jsxs(er,{direction:"column",children:[I.jsxs(er,{align:"flex-end",children:[d.filterVariant==="checkbox"?I.jsx(NUe,{column:u,table:e}):d.filterVariant==="range"||d.filterVariant==="date-range"||["between","betweenInclusive","inNumberRange"].includes(d._filterFn)?I.jsx(kUe,{header:t,table:e}):I.jsx(VT,{header:t,table:e}),g&&I.jsxs(cn,{withinPortal:!0,children:[I.jsx(tr,{label:l.changeFilterMode,position:"bottom-start",withArrow:!0,withinPortal:!0,children:I.jsx(cn.Target,{children:I.jsx(An,{"aria-label":l.changeFilterMode,size:"md",sx:{transform:"translateY(-2px)"},children:I.jsx(a,{})})})}),I.jsx(ZK,{header:t,table:e})]})]}),g?I.jsx(Si,{component:"label",color:"dimmed",sx:{whiteSpace:"nowrap",marginTop:"4px",fontSize:"10px"},children:l.filterMode.replace("{filterType}",l[`filter${((r=f?.charAt(0))===null||r===void 0?void 0:r.toUpperCase())+f?.slice(1)}`])}):null]})})},zUe=({header:t,table:e})=>{var n,r,i;const{options:{icons:{IconFilter:o},localization:s},refs:{filterInputRefs:a},setShowColumnFilters:l}=e,{column:c}=t,{columnDef:u}=c,d=u.filterVariant==="range"||["between","betweenInclusive","inNumberRange"].includes(u._filterFn),f=u._filterFn,h=s.filteringByColumn.replace("{column}",String(u.header)).replace("{filterType}",s[`filter${((n=f?.charAt(0))===null||n===void 0?void 0:n.toUpperCase())+f?.slice(1)}`]).replace("{filterValue}",`"${Array.isArray(c.getFilterValue())?c.getFilterValue().join(`" ${d?s.and:s.or} "`):c.getFilterValue()}"`).replace('" "',"");return I.jsx(zc,{transition:"scale",mounted:!!c.getFilterValue()&&!d||d&&(!!(!((r=c.getFilterValue())===null||r===void 0)&&r[0])||!!(!((i=c.getFilterValue())===null||i===void 0)&&i[1])),children:g=>I.jsx(Xe,{component:"span",sx:{flex:"0 0"},style:g,children:I.jsx(tr,{withinPortal:!0,withArrow:!0,position:"top",label:h,children:I.jsx(An,{onClick:y=>{l(!0),setTimeout(()=>{var _,v;(_=a.current[`${c.id}-0`])===null||_===void 0||_.focus(),(v=a.current[`${c.id}-0`])===null||v===void 0||v.select()},100),y.stopPropagation()},size:"sm",sx:{opacity:.5,padding:"2px","&:hover":{opacity:1}},children:I.jsx(o,{})})})})})},UUe=({column:t,table:e,tableHeadCellRef:n})=>{const{getState:r,options:{enableColumnOrdering:i,mantineColumnDragHandleProps:o},setColumnOrder:s,setDraggingColumn:a,setHoveredColumn:l}=e,{columnDef:c}=t,{hoveredColumn:u,draggingColumn:d,columnOrder:f}=r(),h=o instanceof Function?o({column:t,table:e}):o,g=c.mantineColumnDragHandleProps instanceof Function?c.mantineColumnDragHandleProps({column:t,table:e}):c.mantineColumnDragHandleProps,y=Object.assign(Object.assign({},h),g),_=x=>{var w;(w=y?.onDragStart)===null||w===void 0||w.call(y,x),a(t),x.dataTransfer.setDragImage(n.current,0,0)},v=x=>{var w;(w=y?.onDragEnd)===null||w===void 0||w.call(y,x),u?.id==="drop-zone"?t.toggleGrouping():i&&u&&u?.id!==d?.id&&s(FK(t,u,f)),a(null),l(null)};return I.jsx(YA,{actionIconProps:y,onDragStart:_,onDragEnd:v,table:e})},BUe=({header:t,table:e})=>{var n;const{getState:r,options:{columnResizeMode:i},setColumnSizingInfo:o}=e,{density:s}=r(),{column:a}=t;return I.jsx(Xe,{onDoubleClick:()=>{o(l=>Object.assign(Object.assign({},l),{isResizingColumn:!1})),a.resetSize()},onMouseDown:t.getResizeHandler(),onTouchStart:t.getResizeHandler(),sx:l=>({cursor:"col-resize",marginRight:s==="xl"?"-24px":s==="md"?"-20px":"-14px",position:"absolute",right:"4px",paddingLeft:"1px",paddingRight:"1px","&:active > .mantine-Divider-vertical":{borderLeftColor:gl(l)}}),style:{transform:a.getIsResizing()&&i==="onEnd"?`translateX(${(n=r().columnSizingInfo.deltaOffset)!==null&&n!==void 0?n:0}px)`:void 0},children:I.jsx(mg,{orientation:"vertical",size:"lg",sx:{borderRadius:"2px",borderWidth:"4px",height:"24px",touchAction:"none",transition:a.getIsResizing()?void 0:"all 100ms ease-in-out",userSelect:"none",zIndex:4}})})},HUe=({header:t,table:e})=>{const{getState:n,options:{icons:{IconSortDescending:r,IconSortAscending:i,IconArrowsSort:o},localization:s}}=e,{column:a}=t,{columnDef:l}=a,{sorting:c}=n(),u=a.getIsSorted()?a.getIsSorted()==="desc"?s.sortedByColumnDesc.replace("{column}",l.header):s.sortedByColumnAsc.replace("{column}",l.header):s.unsorted,d=c.length>=2&&a.getSortIndex()!==-1;return I.jsx(tr,{withinPortal:!0,withArrow:!0,position:"top",label:u,children:I.jsx(hX,{color:"transparent",disabled:!d,inline:!0,label:a.getSortIndex()+1,offset:3,children:I.jsx(An,{"aria-label":u,size:"xs",sx:{opacity:a.getIsSorted()?1:.5,transform:d?"translate(-2px, 2px) scale(0.9)":void 0,transition:"opacity 100ms ease-in-out","&:hover":{opacity:1}},children:a.getIsSorted()==="desc"?I.jsx(r,{}):a.getIsSorted()==="asc"?I.jsx(i,{}):I.jsx(o,{})})})})},VUe=({header:t,table:e})=>{var n,r,i,o;const s=Ir(),{getState:a,options:{enableColumnActions:l,enableColumnDragging:c,enableColumnOrdering:u,enableGrouping:d,enableMultiSort:f,layoutMode:h,mantineTableHeadCellProps:g},refs:{tableHeadCellRefs:y},setHoveredColumn:_}=e,{density:v,draggingColumn:x,grouping:w,hoveredColumn:S}=a(),{column:E}=t,{columnDef:C}=E,{columnDefType:O}=C,R=g instanceof Function?g({column:E,table:e}):g,T=C.mantineTableHeadCellProps instanceof Function?C.mantineTableHeadCellProps({column:E,table:e}):C.mantineTableHeadCellProps,A=Object.assign(Object.assign({},R),T),F=(l||C.enableColumnActions)&&C.enableColumnActions!==!1,N=c!==!1&&C.enableColumnDragging!==!1&&(c||u&&C.enableColumnOrdering!==!1||d&&C.enableGrouping!==!1&&!w.includes(E.id)),U=M.useMemo(()=>{let B=0;return E.getCanSort()&&B++,F&&(B+=1.75),N&&(B+=1.25),B},[F,N]),k=M.useMemo(()=>x?.id===E.id?`1px dashed ${s.colors.gray[7]} !important`:S?.id===E.id?`2px dashed ${gl(s)} !important`:void 0,[x,S]),z=k?{borderLeft:k,borderRight:k,borderTop:k}:void 0,G=B=>{d&&S?.id==="drop-zone"&&_(null),u&&x&&O!=="group"&&_(C.enableColumnOrdering!==!1?E:null)},W=C?.Header instanceof Function?(n=C?.Header)===null||n===void 0?void 0:n.call(C,{column:E,header:t,table:e}):(r=C?.Header)!==null&&r!==void 0?r:C.header;return I.jsxs(Xe,Object.assign({component:"th",align:O==="group"?"center":"left",colSpan:t.colSpan,onDragEnter:G,ref:B=>{B&&(y.current[E.id]=B)}},A,{sx:B=>Object.assign(Object.assign({flexDirection:h==="grid"?"column":void 0,fontWeight:"bold",overflow:"visible",padding:v==="xl"?"23px":v==="md"?"16px":"10px",userSelect:f&&E.getCanSort()?"none":void 0,verticalAlign:"top",zIndex:E.getIsResizing()||x?.id===E.id?3:E.getIsPinned()&&O!=="group"?2:1,"&:hover .mantine-ActionIcon-root":{opacity:1}},$A({column:E,header:t,table:e,tableCellProps:A,theme:B})),z),children:[t.isPlaceholder?null:I.jsxs(er,{className:"mantine-TableHeadCell-Content",sx:{alignItems:"flex-start",flexDirection:A?.align==="right"?"row-reverse":"row",justifyContent:O==="group"||A?.align==="center"?"center":E.getCanResize()?"space-between":"flex-start",position:"relative",width:"100%"},children:[I.jsxs(er,{className:"mantine-TableHeadCell-Content-Labels",onClick:E.getToggleSortingHandler(),sx:{alignItems:"center",cursor:E.getCanSort()&&O!=="group"?"pointer":void 0,flexDirection:A?.align==="right"?"row-reverse":"row",overflow:O==="data"?"hidden":void 0,paddingLeft:A?.align==="center"?`${U}rem`:void 0},children:[I.jsx(er,{className:"mantine-TableHeadCell-Content-Wrapper",sx:{overflow:O==="data"?"hidden":void 0,textOverflow:"ellipsis",whiteSpace:((o=(i=C.header)===null||i===void 0?void 0:i.length)!==null&&o!==void 0?o:0)<20?"nowrap":"normal"},title:O==="data"?C.header:void 0,children:W}),E.getCanSort()&&I.jsx(HUe,{header:t,table:e}),E.getCanFilter()&&I.jsx(zUe,{header:t,table:e})]}),O!=="group"&&I.jsxs(er,{className:"mantine-TableHeadCell-Content-Actions",sx:{alignItems:"center",alignSelf:"center",whiteSpace:"nowrap"},children:[N&&I.jsx(UUe,{column:E,table:e,tableHeadCellRef:{current:y.current[E.id]}}),F&&I.jsx(LUe,{header:t,table:e})]}),E.getCanResize()&&I.jsx(BUe,{header:t,table:e})]}),E.getCanFilter()&&I.jsx(FUe,{header:t,table:e})]}))},jUe=({headerGroup:t,table:e,virtualColumns:n,virtualPaddingLeft:r,virtualPaddingRight:i})=>{const{getState:o,options:{enableStickyHeader:s,layoutMode:a,mantineTableHeadRowProps:l}}=e,{isFullScreen:c}=o(),u=l instanceof Function?l({headerGroup:t,table:e}):l,d=s||c;return I.jsxs(Xe,Object.assign({component:"tr"},u,{sx:f=>Object.assign(Object.assign({backgroundColor:f.colorScheme==="dark"?f.colors.dark[7]:f.white,boxShadow:`4px 0 8px ${f.fn.rgba(f.black,.1)}`,display:a==="grid"?"flex":"table-row",top:d?0:void 0},u?.sx instanceof Function?u?.sx(f):u?.sx),{position:d?"sticky":void 0}),children:[r?I.jsx("th",{style:{display:"flex",width:r}}):null,(n??t.headers).map(f=>{const h=n?t.headers[f.index]:f;return I.jsx(VUe,{header:h,table:e},h.id)}),i?I.jsx("th",{style:{display:"flex",width:i}}):null]}))},$Ue=({table:t,virtualColumns:e,virtualPaddingLeft:n,virtualPaddingRight:r})=>{const{getHeaderGroups:i,getState:o,options:{enableStickyHeader:s,layoutMode:a,mantineTableHeadProps:l}}=t,{isFullScreen:c}=o(),u=l instanceof Function?l({table:t}):l,d=s||c;return I.jsx(Xe,Object.assign({component:"thead"},u,{sx:f=>Object.assign({display:a==="grid"?"grid":"table-row-group",position:d&&a==="grid"?"sticky":"relative",opacity:.97,top:d?0:void 0,zIndex:d?2:void 0},u?.sx instanceof Function?u?.sx(f):u?.sx),children:i().map(f=>I.jsx(jUe,{headerGroup:f,table:t,virtualColumns:e,virtualPaddingLeft:n,virtualPaddingRight:r},f.id))}))},nQ=({cell:t,table:e})=>{var n;const{getState:r,options:{editingMode:i,mantineEditTextInputProps:o,mantineEditSelectProps:s},refs:{editInputRefs:a},setEditingCell:l,setEditingRow:c}=e,{column:u,row:d}=t,{columnDef:f}=u,{editingRow:h}=r(),g=f.editVariant==="select",[y,_]=M.useState(()=>t.getValue()),v=o instanceof Function?o({cell:t,column:u,row:d,table:e}):o,x=f.mantineEditTextInputProps instanceof Function?f.mantineEditTextInputProps({cell:t,column:u,row:d,table:e}):f.mantineEditTextInputProps,w=Object.assign(Object.assign({},v),x),S=s instanceof Function?s({cell:t,column:u,row:d,table:e}):s,E=f.mantineEditSelectProps instanceof Function?f.mantineEditSelectProps({cell:t,column:u,row:d,table:e}):f.mantineEditSelectProps,C=Object.assign(Object.assign({},S),E),O=F=>{h&&c(Object.assign(Object.assign({},h),{_valuesCache:Object.assign(Object.assign({},h._valuesCache),{[u.id]:F})}))},R=F=>{var N;(N=w.onBlur)===null||N===void 0||N.call(w,F),O(y),l(null)},T=F=>{var N;F.key==="Enter"&&((N=a.current[u.id])===null||N===void 0||N.blur())};if(f.Edit)return I.jsx(I.Fragment,{children:(n=f.Edit)===null||n===void 0?void 0:n.call(f,{cell:t,column:u,row:d,table:e})});const A={disabled:(f.enableEditing instanceof Function?f.enableEditing(d):f.enableEditing)===!1,label:i==="modal"?u.columnDef.header:void 0,name:u.id,placeholder:f.header,value:y,variant:i==="table"?"unstyled":"default",onClick:F=>{var N;F.stopPropagation(),(N=w?.onClick)===null||N===void 0||N.call(w,F)}};return g?I.jsx(iv,Object.assign({},A,{searchable:!0,value:y,withinPortal:!0},C,{onBlur:R,onChange:F=>{var N;(N=C.onChange)===null||N===void 0||N.call(C,F),_(F)},onClick:F=>{var N;F.stopPropagation(),(N=C?.onClick)===null||N===void 0||N.call(C,F)},ref:F=>{F&&(a.current[u.id]=F,C.ref&&(C.ref.current=F))}})):I.jsx(Pc,Object.assign({},A,{onKeyDown:T,value:y??""},w,{onBlur:R,onChange:F=>{var N;(N=w.onChange)===null||N===void 0||N.call(w,F),_(F.target.value)},onClick:F=>{var N;F.stopPropagation(),(N=w?.onClick)===null||N===void 0||N.call(w,F)},ref:F=>{F&&(a.current[u.id]=F,w.ref&&(w.ref.current=F))}}))},GUe=({cell:t,children:e,table:n})=>{const{options:{localization:r,mantineCopyButtonProps:i}}=n,{column:o,row:s}=t,{columnDef:a}=o,l=i instanceof Function?i({cell:t,column:o,row:s,table:n}):i,c=a.mantineCopyButtonProps instanceof Function?a.mantineCopyButtonProps({cell:t,column:o,row:s,table:n}):a.mantineCopyButtonProps,u=Object.assign(Object.assign({},l),c);return I.jsx(VY,{value:t.getValue(),children:({copied:d,copy:f})=>{var h;return I.jsx(tr,{withinPortal:!0,withArrow:!0,openDelay:1e3,position:"top",label:(h=u?.title)!==null&&h!==void 0?h:d?r.copiedToClipboard:r.clickToCopy,children:I.jsx(Fs,Object.assign({},u,{onClick:g=>{g.stopPropagation(),f()},sx:g=>Object.assign({backgroundColor:"transparent",border:"none",borderRadius:"4px",color:"inherit",cursor:"copy",fontFamily:"inherit",fontSize:"inherit",fontWeight:"inherit",justifyContent:"inherit",letterSpacing:"inherit",margin:"-4px",minWidth:"unset",padding:"4px",textAlign:"inherit",textTransform:"inherit","&:active":{transform:"translateY(1px)"},"&:hover":{backgroundColor:g.fn.rgba(gl(g),.1)}},u?.sx instanceof Function?u.sx(g):u?.sx),title:void 0,children:e}))})}})},WUe=({cell:t,rowRef:e,table:n})=>{const{options:{mantineRowDragHandleProps:r}}=n,{row:i}=t,o=r instanceof Function?r({row:i,table:n}):r,s=l=>{var c;(c=o?.onDragStart)===null||c===void 0||c.call(o,l),l.dataTransfer.setDragImage(e.current,0,0),n.setDraggingRow(i)},a=l=>{var c;(c=o?.onDragEnd)===null||c===void 0||c.call(o,l),n.setDraggingRow(null),n.setHoveredRow(null)};return I.jsx(YA,{actionIconProps:o,onDragStart:s,onDragEnd:a,table:n})},aC=["string","number"],B6=({cell:t,table:e})=>{var n,r,i,o;const{getState:s,options:{enableFilterMatchHighlighting:a}}=e,{column:l,row:c}=t,{columnDef:u}=l,{globalFilter:d,globalFilterFn:f}=s(),h=l.getFilterValue();let g=t.getIsAggregated()&&u.AggregatedCell?u.AggregatedCell({cell:t,column:l,row:c,table:e}):c.getIsGrouped()&&!t.getIsGrouped()?null:t.getIsGrouped()&&u.GroupedCell?u.GroupedCell({cell:t,column:l,row:c,table:e}):void 0;const y=g!==void 0;if(y||(g=t.renderValue()),a&&u.enableFilterMatchHighlighting!==!1&&g&&aC.includes(typeof g)&&(h&&aC.includes(typeof h)&&u.filterVariant==="text"||d&&aC.includes(typeof d)&&l.getCanGlobalFilter())){const _=iC?.({text:g?.toString(),query:((r=(n=l.getFilterValue())!==null&&n!==void 0?n:d)!==null&&r!==void 0?r:"").toString(),matchExactly:(h?u._filterFn:f)!=="fuzzy"});(_?.length>1||!((i=_?.[0])===null||i===void 0)&&i.match)&&(g=I.jsx("span",{"aria-label":g,role:"note",children:(o=_?.map(({key:v,match:x,text:w})=>I.jsx(Xe,{"aria-hidden":"true",component:"span",sx:x?S=>({backgroundColor:S.colors.yellow[S.colorScheme==="dark"?9:5],borderRadius:"2px",color:S.colorScheme==="dark"?S.white:S.black,p:"2px 1px"}):void 0,children:w},v)))!==null&&o!==void 0?o:g}))}return u.Cell&&!y&&(g=u.Cell({cell:t,renderedCellValue:g,column:l,row:c,table:e})),I.jsx(I.Fragment,{children:g})},rQ=({cell:t,isStriped:e,measureElement:n,numRows:r,rowIndex:i,rowRef:o,table:s,virtualCell:a})=>{var l,c,u,d;const f=Ir(),{getState:h,options:{editingMode:g,enableClickToCopy:y,enableColumnOrdering:_,enableEditing:v,enableGrouping:x,enableRowNumbers:w,layoutMode:S,mantineTableBodyCellProps:E,mantineSkeletonProps:C,rowNumberMode:O},refs:{editInputRefs:R},setEditingCell:T,setHoveredColumn:A}=s,{draggingColumn:F,draggingRow:N,hoveredRow:U,editingCell:k,editingRow:z,hoveredColumn:G,density:W,isLoading:B,showSkeletons:j}=h(),{column:$,row:q}=t,{columnDef:K}=$,{columnDefType:re}=K,J=E instanceof Function?E({cell:t,column:$,row:q,table:s}):E,le=K.mantineTableBodyCellProps instanceof Function?K.mantineTableBodyCellProps({cell:t,column:$,row:q,table:s}):K.mantineTableBodyCellProps,ae=Object.assign(Object.assign({},J),le),oe=C instanceof Function?C({cell:t,column:$,row:q,table:s}):C,[De,Te]=M.useState(0);M.useEffect(()=>Te(B||j?re==="display"?$.getSize()/2:Math.round(Math.random()*($.getSize()-$.getSize()/3)+$.getSize()/3):100),[]);const ve=M.useMemo(()=>{const ke=F?.id===$.id,Ve=G?.id===$.id,Ze=N?.id===q.id,ot=U?.id===q.id,dt=oUe($,s),We=sUe($,s),ht=i===r-1,ee=ke||Ze?`1px dashed ${f.colors.gray[7]} !important`:Ve||ot?`2px dashed ${gl(f)} !important`:void 0;return ee?{borderLeft:ke||Ve||(Ze||ot)&&dt?ee:void 0,borderRight:ke||Ve||(Ze||ot)&&We?ee:void 0,borderBottom:Ze||ot||ht?ee:void 0,borderTop:Ze||ot?ee:void 0}:void 0},[F,N,G,U,i]),we=(v instanceof Function?v(q):v)&&(K.enableEditing instanceof Function?K.enableEditing(q):K.enableEditing)!==!1,me=we&&g!=="modal"&&(g==="table"||z?.id===q.id||k?.id===t.id)&&!q.getIsGrouped(),se=ke=>{var Ve;(Ve=ae?.onDoubleClick)===null||Ve===void 0||Ve.call(ae,ke),we&&g==="cell"&&(T(t),setTimeout(()=>{var Ze;const ot=R.current[$.id];ot&&(ot.focus(),(Ze=ot.select)===null||Ze===void 0||Ze.call(ot))},100))},de=ke=>{var Ve;(Ve=ae?.onDragEnter)===null||Ve===void 0||Ve.call(ae,ke),x&&G?.id==="drop-zone"&&A(null),_&&F&&A(K.enableColumnOrdering!==!1?$:null)};return I.jsxs(Xe,Object.assign({component:"td","data-index":a?.index,ref:ke=>{ke&&n?.(ke)}},ae,{onDragEnter:de,onDoubleClick:se,sx:ke=>Object.assign(Object.assign({alignItems:S==="grid"?"center":void 0,cursor:we&&g==="cell"?"pointer":"inherit",justifyContent:S==="grid"?ae.align:void 0,overflow:"hidden",paddingLeft:$.id==="mrt-row-expand"?`${q.depth+1}rem !important`:void 0,textOverflow:re!=="display"?"ellipsis":void 0,whiteSpace:W==="xs"?"nowrap":"normal",zIndex:F?.id===$.id?2:$.getIsPinned()?1:0,"&:hover":{outline:["table","cell"].includes(g??"")&&re!=="display"?`1px solid ${ke.colors.gray[7]}`:void 0,outlineOffset:"-1px",textOverflow:"clip"}},$A({column:$,isStriped:e,row:q,table:s,theme:ke,tableCellProps:ae})),ve),children:[I.jsx(I.Fragment,{children:t.getIsPlaceholder()?(c=(l=K.PlaceholderCell)===null||l===void 0?void 0:l.call(K,{cell:t,column:$,row:q,table:s}))!==null&&c!==void 0?c:null:B||j?I.jsx(OZ,Object.assign({height:20,width:De},oe)):w&&O==="static"&&$.id==="mrt-row-numbers"?i+1:$.id==="mrt-row-drag"?I.jsx(WUe,{cell:t,rowRef:o,table:s}):re==="display"&&($.id==="mrt-row-select"||$.id==="mrt-row-expand"||!q.getIsGrouped())?(u=K.Cell)===null||u===void 0?void 0:u.call(K,{cell:t,column:$,row:q,renderedCellValue:t.getValue(),table:s}):me?I.jsx(nQ,{cell:t,table:s}):(y||K.enableClickToCopy)&&K.enableClickToCopy!==!1?I.jsx(GUe,{cell:t,table:s,children:I.jsx(B6,{cell:t,table:s})}):I.jsx(B6,{cell:t,table:s})}),t.getIsGrouped()&&!K.GroupedCell&&I.jsxs(I.Fragment,{children:[" (",(d=q.subRows)===null||d===void 0?void 0:d.length,")"]})]}))},YUe=M.memo(rQ,(t,e)=>e.cell===t.cell),XUe=({parentRowRef:t,row:e,rowIndex:n,table:r,virtualRow:i})=>{const{getVisibleLeafColumns:o,getState:s,options:{layoutMode:a,mantineTableBodyRowProps:l,mantineDetailPanelProps:c,renderDetailPanel:u}}=r,{isLoading:d}=s(),f=l instanceof Function?l({isDetailPanel:!0,row:e,staticRowIndex:n,table:r}):l,h=c instanceof Function?c({row:e,table:r}):c;return I.jsx(Xe,Object.assign({component:"tr",className:"mantine-TableBodyCell-DetailPanel"},f,{sx:g=>{var y,_;return Object.assign({display:a==="grid"?"flex":"table-row",position:i?"absolute":void 0,top:i?`${(_=(y=t.current)===null||y===void 0?void 0:y.getBoundingClientRect())===null||_===void 0?void 0:_.height}px`:void 0,transform:i?`translateY(${i?.start}px)`:void 0,width:"100%",zIndex:i?2:void 0},f?.sx instanceof Function?f.sx(g):f?.sx)},children:I.jsx(Xe,Object.assign({component:"td",className:"mantine-TableBodyCell-DetailPanel",colSpan:o().length},h,{sx:g=>Object.assign({backgroundColor:i?g.fn.lighten(g.colors.dark[7],.06):void 0,borderBottom:e.getIsExpanded()?void 0:"none",display:a==="grid"?"flex":"table-cell",paddingBottom:e.getIsExpanded()?"16px !important":"0 !important",paddingTop:e.getIsExpanded()?"16px !important":"0 !important",transition:"all 100ms ease-in-out",width:`${r.getTotalSize()}px`},h?.sx instanceof Function?h.sx(g):h?.sx),children:u&&I.jsx(ud,{in:e.getIsExpanded(),children:!d&&u({row:e,table:r})})}))}))},iQ=({columnVirtualizer:t,enableHover:e,isStriped:n,measureElement:r,numRows:i,row:o,rowIndex:s,table:a,virtualColumns:l,virtualPaddingLeft:c,virtualPaddingRight:u,virtualRow:d})=>{const{getState:f,options:{enableRowOrdering:h,layoutMode:g,memoMode:y,mantineTableBodyRowProps:_,renderDetailPanel:v},setHoveredRow:x}=a,{draggingColumn:w,draggingRow:S,editingCell:E,editingRow:C,hoveredRow:O}=f(),R=_ instanceof Function?_({row:o,staticRowIndex:s,table:a}):_,T=F=>{h&&S&&x(o)},A=M.useRef(null);return I.jsxs(I.Fragment,{children:[I.jsxs(Xe,Object.assign({component:"tr","data-index":d?.index,onDragEnter:T,ref:F=>{F&&(A.current=F,r?.(F))}},R,{sx:F=>Object.assign({boxSizing:"border-box",display:g==="grid"?"flex":"table-row",opacity:S?.id===o.id||O?.id===o.id?.5:1,position:d?"absolute":void 0,top:d?0:void 0,transition:d?"none":"all 100ms ease-in-out",width:"100%","&:hover td":{backgroundColor:e!==!1?o.getIsSelected()?F.fn.rgba(gl(F),.2):F.colorScheme==="dark"?`${F.fn.lighten(F.colors.dark[7],.12)}`:`${F.fn.darken(F.white,.05)}`:void 0}},R?.sx instanceof Function?R.sx(F):R?.sx),style:Object.assign({transform:d?`translateY(${d?.start}px)`:void 0},R?.style),children:[c?I.jsx("td",{style:{display:"flex",width:c}}):null,(l??o.getVisibleCells()).map(F=>{const N=t?o.getVisibleCells()[F.index]:F,U={cell:N,isStriped:n,measureElement:t?.measureElement,numRows:i,rowIndex:s,rowRef:A,table:a,virtualCell:t?F:void 0};return y==="cells"&&N.column.columnDef.columnDefType==="data"&&!w&&!S&&E?.id!==N.id&&C?.id!==o.id?I.jsx(YUe,Object.assign({},U),N.id):I.jsx(rQ,Object.assign({},U),N.id)}),u?I.jsx("td",{style:{display:"flex",width:u}}):null]})),v&&!o.getIsGrouped()&&I.jsx(XUe,{parentRowRef:A,row:o,rowIndex:s,table:a,virtualRow:d})]})},ZUe=M.memo(iQ,(t,e)=>t.row===e.row&&t.rowIndex===e.rowIndex),oQ=({columnVirtualizer:t,enableHover:e,isStriped:n,table:r,virtualColumns:i,virtualPaddingLeft:o,virtualPaddingRight:s})=>{var a,l,c;const{getRowModel:u,getPrePaginationRowModel:d,getState:f,options:{enableGlobalFilterRankedResults:h,enablePagination:g,enableRowVirtualization:y,layoutMode:_,localization:v,mantineTableBodyProps:x,manualExpanding:w,manualFiltering:S,manualGrouping:E,manualPagination:C,manualSorting:O,memoMode:R,renderEmptyRowsFallback:T,rowVirtualizerInstanceRef:A,rowVirtualizerProps:F},refs:{tableContainerRef:N,tablePaperRef:U}}=r,{columnFilters:k,density:z,expanded:G,globalFilter:W,globalFilterFn:B,pagination:j,sorting:$}=f(),q=x instanceof Function?x({table:r}):x,K=F instanceof Function?F({table:r}):F,re=M.useMemo(()=>!w&&!S&&!E&&!O&&h&&W&&B==="fuzzy"&&G!==!0&&!Object.values($).some(Boolean)&&!Object.values(G).some(Boolean),[h,G,W,w,S,E,O,$]),J=M.useMemo(()=>{if(!re)return u().rows;const oe=d().rows.sort((De,Te)=>vUe(De,Te));if(g&&!C){const De=j.pageIndex*j.pageSize;return oe.slice(De,De+j.pageSize)}return oe},[re,re?d().rows:u().rows,j.pageIndex,j.pageSize]),le=y?Lq(Object.assign({count:J.length,estimateSize:()=>z==="xs"?42.7:z==="md"?54.7:70.7,getScrollElement:()=>N.current,measureElement:typeof window<"u"&&navigator.userAgent.indexOf("Firefox")===-1?oe=>oe?.getBoundingClientRect().height:void 0,overscan:4},K)):void 0;A&&le&&(A.current=le);const ae=le?le.getVirtualItems():void 0;return I.jsx(Xe,Object.assign({component:"tbody"},q,{sx:oe=>Object.assign({display:_==="grid"?"grid":"table-row-group",height:le?`${le.getTotalSize()}px`:"inherit",minHeight:J.length?void 0:"100px",position:"relative"},q?.sx instanceof Function?q?.sx(oe):q?.sx),children:J.length?I.jsx(I.Fragment,{children:(ae??J).map((oe,De)=>{const Te=le?J[oe.index]:oe,ve={columnVirtualizer:t,enableHover:e,isStriped:n,measureElement:le?.measureElement,numRows:J.length,row:Te,rowIndex:le?oe.index:De,table:r,virtualColumns:i,virtualPaddingLeft:o,virtualPaddingRight:s,virtualRow:le?oe:void 0};return R==="rows"?I.jsx(ZUe,Object.assign({},ve),Te.id):I.jsx(iQ,Object.assign({},ve),Te.id)})}):I.jsx("tr",{style:{display:_==="grid"?"grid":"table-row"},children:I.jsx("td",{colSpan:r.getVisibleLeafColumns().length,style:{display:_==="grid"?"grid":"table-cell"},children:(a=T?.({table:r}))!==null&&a!==void 0?a:I.jsx(Si,{sx:{color:"gray",fontStyle:"italic",maxWidth:`min(100vw, ${(c=(l=U.current)===null||l===void 0?void 0:l.clientWidth)!==null&&c!==void 0?c:360}px)`,paddingTop:"2rem",paddingBottom:"2rem",textAlign:"center",width:"100%"},children:W||k.length?v.noResultsFound:v.noRecordsToDisplay})})})}))},qUe=M.memo(oQ,(t,e)=>t.table.options.data===e.table.options.data),KUe=({footer:t,table:e})=>{var n,r,i;const{options:{layoutMode:o,mantineTableFooterCellProps:s}}=e,{column:a}=t,{columnDef:l}=a,{columnDefType:c}=l,u=s instanceof Function?s({column:a,table:e}):s,d=l.mantineTableFooterCellProps instanceof Function?l.mantineTableFooterCellProps({column:a,table:e}):l.mantineTableFooterCellProps,f=Object.assign(Object.assign({},u),d);return I.jsx(Xe,Object.assign({component:"th",align:c==="group"?"center":"left",colSpan:t.colSpan},f,{sx:h=>Object.assign({display:o==="grid"?"grid":"table-cell",fontWeight:"bold",justifyContent:c==="group"?"center":void 0,padding:"8px",verticalAlign:"top",zIndex:a.getIsPinned()&&c!=="group"?2:1},$A({column:a,table:e,theme:h,tableCellProps:f})),children:I.jsx(I.Fragment,{children:t.isPlaceholder?null:(i=(r=l.Footer instanceof Function?(n=l.Footer)===null||n===void 0?void 0:n.call(l,{column:a,footer:t,table:e}):l.Footer)!==null&&r!==void 0?r:l.footer)!==null&&i!==void 0?i:null})}))},QUe=({footerGroup:t,table:e,virtualColumns:n,virtualPaddingLeft:r,virtualPaddingRight:i})=>{var o;const{options:{layoutMode:s,mantineTableFooterRowProps:a}}=e;if(!(!((o=t.headers)===null||o===void 0)&&o.some(c=>typeof c.column.columnDef.footer=="string"&&!!c.column.columnDef.footer||c.column.columnDef.Footer)))return null;const l=a instanceof Function?a({footerGroup:t,table:e}):a;return I.jsxs(Xe,Object.assign({component:"tr"},l,{sx:c=>Object.assign({backgroundColor:c.fn.lighten(c.colorScheme==="dark"?c.colors.dark[7]:c.white,.06),display:s==="grid"?"flex":"table-row",width:"100%"},l?.sx instanceof Function?l?.sx(c):l?.sx),children:[r?I.jsx("th",{style:{display:"flex",width:r}}):null,(n??t.headers).map(c=>{const u=n?t.headers[c.index]:c;return I.jsx(KUe,{footer:u,table:e},u.id)}),i?I.jsx("th",{style:{display:"flex",width:i}}):null]}))},JUe=({table:t,virtualColumns:e,virtualPaddingLeft:n,virtualPaddingRight:r})=>{const{getFooterGroups:i,getState:o,options:{enableStickyFooter:s,layoutMode:a,mantineTableFooterProps:l}}=t,{isFullScreen:c}=o(),u=l instanceof Function?l({table:t}):l,d=(c||s)&&s!==!1;return I.jsx(Xe,Object.assign({component:"tfoot"},u,{sx:f=>Object.assign({bottom:d?0:void 0,display:a==="grid"?"grid":"table-row-group",opacity:d?.97:void 0,outline:d?f.colorScheme==="light"?`1px solid ${f.colors.gray[3]}`:`1px solid ${f.colors.gray[7]}`:void 0,position:d?"sticky":void 0,zIndex:d?1:void 0},u?.sx instanceof Function?u?.sx(f):u?.sx),children:i().map(f=>I.jsx(QUe,{footerGroup:f,table:t,virtualColumns:e,virtualPaddingLeft:n,virtualPaddingRight:r},f.id))}))},e5e=({table:t})=>{var e,n,r,i;const{getFlatHeaders:o,getState:s,options:{columns:a,columnVirtualizerInstanceRef:l,columnVirtualizerProps:c,enableColumnResizing:u,enableColumnVirtualization:d,enablePinning:f,enableTableFooter:h,enableTableHead:g,layoutMode:y,memoMode:_,mantineTableProps:v},refs:{tableContainerRef:x}}=t,{columnSizing:w,columnSizingInfo:S,columnPinning:E,columnVisibility:C,density:O}=s(),R=v instanceof Function?v({table:t}):v,T=c instanceof Function?c({table:t}):c,A=M.useMemo(()=>{const j=o(),$={};for(let q=0;q{var j,$,q,K;if(!d)return 0;const re=(K=(q=($=(j=t.getRowModel().rows[0])===null||j===void 0?void 0:j.getCenterVisibleCells())===null||$===void 0?void 0:$.slice(0,16))===null||q===void 0?void 0:q.map(J=>J.column.getSize()*1.2))!==null&&K!==void 0?K:[];return re.reduce((J,le)=>J+le,0)/re.length},[t.getRowModel().rows,E,C]),[N,U]=M.useMemo(()=>d&&f?[t.getLeftLeafColumns().map(j=>j.getPinnedIndex()),t.getRightLeafColumns().map(j=>t.getVisibleLeafColumns().length-j.getPinnedIndex()-1)]:[[],[]],[E,d,f]),k=d?Lq(Object.assign({count:t.getVisibleLeafColumns().length,estimateSize:()=>F,getScrollElement:()=>x.current,horizontal:!0,overscan:3,rangeExtractor:M.useCallback(j=>[...new Set([...N,...Dq(j),...U])],[N,U])},T)):void 0;l&&k&&(l.current=k);const z=k?k.getVirtualItems():void 0;let G,W;k&&z?.length&&(G=(n=(e=z[N.length])===null||e===void 0?void 0:e.start)!==null&&n!==void 0?n:0,W=k.getTotalSize()-((i=(r=z[z.length-1-U.length])===null||r===void 0?void 0:r.end)!==null&&i!==void 0?i:0));const B={columnVirtualizer:k,enableHover:R?.highlightOnHover,isStriped:R?.striped,table:t,virtualColumns:z,virtualPaddingLeft:G,virtualPaddingRight:W};return I.jsxs(QZ,Object.assign({highlightOnHover:!0,horizontalSpacing:O,verticalSpacing:O},R,{sx:j=>Object.assign({display:y==="grid"?"grid":"table",tableLayout:y!=="grid"&&u?"fixed":void 0,"& tr:first-of-type td":{borderTop:`1px solid ${j.colors.gray[j.colorScheme==="dark"?8:3]}`},"& tr:last-of-type td":{borderBottom:`1px solid ${j.colors.gray[j.colorScheme==="dark"?8:3]}`}},R?.sx instanceof Function?R.sx(j):R?.sx),style:Object.assign(Object.assign({},A),R?.style),children:[g&&I.jsx($Ue,Object.assign({},B)),_==="table-body"||S.isResizingColumn?I.jsx(qUe,Object.assign({},B)):I.jsx(oQ,Object.assign({},B)),h&&I.jsx(JUe,Object.assign({},B))]}))},t5e=typeof window<"u"?M.useLayoutEffect:M.useEffect,n5e=({table:t})=>{const{getState:e,options:{enableStickyHeader:n,mantineTableContainerProps:r},refs:{tableContainerRef:i,bottomToolbarRef:o,topToolbarRef:s}}=t,{isFullScreen:a}=e(),[l,c]=M.useState(0),u=r instanceof Function?r({table:t}):r;return t5e(()=>{var d,f,h,g;const y=typeof document<"u"&&(f=(d=s.current)===null||d===void 0?void 0:d.offsetHeight)!==null&&f!==void 0?f:0,_=typeof document<"u"&&(g=(h=o?.current)===null||h===void 0?void 0:h.offsetHeight)!==null&&g!==void 0?g:0;c(y+_)}),I.jsx(Xe,Object.assign({},u,{ref:d=>{d&&(i.current=d,u?.ref&&(u.ref.current=d))},sx:d=>Object.assign({maxWidth:"100%",maxHeight:n?`clamp(350px, calc(100vh - ${l}px), 9999px)`:void 0,overflow:"auto"},u?.sx instanceof Function?u.sx(d):u?.sx),style:Object.assign({maxHeight:a?`calc(100vh - ${l}px)`:void 0},u?.style),children:I.jsx(e5e,{table:t})}))},r5e=({table:t})=>{const{getState:e,options:{enableBottomToolbar:n,enableTopToolbar:r,mantinePaperProps:i,renderBottomToolbar:o,renderTopToolbar:s},refs:{tablePaperRef:a}}=t,{isFullScreen:l}=e(),c=i instanceof Function?i({table:t}):i;return I.jsxs(tv,Object.assign({shadow:"xs",withBorder:!0},c,{ref:u=>{a.current=u,c?.ref&&(c.ref.current=u)},sx:u=>Object.assign({overflow:"hidden",transition:"all 100ms ease-in-out"},c?.sx instanceof Function?c?.sx(u):c?.sx),style:Object.assign(Object.assign({},c?.style),l?{bottom:0,height:"100vh",left:0,margin:0,maxHeight:"100vh",maxWidth:"100vw",padding:0,position:"fixed",right:0,top:0,width:"100vw",zIndex:10}:{}),children:[r&&(s instanceof Function?s({table:t}):s??I.jsx(DUe,{table:t})),I.jsx(n5e,{table:t}),n&&(o instanceof Function?o({table:t}):o??I.jsx(IUe,{table:t}))]}))},i5e=({open:t,row:e,table:n})=>{const{options:{localization:r,onEditingRowCancel:i},setEditingRow:o}=n;return I.jsxs(Ia,{closeOnClickOutside:!1,onClose:()=>{i?.({row:e,table:n}),o(null)},opened:t,withCloseButton:!1,children:[I.jsx(Si,{sx:{textAlign:"center"},children:r.edit}),I.jsx("form",{onSubmit:s=>s.preventDefault(),children:I.jsx(vb,{sx:{gap:"24px",paddingTop:"16px",width:"100%"},children:e.getAllCells().filter(s=>s.column.columnDef.columnDefType==="data").map(s=>I.jsx(nQ,{cell:s,table:n},s.id))})}),I.jsx(er,{sx:{paddingTop:"24px",justifyContent:"flex-end"},children:I.jsx(XK,{row:e,table:n,variant:"text"})})]})},o5e=t=>{var e,n,r,i,o,s,a,l,c,u,d,f,h,g,y,_,v,x,w,S,E,C,O,R,T,A,F,N,U,k,z,G,W,B,j,$,q,K;const re=M.useRef(null),J=M.useRef({}),le=M.useRef({}),ae=M.useRef(null),oe=M.useRef(null),De=M.useRef({}),Te=M.useRef(null),ve=M.useRef(null),we=M.useMemo(()=>{var Ft,kt,fn;const In=(Ft=t.initialState)!==null&&Ft!==void 0?Ft:{};return In.columnOrder=(kt=In.columnOrder)!==null&&kt!==void 0?kt:zK(t),In.globalFilterFn=(fn=t.globalFilterFn)!==null&&fn!==void 0?fn:"fuzzy",In},[]),[me,se]=M.useState(()=>Object.assign({},...HT(t.columns).map(Ft=>{var kt,fn,In,Fn;return{[Mm(Ft)]:Ft.filterFn instanceof Function?(kt=Ft.filterFn.name)!==null&&kt!==void 0?kt:"custom":(Fn=(fn=Ft.filterFn)!==null&&fn!==void 0?fn:(In=we?.columnFilterFns)===null||In===void 0?void 0:In[Mm(Ft)])!==null&&Fn!==void 0?Fn:iUe(Ft)}}))),[de,ke]=M.useState((e=we.columnOrder)!==null&&e!==void 0?e:[]),[Ve,Ze]=M.useState((n=we?.density)!==null&&n!==void 0?n:"md"),[ot,dt]=M.useState((r=we.draggingColumn)!==null&&r!==void 0?r:null),[We,ht]=M.useState((i=we.draggingRow)!==null&&i!==void 0?i:null),[ee,Q]=M.useState((o=we.editingCell)!==null&&o!==void 0?o:null),[Pe,$e]=M.useState((s=we.editingRow)!==null&&s!==void 0?s:null),[Ge,Ke]=M.useState((a=we.globalFilterFn)!==null&&a!==void 0?a:"fuzzy"),[gt,ut]=M.useState((l=we.grouping)!==null&&l!==void 0?l:[]),[Ae,vt]=M.useState((c=we.hoveredColumn)!==null&&c!==void 0?c:null),[xt,ct]=M.useState((u=we.hoveredRow)!==null&&u!==void 0?u:null),[Ie,Ye]=M.useState((d=we?.isFullScreen)!==null&&d!==void 0?d:!1),[Tt,Lt]=M.useState((h=(f=t.initialState)===null||f===void 0?void 0:f.showAlertBanner)!==null&&h!==void 0?h:!1),[Rt,he]=M.useState((g=we?.showColumnFilters)!==null&&g!==void 0?g:!1),[ue,He]=M.useState((y=we?.showGlobalFilter)!==null&&y!==void 0?y:!1),[st,wt]=M.useState((_=we?.showToolbarDropZone)!==null&&_!==void 0?_:!1),Bt=M.useMemo(()=>{var Ft,kt,fn,In,Fn,Lr,ti,te,pe,Ne,ce,L,Y,ne,fe,_e,Se;return[((kt=(Ft=t.state)===null||Ft===void 0?void 0:Ft.columnOrder)!==null&&kt!==void 0?kt:de).includes("mrt-row-drag")&&Object.assign(Object.assign(Object.assign({header:t.localization.move,size:60},t.defaultDisplayColumn),(fn=t.displayColumnDefOptions)===null||fn===void 0?void 0:fn["mrt-row-drag"]),{id:"mrt-row-drag"}),((Fn=(In=t.state)===null||In===void 0?void 0:In.columnOrder)!==null&&Fn!==void 0?Fn:de).includes("mrt-row-actions")&&Object.assign(Object.assign(Object.assign({Cell:({cell:Fe,row:Ce})=>I.jsx(wUe,{cell:Fe,row:Ce,table:Nt}),header:t.localization.actions,size:70},t.defaultDisplayColumn),(Lr=t.displayColumnDefOptions)===null||Lr===void 0?void 0:Lr["mrt-row-actions"]),{id:"mrt-row-actions"}),((te=(ti=t.state)===null||ti===void 0?void 0:ti.columnOrder)!==null&&te!==void 0?te:de).includes("mrt-row-expand")&&jA(t,(Ne=(pe=t.state)===null||pe===void 0?void 0:pe.grouping)!==null&&Ne!==void 0?Ne:gt)&&Object.assign(Object.assign(Object.assign({Cell:({row:Fe})=>I.jsx(_Ue,{row:Fe,table:Nt}),Header:t.enableExpandAll?()=>I.jsx(yUe,{table:Nt}):null,header:t.localization.expand,size:60},t.defaultDisplayColumn),(ce=t.displayColumnDefOptions)===null||ce===void 0?void 0:ce["mrt-row-expand"]),{id:"mrt-row-expand"}),((Y=(L=t.state)===null||L===void 0?void 0:L.columnOrder)!==null&&Y!==void 0?Y:de).includes("mrt-row-select")&&Object.assign(Object.assign(Object.assign({Cell:({row:Fe})=>I.jsx(F6,{row:Fe,table:Nt}),Header:t.enableSelectAll&&t.enableMultiRowSelection?()=>I.jsx(F6,{selectAll:!0,table:Nt}):null,header:t.localization.select,size:60},t.defaultDisplayColumn),(ne=t.displayColumnDefOptions)===null||ne===void 0?void 0:ne["mrt-row-select"]),{id:"mrt-row-select"}),((_e=(fe=t.state)===null||fe===void 0?void 0:fe.columnOrder)!==null&&_e!==void 0?_e:de).includes("mrt-row-numbers")&&Object.assign(Object.assign(Object.assign({Cell:({row:Fe})=>Fe.index+1,Header:()=>t.localization.rowNumber,header:t.localization.rowNumbers,size:60},t.defaultDisplayColumn),(Se=t.displayColumnDefOptions)===null||Se===void 0?void 0:Se["mrt-row-numbers"]),{id:"mrt-row-numbers"})].filter(Boolean)},[de,gt,t.displayColumnDefOptions,t.editingMode,t.enableColumnDragging,t.enableColumnFilterModes,t.enableColumnOrdering,t.enableEditing,t.enableExpandAll,t.enableExpanding,t.enableGrouping,t.enableRowActions,t.enableRowDragging,t.enableRowNumbers,t.enableRowOrdering,t.enableRowSelection,t.enableSelectAll,t.localization,t.positionActionsColumn,t.renderDetailPanel,t.renderRowActionMenuItems,t.renderRowActions,(v=t.state)===null||v===void 0?void 0:v.columnOrder,(x=t.state)===null||x===void 0?void 0:x.grouping]),Yt=M.useMemo(()=>{var Ft,kt,fn;return NK({aggregationFns:t.aggregationFns,columnDefs:[...Bt,...t.columns],columnFilterFns:(kt=(Ft=t.state)===null||Ft===void 0?void 0:Ft.columnFilterFns)!==null&&kt!==void 0?kt:me,defaultDisplayColumn:(fn=t.defaultDisplayColumn)!==null&&fn!==void 0?fn:{},filterFns:t.filterFns,sortingFns:t.sortingFns})},[me,Bt,t.columns,(w=t.state)===null||w===void 0?void 0:w.columnFilterFns]),jn=M.useMemo(()=>{var Ft,kt,fn,In,Fn;return(!((Ft=t.state)===null||Ft===void 0)&&Ft.isLoading||!((kt=t.state)===null||kt===void 0)&&kt.showSkeletons)&&!t.data.length?[...Array(((In=(fn=t.state)===null||fn===void 0?void 0:fn.pagination)===null||In===void 0?void 0:In.pageSize)||((Fn=we?.pagination)===null||Fn===void 0?void 0:Fn.pageSize)||10).fill(null)].map(()=>Object.assign({},...HT(t.columns).map(Lr=>({[Mm(Lr)]:null})))):t.data},[t.data,(S=t.state)===null||S===void 0?void 0:S.isLoading,(E=t.state)===null||E===void 0?void 0:E.showSkeletons]),Nt=Object.assign(Object.assign({},NNe(Object.assign(Object.assign({getCoreRowModel:PNe(),getExpandedRowModel:LNe(),getFacetedRowModel:RNe(),getFilteredRowModel:ONe(),getGroupedRowModel:DNe(),getPaginationRowModel:kNe(),getSortedRowModel:ANe(),onColumnOrderChange:ke,onGroupingChange:ut,getSubRows:Ft=>Ft?.subRows},t),{columns:Yt,data:jn,globalFilterFn:(O=(C=t.filterFns)===null||C===void 0?void 0:C[Ge])!==null&&O!==void 0?O:(R=t.filterFns)===null||R===void 0?void 0:R.fuzzy,initialState:we,state:Object.assign({columnFilterFns:me,columnOrder:de,density:Ve,draggingColumn:ot,draggingRow:We,editingCell:ee,editingRow:Pe,globalFilterFn:Ge,grouping:gt,hoveredColumn:Ae,hoveredRow:xt,isFullScreen:Ie,showAlertBanner:Tt,showColumnFilters:Rt,showGlobalFilter:ue,showToolbarDropZone:st},t.state)}))),{refs:{bottomToolbarRef:re,editInputRefs:J,filterInputRefs:le,searchInputRef:ae,tableContainerRef:oe,tableHeadCellRefs:De,tablePaperRef:Te,topToolbarRef:ve},setColumnFilterFns:(T=t.onColumnFilterFnsChange)!==null&&T!==void 0?T:se,setDensity:(A=t.onDensityChange)!==null&&A!==void 0?A:Ze,setDraggingColumn:(F=t.onDraggingColumnChange)!==null&&F!==void 0?F:dt,setDraggingRow:(N=t.onDraggingRowChange)!==null&&N!==void 0?N:ht,setEditingCell:(U=t.onEditingCellChange)!==null&&U!==void 0?U:Q,setEditingRow:(k=t.onEditingRowChange)!==null&&k!==void 0?k:$e,setGlobalFilterFn:(z=t.onGlobalFilterFnChange)!==null&&z!==void 0?z:Ke,setHoveredColumn:(G=t.onHoveredColumnChange)!==null&&G!==void 0?G:vt,setHoveredRow:(W=t.onHoveredRowChange)!==null&&W!==void 0?W:ct,setIsFullScreen:(B=t.onIsFullScreenChange)!==null&&B!==void 0?B:Ye,setShowAlertBanner:(j=t.onShowAlertBannerChange)!==null&&j!==void 0?j:Lt,setShowColumnFilters:($=t.onShowColumnFiltersChange)!==null&&$!==void 0?$:he,setShowGlobalFilter:(q=t.onShowGlobalFilterChange)!==null&&q!==void 0?q:He,setShowToolbarDropZone:(K=t.onShowToolbarDropZoneChange)!==null&&K!==void 0?K:wt});t.tableFeatures&&t.tableFeatures.forEach(Ft=>{Object.assign(Nt,Ft(Nt))}),t.tableInstanceRef&&(t.tableInstanceRef.current=Nt);const xn=M.useRef();return M.useEffect(()=>{typeof window<"u"&&(xn.current=document.body.style.height)},[]),M.useEffect(()=>{typeof window<"u"&&(Nt.getState().isFullScreen?document.body.style.height="100vh":document.body.style.height=xn.current)},[Nt.getState().isFullScreen]),M.useEffect(()=>{var Ft;const{pageIndex:kt,pageSize:fn}=Nt.getState().pagination,In=(Ft=t.rowCount)!==null&&Ft!==void 0?Ft:Nt.getPrePaginationRowModel().rows.length;kt*fn>In&&Nt.setPageIndex(Math.floor(In/fn))},[t.rowCount,Nt.getPrePaginationRowModel().rows.length]),I.jsxs(I.Fragment,{children:[I.jsx(r5e,{table:Nt}),Pe&&t.editingMode==="modal"&&I.jsx(i5e,{row:Pe,table:Nt,open:!0})]})},s5e={actions:"Actions",and:"and",cancel:"Cancel",changeFilterMode:"Change filter mode",changeSearchMode:"Change search mode",clearFilter:"Clear filter",clearSearch:"Clear search",clearSort:"Clear sort",clickToCopy:"Click to copy",collapse:"Collapse",collapseAll:"Collapse all",columnActions:"Column Actions",copiedToClipboard:"Copied to clipboard",dropToGroupBy:"Drop to group by {column}",edit:"Edit",expand:"Expand",expandAll:"Expand all",filterArrIncludes:"Includes",filterArrIncludesAll:"Includes all",filterArrIncludesSome:"Includes",filterBetween:"Between",filterBetweenInclusive:"Between Inclusive",filterByColumn:"Filter by {column}",filterContains:"Contains",filterEmpty:"Empty",filterEndsWith:"Ends With",filterEquals:"Equals",filterEqualsString:"Equals",filterFuzzy:"Fuzzy",filterGreaterThan:"Greater Than",filterGreaterThanOrEqualTo:"Greater Than Or Equal To",filterInNumberRange:"Between",filterIncludesString:"Contains",filterIncludesStringSensitive:"Contains",filterLessThan:"Less Than",filterLessThanOrEqualTo:"Less Than Or Equal To",filterMode:"Filter Mode: {filterType}",filterNotEmpty:"Not Empty",filterNotEquals:"Not Equals",filterStartsWith:"Starts With",filterWeakEquals:"Equals",filteringByColumn:"Filtering by {column} - {filterType} {filterValue}",goToFirstPage:"Go to first page",goToLastPage:"Go to last page",goToNextPage:"Go to next page",goToPreviousPage:"Go to previous page",grab:"Grab",groupByColumn:"Group by {column}",groupedBy:"Grouped by ",hideAll:"Hide all",hideColumn:"Hide {column} column",max:"Max",min:"Min",move:"Move",noRecordsToDisplay:"No records to display",noResultsFound:"No results found",of:"of",or:"or",pinToLeft:"Pin to left",pinToRight:"Pin to right",resetColumnSize:"Reset column size",resetOrder:"Reset order",rowActions:"Row Actions",rowNumber:"#",rowNumbers:"Row Numbers",rowsPerPage:"Rows per page",save:"Save",search:"Search",selectedCountOfRowCountRowsSelected:"{selectedCount} of {rowCount} row(s) selected",select:"Select",showAll:"Show all",showAllColumns:"Show all columns",showHideColumns:"Show/Hide columns",showHideFilters:"Show/Hide filters",showHideSearch:"Show/Hide search",sortByColumnAsc:"Sort by {column} ascending",sortByColumnDesc:"Sort by {column} descending",sortedByColumnAsc:"Sorted by {column} ascending",sortedByColumnDesc:"Sorted by {column} descending",thenBy:", then by ",toggleDensity:"Toggle density",toggleFullScreen:"Toggle full screen",toggleSelectAll:"Toggle select all",toggleSelectRow:"Toggle select row",toggleVisibility:"Toggle visibility",ungroupByColumn:"Ungroup by {column}",unpin:"Unpin",unpinAll:"Unpin all",unsorted:"Unsorted"},a5e=t=>{var e,{aggregationFns:n,autoResetExpanded:r=!1,columnResizeMode:i="onChange",defaultColumn:o,defaultDisplayColumn:s,editingMode:a="modal",enableBottomToolbar:l=!0,enableColumnActions:c=!0,enableColumnFilters:u=!0,enableColumnOrdering:d=!1,enableColumnResizing:f=!1,enableDensityToggle:h=!0,enableExpandAll:g=!0,enableFilterMatchHighlighting:y=!0,enableFilters:_=!0,enableFullScreenToggle:v=!0,enableGlobalFilter:x=!0,enableGlobalFilterRankedResults:w=!0,enableGrouping:S=!1,enableHiding:E=!0,enableMultiRowSelection:C=!0,enableMultiSort:O=!0,enablePagination:R=!0,enablePinning:T=!1,enableRowSelection:A=!1,enableSelectAll:F=!0,enableSorting:N=!0,enableStickyHeader:U=!1,enableTableFooter:k=!0,enableTableHead:z=!0,enableToolbarInternalActions:G=!0,enableTopToolbar:W=!0,filterFns:B,icons:j,layoutMode:$="semantic",localization:q,manualFiltering:K,manualGrouping:re,manualPagination:J,manualSorting:le,positionActionsColumn:ae="first",positionExpandColumn:oe="first",positionGlobalFilter:De="right",positionPagination:Te="bottom",positionToolbarAlertBanner:ve="top",positionToolbarDropZone:we="top",rowNumberMode:me="original",selectAllMode:se="page",sortingFns:de}=t,ke=Ah(t,["aggregationFns","autoResetExpanded","columnResizeMode","defaultColumn","defaultDisplayColumn","editingMode","enableBottomToolbar","enableColumnActions","enableColumnFilters","enableColumnOrdering","enableColumnResizing","enableDensityToggle","enableExpandAll","enableFilterMatchHighlighting","enableFilters","enableFullScreenToggle","enableGlobalFilter","enableGlobalFilterRankedResults","enableGrouping","enableHiding","enableMultiRowSelection","enableMultiSort","enablePagination","enablePinning","enableRowSelection","enableSelectAll","enableSorting","enableStickyHeader","enableTableFooter","enableTableHead","enableToolbarInternalActions","enableTopToolbar","filterFns","icons","layoutMode","localization","manualFiltering","manualGrouping","manualPagination","manualSorting","positionActionsColumn","positionExpandColumn","positionGlobalFilter","positionPagination","positionToolbarAlertBanner","positionToolbarDropZone","rowNumberMode","selectAllMode","sortingFns"]);const Ve=M.useMemo(()=>Object.assign(Object.assign({},pUe),j),[j]),Ze=M.useMemo(()=>Object.assign(Object.assign({},s5e),q),[q]),ot=M.useMemo(()=>Object.assign(Object.assign({},tUe),n),[]),dt=M.useMemo(()=>Object.assign(Object.assign({},hUe),B),[]),We=M.useMemo(()=>Object.assign(Object.assign({},gUe),de),[]),ht=M.useMemo(()=>Object.assign(Object.assign({},uUe),o),[o]),ee=M.useMemo(()=>Object.assign(Object.assign({},dUe),s),[s]);return(ke.enableRowVirtualization||ke.enableColumnVirtualization)&&($="grid"),ke.enableRowVirtualization&&(U=!0),R===!1&&J===void 0&&(J=!0),!((e=ke.data)===null||e===void 0)&&e.length||(K=!0,re=!0,J=!0,le=!0),I.jsx(o5e,Object.assign({aggregationFns:ot,autoResetExpanded:r,columnResizeMode:i,defaultColumn:ht,defaultDisplayColumn:ee,editingMode:a,enableBottomToolbar:l,enableColumnActions:c,enableColumnFilters:u,enableColumnOrdering:d,enableColumnResizing:f,enableDensityToggle:h,enableExpandAll:g,enableFilterMatchHighlighting:y,enableFilters:_,enableFullScreenToggle:v,enableGlobalFilter:x,enableGlobalFilterRankedResults:w,enableGrouping:S,enableHiding:E,enableMultiRowSelection:C,enableMultiSort:O,enablePagination:R,enablePinning:T,enableRowSelection:A,enableSelectAll:F,enableSorting:N,enableStickyHeader:U,enableTableFooter:k,enableTableHead:z,enableToolbarInternalActions:G,enableTopToolbar:W,filterFns:dt,icons:Ve,layoutMode:$,localization:Ze,manualFiltering:K,manualGrouping:re,manualPagination:J,manualSorting:le,positionActionsColumn:ae,positionExpandColumn:oe,positionGlobalFilter:De,positionPagination:Te,positionToolbarAlertBanner:ve,positionToolbarDropZone:we,rowNumberMode:me,selectAllMode:se,sortingFns:We},ke))};function sQ(t){const e=H.useContext(Ui),n=e.useSceneTree(g=>g.nodeFromName),r=e.useSceneTree(g=>g.setLabelVisibility);function i(g,y){const _=e.nodeAttributesFromName.current;_[g]===void 0&&(_[g]={}),_[g].visibility=y,s()}const[,o]=H.useState(Date.now());function s(){o(Date.now())}H.useEffect(()=>{const g=setInterval(s,500);return()=>{clearInterval(g)}},[]);const a=H.useRef(!1);a.current=!1,setTimeout(()=>{a.current=!0},5);function l(g,y,_){const v=n[g];return v===void 0?[]:v.children.map(x=>{const w=e.nodeAttributesFromName.current[x]?.visibility??!0,S=w&&_,E=w?WB:kT;return{name:x,visible:I.jsx(An,{onMouseDown:()=>{const C=e.nodeAttributesFromName.current[x]?.visibility??!0;a.current&&i(x,!C)},onClick:C=>{C.stopPropagation()},onMouseEnter:C=>{if(C.buttons!==0){const O=e.nodeAttributesFromName.current[x]?.visibility??!0;a.current&&i(x,!O)}},sx:{opacity:S?"1.0":"0.5"},children:I.jsx(E,{})}),subRows:l(x,y+1,S)}})}const c=l("",0,!0),u=H.useMemo(()=>[{accessorKey:"visible",header:"",size:20},{accessorKey:"name",header:"Name",Cell:function(g){const y=g.row,_=g.cell,v=y.getIsExpanded()?vq:yke;return I.jsxs(I.Fragment,{children:[I.jsx(v,{style:{opacity:y.subRows?.length===0?"0.0":"0.4",marginLeft:`${(.75*y.depth).toString()}em`},size:"1em"}),_.getValue().split("/").filter(x=>x.length>0).map((x,w,S)=>I.jsxs("span",{style:{userSelect:"none"},children:[I.jsx("span",{style:{opacity:"0.4"},children:w===S.length-1?"/":`/${x}`}),w===S.length-1?x:""]},w))]})}}],[]),[d,{open:f,close:h}]=pW(!1);return I.jsxs(I.Fragment,{children:[t.compact&&I.jsx(Ia,{padding:"0",withCloseButton:!1,opened:d,onClose:h,size:"xl",centered:!0,children:I.jsx(sQ,{compact:!1})}),I.jsx(a5e,{columns:u,data:c,enableExpanding:!1,filterFromLeafRows:!0,enableDensityToggle:!1,enableRowSelection:!t.compact,enableHiding:!1,enableGlobalFilter:!0,enableColumnActions:!1,enableTopToolbar:!0,enableBottomToolbar:!1,enableColumnFilters:!1,enablePagination:!1,initialState:{density:"xs",expanded:!0},mantineExpandAllButtonProps:{size:"sm"},mantineExpandButtonProps:{size:"sm",sx:{width:"0 !important"}},mantineSelectAllCheckboxProps:{size:"sm"},mantineSelectCheckboxProps:{size:"sm"},mantineTableProps:{verticalSpacing:2},mantineTableContainerProps:{sx:{maxHeight:"30em"}},mantinePaginationProps:{showRowsPerPage:!1,showFirstLastPageButtons:!1},mantineTableBodyRowProps:({row:g})=>({onPointerOver:()=>{r(g.getValue("name"),!0)},onPointerOut:()=>{r(g.getValue("name"),!1)},...g.subRows===void 0||g.subRows.length===0?{}:{onClick:()=>{g.toggleExpanded()},sx:{cursor:"pointer"}}}),enableFullScreenToggle:!1,renderTopToolbarCustomActions:t.compact?()=>I.jsx(An,{onClick:f,children:I.jsx(yq,{})}):({table:g})=>{const y=g.getFilteredSelectedRowModel().flatRows.length===0;return I.jsxs("div",{style:{display:"flex",gap:"8px"},children:[I.jsx(An,{color:"green",disabled:y,variant:"filled",onClick:()=>{g.getSelectedRowModel().flatRows.map(_=>{i(_.getValue("name"),!0)})},children:I.jsx(WB,{})}),I.jsx(An,{color:"gray",disabled:y,variant:"filled",onClick:()=>{g.getSelectedRowModel().flatRows.map(_=>{i(_.getValue("name"),!1)})},children:I.jsx(kT,{})})]})},enableRowVirtualization:!0})]})}function l5e(){const t=H.useContext(Ui),[e,n]=H.useState(!1);function r(i){i.key==="Enter"&&(i.currentTarget.blur(),i.currentTarget.focus())}return I.jsxs(I.Fragment,{children:[e?I.jsx(Que,{className:"stats-panel"}):null,I.jsxs(vb,{spacing:"xs",children:[I.jsx(Pc,{label:"Label",defaultValue:t.useGui(i=>i.label),onBlur:i=>t.useGui.setState({label:i.currentTarget.value}),onKeyDown:r}),I.jsx(Pc,{label:"Server",defaultValue:t.useGui(i=>i.server),onBlur:i=>t.useGui.setState({server:i.currentTarget.value}),onKeyDown:r}),I.jsx(Ds,{onClick:async()=>{if("showSaveFilePicker"in window&&(()=>{try{return window.self===window.top}catch{return!1}})()){const o=window.showSaveFilePicker({suggestedName:"render.png",types:[{accept:{"image/png":[".png"]}}]});t.canvasRef.current?.toBlob(async s=>{if(s===null){console.error("Export failed");return}const l=await(await o).createWritable();await l.write(s),await l.close()})}else t.canvasRef.current?.toBlob(o=>{if(o===null){console.error("Export failed");return}const s=URL.createObjectURL(o),a=document.createElement("a");a.href=s;const l="render.png";a.download=l,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(s)})},fullWidth:!0,leftIcon:I.jsx(Uke,{size:"1rem"}),children:"Export Canvas"}),I.jsx(yb,{label:"WebGL Statistics",onChange:i=>{n(i.currentTarget.checked)}})]})]})}function lC(){const t=H.useContext(Ui),e=Object.keys(t.useGui(o=>o.guiConfigFromId)).length>0,[n,r]=H.useState("server");H.useEffect(()=>{e&&r("generated")},[e]);const i=H.memo(sQ);return I.jsxs(Qo,{radius:"xs",value:n,onTabChange:r,children:[I.jsxs(Qo.List,{children:[e?I.jsx(Qo.Tab,{value:"generated",icon:I.jsx(cke,{size:"0.8rem"}),children:"Control"}):null,I.jsx(Qo.Tab,{value:"server",icon:I.jsx(Wke,{size:"1rem"}),children:"Server"}),I.jsx(Qo.Tab,{value:"scene",icon:I.jsx(mke,{size:"1rem"}),children:"Scene"})]}),e?I.jsx(Qo.Panel,{value:"generated",pt:"xs",p:"sm",children:I.jsx(qLe,{})}):null,I.jsx(Qo.Panel,{value:"server",pt:"xs",p:"sm",children:I.jsx(l5e,{})}),I.jsx(Qo.Panel,{value:"scene",pt:"xs",p:"sm",children:I.jsx(i,{compact:!0})})]})}function cC(){const{useGui:t}=H.useContext(Ui),e=t(o=>o.websocketConnected),n=t(o=>o.server),r=t(o=>o.label),i=e?Pke:Cke;return I.jsxs(I.Fragment,{children:[I.jsx(i,{color:e?"#0b0":"#b00",style:{transform:"translateY(0.1em) scale(1.2)",width:"1em",height:"1em"}}),"   ",r===""?n:r]})}const aQ={move:"touchmove",end:"touchend"},lQ={move:"mousemove",end:"mouseup"};function cQ(t){return t.type==="touchmove"}function uQ(t){return t.type==="mousemove"}const dQ=H.createContext(null);function Pm({children:t}){const e=H.useRef(null);return I.jsx(dQ.Provider,{value:e,children:I.jsx(tv,{radius:"sm",withBorder:!0,sx:{boxSizing:"border-box",width:"20em",zIndex:1,position:"absolute",top:"1em",right:"1em",margin:0,"&.hidden":{overflow:"hidden"},"& .panel-contents":{opacity:"1.0",visibility:"visible",height:"auto",transition:"visibility 0.2s linear,opacity 0.2s linear"},"&.hidden .panel-contents":{opacity:"0.0",visibility:"hidden",height:"0 !important",border:"0",position:"absolute"},"& .expand-icon":{transform:"rotate(0)"},"&.hidden .expand-icon":{transform:"rotate(180deg)"}},ref:e,children:t})})}Pm.Handle=function({children:e}){const n=H.useContext(dQ),r=H.useRef({dragging:!1,startPosX:0,startPosY:0,startClientX:0,startClientY:0}),i=H.useRef({}),o=(c,u,d)=>Math.abs(c+u/2){const c=n.current;if(c===null)return;const u=c.parentElement;if(u===null)return;c.style.maxHeight=`${(u.clientHeight-s*2).toString()}px`;const d=new ResizeObserver(()=>{i.current.x===void 0&&(i.current.x=o(c.offsetLeft,c.clientWidth,u.clientWidth)),i.current.y===void 0&&(i.current.y=o(c.offsetTop,c.clientHeight,u.clientHeight)),c.style.maxHeight=`${(u.clientHeight-s*2).toString()}px`;let f=i.current.x,h=i.current.y;for(;f<0;)f+=u.clientWidth;for(;h<0;)h+=u.clientHeight;a(f,h)});return d.observe(c),d.observe(u),()=>{d.disconnect()}});const l=c=>{const u=r.current,d=n.current;if(!d)return;c.type=="touchstart"?(c=c,u.startClientX=c.touches[0].clientX,u.startClientY=c.touches[0].clientY):(c=c,u.startClientX=c.clientX,u.startClientY=c.clientY),u.startPosX=d.offsetLeft,u.startPosY=d.offsetTop;const f=c.type=="touchstart"?aQ:lQ;function h(g){let y=0,_=0;if(cQ(g)?(g=g,y=g.touches[0].clientX-u.startClientX,_=g.touches[0].clientY-u.startClientY):uQ(g)&&(g=g,y=g.clientX-u.startClientX,_=g.clientY-u.startClientY),Math.abs(y)<=3&&Math.abs(_)<=3)return;u.dragging=!0;const v=u.startPosX+y,x=u.startPosY+_;[i.current.x,i.current.y]=a(v,x)}window.addEventListener(f.move,h),window.addEventListener(f.end,()=>{c.type=="touchstart"&&(u.dragging=!1),window.removeEventListener(f.move,h)},{once:!0})};return I.jsxs(Xe,{sx:c=>({backgroundColor:c.colorScheme==="dark"?c.colors.dark[5]:c.colors.gray[1],lineHeight:"1.5em",cursor:"pointer",position:"relative",fontWeight:400,boxSizing:"border-box",overflow:"hidden",userSelect:"none"}),onClick:()=>{const c=r.current;if(c.dragging){c.dragging=!1;return}const u=n.current;u&&u.classList.toggle("hidden")},onTouchStart:c=>{l(c)},onMouseDown:c=>{l(c)},children:[I.jsx(Xe,{component:"div",sx:{padding:"0.5em 3em 0.5em 0.8em"},children:e}),I.jsx(Xe,{component:"div",sx:{position:"absolute",top:"50%",right:"0.5em",transform:"translateY(-48%) scale(0.8)",height:"1.5em",opacity:"0.5"},children:I.jsx(_ke,{className:"expand-icon"})})]})};Pm.Contents=function({children:e}){return I.jsx(Xe,{className:"panel-contents",children:e})};function c5e(t){throw new Error("Didn't expect to get here",t)}function fQ(t){let e=null;switch(t){case null:break;case"GitHub":e=vke;break;case"Description":e=Ike;break;case"Keyboard":e=Fke;break;default:c5e(t)}return e}function u5e(t){const e=fQ(t.icon);return I.jsx(Ds,{component:"a",variant:"default",href:t.href||void 0,compact:!0,target:"_blank",leftIcon:e===null?null:I.jsx(e,{size:"1em"}),ml:"sm",color:"gray",sx:n=>({[n.fn.smallerThan("sm")]:{display:"none"}}),children:t.text})}function d5e(t){const e=fQ(t.icon);return I.jsx(Ds,{m:"sm",component:"a",variant:"default",href:t.href||void 0,target:"_blank",leftIcon:e===null?null:I.jsx(e,{size:"1.5em"}),ml:"sm",color:"gray",children:t.text})}function f5e(t,e){let n;t.image_url_dark==null||e.colorScheme=="light"?n=t.image_url_light:n=t.image_url_dark;const r=I.jsx("img",{src:n,alt:t.image_alt,style:{height:"1.8em",margin:"0 0.5em"}});return t.href==null?r:I.jsx("a",{href:t.href,children:r})}function h5e(){const e=M.useContext(Ui).useGui(a=>a.theme.titlebar_content),n=Ir(),[r,i]=pW(!1);if(e==null)return null;const o=e.buttons,s=e.image;return I.jsxs(w7,{p:"xs",height:"3.2em",sx:a=>({margin:0,borderBottom:"1px solid",borderColor:a.colorScheme=="light"?a.colors.gray[4]:a.colors.dark[4]}),children:[I.jsxs(UY,{fluid:!0,sx:()=>({display:"flex",alignItems:"center"}),children:[I.jsx(RT,{sx:()=>({marginRight:"auto"}),children:s!==null?f5e(s,n):null}),I.jsx(RT,{sx:()=>({flexWrap:"nowrap",overflowX:"scroll",msOverflowStyle:"none",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),children:o?.map(a=>u5e(a))}),I.jsx(V9,{size:"sm",opened:r,onClick:i.toggle,title:r?"Close navigation":"Open navigation",sx:a=>({[a.fn.largerThan("sm")]:{display:"none"}})})]}),I.jsx(tv,{sx:a=>({[a.fn.largerThan("sm")]:{display:"none"},display:"flex",flexDirection:"column",position:"relative",top:0,left:"-0.625rem",zIndex:1e7,height:r?"calc(100vh - 2.375em)":"0",width:"100vw",transition:"all 0.5s",overflow:r?"scroll":"hidden",padding:r?"1rem":"0"}),children:o?.map(a=>d5e(a))})]})}const XA=H.createContext(null),p5e=(t,e)=>(t-e)/window.innerHeight,jT=t=>{let e=0;const n=t.children;for(let r=0;r{const s=r.current,a=n.current;if(a===null)return;s.startHeight=a.clientHeight,a.style.transition="none";let l=s.hidden;const c=o.type=="touchstart"?aQ:lQ;function u(d){let f=0;if(cQ(d)?f=window.innerHeight-d.touches[0].clientY:uQ(d)&&(f=window.innerHeight-d.clientY),s.dragging=!0,!a)return;a.style.height=f+"px";const h=p5e(s.startHeight,a.clientHeight);!s.hidden&&h>.1||s.hidden&&h>-.1?(a.classList.add("hidden"),l=!0):(!s.hidden&&h<=.05||s.hidden&&h<=-.1)&&(a.classList.remove("hidden"),l=!1)}window.addEventListener(c.move,u),window.addEventListener(c.end,()=>{s.dragging=!1,s.hidden=l,window.removeEventListener(c.move,u),a.style.transition="height 0.3s linear",s.hidden?a.style.height="3.5em":a.style.height=jT(a)+"px"},{once:!0})};return I.jsxs(Xe,{color:"red",sx:o=>({backgroundColor:o.colorScheme=="dark"?o.colors.dark[5]:o.colors.gray[1],lineHeight:"2.5em",cursor:"pointer",position:"relative",fontWeight:400,boxSizing:"border-box",overflow:"hidden",userSelect:"none"}),onClick:()=>{const o=r.current,s=n.current;if(s!==null){if(o.dragging){o.dragging=!1;return}s.classList.toggle("hidden"),o.hidden?(s.style.height=jT(s)+"px",o.hidden=!1):(s.style.height="3.5em",o.hidden=!0)}},onTouchStart:o=>{i(o)},onMouseDown:o=>{i(o)},children:[I.jsx(Xe,{component:"div",sx:{padding:"0.5em 3em 0.5em 0.8em"},children:e}),I.jsx(Xe,{component:"div",sx:{position:"absolute",top:"50%",right:"0.5em",transform:"translateY(-48%) scale(0.8)",height:"1.5em",opacity:"0.5"},children:I.jsx(vq,{className:"expand-icon"})})]})};Cm.Contents=function({children:e}){const n=H.useContext(XA),r=H.useRef(null);return H.useEffect(()=>{const i=n.current,o=r.current;if(i===null||o===null)return;const s=new ResizeObserver(()=>{i.classList.contains("hidden")||(i.style.height=jT(i)+"px")});return s.observe(o),()=>{s.disconnect()}}),I.jsx(Xe,{className:"panel-contents",ref:r,children:e})};const Ui=H.createContext(null);Gi.enabled=!0;function m5e(){function t(){let o=window.location.href;return o=o.replace("http://","ws://"),o=o.split("?")[0],o.endsWith("/")&&(o=o.slice(0,-1)),o}const e=new URLSearchParams(window.location.search).getAll(hq),n=e.length>=1?e[0]:t(),r={useSceneTree:ILe(),useGui:yge(n),websocketRef:H.useRef(null),canvasRef:H.useRef(null),sceneRef:H.useRef(null),cameraRef:H.useRef(null),cameraControlRef:H.useRef(null),nodeAttributesFromName:H.useRef({})},i=r.useGui(o=>o.theme.fixed_sidebar);return I.jsxs(Ui.Provider,{value:r,children:[I.jsx(h5e,{}),I.jsxs(Xe,{sx:{width:"100%",height:"1px",position:"relative",flex:"1 0 auto"},children:[I.jsx(GLe,{}),I.jsx(pX,{smallerThan:"sm",styles:{right:0,bottom:"3.5em"},children:I.jsx(Xe,{sx:o=>({top:0,bottom:0,left:0,right:i?"20em":0,position:"absolute",backgroundColor:o.colorScheme==="light"?"#fff":o.colors.dark[9]}),children:I.jsx(v5e,{})})}),I.jsx(g5e,{fixed_sidebar:i})]})]})}function g5e(t){const e=Ir();return rb(`(max-width: ${e.breakpoints.sm})`)?I.jsxs(Cm,{children:[I.jsx(Cm.Handle,{children:I.jsx(cC,{})}),I.jsx(Cm.Contents,{children:I.jsx(lC,{})})]}):t.fixed_sidebar?I.jsx(hA,{hiddenBreakpoint:"sm",sx:r=>({width:"20em",boxSizing:"border-box",right:0,position:"absolute",top:"0em",bottom:"0em",borderLeft:"1px solid",borderColor:r.colorScheme=="light"?r.colors.gray[4]:r.colors.dark[4]}),children:I.jsxs(j7,{type:"always",sx:{height:"100%"},children:[I.jsx(Xe,{p:"sm",sx:r=>({backgroundColor:r.colorScheme=="dark"?r.colors.dark[5]:r.colors.gray[1],lineHeight:"1.5em",fontWeight:400}),children:I.jsx(cC,{})}),I.jsx(lC,{})]})}):I.jsxs(Pm,{children:[I.jsx(Pm.Handle,{children:I.jsx(cC,{})}),I.jsx(Pm.Contents,{children:I.jsx(lC,{})})]})}function v5e(){const t=H.useContext(Ui);return I.jsxs(fue,{camera:{position:[3,3,-3]},gl:{preserveDrawingBuffer:!0},style:{position:"relative",zIndex:0,width:"100%",height:"100%"},performance:{min:.95},ref:t.canvasRef,children:[I.jsx(fde,{pixelated:!0}),I.jsx(hde,{}),I.jsx(y5e,{}),I.jsx(ZLe,{}),I.jsxs(Kpe,{children:[I.jsx(fq,{name:""}),I.jsx(Jpe,{enabled:!0,autoClear:!1,children:I.jsx(tme,{hiddenEdgeColor:16514816,visibleEdgeColor:16514816,blendFunction:Kt.SCREEN,kernelSize:ld.MEDIUM,edgeStrength:30,height:480,blur:!0})})]}),I.jsx(ide,{path:"/hdri/",files:"potsdamer_platz_1k.hdr"})]})}function y5e(){const{sceneRef:t,cameraRef:e}=H.useContext(Ui);return t.current=dn(n=>n.scene),e.current=dn(n=>n.camera),I.jsx(I.Fragment,{})}function _5e(){return I.jsx(nW,{withGlobalStyles:!0,withNormalizeCSS:!0,theme:{colorScheme:"light"},children:I.jsx(Xe,{sx:{width:"100%",height:"100%",position:"relative",display:"flex",flexDirection:"column"},children:I.jsx(m5e,{})})})}zO(document.getElementById("root")).render(I.jsx(_5e,{})); + */var BNe=typeof document<"u"?M.useLayoutEffect:M.useEffect;function HNe(t){var e=M.useReducer(function(){return{}},{})[1],n=I1({},t,{onChange:function(s){e(),t.onChange==null||t.onChange(s)}}),r=M.useState(function(){return new zNe(n)}),i=r[0];return i.setOptions(n),M.useEffect(function(){return i._didMount()},[]),BNe(function(){return i._willUpdate()}),i}function Iq(t){return HNe(I1({observeElementRect:LNe,observeElementOffset:kNe,scrollToFn:FNe},t))}var VNe=Object.defineProperty,jNe=Object.defineProperties,$Ne=Object.getOwnPropertyDescriptors,k1=Object.getOwnPropertySymbols,Lq=Object.prototype.hasOwnProperty,kq=Object.prototype.propertyIsEnumerable,KB=(t,e,n)=>e in t?VNe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,QB=(t,e)=>{for(var n in e||(e={}))Lq.call(e,n)&&KB(t,n,e[n]);if(k1)for(var n of k1(e))kq.call(e,n)&&KB(t,n,e[n]);return t},JB=(t,e)=>jNe(t,$Ne(e)),GNe=(t,e)=>{var n={};for(var r in t)Lq.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&k1)for(var r of k1(t))e.indexOf(r)<0&&kq.call(t,r)&&(n[r]=t[r]);return n};function BT(t){var e=t,{direction:n,style:r}=e,i=GNe(e,["direction","style"]);const o=Ir();return H.createElement(CW,JB(QB({},i),{style:JB(QB({},r),{transform:n==="next"&&o.dir==="ltr"||n==="previous"&&o.dir==="rtl"?"rotate(270deg)":"rotate(90deg)"})}))}BT.displayName="@mantine/dates/Chevron";var WNe=Object.defineProperty,YNe=Object.defineProperties,XNe=Object.getOwnPropertyDescriptors,e6=Object.getOwnPropertySymbols,ZNe=Object.prototype.hasOwnProperty,qNe=Object.prototype.propertyIsEnumerable,t6=(t,e,n)=>e in t?WNe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,t_=(t,e)=>{for(var n in e||(e={}))ZNe.call(e,n)&&t6(t,n,e[n]);if(e6)for(var n of e6(e))qNe.call(e,n)&&t6(t,n,e[n]);return t},n6=(t,e)=>YNe(t,XNe(e));const vg={xs:X(30),sm:X(36),md:X(42),lg:X(48),xl:X(54)};var KNe=ft((t,{radius:e,isStatic:n},{size:r})=>{const i=t.fn.variant({variant:"filled"}),o=t.fn.variant({variant:"light"});return{day:n6(t_({width:Oe({size:r,sizes:vg}),height:Oe({size:r,sizes:vg}),fontSize:Oe({size:r,sizes:t.fontSizes}),display:"inline-flex",justifyContent:"center",alignItems:"center",userSelect:n?void 0:"none",cursor:n?"default":"pointer",borderRadius:t.fn.radius(e)},n?null:t.fn.hover({backgroundColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[0]})),{"&:active":n?void 0:t.activeStyles,"&[data-disabled]":n6(t_({color:t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[4],cursor:"not-allowed"},t.fn.hover({backgroundColor:"transparent"})),{"&:active":{transform:"none"}}),"&[data-weekend]":{color:t.colors.red[t.fn.primaryShade()]},"&[data-outside]":{color:t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[4]},"&[data-in-range]":t_({backgroundColor:o.background,borderRadius:0},n?null:t.fn.hover({backgroundColor:o.hover})),"&[data-first-in-range]":{borderTopLeftRadius:t.radius.sm,borderBottomLeftRadius:t.radius.sm},"&[data-last-in-range]":{borderTopRightRadius:t.radius.sm,borderBottomRightRadius:t.radius.sm},"&[data-selected]":t_({color:i.color,backgroundColor:i.background},n?null:t.fn.hover({backgroundColor:i.hover})),"&[data-hidden]":{display:"none"}})}});const QNe=KNe;var JNe=Object.defineProperty,eFe=Object.defineProperties,tFe=Object.getOwnPropertyDescriptors,r6=Object.getOwnPropertySymbols,nFe=Object.prototype.hasOwnProperty,rFe=Object.prototype.propertyIsEnumerable,i6=(t,e,n)=>e in t?JNe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,n_=(t,e)=>{for(var n in e||(e={}))nFe.call(e,n)&&i6(t,n,e[n]);if(r6)for(var n of r6(e))rFe.call(e,n)&&i6(t,n,e[n]);return t},r_=(t,e)=>eFe(t,tFe(e)),iFe=ft((t,e,{size:n})=>{const r=Oe({size:n,sizes:vg});return{calendarHeaderControlIcon:{},calendarHeader:{display:"flex",maxWidth:`calc(${r} * 7 + ${X(7)})`},calendarHeaderControl:r_(n_({width:r,height:r,borderRadius:t.fn.radius(),display:"flex",justifyContent:"center",alignItems:"center",userSelect:"none"},t.fn.hover({backgroundColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[0]})),{"&:active":t.activeStyles,"&[data-disabled]":r_(n_({opacity:.2,cursor:"not-allowed"},t.fn.hover({backgroundColor:"transparent"})),{"&:active":{transform:"none"}})}),calendarHeaderLevel:r_(n_({height:r,borderRadius:t.fn.radius(),display:"flex",justifyContent:"center",alignItems:"center",userSelect:"none",flex:1,fontSize:Oe({size:n,sizes:t.fontSizes}),fontWeight:500,textTransform:"capitalize"},t.fn.hover({backgroundColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[0]})),{"&:active":t.activeStyles,"&[data-static]":r_(n_({cursor:"default",userSelect:"unset"},t.fn.hover({backgroundColor:"transparent"})),{"&:active":{transform:"none"}})})}});const oFe=iFe;var sFe=Object.defineProperty,N1=Object.getOwnPropertySymbols,Nq=Object.prototype.hasOwnProperty,Fq=Object.prototype.propertyIsEnumerable,o6=(t,e,n)=>e in t?sFe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,aFe=(t,e)=>{for(var n in e||(e={}))Nq.call(e,n)&&o6(t,n,e[n]);if(N1)for(var n of N1(e))Fq.call(e,n)&&o6(t,n,e[n]);return t},lFe=(t,e)=>{var n={};for(var r in t)Nq.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&N1)for(var r of N1(t))e.indexOf(r)<0&&Fq.call(t,r)&&(n[r]=t[r]);return n};const cFe={nextDisabled:!1,previousDisabled:!1,hasNextLevel:!0,withNext:!0,withPrevious:!0,size:"sm"},wb=M.forwardRef((t,e)=>{const n=nt("CalendarHeader",cFe,t),{className:r,nextIcon:i,previousIcon:o,nextLabel:s,previousLabel:a,onNext:l,onPrevious:c,onLevelClick:u,label:d,classNames:f,styles:h,unstyled:g,nextDisabled:y,previousDisabled:_,hasNextLevel:v,levelControlAriaLabel:x,withNext:w,withPrevious:S,__staticSelector:E,__preventFocus:C,__stopPropagation:O,size:R,variant:T}=n,A=lFe(n,["className","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","label","classNames","styles","unstyled","nextDisabled","previousDisabled","hasNextLevel","levelControlAriaLabel","withNext","withPrevious","__staticSelector","__preventFocus","__stopPropagation","size","variant"]),{classes:F,cx:N}=oFe(null,{name:["CalendarHeader",E],classNames:f,styles:h,unstyled:g,size:R,variant:T}),U=C?k=>k.preventDefault():void 0;return H.createElement(Xe,aFe({className:N(F.calendarHeader,r),ref:e},A),S&&H.createElement(Fs,{className:F.calendarHeaderControl,"data-previous":!0,"aria-label":a,onClick:c,unstyled:g,onMouseDown:U,disabled:_,"data-disabled":_||void 0,tabIndex:C?-1:0,"data-mantine-stop-propagation":O||void 0},o||H.createElement(BT,{className:F.calendarHeaderControlIcon,direction:"previous","data-previous":!0})),H.createElement(Fs,{component:v?"button":"div",className:F.calendarHeaderLevel,onClick:v?u:void 0,unstyled:g,onMouseDown:v?U:void 0,disabled:!v,"data-static":!v||void 0,"aria-label":x,tabIndex:C||!v?-1:0,"data-mantine-stop-propagation":O||void 0},d),w&&H.createElement(Fs,{className:F.calendarHeaderControl,"data-next":!0,"aria-label":s,onClick:l,unstyled:g,onMouseDown:U,disabled:y,"data-disabled":y||void 0,tabIndex:C?-1:0,"data-mantine-stop-propagation":O||void 0},i||H.createElement(BT,{className:F.calendarHeaderControlIcon,direction:"next","data-next":!0})))});wb.displayName="@mantine/dates/CalendarHeader";var zq={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Gf,function(){var n=1e3,r=6e4,i=36e5,o="millisecond",s="second",a="minute",l="hour",c="day",u="week",d="month",f="quarter",h="year",g="date",y="Invalid Date",_=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,x={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(U){var k=["th","st","nd","rd"],z=U%100;return"["+U+(k[(z-20)%10]||k[z]||k[0])+"]"}},w=function(U,k,z){var G=String(U);return!G||G.length>=k?U:""+Array(k+1-G.length).join(z)+U},S={s:w,z:function(U){var k=-U.utcOffset(),z=Math.abs(k),G=Math.floor(z/60),W=z%60;return(k<=0?"+":"-")+w(G,2,"0")+":"+w(W,2,"0")},m:function U(k,z){if(k.date()1)return U(j[0])}else{var $=k.name;C[$]=k,W=$}return!G&&W&&(E=W),W||!G&&E},T=function(U,k){if(O(U))return U.clone();var z=typeof k=="object"?k:{};return z.date=U,z.args=arguments,new F(z)},A=S;A.l=R,A.i=O,A.w=function(U,k){return T(U,{locale:k.$L,utc:k.$u,x:k.$x,$offset:k.$offset})};var F=function(){function U(z){this.$L=R(z.locale,null,!0),this.parse(z)}var k=U.prototype;return k.parse=function(z){this.$d=function(G){var W=G.date,B=G.utc;if(W===null)return new Date(NaN);if(A.u(W))return new Date;if(W instanceof Date)return new Date(W);if(typeof W=="string"&&!/Z$/i.test(W)){var j=W.match(_);if(j){var $=j[2]-1||0,q=(j[7]||"0").substring(0,3);return B?new Date(Date.UTC(j[1],$,j[3]||1,j[4]||0,j[5]||0,j[6]||0,q)):new Date(j[1],$,j[3]||1,j[4]||0,j[5]||0,j[6]||0,q)}}return new Date(W)}(z),this.$x=z.x||{},this.init()},k.init=function(){var z=this.$d;this.$y=z.getFullYear(),this.$M=z.getMonth(),this.$D=z.getDate(),this.$W=z.getDay(),this.$H=z.getHours(),this.$m=z.getMinutes(),this.$s=z.getSeconds(),this.$ms=z.getMilliseconds()},k.$utils=function(){return A},k.isValid=function(){return this.$d.toString()!==y},k.isSame=function(z,G){var W=T(z);return this.startOf(G)<=W&&W<=this.endOf(G)},k.isAfter=function(z,G){return T(z)({calendar:{}}));const hFe=fFe;var pFe=ft((t,e,{size:n})=>({monthLevelGroup:{display:"flex","& [data-month-level]:not(:last-of-type)":{marginRight:Oe({size:n,sizes:t.spacing})}}}));const mFe=pFe;var gFe=ft(t=>({monthLevel:{},calendarHeader:{marginBottom:t.spacing.xs}}));const vFe=gFe,yFe={locale:"en",firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:"–"},_Fe=M.createContext(yFe);var xFe=Object.defineProperty,wFe=Object.defineProperties,SFe=Object.getOwnPropertyDescriptors,s6=Object.getOwnPropertySymbols,bFe=Object.prototype.hasOwnProperty,MFe=Object.prototype.propertyIsEnumerable,a6=(t,e,n)=>e in t?xFe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,EFe=(t,e)=>{for(var n in e||(e={}))bFe.call(e,n)&&a6(t,n,e[n]);if(s6)for(var n of s6(e))MFe.call(e,n)&&a6(t,n,e[n]);return t},PFe=(t,e)=>wFe(t,SFe(e));function Uc(){const t=M.useContext(_Fe),e=M.useCallback(o=>o||t.locale,[t.locale]),n=M.useCallback(o=>typeof o=="number"?o:t.firstDayOfWeek,[t.firstDayOfWeek]),r=M.useCallback(o=>Array.isArray(o)?o:t.weekendDays,[t.weekendDays]),i=M.useCallback(o=>typeof o=="string"?o:t.labelSeparator,[t.labelSeparator]);return PFe(EFe({},t),{getLocale:e,getFirstDayOfWeek:n,getWeekendDays:r,getLabelSeparator:i})}function CFe(t,e=1){const n=new Date(t);for(;n.getDay()!==e;)n.setDate(n.getDate()-1);return n}function TFe(t,e=1){const n=new Date(t),r=e===0?6:e-1;for(;n.getDay()!==r;)n.setDate(n.getDate()+1);return n}function OFe(t,e=1){const n=t.getMonth(),r=new Date(t.getFullYear(),n,1),i=new Date(t.getFullYear(),t.getMonth()+1,0),o=TFe(i,e),s=CFe(r,e),a=[];for(;s<=o;){const l=[];for(let c=0;c<7;c+=1)l.push(new Date(s)),s.setDate(s.getDate()+1);a.push(l)}return a}function Uq(t,e){return t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()}function Bq(t,e){return e instanceof Date?qt(t).isBefore(qt(e).add(1,"day"),"day"):!0}function Hq(t,e){return e instanceof Date?qt(t).isAfter(qt(e).subtract(1,"day"),"day"):!0}var RFe=Object.defineProperty,AFe=Object.defineProperties,DFe=Object.getOwnPropertyDescriptors,l6=Object.getOwnPropertySymbols,IFe=Object.prototype.hasOwnProperty,LFe=Object.prototype.propertyIsEnumerable,c6=(t,e,n)=>e in t?RFe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,kFe=(t,e)=>{for(var n in e||(e={}))IFe.call(e,n)&&c6(t,n,e[n]);if(l6)for(var n of l6(e))LFe.call(e,n)&&c6(t,n,e[n]);return t},NFe=(t,e)=>AFe(t,DFe(e)),FFe=ft(t=>({monthThead:{},monthRow:{},monthTbody:{},monthCell:{padding:0,"&[data-with-spacing]":{padding:X(.5)}},month:NFe(kFe({},t.fn.fontStyles()),{borderCollapse:"collapse",tableLayout:"fixed","& *":{boxSizing:"border-box"}})}));const zFe=FFe;function UFe(t,e,n,r,i,o,s){const a=t.flat().filter(u=>{var d;return Bq(u,n)&&Hq(u,e)&&!i?.(u)&&!((d=r?.(u))!=null&&d.disabled)&&(!o||Uq(u,s))}),l=a.find(u=>{var d;return(d=r?.(u))==null?void 0:d.selected});if(l)return l;const c=a.find(u=>qt().isSame(u,"date"));return c||a[0]}var BFe=Object.defineProperty,F1=Object.getOwnPropertySymbols,Vq=Object.prototype.hasOwnProperty,jq=Object.prototype.propertyIsEnumerable,u6=(t,e,n)=>e in t?BFe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,HFe=(t,e)=>{for(var n in e||(e={}))Vq.call(e,n)&&u6(t,n,e[n]);if(F1)for(var n of F1(e))jq.call(e,n)&&u6(t,n,e[n]);return t},VFe=(t,e)=>{var n={};for(var r in t)Vq.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&F1)for(var r of F1(t))e.indexOf(r)<0&&jq.call(t,r)&&(n[r]=t[r]);return n};const jFe={tabIndex:0,size:"sm"},$q=M.forwardRef((t,e)=>{const n=nt("Day",jFe,t),{className:r,date:i,radius:o,disabled:s,styles:a,classNames:l,unstyled:c,__staticSelector:u,weekend:d,outside:f,selected:h,renderDay:g,inRange:y,firstInRange:_,lastInRange:v,hidden:x,static:w,variant:S,size:E}=n,C=VFe(n,["className","date","radius","disabled","styles","classNames","unstyled","__staticSelector","weekend","outside","selected","renderDay","inRange","firstInRange","lastInRange","hidden","static","variant","size"]),{classes:O,cx:R}=QNe({radius:o,isStatic:w},{name:["Day",u],classNames:l,styles:a,unstyled:c,variant:S,size:E});return H.createElement(Fs,HFe({component:w?"div":"button",ref:e,className:R(O.day,r),disabled:s,"data-today":qt(i).isSame(new Date,"day")||void 0,"data-hidden":x||void 0,"data-disabled":s||void 0,"data-weekend":!s&&!f&&d||void 0,"data-outside":!s&&f||void 0,"data-selected":!s&&h||void 0,"data-in-range":y&&!s||void 0,"data-first-in-range":_&&!s||void 0,"data-last-in-range":v&&!s||void 0,unstyled:c},C),g?.(i)||i.getDate())});$q.displayName="@mantine/dates/Day";function $Fe({locale:t,format:e="dd",firstDayOfWeek:n=1}){const r=qt().day(n),i=[];for(let o=0;o<7;o+=1)typeof e=="string"?i.push(qt(r).add(o,"days").locale(t).format(e)):i.push(e(qt(r).add(o,"days").toDate()));return i}var GFe=ft((t,e,{size:n})=>({weekdaysRow:{},weekday:{color:t.colorScheme==="dark"?t.colors.dark[1]:t.colors.gray[5],fontWeight:400,fontSize:Oe({size:n,sizes:t.fontSizes}),textTransform:"capitalize",paddingBottom:`calc(${Oe({size:n,sizes:t.spacing})} / 2)`}}));const WFe=GFe;var YFe=Object.defineProperty,z1=Object.getOwnPropertySymbols,Gq=Object.prototype.hasOwnProperty,Wq=Object.prototype.propertyIsEnumerable,d6=(t,e,n)=>e in t?YFe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,XFe=(t,e)=>{for(var n in e||(e={}))Gq.call(e,n)&&d6(t,n,e[n]);if(z1)for(var n of z1(e))Wq.call(e,n)&&d6(t,n,e[n]);return t},ZFe=(t,e)=>{var n={};for(var r in t)Gq.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&z1)for(var r of z1(t))e.indexOf(r)<0&&Wq.call(t,r)&&(n[r]=t[r]);return n};const qFe={weekdayFormat:"dd",cellComponent:"th",size:"sm"},Yq=M.forwardRef((t,e)=>{const n=nt("WeekdaysRow",qFe,t),{className:r,locale:i,firstDayOfWeek:o,weekdayFormat:s,cellComponent:a,__staticSelector:l,classNames:c,styles:u,unstyled:d,variant:f,size:h}=n,g=ZFe(n,["className","locale","firstDayOfWeek","weekdayFormat","cellComponent","__staticSelector","classNames","styles","unstyled","variant","size"]),y=Uc(),{classes:_,cx:v}=WFe(null,{name:["WeekdaysRow",l],classNames:c,styles:u,unstyled:d,variant:f,size:h}),x=$Fe({locale:y.getLocale(i),format:s,firstDayOfWeek:y.getFirstDayOfWeek(o)}).map((w,S)=>H.createElement(a,{key:S,className:_.weekday},w));return H.createElement(Xe,XFe({component:"tr",ref:e,className:v(_.weekdaysRow,r)},g),x)});Yq.displayName="@mantine/dates/WeekdaysRow";var KFe=Object.defineProperty,QFe=Object.defineProperties,JFe=Object.getOwnPropertyDescriptors,U1=Object.getOwnPropertySymbols,Xq=Object.prototype.hasOwnProperty,Zq=Object.prototype.propertyIsEnumerable,f6=(t,e,n)=>e in t?KFe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,i_=(t,e)=>{for(var n in e||(e={}))Xq.call(e,n)&&f6(t,n,e[n]);if(U1)for(var n of U1(e))Zq.call(e,n)&&f6(t,n,e[n]);return t},JP=(t,e)=>QFe(t,JFe(e)),eze=(t,e)=>{var n={};for(var r in t)Xq.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&U1)for(var r of U1(t))e.indexOf(r)<0&&Zq.call(t,r)&&(n[r]=t[r]);return n};const tze={size:"sm",withCellSpacing:!0},qq=M.forwardRef((t,e)=>{const n=nt("Month",tze,t),{className:r,classNames:i,styles:o,unstyled:s,__staticSelector:a,locale:l,firstDayOfWeek:c,weekdayFormat:u,month:d,weekendDays:f,getDayProps:h,excludeDate:g,minDate:y,maxDate:_,renderDay:v,hideOutsideDates:x,hideWeekdays:w,getDayAriaLabel:S,static:E,__getDayRef:C,__onDayKeyDown:O,__onDayClick:R,__onDayMouseEnter:T,__preventFocus:A,__stopPropagation:F,withCellSpacing:N,size:U,variant:k}=n,z=eze(n,["className","classNames","styles","unstyled","__staticSelector","locale","firstDayOfWeek","weekdayFormat","month","weekendDays","getDayProps","excludeDate","minDate","maxDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","static","__getDayRef","__onDayKeyDown","__onDayClick","__onDayMouseEnter","__preventFocus","__stopPropagation","withCellSpacing","size","variant"]),G=Uc(),{classes:W,cx:B}=zFe(null,{name:["Month",a],classNames:i,styles:o,unstyled:s,variant:k,size:U}),j={__staticSelector:a||"Month",classNames:i,styles:o,unstyled:s,variant:k,size:U},$=OFe(d,G.getFirstDayOfWeek(c)),q=UFe($,y,_,h,g,x,d),K=$.map((re,J)=>{const le=re.map((ae,oe)=>{const De=!Uq(ae,d),Te=S?.(ae)||qt(ae).locale(l||G.locale).format("D MMMM YYYY"),ve=h?.(ae),we=qt(ae).isSame(q,"date");return H.createElement("td",{key:ae.toString(),className:W.monthCell,"data-with-spacing":N||void 0},H.createElement($q,JP(i_(JP(i_({},j),{"data-mantine-stop-propagation":F||void 0,renderDay:v,date:ae,weekend:G.getWeekendDays(f).includes(ae.getDay()),outside:De,hidden:x?De:!1,"aria-label":Te,static:E,disabled:g?.(ae)||!Bq(ae,_)||!Hq(ae,y),ref:me=>C?.(J,oe,me)}),ve),{onKeyDown:me=>{var se;(se=ve?.onKeyDown)==null||se.call(ve,me),O?.(me,{rowIndex:J,cellIndex:oe,date:ae})},onMouseEnter:me=>{var se;(se=ve?.onMouseEnter)==null||se.call(ve,me),T?.(me,ae)},onClick:me=>{var se;(se=ve?.onClick)==null||se.call(ve,me),R?.(me,ae)},onMouseDown:me=>{var se;(se=ve?.onMouseDown)==null||se.call(ve,me),A&&me.preventDefault()},tabIndex:A||!we?-1:0})))});return H.createElement("tr",{key:J,className:W.monthRow},le)});return H.createElement(Xe,i_({component:"table",className:B(W.month,r),ref:e},z),!w&&H.createElement("thead",{className:W.monthThead},H.createElement(Yq,JP(i_({},j),{locale:l,firstDayOfWeek:c,weekdayFormat:u}))),H.createElement("tbody",{className:W.monthTbody},K))});qq.displayName="@mantine/dates/Month";var nze=Object.defineProperty,B1=Object.getOwnPropertySymbols,Kq=Object.prototype.hasOwnProperty,Qq=Object.prototype.propertyIsEnumerable,h6=(t,e,n)=>e in t?nze(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,eC=(t,e)=>{for(var n in e||(e={}))Kq.call(e,n)&&h6(t,n,e[n]);if(B1)for(var n of B1(e))Qq.call(e,n)&&h6(t,n,e[n]);return t},rze=(t,e)=>{var n={};for(var r in t)Kq.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&B1)for(var r of B1(t))e.indexOf(r)<0&&Qq.call(t,r)&&(n[r]=t[r]);return n};const ize={monthLabelFormat:"MMMM YYYY"},Jq=M.forwardRef((t,e)=>{const n=nt("MonthLevel",ize,t),{month:r,locale:i,firstDayOfWeek:o,weekdayFormat:s,weekendDays:a,getDayProps:l,excludeDate:c,minDate:u,maxDate:d,renderDay:f,hideOutsideDates:h,hideWeekdays:g,getDayAriaLabel:y,__getDayRef:_,__onDayKeyDown:v,__onDayClick:x,__onDayMouseEnter:w,withCellSpacing:S,__preventFocus:E,__stopPropagation:C,nextIcon:O,previousIcon:R,nextLabel:T,previousLabel:A,onNext:F,onPrevious:N,onLevelClick:U,nextDisabled:k,previousDisabled:z,hasNextLevel:G,levelControlAriaLabel:W,withNext:B,withPrevious:j,className:$,monthLabelFormat:q,classNames:K,styles:re,unstyled:J,__staticSelector:le,size:ae,variant:oe,static:De}=n,Te=rze(n,["month","locale","firstDayOfWeek","weekdayFormat","weekendDays","getDayProps","excludeDate","minDate","maxDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","__getDayRef","__onDayKeyDown","__onDayClick","__onDayMouseEnter","withCellSpacing","__preventFocus","__stopPropagation","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","nextDisabled","previousDisabled","hasNextLevel","levelControlAriaLabel","withNext","withPrevious","className","monthLabelFormat","classNames","styles","unstyled","__staticSelector","size","variant","static"]),{classes:ve,cx:we}=vFe(null,{name:["MonthLevel",le],classNames:K,styles:re,unstyled:J,variant:oe,size:ae}),me=Uc(),se={__staticSelector:le||"MonthLevel",classNames:K,styles:re,unstyled:J,variant:oe,size:ae},de=typeof k=="boolean"?k:d?!qt(r).endOf("month").isBefore(d):!1,ke=typeof z=="boolean"?z:u?!qt(r).startOf("month").isAfter(u):!1;return H.createElement(Xe,eC({className:we(ve.monthLevel,$),"data-month-level":!0,ref:e},Te),H.createElement(wb,eC({label:typeof q=="function"?q(r):qt(r).locale(i||me.locale).format(q),className:ve.calendarHeader,__preventFocus:E,__stopPropagation:C,nextIcon:O,previousIcon:R,nextLabel:T,previousLabel:A,onNext:F,onPrevious:N,onLevelClick:U,nextDisabled:de,previousDisabled:ke,hasNextLevel:G,levelControlAriaLabel:W,withNext:B,withPrevious:j},se)),H.createElement(qq,eC({month:r,locale:i,firstDayOfWeek:o,weekdayFormat:s,weekendDays:a,getDayProps:l,excludeDate:c,minDate:u,maxDate:d,renderDay:f,hideOutsideDates:h,hideWeekdays:g,getDayAriaLabel:y,__getDayRef:_,__onDayKeyDown:v,__onDayClick:x,__onDayMouseEnter:w,__preventFocus:E,__stopPropagation:C,static:De,withCellSpacing:S},se)))});Jq.displayName="@mantine/dates/MonthLevel";function oze({direction:t,levelIndex:e,rowIndex:n,cellIndex:r,size:i}){switch(t){case"up":return e===0&&n===0?null:n===0?{levelIndex:e-1,rowIndex:r<=i[e-1][i[e-1].length-1]-1?i[e-1].length-1:i[e-1].length-2,cellIndex:r}:{levelIndex:e,rowIndex:n-1,cellIndex:r};case"down":return n===i[e].length-1?{levelIndex:e+1,rowIndex:0,cellIndex:r}:n===i[e].length-2&&r>=i[e][i[e].length-1]?{levelIndex:e+1,rowIndex:0,cellIndex:r}:{levelIndex:e,rowIndex:n+1,cellIndex:r};case"left":return e===0&&n===0&&r===0?null:n===0&&r===0?{levelIndex:e-1,rowIndex:i[e-1].length-1,cellIndex:i[e-1][i[e-1].length-1]-1}:r===0?{levelIndex:e,rowIndex:n-1,cellIndex:i[e][n-1]-1}:{levelIndex:e,rowIndex:n,cellIndex:r-1};case"right":return n===i[e].length-1&&r===i[e][n]-1?{levelIndex:e+1,rowIndex:0,cellIndex:0}:r===i[e][n]-1?{levelIndex:e,rowIndex:n+1,cellIndex:0}:{levelIndex:e,rowIndex:n,cellIndex:r+1};default:return{levelIndex:e,rowIndex:n,cellIndex:r}}}function eK({controlsRef:t,direction:e,levelIndex:n,rowIndex:r,cellIndex:i,size:o}){var s,a;const l=oze({direction:e,size:o,rowIndex:r,cellIndex:i,levelIndex:n});if(!l)return;const c=(a=(s=t.current[l.levelIndex])==null?void 0:s[l.rowIndex])==null?void 0:a[l.cellIndex];c&&(c.disabled||c.getAttribute("data-hidden")||c.getAttribute("data-outside")?eK({controlsRef:t,direction:e,levelIndex:l.levelIndex,cellIndex:l.cellIndex,rowIndex:l.rowIndex,size:o}):c.focus())}function sze(t){switch(t){case"ArrowDown":return"down";case"ArrowUp":return"up";case"ArrowRight":return"right";case"ArrowLeft":return"left";default:return null}}function aze(t){return t.current.map(e=>e.map(n=>n.length))}function HA({controlsRef:t,levelIndex:e,rowIndex:n,cellIndex:r,event:i}){const o=sze(i.key);if(o){i.preventDefault();const s=aze(t);eK({controlsRef:t,direction:o,levelIndex:e,rowIndex:n,cellIndex:r,size:s})}}var lze=Object.defineProperty,H1=Object.getOwnPropertySymbols,tK=Object.prototype.hasOwnProperty,nK=Object.prototype.propertyIsEnumerable,p6=(t,e,n)=>e in t?lze(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,cze=(t,e)=>{for(var n in e||(e={}))tK.call(e,n)&&p6(t,n,e[n]);if(H1)for(var n of H1(e))nK.call(e,n)&&p6(t,n,e[n]);return t},uze=(t,e)=>{var n={};for(var r in t)tK.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&H1)for(var r of H1(t))e.indexOf(r)<0&&nK.call(t,r)&&(n[r]=t[r]);return n};const dze={numberOfColumns:1},rK=M.forwardRef((t,e)=>{const n=nt("MonthLevelGroup",dze,t),{month:r,locale:i,firstDayOfWeek:o,weekdayFormat:s,weekendDays:a,getDayProps:l,excludeDate:c,minDate:u,maxDate:d,renderDay:f,hideOutsideDates:h,hideWeekdays:g,getDayAriaLabel:y,__onDayClick:_,__onDayMouseEnter:v,withCellSpacing:x,__preventFocus:w,nextIcon:S,previousIcon:E,nextLabel:C,previousLabel:O,onNext:R,onPrevious:T,onLevelClick:A,nextDisabled:F,previousDisabled:N,hasNextLevel:U,className:k,classNames:z,styles:G,unstyled:W,numberOfColumns:B,levelControlAriaLabel:j,monthLabelFormat:$,__staticSelector:q,__stopPropagation:K,size:re,variant:J,static:le}=n,ae=uze(n,["month","locale","firstDayOfWeek","weekdayFormat","weekendDays","getDayProps","excludeDate","minDate","maxDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","__onDayClick","__onDayMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","nextDisabled","previousDisabled","hasNextLevel","className","classNames","styles","unstyled","numberOfColumns","levelControlAriaLabel","monthLabelFormat","__staticSelector","__stopPropagation","size","variant","static"]),{classes:oe,cx:De}=mFe(null,{name:["MonthLevelGroup",q],classNames:z,styles:G,unstyled:W,variant:J,size:re}),Te=M.useRef([]),ve=Array(B).fill(0).map((we,me)=>{const se=qt(r).add(me,"months").toDate();return H.createElement(Jq,{key:me,month:se,withNext:me===B-1,withPrevious:me===0,monthLabelFormat:$,__stopPropagation:K,__onDayClick:_,__onDayMouseEnter:v,__onDayKeyDown:(de,ke)=>HA({levelIndex:me,rowIndex:ke.rowIndex,cellIndex:ke.cellIndex,event:de,controlsRef:Te}),__getDayRef:(de,ke,Ve)=>{Array.isArray(Te.current[me])||(Te.current[me]=[]),Array.isArray(Te.current[me][de])||(Te.current[me][de]=[]),Te.current[me][de][ke]=Ve},levelControlAriaLabel:typeof j=="function"?j(se):j,locale:i,firstDayOfWeek:o,weekdayFormat:s,weekendDays:a,getDayProps:l,excludeDate:c,minDate:u,maxDate:d,renderDay:f,hideOutsideDates:h,hideWeekdays:g,getDayAriaLabel:y,__preventFocus:w,nextIcon:S,previousIcon:E,nextLabel:C,previousLabel:O,onNext:R,onPrevious:T,onLevelClick:A,nextDisabled:F,previousDisabled:N,hasNextLevel:U,classNames:z,styles:G,unstyled:W,__staticSelector:q||"MonthLevelGroup",size:re,variant:J,static:le,withCellSpacing:x})});return H.createElement(Xe,cze({className:De(oe.monthLevelGroup,k),ref:e},ae),ve)});rK.displayName="@mantine/dates/MonthLevelGroup";var fze=ft((t,e,{size:n})=>({yearLevelGroup:{display:"flex","& [data-year-level]:not(:last-of-type)":{marginRight:Oe({size:n,sizes:t.spacing})}}}));const hze=fze;var pze=ft(t=>({yearLevel:{},calendarHeader:{marginBottom:t.spacing.xs}}));const mze=pze;function gze(t){const e=qt(t).startOf("year").toDate(),n=[[],[],[],[]];let r=0;for(let i=0;i<4;i+=1)for(let o=0;o<3;o+=1)n[i].push(qt(e).add(r,"months").toDate()),r+=1;return n}function iK(t,e,n){return!e&&!n?!1:!!(e&&qt(t).isBefore(e,"month")||n&&qt(t).isAfter(n,"month"))}var vze=ft(()=>({monthsList:{borderCollapse:"collapse",borderWidth:0,cursor:"pointer"},monthsListCell:{padding:0,"&[data-with-spacing]":{padding:X(.5)}},monthsListRow:{}}));const yze=vze;function _ze(t,e,n,r){const i=t.flat().filter(a=>{var l;return!iK(a,e,n)&&!((l=r?.(a))!=null&&l.disabled)}),o=i.find(a=>{var l;return(l=r?.(a))==null?void 0:l.selected});if(o)return o;const s=i.find(a=>qt().isSame(a,"month"));return s||i[0]}var xze=Object.defineProperty,wze=Object.defineProperties,Sze=Object.getOwnPropertyDescriptors,m6=Object.getOwnPropertySymbols,bze=Object.prototype.hasOwnProperty,Mze=Object.prototype.propertyIsEnumerable,g6=(t,e,n)=>e in t?xze(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,o_=(t,e)=>{for(var n in e||(e={}))bze.call(e,n)&&g6(t,n,e[n]);if(m6)for(var n of m6(e))Mze.call(e,n)&&g6(t,n,e[n]);return t},v6=(t,e)=>wze(t,Sze(e)),Eze=ft((t,e,{size:n})=>{const r=t.fn.variant({variant:"filled"}),i=t.fn.variant({variant:"light"});return{pickerControl:v6(o_({fontSize:Oe({size:n,sizes:t.fontSizes}),height:Oe({size:n,sizes:vg}),width:`calc((${Oe({size:n,sizes:vg})} * 7) / 3 + ${X(1.5)})`,display:"flex",justifyContent:"center",alignItems:"center",userSelect:"none",borderRadius:t.fn.radius()},t.fn.hover({backgroundColor:t.colorScheme==="dark"?t.colors.dark[5]:t.colors.gray[0]})),{"&:active":t.activeStyles,"&[data-in-range]":o_({backgroundColor:i.background,borderRadius:0},t.fn.hover({backgroundColor:i.hover})),"&[data-first-in-range]":{borderRadius:0,borderTopLeftRadius:t.radius.sm,borderBottomLeftRadius:t.radius.sm},"&[data-last-in-range]":{borderRadius:0,borderTopRightRadius:t.radius.sm,borderBottomRightRadius:t.radius.sm},"&[data-last-in-range][data-first-in-range]":{borderRadius:t.radius.sm},"&[data-selected]":o_({color:r.color,backgroundColor:r.background},t.fn.hover({backgroundColor:r.hover})),"&[data-disabled]":v6(o_({color:t.colorScheme==="dark"?t.colors.dark[3]:t.colors.gray[4],cursor:"not-allowed"},t.fn.hover({backgroundColor:"transparent"})),{"&:active":{transform:"none"}})})}});const Pze=Eze;var Cze=Object.defineProperty,V1=Object.getOwnPropertySymbols,oK=Object.prototype.hasOwnProperty,sK=Object.prototype.propertyIsEnumerable,y6=(t,e,n)=>e in t?Cze(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Tze=(t,e)=>{for(var n in e||(e={}))oK.call(e,n)&&y6(t,n,e[n]);if(V1)for(var n of V1(e))sK.call(e,n)&&y6(t,n,e[n]);return t},Oze=(t,e)=>{var n={};for(var r in t)oK.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&V1)for(var r of V1(t))e.indexOf(r)<0&&sK.call(t,r)&&(n[r]=t[r]);return n};const Rze={size:"sm"},VA=M.forwardRef((t,e)=>{const n=nt("PickerControl",Rze,t),{className:r,children:i,disabled:o,selected:s,classNames:a,styles:l,unstyled:c,firstInRange:u,lastInRange:d,inRange:f,__staticSelector:h,size:g,variant:y}=n,_=Oze(n,["className","children","disabled","selected","classNames","styles","unstyled","firstInRange","lastInRange","inRange","__staticSelector","size","variant"]),{classes:v,cx:x}=Pze(null,{name:["PickerControl",h],classNames:a,styles:l,unstyled:c,variant:y,size:g});return H.createElement(Fs,Tze({className:x(v.pickerControl,r),ref:e,unstyled:c,"data-picker-control":!0,"data-selected":s&&!o||void 0,"data-disabled":o||void 0,"data-in-range":f&&!o&&!s||void 0,"data-first-in-range":u&&!o||void 0,"data-last-in-range":d&&!o||void 0,disabled:o},_),i)});VA.displayName="@mantine/dates/PickerControl";var Aze=Object.defineProperty,Dze=Object.defineProperties,Ize=Object.getOwnPropertyDescriptors,j1=Object.getOwnPropertySymbols,aK=Object.prototype.hasOwnProperty,lK=Object.prototype.propertyIsEnumerable,_6=(t,e,n)=>e in t?Aze(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,x6=(t,e)=>{for(var n in e||(e={}))aK.call(e,n)&&_6(t,n,e[n]);if(j1)for(var n of j1(e))lK.call(e,n)&&_6(t,n,e[n]);return t},Lze=(t,e)=>Dze(t,Ize(e)),kze=(t,e)=>{var n={};for(var r in t)aK.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&j1)for(var r of j1(t))e.indexOf(r)<0&&lK.call(t,r)&&(n[r]=t[r]);return n};const Nze={monthsListFormat:"MMM",size:"sm",withCellSpacing:!0},cK=M.forwardRef((t,e)=>{const n=nt("MonthsList",Nze,t),{year:r,className:i,monthsListFormat:o,locale:s,minDate:a,maxDate:l,getMonthControlProps:c,classNames:u,styles:d,unstyled:f,__staticSelector:h,__getControlRef:g,__onControlKeyDown:y,__onControlClick:_,__onControlMouseEnter:v,__preventFocus:x,size:w,variant:S,__stopPropagation:E,withCellSpacing:C}=n,O=kze(n,["year","className","monthsListFormat","locale","minDate","maxDate","getMonthControlProps","classNames","styles","unstyled","__staticSelector","__getControlRef","__onControlKeyDown","__onControlClick","__onControlMouseEnter","__preventFocus","size","variant","__stopPropagation","withCellSpacing"]),{classes:R,cx:T}=yze(null,{name:["MonthsList",h],classNames:u,styles:d,unstyled:f,variant:S,size:w}),A=Uc(),F=gze(r),N=_ze(F,a,l,c),U=F.map((k,z)=>{const G=k.map((W,B)=>{const j=c?.(W),$=qt(W).isSame(N,"month");return H.createElement("td",{key:B,className:R.monthsListCell,"data-with-spacing":C||void 0},H.createElement(VA,Lze(x6({variant:S,size:w,classNames:u,styles:d,unstyled:f,__staticSelector:h||"MonthsList","data-mantine-stop-propagation":E||void 0,disabled:iK(W,a,l),ref:q=>g?.(z,B,q)},j),{onKeyDown:q=>{var K;(K=j?.onKeyDown)==null||K.call(j,q),y?.(q,{rowIndex:z,cellIndex:B,date:W})},onClick:q=>{var K;(K=j?.onClick)==null||K.call(j,q),_?.(q,W)},onMouseEnter:q=>{var K;(K=j?.onMouseEnter)==null||K.call(j,q),v?.(q,W)},onMouseDown:q=>{var K;(K=j?.onMouseDown)==null||K.call(j,q),x&&q.preventDefault()},tabIndex:x||!$?-1:0}),qt(W).locale(A.getLocale(s)).format(o)))});return H.createElement("tr",{key:z,className:R.monthsListRow},G)});return H.createElement(Xe,x6({component:"table",ref:e,className:T(R.monthsList,i)},O),H.createElement("tbody",null,U))});cK.displayName="@mantine/dates/MonthsList";var Fze=Object.defineProperty,$1=Object.getOwnPropertySymbols,uK=Object.prototype.hasOwnProperty,dK=Object.prototype.propertyIsEnumerable,w6=(t,e,n)=>e in t?Fze(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,tC=(t,e)=>{for(var n in e||(e={}))uK.call(e,n)&&w6(t,n,e[n]);if($1)for(var n of $1(e))dK.call(e,n)&&w6(t,n,e[n]);return t},zze=(t,e)=>{var n={};for(var r in t)uK.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&$1)for(var r of $1(t))e.indexOf(r)<0&&dK.call(t,r)&&(n[r]=t[r]);return n};const Uze={yearLabelFormat:"YYYY",size:"sm"},fK=M.forwardRef((t,e)=>{const n=nt("YearLevel",Uze,t),{year:r,locale:i,minDate:o,maxDate:s,monthsListFormat:a,getMonthControlProps:l,__getControlRef:c,__onControlKeyDown:u,__onControlClick:d,__onControlMouseEnter:f,withCellSpacing:h,__preventFocus:g,nextIcon:y,previousIcon:_,nextLabel:v,previousLabel:x,onNext:w,onPrevious:S,onLevelClick:E,nextDisabled:C,previousDisabled:O,hasNextLevel:R,levelControlAriaLabel:T,withNext:A,withPrevious:F,className:N,yearLabelFormat:U,classNames:k,styles:z,unstyled:G,__staticSelector:W,__stopPropagation:B,size:j,variant:$}=n,q=zze(n,["year","locale","minDate","maxDate","monthsListFormat","getMonthControlProps","__getControlRef","__onControlKeyDown","__onControlClick","__onControlMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","nextDisabled","previousDisabled","hasNextLevel","levelControlAriaLabel","withNext","withPrevious","className","yearLabelFormat","classNames","styles","unstyled","__staticSelector","__stopPropagation","size","variant"]),{classes:K,cx:re}=mze(null,{name:["YearLevel",W],classNames:k,styles:z,unstyled:G,size:j,variant:$}),J=Uc(),le={__staticSelector:W||"YearLevel",classNames:k,styles:z,unstyled:G,size:j,variant:$},ae=typeof C=="boolean"?C:s?!qt(r).endOf("year").isBefore(s):!1,oe=typeof O=="boolean"?O:o?!qt(r).startOf("year").isAfter(o):!1;return H.createElement(Xe,tC({className:re(K.yearLevel,N),"data-year-level":!0,ref:e},q),H.createElement(wb,tC({label:typeof U=="function"?U(r):qt(r).locale(i||J.locale).format(U),className:K.calendarHeader,__preventFocus:g,__stopPropagation:B,nextIcon:y,previousIcon:_,nextLabel:v,previousLabel:x,onNext:w,onPrevious:S,onLevelClick:E,nextDisabled:ae,previousDisabled:oe,hasNextLevel:R,levelControlAriaLabel:T,withNext:A,withPrevious:F},le)),H.createElement(cK,tC({year:r,locale:i,minDate:o,maxDate:s,monthsListFormat:a,getMonthControlProps:l,__getControlRef:c,__onControlKeyDown:u,__onControlClick:d,__onControlMouseEnter:f,__preventFocus:g,__stopPropagation:B,withCellSpacing:h},le)))});fK.displayName="@mantine/dates/YearLevel";var Bze=Object.defineProperty,G1=Object.getOwnPropertySymbols,hK=Object.prototype.hasOwnProperty,pK=Object.prototype.propertyIsEnumerable,S6=(t,e,n)=>e in t?Bze(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Hze=(t,e)=>{for(var n in e||(e={}))hK.call(e,n)&&S6(t,n,e[n]);if(G1)for(var n of G1(e))pK.call(e,n)&&S6(t,n,e[n]);return t},Vze=(t,e)=>{var n={};for(var r in t)hK.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&G1)for(var r of G1(t))e.indexOf(r)<0&&pK.call(t,r)&&(n[r]=t[r]);return n};const jze={numberOfColumns:1,size:"sm"},mK=M.forwardRef((t,e)=>{const n=nt("YearLevelGroup",jze,t),{year:r,locale:i,minDate:o,maxDate:s,monthsListFormat:a,getMonthControlProps:l,__onControlClick:c,__onControlMouseEnter:u,withCellSpacing:d,__preventFocus:f,nextIcon:h,previousIcon:g,nextLabel:y,previousLabel:_,onNext:v,onPrevious:x,onLevelClick:w,nextDisabled:S,previousDisabled:E,hasNextLevel:C,className:O,classNames:R,styles:T,unstyled:A,__staticSelector:F,__stopPropagation:N,numberOfColumns:U,levelControlAriaLabel:k,yearLabelFormat:z,variant:G,size:W}=n,B=Vze(n,["year","locale","minDate","maxDate","monthsListFormat","getMonthControlProps","__onControlClick","__onControlMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","nextDisabled","previousDisabled","hasNextLevel","className","classNames","styles","unstyled","__staticSelector","__stopPropagation","numberOfColumns","levelControlAriaLabel","yearLabelFormat","variant","size"]),{classes:j,cx:$}=hze(null,{name:["YearLevelGroup",F],styles:T,classNames:R,unstyled:A,variant:G,size:W}),q=M.useRef([]),K=Array(U).fill(0).map((re,J)=>{const le=qt(r).add(J,"years").toDate();return H.createElement(fK,{key:J,variant:G,size:W,monthsListFormat:a,year:le,withNext:J===U-1,withPrevious:J===0,yearLabelFormat:z,__stopPropagation:N,__onControlClick:c,__onControlMouseEnter:u,__onControlKeyDown:(ae,oe)=>HA({levelIndex:J,rowIndex:oe.rowIndex,cellIndex:oe.cellIndex,event:ae,controlsRef:q}),__getControlRef:(ae,oe,De)=>{Array.isArray(q.current[J])||(q.current[J]=[]),Array.isArray(q.current[J][ae])||(q.current[J][ae]=[]),q.current[J][ae][oe]=De},levelControlAriaLabel:typeof k=="function"?k(le):k,locale:i,minDate:o,maxDate:s,__preventFocus:f,nextIcon:h,previousIcon:g,nextLabel:y,previousLabel:_,onNext:v,onPrevious:x,onLevelClick:w,nextDisabled:S,previousDisabled:E,hasNextLevel:C,getMonthControlProps:l,classNames:R,styles:T,unstyled:A,__staticSelector:F||"YearLevelGroup",withCellSpacing:d})});return H.createElement(Xe,Hze({className:$(j.yearLevelGroup,O),ref:e},B),K)});mK.displayName="@mantine/dates/YearLevelGroup";var $ze=ft(t=>({decadeLevelGroup:{display:"flex",gap:t.spacing.md}}));const Gze=$ze;function gK(t){const e=t.getFullYear(),n=e-e%10;let r=0;const i=[[],[],[],[]];for(let o=0;o<4;o+=1){const s=o===3?1:3;for(let a=0;a({decadeLevel:{},calendarHeader:{marginBottom:t.spacing.xs}}));const Xze=Yze;function vK(t,e,n){return!e&&!n?!1:!!(e&&qt(t).isBefore(e,"year")||n&&qt(t).isAfter(n,"year"))}var Zze=ft(()=>({yearsList:{borderCollapse:"collapse",borderWidth:0},yearsListCell:{padding:0,"&[data-with-spacing]":{padding:X(.5)}},yearsListRow:{}}));const qze=Zze;function Kze(t,e,n,r){const i=t.flat().filter(a=>{var l;return!vK(a,e,n)&&!((l=r?.(a))!=null&&l.disabled)}),o=i.find(a=>{var l;return(l=r?.(a))==null?void 0:l.selected});if(o)return o;const s=i.find(a=>qt().isSame(a,"year"));return s||i[0]}var Qze=Object.defineProperty,Jze=Object.defineProperties,e4e=Object.getOwnPropertyDescriptors,W1=Object.getOwnPropertySymbols,yK=Object.prototype.hasOwnProperty,_K=Object.prototype.propertyIsEnumerable,b6=(t,e,n)=>e in t?Qze(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,M6=(t,e)=>{for(var n in e||(e={}))yK.call(e,n)&&b6(t,n,e[n]);if(W1)for(var n of W1(e))_K.call(e,n)&&b6(t,n,e[n]);return t},t4e=(t,e)=>Jze(t,e4e(e)),n4e=(t,e)=>{var n={};for(var r in t)yK.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&W1)for(var r of W1(t))e.indexOf(r)<0&&_K.call(t,r)&&(n[r]=t[r]);return n};const r4e={yearsListFormat:"YYYY",size:"sm",withCellSpacing:!0},xK=M.forwardRef((t,e)=>{const n=nt("YearsList",r4e,t),{decade:r,className:i,yearsListFormat:o,locale:s,minDate:a,maxDate:l,getYearControlProps:c,classNames:u,styles:d,unstyled:f,__staticSelector:h,__getControlRef:g,__onControlKeyDown:y,__onControlClick:_,__onControlMouseEnter:v,__preventFocus:x,__stopPropagation:w,size:S,variant:E,withCellSpacing:C}=n,O=n4e(n,["decade","className","yearsListFormat","locale","minDate","maxDate","getYearControlProps","classNames","styles","unstyled","__staticSelector","__getControlRef","__onControlKeyDown","__onControlClick","__onControlMouseEnter","__preventFocus","__stopPropagation","size","variant","withCellSpacing"]),{classes:R,cx:T}=qze(null,{name:["YearsList",h],classNames:u,styles:d,unstyled:f,variant:E,size:S}),A=Uc(),F=gK(r),N=Kze(F,a,l,c),U=F.map((k,z)=>{const G=k.map((W,B)=>{const j=c?.(W),$=qt(W).isSame(N,"year");return H.createElement("td",{key:B,className:R.yearsListCell,"data-with-spacing":C||void 0},H.createElement(VA,t4e(M6({size:S,variant:E,classNames:u,styles:d,unstyled:f,__staticSelector:h||"YearsList","data-mantine-stop-propagation":w||void 0,disabled:vK(W,a,l),ref:q=>g?.(z,B,q)},j),{onKeyDown:q=>{var K;(K=j?.onKeyDown)==null||K.call(j,q),y?.(q,{rowIndex:z,cellIndex:B,date:W})},onClick:q=>{var K;(K=j?.onClick)==null||K.call(j,q),_?.(q,W)},onMouseEnter:q=>{var K;(K=j?.onMouseEnter)==null||K.call(j,q),v?.(q,W)},onMouseDown:q=>{var K;(K=j?.onMouseDown)==null||K.call(j,q),x&&q.preventDefault()},tabIndex:x||!$?-1:0}),qt(W).locale(A.getLocale(s)).format(o)))});return H.createElement("tr",{key:z,className:R.yearsListRow},G)});return H.createElement(Xe,M6({component:"table",ref:e,className:T(R.yearsList,i)},O),H.createElement("tbody",null,U))});xK.displayName="@mantine/dates/YearsList";var i4e=Object.defineProperty,Y1=Object.getOwnPropertySymbols,wK=Object.prototype.hasOwnProperty,SK=Object.prototype.propertyIsEnumerable,E6=(t,e,n)=>e in t?i4e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,nC=(t,e)=>{for(var n in e||(e={}))wK.call(e,n)&&E6(t,n,e[n]);if(Y1)for(var n of Y1(e))SK.call(e,n)&&E6(t,n,e[n]);return t},o4e=(t,e)=>{var n={};for(var r in t)wK.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Y1)for(var r of Y1(t))e.indexOf(r)<0&&SK.call(t,r)&&(n[r]=t[r]);return n};const s4e={decadeLabelFormat:"YYYY"},bK=M.forwardRef((t,e)=>{const n=nt("DecadeLevel",s4e,t),{decade:r,locale:i,minDate:o,maxDate:s,yearsListFormat:a,getYearControlProps:l,__getControlRef:c,__onControlKeyDown:u,__onControlClick:d,__onControlMouseEnter:f,withCellSpacing:h,__preventFocus:g,nextIcon:y,previousIcon:_,nextLabel:v,previousLabel:x,onNext:w,onPrevious:S,nextDisabled:E,previousDisabled:C,levelControlAriaLabel:O,withNext:R,withPrevious:T,className:A,decadeLabelFormat:F,classNames:N,styles:U,unstyled:k,__staticSelector:z,__stopPropagation:G,variant:W,size:B}=n,j=o4e(n,["decade","locale","minDate","maxDate","yearsListFormat","getYearControlProps","__getControlRef","__onControlKeyDown","__onControlClick","__onControlMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","nextDisabled","previousDisabled","levelControlAriaLabel","withNext","withPrevious","className","decadeLabelFormat","classNames","styles","unstyled","__staticSelector","__stopPropagation","variant","size"]),{classes:$,cx:q}=Xze(null,{name:["DecadeLevel",z],classNames:N,styles:U,unstyled:k,variant:W,size:B}),K=Uc(),[re,J]=Wze(r),le={__staticSelector:z||"DecadeLevel",classNames:N,styles:U,unstyled:k,variant:W,size:B},ae=typeof E=="boolean"?E:s?!qt(J).endOf("year").isBefore(s):!1,oe=typeof C=="boolean"?C:o?!qt(re).startOf("year").isAfter(o):!1,De=(Te,ve)=>qt(Te).locale(i||K.locale).format(ve);return H.createElement(Xe,nC({className:q($.decadeLevel,A),"data-decade-level":!0,ref:e},j),H.createElement(wb,nC({label:typeof F=="function"?F(re,J):`${De(re,F)} – ${De(J,F)}`,className:$.calendarHeader,__preventFocus:g,__stopPropagation:G,nextIcon:y,previousIcon:_,nextLabel:v,previousLabel:x,onNext:w,onPrevious:S,nextDisabled:ae,previousDisabled:oe,hasNextLevel:!1,levelControlAriaLabel:O,withNext:R,withPrevious:T},le)),H.createElement(xK,nC({decade:r,locale:i,minDate:o,maxDate:s,yearsListFormat:a,getYearControlProps:l,__getControlRef:c,__onControlKeyDown:u,__onControlClick:d,__onControlMouseEnter:f,__preventFocus:g,__stopPropagation:G,withCellSpacing:h},le)))});bK.displayName="@mantine/dates/DecadeLevel";var a4e=Object.defineProperty,X1=Object.getOwnPropertySymbols,MK=Object.prototype.hasOwnProperty,EK=Object.prototype.propertyIsEnumerable,P6=(t,e,n)=>e in t?a4e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,l4e=(t,e)=>{for(var n in e||(e={}))MK.call(e,n)&&P6(t,n,e[n]);if(X1)for(var n of X1(e))EK.call(e,n)&&P6(t,n,e[n]);return t},c4e=(t,e)=>{var n={};for(var r in t)MK.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&X1)for(var r of X1(t))e.indexOf(r)<0&&EK.call(t,r)&&(n[r]=t[r]);return n};const u4e={numberOfColumns:1},PK=M.forwardRef((t,e)=>{const n=nt("DecadeLevelGroup",u4e,t),{decade:r,locale:i,minDate:o,maxDate:s,yearsListFormat:a,getYearControlProps:l,__onControlClick:c,__onControlMouseEnter:u,withCellSpacing:d,__preventFocus:f,nextIcon:h,previousIcon:g,nextLabel:y,previousLabel:_,onNext:v,onPrevious:x,nextDisabled:w,previousDisabled:S,className:E,classNames:C,styles:O,unstyled:R,__staticSelector:T,__stopPropagation:A,numberOfColumns:F,levelControlAriaLabel:N,decadeLabelFormat:U,variant:k,size:z}=n,G=c4e(n,["decade","locale","minDate","maxDate","yearsListFormat","getYearControlProps","__onControlClick","__onControlMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","nextDisabled","previousDisabled","className","classNames","styles","unstyled","__staticSelector","__stopPropagation","numberOfColumns","levelControlAriaLabel","decadeLabelFormat","variant","size"]),{classes:W,cx:B}=Gze(null,{name:["DecadeLevelGroup",T],styles:O,classNames:C,unstyled:R,variant:k,size:z}),j=M.useRef([]),$=Array(F).fill(0).map((q,K)=>{const re=qt(r).add(K*10,"years").toDate();return H.createElement(bK,{key:K,variant:k,size:z,yearsListFormat:a,decade:re,withNext:K===F-1,withPrevious:K===0,decadeLabelFormat:U,__onControlClick:c,__onControlMouseEnter:u,__onControlKeyDown:(J,le)=>HA({levelIndex:K,rowIndex:le.rowIndex,cellIndex:le.cellIndex,event:J,controlsRef:j}),__getControlRef:(J,le,ae)=>{Array.isArray(j.current[K])||(j.current[K]=[]),Array.isArray(j.current[K][J])||(j.current[K][J]=[]),j.current[K][J][le]=ae},levelControlAriaLabel:typeof N=="function"?N(re):N,locale:i,minDate:o,maxDate:s,__preventFocus:f,__stopPropagation:A,nextIcon:h,previousIcon:g,nextLabel:y,previousLabel:_,onNext:v,onPrevious:x,nextDisabled:w,previousDisabled:S,getYearControlProps:l,__staticSelector:T||"DecadeLevelGroup",classNames:C,styles:O,unstyled:R,withCellSpacing:d})});return H.createElement(Xe,l4e({className:B(W.decadeLevelGroup,E),ref:e},G),$)});PK.displayName="@mantine/dates/DecadeLevelGroup";var d4e=Object.defineProperty,Z1=Object.getOwnPropertySymbols,CK=Object.prototype.hasOwnProperty,TK=Object.prototype.propertyIsEnumerable,C6=(t,e,n)=>e in t?d4e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,s_=(t,e)=>{for(var n in e||(e={}))CK.call(e,n)&&C6(t,n,e[n]);if(Z1)for(var n of Z1(e))TK.call(e,n)&&C6(t,n,e[n]);return t},f4e=(t,e)=>{var n={};for(var r in t)CK.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Z1)for(var r of Z1(t))e.indexOf(r)<0&&TK.call(t,r)&&(n[r]=t[r]);return n};const h4e={maxLevel:"decade",minLevel:"month",__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0},OK=M.forwardRef((t,e)=>{const n=nt("Calendar",h4e,t),{maxLevel:r,minLevel:i,defaultLevel:o,level:s,onLevelChange:a,date:l,defaultDate:c,onDateChange:u,numberOfColumns:d,columnsToScroll:f,ariaLabels:h,onYearSelect:g,onMonthSelect:y,onYearMouseEnter:_,onMonthMouseEnter:v,__updateDateOnYearSelect:x,__updateDateOnMonthSelect:w,firstDayOfWeek:S,weekdayFormat:E,weekendDays:C,getDayProps:O,excludeDate:R,renderDay:T,hideOutsideDates:A,hideWeekdays:F,getDayAriaLabel:N,monthLabelFormat:U,nextIcon:k,previousIcon:z,__onDayClick:G,__onDayMouseEnter:W,withCellSpacing:B,monthsListFormat:j,getMonthControlProps:$,yearLabelFormat:q,yearsListFormat:K,getYearControlProps:re,decadeLabelFormat:J,minDate:le,maxDate:ae,locale:oe,className:De,classNames:Te,styles:ve,__staticSelector:we,unstyled:me,variant:se,size:de,__preventFocus:ke,__stopPropagation:Ve,onNextDecade:Ze,onPreviousDecade:ot,onNextYear:dt,onPreviousYear:We,onNextMonth:ht,onPreviousMonth:ee,static:Q}=n,Pe=f4e(n,["maxLevel","minLevel","defaultLevel","level","onLevelChange","date","defaultDate","onDateChange","numberOfColumns","columnsToScroll","ariaLabels","onYearSelect","onMonthSelect","onYearMouseEnter","onMonthMouseEnter","__updateDateOnYearSelect","__updateDateOnMonthSelect","firstDayOfWeek","weekdayFormat","weekendDays","getDayProps","excludeDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","monthLabelFormat","nextIcon","previousIcon","__onDayClick","__onDayMouseEnter","withCellSpacing","monthsListFormat","getMonthControlProps","yearLabelFormat","yearsListFormat","getYearControlProps","decadeLabelFormat","minDate","maxDate","locale","className","classNames","styles","__staticSelector","unstyled","variant","size","__preventFocus","__stopPropagation","onNextDecade","onPreviousDecade","onNextYear","onPreviousYear","onNextMonth","onPreviousMonth","static"]),{classes:$e,cx:Ge}=hFe(null,{name:["Calendar",we],classNames:Te,styles:ve,unstyled:me,variant:se,size:de}),[Ke,gt]=Ar({value:s?jp(s,i,r):void 0,defaultValue:o?jp(o,i,r):void 0,finalValue:jp(void 0,i,r),onChange:a}),[ut,Ae]=Ar({value:l,defaultValue:c,finalValue:null,onChange:u}),vt={__staticSelector:we||"Calendar",styles:ve,classNames:Te,unstyled:me,variant:se,size:de},xt=f||d||1,ct=ut||new Date,Ie=()=>{const ue=qt(ct).add(xt,"month").toDate();ht?.(ue),Ae(ue)},Ye=()=>{const ue=qt(ct).subtract(xt,"month").toDate();ee?.(ue),Ae(ue)},Tt=()=>{const ue=qt(ct).add(xt,"year").toDate();dt?.(ue),Ae(ue)},Lt=()=>{const ue=qt(ct).subtract(xt,"year").toDate();We?.(ue),Ae(ue)},Rt=()=>{const ue=qt(ct).add(10*xt,"year").toDate();Ze?.(ue),Ae(ue)},he=()=>{const ue=qt(ct).subtract(10*xt,"year").toDate();ot?.(ue),Ae(ue)};return H.createElement(Xe,s_({className:Ge($e.calendar,De),ref:e},Pe),Ke==="month"&&H.createElement(rK,s_({month:ct,minDate:le,maxDate:ae,firstDayOfWeek:S,weekdayFormat:E,weekendDays:C,getDayProps:O,excludeDate:R,renderDay:T,hideOutsideDates:A,hideWeekdays:F,getDayAriaLabel:N,onNext:Ie,onPrevious:Ye,hasNextLevel:r!=="month",onLevelClick:()=>gt("year"),numberOfColumns:d,locale:oe,levelControlAriaLabel:h?.monthLevelControl,nextLabel:h?.nextMonth,nextIcon:k,previousLabel:h?.previousMonth,previousIcon:z,monthLabelFormat:U,__onDayClick:G,__onDayMouseEnter:W,__preventFocus:ke,__stopPropagation:Ve,static:Q,withCellSpacing:B},vt)),Ke==="year"&&H.createElement(mK,s_({year:ct,numberOfColumns:d,minDate:le,maxDate:ae,monthsListFormat:j,getMonthControlProps:$,locale:oe,onNext:Tt,onPrevious:Lt,hasNextLevel:r!=="month"&&r!=="year",onLevelClick:()=>gt("decade"),levelControlAriaLabel:h?.yearLevelControl,nextLabel:h?.nextYear,nextIcon:k,previousLabel:h?.previousYear,previousIcon:z,yearLabelFormat:q,__onControlMouseEnter:v,__onControlClick:(ue,He)=>{w&&Ae(He),gt(jp("month",i,r)),y?.(He)},__preventFocus:ke,__stopPropagation:Ve,withCellSpacing:B},vt)),Ke==="decade"&&H.createElement(PK,s_({decade:ct,minDate:le,maxDate:ae,yearsListFormat:K,getYearControlProps:re,locale:oe,onNext:Rt,onPrevious:he,numberOfColumns:d,nextLabel:h?.nextDecade,nextIcon:k,previousLabel:h?.previousDecade,previousIcon:z,decadeLabelFormat:J,__onControlMouseEnter:_,__onControlClick:(ue,He)=>{x&&Ae(He),gt(jp("year",i,r)),g?.(He)},__preventFocus:ke,__stopPropagation:Ve,withCellSpacing:B},vt)))});OK.displayName="@mantine/dates/Calendar";var T6=Object.getOwnPropertySymbols,p4e=Object.prototype.hasOwnProperty,m4e=Object.prototype.propertyIsEnumerable,g4e=(t,e)=>{var n={};for(var r in t)p4e.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&T6)for(var r of T6(t))e.indexOf(r)<0&&m4e.call(t,r)&&(n[r]=t[r]);return n};function v4e(t){const e=t,{maxLevel:n,minLevel:r,defaultLevel:i,level:o,onLevelChange:s,nextIcon:a,previousIcon:l,date:c,defaultDate:u,onDateChange:d,numberOfColumns:f,columnsToScroll:h,ariaLabels:g,onYearSelect:y,onMonthSelect:_,onYearMouseEnter:v,onMonthMouseEnter:x,onNextMonth:w,onPreviousMonth:S,onNextYear:E,onPreviousYear:C,onNextDecade:O,onPreviousDecade:R,withCellSpacing:T,__updateDateOnYearSelect:A,__updateDateOnMonthSelect:F,firstDayOfWeek:N,weekdayFormat:U,weekendDays:k,getDayProps:z,excludeDate:G,renderDay:W,hideOutsideDates:B,hideWeekdays:j,getDayAriaLabel:$,monthLabelFormat:q,monthsListFormat:K,getMonthControlProps:re,yearLabelFormat:J,yearsListFormat:le,getYearControlProps:ae,decadeLabelFormat:oe,allowSingleDateInRange:De,allowDeselect:Te,minDate:ve,maxDate:we,locale:me}=e,se=g4e(e,["maxLevel","minLevel","defaultLevel","level","onLevelChange","nextIcon","previousIcon","date","defaultDate","onDateChange","numberOfColumns","columnsToScroll","ariaLabels","onYearSelect","onMonthSelect","onYearMouseEnter","onMonthMouseEnter","onNextMonth","onPreviousMonth","onNextYear","onPreviousYear","onNextDecade","onPreviousDecade","withCellSpacing","__updateDateOnYearSelect","__updateDateOnMonthSelect","firstDayOfWeek","weekdayFormat","weekendDays","getDayProps","excludeDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","monthLabelFormat","monthsListFormat","getMonthControlProps","yearLabelFormat","yearsListFormat","getYearControlProps","decadeLabelFormat","allowSingleDateInRange","allowDeselect","minDate","maxDate","locale"]);return{calendarProps:{maxLevel:n,minLevel:r,defaultLevel:i,level:o,onLevelChange:s,nextIcon:a,previousIcon:l,date:c,defaultDate:u,onDateChange:d,numberOfColumns:f,columnsToScroll:h,ariaLabels:g,onYearSelect:y,onMonthSelect:_,onYearMouseEnter:v,onMonthMouseEnter:x,onNextMonth:w,onPreviousMonth:S,onNextYear:E,onPreviousYear:C,onNextDecade:O,onPreviousDecade:R,withCellSpacing:T,__updateDateOnYearSelect:A,__updateDateOnMonthSelect:F,firstDayOfWeek:N,weekdayFormat:U,weekendDays:k,getDayProps:z,excludeDate:G,renderDay:W,hideOutsideDates:B,hideWeekdays:j,getDayAriaLabel:$,monthLabelFormat:q,monthsListFormat:K,getMonthControlProps:re,yearLabelFormat:J,yearsListFormat:le,getYearControlProps:ae,decadeLabelFormat:oe,allowSingleDateInRange:De,allowDeselect:Te,minDate:ve,maxDate:we,locale:me},others:se}}function y4e({date:t,maxDate:e,minDate:n}){return!(t==null||Number.isNaN(t.getTime())||e&&qt(t).isAfter(e,"date")||n&&qt(t).isBefore(n,"date"))}function _4e(t){const e=new Date(t);return Number.isNaN(e.getTime())||!t?null:e}function x4e(t,e){if(e==="range"&&Array.isArray(t)){const[n,r]=t;return n?r?`${n.toISOString()} – ${r.toISOString()}`:`${n.toISOString()} –`:""}return e==="multiple"&&Array.isArray(t)?t.map(n=>n.toISOString()).join(", "):!Array.isArray(t)&&t?t.toISOString():""}function RK({value:t,type:e,name:n,form:r}){return H.createElement("input",{type:"hidden",value:x4e(t,e),name:n,form:r})}RK.displayName="@mantine/dates/HiddenDatesInput";function w4e(t,e){if(!t||!e)return e;const n=t.getHours(),r=t.getMinutes(),i=t.getSeconds(),o=t.getMilliseconds(),s=new Date(e);return s.setHours(n),s.setMinutes(r),s.setSeconds(i),s.setMilliseconds(o),s}var S4e=Object.defineProperty,b4e=Object.defineProperties,M4e=Object.getOwnPropertyDescriptors,q1=Object.getOwnPropertySymbols,AK=Object.prototype.hasOwnProperty,DK=Object.prototype.propertyIsEnumerable,O6=(t,e,n)=>e in t?S4e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,cu=(t,e)=>{for(var n in e||(e={}))AK.call(e,n)&&O6(t,n,e[n]);if(q1)for(var n of q1(e))DK.call(e,n)&&O6(t,n,e[n]);return t},a_=(t,e)=>b4e(t,M4e(e)),E4e=(t,e)=>{var n={};for(var r in t)AK.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&q1)for(var r of q1(t))e.indexOf(r)<0&&DK.call(t,r)&&(n[r]=t[r]);return n};const P4e={valueFormat:"MMMM D, YYYY",fixOnBlur:!0,preserveTime:!0,size:"sm"},IK=M.forwardRef((t,e)=>{const n=hb("DateInput",P4e,t),{inputProps:r,wrapperProps:i,value:o,defaultValue:s,onChange:a,clearable:l,clearButtonProps:c,popoverProps:u,getDayProps:d,locale:f,valueFormat:h,dateParser:g,minDate:y,maxDate:_,fixOnBlur:v,onFocus:x,onBlur:w,onClick:S,readOnly:E,name:C,form:O,rightSection:R,unstyled:T,classNames:A,styles:F,allowDeselect:N,preserveTime:U,date:k,defaultDate:z,onDateChange:G}=n,W=E4e(n,["inputProps","wrapperProps","value","defaultValue","onChange","clearable","clearButtonProps","popoverProps","getDayProps","locale","valueFormat","dateParser","minDate","maxDate","fixOnBlur","onFocus","onBlur","onClick","readOnly","name","form","rightSection","unstyled","classNames","styles","allowDeselect","preserveTime","date","defaultDate","onDateChange"]),{calendarProps:B,others:j}=v4e(W),$=Uc(),K=g||(We=>{const ht=qt(We,h,$.getLocale(f)).toDate();return Number.isNaN(ht.getTime())?_4e(We):ht}),re=l||N,J=We=>We?qt(We).locale($.getLocale(f)).format(h):"",[le,ae,oe]=Ar({value:o,defaultValue:s,finalValue:null,onChange:a}),[De,Te]=Ar({value:k,defaultValue:s||z,finalValue:null,onChange:G});M.useEffect(()=>{oe&&Te(o)},[oe,o]);const[ve,we]=M.useState(J(le));M.useEffect(()=>{we(J(le))},[$.getLocale(f)]);const[me,se]=M.useState(!1),de=We=>{const ht=We.currentTarget.value;if(we(ht),ht.trim()===""&&re)ae(null);else{const ee=K(ht);y4e({date:ee,minDate:y,maxDate:_})&&(ae(ee),Te(ee))}},ke=We=>{w?.(We),se(!1),v&&we(J(le))},Ve=We=>{x?.(We),se(!0)},Ze=We=>{S?.(We),se(!0)},ot=We=>a_(cu({},d?.(We)),{selected:qt(le).isSame(We,"day"),onClick:()=>{const ht=U?w4e(le,We):We,ee=re&&qt(le).isSame(We,"day")?null:ht;ae(ee),!oe&&we(J(ee)),se(!1)}}),dt=R||(l&&le&&!E?H.createElement(Qg,cu({variant:"transparent",onMouseDown:We=>We.preventDefault(),tabIndex:-1,onClick:()=>{ae(null),!oe&&we("")},unstyled:T},c)):null);return Qr(()=>{o!==void 0&&!me&&we(J(o))},[o]),H.createElement(H.Fragment,null,H.createElement(Ki.Wrapper,a_(cu({},i),{__staticSelector:"DateInput"}),H.createElement(qi,cu({opened:me,trapFocus:!1,position:"bottom-start",disabled:E,withRoles:!1},u),H.createElement(qi.Target,null,H.createElement(Ki,a_(cu(cu({"data-dates-input":!0,"data-read-only":E||void 0,autoComplete:"off",ref:e,value:ve,onChange:de,onBlur:ke,onFocus:Ve,onClick:Ze,readOnly:E,rightSection:dt},r),j),{__staticSelector:"DateInput"}))),H.createElement(qi.Dropdown,{onMouseDown:We=>We.preventDefault(),"data-dates-dropdown":!0},H.createElement(OK,a_(cu({__staticSelector:"DateInput"},B),{classNames:A,styles:F,unstyled:T,__preventFocus:!0,minDate:y,maxDate:_,locale:f,getDayProps:ot,size:r.size,date:De,onDateChange:Te}))))),H.createElement(RK,{name:C,form:O,value:le,type:"default"}))});IK.displayName="@mantine/dates/DateInput";let R6=36,LK="";for(;R6--;)LK+=R6.toString(36);function A6(t=11){let e="",n=t;for(;n--;)e+=LK[Math.random()*36|0];return e}const C4e=t=>t.replace(/[|\\{}()[\]^$+*?.-]/g,e=>`\\${e}`),T4e=t=>t.replace(/\s{2,}/g," ").split(" ").join("|"),O4e=({terms:t,matchExactly:e=!1})=>{if(typeof t!="string")throw new TypeError("Expected a string");const n=C4e(t.trim());return`(${e?n:T4e(n)})`},R4e=({terms:t,matchExactly:e=!1})=>{try{const n=/^([/~@;%#'])(.*?)\1([gimsuy]*)$/.exec(t);return n?new RegExp(n[2],n[3]):new RegExp(O4e({terms:t,matchExactly:e}),"ig")}catch{throw new TypeError("Expected terms to be either a string or a RegExp!")}},A4e=t=>e=>e!==null&&typeof e=="object"&&t in e,l_=A4e("match"),c_=t=>typeof t<"u";function D4e({curr:t,next:e,prev:n,clipBy:r=3}){const i=t.text.split(" "),o=i.length;if(t.match||r>=o)return t.text;const s="...";return c_(e)&&c_(n)&&l_(n)&&l_(e)?o>r*2?[...i.slice(0,r),s,...i.slice(-r)].join(" "):t.text:c_(e)&&l_(e)?[s,...i.slice(-r)].join(" "):c_(n)&&l_(n)?[...i.slice(0,r),s].join(" "):t.text}var I4e=Object.defineProperty,L4e=Object.defineProperties,k4e=Object.getOwnPropertyDescriptors,D6=Object.getOwnPropertySymbols,N4e=Object.prototype.hasOwnProperty,F4e=Object.prototype.propertyIsEnumerable,I6=(t,e,n)=>e in t?I4e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,u_=(t,e)=>{for(var n in e||(e={}))N4e.call(e,n)&&I6(t,n,e[n]);if(D6)for(var n of D6(e))F4e.call(e,n)&&I6(t,n,e[n]);return t},z4e=(t,e)=>L4e(t,k4e(e));const U4e=t=>t.length>0,rC=({text:t,query:e,clipBy:n,matchExactly:r=!1})=>{const i=typeof e=="string"?e.trim():e;if(i==="")return[{key:A6(),text:t,match:!1}];const o=R4e({terms:e,matchExactly:r});return t.split(o).filter(U4e).map(s=>({key:A6(),text:s,match:r?s.toLowerCase()===i.toLowerCase():o.test(s)})).map((s,a,l)=>u_(u_({},s),typeof n=="number"&&{text:D4e(z4e(u_(u_({curr:s},a0&&{prev:l[a-1]}),{clipBy:n}))}))};function Ah(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i{var e,n,r,i;return(i=(e=t.id)!==null&&e!==void 0?e:(r=(n=t.accessorKey)===null||n===void 0?void 0:n.toString)===null||r===void 0?void 0:r.call(n))!==null&&i!==void 0?i:t.header},HT=t=>{const e=[],n=r=>{r.forEach(i=>{i.columns?n(i.columns):e.push(i)})};return n(t),e},kK=({aggregationFns:t,columnDefs:e,columnFilterFns:n,defaultDisplayColumn:r,filterFns:i,sortingFns:o})=>e.map(s=>{var a,l;if(s.id||(s.id=Mm(s)),s.columnDefType||(s.columnDefType="data"),!((a=s.columns)===null||a===void 0)&&a.length)s.columnDefType="group",s.columns=kK({aggregationFns:t,columnDefs:s.columns,columnFilterFns:n,defaultDisplayColumn:r,filterFns:i,sortingFns:o});else if(s.columnDefType==="data"){if(Array.isArray(s.aggregationFn)){const c=s.aggregationFn;s.aggregationFn=(u,d,f)=>c.map(h=>{var g;return(g=t[h])===null||g===void 0?void 0:g.call(t,u,d,f)})}Object.keys(i).includes(n[s.id])&&(s.filterFn=(l=i[n[s.id]])!==null&&l!==void 0?l:i.fuzzy,s._filterFn=n[s.id]),Object.keys(o).includes(s.sortingFn)&&(s.sortingFn=o[s.sortingFn])}else s.columnDefType==="display"&&(s=Object.assign(Object.assign({},r),s));return s}),NK=(t,e,n)=>(t.getCanPin()&&t.pin(e.getIsPinned()),n.splice(n.indexOf(e.id),0,n.splice(n.indexOf(t.id),1)[0]),[...n]),jA=(t,e)=>!!(t.enableExpanding||t.enableGrouping&&(e===void 0||e?.length)||t.renderDetailPanel),H4e=t=>{var e;return[(t.enableRowDragging||t.enableRowOrdering)&&"mrt-row-drag",t.positionActionsColumn==="first"&&(t.enableRowActions||t.enableEditing&&["row","modal"].includes((e=t.editingMode)!==null&&e!==void 0?e:""))&&"mrt-row-actions",t.positionExpandColumn==="first"&&jA(t)&&"mrt-row-expand",t.enableRowSelection&&"mrt-row-select",t.enableRowNumbers&&"mrt-row-numbers"].filter(Boolean)},V4e=t=>{var e;return[t.positionActionsColumn==="last"&&(t.enableRowActions||t.enableEditing&&["row","modal"].includes((e=t.editingMode)!==null&&e!==void 0?e:""))&&"mrt-row-actions",t.positionExpandColumn==="last"&&jA(t)&&"mrt-row-expand"].filter(Boolean)},FK=t=>{const e=H4e(t),n=V4e(t),r=HT(t.columns).map(i=>Mm(i)).filter(i=>!e.includes(i)&&!n.includes(i));return[...e,...r,...n]},j4e=t=>t.filterVariant==="multi-select"?"arrIncludesSome":t.filterVariant==="range"||t.filterVariant==="date-range"?"betweenInclusive":t.filterVariant==="select"||t.filterVariant==="checkbox"||t.filterVariant==="date"?"equals":"fuzzy",$4e=(t,e)=>e.getVisibleLeafColumns()[0].id===t.id,G4e=(t,e)=>{const n=e.getVisibleLeafColumns();return n[n.length-1].id===t.id},W4e=(t,e)=>e.getIsPinned()==="left"&&t.getLeftLeafHeaders().length-1===e.getPinnedIndex(),Y4e=t=>t.getIsPinned()==="right"&&t.getPinnedIndex()===0,X4e=(t,e)=>t.getRightLeafHeaders().slice(e.getPinnedIndex()+1).reduce((n,r)=>n+r.getSize(),0),$A=({column:t,header:e,isStriped:n,row:r,table:i,tableCellProps:o,theme:s})=>{var a,l,c,u,d,f,h,g,y,_;const v={minWidth:`max(calc(var(--${e?"header":"col"}-${Em((a=e?.id)!==null&&a!==void 0?a:t.id)}-size) * 1px), ${(l=t.columnDef.minSize)!==null&&l!==void 0?l:30}px)`,width:`calc(var(--${e?"header":"col"}-${Em((c=e?.id)!==null&&c!==void 0?c:t.id)}-size) * 1px)`};return Object.assign(Object.assign(Object.assign({backgroundColor:r?r?.getIsSelected()?s.fn.rgba(gl(s),.1):t.getIsPinned()&&t.columnDef.columnDefType!=="group"?s.fn.rgba(s.colorScheme==="dark"?s.fn.darken(s.colors.dark[7],.02):s.white,.97):n?"inherit":s.colorScheme==="dark"?s.fn.lighten(s.colors.dark[7],.02):s.white:"inherit",backgroundClip:"padding-box",boxShadow:W4e(i,t)?`-4px 0 8px -6px ${s.fn.rgba(s.black,.2)} inset`:Y4e(t)?`4px 0 8px -6px ${s.fn.rgba(s.black,.2)} inset`:void 0,display:i.options.layoutMode==="grid"?"flex":"table-cell",flex:i.options.layoutMode==="grid"?`var(--${e?"header":"col"}-${Em((u=e?.id)!==null&&u!==void 0?u:t.id)}-size) 0 auto`:void 0,left:t.getIsPinned()==="left"?`${t.getStart("left")}px`:void 0,ml:i.options.enableColumnVirtualization&&t.getIsPinned()==="left"&&t.getPinnedIndex()===0?`-${t.getSize()*((f=(d=i.getState().columnPinning.left)===null||d===void 0?void 0:d.length)!==null&&f!==void 0?f:1)}px`:void 0,mr:i.options.enableColumnVirtualization&&t.getIsPinned()==="right"&&t.getPinnedIndex()===i.getVisibleLeafColumns().length-1?`-${t.getSize()*((g=(h=i.getState().columnPinning.right)===null||h===void 0?void 0:h.length)!==null&&g!==void 0?g:1)*1.2}px`:void 0,opacity:((y=i.getState().draggingColumn)===null||y===void 0?void 0:y.id)===t.id||((_=i.getState().hoveredColumn)===null||_===void 0?void 0:_.id)===t.id?.5:1,position:t.getIsPinned()&&t.columnDef.columnDefType!=="group"?"sticky":void 0,right:t.getIsPinned()==="right"?`${X4e(i,t)}px`:void 0,transition:i.options.enableColumnVirtualization?"none":"padding 100ms ease-in-out"},!i.options.enableColumnResizing&&v),o?.sx instanceof Function?o.sx(s):o?.sx),i.options.enableColumnResizing&&v)},Z4e={filterVariant:"text",minSize:40,maxSize:1e3,size:180},q4e={columnDefType:"display",enableClickToCopy:!1,enableColumnActions:!1,enableColumnDragging:!1,enableColumnFilter:!1,enableColumnOrdering:!1,enableEditing:!1,enableGlobalFilter:!1,enableGrouping:!1,enableHiding:!1,enableResizing:!1,enableSorting:!1},K4e=t=>{var e,n,r,i,o;return(o=t.colorScheme==="dark"?(n=(e=t.primaryShade)===null||e===void 0?void 0:e.dark)!==null&&n!==void 0?n:t.primaryShade:(i=(r=t.primaryShade)===null||r===void 0?void 0:r.light)!==null&&i!==void 0?i:t.primaryShade)!==null&&o!==void 0?o:7},gl=(t,e)=>t.colors[t.primaryColor][e??K4e(t)],Em=t=>t.replace(/[^a-zA-Z0-9]/g,"_"),zK=(t,e,n,r)=>{const i=ENe(t.getValue(e),n,{threshold:Xi.MATCHES});return r(i),i.passed};zK.autoRemove=t=>!t;const UK=(t,e,n)=>t.getValue(e).toString().toLowerCase().trim().includes(n.toString().toLowerCase().trim());UK.autoRemove=t=>!t;const BK=(t,e,n)=>t.getValue(e).toString().toLowerCase().trim().startsWith(n.toString().toLowerCase().trim());BK.autoRemove=t=>!t;const HK=(t,e,n)=>t.getValue(e).toString().toLowerCase().trim().endsWith(n.toString().toLowerCase().trim());HK.autoRemove=t=>!t;const Sb=(t,e,n)=>n===null?!0:t.getValue(e).toString().toLowerCase().trim()===n.toString().toLowerCase().trim();Sb.autoRemove=t=>!t;const VK=(t,e,n)=>t.getValue(e).toString().toLowerCase().trim()!==n.toString().toLowerCase().trim();VK.autoRemove=t=>!t;const bb=(t,e,n)=>n===null?!0:!isNaN(+n)&&!isNaN(+t.getValue(e))?+t.getValue(e)>+n:t.getValue(e).toString().toLowerCase().trim()>n.toString().toLowerCase().trim();bb.autoRemove=t=>!t;const GA=(t,e,n)=>Sb(t,e,n)||bb(t,e,n);GA.autoRemove=t=>!t;const Mb=(t,e,n)=>n===null?!0:!isNaN(+n)&&!isNaN(+t.getValue(e))?+t.getValue(e)<+n:t.getValue(e).toString().toLowerCase().trim()!t;const WA=(t,e,n)=>Sb(t,e,n)||Mb(t,e,n);WA.autoRemove=t=>!t;const jK=(t,e,n)=>(["",void 0].includes(n[0])||bb(t,e,n[0]))&&(!isNaN(+n[0])&&!isNaN(+n[1])&&+n[0]>+n[1]||["",void 0].includes(n[1])||Mb(t,e,n[1]));jK.autoRemove=t=>!t;const $K=(t,e,n)=>(["",void 0].includes(n[0])||GA(t,e,n[0]))&&(!isNaN(+n[0])&&!isNaN(+n[1])&&+n[0]>+n[1]||["",void 0].includes(n[1])||WA(t,e,n[1]));$K.autoRemove=t=>!t;const GK=(t,e,n)=>!t.getValue(e).toString().trim();GK.autoRemove=t=>!t;const WK=(t,e,n)=>!!t.getValue(e).toString().trim();WK.autoRemove=t=>!t;const Q4e=Object.assign(Object.assign({},ua),{between:jK,betweenInclusive:$K,contains:UK,empty:GK,endsWith:HK,equals:Sb,fuzzy:zK,greaterThan:bb,greaterThanOrEqualTo:GA,lessThan:Mb,lessThanOrEqualTo:WA,notEmpty:WK,notEquals:VK,startsWith:BK}),J4e={IconArrowAutofitContent:ZLe,IconArrowsSort:qLe,IconBaselineDensityLarge:KLe,IconBaselineDensityMedium:QLe,IconBaselineDensitySmall:JLe,IconBoxMultiple:tke,IconChevronDown:oke,IconChevronLeft:ske,IconChevronRight:ake,IconChevronsDown:lke,IconCircleX:cke,IconClearAll:uke,IconColumns:hke,IconDeviceFloppy:pke,IconDots:gke,IconDotsVertical:mke,IconEdit:vke,IconEyeOff:kT,IconFilter:xke,IconFilterOff:_ke,IconGripHorizontal:wke,IconMaximize:vq,IconMinimize:bke,IconPinned:Pke,IconPinnedOff:Eke,IconSearch:Tke,IconSearchOff:Cke,IconSortAscending:Oke,IconSortDescending:Rke,IconX:Dke},eUe=(t,e,n)=>{let r=0;return t.columnFiltersMeta[n]&&(r=TNe(t.columnFiltersMeta[n],e.columnFiltersMeta[n])),r===0?_u.alphanumeric(t,e,n):r},tUe=Object.assign(Object.assign({},_u),{fuzzy:eUe}),nUe=(t,e)=>Math.max(...Object.values(e.columnFiltersMeta).map(n=>n.rank))-Math.max(...Object.values(t.columnFiltersMeta).map(n=>n.rank)),rUe=({table:t})=>{var e,n;const{getIsAllRowsExpanded:r,getIsSomeRowsExpanded:i,getCanSomeRowsExpand:o,getState:s,options:{icons:{IconChevronsDown:a},localization:l,mantineExpandAllButtonProps:c,renderDetailPanel:u},toggleAllRowsExpanded:d}=t,{density:f,isLoading:h}=s(),g=c instanceof Function?c({table:t}):c,y=r();return I.jsx(tr,{withinPortal:!0,withArrow:!0,openDelay:1e3,label:((e=g?.title)!==null&&e!==void 0?e:y)?l.collapseAll:l.expandAll,children:I.jsx(An,Object.assign({"aria-label":l.expandAll,disabled:h||!u&&!o(),onClick:()=>d(!y)},g,{sx:_=>Object.assign({marginLeft:f==="xl"?"-6px":f==="md"?"0":"6px","&:disabled":{backgroundColor:"transparent",border:"none"}},g?.sx instanceof Function?g?.sx(_):g?.sx),title:void 0,children:(n=g?.children)!==null&&n!==void 0?n:I.jsx(a,{style:{transform:`rotate(${y?-180:i()?-90:0}deg)`,transition:"transform 100ms"}})}))})},iUe=({row:t,table:e})=>{var n,r;const{options:{icons:{IconChevronDown:i},localization:o,mantineExpandButtonProps:s,renderDetailPanel:a}}=e,l=s instanceof Function?s({table:e,row:t}):s,c=t.getCanExpand(),u=t.getIsExpanded(),d=f=>{var h;f.stopPropagation(),t.toggleExpanded(),(h=l?.onClick)===null||h===void 0||h.call(l,f)};return I.jsx(tr,{withinPortal:!0,withArrow:!0,disabled:!c&&!a,openDelay:1e3,label:((n=l?.title)!==null&&n!==void 0?n:u)?o.collapse:o.expand,children:I.jsx(An,Object.assign({"aria-label":o.expand,disabled:!c&&!a},l,{onClick:d,sx:f=>Object.assign({"&:disabled":{backgroundColor:"transparent",border:"none"}},l?.sx instanceof Function?l.sx(f):l?.sx),title:void 0,children:(r=l?.children)!==null&&r!==void 0?r:I.jsx(i,{style:{transform:`rotate(${!c&&!a?-90:u?-180:0}deg)`,transition:"transform 100ms"}})}))})},oUe=({handleEdit:t,row:e,table:n})=>{const{options:{editingMode:r,enableEditing:i,icons:{IconEdit:o,IconDots:s},localization:a,renderRowActionMenuItems:l}}=n;return I.jsxs(cn,{closeOnItemClick:!0,withinPortal:!0,children:[I.jsx(tr,{withinPortal:!0,withArrow:!0,openDelay:1e3,label:a.rowActions,children:I.jsx(cn.Target,{children:I.jsx(An,{"aria-label":a.rowActions,onClick:c=>c.stopPropagation(),size:"sm",children:I.jsx(s,{})})})}),I.jsxs(cn.Dropdown,{onClick:c=>c.stopPropagation(),children:[i&&r!=="table"&&I.jsx(cn.Item,{icon:I.jsx(o,{}),onClick:t,children:a.edit}),l?.({row:e,table:n})]})]})},YK=({row:t,table:e,variant:n="icon"})=>{const{getState:r,options:{icons:{IconCircleX:i,IconDeviceFloppy:o},localization:s,onEditingRowSave:a,onEditingRowCancel:l},refs:{editInputRefs:c},setEditingRow:u}=e,{editingRow:d}=r(),f=()=>{l?.({row:t,table:e}),u(null)},h=()=>{var g,y;(g=Object.values(c?.current))===null||g===void 0||g.forEach(_=>{_.value!==void 0&&Object.hasOwn(d?._valuesCache,_.name)&&(d._valuesCache[_.name]=_.value)}),a?.({exitEditingMode:()=>u(null),row:d??t,table:e,values:(y=d?._valuesCache)!==null&&y!==void 0?y:Object.assign({},t.original)})};return I.jsx(Xe,{onClick:g=>g.stopPropagation(),sx:{display:"flex",gap:"12px"},children:n==="icon"?I.jsxs(I.Fragment,{children:[I.jsx(tr,{withinPortal:!0,withArrow:!0,label:s.cancel,children:I.jsx(An,{"aria-label":s.cancel,onClick:f,children:I.jsx(i,{})})}),I.jsx(tr,{withinPortal:!0,withArrow:!0,label:s.save,children:I.jsx(An,{"aria-label":s.save,color:"blue",onClick:h,children:I.jsx(o,{})})})]}):I.jsxs(I.Fragment,{children:[I.jsx(Ds,{onClick:f,variant:"subtle",children:s.cancel}),I.jsx(Ds,{onClick:h,variant:"filled",children:s.save})]})})},sUe=({cell:t,row:e,table:n})=>{const{getState:r,options:{editingMode:i,enableEditing:o,icons:{IconEdit:s},localization:a,renderRowActionMenuItems:l,renderRowActions:c},setEditingRow:u}=n,{editingRow:d}=r(),f=h=>{h.stopPropagation(),u(Object.assign({},e))};return I.jsx(I.Fragment,{children:c?I.jsx(I.Fragment,{children:c({cell:t,row:e,table:n})}):e.id===d?.id&&i==="row"?I.jsx(YK,{row:e,table:n}):!l&&(o instanceof Function?o(e):o)?I.jsx(tr,{withinPortal:!0,position:"right",withArrow:!0,label:a.edit,children:I.jsx(An,{"aria-label":a.edit,onClick:f,children:I.jsx(s,{})})}):l?I.jsx(oUe,{handleEdit:f,row:e,table:n}):null})},L6=({row:t,selectAll:e,table:n})=>{var r;const{getState:i,options:{localization:o,enableMultiRowSelection:s,mantineSelectCheckboxProps:a,mantineSelectAllCheckboxProps:l,selectAllMode:c}}=n,{density:u,isLoading:d}=i(),f=t?a instanceof Function?a({row:t,table:n}):a:l instanceof Function?l({table:n}):l,h=e?c==="page"?n.getIsAllPageRowsSelected():n.getIsAllRowsSelected():void 0,g=Object.assign(Object.assign({"aria-label":e?o.toggleSelectAll:o.toggleSelectRow,checked:e?h:t?.getIsSelected(),disabled:d||t&&!t.getCanSelect(),onChange:t?t.getToggleSelectedHandler():c==="all"?n.getToggleAllRowsSelectedHandler():n.getToggleAllPageRowsSelectedHandler(),size:u==="xs"?"sm":"md"},f),{onClick:y=>{var _;y.stopPropagation(),(_=f?.onClick)===null||_===void 0||_.call(f,y)},title:void 0});return I.jsx(tr,{withinPortal:!0,withArrow:!0,openDelay:1e3,label:(r=f?.title)!==null&&r!==void 0?r:e?o.toggleSelectAll:o.toggleSelectRow,children:s===!1?I.jsx(OA,Object.assign({},g)):I.jsx(nv,Object.assign({indeterminate:e?n.getIsSomeRowsSelected()&&!h:t?.getIsSomeSelected()},g))})},aUe=t=>[{option:"fuzzy",symbol:"≈",label:t.filterFuzzy,divider:!1},{option:"contains",symbol:"*",label:t.filterContains,divider:!1},{option:"startsWith",symbol:"a",label:t.filterStartsWith,divider:!1},{option:"endsWith",symbol:"z",label:t.filterEndsWith,divider:!0},{option:"equals",symbol:"=",label:t.filterEquals,divider:!1},{option:"notEquals",symbol:"≠",label:t.filterNotEquals,divider:!0},{option:"between",symbol:"⇿",label:t.filterBetween,divider:!1},{option:"betweenInclusive",symbol:"⬌",label:t.filterBetweenInclusive,divider:!0},{option:"greaterThan",symbol:">",label:t.filterGreaterThan,divider:!1},{option:"greaterThanOrEqualTo",symbol:"≥",label:t.filterGreaterThanOrEqualTo,divider:!1},{option:"lessThan",symbol:"<",label:t.filterLessThan,divider:!1},{option:"lessThanOrEqualTo",symbol:"≤",label:t.filterLessThanOrEqualTo,divider:!0},{option:"empty",symbol:"∅",label:t.filterEmpty,divider:!1},{option:"notEmpty",symbol:"!∅",label:t.filterNotEmpty,divider:!1}],k6=["between","betweenInclusive","inNumberRange"],N6=["empty","notEmpty"],lUe=["arrIncludesSome","arrIncludesAll","arrIncludes"],XK=({header:t,onSelect:e,table:n})=>{var r,i,o,s;const{getState:a,options:{columnFilterModeOptions:l,globalFilterModeOptions:c,localization:u,renderColumnFilterModeMenuItems:d,renderGlobalFilterModeMenuItems:f},setColumnFilterFns:h,setGlobalFilterFn:g}=n,{globalFilterFn:y}=a(),{column:_}=t??{},{columnDef:v}=_??{},x=_?.getFilterValue(),w=(r=v?.columnFilterModeOptions)!==null&&r!==void 0?r:l,S=M.useMemo(()=>aUe(u).filter(O=>v?w===void 0||w?.includes(O.option):(!c||c.includes(O.option))&&["fuzzy","contains","startsWith"].includes(O.option)),[]),E=O=>{var R;const T=(R=v?._filterFn)!==null&&R!==void 0?R:"";!t||!_?g(O):O!==T&&(h(A=>Object.assign(Object.assign({},A),{[t.id]:O})),N6.includes(O)?x!==" "&&!N6.includes(T)?_.setFilterValue(" "):x&&_.setFilterValue(x):v?.filterVariant==="multi-select"||lUe.includes(O)?x instanceof String||x?.length?_.setFilterValue([]):x&&_.setFilterValue(x):["range","date-range"].includes(v?.filterVariant)||k6.includes(O)?!Array.isArray(x)||!x?.every(A=>A==="")&&!k6.includes(T)?_.setFilterValue(["",""]):_.setFilterValue(x):Array.isArray(x)?_.setFilterValue(""):_.setFilterValue(x)),e?.()},C=t&&v?v._filterFn:y;return I.jsx(cn.Dropdown,{children:(s=t&&_&&v?(o=(i=v.renderColumnFilterModeMenuItems)===null||i===void 0?void 0:i.call(v,{column:_,internalFilterOptions:S,onSelectFilterMode:E,table:n}))!==null&&o!==void 0?o:d?.({column:_,internalFilterOptions:S,onSelectFilterMode:E,table:n}):f?.({internalFilterOptions:S,onSelectFilterMode:E,table:n}))!==null&&s!==void 0?s:S.map(({option:O,label:R,divider:T,symbol:A},F)=>I.jsxs(M.Fragment,{children:[I.jsxs(cn.Item,{onClick:()=>E(O),color:O===C?"blue":void 0,sx:{"& > .mantine-Menu-itemLabel":{display:"flex",flexWrap:"nowrap",gap:"1ch"}},value:O,children:[I.jsx(er,{sx:{fontSize:"20px",transform:"translateY(-2px)",width:"2ch"},children:A}),I.jsx(er,{align:"center",children:R})]}),T&&I.jsx(cn.Divider,{})]},F))})},iC=({table:t})=>{var e;const{getState:n,setGlobalFilter:r,options:{enableGlobalFilterModes:i,icons:{IconSearch:o,IconX:s},localization:a,manualFiltering:l,mantineSearchTextInputProps:c},refs:{searchInputRef:u}}=t,{globalFilter:d,showGlobalFilter:f}=n(),h=c instanceof Function?c({table:t}):c,g=M.useRef(!1),[y,_]=M.useState(d??""),[v]=KG(y,l?500:250);M.useEffect(()=>{r(v||void 0)},[v]);const x=()=>{_(""),r(void 0)};return M.useEffect(()=>{g.current&&(d===void 0?x():_(d)),g.current=!0},[d]),I.jsxs(ud,{in:f,sx:{"& > div":{display:"flex",alignItems:"center",gap:"16px",flexWrap:"nowrap"}},children:[i&&I.jsxs(cn,{withinPortal:!0,children:[I.jsx(cn.Target,{children:I.jsx(An,{"aria-label":a.changeSearchMode,size:"sm",children:I.jsx(o,{})})}),I.jsx(XK,{table:t,onSelect:x})]}),I.jsx(Pc,Object.assign({placeholder:a.search,onChange:w=>_(w.target.value),value:y??"",variant:"filled",icon:!i&&I.jsx(o,{}),rightSection:I.jsx(An,{"aria-label":a.clearSearch,disabled:!y?.length,onClick:x,size:"sm",sx:{"&:disabled":{backgroundColor:"transparent",border:"none"}},children:I.jsx(tr,{withinPortal:!0,withArrow:!0,label:(e=a.clearSearch)!==null&&e!==void 0?e:"",children:I.jsx(s,{})})})},h,{ref:w=>{w&&(u.current=w,h?.ref&&(h.ref=w))}}))]})},ZK=({isTopToolbar:t,table:e})=>{const{options:{mantineProgressProps:n},getState:r}=e,{isLoading:i,showProgressBars:o}=r(),s=n instanceof Function?n({isTopToolbar:t,table:e}):n;return I.jsx(ud,{in:i||o,sx:{bottom:t?0:void 0,position:"absolute",top:t?void 0:0,width:"100%"},children:I.jsx(uZ,Object.assign({animate:!0,"aria-label":"Loading","aria-busy":"true",sx:{position:"relative"},value:100},s))})},d_={userSelect:"none","&:disabled":{backgroundColor:"transparent",border:"none"}},qK=({table:t,position:e="bottom"})=>{var n;const{getPrePaginationRowModel:r,getState:i,setPageIndex:o,setPageSize:s,options:{enableToolbarInternalActions:a,icons:{IconChevronLeft:l,IconChevronRight:c},localization:u,mantinePaginationProps:d,rowCount:f}}=t,{pagination:{pageSize:h=10,pageIndex:g=0},showGlobalFilter:y}=i(),_=d instanceof Function?d({table:t}):d,v=f??r().rows.length,x=v/h>2&&_?.showFirstLastPageButtons!==!1,w=g*h,S=Math.min(g*h+h,v);return I.jsxs(er,Object.assign({align:"center",justify:"space-between",gap:"lg",py:"xs",px:"sm",mt:e==="top"&&a&&!y?"3rem":void 0,p:"relative",sx:{zIndex:2}},_,{children:[_?.showRowsPerPage!==!1&&I.jsx(iv,{data:(n=_?.rowsPerPageOptions)!==null&&n!==void 0?n:["5","10","15","20","25","30","50","100"],label:u.rowsPerPage,onChange:E=>s(+E),value:h.toString(),sx:{"@media (min-width: 720px)":{display:"flex",alignItems:"center",gap:"8px"},"& .mantine-Select-input":{width:"90px"}},withinPortal:!0}),I.jsx(Si,{children:`${S===0?0:w+1}-${S} ${u.of} ${v}`}),I.jsxs(er,{gap:"xs",children:[x&&I.jsxs(An,{"aria-label":u.goToFirstPage,disabled:g<=0,onClick:()=>o(0),sx:d_,children:[I.jsx("b",{style:{transform:"translate(2px, -1.5px)"},children:"|"}),I.jsx(l,{})]}),I.jsx(An,{"aria-label":u.goToPreviousPage,disabled:g<=0,onClick:()=>o(g-1),sx:d_,children:I.jsx(l,{})}),I.jsx(An,{"aria-label":u.goToNextPage,disabled:S>=v,onClick:()=>o(g+1),sx:d_,children:I.jsx(c,{})}),x&&I.jsxs(An,{"aria-label":u.goToLastPage,disabled:S>=v,onClick:()=>o(Math.ceil(v/h)-1),sx:d_,children:[I.jsx(c,{}),I.jsx("b",{style:{transform:"translate(-2px, -1.5px)"},children:"|"})]})]})]}))},KK=({stackAlertBanner:t,table:e})=>{var n,r;const{getPrePaginationRowModel:i,getSelectedRowModel:o,getState:s,options:{icons:{IconX:a},localization:l,mantineToolbarAlertBannerProps:c,mantineToolbarAlertBannerChipProps:u,positionToolbarAlertBanner:d,rowCount:f}}=e,{grouping:h,showAlertBanner:g}=s(),y=c instanceof Function?c({table:e}):c,_=u instanceof Function?u({table:e}):u,v=o().rows.length>0?(r=(n=l.selectedCountOfRowCountRowsSelected)===null||n===void 0?void 0:n.replace("{selectedCount}",o().rows.length.toString()))===null||r===void 0?void 0:r.replace("{rowCount}",(f??i().rows.length).toString()):null,x=h.length>0?I.jsxs(er,{children:[l.groupedBy," ",h.map((w,S)=>I.jsxs(M.Fragment,{children:[S>0?l.thenBy:"",I.jsxs(mb,Object.assign({onChange:()=>e.getColumn(w).toggleGrouping(),sx:{paddingLeft:"1ch"}},_,{children:[e.getColumn(w).columnDef.header," ",I.jsx(a,{size:"12pt",style:{transform:"translate(6px, 3px)"}})]}))]},`${S}-${w}`))]}):null;return I.jsx(ud,{in:g||!!v||!!x,transitionDuration:t?200:0,children:I.jsxs(QW,Object.assign({color:"blue",icon:!1},y,{sx:w=>Object.assign({borderRadius:0,fontSize:"16px",left:0,position:"relative",marginBottom:t?0:d==="bottom"?"-16px":void 0,padding:"8px",right:0,top:0,width:"100%",zIndex:2},y?.sx instanceof Function?y.sx(w):y?.sx),children:[y?.title&&I.jsx(Xe,{children:y.title}),I.jsxs(er,{sx:{padding:"8px 16px"},children:[y?.children,y?.children&&(v||x)&&I.jsx("br",{}),v,v&&x&&I.jsx("br",{}),x]})]}))})},cUe=t=>{var e,{table:n}=t,r=Ah(t,["table"]);const{getState:i,options:{icons:{IconMinimize:o,IconMaximize:s},localization:a},setIsFullScreen:l}=n,{isFullScreen:c}=i(),u=()=>{l(!c)};return I.jsx(tr,{withinPortal:!0,withArrow:!0,label:(e=r?.title)!==null&&e!==void 0?e:a.toggleFullScreen,children:I.jsx(An,Object.assign({"aria-label":a.showHideFilters,onClick:u,size:"lg"},r,{title:void 0,children:c?I.jsx(o,{}):I.jsx(s,{})}))})},uUe=({column:t,table:e})=>{const{options:{icons:{IconPinned:n,IconPinnedOff:r},localization:i}}=e,o=s=>{t.pin(s)};return I.jsx(er,{sx:{minWidth:"70px",alignContent:"center",justifyContent:"center"},children:t.getIsPinned()?I.jsx(tr,{withinPortal:!0,withArrow:!0,label:i.unpin,children:I.jsx(An,{onClick:()=>o(!1),size:"md",children:I.jsx(r,{})})}):I.jsxs(I.Fragment,{children:[I.jsx(tr,{withinPortal:!0,withArrow:!0,label:i.pinToLeft,children:I.jsx(An,{onClick:()=>o("left"),size:"md",children:I.jsx(n,{style:{transform:"rotate(90deg)"}})})}),I.jsx(tr,{withinPortal:!0,withArrow:!0,label:i.pinToRight,children:I.jsx(An,{onClick:()=>o("right"),size:"md",children:I.jsx(n,{style:{transform:"rotate(-90deg)"}})})})]})})},YA=({actionIconProps:t,onDragEnd:e,onDragStart:n,table:r})=>{var i;const{options:{icons:{IconGripHorizontal:o},localization:s}}=r;return I.jsx(tr,{withinPortal:!0,withArrow:!0,openDelay:1e3,position:"top",label:(i=t?.title)!==null&&i!==void 0?i:s.move,children:I.jsx(An,Object.assign({draggable:"true",size:"sm"},t,{onClick:a=>{var l;a.stopPropagation(),(l=t?.onClick)===null||l===void 0||l.call(t,a)},onDragStart:n,onDragEnd:e,sx:a=>Object.assign({cursor:"grab",margin:"0 -0.16px",opacity:.5,padding:"2px",transition:"opacity 100ms ease-in-out","&:hover":{backgroundColor:"transparent",opacity:1},"&:active":{cursor:"grabbing"}},t?.sx instanceof Function?t?.sx(a):t?.sx),title:void 0,children:I.jsx(o,{})}))})},QK=({allColumns:t,hoveredColumn:e,setHoveredColumn:n,column:r,isSubMenu:i,table:o})=>{var s;const{getState:a,options:{enableColumnOrdering:l,enableHiding:c,enablePinning:u,localization:d},setColumnOrder:f}=o,{columnOrder:h}=a(),{columnDef:g}=r,{columnDefType:y}=g,_=y!=="group"&&r.getIsVisible()||y==="group"&&r.getLeafColumns().some(R=>R.getIsVisible()),v=R=>{var T,A;y==="group"?(A=(T=R?.columns)===null||T===void 0?void 0:T.forEach)===null||A===void 0||A.call(T,F=>{F.toggleVisibility(!_)}):R.toggleVisibility()},x=M.useRef(null),[w,S]=M.useState(!1),E=R=>{S(!0),R.dataTransfer.setDragImage(x.current,0,0)},C=R=>{S(!1),n(null),e&&f(NK(r,e,h))},O=R=>{!w&&g.enableColumnOrdering!==!1&&n(r)};return I.jsxs(I.Fragment,{children:[I.jsx(cn.Item,{component:"span",ref:x,onDragEnter:O,sx:R=>({alignItems:"center",cursor:"default",justifyContent:"flex-start",opacity:w?.5:1,outline:w?`1px dashed ${R.colors.gray[7]}`:e?.id===r.id?`2px dashed ${gl(R)}`:"none",paddingLeft:`${(r.depth+.5)*2}rem`,paddingTop:"6px",paddingBottom:"6px"}),children:I.jsxs(Xe,{sx:{display:"flex",flexWrap:"nowrap",gap:"8px"},children:[!i&&y!=="group"&&l&&!t.some(R=>R.columnDef.columnDefType==="group")&&(g.enableColumnOrdering!==!1?I.jsx(YA,{onDragEnd:C,onDragStart:E,table:o}):I.jsx(Xe,{sx:{width:"22px"}})),!i&&u&&(r.getCanPin()?I.jsx(uUe,{column:r,table:o}):I.jsx(Xe,{sx:{width:"70px"}})),c?I.jsx(tr,{withinPortal:!0,withArrow:!0,openDelay:1e3,label:d.toggleVisibility,children:I.jsx(yb,{checked:_,disabled:i&&_||!r.getCanHide(),label:g.header,onChange:()=>v(r),sx:{cursor:"pointer !important"}})}):I.jsx(Si,{sx:{alignSelf:"center"},children:g.header})]})}),(s=r.columns)===null||s===void 0?void 0:s.map((R,T)=>I.jsx(QK,{allColumns:t,column:R,hoveredColumn:e,isSubMenu:i,setHoveredColumn:n,table:o},`${T}-${R.id}`))]})},dUe=({isSubMenu:t,table:e})=>{const{getAllColumns:n,getAllLeafColumns:r,getCenterLeafColumns:i,getIsAllColumnsVisible:o,getIsSomeColumnsPinned:s,getIsSomeColumnsVisible:a,getLeftLeafColumns:l,getRightLeafColumns:c,getState:u,toggleAllColumnsVisible:d,options:{enableColumnOrdering:f,enableHiding:h,enablePinning:g,localization:y}}=e,{columnOrder:_,columnPinning:v}=u(),x=()=>{r().filter(C=>C.columnDef.enableHiding!==!1).forEach(C=>C.toggleVisibility(!1))},w=M.useMemo(()=>{const C=n();return _.length>0&&!C.some(O=>O.columnDef.columnDefType==="group")?[...l(),...Array.from(new Set(_)).map(O=>i().find(R=>R?.id===O)),...c()].filter(Boolean):C},[_,v,n(),i(),l(),c()]),[S,E]=M.useState(null);return I.jsxs(cn.Dropdown,{sx:{maxHeight:"calc(80vh - 100px)",overflowY:"auto"},children:[I.jsxs(er,{sx:{justifyContent:t?"center":"space-between",padding:"8px",gap:"8px"},children:[!t&&h&&I.jsx(Ds,{disabled:!a(),onClick:x,variant:"subtle",children:y.hideAll}),!t&&f&&I.jsx(Ds,{onClick:()=>e.setColumnOrder(FK(e.options)),variant:"subtle",children:y.resetOrder}),!t&&g&&I.jsx(Ds,{disabled:!s(),onClick:()=>e.resetColumnPinning(!0),variant:"subtle",children:y.unpinAll}),h&&I.jsx(Ds,{disabled:o(),onClick:()=>d(!0),variant:"subtle",children:y.showAll})]}),I.jsx(hg,{}),w.map((C,O)=>I.jsx(QK,{allColumns:w,column:C,hoveredColumn:S,isSubMenu:t,setHoveredColumn:E,table:e},`${O}-${C.id}`))]})},fUe=t=>{var e,{table:n}=t,r=Ah(t,["table"]);const{options:{icons:{IconColumns:i},localization:o}}=n;return I.jsxs(cn,{closeOnItemClick:!1,withinPortal:!0,children:[I.jsx(tr,{withinPortal:!0,withArrow:!0,label:(e=r?.title)!==null&&e!==void 0?e:o.showHideColumns,children:I.jsx(cn.Target,{children:I.jsx(An,Object.assign({"aria-label":o.showHideColumns,size:"lg"},r,{title:void 0,children:I.jsx(i,{})}))})}),I.jsx(dUe,{table:n})]})},oC=["xs","md","xl"],hUe=t=>{var e,{table:n}=t,r=Ah(t,["table"]);const{getState:i,options:{icons:{IconBaselineDensityLarge:o,IconBaselineDensityMedium:s,IconBaselineDensitySmall:a},localization:l},setDensity:c}=n,{density:u}=i(),d=()=>{var f;c((f=oC[(oC.indexOf(u)-1)%oC.length])!==null&&f!==void 0?f:"xl")};return I.jsx(tr,{withinPortal:!0,withArrow:!0,label:(e=r?.title)!==null&&e!==void 0?e:l.toggleDensity,children:I.jsx(An,Object.assign({"aria-label":l.toggleDensity,onClick:d,size:"lg"},r,{title:void 0,children:u==="xs"?I.jsx(a,{}):u==="md"?I.jsx(s,{}):I.jsx(o,{})}))})},pUe=t=>{var e,{table:n}=t,r=Ah(t,["table"]);const{getState:i,options:{icons:{IconFilter:o,IconFilterOff:s},localization:a},setShowColumnFilters:l}=n,{showColumnFilters:c}=i(),u=()=>{l(!c)};return I.jsx(tr,{withinPortal:!0,withArrow:!0,label:(e=r?.title)!==null&&e!==void 0?e:a.showHideFilters,children:I.jsx(An,Object.assign({"aria-label":a.showHideFilters,onClick:u,size:"lg"},r,{title:void 0,children:c?I.jsx(s,{}):I.jsx(o,{})}))})},mUe=t=>{var e,n,{table:r}=t,i=Ah(t,["table"]);const{getState:o,options:{icons:{IconSearch:s,IconSearchOff:a},localization:l},refs:{searchInputRef:c},setShowGlobalFilter:u}=r,{globalFilter:d,showGlobalFilter:f}=o(),h=()=>{u(!f),setTimeout(()=>{var g;return(g=c.current)===null||g===void 0?void 0:g.focus()},100)};return I.jsx(tr,{withinPortal:!0,withArrow:!0,label:(e=i?.title)!==null&&e!==void 0?e:l.showHideSearch,children:I.jsx(An,Object.assign({"aria-label":(n=i?.title)!==null&&n!==void 0?n:l.showHideSearch,disabled:!!d,onClick:h,size:"lg"},i,{title:void 0,children:f?I.jsx(a,{}):I.jsx(s,{})}))})},gUe=({table:t})=>{var e;const{options:{enableColumnFilters:n,enableColumnOrdering:r,enableDensityToggle:i,enableFilters:o,enableFullScreenToggle:s,enableGlobalFilter:a,enableHiding:l,enablePinning:c,initialState:u,renderToolbarInternalActions:d}}=t;return I.jsx(er,{sx:{alignItems:"center",gap:"2px",zIndex:3},children:(e=d?.({table:t}))!==null&&e!==void 0?e:I.jsxs(I.Fragment,{children:[o&&a&&!u?.showGlobalFilter&&I.jsx(mUe,{table:t}),o&&n&&I.jsx(pUe,{table:t}),(l||r||c)&&I.jsx(fUe,{table:t}),i&&I.jsx(hUe,{table:t}),s&&I.jsx(cUe,{table:t})]})})},JK=({table:t})=>{const{getState:e,options:{enableGrouping:n,localization:r},setHoveredColumn:i,setShowToolbarDropZone:o}=t,{draggingColumn:s,hoveredColumn:a,grouping:l,showToolbarDropZone:c}=e(),u=d=>{i({id:"drop-zone"})};return M.useEffect(()=>{var d;((d=t.options.state)===null||d===void 0?void 0:d.showToolbarDropZone)!==void 0&&o(!!n&&!!s&&s.columnDef.enableGrouping!==!1&&!l.includes(s.id))},[n,s,l]),I.jsx(zc,{mounted:c,transition:"fade",children:d=>{var f,h;return I.jsx(er,{className:"mantine-ToolbarDropZone",sx:g=>({alignItems:"center",backgroundColor:g.fn.rgba(gl(g),a?.id==="drop-zone"?.2:.1),border:`dashed ${gl(g)} 2px`,justifyContent:"center",height:"calc(100%)",position:"absolute",width:"calc(100%)",zIndex:2}),onDragEnter:u,style:d,children:I.jsx(Si,{children:r.dropToGroupBy.replace("{column}",(h=(f=s?.columnDef)===null||f===void 0?void 0:f.header)!==null&&h!==void 0?h:"")})})}})},eQ=({theme:t})=>({alignItems:"flex-start",backgroundColor:t.colorScheme==="dark"?t.colors.dark[7]:t.white,backgroundImage:"none",display:"grid",flexWrap:"wrap-reverse",minHeight:"3.5rem",overflow:"visible",padding:"0 !important",transition:"all 100ms ease-in-out",zIndex:3}),vUe=({table:t})=>{var e;const{getState:n,options:{enableGlobalFilter:r,enablePagination:i,enableToolbarInternalActions:o,mantineTopToolbarProps:s,positionGlobalFilter:a,positionPagination:l,positionToolbarAlertBanner:c,positionToolbarDropZone:u,renderTopToolbarCustomActions:d},refs:{topToolbarRef:f}}=t,{isFullScreen:h,showGlobalFilter:g}=n(),y=rb("(max-width: 720px)"),_=s instanceof Function?s({table:t}):s,v=y||!!d||g;return I.jsxs(Xe,Object.assign({},_,{ref:x=>{x&&(f.current=x,_?.ref&&(_.ref.current=x))},sx:x=>Object.assign(Object.assign({position:h?"sticky":"relative",top:h?"0":void 0},eQ({theme:x})),_?.sx instanceof Function?_.sx(x):_?.sx),children:[c==="top"&&I.jsx(KK,{stackAlertBanner:v,table:t}),["both","top"].includes(u??"")&&I.jsx(JK,{table:t}),I.jsxs(er,{sx:{alignItems:"flex-start",boxSizing:"border-box",justifyContent:"space-between",padding:"8px",position:v?"relative":"absolute",right:0,top:0,width:"100%"},children:[r&&a==="left"&&I.jsx(iC,{table:t}),(e=d?.({table:t}))!==null&&e!==void 0?e:I.jsx("span",{}),o?I.jsxs(er,{sx:{flexWrap:"wrap-reverse",justifyContent:"flex-end"},children:[r&&a==="right"&&I.jsx(iC,{table:t}),I.jsx(gUe,{table:t})]}):r&&a==="right"&&I.jsx(iC,{table:t})]}),i&&["top","both"].includes(l??"")&&I.jsx(er,{justify:"end",children:I.jsx(qK,{table:t,position:"top"})}),I.jsx(ZK,{isTopToolbar:!0,table:t})]}))},yUe=({table:t})=>{const{getState:e,options:{enablePagination:n,mantineBottomToolbarProps:r,positionPagination:i,positionToolbarAlertBanner:o,positionToolbarDropZone:s,renderBottomToolbarCustomActions:a},refs:{bottomToolbarRef:l}}=t,{isFullScreen:c}=e(),u=rb("(max-width: 720px)"),d=r instanceof Function?r({table:t}):r,f=u||!!a;return I.jsxs(Xe,Object.assign({},d,{ref:h=>{h&&(l.current=h,d?.ref&&(d.ref.current=h))},sx:h=>Object.assign(Object.assign(Object.assign({},eQ({theme:h})),{bottom:c?"0":void 0,boxShadow:`0 1px 2px -1px ${h.fn.rgba(h.black,.1)} inset`,left:0,position:c?"fixed":"relative",right:0}),d?.sx instanceof Function?d.sx(h):d?.sx),children:[I.jsx(ZK,{isTopToolbar:!1,table:t}),o==="bottom"&&I.jsx(KK,{stackAlertBanner:f,table:t}),["both","bottom"].includes(s??"")&&I.jsx(JK,{table:t}),I.jsxs(Xe,{sx:{alignItems:"center",boxSizing:"border-box",display:"flex",justifyContent:"space-between",padding:"8px",width:"100%"},children:[a?a({table:t}):I.jsx("span",{}),I.jsx(Xe,{sx:{display:"flex",justifyContent:"flex-end",position:f?"relative":"absolute",right:0,top:0},children:n&&["bottom","both"].includes(i??"")&&I.jsx(qK,{table:t,position:"bottom"})})]})]}))},_Ue=({header:t,table:e})=>{var n,r,i,o,s,a,l,c,u,d;const{getState:f,toggleAllColumnsVisible:h,setColumnOrder:g,options:{enableColumnFilters:y,enableColumnResizing:_,enableGrouping:v,enableHiding:x,enablePinning:w,enableSorting:S,enableSortingRemoval:E,icons:{IconArrowAutofitContent:C,IconBoxMultiple:O,IconClearAll:R,IconColumns:T,IconDotsVertical:A,IconEyeOff:F,IconFilter:N,IconFilterOff:U,IconPinned:k,IconPinnedOff:z,IconSortAscending:G,IconSortDescending:W},localization:B,mantineColumnActionsButtonProps:j,renderColumnActionsMenuItems:$},refs:{filterInputRefs:q},setColumnSizingInfo:K,setShowColumnFilters:re}=e,{column:J}=t,{columnDef:le}=J,{columnSizing:ae,columnVisibility:oe}=f(),De=j instanceof Function?j({column:J,table:e}):j,Te=le.mantineColumnActionsButtonProps instanceof Function?le.mantineColumnActionsButtonProps({column:J,table:e}):le.mantineColumnActionsButtonProps,ve=Object.assign(Object.assign({},De),Te),we=()=>{J.clearSorting()},me=()=>{J.toggleSorting(!1)},se=()=>{J.toggleSorting(!0)},de=()=>{K(ht=>Object.assign(Object.assign({},ht),{isResizingColumn:!1})),J.resetSize()},ke=()=>{J.toggleVisibility(!1)},Ve=ht=>{J.pin(ht)},Ze=()=>{J.toggleGrouping(),g(ht=>["mrt-row-expand",...ht])},ot=()=>{J.setFilterValue("")},dt=()=>{re(!0),setTimeout(()=>{var ht;return(ht=q.current[`${J.id}-0`])===null||ht===void 0?void 0:ht.focus()},100)},We=()=>{h(!0)};return I.jsxs(cn,{closeOnItemClick:!0,withinPortal:!0,children:[I.jsx(tr,{withinPortal:!0,withArrow:!0,openDelay:1e3,position:"top",label:(n=ve?.title)!==null&&n!==void 0?n:B.columnActions,children:I.jsx(cn.Target,{children:I.jsx(An,Object.assign({"aria-label":B.columnActions,size:"sm"},ve,{sx:ht=>Object.assign({opacity:.5,transition:"opacity 100ms","&:hover":{opacity:1}},ve?.sx instanceof Function?ve.sx(ht):ve?.sx),children:I.jsx(A,{})}))})}),I.jsx(cn.Dropdown,{children:(o=(i=(r=le.renderColumnActionsMenuItems)===null||r===void 0?void 0:r.call(le,{column:J,table:e}))!==null&&i!==void 0?i:$?.({column:J,table:e}))!==null&&o!==void 0?o:I.jsxs(I.Fragment,{children:[S&&J.getCanSort()&&I.jsxs(I.Fragment,{children:[E!==!1&&I.jsx(cn.Item,{disabled:!J.getIsSorted(),icon:I.jsx(R,{}),onClick:we,children:B.clearSort}),I.jsx(cn.Item,{disabled:J.getIsSorted()==="asc",icon:I.jsx(G,{}),onClick:me,children:(s=B.sortByColumnAsc)===null||s===void 0?void 0:s.replace("{column}",String(le.header))}),I.jsx(cn.Item,{icon:I.jsx(W,{}),disabled:J.getIsSorted()==="desc",onClick:se,children:(a=B.sortByColumnDesc)===null||a===void 0?void 0:a.replace("{column}",String(le.header))}),(y||v||x)&&I.jsx(cn.Divider,{},3)]}),y&&J.getCanFilter()&&I.jsxs(I.Fragment,{children:[I.jsx(cn.Item,{disabled:!J.getFilterValue(),icon:I.jsx(U,{}),onClick:ot,children:B.clearFilter}),I.jsx(cn.Item,{icon:I.jsx(N,{}),onClick:dt,children:(l=B.filterByColumn)===null||l===void 0?void 0:l.replace("{column}",String(le.header))}),(v||x)&&I.jsx(cn.Divider,{},2)]}),v&&J.getCanGroup()&&I.jsxs(I.Fragment,{children:[I.jsx(cn.Item,{icon:I.jsx(O,{}),onClick:Ze,children:(c=B[J.getIsGrouped()?"ungroupByColumn":"groupByColumn"])===null||c===void 0?void 0:c.replace("{column}",String(le.header))}),w&&I.jsx(cn.Divider,{})]}),w&&J.getCanPin()&&I.jsxs(I.Fragment,{children:[I.jsx(cn.Item,{disabled:J.getIsPinned()==="left"||!J.getCanPin(),icon:I.jsx(k,{style:{transform:"rotate(90deg)"}}),onClick:()=>Ve("left"),children:B.pinToLeft}),I.jsx(cn.Item,{disabled:J.getIsPinned()==="right"||!J.getCanPin(),icon:I.jsx(k,{style:{transform:"rotate(-90deg)"}}),onClick:()=>Ve("right"),children:B.pinToRight}),I.jsx(cn.Item,{disabled:!J.getIsPinned(),icon:I.jsx(z,{}),onClick:()=>Ve(!1),children:B.unpin}),x&&I.jsx(cn.Divider,{})]}),_&&J.getCanResize()&&I.jsx(cn.Item,{disabled:!ae[J.id],icon:I.jsx(C,{}),onClick:de,children:B.resetColumnSize},0),x&&I.jsxs(I.Fragment,{children:[I.jsx(cn.Item,{disabled:!J.getCanHide(),icon:I.jsx(F,{}),onClick:ke,children:(u=B.hideColumn)===null||u===void 0?void 0:u.replace("{column}",String(le.header))},0),I.jsx(cn.Item,{disabled:!Object.values(oe).filter(ht=>!ht).length,icon:I.jsx(T,{}),onClick:We,children:(d=B.showAllColumns)===null||d===void 0?void 0:d.replace("{column}",String(le.header))},1)]})]})})]})},VT=({header:t,rangeFilterIndex:e,table:n})=>{var r,i,o,s,a,l,c,u;const{options:{columnFilterModeOptions:d,icons:{IconX:f},localization:h,mantineFilterDateInputProps:g,mantineFilterMultiSelectProps:y,mantineFilterSelectProps:_,mantineFilterTextInputProps:v,manualFiltering:x},refs:{filterInputRefs:w},setColumnFilterFns:S}=n,{column:E}=t,{columnDef:C}=E,O=v instanceof Function?v({column:E,table:n,rangeFilterIndex:e}):v,R=C.mantineFilterTextInputProps instanceof Function?C.mantineFilterTextInputProps({column:E,table:n,rangeFilterIndex:e}):C.mantineFilterTextInputProps,T=Object.assign(Object.assign({},O),R),A=_ instanceof Function?_({column:E,table:n,rangeFilterIndex:e}):_,F=C.mantineFilterSelectProps instanceof Function?C.mantineFilterSelectProps({column:E,table:n,rangeFilterIndex:e}):C.mantineFilterSelectProps,N=Object.assign(Object.assign({},A),F),U=y instanceof Function?y({column:E,table:n,rangeFilterIndex:e}):y,k=C.mantineFilterMultiSelectProps instanceof Function?C.mantineFilterMultiSelectProps({column:E,table:n,rangeFilterIndex:e}):C.mantineFilterMultiSelectProps,z=Object.assign(Object.assign({},U),k),G=g instanceof Function?g({column:E,table:n,rangeFilterIndex:e}):g,W=C.mantineFilterDateInputProps instanceof Function?C.mantineFilterDateInputProps({column:E,table:n,rangeFilterIndex:e}):C.mantineFilterDateInputProps,B=Object.assign(Object.assign({},G),W),j=C.filterVariant==="range"||C.filterVariant==="date-range"||e!==void 0,$=C.filterVariant==="select",q=C.filterVariant==="multi-select",K=C.filterVariant==="date"||C.filterVariant==="date-range",re=(r=C?.columnFilterModeOptions)!==null&&r!==void 0?r:d,J=C._filterFn,le=["empty","notEmpty"].includes(J)?h[`filter${((o=(i=J?.charAt)===null||i===void 0?void 0:i.call(J,0))===null||o===void 0?void 0:o.toUpperCase())+J?.slice(1)}`]:"",ae=j?e===0?h.min:e===1?h.max:"":(s=T?.placeholder)!==null&&s!==void 0?s:(a=h.filterByColumn)===null||a===void 0?void 0:a.replace("{column}",String(C.header)),oe=M.useRef(!1),[De,Te]=M.useState(()=>{var de,ke;return q?E.getFilterValue()||[]:j?((de=E.getFilterValue())===null||de===void 0?void 0:de[e])||"":(ke=E.getFilterValue())!==null&&ke!==void 0?ke:""}),[ve]=KG(De,x?400:200);M.useEffect(()=>{oe.current&&(j?E.setFilterValue(de=>{const ke=Array.isArray(de)?de:["",""];return ke[e]=ve,ke}):E.setFilterValue(ve??void 0))},[ve]),M.useEffect(()=>{if(!oe.current){oe.current=!0;return}const de=E.getFilterValue();de===void 0?we():Te(j&&e!==void 0?(de??["",""])[e]:de??"")},[E.getFilterValue()]);const we=()=>{q?(Te([]),E.setFilterValue([])):j?(Te(""),E.setFilterValue(de=>{const ke=de??["",""];return ke[e]=void 0,ke})):(Te(""),E.setFilterValue(void 0))};if(C.Filter)return I.jsx(I.Fragment,{children:(l=C.Filter)===null||l===void 0?void 0:l.call(C,{column:E,header:t,rangeFilterIndex:e,table:n})});const me=()=>{Te(""),E.setFilterValue(void 0),S(de=>{var ke;return Object.assign(Object.assign({},de),{[t.id]:(ke=re?.[0])!==null&&ke!==void 0?ke:"fuzzy"})})},se={disabled:!!le,placeholder:ae,title:ae,onClick:de=>de.stopPropagation(),onChange:Te,value:De,variant:"unstyled",sx:de=>Object.assign({borderBottom:`2px solid ${de.colors.gray[de.colorScheme==="dark"?7:3]}`,minWidth:K?"125px":j?"80px":le?"auto":"100px",width:"100%","& .mantine-TextInput-input":{overflow:"hidden",textOverflow:"ellipsis"},"& .mantine-DateInput-input":{height:"2.1rem"}},Ph(q?z.sx:$?N.sx:K?B.sx:T?.sx))};return le?I.jsx(Xe,{sx:se.sx,children:I.jsxs(mb,{onClick:me,sx:{margin:"4px"},children:[le," ",I.jsx(f,{size:"12pt",style:{transform:"translate(6px, 3px)"}})]})}):q?I.jsx(WX,Object.assign({},se,{data:z.data,searchable:!0,withinPortal:!0},z,{ref:de=>{de&&(w.current[`${E.id}-${e??0}`]=de,z.ref&&(z.ref.current=de))},sx:se.sx})):$?I.jsx(iv,Object.assign({},se,{clearable:!0,data:N.data,searchable:!0,withinPortal:!0},N,{ref:de=>{de&&(w.current[`${E.id}-${e??0}`]=de,N.ref&&(N.ref.current=de))},sx:se.sx})):K?I.jsx(IK,Object.assign({},se,{allowDeselect:!0,clearable:!0,popoverProps:{withinPortal:!0}},B,{ref:de=>{de&&(w.current[`${E.id}-${e??0}`]=de,B.ref&&(B.ref.current=de))},sx:se.sx})):I.jsx(Pc,Object.assign({},se,{rightSection:!le&&(!((c=De?.toString())===null||c===void 0)&&c.length)?I.jsx(An,{"aria-label":h.clearFilter,onClick:we,size:"sm",sx:{"&:disabled":{backgroundColor:"transparent",border:"none"}},title:(u=h.clearFilter)!==null&&u!==void 0?u:"",children:I.jsx(f,{})}):null,onChange:de=>Te(de.target.value)},T,{ref:de=>{de&&(w.current[`${E.id}-${e??0}`]=de,T.ref&&(T.ref.current=de))},sx:se.sx}))},xUe=({header:t,table:e})=>I.jsxs(Xe,{sx:{display:"grid",gridTemplateColumns:"6fr 6fr",gap:"16px"},children:[I.jsx(VT,{header:t,rangeFilterIndex:0,table:e}),I.jsx(VT,{header:t,rangeFilterIndex:1,table:e})]}),wUe=({column:t,table:e})=>{var n,r,i;const{getState:o,options:{localization:s,mantineFilterCheckboxProps:a}}=e,{density:l}=o(),{columnDef:c}=t,u=a instanceof Function?a({column:t,table:e}):a,d=c.mantineFilterCheckboxProps instanceof Function?c.mantineFilterCheckboxProps({column:t,table:e}):c.mantineFilterCheckboxProps,f=Object.assign(Object.assign({},u),d),h=(n=s.filterByColumn)===null||n===void 0?void 0:n.replace("{column}",c.header);return I.jsx(tr,{withinPortal:!0,withArrow:!0,openDelay:1e3,label:(r=f?.title)!==null&&r!==void 0?r:h,children:I.jsx(nv,Object.assign({checked:t.getFilterValue()==="true",indeterminate:t.getFilterValue()===void 0,color:t.getFilterValue()===void 0?"default":"primary",size:l==="xs"?"sm":"md",label:(i=f.title)!==null&&i!==void 0?i:h},f,{onClick:g=>{var y;g.stopPropagation(),(y=f?.onClick)===null||y===void 0||y.call(f,g)},onChange:g=>{var y;t.setFilterValue(t.getFilterValue()===void 0?"true":t.getFilterValue()==="true"?"false":void 0),(y=f?.onChange)===null||y===void 0||y.call(f,g)},sx:g=>Object.assign({fontWeight:"normal",marginTop:"8px"},f?.sx instanceof Function?f.sx(g):f?.sx),title:void 0}))})},SUe=({header:t,table:e})=>{var n,r;const{getState:i,options:{enableColumnFilterModes:o,columnFilterModeOptions:s,icons:{IconFilter:a},localization:l}}=e,{showColumnFilters:c}=i(),{column:u}=t,{columnDef:d}=u,f=d._filterFn,h=(n=d?.columnFilterModeOptions)!==null&&n!==void 0?n:s,g=o&&d.enableColumnFilterModes!==!1&&(h===void 0||!!h?.length);return I.jsx(ud,{in:c,children:I.jsxs(er,{direction:"column",children:[I.jsxs(er,{align:"flex-end",children:[d.filterVariant==="checkbox"?I.jsx(wUe,{column:u,table:e}):d.filterVariant==="range"||d.filterVariant==="date-range"||["between","betweenInclusive","inNumberRange"].includes(d._filterFn)?I.jsx(xUe,{header:t,table:e}):I.jsx(VT,{header:t,table:e}),g&&I.jsxs(cn,{withinPortal:!0,children:[I.jsx(tr,{label:l.changeFilterMode,position:"bottom-start",withArrow:!0,withinPortal:!0,children:I.jsx(cn.Target,{children:I.jsx(An,{"aria-label":l.changeFilterMode,size:"md",sx:{transform:"translateY(-2px)"},children:I.jsx(a,{})})})}),I.jsx(XK,{header:t,table:e})]})]}),g?I.jsx(Si,{component:"label",color:"dimmed",sx:{whiteSpace:"nowrap",marginTop:"4px",fontSize:"10px"},children:l.filterMode.replace("{filterType}",l[`filter${((r=f?.charAt(0))===null||r===void 0?void 0:r.toUpperCase())+f?.slice(1)}`])}):null]})})},bUe=({header:t,table:e})=>{var n,r,i;const{options:{icons:{IconFilter:o},localization:s},refs:{filterInputRefs:a},setShowColumnFilters:l}=e,{column:c}=t,{columnDef:u}=c,d=u.filterVariant==="range"||["between","betweenInclusive","inNumberRange"].includes(u._filterFn),f=u._filterFn,h=s.filteringByColumn.replace("{column}",String(u.header)).replace("{filterType}",s[`filter${((n=f?.charAt(0))===null||n===void 0?void 0:n.toUpperCase())+f?.slice(1)}`]).replace("{filterValue}",`"${Array.isArray(c.getFilterValue())?c.getFilterValue().join(`" ${d?s.and:s.or} "`):c.getFilterValue()}"`).replace('" "',"");return I.jsx(zc,{transition:"scale",mounted:!!c.getFilterValue()&&!d||d&&(!!(!((r=c.getFilterValue())===null||r===void 0)&&r[0])||!!(!((i=c.getFilterValue())===null||i===void 0)&&i[1])),children:g=>I.jsx(Xe,{component:"span",sx:{flex:"0 0"},style:g,children:I.jsx(tr,{withinPortal:!0,withArrow:!0,position:"top",label:h,children:I.jsx(An,{onClick:y=>{l(!0),setTimeout(()=>{var _,v;(_=a.current[`${c.id}-0`])===null||_===void 0||_.focus(),(v=a.current[`${c.id}-0`])===null||v===void 0||v.select()},100),y.stopPropagation()},size:"sm",sx:{opacity:.5,padding:"2px","&:hover":{opacity:1}},children:I.jsx(o,{})})})})})},MUe=({column:t,table:e,tableHeadCellRef:n})=>{const{getState:r,options:{enableColumnOrdering:i,mantineColumnDragHandleProps:o},setColumnOrder:s,setDraggingColumn:a,setHoveredColumn:l}=e,{columnDef:c}=t,{hoveredColumn:u,draggingColumn:d,columnOrder:f}=r(),h=o instanceof Function?o({column:t,table:e}):o,g=c.mantineColumnDragHandleProps instanceof Function?c.mantineColumnDragHandleProps({column:t,table:e}):c.mantineColumnDragHandleProps,y=Object.assign(Object.assign({},h),g),_=x=>{var w;(w=y?.onDragStart)===null||w===void 0||w.call(y,x),a(t),x.dataTransfer.setDragImage(n.current,0,0)},v=x=>{var w;(w=y?.onDragEnd)===null||w===void 0||w.call(y,x),u?.id==="drop-zone"?t.toggleGrouping():i&&u&&u?.id!==d?.id&&s(NK(t,u,f)),a(null),l(null)};return I.jsx(YA,{actionIconProps:y,onDragStart:_,onDragEnd:v,table:e})},EUe=({header:t,table:e})=>{var n;const{getState:r,options:{columnResizeMode:i},setColumnSizingInfo:o}=e,{density:s}=r(),{column:a}=t;return I.jsx(Xe,{onDoubleClick:()=>{o(l=>Object.assign(Object.assign({},l),{isResizingColumn:!1})),a.resetSize()},onMouseDown:t.getResizeHandler(),onTouchStart:t.getResizeHandler(),sx:l=>({cursor:"col-resize",marginRight:s==="xl"?"-24px":s==="md"?"-20px":"-14px",position:"absolute",right:"4px",paddingLeft:"1px",paddingRight:"1px","&:active > .mantine-Divider-vertical":{borderLeftColor:gl(l)}}),style:{transform:a.getIsResizing()&&i==="onEnd"?`translateX(${(n=r().columnSizingInfo.deltaOffset)!==null&&n!==void 0?n:0}px)`:void 0},children:I.jsx(hg,{orientation:"vertical",size:"lg",sx:{borderRadius:"2px",borderWidth:"4px",height:"24px",touchAction:"none",transition:a.getIsResizing()?void 0:"all 100ms ease-in-out",userSelect:"none",zIndex:4}})})},PUe=({header:t,table:e})=>{const{getState:n,options:{icons:{IconSortDescending:r,IconSortAscending:i,IconArrowsSort:o},localization:s}}=e,{column:a}=t,{columnDef:l}=a,{sorting:c}=n(),u=a.getIsSorted()?a.getIsSorted()==="desc"?s.sortedByColumnDesc.replace("{column}",l.header):s.sortedByColumnAsc.replace("{column}",l.header):s.unsorted,d=c.length>=2&&a.getSortIndex()!==-1;return I.jsx(tr,{withinPortal:!0,withArrow:!0,position:"top",label:u,children:I.jsx(oX,{color:"transparent",disabled:!d,inline:!0,label:a.getSortIndex()+1,offset:3,children:I.jsx(An,{"aria-label":u,size:"xs",sx:{opacity:a.getIsSorted()?1:.5,transform:d?"translate(-2px, 2px) scale(0.9)":void 0,transition:"opacity 100ms ease-in-out","&:hover":{opacity:1}},children:a.getIsSorted()==="desc"?I.jsx(r,{}):a.getIsSorted()==="asc"?I.jsx(i,{}):I.jsx(o,{})})})})},CUe=({header:t,table:e})=>{var n,r,i,o;const s=Ir(),{getState:a,options:{enableColumnActions:l,enableColumnDragging:c,enableColumnOrdering:u,enableGrouping:d,enableMultiSort:f,layoutMode:h,mantineTableHeadCellProps:g},refs:{tableHeadCellRefs:y},setHoveredColumn:_}=e,{density:v,draggingColumn:x,grouping:w,hoveredColumn:S}=a(),{column:E}=t,{columnDef:C}=E,{columnDefType:O}=C,R=g instanceof Function?g({column:E,table:e}):g,T=C.mantineTableHeadCellProps instanceof Function?C.mantineTableHeadCellProps({column:E,table:e}):C.mantineTableHeadCellProps,A=Object.assign(Object.assign({},R),T),F=(l||C.enableColumnActions)&&C.enableColumnActions!==!1,N=c!==!1&&C.enableColumnDragging!==!1&&(c||u&&C.enableColumnOrdering!==!1||d&&C.enableGrouping!==!1&&!w.includes(E.id)),U=M.useMemo(()=>{let B=0;return E.getCanSort()&&B++,F&&(B+=1.75),N&&(B+=1.25),B},[F,N]),k=M.useMemo(()=>x?.id===E.id?`1px dashed ${s.colors.gray[7]} !important`:S?.id===E.id?`2px dashed ${gl(s)} !important`:void 0,[x,S]),z=k?{borderLeft:k,borderRight:k,borderTop:k}:void 0,G=B=>{d&&S?.id==="drop-zone"&&_(null),u&&x&&O!=="group"&&_(C.enableColumnOrdering!==!1?E:null)},W=C?.Header instanceof Function?(n=C?.Header)===null||n===void 0?void 0:n.call(C,{column:E,header:t,table:e}):(r=C?.Header)!==null&&r!==void 0?r:C.header;return I.jsxs(Xe,Object.assign({component:"th",align:O==="group"?"center":"left",colSpan:t.colSpan,onDragEnter:G,ref:B=>{B&&(y.current[E.id]=B)}},A,{sx:B=>Object.assign(Object.assign({flexDirection:h==="grid"?"column":void 0,fontWeight:"bold",overflow:"visible",padding:v==="xl"?"23px":v==="md"?"16px":"10px",userSelect:f&&E.getCanSort()?"none":void 0,verticalAlign:"top",zIndex:E.getIsResizing()||x?.id===E.id?3:E.getIsPinned()&&O!=="group"?2:1,"&:hover .mantine-ActionIcon-root":{opacity:1}},$A({column:E,header:t,table:e,tableCellProps:A,theme:B})),z),children:[t.isPlaceholder?null:I.jsxs(er,{className:"mantine-TableHeadCell-Content",sx:{alignItems:"flex-start",flexDirection:A?.align==="right"?"row-reverse":"row",justifyContent:O==="group"||A?.align==="center"?"center":E.getCanResize()?"space-between":"flex-start",position:"relative",width:"100%"},children:[I.jsxs(er,{className:"mantine-TableHeadCell-Content-Labels",onClick:E.getToggleSortingHandler(),sx:{alignItems:"center",cursor:E.getCanSort()&&O!=="group"?"pointer":void 0,flexDirection:A?.align==="right"?"row-reverse":"row",overflow:O==="data"?"hidden":void 0,paddingLeft:A?.align==="center"?`${U}rem`:void 0},children:[I.jsx(er,{className:"mantine-TableHeadCell-Content-Wrapper",sx:{overflow:O==="data"?"hidden":void 0,textOverflow:"ellipsis",whiteSpace:((o=(i=C.header)===null||i===void 0?void 0:i.length)!==null&&o!==void 0?o:0)<20?"nowrap":"normal"},title:O==="data"?C.header:void 0,children:W}),E.getCanSort()&&I.jsx(PUe,{header:t,table:e}),E.getCanFilter()&&I.jsx(bUe,{header:t,table:e})]}),O!=="group"&&I.jsxs(er,{className:"mantine-TableHeadCell-Content-Actions",sx:{alignItems:"center",alignSelf:"center",whiteSpace:"nowrap"},children:[N&&I.jsx(MUe,{column:E,table:e,tableHeadCellRef:{current:y.current[E.id]}}),F&&I.jsx(_Ue,{header:t,table:e})]}),E.getCanResize()&&I.jsx(EUe,{header:t,table:e})]}),E.getCanFilter()&&I.jsx(SUe,{header:t,table:e})]}))},TUe=({headerGroup:t,table:e,virtualColumns:n,virtualPaddingLeft:r,virtualPaddingRight:i})=>{const{getState:o,options:{enableStickyHeader:s,layoutMode:a,mantineTableHeadRowProps:l}}=e,{isFullScreen:c}=o(),u=l instanceof Function?l({headerGroup:t,table:e}):l,d=s||c;return I.jsxs(Xe,Object.assign({component:"tr"},u,{sx:f=>Object.assign(Object.assign({backgroundColor:f.colorScheme==="dark"?f.colors.dark[7]:f.white,boxShadow:`4px 0 8px ${f.fn.rgba(f.black,.1)}`,display:a==="grid"?"flex":"table-row",top:d?0:void 0},u?.sx instanceof Function?u?.sx(f):u?.sx),{position:d?"sticky":void 0}),children:[r?I.jsx("th",{style:{display:"flex",width:r}}):null,(n??t.headers).map(f=>{const h=n?t.headers[f.index]:f;return I.jsx(CUe,{header:h,table:e},h.id)}),i?I.jsx("th",{style:{display:"flex",width:i}}):null]}))},OUe=({table:t,virtualColumns:e,virtualPaddingLeft:n,virtualPaddingRight:r})=>{const{getHeaderGroups:i,getState:o,options:{enableStickyHeader:s,layoutMode:a,mantineTableHeadProps:l}}=t,{isFullScreen:c}=o(),u=l instanceof Function?l({table:t}):l,d=s||c;return I.jsx(Xe,Object.assign({component:"thead"},u,{sx:f=>Object.assign({display:a==="grid"?"grid":"table-row-group",position:d&&a==="grid"?"sticky":"relative",opacity:.97,top:d?0:void 0,zIndex:d?2:void 0},u?.sx instanceof Function?u?.sx(f):u?.sx),children:i().map(f=>I.jsx(TUe,{headerGroup:f,table:t,virtualColumns:e,virtualPaddingLeft:n,virtualPaddingRight:r},f.id))}))},tQ=({cell:t,table:e})=>{var n;const{getState:r,options:{editingMode:i,mantineEditTextInputProps:o,mantineEditSelectProps:s},refs:{editInputRefs:a},setEditingCell:l,setEditingRow:c}=e,{column:u,row:d}=t,{columnDef:f}=u,{editingRow:h}=r(),g=f.editVariant==="select",[y,_]=M.useState(()=>t.getValue()),v=o instanceof Function?o({cell:t,column:u,row:d,table:e}):o,x=f.mantineEditTextInputProps instanceof Function?f.mantineEditTextInputProps({cell:t,column:u,row:d,table:e}):f.mantineEditTextInputProps,w=Object.assign(Object.assign({},v),x),S=s instanceof Function?s({cell:t,column:u,row:d,table:e}):s,E=f.mantineEditSelectProps instanceof Function?f.mantineEditSelectProps({cell:t,column:u,row:d,table:e}):f.mantineEditSelectProps,C=Object.assign(Object.assign({},S),E),O=F=>{h&&c(Object.assign(Object.assign({},h),{_valuesCache:Object.assign(Object.assign({},h._valuesCache),{[u.id]:F})}))},R=F=>{var N;(N=w.onBlur)===null||N===void 0||N.call(w,F),O(y),l(null)},T=F=>{var N;F.key==="Enter"&&((N=a.current[u.id])===null||N===void 0||N.blur())};if(f.Edit)return I.jsx(I.Fragment,{children:(n=f.Edit)===null||n===void 0?void 0:n.call(f,{cell:t,column:u,row:d,table:e})});const A={disabled:(f.enableEditing instanceof Function?f.enableEditing(d):f.enableEditing)===!1,label:i==="modal"?u.columnDef.header:void 0,name:u.id,placeholder:f.header,value:y,variant:i==="table"?"unstyled":"default",onClick:F=>{var N;F.stopPropagation(),(N=w?.onClick)===null||N===void 0||N.call(w,F)}};return g?I.jsx(iv,Object.assign({},A,{searchable:!0,value:y,withinPortal:!0},C,{onBlur:R,onChange:F=>{var N;(N=C.onChange)===null||N===void 0||N.call(C,F),_(F)},onClick:F=>{var N;F.stopPropagation(),(N=C?.onClick)===null||N===void 0||N.call(C,F)},ref:F=>{F&&(a.current[u.id]=F,C.ref&&(C.ref.current=F))}})):I.jsx(Pc,Object.assign({},A,{onKeyDown:T,value:y??""},w,{onBlur:R,onChange:F=>{var N;(N=w.onChange)===null||N===void 0||N.call(w,F),_(F.target.value)},onClick:F=>{var N;F.stopPropagation(),(N=w?.onClick)===null||N===void 0||N.call(w,F)},ref:F=>{F&&(a.current[u.id]=F,w.ref&&(w.ref.current=F))}}))},RUe=({cell:t,children:e,table:n})=>{const{options:{localization:r,mantineCopyButtonProps:i}}=n,{column:o,row:s}=t,{columnDef:a}=o,l=i instanceof Function?i({cell:t,column:o,row:s,table:n}):i,c=a.mantineCopyButtonProps instanceof Function?a.mantineCopyButtonProps({cell:t,column:o,row:s,table:n}):a.mantineCopyButtonProps,u=Object.assign(Object.assign({},l),c);return I.jsx(LY,{value:t.getValue(),children:({copied:d,copy:f})=>{var h;return I.jsx(tr,{withinPortal:!0,withArrow:!0,openDelay:1e3,position:"top",label:(h=u?.title)!==null&&h!==void 0?h:d?r.copiedToClipboard:r.clickToCopy,children:I.jsx(Fs,Object.assign({},u,{onClick:g=>{g.stopPropagation(),f()},sx:g=>Object.assign({backgroundColor:"transparent",border:"none",borderRadius:"4px",color:"inherit",cursor:"copy",fontFamily:"inherit",fontSize:"inherit",fontWeight:"inherit",justifyContent:"inherit",letterSpacing:"inherit",margin:"-4px",minWidth:"unset",padding:"4px",textAlign:"inherit",textTransform:"inherit","&:active":{transform:"translateY(1px)"},"&:hover":{backgroundColor:g.fn.rgba(gl(g),.1)}},u?.sx instanceof Function?u.sx(g):u?.sx),title:void 0,children:e}))})}})},AUe=({cell:t,rowRef:e,table:n})=>{const{options:{mantineRowDragHandleProps:r}}=n,{row:i}=t,o=r instanceof Function?r({row:i,table:n}):r,s=l=>{var c;(c=o?.onDragStart)===null||c===void 0||c.call(o,l),l.dataTransfer.setDragImage(e.current,0,0),n.setDraggingRow(i)},a=l=>{var c;(c=o?.onDragEnd)===null||c===void 0||c.call(o,l),n.setDraggingRow(null),n.setHoveredRow(null)};return I.jsx(YA,{actionIconProps:o,onDragStart:s,onDragEnd:a,table:n})},sC=["string","number"],F6=({cell:t,table:e})=>{var n,r,i,o;const{getState:s,options:{enableFilterMatchHighlighting:a}}=e,{column:l,row:c}=t,{columnDef:u}=l,{globalFilter:d,globalFilterFn:f}=s(),h=l.getFilterValue();let g=t.getIsAggregated()&&u.AggregatedCell?u.AggregatedCell({cell:t,column:l,row:c,table:e}):c.getIsGrouped()&&!t.getIsGrouped()?null:t.getIsGrouped()&&u.GroupedCell?u.GroupedCell({cell:t,column:l,row:c,table:e}):void 0;const y=g!==void 0;if(y||(g=t.renderValue()),a&&u.enableFilterMatchHighlighting!==!1&&g&&sC.includes(typeof g)&&(h&&sC.includes(typeof h)&&u.filterVariant==="text"||d&&sC.includes(typeof d)&&l.getCanGlobalFilter())){const _=rC?.({text:g?.toString(),query:((r=(n=l.getFilterValue())!==null&&n!==void 0?n:d)!==null&&r!==void 0?r:"").toString(),matchExactly:(h?u._filterFn:f)!=="fuzzy"});(_?.length>1||!((i=_?.[0])===null||i===void 0)&&i.match)&&(g=I.jsx("span",{"aria-label":g,role:"note",children:(o=_?.map(({key:v,match:x,text:w})=>I.jsx(Xe,{"aria-hidden":"true",component:"span",sx:x?S=>({backgroundColor:S.colors.yellow[S.colorScheme==="dark"?9:5],borderRadius:"2px",color:S.colorScheme==="dark"?S.white:S.black,p:"2px 1px"}):void 0,children:w},v)))!==null&&o!==void 0?o:g}))}return u.Cell&&!y&&(g=u.Cell({cell:t,renderedCellValue:g,column:l,row:c,table:e})),I.jsx(I.Fragment,{children:g})},nQ=({cell:t,isStriped:e,measureElement:n,numRows:r,rowIndex:i,rowRef:o,table:s,virtualCell:a})=>{var l,c,u,d;const f=Ir(),{getState:h,options:{editingMode:g,enableClickToCopy:y,enableColumnOrdering:_,enableEditing:v,enableGrouping:x,enableRowNumbers:w,layoutMode:S,mantineTableBodyCellProps:E,mantineSkeletonProps:C,rowNumberMode:O},refs:{editInputRefs:R},setEditingCell:T,setHoveredColumn:A}=s,{draggingColumn:F,draggingRow:N,hoveredRow:U,editingCell:k,editingRow:z,hoveredColumn:G,density:W,isLoading:B,showSkeletons:j}=h(),{column:$,row:q}=t,{columnDef:K}=$,{columnDefType:re}=K,J=E instanceof Function?E({cell:t,column:$,row:q,table:s}):E,le=K.mantineTableBodyCellProps instanceof Function?K.mantineTableBodyCellProps({cell:t,column:$,row:q,table:s}):K.mantineTableBodyCellProps,ae=Object.assign(Object.assign({},J),le),oe=C instanceof Function?C({cell:t,column:$,row:q,table:s}):C,[De,Te]=M.useState(0);M.useEffect(()=>Te(B||j?re==="display"?$.getSize()/2:Math.round(Math.random()*($.getSize()-$.getSize()/3)+$.getSize()/3):100),[]);const ve=M.useMemo(()=>{const ke=F?.id===$.id,Ve=G?.id===$.id,Ze=N?.id===q.id,ot=U?.id===q.id,dt=$4e($,s),We=G4e($,s),ht=i===r-1,ee=ke||Ze?`1px dashed ${f.colors.gray[7]} !important`:Ve||ot?`2px dashed ${gl(f)} !important`:void 0;return ee?{borderLeft:ke||Ve||(Ze||ot)&&dt?ee:void 0,borderRight:ke||Ve||(Ze||ot)&&We?ee:void 0,borderBottom:Ze||ot||ht?ee:void 0,borderTop:Ze||ot?ee:void 0}:void 0},[F,N,G,U,i]),we=(v instanceof Function?v(q):v)&&(K.enableEditing instanceof Function?K.enableEditing(q):K.enableEditing)!==!1,me=we&&g!=="modal"&&(g==="table"||z?.id===q.id||k?.id===t.id)&&!q.getIsGrouped(),se=ke=>{var Ve;(Ve=ae?.onDoubleClick)===null||Ve===void 0||Ve.call(ae,ke),we&&g==="cell"&&(T(t),setTimeout(()=>{var Ze;const ot=R.current[$.id];ot&&(ot.focus(),(Ze=ot.select)===null||Ze===void 0||Ze.call(ot))},100))},de=ke=>{var Ve;(Ve=ae?.onDragEnter)===null||Ve===void 0||Ve.call(ae,ke),x&&G?.id==="drop-zone"&&A(null),_&&F&&A(K.enableColumnOrdering!==!1?$:null)};return I.jsxs(Xe,Object.assign({component:"td","data-index":a?.index,ref:ke=>{ke&&n?.(ke)}},ae,{onDragEnter:de,onDoubleClick:se,sx:ke=>Object.assign(Object.assign({alignItems:S==="grid"?"center":void 0,cursor:we&&g==="cell"?"pointer":"inherit",justifyContent:S==="grid"?ae.align:void 0,overflow:"hidden",paddingLeft:$.id==="mrt-row-expand"?`${q.depth+1}rem !important`:void 0,textOverflow:re!=="display"?"ellipsis":void 0,whiteSpace:W==="xs"?"nowrap":"normal",zIndex:F?.id===$.id?2:$.getIsPinned()?1:0,"&:hover":{outline:["table","cell"].includes(g??"")&&re!=="display"?`1px solid ${ke.colors.gray[7]}`:void 0,outlineOffset:"-1px",textOverflow:"clip"}},$A({column:$,isStriped:e,row:q,table:s,theme:ke,tableCellProps:ae})),ve),children:[I.jsx(I.Fragment,{children:t.getIsPlaceholder()?(c=(l=K.PlaceholderCell)===null||l===void 0?void 0:l.call(K,{cell:t,column:$,row:q,table:s}))!==null&&c!==void 0?c:null:B||j?I.jsx(wZ,Object.assign({height:20,width:De},oe)):w&&O==="static"&&$.id==="mrt-row-numbers"?i+1:$.id==="mrt-row-drag"?I.jsx(AUe,{cell:t,rowRef:o,table:s}):re==="display"&&($.id==="mrt-row-select"||$.id==="mrt-row-expand"||!q.getIsGrouped())?(u=K.Cell)===null||u===void 0?void 0:u.call(K,{cell:t,column:$,row:q,renderedCellValue:t.getValue(),table:s}):me?I.jsx(tQ,{cell:t,table:s}):(y||K.enableClickToCopy)&&K.enableClickToCopy!==!1?I.jsx(RUe,{cell:t,table:s,children:I.jsx(F6,{cell:t,table:s})}):I.jsx(F6,{cell:t,table:s})}),t.getIsGrouped()&&!K.GroupedCell&&I.jsxs(I.Fragment,{children:[" (",(d=q.subRows)===null||d===void 0?void 0:d.length,")"]})]}))},DUe=M.memo(nQ,(t,e)=>e.cell===t.cell),IUe=({parentRowRef:t,row:e,rowIndex:n,table:r,virtualRow:i})=>{const{getVisibleLeafColumns:o,getState:s,options:{layoutMode:a,mantineTableBodyRowProps:l,mantineDetailPanelProps:c,renderDetailPanel:u}}=r,{isLoading:d}=s(),f=l instanceof Function?l({isDetailPanel:!0,row:e,staticRowIndex:n,table:r}):l,h=c instanceof Function?c({row:e,table:r}):c;return I.jsx(Xe,Object.assign({component:"tr",className:"mantine-TableBodyCell-DetailPanel"},f,{sx:g=>{var y,_;return Object.assign({display:a==="grid"?"flex":"table-row",position:i?"absolute":void 0,top:i?`${(_=(y=t.current)===null||y===void 0?void 0:y.getBoundingClientRect())===null||_===void 0?void 0:_.height}px`:void 0,transform:i?`translateY(${i?.start}px)`:void 0,width:"100%",zIndex:i?2:void 0},f?.sx instanceof Function?f.sx(g):f?.sx)},children:I.jsx(Xe,Object.assign({component:"td",className:"mantine-TableBodyCell-DetailPanel",colSpan:o().length},h,{sx:g=>Object.assign({backgroundColor:i?g.fn.lighten(g.colors.dark[7],.06):void 0,borderBottom:e.getIsExpanded()?void 0:"none",display:a==="grid"?"flex":"table-cell",paddingBottom:e.getIsExpanded()?"16px !important":"0 !important",paddingTop:e.getIsExpanded()?"16px !important":"0 !important",transition:"all 100ms ease-in-out",width:`${r.getTotalSize()}px`},h?.sx instanceof Function?h.sx(g):h?.sx),children:u&&I.jsx(ud,{in:e.getIsExpanded(),children:!d&&u({row:e,table:r})})}))}))},rQ=({columnVirtualizer:t,enableHover:e,isStriped:n,measureElement:r,numRows:i,row:o,rowIndex:s,table:a,virtualColumns:l,virtualPaddingLeft:c,virtualPaddingRight:u,virtualRow:d})=>{const{getState:f,options:{enableRowOrdering:h,layoutMode:g,memoMode:y,mantineTableBodyRowProps:_,renderDetailPanel:v},setHoveredRow:x}=a,{draggingColumn:w,draggingRow:S,editingCell:E,editingRow:C,hoveredRow:O}=f(),R=_ instanceof Function?_({row:o,staticRowIndex:s,table:a}):_,T=F=>{h&&S&&x(o)},A=M.useRef(null);return I.jsxs(I.Fragment,{children:[I.jsxs(Xe,Object.assign({component:"tr","data-index":d?.index,onDragEnter:T,ref:F=>{F&&(A.current=F,r?.(F))}},R,{sx:F=>Object.assign({boxSizing:"border-box",display:g==="grid"?"flex":"table-row",opacity:S?.id===o.id||O?.id===o.id?.5:1,position:d?"absolute":void 0,top:d?0:void 0,transition:d?"none":"all 100ms ease-in-out",width:"100%","&:hover td":{backgroundColor:e!==!1?o.getIsSelected()?F.fn.rgba(gl(F),.2):F.colorScheme==="dark"?`${F.fn.lighten(F.colors.dark[7],.12)}`:`${F.fn.darken(F.white,.05)}`:void 0}},R?.sx instanceof Function?R.sx(F):R?.sx),style:Object.assign({transform:d?`translateY(${d?.start}px)`:void 0},R?.style),children:[c?I.jsx("td",{style:{display:"flex",width:c}}):null,(l??o.getVisibleCells()).map(F=>{const N=t?o.getVisibleCells()[F.index]:F,U={cell:N,isStriped:n,measureElement:t?.measureElement,numRows:i,rowIndex:s,rowRef:A,table:a,virtualCell:t?F:void 0};return y==="cells"&&N.column.columnDef.columnDefType==="data"&&!w&&!S&&E?.id!==N.id&&C?.id!==o.id?I.jsx(DUe,Object.assign({},U),N.id):I.jsx(nQ,Object.assign({},U),N.id)}),u?I.jsx("td",{style:{display:"flex",width:u}}):null]})),v&&!o.getIsGrouped()&&I.jsx(IUe,{parentRowRef:A,row:o,rowIndex:s,table:a,virtualRow:d})]})},LUe=M.memo(rQ,(t,e)=>t.row===e.row&&t.rowIndex===e.rowIndex),iQ=({columnVirtualizer:t,enableHover:e,isStriped:n,table:r,virtualColumns:i,virtualPaddingLeft:o,virtualPaddingRight:s})=>{var a,l,c;const{getRowModel:u,getPrePaginationRowModel:d,getState:f,options:{enableGlobalFilterRankedResults:h,enablePagination:g,enableRowVirtualization:y,layoutMode:_,localization:v,mantineTableBodyProps:x,manualExpanding:w,manualFiltering:S,manualGrouping:E,manualPagination:C,manualSorting:O,memoMode:R,renderEmptyRowsFallback:T,rowVirtualizerInstanceRef:A,rowVirtualizerProps:F},refs:{tableContainerRef:N,tablePaperRef:U}}=r,{columnFilters:k,density:z,expanded:G,globalFilter:W,globalFilterFn:B,pagination:j,sorting:$}=f(),q=x instanceof Function?x({table:r}):x,K=F instanceof Function?F({table:r}):F,re=M.useMemo(()=>!w&&!S&&!E&&!O&&h&&W&&B==="fuzzy"&&G!==!0&&!Object.values($).some(Boolean)&&!Object.values(G).some(Boolean),[h,G,W,w,S,E,O,$]),J=M.useMemo(()=>{if(!re)return u().rows;const oe=d().rows.sort((De,Te)=>nUe(De,Te));if(g&&!C){const De=j.pageIndex*j.pageSize;return oe.slice(De,De+j.pageSize)}return oe},[re,re?d().rows:u().rows,j.pageIndex,j.pageSize]),le=y?Iq(Object.assign({count:J.length,estimateSize:()=>z==="xs"?42.7:z==="md"?54.7:70.7,getScrollElement:()=>N.current,measureElement:typeof window<"u"&&navigator.userAgent.indexOf("Firefox")===-1?oe=>oe?.getBoundingClientRect().height:void 0,overscan:4},K)):void 0;A&&le&&(A.current=le);const ae=le?le.getVirtualItems():void 0;return I.jsx(Xe,Object.assign({component:"tbody"},q,{sx:oe=>Object.assign({display:_==="grid"?"grid":"table-row-group",height:le?`${le.getTotalSize()}px`:"inherit",minHeight:J.length?void 0:"100px",position:"relative"},q?.sx instanceof Function?q?.sx(oe):q?.sx),children:J.length?I.jsx(I.Fragment,{children:(ae??J).map((oe,De)=>{const Te=le?J[oe.index]:oe,ve={columnVirtualizer:t,enableHover:e,isStriped:n,measureElement:le?.measureElement,numRows:J.length,row:Te,rowIndex:le?oe.index:De,table:r,virtualColumns:i,virtualPaddingLeft:o,virtualPaddingRight:s,virtualRow:le?oe:void 0};return R==="rows"?I.jsx(LUe,Object.assign({},ve),Te.id):I.jsx(rQ,Object.assign({},ve),Te.id)})}):I.jsx("tr",{style:{display:_==="grid"?"grid":"table-row"},children:I.jsx("td",{colSpan:r.getVisibleLeafColumns().length,style:{display:_==="grid"?"grid":"table-cell"},children:(a=T?.({table:r}))!==null&&a!==void 0?a:I.jsx(Si,{sx:{color:"gray",fontStyle:"italic",maxWidth:`min(100vw, ${(c=(l=U.current)===null||l===void 0?void 0:l.clientWidth)!==null&&c!==void 0?c:360}px)`,paddingTop:"2rem",paddingBottom:"2rem",textAlign:"center",width:"100%"},children:W||k.length?v.noResultsFound:v.noRecordsToDisplay})})})}))},kUe=M.memo(iQ,(t,e)=>t.table.options.data===e.table.options.data),NUe=({footer:t,table:e})=>{var n,r,i;const{options:{layoutMode:o,mantineTableFooterCellProps:s}}=e,{column:a}=t,{columnDef:l}=a,{columnDefType:c}=l,u=s instanceof Function?s({column:a,table:e}):s,d=l.mantineTableFooterCellProps instanceof Function?l.mantineTableFooterCellProps({column:a,table:e}):l.mantineTableFooterCellProps,f=Object.assign(Object.assign({},u),d);return I.jsx(Xe,Object.assign({component:"th",align:c==="group"?"center":"left",colSpan:t.colSpan},f,{sx:h=>Object.assign({display:o==="grid"?"grid":"table-cell",fontWeight:"bold",justifyContent:c==="group"?"center":void 0,padding:"8px",verticalAlign:"top",zIndex:a.getIsPinned()&&c!=="group"?2:1},$A({column:a,table:e,theme:h,tableCellProps:f})),children:I.jsx(I.Fragment,{children:t.isPlaceholder?null:(i=(r=l.Footer instanceof Function?(n=l.Footer)===null||n===void 0?void 0:n.call(l,{column:a,footer:t,table:e}):l.Footer)!==null&&r!==void 0?r:l.footer)!==null&&i!==void 0?i:null})}))},FUe=({footerGroup:t,table:e,virtualColumns:n,virtualPaddingLeft:r,virtualPaddingRight:i})=>{var o;const{options:{layoutMode:s,mantineTableFooterRowProps:a}}=e;if(!(!((o=t.headers)===null||o===void 0)&&o.some(c=>typeof c.column.columnDef.footer=="string"&&!!c.column.columnDef.footer||c.column.columnDef.Footer)))return null;const l=a instanceof Function?a({footerGroup:t,table:e}):a;return I.jsxs(Xe,Object.assign({component:"tr"},l,{sx:c=>Object.assign({backgroundColor:c.fn.lighten(c.colorScheme==="dark"?c.colors.dark[7]:c.white,.06),display:s==="grid"?"flex":"table-row",width:"100%"},l?.sx instanceof Function?l?.sx(c):l?.sx),children:[r?I.jsx("th",{style:{display:"flex",width:r}}):null,(n??t.headers).map(c=>{const u=n?t.headers[c.index]:c;return I.jsx(NUe,{footer:u,table:e},u.id)}),i?I.jsx("th",{style:{display:"flex",width:i}}):null]}))},zUe=({table:t,virtualColumns:e,virtualPaddingLeft:n,virtualPaddingRight:r})=>{const{getFooterGroups:i,getState:o,options:{enableStickyFooter:s,layoutMode:a,mantineTableFooterProps:l}}=t,{isFullScreen:c}=o(),u=l instanceof Function?l({table:t}):l,d=(c||s)&&s!==!1;return I.jsx(Xe,Object.assign({component:"tfoot"},u,{sx:f=>Object.assign({bottom:d?0:void 0,display:a==="grid"?"grid":"table-row-group",opacity:d?.97:void 0,outline:d?f.colorScheme==="light"?`1px solid ${f.colors.gray[3]}`:`1px solid ${f.colors.gray[7]}`:void 0,position:d?"sticky":void 0,zIndex:d?1:void 0},u?.sx instanceof Function?u?.sx(f):u?.sx),children:i().map(f=>I.jsx(FUe,{footerGroup:f,table:t,virtualColumns:e,virtualPaddingLeft:n,virtualPaddingRight:r},f.id))}))},UUe=({table:t})=>{var e,n,r,i;const{getFlatHeaders:o,getState:s,options:{columns:a,columnVirtualizerInstanceRef:l,columnVirtualizerProps:c,enableColumnResizing:u,enableColumnVirtualization:d,enablePinning:f,enableTableFooter:h,enableTableHead:g,layoutMode:y,memoMode:_,mantineTableProps:v},refs:{tableContainerRef:x}}=t,{columnSizing:w,columnSizingInfo:S,columnPinning:E,columnVisibility:C,density:O}=s(),R=v instanceof Function?v({table:t}):v,T=c instanceof Function?c({table:t}):c,A=M.useMemo(()=>{const j=o(),$={};for(let q=0;q{var j,$,q,K;if(!d)return 0;const re=(K=(q=($=(j=t.getRowModel().rows[0])===null||j===void 0?void 0:j.getCenterVisibleCells())===null||$===void 0?void 0:$.slice(0,16))===null||q===void 0?void 0:q.map(J=>J.column.getSize()*1.2))!==null&&K!==void 0?K:[];return re.reduce((J,le)=>J+le,0)/re.length},[t.getRowModel().rows,E,C]),[N,U]=M.useMemo(()=>d&&f?[t.getLeftLeafColumns().map(j=>j.getPinnedIndex()),t.getRightLeafColumns().map(j=>t.getVisibleLeafColumns().length-j.getPinnedIndex()-1)]:[[],[]],[E,d,f]),k=d?Iq(Object.assign({count:t.getVisibleLeafColumns().length,estimateSize:()=>F,getScrollElement:()=>x.current,horizontal:!0,overscan:3,rangeExtractor:M.useCallback(j=>[...new Set([...N,...Aq(j),...U])],[N,U])},T)):void 0;l&&k&&(l.current=k);const z=k?k.getVirtualItems():void 0;let G,W;k&&z?.length&&(G=(n=(e=z[N.length])===null||e===void 0?void 0:e.start)!==null&&n!==void 0?n:0,W=k.getTotalSize()-((i=(r=z[z.length-1-U.length])===null||r===void 0?void 0:r.end)!==null&&i!==void 0?i:0));const B={columnVirtualizer:k,enableHover:R?.highlightOnHover,isStriped:R?.striped,table:t,virtualColumns:z,virtualPaddingLeft:G,virtualPaddingRight:W};return I.jsxs($Z,Object.assign({highlightOnHover:!0,horizontalSpacing:O,verticalSpacing:O},R,{sx:j=>Object.assign({display:y==="grid"?"grid":"table",tableLayout:y!=="grid"&&u?"fixed":void 0,"& tr:first-of-type td":{borderTop:`1px solid ${j.colors.gray[j.colorScheme==="dark"?8:3]}`},"& tr:last-of-type td":{borderBottom:`1px solid ${j.colors.gray[j.colorScheme==="dark"?8:3]}`}},R?.sx instanceof Function?R.sx(j):R?.sx),style:Object.assign(Object.assign({},A),R?.style),children:[g&&I.jsx(OUe,Object.assign({},B)),_==="table-body"||S.isResizingColumn?I.jsx(kUe,Object.assign({},B)):I.jsx(iQ,Object.assign({},B)),h&&I.jsx(zUe,Object.assign({},B))]}))},BUe=typeof window<"u"?M.useLayoutEffect:M.useEffect,HUe=({table:t})=>{const{getState:e,options:{enableStickyHeader:n,mantineTableContainerProps:r},refs:{tableContainerRef:i,bottomToolbarRef:o,topToolbarRef:s}}=t,{isFullScreen:a}=e(),[l,c]=M.useState(0),u=r instanceof Function?r({table:t}):r;return BUe(()=>{var d,f,h,g;const y=typeof document<"u"&&(f=(d=s.current)===null||d===void 0?void 0:d.offsetHeight)!==null&&f!==void 0?f:0,_=typeof document<"u"&&(g=(h=o?.current)===null||h===void 0?void 0:h.offsetHeight)!==null&&g!==void 0?g:0;c(y+_)}),I.jsx(Xe,Object.assign({},u,{ref:d=>{d&&(i.current=d,u?.ref&&(u.ref.current=d))},sx:d=>Object.assign({maxWidth:"100%",maxHeight:n?`clamp(350px, calc(100vh - ${l}px), 9999px)`:void 0,overflow:"auto"},u?.sx instanceof Function?u.sx(d):u?.sx),style:Object.assign({maxHeight:a?`calc(100vh - ${l}px)`:void 0},u?.style),children:I.jsx(UUe,{table:t})}))},VUe=({table:t})=>{const{getState:e,options:{enableBottomToolbar:n,enableTopToolbar:r,mantinePaperProps:i,renderBottomToolbar:o,renderTopToolbar:s},refs:{tablePaperRef:a}}=t,{isFullScreen:l}=e(),c=i instanceof Function?i({table:t}):i;return I.jsxs(tv,Object.assign({shadow:"xs",withBorder:!0},c,{ref:u=>{a.current=u,c?.ref&&(c.ref.current=u)},sx:u=>Object.assign({overflow:"hidden",transition:"all 100ms ease-in-out"},c?.sx instanceof Function?c?.sx(u):c?.sx),style:Object.assign(Object.assign({},c?.style),l?{bottom:0,height:"100vh",left:0,margin:0,maxHeight:"100vh",maxWidth:"100vw",padding:0,position:"fixed",right:0,top:0,width:"100vw",zIndex:10}:{}),children:[r&&(s instanceof Function?s({table:t}):s??I.jsx(vUe,{table:t})),I.jsx(HUe,{table:t}),n&&(o instanceof Function?o({table:t}):o??I.jsx(yUe,{table:t}))]}))},jUe=({open:t,row:e,table:n})=>{const{options:{localization:r,onEditingRowCancel:i},setEditingRow:o}=n;return I.jsxs(Ia,{closeOnClickOutside:!1,onClose:()=>{i?.({row:e,table:n}),o(null)},opened:t,withCloseButton:!1,children:[I.jsx(Si,{sx:{textAlign:"center"},children:r.edit}),I.jsx("form",{onSubmit:s=>s.preventDefault(),children:I.jsx(vb,{sx:{gap:"24px",paddingTop:"16px",width:"100%"},children:e.getAllCells().filter(s=>s.column.columnDef.columnDefType==="data").map(s=>I.jsx(tQ,{cell:s,table:n},s.id))})}),I.jsx(er,{sx:{paddingTop:"24px",justifyContent:"flex-end"},children:I.jsx(YK,{row:e,table:n,variant:"text"})})]})},$Ue=t=>{var e,n,r,i,o,s,a,l,c,u,d,f,h,g,y,_,v,x,w,S,E,C,O,R,T,A,F,N,U,k,z,G,W,B,j,$,q,K;const re=M.useRef(null),J=M.useRef({}),le=M.useRef({}),ae=M.useRef(null),oe=M.useRef(null),De=M.useRef({}),Te=M.useRef(null),ve=M.useRef(null),we=M.useMemo(()=>{var Ft,kt,fn;const In=(Ft=t.initialState)!==null&&Ft!==void 0?Ft:{};return In.columnOrder=(kt=In.columnOrder)!==null&&kt!==void 0?kt:FK(t),In.globalFilterFn=(fn=t.globalFilterFn)!==null&&fn!==void 0?fn:"fuzzy",In},[]),[me,se]=M.useState(()=>Object.assign({},...HT(t.columns).map(Ft=>{var kt,fn,In,Fn;return{[Mm(Ft)]:Ft.filterFn instanceof Function?(kt=Ft.filterFn.name)!==null&&kt!==void 0?kt:"custom":(Fn=(fn=Ft.filterFn)!==null&&fn!==void 0?fn:(In=we?.columnFilterFns)===null||In===void 0?void 0:In[Mm(Ft)])!==null&&Fn!==void 0?Fn:j4e(Ft)}}))),[de,ke]=M.useState((e=we.columnOrder)!==null&&e!==void 0?e:[]),[Ve,Ze]=M.useState((n=we?.density)!==null&&n!==void 0?n:"md"),[ot,dt]=M.useState((r=we.draggingColumn)!==null&&r!==void 0?r:null),[We,ht]=M.useState((i=we.draggingRow)!==null&&i!==void 0?i:null),[ee,Q]=M.useState((o=we.editingCell)!==null&&o!==void 0?o:null),[Pe,$e]=M.useState((s=we.editingRow)!==null&&s!==void 0?s:null),[Ge,Ke]=M.useState((a=we.globalFilterFn)!==null&&a!==void 0?a:"fuzzy"),[gt,ut]=M.useState((l=we.grouping)!==null&&l!==void 0?l:[]),[Ae,vt]=M.useState((c=we.hoveredColumn)!==null&&c!==void 0?c:null),[xt,ct]=M.useState((u=we.hoveredRow)!==null&&u!==void 0?u:null),[Ie,Ye]=M.useState((d=we?.isFullScreen)!==null&&d!==void 0?d:!1),[Tt,Lt]=M.useState((h=(f=t.initialState)===null||f===void 0?void 0:f.showAlertBanner)!==null&&h!==void 0?h:!1),[Rt,he]=M.useState((g=we?.showColumnFilters)!==null&&g!==void 0?g:!1),[ue,He]=M.useState((y=we?.showGlobalFilter)!==null&&y!==void 0?y:!1),[st,wt]=M.useState((_=we?.showToolbarDropZone)!==null&&_!==void 0?_:!1),Bt=M.useMemo(()=>{var Ft,kt,fn,In,Fn,Lr,ti,te,pe,Ne,ce,L,Y,ne,fe,_e,Se;return[((kt=(Ft=t.state)===null||Ft===void 0?void 0:Ft.columnOrder)!==null&&kt!==void 0?kt:de).includes("mrt-row-drag")&&Object.assign(Object.assign(Object.assign({header:t.localization.move,size:60},t.defaultDisplayColumn),(fn=t.displayColumnDefOptions)===null||fn===void 0?void 0:fn["mrt-row-drag"]),{id:"mrt-row-drag"}),((Fn=(In=t.state)===null||In===void 0?void 0:In.columnOrder)!==null&&Fn!==void 0?Fn:de).includes("mrt-row-actions")&&Object.assign(Object.assign(Object.assign({Cell:({cell:Fe,row:Ce})=>I.jsx(sUe,{cell:Fe,row:Ce,table:Nt}),header:t.localization.actions,size:70},t.defaultDisplayColumn),(Lr=t.displayColumnDefOptions)===null||Lr===void 0?void 0:Lr["mrt-row-actions"]),{id:"mrt-row-actions"}),((te=(ti=t.state)===null||ti===void 0?void 0:ti.columnOrder)!==null&&te!==void 0?te:de).includes("mrt-row-expand")&&jA(t,(Ne=(pe=t.state)===null||pe===void 0?void 0:pe.grouping)!==null&&Ne!==void 0?Ne:gt)&&Object.assign(Object.assign(Object.assign({Cell:({row:Fe})=>I.jsx(iUe,{row:Fe,table:Nt}),Header:t.enableExpandAll?()=>I.jsx(rUe,{table:Nt}):null,header:t.localization.expand,size:60},t.defaultDisplayColumn),(ce=t.displayColumnDefOptions)===null||ce===void 0?void 0:ce["mrt-row-expand"]),{id:"mrt-row-expand"}),((Y=(L=t.state)===null||L===void 0?void 0:L.columnOrder)!==null&&Y!==void 0?Y:de).includes("mrt-row-select")&&Object.assign(Object.assign(Object.assign({Cell:({row:Fe})=>I.jsx(L6,{row:Fe,table:Nt}),Header:t.enableSelectAll&&t.enableMultiRowSelection?()=>I.jsx(L6,{selectAll:!0,table:Nt}):null,header:t.localization.select,size:60},t.defaultDisplayColumn),(ne=t.displayColumnDefOptions)===null||ne===void 0?void 0:ne["mrt-row-select"]),{id:"mrt-row-select"}),((_e=(fe=t.state)===null||fe===void 0?void 0:fe.columnOrder)!==null&&_e!==void 0?_e:de).includes("mrt-row-numbers")&&Object.assign(Object.assign(Object.assign({Cell:({row:Fe})=>Fe.index+1,Header:()=>t.localization.rowNumber,header:t.localization.rowNumbers,size:60},t.defaultDisplayColumn),(Se=t.displayColumnDefOptions)===null||Se===void 0?void 0:Se["mrt-row-numbers"]),{id:"mrt-row-numbers"})].filter(Boolean)},[de,gt,t.displayColumnDefOptions,t.editingMode,t.enableColumnDragging,t.enableColumnFilterModes,t.enableColumnOrdering,t.enableEditing,t.enableExpandAll,t.enableExpanding,t.enableGrouping,t.enableRowActions,t.enableRowDragging,t.enableRowNumbers,t.enableRowOrdering,t.enableRowSelection,t.enableSelectAll,t.localization,t.positionActionsColumn,t.renderDetailPanel,t.renderRowActionMenuItems,t.renderRowActions,(v=t.state)===null||v===void 0?void 0:v.columnOrder,(x=t.state)===null||x===void 0?void 0:x.grouping]),Yt=M.useMemo(()=>{var Ft,kt,fn;return kK({aggregationFns:t.aggregationFns,columnDefs:[...Bt,...t.columns],columnFilterFns:(kt=(Ft=t.state)===null||Ft===void 0?void 0:Ft.columnFilterFns)!==null&&kt!==void 0?kt:me,defaultDisplayColumn:(fn=t.defaultDisplayColumn)!==null&&fn!==void 0?fn:{},filterFns:t.filterFns,sortingFns:t.sortingFns})},[me,Bt,t.columns,(w=t.state)===null||w===void 0?void 0:w.columnFilterFns]),jn=M.useMemo(()=>{var Ft,kt,fn,In,Fn;return(!((Ft=t.state)===null||Ft===void 0)&&Ft.isLoading||!((kt=t.state)===null||kt===void 0)&&kt.showSkeletons)&&!t.data.length?[...Array(((In=(fn=t.state)===null||fn===void 0?void 0:fn.pagination)===null||In===void 0?void 0:In.pageSize)||((Fn=we?.pagination)===null||Fn===void 0?void 0:Fn.pageSize)||10).fill(null)].map(()=>Object.assign({},...HT(t.columns).map(Lr=>({[Mm(Lr)]:null})))):t.data},[t.data,(S=t.state)===null||S===void 0?void 0:S.isLoading,(E=t.state)===null||E===void 0?void 0:E.showSkeletons]),Nt=Object.assign(Object.assign({},wNe(Object.assign(Object.assign({getCoreRowModel:dNe(),getExpandedRowModel:_Ne(),getFacetedRowModel:mNe(),getFilteredRowModel:pNe(),getGroupedRowModel:vNe(),getPaginationRowModel:xNe(),getSortedRowModel:gNe(),onColumnOrderChange:ke,onGroupingChange:ut,getSubRows:Ft=>Ft?.subRows},t),{columns:Yt,data:jn,globalFilterFn:(O=(C=t.filterFns)===null||C===void 0?void 0:C[Ge])!==null&&O!==void 0?O:(R=t.filterFns)===null||R===void 0?void 0:R.fuzzy,initialState:we,state:Object.assign({columnFilterFns:me,columnOrder:de,density:Ve,draggingColumn:ot,draggingRow:We,editingCell:ee,editingRow:Pe,globalFilterFn:Ge,grouping:gt,hoveredColumn:Ae,hoveredRow:xt,isFullScreen:Ie,showAlertBanner:Tt,showColumnFilters:Rt,showGlobalFilter:ue,showToolbarDropZone:st},t.state)}))),{refs:{bottomToolbarRef:re,editInputRefs:J,filterInputRefs:le,searchInputRef:ae,tableContainerRef:oe,tableHeadCellRefs:De,tablePaperRef:Te,topToolbarRef:ve},setColumnFilterFns:(T=t.onColumnFilterFnsChange)!==null&&T!==void 0?T:se,setDensity:(A=t.onDensityChange)!==null&&A!==void 0?A:Ze,setDraggingColumn:(F=t.onDraggingColumnChange)!==null&&F!==void 0?F:dt,setDraggingRow:(N=t.onDraggingRowChange)!==null&&N!==void 0?N:ht,setEditingCell:(U=t.onEditingCellChange)!==null&&U!==void 0?U:Q,setEditingRow:(k=t.onEditingRowChange)!==null&&k!==void 0?k:$e,setGlobalFilterFn:(z=t.onGlobalFilterFnChange)!==null&&z!==void 0?z:Ke,setHoveredColumn:(G=t.onHoveredColumnChange)!==null&&G!==void 0?G:vt,setHoveredRow:(W=t.onHoveredRowChange)!==null&&W!==void 0?W:ct,setIsFullScreen:(B=t.onIsFullScreenChange)!==null&&B!==void 0?B:Ye,setShowAlertBanner:(j=t.onShowAlertBannerChange)!==null&&j!==void 0?j:Lt,setShowColumnFilters:($=t.onShowColumnFiltersChange)!==null&&$!==void 0?$:he,setShowGlobalFilter:(q=t.onShowGlobalFilterChange)!==null&&q!==void 0?q:He,setShowToolbarDropZone:(K=t.onShowToolbarDropZoneChange)!==null&&K!==void 0?K:wt});t.tableFeatures&&t.tableFeatures.forEach(Ft=>{Object.assign(Nt,Ft(Nt))}),t.tableInstanceRef&&(t.tableInstanceRef.current=Nt);const xn=M.useRef();return M.useEffect(()=>{typeof window<"u"&&(xn.current=document.body.style.height)},[]),M.useEffect(()=>{typeof window<"u"&&(Nt.getState().isFullScreen?document.body.style.height="100vh":document.body.style.height=xn.current)},[Nt.getState().isFullScreen]),M.useEffect(()=>{var Ft;const{pageIndex:kt,pageSize:fn}=Nt.getState().pagination,In=(Ft=t.rowCount)!==null&&Ft!==void 0?Ft:Nt.getPrePaginationRowModel().rows.length;kt*fn>In&&Nt.setPageIndex(Math.floor(In/fn))},[t.rowCount,Nt.getPrePaginationRowModel().rows.length]),I.jsxs(I.Fragment,{children:[I.jsx(VUe,{table:Nt}),Pe&&t.editingMode==="modal"&&I.jsx(jUe,{row:Pe,table:Nt,open:!0})]})},GUe={actions:"Actions",and:"and",cancel:"Cancel",changeFilterMode:"Change filter mode",changeSearchMode:"Change search mode",clearFilter:"Clear filter",clearSearch:"Clear search",clearSort:"Clear sort",clickToCopy:"Click to copy",collapse:"Collapse",collapseAll:"Collapse all",columnActions:"Column Actions",copiedToClipboard:"Copied to clipboard",dropToGroupBy:"Drop to group by {column}",edit:"Edit",expand:"Expand",expandAll:"Expand all",filterArrIncludes:"Includes",filterArrIncludesAll:"Includes all",filterArrIncludesSome:"Includes",filterBetween:"Between",filterBetweenInclusive:"Between Inclusive",filterByColumn:"Filter by {column}",filterContains:"Contains",filterEmpty:"Empty",filterEndsWith:"Ends With",filterEquals:"Equals",filterEqualsString:"Equals",filterFuzzy:"Fuzzy",filterGreaterThan:"Greater Than",filterGreaterThanOrEqualTo:"Greater Than Or Equal To",filterInNumberRange:"Between",filterIncludesString:"Contains",filterIncludesStringSensitive:"Contains",filterLessThan:"Less Than",filterLessThanOrEqualTo:"Less Than Or Equal To",filterMode:"Filter Mode: {filterType}",filterNotEmpty:"Not Empty",filterNotEquals:"Not Equals",filterStartsWith:"Starts With",filterWeakEquals:"Equals",filteringByColumn:"Filtering by {column} - {filterType} {filterValue}",goToFirstPage:"Go to first page",goToLastPage:"Go to last page",goToNextPage:"Go to next page",goToPreviousPage:"Go to previous page",grab:"Grab",groupByColumn:"Group by {column}",groupedBy:"Grouped by ",hideAll:"Hide all",hideColumn:"Hide {column} column",max:"Max",min:"Min",move:"Move",noRecordsToDisplay:"No records to display",noResultsFound:"No results found",of:"of",or:"or",pinToLeft:"Pin to left",pinToRight:"Pin to right",resetColumnSize:"Reset column size",resetOrder:"Reset order",rowActions:"Row Actions",rowNumber:"#",rowNumbers:"Row Numbers",rowsPerPage:"Rows per page",save:"Save",search:"Search",selectedCountOfRowCountRowsSelected:"{selectedCount} of {rowCount} row(s) selected",select:"Select",showAll:"Show all",showAllColumns:"Show all columns",showHideColumns:"Show/Hide columns",showHideFilters:"Show/Hide filters",showHideSearch:"Show/Hide search",sortByColumnAsc:"Sort by {column} ascending",sortByColumnDesc:"Sort by {column} descending",sortedByColumnAsc:"Sorted by {column} ascending",sortedByColumnDesc:"Sorted by {column} descending",thenBy:", then by ",toggleDensity:"Toggle density",toggleFullScreen:"Toggle full screen",toggleSelectAll:"Toggle select all",toggleSelectRow:"Toggle select row",toggleVisibility:"Toggle visibility",ungroupByColumn:"Ungroup by {column}",unpin:"Unpin",unpinAll:"Unpin all",unsorted:"Unsorted"},WUe=t=>{var e,{aggregationFns:n,autoResetExpanded:r=!1,columnResizeMode:i="onChange",defaultColumn:o,defaultDisplayColumn:s,editingMode:a="modal",enableBottomToolbar:l=!0,enableColumnActions:c=!0,enableColumnFilters:u=!0,enableColumnOrdering:d=!1,enableColumnResizing:f=!1,enableDensityToggle:h=!0,enableExpandAll:g=!0,enableFilterMatchHighlighting:y=!0,enableFilters:_=!0,enableFullScreenToggle:v=!0,enableGlobalFilter:x=!0,enableGlobalFilterRankedResults:w=!0,enableGrouping:S=!1,enableHiding:E=!0,enableMultiRowSelection:C=!0,enableMultiSort:O=!0,enablePagination:R=!0,enablePinning:T=!1,enableRowSelection:A=!1,enableSelectAll:F=!0,enableSorting:N=!0,enableStickyHeader:U=!1,enableTableFooter:k=!0,enableTableHead:z=!0,enableToolbarInternalActions:G=!0,enableTopToolbar:W=!0,filterFns:B,icons:j,layoutMode:$="semantic",localization:q,manualFiltering:K,manualGrouping:re,manualPagination:J,manualSorting:le,positionActionsColumn:ae="first",positionExpandColumn:oe="first",positionGlobalFilter:De="right",positionPagination:Te="bottom",positionToolbarAlertBanner:ve="top",positionToolbarDropZone:we="top",rowNumberMode:me="original",selectAllMode:se="page",sortingFns:de}=t,ke=Ah(t,["aggregationFns","autoResetExpanded","columnResizeMode","defaultColumn","defaultDisplayColumn","editingMode","enableBottomToolbar","enableColumnActions","enableColumnFilters","enableColumnOrdering","enableColumnResizing","enableDensityToggle","enableExpandAll","enableFilterMatchHighlighting","enableFilters","enableFullScreenToggle","enableGlobalFilter","enableGlobalFilterRankedResults","enableGrouping","enableHiding","enableMultiRowSelection","enableMultiSort","enablePagination","enablePinning","enableRowSelection","enableSelectAll","enableSorting","enableStickyHeader","enableTableFooter","enableTableHead","enableToolbarInternalActions","enableTopToolbar","filterFns","icons","layoutMode","localization","manualFiltering","manualGrouping","manualPagination","manualSorting","positionActionsColumn","positionExpandColumn","positionGlobalFilter","positionPagination","positionToolbarAlertBanner","positionToolbarDropZone","rowNumberMode","selectAllMode","sortingFns"]);const Ve=M.useMemo(()=>Object.assign(Object.assign({},J4e),j),[j]),Ze=M.useMemo(()=>Object.assign(Object.assign({},GUe),q),[q]),ot=M.useMemo(()=>Object.assign(Object.assign({},B4e),n),[]),dt=M.useMemo(()=>Object.assign(Object.assign({},Q4e),B),[]),We=M.useMemo(()=>Object.assign(Object.assign({},tUe),de),[]),ht=M.useMemo(()=>Object.assign(Object.assign({},Z4e),o),[o]),ee=M.useMemo(()=>Object.assign(Object.assign({},q4e),s),[s]);return(ke.enableRowVirtualization||ke.enableColumnVirtualization)&&($="grid"),ke.enableRowVirtualization&&(U=!0),R===!1&&J===void 0&&(J=!0),!((e=ke.data)===null||e===void 0)&&e.length||(K=!0,re=!0,J=!0,le=!0),I.jsx($Ue,Object.assign({aggregationFns:ot,autoResetExpanded:r,columnResizeMode:i,defaultColumn:ht,defaultDisplayColumn:ee,editingMode:a,enableBottomToolbar:l,enableColumnActions:c,enableColumnFilters:u,enableColumnOrdering:d,enableColumnResizing:f,enableDensityToggle:h,enableExpandAll:g,enableFilterMatchHighlighting:y,enableFilters:_,enableFullScreenToggle:v,enableGlobalFilter:x,enableGlobalFilterRankedResults:w,enableGrouping:S,enableHiding:E,enableMultiRowSelection:C,enableMultiSort:O,enablePagination:R,enablePinning:T,enableRowSelection:A,enableSelectAll:F,enableSorting:N,enableStickyHeader:U,enableTableFooter:k,enableTableHead:z,enableToolbarInternalActions:G,enableTopToolbar:W,filterFns:dt,icons:Ve,layoutMode:$,localization:Ze,manualFiltering:K,manualGrouping:re,manualPagination:J,manualSorting:le,positionActionsColumn:ae,positionExpandColumn:oe,positionGlobalFilter:De,positionPagination:Te,positionToolbarAlertBanner:ve,positionToolbarDropZone:we,rowNumberMode:me,selectAllMode:se,sortingFns:We},ke))};function oQ(t){const e=H.useContext(Ui),n=e.useSceneTree(g=>g.nodeFromName),r=e.useSceneTree(g=>g.setLabelVisibility);function i(g,y){const _=e.nodeAttributesFromName.current;_[g]===void 0&&(_[g]={}),_[g].visibility=y,s()}const[,o]=H.useState(Date.now());function s(){o(Date.now())}H.useEffect(()=>{const g=setInterval(s,500);return()=>{clearInterval(g)}},[]);const a=H.useRef(!1);a.current=!1,setTimeout(()=>{a.current=!0},5);function l(g,y,_){const v=n[g];return v===void 0?[]:v.children.map(x=>{const w=e.nodeAttributesFromName.current[x]?.visibility??!0,S=w&&_,E=w?jB:kT;return{name:x,visible:I.jsx(An,{onMouseDown:()=>{const C=e.nodeAttributesFromName.current[x]?.visibility??!0;a.current&&i(x,!C)},onClick:C=>{C.stopPropagation()},onMouseEnter:C=>{if(C.buttons!==0){const O=e.nodeAttributesFromName.current[x]?.visibility??!0;a.current&&i(x,!O)}},sx:{opacity:S?"1.0":"0.5"},children:I.jsx(E,{})}),subRows:l(x,y+1,S)}})}const c=l("",0,!0),u=H.useMemo(()=>[{accessorKey:"visible",header:"",size:20},{accessorKey:"name",header:"Name",Cell:function(g){const y=g.row,_=g.cell,v=y.getIsExpanded()?gq:rke;return I.jsxs(I.Fragment,{children:[I.jsx(v,{style:{opacity:y.subRows?.length===0?"0.0":"0.4",marginLeft:`${(.75*y.depth).toString()}em`},size:"1em"}),_.getValue().split("/").filter(x=>x.length>0).map((x,w,S)=>I.jsxs("span",{style:{userSelect:"none"},children:[I.jsx("span",{style:{opacity:"0.4"},children:w===S.length-1?"/":`/${x}`}),w===S.length-1?x:""]},w))]})}}],[]),[d,{open:f,close:h}]=sW(!1);return I.jsxs(I.Fragment,{children:[t.compact&&I.jsx(Ia,{padding:"0",withCloseButton:!1,opened:d,onClose:h,size:"xl",centered:!0,children:I.jsx(oQ,{compact:!1})}),I.jsx(WUe,{columns:u,data:c,enableExpanding:!1,filterFromLeafRows:!0,enableDensityToggle:!1,enableRowSelection:!t.compact,enableHiding:!1,enableGlobalFilter:!0,enableColumnActions:!1,enableTopToolbar:!0,enableBottomToolbar:!1,enableColumnFilters:!1,enablePagination:!1,initialState:{density:"xs",expanded:!0},mantineExpandAllButtonProps:{size:"sm"},mantineExpandButtonProps:{size:"sm",sx:{width:"0 !important"}},mantineSelectAllCheckboxProps:{size:"sm"},mantineSelectCheckboxProps:{size:"sm"},mantineTableProps:{verticalSpacing:2},mantineTableContainerProps:{sx:{maxHeight:"30em"}},mantinePaginationProps:{showRowsPerPage:!1,showFirstLastPageButtons:!1},mantineTableBodyRowProps:({row:g})=>({onPointerOver:()=>{r(g.getValue("name"),!0)},onPointerOut:()=>{r(g.getValue("name"),!1)},...g.subRows===void 0||g.subRows.length===0?{}:{onClick:()=>{g.toggleExpanded()},sx:{cursor:"pointer"}}}),enableFullScreenToggle:!1,renderTopToolbarCustomActions:t.compact?()=>I.jsx(An,{onClick:f,children:I.jsx(vq,{})}):({table:g})=>{const y=g.getFilteredSelectedRowModel().flatRows.length===0;return I.jsxs("div",{style:{display:"flex",gap:"8px"},children:[I.jsx(An,{color:"green",disabled:y,variant:"filled",onClick:()=>{g.getSelectedRowModel().flatRows.map(_=>{i(_.getValue("name"),!0)})},children:I.jsx(jB,{})}),I.jsx(An,{color:"gray",disabled:y,variant:"filled",onClick:()=>{g.getSelectedRowModel().flatRows.map(_=>{i(_.getValue("name"),!1)})},children:I.jsx(kT,{})})]})},enableRowVirtualization:!0})]})}function YUe(){const t=H.useContext(Ui),[e,n]=H.useState(!1);function r(i){i.key==="Enter"&&(i.currentTarget.blur(),i.currentTarget.focus())}return I.jsxs(I.Fragment,{children:[e?I.jsx(Jue,{className:"stats-panel"}):null,I.jsxs(vb,{spacing:"xs",children:[I.jsx(Pc,{label:"Label",defaultValue:t.useGui(i=>i.label),onBlur:i=>t.useGui.setState({label:i.currentTarget.value}),onKeyDown:r}),I.jsx(Pc,{label:"Server",defaultValue:t.useGui(i=>i.server),onBlur:i=>t.useGui.setState({server:i.currentTarget.value}),onKeyDown:r}),I.jsx(Ds,{onClick:async()=>{if("showSaveFilePicker"in window&&(()=>{try{return window.self===window.top}catch{return!1}})()){const o=window.showSaveFilePicker({suggestedName:"render.png",types:[{accept:{"image/png":[".png"]}}]});t.canvasRef.current?.toBlob(async s=>{if(s===null){console.error("Export failed");return}const l=await(await o).createWritable();await l.write(s),await l.close()})}else t.canvasRef.current?.toBlob(o=>{if(o===null){console.error("Export failed");return}const s=URL.createObjectURL(o),a=document.createElement("a");a.href=s;const l="render.png";a.download=l,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(s)})},fullWidth:!0,leftIcon:I.jsx(Mke,{size:"1rem"}),children:"Export Canvas"}),I.jsx(yb,{label:"WebGL Statistics",onChange:i=>{n(i.currentTarget.checked)}})]})]})}function aC(){const t=H.useContext(Ui),e=Object.keys(t.useGui(o=>o.guiConfigFromId)).length>0,[n,r]=H.useState("server");H.useEffect(()=>{e&&r("generated")},[e]);const i=H.memo(oQ);return I.jsxs(Qo,{radius:"xs",value:n,onTabChange:r,children:[I.jsxs(Qo.List,{children:[e?I.jsx(Qo.Tab,{value:"generated",icon:I.jsx(XLe,{size:"0.8rem"}),children:"Control"}):null,I.jsx(Qo.Tab,{value:"server",icon:I.jsx(Ake,{size:"1rem"}),children:"Server"}),I.jsx(Qo.Tab,{value:"scene",icon:I.jsx(eke,{size:"1rem"}),children:"Scene"})]}),e?I.jsx(Qo.Panel,{value:"generated",pt:"xs",p:"sm",children:I.jsx(kLe,{})}):null,I.jsx(Qo.Panel,{value:"server",pt:"xs",p:"sm",children:I.jsx(YUe,{})}),I.jsx(Qo.Panel,{value:"scene",pt:"xs",p:"sm",children:I.jsx(i,{compact:!0})})]})}function lC(){const{useGui:t}=H.useContext(Ui),e=t(o=>o.websocketConnected),n=t(o=>o.server),r=t(o=>o.label),i=e?dke:fke;return I.jsxs(I.Fragment,{children:[I.jsx(i,{color:e?"#0b0":"#b00",style:{transform:"translateY(0.1em) scale(1.2)",width:"1em",height:"1em"}}),"   ",r===""?n:r]})}const XUe={theme:{type:"ThemeConfigurationMessage",titlebar_content:null,fixed_sidebar:!1},label:"",server:"ws://localhost:8080",websocketConnected:!1,backgroundAvailable:!1,guiConfigFromId:{},guiValueFromId:{},guiAttributeFromId:{}};function ZUe(t){return H.useState(()=>uq(dq(e=>({...XUe,server:t,setTheme:n=>e(r=>{r.theme=n}),addGui:n=>e(r=>{r.guiConfigFromId[n.id]=n}),setGuiValue:(n,r)=>e(i=>{i.guiValueFromId[n]=r}),setGuiVisible:(n,r)=>e(i=>{i.guiAttributeFromId[n]={...i.guiAttributeFromId[n],visible:r}}),setGuiDisabled:(n,r)=>e(i=>{i.guiAttributeFromId[n]={...i.guiAttributeFromId[n],disabled:r}}),removeGui:n=>e(r=>{delete r.guiConfigFromId[n],delete r.guiValueFromId[n],delete r.guiAttributeFromId[n]}),resetGui:()=>e(n=>{n.guiConfigFromId={}})}))))[0]}const sQ="websocket";function qUe(t){KUe([t])}function KUe(t){t.length===1&&window.location.host.includes(t[0].replace("ws://","").replace("/",""))&&(t=[]),window.history.replaceState(null,"Viser",t.length===0?window.location.href.split("?")[0]:`?${t.map(e=>`${sQ}=${e}`).join("&")}`)}var aQ={},ca=Gf&&Gf.__classPrivateFieldGet||function(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)},cC=Gf&&Gf.__classPrivateFieldSet||function(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n},Za,Gl;Object.defineProperty(aQ,"__esModule",{value:!0});class QUe{constructor(){Za.set(this,!1),Gl.set(this,new Set)}get acquired(){return ca(this,Za,"f")}acquireAsync({timeout:e}={}){if(!ca(this,Za,"f"))return cC(this,Za,!0,"f"),Promise.resolve();if(e==null)return new Promise(i=>{ca(this,Gl,"f").add(i)});let n,r;return Promise.race([new Promise(i=>{n=()=>{clearTimeout(r),i()},ca(this,Gl,"f").add(n)}),new Promise((i,o)=>{r=setTimeout(()=>{ca(this,Gl,"f").delete(n),o(new Error("Timed out waiting for lock"))},e)})])}tryAcquire(){return ca(this,Za,"f")?!1:(cC(this,Za,!0,"f"),!0)}release(){if(!ca(this,Za,"f"))throw new Error("Cannot release an unacquired lock");if(ca(this,Gl,"f").size>0){const[e]=ca(this,Gl,"f");ca(this,Gl,"f").delete(e),e()}else cC(this,Za,!1,"f")}}var JUe=aQ.default=QUe;Za=new WeakMap,Gl=new WeakMap;function e5e(t){return t.type.startsWith("GuiAdd")}const lQ={move:"touchmove",end:"touchend"},cQ={move:"mousemove",end:"mouseup"};function uQ(t){return t.type==="touchmove"}function dQ(t){return t.type==="mousemove"}var t5e=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,n5e=DG(function(t){return t5e.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91}),r5e=n5e,i5e=function(e){return e!=="theme"},z6=function(e){return typeof e=="string"&&e.charCodeAt(0)>96?r5e:i5e},U6=function(e,n,r){var i;if(n){var o=n.shouldForwardProp;i=e.__emotion_forwardProp&&o?function(s){return e.__emotion_forwardProp(s)&&o(s)}:o}return typeof i!="function"&&r&&(i=e.__emotion_forwardProp),i},o5e=function(e){var n=e.cache,r=e.serialized,i=e.isStringTag;return BG(n,r,i),$ve(function(){return tA(n,r,i)}),null},s5e=function t(e,n){var r=e.__emotion_real===e,i=r&&e.__emotion_base||e,o,s;n!==void 0&&(o=n.label,s=n.target);var a=U6(e,n,r),l=a||z6(i),c=!l("as");return function(){var u=arguments,d=r&&e.__emotion_styles!==void 0?e.__emotion_styles.slice(0):[];if(o!==void 0&&d.push("label:"+o+";"),u[0]==null||u[0].raw===void 0)d.push.apply(d,u);else{d.push(u[0][0]);for(var f=u.length,h=1;h(e=e/255,e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4))),3)}function l5e(){const t=M.useContext(Ui),e=t.useSceneTree(f=>f.removeSceneNode),n=t.useSceneTree(f=>f.resetScene),r=t.useSceneTree(f=>f.addSceneNode),i=t.useGui(f=>f.setTheme),o=t.useGui(f=>f.addGui),s=t.useGui(f=>f.removeGui),a=t.useGui(f=>f.setGuiValue),l=t.useGui(f=>f.setGuiVisible),c=t.useGui(f=>f.setGuiDisabled),u=t.useSceneTree(f=>f.setClickable);function d(f){const h=t.useSceneTree.getState().nodeFromName,g=f.name.split("/").slice(0,-1).join("/");g in h||d(new fa(g,y=>I.jsx(LT,{ref:y,show_axes:!1}))),r(f)}return f=>{if(e5e(f)){o(f);return}switch(f.type){case"ThemeConfigurationMessage":{i(f);return}case"FrameMessage":{d(new fa(f.name,h=>I.jsx(LT,{ref:h,show_axes:f.show_axes,axes_length:f.axes_length,axes_radius:f.axes_radius})));return}case"PointCloudMessage":{const h=new Jt,g=new CS({size:f.point_size,vertexColors:!0,toneMapped:!1});h.setAttribute("position",new Et(new Float32Array(f.points.buffer.slice(f.points.byteOffset,f.points.byteOffset+f.points.byteLength)),3)),h.computeBoundingSphere(),h.setAttribute("color",B6(f.colors)),d(new fa(f.name,y=>I.jsx("points",{ref:y,geometry:h,material:g}),()=>{h.dispose(),g.dispose()}));return}case"MeshMessage":{const h=new Jt,g=new AS({color:f.color||void 0,vertexColors:f.vertex_colors!==null,wireframe:f.wireframe,side:{front:Vs,back:Vr,double:Hr}[f.side]});h.setAttribute("position",new Et(new Float32Array(f.vertices.buffer.slice(f.vertices.byteOffset,f.vertices.byteOffset+f.vertices.byteLength)),3)),f.vertex_colors!==null&&h.setAttribute("color",B6(f.vertex_colors)),h.setIndex(new _S(new Uint32Array(f.faces.buffer.slice(f.faces.byteOffset,f.faces.byteOffset+f.faces.byteLength)),1)),h.computeVertexNormals(),h.computeBoundingSphere(),d(new fa(f.name,y=>I.jsx("mesh",{ref:y,geometry:h,material:g}),()=>{h.dispose(),g.dispose()}));return}case"CameraFrustumMessage":{const h=f.image_media_type!==null&&f.image_base64_data!==null?new mm().load(`data:${f.image_media_type};base64,${f.image_base64_data}`):void 0,g=f.scale*Math.tan(f.fov/2)*2;d(new fa(f.name,y=>I.jsxs("group",{ref:y,children:[I.jsx(rLe,{fov:f.fov,aspect:f.aspect,scale:f.scale,color:f.color}),h&&I.jsxs("mesh",{position:[0,0,f.scale],rotation:new ki(Math.PI,0,0),children:[I.jsx("planeGeometry",{attach:"geometry",args:[f.aspect*g,g]}),I.jsx("meshBasicMaterial",{attach:"material",transparent:!0,side:Hr,map:h})]})]}),()=>h?.dispose()));return}case"TransformControlsMessage":{const h=f.name,g=HS(t.websocketRef,50);d(new fa(f.name,y=>I.jsx(Hde,{ref:y,scale:f.scale,lineWidth:f.line_width,fixed:f.fixed,autoTransform:f.auto_transform,activeAxes:f.active_axes,disableAxes:f.disable_axes,disableSliders:f.disable_sliders,disableRotations:f.disable_rotations,translationLimits:f.translation_limits,rotationLimits:f.rotation_limits,depthTest:f.depth_test,opacity:f.opacity,onDrag:_=>{const v=t.nodeAttributesFromName.current;v[f.name]===void 0&&(v[f.name]={});const x=new Hn;x.setFromRotationMatrix(_);const w=new Z().setFromMatrixPosition(_),S=v[f.name];S.wxyz=[x.w,x.x,x.y,x.z],S.position=w.toArray(),g({type:"TransformControlsUpdateMessage",name:h,wxyz:S.wxyz,position:S.position})}})));return}case"SetCameraLookAtMessage":{const h=t.cameraControlRef.current,g=new Hn;g.setFromEuler(new ki(-Math.PI/2,0,0));const y=new Z(f.look_at[0],f.look_at[1],f.look_at[2]);y.applyQuaternion(g),h.setTarget(y.x,y.y,y.z);return}case"SetCameraUpDirectionMessage":{const h=t.cameraRef.current,g=t.cameraControlRef.current,y=new Hn;y.setFromEuler(new ki(-Math.PI/2,0,0));const _=new Z(f.position[0],f.position[1],f.position[2]).applyQuaternion(y);h.up.set(_.x,_.y,_.z),g.applyCameraUp();return}case"SetCameraPositionMessage":{const h=t.cameraControlRef.current,g=new Z(f.position[0],f.position[1],f.position[2]),y=new Hn;y.setFromEuler(new ki(-Math.PI/2,0,0)),g.applyQuaternion(y),h.setPosition(g.x,g.y,g.z);return}case"SetCameraFovMessage":{const h=t.cameraRef.current;h.setFocalLength(.5*h.getFilmHeight()/Math.tan(f.fov/2));return}case"SetOrientationMessage":{const h=t.nodeAttributesFromName.current;h[f.name]===void 0&&(h[f.name]={}),h[f.name].wxyz=f.wxyz;break}case"SetPositionMessage":{const h=t.nodeAttributesFromName.current;h[f.name]===void 0&&(h[f.name]={}),h[f.name].position=f.position;break}case"SetSceneNodeVisibilityMessage":{const h=t.nodeAttributesFromName.current;h[f.name]===void 0&&(h[f.name]={}),h[f.name].visibility=f.visible;break}case"BackgroundImageMessage":{new mm().load(`data:${f.media_type};base64,${f.base64_data}`,h=>{h.encoding=Nn;const g=t.sceneRef.current?.background;t.sceneRef.current.background=h,aF(g)&&g.dispose(),t.useGui.setState({backgroundAvailable:!0})});return}case"LabelMessage":{const h=jT.span` + background-color: rgba(255, 255, 255, 0.85); + padding: 0.2em; + border-radius: 0.2em; + border: 1px solid #777; + color: #333; + + &:before { + content: ""; + position: absolute; + top: -1em; + left: 1em; + width: 0; + height: 0; + border-left: 1px solid #777; + box-sizing: border-box; + height: 0.8em; + box-shadow: 0 0 1em 0.1em rgba(255, 255, 255, 1); + } + `;d(new fa(f.name,g=>I.jsx("group",{ref:g,children:I.jsx(Hg,{children:I.jsx("div",{style:{width:"10em",fontSize:"0.8em",transform:"translateX(-1em) translateY(1em)"},children:I.jsx(h,{children:f.text})})})})));return}case"ImageMessage":{new mm().load(`data:${f.media_type};base64,${f.base64_data}`,h=>{d(new fa(f.name,g=>I.jsx("group",{ref:g,children:I.jsxs("mesh",{rotation:new ki(Math.PI,0,0),children:[I.jsx("planeGeometry",{attach:"geometry",args:[f.render_width,f.render_height]}),I.jsx("meshBasicMaterial",{attach:"material",transparent:!0,side:Hr,map:h,toneMapped:!1})]})}),()=>h.dispose()))});return}case"RemoveSceneNodeMessage":{console.log("Removing scene node:",f.name),e(f.name);return}case"SetSceneNodeClickableMessage":{u(f.name,f.clickable);return}case"ResetSceneMessage":{n();const h=t.sceneRef.current?.background;t.sceneRef.current.background=null,aF(h)&&h.dispose(),t.useGui.setState({backgroundAvailable:!1});return}case"GuiSetValueMessage":{a(f.id,f.value);return}case"GuiSetVisibleMessage":{l(f.id,f.visible);return}case"GuiSetDisabledMessage":{c(f.id,f.disabled);return}case"GuiRemoveMessage":{s(f.id);return}default:{console.log("Received message did not match any known types:",f);return}}}}function c5e(){const t=M.useContext(Ui),e=l5e(),n=t.useGui(i=>i.server),r=t.useGui(i=>i.resetGui);return qUe(n),H.useEffect(()=>{const i=new JUe;let o=null,s=!1;function a(){if(s)return;o=new WebSocket(n);const c=setTimeout(()=>{o?.close()},5e3);o.onopen=()=>{clearTimeout(c),console.log(`Connected!${n}`),t.websocketRef.current=o,t.useGui.setState({websocketConnected:!0})},o.onclose=()=>{console.log(`Disconnected! ${n}`),clearTimeout(c),t.websocketRef.current=null,t.useGui.setState({websocketConnected:!1}),r(),l=setTimeout(a,1e3)};const u=[],d=[];let f=!1;setInterval(()=>{const h=u.length,g=u.slice(0,h);u.splice(0,h),g.forEach(e)},5),o.onmessage=async h=>{const g=new Promise(y=>{h.data.arrayBuffer().then(_=>{y(wme(new Uint8Array(_)))})});await i.acquireAsync({timeout:1e3}).catch(()=>{console.log("Order lock timed out."),i.release()});try{const y=await g;y.type==="MessageGroupStart"?f=!0:y.type==="MessageGroupEnd"?(u.push(...d),d.length=0,f=!1):f?d.push(y):u.push(y)}finally{i.acquired&&i.release()}}}let l=setTimeout(a,500);return()=>{s=!0,clearTimeout(l),t.useGui.setState({websocketConnected:!1}),o?.close(),clearTimeout(l)}},[n,e,r]),I.jsx(I.Fragment,{})}const fQ=H.createContext(null);function Pm({children:t}){const e=H.useRef(null);return I.jsx(fQ.Provider,{value:e,children:I.jsx(tv,{radius:"sm",withBorder:!0,sx:{boxSizing:"border-box",width:"20em",zIndex:1,position:"absolute",top:"1em",right:"1em",margin:0,"&.hidden":{overflow:"hidden"},"& .panel-contents":{opacity:"1.0",visibility:"visible",height:"auto",transition:"visibility 0.2s linear,opacity 0.2s linear"},"&.hidden .panel-contents":{opacity:"0.0",visibility:"hidden",height:"0 !important",border:"0",position:"absolute"},"& .expand-icon":{transform:"rotate(0)"},"&.hidden .expand-icon":{transform:"rotate(180deg)"}},ref:e,children:t})})}Pm.Handle=function({children:e}){const n=H.useContext(fQ),r=H.useRef({dragging:!1,startPosX:0,startPosY:0,startClientX:0,startClientY:0}),i=H.useRef({}),o=(c,u,d)=>Math.abs(c+u/2){const c=n.current;if(c===null)return;const u=c.parentElement;if(u===null)return;c.style.maxHeight=`${(u.clientHeight-s*2).toString()}px`;const d=new ResizeObserver(()=>{i.current.x===void 0&&(i.current.x=o(c.offsetLeft,c.clientWidth,u.clientWidth)),i.current.y===void 0&&(i.current.y=o(c.offsetTop,c.clientHeight,u.clientHeight)),c.style.maxHeight=`${(u.clientHeight-s*2).toString()}px`;let f=i.current.x,h=i.current.y;for(;f<0;)f+=u.clientWidth;for(;h<0;)h+=u.clientHeight;a(f,h)});return d.observe(c),d.observe(u),()=>{d.disconnect()}});const l=c=>{const u=r.current,d=n.current;if(!d)return;c.type=="touchstart"?(c=c,u.startClientX=c.touches[0].clientX,u.startClientY=c.touches[0].clientY):(c=c,u.startClientX=c.clientX,u.startClientY=c.clientY),u.startPosX=d.offsetLeft,u.startPosY=d.offsetTop;const f=c.type=="touchstart"?lQ:cQ;function h(g){let y=0,_=0;if(uQ(g)?(g=g,y=g.touches[0].clientX-u.startClientX,_=g.touches[0].clientY-u.startClientY):dQ(g)&&(g=g,y=g.clientX-u.startClientX,_=g.clientY-u.startClientY),Math.abs(y)<=3&&Math.abs(_)<=3)return;u.dragging=!0;const v=u.startPosX+y,x=u.startPosY+_;[i.current.x,i.current.y]=a(v,x)}window.addEventListener(f.move,h),window.addEventListener(f.end,()=>{c.type=="touchstart"&&(u.dragging=!1),window.removeEventListener(f.move,h)},{once:!0})};return I.jsxs(Xe,{sx:c=>({backgroundColor:c.colorScheme==="dark"?c.colors.dark[5]:c.colors.gray[1],lineHeight:"1.5em",cursor:"pointer",position:"relative",fontWeight:400,boxSizing:"border-box",overflow:"hidden",userSelect:"none"}),onClick:()=>{const c=r.current;if(c.dragging){c.dragging=!1;return}const u=n.current;u&&u.classList.toggle("hidden")},onTouchStart:c=>{l(c)},onMouseDown:c=>{l(c)},children:[I.jsx(Xe,{component:"div",sx:{padding:"0.5em 3em 0.5em 0.8em"},children:e}),I.jsx(Xe,{component:"div",sx:{position:"absolute",top:"50%",right:"0.5em",transform:"translateY(-48%) scale(0.8)",height:"1.5em",opacity:"0.5"},children:I.jsx(ike,{className:"expand-icon"})})]})};Pm.Contents=function({children:e}){return I.jsx(Xe,{className:"panel-contents",children:e})};function u5e(t){throw new Error("Didn't expect to get here",t)}function hQ(t){let e=null;switch(t){case null:break;case"GitHub":e=nke;break;case"Description":e=yke;break;case"Keyboard":e=Ske;break;default:u5e(t)}return e}function d5e(t){const e=hQ(t.icon);return I.jsx(Ds,{component:"a",variant:"default",href:t.href||void 0,compact:!0,target:"_blank",leftIcon:e===null?null:I.jsx(e,{size:"1em"}),ml:"sm",color:"gray",sx:n=>({[n.fn.smallerThan("sm")]:{display:"none"}}),children:t.text})}function f5e(t){const e=hQ(t.icon);return I.jsx(Ds,{m:"sm",component:"a",variant:"default",href:t.href||void 0,target:"_blank",leftIcon:e===null?null:I.jsx(e,{size:"1.5em"}),ml:"sm",color:"gray",children:t.text})}function h5e(t,e){let n;t.image_url_dark==null||e.colorScheme=="light"?n=t.image_url_light:n=t.image_url_dark;const r=I.jsx("img",{src:n,alt:t.image_alt,style:{height:"1.8em",margin:"0 0.5em"}});return t.href==null?r:I.jsx("a",{href:t.href,children:r})}function p5e(){const e=M.useContext(Ui).useGui(a=>a.theme.titlebar_content),n=Ir(),[r,i]=sW(!1);if(e==null)return null;const o=e.buttons,s=e.image;return I.jsxs(h7,{p:"xs",height:"3.2em",sx:a=>({margin:0,borderBottom:"1px solid",borderColor:a.colorScheme=="light"?a.colors.gray[4]:a.colors.dark[4]}),children:[I.jsxs(AY,{fluid:!0,sx:()=>({display:"flex",alignItems:"center"}),children:[I.jsx(MT,{sx:()=>({marginRight:"auto"}),children:s!==null?h5e(s,n):null}),I.jsx(MT,{sx:()=>({flexWrap:"nowrap",overflowX:"scroll",msOverflowStyle:"none",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),children:o?.map(a=>d5e(a))}),I.jsx(L9,{size:"sm",opened:r,onClick:i.toggle,title:r?"Close navigation":"Open navigation",sx:a=>({[a.fn.largerThan("sm")]:{display:"none"}})})]}),I.jsx(tv,{sx:a=>({[a.fn.largerThan("sm")]:{display:"none"},display:"flex",flexDirection:"column",position:"relative",top:0,left:"-0.625rem",zIndex:1e7,height:r?"calc(100vh - 2.375em)":"0",width:"100vw",transition:"all 0.5s",overflow:r?"scroll":"hidden",padding:r?"1rem":"0"}),children:o?.map(a=>f5e(a))})]})}const XA=H.createContext(null),m5e=(t,e)=>(t-e)/window.innerHeight,$T=t=>{let e=0;const n=t.children;for(let r=0;r{const s=r.current,a=n.current;if(a===null)return;s.startHeight=a.clientHeight,a.style.transition="none";let l=s.hidden;const c=o.type=="touchstart"?lQ:cQ;function u(d){let f=0;if(uQ(d)?f=window.innerHeight-d.touches[0].clientY:dQ(d)&&(f=window.innerHeight-d.clientY),s.dragging=!0,!a)return;a.style.height=f+"px";const h=m5e(s.startHeight,a.clientHeight);!s.hidden&&h>.1||s.hidden&&h>-.1?(a.classList.add("hidden"),l=!0):(!s.hidden&&h<=.05||s.hidden&&h<=-.1)&&(a.classList.remove("hidden"),l=!1)}window.addEventListener(c.move,u),window.addEventListener(c.end,()=>{s.dragging=!1,s.hidden=l,window.removeEventListener(c.move,u),a.style.transition="height 0.3s linear",s.hidden?a.style.height="3.5em":a.style.height=$T(a)+"px"},{once:!0})};return I.jsxs(Xe,{color:"red",sx:o=>({backgroundColor:o.colorScheme=="dark"?o.colors.dark[5]:o.colors.gray[1],lineHeight:"2.5em",cursor:"pointer",position:"relative",fontWeight:400,boxSizing:"border-box",overflow:"hidden",userSelect:"none"}),onClick:()=>{const o=r.current,s=n.current;if(s!==null){if(o.dragging){o.dragging=!1;return}s.classList.toggle("hidden"),o.hidden?(s.style.height=$T(s)+"px",o.hidden=!1):(s.style.height="3.5em",o.hidden=!0)}},onTouchStart:o=>{i(o)},onMouseDown:o=>{i(o)},children:[I.jsx(Xe,{component:"div",sx:{padding:"0.5em 3em 0.5em 0.8em"},children:e}),I.jsx(Xe,{component:"div",sx:{position:"absolute",top:"50%",right:"0.5em",transform:"translateY(-48%) scale(0.8)",height:"1.5em",opacity:"0.5"},children:I.jsx(gq,{className:"expand-icon"})})]})};Cm.Contents=function({children:e}){const n=H.useRef(null),r=H.useContext(XA);return H.useEffect(()=>{const i=r.current,o=n.current;if(i===null||o===null)return;const s=new ResizeObserver(()=>{i.classList.contains("hidden")||(i.style.height=$T(i)+"px")});return s.observe(o),()=>{s.disconnect()}}),I.jsx(Xe,{className:"panel-contents",ref:n,children:e})};const Ui=H.createContext(null);Gi.enabled=!0;function g5e(){function t(){let o=window.location.href;return o=o.replace("http://","ws://"),o=o.split("?")[0],o.endsWith("/")&&(o=o.slice(0,-1)),o}const e=new URLSearchParams(window.location.search).getAll(sQ),n=e.length>=1?e[0]:t(),r={useSceneTree:LLe(),useGui:ZUe(n),websocketRef:H.useRef(null),canvasRef:H.useRef(null),sceneRef:H.useRef(null),cameraRef:H.useRef(null),cameraControlRef:H.useRef(null),nodeAttributesFromName:H.useRef({})},i=r.useGui(o=>o.theme.fixed_sidebar);return I.jsxs(Ui.Provider,{value:r,children:[I.jsx(p5e,{}),I.jsxs(Xe,{sx:{width:"100%",height:"1px",position:"relative",flex:"1 0 auto"},children:[I.jsx(c5e,{}),I.jsx(sX,{smallerThan:"xs",styles:{right:0,bottom:"3.5em"},children:I.jsx(Xe,{sx:o=>({top:0,bottom:0,left:0,right:i?"20em":0,position:"absolute",backgroundColor:o.colorScheme==="light"?"#fff":o.colors.dark[9]}),children:I.jsx(y5e,{})})}),I.jsx(v5e,{fixed_sidebar:i})]})]})}function v5e(t){const e=Ir();return rb(`(max-width: ${e.breakpoints.xs})`)?I.jsxs(Cm,{children:[I.jsx(Cm.Handle,{children:I.jsx(lC,{})}),I.jsx(Cm.Contents,{children:I.jsx(aC,{})})]}):t.fixed_sidebar?I.jsx(sA,{sx:r=>({width:"20em",boxSizing:"border-box",right:0,position:"absolute",top:"0em",bottom:"0em",borderLeft:"1px solid",borderColor:r.colorScheme=="light"?r.colors.gray[4]:r.colors.dark[4]}),children:I.jsxs(k7,{type:"always",sx:{height:"100%"},children:[I.jsx(Xe,{p:"sm",sx:r=>({backgroundColor:r.colorScheme=="dark"?r.colors.dark[5]:r.colors.gray[1],lineHeight:"1.5em",fontWeight:400}),children:I.jsx(lC,{})}),I.jsx(aC,{})]})}):I.jsxs(Pm,{children:[I.jsx(Pm.Handle,{children:I.jsx(lC,{})}),I.jsx(Pm.Contents,{children:I.jsx(aC,{})})]})}function y5e(){const t=H.useContext(Ui);return I.jsxs(hue,{camera:{position:[3,3,-3]},gl:{preserveDrawingBuffer:!0},style:{position:"relative",zIndex:0,width:"100%",height:"100%"},performance:{min:.95},ref:t.canvasRef,children:[I.jsx(hde,{pixelated:!0}),I.jsx(pde,{}),I.jsx(_5e,{}),I.jsx(Nme,{}),I.jsxs(Qpe,{children:[I.jsx(oq,{name:""}),I.jsx(eme,{enabled:!0,autoClear:!1,children:I.jsx(nme,{hiddenEdgeColor:16514816,visibleEdgeColor:16514816,blendFunction:Kt.SCREEN,kernelSize:ld.MEDIUM,edgeStrength:30,height:480,blur:!0})})]}),I.jsx(ode,{path:"/hdri/",files:"potsdamer_platz_1k.hdr"})]})}function _5e(){const{sceneRef:t,cameraRef:e}=H.useContext(Ui);return t.current=dn(n=>n.scene),e.current=dn(n=>n.camera),I.jsx(I.Fragment,{})}function x5e(){return I.jsx(XG,{withGlobalStyles:!0,withNormalizeCSS:!0,theme:{colorScheme:"light"},children:I.jsx(Xe,{sx:{width:"100%",height:"100%",position:"relative",display:"flex",flexDirection:"column"},children:I.jsx(g5e,{})})})}uC.createRoot(document.getElementById("root")).render(I.jsx(x5e,{})); diff --git a/viser/client/build/index.html b/viser/client/build/index.html index 2f5d0c52a..d9f25ea09 100644 --- a/viser/client/build/index.html +++ b/viser/client/build/index.html @@ -16,12 +16,12 @@ --> Viser - +
- + diff --git a/viser/client/package.json b/viser/client/package.json index 2184370bd..a9584e26a 100644 --- a/viser/client/package.json +++ b/viser/client/package.json @@ -70,6 +70,7 @@ "browserslist-to-esbuild": "^1.2.0", "eslint": "^8.43.0", "eslint-plugin-react": "^7.32.2", + "eslint-plugin-react-refresh": "^0.4.1", "typescript": "^5.0.4", "vite-plugin-eslint": "^1.8.1" } diff --git a/viser/client/src/App.tsx b/viser/client/src/App.tsx new file mode 100644 index 000000000..158be6c71 --- /dev/null +++ b/viser/client/src/App.tsx @@ -0,0 +1,262 @@ +import { + AdaptiveDpr, + AdaptiveEvents, + CameraControls, + Environment, +} from "@react-three/drei"; +import * as THREE from "three"; +import { Canvas, useThree } from "@react-three/fiber"; +import { + EffectComposer, + Outline, + Selection, +} from "@react-three/postprocessing"; +import { BlendFunction, KernelSize } from "postprocessing"; + +import { SynchronizedCameraControls } from "./CameraControls"; +import { + Aside, + Box, + MantineProvider, + MediaQuery, + ScrollArea, + useMantineTheme, +} from "@mantine/core"; +import React from "react"; + +import { SceneNodeThreeObject, UseSceneTree } from "./SceneTree"; + +import { useSceneTreeState } from "./SceneTreeState"; + +import "./index.css"; + +import ControlPanel, { ConnectionStatus } from "./ControlPanel/ControlPanel"; +import { UseGui, useGuiState } from "./ControlPanel/GuiState"; +import { searchParamKey } from "./SearchParamsUtils"; +import WebsocketInterface from "./WebsocketInterface"; + +import FloatingPanel from "./ControlPanel/FloatingPanel"; +import { Titlebar } from "./Titlebar"; +import BottomPanel from "./ControlPanel/BottomPanel"; +import { useMediaQuery } from "@mantine/hooks"; + +type ViewerContextContents = { + useSceneTree: UseSceneTree; + useGui: UseGui; + websocketRef: React.MutableRefObject; + canvasRef: React.MutableRefObject; + sceneRef: React.MutableRefObject; + cameraRef: React.MutableRefObject; + cameraControlRef: React.MutableRefObject; + nodeAttributesFromName: React.MutableRefObject<{ + [name: string]: + | undefined + | { + wxyz?: [number, number, number, number]; + position?: [number, number, number]; + visibility?: boolean; + }; + }>; +}; +export const ViewerContext = React.createContext( + null +); + +THREE.ColorManagement.enabled = true; + +function SingleViewer() { + // Default server logic. + function getDefaultServerFromUrl() { + // https://localhost:8080/ => ws://localhost:8080 + // https://localhost:8080/?server=some_url => ws://localhost:8080 + let server = window.location.href; + server = server.replace("http://", "ws://"); + server = server.split("?")[0]; + if (server.endsWith("/")) server = server.slice(0, -1); + return server; + } + const servers = new URLSearchParams(window.location.search).getAll( + searchParamKey + ); + const initialServer = + servers.length >= 1 ? servers[0] : getDefaultServerFromUrl(); + + // Values that can be globally accessed by components in a viewer. + const viewer: ViewerContextContents = { + useSceneTree: useSceneTreeState(), + useGui: useGuiState(initialServer), + websocketRef: React.useRef(null), + canvasRef: React.useRef(null), + sceneRef: React.useRef(null), + cameraRef: React.useRef(null), + cameraControlRef: React.useRef(null), + // Scene node attributes that aren't placed in the zustand state, for performance reasons. + nodeAttributesFromName: React.useRef({}), + }; + const fixed_sidebar = viewer.useGui((state) => state.theme.fixed_sidebar); + return ( + + + + + + ({ + top: 0, + bottom: 0, + left: 0, + right: fixed_sidebar ? "20em" : 0, + position: "absolute", + backgroundColor: + theme.colorScheme === "light" ? "#fff" : theme.colors.dark[9], + })} + > + + + + + + + ); +} +function Panel(props: { fixed_sidebar: boolean }) { + const theme = useMantineTheme(); + const xsQuery = useMediaQuery(`(max-width: ${theme.breakpoints.xs})`); + if (xsQuery) { + return ( + + + + + + + + + ); + } else if (props.fixed_sidebar) { + return ( + + ); + } else { + return ( + + + + + + + + + ); + } +} + +function ViewerCanvas() { + const viewer = React.useContext(ViewerContext)!; + return ( + + + + + + + + + + + + + + ); +} + +/** Component for helping us set the scene reference. */ +function SceneContextSetter() { + const { sceneRef, cameraRef } = React.useContext(ViewerContext)!; + sceneRef.current = useThree((state) => state.scene); + cameraRef.current = useThree( + (state) => state.camera as THREE.PerspectiveCamera + ); + return <>; +} + +export function Root() { + return ( + + + + + + ); +} diff --git a/viser/client/src/CameraControls.tsx b/viser/client/src/CameraControls.tsx index 9f51c5e33..f4ac6370e 100644 --- a/viser/client/src/CameraControls.tsx +++ b/viser/client/src/CameraControls.tsx @@ -1,5 +1,5 @@ -import { ViewerContext } from "."; -import { makeThrottledMessageSender } from "./WebsocketInterface"; +import { ViewerContext } from "./App"; +import { makeThrottledMessageSender } from "./WebsocketFunctions"; import { CameraControls } from "@react-three/drei"; import { useThree } from "@react-three/fiber"; import * as holdEvent from "hold-event"; diff --git a/viser/client/src/ControlPanel/BottomPanel.tsx b/viser/client/src/ControlPanel/BottomPanel.tsx index a4174dd84..dacc1809e 100644 --- a/viser/client/src/ControlPanel/BottomPanel.tsx +++ b/viser/client/src/ControlPanel/BottomPanel.tsx @@ -3,7 +3,7 @@ import { IconCaretDown } from "@tabler/icons-react"; import React from "react"; import { isMouseEvent, isTouchEvent, mouseEvents, touchEvents } from "../Utils"; -const BottomPanelRefContext = +export const BottomPanelRefContext = React.createContext | null>(null); const pagePercent = (start: number, end: number) => { @@ -56,7 +56,7 @@ export default function BottomPanel({ ); } -BottomPanel.Handle = function FloatingPanelHandle({ +BottomPanel.Handle = function BottomPanelHandle({ children, }: { children: string | React.ReactNode; @@ -191,13 +191,13 @@ BottomPanel.Handle = function FloatingPanelHandle({ ); }; /** Contents of a panel. */ -BottomPanel.Contents = function FloatingPanelContents({ +BottomPanel.Contents = function BottomPanelContents({ children, }: { children: string | React.ReactNode; }) { - const panelWrapperRef = React.useContext(BottomPanelRefContext)!; const contentRef = React.useRef(null); + const panelWrapperRef = React.useContext(BottomPanelRefContext)!; React.useEffect(() => { const panel = panelWrapperRef.current; const content = contentRef.current; diff --git a/viser/client/src/ControlPanel/ControlPanel.tsx b/viser/client/src/ControlPanel/ControlPanel.tsx index 1a9c6a7f0..3cbcd21e1 100644 --- a/viser/client/src/ControlPanel/ControlPanel.tsx +++ b/viser/client/src/ControlPanel/ControlPanel.tsx @@ -1,4 +1,4 @@ -import { ViewerContext } from ".."; +import { ViewerContext } from "../App"; import GeneratedControls from "./Generated"; import SceneTreeTable from "./SceneTreeTable"; import ServerControls from "./Server"; diff --git a/viser/client/src/ControlPanel/FloatingPanel.tsx b/viser/client/src/ControlPanel/FloatingPanel.tsx index 543001353..ab7b4c531 100644 --- a/viser/client/src/ControlPanel/FloatingPanel.tsx +++ b/viser/client/src/ControlPanel/FloatingPanel.tsx @@ -1,9 +1,11 @@ +// @refresh reset + import { Box, Paper } from "@mantine/core"; import { IconCaretUp } from "@tabler/icons-react"; import React from "react"; import { isMouseEvent, isTouchEvent, mouseEvents, touchEvents } from "../Utils"; -const FloatingPanelRefContext = +export const FloatingPanelRefContext = React.createContext | null>(null); /** Root component for control panel. Parents a set of control tabs. @@ -89,6 +91,7 @@ FloatingPanel.Handle = function FloatingPanelHandle({ Math.abs(panelPosition - parentSize + panelSize / 2.0) ? panelPosition : panelPosition - parentSize; + const panelBoundaryPad = 15; function setPanelLocation(x: number, y: number) { const panel = panelWrapperRef.current; diff --git a/viser/client/src/ControlPanel/Generated.tsx b/viser/client/src/ControlPanel/Generated.tsx index 6e75f1e8f..700e3c3da 100644 --- a/viser/client/src/ControlPanel/Generated.tsx +++ b/viser/client/src/ControlPanel/Generated.tsx @@ -1,5 +1,5 @@ -import { ViewerContext } from ".."; -import { makeThrottledMessageSender } from "../WebsocketInterface"; +import { ViewerContext } from "../App"; +import { makeThrottledMessageSender } from "../WebsocketFunctions"; import { GuiConfig } from "./GuiState"; import { Accordion, diff --git a/viser/client/src/ControlPanel/GuiState.tsx b/viser/client/src/ControlPanel/GuiState.tsx index b9e82e24e..094bb45d0 100644 --- a/viser/client/src/ControlPanel/GuiState.tsx +++ b/viser/client/src/ControlPanel/GuiState.tsx @@ -16,10 +16,6 @@ export type GuiConfig = | Messages.GuiAddVector2Message | Messages.GuiAddVector3Message; -export function isGuiConfig(message: Messages.Message): message is GuiConfig { - return message.type.startsWith("GuiAdd"); -} - interface GuiState { theme: Messages.ThemeConfigurationMessage; label: string; diff --git a/viser/client/src/ControlPanel/SceneTreeTable.tsx b/viser/client/src/ControlPanel/SceneTreeTable.tsx index b7e02b9db..20ed24b00 100644 --- a/viser/client/src/ControlPanel/SceneTreeTable.tsx +++ b/viser/client/src/ControlPanel/SceneTreeTable.tsx @@ -1,4 +1,4 @@ -import { ViewerContext } from ".."; +import { ViewerContext } from "../App"; import { ActionIcon, Modal } from "@mantine/core"; import { useDisclosure } from "@mantine/hooks"; import { diff --git a/viser/client/src/ControlPanel/Server.tsx b/viser/client/src/ControlPanel/Server.tsx index a4b86acb6..61f3befcf 100644 --- a/viser/client/src/ControlPanel/Server.tsx +++ b/viser/client/src/ControlPanel/Server.tsx @@ -1,4 +1,4 @@ -import { ViewerContext } from ".."; +import { ViewerContext } from "../App"; import { Button, Stack, Switch, TextInput } from "@mantine/core"; import { Stats } from "@react-three/drei"; import { IconPhoto } from "@tabler/icons-react"; diff --git a/viser/client/src/SceneTree.tsx b/viser/client/src/SceneTree.tsx index b5d8b86f5..bf070c9ca 100644 --- a/viser/client/src/SceneTree.tsx +++ b/viser/client/src/SceneTree.tsx @@ -3,17 +3,13 @@ import { createPortal, useFrame } from "@react-three/fiber"; import React from "react"; import * as THREE from "three"; -import { CoordinateFrame } from "./ThreeAssets"; - -import { ViewerContext } from "."; -import { makeThrottledMessageSender } from "./WebsocketInterface"; +import { ViewerContext } from "./App"; +import { makeThrottledMessageSender } from "./WebsocketFunctions"; import { Html } from "@react-three/drei"; import { Select } from "@react-three/postprocessing"; import { immerable } from "immer"; -import { create } from "zustand"; -import { subscribeWithSelector } from "zustand/middleware"; -import { immer } from "zustand/middleware/immer"; import { Text } from "@mantine/core"; +import { useSceneTreeState } from "./SceneTreeState"; export type MakeObject = ( ref: React.Ref @@ -36,122 +32,6 @@ export class SceneNode { } } -interface SceneTreeState { - nodeFromName: { [name: string]: undefined | SceneNode }; - // Putting this into SceneNode makes the scene tree table much harder to implement. - labelVisibleFromName: { [name: string]: boolean }; -} -export interface SceneTreeActions extends SceneTreeState { - setClickable(name: string, clickable: boolean): void; - addSceneNode(nodes: SceneNode): void; - removeSceneNode(name: string): void; - resetScene(): void; - setLabelVisibility(name: string, labelVisibility: boolean): void; -} - -// Create default scene tree state. -// By default, the y-axis is up. Let's rotate everything so Z is up instead. -const makeRoot: MakeObject = (ref) => ( - -); -const rootAxesTemplate: MakeObject = (ref) => ( - -); - -const rootNodeTemplate = new SceneNode( - "", - makeRoot -) as SceneNode; - -const rootAxesNode = new SceneNode( - "/WorldAxes", - rootAxesTemplate -) as SceneNode; -rootNodeTemplate.children.push("/WorldAxes"); - -/** Declare a scene state, and return a hook for accessing it. Note that we put -effort into avoiding a global state! */ -export function useSceneTreeState() { - return React.useState(() => - create( - subscribeWithSelector( - immer((set) => ({ - nodeFromName: { "": rootNodeTemplate, "/WorldAxes": rootAxesNode }, - labelVisibleFromName: {}, - setClickable: (name, clickable) => - set((state) => { - const node = state.nodeFromName[name]; - if (node !== undefined) node.clickable = clickable; - }), - addSceneNode: (node) => - set((state) => { - const existingNode = state.nodeFromName[node.name]; - if (existingNode) { - // Node already exists. - state.nodeFromName[node.name] = { - ...node, - children: existingNode.children, - }; - } else { - // Node doesn't exist yet! - // TODO: this assumes the parent exists. We could probably merge this with addSceneNodeMakeParents. - const parent_name = node.name.split("/").slice(0, -1).join("/"); - state.nodeFromName[node.name] = node; - state.nodeFromName[parent_name]!.children.push(node.name); - } - }), - removeSceneNode: (name) => - set((state) => { - if (!(name in state.nodeFromName)) { - console.log("Skipping scene node removal for " + name); - return; - } - - // Remove this scene node and all children. - const removeNames: string[] = []; - function findChildrenRecursive(name: string) { - removeNames.push(name); - state.nodeFromName[name]!.children.forEach( - findChildrenRecursive - ); - } - findChildrenRecursive(name); - - removeNames.forEach((removeName) => { - delete state.nodeFromName[removeName]; - }); - - // Remove node from parent's children list. - const parent_name = name.split("/").slice(0, -1).join("/"); - state.nodeFromName[parent_name]!.children = state.nodeFromName[ - parent_name - ]!.children.filter((child_name) => child_name !== name); - }), - resetScene: () => - set((state) => { - // For scene resets: we need to retain the object references created for the root and world frame nodes. - for (const key of Object.keys(state.nodeFromName)) { - if (key !== "" && key !== "/WorldAxes") - delete state.nodeFromName[key]; - } - state.nodeFromName[""]!.children = ["/WorldAxes"]; - state.nodeFromName["/WorldAxes"]!.children = []; - }), - setLabelVisibility: (name, labelVisibility) => - set((state) => { - state.labelVisibleFromName[name] = labelVisibility; - }), - })) - ) - ) - )[0]; -} - /** Type corresponding to a zustand-style useSceneTree hook. */ export type UseSceneTree = ReturnType; diff --git a/viser/client/src/SceneTreeState.tsx b/viser/client/src/SceneTreeState.tsx new file mode 100644 index 000000000..6769e8de5 --- /dev/null +++ b/viser/client/src/SceneTreeState.tsx @@ -0,0 +1,123 @@ +import React from "react"; +import { MakeObject, SceneNode } from "./SceneTree"; +import { CoordinateFrame } from "./ThreeAssets"; +import * as THREE from "three"; +import { create } from "zustand"; +import { subscribeWithSelector } from "zustand/middleware"; +import { immer } from "zustand/middleware/immer"; + +interface SceneTreeState { + nodeFromName: { [name: string]: undefined | SceneNode }; + // Putting this into SceneNode makes the scene tree table much harder to implement. + labelVisibleFromName: { [name: string]: boolean }; +} +export interface SceneTreeActions extends SceneTreeState { + setClickable(name: string, clickable: boolean): void; + addSceneNode(nodes: SceneNode): void; + removeSceneNode(name: string): void; + resetScene(): void; + setLabelVisibility(name: string, labelVisibility: boolean): void; +} + +// Create default scene tree state. +// By default, the y-axis is up. Let's rotate everything so Z is up instead. +const makeRoot: MakeObject = (ref) => ( + +); +const rootAxesTemplate: MakeObject = (ref) => ( + +); + +const rootNodeTemplate = new SceneNode( + "", + makeRoot +) as SceneNode; + +const rootAxesNode = new SceneNode( + "/WorldAxes", + rootAxesTemplate +) as SceneNode; +rootNodeTemplate.children.push("/WorldAxes"); + +/** Declare a scene state, and return a hook for accessing it. Note that we put +effort into avoiding a global state! */ +export function useSceneTreeState() { + return React.useState(() => + create( + subscribeWithSelector( + immer((set) => ({ + nodeFromName: { "": rootNodeTemplate, "/WorldAxes": rootAxesNode }, + labelVisibleFromName: {}, + setClickable: (name, clickable) => + set((state) => { + const node = state.nodeFromName[name]; + if (node !== undefined) node.clickable = clickable; + }), + addSceneNode: (node) => + set((state) => { + const existingNode = state.nodeFromName[node.name]; + if (existingNode) { + // Node already exists. + state.nodeFromName[node.name] = { + ...node, + children: existingNode.children, + }; + } else { + // Node doesn't exist yet! + // TODO: this assumes the parent exists. We could probably merge this with addSceneNodeMakeParents. + const parent_name = node.name.split("/").slice(0, -1).join("/"); + state.nodeFromName[node.name] = node; + state.nodeFromName[parent_name]!.children.push(node.name); + } + }), + removeSceneNode: (name) => + set((state) => { + if (!(name in state.nodeFromName)) { + console.log("Skipping scene node removal for " + name); + return; + } + + // Remove this scene node and all children. + const removeNames: string[] = []; + function findChildrenRecursive(name: string) { + removeNames.push(name); + state.nodeFromName[name]!.children.forEach( + findChildrenRecursive + ); + } + findChildrenRecursive(name); + + removeNames.forEach((removeName) => { + delete state.nodeFromName[removeName]; + }); + + // Remove node from parent's children list. + const parent_name = name.split("/").slice(0, -1).join("/"); + state.nodeFromName[parent_name]!.children = state.nodeFromName[ + parent_name + ]!.children.filter((child_name) => child_name !== name); + }), + resetScene: () => + set((state) => { + // For scene resets: we need to retain the object references created for the root and world frame nodes. + for (const key of Object.keys(state.nodeFromName)) { + if (key !== "" && key !== "/WorldAxes") + delete state.nodeFromName[key]; + } + state.nodeFromName[""]!.children = ["/WorldAxes"]; + state.nodeFromName["/WorldAxes"]!.children = []; + }), + setLabelVisibility: (name, labelVisibility) => + set((state) => { + state.labelVisibleFromName[name] = labelVisibility; + }), + })) + ) + ) + )[0]; +} diff --git a/viser/client/src/Titlebar.tsx b/viser/client/src/Titlebar.tsx index 5370a4f7b..64fd30666 100644 --- a/viser/client/src/Titlebar.tsx +++ b/viser/client/src/Titlebar.tsx @@ -1,4 +1,4 @@ -import { ViewerContext } from "."; +import { ViewerContext } from "./App"; import { ThemeConfigurationMessage } from "./WebsocketMessages"; import { Burger, diff --git a/viser/client/src/Utils.tsx b/viser/client/src/Utils.tsx index 95794d26b..308a69ea8 100644 --- a/viser/client/src/Utils.tsx +++ b/viser/client/src/Utils.tsx @@ -1,3 +1,10 @@ +import { GuiConfig } from "./ControlPanel/GuiState"; +import * as Messages from "./WebsocketMessages"; + +// GUIState Type Guard +export function isGuiConfig(message: Messages.Message): message is GuiConfig { + return message.type.startsWith("GuiAdd"); +} // Drag Utils export interface DragEvents { move: "touchmove" | "mousemove"; diff --git a/viser/client/src/WebsocketFunctions.tsx b/viser/client/src/WebsocketFunctions.tsx new file mode 100644 index 000000000..668b44d8e --- /dev/null +++ b/viser/client/src/WebsocketFunctions.tsx @@ -0,0 +1,52 @@ +import { MutableRefObject } from "react"; +import { Message } from "./WebsocketMessages"; +import { pack } from "msgpackr"; + +/** Send message over websocket. */ +export function sendWebsocketMessage( + websocketRef: MutableRefObject, + message: Message +) { + if (websocketRef.current === null) return; + websocketRef.current.send(pack(message)); +} + +/** Returns a function for sending messages, with automatic throttling. */ +export function makeThrottledMessageSender( + websocketRef: MutableRefObject, + throttleMilliseconds: number +) { + let readyToSend = true; + let stale = false; + let latestMessage: Message | null = null; + + function send(message: Message) { + if (websocketRef.current === null) return; + latestMessage = message; + if (readyToSend) { + websocketRef.current.send(pack(message)); + stale = false; + readyToSend = false; + + setTimeout(() => { + readyToSend = true; + if (!stale) return; + latestMessage && send(latestMessage); + }, throttleMilliseconds); + } else { + stale = true; + } + } + return send; +} + +/** Type guard for threejs textures. Meant to be used with `scene.background`. */ +export function isTexture( + background: THREE.Color | THREE.Texture | THREE.CubeTexture | null | undefined +): background is THREE.Texture { + return ( + background !== null && + background !== undefined && + (background as THREE.Texture).isTexture !== undefined + ); +} diff --git a/viser/client/src/WebsocketInterface.tsx b/viser/client/src/WebsocketInterface.tsx index 90af7535a..3f75d08b3 100644 --- a/viser/client/src/WebsocketInterface.tsx +++ b/viser/client/src/WebsocketInterface.tsx @@ -1,67 +1,19 @@ import AwaitLock from "await-lock"; -import { pack, unpack } from "msgpackr"; +import { unpack } from "msgpackr"; -import React, { MutableRefObject, useContext } from "react"; +import React, { useContext } from "react"; import * as THREE from "three"; import { TextureLoader } from "three"; -import { ViewerContext } from "."; -import { isGuiConfig } from "./ControlPanel/GuiState"; +import { ViewerContext } from "./App"; +import { isGuiConfig } from "./Utils"; import { SceneNode } from "./SceneTree"; import { syncSearchParamServer } from "./SearchParamsUtils"; import { CameraFrustum, CoordinateFrame } from "./ThreeAssets"; import { Message } from "./WebsocketMessages"; import styled from "@emotion/styled"; import { Html, PivotControls } from "@react-three/drei"; - -/** Send message over websocket. */ -export function sendWebsocketMessage( - websocketRef: MutableRefObject, - message: Message -) { - if (websocketRef.current === null) return; - websocketRef.current.send(pack(message)); -} - -/** Returns a function for sending messages, with automatic throttling. */ -export function makeThrottledMessageSender( - websocketRef: MutableRefObject, - throttleMilliseconds: number -) { - let readyToSend = true; - let stale = false; - let latestMessage: Message | null = null; - - function send(message: Message) { - if (websocketRef.current === null) return; - latestMessage = message; - if (readyToSend) { - websocketRef.current.send(pack(message)); - stale = false; - readyToSend = false; - - setTimeout(() => { - readyToSend = true; - if (!stale) return; - latestMessage && send(latestMessage); - }, throttleMilliseconds); - } else { - stale = true; - } - } - return send; -} - -/** Type guard for threejs textures. Meant to be used with `scene.background`. */ -export function isTexture( - background: THREE.Color | THREE.Texture | THREE.CubeTexture | null | undefined -): background is THREE.Texture { - return ( - background !== null && - background !== undefined && - (background as THREE.Texture).isTexture !== undefined - ); -} +import { isTexture, makeThrottledMessageSender } from "./WebsocketFunctions"; /** Float **/ function threeColorBufferFromUint8Buffer(colors: ArrayBuffer) { diff --git a/viser/client/src/index.tsx b/viser/client/src/index.tsx index 23b125bc1..4c4db96ad 100644 --- a/viser/client/src/index.tsx +++ b/viser/client/src/index.tsx @@ -1,268 +1,6 @@ -import { - AdaptiveDpr, - AdaptiveEvents, - CameraControls, - Environment, -} from "@react-three/drei"; -import * as THREE from "three"; -import { Canvas, useThree } from "@react-three/fiber"; -import { - EffectComposer, - Outline, - Selection, -} from "@react-three/postprocessing"; -import { BlendFunction, KernelSize } from "postprocessing"; +import ReactDOM from "react-dom/client"; +import { Root } from "./App"; -import { SynchronizedCameraControls } from "./CameraControls"; -import { - Aside, - Box, - MantineProvider, - MediaQuery, - ScrollArea, - useMantineTheme, -} from "@mantine/core"; -import React from "react"; -import { createRoot } from "react-dom/client"; -import { - SceneNodeThreeObject, - UseSceneTree, - useSceneTreeState, -} from "./SceneTree"; - -import "./index.css"; - -import ControlPanel, { ConnectionStatus } from "./ControlPanel/ControlPanel"; -import { UseGui, useGuiState } from "./ControlPanel/GuiState"; -import { searchParamKey } from "./SearchParamsUtils"; -import WebsocketInterface from "./WebsocketInterface"; - -import FloatingPanel from "./ControlPanel/FloatingPanel"; -import { Titlebar } from "./Titlebar"; -import { useMediaQuery } from "@mantine/hooks"; -import BottomPanel from "./ControlPanel/BottomPanel"; - -type ViewerContextContents = { - useSceneTree: UseSceneTree; - useGui: UseGui; - websocketRef: React.MutableRefObject; - canvasRef: React.MutableRefObject; - sceneRef: React.MutableRefObject; - cameraRef: React.MutableRefObject; - cameraControlRef: React.MutableRefObject; - nodeAttributesFromName: React.MutableRefObject<{ - [name: string]: - | undefined - | { - wxyz?: [number, number, number, number]; - position?: [number, number, number]; - visibility?: boolean; - }; - }>; -}; -export const ViewerContext = React.createContext( - null +ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render( + ); - -THREE.ColorManagement.enabled = true; - -function SingleViewer() { - // Default server logic. - function getDefaultServerFromUrl() { - // https://localhost:8080/ => ws://localhost:8080 - // https://localhost:8080/?server=some_url => ws://localhost:8080 - let server = window.location.href; - server = server.replace("http://", "ws://"); - server = server.split("?")[0]; - if (server.endsWith("/")) server = server.slice(0, -1); - return server; - } - const servers = new URLSearchParams(window.location.search).getAll( - searchParamKey - ); - const initialServer = - servers.length >= 1 ? servers[0] : getDefaultServerFromUrl(); - - // Values that can be globally accessed by components in a viewer. - const viewer: ViewerContextContents = { - useSceneTree: useSceneTreeState(), - useGui: useGuiState(initialServer), - websocketRef: React.useRef(null), - canvasRef: React.useRef(null), - sceneRef: React.useRef(null), - cameraRef: React.useRef(null), - cameraControlRef: React.useRef(null), - // Scene node attributes that aren't placed in the zustand state, for performance reasons. - nodeAttributesFromName: React.useRef({}), - }; - const fixed_sidebar = viewer.useGui((state) => state.theme.fixed_sidebar); - return ( - - - - - - ({ - top: 0, - bottom: 0, - left: 0, - right: fixed_sidebar ? "20em" : 0, - position: "absolute", - backgroundColor: - theme.colorScheme === "light" ? "#fff" : theme.colors.dark[9], - })} - > - - - - - - - ); -} - -function Panel(props: { fixed_sidebar: boolean }) { - const theme = useMantineTheme(); - const smQuery = useMediaQuery(`(max-width: ${theme.breakpoints.sm})`); - if (smQuery) { - return ( - - - - - - - - - ); - } else if (props.fixed_sidebar) { - return ( - - ); - } else { - return ( - - - - - - - - - ); - } -} - -function ViewerCanvas() { - const viewer = React.useContext(ViewerContext)!; - return ( - - - - - - - - - - - - - - ); -} - -/** Component for helping us set the scene reference. */ -function SceneContextSetter() { - const { sceneRef, cameraRef } = React.useContext(ViewerContext)!; - sceneRef.current = useThree((state) => state.scene); - cameraRef.current = useThree( - (state) => state.camera as THREE.PerspectiveCamera - ); - return <>; -} - -function Root() { - return ( - - - - - - ); -} - -createRoot(document.getElementById("root") as HTMLElement).render(); diff --git a/viser/client/vite.config.ts b/viser/client/vite.config.ts index fdc38c5a8..a5459efb0 100644 --- a/viser/client/vite.config.ts +++ b/viser/client/vite.config.ts @@ -9,7 +9,8 @@ import browserslistToEsbuild from 'browserslist-to-esbuild' export default defineConfig({ plugins: [react(), eslint(), viteTsconfigPaths(), svgrPlugin()], server: { - port: 3000 + port: 3000, + hmr: { port: 1025 } }, build: { outDir: 'build', diff --git a/viser/client/yarn.lock b/viser/client/yarn.lock index 07840bc39..83e0209dc 100644 --- a/viser/client/yarn.lock +++ b/viser/client/yarn.lock @@ -1755,6 +1755,11 @@ escape-string-regexp@^4.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== +eslint-plugin-react-refresh@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.4.1.tgz#e61a1ee4e06180f07ab753fa6fd173b4d8df95ec" + integrity sha512-QgrvtRJkmV+m4w953LS146+6RwEe5waouubFVNLBfOjXJf6MLczjymO8fOcKj9jMS8aKkTCMJqiPu2WEeFI99A== + eslint-plugin-react@^7.32.2: version "7.32.2" resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.32.2.tgz#e71f21c7c265ebce01bcbc9d0955170c55571f10"