@zuplo/cli 1.87.0 → 1.88.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="5edc969f-4bac-5407-9c30-62b86cd293e3")}catch(e){}}();
3
- var FN=Object.defineProperty;var HN=(e,t,n)=>t in e?FN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var se=(e,t,n)=>(HN(e,typeof t!="symbol"?t+"":t,n),n),gd=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var Y=(e,t,n)=>(gd(e,t,"read from private field"),n?n.call(e):t.get(e)),Et=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Ye=(e,t,n,r)=>(gd(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var Li=(e,t,n)=>(gd(e,t,"access private method"),n);function WN(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.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 a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function sl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Y0={exports:{}},Hu={},Q0={exports:{}},ye={};/**
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="aee89485-cf69-52ad-a454-730d4ed42d1e")}catch(e){}}();
3
+ var FS=Object.defineProperty;var HS=(e,t,n)=>t in e?FS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var se=(e,t,n)=>(HS(e,typeof t!="symbol"?t+"":t,n),n),gd=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var Y=(e,t,n)=>(gd(e,t,"read from private field"),n?n.call(e):t.get(e)),Et=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Ye=(e,t,n,r)=>(gd(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var Pi=(e,t,n)=>(gd(e,t,"access private method"),n);function GS(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.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 a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function sl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Y0={exports:{}},Hu={},Q0={exports:{}},ye={};/**
4
4
  * @license React
5
5
  * react.production.min.js
6
6
  *
@@ -8,7 +8,7 @@ var FN=Object.defineProperty;var HN=(e,t,n)=>t in e?FN(e,t,{enumerable:!0,config
8
8
  *
9
9
  * This source code is licensed under the MIT license found in the
10
10
  * LICENSE file in the root directory of this source tree.
11
- */var ul=Symbol.for("react.element"),GN=Symbol.for("react.portal"),VN=Symbol.for("react.fragment"),ZN=Symbol.for("react.strict_mode"),YN=Symbol.for("react.profiler"),QN=Symbol.for("react.provider"),JN=Symbol.for("react.context"),XN=Symbol.for("react.forward_ref"),qN=Symbol.for("react.suspense"),KN=Symbol.for("react.memo"),eD=Symbol.for("react.lazy"),wh=Symbol.iterator;function tD(e){return e===null||typeof e!="object"?null:(e=wh&&e[wh]||e["@@iterator"],typeof e=="function"?e:null)}var J0={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},X0=Object.assign,q0={};function Ao(e,t,n){this.props=e,this.context=t,this.refs=q0,this.updater=n||J0}Ao.prototype.isReactComponent={};Ao.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ao.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function K0(){}K0.prototype=Ao.prototype;function qp(e,t,n){this.props=e,this.context=t,this.refs=q0,this.updater=n||J0}var Kp=qp.prototype=new K0;Kp.constructor=qp;X0(Kp,Ao.prototype);Kp.isPureReactComponent=!0;var bh=Array.isArray,eI=Object.prototype.hasOwnProperty,em={current:null},tI={key:!0,ref:!0,__self:!0,__source:!0};function nI(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)eI.call(t,r)&&!tI.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1<l){for(var s=Array(l),u=0;u<l;u++)s[u]=arguments[u+2];i.children=s}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)i[r]===void 0&&(i[r]=l[r]);return{$$typeof:ul,type:e,key:o,ref:a,props:i,_owner:em.current}}function nD(e,t){return{$$typeof:ul,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function tm(e){return typeof e=="object"&&e!==null&&e.$$typeof===ul}function rD(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var xh=/\/+/g;function hd(e,t){return typeof e=="object"&&e!==null&&e.key!=null?rD(""+e.key):t.toString(36)}function Ns(e,t,n,r,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case ul:case GN:a=!0}}if(a)return a=e,i=i(a),e=r===""?"."+hd(a,0):r,bh(i)?(n="",e!=null&&(n=e.replace(xh,"$&/")+"/"),Ns(i,t,n,"",function(u){return u})):i!=null&&(tm(i)&&(i=nD(i,n+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(xh,"$&/")+"/")+e)),t.push(i)),1;if(a=0,r=r===""?".":r+":",bh(e))for(var l=0;l<e.length;l++){o=e[l];var s=r+hd(o,l);a+=Ns(o,t,n,s,i)}else if(s=tD(e),typeof s=="function")for(e=s.call(e),l=0;!(o=e.next()).done;)o=o.value,s=r+hd(o,l++),a+=Ns(o,t,n,s,i);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function Gl(e,t,n){if(e==null)return e;var r=[],i=0;return Ns(e,r,"","",function(o){return t.call(n,o,i++)}),r}function iD(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Rt={current:null},Ds={transition:null},oD={ReactCurrentDispatcher:Rt,ReactCurrentBatchConfig:Ds,ReactCurrentOwner:em};ye.Children={map:Gl,forEach:function(e,t,n){Gl(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Gl(e,function(){t++}),t},toArray:function(e){return Gl(e,function(t){return t})||[]},only:function(e){if(!tm(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ye.Component=Ao;ye.Fragment=VN;ye.Profiler=YN;ye.PureComponent=qp;ye.StrictMode=ZN;ye.Suspense=qN;ye.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=oD;ye.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=X0({},e.props),i=e.key,o=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,a=em.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(s in t)eI.call(t,s)&&!tI.hasOwnProperty(s)&&(r[s]=t[s]===void 0&&l!==void 0?l[s]:t[s])}var s=arguments.length-2;if(s===1)r.children=n;else if(1<s){l=Array(s);for(var u=0;u<s;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:ul,type:e.type,key:i,ref:o,props:r,_owner:a}};ye.createContext=function(e){return e={$$typeof:JN,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:QN,_context:e},e.Consumer=e};ye.createElement=nI;ye.createFactory=function(e){var t=nI.bind(null,e);return t.type=e,t};ye.createRef=function(){return{current:null}};ye.forwardRef=function(e){return{$$typeof:XN,render:e}};ye.isValidElement=tm;ye.lazy=function(e){return{$$typeof:eD,_payload:{_status:-1,_result:e},_init:iD}};ye.memo=function(e,t){return{$$typeof:KN,type:e,compare:t===void 0?null:t}};ye.startTransition=function(e){var t=Ds.transition;Ds.transition={};try{e()}finally{Ds.transition=t}};ye.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};ye.useCallback=function(e,t){return Rt.current.useCallback(e,t)};ye.useContext=function(e){return Rt.current.useContext(e)};ye.useDebugValue=function(){};ye.useDeferredValue=function(e){return Rt.current.useDeferredValue(e)};ye.useEffect=function(e,t){return Rt.current.useEffect(e,t)};ye.useId=function(){return Rt.current.useId()};ye.useImperativeHandle=function(e,t,n){return Rt.current.useImperativeHandle(e,t,n)};ye.useInsertionEffect=function(e,t){return Rt.current.useInsertionEffect(e,t)};ye.useLayoutEffect=function(e,t){return Rt.current.useLayoutEffect(e,t)};ye.useMemo=function(e,t){return Rt.current.useMemo(e,t)};ye.useReducer=function(e,t,n){return Rt.current.useReducer(e,t,n)};ye.useRef=function(e){return Rt.current.useRef(e)};ye.useState=function(e){return Rt.current.useState(e)};ye.useSyncExternalStore=function(e,t,n){return Rt.current.useSyncExternalStore(e,t,n)};ye.useTransition=function(){return Rt.current.useTransition()};ye.version="18.2.0";Q0.exports=ye;var v=Q0.exports;const k=sl(v),lo=WN({__proto__:null,default:k},[v]);/**
11
+ */var ul=Symbol.for("react.element"),WS=Symbol.for("react.portal"),VS=Symbol.for("react.fragment"),ZS=Symbol.for("react.strict_mode"),YS=Symbol.for("react.profiler"),QS=Symbol.for("react.provider"),JS=Symbol.for("react.context"),XS=Symbol.for("react.forward_ref"),qS=Symbol.for("react.suspense"),KS=Symbol.for("react.memo"),eD=Symbol.for("react.lazy"),wh=Symbol.iterator;function tD(e){return e===null||typeof e!="object"?null:(e=wh&&e[wh]||e["@@iterator"],typeof e=="function"?e:null)}var J0={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},X0=Object.assign,q0={};function Ao(e,t,n){this.props=e,this.context=t,this.refs=q0,this.updater=n||J0}Ao.prototype.isReactComponent={};Ao.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ao.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function K0(){}K0.prototype=Ao.prototype;function qp(e,t,n){this.props=e,this.context=t,this.refs=q0,this.updater=n||J0}var Kp=qp.prototype=new K0;Kp.constructor=qp;X0(Kp,Ao.prototype);Kp.isPureReactComponent=!0;var Mh=Array.isArray,eI=Object.prototype.hasOwnProperty,em={current:null},tI={key:!0,ref:!0,__self:!0,__source:!0};function nI(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)eI.call(t,r)&&!tI.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1<l){for(var s=Array(l),u=0;u<l;u++)s[u]=arguments[u+2];i.children=s}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)i[r]===void 0&&(i[r]=l[r]);return{$$typeof:ul,type:e,key:o,ref:a,props:i,_owner:em.current}}function nD(e,t){return{$$typeof:ul,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function tm(e){return typeof e=="object"&&e!==null&&e.$$typeof===ul}function rD(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var xh=/\/+/g;function hd(e,t){return typeof e=="object"&&e!==null&&e.key!=null?rD(""+e.key):t.toString(36)}function Ss(e,t,n,r,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case ul:case WS:a=!0}}if(a)return a=e,i=i(a),e=r===""?"."+hd(a,0):r,Mh(i)?(n="",e!=null&&(n=e.replace(xh,"$&/")+"/"),Ss(i,t,n,"",function(u){return u})):i!=null&&(tm(i)&&(i=nD(i,n+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(xh,"$&/")+"/")+e)),t.push(i)),1;if(a=0,r=r===""?".":r+":",Mh(e))for(var l=0;l<e.length;l++){o=e[l];var s=r+hd(o,l);a+=Ss(o,t,n,s,i)}else if(s=tD(e),typeof s=="function")for(e=s.call(e),l=0;!(o=e.next()).done;)o=o.value,s=r+hd(o,l++),a+=Ss(o,t,n,s,i);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function Wl(e,t,n){if(e==null)return e;var r=[],i=0;return Ss(e,r,"","",function(o){return t.call(n,o,i++)}),r}function iD(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Rt={current:null},Ds={transition:null},oD={ReactCurrentDispatcher:Rt,ReactCurrentBatchConfig:Ds,ReactCurrentOwner:em};ye.Children={map:Wl,forEach:function(e,t,n){Wl(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Wl(e,function(){t++}),t},toArray:function(e){return Wl(e,function(t){return t})||[]},only:function(e){if(!tm(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ye.Component=Ao;ye.Fragment=VS;ye.Profiler=YS;ye.PureComponent=qp;ye.StrictMode=ZS;ye.Suspense=qS;ye.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=oD;ye.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=X0({},e.props),i=e.key,o=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,a=em.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(s in t)eI.call(t,s)&&!tI.hasOwnProperty(s)&&(r[s]=t[s]===void 0&&l!==void 0?l[s]:t[s])}var s=arguments.length-2;if(s===1)r.children=n;else if(1<s){l=Array(s);for(var u=0;u<s;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:ul,type:e.type,key:i,ref:o,props:r,_owner:a}};ye.createContext=function(e){return e={$$typeof:JS,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:QS,_context:e},e.Consumer=e};ye.createElement=nI;ye.createFactory=function(e){var t=nI.bind(null,e);return t.type=e,t};ye.createRef=function(){return{current:null}};ye.forwardRef=function(e){return{$$typeof:XS,render:e}};ye.isValidElement=tm;ye.lazy=function(e){return{$$typeof:eD,_payload:{_status:-1,_result:e},_init:iD}};ye.memo=function(e,t){return{$$typeof:KS,type:e,compare:t===void 0?null:t}};ye.startTransition=function(e){var t=Ds.transition;Ds.transition={};try{e()}finally{Ds.transition=t}};ye.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};ye.useCallback=function(e,t){return Rt.current.useCallback(e,t)};ye.useContext=function(e){return Rt.current.useContext(e)};ye.useDebugValue=function(){};ye.useDeferredValue=function(e){return Rt.current.useDeferredValue(e)};ye.useEffect=function(e,t){return Rt.current.useEffect(e,t)};ye.useId=function(){return Rt.current.useId()};ye.useImperativeHandle=function(e,t,n){return Rt.current.useImperativeHandle(e,t,n)};ye.useInsertionEffect=function(e,t){return Rt.current.useInsertionEffect(e,t)};ye.useLayoutEffect=function(e,t){return Rt.current.useLayoutEffect(e,t)};ye.useMemo=function(e,t){return Rt.current.useMemo(e,t)};ye.useReducer=function(e,t,n){return Rt.current.useReducer(e,t,n)};ye.useRef=function(e){return Rt.current.useRef(e)};ye.useState=function(e){return Rt.current.useState(e)};ye.useSyncExternalStore=function(e,t,n){return Rt.current.useSyncExternalStore(e,t,n)};ye.useTransition=function(){return Rt.current.useTransition()};ye.version="18.2.0";Q0.exports=ye;var v=Q0.exports;const k=sl(v),lo=GS({__proto__:null,default:k},[v]);/**
12
12
  * @license React
13
13
  * react-jsx-runtime.production.min.js
14
14
  *
@@ -24,7 +24,7 @@ var FN=Object.defineProperty;var HN=(e,t,n)=>t in e?FN(e,t,{enumerable:!0,config
24
24
  *
25
25
  * This source code is licensed under the MIT license found in the
26
26
  * LICENSE file in the root directory of this source tree.
27
- */(function(e){function t(P,B){var F=P.length;P.push(B);e:for(;0<F;){var V=F-1>>>1,D=P[V];if(0<i(D,B))P[V]=B,P[F]=D,F=V;else break e}}function n(P){return P.length===0?null:P[0]}function r(P){if(P.length===0)return null;var B=P[0],F=P.pop();if(F!==B){P[0]=F;e:for(var V=0,D=P.length,E=D>>>1;V<E;){var T=2*(V+1)-1,z=P[T],_=T+1,ie=P[_];if(0>i(z,F))_<D&&0>i(ie,z)?(P[V]=ie,P[_]=F,V=_):(P[V]=z,P[T]=F,V=T);else if(_<D&&0>i(ie,F))P[V]=ie,P[_]=F,V=_;else break e}}return B}function i(P,B){var F=P.sortIndex-B.sortIndex;return F!==0?F:P.id-B.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var s=[],u=[],c=1,d=null,f=3,p=!1,g=!1,h=!1,w=typeof setTimeout=="function"?setTimeout:null,I=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(P){for(var B=n(u);B!==null;){if(B.callback===null)r(u);else if(B.startTime<=P)r(u),B.sortIndex=B.expirationTime,t(s,B);else break;B=n(u)}}function x(P){if(h=!1,b(P),!g)if(n(s)!==null)g=!0,$(N);else{var B=n(u);B!==null&&ee(x,B.startTime-P)}}function N(P,B){g=!1,h&&(h=!1,I(C),C=-1),p=!0;var F=f;try{for(b(B),d=n(s);d!==null&&(!(d.expirationTime>B)||P&&!O());){var V=d.callback;if(typeof V=="function"){d.callback=null,f=d.priorityLevel;var D=V(d.expirationTime<=B);B=e.unstable_now(),typeof D=="function"?d.callback=D:d===n(s)&&r(s),b(B)}else r(s);d=n(s)}if(d!==null)var E=!0;else{var T=n(u);T!==null&&ee(x,T.startTime-B),E=!1}return E}finally{d=null,f=F,p=!1}}var M=!1,S=null,C=-1,L=5,R=-1;function O(){return!(e.unstable_now()-R<L)}function J(){if(S!==null){var P=e.unstable_now();R=P;var B=!0;try{B=S(!0,P)}finally{B?U():(M=!1,S=null)}}else M=!1}var U;if(typeof y=="function")U=function(){y(J)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,Z=G.port2;G.port1.onmessage=J,U=function(){Z.postMessage(null)}}else U=function(){w(J,0)};function $(P){S=P,M||(M=!0,U())}function ee(P,B){C=w(function(){P(e.unstable_now())},B)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(P){P.callback=null},e.unstable_continueExecution=function(){g||p||(g=!0,$(N))},e.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<P?Math.floor(1e3/P):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(s)},e.unstable_next=function(P){switch(f){case 1:case 2:case 3:var B=3;break;default:B=f}var F=f;f=B;try{return P()}finally{f=F}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(P,B){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var F=f;f=P;try{return B()}finally{f=F}},e.unstable_scheduleCallback=function(P,B,F){var V=e.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?V+F:V):F=V,P){case 1:var D=-1;break;case 2:D=250;break;case 5:D=1073741823;break;case 4:D=1e4;break;default:D=5e3}return D=F+D,P={id:c++,callback:B,priorityLevel:P,startTime:F,expirationTime:D,sortIndex:-1},F>V?(P.sortIndex=F,t(u,P),n(s)===null&&P===n(u)&&(h?(I(C),C=-1):h=!0,ee(x,F-V))):(P.sortIndex=D,t(s,P),g||p||(g=!0,$(N))),P},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(P){var B=f;return function(){var F=f;f=B;try{return P.apply(this,arguments)}finally{f=F}}}})(aI);oI.exports=aI;var fD=oI.exports;/**
27
+ */(function(e){function t(L,B){var F=L.length;L.push(B);e:for(;0<F;){var V=F-1>>>1,D=L[V];if(0<i(D,B))L[V]=B,L[F]=D,F=V;else break e}}function n(L){return L.length===0?null:L[0]}function r(L){if(L.length===0)return null;var B=L[0],F=L.pop();if(F!==B){L[0]=F;e:for(var V=0,D=L.length,E=D>>>1;V<E;){var T=2*(V+1)-1,z=L[T],_=T+1,ie=L[_];if(0>i(z,F))_<D&&0>i(ie,z)?(L[V]=ie,L[_]=F,V=_):(L[V]=z,L[T]=F,V=T);else if(_<D&&0>i(ie,F))L[V]=ie,L[_]=F,V=_;else break e}}return B}function i(L,B){var F=L.sortIndex-B.sortIndex;return F!==0?F:L.id-B.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var s=[],u=[],c=1,d=null,f=3,p=!1,g=!1,h=!1,w=typeof setTimeout=="function"?setTimeout:null,I=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function M(L){for(var B=n(u);B!==null;){if(B.callback===null)r(u);else if(B.startTime<=L)r(u),B.sortIndex=B.expirationTime,t(s,B);else break;B=n(u)}}function x(L){if(h=!1,M(L),!g)if(n(s)!==null)g=!0,$(S);else{var B=n(u);B!==null&&ee(x,B.startTime-L)}}function S(L,B){g=!1,h&&(h=!1,I(C),C=-1),p=!0;var F=f;try{for(M(B),d=n(s);d!==null&&(!(d.expirationTime>B)||L&&!O());){var V=d.callback;if(typeof V=="function"){d.callback=null,f=d.priorityLevel;var D=V(d.expirationTime<=B);B=e.unstable_now(),typeof D=="function"?d.callback=D:d===n(s)&&r(s),M(B)}else r(s);d=n(s)}if(d!==null)var E=!0;else{var T=n(u);T!==null&&ee(x,T.startTime-B),E=!1}return E}finally{d=null,f=F,p=!1}}var b=!1,N=null,C=-1,P=5,R=-1;function O(){return!(e.unstable_now()-R<P)}function J(){if(N!==null){var L=e.unstable_now();R=L;var B=!0;try{B=N(!0,L)}finally{B?U():(b=!1,N=null)}}else b=!1}var U;if(typeof y=="function")U=function(){y(J)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,Z=W.port2;W.port1.onmessage=J,U=function(){Z.postMessage(null)}}else U=function(){w(J,0)};function $(L){N=L,b||(b=!0,U())}function ee(L,B){C=w(function(){L(e.unstable_now())},B)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(L){L.callback=null},e.unstable_continueExecution=function(){g||p||(g=!0,$(S))},e.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<L?Math.floor(1e3/L):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(s)},e.unstable_next=function(L){switch(f){case 1:case 2:case 3:var B=3;break;default:B=f}var F=f;f=B;try{return L()}finally{f=F}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(L,B){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var F=f;f=L;try{return B()}finally{f=F}},e.unstable_scheduleCallback=function(L,B,F){var V=e.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?V+F:V):F=V,L){case 1:var D=-1;break;case 2:D=250;break;case 5:D=1073741823;break;case 4:D=1e4;break;default:D=5e3}return D=F+D,L={id:c++,callback:B,priorityLevel:L,startTime:F,expirationTime:D,sortIndex:-1},F>V?(L.sortIndex=F,t(u,L),n(s)===null&&L===n(u)&&(h?(I(C),C=-1):h=!0,ee(x,F-V))):(L.sortIndex=D,t(s,L),g||p||(g=!0,$(S))),L},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(L){var B=f;return function(){var F=f;f=B;try{return L.apply(this,arguments)}finally{f=F}}}})(aI);oI.exports=aI;var fD=oI.exports;/**
28
28
  * @license React
29
29
  * react-dom.production.min.js
30
30
  *
@@ -32,31 +32,31 @@ var FN=Object.defineProperty;var HN=(e,t,n)=>t in e?FN(e,t,{enumerable:!0,config
32
32
  *
33
33
  * This source code is licensed under the MIT license found in the
34
34
  * LICENSE file in the root directory of this source tree.
35
- */var lI=v,rn=fD;function W(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var sI=new Set,ja={};function Di(e,t){so(e,t),so(e+"Capture",t)}function so(e,t){for(ja[e]=t,e=0;e<t.length;e++)sI.add(t[e])}var ar=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Cf=Object.prototype.hasOwnProperty,pD=/^[: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]*$/,Mh={},Sh={};function mD(e){return Cf.call(Sh,e)?!0:Cf.call(Mh,e)?!1:pD.test(e)?Sh[e]=!0:(Mh[e]=!0,!1)}function gD(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function hD(e,t,n,r){if(t===null||typeof t>"u"||gD(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ot(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var It={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){It[e]=new Ot(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];It[t]=new Ot(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){It[e]=new Ot(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){It[e]=new Ot(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){It[e]=new Ot(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){It[e]=new Ot(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){It[e]=new Ot(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){It[e]=new Ot(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){It[e]=new Ot(e,5,!1,e.toLowerCase(),null,!1,!1)});var nm=/[\-:]([a-z])/g;function rm(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(nm,rm);It[t]=new Ot(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(nm,rm);It[t]=new Ot(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(nm,rm);It[t]=new Ot(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){It[e]=new Ot(e,1,!1,e.toLowerCase(),null,!1,!1)});It.xlinkHref=new Ot("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){It[e]=new Ot(e,1,!1,e.toLowerCase(),null,!0,!0)});function im(e,t,n,r){var i=It.hasOwnProperty(t)?It[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(hD(t,n,i,r)&&(n=null),r||i===null?mD(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var dr=lI.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Vl=Symbol.for("react.element"),zi=Symbol.for("react.portal"),Bi=Symbol.for("react.fragment"),om=Symbol.for("react.strict_mode"),Ef=Symbol.for("react.profiler"),uI=Symbol.for("react.provider"),cI=Symbol.for("react.context"),am=Symbol.for("react.forward_ref"),Tf=Symbol.for("react.suspense"),jf=Symbol.for("react.suspense_list"),lm=Symbol.for("react.memo"),gr=Symbol.for("react.lazy"),dI=Symbol.for("react.offscreen"),Nh=Symbol.iterator;function $o(e){return e===null||typeof e!="object"?null:(e=Nh&&e[Nh]||e["@@iterator"],typeof e=="function"?e:null)}var Fe=Object.assign,vd;function aa(e){if(vd===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);vd=t&&t[1]||""}return`
35
+ */var lI=v,rn=fD;function G(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var sI=new Set,ja={};function Di(e,t){so(e,t),so(e+"Capture",t)}function so(e,t){for(ja[e]=t,e=0;e<t.length;e++)sI.add(t[e])}var ar=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Cf=Object.prototype.hasOwnProperty,pD=/^[: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]*$/,bh={},Nh={};function mD(e){return Cf.call(Nh,e)?!0:Cf.call(bh,e)?!1:pD.test(e)?Nh[e]=!0:(bh[e]=!0,!1)}function gD(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function hD(e,t,n,r){if(t===null||typeof t>"u"||gD(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ot(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var It={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){It[e]=new Ot(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];It[t]=new Ot(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){It[e]=new Ot(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){It[e]=new Ot(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){It[e]=new Ot(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){It[e]=new Ot(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){It[e]=new Ot(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){It[e]=new Ot(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){It[e]=new Ot(e,5,!1,e.toLowerCase(),null,!1,!1)});var nm=/[\-:]([a-z])/g;function rm(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(nm,rm);It[t]=new Ot(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(nm,rm);It[t]=new Ot(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(nm,rm);It[t]=new Ot(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){It[e]=new Ot(e,1,!1,e.toLowerCase(),null,!1,!1)});It.xlinkHref=new Ot("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){It[e]=new Ot(e,1,!1,e.toLowerCase(),null,!0,!0)});function im(e,t,n,r){var i=It.hasOwnProperty(t)?It[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(hD(t,n,i,r)&&(n=null),r||i===null?mD(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var dr=lI.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Vl=Symbol.for("react.element"),zi=Symbol.for("react.portal"),Bi=Symbol.for("react.fragment"),om=Symbol.for("react.strict_mode"),Ef=Symbol.for("react.profiler"),uI=Symbol.for("react.provider"),cI=Symbol.for("react.context"),am=Symbol.for("react.forward_ref"),Tf=Symbol.for("react.suspense"),jf=Symbol.for("react.suspense_list"),lm=Symbol.for("react.memo"),gr=Symbol.for("react.lazy"),dI=Symbol.for("react.offscreen"),Sh=Symbol.iterator;function $o(e){return e===null||typeof e!="object"?null:(e=Sh&&e[Sh]||e["@@iterator"],typeof e=="function"?e:null)}var Fe=Object.assign,vd;function aa(e){if(vd===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);vd=t&&t[1]||""}return`
36
36
  `+vd+e}var yd=!1;function Id(e,t){if(!e||yd)return"";yd=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
37
37
  `),o=r.stack.split(`
38
38
  `),a=i.length-1,l=o.length-1;1<=a&&0<=l&&i[a]!==o[l];)l--;for(;1<=a&&0<=l;a--,l--)if(i[a]!==o[l]){if(a!==1||l!==1)do if(a--,l--,0>l||i[a]!==o[l]){var s=`
39
- `+i[a].replace(" at new "," at ");return e.displayName&&s.includes("<anonymous>")&&(s=s.replace("<anonymous>",e.displayName)),s}while(1<=a&&0<=l);break}}}finally{yd=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?aa(e):""}function vD(e){switch(e.tag){case 5:return aa(e.type);case 16:return aa("Lazy");case 13:return aa("Suspense");case 19:return aa("SuspenseList");case 0:case 2:case 15:return e=Id(e.type,!1),e;case 11:return e=Id(e.type.render,!1),e;case 1:return e=Id(e.type,!0),e;default:return""}}function Pf(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Bi:return"Fragment";case zi:return"Portal";case Ef:return"Profiler";case om:return"StrictMode";case Tf:return"Suspense";case jf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case cI:return(e.displayName||"Context")+".Consumer";case uI:return(e._context.displayName||"Context")+".Provider";case am:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case lm:return t=e.displayName||null,t!==null?t:Pf(e.type)||"Memo";case gr:t=e._payload,e=e._init;try{return Pf(e(t))}catch{}}return null}function yD(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Pf(t);case 8:return t===om?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Ur(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function fI(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ID(e){var t=fI(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Zl(e){e._valueTracker||(e._valueTracker=ID(e))}function pI(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=fI(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Gs(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Lf(e,t){var n=t.checked;return Fe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Dh(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ur(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function mI(e,t){t=t.checked,t!=null&&im(e,"checked",t,!1)}function Rf(e,t){mI(e,t);var n=Ur(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Of(e,t.type,n):t.hasOwnProperty("defaultValue")&&Of(e,t.type,Ur(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ah(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Of(e,t,n){(t!=="number"||Gs(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var la=Array.isArray;function Xi(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Ur(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function kf(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(W(91));return Fe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ch(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(W(92));if(la(n)){if(1<n.length)throw Error(W(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Ur(n)}}function gI(e,t){var n=Ur(t.value),r=Ur(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Eh(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function hI(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function zf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?hI(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Yl,vI=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Yl=Yl||document.createElement("div"),Yl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Yl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Pa(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ma={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},wD=["Webkit","ms","Moz","O"];Object.keys(ma).forEach(function(e){wD.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ma[t]=ma[e]})});function yI(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ma.hasOwnProperty(e)&&ma[e]?(""+t).trim():t+"px"}function II(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=yI(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var bD=Fe({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 Bf(e,t){if(t){if(bD[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(W(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(W(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(W(61))}if(t.style!=null&&typeof t.style!="object")throw Error(W(62))}}function Uf(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var $f=null;function sm(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var _f=null,qi=null,Ki=null;function Th(e){if(e=fl(e)){if(typeof _f!="function")throw Error(W(280));var t=e.stateNode;t&&(t=Yu(t),_f(e.stateNode,e.type,t))}}function wI(e){qi?Ki?Ki.push(e):Ki=[e]:qi=e}function bI(){if(qi){var e=qi,t=Ki;if(Ki=qi=null,Th(e),t)for(e=0;e<t.length;e++)Th(t[e])}}function xI(e,t){return e(t)}function MI(){}var wd=!1;function SI(e,t,n){if(wd)return e(t,n);wd=!0;try{return xI(e,t,n)}finally{wd=!1,(qi!==null||Ki!==null)&&(MI(),bI())}}function La(e,t){var n=e.stateNode;if(n===null)return null;var r=Yu(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(W(231,t,typeof n));return n}var Ff=!1;if(ar)try{var _o={};Object.defineProperty(_o,"passive",{get:function(){Ff=!0}}),window.addEventListener("test",_o,_o),window.removeEventListener("test",_o,_o)}catch{Ff=!1}function xD(e,t,n,r,i,o,a,l,s){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var ga=!1,Vs=null,Zs=!1,Hf=null,MD={onError:function(e){ga=!0,Vs=e}};function SD(e,t,n,r,i,o,a,l,s){ga=!1,Vs=null,xD.apply(MD,arguments)}function ND(e,t,n,r,i,o,a,l,s){if(SD.apply(this,arguments),ga){if(ga){var u=Vs;ga=!1,Vs=null}else throw Error(W(198));Zs||(Zs=!0,Hf=u)}}function Ai(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function NI(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function jh(e){if(Ai(e)!==e)throw Error(W(188))}function DD(e){var t=e.alternate;if(!t){if(t=Ai(e),t===null)throw Error(W(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return jh(i),e;if(o===r)return jh(i),t;o=o.sibling}throw Error(W(188))}if(n.return!==r.return)n=i,r=o;else{for(var a=!1,l=i.child;l;){if(l===n){a=!0,n=i,r=o;break}if(l===r){a=!0,r=i,n=o;break}l=l.sibling}if(!a){for(l=o.child;l;){if(l===n){a=!0,n=o,r=i;break}if(l===r){a=!0,r=o,n=i;break}l=l.sibling}if(!a)throw Error(W(189))}}if(n.alternate!==r)throw Error(W(190))}if(n.tag!==3)throw Error(W(188));return n.stateNode.current===n?e:t}function DI(e){return e=DD(e),e!==null?AI(e):null}function AI(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=AI(e);if(t!==null)return t;e=e.sibling}return null}var CI=rn.unstable_scheduleCallback,Ph=rn.unstable_cancelCallback,AD=rn.unstable_shouldYield,CD=rn.unstable_requestPaint,Qe=rn.unstable_now,ED=rn.unstable_getCurrentPriorityLevel,um=rn.unstable_ImmediatePriority,EI=rn.unstable_UserBlockingPriority,Ys=rn.unstable_NormalPriority,TD=rn.unstable_LowPriority,TI=rn.unstable_IdlePriority,Wu=null,Fn=null;function jD(e){if(Fn&&typeof Fn.onCommitFiberRoot=="function")try{Fn.onCommitFiberRoot(Wu,e,void 0,(e.current.flags&128)===128)}catch{}}var jn=Math.clz32?Math.clz32:RD,PD=Math.log,LD=Math.LN2;function RD(e){return e>>>=0,e===0?32:31-(PD(e)/LD|0)|0}var Ql=64,Jl=4194304;function sa(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Qs(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var l=a&~i;l!==0?r=sa(l):(o&=a,o!==0&&(r=sa(o)))}else a=n&~i,a!==0?r=sa(a):o!==0&&(r=sa(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-jn(t),i=1<<n,r|=e[n],t&=~i;return r}function OD(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function kD(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-jn(o),l=1<<a,s=i[a];s===-1?(!(l&n)||l&r)&&(i[a]=OD(l,t)):s<=t&&(e.expiredLanes|=l),o&=~l}}function Wf(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function jI(){var e=Ql;return Ql<<=1,!(Ql&4194240)&&(Ql=64),e}function bd(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function cl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-jn(t),e[t]=n}function zD(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-jn(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}function cm(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-jn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Ne=0;function PI(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var LI,dm,RI,OI,kI,Gf=!1,Xl=[],Ar=null,Cr=null,Er=null,Ra=new Map,Oa=new Map,yr=[],BD="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Lh(e,t){switch(e){case"focusin":case"focusout":Ar=null;break;case"dragenter":case"dragleave":Cr=null;break;case"mouseover":case"mouseout":Er=null;break;case"pointerover":case"pointerout":Ra.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Oa.delete(t.pointerId)}}function Fo(e,t,n,r,i,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},t!==null&&(t=fl(t),t!==null&&dm(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function UD(e,t,n,r,i){switch(t){case"focusin":return Ar=Fo(Ar,e,t,n,r,i),!0;case"dragenter":return Cr=Fo(Cr,e,t,n,r,i),!0;case"mouseover":return Er=Fo(Er,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Ra.set(o,Fo(Ra.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Oa.set(o,Fo(Oa.get(o)||null,e,t,n,r,i)),!0}return!1}function zI(e){var t=ii(e.target);if(t!==null){var n=Ai(t);if(n!==null){if(t=n.tag,t===13){if(t=NI(n),t!==null){e.blockedOn=t,kI(e.priority,function(){RI(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function As(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Vf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);$f=r,n.target.dispatchEvent(r),$f=null}else return t=fl(n),t!==null&&dm(t),e.blockedOn=n,!1;t.shift()}return!0}function Rh(e,t,n){As(e)&&n.delete(t)}function $D(){Gf=!1,Ar!==null&&As(Ar)&&(Ar=null),Cr!==null&&As(Cr)&&(Cr=null),Er!==null&&As(Er)&&(Er=null),Ra.forEach(Rh),Oa.forEach(Rh)}function Ho(e,t){e.blockedOn===t&&(e.blockedOn=null,Gf||(Gf=!0,rn.unstable_scheduleCallback(rn.unstable_NormalPriority,$D)))}function ka(e){function t(i){return Ho(i,e)}if(0<Xl.length){Ho(Xl[0],e);for(var n=1;n<Xl.length;n++){var r=Xl[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Ar!==null&&Ho(Ar,e),Cr!==null&&Ho(Cr,e),Er!==null&&Ho(Er,e),Ra.forEach(t),Oa.forEach(t),n=0;n<yr.length;n++)r=yr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<yr.length&&(n=yr[0],n.blockedOn===null);)zI(n),n.blockedOn===null&&yr.shift()}var eo=dr.ReactCurrentBatchConfig,Js=!0;function _D(e,t,n,r){var i=Ne,o=eo.transition;eo.transition=null;try{Ne=1,fm(e,t,n,r)}finally{Ne=i,eo.transition=o}}function FD(e,t,n,r){var i=Ne,o=eo.transition;eo.transition=null;try{Ne=4,fm(e,t,n,r)}finally{Ne=i,eo.transition=o}}function fm(e,t,n,r){if(Js){var i=Vf(e,t,n,r);if(i===null)jd(e,t,r,Xs,n),Lh(e,r);else if(UD(i,e,t,n,r))r.stopPropagation();else if(Lh(e,r),t&4&&-1<BD.indexOf(e)){for(;i!==null;){var o=fl(i);if(o!==null&&LI(o),o=Vf(e,t,n,r),o===null&&jd(e,t,r,Xs,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else jd(e,t,r,null,n)}}var Xs=null;function Vf(e,t,n,r){if(Xs=null,e=sm(r),e=ii(e),e!==null)if(t=Ai(e),t===null)e=null;else if(n=t.tag,n===13){if(e=NI(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Xs=e,null}function BI(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(ED()){case um:return 1;case EI:return 4;case Ys:case TD:return 16;case TI:return 536870912;default:return 16}default:return 16}}var Mr=null,pm=null,Cs=null;function UI(){if(Cs)return Cs;var e,t=pm,n=t.length,r,i="value"in Mr?Mr.value:Mr.textContent,o=i.length;for(e=0;e<n&&t[e]===i[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===i[o-r];r++);return Cs=i.slice(e,1<r?1-r:void 0)}function Es(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ql(){return!0}function Oh(){return!1}function an(e){function t(n,r,i,o,a){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=a,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(o):o[l]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?ql:Oh,this.isPropagationStopped=Oh,this}return Fe(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=ql)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ql)},persist:function(){},isPersistent:ql}),t}var Co={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mm=an(Co),dl=Fe({},Co,{view:0,detail:0}),HD=an(dl),xd,Md,Wo,Gu=Fe({},dl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:gm,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Wo&&(Wo&&e.type==="mousemove"?(xd=e.screenX-Wo.screenX,Md=e.screenY-Wo.screenY):Md=xd=0,Wo=e),xd)},movementY:function(e){return"movementY"in e?e.movementY:Md}}),kh=an(Gu),WD=Fe({},Gu,{dataTransfer:0}),GD=an(WD),VD=Fe({},dl,{relatedTarget:0}),Sd=an(VD),ZD=Fe({},Co,{animationName:0,elapsedTime:0,pseudoElement:0}),YD=an(ZD),QD=Fe({},Co,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),JD=an(QD),XD=Fe({},Co,{data:0}),zh=an(XD),qD={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},KD={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},eA={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function tA(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=eA[e])?!!t[e]:!1}function gm(){return tA}var nA=Fe({},dl,{key:function(e){if(e.key){var t=qD[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Es(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?KD[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:gm,charCode:function(e){return e.type==="keypress"?Es(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Es(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),rA=an(nA),iA=Fe({},Gu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Bh=an(iA),oA=Fe({},dl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:gm}),aA=an(oA),lA=Fe({},Co,{propertyName:0,elapsedTime:0,pseudoElement:0}),sA=an(lA),uA=Fe({},Gu,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),cA=an(uA),dA=[9,13,27,32],hm=ar&&"CompositionEvent"in window,ha=null;ar&&"documentMode"in document&&(ha=document.documentMode);var fA=ar&&"TextEvent"in window&&!ha,$I=ar&&(!hm||ha&&8<ha&&11>=ha),Uh=String.fromCharCode(32),$h=!1;function _I(e,t){switch(e){case"keyup":return dA.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function FI(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ui=!1;function pA(e,t){switch(e){case"compositionend":return FI(t);case"keypress":return t.which!==32?null:($h=!0,Uh);case"textInput":return e=t.data,e===Uh&&$h?null:e;default:return null}}function mA(e,t){if(Ui)return e==="compositionend"||!hm&&_I(e,t)?(e=UI(),Cs=pm=Mr=null,Ui=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return $I&&t.locale!=="ko"?null:t.data;default:return null}}var gA={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function _h(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!gA[e.type]:t==="textarea"}function HI(e,t,n,r){wI(r),t=qs(t,"onChange"),0<t.length&&(n=new mm("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var va=null,za=null;function hA(e){ew(e,0)}function Vu(e){var t=Fi(e);if(pI(t))return e}function vA(e,t){if(e==="change")return t}var WI=!1;if(ar){var Nd;if(ar){var Dd="oninput"in document;if(!Dd){var Fh=document.createElement("div");Fh.setAttribute("oninput","return;"),Dd=typeof Fh.oninput=="function"}Nd=Dd}else Nd=!1;WI=Nd&&(!document.documentMode||9<document.documentMode)}function Hh(){va&&(va.detachEvent("onpropertychange",GI),za=va=null)}function GI(e){if(e.propertyName==="value"&&Vu(za)){var t=[];HI(t,za,e,sm(e)),SI(hA,t)}}function yA(e,t,n){e==="focusin"?(Hh(),va=t,za=n,va.attachEvent("onpropertychange",GI)):e==="focusout"&&Hh()}function IA(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Vu(za)}function wA(e,t){if(e==="click")return Vu(t)}function bA(e,t){if(e==="input"||e==="change")return Vu(t)}function xA(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ln=typeof Object.is=="function"?Object.is:xA;function Ba(e,t){if(Ln(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Cf.call(t,i)||!Ln(e[i],t[i]))return!1}return!0}function Wh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Gh(e,t){var n=Wh(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Wh(n)}}function VI(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?VI(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ZI(){for(var e=window,t=Gs();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Gs(e.document)}return t}function vm(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function MA(e){var t=ZI(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&VI(n.ownerDocument.documentElement,n)){if(r!==null&&vm(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=Gh(n,o);var a=Gh(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var SA=ar&&"documentMode"in document&&11>=document.documentMode,$i=null,Zf=null,ya=null,Yf=!1;function Vh(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Yf||$i==null||$i!==Gs(r)||(r=$i,"selectionStart"in r&&vm(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}),ya&&Ba(ya,r)||(ya=r,r=qs(Zf,"onSelect"),0<r.length&&(t=new mm("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=$i)))}function Kl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var _i={animationend:Kl("Animation","AnimationEnd"),animationiteration:Kl("Animation","AnimationIteration"),animationstart:Kl("Animation","AnimationStart"),transitionend:Kl("Transition","TransitionEnd")},Ad={},YI={};ar&&(YI=document.createElement("div").style,"AnimationEvent"in window||(delete _i.animationend.animation,delete _i.animationiteration.animation,delete _i.animationstart.animation),"TransitionEvent"in window||delete _i.transitionend.transition);function Zu(e){if(Ad[e])return Ad[e];if(!_i[e])return e;var t=_i[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in YI)return Ad[e]=t[n];return e}var QI=Zu("animationend"),JI=Zu("animationiteration"),XI=Zu("animationstart"),qI=Zu("transitionend"),KI=new Map,Zh="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Hr(e,t){KI.set(e,t),Di(t,[e])}for(var Cd=0;Cd<Zh.length;Cd++){var Ed=Zh[Cd],NA=Ed.toLowerCase(),DA=Ed[0].toUpperCase()+Ed.slice(1);Hr(NA,"on"+DA)}Hr(QI,"onAnimationEnd");Hr(JI,"onAnimationIteration");Hr(XI,"onAnimationStart");Hr("dblclick","onDoubleClick");Hr("focusin","onFocus");Hr("focusout","onBlur");Hr(qI,"onTransitionEnd");so("onMouseEnter",["mouseout","mouseover"]);so("onMouseLeave",["mouseout","mouseover"]);so("onPointerEnter",["pointerout","pointerover"]);so("onPointerLeave",["pointerout","pointerover"]);Di("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Di("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Di("onBeforeInput",["compositionend","keypress","textInput","paste"]);Di("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Di("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Di("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ua="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),AA=new Set("cancel close invalid load scroll toggle".split(" ").concat(ua));function Yh(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,ND(r,t,void 0,e),e.currentTarget=null}function ew(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var l=r[a],s=l.instance,u=l.currentTarget;if(l=l.listener,s!==o&&i.isPropagationStopped())break e;Yh(i,l,u),o=s}else for(a=0;a<r.length;a++){if(l=r[a],s=l.instance,u=l.currentTarget,l=l.listener,s!==o&&i.isPropagationStopped())break e;Yh(i,l,u),o=s}}}if(Zs)throw e=Hf,Zs=!1,Hf=null,e}function Pe(e,t){var n=t[Kf];n===void 0&&(n=t[Kf]=new Set);var r=e+"__bubble";n.has(r)||(tw(t,e,2,!1),n.add(r))}function Td(e,t,n){var r=0;t&&(r|=4),tw(n,e,r,t)}var es="_reactListening"+Math.random().toString(36).slice(2);function Ua(e){if(!e[es]){e[es]=!0,sI.forEach(function(n){n!=="selectionchange"&&(AA.has(n)||Td(n,!1,e),Td(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[es]||(t[es]=!0,Td("selectionchange",!1,t))}}function tw(e,t,n,r){switch(BI(t)){case 1:var i=_D;break;case 4:i=FD;break;default:i=fm}n=i.bind(null,t,n,e),i=void 0,!Ff||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function jd(e,t,n,r,i){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var l=r.stateNode.containerInfo;if(l===i||l.nodeType===8&&l.parentNode===i)break;if(a===4)for(a=r.return;a!==null;){var s=a.tag;if((s===3||s===4)&&(s=a.stateNode.containerInfo,s===i||s.nodeType===8&&s.parentNode===i))return;a=a.return}for(;l!==null;){if(a=ii(l),a===null)return;if(s=a.tag,s===5||s===6){r=o=a;continue e}l=l.parentNode}}r=r.return}SI(function(){var u=o,c=sm(n),d=[];e:{var f=KI.get(e);if(f!==void 0){var p=mm,g=e;switch(e){case"keypress":if(Es(n)===0)break e;case"keydown":case"keyup":p=rA;break;case"focusin":g="focus",p=Sd;break;case"focusout":g="blur",p=Sd;break;case"beforeblur":case"afterblur":p=Sd;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=kh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=GD;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=aA;break;case QI:case JI:case XI:p=YD;break;case qI:p=sA;break;case"scroll":p=HD;break;case"wheel":p=cA;break;case"copy":case"cut":case"paste":p=JD;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=Bh}var h=(t&4)!==0,w=!h&&e==="scroll",I=h?f!==null?f+"Capture":null:f;h=[];for(var y=u,b;y!==null;){b=y;var x=b.stateNode;if(b.tag===5&&x!==null&&(b=x,I!==null&&(x=La(y,I),x!=null&&h.push($a(y,x,b)))),w)break;y=y.return}0<h.length&&(f=new p(f,g,null,n,c),d.push({event:f,listeners:h}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&n!==$f&&(g=n.relatedTarget||n.fromElement)&&(ii(g)||g[lr]))break e;if((p||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,p?(g=n.relatedTarget||n.toElement,p=u,g=g?ii(g):null,g!==null&&(w=Ai(g),g!==w||g.tag!==5&&g.tag!==6)&&(g=null)):(p=null,g=u),p!==g)){if(h=kh,x="onMouseLeave",I="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(h=Bh,x="onPointerLeave",I="onPointerEnter",y="pointer"),w=p==null?f:Fi(p),b=g==null?f:Fi(g),f=new h(x,y+"leave",p,n,c),f.target=w,f.relatedTarget=b,x=null,ii(c)===u&&(h=new h(I,y+"enter",g,n,c),h.target=b,h.relatedTarget=w,x=h),w=x,p&&g)t:{for(h=p,I=g,y=0,b=h;b;b=Ri(b))y++;for(b=0,x=I;x;x=Ri(x))b++;for(;0<y-b;)h=Ri(h),y--;for(;0<b-y;)I=Ri(I),b--;for(;y--;){if(h===I||I!==null&&h===I.alternate)break t;h=Ri(h),I=Ri(I)}h=null}else h=null;p!==null&&Qh(d,f,p,h,!1),g!==null&&w!==null&&Qh(d,w,g,h,!0)}}e:{if(f=u?Fi(u):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var N=vA;else if(_h(f))if(WI)N=bA;else{N=IA;var M=yA}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(N=wA);if(N&&(N=N(e,u))){HI(d,N,n,c);break e}M&&M(e,f,u),e==="focusout"&&(M=f._wrapperState)&&M.controlled&&f.type==="number"&&Of(f,"number",f.value)}switch(M=u?Fi(u):window,e){case"focusin":(_h(M)||M.contentEditable==="true")&&($i=M,Zf=u,ya=null);break;case"focusout":ya=Zf=$i=null;break;case"mousedown":Yf=!0;break;case"contextmenu":case"mouseup":case"dragend":Yf=!1,Vh(d,n,c);break;case"selectionchange":if(SA)break;case"keydown":case"keyup":Vh(d,n,c)}var S;if(hm)e:{switch(e){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else Ui?_I(e,n)&&(C="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(C="onCompositionStart");C&&($I&&n.locale!=="ko"&&(Ui||C!=="onCompositionStart"?C==="onCompositionEnd"&&Ui&&(S=UI()):(Mr=c,pm="value"in Mr?Mr.value:Mr.textContent,Ui=!0)),M=qs(u,C),0<M.length&&(C=new zh(C,e,null,n,c),d.push({event:C,listeners:M}),S?C.data=S:(S=FI(n),S!==null&&(C.data=S)))),(S=fA?pA(e,n):mA(e,n))&&(u=qs(u,"onBeforeInput"),0<u.length&&(c=new zh("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:u}),c.data=S))}ew(d,t)})}function $a(e,t,n){return{instance:e,listener:t,currentTarget:n}}function qs(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=La(e,n),o!=null&&r.unshift($a(e,o,i)),o=La(e,t),o!=null&&r.push($a(e,o,i))),e=e.return}return r}function Ri(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Qh(e,t,n,r,i){for(var o=t._reactName,a=[];n!==null&&n!==r;){var l=n,s=l.alternate,u=l.stateNode;if(s!==null&&s===r)break;l.tag===5&&u!==null&&(l=u,i?(s=La(n,o),s!=null&&a.unshift($a(n,s,l))):i||(s=La(n,o),s!=null&&a.push($a(n,s,l)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var CA=/\r\n?/g,EA=/\u0000|\uFFFD/g;function Jh(e){return(typeof e=="string"?e:""+e).replace(CA,`
40
- `).replace(EA,"")}function ts(e,t,n){if(t=Jh(t),Jh(e)!==t&&n)throw Error(W(425))}function Ks(){}var Qf=null,Jf=null;function Xf(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var qf=typeof setTimeout=="function"?setTimeout:void 0,TA=typeof clearTimeout=="function"?clearTimeout:void 0,Xh=typeof Promise=="function"?Promise:void 0,jA=typeof queueMicrotask=="function"?queueMicrotask:typeof Xh<"u"?function(e){return Xh.resolve(null).then(e).catch(PA)}:qf;function PA(e){setTimeout(function(){throw e})}function Pd(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),ka(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);ka(t)}function Tr(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function qh(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Eo=Math.random().toString(36).slice(2),$n="__reactFiber$"+Eo,_a="__reactProps$"+Eo,lr="__reactContainer$"+Eo,Kf="__reactEvents$"+Eo,LA="__reactListeners$"+Eo,RA="__reactHandles$"+Eo;function ii(e){var t=e[$n];if(t)return t;for(var n=e.parentNode;n;){if(t=n[lr]||n[$n]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=qh(e);e!==null;){if(n=e[$n])return n;e=qh(e)}return t}e=n,n=e.parentNode}return null}function fl(e){return e=e[$n]||e[lr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Fi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(W(33))}function Yu(e){return e[_a]||null}var ep=[],Hi=-1;function Wr(e){return{current:e}}function Re(e){0>Hi||(e.current=ep[Hi],ep[Hi]=null,Hi--)}function je(e,t){Hi++,ep[Hi]=e.current,e.current=t}var $r={},At=Wr($r),_t=Wr(!1),gi=$r;function uo(e,t){var n=e.type.contextTypes;if(!n)return $r;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ft(e){return e=e.childContextTypes,e!=null}function eu(){Re(_t),Re(At)}function Kh(e,t,n){if(At.current!==$r)throw Error(W(168));je(At,t),je(_t,n)}function nw(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(W(108,yD(e)||"Unknown",i));return Fe({},n,r)}function tu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||$r,gi=At.current,je(At,e),je(_t,_t.current),!0}function ev(e,t,n){var r=e.stateNode;if(!r)throw Error(W(169));n?(e=nw(e,t,gi),r.__reactInternalMemoizedMergedChildContext=e,Re(_t),Re(At),je(At,e)):Re(_t),je(_t,n)}var Kn=null,Qu=!1,Ld=!1;function rw(e){Kn===null?Kn=[e]:Kn.push(e)}function OA(e){Qu=!0,rw(e)}function Gr(){if(!Ld&&Kn!==null){Ld=!0;var e=0,t=Ne;try{var n=Kn;for(Ne=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Kn=null,Qu=!1}catch(i){throw Kn!==null&&(Kn=Kn.slice(e+1)),CI(um,Gr),i}finally{Ne=t,Ld=!1}}return null}var Wi=[],Gi=0,nu=null,ru=0,mn=[],gn=0,hi=null,tr=1,nr="";function ei(e,t){Wi[Gi++]=ru,Wi[Gi++]=nu,nu=e,ru=t}function iw(e,t,n){mn[gn++]=tr,mn[gn++]=nr,mn[gn++]=hi,hi=e;var r=tr;e=nr;var i=32-jn(r)-1;r&=~(1<<i),n+=1;var o=32-jn(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,tr=1<<32-jn(t)+i|n<<i|r,nr=o+e}else tr=1<<o|n<<i|r,nr=e}function ym(e){e.return!==null&&(ei(e,1),iw(e,1,0))}function Im(e){for(;e===nu;)nu=Wi[--Gi],Wi[Gi]=null,ru=Wi[--Gi],Wi[Gi]=null;for(;e===hi;)hi=mn[--gn],mn[gn]=null,nr=mn[--gn],mn[gn]=null,tr=mn[--gn],mn[gn]=null}var qt=null,Qt=null,ze=!1,An=null;function ow(e,t){var n=hn(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function tv(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,qt=e,Qt=Tr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,qt=e,Qt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=hi!==null?{id:tr,overflow:nr}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=hn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,qt=e,Qt=null,!0):!1;default:return!1}}function tp(e){return(e.mode&1)!==0&&(e.flags&128)===0}function np(e){if(ze){var t=Qt;if(t){var n=t;if(!tv(e,t)){if(tp(e))throw Error(W(418));t=Tr(n.nextSibling);var r=qt;t&&tv(e,t)?ow(r,n):(e.flags=e.flags&-4097|2,ze=!1,qt=e)}}else{if(tp(e))throw Error(W(418));e.flags=e.flags&-4097|2,ze=!1,qt=e}}}function nv(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;qt=e}function ns(e){if(e!==qt)return!1;if(!ze)return nv(e),ze=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Xf(e.type,e.memoizedProps)),t&&(t=Qt)){if(tp(e))throw aw(),Error(W(418));for(;t;)ow(e,t),t=Tr(t.nextSibling)}if(nv(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(W(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Qt=Tr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Qt=null}}else Qt=qt?Tr(e.stateNode.nextSibling):null;return!0}function aw(){for(var e=Qt;e;)e=Tr(e.nextSibling)}function co(){Qt=qt=null,ze=!1}function wm(e){An===null?An=[e]:An.push(e)}var kA=dr.ReactCurrentBatchConfig;function Nn(e,t){if(e&&e.defaultProps){t=Fe({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var iu=Wr(null),ou=null,Vi=null,bm=null;function xm(){bm=Vi=ou=null}function Mm(e){var t=iu.current;Re(iu),e._currentValue=t}function rp(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function to(e,t){ou=e,bm=Vi=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ut=!0),e.firstContext=null)}function wn(e){var t=e._currentValue;if(bm!==e)if(e={context:e,memoizedValue:t,next:null},Vi===null){if(ou===null)throw Error(W(308));Vi=e,ou.dependencies={lanes:0,firstContext:e}}else Vi=Vi.next=e;return t}var oi=null;function Sm(e){oi===null?oi=[e]:oi.push(e)}function lw(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Sm(t)):(n.next=i.next,i.next=n),t.interleaved=n,sr(e,r)}function sr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var hr=!1;function Nm(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function sw(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function rr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function jr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,be&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,sr(e,n)}return i=r.interleaved,i===null?(t.next=t,Sm(r)):(t.next=i.next,i.next=t),r.interleaved=t,sr(e,n)}function Ts(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,cm(e,n)}}function rv(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=a:o=o.next=a,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function au(e,t,n,r){var i=e.updateQueue;hr=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var s=l,u=s.next;s.next=null,a===null?o=u:a.next=u,a=s;var c=e.alternate;c!==null&&(c=c.updateQueue,l=c.lastBaseUpdate,l!==a&&(l===null?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=s))}if(o!==null){var d=i.baseState;a=0,c=u=s=null,l=o;do{var f=l.lane,p=l.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var g=e,h=l;switch(f=t,p=n,h.tag){case 1:if(g=h.payload,typeof g=="function"){d=g.call(p,d,f);break e}d=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=h.payload,f=typeof g=="function"?g.call(p,d,f):g,f==null)break e;d=Fe({},d,f);break e;case 2:hr=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[l]:f.push(l))}else p={eventTime:p,lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},c===null?(u=c=p,s=d):c=c.next=p,a|=f;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;f=l,l=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(1);if(c===null&&(s=d),i.baseState=s,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do a|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);yi|=a,e.lanes=a,e.memoizedState=d}}function iv(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(W(191,i));i.call(r)}}}var uw=new lI.Component().refs;function ip(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Fe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ju={isMounted:function(e){return(e=e._reactInternals)?Ai(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Lt(),i=Lr(e),o=rr(r,i);o.payload=t,n!=null&&(o.callback=n),t=jr(e,o,i),t!==null&&(Pn(t,e,i,r),Ts(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Lt(),i=Lr(e),o=rr(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=jr(e,o,i),t!==null&&(Pn(t,e,i,r),Ts(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Lt(),r=Lr(e),i=rr(n,r);i.tag=2,t!=null&&(i.callback=t),t=jr(e,i,r),t!==null&&(Pn(t,e,r,n),Ts(t,e,r))}};function ov(e,t,n,r,i,o,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,a):t.prototype&&t.prototype.isPureReactComponent?!Ba(n,r)||!Ba(i,o):!0}function cw(e,t,n){var r=!1,i=$r,o=t.contextType;return typeof o=="object"&&o!==null?o=wn(o):(i=Ft(t)?gi:At.current,r=t.contextTypes,o=(r=r!=null)?uo(e,i):$r),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ju,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function av(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ju.enqueueReplaceState(t,t.state,null)}function op(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=uw,Nm(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=wn(o):(o=Ft(t)?gi:At.current,i.context=uo(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(ip(e,t,o,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Ju.enqueueReplaceState(i,i.state,null),au(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Go(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(W(309));var r=n.stateNode}if(!r)throw Error(W(147,e));var i=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(a){var l=i.refs;l===uw&&(l=i.refs={}),a===null?delete l[o]:l[o]=a},t._stringRef=o,t)}if(typeof e!="string")throw Error(W(284));if(!n._owner)throw Error(W(290,e))}return e}function rs(e,t){throw e=Object.prototype.toString.call(t),Error(W(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function lv(e){var t=e._init;return t(e._payload)}function dw(e){function t(I,y){if(e){var b=I.deletions;b===null?(I.deletions=[y],I.flags|=16):b.push(y)}}function n(I,y){if(!e)return null;for(;y!==null;)t(I,y),y=y.sibling;return null}function r(I,y){for(I=new Map;y!==null;)y.key!==null?I.set(y.key,y):I.set(y.index,y),y=y.sibling;return I}function i(I,y){return I=Rr(I,y),I.index=0,I.sibling=null,I}function o(I,y,b){return I.index=b,e?(b=I.alternate,b!==null?(b=b.index,b<y?(I.flags|=2,y):b):(I.flags|=2,y)):(I.flags|=1048576,y)}function a(I){return e&&I.alternate===null&&(I.flags|=2),I}function l(I,y,b,x){return y===null||y.tag!==6?(y=$d(b,I.mode,x),y.return=I,y):(y=i(y,b),y.return=I,y)}function s(I,y,b,x){var N=b.type;return N===Bi?c(I,y,b.props.children,x,b.key):y!==null&&(y.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===gr&&lv(N)===y.type)?(x=i(y,b.props),x.ref=Go(I,y,b),x.return=I,x):(x=ks(b.type,b.key,b.props,null,I.mode,x),x.ref=Go(I,y,b),x.return=I,x)}function u(I,y,b,x){return y===null||y.tag!==4||y.stateNode.containerInfo!==b.containerInfo||y.stateNode.implementation!==b.implementation?(y=_d(b,I.mode,x),y.return=I,y):(y=i(y,b.children||[]),y.return=I,y)}function c(I,y,b,x,N){return y===null||y.tag!==7?(y=pi(b,I.mode,x,N),y.return=I,y):(y=i(y,b),y.return=I,y)}function d(I,y,b){if(typeof y=="string"&&y!==""||typeof y=="number")return y=$d(""+y,I.mode,b),y.return=I,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Vl:return b=ks(y.type,y.key,y.props,null,I.mode,b),b.ref=Go(I,null,y),b.return=I,b;case zi:return y=_d(y,I.mode,b),y.return=I,y;case gr:var x=y._init;return d(I,x(y._payload),b)}if(la(y)||$o(y))return y=pi(y,I.mode,b,null),y.return=I,y;rs(I,y)}return null}function f(I,y,b,x){var N=y!==null?y.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return N!==null?null:l(I,y,""+b,x);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Vl:return b.key===N?s(I,y,b,x):null;case zi:return b.key===N?u(I,y,b,x):null;case gr:return N=b._init,f(I,y,N(b._payload),x)}if(la(b)||$o(b))return N!==null?null:c(I,y,b,x,null);rs(I,b)}return null}function p(I,y,b,x,N){if(typeof x=="string"&&x!==""||typeof x=="number")return I=I.get(b)||null,l(y,I,""+x,N);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Vl:return I=I.get(x.key===null?b:x.key)||null,s(y,I,x,N);case zi:return I=I.get(x.key===null?b:x.key)||null,u(y,I,x,N);case gr:var M=x._init;return p(I,y,b,M(x._payload),N)}if(la(x)||$o(x))return I=I.get(b)||null,c(y,I,x,N,null);rs(y,x)}return null}function g(I,y,b,x){for(var N=null,M=null,S=y,C=y=0,L=null;S!==null&&C<b.length;C++){S.index>C?(L=S,S=null):L=S.sibling;var R=f(I,S,b[C],x);if(R===null){S===null&&(S=L);break}e&&S&&R.alternate===null&&t(I,S),y=o(R,y,C),M===null?N=R:M.sibling=R,M=R,S=L}if(C===b.length)return n(I,S),ze&&ei(I,C),N;if(S===null){for(;C<b.length;C++)S=d(I,b[C],x),S!==null&&(y=o(S,y,C),M===null?N=S:M.sibling=S,M=S);return ze&&ei(I,C),N}for(S=r(I,S);C<b.length;C++)L=p(S,I,C,b[C],x),L!==null&&(e&&L.alternate!==null&&S.delete(L.key===null?C:L.key),y=o(L,y,C),M===null?N=L:M.sibling=L,M=L);return e&&S.forEach(function(O){return t(I,O)}),ze&&ei(I,C),N}function h(I,y,b,x){var N=$o(b);if(typeof N!="function")throw Error(W(150));if(b=N.call(b),b==null)throw Error(W(151));for(var M=N=null,S=y,C=y=0,L=null,R=b.next();S!==null&&!R.done;C++,R=b.next()){S.index>C?(L=S,S=null):L=S.sibling;var O=f(I,S,R.value,x);if(O===null){S===null&&(S=L);break}e&&S&&O.alternate===null&&t(I,S),y=o(O,y,C),M===null?N=O:M.sibling=O,M=O,S=L}if(R.done)return n(I,S),ze&&ei(I,C),N;if(S===null){for(;!R.done;C++,R=b.next())R=d(I,R.value,x),R!==null&&(y=o(R,y,C),M===null?N=R:M.sibling=R,M=R);return ze&&ei(I,C),N}for(S=r(I,S);!R.done;C++,R=b.next())R=p(S,I,C,R.value,x),R!==null&&(e&&R.alternate!==null&&S.delete(R.key===null?C:R.key),y=o(R,y,C),M===null?N=R:M.sibling=R,M=R);return e&&S.forEach(function(J){return t(I,J)}),ze&&ei(I,C),N}function w(I,y,b,x){if(typeof b=="object"&&b!==null&&b.type===Bi&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case Vl:e:{for(var N=b.key,M=y;M!==null;){if(M.key===N){if(N=b.type,N===Bi){if(M.tag===7){n(I,M.sibling),y=i(M,b.props.children),y.return=I,I=y;break e}}else if(M.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===gr&&lv(N)===M.type){n(I,M.sibling),y=i(M,b.props),y.ref=Go(I,M,b),y.return=I,I=y;break e}n(I,M);break}else t(I,M);M=M.sibling}b.type===Bi?(y=pi(b.props.children,I.mode,x,b.key),y.return=I,I=y):(x=ks(b.type,b.key,b.props,null,I.mode,x),x.ref=Go(I,y,b),x.return=I,I=x)}return a(I);case zi:e:{for(M=b.key;y!==null;){if(y.key===M)if(y.tag===4&&y.stateNode.containerInfo===b.containerInfo&&y.stateNode.implementation===b.implementation){n(I,y.sibling),y=i(y,b.children||[]),y.return=I,I=y;break e}else{n(I,y);break}else t(I,y);y=y.sibling}y=_d(b,I.mode,x),y.return=I,I=y}return a(I);case gr:return M=b._init,w(I,y,M(b._payload),x)}if(la(b))return g(I,y,b,x);if($o(b))return h(I,y,b,x);rs(I,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,y!==null&&y.tag===6?(n(I,y.sibling),y=i(y,b),y.return=I,I=y):(n(I,y),y=$d(b,I.mode,x),y.return=I,I=y),a(I)):n(I,y)}return w}var fo=dw(!0),fw=dw(!1),pl={},Hn=Wr(pl),Fa=Wr(pl),Ha=Wr(pl);function ai(e){if(e===pl)throw Error(W(174));return e}function Dm(e,t){switch(je(Ha,t),je(Fa,e),je(Hn,pl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:zf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=zf(t,e)}Re(Hn),je(Hn,t)}function po(){Re(Hn),Re(Fa),Re(Ha)}function pw(e){ai(Ha.current);var t=ai(Hn.current),n=zf(t,e.type);t!==n&&(je(Fa,e),je(Hn,n))}function Am(e){Fa.current===e&&(Re(Hn),Re(Fa))}var Ue=Wr(0);function lu(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Rd=[];function Cm(){for(var e=0;e<Rd.length;e++)Rd[e]._workInProgressVersionPrimary=null;Rd.length=0}var js=dr.ReactCurrentDispatcher,Od=dr.ReactCurrentBatchConfig,vi=0,_e=null,rt=null,lt=null,su=!1,Ia=!1,Wa=0,zA=0;function wt(){throw Error(W(321))}function Em(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ln(e[n],t[n]))return!1;return!0}function Tm(e,t,n,r,i,o){if(vi=o,_e=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,js.current=e===null||e.memoizedState===null?_A:FA,e=n(r,i),Ia){o=0;do{if(Ia=!1,Wa=0,25<=o)throw Error(W(301));o+=1,lt=rt=null,t.updateQueue=null,js.current=HA,e=n(r,i)}while(Ia)}if(js.current=uu,t=rt!==null&&rt.next!==null,vi=0,lt=rt=_e=null,su=!1,t)throw Error(W(300));return e}function jm(){var e=Wa!==0;return Wa=0,e}function kn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return lt===null?_e.memoizedState=lt=e:lt=lt.next=e,lt}function bn(){if(rt===null){var e=_e.alternate;e=e!==null?e.memoizedState:null}else e=rt.next;var t=lt===null?_e.memoizedState:lt.next;if(t!==null)lt=t,rt=e;else{if(e===null)throw Error(W(310));rt=e,e={memoizedState:rt.memoizedState,baseState:rt.baseState,baseQueue:rt.baseQueue,queue:rt.queue,next:null},lt===null?_e.memoizedState=lt=e:lt=lt.next=e}return lt}function Ga(e,t){return typeof t=="function"?t(e):t}function kd(e){var t=bn(),n=t.queue;if(n===null)throw Error(W(311));n.lastRenderedReducer=e;var r=rt,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var a=i.next;i.next=o.next,o.next=a}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var l=a=null,s=null,u=o;do{var c=u.lane;if((vi&c)===c)s!==null&&(s=s.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};s===null?(l=s=d,a=r):s=s.next=d,_e.lanes|=c,yi|=c}u=u.next}while(u!==null&&u!==o);s===null?a=r:s.next=l,Ln(r,t.memoizedState)||(Ut=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=s,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do o=i.lane,_e.lanes|=o,yi|=o,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function zd(e){var t=bn(),n=t.queue;if(n===null)throw Error(W(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var a=i=i.next;do o=e(o,a.action),a=a.next;while(a!==i);Ln(o,t.memoizedState)||(Ut=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function mw(){}function gw(e,t){var n=_e,r=bn(),i=t(),o=!Ln(r.memoizedState,i);if(o&&(r.memoizedState=i,Ut=!0),r=r.queue,Pm(yw.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||lt!==null&&lt.memoizedState.tag&1){if(n.flags|=2048,Va(9,vw.bind(null,n,r,i,t),void 0,null),st===null)throw Error(W(349));vi&30||hw(n,t,i)}return i}function hw(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=_e.updateQueue,t===null?(t={lastEffect:null,stores:null},_e.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function vw(e,t,n,r){t.value=n,t.getSnapshot=r,Iw(t)&&ww(e)}function yw(e,t,n){return n(function(){Iw(t)&&ww(e)})}function Iw(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ln(e,n)}catch{return!0}}function ww(e){var t=sr(e,1);t!==null&&Pn(t,e,1,-1)}function sv(e){var t=kn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ga,lastRenderedState:e},t.queue=e,e=e.dispatch=$A.bind(null,_e,e),[t.memoizedState,e]}function Va(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=_e.updateQueue,t===null?(t={lastEffect:null,stores:null},_e.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function bw(){return bn().memoizedState}function Ps(e,t,n,r){var i=kn();_e.flags|=e,i.memoizedState=Va(1|t,n,void 0,r===void 0?null:r)}function Xu(e,t,n,r){var i=bn();r=r===void 0?null:r;var o=void 0;if(rt!==null){var a=rt.memoizedState;if(o=a.destroy,r!==null&&Em(r,a.deps)){i.memoizedState=Va(t,n,o,r);return}}_e.flags|=e,i.memoizedState=Va(1|t,n,o,r)}function uv(e,t){return Ps(8390656,8,e,t)}function Pm(e,t){return Xu(2048,8,e,t)}function xw(e,t){return Xu(4,2,e,t)}function Mw(e,t){return Xu(4,4,e,t)}function Sw(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Nw(e,t,n){return n=n!=null?n.concat([e]):null,Xu(4,4,Sw.bind(null,t,e),n)}function Lm(){}function Dw(e,t){var n=bn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Em(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Aw(e,t){var n=bn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Em(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Cw(e,t,n){return vi&21?(Ln(n,t)||(n=jI(),_e.lanes|=n,yi|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ut=!0),e.memoizedState=n)}function BA(e,t){var n=Ne;Ne=n!==0&&4>n?n:4,e(!0);var r=Od.transition;Od.transition={};try{e(!1),t()}finally{Ne=n,Od.transition=r}}function Ew(){return bn().memoizedState}function UA(e,t,n){var r=Lr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Tw(e))jw(t,n);else if(n=lw(e,t,n,r),n!==null){var i=Lt();Pn(n,e,r,i),Pw(n,t,r)}}function $A(e,t,n){var r=Lr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Tw(e))jw(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,l=o(a,n);if(i.hasEagerState=!0,i.eagerState=l,Ln(l,a)){var s=t.interleaved;s===null?(i.next=i,Sm(t)):(i.next=s.next,s.next=i),t.interleaved=i;return}}catch{}finally{}n=lw(e,t,i,r),n!==null&&(i=Lt(),Pn(n,e,r,i),Pw(n,t,r))}}function Tw(e){var t=e.alternate;return e===_e||t!==null&&t===_e}function jw(e,t){Ia=su=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Pw(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,cm(e,n)}}var uu={readContext:wn,useCallback:wt,useContext:wt,useEffect:wt,useImperativeHandle:wt,useInsertionEffect:wt,useLayoutEffect:wt,useMemo:wt,useReducer:wt,useRef:wt,useState:wt,useDebugValue:wt,useDeferredValue:wt,useTransition:wt,useMutableSource:wt,useSyncExternalStore:wt,useId:wt,unstable_isNewReconciler:!1},_A={readContext:wn,useCallback:function(e,t){return kn().memoizedState=[e,t===void 0?null:t],e},useContext:wn,useEffect:uv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ps(4194308,4,Sw.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ps(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ps(4,2,e,t)},useMemo:function(e,t){var n=kn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=kn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=UA.bind(null,_e,e),[r.memoizedState,e]},useRef:function(e){var t=kn();return e={current:e},t.memoizedState=e},useState:sv,useDebugValue:Lm,useDeferredValue:function(e){return kn().memoizedState=e},useTransition:function(){var e=sv(!1),t=e[0];return e=BA.bind(null,e[1]),kn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=_e,i=kn();if(ze){if(n===void 0)throw Error(W(407));n=n()}else{if(n=t(),st===null)throw Error(W(349));vi&30||hw(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,uv(yw.bind(null,r,o,e),[e]),r.flags|=2048,Va(9,vw.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=kn(),t=st.identifierPrefix;if(ze){var n=nr,r=tr;n=(r&~(1<<32-jn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Wa++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=zA++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},FA={readContext:wn,useCallback:Dw,useContext:wn,useEffect:Pm,useImperativeHandle:Nw,useInsertionEffect:xw,useLayoutEffect:Mw,useMemo:Aw,useReducer:kd,useRef:bw,useState:function(){return kd(Ga)},useDebugValue:Lm,useDeferredValue:function(e){var t=bn();return Cw(t,rt.memoizedState,e)},useTransition:function(){var e=kd(Ga)[0],t=bn().memoizedState;return[e,t]},useMutableSource:mw,useSyncExternalStore:gw,useId:Ew,unstable_isNewReconciler:!1},HA={readContext:wn,useCallback:Dw,useContext:wn,useEffect:Pm,useImperativeHandle:Nw,useInsertionEffect:xw,useLayoutEffect:Mw,useMemo:Aw,useReducer:zd,useRef:bw,useState:function(){return zd(Ga)},useDebugValue:Lm,useDeferredValue:function(e){var t=bn();return rt===null?t.memoizedState=e:Cw(t,rt.memoizedState,e)},useTransition:function(){var e=zd(Ga)[0],t=bn().memoizedState;return[e,t]},useMutableSource:mw,useSyncExternalStore:gw,useId:Ew,unstable_isNewReconciler:!1};function mo(e,t){try{var n="",r=t;do n+=vD(r),r=r.return;while(r);var i=n}catch(o){i=`
39
+ `+i[a].replace(" at new "," at ");return e.displayName&&s.includes("<anonymous>")&&(s=s.replace("<anonymous>",e.displayName)),s}while(1<=a&&0<=l);break}}}finally{yd=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?aa(e):""}function vD(e){switch(e.tag){case 5:return aa(e.type);case 16:return aa("Lazy");case 13:return aa("Suspense");case 19:return aa("SuspenseList");case 0:case 2:case 15:return e=Id(e.type,!1),e;case 11:return e=Id(e.type.render,!1),e;case 1:return e=Id(e.type,!0),e;default:return""}}function Lf(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Bi:return"Fragment";case zi:return"Portal";case Ef:return"Profiler";case om:return"StrictMode";case Tf:return"Suspense";case jf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case cI:return(e.displayName||"Context")+".Consumer";case uI:return(e._context.displayName||"Context")+".Provider";case am:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case lm:return t=e.displayName||null,t!==null?t:Lf(e.type)||"Memo";case gr:t=e._payload,e=e._init;try{return Lf(e(t))}catch{}}return null}function yD(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Lf(t);case 8:return t===om?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Ur(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function fI(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ID(e){var t=fI(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Zl(e){e._valueTracker||(e._valueTracker=ID(e))}function pI(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=fI(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ws(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Pf(e,t){var n=t.checked;return Fe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Dh(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ur(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function mI(e,t){t=t.checked,t!=null&&im(e,"checked",t,!1)}function Rf(e,t){mI(e,t);var n=Ur(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Of(e,t.type,n):t.hasOwnProperty("defaultValue")&&Of(e,t.type,Ur(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ah(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Of(e,t,n){(t!=="number"||Ws(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var la=Array.isArray;function Xi(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Ur(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function kf(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(G(91));return Fe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ch(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(G(92));if(la(n)){if(1<n.length)throw Error(G(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Ur(n)}}function gI(e,t){var n=Ur(t.value),r=Ur(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Eh(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function hI(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function zf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?hI(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Yl,vI=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Yl=Yl||document.createElement("div"),Yl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Yl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function La(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ma={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},wD=["Webkit","ms","Moz","O"];Object.keys(ma).forEach(function(e){wD.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ma[t]=ma[e]})});function yI(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ma.hasOwnProperty(e)&&ma[e]?(""+t).trim():t+"px"}function II(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=yI(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var MD=Fe({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 Bf(e,t){if(t){if(MD[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(G(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(G(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(G(61))}if(t.style!=null&&typeof t.style!="object")throw Error(G(62))}}function Uf(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var $f=null;function sm(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var _f=null,qi=null,Ki=null;function Th(e){if(e=fl(e)){if(typeof _f!="function")throw Error(G(280));var t=e.stateNode;t&&(t=Yu(t),_f(e.stateNode,e.type,t))}}function wI(e){qi?Ki?Ki.push(e):Ki=[e]:qi=e}function MI(){if(qi){var e=qi,t=Ki;if(Ki=qi=null,Th(e),t)for(e=0;e<t.length;e++)Th(t[e])}}function xI(e,t){return e(t)}function bI(){}var wd=!1;function NI(e,t,n){if(wd)return e(t,n);wd=!0;try{return xI(e,t,n)}finally{wd=!1,(qi!==null||Ki!==null)&&(bI(),MI())}}function Pa(e,t){var n=e.stateNode;if(n===null)return null;var r=Yu(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(G(231,t,typeof n));return n}var Ff=!1;if(ar)try{var _o={};Object.defineProperty(_o,"passive",{get:function(){Ff=!0}}),window.addEventListener("test",_o,_o),window.removeEventListener("test",_o,_o)}catch{Ff=!1}function xD(e,t,n,r,i,o,a,l,s){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var ga=!1,Vs=null,Zs=!1,Hf=null,bD={onError:function(e){ga=!0,Vs=e}};function ND(e,t,n,r,i,o,a,l,s){ga=!1,Vs=null,xD.apply(bD,arguments)}function SD(e,t,n,r,i,o,a,l,s){if(ND.apply(this,arguments),ga){if(ga){var u=Vs;ga=!1,Vs=null}else throw Error(G(198));Zs||(Zs=!0,Hf=u)}}function Ai(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function SI(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function jh(e){if(Ai(e)!==e)throw Error(G(188))}function DD(e){var t=e.alternate;if(!t){if(t=Ai(e),t===null)throw Error(G(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return jh(i),e;if(o===r)return jh(i),t;o=o.sibling}throw Error(G(188))}if(n.return!==r.return)n=i,r=o;else{for(var a=!1,l=i.child;l;){if(l===n){a=!0,n=i,r=o;break}if(l===r){a=!0,r=i,n=o;break}l=l.sibling}if(!a){for(l=o.child;l;){if(l===n){a=!0,n=o,r=i;break}if(l===r){a=!0,r=o,n=i;break}l=l.sibling}if(!a)throw Error(G(189))}}if(n.alternate!==r)throw Error(G(190))}if(n.tag!==3)throw Error(G(188));return n.stateNode.current===n?e:t}function DI(e){return e=DD(e),e!==null?AI(e):null}function AI(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=AI(e);if(t!==null)return t;e=e.sibling}return null}var CI=rn.unstable_scheduleCallback,Lh=rn.unstable_cancelCallback,AD=rn.unstable_shouldYield,CD=rn.unstable_requestPaint,Qe=rn.unstable_now,ED=rn.unstable_getCurrentPriorityLevel,um=rn.unstable_ImmediatePriority,EI=rn.unstable_UserBlockingPriority,Ys=rn.unstable_NormalPriority,TD=rn.unstable_LowPriority,TI=rn.unstable_IdlePriority,Gu=null,Fn=null;function jD(e){if(Fn&&typeof Fn.onCommitFiberRoot=="function")try{Fn.onCommitFiberRoot(Gu,e,void 0,(e.current.flags&128)===128)}catch{}}var jn=Math.clz32?Math.clz32:RD,LD=Math.log,PD=Math.LN2;function RD(e){return e>>>=0,e===0?32:31-(LD(e)/PD|0)|0}var Ql=64,Jl=4194304;function sa(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Qs(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var l=a&~i;l!==0?r=sa(l):(o&=a,o!==0&&(r=sa(o)))}else a=n&~i,a!==0?r=sa(a):o!==0&&(r=sa(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-jn(t),i=1<<n,r|=e[n],t&=~i;return r}function OD(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function kD(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-jn(o),l=1<<a,s=i[a];s===-1?(!(l&n)||l&r)&&(i[a]=OD(l,t)):s<=t&&(e.expiredLanes|=l),o&=~l}}function Gf(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function jI(){var e=Ql;return Ql<<=1,!(Ql&4194240)&&(Ql=64),e}function Md(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function cl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-jn(t),e[t]=n}function zD(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-jn(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}function cm(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-jn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Se=0;function LI(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var PI,dm,RI,OI,kI,Wf=!1,Xl=[],Ar=null,Cr=null,Er=null,Ra=new Map,Oa=new Map,yr=[],BD="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Ph(e,t){switch(e){case"focusin":case"focusout":Ar=null;break;case"dragenter":case"dragleave":Cr=null;break;case"mouseover":case"mouseout":Er=null;break;case"pointerover":case"pointerout":Ra.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Oa.delete(t.pointerId)}}function Fo(e,t,n,r,i,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},t!==null&&(t=fl(t),t!==null&&dm(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function UD(e,t,n,r,i){switch(t){case"focusin":return Ar=Fo(Ar,e,t,n,r,i),!0;case"dragenter":return Cr=Fo(Cr,e,t,n,r,i),!0;case"mouseover":return Er=Fo(Er,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Ra.set(o,Fo(Ra.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Oa.set(o,Fo(Oa.get(o)||null,e,t,n,r,i)),!0}return!1}function zI(e){var t=ii(e.target);if(t!==null){var n=Ai(t);if(n!==null){if(t=n.tag,t===13){if(t=SI(n),t!==null){e.blockedOn=t,kI(e.priority,function(){RI(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function As(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Vf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);$f=r,n.target.dispatchEvent(r),$f=null}else return t=fl(n),t!==null&&dm(t),e.blockedOn=n,!1;t.shift()}return!0}function Rh(e,t,n){As(e)&&n.delete(t)}function $D(){Wf=!1,Ar!==null&&As(Ar)&&(Ar=null),Cr!==null&&As(Cr)&&(Cr=null),Er!==null&&As(Er)&&(Er=null),Ra.forEach(Rh),Oa.forEach(Rh)}function Ho(e,t){e.blockedOn===t&&(e.blockedOn=null,Wf||(Wf=!0,rn.unstable_scheduleCallback(rn.unstable_NormalPriority,$D)))}function ka(e){function t(i){return Ho(i,e)}if(0<Xl.length){Ho(Xl[0],e);for(var n=1;n<Xl.length;n++){var r=Xl[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Ar!==null&&Ho(Ar,e),Cr!==null&&Ho(Cr,e),Er!==null&&Ho(Er,e),Ra.forEach(t),Oa.forEach(t),n=0;n<yr.length;n++)r=yr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<yr.length&&(n=yr[0],n.blockedOn===null);)zI(n),n.blockedOn===null&&yr.shift()}var eo=dr.ReactCurrentBatchConfig,Js=!0;function _D(e,t,n,r){var i=Se,o=eo.transition;eo.transition=null;try{Se=1,fm(e,t,n,r)}finally{Se=i,eo.transition=o}}function FD(e,t,n,r){var i=Se,o=eo.transition;eo.transition=null;try{Se=4,fm(e,t,n,r)}finally{Se=i,eo.transition=o}}function fm(e,t,n,r){if(Js){var i=Vf(e,t,n,r);if(i===null)jd(e,t,r,Xs,n),Ph(e,r);else if(UD(i,e,t,n,r))r.stopPropagation();else if(Ph(e,r),t&4&&-1<BD.indexOf(e)){for(;i!==null;){var o=fl(i);if(o!==null&&PI(o),o=Vf(e,t,n,r),o===null&&jd(e,t,r,Xs,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else jd(e,t,r,null,n)}}var Xs=null;function Vf(e,t,n,r){if(Xs=null,e=sm(r),e=ii(e),e!==null)if(t=Ai(e),t===null)e=null;else if(n=t.tag,n===13){if(e=SI(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Xs=e,null}function BI(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(ED()){case um:return 1;case EI:return 4;case Ys:case TD:return 16;case TI:return 536870912;default:return 16}default:return 16}}var br=null,pm=null,Cs=null;function UI(){if(Cs)return Cs;var e,t=pm,n=t.length,r,i="value"in br?br.value:br.textContent,o=i.length;for(e=0;e<n&&t[e]===i[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===i[o-r];r++);return Cs=i.slice(e,1<r?1-r:void 0)}function Es(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ql(){return!0}function Oh(){return!1}function an(e){function t(n,r,i,o,a){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=a,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(o):o[l]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?ql:Oh,this.isPropagationStopped=Oh,this}return Fe(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=ql)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ql)},persist:function(){},isPersistent:ql}),t}var Co={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mm=an(Co),dl=Fe({},Co,{view:0,detail:0}),HD=an(dl),xd,bd,Go,Wu=Fe({},dl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:gm,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Go&&(Go&&e.type==="mousemove"?(xd=e.screenX-Go.screenX,bd=e.screenY-Go.screenY):bd=xd=0,Go=e),xd)},movementY:function(e){return"movementY"in e?e.movementY:bd}}),kh=an(Wu),GD=Fe({},Wu,{dataTransfer:0}),WD=an(GD),VD=Fe({},dl,{relatedTarget:0}),Nd=an(VD),ZD=Fe({},Co,{animationName:0,elapsedTime:0,pseudoElement:0}),YD=an(ZD),QD=Fe({},Co,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),JD=an(QD),XD=Fe({},Co,{data:0}),zh=an(XD),qD={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},KD={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},eA={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function tA(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=eA[e])?!!t[e]:!1}function gm(){return tA}var nA=Fe({},dl,{key:function(e){if(e.key){var t=qD[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Es(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?KD[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:gm,charCode:function(e){return e.type==="keypress"?Es(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Es(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),rA=an(nA),iA=Fe({},Wu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Bh=an(iA),oA=Fe({},dl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:gm}),aA=an(oA),lA=Fe({},Co,{propertyName:0,elapsedTime:0,pseudoElement:0}),sA=an(lA),uA=Fe({},Wu,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),cA=an(uA),dA=[9,13,27,32],hm=ar&&"CompositionEvent"in window,ha=null;ar&&"documentMode"in document&&(ha=document.documentMode);var fA=ar&&"TextEvent"in window&&!ha,$I=ar&&(!hm||ha&&8<ha&&11>=ha),Uh=String.fromCharCode(32),$h=!1;function _I(e,t){switch(e){case"keyup":return dA.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function FI(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ui=!1;function pA(e,t){switch(e){case"compositionend":return FI(t);case"keypress":return t.which!==32?null:($h=!0,Uh);case"textInput":return e=t.data,e===Uh&&$h?null:e;default:return null}}function mA(e,t){if(Ui)return e==="compositionend"||!hm&&_I(e,t)?(e=UI(),Cs=pm=br=null,Ui=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return $I&&t.locale!=="ko"?null:t.data;default:return null}}var gA={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function _h(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!gA[e.type]:t==="textarea"}function HI(e,t,n,r){wI(r),t=qs(t,"onChange"),0<t.length&&(n=new mm("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var va=null,za=null;function hA(e){ew(e,0)}function Vu(e){var t=Fi(e);if(pI(t))return e}function vA(e,t){if(e==="change")return t}var GI=!1;if(ar){var Sd;if(ar){var Dd="oninput"in document;if(!Dd){var Fh=document.createElement("div");Fh.setAttribute("oninput","return;"),Dd=typeof Fh.oninput=="function"}Sd=Dd}else Sd=!1;GI=Sd&&(!document.documentMode||9<document.documentMode)}function Hh(){va&&(va.detachEvent("onpropertychange",WI),za=va=null)}function WI(e){if(e.propertyName==="value"&&Vu(za)){var t=[];HI(t,za,e,sm(e)),NI(hA,t)}}function yA(e,t,n){e==="focusin"?(Hh(),va=t,za=n,va.attachEvent("onpropertychange",WI)):e==="focusout"&&Hh()}function IA(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Vu(za)}function wA(e,t){if(e==="click")return Vu(t)}function MA(e,t){if(e==="input"||e==="change")return Vu(t)}function xA(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Pn=typeof Object.is=="function"?Object.is:xA;function Ba(e,t){if(Pn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Cf.call(t,i)||!Pn(e[i],t[i]))return!1}return!0}function Gh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Wh(e,t){var n=Gh(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Gh(n)}}function VI(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?VI(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ZI(){for(var e=window,t=Ws();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ws(e.document)}return t}function vm(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function bA(e){var t=ZI(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&VI(n.ownerDocument.documentElement,n)){if(r!==null&&vm(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=Wh(n,o);var a=Wh(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var NA=ar&&"documentMode"in document&&11>=document.documentMode,$i=null,Zf=null,ya=null,Yf=!1;function Vh(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Yf||$i==null||$i!==Ws(r)||(r=$i,"selectionStart"in r&&vm(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}),ya&&Ba(ya,r)||(ya=r,r=qs(Zf,"onSelect"),0<r.length&&(t=new mm("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=$i)))}function Kl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var _i={animationend:Kl("Animation","AnimationEnd"),animationiteration:Kl("Animation","AnimationIteration"),animationstart:Kl("Animation","AnimationStart"),transitionend:Kl("Transition","TransitionEnd")},Ad={},YI={};ar&&(YI=document.createElement("div").style,"AnimationEvent"in window||(delete _i.animationend.animation,delete _i.animationiteration.animation,delete _i.animationstart.animation),"TransitionEvent"in window||delete _i.transitionend.transition);function Zu(e){if(Ad[e])return Ad[e];if(!_i[e])return e;var t=_i[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in YI)return Ad[e]=t[n];return e}var QI=Zu("animationend"),JI=Zu("animationiteration"),XI=Zu("animationstart"),qI=Zu("transitionend"),KI=new Map,Zh="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Hr(e,t){KI.set(e,t),Di(t,[e])}for(var Cd=0;Cd<Zh.length;Cd++){var Ed=Zh[Cd],SA=Ed.toLowerCase(),DA=Ed[0].toUpperCase()+Ed.slice(1);Hr(SA,"on"+DA)}Hr(QI,"onAnimationEnd");Hr(JI,"onAnimationIteration");Hr(XI,"onAnimationStart");Hr("dblclick","onDoubleClick");Hr("focusin","onFocus");Hr("focusout","onBlur");Hr(qI,"onTransitionEnd");so("onMouseEnter",["mouseout","mouseover"]);so("onMouseLeave",["mouseout","mouseover"]);so("onPointerEnter",["pointerout","pointerover"]);so("onPointerLeave",["pointerout","pointerover"]);Di("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Di("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Di("onBeforeInput",["compositionend","keypress","textInput","paste"]);Di("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Di("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Di("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ua="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),AA=new Set("cancel close invalid load scroll toggle".split(" ").concat(ua));function Yh(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,SD(r,t,void 0,e),e.currentTarget=null}function ew(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var l=r[a],s=l.instance,u=l.currentTarget;if(l=l.listener,s!==o&&i.isPropagationStopped())break e;Yh(i,l,u),o=s}else for(a=0;a<r.length;a++){if(l=r[a],s=l.instance,u=l.currentTarget,l=l.listener,s!==o&&i.isPropagationStopped())break e;Yh(i,l,u),o=s}}}if(Zs)throw e=Hf,Zs=!1,Hf=null,e}function Le(e,t){var n=t[Kf];n===void 0&&(n=t[Kf]=new Set);var r=e+"__bubble";n.has(r)||(tw(t,e,2,!1),n.add(r))}function Td(e,t,n){var r=0;t&&(r|=4),tw(n,e,r,t)}var es="_reactListening"+Math.random().toString(36).slice(2);function Ua(e){if(!e[es]){e[es]=!0,sI.forEach(function(n){n!=="selectionchange"&&(AA.has(n)||Td(n,!1,e),Td(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[es]||(t[es]=!0,Td("selectionchange",!1,t))}}function tw(e,t,n,r){switch(BI(t)){case 1:var i=_D;break;case 4:i=FD;break;default:i=fm}n=i.bind(null,t,n,e),i=void 0,!Ff||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function jd(e,t,n,r,i){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var l=r.stateNode.containerInfo;if(l===i||l.nodeType===8&&l.parentNode===i)break;if(a===4)for(a=r.return;a!==null;){var s=a.tag;if((s===3||s===4)&&(s=a.stateNode.containerInfo,s===i||s.nodeType===8&&s.parentNode===i))return;a=a.return}for(;l!==null;){if(a=ii(l),a===null)return;if(s=a.tag,s===5||s===6){r=o=a;continue e}l=l.parentNode}}r=r.return}NI(function(){var u=o,c=sm(n),d=[];e:{var f=KI.get(e);if(f!==void 0){var p=mm,g=e;switch(e){case"keypress":if(Es(n)===0)break e;case"keydown":case"keyup":p=rA;break;case"focusin":g="focus",p=Nd;break;case"focusout":g="blur",p=Nd;break;case"beforeblur":case"afterblur":p=Nd;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=kh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=WD;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=aA;break;case QI:case JI:case XI:p=YD;break;case qI:p=sA;break;case"scroll":p=HD;break;case"wheel":p=cA;break;case"copy":case"cut":case"paste":p=JD;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=Bh}var h=(t&4)!==0,w=!h&&e==="scroll",I=h?f!==null?f+"Capture":null:f;h=[];for(var y=u,M;y!==null;){M=y;var x=M.stateNode;if(M.tag===5&&x!==null&&(M=x,I!==null&&(x=Pa(y,I),x!=null&&h.push($a(y,x,M)))),w)break;y=y.return}0<h.length&&(f=new p(f,g,null,n,c),d.push({event:f,listeners:h}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&n!==$f&&(g=n.relatedTarget||n.fromElement)&&(ii(g)||g[lr]))break e;if((p||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,p?(g=n.relatedTarget||n.toElement,p=u,g=g?ii(g):null,g!==null&&(w=Ai(g),g!==w||g.tag!==5&&g.tag!==6)&&(g=null)):(p=null,g=u),p!==g)){if(h=kh,x="onMouseLeave",I="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(h=Bh,x="onPointerLeave",I="onPointerEnter",y="pointer"),w=p==null?f:Fi(p),M=g==null?f:Fi(g),f=new h(x,y+"leave",p,n,c),f.target=w,f.relatedTarget=M,x=null,ii(c)===u&&(h=new h(I,y+"enter",g,n,c),h.target=M,h.relatedTarget=w,x=h),w=x,p&&g)t:{for(h=p,I=g,y=0,M=h;M;M=Ri(M))y++;for(M=0,x=I;x;x=Ri(x))M++;for(;0<y-M;)h=Ri(h),y--;for(;0<M-y;)I=Ri(I),M--;for(;y--;){if(h===I||I!==null&&h===I.alternate)break t;h=Ri(h),I=Ri(I)}h=null}else h=null;p!==null&&Qh(d,f,p,h,!1),g!==null&&w!==null&&Qh(d,w,g,h,!0)}}e:{if(f=u?Fi(u):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var S=vA;else if(_h(f))if(GI)S=MA;else{S=IA;var b=yA}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(S=wA);if(S&&(S=S(e,u))){HI(d,S,n,c);break e}b&&b(e,f,u),e==="focusout"&&(b=f._wrapperState)&&b.controlled&&f.type==="number"&&Of(f,"number",f.value)}switch(b=u?Fi(u):window,e){case"focusin":(_h(b)||b.contentEditable==="true")&&($i=b,Zf=u,ya=null);break;case"focusout":ya=Zf=$i=null;break;case"mousedown":Yf=!0;break;case"contextmenu":case"mouseup":case"dragend":Yf=!1,Vh(d,n,c);break;case"selectionchange":if(NA)break;case"keydown":case"keyup":Vh(d,n,c)}var N;if(hm)e:{switch(e){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else Ui?_I(e,n)&&(C="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(C="onCompositionStart");C&&($I&&n.locale!=="ko"&&(Ui||C!=="onCompositionStart"?C==="onCompositionEnd"&&Ui&&(N=UI()):(br=c,pm="value"in br?br.value:br.textContent,Ui=!0)),b=qs(u,C),0<b.length&&(C=new zh(C,e,null,n,c),d.push({event:C,listeners:b}),N?C.data=N:(N=FI(n),N!==null&&(C.data=N)))),(N=fA?pA(e,n):mA(e,n))&&(u=qs(u,"onBeforeInput"),0<u.length&&(c=new zh("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:u}),c.data=N))}ew(d,t)})}function $a(e,t,n){return{instance:e,listener:t,currentTarget:n}}function qs(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=Pa(e,n),o!=null&&r.unshift($a(e,o,i)),o=Pa(e,t),o!=null&&r.push($a(e,o,i))),e=e.return}return r}function Ri(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Qh(e,t,n,r,i){for(var o=t._reactName,a=[];n!==null&&n!==r;){var l=n,s=l.alternate,u=l.stateNode;if(s!==null&&s===r)break;l.tag===5&&u!==null&&(l=u,i?(s=Pa(n,o),s!=null&&a.unshift($a(n,s,l))):i||(s=Pa(n,o),s!=null&&a.push($a(n,s,l)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var CA=/\r\n?/g,EA=/\u0000|\uFFFD/g;function Jh(e){return(typeof e=="string"?e:""+e).replace(CA,`
40
+ `).replace(EA,"")}function ts(e,t,n){if(t=Jh(t),Jh(e)!==t&&n)throw Error(G(425))}function Ks(){}var Qf=null,Jf=null;function Xf(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var qf=typeof setTimeout=="function"?setTimeout:void 0,TA=typeof clearTimeout=="function"?clearTimeout:void 0,Xh=typeof Promise=="function"?Promise:void 0,jA=typeof queueMicrotask=="function"?queueMicrotask:typeof Xh<"u"?function(e){return Xh.resolve(null).then(e).catch(LA)}:qf;function LA(e){setTimeout(function(){throw e})}function Ld(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),ka(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);ka(t)}function Tr(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function qh(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Eo=Math.random().toString(36).slice(2),$n="__reactFiber$"+Eo,_a="__reactProps$"+Eo,lr="__reactContainer$"+Eo,Kf="__reactEvents$"+Eo,PA="__reactListeners$"+Eo,RA="__reactHandles$"+Eo;function ii(e){var t=e[$n];if(t)return t;for(var n=e.parentNode;n;){if(t=n[lr]||n[$n]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=qh(e);e!==null;){if(n=e[$n])return n;e=qh(e)}return t}e=n,n=e.parentNode}return null}function fl(e){return e=e[$n]||e[lr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Fi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(G(33))}function Yu(e){return e[_a]||null}var ep=[],Hi=-1;function Gr(e){return{current:e}}function Re(e){0>Hi||(e.current=ep[Hi],ep[Hi]=null,Hi--)}function je(e,t){Hi++,ep[Hi]=e.current,e.current=t}var $r={},At=Gr($r),_t=Gr(!1),gi=$r;function uo(e,t){var n=e.type.contextTypes;if(!n)return $r;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ft(e){return e=e.childContextTypes,e!=null}function eu(){Re(_t),Re(At)}function Kh(e,t,n){if(At.current!==$r)throw Error(G(168));je(At,t),je(_t,n)}function nw(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(G(108,yD(e)||"Unknown",i));return Fe({},n,r)}function tu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||$r,gi=At.current,je(At,e),je(_t,_t.current),!0}function ev(e,t,n){var r=e.stateNode;if(!r)throw Error(G(169));n?(e=nw(e,t,gi),r.__reactInternalMemoizedMergedChildContext=e,Re(_t),Re(At),je(At,e)):Re(_t),je(_t,n)}var Kn=null,Qu=!1,Pd=!1;function rw(e){Kn===null?Kn=[e]:Kn.push(e)}function OA(e){Qu=!0,rw(e)}function Wr(){if(!Pd&&Kn!==null){Pd=!0;var e=0,t=Se;try{var n=Kn;for(Se=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Kn=null,Qu=!1}catch(i){throw Kn!==null&&(Kn=Kn.slice(e+1)),CI(um,Wr),i}finally{Se=t,Pd=!1}}return null}var Gi=[],Wi=0,nu=null,ru=0,mn=[],gn=0,hi=null,tr=1,nr="";function ei(e,t){Gi[Wi++]=ru,Gi[Wi++]=nu,nu=e,ru=t}function iw(e,t,n){mn[gn++]=tr,mn[gn++]=nr,mn[gn++]=hi,hi=e;var r=tr;e=nr;var i=32-jn(r)-1;r&=~(1<<i),n+=1;var o=32-jn(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,tr=1<<32-jn(t)+i|n<<i|r,nr=o+e}else tr=1<<o|n<<i|r,nr=e}function ym(e){e.return!==null&&(ei(e,1),iw(e,1,0))}function Im(e){for(;e===nu;)nu=Gi[--Wi],Gi[Wi]=null,ru=Gi[--Wi],Gi[Wi]=null;for(;e===hi;)hi=mn[--gn],mn[gn]=null,nr=mn[--gn],mn[gn]=null,tr=mn[--gn],mn[gn]=null}var qt=null,Qt=null,ze=!1,An=null;function ow(e,t){var n=hn(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function tv(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,qt=e,Qt=Tr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,qt=e,Qt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=hi!==null?{id:tr,overflow:nr}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=hn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,qt=e,Qt=null,!0):!1;default:return!1}}function tp(e){return(e.mode&1)!==0&&(e.flags&128)===0}function np(e){if(ze){var t=Qt;if(t){var n=t;if(!tv(e,t)){if(tp(e))throw Error(G(418));t=Tr(n.nextSibling);var r=qt;t&&tv(e,t)?ow(r,n):(e.flags=e.flags&-4097|2,ze=!1,qt=e)}}else{if(tp(e))throw Error(G(418));e.flags=e.flags&-4097|2,ze=!1,qt=e}}}function nv(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;qt=e}function ns(e){if(e!==qt)return!1;if(!ze)return nv(e),ze=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Xf(e.type,e.memoizedProps)),t&&(t=Qt)){if(tp(e))throw aw(),Error(G(418));for(;t;)ow(e,t),t=Tr(t.nextSibling)}if(nv(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(G(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Qt=Tr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Qt=null}}else Qt=qt?Tr(e.stateNode.nextSibling):null;return!0}function aw(){for(var e=Qt;e;)e=Tr(e.nextSibling)}function co(){Qt=qt=null,ze=!1}function wm(e){An===null?An=[e]:An.push(e)}var kA=dr.ReactCurrentBatchConfig;function Sn(e,t){if(e&&e.defaultProps){t=Fe({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var iu=Gr(null),ou=null,Vi=null,Mm=null;function xm(){Mm=Vi=ou=null}function bm(e){var t=iu.current;Re(iu),e._currentValue=t}function rp(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function to(e,t){ou=e,Mm=Vi=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ut=!0),e.firstContext=null)}function wn(e){var t=e._currentValue;if(Mm!==e)if(e={context:e,memoizedValue:t,next:null},Vi===null){if(ou===null)throw Error(G(308));Vi=e,ou.dependencies={lanes:0,firstContext:e}}else Vi=Vi.next=e;return t}var oi=null;function Nm(e){oi===null?oi=[e]:oi.push(e)}function lw(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Nm(t)):(n.next=i.next,i.next=n),t.interleaved=n,sr(e,r)}function sr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var hr=!1;function Sm(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function sw(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function rr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function jr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Me&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,sr(e,n)}return i=r.interleaved,i===null?(t.next=t,Nm(r)):(t.next=i.next,i.next=t),r.interleaved=t,sr(e,n)}function Ts(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,cm(e,n)}}function rv(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=a:o=o.next=a,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function au(e,t,n,r){var i=e.updateQueue;hr=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var s=l,u=s.next;s.next=null,a===null?o=u:a.next=u,a=s;var c=e.alternate;c!==null&&(c=c.updateQueue,l=c.lastBaseUpdate,l!==a&&(l===null?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=s))}if(o!==null){var d=i.baseState;a=0,c=u=s=null,l=o;do{var f=l.lane,p=l.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var g=e,h=l;switch(f=t,p=n,h.tag){case 1:if(g=h.payload,typeof g=="function"){d=g.call(p,d,f);break e}d=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=h.payload,f=typeof g=="function"?g.call(p,d,f):g,f==null)break e;d=Fe({},d,f);break e;case 2:hr=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[l]:f.push(l))}else p={eventTime:p,lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},c===null?(u=c=p,s=d):c=c.next=p,a|=f;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;f=l,l=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(1);if(c===null&&(s=d),i.baseState=s,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do a|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);yi|=a,e.lanes=a,e.memoizedState=d}}function iv(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(G(191,i));i.call(r)}}}var uw=new lI.Component().refs;function ip(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Fe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ju={isMounted:function(e){return(e=e._reactInternals)?Ai(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Pt(),i=Pr(e),o=rr(r,i);o.payload=t,n!=null&&(o.callback=n),t=jr(e,o,i),t!==null&&(Ln(t,e,i,r),Ts(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Pt(),i=Pr(e),o=rr(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=jr(e,o,i),t!==null&&(Ln(t,e,i,r),Ts(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Pt(),r=Pr(e),i=rr(n,r);i.tag=2,t!=null&&(i.callback=t),t=jr(e,i,r),t!==null&&(Ln(t,e,r,n),Ts(t,e,r))}};function ov(e,t,n,r,i,o,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,a):t.prototype&&t.prototype.isPureReactComponent?!Ba(n,r)||!Ba(i,o):!0}function cw(e,t,n){var r=!1,i=$r,o=t.contextType;return typeof o=="object"&&o!==null?o=wn(o):(i=Ft(t)?gi:At.current,r=t.contextTypes,o=(r=r!=null)?uo(e,i):$r),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ju,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function av(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ju.enqueueReplaceState(t,t.state,null)}function op(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=uw,Sm(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=wn(o):(o=Ft(t)?gi:At.current,i.context=uo(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(ip(e,t,o,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Ju.enqueueReplaceState(i,i.state,null),au(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Wo(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(G(309));var r=n.stateNode}if(!r)throw Error(G(147,e));var i=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(a){var l=i.refs;l===uw&&(l=i.refs={}),a===null?delete l[o]:l[o]=a},t._stringRef=o,t)}if(typeof e!="string")throw Error(G(284));if(!n._owner)throw Error(G(290,e))}return e}function rs(e,t){throw e=Object.prototype.toString.call(t),Error(G(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function lv(e){var t=e._init;return t(e._payload)}function dw(e){function t(I,y){if(e){var M=I.deletions;M===null?(I.deletions=[y],I.flags|=16):M.push(y)}}function n(I,y){if(!e)return null;for(;y!==null;)t(I,y),y=y.sibling;return null}function r(I,y){for(I=new Map;y!==null;)y.key!==null?I.set(y.key,y):I.set(y.index,y),y=y.sibling;return I}function i(I,y){return I=Rr(I,y),I.index=0,I.sibling=null,I}function o(I,y,M){return I.index=M,e?(M=I.alternate,M!==null?(M=M.index,M<y?(I.flags|=2,y):M):(I.flags|=2,y)):(I.flags|=1048576,y)}function a(I){return e&&I.alternate===null&&(I.flags|=2),I}function l(I,y,M,x){return y===null||y.tag!==6?(y=$d(M,I.mode,x),y.return=I,y):(y=i(y,M),y.return=I,y)}function s(I,y,M,x){var S=M.type;return S===Bi?c(I,y,M.props.children,x,M.key):y!==null&&(y.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===gr&&lv(S)===y.type)?(x=i(y,M.props),x.ref=Wo(I,y,M),x.return=I,x):(x=ks(M.type,M.key,M.props,null,I.mode,x),x.ref=Wo(I,y,M),x.return=I,x)}function u(I,y,M,x){return y===null||y.tag!==4||y.stateNode.containerInfo!==M.containerInfo||y.stateNode.implementation!==M.implementation?(y=_d(M,I.mode,x),y.return=I,y):(y=i(y,M.children||[]),y.return=I,y)}function c(I,y,M,x,S){return y===null||y.tag!==7?(y=pi(M,I.mode,x,S),y.return=I,y):(y=i(y,M),y.return=I,y)}function d(I,y,M){if(typeof y=="string"&&y!==""||typeof y=="number")return y=$d(""+y,I.mode,M),y.return=I,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Vl:return M=ks(y.type,y.key,y.props,null,I.mode,M),M.ref=Wo(I,null,y),M.return=I,M;case zi:return y=_d(y,I.mode,M),y.return=I,y;case gr:var x=y._init;return d(I,x(y._payload),M)}if(la(y)||$o(y))return y=pi(y,I.mode,M,null),y.return=I,y;rs(I,y)}return null}function f(I,y,M,x){var S=y!==null?y.key:null;if(typeof M=="string"&&M!==""||typeof M=="number")return S!==null?null:l(I,y,""+M,x);if(typeof M=="object"&&M!==null){switch(M.$$typeof){case Vl:return M.key===S?s(I,y,M,x):null;case zi:return M.key===S?u(I,y,M,x):null;case gr:return S=M._init,f(I,y,S(M._payload),x)}if(la(M)||$o(M))return S!==null?null:c(I,y,M,x,null);rs(I,M)}return null}function p(I,y,M,x,S){if(typeof x=="string"&&x!==""||typeof x=="number")return I=I.get(M)||null,l(y,I,""+x,S);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Vl:return I=I.get(x.key===null?M:x.key)||null,s(y,I,x,S);case zi:return I=I.get(x.key===null?M:x.key)||null,u(y,I,x,S);case gr:var b=x._init;return p(I,y,M,b(x._payload),S)}if(la(x)||$o(x))return I=I.get(M)||null,c(y,I,x,S,null);rs(y,x)}return null}function g(I,y,M,x){for(var S=null,b=null,N=y,C=y=0,P=null;N!==null&&C<M.length;C++){N.index>C?(P=N,N=null):P=N.sibling;var R=f(I,N,M[C],x);if(R===null){N===null&&(N=P);break}e&&N&&R.alternate===null&&t(I,N),y=o(R,y,C),b===null?S=R:b.sibling=R,b=R,N=P}if(C===M.length)return n(I,N),ze&&ei(I,C),S;if(N===null){for(;C<M.length;C++)N=d(I,M[C],x),N!==null&&(y=o(N,y,C),b===null?S=N:b.sibling=N,b=N);return ze&&ei(I,C),S}for(N=r(I,N);C<M.length;C++)P=p(N,I,C,M[C],x),P!==null&&(e&&P.alternate!==null&&N.delete(P.key===null?C:P.key),y=o(P,y,C),b===null?S=P:b.sibling=P,b=P);return e&&N.forEach(function(O){return t(I,O)}),ze&&ei(I,C),S}function h(I,y,M,x){var S=$o(M);if(typeof S!="function")throw Error(G(150));if(M=S.call(M),M==null)throw Error(G(151));for(var b=S=null,N=y,C=y=0,P=null,R=M.next();N!==null&&!R.done;C++,R=M.next()){N.index>C?(P=N,N=null):P=N.sibling;var O=f(I,N,R.value,x);if(O===null){N===null&&(N=P);break}e&&N&&O.alternate===null&&t(I,N),y=o(O,y,C),b===null?S=O:b.sibling=O,b=O,N=P}if(R.done)return n(I,N),ze&&ei(I,C),S;if(N===null){for(;!R.done;C++,R=M.next())R=d(I,R.value,x),R!==null&&(y=o(R,y,C),b===null?S=R:b.sibling=R,b=R);return ze&&ei(I,C),S}for(N=r(I,N);!R.done;C++,R=M.next())R=p(N,I,C,R.value,x),R!==null&&(e&&R.alternate!==null&&N.delete(R.key===null?C:R.key),y=o(R,y,C),b===null?S=R:b.sibling=R,b=R);return e&&N.forEach(function(J){return t(I,J)}),ze&&ei(I,C),S}function w(I,y,M,x){if(typeof M=="object"&&M!==null&&M.type===Bi&&M.key===null&&(M=M.props.children),typeof M=="object"&&M!==null){switch(M.$$typeof){case Vl:e:{for(var S=M.key,b=y;b!==null;){if(b.key===S){if(S=M.type,S===Bi){if(b.tag===7){n(I,b.sibling),y=i(b,M.props.children),y.return=I,I=y;break e}}else if(b.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===gr&&lv(S)===b.type){n(I,b.sibling),y=i(b,M.props),y.ref=Wo(I,b,M),y.return=I,I=y;break e}n(I,b);break}else t(I,b);b=b.sibling}M.type===Bi?(y=pi(M.props.children,I.mode,x,M.key),y.return=I,I=y):(x=ks(M.type,M.key,M.props,null,I.mode,x),x.ref=Wo(I,y,M),x.return=I,I=x)}return a(I);case zi:e:{for(b=M.key;y!==null;){if(y.key===b)if(y.tag===4&&y.stateNode.containerInfo===M.containerInfo&&y.stateNode.implementation===M.implementation){n(I,y.sibling),y=i(y,M.children||[]),y.return=I,I=y;break e}else{n(I,y);break}else t(I,y);y=y.sibling}y=_d(M,I.mode,x),y.return=I,I=y}return a(I);case gr:return b=M._init,w(I,y,b(M._payload),x)}if(la(M))return g(I,y,M,x);if($o(M))return h(I,y,M,x);rs(I,M)}return typeof M=="string"&&M!==""||typeof M=="number"?(M=""+M,y!==null&&y.tag===6?(n(I,y.sibling),y=i(y,M),y.return=I,I=y):(n(I,y),y=$d(M,I.mode,x),y.return=I,I=y),a(I)):n(I,y)}return w}var fo=dw(!0),fw=dw(!1),pl={},Hn=Gr(pl),Fa=Gr(pl),Ha=Gr(pl);function ai(e){if(e===pl)throw Error(G(174));return e}function Dm(e,t){switch(je(Ha,t),je(Fa,e),je(Hn,pl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:zf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=zf(t,e)}Re(Hn),je(Hn,t)}function po(){Re(Hn),Re(Fa),Re(Ha)}function pw(e){ai(Ha.current);var t=ai(Hn.current),n=zf(t,e.type);t!==n&&(je(Fa,e),je(Hn,n))}function Am(e){Fa.current===e&&(Re(Hn),Re(Fa))}var Ue=Gr(0);function lu(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Rd=[];function Cm(){for(var e=0;e<Rd.length;e++)Rd[e]._workInProgressVersionPrimary=null;Rd.length=0}var js=dr.ReactCurrentDispatcher,Od=dr.ReactCurrentBatchConfig,vi=0,_e=null,rt=null,lt=null,su=!1,Ia=!1,Ga=0,zA=0;function wt(){throw Error(G(321))}function Em(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Pn(e[n],t[n]))return!1;return!0}function Tm(e,t,n,r,i,o){if(vi=o,_e=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,js.current=e===null||e.memoizedState===null?_A:FA,e=n(r,i),Ia){o=0;do{if(Ia=!1,Ga=0,25<=o)throw Error(G(301));o+=1,lt=rt=null,t.updateQueue=null,js.current=HA,e=n(r,i)}while(Ia)}if(js.current=uu,t=rt!==null&&rt.next!==null,vi=0,lt=rt=_e=null,su=!1,t)throw Error(G(300));return e}function jm(){var e=Ga!==0;return Ga=0,e}function kn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return lt===null?_e.memoizedState=lt=e:lt=lt.next=e,lt}function Mn(){if(rt===null){var e=_e.alternate;e=e!==null?e.memoizedState:null}else e=rt.next;var t=lt===null?_e.memoizedState:lt.next;if(t!==null)lt=t,rt=e;else{if(e===null)throw Error(G(310));rt=e,e={memoizedState:rt.memoizedState,baseState:rt.baseState,baseQueue:rt.baseQueue,queue:rt.queue,next:null},lt===null?_e.memoizedState=lt=e:lt=lt.next=e}return lt}function Wa(e,t){return typeof t=="function"?t(e):t}function kd(e){var t=Mn(),n=t.queue;if(n===null)throw Error(G(311));n.lastRenderedReducer=e;var r=rt,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var a=i.next;i.next=o.next,o.next=a}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var l=a=null,s=null,u=o;do{var c=u.lane;if((vi&c)===c)s!==null&&(s=s.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};s===null?(l=s=d,a=r):s=s.next=d,_e.lanes|=c,yi|=c}u=u.next}while(u!==null&&u!==o);s===null?a=r:s.next=l,Pn(r,t.memoizedState)||(Ut=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=s,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do o=i.lane,_e.lanes|=o,yi|=o,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function zd(e){var t=Mn(),n=t.queue;if(n===null)throw Error(G(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var a=i=i.next;do o=e(o,a.action),a=a.next;while(a!==i);Pn(o,t.memoizedState)||(Ut=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function mw(){}function gw(e,t){var n=_e,r=Mn(),i=t(),o=!Pn(r.memoizedState,i);if(o&&(r.memoizedState=i,Ut=!0),r=r.queue,Lm(yw.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||lt!==null&&lt.memoizedState.tag&1){if(n.flags|=2048,Va(9,vw.bind(null,n,r,i,t),void 0,null),st===null)throw Error(G(349));vi&30||hw(n,t,i)}return i}function hw(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=_e.updateQueue,t===null?(t={lastEffect:null,stores:null},_e.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function vw(e,t,n,r){t.value=n,t.getSnapshot=r,Iw(t)&&ww(e)}function yw(e,t,n){return n(function(){Iw(t)&&ww(e)})}function Iw(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Pn(e,n)}catch{return!0}}function ww(e){var t=sr(e,1);t!==null&&Ln(t,e,1,-1)}function sv(e){var t=kn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Wa,lastRenderedState:e},t.queue=e,e=e.dispatch=$A.bind(null,_e,e),[t.memoizedState,e]}function Va(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=_e.updateQueue,t===null?(t={lastEffect:null,stores:null},_e.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Mw(){return Mn().memoizedState}function Ls(e,t,n,r){var i=kn();_e.flags|=e,i.memoizedState=Va(1|t,n,void 0,r===void 0?null:r)}function Xu(e,t,n,r){var i=Mn();r=r===void 0?null:r;var o=void 0;if(rt!==null){var a=rt.memoizedState;if(o=a.destroy,r!==null&&Em(r,a.deps)){i.memoizedState=Va(t,n,o,r);return}}_e.flags|=e,i.memoizedState=Va(1|t,n,o,r)}function uv(e,t){return Ls(8390656,8,e,t)}function Lm(e,t){return Xu(2048,8,e,t)}function xw(e,t){return Xu(4,2,e,t)}function bw(e,t){return Xu(4,4,e,t)}function Nw(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Sw(e,t,n){return n=n!=null?n.concat([e]):null,Xu(4,4,Nw.bind(null,t,e),n)}function Pm(){}function Dw(e,t){var n=Mn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Em(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Aw(e,t){var n=Mn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Em(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Cw(e,t,n){return vi&21?(Pn(n,t)||(n=jI(),_e.lanes|=n,yi|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ut=!0),e.memoizedState=n)}function BA(e,t){var n=Se;Se=n!==0&&4>n?n:4,e(!0);var r=Od.transition;Od.transition={};try{e(!1),t()}finally{Se=n,Od.transition=r}}function Ew(){return Mn().memoizedState}function UA(e,t,n){var r=Pr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Tw(e))jw(t,n);else if(n=lw(e,t,n,r),n!==null){var i=Pt();Ln(n,e,r,i),Lw(n,t,r)}}function $A(e,t,n){var r=Pr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Tw(e))jw(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,l=o(a,n);if(i.hasEagerState=!0,i.eagerState=l,Pn(l,a)){var s=t.interleaved;s===null?(i.next=i,Nm(t)):(i.next=s.next,s.next=i),t.interleaved=i;return}}catch{}finally{}n=lw(e,t,i,r),n!==null&&(i=Pt(),Ln(n,e,r,i),Lw(n,t,r))}}function Tw(e){var t=e.alternate;return e===_e||t!==null&&t===_e}function jw(e,t){Ia=su=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Lw(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,cm(e,n)}}var uu={readContext:wn,useCallback:wt,useContext:wt,useEffect:wt,useImperativeHandle:wt,useInsertionEffect:wt,useLayoutEffect:wt,useMemo:wt,useReducer:wt,useRef:wt,useState:wt,useDebugValue:wt,useDeferredValue:wt,useTransition:wt,useMutableSource:wt,useSyncExternalStore:wt,useId:wt,unstable_isNewReconciler:!1},_A={readContext:wn,useCallback:function(e,t){return kn().memoizedState=[e,t===void 0?null:t],e},useContext:wn,useEffect:uv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ls(4194308,4,Nw.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ls(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ls(4,2,e,t)},useMemo:function(e,t){var n=kn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=kn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=UA.bind(null,_e,e),[r.memoizedState,e]},useRef:function(e){var t=kn();return e={current:e},t.memoizedState=e},useState:sv,useDebugValue:Pm,useDeferredValue:function(e){return kn().memoizedState=e},useTransition:function(){var e=sv(!1),t=e[0];return e=BA.bind(null,e[1]),kn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=_e,i=kn();if(ze){if(n===void 0)throw Error(G(407));n=n()}else{if(n=t(),st===null)throw Error(G(349));vi&30||hw(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,uv(yw.bind(null,r,o,e),[e]),r.flags|=2048,Va(9,vw.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=kn(),t=st.identifierPrefix;if(ze){var n=nr,r=tr;n=(r&~(1<<32-jn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ga++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=zA++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},FA={readContext:wn,useCallback:Dw,useContext:wn,useEffect:Lm,useImperativeHandle:Sw,useInsertionEffect:xw,useLayoutEffect:bw,useMemo:Aw,useReducer:kd,useRef:Mw,useState:function(){return kd(Wa)},useDebugValue:Pm,useDeferredValue:function(e){var t=Mn();return Cw(t,rt.memoizedState,e)},useTransition:function(){var e=kd(Wa)[0],t=Mn().memoizedState;return[e,t]},useMutableSource:mw,useSyncExternalStore:gw,useId:Ew,unstable_isNewReconciler:!1},HA={readContext:wn,useCallback:Dw,useContext:wn,useEffect:Lm,useImperativeHandle:Sw,useInsertionEffect:xw,useLayoutEffect:bw,useMemo:Aw,useReducer:zd,useRef:Mw,useState:function(){return zd(Wa)},useDebugValue:Pm,useDeferredValue:function(e){var t=Mn();return rt===null?t.memoizedState=e:Cw(t,rt.memoizedState,e)},useTransition:function(){var e=zd(Wa)[0],t=Mn().memoizedState;return[e,t]},useMutableSource:mw,useSyncExternalStore:gw,useId:Ew,unstable_isNewReconciler:!1};function mo(e,t){try{var n="",r=t;do n+=vD(r),r=r.return;while(r);var i=n}catch(o){i=`
41
41
  Error generating stack: `+o.message+`
42
- `+o.stack}return{value:e,source:t,stack:i,digest:null}}function Bd(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function ap(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var WA=typeof WeakMap=="function"?WeakMap:Map;function Lw(e,t,n){n=rr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){du||(du=!0,hp=r),ap(e,t)},n}function Rw(e,t,n){n=rr(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){ap(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){ap(e,t),typeof r!="function"&&(Pr===null?Pr=new Set([this]):Pr.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function cv(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new WA;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=iC.bind(null,e,t,n),t.then(e,e))}function dv(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function fv(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=rr(-1,1),t.tag=2,jr(n,t,1))),n.lanes|=1),e)}var GA=dr.ReactCurrentOwner,Ut=!1;function jt(e,t,n,r){t.child=e===null?fw(t,null,n,r):fo(t,e.child,n,r)}function pv(e,t,n,r,i){n=n.render;var o=t.ref;return to(t,i),r=Tm(e,t,n,r,o,i),n=jm(),e!==null&&!Ut?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ur(e,t,i)):(ze&&n&&ym(t),t.flags|=1,jt(e,t,r,i),t.child)}function mv(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!_m(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Ow(e,t,o,r,i)):(e=ks(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var a=o.memoizedProps;if(n=n.compare,n=n!==null?n:Ba,n(a,r)&&e.ref===t.ref)return ur(e,t,i)}return t.flags|=1,e=Rr(o,r),e.ref=t.ref,e.return=t,t.child=e}function Ow(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(Ba(o,r)&&e.ref===t.ref)if(Ut=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(Ut=!0);else return t.lanes=e.lanes,ur(e,t,i)}return lp(e,t,n,r,i)}function kw(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},je(Yi,Zt),Zt|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,je(Yi,Zt),Zt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,je(Yi,Zt),Zt|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,je(Yi,Zt),Zt|=r;return jt(e,t,i,n),t.child}function zw(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function lp(e,t,n,r,i){var o=Ft(n)?gi:At.current;return o=uo(t,o),to(t,i),n=Tm(e,t,n,r,o,i),r=jm(),e!==null&&!Ut?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ur(e,t,i)):(ze&&r&&ym(t),t.flags|=1,jt(e,t,n,i),t.child)}function gv(e,t,n,r,i){if(Ft(n)){var o=!0;tu(t)}else o=!1;if(to(t,i),t.stateNode===null)Ls(e,t),cw(t,n,r),op(t,n,r,i),r=!0;else if(e===null){var a=t.stateNode,l=t.memoizedProps;a.props=l;var s=a.context,u=n.contextType;typeof u=="object"&&u!==null?u=wn(u):(u=Ft(n)?gi:At.current,u=uo(t,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof a.getSnapshotBeforeUpdate=="function";d||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==r||s!==u)&&av(t,a,r,u),hr=!1;var f=t.memoizedState;a.state=f,au(t,r,a,i),s=t.memoizedState,l!==r||f!==s||_t.current||hr?(typeof c=="function"&&(ip(t,n,c,r),s=t.memoizedState),(l=hr||ov(t,n,l,r,f,s,u))?(d||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=s),a.props=r,a.state=s,a.context=u,r=l):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,sw(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:Nn(t.type,l),a.props=u,d=t.pendingProps,f=a.context,s=n.contextType,typeof s=="object"&&s!==null?s=wn(s):(s=Ft(n)?gi:At.current,s=uo(t,s));var p=n.getDerivedStateFromProps;(c=typeof p=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==d||f!==s)&&av(t,a,r,s),hr=!1,f=t.memoizedState,a.state=f,au(t,r,a,i);var g=t.memoizedState;l!==d||f!==g||_t.current||hr?(typeof p=="function"&&(ip(t,n,p,r),g=t.memoizedState),(u=hr||ov(t,n,u,r,f,g,s)||!1)?(c||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,g,s),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,g,s)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=g),a.props=r,a.state=g,a.context=s,r=u):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return sp(e,t,n,r,o,i)}function sp(e,t,n,r,i,o){zw(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return i&&ev(t,n,!1),ur(e,t,o);r=t.stateNode,GA.current=t;var l=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=fo(t,e.child,null,o),t.child=fo(t,null,l,o)):jt(e,t,l,o),t.memoizedState=r.state,i&&ev(t,n,!0),t.child}function Bw(e){var t=e.stateNode;t.pendingContext?Kh(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Kh(e,t.context,!1),Dm(e,t.containerInfo)}function hv(e,t,n,r,i){return co(),wm(i),t.flags|=256,jt(e,t,n,r),t.child}var up={dehydrated:null,treeContext:null,retryLane:0};function cp(e){return{baseLanes:e,cachePool:null,transitions:null}}function Uw(e,t,n){var r=t.pendingProps,i=Ue.current,o=!1,a=(t.flags&128)!==0,l;if((l=a)||(l=e!==null&&e.memoizedState===null?!1:(i&2)!==0),l?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),je(Ue,i&1),e===null)return np(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=r.children,e=r.fallback,o?(r=t.mode,o=t.child,a={mode:"hidden",children:a},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=a):o=ec(a,r,0,null),e=pi(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=cp(n),t.memoizedState=up,e):Rm(t,a));if(i=e.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return VA(e,t,a,r,l,i,n);if(o){o=r.fallback,a=t.mode,i=e.child,l=i.sibling;var s={mode:"hidden",children:r.children};return!(a&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=s,t.deletions=null):(r=Rr(i,s),r.subtreeFlags=i.subtreeFlags&14680064),l!==null?o=Rr(l,o):(o=pi(o,a,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,a=e.child.memoizedState,a=a===null?cp(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},o.memoizedState=a,o.childLanes=e.childLanes&~n,t.memoizedState=up,r}return o=e.child,e=o.sibling,r=Rr(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Rm(e,t){return t=ec({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function is(e,t,n,r){return r!==null&&wm(r),fo(t,e.child,null,n),e=Rm(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function VA(e,t,n,r,i,o,a){if(n)return t.flags&256?(t.flags&=-257,r=Bd(Error(W(422))),is(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=ec({mode:"visible",children:r.children},i,0,null),o=pi(o,i,a,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&fo(t,e.child,null,a),t.child.memoizedState=cp(a),t.memoizedState=up,o);if(!(t.mode&1))return is(e,t,a,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var l=r.dgst;return r=l,o=Error(W(419)),r=Bd(o,r,void 0),is(e,t,a,r)}if(l=(a&e.childLanes)!==0,Ut||l){if(r=st,r!==null){switch(a&-a){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|a)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,sr(e,i),Pn(r,e,i,-1))}return $m(),r=Bd(Error(W(421))),is(e,t,a,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=oC.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,Qt=Tr(i.nextSibling),qt=t,ze=!0,An=null,e!==null&&(mn[gn++]=tr,mn[gn++]=nr,mn[gn++]=hi,tr=e.id,nr=e.overflow,hi=t),t=Rm(t,r.children),t.flags|=4096,t)}function vv(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),rp(e.return,t,n)}function Ud(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function $w(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(jt(e,t,r.children,n),r=Ue.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&vv(e,n,t);else if(e.tag===19)vv(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(je(Ue,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&lu(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Ud(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&lu(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Ud(t,!0,n,null,o);break;case"together":Ud(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ls(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ur(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),yi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(W(153));if(t.child!==null){for(e=t.child,n=Rr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Rr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ZA(e,t,n){switch(t.tag){case 3:Bw(t),co();break;case 5:pw(t);break;case 1:Ft(t.type)&&tu(t);break;case 4:Dm(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;je(iu,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(je(Ue,Ue.current&1),t.flags|=128,null):n&t.child.childLanes?Uw(e,t,n):(je(Ue,Ue.current&1),e=ur(e,t,n),e!==null?e.sibling:null);je(Ue,Ue.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return $w(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),je(Ue,Ue.current),r)break;return null;case 22:case 23:return t.lanes=0,kw(e,t,n)}return ur(e,t,n)}var _w,dp,Fw,Hw;_w=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};dp=function(){};Fw=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,ai(Hn.current);var o=null;switch(n){case"input":i=Lf(e,i),r=Lf(e,r),o=[];break;case"select":i=Fe({},i,{value:void 0}),r=Fe({},r,{value:void 0}),o=[];break;case"textarea":i=kf(e,i),r=kf(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ks)}Bf(n,r);var a;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var l=i[u];for(a in l)l.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(ja.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var s=r[u];if(l=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&s!==l&&(s!=null||l!=null))if(u==="style")if(l){for(a in l)!l.hasOwnProperty(a)||s&&s.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in s)s.hasOwnProperty(a)&&l[a]!==s[a]&&(n||(n={}),n[a]=s[a])}else n||(o||(o=[]),o.push(u,n)),n=s;else u==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,l=l?l.__html:void 0,s!=null&&l!==s&&(o=o||[]).push(u,s)):u==="children"?typeof s!="string"&&typeof s!="number"||(o=o||[]).push(u,""+s):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(ja.hasOwnProperty(u)?(s!=null&&u==="onScroll"&&Pe("scroll",e),o||l===s||(o=[])):(o=o||[]).push(u,s))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};Hw=function(e,t,n,r){n!==r&&(t.flags|=4)};function Vo(e,t){if(!ze)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function bt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function YA(e,t,n){var r=t.pendingProps;switch(Im(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return bt(t),null;case 1:return Ft(t.type)&&eu(),bt(t),null;case 3:return r=t.stateNode,po(),Re(_t),Re(At),Cm(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ns(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,An!==null&&(Ip(An),An=null))),dp(e,t),bt(t),null;case 5:Am(t);var i=ai(Ha.current);if(n=t.type,e!==null&&t.stateNode!=null)Fw(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(W(166));return bt(t),null}if(e=ai(Hn.current),ns(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[$n]=t,r[_a]=o,e=(t.mode&1)!==0,n){case"dialog":Pe("cancel",r),Pe("close",r);break;case"iframe":case"object":case"embed":Pe("load",r);break;case"video":case"audio":for(i=0;i<ua.length;i++)Pe(ua[i],r);break;case"source":Pe("error",r);break;case"img":case"image":case"link":Pe("error",r),Pe("load",r);break;case"details":Pe("toggle",r);break;case"input":Dh(r,o),Pe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},Pe("invalid",r);break;case"textarea":Ch(r,o),Pe("invalid",r)}Bf(n,o),i=null;for(var a in o)if(o.hasOwnProperty(a)){var l=o[a];a==="children"?typeof l=="string"?r.textContent!==l&&(o.suppressHydrationWarning!==!0&&ts(r.textContent,l,e),i=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(o.suppressHydrationWarning!==!0&&ts(r.textContent,l,e),i=["children",""+l]):ja.hasOwnProperty(a)&&l!=null&&a==="onScroll"&&Pe("scroll",r)}switch(n){case"input":Zl(r),Ah(r,o,!0);break;case"textarea":Zl(r),Eh(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=Ks)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=hI(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[$n]=t,e[_a]=r,_w(e,t,!1,!1),t.stateNode=e;e:{switch(a=Uf(n,r),n){case"dialog":Pe("cancel",e),Pe("close",e),i=r;break;case"iframe":case"object":case"embed":Pe("load",e),i=r;break;case"video":case"audio":for(i=0;i<ua.length;i++)Pe(ua[i],e);i=r;break;case"source":Pe("error",e),i=r;break;case"img":case"image":case"link":Pe("error",e),Pe("load",e),i=r;break;case"details":Pe("toggle",e),i=r;break;case"input":Dh(e,r),i=Lf(e,r),Pe("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Fe({},r,{value:void 0}),Pe("invalid",e);break;case"textarea":Ch(e,r),i=kf(e,r),Pe("invalid",e);break;default:i=r}Bf(n,i),l=i;for(o in l)if(l.hasOwnProperty(o)){var s=l[o];o==="style"?II(e,s):o==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,s!=null&&vI(e,s)):o==="children"?typeof s=="string"?(n!=="textarea"||s!=="")&&Pa(e,s):typeof s=="number"&&Pa(e,""+s):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(ja.hasOwnProperty(o)?s!=null&&o==="onScroll"&&Pe("scroll",e):s!=null&&im(e,o,s,a))}switch(n){case"input":Zl(e),Ah(e,r,!1);break;case"textarea":Zl(e),Eh(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Ur(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?Xi(e,!!r.multiple,o,!1):r.defaultValue!=null&&Xi(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Ks)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return bt(t),null;case 6:if(e&&t.stateNode!=null)Hw(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(W(166));if(n=ai(Ha.current),ai(Hn.current),ns(t)){if(r=t.stateNode,n=t.memoizedProps,r[$n]=t,(o=r.nodeValue!==n)&&(e=qt,e!==null))switch(e.tag){case 3:ts(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ts(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[$n]=t,t.stateNode=r}return bt(t),null;case 13:if(Re(Ue),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ze&&Qt!==null&&t.mode&1&&!(t.flags&128))aw(),co(),t.flags|=98560,o=!1;else if(o=ns(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(W(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(W(317));o[$n]=t}else co(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;bt(t),o=!1}else An!==null&&(Ip(An),An=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Ue.current&1?it===0&&(it=3):$m())),t.updateQueue!==null&&(t.flags|=4),bt(t),null);case 4:return po(),dp(e,t),e===null&&Ua(t.stateNode.containerInfo),bt(t),null;case 10:return Mm(t.type._context),bt(t),null;case 17:return Ft(t.type)&&eu(),bt(t),null;case 19:if(Re(Ue),o=t.memoizedState,o===null)return bt(t),null;if(r=(t.flags&128)!==0,a=o.rendering,a===null)if(r)Vo(o,!1);else{if(it!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=lu(e),a!==null){for(t.flags|=128,Vo(o,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,a=o.alternate,a===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=a.childLanes,o.lanes=a.lanes,o.child=a.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=a.memoizedProps,o.memoizedState=a.memoizedState,o.updateQueue=a.updateQueue,o.type=a.type,e=a.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return je(Ue,Ue.current&1|2),t.child}e=e.sibling}o.tail!==null&&Qe()>go&&(t.flags|=128,r=!0,Vo(o,!1),t.lanes=4194304)}else{if(!r)if(e=lu(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Vo(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!ze)return bt(t),null}else 2*Qe()-o.renderingStartTime>go&&n!==1073741824&&(t.flags|=128,r=!0,Vo(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Qe(),t.sibling=null,n=Ue.current,je(Ue,r?n&1|2:n&1),t):(bt(t),null);case 22:case 23:return Um(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Zt&1073741824&&(bt(t),t.subtreeFlags&6&&(t.flags|=8192)):bt(t),null;case 24:return null;case 25:return null}throw Error(W(156,t.tag))}function QA(e,t){switch(Im(t),t.tag){case 1:return Ft(t.type)&&eu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return po(),Re(_t),Re(At),Cm(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Am(t),null;case 13:if(Re(Ue),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(W(340));co()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Re(Ue),null;case 4:return po(),null;case 10:return Mm(t.type._context),null;case 22:case 23:return Um(),null;case 24:return null;default:return null}}var os=!1,St=!1,JA=typeof WeakSet=="function"?WeakSet:Set,te=null;function Zi(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ge(e,t,r)}else n.current=null}function fp(e,t,n){try{n()}catch(r){Ge(e,t,r)}}var yv=!1;function XA(e,t){if(Qf=Js,e=ZI(),vm(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.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 a=0,l=-1,s=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==n||i!==0&&d.nodeType!==3||(l=a+i),d!==o||r!==0&&d.nodeType!==3||(s=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++u===i&&(l=a),f===o&&++c===r&&(s=a),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=l===-1||s===-1?null:{start:l,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(Jf={focusedElem:e,selectionRange:n},Js=!1,te=t;te!==null;)if(t=te,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,te=e;else for(;te!==null;){t=te;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var h=g.memoizedProps,w=g.memoizedState,I=t.stateNode,y=I.getSnapshotBeforeUpdate(t.elementType===t.type?h:Nn(t.type,h),w);I.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(W(163))}}catch(x){Ge(t,t.return,x)}if(e=t.sibling,e!==null){e.return=t.return,te=e;break}te=t.return}return g=yv,yv=!1,g}function wa(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&fp(t,n,o)}i=i.next}while(i!==r)}}function qu(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function pp(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Ww(e){var t=e.alternate;t!==null&&(e.alternate=null,Ww(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[$n],delete t[_a],delete t[Kf],delete t[LA],delete t[RA])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Gw(e){return e.tag===5||e.tag===3||e.tag===4}function Iv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Gw(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function mp(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ks));else if(r!==4&&(e=e.child,e!==null))for(mp(e,t,n),e=e.sibling;e!==null;)mp(e,t,n),e=e.sibling}function gp(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(gp(e,t,n),e=e.sibling;e!==null;)gp(e,t,n),e=e.sibling}var gt=null,Dn=!1;function pr(e,t,n){for(n=n.child;n!==null;)Vw(e,t,n),n=n.sibling}function Vw(e,t,n){if(Fn&&typeof Fn.onCommitFiberUnmount=="function")try{Fn.onCommitFiberUnmount(Wu,n)}catch{}switch(n.tag){case 5:St||Zi(n,t);case 6:var r=gt,i=Dn;gt=null,pr(e,t,n),gt=r,Dn=i,gt!==null&&(Dn?(e=gt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):gt.removeChild(n.stateNode));break;case 18:gt!==null&&(Dn?(e=gt,n=n.stateNode,e.nodeType===8?Pd(e.parentNode,n):e.nodeType===1&&Pd(e,n),ka(e)):Pd(gt,n.stateNode));break;case 4:r=gt,i=Dn,gt=n.stateNode.containerInfo,Dn=!0,pr(e,t,n),gt=r,Dn=i;break;case 0:case 11:case 14:case 15:if(!St&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&fp(n,t,a),i=i.next}while(i!==r)}pr(e,t,n);break;case 1:if(!St&&(Zi(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Ge(n,t,l)}pr(e,t,n);break;case 21:pr(e,t,n);break;case 22:n.mode&1?(St=(r=St)||n.memoizedState!==null,pr(e,t,n),St=r):pr(e,t,n);break;default:pr(e,t,n)}}function wv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new JA),t.forEach(function(r){var i=aC.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Mn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,a=t,l=a;e:for(;l!==null;){switch(l.tag){case 5:gt=l.stateNode,Dn=!1;break e;case 3:gt=l.stateNode.containerInfo,Dn=!0;break e;case 4:gt=l.stateNode.containerInfo,Dn=!0;break e}l=l.return}if(gt===null)throw Error(W(160));Vw(o,a,i),gt=null,Dn=!1;var s=i.alternate;s!==null&&(s.return=null),i.return=null}catch(u){Ge(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Zw(t,e),t=t.sibling}function Zw(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Mn(t,e),On(e),r&4){try{wa(3,e,e.return),qu(3,e)}catch(h){Ge(e,e.return,h)}try{wa(5,e,e.return)}catch(h){Ge(e,e.return,h)}}break;case 1:Mn(t,e),On(e),r&512&&n!==null&&Zi(n,n.return);break;case 5:if(Mn(t,e),On(e),r&512&&n!==null&&Zi(n,n.return),e.flags&32){var i=e.stateNode;try{Pa(i,"")}catch(h){Ge(e,e.return,h)}}if(r&4&&(i=e.stateNode,i!=null)){var o=e.memoizedProps,a=n!==null?n.memoizedProps:o,l=e.type,s=e.updateQueue;if(e.updateQueue=null,s!==null)try{l==="input"&&o.type==="radio"&&o.name!=null&&mI(i,o),Uf(l,a);var u=Uf(l,o);for(a=0;a<s.length;a+=2){var c=s[a],d=s[a+1];c==="style"?II(i,d):c==="dangerouslySetInnerHTML"?vI(i,d):c==="children"?Pa(i,d):im(i,c,d,u)}switch(l){case"input":Rf(i,o);break;case"textarea":gI(i,o);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var p=o.value;p!=null?Xi(i,!!o.multiple,p,!1):f!==!!o.multiple&&(o.defaultValue!=null?Xi(i,!!o.multiple,o.defaultValue,!0):Xi(i,!!o.multiple,o.multiple?[]:"",!1))}i[_a]=o}catch(h){Ge(e,e.return,h)}}break;case 6:if(Mn(t,e),On(e),r&4){if(e.stateNode===null)throw Error(W(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(h){Ge(e,e.return,h)}}break;case 3:if(Mn(t,e),On(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ka(t.containerInfo)}catch(h){Ge(e,e.return,h)}break;case 4:Mn(t,e),On(e);break;case 13:Mn(t,e),On(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(zm=Qe())),r&4&&wv(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(St=(u=St)||c,Mn(t,e),St=u):Mn(t,e),On(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(te=e,c=e.child;c!==null;){for(d=te=c;te!==null;){switch(f=te,p=f.child,f.tag){case 0:case 11:case 14:case 15:wa(4,f,f.return);break;case 1:Zi(f,f.return);var g=f.stateNode;if(typeof g.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(h){Ge(r,n,h)}}break;case 5:Zi(f,f.return);break;case 22:if(f.memoizedState!==null){xv(d);continue}}p!==null?(p.return=f,te=p):xv(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{i=d.stateNode,u?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(l=d.stateNode,s=d.memoizedProps.style,a=s!=null&&s.hasOwnProperty("display")?s.display:null,l.style.display=yI("display",a))}catch(h){Ge(e,e.return,h)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(h){Ge(e,e.return,h)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Mn(t,e),On(e),r&4&&wv(e);break;case 21:break;default:Mn(t,e),On(e)}}function On(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Gw(n)){var r=n;break e}n=n.return}throw Error(W(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Pa(i,""),r.flags&=-33);var o=Iv(e);gp(e,o,i);break;case 3:case 4:var a=r.stateNode.containerInfo,l=Iv(e);mp(e,l,a);break;default:throw Error(W(161))}}catch(s){Ge(e,e.return,s)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function qA(e,t,n){te=e,Yw(e)}function Yw(e,t,n){for(var r=(e.mode&1)!==0;te!==null;){var i=te,o=i.child;if(i.tag===22&&r){var a=i.memoizedState!==null||os;if(!a){var l=i.alternate,s=l!==null&&l.memoizedState!==null||St;l=os;var u=St;if(os=a,(St=s)&&!u)for(te=i;te!==null;)a=te,s=a.child,a.tag===22&&a.memoizedState!==null?Mv(i):s!==null?(s.return=a,te=s):Mv(i);for(;o!==null;)te=o,Yw(o),o=o.sibling;te=i,os=l,St=u}bv(e)}else i.subtreeFlags&8772&&o!==null?(o.return=i,te=o):bv(e)}}function bv(e){for(;te!==null;){var t=te;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:St||qu(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!St)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:Nn(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&iv(t,o,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}iv(t,a,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var s=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":s.autoFocus&&n.focus();break;case"img":s.src&&(n.src=s.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&ka(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(W(163))}St||t.flags&512&&pp(t)}catch(f){Ge(t,t.return,f)}}if(t===e){te=null;break}if(n=t.sibling,n!==null){n.return=t.return,te=n;break}te=t.return}}function xv(e){for(;te!==null;){var t=te;if(t===e){te=null;break}var n=t.sibling;if(n!==null){n.return=t.return,te=n;break}te=t.return}}function Mv(e){for(;te!==null;){var t=te;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{qu(4,t)}catch(s){Ge(t,n,s)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(s){Ge(t,i,s)}}var o=t.return;try{pp(t)}catch(s){Ge(t,o,s)}break;case 5:var a=t.return;try{pp(t)}catch(s){Ge(t,a,s)}}}catch(s){Ge(t,t.return,s)}if(t===e){te=null;break}var l=t.sibling;if(l!==null){l.return=t.return,te=l;break}te=t.return}}var KA=Math.ceil,cu=dr.ReactCurrentDispatcher,Om=dr.ReactCurrentOwner,yn=dr.ReactCurrentBatchConfig,be=0,st=null,Ke=null,yt=0,Zt=0,Yi=Wr(0),it=0,Za=null,yi=0,Ku=0,km=0,ba=null,Bt=null,zm=0,go=1/0,qn=null,du=!1,hp=null,Pr=null,as=!1,Sr=null,fu=0,xa=0,vp=null,Rs=-1,Os=0;function Lt(){return be&6?Qe():Rs!==-1?Rs:Rs=Qe()}function Lr(e){return e.mode&1?be&2&&yt!==0?yt&-yt:kA.transition!==null?(Os===0&&(Os=jI()),Os):(e=Ne,e!==0||(e=window.event,e=e===void 0?16:BI(e.type)),e):1}function Pn(e,t,n,r){if(50<xa)throw xa=0,vp=null,Error(W(185));cl(e,n,r),(!(be&2)||e!==st)&&(e===st&&(!(be&2)&&(Ku|=n),it===4&&Ir(e,yt)),Ht(e,r),n===1&&be===0&&!(t.mode&1)&&(go=Qe()+500,Qu&&Gr()))}function Ht(e,t){var n=e.callbackNode;kD(e,t);var r=Qs(e,e===st?yt:0);if(r===0)n!==null&&Ph(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Ph(n),t===1)e.tag===0?OA(Sv.bind(null,e)):rw(Sv.bind(null,e)),jA(function(){!(be&6)&&Gr()}),n=null;else{switch(PI(r)){case 1:n=um;break;case 4:n=EI;break;case 16:n=Ys;break;case 536870912:n=TI;break;default:n=Ys}n=nb(n,Qw.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Qw(e,t){if(Rs=-1,Os=0,be&6)throw Error(W(327));var n=e.callbackNode;if(no()&&e.callbackNode!==n)return null;var r=Qs(e,e===st?yt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=pu(e,r);else{t=r;var i=be;be|=2;var o=Xw();(st!==e||yt!==t)&&(qn=null,go=Qe()+500,fi(e,t));do try{nC();break}catch(l){Jw(e,l)}while(1);xm(),cu.current=o,be=i,Ke!==null?t=0:(st=null,yt=0,t=it)}if(t!==0){if(t===2&&(i=Wf(e),i!==0&&(r=i,t=yp(e,i))),t===1)throw n=Za,fi(e,0),Ir(e,r),Ht(e,Qe()),n;if(t===6)Ir(e,r);else{if(i=e.current.alternate,!(r&30)&&!eC(i)&&(t=pu(e,r),t===2&&(o=Wf(e),o!==0&&(r=o,t=yp(e,o))),t===1))throw n=Za,fi(e,0),Ir(e,r),Ht(e,Qe()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(W(345));case 2:ti(e,Bt,qn);break;case 3:if(Ir(e,r),(r&130023424)===r&&(t=zm+500-Qe(),10<t)){if(Qs(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Lt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=qf(ti.bind(null,e,Bt,qn),t);break}ti(e,Bt,qn);break;case 4:if(Ir(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var a=31-jn(r);o=1<<a,a=t[a],a>i&&(i=a),r&=~o}if(r=i,r=Qe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*KA(r/1960))-r,10<r){e.timeoutHandle=qf(ti.bind(null,e,Bt,qn),r);break}ti(e,Bt,qn);break;case 5:ti(e,Bt,qn);break;default:throw Error(W(329))}}}return Ht(e,Qe()),e.callbackNode===n?Qw.bind(null,e):null}function yp(e,t){var n=ba;return e.current.memoizedState.isDehydrated&&(fi(e,t).flags|=256),e=pu(e,t),e!==2&&(t=Bt,Bt=n,t!==null&&Ip(t)),e}function Ip(e){Bt===null?Bt=e:Bt.push.apply(Bt,e)}function eC(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!Ln(o(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ir(e,t){for(t&=~km,t&=~Ku,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-jn(t),r=1<<n;e[n]=-1,t&=~r}}function Sv(e){if(be&6)throw Error(W(327));no();var t=Qs(e,0);if(!(t&1))return Ht(e,Qe()),null;var n=pu(e,t);if(e.tag!==0&&n===2){var r=Wf(e);r!==0&&(t=r,n=yp(e,r))}if(n===1)throw n=Za,fi(e,0),Ir(e,t),Ht(e,Qe()),n;if(n===6)throw Error(W(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ti(e,Bt,qn),Ht(e,Qe()),null}function Bm(e,t){var n=be;be|=1;try{return e(t)}finally{be=n,be===0&&(go=Qe()+500,Qu&&Gr())}}function Ii(e){Sr!==null&&Sr.tag===0&&!(be&6)&&no();var t=be;be|=1;var n=yn.transition,r=Ne;try{if(yn.transition=null,Ne=1,e)return e()}finally{Ne=r,yn.transition=n,be=t,!(be&6)&&Gr()}}function Um(){Zt=Yi.current,Re(Yi)}function fi(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,TA(n)),Ke!==null)for(n=Ke.return;n!==null;){var r=n;switch(Im(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&eu();break;case 3:po(),Re(_t),Re(At),Cm();break;case 5:Am(r);break;case 4:po();break;case 13:Re(Ue);break;case 19:Re(Ue);break;case 10:Mm(r.type._context);break;case 22:case 23:Um()}n=n.return}if(st=e,Ke=e=Rr(e.current,null),yt=Zt=t,it=0,Za=null,km=Ku=yi=0,Bt=ba=null,oi!==null){for(t=0;t<oi.length;t++)if(n=oi[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var a=o.next;o.next=i,r.next=a}n.pending=r}oi=null}return e}function Jw(e,t){do{var n=Ke;try{if(xm(),js.current=uu,su){for(var r=_e.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}su=!1}if(vi=0,lt=rt=_e=null,Ia=!1,Wa=0,Om.current=null,n===null||n.return===null){it=1,Za=t,Ke=null;break}e:{var o=e,a=n.return,l=n,s=t;if(t=yt,l.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){var u=s,c=l,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var p=dv(a);if(p!==null){p.flags&=-257,fv(p,a,l,o,t),p.mode&1&&cv(o,u,t),t=p,s=u;var g=t.updateQueue;if(g===null){var h=new Set;h.add(s),t.updateQueue=h}else g.add(s);break e}else{if(!(t&1)){cv(o,u,t),$m();break e}s=Error(W(426))}}else if(ze&&l.mode&1){var w=dv(a);if(w!==null){!(w.flags&65536)&&(w.flags|=256),fv(w,a,l,o,t),wm(mo(s,l));break e}}o=s=mo(s,l),it!==4&&(it=2),ba===null?ba=[o]:ba.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var I=Lw(o,s,t);rv(o,I);break e;case 1:l=s;var y=o.type,b=o.stateNode;if(!(o.flags&128)&&(typeof y.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Pr===null||!Pr.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t;var x=Rw(o,l,t);rv(o,x);break e}}o=o.return}while(o!==null)}Kw(n)}catch(N){t=N,Ke===n&&n!==null&&(Ke=n=n.return);continue}break}while(1)}function Xw(){var e=cu.current;return cu.current=uu,e===null?uu:e}function $m(){(it===0||it===3||it===2)&&(it=4),st===null||!(yi&268435455)&&!(Ku&268435455)||Ir(st,yt)}function pu(e,t){var n=be;be|=2;var r=Xw();(st!==e||yt!==t)&&(qn=null,fi(e,t));do try{tC();break}catch(i){Jw(e,i)}while(1);if(xm(),be=n,cu.current=r,Ke!==null)throw Error(W(261));return st=null,yt=0,it}function tC(){for(;Ke!==null;)qw(Ke)}function nC(){for(;Ke!==null&&!AD();)qw(Ke)}function qw(e){var t=tb(e.alternate,e,Zt);e.memoizedProps=e.pendingProps,t===null?Kw(e):Ke=t,Om.current=null}function Kw(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=QA(n,t),n!==null){n.flags&=32767,Ke=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{it=6,Ke=null;return}}else if(n=YA(n,t,Zt),n!==null){Ke=n;return}if(t=t.sibling,t!==null){Ke=t;return}Ke=t=e}while(t!==null);it===0&&(it=5)}function ti(e,t,n){var r=Ne,i=yn.transition;try{yn.transition=null,Ne=1,rC(e,t,n,r)}finally{yn.transition=i,Ne=r}return null}function rC(e,t,n,r){do no();while(Sr!==null);if(be&6)throw Error(W(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(W(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(zD(e,o),e===st&&(Ke=st=null,yt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||as||(as=!0,nb(Ys,function(){return no(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=yn.transition,yn.transition=null;var a=Ne;Ne=1;var l=be;be|=4,Om.current=null,XA(e,n),Zw(n,e),MA(Jf),Js=!!Qf,Jf=Qf=null,e.current=n,qA(n),CD(),be=l,Ne=a,yn.transition=o}else e.current=n;if(as&&(as=!1,Sr=e,fu=i),o=e.pendingLanes,o===0&&(Pr=null),jD(n.stateNode),Ht(e,Qe()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(du)throw du=!1,e=hp,hp=null,e;return fu&1&&e.tag!==0&&no(),o=e.pendingLanes,o&1?e===vp?xa++:(xa=0,vp=e):xa=0,Gr(),null}function no(){if(Sr!==null){var e=PI(fu),t=yn.transition,n=Ne;try{if(yn.transition=null,Ne=16>e?16:e,Sr===null)var r=!1;else{if(e=Sr,Sr=null,fu=0,be&6)throw Error(W(331));var i=be;for(be|=4,te=e.current;te!==null;){var o=te,a=o.child;if(te.flags&16){var l=o.deletions;if(l!==null){for(var s=0;s<l.length;s++){var u=l[s];for(te=u;te!==null;){var c=te;switch(c.tag){case 0:case 11:case 15:wa(8,c,o)}var d=c.child;if(d!==null)d.return=c,te=d;else for(;te!==null;){c=te;var f=c.sibling,p=c.return;if(Ww(c),c===u){te=null;break}if(f!==null){f.return=p,te=f;break}te=p}}}var g=o.alternate;if(g!==null){var h=g.child;if(h!==null){g.child=null;do{var w=h.sibling;h.sibling=null,h=w}while(h!==null)}}te=o}}if(o.subtreeFlags&2064&&a!==null)a.return=o,te=a;else e:for(;te!==null;){if(o=te,o.flags&2048)switch(o.tag){case 0:case 11:case 15:wa(9,o,o.return)}var I=o.sibling;if(I!==null){I.return=o.return,te=I;break e}te=o.return}}var y=e.current;for(te=y;te!==null;){a=te;var b=a.child;if(a.subtreeFlags&2064&&b!==null)b.return=a,te=b;else e:for(a=y;te!==null;){if(l=te,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:qu(9,l)}}catch(N){Ge(l,l.return,N)}if(l===a){te=null;break e}var x=l.sibling;if(x!==null){x.return=l.return,te=x;break e}te=l.return}}if(be=i,Gr(),Fn&&typeof Fn.onPostCommitFiberRoot=="function")try{Fn.onPostCommitFiberRoot(Wu,e)}catch{}r=!0}return r}finally{Ne=n,yn.transition=t}}return!1}function Nv(e,t,n){t=mo(n,t),t=Lw(e,t,1),e=jr(e,t,1),t=Lt(),e!==null&&(cl(e,1,t),Ht(e,t))}function Ge(e,t,n){if(e.tag===3)Nv(e,e,n);else for(;t!==null;){if(t.tag===3){Nv(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Pr===null||!Pr.has(r))){e=mo(n,e),e=Rw(t,e,1),t=jr(t,e,1),e=Lt(),t!==null&&(cl(t,1,e),Ht(t,e));break}}t=t.return}}function iC(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Lt(),e.pingedLanes|=e.suspendedLanes&n,st===e&&(yt&n)===n&&(it===4||it===3&&(yt&130023424)===yt&&500>Qe()-zm?fi(e,0):km|=n),Ht(e,t)}function eb(e,t){t===0&&(e.mode&1?(t=Jl,Jl<<=1,!(Jl&130023424)&&(Jl=4194304)):t=1);var n=Lt();e=sr(e,t),e!==null&&(cl(e,t,n),Ht(e,n))}function oC(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),eb(e,n)}function aC(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(W(314))}r!==null&&r.delete(t),eb(e,n)}var tb;tb=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||_t.current)Ut=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ut=!1,ZA(e,t,n);Ut=!!(e.flags&131072)}else Ut=!1,ze&&t.flags&1048576&&iw(t,ru,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ls(e,t),e=t.pendingProps;var i=uo(t,At.current);to(t,n),i=Tm(null,t,r,e,i,n);var o=jm();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ft(r)?(o=!0,tu(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Nm(t),i.updater=Ju,t.stateNode=i,i._reactInternals=t,op(t,r,e,n),t=sp(null,t,r,!0,o,n)):(t.tag=0,ze&&o&&ym(t),jt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ls(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=sC(r),e=Nn(r,e),i){case 0:t=lp(null,t,r,e,n);break e;case 1:t=gv(null,t,r,e,n);break e;case 11:t=pv(null,t,r,e,n);break e;case 14:t=mv(null,t,r,Nn(r.type,e),n);break e}throw Error(W(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Nn(r,i),lp(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Nn(r,i),gv(e,t,r,i,n);case 3:e:{if(Bw(t),e===null)throw Error(W(387));r=t.pendingProps,o=t.memoizedState,i=o.element,sw(e,t),au(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=mo(Error(W(423)),t),t=hv(e,t,r,n,i);break e}else if(r!==i){i=mo(Error(W(424)),t),t=hv(e,t,r,n,i);break e}else for(Qt=Tr(t.stateNode.containerInfo.firstChild),qt=t,ze=!0,An=null,n=fw(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(co(),r===i){t=ur(e,t,n);break e}jt(e,t,r,n)}t=t.child}return t;case 5:return pw(t),e===null&&np(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,Xf(r,i)?a=null:o!==null&&Xf(r,o)&&(t.flags|=32),zw(e,t),jt(e,t,a,n),t.child;case 6:return e===null&&np(t),null;case 13:return Uw(e,t,n);case 4:return Dm(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=fo(t,null,r,n):jt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Nn(r,i),pv(e,t,r,i,n);case 7:return jt(e,t,t.pendingProps,n),t.child;case 8:return jt(e,t,t.pendingProps.children,n),t.child;case 12:return jt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,je(iu,r._currentValue),r._currentValue=a,o!==null)if(Ln(o.value,a)){if(o.children===i.children&&!_t.current){t=ur(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){a=o.child;for(var s=l.firstContext;s!==null;){if(s.context===r){if(o.tag===1){s=rr(-1,n&-n),s.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?s.next=s:(s.next=c.next,c.next=s),u.pending=s}}o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),rp(o.return,n,t),l.lanes|=n;break}s=s.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(W(341));a.lanes|=n,l=a.alternate,l!==null&&(l.lanes|=n),rp(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}jt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,to(t,n),i=wn(i),r=r(i),t.flags|=1,jt(e,t,r,n),t.child;case 14:return r=t.type,i=Nn(r,t.pendingProps),i=Nn(r.type,i),mv(e,t,r,i,n);case 15:return Ow(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Nn(r,i),Ls(e,t),t.tag=1,Ft(r)?(e=!0,tu(t)):e=!1,to(t,n),cw(t,r,i),op(t,r,i,n),sp(null,t,r,!0,e,n);case 19:return $w(e,t,n);case 22:return kw(e,t,n)}throw Error(W(156,t.tag))};function nb(e,t){return CI(e,t)}function lC(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function hn(e,t,n,r){return new lC(e,t,n,r)}function _m(e){return e=e.prototype,!(!e||!e.isReactComponent)}function sC(e){if(typeof e=="function")return _m(e)?1:0;if(e!=null){if(e=e.$$typeof,e===am)return 11;if(e===lm)return 14}return 2}function Rr(e,t){var n=e.alternate;return n===null?(n=hn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ks(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")_m(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Bi:return pi(n.children,i,o,t);case om:a=8,i|=8;break;case Ef:return e=hn(12,n,t,i|2),e.elementType=Ef,e.lanes=o,e;case Tf:return e=hn(13,n,t,i),e.elementType=Tf,e.lanes=o,e;case jf:return e=hn(19,n,t,i),e.elementType=jf,e.lanes=o,e;case dI:return ec(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case uI:a=10;break e;case cI:a=9;break e;case am:a=11;break e;case lm:a=14;break e;case gr:a=16,r=null;break e}throw Error(W(130,e==null?e:typeof e,""))}return t=hn(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function pi(e,t,n,r){return e=hn(7,e,r,t),e.lanes=n,e}function ec(e,t,n,r){return e=hn(22,e,r,t),e.elementType=dI,e.lanes=n,e.stateNode={isHidden:!1},e}function $d(e,t,n){return e=hn(6,e,null,t),e.lanes=n,e}function _d(e,t,n){return t=hn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function uC(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=bd(0),this.expirationTimes=bd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bd(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Fm(e,t,n,r,i,o,a,l,s){return e=new uC(e,t,n,l,s),t===1?(t=1,o===!0&&(t|=8)):t=0,o=hn(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Nm(o),e}function cC(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:zi,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function rb(e){if(!e)return $r;e=e._reactInternals;e:{if(Ai(e)!==e||e.tag!==1)throw Error(W(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ft(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(W(171))}if(e.tag===1){var n=e.type;if(Ft(n))return nw(e,n,t)}return t}function ib(e,t,n,r,i,o,a,l,s){return e=Fm(n,r,!0,e,i,o,a,l,s),e.context=rb(null),n=e.current,r=Lt(),i=Lr(n),o=rr(r,i),o.callback=t??null,jr(n,o,i),e.current.lanes=i,cl(e,i,r),Ht(e,r),e}function tc(e,t,n,r){var i=t.current,o=Lt(),a=Lr(i);return n=rb(n),t.context===null?t.context=n:t.pendingContext=n,t=rr(o,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=jr(i,t,a),e!==null&&(Pn(e,i,a,o),Ts(e,i,a)),a}function mu(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Dv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Hm(e,t){Dv(e,t),(e=e.alternate)&&Dv(e,t)}function dC(){return null}var ob=typeof reportError=="function"?reportError:function(e){console.error(e)};function Wm(e){this._internalRoot=e}nc.prototype.render=Wm.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(W(409));tc(e,t,null,null)};nc.prototype.unmount=Wm.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ii(function(){tc(null,e,null,null)}),t[lr]=null}};function nc(e){this._internalRoot=e}nc.prototype.unstable_scheduleHydration=function(e){if(e){var t=OI();e={blockedOn:null,target:e,priority:t};for(var n=0;n<yr.length&&t!==0&&t<yr[n].priority;n++);yr.splice(n,0,e),n===0&&zI(e)}};function Gm(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function rc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Av(){}function fC(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var u=mu(a);o.call(u)}}var a=ib(t,r,e,0,null,!1,!1,"",Av);return e._reactRootContainer=a,e[lr]=a.current,Ua(e.nodeType===8?e.parentNode:e),Ii(),a}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var l=r;r=function(){var u=mu(s);l.call(u)}}var s=Fm(e,0,!1,null,null,!1,!1,"",Av);return e._reactRootContainer=s,e[lr]=s.current,Ua(e.nodeType===8?e.parentNode:e),Ii(function(){tc(t,s,n,r)}),s}function ic(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o;if(typeof i=="function"){var l=i;i=function(){var s=mu(a);l.call(s)}}tc(t,a,e,i)}else a=fC(n,t,e,i,r);return mu(a)}LI=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=sa(t.pendingLanes);n!==0&&(cm(t,n|1),Ht(t,Qe()),!(be&6)&&(go=Qe()+500,Gr()))}break;case 13:Ii(function(){var r=sr(e,1);if(r!==null){var i=Lt();Pn(r,e,1,i)}}),Hm(e,1)}};dm=function(e){if(e.tag===13){var t=sr(e,134217728);if(t!==null){var n=Lt();Pn(t,e,134217728,n)}Hm(e,134217728)}};RI=function(e){if(e.tag===13){var t=Lr(e),n=sr(e,t);if(n!==null){var r=Lt();Pn(n,e,t,r)}Hm(e,t)}};OI=function(){return Ne};kI=function(e,t){var n=Ne;try{return Ne=e,t()}finally{Ne=n}};_f=function(e,t,n){switch(t){case"input":if(Rf(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Yu(r);if(!i)throw Error(W(90));pI(r),Rf(r,i)}}}break;case"textarea":gI(e,n);break;case"select":t=n.value,t!=null&&Xi(e,!!n.multiple,t,!1)}};xI=Bm;MI=Ii;var pC={usingClientEntryPoint:!1,Events:[fl,Fi,Yu,wI,bI,Bm]},Zo={findFiberByHostInstance:ii,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},mC={bundleType:Zo.bundleType,version:Zo.version,rendererPackageName:Zo.rendererPackageName,rendererConfig:Zo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:dr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=DI(e),e===null?null:e.stateNode},findFiberByHostInstance:Zo.findFiberByHostInstance||dC,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ls=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ls.isDisabled&&ls.supportsFiber)try{Wu=ls.inject(mC),Fn=ls}catch{}}on.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=pC;on.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Gm(t))throw Error(W(200));return cC(e,t,null,n)};on.createRoot=function(e,t){if(!Gm(e))throw Error(W(299));var n=!1,r="",i=ob;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Fm(e,1,!1,null,null,n,!1,r,i),e[lr]=t.current,Ua(e.nodeType===8?e.parentNode:e),new Wm(t)};on.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(W(188)):(e=Object.keys(e).join(","),Error(W(268,e)));return e=DI(t),e=e===null?null:e.stateNode,e};on.flushSync=function(e){return Ii(e)};on.hydrate=function(e,t,n){if(!rc(t))throw Error(W(200));return ic(null,e,t,!0,n)};on.hydrateRoot=function(e,t,n){if(!Gm(e))throw Error(W(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",a=ob;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=ib(t,null,e,1,n??null,i,!1,o,a),e[lr]=t.current,Ua(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new nc(t)};on.render=function(e,t,n){if(!rc(t))throw Error(W(200));return ic(null,e,t,!1,n)};on.unmountComponentAtNode=function(e){if(!rc(e))throw Error(W(40));return e._reactRootContainer?(Ii(function(){ic(null,null,e,!1,function(){e._reactRootContainer=null,e[lr]=null})}),!0):!1};on.unstable_batchedUpdates=Bm;on.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!rc(n))throw Error(W(200));if(e==null||e._reactInternals===void 0)throw Error(W(38));return ic(e,t,n,!1,r)};on.version="18.2.0-next-9e3b772b8-20220608";function ab(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ab)}catch(e){console.error(e)}}ab(),iI.exports=on;var ml=iI.exports;const lb=sl(ml);var Cv=ml;Af.createRoot=Cv.createRoot,Af.hydrateRoot=Cv.hydrateRoot;var Ev=function(){throw new Error("Attempted to call useModal outside of modal context. Make sure your app is rendered inside ModalProvider.")},Vm=v.createContext({showModal:Ev,hideModal:Ev});Vm.displayName="ModalContext";var Ma=function(){return Ma=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Ma.apply(this,arguments)};function gC(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}var hC=v.memo(function(e){var t=e.component,n=gC(e,["component"]);return t(n)}),vC=v.memo(function(e){var t=e.modals,n=e.container,r=e.component,i=r===void 0?v.Fragment:r,o=v.useState(void 0),a=o[0],l=o[1];return v.useEffect(function(){return l(n||document.body)}),a?ml.createPortal(v.createElement(i,null,Object.keys(t).map(function(s){return v.createElement(hC,{key:s,component:t[s]})})),a):null}),yC=function(e){var t=e.container,n=e.rootComponent,r=e.children;if(t&&!(t instanceof HTMLElement))throw new Error(`Container must specify DOM element to mount modal root into.
42
+ `+o.stack}return{value:e,source:t,stack:i,digest:null}}function Bd(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function ap(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var GA=typeof WeakMap=="function"?WeakMap:Map;function Pw(e,t,n){n=rr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){du||(du=!0,hp=r),ap(e,t)},n}function Rw(e,t,n){n=rr(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){ap(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){ap(e,t),typeof r!="function"&&(Lr===null?Lr=new Set([this]):Lr.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function cv(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new GA;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=iC.bind(null,e,t,n),t.then(e,e))}function dv(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function fv(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=rr(-1,1),t.tag=2,jr(n,t,1))),n.lanes|=1),e)}var WA=dr.ReactCurrentOwner,Ut=!1;function jt(e,t,n,r){t.child=e===null?fw(t,null,n,r):fo(t,e.child,n,r)}function pv(e,t,n,r,i){n=n.render;var o=t.ref;return to(t,i),r=Tm(e,t,n,r,o,i),n=jm(),e!==null&&!Ut?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ur(e,t,i)):(ze&&n&&ym(t),t.flags|=1,jt(e,t,r,i),t.child)}function mv(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!_m(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Ow(e,t,o,r,i)):(e=ks(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var a=o.memoizedProps;if(n=n.compare,n=n!==null?n:Ba,n(a,r)&&e.ref===t.ref)return ur(e,t,i)}return t.flags|=1,e=Rr(o,r),e.ref=t.ref,e.return=t,t.child=e}function Ow(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(Ba(o,r)&&e.ref===t.ref)if(Ut=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(Ut=!0);else return t.lanes=e.lanes,ur(e,t,i)}return lp(e,t,n,r,i)}function kw(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},je(Yi,Zt),Zt|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,je(Yi,Zt),Zt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,je(Yi,Zt),Zt|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,je(Yi,Zt),Zt|=r;return jt(e,t,i,n),t.child}function zw(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function lp(e,t,n,r,i){var o=Ft(n)?gi:At.current;return o=uo(t,o),to(t,i),n=Tm(e,t,n,r,o,i),r=jm(),e!==null&&!Ut?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ur(e,t,i)):(ze&&r&&ym(t),t.flags|=1,jt(e,t,n,i),t.child)}function gv(e,t,n,r,i){if(Ft(n)){var o=!0;tu(t)}else o=!1;if(to(t,i),t.stateNode===null)Ps(e,t),cw(t,n,r),op(t,n,r,i),r=!0;else if(e===null){var a=t.stateNode,l=t.memoizedProps;a.props=l;var s=a.context,u=n.contextType;typeof u=="object"&&u!==null?u=wn(u):(u=Ft(n)?gi:At.current,u=uo(t,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof a.getSnapshotBeforeUpdate=="function";d||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==r||s!==u)&&av(t,a,r,u),hr=!1;var f=t.memoizedState;a.state=f,au(t,r,a,i),s=t.memoizedState,l!==r||f!==s||_t.current||hr?(typeof c=="function"&&(ip(t,n,c,r),s=t.memoizedState),(l=hr||ov(t,n,l,r,f,s,u))?(d||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=s),a.props=r,a.state=s,a.context=u,r=l):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,sw(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:Sn(t.type,l),a.props=u,d=t.pendingProps,f=a.context,s=n.contextType,typeof s=="object"&&s!==null?s=wn(s):(s=Ft(n)?gi:At.current,s=uo(t,s));var p=n.getDerivedStateFromProps;(c=typeof p=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==d||f!==s)&&av(t,a,r,s),hr=!1,f=t.memoizedState,a.state=f,au(t,r,a,i);var g=t.memoizedState;l!==d||f!==g||_t.current||hr?(typeof p=="function"&&(ip(t,n,p,r),g=t.memoizedState),(u=hr||ov(t,n,u,r,f,g,s)||!1)?(c||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,g,s),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,g,s)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=g),a.props=r,a.state=g,a.context=s,r=u):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return sp(e,t,n,r,o,i)}function sp(e,t,n,r,i,o){zw(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return i&&ev(t,n,!1),ur(e,t,o);r=t.stateNode,WA.current=t;var l=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=fo(t,e.child,null,o),t.child=fo(t,null,l,o)):jt(e,t,l,o),t.memoizedState=r.state,i&&ev(t,n,!0),t.child}function Bw(e){var t=e.stateNode;t.pendingContext?Kh(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Kh(e,t.context,!1),Dm(e,t.containerInfo)}function hv(e,t,n,r,i){return co(),wm(i),t.flags|=256,jt(e,t,n,r),t.child}var up={dehydrated:null,treeContext:null,retryLane:0};function cp(e){return{baseLanes:e,cachePool:null,transitions:null}}function Uw(e,t,n){var r=t.pendingProps,i=Ue.current,o=!1,a=(t.flags&128)!==0,l;if((l=a)||(l=e!==null&&e.memoizedState===null?!1:(i&2)!==0),l?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),je(Ue,i&1),e===null)return np(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=r.children,e=r.fallback,o?(r=t.mode,o=t.child,a={mode:"hidden",children:a},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=a):o=ec(a,r,0,null),e=pi(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=cp(n),t.memoizedState=up,e):Rm(t,a));if(i=e.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return VA(e,t,a,r,l,i,n);if(o){o=r.fallback,a=t.mode,i=e.child,l=i.sibling;var s={mode:"hidden",children:r.children};return!(a&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=s,t.deletions=null):(r=Rr(i,s),r.subtreeFlags=i.subtreeFlags&14680064),l!==null?o=Rr(l,o):(o=pi(o,a,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,a=e.child.memoizedState,a=a===null?cp(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},o.memoizedState=a,o.childLanes=e.childLanes&~n,t.memoizedState=up,r}return o=e.child,e=o.sibling,r=Rr(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Rm(e,t){return t=ec({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function is(e,t,n,r){return r!==null&&wm(r),fo(t,e.child,null,n),e=Rm(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function VA(e,t,n,r,i,o,a){if(n)return t.flags&256?(t.flags&=-257,r=Bd(Error(G(422))),is(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=ec({mode:"visible",children:r.children},i,0,null),o=pi(o,i,a,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&fo(t,e.child,null,a),t.child.memoizedState=cp(a),t.memoizedState=up,o);if(!(t.mode&1))return is(e,t,a,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var l=r.dgst;return r=l,o=Error(G(419)),r=Bd(o,r,void 0),is(e,t,a,r)}if(l=(a&e.childLanes)!==0,Ut||l){if(r=st,r!==null){switch(a&-a){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|a)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,sr(e,i),Ln(r,e,i,-1))}return $m(),r=Bd(Error(G(421))),is(e,t,a,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=oC.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,Qt=Tr(i.nextSibling),qt=t,ze=!0,An=null,e!==null&&(mn[gn++]=tr,mn[gn++]=nr,mn[gn++]=hi,tr=e.id,nr=e.overflow,hi=t),t=Rm(t,r.children),t.flags|=4096,t)}function vv(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),rp(e.return,t,n)}function Ud(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function $w(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(jt(e,t,r.children,n),r=Ue.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&vv(e,n,t);else if(e.tag===19)vv(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(je(Ue,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&lu(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Ud(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&lu(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Ud(t,!0,n,null,o);break;case"together":Ud(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ps(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ur(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),yi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(G(153));if(t.child!==null){for(e=t.child,n=Rr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Rr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ZA(e,t,n){switch(t.tag){case 3:Bw(t),co();break;case 5:pw(t);break;case 1:Ft(t.type)&&tu(t);break;case 4:Dm(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;je(iu,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(je(Ue,Ue.current&1),t.flags|=128,null):n&t.child.childLanes?Uw(e,t,n):(je(Ue,Ue.current&1),e=ur(e,t,n),e!==null?e.sibling:null);je(Ue,Ue.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return $w(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),je(Ue,Ue.current),r)break;return null;case 22:case 23:return t.lanes=0,kw(e,t,n)}return ur(e,t,n)}var _w,dp,Fw,Hw;_w=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};dp=function(){};Fw=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,ai(Hn.current);var o=null;switch(n){case"input":i=Pf(e,i),r=Pf(e,r),o=[];break;case"select":i=Fe({},i,{value:void 0}),r=Fe({},r,{value:void 0}),o=[];break;case"textarea":i=kf(e,i),r=kf(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ks)}Bf(n,r);var a;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var l=i[u];for(a in l)l.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(ja.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var s=r[u];if(l=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&s!==l&&(s!=null||l!=null))if(u==="style")if(l){for(a in l)!l.hasOwnProperty(a)||s&&s.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in s)s.hasOwnProperty(a)&&l[a]!==s[a]&&(n||(n={}),n[a]=s[a])}else n||(o||(o=[]),o.push(u,n)),n=s;else u==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,l=l?l.__html:void 0,s!=null&&l!==s&&(o=o||[]).push(u,s)):u==="children"?typeof s!="string"&&typeof s!="number"||(o=o||[]).push(u,""+s):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(ja.hasOwnProperty(u)?(s!=null&&u==="onScroll"&&Le("scroll",e),o||l===s||(o=[])):(o=o||[]).push(u,s))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};Hw=function(e,t,n,r){n!==r&&(t.flags|=4)};function Vo(e,t){if(!ze)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Mt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function YA(e,t,n){var r=t.pendingProps;switch(Im(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Mt(t),null;case 1:return Ft(t.type)&&eu(),Mt(t),null;case 3:return r=t.stateNode,po(),Re(_t),Re(At),Cm(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ns(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,An!==null&&(Ip(An),An=null))),dp(e,t),Mt(t),null;case 5:Am(t);var i=ai(Ha.current);if(n=t.type,e!==null&&t.stateNode!=null)Fw(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(G(166));return Mt(t),null}if(e=ai(Hn.current),ns(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[$n]=t,r[_a]=o,e=(t.mode&1)!==0,n){case"dialog":Le("cancel",r),Le("close",r);break;case"iframe":case"object":case"embed":Le("load",r);break;case"video":case"audio":for(i=0;i<ua.length;i++)Le(ua[i],r);break;case"source":Le("error",r);break;case"img":case"image":case"link":Le("error",r),Le("load",r);break;case"details":Le("toggle",r);break;case"input":Dh(r,o),Le("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},Le("invalid",r);break;case"textarea":Ch(r,o),Le("invalid",r)}Bf(n,o),i=null;for(var a in o)if(o.hasOwnProperty(a)){var l=o[a];a==="children"?typeof l=="string"?r.textContent!==l&&(o.suppressHydrationWarning!==!0&&ts(r.textContent,l,e),i=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(o.suppressHydrationWarning!==!0&&ts(r.textContent,l,e),i=["children",""+l]):ja.hasOwnProperty(a)&&l!=null&&a==="onScroll"&&Le("scroll",r)}switch(n){case"input":Zl(r),Ah(r,o,!0);break;case"textarea":Zl(r),Eh(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=Ks)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=hI(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[$n]=t,e[_a]=r,_w(e,t,!1,!1),t.stateNode=e;e:{switch(a=Uf(n,r),n){case"dialog":Le("cancel",e),Le("close",e),i=r;break;case"iframe":case"object":case"embed":Le("load",e),i=r;break;case"video":case"audio":for(i=0;i<ua.length;i++)Le(ua[i],e);i=r;break;case"source":Le("error",e),i=r;break;case"img":case"image":case"link":Le("error",e),Le("load",e),i=r;break;case"details":Le("toggle",e),i=r;break;case"input":Dh(e,r),i=Pf(e,r),Le("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Fe({},r,{value:void 0}),Le("invalid",e);break;case"textarea":Ch(e,r),i=kf(e,r),Le("invalid",e);break;default:i=r}Bf(n,i),l=i;for(o in l)if(l.hasOwnProperty(o)){var s=l[o];o==="style"?II(e,s):o==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,s!=null&&vI(e,s)):o==="children"?typeof s=="string"?(n!=="textarea"||s!=="")&&La(e,s):typeof s=="number"&&La(e,""+s):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(ja.hasOwnProperty(o)?s!=null&&o==="onScroll"&&Le("scroll",e):s!=null&&im(e,o,s,a))}switch(n){case"input":Zl(e),Ah(e,r,!1);break;case"textarea":Zl(e),Eh(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Ur(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?Xi(e,!!r.multiple,o,!1):r.defaultValue!=null&&Xi(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Ks)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Mt(t),null;case 6:if(e&&t.stateNode!=null)Hw(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(G(166));if(n=ai(Ha.current),ai(Hn.current),ns(t)){if(r=t.stateNode,n=t.memoizedProps,r[$n]=t,(o=r.nodeValue!==n)&&(e=qt,e!==null))switch(e.tag){case 3:ts(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ts(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[$n]=t,t.stateNode=r}return Mt(t),null;case 13:if(Re(Ue),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ze&&Qt!==null&&t.mode&1&&!(t.flags&128))aw(),co(),t.flags|=98560,o=!1;else if(o=ns(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(G(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(G(317));o[$n]=t}else co(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Mt(t),o=!1}else An!==null&&(Ip(An),An=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Ue.current&1?it===0&&(it=3):$m())),t.updateQueue!==null&&(t.flags|=4),Mt(t),null);case 4:return po(),dp(e,t),e===null&&Ua(t.stateNode.containerInfo),Mt(t),null;case 10:return bm(t.type._context),Mt(t),null;case 17:return Ft(t.type)&&eu(),Mt(t),null;case 19:if(Re(Ue),o=t.memoizedState,o===null)return Mt(t),null;if(r=(t.flags&128)!==0,a=o.rendering,a===null)if(r)Vo(o,!1);else{if(it!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=lu(e),a!==null){for(t.flags|=128,Vo(o,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,a=o.alternate,a===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=a.childLanes,o.lanes=a.lanes,o.child=a.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=a.memoizedProps,o.memoizedState=a.memoizedState,o.updateQueue=a.updateQueue,o.type=a.type,e=a.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return je(Ue,Ue.current&1|2),t.child}e=e.sibling}o.tail!==null&&Qe()>go&&(t.flags|=128,r=!0,Vo(o,!1),t.lanes=4194304)}else{if(!r)if(e=lu(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Vo(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!ze)return Mt(t),null}else 2*Qe()-o.renderingStartTime>go&&n!==1073741824&&(t.flags|=128,r=!0,Vo(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Qe(),t.sibling=null,n=Ue.current,je(Ue,r?n&1|2:n&1),t):(Mt(t),null);case 22:case 23:return Um(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Zt&1073741824&&(Mt(t),t.subtreeFlags&6&&(t.flags|=8192)):Mt(t),null;case 24:return null;case 25:return null}throw Error(G(156,t.tag))}function QA(e,t){switch(Im(t),t.tag){case 1:return Ft(t.type)&&eu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return po(),Re(_t),Re(At),Cm(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Am(t),null;case 13:if(Re(Ue),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(G(340));co()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Re(Ue),null;case 4:return po(),null;case 10:return bm(t.type._context),null;case 22:case 23:return Um(),null;case 24:return null;default:return null}}var os=!1,Nt=!1,JA=typeof WeakSet=="function"?WeakSet:Set,te=null;function Zi(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){We(e,t,r)}else n.current=null}function fp(e,t,n){try{n()}catch(r){We(e,t,r)}}var yv=!1;function XA(e,t){if(Qf=Js,e=ZI(),vm(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.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 a=0,l=-1,s=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==n||i!==0&&d.nodeType!==3||(l=a+i),d!==o||r!==0&&d.nodeType!==3||(s=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++u===i&&(l=a),f===o&&++c===r&&(s=a),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=l===-1||s===-1?null:{start:l,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(Jf={focusedElem:e,selectionRange:n},Js=!1,te=t;te!==null;)if(t=te,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,te=e;else for(;te!==null;){t=te;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var h=g.memoizedProps,w=g.memoizedState,I=t.stateNode,y=I.getSnapshotBeforeUpdate(t.elementType===t.type?h:Sn(t.type,h),w);I.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var M=t.stateNode.containerInfo;M.nodeType===1?M.textContent="":M.nodeType===9&&M.documentElement&&M.removeChild(M.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(G(163))}}catch(x){We(t,t.return,x)}if(e=t.sibling,e!==null){e.return=t.return,te=e;break}te=t.return}return g=yv,yv=!1,g}function wa(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&fp(t,n,o)}i=i.next}while(i!==r)}}function qu(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function pp(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Gw(e){var t=e.alternate;t!==null&&(e.alternate=null,Gw(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[$n],delete t[_a],delete t[Kf],delete t[PA],delete t[RA])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Ww(e){return e.tag===5||e.tag===3||e.tag===4}function Iv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ww(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function mp(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ks));else if(r!==4&&(e=e.child,e!==null))for(mp(e,t,n),e=e.sibling;e!==null;)mp(e,t,n),e=e.sibling}function gp(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(gp(e,t,n),e=e.sibling;e!==null;)gp(e,t,n),e=e.sibling}var gt=null,Dn=!1;function pr(e,t,n){for(n=n.child;n!==null;)Vw(e,t,n),n=n.sibling}function Vw(e,t,n){if(Fn&&typeof Fn.onCommitFiberUnmount=="function")try{Fn.onCommitFiberUnmount(Gu,n)}catch{}switch(n.tag){case 5:Nt||Zi(n,t);case 6:var r=gt,i=Dn;gt=null,pr(e,t,n),gt=r,Dn=i,gt!==null&&(Dn?(e=gt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):gt.removeChild(n.stateNode));break;case 18:gt!==null&&(Dn?(e=gt,n=n.stateNode,e.nodeType===8?Ld(e.parentNode,n):e.nodeType===1&&Ld(e,n),ka(e)):Ld(gt,n.stateNode));break;case 4:r=gt,i=Dn,gt=n.stateNode.containerInfo,Dn=!0,pr(e,t,n),gt=r,Dn=i;break;case 0:case 11:case 14:case 15:if(!Nt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&fp(n,t,a),i=i.next}while(i!==r)}pr(e,t,n);break;case 1:if(!Nt&&(Zi(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){We(n,t,l)}pr(e,t,n);break;case 21:pr(e,t,n);break;case 22:n.mode&1?(Nt=(r=Nt)||n.memoizedState!==null,pr(e,t,n),Nt=r):pr(e,t,n);break;default:pr(e,t,n)}}function wv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new JA),t.forEach(function(r){var i=aC.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function bn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,a=t,l=a;e:for(;l!==null;){switch(l.tag){case 5:gt=l.stateNode,Dn=!1;break e;case 3:gt=l.stateNode.containerInfo,Dn=!0;break e;case 4:gt=l.stateNode.containerInfo,Dn=!0;break e}l=l.return}if(gt===null)throw Error(G(160));Vw(o,a,i),gt=null,Dn=!1;var s=i.alternate;s!==null&&(s.return=null),i.return=null}catch(u){We(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Zw(t,e),t=t.sibling}function Zw(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(bn(t,e),On(e),r&4){try{wa(3,e,e.return),qu(3,e)}catch(h){We(e,e.return,h)}try{wa(5,e,e.return)}catch(h){We(e,e.return,h)}}break;case 1:bn(t,e),On(e),r&512&&n!==null&&Zi(n,n.return);break;case 5:if(bn(t,e),On(e),r&512&&n!==null&&Zi(n,n.return),e.flags&32){var i=e.stateNode;try{La(i,"")}catch(h){We(e,e.return,h)}}if(r&4&&(i=e.stateNode,i!=null)){var o=e.memoizedProps,a=n!==null?n.memoizedProps:o,l=e.type,s=e.updateQueue;if(e.updateQueue=null,s!==null)try{l==="input"&&o.type==="radio"&&o.name!=null&&mI(i,o),Uf(l,a);var u=Uf(l,o);for(a=0;a<s.length;a+=2){var c=s[a],d=s[a+1];c==="style"?II(i,d):c==="dangerouslySetInnerHTML"?vI(i,d):c==="children"?La(i,d):im(i,c,d,u)}switch(l){case"input":Rf(i,o);break;case"textarea":gI(i,o);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var p=o.value;p!=null?Xi(i,!!o.multiple,p,!1):f!==!!o.multiple&&(o.defaultValue!=null?Xi(i,!!o.multiple,o.defaultValue,!0):Xi(i,!!o.multiple,o.multiple?[]:"",!1))}i[_a]=o}catch(h){We(e,e.return,h)}}break;case 6:if(bn(t,e),On(e),r&4){if(e.stateNode===null)throw Error(G(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(h){We(e,e.return,h)}}break;case 3:if(bn(t,e),On(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ka(t.containerInfo)}catch(h){We(e,e.return,h)}break;case 4:bn(t,e),On(e);break;case 13:bn(t,e),On(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(zm=Qe())),r&4&&wv(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(Nt=(u=Nt)||c,bn(t,e),Nt=u):bn(t,e),On(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(te=e,c=e.child;c!==null;){for(d=te=c;te!==null;){switch(f=te,p=f.child,f.tag){case 0:case 11:case 14:case 15:wa(4,f,f.return);break;case 1:Zi(f,f.return);var g=f.stateNode;if(typeof g.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(h){We(r,n,h)}}break;case 5:Zi(f,f.return);break;case 22:if(f.memoizedState!==null){xv(d);continue}}p!==null?(p.return=f,te=p):xv(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{i=d.stateNode,u?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(l=d.stateNode,s=d.memoizedProps.style,a=s!=null&&s.hasOwnProperty("display")?s.display:null,l.style.display=yI("display",a))}catch(h){We(e,e.return,h)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(h){We(e,e.return,h)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:bn(t,e),On(e),r&4&&wv(e);break;case 21:break;default:bn(t,e),On(e)}}function On(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Ww(n)){var r=n;break e}n=n.return}throw Error(G(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(La(i,""),r.flags&=-33);var o=Iv(e);gp(e,o,i);break;case 3:case 4:var a=r.stateNode.containerInfo,l=Iv(e);mp(e,l,a);break;default:throw Error(G(161))}}catch(s){We(e,e.return,s)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function qA(e,t,n){te=e,Yw(e)}function Yw(e,t,n){for(var r=(e.mode&1)!==0;te!==null;){var i=te,o=i.child;if(i.tag===22&&r){var a=i.memoizedState!==null||os;if(!a){var l=i.alternate,s=l!==null&&l.memoizedState!==null||Nt;l=os;var u=Nt;if(os=a,(Nt=s)&&!u)for(te=i;te!==null;)a=te,s=a.child,a.tag===22&&a.memoizedState!==null?bv(i):s!==null?(s.return=a,te=s):bv(i);for(;o!==null;)te=o,Yw(o),o=o.sibling;te=i,os=l,Nt=u}Mv(e)}else i.subtreeFlags&8772&&o!==null?(o.return=i,te=o):Mv(e)}}function Mv(e){for(;te!==null;){var t=te;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Nt||qu(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Nt)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:Sn(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&iv(t,o,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}iv(t,a,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var s=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":s.autoFocus&&n.focus();break;case"img":s.src&&(n.src=s.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&ka(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(G(163))}Nt||t.flags&512&&pp(t)}catch(f){We(t,t.return,f)}}if(t===e){te=null;break}if(n=t.sibling,n!==null){n.return=t.return,te=n;break}te=t.return}}function xv(e){for(;te!==null;){var t=te;if(t===e){te=null;break}var n=t.sibling;if(n!==null){n.return=t.return,te=n;break}te=t.return}}function bv(e){for(;te!==null;){var t=te;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{qu(4,t)}catch(s){We(t,n,s)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(s){We(t,i,s)}}var o=t.return;try{pp(t)}catch(s){We(t,o,s)}break;case 5:var a=t.return;try{pp(t)}catch(s){We(t,a,s)}}}catch(s){We(t,t.return,s)}if(t===e){te=null;break}var l=t.sibling;if(l!==null){l.return=t.return,te=l;break}te=t.return}}var KA=Math.ceil,cu=dr.ReactCurrentDispatcher,Om=dr.ReactCurrentOwner,yn=dr.ReactCurrentBatchConfig,Me=0,st=null,Ke=null,yt=0,Zt=0,Yi=Gr(0),it=0,Za=null,yi=0,Ku=0,km=0,Ma=null,Bt=null,zm=0,go=1/0,qn=null,du=!1,hp=null,Lr=null,as=!1,Nr=null,fu=0,xa=0,vp=null,Rs=-1,Os=0;function Pt(){return Me&6?Qe():Rs!==-1?Rs:Rs=Qe()}function Pr(e){return e.mode&1?Me&2&&yt!==0?yt&-yt:kA.transition!==null?(Os===0&&(Os=jI()),Os):(e=Se,e!==0||(e=window.event,e=e===void 0?16:BI(e.type)),e):1}function Ln(e,t,n,r){if(50<xa)throw xa=0,vp=null,Error(G(185));cl(e,n,r),(!(Me&2)||e!==st)&&(e===st&&(!(Me&2)&&(Ku|=n),it===4&&Ir(e,yt)),Ht(e,r),n===1&&Me===0&&!(t.mode&1)&&(go=Qe()+500,Qu&&Wr()))}function Ht(e,t){var n=e.callbackNode;kD(e,t);var r=Qs(e,e===st?yt:0);if(r===0)n!==null&&Lh(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Lh(n),t===1)e.tag===0?OA(Nv.bind(null,e)):rw(Nv.bind(null,e)),jA(function(){!(Me&6)&&Wr()}),n=null;else{switch(LI(r)){case 1:n=um;break;case 4:n=EI;break;case 16:n=Ys;break;case 536870912:n=TI;break;default:n=Ys}n=nM(n,Qw.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Qw(e,t){if(Rs=-1,Os=0,Me&6)throw Error(G(327));var n=e.callbackNode;if(no()&&e.callbackNode!==n)return null;var r=Qs(e,e===st?yt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=pu(e,r);else{t=r;var i=Me;Me|=2;var o=Xw();(st!==e||yt!==t)&&(qn=null,go=Qe()+500,fi(e,t));do try{nC();break}catch(l){Jw(e,l)}while(1);xm(),cu.current=o,Me=i,Ke!==null?t=0:(st=null,yt=0,t=it)}if(t!==0){if(t===2&&(i=Gf(e),i!==0&&(r=i,t=yp(e,i))),t===1)throw n=Za,fi(e,0),Ir(e,r),Ht(e,Qe()),n;if(t===6)Ir(e,r);else{if(i=e.current.alternate,!(r&30)&&!eC(i)&&(t=pu(e,r),t===2&&(o=Gf(e),o!==0&&(r=o,t=yp(e,o))),t===1))throw n=Za,fi(e,0),Ir(e,r),Ht(e,Qe()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(G(345));case 2:ti(e,Bt,qn);break;case 3:if(Ir(e,r),(r&130023424)===r&&(t=zm+500-Qe(),10<t)){if(Qs(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Pt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=qf(ti.bind(null,e,Bt,qn),t);break}ti(e,Bt,qn);break;case 4:if(Ir(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var a=31-jn(r);o=1<<a,a=t[a],a>i&&(i=a),r&=~o}if(r=i,r=Qe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*KA(r/1960))-r,10<r){e.timeoutHandle=qf(ti.bind(null,e,Bt,qn),r);break}ti(e,Bt,qn);break;case 5:ti(e,Bt,qn);break;default:throw Error(G(329))}}}return Ht(e,Qe()),e.callbackNode===n?Qw.bind(null,e):null}function yp(e,t){var n=Ma;return e.current.memoizedState.isDehydrated&&(fi(e,t).flags|=256),e=pu(e,t),e!==2&&(t=Bt,Bt=n,t!==null&&Ip(t)),e}function Ip(e){Bt===null?Bt=e:Bt.push.apply(Bt,e)}function eC(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!Pn(o(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ir(e,t){for(t&=~km,t&=~Ku,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-jn(t),r=1<<n;e[n]=-1,t&=~r}}function Nv(e){if(Me&6)throw Error(G(327));no();var t=Qs(e,0);if(!(t&1))return Ht(e,Qe()),null;var n=pu(e,t);if(e.tag!==0&&n===2){var r=Gf(e);r!==0&&(t=r,n=yp(e,r))}if(n===1)throw n=Za,fi(e,0),Ir(e,t),Ht(e,Qe()),n;if(n===6)throw Error(G(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ti(e,Bt,qn),Ht(e,Qe()),null}function Bm(e,t){var n=Me;Me|=1;try{return e(t)}finally{Me=n,Me===0&&(go=Qe()+500,Qu&&Wr())}}function Ii(e){Nr!==null&&Nr.tag===0&&!(Me&6)&&no();var t=Me;Me|=1;var n=yn.transition,r=Se;try{if(yn.transition=null,Se=1,e)return e()}finally{Se=r,yn.transition=n,Me=t,!(Me&6)&&Wr()}}function Um(){Zt=Yi.current,Re(Yi)}function fi(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,TA(n)),Ke!==null)for(n=Ke.return;n!==null;){var r=n;switch(Im(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&eu();break;case 3:po(),Re(_t),Re(At),Cm();break;case 5:Am(r);break;case 4:po();break;case 13:Re(Ue);break;case 19:Re(Ue);break;case 10:bm(r.type._context);break;case 22:case 23:Um()}n=n.return}if(st=e,Ke=e=Rr(e.current,null),yt=Zt=t,it=0,Za=null,km=Ku=yi=0,Bt=Ma=null,oi!==null){for(t=0;t<oi.length;t++)if(n=oi[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var a=o.next;o.next=i,r.next=a}n.pending=r}oi=null}return e}function Jw(e,t){do{var n=Ke;try{if(xm(),js.current=uu,su){for(var r=_e.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}su=!1}if(vi=0,lt=rt=_e=null,Ia=!1,Ga=0,Om.current=null,n===null||n.return===null){it=1,Za=t,Ke=null;break}e:{var o=e,a=n.return,l=n,s=t;if(t=yt,l.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){var u=s,c=l,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var p=dv(a);if(p!==null){p.flags&=-257,fv(p,a,l,o,t),p.mode&1&&cv(o,u,t),t=p,s=u;var g=t.updateQueue;if(g===null){var h=new Set;h.add(s),t.updateQueue=h}else g.add(s);break e}else{if(!(t&1)){cv(o,u,t),$m();break e}s=Error(G(426))}}else if(ze&&l.mode&1){var w=dv(a);if(w!==null){!(w.flags&65536)&&(w.flags|=256),fv(w,a,l,o,t),wm(mo(s,l));break e}}o=s=mo(s,l),it!==4&&(it=2),Ma===null?Ma=[o]:Ma.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var I=Pw(o,s,t);rv(o,I);break e;case 1:l=s;var y=o.type,M=o.stateNode;if(!(o.flags&128)&&(typeof y.getDerivedStateFromError=="function"||M!==null&&typeof M.componentDidCatch=="function"&&(Lr===null||!Lr.has(M)))){o.flags|=65536,t&=-t,o.lanes|=t;var x=Rw(o,l,t);rv(o,x);break e}}o=o.return}while(o!==null)}Kw(n)}catch(S){t=S,Ke===n&&n!==null&&(Ke=n=n.return);continue}break}while(1)}function Xw(){var e=cu.current;return cu.current=uu,e===null?uu:e}function $m(){(it===0||it===3||it===2)&&(it=4),st===null||!(yi&268435455)&&!(Ku&268435455)||Ir(st,yt)}function pu(e,t){var n=Me;Me|=2;var r=Xw();(st!==e||yt!==t)&&(qn=null,fi(e,t));do try{tC();break}catch(i){Jw(e,i)}while(1);if(xm(),Me=n,cu.current=r,Ke!==null)throw Error(G(261));return st=null,yt=0,it}function tC(){for(;Ke!==null;)qw(Ke)}function nC(){for(;Ke!==null&&!AD();)qw(Ke)}function qw(e){var t=tM(e.alternate,e,Zt);e.memoizedProps=e.pendingProps,t===null?Kw(e):Ke=t,Om.current=null}function Kw(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=QA(n,t),n!==null){n.flags&=32767,Ke=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{it=6,Ke=null;return}}else if(n=YA(n,t,Zt),n!==null){Ke=n;return}if(t=t.sibling,t!==null){Ke=t;return}Ke=t=e}while(t!==null);it===0&&(it=5)}function ti(e,t,n){var r=Se,i=yn.transition;try{yn.transition=null,Se=1,rC(e,t,n,r)}finally{yn.transition=i,Se=r}return null}function rC(e,t,n,r){do no();while(Nr!==null);if(Me&6)throw Error(G(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(G(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(zD(e,o),e===st&&(Ke=st=null,yt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||as||(as=!0,nM(Ys,function(){return no(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=yn.transition,yn.transition=null;var a=Se;Se=1;var l=Me;Me|=4,Om.current=null,XA(e,n),Zw(n,e),bA(Jf),Js=!!Qf,Jf=Qf=null,e.current=n,qA(n),CD(),Me=l,Se=a,yn.transition=o}else e.current=n;if(as&&(as=!1,Nr=e,fu=i),o=e.pendingLanes,o===0&&(Lr=null),jD(n.stateNode),Ht(e,Qe()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(du)throw du=!1,e=hp,hp=null,e;return fu&1&&e.tag!==0&&no(),o=e.pendingLanes,o&1?e===vp?xa++:(xa=0,vp=e):xa=0,Wr(),null}function no(){if(Nr!==null){var e=LI(fu),t=yn.transition,n=Se;try{if(yn.transition=null,Se=16>e?16:e,Nr===null)var r=!1;else{if(e=Nr,Nr=null,fu=0,Me&6)throw Error(G(331));var i=Me;for(Me|=4,te=e.current;te!==null;){var o=te,a=o.child;if(te.flags&16){var l=o.deletions;if(l!==null){for(var s=0;s<l.length;s++){var u=l[s];for(te=u;te!==null;){var c=te;switch(c.tag){case 0:case 11:case 15:wa(8,c,o)}var d=c.child;if(d!==null)d.return=c,te=d;else for(;te!==null;){c=te;var f=c.sibling,p=c.return;if(Gw(c),c===u){te=null;break}if(f!==null){f.return=p,te=f;break}te=p}}}var g=o.alternate;if(g!==null){var h=g.child;if(h!==null){g.child=null;do{var w=h.sibling;h.sibling=null,h=w}while(h!==null)}}te=o}}if(o.subtreeFlags&2064&&a!==null)a.return=o,te=a;else e:for(;te!==null;){if(o=te,o.flags&2048)switch(o.tag){case 0:case 11:case 15:wa(9,o,o.return)}var I=o.sibling;if(I!==null){I.return=o.return,te=I;break e}te=o.return}}var y=e.current;for(te=y;te!==null;){a=te;var M=a.child;if(a.subtreeFlags&2064&&M!==null)M.return=a,te=M;else e:for(a=y;te!==null;){if(l=te,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:qu(9,l)}}catch(S){We(l,l.return,S)}if(l===a){te=null;break e}var x=l.sibling;if(x!==null){x.return=l.return,te=x;break e}te=l.return}}if(Me=i,Wr(),Fn&&typeof Fn.onPostCommitFiberRoot=="function")try{Fn.onPostCommitFiberRoot(Gu,e)}catch{}r=!0}return r}finally{Se=n,yn.transition=t}}return!1}function Sv(e,t,n){t=mo(n,t),t=Pw(e,t,1),e=jr(e,t,1),t=Pt(),e!==null&&(cl(e,1,t),Ht(e,t))}function We(e,t,n){if(e.tag===3)Sv(e,e,n);else for(;t!==null;){if(t.tag===3){Sv(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Lr===null||!Lr.has(r))){e=mo(n,e),e=Rw(t,e,1),t=jr(t,e,1),e=Pt(),t!==null&&(cl(t,1,e),Ht(t,e));break}}t=t.return}}function iC(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Pt(),e.pingedLanes|=e.suspendedLanes&n,st===e&&(yt&n)===n&&(it===4||it===3&&(yt&130023424)===yt&&500>Qe()-zm?fi(e,0):km|=n),Ht(e,t)}function eM(e,t){t===0&&(e.mode&1?(t=Jl,Jl<<=1,!(Jl&130023424)&&(Jl=4194304)):t=1);var n=Pt();e=sr(e,t),e!==null&&(cl(e,t,n),Ht(e,n))}function oC(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),eM(e,n)}function aC(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(G(314))}r!==null&&r.delete(t),eM(e,n)}var tM;tM=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||_t.current)Ut=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ut=!1,ZA(e,t,n);Ut=!!(e.flags&131072)}else Ut=!1,ze&&t.flags&1048576&&iw(t,ru,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ps(e,t),e=t.pendingProps;var i=uo(t,At.current);to(t,n),i=Tm(null,t,r,e,i,n);var o=jm();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ft(r)?(o=!0,tu(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Sm(t),i.updater=Ju,t.stateNode=i,i._reactInternals=t,op(t,r,e,n),t=sp(null,t,r,!0,o,n)):(t.tag=0,ze&&o&&ym(t),jt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ps(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=sC(r),e=Sn(r,e),i){case 0:t=lp(null,t,r,e,n);break e;case 1:t=gv(null,t,r,e,n);break e;case 11:t=pv(null,t,r,e,n);break e;case 14:t=mv(null,t,r,Sn(r.type,e),n);break e}throw Error(G(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Sn(r,i),lp(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Sn(r,i),gv(e,t,r,i,n);case 3:e:{if(Bw(t),e===null)throw Error(G(387));r=t.pendingProps,o=t.memoizedState,i=o.element,sw(e,t),au(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=mo(Error(G(423)),t),t=hv(e,t,r,n,i);break e}else if(r!==i){i=mo(Error(G(424)),t),t=hv(e,t,r,n,i);break e}else for(Qt=Tr(t.stateNode.containerInfo.firstChild),qt=t,ze=!0,An=null,n=fw(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(co(),r===i){t=ur(e,t,n);break e}jt(e,t,r,n)}t=t.child}return t;case 5:return pw(t),e===null&&np(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,Xf(r,i)?a=null:o!==null&&Xf(r,o)&&(t.flags|=32),zw(e,t),jt(e,t,a,n),t.child;case 6:return e===null&&np(t),null;case 13:return Uw(e,t,n);case 4:return Dm(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=fo(t,null,r,n):jt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Sn(r,i),pv(e,t,r,i,n);case 7:return jt(e,t,t.pendingProps,n),t.child;case 8:return jt(e,t,t.pendingProps.children,n),t.child;case 12:return jt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,je(iu,r._currentValue),r._currentValue=a,o!==null)if(Pn(o.value,a)){if(o.children===i.children&&!_t.current){t=ur(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){a=o.child;for(var s=l.firstContext;s!==null;){if(s.context===r){if(o.tag===1){s=rr(-1,n&-n),s.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?s.next=s:(s.next=c.next,c.next=s),u.pending=s}}o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),rp(o.return,n,t),l.lanes|=n;break}s=s.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(G(341));a.lanes|=n,l=a.alternate,l!==null&&(l.lanes|=n),rp(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}jt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,to(t,n),i=wn(i),r=r(i),t.flags|=1,jt(e,t,r,n),t.child;case 14:return r=t.type,i=Sn(r,t.pendingProps),i=Sn(r.type,i),mv(e,t,r,i,n);case 15:return Ow(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Sn(r,i),Ps(e,t),t.tag=1,Ft(r)?(e=!0,tu(t)):e=!1,to(t,n),cw(t,r,i),op(t,r,i,n),sp(null,t,r,!0,e,n);case 19:return $w(e,t,n);case 22:return kw(e,t,n)}throw Error(G(156,t.tag))};function nM(e,t){return CI(e,t)}function lC(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function hn(e,t,n,r){return new lC(e,t,n,r)}function _m(e){return e=e.prototype,!(!e||!e.isReactComponent)}function sC(e){if(typeof e=="function")return _m(e)?1:0;if(e!=null){if(e=e.$$typeof,e===am)return 11;if(e===lm)return 14}return 2}function Rr(e,t){var n=e.alternate;return n===null?(n=hn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ks(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")_m(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Bi:return pi(n.children,i,o,t);case om:a=8,i|=8;break;case Ef:return e=hn(12,n,t,i|2),e.elementType=Ef,e.lanes=o,e;case Tf:return e=hn(13,n,t,i),e.elementType=Tf,e.lanes=o,e;case jf:return e=hn(19,n,t,i),e.elementType=jf,e.lanes=o,e;case dI:return ec(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case uI:a=10;break e;case cI:a=9;break e;case am:a=11;break e;case lm:a=14;break e;case gr:a=16,r=null;break e}throw Error(G(130,e==null?e:typeof e,""))}return t=hn(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function pi(e,t,n,r){return e=hn(7,e,r,t),e.lanes=n,e}function ec(e,t,n,r){return e=hn(22,e,r,t),e.elementType=dI,e.lanes=n,e.stateNode={isHidden:!1},e}function $d(e,t,n){return e=hn(6,e,null,t),e.lanes=n,e}function _d(e,t,n){return t=hn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function uC(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Md(0),this.expirationTimes=Md(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Md(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Fm(e,t,n,r,i,o,a,l,s){return e=new uC(e,t,n,l,s),t===1?(t=1,o===!0&&(t|=8)):t=0,o=hn(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Sm(o),e}function cC(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:zi,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function rM(e){if(!e)return $r;e=e._reactInternals;e:{if(Ai(e)!==e||e.tag!==1)throw Error(G(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ft(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(G(171))}if(e.tag===1){var n=e.type;if(Ft(n))return nw(e,n,t)}return t}function iM(e,t,n,r,i,o,a,l,s){return e=Fm(n,r,!0,e,i,o,a,l,s),e.context=rM(null),n=e.current,r=Pt(),i=Pr(n),o=rr(r,i),o.callback=t??null,jr(n,o,i),e.current.lanes=i,cl(e,i,r),Ht(e,r),e}function tc(e,t,n,r){var i=t.current,o=Pt(),a=Pr(i);return n=rM(n),t.context===null?t.context=n:t.pendingContext=n,t=rr(o,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=jr(i,t,a),e!==null&&(Ln(e,i,a,o),Ts(e,i,a)),a}function mu(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Dv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Hm(e,t){Dv(e,t),(e=e.alternate)&&Dv(e,t)}function dC(){return null}var oM=typeof reportError=="function"?reportError:function(e){console.error(e)};function Gm(e){this._internalRoot=e}nc.prototype.render=Gm.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(G(409));tc(e,t,null,null)};nc.prototype.unmount=Gm.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ii(function(){tc(null,e,null,null)}),t[lr]=null}};function nc(e){this._internalRoot=e}nc.prototype.unstable_scheduleHydration=function(e){if(e){var t=OI();e={blockedOn:null,target:e,priority:t};for(var n=0;n<yr.length&&t!==0&&t<yr[n].priority;n++);yr.splice(n,0,e),n===0&&zI(e)}};function Wm(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function rc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Av(){}function fC(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var u=mu(a);o.call(u)}}var a=iM(t,r,e,0,null,!1,!1,"",Av);return e._reactRootContainer=a,e[lr]=a.current,Ua(e.nodeType===8?e.parentNode:e),Ii(),a}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var l=r;r=function(){var u=mu(s);l.call(u)}}var s=Fm(e,0,!1,null,null,!1,!1,"",Av);return e._reactRootContainer=s,e[lr]=s.current,Ua(e.nodeType===8?e.parentNode:e),Ii(function(){tc(t,s,n,r)}),s}function ic(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o;if(typeof i=="function"){var l=i;i=function(){var s=mu(a);l.call(s)}}tc(t,a,e,i)}else a=fC(n,t,e,i,r);return mu(a)}PI=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=sa(t.pendingLanes);n!==0&&(cm(t,n|1),Ht(t,Qe()),!(Me&6)&&(go=Qe()+500,Wr()))}break;case 13:Ii(function(){var r=sr(e,1);if(r!==null){var i=Pt();Ln(r,e,1,i)}}),Hm(e,1)}};dm=function(e){if(e.tag===13){var t=sr(e,134217728);if(t!==null){var n=Pt();Ln(t,e,134217728,n)}Hm(e,134217728)}};RI=function(e){if(e.tag===13){var t=Pr(e),n=sr(e,t);if(n!==null){var r=Pt();Ln(n,e,t,r)}Hm(e,t)}};OI=function(){return Se};kI=function(e,t){var n=Se;try{return Se=e,t()}finally{Se=n}};_f=function(e,t,n){switch(t){case"input":if(Rf(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Yu(r);if(!i)throw Error(G(90));pI(r),Rf(r,i)}}}break;case"textarea":gI(e,n);break;case"select":t=n.value,t!=null&&Xi(e,!!n.multiple,t,!1)}};xI=Bm;bI=Ii;var pC={usingClientEntryPoint:!1,Events:[fl,Fi,Yu,wI,MI,Bm]},Zo={findFiberByHostInstance:ii,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},mC={bundleType:Zo.bundleType,version:Zo.version,rendererPackageName:Zo.rendererPackageName,rendererConfig:Zo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:dr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=DI(e),e===null?null:e.stateNode},findFiberByHostInstance:Zo.findFiberByHostInstance||dC,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ls=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ls.isDisabled&&ls.supportsFiber)try{Gu=ls.inject(mC),Fn=ls}catch{}}on.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=pC;on.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Wm(t))throw Error(G(200));return cC(e,t,null,n)};on.createRoot=function(e,t){if(!Wm(e))throw Error(G(299));var n=!1,r="",i=oM;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Fm(e,1,!1,null,null,n,!1,r,i),e[lr]=t.current,Ua(e.nodeType===8?e.parentNode:e),new Gm(t)};on.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(G(188)):(e=Object.keys(e).join(","),Error(G(268,e)));return e=DI(t),e=e===null?null:e.stateNode,e};on.flushSync=function(e){return Ii(e)};on.hydrate=function(e,t,n){if(!rc(t))throw Error(G(200));return ic(null,e,t,!0,n)};on.hydrateRoot=function(e,t,n){if(!Wm(e))throw Error(G(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",a=oM;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=iM(t,null,e,1,n??null,i,!1,o,a),e[lr]=t.current,Ua(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new nc(t)};on.render=function(e,t,n){if(!rc(t))throw Error(G(200));return ic(null,e,t,!1,n)};on.unmountComponentAtNode=function(e){if(!rc(e))throw Error(G(40));return e._reactRootContainer?(Ii(function(){ic(null,null,e,!1,function(){e._reactRootContainer=null,e[lr]=null})}),!0):!1};on.unstable_batchedUpdates=Bm;on.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!rc(n))throw Error(G(200));if(e==null||e._reactInternals===void 0)throw Error(G(38));return ic(e,t,n,!1,r)};on.version="18.2.0-next-9e3b772b8-20220608";function aM(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(aM)}catch(e){console.error(e)}}aM(),iI.exports=on;var ml=iI.exports;const lM=sl(ml);var Cv=ml;Af.createRoot=Cv.createRoot,Af.hydrateRoot=Cv.hydrateRoot;var Ev=function(){throw new Error("Attempted to call useModal outside of modal context. Make sure your app is rendered inside ModalProvider.")},Vm=v.createContext({showModal:Ev,hideModal:Ev});Vm.displayName="ModalContext";var ba=function(){return ba=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},ba.apply(this,arguments)};function gC(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}var hC=v.memo(function(e){var t=e.component,n=gC(e,["component"]);return t(n)}),vC=v.memo(function(e){var t=e.modals,n=e.container,r=e.component,i=r===void 0?v.Fragment:r,o=v.useState(void 0),a=o[0],l=o[1];return v.useEffect(function(){return l(n||document.body)}),a?ml.createPortal(v.createElement(i,null,Object.keys(t).map(function(s){return v.createElement(hC,{key:s,component:t[s]})})),a):null}),yC=function(e){var t=e.container,n=e.rootComponent,r=e.children;if(t&&!(t instanceof HTMLElement))throw new Error(`Container must specify DOM element to mount modal root into.
43
43
 
44
44
  This behavior has changed in 3.0.0. Please use \`rootComponent\` prop instead.
45
- See: https://github.com/mpontus/react-modal-hook/issues/18`);var i=v.useState({}),o=i[0],a=i[1],l=v.useCallback(function(c,d){return a(function(f){var p;return Ma(Ma({},f),(p={},p[c]=d,p))})},[]),s=v.useCallback(function(c){return a(function(d){if(!d[c])return d;var f=Ma({},d);return delete f[c],f})},[]),u=v.useMemo(function(){return{showModal:l,hideModal:s}},[]);return v.createElement(Vm.Provider,{value:u},v.createElement(v.Fragment,null,r,v.createElement(vC,{modals:o,component:n,container:t})))},IC=function(){var e=0;return function(){return"".concat(++e)}}(),wC=function(e){var t=e.prototype;return!t||!t.isReactComponent},ho=function(e,t){if(t===void 0&&(t=[]),!wC(e))throw new Error("Only stateless components can be used as an argument to useModal. You have probably passed a class component where a function was expected.");var n=v.useMemo(IC,[]),r=v.useMemo(function(){return e},t),i=v.useContext(Vm),o=v.useState(!1),a=o[0],l=o[1],s=v.useCallback(function(){return l(!0)},[]),u=v.useCallback(function(){return l(!1)},[]);return v.useEffect(function(){return a?i.showModal(n,r):i.hideModal(n),function(){return i.hideModal(n)}},[r,a]),[s,u]};function bC(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2M3 12l6.414 6.414a2 2 0 001.414.586H19a2 2 0 002-2V7a2 2 0 00-2-2h-8.172a2 2 0 00-1.414.586L3 12z"}))}const xC=v.forwardRef(bC),MC=xC;function SC(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"}))}const NC=v.forwardRef(SC),sb=NC;function DC(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"}))}const AC=v.forwardRef(DC),oc=AC;function CC(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"}))}const EC=v.forwardRef(CC),TC=EC;function jC(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"}))}const PC=v.forwardRef(jC),LC=PC;function RC(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"}))}const OC=v.forwardRef(RC),kC=OC;function zC(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z"}))}const BC=v.forwardRef(zC),Fd=BC;function UC(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"}))}const $C=v.forwardRef(UC),_C=$C;function FC(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"}))}const HC=v.forwardRef(FC),WC=HC;function GC(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"}))}const VC=v.forwardRef(GC),ZC=VC;function YC(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"}))}const QC=v.forwardRef(YC),JC=QC;function XC(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6m0 0v6m0-6h6m-6 0H6"}))}const qC=v.forwardRef(XC),KC=qC;function e1(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"}))}const t1=v.forwardRef(e1),ub=t1;function n1(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 14H5.236a2 2 0 01-1.789-2.894l3.5-7A2 2 0 018.736 3h4.018a2 2 0 01.485.06l3.76.94m-7 10v5a2 2 0 002 2h.096c.5 0 .905-.405.905-.904 0-.715.211-1.413.608-2.008L17 13V4m-7 10h2m5-10h2a2 2 0 012 2v6a2 2 0 01-2 2h-2.5"}))}const r1=v.forwardRef(n1),i1=r1;function o1(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"}))}const a1=v.forwardRef(o1),cb=a1;function l1(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))}const s1=v.forwardRef(l1),db=s1;var u1=Object.defineProperty,c1=(e,t,n)=>t in e?u1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Hd=(e,t,n)=>(c1(e,typeof t!="symbol"?t+"":t,n),n);let d1=class{constructor(){Hd(this,"current",this.detect()),Hd(this,"handoffState","pending"),Hd(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},ir=new d1,et=(e,t)=>{ir.isServer?v.useEffect(e,t):v.useLayoutEffect(e,t)};function Kt(e){let t=v.useRef(e);return et(()=>{t.current=e},[e]),t}function fb(e,t){let[n,r]=v.useState(e),i=Kt(e);return et(()=>r(i.current),[i,r,...t]),n}function ac(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Zn(){let e=[],t={addEventListener(n,r,i,o){return n.addEventListener(r,i,o),t.add(()=>n.removeEventListener(r,i,o))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return ac(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,i){let o=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:i}),this.add(()=>{Object.assign(n.style,{[r]:o})})},group(n){let r=Zn();return n(r),this.add(()=>r.dispose())},add(n){return e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let i of e.splice(r,1))i()}},dispose(){for(let n of e.splice(0))n()}};return t}function wi(){let[e]=v.useState(Zn);return v.useEffect(()=>()=>e.dispose(),[e]),e}let re=function(e){let t=Kt(e);return k.useCallback((...n)=>t.current(...n),[t])};function f1(){let e=typeof document>"u";return"useSyncExternalStore"in lo?(t=>t.useSyncExternalStore)(lo)(()=>()=>{},()=>!1,()=>!e):!1}function To(){let e=f1(),[t,n]=v.useState(ir.isHandoffComplete);return t&&ir.isHandoffComplete===!1&&n(!1),v.useEffect(()=>{t!==!0&&n(!0)},[t]),v.useEffect(()=>ir.handoff(),[]),e?!1:t}var Tv;let Dt=(Tv=k.useId)!=null?Tv:function(){let e=To(),[t,n]=k.useState(e?()=>ir.nextId():null);return et(()=>{t===null&&n(ir.nextId())},[t]),t!=null?""+t:void 0};function Se(e,t,...n){if(e in t){let i=t[e];return typeof i=="function"?i(...n):i}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Se),r}function lc(e){return ir.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let wp=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Pt=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(Pt||{}),Ya=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Ya||{}),p1=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(p1||{});function sc(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(wp)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var uc=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(uc||{});function Zm(e,t=0){var n;return e===((n=lc(e))==null?void 0:n.body)?!1:Se(t,{0(){return e.matches(wp)},1(){let r=e;for(;r!==null;){if(r.matches(wp))return!0;r=r.parentElement}return!1}})}var m1=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(m1||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function mi(e){e==null||e.focus({preventScroll:!0})}let g1=["textarea","input"].join(",");function h1(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,g1))!=null?n:!1}function pb(e,t=n=>n){return e.slice().sort((n,r)=>{let i=t(n),o=t(r);if(i===null||o===null)return 0;let a=i.compareDocumentPosition(o);return a&Node.DOCUMENT_POSITION_FOLLOWING?-1:a&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Cn(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:i=[]}={}){let o=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,a=Array.isArray(e)?n?pb(e):e:sc(e);i.length>0&&a.length>1&&(a=a.filter(p=>!i.includes(p))),r=r??o.activeElement;let l=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),s=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,a.indexOf(r))-1;if(t&4)return Math.max(0,a.indexOf(r))+1;if(t&8)return a.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=t&32?{preventScroll:!0}:{},c=0,d=a.length,f;do{if(c>=d||c+d<=0)return 0;let p=s+c;if(t&16)p=(p+d)%d;else{if(p<0)return 3;if(p>=d)return 1}f=a[p],f==null||f.focus(u),c+=l}while(f!==o.activeElement);return t&6&&h1(f)&&f.select(),2}function ss(e,t,n){let r=Kt(t);v.useEffect(()=>{function i(o){r.current(o)}return document.addEventListener(e,i,n),()=>document.removeEventListener(e,i,n)},[e,n])}function mb(e,t,n){let r=Kt(t);v.useEffect(()=>{function i(o){r.current(o)}return window.addEventListener(e,i,n),()=>window.removeEventListener(e,i,n)},[e,n])}function Ym(e,t,n=!0){let r=v.useRef(!1);v.useEffect(()=>{requestAnimationFrame(()=>{r.current=n})},[n]);function i(a,l){if(!r.current||a.defaultPrevented)return;let s=l(a);if(s===null||!s.getRootNode().contains(s)||!s.isConnected)return;let u=function c(d){return typeof d=="function"?c(d()):Array.isArray(d)||d instanceof Set?d:[d]}(e);for(let c of u){if(c===null)continue;let d=c instanceof HTMLElement?c:c.current;if(d!=null&&d.contains(s)||a.composed&&a.composedPath().includes(d))return}return!Zm(s,uc.Loose)&&s.tabIndex!==-1&&a.preventDefault(),t(a,s)}let o=v.useRef(null);ss("pointerdown",a=>{var l,s;r.current&&(o.current=((s=(l=a.composedPath)==null?void 0:l.call(a))==null?void 0:s[0])||a.target)},!0),ss("mousedown",a=>{var l,s;r.current&&(o.current=((s=(l=a.composedPath)==null?void 0:l.call(a))==null?void 0:s[0])||a.target)},!0),ss("click",a=>{o.current&&(i(a,()=>o.current),o.current=null)},!0),ss("touchend",a=>i(a,()=>a.target instanceof HTMLElement?a.target:null),!0),mb("blur",a=>i(a,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function jv(e){var t;if(e.type)return e.type;let n=(t=e.as)!=null?t:"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function gb(e,t){let[n,r]=v.useState(()=>jv(e));return et(()=>{r(jv(e))},[e.type,e.as]),et(()=>{n||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&r("button")},[n,t]),n}let hb=Symbol();function vb(e,t=!0){return Object.assign(e,{[hb]:t})}function Ve(...e){let t=v.useRef(e);v.useEffect(()=>{t.current=e},[e]);let n=re(r=>{for(let i of t.current)i!=null&&(typeof i=="function"?i(r):i.current=r)});return e.every(r=>r==null||(r==null?void 0:r[hb]))?void 0:n}function v1(e){throw new Error("Unexpected object: "+e)}var $t=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))($t||{});function y1(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),i=r??-1,o=(()=>{switch(e.focus){case 0:return n.findIndex(a=>!t.resolveDisabled(a));case 1:{let a=n.slice().reverse().findIndex((l,s,u)=>i!==-1&&u.length-s-1>=i?!1:!t.resolveDisabled(l));return a===-1?a:n.length-1-a}case 2:return n.findIndex((a,l)=>l<=i?!1:!t.resolveDisabled(a));case 3:{let a=n.slice().reverse().findIndex(l=>!t.resolveDisabled(l));return a===-1?a:n.length-1-a}case 4:return n.findIndex(a=>t.resolveId(a)===e.id);case 5:return null;default:v1(e)}})();return o===-1?r:o}function gu(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}var Yn=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Yn||{}),Nr=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Nr||{});function Ze({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:o=!0,name:a}){let l=yb(t,e);if(o)return us(l,n,r,a);let s=i??0;if(s&2){let{static:u=!1,...c}=l;if(u)return us(c,n,r,a)}if(s&1){let{unmount:u=!0,...c}=l;return Se(u?0:1,{0(){return null},1(){return us({...c,hidden:!0,style:{display:"none"}},n,r,a)}})}return us(l,n,r,a)}function us(e,t={},n,r){let{as:i=n,children:o,refName:a="ref",...l}=Wd(e,["unmount","static"]),s=e.ref!==void 0?{[a]:e.ref}:{},u=typeof o=="function"?o(t):o;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(t));let c={};if(t){let d=!1,f=[];for(let[p,g]of Object.entries(t))typeof g=="boolean"&&(d=!0),g===!0&&f.push(p);d&&(c["data-headlessui-state"]=f.join(" "))}if(i===v.Fragment&&Object.keys(bp(l)).length>0){if(!v.isValidElement(u)||Array.isArray(u)&&u.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(l).map(g=>` - ${g}`).join(`
45
+ See: https://github.com/mpontus/react-modal-hook/issues/18`);var i=v.useState({}),o=i[0],a=i[1],l=v.useCallback(function(c,d){return a(function(f){var p;return ba(ba({},f),(p={},p[c]=d,p))})},[]),s=v.useCallback(function(c){return a(function(d){if(!d[c])return d;var f=ba({},d);return delete f[c],f})},[]),u=v.useMemo(function(){return{showModal:l,hideModal:s}},[]);return v.createElement(Vm.Provider,{value:u},v.createElement(v.Fragment,null,r,v.createElement(vC,{modals:o,component:n,container:t})))},IC=function(){var e=0;return function(){return"".concat(++e)}}(),wC=function(e){var t=e.prototype;return!t||!t.isReactComponent},ho=function(e,t){if(t===void 0&&(t=[]),!wC(e))throw new Error("Only stateless components can be used as an argument to useModal. You have probably passed a class component where a function was expected.");var n=v.useMemo(IC,[]),r=v.useMemo(function(){return e},t),i=v.useContext(Vm),o=v.useState(!1),a=o[0],l=o[1],s=v.useCallback(function(){return l(!0)},[]),u=v.useCallback(function(){return l(!1)},[]);return v.useEffect(function(){return a?i.showModal(n,r):i.hideModal(n),function(){return i.hideModal(n)}},[r,a]),[s,u]};function MC(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2M3 12l6.414 6.414a2 2 0 001.414.586H19a2 2 0 002-2V7a2 2 0 00-2-2h-8.172a2 2 0 00-1.414.586L3 12z"}))}const xC=v.forwardRef(MC),bC=xC;function NC(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"}))}const SC=v.forwardRef(NC),sM=SC;function DC(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"}))}const AC=v.forwardRef(DC),oc=AC;function CC(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"}))}const EC=v.forwardRef(CC),TC=EC;function jC(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"}))}const LC=v.forwardRef(jC),PC=LC;function RC(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"}))}const OC=v.forwardRef(RC),kC=OC;function zC(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z"}))}const BC=v.forwardRef(zC),Fd=BC;function UC(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"}))}const $C=v.forwardRef(UC),_C=$C;function FC(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"}))}const HC=v.forwardRef(FC),GC=HC;function WC(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"}))}const VC=v.forwardRef(WC),ZC=VC;function YC(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"}))}const QC=v.forwardRef(YC),JC=QC;function XC(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6m0 0v6m0-6h6m-6 0H6"}))}const qC=v.forwardRef(XC),KC=qC;function e1(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"}))}const t1=v.forwardRef(e1),uM=t1;function n1(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 14H5.236a2 2 0 01-1.789-2.894l3.5-7A2 2 0 018.736 3h4.018a2 2 0 01.485.06l3.76.94m-7 10v5a2 2 0 002 2h.096c.5 0 .905-.405.905-.904 0-.715.211-1.413.608-2.008L17 13V4m-7 10h2m5-10h2a2 2 0 012 2v6a2 2 0 01-2 2h-2.5"}))}const r1=v.forwardRef(n1),i1=r1;function o1(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"}))}const a1=v.forwardRef(o1),cM=a1;function l1(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"}))}const s1=v.forwardRef(l1),dM=s1;var u1=Object.defineProperty,c1=(e,t,n)=>t in e?u1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Hd=(e,t,n)=>(c1(e,typeof t!="symbol"?t+"":t,n),n);let d1=class{constructor(){Hd(this,"current",this.detect()),Hd(this,"handoffState","pending"),Hd(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},ir=new d1,et=(e,t)=>{ir.isServer?v.useEffect(e,t):v.useLayoutEffect(e,t)};function Kt(e){let t=v.useRef(e);return et(()=>{t.current=e},[e]),t}function fM(e,t){let[n,r]=v.useState(e),i=Kt(e);return et(()=>r(i.current),[i,r,...t]),n}function ac(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Zn(){let e=[],t={addEventListener(n,r,i,o){return n.addEventListener(r,i,o),t.add(()=>n.removeEventListener(r,i,o))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return ac(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,i){let o=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:i}),this.add(()=>{Object.assign(n.style,{[r]:o})})},group(n){let r=Zn();return n(r),this.add(()=>r.dispose())},add(n){return e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let i of e.splice(r,1))i()}},dispose(){for(let n of e.splice(0))n()}};return t}function wi(){let[e]=v.useState(Zn);return v.useEffect(()=>()=>e.dispose(),[e]),e}let re=function(e){let t=Kt(e);return k.useCallback((...n)=>t.current(...n),[t])};function f1(){let e=typeof document>"u";return"useSyncExternalStore"in lo?(t=>t.useSyncExternalStore)(lo)(()=>()=>{},()=>!1,()=>!e):!1}function To(){let e=f1(),[t,n]=v.useState(ir.isHandoffComplete);return t&&ir.isHandoffComplete===!1&&n(!1),v.useEffect(()=>{t!==!0&&n(!0)},[t]),v.useEffect(()=>ir.handoff(),[]),e?!1:t}var Tv;let Dt=(Tv=k.useId)!=null?Tv:function(){let e=To(),[t,n]=k.useState(e?()=>ir.nextId():null);return et(()=>{t===null&&n(ir.nextId())},[t]),t!=null?""+t:void 0};function Ne(e,t,...n){if(e in t){let i=t[e];return typeof i=="function"?i(...n):i}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Ne),r}function lc(e){return ir.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let wp=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Lt=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(Lt||{}),Ya=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Ya||{}),p1=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(p1||{});function sc(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(wp)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var uc=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(uc||{});function Zm(e,t=0){var n;return e===((n=lc(e))==null?void 0:n.body)?!1:Ne(t,{0(){return e.matches(wp)},1(){let r=e;for(;r!==null;){if(r.matches(wp))return!0;r=r.parentElement}return!1}})}var m1=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(m1||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function mi(e){e==null||e.focus({preventScroll:!0})}let g1=["textarea","input"].join(",");function h1(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,g1))!=null?n:!1}function pM(e,t=n=>n){return e.slice().sort((n,r)=>{let i=t(n),o=t(r);if(i===null||o===null)return 0;let a=i.compareDocumentPosition(o);return a&Node.DOCUMENT_POSITION_FOLLOWING?-1:a&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Cn(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:i=[]}={}){let o=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,a=Array.isArray(e)?n?pM(e):e:sc(e);i.length>0&&a.length>1&&(a=a.filter(p=>!i.includes(p))),r=r??o.activeElement;let l=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),s=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,a.indexOf(r))-1;if(t&4)return Math.max(0,a.indexOf(r))+1;if(t&8)return a.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=t&32?{preventScroll:!0}:{},c=0,d=a.length,f;do{if(c>=d||c+d<=0)return 0;let p=s+c;if(t&16)p=(p+d)%d;else{if(p<0)return 3;if(p>=d)return 1}f=a[p],f==null||f.focus(u),c+=l}while(f!==o.activeElement);return t&6&&h1(f)&&f.select(),2}function ss(e,t,n){let r=Kt(t);v.useEffect(()=>{function i(o){r.current(o)}return document.addEventListener(e,i,n),()=>document.removeEventListener(e,i,n)},[e,n])}function mM(e,t,n){let r=Kt(t);v.useEffect(()=>{function i(o){r.current(o)}return window.addEventListener(e,i,n),()=>window.removeEventListener(e,i,n)},[e,n])}function Ym(e,t,n=!0){let r=v.useRef(!1);v.useEffect(()=>{requestAnimationFrame(()=>{r.current=n})},[n]);function i(a,l){if(!r.current||a.defaultPrevented)return;let s=l(a);if(s===null||!s.getRootNode().contains(s)||!s.isConnected)return;let u=function c(d){return typeof d=="function"?c(d()):Array.isArray(d)||d instanceof Set?d:[d]}(e);for(let c of u){if(c===null)continue;let d=c instanceof HTMLElement?c:c.current;if(d!=null&&d.contains(s)||a.composed&&a.composedPath().includes(d))return}return!Zm(s,uc.Loose)&&s.tabIndex!==-1&&a.preventDefault(),t(a,s)}let o=v.useRef(null);ss("pointerdown",a=>{var l,s;r.current&&(o.current=((s=(l=a.composedPath)==null?void 0:l.call(a))==null?void 0:s[0])||a.target)},!0),ss("mousedown",a=>{var l,s;r.current&&(o.current=((s=(l=a.composedPath)==null?void 0:l.call(a))==null?void 0:s[0])||a.target)},!0),ss("click",a=>{o.current&&(i(a,()=>o.current),o.current=null)},!0),ss("touchend",a=>i(a,()=>a.target instanceof HTMLElement?a.target:null),!0),mM("blur",a=>i(a,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function jv(e){var t;if(e.type)return e.type;let n=(t=e.as)!=null?t:"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function gM(e,t){let[n,r]=v.useState(()=>jv(e));return et(()=>{r(jv(e))},[e.type,e.as]),et(()=>{n||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&r("button")},[n,t]),n}let hM=Symbol();function vM(e,t=!0){return Object.assign(e,{[hM]:t})}function Ve(...e){let t=v.useRef(e);v.useEffect(()=>{t.current=e},[e]);let n=re(r=>{for(let i of t.current)i!=null&&(typeof i=="function"?i(r):i.current=r)});return e.every(r=>r==null||(r==null?void 0:r[hM]))?void 0:n}function v1(e){throw new Error("Unexpected object: "+e)}var $t=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))($t||{});function y1(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),i=r??-1,o=(()=>{switch(e.focus){case 0:return n.findIndex(a=>!t.resolveDisabled(a));case 1:{let a=n.slice().reverse().findIndex((l,s,u)=>i!==-1&&u.length-s-1>=i?!1:!t.resolveDisabled(l));return a===-1?a:n.length-1-a}case 2:return n.findIndex((a,l)=>l<=i?!1:!t.resolveDisabled(a));case 3:{let a=n.slice().reverse().findIndex(l=>!t.resolveDisabled(l));return a===-1?a:n.length-1-a}case 4:return n.findIndex(a=>t.resolveId(a)===e.id);case 5:return null;default:v1(e)}})();return o===-1?r:o}function gu(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}var Yn=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Yn||{}),Sr=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Sr||{});function Ze({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:o=!0,name:a}){let l=yM(t,e);if(o)return us(l,n,r,a);let s=i??0;if(s&2){let{static:u=!1,...c}=l;if(u)return us(c,n,r,a)}if(s&1){let{unmount:u=!0,...c}=l;return Ne(u?0:1,{0(){return null},1(){return us({...c,hidden:!0,style:{display:"none"}},n,r,a)}})}return us(l,n,r,a)}function us(e,t={},n,r){let{as:i=n,children:o,refName:a="ref",...l}=Gd(e,["unmount","static"]),s=e.ref!==void 0?{[a]:e.ref}:{},u=typeof o=="function"?o(t):o;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(t));let c={};if(t){let d=!1,f=[];for(let[p,g]of Object.entries(t))typeof g=="boolean"&&(d=!0),g===!0&&f.push(p);d&&(c["data-headlessui-state"]=f.join(" "))}if(i===v.Fragment&&Object.keys(Mp(l)).length>0){if(!v.isValidElement(u)||Array.isArray(u)&&u.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(l).map(g=>` - ${g}`).join(`
46
46
  `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(g=>` - ${g}`).join(`
47
47
  `)].join(`
48
- `));let d=u.props,f=typeof(d==null?void 0:d.className)=="function"?(...g)=>gu(d==null?void 0:d.className(...g),l.className):gu(d==null?void 0:d.className,l.className),p=f?{className:f}:{};return v.cloneElement(u,Object.assign({},yb(u.props,bp(Wd(l,["ref"]))),c,s,I1(u.ref,s.ref),p))}return v.createElement(i,Object.assign({},Wd(l,["ref"]),i!==v.Fragment&&s,i!==v.Fragment&&c),u)}function I1(...e){return{ref:e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}}function yb(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let i in r)i.startsWith("on")&&typeof r[i]=="function"?(n[i]!=null||(n[i]=[]),n[i].push(r[i])):t[i]=r[i];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(let r in n)Object.assign(t,{[r](i,...o){let a=n[r];for(let l of a){if((i instanceof Event||(i==null?void 0:i.nativeEvent)instanceof Event)&&i.defaultPrevented)return;l(i,...o)}}});return t}function He(e){var t;return Object.assign(v.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function bp(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function Wd(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function cc(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=(t==null?void 0:t.getAttribute("disabled"))==="";return r&&w1(n)?!1:r}function w1(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}function Ib(e={},t=null,n=[]){for(let[r,i]of Object.entries(e))bb(n,wb(t,r),i);return n}function wb(e,t){return e?e+"["+t+"]":t}function bb(e,t,n){if(Array.isArray(n))for(let[r,i]of n.entries())bb(e,wb(t,r.toString()),i);else n instanceof Date?e.push([t,n.toISOString()]):typeof n=="boolean"?e.push([t,n?"1":"0"]):typeof n=="string"?e.push([t,n]):typeof n=="number"?e.push([t,`${n}`]):n==null?e.push([t,""]):Ib(n,t,e)}let b1="div";var cr=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(cr||{});function x1(e,t){let{features:n=1,...r}=e,i={ref:t,"aria-hidden":(n&2)===2?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return Ze({ourProps:i,theirProps:r,slot:{},defaultTag:b1,name:"Hidden"})}let _r=He(x1),Qm=v.createContext(null);Qm.displayName="OpenClosedContext";var $e=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))($e||{});function jo(){return v.useContext(Qm)}function Jm({value:e,children:t}){return k.createElement(Qm.Provider,{value:e},t)}var Te=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(Te||{});function M1(e,t,n){let[r,i]=v.useState(n),o=e!==void 0,a=v.useRef(o),l=v.useRef(!1),s=v.useRef(!1);return o&&!a.current&&!l.current?(l.current=!0,a.current=o,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!o&&a.current&&!s.current&&(s.current=!0,a.current=o,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[o?e:r,re(u=>(o||i(u),t==null?void 0:t(u)))]}function Xm(e,t){let n=v.useRef([]),r=re(e);v.useEffect(()=>{let i=[...n.current];for(let[o,a]of t.entries())if(n.current[o]!==a){let l=r(t,i);return n.current=t,l}},[r,...t])}function Pv(e){return[e.screenX,e.screenY]}function S1(){let e=v.useRef([-1,-1]);return{wasMoved(t){let n=Pv(t);return e.current[0]===n[0]&&e.current[1]===n[1]?!1:(e.current=n,!0)},update(t){e.current=Pv(t)}}}function N1(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Vr(...e){return v.useMemo(()=>lc(...e),[...e])}var Jt=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Jt||{});function qm(){let e=v.useRef(0);return mb("keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function gl(){let e=v.useRef(!1);return et(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Km(e,t,n,r){let i=Kt(n);v.useEffect(()=>{e=e??window;function o(a){i.current(a)}return e.addEventListener(t,o,r),()=>e.removeEventListener(t,o,r)},[e,t,r])}function D1(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}function xb(e){let t=re(e),n=v.useRef(!1);v.useEffect(()=>(n.current=!1,()=>{n.current=!0,ac(()=>{n.current&&t()})}),[t])}function Mb(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let n of e.current)n.current instanceof HTMLElement&&t.add(n.current);return t}let A1="div";var Sb=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(Sb||{});function C1(e,t){let n=v.useRef(null),r=Ve(n,t),{initialFocus:i,containers:o,features:a=30,...l}=e;To()||(a=1);let s=Vr(n);j1({ownerDocument:s},!!(a&16));let u=P1({ownerDocument:s,container:n,initialFocus:i},!!(a&2));L1({ownerDocument:s,container:n,containers:o,previousActiveElement:u},!!(a&8));let c=qm(),d=re(h=>{let w=n.current;w&&(I=>I())(()=>{Se(c.current,{[Jt.Forwards]:()=>{Cn(w,Pt.First,{skipElements:[h.relatedTarget]})},[Jt.Backwards]:()=>{Cn(w,Pt.Last,{skipElements:[h.relatedTarget]})}})})}),f=wi(),p=v.useRef(!1),g={ref:r,onKeyDown(h){h.key=="Tab"&&(p.current=!0,f.requestAnimationFrame(()=>{p.current=!1}))},onBlur(h){let w=Mb(o);n.current instanceof HTMLElement&&w.add(n.current);let I=h.relatedTarget;I instanceof HTMLElement&&I.dataset.headlessuiFocusGuard!=="true"&&(Nb(w,I)||(p.current?Cn(n.current,Se(c.current,{[Jt.Forwards]:()=>Pt.Next,[Jt.Backwards]:()=>Pt.Previous})|Pt.WrapAround,{relativeTo:h.target}):h.target instanceof HTMLElement&&mi(h.target)))}};return k.createElement(k.Fragment,null,!!(a&4)&&k.createElement(_r,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:d,features:cr.Focusable}),Ze({ourProps:g,theirProps:l,defaultTag:A1,name:"FocusTrap"}),!!(a&4)&&k.createElement(_r,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:d,features:cr.Focusable}))}let E1=He(C1),Yo=Object.assign(E1,{features:Sb}),wr=[];D1(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&wr[0]!==t.target&&(wr.unshift(t.target),wr=wr.filter(n=>n!=null&&n.isConnected),wr.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function T1(e=!0){let t=v.useRef(wr.slice());return Xm(([n],[r])=>{r===!0&&n===!1&&ac(()=>{t.current.splice(0)}),r===!1&&n===!0&&(t.current=wr.slice())},[e,wr,t]),re(()=>{var n;return(n=t.current.find(r=>r!=null&&r.isConnected))!=null?n:null})}function j1({ownerDocument:e},t){let n=T1(t);Xm(()=>{t||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&mi(n())},[t]),xb(()=>{t&&mi(n())})}function P1({ownerDocument:e,container:t,initialFocus:n},r){let i=v.useRef(null),o=gl();return Xm(()=>{if(!r)return;let a=t.current;a&&ac(()=>{if(!o.current)return;let l=e==null?void 0:e.activeElement;if(n!=null&&n.current){if((n==null?void 0:n.current)===l){i.current=l;return}}else if(a.contains(l)){i.current=l;return}n!=null&&n.current?mi(n.current):Cn(a,Pt.First)===Ya.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),i.current=e==null?void 0:e.activeElement})},[r]),i}function L1({ownerDocument:e,container:t,containers:n,previousActiveElement:r},i){let o=gl();Km(e==null?void 0:e.defaultView,"focus",a=>{if(!i||!o.current)return;let l=Mb(n);t.current instanceof HTMLElement&&l.add(t.current);let s=r.current;if(!s)return;let u=a.target;u&&u instanceof HTMLElement?Nb(l,u)?(r.current=u,mi(u)):(a.preventDefault(),a.stopPropagation(),mi(s)):mi(r.current)},!0)}function Nb(e,t){for(let n of e)if(n.contains(t))return!0;return!1}let Db=v.createContext(!1);function R1(){return v.useContext(Db)}function xp(e){return k.createElement(Db.Provider,{value:e.force},e.children)}function O1(e){let t=R1(),n=v.useContext(Ab),r=Vr(e),[i,o]=v.useState(()=>{if(!t&&n!==null||ir.isServer)return null;let a=r==null?void 0:r.getElementById("headlessui-portal-root");if(a)return a;if(r===null)return null;let l=r.createElement("div");return l.setAttribute("id","headlessui-portal-root"),r.body.appendChild(l)});return v.useEffect(()=>{i!==null&&(r!=null&&r.body.contains(i)||r==null||r.body.appendChild(i))},[i,r]),v.useEffect(()=>{t||n!==null&&o(n.current)},[n,o,t]),i}let k1=v.Fragment;function z1(e,t){let n=e,r=v.useRef(null),i=Ve(vb(c=>{r.current=c}),t),o=Vr(r),a=O1(r),[l]=v.useState(()=>{var c;return ir.isServer?null:(c=o==null?void 0:o.createElement("div"))!=null?c:null}),s=v.useContext(Mp),u=To();return et(()=>{!a||!l||a.contains(l)||(l.setAttribute("data-headlessui-portal",""),a.appendChild(l))},[a,l]),et(()=>{if(l&&s)return s.register(l)},[s,l]),xb(()=>{var c;!a||!l||(l instanceof Node&&a.contains(l)&&a.removeChild(l),a.childNodes.length<=0&&((c=a.parentElement)==null||c.removeChild(a)))}),u?!a||!l?null:ml.createPortal(Ze({ourProps:{ref:i},theirProps:n,defaultTag:k1,name:"Portal"}),l):null}let B1=v.Fragment,Ab=v.createContext(null);function U1(e,t){let{target:n,...r}=e,i={ref:Ve(t)};return k.createElement(Ab.Provider,{value:n},Ze({ourProps:i,theirProps:r,defaultTag:B1,name:"Popover.Group"}))}let Mp=v.createContext(null);function Cb(){let e=v.useContext(Mp),t=v.useRef([]),n=re(o=>(t.current.push(o),e&&e.register(o),()=>r(o))),r=re(o=>{let a=t.current.indexOf(o);a!==-1&&t.current.splice(a,1),e&&e.unregister(o)}),i=v.useMemo(()=>({register:n,unregister:r,portals:t}),[n,r,t]);return[t,v.useMemo(()=>function({children:o}){return k.createElement(Mp.Provider,{value:i},o)},[i])]}let $1=He(z1),_1=He(U1),Sp=Object.assign($1,{Group:_1}),Eb=v.createContext(null);function Tb(){let e=v.useContext(Eb);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,Tb),t}return e}function F1(){let[e,t]=v.useState([]);return[e.length>0?e.join(" "):void 0,v.useMemo(()=>function(n){let r=re(o=>(t(a=>[...a,o]),()=>t(a=>{let l=a.slice(),s=l.indexOf(o);return s!==-1&&l.splice(s,1),l}))),i=v.useMemo(()=>({register:r,slot:n.slot,name:n.name,props:n.props}),[r,n.slot,n.name,n.props]);return k.createElement(Eb.Provider,{value:i},n.children)},[t])]}let H1="p";function W1(e,t){let n=Dt(),{id:r=`headlessui-description-${n}`,...i}=e,o=Tb(),a=Ve(t);et(()=>o.register(r),[r,o.register]);let l={ref:a,...o.props,id:r};return Ze({ourProps:l,theirProps:i,slot:o.slot||{},defaultTag:H1,name:o.name||"Description"})}let G1=He(W1),V1=Object.assign(G1,{}),eg=v.createContext(()=>{});eg.displayName="StackContext";var Np=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(Np||{});function Z1(){return v.useContext(eg)}function Y1({children:e,onUpdate:t,type:n,element:r,enabled:i}){let o=Z1(),a=re((...l)=>{t==null||t(...l),o(...l)});return et(()=>{let l=i===void 0||i===!0;return l&&a(0,n,r),()=>{l&&a(1,n,r)}},[a,n,r,i]),k.createElement(eg.Provider,{value:a},e)}function Q1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const J1=typeof Object.is=="function"?Object.is:Q1,{useState:X1,useEffect:q1,useLayoutEffect:K1,useDebugValue:eE}=lo;function tE(e,t,n){const r=t(),[{inst:i},o]=X1({inst:{value:r,getSnapshot:t}});return K1(()=>{i.value=r,i.getSnapshot=t,Gd(i)&&o({inst:i})},[e,r,t]),q1(()=>(Gd(i)&&o({inst:i}),e(()=>{Gd(i)&&o({inst:i})})),[e]),eE(r),r}function Gd(e){const t=e.getSnapshot,n=e.value;try{const r=t();return!J1(n,r)}catch{return!0}}function nE(e,t,n){return t()}const rE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",iE=!rE,oE=iE?nE:tE,aE="useSyncExternalStore"in lo?(e=>e.useSyncExternalStore)(lo):oE;function lE(e){return aE(e.subscribe,e.getSnapshot,e.getSnapshot)}function sE(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(i){return r.add(i),()=>r.delete(i)},dispatch(i,...o){let a=t[i].call(n,...o);a&&(n=a,r.forEach(l=>l()))}}}function uE(){let e;return{before({doc:t}){var n;let r=t.documentElement;e=((n=t.defaultView)!=null?n:window).innerWidth-r.clientWidth},after({doc:t,d:n}){let r=t.documentElement,i=r.clientWidth-r.offsetWidth,o=e-i;n.style(r,"paddingRight",`${o}px`)}}}function cE(){if(!N1())return{};let e;return{before(){e=window.pageYOffset},after({doc:t,d:n,meta:r}){function i(o){return r.containers.flatMap(a=>a()).some(a=>a.contains(o))}n.microTask(()=>{if(window.getComputedStyle(t.documentElement).scrollBehavior!=="auto"){let a=Zn();a.style(t.documentElement,"scroll-behavior","auto"),n.add(()=>n.microTask(()=>a.dispose()))}n.style(t.body,"marginTop",`-${e}px`),window.scrollTo(0,0);let o=null;n.addEventListener(t,"click",a=>{if(a.target instanceof HTMLElement)try{let l=a.target.closest("a");if(!l)return;let{hash:s}=new URL(l.href),u=t.querySelector(s);u&&!i(u)&&(o=u)}catch{}},!0),n.addEventListener(t,"touchmove",a=>{a.target instanceof HTMLElement&&!i(a.target)&&a.preventDefault()},{passive:!1}),n.add(()=>{window.scrollTo(0,window.pageYOffset+e),o&&o.isConnected&&(o.scrollIntoView({block:"nearest"}),o=null)})})}}}function dE(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function fE(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let li=sE(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:Zn(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:fE(n)},i=[cE(),uE(),dE()];i.forEach(({before:o})=>o==null?void 0:o(r)),i.forEach(({after:o})=>o==null?void 0:o(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});li.subscribe(()=>{let e=li.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",i=n.count!==0;(i&&!r||!i&&r)&&li.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&li.dispatch("TEARDOWN",n)}});function pE(e,t,n){let r=lE(li),i=e?r.get(e):void 0,o=i?i.count>0:!1;return et(()=>{if(!(!e||!t))return li.dispatch("PUSH",e,n),()=>li.dispatch("POP",e,n)},[t,e]),o}let Vd=new Map,Qo=new Map;function Lv(e,t=!0){et(()=>{var n;if(!t)return;let r=typeof e=="function"?e():e.current;if(!r)return;function i(){var a;if(!r)return;let l=(a=Qo.get(r))!=null?a:1;if(l===1?Qo.delete(r):Qo.set(r,l-1),l!==1)return;let s=Vd.get(r);s&&(s["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",s["aria-hidden"]),r.inert=s.inert,Vd.delete(r))}let o=(n=Qo.get(r))!=null?n:0;return Qo.set(r,o+1),o!==0||(Vd.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0),i},[e,t])}function jb({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){var r;let i=v.useRef((r=n==null?void 0:n.current)!=null?r:null),o=Vr(i),a=re(()=>{var l;let s=[];for(let u of e)u!==null&&(u instanceof HTMLElement?s.push(u):"current"in u&&u.current instanceof HTMLElement&&s.push(u.current));if(t!=null&&t.current)for(let u of t.current)s.push(u);for(let u of(l=o==null?void 0:o.querySelectorAll("html > *, body > *"))!=null?l:[])u!==document.body&&u!==document.head&&u instanceof HTMLElement&&u.id!=="headlessui-portal-root"&&(u.contains(i.current)||s.some(c=>u.contains(c))||s.push(u));return s});return{resolveContainers:a,contains:re(l=>a().some(s=>s.contains(l))),mainTreeNodeRef:i,MainTreeNode:v.useMemo(()=>function(){return n!=null?null:k.createElement(_r,{features:cr.Hidden,ref:i})},[i,n])}}function mE(){let e=v.useRef(null);return{mainTreeNodeRef:e,MainTreeNode:v.useMemo(()=>function(){return k.createElement(_r,{features:cr.Hidden,ref:e})},[e])}}var gE=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(gE||{}),hE=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(hE||{});let vE={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},hu=v.createContext(null);hu.displayName="DialogContext";function hl(e){let t=v.useContext(hu);if(t===null){let n=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,hl),n}return t}function yE(e,t,n=()=>[document.body]){pE(e,t,r=>{var i;return{containers:[...(i=r.containers)!=null?i:[],n]}})}function IE(e,t){return Se(t.type,vE,e,t)}let wE="div",bE=Yn.RenderStrategy|Yn.Static;function xE(e,t){var n;let r=Dt(),{id:i=`headlessui-dialog-${r}`,open:o,onClose:a,initialFocus:l,__demoMode:s=!1,...u}=e,[c,d]=v.useState(0),f=jo();o===void 0&&f!==null&&(o=(f&$e.Open)===$e.Open);let p=v.useRef(null),g=Ve(p,t),h=Vr(p),w=e.hasOwnProperty("open")||f!==null,I=e.hasOwnProperty("onClose");if(!w&&!I)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!w)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!I)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof o!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${o}`);if(typeof a!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${a}`);let y=o?0:1,[b,x]=v.useReducer(IE,{titleId:null,descriptionId:null,panelRef:v.createRef()}),N=re(()=>a(!1)),M=re(X=>x({type:0,id:X})),S=To()?s?!1:y===0:!1,C=c>1,L=v.useContext(hu)!==null,[R,O]=Cb(),{resolveContainers:J,mainTreeNodeRef:U,MainTreeNode:G}=jb({portals:R,defaultContainers:[(n=b.panelRef.current)!=null?n:p.current]}),Z=C?"parent":"leaf",$=f!==null?(f&$e.Closing)===$e.Closing:!1,ee=(()=>L||$?!1:S)(),P=v.useCallback(()=>{var X,me;return(me=Array.from((X=h==null?void 0:h.querySelectorAll("body > *"))!=null?X:[]).find(Ie=>Ie.id==="headlessui-portal-root"?!1:Ie.contains(U.current)&&Ie instanceof HTMLElement))!=null?me:null},[U]);Lv(P,ee);let B=(()=>C?!0:S)(),F=v.useCallback(()=>{var X,me;return(me=Array.from((X=h==null?void 0:h.querySelectorAll("[data-headlessui-portal]"))!=null?X:[]).find(Ie=>Ie.contains(U.current)&&Ie instanceof HTMLElement))!=null?me:null},[U]);Lv(F,B);let V=(()=>!(!S||C))();Ym(J,N,V);let D=(()=>!(C||y!==0))();Km(h==null?void 0:h.defaultView,"keydown",X=>{D&&(X.defaultPrevented||X.key===Te.Escape&&(X.preventDefault(),X.stopPropagation(),N()))});let E=(()=>!($||y!==0||L))();yE(h,E,J),v.useEffect(()=>{if(y!==0||!p.current)return;let X=new ResizeObserver(me=>{for(let Ie of me){let ve=Ie.target.getBoundingClientRect();ve.x===0&&ve.y===0&&ve.width===0&&ve.height===0&&N()}});return X.observe(p.current),()=>X.disconnect()},[y,p,N]);let[T,z]=F1(),_=v.useMemo(()=>[{dialogState:y,close:N,setTitleId:M},b],[y,b,N,M]),ie=v.useMemo(()=>({open:y===0}),[y]),ue={ref:g,id:i,role:"dialog","aria-modal":y===0?!0:void 0,"aria-labelledby":b.titleId,"aria-describedby":T};return k.createElement(Y1,{type:"Dialog",enabled:y===0,element:p,onUpdate:re((X,me)=>{me==="Dialog"&&Se(X,{[Np.Add]:()=>d(Ie=>Ie+1),[Np.Remove]:()=>d(Ie=>Ie-1)})})},k.createElement(xp,{force:!0},k.createElement(Sp,null,k.createElement(hu.Provider,{value:_},k.createElement(Sp.Group,{target:p},k.createElement(xp,{force:!1},k.createElement(z,{slot:ie,name:"Dialog.Description"},k.createElement(Yo,{initialFocus:l,containers:J,features:S?Se(Z,{parent:Yo.features.RestoreFocus,leaf:Yo.features.All&~Yo.features.FocusLock}):Yo.features.None},k.createElement(O,null,Ze({ourProps:ue,theirProps:u,slot:ie,defaultTag:wE,features:bE,visible:y===0,name:"Dialog"}))))))))),k.createElement(G,null))}let ME="div";function SE(e,t){let n=Dt(),{id:r=`headlessui-dialog-overlay-${n}`,...i}=e,[{dialogState:o,close:a}]=hl("Dialog.Overlay"),l=Ve(t),s=re(c=>{if(c.target===c.currentTarget){if(cc(c.currentTarget))return c.preventDefault();c.preventDefault(),c.stopPropagation(),a()}}),u=v.useMemo(()=>({open:o===0}),[o]);return Ze({ourProps:{ref:l,id:r,"aria-hidden":!0,onClick:s},theirProps:i,slot:u,defaultTag:ME,name:"Dialog.Overlay"})}let NE="div";function DE(e,t){let n=Dt(),{id:r=`headlessui-dialog-backdrop-${n}`,...i}=e,[{dialogState:o},a]=hl("Dialog.Backdrop"),l=Ve(t);v.useEffect(()=>{if(a.panelRef.current===null)throw new Error("A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.")},[a.panelRef]);let s=v.useMemo(()=>({open:o===0}),[o]);return k.createElement(xp,{force:!0},k.createElement(Sp,null,Ze({ourProps:{ref:l,id:r,"aria-hidden":!0},theirProps:i,slot:s,defaultTag:NE,name:"Dialog.Backdrop"})))}let AE="div";function CE(e,t){let n=Dt(),{id:r=`headlessui-dialog-panel-${n}`,...i}=e,[{dialogState:o},a]=hl("Dialog.Panel"),l=Ve(t,a.panelRef),s=v.useMemo(()=>({open:o===0}),[o]),u=re(c=>{c.stopPropagation()});return Ze({ourProps:{ref:l,id:r,onClick:u},theirProps:i,slot:s,defaultTag:AE,name:"Dialog.Panel"})}let EE="h2";function TE(e,t){let n=Dt(),{id:r=`headlessui-dialog-title-${n}`,...i}=e,[{dialogState:o,setTitleId:a}]=hl("Dialog.Title"),l=Ve(t);v.useEffect(()=>(a(r),()=>a(null)),[r,a]);let s=v.useMemo(()=>({open:o===0}),[o]);return Ze({ourProps:{ref:l,id:r},theirProps:i,slot:s,defaultTag:EE,name:"Dialog.Title"})}let jE=He(xE),PE=He(DE),LE=He(CE),RE=He(SE),OE=He(TE),vu=Object.assign(jE,{Backdrop:PE,Panel:LE,Overlay:RE,Title:OE,Description:V1}),Rv=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Ov(e){var t,n;let r=(t=e.innerText)!=null?t:"",i=e.cloneNode(!0);if(!(i instanceof HTMLElement))return r;let o=!1;for(let l of i.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))l.remove(),o=!0;let a=o?(n=i.innerText)!=null?n:"":r;return Rv.test(a)&&(a=a.replace(Rv,"")),a}function kE(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let r=n.split(" ").map(i=>{let o=document.getElementById(i);if(o){let a=o.getAttribute("aria-label");return typeof a=="string"?a.trim():Ov(o).trim()}return null}).filter(Boolean);if(r.length>0)return r.join(", ")}return Ov(e).trim()}function zE(e){let t=v.useRef(""),n=v.useRef("");return re(()=>{let r=e.current;if(!r)return"";let i=r.innerText;if(t.current===i)return n.current;let o=kE(r).trim().toLowerCase();return t.current=i,n.current=o,o})}var BE=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(BE||{}),UE=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(UE||{}),$E=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))($E||{}),_E=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.GoToOption=2]="GoToOption",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterOption=5]="RegisterOption",e[e.UnregisterOption=6]="UnregisterOption",e[e.RegisterLabel=7]="RegisterLabel",e))(_E||{});function Zd(e,t=n=>n){let n=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,r=pb(t(e.options.slice()),o=>o.dataRef.current.domRef.current),i=n?r.indexOf(n):null;return i===-1&&(i=null),{options:r,activeOptionIndex:i}}let FE={1(e){return e.dataRef.current.disabled||e.listboxState===1?e:{...e,activeOptionIndex:null,listboxState:1}},0(e){if(e.dataRef.current.disabled||e.listboxState===0)return e;let t=e.activeOptionIndex,{isSelected:n}=e.dataRef.current,r=e.options.findIndex(i=>n(i.dataRef.current.value));return r!==-1&&(t=r),{...e,listboxState:0,activeOptionIndex:t}},2(e,t){var n;if(e.dataRef.current.disabled||e.listboxState===1)return e;let r=Zd(e),i=y1(t,{resolveItems:()=>r.options,resolveActiveIndex:()=>r.activeOptionIndex,resolveId:o=>o.id,resolveDisabled:o=>o.dataRef.current.disabled});return{...e,...r,searchQuery:"",activeOptionIndex:i,activationTrigger:(n=t.trigger)!=null?n:1}},3:(e,t)=>{if(e.dataRef.current.disabled||e.listboxState===1)return e;let n=e.searchQuery!==""?0:1,r=e.searchQuery+t.value.toLowerCase(),i=(e.activeOptionIndex!==null?e.options.slice(e.activeOptionIndex+n).concat(e.options.slice(0,e.activeOptionIndex+n)):e.options).find(a=>{var l;return!a.dataRef.current.disabled&&((l=a.dataRef.current.textValue)==null?void 0:l.startsWith(r))}),o=i?e.options.indexOf(i):-1;return o===-1||o===e.activeOptionIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeOptionIndex:o,activationTrigger:1}},4(e){return e.dataRef.current.disabled||e.listboxState===1||e.searchQuery===""?e:{...e,searchQuery:""}},5:(e,t)=>{let n={id:t.id,dataRef:t.dataRef},r=Zd(e,i=>[...i,n]);return e.activeOptionIndex===null&&e.dataRef.current.isSelected(t.dataRef.current.value)&&(r.activeOptionIndex=r.options.indexOf(n)),{...e,...r}},6:(e,t)=>{let n=Zd(e,r=>{let i=r.findIndex(o=>o.id===t.id);return i!==-1&&r.splice(i,1),r});return{...e,...n,activationTrigger:1}},7:(e,t)=>({...e,labelId:t.id})},tg=v.createContext(null);tg.displayName="ListboxActionsContext";function vl(e){let t=v.useContext(tg);if(t===null){let n=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,vl),n}return t}let ng=v.createContext(null);ng.displayName="ListboxDataContext";function yl(e){let t=v.useContext(ng);if(t===null){let n=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,yl),n}return t}function HE(e,t){return Se(t.type,FE,e,t)}let WE=v.Fragment;function GE(e,t){let{value:n,defaultValue:r,form:i,name:o,onChange:a,by:l=(T,z)=>T===z,disabled:s=!1,horizontal:u=!1,multiple:c=!1,...d}=e;const f=u?"horizontal":"vertical";let p=Ve(t),[g=c?[]:void 0,h]=M1(n,a,r),[w,I]=v.useReducer(HE,{dataRef:v.createRef(),listboxState:1,options:[],searchQuery:"",labelId:null,activeOptionIndex:null,activationTrigger:1}),y=v.useRef({static:!1,hold:!1}),b=v.useRef(null),x=v.useRef(null),N=v.useRef(null),M=re(typeof l=="string"?(T,z)=>{let _=l;return(T==null?void 0:T[_])===(z==null?void 0:z[_])}:l),S=v.useCallback(T=>Se(C.mode,{1:()=>g.some(z=>M(z,T)),0:()=>M(g,T)}),[g]),C=v.useMemo(()=>({...w,value:g,disabled:s,mode:c?1:0,orientation:f,compare:M,isSelected:S,optionsPropsRef:y,labelRef:b,buttonRef:x,optionsRef:N}),[g,s,c,w]);et(()=>{w.dataRef.current=C},[C]),Ym([C.buttonRef,C.optionsRef],(T,z)=>{var _;I({type:1}),Zm(z,uc.Loose)||(T.preventDefault(),(_=C.buttonRef.current)==null||_.focus())},C.listboxState===0);let L=v.useMemo(()=>({open:C.listboxState===0,disabled:s,value:g}),[C,s,g]),R=re(T=>{let z=C.options.find(_=>_.id===T);z&&ee(z.dataRef.current.value)}),O=re(()=>{if(C.activeOptionIndex!==null){let{dataRef:T,id:z}=C.options[C.activeOptionIndex];ee(T.current.value),I({type:2,focus:$t.Specific,id:z})}}),J=re(()=>I({type:0})),U=re(()=>I({type:1})),G=re((T,z,_)=>T===$t.Specific?I({type:2,focus:$t.Specific,id:z,trigger:_}):I({type:2,focus:T,trigger:_})),Z=re((T,z)=>(I({type:5,id:T,dataRef:z}),()=>I({type:6,id:T}))),$=re(T=>(I({type:7,id:T}),()=>I({type:7,id:null}))),ee=re(T=>Se(C.mode,{0(){return h==null?void 0:h(T)},1(){let z=C.value.slice(),_=z.findIndex(ie=>M(ie,T));return _===-1?z.push(T):z.splice(_,1),h==null?void 0:h(z)}})),P=re(T=>I({type:3,value:T})),B=re(()=>I({type:4})),F=v.useMemo(()=>({onChange:ee,registerOption:Z,registerLabel:$,goToOption:G,closeListbox:U,openListbox:J,selectActiveOption:O,selectOption:R,search:P,clearSearch:B}),[]),V={ref:p},D=v.useRef(null),E=wi();return v.useEffect(()=>{D.current&&r!==void 0&&E.addEventListener(D.current,"reset",()=>{h==null||h(r)})},[D,h]),k.createElement(tg.Provider,{value:F},k.createElement(ng.Provider,{value:C},k.createElement(Jm,{value:Se(C.listboxState,{0:$e.Open,1:$e.Closed})},o!=null&&g!=null&&Ib({[o]:g}).map(([T,z],_)=>k.createElement(_r,{features:cr.Hidden,ref:_===0?ie=>{var ue;D.current=(ue=ie==null?void 0:ie.closest("form"))!=null?ue:null}:void 0,...bp({key:T,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:i,name:T,value:z})})),Ze({ourProps:V,theirProps:d,slot:L,defaultTag:WE,name:"Listbox"}))))}let VE="button";function ZE(e,t){var n;let r=Dt(),{id:i=`headlessui-listbox-button-${r}`,...o}=e,a=yl("Listbox.Button"),l=vl("Listbox.Button"),s=Ve(a.buttonRef,t),u=wi(),c=re(w=>{switch(w.key){case Te.Space:case Te.Enter:case Te.ArrowDown:w.preventDefault(),l.openListbox(),u.nextFrame(()=>{a.value||l.goToOption($t.First)});break;case Te.ArrowUp:w.preventDefault(),l.openListbox(),u.nextFrame(()=>{a.value||l.goToOption($t.Last)});break}}),d=re(w=>{switch(w.key){case Te.Space:w.preventDefault();break}}),f=re(w=>{if(cc(w.currentTarget))return w.preventDefault();a.listboxState===0?(l.closeListbox(),u.nextFrame(()=>{var I;return(I=a.buttonRef.current)==null?void 0:I.focus({preventScroll:!0})})):(w.preventDefault(),l.openListbox())}),p=fb(()=>{if(a.labelId)return[a.labelId,i].join(" ")},[a.labelId,i]),g=v.useMemo(()=>({open:a.listboxState===0,disabled:a.disabled,value:a.value}),[a]),h={ref:s,id:i,type:gb(e,a.buttonRef),"aria-haspopup":"listbox","aria-controls":(n=a.optionsRef.current)==null?void 0:n.id,"aria-expanded":a.listboxState===0,"aria-labelledby":p,disabled:a.disabled,onKeyDown:c,onKeyUp:d,onClick:f};return Ze({ourProps:h,theirProps:o,slot:g,defaultTag:VE,name:"Listbox.Button"})}let YE="label";function QE(e,t){let n=Dt(),{id:r=`headlessui-listbox-label-${n}`,...i}=e,o=yl("Listbox.Label"),a=vl("Listbox.Label"),l=Ve(o.labelRef,t);et(()=>a.registerLabel(r),[r]);let s=re(()=>{var c;return(c=o.buttonRef.current)==null?void 0:c.focus({preventScroll:!0})}),u=v.useMemo(()=>({open:o.listboxState===0,disabled:o.disabled}),[o]);return Ze({ourProps:{ref:l,id:r,onClick:s},theirProps:i,slot:u,defaultTag:YE,name:"Listbox.Label"})}let JE="ul",XE=Yn.RenderStrategy|Yn.Static;function qE(e,t){var n;let r=Dt(),{id:i=`headlessui-listbox-options-${r}`,...o}=e,a=yl("Listbox.Options"),l=vl("Listbox.Options"),s=Ve(a.optionsRef,t),u=wi(),c=wi(),d=jo(),f=(()=>d!==null?(d&$e.Open)===$e.Open:a.listboxState===0)();v.useEffect(()=>{var I;let y=a.optionsRef.current;y&&a.listboxState===0&&y!==((I=lc(y))==null?void 0:I.activeElement)&&y.focus({preventScroll:!0})},[a.listboxState,a.optionsRef]);let p=re(I=>{switch(c.dispose(),I.key){case Te.Space:if(a.searchQuery!=="")return I.preventDefault(),I.stopPropagation(),l.search(I.key);case Te.Enter:if(I.preventDefault(),I.stopPropagation(),a.activeOptionIndex!==null){let{dataRef:y}=a.options[a.activeOptionIndex];l.onChange(y.current.value)}a.mode===0&&(l.closeListbox(),Zn().nextFrame(()=>{var y;return(y=a.buttonRef.current)==null?void 0:y.focus({preventScroll:!0})}));break;case Se(a.orientation,{vertical:Te.ArrowDown,horizontal:Te.ArrowRight}):return I.preventDefault(),I.stopPropagation(),l.goToOption($t.Next);case Se(a.orientation,{vertical:Te.ArrowUp,horizontal:Te.ArrowLeft}):return I.preventDefault(),I.stopPropagation(),l.goToOption($t.Previous);case Te.Home:case Te.PageUp:return I.preventDefault(),I.stopPropagation(),l.goToOption($t.First);case Te.End:case Te.PageDown:return I.preventDefault(),I.stopPropagation(),l.goToOption($t.Last);case Te.Escape:return I.preventDefault(),I.stopPropagation(),l.closeListbox(),u.nextFrame(()=>{var y;return(y=a.buttonRef.current)==null?void 0:y.focus({preventScroll:!0})});case Te.Tab:I.preventDefault(),I.stopPropagation();break;default:I.key.length===1&&(l.search(I.key),c.setTimeout(()=>l.clearSearch(),350));break}}),g=fb(()=>{var I,y,b;return(b=(I=a.labelRef.current)==null?void 0:I.id)!=null?b:(y=a.buttonRef.current)==null?void 0:y.id},[a.labelRef.current,a.buttonRef.current]),h=v.useMemo(()=>({open:a.listboxState===0}),[a]),w={"aria-activedescendant":a.activeOptionIndex===null||(n=a.options[a.activeOptionIndex])==null?void 0:n.id,"aria-multiselectable":a.mode===1?!0:void 0,"aria-labelledby":g,"aria-orientation":a.orientation,id:i,onKeyDown:p,role:"listbox",tabIndex:0,ref:s};return Ze({ourProps:w,theirProps:o,slot:h,defaultTag:JE,features:XE,visible:f,name:"Listbox.Options"})}let KE="li";function eT(e,t){let n=Dt(),{id:r=`headlessui-listbox-option-${n}`,disabled:i=!1,value:o,...a}=e,l=yl("Listbox.Option"),s=vl("Listbox.Option"),u=l.activeOptionIndex!==null?l.options[l.activeOptionIndex].id===r:!1,c=l.isSelected(o),d=v.useRef(null),f=zE(d),p=Kt({disabled:i,value:o,domRef:d,get textValue(){return f()}}),g=Ve(t,d);et(()=>{if(l.listboxState!==0||!u||l.activationTrigger===0)return;let M=Zn();return M.requestAnimationFrame(()=>{var S,C;(C=(S=d.current)==null?void 0:S.scrollIntoView)==null||C.call(S,{block:"nearest"})}),M.dispose},[d,u,l.listboxState,l.activationTrigger,l.activeOptionIndex]),et(()=>s.registerOption(r,p),[p,r]);let h=re(M=>{if(i)return M.preventDefault();s.onChange(o),l.mode===0&&(s.closeListbox(),Zn().nextFrame(()=>{var S;return(S=l.buttonRef.current)==null?void 0:S.focus({preventScroll:!0})}))}),w=re(()=>{if(i)return s.goToOption($t.Nothing);s.goToOption($t.Specific,r)}),I=S1(),y=re(M=>I.update(M)),b=re(M=>{I.wasMoved(M)&&(i||u||s.goToOption($t.Specific,r,0))}),x=re(M=>{I.wasMoved(M)&&(i||u&&s.goToOption($t.Nothing))}),N=v.useMemo(()=>({active:u,selected:c,disabled:i}),[u,c,i]);return Ze({ourProps:{id:r,ref:g,role:"option",tabIndex:i===!0?void 0:-1,"aria-disabled":i===!0?!0:void 0,"aria-selected":c,disabled:void 0,onClick:h,onFocus:w,onPointerEnter:y,onMouseEnter:y,onPointerMove:b,onMouseMove:b,onPointerLeave:x,onMouseLeave:x},theirProps:a,slot:N,defaultTag:KE,name:"Listbox.Option"})}let tT=He(GE),nT=He(ZE),rT=He(QE),iT=He(qE),oT=He(eT),_n=Object.assign(tT,{Button:nT,Label:rT,Options:iT,Option:oT});var aT=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(aT||{}),lT=(e=>(e[e.TogglePopover=0]="TogglePopover",e[e.ClosePopover=1]="ClosePopover",e[e.SetButton=2]="SetButton",e[e.SetButtonId=3]="SetButtonId",e[e.SetPanel=4]="SetPanel",e[e.SetPanelId=5]="SetPanelId",e))(lT||{});let sT={0:e=>{let t={...e,popoverState:Se(e.popoverState,{0:1,1:0})};return t.popoverState===0&&(t.__demoMode=!1),t},1(e){return e.popoverState===1?e:{...e,popoverState:1}},2(e,t){return e.button===t.button?e:{...e,button:t.button}},3(e,t){return e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId}},4(e,t){return e.panel===t.panel?e:{...e,panel:t.panel}},5(e,t){return e.panelId===t.panelId?e:{...e,panelId:t.panelId}}},rg=v.createContext(null);rg.displayName="PopoverContext";function dc(e){let t=v.useContext(rg);if(t===null){let n=new Error(`<${e} /> is missing a parent <Popover /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,dc),n}return t}let ig=v.createContext(null);ig.displayName="PopoverAPIContext";function og(e){let t=v.useContext(ig);if(t===null){let n=new Error(`<${e} /> is missing a parent <Popover /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,og),n}return t}let ag=v.createContext(null);ag.displayName="PopoverGroupContext";function Pb(){return v.useContext(ag)}let fc=v.createContext(null);fc.displayName="PopoverPanelContext";function uT(){return v.useContext(fc)}function cT(e,t){return Se(t.type,sT,e,t)}let dT="div";function fT(e,t){var n;let{__demoMode:r=!1,...i}=e,o=v.useRef(null),a=Ve(t,vb($=>{o.current=$})),l=v.useRef([]),s=v.useReducer(cT,{__demoMode:r,popoverState:r?0:1,buttons:l,button:null,buttonId:null,panel:null,panelId:null,beforePanelSentinel:v.createRef(),afterPanelSentinel:v.createRef()}),[{popoverState:u,button:c,buttonId:d,panel:f,panelId:p,beforePanelSentinel:g,afterPanelSentinel:h},w]=s,I=Vr((n=o.current)!=null?n:c),y=v.useMemo(()=>{if(!c||!f)return!1;for(let D of document.querySelectorAll("body > *"))if(Number(D==null?void 0:D.contains(c))^Number(D==null?void 0:D.contains(f)))return!0;let $=sc(),ee=$.indexOf(c),P=(ee+$.length-1)%$.length,B=(ee+1)%$.length,F=$[P],V=$[B];return!f.contains(F)&&!f.contains(V)},[c,f]),b=Kt(d),x=Kt(p),N=v.useMemo(()=>({buttonId:b,panelId:x,close:()=>w({type:1})}),[b,x,w]),M=Pb(),S=M==null?void 0:M.registerPopover,C=re(()=>{var $;return($=M==null?void 0:M.isFocusWithinPopoverGroup())!=null?$:(I==null?void 0:I.activeElement)&&((c==null?void 0:c.contains(I.activeElement))||(f==null?void 0:f.contains(I.activeElement)))});v.useEffect(()=>S==null?void 0:S(N),[S,N]);let[L,R]=Cb(),O=jb({mainTreeNodeRef:M==null?void 0:M.mainTreeNodeRef,portals:L,defaultContainers:[c,f]});Km(I==null?void 0:I.defaultView,"focus",$=>{var ee,P,B,F;$.target!==window&&$.target instanceof HTMLElement&&u===0&&(C()||c&&f&&(O.contains($.target)||(P=(ee=g.current)==null?void 0:ee.contains)!=null&&P.call(ee,$.target)||(F=(B=h.current)==null?void 0:B.contains)!=null&&F.call(B,$.target)||w({type:1})))},!0),Ym(O.resolveContainers,($,ee)=>{w({type:1}),Zm(ee,uc.Loose)||($.preventDefault(),c==null||c.focus())},u===0);let J=re($=>{w({type:1});let ee=(()=>$?$ instanceof HTMLElement?$:"current"in $&&$.current instanceof HTMLElement?$.current:c:c)();ee==null||ee.focus()}),U=v.useMemo(()=>({close:J,isPortalled:y}),[J,y]),G=v.useMemo(()=>({open:u===0,close:J}),[u,J]),Z={ref:a};return k.createElement(fc.Provider,{value:null},k.createElement(rg.Provider,{value:s},k.createElement(ig.Provider,{value:U},k.createElement(Jm,{value:Se(u,{0:$e.Open,1:$e.Closed})},k.createElement(R,null,Ze({ourProps:Z,theirProps:i,slot:G,defaultTag:dT,name:"Popover"}),k.createElement(O.MainTreeNode,null))))))}let pT="button";function mT(e,t){let n=Dt(),{id:r=`headlessui-popover-button-${n}`,...i}=e,[o,a]=dc("Popover.Button"),{isPortalled:l}=og("Popover.Button"),s=v.useRef(null),u=`headlessui-focus-sentinel-${Dt()}`,c=Pb(),d=c==null?void 0:c.closeOthers,f=uT()!==null;v.useEffect(()=>{if(!f)return a({type:3,buttonId:r}),()=>{a({type:3,buttonId:null})}},[f,r,a]);let[p]=v.useState(()=>Symbol()),g=Ve(s,t,f?null:O=>{if(O)o.buttons.current.push(p);else{let J=o.buttons.current.indexOf(p);J!==-1&&o.buttons.current.splice(J,1)}o.buttons.current.length>1&&console.warn("You are already using a <Popover.Button /> but only 1 <Popover.Button /> is supported."),O&&a({type:2,button:O})}),h=Ve(s,t),w=Vr(s),I=re(O=>{var J,U,G;if(f){if(o.popoverState===1)return;switch(O.key){case Te.Space:case Te.Enter:O.preventDefault(),(U=(J=O.target).click)==null||U.call(J),a({type:1}),(G=o.button)==null||G.focus();break}}else switch(O.key){case Te.Space:case Te.Enter:O.preventDefault(),O.stopPropagation(),o.popoverState===1&&(d==null||d(o.buttonId)),a({type:0});break;case Te.Escape:if(o.popoverState!==0)return d==null?void 0:d(o.buttonId);if(!s.current||w!=null&&w.activeElement&&!s.current.contains(w.activeElement))return;O.preventDefault(),O.stopPropagation(),a({type:1});break}}),y=re(O=>{f||O.key===Te.Space&&O.preventDefault()}),b=re(O=>{var J,U;cc(O.currentTarget)||e.disabled||(f?(a({type:1}),(J=o.button)==null||J.focus()):(O.preventDefault(),O.stopPropagation(),o.popoverState===1&&(d==null||d(o.buttonId)),a({type:0}),(U=o.button)==null||U.focus()))}),x=re(O=>{O.preventDefault(),O.stopPropagation()}),N=o.popoverState===0,M=v.useMemo(()=>({open:N}),[N]),S=gb(e,s),C=f?{ref:h,type:S,onKeyDown:I,onClick:b}:{ref:g,id:o.buttonId,type:S,"aria-expanded":o.popoverState===0,"aria-controls":o.panel?o.panelId:void 0,onKeyDown:I,onKeyUp:y,onClick:b,onMouseDown:x},L=qm(),R=re(()=>{let O=o.panel;if(!O)return;function J(){Se(L.current,{[Jt.Forwards]:()=>Cn(O,Pt.First),[Jt.Backwards]:()=>Cn(O,Pt.Last)})===Ya.Error&&Cn(sc().filter(U=>U.dataset.headlessuiFocusGuard!=="true"),Se(L.current,{[Jt.Forwards]:Pt.Next,[Jt.Backwards]:Pt.Previous}),{relativeTo:o.button})}J()});return k.createElement(k.Fragment,null,Ze({ourProps:C,theirProps:i,slot:M,defaultTag:pT,name:"Popover.Button"}),N&&!f&&l&&k.createElement(_r,{id:u,features:cr.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:R}))}let gT="div",hT=Yn.RenderStrategy|Yn.Static;function vT(e,t){let n=Dt(),{id:r=`headlessui-popover-overlay-${n}`,...i}=e,[{popoverState:o},a]=dc("Popover.Overlay"),l=Ve(t),s=jo(),u=(()=>s!==null?(s&$e.Open)===$e.Open:o===0)(),c=re(f=>{if(cc(f.currentTarget))return f.preventDefault();a({type:1})}),d=v.useMemo(()=>({open:o===0}),[o]);return Ze({ourProps:{ref:l,id:r,"aria-hidden":!0,onClick:c},theirProps:i,slot:d,defaultTag:gT,features:hT,visible:u,name:"Popover.Overlay"})}let yT="div",IT=Yn.RenderStrategy|Yn.Static;function wT(e,t){let n=Dt(),{id:r=`headlessui-popover-panel-${n}`,focus:i=!1,...o}=e,[a,l]=dc("Popover.Panel"),{close:s,isPortalled:u}=og("Popover.Panel"),c=`headlessui-focus-sentinel-before-${Dt()}`,d=`headlessui-focus-sentinel-after-${Dt()}`,f=v.useRef(null),p=Ve(f,t,S=>{l({type:4,panel:S})}),g=Vr(f);et(()=>(l({type:5,panelId:r}),()=>{l({type:5,panelId:null})}),[r,l]);let h=jo(),w=(()=>h!==null?(h&$e.Open)===$e.Open:a.popoverState===0)(),I=re(S=>{var C;switch(S.key){case Te.Escape:if(a.popoverState!==0||!f.current||g!=null&&g.activeElement&&!f.current.contains(g.activeElement))return;S.preventDefault(),S.stopPropagation(),l({type:1}),(C=a.button)==null||C.focus();break}});v.useEffect(()=>{var S;e.static||a.popoverState===1&&((S=e.unmount)==null||S)&&l({type:4,panel:null})},[a.popoverState,e.unmount,e.static,l]),v.useEffect(()=>{if(a.__demoMode||!i||a.popoverState!==0||!f.current)return;let S=g==null?void 0:g.activeElement;f.current.contains(S)||Cn(f.current,Pt.First)},[a.__demoMode,i,f,a.popoverState]);let y=v.useMemo(()=>({open:a.popoverState===0,close:s}),[a,s]),b={ref:p,id:r,onKeyDown:I,onBlur:i&&a.popoverState===0?S=>{var C,L,R,O,J;let U=S.relatedTarget;U&&f.current&&((C=f.current)!=null&&C.contains(U)||(l({type:1}),((R=(L=a.beforePanelSentinel.current)==null?void 0:L.contains)!=null&&R.call(L,U)||(J=(O=a.afterPanelSentinel.current)==null?void 0:O.contains)!=null&&J.call(O,U))&&U.focus({preventScroll:!0})))}:void 0,tabIndex:-1},x=qm(),N=re(()=>{let S=f.current;if(!S)return;function C(){Se(x.current,{[Jt.Forwards]:()=>{var L;Cn(S,Pt.First)===Ya.Error&&((L=a.afterPanelSentinel.current)==null||L.focus())},[Jt.Backwards]:()=>{var L;(L=a.button)==null||L.focus({preventScroll:!0})}})}C()}),M=re(()=>{let S=f.current;if(!S)return;function C(){Se(x.current,{[Jt.Forwards]:()=>{var L;if(!a.button)return;let R=sc(),O=R.indexOf(a.button),J=R.slice(0,O+1),U=[...R.slice(O+1),...J];for(let G of U.slice())if(G.dataset.headlessuiFocusGuard==="true"||(L=a.panel)!=null&&L.contains(G)){let Z=U.indexOf(G);Z!==-1&&U.splice(Z,1)}Cn(U,Pt.First,{sorted:!1})},[Jt.Backwards]:()=>{var L;Cn(S,Pt.Previous)===Ya.Error&&((L=a.button)==null||L.focus())}})}C()});return k.createElement(fc.Provider,{value:r},w&&u&&k.createElement(_r,{id:c,ref:a.beforePanelSentinel,features:cr.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:N}),Ze({ourProps:b,theirProps:o,slot:y,defaultTag:yT,features:IT,visible:w,name:"Popover.Panel"}),w&&u&&k.createElement(_r,{id:d,ref:a.afterPanelSentinel,features:cr.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:M}))}let bT="div";function xT(e,t){let n=v.useRef(null),r=Ve(n,t),[i,o]=v.useState([]),a=mE(),l=re(h=>{o(w=>{let I=w.indexOf(h);if(I!==-1){let y=w.slice();return y.splice(I,1),y}return w})}),s=re(h=>(o(w=>[...w,h]),()=>l(h))),u=re(()=>{var h;let w=lc(n);if(!w)return!1;let I=w.activeElement;return(h=n.current)!=null&&h.contains(I)?!0:i.some(y=>{var b,x;return((b=w.getElementById(y.buttonId.current))==null?void 0:b.contains(I))||((x=w.getElementById(y.panelId.current))==null?void 0:x.contains(I))})}),c=re(h=>{for(let w of i)w.buttonId.current!==h&&w.close()}),d=v.useMemo(()=>({registerPopover:s,unregisterPopover:l,isFocusWithinPopoverGroup:u,closeOthers:c,mainTreeNodeRef:a.mainTreeNodeRef}),[s,l,u,c,a.mainTreeNodeRef]),f=v.useMemo(()=>({}),[]),p=e,g={ref:r};return k.createElement(ag.Provider,{value:d},Ze({ourProps:g,theirProps:p,slot:f,defaultTag:bT,name:"Popover.Group"}),k.createElement(a.MainTreeNode,null))}let MT=He(fT),ST=He(mT),NT=He(vT),DT=He(wT),AT=He(xT),ro=Object.assign(MT,{Button:ST,Overlay:NT,Panel:DT,Group:AT});function CT(e=0){let[t,n]=v.useState(e),r=gl(),i=v.useCallback(s=>{r.current&&n(u=>u|s)},[t,r]),o=v.useCallback(s=>!!(t&s),[t]),a=v.useCallback(s=>{r.current&&n(u=>u&~s)},[n,r]),l=v.useCallback(s=>{r.current&&n(u=>u^s)},[n]);return{flags:t,addFlag:i,hasFlag:o,removeFlag:a,toggleFlag:l}}function ET(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function Yd(e,...t){e&&t.length>0&&e.classList.add(...t)}function Qd(e,...t){e&&t.length>0&&e.classList.remove(...t)}function TT(e,t){let n=Zn();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:i}=getComputedStyle(e),[o,a]=[r,i].map(s=>{let[u=0]=s.split(",").filter(Boolean).map(c=>c.includes("ms")?parseFloat(c):parseFloat(c)*1e3).sort((c,d)=>d-c);return u}),l=o+a;if(l!==0){n.group(u=>{u.setTimeout(()=>{t(),u.dispose()},l),u.addEventListener(e,"transitionrun",c=>{c.target===c.currentTarget&&u.dispose()})});let s=n.addEventListener(e,"transitionend",u=>{u.target===u.currentTarget&&(t(),s())})}else t();return n.add(()=>t()),n.dispose}function jT(e,t,n,r){let i=n?"enter":"leave",o=Zn(),a=r!==void 0?ET(r):()=>{};i==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let l=Se(i,{enter:()=>t.enter,leave:()=>t.leave}),s=Se(i,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),u=Se(i,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return Qd(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),Yd(e,...t.base,...l,...u),o.nextFrame(()=>{Qd(e,...t.base,...l,...u),Yd(e,...t.base,...l,...s),TT(e,()=>(Qd(e,...t.base,...l),Yd(e,...t.base,...t.entered),a()))}),o.dispose}function PT({immediate:e,container:t,direction:n,classes:r,onStart:i,onStop:o}){let a=gl(),l=wi(),s=Kt(n);et(()=>{e&&(s.current="enter")},[e]),et(()=>{let u=Zn();l.add(u.dispose);let c=t.current;if(c&&s.current!=="idle"&&a.current)return u.dispose(),i.current(s.current),u.add(jT(c,r.current,s.current==="enter",()=>{u.dispose(),o.current(s.current)})),u.dispose},[n])}function mr(e=""){return e.split(" ").filter(t=>t.trim().length>1)}let pc=v.createContext(null);pc.displayName="TransitionContext";var LT=(e=>(e.Visible="visible",e.Hidden="hidden",e))(LT||{});function RT(){let e=v.useContext(pc);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function OT(){let e=v.useContext(mc);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let mc=v.createContext(null);mc.displayName="NestingContext";function gc(e){return"children"in e?gc(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function Lb(e,t){let n=Kt(e),r=v.useRef([]),i=gl(),o=wi(),a=re((p,g=Nr.Hidden)=>{let h=r.current.findIndex(({el:w})=>w===p);h!==-1&&(Se(g,{[Nr.Unmount](){r.current.splice(h,1)},[Nr.Hidden](){r.current[h].state="hidden"}}),o.microTask(()=>{var w;!gc(r)&&i.current&&((w=n.current)==null||w.call(n))}))}),l=re(p=>{let g=r.current.find(({el:h})=>h===p);return g?g.state!=="visible"&&(g.state="visible"):r.current.push({el:p,state:"visible"}),()=>a(p,Nr.Unmount)}),s=v.useRef([]),u=v.useRef(Promise.resolve()),c=v.useRef({enter:[],leave:[],idle:[]}),d=re((p,g,h)=>{s.current.splice(0),t&&(t.chains.current[g]=t.chains.current[g].filter(([w])=>w!==p)),t==null||t.chains.current[g].push([p,new Promise(w=>{s.current.push(w)})]),t==null||t.chains.current[g].push([p,new Promise(w=>{Promise.all(c.current[g].map(([I,y])=>y)).then(()=>w())})]),g==="enter"?u.current=u.current.then(()=>t==null?void 0:t.wait.current).then(()=>h(g)):h(g)}),f=re((p,g,h)=>{Promise.all(c.current[g].splice(0).map(([w,I])=>I)).then(()=>{var w;(w=s.current.shift())==null||w()}).then(()=>h(g))});return v.useMemo(()=>({children:r,register:l,unregister:a,onStart:d,onStop:f,wait:u,chains:c}),[l,a,r,d,f,c,u])}function kT(){}let zT=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function kv(e){var t;let n={};for(let r of zT)n[r]=(t=e[r])!=null?t:kT;return n}function BT(e){let t=v.useRef(kv(e));return v.useEffect(()=>{t.current=kv(e)},[e]),t}let UT="div",Rb=Yn.RenderStrategy;function $T(e,t){var n,r;let{beforeEnter:i,afterEnter:o,beforeLeave:a,afterLeave:l,enter:s,enterFrom:u,enterTo:c,entered:d,leave:f,leaveFrom:p,leaveTo:g,...h}=e,w=v.useRef(null),I=Ve(w,t),y=(n=h.unmount)==null||n?Nr.Unmount:Nr.Hidden,{show:b,appear:x,initial:N}=RT(),[M,S]=v.useState(b?"visible":"hidden"),C=OT(),{register:L,unregister:R}=C;v.useEffect(()=>L(w),[L,w]),v.useEffect(()=>{if(y===Nr.Hidden&&w.current){if(b&&M!=="visible"){S("visible");return}return Se(M,{hidden:()=>R(w),visible:()=>L(w)})}},[M,w,L,R,b,y]);let O=Kt({base:mr(h.className),enter:mr(s),enterFrom:mr(u),enterTo:mr(c),entered:mr(d),leave:mr(f),leaveFrom:mr(p),leaveTo:mr(g)}),J=BT({beforeEnter:i,afterEnter:o,beforeLeave:a,afterLeave:l}),U=To();v.useEffect(()=>{if(U&&M==="visible"&&w.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[w,M,U]);let G=N&&!x,Z=x&&b&&N,$=(()=>!U||G?"idle":b?"enter":"leave")(),ee=CT(0),P=re(E=>Se(E,{enter:()=>{ee.addFlag($e.Opening),J.current.beforeEnter()},leave:()=>{ee.addFlag($e.Closing),J.current.beforeLeave()},idle:()=>{}})),B=re(E=>Se(E,{enter:()=>{ee.removeFlag($e.Opening),J.current.afterEnter()},leave:()=>{ee.removeFlag($e.Closing),J.current.afterLeave()},idle:()=>{}})),F=Lb(()=>{S("hidden"),R(w)},C);PT({immediate:Z,container:w,classes:O,direction:$,onStart:Kt(E=>{F.onStart(w,E,P)}),onStop:Kt(E=>{F.onStop(w,E,B),E==="leave"&&!gc(F)&&(S("hidden"),R(w))})});let V=h,D={ref:I};return Z?V={...V,className:gu(h.className,...O.current.enter,...O.current.enterFrom)}:(V.className=gu(h.className,(r=w.current)==null?void 0:r.className),V.className===""&&delete V.className),k.createElement(mc.Provider,{value:F},k.createElement(Jm,{value:Se(M,{visible:$e.Open,hidden:$e.Closed})|ee.flags},Ze({ourProps:D,theirProps:V,defaultTag:UT,features:Rb,visible:M==="visible",name:"Transition.Child"})))}function _T(e,t){let{show:n,appear:r=!1,unmount:i=!0,...o}=e,a=v.useRef(null),l=Ve(a,t);To();let s=jo();if(n===void 0&&s!==null&&(n=(s&$e.Open)===$e.Open),![!0,!1].includes(n))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[u,c]=v.useState(n?"visible":"hidden"),d=Lb(()=>{c("hidden")}),[f,p]=v.useState(!0),g=v.useRef([n]);et(()=>{f!==!1&&g.current[g.current.length-1]!==n&&(g.current.push(n),p(!1))},[g,n]);let h=v.useMemo(()=>({show:n,appear:r,initial:f}),[n,r,f]);v.useEffect(()=>{if(n)c("visible");else if(!gc(d))c("hidden");else{let b=a.current;if(!b)return;let x=b.getBoundingClientRect();x.x===0&&x.y===0&&x.width===0&&x.height===0&&c("hidden")}},[n,d]);let w={unmount:i},I=re(()=>{var b;f&&p(!1),(b=e.beforeEnter)==null||b.call(e)}),y=re(()=>{var b;f&&p(!1),(b=e.beforeLeave)==null||b.call(e)});return k.createElement(mc.Provider,{value:d},k.createElement(pc.Provider,{value:h},Ze({ourProps:{...w,as:v.Fragment,children:k.createElement(Ob,{ref:l,...w,...o,beforeEnter:I,beforeLeave:y})},theirProps:{},defaultTag:v.Fragment,features:Rb,visible:u==="visible",name:"Transition"})))}function FT(e,t){let n=v.useContext(pc)!==null,r=jo()!==null;return k.createElement(k.Fragment,null,!n&&r?k.createElement(Dp,{ref:t,...e}):k.createElement(Ob,{ref:t,...e}))}let Dp=He(_T),Ob=He($T),HT=He(FT),Wn=Object.assign(Dp,{Child:HT,Root:Dp});const kb=({children:e,onClose:t,isOpen:n,maxWidth:r="max-w-lg",background:i="bg-white"})=>m.jsx(Wn.Root,{show:n,appear:!0,as:"div",children:m.jsx(vu,{as:"div",className:"fixed z-30 inset-0 overflow-y-auto",onClose:()=>{t(!1)},children:m.jsxs("div",{className:"flex items-end justify-center min-h-screen max-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0",children:[m.jsx(Wn.Child,{as:"div",enter:"ease-out duration-400",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-300",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:m.jsx(vu.Overlay,{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"})}),m.jsx("span",{className:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true",children:"​"}),m.jsx(Wn.Child,{as:v.Fragment,enter:"ease-out duration-400",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-300",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",children:m.jsxs("div",{className:`inline-block align-bottom ${i} rounded-lg px-4 pt-5 pb-4 text-left shadow-xl transform transition-all sm:my-8 sm:align-middle ${r} sm:w-full sm:p-6 max-h-screen`,children:[m.jsx("div",{className:"hidden sm:block absolute top-0 right-0 pt-4 pr-4",children:m.jsxs("button",{type:"button",className:`${i} rounded-md text-gray-400 hover:text-gray-500`,onClick:()=>t(!1),children:[m.jsx("span",{className:"sr-only",children:"Close"}),m.jsx(db,{className:"h-6 w-6","aria-hidden":"true"})]})}),e]})})]})})}),bi={CAUTION:{backgroundColor:"bg-yellow-500",defaultTitle:"Remove?",disabledColor:"disabled:bg-yellow-300",focusColor:"focus:ring-yellow-500",hoverColor:"hover:bg-yellow-600",icon:m.jsx("div",{className:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-yellow-100 sm:mx-0 sm:h-10 sm:w-10",children:m.jsx(_C,{className:"h-6 w-6 text-yellow-600","aria-hidden":"true"})})},COMING_SOON:{backgroundColor:"bg-pink-500",defaultTitle:"Coming soon",disabledColor:"disabled:bg-pink-300",focusColor:"focus:ring-pink-500",hoverColor:"hover:bg-pink-600",icon:m.jsx("div",{className:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-gray-100 sm:mx-0 sm:h-10 sm:w-10",children:m.jsx(kC,{className:"h-6 w-6 text-gray-600","aria-hidden":"true"})})},DELETE:{backgroundColor:"bg-red-500",defaultTitle:"Delete?",disabledColor:"disabled:bg-red-300",focusColor:"focus:ring-red-500",hoverColor:"hover:bg-red-600",icon:m.jsx("div",{className:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 sm:mx-0 sm:h-10 sm:w-10",children:m.jsx(cb,{className:"h-6 w-6 text-red-600","aria-hidden":"true"})})},ERROR:{backgroundColor:"bg-red-500",defaultTitle:"Ups, we found an error",disabledColor:"disabled:bg-red-300",focusColor:"focus:ring-red-500",hoverColor:"hover:bg-red-600",icon:m.jsx("div",{className:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 sm:mx-0 sm:h-10 sm:w-10",children:m.jsx(i1,{className:"h-6 w-6 text-red-600","aria-hidden":"true"})})},REMOVE:{backgroundColor:"bg-yellow-500",defaultTitle:"Remove?",disabledColor:"disabled:bg-yellow-300",focusColor:"focus:ring-yellow-500",hoverColor:"hover:bg-yellow-600",icon:m.jsx("div",{className:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-yellow-100 sm:mx-0 sm:h-10 sm:w-10",children:m.jsx(WC,{className:"h-6 w-6 text-yellow-600","aria-hidden":"true"})})}},WT=({alertType:e,bodyElement:t,isOpen:n,onPrimaryButtonClick:r,onSecondaryButtonClick:i,primaryButtonContent:o,primaryButtonDisabled:a=!1,secondaryButtonDisabled:l=!1,secondaryButtonContent:s,primaryButtonTestID:u="alert-modal-primary-button",secondaryButtonTestID:c="alert-modal-secondary-button",setIsOpen:d,title:f})=>{const{backgroundColor:p,focusColor:g,hoverColor:h,defaultTitle:w,icon:I,disabledColor:y}=bi[e];return m.jsx(m.Fragment,{children:m.jsxs(kb,{isOpen:n,onClose:d,children:[m.jsxs("div",{className:"sm:flex sm:items-start",children:[I,m.jsxs("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left",children:[m.jsx(vu.Title,{as:"h3",className:"text-lg leading-6 font-medium text-gray-900",children:f??w}),m.jsx("div",{className:"mt-2",children:t})]})]}),m.jsxs("div",{className:"mt-5 sm:mt-4 sm:flex sm:flex-row-reverse",children:[m.jsx("button",{disabled:a,type:"button",className:`w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 ${p} text-base font-medium text-white ${h} focus:outline-none focus:ring-2 focus:ring-offset-2 ${g} sm:ml-3 sm:w-auto sm:text-sm ${y}`,onClick:r,"data-test":u,children:o}),m.jsx("button",{disabled:l,type:"button",className:"disabled:bg-gray-200 mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:w-auto sm:text-sm",onClick:i,"data-test":c,children:s})]})]})})},Ap=({alertType:e,bodyText:t,hideModal:n,onPrimaryButtonClick:r,onSecondaryButtonClick:i,primaryButtonText:o,secondaryButtonText:a,primaryButtonTestID:l="text-alert-modal-primary-button",secondaryButtonTestID:s="text-alert-modal-secondary-button",title:u})=>{const c=m.jsx("div",{className:"whitespace-pre-line",children:t});return m.jsx(WT,{alertType:e,bodyElement:c,isOpen:!0,onPrimaryButtonClick:r,onSecondaryButtonClick:i,primaryButtonContent:o,secondaryButtonContent:a,primaryButtonTestID:l,secondaryButtonTestID:s,setIsOpen:n,title:u})};var zb={exports:{}};/*!
48
+ `));let d=u.props,f=typeof(d==null?void 0:d.className)=="function"?(...g)=>gu(d==null?void 0:d.className(...g),l.className):gu(d==null?void 0:d.className,l.className),p=f?{className:f}:{};return v.cloneElement(u,Object.assign({},yM(u.props,Mp(Gd(l,["ref"]))),c,s,I1(u.ref,s.ref),p))}return v.createElement(i,Object.assign({},Gd(l,["ref"]),i!==v.Fragment&&s,i!==v.Fragment&&c),u)}function I1(...e){return{ref:e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}}function yM(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let i in r)i.startsWith("on")&&typeof r[i]=="function"?(n[i]!=null||(n[i]=[]),n[i].push(r[i])):t[i]=r[i];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(let r in n)Object.assign(t,{[r](i,...o){let a=n[r];for(let l of a){if((i instanceof Event||(i==null?void 0:i.nativeEvent)instanceof Event)&&i.defaultPrevented)return;l(i,...o)}}});return t}function He(e){var t;return Object.assign(v.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Mp(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function Gd(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function cc(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=(t==null?void 0:t.getAttribute("disabled"))==="";return r&&w1(n)?!1:r}function w1(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}function IM(e={},t=null,n=[]){for(let[r,i]of Object.entries(e))MM(n,wM(t,r),i);return n}function wM(e,t){return e?e+"["+t+"]":t}function MM(e,t,n){if(Array.isArray(n))for(let[r,i]of n.entries())MM(e,wM(t,r.toString()),i);else n instanceof Date?e.push([t,n.toISOString()]):typeof n=="boolean"?e.push([t,n?"1":"0"]):typeof n=="string"?e.push([t,n]):typeof n=="number"?e.push([t,`${n}`]):n==null?e.push([t,""]):IM(n,t,e)}let M1="div";var cr=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(cr||{});function x1(e,t){let{features:n=1,...r}=e,i={ref:t,"aria-hidden":(n&2)===2?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return Ze({ourProps:i,theirProps:r,slot:{},defaultTag:M1,name:"Hidden"})}let _r=He(x1),Qm=v.createContext(null);Qm.displayName="OpenClosedContext";var $e=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))($e||{});function jo(){return v.useContext(Qm)}function Jm({value:e,children:t}){return k.createElement(Qm.Provider,{value:e},t)}var Te=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(Te||{});function b1(e,t,n){let[r,i]=v.useState(n),o=e!==void 0,a=v.useRef(o),l=v.useRef(!1),s=v.useRef(!1);return o&&!a.current&&!l.current?(l.current=!0,a.current=o,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!o&&a.current&&!s.current&&(s.current=!0,a.current=o,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[o?e:r,re(u=>(o||i(u),t==null?void 0:t(u)))]}function Xm(e,t){let n=v.useRef([]),r=re(e);v.useEffect(()=>{let i=[...n.current];for(let[o,a]of t.entries())if(n.current[o]!==a){let l=r(t,i);return n.current=t,l}},[r,...t])}function Lv(e){return[e.screenX,e.screenY]}function N1(){let e=v.useRef([-1,-1]);return{wasMoved(t){let n=Lv(t);return e.current[0]===n[0]&&e.current[1]===n[1]?!1:(e.current=n,!0)},update(t){e.current=Lv(t)}}}function S1(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function Vr(...e){return v.useMemo(()=>lc(...e),[...e])}var Jt=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Jt||{});function qm(){let e=v.useRef(0);return mM("keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function gl(){let e=v.useRef(!1);return et(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Km(e,t,n,r){let i=Kt(n);v.useEffect(()=>{e=e??window;function o(a){i.current(a)}return e.addEventListener(t,o,r),()=>e.removeEventListener(t,o,r)},[e,t,r])}function D1(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}function xM(e){let t=re(e),n=v.useRef(!1);v.useEffect(()=>(n.current=!1,()=>{n.current=!0,ac(()=>{n.current&&t()})}),[t])}function bM(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let n of e.current)n.current instanceof HTMLElement&&t.add(n.current);return t}let A1="div";var NM=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(NM||{});function C1(e,t){let n=v.useRef(null),r=Ve(n,t),{initialFocus:i,containers:o,features:a=30,...l}=e;To()||(a=1);let s=Vr(n);j1({ownerDocument:s},!!(a&16));let u=L1({ownerDocument:s,container:n,initialFocus:i},!!(a&2));P1({ownerDocument:s,container:n,containers:o,previousActiveElement:u},!!(a&8));let c=qm(),d=re(h=>{let w=n.current;w&&(I=>I())(()=>{Ne(c.current,{[Jt.Forwards]:()=>{Cn(w,Lt.First,{skipElements:[h.relatedTarget]})},[Jt.Backwards]:()=>{Cn(w,Lt.Last,{skipElements:[h.relatedTarget]})}})})}),f=wi(),p=v.useRef(!1),g={ref:r,onKeyDown(h){h.key=="Tab"&&(p.current=!0,f.requestAnimationFrame(()=>{p.current=!1}))},onBlur(h){let w=bM(o);n.current instanceof HTMLElement&&w.add(n.current);let I=h.relatedTarget;I instanceof HTMLElement&&I.dataset.headlessuiFocusGuard!=="true"&&(SM(w,I)||(p.current?Cn(n.current,Ne(c.current,{[Jt.Forwards]:()=>Lt.Next,[Jt.Backwards]:()=>Lt.Previous})|Lt.WrapAround,{relativeTo:h.target}):h.target instanceof HTMLElement&&mi(h.target)))}};return k.createElement(k.Fragment,null,!!(a&4)&&k.createElement(_r,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:d,features:cr.Focusable}),Ze({ourProps:g,theirProps:l,defaultTag:A1,name:"FocusTrap"}),!!(a&4)&&k.createElement(_r,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:d,features:cr.Focusable}))}let E1=He(C1),Yo=Object.assign(E1,{features:NM}),wr=[];D1(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&wr[0]!==t.target&&(wr.unshift(t.target),wr=wr.filter(n=>n!=null&&n.isConnected),wr.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function T1(e=!0){let t=v.useRef(wr.slice());return Xm(([n],[r])=>{r===!0&&n===!1&&ac(()=>{t.current.splice(0)}),r===!1&&n===!0&&(t.current=wr.slice())},[e,wr,t]),re(()=>{var n;return(n=t.current.find(r=>r!=null&&r.isConnected))!=null?n:null})}function j1({ownerDocument:e},t){let n=T1(t);Xm(()=>{t||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&mi(n())},[t]),xM(()=>{t&&mi(n())})}function L1({ownerDocument:e,container:t,initialFocus:n},r){let i=v.useRef(null),o=gl();return Xm(()=>{if(!r)return;let a=t.current;a&&ac(()=>{if(!o.current)return;let l=e==null?void 0:e.activeElement;if(n!=null&&n.current){if((n==null?void 0:n.current)===l){i.current=l;return}}else if(a.contains(l)){i.current=l;return}n!=null&&n.current?mi(n.current):Cn(a,Lt.First)===Ya.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),i.current=e==null?void 0:e.activeElement})},[r]),i}function P1({ownerDocument:e,container:t,containers:n,previousActiveElement:r},i){let o=gl();Km(e==null?void 0:e.defaultView,"focus",a=>{if(!i||!o.current)return;let l=bM(n);t.current instanceof HTMLElement&&l.add(t.current);let s=r.current;if(!s)return;let u=a.target;u&&u instanceof HTMLElement?SM(l,u)?(r.current=u,mi(u)):(a.preventDefault(),a.stopPropagation(),mi(s)):mi(r.current)},!0)}function SM(e,t){for(let n of e)if(n.contains(t))return!0;return!1}let DM=v.createContext(!1);function R1(){return v.useContext(DM)}function xp(e){return k.createElement(DM.Provider,{value:e.force},e.children)}function O1(e){let t=R1(),n=v.useContext(AM),r=Vr(e),[i,o]=v.useState(()=>{if(!t&&n!==null||ir.isServer)return null;let a=r==null?void 0:r.getElementById("headlessui-portal-root");if(a)return a;if(r===null)return null;let l=r.createElement("div");return l.setAttribute("id","headlessui-portal-root"),r.body.appendChild(l)});return v.useEffect(()=>{i!==null&&(r!=null&&r.body.contains(i)||r==null||r.body.appendChild(i))},[i,r]),v.useEffect(()=>{t||n!==null&&o(n.current)},[n,o,t]),i}let k1=v.Fragment;function z1(e,t){let n=e,r=v.useRef(null),i=Ve(vM(c=>{r.current=c}),t),o=Vr(r),a=O1(r),[l]=v.useState(()=>{var c;return ir.isServer?null:(c=o==null?void 0:o.createElement("div"))!=null?c:null}),s=v.useContext(bp),u=To();return et(()=>{!a||!l||a.contains(l)||(l.setAttribute("data-headlessui-portal",""),a.appendChild(l))},[a,l]),et(()=>{if(l&&s)return s.register(l)},[s,l]),xM(()=>{var c;!a||!l||(l instanceof Node&&a.contains(l)&&a.removeChild(l),a.childNodes.length<=0&&((c=a.parentElement)==null||c.removeChild(a)))}),u?!a||!l?null:ml.createPortal(Ze({ourProps:{ref:i},theirProps:n,defaultTag:k1,name:"Portal"}),l):null}let B1=v.Fragment,AM=v.createContext(null);function U1(e,t){let{target:n,...r}=e,i={ref:Ve(t)};return k.createElement(AM.Provider,{value:n},Ze({ourProps:i,theirProps:r,defaultTag:B1,name:"Popover.Group"}))}let bp=v.createContext(null);function CM(){let e=v.useContext(bp),t=v.useRef([]),n=re(o=>(t.current.push(o),e&&e.register(o),()=>r(o))),r=re(o=>{let a=t.current.indexOf(o);a!==-1&&t.current.splice(a,1),e&&e.unregister(o)}),i=v.useMemo(()=>({register:n,unregister:r,portals:t}),[n,r,t]);return[t,v.useMemo(()=>function({children:o}){return k.createElement(bp.Provider,{value:i},o)},[i])]}let $1=He(z1),_1=He(U1),Np=Object.assign($1,{Group:_1}),EM=v.createContext(null);function TM(){let e=v.useContext(EM);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,TM),t}return e}function F1(){let[e,t]=v.useState([]);return[e.length>0?e.join(" "):void 0,v.useMemo(()=>function(n){let r=re(o=>(t(a=>[...a,o]),()=>t(a=>{let l=a.slice(),s=l.indexOf(o);return s!==-1&&l.splice(s,1),l}))),i=v.useMemo(()=>({register:r,slot:n.slot,name:n.name,props:n.props}),[r,n.slot,n.name,n.props]);return k.createElement(EM.Provider,{value:i},n.children)},[t])]}let H1="p";function G1(e,t){let n=Dt(),{id:r=`headlessui-description-${n}`,...i}=e,o=TM(),a=Ve(t);et(()=>o.register(r),[r,o.register]);let l={ref:a,...o.props,id:r};return Ze({ourProps:l,theirProps:i,slot:o.slot||{},defaultTag:H1,name:o.name||"Description"})}let W1=He(G1),V1=Object.assign(W1,{}),eg=v.createContext(()=>{});eg.displayName="StackContext";var Sp=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(Sp||{});function Z1(){return v.useContext(eg)}function Y1({children:e,onUpdate:t,type:n,element:r,enabled:i}){let o=Z1(),a=re((...l)=>{t==null||t(...l),o(...l)});return et(()=>{let l=i===void 0||i===!0;return l&&a(0,n,r),()=>{l&&a(1,n,r)}},[a,n,r,i]),k.createElement(eg.Provider,{value:a},e)}function Q1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const J1=typeof Object.is=="function"?Object.is:Q1,{useState:X1,useEffect:q1,useLayoutEffect:K1,useDebugValue:eE}=lo;function tE(e,t,n){const r=t(),[{inst:i},o]=X1({inst:{value:r,getSnapshot:t}});return K1(()=>{i.value=r,i.getSnapshot=t,Wd(i)&&o({inst:i})},[e,r,t]),q1(()=>(Wd(i)&&o({inst:i}),e(()=>{Wd(i)&&o({inst:i})})),[e]),eE(r),r}function Wd(e){const t=e.getSnapshot,n=e.value;try{const r=t();return!J1(n,r)}catch{return!0}}function nE(e,t,n){return t()}const rE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",iE=!rE,oE=iE?nE:tE,aE="useSyncExternalStore"in lo?(e=>e.useSyncExternalStore)(lo):oE;function lE(e){return aE(e.subscribe,e.getSnapshot,e.getSnapshot)}function sE(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(i){return r.add(i),()=>r.delete(i)},dispatch(i,...o){let a=t[i].call(n,...o);a&&(n=a,r.forEach(l=>l()))}}}function uE(){let e;return{before({doc:t}){var n;let r=t.documentElement;e=((n=t.defaultView)!=null?n:window).innerWidth-r.clientWidth},after({doc:t,d:n}){let r=t.documentElement,i=r.clientWidth-r.offsetWidth,o=e-i;n.style(r,"paddingRight",`${o}px`)}}}function cE(){if(!S1())return{};let e;return{before(){e=window.pageYOffset},after({doc:t,d:n,meta:r}){function i(o){return r.containers.flatMap(a=>a()).some(a=>a.contains(o))}n.microTask(()=>{if(window.getComputedStyle(t.documentElement).scrollBehavior!=="auto"){let a=Zn();a.style(t.documentElement,"scroll-behavior","auto"),n.add(()=>n.microTask(()=>a.dispose()))}n.style(t.body,"marginTop",`-${e}px`),window.scrollTo(0,0);let o=null;n.addEventListener(t,"click",a=>{if(a.target instanceof HTMLElement)try{let l=a.target.closest("a");if(!l)return;let{hash:s}=new URL(l.href),u=t.querySelector(s);u&&!i(u)&&(o=u)}catch{}},!0),n.addEventListener(t,"touchmove",a=>{a.target instanceof HTMLElement&&!i(a.target)&&a.preventDefault()},{passive:!1}),n.add(()=>{window.scrollTo(0,window.pageYOffset+e),o&&o.isConnected&&(o.scrollIntoView({block:"nearest"}),o=null)})})}}}function dE(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function fE(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let li=sE(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:Zn(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:fE(n)},i=[cE(),uE(),dE()];i.forEach(({before:o})=>o==null?void 0:o(r)),i.forEach(({after:o})=>o==null?void 0:o(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});li.subscribe(()=>{let e=li.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",i=n.count!==0;(i&&!r||!i&&r)&&li.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&li.dispatch("TEARDOWN",n)}});function pE(e,t,n){let r=lE(li),i=e?r.get(e):void 0,o=i?i.count>0:!1;return et(()=>{if(!(!e||!t))return li.dispatch("PUSH",e,n),()=>li.dispatch("POP",e,n)},[t,e]),o}let Vd=new Map,Qo=new Map;function Pv(e,t=!0){et(()=>{var n;if(!t)return;let r=typeof e=="function"?e():e.current;if(!r)return;function i(){var a;if(!r)return;let l=(a=Qo.get(r))!=null?a:1;if(l===1?Qo.delete(r):Qo.set(r,l-1),l!==1)return;let s=Vd.get(r);s&&(s["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",s["aria-hidden"]),r.inert=s.inert,Vd.delete(r))}let o=(n=Qo.get(r))!=null?n:0;return Qo.set(r,o+1),o!==0||(Vd.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0),i},[e,t])}function jM({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){var r;let i=v.useRef((r=n==null?void 0:n.current)!=null?r:null),o=Vr(i),a=re(()=>{var l;let s=[];for(let u of e)u!==null&&(u instanceof HTMLElement?s.push(u):"current"in u&&u.current instanceof HTMLElement&&s.push(u.current));if(t!=null&&t.current)for(let u of t.current)s.push(u);for(let u of(l=o==null?void 0:o.querySelectorAll("html > *, body > *"))!=null?l:[])u!==document.body&&u!==document.head&&u instanceof HTMLElement&&u.id!=="headlessui-portal-root"&&(u.contains(i.current)||s.some(c=>u.contains(c))||s.push(u));return s});return{resolveContainers:a,contains:re(l=>a().some(s=>s.contains(l))),mainTreeNodeRef:i,MainTreeNode:v.useMemo(()=>function(){return n!=null?null:k.createElement(_r,{features:cr.Hidden,ref:i})},[i,n])}}function mE(){let e=v.useRef(null);return{mainTreeNodeRef:e,MainTreeNode:v.useMemo(()=>function(){return k.createElement(_r,{features:cr.Hidden,ref:e})},[e])}}var gE=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(gE||{}),hE=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(hE||{});let vE={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},hu=v.createContext(null);hu.displayName="DialogContext";function hl(e){let t=v.useContext(hu);if(t===null){let n=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,hl),n}return t}function yE(e,t,n=()=>[document.body]){pE(e,t,r=>{var i;return{containers:[...(i=r.containers)!=null?i:[],n]}})}function IE(e,t){return Ne(t.type,vE,e,t)}let wE="div",ME=Yn.RenderStrategy|Yn.Static;function xE(e,t){var n;let r=Dt(),{id:i=`headlessui-dialog-${r}`,open:o,onClose:a,initialFocus:l,__demoMode:s=!1,...u}=e,[c,d]=v.useState(0),f=jo();o===void 0&&f!==null&&(o=(f&$e.Open)===$e.Open);let p=v.useRef(null),g=Ve(p,t),h=Vr(p),w=e.hasOwnProperty("open")||f!==null,I=e.hasOwnProperty("onClose");if(!w&&!I)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!w)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!I)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof o!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${o}`);if(typeof a!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${a}`);let y=o?0:1,[M,x]=v.useReducer(IE,{titleId:null,descriptionId:null,panelRef:v.createRef()}),S=re(()=>a(!1)),b=re(X=>x({type:0,id:X})),N=To()?s?!1:y===0:!1,C=c>1,P=v.useContext(hu)!==null,[R,O]=CM(),{resolveContainers:J,mainTreeNodeRef:U,MainTreeNode:W}=jM({portals:R,defaultContainers:[(n=M.panelRef.current)!=null?n:p.current]}),Z=C?"parent":"leaf",$=f!==null?(f&$e.Closing)===$e.Closing:!1,ee=(()=>P||$?!1:N)(),L=v.useCallback(()=>{var X,me;return(me=Array.from((X=h==null?void 0:h.querySelectorAll("body > *"))!=null?X:[]).find(Ie=>Ie.id==="headlessui-portal-root"?!1:Ie.contains(U.current)&&Ie instanceof HTMLElement))!=null?me:null},[U]);Pv(L,ee);let B=(()=>C?!0:N)(),F=v.useCallback(()=>{var X,me;return(me=Array.from((X=h==null?void 0:h.querySelectorAll("[data-headlessui-portal]"))!=null?X:[]).find(Ie=>Ie.contains(U.current)&&Ie instanceof HTMLElement))!=null?me:null},[U]);Pv(F,B);let V=(()=>!(!N||C))();Ym(J,S,V);let D=(()=>!(C||y!==0))();Km(h==null?void 0:h.defaultView,"keydown",X=>{D&&(X.defaultPrevented||X.key===Te.Escape&&(X.preventDefault(),X.stopPropagation(),S()))});let E=(()=>!($||y!==0||P))();yE(h,E,J),v.useEffect(()=>{if(y!==0||!p.current)return;let X=new ResizeObserver(me=>{for(let Ie of me){let ve=Ie.target.getBoundingClientRect();ve.x===0&&ve.y===0&&ve.width===0&&ve.height===0&&S()}});return X.observe(p.current),()=>X.disconnect()},[y,p,S]);let[T,z]=F1(),_=v.useMemo(()=>[{dialogState:y,close:S,setTitleId:b},M],[y,M,S,b]),ie=v.useMemo(()=>({open:y===0}),[y]),ue={ref:g,id:i,role:"dialog","aria-modal":y===0?!0:void 0,"aria-labelledby":M.titleId,"aria-describedby":T};return k.createElement(Y1,{type:"Dialog",enabled:y===0,element:p,onUpdate:re((X,me)=>{me==="Dialog"&&Ne(X,{[Sp.Add]:()=>d(Ie=>Ie+1),[Sp.Remove]:()=>d(Ie=>Ie-1)})})},k.createElement(xp,{force:!0},k.createElement(Np,null,k.createElement(hu.Provider,{value:_},k.createElement(Np.Group,{target:p},k.createElement(xp,{force:!1},k.createElement(z,{slot:ie,name:"Dialog.Description"},k.createElement(Yo,{initialFocus:l,containers:J,features:N?Ne(Z,{parent:Yo.features.RestoreFocus,leaf:Yo.features.All&~Yo.features.FocusLock}):Yo.features.None},k.createElement(O,null,Ze({ourProps:ue,theirProps:u,slot:ie,defaultTag:wE,features:ME,visible:y===0,name:"Dialog"}))))))))),k.createElement(W,null))}let bE="div";function NE(e,t){let n=Dt(),{id:r=`headlessui-dialog-overlay-${n}`,...i}=e,[{dialogState:o,close:a}]=hl("Dialog.Overlay"),l=Ve(t),s=re(c=>{if(c.target===c.currentTarget){if(cc(c.currentTarget))return c.preventDefault();c.preventDefault(),c.stopPropagation(),a()}}),u=v.useMemo(()=>({open:o===0}),[o]);return Ze({ourProps:{ref:l,id:r,"aria-hidden":!0,onClick:s},theirProps:i,slot:u,defaultTag:bE,name:"Dialog.Overlay"})}let SE="div";function DE(e,t){let n=Dt(),{id:r=`headlessui-dialog-backdrop-${n}`,...i}=e,[{dialogState:o},a]=hl("Dialog.Backdrop"),l=Ve(t);v.useEffect(()=>{if(a.panelRef.current===null)throw new Error("A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.")},[a.panelRef]);let s=v.useMemo(()=>({open:o===0}),[o]);return k.createElement(xp,{force:!0},k.createElement(Np,null,Ze({ourProps:{ref:l,id:r,"aria-hidden":!0},theirProps:i,slot:s,defaultTag:SE,name:"Dialog.Backdrop"})))}let AE="div";function CE(e,t){let n=Dt(),{id:r=`headlessui-dialog-panel-${n}`,...i}=e,[{dialogState:o},a]=hl("Dialog.Panel"),l=Ve(t,a.panelRef),s=v.useMemo(()=>({open:o===0}),[o]),u=re(c=>{c.stopPropagation()});return Ze({ourProps:{ref:l,id:r,onClick:u},theirProps:i,slot:s,defaultTag:AE,name:"Dialog.Panel"})}let EE="h2";function TE(e,t){let n=Dt(),{id:r=`headlessui-dialog-title-${n}`,...i}=e,[{dialogState:o,setTitleId:a}]=hl("Dialog.Title"),l=Ve(t);v.useEffect(()=>(a(r),()=>a(null)),[r,a]);let s=v.useMemo(()=>({open:o===0}),[o]);return Ze({ourProps:{ref:l,id:r},theirProps:i,slot:s,defaultTag:EE,name:"Dialog.Title"})}let jE=He(xE),LE=He(DE),PE=He(CE),RE=He(NE),OE=He(TE),vu=Object.assign(jE,{Backdrop:LE,Panel:PE,Overlay:RE,Title:OE,Description:V1}),Rv=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Ov(e){var t,n;let r=(t=e.innerText)!=null?t:"",i=e.cloneNode(!0);if(!(i instanceof HTMLElement))return r;let o=!1;for(let l of i.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))l.remove(),o=!0;let a=o?(n=i.innerText)!=null?n:"":r;return Rv.test(a)&&(a=a.replace(Rv,"")),a}function kE(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let r=n.split(" ").map(i=>{let o=document.getElementById(i);if(o){let a=o.getAttribute("aria-label");return typeof a=="string"?a.trim():Ov(o).trim()}return null}).filter(Boolean);if(r.length>0)return r.join(", ")}return Ov(e).trim()}function zE(e){let t=v.useRef(""),n=v.useRef("");return re(()=>{let r=e.current;if(!r)return"";let i=r.innerText;if(t.current===i)return n.current;let o=kE(r).trim().toLowerCase();return t.current=i,n.current=o,o})}var BE=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(BE||{}),UE=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(UE||{}),$E=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))($E||{}),_E=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.GoToOption=2]="GoToOption",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterOption=5]="RegisterOption",e[e.UnregisterOption=6]="UnregisterOption",e[e.RegisterLabel=7]="RegisterLabel",e))(_E||{});function Zd(e,t=n=>n){let n=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,r=pM(t(e.options.slice()),o=>o.dataRef.current.domRef.current),i=n?r.indexOf(n):null;return i===-1&&(i=null),{options:r,activeOptionIndex:i}}let FE={1(e){return e.dataRef.current.disabled||e.listboxState===1?e:{...e,activeOptionIndex:null,listboxState:1}},0(e){if(e.dataRef.current.disabled||e.listboxState===0)return e;let t=e.activeOptionIndex,{isSelected:n}=e.dataRef.current,r=e.options.findIndex(i=>n(i.dataRef.current.value));return r!==-1&&(t=r),{...e,listboxState:0,activeOptionIndex:t}},2(e,t){var n;if(e.dataRef.current.disabled||e.listboxState===1)return e;let r=Zd(e),i=y1(t,{resolveItems:()=>r.options,resolveActiveIndex:()=>r.activeOptionIndex,resolveId:o=>o.id,resolveDisabled:o=>o.dataRef.current.disabled});return{...e,...r,searchQuery:"",activeOptionIndex:i,activationTrigger:(n=t.trigger)!=null?n:1}},3:(e,t)=>{if(e.dataRef.current.disabled||e.listboxState===1)return e;let n=e.searchQuery!==""?0:1,r=e.searchQuery+t.value.toLowerCase(),i=(e.activeOptionIndex!==null?e.options.slice(e.activeOptionIndex+n).concat(e.options.slice(0,e.activeOptionIndex+n)):e.options).find(a=>{var l;return!a.dataRef.current.disabled&&((l=a.dataRef.current.textValue)==null?void 0:l.startsWith(r))}),o=i?e.options.indexOf(i):-1;return o===-1||o===e.activeOptionIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeOptionIndex:o,activationTrigger:1}},4(e){return e.dataRef.current.disabled||e.listboxState===1||e.searchQuery===""?e:{...e,searchQuery:""}},5:(e,t)=>{let n={id:t.id,dataRef:t.dataRef},r=Zd(e,i=>[...i,n]);return e.activeOptionIndex===null&&e.dataRef.current.isSelected(t.dataRef.current.value)&&(r.activeOptionIndex=r.options.indexOf(n)),{...e,...r}},6:(e,t)=>{let n=Zd(e,r=>{let i=r.findIndex(o=>o.id===t.id);return i!==-1&&r.splice(i,1),r});return{...e,...n,activationTrigger:1}},7:(e,t)=>({...e,labelId:t.id})},tg=v.createContext(null);tg.displayName="ListboxActionsContext";function vl(e){let t=v.useContext(tg);if(t===null){let n=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,vl),n}return t}let ng=v.createContext(null);ng.displayName="ListboxDataContext";function yl(e){let t=v.useContext(ng);if(t===null){let n=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,yl),n}return t}function HE(e,t){return Ne(t.type,FE,e,t)}let GE=v.Fragment;function WE(e,t){let{value:n,defaultValue:r,form:i,name:o,onChange:a,by:l=(T,z)=>T===z,disabled:s=!1,horizontal:u=!1,multiple:c=!1,...d}=e;const f=u?"horizontal":"vertical";let p=Ve(t),[g=c?[]:void 0,h]=b1(n,a,r),[w,I]=v.useReducer(HE,{dataRef:v.createRef(),listboxState:1,options:[],searchQuery:"",labelId:null,activeOptionIndex:null,activationTrigger:1}),y=v.useRef({static:!1,hold:!1}),M=v.useRef(null),x=v.useRef(null),S=v.useRef(null),b=re(typeof l=="string"?(T,z)=>{let _=l;return(T==null?void 0:T[_])===(z==null?void 0:z[_])}:l),N=v.useCallback(T=>Ne(C.mode,{1:()=>g.some(z=>b(z,T)),0:()=>b(g,T)}),[g]),C=v.useMemo(()=>({...w,value:g,disabled:s,mode:c?1:0,orientation:f,compare:b,isSelected:N,optionsPropsRef:y,labelRef:M,buttonRef:x,optionsRef:S}),[g,s,c,w]);et(()=>{w.dataRef.current=C},[C]),Ym([C.buttonRef,C.optionsRef],(T,z)=>{var _;I({type:1}),Zm(z,uc.Loose)||(T.preventDefault(),(_=C.buttonRef.current)==null||_.focus())},C.listboxState===0);let P=v.useMemo(()=>({open:C.listboxState===0,disabled:s,value:g}),[C,s,g]),R=re(T=>{let z=C.options.find(_=>_.id===T);z&&ee(z.dataRef.current.value)}),O=re(()=>{if(C.activeOptionIndex!==null){let{dataRef:T,id:z}=C.options[C.activeOptionIndex];ee(T.current.value),I({type:2,focus:$t.Specific,id:z})}}),J=re(()=>I({type:0})),U=re(()=>I({type:1})),W=re((T,z,_)=>T===$t.Specific?I({type:2,focus:$t.Specific,id:z,trigger:_}):I({type:2,focus:T,trigger:_})),Z=re((T,z)=>(I({type:5,id:T,dataRef:z}),()=>I({type:6,id:T}))),$=re(T=>(I({type:7,id:T}),()=>I({type:7,id:null}))),ee=re(T=>Ne(C.mode,{0(){return h==null?void 0:h(T)},1(){let z=C.value.slice(),_=z.findIndex(ie=>b(ie,T));return _===-1?z.push(T):z.splice(_,1),h==null?void 0:h(z)}})),L=re(T=>I({type:3,value:T})),B=re(()=>I({type:4})),F=v.useMemo(()=>({onChange:ee,registerOption:Z,registerLabel:$,goToOption:W,closeListbox:U,openListbox:J,selectActiveOption:O,selectOption:R,search:L,clearSearch:B}),[]),V={ref:p},D=v.useRef(null),E=wi();return v.useEffect(()=>{D.current&&r!==void 0&&E.addEventListener(D.current,"reset",()=>{h==null||h(r)})},[D,h]),k.createElement(tg.Provider,{value:F},k.createElement(ng.Provider,{value:C},k.createElement(Jm,{value:Ne(C.listboxState,{0:$e.Open,1:$e.Closed})},o!=null&&g!=null&&IM({[o]:g}).map(([T,z],_)=>k.createElement(_r,{features:cr.Hidden,ref:_===0?ie=>{var ue;D.current=(ue=ie==null?void 0:ie.closest("form"))!=null?ue:null}:void 0,...Mp({key:T,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:i,name:T,value:z})})),Ze({ourProps:V,theirProps:d,slot:P,defaultTag:GE,name:"Listbox"}))))}let VE="button";function ZE(e,t){var n;let r=Dt(),{id:i=`headlessui-listbox-button-${r}`,...o}=e,a=yl("Listbox.Button"),l=vl("Listbox.Button"),s=Ve(a.buttonRef,t),u=wi(),c=re(w=>{switch(w.key){case Te.Space:case Te.Enter:case Te.ArrowDown:w.preventDefault(),l.openListbox(),u.nextFrame(()=>{a.value||l.goToOption($t.First)});break;case Te.ArrowUp:w.preventDefault(),l.openListbox(),u.nextFrame(()=>{a.value||l.goToOption($t.Last)});break}}),d=re(w=>{switch(w.key){case Te.Space:w.preventDefault();break}}),f=re(w=>{if(cc(w.currentTarget))return w.preventDefault();a.listboxState===0?(l.closeListbox(),u.nextFrame(()=>{var I;return(I=a.buttonRef.current)==null?void 0:I.focus({preventScroll:!0})})):(w.preventDefault(),l.openListbox())}),p=fM(()=>{if(a.labelId)return[a.labelId,i].join(" ")},[a.labelId,i]),g=v.useMemo(()=>({open:a.listboxState===0,disabled:a.disabled,value:a.value}),[a]),h={ref:s,id:i,type:gM(e,a.buttonRef),"aria-haspopup":"listbox","aria-controls":(n=a.optionsRef.current)==null?void 0:n.id,"aria-expanded":a.listboxState===0,"aria-labelledby":p,disabled:a.disabled,onKeyDown:c,onKeyUp:d,onClick:f};return Ze({ourProps:h,theirProps:o,slot:g,defaultTag:VE,name:"Listbox.Button"})}let YE="label";function QE(e,t){let n=Dt(),{id:r=`headlessui-listbox-label-${n}`,...i}=e,o=yl("Listbox.Label"),a=vl("Listbox.Label"),l=Ve(o.labelRef,t);et(()=>a.registerLabel(r),[r]);let s=re(()=>{var c;return(c=o.buttonRef.current)==null?void 0:c.focus({preventScroll:!0})}),u=v.useMemo(()=>({open:o.listboxState===0,disabled:o.disabled}),[o]);return Ze({ourProps:{ref:l,id:r,onClick:s},theirProps:i,slot:u,defaultTag:YE,name:"Listbox.Label"})}let JE="ul",XE=Yn.RenderStrategy|Yn.Static;function qE(e,t){var n;let r=Dt(),{id:i=`headlessui-listbox-options-${r}`,...o}=e,a=yl("Listbox.Options"),l=vl("Listbox.Options"),s=Ve(a.optionsRef,t),u=wi(),c=wi(),d=jo(),f=(()=>d!==null?(d&$e.Open)===$e.Open:a.listboxState===0)();v.useEffect(()=>{var I;let y=a.optionsRef.current;y&&a.listboxState===0&&y!==((I=lc(y))==null?void 0:I.activeElement)&&y.focus({preventScroll:!0})},[a.listboxState,a.optionsRef]);let p=re(I=>{switch(c.dispose(),I.key){case Te.Space:if(a.searchQuery!=="")return I.preventDefault(),I.stopPropagation(),l.search(I.key);case Te.Enter:if(I.preventDefault(),I.stopPropagation(),a.activeOptionIndex!==null){let{dataRef:y}=a.options[a.activeOptionIndex];l.onChange(y.current.value)}a.mode===0&&(l.closeListbox(),Zn().nextFrame(()=>{var y;return(y=a.buttonRef.current)==null?void 0:y.focus({preventScroll:!0})}));break;case Ne(a.orientation,{vertical:Te.ArrowDown,horizontal:Te.ArrowRight}):return I.preventDefault(),I.stopPropagation(),l.goToOption($t.Next);case Ne(a.orientation,{vertical:Te.ArrowUp,horizontal:Te.ArrowLeft}):return I.preventDefault(),I.stopPropagation(),l.goToOption($t.Previous);case Te.Home:case Te.PageUp:return I.preventDefault(),I.stopPropagation(),l.goToOption($t.First);case Te.End:case Te.PageDown:return I.preventDefault(),I.stopPropagation(),l.goToOption($t.Last);case Te.Escape:return I.preventDefault(),I.stopPropagation(),l.closeListbox(),u.nextFrame(()=>{var y;return(y=a.buttonRef.current)==null?void 0:y.focus({preventScroll:!0})});case Te.Tab:I.preventDefault(),I.stopPropagation();break;default:I.key.length===1&&(l.search(I.key),c.setTimeout(()=>l.clearSearch(),350));break}}),g=fM(()=>{var I,y,M;return(M=(I=a.labelRef.current)==null?void 0:I.id)!=null?M:(y=a.buttonRef.current)==null?void 0:y.id},[a.labelRef.current,a.buttonRef.current]),h=v.useMemo(()=>({open:a.listboxState===0}),[a]),w={"aria-activedescendant":a.activeOptionIndex===null||(n=a.options[a.activeOptionIndex])==null?void 0:n.id,"aria-multiselectable":a.mode===1?!0:void 0,"aria-labelledby":g,"aria-orientation":a.orientation,id:i,onKeyDown:p,role:"listbox",tabIndex:0,ref:s};return Ze({ourProps:w,theirProps:o,slot:h,defaultTag:JE,features:XE,visible:f,name:"Listbox.Options"})}let KE="li";function eT(e,t){let n=Dt(),{id:r=`headlessui-listbox-option-${n}`,disabled:i=!1,value:o,...a}=e,l=yl("Listbox.Option"),s=vl("Listbox.Option"),u=l.activeOptionIndex!==null?l.options[l.activeOptionIndex].id===r:!1,c=l.isSelected(o),d=v.useRef(null),f=zE(d),p=Kt({disabled:i,value:o,domRef:d,get textValue(){return f()}}),g=Ve(t,d);et(()=>{if(l.listboxState!==0||!u||l.activationTrigger===0)return;let b=Zn();return b.requestAnimationFrame(()=>{var N,C;(C=(N=d.current)==null?void 0:N.scrollIntoView)==null||C.call(N,{block:"nearest"})}),b.dispose},[d,u,l.listboxState,l.activationTrigger,l.activeOptionIndex]),et(()=>s.registerOption(r,p),[p,r]);let h=re(b=>{if(i)return b.preventDefault();s.onChange(o),l.mode===0&&(s.closeListbox(),Zn().nextFrame(()=>{var N;return(N=l.buttonRef.current)==null?void 0:N.focus({preventScroll:!0})}))}),w=re(()=>{if(i)return s.goToOption($t.Nothing);s.goToOption($t.Specific,r)}),I=N1(),y=re(b=>I.update(b)),M=re(b=>{I.wasMoved(b)&&(i||u||s.goToOption($t.Specific,r,0))}),x=re(b=>{I.wasMoved(b)&&(i||u&&s.goToOption($t.Nothing))}),S=v.useMemo(()=>({active:u,selected:c,disabled:i}),[u,c,i]);return Ze({ourProps:{id:r,ref:g,role:"option",tabIndex:i===!0?void 0:-1,"aria-disabled":i===!0?!0:void 0,"aria-selected":c,disabled:void 0,onClick:h,onFocus:w,onPointerEnter:y,onMouseEnter:y,onPointerMove:M,onMouseMove:M,onPointerLeave:x,onMouseLeave:x},theirProps:a,slot:S,defaultTag:KE,name:"Listbox.Option"})}let tT=He(WE),nT=He(ZE),rT=He(QE),iT=He(qE),oT=He(eT),_n=Object.assign(tT,{Button:nT,Label:rT,Options:iT,Option:oT});var aT=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(aT||{}),lT=(e=>(e[e.TogglePopover=0]="TogglePopover",e[e.ClosePopover=1]="ClosePopover",e[e.SetButton=2]="SetButton",e[e.SetButtonId=3]="SetButtonId",e[e.SetPanel=4]="SetPanel",e[e.SetPanelId=5]="SetPanelId",e))(lT||{});let sT={0:e=>{let t={...e,popoverState:Ne(e.popoverState,{0:1,1:0})};return t.popoverState===0&&(t.__demoMode=!1),t},1(e){return e.popoverState===1?e:{...e,popoverState:1}},2(e,t){return e.button===t.button?e:{...e,button:t.button}},3(e,t){return e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId}},4(e,t){return e.panel===t.panel?e:{...e,panel:t.panel}},5(e,t){return e.panelId===t.panelId?e:{...e,panelId:t.panelId}}},rg=v.createContext(null);rg.displayName="PopoverContext";function dc(e){let t=v.useContext(rg);if(t===null){let n=new Error(`<${e} /> is missing a parent <Popover /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,dc),n}return t}let ig=v.createContext(null);ig.displayName="PopoverAPIContext";function og(e){let t=v.useContext(ig);if(t===null){let n=new Error(`<${e} /> is missing a parent <Popover /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,og),n}return t}let ag=v.createContext(null);ag.displayName="PopoverGroupContext";function LM(){return v.useContext(ag)}let fc=v.createContext(null);fc.displayName="PopoverPanelContext";function uT(){return v.useContext(fc)}function cT(e,t){return Ne(t.type,sT,e,t)}let dT="div";function fT(e,t){var n;let{__demoMode:r=!1,...i}=e,o=v.useRef(null),a=Ve(t,vM($=>{o.current=$})),l=v.useRef([]),s=v.useReducer(cT,{__demoMode:r,popoverState:r?0:1,buttons:l,button:null,buttonId:null,panel:null,panelId:null,beforePanelSentinel:v.createRef(),afterPanelSentinel:v.createRef()}),[{popoverState:u,button:c,buttonId:d,panel:f,panelId:p,beforePanelSentinel:g,afterPanelSentinel:h},w]=s,I=Vr((n=o.current)!=null?n:c),y=v.useMemo(()=>{if(!c||!f)return!1;for(let D of document.querySelectorAll("body > *"))if(Number(D==null?void 0:D.contains(c))^Number(D==null?void 0:D.contains(f)))return!0;let $=sc(),ee=$.indexOf(c),L=(ee+$.length-1)%$.length,B=(ee+1)%$.length,F=$[L],V=$[B];return!f.contains(F)&&!f.contains(V)},[c,f]),M=Kt(d),x=Kt(p),S=v.useMemo(()=>({buttonId:M,panelId:x,close:()=>w({type:1})}),[M,x,w]),b=LM(),N=b==null?void 0:b.registerPopover,C=re(()=>{var $;return($=b==null?void 0:b.isFocusWithinPopoverGroup())!=null?$:(I==null?void 0:I.activeElement)&&((c==null?void 0:c.contains(I.activeElement))||(f==null?void 0:f.contains(I.activeElement)))});v.useEffect(()=>N==null?void 0:N(S),[N,S]);let[P,R]=CM(),O=jM({mainTreeNodeRef:b==null?void 0:b.mainTreeNodeRef,portals:P,defaultContainers:[c,f]});Km(I==null?void 0:I.defaultView,"focus",$=>{var ee,L,B,F;$.target!==window&&$.target instanceof HTMLElement&&u===0&&(C()||c&&f&&(O.contains($.target)||(L=(ee=g.current)==null?void 0:ee.contains)!=null&&L.call(ee,$.target)||(F=(B=h.current)==null?void 0:B.contains)!=null&&F.call(B,$.target)||w({type:1})))},!0),Ym(O.resolveContainers,($,ee)=>{w({type:1}),Zm(ee,uc.Loose)||($.preventDefault(),c==null||c.focus())},u===0);let J=re($=>{w({type:1});let ee=(()=>$?$ instanceof HTMLElement?$:"current"in $&&$.current instanceof HTMLElement?$.current:c:c)();ee==null||ee.focus()}),U=v.useMemo(()=>({close:J,isPortalled:y}),[J,y]),W=v.useMemo(()=>({open:u===0,close:J}),[u,J]),Z={ref:a};return k.createElement(fc.Provider,{value:null},k.createElement(rg.Provider,{value:s},k.createElement(ig.Provider,{value:U},k.createElement(Jm,{value:Ne(u,{0:$e.Open,1:$e.Closed})},k.createElement(R,null,Ze({ourProps:Z,theirProps:i,slot:W,defaultTag:dT,name:"Popover"}),k.createElement(O.MainTreeNode,null))))))}let pT="button";function mT(e,t){let n=Dt(),{id:r=`headlessui-popover-button-${n}`,...i}=e,[o,a]=dc("Popover.Button"),{isPortalled:l}=og("Popover.Button"),s=v.useRef(null),u=`headlessui-focus-sentinel-${Dt()}`,c=LM(),d=c==null?void 0:c.closeOthers,f=uT()!==null;v.useEffect(()=>{if(!f)return a({type:3,buttonId:r}),()=>{a({type:3,buttonId:null})}},[f,r,a]);let[p]=v.useState(()=>Symbol()),g=Ve(s,t,f?null:O=>{if(O)o.buttons.current.push(p);else{let J=o.buttons.current.indexOf(p);J!==-1&&o.buttons.current.splice(J,1)}o.buttons.current.length>1&&console.warn("You are already using a <Popover.Button /> but only 1 <Popover.Button /> is supported."),O&&a({type:2,button:O})}),h=Ve(s,t),w=Vr(s),I=re(O=>{var J,U,W;if(f){if(o.popoverState===1)return;switch(O.key){case Te.Space:case Te.Enter:O.preventDefault(),(U=(J=O.target).click)==null||U.call(J),a({type:1}),(W=o.button)==null||W.focus();break}}else switch(O.key){case Te.Space:case Te.Enter:O.preventDefault(),O.stopPropagation(),o.popoverState===1&&(d==null||d(o.buttonId)),a({type:0});break;case Te.Escape:if(o.popoverState!==0)return d==null?void 0:d(o.buttonId);if(!s.current||w!=null&&w.activeElement&&!s.current.contains(w.activeElement))return;O.preventDefault(),O.stopPropagation(),a({type:1});break}}),y=re(O=>{f||O.key===Te.Space&&O.preventDefault()}),M=re(O=>{var J,U;cc(O.currentTarget)||e.disabled||(f?(a({type:1}),(J=o.button)==null||J.focus()):(O.preventDefault(),O.stopPropagation(),o.popoverState===1&&(d==null||d(o.buttonId)),a({type:0}),(U=o.button)==null||U.focus()))}),x=re(O=>{O.preventDefault(),O.stopPropagation()}),S=o.popoverState===0,b=v.useMemo(()=>({open:S}),[S]),N=gM(e,s),C=f?{ref:h,type:N,onKeyDown:I,onClick:M}:{ref:g,id:o.buttonId,type:N,"aria-expanded":o.popoverState===0,"aria-controls":o.panel?o.panelId:void 0,onKeyDown:I,onKeyUp:y,onClick:M,onMouseDown:x},P=qm(),R=re(()=>{let O=o.panel;if(!O)return;function J(){Ne(P.current,{[Jt.Forwards]:()=>Cn(O,Lt.First),[Jt.Backwards]:()=>Cn(O,Lt.Last)})===Ya.Error&&Cn(sc().filter(U=>U.dataset.headlessuiFocusGuard!=="true"),Ne(P.current,{[Jt.Forwards]:Lt.Next,[Jt.Backwards]:Lt.Previous}),{relativeTo:o.button})}J()});return k.createElement(k.Fragment,null,Ze({ourProps:C,theirProps:i,slot:b,defaultTag:pT,name:"Popover.Button"}),S&&!f&&l&&k.createElement(_r,{id:u,features:cr.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:R}))}let gT="div",hT=Yn.RenderStrategy|Yn.Static;function vT(e,t){let n=Dt(),{id:r=`headlessui-popover-overlay-${n}`,...i}=e,[{popoverState:o},a]=dc("Popover.Overlay"),l=Ve(t),s=jo(),u=(()=>s!==null?(s&$e.Open)===$e.Open:o===0)(),c=re(f=>{if(cc(f.currentTarget))return f.preventDefault();a({type:1})}),d=v.useMemo(()=>({open:o===0}),[o]);return Ze({ourProps:{ref:l,id:r,"aria-hidden":!0,onClick:c},theirProps:i,slot:d,defaultTag:gT,features:hT,visible:u,name:"Popover.Overlay"})}let yT="div",IT=Yn.RenderStrategy|Yn.Static;function wT(e,t){let n=Dt(),{id:r=`headlessui-popover-panel-${n}`,focus:i=!1,...o}=e,[a,l]=dc("Popover.Panel"),{close:s,isPortalled:u}=og("Popover.Panel"),c=`headlessui-focus-sentinel-before-${Dt()}`,d=`headlessui-focus-sentinel-after-${Dt()}`,f=v.useRef(null),p=Ve(f,t,N=>{l({type:4,panel:N})}),g=Vr(f);et(()=>(l({type:5,panelId:r}),()=>{l({type:5,panelId:null})}),[r,l]);let h=jo(),w=(()=>h!==null?(h&$e.Open)===$e.Open:a.popoverState===0)(),I=re(N=>{var C;switch(N.key){case Te.Escape:if(a.popoverState!==0||!f.current||g!=null&&g.activeElement&&!f.current.contains(g.activeElement))return;N.preventDefault(),N.stopPropagation(),l({type:1}),(C=a.button)==null||C.focus();break}});v.useEffect(()=>{var N;e.static||a.popoverState===1&&((N=e.unmount)==null||N)&&l({type:4,panel:null})},[a.popoverState,e.unmount,e.static,l]),v.useEffect(()=>{if(a.__demoMode||!i||a.popoverState!==0||!f.current)return;let N=g==null?void 0:g.activeElement;f.current.contains(N)||Cn(f.current,Lt.First)},[a.__demoMode,i,f,a.popoverState]);let y=v.useMemo(()=>({open:a.popoverState===0,close:s}),[a,s]),M={ref:p,id:r,onKeyDown:I,onBlur:i&&a.popoverState===0?N=>{var C,P,R,O,J;let U=N.relatedTarget;U&&f.current&&((C=f.current)!=null&&C.contains(U)||(l({type:1}),((R=(P=a.beforePanelSentinel.current)==null?void 0:P.contains)!=null&&R.call(P,U)||(J=(O=a.afterPanelSentinel.current)==null?void 0:O.contains)!=null&&J.call(O,U))&&U.focus({preventScroll:!0})))}:void 0,tabIndex:-1},x=qm(),S=re(()=>{let N=f.current;if(!N)return;function C(){Ne(x.current,{[Jt.Forwards]:()=>{var P;Cn(N,Lt.First)===Ya.Error&&((P=a.afterPanelSentinel.current)==null||P.focus())},[Jt.Backwards]:()=>{var P;(P=a.button)==null||P.focus({preventScroll:!0})}})}C()}),b=re(()=>{let N=f.current;if(!N)return;function C(){Ne(x.current,{[Jt.Forwards]:()=>{var P;if(!a.button)return;let R=sc(),O=R.indexOf(a.button),J=R.slice(0,O+1),U=[...R.slice(O+1),...J];for(let W of U.slice())if(W.dataset.headlessuiFocusGuard==="true"||(P=a.panel)!=null&&P.contains(W)){let Z=U.indexOf(W);Z!==-1&&U.splice(Z,1)}Cn(U,Lt.First,{sorted:!1})},[Jt.Backwards]:()=>{var P;Cn(N,Lt.Previous)===Ya.Error&&((P=a.button)==null||P.focus())}})}C()});return k.createElement(fc.Provider,{value:r},w&&u&&k.createElement(_r,{id:c,ref:a.beforePanelSentinel,features:cr.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:S}),Ze({ourProps:M,theirProps:o,slot:y,defaultTag:yT,features:IT,visible:w,name:"Popover.Panel"}),w&&u&&k.createElement(_r,{id:d,ref:a.afterPanelSentinel,features:cr.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:b}))}let MT="div";function xT(e,t){let n=v.useRef(null),r=Ve(n,t),[i,o]=v.useState([]),a=mE(),l=re(h=>{o(w=>{let I=w.indexOf(h);if(I!==-1){let y=w.slice();return y.splice(I,1),y}return w})}),s=re(h=>(o(w=>[...w,h]),()=>l(h))),u=re(()=>{var h;let w=lc(n);if(!w)return!1;let I=w.activeElement;return(h=n.current)!=null&&h.contains(I)?!0:i.some(y=>{var M,x;return((M=w.getElementById(y.buttonId.current))==null?void 0:M.contains(I))||((x=w.getElementById(y.panelId.current))==null?void 0:x.contains(I))})}),c=re(h=>{for(let w of i)w.buttonId.current!==h&&w.close()}),d=v.useMemo(()=>({registerPopover:s,unregisterPopover:l,isFocusWithinPopoverGroup:u,closeOthers:c,mainTreeNodeRef:a.mainTreeNodeRef}),[s,l,u,c,a.mainTreeNodeRef]),f=v.useMemo(()=>({}),[]),p=e,g={ref:r};return k.createElement(ag.Provider,{value:d},Ze({ourProps:g,theirProps:p,slot:f,defaultTag:MT,name:"Popover.Group"}),k.createElement(a.MainTreeNode,null))}let bT=He(fT),NT=He(mT),ST=He(vT),DT=He(wT),AT=He(xT),ro=Object.assign(bT,{Button:NT,Overlay:ST,Panel:DT,Group:AT});function CT(e=0){let[t,n]=v.useState(e),r=gl(),i=v.useCallback(s=>{r.current&&n(u=>u|s)},[t,r]),o=v.useCallback(s=>!!(t&s),[t]),a=v.useCallback(s=>{r.current&&n(u=>u&~s)},[n,r]),l=v.useCallback(s=>{r.current&&n(u=>u^s)},[n]);return{flags:t,addFlag:i,hasFlag:o,removeFlag:a,toggleFlag:l}}function ET(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function Yd(e,...t){e&&t.length>0&&e.classList.add(...t)}function Qd(e,...t){e&&t.length>0&&e.classList.remove(...t)}function TT(e,t){let n=Zn();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:i}=getComputedStyle(e),[o,a]=[r,i].map(s=>{let[u=0]=s.split(",").filter(Boolean).map(c=>c.includes("ms")?parseFloat(c):parseFloat(c)*1e3).sort((c,d)=>d-c);return u}),l=o+a;if(l!==0){n.group(u=>{u.setTimeout(()=>{t(),u.dispose()},l),u.addEventListener(e,"transitionrun",c=>{c.target===c.currentTarget&&u.dispose()})});let s=n.addEventListener(e,"transitionend",u=>{u.target===u.currentTarget&&(t(),s())})}else t();return n.add(()=>t()),n.dispose}function jT(e,t,n,r){let i=n?"enter":"leave",o=Zn(),a=r!==void 0?ET(r):()=>{};i==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let l=Ne(i,{enter:()=>t.enter,leave:()=>t.leave}),s=Ne(i,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),u=Ne(i,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return Qd(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),Yd(e,...t.base,...l,...u),o.nextFrame(()=>{Qd(e,...t.base,...l,...u),Yd(e,...t.base,...l,...s),TT(e,()=>(Qd(e,...t.base,...l),Yd(e,...t.base,...t.entered),a()))}),o.dispose}function LT({immediate:e,container:t,direction:n,classes:r,onStart:i,onStop:o}){let a=gl(),l=wi(),s=Kt(n);et(()=>{e&&(s.current="enter")},[e]),et(()=>{let u=Zn();l.add(u.dispose);let c=t.current;if(c&&s.current!=="idle"&&a.current)return u.dispose(),i.current(s.current),u.add(jT(c,r.current,s.current==="enter",()=>{u.dispose(),o.current(s.current)})),u.dispose},[n])}function mr(e=""){return e.split(" ").filter(t=>t.trim().length>1)}let pc=v.createContext(null);pc.displayName="TransitionContext";var PT=(e=>(e.Visible="visible",e.Hidden="hidden",e))(PT||{});function RT(){let e=v.useContext(pc);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function OT(){let e=v.useContext(mc);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let mc=v.createContext(null);mc.displayName="NestingContext";function gc(e){return"children"in e?gc(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function PM(e,t){let n=Kt(e),r=v.useRef([]),i=gl(),o=wi(),a=re((p,g=Sr.Hidden)=>{let h=r.current.findIndex(({el:w})=>w===p);h!==-1&&(Ne(g,{[Sr.Unmount](){r.current.splice(h,1)},[Sr.Hidden](){r.current[h].state="hidden"}}),o.microTask(()=>{var w;!gc(r)&&i.current&&((w=n.current)==null||w.call(n))}))}),l=re(p=>{let g=r.current.find(({el:h})=>h===p);return g?g.state!=="visible"&&(g.state="visible"):r.current.push({el:p,state:"visible"}),()=>a(p,Sr.Unmount)}),s=v.useRef([]),u=v.useRef(Promise.resolve()),c=v.useRef({enter:[],leave:[],idle:[]}),d=re((p,g,h)=>{s.current.splice(0),t&&(t.chains.current[g]=t.chains.current[g].filter(([w])=>w!==p)),t==null||t.chains.current[g].push([p,new Promise(w=>{s.current.push(w)})]),t==null||t.chains.current[g].push([p,new Promise(w=>{Promise.all(c.current[g].map(([I,y])=>y)).then(()=>w())})]),g==="enter"?u.current=u.current.then(()=>t==null?void 0:t.wait.current).then(()=>h(g)):h(g)}),f=re((p,g,h)=>{Promise.all(c.current[g].splice(0).map(([w,I])=>I)).then(()=>{var w;(w=s.current.shift())==null||w()}).then(()=>h(g))});return v.useMemo(()=>({children:r,register:l,unregister:a,onStart:d,onStop:f,wait:u,chains:c}),[l,a,r,d,f,c,u])}function kT(){}let zT=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function kv(e){var t;let n={};for(let r of zT)n[r]=(t=e[r])!=null?t:kT;return n}function BT(e){let t=v.useRef(kv(e));return v.useEffect(()=>{t.current=kv(e)},[e]),t}let UT="div",RM=Yn.RenderStrategy;function $T(e,t){var n,r;let{beforeEnter:i,afterEnter:o,beforeLeave:a,afterLeave:l,enter:s,enterFrom:u,enterTo:c,entered:d,leave:f,leaveFrom:p,leaveTo:g,...h}=e,w=v.useRef(null),I=Ve(w,t),y=(n=h.unmount)==null||n?Sr.Unmount:Sr.Hidden,{show:M,appear:x,initial:S}=RT(),[b,N]=v.useState(M?"visible":"hidden"),C=OT(),{register:P,unregister:R}=C;v.useEffect(()=>P(w),[P,w]),v.useEffect(()=>{if(y===Sr.Hidden&&w.current){if(M&&b!=="visible"){N("visible");return}return Ne(b,{hidden:()=>R(w),visible:()=>P(w)})}},[b,w,P,R,M,y]);let O=Kt({base:mr(h.className),enter:mr(s),enterFrom:mr(u),enterTo:mr(c),entered:mr(d),leave:mr(f),leaveFrom:mr(p),leaveTo:mr(g)}),J=BT({beforeEnter:i,afterEnter:o,beforeLeave:a,afterLeave:l}),U=To();v.useEffect(()=>{if(U&&b==="visible"&&w.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[w,b,U]);let W=S&&!x,Z=x&&M&&S,$=(()=>!U||W?"idle":M?"enter":"leave")(),ee=CT(0),L=re(E=>Ne(E,{enter:()=>{ee.addFlag($e.Opening),J.current.beforeEnter()},leave:()=>{ee.addFlag($e.Closing),J.current.beforeLeave()},idle:()=>{}})),B=re(E=>Ne(E,{enter:()=>{ee.removeFlag($e.Opening),J.current.afterEnter()},leave:()=>{ee.removeFlag($e.Closing),J.current.afterLeave()},idle:()=>{}})),F=PM(()=>{N("hidden"),R(w)},C);LT({immediate:Z,container:w,classes:O,direction:$,onStart:Kt(E=>{F.onStart(w,E,L)}),onStop:Kt(E=>{F.onStop(w,E,B),E==="leave"&&!gc(F)&&(N("hidden"),R(w))})});let V=h,D={ref:I};return Z?V={...V,className:gu(h.className,...O.current.enter,...O.current.enterFrom)}:(V.className=gu(h.className,(r=w.current)==null?void 0:r.className),V.className===""&&delete V.className),k.createElement(mc.Provider,{value:F},k.createElement(Jm,{value:Ne(b,{visible:$e.Open,hidden:$e.Closed})|ee.flags},Ze({ourProps:D,theirProps:V,defaultTag:UT,features:RM,visible:b==="visible",name:"Transition.Child"})))}function _T(e,t){let{show:n,appear:r=!1,unmount:i=!0,...o}=e,a=v.useRef(null),l=Ve(a,t);To();let s=jo();if(n===void 0&&s!==null&&(n=(s&$e.Open)===$e.Open),![!0,!1].includes(n))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[u,c]=v.useState(n?"visible":"hidden"),d=PM(()=>{c("hidden")}),[f,p]=v.useState(!0),g=v.useRef([n]);et(()=>{f!==!1&&g.current[g.current.length-1]!==n&&(g.current.push(n),p(!1))},[g,n]);let h=v.useMemo(()=>({show:n,appear:r,initial:f}),[n,r,f]);v.useEffect(()=>{if(n)c("visible");else if(!gc(d))c("hidden");else{let M=a.current;if(!M)return;let x=M.getBoundingClientRect();x.x===0&&x.y===0&&x.width===0&&x.height===0&&c("hidden")}},[n,d]);let w={unmount:i},I=re(()=>{var M;f&&p(!1),(M=e.beforeEnter)==null||M.call(e)}),y=re(()=>{var M;f&&p(!1),(M=e.beforeLeave)==null||M.call(e)});return k.createElement(mc.Provider,{value:d},k.createElement(pc.Provider,{value:h},Ze({ourProps:{...w,as:v.Fragment,children:k.createElement(OM,{ref:l,...w,...o,beforeEnter:I,beforeLeave:y})},theirProps:{},defaultTag:v.Fragment,features:RM,visible:u==="visible",name:"Transition"})))}function FT(e,t){let n=v.useContext(pc)!==null,r=jo()!==null;return k.createElement(k.Fragment,null,!n&&r?k.createElement(Dp,{ref:t,...e}):k.createElement(OM,{ref:t,...e}))}let Dp=He(_T),OM=He($T),HT=He(FT),Gn=Object.assign(Dp,{Child:HT,Root:Dp});const kM=({children:e,onClose:t,isOpen:n,maxWidth:r="max-w-lg",background:i="bg-white"})=>m.jsx(Gn.Root,{show:n,appear:!0,as:"div",children:m.jsx(vu,{as:"div",className:"fixed z-30 inset-0 overflow-y-auto",onClose:()=>{t(!1)},children:m.jsxs("div",{className:"flex items-end justify-center min-h-screen max-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0",children:[m.jsx(Gn.Child,{as:"div",enter:"ease-out duration-400",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-300",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:m.jsx(vu.Overlay,{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"})}),m.jsx("span",{className:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true",children:"​"}),m.jsx(Gn.Child,{as:v.Fragment,enter:"ease-out duration-400",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-300",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",children:m.jsxs("div",{className:`inline-block align-bottom ${i} rounded-lg px-4 pt-5 pb-4 text-left shadow-xl transform transition-all sm:my-8 sm:align-middle ${r} sm:w-full sm:p-6 max-h-screen`,children:[m.jsx("div",{className:"hidden sm:block absolute top-0 right-0 pt-4 pr-4",children:m.jsxs("button",{type:"button",className:`${i} rounded-md text-gray-400 hover:text-gray-500`,onClick:()=>t(!1),children:[m.jsx("span",{className:"sr-only",children:"Close"}),m.jsx(dM,{className:"h-6 w-6","aria-hidden":"true"})]})}),e]})})]})})}),Mi={CAUTION:{backgroundColor:"bg-yellow-500",defaultTitle:"Remove?",disabledColor:"disabled:bg-yellow-300",focusColor:"focus:ring-yellow-500",hoverColor:"hover:bg-yellow-600",icon:m.jsx("div",{className:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-yellow-100 sm:mx-0 sm:h-10 sm:w-10",children:m.jsx(_C,{className:"h-6 w-6 text-yellow-600","aria-hidden":"true"})})},COMING_SOON:{backgroundColor:"bg-pink-500",defaultTitle:"Coming soon",disabledColor:"disabled:bg-pink-300",focusColor:"focus:ring-pink-500",hoverColor:"hover:bg-pink-600",icon:m.jsx("div",{className:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-gray-100 sm:mx-0 sm:h-10 sm:w-10",children:m.jsx(kC,{className:"h-6 w-6 text-gray-600","aria-hidden":"true"})})},DELETE:{backgroundColor:"bg-red-500",defaultTitle:"Delete?",disabledColor:"disabled:bg-red-300",focusColor:"focus:ring-red-500",hoverColor:"hover:bg-red-600",icon:m.jsx("div",{className:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 sm:mx-0 sm:h-10 sm:w-10",children:m.jsx(cM,{className:"h-6 w-6 text-red-600","aria-hidden":"true"})})},ERROR:{backgroundColor:"bg-red-500",defaultTitle:"Ups, we found an error",disabledColor:"disabled:bg-red-300",focusColor:"focus:ring-red-500",hoverColor:"hover:bg-red-600",icon:m.jsx("div",{className:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 sm:mx-0 sm:h-10 sm:w-10",children:m.jsx(i1,{className:"h-6 w-6 text-red-600","aria-hidden":"true"})})},REMOVE:{backgroundColor:"bg-yellow-500",defaultTitle:"Remove?",disabledColor:"disabled:bg-yellow-300",focusColor:"focus:ring-yellow-500",hoverColor:"hover:bg-yellow-600",icon:m.jsx("div",{className:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-yellow-100 sm:mx-0 sm:h-10 sm:w-10",children:m.jsx(GC,{className:"h-6 w-6 text-yellow-600","aria-hidden":"true"})})}},GT=({alertType:e,bodyElement:t,isOpen:n,onPrimaryButtonClick:r,onSecondaryButtonClick:i,primaryButtonContent:o,primaryButtonDisabled:a=!1,secondaryButtonDisabled:l=!1,secondaryButtonContent:s,primaryButtonTestID:u="alert-modal-primary-button",secondaryButtonTestID:c="alert-modal-secondary-button",setIsOpen:d,title:f})=>{const{backgroundColor:p,focusColor:g,hoverColor:h,defaultTitle:w,icon:I,disabledColor:y}=Mi[e];return m.jsx(m.Fragment,{children:m.jsxs(kM,{isOpen:n,onClose:d,children:[m.jsxs("div",{className:"sm:flex sm:items-start",children:[I,m.jsxs("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left",children:[m.jsx(vu.Title,{as:"h3",className:"text-lg leading-6 font-medium text-gray-900",children:f??w}),m.jsx("div",{className:"mt-2",children:t})]})]}),m.jsxs("div",{className:"mt-5 sm:mt-4 sm:flex sm:flex-row-reverse",children:[m.jsx("button",{disabled:a,type:"button",className:`w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 ${p} text-base font-medium text-white ${h} focus:outline-none focus:ring-2 focus:ring-offset-2 ${g} sm:ml-3 sm:w-auto sm:text-sm ${y}`,onClick:r,"data-test":u,children:o}),m.jsx("button",{disabled:l,type:"button",className:"disabled:bg-gray-200 mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:w-auto sm:text-sm",onClick:i,"data-test":c,children:s})]})]})})},Ap=({alertType:e,bodyText:t,hideModal:n,onPrimaryButtonClick:r,onSecondaryButtonClick:i,primaryButtonText:o,secondaryButtonText:a,primaryButtonTestID:l="text-alert-modal-primary-button",secondaryButtonTestID:s="text-alert-modal-secondary-button",title:u})=>{const c=m.jsx("div",{className:"whitespace-pre-line",children:t});return m.jsx(GT,{alertType:e,bodyElement:c,isOpen:!0,onPrimaryButtonClick:r,onSecondaryButtonClick:i,primaryButtonContent:o,secondaryButtonContent:a,primaryButtonTestID:l,secondaryButtonTestID:s,setIsOpen:n,title:u})};var zM={exports:{}};/*!
49
49
  Copyright (c) 2018 Jed Watson.
50
50
  Licensed under the MIT License (MIT), see
51
51
  http://jedwatson.github.io/classnames
52
- */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i<arguments.length;i++){var o=arguments[i];if(o){var a=typeof o;if(a==="string"||a==="number")r.push(o);else if(Array.isArray(o)){if(o.length){var l=n.apply(null,o);l&&r.push(l)}}else if(a==="object"){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){r.push(o.toString());continue}for(var s in o)t.call(o,s)&&o[s]&&r.push(s)}}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(zb);var GT=zb.exports;const ae=sl(GT),Bb=({checked:e,onChange:t,className:n,containerClassName:r,labelClassName:i,labelContainerClassName:o,secondaryLabelClassName:a,id:l,name:s,ariaDescribeBy:u,text:c,secondaryText:d,testId:f})=>{const p=()=>{t(!e)},g=h=>{t(!e)};return m.jsxs("div",{className:ae("relative flex items-start",r),children:[m.jsx("div",{className:"flex flex-row items-center h-5",children:m.jsx("input",{id:l,checked:e,"data-test":f,"aria-describedby":u,name:s,type:"checkbox",className:ae("focus:ring-zuplo-pink-2 h-4 w-4 text-zuplo-pink-2 border-gray-300 rounded cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",n),onChange:h=>{g()}})}),c?m.jsxs("div",{className:ae("ml-1.5 text-sm cursor-pointer",o),onClick:p,children:[m.jsx("label",{htmlFor:s,className:ae("font-medium text-gray-700 cursor-pointer",i),children:c}),m.jsx("p",{className:ae("text-gray-500",a),children:d})]}):null]})};function VT({className:e,activeFilters:t,options:n,filterName:r,isDisabled:i=!1,onFilterChange:o,filterPrefixClassName:a}){const l=d=>t.includes(d)?o(t.filter(p=>p!==d)):o(t.concat(d)),s=(d,f)=>(d.preventDefault(),d.stopPropagation(),o([f])),u=()=>{o([])},c=t.length>0;return m.jsx(ro,{className:"relative",children:()=>m.jsxs(m.Fragment,{children:[m.jsxs(ro.Button,{className:ae(c?" border-zuplo-pink-2 text-zuplo-pink-2":" text-gray-700","group border border-gray-300 shadow-sm py-2 pl-3 pr-2 inline-flex items-center rounded-md bg-white disabled:opacity-50 disabled:cursor-not-allowed text-sm font-medium focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",e),title:i?"You can add tags in the 'tags' array property on your Open API Spec":void 0,disabled:i,children:[m.jsx("span",{className:ae("mr-1",a),children:"Filter: "}),m.jsx("span",{className:"block truncate mr-8",children:`${c?t.length:""} ${r}`}),m.jsx("span",{className:"absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none",children:m.jsx(oc,{className:ae(c?"text-zuplo-pink-2":" text-gray-400","ml-2 h-5 w-5 "),"aria-hidden":"true"})})]}),m.jsx(Wn,{as:v.Fragment,enter:"transition ease-out duration-200",enterFrom:"opacity-0 translate-y-1",enterTo:"opacity-100 translate-y-0",leave:"transition ease-in duration-150",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 translate-y-1",children:m.jsx(ro.Panel,{className:"absolute z-10 mt-3 w-xs transform",children:m.jsx("div",{className:"overflow-hidden min-w-[250px] rounded-lg shadow-lg ring-1 ring-black ring-opacity-5 text-sm",children:m.jsxs("div",{className:"relative grid bg-white",children:[n.map(({label:d,value:f,shouldSupportOnly:p})=>m.jsxs("div",{onClick:()=>l(f),className:"flex w-full px-3 py-3 rounded-md cursor-pointer transition duration-150 ease-in-out hover:bg-gray-50",children:[m.jsx(Bb,{containerClassName:"mr-3",className:"cursor-pointer",checked:t.includes(f),onChange:()=>l(f)}),m.jsx("p",{className:"text-sm flex-grow font-medium text-gray-900",children:d}),p?m.jsx("div",{className:"pl-2 pr-1 h-fit text-zuplo-pink cursor-pointer hover:underline text-sm font-medium",onClick:g=>s(g,f),children:"only"}):null]},d)),m.jsx("div",{className:"flex justify-end",children:m.jsx("div",{onClick:u,className:"pr-4 py-2 text-zuplo-pink cursor-pointer hover:underline",children:"clear"})})]})})})})]})})}function ZT(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"}))}const YT=v.forwardRef(ZT),QT=YT;function JT(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z",clipRule:"evenodd"}))}const XT=v.forwardRef(JT),qT=XT;function KT(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{fillRule:"evenodd",d:"M10 3a1 1 0 01.707.293l3 3a1 1 0 01-1.414 1.414L10 5.414 7.707 7.707a1 1 0 01-1.414-1.414l3-3A1 1 0 0110 3zm-3.707 9.293a1 1 0 011.414 0L10 14.586l2.293-2.293a1 1 0 011.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z",clipRule:"evenodd"}))}const ej=v.forwardRef(KT),tj=ej;function nj(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"}))}const rj=v.forwardRef(nj),ij=rj,hc=({borderPositionAndSize:e,className:t,colorAndColorWeight:n})=>m.jsx("div",{style:{borderTopColor:"transparent"},className:ae({"border-4":!e,[`${e}`]:e,"border-zuplo-pink":!n,[`${n}`]:n},"border-solid rounded-full animate-spin",t)}),Zr=({selected:e,onChange:t,options:n,listLabel:r,className:i,classNameOptions:o,testId:a,placeholder:l,matchWidth:s=!0,selectorElement:u,disabled:c,labelPrefixElement:d=null,isLoadingData:f=!1})=>m.jsxs(_n,{value:e,onChange:t,disabled:c,children:[r&&m.jsx(_n.Label,{className:"block text-sm font-medium text-gray-700",children:r}),m.jsxs("div",{className:ae({relative:s},i),children:[m.jsxs(_n.Button,{"data-test":a,className:ae("relative w-full border border-gray-300 rounded-md shadow-sm pl-3 pr-10 py-2 text-left focus:outline-none focus:ring-1 focus:ring-indigo-500 focus:border-indigo-500 text-sm",c?"bg-gray-200":"bg-white",i),children:[e!==null&&e.icon&&m.jsx("span",{className:"absolute pr-10",children:f?m.jsx(hc,{className:"w-4 h-4 mr-2",borderPositionAndSize:"border-l-2"}):m.jsx(m.Fragment,{children:e.icon})}),m.jsxs("span",{className:ae("block truncate",{"ml-7 mt-0.5":e!==null&&e.icon}),children:[d,(e==null?void 0:e.label)||l]}),m.jsx("span",{className:"absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none",children:u??m.jsx(tj,{className:"h-5 w-5 text-gray-400","aria-hidden":"true"})})]}),m.jsx(Wn,{as:v.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:m.jsx(_n.Options,{className:ae("absolute z-20 mt-1 bg-white shadow-lg rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none sm:text-sm",o),children:n.map((p,g)=>m.jsx(_n.Option,{"data-test":`${a}-${g}`,className:({active:h})=>ae(h?"bg-gray-50":"",p.disabled?"cursor-not-allowed":"cursor-pointer","text-gray-900 select-none relative py-2 px-3"),value:p,disabled:p.disabled??!1,children:m.jsx(m.Fragment,{children:p.description?m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"font-semibold block text-sm leading-7",children:p.label}),m.jsx("span",{className:"text-xs",children:p.description})]}):m.jsxs("div",{className:"flex flex-row font-normal",children:[p.icon&&m.jsx("div",{children:p.icon})," ",m.jsx("div",{className:ae(p.icon?"mt-0.5":""),children:p.label}),p.icon&&e&&e.value.toString()===p.value.toString()&&m.jsx("div",{className:"absolute right-0",children:m.jsx(sb,{className:"mr-3 h-5 w-5"})})]})})},`${g}-${p.value}`))})})]})]});var xi=(e=>(e.PRIMARY="primary",e.WHITE="white",e.GRAY="gray",e))(xi||{});const En=({label:e,isDisabled:t=!1,onClick:n,classNames:r,dataTestId:i,buttonType:o="primary",iconAlignment:a="right",icon:l=null,type:s="button"})=>o==="white"?m.jsxs("button",{type:s,className:ae("flex items-center align-middle py-2 px-3 space-x-2 bg-white relative border border-gray-300 rounded-md shadow-sm text-left focus:outline-none focus:ring-1 focus:ring-pink-300 focus:border-pink-300 sm:text-sm enabled:cursor-pointer",t?"opacity-50 bg-slate-100 disabled disabled:cursor-not-allowed":"bg-white hover:bg-slate-100",r),"data-test":i,onClick:n,disabled:t,children:[a==="left"&&l,e?m.jsx("span",{children:e}):null,a==="right"&&l]}):o==="primary"?m.jsxs("button",{type:s,className:ae("inline-flex align-middle items-center text-sm px-4 space-x-2 py-2 border border-transparent font-medium rounded-md shadow-sm text-white focus:outline-none focus:ring-offset-2 focus:ring-indigo-500",t?"bg-pink-300 disabled cursor-not-allowed":"bg-zuplo-pink hover:bg-zuplo-pink-hover",{"justify-center":!l},r),"data-test":i,onClick:n,disabled:t,children:[a==="left"&&l,e?m.jsx("span",{children:e}):null,a==="right"&&l]}):o==="gray"?m.jsxs("button",{type:s,className:ae("inline-flex align-middle items-center text-sm px-4 space-x-2 py-2 border border-gray-400 border-1 font-medium rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",t?"bg-gray-100 disabled cursor-not-allowed":"bg-gray-200 hover:bg-gray-300",r),"data-test":i,onClick:n,disabled:t,children:[a==="left"&&l,e?m.jsx("span",{children:e}):null,a==="right"&&l]}):null,oj=({addRoute:e})=>{const t=()=>{var n;(n=window.open("https://www.zuplo.com/docs/overview","_blank"))==null||n.focus()};return m.jsxs("div",{className:"flex flex-col space-y-6 mt-10 text-gray-600 mx-auto px-10 flex-wrap",children:[m.jsx("div",{className:"font-extrabold text-2xl text-gray-600",children:"You don't have any operations"}),m.jsx("div",{className:"whitespace-pre-wrap",children:"Your Open API file is the heart of your gateway - it tells us how to handle incoming requests. To get started, add your first route, or import your Open API file."}),m.jsxs("div",{children:[m.jsx("span",{children:"Why not try to our "}),m.jsx("button",{type:"button",className:"underline text-zuplo-pink hover:text-zuplo-pink-hover cursor-pointer",onClick:t,children:"Getting started guide?"})]}),m.jsx("div",{className:"flex w-full justify-center gap-x-4",children:m.jsx(En,{type:"button",dataTestId:"add-route-btn",onClick:e,label:"Add Route",isDisabled:!1})})]})};var Ub=(e=>(e.get="bg-blue-400",e.head="bg-pink-400",e.post="bg-green-400",e.put="bg-yellow-400",e.delete="bg-red-400",e.connect="bg-orange-400",e.options="bg-teal-400",e.trace="bg-fuchsia-400",e.patch="bg-orange-400",e))(Ub||{});const aj=({method:e})=>{if(e.includes(","))return m.jsx("div",{className:`
52
+ */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i<arguments.length;i++){var o=arguments[i];if(o){var a=typeof o;if(a==="string"||a==="number")r.push(o);else if(Array.isArray(o)){if(o.length){var l=n.apply(null,o);l&&r.push(l)}}else if(a==="object"){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){r.push(o.toString());continue}for(var s in o)t.call(o,s)&&o[s]&&r.push(s)}}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(zM);var WT=zM.exports;const ae=sl(WT),BM=({checked:e,onChange:t,className:n,containerClassName:r,labelClassName:i,labelContainerClassName:o,secondaryLabelClassName:a,id:l,name:s,ariaDescribeBy:u,text:c,secondaryText:d,testId:f})=>{const p=()=>{t(!e)},g=h=>{t(!e)};return m.jsxs("div",{className:ae("relative flex items-start",r),children:[m.jsx("div",{className:"flex flex-row items-center h-5",children:m.jsx("input",{id:l,checked:e,"data-test":f,"aria-describedby":u,name:s,type:"checkbox",className:ae("focus:ring-zuplo-pink-2 h-4 w-4 text-zuplo-pink-2 border-gray-300 rounded cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",n),onChange:h=>{g()}})}),c?m.jsxs("div",{className:ae("ml-1.5 text-sm cursor-pointer",o),onClick:p,children:[m.jsx("label",{htmlFor:s,className:ae("font-medium text-gray-700 cursor-pointer",i),children:c}),m.jsx("p",{className:ae("text-gray-500",a),children:d})]}):null]})};function VT({className:e,activeFilters:t,options:n,filterName:r,isDisabled:i=!1,onFilterChange:o,filterPrefixClassName:a}){const l=d=>t.includes(d)?o(t.filter(p=>p!==d)):o(t.concat(d)),s=(d,f)=>(d.preventDefault(),d.stopPropagation(),o([f])),u=()=>{o([])},c=t.length>0;return m.jsx(ro,{className:"relative",children:()=>m.jsxs(m.Fragment,{children:[m.jsxs(ro.Button,{className:ae(c?" border-zuplo-pink-2 text-zuplo-pink-2":" text-gray-700","group border border-gray-300 shadow-sm py-2 pl-3 pr-2 inline-flex items-center rounded-md bg-white disabled:opacity-50 disabled:cursor-not-allowed text-sm font-medium focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",e),title:i?"You can add tags in the 'tags' array property on your Open API Spec":void 0,disabled:i,children:[m.jsx("span",{className:ae("mr-1",a),children:"Filter: "}),m.jsx("span",{className:"block truncate mr-8",children:`${c?t.length:""} ${r}`}),m.jsx("span",{className:"absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none",children:m.jsx(oc,{className:ae(c?"text-zuplo-pink-2":" text-gray-400","ml-2 h-5 w-5 "),"aria-hidden":"true"})})]}),m.jsx(Gn,{as:v.Fragment,enter:"transition ease-out duration-200",enterFrom:"opacity-0 translate-y-1",enterTo:"opacity-100 translate-y-0",leave:"transition ease-in duration-150",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 translate-y-1",children:m.jsx(ro.Panel,{className:"absolute z-10 mt-3 w-xs transform",children:m.jsx("div",{className:"overflow-hidden min-w-[250px] rounded-lg shadow-lg ring-1 ring-black ring-opacity-5 text-sm",children:m.jsxs("div",{className:"relative grid bg-white",children:[n.map(({label:d,value:f,shouldSupportOnly:p})=>m.jsxs("div",{onClick:()=>l(f),className:"flex w-full px-3 py-3 rounded-md cursor-pointer transition duration-150 ease-in-out hover:bg-gray-50",children:[m.jsx(BM,{containerClassName:"mr-3",className:"cursor-pointer",checked:t.includes(f),onChange:()=>l(f)}),m.jsx("p",{className:"text-sm flex-grow font-medium text-gray-900",children:d}),p?m.jsx("div",{className:"pl-2 pr-1 h-fit text-zuplo-pink cursor-pointer hover:underline text-sm font-medium",onClick:g=>s(g,f),children:"only"}):null]},d)),m.jsx("div",{className:"flex justify-end",children:m.jsx("div",{onClick:u,className:"pr-4 py-2 text-zuplo-pink cursor-pointer hover:underline",children:"clear"})})]})})})})]})})}function ZT(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"}))}const YT=v.forwardRef(ZT),QT=YT;function JT(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z",clipRule:"evenodd"}))}const XT=v.forwardRef(JT),qT=XT;function KT(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{fillRule:"evenodd",d:"M10 3a1 1 0 01.707.293l3 3a1 1 0 01-1.414 1.414L10 5.414 7.707 7.707a1 1 0 01-1.414-1.414l3-3A1 1 0 0110 3zm-3.707 9.293a1 1 0 011.414 0L10 14.586l2.293-2.293a1 1 0 011.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z",clipRule:"evenodd"}))}const ej=v.forwardRef(KT),tj=ej;function nj(e,t){return v.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),v.createElement("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"}))}const rj=v.forwardRef(nj),ij=rj,hc=({borderPositionAndSize:e,className:t,colorAndColorWeight:n})=>m.jsx("div",{style:{borderTopColor:"transparent"},className:ae({"border-4":!e,[`${e}`]:e,"border-zuplo-pink":!n,[`${n}`]:n},"border-solid rounded-full animate-spin",t)}),Zr=({selected:e,onChange:t,options:n,listLabel:r,className:i,classNameOptions:o,testId:a,placeholder:l,matchWidth:s=!0,selectorElement:u,disabled:c,labelPrefixElement:d=null,isLoadingData:f=!1})=>m.jsxs(_n,{value:e,onChange:t,disabled:c,children:[r&&m.jsx(_n.Label,{className:"block text-sm font-medium text-gray-700",children:r}),m.jsxs("div",{className:ae({relative:s},i),children:[m.jsxs(_n.Button,{"data-test":a,className:ae("relative w-full border border-gray-300 rounded-md shadow-sm pl-3 pr-10 py-2 text-left focus:outline-none focus:ring-1 focus:ring-indigo-500 focus:border-indigo-500 text-sm",c?"bg-gray-200":"bg-white",i),children:[e!==null&&e.icon&&m.jsx("span",{className:"absolute pr-10",children:f?m.jsx(hc,{className:"w-4 h-4 mr-2",borderPositionAndSize:"border-l-2"}):m.jsx(m.Fragment,{children:e.icon})}),m.jsxs("span",{className:ae("block truncate",{"ml-7 mt-0.5":e!==null&&e.icon}),children:[d,(e==null?void 0:e.label)||l]}),m.jsx("span",{className:"absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none",children:u??m.jsx(tj,{className:"h-5 w-5 text-gray-400","aria-hidden":"true"})})]}),m.jsx(Gn,{as:v.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:m.jsx(_n.Options,{className:ae("absolute z-20 mt-1 bg-white shadow-lg rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none sm:text-sm",o),children:n.map((p,g)=>m.jsx(_n.Option,{"data-test":`${a}-${g}`,className:({active:h})=>ae(h?"bg-gray-50":"",p.disabled?"cursor-not-allowed":"cursor-pointer","text-gray-900 select-none relative py-2 px-3"),value:p,disabled:p.disabled??!1,children:m.jsx(m.Fragment,{children:p.description?m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"font-semibold block text-sm leading-7",children:p.label}),m.jsx("span",{className:"text-xs",children:p.description})]}):m.jsxs("div",{className:"flex flex-row font-normal",children:[p.icon&&m.jsx("div",{children:p.icon})," ",m.jsx("div",{className:ae(p.icon?"mt-0.5":""),children:p.label}),p.icon&&e&&e.value.toString()===p.value.toString()&&m.jsx("div",{className:"absolute right-0",children:m.jsx(sM,{className:"mr-3 h-5 w-5"})})]})})},`${g}-${p.value}`))})})]})]});var xi=(e=>(e.PRIMARY="primary",e.WHITE="white",e.GRAY="gray",e))(xi||{});const En=({label:e,isDisabled:t=!1,onClick:n,classNames:r,dataTestId:i,buttonType:o="primary",iconAlignment:a="right",icon:l=null,type:s="button"})=>o==="white"?m.jsxs("button",{type:s,className:ae("flex items-center align-middle py-2 px-3 space-x-2 bg-white relative border border-gray-300 rounded-md shadow-sm text-left focus:outline-none focus:ring-1 focus:ring-pink-300 focus:border-pink-300 sm:text-sm enabled:cursor-pointer",t?"opacity-50 bg-slate-100 disabled disabled:cursor-not-allowed":"bg-white hover:bg-slate-100",r),"data-test":i,onClick:n,disabled:t,children:[a==="left"&&l,e?m.jsx("span",{children:e}):null,a==="right"&&l]}):o==="primary"?m.jsxs("button",{type:s,className:ae("inline-flex align-middle items-center text-sm px-4 space-x-2 py-2 border border-transparent font-medium rounded-md shadow-sm text-white focus:outline-none focus:ring-offset-2 focus:ring-indigo-500",t?"bg-pink-300 disabled cursor-not-allowed":"bg-zuplo-pink hover:bg-zuplo-pink-hover",{"justify-center":!l},r),"data-test":i,onClick:n,disabled:t,children:[a==="left"&&l,e?m.jsx("span",{children:e}):null,a==="right"&&l]}):o==="gray"?m.jsxs("button",{type:s,className:ae("inline-flex align-middle items-center text-sm px-4 space-x-2 py-2 border border-gray-400 border-1 font-medium rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",t?"bg-gray-100 disabled cursor-not-allowed":"bg-gray-200 hover:bg-gray-300",r),"data-test":i,onClick:n,disabled:t,children:[a==="left"&&l,e?m.jsx("span",{children:e}):null,a==="right"&&l]}):null,oj=({addRoute:e})=>{const t=()=>{var n;(n=window.open("https://www.zuplo.com/docs/overview","_blank"))==null||n.focus()};return m.jsxs("div",{className:"flex flex-col space-y-6 mt-10 text-gray-600 mx-auto px-10 flex-wrap",children:[m.jsx("div",{className:"font-extrabold text-2xl text-gray-600",children:"You don't have any operations"}),m.jsx("div",{className:"whitespace-pre-wrap",children:"Your Open API file is the heart of your gateway - it tells us how to handle incoming requests. To get started, add your first route, or import your Open API file."}),m.jsxs("div",{children:[m.jsx("span",{children:"Why not try to our "}),m.jsx("button",{type:"button",className:"underline text-zuplo-pink hover:text-zuplo-pink-hover cursor-pointer",onClick:t,children:"Getting started guide?"})]}),m.jsx("div",{className:"flex w-full justify-center gap-x-4",children:m.jsx(En,{type:"button",dataTestId:"add-route-btn",onClick:e,label:"Add Route",isDisabled:!1})})]})};var UM=(e=>(e.get="bg-blue-400",e.head="bg-pink-400",e.post="bg-green-400",e.put="bg-yellow-400",e.delete="bg-red-400",e.connect="bg-orange-400",e.options="bg-teal-400",e.trace="bg-fuchsia-400",e.patch="bg-orange-400",e))(UM||{});const aj=({method:e})=>{if(e.includes(","))return m.jsx("div",{className:`
53
53
  px-2 rounded-sm w-full text-center bg-black
54
- `,children:m.jsx("p",{className:"text-2xs text-white",children:"MULTI"})});const t=e;return m.jsx("div",{className:ae("px-2 rounded-sm w-full text-center",Ub[t]),children:m.jsx("p",{className:"text-2xs text-white",children:e.toUpperCase()})})};function lj({path:e,method:t,summary:n,operationId:r,isSelected:i,onOperationSelected:o,onDelete:a}){const l=v.useRef(null),s=()=>{var c,d;(c=l.current)==null||c.classList.remove("hidden"),(d=l.current)==null||d.classList.add("inline-flex")},u=()=>{var c,d;(c=l.current)==null||c.classList.add("hidden"),(d=l.current)==null||d.classList.remove("inline-flex")};return m.jsxs("div",{"data-test":`route-card-${n}`,id:r,className:ae("py-2.5 px-5 rounded flex mb-2 cursor-pointer w-full",i?"bg-gray-200":"hover:bg-gray-100 bg-white"),onClick:()=>{o(r)},onMouseEnter:s,onMouseLeave:u,children:[m.jsxs("div",{className:"grow truncate pr-3",children:[m.jsx("p",{title:n??"Unnamed Operation",className:"font-semibold text-sm antialiased text-editor font-sans text-ellipsis overflow-hidden mb-2",children:n??"Unnamed Operation"}),m.jsxs("div",{className:"flex",children:[m.jsx("div",{className:"flex items-end w-14 shrink-0 mr-2",children:m.jsx(aj,{method:t})}),m.jsx("p",{title:e,className:"text-xs font-light text-neutral-800 font-mono text-ellipsis overflow-hidden",children:e})]})]}),m.jsx("span",{ref:l,className:"shadow rounded-md -space-x-px h-6 right-3 hidden absolute",children:m.jsx("button",{type:"button","data-test":"delete-route-btn",onClick:c=>{c.stopPropagation(),a(e,t,r)},className:"relative rounded-md inline-flex items-center p-2 border border-gray-300 bg-white text-sm font-medium text-gray-400 hover:bg-gray-100",children:m.jsx(cb,{className:"h-4 w-4","aria-hidden":"true"})})})]})}function sj({onSearch:e}){const t=v.useRef(null),[n,r]=v.useState(!1),i=a=>{r(a.target.value.trim().length>0),e(a.target.value.trim())},o=a=>{t.current&&(t.current.value="",e()),r(!1)};return m.jsxs("div",{className:"relative w-full",children:[m.jsx("div",{className:"z-50 flex absolute inset-y-0 right-0 items-center pr-1.5 pointer-events-none"}),m.jsx("input",{type:"text",ref:t,placeholder:"Search",onChange:i,className:"shadow-sm focus:ring-indigo-500 focus:border-indigo-500 text-sm border-gray-300 rounded-md placeholder-gray-400 w-full pr-7"}),m.jsx("div",{className:"absolute top-0 right-0 p-2.5",children:n?m.jsx("button",{type:"button",onClick:o,children:m.jsx(db,{className:"w-4 h-4"})}):m.jsx(ub,{className:"w-4 h-4 text-gray-400"})})]})}const Il=({classNames:e,label:t,fieldName:n,labelPlacement:r="left",children:i})=>{const o=m.jsx("label",{htmlFor:n,className:"block text-sm font-medium text-gray-700 text-right whitespace-nowrap",children:t});return m.jsx(m.Fragment,{children:m.jsxs("div",{className:ae("flex items-center gap-x-2",e),children:[r==="left"&&o,m.jsx("div",{className:"w-full flex flex-row items-center",children:i}),r==="right"&&o]})})};function uj({selectedOption:e,disabled:t=!1,options:n,onSelectionChanged:r,testId:i,label:o}){const a=l=>{r==null||r(l)};return m.jsx(_n,{disabled:t,value:e,onChange:a,children:({open:l})=>m.jsxs(m.Fragment,{children:[m.jsx(_n.Label,{className:"sr-only hidden",children:o}),m.jsxs("div",{className:"max-w-full relative",children:[m.jsx("div",{className:"flex w-full",children:m.jsxs("div",{className:"max-w-full relative z-0 flex shadow-sm rounded-md divide-x divide-gray-300 border border-gray-300",children:[m.jsx("div",{className:ae(t?"bg-gray-100":"bg-white","flex grow min-w-0 w-full max-w-full items-center py-2 pl-3 pr-4 rounded-l-md shadow-sm "),children:m.jsx("p",{className:"text-sm whitespace-pre truncate",children:e==null?void 0:e.name})}),m.jsxs(_n.Button,{"data-test":i,className:"w-fit relative flex items-center p-1 rounded-l-none rounded hover:bg-gray-300 focus:outline-none focus:z-10 focus:ring-2 focus:ring-offset-0 border-r-1 border-gray-900 focus:ring-offset-gray-200 focus:ring-gray-300",children:[m.jsx("span",{className:"sr-only",children:o}),m.jsx(oc,{className:"h-5 w-5 text-black","aria-hidden":"true"})]})]})}),m.jsx(Wn,{show:l,as:v.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:m.jsx(_n.Options,{static:!0,className:"origin-top-right absolute z-20 right-0 mt-2 w-72 rounded-md shadow-lg overflow-hidden bg-white divide-y divide-gray-200 ring-1 ring-black ring-opacity-5 focus:outline-none",children:n.map((s,u)=>m.jsx(_n.Option,{"data-test":`${i}-${u}`,className:({active:c})=>ae(c?"bg-gray-200":"text-gray-900","cursor-default select-none relative p-4 text-sm"),value:s,children:({active:c})=>m.jsxs("div",{className:"flex flex-col",children:[m.jsxs("div",{className:"flex justify-between",children:[m.jsx("p",{className:ae("whitespace-pre",(e==null?void 0:e.key)===s.key?"font-bold":"font-normal",c?"text-gray-900":"text-gray-700"),children:s.name}),(e==null?void 0:e.key)===s.key?m.jsx("span",{className:"text-zuplo-pink",children:m.jsx(sb,{className:"h-5 w-5","aria-hidden":"true"})}):null]}),m.jsx("p",{className:ae(c?"text-gray-900":"text-gray-500","mt-2"),children:s.description})]})},s.name))})})]})]})})}const $b=[{key:"anything-goes",name:"⚠️ Anything Goes",description:"This route will allow any cross origin requests. IMPORTANT - this can have security implication for your API and users."},{key:"none",name:"No CORS",description:"No CORS support, this route will disallow any cross-origin requests"}],cj=$b[1];function dj({testId:e,onSelectionChanged:t,corsPolicies:n,selectedCorsPolicy:r}){const o=[...n?n.map(l=>({key:l.name,name:l.name,description:`Allow origins: ${Array.isArray(l.allowedOrigins)?l.allowedOrigins.join(", "):l.allowedOrigins}`})):[],...$b],a=o.find(l=>l.key===(r??cj));return m.jsx(uj,{selectedOption:a??{key:"INVALID SELECTION",name:"INVALID SELECTION",description:"Selection is not one of the available options"},testId:e,options:o,onSelectionChanged:l=>{t(l.key)}})}const fj=({selectedCorsPolicy:e,span:t,corsPolicies:n,onCORSSelectionChanged:r})=>m.jsx(Il,{label:"CORS",fieldName:"cors",span:t,children:m.jsx(dj,{testId:"operation-cors-picker",selectedCorsPolicy:e,corsPolicies:n,onSelectionChanged:r})}),pj=({shouldExcludeFromDocs:e,span:t,onSelectionChanged:n})=>m.jsx(Il,{label:"Exclude From Docs",fieldName:"docs-inclusion",span:t,labelPlacement:"right",children:m.jsx(Bb,{testId:"operation-docs-inclusion-checkbox",id:"docs-inclusion",checked:e,onChange:n})});var zn={};(function(e){e.__esModule=!0,e.OpenAPIV2=e.OpenAPIV3=void 0,function(t){(function(n){n.GET="get",n.PUT="put",n.POST="post",n.DELETE="delete",n.OPTIONS="options",n.HEAD="head",n.PATCH="patch",n.TRACE="trace"})(t.HttpMethods||(t.HttpMethods={}))}(e.OpenAPIV3||(e.OpenAPIV3={})),function(t){(function(n){n.GET="get",n.PUT="put",n.POST="post",n.DELETE="delete",n.OPTIONS="options",n.HEAD="head",n.PATCH="patch"})(t.HttpMethods||(t.HttpMethods={}))}(e.OpenAPIV2||(e.OpenAPIV2={}))})(zn);const zv=[{label:"GET",value:zn.OpenAPIV3.HttpMethods.GET},{label:"HEAD",value:zn.OpenAPIV3.HttpMethods.HEAD},{label:"POST",value:zn.OpenAPIV3.HttpMethods.POST},{label:"PUT",value:zn.OpenAPIV3.HttpMethods.PUT},{label:"DELETE",value:zn.OpenAPIV3.HttpMethods.DELETE},{label:"OPTIONS",value:zn.OpenAPIV3.HttpMethods.OPTIONS},{label:"TRACE",value:zn.OpenAPIV3.HttpMethods.TRACE},{label:"PATCH",value:zn.OpenAPIV3.HttpMethods.PATCH}],mj={label:"Multiple (edit in JSON View)",value:"Multiple",disabled:!0},gj=({selectedMethod:e,span:t,onSelectionChanged:n})=>{const r=e.includes(",");return m.jsx(Il,{label:"Method",fieldName:"method",span:t,children:m.jsx(Zr,{testId:"operation-method-picker",matchWidth:!1,selected:{label:r?"Multiple":e.toUpperCase(),value:e},onChange:n,options:r?zv.concat(mj):zv})})},lg=v.createContext({setPath:()=>{},setSummary:()=>{}}),Bv="open-api",cs={"open-api":"OpenAPI","url-pattern":"URL Pattern"},Uv={"open-api":"Standard Open API format e.g. /pizza/size/{size}","url-pattern":"Use the more powerful URL Pattern format"},hj=({initialPath:e,span:t,pathMode:n,hasError:r,onPathChange:i,onPathModeChange:o,onFieldModified:a})=>{const{setPath:l}=v.useContext(lg),[s,u]=v.useState(!1),[c,d]=v.useState(e),f=n?{value:n,label:cs[n]}:{value:Bv,label:cs[Bv]};v.useEffect(()=>{d(e),l(e)},[e]);const p=w=>{s||(u(!0),a()),d(w.target.value),l(w.target.value)},g=()=>{if(s){let w=c;c.startsWith("/")||(w=`/${c}`,d(w)),i(w),u(!1)}},h=w=>{o(w.value)};return m.jsxs(Il,{span:t,label:"Path",fieldName:"operation-path",children:[m.jsx("input",{type:"text",id:"operation-path-input",name:"path",className:ae(r?"border-red-500 focus:ring-red-500 focus:border-red-500":"border-gray-300 focus:ring-indigo-500 focus:border-indigo-500","rounded-l-md","shadow-sm block w-full text-sm rounded-none font-mono"),value:c,onChange:p,onBlur:g,"data-test":"operation-path-input"}),m.jsx(Zr,{className:"w-56 border-l-0 rounded-l-none",classNameOptions:"w-52",selected:f,onChange:h,options:[{value:"open-api",label:cs["open-api"],description:Uv["open-api"]},{value:"url-pattern",label:cs["url-pattern"],description:Uv["url-pattern"]}]})]})},vj=({initialSummary:e,span:t,onSummaryChange:n,onFieldModified:r})=>{const i=v.useRef(null),[o,a]=v.useState(!1),{setSummary:l}=v.useContext(lg);v.useEffect(()=>{i.current&&(i.current.value=e??"",l(e))},[e]);const s=c=>{o||(a(!0),r()),l(c.target.value)},u=c=>{o&&(n(c.target.value),a(!1))};return m.jsx(Il,{label:"Summary",fieldName:"operation-summary",span:t,children:m.jsx("input",{ref:i,"data-test":"operation-summary-input",id:"summary",type:"text",name:"summary",className:ae("shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full text-sm border-gray-300 rounded-md"),onChange:s,onBlur:u})})},_b="tooltip-toggle",zs=({hasError:e=!1,tooltip:t,onChange:n,value:r,errorMessage:i,label:o})=>{const[a,l]=v.useState(!1),s=c=>{n(c)},u=c=>{var f;if(((f=c.relatedTarget)==null?void 0:f.id)!==_b){l(!1);return}const d=c.currentTarget.selectionEnd;c.currentTarget.focus(),c.currentTarget.setSelectionRange(d,d)};return m.jsx("div",{className:"w-full",children:m.jsxs("div",{className:"grid grid-cols-5 gap-x-2 items-center",children:[o?m.jsx("span",{className:"col-span-1 text-gray-600 text-sm text-right",children:o}):null,m.jsxs("div",{className:ae({"col-span-4":!!o,"col-span-5":!o}),children:[a&&t?t:null,m.jsx("input",{type:"text",id:"route-handler",name:"route-handler",className:ae("shadow-sm block w-full text-sm rounded-md font-mono",{"border-2 border-red-300 text-red-900 focus:ring-red-500 focus:border-red-500":e,"border-gray-300 focus:ring-indigo-500 focus:border-indigo-500 ":!e,"col-span-4":!!o,"col-span-5":!o}),"data-test":"route-handler-input",value:r,onChange:s,onFocus:()=>l(!0),onBlur:u,"aria-invalid":e})]}),e?m.jsxs(m.Fragment,{children:[o?m.jsx("span",{className:"col-span-1"}):null,m.jsx("p",{"data-test":"route-handler-input-error",className:ae("mt-2 text-sm text-red-500 col-span-4",{"col-span-4":!!o,"col-span-5":!o}),children:i})]}):null]})})};let Sa;const yj={get(e,t,n){return typeof t=="symbol"?()=>"superProxy.toString()":Sa}};Sa=new Proxy({},yj);const Ij=e=>e.includes("undefined")||e.includes("[object"),wj=e=>{try{return new URL(e),!0}catch{return!1}},bj=e=>{if(e==="")return{errorType:"Error",message:"Invalid Rewrite URL provided"};const t={url:new URL("https://www.zuplo.com"),host:"",hostname:"",origin:"",port:"",protocol:"",headers:new Headers({}),params:{},pathname:"",method:"",query:{},search:"",env:Sa,request:Sa,e:encodeURIComponent,context:Sa},n=(o,a={})=>new Function("vars",["const tagged = ( "+Object.keys(a).join(", ")+" ) =>","`"+o+"`","return tagged(...Object.values(vars))"].join(`
55
- `))(a);let r=null;try{r=n(e,t)}catch(o){return o instanceof ReferenceError||o instanceof TypeError?{errorType:"Error",message:o.message}:{errorType:"Error",message:`${e} is not a valid pattern`}}return r?e.includes("env.")||e.includes("params.")||e.includes("{pathname")||e.includes("{method")||e.includes("query.")||e.includes("{headers")||e.includes("request")||e.includes("{context")?{errorType:"Warning",message:"Tip: Use the API Test Console to test the behavior of request properties and environment variables."}:Ij(r)?{errorType:"Error",message:`Failed to parse component(s), rewrite result: ${r}`}:wj(r)?{errorType:null,message:null}:{errorType:"Error",message:`${r} is not a valid URL`}:{errorType:"Error",message:"Its null"}},xj=[{example:'"application/json"',token:'${headers.get("content-type")}'},{example:'"example.com:8080"',token:"${host}"},{example:'"example.com"',token:"${hostname}"},{example:'"GET"',token:"${method}"},{example:'"https://example.com"',token:"${origin}"},{example:'":productId"',token:"${params.productId}"},{example:'"/v1/products/:productId"',token:"${pathname}"},{example:'"8080"',token:"${port}"},{example:'"https:"',token:"${protocol}"},{example:'"cars"',token:"${query.category}"},{example:'"?category=cars"',token:"${search}"},{example:'"https://baseurl.com"',token:"${env.BASE_URL}"},{example:'"https://example.com:8080/v1/products/:productId?category=cars"',token:"${url}"},{example:'${request.user.sub} = "user284787985473"',token:"${request}"},{example:'${context.route.custom} - "my-value"',token:"${context}"}],Fb=({url:e,onUrlChange:t})=>{const[n,r]=v.useState(!0),i=()=>{r(!n)},o=c=>{const d=c.currentTarget.value;t(d)},{errorType:a,message:l}=bj(e),s=a==="Error",u=m.jsx("div",{className:"relative",children:m.jsxs("div",{className:"absolute inset-x-0 bottom-0.5 flex flex-col bg-gray-200 z-20 rounded-md px-3 py-1 border-gray-300 border-2",children:[m.jsxs("div",{className:"flex justify-between h-full items-center",children:[m.jsx("p",{className:"font-bold text-md ",children:"URL Cheat Sheet"}),m.jsx("button",{title:n?"Collapse Cheat Sheet":"Expand Cheat Sheet",id:_b,onClick:i,children:n?m.jsx(oc,{className:"w-5 h-5"}):m.jsx(LC,{className:"w-5 h-5"})})]}),n?m.jsxs("div",{className:"mt-2",children:[xj.map(c=>m.jsxs("p",{className:"text-gray-600 text-xs font-mono break-words",children:[m.jsx("span",{className:"text-pink-600",children:c.token})," - ",c.example]},c.token)),a==="Warning"?m.jsx("div",{className:"hidden xl:flex mt-2 pb-1 text-xs font-mono text-pink-600",children:l}):null]}):null]})});return m.jsx(zs,{hasError:s,tooltip:u,onChange:o,value:e,errorMessage:l})},Mj=({routeHandler:e,onOptionsChange:t})=>{var r;const n=i=>{t({...e.options,baseUrl:i})};return m.jsx("div",{className:"space-y-2",children:m.jsx("fieldset",{className:"space-y-2",children:m.jsx(Fb,{onUrlChange:n,url:((r=e.options)==null?void 0:r.baseUrl)??""})})})};function Sj(e){const t=new Error(e);if(t.stack===void 0)try{throw t}catch{}return t}var Nj=Sj,ge=Nj;function Dj(e){return!!e&&typeof e.then=="function"}var Le=Dj;function Aj(e,t){if(e!=null)return e;throw ge(t??"Got unexpected null or undefined")}var Be=Aj;function pe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class vc{getValue(){throw ge("BaseLoadable")}toPromise(){throw ge("BaseLoadable")}valueMaybe(){throw ge("BaseLoadable")}valueOrThrow(){throw ge(`Loadable expected value, but in "${this.state}" state`)}promiseMaybe(){throw ge("BaseLoadable")}promiseOrThrow(){throw ge(`Loadable expected promise, but in "${this.state}" state`)}errorMaybe(){throw ge("BaseLoadable")}errorOrThrow(){throw ge(`Loadable expected error, but in "${this.state}" state`)}is(t){return t.state===this.state&&t.contents===this.contents}map(t){throw ge("BaseLoadable")}}class Cj extends vc{constructor(t){super(),pe(this,"state","hasValue"),pe(this,"contents",void 0),this.contents=t}getValue(){return this.contents}toPromise(){return Promise.resolve(this.contents)}valueMaybe(){return this.contents}valueOrThrow(){return this.contents}promiseMaybe(){}errorMaybe(){}map(t){try{const n=t(this.contents);return Le(n)?Mi(n):vo(n)?n:wl(n)}catch(n){return Le(n)?Mi(n.next(()=>this.map(t))):yc(n)}}}class Ej extends vc{constructor(t){super(),pe(this,"state","hasError"),pe(this,"contents",void 0),this.contents=t}getValue(){throw this.contents}toPromise(){return Promise.reject(this.contents)}valueMaybe(){}promiseMaybe(){}errorMaybe(){return this.contents}errorOrThrow(){return this.contents}map(t){return this}}class Hb extends vc{constructor(t){super(),pe(this,"state","loading"),pe(this,"contents",void 0),this.contents=t}getValue(){throw this.contents}toPromise(){return this.contents}valueMaybe(){}promiseMaybe(){return this.contents}promiseOrThrow(){return this.contents}errorMaybe(){}map(t){return Mi(this.contents.then(n=>{const r=t(n);if(vo(r)){const i=r;switch(i.state){case"hasValue":return i.contents;case"hasError":throw i.contents;case"loading":return i.contents}}return r}).catch(n=>{if(Le(n))return n.then(()=>this.map(t).contents);throw n}))}}function wl(e){return Object.freeze(new Cj(e))}function yc(e){return Object.freeze(new Ej(e))}function Mi(e){return Object.freeze(new Hb(e))}function Wb(){return Object.freeze(new Hb(new Promise(()=>{})))}function Tj(e){return e.every(t=>t.state==="hasValue")?wl(e.map(t=>t.contents)):e.some(t=>t.state==="hasError")?yc(Be(e.find(t=>t.state==="hasError"),"Invalid loadable passed to loadableAll").contents):Mi(Promise.all(e.map(t=>t.contents)))}function Gb(e){const n=(Array.isArray(e)?e:Object.getOwnPropertyNames(e).map(i=>e[i])).map(i=>vo(i)?i:Le(i)?Mi(i):wl(i)),r=Tj(n);return Array.isArray(e)?r:r.map(i=>Object.getOwnPropertyNames(e).reduce((o,a,l)=>({...o,[a]:i[l]}),{}))}function vo(e){return e instanceof vc}const jj={of:e=>Le(e)?Mi(e):vo(e)?e:wl(e),error:e=>yc(e),loading:()=>Wb(),all:Gb,isLoadable:vo};var Ci={loadableWithValue:wl,loadableWithError:yc,loadableWithPromise:Mi,loadableLoading:Wb,loadableAll:Gb,isLoadable:vo,RecoilLoadable:jj},Pj=Ci.loadableWithValue,Lj=Ci.loadableWithError,Rj=Ci.loadableWithPromise,Oj=Ci.loadableLoading,kj=Ci.loadableAll,zj=Ci.isLoadable,Bj=Ci.RecoilLoadable,bl=Object.freeze({__proto__:null,loadableWithValue:Pj,loadableWithError:Lj,loadableWithPromise:Rj,loadableLoading:Oj,loadableAll:kj,isLoadable:zj,RecoilLoadable:Bj});const Cp={RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED:!0,RECOIL_GKS_ENABLED:new Set(["recoil_hamt_2020","recoil_sync_external_store","recoil_suppress_rerender_in_callback","recoil_memory_managament_2020"])};function Uj(e,t){var n,r;const i=(n=process.env[e])===null||n===void 0||(r=n.toLowerCase())===null||r===void 0?void 0:r.trim();if(i==null||i==="")return;if(!["true","false"].includes(i))throw ge(`({}).${e} value must be 'true', 'false', or empty: ${i}`);t(i==="true")}function $j(e,t){var n;const r=(n=process.env[e])===null||n===void 0?void 0:n.trim();r==null||r===""||t(r.split(/\s*,\s*|\s+/))}function _j(){var e;typeof process>"u"||((e=process)===null||e===void 0?void 0:e.env)!=null&&(Uj("RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED",t=>{Cp.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED=t}),$j("RECOIL_GKS_ENABLED",t=>{t.forEach(n=>{Cp.RECOIL_GKS_ENABLED.add(n)})}))}_j();var Po=Cp;function Ic(e){return Po.RECOIL_GKS_ENABLED.has(e)}Ic.setPass=e=>{Po.RECOIL_GKS_ENABLED.add(e)};Ic.setFail=e=>{Po.RECOIL_GKS_ENABLED.delete(e)};Ic.clear=()=>{Po.RECOIL_GKS_ENABLED.clear()};var Ce=Ic;function Fj(e,t,{error:n}={}){return null}var Hj=Fj,sg=Hj,Jd,Xd,qd;const Wj=(Jd=k.createMutableSource)!==null&&Jd!==void 0?Jd:k.unstable_createMutableSource,Vb=(Xd=k.useMutableSource)!==null&&Xd!==void 0?Xd:k.unstable_useMutableSource,Zb=(qd=k.useSyncExternalStore)!==null&&qd!==void 0?qd:k.unstable_useSyncExternalStore;function Gj(){var e;const{ReactCurrentDispatcher:t,ReactCurrentOwner:n}=k.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;return((e=t==null?void 0:t.current)!==null&&e!==void 0?e:n.currentDispatcher).useSyncExternalStore!=null}function Vj(){return Ce("recoil_transition_support")?{mode:"TRANSITION_SUPPORT",early:!0,concurrent:!0}:Ce("recoil_sync_external_store")&&Zb!=null?{mode:"SYNC_EXTERNAL_STORE",early:!0,concurrent:!1}:Ce("recoil_mutable_source")&&Vb!=null&&typeof window<"u"&&!window.$disableRecoilValueMutableSource_TEMP_HACK_DO_NOT_USE?Ce("recoil_suppress_rerender_in_callback")?{mode:"MUTABLE_SOURCE",early:!0,concurrent:!0}:{mode:"MUTABLE_SOURCE",early:!1,concurrent:!1}:Ce("recoil_suppress_rerender_in_callback")?{mode:"LEGACY",early:!0,concurrent:!1}:{mode:"LEGACY",early:!1,concurrent:!1}}function Zj(){return!1}var xl={createMutableSource:Wj,useMutableSource:Vb,useSyncExternalStore:Zb,currentRendererSupportsUseSyncExternalStore:Gj,reactMode:Vj,isFastRefreshEnabled:Zj};class ug{constructor(t){pe(this,"key",void 0),this.key=t}toJSON(){return{key:this.key}}}class Yb extends ug{}class Qb extends ug{}function Yj(e){return e instanceof Yb||e instanceof Qb}var wc={AbstractRecoilValue:ug,RecoilState:Yb,RecoilValueReadOnly:Qb,isRecoilValue:Yj},Qj=wc.AbstractRecoilValue,Jj=wc.RecoilState,Xj=wc.RecoilValueReadOnly,qj=wc.isRecoilValue,yo=Object.freeze({__proto__:null,AbstractRecoilValue:Qj,RecoilState:Jj,RecoilValueReadOnly:Xj,isRecoilValue:qj});function Kj(e,t){return function*(){let n=0;for(const r of e)yield t(r,n++)}()}var bc=Kj;class Jb{}const eP=new Jb,Si=new Map,cg=new Map;function tP(e){return bc(e,t=>Be(cg.get(t)))}function nP(e){if(Si.has(e)){const t=`Duplicate atom key "${e}". This is a FATAL ERROR in
54
+ `,children:m.jsx("p",{className:"text-2xs text-white",children:"MULTI"})});const t=e;return m.jsx("div",{className:ae("px-2 rounded-sm w-full text-center",UM[t]),children:m.jsx("p",{className:"text-2xs text-white",children:e.toUpperCase()})})};function lj({path:e,method:t,summary:n,operationId:r,isSelected:i,onOperationSelected:o,onDelete:a}){const l=v.useRef(null),s=()=>{var c,d;(c=l.current)==null||c.classList.remove("hidden"),(d=l.current)==null||d.classList.add("inline-flex")},u=()=>{var c,d;(c=l.current)==null||c.classList.add("hidden"),(d=l.current)==null||d.classList.remove("inline-flex")};return m.jsxs("div",{"data-test":`route-card-${n}`,id:r,className:ae("py-2.5 px-5 rounded flex mb-2 cursor-pointer w-full",i?"bg-gray-200":"hover:bg-gray-100 bg-white"),onClick:()=>{o(r)},onMouseEnter:s,onMouseLeave:u,children:[m.jsxs("div",{className:"grow truncate pr-3",children:[m.jsx("p",{title:n??"Unnamed Operation",className:"font-semibold text-sm antialiased text-editor font-sans text-ellipsis overflow-hidden mb-2",children:n??"Unnamed Operation"}),m.jsxs("div",{className:"flex",children:[m.jsx("div",{className:"flex items-end w-14 shrink-0 mr-2",children:m.jsx(aj,{method:t})}),m.jsx("p",{title:e,className:"text-xs font-light text-neutral-800 font-mono text-ellipsis overflow-hidden",children:e})]})]}),m.jsx("span",{ref:l,className:"shadow rounded-md -space-x-px h-6 right-3 hidden absolute",children:m.jsx("button",{type:"button","data-test":"delete-route-btn",onClick:c=>{c.stopPropagation(),a(e,t,r)},className:"relative rounded-md inline-flex items-center p-2 border border-gray-300 bg-white text-sm font-medium text-gray-400 hover:bg-gray-100",children:m.jsx(cM,{className:"h-4 w-4","aria-hidden":"true"})})})]})}function sj({onSearch:e}){const t=v.useRef(null),[n,r]=v.useState(!1),i=a=>{r(a.target.value.trim().length>0),e(a.target.value.trim())},o=a=>{t.current&&(t.current.value="",e()),r(!1)};return m.jsxs("div",{className:"relative w-full",children:[m.jsx("div",{className:"z-50 flex absolute inset-y-0 right-0 items-center pr-1.5 pointer-events-none"}),m.jsx("input",{type:"text",ref:t,placeholder:"Search",onChange:i,className:"shadow-sm focus:ring-indigo-500 focus:border-indigo-500 text-sm border-gray-300 rounded-md placeholder-gray-400 w-full pr-7"}),m.jsx("div",{className:"absolute top-0 right-0 p-2.5",children:n?m.jsx("button",{type:"button",onClick:o,children:m.jsx(dM,{className:"w-4 h-4"})}):m.jsx(uM,{className:"w-4 h-4 text-gray-400"})})]})}const Il=({classNames:e,label:t,fieldName:n,labelPlacement:r="left",children:i})=>{const o=m.jsx("label",{htmlFor:n,className:"block text-sm font-medium text-gray-700 text-right whitespace-nowrap",children:t});return m.jsx(m.Fragment,{children:m.jsxs("div",{className:ae("flex items-center gap-x-2",e),children:[r==="left"&&o,m.jsx("div",{className:"w-full flex flex-row items-center",children:i}),r==="right"&&o]})})};function uj({selectedOption:e,disabled:t=!1,options:n,onSelectionChanged:r,testId:i,label:o}){const a=l=>{r==null||r(l)};return m.jsx(_n,{disabled:t,value:e,onChange:a,children:({open:l})=>m.jsxs(m.Fragment,{children:[m.jsx(_n.Label,{className:"sr-only hidden",children:o}),m.jsxs("div",{className:"max-w-full relative",children:[m.jsx("div",{className:"flex w-full",children:m.jsxs("div",{className:"max-w-full relative z-0 flex shadow-sm rounded-md divide-x divide-gray-300 border border-gray-300",children:[m.jsx("div",{className:ae(t?"bg-gray-100":"bg-white","flex grow min-w-0 w-full max-w-full items-center py-2 pl-3 pr-4 rounded-l-md shadow-sm "),children:m.jsx("p",{className:"text-sm whitespace-pre truncate",children:e==null?void 0:e.name})}),m.jsxs(_n.Button,{"data-test":i,className:"w-fit relative flex items-center p-1 rounded-l-none rounded hover:bg-gray-300 focus:outline-none focus:z-10 focus:ring-2 focus:ring-offset-0 border-r-1 border-gray-900 focus:ring-offset-gray-200 focus:ring-gray-300",children:[m.jsx("span",{className:"sr-only",children:o}),m.jsx(oc,{className:"h-5 w-5 text-black","aria-hidden":"true"})]})]})}),m.jsx(Gn,{show:l,as:v.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:m.jsx(_n.Options,{static:!0,className:"origin-top-right absolute z-20 right-0 mt-2 w-72 rounded-md shadow-lg overflow-hidden bg-white divide-y divide-gray-200 ring-1 ring-black ring-opacity-5 focus:outline-none",children:n.map((s,u)=>m.jsx(_n.Option,{"data-test":`${i}-${u}`,className:({active:c})=>ae(c?"bg-gray-200":"text-gray-900","cursor-default select-none relative p-4 text-sm"),value:s,children:({active:c})=>m.jsxs("div",{className:"flex flex-col",children:[m.jsxs("div",{className:"flex justify-between",children:[m.jsx("p",{className:ae("whitespace-pre",(e==null?void 0:e.key)===s.key?"font-bold":"font-normal",c?"text-gray-900":"text-gray-700"),children:s.name}),(e==null?void 0:e.key)===s.key?m.jsx("span",{className:"text-zuplo-pink",children:m.jsx(sM,{className:"h-5 w-5","aria-hidden":"true"})}):null]}),m.jsx("p",{className:ae(c?"text-gray-900":"text-gray-500","mt-2"),children:s.description})]})},s.name))})})]})]})})}const $M=[{key:"anything-goes",name:"⚠️ Anything Goes",description:"This route will allow any cross origin requests. IMPORTANT - this can have security implication for your API and users."},{key:"none",name:"No CORS",description:"No CORS support, this route will disallow any cross-origin requests"}],cj=$M[1];function dj({testId:e,onSelectionChanged:t,corsPolicies:n,selectedCorsPolicy:r}){const o=[...n?n.map(l=>({key:l.name,name:l.name,description:`Allow origins: ${Array.isArray(l.allowedOrigins)?l.allowedOrigins.join(", "):l.allowedOrigins}`})):[],...$M],a=o.find(l=>l.key===(r??cj));return m.jsx(uj,{selectedOption:a??{key:"INVALID SELECTION",name:"INVALID SELECTION",description:"Selection is not one of the available options"},testId:e,options:o,onSelectionChanged:l=>{t(l.key)}})}const fj=({selectedCorsPolicy:e,span:t,corsPolicies:n,onCORSSelectionChanged:r})=>m.jsx(Il,{label:"CORS",fieldName:"cors",span:t,children:m.jsx(dj,{testId:"operation-cors-picker",selectedCorsPolicy:e,corsPolicies:n,onSelectionChanged:r})}),pj=({shouldExcludeFromDocs:e,span:t,onSelectionChanged:n})=>m.jsx(Il,{label:"Exclude From Docs",fieldName:"docs-inclusion",span:t,labelPlacement:"right",children:m.jsx(BM,{testId:"operation-docs-inclusion-checkbox",id:"docs-inclusion",checked:e,onChange:n})});var zn={};(function(e){e.__esModule=!0,e.OpenAPIV2=e.OpenAPIV3=void 0,function(t){(function(n){n.GET="get",n.PUT="put",n.POST="post",n.DELETE="delete",n.OPTIONS="options",n.HEAD="head",n.PATCH="patch",n.TRACE="trace"})(t.HttpMethods||(t.HttpMethods={}))}(e.OpenAPIV3||(e.OpenAPIV3={})),function(t){(function(n){n.GET="get",n.PUT="put",n.POST="post",n.DELETE="delete",n.OPTIONS="options",n.HEAD="head",n.PATCH="patch"})(t.HttpMethods||(t.HttpMethods={}))}(e.OpenAPIV2||(e.OpenAPIV2={}))})(zn);const zv=[{label:"GET",value:zn.OpenAPIV3.HttpMethods.GET},{label:"HEAD",value:zn.OpenAPIV3.HttpMethods.HEAD},{label:"POST",value:zn.OpenAPIV3.HttpMethods.POST},{label:"PUT",value:zn.OpenAPIV3.HttpMethods.PUT},{label:"DELETE",value:zn.OpenAPIV3.HttpMethods.DELETE},{label:"OPTIONS",value:zn.OpenAPIV3.HttpMethods.OPTIONS},{label:"TRACE",value:zn.OpenAPIV3.HttpMethods.TRACE},{label:"PATCH",value:zn.OpenAPIV3.HttpMethods.PATCH}],mj={label:"Multiple (edit in JSON View)",value:"Multiple",disabled:!0},gj=({selectedMethod:e,span:t,onSelectionChanged:n})=>{const r=e.includes(",");return m.jsx(Il,{label:"Method",fieldName:"method",span:t,children:m.jsx(Zr,{testId:"operation-method-picker",matchWidth:!1,selected:{label:r?"Multiple":e.toUpperCase(),value:e},onChange:n,options:r?zv.concat(mj):zv})})},lg=v.createContext({setPath:()=>{},setSummary:()=>{}}),Bv="open-api",cs={"open-api":"OpenAPI","url-pattern":"URL Pattern"},Uv={"open-api":"Standard Open API format e.g. /pizza/size/{size}","url-pattern":"Use the more powerful URL Pattern format"},hj=({initialPath:e,span:t,pathMode:n,hasError:r,onPathChange:i,onPathModeChange:o,onFieldModified:a})=>{const{setPath:l}=v.useContext(lg),[s,u]=v.useState(!1),[c,d]=v.useState(e),f=n?{value:n,label:cs[n]}:{value:Bv,label:cs[Bv]};v.useEffect(()=>{d(e),l(e)},[e]);const p=w=>{s||(u(!0),a()),d(w.target.value),l(w.target.value)},g=()=>{if(s){let w=c;c.startsWith("/")||(w=`/${c}`,d(w)),i(w),u(!1)}},h=w=>{o(w.value)};return m.jsxs(Il,{span:t,label:"Path",fieldName:"operation-path",children:[m.jsx("input",{type:"text",id:"operation-path-input",name:"path",className:ae(r?"border-red-500 focus:ring-red-500 focus:border-red-500":"border-gray-300 focus:ring-indigo-500 focus:border-indigo-500","rounded-l-md","shadow-sm block w-full text-sm rounded-none font-mono"),value:c,onChange:p,onBlur:g,"data-test":"operation-path-input"}),m.jsx(Zr,{className:"w-56 border-l-0 rounded-l-none",classNameOptions:"w-52",selected:f,onChange:h,options:[{value:"open-api",label:cs["open-api"],description:Uv["open-api"]},{value:"url-pattern",label:cs["url-pattern"],description:Uv["url-pattern"]}]})]})},vj=({initialSummary:e,span:t,onSummaryChange:n,onFieldModified:r})=>{const i=v.useRef(null),[o,a]=v.useState(!1),{setSummary:l}=v.useContext(lg);v.useEffect(()=>{i.current&&(i.current.value=e??"",l(e))},[e]);const s=c=>{o||(a(!0),r()),l(c.target.value)},u=c=>{o&&(n(c.target.value),a(!1))};return m.jsx(Il,{label:"Summary",fieldName:"operation-summary",span:t,children:m.jsx("input",{ref:i,"data-test":"operation-summary-input",id:"summary",type:"text",name:"summary",className:ae("shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full text-sm border-gray-300 rounded-md"),onChange:s,onBlur:u})})},_M="tooltip-toggle",zs=({hasError:e=!1,tooltip:t,onChange:n,value:r,errorMessage:i,label:o})=>{const[a,l]=v.useState(!1),s=c=>{n(c)},u=c=>{var f;if(((f=c.relatedTarget)==null?void 0:f.id)!==_M){l(!1);return}const d=c.currentTarget.selectionEnd;c.currentTarget.focus(),c.currentTarget.setSelectionRange(d,d)};return m.jsx("div",{className:"w-full",children:m.jsxs("div",{className:"grid grid-cols-5 gap-x-2 items-center",children:[o?m.jsx("span",{className:"col-span-1 text-gray-600 text-sm text-right",children:o}):null,m.jsxs("div",{className:ae({"col-span-4":!!o,"col-span-5":!o}),children:[a&&t?t:null,m.jsx("input",{type:"text",id:"route-handler",name:"route-handler",className:ae("shadow-sm block w-full text-sm rounded-md font-mono",{"border-2 border-red-300 text-red-900 focus:ring-red-500 focus:border-red-500":e,"border-gray-300 focus:ring-indigo-500 focus:border-indigo-500 ":!e,"col-span-4":!!o,"col-span-5":!o}),"data-test":"route-handler-input",value:r,onChange:s,onFocus:()=>l(!0),onBlur:u,"aria-invalid":e})]}),e?m.jsxs(m.Fragment,{children:[o?m.jsx("span",{className:"col-span-1"}):null,m.jsx("p",{"data-test":"route-handler-input-error",className:ae("mt-2 text-sm text-red-500 col-span-4",{"col-span-4":!!o,"col-span-5":!o}),children:i})]}):null]})})};let Na;const yj={get(e,t,n){return typeof t=="symbol"?()=>"superProxy.toString()":Na}};Na=new Proxy({},yj);const Ij=e=>e.includes("undefined")||e.includes("[object"),wj=e=>{try{return new URL(e),!0}catch{return!1}},Mj=e=>{if(e==="")return{errorType:"Error",message:"Invalid Rewrite URL provided"};const t={url:new URL("https://www.zuplo.com"),host:"",hostname:"",origin:"",port:"",protocol:"",headers:new Headers({}),params:{},pathname:"",method:"",query:{},search:"",env:Na,request:Na,e:encodeURIComponent,context:Na},n=(o,a={})=>new Function("vars",["const tagged = ( "+Object.keys(a).join(", ")+" ) =>","`"+o+"`","return tagged(...Object.values(vars))"].join(`
55
+ `))(a);let r=null;try{r=n(e,t)}catch(o){return o instanceof ReferenceError||o instanceof TypeError?{errorType:"Error",message:o.message}:{errorType:"Error",message:`${e} is not a valid pattern`}}return r?e.includes("env.")||e.includes("params.")||e.includes("{pathname")||e.includes("{method")||e.includes("query.")||e.includes("{headers")||e.includes("request")||e.includes("{context")?{errorType:"Warning",message:"Tip: Use the API Test Console to test the behavior of request properties and environment variables."}:Ij(r)?{errorType:"Error",message:`Failed to parse component(s), rewrite result: ${r}`}:wj(r)?{errorType:null,message:null}:{errorType:"Error",message:`${r} is not a valid URL`}:{errorType:"Error",message:"Its null"}},xj=[{example:'"application/json"',token:'${headers.get("content-type")}'},{example:'"example.com:8080"',token:"${host}"},{example:'"example.com"',token:"${hostname}"},{example:'"GET"',token:"${method}"},{example:'"https://example.com"',token:"${origin}"},{example:'":productId"',token:"${params.productId}"},{example:'"/v1/products/:productId"',token:"${pathname}"},{example:'"8080"',token:"${port}"},{example:'"https:"',token:"${protocol}"},{example:'"cars"',token:"${query.category}"},{example:'"?category=cars"',token:"${search}"},{example:'"https://baseurl.com"',token:"${env.BASE_URL}"},{example:'"https://example.com:8080/v1/products/:productId?category=cars"',token:"${url}"},{example:'${request.user.sub} = "user284787985473"',token:"${request}"},{example:'${context.route.custom} - "my-value"',token:"${context}"}],FM=({url:e,onUrlChange:t})=>{const[n,r]=v.useState(!0),i=()=>{r(!n)},o=c=>{const d=c.currentTarget.value;t(d)},{errorType:a,message:l}=Mj(e),s=a==="Error",u=m.jsx("div",{className:"relative",children:m.jsxs("div",{className:"absolute inset-x-0 bottom-0.5 flex flex-col bg-gray-200 z-20 rounded-md px-3 py-1 border-gray-300 border-2",children:[m.jsxs("div",{className:"flex justify-between h-full items-center",children:[m.jsx("p",{className:"font-bold text-md ",children:"URL Cheat Sheet"}),m.jsx("button",{title:n?"Collapse Cheat Sheet":"Expand Cheat Sheet",id:_M,onClick:i,children:n?m.jsx(oc,{className:"w-5 h-5"}):m.jsx(PC,{className:"w-5 h-5"})})]}),n?m.jsxs("div",{className:"mt-2",children:[xj.map(c=>m.jsxs("p",{className:"text-gray-600 text-xs font-mono break-words",children:[m.jsx("span",{className:"text-pink-600",children:c.token})," - ",c.example]},c.token)),a==="Warning"?m.jsx("div",{className:"hidden xl:flex mt-2 pb-1 text-xs font-mono text-pink-600",children:l}):null]}):null]})});return m.jsx(zs,{hasError:s,tooltip:u,onChange:o,value:e,errorMessage:l})},bj=({routeHandler:e,onOptionsChange:t})=>{var r;const n=i=>{t({...e.options,baseUrl:i})};return m.jsx("div",{className:"space-y-2",children:m.jsx("fieldset",{className:"space-y-2",children:m.jsx(FM,{onUrlChange:n,url:((r=e.options)==null?void 0:r.baseUrl)??""})})})};function Nj(e){const t=new Error(e);if(t.stack===void 0)try{throw t}catch{}return t}var Sj=Nj,ge=Sj;function Dj(e){return!!e&&typeof e.then=="function"}var Pe=Dj;function Aj(e,t){if(e!=null)return e;throw ge(t??"Got unexpected null or undefined")}var Be=Aj;function pe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class vc{getValue(){throw ge("BaseLoadable")}toPromise(){throw ge("BaseLoadable")}valueMaybe(){throw ge("BaseLoadable")}valueOrThrow(){throw ge(`Loadable expected value, but in "${this.state}" state`)}promiseMaybe(){throw ge("BaseLoadable")}promiseOrThrow(){throw ge(`Loadable expected promise, but in "${this.state}" state`)}errorMaybe(){throw ge("BaseLoadable")}errorOrThrow(){throw ge(`Loadable expected error, but in "${this.state}" state`)}is(t){return t.state===this.state&&t.contents===this.contents}map(t){throw ge("BaseLoadable")}}class Cj extends vc{constructor(t){super(),pe(this,"state","hasValue"),pe(this,"contents",void 0),this.contents=t}getValue(){return this.contents}toPromise(){return Promise.resolve(this.contents)}valueMaybe(){return this.contents}valueOrThrow(){return this.contents}promiseMaybe(){}errorMaybe(){}map(t){try{const n=t(this.contents);return Pe(n)?bi(n):vo(n)?n:wl(n)}catch(n){return Pe(n)?bi(n.next(()=>this.map(t))):yc(n)}}}class Ej extends vc{constructor(t){super(),pe(this,"state","hasError"),pe(this,"contents",void 0),this.contents=t}getValue(){throw this.contents}toPromise(){return Promise.reject(this.contents)}valueMaybe(){}promiseMaybe(){}errorMaybe(){return this.contents}errorOrThrow(){return this.contents}map(t){return this}}class HM extends vc{constructor(t){super(),pe(this,"state","loading"),pe(this,"contents",void 0),this.contents=t}getValue(){throw this.contents}toPromise(){return this.contents}valueMaybe(){}promiseMaybe(){return this.contents}promiseOrThrow(){return this.contents}errorMaybe(){}map(t){return bi(this.contents.then(n=>{const r=t(n);if(vo(r)){const i=r;switch(i.state){case"hasValue":return i.contents;case"hasError":throw i.contents;case"loading":return i.contents}}return r}).catch(n=>{if(Pe(n))return n.then(()=>this.map(t).contents);throw n}))}}function wl(e){return Object.freeze(new Cj(e))}function yc(e){return Object.freeze(new Ej(e))}function bi(e){return Object.freeze(new HM(e))}function GM(){return Object.freeze(new HM(new Promise(()=>{})))}function Tj(e){return e.every(t=>t.state==="hasValue")?wl(e.map(t=>t.contents)):e.some(t=>t.state==="hasError")?yc(Be(e.find(t=>t.state==="hasError"),"Invalid loadable passed to loadableAll").contents):bi(Promise.all(e.map(t=>t.contents)))}function WM(e){const n=(Array.isArray(e)?e:Object.getOwnPropertyNames(e).map(i=>e[i])).map(i=>vo(i)?i:Pe(i)?bi(i):wl(i)),r=Tj(n);return Array.isArray(e)?r:r.map(i=>Object.getOwnPropertyNames(e).reduce((o,a,l)=>({...o,[a]:i[l]}),{}))}function vo(e){return e instanceof vc}const jj={of:e=>Pe(e)?bi(e):vo(e)?e:wl(e),error:e=>yc(e),loading:()=>GM(),all:WM,isLoadable:vo};var Ci={loadableWithValue:wl,loadableWithError:yc,loadableWithPromise:bi,loadableLoading:GM,loadableAll:WM,isLoadable:vo,RecoilLoadable:jj},Lj=Ci.loadableWithValue,Pj=Ci.loadableWithError,Rj=Ci.loadableWithPromise,Oj=Ci.loadableLoading,kj=Ci.loadableAll,zj=Ci.isLoadable,Bj=Ci.RecoilLoadable,Ml=Object.freeze({__proto__:null,loadableWithValue:Lj,loadableWithError:Pj,loadableWithPromise:Rj,loadableLoading:Oj,loadableAll:kj,isLoadable:zj,RecoilLoadable:Bj});const Cp={RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED:!0,RECOIL_GKS_ENABLED:new Set(["recoil_hamt_2020","recoil_sync_external_store","recoil_suppress_rerender_in_callback","recoil_memory_managament_2020"])};function Uj(e,t){var n,r;const i=(n=process.env[e])===null||n===void 0||(r=n.toLowerCase())===null||r===void 0?void 0:r.trim();if(i==null||i==="")return;if(!["true","false"].includes(i))throw ge(`({}).${e} value must be 'true', 'false', or empty: ${i}`);t(i==="true")}function $j(e,t){var n;const r=(n=process.env[e])===null||n===void 0?void 0:n.trim();r==null||r===""||t(r.split(/\s*,\s*|\s+/))}function _j(){var e;typeof process>"u"||((e=process)===null||e===void 0?void 0:e.env)!=null&&(Uj("RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED",t=>{Cp.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED=t}),$j("RECOIL_GKS_ENABLED",t=>{t.forEach(n=>{Cp.RECOIL_GKS_ENABLED.add(n)})}))}_j();var Lo=Cp;function Ic(e){return Lo.RECOIL_GKS_ENABLED.has(e)}Ic.setPass=e=>{Lo.RECOIL_GKS_ENABLED.add(e)};Ic.setFail=e=>{Lo.RECOIL_GKS_ENABLED.delete(e)};Ic.clear=()=>{Lo.RECOIL_GKS_ENABLED.clear()};var Ce=Ic;function Fj(e,t,{error:n}={}){return null}var Hj=Fj,sg=Hj,Jd,Xd,qd;const Gj=(Jd=k.createMutableSource)!==null&&Jd!==void 0?Jd:k.unstable_createMutableSource,VM=(Xd=k.useMutableSource)!==null&&Xd!==void 0?Xd:k.unstable_useMutableSource,ZM=(qd=k.useSyncExternalStore)!==null&&qd!==void 0?qd:k.unstable_useSyncExternalStore;function Wj(){var e;const{ReactCurrentDispatcher:t,ReactCurrentOwner:n}=k.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;return((e=t==null?void 0:t.current)!==null&&e!==void 0?e:n.currentDispatcher).useSyncExternalStore!=null}function Vj(){return Ce("recoil_transition_support")?{mode:"TRANSITION_SUPPORT",early:!0,concurrent:!0}:Ce("recoil_sync_external_store")&&ZM!=null?{mode:"SYNC_EXTERNAL_STORE",early:!0,concurrent:!1}:Ce("recoil_mutable_source")&&VM!=null&&typeof window<"u"&&!window.$disableRecoilValueMutableSource_TEMP_HACK_DO_NOT_USE?Ce("recoil_suppress_rerender_in_callback")?{mode:"MUTABLE_SOURCE",early:!0,concurrent:!0}:{mode:"MUTABLE_SOURCE",early:!1,concurrent:!1}:Ce("recoil_suppress_rerender_in_callback")?{mode:"LEGACY",early:!0,concurrent:!1}:{mode:"LEGACY",early:!1,concurrent:!1}}function Zj(){return!1}var xl={createMutableSource:Gj,useMutableSource:VM,useSyncExternalStore:ZM,currentRendererSupportsUseSyncExternalStore:Wj,reactMode:Vj,isFastRefreshEnabled:Zj};class ug{constructor(t){pe(this,"key",void 0),this.key=t}toJSON(){return{key:this.key}}}class YM extends ug{}class QM extends ug{}function Yj(e){return e instanceof YM||e instanceof QM}var wc={AbstractRecoilValue:ug,RecoilState:YM,RecoilValueReadOnly:QM,isRecoilValue:Yj},Qj=wc.AbstractRecoilValue,Jj=wc.RecoilState,Xj=wc.RecoilValueReadOnly,qj=wc.isRecoilValue,yo=Object.freeze({__proto__:null,AbstractRecoilValue:Qj,RecoilState:Jj,RecoilValueReadOnly:Xj,isRecoilValue:qj});function Kj(e,t){return function*(){let n=0;for(const r of e)yield t(r,n++)}()}var Mc=Kj;class JM{}const eL=new JM,Ni=new Map,cg=new Map;function tL(e){return Mc(e,t=>Be(cg.get(t)))}function nL(e){if(Ni.has(e)){const t=`Duplicate atom key "${e}". This is a FATAL ERROR in
56
56
  production. But it is safe to ignore this warning if it occurred because of
57
- hot module replacement.`;console.warn(t)}}function rP(e){Po.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED&&nP(e.key),Si.set(e.key,e);const t=e.set==null?new yo.RecoilValueReadOnly(e.key):new yo.RecoilState(e.key);return cg.set(e.key,t),t}class Xb extends Error{}function iP(e){const t=Si.get(e);if(t==null)throw new Xb(`Missing definition for RecoilValue: "${e}""`);return t}function oP(e){return Si.get(e)}const yu=new Map;function aP(e){var t;if(!Ce("recoil_memory_managament_2020"))return;const n=Si.get(e);if(n!=null&&(t=n.shouldDeleteConfigOnRelease)!==null&&t!==void 0&&t.call(n)){var r;Si.delete(e),(r=qb(e))===null||r===void 0||r(),yu.delete(e)}}function lP(e,t){Ce("recoil_memory_managament_2020")&&(t===void 0?yu.delete(e):yu.set(e,t))}function qb(e){return yu.get(e)}var Vt={nodes:Si,recoilValues:cg,registerNode:rP,getNode:iP,getNodeMaybe:oP,deleteNodeConfigIfPossible:aP,setConfigDeletionHandler:lP,getConfigDeletionHandler:qb,recoilValuesForKeys:tP,NodeMissingError:Xb,DefaultValue:Jb,DEFAULT_VALUE:eP};function sP(e,t){t()}var uP={enqueueExecution:sP};function cP(e,t){return t={exports:{}},e(t,t.exports),t.exports}var dP=cP(function(e){var t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(j){return typeof j}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j},n={},r=5,i=Math.pow(2,r),o=i-1,a=i/2,l=i/4,s={},u=function(A){return function(){return A}},c=n.hash=function(j){var A=typeof j>"u"?"undefined":t(j);if(A==="number")return j;A!=="string"&&(j+="");for(var H=0,q=0,K=j.length;q<K;++q){var ne=j.charCodeAt(q);H=(H<<5)-H+ne|0}return H},d=function(A){return A-=A>>1&1431655765,A=(A&858993459)+(A>>2&858993459),A=A+(A>>4)&252645135,A+=A>>8,A+=A>>16,A&127},f=function(A,H){return H>>>A&o},p=function(A){return 1<<A},g=function(A,H){return d(A&H-1)},h=function(A,H,q,K){var ne=K;if(!A){var fe=K.length;ne=new Array(fe);for(var ce=0;ce<fe;++ce)ne[ce]=K[ce]}return ne[H]=q,ne},w=function(A,H,q){var K=q.length-1,ne=0,fe=0,ce=q;if(A)ne=fe=H;else for(ce=new Array(K);ne<H;)ce[fe++]=q[ne++];for(++ne;ne<=K;)ce[fe++]=q[ne++];return A&&(ce.length=K),ce},I=function(A,H,q,K){var ne=K.length;if(A){for(var fe=ne;fe>=H;)K[fe--]=K[fe];return K[H]=q,K}for(var ce=0,de=0,he=new Array(ne+1);ce<H;)he[de++]=K[ce++];for(he[H]=q;ce<ne;)he[++de]=K[ce++];return he},y=1,b=2,x=3,N=4,M={__hamt_isEmpty:!0},S=function(A){return A===M||A&&A.__hamt_isEmpty},C=function(A,H,q,K){return{type:y,edit:A,hash:H,key:q,value:K,_modify:P}},L=function(A,H,q){return{type:b,edit:A,hash:H,children:q,_modify:B}},R=function(A,H,q){return{type:x,edit:A,mask:H,children:q,_modify:F}},O=function(A,H,q){return{type:N,edit:A,size:H,children:q,_modify:V}},J=function(A){return A===M||A.type===y||A.type===b},U=function(A,H,q,K,ne){for(var fe=[],ce=K,de=0,he=0;ce;++he)ce&1&&(fe[he]=ne[de++]),ce>>>=1;return fe[H]=q,O(A,de+1,fe)},G=function(A,H,q,K){for(var ne=new Array(H-1),fe=0,ce=0,de=0,he=K.length;de<he;++de)if(de!==q){var Oe=K[de];Oe&&!S(Oe)&&(ne[fe++]=Oe,ce|=1<<de)}return R(A,ce,ne)},Z=function j(A,H,q,K,ne,fe){if(q===ne)return L(A,q,[fe,K]);var ce=f(H,q),de=f(H,ne);return R(A,p(ce)|p(de),ce===de?[j(A,H+r,q,K,ne,fe)]:ce<de?[K,fe]:[fe,K])},$=function(A,H,q,K,ne,fe,ce,de){for(var he=ne.length,Oe=0;Oe<he;++Oe){var kt=ne[Oe];if(q(ce,kt.key)){var ot=kt.value,un=fe(ot);return un===ot?ne:un===s?(--de.value,w(A,Oe,ne)):h(A,Oe,C(H,K,ce,un),ne)}}var xn=fe();return xn===s?ne:(++de.value,h(A,he,C(H,K,ce,xn),ne))},ee=function(A,H){return A===H.edit},P=function(A,H,q,K,ne,fe,ce){if(H(fe,this.key)){var de=K(this.value);return de===this.value?this:de===s?(--ce.value,M):ee(A,this)?(this.value=de,this):C(A,ne,fe,de)}var he=K();return he===s?this:(++ce.value,Z(A,q,this.hash,this,ne,C(A,ne,fe,he)))},B=function(A,H,q,K,ne,fe,ce){if(ne===this.hash){var de=ee(A,this),he=$(de,A,H,this.hash,this.children,K,fe,ce);return he===this.children?this:he.length>1?L(A,this.hash,he):he[0]}var Oe=K();return Oe===s?this:(++ce.value,Z(A,q,this.hash,this,ne,C(A,ne,fe,Oe)))},F=function(A,H,q,K,ne,fe,ce){var de=this.mask,he=this.children,Oe=f(q,ne),kt=p(Oe),ot=g(de,kt),un=de&kt,xn=un?he[ot]:M,Pi=xn._modify(A,H,q+r,K,ne,fe,ce);if(xn===Pi)return this;var Wl=ee(A,this),Bo=de,Uo=void 0;if(un&&S(Pi)){if(Bo&=~kt,!Bo)return M;if(he.length<=2&&J(he[ot^1]))return he[ot^1];Uo=w(Wl,ot,he)}else if(!un&&!S(Pi)){if(he.length>=a)return U(A,Oe,Pi,de,he);Bo|=kt,Uo=I(Wl,ot,Pi,he)}else Uo=h(Wl,ot,Pi,he);return Wl?(this.mask=Bo,this.children=Uo,this):R(A,Bo,Uo)},V=function(A,H,q,K,ne,fe,ce){var de=this.size,he=this.children,Oe=f(q,ne),kt=he[Oe],ot=(kt||M)._modify(A,H,q+r,K,ne,fe,ce);if(kt===ot)return this;var un=ee(A,this),xn=void 0;if(S(kt)&&!S(ot))++de,xn=h(un,Oe,ot,he);else if(!S(kt)&&S(ot)){if(--de,de<=l)return G(A,de,Oe,he);xn=h(un,Oe,M,he)}else xn=h(un,Oe,ot,he);return un?(this.size=de,this.children=xn,this):O(A,de,xn)};M._modify=function(j,A,H,q,K,ne,fe){var ce=q();return ce===s?M:(++fe.value,C(j,K,ne,ce))};function D(j,A,H,q,K){this._editable=j,this._edit=A,this._config=H,this._root=q,this._size=K}D.prototype.setTree=function(j,A){return this._editable?(this._root=j,this._size=A,this):j===this._root?this:new D(this._editable,this._edit,this._config,j,A)};var E=n.tryGetHash=function(j,A,H,q){for(var K=q._root,ne=0,fe=q._config.keyEq;;)switch(K.type){case y:return fe(H,K.key)?K.value:j;case b:{if(A===K.hash)for(var ce=K.children,de=0,he=ce.length;de<he;++de){var Oe=ce[de];if(fe(H,Oe.key))return Oe.value}return j}case x:{var kt=f(ne,A),ot=p(kt);if(K.mask&ot){K=K.children[g(K.mask,ot)],ne+=r;break}return j}case N:{if(K=K.children[f(ne,A)],K){ne+=r;break}return j}default:return j}};D.prototype.tryGetHash=function(j,A,H){return E(j,A,H,this)};var T=n.tryGet=function(j,A,H){return E(j,H._config.hash(A),A,H)};D.prototype.tryGet=function(j,A){return T(j,A,this)};var z=n.getHash=function(j,A,H){return E(void 0,j,A,H)};D.prototype.getHash=function(j,A){return z(j,A,this)},n.get=function(j,A){return E(void 0,A._config.hash(j),j,A)},D.prototype.get=function(j,A){return T(A,j,this)};var _=n.has=function(j,A,H){return E(s,j,A,H)!==s};D.prototype.hasHash=function(j,A){return _(j,A,this)};var ie=n.has=function(j,A){return _(A._config.hash(j),j,A)};D.prototype.has=function(j){return ie(j,this)};var ue=function(A,H){return A===H};n.make=function(j){return new D(0,0,{keyEq:j&&j.keyEq||ue,hash:j&&j.hash||c},M,0)},n.empty=n.make();var X=n.isEmpty=function(j){return j&&!!S(j._root)};D.prototype.isEmpty=function(){return X(this)};var me=n.modifyHash=function(j,A,H,q){var K={value:q._size},ne=q._root._modify(q._editable?q._edit:NaN,q._config.keyEq,0,j,A,H,K);return q.setTree(ne,K.value)};D.prototype.modifyHash=function(j,A,H){return me(H,j,A,this)};var Ie=n.modify=function(j,A,H){return me(j,H._config.hash(A),A,H)};D.prototype.modify=function(j,A){return Ie(A,j,this)};var ve=n.setHash=function(j,A,H,q){return me(u(H),j,A,q)};D.prototype.setHash=function(j,A,H){return ve(j,A,H,this)};var Ae=n.set=function(j,A,H){return ve(H._config.hash(j),j,A,H)};D.prototype.set=function(j,A){return Ae(j,A,this)};var ft=u(s),sn=n.removeHash=function(j,A,H){return me(ft,j,A,H)};D.prototype.removeHash=D.prototype.deleteHash=function(j,A){return sn(j,A,this)};var tt=n.remove=function(j,A){return sn(A._config.hash(j),j,A)};D.prototype.remove=D.prototype.delete=function(j){return tt(j,this)};var Je=n.beginMutation=function(j){return new D(j._editable+1,j._edit+1,j._config,j._root,j._size)};D.prototype.beginMutation=function(){return Je(this)};var ji=n.endMutation=function(j){return j._editable=j._editable&&j._editable-1,j};D.prototype.endMutation=function(){return ji(this)};var Xr=n.mutate=function(j,A){var H=Je(A);return j(H),ji(H)};D.prototype.mutate=function(j){return Xr(j,this)};var qr=function(A){return A&&vh(A[0],A[1],A[2],A[3],A[4])},vh=function(A,H,q,K,ne){for(;q<A;){var fe=H[q++];if(fe&&!S(fe))return yh(fe,K,[A,H,q,K,ne])}return qr(ne)},yh=function(A,H,q){switch(A.type){case y:return{value:H(A),rest:q};case b:case N:case x:var K=A.children;return vh(K.length,K,0,H,q);default:return qr(q)}},LN={done:!0};function pd(j){this.v=j}pd.prototype.next=function(){if(!this.v)return LN;var j=this.v;return this.v=qr(j.rest),j},pd.prototype[Symbol.iterator]=function(){return this};var md=function(A,H){return new pd(yh(A._root,H))},RN=function(A){return[A.key,A.value]},ON=n.entries=function(j){return md(j,RN)};D.prototype.entries=D.prototype[Symbol.iterator]=function(){return ON(this)};var kN=function(A){return A.key},zN=n.keys=function(j){return md(j,kN)};D.prototype.keys=function(){return zN(this)};var BN=function(A){return A.value},UN=n.values=D.prototype.values=function(j){return md(j,BN)};D.prototype.values=function(){return UN(this)};var Ih=n.fold=function(j,A,H){var q=H._root;if(q.type===y)return j(A,q.value,q.key);for(var K=[q.children],ne=void 0;ne=K.pop();)for(var fe=0,ce=ne.length;fe<ce;){var de=ne[fe++];de&&de.type&&(de.type===y?A=j(A,de.value,de.key):K.push(de.children))}return A};D.prototype.fold=function(j,A){return Ih(j,A,this)};var $N=n.forEach=function(j,A){return Ih(function(H,q,K){return j(q,K,A)},null,A)};D.prototype.forEach=function(j){return $N(j,this)};var _N=n.count=function(j){return j._size};D.prototype.count=function(){return _N(this)},Object.defineProperty(D.prototype,"size",{get:D.prototype.count}),e.exports?e.exports=n:(void 0).hamt=n});class fP{constructor(t){pe(this,"_map",void 0),this._map=new Map(t==null?void 0:t.entries())}keys(){return this._map.keys()}entries(){return this._map.entries()}get(t){return this._map.get(t)}has(t){return this._map.has(t)}set(t,n){return this._map.set(t,n),this}delete(t){return this._map.delete(t),this}clone(){return fg(this)}toMap(){return new Map(this._map)}}class dg{constructor(t){if(pe(this,"_hamt",dP.empty.beginMutation()),t instanceof dg){const n=t._hamt.endMutation();t._hamt=n.beginMutation(),this._hamt=n.beginMutation()}else if(t)for(const[n,r]of t.entries())this._hamt.set(n,r)}keys(){return this._hamt.keys()}entries(){return this._hamt.entries()}get(t){return this._hamt.get(t)}has(t){return this._hamt.has(t)}set(t,n){return this._hamt.set(t,n),this}delete(t){return this._hamt.delete(t),this}clone(){return fg(this)}toMap(){return new Map(this._hamt)}}function fg(e){return Ce("recoil_hamt_2020")?new dg(e):new fP(e)}var pP={persistentMap:fg},mP=pP.persistentMap,gP=Object.freeze({__proto__:null,persistentMap:mP});function hP(e,...t){const n=new Set;e:for(const r of e){for(const i of t)if(i.has(r))continue e;n.add(r)}return n}var Na=hP;function vP(e,t){const n=new Map;return e.forEach((r,i)=>{n.set(i,t(r,i))}),n}var Iu=vP;function yP(){return{nodeDeps:new Map,nodeToNodeSubscriptions:new Map}}function IP(e){return{nodeDeps:Iu(e.nodeDeps,t=>new Set(t)),nodeToNodeSubscriptions:Iu(e.nodeToNodeSubscriptions,t=>new Set(t))}}function Kd(e,t,n,r){const{nodeDeps:i,nodeToNodeSubscriptions:o}=n,a=i.get(e);if(a&&r&&a!==r.nodeDeps.get(e))return;i.set(e,t);const l=a==null?t:Na(t,a);for(const s of l)o.has(s)||o.set(s,new Set),Be(o.get(s)).add(e);if(a){const s=Na(a,t);for(const u of s){if(!o.has(u))return;const c=Be(o.get(u));c.delete(e),c.size===0&&o.delete(u)}}}function wP(e,t,n,r){var i,o,a,l;const s=n.getState();r===s.currentTree.version||r===((i=s.nextTree)===null||i===void 0?void 0:i.version)||((o=s.previousTree)===null||o===void 0||o.version);const u=n.getGraph(r);if(Kd(e,t,u),r===((a=s.previousTree)===null||a===void 0?void 0:a.version)){const d=n.getGraph(s.currentTree.version);Kd(e,t,d,u)}if(r===((l=s.previousTree)===null||l===void 0?void 0:l.version)||r===s.currentTree.version){var c;const d=(c=s.nextTree)===null||c===void 0?void 0:c.version;if(d!==void 0){const f=n.getGraph(d);Kd(e,t,f,u)}}}var Ml={cloneGraph:IP,graph:yP,saveDepsToStore:wP};let bP=0;const xP=()=>bP++;let MP=0;const SP=()=>MP++;let NP=0;const DP=()=>NP++;var xc={getNextTreeStateVersion:xP,getNextStoreID:SP,getNextComponentID:DP};const{persistentMap:$v}=gP,{graph:AP}=Ml,{getNextTreeStateVersion:Kb}=xc;function ex(){const e=Kb();return{version:e,stateID:e,transactionMetadata:{},dirtyAtoms:new Set,atomValues:$v(),nonvalidatedAtoms:$v()}}function CP(){const e=ex();return{currentTree:e,nextTree:null,previousTree:null,commitDepth:0,knownAtoms:new Set,knownSelectors:new Set,transactionSubscriptions:new Map,nodeTransactionSubscriptions:new Map,nodeToComponentSubscriptions:new Map,queuedComponentCallbacks_DEPRECATED:[],suspendedComponentResolvers:new Set,graphsByVersion:new Map().set(e.version,AP()),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map}}var tx={makeEmptyTreeState:ex,makeEmptyStoreState:CP,getNextTreeStateVersion:Kb};class nx{}function EP(){return new nx}var Mc={RetentionZone:nx,retentionZone:EP};function TP(e,t){const n=new Set(e);return n.add(t),n}function jP(e,t){const n=new Set(e);return n.delete(t),n}function PP(e,t,n){const r=new Map(e);return r.set(t,n),r}function LP(e,t,n){const r=new Map(e);return r.set(t,n(r.get(t))),r}function RP(e,t){const n=new Map(e);return n.delete(t),n}function OP(e,t){const n=new Map(e);return t.forEach(r=>n.delete(r)),n}var rx={setByAddingToSet:TP,setByDeletingFromSet:jP,mapBySettingInMap:PP,mapByUpdatingInMap:LP,mapByDeletingFromMap:RP,mapByDeletingMultipleFromMap:OP};function*kP(e,t){let n=0;for(const r of e)t(r,n++)&&(yield r)}var pg=kP;function zP(e,t){return new Proxy(e,{get:(r,i)=>(!(i in r)&&i in t&&(r[i]=t[i]()),r[i]),ownKeys:r=>Object.keys(r)})}var ix=zP;const{getNode:Sl,getNodeMaybe:BP,recoilValuesForKeys:_v}=Vt,{RetentionZone:Fv}=Mc,{setByAddingToSet:UP}=rx,$P=Object.freeze(new Set);class _P extends Error{}function FP(e,t,n){if(!Ce("recoil_memory_managament_2020"))return()=>{};const{nodesRetainedByZone:r}=e.getState().retention;function i(o){let a=r.get(o);a||r.set(o,a=new Set),a.add(t)}if(n instanceof Fv)i(n);else if(Array.isArray(n))for(const o of n)i(o);return()=>{if(!Ce("recoil_memory_managament_2020"))return;const{retention:o}=e.getState();function a(l){const s=o.nodesRetainedByZone.get(l);s==null||s.delete(t),s&&s.size===0&&o.nodesRetainedByZone.delete(l)}if(n instanceof Fv)a(n);else if(Array.isArray(n))for(const l of n)a(l)}}function mg(e,t,n,r){const i=e.getState();if(i.nodeCleanupFunctions.has(n))return;const o=Sl(n),a=FP(e,n,o.retainedBy),l=o.init(e,t,r);i.nodeCleanupFunctions.set(n,()=>{l(),a()})}function HP(e,t,n){mg(e,e.getState().currentTree,t,n)}function WP(e,t){var n;const r=e.getState();(n=r.nodeCleanupFunctions.get(t))===null||n===void 0||n(),r.nodeCleanupFunctions.delete(t)}function GP(e,t,n){return mg(e,t,n,"get"),Sl(n).get(e,t)}function ox(e,t,n){return Sl(n).peek(e,t)}function VP(e,t,n){var r;const i=BP(t);return i==null||(r=i.invalidate)===null||r===void 0||r.call(i,e),{...e,atomValues:e.atomValues.clone().delete(t),nonvalidatedAtoms:e.nonvalidatedAtoms.clone().set(t,n),dirtyAtoms:UP(e.dirtyAtoms,t)}}function ZP(e,t,n,r){const i=Sl(n);if(i.set==null)throw new _P(`Attempt to set read-only RecoilValue: ${n}`);const o=i.set;return mg(e,t,n,"set"),o(e,t,r)}function YP(e,t,n){const r=e.getState(),i=e.getGraph(t.version),o=Sl(n).nodeType;return ix({type:o},{loadable:()=>ox(e,t,n),isActive:()=>r.knownAtoms.has(n)||r.knownSelectors.has(n),isSet:()=>o==="selector"?!1:t.atomValues.has(n),isModified:()=>t.dirtyAtoms.has(n),deps:()=>{var a;return _v((a=i.nodeDeps.get(n))!==null&&a!==void 0?a:[])},subscribers:()=>{var a,l;return{nodes:_v(pg(ax(e,t,new Set([n])),s=>s!==n)),components:bc((a=(l=r.nodeToComponentSubscriptions.get(n))===null||l===void 0?void 0:l.values())!==null&&a!==void 0?a:[],([s])=>({name:s}))}}})}function ax(e,t,n){const r=new Set,i=Array.from(n),o=e.getGraph(t.version);for(let l=i.pop();l;l=i.pop()){var a;r.add(l);const s=(a=o.nodeToNodeSubscriptions.get(l))!==null&&a!==void 0?a:$P;for(const u of s)r.has(u)||i.push(u)}return r}var Yr={getNodeLoadable:GP,peekNodeLoadable:ox,setNodeValue:ZP,initializeNode:HP,cleanUpNode:WP,setUnvalidatedAtomValue_DEPRECATED:VP,peekNodeInfo:YP,getDownstreamNodes:ax};let lx=null;function QP(e){lx=e}function JP(){var e;(e=lx)===null||e===void 0||e()}var sx={setInvalidateMemoizedSnapshot:QP,invalidateMemoizedSnapshot:JP};const{getDownstreamNodes:XP,getNodeLoadable:ux,setNodeValue:qP}=Yr,{getNextComponentID:KP}=xc,{getNode:eL,getNodeMaybe:cx}=Vt,{DefaultValue:gg}=Vt,{reactMode:tL}=xl,{AbstractRecoilValue:nL,RecoilState:rL,RecoilValueReadOnly:iL,isRecoilValue:oL}=yo,{invalidateMemoizedSnapshot:aL}=sx;function lL(e,{key:t},n=e.getState().currentTree){var r,i;const o=e.getState();n.version===o.currentTree.version||n.version===((r=o.nextTree)===null||r===void 0?void 0:r.version)||(n.version,(i=o.previousTree)===null||i===void 0||i.version);const a=ux(e,n,t);return a.state==="loading"&&a.contents.catch(()=>{}),a}function sL(e,t){const n=e.clone();return t.forEach((r,i)=>{r.state==="hasValue"&&r.contents instanceof gg?n.delete(i):n.set(i,r)}),n}function uL(e,t,{key:n},r){if(typeof r=="function"){const i=ux(e,t,n);if(i.state==="loading"){const o=`Tried to set atom or selector "${n}" using an updater function while the current state is pending, this is not currently supported.`;throw ge(o)}else if(i.state==="hasError")throw i.contents;return r(i.contents)}else return r}function cL(e,t,n){if(n.type==="set"){const{recoilValue:i,valueOrUpdater:o}=n,a=uL(e,t,i,o),l=qP(e,t,i.key,a);for(const[s,u]of l.entries())Ep(t,s,u)}else if(n.type==="setLoadable"){const{recoilValue:{key:i},loadable:o}=n;Ep(t,i,o)}else if(n.type==="markModified"){const{recoilValue:{key:i}}=n;t.dirtyAtoms.add(i)}else if(n.type==="setUnvalidated"){var r;const{recoilValue:{key:i},unvalidatedValue:o}=n,a=cx(i);a==null||(r=a.invalidate)===null||r===void 0||r.call(a,t),t.atomValues.delete(i),t.nonvalidatedAtoms.set(i,o),t.dirtyAtoms.add(i)}else sg(`Unknown action ${n.type}`)}function Ep(e,t,n){n.state==="hasValue"&&n.contents instanceof gg?e.atomValues.delete(t):e.atomValues.set(t,n),e.dirtyAtoms.add(t),e.nonvalidatedAtoms.delete(t)}function dx(e,t){e.replaceState(n=>{const r=fx(n);for(const i of t)cL(e,r,i);return px(e,r),aL(),r})}function Sc(e,t){if(Da.length){const n=Da[Da.length-1];let r=n.get(e);r||n.set(e,r=[]),r.push(t)}else dx(e,[t])}const Da=[];function dL(){const e=new Map;return Da.push(e),()=>{for(const[t,n]of e)dx(t,n);Da.pop()}}function fx(e){return{...e,atomValues:e.atomValues.clone(),nonvalidatedAtoms:e.nonvalidatedAtoms.clone(),dirtyAtoms:new Set(e.dirtyAtoms)}}function px(e,t){const n=XP(e,t,t.dirtyAtoms);for(const o of n){var r,i;(r=cx(o))===null||r===void 0||(i=r.invalidate)===null||i===void 0||i.call(r,t)}}function mx(e,t,n){Sc(e,{type:"set",recoilValue:t,valueOrUpdater:n})}function fL(e,t,n){if(n instanceof gg)return mx(e,t,n);Sc(e,{type:"setLoadable",recoilValue:t,loadable:n})}function pL(e,t){Sc(e,{type:"markModified",recoilValue:t})}function mL(e,t,n){Sc(e,{type:"setUnvalidated",recoilValue:t,unvalidatedValue:n})}function gL(e,{key:t},n,r=null){const i=KP(),o=e.getState();o.nodeToComponentSubscriptions.has(t)||o.nodeToComponentSubscriptions.set(t,new Map),Be(o.nodeToComponentSubscriptions.get(t)).set(i,[r??"<not captured>",n]);const a=tL();if(a.early&&(a.mode==="LEGACY"||a.mode==="MUTABLE_SOURCE")){const l=e.getState().nextTree;l&&l.dirtyAtoms.has(t)&&n(l)}return{release:()=>{const l=e.getState(),s=l.nodeToComponentSubscriptions.get(t);s===void 0||!s.has(i)||(s.delete(i),s.size===0&&l.nodeToComponentSubscriptions.delete(t))}}}function hL(e,t){var n;const{currentTree:r}=e.getState(),i=eL(t.key);(n=i.clearCache)===null||n===void 0||n.call(i,e,r)}var Qn={RecoilValueReadOnly:iL,AbstractRecoilValue:nL,RecoilState:rL,getRecoilValueAsLoadable:lL,setRecoilValue:mx,setRecoilValueLoadable:fL,markRecoilValueModified:pL,setUnvalidatedRecoilValue:mL,subscribeToRecoilValue:gL,isRecoilValue:oL,applyAtomValueWrites:sL,batchStart:dL,writeLoadableToTreeState:Ep,invalidateDownstreams:px,copyTreeState:fx,refreshRecoilValue:hL};function vL(e,t,n){const r=e.entries();let i=r.next();for(;!i.done;){const o=i.value;if(t.call(n,o[1],o[0],e))return!0;i=r.next()}return!1}var yL=vL;const{cleanUpNode:IL}=Yr,{deleteNodeConfigIfPossible:wL,getNode:gx}=Vt,{RetentionZone:hx}=Mc,bL=12e4,vx=new Set;function yx(e,t){const n=e.getState(),r=n.currentTree;if(n.nextTree)return;const i=new Set;for(const a of t)if(a instanceof hx)for(const l of NL(n,a))i.add(l);else i.add(a);const o=xL(e,i);for(const a of o)SL(e,r,a)}function xL(e,t){const n=e.getState(),r=n.currentTree,i=e.getGraph(r.version),o=new Set,a=new Set;return l(t),o;function l(s){const u=new Set,c=ML(e,r,s,o,a);for(const g of c){var d;if(gx(g).retainedBy==="recoilRoot"){a.add(g);continue}if(((d=n.retention.referenceCounts.get(g))!==null&&d!==void 0?d:0)>0){a.add(g);continue}if(Ix(g).some(w=>n.retention.referenceCounts.get(w))){a.add(g);continue}const h=i.nodeToNodeSubscriptions.get(g);if(h&&yL(h,w=>a.has(w))){a.add(g);continue}o.add(g),u.add(g)}const f=new Set;for(const g of u)for(const h of(p=i.nodeDeps.get(g))!==null&&p!==void 0?p:vx){var p;o.has(h)||f.add(h)}f.size&&l(f)}}function ML(e,t,n,r,i){const o=e.getGraph(t.version),a=[],l=new Set;for(;n.size>0;)s(Be(n.values().next().value));return a;function s(u){if(r.has(u)||i.has(u)){n.delete(u);return}if(l.has(u))return;const c=o.nodeToNodeSubscriptions.get(u);if(c)for(const d of c)s(d);l.add(u),n.delete(u),a.push(u)}}function SL(e,t,n){if(!Ce("recoil_memory_managament_2020"))return;IL(e,n);const r=e.getState();r.knownAtoms.delete(n),r.knownSelectors.delete(n),r.nodeTransactionSubscriptions.delete(n),r.retention.referenceCounts.delete(n);const i=Ix(n);for(const s of i){var o;(o=r.retention.nodesRetainedByZone.get(s))===null||o===void 0||o.delete(n)}t.atomValues.delete(n),t.dirtyAtoms.delete(n),t.nonvalidatedAtoms.delete(n);const a=r.graphsByVersion.get(t.version);if(a){const s=a.nodeDeps.get(n);if(s!==void 0){a.nodeDeps.delete(n);for(const u of s){var l;(l=a.nodeToNodeSubscriptions.get(u))===null||l===void 0||l.delete(n)}}a.nodeToNodeSubscriptions.delete(n)}wL(n)}function NL(e,t){var n;return(n=e.retention.nodesRetainedByZone.get(t))!==null&&n!==void 0?n:vx}function Ix(e){const t=gx(e).retainedBy;return t===void 0||t==="components"||t==="recoilRoot"?[]:t instanceof hx?[t]:t}function DL(e,t){const n=e.getState();n.nextTree?n.retention.retainablesToCheckForRelease.add(t):yx(e,new Set([t]))}function AL(e,t,n){var r;if(!Ce("recoil_memory_managament_2020"))return;const i=e.getState().retention.referenceCounts,o=((r=i.get(t))!==null&&r!==void 0?r:0)+n;o===0?wx(e,t):i.set(t,o)}function wx(e,t){if(!Ce("recoil_memory_managament_2020"))return;e.getState().retention.referenceCounts.delete(t),DL(e,t)}function CL(e){if(!Ce("recoil_memory_managament_2020"))return;const t=e.getState();yx(e,t.retention.retainablesToCheckForRelease),t.retention.retainablesToCheckForRelease.clear()}function EL(e){return e===void 0?"recoilRoot":e}var Ei={SUSPENSE_TIMEOUT_MS:bL,updateRetainCount:AL,updateRetainCountToZero:wx,releaseScheduledRetainablesNow:CL,retainedByOptionWithDefault:EL};const{unstable_batchedUpdates:TL}=lb;var jL={unstable_batchedUpdates:TL};const{unstable_batchedUpdates:PL}=jL;var LL={unstable_batchedUpdates:PL};const{batchStart:RL}=Qn,{unstable_batchedUpdates:OL}=LL;let hg=OL||(e=>e());const kL=e=>{hg=e},zL=()=>hg,BL=e=>{hg(()=>{let t=()=>{};try{t=RL(),e()}finally{t()}})};var Nc={getBatcher:zL,setBatcher:kL,batchUpdates:BL};function*UL(e){for(const t of e)for(const n of t)yield n}var bx=UL;const xx=typeof Window>"u"||typeof window>"u",$L=e=>!xx&&(e===window||e instanceof Window),_L=typeof navigator<"u"&&navigator.product==="ReactNative";var Dc={isSSR:xx,isReactNative:_L,isWindow:$L};function FL(e,t){let n;return(...r)=>{n||(n={});const i=t(...r);return Object.hasOwnProperty.call(n,i)||(n[i]=e(...r)),n[i]}}function HL(e,t){let n,r;return(...i)=>{const o=t(...i);return n===o||(n=o,r=e(...i)),r}}function WL(e,t){let n,r;return[(...a)=>{const l=t(...a);return n===l||(n=l,r=e(...a)),r},()=>{n=null}]}var GL={memoizeWithArgsHash:FL,memoizeOneWithArgsHash:HL,memoizeOneWithArgsHashAndInvalidation:WL};const{batchUpdates:Tp}=Nc,{initializeNode:VL,peekNodeInfo:ZL}=Yr,{graph:YL}=Ml,{getNextStoreID:QL}=xc,{DEFAULT_VALUE:JL,recoilValues:Hv,recoilValuesForKeys:Wv}=Vt,{AbstractRecoilValue:XL,getRecoilValueAsLoadable:qL,setRecoilValue:Gv,setUnvalidatedRecoilValue:KL}=Qn,{updateRetainCount:Bs}=Ei,{setInvalidateMemoizedSnapshot:eR}=sx,{getNextTreeStateVersion:tR,makeEmptyStoreState:nR}=tx,{isSSR:rR}=Dc,{memoizeOneWithArgsHashAndInvalidation:iR}=GL;class Ac{constructor(t,n){pe(this,"_store",void 0),pe(this,"_refCount",1),pe(this,"getLoadable",r=>(this.checkRefCount_INTERNAL(),qL(this._store,r))),pe(this,"getPromise",r=>(this.checkRefCount_INTERNAL(),this.getLoadable(r).toPromise())),pe(this,"getNodes_UNSTABLE",r=>{if(this.checkRefCount_INTERNAL(),(r==null?void 0:r.isModified)===!0){if((r==null?void 0:r.isInitialized)===!1)return[];const a=this._store.getState().currentTree;return Wv(a.dirtyAtoms)}const i=this._store.getState().knownAtoms,o=this._store.getState().knownSelectors;return(r==null?void 0:r.isInitialized)==null?Hv.values():r.isInitialized===!0?Wv(bx([i,o])):pg(Hv.values(),({key:a})=>!i.has(a)&&!o.has(a))}),pe(this,"getInfo_UNSTABLE",({key:r})=>(this.checkRefCount_INTERNAL(),ZL(this._store,this._store.getState().currentTree,r))),pe(this,"map",r=>{this.checkRefCount_INTERNAL();const i=new jp(this,Tp);return r(i),i}),pe(this,"asyncMap",async r=>{this.checkRefCount_INTERNAL();const i=new jp(this,Tp);return i.retain(),await r(i),i.autoRelease_INTERNAL(),i}),this._store={storeID:QL(),parentStoreID:n,getState:()=>t,replaceState:r=>{t.currentTree=r(t.currentTree)},getGraph:r=>{const i=t.graphsByVersion;if(i.has(r))return Be(i.get(r));const o=YL();return i.set(r,o),o},subscribeToTransactions:()=>({release:()=>{}}),addTransactionMetadata:()=>{throw ge("Cannot subscribe to Snapshots")}};for(const r of this._store.getState().knownAtoms)VL(this._store,r,"get"),Bs(this._store,r,1);this.autoRelease_INTERNAL()}retain(){this._refCount<=0,this._refCount++;let t=!1;return()=>{t||(t=!0,this._release())}}autoRelease_INTERNAL(){rR||window.setTimeout(()=>this._release(),10)}_release(){if(this._refCount--,this._refCount===0){if(this._store.getState().nodeCleanupFunctions.forEach(t=>t()),this._store.getState().nodeCleanupFunctions.clear(),!Ce("recoil_memory_managament_2020"))return}else this._refCount<0}isRetained(){return this._refCount>0}checkRefCount_INTERNAL(){Ce("recoil_memory_managament_2020")&&this._refCount<=0}getStore_INTERNAL(){return this.checkRefCount_INTERNAL(),this._store}getID(){return this.checkRefCount_INTERNAL(),this._store.getState().currentTree.stateID}getStoreID(){return this.checkRefCount_INTERNAL(),this._store.storeID}}function Mx(e,t,n=!1){const r=e.getState(),i=n?tR():t.version;return{currentTree:{version:n?i:t.version,stateID:n?i:t.stateID,transactionMetadata:{...t.transactionMetadata},dirtyAtoms:new Set(t.dirtyAtoms),atomValues:t.atomValues.clone(),nonvalidatedAtoms:t.nonvalidatedAtoms.clone()},commitDepth:0,nextTree:null,previousTree:null,knownAtoms:new Set(r.knownAtoms),knownSelectors:new Set(r.knownSelectors),transactionSubscriptions:new Map,nodeTransactionSubscriptions:new Map,nodeToComponentSubscriptions:new Map,queuedComponentCallbacks_DEPRECATED:[],suspendedComponentResolvers:new Set,graphsByVersion:new Map().set(i,e.getGraph(t.version)),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map(bc(r.nodeCleanupFunctions.entries(),([o])=>[o,()=>{}]))}}function oR(e){const t=new Ac(nR());return e!=null?t.map(e):t}const[Vv,Sx]=iR((e,t)=>{var n;const r=e.getState(),i=t==="latest"?(n=r.nextTree)!==null&&n!==void 0?n:r.currentTree:Be(r.previousTree);return new Ac(Mx(e,i),e.storeID)},(e,t)=>{var n,r;return String(t)+String(e.storeID)+String((n=e.getState().nextTree)===null||n===void 0?void 0:n.version)+String(e.getState().currentTree.version)+String((r=e.getState().previousTree)===null||r===void 0?void 0:r.version)});eR(Sx);function aR(e,t="latest"){const n=Vv(e,t);return n.isRetained()?n:(Sx(),Vv(e,t))}class jp extends Ac{constructor(t,n){super(Mx(t.getStore_INTERNAL(),t.getStore_INTERNAL().getState().currentTree,!0),t.getStoreID()),pe(this,"_batch",void 0),pe(this,"set",(r,i)=>{this.checkRefCount_INTERNAL();const o=this.getStore_INTERNAL();this._batch(()=>{Bs(o,r.key,1),Gv(this.getStore_INTERNAL(),r,i)})}),pe(this,"reset",r=>{this.checkRefCount_INTERNAL();const i=this.getStore_INTERNAL();this._batch(()=>{Bs(i,r.key,1),Gv(this.getStore_INTERNAL(),r,JL)})}),pe(this,"setUnvalidatedAtomValues_DEPRECATED",r=>{this.checkRefCount_INTERNAL();const i=this.getStore_INTERNAL();Tp(()=>{for(const[o,a]of r.entries())Bs(i,o,1),KL(i,new XL(o),a)})}),this._batch=n}}var Cc={Snapshot:Ac,MutableSnapshot:jp,freshSnapshot:oR,cloneSnapshot:aR},lR=Cc.Snapshot,sR=Cc.MutableSnapshot,uR=Cc.freshSnapshot,cR=Cc.cloneSnapshot,Ec=Object.freeze({__proto__:null,Snapshot:lR,MutableSnapshot:sR,freshSnapshot:uR,cloneSnapshot:cR});function dR(...e){const t=new Set;for(const n of e)for(const r of n)t.add(r);return t}var fR=dR;const{useRef:pR}=k;function mR(e){const t=pR(e);return t.current===e&&typeof e=="function"&&(t.current=e()),t}var Zv=mR;const{getNextTreeStateVersion:gR,makeEmptyStoreState:Nx}=tx,{cleanUpNode:hR,getDownstreamNodes:vR,initializeNode:yR,setNodeValue:IR,setUnvalidatedAtomValue_DEPRECATED:wR}=Yr,{graph:bR}=Ml,{cloneGraph:xR}=Ml,{getNextStoreID:Dx}=xc,{createMutableSource:ef,reactMode:Ax}=xl,{applyAtomValueWrites:MR}=Qn,{releaseScheduledRetainablesNow:Cx}=Ei,{freshSnapshot:SR}=Ec,{useCallback:NR,useContext:Ex,useEffect:Pp,useMemo:DR,useRef:AR,useState:CR}=k;function Jo(){throw ge("This component must be used inside a <RecoilRoot> component.")}const Tx=Object.freeze({storeID:Dx(),getState:Jo,replaceState:Jo,getGraph:Jo,subscribeToTransactions:Jo,addTransactionMetadata:Jo});let Lp=!1;function Yv(e){if(Lp)throw ge("An atom update was triggered within the execution of a state updater function. State updater functions provided to Recoil must be pure functions.");const t=e.getState();if(t.nextTree===null){Ce("recoil_memory_managament_2020")&&Ce("recoil_release_on_cascading_update_killswitch_2021")&&t.commitDepth>0&&Cx(e);const n=t.currentTree.version,r=gR();t.nextTree={...t.currentTree,version:r,stateID:r,dirtyAtoms:new Set,transactionMetadata:{}},t.graphsByVersion.set(r,xR(Be(t.graphsByVersion.get(n))))}}const jx=k.createContext({current:Tx}),Tc=()=>Ex(jx),Px=k.createContext(null);function ER(){return Ex(Px)}function vg(e,t,n){const r=vR(e,n,n.dirtyAtoms);for(const i of r){const o=t.nodeToComponentSubscriptions.get(i);if(o)for(const[a,[l,s]]of o)s(n)}}function Lx(e){const t=e.getState(),n=t.currentTree,r=n.dirtyAtoms;if(r.size){for(const[i,o]of t.nodeTransactionSubscriptions)if(r.has(i))for(const[a,l]of o)l(e);for(const[i,o]of t.transactionSubscriptions)o(e);(!Ax().early||t.suspendedComponentResolvers.size>0)&&(vg(e,t,n),t.suspendedComponentResolvers.forEach(i=>i()),t.suspendedComponentResolvers.clear())}t.queuedComponentCallbacks_DEPRECATED.forEach(i=>i(n)),t.queuedComponentCallbacks_DEPRECATED.splice(0,t.queuedComponentCallbacks_DEPRECATED.length)}function TR(e){const t=e.getState();t.commitDepth++;try{const{nextTree:n}=t;if(n==null)return;t.previousTree=t.currentTree,t.currentTree=n,t.nextTree=null,Lx(e),t.previousTree!=null?t.graphsByVersion.delete(t.previousTree.version):sg("Ended batch with no previous state, which is unexpected","recoil"),t.previousTree=null,Ce("recoil_memory_managament_2020")&&n==null&&Cx(e)}finally{t.commitDepth--}}function jR({setNotifyBatcherOfChange:e}){const t=Tc(),[,n]=CR([]);return e(()=>n({})),Pp(()=>(e(()=>n({})),()=>{e(()=>{})}),[e]),Pp(()=>{uP.enqueueExecution("Batcher",()=>{TR(t.current)})}),null}function PR(e,t){const n=Nx();return t({set:(r,i)=>{const o=n.currentTree,a=IR(e,o,r.key,i),l=new Set(a.keys()),s=o.nonvalidatedAtoms.clone();for(const u of l)s.delete(u);n.currentTree={...o,dirtyAtoms:fR(o.dirtyAtoms,l),atomValues:MR(o.atomValues,a),nonvalidatedAtoms:s}},setUnvalidatedAtomValues:r=>{r.forEach((i,o)=>{n.currentTree=wR(n.currentTree,o,i)})}}),n}function LR(e){const t=SR(e),n=t.getStore_INTERNAL().getState();return t.retain(),n.nodeCleanupFunctions.forEach(r=>r()),n.nodeCleanupFunctions.clear(),n}let Qv=0;function RR({initializeState_DEPRECATED:e,initializeState:t,store_INTERNAL:n,children:r}){let i;const o=p=>{const g=i.current.graphsByVersion;if(g.has(p))return Be(g.get(p));const h=bR();return g.set(p,h),h},a=(p,g)=>{if(g==null){const{transactionSubscriptions:h}=d.current.getState(),w=Qv++;return h.set(w,p),{release:()=>{h.delete(w)}}}else{const{nodeTransactionSubscriptions:h}=d.current.getState();h.has(g)||h.set(g,new Map);const w=Qv++;return Be(h.get(g)).set(w,p),{release:()=>{const I=h.get(g);I&&(I.delete(w),I.size===0&&h.delete(g))}}}},l=p=>{Yv(d.current);for(const g of Object.keys(p))Be(d.current.getState().nextTree).transactionMetadata[g]=p[g]},s=p=>{Yv(d.current);const g=Be(i.current.nextTree);let h;try{Lp=!0,h=p(g)}finally{Lp=!1}h!==g&&(i.current.nextTree=h,Ax().early&&vg(d.current,i.current,h),Be(u.current)())},u=AR(null),c=NR(p=>{u.current=p},[u]),d=Zv(()=>n??{storeID:Dx(),getState:()=>i.current,replaceState:s,getGraph:o,subscribeToTransactions:a,addTransactionMetadata:l});n!=null&&(d.current=n),i=Zv(()=>e!=null?PR(d.current,e):t!=null?LR(t):Nx());const f=DR(()=>ef==null?void 0:ef(i,()=>i.current.currentTree.version),[i]);return Pp(()=>{const p=d.current;for(const g of new Set(p.getState().knownAtoms))yR(p,g,"get");return()=>{for(const g of p.getState().knownAtoms)hR(p,g)}},[d]),k.createElement(jx.Provider,{value:d},k.createElement(Px.Provider,{value:f},k.createElement(jR,{setNotifyBatcherOfChange:c}),r))}function OR(e){const{override:t,...n}=e,r=Tc();return t===!1&&r.current!==Tx?e.children:k.createElement(RR,n)}function kR(){return Tc().current.storeID}var fr={RecoilRoot:OR,useStoreRef:Tc,useRecoilMutableSource:ER,useRecoilStoreID:kR,notifyComponents_FOR_TESTING:vg,sendEndOfBatchNotifications_FOR_TESTING:Lx};function zR(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n++)if(e[n]!==t[n])return!1;return!0}var BR=zR;const{useEffect:UR,useRef:$R}=k;function _R(e){const t=$R();return UR(()=>{t.current=e}),t.current}var Rx=_R;const{useStoreRef:FR}=fr,{SUSPENSE_TIMEOUT_MS:HR}=Ei,{updateRetainCount:Xo}=Ei,{RetentionZone:WR}=Mc,{useEffect:GR,useRef:VR}=k,{isSSR:Jv}=Dc;function ZR(e){if(Ce("recoil_memory_managament_2020"))return YR(e)}function YR(e){const n=(Array.isArray(e)?e:[e]).map(a=>a instanceof WR?a:a.key),r=FR();GR(()=>{if(!Ce("recoil_memory_managament_2020"))return;const a=r.current;if(i.current&&!Jv)window.clearTimeout(i.current),i.current=null;else for(const l of n)Xo(a,l,1);return()=>{for(const l of n)Xo(a,l,-1)}},[r,...n]);const i=VR(),o=Rx(n);if(!Jv&&(o===void 0||!BR(o,n))){const a=r.current;for(const l of n)Xo(a,l,1);if(o)for(const l of o)Xo(a,l,-1);i.current&&window.clearTimeout(i.current),i.current=window.setTimeout(()=>{i.current=null;for(const l of n)Xo(a,l,-1)},HR)}}var yg=ZR;function QR(){return"<component name not available>"}var Nl=QR;const{batchUpdates:JR}=Nc,{DEFAULT_VALUE:Ox}=Vt,{currentRendererSupportsUseSyncExternalStore:XR,reactMode:Lo,useMutableSource:qR,useSyncExternalStore:KR}=xl,{useRecoilMutableSource:eO,useStoreRef:Jn}=fr,{AbstractRecoilValue:Rp,getRecoilValueAsLoadable:Dl,setRecoilValue:wu,setUnvalidatedRecoilValue:tO,subscribeToRecoilValue:Io}=Qn,{useCallback:Wt,useEffect:wo,useMemo:kx,useRef:Aa,useState:Ig}=k,{setByAddingToSet:nO}=rx,{isSSR:rO}=Dc;function wg(e,t,n){if(e.state==="hasValue")return e.contents;throw e.state==="loading"?new Promise(i=>{const o=n.current.getState().suspendedComponentResolvers;o.add(i),rO&&Le(e.contents)&&e.contents.finally(()=>{o.delete(i)})}):e.state==="hasError"?e.contents:ge(`Invalid value of loadable atom "${t.key}"`)}function iO(){const e=Nl(),t=Jn(),[,n]=Ig([]),r=Aa(new Set);r.current=new Set;const i=Aa(new Set),o=Aa(new Map),a=Wt(s=>{const u=o.current.get(s);u&&(u.release(),o.current.delete(s))},[o]),l=Wt((s,u)=>{o.current.has(u)&&n([])},[]);return wo(()=>{const s=t.current;Na(r.current,i.current).forEach(u=>{if(o.current.has(u))return;const c=Io(s,new Rp(u),f=>l(f,u),e);o.current.set(u,c),s.getState().nextTree?s.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{l(s.getState(),u)}):l(s.getState(),u)}),Na(i.current,r.current).forEach(u=>{a(u)}),i.current=r.current}),wo(()=>{const s=o.current;return Na(r.current,new Set(s.keys())).forEach(u=>{const c=Io(t.current,new Rp(u),d=>l(d,u),e);s.set(u,c)}),()=>s.forEach((u,c)=>a(c))},[e,t,a,l]),kx(()=>{function s(g){return h=>{wu(t.current,g,h)}}function u(g){return()=>wu(t.current,g,Ox)}function c(g){var h;r.current.has(g.key)||(r.current=nO(r.current,g.key));const w=t.current.getState();return Dl(t.current,g,Lo().early&&(h=w.nextTree)!==null&&h!==void 0?h:w.currentTree)}function d(g){const h=c(g);return wg(h,g,t)}function f(g){return[d(g),s(g)]}function p(g){return[c(g),s(g)]}return{getRecoilValue:d,getRecoilValueLoadable:c,getRecoilState:f,getRecoilStateLoadable:p,getSetRecoilState:s,getResetRecoilState:u}},[r,t])}const oO={current:0};function aO(e){const t=Jn(),n=Nl(),r=Wt(()=>{var l;const s=t.current,u=s.getState(),c=Lo().early&&(l=u.nextTree)!==null&&l!==void 0?l:u.currentTree;return{loadable:Dl(s,e,c),key:e.key}},[t,e]),i=Wt(l=>{let s;return()=>{var u,c;const d=l();return(u=s)!==null&&u!==void 0&&u.loadable.is(d.loadable)&&((c=s)===null||c===void 0?void 0:c.key)===d.key?s:(s=d,d)}},[]),o=kx(()=>i(r),[r,i]),a=Wt(l=>{const s=t.current;return Io(s,e,l,n).release},[t,e,n]);return KR(a,o,o).loadable}function lO(e){const t=Jn(),n=Wt(()=>{var u;const c=t.current,d=c.getState(),f=Lo().early&&(u=d.nextTree)!==null&&u!==void 0?u:d.currentTree;return Dl(c,e,f)},[t,e]),r=Wt(()=>n(),[n]),i=Nl(),o=Wt((u,c)=>{const d=t.current;return Io(d,e,()=>{if(!Ce("recoil_suppress_rerender_in_callback"))return c();const p=n();s.current.is(p)||c(),s.current=p},i).release},[t,e,i,n]),a=eO();if(a==null)throw ge("Recoil hooks must be used in components contained within a <RecoilRoot> component.");const l=qR(a,r,o),s=Aa(l);return wo(()=>{s.current=l}),l}function Op(e){const t=Jn(),n=Nl(),r=Wt(()=>{var s;const u=t.current,c=u.getState(),d=Lo().early&&(s=c.nextTree)!==null&&s!==void 0?s:c.currentTree;return Dl(u,e,d)},[t,e]),i=Wt(()=>({loadable:r(),key:e.key}),[r,e.key]),o=Wt(s=>{const u=i();return s.loadable.is(u.loadable)&&s.key===u.key?s:u},[i]);wo(()=>{const s=Io(t.current,e,u=>{l(o)},n);return l(o),s.release},[n,e,t,o]);const[a,l]=Ig(i);return a.key!==e.key?i().loadable:a.loadable}function sO(e){const t=Jn(),[,n]=Ig([]),r=Nl(),i=Wt(()=>{var l;const s=t.current,u=s.getState(),c=Lo().early&&(l=u.nextTree)!==null&&l!==void 0?l:u.currentTree;return Dl(s,e,c)},[t,e]),o=i(),a=Aa(o);return wo(()=>{a.current=o}),wo(()=>{const l=t.current,s=l.getState(),u=Io(l,e,d=>{var f;if(!Ce("recoil_suppress_rerender_in_callback"))return n([]);const p=i();(f=a.current)!==null&&f!==void 0&&f.is(p)||n(p),a.current=p},r);if(s.nextTree)l.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{a.current=null,n([])});else{var c;if(!Ce("recoil_suppress_rerender_in_callback"))return n([]);const d=i();(c=a.current)!==null&&c!==void 0&&c.is(d)||n(d),a.current=d}return u.release},[r,i,e,t]),o}function bg(e){return Ce("recoil_memory_managament_2020")&&yg(e),{TRANSITION_SUPPORT:Op,SYNC_EXTERNAL_STORE:XR()?aO:Op,MUTABLE_SOURCE:lO,LEGACY:sO}[Lo().mode](e)}function zx(e){const t=Jn(),n=bg(e);return wg(n,e,t)}function jc(e){const t=Jn();return Wt(n=>{wu(t.current,e,n)},[t,e])}function uO(e){const t=Jn();return Wt(()=>{wu(t.current,e,Ox)},[t,e])}function cO(e){return[zx(e),jc(e)]}function dO(e){return[bg(e),jc(e)]}function fO(){const e=Jn();return(t,n={})=>{JR(()=>{e.current.addTransactionMetadata(n),t.forEach((r,i)=>tO(e.current,new Rp(i),r))})}}function Bx(e){return Ce("recoil_memory_managament_2020")&&yg(e),Op(e)}function Ux(e){const t=Jn(),n=Bx(e);return wg(n,e,t)}function pO(e){return[Ux(e),jc(e)]}var mO={recoilComponentGetRecoilValueCount_FOR_TESTING:oO,useRecoilInterface:iO,useRecoilState:cO,useRecoilStateLoadable:dO,useRecoilValue:zx,useRecoilValueLoadable:bg,useResetRecoilState:uO,useSetRecoilState:jc,useSetUnvalidatedAtomValues:fO,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:Bx,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:Ux,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:pO};function gO(e,t){const n=new Map;for(const[r,i]of e)t(i,r)&&n.set(r,i);return n}var hO=gO;function vO(e,t){const n=new Set;for(const r of e)t(r)&&n.add(r);return n}var yO=vO;function IO(...e){const t=new Map;for(let n=0;n<e.length;n++){const r=e[n].keys();let i;for(;!(i=r.next()).done;)t.set(i.value,e[n].get(i.value))}return t}var wO=IO;const{batchUpdates:bO}=Nc,{DEFAULT_VALUE:xO,getNode:$x,nodes:MO}=Vt,{useStoreRef:xg}=fr,{AbstractRecoilValue:SO,setRecoilValueLoadable:NO}=Qn,{SUSPENSE_TIMEOUT_MS:DO}=Ei,{cloneSnapshot:bu}=Ec,{useCallback:Pc,useEffect:_x,useRef:Xv,useState:AO}=k,{isSSR:qv}=Dc;function Lc(e){const t=xg();_x(()=>t.current.subscribeToTransactions(e).release,[e,t])}function Kv(e){const t=e.atomValues.toMap(),n=Iu(hO(t,(r,i)=>{const a=$x(i).persistence_UNSTABLE;return a!=null&&a.type!=="none"&&r.state==="hasValue"}),r=>r.contents);return wO(e.nonvalidatedAtoms.toMap(),n)}function CO(e){Lc(Pc(t=>{let n=t.getState().previousTree;const r=t.getState().currentTree;n||(n=t.getState().currentTree);const i=Kv(r),o=Kv(n),a=Iu(MO,s=>{var u,c,d,f;return{persistence_UNSTABLE:{type:(u=(c=s.persistence_UNSTABLE)===null||c===void 0?void 0:c.type)!==null&&u!==void 0?u:"none",backButton:(d=(f=s.persistence_UNSTABLE)===null||f===void 0?void 0:f.backButton)!==null&&d!==void 0?d:!1}}}),l=yO(r.dirtyAtoms,s=>i.has(s)||o.has(s));e({atomValues:i,previousAtomValues:o,atomInfo:a,modifiedAtoms:l,transactionMetadata:{...r.transactionMetadata}})},[e]))}function EO(e){Lc(Pc(t=>{const n=bu(t,"latest"),r=bu(t,"previous");e({snapshot:n,previousSnapshot:r})},[e]))}function TO(){const e=xg(),[t,n]=AO(()=>bu(e.current)),r=Rx(t),i=Xv(),o=Xv();if(Lc(Pc(l=>n(bu(l)),[])),_x(()=>{const l=t.retain();if(i.current&&!qv){var s;window.clearTimeout(i.current),i.current=null,(s=o.current)===null||s===void 0||s.call(o),o.current=null}return()=>{window.setTimeout(l,10)}},[t]),r!==t&&!qv){if(i.current){var a;window.clearTimeout(i.current),i.current=null,(a=o.current)===null||a===void 0||a.call(o),o.current=null}o.current=t.retain(),i.current=window.setTimeout(()=>{var l;i.current=null,(l=o.current)===null||l===void 0||l.call(o),o.current=null},DO)}return t}function Fx(e,t){var n;const r=e.getState(),i=(n=r.nextTree)!==null&&n!==void 0?n:r.currentTree,o=t.getStore_INTERNAL().getState().currentTree;bO(()=>{const a=new Set;for(const u of[i.atomValues.keys(),o.atomValues.keys()])for(const c of u){var l,s;((l=i.atomValues.get(c))===null||l===void 0?void 0:l.contents)!==((s=o.atomValues.get(c))===null||s===void 0?void 0:s.contents)&&$x(c).shouldRestoreFromSnapshots&&a.add(c)}a.forEach(u=>{NO(e,new SO(u),o.atomValues.has(u)?Be(o.atomValues.get(u)):xO)}),e.replaceState(u=>({...u,stateID:t.getID()}))})}function jO(){const e=xg();return Pc(t=>Fx(e.current,t),[e])}var Hx={useRecoilSnapshot:TO,gotoSnapshot:Fx,useGotoRecoilSnapshot:jO,useRecoilTransactionObserver:EO,useTransactionObservation_DEPRECATED:CO,useTransactionSubscription_DEPRECATED:Lc};const{peekNodeInfo:PO}=Yr,{useStoreRef:LO}=fr;function RO(){const e=LO();return({key:t})=>PO(e.current,e.current.getState().currentTree,t)}var OO=RO;const{reactMode:kO}=xl,{RecoilRoot:zO,useStoreRef:BO}=fr,{useMemo:UO}=k;function $O(){kO().mode==="MUTABLE_SOURCE"&&console.warn("Warning: There are known issues using useRecoilBridgeAcrossReactRoots() in recoil_mutable_source rendering mode. Please consider upgrading to recoil_sync_external_store mode.");const e=BO().current;return UO(()=>{function t({children:n}){return k.createElement(zO,{store_INTERNAL:e},n)}return t},[e])}var _O=$O;const{loadableWithValue:FO}=bl,{initializeNode:HO}=Yr,{DEFAULT_VALUE:WO,getNode:GO}=Vt,{copyTreeState:VO,getRecoilValueAsLoadable:ZO,invalidateDownstreams:YO,writeLoadableToTreeState:QO}=Qn;function ey(e){return GO(e.key).nodeType==="atom"}class JO{constructor(t,n){pe(this,"_store",void 0),pe(this,"_treeState",void 0),pe(this,"_changes",void 0),pe(this,"get",r=>{if(this._changes.has(r.key))return this._changes.get(r.key);if(!ey(r))throw ge("Reading selectors within atomicUpdate is not supported");const i=ZO(this._store,r,this._treeState);if(i.state==="hasValue")return i.contents;throw i.state==="hasError"?i.contents:ge(`Expected Recoil atom ${r.key} to have a value, but it is in a loading state.`)}),pe(this,"set",(r,i)=>{if(!ey(r))throw ge("Setting selectors within atomicUpdate is not supported");if(typeof i=="function"){const o=this.get(r);this._changes.set(r.key,i(o))}else HO(this._store,r.key,"set"),this._changes.set(r.key,i)}),pe(this,"reset",r=>{this.set(r,WO)}),this._store=t,this._treeState=n,this._changes=new Map}newTreeState_INTERNAL(){if(this._changes.size===0)return this._treeState;const t=VO(this._treeState);for(const[n,r]of this._changes)QO(t,n,FO(r));return YO(this._store,t),t}}function XO(e){return t=>{e.replaceState(n=>{const r=new JO(e,n);return t(r),r.newTreeState_INTERNAL()})}}var qO={atomicUpdater:XO},KO=qO.atomicUpdater,Wx=Object.freeze({__proto__:null,atomicUpdater:KO});function e2(e,t){if(!e)throw new Error(t)}var t2=e2,ca=t2;const{atomicUpdater:n2}=Wx,{batchUpdates:r2}=Nc,{DEFAULT_VALUE:i2}=Vt,{useStoreRef:o2}=fr,{refreshRecoilValue:a2,setRecoilValue:ty}=Qn,{cloneSnapshot:l2}=Ec,{gotoSnapshot:s2}=Hx,{useCallback:u2}=k;class Gx{}const c2=new Gx;function Vx(e,t,n,r){let i=c2,o;if(r2(()=>{const l="useRecoilCallback() expects a function that returns a function: it accepts a function of the type (RecoilInterface) => (Args) => ReturnType and returns a callback function (Args) => ReturnType, where RecoilInterface is an object {snapshot, set, ...} and Args and ReturnType are the argument and return types of the callback you want to create. Please see the docs at recoiljs.org for details.";if(typeof t!="function")throw ge(l);const s=ix({...r??{},set:(c,d)=>ty(e,c,d),reset:c=>ty(e,c,i2),refresh:c=>a2(e,c),gotoSnapshot:c=>s2(e,c),transact_UNSTABLE:c=>n2(e)(c)},{snapshot:()=>{const c=l2(e);return o=c.retain(),c}}),u=t(s);if(typeof u!="function")throw ge(l);i=u(...n)}),i instanceof Gx&&ca(!1),Le(i))i=i.finally(()=>{var l;(l=o)===null||l===void 0||l()});else{var a;(a=o)===null||a===void 0||a()}return i}function d2(e,t){const n=o2();return u2((...r)=>Vx(n.current,e,r),t!=null?[...t,n]:void 0)}var Zx={recoilCallback:Vx,useRecoilCallback:d2};const{useStoreRef:f2}=fr,{refreshRecoilValue:p2}=Qn,{useCallback:m2}=k;function g2(e){const t=f2();return m2(()=>{const n=t.current;p2(n,e)},[e,t])}var h2=g2;const{atomicUpdater:v2}=Wx,{useStoreRef:y2}=fr,{useMemo:I2}=k;function w2(e,t){const n=y2();return I2(()=>(...r)=>{v2(n.current)(o=>{e(o)(...r)})},t!=null?[...t,n]:void 0)}var b2=w2;class x2{constructor(t){pe(this,"value",void 0),this.value=t}}var M2={WrappedValue:x2},S2=M2.WrappedValue,Yx=Object.freeze({__proto__:null,WrappedValue:S2});const{isFastRefreshEnabled:N2}=xl;class ny extends Error{}class D2{constructor(t){var n,r,i;pe(this,"_name",void 0),pe(this,"_numLeafs",void 0),pe(this,"_root",void 0),pe(this,"_onHit",void 0),pe(this,"_onSet",void 0),pe(this,"_mapNodeValue",void 0),this._name=t==null?void 0:t.name,this._numLeafs=0,this._root=null,this._onHit=(n=t==null?void 0:t.onHit)!==null&&n!==void 0?n:()=>{},this._onSet=(r=t==null?void 0:t.onSet)!==null&&r!==void 0?r:()=>{},this._mapNodeValue=(i=t==null?void 0:t.mapNodeValue)!==null&&i!==void 0?i:o=>o}size(){return this._numLeafs}root(){return this._root}get(t,n){var r;return(r=this.getLeafNode(t,n))===null||r===void 0?void 0:r.value}getLeafNode(t,n){if(this._root==null)return;let r=this._root;for(;r;){if(n==null||n.onNodeVisit(r),r.type==="leaf")return this._onHit(r),r;const i=this._mapNodeValue(t(r.nodeKey));r=r.branches.get(i)}}set(t,n,r){const i=()=>{var o,a,l,s;let u,c;for(const[w,I]of t){var d,f,p;const y=this._root;if((y==null?void 0:y.type)==="leaf")throw this.invalidCacheError();const b=u;if(u=b?b.branches.get(c):y,u=(d=u)!==null&&d!==void 0?d:{type:"branch",nodeKey:w,parent:b,branches:new Map,branchKey:c},u.type!=="branch"||u.nodeKey!==w)throw this.invalidCacheError();b==null||b.branches.set(c,u),r==null||(f=r.onNodeVisit)===null||f===void 0||f.call(r,u),c=this._mapNodeValue(I),this._root=(p=this._root)!==null&&p!==void 0?p:u}const g=u?(o=u)===null||o===void 0?void 0:o.branches.get(c):this._root;if(g!=null&&(g.type!=="leaf"||g.branchKey!==c))throw this.invalidCacheError();const h={type:"leaf",value:n,parent:u,branchKey:c};(a=u)===null||a===void 0||a.branches.set(c,h),this._root=(l=this._root)!==null&&l!==void 0?l:h,this._numLeafs++,this._onSet(h),r==null||(s=r.onNodeVisit)===null||s===void 0||s.call(r,h)};try{i()}catch(o){if(o instanceof ny)this.clear(),i();else throw o}}delete(t){const n=this.root();if(!n)return!1;if(t===n)return this._root=null,this._numLeafs=0,!0;let r=t.parent,i=t.branchKey;for(;r;){var o;if(r.branches.delete(i),r===n)return r.branches.size===0?(this._root=null,this._numLeafs=0):this._numLeafs--,!0;if(r.branches.size>0)break;i=(o=r)===null||o===void 0?void 0:o.branchKey,r=r.parent}for(;r!==n;r=r.parent)if(r==null)return!1;return this._numLeafs--,!0}clear(){this._numLeafs=0,this._root=null}invalidCacheError(){const t=N2()?"Possible Fast Refresh module reload detected. This may also be caused by an selector returning inconsistent values. Resetting cache.":"Invalid cache values. This happens when selectors do not return consistent values for the same input dependency values. That may also be caused when using Fast Refresh to change a selector implementation. Resetting cache.";throw sg(t+(this._name!=null?` - ${this._name}`:"")),new ny}}var A2={TreeCache:D2},C2=A2.TreeCache,Qx=Object.freeze({__proto__:null,TreeCache:C2});class E2{constructor(t){var n;pe(this,"_maxSize",void 0),pe(this,"_size",void 0),pe(this,"_head",void 0),pe(this,"_tail",void 0),pe(this,"_map",void 0),pe(this,"_keyMapper",void 0),this._maxSize=t.maxSize,this._size=0,this._head=null,this._tail=null,this._map=new Map,this._keyMapper=(n=t.mapKey)!==null&&n!==void 0?n:r=>r}head(){return this._head}tail(){return this._tail}size(){return this._size}maxSize(){return this._maxSize}has(t){return this._map.has(this._keyMapper(t))}get(t){const n=this._keyMapper(t),r=this._map.get(n);if(r)return this.set(t,r.value),r.value}set(t,n){const r=this._keyMapper(t);this._map.get(r)&&this.delete(t);const o=this.head(),a={key:t,right:o,left:null,value:n};o?o.left=a:this._tail=a,this._map.set(r,a),this._head=a,this._size++,this._maybeDeleteLRU()}_maybeDeleteLRU(){this.size()>this.maxSize()&&this.deleteLru()}deleteLru(){const t=this.tail();t&&this.delete(t.key)}delete(t){const n=this._keyMapper(t);if(!this._size||!this._map.has(n))return;const r=Be(this._map.get(n)),i=r.right,o=r.left;i&&(i.left=r.left),o&&(o.right=r.right),r===this.head()&&(this._head=i),r===this.tail()&&(this._tail=o),this._map.delete(n),this._size--}clear(){this._size=0,this._head=null,this._tail=null,this._map=new Map}}var T2={LRUCache:E2},j2=T2.LRUCache,Jx=Object.freeze({__proto__:null,LRUCache:j2});const{LRUCache:P2}=Jx,{TreeCache:L2}=Qx;function R2({name:e,maxSize:t,mapNodeValue:n=r=>r}){const r=new P2({maxSize:t}),i=new L2({name:e,mapNodeValue:n,onHit:o=>{r.set(o,!0)},onSet:o=>{const a=r.tail();r.set(o,!0),a&&i.size()>t&&i.delete(a.key)}});return i}var ry=R2;function Sn(e,t,n){if(typeof e=="string"&&!e.includes('"')&&!e.includes("\\"))return`"${e}"`;switch(typeof e){case"undefined":return"";case"boolean":return e?"true":"false";case"number":case"symbol":return String(e);case"string":return JSON.stringify(e);case"function":if((t==null?void 0:t.allowFunctions)!==!0)throw ge("Attempt to serialize function in a Recoil cache key");return`__FUNCTION(${e.name})__`}if(e===null)return"null";if(typeof e!="object"){var r;return(r=JSON.stringify(e))!==null&&r!==void 0?r:""}if(Le(e))return"__PROMISE__";if(Array.isArray(e))return`[${e.map((i,o)=>Sn(i,t,o.toString()))}]`;if(typeof e.toJSON=="function")return Sn(e.toJSON(n),t,n);if(e instanceof Map){const i={};for(const[o,a]of e)i[typeof o=="string"?o:Sn(o,t)]=a;return Sn(i,t,n)}return e instanceof Set?Sn(Array.from(e).sort((i,o)=>Sn(i,t).localeCompare(Sn(o,t))),t,n):Symbol!==void 0&&e[Symbol.iterator]!=null&&typeof e[Symbol.iterator]=="function"?Sn(Array.from(e),t,n):`{${Object.keys(e).filter(i=>e[i]!==void 0).sort().map(i=>`${Sn(i,t)}:${Sn(e[i],t,i)}`).join(",")}}`}function O2(e,t={allowFunctions:!1}){return Sn(e,t)}var Rc=O2;const{TreeCache:k2}=Qx,ds={equality:"reference",eviction:"keep-all",maxSize:1/0};function z2({equality:e=ds.equality,eviction:t=ds.eviction,maxSize:n=ds.maxSize}=ds,r){const i=B2(e);return U2(t,n,i,r)}function B2(e){switch(e){case"reference":return t=>t;case"value":return t=>Rc(t)}throw ge(`Unrecognized equality policy ${e}`)}function U2(e,t,n,r){switch(e){case"keep-all":return new k2({name:r,mapNodeValue:n});case"lru":return ry({name:r,maxSize:Be(t),mapNodeValue:n});case"most-recent":return ry({name:r,maxSize:1,mapNodeValue:n})}throw ge(`Unrecognized eviction policy ${e}`)}var $2=z2;function _2(e){return()=>null}var F2={startPerfBlock:_2};const{isLoadable:H2,loadableWithError:fs,loadableWithPromise:W2,loadableWithValue:tf}=bl,{WrappedValue:Xx}=Yx,{getNodeLoadable:ps,peekNodeLoadable:G2,setNodeValue:V2}=Yr,{saveDepsToStore:Z2}=Ml,{DEFAULT_VALUE:Y2,getConfigDeletionHandler:Q2,getNode:J2,registerNode:iy}=Vt,{isRecoilValue:X2}=yo,{markRecoilValueModified:oy}=Qn,{retainedByOptionWithDefault:q2}=Ei,{recoilCallback:K2}=Zx,{startPerfBlock:e4}=F2;class qx{}const qo=new qx,Ko=[],ms=new Map,t4=(()=>{let e=0;return()=>e++})();function Kx(e){let t=null;const{key:n,get:r,cachePolicy_UNSTABLE:i}=e,o=e.set!=null?e.set:void 0,a=new Set,l=$2(i??{equality:"reference",eviction:"keep-all"},n),s=q2(e.retainedBy_UNSTABLE),u=new Map;let c=0;function d(){return!Ce("recoil_memory_managament_2020")||c>0}function f(D){return D.getState().knownSelectors.add(n),c++,()=>{c--}}function p(){return Q2(n)!==void 0&&!d()}function g(D,E,T,z,_){$(E,z,_),h(D,T)}function h(D,E){G(D,E)&&U(D),I(E,!0)}function w(D,E){G(D,E)&&(Be(R(D)).stateVersions.clear(),I(E,!1))}function I(D,E){const T=ms.get(D);if(T!=null){for(const z of T)oy(z,Be(t));E&&ms.delete(D)}}function y(D,E){let T=ms.get(E);T==null&&ms.set(E,T=new Set),T.add(D)}function b(D,E,T,z,_,ie){return E.then(ue=>{if(!d())throw U(D),qo;const X=tf(ue);return g(D,T,_,X,z),ue}).catch(ue=>{if(!d())throw U(D),qo;if(Le(ue))return x(D,ue,T,z,_,ie);const X=fs(ue);throw g(D,T,_,X,z),ue})}function x(D,E,T,z,_,ie){return E.then(ue=>{if(!d())throw U(D),qo;ie.loadingDepKey!=null&&ie.loadingDepPromise===E?T.atomValues.set(ie.loadingDepKey,tf(ue)):D.getState().knownSelectors.forEach(ve=>{T.atomValues.delete(ve)});const X=S(D,T);if(X&&X.state!=="loading"){if((G(D,_)||R(D)==null)&&h(D,_),X.state==="hasValue")return X.contents;throw X.contents}if(!G(D,_)){const ve=L(D,T);if(ve!=null)return ve.loadingLoadable.contents}const[me,Ie]=M(D,T,_);if(me.state!=="loading"&&g(D,T,_,me,Ie),me.state==="hasError")throw me.contents;return me.contents}).catch(ue=>{if(ue instanceof qx)throw qo;if(!d())throw U(D),qo;const X=fs(ue);throw g(D,T,_,X,z),ue})}function N(D,E,T,z){var _,ie,ue,X;if(G(D,z)||E.version===((_=D.getState())===null||_===void 0||(ie=_.currentTree)===null||ie===void 0?void 0:ie.version)||E.version===((ue=D.getState())===null||ue===void 0||(X=ue.nextTree)===null||X===void 0?void 0:X.version)){var me,Ie,ve;Z2(n,T,D,(me=(Ie=D.getState())===null||Ie===void 0||(ve=Ie.nextTree)===null||ve===void 0?void 0:ve.version)!==null&&me!==void 0?me:D.getState().currentTree.version)}for(const Ae of T)a.add(Ae)}function M(D,E,T){const z=e4(n);let _=!0,ie=!0;const ue=()=>{z(),ie=!1};let X,me=!1,Ie;const ve={loadingDepKey:null,loadingDepPromise:null},Ae=new Map;function ft({key:tt}){const Je=ps(D,E,tt);switch(Ae.set(tt,Je),_||(N(D,E,new Set(Ae.keys()),T),w(D,T)),Je.state){case"hasValue":return Je.contents;case"hasError":throw Je.contents;case"loading":throw ve.loadingDepKey=tt,ve.loadingDepPromise=Je.contents,Je.contents}throw ge("Invalid Loadable state")}const sn=tt=>(...Je)=>{if(ie)throw ge("Callbacks from getCallback() should only be called asynchronously after the selector is evalutated. It can be used for selectors to return objects with callbacks that can work with Recoil state without a subscription.");return t==null&&ca(!1),K2(D,tt,Je,{node:t})};try{X=r({get:ft,getCallback:sn}),X=X2(X)?ft(X):X,H2(X)&&(X.state==="hasError"&&(me=!0),X=X.contents),Le(X)?X=b(D,X,E,Ae,T,ve).finally(ue):ue(),X=X instanceof Xx?X.value:X}catch(tt){X=tt,Le(X)?X=x(D,X,E,Ae,T,ve).finally(ue):(me=!0,ue())}return me?Ie=fs(X):Le(X)?Ie=W2(X):Ie=tf(X),_=!1,J(D,T,Ae),N(D,E,new Set(Ae.keys()),T),[Ie,Ae]}function S(D,E){let T=E.atomValues.get(n);if(T!=null)return T;const z=new Set;try{T=l.get(ie=>(typeof ie!="string"&&ca(!1),ps(D,E,ie).contents),{onNodeVisit:ie=>{ie.type==="branch"&&ie.nodeKey!==n&&z.add(ie.nodeKey)}})}catch(ie){throw ge(`Problem with cache lookup for selector "${n}": ${ie.message}`)}if(T){var _;E.atomValues.set(n,T),N(D,E,z,(_=R(D))===null||_===void 0?void 0:_.executionID)}return T}function C(D,E){const T=S(D,E);if(T!=null)return U(D),T;const z=L(D,E);if(z!=null){var _;return((_=z.loadingLoadable)===null||_===void 0?void 0:_.state)==="loading"&&y(D,z.executionID),z.loadingLoadable}const ie=t4(),[ue,X]=M(D,E,ie);return ue.state==="loading"?(O(D,ie,ue,X,E),y(D,ie)):(U(D),$(E,ue,X)),ue}function L(D,E){const T=bx([u.has(D)?[Be(u.get(D))]:[],bc(pg(u,([_])=>_!==D),([,_])=>_)]);function z(_){for(const[ie,ue]of _)if(!ps(D,E,ie).is(ue))return!0;return!1}for(const _ of T){if(_.stateVersions.get(E.version)||!z(_.depValuesDiscoveredSoFarDuringAsyncWork))return _.stateVersions.set(E.version,!0),_;_.stateVersions.set(E.version,!1)}}function R(D){return u.get(D)}function O(D,E,T,z,_){u.set(D,{depValuesDiscoveredSoFarDuringAsyncWork:z,executionID:E,loadingLoadable:T,stateVersions:new Map([[_.version,!0]])})}function J(D,E,T){if(G(D,E)){const z=R(D);z!=null&&(z.depValuesDiscoveredSoFarDuringAsyncWork=T)}}function U(D){u.delete(D)}function G(D,E){var T;return E===((T=R(D))===null||T===void 0?void 0:T.executionID)}function Z(D){return Array.from(D.entries()).map(([E,T])=>[E,T.contents])}function $(D,E,T){D.atomValues.set(n,E);try{l.set(Z(T),E)}catch(z){throw ge(`Problem with setting cache for selector "${n}": ${z.message}`)}}function ee(D){if(Ko.includes(n)){const E=`Recoil selector has circular dependencies: ${Ko.slice(Ko.indexOf(n)).join(" → ")}`;return fs(ge(E))}Ko.push(n);try{return D()}finally{Ko.pop()}}function P(D,E){const T=E.atomValues.get(n);return T??l.get(z=>{var _;return typeof z!="string"&&ca(!1),(_=G2(D,E,z))===null||_===void 0?void 0:_.contents})}function B(D,E){return ee(()=>C(D,E))}function F(D){D.atomValues.delete(n)}function V(D,E){t==null&&ca(!1);for(const z of a){var T;const _=J2(z);(T=_.clearCache)===null||T===void 0||T.call(_,D,E)}a.clear(),F(E),l.clear(),oy(D,t)}return o!=null?t=iy({key:n,nodeType:"selector",peek:P,get:B,set:(E,T,z)=>{let _=!1;const ie=new Map;function ue({key:ve}){if(_)throw ge("Recoil: Async selector sets are not currently supported.");const Ae=ps(E,T,ve);if(Ae.state==="hasValue")return Ae.contents;if(Ae.state==="loading"){const ft=`Getting value of asynchronous atom or selector "${ve}" in a pending state while setting selector "${n}" is not yet supported.`;throw ge(ft)}else throw Ae.contents}function X(ve,Ae){if(_)throw ge("Recoil: Async selector sets are not currently supported.");const ft=typeof Ae=="function"?Ae(ue(ve)):Ae;V2(E,T,ve.key,ft).forEach((tt,Je)=>ie.set(Je,tt))}function me(ve){X(ve,Y2)}const Ie=o({set:X,get:ue,reset:me},z);if(Ie!==void 0)throw Le(Ie)?ge("Recoil: Async selector sets are not currently supported."):ge("Recoil: selector set should be a void function.");return _=!0,ie},init:f,invalidate:F,clearCache:V,shouldDeleteConfigOnRelease:p,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:s}):t=iy({key:n,nodeType:"selector",peek:P,get:B,init:f,invalidate:F,clearCache:V,shouldDeleteConfigOnRelease:p,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:s})}Kx.value=e=>new Xx(e);var bo=Kx;const{isLoadable:n4,loadableWithError:nf,loadableWithPromise:rf,loadableWithValue:Oi}=bl,{WrappedValue:eM}=Yx,{peekNodeInfo:r4}=Yr,{DEFAULT_VALUE:ri,DefaultValue:vr,getConfigDeletionHandler:tM,registerNode:i4,setConfigDeletionHandler:o4}=Vt,{isRecoilValue:a4}=yo,{getRecoilValueAsLoadable:l4,markRecoilValueModified:s4,setRecoilValue:ay,setRecoilValueLoadable:u4}=Qn,{retainedByOptionWithDefault:c4}=Ei,ea=e=>e instanceof eM?e.value:e;function d4(e){const{key:t,persistence_UNSTABLE:n}=e,r=c4(e.retainedBy_UNSTABLE);let i=0;function o(y){return rf(y.then(b=>(a=Oi(b),b)).catch(b=>{throw a=nf(b),b}))}let a=Le(e.default)?o(e.default):n4(e.default)?e.default.state==="loading"?o(e.default.contents):e.default:Oi(ea(e.default));a.contents;let l;const s=new Map;function u(y){return y}function c(y,b){const x=b.then(N=>{var M,S;return((S=((M=y.getState().nextTree)!==null&&M!==void 0?M:y.getState().currentTree).atomValues.get(t))===null||S===void 0?void 0:S.contents)===x&&ay(y,I,N),N}).catch(N=>{var M,S;throw((S=((M=y.getState().nextTree)!==null&&M!==void 0?M:y.getState().currentTree).atomValues.get(t))===null||S===void 0?void 0:S.contents)===x&&u4(y,I,nf(N)),N});return x}function d(y,b,x){var N;i++;const M=()=>{var U;i--,(U=s.get(y))===null||U===void 0||U.forEach(G=>G()),s.delete(y)};if(y.getState().knownAtoms.add(t),a.state==="loading"){const U=()=>{var G;((G=y.getState().nextTree)!==null&&G!==void 0?G:y.getState().currentTree).atomValues.has(t)||s4(y,I)};a.contents.finally(U)}const S=(N=e.effects)!==null&&N!==void 0?N:e.effects_UNSTABLE;if(S!=null){let ee=function(E){if(G&&E.key===t){const T=U;return T instanceof vr?f(y,b):Le(T)?rf(T.then(z=>z instanceof vr?a.toPromise():z)):Oi(T)}return l4(y,E)},P=function(E){return ee(E).toPromise()},B=function(E){var T;const z=r4(y,(T=y.getState().nextTree)!==null&&T!==void 0?T:y.getState().currentTree,E.key);return G&&E.key===t&&!(U instanceof vr)?{...z,isSet:!0,loadable:ee(E)}:z};var R=ee,O=P,J=B;let U=ri,G=!0,Z=!1,$=null;const F=E=>T=>{if(G){const z=ee(I),_=z.state==="hasValue"?z.contents:ri;U=typeof T=="function"?T(_):T,Le(U)&&(U=U.then(ie=>($={effect:E,value:ie},ie)))}else{if(Le(T))throw ge("Setting atoms to async values is not implemented.");typeof T!="function"&&($={effect:E,value:ea(T)}),ay(y,I,typeof T=="function"?z=>{const _=ea(T(z));return $={effect:E,value:_},_}:ea(T))}},V=E=>()=>F(E)(ri),D=E=>T=>{var z;const{release:_}=y.subscribeToTransactions(ie=>{var ue;let{currentTree:X,previousTree:me}=ie.getState();me||(me=X);const Ie=(ue=X.atomValues.get(t))!==null&&ue!==void 0?ue:a;if(Ie.state==="hasValue"){var ve,Ae,ft,sn;const tt=Ie.contents,Je=(ve=me.atomValues.get(t))!==null&&ve!==void 0?ve:a,ji=Je.state==="hasValue"?Je.contents:ri;((Ae=$)===null||Ae===void 0?void 0:Ae.effect)!==E||((ft=$)===null||ft===void 0?void 0:ft.value)!==tt?T(tt,ji,!X.atomValues.has(t)):((sn=$)===null||sn===void 0?void 0:sn.effect)===E&&($=null)}},t);s.set(y,[...(z=s.get(y))!==null&&z!==void 0?z:[],_])};for(const E of S)try{const T=E({node:I,storeID:y.storeID,parentStoreID_UNSTABLE:y.parentStoreID,trigger:x,setSelf:F(E),resetSelf:V(E),onSet:D(E),getPromise:P,getLoadable:ee,getInfo_UNSTABLE:B});if(T!=null){var C;s.set(y,[...(C=s.get(y))!==null&&C!==void 0?C:[],T])}}catch(T){U=T,Z=!0}if(G=!1,!(U instanceof vr)){var L;const E=Z?nf(U):Le(U)?rf(c(y,U)):Oi(ea(U));E.contents,b.atomValues.set(t,E),(L=y.getState().nextTree)===null||L===void 0||L.atomValues.set(t,E)}}return M}function f(y,b){var x,N;return(x=(N=b.atomValues.get(t))!==null&&N!==void 0?N:l)!==null&&x!==void 0?x:a}function p(y,b){if(b.atomValues.has(t))return Be(b.atomValues.get(t));if(b.nonvalidatedAtoms.has(t)){if(l!=null)return l;if(n==null)return a;const x=b.nonvalidatedAtoms.get(t),N=n.validator(x,ri);return l=N instanceof vr?a:Oi(N),l}else return a}function g(){l=void 0}function h(y,b,x){if(b.atomValues.has(t)){const N=Be(b.atomValues.get(t));if(N.state==="hasValue"&&x===N.contents)return new Map}else if(!b.nonvalidatedAtoms.has(t)&&x instanceof vr)return new Map;return l=void 0,new Map().set(t,Oi(x))}function w(){return tM(t)!==void 0&&i<=0}const I=i4({key:t,nodeType:"atom",peek:f,get:p,set:h,init:d,invalidate:g,shouldDeleteConfigOnRelease:w,dangerouslyAllowMutability:e.dangerouslyAllowMutability,persistence_UNSTABLE:e.persistence_UNSTABLE?{type:e.persistence_UNSTABLE.type,backButton:e.persistence_UNSTABLE.backButton}:void 0,shouldRestoreFromSnapshots:!0,retainedBy:r});return I}function Mg(e){const{...t}=e,n="default"in e?e.default:new Promise(()=>{});return a4(n)?f4({...t,default:n}):d4({...t,default:n})}function f4(e){const t=Mg({...e,default:ri,persistence_UNSTABLE:e.persistence_UNSTABLE===void 0?void 0:{...e.persistence_UNSTABLE,validator:r=>r instanceof vr?r:Be(e.persistence_UNSTABLE).validator(r,ri)},effects:e.effects,effects_UNSTABLE:e.effects_UNSTABLE}),n=bo({key:`${e.key}__withFallback`,get:({get:r})=>{const i=r(t);return i instanceof vr?e.default:i},set:({set:r},i)=>r(t,i),cachePolicy_UNSTABLE:{eviction:"most-recent"},dangerouslyAllowMutability:e.dangerouslyAllowMutability});return o4(n.key,tM(e.key)),n}Mg.value=e=>new eM(e);var nM=Mg;class p4{constructor(t){var n;pe(this,"_map",void 0),pe(this,"_keyMapper",void 0),this._map=new Map,this._keyMapper=(n=t==null?void 0:t.mapKey)!==null&&n!==void 0?n:r=>r}size(){return this._map.size}has(t){return this._map.has(this._keyMapper(t))}get(t){return this._map.get(this._keyMapper(t))}set(t,n){this._map.set(this._keyMapper(t),n)}delete(t){this._map.delete(this._keyMapper(t))}clear(){this._map.clear()}}var m4={MapCache:p4},g4=m4.MapCache,h4=Object.freeze({__proto__:null,MapCache:g4});const{LRUCache:ly}=Jx,{MapCache:v4}=h4,gs={equality:"reference",eviction:"none",maxSize:1/0};function y4({equality:e=gs.equality,eviction:t=gs.eviction,maxSize:n=gs.maxSize}=gs){const r=I4(e);return w4(t,n,r)}function I4(e){switch(e){case"reference":return t=>t;case"value":return t=>Rc(t)}throw ge(`Unrecognized equality policy ${e}`)}function w4(e,t,n){switch(e){case"keep-all":return new v4({mapKey:n});case"lru":return new ly({mapKey:n,maxSize:Be(t)});case"most-recent":return new ly({mapKey:n,maxSize:1})}throw ge(`Unrecognized eviction policy ${e}`)}var rM=y4;const{setConfigDeletionHandler:b4}=Vt;function x4(e){var t,n;const r=rM({equality:(t=(n=e.cachePolicyForParams_UNSTABLE)===null||n===void 0?void 0:n.equality)!==null&&t!==void 0?t:"value",eviction:"keep-all"});return i=>{var o,a;const l=r.get(i);if(l!=null)return l;const{cachePolicyForParams_UNSTABLE:s,...u}=e,c="default"in e?e.default:new Promise(()=>{}),d=nM({...u,key:`${e.key}__${(o=Rc(i))!==null&&o!==void 0?o:"void"}`,default:typeof c=="function"?c(i):c,retainedBy_UNSTABLE:typeof e.retainedBy_UNSTABLE=="function"?e.retainedBy_UNSTABLE(i):e.retainedBy_UNSTABLE,effects:typeof e.effects=="function"?e.effects(i):typeof e.effects_UNSTABLE=="function"?e.effects_UNSTABLE(i):(a=e.effects)!==null&&a!==void 0?a:e.effects_UNSTABLE});return r.set(i,d),b4(d.key,()=>{r.delete(i)}),d}}var M4=x4;const{setConfigDeletionHandler:S4}=Vt;let N4=0;function D4(e){var t,n;const r=rM({equality:(t=(n=e.cachePolicyForParams_UNSTABLE)===null||n===void 0?void 0:n.equality)!==null&&t!==void 0?t:"value",eviction:"keep-all"});return i=>{var o;let a;try{a=r.get(i)}catch(f){throw ge(`Problem with cache lookup for selector ${e.key}: ${f.message}`)}if(a!=null)return a;const l=`${e.key}__selectorFamily/${(o=Rc(i,{allowFunctions:!0}))!==null&&o!==void 0?o:"void"}/${N4++}`,s=f=>e.get(i)(f),u=e.cachePolicy_UNSTABLE,c=typeof e.retainedBy_UNSTABLE=="function"?e.retainedBy_UNSTABLE(i):e.retainedBy_UNSTABLE;let d;if(e.set!=null){const f=e.set;d=bo({key:l,get:s,set:(g,h)=>f(i)(g,h),cachePolicy_UNSTABLE:u,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:c})}else d=bo({key:l,get:s,cachePolicy_UNSTABLE:u,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:c});return r.set(i,d),S4(d.key,()=>{r.delete(i)}),d}}var Qr=D4;const A4=Qr({key:"__constant",get:e=>()=>e,cachePolicyForParams_UNSTABLE:{equality:"reference"}});function C4(e){return A4(e)}var E4=C4;const T4=Qr({key:"__error",get:e=>()=>{throw ge(e)},cachePolicyForParams_UNSTABLE:{equality:"reference"}});function j4(e){return T4(e)}var P4=j4;function L4(e){return e}var R4=L4;const{loadableWithError:iM,loadableWithPromise:oM,loadableWithValue:aM}=bl;function Oc(e,t){const n=Array(t.length).fill(void 0),r=Array(t.length).fill(void 0);for(const[i,o]of t.entries())try{n[i]=e(o)}catch(a){r[i]=a}return[n,r]}function O4(e){return e!=null&&!Le(e)}function kc(e){return Array.isArray(e)?e:Object.getOwnPropertyNames(e).map(t=>e[t])}function kp(e,t){return Array.isArray(e)?t:Object.getOwnPropertyNames(e).reduce((n,r,i)=>({...n,[r]:t[i]}),{})}function io(e,t,n){const r=n.map((i,o)=>i==null?aM(t[o]):Le(i)?oM(i):iM(i));return kp(e,r)}function k4(e,t){return t.map((n,r)=>n===void 0?e[r]:n)}const z4=Qr({key:"__waitForNone",get:e=>({get:t})=>{const n=kc(e),[r,i]=Oc(t,n);return io(e,r,i)},dangerouslyAllowMutability:!0}),B4=Qr({key:"__waitForAny",get:e=>({get:t})=>{const n=kc(e),[r,i]=Oc(t,n);return i.some(o=>!Le(o))?io(e,r,i):new Promise(o=>{for(const[a,l]of i.entries())Le(l)&&l.then(s=>{r[a]=s,i[a]=void 0,o(io(e,r,i))}).catch(s=>{i[a]=s,o(io(e,r,i))})})},dangerouslyAllowMutability:!0}),U4=Qr({key:"__waitForAll",get:e=>({get:t})=>{const n=kc(e),[r,i]=Oc(t,n);if(i.every(a=>a==null))return kp(e,r);const o=i.find(O4);if(o!=null)throw o;return Promise.all(i).then(a=>kp(e,k4(r,a)))},dangerouslyAllowMutability:!0}),$4=Qr({key:"__waitForAllSettled",get:e=>({get:t})=>{const n=kc(e),[r,i]=Oc(t,n);return i.every(o=>!Le(o))?io(e,r,i):Promise.all(i.map((o,a)=>Le(o)?o.then(l=>{r[a]=l,i[a]=void 0}).catch(l=>{r[a]=void 0,i[a]=l}):null)).then(()=>io(e,r,i))},dangerouslyAllowMutability:!0}),_4=Qr({key:"__noWait",get:e=>({get:t})=>{try{return bo.value(aM(t(e)))}catch(n){return bo.value(Le(n)?oM(n):iM(n))}},dangerouslyAllowMutability:!0});var F4={waitForNone:z4,waitForAny:B4,waitForAll:U4,waitForAllSettled:$4,noWait:_4};const{RecoilLoadable:H4}=bl,{DefaultValue:W4}=Vt,{RecoilRoot:G4,useRecoilStoreID:V4}=fr,{isRecoilValue:Z4}=yo,{retentionZone:Y4}=Mc,{freshSnapshot:Q4}=Ec,{useRecoilState:J4,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:X4,useRecoilStateLoadable:q4,useRecoilValue:K4,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:ek,useRecoilValueLoadable:tk,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:nk,useResetRecoilState:rk,useSetRecoilState:ik}=mO,{useGotoRecoilSnapshot:ok,useRecoilSnapshot:ak,useRecoilTransactionObserver:lk}=Hx,{useRecoilCallback:sk}=Zx,{noWait:uk,waitForAll:ck,waitForAllSettled:dk,waitForAny:fk,waitForNone:pk}=F4;var Ti={DefaultValue:W4,isRecoilValue:Z4,RecoilLoadable:H4,RecoilEnv:Po,RecoilRoot:G4,useRecoilStoreID:V4,useRecoilBridgeAcrossReactRoots_UNSTABLE:_O,atom:nM,selector:bo,atomFamily:M4,selectorFamily:Qr,constSelector:E4,errorSelector:P4,readOnlySelector:R4,noWait:uk,waitForNone:pk,waitForAny:fk,waitForAll:ck,waitForAllSettled:dk,useRecoilValue:K4,useRecoilValueLoadable:tk,useRecoilState:J4,useRecoilStateLoadable:q4,useSetRecoilState:ik,useResetRecoilState:rk,useGetRecoilValueInfo_UNSTABLE:OO,useRecoilRefresher_UNSTABLE:h2,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:nk,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:ek,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:X4,useRecoilCallback:sk,useRecoilTransaction_UNSTABLE:b2,useGotoRecoilSnapshot:ok,useRecoilSnapshot:ak,useRecoilTransactionObserver_UNSTABLE:lk,snapshot_UNSTABLE:Q4,useRetain:yg,retentionZone:Y4},mk=Ti.RecoilRoot,gk=Ti.atom,hk=Ti.selector,vk=Ti.atomFamily,lM=Ti.useRecoilValue,sM=Ti.useSetRecoilState,yk=Ti.useRecoilCallback;const uM="x-zuplo",sy="x-internal",cM=`${uM}-path`,Dr=`${uM}-route`;var Nt=(e=>(e.modified="modified",e.new="new",e.saving="saving",e.unmodified="unmodified",e.removing="removing",e.error="error",e))(Nt||{}),xu=(e=>(e[e.Unknown=0]="Unknown",e[e.File=1]="File",e[e.Directory=2]="Directory",e[e.SymbolicLink=64]="SymbolicLink",e))(xu||{});const Sg=vk({default:void 0,key:"projectFilesState"}),Ng=gk({default:[],key:"projectTreeNodesState"});var Ik=dM;function dM(e,t,n){e instanceof RegExp&&(e=uy(e,n)),t instanceof RegExp&&(t=uy(t,n));var r=fM(e,t,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+e.length,r[1]),post:n.slice(r[1]+t.length)}}function uy(e,t){var n=t.match(e);return n?n[0]:null}dM.range=fM;function fM(e,t,n){var r,i,o,a,l,s=n.indexOf(e),u=n.indexOf(t,s+1),c=s;if(s>=0&&u>0){if(e===t)return[s,u];for(r=[],o=n.length;c>=0&&!l;)c==s?(r.push(c),s=n.indexOf(e,c+1)):r.length==1?l=[r.pop(),u]:(i=r.pop(),i<o&&(o=i,a=u),u=n.indexOf(t,c+1)),c=s<u&&s>=0?s:u;r.length&&(l=[o,a])}return l}var pM=Ik,wk=Mk,mM="\0SLASH"+Math.random()+"\0",gM="\0OPEN"+Math.random()+"\0",Dg="\0CLOSE"+Math.random()+"\0",hM="\0COMMA"+Math.random()+"\0",vM="\0PERIOD"+Math.random()+"\0";function of(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function bk(e){return e.split("\\\\").join(mM).split("\\{").join(gM).split("\\}").join(Dg).split("\\,").join(hM).split("\\.").join(vM)}function xk(e){return e.split(mM).join("\\").split(gM).join("{").split(Dg).join("}").split(hM).join(",").split(vM).join(".")}function yM(e){if(!e)return[""];var t=[],n=pM("{","}",e);if(!n)return e.split(",");var r=n.pre,i=n.body,o=n.post,a=r.split(",");a[a.length-1]+="{"+i+"}";var l=yM(o);return o.length&&(a[a.length-1]+=l.shift(),a.push.apply(a,l)),t.push.apply(t,a),t}function Mk(e){return e?(e.substr(0,2)==="{}"&&(e="\\{\\}"+e.substr(2)),da(bk(e),!0).map(xk)):[]}function Sk(e){return"{"+e+"}"}function Nk(e){return/^-?0\d/.test(e)}function Dk(e,t){return e<=t}function Ak(e,t){return e>=t}function da(e,t){var n=[],r=pM("{","}",e);if(!r)return[e];var i=r.pre,o=r.post.length?da(r.post,!1):[""];if(/\$$/.test(r.pre))for(var a=0;a<o.length;a++){var l=i+"{"+r.body+"}"+o[a];n.push(l)}else{var s=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(r.body),u=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(r.body),c=s||u,d=r.body.indexOf(",")>=0;if(!c&&!d)return r.post.match(/,.*\}/)?(e=r.pre+"{"+r.body+Dg+r.post,da(e)):[e];var f;if(c)f=r.body.split(/\.\./);else if(f=yM(r.body),f.length===1&&(f=da(f[0],!1).map(Sk),f.length===1))return o.map(function(R){return r.pre+f[0]+R});var p;if(c){var g=of(f[0]),h=of(f[1]),w=Math.max(f[0].length,f[1].length),I=f.length==3?Math.abs(of(f[2])):1,y=Dk,b=h<g;b&&(I*=-1,y=Ak);var x=f.some(Nk);p=[];for(var N=g;y(N,h);N+=I){var M;if(u)M=String.fromCharCode(N),M==="\\"&&(M="");else if(M=String(N),x){var S=w-M.length;if(S>0){var C=new Array(S+1).join("0");N<0?M="-"+C+M.slice(1):M=C+M}}p.push(M)}}else{p=[];for(var L=0;L<f.length;L++)p.push.apply(p,da(f[L],!1))}for(var L=0;L<p.length;L++)for(var a=0;a<o.length;a++){var l=i+p[L]+o[a];(!t||c||l)&&n.push(l)}}return n}const Ck=sl(wk),Ek=1024*64,Mu=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>Ek)throw new TypeError("pattern is too long")},Tk={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},ta=e=>e.replace(/[[\]\\-]/g,"\\$&"),jk=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),cy=e=>e.join(""),Pk=(e,t)=>{const n=t;if(e.charAt(n)!=="[")throw new Error("not in a brace expression");const r=[],i=[];let o=n+1,a=!1,l=!1,s=!1,u=!1,c=n,d="";e:for(;o<e.length;){const h=e.charAt(o);if((h==="!"||h==="^")&&o===n+1){u=!0,o++;continue}if(h==="]"&&a&&!s){c=o+1;break}if(a=!0,h==="\\"&&!s){s=!0,o++;continue}if(h==="["&&!s){for(const[w,[I,y,b]]of Object.entries(Tk))if(e.startsWith(w,o)){if(d)return["$.",!1,e.length-n,!0];o+=w.length,b?i.push(I):r.push(I),l=l||y;continue e}}if(s=!1,d){h>d?r.push(ta(d)+"-"+ta(h)):h===d&&r.push(ta(h)),d="",o++;continue}if(e.startsWith("-]",o+1)){r.push(ta(h+"-")),o+=2;continue}if(e.startsWith("-",o+1)){d=h,o+=2;continue}r.push(ta(h)),o++}if(c<o)return["",!1,0,!1];if(!r.length&&!i.length)return["$.",!1,e.length-n,!0];if(i.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!u){const h=r[0].length===2?r[0].slice(-1):r[0];return[jk(h),!1,c-n,!1]}const f="["+(u?"^":"")+cy(r)+"]",p="["+(u?"":"^")+cy(i)+"]";return[r.length&&i.length?"("+f+"|"+p+")":r.length?f:p,l,c-n,!0]},fa=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),Lk=new Set(["!","?","+","*","@"]),dy=e=>Lk.has(e),Rk="(?!\\.\\.?(?:$|/))",af="(?!\\.)",Ok=new Set(["[","."]),kk=new Set(["..","."]),zk=new Set("().*{}+?[]^$\\!"),Bk=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Ag="[^/]",fy=Ag+"*?",py=Ag+"+?";var nt,at,er,ke,Xe,br,ci,xr,pn,di,ll,_u,IM,ao,Us,Fu,wM;const Mt=class Mt{constructor(t,n,r={}){Et(this,_u);se(this,"type");Et(this,nt,void 0);Et(this,at,void 0);Et(this,er,!1);Et(this,ke,[]);Et(this,Xe,void 0);Et(this,br,void 0);Et(this,ci,void 0);Et(this,xr,!1);Et(this,pn,void 0);Et(this,di,void 0);Et(this,ll,!1);this.type=t,t&&Ye(this,at,!0),Ye(this,Xe,n),Ye(this,nt,Y(this,Xe)?Y(Y(this,Xe),nt):this),Ye(this,pn,Y(this,nt)===this?r:Y(Y(this,nt),pn)),Ye(this,ci,Y(this,nt)===this?[]:Y(Y(this,nt),ci)),t==="!"&&!Y(Y(this,nt),xr)&&Y(this,ci).push(this),Ye(this,br,Y(this,Xe)?Y(Y(this,Xe),ke).length:0)}get hasMagic(){if(Y(this,at)!==void 0)return Y(this,at);for(const t of Y(this,ke))if(typeof t!="string"&&(t.type||t.hasMagic))return Ye(this,at,!0);return Y(this,at)}toString(){return Y(this,di)!==void 0?Y(this,di):this.type?Ye(this,di,this.type+"("+Y(this,ke).map(t=>String(t)).join("|")+")"):Ye(this,di,Y(this,ke).map(t=>String(t)).join(""))}push(...t){for(const n of t)if(n!==""){if(typeof n!="string"&&!(n instanceof Mt&&Y(n,Xe)===this))throw new Error("invalid part: "+n);Y(this,ke).push(n)}}toJSON(){var n;const t=this.type===null?Y(this,ke).slice().map(r=>typeof r=="string"?r:r.toJSON()):[this.type,...Y(this,ke).map(r=>r.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===Y(this,nt)||Y(Y(this,nt),xr)&&((n=Y(this,Xe))==null?void 0:n.type)==="!")&&t.push({}),t}isStart(){var n;if(Y(this,nt)===this)return!0;if(!((n=Y(this,Xe))!=null&&n.isStart()))return!1;if(Y(this,br)===0)return!0;const t=Y(this,Xe);for(let r=0;r<Y(this,br);r++){const i=Y(t,ke)[r];if(!(i instanceof Mt&&i.type==="!"))return!1}return!0}isEnd(){var n,r,i;if(Y(this,nt)===this||((n=Y(this,Xe))==null?void 0:n.type)==="!")return!0;if(!((r=Y(this,Xe))!=null&&r.isEnd()))return!1;if(!this.type)return(i=Y(this,Xe))==null?void 0:i.isEnd();const t=Y(this,Xe)?Y(Y(this,Xe),ke).length:0;return Y(this,br)===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){const n=new Mt(this.type,t);for(const r of Y(this,ke))n.copyIn(r);return n}static fromGlob(t,n={}){var i;const r=new Mt(null,void 0,n);return Li(i=Mt,ao,Us).call(i,t,r,0,n),r}toMMPattern(){if(this!==Y(this,nt))return Y(this,nt).toMMPattern();const t=this.toString(),[n,r,i,o]=this.toRegExpSource();if(!(i||Y(this,at)||Y(this,pn).nocase&&!Y(this,pn).nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return r;const l=(Y(this,pn).nocase?"i":"")+(o?"u":"");return Object.assign(new RegExp(`^${n}$`,l),{_src:n,_glob:t})}toRegExpSource(){var i;if(Y(this,nt)===this&&Li(this,_u,IM).call(this),!this.type){const o=this.isStart()&&this.isEnd(),a=Y(this,ke).map(c=>{var h;const[d,f,p,g]=typeof c=="string"?Li(h=Mt,Fu,wM).call(h,c,Y(this,at),o):c.toRegExpSource();return Ye(this,at,Y(this,at)||p),Ye(this,er,Y(this,er)||g),d}).join("");let l="";if(this.isStart()&&typeof Y(this,ke)[0]=="string"&&!(Y(this,ke).length===1&&kk.has(Y(this,ke)[0]))){const d=Ok,f=Y(this,pn).dot&&d.has(a.charAt(0))||a.startsWith("\\.")&&d.has(a.charAt(2))||a.startsWith("\\.\\.")&&d.has(a.charAt(4)),p=!Y(this,pn).dot&&d.has(a.charAt(0));l=f?Rk:p?af:""}let s="";return this.isEnd()&&Y(Y(this,nt),xr)&&((i=Y(this,Xe))==null?void 0:i.type)==="!"&&(s="(?:$|\\/)"),[l+a+s,fa(a),Ye(this,at,!!Y(this,at)),Y(this,er)]}const t=this.type==="!"?"(?:(?!(?:":"(?:",n=Y(this,ke).map(o=>{if(typeof o=="string")throw new Error("string type in extglob ast??");const[a,l,s,u]=o.toRegExpSource();return Ye(this,er,Y(this,er)||u),a}).filter(o=>!(this.isStart()&&this.isEnd())||!!o).join("|");if(this.isStart()&&this.isEnd()&&!n&&this.type!=="!"){const o=this.toString();return Ye(this,ke,[o]),this.type=null,Ye(this,at,void 0),[o,fa(this.toString()),!1,!1]}let r="";if(this.type==="!"&&Y(this,ll))r=(this.isStart()&&!Y(this,pn).dot?af:"")+py;else{const o=this.type==="!"?"))"+(this.isStart()&&!Y(this,pn).dot?af:"")+fy+")":this.type==="@"?")":`)${this.type}`;r=t+n+o}return[r,fa(n),Ye(this,at,!!Y(this,at)),Y(this,er)]}};nt=new WeakMap,at=new WeakMap,er=new WeakMap,ke=new WeakMap,Xe=new WeakMap,br=new WeakMap,ci=new WeakMap,xr=new WeakMap,pn=new WeakMap,di=new WeakMap,ll=new WeakMap,_u=new WeakSet,IM=function(){if(this!==Y(this,nt))throw new Error("should only call on root");if(Y(this,xr))return this;this.toString(),Ye(this,xr,!0);let t;for(;t=Y(this,ci).pop();){if(t.type!=="!")continue;let n=t,r=Y(n,Xe);for(;r;){for(let i=Y(n,br)+1;!r.type&&i<Y(r,ke).length;i++)for(const o of Y(t,ke)){if(typeof o=="string")throw new Error("string part in extglob AST??");o.copyIn(Y(r,ke)[i])}n=r,r=Y(n,Xe)}}return this},ao=new WeakSet,Us=function(t,n,r,i){var p,g;let o=!1,a=!1,l=-1,s=!1;if(n.type===null){let h=r,w="";for(;h<t.length;){const I=t.charAt(h++);if(o||I==="\\"){o=!o,w+=I;continue}if(a){h===l+1?(I==="^"||I==="!")&&(s=!0):I==="]"&&!(h===l+2&&s)&&(a=!1),w+=I;continue}else if(I==="["){a=!0,l=h,s=!1,w+=I;continue}if(!i.noext&&dy(I)&&t.charAt(h)==="("){n.push(w),w="";const y=new Mt(I,n);h=Li(p=Mt,ao,Us).call(p,t,y,h,i),n.push(y);continue}w+=I}return n.push(w),h}let u=r+1,c=new Mt(null,n);const d=[];let f="";for(;u<t.length;){const h=t.charAt(u++);if(o||h==="\\"){o=!o,f+=h;continue}if(a){u===l+1?(h==="^"||h==="!")&&(s=!0):h==="]"&&!(u===l+2&&s)&&(a=!1),f+=h;continue}else if(h==="["){a=!0,l=u,s=!1,f+=h;continue}if(dy(h)&&t.charAt(u)==="("){c.push(f),f="";const w=new Mt(h,c);c.push(w),u=Li(g=Mt,ao,Us).call(g,t,w,u,i);continue}if(h==="|"){c.push(f),f="",d.push(c),c=new Mt(null,n);continue}if(h===")")return f===""&&Y(n,ke).length===0&&Ye(n,ll,!0),c.push(f),f="",n.push(...d,c),u;f+=h}return n.type=null,Ye(n,at,void 0),Ye(n,ke,[t.substring(r-1)]),u},Fu=new WeakSet,wM=function(t,n,r=!1){let i=!1,o="",a=!1;for(let l=0;l<t.length;l++){const s=t.charAt(l);if(i){i=!1,o+=(zk.has(s)?"\\":"")+s;continue}if(s==="\\"){l===t.length-1?o+="\\\\":i=!0;continue}if(s==="["){const[u,c,d,f]=Pk(t,l);if(d){o+=u,a=a||c,l+=d-1,n=n||f;continue}}if(s==="*"){r&&t==="*"?o+=py:o+=fy,n=!0;continue}if(s==="?"){o+=Ag,n=!0;continue}o+=Bk(s)}return[o,fa(t),!!n,a]},Et(Mt,ao),Et(Mt,Fu);let Su=Mt;const Uk=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&"),Ct=(e,t,n={})=>(Mu(t),!n.nocomment&&t.charAt(0)==="#"?!1:new zc(t,n).match(e)),$k=/^\*+([^+@!?\*\[\(]*)$/,_k=e=>t=>!t.startsWith(".")&&t.endsWith(e),Fk=e=>t=>t.endsWith(e),Hk=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),Wk=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),Gk=/^\*+\.\*+$/,Vk=e=>!e.startsWith(".")&&e.includes("."),Zk=e=>e!=="."&&e!==".."&&e.includes("."),Yk=/^\.\*+$/,Qk=e=>e!=="."&&e!==".."&&e.startsWith("."),Jk=/^\*+$/,Xk=e=>e.length!==0&&!e.startsWith("."),qk=e=>e.length!==0&&e!=="."&&e!=="..",Kk=/^\?+([^+@!?\*\[\(]*)?$/,ez=([e,t=""])=>{const n=bM([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},tz=([e,t=""])=>{const n=xM([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},nz=([e,t=""])=>{const n=xM([e]);return t?r=>n(r)&&r.endsWith(t):n},rz=([e,t=""])=>{const n=bM([e]);return t?r=>n(r)&&r.endsWith(t):n},bM=([e])=>{const t=e.length;return n=>n.length===t&&!n.startsWith(".")},xM=([e])=>{const t=e.length;return n=>n.length===t&&n!=="."&&n!==".."},MM=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&{}.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",my={win32:{sep:"\\"},posix:{sep:"/"}},iz=MM==="win32"?my.win32.sep:my.posix.sep;Ct.sep=iz;const fn=Symbol("globstar **");Ct.GLOBSTAR=fn;const oz="[^/]",az=oz+"*?",lz="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",sz="(?:(?!(?:\\/|^)\\.).)*?",uz=(e,t={})=>n=>Ct(n,e,t);Ct.filter=uz;const cn=(e,t={})=>Object.assign({},e,t),cz=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return Ct;const t=Ct;return Object.assign((r,i,o={})=>t(r,i,cn(e,o)),{Minimatch:class extends t.Minimatch{constructor(i,o={}){super(i,cn(e,o))}static defaults(i){return t.defaults(cn(e,i)).Minimatch}},AST:class extends t.AST{constructor(i,o,a={}){super(i,o,cn(e,a))}static fromGlob(i,o={}){return t.AST.fromGlob(i,cn(e,o))}},unescape:(r,i={})=>t.unescape(r,cn(e,i)),escape:(r,i={})=>t.escape(r,cn(e,i)),filter:(r,i={})=>t.filter(r,cn(e,i)),defaults:r=>t.defaults(cn(e,r)),makeRe:(r,i={})=>t.makeRe(r,cn(e,i)),braceExpand:(r,i={})=>t.braceExpand(r,cn(e,i)),match:(r,i,o={})=>t.match(r,i,cn(e,o)),sep:t.sep,GLOBSTAR:fn})};Ct.defaults=cz;const SM=(e,t={})=>(Mu(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:Ck(e));Ct.braceExpand=SM;const dz=(e,t={})=>new zc(e,t).makeRe();Ct.makeRe=dz;const fz=(e,t,n={})=>{const r=new zc(t,n);return e=e.filter(i=>r.match(i)),r.options.nonull&&!e.length&&e.push(t),e};Ct.match=fz;const gy=/[?*]|[+@!]\(.*?\)|\[|\]/,pz=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class zc{constructor(t,n={}){se(this,"options");se(this,"set");se(this,"pattern");se(this,"windowsPathsNoEscape");se(this,"nonegate");se(this,"negate");se(this,"comment");se(this,"empty");se(this,"preserveMultipleSlashes");se(this,"partial");se(this,"globSet");se(this,"globParts");se(this,"nocase");se(this,"isWindows");se(this,"platform");se(this,"windowsNoMagicRoot");se(this,"regexp");Mu(t),n=n||{},this.options=n,this.pattern=t,this.platform=n.platform||MM,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!n.windowsPathsNoEscape||n.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!n.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!n.nonegate,this.comment=!1,this.empty=!1,this.partial=!!n.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=n.windowsNoMagicRoot!==void 0?n.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const t of this.set)for(const n of t)if(typeof n!="string")return!0;return!1}debug(...t){}make(){const t=this.pattern,n=this.options;if(!n.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],n.debug&&(this.debug=(...o)=>console.error(...o)),this.debug(this.pattern,this.globSet);const r=this.globSet.map(o=>this.slashSplit(o));this.globParts=this.preprocess(r),this.debug(this.pattern,this.globParts);let i=this.globParts.map((o,a,l)=>{if(this.isWindows&&this.windowsNoMagicRoot){const s=o[0]===""&&o[1]===""&&(o[2]==="?"||!gy.test(o[2]))&&!gy.test(o[3]),u=/^[a-z]:/i.test(o[0]);if(s)return[...o.slice(0,4),...o.slice(4).map(c=>this.parse(c))];if(u)return[o[0],...o.slice(1).map(c=>this.parse(c))]}return o.map(s=>this.parse(s))});if(this.debug(this.pattern,i),this.set=i.filter(o=>o.indexOf(!1)===-1),this.isWindows)for(let o=0;o<this.set.length;o++){const a=this.set[o];a[0]===""&&a[1]===""&&this.globParts[o][2]==="?"&&typeof a[3]=="string"&&/^[a-z]:$/i.test(a[3])&&(a[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let r=0;r<t.length;r++)for(let i=0;i<t[r].length;i++)t[r][i]==="**"&&(t[r][i]="*");const{optimizationLevel:n=1}=this.options;return n>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):n>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(n=>{let r=-1;for(;(r=n.indexOf("**",r+1))!==-1;){let i=r;for(;n[i+1]==="**";)i++;i!==r&&n.splice(r,i-r)}return n})}levelOneOptimize(t){return t.map(n=>(n=n.reduce((r,i)=>{const o=r[r.length-1];return i==="**"&&o==="**"?r:i===".."&&o&&o!==".."&&o!=="."&&o!=="**"?(r.pop(),r):(r.push(i),r)},[]),n.length===0?[""]:n))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let n=!1;do{if(n=!1,!this.preserveMultipleSlashes){for(let i=1;i<t.length-1;i++){const o=t[i];i===1&&o===""&&t[0]===""||(o==="."||o==="")&&(n=!0,t.splice(i,1),i--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(n=!0,t.pop())}let r=0;for(;(r=t.indexOf("..",r+1))!==-1;){const i=t[r-1];i&&i!=="."&&i!==".."&&i!=="**"&&(n=!0,t.splice(r-1,2),r-=2)}}while(n);return t.length===0?[""]:t}firstPhasePreProcess(t){let n=!1;do{n=!1;for(let r of t){let i=-1;for(;(i=r.indexOf("**",i+1))!==-1;){let a=i;for(;r[a+1]==="**";)a++;a>i&&r.splice(i+1,a-i);let l=r[i+1];const s=r[i+2],u=r[i+3];if(l!==".."||!s||s==="."||s===".."||!u||u==="."||u==="..")continue;n=!0,r.splice(i,1);const c=r.slice(0);c[i]="**",t.push(c),i--}if(!this.preserveMultipleSlashes){for(let a=1;a<r.length-1;a++){const l=r[a];a===1&&l===""&&r[0]===""||(l==="."||l==="")&&(n=!0,r.splice(a,1),a--)}r[0]==="."&&r.length===2&&(r[1]==="."||r[1]==="")&&(n=!0,r.pop())}let o=0;for(;(o=r.indexOf("..",o+1))!==-1;){const a=r[o-1];if(a&&a!=="."&&a!==".."&&a!=="**"){n=!0;const s=o===1&&r[o+1]==="**"?["."]:[];r.splice(o-1,2,...s),r.length===0&&r.push(""),o-=2}}}}while(n);return t}secondPhasePreProcess(t){for(let n=0;n<t.length-1;n++)for(let r=n+1;r<t.length;r++){const i=this.partsMatch(t[n],t[r],!this.preserveMultipleSlashes);i&&(t[n]=i,t[r]=[])}return t.filter(n=>n.length)}partsMatch(t,n,r=!1){let i=0,o=0,a=[],l="";for(;i<t.length&&o<n.length;)if(t[i]===n[o])a.push(l==="b"?n[o]:t[i]),i++,o++;else if(r&&t[i]==="**"&&n[o]===t[i+1])a.push(t[i]),i++;else if(r&&n[o]==="**"&&t[i]===n[o+1])a.push(n[o]),o++;else if(t[i]==="*"&&n[o]&&(this.options.dot||!n[o].startsWith("."))&&n[o]!=="**"){if(l==="b")return!1;l="a",a.push(t[i]),i++,o++}else if(n[o]==="*"&&t[i]&&(this.options.dot||!t[i].startsWith("."))&&t[i]!=="**"){if(l==="a")return!1;l="b",a.push(n[o]),i++,o++}else return!1;return t.length===n.length&&a}parseNegate(){if(this.nonegate)return;const t=this.pattern;let n=!1,r=0;for(let i=0;i<t.length&&t.charAt(i)==="!";i++)n=!n,r++;r&&(this.pattern=t.slice(r)),this.negate=n}matchOne(t,n,r=!1){const i=this.options;if(this.isWindows){const h=t[0]===""&&t[1]===""&&t[2]==="?"&&typeof t[3]=="string"&&/^[a-z]:$/i.test(t[3]),w=n[0]===""&&n[1]===""&&n[2]==="?"&&typeof n[3]=="string"&&/^[a-z]:$/i.test(n[3]);if(h&&w){const I=t[3],y=n[3];I.toLowerCase()===y.toLowerCase()&&(t[3]=y)}else if(w&&typeof t[0]=="string"){const I=n[3],y=t[0];I.toLowerCase()===y.toLowerCase()&&(n[3]=y,n=n.slice(3))}else if(h&&typeof n[0]=="string"){const I=t[3];I.toLowerCase()===n[0].toLowerCase()&&(n[0]=I,t=t.slice(3))}}const{optimizationLevel:o=1}=this.options;o>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:n}),this.debug("matchOne",t.length,n.length);for(var a=0,l=0,s=t.length,u=n.length;a<s&&l<u;a++,l++){this.debug("matchOne loop");var c=n[l],d=t[a];if(this.debug(n,c,d),c===!1)return!1;if(c===fn){this.debug("GLOBSTAR",[n,c,d]);var f=a,p=l+1;if(p===u){for(this.debug("** at the end");a<s;a++)if(t[a]==="."||t[a]===".."||!i.dot&&t[a].charAt(0)===".")return!1;return!0}for(;f<s;){var g=t[f];if(this.debug(`
57
+ hot module replacement.`;console.warn(t)}}function rL(e){Lo.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED&&nL(e.key),Ni.set(e.key,e);const t=e.set==null?new yo.RecoilValueReadOnly(e.key):new yo.RecoilState(e.key);return cg.set(e.key,t),t}class XM extends Error{}function iL(e){const t=Ni.get(e);if(t==null)throw new XM(`Missing definition for RecoilValue: "${e}""`);return t}function oL(e){return Ni.get(e)}const yu=new Map;function aL(e){var t;if(!Ce("recoil_memory_managament_2020"))return;const n=Ni.get(e);if(n!=null&&(t=n.shouldDeleteConfigOnRelease)!==null&&t!==void 0&&t.call(n)){var r;Ni.delete(e),(r=qM(e))===null||r===void 0||r(),yu.delete(e)}}function lL(e,t){Ce("recoil_memory_managament_2020")&&(t===void 0?yu.delete(e):yu.set(e,t))}function qM(e){return yu.get(e)}var Vt={nodes:Ni,recoilValues:cg,registerNode:rL,getNode:iL,getNodeMaybe:oL,deleteNodeConfigIfPossible:aL,setConfigDeletionHandler:lL,getConfigDeletionHandler:qM,recoilValuesForKeys:tL,NodeMissingError:XM,DefaultValue:JM,DEFAULT_VALUE:eL};function sL(e,t){t()}var uL={enqueueExecution:sL};function cL(e,t){return t={exports:{}},e(t,t.exports),t.exports}var dL=cL(function(e){var t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(j){return typeof j}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j},n={},r=5,i=Math.pow(2,r),o=i-1,a=i/2,l=i/4,s={},u=function(A){return function(){return A}},c=n.hash=function(j){var A=typeof j>"u"?"undefined":t(j);if(A==="number")return j;A!=="string"&&(j+="");for(var H=0,q=0,K=j.length;q<K;++q){var ne=j.charCodeAt(q);H=(H<<5)-H+ne|0}return H},d=function(A){return A-=A>>1&1431655765,A=(A&858993459)+(A>>2&858993459),A=A+(A>>4)&252645135,A+=A>>8,A+=A>>16,A&127},f=function(A,H){return H>>>A&o},p=function(A){return 1<<A},g=function(A,H){return d(A&H-1)},h=function(A,H,q,K){var ne=K;if(!A){var fe=K.length;ne=new Array(fe);for(var ce=0;ce<fe;++ce)ne[ce]=K[ce]}return ne[H]=q,ne},w=function(A,H,q){var K=q.length-1,ne=0,fe=0,ce=q;if(A)ne=fe=H;else for(ce=new Array(K);ne<H;)ce[fe++]=q[ne++];for(++ne;ne<=K;)ce[fe++]=q[ne++];return A&&(ce.length=K),ce},I=function(A,H,q,K){var ne=K.length;if(A){for(var fe=ne;fe>=H;)K[fe--]=K[fe];return K[H]=q,K}for(var ce=0,de=0,he=new Array(ne+1);ce<H;)he[de++]=K[ce++];for(he[H]=q;ce<ne;)he[++de]=K[ce++];return he},y=1,M=2,x=3,S=4,b={__hamt_isEmpty:!0},N=function(A){return A===b||A&&A.__hamt_isEmpty},C=function(A,H,q,K){return{type:y,edit:A,hash:H,key:q,value:K,_modify:L}},P=function(A,H,q){return{type:M,edit:A,hash:H,children:q,_modify:B}},R=function(A,H,q){return{type:x,edit:A,mask:H,children:q,_modify:F}},O=function(A,H,q){return{type:S,edit:A,size:H,children:q,_modify:V}},J=function(A){return A===b||A.type===y||A.type===M},U=function(A,H,q,K,ne){for(var fe=[],ce=K,de=0,he=0;ce;++he)ce&1&&(fe[he]=ne[de++]),ce>>>=1;return fe[H]=q,O(A,de+1,fe)},W=function(A,H,q,K){for(var ne=new Array(H-1),fe=0,ce=0,de=0,he=K.length;de<he;++de)if(de!==q){var Oe=K[de];Oe&&!N(Oe)&&(ne[fe++]=Oe,ce|=1<<de)}return R(A,ce,ne)},Z=function j(A,H,q,K,ne,fe){if(q===ne)return P(A,q,[fe,K]);var ce=f(H,q),de=f(H,ne);return R(A,p(ce)|p(de),ce===de?[j(A,H+r,q,K,ne,fe)]:ce<de?[K,fe]:[fe,K])},$=function(A,H,q,K,ne,fe,ce,de){for(var he=ne.length,Oe=0;Oe<he;++Oe){var kt=ne[Oe];if(q(ce,kt.key)){var ot=kt.value,un=fe(ot);return un===ot?ne:un===s?(--de.value,w(A,Oe,ne)):h(A,Oe,C(H,K,ce,un),ne)}}var xn=fe();return xn===s?ne:(++de.value,h(A,he,C(H,K,ce,xn),ne))},ee=function(A,H){return A===H.edit},L=function(A,H,q,K,ne,fe,ce){if(H(fe,this.key)){var de=K(this.value);return de===this.value?this:de===s?(--ce.value,b):ee(A,this)?(this.value=de,this):C(A,ne,fe,de)}var he=K();return he===s?this:(++ce.value,Z(A,q,this.hash,this,ne,C(A,ne,fe,he)))},B=function(A,H,q,K,ne,fe,ce){if(ne===this.hash){var de=ee(A,this),he=$(de,A,H,this.hash,this.children,K,fe,ce);return he===this.children?this:he.length>1?P(A,this.hash,he):he[0]}var Oe=K();return Oe===s?this:(++ce.value,Z(A,q,this.hash,this,ne,C(A,ne,fe,Oe)))},F=function(A,H,q,K,ne,fe,ce){var de=this.mask,he=this.children,Oe=f(q,ne),kt=p(Oe),ot=g(de,kt),un=de&kt,xn=un?he[ot]:b,Li=xn._modify(A,H,q+r,K,ne,fe,ce);if(xn===Li)return this;var Gl=ee(A,this),Bo=de,Uo=void 0;if(un&&N(Li)){if(Bo&=~kt,!Bo)return b;if(he.length<=2&&J(he[ot^1]))return he[ot^1];Uo=w(Gl,ot,he)}else if(!un&&!N(Li)){if(he.length>=a)return U(A,Oe,Li,de,he);Bo|=kt,Uo=I(Gl,ot,Li,he)}else Uo=h(Gl,ot,Li,he);return Gl?(this.mask=Bo,this.children=Uo,this):R(A,Bo,Uo)},V=function(A,H,q,K,ne,fe,ce){var de=this.size,he=this.children,Oe=f(q,ne),kt=he[Oe],ot=(kt||b)._modify(A,H,q+r,K,ne,fe,ce);if(kt===ot)return this;var un=ee(A,this),xn=void 0;if(N(kt)&&!N(ot))++de,xn=h(un,Oe,ot,he);else if(!N(kt)&&N(ot)){if(--de,de<=l)return W(A,de,Oe,he);xn=h(un,Oe,b,he)}else xn=h(un,Oe,ot,he);return un?(this.size=de,this.children=xn,this):O(A,de,xn)};b._modify=function(j,A,H,q,K,ne,fe){var ce=q();return ce===s?b:(++fe.value,C(j,K,ne,ce))};function D(j,A,H,q,K){this._editable=j,this._edit=A,this._config=H,this._root=q,this._size=K}D.prototype.setTree=function(j,A){return this._editable?(this._root=j,this._size=A,this):j===this._root?this:new D(this._editable,this._edit,this._config,j,A)};var E=n.tryGetHash=function(j,A,H,q){for(var K=q._root,ne=0,fe=q._config.keyEq;;)switch(K.type){case y:return fe(H,K.key)?K.value:j;case M:{if(A===K.hash)for(var ce=K.children,de=0,he=ce.length;de<he;++de){var Oe=ce[de];if(fe(H,Oe.key))return Oe.value}return j}case x:{var kt=f(ne,A),ot=p(kt);if(K.mask&ot){K=K.children[g(K.mask,ot)],ne+=r;break}return j}case S:{if(K=K.children[f(ne,A)],K){ne+=r;break}return j}default:return j}};D.prototype.tryGetHash=function(j,A,H){return E(j,A,H,this)};var T=n.tryGet=function(j,A,H){return E(j,H._config.hash(A),A,H)};D.prototype.tryGet=function(j,A){return T(j,A,this)};var z=n.getHash=function(j,A,H){return E(void 0,j,A,H)};D.prototype.getHash=function(j,A){return z(j,A,this)},n.get=function(j,A){return E(void 0,A._config.hash(j),j,A)},D.prototype.get=function(j,A){return T(A,j,this)};var _=n.has=function(j,A,H){return E(s,j,A,H)!==s};D.prototype.hasHash=function(j,A){return _(j,A,this)};var ie=n.has=function(j,A){return _(A._config.hash(j),j,A)};D.prototype.has=function(j){return ie(j,this)};var ue=function(A,H){return A===H};n.make=function(j){return new D(0,0,{keyEq:j&&j.keyEq||ue,hash:j&&j.hash||c},b,0)},n.empty=n.make();var X=n.isEmpty=function(j){return j&&!!N(j._root)};D.prototype.isEmpty=function(){return X(this)};var me=n.modifyHash=function(j,A,H,q){var K={value:q._size},ne=q._root._modify(q._editable?q._edit:NaN,q._config.keyEq,0,j,A,H,K);return q.setTree(ne,K.value)};D.prototype.modifyHash=function(j,A,H){return me(H,j,A,this)};var Ie=n.modify=function(j,A,H){return me(j,H._config.hash(A),A,H)};D.prototype.modify=function(j,A){return Ie(A,j,this)};var ve=n.setHash=function(j,A,H,q){return me(u(H),j,A,q)};D.prototype.setHash=function(j,A,H){return ve(j,A,H,this)};var Ae=n.set=function(j,A,H){return ve(H._config.hash(j),j,A,H)};D.prototype.set=function(j,A){return Ae(j,A,this)};var ft=u(s),sn=n.removeHash=function(j,A,H){return me(ft,j,A,H)};D.prototype.removeHash=D.prototype.deleteHash=function(j,A){return sn(j,A,this)};var tt=n.remove=function(j,A){return sn(A._config.hash(j),j,A)};D.prototype.remove=D.prototype.delete=function(j){return tt(j,this)};var Je=n.beginMutation=function(j){return new D(j._editable+1,j._edit+1,j._config,j._root,j._size)};D.prototype.beginMutation=function(){return Je(this)};var ji=n.endMutation=function(j){return j._editable=j._editable&&j._editable-1,j};D.prototype.endMutation=function(){return ji(this)};var Xr=n.mutate=function(j,A){var H=Je(A);return j(H),ji(H)};D.prototype.mutate=function(j){return Xr(j,this)};var qr=function(A){return A&&vh(A[0],A[1],A[2],A[3],A[4])},vh=function(A,H,q,K,ne){for(;q<A;){var fe=H[q++];if(fe&&!N(fe))return yh(fe,K,[A,H,q,K,ne])}return qr(ne)},yh=function(A,H,q){switch(A.type){case y:return{value:H(A),rest:q};case M:case S:case x:var K=A.children;return vh(K.length,K,0,H,q);default:return qr(q)}},PS={done:!0};function pd(j){this.v=j}pd.prototype.next=function(){if(!this.v)return PS;var j=this.v;return this.v=qr(j.rest),j},pd.prototype[Symbol.iterator]=function(){return this};var md=function(A,H){return new pd(yh(A._root,H))},RS=function(A){return[A.key,A.value]},OS=n.entries=function(j){return md(j,RS)};D.prototype.entries=D.prototype[Symbol.iterator]=function(){return OS(this)};var kS=function(A){return A.key},zS=n.keys=function(j){return md(j,kS)};D.prototype.keys=function(){return zS(this)};var BS=function(A){return A.value},US=n.values=D.prototype.values=function(j){return md(j,BS)};D.prototype.values=function(){return US(this)};var Ih=n.fold=function(j,A,H){var q=H._root;if(q.type===y)return j(A,q.value,q.key);for(var K=[q.children],ne=void 0;ne=K.pop();)for(var fe=0,ce=ne.length;fe<ce;){var de=ne[fe++];de&&de.type&&(de.type===y?A=j(A,de.value,de.key):K.push(de.children))}return A};D.prototype.fold=function(j,A){return Ih(j,A,this)};var $S=n.forEach=function(j,A){return Ih(function(H,q,K){return j(q,K,A)},null,A)};D.prototype.forEach=function(j){return $S(j,this)};var _S=n.count=function(j){return j._size};D.prototype.count=function(){return _S(this)},Object.defineProperty(D.prototype,"size",{get:D.prototype.count}),e.exports?e.exports=n:(void 0).hamt=n});class fL{constructor(t){pe(this,"_map",void 0),this._map=new Map(t==null?void 0:t.entries())}keys(){return this._map.keys()}entries(){return this._map.entries()}get(t){return this._map.get(t)}has(t){return this._map.has(t)}set(t,n){return this._map.set(t,n),this}delete(t){return this._map.delete(t),this}clone(){return fg(this)}toMap(){return new Map(this._map)}}class dg{constructor(t){if(pe(this,"_hamt",dL.empty.beginMutation()),t instanceof dg){const n=t._hamt.endMutation();t._hamt=n.beginMutation(),this._hamt=n.beginMutation()}else if(t)for(const[n,r]of t.entries())this._hamt.set(n,r)}keys(){return this._hamt.keys()}entries(){return this._hamt.entries()}get(t){return this._hamt.get(t)}has(t){return this._hamt.has(t)}set(t,n){return this._hamt.set(t,n),this}delete(t){return this._hamt.delete(t),this}clone(){return fg(this)}toMap(){return new Map(this._hamt)}}function fg(e){return Ce("recoil_hamt_2020")?new dg(e):new fL(e)}var pL={persistentMap:fg},mL=pL.persistentMap,gL=Object.freeze({__proto__:null,persistentMap:mL});function hL(e,...t){const n=new Set;e:for(const r of e){for(const i of t)if(i.has(r))continue e;n.add(r)}return n}var Sa=hL;function vL(e,t){const n=new Map;return e.forEach((r,i)=>{n.set(i,t(r,i))}),n}var Iu=vL;function yL(){return{nodeDeps:new Map,nodeToNodeSubscriptions:new Map}}function IL(e){return{nodeDeps:Iu(e.nodeDeps,t=>new Set(t)),nodeToNodeSubscriptions:Iu(e.nodeToNodeSubscriptions,t=>new Set(t))}}function Kd(e,t,n,r){const{nodeDeps:i,nodeToNodeSubscriptions:o}=n,a=i.get(e);if(a&&r&&a!==r.nodeDeps.get(e))return;i.set(e,t);const l=a==null?t:Sa(t,a);for(const s of l)o.has(s)||o.set(s,new Set),Be(o.get(s)).add(e);if(a){const s=Sa(a,t);for(const u of s){if(!o.has(u))return;const c=Be(o.get(u));c.delete(e),c.size===0&&o.delete(u)}}}function wL(e,t,n,r){var i,o,a,l;const s=n.getState();r===s.currentTree.version||r===((i=s.nextTree)===null||i===void 0?void 0:i.version)||((o=s.previousTree)===null||o===void 0||o.version);const u=n.getGraph(r);if(Kd(e,t,u),r===((a=s.previousTree)===null||a===void 0?void 0:a.version)){const d=n.getGraph(s.currentTree.version);Kd(e,t,d,u)}if(r===((l=s.previousTree)===null||l===void 0?void 0:l.version)||r===s.currentTree.version){var c;const d=(c=s.nextTree)===null||c===void 0?void 0:c.version;if(d!==void 0){const f=n.getGraph(d);Kd(e,t,f,u)}}}var bl={cloneGraph:IL,graph:yL,saveDepsToStore:wL};let ML=0;const xL=()=>ML++;let bL=0;const NL=()=>bL++;let SL=0;const DL=()=>SL++;var xc={getNextTreeStateVersion:xL,getNextStoreID:NL,getNextComponentID:DL};const{persistentMap:$v}=gL,{graph:AL}=bl,{getNextTreeStateVersion:KM}=xc;function ex(){const e=KM();return{version:e,stateID:e,transactionMetadata:{},dirtyAtoms:new Set,atomValues:$v(),nonvalidatedAtoms:$v()}}function CL(){const e=ex();return{currentTree:e,nextTree:null,previousTree:null,commitDepth:0,knownAtoms:new Set,knownSelectors:new Set,transactionSubscriptions:new Map,nodeTransactionSubscriptions:new Map,nodeToComponentSubscriptions:new Map,queuedComponentCallbacks_DEPRECATED:[],suspendedComponentResolvers:new Set,graphsByVersion:new Map().set(e.version,AL()),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map}}var tx={makeEmptyTreeState:ex,makeEmptyStoreState:CL,getNextTreeStateVersion:KM};class nx{}function EL(){return new nx}var bc={RetentionZone:nx,retentionZone:EL};function TL(e,t){const n=new Set(e);return n.add(t),n}function jL(e,t){const n=new Set(e);return n.delete(t),n}function LL(e,t,n){const r=new Map(e);return r.set(t,n),r}function PL(e,t,n){const r=new Map(e);return r.set(t,n(r.get(t))),r}function RL(e,t){const n=new Map(e);return n.delete(t),n}function OL(e,t){const n=new Map(e);return t.forEach(r=>n.delete(r)),n}var rx={setByAddingToSet:TL,setByDeletingFromSet:jL,mapBySettingInMap:LL,mapByUpdatingInMap:PL,mapByDeletingFromMap:RL,mapByDeletingMultipleFromMap:OL};function*kL(e,t){let n=0;for(const r of e)t(r,n++)&&(yield r)}var pg=kL;function zL(e,t){return new Proxy(e,{get:(r,i)=>(!(i in r)&&i in t&&(r[i]=t[i]()),r[i]),ownKeys:r=>Object.keys(r)})}var ix=zL;const{getNode:Nl,getNodeMaybe:BL,recoilValuesForKeys:_v}=Vt,{RetentionZone:Fv}=bc,{setByAddingToSet:UL}=rx,$L=Object.freeze(new Set);class _L extends Error{}function FL(e,t,n){if(!Ce("recoil_memory_managament_2020"))return()=>{};const{nodesRetainedByZone:r}=e.getState().retention;function i(o){let a=r.get(o);a||r.set(o,a=new Set),a.add(t)}if(n instanceof Fv)i(n);else if(Array.isArray(n))for(const o of n)i(o);return()=>{if(!Ce("recoil_memory_managament_2020"))return;const{retention:o}=e.getState();function a(l){const s=o.nodesRetainedByZone.get(l);s==null||s.delete(t),s&&s.size===0&&o.nodesRetainedByZone.delete(l)}if(n instanceof Fv)a(n);else if(Array.isArray(n))for(const l of n)a(l)}}function mg(e,t,n,r){const i=e.getState();if(i.nodeCleanupFunctions.has(n))return;const o=Nl(n),a=FL(e,n,o.retainedBy),l=o.init(e,t,r);i.nodeCleanupFunctions.set(n,()=>{l(),a()})}function HL(e,t,n){mg(e,e.getState().currentTree,t,n)}function GL(e,t){var n;const r=e.getState();(n=r.nodeCleanupFunctions.get(t))===null||n===void 0||n(),r.nodeCleanupFunctions.delete(t)}function WL(e,t,n){return mg(e,t,n,"get"),Nl(n).get(e,t)}function ox(e,t,n){return Nl(n).peek(e,t)}function VL(e,t,n){var r;const i=BL(t);return i==null||(r=i.invalidate)===null||r===void 0||r.call(i,e),{...e,atomValues:e.atomValues.clone().delete(t),nonvalidatedAtoms:e.nonvalidatedAtoms.clone().set(t,n),dirtyAtoms:UL(e.dirtyAtoms,t)}}function ZL(e,t,n,r){const i=Nl(n);if(i.set==null)throw new _L(`Attempt to set read-only RecoilValue: ${n}`);const o=i.set;return mg(e,t,n,"set"),o(e,t,r)}function YL(e,t,n){const r=e.getState(),i=e.getGraph(t.version),o=Nl(n).nodeType;return ix({type:o},{loadable:()=>ox(e,t,n),isActive:()=>r.knownAtoms.has(n)||r.knownSelectors.has(n),isSet:()=>o==="selector"?!1:t.atomValues.has(n),isModified:()=>t.dirtyAtoms.has(n),deps:()=>{var a;return _v((a=i.nodeDeps.get(n))!==null&&a!==void 0?a:[])},subscribers:()=>{var a,l;return{nodes:_v(pg(ax(e,t,new Set([n])),s=>s!==n)),components:Mc((a=(l=r.nodeToComponentSubscriptions.get(n))===null||l===void 0?void 0:l.values())!==null&&a!==void 0?a:[],([s])=>({name:s}))}}})}function ax(e,t,n){const r=new Set,i=Array.from(n),o=e.getGraph(t.version);for(let l=i.pop();l;l=i.pop()){var a;r.add(l);const s=(a=o.nodeToNodeSubscriptions.get(l))!==null&&a!==void 0?a:$L;for(const u of s)r.has(u)||i.push(u)}return r}var Yr={getNodeLoadable:WL,peekNodeLoadable:ox,setNodeValue:ZL,initializeNode:HL,cleanUpNode:GL,setUnvalidatedAtomValue_DEPRECATED:VL,peekNodeInfo:YL,getDownstreamNodes:ax};let lx=null;function QL(e){lx=e}function JL(){var e;(e=lx)===null||e===void 0||e()}var sx={setInvalidateMemoizedSnapshot:QL,invalidateMemoizedSnapshot:JL};const{getDownstreamNodes:XL,getNodeLoadable:ux,setNodeValue:qL}=Yr,{getNextComponentID:KL}=xc,{getNode:eP,getNodeMaybe:cx}=Vt,{DefaultValue:gg}=Vt,{reactMode:tP}=xl,{AbstractRecoilValue:nP,RecoilState:rP,RecoilValueReadOnly:iP,isRecoilValue:oP}=yo,{invalidateMemoizedSnapshot:aP}=sx;function lP(e,{key:t},n=e.getState().currentTree){var r,i;const o=e.getState();n.version===o.currentTree.version||n.version===((r=o.nextTree)===null||r===void 0?void 0:r.version)||(n.version,(i=o.previousTree)===null||i===void 0||i.version);const a=ux(e,n,t);return a.state==="loading"&&a.contents.catch(()=>{}),a}function sP(e,t){const n=e.clone();return t.forEach((r,i)=>{r.state==="hasValue"&&r.contents instanceof gg?n.delete(i):n.set(i,r)}),n}function uP(e,t,{key:n},r){if(typeof r=="function"){const i=ux(e,t,n);if(i.state==="loading"){const o=`Tried to set atom or selector "${n}" using an updater function while the current state is pending, this is not currently supported.`;throw ge(o)}else if(i.state==="hasError")throw i.contents;return r(i.contents)}else return r}function cP(e,t,n){if(n.type==="set"){const{recoilValue:i,valueOrUpdater:o}=n,a=uP(e,t,i,o),l=qL(e,t,i.key,a);for(const[s,u]of l.entries())Ep(t,s,u)}else if(n.type==="setLoadable"){const{recoilValue:{key:i},loadable:o}=n;Ep(t,i,o)}else if(n.type==="markModified"){const{recoilValue:{key:i}}=n;t.dirtyAtoms.add(i)}else if(n.type==="setUnvalidated"){var r;const{recoilValue:{key:i},unvalidatedValue:o}=n,a=cx(i);a==null||(r=a.invalidate)===null||r===void 0||r.call(a,t),t.atomValues.delete(i),t.nonvalidatedAtoms.set(i,o),t.dirtyAtoms.add(i)}else sg(`Unknown action ${n.type}`)}function Ep(e,t,n){n.state==="hasValue"&&n.contents instanceof gg?e.atomValues.delete(t):e.atomValues.set(t,n),e.dirtyAtoms.add(t),e.nonvalidatedAtoms.delete(t)}function dx(e,t){e.replaceState(n=>{const r=fx(n);for(const i of t)cP(e,r,i);return px(e,r),aP(),r})}function Nc(e,t){if(Da.length){const n=Da[Da.length-1];let r=n.get(e);r||n.set(e,r=[]),r.push(t)}else dx(e,[t])}const Da=[];function dP(){const e=new Map;return Da.push(e),()=>{for(const[t,n]of e)dx(t,n);Da.pop()}}function fx(e){return{...e,atomValues:e.atomValues.clone(),nonvalidatedAtoms:e.nonvalidatedAtoms.clone(),dirtyAtoms:new Set(e.dirtyAtoms)}}function px(e,t){const n=XL(e,t,t.dirtyAtoms);for(const o of n){var r,i;(r=cx(o))===null||r===void 0||(i=r.invalidate)===null||i===void 0||i.call(r,t)}}function mx(e,t,n){Nc(e,{type:"set",recoilValue:t,valueOrUpdater:n})}function fP(e,t,n){if(n instanceof gg)return mx(e,t,n);Nc(e,{type:"setLoadable",recoilValue:t,loadable:n})}function pP(e,t){Nc(e,{type:"markModified",recoilValue:t})}function mP(e,t,n){Nc(e,{type:"setUnvalidated",recoilValue:t,unvalidatedValue:n})}function gP(e,{key:t},n,r=null){const i=KL(),o=e.getState();o.nodeToComponentSubscriptions.has(t)||o.nodeToComponentSubscriptions.set(t,new Map),Be(o.nodeToComponentSubscriptions.get(t)).set(i,[r??"<not captured>",n]);const a=tP();if(a.early&&(a.mode==="LEGACY"||a.mode==="MUTABLE_SOURCE")){const l=e.getState().nextTree;l&&l.dirtyAtoms.has(t)&&n(l)}return{release:()=>{const l=e.getState(),s=l.nodeToComponentSubscriptions.get(t);s===void 0||!s.has(i)||(s.delete(i),s.size===0&&l.nodeToComponentSubscriptions.delete(t))}}}function hP(e,t){var n;const{currentTree:r}=e.getState(),i=eP(t.key);(n=i.clearCache)===null||n===void 0||n.call(i,e,r)}var Qn={RecoilValueReadOnly:iP,AbstractRecoilValue:nP,RecoilState:rP,getRecoilValueAsLoadable:lP,setRecoilValue:mx,setRecoilValueLoadable:fP,markRecoilValueModified:pP,setUnvalidatedRecoilValue:mP,subscribeToRecoilValue:gP,isRecoilValue:oP,applyAtomValueWrites:sP,batchStart:dP,writeLoadableToTreeState:Ep,invalidateDownstreams:px,copyTreeState:fx,refreshRecoilValue:hP};function vP(e,t,n){const r=e.entries();let i=r.next();for(;!i.done;){const o=i.value;if(t.call(n,o[1],o[0],e))return!0;i=r.next()}return!1}var yP=vP;const{cleanUpNode:IP}=Yr,{deleteNodeConfigIfPossible:wP,getNode:gx}=Vt,{RetentionZone:hx}=bc,MP=12e4,vx=new Set;function yx(e,t){const n=e.getState(),r=n.currentTree;if(n.nextTree)return;const i=new Set;for(const a of t)if(a instanceof hx)for(const l of SP(n,a))i.add(l);else i.add(a);const o=xP(e,i);for(const a of o)NP(e,r,a)}function xP(e,t){const n=e.getState(),r=n.currentTree,i=e.getGraph(r.version),o=new Set,a=new Set;return l(t),o;function l(s){const u=new Set,c=bP(e,r,s,o,a);for(const g of c){var d;if(gx(g).retainedBy==="recoilRoot"){a.add(g);continue}if(((d=n.retention.referenceCounts.get(g))!==null&&d!==void 0?d:0)>0){a.add(g);continue}if(Ix(g).some(w=>n.retention.referenceCounts.get(w))){a.add(g);continue}const h=i.nodeToNodeSubscriptions.get(g);if(h&&yP(h,w=>a.has(w))){a.add(g);continue}o.add(g),u.add(g)}const f=new Set;for(const g of u)for(const h of(p=i.nodeDeps.get(g))!==null&&p!==void 0?p:vx){var p;o.has(h)||f.add(h)}f.size&&l(f)}}function bP(e,t,n,r,i){const o=e.getGraph(t.version),a=[],l=new Set;for(;n.size>0;)s(Be(n.values().next().value));return a;function s(u){if(r.has(u)||i.has(u)){n.delete(u);return}if(l.has(u))return;const c=o.nodeToNodeSubscriptions.get(u);if(c)for(const d of c)s(d);l.add(u),n.delete(u),a.push(u)}}function NP(e,t,n){if(!Ce("recoil_memory_managament_2020"))return;IP(e,n);const r=e.getState();r.knownAtoms.delete(n),r.knownSelectors.delete(n),r.nodeTransactionSubscriptions.delete(n),r.retention.referenceCounts.delete(n);const i=Ix(n);for(const s of i){var o;(o=r.retention.nodesRetainedByZone.get(s))===null||o===void 0||o.delete(n)}t.atomValues.delete(n),t.dirtyAtoms.delete(n),t.nonvalidatedAtoms.delete(n);const a=r.graphsByVersion.get(t.version);if(a){const s=a.nodeDeps.get(n);if(s!==void 0){a.nodeDeps.delete(n);for(const u of s){var l;(l=a.nodeToNodeSubscriptions.get(u))===null||l===void 0||l.delete(n)}}a.nodeToNodeSubscriptions.delete(n)}wP(n)}function SP(e,t){var n;return(n=e.retention.nodesRetainedByZone.get(t))!==null&&n!==void 0?n:vx}function Ix(e){const t=gx(e).retainedBy;return t===void 0||t==="components"||t==="recoilRoot"?[]:t instanceof hx?[t]:t}function DP(e,t){const n=e.getState();n.nextTree?n.retention.retainablesToCheckForRelease.add(t):yx(e,new Set([t]))}function AP(e,t,n){var r;if(!Ce("recoil_memory_managament_2020"))return;const i=e.getState().retention.referenceCounts,o=((r=i.get(t))!==null&&r!==void 0?r:0)+n;o===0?wx(e,t):i.set(t,o)}function wx(e,t){if(!Ce("recoil_memory_managament_2020"))return;e.getState().retention.referenceCounts.delete(t),DP(e,t)}function CP(e){if(!Ce("recoil_memory_managament_2020"))return;const t=e.getState();yx(e,t.retention.retainablesToCheckForRelease),t.retention.retainablesToCheckForRelease.clear()}function EP(e){return e===void 0?"recoilRoot":e}var Ei={SUSPENSE_TIMEOUT_MS:MP,updateRetainCount:AP,updateRetainCountToZero:wx,releaseScheduledRetainablesNow:CP,retainedByOptionWithDefault:EP};const{unstable_batchedUpdates:TP}=lM;var jP={unstable_batchedUpdates:TP};const{unstable_batchedUpdates:LP}=jP;var PP={unstable_batchedUpdates:LP};const{batchStart:RP}=Qn,{unstable_batchedUpdates:OP}=PP;let hg=OP||(e=>e());const kP=e=>{hg=e},zP=()=>hg,BP=e=>{hg(()=>{let t=()=>{};try{t=RP(),e()}finally{t()}})};var Sc={getBatcher:zP,setBatcher:kP,batchUpdates:BP};function*UP(e){for(const t of e)for(const n of t)yield n}var Mx=UP;const xx=typeof Window>"u"||typeof window>"u",$P=e=>!xx&&(e===window||e instanceof Window),_P=typeof navigator<"u"&&navigator.product==="ReactNative";var Dc={isSSR:xx,isReactNative:_P,isWindow:$P};function FP(e,t){let n;return(...r)=>{n||(n={});const i=t(...r);return Object.hasOwnProperty.call(n,i)||(n[i]=e(...r)),n[i]}}function HP(e,t){let n,r;return(...i)=>{const o=t(...i);return n===o||(n=o,r=e(...i)),r}}function GP(e,t){let n,r;return[(...a)=>{const l=t(...a);return n===l||(n=l,r=e(...a)),r},()=>{n=null}]}var WP={memoizeWithArgsHash:FP,memoizeOneWithArgsHash:HP,memoizeOneWithArgsHashAndInvalidation:GP};const{batchUpdates:Tp}=Sc,{initializeNode:VP,peekNodeInfo:ZP}=Yr,{graph:YP}=bl,{getNextStoreID:QP}=xc,{DEFAULT_VALUE:JP,recoilValues:Hv,recoilValuesForKeys:Gv}=Vt,{AbstractRecoilValue:XP,getRecoilValueAsLoadable:qP,setRecoilValue:Wv,setUnvalidatedRecoilValue:KP}=Qn,{updateRetainCount:Bs}=Ei,{setInvalidateMemoizedSnapshot:eR}=sx,{getNextTreeStateVersion:tR,makeEmptyStoreState:nR}=tx,{isSSR:rR}=Dc,{memoizeOneWithArgsHashAndInvalidation:iR}=WP;class Ac{constructor(t,n){pe(this,"_store",void 0),pe(this,"_refCount",1),pe(this,"getLoadable",r=>(this.checkRefCount_INTERNAL(),qP(this._store,r))),pe(this,"getPromise",r=>(this.checkRefCount_INTERNAL(),this.getLoadable(r).toPromise())),pe(this,"getNodes_UNSTABLE",r=>{if(this.checkRefCount_INTERNAL(),(r==null?void 0:r.isModified)===!0){if((r==null?void 0:r.isInitialized)===!1)return[];const a=this._store.getState().currentTree;return Gv(a.dirtyAtoms)}const i=this._store.getState().knownAtoms,o=this._store.getState().knownSelectors;return(r==null?void 0:r.isInitialized)==null?Hv.values():r.isInitialized===!0?Gv(Mx([i,o])):pg(Hv.values(),({key:a})=>!i.has(a)&&!o.has(a))}),pe(this,"getInfo_UNSTABLE",({key:r})=>(this.checkRefCount_INTERNAL(),ZP(this._store,this._store.getState().currentTree,r))),pe(this,"map",r=>{this.checkRefCount_INTERNAL();const i=new jp(this,Tp);return r(i),i}),pe(this,"asyncMap",async r=>{this.checkRefCount_INTERNAL();const i=new jp(this,Tp);return i.retain(),await r(i),i.autoRelease_INTERNAL(),i}),this._store={storeID:QP(),parentStoreID:n,getState:()=>t,replaceState:r=>{t.currentTree=r(t.currentTree)},getGraph:r=>{const i=t.graphsByVersion;if(i.has(r))return Be(i.get(r));const o=YP();return i.set(r,o),o},subscribeToTransactions:()=>({release:()=>{}}),addTransactionMetadata:()=>{throw ge("Cannot subscribe to Snapshots")}};for(const r of this._store.getState().knownAtoms)VP(this._store,r,"get"),Bs(this._store,r,1);this.autoRelease_INTERNAL()}retain(){this._refCount<=0,this._refCount++;let t=!1;return()=>{t||(t=!0,this._release())}}autoRelease_INTERNAL(){rR||window.setTimeout(()=>this._release(),10)}_release(){if(this._refCount--,this._refCount===0){if(this._store.getState().nodeCleanupFunctions.forEach(t=>t()),this._store.getState().nodeCleanupFunctions.clear(),!Ce("recoil_memory_managament_2020"))return}else this._refCount<0}isRetained(){return this._refCount>0}checkRefCount_INTERNAL(){Ce("recoil_memory_managament_2020")&&this._refCount<=0}getStore_INTERNAL(){return this.checkRefCount_INTERNAL(),this._store}getID(){return this.checkRefCount_INTERNAL(),this._store.getState().currentTree.stateID}getStoreID(){return this.checkRefCount_INTERNAL(),this._store.storeID}}function bx(e,t,n=!1){const r=e.getState(),i=n?tR():t.version;return{currentTree:{version:n?i:t.version,stateID:n?i:t.stateID,transactionMetadata:{...t.transactionMetadata},dirtyAtoms:new Set(t.dirtyAtoms),atomValues:t.atomValues.clone(),nonvalidatedAtoms:t.nonvalidatedAtoms.clone()},commitDepth:0,nextTree:null,previousTree:null,knownAtoms:new Set(r.knownAtoms),knownSelectors:new Set(r.knownSelectors),transactionSubscriptions:new Map,nodeTransactionSubscriptions:new Map,nodeToComponentSubscriptions:new Map,queuedComponentCallbacks_DEPRECATED:[],suspendedComponentResolvers:new Set,graphsByVersion:new Map().set(i,e.getGraph(t.version)),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map(Mc(r.nodeCleanupFunctions.entries(),([o])=>[o,()=>{}]))}}function oR(e){const t=new Ac(nR());return e!=null?t.map(e):t}const[Vv,Nx]=iR((e,t)=>{var n;const r=e.getState(),i=t==="latest"?(n=r.nextTree)!==null&&n!==void 0?n:r.currentTree:Be(r.previousTree);return new Ac(bx(e,i),e.storeID)},(e,t)=>{var n,r;return String(t)+String(e.storeID)+String((n=e.getState().nextTree)===null||n===void 0?void 0:n.version)+String(e.getState().currentTree.version)+String((r=e.getState().previousTree)===null||r===void 0?void 0:r.version)});eR(Nx);function aR(e,t="latest"){const n=Vv(e,t);return n.isRetained()?n:(Nx(),Vv(e,t))}class jp extends Ac{constructor(t,n){super(bx(t.getStore_INTERNAL(),t.getStore_INTERNAL().getState().currentTree,!0),t.getStoreID()),pe(this,"_batch",void 0),pe(this,"set",(r,i)=>{this.checkRefCount_INTERNAL();const o=this.getStore_INTERNAL();this._batch(()=>{Bs(o,r.key,1),Wv(this.getStore_INTERNAL(),r,i)})}),pe(this,"reset",r=>{this.checkRefCount_INTERNAL();const i=this.getStore_INTERNAL();this._batch(()=>{Bs(i,r.key,1),Wv(this.getStore_INTERNAL(),r,JP)})}),pe(this,"setUnvalidatedAtomValues_DEPRECATED",r=>{this.checkRefCount_INTERNAL();const i=this.getStore_INTERNAL();Tp(()=>{for(const[o,a]of r.entries())Bs(i,o,1),KP(i,new XP(o),a)})}),this._batch=n}}var Cc={Snapshot:Ac,MutableSnapshot:jp,freshSnapshot:oR,cloneSnapshot:aR},lR=Cc.Snapshot,sR=Cc.MutableSnapshot,uR=Cc.freshSnapshot,cR=Cc.cloneSnapshot,Ec=Object.freeze({__proto__:null,Snapshot:lR,MutableSnapshot:sR,freshSnapshot:uR,cloneSnapshot:cR});function dR(...e){const t=new Set;for(const n of e)for(const r of n)t.add(r);return t}var fR=dR;const{useRef:pR}=k;function mR(e){const t=pR(e);return t.current===e&&typeof e=="function"&&(t.current=e()),t}var Zv=mR;const{getNextTreeStateVersion:gR,makeEmptyStoreState:Sx}=tx,{cleanUpNode:hR,getDownstreamNodes:vR,initializeNode:yR,setNodeValue:IR,setUnvalidatedAtomValue_DEPRECATED:wR}=Yr,{graph:MR}=bl,{cloneGraph:xR}=bl,{getNextStoreID:Dx}=xc,{createMutableSource:ef,reactMode:Ax}=xl,{applyAtomValueWrites:bR}=Qn,{releaseScheduledRetainablesNow:Cx}=Ei,{freshSnapshot:NR}=Ec,{useCallback:SR,useContext:Ex,useEffect:Lp,useMemo:DR,useRef:AR,useState:CR}=k;function Jo(){throw ge("This component must be used inside a <RecoilRoot> component.")}const Tx=Object.freeze({storeID:Dx(),getState:Jo,replaceState:Jo,getGraph:Jo,subscribeToTransactions:Jo,addTransactionMetadata:Jo});let Pp=!1;function Yv(e){if(Pp)throw ge("An atom update was triggered within the execution of a state updater function. State updater functions provided to Recoil must be pure functions.");const t=e.getState();if(t.nextTree===null){Ce("recoil_memory_managament_2020")&&Ce("recoil_release_on_cascading_update_killswitch_2021")&&t.commitDepth>0&&Cx(e);const n=t.currentTree.version,r=gR();t.nextTree={...t.currentTree,version:r,stateID:r,dirtyAtoms:new Set,transactionMetadata:{}},t.graphsByVersion.set(r,xR(Be(t.graphsByVersion.get(n))))}}const jx=k.createContext({current:Tx}),Tc=()=>Ex(jx),Lx=k.createContext(null);function ER(){return Ex(Lx)}function vg(e,t,n){const r=vR(e,n,n.dirtyAtoms);for(const i of r){const o=t.nodeToComponentSubscriptions.get(i);if(o)for(const[a,[l,s]]of o)s(n)}}function Px(e){const t=e.getState(),n=t.currentTree,r=n.dirtyAtoms;if(r.size){for(const[i,o]of t.nodeTransactionSubscriptions)if(r.has(i))for(const[a,l]of o)l(e);for(const[i,o]of t.transactionSubscriptions)o(e);(!Ax().early||t.suspendedComponentResolvers.size>0)&&(vg(e,t,n),t.suspendedComponentResolvers.forEach(i=>i()),t.suspendedComponentResolvers.clear())}t.queuedComponentCallbacks_DEPRECATED.forEach(i=>i(n)),t.queuedComponentCallbacks_DEPRECATED.splice(0,t.queuedComponentCallbacks_DEPRECATED.length)}function TR(e){const t=e.getState();t.commitDepth++;try{const{nextTree:n}=t;if(n==null)return;t.previousTree=t.currentTree,t.currentTree=n,t.nextTree=null,Px(e),t.previousTree!=null?t.graphsByVersion.delete(t.previousTree.version):sg("Ended batch with no previous state, which is unexpected","recoil"),t.previousTree=null,Ce("recoil_memory_managament_2020")&&n==null&&Cx(e)}finally{t.commitDepth--}}function jR({setNotifyBatcherOfChange:e}){const t=Tc(),[,n]=CR([]);return e(()=>n({})),Lp(()=>(e(()=>n({})),()=>{e(()=>{})}),[e]),Lp(()=>{uL.enqueueExecution("Batcher",()=>{TR(t.current)})}),null}function LR(e,t){const n=Sx();return t({set:(r,i)=>{const o=n.currentTree,a=IR(e,o,r.key,i),l=new Set(a.keys()),s=o.nonvalidatedAtoms.clone();for(const u of l)s.delete(u);n.currentTree={...o,dirtyAtoms:fR(o.dirtyAtoms,l),atomValues:bR(o.atomValues,a),nonvalidatedAtoms:s}},setUnvalidatedAtomValues:r=>{r.forEach((i,o)=>{n.currentTree=wR(n.currentTree,o,i)})}}),n}function PR(e){const t=NR(e),n=t.getStore_INTERNAL().getState();return t.retain(),n.nodeCleanupFunctions.forEach(r=>r()),n.nodeCleanupFunctions.clear(),n}let Qv=0;function RR({initializeState_DEPRECATED:e,initializeState:t,store_INTERNAL:n,children:r}){let i;const o=p=>{const g=i.current.graphsByVersion;if(g.has(p))return Be(g.get(p));const h=MR();return g.set(p,h),h},a=(p,g)=>{if(g==null){const{transactionSubscriptions:h}=d.current.getState(),w=Qv++;return h.set(w,p),{release:()=>{h.delete(w)}}}else{const{nodeTransactionSubscriptions:h}=d.current.getState();h.has(g)||h.set(g,new Map);const w=Qv++;return Be(h.get(g)).set(w,p),{release:()=>{const I=h.get(g);I&&(I.delete(w),I.size===0&&h.delete(g))}}}},l=p=>{Yv(d.current);for(const g of Object.keys(p))Be(d.current.getState().nextTree).transactionMetadata[g]=p[g]},s=p=>{Yv(d.current);const g=Be(i.current.nextTree);let h;try{Pp=!0,h=p(g)}finally{Pp=!1}h!==g&&(i.current.nextTree=h,Ax().early&&vg(d.current,i.current,h),Be(u.current)())},u=AR(null),c=SR(p=>{u.current=p},[u]),d=Zv(()=>n??{storeID:Dx(),getState:()=>i.current,replaceState:s,getGraph:o,subscribeToTransactions:a,addTransactionMetadata:l});n!=null&&(d.current=n),i=Zv(()=>e!=null?LR(d.current,e):t!=null?PR(t):Sx());const f=DR(()=>ef==null?void 0:ef(i,()=>i.current.currentTree.version),[i]);return Lp(()=>{const p=d.current;for(const g of new Set(p.getState().knownAtoms))yR(p,g,"get");return()=>{for(const g of p.getState().knownAtoms)hR(p,g)}},[d]),k.createElement(jx.Provider,{value:d},k.createElement(Lx.Provider,{value:f},k.createElement(jR,{setNotifyBatcherOfChange:c}),r))}function OR(e){const{override:t,...n}=e,r=Tc();return t===!1&&r.current!==Tx?e.children:k.createElement(RR,n)}function kR(){return Tc().current.storeID}var fr={RecoilRoot:OR,useStoreRef:Tc,useRecoilMutableSource:ER,useRecoilStoreID:kR,notifyComponents_FOR_TESTING:vg,sendEndOfBatchNotifications_FOR_TESTING:Px};function zR(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n++)if(e[n]!==t[n])return!1;return!0}var BR=zR;const{useEffect:UR,useRef:$R}=k;function _R(e){const t=$R();return UR(()=>{t.current=e}),t.current}var Rx=_R;const{useStoreRef:FR}=fr,{SUSPENSE_TIMEOUT_MS:HR}=Ei,{updateRetainCount:Xo}=Ei,{RetentionZone:GR}=bc,{useEffect:WR,useRef:VR}=k,{isSSR:Jv}=Dc;function ZR(e){if(Ce("recoil_memory_managament_2020"))return YR(e)}function YR(e){const n=(Array.isArray(e)?e:[e]).map(a=>a instanceof GR?a:a.key),r=FR();WR(()=>{if(!Ce("recoil_memory_managament_2020"))return;const a=r.current;if(i.current&&!Jv)window.clearTimeout(i.current),i.current=null;else for(const l of n)Xo(a,l,1);return()=>{for(const l of n)Xo(a,l,-1)}},[r,...n]);const i=VR(),o=Rx(n);if(!Jv&&(o===void 0||!BR(o,n))){const a=r.current;for(const l of n)Xo(a,l,1);if(o)for(const l of o)Xo(a,l,-1);i.current&&window.clearTimeout(i.current),i.current=window.setTimeout(()=>{i.current=null;for(const l of n)Xo(a,l,-1)},HR)}}var yg=ZR;function QR(){return"<component name not available>"}var Sl=QR;const{batchUpdates:JR}=Sc,{DEFAULT_VALUE:Ox}=Vt,{currentRendererSupportsUseSyncExternalStore:XR,reactMode:Po,useMutableSource:qR,useSyncExternalStore:KR}=xl,{useRecoilMutableSource:eO,useStoreRef:Jn}=fr,{AbstractRecoilValue:Rp,getRecoilValueAsLoadable:Dl,setRecoilValue:wu,setUnvalidatedRecoilValue:tO,subscribeToRecoilValue:Io}=Qn,{useCallback:Gt,useEffect:wo,useMemo:kx,useRef:Aa,useState:Ig}=k,{setByAddingToSet:nO}=rx,{isSSR:rO}=Dc;function wg(e,t,n){if(e.state==="hasValue")return e.contents;throw e.state==="loading"?new Promise(i=>{const o=n.current.getState().suspendedComponentResolvers;o.add(i),rO&&Pe(e.contents)&&e.contents.finally(()=>{o.delete(i)})}):e.state==="hasError"?e.contents:ge(`Invalid value of loadable atom "${t.key}"`)}function iO(){const e=Sl(),t=Jn(),[,n]=Ig([]),r=Aa(new Set);r.current=new Set;const i=Aa(new Set),o=Aa(new Map),a=Gt(s=>{const u=o.current.get(s);u&&(u.release(),o.current.delete(s))},[o]),l=Gt((s,u)=>{o.current.has(u)&&n([])},[]);return wo(()=>{const s=t.current;Sa(r.current,i.current).forEach(u=>{if(o.current.has(u))return;const c=Io(s,new Rp(u),f=>l(f,u),e);o.current.set(u,c),s.getState().nextTree?s.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{l(s.getState(),u)}):l(s.getState(),u)}),Sa(i.current,r.current).forEach(u=>{a(u)}),i.current=r.current}),wo(()=>{const s=o.current;return Sa(r.current,new Set(s.keys())).forEach(u=>{const c=Io(t.current,new Rp(u),d=>l(d,u),e);s.set(u,c)}),()=>s.forEach((u,c)=>a(c))},[e,t,a,l]),kx(()=>{function s(g){return h=>{wu(t.current,g,h)}}function u(g){return()=>wu(t.current,g,Ox)}function c(g){var h;r.current.has(g.key)||(r.current=nO(r.current,g.key));const w=t.current.getState();return Dl(t.current,g,Po().early&&(h=w.nextTree)!==null&&h!==void 0?h:w.currentTree)}function d(g){const h=c(g);return wg(h,g,t)}function f(g){return[d(g),s(g)]}function p(g){return[c(g),s(g)]}return{getRecoilValue:d,getRecoilValueLoadable:c,getRecoilState:f,getRecoilStateLoadable:p,getSetRecoilState:s,getResetRecoilState:u}},[r,t])}const oO={current:0};function aO(e){const t=Jn(),n=Sl(),r=Gt(()=>{var l;const s=t.current,u=s.getState(),c=Po().early&&(l=u.nextTree)!==null&&l!==void 0?l:u.currentTree;return{loadable:Dl(s,e,c),key:e.key}},[t,e]),i=Gt(l=>{let s;return()=>{var u,c;const d=l();return(u=s)!==null&&u!==void 0&&u.loadable.is(d.loadable)&&((c=s)===null||c===void 0?void 0:c.key)===d.key?s:(s=d,d)}},[]),o=kx(()=>i(r),[r,i]),a=Gt(l=>{const s=t.current;return Io(s,e,l,n).release},[t,e,n]);return KR(a,o,o).loadable}function lO(e){const t=Jn(),n=Gt(()=>{var u;const c=t.current,d=c.getState(),f=Po().early&&(u=d.nextTree)!==null&&u!==void 0?u:d.currentTree;return Dl(c,e,f)},[t,e]),r=Gt(()=>n(),[n]),i=Sl(),o=Gt((u,c)=>{const d=t.current;return Io(d,e,()=>{if(!Ce("recoil_suppress_rerender_in_callback"))return c();const p=n();s.current.is(p)||c(),s.current=p},i).release},[t,e,i,n]),a=eO();if(a==null)throw ge("Recoil hooks must be used in components contained within a <RecoilRoot> component.");const l=qR(a,r,o),s=Aa(l);return wo(()=>{s.current=l}),l}function Op(e){const t=Jn(),n=Sl(),r=Gt(()=>{var s;const u=t.current,c=u.getState(),d=Po().early&&(s=c.nextTree)!==null&&s!==void 0?s:c.currentTree;return Dl(u,e,d)},[t,e]),i=Gt(()=>({loadable:r(),key:e.key}),[r,e.key]),o=Gt(s=>{const u=i();return s.loadable.is(u.loadable)&&s.key===u.key?s:u},[i]);wo(()=>{const s=Io(t.current,e,u=>{l(o)},n);return l(o),s.release},[n,e,t,o]);const[a,l]=Ig(i);return a.key!==e.key?i().loadable:a.loadable}function sO(e){const t=Jn(),[,n]=Ig([]),r=Sl(),i=Gt(()=>{var l;const s=t.current,u=s.getState(),c=Po().early&&(l=u.nextTree)!==null&&l!==void 0?l:u.currentTree;return Dl(s,e,c)},[t,e]),o=i(),a=Aa(o);return wo(()=>{a.current=o}),wo(()=>{const l=t.current,s=l.getState(),u=Io(l,e,d=>{var f;if(!Ce("recoil_suppress_rerender_in_callback"))return n([]);const p=i();(f=a.current)!==null&&f!==void 0&&f.is(p)||n(p),a.current=p},r);if(s.nextTree)l.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{a.current=null,n([])});else{var c;if(!Ce("recoil_suppress_rerender_in_callback"))return n([]);const d=i();(c=a.current)!==null&&c!==void 0&&c.is(d)||n(d),a.current=d}return u.release},[r,i,e,t]),o}function Mg(e){return Ce("recoil_memory_managament_2020")&&yg(e),{TRANSITION_SUPPORT:Op,SYNC_EXTERNAL_STORE:XR()?aO:Op,MUTABLE_SOURCE:lO,LEGACY:sO}[Po().mode](e)}function zx(e){const t=Jn(),n=Mg(e);return wg(n,e,t)}function jc(e){const t=Jn();return Gt(n=>{wu(t.current,e,n)},[t,e])}function uO(e){const t=Jn();return Gt(()=>{wu(t.current,e,Ox)},[t,e])}function cO(e){return[zx(e),jc(e)]}function dO(e){return[Mg(e),jc(e)]}function fO(){const e=Jn();return(t,n={})=>{JR(()=>{e.current.addTransactionMetadata(n),t.forEach((r,i)=>tO(e.current,new Rp(i),r))})}}function Bx(e){return Ce("recoil_memory_managament_2020")&&yg(e),Op(e)}function Ux(e){const t=Jn(),n=Bx(e);return wg(n,e,t)}function pO(e){return[Ux(e),jc(e)]}var mO={recoilComponentGetRecoilValueCount_FOR_TESTING:oO,useRecoilInterface:iO,useRecoilState:cO,useRecoilStateLoadable:dO,useRecoilValue:zx,useRecoilValueLoadable:Mg,useResetRecoilState:uO,useSetRecoilState:jc,useSetUnvalidatedAtomValues:fO,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:Bx,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:Ux,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:pO};function gO(e,t){const n=new Map;for(const[r,i]of e)t(i,r)&&n.set(r,i);return n}var hO=gO;function vO(e,t){const n=new Set;for(const r of e)t(r)&&n.add(r);return n}var yO=vO;function IO(...e){const t=new Map;for(let n=0;n<e.length;n++){const r=e[n].keys();let i;for(;!(i=r.next()).done;)t.set(i.value,e[n].get(i.value))}return t}var wO=IO;const{batchUpdates:MO}=Sc,{DEFAULT_VALUE:xO,getNode:$x,nodes:bO}=Vt,{useStoreRef:xg}=fr,{AbstractRecoilValue:NO,setRecoilValueLoadable:SO}=Qn,{SUSPENSE_TIMEOUT_MS:DO}=Ei,{cloneSnapshot:Mu}=Ec,{useCallback:Lc,useEffect:_x,useRef:Xv,useState:AO}=k,{isSSR:qv}=Dc;function Pc(e){const t=xg();_x(()=>t.current.subscribeToTransactions(e).release,[e,t])}function Kv(e){const t=e.atomValues.toMap(),n=Iu(hO(t,(r,i)=>{const a=$x(i).persistence_UNSTABLE;return a!=null&&a.type!=="none"&&r.state==="hasValue"}),r=>r.contents);return wO(e.nonvalidatedAtoms.toMap(),n)}function CO(e){Pc(Lc(t=>{let n=t.getState().previousTree;const r=t.getState().currentTree;n||(n=t.getState().currentTree);const i=Kv(r),o=Kv(n),a=Iu(bO,s=>{var u,c,d,f;return{persistence_UNSTABLE:{type:(u=(c=s.persistence_UNSTABLE)===null||c===void 0?void 0:c.type)!==null&&u!==void 0?u:"none",backButton:(d=(f=s.persistence_UNSTABLE)===null||f===void 0?void 0:f.backButton)!==null&&d!==void 0?d:!1}}}),l=yO(r.dirtyAtoms,s=>i.has(s)||o.has(s));e({atomValues:i,previousAtomValues:o,atomInfo:a,modifiedAtoms:l,transactionMetadata:{...r.transactionMetadata}})},[e]))}function EO(e){Pc(Lc(t=>{const n=Mu(t,"latest"),r=Mu(t,"previous");e({snapshot:n,previousSnapshot:r})},[e]))}function TO(){const e=xg(),[t,n]=AO(()=>Mu(e.current)),r=Rx(t),i=Xv(),o=Xv();if(Pc(Lc(l=>n(Mu(l)),[])),_x(()=>{const l=t.retain();if(i.current&&!qv){var s;window.clearTimeout(i.current),i.current=null,(s=o.current)===null||s===void 0||s.call(o),o.current=null}return()=>{window.setTimeout(l,10)}},[t]),r!==t&&!qv){if(i.current){var a;window.clearTimeout(i.current),i.current=null,(a=o.current)===null||a===void 0||a.call(o),o.current=null}o.current=t.retain(),i.current=window.setTimeout(()=>{var l;i.current=null,(l=o.current)===null||l===void 0||l.call(o),o.current=null},DO)}return t}function Fx(e,t){var n;const r=e.getState(),i=(n=r.nextTree)!==null&&n!==void 0?n:r.currentTree,o=t.getStore_INTERNAL().getState().currentTree;MO(()=>{const a=new Set;for(const u of[i.atomValues.keys(),o.atomValues.keys()])for(const c of u){var l,s;((l=i.atomValues.get(c))===null||l===void 0?void 0:l.contents)!==((s=o.atomValues.get(c))===null||s===void 0?void 0:s.contents)&&$x(c).shouldRestoreFromSnapshots&&a.add(c)}a.forEach(u=>{SO(e,new NO(u),o.atomValues.has(u)?Be(o.atomValues.get(u)):xO)}),e.replaceState(u=>({...u,stateID:t.getID()}))})}function jO(){const e=xg();return Lc(t=>Fx(e.current,t),[e])}var Hx={useRecoilSnapshot:TO,gotoSnapshot:Fx,useGotoRecoilSnapshot:jO,useRecoilTransactionObserver:EO,useTransactionObservation_DEPRECATED:CO,useTransactionSubscription_DEPRECATED:Pc};const{peekNodeInfo:LO}=Yr,{useStoreRef:PO}=fr;function RO(){const e=PO();return({key:t})=>LO(e.current,e.current.getState().currentTree,t)}var OO=RO;const{reactMode:kO}=xl,{RecoilRoot:zO,useStoreRef:BO}=fr,{useMemo:UO}=k;function $O(){kO().mode==="MUTABLE_SOURCE"&&console.warn("Warning: There are known issues using useRecoilBridgeAcrossReactRoots() in recoil_mutable_source rendering mode. Please consider upgrading to recoil_sync_external_store mode.");const e=BO().current;return UO(()=>{function t({children:n}){return k.createElement(zO,{store_INTERNAL:e},n)}return t},[e])}var _O=$O;const{loadableWithValue:FO}=Ml,{initializeNode:HO}=Yr,{DEFAULT_VALUE:GO,getNode:WO}=Vt,{copyTreeState:VO,getRecoilValueAsLoadable:ZO,invalidateDownstreams:YO,writeLoadableToTreeState:QO}=Qn;function ey(e){return WO(e.key).nodeType==="atom"}class JO{constructor(t,n){pe(this,"_store",void 0),pe(this,"_treeState",void 0),pe(this,"_changes",void 0),pe(this,"get",r=>{if(this._changes.has(r.key))return this._changes.get(r.key);if(!ey(r))throw ge("Reading selectors within atomicUpdate is not supported");const i=ZO(this._store,r,this._treeState);if(i.state==="hasValue")return i.contents;throw i.state==="hasError"?i.contents:ge(`Expected Recoil atom ${r.key} to have a value, but it is in a loading state.`)}),pe(this,"set",(r,i)=>{if(!ey(r))throw ge("Setting selectors within atomicUpdate is not supported");if(typeof i=="function"){const o=this.get(r);this._changes.set(r.key,i(o))}else HO(this._store,r.key,"set"),this._changes.set(r.key,i)}),pe(this,"reset",r=>{this.set(r,GO)}),this._store=t,this._treeState=n,this._changes=new Map}newTreeState_INTERNAL(){if(this._changes.size===0)return this._treeState;const t=VO(this._treeState);for(const[n,r]of this._changes)QO(t,n,FO(r));return YO(this._store,t),t}}function XO(e){return t=>{e.replaceState(n=>{const r=new JO(e,n);return t(r),r.newTreeState_INTERNAL()})}}var qO={atomicUpdater:XO},KO=qO.atomicUpdater,Gx=Object.freeze({__proto__:null,atomicUpdater:KO});function e2(e,t){if(!e)throw new Error(t)}var t2=e2,ca=t2;const{atomicUpdater:n2}=Gx,{batchUpdates:r2}=Sc,{DEFAULT_VALUE:i2}=Vt,{useStoreRef:o2}=fr,{refreshRecoilValue:a2,setRecoilValue:ty}=Qn,{cloneSnapshot:l2}=Ec,{gotoSnapshot:s2}=Hx,{useCallback:u2}=k;class Wx{}const c2=new Wx;function Vx(e,t,n,r){let i=c2,o;if(r2(()=>{const l="useRecoilCallback() expects a function that returns a function: it accepts a function of the type (RecoilInterface) => (Args) => ReturnType and returns a callback function (Args) => ReturnType, where RecoilInterface is an object {snapshot, set, ...} and Args and ReturnType are the argument and return types of the callback you want to create. Please see the docs at recoiljs.org for details.";if(typeof t!="function")throw ge(l);const s=ix({...r??{},set:(c,d)=>ty(e,c,d),reset:c=>ty(e,c,i2),refresh:c=>a2(e,c),gotoSnapshot:c=>s2(e,c),transact_UNSTABLE:c=>n2(e)(c)},{snapshot:()=>{const c=l2(e);return o=c.retain(),c}}),u=t(s);if(typeof u!="function")throw ge(l);i=u(...n)}),i instanceof Wx&&ca(!1),Pe(i))i=i.finally(()=>{var l;(l=o)===null||l===void 0||l()});else{var a;(a=o)===null||a===void 0||a()}return i}function d2(e,t){const n=o2();return u2((...r)=>Vx(n.current,e,r),t!=null?[...t,n]:void 0)}var Zx={recoilCallback:Vx,useRecoilCallback:d2};const{useStoreRef:f2}=fr,{refreshRecoilValue:p2}=Qn,{useCallback:m2}=k;function g2(e){const t=f2();return m2(()=>{const n=t.current;p2(n,e)},[e,t])}var h2=g2;const{atomicUpdater:v2}=Gx,{useStoreRef:y2}=fr,{useMemo:I2}=k;function w2(e,t){const n=y2();return I2(()=>(...r)=>{v2(n.current)(o=>{e(o)(...r)})},t!=null?[...t,n]:void 0)}var M2=w2;class x2{constructor(t){pe(this,"value",void 0),this.value=t}}var b2={WrappedValue:x2},N2=b2.WrappedValue,Yx=Object.freeze({__proto__:null,WrappedValue:N2});const{isFastRefreshEnabled:S2}=xl;class ny extends Error{}class D2{constructor(t){var n,r,i;pe(this,"_name",void 0),pe(this,"_numLeafs",void 0),pe(this,"_root",void 0),pe(this,"_onHit",void 0),pe(this,"_onSet",void 0),pe(this,"_mapNodeValue",void 0),this._name=t==null?void 0:t.name,this._numLeafs=0,this._root=null,this._onHit=(n=t==null?void 0:t.onHit)!==null&&n!==void 0?n:()=>{},this._onSet=(r=t==null?void 0:t.onSet)!==null&&r!==void 0?r:()=>{},this._mapNodeValue=(i=t==null?void 0:t.mapNodeValue)!==null&&i!==void 0?i:o=>o}size(){return this._numLeafs}root(){return this._root}get(t,n){var r;return(r=this.getLeafNode(t,n))===null||r===void 0?void 0:r.value}getLeafNode(t,n){if(this._root==null)return;let r=this._root;for(;r;){if(n==null||n.onNodeVisit(r),r.type==="leaf")return this._onHit(r),r;const i=this._mapNodeValue(t(r.nodeKey));r=r.branches.get(i)}}set(t,n,r){const i=()=>{var o,a,l,s;let u,c;for(const[w,I]of t){var d,f,p;const y=this._root;if((y==null?void 0:y.type)==="leaf")throw this.invalidCacheError();const M=u;if(u=M?M.branches.get(c):y,u=(d=u)!==null&&d!==void 0?d:{type:"branch",nodeKey:w,parent:M,branches:new Map,branchKey:c},u.type!=="branch"||u.nodeKey!==w)throw this.invalidCacheError();M==null||M.branches.set(c,u),r==null||(f=r.onNodeVisit)===null||f===void 0||f.call(r,u),c=this._mapNodeValue(I),this._root=(p=this._root)!==null&&p!==void 0?p:u}const g=u?(o=u)===null||o===void 0?void 0:o.branches.get(c):this._root;if(g!=null&&(g.type!=="leaf"||g.branchKey!==c))throw this.invalidCacheError();const h={type:"leaf",value:n,parent:u,branchKey:c};(a=u)===null||a===void 0||a.branches.set(c,h),this._root=(l=this._root)!==null&&l!==void 0?l:h,this._numLeafs++,this._onSet(h),r==null||(s=r.onNodeVisit)===null||s===void 0||s.call(r,h)};try{i()}catch(o){if(o instanceof ny)this.clear(),i();else throw o}}delete(t){const n=this.root();if(!n)return!1;if(t===n)return this._root=null,this._numLeafs=0,!0;let r=t.parent,i=t.branchKey;for(;r;){var o;if(r.branches.delete(i),r===n)return r.branches.size===0?(this._root=null,this._numLeafs=0):this._numLeafs--,!0;if(r.branches.size>0)break;i=(o=r)===null||o===void 0?void 0:o.branchKey,r=r.parent}for(;r!==n;r=r.parent)if(r==null)return!1;return this._numLeafs--,!0}clear(){this._numLeafs=0,this._root=null}invalidCacheError(){const t=S2()?"Possible Fast Refresh module reload detected. This may also be caused by an selector returning inconsistent values. Resetting cache.":"Invalid cache values. This happens when selectors do not return consistent values for the same input dependency values. That may also be caused when using Fast Refresh to change a selector implementation. Resetting cache.";throw sg(t+(this._name!=null?` - ${this._name}`:"")),new ny}}var A2={TreeCache:D2},C2=A2.TreeCache,Qx=Object.freeze({__proto__:null,TreeCache:C2});class E2{constructor(t){var n;pe(this,"_maxSize",void 0),pe(this,"_size",void 0),pe(this,"_head",void 0),pe(this,"_tail",void 0),pe(this,"_map",void 0),pe(this,"_keyMapper",void 0),this._maxSize=t.maxSize,this._size=0,this._head=null,this._tail=null,this._map=new Map,this._keyMapper=(n=t.mapKey)!==null&&n!==void 0?n:r=>r}head(){return this._head}tail(){return this._tail}size(){return this._size}maxSize(){return this._maxSize}has(t){return this._map.has(this._keyMapper(t))}get(t){const n=this._keyMapper(t),r=this._map.get(n);if(r)return this.set(t,r.value),r.value}set(t,n){const r=this._keyMapper(t);this._map.get(r)&&this.delete(t);const o=this.head(),a={key:t,right:o,left:null,value:n};o?o.left=a:this._tail=a,this._map.set(r,a),this._head=a,this._size++,this._maybeDeleteLRU()}_maybeDeleteLRU(){this.size()>this.maxSize()&&this.deleteLru()}deleteLru(){const t=this.tail();t&&this.delete(t.key)}delete(t){const n=this._keyMapper(t);if(!this._size||!this._map.has(n))return;const r=Be(this._map.get(n)),i=r.right,o=r.left;i&&(i.left=r.left),o&&(o.right=r.right),r===this.head()&&(this._head=i),r===this.tail()&&(this._tail=o),this._map.delete(n),this._size--}clear(){this._size=0,this._head=null,this._tail=null,this._map=new Map}}var T2={LRUCache:E2},j2=T2.LRUCache,Jx=Object.freeze({__proto__:null,LRUCache:j2});const{LRUCache:L2}=Jx,{TreeCache:P2}=Qx;function R2({name:e,maxSize:t,mapNodeValue:n=r=>r}){const r=new L2({maxSize:t}),i=new P2({name:e,mapNodeValue:n,onHit:o=>{r.set(o,!0)},onSet:o=>{const a=r.tail();r.set(o,!0),a&&i.size()>t&&i.delete(a.key)}});return i}var ry=R2;function Nn(e,t,n){if(typeof e=="string"&&!e.includes('"')&&!e.includes("\\"))return`"${e}"`;switch(typeof e){case"undefined":return"";case"boolean":return e?"true":"false";case"number":case"symbol":return String(e);case"string":return JSON.stringify(e);case"function":if((t==null?void 0:t.allowFunctions)!==!0)throw ge("Attempt to serialize function in a Recoil cache key");return`__FUNCTION(${e.name})__`}if(e===null)return"null";if(typeof e!="object"){var r;return(r=JSON.stringify(e))!==null&&r!==void 0?r:""}if(Pe(e))return"__PROMISE__";if(Array.isArray(e))return`[${e.map((i,o)=>Nn(i,t,o.toString()))}]`;if(typeof e.toJSON=="function")return Nn(e.toJSON(n),t,n);if(e instanceof Map){const i={};for(const[o,a]of e)i[typeof o=="string"?o:Nn(o,t)]=a;return Nn(i,t,n)}return e instanceof Set?Nn(Array.from(e).sort((i,o)=>Nn(i,t).localeCompare(Nn(o,t))),t,n):Symbol!==void 0&&e[Symbol.iterator]!=null&&typeof e[Symbol.iterator]=="function"?Nn(Array.from(e),t,n):`{${Object.keys(e).filter(i=>e[i]!==void 0).sort().map(i=>`${Nn(i,t)}:${Nn(e[i],t,i)}`).join(",")}}`}function O2(e,t={allowFunctions:!1}){return Nn(e,t)}var Rc=O2;const{TreeCache:k2}=Qx,ds={equality:"reference",eviction:"keep-all",maxSize:1/0};function z2({equality:e=ds.equality,eviction:t=ds.eviction,maxSize:n=ds.maxSize}=ds,r){const i=B2(e);return U2(t,n,i,r)}function B2(e){switch(e){case"reference":return t=>t;case"value":return t=>Rc(t)}throw ge(`Unrecognized equality policy ${e}`)}function U2(e,t,n,r){switch(e){case"keep-all":return new k2({name:r,mapNodeValue:n});case"lru":return ry({name:r,maxSize:Be(t),mapNodeValue:n});case"most-recent":return ry({name:r,maxSize:1,mapNodeValue:n})}throw ge(`Unrecognized eviction policy ${e}`)}var $2=z2;function _2(e){return()=>null}var F2={startPerfBlock:_2};const{isLoadable:H2,loadableWithError:fs,loadableWithPromise:G2,loadableWithValue:tf}=Ml,{WrappedValue:Xx}=Yx,{getNodeLoadable:ps,peekNodeLoadable:W2,setNodeValue:V2}=Yr,{saveDepsToStore:Z2}=bl,{DEFAULT_VALUE:Y2,getConfigDeletionHandler:Q2,getNode:J2,registerNode:iy}=Vt,{isRecoilValue:X2}=yo,{markRecoilValueModified:oy}=Qn,{retainedByOptionWithDefault:q2}=Ei,{recoilCallback:K2}=Zx,{startPerfBlock:e4}=F2;class qx{}const qo=new qx,Ko=[],ms=new Map,t4=(()=>{let e=0;return()=>e++})();function Kx(e){let t=null;const{key:n,get:r,cachePolicy_UNSTABLE:i}=e,o=e.set!=null?e.set:void 0,a=new Set,l=$2(i??{equality:"reference",eviction:"keep-all"},n),s=q2(e.retainedBy_UNSTABLE),u=new Map;let c=0;function d(){return!Ce("recoil_memory_managament_2020")||c>0}function f(D){return D.getState().knownSelectors.add(n),c++,()=>{c--}}function p(){return Q2(n)!==void 0&&!d()}function g(D,E,T,z,_){$(E,z,_),h(D,T)}function h(D,E){W(D,E)&&U(D),I(E,!0)}function w(D,E){W(D,E)&&(Be(R(D)).stateVersions.clear(),I(E,!1))}function I(D,E){const T=ms.get(D);if(T!=null){for(const z of T)oy(z,Be(t));E&&ms.delete(D)}}function y(D,E){let T=ms.get(E);T==null&&ms.set(E,T=new Set),T.add(D)}function M(D,E,T,z,_,ie){return E.then(ue=>{if(!d())throw U(D),qo;const X=tf(ue);return g(D,T,_,X,z),ue}).catch(ue=>{if(!d())throw U(D),qo;if(Pe(ue))return x(D,ue,T,z,_,ie);const X=fs(ue);throw g(D,T,_,X,z),ue})}function x(D,E,T,z,_,ie){return E.then(ue=>{if(!d())throw U(D),qo;ie.loadingDepKey!=null&&ie.loadingDepPromise===E?T.atomValues.set(ie.loadingDepKey,tf(ue)):D.getState().knownSelectors.forEach(ve=>{T.atomValues.delete(ve)});const X=N(D,T);if(X&&X.state!=="loading"){if((W(D,_)||R(D)==null)&&h(D,_),X.state==="hasValue")return X.contents;throw X.contents}if(!W(D,_)){const ve=P(D,T);if(ve!=null)return ve.loadingLoadable.contents}const[me,Ie]=b(D,T,_);if(me.state!=="loading"&&g(D,T,_,me,Ie),me.state==="hasError")throw me.contents;return me.contents}).catch(ue=>{if(ue instanceof qx)throw qo;if(!d())throw U(D),qo;const X=fs(ue);throw g(D,T,_,X,z),ue})}function S(D,E,T,z){var _,ie,ue,X;if(W(D,z)||E.version===((_=D.getState())===null||_===void 0||(ie=_.currentTree)===null||ie===void 0?void 0:ie.version)||E.version===((ue=D.getState())===null||ue===void 0||(X=ue.nextTree)===null||X===void 0?void 0:X.version)){var me,Ie,ve;Z2(n,T,D,(me=(Ie=D.getState())===null||Ie===void 0||(ve=Ie.nextTree)===null||ve===void 0?void 0:ve.version)!==null&&me!==void 0?me:D.getState().currentTree.version)}for(const Ae of T)a.add(Ae)}function b(D,E,T){const z=e4(n);let _=!0,ie=!0;const ue=()=>{z(),ie=!1};let X,me=!1,Ie;const ve={loadingDepKey:null,loadingDepPromise:null},Ae=new Map;function ft({key:tt}){const Je=ps(D,E,tt);switch(Ae.set(tt,Je),_||(S(D,E,new Set(Ae.keys()),T),w(D,T)),Je.state){case"hasValue":return Je.contents;case"hasError":throw Je.contents;case"loading":throw ve.loadingDepKey=tt,ve.loadingDepPromise=Je.contents,Je.contents}throw ge("Invalid Loadable state")}const sn=tt=>(...Je)=>{if(ie)throw ge("Callbacks from getCallback() should only be called asynchronously after the selector is evalutated. It can be used for selectors to return objects with callbacks that can work with Recoil state without a subscription.");return t==null&&ca(!1),K2(D,tt,Je,{node:t})};try{X=r({get:ft,getCallback:sn}),X=X2(X)?ft(X):X,H2(X)&&(X.state==="hasError"&&(me=!0),X=X.contents),Pe(X)?X=M(D,X,E,Ae,T,ve).finally(ue):ue(),X=X instanceof Xx?X.value:X}catch(tt){X=tt,Pe(X)?X=x(D,X,E,Ae,T,ve).finally(ue):(me=!0,ue())}return me?Ie=fs(X):Pe(X)?Ie=G2(X):Ie=tf(X),_=!1,J(D,T,Ae),S(D,E,new Set(Ae.keys()),T),[Ie,Ae]}function N(D,E){let T=E.atomValues.get(n);if(T!=null)return T;const z=new Set;try{T=l.get(ie=>(typeof ie!="string"&&ca(!1),ps(D,E,ie).contents),{onNodeVisit:ie=>{ie.type==="branch"&&ie.nodeKey!==n&&z.add(ie.nodeKey)}})}catch(ie){throw ge(`Problem with cache lookup for selector "${n}": ${ie.message}`)}if(T){var _;E.atomValues.set(n,T),S(D,E,z,(_=R(D))===null||_===void 0?void 0:_.executionID)}return T}function C(D,E){const T=N(D,E);if(T!=null)return U(D),T;const z=P(D,E);if(z!=null){var _;return((_=z.loadingLoadable)===null||_===void 0?void 0:_.state)==="loading"&&y(D,z.executionID),z.loadingLoadable}const ie=t4(),[ue,X]=b(D,E,ie);return ue.state==="loading"?(O(D,ie,ue,X,E),y(D,ie)):(U(D),$(E,ue,X)),ue}function P(D,E){const T=Mx([u.has(D)?[Be(u.get(D))]:[],Mc(pg(u,([_])=>_!==D),([,_])=>_)]);function z(_){for(const[ie,ue]of _)if(!ps(D,E,ie).is(ue))return!0;return!1}for(const _ of T){if(_.stateVersions.get(E.version)||!z(_.depValuesDiscoveredSoFarDuringAsyncWork))return _.stateVersions.set(E.version,!0),_;_.stateVersions.set(E.version,!1)}}function R(D){return u.get(D)}function O(D,E,T,z,_){u.set(D,{depValuesDiscoveredSoFarDuringAsyncWork:z,executionID:E,loadingLoadable:T,stateVersions:new Map([[_.version,!0]])})}function J(D,E,T){if(W(D,E)){const z=R(D);z!=null&&(z.depValuesDiscoveredSoFarDuringAsyncWork=T)}}function U(D){u.delete(D)}function W(D,E){var T;return E===((T=R(D))===null||T===void 0?void 0:T.executionID)}function Z(D){return Array.from(D.entries()).map(([E,T])=>[E,T.contents])}function $(D,E,T){D.atomValues.set(n,E);try{l.set(Z(T),E)}catch(z){throw ge(`Problem with setting cache for selector "${n}": ${z.message}`)}}function ee(D){if(Ko.includes(n)){const E=`Recoil selector has circular dependencies: ${Ko.slice(Ko.indexOf(n)).join(" → ")}`;return fs(ge(E))}Ko.push(n);try{return D()}finally{Ko.pop()}}function L(D,E){const T=E.atomValues.get(n);return T??l.get(z=>{var _;return typeof z!="string"&&ca(!1),(_=W2(D,E,z))===null||_===void 0?void 0:_.contents})}function B(D,E){return ee(()=>C(D,E))}function F(D){D.atomValues.delete(n)}function V(D,E){t==null&&ca(!1);for(const z of a){var T;const _=J2(z);(T=_.clearCache)===null||T===void 0||T.call(_,D,E)}a.clear(),F(E),l.clear(),oy(D,t)}return o!=null?t=iy({key:n,nodeType:"selector",peek:L,get:B,set:(E,T,z)=>{let _=!1;const ie=new Map;function ue({key:ve}){if(_)throw ge("Recoil: Async selector sets are not currently supported.");const Ae=ps(E,T,ve);if(Ae.state==="hasValue")return Ae.contents;if(Ae.state==="loading"){const ft=`Getting value of asynchronous atom or selector "${ve}" in a pending state while setting selector "${n}" is not yet supported.`;throw ge(ft)}else throw Ae.contents}function X(ve,Ae){if(_)throw ge("Recoil: Async selector sets are not currently supported.");const ft=typeof Ae=="function"?Ae(ue(ve)):Ae;V2(E,T,ve.key,ft).forEach((tt,Je)=>ie.set(Je,tt))}function me(ve){X(ve,Y2)}const Ie=o({set:X,get:ue,reset:me},z);if(Ie!==void 0)throw Pe(Ie)?ge("Recoil: Async selector sets are not currently supported."):ge("Recoil: selector set should be a void function.");return _=!0,ie},init:f,invalidate:F,clearCache:V,shouldDeleteConfigOnRelease:p,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:s}):t=iy({key:n,nodeType:"selector",peek:L,get:B,init:f,invalidate:F,clearCache:V,shouldDeleteConfigOnRelease:p,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:s})}Kx.value=e=>new Xx(e);var Mo=Kx;const{isLoadable:n4,loadableWithError:nf,loadableWithPromise:rf,loadableWithValue:Oi}=Ml,{WrappedValue:eb}=Yx,{peekNodeInfo:r4}=Yr,{DEFAULT_VALUE:ri,DefaultValue:vr,getConfigDeletionHandler:tb,registerNode:i4,setConfigDeletionHandler:o4}=Vt,{isRecoilValue:a4}=yo,{getRecoilValueAsLoadable:l4,markRecoilValueModified:s4,setRecoilValue:ay,setRecoilValueLoadable:u4}=Qn,{retainedByOptionWithDefault:c4}=Ei,ea=e=>e instanceof eb?e.value:e;function d4(e){const{key:t,persistence_UNSTABLE:n}=e,r=c4(e.retainedBy_UNSTABLE);let i=0;function o(y){return rf(y.then(M=>(a=Oi(M),M)).catch(M=>{throw a=nf(M),M}))}let a=Pe(e.default)?o(e.default):n4(e.default)?e.default.state==="loading"?o(e.default.contents):e.default:Oi(ea(e.default));a.contents;let l;const s=new Map;function u(y){return y}function c(y,M){const x=M.then(S=>{var b,N;return((N=((b=y.getState().nextTree)!==null&&b!==void 0?b:y.getState().currentTree).atomValues.get(t))===null||N===void 0?void 0:N.contents)===x&&ay(y,I,S),S}).catch(S=>{var b,N;throw((N=((b=y.getState().nextTree)!==null&&b!==void 0?b:y.getState().currentTree).atomValues.get(t))===null||N===void 0?void 0:N.contents)===x&&u4(y,I,nf(S)),S});return x}function d(y,M,x){var S;i++;const b=()=>{var U;i--,(U=s.get(y))===null||U===void 0||U.forEach(W=>W()),s.delete(y)};if(y.getState().knownAtoms.add(t),a.state==="loading"){const U=()=>{var W;((W=y.getState().nextTree)!==null&&W!==void 0?W:y.getState().currentTree).atomValues.has(t)||s4(y,I)};a.contents.finally(U)}const N=(S=e.effects)!==null&&S!==void 0?S:e.effects_UNSTABLE;if(N!=null){let ee=function(E){if(W&&E.key===t){const T=U;return T instanceof vr?f(y,M):Pe(T)?rf(T.then(z=>z instanceof vr?a.toPromise():z)):Oi(T)}return l4(y,E)},L=function(E){return ee(E).toPromise()},B=function(E){var T;const z=r4(y,(T=y.getState().nextTree)!==null&&T!==void 0?T:y.getState().currentTree,E.key);return W&&E.key===t&&!(U instanceof vr)?{...z,isSet:!0,loadable:ee(E)}:z};var R=ee,O=L,J=B;let U=ri,W=!0,Z=!1,$=null;const F=E=>T=>{if(W){const z=ee(I),_=z.state==="hasValue"?z.contents:ri;U=typeof T=="function"?T(_):T,Pe(U)&&(U=U.then(ie=>($={effect:E,value:ie},ie)))}else{if(Pe(T))throw ge("Setting atoms to async values is not implemented.");typeof T!="function"&&($={effect:E,value:ea(T)}),ay(y,I,typeof T=="function"?z=>{const _=ea(T(z));return $={effect:E,value:_},_}:ea(T))}},V=E=>()=>F(E)(ri),D=E=>T=>{var z;const{release:_}=y.subscribeToTransactions(ie=>{var ue;let{currentTree:X,previousTree:me}=ie.getState();me||(me=X);const Ie=(ue=X.atomValues.get(t))!==null&&ue!==void 0?ue:a;if(Ie.state==="hasValue"){var ve,Ae,ft,sn;const tt=Ie.contents,Je=(ve=me.atomValues.get(t))!==null&&ve!==void 0?ve:a,ji=Je.state==="hasValue"?Je.contents:ri;((Ae=$)===null||Ae===void 0?void 0:Ae.effect)!==E||((ft=$)===null||ft===void 0?void 0:ft.value)!==tt?T(tt,ji,!X.atomValues.has(t)):((sn=$)===null||sn===void 0?void 0:sn.effect)===E&&($=null)}},t);s.set(y,[...(z=s.get(y))!==null&&z!==void 0?z:[],_])};for(const E of N)try{const T=E({node:I,storeID:y.storeID,parentStoreID_UNSTABLE:y.parentStoreID,trigger:x,setSelf:F(E),resetSelf:V(E),onSet:D(E),getPromise:L,getLoadable:ee,getInfo_UNSTABLE:B});if(T!=null){var C;s.set(y,[...(C=s.get(y))!==null&&C!==void 0?C:[],T])}}catch(T){U=T,Z=!0}if(W=!1,!(U instanceof vr)){var P;const E=Z?nf(U):Pe(U)?rf(c(y,U)):Oi(ea(U));E.contents,M.atomValues.set(t,E),(P=y.getState().nextTree)===null||P===void 0||P.atomValues.set(t,E)}}return b}function f(y,M){var x,S;return(x=(S=M.atomValues.get(t))!==null&&S!==void 0?S:l)!==null&&x!==void 0?x:a}function p(y,M){if(M.atomValues.has(t))return Be(M.atomValues.get(t));if(M.nonvalidatedAtoms.has(t)){if(l!=null)return l;if(n==null)return a;const x=M.nonvalidatedAtoms.get(t),S=n.validator(x,ri);return l=S instanceof vr?a:Oi(S),l}else return a}function g(){l=void 0}function h(y,M,x){if(M.atomValues.has(t)){const S=Be(M.atomValues.get(t));if(S.state==="hasValue"&&x===S.contents)return new Map}else if(!M.nonvalidatedAtoms.has(t)&&x instanceof vr)return new Map;return l=void 0,new Map().set(t,Oi(x))}function w(){return tb(t)!==void 0&&i<=0}const I=i4({key:t,nodeType:"atom",peek:f,get:p,set:h,init:d,invalidate:g,shouldDeleteConfigOnRelease:w,dangerouslyAllowMutability:e.dangerouslyAllowMutability,persistence_UNSTABLE:e.persistence_UNSTABLE?{type:e.persistence_UNSTABLE.type,backButton:e.persistence_UNSTABLE.backButton}:void 0,shouldRestoreFromSnapshots:!0,retainedBy:r});return I}function bg(e){const{...t}=e,n="default"in e?e.default:new Promise(()=>{});return a4(n)?f4({...t,default:n}):d4({...t,default:n})}function f4(e){const t=bg({...e,default:ri,persistence_UNSTABLE:e.persistence_UNSTABLE===void 0?void 0:{...e.persistence_UNSTABLE,validator:r=>r instanceof vr?r:Be(e.persistence_UNSTABLE).validator(r,ri)},effects:e.effects,effects_UNSTABLE:e.effects_UNSTABLE}),n=Mo({key:`${e.key}__withFallback`,get:({get:r})=>{const i=r(t);return i instanceof vr?e.default:i},set:({set:r},i)=>r(t,i),cachePolicy_UNSTABLE:{eviction:"most-recent"},dangerouslyAllowMutability:e.dangerouslyAllowMutability});return o4(n.key,tb(e.key)),n}bg.value=e=>new eb(e);var nb=bg;class p4{constructor(t){var n;pe(this,"_map",void 0),pe(this,"_keyMapper",void 0),this._map=new Map,this._keyMapper=(n=t==null?void 0:t.mapKey)!==null&&n!==void 0?n:r=>r}size(){return this._map.size}has(t){return this._map.has(this._keyMapper(t))}get(t){return this._map.get(this._keyMapper(t))}set(t,n){this._map.set(this._keyMapper(t),n)}delete(t){this._map.delete(this._keyMapper(t))}clear(){this._map.clear()}}var m4={MapCache:p4},g4=m4.MapCache,h4=Object.freeze({__proto__:null,MapCache:g4});const{LRUCache:ly}=Jx,{MapCache:v4}=h4,gs={equality:"reference",eviction:"none",maxSize:1/0};function y4({equality:e=gs.equality,eviction:t=gs.eviction,maxSize:n=gs.maxSize}=gs){const r=I4(e);return w4(t,n,r)}function I4(e){switch(e){case"reference":return t=>t;case"value":return t=>Rc(t)}throw ge(`Unrecognized equality policy ${e}`)}function w4(e,t,n){switch(e){case"keep-all":return new v4({mapKey:n});case"lru":return new ly({mapKey:n,maxSize:Be(t)});case"most-recent":return new ly({mapKey:n,maxSize:1})}throw ge(`Unrecognized eviction policy ${e}`)}var rb=y4;const{setConfigDeletionHandler:M4}=Vt;function x4(e){var t,n;const r=rb({equality:(t=(n=e.cachePolicyForParams_UNSTABLE)===null||n===void 0?void 0:n.equality)!==null&&t!==void 0?t:"value",eviction:"keep-all"});return i=>{var o,a;const l=r.get(i);if(l!=null)return l;const{cachePolicyForParams_UNSTABLE:s,...u}=e,c="default"in e?e.default:new Promise(()=>{}),d=nb({...u,key:`${e.key}__${(o=Rc(i))!==null&&o!==void 0?o:"void"}`,default:typeof c=="function"?c(i):c,retainedBy_UNSTABLE:typeof e.retainedBy_UNSTABLE=="function"?e.retainedBy_UNSTABLE(i):e.retainedBy_UNSTABLE,effects:typeof e.effects=="function"?e.effects(i):typeof e.effects_UNSTABLE=="function"?e.effects_UNSTABLE(i):(a=e.effects)!==null&&a!==void 0?a:e.effects_UNSTABLE});return r.set(i,d),M4(d.key,()=>{r.delete(i)}),d}}var b4=x4;const{setConfigDeletionHandler:N4}=Vt;let S4=0;function D4(e){var t,n;const r=rb({equality:(t=(n=e.cachePolicyForParams_UNSTABLE)===null||n===void 0?void 0:n.equality)!==null&&t!==void 0?t:"value",eviction:"keep-all"});return i=>{var o;let a;try{a=r.get(i)}catch(f){throw ge(`Problem with cache lookup for selector ${e.key}: ${f.message}`)}if(a!=null)return a;const l=`${e.key}__selectorFamily/${(o=Rc(i,{allowFunctions:!0}))!==null&&o!==void 0?o:"void"}/${S4++}`,s=f=>e.get(i)(f),u=e.cachePolicy_UNSTABLE,c=typeof e.retainedBy_UNSTABLE=="function"?e.retainedBy_UNSTABLE(i):e.retainedBy_UNSTABLE;let d;if(e.set!=null){const f=e.set;d=Mo({key:l,get:s,set:(g,h)=>f(i)(g,h),cachePolicy_UNSTABLE:u,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:c})}else d=Mo({key:l,get:s,cachePolicy_UNSTABLE:u,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:c});return r.set(i,d),N4(d.key,()=>{r.delete(i)}),d}}var Qr=D4;const A4=Qr({key:"__constant",get:e=>()=>e,cachePolicyForParams_UNSTABLE:{equality:"reference"}});function C4(e){return A4(e)}var E4=C4;const T4=Qr({key:"__error",get:e=>()=>{throw ge(e)},cachePolicyForParams_UNSTABLE:{equality:"reference"}});function j4(e){return T4(e)}var L4=j4;function P4(e){return e}var R4=P4;const{loadableWithError:ib,loadableWithPromise:ob,loadableWithValue:ab}=Ml;function Oc(e,t){const n=Array(t.length).fill(void 0),r=Array(t.length).fill(void 0);for(const[i,o]of t.entries())try{n[i]=e(o)}catch(a){r[i]=a}return[n,r]}function O4(e){return e!=null&&!Pe(e)}function kc(e){return Array.isArray(e)?e:Object.getOwnPropertyNames(e).map(t=>e[t])}function kp(e,t){return Array.isArray(e)?t:Object.getOwnPropertyNames(e).reduce((n,r,i)=>({...n,[r]:t[i]}),{})}function io(e,t,n){const r=n.map((i,o)=>i==null?ab(t[o]):Pe(i)?ob(i):ib(i));return kp(e,r)}function k4(e,t){return t.map((n,r)=>n===void 0?e[r]:n)}const z4=Qr({key:"__waitForNone",get:e=>({get:t})=>{const n=kc(e),[r,i]=Oc(t,n);return io(e,r,i)},dangerouslyAllowMutability:!0}),B4=Qr({key:"__waitForAny",get:e=>({get:t})=>{const n=kc(e),[r,i]=Oc(t,n);return i.some(o=>!Pe(o))?io(e,r,i):new Promise(o=>{for(const[a,l]of i.entries())Pe(l)&&l.then(s=>{r[a]=s,i[a]=void 0,o(io(e,r,i))}).catch(s=>{i[a]=s,o(io(e,r,i))})})},dangerouslyAllowMutability:!0}),U4=Qr({key:"__waitForAll",get:e=>({get:t})=>{const n=kc(e),[r,i]=Oc(t,n);if(i.every(a=>a==null))return kp(e,r);const o=i.find(O4);if(o!=null)throw o;return Promise.all(i).then(a=>kp(e,k4(r,a)))},dangerouslyAllowMutability:!0}),$4=Qr({key:"__waitForAllSettled",get:e=>({get:t})=>{const n=kc(e),[r,i]=Oc(t,n);return i.every(o=>!Pe(o))?io(e,r,i):Promise.all(i.map((o,a)=>Pe(o)?o.then(l=>{r[a]=l,i[a]=void 0}).catch(l=>{r[a]=void 0,i[a]=l}):null)).then(()=>io(e,r,i))},dangerouslyAllowMutability:!0}),_4=Qr({key:"__noWait",get:e=>({get:t})=>{try{return Mo.value(ab(t(e)))}catch(n){return Mo.value(Pe(n)?ob(n):ib(n))}},dangerouslyAllowMutability:!0});var F4={waitForNone:z4,waitForAny:B4,waitForAll:U4,waitForAllSettled:$4,noWait:_4};const{RecoilLoadable:H4}=Ml,{DefaultValue:G4}=Vt,{RecoilRoot:W4,useRecoilStoreID:V4}=fr,{isRecoilValue:Z4}=yo,{retentionZone:Y4}=bc,{freshSnapshot:Q4}=Ec,{useRecoilState:J4,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:X4,useRecoilStateLoadable:q4,useRecoilValue:K4,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:ek,useRecoilValueLoadable:tk,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:nk,useResetRecoilState:rk,useSetRecoilState:ik}=mO,{useGotoRecoilSnapshot:ok,useRecoilSnapshot:ak,useRecoilTransactionObserver:lk}=Hx,{useRecoilCallback:sk}=Zx,{noWait:uk,waitForAll:ck,waitForAllSettled:dk,waitForAny:fk,waitForNone:pk}=F4;var Ti={DefaultValue:G4,isRecoilValue:Z4,RecoilLoadable:H4,RecoilEnv:Lo,RecoilRoot:W4,useRecoilStoreID:V4,useRecoilBridgeAcrossReactRoots_UNSTABLE:_O,atom:nb,selector:Mo,atomFamily:b4,selectorFamily:Qr,constSelector:E4,errorSelector:L4,readOnlySelector:R4,noWait:uk,waitForNone:pk,waitForAny:fk,waitForAll:ck,waitForAllSettled:dk,useRecoilValue:K4,useRecoilValueLoadable:tk,useRecoilState:J4,useRecoilStateLoadable:q4,useSetRecoilState:ik,useResetRecoilState:rk,useGetRecoilValueInfo_UNSTABLE:OO,useRecoilRefresher_UNSTABLE:h2,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:nk,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:ek,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:X4,useRecoilCallback:sk,useRecoilTransaction_UNSTABLE:M2,useGotoRecoilSnapshot:ok,useRecoilSnapshot:ak,useRecoilTransactionObserver_UNSTABLE:lk,snapshot_UNSTABLE:Q4,useRetain:yg,retentionZone:Y4},mk=Ti.RecoilRoot,gk=Ti.atom,hk=Ti.selector,vk=Ti.atomFamily,lb=Ti.useRecoilValue,sb=Ti.useSetRecoilState,yk=Ti.useRecoilCallback;const ub="x-zuplo",sy="x-internal",cb=`${ub}-path`,Dr=`${ub}-route`;var St=(e=>(e.modified="modified",e.new="new",e.saving="saving",e.unmodified="unmodified",e.removing="removing",e.error="error",e))(St||{}),xu=(e=>(e[e.Unknown=0]="Unknown",e[e.File=1]="File",e[e.Directory=2]="Directory",e[e.SymbolicLink=64]="SymbolicLink",e))(xu||{});const Ng=vk({default:void 0,key:"projectFilesState"}),Sg=gk({default:[],key:"projectTreeNodesState"});var Ik=db;function db(e,t,n){e instanceof RegExp&&(e=uy(e,n)),t instanceof RegExp&&(t=uy(t,n));var r=fb(e,t,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+e.length,r[1]),post:n.slice(r[1]+t.length)}}function uy(e,t){var n=t.match(e);return n?n[0]:null}db.range=fb;function fb(e,t,n){var r,i,o,a,l,s=n.indexOf(e),u=n.indexOf(t,s+1),c=s;if(s>=0&&u>0){if(e===t)return[s,u];for(r=[],o=n.length;c>=0&&!l;)c==s?(r.push(c),s=n.indexOf(e,c+1)):r.length==1?l=[r.pop(),u]:(i=r.pop(),i<o&&(o=i,a=u),u=n.indexOf(t,c+1)),c=s<u&&s>=0?s:u;r.length&&(l=[o,a])}return l}var pb=Ik,wk=bk,mb="\0SLASH"+Math.random()+"\0",gb="\0OPEN"+Math.random()+"\0",Dg="\0CLOSE"+Math.random()+"\0",hb="\0COMMA"+Math.random()+"\0",vb="\0PERIOD"+Math.random()+"\0";function of(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function Mk(e){return e.split("\\\\").join(mb).split("\\{").join(gb).split("\\}").join(Dg).split("\\,").join(hb).split("\\.").join(vb)}function xk(e){return e.split(mb).join("\\").split(gb).join("{").split(Dg).join("}").split(hb).join(",").split(vb).join(".")}function yb(e){if(!e)return[""];var t=[],n=pb("{","}",e);if(!n)return e.split(",");var r=n.pre,i=n.body,o=n.post,a=r.split(",");a[a.length-1]+="{"+i+"}";var l=yb(o);return o.length&&(a[a.length-1]+=l.shift(),a.push.apply(a,l)),t.push.apply(t,a),t}function bk(e){return e?(e.substr(0,2)==="{}"&&(e="\\{\\}"+e.substr(2)),da(Mk(e),!0).map(xk)):[]}function Nk(e){return"{"+e+"}"}function Sk(e){return/^-?0\d/.test(e)}function Dk(e,t){return e<=t}function Ak(e,t){return e>=t}function da(e,t){var n=[],r=pb("{","}",e);if(!r)return[e];var i=r.pre,o=r.post.length?da(r.post,!1):[""];if(/\$$/.test(r.pre))for(var a=0;a<o.length;a++){var l=i+"{"+r.body+"}"+o[a];n.push(l)}else{var s=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(r.body),u=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(r.body),c=s||u,d=r.body.indexOf(",")>=0;if(!c&&!d)return r.post.match(/,.*\}/)?(e=r.pre+"{"+r.body+Dg+r.post,da(e)):[e];var f;if(c)f=r.body.split(/\.\./);else if(f=yb(r.body),f.length===1&&(f=da(f[0],!1).map(Nk),f.length===1))return o.map(function(R){return r.pre+f[0]+R});var p;if(c){var g=of(f[0]),h=of(f[1]),w=Math.max(f[0].length,f[1].length),I=f.length==3?Math.abs(of(f[2])):1,y=Dk,M=h<g;M&&(I*=-1,y=Ak);var x=f.some(Sk);p=[];for(var S=g;y(S,h);S+=I){var b;if(u)b=String.fromCharCode(S),b==="\\"&&(b="");else if(b=String(S),x){var N=w-b.length;if(N>0){var C=new Array(N+1).join("0");S<0?b="-"+C+b.slice(1):b=C+b}}p.push(b)}}else{p=[];for(var P=0;P<f.length;P++)p.push.apply(p,da(f[P],!1))}for(var P=0;P<p.length;P++)for(var a=0;a<o.length;a++){var l=i+p[P]+o[a];(!t||c||l)&&n.push(l)}}return n}const Ck=sl(wk),Ek=1024*64,bu=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>Ek)throw new TypeError("pattern is too long")},Tk={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},ta=e=>e.replace(/[[\]\\-]/g,"\\$&"),jk=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),cy=e=>e.join(""),Lk=(e,t)=>{const n=t;if(e.charAt(n)!=="[")throw new Error("not in a brace expression");const r=[],i=[];let o=n+1,a=!1,l=!1,s=!1,u=!1,c=n,d="";e:for(;o<e.length;){const h=e.charAt(o);if((h==="!"||h==="^")&&o===n+1){u=!0,o++;continue}if(h==="]"&&a&&!s){c=o+1;break}if(a=!0,h==="\\"&&!s){s=!0,o++;continue}if(h==="["&&!s){for(const[w,[I,y,M]]of Object.entries(Tk))if(e.startsWith(w,o)){if(d)return["$.",!1,e.length-n,!0];o+=w.length,M?i.push(I):r.push(I),l=l||y;continue e}}if(s=!1,d){h>d?r.push(ta(d)+"-"+ta(h)):h===d&&r.push(ta(h)),d="",o++;continue}if(e.startsWith("-]",o+1)){r.push(ta(h+"-")),o+=2;continue}if(e.startsWith("-",o+1)){d=h,o+=2;continue}r.push(ta(h)),o++}if(c<o)return["",!1,0,!1];if(!r.length&&!i.length)return["$.",!1,e.length-n,!0];if(i.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!u){const h=r[0].length===2?r[0].slice(-1):r[0];return[jk(h),!1,c-n,!1]}const f="["+(u?"^":"")+cy(r)+"]",p="["+(u?"":"^")+cy(i)+"]";return[r.length&&i.length?"("+f+"|"+p+")":r.length?f:p,l,c-n,!0]},fa=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),Pk=new Set(["!","?","+","*","@"]),dy=e=>Pk.has(e),Rk="(?!\\.\\.?(?:$|/))",af="(?!\\.)",Ok=new Set(["[","."]),kk=new Set(["..","."]),zk=new Set("().*{}+?[]^$\\!"),Bk=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Ag="[^/]",fy=Ag+"*?",py=Ag+"+?";var nt,at,er,ke,Xe,Mr,ci,xr,pn,di,ll,_u,Ib,ao,Us,Fu,wb;const bt=class bt{constructor(t,n,r={}){Et(this,_u);se(this,"type");Et(this,nt,void 0);Et(this,at,void 0);Et(this,er,!1);Et(this,ke,[]);Et(this,Xe,void 0);Et(this,Mr,void 0);Et(this,ci,void 0);Et(this,xr,!1);Et(this,pn,void 0);Et(this,di,void 0);Et(this,ll,!1);this.type=t,t&&Ye(this,at,!0),Ye(this,Xe,n),Ye(this,nt,Y(this,Xe)?Y(Y(this,Xe),nt):this),Ye(this,pn,Y(this,nt)===this?r:Y(Y(this,nt),pn)),Ye(this,ci,Y(this,nt)===this?[]:Y(Y(this,nt),ci)),t==="!"&&!Y(Y(this,nt),xr)&&Y(this,ci).push(this),Ye(this,Mr,Y(this,Xe)?Y(Y(this,Xe),ke).length:0)}get hasMagic(){if(Y(this,at)!==void 0)return Y(this,at);for(const t of Y(this,ke))if(typeof t!="string"&&(t.type||t.hasMagic))return Ye(this,at,!0);return Y(this,at)}toString(){return Y(this,di)!==void 0?Y(this,di):this.type?Ye(this,di,this.type+"("+Y(this,ke).map(t=>String(t)).join("|")+")"):Ye(this,di,Y(this,ke).map(t=>String(t)).join(""))}push(...t){for(const n of t)if(n!==""){if(typeof n!="string"&&!(n instanceof bt&&Y(n,Xe)===this))throw new Error("invalid part: "+n);Y(this,ke).push(n)}}toJSON(){var n;const t=this.type===null?Y(this,ke).slice().map(r=>typeof r=="string"?r:r.toJSON()):[this.type,...Y(this,ke).map(r=>r.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===Y(this,nt)||Y(Y(this,nt),xr)&&((n=Y(this,Xe))==null?void 0:n.type)==="!")&&t.push({}),t}isStart(){var n;if(Y(this,nt)===this)return!0;if(!((n=Y(this,Xe))!=null&&n.isStart()))return!1;if(Y(this,Mr)===0)return!0;const t=Y(this,Xe);for(let r=0;r<Y(this,Mr);r++){const i=Y(t,ke)[r];if(!(i instanceof bt&&i.type==="!"))return!1}return!0}isEnd(){var n,r,i;if(Y(this,nt)===this||((n=Y(this,Xe))==null?void 0:n.type)==="!")return!0;if(!((r=Y(this,Xe))!=null&&r.isEnd()))return!1;if(!this.type)return(i=Y(this,Xe))==null?void 0:i.isEnd();const t=Y(this,Xe)?Y(Y(this,Xe),ke).length:0;return Y(this,Mr)===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){const n=new bt(this.type,t);for(const r of Y(this,ke))n.copyIn(r);return n}static fromGlob(t,n={}){var i;const r=new bt(null,void 0,n);return Pi(i=bt,ao,Us).call(i,t,r,0,n),r}toMMPattern(){if(this!==Y(this,nt))return Y(this,nt).toMMPattern();const t=this.toString(),[n,r,i,o]=this.toRegExpSource();if(!(i||Y(this,at)||Y(this,pn).nocase&&!Y(this,pn).nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return r;const l=(Y(this,pn).nocase?"i":"")+(o?"u":"");return Object.assign(new RegExp(`^${n}$`,l),{_src:n,_glob:t})}toRegExpSource(){var i;if(Y(this,nt)===this&&Pi(this,_u,Ib).call(this),!this.type){const o=this.isStart()&&this.isEnd(),a=Y(this,ke).map(c=>{var h;const[d,f,p,g]=typeof c=="string"?Pi(h=bt,Fu,wb).call(h,c,Y(this,at),o):c.toRegExpSource();return Ye(this,at,Y(this,at)||p),Ye(this,er,Y(this,er)||g),d}).join("");let l="";if(this.isStart()&&typeof Y(this,ke)[0]=="string"&&!(Y(this,ke).length===1&&kk.has(Y(this,ke)[0]))){const d=Ok,f=Y(this,pn).dot&&d.has(a.charAt(0))||a.startsWith("\\.")&&d.has(a.charAt(2))||a.startsWith("\\.\\.")&&d.has(a.charAt(4)),p=!Y(this,pn).dot&&d.has(a.charAt(0));l=f?Rk:p?af:""}let s="";return this.isEnd()&&Y(Y(this,nt),xr)&&((i=Y(this,Xe))==null?void 0:i.type)==="!"&&(s="(?:$|\\/)"),[l+a+s,fa(a),Ye(this,at,!!Y(this,at)),Y(this,er)]}const t=this.type==="!"?"(?:(?!(?:":"(?:",n=Y(this,ke).map(o=>{if(typeof o=="string")throw new Error("string type in extglob ast??");const[a,l,s,u]=o.toRegExpSource();return Ye(this,er,Y(this,er)||u),a}).filter(o=>!(this.isStart()&&this.isEnd())||!!o).join("|");if(this.isStart()&&this.isEnd()&&!n&&this.type!=="!"){const o=this.toString();return Ye(this,ke,[o]),this.type=null,Ye(this,at,void 0),[o,fa(this.toString()),!1,!1]}let r="";if(this.type==="!"&&Y(this,ll))r=(this.isStart()&&!Y(this,pn).dot?af:"")+py;else{const o=this.type==="!"?"))"+(this.isStart()&&!Y(this,pn).dot?af:"")+fy+")":this.type==="@"?")":`)${this.type}`;r=t+n+o}return[r,fa(n),Ye(this,at,!!Y(this,at)),Y(this,er)]}};nt=new WeakMap,at=new WeakMap,er=new WeakMap,ke=new WeakMap,Xe=new WeakMap,Mr=new WeakMap,ci=new WeakMap,xr=new WeakMap,pn=new WeakMap,di=new WeakMap,ll=new WeakMap,_u=new WeakSet,Ib=function(){if(this!==Y(this,nt))throw new Error("should only call on root");if(Y(this,xr))return this;this.toString(),Ye(this,xr,!0);let t;for(;t=Y(this,ci).pop();){if(t.type!=="!")continue;let n=t,r=Y(n,Xe);for(;r;){for(let i=Y(n,Mr)+1;!r.type&&i<Y(r,ke).length;i++)for(const o of Y(t,ke)){if(typeof o=="string")throw new Error("string part in extglob AST??");o.copyIn(Y(r,ke)[i])}n=r,r=Y(n,Xe)}}return this},ao=new WeakSet,Us=function(t,n,r,i){var p,g;let o=!1,a=!1,l=-1,s=!1;if(n.type===null){let h=r,w="";for(;h<t.length;){const I=t.charAt(h++);if(o||I==="\\"){o=!o,w+=I;continue}if(a){h===l+1?(I==="^"||I==="!")&&(s=!0):I==="]"&&!(h===l+2&&s)&&(a=!1),w+=I;continue}else if(I==="["){a=!0,l=h,s=!1,w+=I;continue}if(!i.noext&&dy(I)&&t.charAt(h)==="("){n.push(w),w="";const y=new bt(I,n);h=Pi(p=bt,ao,Us).call(p,t,y,h,i),n.push(y);continue}w+=I}return n.push(w),h}let u=r+1,c=new bt(null,n);const d=[];let f="";for(;u<t.length;){const h=t.charAt(u++);if(o||h==="\\"){o=!o,f+=h;continue}if(a){u===l+1?(h==="^"||h==="!")&&(s=!0):h==="]"&&!(u===l+2&&s)&&(a=!1),f+=h;continue}else if(h==="["){a=!0,l=u,s=!1,f+=h;continue}if(dy(h)&&t.charAt(u)==="("){c.push(f),f="";const w=new bt(h,c);c.push(w),u=Pi(g=bt,ao,Us).call(g,t,w,u,i);continue}if(h==="|"){c.push(f),f="",d.push(c),c=new bt(null,n);continue}if(h===")")return f===""&&Y(n,ke).length===0&&Ye(n,ll,!0),c.push(f),f="",n.push(...d,c),u;f+=h}return n.type=null,Ye(n,at,void 0),Ye(n,ke,[t.substring(r-1)]),u},Fu=new WeakSet,wb=function(t,n,r=!1){let i=!1,o="",a=!1;for(let l=0;l<t.length;l++){const s=t.charAt(l);if(i){i=!1,o+=(zk.has(s)?"\\":"")+s;continue}if(s==="\\"){l===t.length-1?o+="\\\\":i=!0;continue}if(s==="["){const[u,c,d,f]=Lk(t,l);if(d){o+=u,a=a||c,l+=d-1,n=n||f;continue}}if(s==="*"){r&&t==="*"?o+=py:o+=fy,n=!0;continue}if(s==="?"){o+=Ag,n=!0;continue}o+=Bk(s)}return[o,fa(t),!!n,a]},Et(bt,ao),Et(bt,Fu);let Nu=bt;const Uk=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&"),Ct=(e,t,n={})=>(bu(t),!n.nocomment&&t.charAt(0)==="#"?!1:new zc(t,n).match(e)),$k=/^\*+([^+@!?\*\[\(]*)$/,_k=e=>t=>!t.startsWith(".")&&t.endsWith(e),Fk=e=>t=>t.endsWith(e),Hk=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),Gk=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),Wk=/^\*+\.\*+$/,Vk=e=>!e.startsWith(".")&&e.includes("."),Zk=e=>e!=="."&&e!==".."&&e.includes("."),Yk=/^\.\*+$/,Qk=e=>e!=="."&&e!==".."&&e.startsWith("."),Jk=/^\*+$/,Xk=e=>e.length!==0&&!e.startsWith("."),qk=e=>e.length!==0&&e!=="."&&e!=="..",Kk=/^\?+([^+@!?\*\[\(]*)?$/,ez=([e,t=""])=>{const n=Mb([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},tz=([e,t=""])=>{const n=xb([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},nz=([e,t=""])=>{const n=xb([e]);return t?r=>n(r)&&r.endsWith(t):n},rz=([e,t=""])=>{const n=Mb([e]);return t?r=>n(r)&&r.endsWith(t):n},Mb=([e])=>{const t=e.length;return n=>n.length===t&&!n.startsWith(".")},xb=([e])=>{const t=e.length;return n=>n.length===t&&n!=="."&&n!==".."},bb=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&{}.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",my={win32:{sep:"\\"},posix:{sep:"/"}},iz=bb==="win32"?my.win32.sep:my.posix.sep;Ct.sep=iz;const fn=Symbol("globstar **");Ct.GLOBSTAR=fn;const oz="[^/]",az=oz+"*?",lz="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",sz="(?:(?!(?:\\/|^)\\.).)*?",uz=(e,t={})=>n=>Ct(n,e,t);Ct.filter=uz;const cn=(e,t={})=>Object.assign({},e,t),cz=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return Ct;const t=Ct;return Object.assign((r,i,o={})=>t(r,i,cn(e,o)),{Minimatch:class extends t.Minimatch{constructor(i,o={}){super(i,cn(e,o))}static defaults(i){return t.defaults(cn(e,i)).Minimatch}},AST:class extends t.AST{constructor(i,o,a={}){super(i,o,cn(e,a))}static fromGlob(i,o={}){return t.AST.fromGlob(i,cn(e,o))}},unescape:(r,i={})=>t.unescape(r,cn(e,i)),escape:(r,i={})=>t.escape(r,cn(e,i)),filter:(r,i={})=>t.filter(r,cn(e,i)),defaults:r=>t.defaults(cn(e,r)),makeRe:(r,i={})=>t.makeRe(r,cn(e,i)),braceExpand:(r,i={})=>t.braceExpand(r,cn(e,i)),match:(r,i,o={})=>t.match(r,i,cn(e,o)),sep:t.sep,GLOBSTAR:fn})};Ct.defaults=cz;const Nb=(e,t={})=>(bu(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:Ck(e));Ct.braceExpand=Nb;const dz=(e,t={})=>new zc(e,t).makeRe();Ct.makeRe=dz;const fz=(e,t,n={})=>{const r=new zc(t,n);return e=e.filter(i=>r.match(i)),r.options.nonull&&!e.length&&e.push(t),e};Ct.match=fz;const gy=/[?*]|[+@!]\(.*?\)|\[|\]/,pz=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class zc{constructor(t,n={}){se(this,"options");se(this,"set");se(this,"pattern");se(this,"windowsPathsNoEscape");se(this,"nonegate");se(this,"negate");se(this,"comment");se(this,"empty");se(this,"preserveMultipleSlashes");se(this,"partial");se(this,"globSet");se(this,"globParts");se(this,"nocase");se(this,"isWindows");se(this,"platform");se(this,"windowsNoMagicRoot");se(this,"regexp");bu(t),n=n||{},this.options=n,this.pattern=t,this.platform=n.platform||bb,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!n.windowsPathsNoEscape||n.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!n.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!n.nonegate,this.comment=!1,this.empty=!1,this.partial=!!n.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=n.windowsNoMagicRoot!==void 0?n.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const t of this.set)for(const n of t)if(typeof n!="string")return!0;return!1}debug(...t){}make(){const t=this.pattern,n=this.options;if(!n.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],n.debug&&(this.debug=(...o)=>console.error(...o)),this.debug(this.pattern,this.globSet);const r=this.globSet.map(o=>this.slashSplit(o));this.globParts=this.preprocess(r),this.debug(this.pattern,this.globParts);let i=this.globParts.map((o,a,l)=>{if(this.isWindows&&this.windowsNoMagicRoot){const s=o[0]===""&&o[1]===""&&(o[2]==="?"||!gy.test(o[2]))&&!gy.test(o[3]),u=/^[a-z]:/i.test(o[0]);if(s)return[...o.slice(0,4),...o.slice(4).map(c=>this.parse(c))];if(u)return[o[0],...o.slice(1).map(c=>this.parse(c))]}return o.map(s=>this.parse(s))});if(this.debug(this.pattern,i),this.set=i.filter(o=>o.indexOf(!1)===-1),this.isWindows)for(let o=0;o<this.set.length;o++){const a=this.set[o];a[0]===""&&a[1]===""&&this.globParts[o][2]==="?"&&typeof a[3]=="string"&&/^[a-z]:$/i.test(a[3])&&(a[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let r=0;r<t.length;r++)for(let i=0;i<t[r].length;i++)t[r][i]==="**"&&(t[r][i]="*");const{optimizationLevel:n=1}=this.options;return n>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):n>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(n=>{let r=-1;for(;(r=n.indexOf("**",r+1))!==-1;){let i=r;for(;n[i+1]==="**";)i++;i!==r&&n.splice(r,i-r)}return n})}levelOneOptimize(t){return t.map(n=>(n=n.reduce((r,i)=>{const o=r[r.length-1];return i==="**"&&o==="**"?r:i===".."&&o&&o!==".."&&o!=="."&&o!=="**"?(r.pop(),r):(r.push(i),r)},[]),n.length===0?[""]:n))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let n=!1;do{if(n=!1,!this.preserveMultipleSlashes){for(let i=1;i<t.length-1;i++){const o=t[i];i===1&&o===""&&t[0]===""||(o==="."||o==="")&&(n=!0,t.splice(i,1),i--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(n=!0,t.pop())}let r=0;for(;(r=t.indexOf("..",r+1))!==-1;){const i=t[r-1];i&&i!=="."&&i!==".."&&i!=="**"&&(n=!0,t.splice(r-1,2),r-=2)}}while(n);return t.length===0?[""]:t}firstPhasePreProcess(t){let n=!1;do{n=!1;for(let r of t){let i=-1;for(;(i=r.indexOf("**",i+1))!==-1;){let a=i;for(;r[a+1]==="**";)a++;a>i&&r.splice(i+1,a-i);let l=r[i+1];const s=r[i+2],u=r[i+3];if(l!==".."||!s||s==="."||s===".."||!u||u==="."||u==="..")continue;n=!0,r.splice(i,1);const c=r.slice(0);c[i]="**",t.push(c),i--}if(!this.preserveMultipleSlashes){for(let a=1;a<r.length-1;a++){const l=r[a];a===1&&l===""&&r[0]===""||(l==="."||l==="")&&(n=!0,r.splice(a,1),a--)}r[0]==="."&&r.length===2&&(r[1]==="."||r[1]==="")&&(n=!0,r.pop())}let o=0;for(;(o=r.indexOf("..",o+1))!==-1;){const a=r[o-1];if(a&&a!=="."&&a!==".."&&a!=="**"){n=!0;const s=o===1&&r[o+1]==="**"?["."]:[];r.splice(o-1,2,...s),r.length===0&&r.push(""),o-=2}}}}while(n);return t}secondPhasePreProcess(t){for(let n=0;n<t.length-1;n++)for(let r=n+1;r<t.length;r++){const i=this.partsMatch(t[n],t[r],!this.preserveMultipleSlashes);i&&(t[n]=i,t[r]=[])}return t.filter(n=>n.length)}partsMatch(t,n,r=!1){let i=0,o=0,a=[],l="";for(;i<t.length&&o<n.length;)if(t[i]===n[o])a.push(l==="b"?n[o]:t[i]),i++,o++;else if(r&&t[i]==="**"&&n[o]===t[i+1])a.push(t[i]),i++;else if(r&&n[o]==="**"&&t[i]===n[o+1])a.push(n[o]),o++;else if(t[i]==="*"&&n[o]&&(this.options.dot||!n[o].startsWith("."))&&n[o]!=="**"){if(l==="b")return!1;l="a",a.push(t[i]),i++,o++}else if(n[o]==="*"&&t[i]&&(this.options.dot||!t[i].startsWith("."))&&t[i]!=="**"){if(l==="a")return!1;l="b",a.push(n[o]),i++,o++}else return!1;return t.length===n.length&&a}parseNegate(){if(this.nonegate)return;const t=this.pattern;let n=!1,r=0;for(let i=0;i<t.length&&t.charAt(i)==="!";i++)n=!n,r++;r&&(this.pattern=t.slice(r)),this.negate=n}matchOne(t,n,r=!1){const i=this.options;if(this.isWindows){const h=t[0]===""&&t[1]===""&&t[2]==="?"&&typeof t[3]=="string"&&/^[a-z]:$/i.test(t[3]),w=n[0]===""&&n[1]===""&&n[2]==="?"&&typeof n[3]=="string"&&/^[a-z]:$/i.test(n[3]);if(h&&w){const I=t[3],y=n[3];I.toLowerCase()===y.toLowerCase()&&(t[3]=y)}else if(w&&typeof t[0]=="string"){const I=n[3],y=t[0];I.toLowerCase()===y.toLowerCase()&&(n[3]=y,n=n.slice(3))}else if(h&&typeof n[0]=="string"){const I=t[3];I.toLowerCase()===n[0].toLowerCase()&&(n[0]=I,t=t.slice(3))}}const{optimizationLevel:o=1}=this.options;o>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:n}),this.debug("matchOne",t.length,n.length);for(var a=0,l=0,s=t.length,u=n.length;a<s&&l<u;a++,l++){this.debug("matchOne loop");var c=n[l],d=t[a];if(this.debug(n,c,d),c===!1)return!1;if(c===fn){this.debug("GLOBSTAR",[n,c,d]);var f=a,p=l+1;if(p===u){for(this.debug("** at the end");a<s;a++)if(t[a]==="."||t[a]===".."||!i.dot&&t[a].charAt(0)===".")return!1;return!0}for(;f<s;){var g=t[f];if(this.debug(`
58
58
  globstar while`,t,f,n,p,g),this.matchOne(t.slice(f),n.slice(p),r))return this.debug("globstar found match!",f,s,g),!0;if(g==="."||g===".."||!i.dot&&g.charAt(0)==="."){this.debug("dot detected!",t,f,n,p);break}this.debug("globstar swallow a segment, and continue"),f++}return!!(r&&(this.debug(`
59
- >>> no match, partial?`,t,f,n,p),f===s))}let h;if(typeof c=="string"?(h=d===c,this.debug("string match",c,d,h)):(h=c.test(d),this.debug("pattern match",c,d,h)),!h)return!1}if(a===s&&l===u)return!0;if(a===s)return r;if(l===u)return a===s-1&&t[a]==="";throw new Error("wtf?")}braceExpand(){return SM(this.pattern,this.options)}parse(t){Mu(t);const n=this.options;if(t==="**")return fn;if(t==="")return"";let r,i=null;(r=t.match(Jk))?i=n.dot?qk:Xk:(r=t.match($k))?i=(n.nocase?n.dot?Wk:Hk:n.dot?Fk:_k)(r[1]):(r=t.match(Kk))?i=(n.nocase?n.dot?tz:ez:n.dot?nz:rz)(r):(r=t.match(Gk))?i=n.dot?Zk:Vk:(r=t.match(Yk))&&(i=Qk);const o=Su.fromGlob(t,this.options).toMMPattern();return i?Object.assign(o,{test:i}):o}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const n=this.options,r=n.noglobstar?az:n.dot?lz:sz,i=new Set(n.nocase?["i"]:[]);let o=t.map(s=>{const u=s.map(c=>{if(c instanceof RegExp)for(const d of c.flags.split(""))i.add(d);return typeof c=="string"?pz(c):c===fn?fn:c._src});return u.forEach((c,d)=>{const f=u[d+1],p=u[d-1];c!==fn||p===fn||(p===void 0?f!==void 0&&f!==fn?u[d+1]="(?:\\/|"+r+"\\/)?"+f:u[d]=r:f===void 0?u[d-1]=p+"(?:\\/|"+r+")?":f!==fn&&(u[d-1]=p+"(?:\\/|\\/"+r+"\\/)"+f,u[d+1]=fn))}),u.filter(c=>c!==fn).join("/")}).join("|");const[a,l]=t.length>1?["(?:",")"]:["",""];o="^"+a+o+l+"$",this.negate&&(o="^(?!"+o+").+$");try{this.regexp=new RegExp(o,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,n=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&n)return!0;const r=this.options;this.isWindows&&(t=t.split("\\").join("/"));const i=this.slashSplit(t);this.debug(this.pattern,"split",i);const o=this.set;this.debug(this.pattern,"set",o);let a=i[i.length-1];if(!a)for(let l=i.length-2;!a&&l>=0;l--)a=i[l];for(let l=0;l<o.length;l++){const s=o[l];let u=i;if(r.matchBase&&s.length===1&&(u=[a]),this.matchOne(u,s,n))return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate}static defaults(t){return Ct.defaults(t).Minimatch}}Ct.AST=Su;Ct.Minimatch=zc;Ct.escape=Uk;Ct.unescape=fa;function NM(){const e=yk(({set:t})=>n=>{t(Sg(n.path),n)},[]);return t=>{e(t)}}function mz(){const e=NM(),t=sM(Ng);return n=>{n.saveState===Nt.new&&t(r=>[...r,n]),e(n)}}function Al(){const e=mz();return(t,n=Nt.modified)=>{e({...t,saveState:n})}}function Cg(e){return lM(Sg(e??""))}const gz=e=>{const t=Al(),n=Cg(e);return r=>{n&&t(n,r)}};const hz=hk({key:"projectOpenApiFilesState",get:({get:e})=>{const t=e(Ng),n=[];return t.forEach(r=>{if(r.path&&Ct(r.path,"*.oas.json")){const i=e(Sg(r.path));i&&n.push({...i})}}),n}});function DM(){return lM(hz)}const vz=({routeHandler:e,onOptionsChange:t})=>{var s;const n=DM(),r=n.map(u=>({label:`./config/${u.path}`,value:`./config/${u.path}`}));let i=(s=e.options)==null?void 0:s.openApiFilePath;i&&i.endsWith(".oas.json")&&!i.startsWith("./config/")&&(i=`./config/${i.replace(/^./g,"")}`);const o=u=>{t({...e.options,openApiFilePath:u.value})},a=yz(i,n),{isValid:l}=a;return m.jsx("fieldset",{className:"space-y-2 w-full",children:m.jsx(Zr,{matchWidth:!0,className:ae("w-full",l?"":"border-red-500 text-red-500"),classNameOptions:"w-full",selected:i?{label:l?i:a.error,value:i}:{label:"Select a file",value:""},options:r,onChange:o})})},yz=(e,t)=>e?e.startsWith("./")?e.startsWith("./config")?e.endsWith(".oas.json")?t.some(n=>`./config/${n.path}`===e||n.path===e)?{isValid:!0}:{isValid:!1,error:`OpenAPI file '${e}' does not exist`}:{isValid:!1,error:"OpenAPI file path must point to a file ending in '.oas.json'"}:{isValid:!1,error:"OpenAPI file path must point to a file in your /config directory"}:{isValid:!1,error:"OpenAPI file path must start with './'"}:{isValid:!1,error:"OpenAPI file path is required"},Iz=({routeHandler:e,onOptionsChange:t})=>{var l;const n=s=>{const u=s.currentTarget.value;t({...e.options,location:u})},r=s=>{const u=parseInt(s.value);t({...e.options,status:u})},i={label:"Other (customize in routes.json)",value:"other",disabled:!0},o=[{label:"302 - Temporary",value:"302"},{label:"301 - Permanent",value:"301"},i],a=o.find(s=>{var u,c;return s.value===((c=(u=e.options)==null?void 0:u.status)==null?void 0:c.toString())})??i;return m.jsxs("div",{className:"flex flex-col text-sm space-y-2",children:[m.jsx("input",{className:"rounded-md border-gray-300 shadow-sm font-mono text-sm",type:"text",value:(l=e.options)==null?void 0:l.location,onChange:n}),m.jsx(Zr,{selected:a,options:o,onChange:r})]})},Eg="$import(@zuplo/runtime)",AM="https://welcome.zuplo.io/",Qa="https://echo.zuplo.io",hy="rewritePattern",CM=2,zp="policies.json",Bc="Looks like the Local Designer's service is unavailable. Try restarting the service by re-running the 'zup editor' command from the command line.",wz=({routeHandler:e,onOptionsChange:t})=>{var i;const n=((i=e.options)==null?void 0:i[hy])??AM,r=o=>{t({...e.options,[hy]:o})};return m.jsx("fieldset",{className:"space-y-2",children:m.jsx(Fb,{onUrlChange:r,url:n})})},vy=["us-east-2","us-east-1","us-west-1","us-west-2","af-south-1","ap-east-1","ap-southeast-3","ap-south-1","ap-northeast-3","ap-northeast-2","ap-southeast-1","ap-southeast-2","ap-northeast-1","ca-central-1","cn-north-1","cn-northwest-1","eu-central-1","eu-west-2","eu-south-1","eu-west-3","eu-north-1","me-south-1"],bz=e=>{var n;if(e.length<1)return"The name of a function cannot be empty";if(e.length>140)return"The length of the name must be shorter (maximum 140 characters)";const t=/(arn:(aws[a-zA-Z-]*)?:lambda:)?([a-z]{2}(-gov)?-[a-z]+-\d{1}:)?(\d{12}:)?(function:)?([a-zA-Z0-9-_]+)(:(\$LATEST|[a-zA-Z0-9-_]+))?/;return!e.match(t)||e!==((n=e.match(t))==null?void 0:n[0])?"Invalid AWS lambda function name":null},xz=e=>e.length<1?"The secret key of the handler cannot be empty":null,Mz=e=>e.length<1?"The access key of the handler cannot be empty":null,Sz=({routeHandler:e,onOptionsChange:t})=>{var h,w,I,y,b,x,N;const[n,r]=v.useState(null),[i,o]=v.useState(null),[a,l]=v.useState(null),s=v.useRef(!0),u={},c="$env(AWS_SECURE_ACCESS_KEY)",d="$env(AWS_ACCESS_KEY_ID)",f=(M,S)=>{t({...e.options,[M]:S}),p({...e.options,[M]:S})};v.useEffect(()=>{(!e.options||Object.keys(e.options).length===0)&&t({accessKeyId:d,functionName:"",region:vy[0],secretAccessKey:c}),s.current&&(s.current=!1),e.options&&Object.keys(e.options).length!==0&&p(e.options)},[u]);const p=M=>{r(bz(M.functionName)),o(xz(M.secretAccessKey)),l(Mz(M.accessKeyId))},g=m.jsx("div",{className:"relative",children:m.jsxs("div",{className:"absolute inset-x-0 top-10 flex flex-col bg-gray-200 z-20 rounded-md px-3 pt-1 pb-2 border-gray-300 border-2",children:[m.jsx("p",{className:"font-bold text-black text-md mb-2",children:"Use environment variables"}),m.jsx("span",{className:"text-sm text-gray-400 mb-2",children:"You can reference your environment variables in these configuration options, e.g."}),m.jsxs("span",{className:"text-sm text-zuplo-pink-hover flex flex-col space-y-1",children:[m.jsx("code",{children:c}),m.jsx("code",{children:d})]})]})});return m.jsxs("div",{className:"space-y-2",children:[m.jsx(zs,{label:"Function Name",hasError:!!n,errorMessage:n,onChange:M=>{f("functionName",M.target.value)},value:((h=e.options)==null?void 0:h.functionName)??""}),m.jsxs("div",{className:"grid grid-cols-5 gap-x-2 items-center",children:[m.jsx("span",{className:"col-span-1 text-right text-sm",children:"AWS Region"}),m.jsx(Zr,{options:vy.map(M=>({label:M,value:M})),onChange:M=>{f("region",M.value)},selected:{label:(w=e.options)==null?void 0:w.region,value:(I=e.options)==null?void 0:I.region},className:"col-span-4 w-full",classNameOptions:"w-full",testId:"filter-analytics",selectorElement:m.jsx("div",{className:"border-l-2 pl-1",children:m.jsx(QT,{className:"h-5 w-5 text-black","aria-hidden":"true"})})})]}),m.jsx(zs,{label:"Access Key ID",hasError:!!a,onChange:M=>{f("accessKeyId",M.target.value)},value:((y=e.options)==null?void 0:y.accessKeyId)===""?d:(b=e.options)==null?void 0:b.accessKeyId,tooltip:g,errorMessage:a}),m.jsx(zs,{label:"Secure Access Key",hasError:!!i,onChange:M=>{f("secretAccessKey",M.target.value)},tooltip:g,value:((x=e.options)==null?void 0:x.secretAccessKey)===""?c:(N=e.options)==null?void 0:N.secretAccessKey,errorMessage:i})]})},Nz=({item:e,selectedItemLabel:t,onSelectItem:n})=>{const r=()=>n(e);return m.jsx("li",{className:"m-0.5 text-sm",children:e.active?m.jsx("button",{type:"button",onClick:r,className:ae("py-0.5 px-2 truncate text-ellipsis rounded-md w-full text-left hover:bg-gray-300 border border-transparent",{"bg-gray-200":e.label===t}),children:e.label}):m.jsx("div",{className:"py-0.5 px-2 truncate text-gray-400 text-ellipsis rounded-md w-full text-left border border-transparent",children:e.label})})},yy=({header:e,undefinedContent:t,items:n,selectedItemLabel:r,onSelectItem:i})=>m.jsxs(m.Fragment,{children:[m.jsx("p",{className:"h-auto font-bold mb-2 pl-2 text-md",children:e}),m.jsx("div",{className:"h-5/6 overflow-y-auto",children:n?m.jsx("ul",{className:"list-none",children:n.map(o=>m.jsx(Nz,{item:o,selectedItemLabel:r,onSelectItem:i},o.label))}):m.jsx("div",{className:"p-2 text-gray-400 text-sm",children:t})})]}),Iy=window.SERVER_DATA,Dz=`http://${Iy.server_address}:${Iy.server_port}`;function Az(e,t){const r=/\$import\((.*?)\)/g.exec(e);if(!r||r.length!==2)return"INVALID IMPORT STATEMENT";const i=r[1];return t!==void 0&&i.indexOf(t)===0?i.substring(t.length):i}function Cz(e){return`$import(${e})`}const Ez=({routeHandler:e,onRequestHandlerChange:t})=>{const[n,r]=v.useState(),[i,o]=v.useState(),a=Az(e.module,"./modules/");v.useEffect(()=>{async function s(){try{const u=await fetch(`${Dz}/modules-data`,{method:"GET"});if(u.status!==200){const d=await u.json();console.log(d.message);return}const c=await u.json();r(c)}catch(u){console.log(u.message)}}s()},[]);const l=s=>{if(!(i!=null&&i.name))return;const u=Cz(i.filepath.replace(".ts",""));t({export:s.name,module:u,options:{}})};return m.jsx(m.Fragment,{children:m.jsxs(ro,{className:"flex bg-white flex-grow rounded-md relative",children:[m.jsx("div",{className:"truncate flex-grow border py-2 px-2 border-r-none shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full text-sm border-gray-300 rounded-l-md",children:`${a} - ${e.export}`}),m.jsx(ro.Button,{title:"Pick a module and export",disabled:!1,className:ae("shadow-sm px-3 flex-none border border-gray-300 border-l-0 rounded-r-md border-1 bg-gray-100 disabled:bg-gray-200 disabled:cursor-not-allowed disabled:opacity-50 enabled:hover:bg-gray-200 hover:bg-gray-200"),children:"..."}),m.jsx(ro.Panel,{style:{top:"2.40rem"},className:"w-full xl:w-650 z-20 bg-white absolute bottom-0 right-0 border border-gray-300 rounded-md border-1 p-4 min-h-80 h-80",children:({close:s})=>m.jsx("div",{className:"flex flex-col h-full",children:m.jsxs("div",{className:"flex flex-row grow h-5/6",children:[m.jsx("div",{className:"w-1/2 pr-2 h-full pb-2",children:m.jsx(yy,{header:"Modules",items:n==null?void 0:n.map(u=>({active:u.methods.length>0,label:u.name})),selectedItemLabel:i==null?void 0:i.name,onSelectItem:u=>{const c=n==null?void 0:n.find(d=>d.name===u.label);o(c)}})}),m.jsx("div",{className:"w-1/2 pl-2 h-full pb-2",children:m.jsx(yy,{header:"Exports (functions)",undefinedContent:"Choose a module to see available methods",items:i==null?void 0:i.methods.map(u=>({active:u.isHandlerInvocable,label:u.name})),selectedItemLabel:i==null?void 0:i.name,onSelectItem:u=>{const c=i==null?void 0:i.methods.find(d=>d.name===u.label);if(!c)throw new Error("Invalid state - invalid method selected");l(c),s()}})}),m.jsx("button",{type:"button",onClick:()=>s(),className:"self-start rounded-full hover:bg-gray-100 p-1",children:m.jsx(ij,{className:"h-4 w-4"})})]})})})]})})},Tz={export:"urlRewriteHandler",module:Eg,options:{rewritePattern:AM}},jz={export:"awsLambdaHandler",module:Eg},Pz={export:"redirectHandler",module:Eg,options:{location:"https://zuplo.com",status:302}},Lz={export:"urlForwardHandler",module:"$import(@zuplo/runtime)",options:{baseUrl:Qa}},Rz={export:"openApiSpecHandler",module:"$import(@zuplo/runtime)",options:{openApiFilePath:"./config/routes.oas.json"}},wy={export:"default",module:"$import(./modules/hello-world)"},Oz=()=>({urlForward:{component:Mj,displayName:"URL Forward",handlerID:"urlForward",routeHandler:{...Lz},documentationUrl:"https://zuplo.com/docs/handlers/url-forward"},urlRewrite:{component:wz,displayName:"URL Rewrite",handlerID:"urlRewrite",routeHandler:{...Tz},documentationUrl:"https://zuplo.com/docs/handlers/url-rewrite"},function:{component:Ez,displayName:"Function",handlerID:"function",documentationUrl:"https://zuplo.com/docs/handlers/custom-handler"},awsLambda:{component:Sz,displayName:"AWS Lambda",handlerID:"awsLambda",routeHandler:{...jz},documentationUrl:"https://zuplo.com/docs/handlers/aws-lambda"},redirect:{component:Iz,displayName:"Redirect",handlerID:"redirect",routeHandler:{...Pz},documentationUrl:"https://zuplo.com/docs/handlers/redirect"},openApi:{component:vz,displayName:"OpenAPI Spec",handlerID:"openApi",routeHandler:{...Rz,options:{openApiFilePath:`.${new URL(window.location.href).searchParams.get("path")}`}},documentationUrl:"https://zuplo.com/docs/handlers/openapi",isOpenApiExclusive:!0}}),kz=(e,t)=>{const n=Object.values(t).find(r=>{var i;return((i=r.routeHandler)==null?void 0:i.module)===e.module&&r.routeHandler.export===e.export});return n||t.function},zz=({routeHandler:e,onRequestHandlerChange:t,isOpenApi:n})=>{const r=Oz(),i=kz(e,r),[o,a]=v.useState({[i.handlerID]:e}),l=Object.values(r).filter(c=>c.isOpenApiExclusive?n:!0).map(c=>({label:c.displayName,value:c.handlerID})),s=c=>{var w,I,y;a({...o,[i.handlerID]:e});const d=r[c.value],f=o[d.handlerID],p=(f==null?void 0:f.export)??((w=d.routeHandler)==null?void 0:w.export)??wy.export,g=(f==null?void 0:f.module)??((I=d.routeHandler)==null?void 0:I.module)??wy.module,h=(f==null?void 0:f.options)??((y=d.routeHandler)==null?void 0:y.options)??{};t({export:p,module:g,options:h})},u=c=>{t({...e,options:c})};return m.jsxs("div",{className:"w-full bg-request-handler-gray flex flex-col px-4 py-3 -mt-1 rounded",children:[m.jsx("p",{className:"text-gray-500 text-md",children:"Request Handler"}),m.jsxs("div",{className:"flex flex-row mt-2",children:[m.jsx("label",{htmlFor:"handler",className:"col-span-1 block text-sm font-medium text-gray-700 text-right mr-3 pt-2",children:"Handler"}),m.jsxs("div",{className:"flex flex-row w-full self-center",children:[m.jsxs("div",{className:"flex flex-col col-span-4 rounded-md mr-3",children:[m.jsx(Zr,{matchWidth:!1,className:"w-xl text-sm",options:l,testId:"request-handler-picker",selected:{label:i.displayName,value:i.handlerID},onChange:s}),m.jsxs("a",{href:i.documentationUrl,className:"text-sm text-blue-500 hover:underline mt-2 ml-1",target:"_blank",rel:"noreferrer",children:[i.displayName," docs"]})]}),m.jsx("div",{className:" w-full",children:m.jsx(i.component,{routeHandler:e,onOptionsChange:u,onRequestHandlerChange:t})})]})]})]})},Nu=(e,t)=>Object.entries(t??{}).flatMap(([n,r])=>r?Object.entries(r).filter(([i])=>i.includes("get")||i.includes("put")||i.includes("post")||i.includes("delete")||i.includes("options")||i.includes("head")||i.includes("patch")||i.includes("trace")).map(([i,o])=>({...o,additionalOperationContext:{oasFilePath:e,method:i,path:n,pathZuploConfig:r[cM]}})):[]),by=e=>!Object.keys(e).some(t=>t.includes("get")||t.includes("put")||t.includes("post")||t.includes("delete")||t.includes("options")||t.includes("head")||t.includes("patch")||t.includes("trace"));class Bz{constructor(t,n){se(this,"updateActiveFile");se(this,"getOpenApiDataEnforced",()=>{if(!this.openApiData)throw new Error("Invalid State - OpenApiManagerInstance.openApiData was undefined");return this.openApiData});se(this,"openApiFileModel");se(this,"openApiData");se(this,"parseError");se(this,"operationArray");se(this,"updateOpenApiData",t=>{const n={...this.openApiFileModel,content:JSON.stringify(t,null,2)};this.openApiData=t,this.operationArray=Nu(this.openApiFileModel.path,t.paths),this.updateActiveFile(n)});se(this,"updatePathItem",(t,n)=>{const r=this.getOpenApiDataEnforced();let i=r.paths;i||(i={}),i[t]=n;const o={...r,paths:i};this.updateOpenApiData(o)});se(this,"addOperation",(t,n,r)=>{const i=this.getOpenApiDataEnforced(),o=n;let a=i.paths;a||(a={});let l=a[t];if(l||(l={"x-zuplo-path":{pathMode:"open-api"}}),l[o])throw new Error(`Cannot add operation ${n}-${t}, operation already exists`);l[o]=r,a[t]=l;const s={...i,paths:a};this.updateOpenApiData(s)});se(this,"deleteOperation",(t,n)=>{const r=this.getOpenApiDataEnforced(),i=r.paths;if(!i)throw new Error("Cannot delete operation when paths is undefined");const o=i[t];if(!o)throw new Error("Cannot delete operation when pathItem is undefined");delete o[n],by(o)?delete i[t]:i[t]=o;const a={...r,paths:i};this.updateOpenApiData(a)});se(this,"updateOperation",t=>{var d,f,p;const n=this.getOpenApiDataEnforced(),{path:r,newPath:i,newOperationObject:o}=t,a=t.method,l=t.newMethod,s=n.paths;if(!s)throw new Error("Cannot update operation when paths is undefined");const u=s[r];if(!u)throw new Error("Cannot update operation when pathItem is undefined");if(i&&l&&((d=s[i])!=null&&d[l]))throw new Error(`Operation with path: '${i}' and method: '${l.toUpperCase()}' already exists`);if(i&&!l&&((f=s[i])!=null&&f[a]))throw new Error(`Cannot change path to '${i}', operation already exists`);if(l&&u[l])throw new Error(`Cannot change method to '${l.toUpperCase()}', operation already exists`);if(i){delete u[a];const g=(p=s[r])==null?void 0:p["x-zuplo-path"];by(u)?delete s[r]:s[r]=u;const h=s[i]??{"x-zuplo-path":{pathMode:"open-api",...g}};h[l??a]=o,s[i]=h}else l?(delete u[a],u[l]=o,s[r]=u):(u[a]=o,s[r]=u);const c={...n,paths:s};this.updateOpenApiData(c)});var r;this.openApiFileModel=t;try{this.openApiData=JSON.parse(t.content??""),this.operationArray=Nu(t.path,(r=this.openApiData)==null?void 0:r.paths)}catch(i){this.parseError=i}this.updateActiveFile=n}}/**
59
+ >>> no match, partial?`,t,f,n,p),f===s))}let h;if(typeof c=="string"?(h=d===c,this.debug("string match",c,d,h)):(h=c.test(d),this.debug("pattern match",c,d,h)),!h)return!1}if(a===s&&l===u)return!0;if(a===s)return r;if(l===u)return a===s-1&&t[a]==="";throw new Error("wtf?")}braceExpand(){return Nb(this.pattern,this.options)}parse(t){bu(t);const n=this.options;if(t==="**")return fn;if(t==="")return"";let r,i=null;(r=t.match(Jk))?i=n.dot?qk:Xk:(r=t.match($k))?i=(n.nocase?n.dot?Gk:Hk:n.dot?Fk:_k)(r[1]):(r=t.match(Kk))?i=(n.nocase?n.dot?tz:ez:n.dot?nz:rz)(r):(r=t.match(Wk))?i=n.dot?Zk:Vk:(r=t.match(Yk))&&(i=Qk);const o=Nu.fromGlob(t,this.options).toMMPattern();return i?Object.assign(o,{test:i}):o}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const n=this.options,r=n.noglobstar?az:n.dot?lz:sz,i=new Set(n.nocase?["i"]:[]);let o=t.map(s=>{const u=s.map(c=>{if(c instanceof RegExp)for(const d of c.flags.split(""))i.add(d);return typeof c=="string"?pz(c):c===fn?fn:c._src});return u.forEach((c,d)=>{const f=u[d+1],p=u[d-1];c!==fn||p===fn||(p===void 0?f!==void 0&&f!==fn?u[d+1]="(?:\\/|"+r+"\\/)?"+f:u[d]=r:f===void 0?u[d-1]=p+"(?:\\/|"+r+")?":f!==fn&&(u[d-1]=p+"(?:\\/|\\/"+r+"\\/)"+f,u[d+1]=fn))}),u.filter(c=>c!==fn).join("/")}).join("|");const[a,l]=t.length>1?["(?:",")"]:["",""];o="^"+a+o+l+"$",this.negate&&(o="^(?!"+o+").+$");try{this.regexp=new RegExp(o,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,n=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&n)return!0;const r=this.options;this.isWindows&&(t=t.split("\\").join("/"));const i=this.slashSplit(t);this.debug(this.pattern,"split",i);const o=this.set;this.debug(this.pattern,"set",o);let a=i[i.length-1];if(!a)for(let l=i.length-2;!a&&l>=0;l--)a=i[l];for(let l=0;l<o.length;l++){const s=o[l];let u=i;if(r.matchBase&&s.length===1&&(u=[a]),this.matchOne(u,s,n))return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate}static defaults(t){return Ct.defaults(t).Minimatch}}Ct.AST=Nu;Ct.Minimatch=zc;Ct.escape=Uk;Ct.unescape=fa;function Sb(){const e=yk(({set:t})=>n=>{t(Ng(n.path),n)},[]);return t=>{e(t)}}function mz(){const e=Sb(),t=sb(Sg);return n=>{n.saveState===St.new&&t(r=>[...r,n]),e(n)}}function Al(){const e=mz();return(t,n=St.modified)=>{e({...t,saveState:n})}}function Cg(e){return lb(Ng(e??""))}const gz=e=>{const t=Al(),n=Cg(e);return r=>{n&&t(n,r)}};const hz=hk({key:"projectOpenApiFilesState",get:({get:e})=>{const t=e(Sg),n=[];return t.forEach(r=>{if(r.path&&Ct(r.path,"*.oas.json")){const i=e(Ng(r.path));i&&n.push({...i})}}),n}});function Db(){return lb(hz)}const vz=({routeHandler:e,onOptionsChange:t})=>{var s;const n=Db(),r=n.map(u=>({label:`./config/${u.path}`,value:`./config/${u.path}`}));let i=(s=e.options)==null?void 0:s.openApiFilePath;i&&i.endsWith(".oas.json")&&!i.startsWith("./config/")&&(i=`./config/${i.replace(/^./g,"")}`);const o=u=>{t({...e.options,openApiFilePath:u.value})},a=yz(i,n),{isValid:l}=a;return m.jsx("fieldset",{className:"space-y-2 w-full",children:m.jsx(Zr,{matchWidth:!0,className:ae("w-full",l?"":"border-red-500 text-red-500"),classNameOptions:"w-full",selected:i?{label:l?i:a.error,value:i}:{label:"Select a file",value:""},options:r,onChange:o})})},yz=(e,t)=>e?e.startsWith("./")?e.startsWith("./config")?e.endsWith(".oas.json")?t.some(n=>`./config/${n.path}`===e||n.path===e)?{isValid:!0}:{isValid:!1,error:`OpenAPI file '${e}' does not exist`}:{isValid:!1,error:"OpenAPI file path must point to a file ending in '.oas.json'"}:{isValid:!1,error:"OpenAPI file path must point to a file in your /config directory"}:{isValid:!1,error:"OpenAPI file path must start with './'"}:{isValid:!1,error:"OpenAPI file path is required"},Iz=({routeHandler:e,onOptionsChange:t})=>{var l;const n=s=>{const u=s.currentTarget.value;t({...e.options,location:u})},r=s=>{const u=parseInt(s.value);t({...e.options,status:u})},i={label:"Other (customize in routes.json)",value:"other",disabled:!0},o=[{label:"302 - Temporary",value:"302"},{label:"301 - Permanent",value:"301"},i],a=o.find(s=>{var u,c;return s.value===((c=(u=e.options)==null?void 0:u.status)==null?void 0:c.toString())})??i;return m.jsxs("div",{className:"flex flex-col text-sm space-y-2",children:[m.jsx("input",{className:"rounded-md border-gray-300 shadow-sm font-mono text-sm",type:"text",value:(l=e.options)==null?void 0:l.location,onChange:n}),m.jsx(Zr,{selected:a,options:o,onChange:r})]})},Eg="$import(@zuplo/runtime)",Ab="https://welcome.zuplo.io/",Qa="https://echo.zuplo.io",hy="rewritePattern",Cb=2,zp="policies.json",Bc="Looks like the Local Designer's service is unavailable. Try restarting the service by re-running the 'zup editor' command from the command line.",wz=({routeHandler:e,onOptionsChange:t})=>{var i;const n=((i=e.options)==null?void 0:i[hy])??Ab,r=o=>{t({...e.options,[hy]:o})};return m.jsx("fieldset",{className:"space-y-2",children:m.jsx(FM,{onUrlChange:r,url:n})})},vy=["us-east-2","us-east-1","us-west-1","us-west-2","af-south-1","ap-east-1","ap-southeast-3","ap-south-1","ap-northeast-3","ap-northeast-2","ap-southeast-1","ap-southeast-2","ap-northeast-1","ca-central-1","cn-north-1","cn-northwest-1","eu-central-1","eu-west-2","eu-south-1","eu-west-3","eu-north-1","me-south-1"],Mz=e=>{var n;if(e.length<1)return"The name of a function cannot be empty";if(e.length>140)return"The length of the name must be shorter (maximum 140 characters)";const t=/(arn:(aws[a-zA-Z-]*)?:lambda:)?([a-z]{2}(-gov)?-[a-z]+-\d{1}:)?(\d{12}:)?(function:)?([a-zA-Z0-9-_]+)(:(\$LATEST|[a-zA-Z0-9-_]+))?/;return!e.match(t)||e!==((n=e.match(t))==null?void 0:n[0])?"Invalid AWS lambda function name":null},xz=e=>e.length<1?"The secret key of the handler cannot be empty":null,bz=e=>e.length<1?"The access key of the handler cannot be empty":null,Nz=({routeHandler:e,onOptionsChange:t})=>{var h,w,I,y,M,x,S;const[n,r]=v.useState(null),[i,o]=v.useState(null),[a,l]=v.useState(null),s=v.useRef(!0),u={},c="$env(AWS_SECURE_ACCESS_KEY)",d="$env(AWS_ACCESS_KEY_ID)",f=(b,N)=>{t({...e.options,[b]:N}),p({...e.options,[b]:N})};v.useEffect(()=>{(!e.options||Object.keys(e.options).length===0)&&t({accessKeyId:d,functionName:"",region:vy[0],secretAccessKey:c}),s.current&&(s.current=!1),e.options&&Object.keys(e.options).length!==0&&p(e.options)},[u]);const p=b=>{r(Mz(b.functionName)),o(xz(b.secretAccessKey)),l(bz(b.accessKeyId))},g=m.jsx("div",{className:"relative",children:m.jsxs("div",{className:"absolute inset-x-0 top-10 flex flex-col bg-gray-200 z-20 rounded-md px-3 pt-1 pb-2 border-gray-300 border-2",children:[m.jsx("p",{className:"font-bold text-black text-md mb-2",children:"Use environment variables"}),m.jsx("span",{className:"text-sm text-gray-400 mb-2",children:"You can reference your environment variables in these configuration options, e.g."}),m.jsxs("span",{className:"text-sm text-zuplo-pink-hover flex flex-col space-y-1",children:[m.jsx("code",{children:c}),m.jsx("code",{children:d})]})]})});return m.jsxs("div",{className:"space-y-2",children:[m.jsx(zs,{label:"Function Name",hasError:!!n,errorMessage:n,onChange:b=>{f("functionName",b.target.value)},value:((h=e.options)==null?void 0:h.functionName)??""}),m.jsxs("div",{className:"grid grid-cols-5 gap-x-2 items-center",children:[m.jsx("span",{className:"col-span-1 text-right text-sm",children:"AWS Region"}),m.jsx(Zr,{options:vy.map(b=>({label:b,value:b})),onChange:b=>{f("region",b.value)},selected:{label:(w=e.options)==null?void 0:w.region,value:(I=e.options)==null?void 0:I.region},className:"col-span-4 w-full",classNameOptions:"w-full",testId:"filter-analytics",selectorElement:m.jsx("div",{className:"border-l-2 pl-1",children:m.jsx(QT,{className:"h-5 w-5 text-black","aria-hidden":"true"})})})]}),m.jsx(zs,{label:"Access Key ID",hasError:!!a,onChange:b=>{f("accessKeyId",b.target.value)},value:((y=e.options)==null?void 0:y.accessKeyId)===""?d:(M=e.options)==null?void 0:M.accessKeyId,tooltip:g,errorMessage:a}),m.jsx(zs,{label:"Secure Access Key",hasError:!!i,onChange:b=>{f("secretAccessKey",b.target.value)},tooltip:g,value:((x=e.options)==null?void 0:x.secretAccessKey)===""?c:(S=e.options)==null?void 0:S.secretAccessKey,errorMessage:i})]})},Sz=({item:e,selectedItemLabel:t,onSelectItem:n})=>{const r=()=>n(e);return m.jsx("li",{className:"m-0.5 text-sm",children:e.active?m.jsx("button",{type:"button",onClick:r,className:ae("py-0.5 px-2 truncate text-ellipsis rounded-md w-full text-left hover:bg-gray-300 border border-transparent",{"bg-gray-200":e.label===t}),children:e.label}):m.jsx("div",{className:"py-0.5 px-2 truncate text-gray-400 text-ellipsis rounded-md w-full text-left border border-transparent",children:e.label})})},yy=({header:e,undefinedContent:t,items:n,selectedItemLabel:r,onSelectItem:i})=>m.jsxs(m.Fragment,{children:[m.jsx("p",{className:"h-auto font-bold mb-2 pl-2 text-md",children:e}),m.jsx("div",{className:"h-5/6 overflow-y-auto",children:n?m.jsx("ul",{className:"list-none",children:n.map(o=>m.jsx(Sz,{item:o,selectedItemLabel:r,onSelectItem:i},o.label))}):m.jsx("div",{className:"p-2 text-gray-400 text-sm",children:t})})]}),Iy=window.SERVER_DATA,Dz=`http://${Iy.server_address}:${Iy.server_port}`;function Az(e,t){const r=/\$import\((.*?)\)/g.exec(e);if(!r||r.length!==2)return"INVALID IMPORT STATEMENT";const i=r[1];return t!==void 0&&i.indexOf(t)===0?i.substring(t.length):i}function Cz(e){return`$import(${e})`}const Ez=({routeHandler:e,onRequestHandlerChange:t})=>{const[n,r]=v.useState(),[i,o]=v.useState(),a=Az(e.module,"./modules/");v.useEffect(()=>{async function s(){try{const u=await fetch(`${Dz}/modules-data`,{method:"GET"});if(u.status!==200){const d=await u.json();console.log(d.message);return}const c=await u.json();r(c)}catch(u){console.log(u.message)}}s()},[]);const l=s=>{if(!(i!=null&&i.name))return;const u=Cz(i.filepath.replace(".ts",""));t({export:s.name,module:u,options:{}})};return m.jsx(m.Fragment,{children:m.jsxs(ro,{className:"flex bg-white flex-grow rounded-md relative",children:[m.jsx("div",{className:"truncate flex-grow border py-2 px-2 border-r-none shadow-sm focus:ring-indigo-500 focus:border-indigo-500 block w-full text-sm border-gray-300 rounded-l-md",children:`${a} - ${e.export}`}),m.jsx(ro.Button,{title:"Pick a module and export",disabled:!1,className:ae("shadow-sm px-3 flex-none border border-gray-300 border-l-0 rounded-r-md border-1 bg-gray-100 disabled:bg-gray-200 disabled:cursor-not-allowed disabled:opacity-50 enabled:hover:bg-gray-200 hover:bg-gray-200"),children:"..."}),m.jsx(ro.Panel,{style:{top:"2.40rem"},className:"w-full xl:w-650 z-20 bg-white absolute bottom-0 right-0 border border-gray-300 rounded-md border-1 p-4 min-h-80 h-80",children:({close:s})=>m.jsx("div",{className:"flex flex-col h-full",children:m.jsxs("div",{className:"flex flex-row grow h-5/6",children:[m.jsx("div",{className:"w-1/2 pr-2 h-full pb-2",children:m.jsx(yy,{header:"Modules",items:n==null?void 0:n.map(u=>({active:u.methods.length>0,label:u.name})),selectedItemLabel:i==null?void 0:i.name,onSelectItem:u=>{const c=n==null?void 0:n.find(d=>d.name===u.label);o(c)}})}),m.jsx("div",{className:"w-1/2 pl-2 h-full pb-2",children:m.jsx(yy,{header:"Exports (functions)",undefinedContent:"Choose a module to see available methods",items:i==null?void 0:i.methods.map(u=>({active:u.isHandlerInvocable,label:u.name})),selectedItemLabel:i==null?void 0:i.name,onSelectItem:u=>{const c=i==null?void 0:i.methods.find(d=>d.name===u.label);if(!c)throw new Error("Invalid state - invalid method selected");l(c),s()}})}),m.jsx("button",{type:"button",onClick:()=>s(),className:"self-start rounded-full hover:bg-gray-100 p-1",children:m.jsx(ij,{className:"h-4 w-4"})})]})})})]})})},Tz={export:"urlRewriteHandler",module:Eg,options:{rewritePattern:Ab}},jz={export:"awsLambdaHandler",module:Eg},Lz={export:"redirectHandler",module:Eg,options:{location:"https://zuplo.com",status:302}},Pz={export:"urlForwardHandler",module:"$import(@zuplo/runtime)",options:{baseUrl:Qa}},Rz={export:"openApiSpecHandler",module:"$import(@zuplo/runtime)",options:{openApiFilePath:"./config/routes.oas.json"}},wy={export:"default",module:"$import(./modules/hello-world)"},Oz=()=>({urlForward:{component:bj,displayName:"URL Forward",handlerID:"urlForward",routeHandler:{...Pz},documentationUrl:"https://zuplo.com/docs/handlers/url-forward"},urlRewrite:{component:wz,displayName:"URL Rewrite",handlerID:"urlRewrite",routeHandler:{...Tz},documentationUrl:"https://zuplo.com/docs/handlers/url-rewrite"},function:{component:Ez,displayName:"Function",handlerID:"function",documentationUrl:"https://zuplo.com/docs/handlers/custom-handler"},awsLambda:{component:Nz,displayName:"AWS Lambda",handlerID:"awsLambda",routeHandler:{...jz},documentationUrl:"https://zuplo.com/docs/handlers/aws-lambda"},redirect:{component:Iz,displayName:"Redirect",handlerID:"redirect",routeHandler:{...Lz},documentationUrl:"https://zuplo.com/docs/handlers/redirect"},openApi:{component:vz,displayName:"OpenAPI Spec",handlerID:"openApi",routeHandler:{...Rz,options:{openApiFilePath:`.${new URL(window.location.href).searchParams.get("path")}`}},documentationUrl:"https://zuplo.com/docs/handlers/openapi",isOpenApiExclusive:!0}}),kz=(e,t)=>{const n=Object.values(t).find(r=>{var i;return((i=r.routeHandler)==null?void 0:i.module)===e.module&&r.routeHandler.export===e.export});return n||t.function},zz=({routeHandler:e,onRequestHandlerChange:t,isOpenApi:n})=>{const r=Oz(),i=kz(e,r),[o,a]=v.useState({[i.handlerID]:e}),l=Object.values(r).filter(c=>c.isOpenApiExclusive?n:!0).map(c=>({label:c.displayName,value:c.handlerID})),s=c=>{var w,I,y;a({...o,[i.handlerID]:e});const d=r[c.value],f=o[d.handlerID],p=(f==null?void 0:f.export)??((w=d.routeHandler)==null?void 0:w.export)??wy.export,g=(f==null?void 0:f.module)??((I=d.routeHandler)==null?void 0:I.module)??wy.module,h=(f==null?void 0:f.options)??((y=d.routeHandler)==null?void 0:y.options)??{};t({export:p,module:g,options:h})},u=c=>{t({...e,options:c})};return m.jsxs("div",{className:"w-full bg-request-handler-gray flex flex-col px-4 py-3 -mt-1 rounded",children:[m.jsx("p",{className:"text-gray-500 text-md",children:"Request Handler"}),m.jsxs("div",{className:"flex flex-row mt-2",children:[m.jsx("label",{htmlFor:"handler",className:"col-span-1 block text-sm font-medium text-gray-700 text-right mr-3 pt-2",children:"Handler"}),m.jsxs("div",{className:"flex flex-row w-full self-center",children:[m.jsxs("div",{className:"flex flex-col col-span-4 rounded-md mr-3",children:[m.jsx(Zr,{matchWidth:!1,className:"w-xl text-sm",options:l,testId:"request-handler-picker",selected:{label:i.displayName,value:i.handlerID},onChange:s}),m.jsxs("a",{href:i.documentationUrl,className:"text-sm text-blue-500 hover:underline mt-2 ml-1",target:"_blank",rel:"noreferrer",children:[i.displayName," docs"]})]}),m.jsx("div",{className:" w-full",children:m.jsx(i.component,{routeHandler:e,onOptionsChange:u,onRequestHandlerChange:t})})]})]})]})},Su=(e,t)=>Object.entries(t??{}).flatMap(([n,r])=>r?Object.entries(r).filter(([i])=>i.includes("get")||i.includes("put")||i.includes("post")||i.includes("delete")||i.includes("options")||i.includes("head")||i.includes("patch")||i.includes("trace")).map(([i,o])=>({...o,additionalOperationContext:{oasFilePath:e,method:i,path:n,pathZuploConfig:r[cb]}})):[]),My=e=>!Object.keys(e).some(t=>t.includes("get")||t.includes("put")||t.includes("post")||t.includes("delete")||t.includes("options")||t.includes("head")||t.includes("patch")||t.includes("trace"));class Bz{constructor(t,n){se(this,"updateActiveFile");se(this,"getOpenApiDataEnforced",()=>{if(!this.openApiData)throw new Error("Invalid State - OpenApiManagerInstance.openApiData was undefined");return this.openApiData});se(this,"openApiFileModel");se(this,"openApiData");se(this,"parseError");se(this,"operationArray");se(this,"updateOpenApiData",t=>{const n={...this.openApiFileModel,content:JSON.stringify(t,null,2)};this.openApiData=t,this.operationArray=Su(this.openApiFileModel.path,t.paths),this.updateActiveFile(n)});se(this,"updatePathItem",(t,n)=>{const r=this.getOpenApiDataEnforced();let i=r.paths;i||(i={}),i[t]=n;const o={...r,paths:i};this.updateOpenApiData(o)});se(this,"addOperation",(t,n,r)=>{const i=this.getOpenApiDataEnforced(),o=n;let a=i.paths;a||(a={});let l=a[t];if(l||(l={"x-zuplo-path":{pathMode:"open-api"}}),l[o])throw new Error(`Cannot add operation ${n}-${t}, operation already exists`);l[o]=r,a[t]=l;const s={...i,paths:a};this.updateOpenApiData(s)});se(this,"deleteOperation",(t,n)=>{const r=this.getOpenApiDataEnforced(),i=r.paths;if(!i)throw new Error("Cannot delete operation when paths is undefined");const o=i[t];if(!o)throw new Error("Cannot delete operation when pathItem is undefined");delete o[n],My(o)?delete i[t]:i[t]=o;const a={...r,paths:i};this.updateOpenApiData(a)});se(this,"updateOperation",t=>{var d,f,p;const n=this.getOpenApiDataEnforced(),{path:r,newPath:i,newOperationObject:o}=t,a=t.method,l=t.newMethod,s=n.paths;if(!s)throw new Error("Cannot update operation when paths is undefined");const u=s[r];if(!u)throw new Error("Cannot update operation when pathItem is undefined");if(i&&l&&((d=s[i])!=null&&d[l]))throw new Error(`Operation with path: '${i}' and method: '${l.toUpperCase()}' already exists`);if(i&&!l&&((f=s[i])!=null&&f[a]))throw new Error(`Cannot change path to '${i}', operation already exists`);if(l&&u[l])throw new Error(`Cannot change method to '${l.toUpperCase()}', operation already exists`);if(i){delete u[a];const g=(p=s[r])==null?void 0:p["x-zuplo-path"];My(u)?delete s[r]:s[r]=u;const h=s[i]??{"x-zuplo-path":{pathMode:"open-api",...g}};h[l??a]=o,s[i]=h}else l?(delete u[a],u[l]=o,s[r]=u):(u[a]=o,s[r]=u);const c={...n,paths:s};this.updateOpenApiData(c)});var r;this.openApiFileModel=t;try{this.openApiData=JSON.parse(t.content??""),this.operationArray=Su(t.path,(r=this.openApiData)==null?void 0:r.paths)}catch(i){this.parseError=i}this.updateActiveFile=n}}/**
60
60
  * @remix-run/router v1.9.0
61
61
  *
62
62
  * Copyright (c) Remix Software Inc.
@@ -65,7 +65,7 @@ globstar while`,t,f,n,p,g),this.matchOne(t.slice(f),n.slice(p),r))return this.de
65
65
  * LICENSE.md file in the root directory of this source tree.
66
66
  *
67
67
  * @license MIT
68
- */function Ja(){return Ja=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ja.apply(this,arguments)}var si;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(si||(si={}));const xy="popstate";function Uz(e){e===void 0&&(e={});function t(r,i){let{pathname:o,search:a,hash:l}=r.location;return Bp("",{pathname:o,search:a,hash:l},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:EM(i)}return _z(t,n,null,e)}function Gn(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function $z(){return Math.random().toString(36).substr(2,8)}function My(e,t){return{usr:e.state,key:e.key,idx:t}}function Bp(e,t,n,r){return n===void 0&&(n=null),Ja({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Uc(t):t,{state:n,key:t&&t.key||r||$z()})}function EM(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Uc(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function _z(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,a=i.history,l=si.Pop,s=null,u=c();u==null&&(u=0,a.replaceState(Ja({},a.state,{idx:u}),""));function c(){return(a.state||{idx:null}).idx}function d(){l=si.Pop;let w=c(),I=w==null?null:w-u;u=w,s&&s({action:l,location:h.location,delta:I})}function f(w,I){l=si.Push;let y=Bp(h.location,w,I);n&&n(y,w),u=c()+1;let b=My(y,u),x=h.createHref(y);try{a.pushState(b,"",x)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;i.location.assign(x)}o&&s&&s({action:l,location:h.location,delta:1})}function p(w,I){l=si.Replace;let y=Bp(h.location,w,I);n&&n(y,w),u=c();let b=My(y,u),x=h.createHref(y);a.replaceState(b,"",x),o&&s&&s({action:l,location:h.location,delta:0})}function g(w){let I=i.location.origin!=="null"?i.location.origin:i.location.href,y=typeof w=="string"?w:EM(w);return Gn(I,"No window.location.(origin|href) available to create URL for href: "+y),new URL(y,I)}let h={get action(){return l},get location(){return e(i,a)},listen(w){if(s)throw new Error("A history only accepts one active listener");return i.addEventListener(xy,d),s=w,()=>{i.removeEventListener(xy,d),s=null}},createHref(w){return t(i,w)},createURL:g,encodeLocation(w){let I=g(w);return{pathname:I.pathname,search:I.search,hash:I.hash}},push:f,replace:p,go(w){return a.go(w)}};return h}var Sy;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Sy||(Sy={}));function Fz(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function Hz(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Uc(e):e;return{pathname:n?n.startsWith("/")?n:Wz(n,t):t,search:Yz(r),hash:Qz(i)}}function Wz(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function lf(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Gz(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Vz(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Uc(e):(i=Ja({},e),Gn(!i.pathname||!i.pathname.includes("?"),lf("?","pathname","search",i)),Gn(!i.pathname||!i.pathname.includes("#"),lf("#","pathname","hash",i)),Gn(!i.search||!i.search.includes("#"),lf("#","search","hash",i)));let o=e===""||i.pathname==="",a=o?"/":i.pathname,l;if(r||a==null)l=n;else{let d=t.length-1;if(a.startsWith("..")){let f=a.split("/");for(;f[0]==="..";)f.shift(),d-=1;i.pathname=f.join("/")}l=d>=0?t[d]:"/"}let s=Hz(i,l),u=a&&a!=="/"&&a.endsWith("/"),c=(o||a===".")&&n.endsWith("/");return!s.pathname.endsWith("/")&&(u||c)&&(s.pathname+="/"),s}const Zz=e=>e.join("/").replace(/\/\/+/g,"/"),Yz=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Qz=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,TM=["post","put","patch","delete"];new Set(TM);const Jz=["get",...TM];new Set(Jz);/**
68
+ */function Ja(){return Ja=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ja.apply(this,arguments)}var si;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(si||(si={}));const xy="popstate";function Uz(e){e===void 0&&(e={});function t(r,i){let{pathname:o,search:a,hash:l}=r.location;return Bp("",{pathname:o,search:a,hash:l},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:Eb(i)}return _z(t,n,null,e)}function Wn(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function $z(){return Math.random().toString(36).substr(2,8)}function by(e,t){return{usr:e.state,key:e.key,idx:t}}function Bp(e,t,n,r){return n===void 0&&(n=null),Ja({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Uc(t):t,{state:n,key:t&&t.key||r||$z()})}function Eb(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Uc(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function _z(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,a=i.history,l=si.Pop,s=null,u=c();u==null&&(u=0,a.replaceState(Ja({},a.state,{idx:u}),""));function c(){return(a.state||{idx:null}).idx}function d(){l=si.Pop;let w=c(),I=w==null?null:w-u;u=w,s&&s({action:l,location:h.location,delta:I})}function f(w,I){l=si.Push;let y=Bp(h.location,w,I);n&&n(y,w),u=c()+1;let M=by(y,u),x=h.createHref(y);try{a.pushState(M,"",x)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;i.location.assign(x)}o&&s&&s({action:l,location:h.location,delta:1})}function p(w,I){l=si.Replace;let y=Bp(h.location,w,I);n&&n(y,w),u=c();let M=by(y,u),x=h.createHref(y);a.replaceState(M,"",x),o&&s&&s({action:l,location:h.location,delta:0})}function g(w){let I=i.location.origin!=="null"?i.location.origin:i.location.href,y=typeof w=="string"?w:Eb(w);return Wn(I,"No window.location.(origin|href) available to create URL for href: "+y),new URL(y,I)}let h={get action(){return l},get location(){return e(i,a)},listen(w){if(s)throw new Error("A history only accepts one active listener");return i.addEventListener(xy,d),s=w,()=>{i.removeEventListener(xy,d),s=null}},createHref(w){return t(i,w)},createURL:g,encodeLocation(w){let I=g(w);return{pathname:I.pathname,search:I.search,hash:I.hash}},push:f,replace:p,go(w){return a.go(w)}};return h}var Ny;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Ny||(Ny={}));function Fz(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function Hz(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Uc(e):e;return{pathname:n?n.startsWith("/")?n:Gz(n,t):t,search:Yz(r),hash:Qz(i)}}function Gz(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function lf(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Wz(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Vz(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Uc(e):(i=Ja({},e),Wn(!i.pathname||!i.pathname.includes("?"),lf("?","pathname","search",i)),Wn(!i.pathname||!i.pathname.includes("#"),lf("#","pathname","hash",i)),Wn(!i.search||!i.search.includes("#"),lf("#","search","hash",i)));let o=e===""||i.pathname==="",a=o?"/":i.pathname,l;if(r||a==null)l=n;else{let d=t.length-1;if(a.startsWith("..")){let f=a.split("/");for(;f[0]==="..";)f.shift(),d-=1;i.pathname=f.join("/")}l=d>=0?t[d]:"/"}let s=Hz(i,l),u=a&&a!=="/"&&a.endsWith("/"),c=(o||a===".")&&n.endsWith("/");return!s.pathname.endsWith("/")&&(u||c)&&(s.pathname+="/"),s}const Zz=e=>e.join("/").replace(/\/\/+/g,"/"),Yz=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Qz=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Tb=["post","put","patch","delete"];new Set(Tb);const Jz=["get",...Tb];new Set(Jz);/**
69
69
  * React Router v6.16.0
70
70
  *
71
71
  * Copyright (c) Remix Software Inc.
@@ -74,7 +74,7 @@ globstar while`,t,f,n,p,g),this.matchOne(t.slice(f),n.slice(p),r))return this.de
74
74
  * LICENSE.md file in the root directory of this source tree.
75
75
  *
76
76
  * @license MIT
77
- */function Up(){return Up=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Up.apply(this,arguments)}const jM=v.createContext(null),Tg=v.createContext(null),jg=v.createContext(null),Pg=v.createContext({outlet:null,matches:[],isDataRoute:!1});function Lg(){return v.useContext(jg)!=null}function Rg(){return Lg()||Gn(!1),v.useContext(jg).location}function PM(e){v.useContext(Tg).static||v.useLayoutEffect(e)}function Xz(){let{isDataRoute:e}=v.useContext(Pg);return e?n3():qz()}function qz(){Lg()||Gn(!1);let e=v.useContext(jM),{basename:t,navigator:n}=v.useContext(Tg),{matches:r}=v.useContext(Pg),{pathname:i}=Rg(),o=JSON.stringify(Gz(r).map(s=>s.pathnameBase)),a=v.useRef(!1);return PM(()=>{a.current=!0}),v.useCallback(function(s,u){if(u===void 0&&(u={}),!a.current)return;if(typeof s=="number"){n.go(s);return}let c=Vz(s,JSON.parse(o),i,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Zz([t,c.pathname])),(u.replace?n.replace:n.push)(c,u.state,u)},[t,n,o,i,e])}var LM=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(LM||{}),RM=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(RM||{});function Kz(e){let t=v.useContext(jM);return t||Gn(!1),t}function e3(e){let t=v.useContext(Pg);return t||Gn(!1),t}function t3(e){let t=e3(),n=t.matches[t.matches.length-1];return n.route.id||Gn(!1),n.route.id}function n3(){let{router:e}=Kz(LM.UseNavigateStable),t=t3(RM.UseNavigateStable),n=v.useRef(!1);return PM(()=>{n.current=!0}),v.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Up({fromRouteId:t},o)))},[e,t])}function r3(e){let{basename:t="/",children:n=null,location:r,navigationType:i=si.Pop,navigator:o,static:a=!1}=e;Lg()&&Gn(!1);let l=t.replace(/^\/*/,"/"),s=v.useMemo(()=>({basename:l,navigator:o,static:a}),[l,o,a]);typeof r=="string"&&(r=Uc(r));let{pathname:u="/",search:c="",hash:d="",state:f=null,key:p="default"}=r,g=v.useMemo(()=>{let h=Fz(u,l);return h==null?null:{location:{pathname:h,search:c,hash:d,state:f,key:p},navigationType:i}},[l,u,c,d,f,p,i]);return g==null?null:v.createElement(Tg.Provider,{value:s},v.createElement(jg.Provider,{children:n,value:g}))}new Promise(()=>{});/**
77
+ */function Up(){return Up=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Up.apply(this,arguments)}const jb=v.createContext(null),Tg=v.createContext(null),jg=v.createContext(null),Lg=v.createContext({outlet:null,matches:[],isDataRoute:!1});function Pg(){return v.useContext(jg)!=null}function Rg(){return Pg()||Wn(!1),v.useContext(jg).location}function Lb(e){v.useContext(Tg).static||v.useLayoutEffect(e)}function Xz(){let{isDataRoute:e}=v.useContext(Lg);return e?n3():qz()}function qz(){Pg()||Wn(!1);let e=v.useContext(jb),{basename:t,navigator:n}=v.useContext(Tg),{matches:r}=v.useContext(Lg),{pathname:i}=Rg(),o=JSON.stringify(Wz(r).map(s=>s.pathnameBase)),a=v.useRef(!1);return Lb(()=>{a.current=!0}),v.useCallback(function(s,u){if(u===void 0&&(u={}),!a.current)return;if(typeof s=="number"){n.go(s);return}let c=Vz(s,JSON.parse(o),i,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Zz([t,c.pathname])),(u.replace?n.replace:n.push)(c,u.state,u)},[t,n,o,i,e])}var Pb=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Pb||{}),Rb=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Rb||{});function Kz(e){let t=v.useContext(jb);return t||Wn(!1),t}function e3(e){let t=v.useContext(Lg);return t||Wn(!1),t}function t3(e){let t=e3(),n=t.matches[t.matches.length-1];return n.route.id||Wn(!1),n.route.id}function n3(){let{router:e}=Kz(Pb.UseNavigateStable),t=t3(Rb.UseNavigateStable),n=v.useRef(!1);return Lb(()=>{n.current=!0}),v.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Up({fromRouteId:t},o)))},[e,t])}function r3(e){let{basename:t="/",children:n=null,location:r,navigationType:i=si.Pop,navigator:o,static:a=!1}=e;Pg()&&Wn(!1);let l=t.replace(/^\/*/,"/"),s=v.useMemo(()=>({basename:l,navigator:o,static:a}),[l,o,a]);typeof r=="string"&&(r=Uc(r));let{pathname:u="/",search:c="",hash:d="",state:f=null,key:p="default"}=r,g=v.useMemo(()=>{let h=Fz(u,l);return h==null?null:{location:{pathname:h,search:c,hash:d,state:f,key:p},navigationType:i}},[l,u,c,d,f,p,i]);return g==null?null:v.createElement(Tg.Provider,{value:s},v.createElement(jg.Provider,{children:n,value:g}))}new Promise(()=>{});/**
78
78
  * React Router DOM v6.16.0
79
79
  *
80
80
  * Copyright (c) Remix Software Inc.
@@ -83,8 +83,8 @@ globstar while`,t,f,n,p,g),this.matchOne(t.slice(f),n.slice(p),r))return this.de
83
83
  * LICENSE.md file in the root directory of this source tree.
84
84
  *
85
85
  * @license MIT
86
- */function $p(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function i3(e,t){let n=$p(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(o=>{n.append(i,o)})}),n}const o3="startTransition",Ny=lo[o3];function a3(e){let{basename:t,children:n,future:r,window:i}=e,o=v.useRef();o.current==null&&(o.current=Uz({window:i,v5Compat:!0}));let a=o.current,[l,s]=v.useState({action:a.action,location:a.location}),{v7_startTransition:u}=r||{},c=v.useCallback(d=>{u&&Ny?Ny(()=>s(d)):s(d)},[s,u]);return v.useLayoutEffect(()=>a.listen(c),[a,c]),v.createElement(r3,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:a})}var Dy;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(Dy||(Dy={}));var Ay;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Ay||(Ay={}));function l3(e){let t=v.useRef($p(e)),n=v.useRef(!1),r=Rg(),i=v.useMemo(()=>i3(r.search,n.current?null:t.current),[r.search]),o=Xz(),a=v.useCallback((l,s)=>{const u=$p(typeof l=="function"?l(i):l);n.current=!0,o("?"+u,s)},[o,i]);return[i,a]}function Cl(){return new URLSearchParams(Rg().search)}const OM=({url:e,handleErrors:t})=>{const n=Cl().get("path"),[r,i]=v.useState(null),[o,a]=v.useState([]),l=[],[s,u]=l3(),[c,d]=v.useState(!0),f=g=>{const h=g.value;i(g),p("path",h)},p=(g,h)=>{let w=new URLSearchParams(s);w.set(g,h),u(w)};return v.useEffect(()=>{if(o&&o.length>0){if(n&&n!==null){const g=o.filter(h=>h===n);if(g.length>0){i({label:g[0],value:g[0]});return}}i({label:o[0],value:o[0]}),p("path",o[0])}},[o,n]),v.useEffect(()=>{async function g(){try{d(!0);const h=await fetch(`${e}/open-api-files`,{method:"GET"});if(h.status!==200){const I=await h.json();t(I.message);return}const w=await h.json();a(w),d(!1)}catch(h){const w=h.message&&h.message.includes("Failed to fetch")?Bc:`Error: ${h.message}`;t(w)}finally{d(!1)}}g()},[e]),o.forEach(g=>{l.push({label:g,value:g})}),m.jsx("div",{className:"mt-5 justify-end pr-6",children:m.jsx("div",{className:"inline-block",children:m.jsx(Zr,{testId:"file-selector",placeholder:"Select Open API file",options:l,selected:r,onChange:f,className:"inline-block text-base w-[161.406px] 2xl:w-[195.766px] mr-4 h-[38px] text-slate-600",classNameOptions:"w-full",isLoadingData:c})})})},kM=k.createContext(void 0),$c=()=>{const e=v.useContext(kM);if(!e)throw new Error("useOpenApiDesignerContext must be used within a OpenApiDesignerContextWrapper");return e},s3=({url:e,children:t,handleErrors:n})=>{const r=Cl().get("path"),i=NM(),[o,a]=v.useState(!0),l=Cg(r),s=Al(),u=sM(Ng);if(v.useEffect(()=>{async function d(){try{if(r){const f=await fetch(`${e}/open-api-content?path=${r}`,{method:"GET"});if(f.status!==200){const h=await f.json();n(h.message);return}const p=await f.json(),g=[];p.forEach(h=>{i({path:h.path,type:xu.File,content:JSON.stringify(h.content),saveState:Nt.unmodified}),g.push({path:h.path,type:xu.File})}),u(g)}a(!1)}catch(f){const p=f.message&&f.message.includes("Failed to fetch")?Bc:`Error: ${f.message}`;n(p),a(!1)}}d()},[e,r]),!l&&o===!1&&r===null)return m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"flex gap-5 px-3 mx-4",children:m.jsx("div",{className:"flex-grow",children:m.jsx(OM,{url:e,handleErrors:n})})}),m.jsx("div",{className:"p-6",children:"You must select an Open API file to use the Open API Designer"})]});if(!l||o)return m.jsx("div",{className:"p-6",children:m.jsx(hc,{className:"w-4 h-4 mr-4"})});if(l.content===void 0)throw new Error("Invalid State - the oas.json fileModel content is 'undefined'");const c=new Bz(l,s);return m.jsx(kM.Provider,{value:c,children:t})},u3=({message:e})=>m.jsxs("div",{className:"flex flex-row items-center h-12 p-2",children:[m.jsx(hc,{className:"w-4 h-4 mr-2",borderPositionAndSize:"border-l-2"}),m.jsx("span",{children:e??"Loading"})]}),c3=()=>{const e=void 0;return m.jsxs("div",{className:"p-6 flex flex-col gap-y-3 text-gray-500",children:[m.jsxs("div",{className:"text-zuplo-pink text-xl flex flex-row items-center",children:[m.jsx(qT,{className:"h-6 w-auto mr-1"}),m.jsx("span",{children:"policies.json not found"})]}),m.jsx("p",{children:"You now need a policies.json file to continue building your Zup."}),m.jsx("p",{children:"We can generate one for you, so you can keep working."}),m.jsx(En,{classNames:"w-32",label:"Generate file",buttonType:xi.PRIMARY,onClick:()=>e})]})};class d3{constructor(t,n,r){se(this,"updateActiveFile");se(this,"getPolicyListEnforced",()=>{if(!this.policyList)throw new Error("Invalid State - PolicyManagerInstance.policyList was undefined");return this.policyList});se(this,"getOpenApiDocumentsEnforced",()=>{if(!this.openApiDocuments)throw new Error("Invalid State - PolicyManagerInstance.openApiDocuments was undefined");return this.openApiDocuments});se(this,"policyListFileModel");se(this,"policyList");se(this,"corsPolicyList");se(this,"openApiFileModels");se(this,"openApiDocuments");se(this,"policiesUsageInfo");se(this,"parseError");se(this,"updatePolicyList",t=>{const n={...this.policyListFileModel,content:JSON.stringify({policies:t,corsPolicies:this.corsPolicyList},null,2)};this.policyList=t,this.updateActiveFile(n)});se(this,"createPolicy",(t,n)=>{let r=this.policyList;if(r||(r=[]),r.some(o=>o.name===t.name))throw new Error(`Failed to create policy: Policy with name ${t.name} already exists. Please choose another name.`);r.push(t),this.updatePolicyList(r),n&&this.batchUpdateOperationPolicies(n,Qi(t.policyType),[t.name],"ADD")});se(this,"removePolicy",(t,n,r)=>{this.batchUpdateOperationPolicies(r,n,[t],"REMOVE")});se(this,"movePolicy",(t,n,r,i,o)=>{const a=p3(t,n,r);this.batchUpdateOperationPolicies([o],i,a,"OVERRIDE")});se(this,"deletePolicy",t=>{const n=this.policyList;if(!n)throw new Error("Failed to remove policy: policy list was not found");const r=n.findIndex(l=>l.name===t);if(r===-1)throw new Error(`Failed to delete policy: Policy with name ${t} does not exist.`);const i=n.splice(r,1)[0],o=Qi(i.policyType),a=this.getOperationsUsingPolicy(i.name).map(({additionalOperationContext:{oasFilePath:l,path:s,method:u}})=>({filePath:l,path:s,method:u}));this.batchUpdateOperationPolicies(a,o,[i.name],"REMOVE"),this.updatePolicyList(n)});se(this,"updatePolicy",(t,n)=>{const r=this.policyList;if(!r)throw new Error("Failed to update policy: Policy list not found");const i=r.findIndex(s=>s.name===t);if(i===-1)throw new Error(`Failed to update policy: Policy with name ${t} not found`);if(n.name===t){r[i]=n,this.updatePolicyList(r);return}const o=n.name;if(r.some(s=>s.name===o))throw new Error(`Failed to update policy: Policy with name ${o} already exists. Please choose another name`);const l=this.getOperationsUsingPolicy(t).map(({additionalOperationContext:{oasFilePath:s,path:u,method:c}})=>({filePath:s,path:u,method:c}));l.length>0&&this.batchUpdateOperationPolicies(l,Qi(n.policyType),[t,n.name],"RENAME"),r[i]=n,this.updatePolicyList(r)});se(this,"applyPolicy",(t,n)=>{const r=this.policyList;if(!r)throw new Error("Failed to apply policy: Policy list was not found");const i=r.find(o=>o.name===t);if(!i)throw new Error(`Failed to apply policy: Policy with name ${t} does not exist.`);this.batchUpdateOperationPolicies(n,Qi(i.policyType),[t],"ADD")});se(this,"getOperationsUsingPolicy",t=>{var n;return((n=this.policiesUsageInfo.find(r=>r.name===t))==null?void 0:n.operations)??[]});se(this,"getAllOperations",()=>{const t=this.openApiFileModels;return this.getOpenApiDocumentsEnforced().flatMap((r,i)=>{const o=t[i],a=r.paths??{};return Nu(o.path,a)})});this.openApiFileModels=n,this.openApiDocuments=[],n.forEach(i=>{try{const o=i.content;if(!o)throw new Error(`File: ${i.path} contains no content. Please configure it as a valid Open API file`);this.openApiDocuments=(this.openApiDocuments??[]).concat(JSON.parse(o))}catch(o){this.parseError=o}}),this.policyListFileModel=t;try{const i=JSON.parse(t.content??"");this.policyList=i.policies,this.corsPolicyList=i.corsPolicies}catch(i){this.parseError=i}try{this.policiesUsageInfo=Cy(this.policyList??[],this.openApiDocuments,n)}catch(i){this.parseError=i,this.policiesUsageInfo=[]}this.updateActiveFile=r}batchUpdateOperationPolicies(t,n,r,i){const o=this.openApiDocuments?Array.from(this.openApiDocuments):void 0,a=Array.from(this.openApiFileModels),l=[];if(!o)throw new Error("Failed to update operation, no Open API Documents found");for(const s of t){const{filePath:u,path:c,method:d}=s,f=a.findIndex(h=>h.path===u);if(f===-1)throw new Error(`Failed to update operation, Open API file '${u}' not found`);const p=o.at(f);if(!p)throw new Error(`Failed to update operation, Open API file '${u}' not found`);const g=this.updateOperationPolicies(p,u,c,d,n,r,i);o[f]=g,a[f]={...a[f],content:JSON.stringify(g,null,2)},l.includes(f)||l.push(f)}this.openApiDocuments=o,this.openApiFileModels=a,this.policiesUsageInfo=Cy(this.getPolicyListEnforced(),o,a),l.forEach(s=>{this.updateActiveFile(a[s])})}updateOperationPolicies(t,n,r,i,o,a,l){var h,w;const s=t.paths;if(!s)throw new Error(`Failed to update operation, no paths found in ${n}`);const u=s[r];if(!u)throw new Error(`Failed to update operation, path '${r}' not found in ${n}`);const c=u[i];if(!c)throw new Error(`Failed to update operation, method '${i}' not found in path ${r}`);const d=(w=(h=t.servers)==null?void 0:h.at(0))==null?void 0:w.url,f=c[Dr]??zu(d??Qa);let p=f.policies;p||(p={});const g=p[o]??[];switch(l){case"ADD":p[o]=g.concat(a);break;case"REMOVE":p[o]=g.filter(b=>!a.includes(b));break;case"OVERRIDE":p[o]=a;break;case"RENAME":const I=a[0],y=a[1];p[o]=g.map(b=>b===I?y:b)}return f.policies=p,c[Dr]=f,u[i]=c,s[r]=u,t.paths=s,t}}const El=()=>{const e=v.useContext(zM);if(!e)throw new Error("usePolicyManager found no context, it must be nested inside <PolicyContextWrapper />");return e},zM=k.createContext(void 0),f3=({children:e})=>{const t=Cg(zp),n=DM(),r=Al();if(!t)return n.length===0?m.jsx("div",{className:"p-6",children:m.jsx(u3,{message:"Loading policies.json"})}):m.jsx("div",{className:"p-6",children:m.jsx(c3,{})});if(t.content===void 0)throw new Error("Invalid State - the policies.json fileModel content is 'undefined'");const i=new d3(t,n,r);return m.jsx(zM.Provider,{value:i,children:e})},Qi=e=>e.includes("inbound")?"inbound":"outbound",p3=(e,t,n)=>{const r=Array.from(e),[i]=r.splice(t,1);return r.splice(n,0,i),r},Cy=(e,t,n)=>{const r=t.flatMap((i,o)=>{const a=n[o],l=i.paths??{};return Nu(a.path,l)});return e.reduce((i,o)=>{const a=Qi(o.policyType),l=r.reduce((u,c)=>{var d,f,p;return(p=(f=(d=c[Dr])==null?void 0:d.policies)==null?void 0:f[a])!=null&&p.includes(o.name)?u.concat(c):u},[]),s={...o,operations:l};return i.concat(s)},[])},BM=({isOpen:e,setIsOpen:t,children:n,title:r,badgeTitle:i,matchWidth:o=!1})=>m.jsx(Wn.Root,{show:e,as:"div",children:m.jsx(vu,{as:"div",className:"fixed z-30 inset-0 overflow-y-auto",onClose:()=>t(!0),children:m.jsxs("div",{className:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0",children:[m.jsx(Wn.Child,{as:"div",enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:m.jsx("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"})}),m.jsx("span",{className:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true",children:"​"}),m.jsx(Wn.Child,{as:v.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",children:m.jsxs("div",{className:`inline-block align-bottom bg-gray-100 rounded-md text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-5xl ${o?"sm:w-fit":"sm:w-full"} outline-none`,children:[m.jsxs("div",{className:"flex justify-between items-center pl-8 pt-4 pr-6 h-14",children:[m.jsxs("h1",{className:"self-end flex space-x-4 items-center",children:[m.jsx("span",{className:"font-bold text-2xl tracking-wide",children:r}),i?m.jsx("span",{className:"bg-zuplo-purple rounded-lg py-1 px-4 text-white opacity-50",children:i.toLocaleUpperCase()}):null]}),m.jsxs("button",{type:"button",className:"bg-gray-100 rounded-md text-gray-400 hover:text-gray-500 outline-none self-start",onClick:()=>t(!1),style:{transform:"rotate(45deg)"},children:[m.jsx("span",{className:"sr-only",children:"Close"}),m.jsx("span",{className:"text-3xl text-black font-sans font-bold","aria-hidden":"true",children:"+"})]})]}),n]})})]})})});function m3(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ey(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ty(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ey(Object(n),!0).forEach(function(r){m3(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ey(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function g3(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function h3(e,t){if(e==null)return{};var n=g3(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function v3(e,t){return y3(e)||I3(e,t)||w3(e,t)||b3()}function y3(e){if(Array.isArray(e))return e}function I3(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,o=void 0;try{for(var a=e[Symbol.iterator](),l;!(r=(l=a.next()).done)&&(n.push(l.value),!(t&&n.length===t));r=!0);}catch(s){i=!0,o=s}finally{try{!r&&a.return!=null&&a.return()}finally{if(i)throw o}}return n}}function w3(e,t){if(e){if(typeof e=="string")return jy(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return jy(e,t)}}function jy(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function b3(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
87
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function x3(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Py(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ly(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Py(Object(n),!0).forEach(function(r){x3(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Py(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function M3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return t.reduceRight(function(i,o){return o(i)},r)}}function pa(e){return function t(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return i.length>=e.length?e.apply(this,i):function(){for(var a=arguments.length,l=new Array(a),s=0;s<a;s++)l[s]=arguments[s];return t.apply(n,[].concat(i,l))}}}function Du(e){return{}.toString.call(e).includes("Object")}function S3(e){return!Object.keys(e).length}function Xa(e){return typeof e=="function"}function N3(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function D3(e,t){return Du(t)||Or("changeType"),Object.keys(t).some(function(n){return!N3(e,n)})&&Or("changeField"),t}function A3(e){Xa(e)||Or("selectorType")}function C3(e){Xa(e)||Du(e)||Or("handlerType"),Du(e)&&Object.values(e).some(function(t){return!Xa(t)})&&Or("handlersType")}function E3(e){e||Or("initialIsRequired"),Du(e)||Or("initialType"),S3(e)&&Or("initialContent")}function T3(e,t){throw new Error(e[t]||e.default)}var j3={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},Or=pa(T3)(j3),hs={changes:D3,selector:A3,handler:C3,initial:E3};function P3(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};hs.initial(e),hs.handler(t);var n={current:e},r=pa(O3)(n,t),i=pa(R3)(n),o=pa(hs.changes)(e),a=pa(L3)(n);function l(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(c){return c};return hs.selector(u),u(n.current)}function s(u){M3(r,i,o,a)(u)}return[l,s]}function L3(e,t){return Xa(t)?t(e.current):t}function R3(e,t){return e.current=Ly(Ly({},e.current),t),t}function O3(e,t,n){return Xa(t)?t(e.current):Object.keys(n).forEach(function(r){var i;return(i=t[r])===null||i===void 0?void 0:i.call(t,e.current[r])}),n}var k3={create:P3},z3={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.36.1/min/vs"}};function B3(e){return function t(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return i.length>=e.length?e.apply(this,i):function(){for(var a=arguments.length,l=new Array(a),s=0;s<a;s++)l[s]=arguments[s];return t.apply(n,[].concat(i,l))}}}function U3(e){return{}.toString.call(e).includes("Object")}function $3(e){return e||Ry("configIsRequired"),U3(e)||Ry("configType"),e.urls?(_3(),{paths:{vs:e.urls.monacoBase}}):e}function _3(){console.warn(UM.deprecation)}function F3(e,t){throw new Error(e[t]||e.default)}var UM={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
86
+ */function $p(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function i3(e,t){let n=$p(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(o=>{n.append(i,o)})}),n}const o3="startTransition",Sy=lo[o3];function a3(e){let{basename:t,children:n,future:r,window:i}=e,o=v.useRef();o.current==null&&(o.current=Uz({window:i,v5Compat:!0}));let a=o.current,[l,s]=v.useState({action:a.action,location:a.location}),{v7_startTransition:u}=r||{},c=v.useCallback(d=>{u&&Sy?Sy(()=>s(d)):s(d)},[s,u]);return v.useLayoutEffect(()=>a.listen(c),[a,c]),v.createElement(r3,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:a})}var Dy;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(Dy||(Dy={}));var Ay;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Ay||(Ay={}));function l3(e){let t=v.useRef($p(e)),n=v.useRef(!1),r=Rg(),i=v.useMemo(()=>i3(r.search,n.current?null:t.current),[r.search]),o=Xz(),a=v.useCallback((l,s)=>{const u=$p(typeof l=="function"?l(i):l);n.current=!0,o("?"+u,s)},[o,i]);return[i,a]}function Cl(){return new URLSearchParams(Rg().search)}const Ob=({url:e,handleErrors:t})=>{const n=Cl().get("path"),[r,i]=v.useState(null),[o,a]=v.useState([]),l=[],[s,u]=l3(),[c,d]=v.useState(!0),f=g=>{const h=g.value;i(g),p("path",h)},p=(g,h)=>{let w=new URLSearchParams(s);w.set(g,h),u(w)};return v.useEffect(()=>{if(o&&o.length>0){if(n&&n!==null){const g=o.filter(h=>h===n);if(g.length>0){i({label:g[0],value:g[0]});return}}i({label:o[0],value:o[0]}),p("path",o[0])}},[o,n]),v.useEffect(()=>{async function g(){try{d(!0);const h=await fetch(`${e}/open-api-files`,{method:"GET"});if(h.status!==200){const I=await h.json();t(I.message);return}const w=await h.json();a(w),d(!1)}catch(h){const w=h.message&&h.message.includes("Failed to fetch")?Bc:`Error: ${h.message}`;t(w)}finally{d(!1)}}g()},[e]),o.forEach(g=>{l.push({label:g,value:g})}),m.jsx("div",{className:"mt-5 justify-end pr-6",children:m.jsx("div",{className:"inline-block",children:m.jsx(Zr,{testId:"file-selector",placeholder:"Select Open API file",options:l,selected:r,onChange:f,className:"inline-block text-base w-[161.406px] 2xl:w-[195.766px] mr-4 h-[38px] text-slate-600",classNameOptions:"w-full",isLoadingData:c})})})},kb=k.createContext(void 0),$c=()=>{const e=v.useContext(kb);if(!e)throw new Error("useOpenApiDesignerContext must be used within a OpenApiDesignerContextWrapper");return e},s3=({url:e,children:t,handleErrors:n})=>{const r=Cl().get("path"),i=Sb(),[o,a]=v.useState(!0),l=Cg(r),s=Al(),u=sb(Sg);if(v.useEffect(()=>{async function d(){try{if(r){const f=await fetch(`${e}/open-api-content?path=${r}`,{method:"GET"});if(f.status!==200){const h=await f.json();n(h.message);return}const p=await f.json(),g=[];p.forEach(h=>{i({path:h.path,type:xu.File,content:JSON.stringify(h.content),saveState:St.unmodified}),g.push({path:h.path,type:xu.File})}),u(g)}a(!1)}catch(f){const p=f.message&&f.message.includes("Failed to fetch")?Bc:`Error: ${f.message}`;n(p),a(!1)}}d()},[e,r]),!l&&o===!1&&r===null)return m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"flex gap-5 px-3 mx-4",children:m.jsx("div",{className:"flex-grow",children:m.jsx(Ob,{url:e,handleErrors:n})})}),m.jsx("div",{className:"p-6",children:"You must select an Open API file to use the Open API Designer"})]});if(!l||o)return m.jsx("div",{className:"p-6",children:m.jsx(hc,{className:"w-4 h-4 mr-4"})});if(l.content===void 0)throw new Error("Invalid State - the oas.json fileModel content is 'undefined'");const c=new Bz(l,s);return m.jsx(kb.Provider,{value:c,children:t})},u3=({message:e})=>m.jsxs("div",{className:"flex flex-row items-center h-12 p-2",children:[m.jsx(hc,{className:"w-4 h-4 mr-2",borderPositionAndSize:"border-l-2"}),m.jsx("span",{children:e??"Loading"})]}),c3=()=>{const e=void 0;return m.jsxs("div",{className:"p-6 flex flex-col gap-y-3 text-gray-500",children:[m.jsxs("div",{className:"text-zuplo-pink text-xl flex flex-row items-center",children:[m.jsx(qT,{className:"h-6 w-auto mr-1"}),m.jsx("span",{children:"policies.json not found"})]}),m.jsx("p",{children:"You now need a policies.json file to continue building your Zup."}),m.jsx("p",{children:"We can generate one for you, so you can keep working."}),m.jsx(En,{classNames:"w-32",label:"Generate file",buttonType:xi.PRIMARY,onClick:()=>e})]})};class d3{constructor(t,n,r){se(this,"updateActiveFile");se(this,"getPolicyListEnforced",()=>{if(!this.policyList)throw new Error("Invalid State - PolicyManagerInstance.policyList was undefined");return this.policyList});se(this,"getOpenApiDocumentsEnforced",()=>{if(!this.openApiDocuments)throw new Error("Invalid State - PolicyManagerInstance.openApiDocuments was undefined");return this.openApiDocuments});se(this,"policyListFileModel");se(this,"policyList");se(this,"corsPolicyList");se(this,"openApiFileModels");se(this,"openApiDocuments");se(this,"policiesUsageInfo");se(this,"parseError");se(this,"updatePolicyList",t=>{const n={...this.policyListFileModel,content:JSON.stringify({policies:t,corsPolicies:this.corsPolicyList},null,2)};this.policyList=t,this.updateActiveFile(n)});se(this,"createPolicy",(t,n)=>{let r=this.policyList;if(r||(r=[]),r.some(o=>o.name===t.name))throw new Error(`Failed to create policy: Policy with name ${t.name} already exists. Please choose another name.`);r.push(t),this.updatePolicyList(r),n&&this.batchUpdateOperationPolicies(n,Qi(t.policyType),[t.name],"ADD")});se(this,"removePolicy",(t,n,r)=>{this.batchUpdateOperationPolicies(r,n,[t],"REMOVE")});se(this,"movePolicy",(t,n,r,i,o)=>{const a=p3(t,n,r);this.batchUpdateOperationPolicies([o],i,a,"OVERRIDE")});se(this,"deletePolicy",t=>{const n=this.policyList;if(!n)throw new Error("Failed to remove policy: policy list was not found");const r=n.findIndex(l=>l.name===t);if(r===-1)throw new Error(`Failed to delete policy: Policy with name ${t} does not exist.`);const i=n.splice(r,1)[0],o=Qi(i.policyType),a=this.getOperationsUsingPolicy(i.name).map(({additionalOperationContext:{oasFilePath:l,path:s,method:u}})=>({filePath:l,path:s,method:u}));this.batchUpdateOperationPolicies(a,o,[i.name],"REMOVE"),this.updatePolicyList(n)});se(this,"updatePolicy",(t,n)=>{const r=this.policyList;if(!r)throw new Error("Failed to update policy: Policy list not found");const i=r.findIndex(s=>s.name===t);if(i===-1)throw new Error(`Failed to update policy: Policy with name ${t} not found`);if(n.name===t){r[i]=n,this.updatePolicyList(r);return}const o=n.name;if(r.some(s=>s.name===o))throw new Error(`Failed to update policy: Policy with name ${o} already exists. Please choose another name`);const l=this.getOperationsUsingPolicy(t).map(({additionalOperationContext:{oasFilePath:s,path:u,method:c}})=>({filePath:s,path:u,method:c}));l.length>0&&this.batchUpdateOperationPolicies(l,Qi(n.policyType),[t,n.name],"RENAME"),r[i]=n,this.updatePolicyList(r)});se(this,"applyPolicy",(t,n)=>{const r=this.policyList;if(!r)throw new Error("Failed to apply policy: Policy list was not found");const i=r.find(o=>o.name===t);if(!i)throw new Error(`Failed to apply policy: Policy with name ${t} does not exist.`);this.batchUpdateOperationPolicies(n,Qi(i.policyType),[t],"ADD")});se(this,"getOperationsUsingPolicy",t=>{var n;return((n=this.policiesUsageInfo.find(r=>r.name===t))==null?void 0:n.operations)??[]});se(this,"getAllOperations",()=>{const t=this.openApiFileModels;return this.getOpenApiDocumentsEnforced().flatMap((r,i)=>{const o=t[i],a=r.paths??{};return Su(o.path,a)})});this.openApiFileModels=n,this.openApiDocuments=[],n.forEach(i=>{try{const o=i.content;if(!o)throw new Error(`File: ${i.path} contains no content. Please configure it as a valid Open API file`);this.openApiDocuments=(this.openApiDocuments??[]).concat(JSON.parse(o))}catch(o){this.parseError=o}}),this.policyListFileModel=t;try{const i=JSON.parse(t.content??"");this.policyList=i.policies,this.corsPolicyList=i.corsPolicies}catch(i){this.parseError=i}try{this.policiesUsageInfo=Cy(this.policyList??[],this.openApiDocuments,n)}catch(i){this.parseError=i,this.policiesUsageInfo=[]}this.updateActiveFile=r}batchUpdateOperationPolicies(t,n,r,i){const o=this.openApiDocuments?Array.from(this.openApiDocuments):void 0,a=Array.from(this.openApiFileModels),l=[];if(!o)throw new Error("Failed to update operation, no Open API Documents found");for(const s of t){const{filePath:u,path:c,method:d}=s,f=a.findIndex(h=>h.path===u);if(f===-1)throw new Error(`Failed to update operation, Open API file '${u}' not found`);const p=o.at(f);if(!p)throw new Error(`Failed to update operation, Open API file '${u}' not found`);const g=this.updateOperationPolicies(p,u,c,d,n,r,i);o[f]=g,a[f]={...a[f],content:JSON.stringify(g,null,2)},l.includes(f)||l.push(f)}this.openApiDocuments=o,this.openApiFileModels=a,this.policiesUsageInfo=Cy(this.getPolicyListEnforced(),o,a),l.forEach(s=>{this.updateActiveFile(a[s])})}updateOperationPolicies(t,n,r,i,o,a,l){var h,w;const s=t.paths;if(!s)throw new Error(`Failed to update operation, no paths found in ${n}`);const u=s[r];if(!u)throw new Error(`Failed to update operation, path '${r}' not found in ${n}`);const c=u[i];if(!c)throw new Error(`Failed to update operation, method '${i}' not found in path ${r}`);const d=(w=(h=t.servers)==null?void 0:h.at(0))==null?void 0:w.url,f=c[Dr]??zu(d??Qa);let p=f.policies;p||(p={});const g=p[o]??[];switch(l){case"ADD":p[o]=g.concat(a);break;case"REMOVE":p[o]=g.filter(M=>!a.includes(M));break;case"OVERRIDE":p[o]=a;break;case"RENAME":const I=a[0],y=a[1];p[o]=g.map(M=>M===I?y:M)}return f.policies=p,c[Dr]=f,u[i]=c,s[r]=u,t.paths=s,t}}const El=()=>{const e=v.useContext(zb);if(!e)throw new Error("usePolicyManager found no context, it must be nested inside <PolicyContextWrapper />");return e},zb=k.createContext(void 0),f3=({children:e})=>{const t=Cg(zp),n=Db(),r=Al();if(!t)return n.length===0?m.jsx("div",{className:"p-6",children:m.jsx(u3,{message:"Loading policies.json"})}):m.jsx("div",{className:"p-6",children:m.jsx(c3,{})});if(t.content===void 0)throw new Error("Invalid State - the policies.json fileModel content is 'undefined'");const i=new d3(t,n,r);return m.jsx(zb.Provider,{value:i,children:e})},Qi=e=>e.includes("inbound")?"inbound":"outbound",p3=(e,t,n)=>{const r=Array.from(e),[i]=r.splice(t,1);return r.splice(n,0,i),r},Cy=(e,t,n)=>{const r=t.flatMap((i,o)=>{const a=n[o],l=i.paths??{};return Su(a.path,l)});return e.reduce((i,o)=>{const a=Qi(o.policyType),l=r.reduce((u,c)=>{var d,f,p;return(p=(f=(d=c[Dr])==null?void 0:d.policies)==null?void 0:f[a])!=null&&p.includes(o.name)?u.concat(c):u},[]),s={...o,operations:l};return i.concat(s)},[])},Bb=({isOpen:e,setIsOpen:t,children:n,title:r,badgeTitle:i,matchWidth:o=!1})=>m.jsx(Gn.Root,{show:e,as:"div",children:m.jsx(vu,{as:"div",className:"fixed z-30 inset-0 overflow-y-auto",onClose:()=>t(!0),children:m.jsxs("div",{className:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0",children:[m.jsx(Gn.Child,{as:"div",enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:m.jsx("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"})}),m.jsx("span",{className:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true",children:"​"}),m.jsx(Gn.Child,{as:v.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",children:m.jsxs("div",{className:`inline-block align-bottom bg-gray-100 rounded-md text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-5xl ${o?"sm:w-fit":"sm:w-full"} outline-none`,children:[m.jsxs("div",{className:"flex justify-between items-center pl-8 pt-4 pr-6 h-14",children:[m.jsxs("h1",{className:"self-end flex space-x-4 items-center",children:[m.jsx("span",{className:"font-bold text-2xl tracking-wide",children:r}),i?m.jsx("span",{className:"bg-zuplo-purple rounded-lg py-1 px-4 text-white opacity-50",children:i.toLocaleUpperCase()}):null]}),m.jsxs("button",{type:"button",className:"bg-gray-100 rounded-md text-gray-400 hover:text-gray-500 outline-none self-start",onClick:()=>t(!1),style:{transform:"rotate(45deg)"},children:[m.jsx("span",{className:"sr-only",children:"Close"}),m.jsx("span",{className:"text-3xl text-black font-sans font-bold","aria-hidden":"true",children:"+"})]})]}),n]})})]})})});function m3(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ey(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ty(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ey(Object(n),!0).forEach(function(r){m3(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ey(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function g3(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function h3(e,t){if(e==null)return{};var n=g3(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function v3(e,t){return y3(e)||I3(e,t)||w3(e,t)||M3()}function y3(e){if(Array.isArray(e))return e}function I3(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,o=void 0;try{for(var a=e[Symbol.iterator](),l;!(r=(l=a.next()).done)&&(n.push(l.value),!(t&&n.length===t));r=!0);}catch(s){i=!0,o=s}finally{try{!r&&a.return!=null&&a.return()}finally{if(i)throw o}}return n}}function w3(e,t){if(e){if(typeof e=="string")return jy(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return jy(e,t)}}function jy(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function M3(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
87
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function x3(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ly(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Py(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ly(Object(n),!0).forEach(function(r){x3(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ly(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function b3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return t.reduceRight(function(i,o){return o(i)},r)}}function pa(e){return function t(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return i.length>=e.length?e.apply(this,i):function(){for(var a=arguments.length,l=new Array(a),s=0;s<a;s++)l[s]=arguments[s];return t.apply(n,[].concat(i,l))}}}function Du(e){return{}.toString.call(e).includes("Object")}function N3(e){return!Object.keys(e).length}function Xa(e){return typeof e=="function"}function S3(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function D3(e,t){return Du(t)||Or("changeType"),Object.keys(t).some(function(n){return!S3(e,n)})&&Or("changeField"),t}function A3(e){Xa(e)||Or("selectorType")}function C3(e){Xa(e)||Du(e)||Or("handlerType"),Du(e)&&Object.values(e).some(function(t){return!Xa(t)})&&Or("handlersType")}function E3(e){e||Or("initialIsRequired"),Du(e)||Or("initialType"),N3(e)&&Or("initialContent")}function T3(e,t){throw new Error(e[t]||e.default)}var j3={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},Or=pa(T3)(j3),hs={changes:D3,selector:A3,handler:C3,initial:E3};function L3(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};hs.initial(e),hs.handler(t);var n={current:e},r=pa(O3)(n,t),i=pa(R3)(n),o=pa(hs.changes)(e),a=pa(P3)(n);function l(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(c){return c};return hs.selector(u),u(n.current)}function s(u){b3(r,i,o,a)(u)}return[l,s]}function P3(e,t){return Xa(t)?t(e.current):t}function R3(e,t){return e.current=Py(Py({},e.current),t),t}function O3(e,t,n){return Xa(t)?t(e.current):Object.keys(n).forEach(function(r){var i;return(i=t[r])===null||i===void 0?void 0:i.call(t,e.current[r])}),n}var k3={create:L3},z3={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.36.1/min/vs"}};function B3(e){return function t(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return i.length>=e.length?e.apply(this,i):function(){for(var a=arguments.length,l=new Array(a),s=0;s<a;s++)l[s]=arguments[s];return t.apply(n,[].concat(i,l))}}}function U3(e){return{}.toString.call(e).includes("Object")}function $3(e){return e||Ry("configIsRequired"),U3(e)||Ry("configType"),e.urls?(_3(),{paths:{vs:e.urls.monacoBase}}):e}function _3(){console.warn(Ub.deprecation)}function F3(e,t){throw new Error(e[t]||e.default)}var Ub={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
88
88
  You are using deprecated way of configuration.
89
89
 
90
90
  Instead of using
@@ -93,27 +93,27 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
93
93
  monaco.config({ paths: { vs: '...' } })
94
94
 
95
95
  For more please check the link https://github.com/suren-atoyan/monaco-loader#config
96
- `},Ry=B3(F3)(UM),H3={config:$3},W3=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(i){return n.reduceRight(function(o,a){return a(o)},i)}};function $M(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],$M(e[n],t[n]))}),Ty(Ty({},e),t)}var G3={type:"cancelation",msg:"operation is manually canceled"};function sf(e){var t=!1,n=new Promise(function(r,i){e.then(function(o){return t?i(G3):r(o)}),e.catch(i)});return n.cancel=function(){return t=!0},n}var V3=k3.create({config:z3,isInitialized:!1,resolve:null,reject:null,monaco:null}),_M=v3(V3,2),Tl=_M[0],_c=_M[1];function Z3(e){var t=H3.config(e),n=t.monaco,r=h3(t,["monaco"]);_c(function(i){return{config:$M(i.config,r),monaco:n}})}function Y3(){var e=Tl(function(t){var n=t.monaco,r=t.isInitialized,i=t.resolve;return{monaco:n,isInitialized:r,resolve:i}});if(!e.isInitialized){if(_c({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),sf(uf);if(window.monaco&&window.monaco.editor)return FM(window.monaco),e.resolve(window.monaco),sf(uf);W3(Q3,X3)(q3)}return sf(uf)}function Q3(e){return document.body.appendChild(e)}function J3(e){var t=document.createElement("script");return e&&(t.src=e),t}function X3(e){var t=Tl(function(r){var i=r.config,o=r.reject;return{config:i,reject:o}}),n=J3("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function q3(){var e=Tl(function(n){var r=n.config,i=n.resolve,o=n.reject;return{config:r,resolve:i,reject:o}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(n){FM(n),e.resolve(n)},function(n){e.reject(n)})}function FM(e){Tl().monaco||_c({monaco:e})}function K3(){return Tl(function(e){var t=e.monaco;return t})}var uf=new Promise(function(e,t){return _c({resolve:e,reject:t})}),HM={config:Z3,init:Y3,__getMonacoInstance:K3},eB={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},cf=eB,tB={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},nB=tB;function rB({children:e}){return k.createElement("div",{style:nB.container},e)}var iB=rB,oB=iB;function aB({width:e,height:t,isEditorReady:n,loading:r,_ref:i,className:o,wrapperProps:a}){return k.createElement("section",{style:{...cf.wrapper,width:e,height:t},...a},!n&&k.createElement(oB,null,r),k.createElement("div",{ref:i,style:{...cf.fullWidth,...!n&&cf.hide},className:o}))}var lB=aB,WM=v.memo(lB);function sB(e){v.useEffect(e,[])}var GM=sB;function uB(e,t,n=!0){let r=v.useRef(!0);v.useEffect(r.current||!n?()=>{r.current=!1}:e,t)}var Yt=uB;function Ca(){}function Ji(e,t,n,r){return cB(e,r)||dB(e,t,n,r)}function cB(e,t){return e.editor.getModel(VM(e,t))}function dB(e,t,n,r){return e.editor.createModel(t,n,r?VM(e,r):void 0)}function VM(e,t){return e.Uri.parse(t)}function fB({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:i,originalModelPath:o,modifiedModelPath:a,keepCurrentOriginalModel:l=!1,keepCurrentModifiedModel:s=!1,theme:u="light",loading:c="Loading...",options:d={},height:f="100%",width:p="100%",className:g,wrapperProps:h={},beforeMount:w=Ca,onMount:I=Ca}){let[y,b]=v.useState(!1),[x,N]=v.useState(!0),M=v.useRef(null),S=v.useRef(null),C=v.useRef(null),L=v.useRef(I),R=v.useRef(w),O=v.useRef(!1);GM(()=>{let Z=HM.init();return Z.then($=>(S.current=$)&&N(!1)).catch($=>($==null?void 0:$.type)!=="cancelation"&&console.error("Monaco initialization: error:",$)),()=>M.current?G():Z.cancel()}),Yt(()=>{if(M.current&&S.current){let Z=M.current.getOriginalEditor(),$=Ji(S.current,e||"",r||n||"text",o||"");$!==Z.getModel()&&Z.setModel($)}},[o],y),Yt(()=>{if(M.current&&S.current){let Z=M.current.getModifiedEditor(),$=Ji(S.current,t||"",i||n||"text",a||"");$!==Z.getModel()&&Z.setModel($)}},[a],y),Yt(()=>{let Z=M.current.getModifiedEditor();Z.getOption(S.current.editor.EditorOption.readOnly)?Z.setValue(t||""):t!==Z.getValue()&&(Z.executeEdits("",[{range:Z.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),Z.pushUndoStop())},[t],y),Yt(()=>{var Z,$;($=(Z=M.current)==null?void 0:Z.getModel())==null||$.original.setValue(e||"")},[e],y),Yt(()=>{let{original:Z,modified:$}=M.current.getModel();S.current.editor.setModelLanguage(Z,r||n||"text"),S.current.editor.setModelLanguage($,i||n||"text")},[n,r,i],y),Yt(()=>{var Z;(Z=S.current)==null||Z.editor.setTheme(u)},[u],y),Yt(()=>{var Z;(Z=M.current)==null||Z.updateOptions(d)},[d],y);let J=v.useCallback(()=>{var ee;if(!S.current)return;R.current(S.current);let Z=Ji(S.current,e||"",r||n||"text",o||""),$=Ji(S.current,t||"",i||n||"text",a||"");(ee=M.current)==null||ee.setModel({original:Z,modified:$})},[n,t,i,e,r,o,a]),U=v.useCallback(()=>{var Z;!O.current&&C.current&&(M.current=S.current.editor.createDiffEditor(C.current,{automaticLayout:!0,...d}),J(),(Z=S.current)==null||Z.editor.setTheme(u),b(!0),O.current=!0)},[d,u,J]);v.useEffect(()=>{y&&L.current(M.current,S.current)},[y]),v.useEffect(()=>{!x&&!y&&U()},[x,y,U]);function G(){var $,ee,P,B;let Z=($=M.current)==null?void 0:$.getModel();l||((ee=Z==null?void 0:Z.original)==null||ee.dispose()),s||((P=Z==null?void 0:Z.modified)==null||P.dispose()),(B=M.current)==null||B.dispose()}return k.createElement(WM,{width:p,height:f,isEditorReady:y,loading:c,_ref:C,className:g,wrapperProps:h})}var pB=fB;v.memo(pB);function mB(e){let t=v.useRef();return v.useEffect(()=>{t.current=e},[e]),t.current}var gB=mB,vs=new Map;function hB({defaultValue:e,defaultLanguage:t,defaultPath:n,value:r,language:i,path:o,theme:a="light",line:l,loading:s="Loading...",options:u={},overrideServices:c={},saveViewState:d=!0,keepCurrentModel:f=!1,width:p="100%",height:g="100%",className:h,wrapperProps:w={},beforeMount:I=Ca,onMount:y=Ca,onChange:b,onValidate:x=Ca}){let[N,M]=v.useState(!1),[S,C]=v.useState(!0),L=v.useRef(null),R=v.useRef(null),O=v.useRef(null),J=v.useRef(y),U=v.useRef(I),G=v.useRef(),Z=v.useRef(r),$=gB(o),ee=v.useRef(!1),P=v.useRef(!1);GM(()=>{let V=HM.init();return V.then(D=>(L.current=D)&&C(!1)).catch(D=>(D==null?void 0:D.type)!=="cancelation"&&console.error("Monaco initialization: error:",D)),()=>R.current?F():V.cancel()}),Yt(()=>{var D,E,T,z;let V=Ji(L.current,e||r||"",t||i||"",o||n||"");V!==((D=R.current)==null?void 0:D.getModel())&&(d&&vs.set($,(E=R.current)==null?void 0:E.saveViewState()),(T=R.current)==null||T.setModel(V),d&&((z=R.current)==null||z.restoreViewState(vs.get(o))))},[o],N),Yt(()=>{var V;(V=R.current)==null||V.updateOptions(u)},[u],N),Yt(()=>{!R.current||r===void 0||(R.current.getOption(L.current.editor.EditorOption.readOnly)?R.current.setValue(r):r!==R.current.getValue()&&(P.current=!0,R.current.executeEdits("",[{range:R.current.getModel().getFullModelRange(),text:r,forceMoveMarkers:!0}]),R.current.pushUndoStop(),P.current=!1))},[r],N),Yt(()=>{var D,E;let V=(D=R.current)==null?void 0:D.getModel();V&&i&&((E=L.current)==null||E.editor.setModelLanguage(V,i))},[i],N),Yt(()=>{var V;l!==void 0&&((V=R.current)==null||V.revealLine(l))},[l],N),Yt(()=>{var V;(V=L.current)==null||V.editor.setTheme(a)},[a],N);let B=v.useCallback(()=>{var V;if(!(!O.current||!L.current)&&!ee.current){U.current(L.current);let D=o||n,E=Ji(L.current,r||e||"",t||i||"",D||"");R.current=(V=L.current)==null?void 0:V.editor.create(O.current,{model:E,automaticLayout:!0,...u},c),d&&R.current.restoreViewState(vs.get(D)),L.current.editor.setTheme(a),M(!0),ee.current=!0}},[e,t,n,r,i,o,u,c,d,a]);v.useEffect(()=>{N&&J.current(R.current,L.current)},[N]),v.useEffect(()=>{!S&&!N&&B()},[S,N,B]),Z.current=r,v.useEffect(()=>{var V,D;N&&b&&((V=G.current)==null||V.dispose(),G.current=(D=R.current)==null?void 0:D.onDidChangeModelContent(E=>{P.current||b(R.current.getValue(),E)}))},[N,b]),v.useEffect(()=>{if(N){let V=L.current.editor.onDidChangeMarkers(D=>{var T;let E=(T=R.current.getModel())==null?void 0:T.uri;if(E&&D.find(z=>z.path===E.path)){let z=L.current.editor.getModelMarkers({resource:E});x==null||x(z)}});return()=>{V==null||V.dispose()}}return()=>{}},[N,x]);function F(){var V,D;(V=G.current)==null||V.dispose(),f?d&&vs.set(o,R.current.saveViewState()):(D=R.current.getModel())==null||D.dispose(),R.current.dispose()}return k.createElement(WM,{width:p,height:g,isEditorReady:N,loading:s,_ref:O,className:h,wrapperProps:w})}var vB=hB,yB=v.memo(vB),ZM=yB;const IB={"policy-options":"_policy-options_pxqsa_1"},Og=({documentationSrc:e})=>m.jsx("div",{className:`px-4 py-2 overflow-auto h-60 bg-editor prose prose-invert prose-sm max-w-full ${IB["policy-options"]}`,dangerouslySetInnerHTML:{__html:e}}),YM=({onConfirm:e,onCancel:t,onRequestPreviewAccess:n,isDisabled:r=!1,mustRequestAccess:i})=>{const o=m.jsxs(m.Fragment,{children:[m.jsx(En,{label:"Cancel",buttonType:xi.WHITE,classNames:"w-24 justify-center",onClick:t,dataTestId:"policy-picker-footer-cancel-btn"}),m.jsx(En,{label:"OK",classNames:"w-24 justify-center",onClick:e,isDisabled:r,dataTestId:"policy-picker-footer-ok-btn"})]}),a=m.jsxs(m.Fragment,{children:[m.jsx(En,{label:"Cancel",buttonType:xi.WHITE,classNames:"w-24 justify-center",onClick:t,dataTestId:"policy-picker-footer-cancel-btn"}),m.jsx(En,{label:"Request access",classNames:"w-36 justify-center",onClick:n,dataTestId:"policy-picker-footer-request-access-btn"})]});return m.jsxs("div",{className:"h-20 flex items-center",children:[m.jsx("div",{}),m.jsx("div",{className:"ml-auto space-x-2 mr-3 flex",children:i?a:o})]})},QM=({name:e,onChangeName:t,policyTypeInformation:n,validationErrorName:r,disabled:i})=>{const o=a=>{t(a.currentTarget.value)};return m.jsxs("div",{className:"grid grid-cols-8 text-sm gap-2 items-center",children:[m.jsx("label",{className:"col-span-1 text-right",children:"Name"}),m.jsxs("div",{className:"col-span-7",children:[m.jsx("input",{type:"text",id:"route-handler","data-test":"policy-picker-name-input",name:"route-handler",className:ae("shadow-sm block w-full text-sm rounded-md",{"border-2 border-red-300 text-red-600 focus:ring-red-500 focus:border-red-500":r,"border-gray-300 focus:ring-indigo-500 focus:border-indigo-500 ":!r,"bg-gray-200":i}),value:e||"",disabled:i,onChange:o,"aria-describedby":"email-description"}),r?m.jsx("span",{className:"absolute text-xs mt-1 text-red-600",children:r}):null]}),m.jsx("label",{className:"col-span-1 text-right mt-4",children:"Type"}),m.jsxs("span",{className:"col-span-7 text-gray-500 mt-4",children:[n.typeName,n.documentationUrl?m.jsxs(m.Fragment,{children:[" ","-"," ",m.jsx("a",{href:n.documentationUrl,target:"_blank",rel:"noreferrer",className:"text-blue-500 hover:underline",children:"documentation"})]}):null]})]})},Au=({label:e,children:t,classNameLabel:n,className:r})=>m.jsxs("div",{className:r,children:[m.jsx("span",{className:ae("text-gray-500 uppercase pb-2",n),children:e}),m.jsx("div",{className:"mt-2",children:t})]}),wB={legacyIdMaps:{"api-auth-key-inbound-policy":"api-key-auth-inbound","auth0-jwt-inbound":"auth0-jwt-auth-inbound","basic-auth-inbound-policy":"basic-auth-inbound","basic-rate-limit-policy-inbound":"rate-limit-policy-inbound","cognito-jwt-inbound":"cognito-jwt-auth-inbound","open-id-jwt-inbound":"open-id-jwt-auth-inbound"}},bB=[{name:"Amberflo Metering / Billing",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/amberflo-metering-inbound/",id:"amberflo-metering-inbound",defaultHandler:{module:"$import(@zuplo/runtime)",export:"AmberfloMeteringInboundPolicy",options:{apiKey:"YOUR_API_KEY",customerIdPropertyPath:".data.accountNumber",meterApiName:"api-calls",meterValue:1,statusCodes:"200-299, 304"}},exampleHtml:'<div><p>Amberflo is a usage metering and billing service. This policy allows you to send metering calls for each API to their meter ingest endpoint.</p></div><h3>Options</h3><ul><li><code>apiKey</code> <div><p>The API key to use when sending metering calls to Amberflo</p></div></li><li><code>meterApiName</code> <div><p>The name of the meter to use when sending metering calls to Amberflo (overridable in code)</p></div></li><li><code>meterValue</code> <div><p>The value to use when sending metering calls to Amberflo (overridable in code)</p></div></li><li><code>customerIdPropertyPath</code> <div><p>The path to the property on <code>request.user</code>contains the customer ID. For example <code>.data.accountNumber</code> would read the <code>request.user.data.accountNumber</code> property.</p></div></li><li><code>customerId</code> <div><p>The default customerId for all metering calls - overridable in code and by <code>customerIdPropertyPath</code></p></div></li><li><code>dimensions</code> <div><p>A dictionary of dimensions to be sent to Amberflo (extensible in code)</p></div></li><li><code>statusCodes</code> <div><p>A list of successful status codes and ranges "200-299, 304" that should trigger a metering call to Amberflo - defaults to <code>result.ok</code> (200-299) if not set.</p></div></li><li><code>url</code> <div><p>Optional, the URL to send metering events to (defaults to <a href="https://app.amberflo.io/ingest">https://app.amberflo.io/ingest</a>). This is useful for testing purposes.</p></div></li></ul> ',icon:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMjZweCIgaGVpZ2h0PSIyNnB4IiB2aWV3Qm94PSIwIDAgMjYgMjYiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8dGl0bGU+YW1iZXJmbG9faWNvbjwvdGl0bGU+CiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyBpZD0iYW1iZXJmbG9faWNvbiI+CiAgICAgICAgICAgIDxwYXRoIGQ9Ik0xMyw4IEMxNy45NzA1NjI3LDggMjIsMTIuMDI5NDM3MyAyMiwxNyBDMjIsMjEuOTcwNTYyNyAxNy45NzA1NjI3LDI2IDEzLDI2IEM4LjAyOTQzNzI1LDI2IDQsMjEuOTcwNTYyNyA0LDE3IEM0LDEyLjAyOTQzNzMgOC4wMjk0MzcyNSw4IDEzLDggWiBNMTMsMTEuMTA5MDkwOSBDOS43NDY1NDA3NSwxMS4xMDkwOTA5IDcuMTA5MDkwOTEsMTMuNzQ2NTQwNyA3LjEwOTA5MDkxLDE3IEM3LjEwOTA5MDkxLDIwLjI1MzQ1OTMgOS43NDY1NDA3NSwyMi44OTA5MDkxIDEzLDIyLjg5MDkwOTEgQzE2LjI1MzQ1OTMsMjIuODkwOTA5MSAxOC44OTA5MDkxLDIwLjI1MzQ1OTMgMTguODkwOTA5MSwxNyBDMTguODkwOTA5MSwxMy43NDY1NDA3IDE2LjI1MzQ1OTMsMTEuMTA5MDkwOSAxMywxMS4xMDkwOTA5IFoiIGlkPSJDb21iaW5lZC1TaGFwZSIgZmlsbD0iY3VycmVudENvbG9yIj48L3BhdGg+CiAgICAgICAgICAgIDxwYXRoIGQ9Ik0xMi41LDAgQzE2LjQzNTU1ODcsMCAxOS43ODA2MzkyLDIuNTA3Mzg2NjIgMjAuOTk5ODAxMSw1Ljk5OTMyMjQ0IEwxNy41OTgwNTk4LDUuOTk4OTQ0NzUgQzE2LjU4MDE4MTYsNC4yNTQ1NzkyOSAxNC42NzgyNzA3LDMuMDgxMDU0MTIgMTIuNSwzLjA4MTA1NDEyIEMxMC4zMjE3MjkzLDMuMDgxMDU0MTIgOC40MTk4MTg0Myw0LjI1NDU3OTI5IDcuNDAxOTQwMTUsNS45OTg5NDQ3NSBMNC4wMDAxOTg5Myw1Ljk5OTMyMjQ0IEM1LjIxOTM2MDc5LDIuNTA3Mzg2NjIgOC41NjQ0NDEyOSwwIDEyLjUsMCBaIiBpZD0iQ29tYmluZWQtU2hhcGUiIGZpbGw9ImN1cnJlbnRDb2xvciI+PC9wYXRoPgogICAgICAgICAgICA8cmVjdCBpZD0iUmVjdGFuZ2xlIiB4PSIwIiB5PSIwIiB3aWR0aD0iMjYiIGhlaWdodD0iMjYiPjwvcmVjdD4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg=="},{name:"Legacy API Key Authentication (deprecated)",isPreview:!1,isPaidAddOn:!1,isDeprecated:!0,documentationUrl:"https://zuplo.com/docs/policies/api-key-auth-inbound/",id:"api-key-auth-inbound",defaultHandler:{export:"ApiAuthKeyInboundPolicy",module:"$import(@zuplo/runtime)",options:{allowUnauthenticatedRequests:!1}},exampleHtml:"<div><p>Deprecated - Please use the new 'API Key Authentication' policy instead. This policy will continue to work but will be removed in a future version of Zuplo.</p></div><h3>Options</h3><ul><li><code>allowUnauthenticatedRequests</code> <div><p>If 'true' allows the request to continue even if authenticated. When 'false' (the default) any unauthenticated request is automatically rejected with a 401</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGNsYXNzPSJoLTYgdy02IiBmaWxsPSJub25lIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjIiPjxwYXRoIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTcgMjFhNCA0IDAgMDEtNC00VjVhMiAyIDAgMDEyLTJoNGEyIDIgMCAwMTIgMnYxMmE0IDQgMCAwMS00IDR6bTAgMGgxMmEyIDIgMCAwMDItMnYtNGEyIDIgMCAwMC0yLTJoLTIuMzQzTTExIDcuMzQzbDEuNjU3LTEuNjU3YTIgMiAwIDAxMi44MjggMGwyLjgyOSAyLjgyOWEyIDIgMCAwMTAgMi44MjhsLTguNDg2IDguNDg1TTcgMTdoLjAxIiAvPjwvc3ZnPg=="},{name:"API Key Authentication",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/api-key-inbound/",id:"api-key-inbound",defaultHandler:{export:"ApiKeyInboundPolicy",module:"$import(@zuplo/runtime)",options:{allowUnauthenticatedRequests:!1}},exampleHtml:'<div><p>Authenticates requests based on API Keys using Zuplo API Management. You can learn more about the Zuplo API Key Service <a href="https://zuplo.com/docs/articles/api-key-api#buckets">here</a></p></div><h3>Options</h3><ul><li><code>authHeader</code> <div><p>The name of the header with the key. Defaults to <code>Authorization</code></p></div></li><li><code>authScheme</code> <div><p>The scheme used on the header. Defaults to <code>Bearer</code></p></div></li><li><code>bucketName</code> <div><p>Optional - The name of the API Key service bucket. Defaults to the autogenerated bucket name for your project. You can contact <code>support@zuplo.com</code> to create a new bucket.</p></div></li><li><code>allowUnauthenticatedRequests</code> <div><p>If requests should proceed even if the policy does not successfully authenticate the request. Defaults to false and rejects any request without a valid API key (returning a <code>401 - Unauthorized</code> response). Set to <code>true</code> to support multiple authentication methods or support both authenticated and anonymous requests.</p></div></li><li><code>cacheTtlSeconds</code> <div><p>The time to cache authentication results for a particular key. Higher values will decrease latency. Cached results will be valid until the cache expires even in the event the key is deleted, etc..</p></div></li><li><code>disableAutomaticallyAddingKeyHeaderToOpenApi</code> <div><p>Zuplo will automatically document your API key header within your OpenAPI specification &#x26; Developer Portal. Set this to <code>true</code> to disable this behavior.</p></div></li></ul> ',icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGNsYXNzPSJoLTYgdy02IiBmaWxsPSJub25lIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjIiPjxwYXRoIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTcgMjFhNCA0IDAgMDEtNC00VjVhMiAyIDAgMDEyLTJoNGEyIDIgMCAwMTIgMnYxMmE0IDQgMCAwMS00IDR6bTAgMGgxMmEyIDIgMCAwMDItMnYtNGEyIDIgMCAwMC0yLTJoLTIuMzQzTTExIDcuMzQzbDEuNjU3LTEuNjU3YTIgMiAwIDAxMi44MjggMGwyLjgyOSAyLjgyOWEyIDIgMCAwMTAgMi44MjhsLTguNDg2IDguNDg1TTcgMTdoLjAxIiAvPjwvc3ZnPg=="},{name:"Archive Request to Storage",isPreview:!0,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/archive-request-inbound/",id:"archive-request-inbound",defaultHandler:{export:"ArchiveRequestInbound",module:"$import(@zuplo/runtime)",options:{bucketName:"test-bucket-123.s3.amazonaws.com",path:"requests/",accessKeyId:"$env(AWS_ACCESS_KEY_ID)",accessKeySecret:"$env(AWS_ACCESS_KEY_SECRET)"}},exampleHtml:"<div><p>Archive incoming requests to S3 compatible storage. Works with any storage provider compatible with S3 APIs such as AWS S3, GCP Cloud Storage, and Azure Blob Storage.</p></div><h3>Options</h3><ul><li><code>bucketName</code> <div><p>The name of the storage bucket</p></div></li><li><code>path</code> <div><p>The path where requests are stored</p></div></li><li><code>accessKeyId</code> <div><p>The Access Key ID of the account authorized to write to the bucket</p></div></li><li><code>accessKeySecret</code> <div><p>The Access Key Secret of the account authorized to write to the bucket</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItdXBsb2FkLWNsb3VkIj48cG9seWxpbmUgcG9pbnRzPSIxNiAxNiAxMiAxMiA4IDE2Ij48L3BvbHlsaW5lPjxsaW5lIHgxPSIxMiIgeTE9IjEyIiB4Mj0iMTIiIHkyPSIyMSI+PC9saW5lPjxwYXRoIGQ9Ik0yMC4zOSAxOC4zOUE1IDUgMCAwIDAgMTggOWgtMS4yNkE4IDggMCAxIDAgMyAxNi4zIj48L3BhdGg+PHBvbHlsaW5lIHBvaW50cz0iMTYgMTYgMTIgMTIgOCAxNiI+PC9wb2x5bGluZT48L3N2Zz4="},{name:"Archive Response to Storage",isPreview:!0,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/archive-response-outbound/",id:"archive-response-outbound",defaultHandler:{export:"ArchiveResponseOutbound",module:"$import(@zuplo/runtime)",options:{bucketName:"test-bucket-123.s3.amazonaws.com",path:"responses/",accessKeyId:"$env(AWS_ACCESS_KEY_ID)",accessKeySecret:"$env(AWS_ACCESS_KEY_SECRET)"}},exampleHtml:"<div><p>Archive outgoing responses to S3 compatible storage. Works with any storage provider compatible with S3 APIs such as AWS S3, GCP Cloud Storage, and Azure Blob Storage.</p></div><h3>Options</h3><ul><li><code>bucketName</code> <div><p>The name of the storage bucket</p></div></li><li><code>path</code> <div><p>The path where requests are stored</p></div></li><li><code>accessKeyId</code> <div><p>The Access Key ID of the account authorized to write to the bucket</p></div></li><li><code>accessKeySecret</code> <div><p>The Access Key Secret of the account authorized to write to the bucket</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItdXBsb2FkLWNsb3VkIj48cG9seWxpbmUgcG9pbnRzPSIxNiAxNiAxMiAxMiA4IDE2Ij48L3BvbHlsaW5lPjxsaW5lIHgxPSIxMiIgeTE9IjEyIiB4Mj0iMTIiIHkyPSIyMSI+PC9saW5lPjxwYXRoIGQ9Ik0yMC4zOSAxOC4zOUE1IDUgMCAwIDAgMTggOWgtMS4yNkE4IDggMCAxIDAgMyAxNi4zIj48L3BhdGg+PHBvbHlsaW5lIHBvaW50cz0iMTYgMTYgMTIgMTIgOCAxNiI+PC9wb2x5bGluZT48L3N2Zz4="},{name:"Auth0 JWT Auth",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/auth0-jwt-auth-inbound/",id:"auth0-jwt-auth-inbound",defaultHandler:{export:"Auth0JwtInboundPolicy",module:"$import(@zuplo/runtime)",options:{allowUnauthenticatedRequests:!1,auth0Domain:"$env(AUTH0_DOMAIN)",audience:"$env(AUTH0_AUDIENCE)"}},exampleHtml:'<div><p>Authenticate users using Auth0 issued JWT tokens.</p></div><h3>Options</h3><ul><li><code>allowUnauthenticatedRequests</code> <div><p>Allow unauthenticated requests to proceed. This is use useful if you want to use multiple authentication policies or if you want to allow both authenticated and non-authenticated traffic.</p></div></li><li><code>auth0Domain</code> <div><p>Your Auth0 domain. For example, my-company.auth0.com</p></div></li><li><code>audience</code> <div><p>The Auth0 audience of your API, for example <a href="https://api.example.com/">https://api.example.com/</a></p></div></li></ul> ',icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyMiAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTcuMjM2IDE5LjQxNSAxNC44IDEybDYuMzc4LTQuNTgyaC03Ljg4M0wxMC44NiAwaDcuODg3bDIuNDQgNy40MThhMTAuNjY4IDEwLjY2OCAwIDAgMS0zLjk1IDExLjk5N1ptLTEyLjc1OCAwTDEwLjg1NiAyNGw2LjM4LTQuNTg1LTYuMzc3LTQuNTgyLTYuMzgxIDQuNTgyWm0tMy45NDQtMTJjLTEuNDkgNC41MzguMjQgOS4zNDQgMy45MzggMTIuMDAzdi0uMDAzTDYuOTEyIDEyIC41MzYgNy40MTVsNy44ODQuMDAzTDEwLjg1NiAwSDIuOTcxTC41MzQgNy40MTVaIiBmaWxsPSIjMDAwIi8+PC9zdmc+"},{name:"Basic Auth",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/basic-auth-inbound/",id:"basic-auth-inbound",defaultHandler:{export:"BasicAuthInboundPolicy",module:"$import(@zuplo/runtime)",options:{accounts:[{data:{number:1},password:"PASSWORD",username:"USERNAME"}],allowUnauthenticatedRequests:!1}},exampleHtml:"<div><p>Authenticate requests using basic auth (i.e. username and password)</p></div><h3>Options</h3><ul><li><code>accounts</code> <div><p>An array of account objects (username, password and data properties)</p></div></li><li><code>allowUnauthenticatedRequests</code> <div><p>If 'true' allows the request to continue even if authenticated. When 'false' (the default) any unauthenticated request is automatically rejected with a 401</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXIta2V5Ij48cGF0aCBkPSJNMjEgMmwtMiAybS03LjYxIDcuNjFhNS41IDUuNSAwIDEgMS03Ljc3OCA3Ljc3OCA1LjUgNS41IDAgMCAxIDcuNzc3LTcuNzc3em0wIDBMMTUuNSA3LjVtMCAwbDMgM0wyMiA3bC0zLTNtLTMuNSAzLjVMMTkgNCI+PC9wYXRoPjwvc3ZnPg=="},{name:"Bot Detection",isPreview:!0,isPaidAddOn:!0,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/bot-detection-inbound/",id:"bot-detection-inbound",defaultHandler:{export:"BotDetectionInbound",module:"$import(@zuplo/runtime)",options:{blockScoresBelow:40}},exampleHtml:"<div><p>Detect known and suspected bots based on sophisticated traffic analysis. The bot detection inbound policy provides a bot score for every request that can be used to determine the likelihood the request came from a bot. The policy can be configured to automatically block traffic with a set score or simply pass along the score for you to respond in other policies or handlers.</p></div><h3>Options</h3><ul><li><code>blockScoresBelow</code> <div><p>The threshold at which bots are automatically blocked</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItc3F1YXJlIj48cmVjdCB4PSIzIiB5PSIzIiB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHJ4PSIyIiByeT0iMiI+PC9yZWN0Pjwvc3ZnPg=="},{name:"Brown Out",isPreview:!0,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/brown-out-inbound/",id:"brown-out-inbound",defaultHandler:{export:"BrownOutInbound",module:"$import(@zuplo/runtime)",options:{cronExpression:"0 23 * * ?",durationSeconds:60}},exampleHtml:"<div><p>Set periods of downtime based on cron schedules. Useful for alerting users of impending deprecations.</p></div><h3>Options</h3><ul><li><code>cronExpression</code> <div><p>The cron schedule for when this policy is enabled.</p></div></li><li><code>durationSeconds</code> <div><p>The length of time in seconds that the policy stays enabled after the scheduled time starts.</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGNsYXNzPSJoLTYgdy02IiBmaWxsPSJub25lIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjIiPgogIDxwYXRoIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTEwIDl2Nm00LTZ2Nm03LTNhOSA5IDAgMTEtMTggMCA5IDkgMCAwMTE4IDB6IiAvPgo8L3N2Zz4="},{name:"Caching",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/caching-inbound/",id:"caching-inbound",defaultHandler:{export:"CachingInboundPolicy",module:"$import(@zuplo/runtime)",options:{expirationSecondsTtl:60,dangerouslyIgnoreAuthorizationHeader:!1,headers:["header_used_as_part_of_cache_key"]}},exampleHtml:"<div><p>Respond to matched incoming requests with cached content</p></div><h3>Options</h3><ul><li><code>cacheId</code> <div><p>Optional, specifies an id or 'key' for this policy to store cache. This is useful for cache-busting. For example, set this property to an env var and if you change that env var value, you invalidate the cache.</p></div></li><li><code>dangerouslyIgnoreAuthorizationHeader</code> <div><p>By default, the Authorization header is always considered in the caching policy. You can disable by setting this to true</p></div></li><li><code>headers</code> <div><p>The headers to be considered when caching</p></div></li><li><code>expirationSecondsTtl</code> <div><p>The timeout of the cache in seconds</p></div></li><li><code>statusCodes</code> <div><p>Response status codes to be cached - defaults to 200, 206, 301, 302, 303, 404, 410 if none specified</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItd2luZCI+PHBhdGggZD0iTTkuNTkgNC41OUEyIDIgMCAxIDEgMTEgOEgybTEwLjU5IDExLjQxQTIgMiAwIDEgMCAxNCAxNkgybTE1LjczLTguMjdBMi41IDIuNSAwIDEgMSAxOS41IDEySDIiPjwvcGF0aD48L3N2Zz4="},{name:"Change Method",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/change-method-inbound/",id:"change-method-inbound",defaultHandler:{export:"ChangeMethodInboundPolicy",module:"$import(@zuplo/runtime)",options:{method:"POST"}},exampleHtml:"<div><p>Changes the HTTP method of the incoming request.</p></div><h3>Options</h3><ul><li><code>method</code> <div><p>The HTTP Method to be used, e.g. POST, GET, PUT, PATCH, etc</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItZWRpdC0zIj48cGF0aCBkPSJNMTIgMjBoOSI+PC9wYXRoPjxwYXRoIGQ9Ik0xNi41IDMuNWEyLjEyMSAyLjEyMSAwIDAgMSAzIDNMNyAxOWwtNCAxIDEtNEwxNi41IDMuNXoiPjwvcGF0aD48L3N2Zz4="},{name:"Clear Request Headers",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/clear-headers-inbound/",id:"clear-headers-inbound",defaultHandler:{export:"ClearHeadersInboundPolicy",module:"$import(@zuplo/runtime)",options:{exclude:["HEADER_TO_LEAVE"]}},exampleHtml:"<div><p>Removes all headers from the incoming request except for those in the exclude list.</p></div><h3>Options</h3><ul><li><code>exclude</code> <div><p>The headers that should not be removed</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItYWxpZ24tcmlnaHQiPjxsaW5lIHgxPSIyMSIgeTE9IjEwIiB4Mj0iNyIgeTI9IjEwIj48L2xpbmU+PGxpbmUgeDE9IjIxIiB5MT0iNiIgeDI9IjMiIHkyPSI2Ij48L2xpbmU+PGxpbmUgeDE9IjIxIiB5MT0iMTQiIHgyPSIzIiB5Mj0iMTQiPjwvbGluZT48bGluZSB4MT0iMjEiIHkxPSIxOCIgeDI9IjciIHkyPSIxOCI+PC9saW5lPjwvc3ZnPg=="},{name:"Clear Response Headers",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/clear-headers-outbound/",id:"clear-headers-outbound",defaultHandler:{export:"ClearHeadersOutboundPolicy",module:"$import(@zuplo/runtime)",options:{exclude:["HEADER_TO_LEAVE"]}},exampleHtml:"<div><p>Removes all headers from the response except for those in the exclude list.</p></div><h3>Options</h3><ul><li><code>exclude</code> <div><p>The headers that should not be removed</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItYWxpZ24tcmlnaHQiPjxsaW5lIHgxPSIyMSIgeTE9IjEwIiB4Mj0iNyIgeTI9IjEwIj48L2xpbmU+PGxpbmUgeDE9IjIxIiB5MT0iNiIgeDI9IjMiIHkyPSI2Ij48L2xpbmU+PGxpbmUgeDE9IjIxIiB5MT0iMTQiIHgyPSIzIiB5Mj0iMTQiPjwvbGluZT48bGluZSB4MT0iMjEiIHkxPSIxOCIgeDI9IjciIHkyPSIxOCI+PC9saW5lPjwvc3ZnPg=="},{name:"AWS Cognito JWT Auth",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/cognito-jwt-auth-inbound/",id:"cognito-jwt-auth-inbound",defaultHandler:{export:"CognitoJwtInboundPolicy",module:"$import(@zuplo/runtime)",options:{allowUnauthenticatedRequests:!1,region:"$env(AWS_REGION)",userPoolId:"$env(AWS_COGNITO_USER_POOL_ID)"}},exampleHtml:"<div><p>Authenticate requests with JWT tokens issued by AWS Cognito.</p></div><h3>Options</h3><ul><li><code>allowUnauthenticatedRequests</code> <div><p>Allow unauthenticated requests to proceed. This is use useful if you want to use multiple authentication policies or if you want to allow both authenticated and non-authenticated traffic.</p></div></li><li><code>region</code> <div><p>The AWS region where your Cognito instance is deployed</p></div></li><li><code>userPoolId</code> <div><p>The user pool identifier</p></div></li></ul> ",icon:"data:image/svg+xml;base64,Cjxzdmcgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0xOC40ODE4IDQuNjYwNDJMMjAuNTUwMyA0LjEyNzc2TDIwLjU2NTggNC4xNTA0OEwyMC42MTggMTYuNjQwN0wyMC41NTAzIDE2LjcwODZMMjAuMTI0MSAxNi43MjY4TDE4LjUwNiAxNi40NzQ5TDE4LjQ4MTggMTYuNDExMlY0LjY2MDQyTTYuNTE4MTMgMTcuNTc2M0w2LjUyNTc1IDE3LjU3NjhMMTEuOTg2MSAxOS4xNjM1TDEyIDE5LjE3NDJMMTIuMDIzOCAxOS4xOTMxTDEyLjAxNjEgMjMuOTQ3NUwxMiAyMy45Njc3TDYuNTE4MTMgMjEuMzA0NlYxNy41NzYzIiBmaWxsPSIjM0EzQTNBIi8+CjxwYXRoIGQ9Ik0xOC40ODE4IDE2LjQxMTJMMTIuMDA5IDE3Ljk2MTNMOC43NTkxMiAxNy4xNzY5TDYuNTE4MTMgMTcuNTc2M0wxMiAxOS4xNzQyTDIwLjQ2MDYgMTYuODgzNkwyMC41NTAzIDE2LjcwODZMMTguNDgxOCAxNi40MTEyIiBmaWxsPSIjNjY2NjY2Ii8+CjxwYXRoIGQ9Ik0xNy40ODE5IDYuMzkxMzhMMTcuNDI5MSA2LjMzMTI2TDEyLjA1ODkgNC43NzA4NkwxMiA0Ljc5MzU4TDExLjk0NjEgNC43NjYwNUwzLjQ5NTgyIDcuMjAyNzNMMy40NDk2NiA3LjI1OTE2TDMuNTE3NDkgNy4yOTYzMkw1LjQ0OTkzIDcuNTc5NjdMNS41MTgyNCA3LjU1NjQ3TDExLjk5MSA2LjAwNjQyTDE1LjI0MDkgNi43OTA4OEwxNy40ODE5IDYuMzkxMzgiIGZpbGw9IiM0MzQzNDMiLz4KPHBhdGggZD0iTTUuNTE4MjQgMTkuMzA3M0wzLjQ0OTY2IDE5LjgwNjdMMy40NDYwNSAxOS43OTQ3TDMuMzY0NTggNy4zNTExNEwzLjQ0OTY2IDcuMjU5MTZMNS41MTgyNCA3LjU1NjQ3VjE5LjMwNzMiIGZpbGw9ImJsYWNrIi8+CjxwYXRoIGQ9Ik04LjMxMDkxIDE0LjQ4MDVMMTIgMTQuOTEzMkwxMi4wMjc3IDE0Ljg3MTlMMTIuMDQyNyA5LjEwMTdMMTIgOS4wNTQ0Mkw4LjMxMDkxIDkuNDg3MjJWMTQuNDgwNSIgZmlsbD0iIzNBM0EzQSIvPgo8cGF0aCBkPSJNMTUuNjg5MSAxNC40ODA1TDEyIDE0LjkxMzJWOS4wNTQ0MkwxNS42ODkxIDkuNDg3MjJWMTQuNDgwNU0xNy40ODE5IDYuMzkxMzhMMTIgNC43OTM1OFYwTDE3LjQ4MTkgMi42NjMwNFY2LjM5MTM4IiBmaWxsPSJibGFjayIvPgo8cGF0aCBkPSJNMTIgMEwxLjcyNTc1IDQuOTU5OTdWMTkuMDA3N0wzLjQ0OTY2IDE5LjgwNjdWNy4yNTkxNkwxMiA0Ljc5MzU4VjBaIiBmaWxsPSIjM0EzQTNBIi8+CjxwYXRoIGQ9Ik0yMC41NTAzIDQuMTI3NzZWMTYuNzA4NkwxMiAxOS4xNzQyVjIzLjk2NzdMMjIuMjc0MiAxOS4wMDc3VjQuOTU5OTdMMjAuNTUwMyA0LjEyNzc2WiIgZmlsbD0iYmxhY2siLz4KPC9zdmc+"},{name:"Composite Inbound (Group Policies)",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/composite-inbound/",id:"composite-inbound",defaultHandler:{export:"CompositeInboundPolicy",module:"$import(@zuplo/runtime)",options:{policies:["POLICY_1","POLICY_2"]}},exampleHtml:"<div><p>Creates a composite, or group policy - composed of other policies. For reuse across routes.</p></div><h3>Options</h3><ul><li><code>policies</code> <div><p>The list of policy references (beware circular references)</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyNCAyNCIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZT0iY3VycmVudENvbG9yIiBjbGFzcz0idy02IGgtNiI+CiAgPHBhdGggc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBkPSJNMi4yNSA3LjEyNUMyLjI1IDYuNTA0IDIuNzU0IDYgMy4zNzUgNmg2Yy42MjEgMCAxLjEyNS41MDQgMS4xMjUgMS4xMjV2My43NWMwIC42MjEtLjUwNCAxLjEyNS0xLjEyNSAxLjEyNWgtNmExLjEyNSAxLjEyNSAwIDAxLTEuMTI1LTEuMTI1di0zLjc1ek0xNC4yNSA4LjYyNWMwLS42MjEuNTA0LTEuMTI1IDEuMTI1LTEuMTI1aDUuMjVjLjYyMSAwIDEuMTI1LjUwNCAxLjEyNSAxLjEyNXY4LjI1YzAgLjYyMS0uNTA0IDEuMTI1LTEuMTI1IDEuMTI1aC01LjI1YTEuMTI1IDEuMTI1IDAgMDEtMS4xMjUtMS4xMjV2LTguMjV6TTMuNzUgMTYuMTI1YzAtLjYyMS41MDQtMS4xMjUgMS4xMjUtMS4xMjVoNS4yNWMuNjIxIDAgMS4xMjUuNTA0IDEuMTI1IDEuMTI1djIuMjVjMCAuNjIxLS41MDQgMS4xMjUtMS4xMjUgMS4xMjVoLTUuMjVhMS4xMjUgMS4xMjUgMCAwMS0xLjEyNS0xLjEyNXYtMi4yNXoiIC8+Cjwvc3ZnPgo="},{name:"Custom Code Inbound",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/custom-code-inbound/",id:"custom-code-inbound",defaultHandler:{export:"default",module:"$import(./modules/YOUR_MODULE)",options:{config1:"YOUR_VALUE",config2:!0}},exampleHtml:"<div><p>Enables a custom code policy written in TypeScript. Change YOUR_MODULE to the name of your module (without .ts extension)</p></div><h3>Options</h3><ul><li><code>*</code> <div><p>Any object your custom policy consumes</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItY29kZSI+PHBvbHlsaW5lIHBvaW50cz0iMTYgMTggMjIgMTIgMTYgNiI+PC9wb2x5bGluZT48cG9seWxpbmUgcG9pbnRzPSI4IDYgMiAxMiA4IDE4Ij48L3BvbHlsaW5lPjwvc3ZnPg=="},{name:"Custom Code Outbound",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/custom-code-outbound/",id:"custom-code-outbound",defaultHandler:{export:"default",module:"$import(./modules/YOUR_MODULE)",options:{config1:"YOUR_VALUE",config2:!0}},exampleHtml:"<div><p>A custom outbound response policy.</p></div><h3>Options</h3><ul></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItY29kZSI+PHBvbHlsaW5lIHBvaW50cz0iMTYgMTggMjIgMTIgMTYgNiI+PC9wb2x5bGluZT48cG9seWxpbmUgcG9pbnRzPSI4IDYgMiAxMiA4IDE4Ij48L3BvbHlsaW5lPjwvc3ZnPg=="},{name:"Firebase JWT Auth",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/firebase-jwt-inbound/",id:"firebase-jwt-inbound",defaultHandler:{export:"FirebaseJwtInboundPolicy",module:"$import(@zuplo/runtime)",options:{projectId:"YOUR_PROJECT_ID",allowUnauthenticatedRequests:!1}},exampleHtml:"<div><p>Authenticate users using Firebase issued JWT tokens.</p></div><h3>Options</h3><ul><li><code>allowUnauthenticatedRequests</code> <div><p>Allow unauthenticated requests to proceed. This is use useful if you want to use multiple authentication policies or if you want to allow both authenticated and non-authenticated traffic.</p></div></li><li><code>projectId</code> <div><p>Your Firebase Project ID</p></div></li><li><code>certUrl</code> <div><p>Optional - override the URL hosting the public keys used to verify the JWT.</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMjA0cHgiIGhlaWdodD0iMjA0cHgiIHZpZXdCb3g9IjAgMCAyMDQgMjA0IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPgogICAgPHRpdGxlPmZpcmViYXNlX2ljb248L3RpdGxlPgogICAgPGcgaWQ9IlBhZ2UtMSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgaWQ9ImZpcmViYXNlX2ljb24iPgogICAgICAgICAgICA8cmVjdCBpZD0iUmVjdGFuZ2xlIiB4PSIwIiB5PSIwIiB3aWR0aD0iMjA0IiBoZWlnaHQ9IjIwNCI+PC9yZWN0PgogICAgICAgICAgICA8cGF0aCBkPSJNNDIuMiwxMjguOSBMNTkuNiwxNy40IEM2MC4yLDEzLjYgNjUuMywxMi43IDY3LjEsMTYuMSBMODUuOCw1MS4xIEw0Mi4yLDEyOC45IFogTTE2NS45LDE1NiBMMTQ5LjMsNTMuMyBDMTQ4LjgsNTAuMSAxNDQuOCw0OC44IDE0Mi41LDUxLjEgTDM3LjksMTU2IEw5NS44LDE4OC41IEM5OS40LDE5MC41IDEwMy45LDE5MC41IDEwNy41LDE4OC41IEwxNjUuOSwxNTYgWiBNMTE4LjksNjYuNCBMMTA1LjUsNDAuOSBDMTA0LDM4IDk5LjksMzggOTguNCw0MC45IEwzOS41LDE0NS45IEwxMTguOSw2Ni40IFoiIGlkPSJpY29uXzFfIiBmaWxsPSIjMDAwMDAwIiBmaWxsLXJ1bGU9Im5vbnplcm8iPjwvcGF0aD4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg=="},{name:"Form Data to JSON",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/formdata-to-json-inbound/",id:"formdata-to-json-inbound",defaultHandler:{export:"FormDataToJsonInboundPolicy",module:"$import(@zuplo/runtime)",options:{badRequestIfNotFormData:!1,optionalHoneypotName:"HONEYPOT_FIELD_NAME"}},exampleHtml:"<div><p>Converts form data in the incoming request to JSON.</p></div><h3>Options</h3><ul><li><code>badRequestIfNotFormData</code> <div><p>Should the policy return an error if the request is not of the type form data</p></div></li><li><code>optionalHoneypotName</code> <div><p>The name of the honeypot field. Used to provide basic spam filtering.</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItZmlsZS10ZXh0Ij48cGF0aCBkPSJNMTQgMkg2YTIgMiAwIDAgMC0yIDJ2MTZhMiAyIDAgMCAwIDIgMmgxMmEyIDIgMCAwIDAgMi0yVjh6Ij48L3BhdGg+PHBvbHlsaW5lIHBvaW50cz0iMTQgMiAxNCA4IDIwIDgiPjwvcG9seWxpbmU+PGxpbmUgeDE9IjE2IiB5MT0iMTMiIHgyPSI4IiB5Mj0iMTMiPjwvbGluZT48bGluZSB4MT0iMTYiIHkxPSIxNyIgeDI9IjgiIHkyPSIxNyI+PC9saW5lPjxwb2x5bGluZSBwb2ludHM9IjEwIDkgOSA5IDggOSI+PC9wb2x5bGluZT48L3N2Zz4="},{name:"Geo-location filtering",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/geo-filter-inbound/",id:"geo-filter-inbound",defaultHandler:{export:"GeoFilterInboundPolicy",module:"$import(@zuplo/runtime)",options:{allow:{countries:"US, CA"},block:{asns:"$env(ASNS_TO_BLOCK)",regionCodes:"TX, WA"},ignoreUnknown:!0}},exampleHtml:'<div><p>Block requests based on geo-location parameters: country, region code, and ASN</p></div><h3>Options</h3><ul><li><code>block</code> <div></div><ul><li><code>countries</code> <div><p>comma separated string of country codes to block (e.g. "US, CA")</p></div></li><li><code>regionCodes</code> <div><p>comma separated string of region codes to block (e.g. "TX, WA")</p></div></li><li><code>asns</code> <div><p>comma separated string of ASNs to block (e.g. "395747, 28304")</p></div></li></ul></li><li><code>allow</code> <div></div></li><li><code>ignoreUnknown</code> <div><p>Optional, defaults to true. Specifies whether unknown geo-location parameters should be ignored (allowed through).</p></div></li></ul> ',icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItZ2xvYmUiPjxjaXJjbGUgY3g9IjEyIiBjeT0iMTIiIHI9IjEwIj48L2NpcmNsZT48bGluZSB4MT0iMiIgeTE9IjEyIiB4Mj0iMjIiIHkyPSIxMiI+PC9saW5lPjxwYXRoIGQ9Ik0xMiAyYTE1LjMgMTUuMyAwIDAgMSA0IDEwIDE1LjMgMTUuMyAwIDAgMS00IDEwIDE1LjMgMTUuMyAwIDAgMS00LTEwIDE1LjMgMTUuMyAwIDAgMSA0LTEweiI+PC9wYXRoPjwvc3ZnPg=="},{name:"HMAC Auth",isPreview:!0,isPaidAddOn:!0,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/hmac-auth-inbound/",id:"hmac-auth-inbound",defaultHandler:{export:"HMACAuthInbound",module:"$import(@zuplo/runtime)",options:{}},exampleHtml:"<div><p>Authenticate requests using the HMAC-SHA256 authentication scheme.</p></div><h3>Options</h3><ul></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItaGFzaCI+PGxpbmUgeDE9IjQiIHkxPSI5IiB4Mj0iMjAiIHkyPSI5Ij48L2xpbmU+PGxpbmUgeDE9IjQiIHkxPSIxNSIgeDI9IjIwIiB5Mj0iMTUiPjwvbGluZT48bGluZSB4MT0iMTAiIHkxPSIzIiB4Mj0iOCIgeTI9IjIxIj48L2xpbmU+PGxpbmUgeDE9IjE2IiB5MT0iMyIgeDI9IjE0IiB5Mj0iMjEiPjwvbGluZT48L3N2Zz4="},{name:"IP Restriction",isPreview:!0,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/ip-restriction-inbound/",id:"ip-restriction-inbound",defaultHandler:{export:"IPRestrictionInbound",module:"$import(@zuplo/runtime)",options:{ipAddresses:["1.1.1.1"]}},exampleHtml:"<div><p>Block requests based on their IP address.</p></div><h3>Options</h3><ul><li><code>ipAddresses</code> <div><p>The IP addresses or CIDR ranges to block</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItbGlzdCI+PGxpbmUgeDE9IjgiIHkxPSI2IiB4Mj0iMjEiIHkyPSI2Ij48L2xpbmU+PGxpbmUgeDE9IjgiIHkxPSIxMiIgeDI9IjIxIiB5Mj0iMTIiPjwvbGluZT48bGluZSB4MT0iOCIgeTE9IjE4IiB4Mj0iMjEiIHkyPSIxOCI+PC9saW5lPjxsaW5lIHgxPSIzIiB5MT0iNiIgeDI9IjMuMDEiIHkyPSI2Ij48L2xpbmU+PGxpbmUgeDE9IjMiIHkxPSIxMiIgeDI9IjMuMDEiIHkyPSIxMiI+PC9saW5lPjxsaW5lIHgxPSIzIiB5MT0iMTgiIHgyPSIzLjAxIiB5Mj0iMTgiPjwvbGluZT48L3N2Zz4="},{name:"LDAP Auth",isPreview:!0,isPaidAddOn:!0,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/ldap-auth-inbound/",id:"ldap-auth-inbound",defaultHandler:{export:"LDAPAuthInbound",module:"$import(@zuplo/runtime)",options:{ldapConnectorName:"my-ldap-connector"}},exampleHtml:"<div><p>Authenticate requests using an LDAP server</p></div><h3>Options</h3><ul><li><code>ldapConnectorName</code> <div><p>The name of your configured LDAP service connector</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItZGF0YWJhc2UiPjxlbGxpcHNlIGN4PSIxMiIgY3k9IjUiIHJ4PSI5IiByeT0iMyI+PC9lbGxpcHNlPjxwYXRoIGQ9Ik0yMSAxMmMwIDEuNjYtNCAzLTkgM3MtOS0xLjM0LTktMyI+PC9wYXRoPjxwYXRoIGQ9Ik0zIDV2MTRjMCAxLjY2IDQgMyA5IDNzOS0xLjM0IDktM1Y1Ij48L3BhdGg+PC9zdmc+"},{name:"Mock API Response",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/mock-api-inbound/",id:"mock-api-inbound",defaultHandler:{export:"MockApiInboundPolicy",module:"$import(@zuplo/runtime)",options:{}},exampleHtml:'<div><p>Returns example responses from the OpenAPI document associated with this route.</p></div><h3>Options</h3><ul><li><code>random</code> <div><p>Optional. Indicates whether the response should be selected randomly, from the available examples (that match any filter criteria). If <code>false</code> the first matching example is used.</p></div></li><li><code>responsePrefixFilter</code> <div><p>Optional. Specifies a prefix to match the responses to select from. Typically this is a status code like "200" or "2XX". If you want the policy to select randomly from all 2XX codes, set this property to "2" and random to <code>true</code>.</p></div></li><li><code>contentType</code> <div><p>Optional. Specify the content-type of the response to select from. If not specified, the first matching response is used (or random).</p></div></li><li><code>exampleName</code> <div><p>Optional. Specify the name of the example to select. If not specified, the first matching response is used (or random).</p></div></li></ul> ',icon:"data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ic3ZnLWljb24iIHN0eWxlPSJ3aWR0aDogMWVtOyBoZWlnaHQ6IDFlbTt2ZXJ0aWNhbC1hbGlnbjogbWlkZGxlO2ZpbGw6IGN1cnJlbnRDb2xvcjtvdmVyZmxvdzogaGlkZGVuOyIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik04OTQuOCAyNTkuOGMwIDguNi0yLjkgMTUuNy04LjYgMjEuNEwyNzQuNyA4OTIuNmMtNS43IDUuNy0xMi44IDguNi0yMS40IDguNnMtMTUuNy0yLjktMjEuNC04LjZsLTk0LjEtOTQuMWMtNS43LTUuNy04LjYtMTIuOC04LjYtMjEuNHMyLjktMTUuNyA4LjYtMjEuNGw2MTEuNS02MTEuNWM1LjctNS43IDEyLjgtOC42IDIxLjQtOC42IDguNiAwIDE1LjcgMi45IDIxLjQgOC42bDk0LjEgOTQuMWM1LjcgNS44IDguNiAxMi45IDguNiAyMS41eiBtLTY0Mi40LTkwLjRsNDYuNiAxNC4zLTQ2LjYgMTQuMy0xNC4zIDQ2LjYtMTQuMy00Ni42LTQ2LjYtMTQuMyA0Ni42LTE0LjMgMTQuMy00Ni42IDE0LjMgNDYuNnogbTE2Ni40IDc3bDkzLjIgMjguNS05My4yIDI4LjUtMjguNSA5My4yLTI4LjUtOTMuMi05My4yLTI4LjUgOTMuMi0yOC41IDI4LjUtOTMuMiAyOC41IDkzLjJ6IG0xMzcuOS03N2w0Ni42IDE0LjMtNDYuNiAxNC4zLTE0LjMgNDYuNi0xNC4zLTQ2LjYtNDYuNi0xNC4zIDQ2LjYtMTQuMyAxNC4zLTQ2LjYgMTQuMyA0Ni42eiBtMTI1LjUgMjI5LjdsMTM5LjMtMTM5LjMtNTAuOS01MC45LTEzOS4zIDEzOS4zIDUwLjkgNTAuOXpNODYxIDQ3My43bDQ2LjYgMTQuMy00Ni42IDE0LjItMTQuMyA0Ni42LTE0LjMtNDYuNi00Ni42LTE0LjMgNDYuNi0xNC4zIDE0LjMtNDYuNiAxNC4zIDQ2Ljd6IiAgLz48L3N2Zz4="},{name:"mTLS Auth",isPreview:!1,isPaidAddOn:!0,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/mtls-auth-inbound/",id:"mtls-auth-inbound",defaultHandler:{export:"MTLSAuthInbound",module:"$import(@zuplo/runtime)",options:{}},exampleHtml:"<div><p>Authenticate requests based on the mTLS protocol</p></div><h3>Options</h3><ul></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGNsYXNzPSJoLTYgdy02IiBmaWxsPSJub25lIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjIiPjxwYXRoIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTggN2gxMm0wIDBsLTQtNG00IDRsLTQgNG0wIDZING0wIDBsNCA0bS00LTRsNC00IiAvPjwvc3ZnPg=="},{name:"Okta JWT Auth",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/okta-jwt-auth-inbound/",id:"okta-jwt-auth-inbound",defaultHandler:{export:"OktaJwtInboundPolicy",module:"$import(@zuplo/runtime)",options:{allowUnauthenticatedRequests:!1,issuerUrl:"$env(OKTA_ISSUER_URL)",audience:"$env(OKTA_AUDIENCE)"}},exampleHtml:`<div><p>Authenticate users using Okta issued JWT tokens.</p></div><h3>Options</h3><ul><li><code>allowUnauthenticatedRequests</code> <div><p>Allow unauthenticated requests to proceed. This is use useful if you want to use multiple authentication policies or if you want to allow both authenticated and non-authenticated traffic.</p></div></li><li><code>issuerUrl</code> <div><p>Your Okta authorization server's issuer URL. For example, <a href="https://dev-12345.okta.com/oauth2/abc">https://dev-12345.okta.com/oauth2/abc</a></p></div></li><li><code>audience</code> <div><p>The Okta audience of your API, for example api://my-api</p></div></li></ul> `,icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2NCIgaGVpZ2h0PSI2NCI+PHBhdGggZD0iTTMyIDBDMTQuMzcgMCAwIDE0LjI2NyAwIDMyczE0LjI2OCAzMiAzMiAzMiAzMi0xNC4yNjggMzItMzJTNDkuNjMgMCAzMiAwem0wIDQ4Yy04Ljg2NiAwLTE2LTcuMTM0LTE2LTE2czcuMTM0LTE2IDE2LTE2IDE2IDcuMTM0IDE2IDE2LTcuMTM0IDE2LTE2IDE2eiIgZmlsbD0iIzAwMDAwMCIvPjwvc3ZnPg=="},{name:"JWT Auth",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/open-id-jwt-auth-inbound/",id:"open-id-jwt-auth-inbound",defaultHandler:{export:"OpenIdJwtInboundPolicy",module:"$import(@zuplo/runtime)",options:{allowUnauthenticatedRequests:!1,audience:"$env(AUTH_AUDIENCE)",issuer:"$env(AUTH_ISSUER)",jwkUrl:"$env(JWK_URL)"}},exampleHtml:"<div><p>The Open ID JWT Authentication policy allows you to authenticate incoming requests using an Open ID compliant bearer token.</p></div><h3>Options</h3><ul><li><code>issuer</code> <div><p>The expected issuer claim in the JWT token.</p></div></li><li><code>audience</code> <div><p>The expected audience claim in the JWT token (optional).</p></div></li><li><code>jwkUrl</code> <div><p>the url of the JSON Web Key Set (JWKS) - this is used to validate the JWT token signature (either this or <code>secret</code> must be set).</p></div></li><li><code>secret</code> <div><p>The key used to verify the signature of the JWT token (either this or <code>jwkUrl</code> must be set)</p></div></li><li><code>allowUnauthenticatedRequests</code> <div><p>indicates whether the request should continue if authentication fails. Defaults is <code>false</code> which means unauthenticated users will automatically receive a 401 response.</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGNsYXNzPSJoLTYgdy02IiBmaWxsPSJub25lIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjIiPjxwYXRoIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTEyIDE1djJtLTYgNGgxMmEyIDIgMCAwMDItMnYtNmEyIDIgMCAwMC0yLTJINmEyIDIgMCAwMC0yIDJ2NmEyIDIgMCAwMDIgMnptMTAtMTBWN2E0IDQgMCAwMC04IDB2NGg4eiIgLz48L3N2Zz4="},{name:"PropelAuth JWT Auth",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/propel-auth-jwt-inbound/",id:"propel-auth-jwt-inbound",defaultHandler:{export:"PropelAuthJwtInboundPolicy",module:"$import(@zuplo/runtime)",options:{allowUnauthenticatedRequests:!1,authUrl:"$env(PROPEL_AUTH_URL)",verifierKey:"$env(PROPEL_VERIFIER_KEY)"}},exampleHtml:`<div><p>Authenticate users using PropelAuth issued JWT tokens.</p></div><h3>Options</h3><ul><li><code>allowUnauthenticatedRequests</code> <div><p>Allow unauthenticated requests to proceed. This is use useful if you want to use multiple authentication policies or if you want to allow both authenticated and non-authenticated traffic.</p></div></li><li><code>authUrl</code> <div><p>Your PropelAuth authUrl. For example, <a href="https://6587563.propelauthtest.com">https://6587563.propelauthtest.com</a></p></div></li><li><code>verifierKey</code> <div><p>Your public (verifier) key that is used to verify access tokens. This key has a value that begins with '-----BEGIN PUBLIC KEY-----'. Make sure to remove all line breaks from the key before saving the variable.</p></div></li></ul> `,icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2NCIgaGVpZ2h0PSI2NCIgdmlld0JveD0iMCAwIDQwIDQwIiBmaWxsPSJub25lIj4KICA8cGF0aAogICAgZD0iTTM3LjU0NzggMTYuMjkxNEMzNy4wODc3IDE0LjA0NjUgMzYuMjE3NCAxMS45NDQxIDM0Ljk1NTEgMTAuMDMyMUwzNi4xODg1IDguMDExNEwzMS44MzY3IDMuNjU5NkwyOS44MTYgNC44OTI5NkMyNy45MDMzIDMuNjMwNjggMjUuODAxNiAyLjc2MDQ1IDIzLjU1NjcgMi4zMDAyNkwyMy4wMDA3IDBIMTYuODQ3NEwxNi4yOTE0IDIuMzAwMjZDMTQuMDQ2NSAyLjc2MDQ1IDExLjk0NDEgMy42MzA2OCAxMC4wMzIxIDQuODkyOTZMOC4wMTE0IDMuNjU5NkwzLjY1OTYgOC4wMTE0TDQuODkyOTYgMTAuMDMyMUMzLjYzMDY4IDExLjk0NDggMi43NjA0NSAxNC4wNDY1IDIuMzAwMjYgMTYuMjkxNEwwIDE2Ljg0NzRWMjMuMDAwN0wyLjMwMDI2IDIzLjU1NjdDMi43NjA0NSAyNS44MDE2IDMuNjMwNjggMjcuOTA0IDQuODkyOTYgMjkuODE2TDMuNjU5NiAzMS44MzY3TDguMDExNCAzNi4xODg1TDEwLjAzMjEgMzQuOTU1MUMxMS45NDQ4IDM2LjIxNzQgMTQuMDQ2NSAzNy4wODc3IDE2LjI5MTQgMzcuNTQ3OEwxNi44NDc0IDM5Ljg0ODFIMjMuMDAwN0wyMy41NTY3IDM3LjU0NzhDMjUuODAxNiAzNy4wODc3IDI3LjkwNCAzNi4yMTc0IDI5LjgxNiAzNC45NTUxTDMxLjgzNjcgMzYuMTg4NUwzNi4xODg1IDMxLjgzNjdMMzQuOTU1MSAyOS44MTZDMzYuMjE3NCAyNy45MDMzIDM3LjA4NzcgMjUuODAxNiAzNy41NDc4IDIzLjU1NjdMMzkuODQ4MSAyMy4wMDA3VjE2Ljg0NzRMMzcuNTQ3OCAxNi4yOTE0Wk0zOC41NjI3IDIxLjk4OTFMMzYuNDM2NiAyMi41MDMzTDM2LjM2MiAyMi45MTU5QzM1LjkzNTkgMjUuMjcyMSAzNS4wMjc4IDI3LjQ2NDMgMzMuNjYyNiAyOS40MzM2TDMzLjQyNDggMjkuNzc2OEwzNC41NjM3IDMxLjY0MzlMMzEuNjQzMyAzNC41NjQ0TDI5Ljc3NjIgMzMuNDI1NUwyOS40MzMgMzMuNjYzM0MyNy40NjQzIDM1LjAyODQgMjUuMjcxNCAzNS45MzY2IDIyLjkxNTIgMzYuMzYyN0wyMi41MDI2IDM2LjQzNzJMMjEuOTg5MSAzOC41NjI3SDE3Ljg1OUwxNy4zNDQ5IDM2LjQzNjZMMTYuOTMyMiAzNi4zNjJDMTQuNTc2MSAzNS45MzU5IDEyLjM4MzggMzUuMDI3OCAxMC40MTQ1IDMzLjY2MjZMMTAuMDcxMyAzMy40MjQ4TDguMjA0MjEgMzQuNTYzN0w1LjI4MzczIDMxLjY0MzNMNi40MjI2MSAyOS43NzYyTDYuMTg0ODEgMjkuNDMzQzQuODE5NjkgMjcuNDY0MyAzLjkxMTU0IDI1LjI3MTQgMy40ODU0MiAyMi45MTUyTDMuNDEwODcgMjIuNTAyNkwxLjI4NTQyIDIxLjk4OTFWMTcuODU5TDMuNDExNTEgMTcuMzQ0OUwzLjQ4NjA3IDE2LjkzMjJDMy45MTIxOCAxNC41NzYxIDQuODIwMzMgMTIuMzgzOCA2LjE4NTQ1IDEwLjQxNDVMNi40MjMyNiAxMC4wNzEzTDUuMjg0MzcgOC4yMDQyMUw4LjIwNDg1IDUuMjgzNzNMMTAuMDcxOSA2LjQyMjYxTDEwLjQxNTEgNi4xODQ4MUMxMi4zODM4IDQuODE5NjkgMTQuNTc2NyAzLjkxMTU0IDE2LjkzMjkgMy40ODU0MkwxNy4zNDU1IDMuNDEwODdMMTcuODU5IDEuMjg1NDJIMjEuOTg5MUwyMi41MDMzIDMuNDExNTFMMjIuOTE1OSAzLjQ4NjA3QzI1LjI3MjEgMy45MTIxOCAyNy40NjQzIDQuODIwMzMgMjkuNDMzNiA2LjE4NTQ1TDI5Ljc3NjggNi40MjMyNkwzMS42NDM5IDUuMjg0MzdMMzQuNTY0NCA4LjIwNDg1TDMzLjQyNTUgMTAuMDcxOUwzMy42NjMzIDEwLjQxNTFDMzUuMDI4NCAxMi4zODM4IDM1LjkzNjYgMTQuNTc2NyAzNi4zNjI3IDE2LjkzMjlMMzYuNDM3MiAxNy4zNDU1TDM4LjU2MzMgMTcuODU5N1YyMS45ODkxSDM4LjU2MjdaIgogICAgZmlsbD0iIzAwMDAwMCIgLz4KICA8cGF0aCBkPSJNMjAuNTY2NyAyLjU3MDg5SDE5LjI4MTJWMy44NTYzMkgyMC41NjY3VjIuNTcwODlaIiBmaWxsPSIjMDAwMDAwIiAvPgogIDxwYXRoIGQ9Ik04LjEwNzY1IDcuMTk5MDVMNy4xOTg3MyA4LjEwNzk3TDguMTA3NjUgOS4wMTY4OUw5LjAxNjU4IDguMTA3OTdMOC4xMDc2NSA3LjE5OTA1WiIKICAgIGZpbGw9IiMwMDAwMDAiIC8+CiAgPHBhdGggZD0iTTMuODU2MjIgMTkuMjgxNEgyLjU3MDhWMjAuNTY2OEgzLjg1NjIyVjE5LjI4MTRaIiBmaWxsPSIjMDAwMDAwIiAvPgogIDxwYXRoIGQ9Ik04LjEwNzY1IDMwLjgzMTNMNy4xOTg3MyAzMS43NDAzTDguMTA3NjUgMzIuNjQ5Mkw5LjAxNjU4IDMxLjc0MDNMOC4xMDc2NSAzMC44MzEzWiIKICAgIGZpbGw9IiMwMDAwMDAiIC8+CiAgPHBhdGggZD0iTTIwLjU2NjcgMzUuOTkxOUgxOS4yODEyVjM3LjI3NzNIMjAuNTY2N1YzNS45OTE5WiIgZmlsbD0iIzAwMDAwMCIgLz4KICA8cGF0aCBkPSJNMzEuNzQgMzAuODMxM0wzMC44MzExIDMxLjc0MDJMMzEuNzQgMzIuNjQ5MUwzMi42NDg5IDMxLjc0MDJMMzEuNzQgMzAuODMxM1oiCiAgICBmaWxsPSIjMDAwMDAwIiAvPgogIDxwYXRoIGQ9Ik0zNy4yNzcxIDE5LjI4MTRIMzUuOTkxN1YyMC41NjY4SDM3LjI3NzFWMTkuMjgxNFoiIGZpbGw9IiMwMDAwMDAiIC8+CiAgPHBhdGggZD0iTTMxLjc0IDcuMTk4OTZMMzAuODMxMSA4LjEwNzg4TDMxLjc0IDkuMDE2OEwzMi42NDg5IDguMTA3ODhMMzEuNzQgNy4xOTg5NloiCiAgICBmaWxsPSIjMDAwMDAwIiAvPgogIDxwYXRoCiAgICBkPSJNMTkuOTI0IDUuMTQxNjlDMTEuNzcyNSA1LjE0MTY5IDUuMTQxNiAxMS43NzI1IDUuMTQxNiAxOS45MjQxQzUuMTQxNiAyOC4wNzU2IDExLjc3MjUgMzQuNzA2NCAxOS45MjQgMzQuNzA2NEMyOC4wNzU1IDM0LjcwNjQgMzQuNzA2MyAyOC4wNzU2IDM0LjcwNjMgMTkuOTI0MUMzNC43MDYzIDExLjc3MjUgMjguMDc1NSA1LjE0MTY5IDE5LjkyNCA1LjE0MTY5Wk0xOS45MjQgMzMuNDIxQzEyLjQ4MiAzMy40MjEgNi40MjcwMiAyNy4zNjYgNi40MjcwMiAxOS45MjQxQzYuNDI3MDIgMTIuNDgyMSAxMi40ODIgNi40MjcxMiAxOS45MjQgNi40MjcxMkMyNy4zNjU5IDYuNDI3MTIgMzMuNDIwOSAxMi40ODIxIDMzLjQyMDkgMTkuOTI0MUMzMy40MjA5IDI3LjM2NiAyNy4zNjU5IDMzLjQyMSAxOS45MjQgMzMuNDIxWiIKICAgIGZpbGw9IiMwMDAwMDAiIC8+CiAgPHBhdGgKICAgIGQ9Ik0yNS43MDgyIDE4LjExNDJWMTQuNzgyNEMyNS43MDgyIDExLjU5MjYgMjMuMTEzNiA4Ljk5Nzk5IDE5LjkyMzggOC45OTc5OUMxNi43MzQxIDguOTk3OTkgMTQuMTM5NCAxMS41OTI2IDE0LjEzOTQgMTQuNzgyNFYxOC4xMTQyQzEzLjM5MzIgMTguMzgwMyAxMi44NTQgMTkuMDg3MyAxMi44NTQgMTkuOTI0MVYyMy43ODAzQzEyLjg1NCAyNy42Nzg0IDE2LjAyNTggMzAuODUwMiAxOS45MjM4IDMwLjg1MDJDMjMuODIxOSAzMC44NTAyIDI2Ljk5MzcgMjcuNjc4NCAyNi45OTM3IDIzLjc4MDNWMTkuOTI0MUMyNi45OTM3IDE5LjA4NzMgMjYuNDU0NCAxOC4zODAzIDI1LjcwODIgMTguMTE0MlpNMTkuOTIzOCAxMC4yODM0QzIyLjQwNDEgMTAuMjgzNCAyNC40MjI4IDEyLjMwMjIgMjQuNDIyOCAxNC43ODI0VjE3Ljk5NTlIMjMuMTM3NFYxNC43ODI0QzIzLjEzNzQgMTMuMDEwNCAyMS42OTU4IDExLjU2ODggMTkuOTIzOCAxMS41Njg4QzE4LjE1MTkgMTEuNTY4OCAxNi43MTAzIDEzLjAxMDQgMTYuNzEwMyAxNC43ODI0VjE3Ljk5NTlIMTUuNDI0OFYxNC43ODI0QzE1LjQyNDggMTIuMzAyMiAxNy40NDM2IDEwLjI4MzQgMTkuOTIzOCAxMC4yODM0Wk0yMS44NTIgMTcuOTk1OUgxNy45OTU3VjE0Ljc4MjRDMTcuOTk1NyAxMy43MTkzIDE4Ljg2MDggMTIuODU0MyAxOS45MjM4IDEyLjg1NDNDMjAuOTg2OSAxMi44NTQzIDIxLjg1MiAxMy43MTkzIDIxLjg1MiAxNC43ODI0VjE3Ljk5NTlaTTI1LjcwODIgMjMuNzgwM0MyNS43MDgyIDI2Ljk3MDEgMjMuMTEzNiAyOS41NjQ4IDE5LjkyMzggMjkuNTY0OEMxNi43MzQxIDI5LjU2NDggMTQuMTM5NCAyNi45NzAxIDE0LjEzOTQgMjMuNzgwM1YxOS45MjQxQzE0LjEzOTQgMTkuNTY5MyAxNC40Mjc0IDE5LjI4MTQgMTQuNzgyMSAxOS4yODE0SDI1LjA2NTVDMjUuNDIwMyAxOS4yODE0IDI1LjcwODIgMTkuNTY5MyAyNS43MDgyIDE5LjkyNDFWMjMuNzgwM1oiCiAgICBmaWxsPSIjMDAwMDAwIiAvPgogIDxwYXRoCiAgICBkPSJNMTkuOTIzOSAyMC41NjY4QzE4LjUwNjEgMjAuNTY2OCAxNy4zNTMgMjEuNzE5OCAxNy4zNTMgMjMuMTM3NkMxNy4zNTMgMjQuMzMyNCAxOC4xNzUxIDI1LjMyOTkgMTkuMjgxMiAyNS42MTcyVjI4LjI3OTNIMjAuNTY2NlYyNS42MTcyQzIxLjY3MjcgMjUuMzI5OSAyMi40OTQ3IDI0LjMzMjQgMjIuNDk0NyAyMy4xMzc2QzIyLjQ5NDcgMjEuNzE5OCAyMS4zNDE3IDIwLjU2NjggMTkuOTIzOSAyMC41NjY4Wk0xOS45MjM5IDI0LjQyM0MxOS4yMTUgMjQuNDIzIDE4LjYzODUgMjMuODQ2NSAxOC42Mzg1IDIzLjEzNzZDMTguNjM4NSAyMi40Mjg3IDE5LjIxNSAyMS44NTIyIDE5LjkyMzkgMjEuODUyMkMyMC42MzI4IDIxLjg1MjIgMjEuMjA5MyAyMi40Mjg3IDIxLjIwOTMgMjMuMTM3NkMyMS4yMDkzIDIzLjg0NjUgMjAuNjMyOCAyNC40MjMgMTkuOTIzOSAyNC40MjNaIgogICAgZmlsbD0iIzAwMDAwMCIgLz4KPC9zdmc+"},{name:"Quota",isPreview:!0,isPaidAddOn:!0,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/quota-inbound/",id:"quota-inbound",defaultHandler:{export:"QuotaInbound",module:"$import(@zuplo/runtime)",options:{}},exampleHtml:"<div><p>Enforce quota policies on requests</p></div><h3>Options</h3><ul></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGNsYXNzPSJoLTYgdy02IiBmaWxsPSJub25lIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjIiPjxwYXRoIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTMgNmwzIDFtMCAwbC0zIDlhNS4wMDIgNS4wMDIgMCAwMDYuMDAxIDBNNiA3bDMgOU02IDdsNi0ybTYgMmwzLTFtLTMgMWwtMyA5YTUuMDAyIDUuMDAyIDAgMDA2LjAwMSAwTTE4IDdsMyA5bS0zLTlsLTYtMm0wLTJ2Mm0wIDE2VjVtMCAxNkg5bTMgMGgzIiAvPjwvc3ZnPg=="},{name:"Rate Limiting",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/rate-limit-inbound/",id:"rate-limit-inbound",defaultHandler:{export:"RateLimitInboundPolicy",module:"$import(@zuplo/runtime)",options:{rateLimitBy:"ip",requestsAllowed:2,timeWindowMinutes:1}},exampleHtml:"<div><p>The rate-limiting policy is used to limit the number of requests that can be made against your API based on a key.</p></div><h3>Options</h3><ul><li><code>rateLimitBy</code> <div><p>The identifying element of the request that enforces distinct rate limits. For example, you can limit by <code>user</code>, <code>ip</code>, <code>function</code> or <code>all</code> - function allows you to specify a simple function to create a string identifier to create a rate-limit group</p></div></li><li><code>requestsAllowed</code> <div><p>The max number of requests allowed in the given time window</p></div></li><li><code>timeWindowMinutes</code> <div><p>The time window in which the requests are rate-limited. The count restarts after each window expires</p></div></li><li><code>identifier</code> <div><p>The function that returns dynamic configuration data. Used only with <code>rateLimitBy=function</code></p></div><ul><li><code>export</code> <div><p>used only with rateLimitBy=function. Specifies the export to load your custom bucket function, e.g. <code>default</code>, <code>rateLimitIdentifier</code>.</p></div></li><li><code>module</code> <div><p>Specifies the module to load your custom bucket function, in the format <code>$import(./modules/my-module)</code></p></div></li></ul></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGNsYXNzPSJoLTYgdy02IiBmaWxsPSJub25lIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjIiPjxwYXRoIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTExLjkzMyAxMi44YTEgMSAwIDAwMC0xLjZMNi42IDcuMkExIDEgMCAwMDUgOHY4YTEgMSAwIDAwMS42LjhsNS4zMzMtNHpNMTkuOTMzIDEyLjhhMSAxIDAgMDAwLTEuNmwtNS4zMzMtNEExIDEgMCAwMDEzIDh2OGExIDEgMCAwMDEuNi44bDUuMzMzLTR6IiAvPjwvc3ZnPg=="},{name:"Readme Metrics",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/readme-metrics-inbound/",id:"readme-metrics-inbound",defaultHandler:{module:"$import(@zuplo/runtime)",export:"ReadmeMetricsInboundPolicy",options:{apiKey:"YOUR_API_KEY",userLabelPropertyPath:".sub",development:!0,useFullRequestPath:!1}},exampleHtml:`<div><p>Readme is a developer documentation and API metrics company. This policy pushes logs to their API calls dashboard.</p></div><h3>Options</h3><ul><li><code>apiKey</code> <div><p>The API key to use when sending metrics calls to Readme</p></div></li><li><code>userLabelPropertyPath</code> <div><p>Optional - defaults to '.sub'. This is the path to the property on <code>request.user</code> that contains the label you want to use. For example <code>.data.accountNumber</code> would read the <code>request.user.data.accountNumber</code> property.</p></div></li><li><code>userEmailPropertyPath</code> <div><p>Optional - defaults to empty. This is the path to the property on <code>request.user</code> that contains the e-mail of the user. For example <code>.data.email</code> would read the <code>request.user.data.email</code> property.</p></div></li><li><code>development</code> <div><p>Optional. Whether the data should be ingested as 'development' mode or not. Defaults to true for working-copy and false for all other environments.</p></div></li><li><code>useFullRequestPath</code> <div><p>Optional - defaults to false. When true, Zuplo sends the full request path (which might contain sensitive information). By default, we only send the route path which should not contain sensitive information.</p></div></li><li><code>url</code> <div><p>Optional, the URL to send metering events to (defaults to <a href="https://metrics.readme.io/request">https://metrics.readme.io/request</a>). This is useful for testing purposes.</p></div></li></ul> `,icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiIGlkPSJyZWFkbWUiPjxwYXRoIGQ9Ik0yNCwxNS41MjRWNS4yNmMwLTEuMTAzLTAuODg3LTIuMDAxLTEuOTg3LTIuMDFoLTAuMDAyaC01LjgyNWMtMi4wMDQsMC0zLjc0NiwxLjM5MS00LjE4MywzLjM1NEMxMS41NjEsNC42NDEsOS44MjQsMy4yNSw3LjgyLDMuMjVIMmMtMS4xMDQsMC0yLDAuODk4LTIsMi4wMDV2MTAuMjY5YzAsMS4xMDcsMC44OTYsMi4wMDUsMiwyLjAwNWgzLjczOGM0LjI1OCwwLDUuNTI5LDEuMDIsNi4xMzcsMy4xMzNjMC4wMjksMC4xMTcsMC4yMTcsMC4xMTcsMC4yNSwwYzAuNjEzLTIuMTE0LDEuODg0LTMuMTMzLDYuMTM4LTMuMTMzSDIyQzIzLjEwNCwxNy41MjksMjQsMTYuNjMxLDI0LDE1LjUyNHogTTEwLjA4NywxNC4zMzdoLTAuMDA0YzAsMC4wNzktMC4wNjIsMC4xNDYtMC4xNDYsMC4xNDZIMy4yNThjLTAuMDc5LDAtMC4xNDYtMC4wNjItMC4xNDYtMC4xNDZWMTMuMzhjMC0wLjA3OSwwLjA2Mi0wLjE0NiwwLjE0Ni0wLjE0Nmg2LjY4M2MwLjA3OSwwLDAuMTQ2LDAuMDYyLDAuMTQ2LDAuMTQ2VjE0LjMzN3ogTTEwLjA4NywxMS43OTNoLTAuMDA0YzAsMC4wNzktMC4wNjIsMC4xNDYtMC4xNDYsMC4xNDZIMy4yNThjLTAuMDc5LDAtMC4xNDYtMC4wNjItMC4xNDYtMC4xNDZ2LTAuOTU2YzAtMC4wNzksMC4wNjItMC4xNDYsMC4xNDYtMC4xNDZoNi42ODNjMC4wNzksMCwwLjE0NiwwLjA2MiwwLjE0NiwwLjE0NlYxMS43OTN6IE0xMC4wODcsOS4yNDloLTAuMDA0YzAsMC4wNzktMC4wNjIsMC4xNDYtMC4xNDYsMC4xNDZIMy4yNThjLTAuMDc5LDAtMC4xNDYtMC4wNjItMC4xNDYtMC4xNDZWOC4yOTJjMC0wLjA3OSwwLjA2Mi0wLjE0NiwwLjE0Ni0wLjE0Nmg2LjY4M2MwLjA3OSwwLDAuMTQ2LDAuMDYyLDAuMTQ2LDAuMTQ2VjkuMjQ5eiBNMjAuODksMTQuMzMzaC0wLjAwNGMwLDAuMDc5LTAuMDYyLDAuMTQ2LTAuMTQ2LDAuMTQ2aC02LjY3OWMtMC4wNzksMC0wLjE0Ni0wLjA2Mi0wLjE0Ni0wLjE0NnYtMC45NTZjMC0wLjA3OSwwLjA2Mi0wLjE0NiwwLjE0Ni0wLjE0Nmg2LjY4M2MwLjA3OSwwLDAuMTQ2LDAuMDYyLDAuMTQ2LDAuMTQ2VjE0LjMzM3ogTTIwLjg5LDExLjc4OWgtMC4wMDRjMCwwLjA3OS0wLjA2MiwwLjE0Ni0wLjE0NiwwLjE0NmgtNi42NzljLTAuMDc5LDAtMC4xNDYtMC4wNjItMC4xNDYtMC4xNDZ2LTAuOTU2YzAtMC4wNzksMC4wNjItMC4xNDYsMC4xNDYtMC4xNDZoNi42ODNjMC4wNzksMCwwLjE0NiwwLjA2MiwwLjE0NiwwLjE0NlYxMS43ODl6IE0yMC44OSw5LjI0NGgtMC4wMDRjMCwwLjA3OS0wLjA2MiwwLjE0Ni0wLjE0NiwwLjE0NmgtNi42NzljLTAuMDc5LDAtMC4xNDYtMC4wNjItMC4xNDYtMC4xNDZWOC4yOTJjMC0wLjA3OSwwLjA2Mi0wLjE0NiwwLjE0Ni0wLjE0Nmg2LjY4M2MwLjA3OSwwLDAuMTQ2LDAuMDYyLDAuMTQ2LDAuMTQ2VjkuMjQ0eiI+PC9wYXRoPjwvc3ZnPg=="},{name:"Remove Request Headers",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/remove-headers-inbound/",id:"remove-headers-inbound",defaultHandler:{export:"RemoveHeadersInboundPolicy",module:"$import(@zuplo/runtime)",options:{headers:["HEADER_NAME"]}},exampleHtml:"<div><p>Remove headers from the incoming request.</p></div><h3>Options</h3><ul><li><code>headers</code> <div><p>A list of headers to be removed from the incoming request</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItYWxpZ24tcmlnaHQiPjxsaW5lIHgxPSIyMSIgeTE9IjEwIiB4Mj0iNyIgeTI9IjEwIj48L2xpbmU+PGxpbmUgeDE9IjIxIiB5MT0iNiIgeDI9IjMiIHkyPSI2Ij48L2xpbmU+PGxpbmUgeDE9IjIxIiB5MT0iMTQiIHgyPSIzIiB5Mj0iMTQiPjwvbGluZT48bGluZSB4MT0iMjEiIHkxPSIxOCIgeDI9IjciIHkyPSIxOCI+PC9saW5lPjwvc3ZnPg=="},{name:"Remove Response Headers",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/remove-headers-outbound/",id:"remove-headers-outbound",defaultHandler:{export:"RemoveHeadersOutboundPolicy",module:"$import(@zuplo/runtime)",options:{headers:["HEADER_NAME"]}},exampleHtml:"<div><p>Remove configured headers from the outgoing response.</p></div><h3>Options</h3><ul></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItYWxpZ24tcmlnaHQiPjxsaW5lIHgxPSIyMSIgeTE9IjEwIiB4Mj0iNyIgeTI9IjEwIj48L2xpbmU+PGxpbmUgeDE9IjIxIiB5MT0iNiIgeDI9IjMiIHkyPSI2Ij48L2xpbmU+PGxpbmUgeDE9IjIxIiB5MT0iMTQiIHgyPSIzIiB5Mj0iMTQiPjwvbGluZT48bGluZSB4MT0iMjEiIHkxPSIxOCIgeDI9IjciIHkyPSIxOCI+PC9saW5lPjwvc3ZnPg=="},{name:"Remove Query Parameters",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/remove-query-params-inbound/",id:"remove-query-params-inbound",defaultHandler:{export:"RemoveQueryParamsInboundPolicy",module:"$import(@zuplo/runtime)",options:{params:["PARAM_NAME"]}},exampleHtml:"<div><p>Remove query parameters from the incoming request</p></div><h3>Options</h3><ul><li><code>params</code> <div><p>Array of query parameters to be removed</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItaGVscC1jaXJjbGUiPjxjaXJjbGUgY3g9IjEyIiBjeT0iMTIiIHI9IjEwIj48L2NpcmNsZT48cGF0aCBkPSJNOS4wOSA5YTMgMyAwIDAgMSA1LjgzIDFjMCAyLTMgMy0zIDMiPjwvcGF0aD48bGluZSB4MT0iMTIiIHkxPSIxNyIgeDI9IjEyLjAxIiB5Mj0iMTciPjwvbGluZT48L3N2Zz4="},{name:"Replace String in Response Body",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/replace-string-outbound/",id:"replace-string-outbound",defaultHandler:{export:"ReplaceStringOutboundPolicy",module:"$import(@zuplo/runtime)",options:{mode:"regexp",match:"https://example.com/api/(v1|v0)/",replaceWith:"https://my-gateway.com/v1/"}},exampleHtml:"<div><p>Replace a string in the incoming request body</p></div><h3>Options</h3><ul><li><code>mode</code> <div><p>The type of string replacement to perform</p></div></li><li><code>match</code> <div><p>The pattern to match</p></div></li><li><code>replaceWith</code> <div><p>The value to each match is replaced with</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItcmVwZWF0Ij48cG9seWxpbmUgcG9pbnRzPSIxNyAxIDIxIDUgMTcgOSI+PC9wb2x5bGluZT48cGF0aCBkPSJNMyAxMVY5YTQgNCAwIDAgMSA0LTRoMTQiPjwvcGF0aD48cG9seWxpbmUgcG9pbnRzPSI3IDIzIDMgMTkgNyAxNSI+PC9wb2x5bGluZT48cGF0aCBkPSJNMjEgMTN2MmE0IDQgMCAwIDEtNCA0SDMiPjwvcGF0aD48L3N2Zz4="},{name:"Request Size Limit",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/request-size-limit-inbound/",id:"request-size-limit-inbound",defaultHandler:{export:"RequestSizeLimitInboundPolicy",module:"$import(@zuplo/runtime)",options:{maxSizeInBytes:4098,trustContentLengthHeader:!0}},exampleHtml:"<div><p>Enforces a maximum size on incoming requests</p></div><h3>Options</h3><ul><li><code>maxSizeInBytes</code> <div><p>The maximum size of the request in bytes</p></div></li><li><code>trustContentLengthHeader</code> <div><p>If true, the policy will reject any request with a <code>content-length</code> header in excess of <code>maxSizeInBytes</code> bytes value, but will not verify the actual size of the request. This is more efficient and offers slightly better memory usage but should only be used if you trust/control the clients calling the gateway to send an accurate content-length. If false, the gateway will actually verify the request size and reject any request with a size in excess of the stated maximum.</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItdHJ1Y2siPjxyZWN0IHg9IjEiIHk9IjMiIHdpZHRoPSIxNSIgaGVpZ2h0PSIxMyI+PC9yZWN0Pjxwb2x5Z29uIHBvaW50cz0iMTYgOCAyMCA4IDIzIDExIDIzIDE2IDE2IDE2IDE2IDgiPjwvcG9seWdvbj48Y2lyY2xlIGN4PSI1LjUiIGN5PSIxOC41IiByPSIyLjUiPjwvY2lyY2xlPjxjaXJjbGUgY3g9IjE4LjUiIGN5PSIxOC41IiByPSIyLjUiPjwvY2lyY2xlPjwvc3ZnPg=="},{name:"Request Validation",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/request-validation-inbound/",id:"request-validation-inbound",defaultHandler:{export:"RequestValidationInboundPolicy",module:"$import(@zuplo/runtime)",options:{logLevel:"info",validateBody:"log-only",includeRequestInLogs:!1}},exampleHtml:"<div><p>Validate inbound requests based on Open API specification</p></div><h3>Options</h3><ul><li><code>logLevel</code> <div><p>Optional. Specify one of the log levels: 'error | warn | info | debug'. Default: info</p></div></li><li><code>validateBody</code> <div><p>Optional. Specify one of the options: 'none, log-only, reject-and-log, reject-only'. Default: none</p></div></li><li><code>validateQueryParameters</code> <div><p>Optional. Specify one of the options: 'none, log-only, reject-and-log, reject-only'. Default: none</p></div></li><li><code>validatePathParameters</code> <div><p>Optional. Specify one of the options: 'none, log-only, reject-and-log, reject-only'. Default: none</p></div></li><li><code>validateHeaders</code> <div><p>Optional. Specify one of the options: 'none, log-only, reject-and-log, reject-only'. Default: none</p></div></li><li><code>includeRequestInLogs</code> <div><p>Optional. Specify whether to include the request in the logs. Default: false</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItY2hlY2stc3F1YXJlIj48cG9seWxpbmUgcG9pbnRzPSI5IDExIDEyIDE0IDIyIDQiPjwvcG9seWxpbmU+PHBhdGggZD0iTTIxIDEydjdhMiAyIDAgMCAxLTIgMkg1YTIgMiAwIDAgMS0yLTJWNWEyIDIgMCAwIDEgMi0yaDExIj48L3BhdGg+PC9zdmc+"},{name:"Require Origin",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/require-origin-inbound/",id:"require-origin-inbound",defaultHandler:{export:"RequireOriginInboundPolicy",module:"$import(@zuplo/runtime)",options:{origins:"https://contoso.com, https://sub.contoso.com",failureDetail:"Invalid Request - contact support at support@contoso.com"}},exampleHtml:"<div><p>Sets an allow-list for an origin header</p></div><h3>Options</h3><ul><li><code>origins</code> <div><p>A comma separated string containing valid origins</p></div></li><li><code>failureDetail</code> <div><p>The <code>detail</code> of the HTTP Problem response, if the origin is missing or disallowed</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyNCAyNCIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZT0iY3VycmVudENvbG9yIiBjbGFzcz0idy02IGgtNiI+CiAgPHBhdGggc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBkPSJNMTIgMjFhOS4wMDQgOS4wMDQgMCAwMDguNzE2LTYuNzQ3TTEyIDIxYTkuMDA0IDkuMDA0IDAgMDEtOC43MTYtNi43NDdNMTIgMjFjMi40ODUgMCA0LjUtNC4wMyA0LjUtOVMxNC40ODUgMyAxMiAzbTAgMThjLTIuNDg1IDAtNC41LTQuMDMtNC41LTlTOS41MTUgMyAxMiAzbTAgMGE4Ljk5NyA4Ljk5NyAwIDAxNy44NDMgNC41ODJNMTIgM2E4Ljk5NyA4Ljk5NyAwIDAwLTcuODQzIDQuNTgybTE1LjY4NiAwQTExLjk1MyAxMS45NTMgMCAwMTEyIDEwLjVjLTIuOTk4IDAtNS43NC0xLjEtNy44NDMtMi45MThtMTUuNjg2IDBBOC45NTkgOC45NTkgMCAwMTIxIDEyYzAgLjc3OC0uMDk5IDEuNTMzLS4yODQgMi4yNTNtMCAwQTE3LjkxOSAxNy45MTkgMCAwMTEyIDE2LjVjLTMuMTYyIDAtNi4xMzMtLjgxNS04LjcxNi0yLjI0N20wIDBBOS4wMTUgOS4wMTUgMCAwMTMgMTJjMC0xLjYwNS40Mi0zLjExMyAxLjE1Ny00LjQxOCIgLz4KPC9zdmc+"},{name:"Set Body",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/set-body-inbound/",id:"set-body-inbound",defaultHandler:{export:"SetBodyInboundPolicy",module:"$import(@zuplo/runtime)",options:{body:'{ "model": "babbage", "prompt": "Say this is a test", "max_tokens": 7, "temperature": 0, "stream": true }'}},exampleHtml:"<div><p>Sets the body of the request in the inbound pipeline - make sure to convert a GET/HEAD request to another method when using this policy.</p></div><h3>Options</h3><ul><li><code>body</code> <div><p>The value to set for the body</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyNCAyNCIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZT0iY3VycmVudENvbG9yIiBjbGFzcz0idy02IGgtNiI+CiAgPHBhdGggc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBkPSJNMTIgMjFhOS4wMDQgOS4wMDQgMCAwMDguNzE2LTYuNzQ3TTEyIDIxYTkuMDA0IDkuMDA0IDAgMDEtOC43MTYtNi43NDdNMTIgMjFjMi40ODUgMCA0LjUtNC4wMyA0LjUtOVMxNC40ODUgMyAxMiAzbTAgMThjLTIuNDg1IDAtNC41LTQuMDMtNC41LTlTOS41MTUgMyAxMiAzbTAgMGE4Ljk5NyA4Ljk5NyAwIDAxNy44NDMgNC41ODJNMTIgM2E4Ljk5NyA4Ljk5NyAwIDAwLTcuODQzIDQuNTgybTE1LjY4NiAwQTExLjk1MyAxMS45NTMgMCAwMTEyIDEwLjVjLTIuOTk4IDAtNS43NC0xLjEtNy44NDMtMi45MThtMTUuNjg2IDBBOC45NTkgOC45NTkgMCAwMTIxIDEyYzAgLjc3OC0uMDk5IDEuNTMzLS4yODQgMi4yNTNtMCAwQTE3LjkxOSAxNy45MTkgMCAwMTEyIDE2LjVjLTMuMTYyIDAtNi4xMzMtLjgxNS04LjcxNi0yLjI0N20wIDBBOS4wMTUgOS4wMTUgMCAwMTMgMTJjMC0xLjYwNS40Mi0zLjExMyAxLjE1Ny00LjQxOCIgLz4KPC9zdmc+Cg=="},{name:"Add or Set Request Headers",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/set-headers-inbound/",id:"set-headers-inbound",defaultHandler:{export:"SetHeadersInboundPolicy",module:"$import(@zuplo/runtime)",options:{headers:[{name:"HEADER_NAME",value:"HEADER_VALUE",overwrite:!0}]}},exampleHtml:"<div><p>Adds or sets headers on the incoming request.</p></div><h3>Options</h3><ul><li><code>headers</code> <div><p>An array of name and value objects (with an optional <code>overwrite</code> boolean)</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItYWxpZ24tcmlnaHQiPjxsaW5lIHgxPSIyMSIgeTE9IjEwIiB4Mj0iNyIgeTI9IjEwIj48L2xpbmU+PGxpbmUgeDE9IjIxIiB5MT0iNiIgeDI9IjMiIHkyPSI2Ij48L2xpbmU+PGxpbmUgeDE9IjIxIiB5MT0iMTQiIHgyPSIzIiB5Mj0iMTQiPjwvbGluZT48bGluZSB4MT0iMjEiIHkxPSIxOCIgeDI9IjciIHkyPSIxOCI+PC9saW5lPjwvc3ZnPg=="},{name:"Add or Set Response Headers",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/set-headers-outbound/",id:"set-headers-outbound",defaultHandler:{export:"SetHeadersOutboundPolicy",module:"$import(@zuplo/runtime)",options:{headers:[{name:"HEADER_NAME",value:"HEADER_VALUE",overwrite:!0}]}},exampleHtml:"<div><p>Adds or sets headers on the on the outgoing.</p></div><h3>Options</h3><ul><li><code>headers</code> <div></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItYWxpZ24tcmlnaHQiPjxsaW5lIHgxPSIyMSIgeTE9IjEwIiB4Mj0iNyIgeTI9IjEwIj48L2xpbmU+PGxpbmUgeDE9IjIxIiB5MT0iNiIgeDI9IjMiIHkyPSI2Ij48L2xpbmU+PGxpbmUgeDE9IjIxIiB5MT0iMTQiIHgyPSIzIiB5Mj0iMTQiPjwvbGluZT48bGluZSB4MT0iMjEiIHkxPSIxOCIgeDI9IjciIHkyPSIxOCI+PC9saW5lPjwvc3ZnPg=="},{name:"Add or Set Query Parameters",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/set-query-params-inbound/",id:"set-query-params-inbound",defaultHandler:{export:"SetQueryParamsInboundPolicy",module:"$import(@zuplo/runtime)",options:{params:[{name:"PARAM_NAME",value:"PARAM_VALUE",overwrite:!0}]}},exampleHtml:"<div><p>Adds or sets query parameters on the incoming request.</p></div><h3>Options</h3><ul><li><code>params</code> <div><p>An array of object, with a name and value property (and optional <code>override</code> boolean)</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItaGVscC1jaXJjbGUiPjxjaXJjbGUgY3g9IjEyIiBjeT0iMTIiIHI9IjEwIj48L2NpcmNsZT48cGF0aCBkPSJNOS4wOSA5YTMgMyAwIDAgMSA1LjgzIDFjMCAyLTMgMy0zIDMiPjwvcGF0aD48bGluZSB4MT0iMTIiIHkxPSIxNyIgeDI9IjEyLjAxIiB5Mj0iMTciPjwvbGluZT48L3N2Zz4="},{name:"Set Status Code",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/set-status-outbound/",id:"set-status-outbound",defaultHandler:{export:"SetStatusOutboundPolicy",module:"$import(@zuplo/runtime)",options:{status:200,statusText:"OK"}},exampleHtml:"<div><p>Adds or sets headers on the on the outgoing.</p></div><h3>Options</h3><ul><li><code>status</code> <div><p>The status code to be used in the response</p></div></li><li><code>statusText</code> <div><p>The statusText to be used in the response (optional)</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyNCAyNCIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZT0iY3VycmVudENvbG9yIiBjbGFzcz0idy02IGgtNiI+CiAgPHBhdGggc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBkPSJNNi42MzMgMTAuNWMuODA2IDAgMS41MzMtLjQ0NiAyLjAzMS0xLjA4YTkuMDQxIDkuMDQxIDAgMDEyLjg2MS0yLjRjLjcyMy0uMzg0IDEuMzUtLjk1NiAxLjY1My0xLjcxNWE0LjQ5OCA0LjQ5OCAwIDAwLjMyMi0xLjY3MlYzYS43NS43NSAwIDAxLjc1LS43NUEyLjI1IDIuMjUgMCAwMTE2LjUgNC41YzAgMS4xNTItLjI2IDIuMjQzLS43MjMgMy4yMTgtLjI2Ni41NTguMTA3IDEuMjgyLjcyNSAxLjI4MmgzLjEyNmMxLjAyNiAwIDEuOTQ1LjY5NCAyLjA1NCAxLjcxNS4wNDUuNDIyLjA2OC44NS4wNjggMS4yODVhMTEuOTUgMTEuOTUgMCAwMS0yLjY0OSA3LjUyMWMtLjM4OC40ODItLjk4Ny43MjktMS42MDUuNzI5SDEzLjQ4Yy0uNDgzIDAtLjk2NC0uMDc4LTEuNDIzLS4yM2wtMy4xMTQtMS4wNGE0LjUwMSA0LjUwMSAwIDAwLTEuNDIzLS4yM0g1LjkwNE0xNC4yNSA5aDIuMjVNNS45MDQgMTguNzVjLjA4My4yMDUuMTczLjQwNS4yNy42MDIuMTk3LjQtLjA3OC44OTgtLjUyMy44OThoLS45MDhjLS44ODkgMC0xLjcxMy0uNTE4LTEuOTcyLTEuMzY4YTEyIDEyIDAgMDEtLjUyMS0zLjUwN2MwLTEuNTUzLjI5NS0zLjAzNi44MzEtNC4zOThDMy4zODcgMTAuMjAzIDQuMTY3IDkuNzUgNSA5Ljc1aDEuMDUzYy40NzIgMCAuNzQ1LjU1Ni41Ljk2YTguOTU4IDguOTU4IDAgMDAtMS4zMDIgNC42NjVjMCAxLjE5NC4yMzIgMi4zMzMuNjU0IDMuMzc1eiIgLz4KPC9zdmc+Cg=="},{name:"Sleep / Delay",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/sleep-inbound/",id:"sleep-inbound",defaultHandler:{export:"SleepInboundPolicy",module:"$import(@zuplo/runtime)",options:{sleepInMs:1e3}},exampleHtml:"<div><p>Add a delay to the incoming request. Useful for testing.</p></div><h3>Options</h3><ul><li><code>sleepInMs</code> <div><p>The number of milliseconds to delay the request</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItd2F0Y2giPjxjaXJjbGUgY3g9IjEyIiBjeT0iMTIiIHI9IjciPjwvY2lyY2xlPjxwb2x5bGluZSBwb2ludHM9IjEyIDkgMTIgMTIgMTMuNSAxMy41Ij48L3BvbHlsaW5lPjxwYXRoIGQ9Ik0xNi41MSAxNy4zNWwtLjM1IDMuODNhMiAyIDAgMCAxLTIgMS44Mkg5LjgzYTIgMiAwIDAgMS0yLTEuODJsLS4zNS0zLjgzbS4wMS0xMC43bC4zNS0zLjgzQTIgMiAwIDAgMSA5LjgzIDFoNC4zNWEyIDIgMCAwIDEgMiAxLjgybC4zNSAzLjgzIj48L3BhdGg+PC9zdmc+"},{name:"Supabase JWT Auth",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/supabase-jwt-auth-inbound/",id:"supabase-jwt-auth-inbound",defaultHandler:{export:"SupabaseJwtInboundPolicy",module:"$import(@zuplo/runtime)",options:{secret:"$env(SUPABASE_JWT_SECRET)",allowUnauthenticatedRequests:!1,requiredClaims:{claim_1:["valid_value_1","valid_value_2"],claim_2:["valid_value_1","valid_value_2"]}}},exampleHtml:"<div><p>The Supabase JWT Authentication policy supports user JWT tokens created by Supabase.</p></div><h3>Options</h3><ul><li><code>secret</code> <div><p>The key used to verify the signature of the JWT token</p></div></li><li><code>allowUnauthenticatedRequests</code> <div><p>Indicates whether the request should continue if authentication fails. Default is <code>false</code> which means unauthenticated users will automatically receive a 401 response.</p></div></li><li><code>requiredClaims</code> <div><p>Any claims that must be present for authentication to succeed - multiple valid values can be specified for each claim.</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTA5cHgiIGhlaWdodD0iMTEycHgiIHZpZXdCb3g9IjAgMCAxMDkgMTEyIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPgogICAgPHRpdGxlPnN1cGFiYXNlLWxvZ28taWNvbjwvdGl0bGU+CiAgICA8ZGVmcz4KICAgICAgICA8bGluZWFyR3JhZGllbnQgeDE9IjIwLjg2MTc0NDUlIiB5MT0iMjAuNjg2ODgxMiUiIHgyPSI2My40MjU2MDg2JSIgeTI9IjQ0LjA3MTAwNzclIiBpZD0ibGluZWFyR3JhZGllbnQtMSI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiMwMDAwMDAiIG9mZnNldD0iMCUiPjwvc3RvcD4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iIzhDOEM4QyIgb2Zmc2V0PSIxMDAlIj48L3N0b3A+CiAgICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgICAgICA8bGluZWFyR3JhZGllbnQgeDE9IjEuOTkxMTY0OTglIiB5MT0iLTEzLjE1ODQwMDglIiB4Mj0iMjEuNDAyNTA3NyUiIHkyPSIzNC43MDgwNjIlIiBpZD0ibGluZWFyR3JhZGllbnQtMiI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiMwMDAwMDAiIG9mZnNldD0iMCUiPjwvc3RvcD4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwIiBvZmZzZXQ9IjEwMCUiPjwvc3RvcD4KICAgICAgICA8L2xpbmVhckdyYWRpZW50PgogICAgPC9kZWZzPgogICAgPGcgaWQ9IlBhZ2UtMSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgaWQ9InN1cGFiYXNlLWxvZ28taWNvbiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMC4wMDAwMDAsIDAuMDAwMDAwKSIgZmlsbC1ydWxlPSJub256ZXJvIj4KICAgICAgICAgICAgPHBhdGggZD0iTTYzLjY4Mjk0MTIsMTEwLjA3MjgxOSBDNjAuODIzNDQxMiwxMTMuNjczODE5IDU1LjAyNTU0MTIsMTExLjcwMDgxOSA1NC45NTY2NDEyLDEwNy4xMDI4MTkgTDUzLjk0OTE0MTIsMzkuODUxNTE5MSBMOTkuMTY4ODQxMiwzOS44NTE1MTkxIEMxMDcuMzU5MzQxLDM5Ljg1MTUxOTEgMTExLjkyNzM0MSw0OS4zMTE2MTkxIDEwNi44MzQzNDEsNTUuNzI2MjE5MSBMNjMuNjgyOTQxMiwxMTAuMDcyODE5IFoiIGlkPSJQYXRoIiBmaWxsPSJ1cmwoI2xpbmVhckdyYWRpZW50LTEpIj48L3BhdGg+CiAgICAgICAgICAgIDxwYXRoIGQ9Ik02My42ODI5NDEyLDExMC4wNzI4MTkgQzYwLjgyMzQ0MTIsMTEzLjY3MzgxOSA1NS4wMjU1NDEyLDExMS43MDA4MTkgNTQuOTU2NjQxMiwxMDcuMTAyODE5IEw1My45NDkxNDEyLDM5Ljg1MTUxOTEgTDk5LjE2ODg0MTIsMzkuODUxNTE5MSBDMTA3LjM1OTM0MSwzOS44NTE1MTkxIDExMS45MjczNDEsNDkuMzExNjE5MSAxMDYuODM0MzQxLDU1LjcyNjIxOTEgTDYzLjY4Mjk0MTIsMTEwLjA3MjgxOSBaIiBpZD0iUGF0aCIgZmlsbC1vcGFjaXR5PSIwLjIiIGZpbGw9InVybCgjbGluZWFyR3JhZGllbnQtMikiPjwvcGF0aD4KICAgICAgICAgICAgPHBhdGggZD0iTTQ1LjI5MjM0MTIsMS44NTk4NDkwNSBDNDguMTUxODQxMiwtMS43NDE1NTA5NSA1My45NDk4NDEyLDAuMjMxNzU2MDUzIDU0LjAxODc0MTIsNC44Mjk4MTkwNSBMNTQuNDYwMjQxMiw3Mi4wODEwMTkxIEw5LjgwNjQ3MTIzLDcyLjA4MTAxOTEgQzEuNjE1NzIxMjMsNzIuMDgxMDE5MSAtMi45NTI0MDg3Nyw2Mi42MjA5MTkxIDIuMTQwODQxMjMsNTYuMjA2MzE5MSBMNDUuMjkyMzQxMiwxLjg1OTg0OTA1IFoiIGlkPSJQYXRoIiBmaWxsPSIjMDAwMDAwIj48L3BhdGg+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4="},{name:"Transform Request Body",isPreview:!0,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/transform-body-inbound/",id:"transform-body-inbound",defaultHandler:{export:"TransformBodyInbound",module:"$import(@zuplo/runtime)",options:{}},exampleHtml:"<div><p>Transform the body of an incoming request.</p></div><h3>Options</h3><ul></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItZWRpdCI+PHBhdGggZD0iTTExIDRINGEyIDIgMCAwIDAtMiAydjE0YTIgMiAwIDAgMCAyIDJoMTRhMiAyIDAgMCAwIDItMnYtNyI+PC9wYXRoPjxwYXRoIGQ9Ik0xOC41IDIuNWEyLjEyMSAyLjEyMSAwIDAgMSAzIDNMMTIgMTVsLTQgMSAxLTQgOS41LTkuNXoiPjwvcGF0aD48L3N2Zz4="},{name:"Transform Response Body",isPreview:!0,isPaidAddOn:!1,isDeprecated:!1,fakePolicyUrl:"https://zuplo.com/docs/policies/custom-code-outbound#writing-a-policy",documentationUrl:"https://zuplo.com/docs/policies/transform-body-outbound/",id:"transform-body-outbound",defaultHandler:{export:"TransformBodyOutbound",module:"$import(@zuplo/runtime)",options:{}},exampleHtml:"<div><p>The best way to transform a response body is using a custom code outbound policy.</p></div><h3>Options</h3><ul></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItZWRpdCI+PHBhdGggZD0iTTExIDRINGEyIDIgMCAwIDAtMiAydjE0YTIgMiAwIDAgMCAyIDJoMTRhMiAyIDAgMCAwIDItMnYtNyI+PC9wYXRoPjxwYXRoIGQ9Ik0xOC41IDIuNWEyLjEyMSAyLjEyMSAwIDAgMSAzIDNMMTIgMTVsLTQgMSAxLTQgOS41LTkuNXoiPjwvcGF0aD48L3N2Zz4="},{name:"Upstream Azure AD Service Auth",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/upstream-azure-ad-service-auth-inbound/",id:"upstream-azure-ad-service-auth-inbound",defaultHandler:{export:"UpstreamAzureAdServiceAuthInboundPolicy",module:"$import(@zuplo/runtime)",options:{activeDirectoryTenantId:"$env(AZURE_AD_TENANT_ID)",activeDirectoryClientId:"$env(AZURE_AD_CLIENT_ID)",activeDirectoryClientSecret:"$env(AZURE_AD_CLIENT_SECRET)"}},exampleHtml:"<div><p>Uses Azure Active Directory to add an Authorization header to the request in order to authenticate requests using Azure identity.</p></div><h3>Options</h3><ul><li><code>activeDirectoryTenantId</code> <div><p>Azure Active Directory Tenant ID.</p></div></li><li><code>activeDirectoryClientId</code> <div><p>The Application (client) ID of the Azure AD App Registration.</p></div></li><li><code>activeDirectoryClientSecret</code> <div><p>The client secret of the Azure AD App Registration.</p></div></li><li><code>tokenRetries</code> <div><p>The number of times to retry fetching the token in the event of a failure. Defaults to 3.</p></div></li><li><code>expirationOffsetSeconds</code> <div><p>The number of seconds less than the token expiration to cache the token. Defaults to 300 seconds.</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAxNTAgMTUwIiBhcmlhLWhpZGRlbj0idHJ1ZSI+CiAgPGcgZmlsdGVyPSJ1cmwoI2ZpbHRlcjBfZF8xXzYpIj4KICAgIDxwYXRoIGZpbGw9InVybCgjcGFpbnQwX2xpbmVhcl8xXzYpIgogICAgICBkPSJNNTIuMDkgMTAuMjI1aDQwLjY4NUw1MC41NDEgMTM1LjM2MWE2LjQ5IDYuNDkgMCAwMS02LjE0NiA0LjQxMkgxMi43MzNhNi40NjggNi40NjggMCAwMS01LjI2Mi0yLjY5OCA2LjQ4MyA2LjQ4MyAwIDAxLS44NzYtNS44NDhsMzkuMzQ5LTExNi41OWE2LjQ4NyA2LjQ4NyAwIDAxNi4xNDctNC40MTJ6IiAvPgogIDwvZz4KICA8ZyBmaWx0ZXI9InVybCgjZmlsdGVyMV9kXzFfNikiPgogICAgPHBhdGggZmlsbD0iIzUyNTU1OCIKICAgICAgZD0iTTExMS4yMTEgOTQuMTU4SDQ2LjY5NWEyLjk4NSAyLjk4NSAwIDAwLTIuMDM5IDUuMTdsNDEuNDU2IDM4LjY5NGE2LjUxMyA2LjUxMyAwIDAwNC40NDcgMS43NTFoMzYuNTMybC0xNS44OC00NS42MTV6IiAvPgogIDwvZz4KICA8ZyBmaWx0ZXI9InVybCgjZmlsdGVyMl9kXzFfNikiPgogICAgPHBhdGggZmlsbD0idXJsKCNwYWludDFfbGluZWFyXzFfNikiCiAgICAgIGQ9Ik01Mi4wOSAxMC4yMjVhNi40MzQgNi40MzQgMCAwMC02LjE2IDQuNDk4TDYuNjQ0IDEzMS4xMmE2LjQ3MSA2LjQ3MSAwIDAwMy4xMiA3LjkzMiA2LjQ2MyA2LjQ2MyAwIDAwMi45ODYuNzIxaDMyLjQ4YTYuOTQgNi45NCAwIDAwNS4zMjgtNC41MzFsNy44MzQtMjMuMDg5IDI3Ljk4NSAyNi4xMDJhNi42MTcgNi42MTcgMCAwMDQuMTY1IDEuNTE4aDM2LjM5NWwtMTUuOTYyLTQ1LjYxNS00Ni41MzMuMDEgMjguNDgtODMuOTQzSDUyLjA5eiIKICAgICAgc2hhcGUtcmVuZGVyaW5nPSJjcmlzcEVkZ2VzIiAvPgogIDwvZz4KICA8ZyBmaWx0ZXI9InVybCgjZmlsdGVyM19kXzFfNikiPgogICAgPHBhdGggZmlsbD0idXJsKCNwYWludDJfbGluZWFyXzFfNikiCiAgICAgIGQ9Ik0xMDQuMDU1IDE0LjYzMWE2LjQ4MiA2LjQ4MiAwIDAwLTYuMTM4LTQuNDA2SDUyLjU3NWE2LjQ3OCA2LjQ3OCAwIDAxNi4xMzcgNC40MDZsMzkuMzUgMTE2LjU5NGE2LjQ4IDYuNDggMCAwMS0zLjE4IDcuODM1IDYuNDczIDYuNDczIDAgMDEtMi45NTcuNzE1aDQ1LjM0NGE2LjQ3MyA2LjQ3MyAwIDAwNS4yNjEtMi43MDEgNi40ODggNi40ODggMCAwMC44NzUtNS44NDlsLTM5LjM1LTExNi41OTR6IiAvPgogIDwvZz4KICA8ZGVmcz4KICAgIDxmaWx0ZXIgaWQ9ImZpbHRlcjBfZF8xXzYiIHdpZHRoPSI5NC41MTkiIGhlaWdodD0iMTM3LjU0OCIgeD0iMi4yNTUiIHk9IjEwLjIyNSIKICAgICAgY29sb3ItaW50ZXJwb2xhdGlvbi1maWx0ZXJzPSJzUkdCIiBmaWx0ZXJVbml0cz0idXNlclNwYWNlT25Vc2UiPgogICAgICA8ZmVGbG9vZCBmbG9vZC1vcGFjaXR5PSIwIiByZXN1bHQ9IkJhY2tncm91bmRJbWFnZUZpeCIgLz4KICAgICAgPGZlQ29sb3JNYXRyaXggaW49IlNvdXJjZUFscGhhIiByZXN1bHQ9ImhhcmRBbHBoYSIKICAgICAgICB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDEyNyAwIiAvPgogICAgICA8ZmVPZmZzZXQgZHk9IjQiIC8+CiAgICAgIDxmZUdhdXNzaWFuQmx1ciBzdGREZXZpYXRpb249IjIiIC8+CiAgICAgIDxmZUNvbXBvc2l0ZSBpbjI9ImhhcmRBbHBoYSIgb3BlcmF0b3I9Im91dCIgLz4KICAgICAgPGZlQ29sb3JNYXRyaXggdmFsdWVzPSIwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwLjI1IDAiIC8+CiAgICAgIDxmZUJsZW5kIGluMj0iQmFja2dyb3VuZEltYWdlRml4IiByZXN1bHQ9ImVmZmVjdDFfZHJvcFNoYWRvd18xXzYiIC8+CiAgICAgIDxmZUJsZW5kIGluPSJTb3VyY2VHcmFwaGljIiBpbjI9ImVmZmVjdDFfZHJvcFNoYWRvd18xXzYiIHJlc3VsdD0ic2hhcGUiIC8+CiAgICA8L2ZpbHRlcj4KICAgIDxmaWx0ZXIgaWQ9ImZpbHRlcjFfZF8xXzYiIHdpZHRoPSI5MS4zODUiIGhlaWdodD0iNTMuNjE2IiB4PSIzOS43MDYiIHk9Ijk0LjE1OCIKICAgICAgY29sb3ItaW50ZXJwb2xhdGlvbi1maWx0ZXJzPSJzUkdCIiBmaWx0ZXJVbml0cz0idXNlclNwYWNlT25Vc2UiPgogICAgICA8ZmVGbG9vZCBmbG9vZC1vcGFjaXR5PSIwIiByZXN1bHQ9IkJhY2tncm91bmRJbWFnZUZpeCIgLz4KICAgICAgPGZlQ29sb3JNYXRyaXggaW49IlNvdXJjZUFscGhhIiByZXN1bHQ9ImhhcmRBbHBoYSIKICAgICAgICB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDEyNyAwIiAvPgogICAgICA8ZmVPZmZzZXQgZHk9IjQiIC8+CiAgICAgIDxmZUdhdXNzaWFuQmx1ciBzdGREZXZpYXRpb249IjIiIC8+CiAgICAgIDxmZUNvbXBvc2l0ZSBpbjI9ImhhcmRBbHBoYSIgb3BlcmF0b3I9Im91dCIgLz4KICAgICAgPGZlQ29sb3JNYXRyaXggdmFsdWVzPSIwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwLjI1IDAiIC8+CiAgICAgIDxmZUJsZW5kIGluMj0iQmFja2dyb3VuZEltYWdlRml4IiByZXN1bHQ9ImVmZmVjdDFfZHJvcFNoYWRvd18xXzYiIC8+CiAgICAgIDxmZUJsZW5kIGluPSJTb3VyY2VHcmFwaGljIiBpbjI9ImVmZmVjdDFfZHJvcFNoYWRvd18xXzYiIHJlc3VsdD0ic2hhcGUiIC8+CiAgICA8L2ZpbHRlcj4KICAgIDxmaWx0ZXIgaWQ9ImZpbHRlcjJfZF8xXzYiIHdpZHRoPSIxMjguNjc0IiBoZWlnaHQ9IjEzNy41NDgiIHg9IjIuMjY0IiB5PSIxMC4yMjUiCiAgICAgIGNvbG9yLWludGVycG9sYXRpb24tZmlsdGVycz0ic1JHQiIgZmlsdGVyVW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KICAgICAgPGZlRmxvb2QgZmxvb2Qtb3BhY2l0eT0iMCIgcmVzdWx0PSJCYWNrZ3JvdW5kSW1hZ2VGaXgiIC8+CiAgICAgIDxmZUNvbG9yTWF0cml4IGluPSJTb3VyY2VBbHBoYSIgcmVzdWx0PSJoYXJkQWxwaGEiCiAgICAgICAgdmFsdWVzPSIwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAxMjcgMCIgLz4KICAgICAgPGZlT2Zmc2V0IGR5PSI0IiAvPgogICAgICA8ZmVHYXVzc2lhbkJsdXIgc3RkRGV2aWF0aW9uPSIyIiAvPgogICAgICA8ZmVDb21wb3NpdGUgaW4yPSJoYXJkQWxwaGEiIG9wZXJhdG9yPSJvdXQiIC8+CiAgICAgIDxmZUNvbG9yTWF0cml4IHZhbHVlcz0iMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMC4yNSAwIiAvPgogICAgICA8ZmVCbGVuZCBpbjI9IkJhY2tncm91bmRJbWFnZUZpeCIgcmVzdWx0PSJlZmZlY3QxX2Ryb3BTaGFkb3dfMV82IiAvPgogICAgICA8ZmVCbGVuZCBpbj0iU291cmNlR3JhcGhpYyIgaW4yPSJlZmZlY3QxX2Ryb3BTaGFkb3dfMV82IiByZXN1bHQ9InNoYXBlIiAvPgogICAgPC9maWx0ZXI+CiAgICA8ZmlsdGVyIGlkPSJmaWx0ZXIzX2RfMV82IiB3aWR0aD0iOTkuMTciIGhlaWdodD0iMTM3LjU1IiB4PSI0OC41NzUiIHk9IjEwLjIyNSIKICAgICAgY29sb3ItaW50ZXJwb2xhdGlvbi1maWx0ZXJzPSJzUkdCIiBmaWx0ZXJVbml0cz0idXNlclNwYWNlT25Vc2UiPgogICAgICA8ZmVGbG9vZCBmbG9vZC1vcGFjaXR5PSIwIiByZXN1bHQ9IkJhY2tncm91bmRJbWFnZUZpeCIgLz4KICAgICAgPGZlQ29sb3JNYXRyaXggaW49IlNvdXJjZUFscGhhIiByZXN1bHQ9ImhhcmRBbHBoYSIKICAgICAgICB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDEyNyAwIiAvPgogICAgICA8ZmVPZmZzZXQgZHk9IjQiIC8+CiAgICAgIDxmZUdhdXNzaWFuQmx1ciBzdGREZXZpYXRpb249IjIiIC8+CiAgICAgIDxmZUNvbXBvc2l0ZSBpbjI9ImhhcmRBbHBoYSIgb3BlcmF0b3I9Im91dCIgLz4KICAgICAgPGZlQ29sb3JNYXRyaXggdmFsdWVzPSIwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwLjI1IDAiIC8+CiAgICAgIDxmZUJsZW5kIGluMj0iQmFja2dyb3VuZEltYWdlRml4IiByZXN1bHQ9ImVmZmVjdDFfZHJvcFNoYWRvd18xXzYiIC8+CiAgICAgIDxmZUJsZW5kIGluPSJTb3VyY2VHcmFwaGljIiBpbjI9ImVmZmVjdDFfZHJvcFNoYWRvd18xXzYiIHJlc3VsdD0ic2hhcGUiIC8+CiAgICA8L2ZpbHRlcj4KICAgIDxsaW5lYXJHcmFkaWVudCBpZD0icGFpbnQwX2xpbmVhcl8xXzYiIHgxPSI2Ni45MTkiIHgyPSIyNC42NjciIHkxPSIxOS44MjUiIHkyPSIxNDQuNjQ3IgogICAgICBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CiAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiMyNzI5MkMiIC8+CiAgICAgIDxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzVFNjA2MiIgLz4KICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgICA8bGluZWFyR3JhZGllbnQgaWQ9InBhaW50MV9saW5lYXJfMV82IiB4MT0iODAuMTE3IiB4Mj0iNzAuMzQ0IiB5MT0iNzcuOTk1IiB5Mj0iODEuMyIKICAgICAgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgogICAgICA8c3RvcCBzdG9wLW9wYWNpdHk9Ii4zIiAvPgogICAgICA8c3RvcCBvZmZzZXQ9Ii4wNzEiIHN0b3Atb3BhY2l0eT0iLjIiIC8+CiAgICAgIDxzdG9wIG9mZnNldD0iLjMyMSIgc3RvcC1vcGFjaXR5PSIuMSIgLz4KICAgICAgPHN0b3Agb2Zmc2V0PSIuNjIzIiBzdG9wLW9wYWNpdHk9Ii4wNSIgLz4KICAgICAgPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLW9wYWNpdHk9IjAiIC8+CiAgICA8L2xpbmVhckdyYWRpZW50PgogICAgPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDJfbGluZWFyXzFfNiIgeDE9Ijc0Ljc0MiIgeDI9IjEyMS4xMjIiIHkxPSIxNi4xODQiIHkyPSIxMzkuNzQ4IgogICAgICBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CiAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiM5Q0EwQTAiIC8+CiAgICAgIDxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzNENDA0MyIgLz4KICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgPC9kZWZzPgo8L3N2Zz4="},{name:"Upstream Firebase Admin Auth",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/upstream-firebase-admin-auth-inbound/",id:"upstream-firebase-admin-auth-inbound",defaultHandler:{export:"UpstreamFirebaseAdminAuthInboundPolicy",module:"$import(@zuplo/runtime)",options:{serviceAccountJson:"$env(SERVICE_ACCOUNT_JSON)"}},exampleHtml:"<div><p>Creates a Firebase Admin token and attaches it to the outgoing request. Useful when calling Firebase services as an administrator.</p></div><h3>Options</h3><ul><li><code>serviceAccountJson</code> <div><p>The Google Service Account key in JSON format. Note you can load this from environment variables using the $env(ENV_VAR) syntax.</p></div></li><li><code>tokenRetries</code> <div><p>The number of times to retry fetching the token in the event of a failure. Defaults to 3.</p></div></li><li><code>expirationOffsetSeconds</code> <div><p>The number of seconds less than the token expiration to cache the token. Defaults to 300 seconds.</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMjA0cHgiIGhlaWdodD0iMjA0cHgiIHZpZXdCb3g9IjAgMCAyMDQgMjA0IiB2ZXJzaW9uPSIxLjEiCiAgICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDx0aXRsZT5maXJlYmFzZV9pY29uPC90aXRsZT4KICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSJmaXJlYmFzZV9pY29uIj4KICAgICAgICAgICAgPHJlY3QgaWQ9IlJlY3RhbmdsZSIgeD0iMCIgeT0iMCIgd2lkdGg9IjIwNCIgaGVpZ2h0PSIyMDQiPjwvcmVjdD4KICAgICAgICAgICAgPHBhdGgKICAgICAgICAgICAgICAgIGQ9Ik00Mi4yLDEyOC45IEw1OS42LDE3LjQgQzYwLjIsMTMuNiA2NS4zLDEyLjcgNjcuMSwxNi4xIEw4NS44LDUxLjEgTDQyLjIsMTI4LjkgWiBNMTY1LjksMTU2IEwxNDkuMyw1My4zIEMxNDguOCw1MC4xIDE0NC44LDQ4LjggMTQyLjUsNTEuMSBMMzcuOSwxNTYgTDk1LjgsMTg4LjUgQzk5LjQsMTkwLjUgMTAzLjksMTkwLjUgMTA3LjUsMTg4LjUgTDE2NS45LDE1NiBaIE0xMTguOSw2Ni40IEwxMDUuNSw0MC45IEMxMDQsMzggOTkuOSwzOCA5OC40LDQwLjkgTDM5LjUsMTQ1LjkgTDExOC45LDY2LjQgWiIKICAgICAgICAgICAgICAgIGlkPSJpY29uXzFfIiBmaWxsPSIjMDAwMDAwIiBmaWxsLXJ1bGU9Im5vbnplcm8iPjwvcGF0aD4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg=="},{name:"Upstream Firebase User Auth",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/upstream-firebase-user-auth-inbound/",id:"upstream-firebase-user-auth-inbound",defaultHandler:{export:"UpstreamFirebaseUserAuthInboundPolicy",module:"$import(@zuplo/runtime)",options:{serviceAccountJson:"$env(SERVICE_ACCOUNT_JSON)",webApiKey:"$env(WEB_API_KEY)",userId:"1234",developerClaims:{premium:!0}}},exampleHtml:"<div><p>Creates a Firebase custom user token and attaches it to the outgoing request. Useful when calling Firebase services as user.</p></div><h3>Options</h3><ul><li><code>serviceAccountJson</code> <div><p>The Google Service Account key in JSON format. Note you can load this from environment variables using the $env(ENV_VAR) syntax.</p></div></li><li><code>userId</code> <div><p>The userId to use as the custom token's subject.</p></div></li><li><code>userIdPropertyPath</code> <div><p>The property on the incoming request.user object to retrieve the value of the userId</p></div></li><li><code>developerClaims</code> <div><p>Optional additional claims to include in the custom token's payload.</p></div></li><li><code>webApiKey</code> <div><p>The Firebase Web API Key (found in project settings)</p></div></li><li><code>tokenRetries</code> <div><p>The number of times to retry fetching the token in the event of a failure. Defaults to 3.</p></div></li><li><code>expirationOffsetSeconds</code> <div><p>The number of seconds less than the token expiration to cache the token. Defaults to 300 seconds.</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMjA0cHgiIGhlaWdodD0iMjA0cHgiIHZpZXdCb3g9IjAgMCAyMDQgMjA0IiB2ZXJzaW9uPSIxLjEiCiAgICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDx0aXRsZT5maXJlYmFzZV9pY29uPC90aXRsZT4KICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSJmaXJlYmFzZV9pY29uIj4KICAgICAgICAgICAgPHJlY3QgaWQ9IlJlY3RhbmdsZSIgeD0iMCIgeT0iMCIgd2lkdGg9IjIwNCIgaGVpZ2h0PSIyMDQiPjwvcmVjdD4KICAgICAgICAgICAgPHBhdGgKICAgICAgICAgICAgICAgIGQ9Ik00Mi4yLDEyOC45IEw1OS42LDE3LjQgQzYwLjIsMTMuNiA2NS4zLDEyLjcgNjcuMSwxNi4xIEw4NS44LDUxLjEgTDQyLjIsMTI4LjkgWiBNMTY1LjksMTU2IEwxNDkuMyw1My4zIEMxNDguOCw1MC4xIDE0NC44LDQ4LjggMTQyLjUsNTEuMSBMMzcuOSwxNTYgTDk1LjgsMTg4LjUgQzk5LjQsMTkwLjUgMTAzLjksMTkwLjUgMTA3LjUsMTg4LjUgTDE2NS45LDE1NiBaIE0xMTguOSw2Ni40IEwxMDUuNSw0MC45IEMxMDQsMzggOTkuOSwzOCA5OC40LDQwLjkgTDM5LjUsMTQ1LjkgTDExOC45LDY2LjQgWiIKICAgICAgICAgICAgICAgIGlkPSJpY29uXzFfIiBmaWxsPSIjMDAwMDAwIiBmaWxsLXJ1bGU9Im5vbnplcm8iPjwvcGF0aD4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg=="},{name:"Upstream GCP Self-Signed JWT",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/upstream-gcp-jwt-inbound/",id:"upstream-gcp-jwt-inbound",defaultHandler:{export:"UpstreamGcpJwtInboundPolicy",module:"$import(@zuplo/runtime)",options:{audience:"your_gcp_service.endpoint.com",serviceAccountJson:"$env(SERVICE_ACCOUNT_JSON)"}},exampleHtml:'<div><p>Creates a self-signed JWT token (generated using a Google Service Account JSON) and attaches it to the outgoing request. Useful when calling GCP services like Cloud Endpoints / ESPv2</p></div><h3>Options</h3><ul><li><code>audience</code> <div><p>The audience for the minted JWT. Refer to <a href="https://cloud.google.com/endpoints/docs/grpc-service-config/reference/rpc/google.api#google.api.AuthRequirement">https://cloud.google.com/endpoints/docs/grpc-service-config/reference/rpc/google.api#google.api.AuthRequirement</a>.</p></div></li><li><code>serviceAccountJson</code> <div><p>The Google Service Account key in JSON format. Note you can load this from environment variables using the $env(ENV_VAR) syntax.</p></div></li></ul> ',icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjMiIHZpZXdCb3g9IjAgMCAyNCAyMyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cGF0aCBkPSJNMTUgOUg5TDggMTFMOSAxM0gxNUwxNiAxMUwxNSA5WiIgZmlsbD0iIzczNzM3MyIgLz4KICA8cGF0aCBkPSJNMTYgMTFMMTUgOUg5LjUxSDlMOCAxMUgxNloiIGZpbGw9IiM5QTlGQTgiIC8+CiAgPHBhdGggZD0iTTE4IDVIMTVMMTguOTcgMTFMMjAuNDcgOC43NUwxOCA1WiIgZmlsbD0iIzczNzM3MyIgLz4KICA8cGF0aCBkPSJNMjEuOTUgMTFMMjAuNDcgOC43NUwxOC45NyAxMUwxNSAxN0gxOEwyMS45NSAxMVoiIGZpbGw9IiM5QTlGQTgiIC8+CiAgPHBhdGggZD0iTTUuOTUgMTdIOC45NUw0Ljk4IDExTDMuNDggMTMuMjVMNS45NSAxN1oiIGZpbGw9IiM3MzczNzMiIC8+CiAgPHBhdGggZD0iTTIgMTFMMy40OCAxMy4yNUw0Ljk4IDExTDguOTUgNUg1Ljk1TDIgMTFaIiBmaWxsPSIjOUE5RkE4IiAvPgo8L3N2Zz4="},{name:"Upstream GCP Service Auth",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/upstream-gcp-service-auth-inbound/",id:"upstream-gcp-service-auth-inbound",defaultHandler:{export:"UpstreamGcpServiceAuthInboundPolicy",module:"$import(@zuplo/runtime)",options:{audience:"https://my-service-a2ev-uc.a.run.app",serviceAccountJson:"$env(SERVICE_ACCOUNT_JSON)"}},exampleHtml:`<div><p>Creates an ID Token from Google's OAuth service and attaches it to the outgoing request. Useful when calling GCP services that are secured with GCP IAM.</p></div><h3>Options</h3><ul><li><code>audience</code> <div><p>The audience for the service to be called. This is typically the URL of your service endpoint like '<a href="https://my-service-a2ev-uc.a.run.app">https://my-service-a2ev-uc.a.run.app</a>'</p></div></li><li><code>serviceAccountJson</code> <div><p>The Google Service Account key in JSON format. Note you can load this from environment variables using the $env(ENV_VAR) syntax.</p></div></li><li><code>tokenRetries</code> <div><p>The number of times to retry fetching the token in the event of a failure. Defaults to 3.</p></div></li><li><code>expirationOffsetSeconds</code> <div><p>The number of seconds less than the token expiration to cache the token. Defaults to 300 seconds.</p></div></li></ul> `,icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0NjEgMzcxIiBhcmlhLWhpZGRlbj0idHJ1ZSI+CiAgPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzFfMikiPgogICAgPHBhdGggZmlsbD0iIzczNzM3MyIKICAgICAgZD0iTTI5Mi4yNyAxMDIuMTVoMTQuMDQzbDQwLjAyNC00MC4wMjQgMS45NjYtMTYuOTkyYTE3OS44OTcgMTc5Ljg5NyAwIDAwLTI0Ny45MTkgOS4zNjEgMTc5Ljg5OCAxNzkuODk4IDAgMDAtNDQuNzQyIDc4LjQwOSAyMS43NjYgMjEuNzY2IDAgMDExNC4wNDMtLjg0Mmw4MC4wNDYtMTMuMjAxczQuMDczLTYuNzQxIDYuMTc5LTYuMzE5YTk5Ljg1IDk5Ljg1IDAgMDExMzYuNjQxLTEwLjM5MmgtLjI4MXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjN0Q3RDdEIgogICAgICBkPSJNNDAzLjM1MiAxMzIuOTA0YTE4MC4zMDggMTgwLjMwOCAwIDAwLTU0LjM0Ny04Ny42M2wtNTYuMTczIDU2LjE3M2E5OS44NSA5OS44NSAwIDAxMzYuNjUzIDc5LjIwNHY5Ljk3MWE0OS45ODcgNDkuOTg3IDAgMDEzNS4zNTEgMTQuNjQzIDQ5Ljk5MyA0OS45OTMgMCAwMS0zNS4zNTEgODUuMzQ1aC05OS45ODhsLTkuOTcxIDEwLjExMXY1OS45NjVsOS45NzEgOS45NzFoOTkuOTg4YTEzMC4wNDQgMTMwLjA0NCAwIDAwMTI1LjE5Ny05MS40NTQgMTMwLjAzNiAxMzAuMDM2IDAgMDAtNTEuMzMtMTQ2LjI5OXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjN0Q3RDdEIgogICAgICBkPSJNMTI5LjM2OSAzNzAuMDk1aDk5Ljk4OHYtODAuMDQ3aC05OS45ODhhNDkuNzAyIDQ5LjcwMiAwIDAxLTIwLjY0NC00LjQ5NGwtMTQuMDQzIDQuMzU0LTQwLjMwNCA0MC4wMjMtMy41MTEgMTQuMDQzYTEyOS4zMzcgMTI5LjMzNyAwIDAwNzguNTAyIDI2LjEyMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQkFCQUJBIgogICAgICBkPSJNMTI5LjM2OSAxMTAuNDM1QTEzMC4wMzcgMTMwLjAzNyAwIDAwNi45MDUgMTk4Ljk3MmExMzAuMDQyIDEzMC4wNDIgMCAwMDQzLjk2MiAxNDQuNTgxbDU3Ljk5OC01Ny45OTlhNDkuOTg2IDQ5Ljk4NiAwIDAxLTI4LjU5Ny0zNi41ODMgNDkuOTk2IDQ5Ljk5NiAwIDAxNTguMTU3LTU4LjE1OCA0OS45OTIgNDkuOTkyIDAgMDEzNi41ODQgMjguNTk4bDU3Ljk5OS01Ny45OTlhMTI5LjkgMTI5LjkgMCAwMC0xMDMuNjM5LTUwLjk3N3oiIC8+CiAgPC9nPgogIDxkZWZzPgogICAgPGNsaXBQYXRoIGlkPSJjbGlwMF8xXzIiPgogICAgICA8cGF0aCBmaWxsPSIjZmZmIiBkPSJNMCAwaDQ2MXYzNzFIMHoiIC8+CiAgICA8L2NsaXBQYXRoPgogIDwvZGVmcz4KPC9zdmc+"},{name:"JSON Body Validation (legacy)",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/validate-json-schema-inbound/",id:"validate-json-schema-inbound",defaultHandler:{export:"ValidateJsonSchemaInbound",module:"$import(@zuplo/runtime)",options:{validator:"$import(./schemas/example-schema.json)"}},exampleHtml:"<div><p>Validates the body of an incoming request based on a JSON schema.</p></div><h3>Options</h3><ul></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItY2hlY2stc3F1YXJlIj48cG9seWxpbmUgcG9pbnRzPSI5IDExIDEyIDE0IDIyIDQiPjwvcG9seWxpbmU+PHBhdGggZD0iTTIxIDEydjdhMiAyIDAgMCAxLTIgMkg1YTIgMiAwIDAgMS0yLTJWNWEyIDIgMCAwIDEgMi0yaDExIj48L3BhdGg+PC9zdmc+"},{name:"A/B Test Inbound",isPreview:!0,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/ab-test-inbound/",id:"ab-test-inbound",defaultHandler:{export:"ABTestInbound",module:"$import(@zuplo/runtime)",options:{testKey:"${user.sub}",modifier:{module:"$import(./modules/ab-test)",export:"abTestModifier"}}},exampleHtml:"<div><p>The A/B test policy is used to handle requests differently based on parameters such as user, ip, etc.</p></div><h3>Options</h3><ul><li><code>testKey</code> <div><p>The key to use for determining the group the request belongs</p></div></li><li><code>modifier</code> <div><p>The function that modifies the request based on the test key</p></div><ul><li><code>export</code> <div><p>Specifies the export to load your function, e.g. <code>default</code>, <code>myFunction</code>.</p></div></li><li><code>module</code> <div><p>Specifies the module to load your function, in the format <code>$import(./modules/my-module)</code></p></div></li></ul></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItc2VuZCI+PGxpbmUgeDE9IjIyIiB5MT0iMiIgeDI9IjExIiB5Mj0iMTMiPjwvbGluZT48cG9seWdvbiBwb2ludHM9IjIyIDIgMTUgMjIgMTEgMTMgMiA5IDIyIDIiPjwvcG9seWdvbj48L3N2Zz4="},{name:"Access Control List Inbound",isPreview:!0,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/acl-policy-inbound/",id:"acl-policy-inbound",defaultHandler:{export:"AClPolicyInbound",module:"$import(@zuplo/runtime)",options:{testKey:"${user.sub}",modifier:{module:"$import(./modules/ab-test)",export:"abTestModifier"}}},exampleHtml:"<div><p>The access control list inbound policy limits access to resources based on parameters of the request</p></div><h3>Options</h3><ul><li><code>policies</code> <div><p>The policies to enforce for the request</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItdXNlci1jaGVjayI+PHBhdGggZD0iTTE2IDIxdi0yYTQgNCAwIDAgMC00LTRINWE0IDQgMCAwIDAtNCA0djIiPjwvcGF0aD48Y2lyY2xlIGN4PSI4LjUiIGN5PSI3IiByPSI0Ij48L2NpcmNsZT48cG9seWxpbmUgcG9pbnRzPSIxNyAxMSAxOSAxMyAyMyA5Ij48L3BvbHlsaW5lPjwvc3ZnPg=="},{name:"Audit Logs Inbound",isPreview:!0,isPaidAddOn:!0,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/audit-log-inbound/",id:"audit-log-inbound",defaultHandler:{export:"AuditLogsInboundPolicy",module:"$import(@zuplo/runtime)",options:{logIpAddress:!0,logUser:!0,logGeolocation:!0,logQueryParameters:!0,logRouteParameters:!0,tenant:"${params.tenantId}",metadata:{module:"$import(./modules/audit-logs)",export:"auditLogData"}}},exampleHtml:"<div><p>Capture detailed logs of requests for auditing purposes</p></div><h3>Options</h3><ul><li><code>logIpAddress</code> <div><p>if the IP address should be logged</p></div></li><li><code>logUser</code> <div><p>if the user's <code>sub</code> should be logged</p></div></li><li><code>logGeolocation</code> <div><p>if the geolocation information should be logged (i.e. state, country, longitude, latitude, etc.)</p></div></li><li><code>logQueryParameters</code> <div><p>log the values of query parameters</p></div></li><li><code>logRouteParameters</code> <div></div></li><li><code>tenant</code> <div><p>if the route parameters should be logged (i.e. the value of <code>customerId</code> in the route <code>/customers/:customerId</code>)</p></div></li><li><code>metadata</code> <div><p>A function to add additional data to the audit logs</p></div><ul><li><code>export</code> <div><p>Specifies the export to load your function, e.g. <code>default</code>, <code>myFunction</code>.</p></div></li><li><code>module</code> <div><p>Specifies the module to load your function, in the format <code>$import(./modules/my-module)</code></p></div></li></ul></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGNsYXNzPSJoLTYgdy02IiBmaWxsPSJub25lIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjIiPjxwYXRoIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTcgNHYxNk0xNyA0djE2TTMgOGg0bTEwIDBoNE0zIDEyaDE4TTMgMTZoNG0xMCAwaDRNNCAyMGgxNmExIDEgMCAwMDEtMVY1YTEgMSAwIDAwLTEtMUg0YTEgMSAwIDAwLTEgMXYxNGExIDEgMCAwMDEgMXoiIC8+PC9zdmc+"}],JM={config:wB,policies:bB};function XM(){return JM.policies}function jl(e){const t=XM(),n=JM.config.legacyIdMaps;return n[e]?t.find(r=>r.id===n[e]):t.find(r=>r.id===e)}const Oy="-",xB="There's already a policy with this name",MB="Policy name can't be empty",SB=(e,t)=>{if(!t)return"";const n=e==null?void 0:e.filter(a=>a.name&&a.name.startsWith(t)).sort((a,l)=>a.name.localeCompare(l.name));if(!n||n.length===0)return t;const r=n.at(-1);if(!r)return t;const i=r.name.split(Oy).at(-1);if(!i)return t;let o=parseInt(i);return isNaN(o)&&(o=0),`${t}${Oy}${o+1}`},NB=(e,t)=>e?t.find(r=>r.name===e)?xB:null:MB,qM=e=>e.replace(/ /g,""),DB=({existingConfig:e,onComplete:t,onCancel:n,policyManager:r})=>{const i=r.getPolicyListEnforced(),o=e.policyType,a=jl(o),[l,s]=v.useState(e.name),[u,c]=v.useState(null),[d,f]=v.useState(null),p=v.useRef();if(v.useEffect(()=>{(x=>{if(x===e.name){c(null);return}c(NB(x,i))})(l)},[e.name,l,i]),!a)return null;const g=b=>{const x={...e,handler:b,name:l};r.updatePolicy(e.name,x)},h=()=>{var x;const b=(x=p.current)==null?void 0:x.getValue();if(!(!o||!b))try{const N=JSON.parse(b);g(N),t()}catch(N){f(N.message)}},w=b=>{s(qM(b.toLowerCase()))};function I(b){p.current=b}const y=!!u;return m.jsxs("div",{className:"flex flex-col w-full",children:[m.jsx("div",{className:"pl-24 max-w-lg mt-4",children:m.jsx(QM,{name:l,onChangeName:w,policyTypeInformation:{documentationUrl:a.documentationUrl,typeName:a.name},validationErrorName:u,disabled:!1})}),m.jsxs("div",{className:"grid grid-cols-2 h-64 mt-4 mb-4",children:[m.jsxs(Au,{label:"Configuration",classNameLabel:"ml-6",children:[m.jsx(ZM,{options:{hideCursorInOverviewRuler:!0,minimap:{enabled:!1},overviewRulerBorder:!1,overviewRulerLanes:0,readOnly:!1,renderLineHighlight:"none",roundedSelection:!1,scrollBeyondLastLine:!1},className:ae("h-60",{"border-2 border-red-500":!!d}),width:"100%",language:"json",onMount:I,defaultValue:JSON.stringify(e.handler,void 0,CM)}),d?m.jsx("p",{className:"text-red-500 ml-2 mt-1",children:d}):null]}),m.jsx(Au,{label:"Usage",classNameLabel:"ml-2",children:a.exampleHtml?m.jsx(Og,{documentationSrc:a.exampleHtml}):m.jsxs("div",{className:"bg-gray-100 h-60 text-center flex flex-col items-center justify-center",children:[bi.COMING_SOON.icon,m.jsx("div",{children:bi.COMING_SOON.defaultTitle})]})})]}),m.jsx(YM,{onConfirm:h,onCancel:n,isDisabled:y,mustRequestAccess:!1})]})},AB=({isReadOnly:e,policy:t,onDelete:n,index:r})=>{const i=()=>l(),o=()=>d(),a=El(),[l,s]=ho(()=>{const h=()=>{n(r),s()};return m.jsx(Ap,{hideModal:s,alertType:"REMOVE",bodyText:"Are you sure you want to remove this policy from this route? This will not delete the policy",primaryButtonText:"Confirm",secondaryButtonText:"Cancel",onPrimaryButtonClick:h,onSecondaryButtonClick:s,primaryButtonTestID:`confirm-remove-policy-btn-${t}`})},[n,r]),c=a.getPolicyListEnforced().find(h=>h.name===t),[d,f]=ho(()=>{if(!c)throw new Error(`Cannot edit policy: ${t} - policy not found in policies config list `);return m.jsx(BM,{title:"Edit Policy",isOpen:!0,setIsOpen:f,children:m.jsx(DB,{existingConfig:c,onComplete:f,onCancel:f,policyManager:a})})},[c]),p=c?jl(c.policyType):void 0,g=!p;return m.jsxs("div",{className:ae("h-full w-full max-w-full flex bg-white rounded-md border drop-shadow-sm min-w-0",{"border-gray-200":!g,"border-red-500":g,"bg-gray-200":e}),children:[e?m.jsx("div",{className:"w-1",children:" "}):m.jsxs("div",{className:"flex bg-white rounded-l-md items-center pl-1 text-gray-400",children:[m.jsx(Fd,{className:"w-4"}),m.jsx(Fd,{className:"w-4 -ml-[0.7rem]"}),m.jsx(Fd,{className:"w-4 -ml-[0.72rem]"})]}),m.jsxs("div",{className:"flex grow items-center self-center pr-2 col-span-1 max-w-full min-w-0",children:[!g&&m.jsx("img",{className:"w-5 h-5 mx-2 hidden 2xl:inline",src:p.icon,alt:p.name}),m.jsx("p",{"data-test":`policy-designer-policy-name-${t}`,className:ae("flex grow max-w-full text-sm h-full truncate",{"text-red-600":g}),children:g?`Invalid Policy: ${t}`:t})]}),e?m.jsx("div",{className:"rounded-r w-[1px] h-8",children:" "}):m.jsxs("div",{className:"flex bg-gray-200 h-full rounded",children:[m.jsx("button",{type:"button",disabled:g,onClick:o,"data-test":`policy-designer-edit-policy-btn-${t}`,className:ae("flex h-full px-2 bg-gray-200 border-gray-300 border-l py-2",{"cursor-not-allowed":g,"hover:bg-gray-300":!g}),children:m.jsx(ZC,{className:"w-4 h-4"})}),m.jsx("button",{type:"button",disabled:e,onClick:i,"data-test":`policy-designer-remove-policy-btn-${t}`,className:ae("flex h-full px-2 bg-gray-200 border-gray-300 border-l py-2 rounded-r hover:bg-gray-300"),children:m.jsx(MC,{className:"w-4 h-4"})})]})]})};function _p(e,t){return _p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},_p(e,t)}function KM(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,_p(e,t)}function le(){return le=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},le.apply(this,arguments)}function qa(e){"@babel/helpers - typeof";return qa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qa(e)}function CB(e,t){if(qa(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(qa(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function EB(e){var t=CB(e,"string");return qa(t)==="symbol"?t:String(t)}function TB(e,t,n){return t=EB(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ky(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function zy(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ky(Object(n),!0).forEach(function(r){TB(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ky(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zt(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var By=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),df=function(){return Math.random().toString(36).substring(7).split("").join(".")},Uy={INIT:"@@redux/INIT"+df(),REPLACE:"@@redux/REPLACE"+df(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+df()}};function jB(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function eS(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(zt(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(zt(1));return n(eS)(e,t)}if(typeof e!="function")throw new Error(zt(2));var i=e,o=t,a=[],l=a,s=!1;function u(){l===a&&(l=a.slice())}function c(){if(s)throw new Error(zt(3));return o}function d(h){if(typeof h!="function")throw new Error(zt(4));if(s)throw new Error(zt(5));var w=!0;return u(),l.push(h),function(){if(w){if(s)throw new Error(zt(6));w=!1,u();var y=l.indexOf(h);l.splice(y,1),a=null}}}function f(h){if(!jB(h))throw new Error(zt(7));if(typeof h.type>"u")throw new Error(zt(8));if(s)throw new Error(zt(9));try{s=!0,o=i(o,h)}finally{s=!1}for(var w=a=l,I=0;I<w.length;I++){var y=w[I];y()}return h}function p(h){if(typeof h!="function")throw new Error(zt(10));i=h,f({type:Uy.REPLACE})}function g(){var h,w=d;return h={subscribe:function(y){if(typeof y!="object"||y===null)throw new Error(zt(11));function b(){y.next&&y.next(c())}b();var x=w(b);return{unsubscribe:x}}},h[By]=function(){return this},h}return f({type:Uy.INIT}),r={dispatch:f,subscribe:d,getState:c,replaceReducer:p},r[By]=g,r}function $y(e,t){return function(){return t(e.apply(this,arguments))}}function _y(e,t){if(typeof e=="function")return $y(e,t);if(typeof e!="object"||e===null)throw new Error(zt(16));var n={};for(var r in e){var i=e[r];typeof i=="function"&&(n[r]=$y(i,t))}return n}function tS(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.length===0?function(r){return r}:t.length===1?t[0]:t.reduce(function(r,i){return function(){return r(i.apply(void 0,arguments))}})}function PB(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return function(){var i=r.apply(void 0,arguments),o=function(){throw new Error(zt(15))},a={getState:i.getState,dispatch:function(){return o.apply(void 0,arguments)}},l=t.map(function(s){return s(a)});return o=tS.apply(void 0,l)(i.dispatch),zy(zy({},i),{},{dispatch:o})}}}var nS=k.createContext(null);function LB(e){e()}var rS=LB,RB=function(t){return rS=t},OB=function(){return rS};function kB(){var e=OB(),t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e(function(){for(var i=t;i;)i.callback(),i=i.next})},get:function(){for(var i=[],o=t;o;)i.push(o),o=o.next;return i},subscribe:function(i){var o=!0,a=n={callback:i,next:null,prev:n};return a.prev?a.prev.next=a:t=a,function(){!o||t===null||(o=!1,a.next?a.next.prev=a.prev:n=a.prev,a.prev?a.prev.next=a.next:t=a.next)}}}}var Fy={notify:function(){},get:function(){return[]}};function iS(e,t){var n,r=Fy;function i(d){return s(),r.subscribe(d)}function o(){r.notify()}function a(){c.onStateChange&&c.onStateChange()}function l(){return!!n}function s(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=kB())}function u(){n&&(n(),n=void 0,r.clear(),r=Fy)}var c={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:l,trySubscribe:s,tryUnsubscribe:u,getListeners:function(){return r}};return c}var oS=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?v.useLayoutEffect:v.useEffect;function zB(e){var t=e.store,n=e.context,r=e.children,i=v.useMemo(function(){var l=iS(t);return{store:t,subscription:l}},[t]),o=v.useMemo(function(){return t.getState()},[t]);oS(function(){var l=i.subscription;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),o!==t.getState()&&l.notifyNestedSubs(),function(){l.tryUnsubscribe(),l.onStateChange=null}},[i,o]);var a=n||nS;return k.createElement(a.Provider,{value:i},r)}function Cu(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var aS={exports:{}},De={};/** @license React v16.13.1
96
+ `},Ry=B3(F3)(Ub),H3={config:$3},G3=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(i){return n.reduceRight(function(o,a){return a(o)},i)}};function $b(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],$b(e[n],t[n]))}),Ty(Ty({},e),t)}var W3={type:"cancelation",msg:"operation is manually canceled"};function sf(e){var t=!1,n=new Promise(function(r,i){e.then(function(o){return t?i(W3):r(o)}),e.catch(i)});return n.cancel=function(){return t=!0},n}var V3=k3.create({config:z3,isInitialized:!1,resolve:null,reject:null,monaco:null}),_b=v3(V3,2),Tl=_b[0],_c=_b[1];function Z3(e){var t=H3.config(e),n=t.monaco,r=h3(t,["monaco"]);_c(function(i){return{config:$b(i.config,r),monaco:n}})}function Y3(){var e=Tl(function(t){var n=t.monaco,r=t.isInitialized,i=t.resolve;return{monaco:n,isInitialized:r,resolve:i}});if(!e.isInitialized){if(_c({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),sf(uf);if(window.monaco&&window.monaco.editor)return Fb(window.monaco),e.resolve(window.monaco),sf(uf);G3(Q3,X3)(q3)}return sf(uf)}function Q3(e){return document.body.appendChild(e)}function J3(e){var t=document.createElement("script");return e&&(t.src=e),t}function X3(e){var t=Tl(function(r){var i=r.config,o=r.reject;return{config:i,reject:o}}),n=J3("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function q3(){var e=Tl(function(n){var r=n.config,i=n.resolve,o=n.reject;return{config:r,resolve:i,reject:o}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(n){Fb(n),e.resolve(n)},function(n){e.reject(n)})}function Fb(e){Tl().monaco||_c({monaco:e})}function K3(){return Tl(function(e){var t=e.monaco;return t})}var uf=new Promise(function(e,t){return _c({resolve:e,reject:t})}),Hb={config:Z3,init:Y3,__getMonacoInstance:K3},eB={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},cf=eB,tB={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},nB=tB;function rB({children:e}){return k.createElement("div",{style:nB.container},e)}var iB=rB,oB=iB;function aB({width:e,height:t,isEditorReady:n,loading:r,_ref:i,className:o,wrapperProps:a}){return k.createElement("section",{style:{...cf.wrapper,width:e,height:t},...a},!n&&k.createElement(oB,null,r),k.createElement("div",{ref:i,style:{...cf.fullWidth,...!n&&cf.hide},className:o}))}var lB=aB,Gb=v.memo(lB);function sB(e){v.useEffect(e,[])}var Wb=sB;function uB(e,t,n=!0){let r=v.useRef(!0);v.useEffect(r.current||!n?()=>{r.current=!1}:e,t)}var Yt=uB;function Ca(){}function Ji(e,t,n,r){return cB(e,r)||dB(e,t,n,r)}function cB(e,t){return e.editor.getModel(Vb(e,t))}function dB(e,t,n,r){return e.editor.createModel(t,n,r?Vb(e,r):void 0)}function Vb(e,t){return e.Uri.parse(t)}function fB({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:i,originalModelPath:o,modifiedModelPath:a,keepCurrentOriginalModel:l=!1,keepCurrentModifiedModel:s=!1,theme:u="light",loading:c="Loading...",options:d={},height:f="100%",width:p="100%",className:g,wrapperProps:h={},beforeMount:w=Ca,onMount:I=Ca}){let[y,M]=v.useState(!1),[x,S]=v.useState(!0),b=v.useRef(null),N=v.useRef(null),C=v.useRef(null),P=v.useRef(I),R=v.useRef(w),O=v.useRef(!1);Wb(()=>{let Z=Hb.init();return Z.then($=>(N.current=$)&&S(!1)).catch($=>($==null?void 0:$.type)!=="cancelation"&&console.error("Monaco initialization: error:",$)),()=>b.current?W():Z.cancel()}),Yt(()=>{if(b.current&&N.current){let Z=b.current.getOriginalEditor(),$=Ji(N.current,e||"",r||n||"text",o||"");$!==Z.getModel()&&Z.setModel($)}},[o],y),Yt(()=>{if(b.current&&N.current){let Z=b.current.getModifiedEditor(),$=Ji(N.current,t||"",i||n||"text",a||"");$!==Z.getModel()&&Z.setModel($)}},[a],y),Yt(()=>{let Z=b.current.getModifiedEditor();Z.getOption(N.current.editor.EditorOption.readOnly)?Z.setValue(t||""):t!==Z.getValue()&&(Z.executeEdits("",[{range:Z.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),Z.pushUndoStop())},[t],y),Yt(()=>{var Z,$;($=(Z=b.current)==null?void 0:Z.getModel())==null||$.original.setValue(e||"")},[e],y),Yt(()=>{let{original:Z,modified:$}=b.current.getModel();N.current.editor.setModelLanguage(Z,r||n||"text"),N.current.editor.setModelLanguage($,i||n||"text")},[n,r,i],y),Yt(()=>{var Z;(Z=N.current)==null||Z.editor.setTheme(u)},[u],y),Yt(()=>{var Z;(Z=b.current)==null||Z.updateOptions(d)},[d],y);let J=v.useCallback(()=>{var ee;if(!N.current)return;R.current(N.current);let Z=Ji(N.current,e||"",r||n||"text",o||""),$=Ji(N.current,t||"",i||n||"text",a||"");(ee=b.current)==null||ee.setModel({original:Z,modified:$})},[n,t,i,e,r,o,a]),U=v.useCallback(()=>{var Z;!O.current&&C.current&&(b.current=N.current.editor.createDiffEditor(C.current,{automaticLayout:!0,...d}),J(),(Z=N.current)==null||Z.editor.setTheme(u),M(!0),O.current=!0)},[d,u,J]);v.useEffect(()=>{y&&P.current(b.current,N.current)},[y]),v.useEffect(()=>{!x&&!y&&U()},[x,y,U]);function W(){var $,ee,L,B;let Z=($=b.current)==null?void 0:$.getModel();l||((ee=Z==null?void 0:Z.original)==null||ee.dispose()),s||((L=Z==null?void 0:Z.modified)==null||L.dispose()),(B=b.current)==null||B.dispose()}return k.createElement(Gb,{width:p,height:f,isEditorReady:y,loading:c,_ref:C,className:g,wrapperProps:h})}var pB=fB;v.memo(pB);function mB(e){let t=v.useRef();return v.useEffect(()=>{t.current=e},[e]),t.current}var gB=mB,vs=new Map;function hB({defaultValue:e,defaultLanguage:t,defaultPath:n,value:r,language:i,path:o,theme:a="light",line:l,loading:s="Loading...",options:u={},overrideServices:c={},saveViewState:d=!0,keepCurrentModel:f=!1,width:p="100%",height:g="100%",className:h,wrapperProps:w={},beforeMount:I=Ca,onMount:y=Ca,onChange:M,onValidate:x=Ca}){let[S,b]=v.useState(!1),[N,C]=v.useState(!0),P=v.useRef(null),R=v.useRef(null),O=v.useRef(null),J=v.useRef(y),U=v.useRef(I),W=v.useRef(),Z=v.useRef(r),$=gB(o),ee=v.useRef(!1),L=v.useRef(!1);Wb(()=>{let V=Hb.init();return V.then(D=>(P.current=D)&&C(!1)).catch(D=>(D==null?void 0:D.type)!=="cancelation"&&console.error("Monaco initialization: error:",D)),()=>R.current?F():V.cancel()}),Yt(()=>{var D,E,T,z;let V=Ji(P.current,e||r||"",t||i||"",o||n||"");V!==((D=R.current)==null?void 0:D.getModel())&&(d&&vs.set($,(E=R.current)==null?void 0:E.saveViewState()),(T=R.current)==null||T.setModel(V),d&&((z=R.current)==null||z.restoreViewState(vs.get(o))))},[o],S),Yt(()=>{var V;(V=R.current)==null||V.updateOptions(u)},[u],S),Yt(()=>{!R.current||r===void 0||(R.current.getOption(P.current.editor.EditorOption.readOnly)?R.current.setValue(r):r!==R.current.getValue()&&(L.current=!0,R.current.executeEdits("",[{range:R.current.getModel().getFullModelRange(),text:r,forceMoveMarkers:!0}]),R.current.pushUndoStop(),L.current=!1))},[r],S),Yt(()=>{var D,E;let V=(D=R.current)==null?void 0:D.getModel();V&&i&&((E=P.current)==null||E.editor.setModelLanguage(V,i))},[i],S),Yt(()=>{var V;l!==void 0&&((V=R.current)==null||V.revealLine(l))},[l],S),Yt(()=>{var V;(V=P.current)==null||V.editor.setTheme(a)},[a],S);let B=v.useCallback(()=>{var V;if(!(!O.current||!P.current)&&!ee.current){U.current(P.current);let D=o||n,E=Ji(P.current,r||e||"",t||i||"",D||"");R.current=(V=P.current)==null?void 0:V.editor.create(O.current,{model:E,automaticLayout:!0,...u},c),d&&R.current.restoreViewState(vs.get(D)),P.current.editor.setTheme(a),b(!0),ee.current=!0}},[e,t,n,r,i,o,u,c,d,a]);v.useEffect(()=>{S&&J.current(R.current,P.current)},[S]),v.useEffect(()=>{!N&&!S&&B()},[N,S,B]),Z.current=r,v.useEffect(()=>{var V,D;S&&M&&((V=W.current)==null||V.dispose(),W.current=(D=R.current)==null?void 0:D.onDidChangeModelContent(E=>{L.current||M(R.current.getValue(),E)}))},[S,M]),v.useEffect(()=>{if(S){let V=P.current.editor.onDidChangeMarkers(D=>{var T;let E=(T=R.current.getModel())==null?void 0:T.uri;if(E&&D.find(z=>z.path===E.path)){let z=P.current.editor.getModelMarkers({resource:E});x==null||x(z)}});return()=>{V==null||V.dispose()}}return()=>{}},[S,x]);function F(){var V,D;(V=W.current)==null||V.dispose(),f?d&&vs.set(o,R.current.saveViewState()):(D=R.current.getModel())==null||D.dispose(),R.current.dispose()}return k.createElement(Gb,{width:p,height:g,isEditorReady:S,loading:s,_ref:O,className:h,wrapperProps:w})}var vB=hB,yB=v.memo(vB),Zb=yB;const IB={"policy-options":"_policy-options_pxqsa_1"},Og=({documentationSrc:e})=>m.jsx("div",{className:`px-4 py-2 overflow-auto h-60 bg-editor prose prose-invert prose-sm max-w-full ${IB["policy-options"]}`,dangerouslySetInnerHTML:{__html:e}}),Yb=({onConfirm:e,onCancel:t,onRequestPreviewAccess:n,isDisabled:r=!1,mustRequestAccess:i})=>{const o=m.jsxs(m.Fragment,{children:[m.jsx(En,{label:"Cancel",buttonType:xi.WHITE,classNames:"w-24 justify-center",onClick:t,dataTestId:"policy-picker-footer-cancel-btn"}),m.jsx(En,{label:"OK",classNames:"w-24 justify-center",onClick:e,isDisabled:r,dataTestId:"policy-picker-footer-ok-btn"})]}),a=m.jsxs(m.Fragment,{children:[m.jsx(En,{label:"Cancel",buttonType:xi.WHITE,classNames:"w-24 justify-center",onClick:t,dataTestId:"policy-picker-footer-cancel-btn"}),m.jsx(En,{label:"Request access",classNames:"w-36 justify-center",onClick:n,dataTestId:"policy-picker-footer-request-access-btn"})]});return m.jsxs("div",{className:"h-20 flex items-center",children:[m.jsx("div",{}),m.jsx("div",{className:"ml-auto space-x-2 mr-3 flex",children:i?a:o})]})},Qb=({name:e,onChangeName:t,policyTypeInformation:n,validationErrorName:r,disabled:i})=>{const o=a=>{t(a.currentTarget.value)};return m.jsxs("div",{className:"grid grid-cols-8 text-sm gap-2 items-center",children:[m.jsx("label",{className:"col-span-1 text-right",children:"Name"}),m.jsxs("div",{className:"col-span-7",children:[m.jsx("input",{type:"text",id:"route-handler","data-test":"policy-picker-name-input",name:"route-handler",className:ae("shadow-sm block w-full text-sm rounded-md",{"border-2 border-red-300 text-red-600 focus:ring-red-500 focus:border-red-500":r,"border-gray-300 focus:ring-indigo-500 focus:border-indigo-500 ":!r,"bg-gray-200":i}),value:e||"",disabled:i,onChange:o,"aria-describedby":"email-description"}),r?m.jsx("span",{className:"absolute text-xs mt-1 text-red-600",children:r}):null]}),m.jsx("label",{className:"col-span-1 text-right mt-4",children:"Type"}),m.jsxs("span",{className:"col-span-7 text-gray-500 mt-4",children:[n.typeName,n.documentationUrl?m.jsxs(m.Fragment,{children:[" ","-"," ",m.jsx("a",{href:n.documentationUrl,target:"_blank",rel:"noreferrer",className:"text-blue-500 hover:underline",children:"documentation"})]}):null]})]})},Au=({label:e,children:t,classNameLabel:n,className:r})=>m.jsxs("div",{className:r,children:[m.jsx("span",{className:ae("text-gray-500 uppercase pb-2",n),children:e}),m.jsx("div",{className:"mt-2",children:t})]}),wB={legacyIdMaps:{"api-auth-key-inbound-policy":"api-key-auth-inbound","auth0-jwt-inbound":"auth0-jwt-auth-inbound","basic-auth-inbound-policy":"basic-auth-inbound","basic-rate-limit-policy-inbound":"rate-limit-policy-inbound","cognito-jwt-inbound":"cognito-jwt-auth-inbound","open-id-jwt-inbound":"open-id-jwt-auth-inbound"}},MB=[{name:"Amberflo Metering / Billing",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/amberflo-metering-inbound/",id:"amberflo-metering-inbound",defaultHandler:{module:"$import(@zuplo/runtime)",export:"AmberfloMeteringInboundPolicy",options:{apiKey:"YOUR_API_KEY",customerIdPropertyPath:".data.accountNumber",meterApiName:"api-calls",meterValue:1,statusCodes:"200-299, 304"}},exampleHtml:'<div><p>Amberflo is a usage metering and billing service. This policy allows you to send metering calls for each API to their meter ingest endpoint.</p></div><h3>Options</h3><ul><li><code>apiKey</code> <div><p>The API key to use when sending metering calls to Amberflo</p></div></li><li><code>meterApiName</code> <div><p>The name of the meter to use when sending metering calls to Amberflo (overridable in code)</p></div></li><li><code>meterValue</code> <div><p>The value to use when sending metering calls to Amberflo (overridable in code)</p></div></li><li><code>customerIdPropertyPath</code> <div><p>The path to the property on <code>request.user</code>contains the customer ID. For example <code>.data.accountNumber</code> would read the <code>request.user.data.accountNumber</code> property.</p></div></li><li><code>customerId</code> <div><p>The default customerId for all metering calls - overridable in code and by <code>customerIdPropertyPath</code></p></div></li><li><code>dimensions</code> <div><p>A dictionary of dimensions to be sent to Amberflo (extensible in code)</p></div></li><li><code>statusCodes</code> <div><p>A list of successful status codes and ranges "200-299, 304" that should trigger a metering call to Amberflo - defaults to <code>result.ok</code> (200-299) if not set.</p></div></li><li><code>url</code> <div><p>Optional, the URL to send metering events to (defaults to <a href="https://app.amberflo.io/ingest">https://app.amberflo.io/ingest</a>). This is useful for testing purposes.</p></div></li></ul> ',icon:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMjZweCIgaGVpZ2h0PSIyNnB4IiB2aWV3Qm94PSIwIDAgMjYgMjYiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8dGl0bGU+YW1iZXJmbG9faWNvbjwvdGl0bGU+CiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyBpZD0iYW1iZXJmbG9faWNvbiI+CiAgICAgICAgICAgIDxwYXRoIGQ9Ik0xMyw4IEMxNy45NzA1NjI3LDggMjIsMTIuMDI5NDM3MyAyMiwxNyBDMjIsMjEuOTcwNTYyNyAxNy45NzA1NjI3LDI2IDEzLDI2IEM4LjAyOTQzNzI1LDI2IDQsMjEuOTcwNTYyNyA0LDE3IEM0LDEyLjAyOTQzNzMgOC4wMjk0MzcyNSw4IDEzLDggWiBNMTMsMTEuMTA5MDkwOSBDOS43NDY1NDA3NSwxMS4xMDkwOTA5IDcuMTA5MDkwOTEsMTMuNzQ2NTQwNyA3LjEwOTA5MDkxLDE3IEM3LjEwOTA5MDkxLDIwLjI1MzQ1OTMgOS43NDY1NDA3NSwyMi44OTA5MDkxIDEzLDIyLjg5MDkwOTEgQzE2LjI1MzQ1OTMsMjIuODkwOTA5MSAxOC44OTA5MDkxLDIwLjI1MzQ1OTMgMTguODkwOTA5MSwxNyBDMTguODkwOTA5MSwxMy43NDY1NDA3IDE2LjI1MzQ1OTMsMTEuMTA5MDkwOSAxMywxMS4xMDkwOTA5IFoiIGlkPSJDb21iaW5lZC1TaGFwZSIgZmlsbD0iY3VycmVudENvbG9yIj48L3BhdGg+CiAgICAgICAgICAgIDxwYXRoIGQ9Ik0xMi41LDAgQzE2LjQzNTU1ODcsMCAxOS43ODA2MzkyLDIuNTA3Mzg2NjIgMjAuOTk5ODAxMSw1Ljk5OTMyMjQ0IEwxNy41OTgwNTk4LDUuOTk4OTQ0NzUgQzE2LjU4MDE4MTYsNC4yNTQ1NzkyOSAxNC42NzgyNzA3LDMuMDgxMDU0MTIgMTIuNSwzLjA4MTA1NDEyIEMxMC4zMjE3MjkzLDMuMDgxMDU0MTIgOC40MTk4MTg0Myw0LjI1NDU3OTI5IDcuNDAxOTQwMTUsNS45OTg5NDQ3NSBMNC4wMDAxOTg5Myw1Ljk5OTMyMjQ0IEM1LjIxOTM2MDc5LDIuNTA3Mzg2NjIgOC41NjQ0NDEyOSwwIDEyLjUsMCBaIiBpZD0iQ29tYmluZWQtU2hhcGUiIGZpbGw9ImN1cnJlbnRDb2xvciI+PC9wYXRoPgogICAgICAgICAgICA8cmVjdCBpZD0iUmVjdGFuZ2xlIiB4PSIwIiB5PSIwIiB3aWR0aD0iMjYiIGhlaWdodD0iMjYiPjwvcmVjdD4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg=="},{name:"Legacy API Key Authentication (deprecated)",isPreview:!1,isPaidAddOn:!1,isDeprecated:!0,documentationUrl:"https://zuplo.com/docs/policies/api-key-auth-inbound/",id:"api-key-auth-inbound",defaultHandler:{export:"ApiAuthKeyInboundPolicy",module:"$import(@zuplo/runtime)",options:{allowUnauthenticatedRequests:!1}},exampleHtml:"<div><p>Deprecated - Please use the new 'API Key Authentication' policy instead. This policy will continue to work but will be removed in a future version of Zuplo.</p></div><h3>Options</h3><ul><li><code>allowUnauthenticatedRequests</code> <div><p>If 'true' allows the request to continue even if authenticated. When 'false' (the default) any unauthenticated request is automatically rejected with a 401</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGNsYXNzPSJoLTYgdy02IiBmaWxsPSJub25lIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjIiPjxwYXRoIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTcgMjFhNCA0IDAgMDEtNC00VjVhMiAyIDAgMDEyLTJoNGEyIDIgMCAwMTIgMnYxMmE0IDQgMCAwMS00IDR6bTAgMGgxMmEyIDIgMCAwMDItMnYtNGEyIDIgMCAwMC0yLTJoLTIuMzQzTTExIDcuMzQzbDEuNjU3LTEuNjU3YTIgMiAwIDAxMi44MjggMGwyLjgyOSAyLjgyOWEyIDIgMCAwMTAgMi44MjhsLTguNDg2IDguNDg1TTcgMTdoLjAxIiAvPjwvc3ZnPg=="},{name:"API Key Authentication",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/api-key-inbound/",id:"api-key-inbound",defaultHandler:{export:"ApiKeyInboundPolicy",module:"$import(@zuplo/runtime)",options:{allowUnauthenticatedRequests:!1}},exampleHtml:'<div><p>Authenticates requests based on API Keys using Zuplo API Management. You can learn more about the Zuplo API Key Service <a href="https://zuplo.com/docs/articles/api-key-api#buckets">here</a></p></div><h3>Options</h3><ul><li><code>authHeader</code> <div><p>The name of the header with the key. Defaults to <code>Authorization</code></p></div></li><li><code>authScheme</code> <div><p>The scheme used on the header. Defaults to <code>Bearer</code></p></div></li><li><code>bucketName</code> <div><p>Optional - The name of the API Key service bucket. Defaults to the autogenerated bucket name for your project. You can contact <code>support@zuplo.com</code> to create a new bucket.</p></div></li><li><code>allowUnauthenticatedRequests</code> <div><p>If requests should proceed even if the policy does not successfully authenticate the request. Defaults to false and rejects any request without a valid API key (returning a <code>401 - Unauthorized</code> response). Set to <code>true</code> to support multiple authentication methods or support both authenticated and anonymous requests.</p></div></li><li><code>cacheTtlSeconds</code> <div><p>The time to cache authentication results for a particular key. Higher values will decrease latency. Cached results will be valid until the cache expires even in the event the key is deleted, etc..</p></div></li><li><code>disableAutomaticallyAddingKeyHeaderToOpenApi</code> <div><p>Zuplo will automatically document your API key header within your OpenAPI specification &#x26; Developer Portal. Set this to <code>true</code> to disable this behavior.</p></div></li></ul> ',icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGNsYXNzPSJoLTYgdy02IiBmaWxsPSJub25lIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjIiPjxwYXRoIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTcgMjFhNCA0IDAgMDEtNC00VjVhMiAyIDAgMDEyLTJoNGEyIDIgMCAwMTIgMnYxMmE0IDQgMCAwMS00IDR6bTAgMGgxMmEyIDIgMCAwMDItMnYtNGEyIDIgMCAwMC0yLTJoLTIuMzQzTTExIDcuMzQzbDEuNjU3LTEuNjU3YTIgMiAwIDAxMi44MjggMGwyLjgyOSAyLjgyOWEyIDIgMCAwMTAgMi44MjhsLTguNDg2IDguNDg1TTcgMTdoLjAxIiAvPjwvc3ZnPg=="},{name:"Archive Request to Storage",isPreview:!0,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/archive-request-inbound/",id:"archive-request-inbound",defaultHandler:{export:"ArchiveRequestInbound",module:"$import(@zuplo/runtime)",options:{bucketName:"test-bucket-123.s3.amazonaws.com",path:"requests/",accessKeyId:"$env(AWS_ACCESS_KEY_ID)",accessKeySecret:"$env(AWS_ACCESS_KEY_SECRET)"}},exampleHtml:"<div><p>Archive incoming requests to S3 compatible storage. Works with any storage provider compatible with S3 APIs such as AWS S3, GCP Cloud Storage, and Azure Blob Storage.</p></div><h3>Options</h3><ul><li><code>bucketName</code> <div><p>The name of the storage bucket</p></div></li><li><code>path</code> <div><p>The path where requests are stored</p></div></li><li><code>accessKeyId</code> <div><p>The Access Key ID of the account authorized to write to the bucket</p></div></li><li><code>accessKeySecret</code> <div><p>The Access Key Secret of the account authorized to write to the bucket</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItdXBsb2FkLWNsb3VkIj48cG9seWxpbmUgcG9pbnRzPSIxNiAxNiAxMiAxMiA4IDE2Ij48L3BvbHlsaW5lPjxsaW5lIHgxPSIxMiIgeTE9IjEyIiB4Mj0iMTIiIHkyPSIyMSI+PC9saW5lPjxwYXRoIGQ9Ik0yMC4zOSAxOC4zOUE1IDUgMCAwIDAgMTggOWgtMS4yNkE4IDggMCAxIDAgMyAxNi4zIj48L3BhdGg+PHBvbHlsaW5lIHBvaW50cz0iMTYgMTYgMTIgMTIgOCAxNiI+PC9wb2x5bGluZT48L3N2Zz4="},{name:"Archive Response to Storage",isPreview:!0,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/archive-response-outbound/",id:"archive-response-outbound",defaultHandler:{export:"ArchiveResponseOutbound",module:"$import(@zuplo/runtime)",options:{bucketName:"test-bucket-123.s3.amazonaws.com",path:"responses/",accessKeyId:"$env(AWS_ACCESS_KEY_ID)",accessKeySecret:"$env(AWS_ACCESS_KEY_SECRET)"}},exampleHtml:"<div><p>Archive outgoing responses to S3 compatible storage. Works with any storage provider compatible with S3 APIs such as AWS S3, GCP Cloud Storage, and Azure Blob Storage.</p></div><h3>Options</h3><ul><li><code>bucketName</code> <div><p>The name of the storage bucket</p></div></li><li><code>path</code> <div><p>The path where requests are stored</p></div></li><li><code>accessKeyId</code> <div><p>The Access Key ID of the account authorized to write to the bucket</p></div></li><li><code>accessKeySecret</code> <div><p>The Access Key Secret of the account authorized to write to the bucket</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItdXBsb2FkLWNsb3VkIj48cG9seWxpbmUgcG9pbnRzPSIxNiAxNiAxMiAxMiA4IDE2Ij48L3BvbHlsaW5lPjxsaW5lIHgxPSIxMiIgeTE9IjEyIiB4Mj0iMTIiIHkyPSIyMSI+PC9saW5lPjxwYXRoIGQ9Ik0yMC4zOSAxOC4zOUE1IDUgMCAwIDAgMTggOWgtMS4yNkE4IDggMCAxIDAgMyAxNi4zIj48L3BhdGg+PHBvbHlsaW5lIHBvaW50cz0iMTYgMTYgMTIgMTIgOCAxNiI+PC9wb2x5bGluZT48L3N2Zz4="},{name:"Auth0 JWT Auth",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/auth0-jwt-auth-inbound/",id:"auth0-jwt-auth-inbound",defaultHandler:{export:"Auth0JwtInboundPolicy",module:"$import(@zuplo/runtime)",options:{allowUnauthenticatedRequests:!1,auth0Domain:"$env(AUTH0_DOMAIN)",audience:"$env(AUTH0_AUDIENCE)"}},exampleHtml:'<div><p>Authenticate users using Auth0 issued JWT tokens.</p></div><h3>Options</h3><ul><li><code>allowUnauthenticatedRequests</code> <div><p>Allow unauthenticated requests to proceed. This is use useful if you want to use multiple authentication policies or if you want to allow both authenticated and non-authenticated traffic.</p></div></li><li><code>auth0Domain</code> <div><p>Your Auth0 domain. For example, my-company.auth0.com</p></div></li><li><code>audience</code> <div><p>The Auth0 audience of your API, for example <a href="https://api.example.com/">https://api.example.com/</a></p></div></li></ul> ',icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyMiAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTcuMjM2IDE5LjQxNSAxNC44IDEybDYuMzc4LTQuNTgyaC03Ljg4M0wxMC44NiAwaDcuODg3bDIuNDQgNy40MThhMTAuNjY4IDEwLjY2OCAwIDAgMS0zLjk1IDExLjk5N1ptLTEyLjc1OCAwTDEwLjg1NiAyNGw2LjM4LTQuNTg1LTYuMzc3LTQuNTgyLTYuMzgxIDQuNTgyWm0tMy45NDQtMTJjLTEuNDkgNC41MzguMjQgOS4zNDQgMy45MzggMTIuMDAzdi0uMDAzTDYuOTEyIDEyIC41MzYgNy40MTVsNy44ODQuMDAzTDEwLjg1NiAwSDIuOTcxTC41MzQgNy40MTVaIiBmaWxsPSIjMDAwIi8+PC9zdmc+"},{name:"Basic Auth",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/basic-auth-inbound/",id:"basic-auth-inbound",defaultHandler:{export:"BasicAuthInboundPolicy",module:"$import(@zuplo/runtime)",options:{accounts:[{data:{number:1},password:"PASSWORD",username:"USERNAME"}],allowUnauthenticatedRequests:!1}},exampleHtml:"<div><p>Authenticate requests using basic auth (i.e. username and password)</p></div><h3>Options</h3><ul><li><code>accounts</code> <div><p>An array of account objects (username, password and data properties)</p></div></li><li><code>allowUnauthenticatedRequests</code> <div><p>If 'true' allows the request to continue even if authenticated. When 'false' (the default) any unauthenticated request is automatically rejected with a 401</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXIta2V5Ij48cGF0aCBkPSJNMjEgMmwtMiAybS03LjYxIDcuNjFhNS41IDUuNSAwIDEgMS03Ljc3OCA3Ljc3OCA1LjUgNS41IDAgMCAxIDcuNzc3LTcuNzc3em0wIDBMMTUuNSA3LjVtMCAwbDMgM0wyMiA3bC0zLTNtLTMuNSAzLjVMMTkgNCI+PC9wYXRoPjwvc3ZnPg=="},{name:"Bot Detection",isPreview:!0,isPaidAddOn:!0,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/bot-detection-inbound/",id:"bot-detection-inbound",defaultHandler:{export:"BotDetectionInbound",module:"$import(@zuplo/runtime)",options:{blockScoresBelow:40}},exampleHtml:"<div><p>Detect known and suspected bots based on sophisticated traffic analysis. The bot detection inbound policy provides a bot score for every request that can be used to determine the likelihood the request came from a bot. The policy can be configured to automatically block traffic with a set score or simply pass along the score for you to respond in other policies or handlers.</p></div><h3>Options</h3><ul><li><code>blockScoresBelow</code> <div><p>The threshold at which bots are automatically blocked</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItc3F1YXJlIj48cmVjdCB4PSIzIiB5PSIzIiB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHJ4PSIyIiByeT0iMiI+PC9yZWN0Pjwvc3ZnPg=="},{name:"Brown Out",isPreview:!0,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/brown-out-inbound/",id:"brown-out-inbound",defaultHandler:{export:"BrownOutInbound",module:"$import(@zuplo/runtime)",options:{cronExpression:"0 23 * * ?",durationSeconds:60}},exampleHtml:"<div><p>Set periods of downtime based on cron schedules. Useful for alerting users of impending deprecations.</p></div><h3>Options</h3><ul><li><code>cronExpression</code> <div><p>The cron schedule for when this policy is enabled.</p></div></li><li><code>durationSeconds</code> <div><p>The length of time in seconds that the policy stays enabled after the scheduled time starts.</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGNsYXNzPSJoLTYgdy02IiBmaWxsPSJub25lIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjIiPgogIDxwYXRoIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTEwIDl2Nm00LTZ2Nm03LTNhOSA5IDAgMTEtMTggMCA5IDkgMCAwMTE4IDB6IiAvPgo8L3N2Zz4="},{name:"Caching",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/caching-inbound/",id:"caching-inbound",defaultHandler:{export:"CachingInboundPolicy",module:"$import(@zuplo/runtime)",options:{expirationSecondsTtl:60,dangerouslyIgnoreAuthorizationHeader:!1,headers:["header_used_as_part_of_cache_key"]}},exampleHtml:"<div><p>Respond to matched incoming requests with cached content</p></div><h3>Options</h3><ul><li><code>cacheId</code> <div><p>Optional, specifies an id or 'key' for this policy to store cache. This is useful for cache-busting. For example, set this property to an env var and if you change that env var value, you invalidate the cache.</p></div></li><li><code>dangerouslyIgnoreAuthorizationHeader</code> <div><p>By default, the Authorization header is always considered in the caching policy. You can disable by setting this to true</p></div></li><li><code>headers</code> <div><p>The headers to be considered when caching</p></div></li><li><code>expirationSecondsTtl</code> <div><p>The timeout of the cache in seconds</p></div></li><li><code>statusCodes</code> <div><p>Response status codes to be cached - defaults to 200, 206, 301, 302, 303, 404, 410 if none specified</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItd2luZCI+PHBhdGggZD0iTTkuNTkgNC41OUEyIDIgMCAxIDEgMTEgOEgybTEwLjU5IDExLjQxQTIgMiAwIDEgMCAxNCAxNkgybTE1LjczLTguMjdBMi41IDIuNSAwIDEgMSAxOS41IDEySDIiPjwvcGF0aD48L3N2Zz4="},{name:"Change Method",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/change-method-inbound/",id:"change-method-inbound",defaultHandler:{export:"ChangeMethodInboundPolicy",module:"$import(@zuplo/runtime)",options:{method:"POST"}},exampleHtml:"<div><p>Changes the HTTP method of the incoming request.</p></div><h3>Options</h3><ul><li><code>method</code> <div><p>The HTTP Method to be used, e.g. POST, GET, PUT, PATCH, etc</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItZWRpdC0zIj48cGF0aCBkPSJNMTIgMjBoOSI+PC9wYXRoPjxwYXRoIGQ9Ik0xNi41IDMuNWEyLjEyMSAyLjEyMSAwIDAgMSAzIDNMNyAxOWwtNCAxIDEtNEwxNi41IDMuNXoiPjwvcGF0aD48L3N2Zz4="},{name:"Clear Request Headers",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/clear-headers-inbound/",id:"clear-headers-inbound",defaultHandler:{export:"ClearHeadersInboundPolicy",module:"$import(@zuplo/runtime)",options:{exclude:["HEADER_TO_LEAVE"]}},exampleHtml:"<div><p>Removes all headers from the incoming request except for those in the exclude list.</p></div><h3>Options</h3><ul><li><code>exclude</code> <div><p>The headers that should not be removed</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItYWxpZ24tcmlnaHQiPjxsaW5lIHgxPSIyMSIgeTE9IjEwIiB4Mj0iNyIgeTI9IjEwIj48L2xpbmU+PGxpbmUgeDE9IjIxIiB5MT0iNiIgeDI9IjMiIHkyPSI2Ij48L2xpbmU+PGxpbmUgeDE9IjIxIiB5MT0iMTQiIHgyPSIzIiB5Mj0iMTQiPjwvbGluZT48bGluZSB4MT0iMjEiIHkxPSIxOCIgeDI9IjciIHkyPSIxOCI+PC9saW5lPjwvc3ZnPg=="},{name:"Clear Response Headers",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/clear-headers-outbound/",id:"clear-headers-outbound",defaultHandler:{export:"ClearHeadersOutboundPolicy",module:"$import(@zuplo/runtime)",options:{exclude:["HEADER_TO_LEAVE"]}},exampleHtml:"<div><p>Removes all headers from the response except for those in the exclude list.</p></div><h3>Options</h3><ul><li><code>exclude</code> <div><p>The headers that should not be removed</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItYWxpZ24tcmlnaHQiPjxsaW5lIHgxPSIyMSIgeTE9IjEwIiB4Mj0iNyIgeTI9IjEwIj48L2xpbmU+PGxpbmUgeDE9IjIxIiB5MT0iNiIgeDI9IjMiIHkyPSI2Ij48L2xpbmU+PGxpbmUgeDE9IjIxIiB5MT0iMTQiIHgyPSIzIiB5Mj0iMTQiPjwvbGluZT48bGluZSB4MT0iMjEiIHkxPSIxOCIgeDI9IjciIHkyPSIxOCI+PC9saW5lPjwvc3ZnPg=="},{name:"AWS Cognito JWT Auth",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/cognito-jwt-auth-inbound/",id:"cognito-jwt-auth-inbound",defaultHandler:{export:"CognitoJwtInboundPolicy",module:"$import(@zuplo/runtime)",options:{allowUnauthenticatedRequests:!1,region:"$env(AWS_REGION)",userPoolId:"$env(AWS_COGNITO_USER_POOL_ID)"}},exampleHtml:"<div><p>Authenticate requests with JWT tokens issued by AWS Cognito.</p></div><h3>Options</h3><ul><li><code>allowUnauthenticatedRequests</code> <div><p>Allow unauthenticated requests to proceed. This is use useful if you want to use multiple authentication policies or if you want to allow both authenticated and non-authenticated traffic.</p></div></li><li><code>region</code> <div><p>The AWS region where your Cognito instance is deployed</p></div></li><li><code>userPoolId</code> <div><p>The user pool identifier</p></div></li></ul> ",icon:"data:image/svg+xml;base64,Cjxzdmcgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0xOC40ODE4IDQuNjYwNDJMMjAuNTUwMyA0LjEyNzc2TDIwLjU2NTggNC4xNTA0OEwyMC42MTggMTYuNjQwN0wyMC41NTAzIDE2LjcwODZMMjAuMTI0MSAxNi43MjY4TDE4LjUwNiAxNi40NzQ5TDE4LjQ4MTggMTYuNDExMlY0LjY2MDQyTTYuNTE4MTMgMTcuNTc2M0w2LjUyNTc1IDE3LjU3NjhMMTEuOTg2MSAxOS4xNjM1TDEyIDE5LjE3NDJMMTIuMDIzOCAxOS4xOTMxTDEyLjAxNjEgMjMuOTQ3NUwxMiAyMy45Njc3TDYuNTE4MTMgMjEuMzA0NlYxNy41NzYzIiBmaWxsPSIjM0EzQTNBIi8+CjxwYXRoIGQ9Ik0xOC40ODE4IDE2LjQxMTJMMTIuMDA5IDE3Ljk2MTNMOC43NTkxMiAxNy4xNzY5TDYuNTE4MTMgMTcuNTc2M0wxMiAxOS4xNzQyTDIwLjQ2MDYgMTYuODgzNkwyMC41NTAzIDE2LjcwODZMMTguNDgxOCAxNi40MTEyIiBmaWxsPSIjNjY2NjY2Ii8+CjxwYXRoIGQ9Ik0xNy40ODE5IDYuMzkxMzhMMTcuNDI5MSA2LjMzMTI2TDEyLjA1ODkgNC43NzA4NkwxMiA0Ljc5MzU4TDExLjk0NjEgNC43NjYwNUwzLjQ5NTgyIDcuMjAyNzNMMy40NDk2NiA3LjI1OTE2TDMuNTE3NDkgNy4yOTYzMkw1LjQ0OTkzIDcuNTc5NjdMNS41MTgyNCA3LjU1NjQ3TDExLjk5MSA2LjAwNjQyTDE1LjI0MDkgNi43OTA4OEwxNy40ODE5IDYuMzkxMzgiIGZpbGw9IiM0MzQzNDMiLz4KPHBhdGggZD0iTTUuNTE4MjQgMTkuMzA3M0wzLjQ0OTY2IDE5LjgwNjdMMy40NDYwNSAxOS43OTQ3TDMuMzY0NTggNy4zNTExNEwzLjQ0OTY2IDcuMjU5MTZMNS41MTgyNCA3LjU1NjQ3VjE5LjMwNzMiIGZpbGw9ImJsYWNrIi8+CjxwYXRoIGQ9Ik04LjMxMDkxIDE0LjQ4MDVMMTIgMTQuOTEzMkwxMi4wMjc3IDE0Ljg3MTlMMTIuMDQyNyA5LjEwMTdMMTIgOS4wNTQ0Mkw4LjMxMDkxIDkuNDg3MjJWMTQuNDgwNSIgZmlsbD0iIzNBM0EzQSIvPgo8cGF0aCBkPSJNMTUuNjg5MSAxNC40ODA1TDEyIDE0LjkxMzJWOS4wNTQ0MkwxNS42ODkxIDkuNDg3MjJWMTQuNDgwNU0xNy40ODE5IDYuMzkxMzhMMTIgNC43OTM1OFYwTDE3LjQ4MTkgMi42NjMwNFY2LjM5MTM4IiBmaWxsPSJibGFjayIvPgo8cGF0aCBkPSJNMTIgMEwxLjcyNTc1IDQuOTU5OTdWMTkuMDA3N0wzLjQ0OTY2IDE5LjgwNjdWNy4yNTkxNkwxMiA0Ljc5MzU4VjBaIiBmaWxsPSIjM0EzQTNBIi8+CjxwYXRoIGQ9Ik0yMC41NTAzIDQuMTI3NzZWMTYuNzA4NkwxMiAxOS4xNzQyVjIzLjk2NzdMMjIuMjc0MiAxOS4wMDc3VjQuOTU5OTdMMjAuNTUwMyA0LjEyNzc2WiIgZmlsbD0iYmxhY2siLz4KPC9zdmc+"},{name:"Composite Inbound (Group Policies)",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/composite-inbound/",id:"composite-inbound",defaultHandler:{export:"CompositeInboundPolicy",module:"$import(@zuplo/runtime)",options:{policies:["POLICY_1","POLICY_2"]}},exampleHtml:"<div><p>Creates a composite, or group policy - composed of other policies. For reuse across routes.</p></div><h3>Options</h3><ul><li><code>policies</code> <div><p>The list of policy references (beware circular references)</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyNCAyNCIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZT0iY3VycmVudENvbG9yIiBjbGFzcz0idy02IGgtNiI+CiAgPHBhdGggc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBkPSJNMi4yNSA3LjEyNUMyLjI1IDYuNTA0IDIuNzU0IDYgMy4zNzUgNmg2Yy42MjEgMCAxLjEyNS41MDQgMS4xMjUgMS4xMjV2My43NWMwIC42MjEtLjUwNCAxLjEyNS0xLjEyNSAxLjEyNWgtNmExLjEyNSAxLjEyNSAwIDAxLTEuMTI1LTEuMTI1di0zLjc1ek0xNC4yNSA4LjYyNWMwLS42MjEuNTA0LTEuMTI1IDEuMTI1LTEuMTI1aDUuMjVjLjYyMSAwIDEuMTI1LjUwNCAxLjEyNSAxLjEyNXY4LjI1YzAgLjYyMS0uNTA0IDEuMTI1LTEuMTI1IDEuMTI1aC01LjI1YTEuMTI1IDEuMTI1IDAgMDEtMS4xMjUtMS4xMjV2LTguMjV6TTMuNzUgMTYuMTI1YzAtLjYyMS41MDQtMS4xMjUgMS4xMjUtMS4xMjVoNS4yNWMuNjIxIDAgMS4xMjUuNTA0IDEuMTI1IDEuMTI1djIuMjVjMCAuNjIxLS41MDQgMS4xMjUtMS4xMjUgMS4xMjVoLTUuMjVhMS4xMjUgMS4xMjUgMCAwMS0xLjEyNS0xLjEyNXYtMi4yNXoiIC8+Cjwvc3ZnPgo="},{name:"Custom Code Inbound",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/custom-code-inbound/",id:"custom-code-inbound",defaultHandler:{export:"default",module:"$import(./modules/YOUR_MODULE)",options:{config1:"YOUR_VALUE",config2:!0}},exampleHtml:"<div><p>Enables a custom code policy written in TypeScript. Change YOUR_MODULE to the name of your module (without .ts extension)</p></div><h3>Options</h3><ul><li><code>*</code> <div><p>Any object your custom policy consumes</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItY29kZSI+PHBvbHlsaW5lIHBvaW50cz0iMTYgMTggMjIgMTIgMTYgNiI+PC9wb2x5bGluZT48cG9seWxpbmUgcG9pbnRzPSI4IDYgMiAxMiA4IDE4Ij48L3BvbHlsaW5lPjwvc3ZnPg=="},{name:"Custom Code Outbound",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/custom-code-outbound/",id:"custom-code-outbound",defaultHandler:{export:"default",module:"$import(./modules/YOUR_MODULE)",options:{config1:"YOUR_VALUE",config2:!0}},exampleHtml:"<div><p>A custom outbound response policy.</p></div><h3>Options</h3><ul></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItY29kZSI+PHBvbHlsaW5lIHBvaW50cz0iMTYgMTggMjIgMTIgMTYgNiI+PC9wb2x5bGluZT48cG9seWxpbmUgcG9pbnRzPSI4IDYgMiAxMiA4IDE4Ij48L3BvbHlsaW5lPjwvc3ZnPg=="},{name:"Firebase JWT Auth",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/firebase-jwt-inbound/",id:"firebase-jwt-inbound",defaultHandler:{export:"FirebaseJwtInboundPolicy",module:"$import(@zuplo/runtime)",options:{projectId:"YOUR_PROJECT_ID",allowUnauthenticatedRequests:!1}},exampleHtml:"<div><p>Authenticate users using Firebase issued JWT tokens.</p></div><h3>Options</h3><ul><li><code>allowUnauthenticatedRequests</code> <div><p>Allow unauthenticated requests to proceed. This is use useful if you want to use multiple authentication policies or if you want to allow both authenticated and non-authenticated traffic.</p></div></li><li><code>projectId</code> <div><p>Your Firebase Project ID</p></div></li><li><code>certUrl</code> <div><p>Optional - override the URL hosting the public keys used to verify the JWT.</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMjA0cHgiIGhlaWdodD0iMjA0cHgiIHZpZXdCb3g9IjAgMCAyMDQgMjA0IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPgogICAgPHRpdGxlPmZpcmViYXNlX2ljb248L3RpdGxlPgogICAgPGcgaWQ9IlBhZ2UtMSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgaWQ9ImZpcmViYXNlX2ljb24iPgogICAgICAgICAgICA8cmVjdCBpZD0iUmVjdGFuZ2xlIiB4PSIwIiB5PSIwIiB3aWR0aD0iMjA0IiBoZWlnaHQ9IjIwNCI+PC9yZWN0PgogICAgICAgICAgICA8cGF0aCBkPSJNNDIuMiwxMjguOSBMNTkuNiwxNy40IEM2MC4yLDEzLjYgNjUuMywxMi43IDY3LjEsMTYuMSBMODUuOCw1MS4xIEw0Mi4yLDEyOC45IFogTTE2NS45LDE1NiBMMTQ5LjMsNTMuMyBDMTQ4LjgsNTAuMSAxNDQuOCw0OC44IDE0Mi41LDUxLjEgTDM3LjksMTU2IEw5NS44LDE4OC41IEM5OS40LDE5MC41IDEwMy45LDE5MC41IDEwNy41LDE4OC41IEwxNjUuOSwxNTYgWiBNMTE4LjksNjYuNCBMMTA1LjUsNDAuOSBDMTA0LDM4IDk5LjksMzggOTguNCw0MC45IEwzOS41LDE0NS45IEwxMTguOSw2Ni40IFoiIGlkPSJpY29uXzFfIiBmaWxsPSIjMDAwMDAwIiBmaWxsLXJ1bGU9Im5vbnplcm8iPjwvcGF0aD4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg=="},{name:"Form Data to JSON",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/formdata-to-json-inbound/",id:"formdata-to-json-inbound",defaultHandler:{export:"FormDataToJsonInboundPolicy",module:"$import(@zuplo/runtime)",options:{badRequestIfNotFormData:!1,optionalHoneypotName:"HONEYPOT_FIELD_NAME"}},exampleHtml:"<div><p>Converts form data in the incoming request to JSON.</p></div><h3>Options</h3><ul><li><code>badRequestIfNotFormData</code> <div><p>Should the policy return an error if the request is not of the type form data</p></div></li><li><code>optionalHoneypotName</code> <div><p>The name of the honeypot field. Used to provide basic spam filtering.</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItZmlsZS10ZXh0Ij48cGF0aCBkPSJNMTQgMkg2YTIgMiAwIDAgMC0yIDJ2MTZhMiAyIDAgMCAwIDIgMmgxMmEyIDIgMCAwIDAgMi0yVjh6Ij48L3BhdGg+PHBvbHlsaW5lIHBvaW50cz0iMTQgMiAxNCA4IDIwIDgiPjwvcG9seWxpbmU+PGxpbmUgeDE9IjE2IiB5MT0iMTMiIHgyPSI4IiB5Mj0iMTMiPjwvbGluZT48bGluZSB4MT0iMTYiIHkxPSIxNyIgeDI9IjgiIHkyPSIxNyI+PC9saW5lPjxwb2x5bGluZSBwb2ludHM9IjEwIDkgOSA5IDggOSI+PC9wb2x5bGluZT48L3N2Zz4="},{name:"Geo-location filtering",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/geo-filter-inbound/",id:"geo-filter-inbound",defaultHandler:{export:"GeoFilterInboundPolicy",module:"$import(@zuplo/runtime)",options:{allow:{countries:"US, CA"},block:{asns:"$env(ASNS_TO_BLOCK)",regionCodes:"TX, WA"},ignoreUnknown:!0}},exampleHtml:'<div><p>Block requests based on geo-location parameters: country, region code, and ASN</p></div><h3>Options</h3><ul><li><code>block</code> <div></div><ul><li><code>countries</code> <div><p>comma separated string of country codes to block (e.g. "US, CA")</p></div></li><li><code>regionCodes</code> <div><p>comma separated string of region codes to block (e.g. "TX, WA")</p></div></li><li><code>asns</code> <div><p>comma separated string of ASNs to block (e.g. "395747, 28304")</p></div></li></ul></li><li><code>allow</code> <div></div></li><li><code>ignoreUnknown</code> <div><p>Optional, defaults to true. Specifies whether unknown geo-location parameters should be ignored (allowed through).</p></div></li></ul> ',icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItZ2xvYmUiPjxjaXJjbGUgY3g9IjEyIiBjeT0iMTIiIHI9IjEwIj48L2NpcmNsZT48bGluZSB4MT0iMiIgeTE9IjEyIiB4Mj0iMjIiIHkyPSIxMiI+PC9saW5lPjxwYXRoIGQ9Ik0xMiAyYTE1LjMgMTUuMyAwIDAgMSA0IDEwIDE1LjMgMTUuMyAwIDAgMS00IDEwIDE1LjMgMTUuMyAwIDAgMS00LTEwIDE1LjMgMTUuMyAwIDAgMSA0LTEweiI+PC9wYXRoPjwvc3ZnPg=="},{name:"HMAC Auth",isPreview:!0,isPaidAddOn:!0,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/hmac-auth-inbound/",id:"hmac-auth-inbound",defaultHandler:{export:"HMACAuthInbound",module:"$import(@zuplo/runtime)",options:{}},exampleHtml:"<div><p>Authenticate requests using the HMAC-SHA256 authentication scheme.</p></div><h3>Options</h3><ul></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItaGFzaCI+PGxpbmUgeDE9IjQiIHkxPSI5IiB4Mj0iMjAiIHkyPSI5Ij48L2xpbmU+PGxpbmUgeDE9IjQiIHkxPSIxNSIgeDI9IjIwIiB5Mj0iMTUiPjwvbGluZT48bGluZSB4MT0iMTAiIHkxPSIzIiB4Mj0iOCIgeTI9IjIxIj48L2xpbmU+PGxpbmUgeDE9IjE2IiB5MT0iMyIgeDI9IjE0IiB5Mj0iMjEiPjwvbGluZT48L3N2Zz4="},{name:"IP Restriction",isPreview:!0,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/ip-restriction-inbound/",id:"ip-restriction-inbound",defaultHandler:{export:"IPRestrictionInbound",module:"$import(@zuplo/runtime)",options:{ipAddresses:["1.1.1.1"]}},exampleHtml:"<div><p>Block requests based on their IP address.</p></div><h3>Options</h3><ul><li><code>ipAddresses</code> <div><p>The IP addresses or CIDR ranges to block</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItbGlzdCI+PGxpbmUgeDE9IjgiIHkxPSI2IiB4Mj0iMjEiIHkyPSI2Ij48L2xpbmU+PGxpbmUgeDE9IjgiIHkxPSIxMiIgeDI9IjIxIiB5Mj0iMTIiPjwvbGluZT48bGluZSB4MT0iOCIgeTE9IjE4IiB4Mj0iMjEiIHkyPSIxOCI+PC9saW5lPjxsaW5lIHgxPSIzIiB5MT0iNiIgeDI9IjMuMDEiIHkyPSI2Ij48L2xpbmU+PGxpbmUgeDE9IjMiIHkxPSIxMiIgeDI9IjMuMDEiIHkyPSIxMiI+PC9saW5lPjxsaW5lIHgxPSIzIiB5MT0iMTgiIHgyPSIzLjAxIiB5Mj0iMTgiPjwvbGluZT48L3N2Zz4="},{name:"LDAP Auth",isPreview:!0,isPaidAddOn:!0,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/ldap-auth-inbound/",id:"ldap-auth-inbound",defaultHandler:{export:"LDAPAuthInbound",module:"$import(@zuplo/runtime)",options:{ldapConnectorName:"my-ldap-connector"}},exampleHtml:"<div><p>Authenticate requests using an LDAP server</p></div><h3>Options</h3><ul><li><code>ldapConnectorName</code> <div><p>The name of your configured LDAP service connector</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItZGF0YWJhc2UiPjxlbGxpcHNlIGN4PSIxMiIgY3k9IjUiIHJ4PSI5IiByeT0iMyI+PC9lbGxpcHNlPjxwYXRoIGQ9Ik0yMSAxMmMwIDEuNjYtNCAzLTkgM3MtOS0xLjM0LTktMyI+PC9wYXRoPjxwYXRoIGQ9Ik0zIDV2MTRjMCAxLjY2IDQgMyA5IDNzOS0xLjM0IDktM1Y1Ij48L3BhdGg+PC9zdmc+"},{name:"Mock API Response",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/mock-api-inbound/",id:"mock-api-inbound",defaultHandler:{export:"MockApiInboundPolicy",module:"$import(@zuplo/runtime)",options:{}},exampleHtml:'<div><p>Returns example responses from the OpenAPI document associated with this route.</p></div><h3>Options</h3><ul><li><code>random</code> <div><p>Optional. Indicates whether the response should be selected randomly, from the available examples (that match any filter criteria). If <code>false</code> the first matching example is used.</p></div></li><li><code>responsePrefixFilter</code> <div><p>Optional. Specifies a prefix to match the responses to select from. Typically this is a status code like "200" or "2XX". If you want the policy to select randomly from all 2XX codes, set this property to "2" and random to <code>true</code>.</p></div></li><li><code>contentType</code> <div><p>Optional. Specify the content-type of the response to select from. If not specified, the first matching response is used (or random).</p></div></li><li><code>exampleName</code> <div><p>Optional. Specify the name of the example to select. If not specified, the first matching response is used (or random).</p></div></li></ul> ',icon:"data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ic3ZnLWljb24iIHN0eWxlPSJ3aWR0aDogMWVtOyBoZWlnaHQ6IDFlbTt2ZXJ0aWNhbC1hbGlnbjogbWlkZGxlO2ZpbGw6IGN1cnJlbnRDb2xvcjtvdmVyZmxvdzogaGlkZGVuOyIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik04OTQuOCAyNTkuOGMwIDguNi0yLjkgMTUuNy04LjYgMjEuNEwyNzQuNyA4OTIuNmMtNS43IDUuNy0xMi44IDguNi0yMS40IDguNnMtMTUuNy0yLjktMjEuNC04LjZsLTk0LjEtOTQuMWMtNS43LTUuNy04LjYtMTIuOC04LjYtMjEuNHMyLjktMTUuNyA4LjYtMjEuNGw2MTEuNS02MTEuNWM1LjctNS43IDEyLjgtOC42IDIxLjQtOC42IDguNiAwIDE1LjcgMi45IDIxLjQgOC42bDk0LjEgOTQuMWM1LjcgNS44IDguNiAxMi45IDguNiAyMS41eiBtLTY0Mi40LTkwLjRsNDYuNiAxNC4zLTQ2LjYgMTQuMy0xNC4zIDQ2LjYtMTQuMy00Ni42LTQ2LjYtMTQuMyA0Ni42LTE0LjMgMTQuMy00Ni42IDE0LjMgNDYuNnogbTE2Ni40IDc3bDkzLjIgMjguNS05My4yIDI4LjUtMjguNSA5My4yLTI4LjUtOTMuMi05My4yLTI4LjUgOTMuMi0yOC41IDI4LjUtOTMuMiAyOC41IDkzLjJ6IG0xMzcuOS03N2w0Ni42IDE0LjMtNDYuNiAxNC4zLTE0LjMgNDYuNi0xNC4zLTQ2LjYtNDYuNi0xNC4zIDQ2LjYtMTQuMyAxNC4zLTQ2LjYgMTQuMyA0Ni42eiBtMTI1LjUgMjI5LjdsMTM5LjMtMTM5LjMtNTAuOS01MC45LTEzOS4zIDEzOS4zIDUwLjkgNTAuOXpNODYxIDQ3My43bDQ2LjYgMTQuMy00Ni42IDE0LjItMTQuMyA0Ni42LTE0LjMtNDYuNi00Ni42LTE0LjMgNDYuNi0xNC4zIDE0LjMtNDYuNiAxNC4zIDQ2Ljd6IiAgLz48L3N2Zz4="},{name:"Moesif Analytics & Billing",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/moesif-inbound/",id:"moesif-inbound",defaultHandler:{module:"$import(@zuplo/runtime)",export:"MoesifInboundPolicy",options:{applicationId:"YOUR_MOESIF_APPLICATION_ID",logRequestBody:!0,logResponseBody:!0}},exampleHtml:"<div><p>Moesif is an API analytics and billing service. This policy allows you to send metering calls for each API to their events batch endpoint.</p></div><h3>Options</h3><ul><li><code>applicationId</code> <div><p>Your Moesif application ID (required)</p></div></li><li><code>logRequestBody</code> <div><p>Set to false to disable sending the request body to Moesif (optional)</p></div></li><li><code>logResponseBody</code> <div><p>Set to false to disable sending the response body to Moesif (optional)</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iODRweCIgaGVpZ2h0PSI3N3B4IiB2aWV3Qm94PSIwIDAgODQgNzciIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8dGl0bGU+bW9lc2lmLWxvZ288L3RpdGxlPgogICAgPGcgaWQ9IlBhZ2UtMSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgaWQ9Im1vZXNpZi1sb2dvIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLjY3NzcsIDAuMjE5OCkiIGZpbGw9IiMwMDAwMDAiIGZpbGwtcnVsZT0ibm9uemVybyI+CiAgICAgICAgICAgIDxwYXRoIGQ9Ik03NS40NjIzMzQxLDI5LjUyMDE1NDUgTDgwLjY5MjMzNDEsMjkuNTIwMTU0NSBMODAuNjkyMzM0MSw3Ni43ODAxNTQ1IEw2NC45NDIzMzQxLDc2Ljc4MDE1NDUgTDY0Ljk0MjMzNDEsMjkuNTIwMTU0NSBMNzAuMjIyMzM0MSwyOS41MjAxNTQ1IEw3MC4yMjIzMzQxLDE5LjMyMDE1NDUgQzY2Ljg3MzYxNDUsMTguNDEwMTMxNiA2NC4yNTE4MTA3LDE1LjgwMzUyNjcgNjMuMzIyMzM0MSwxMi40NjAxNTQ1IEw1OC4xNTIzMzQxLDEyLjQ2MDE1NDUgTDQxLjMyMjMzNDEsMjkuMjkwMTU0NSBMMjQuNDkyMzM0MSwxMi40NjAxNTQ1IEwxOS4zMjIzMzQxLDEyLjQ2MDE1NDUgQzE4LjM5MzA2MjIsMTUuNzg5MzYzNSAxNS43OTE1NDMyLDE4LjM5MDg4MjUgMTIuNDYyMzM0MSwxOS4zMjAxNTQ1IEwxMi40NjIzMzQxLDUzLjE0MDE1NDUgTDE3LjcxMjMzNDEsNTMuMTQwMTU0NSBMMTcuNzEyMzM0MSw3Ni43ODAxNTQ1IEwxLjk1MjMzNDExLDc2Ljc4MDE1NDUgTDEuOTUyMzM0MTEsNTMuMTQwMTU0NSBMNy4yMDIzMzQxMSw1My4xNDAxNTQ1IEw3LjIwMjMzNDExLDE5LjMyMDE1NDUgQzIuNjIzNzkzNSwxOC4wNDYwMzYgLTAuMzg5ODIwMTc4LDEzLjY4MTYxMTIgMC4wNDA4NjE0MzMxLDguOTQ4NjQ5NjQgQzAuNDcxNTQzMDQ0LDQuMjE1Njg4MDUgNC4yMjM0Mjg1OSwwLjQ2Njg5ODEyNSA4Ljk1Njc0NDA1LDAuMDQwMTIzMzU1OSBDMTMuNjkwMDU5NSwtMC4zODY2NTE0MTQgMTguMDUxOTk1MywyLjYzMDU2MzczIDE5LjMyMjMzNDEsNy4yMTAxNTQ0NyBMMjYuNjcyMzM0MSw3LjIxMDE1NDQ3IEw0MS4zMjIzMzQxLDIxLjg3MDE1NDUgTDU1Ljk4MjMzNDEsNy4yMTAxNTQ0NyBMNjMuMzIyMzM0MSw3LjIxMDE1NDQ3IEM2NC41OTI2NzI5LDIuNjMwNTYzNzMgNjguOTU0NjA4NywtMC4zODY2NTE0MTQgNzMuNjg3OTI0MiwwLjA0MDEyMzM1NTkgQzc4LjQyMTIzOTYsMC40NjY4OTgxMjUgODIuMTczMTI1Miw0LjIxNTY4ODA1IDgyLjYwMzgwNjgsOC45NDg2NDk2NCBDODMuMDM0NDg4NCwxMy42ODE2MTEyIDgwLjAyMDg3NDcsMTguMDQ2MDM2IDc1LjQ0MjMzNDEsMTkuMzIwMTU0NSBMNzUuNDYyMzM0MSwyOS41MjAxNTQ1IFoiIGlkPSJQYXRoIj48L3BhdGg+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4="},{name:"mTLS Auth",isPreview:!1,isPaidAddOn:!0,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/mtls-auth-inbound/",id:"mtls-auth-inbound",defaultHandler:{export:"MTLSAuthInbound",module:"$import(@zuplo/runtime)",options:{}},exampleHtml:"<div><p>Authenticate requests based on the mTLS protocol</p></div><h3>Options</h3><ul></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGNsYXNzPSJoLTYgdy02IiBmaWxsPSJub25lIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjIiPjxwYXRoIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTggN2gxMm0wIDBsLTQtNG00IDRsLTQgNG0wIDZING0wIDBsNCA0bS00LTRsNC00IiAvPjwvc3ZnPg=="},{name:"Okta JWT Auth",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/okta-jwt-auth-inbound/",id:"okta-jwt-auth-inbound",defaultHandler:{export:"OktaJwtInboundPolicy",module:"$import(@zuplo/runtime)",options:{allowUnauthenticatedRequests:!1,issuerUrl:"$env(OKTA_ISSUER_URL)",audience:"$env(OKTA_AUDIENCE)"}},exampleHtml:`<div><p>Authenticate users using Okta issued JWT tokens.</p></div><h3>Options</h3><ul><li><code>allowUnauthenticatedRequests</code> <div><p>Allow unauthenticated requests to proceed. This is use useful if you want to use multiple authentication policies or if you want to allow both authenticated and non-authenticated traffic.</p></div></li><li><code>issuerUrl</code> <div><p>Your Okta authorization server's issuer URL. For example, <a href="https://dev-12345.okta.com/oauth2/abc">https://dev-12345.okta.com/oauth2/abc</a></p></div></li><li><code>audience</code> <div><p>The Okta audience of your API, for example api://my-api</p></div></li></ul> `,icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2NCIgaGVpZ2h0PSI2NCI+PHBhdGggZD0iTTMyIDBDMTQuMzcgMCAwIDE0LjI2NyAwIDMyczE0LjI2OCAzMiAzMiAzMiAzMi0xNC4yNjggMzItMzJTNDkuNjMgMCAzMiAwem0wIDQ4Yy04Ljg2NiAwLTE2LTcuMTM0LTE2LTE2czcuMTM0LTE2IDE2LTE2IDE2IDcuMTM0IDE2IDE2LTcuMTM0IDE2LTE2IDE2eiIgZmlsbD0iIzAwMDAwMCIvPjwvc3ZnPg=="},{name:"JWT Auth",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/open-id-jwt-auth-inbound/",id:"open-id-jwt-auth-inbound",defaultHandler:{export:"OpenIdJwtInboundPolicy",module:"$import(@zuplo/runtime)",options:{allowUnauthenticatedRequests:!1,audience:"$env(AUTH_AUDIENCE)",issuer:"$env(AUTH_ISSUER)",jwkUrl:"$env(JWK_URL)"}},exampleHtml:"<div><p>The Open ID JWT Authentication policy allows you to authenticate incoming requests using an Open ID compliant bearer token.</p></div><h3>Options</h3><ul><li><code>issuer</code> <div><p>The expected issuer claim in the JWT token.</p></div></li><li><code>audience</code> <div><p>The expected audience claim in the JWT token (optional).</p></div></li><li><code>jwkUrl</code> <div><p>the url of the JSON Web Key Set (JWKS) - this is used to validate the JWT token signature (either this or <code>secret</code> must be set).</p></div></li><li><code>secret</code> <div><p>The key used to verify the signature of the JWT token (either this or <code>jwkUrl</code> must be set)</p></div></li><li><code>allowUnauthenticatedRequests</code> <div><p>indicates whether the request should continue if authentication fails. Defaults is <code>false</code> which means unauthenticated users will automatically receive a 401 response.</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGNsYXNzPSJoLTYgdy02IiBmaWxsPSJub25lIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjIiPjxwYXRoIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTEyIDE1djJtLTYgNGgxMmEyIDIgMCAwMDItMnYtNmEyIDIgMCAwMC0yLTJINmEyIDIgMCAwMC0yIDJ2NmEyIDIgMCAwMDIgMnptMTAtMTBWN2E0IDQgMCAwMC04IDB2NGg4eiIgLz48L3N2Zz4="},{name:"PropelAuth JWT Auth",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/propel-auth-jwt-inbound/",id:"propel-auth-jwt-inbound",defaultHandler:{export:"PropelAuthJwtInboundPolicy",module:"$import(@zuplo/runtime)",options:{allowUnauthenticatedRequests:!1,authUrl:"$env(PROPEL_AUTH_URL)",verifierKey:"$env(PROPEL_VERIFIER_KEY)"}},exampleHtml:`<div><p>Authenticate users using PropelAuth issued JWT tokens.</p></div><h3>Options</h3><ul><li><code>allowUnauthenticatedRequests</code> <div><p>Allow unauthenticated requests to proceed. This is use useful if you want to use multiple authentication policies or if you want to allow both authenticated and non-authenticated traffic.</p></div></li><li><code>authUrl</code> <div><p>Your PropelAuth authUrl. For example, <a href="https://6587563.propelauthtest.com">https://6587563.propelauthtest.com</a></p></div></li><li><code>verifierKey</code> <div><p>Your public (verifier) key that is used to verify access tokens. This key has a value that begins with '-----BEGIN PUBLIC KEY-----'. Make sure to remove all line breaks from the key before saving the variable.</p></div></li></ul> `,icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2NCIgaGVpZ2h0PSI2NCIgdmlld0JveD0iMCAwIDQwIDQwIiBmaWxsPSJub25lIj4KICA8cGF0aAogICAgZD0iTTM3LjU0NzggMTYuMjkxNEMzNy4wODc3IDE0LjA0NjUgMzYuMjE3NCAxMS45NDQxIDM0Ljk1NTEgMTAuMDMyMUwzNi4xODg1IDguMDExNEwzMS44MzY3IDMuNjU5NkwyOS44MTYgNC44OTI5NkMyNy45MDMzIDMuNjMwNjggMjUuODAxNiAyLjc2MDQ1IDIzLjU1NjcgMi4zMDAyNkwyMy4wMDA3IDBIMTYuODQ3NEwxNi4yOTE0IDIuMzAwMjZDMTQuMDQ2NSAyLjc2MDQ1IDExLjk0NDEgMy42MzA2OCAxMC4wMzIxIDQuODkyOTZMOC4wMTE0IDMuNjU5NkwzLjY1OTYgOC4wMTE0TDQuODkyOTYgMTAuMDMyMUMzLjYzMDY4IDExLjk0NDggMi43NjA0NSAxNC4wNDY1IDIuMzAwMjYgMTYuMjkxNEwwIDE2Ljg0NzRWMjMuMDAwN0wyLjMwMDI2IDIzLjU1NjdDMi43NjA0NSAyNS44MDE2IDMuNjMwNjggMjcuOTA0IDQuODkyOTYgMjkuODE2TDMuNjU5NiAzMS44MzY3TDguMDExNCAzNi4xODg1TDEwLjAzMjEgMzQuOTU1MUMxMS45NDQ4IDM2LjIxNzQgMTQuMDQ2NSAzNy4wODc3IDE2LjI5MTQgMzcuNTQ3OEwxNi44NDc0IDM5Ljg0ODFIMjMuMDAwN0wyMy41NTY3IDM3LjU0NzhDMjUuODAxNiAzNy4wODc3IDI3LjkwNCAzNi4yMTc0IDI5LjgxNiAzNC45NTUxTDMxLjgzNjcgMzYuMTg4NUwzNi4xODg1IDMxLjgzNjdMMzQuOTU1MSAyOS44MTZDMzYuMjE3NCAyNy45MDMzIDM3LjA4NzcgMjUuODAxNiAzNy41NDc4IDIzLjU1NjdMMzkuODQ4MSAyMy4wMDA3VjE2Ljg0NzRMMzcuNTQ3OCAxNi4yOTE0Wk0zOC41NjI3IDIxLjk4OTFMMzYuNDM2NiAyMi41MDMzTDM2LjM2MiAyMi45MTU5QzM1LjkzNTkgMjUuMjcyMSAzNS4wMjc4IDI3LjQ2NDMgMzMuNjYyNiAyOS40MzM2TDMzLjQyNDggMjkuNzc2OEwzNC41NjM3IDMxLjY0MzlMMzEuNjQzMyAzNC41NjQ0TDI5Ljc3NjIgMzMuNDI1NUwyOS40MzMgMzMuNjYzM0MyNy40NjQzIDM1LjAyODQgMjUuMjcxNCAzNS45MzY2IDIyLjkxNTIgMzYuMzYyN0wyMi41MDI2IDM2LjQzNzJMMjEuOTg5MSAzOC41NjI3SDE3Ljg1OUwxNy4zNDQ5IDM2LjQzNjZMMTYuOTMyMiAzNi4zNjJDMTQuNTc2MSAzNS45MzU5IDEyLjM4MzggMzUuMDI3OCAxMC40MTQ1IDMzLjY2MjZMMTAuMDcxMyAzMy40MjQ4TDguMjA0MjEgMzQuNTYzN0w1LjI4MzczIDMxLjY0MzNMNi40MjI2MSAyOS43NzYyTDYuMTg0ODEgMjkuNDMzQzQuODE5NjkgMjcuNDY0MyAzLjkxMTU0IDI1LjI3MTQgMy40ODU0MiAyMi45MTUyTDMuNDEwODcgMjIuNTAyNkwxLjI4NTQyIDIxLjk4OTFWMTcuODU5TDMuNDExNTEgMTcuMzQ0OUwzLjQ4NjA3IDE2LjkzMjJDMy45MTIxOCAxNC41NzYxIDQuODIwMzMgMTIuMzgzOCA2LjE4NTQ1IDEwLjQxNDVMNi40MjMyNiAxMC4wNzEzTDUuMjg0MzcgOC4yMDQyMUw4LjIwNDg1IDUuMjgzNzNMMTAuMDcxOSA2LjQyMjYxTDEwLjQxNTEgNi4xODQ4MUMxMi4zODM4IDQuODE5NjkgMTQuNTc2NyAzLjkxMTU0IDE2LjkzMjkgMy40ODU0MkwxNy4zNDU1IDMuNDEwODdMMTcuODU5IDEuMjg1NDJIMjEuOTg5MUwyMi41MDMzIDMuNDExNTFMMjIuOTE1OSAzLjQ4NjA3QzI1LjI3MjEgMy45MTIxOCAyNy40NjQzIDQuODIwMzMgMjkuNDMzNiA2LjE4NTQ1TDI5Ljc3NjggNi40MjMyNkwzMS42NDM5IDUuMjg0MzdMMzQuNTY0NCA4LjIwNDg1TDMzLjQyNTUgMTAuMDcxOUwzMy42NjMzIDEwLjQxNTFDMzUuMDI4NCAxMi4zODM4IDM1LjkzNjYgMTQuNTc2NyAzNi4zNjI3IDE2LjkzMjlMMzYuNDM3MiAxNy4zNDU1TDM4LjU2MzMgMTcuODU5N1YyMS45ODkxSDM4LjU2MjdaIgogICAgZmlsbD0iIzAwMDAwMCIgLz4KICA8cGF0aCBkPSJNMjAuNTY2NyAyLjU3MDg5SDE5LjI4MTJWMy44NTYzMkgyMC41NjY3VjIuNTcwODlaIiBmaWxsPSIjMDAwMDAwIiAvPgogIDxwYXRoIGQ9Ik04LjEwNzY1IDcuMTk5MDVMNy4xOTg3MyA4LjEwNzk3TDguMTA3NjUgOS4wMTY4OUw5LjAxNjU4IDguMTA3OTdMOC4xMDc2NSA3LjE5OTA1WiIKICAgIGZpbGw9IiMwMDAwMDAiIC8+CiAgPHBhdGggZD0iTTMuODU2MjIgMTkuMjgxNEgyLjU3MDhWMjAuNTY2OEgzLjg1NjIyVjE5LjI4MTRaIiBmaWxsPSIjMDAwMDAwIiAvPgogIDxwYXRoIGQ9Ik04LjEwNzY1IDMwLjgzMTNMNy4xOTg3MyAzMS43NDAzTDguMTA3NjUgMzIuNjQ5Mkw5LjAxNjU4IDMxLjc0MDNMOC4xMDc2NSAzMC44MzEzWiIKICAgIGZpbGw9IiMwMDAwMDAiIC8+CiAgPHBhdGggZD0iTTIwLjU2NjcgMzUuOTkxOUgxOS4yODEyVjM3LjI3NzNIMjAuNTY2N1YzNS45OTE5WiIgZmlsbD0iIzAwMDAwMCIgLz4KICA8cGF0aCBkPSJNMzEuNzQgMzAuODMxM0wzMC44MzExIDMxLjc0MDJMMzEuNzQgMzIuNjQ5MUwzMi42NDg5IDMxLjc0MDJMMzEuNzQgMzAuODMxM1oiCiAgICBmaWxsPSIjMDAwMDAwIiAvPgogIDxwYXRoIGQ9Ik0zNy4yNzcxIDE5LjI4MTRIMzUuOTkxN1YyMC41NjY4SDM3LjI3NzFWMTkuMjgxNFoiIGZpbGw9IiMwMDAwMDAiIC8+CiAgPHBhdGggZD0iTTMxLjc0IDcuMTk4OTZMMzAuODMxMSA4LjEwNzg4TDMxLjc0IDkuMDE2OEwzMi42NDg5IDguMTA3ODhMMzEuNzQgNy4xOTg5NloiCiAgICBmaWxsPSIjMDAwMDAwIiAvPgogIDxwYXRoCiAgICBkPSJNMTkuOTI0IDUuMTQxNjlDMTEuNzcyNSA1LjE0MTY5IDUuMTQxNiAxMS43NzI1IDUuMTQxNiAxOS45MjQxQzUuMTQxNiAyOC4wNzU2IDExLjc3MjUgMzQuNzA2NCAxOS45MjQgMzQuNzA2NEMyOC4wNzU1IDM0LjcwNjQgMzQuNzA2MyAyOC4wNzU2IDM0LjcwNjMgMTkuOTI0MUMzNC43MDYzIDExLjc3MjUgMjguMDc1NSA1LjE0MTY5IDE5LjkyNCA1LjE0MTY5Wk0xOS45MjQgMzMuNDIxQzEyLjQ4MiAzMy40MjEgNi40MjcwMiAyNy4zNjYgNi40MjcwMiAxOS45MjQxQzYuNDI3MDIgMTIuNDgyMSAxMi40ODIgNi40MjcxMiAxOS45MjQgNi40MjcxMkMyNy4zNjU5IDYuNDI3MTIgMzMuNDIwOSAxMi40ODIxIDMzLjQyMDkgMTkuOTI0MUMzMy40MjA5IDI3LjM2NiAyNy4zNjU5IDMzLjQyMSAxOS45MjQgMzMuNDIxWiIKICAgIGZpbGw9IiMwMDAwMDAiIC8+CiAgPHBhdGgKICAgIGQ9Ik0yNS43MDgyIDE4LjExNDJWMTQuNzgyNEMyNS43MDgyIDExLjU5MjYgMjMuMTEzNiA4Ljk5Nzk5IDE5LjkyMzggOC45OTc5OUMxNi43MzQxIDguOTk3OTkgMTQuMTM5NCAxMS41OTI2IDE0LjEzOTQgMTQuNzgyNFYxOC4xMTQyQzEzLjM5MzIgMTguMzgwMyAxMi44NTQgMTkuMDg3MyAxMi44NTQgMTkuOTI0MVYyMy43ODAzQzEyLjg1NCAyNy42Nzg0IDE2LjAyNTggMzAuODUwMiAxOS45MjM4IDMwLjg1MDJDMjMuODIxOSAzMC44NTAyIDI2Ljk5MzcgMjcuNjc4NCAyNi45OTM3IDIzLjc4MDNWMTkuOTI0MUMyNi45OTM3IDE5LjA4NzMgMjYuNDU0NCAxOC4zODAzIDI1LjcwODIgMTguMTE0MlpNMTkuOTIzOCAxMC4yODM0QzIyLjQwNDEgMTAuMjgzNCAyNC40MjI4IDEyLjMwMjIgMjQuNDIyOCAxNC43ODI0VjE3Ljk5NTlIMjMuMTM3NFYxNC43ODI0QzIzLjEzNzQgMTMuMDEwNCAyMS42OTU4IDExLjU2ODggMTkuOTIzOCAxMS41Njg4QzE4LjE1MTkgMTEuNTY4OCAxNi43MTAzIDEzLjAxMDQgMTYuNzEwMyAxNC43ODI0VjE3Ljk5NTlIMTUuNDI0OFYxNC43ODI0QzE1LjQyNDggMTIuMzAyMiAxNy40NDM2IDEwLjI4MzQgMTkuOTIzOCAxMC4yODM0Wk0yMS44NTIgMTcuOTk1OUgxNy45OTU3VjE0Ljc4MjRDMTcuOTk1NyAxMy43MTkzIDE4Ljg2MDggMTIuODU0MyAxOS45MjM4IDEyLjg1NDNDMjAuOTg2OSAxMi44NTQzIDIxLjg1MiAxMy43MTkzIDIxLjg1MiAxNC43ODI0VjE3Ljk5NTlaTTI1LjcwODIgMjMuNzgwM0MyNS43MDgyIDI2Ljk3MDEgMjMuMTEzNiAyOS41NjQ4IDE5LjkyMzggMjkuNTY0OEMxNi43MzQxIDI5LjU2NDggMTQuMTM5NCAyNi45NzAxIDE0LjEzOTQgMjMuNzgwM1YxOS45MjQxQzE0LjEzOTQgMTkuNTY5MyAxNC40Mjc0IDE5LjI4MTQgMTQuNzgyMSAxOS4yODE0SDI1LjA2NTVDMjUuNDIwMyAxOS4yODE0IDI1LjcwODIgMTkuNTY5MyAyNS43MDgyIDE5LjkyNDFWMjMuNzgwM1oiCiAgICBmaWxsPSIjMDAwMDAwIiAvPgogIDxwYXRoCiAgICBkPSJNMTkuOTIzOSAyMC41NjY4QzE4LjUwNjEgMjAuNTY2OCAxNy4zNTMgMjEuNzE5OCAxNy4zNTMgMjMuMTM3NkMxNy4zNTMgMjQuMzMyNCAxOC4xNzUxIDI1LjMyOTkgMTkuMjgxMiAyNS42MTcyVjI4LjI3OTNIMjAuNTY2NlYyNS42MTcyQzIxLjY3MjcgMjUuMzI5OSAyMi40OTQ3IDI0LjMzMjQgMjIuNDk0NyAyMy4xMzc2QzIyLjQ5NDcgMjEuNzE5OCAyMS4zNDE3IDIwLjU2NjggMTkuOTIzOSAyMC41NjY4Wk0xOS45MjM5IDI0LjQyM0MxOS4yMTUgMjQuNDIzIDE4LjYzODUgMjMuODQ2NSAxOC42Mzg1IDIzLjEzNzZDMTguNjM4NSAyMi40Mjg3IDE5LjIxNSAyMS44NTIyIDE5LjkyMzkgMjEuODUyMkMyMC42MzI4IDIxLjg1MjIgMjEuMjA5MyAyMi40Mjg3IDIxLjIwOTMgMjMuMTM3NkMyMS4yMDkzIDIzLjg0NjUgMjAuNjMyOCAyNC40MjMgMTkuOTIzOSAyNC40MjNaIgogICAgZmlsbD0iIzAwMDAwMCIgLz4KPC9zdmc+"},{name:"Quota",isPreview:!0,isPaidAddOn:!0,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/quota-inbound/",id:"quota-inbound",defaultHandler:{export:"QuotaInbound",module:"$import(@zuplo/runtime)",options:{}},exampleHtml:"<div><p>Enforce quota policies on requests</p></div><h3>Options</h3><ul></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGNsYXNzPSJoLTYgdy02IiBmaWxsPSJub25lIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjIiPjxwYXRoIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTMgNmwzIDFtMCAwbC0zIDlhNS4wMDIgNS4wMDIgMCAwMDYuMDAxIDBNNiA3bDMgOU02IDdsNi0ybTYgMmwzLTFtLTMgMWwtMyA5YTUuMDAyIDUuMDAyIDAgMDA2LjAwMSAwTTE4IDdsMyA5bS0zLTlsLTYtMm0wLTJ2Mm0wIDE2VjVtMCAxNkg5bTMgMGgzIiAvPjwvc3ZnPg=="},{name:"Rate Limiting",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/rate-limit-inbound/",id:"rate-limit-inbound",defaultHandler:{export:"RateLimitInboundPolicy",module:"$import(@zuplo/runtime)",options:{rateLimitBy:"ip",requestsAllowed:2,timeWindowMinutes:1}},exampleHtml:"<div><p>The rate-limiting policy is used to limit the number of requests that can be made against your API based on a key.</p></div><h3>Options</h3><ul><li><code>rateLimitBy</code> <div><p>The identifying element of the request that enforces distinct rate limits. For example, you can limit by <code>user</code>, <code>ip</code>, <code>function</code> or <code>all</code> - function allows you to specify a simple function to create a string identifier to create a rate-limit group</p></div></li><li><code>requestsAllowed</code> <div><p>The max number of requests allowed in the given time window</p></div></li><li><code>timeWindowMinutes</code> <div><p>The time window in which the requests are rate-limited. The count restarts after each window expires</p></div></li><li><code>identifier</code> <div><p>The function that returns dynamic configuration data. Used only with <code>rateLimitBy=function</code></p></div><ul><li><code>export</code> <div><p>used only with rateLimitBy=function. Specifies the export to load your custom bucket function, e.g. <code>default</code>, <code>rateLimitIdentifier</code>.</p></div></li><li><code>module</code> <div><p>Specifies the module to load your custom bucket function, in the format <code>$import(./modules/my-module)</code></p></div></li></ul></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGNsYXNzPSJoLTYgdy02IiBmaWxsPSJub25lIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjIiPjxwYXRoIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTExLjkzMyAxMi44YTEgMSAwIDAwMC0xLjZMNi42IDcuMkExIDEgMCAwMDUgOHY4YTEgMSAwIDAwMS42LjhsNS4zMzMtNHpNMTkuOTMzIDEyLjhhMSAxIDAgMDAwLTEuNmwtNS4zMzMtNEExIDEgMCAwMDEzIDh2OGExIDEgMCAwMDEuNi44bDUuMzMzLTR6IiAvPjwvc3ZnPg=="},{name:"Readme Metrics",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/readme-metrics-inbound/",id:"readme-metrics-inbound",defaultHandler:{module:"$import(@zuplo/runtime)",export:"ReadmeMetricsInboundPolicy",options:{apiKey:"YOUR_API_KEY",userLabelPropertyPath:".sub",development:!0,useFullRequestPath:!1}},exampleHtml:`<div><p>Readme is a developer documentation and API metrics company. This policy pushes logs to their API calls dashboard.</p></div><h3>Options</h3><ul><li><code>apiKey</code> <div><p>The API key to use when sending metrics calls to Readme</p></div></li><li><code>userLabelPropertyPath</code> <div><p>Optional - defaults to '.sub'. This is the path to the property on <code>request.user</code> that contains the label you want to use. For example <code>.data.accountNumber</code> would read the <code>request.user.data.accountNumber</code> property.</p></div></li><li><code>userEmailPropertyPath</code> <div><p>Optional - defaults to empty. This is the path to the property on <code>request.user</code> that contains the e-mail of the user. For example <code>.data.email</code> would read the <code>request.user.data.email</code> property.</p></div></li><li><code>development</code> <div><p>Optional. Whether the data should be ingested as 'development' mode or not. Defaults to true for working-copy and false for all other environments.</p></div></li><li><code>useFullRequestPath</code> <div><p>Optional - defaults to false. When true, Zuplo sends the full request path (which might contain sensitive information). By default, we only send the route path which should not contain sensitive information.</p></div></li><li><code>url</code> <div><p>Optional, the URL to send metering events to (defaults to <a href="https://metrics.readme.io/request">https://metrics.readme.io/request</a>). This is useful for testing purposes.</p></div></li></ul> `,icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiIGlkPSJyZWFkbWUiPjxwYXRoIGQ9Ik0yNCwxNS41MjRWNS4yNmMwLTEuMTAzLTAuODg3LTIuMDAxLTEuOTg3LTIuMDFoLTAuMDAyaC01LjgyNWMtMi4wMDQsMC0zLjc0NiwxLjM5MS00LjE4MywzLjM1NEMxMS41NjEsNC42NDEsOS44MjQsMy4yNSw3LjgyLDMuMjVIMmMtMS4xMDQsMC0yLDAuODk4LTIsMi4wMDV2MTAuMjY5YzAsMS4xMDcsMC44OTYsMi4wMDUsMiwyLjAwNWgzLjczOGM0LjI1OCwwLDUuNTI5LDEuMDIsNi4xMzcsMy4xMzNjMC4wMjksMC4xMTcsMC4yMTcsMC4xMTcsMC4yNSwwYzAuNjEzLTIuMTE0LDEuODg0LTMuMTMzLDYuMTM4LTMuMTMzSDIyQzIzLjEwNCwxNy41MjksMjQsMTYuNjMxLDI0LDE1LjUyNHogTTEwLjA4NywxNC4zMzdoLTAuMDA0YzAsMC4wNzktMC4wNjIsMC4xNDYtMC4xNDYsMC4xNDZIMy4yNThjLTAuMDc5LDAtMC4xNDYtMC4wNjItMC4xNDYtMC4xNDZWMTMuMzhjMC0wLjA3OSwwLjA2Mi0wLjE0NiwwLjE0Ni0wLjE0Nmg2LjY4M2MwLjA3OSwwLDAuMTQ2LDAuMDYyLDAuMTQ2LDAuMTQ2VjE0LjMzN3ogTTEwLjA4NywxMS43OTNoLTAuMDA0YzAsMC4wNzktMC4wNjIsMC4xNDYtMC4xNDYsMC4xNDZIMy4yNThjLTAuMDc5LDAtMC4xNDYtMC4wNjItMC4xNDYtMC4xNDZ2LTAuOTU2YzAtMC4wNzksMC4wNjItMC4xNDYsMC4xNDYtMC4xNDZoNi42ODNjMC4wNzksMCwwLjE0NiwwLjA2MiwwLjE0NiwwLjE0NlYxMS43OTN6IE0xMC4wODcsOS4yNDloLTAuMDA0YzAsMC4wNzktMC4wNjIsMC4xNDYtMC4xNDYsMC4xNDZIMy4yNThjLTAuMDc5LDAtMC4xNDYtMC4wNjItMC4xNDYtMC4xNDZWOC4yOTJjMC0wLjA3OSwwLjA2Mi0wLjE0NiwwLjE0Ni0wLjE0Nmg2LjY4M2MwLjA3OSwwLDAuMTQ2LDAuMDYyLDAuMTQ2LDAuMTQ2VjkuMjQ5eiBNMjAuODksMTQuMzMzaC0wLjAwNGMwLDAuMDc5LTAuMDYyLDAuMTQ2LTAuMTQ2LDAuMTQ2aC02LjY3OWMtMC4wNzksMC0wLjE0Ni0wLjA2Mi0wLjE0Ni0wLjE0NnYtMC45NTZjMC0wLjA3OSwwLjA2Mi0wLjE0NiwwLjE0Ni0wLjE0Nmg2LjY4M2MwLjA3OSwwLDAuMTQ2LDAuMDYyLDAuMTQ2LDAuMTQ2VjE0LjMzM3ogTTIwLjg5LDExLjc4OWgtMC4wMDRjMCwwLjA3OS0wLjA2MiwwLjE0Ni0wLjE0NiwwLjE0NmgtNi42NzljLTAuMDc5LDAtMC4xNDYtMC4wNjItMC4xNDYtMC4xNDZ2LTAuOTU2YzAtMC4wNzksMC4wNjItMC4xNDYsMC4xNDYtMC4xNDZoNi42ODNjMC4wNzksMCwwLjE0NiwwLjA2MiwwLjE0NiwwLjE0NlYxMS43ODl6IE0yMC44OSw5LjI0NGgtMC4wMDRjMCwwLjA3OS0wLjA2MiwwLjE0Ni0wLjE0NiwwLjE0NmgtNi42NzljLTAuMDc5LDAtMC4xNDYtMC4wNjItMC4xNDYtMC4xNDZWOC4yOTJjMC0wLjA3OSwwLjA2Mi0wLjE0NiwwLjE0Ni0wLjE0Nmg2LjY4M2MwLjA3OSwwLDAuMTQ2LDAuMDYyLDAuMTQ2LDAuMTQ2VjkuMjQ0eiI+PC9wYXRoPjwvc3ZnPg=="},{name:"Remove Request Headers",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/remove-headers-inbound/",id:"remove-headers-inbound",defaultHandler:{export:"RemoveHeadersInboundPolicy",module:"$import(@zuplo/runtime)",options:{headers:["HEADER_NAME"]}},exampleHtml:"<div><p>Remove headers from the incoming request.</p></div><h3>Options</h3><ul><li><code>headers</code> <div><p>A list of headers to be removed from the incoming request</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItYWxpZ24tcmlnaHQiPjxsaW5lIHgxPSIyMSIgeTE9IjEwIiB4Mj0iNyIgeTI9IjEwIj48L2xpbmU+PGxpbmUgeDE9IjIxIiB5MT0iNiIgeDI9IjMiIHkyPSI2Ij48L2xpbmU+PGxpbmUgeDE9IjIxIiB5MT0iMTQiIHgyPSIzIiB5Mj0iMTQiPjwvbGluZT48bGluZSB4MT0iMjEiIHkxPSIxOCIgeDI9IjciIHkyPSIxOCI+PC9saW5lPjwvc3ZnPg=="},{name:"Remove Response Headers",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/remove-headers-outbound/",id:"remove-headers-outbound",defaultHandler:{export:"RemoveHeadersOutboundPolicy",module:"$import(@zuplo/runtime)",options:{headers:["HEADER_NAME"]}},exampleHtml:"<div><p>Remove configured headers from the outgoing response.</p></div><h3>Options</h3><ul></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItYWxpZ24tcmlnaHQiPjxsaW5lIHgxPSIyMSIgeTE9IjEwIiB4Mj0iNyIgeTI9IjEwIj48L2xpbmU+PGxpbmUgeDE9IjIxIiB5MT0iNiIgeDI9IjMiIHkyPSI2Ij48L2xpbmU+PGxpbmUgeDE9IjIxIiB5MT0iMTQiIHgyPSIzIiB5Mj0iMTQiPjwvbGluZT48bGluZSB4MT0iMjEiIHkxPSIxOCIgeDI9IjciIHkyPSIxOCI+PC9saW5lPjwvc3ZnPg=="},{name:"Remove Query Parameters",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/remove-query-params-inbound/",id:"remove-query-params-inbound",defaultHandler:{export:"RemoveQueryParamsInboundPolicy",module:"$import(@zuplo/runtime)",options:{params:["PARAM_NAME"]}},exampleHtml:"<div><p>Remove query parameters from the incoming request</p></div><h3>Options</h3><ul><li><code>params</code> <div><p>Array of query parameters to be removed</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItaGVscC1jaXJjbGUiPjxjaXJjbGUgY3g9IjEyIiBjeT0iMTIiIHI9IjEwIj48L2NpcmNsZT48cGF0aCBkPSJNOS4wOSA5YTMgMyAwIDAgMSA1LjgzIDFjMCAyLTMgMy0zIDMiPjwvcGF0aD48bGluZSB4MT0iMTIiIHkxPSIxNyIgeDI9IjEyLjAxIiB5Mj0iMTciPjwvbGluZT48L3N2Zz4="},{name:"Replace String in Response Body",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/replace-string-outbound/",id:"replace-string-outbound",defaultHandler:{export:"ReplaceStringOutboundPolicy",module:"$import(@zuplo/runtime)",options:{mode:"regexp",match:"https://example.com/api/(v1|v0)/",replaceWith:"https://my-gateway.com/v1/"}},exampleHtml:"<div><p>Replace a string in the incoming request body</p></div><h3>Options</h3><ul><li><code>mode</code> <div><p>The type of string replacement to perform</p></div></li><li><code>match</code> <div><p>The pattern to match</p></div></li><li><code>replaceWith</code> <div><p>The value to each match is replaced with</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItcmVwZWF0Ij48cG9seWxpbmUgcG9pbnRzPSIxNyAxIDIxIDUgMTcgOSI+PC9wb2x5bGluZT48cGF0aCBkPSJNMyAxMVY5YTQgNCAwIDAgMSA0LTRoMTQiPjwvcGF0aD48cG9seWxpbmUgcG9pbnRzPSI3IDIzIDMgMTkgNyAxNSI+PC9wb2x5bGluZT48cGF0aCBkPSJNMjEgMTN2MmE0IDQgMCAwIDEtNCA0SDMiPjwvcGF0aD48L3N2Zz4="},{name:"Request Size Limit",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/request-size-limit-inbound/",id:"request-size-limit-inbound",defaultHandler:{export:"RequestSizeLimitInboundPolicy",module:"$import(@zuplo/runtime)",options:{maxSizeInBytes:4098,trustContentLengthHeader:!0}},exampleHtml:"<div><p>Enforces a maximum size on incoming requests</p></div><h3>Options</h3><ul><li><code>maxSizeInBytes</code> <div><p>The maximum size of the request in bytes</p></div></li><li><code>trustContentLengthHeader</code> <div><p>If true, the policy will reject any request with a <code>content-length</code> header in excess of <code>maxSizeInBytes</code> bytes value, but will not verify the actual size of the request. This is more efficient and offers slightly better memory usage but should only be used if you trust/control the clients calling the gateway to send an accurate content-length. If false, the gateway will actually verify the request size and reject any request with a size in excess of the stated maximum.</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItdHJ1Y2siPjxyZWN0IHg9IjEiIHk9IjMiIHdpZHRoPSIxNSIgaGVpZ2h0PSIxMyI+PC9yZWN0Pjxwb2x5Z29uIHBvaW50cz0iMTYgOCAyMCA4IDIzIDExIDIzIDE2IDE2IDE2IDE2IDgiPjwvcG9seWdvbj48Y2lyY2xlIGN4PSI1LjUiIGN5PSIxOC41IiByPSIyLjUiPjwvY2lyY2xlPjxjaXJjbGUgY3g9IjE4LjUiIGN5PSIxOC41IiByPSIyLjUiPjwvY2lyY2xlPjwvc3ZnPg=="},{name:"Request Validation",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/request-validation-inbound/",id:"request-validation-inbound",defaultHandler:{export:"RequestValidationInboundPolicy",module:"$import(@zuplo/runtime)",options:{logLevel:"info",validateBody:"log-only",includeRequestInLogs:!1}},exampleHtml:"<div><p>Validate inbound requests based on Open API specification</p></div><h3>Options</h3><ul><li><code>logLevel</code> <div><p>Optional. Specify one of the log levels: 'error | warn | info | debug'. Default: info</p></div></li><li><code>validateBody</code> <div><p>Optional. Specify one of the options: 'none, log-only, reject-and-log, reject-only'. Default: none</p></div></li><li><code>validateQueryParameters</code> <div><p>Optional. Specify one of the options: 'none, log-only, reject-and-log, reject-only'. Default: none</p></div></li><li><code>validatePathParameters</code> <div><p>Optional. Specify one of the options: 'none, log-only, reject-and-log, reject-only'. Default: none</p></div></li><li><code>validateHeaders</code> <div><p>Optional. Specify one of the options: 'none, log-only, reject-and-log, reject-only'. Default: none</p></div></li><li><code>includeRequestInLogs</code> <div><p>Optional. Specify whether to include the request in the logs. Default: false</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItY2hlY2stc3F1YXJlIj48cG9seWxpbmUgcG9pbnRzPSI5IDExIDEyIDE0IDIyIDQiPjwvcG9seWxpbmU+PHBhdGggZD0iTTIxIDEydjdhMiAyIDAgMCAxLTIgMkg1YTIgMiAwIDAgMS0yLTJWNWEyIDIgMCAwIDEgMi0yaDExIj48L3BhdGg+PC9zdmc+"},{name:"Require Origin",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/require-origin-inbound/",id:"require-origin-inbound",defaultHandler:{export:"RequireOriginInboundPolicy",module:"$import(@zuplo/runtime)",options:{origins:"https://contoso.com, https://sub.contoso.com",failureDetail:"Invalid Request - contact support at support@contoso.com"}},exampleHtml:"<div><p>Sets an allow-list for an origin header</p></div><h3>Options</h3><ul><li><code>origins</code> <div><p>A comma separated string containing valid origins</p></div></li><li><code>failureDetail</code> <div><p>The <code>detail</code> of the HTTP Problem response, if the origin is missing or disallowed</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyNCAyNCIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZT0iY3VycmVudENvbG9yIiBjbGFzcz0idy02IGgtNiI+CiAgPHBhdGggc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBkPSJNMTIgMjFhOS4wMDQgOS4wMDQgMCAwMDguNzE2LTYuNzQ3TTEyIDIxYTkuMDA0IDkuMDA0IDAgMDEtOC43MTYtNi43NDdNMTIgMjFjMi40ODUgMCA0LjUtNC4wMyA0LjUtOVMxNC40ODUgMyAxMiAzbTAgMThjLTIuNDg1IDAtNC41LTQuMDMtNC41LTlTOS41MTUgMyAxMiAzbTAgMGE4Ljk5NyA4Ljk5NyAwIDAxNy44NDMgNC41ODJNMTIgM2E4Ljk5NyA4Ljk5NyAwIDAwLTcuODQzIDQuNTgybTE1LjY4NiAwQTExLjk1MyAxMS45NTMgMCAwMTEyIDEwLjVjLTIuOTk4IDAtNS43NC0xLjEtNy44NDMtMi45MThtMTUuNjg2IDBBOC45NTkgOC45NTkgMCAwMTIxIDEyYzAgLjc3OC0uMDk5IDEuNTMzLS4yODQgMi4yNTNtMCAwQTE3LjkxOSAxNy45MTkgMCAwMTEyIDE2LjVjLTMuMTYyIDAtNi4xMzMtLjgxNS04LjcxNi0yLjI0N20wIDBBOS4wMTUgOS4wMTUgMCAwMTMgMTJjMC0xLjYwNS40Mi0zLjExMyAxLjE1Ny00LjQxOCIgLz4KPC9zdmc+"},{name:"Set Body",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/set-body-inbound/",id:"set-body-inbound",defaultHandler:{export:"SetBodyInboundPolicy",module:"$import(@zuplo/runtime)",options:{body:'{ "model": "babbage", "prompt": "Say this is a test", "max_tokens": 7, "temperature": 0, "stream": true }'}},exampleHtml:"<div><p>Sets the body of the request in the inbound pipeline - make sure to convert a GET/HEAD request to another method when using this policy.</p></div><h3>Options</h3><ul><li><code>body</code> <div><p>The value to set for the body</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyNCAyNCIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZT0iY3VycmVudENvbG9yIiBjbGFzcz0idy02IGgtNiI+CiAgPHBhdGggc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBkPSJNMTIgMjFhOS4wMDQgOS4wMDQgMCAwMDguNzE2LTYuNzQ3TTEyIDIxYTkuMDA0IDkuMDA0IDAgMDEtOC43MTYtNi43NDdNMTIgMjFjMi40ODUgMCA0LjUtNC4wMyA0LjUtOVMxNC40ODUgMyAxMiAzbTAgMThjLTIuNDg1IDAtNC41LTQuMDMtNC41LTlTOS41MTUgMyAxMiAzbTAgMGE4Ljk5NyA4Ljk5NyAwIDAxNy44NDMgNC41ODJNMTIgM2E4Ljk5NyA4Ljk5NyAwIDAwLTcuODQzIDQuNTgybTE1LjY4NiAwQTExLjk1MyAxMS45NTMgMCAwMTEyIDEwLjVjLTIuOTk4IDAtNS43NC0xLjEtNy44NDMtMi45MThtMTUuNjg2IDBBOC45NTkgOC45NTkgMCAwMTIxIDEyYzAgLjc3OC0uMDk5IDEuNTMzLS4yODQgMi4yNTNtMCAwQTE3LjkxOSAxNy45MTkgMCAwMTEyIDE2LjVjLTMuMTYyIDAtNi4xMzMtLjgxNS04LjcxNi0yLjI0N20wIDBBOS4wMTUgOS4wMTUgMCAwMTMgMTJjMC0xLjYwNS40Mi0zLjExMyAxLjE1Ny00LjQxOCIgLz4KPC9zdmc+Cg=="},{name:"Add or Set Request Headers",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/set-headers-inbound/",id:"set-headers-inbound",defaultHandler:{export:"SetHeadersInboundPolicy",module:"$import(@zuplo/runtime)",options:{headers:[{name:"HEADER_NAME",value:"HEADER_VALUE",overwrite:!0}]}},exampleHtml:"<div><p>Adds or sets headers on the incoming request.</p></div><h3>Options</h3><ul><li><code>headers</code> <div><p>An array of name and value objects (with an optional <code>overwrite</code> boolean)</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItYWxpZ24tcmlnaHQiPjxsaW5lIHgxPSIyMSIgeTE9IjEwIiB4Mj0iNyIgeTI9IjEwIj48L2xpbmU+PGxpbmUgeDE9IjIxIiB5MT0iNiIgeDI9IjMiIHkyPSI2Ij48L2xpbmU+PGxpbmUgeDE9IjIxIiB5MT0iMTQiIHgyPSIzIiB5Mj0iMTQiPjwvbGluZT48bGluZSB4MT0iMjEiIHkxPSIxOCIgeDI9IjciIHkyPSIxOCI+PC9saW5lPjwvc3ZnPg=="},{name:"Add or Set Response Headers",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/set-headers-outbound/",id:"set-headers-outbound",defaultHandler:{export:"SetHeadersOutboundPolicy",module:"$import(@zuplo/runtime)",options:{headers:[{name:"HEADER_NAME",value:"HEADER_VALUE",overwrite:!0}]}},exampleHtml:"<div><p>Adds or sets headers on the on the outgoing.</p></div><h3>Options</h3><ul><li><code>headers</code> <div></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItYWxpZ24tcmlnaHQiPjxsaW5lIHgxPSIyMSIgeTE9IjEwIiB4Mj0iNyIgeTI9IjEwIj48L2xpbmU+PGxpbmUgeDE9IjIxIiB5MT0iNiIgeDI9IjMiIHkyPSI2Ij48L2xpbmU+PGxpbmUgeDE9IjIxIiB5MT0iMTQiIHgyPSIzIiB5Mj0iMTQiPjwvbGluZT48bGluZSB4MT0iMjEiIHkxPSIxOCIgeDI9IjciIHkyPSIxOCI+PC9saW5lPjwvc3ZnPg=="},{name:"Add or Set Query Parameters",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/set-query-params-inbound/",id:"set-query-params-inbound",defaultHandler:{export:"SetQueryParamsInboundPolicy",module:"$import(@zuplo/runtime)",options:{params:[{name:"PARAM_NAME",value:"PARAM_VALUE",overwrite:!0}]}},exampleHtml:"<div><p>Adds or sets query parameters on the incoming request.</p></div><h3>Options</h3><ul><li><code>params</code> <div><p>An array of object, with a name and value property (and optional <code>override</code> boolean)</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItaGVscC1jaXJjbGUiPjxjaXJjbGUgY3g9IjEyIiBjeT0iMTIiIHI9IjEwIj48L2NpcmNsZT48cGF0aCBkPSJNOS4wOSA5YTMgMyAwIDAgMSA1LjgzIDFjMCAyLTMgMy0zIDMiPjwvcGF0aD48bGluZSB4MT0iMTIiIHkxPSIxNyIgeDI9IjEyLjAxIiB5Mj0iMTciPjwvbGluZT48L3N2Zz4="},{name:"Set Status Code",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/set-status-outbound/",id:"set-status-outbound",defaultHandler:{export:"SetStatusOutboundPolicy",module:"$import(@zuplo/runtime)",options:{status:200,statusText:"OK"}},exampleHtml:"<div><p>Adds or sets headers on the on the outgoing.</p></div><h3>Options</h3><ul><li><code>status</code> <div><p>The status code to be used in the response</p></div></li><li><code>statusText</code> <div><p>The statusText to be used in the response (optional)</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyNCAyNCIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZT0iY3VycmVudENvbG9yIiBjbGFzcz0idy02IGgtNiI+CiAgPHBhdGggc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBkPSJNNi42MzMgMTAuNWMuODA2IDAgMS41MzMtLjQ0NiAyLjAzMS0xLjA4YTkuMDQxIDkuMDQxIDAgMDEyLjg2MS0yLjRjLjcyMy0uMzg0IDEuMzUtLjk1NiAxLjY1My0xLjcxNWE0LjQ5OCA0LjQ5OCAwIDAwLjMyMi0xLjY3MlYzYS43NS43NSAwIDAxLjc1LS43NUEyLjI1IDIuMjUgMCAwMTE2LjUgNC41YzAgMS4xNTItLjI2IDIuMjQzLS43MjMgMy4yMTgtLjI2Ni41NTguMTA3IDEuMjgyLjcyNSAxLjI4MmgzLjEyNmMxLjAyNiAwIDEuOTQ1LjY5NCAyLjA1NCAxLjcxNS4wNDUuNDIyLjA2OC44NS4wNjggMS4yODVhMTEuOTUgMTEuOTUgMCAwMS0yLjY0OSA3LjUyMWMtLjM4OC40ODItLjk4Ny43MjktMS42MDUuNzI5SDEzLjQ4Yy0uNDgzIDAtLjk2NC0uMDc4LTEuNDIzLS4yM2wtMy4xMTQtMS4wNGE0LjUwMSA0LjUwMSAwIDAwLTEuNDIzLS4yM0g1LjkwNE0xNC4yNSA5aDIuMjVNNS45MDQgMTguNzVjLjA4My4yMDUuMTczLjQwNS4yNy42MDIuMTk3LjQtLjA3OC44OTgtLjUyMy44OThoLS45MDhjLS44ODkgMC0xLjcxMy0uNTE4LTEuOTcyLTEuMzY4YTEyIDEyIDAgMDEtLjUyMS0zLjUwN2MwLTEuNTUzLjI5NS0zLjAzNi44MzEtNC4zOThDMy4zODcgMTAuMjAzIDQuMTY3IDkuNzUgNSA5Ljc1aDEuMDUzYy40NzIgMCAuNzQ1LjU1Ni41Ljk2YTguOTU4IDguOTU4IDAgMDAtMS4zMDIgNC42NjVjMCAxLjE5NC4yMzIgMi4zMzMuNjU0IDMuMzc1eiIgLz4KPC9zdmc+Cg=="},{name:"Sleep / Delay",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/sleep-inbound/",id:"sleep-inbound",defaultHandler:{export:"SleepInboundPolicy",module:"$import(@zuplo/runtime)",options:{sleepInMs:1e3}},exampleHtml:"<div><p>Add a delay to the incoming request. Useful for testing.</p></div><h3>Options</h3><ul><li><code>sleepInMs</code> <div><p>The number of milliseconds to delay the request</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItd2F0Y2giPjxjaXJjbGUgY3g9IjEyIiBjeT0iMTIiIHI9IjciPjwvY2lyY2xlPjxwb2x5bGluZSBwb2ludHM9IjEyIDkgMTIgMTIgMTMuNSAxMy41Ij48L3BvbHlsaW5lPjxwYXRoIGQ9Ik0xNi41MSAxNy4zNWwtLjM1IDMuODNhMiAyIDAgMCAxLTIgMS44Mkg5LjgzYTIgMiAwIDAgMS0yLTEuODJsLS4zNS0zLjgzbS4wMS0xMC43bC4zNS0zLjgzQTIgMiAwIDAgMSA5LjgzIDFoNC4zNWEyIDIgMCAwIDEgMiAxLjgybC4zNSAzLjgzIj48L3BhdGg+PC9zdmc+"},{name:"Supabase JWT Auth",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/supabase-jwt-auth-inbound/",id:"supabase-jwt-auth-inbound",defaultHandler:{export:"SupabaseJwtInboundPolicy",module:"$import(@zuplo/runtime)",options:{secret:"$env(SUPABASE_JWT_SECRET)",allowUnauthenticatedRequests:!1,requiredClaims:{claim_1:["valid_value_1","valid_value_2"],claim_2:["valid_value_1","valid_value_2"]}}},exampleHtml:"<div><p>The Supabase JWT Authentication policy supports user JWT tokens created by Supabase.</p></div><h3>Options</h3><ul><li><code>secret</code> <div><p>The key used to verify the signature of the JWT token</p></div></li><li><code>allowUnauthenticatedRequests</code> <div><p>Indicates whether the request should continue if authentication fails. Default is <code>false</code> which means unauthenticated users will automatically receive a 401 response.</p></div></li><li><code>requiredClaims</code> <div><p>Any claims that must be present for authentication to succeed - multiple valid values can be specified for each claim.</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTA5cHgiIGhlaWdodD0iMTEycHgiIHZpZXdCb3g9IjAgMCAxMDkgMTEyIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPgogICAgPHRpdGxlPnN1cGFiYXNlLWxvZ28taWNvbjwvdGl0bGU+CiAgICA8ZGVmcz4KICAgICAgICA8bGluZWFyR3JhZGllbnQgeDE9IjIwLjg2MTc0NDUlIiB5MT0iMjAuNjg2ODgxMiUiIHgyPSI2My40MjU2MDg2JSIgeTI9IjQ0LjA3MTAwNzclIiBpZD0ibGluZWFyR3JhZGllbnQtMSI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiMwMDAwMDAiIG9mZnNldD0iMCUiPjwvc3RvcD4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iIzhDOEM4QyIgb2Zmc2V0PSIxMDAlIj48L3N0b3A+CiAgICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgICAgICA8bGluZWFyR3JhZGllbnQgeDE9IjEuOTkxMTY0OTglIiB5MT0iLTEzLjE1ODQwMDglIiB4Mj0iMjEuNDAyNTA3NyUiIHkyPSIzNC43MDgwNjIlIiBpZD0ibGluZWFyR3JhZGllbnQtMiI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiMwMDAwMDAiIG9mZnNldD0iMCUiPjwvc3RvcD4KICAgICAgICAgICAgPHN0b3Agc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwIiBvZmZzZXQ9IjEwMCUiPjwvc3RvcD4KICAgICAgICA8L2xpbmVhckdyYWRpZW50PgogICAgPC9kZWZzPgogICAgPGcgaWQ9IlBhZ2UtMSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgaWQ9InN1cGFiYXNlLWxvZ28taWNvbiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMC4wMDAwMDAsIDAuMDAwMDAwKSIgZmlsbC1ydWxlPSJub256ZXJvIj4KICAgICAgICAgICAgPHBhdGggZD0iTTYzLjY4Mjk0MTIsMTEwLjA3MjgxOSBDNjAuODIzNDQxMiwxMTMuNjczODE5IDU1LjAyNTU0MTIsMTExLjcwMDgxOSA1NC45NTY2NDEyLDEwNy4xMDI4MTkgTDUzLjk0OTE0MTIsMzkuODUxNTE5MSBMOTkuMTY4ODQxMiwzOS44NTE1MTkxIEMxMDcuMzU5MzQxLDM5Ljg1MTUxOTEgMTExLjkyNzM0MSw0OS4zMTE2MTkxIDEwNi44MzQzNDEsNTUuNzI2MjE5MSBMNjMuNjgyOTQxMiwxMTAuMDcyODE5IFoiIGlkPSJQYXRoIiBmaWxsPSJ1cmwoI2xpbmVhckdyYWRpZW50LTEpIj48L3BhdGg+CiAgICAgICAgICAgIDxwYXRoIGQ9Ik02My42ODI5NDEyLDExMC4wNzI4MTkgQzYwLjgyMzQ0MTIsMTEzLjY3MzgxOSA1NS4wMjU1NDEyLDExMS43MDA4MTkgNTQuOTU2NjQxMiwxMDcuMTAyODE5IEw1My45NDkxNDEyLDM5Ljg1MTUxOTEgTDk5LjE2ODg0MTIsMzkuODUxNTE5MSBDMTA3LjM1OTM0MSwzOS44NTE1MTkxIDExMS45MjczNDEsNDkuMzExNjE5MSAxMDYuODM0MzQxLDU1LjcyNjIxOTEgTDYzLjY4Mjk0MTIsMTEwLjA3MjgxOSBaIiBpZD0iUGF0aCIgZmlsbC1vcGFjaXR5PSIwLjIiIGZpbGw9InVybCgjbGluZWFyR3JhZGllbnQtMikiPjwvcGF0aD4KICAgICAgICAgICAgPHBhdGggZD0iTTQ1LjI5MjM0MTIsMS44NTk4NDkwNSBDNDguMTUxODQxMiwtMS43NDE1NTA5NSA1My45NDk4NDEyLDAuMjMxNzU2MDUzIDU0LjAxODc0MTIsNC44Mjk4MTkwNSBMNTQuNDYwMjQxMiw3Mi4wODEwMTkxIEw5LjgwNjQ3MTIzLDcyLjA4MTAxOTEgQzEuNjE1NzIxMjMsNzIuMDgxMDE5MSAtMi45NTI0MDg3Nyw2Mi42MjA5MTkxIDIuMTQwODQxMjMsNTYuMjA2MzE5MSBMNDUuMjkyMzQxMiwxLjg1OTg0OTA1IFoiIGlkPSJQYXRoIiBmaWxsPSIjMDAwMDAwIj48L3BhdGg+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4="},{name:"Transform Request Body",isPreview:!0,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/transform-body-inbound/",id:"transform-body-inbound",defaultHandler:{export:"TransformBodyInbound",module:"$import(@zuplo/runtime)",options:{}},exampleHtml:"<div><p>Transform the body of an incoming request.</p></div><h3>Options</h3><ul></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItZWRpdCI+PHBhdGggZD0iTTExIDRINGEyIDIgMCAwIDAtMiAydjE0YTIgMiAwIDAgMCAyIDJoMTRhMiAyIDAgMCAwIDItMnYtNyI+PC9wYXRoPjxwYXRoIGQ9Ik0xOC41IDIuNWEyLjEyMSAyLjEyMSAwIDAgMSAzIDNMMTIgMTVsLTQgMSAxLTQgOS41LTkuNXoiPjwvcGF0aD48L3N2Zz4="},{name:"Transform Response Body",isPreview:!0,isPaidAddOn:!1,isDeprecated:!1,fakePolicyUrl:"https://zuplo.com/docs/policies/custom-code-outbound#writing-a-policy",documentationUrl:"https://zuplo.com/docs/policies/transform-body-outbound/",id:"transform-body-outbound",defaultHandler:{export:"TransformBodyOutbound",module:"$import(@zuplo/runtime)",options:{}},exampleHtml:"<div><p>The best way to transform a response body is using a custom code outbound policy.</p></div><h3>Options</h3><ul></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItZWRpdCI+PHBhdGggZD0iTTExIDRINGEyIDIgMCAwIDAtMiAydjE0YTIgMiAwIDAgMCAyIDJoMTRhMiAyIDAgMCAwIDItMnYtNyI+PC9wYXRoPjxwYXRoIGQ9Ik0xOC41IDIuNWEyLjEyMSAyLjEyMSAwIDAgMSAzIDNMMTIgMTVsLTQgMSAxLTQgOS41LTkuNXoiPjwvcGF0aD48L3N2Zz4="},{name:"Upstream Azure AD Service Auth",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/upstream-azure-ad-service-auth-inbound/",id:"upstream-azure-ad-service-auth-inbound",defaultHandler:{export:"UpstreamAzureAdServiceAuthInboundPolicy",module:"$import(@zuplo/runtime)",options:{activeDirectoryTenantId:"$env(AZURE_AD_TENANT_ID)",activeDirectoryClientId:"$env(AZURE_AD_CLIENT_ID)",activeDirectoryClientSecret:"$env(AZURE_AD_CLIENT_SECRET)"}},exampleHtml:"<div><p>Uses Azure Active Directory to add an Authorization header to the request in order to authenticate requests using Azure identity.</p></div><h3>Options</h3><ul><li><code>activeDirectoryTenantId</code> <div><p>Azure Active Directory Tenant ID.</p></div></li><li><code>activeDirectoryClientId</code> <div><p>The Application (client) ID of the Azure AD App Registration.</p></div></li><li><code>activeDirectoryClientSecret</code> <div><p>The client secret of the Azure AD App Registration.</p></div></li><li><code>tokenRetries</code> <div><p>The number of times to retry fetching the token in the event of a failure. Defaults to 3.</p></div></li><li><code>expirationOffsetSeconds</code> <div><p>The number of seconds less than the token expiration to cache the token. Defaults to 300 seconds.</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAxNTAgMTUwIiBhcmlhLWhpZGRlbj0idHJ1ZSI+CiAgPGcgZmlsdGVyPSJ1cmwoI2ZpbHRlcjBfZF8xXzYpIj4KICAgIDxwYXRoIGZpbGw9InVybCgjcGFpbnQwX2xpbmVhcl8xXzYpIgogICAgICBkPSJNNTIuMDkgMTAuMjI1aDQwLjY4NUw1MC41NDEgMTM1LjM2MWE2LjQ5IDYuNDkgMCAwMS02LjE0NiA0LjQxMkgxMi43MzNhNi40NjggNi40NjggMCAwMS01LjI2Mi0yLjY5OCA2LjQ4MyA2LjQ4MyAwIDAxLS44NzYtNS44NDhsMzkuMzQ5LTExNi41OWE2LjQ4NyA2LjQ4NyAwIDAxNi4xNDctNC40MTJ6IiAvPgogIDwvZz4KICA8ZyBmaWx0ZXI9InVybCgjZmlsdGVyMV9kXzFfNikiPgogICAgPHBhdGggZmlsbD0iIzUyNTU1OCIKICAgICAgZD0iTTExMS4yMTEgOTQuMTU4SDQ2LjY5NWEyLjk4NSAyLjk4NSAwIDAwLTIuMDM5IDUuMTdsNDEuNDU2IDM4LjY5NGE2LjUxMyA2LjUxMyAwIDAwNC40NDcgMS43NTFoMzYuNTMybC0xNS44OC00NS42MTV6IiAvPgogIDwvZz4KICA8ZyBmaWx0ZXI9InVybCgjZmlsdGVyMl9kXzFfNikiPgogICAgPHBhdGggZmlsbD0idXJsKCNwYWludDFfbGluZWFyXzFfNikiCiAgICAgIGQ9Ik01Mi4wOSAxMC4yMjVhNi40MzQgNi40MzQgMCAwMC02LjE2IDQuNDk4TDYuNjQ0IDEzMS4xMmE2LjQ3MSA2LjQ3MSAwIDAwMy4xMiA3LjkzMiA2LjQ2MyA2LjQ2MyAwIDAwMi45ODYuNzIxaDMyLjQ4YTYuOTQgNi45NCAwIDAwNS4zMjgtNC41MzFsNy44MzQtMjMuMDg5IDI3Ljk4NSAyNi4xMDJhNi42MTcgNi42MTcgMCAwMDQuMTY1IDEuNTE4aDM2LjM5NWwtMTUuOTYyLTQ1LjYxNS00Ni41MzMuMDEgMjguNDgtODMuOTQzSDUyLjA5eiIKICAgICAgc2hhcGUtcmVuZGVyaW5nPSJjcmlzcEVkZ2VzIiAvPgogIDwvZz4KICA8ZyBmaWx0ZXI9InVybCgjZmlsdGVyM19kXzFfNikiPgogICAgPHBhdGggZmlsbD0idXJsKCNwYWludDJfbGluZWFyXzFfNikiCiAgICAgIGQ9Ik0xMDQuMDU1IDE0LjYzMWE2LjQ4MiA2LjQ4MiAwIDAwLTYuMTM4LTQuNDA2SDUyLjU3NWE2LjQ3OCA2LjQ3OCAwIDAxNi4xMzcgNC40MDZsMzkuMzUgMTE2LjU5NGE2LjQ4IDYuNDggMCAwMS0zLjE4IDcuODM1IDYuNDczIDYuNDczIDAgMDEtMi45NTcuNzE1aDQ1LjM0NGE2LjQ3MyA2LjQ3MyAwIDAwNS4yNjEtMi43MDEgNi40ODggNi40ODggMCAwMC44NzUtNS44NDlsLTM5LjM1LTExNi41OTR6IiAvPgogIDwvZz4KICA8ZGVmcz4KICAgIDxmaWx0ZXIgaWQ9ImZpbHRlcjBfZF8xXzYiIHdpZHRoPSI5NC41MTkiIGhlaWdodD0iMTM3LjU0OCIgeD0iMi4yNTUiIHk9IjEwLjIyNSIKICAgICAgY29sb3ItaW50ZXJwb2xhdGlvbi1maWx0ZXJzPSJzUkdCIiBmaWx0ZXJVbml0cz0idXNlclNwYWNlT25Vc2UiPgogICAgICA8ZmVGbG9vZCBmbG9vZC1vcGFjaXR5PSIwIiByZXN1bHQ9IkJhY2tncm91bmRJbWFnZUZpeCIgLz4KICAgICAgPGZlQ29sb3JNYXRyaXggaW49IlNvdXJjZUFscGhhIiByZXN1bHQ9ImhhcmRBbHBoYSIKICAgICAgICB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDEyNyAwIiAvPgogICAgICA8ZmVPZmZzZXQgZHk9IjQiIC8+CiAgICAgIDxmZUdhdXNzaWFuQmx1ciBzdGREZXZpYXRpb249IjIiIC8+CiAgICAgIDxmZUNvbXBvc2l0ZSBpbjI9ImhhcmRBbHBoYSIgb3BlcmF0b3I9Im91dCIgLz4KICAgICAgPGZlQ29sb3JNYXRyaXggdmFsdWVzPSIwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwLjI1IDAiIC8+CiAgICAgIDxmZUJsZW5kIGluMj0iQmFja2dyb3VuZEltYWdlRml4IiByZXN1bHQ9ImVmZmVjdDFfZHJvcFNoYWRvd18xXzYiIC8+CiAgICAgIDxmZUJsZW5kIGluPSJTb3VyY2VHcmFwaGljIiBpbjI9ImVmZmVjdDFfZHJvcFNoYWRvd18xXzYiIHJlc3VsdD0ic2hhcGUiIC8+CiAgICA8L2ZpbHRlcj4KICAgIDxmaWx0ZXIgaWQ9ImZpbHRlcjFfZF8xXzYiIHdpZHRoPSI5MS4zODUiIGhlaWdodD0iNTMuNjE2IiB4PSIzOS43MDYiIHk9Ijk0LjE1OCIKICAgICAgY29sb3ItaW50ZXJwb2xhdGlvbi1maWx0ZXJzPSJzUkdCIiBmaWx0ZXJVbml0cz0idXNlclNwYWNlT25Vc2UiPgogICAgICA8ZmVGbG9vZCBmbG9vZC1vcGFjaXR5PSIwIiByZXN1bHQ9IkJhY2tncm91bmRJbWFnZUZpeCIgLz4KICAgICAgPGZlQ29sb3JNYXRyaXggaW49IlNvdXJjZUFscGhhIiByZXN1bHQ9ImhhcmRBbHBoYSIKICAgICAgICB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDEyNyAwIiAvPgogICAgICA8ZmVPZmZzZXQgZHk9IjQiIC8+CiAgICAgIDxmZUdhdXNzaWFuQmx1ciBzdGREZXZpYXRpb249IjIiIC8+CiAgICAgIDxmZUNvbXBvc2l0ZSBpbjI9ImhhcmRBbHBoYSIgb3BlcmF0b3I9Im91dCIgLz4KICAgICAgPGZlQ29sb3JNYXRyaXggdmFsdWVzPSIwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwLjI1IDAiIC8+CiAgICAgIDxmZUJsZW5kIGluMj0iQmFja2dyb3VuZEltYWdlRml4IiByZXN1bHQ9ImVmZmVjdDFfZHJvcFNoYWRvd18xXzYiIC8+CiAgICAgIDxmZUJsZW5kIGluPSJTb3VyY2VHcmFwaGljIiBpbjI9ImVmZmVjdDFfZHJvcFNoYWRvd18xXzYiIHJlc3VsdD0ic2hhcGUiIC8+CiAgICA8L2ZpbHRlcj4KICAgIDxmaWx0ZXIgaWQ9ImZpbHRlcjJfZF8xXzYiIHdpZHRoPSIxMjguNjc0IiBoZWlnaHQ9IjEzNy41NDgiIHg9IjIuMjY0IiB5PSIxMC4yMjUiCiAgICAgIGNvbG9yLWludGVycG9sYXRpb24tZmlsdGVycz0ic1JHQiIgZmlsdGVyVW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KICAgICAgPGZlRmxvb2QgZmxvb2Qtb3BhY2l0eT0iMCIgcmVzdWx0PSJCYWNrZ3JvdW5kSW1hZ2VGaXgiIC8+CiAgICAgIDxmZUNvbG9yTWF0cml4IGluPSJTb3VyY2VBbHBoYSIgcmVzdWx0PSJoYXJkQWxwaGEiCiAgICAgICAgdmFsdWVzPSIwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAxMjcgMCIgLz4KICAgICAgPGZlT2Zmc2V0IGR5PSI0IiAvPgogICAgICA8ZmVHYXVzc2lhbkJsdXIgc3RkRGV2aWF0aW9uPSIyIiAvPgogICAgICA8ZmVDb21wb3NpdGUgaW4yPSJoYXJkQWxwaGEiIG9wZXJhdG9yPSJvdXQiIC8+CiAgICAgIDxmZUNvbG9yTWF0cml4IHZhbHVlcz0iMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMC4yNSAwIiAvPgogICAgICA8ZmVCbGVuZCBpbjI9IkJhY2tncm91bmRJbWFnZUZpeCIgcmVzdWx0PSJlZmZlY3QxX2Ryb3BTaGFkb3dfMV82IiAvPgogICAgICA8ZmVCbGVuZCBpbj0iU291cmNlR3JhcGhpYyIgaW4yPSJlZmZlY3QxX2Ryb3BTaGFkb3dfMV82IiByZXN1bHQ9InNoYXBlIiAvPgogICAgPC9maWx0ZXI+CiAgICA8ZmlsdGVyIGlkPSJmaWx0ZXIzX2RfMV82IiB3aWR0aD0iOTkuMTciIGhlaWdodD0iMTM3LjU1IiB4PSI0OC41NzUiIHk9IjEwLjIyNSIKICAgICAgY29sb3ItaW50ZXJwb2xhdGlvbi1maWx0ZXJzPSJzUkdCIiBmaWx0ZXJVbml0cz0idXNlclNwYWNlT25Vc2UiPgogICAgICA8ZmVGbG9vZCBmbG9vZC1vcGFjaXR5PSIwIiByZXN1bHQ9IkJhY2tncm91bmRJbWFnZUZpeCIgLz4KICAgICAgPGZlQ29sb3JNYXRyaXggaW49IlNvdXJjZUFscGhhIiByZXN1bHQ9ImhhcmRBbHBoYSIKICAgICAgICB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDEyNyAwIiAvPgogICAgICA8ZmVPZmZzZXQgZHk9IjQiIC8+CiAgICAgIDxmZUdhdXNzaWFuQmx1ciBzdGREZXZpYXRpb249IjIiIC8+CiAgICAgIDxmZUNvbXBvc2l0ZSBpbjI9ImhhcmRBbHBoYSIgb3BlcmF0b3I9Im91dCIgLz4KICAgICAgPGZlQ29sb3JNYXRyaXggdmFsdWVzPSIwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwLjI1IDAiIC8+CiAgICAgIDxmZUJsZW5kIGluMj0iQmFja2dyb3VuZEltYWdlRml4IiByZXN1bHQ9ImVmZmVjdDFfZHJvcFNoYWRvd18xXzYiIC8+CiAgICAgIDxmZUJsZW5kIGluPSJTb3VyY2VHcmFwaGljIiBpbjI9ImVmZmVjdDFfZHJvcFNoYWRvd18xXzYiIHJlc3VsdD0ic2hhcGUiIC8+CiAgICA8L2ZpbHRlcj4KICAgIDxsaW5lYXJHcmFkaWVudCBpZD0icGFpbnQwX2xpbmVhcl8xXzYiIHgxPSI2Ni45MTkiIHgyPSIyNC42NjciIHkxPSIxOS44MjUiIHkyPSIxNDQuNjQ3IgogICAgICBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CiAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiMyNzI5MkMiIC8+CiAgICAgIDxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzVFNjA2MiIgLz4KICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgICA8bGluZWFyR3JhZGllbnQgaWQ9InBhaW50MV9saW5lYXJfMV82IiB4MT0iODAuMTE3IiB4Mj0iNzAuMzQ0IiB5MT0iNzcuOTk1IiB5Mj0iODEuMyIKICAgICAgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgogICAgICA8c3RvcCBzdG9wLW9wYWNpdHk9Ii4zIiAvPgogICAgICA8c3RvcCBvZmZzZXQ9Ii4wNzEiIHN0b3Atb3BhY2l0eT0iLjIiIC8+CiAgICAgIDxzdG9wIG9mZnNldD0iLjMyMSIgc3RvcC1vcGFjaXR5PSIuMSIgLz4KICAgICAgPHN0b3Agb2Zmc2V0PSIuNjIzIiBzdG9wLW9wYWNpdHk9Ii4wNSIgLz4KICAgICAgPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLW9wYWNpdHk9IjAiIC8+CiAgICA8L2xpbmVhckdyYWRpZW50PgogICAgPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDJfbGluZWFyXzFfNiIgeDE9Ijc0Ljc0MiIgeDI9IjEyMS4xMjIiIHkxPSIxNi4xODQiIHkyPSIxMzkuNzQ4IgogICAgICBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CiAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiM5Q0EwQTAiIC8+CiAgICAgIDxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzNENDA0MyIgLz4KICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgPC9kZWZzPgo8L3N2Zz4="},{name:"Upstream Firebase Admin Auth",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/upstream-firebase-admin-auth-inbound/",id:"upstream-firebase-admin-auth-inbound",defaultHandler:{export:"UpstreamFirebaseAdminAuthInboundPolicy",module:"$import(@zuplo/runtime)",options:{serviceAccountJson:"$env(SERVICE_ACCOUNT_JSON)"}},exampleHtml:"<div><p>Creates a Firebase Admin token and attaches it to the outgoing request. Useful when calling Firebase services as an administrator.</p></div><h3>Options</h3><ul><li><code>serviceAccountJson</code> <div><p>The Google Service Account key in JSON format. Note you can load this from environment variables using the $env(ENV_VAR) syntax.</p></div></li><li><code>tokenRetries</code> <div><p>The number of times to retry fetching the token in the event of a failure. Defaults to 3.</p></div></li><li><code>expirationOffsetSeconds</code> <div><p>The number of seconds less than the token expiration to cache the token. Defaults to 300 seconds.</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMjA0cHgiIGhlaWdodD0iMjA0cHgiIHZpZXdCb3g9IjAgMCAyMDQgMjA0IiB2ZXJzaW9uPSIxLjEiCiAgICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDx0aXRsZT5maXJlYmFzZV9pY29uPC90aXRsZT4KICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSJmaXJlYmFzZV9pY29uIj4KICAgICAgICAgICAgPHJlY3QgaWQ9IlJlY3RhbmdsZSIgeD0iMCIgeT0iMCIgd2lkdGg9IjIwNCIgaGVpZ2h0PSIyMDQiPjwvcmVjdD4KICAgICAgICAgICAgPHBhdGgKICAgICAgICAgICAgICAgIGQ9Ik00Mi4yLDEyOC45IEw1OS42LDE3LjQgQzYwLjIsMTMuNiA2NS4zLDEyLjcgNjcuMSwxNi4xIEw4NS44LDUxLjEgTDQyLjIsMTI4LjkgWiBNMTY1LjksMTU2IEwxNDkuMyw1My4zIEMxNDguOCw1MC4xIDE0NC44LDQ4LjggMTQyLjUsNTEuMSBMMzcuOSwxNTYgTDk1LjgsMTg4LjUgQzk5LjQsMTkwLjUgMTAzLjksMTkwLjUgMTA3LjUsMTg4LjUgTDE2NS45LDE1NiBaIE0xMTguOSw2Ni40IEwxMDUuNSw0MC45IEMxMDQsMzggOTkuOSwzOCA5OC40LDQwLjkgTDM5LjUsMTQ1LjkgTDExOC45LDY2LjQgWiIKICAgICAgICAgICAgICAgIGlkPSJpY29uXzFfIiBmaWxsPSIjMDAwMDAwIiBmaWxsLXJ1bGU9Im5vbnplcm8iPjwvcGF0aD4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg=="},{name:"Upstream Firebase User Auth",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/upstream-firebase-user-auth-inbound/",id:"upstream-firebase-user-auth-inbound",defaultHandler:{export:"UpstreamFirebaseUserAuthInboundPolicy",module:"$import(@zuplo/runtime)",options:{serviceAccountJson:"$env(SERVICE_ACCOUNT_JSON)",webApiKey:"$env(WEB_API_KEY)",userId:"1234",developerClaims:{premium:!0}}},exampleHtml:"<div><p>Creates a Firebase custom user token and attaches it to the outgoing request. Useful when calling Firebase services as user.</p></div><h3>Options</h3><ul><li><code>serviceAccountJson</code> <div><p>The Google Service Account key in JSON format. Note you can load this from environment variables using the $env(ENV_VAR) syntax.</p></div></li><li><code>userId</code> <div><p>The userId to use as the custom token's subject.</p></div></li><li><code>userIdPropertyPath</code> <div><p>The property on the incoming request.user object to retrieve the value of the userId</p></div></li><li><code>developerClaims</code> <div><p>Optional additional claims to include in the custom token's payload.</p></div></li><li><code>webApiKey</code> <div><p>The Firebase Web API Key (found in project settings)</p></div></li><li><code>tokenRetries</code> <div><p>The number of times to retry fetching the token in the event of a failure. Defaults to 3.</p></div></li><li><code>expirationOffsetSeconds</code> <div><p>The number of seconds less than the token expiration to cache the token. Defaults to 300 seconds.</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMjA0cHgiIGhlaWdodD0iMjA0cHgiIHZpZXdCb3g9IjAgMCAyMDQgMjA0IiB2ZXJzaW9uPSIxLjEiCiAgICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDx0aXRsZT5maXJlYmFzZV9pY29uPC90aXRsZT4KICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSJmaXJlYmFzZV9pY29uIj4KICAgICAgICAgICAgPHJlY3QgaWQ9IlJlY3RhbmdsZSIgeD0iMCIgeT0iMCIgd2lkdGg9IjIwNCIgaGVpZ2h0PSIyMDQiPjwvcmVjdD4KICAgICAgICAgICAgPHBhdGgKICAgICAgICAgICAgICAgIGQ9Ik00Mi4yLDEyOC45IEw1OS42LDE3LjQgQzYwLjIsMTMuNiA2NS4zLDEyLjcgNjcuMSwxNi4xIEw4NS44LDUxLjEgTDQyLjIsMTI4LjkgWiBNMTY1LjksMTU2IEwxNDkuMyw1My4zIEMxNDguOCw1MC4xIDE0NC44LDQ4LjggMTQyLjUsNTEuMSBMMzcuOSwxNTYgTDk1LjgsMTg4LjUgQzk5LjQsMTkwLjUgMTAzLjksMTkwLjUgMTA3LjUsMTg4LjUgTDE2NS45LDE1NiBaIE0xMTguOSw2Ni40IEwxMDUuNSw0MC45IEMxMDQsMzggOTkuOSwzOCA5OC40LDQwLjkgTDM5LjUsMTQ1LjkgTDExOC45LDY2LjQgWiIKICAgICAgICAgICAgICAgIGlkPSJpY29uXzFfIiBmaWxsPSIjMDAwMDAwIiBmaWxsLXJ1bGU9Im5vbnplcm8iPjwvcGF0aD4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg=="},{name:"Upstream GCP Self-Signed JWT",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/upstream-gcp-jwt-inbound/",id:"upstream-gcp-jwt-inbound",defaultHandler:{export:"UpstreamGcpJwtInboundPolicy",module:"$import(@zuplo/runtime)",options:{audience:"your_gcp_service.endpoint.com",serviceAccountJson:"$env(SERVICE_ACCOUNT_JSON)"}},exampleHtml:'<div><p>Creates a self-signed JWT token (generated using a Google Service Account JSON) and attaches it to the outgoing request. Useful when calling GCP services like Cloud Endpoints / ESPv2</p></div><h3>Options</h3><ul><li><code>audience</code> <div><p>The audience for the minted JWT. Refer to <a href="https://cloud.google.com/endpoints/docs/grpc-service-config/reference/rpc/google.api#google.api.AuthRequirement">https://cloud.google.com/endpoints/docs/grpc-service-config/reference/rpc/google.api#google.api.AuthRequirement</a>.</p></div></li><li><code>serviceAccountJson</code> <div><p>The Google Service Account key in JSON format. Note you can load this from environment variables using the $env(ENV_VAR) syntax.</p></div></li></ul> ',icon:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjMiIHZpZXdCb3g9IjAgMCAyNCAyMyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cGF0aCBkPSJNMTUgOUg5TDggMTFMOSAxM0gxNUwxNiAxMUwxNSA5WiIgZmlsbD0iIzczNzM3MyIgLz4KICA8cGF0aCBkPSJNMTYgMTFMMTUgOUg5LjUxSDlMOCAxMUgxNloiIGZpbGw9IiM5QTlGQTgiIC8+CiAgPHBhdGggZD0iTTE4IDVIMTVMMTguOTcgMTFMMjAuNDcgOC43NUwxOCA1WiIgZmlsbD0iIzczNzM3MyIgLz4KICA8cGF0aCBkPSJNMjEuOTUgMTFMMjAuNDcgOC43NUwxOC45NyAxMUwxNSAxN0gxOEwyMS45NSAxMVoiIGZpbGw9IiM5QTlGQTgiIC8+CiAgPHBhdGggZD0iTTUuOTUgMTdIOC45NUw0Ljk4IDExTDMuNDggMTMuMjVMNS45NSAxN1oiIGZpbGw9IiM3MzczNzMiIC8+CiAgPHBhdGggZD0iTTIgMTFMMy40OCAxMy4yNUw0Ljk4IDExTDguOTUgNUg1Ljk1TDIgMTFaIiBmaWxsPSIjOUE5RkE4IiAvPgo8L3N2Zz4="},{name:"Upstream GCP Service Auth",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/upstream-gcp-service-auth-inbound/",id:"upstream-gcp-service-auth-inbound",defaultHandler:{export:"UpstreamGcpServiceAuthInboundPolicy",module:"$import(@zuplo/runtime)",options:{audience:"https://my-service-a2ev-uc.a.run.app",serviceAccountJson:"$env(SERVICE_ACCOUNT_JSON)"}},exampleHtml:`<div><p>Creates an ID Token from Google's OAuth service and attaches it to the outgoing request. Useful when calling GCP services that are secured with GCP IAM.</p></div><h3>Options</h3><ul><li><code>audience</code> <div><p>The audience for the service to be called. This is typically the URL of your service endpoint like '<a href="https://my-service-a2ev-uc.a.run.app">https://my-service-a2ev-uc.a.run.app</a>'</p></div></li><li><code>serviceAccountJson</code> <div><p>The Google Service Account key in JSON format. Note you can load this from environment variables using the $env(ENV_VAR) syntax.</p></div></li><li><code>tokenRetries</code> <div><p>The number of times to retry fetching the token in the event of a failure. Defaults to 3.</p></div></li><li><code>expirationOffsetSeconds</code> <div><p>The number of seconds less than the token expiration to cache the token. Defaults to 300 seconds.</p></div></li></ul> `,icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0NjEgMzcxIiBhcmlhLWhpZGRlbj0idHJ1ZSI+CiAgPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzFfMikiPgogICAgPHBhdGggZmlsbD0iIzczNzM3MyIKICAgICAgZD0iTTI5Mi4yNyAxMDIuMTVoMTQuMDQzbDQwLjAyNC00MC4wMjQgMS45NjYtMTYuOTkyYTE3OS44OTcgMTc5Ljg5NyAwIDAwLTI0Ny45MTkgOS4zNjEgMTc5Ljg5OCAxNzkuODk4IDAgMDAtNDQuNzQyIDc4LjQwOSAyMS43NjYgMjEuNzY2IDAgMDExNC4wNDMtLjg0Mmw4MC4wNDYtMTMuMjAxczQuMDczLTYuNzQxIDYuMTc5LTYuMzE5YTk5Ljg1IDk5Ljg1IDAgMDExMzYuNjQxLTEwLjM5MmgtLjI4MXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjN0Q3RDdEIgogICAgICBkPSJNNDAzLjM1MiAxMzIuOTA0YTE4MC4zMDggMTgwLjMwOCAwIDAwLTU0LjM0Ny04Ny42M2wtNTYuMTczIDU2LjE3M2E5OS44NSA5OS44NSAwIDAxMzYuNjUzIDc5LjIwNHY5Ljk3MWE0OS45ODcgNDkuOTg3IDAgMDEzNS4zNTEgMTQuNjQzIDQ5Ljk5MyA0OS45OTMgMCAwMS0zNS4zNTEgODUuMzQ1aC05OS45ODhsLTkuOTcxIDEwLjExMXY1OS45NjVsOS45NzEgOS45NzFoOTkuOTg4YTEzMC4wNDQgMTMwLjA0NCAwIDAwMTI1LjE5Ny05MS40NTQgMTMwLjAzNiAxMzAuMDM2IDAgMDAtNTEuMzMtMTQ2LjI5OXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjN0Q3RDdEIgogICAgICBkPSJNMTI5LjM2OSAzNzAuMDk1aDk5Ljk4OHYtODAuMDQ3aC05OS45ODhhNDkuNzAyIDQ5LjcwMiAwIDAxLTIwLjY0NC00LjQ5NGwtMTQuMDQzIDQuMzU0LTQwLjMwNCA0MC4wMjMtMy41MTEgMTQuMDQzYTEyOS4zMzcgMTI5LjMzNyAwIDAwNzguNTAyIDI2LjEyMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQkFCQUJBIgogICAgICBkPSJNMTI5LjM2OSAxMTAuNDM1QTEzMC4wMzcgMTMwLjAzNyAwIDAwNi45MDUgMTk4Ljk3MmExMzAuMDQyIDEzMC4wNDIgMCAwMDQzLjk2MiAxNDQuNTgxbDU3Ljk5OC01Ny45OTlhNDkuOTg2IDQ5Ljk4NiAwIDAxLTI4LjU5Ny0zNi41ODMgNDkuOTk2IDQ5Ljk5NiAwIDAxNTguMTU3LTU4LjE1OCA0OS45OTIgNDkuOTkyIDAgMDEzNi41ODQgMjguNTk4bDU3Ljk5OS01Ny45OTlhMTI5LjkgMTI5LjkgMCAwMC0xMDMuNjM5LTUwLjk3N3oiIC8+CiAgPC9nPgogIDxkZWZzPgogICAgPGNsaXBQYXRoIGlkPSJjbGlwMF8xXzIiPgogICAgICA8cGF0aCBmaWxsPSIjZmZmIiBkPSJNMCAwaDQ2MXYzNzFIMHoiIC8+CiAgICA8L2NsaXBQYXRoPgogIDwvZGVmcz4KPC9zdmc+"},{name:"JSON Body Validation (legacy)",isPreview:!1,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/validate-json-schema-inbound/",id:"validate-json-schema-inbound",defaultHandler:{export:"ValidateJsonSchemaInbound",module:"$import(@zuplo/runtime)",options:{validator:"$import(./schemas/example-schema.json)"}},exampleHtml:"<div><p>Validates the body of an incoming request based on a JSON schema.</p></div><h3>Options</h3><ul></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItY2hlY2stc3F1YXJlIj48cG9seWxpbmUgcG9pbnRzPSI5IDExIDEyIDE0IDIyIDQiPjwvcG9seWxpbmU+PHBhdGggZD0iTTIxIDEydjdhMiAyIDAgMCAxLTIgMkg1YTIgMiAwIDAgMS0yLTJWNWEyIDIgMCAwIDEgMi0yaDExIj48L3BhdGg+PC9zdmc+"},{name:"A/B Test Inbound",isPreview:!0,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/ab-test-inbound/",id:"ab-test-inbound",defaultHandler:{export:"ABTestInbound",module:"$import(@zuplo/runtime)",options:{testKey:"${user.sub}",modifier:{module:"$import(./modules/ab-test)",export:"abTestModifier"}}},exampleHtml:"<div><p>The A/B test policy is used to handle requests differently based on parameters such as user, ip, etc.</p></div><h3>Options</h3><ul><li><code>testKey</code> <div><p>The key to use for determining the group the request belongs</p></div></li><li><code>modifier</code> <div><p>The function that modifies the request based on the test key</p></div><ul><li><code>export</code> <div><p>Specifies the export to load your function, e.g. <code>default</code>, <code>myFunction</code>.</p></div></li><li><code>module</code> <div><p>Specifies the module to load your function, in the format <code>$import(./modules/my-module)</code></p></div></li></ul></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItc2VuZCI+PGxpbmUgeDE9IjIyIiB5MT0iMiIgeDI9IjExIiB5Mj0iMTMiPjwvbGluZT48cG9seWdvbiBwb2ludHM9IjIyIDIgMTUgMjIgMTEgMTMgMiA5IDIyIDIiPjwvcG9seWdvbj48L3N2Zz4="},{name:"Access Control List Inbound",isPreview:!0,isPaidAddOn:!1,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/acl-policy-inbound/",id:"acl-policy-inbound",defaultHandler:{export:"AClPolicyInbound",module:"$import(@zuplo/runtime)",options:{testKey:"${user.sub}",modifier:{module:"$import(./modules/ab-test)",export:"abTestModifier"}}},exampleHtml:"<div><p>The access control list inbound policy limits access to resources based on parameters of the request</p></div><h3>Options</h3><ul><li><code>policies</code> <div><p>The policies to enforce for the request</p></div></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItdXNlci1jaGVjayI+PHBhdGggZD0iTTE2IDIxdi0yYTQgNCAwIDAgMC00LTRINWE0IDQgMCAwIDAtNCA0djIiPjwvcGF0aD48Y2lyY2xlIGN4PSI4LjUiIGN5PSI3IiByPSI0Ij48L2NpcmNsZT48cG9seWxpbmUgcG9pbnRzPSIxNyAxMSAxOSAxMyAyMyA5Ij48L3BvbHlsaW5lPjwvc3ZnPg=="},{name:"Audit Logs Inbound",isPreview:!0,isPaidAddOn:!0,isDeprecated:!1,documentationUrl:"https://zuplo.com/docs/policies/audit-log-inbound/",id:"audit-log-inbound",defaultHandler:{export:"AuditLogsInboundPolicy",module:"$import(@zuplo/runtime)",options:{logIpAddress:!0,logUser:!0,logGeolocation:!0,logQueryParameters:!0,logRouteParameters:!0,tenant:"${params.tenantId}",metadata:{module:"$import(./modules/audit-logs)",export:"auditLogData"}}},exampleHtml:"<div><p>Capture detailed logs of requests for auditing purposes</p></div><h3>Options</h3><ul><li><code>logIpAddress</code> <div><p>if the IP address should be logged</p></div></li><li><code>logUser</code> <div><p>if the user's <code>sub</code> should be logged</p></div></li><li><code>logGeolocation</code> <div><p>if the geolocation information should be logged (i.e. state, country, longitude, latitude, etc.)</p></div></li><li><code>logQueryParameters</code> <div><p>log the values of query parameters</p></div></li><li><code>logRouteParameters</code> <div></div></li><li><code>tenant</code> <div><p>if the route parameters should be logged (i.e. the value of <code>customerId</code> in the route <code>/customers/:customerId</code>)</p></div></li><li><code>metadata</code> <div><p>A function to add additional data to the audit logs</p></div><ul><li><code>export</code> <div><p>Specifies the export to load your function, e.g. <code>default</code>, <code>myFunction</code>.</p></div></li><li><code>module</code> <div><p>Specifies the module to load your function, in the format <code>$import(./modules/my-module)</code></p></div></li></ul></li></ul> ",icon:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGNsYXNzPSJoLTYgdy02IiBmaWxsPSJub25lIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2Utd2lkdGg9IjIiPjxwYXRoIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZD0iTTcgNHYxNk0xNyA0djE2TTMgOGg0bTEwIDBoNE0zIDEyaDE4TTMgMTZoNG0xMCAwaDRNNCAyMGgxNmExIDEgMCAwMDEtMVY1YTEgMSAwIDAwLTEtMUg0YTEgMSAwIDAwLTEgMXYxNGExIDEgMCAwMDEgMXoiIC8+PC9zdmc+"}],Jb={config:wB,policies:MB};function Xb(){return Jb.policies}function jl(e){const t=Xb(),n=Jb.config.legacyIdMaps;return n[e]?t.find(r=>r.id===n[e]):t.find(r=>r.id===e)}const Oy="-",xB="There's already a policy with this name",bB="Policy name can't be empty",NB=(e,t)=>{if(!t)return"";const n=e==null?void 0:e.filter(a=>a.name&&a.name.startsWith(t)).sort((a,l)=>a.name.localeCompare(l.name));if(!n||n.length===0)return t;const r=n.at(-1);if(!r)return t;const i=r.name.split(Oy).at(-1);if(!i)return t;let o=parseInt(i);return isNaN(o)&&(o=0),`${t}${Oy}${o+1}`},SB=(e,t)=>e?t.find(r=>r.name===e)?xB:null:bB,qb=e=>e.replace(/ /g,""),DB=({existingConfig:e,onComplete:t,onCancel:n,policyManager:r})=>{const i=r.getPolicyListEnforced(),o=e.policyType,a=jl(o),[l,s]=v.useState(e.name),[u,c]=v.useState(null),[d,f]=v.useState(null),p=v.useRef();if(v.useEffect(()=>{(x=>{if(x===e.name){c(null);return}c(SB(x,i))})(l)},[e.name,l,i]),!a)return null;const g=M=>{const x={...e,handler:M,name:l};r.updatePolicy(e.name,x)},h=()=>{var x;const M=(x=p.current)==null?void 0:x.getValue();if(!(!o||!M))try{const S=JSON.parse(M);g(S),t()}catch(S){f(S.message)}},w=M=>{s(qb(M.toLowerCase()))};function I(M){p.current=M}const y=!!u;return m.jsxs("div",{className:"flex flex-col w-full",children:[m.jsx("div",{className:"pl-24 max-w-lg mt-4",children:m.jsx(Qb,{name:l,onChangeName:w,policyTypeInformation:{documentationUrl:a.documentationUrl,typeName:a.name},validationErrorName:u,disabled:!1})}),m.jsxs("div",{className:"grid grid-cols-2 h-64 mt-4 mb-4",children:[m.jsxs(Au,{label:"Configuration",classNameLabel:"ml-6",children:[m.jsx(Zb,{options:{hideCursorInOverviewRuler:!0,minimap:{enabled:!1},overviewRulerBorder:!1,overviewRulerLanes:0,readOnly:!1,renderLineHighlight:"none",roundedSelection:!1,scrollBeyondLastLine:!1},className:ae("h-60",{"border-2 border-red-500":!!d}),width:"100%",language:"json",onMount:I,defaultValue:JSON.stringify(e.handler,void 0,Cb)}),d?m.jsx("p",{className:"text-red-500 ml-2 mt-1",children:d}):null]}),m.jsx(Au,{label:"Usage",classNameLabel:"ml-2",children:a.exampleHtml?m.jsx(Og,{documentationSrc:a.exampleHtml}):m.jsxs("div",{className:"bg-gray-100 h-60 text-center flex flex-col items-center justify-center",children:[Mi.COMING_SOON.icon,m.jsx("div",{children:Mi.COMING_SOON.defaultTitle})]})})]}),m.jsx(Yb,{onConfirm:h,onCancel:n,isDisabled:y,mustRequestAccess:!1})]})},AB=({isReadOnly:e,policy:t,onDelete:n,index:r})=>{const i=()=>l(),o=()=>d(),a=El(),[l,s]=ho(()=>{const h=()=>{n(r),s()};return m.jsx(Ap,{hideModal:s,alertType:"REMOVE",bodyText:"Are you sure you want to remove this policy from this route? This will not delete the policy",primaryButtonText:"Confirm",secondaryButtonText:"Cancel",onPrimaryButtonClick:h,onSecondaryButtonClick:s,primaryButtonTestID:`confirm-remove-policy-btn-${t}`})},[n,r]),c=a.getPolicyListEnforced().find(h=>h.name===t),[d,f]=ho(()=>{if(!c)throw new Error(`Cannot edit policy: ${t} - policy not found in policies config list `);return m.jsx(Bb,{title:"Edit Policy",isOpen:!0,setIsOpen:f,children:m.jsx(DB,{existingConfig:c,onComplete:f,onCancel:f,policyManager:a})})},[c]),p=c?jl(c.policyType):void 0,g=!p;return m.jsxs("div",{className:ae("h-full w-full max-w-full flex bg-white rounded-md border drop-shadow-sm min-w-0",{"border-gray-200":!g,"border-red-500":g,"bg-gray-200":e}),children:[e?m.jsx("div",{className:"w-1",children:" "}):m.jsxs("div",{className:"flex bg-white rounded-l-md items-center pl-1 text-gray-400",children:[m.jsx(Fd,{className:"w-4"}),m.jsx(Fd,{className:"w-4 -ml-[0.7rem]"}),m.jsx(Fd,{className:"w-4 -ml-[0.72rem]"})]}),m.jsxs("div",{className:"flex grow items-center self-center pr-2 col-span-1 max-w-full min-w-0",children:[!g&&m.jsx("img",{className:"w-5 h-5 mx-2 hidden 2xl:inline",src:p.icon,alt:p.name}),m.jsx("p",{"data-test":`policy-designer-policy-name-${t}`,className:ae("flex grow max-w-full text-sm h-full truncate",{"text-red-600":g}),children:g?`Invalid Policy: ${t}`:t})]}),e?m.jsx("div",{className:"rounded-r w-[1px] h-8",children:" "}):m.jsxs("div",{className:"flex bg-gray-200 h-full rounded",children:[m.jsx("button",{type:"button",disabled:g,onClick:o,"data-test":`policy-designer-edit-policy-btn-${t}`,className:ae("flex h-full px-2 bg-gray-200 border-gray-300 border-l py-2",{"cursor-not-allowed":g,"hover:bg-gray-300":!g}),children:m.jsx(ZC,{className:"w-4 h-4"})}),m.jsx("button",{type:"button",disabled:e,onClick:i,"data-test":`policy-designer-remove-policy-btn-${t}`,className:ae("flex h-full px-2 bg-gray-200 border-gray-300 border-l py-2 rounded-r hover:bg-gray-300"),children:m.jsx(bC,{className:"w-4 h-4"})})]})]})};function _p(e,t){return _p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},_p(e,t)}function Kb(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,_p(e,t)}function le(){return le=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},le.apply(this,arguments)}function qa(e){"@babel/helpers - typeof";return qa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qa(e)}function CB(e,t){if(qa(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(qa(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function EB(e){var t=CB(e,"string");return qa(t)==="symbol"?t:String(t)}function TB(e,t,n){return t=EB(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ky(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function zy(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ky(Object(n),!0).forEach(function(r){TB(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ky(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zt(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var By=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),df=function(){return Math.random().toString(36).substring(7).split("").join(".")},Uy={INIT:"@@redux/INIT"+df(),REPLACE:"@@redux/REPLACE"+df(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+df()}};function jB(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function eN(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(zt(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(zt(1));return n(eN)(e,t)}if(typeof e!="function")throw new Error(zt(2));var i=e,o=t,a=[],l=a,s=!1;function u(){l===a&&(l=a.slice())}function c(){if(s)throw new Error(zt(3));return o}function d(h){if(typeof h!="function")throw new Error(zt(4));if(s)throw new Error(zt(5));var w=!0;return u(),l.push(h),function(){if(w){if(s)throw new Error(zt(6));w=!1,u();var y=l.indexOf(h);l.splice(y,1),a=null}}}function f(h){if(!jB(h))throw new Error(zt(7));if(typeof h.type>"u")throw new Error(zt(8));if(s)throw new Error(zt(9));try{s=!0,o=i(o,h)}finally{s=!1}for(var w=a=l,I=0;I<w.length;I++){var y=w[I];y()}return h}function p(h){if(typeof h!="function")throw new Error(zt(10));i=h,f({type:Uy.REPLACE})}function g(){var h,w=d;return h={subscribe:function(y){if(typeof y!="object"||y===null)throw new Error(zt(11));function M(){y.next&&y.next(c())}M();var x=w(M);return{unsubscribe:x}}},h[By]=function(){return this},h}return f({type:Uy.INIT}),r={dispatch:f,subscribe:d,getState:c,replaceReducer:p},r[By]=g,r}function $y(e,t){return function(){return t(e.apply(this,arguments))}}function _y(e,t){if(typeof e=="function")return $y(e,t);if(typeof e!="object"||e===null)throw new Error(zt(16));var n={};for(var r in e){var i=e[r];typeof i=="function"&&(n[r]=$y(i,t))}return n}function tN(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.length===0?function(r){return r}:t.length===1?t[0]:t.reduce(function(r,i){return function(){return r(i.apply(void 0,arguments))}})}function LB(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return function(){var i=r.apply(void 0,arguments),o=function(){throw new Error(zt(15))},a={getState:i.getState,dispatch:function(){return o.apply(void 0,arguments)}},l=t.map(function(s){return s(a)});return o=tN.apply(void 0,l)(i.dispatch),zy(zy({},i),{},{dispatch:o})}}}var nN=k.createContext(null);function PB(e){e()}var rN=PB,RB=function(t){return rN=t},OB=function(){return rN};function kB(){var e=OB(),t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e(function(){for(var i=t;i;)i.callback(),i=i.next})},get:function(){for(var i=[],o=t;o;)i.push(o),o=o.next;return i},subscribe:function(i){var o=!0,a=n={callback:i,next:null,prev:n};return a.prev?a.prev.next=a:t=a,function(){!o||t===null||(o=!1,a.next?a.next.prev=a.prev:n=a.prev,a.prev?a.prev.next=a.next:t=a.next)}}}}var Fy={notify:function(){},get:function(){return[]}};function iN(e,t){var n,r=Fy;function i(d){return s(),r.subscribe(d)}function o(){r.notify()}function a(){c.onStateChange&&c.onStateChange()}function l(){return!!n}function s(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=kB())}function u(){n&&(n(),n=void 0,r.clear(),r=Fy)}var c={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:l,trySubscribe:s,tryUnsubscribe:u,getListeners:function(){return r}};return c}var oN=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?v.useLayoutEffect:v.useEffect;function zB(e){var t=e.store,n=e.context,r=e.children,i=v.useMemo(function(){var l=iN(t);return{store:t,subscription:l}},[t]),o=v.useMemo(function(){return t.getState()},[t]);oN(function(){var l=i.subscription;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),o!==t.getState()&&l.notifyNestedSubs(),function(){l.tryUnsubscribe(),l.onStateChange=null}},[i,o]);var a=n||nN;return k.createElement(a.Provider,{value:i},r)}function Cu(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var aN={exports:{}},De={};/** @license React v16.13.1
97
97
  * react-is.production.min.js
98
98
  *
99
99
  * Copyright (c) Facebook, Inc. and its affiliates.
100
100
  *
101
101
  * This source code is licensed under the MIT license found in the
102
102
  * LICENSE file in the root directory of this source tree.
103
- */var dt=typeof Symbol=="function"&&Symbol.for,kg=dt?Symbol.for("react.element"):60103,zg=dt?Symbol.for("react.portal"):60106,Fc=dt?Symbol.for("react.fragment"):60107,Hc=dt?Symbol.for("react.strict_mode"):60108,Wc=dt?Symbol.for("react.profiler"):60114,Gc=dt?Symbol.for("react.provider"):60109,Vc=dt?Symbol.for("react.context"):60110,Bg=dt?Symbol.for("react.async_mode"):60111,Zc=dt?Symbol.for("react.concurrent_mode"):60111,Yc=dt?Symbol.for("react.forward_ref"):60112,Qc=dt?Symbol.for("react.suspense"):60113,BB=dt?Symbol.for("react.suspense_list"):60120,Jc=dt?Symbol.for("react.memo"):60115,Xc=dt?Symbol.for("react.lazy"):60116,UB=dt?Symbol.for("react.block"):60121,$B=dt?Symbol.for("react.fundamental"):60117,_B=dt?Symbol.for("react.responder"):60118,FB=dt?Symbol.for("react.scope"):60119;function ln(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case kg:switch(e=e.type,e){case Bg:case Zc:case Fc:case Wc:case Hc:case Qc:return e;default:switch(e=e&&e.$$typeof,e){case Vc:case Yc:case Xc:case Jc:case Gc:return e;default:return t}}case zg:return t}}}function lS(e){return ln(e)===Zc}De.AsyncMode=Bg;De.ConcurrentMode=Zc;De.ContextConsumer=Vc;De.ContextProvider=Gc;De.Element=kg;De.ForwardRef=Yc;De.Fragment=Fc;De.Lazy=Xc;De.Memo=Jc;De.Portal=zg;De.Profiler=Wc;De.StrictMode=Hc;De.Suspense=Qc;De.isAsyncMode=function(e){return lS(e)||ln(e)===Bg};De.isConcurrentMode=lS;De.isContextConsumer=function(e){return ln(e)===Vc};De.isContextProvider=function(e){return ln(e)===Gc};De.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===kg};De.isForwardRef=function(e){return ln(e)===Yc};De.isFragment=function(e){return ln(e)===Fc};De.isLazy=function(e){return ln(e)===Xc};De.isMemo=function(e){return ln(e)===Jc};De.isPortal=function(e){return ln(e)===zg};De.isProfiler=function(e){return ln(e)===Wc};De.isStrictMode=function(e){return ln(e)===Hc};De.isSuspense=function(e){return ln(e)===Qc};De.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Fc||e===Zc||e===Wc||e===Hc||e===Qc||e===BB||typeof e=="object"&&e!==null&&(e.$$typeof===Xc||e.$$typeof===Jc||e.$$typeof===Gc||e.$$typeof===Vc||e.$$typeof===Yc||e.$$typeof===$B||e.$$typeof===_B||e.$$typeof===FB||e.$$typeof===UB)};De.typeOf=ln;aS.exports=De;var HB=aS.exports,Ug=HB,WB={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},GB={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},VB={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},sS={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},$g={};$g[Ug.ForwardRef]=VB;$g[Ug.Memo]=sS;function Hy(e){return Ug.isMemo(e)?sS:$g[e.$$typeof]||WB}var ZB=Object.defineProperty,YB=Object.getOwnPropertyNames,Wy=Object.getOwnPropertySymbols,QB=Object.getOwnPropertyDescriptor,JB=Object.getPrototypeOf,Gy=Object.prototype;function uS(e,t,n){if(typeof t!="string"){if(Gy){var r=JB(t);r&&r!==Gy&&uS(e,r,n)}var i=YB(t);Wy&&(i=i.concat(Wy(t)));for(var o=Hy(e),a=Hy(t),l=0;l<i.length;++l){var s=i[l];if(!GB[s]&&!(n&&n[s])&&!(a&&a[s])&&!(o&&o[s])){var u=QB(t,s);try{ZB(e,s,u)}catch{}}}}return e}var XB=uS;const Vy=sl(XB);var cS={exports:{}},Ee={};/** @license React v17.0.2
103
+ */var dt=typeof Symbol=="function"&&Symbol.for,kg=dt?Symbol.for("react.element"):60103,zg=dt?Symbol.for("react.portal"):60106,Fc=dt?Symbol.for("react.fragment"):60107,Hc=dt?Symbol.for("react.strict_mode"):60108,Gc=dt?Symbol.for("react.profiler"):60114,Wc=dt?Symbol.for("react.provider"):60109,Vc=dt?Symbol.for("react.context"):60110,Bg=dt?Symbol.for("react.async_mode"):60111,Zc=dt?Symbol.for("react.concurrent_mode"):60111,Yc=dt?Symbol.for("react.forward_ref"):60112,Qc=dt?Symbol.for("react.suspense"):60113,BB=dt?Symbol.for("react.suspense_list"):60120,Jc=dt?Symbol.for("react.memo"):60115,Xc=dt?Symbol.for("react.lazy"):60116,UB=dt?Symbol.for("react.block"):60121,$B=dt?Symbol.for("react.fundamental"):60117,_B=dt?Symbol.for("react.responder"):60118,FB=dt?Symbol.for("react.scope"):60119;function ln(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case kg:switch(e=e.type,e){case Bg:case Zc:case Fc:case Gc:case Hc:case Qc:return e;default:switch(e=e&&e.$$typeof,e){case Vc:case Yc:case Xc:case Jc:case Wc:return e;default:return t}}case zg:return t}}}function lN(e){return ln(e)===Zc}De.AsyncMode=Bg;De.ConcurrentMode=Zc;De.ContextConsumer=Vc;De.ContextProvider=Wc;De.Element=kg;De.ForwardRef=Yc;De.Fragment=Fc;De.Lazy=Xc;De.Memo=Jc;De.Portal=zg;De.Profiler=Gc;De.StrictMode=Hc;De.Suspense=Qc;De.isAsyncMode=function(e){return lN(e)||ln(e)===Bg};De.isConcurrentMode=lN;De.isContextConsumer=function(e){return ln(e)===Vc};De.isContextProvider=function(e){return ln(e)===Wc};De.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===kg};De.isForwardRef=function(e){return ln(e)===Yc};De.isFragment=function(e){return ln(e)===Fc};De.isLazy=function(e){return ln(e)===Xc};De.isMemo=function(e){return ln(e)===Jc};De.isPortal=function(e){return ln(e)===zg};De.isProfiler=function(e){return ln(e)===Gc};De.isStrictMode=function(e){return ln(e)===Hc};De.isSuspense=function(e){return ln(e)===Qc};De.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Fc||e===Zc||e===Gc||e===Hc||e===Qc||e===BB||typeof e=="object"&&e!==null&&(e.$$typeof===Xc||e.$$typeof===Jc||e.$$typeof===Wc||e.$$typeof===Vc||e.$$typeof===Yc||e.$$typeof===$B||e.$$typeof===_B||e.$$typeof===FB||e.$$typeof===UB)};De.typeOf=ln;aN.exports=De;var HB=aN.exports,Ug=HB,GB={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},WB={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},VB={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},sN={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},$g={};$g[Ug.ForwardRef]=VB;$g[Ug.Memo]=sN;function Hy(e){return Ug.isMemo(e)?sN:$g[e.$$typeof]||GB}var ZB=Object.defineProperty,YB=Object.getOwnPropertyNames,Gy=Object.getOwnPropertySymbols,QB=Object.getOwnPropertyDescriptor,JB=Object.getPrototypeOf,Wy=Object.prototype;function uN(e,t,n){if(typeof t!="string"){if(Wy){var r=JB(t);r&&r!==Wy&&uN(e,r,n)}var i=YB(t);Gy&&(i=i.concat(Gy(t)));for(var o=Hy(e),a=Hy(t),l=0;l<i.length;++l){var s=i[l];if(!WB[s]&&!(n&&n[s])&&!(a&&a[s])&&!(o&&o[s])){var u=QB(t,s);try{ZB(e,s,u)}catch{}}}}return e}var XB=uN;const Vy=sl(XB);var cN={exports:{}},Ee={};/** @license React v17.0.2
104
104
  * react-is.production.min.js
105
105
  *
106
106
  * Copyright (c) Facebook, Inc. and its affiliates.
107
107
  *
108
108
  * This source code is licensed under the MIT license found in the
109
109
  * LICENSE file in the root directory of this source tree.
110
- */var qc=60103,Kc=60106,Pl=60107,Ll=60108,Rl=60114,Ol=60109,kl=60110,zl=60112,Bl=60113,_g=60120,Ul=60115,$l=60116,dS=60121,fS=60122,pS=60117,mS=60129,gS=60131;if(typeof Symbol=="function"&&Symbol.for){var pt=Symbol.for;qc=pt("react.element"),Kc=pt("react.portal"),Pl=pt("react.fragment"),Ll=pt("react.strict_mode"),Rl=pt("react.profiler"),Ol=pt("react.provider"),kl=pt("react.context"),zl=pt("react.forward_ref"),Bl=pt("react.suspense"),_g=pt("react.suspense_list"),Ul=pt("react.memo"),$l=pt("react.lazy"),dS=pt("react.block"),fS=pt("react.server.block"),pS=pt("react.fundamental"),mS=pt("react.debug_trace_mode"),gS=pt("react.legacy_hidden")}function Rn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case qc:switch(e=e.type,e){case Pl:case Rl:case Ll:case Bl:case _g:return e;default:switch(e=e&&e.$$typeof,e){case kl:case zl:case $l:case Ul:case Ol:return e;default:return t}}case Kc:return t}}}var qB=Ol,KB=qc,eU=zl,tU=Pl,nU=$l,rU=Ul,iU=Kc,oU=Rl,aU=Ll,lU=Bl;Ee.ContextConsumer=kl;Ee.ContextProvider=qB;Ee.Element=KB;Ee.ForwardRef=eU;Ee.Fragment=tU;Ee.Lazy=nU;Ee.Memo=rU;Ee.Portal=iU;Ee.Profiler=oU;Ee.StrictMode=aU;Ee.Suspense=lU;Ee.isAsyncMode=function(){return!1};Ee.isConcurrentMode=function(){return!1};Ee.isContextConsumer=function(e){return Rn(e)===kl};Ee.isContextProvider=function(e){return Rn(e)===Ol};Ee.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===qc};Ee.isForwardRef=function(e){return Rn(e)===zl};Ee.isFragment=function(e){return Rn(e)===Pl};Ee.isLazy=function(e){return Rn(e)===$l};Ee.isMemo=function(e){return Rn(e)===Ul};Ee.isPortal=function(e){return Rn(e)===Kc};Ee.isProfiler=function(e){return Rn(e)===Rl};Ee.isStrictMode=function(e){return Rn(e)===Ll};Ee.isSuspense=function(e){return Rn(e)===Bl};Ee.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Pl||e===Rl||e===mS||e===Ll||e===Bl||e===_g||e===gS||typeof e=="object"&&e!==null&&(e.$$typeof===$l||e.$$typeof===Ul||e.$$typeof===Ol||e.$$typeof===kl||e.$$typeof===zl||e.$$typeof===pS||e.$$typeof===dS||e[0]===fS)};Ee.typeOf=Rn;cS.exports=Ee;var sU=cS.exports,uU=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],cU=["reactReduxForwardedRef"],dU=[],fU=[null,null];function pU(e,t){var n=e[1];return[t.payload,n+1]}function Zy(e,t,n){oS(function(){return e.apply(void 0,t)},n)}function mU(e,t,n,r,i,o,a){e.current=r,t.current=i,n.current=!1,o.current&&(o.current=null,a())}function gU(e,t,n,r,i,o,a,l,s,u){if(e){var c=!1,d=null,f=function(){if(!c){var h=t.getState(),w,I;try{w=r(h,i.current)}catch(y){I=y,d=y}I||(d=null),w===o.current?a.current||s():(o.current=w,l.current=w,a.current=!0,u({type:"STORE_UPDATED",payload:{error:I}}))}};n.onStateChange=f,n.trySubscribe(),f();var p=function(){if(c=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d};return p}}var hU=function(){return[null,0]};function vU(e,t){t===void 0&&(t={});var n=t,r=n.getDisplayName,i=r===void 0?function(b){return"ConnectAdvanced("+b+")"}:r,o=n.methodName,a=o===void 0?"connectAdvanced":o,l=n.renderCountProp,s=l===void 0?void 0:l,u=n.shouldHandleStateChanges,c=u===void 0?!0:u,d=n.storeKey,f=d===void 0?"store":d;n.withRef;var p=n.forwardRef,g=p===void 0?!1:p,h=n.context,w=h===void 0?nS:h,I=Cu(n,uU),y=w;return function(x){var N=x.displayName||x.name||"Component",M=i(N),S=le({},I,{getDisplayName:i,methodName:a,renderCountProp:s,shouldHandleStateChanges:c,storeKey:f,displayName:M,wrappedComponentName:N,WrappedComponent:x}),C=I.pure;function L(G){return e(G.dispatch,S)}var R=C?v.useMemo:function(G){return G()};function O(G){var Z=v.useMemo(function(){var Xr=G.reactReduxForwardedRef,qr=Cu(G,cU);return[G.context,Xr,qr]},[G]),$=Z[0],ee=Z[1],P=Z[2],B=v.useMemo(function(){return $&&$.Consumer&&sU.isContextConsumer(k.createElement($.Consumer,null))?$:y},[$,y]),F=v.useContext(B),V=!!G.store&&!!G.store.getState&&!!G.store.dispatch;F&&F.store;var D=V?G.store:F.store,E=v.useMemo(function(){return L(D)},[D]),T=v.useMemo(function(){if(!c)return fU;var Xr=iS(D,V?null:F.subscription),qr=Xr.notifyNestedSubs.bind(Xr);return[Xr,qr]},[D,V,F]),z=T[0],_=T[1],ie=v.useMemo(function(){return V?F:le({},F,{subscription:z})},[V,F,z]),ue=v.useReducer(pU,dU,hU),X=ue[0],me=X[0],Ie=ue[1];if(me&&me.error)throw me.error;var ve=v.useRef(),Ae=v.useRef(P),ft=v.useRef(),sn=v.useRef(!1),tt=R(function(){return ft.current&&P===Ae.current?ft.current:E(D.getState(),P)},[D,me,P]);Zy(mU,[Ae,ve,sn,P,tt,ft,_]),Zy(gU,[c,D,z,E,Ae,ve,sn,ft,_,Ie],[D,z,E]);var Je=v.useMemo(function(){return k.createElement(x,le({},tt,{ref:ee}))},[ee,x,tt]),ji=v.useMemo(function(){return c?k.createElement(B.Provider,{value:ie},Je):Je},[B,Je,ie]);return ji}var J=C?k.memo(O):O;if(J.WrappedComponent=x,J.displayName=O.displayName=M,g){var U=k.forwardRef(function(Z,$){return k.createElement(J,le({},Z,{reactReduxForwardedRef:$}))});return U.displayName=M,U.WrappedComponent=x,Vy(U,x)}return Vy(J,x)}}function Yy(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function ff(e,t){if(Yy(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!Yy(e[n[i]],t[n[i]]))return!1;return!0}function yU(e,t){var n={},r=function(a){var l=e[a];typeof l=="function"&&(n[a]=function(){return t(l.apply(void 0,arguments))})};for(var i in e)r(i);return n}function Fg(e){return function(n,r){var i=e(n,r);function o(){return i}return o.dependsOnOwnProps=!1,o}}function Qy(e){return e.dependsOnOwnProps!==null&&e.dependsOnOwnProps!==void 0?!!e.dependsOnOwnProps:e.length!==1}function hS(e,t){return function(r,i){i.displayName;var o=function(l,s){return o.dependsOnOwnProps?o.mapToProps(l,s):o.mapToProps(l)};return o.dependsOnOwnProps=!0,o.mapToProps=function(l,s){o.mapToProps=e,o.dependsOnOwnProps=Qy(e);var u=o(l,s);return typeof u=="function"&&(o.mapToProps=u,o.dependsOnOwnProps=Qy(u),u=o(l,s)),u},o}}function IU(e){return typeof e=="function"?hS(e):void 0}function wU(e){return e?void 0:Fg(function(t){return{dispatch:t}})}function bU(e){return e&&typeof e=="object"?Fg(function(t){return yU(e,t)}):void 0}const xU=[IU,wU,bU];function MU(e){return typeof e=="function"?hS(e):void 0}function SU(e){return e?void 0:Fg(function(){return{}})}const NU=[MU,SU];function DU(e,t,n){return le({},n,e,t)}function AU(e){return function(n,r){r.displayName;var i=r.pure,o=r.areMergedPropsEqual,a=!1,l;return function(u,c,d){var f=e(u,c,d);return a?(!i||!o(f,l))&&(l=f):(a=!0,l=f),l}}}function CU(e){return typeof e=="function"?AU(e):void 0}function EU(e){return e?void 0:function(){return DU}}const TU=[CU,EU];var jU=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function PU(e,t,n,r){return function(o,a){return n(e(o,a),t(r,a),a)}}function LU(e,t,n,r,i){var o=i.areStatesEqual,a=i.areOwnPropsEqual,l=i.areStatePropsEqual,s=!1,u,c,d,f,p;function g(b,x){return u=b,c=x,d=e(u,c),f=t(r,c),p=n(d,f,c),s=!0,p}function h(){return d=e(u,c),t.dependsOnOwnProps&&(f=t(r,c)),p=n(d,f,c),p}function w(){return e.dependsOnOwnProps&&(d=e(u,c)),t.dependsOnOwnProps&&(f=t(r,c)),p=n(d,f,c),p}function I(){var b=e(u,c),x=!l(b,d);return d=b,x&&(p=n(d,f,c)),p}function y(b,x){var N=!a(x,c),M=!o(b,u,x,c);return u=b,c=x,N&&M?h():N?w():M?I():p}return function(x,N){return s?y(x,N):g(x,N)}}function RU(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,i=t.initMergeProps,o=Cu(t,jU),a=n(e,o),l=r(e,o),s=i(e,o),u=o.pure?LU:PU;return u(a,l,s,e,o)}var OU=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function pf(e,t,n){for(var r=t.length-1;r>=0;r--){var i=t[r](e);if(i)return i}return function(o,a){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+a.wrappedComponentName+".")}}function kU(e,t){return e===t}function zU(e){var t=e===void 0?{}:e,n=t.connectHOC,r=n===void 0?vU:n,i=t.mapStateToPropsFactories,o=i===void 0?NU:i,a=t.mapDispatchToPropsFactories,l=a===void 0?xU:a,s=t.mergePropsFactories,u=s===void 0?TU:s,c=t.selectorFactory,d=c===void 0?RU:c;return function(p,g,h,w){w===void 0&&(w={});var I=w,y=I.pure,b=y===void 0?!0:y,x=I.areStatesEqual,N=x===void 0?kU:x,M=I.areOwnPropsEqual,S=M===void 0?ff:M,C=I.areStatePropsEqual,L=C===void 0?ff:C,R=I.areMergedPropsEqual,O=R===void 0?ff:R,J=Cu(I,OU),U=pf(p,o,"mapStateToProps"),G=pf(g,l,"mapDispatchToProps"),Z=pf(h,u,"mergeProps");return r(d,le({methodName:"connect",getDisplayName:function(ee){return"Connect("+ee+")"},shouldHandleStateChanges:!!p,initMapStateToProps:U,initMapDispatchToProps:G,initMergeProps:Z,pure:b,areStatesEqual:N,areOwnPropsEqual:S,areStatePropsEqual:L,areMergedPropsEqual:O},J))}}const vS=zU();RB(ml.unstable_batchedUpdates);function BU(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function yS(e,t){var n=v.useState(function(){return{inputs:t,result:e()}})[0],r=v.useRef(!0),i=v.useRef(n),o=r.current||!!(t&&i.current.inputs&&BU(t,i.current.inputs)),a=o?i.current:{inputs:t,result:e()};return v.useEffect(function(){r.current=!1,i.current=a},[a]),a.result}function UU(e,t){return yS(function(){return e},t)}var we=yS,oe=UU,$U=!0,mf="Invariant failed";function _U(e,t){if(!e){if($U)throw new Error(mf);var n=typeof t=="function"?t():t,r=n?"".concat(mf,": ").concat(n):mf;throw new Error(r)}}var Tn=function(t){var n=t.top,r=t.right,i=t.bottom,o=t.left,a=r-o,l=i-n,s={top:n,right:r,bottom:i,left:o,width:a,height:l,x:o,y:n,center:{x:(r+o)/2,y:(i+n)/2}};return s},Hg=function(t,n){return{top:t.top-n.top,left:t.left-n.left,bottom:t.bottom+n.bottom,right:t.right+n.right}},Jy=function(t,n){return{top:t.top+n.top,left:t.left+n.left,bottom:t.bottom-n.bottom,right:t.right-n.right}},FU=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},gf={top:0,right:0,bottom:0,left:0},Wg=function(t){var n=t.borderBox,r=t.margin,i=r===void 0?gf:r,o=t.border,a=o===void 0?gf:o,l=t.padding,s=l===void 0?gf:l,u=Tn(Hg(n,i)),c=Tn(Jy(n,a)),d=Tn(Jy(c,s));return{marginBox:u,borderBox:Tn(n),paddingBox:c,contentBox:d,margin:i,border:a,padding:s}},dn=function(t){var n=t.slice(0,-2),r=t.slice(-2);if(r!=="px")return 0;var i=Number(n);return isNaN(i)&&_U(!1),i},HU=function(){return{x:window.pageXOffset,y:window.pageYOffset}},Eu=function(t,n){var r=t.borderBox,i=t.border,o=t.margin,a=t.padding,l=FU(r,n);return Wg({borderBox:l,border:i,margin:o,padding:a})},Tu=function(t,n){return n===void 0&&(n=HU()),Eu(t,n)},IS=function(t,n){var r={top:dn(n.marginTop),right:dn(n.marginRight),bottom:dn(n.marginBottom),left:dn(n.marginLeft)},i={top:dn(n.paddingTop),right:dn(n.paddingRight),bottom:dn(n.paddingBottom),left:dn(n.paddingLeft)},o={top:dn(n.borderTopWidth),right:dn(n.borderRightWidth),bottom:dn(n.borderBottomWidth),left:dn(n.borderLeftWidth)};return Wg({borderBox:t,margin:r,padding:i,border:o})},wS=function(t){var n=t.getBoundingClientRect(),r=window.getComputedStyle(t);return IS(n,r)},Xy=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function WU(e,t){return!!(e===t||Xy(e)&&Xy(t))}function GU(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!WU(e[n],t[n]))return!1;return!0}function ut(e,t){t===void 0&&(t=GU);var n,r=[],i,o=!1;function a(){for(var l=[],s=0;s<arguments.length;s++)l[s]=arguments[s];return o&&n===this&&t(l,r)||(i=e.apply(this,l),o=!0,n=this,r=l),i}return a}var VU=function(t){var n=[],r=null,i=function(){for(var a=arguments.length,l=new Array(a),s=0;s<a;s++)l[s]=arguments[s];n=l,!r&&(r=requestAnimationFrame(function(){r=null,t.apply(void 0,n)}))};return i.cancel=function(){r&&(cancelAnimationFrame(r),r=null)},i};const Ka=VU;function bS(e,t){}bS.bind(null,"warn");bS.bind(null,"error");function kr(){}function ZU(e,t){return le({},e,{},t)}function vn(e,t,n){var r=t.map(function(i){var o=ZU(n,i.options);return e.addEventListener(i.eventName,i.fn,o),function(){e.removeEventListener(i.eventName,i.fn,o)}});return function(){r.forEach(function(o){o()})}}var YU="Invariant failed";function ju(e){this.message=e}ju.prototype.toString=function(){return this.message};function Q(e,t){if(!e)throw new ju(YU)}var QU=function(e){KM(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return r=e.call.apply(e,[this].concat(o))||this,r.callbacks=null,r.unbind=kr,r.onWindowError=function(l){var s=r.getCallbacks();s.isDragging()&&s.tryAbort();var u=l.error;u instanceof ju&&l.preventDefault()},r.getCallbacks=function(){if(!r.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return r.callbacks},r.setCallbacks=function(l){r.callbacks=l},r}var n=t.prototype;return n.componentDidMount=function(){this.unbind=vn(window,[{eventName:"error",fn:this.onWindowError}])},n.componentDidCatch=function(i){if(i instanceof ju){this.setState({});return}throw i},n.componentWillUnmount=function(){this.unbind()},n.render=function(){return this.props.children(this.setCallbacks)},t}(k.Component),JU=`
110
+ */var qc=60103,Kc=60106,Ll=60107,Pl=60108,Rl=60114,Ol=60109,kl=60110,zl=60112,Bl=60113,_g=60120,Ul=60115,$l=60116,dN=60121,fN=60122,pN=60117,mN=60129,gN=60131;if(typeof Symbol=="function"&&Symbol.for){var pt=Symbol.for;qc=pt("react.element"),Kc=pt("react.portal"),Ll=pt("react.fragment"),Pl=pt("react.strict_mode"),Rl=pt("react.profiler"),Ol=pt("react.provider"),kl=pt("react.context"),zl=pt("react.forward_ref"),Bl=pt("react.suspense"),_g=pt("react.suspense_list"),Ul=pt("react.memo"),$l=pt("react.lazy"),dN=pt("react.block"),fN=pt("react.server.block"),pN=pt("react.fundamental"),mN=pt("react.debug_trace_mode"),gN=pt("react.legacy_hidden")}function Rn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case qc:switch(e=e.type,e){case Ll:case Rl:case Pl:case Bl:case _g:return e;default:switch(e=e&&e.$$typeof,e){case kl:case zl:case $l:case Ul:case Ol:return e;default:return t}}case Kc:return t}}}var qB=Ol,KB=qc,eU=zl,tU=Ll,nU=$l,rU=Ul,iU=Kc,oU=Rl,aU=Pl,lU=Bl;Ee.ContextConsumer=kl;Ee.ContextProvider=qB;Ee.Element=KB;Ee.ForwardRef=eU;Ee.Fragment=tU;Ee.Lazy=nU;Ee.Memo=rU;Ee.Portal=iU;Ee.Profiler=oU;Ee.StrictMode=aU;Ee.Suspense=lU;Ee.isAsyncMode=function(){return!1};Ee.isConcurrentMode=function(){return!1};Ee.isContextConsumer=function(e){return Rn(e)===kl};Ee.isContextProvider=function(e){return Rn(e)===Ol};Ee.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===qc};Ee.isForwardRef=function(e){return Rn(e)===zl};Ee.isFragment=function(e){return Rn(e)===Ll};Ee.isLazy=function(e){return Rn(e)===$l};Ee.isMemo=function(e){return Rn(e)===Ul};Ee.isPortal=function(e){return Rn(e)===Kc};Ee.isProfiler=function(e){return Rn(e)===Rl};Ee.isStrictMode=function(e){return Rn(e)===Pl};Ee.isSuspense=function(e){return Rn(e)===Bl};Ee.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Ll||e===Rl||e===mN||e===Pl||e===Bl||e===_g||e===gN||typeof e=="object"&&e!==null&&(e.$$typeof===$l||e.$$typeof===Ul||e.$$typeof===Ol||e.$$typeof===kl||e.$$typeof===zl||e.$$typeof===pN||e.$$typeof===dN||e[0]===fN)};Ee.typeOf=Rn;cN.exports=Ee;var sU=cN.exports,uU=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],cU=["reactReduxForwardedRef"],dU=[],fU=[null,null];function pU(e,t){var n=e[1];return[t.payload,n+1]}function Zy(e,t,n){oN(function(){return e.apply(void 0,t)},n)}function mU(e,t,n,r,i,o,a){e.current=r,t.current=i,n.current=!1,o.current&&(o.current=null,a())}function gU(e,t,n,r,i,o,a,l,s,u){if(e){var c=!1,d=null,f=function(){if(!c){var h=t.getState(),w,I;try{w=r(h,i.current)}catch(y){I=y,d=y}I||(d=null),w===o.current?a.current||s():(o.current=w,l.current=w,a.current=!0,u({type:"STORE_UPDATED",payload:{error:I}}))}};n.onStateChange=f,n.trySubscribe(),f();var p=function(){if(c=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d};return p}}var hU=function(){return[null,0]};function vU(e,t){t===void 0&&(t={});var n=t,r=n.getDisplayName,i=r===void 0?function(M){return"ConnectAdvanced("+M+")"}:r,o=n.methodName,a=o===void 0?"connectAdvanced":o,l=n.renderCountProp,s=l===void 0?void 0:l,u=n.shouldHandleStateChanges,c=u===void 0?!0:u,d=n.storeKey,f=d===void 0?"store":d;n.withRef;var p=n.forwardRef,g=p===void 0?!1:p,h=n.context,w=h===void 0?nN:h,I=Cu(n,uU),y=w;return function(x){var S=x.displayName||x.name||"Component",b=i(S),N=le({},I,{getDisplayName:i,methodName:a,renderCountProp:s,shouldHandleStateChanges:c,storeKey:f,displayName:b,wrappedComponentName:S,WrappedComponent:x}),C=I.pure;function P(W){return e(W.dispatch,N)}var R=C?v.useMemo:function(W){return W()};function O(W){var Z=v.useMemo(function(){var Xr=W.reactReduxForwardedRef,qr=Cu(W,cU);return[W.context,Xr,qr]},[W]),$=Z[0],ee=Z[1],L=Z[2],B=v.useMemo(function(){return $&&$.Consumer&&sU.isContextConsumer(k.createElement($.Consumer,null))?$:y},[$,y]),F=v.useContext(B),V=!!W.store&&!!W.store.getState&&!!W.store.dispatch;F&&F.store;var D=V?W.store:F.store,E=v.useMemo(function(){return P(D)},[D]),T=v.useMemo(function(){if(!c)return fU;var Xr=iN(D,V?null:F.subscription),qr=Xr.notifyNestedSubs.bind(Xr);return[Xr,qr]},[D,V,F]),z=T[0],_=T[1],ie=v.useMemo(function(){return V?F:le({},F,{subscription:z})},[V,F,z]),ue=v.useReducer(pU,dU,hU),X=ue[0],me=X[0],Ie=ue[1];if(me&&me.error)throw me.error;var ve=v.useRef(),Ae=v.useRef(L),ft=v.useRef(),sn=v.useRef(!1),tt=R(function(){return ft.current&&L===Ae.current?ft.current:E(D.getState(),L)},[D,me,L]);Zy(mU,[Ae,ve,sn,L,tt,ft,_]),Zy(gU,[c,D,z,E,Ae,ve,sn,ft,_,Ie],[D,z,E]);var Je=v.useMemo(function(){return k.createElement(x,le({},tt,{ref:ee}))},[ee,x,tt]),ji=v.useMemo(function(){return c?k.createElement(B.Provider,{value:ie},Je):Je},[B,Je,ie]);return ji}var J=C?k.memo(O):O;if(J.WrappedComponent=x,J.displayName=O.displayName=b,g){var U=k.forwardRef(function(Z,$){return k.createElement(J,le({},Z,{reactReduxForwardedRef:$}))});return U.displayName=b,U.WrappedComponent=x,Vy(U,x)}return Vy(J,x)}}function Yy(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function ff(e,t){if(Yy(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!Yy(e[n[i]],t[n[i]]))return!1;return!0}function yU(e,t){var n={},r=function(a){var l=e[a];typeof l=="function"&&(n[a]=function(){return t(l.apply(void 0,arguments))})};for(var i in e)r(i);return n}function Fg(e){return function(n,r){var i=e(n,r);function o(){return i}return o.dependsOnOwnProps=!1,o}}function Qy(e){return e.dependsOnOwnProps!==null&&e.dependsOnOwnProps!==void 0?!!e.dependsOnOwnProps:e.length!==1}function hN(e,t){return function(r,i){i.displayName;var o=function(l,s){return o.dependsOnOwnProps?o.mapToProps(l,s):o.mapToProps(l)};return o.dependsOnOwnProps=!0,o.mapToProps=function(l,s){o.mapToProps=e,o.dependsOnOwnProps=Qy(e);var u=o(l,s);return typeof u=="function"&&(o.mapToProps=u,o.dependsOnOwnProps=Qy(u),u=o(l,s)),u},o}}function IU(e){return typeof e=="function"?hN(e):void 0}function wU(e){return e?void 0:Fg(function(t){return{dispatch:t}})}function MU(e){return e&&typeof e=="object"?Fg(function(t){return yU(e,t)}):void 0}const xU=[IU,wU,MU];function bU(e){return typeof e=="function"?hN(e):void 0}function NU(e){return e?void 0:Fg(function(){return{}})}const SU=[bU,NU];function DU(e,t,n){return le({},n,e,t)}function AU(e){return function(n,r){r.displayName;var i=r.pure,o=r.areMergedPropsEqual,a=!1,l;return function(u,c,d){var f=e(u,c,d);return a?(!i||!o(f,l))&&(l=f):(a=!0,l=f),l}}}function CU(e){return typeof e=="function"?AU(e):void 0}function EU(e){return e?void 0:function(){return DU}}const TU=[CU,EU];var jU=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function LU(e,t,n,r){return function(o,a){return n(e(o,a),t(r,a),a)}}function PU(e,t,n,r,i){var o=i.areStatesEqual,a=i.areOwnPropsEqual,l=i.areStatePropsEqual,s=!1,u,c,d,f,p;function g(M,x){return u=M,c=x,d=e(u,c),f=t(r,c),p=n(d,f,c),s=!0,p}function h(){return d=e(u,c),t.dependsOnOwnProps&&(f=t(r,c)),p=n(d,f,c),p}function w(){return e.dependsOnOwnProps&&(d=e(u,c)),t.dependsOnOwnProps&&(f=t(r,c)),p=n(d,f,c),p}function I(){var M=e(u,c),x=!l(M,d);return d=M,x&&(p=n(d,f,c)),p}function y(M,x){var S=!a(x,c),b=!o(M,u,x,c);return u=M,c=x,S&&b?h():S?w():b?I():p}return function(x,S){return s?y(x,S):g(x,S)}}function RU(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,i=t.initMergeProps,o=Cu(t,jU),a=n(e,o),l=r(e,o),s=i(e,o),u=o.pure?PU:LU;return u(a,l,s,e,o)}var OU=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function pf(e,t,n){for(var r=t.length-1;r>=0;r--){var i=t[r](e);if(i)return i}return function(o,a){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+a.wrappedComponentName+".")}}function kU(e,t){return e===t}function zU(e){var t=e===void 0?{}:e,n=t.connectHOC,r=n===void 0?vU:n,i=t.mapStateToPropsFactories,o=i===void 0?SU:i,a=t.mapDispatchToPropsFactories,l=a===void 0?xU:a,s=t.mergePropsFactories,u=s===void 0?TU:s,c=t.selectorFactory,d=c===void 0?RU:c;return function(p,g,h,w){w===void 0&&(w={});var I=w,y=I.pure,M=y===void 0?!0:y,x=I.areStatesEqual,S=x===void 0?kU:x,b=I.areOwnPropsEqual,N=b===void 0?ff:b,C=I.areStatePropsEqual,P=C===void 0?ff:C,R=I.areMergedPropsEqual,O=R===void 0?ff:R,J=Cu(I,OU),U=pf(p,o,"mapStateToProps"),W=pf(g,l,"mapDispatchToProps"),Z=pf(h,u,"mergeProps");return r(d,le({methodName:"connect",getDisplayName:function(ee){return"Connect("+ee+")"},shouldHandleStateChanges:!!p,initMapStateToProps:U,initMapDispatchToProps:W,initMergeProps:Z,pure:M,areStatesEqual:S,areOwnPropsEqual:N,areStatePropsEqual:P,areMergedPropsEqual:O},J))}}const vN=zU();RB(ml.unstable_batchedUpdates);function BU(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function yN(e,t){var n=v.useState(function(){return{inputs:t,result:e()}})[0],r=v.useRef(!0),i=v.useRef(n),o=r.current||!!(t&&i.current.inputs&&BU(t,i.current.inputs)),a=o?i.current:{inputs:t,result:e()};return v.useEffect(function(){r.current=!1,i.current=a},[a]),a.result}function UU(e,t){return yN(function(){return e},t)}var we=yN,oe=UU,$U=!0,mf="Invariant failed";function _U(e,t){if(!e){if($U)throw new Error(mf);var n=typeof t=="function"?t():t,r=n?"".concat(mf,": ").concat(n):mf;throw new Error(r)}}var Tn=function(t){var n=t.top,r=t.right,i=t.bottom,o=t.left,a=r-o,l=i-n,s={top:n,right:r,bottom:i,left:o,width:a,height:l,x:o,y:n,center:{x:(r+o)/2,y:(i+n)/2}};return s},Hg=function(t,n){return{top:t.top-n.top,left:t.left-n.left,bottom:t.bottom+n.bottom,right:t.right+n.right}},Jy=function(t,n){return{top:t.top+n.top,left:t.left+n.left,bottom:t.bottom-n.bottom,right:t.right-n.right}},FU=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},gf={top:0,right:0,bottom:0,left:0},Gg=function(t){var n=t.borderBox,r=t.margin,i=r===void 0?gf:r,o=t.border,a=o===void 0?gf:o,l=t.padding,s=l===void 0?gf:l,u=Tn(Hg(n,i)),c=Tn(Jy(n,a)),d=Tn(Jy(c,s));return{marginBox:u,borderBox:Tn(n),paddingBox:c,contentBox:d,margin:i,border:a,padding:s}},dn=function(t){var n=t.slice(0,-2),r=t.slice(-2);if(r!=="px")return 0;var i=Number(n);return isNaN(i)&&_U(!1),i},HU=function(){return{x:window.pageXOffset,y:window.pageYOffset}},Eu=function(t,n){var r=t.borderBox,i=t.border,o=t.margin,a=t.padding,l=FU(r,n);return Gg({borderBox:l,border:i,margin:o,padding:a})},Tu=function(t,n){return n===void 0&&(n=HU()),Eu(t,n)},IN=function(t,n){var r={top:dn(n.marginTop),right:dn(n.marginRight),bottom:dn(n.marginBottom),left:dn(n.marginLeft)},i={top:dn(n.paddingTop),right:dn(n.paddingRight),bottom:dn(n.paddingBottom),left:dn(n.paddingLeft)},o={top:dn(n.borderTopWidth),right:dn(n.borderRightWidth),bottom:dn(n.borderBottomWidth),left:dn(n.borderLeftWidth)};return Gg({borderBox:t,margin:r,padding:i,border:o})},wN=function(t){var n=t.getBoundingClientRect(),r=window.getComputedStyle(t);return IN(n,r)},Xy=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function GU(e,t){return!!(e===t||Xy(e)&&Xy(t))}function WU(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!GU(e[n],t[n]))return!1;return!0}function ut(e,t){t===void 0&&(t=WU);var n,r=[],i,o=!1;function a(){for(var l=[],s=0;s<arguments.length;s++)l[s]=arguments[s];return o&&n===this&&t(l,r)||(i=e.apply(this,l),o=!0,n=this,r=l),i}return a}var VU=function(t){var n=[],r=null,i=function(){for(var a=arguments.length,l=new Array(a),s=0;s<a;s++)l[s]=arguments[s];n=l,!r&&(r=requestAnimationFrame(function(){r=null,t.apply(void 0,n)}))};return i.cancel=function(){r&&(cancelAnimationFrame(r),r=null)},i};const Ka=VU;function MN(e,t){}MN.bind(null,"warn");MN.bind(null,"error");function kr(){}function ZU(e,t){return le({},e,{},t)}function vn(e,t,n){var r=t.map(function(i){var o=ZU(n,i.options);return e.addEventListener(i.eventName,i.fn,o),function(){e.removeEventListener(i.eventName,i.fn,o)}});return function(){r.forEach(function(o){o()})}}var YU="Invariant failed";function ju(e){this.message=e}ju.prototype.toString=function(){return this.message};function Q(e,t){if(!e)throw new ju(YU)}var QU=function(e){Kb(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return r=e.call.apply(e,[this].concat(o))||this,r.callbacks=null,r.unbind=kr,r.onWindowError=function(l){var s=r.getCallbacks();s.isDragging()&&s.tryAbort();var u=l.error;u instanceof ju&&l.preventDefault()},r.getCallbacks=function(){if(!r.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return r.callbacks},r.setCallbacks=function(l){r.callbacks=l},r}var n=t.prototype;return n.componentDidMount=function(){this.unbind=vn(window,[{eventName:"error",fn:this.onWindowError}])},n.componentDidCatch=function(i){if(i instanceof ju){this.setState({});return}throw i},n.componentWillUnmount=function(){this.unbind()},n.render=function(){return this.props.children(this.setCallbacks)},t}(k.Component),JU=`
111
111
  Press space bar to start a drag.
112
112
  When dragging you can use the arrow keys to move the item around and escape to cancel.
113
113
  Some screen readers may require you to be in focus mode or to use your pass through key
114
- `,Pu=function(t){return t+1},XU=function(t){return`
115
- You have lifted an item in position `+Pu(t.source.index)+`
116
- `},xS=function(t,n){var r=t.droppableId===n.droppableId,i=Pu(t.index),o=Pu(n.index);return r?`
114
+ `,Lu=function(t){return t+1},XU=function(t){return`
115
+ You have lifted an item in position `+Lu(t.source.index)+`
116
+ `},xN=function(t,n){var r=t.droppableId===n.droppableId,i=Lu(t.index),o=Lu(n.index);return r?`
117
117
  You have moved the item from position `+i+`
118
118
  to position `+o+`
119
119
  `:`
@@ -121,32 +121,32 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
121
121
  in list `+t.droppableId+`
122
122
  to list `+n.droppableId+`
123
123
  in position `+o+`
124
- `},MS=function(t,n,r){var i=n.droppableId===r.droppableId;return i?`
124
+ `},bN=function(t,n,r){var i=n.droppableId===r.droppableId;return i?`
125
125
  The item `+t+`
126
126
  has been combined with `+r.draggableId:`
127
127
  The item `+t+`
128
128
  in list `+n.droppableId+`
129
129
  has been combined with `+r.draggableId+`
130
130
  in list `+r.droppableId+`
131
- `},qU=function(t){var n=t.destination;if(n)return xS(t.source,n);var r=t.combine;return r?MS(t.draggableId,t.source,r):"You are over an area that cannot be dropped on"},qy=function(t){return`
131
+ `},qU=function(t){var n=t.destination;if(n)return xN(t.source,n);var r=t.combine;return r?bN(t.draggableId,t.source,r):"You are over an area that cannot be dropped on"},qy=function(t){return`
132
132
  The item has returned to its starting position
133
- of `+Pu(t.index)+`
133
+ of `+Lu(t.index)+`
134
134
  `},KU=function(t){if(t.reason==="CANCEL")return`
135
135
  Movement cancelled.
136
136
  `+qy(t.source)+`
137
137
  `;var n=t.destination,r=t.combine;return n?`
138
138
  You have dropped the item.
139
- `+xS(t.source,n)+`
139
+ `+xN(t.source,n)+`
140
140
  `:r?`
141
141
  You have dropped the item.
142
- `+MS(t.draggableId,t.source,r)+`
142
+ `+bN(t.draggableId,t.source,r)+`
143
143
  `:`
144
144
  The item has been dropped while not over a drop area.
145
145
  `+qy(t.source)+`
146
- `},$s={dragHandleUsageInstructions:JU,onDragStart:XU,onDragUpdate:qU,onDragEnd:KU},ct={x:0,y:0},vt=function(t,n){return{x:t.x+n.x,y:t.y+n.y}},Xt=function(t,n){return{x:t.x-n.x,y:t.y-n.y}},zr=function(t,n){return t.x===n.x&&t.y===n.y},Ro=function(t){return{x:t.x!==0?-t.x:0,y:t.y!==0?-t.y:0}},Ni=function(t,n,r){var i;return r===void 0&&(r=0),i={},i[t]=n,i[t==="x"?"y":"x"]=r,i},el=function(t,n){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))},Ky=function(t,n){return Math.min.apply(Math,n.map(function(r){return el(t,r)}))},SS=function(t){return function(n){return{x:t(n.x),y:t(n.y)}}},e5=function(e,t){var n=Tn({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n},_l=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},e0=function(t){return[{x:t.left,y:t.top},{x:t.right,y:t.top},{x:t.left,y:t.bottom},{x:t.right,y:t.bottom}]},t5={top:0,right:0,bottom:0,left:0},n5=function(t,n){return n?_l(t,n.scroll.diff.displacement):t},r5=function(t,n,r){if(r&&r.increasedBy){var i;return le({},t,(i={},i[n.end]=t[n.end]+r.increasedBy[n.line],i))}return t},i5=function(t,n){return n&&n.shouldClipSubject?e5(n.pageMarginBox,t):Tn(t)},xo=function(e){var t=e.page,n=e.withPlaceholder,r=e.axis,i=e.frame,o=n5(t.marginBox,i),a=r5(o,r,n),l=i5(a,i);return{page:t,withPlaceholder:n,active:l}},Gg=function(e,t){e.frame||Q(!1);var n=e.frame,r=Xt(t,n.scroll.initial),i=Ro(r),o=le({},n,{scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:i},max:n.scroll.max}}),a=xo({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:o}),l=le({},e,{frame:o,subject:a});return l};function Lu(e){return Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]})}function Vg(e,t){if(e.findIndex)return e.findIndex(t);for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}function Jr(e,t){if(e.find)return e.find(t);var n=Vg(e,t);if(n!==-1)return e[n]}function NS(e){return Array.prototype.slice.call(e)}var DS=ut(function(e){return e.reduce(function(t,n){return t[n.descriptor.id]=n,t},{})}),AS=ut(function(e){return e.reduce(function(t,n){return t[n.descriptor.id]=n,t},{})}),ed=ut(function(e){return Lu(e)}),o5=ut(function(e){return Lu(e)}),Oo=ut(function(e,t){var n=o5(t).filter(function(r){return e===r.descriptor.droppableId}).sort(function(r,i){return r.descriptor.index-i.descriptor.index});return n});function Zg(e){return e.at&&e.at.type==="REORDER"?e.at.destination:null}function td(e){return e.at&&e.at.type==="COMBINE"?e.at.combine:null}var nd=ut(function(e,t){return t.filter(function(n){return n.descriptor.id!==e.descriptor.id})}),a5=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,i=e.insideDestination,o=e.previousImpact;if(!r.isCombineEnabled)return null;var a=Zg(o);if(!a)return null;function l(h){var w={type:"COMBINE",combine:{draggableId:h,droppableId:r.descriptor.id}};return le({},o,{at:w})}var s=o.displaced.all,u=s.length?s[0]:null;if(t)return u?l(u):null;var c=nd(n,i);if(!u){if(!c.length)return null;var d=c[c.length-1];return l(d.descriptor.id)}var f=Vg(c,function(h){return h.descriptor.id===u});f===-1&&Q(!1);var p=f-1;if(p<0)return null;var g=c[p];return l(g.descriptor.id)},ko=function(e,t){return e.descriptor.droppableId===t.descriptor.id},CS={point:ct,value:0},tl={invisible:{},visible:{},all:[]},l5={displaced:tl,displacedBy:CS,at:null},In=function(e,t){return function(n){return e<=n&&n<=t}},ES=function(e){var t=In(e.top,e.bottom),n=In(e.left,e.right);return function(r){var i=t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right);if(i)return!0;var o=t(r.top)||t(r.bottom),a=n(r.left)||n(r.right),l=o&&a;if(l)return!0;var s=r.top<e.top&&r.bottom>e.bottom,u=r.left<e.left&&r.right>e.right,c=s&&u;if(c)return!0;var d=s&&a||u&&o;return d}},s5=function(e){var t=In(e.top,e.bottom),n=In(e.left,e.right);return function(r){var i=t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right);return i}},Yg={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},TS={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},u5=function(e){return function(t){var n=In(t.top,t.bottom),r=In(t.left,t.right);return function(i){return e===Yg?n(i.top)&&n(i.bottom):r(i.left)&&r(i.right)}}},c5=function(t,n){var r=n.frame?n.frame.scroll.diff.displacement:ct;return _l(t,r)},d5=function(t,n,r){return n.subject.active?r(n.subject.active)(t):!1},f5=function(t,n,r){return r(n)(t)},Qg=function(t){var n=t.target,r=t.destination,i=t.viewport,o=t.withDroppableDisplacement,a=t.isVisibleThroughFrameFn,l=o?c5(n,r):n;return d5(l,r,a)&&f5(l,i,a)},p5=function(t){return Qg(le({},t,{isVisibleThroughFrameFn:ES}))},jS=function(t){return Qg(le({},t,{isVisibleThroughFrameFn:s5}))},m5=function(t){return Qg(le({},t,{isVisibleThroughFrameFn:u5(t.destination.axis)}))},g5=function(t,n,r){if(typeof r=="boolean")return r;if(!n)return!0;var i=n.invisible,o=n.visible;if(i[t])return!1;var a=o[t];return a?a.shouldAnimate:!0};function h5(e,t){var n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return Tn(Hg(n,r))}function nl(e){var t=e.afterDragging,n=e.destination,r=e.displacedBy,i=e.viewport,o=e.forceShouldAnimate,a=e.last;return t.reduce(function(s,u){var c=h5(u,r),d=u.descriptor.id;s.all.push(d);var f=p5({target:c,destination:n,viewport:i,withDroppableDisplacement:!0});if(!f)return s.invisible[u.descriptor.id]=!0,s;var p=g5(d,a,o),g={draggableId:d,shouldAnimate:p};return s.visible[d]=g,s},{all:[],visible:{},invisible:{}})}function v5(e,t){if(!e.length)return 0;var n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}function t0(e){var t=e.insideDestination,n=e.inHomeList,r=e.displacedBy,i=e.destination,o=v5(t,{inHomeList:n});return{displaced:tl,displacedBy:r,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:o}}}}function Ru(e){var t=e.draggable,n=e.insideDestination,r=e.destination,i=e.viewport,o=e.displacedBy,a=e.last,l=e.index,s=e.forceShouldAnimate,u=ko(t,r);if(l==null)return t0({insideDestination:n,inHomeList:u,displacedBy:o,destination:r});var c=Jr(n,function(h){return h.descriptor.index===l});if(!c)return t0({insideDestination:n,inHomeList:u,displacedBy:o,destination:r});var d=nd(t,n),f=n.indexOf(c),p=d.slice(f),g=nl({afterDragging:p,destination:r,displacedBy:o,last:a,viewport:i.frame,forceShouldAnimate:s});return{displaced:g,displacedBy:o,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:l}}}}function Fr(e,t){return!!t.effected[e]}var y5=function(e){var t=e.isMovingForward,n=e.destination,r=e.draggables,i=e.combine,o=e.afterCritical;if(!n.isCombineEnabled)return null;var a=i.draggableId,l=r[a],s=l.descriptor.index,u=Fr(a,o);return u?t?s:s-1:t?s+1:s},I5=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.insideDestination,i=e.location;if(!r.length)return null;var o=i.index,a=t?o+1:o-1,l=r[0].descriptor.index,s=r[r.length-1].descriptor.index,u=n?s:s+1;return a<l||a>u?null:a},w5=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.draggable,i=e.draggables,o=e.destination,a=e.insideDestination,l=e.previousImpact,s=e.viewport,u=e.afterCritical,c=l.at;if(c||Q(!1),c.type==="REORDER"){var d=I5({isMovingForward:t,isInHomeList:n,location:c.destination,insideDestination:a});return d==null?null:Ru({draggable:r,insideDestination:a,destination:o,viewport:s,last:l.displaced,displacedBy:l.displacedBy,index:d})}var f=y5({isMovingForward:t,destination:o,displaced:l.displaced,draggables:i,combine:c.combine,afterCritical:u});return f==null?null:Ru({draggable:r,insideDestination:a,destination:o,viewport:s,last:l.displaced,displacedBy:l.displacedBy,index:f})},b5=function(e){var t=e.displaced,n=e.afterCritical,r=e.combineWith,i=e.displacedBy,o=!!(t.visible[r]||t.invisible[r]);return Fr(r,n)?o?ct:Ro(i.point):o?i.point:ct},x5=function(e){var t=e.afterCritical,n=e.impact,r=e.draggables,i=td(n);i||Q(!1);var o=i.draggableId,a=r[o].page.borderBox.center,l=b5({displaced:n.displaced,afterCritical:t,combineWith:o,displacedBy:n.displacedBy});return vt(a,l)},PS=function(t,n){return n.margin[t.start]+n.borderBox[t.size]/2},M5=function(t,n){return n.margin[t.end]+n.borderBox[t.size]/2},Jg=function(t,n,r){return n[t.crossAxisStart]+r.margin[t.crossAxisStart]+r.borderBox[t.crossAxisSize]/2},n0=function(t){var n=t.axis,r=t.moveRelativeTo,i=t.isMoving;return Ni(n.line,r.marginBox[n.end]+PS(n,i),Jg(n,r.marginBox,i))},r0=function(t){var n=t.axis,r=t.moveRelativeTo,i=t.isMoving;return Ni(n.line,r.marginBox[n.start]-M5(n,i),Jg(n,r.marginBox,i))},S5=function(t){var n=t.axis,r=t.moveInto,i=t.isMoving;return Ni(n.line,r.contentBox[n.start]+PS(n,i),Jg(n,r.contentBox,i))},N5=function(e){var t=e.impact,n=e.draggable,r=e.draggables,i=e.droppable,o=e.afterCritical,a=Oo(i.descriptor.id,r),l=n.page,s=i.axis;if(!a.length)return S5({axis:s,moveInto:i.page,isMoving:l});var u=t.displaced,c=t.displacedBy,d=u.all[0];if(d){var f=r[d];if(Fr(d,o))return r0({axis:s,moveRelativeTo:f.page,isMoving:l});var p=Eu(f.page,c.point);return r0({axis:s,moveRelativeTo:p,isMoving:l})}var g=a[a.length-1];if(g.descriptor.id===n.descriptor.id)return l.borderBox.center;if(Fr(g.descriptor.id,o)){var h=Eu(g.page,Ro(o.displacedBy.point));return n0({axis:s,moveRelativeTo:h,isMoving:l})}return n0({axis:s,moveRelativeTo:g.page,isMoving:l})},Fp=function(e,t){var n=e.frame;return n?vt(t,n.scroll.diff.displacement):t},D5=function(t){var n=t.impact,r=t.draggable,i=t.droppable,o=t.draggables,a=t.afterCritical,l=r.page.borderBox.center,s=n.at;return!i||!s?l:s.type==="REORDER"?N5({impact:n,draggable:r,draggables:o,droppable:i,afterCritical:a}):x5({impact:n,draggables:o,afterCritical:a})},rd=function(e){var t=D5(e),n=e.droppable,r=n?Fp(n,t):t;return r},LS=function(e,t){var n=Xt(t,e.scroll.initial),r=Ro(n),i=Tn({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),o={frame:i,scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}};return o};function i0(e,t){return e.map(function(n){return t[n]})}function A5(e,t){for(var n=0;n<t.length;n++){var r=t[n].visible[e];if(r)return r}return null}var C5=function(e){var t=e.impact,n=e.viewport,r=e.destination,i=e.draggables,o=e.maxScrollChange,a=LS(n,vt(n.scroll.current,o)),l=r.frame?Gg(r,vt(r.frame.scroll.current,o)):r,s=t.displaced,u=nl({afterDragging:i0(s.all,i),destination:r,displacedBy:t.displacedBy,viewport:a.frame,last:s,forceShouldAnimate:!1}),c=nl({afterDragging:i0(s.all,i),destination:l,displacedBy:t.displacedBy,viewport:n.frame,last:s,forceShouldAnimate:!1}),d={},f={},p=[s,u,c];s.all.forEach(function(h){var w=A5(h,p);if(w){f[h]=w;return}d[h]=!0});var g=le({},t,{displaced:{all:s.all,invisible:d,visible:f}});return g},E5=function(e,t){return vt(e.scroll.diff.displacement,t)},Xg=function(e){var t=e.pageBorderBoxCenter,n=e.draggable,r=e.viewport,i=E5(r,t),o=Xt(i,n.page.borderBox.center);return vt(n.client.borderBox.center,o)},RS=function(e){var t=e.draggable,n=e.destination,r=e.newPageBorderBoxCenter,i=e.viewport,o=e.withDroppableDisplacement,a=e.onlyOnMainAxis,l=a===void 0?!1:a,s=Xt(r,t.page.borderBox.center),u=_l(t.page.borderBox,s),c={target:u,destination:n,withDroppableDisplacement:o,viewport:i};return l?m5(c):jS(c)},T5=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,i=e.draggables,o=e.previousImpact,a=e.viewport,l=e.previousPageBorderBoxCenter,s=e.previousClientSelection,u=e.afterCritical;if(!r.isEnabled)return null;var c=Oo(r.descriptor.id,i),d=ko(n,r),f=a5({isMovingForward:t,draggable:n,destination:r,insideDestination:c,previousImpact:o})||w5({isMovingForward:t,isInHomeList:d,draggable:n,draggables:i,destination:r,insideDestination:c,previousImpact:o,viewport:a,afterCritical:u});if(!f)return null;var p=rd({impact:f,draggable:n,droppable:r,draggables:i,afterCritical:u}),g=RS({draggable:n,destination:r,newPageBorderBoxCenter:p,viewport:a.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});if(g){var h=Xg({pageBorderBoxCenter:p,draggable:n,viewport:a});return{clientSelection:h,impact:f,scrollJumpRequest:null}}var w=Xt(p,l),I=C5({impact:f,viewport:a,destination:r,draggables:i,maxScrollChange:w});return{clientSelection:s,impact:I,scrollJumpRequest:w}},Tt=function(t){var n=t.subject.active;return n||Q(!1),n},j5=function(e){var t=e.isMovingForward,n=e.pageBorderBoxCenter,r=e.source,i=e.droppables,o=e.viewport,a=r.subject.active;if(!a)return null;var l=r.axis,s=In(a[l.start],a[l.end]),u=ed(i).filter(function(d){return d!==r}).filter(function(d){return d.isEnabled}).filter(function(d){return!!d.subject.active}).filter(function(d){return ES(o.frame)(Tt(d))}).filter(function(d){var f=Tt(d);return t?a[l.crossAxisEnd]<f[l.crossAxisEnd]:f[l.crossAxisStart]<a[l.crossAxisStart]}).filter(function(d){var f=Tt(d),p=In(f[l.start],f[l.end]);return s(f[l.start])||s(f[l.end])||p(a[l.start])||p(a[l.end])}).sort(function(d,f){var p=Tt(d)[l.crossAxisStart],g=Tt(f)[l.crossAxisStart];return t?p-g:g-p}).filter(function(d,f,p){return Tt(d)[l.crossAxisStart]===Tt(p[0])[l.crossAxisStart]});if(!u.length)return null;if(u.length===1)return u[0];var c=u.filter(function(d){var f=In(Tt(d)[l.start],Tt(d)[l.end]);return f(n[l.line])});return c.length===1?c[0]:c.length>1?c.sort(function(d,f){return Tt(d)[l.start]-Tt(f)[l.start]})[0]:u.sort(function(d,f){var p=Ky(n,e0(Tt(d))),g=Ky(n,e0(Tt(f)));return p!==g?p-g:Tt(d)[l.start]-Tt(f)[l.start]})[0]},o0=function(t,n){var r=t.page.borderBox.center;return Fr(t.descriptor.id,n)?Xt(r,n.displacedBy.point):r},P5=function(t,n){var r=t.page.borderBox;return Fr(t.descriptor.id,n)?_l(r,Ro(n.displacedBy.point)):r},L5=function(e){var t=e.pageBorderBoxCenter,n=e.viewport,r=e.destination,i=e.insideDestination,o=e.afterCritical,a=i.filter(function(l){return jS({target:P5(l,o),destination:r,viewport:n.frame,withDroppableDisplacement:!0})}).sort(function(l,s){var u=el(t,Fp(r,o0(l,o))),c=el(t,Fp(r,o0(s,o)));return u<c?-1:c<u?1:l.descriptor.index-s.descriptor.index});return a[0]||null},Fl=ut(function(t,n){var r=n[t.line];return{value:r,point:Ni(t.line,r)}}),R5=function(t,n,r){var i=t.axis;if(t.descriptor.mode==="virtual")return Ni(i.line,n[i.line]);var o=t.subject.page.contentBox[i.size],a=Oo(t.descriptor.id,r),l=a.reduce(function(c,d){return c+d.client.marginBox[i.size]},0),s=l+n[i.line],u=s-o;return u<=0?null:Ni(i.line,u)},OS=function(t,n){return le({},t,{scroll:le({},t.scroll,{max:n})})},kS=function(t,n,r){var i=t.frame;ko(n,t)&&Q(!1),t.subject.withPlaceholder&&Q(!1);var o=Fl(t.axis,n.displaceBy).point,a=R5(t,o,r),l={placeholderSize:o,increasedBy:a,oldFrameMaxScroll:t.frame?t.frame.scroll.max:null};if(!i){var s=xo({page:t.subject.page,withPlaceholder:l,axis:t.axis,frame:t.frame});return le({},t,{subject:s})}var u=a?vt(i.scroll.max,a):i.scroll.max,c=OS(i,u),d=xo({page:t.subject.page,withPlaceholder:l,axis:t.axis,frame:c});return le({},t,{subject:d,frame:c})},O5=function(t){var n=t.subject.withPlaceholder;n||Q(!1);var r=t.frame;if(!r){var i=xo({page:t.subject.page,axis:t.axis,frame:null,withPlaceholder:null});return le({},t,{subject:i})}var o=n.oldFrameMaxScroll;o||Q(!1);var a=OS(r,o),l=xo({page:t.subject.page,axis:t.axis,frame:a,withPlaceholder:null});return le({},t,{subject:l,frame:a})},k5=function(e){var t=e.previousPageBorderBoxCenter,n=e.moveRelativeTo,r=e.insideDestination,i=e.draggable,o=e.draggables,a=e.destination,l=e.viewport,s=e.afterCritical;if(!n){if(r.length)return null;var u={displaced:tl,displacedBy:CS,at:{type:"REORDER",destination:{droppableId:a.descriptor.id,index:0}}},c=rd({impact:u,draggable:i,droppable:a,draggables:o,afterCritical:s}),d=ko(i,a)?a:kS(a,i,o),f=RS({draggable:i,destination:d,newPageBorderBoxCenter:c,viewport:l.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});return f?u:null}var p=t[a.axis.line]<=n.page.borderBox.center[a.axis.line],g=function(){var w=n.descriptor.index;return n.descriptor.id===i.descriptor.id||p?w:w+1}(),h=Fl(a.axis,i.displaceBy);return Ru({draggable:i,insideDestination:r,destination:a,viewport:l,displacedBy:h,last:tl,index:g})},z5=function(e){var t=e.isMovingForward,n=e.previousPageBorderBoxCenter,r=e.draggable,i=e.isOver,o=e.draggables,a=e.droppables,l=e.viewport,s=e.afterCritical,u=j5({isMovingForward:t,pageBorderBoxCenter:n,source:i,droppables:a,viewport:l});if(!u)return null;var c=Oo(u.descriptor.id,o),d=L5({pageBorderBoxCenter:n,viewport:l,destination:u,insideDestination:c,afterCritical:s}),f=k5({previousPageBorderBoxCenter:n,destination:u,draggable:r,draggables:o,moveRelativeTo:d,insideDestination:c,viewport:l,afterCritical:s});if(!f)return null;var p=rd({impact:f,draggable:r,droppable:u,draggables:o,afterCritical:s}),g=Xg({pageBorderBoxCenter:p,draggable:r,viewport:l});return{clientSelection:g,impact:f,scrollJumpRequest:null}},en=function(e){var t=e.at;return t?t.type==="REORDER"?t.destination.droppableId:t.combine.droppableId:null},B5=function(t,n){var r=en(t);return r?n[r]:null},U5=function(e){var t=e.state,n=e.type,r=B5(t.impact,t.dimensions.droppables),i=!!r,o=t.dimensions.droppables[t.critical.droppable.id],a=r||o,l=a.axis.direction,s=l==="vertical"&&(n==="MOVE_UP"||n==="MOVE_DOWN")||l==="horizontal"&&(n==="MOVE_LEFT"||n==="MOVE_RIGHT");if(s&&!i)return null;var u=n==="MOVE_DOWN"||n==="MOVE_RIGHT",c=t.dimensions.draggables[t.critical.draggable.id],d=t.current.page.borderBoxCenter,f=t.dimensions,p=f.draggables,g=f.droppables;return s?T5({isMovingForward:u,previousPageBorderBoxCenter:d,draggable:c,destination:a,draggables:p,viewport:t.viewport,previousClientSelection:t.current.client.selection,previousImpact:t.impact,afterCritical:t.afterCritical}):z5({isMovingForward:u,previousPageBorderBoxCenter:d,draggable:c,isOver:a,draggables:p,droppables:g,viewport:t.viewport,afterCritical:t.afterCritical})};function ni(e){return e.phase==="DRAGGING"||e.phase==="COLLECTING"}function zS(e){var t=In(e.top,e.bottom),n=In(e.left,e.right);return function(i){return t(i.y)&&n(i.x)}}function $5(e,t){return e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top}function _5(e){var t=e.pageBorderBox,n=e.draggable,r=e.candidates,i=n.page.borderBox.center,o=r.map(function(a){var l=a.axis,s=Ni(a.axis.line,t.center[l.line],a.page.borderBox.center[l.crossAxisLine]);return{id:a.descriptor.id,distance:el(i,s)}}).sort(function(a,l){return l.distance-a.distance});return o[0]?o[0].id:null}function F5(e){var t=e.pageBorderBox,n=e.draggable,r=e.droppables,i=ed(r).filter(function(o){if(!o.isEnabled)return!1;var a=o.subject.active;if(!a||!$5(t,a))return!1;if(zS(a)(t.center))return!0;var l=o.axis,s=a.center[l.crossAxisLine],u=t[l.crossAxisStart],c=t[l.crossAxisEnd],d=In(a[l.crossAxisStart],a[l.crossAxisEnd]),f=d(u),p=d(c);return!f&&!p?!0:f?u<s:c>s});return i.length?i.length===1?i[0].descriptor.id:_5({pageBorderBox:t,draggable:n,candidates:i}):null}var BS=function(t,n){return Tn(_l(t,n))},H5=function(e,t){var n=e.frame;return n?BS(t,n.scroll.diff.value):t};function US(e){var t=e.displaced,n=e.id;return!!(t.visible[n]||t.invisible[n])}function W5(e){var t=e.draggable,n=e.closest,r=e.inHomeList;return n?r&&n.descriptor.index>t.descriptor.index?n.descriptor.index-1:n.descriptor.index:null}var G5=function(e){var t=e.pageBorderBoxWithDroppableScroll,n=e.draggable,r=e.destination,i=e.insideDestination,o=e.last,a=e.viewport,l=e.afterCritical,s=r.axis,u=Fl(r.axis,n.displaceBy),c=u.value,d=t[s.start],f=t[s.end],p=nd(n,i),g=Jr(p,function(w){var I=w.descriptor.id,y=w.page.borderBox.center[s.line],b=Fr(I,l),x=US({displaced:o,id:I});return b?x?f<=y:d<y-c:x?f<=y+c:d<y}),h=W5({draggable:n,closest:g,inHomeList:ko(n,r)});return Ru({draggable:n,insideDestination:i,destination:r,viewport:a,last:o,displacedBy:u,index:h})},V5=4,Z5=function(e){var t=e.draggable,n=e.pageBorderBoxWithDroppableScroll,r=e.previousImpact,i=e.destination,o=e.insideDestination,a=e.afterCritical;if(!i.isCombineEnabled)return null;var l=i.axis,s=Fl(i.axis,t.displaceBy),u=s.value,c=n[l.start],d=n[l.end],f=nd(t,o),p=Jr(f,function(h){var w=h.descriptor.id,I=h.page.borderBox,y=I[l.size],b=y/V5,x=Fr(w,a),N=US({displaced:r.displaced,id:w});return x?N?d>I[l.start]+b&&d<I[l.end]-b:c>I[l.start]-u+b&&c<I[l.end]-u-b:N?d>I[l.start]+u+b&&d<I[l.end]+u-b:c>I[l.start]+b&&c<I[l.end]-b});if(!p)return null;var g={displacedBy:s,displaced:r.displaced,at:{type:"COMBINE",combine:{draggableId:p.descriptor.id,droppableId:i.descriptor.id}}};return g},$S=function(e){var t=e.pageOffset,n=e.draggable,r=e.draggables,i=e.droppables,o=e.previousImpact,a=e.viewport,l=e.afterCritical,s=BS(n.page.borderBox,t),u=F5({pageBorderBox:s,draggable:n,droppables:i});if(!u)return l5;var c=i[u],d=Oo(c.descriptor.id,r),f=H5(c,s);return Z5({pageBorderBoxWithDroppableScroll:f,draggable:n,previousImpact:o,destination:c,insideDestination:d,afterCritical:l})||G5({pageBorderBoxWithDroppableScroll:f,draggable:n,destination:c,insideDestination:d,last:o.displaced,viewport:a,afterCritical:l})},qg=function(e,t){var n;return le({},e,(n={},n[t.descriptor.id]=t,n))},Y5=function(t){var n=t.previousImpact,r=t.impact,i=t.droppables,o=en(n),a=en(r);if(!o||o===a)return i;var l=i[o];if(!l.subject.withPlaceholder)return i;var s=O5(l);return qg(i,s)},Q5=function(e){var t=e.draggable,n=e.draggables,r=e.droppables,i=e.previousImpact,o=e.impact,a=Y5({previousImpact:i,impact:o,droppables:r}),l=en(o);if(!l)return a;var s=r[l];if(ko(t,s)||s.subject.withPlaceholder)return a;var u=kS(s,t,n);return qg(a,u)},Ea=function(e){var t=e.state,n=e.clientSelection,r=e.dimensions,i=e.viewport,o=e.impact,a=e.scrollJumpRequest,l=i||t.viewport,s=r||t.dimensions,u=n||t.current.client.selection,c=Xt(u,t.initial.client.selection),d={offset:c,selection:u,borderBoxCenter:vt(t.initial.client.borderBoxCenter,c)},f={selection:vt(d.selection,l.scroll.current),borderBoxCenter:vt(d.borderBoxCenter,l.scroll.current),offset:vt(d.offset,l.scroll.diff.value)},p={client:d,page:f};if(t.phase==="COLLECTING")return le({phase:"COLLECTING"},t,{dimensions:s,viewport:l,current:p});var g=s.draggables[t.critical.draggable.id],h=o||$S({pageOffset:f.offset,draggable:g,draggables:s.draggables,droppables:s.droppables,previousImpact:t.impact,viewport:l,afterCritical:t.afterCritical}),w=Q5({draggable:g,impact:h,previousImpact:t.impact,draggables:s.draggables,droppables:s.droppables}),I=le({},t,{current:p,dimensions:{draggables:s.draggables,droppables:w},impact:h,viewport:l,scrollJumpRequest:a||null,forceShouldAnimate:a?!1:null});return I};function J5(e,t){return e.map(function(n){return t[n]})}var _S=function(e){var t=e.impact,n=e.viewport,r=e.draggables,i=e.destination,o=e.forceShouldAnimate,a=t.displaced,l=J5(a.all,r),s=nl({afterDragging:l,destination:i,displacedBy:t.displacedBy,viewport:n.frame,forceShouldAnimate:o,last:a});return le({},t,{displaced:s})},FS=function(e){var t=e.impact,n=e.draggable,r=e.droppable,i=e.draggables,o=e.viewport,a=e.afterCritical,l=rd({impact:t,draggable:n,draggables:i,droppable:r,afterCritical:a});return Xg({pageBorderBoxCenter:l,draggable:n,viewport:o})},HS=function(e){var t=e.state,n=e.dimensions,r=e.viewport;t.movementMode!=="SNAP"&&Q(!1);var i=t.impact,o=r||t.viewport,a=n||t.dimensions,l=a.draggables,s=a.droppables,u=l[t.critical.draggable.id],c=en(i);c||Q(!1);var d=s[c],f=_S({impact:i,viewport:o,destination:d,draggables:l}),p=FS({impact:f,draggable:u,droppable:d,draggables:l,viewport:o,afterCritical:t.afterCritical});return Ea({impact:f,clientSelection:p,state:t,dimensions:a,viewport:o})},X5=function(e){return{index:e.index,droppableId:e.droppableId}},WS=function(e){var t=e.draggable,n=e.home,r=e.draggables,i=e.viewport,o=Fl(n.axis,t.displaceBy),a=Oo(n.descriptor.id,r),l=a.indexOf(t);l===-1&&Q(!1);var s=a.slice(l+1),u=s.reduce(function(p,g){return p[g.descriptor.id]=!0,p},{}),c={inVirtualList:n.descriptor.mode==="virtual",displacedBy:o,effected:u},d=nl({afterDragging:s,destination:n,displacedBy:o,last:null,viewport:i.frame,forceShouldAnimate:!1}),f={displaced:d,displacedBy:o,at:{type:"REORDER",destination:X5(t.descriptor)}};return{impact:f,afterCritical:c}},q5=function(e,t){return{draggables:e.draggables,droppables:qg(e.droppables,t)}},K5=function(e){var t=e.draggable,n=e.offset,r=e.initialWindowScroll,i=Eu(t.client,n),o=Tu(i,r),a=le({},t,{placeholder:le({},t.placeholder,{client:i}),client:i,page:o});return a},e$=function(e){var t=e.frame;return t||Q(!1),t},t$=function(e){var t=e.additions,n=e.updatedDroppables,r=e.viewport,i=r.scroll.diff.value;return t.map(function(o){var a=o.descriptor.droppableId,l=n[a],s=e$(l),u=s.scroll.diff.value,c=vt(i,u),d=K5({draggable:o,offset:c,initialWindowScroll:r.scroll.initial});return d})},n$=function(e){var t=e.state,n=e.published,r=n.modified.map(function(b){var x=t.dimensions.droppables[b.droppableId],N=Gg(x,b.scroll);return N}),i=le({},t.dimensions.droppables,{},DS(r)),o=AS(t$({additions:n.additions,updatedDroppables:i,viewport:t.viewport})),a=le({},t.dimensions.draggables,{},o);n.removals.forEach(function(b){delete a[b]});var l={droppables:i,draggables:a},s=en(t.impact),u=s?l.droppables[s]:null,c=l.draggables[t.critical.draggable.id],d=l.droppables[t.critical.droppable.id],f=WS({draggable:c,home:d,draggables:a,viewport:t.viewport}),p=f.impact,g=f.afterCritical,h=u&&u.isCombineEnabled?t.impact:p,w=$S({pageOffset:t.current.page.offset,draggable:l.draggables[t.critical.draggable.id],draggables:l.draggables,droppables:l.droppables,previousImpact:h,viewport:t.viewport,afterCritical:g}),I=le({phase:"DRAGGING"},t,{phase:"DRAGGING",impact:w,onLiftImpact:p,dimensions:l,afterCritical:g,forceShouldAnimate:!1});if(t.phase==="COLLECTING")return I;var y=le({phase:"DROP_PENDING"},I,{phase:"DROP_PENDING",reason:t.reason,isWaiting:!1});return y},Hp=function(t){return t.movementMode==="SNAP"},hf=function(t,n,r){var i=q5(t.dimensions,n);return!Hp(t)||r?Ea({state:t,dimensions:i}):HS({state:t,dimensions:i})};function vf(e){return e.isDragging&&e.movementMode==="SNAP"?le({phase:"DRAGGING"},e,{scrollJumpRequest:null}):e}var a0={phase:"IDLE",completed:null,shouldFlush:!1},r$=function(e,t){if(e===void 0&&(e=a0),t.type==="FLUSH")return le({},a0,{shouldFlush:!0});if(t.type==="INITIAL_PUBLISH"){e.phase!=="IDLE"&&Q(!1);var n=t.payload,r=n.critical,i=n.clientSelection,o=n.viewport,a=n.dimensions,l=n.movementMode,s=a.draggables[r.draggable.id],u=a.droppables[r.droppable.id],c={selection:i,borderBoxCenter:s.client.borderBox.center,offset:ct},d={client:c,page:{selection:vt(c.selection,o.scroll.initial),borderBoxCenter:vt(c.selection,o.scroll.initial),offset:vt(c.selection,o.scroll.diff.value)}},f=ed(a.droppables).every(function(Ie){return!Ie.isFixedOnPage}),p=WS({draggable:s,home:u,draggables:a.draggables,viewport:o}),g=p.impact,h=p.afterCritical,w={phase:"DRAGGING",isDragging:!0,critical:r,movementMode:l,dimensions:a,initial:d,current:d,isWindowScrollAllowed:f,impact:g,afterCritical:h,onLiftImpact:g,viewport:o,scrollJumpRequest:null,forceShouldAnimate:null};return w}if(t.type==="COLLECTION_STARTING"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&Q(!1);var I=le({phase:"COLLECTING"},e,{phase:"COLLECTING"});return I}if(t.type==="PUBLISH_WHILE_DRAGGING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"||Q(!1),n$({state:e,published:t.payload});if(t.type==="MOVE"){if(e.phase==="DROP_PENDING")return e;ni(e)||Q(!1);var y=t.payload.client;return zr(y,e.current.client.selection)?e:Ea({state:e,clientSelection:y,impact:Hp(e)?e.impact:null})}if(t.type==="UPDATE_DROPPABLE_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="COLLECTING")return vf(e);ni(e)||Q(!1);var b=t.payload,x=b.id,N=b.newScroll,M=e.dimensions.droppables[x];if(!M)return e;var S=Gg(M,N);return hf(e,S,!1)}if(t.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(e.phase==="DROP_PENDING")return e;ni(e)||Q(!1);var C=t.payload,L=C.id,R=C.isEnabled,O=e.dimensions.droppables[L];O||Q(!1),O.isEnabled===R&&Q(!1);var J=le({},O,{isEnabled:R});return hf(e,J,!0)}if(t.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(e.phase==="DROP_PENDING")return e;ni(e)||Q(!1);var U=t.payload,G=U.id,Z=U.isCombineEnabled,$=e.dimensions.droppables[G];$||Q(!1),$.isCombineEnabled===Z&&Q(!1);var ee=le({},$,{isCombineEnabled:Z});return hf(e,ee,!0)}if(t.type==="MOVE_BY_WINDOW_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="DROP_ANIMATING")return e;ni(e)||Q(!1),e.isWindowScrollAllowed||Q(!1);var P=t.payload.newScroll;if(zr(e.viewport.scroll.current,P))return vf(e);var B=LS(e.viewport,P);return Hp(e)?HS({state:e,viewport:B}):Ea({state:e,viewport:B})}if(t.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!ni(e))return e;var F=t.payload.maxScroll;if(zr(F,e.viewport.scroll.max))return e;var V=le({},e.viewport,{scroll:le({},e.viewport.scroll,{max:F})});return le({phase:"DRAGGING"},e,{viewport:V})}if(t.type==="MOVE_UP"||t.type==="MOVE_DOWN"||t.type==="MOVE_LEFT"||t.type==="MOVE_RIGHT"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&Q(!1);var D=U5({state:e,type:t.type});return D?Ea({state:e,impact:D.impact,clientSelection:D.clientSelection,scrollJumpRequest:D.scrollJumpRequest}):e}if(t.type==="DROP_PENDING"){var E=t.payload.reason;e.phase!=="COLLECTING"&&Q(!1);var T=le({phase:"DROP_PENDING"},e,{phase:"DROP_PENDING",isWaiting:!0,reason:E});return T}if(t.type==="DROP_ANIMATE"){var z=t.payload,_=z.completed,ie=z.dropDuration,ue=z.newHomeClientOffset;e.phase==="DRAGGING"||e.phase==="DROP_PENDING"||Q(!1);var X={phase:"DROP_ANIMATING",completed:_,dropDuration:ie,newHomeClientOffset:ue,dimensions:e.dimensions};return X}if(t.type==="DROP_COMPLETE"){var me=t.payload.completed;return{phase:"IDLE",completed:me,shouldFlush:!1}}return e},i$=function(t){return{type:"BEFORE_INITIAL_CAPTURE",payload:t}},o$=function(t){return{type:"LIFT",payload:t}},a$=function(t){return{type:"INITIAL_PUBLISH",payload:t}},l$=function(t){return{type:"PUBLISH_WHILE_DRAGGING",payload:t}},s$=function(){return{type:"COLLECTION_STARTING",payload:null}},u$=function(t){return{type:"UPDATE_DROPPABLE_SCROLL",payload:t}},c$=function(t){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:t}},d$=function(t){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:t}},GS=function(t){return{type:"MOVE",payload:t}},f$=function(t){return{type:"MOVE_BY_WINDOW_SCROLL",payload:t}},p$=function(t){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:t}},m$=function(){return{type:"MOVE_UP",payload:null}},g$=function(){return{type:"MOVE_DOWN",payload:null}},h$=function(){return{type:"MOVE_RIGHT",payload:null}},v$=function(){return{type:"MOVE_LEFT",payload:null}},Kg=function(){return{type:"FLUSH",payload:null}},y$=function(t){return{type:"DROP_ANIMATE",payload:t}},eh=function(t){return{type:"DROP_COMPLETE",payload:t}},VS=function(t){return{type:"DROP",payload:t}},I$=function(t){return{type:"DROP_PENDING",payload:t}},ZS=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}},w$=function(e){return function(t){var n=t.getState,r=t.dispatch;return function(i){return function(o){if(o.type!=="LIFT"){i(o);return}var a=o.payload,l=a.id,s=a.clientSelection,u=a.movementMode,c=n();c.phase==="DROP_ANIMATING"&&r(eh({completed:c.completed})),n().phase!=="IDLE"&&Q(!1),r(Kg()),r(i$({draggableId:l,movementMode:u}));var d={shouldPublishImmediately:u==="SNAP"},f={draggableId:l,scrollOptions:d},p=e.startPublishing(f),g=p.critical,h=p.dimensions,w=p.viewport;r(a$({critical:g,dimensions:h,clientSelection:s,movementMode:u,viewport:w}))}}}},b$=function(e){return function(){return function(t){return function(n){n.type==="INITIAL_PUBLISH"&&e.dragging(),n.type==="DROP_ANIMATE"&&e.dropping(n.payload.completed.result.reason),(n.type==="FLUSH"||n.type==="DROP_COMPLETE")&&e.resting(),t(n)}}}},th={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},rl={opacity:{drop:0,combining:.7},scale:{drop:.75}},nh={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},Kr=nh.outOfTheWay+"s "+th.outOfTheWay,Ta={fluid:"opacity "+Kr,snap:"transform "+Kr+", opacity "+Kr,drop:function(t){var n=t+"s "+th.drop;return"transform "+n+", opacity "+n},outOfTheWay:"transform "+Kr,placeholder:"height "+Kr+", width "+Kr+", margin "+Kr},l0=function(t){return zr(t,ct)?null:"translate("+t.x+"px, "+t.y+"px)"},Wp={moveTo:l0,drop:function(t,n){var r=l0(t);return r?n?r+" scale("+rl.scale.drop+")":r:null}},Gp=nh.minDropTime,YS=nh.maxDropTime,x$=YS-Gp,s0=1500,M$=.6,S$=function(e){var t=e.current,n=e.destination,r=e.reason,i=el(t,n);if(i<=0)return Gp;if(i>=s0)return YS;var o=i/s0,a=Gp+x$*o,l=r==="CANCEL"?a*M$:a;return Number(l.toFixed(2))},N$=function(e){var t=e.impact,n=e.draggable,r=e.dimensions,i=e.viewport,o=e.afterCritical,a=r.draggables,l=r.droppables,s=en(t),u=s?l[s]:null,c=l[n.descriptor.droppableId],d=FS({impact:t,draggable:n,draggables:a,afterCritical:o,droppable:u||c,viewport:i}),f=Xt(d,n.client.borderBox.center);return f},D$=function(e){var t=e.draggables,n=e.reason,r=e.lastImpact,i=e.home,o=e.viewport,a=e.onLiftImpact;if(!r.at||n!=="DROP"){var l=_S({draggables:t,impact:a,destination:i,viewport:o,forceShouldAnimate:!0});return{impact:l,didDropInsideDroppable:!1}}if(r.at.type==="REORDER")return{impact:r,didDropInsideDroppable:!0};var s=le({},r,{displaced:tl});return{impact:s,didDropInsideDroppable:!0}},A$=function(e){var t=e.getState,n=e.dispatch;return function(r){return function(i){if(i.type!=="DROP"){r(i);return}var o=t(),a=i.payload.reason;if(o.phase==="COLLECTING"){n(I$({reason:a}));return}if(o.phase!=="IDLE"){var l=o.phase==="DROP_PENDING"&&o.isWaiting;l&&Q(!1),o.phase==="DRAGGING"||o.phase==="DROP_PENDING"||Q(!1);var s=o.critical,u=o.dimensions,c=u.draggables[o.critical.draggable.id],d=D$({reason:a,lastImpact:o.impact,afterCritical:o.afterCritical,onLiftImpact:o.onLiftImpact,home:o.dimensions.droppables[o.critical.droppable.id],viewport:o.viewport,draggables:o.dimensions.draggables}),f=d.impact,p=d.didDropInsideDroppable,g=p?Zg(f):null,h=p?td(f):null,w={index:s.draggable.index,droppableId:s.droppable.id},I={draggableId:c.descriptor.id,type:c.descriptor.type,source:w,reason:a,mode:o.movementMode,destination:g,combine:h},y=N$({impact:f,draggable:c,dimensions:u,viewport:o.viewport,afterCritical:o.afterCritical}),b={critical:o.critical,afterCritical:o.afterCritical,result:I,impact:f},x=!zr(o.current.client.offset,y)||!!I.combine;if(!x){n(eh({completed:b}));return}var N=S$({current:o.current.client.offset,destination:y,reason:a}),M={newHomeClientOffset:y,dropDuration:N,completed:b};n(y$(M))}}}},QS=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function C$(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(n){n.target!==window&&n.target!==window.document||e()}}}function E$(e){var t=e.onWindowScroll;function n(){t(QS())}var r=Ka(n),i=C$(r),o=kr;function a(){return o!==kr}function l(){a()&&Q(!1),o=vn(window,[i])}function s(){a()||Q(!1),r.cancel(),o(),o=kr}return{start:l,stop:s,isActive:a}}var T$=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},j$=function(e){var t=E$({onWindowScroll:function(r){e.dispatch(f$({newScroll:r}))}});return function(n){return function(r){!t.isActive()&&r.type==="INITIAL_PUBLISH"&&t.start(),t.isActive()&&T$(r)&&t.stop(),n(r)}}},P$=function(e){var t=!1,n=!1,r=setTimeout(function(){n=!0}),i=function(a){t||n||(t=!0,e(a),clearTimeout(r))};return i.wasCalled=function(){return t},i},L$=function(){var e=[],t=function(o){var a=Vg(e,function(u){return u.timerId===o});a===-1&&Q(!1);var l=e.splice(a,1),s=l[0];s.callback()},n=function(o){var a=setTimeout(function(){return t(a)}),l={timerId:a,callback:o};e.push(l)},r=function(){if(e.length){var o=[].concat(e);e.length=0,o.forEach(function(a){clearTimeout(a.timerId),a.callback()})}};return{add:n,flush:r}},R$=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.droppableId===n.droppableId&&t.index===n.index},O$=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.draggableId===n.draggableId&&t.droppableId===n.droppableId},k$=function(t,n){if(t===n)return!0;var r=t.draggable.id===n.draggable.id&&t.draggable.droppableId===n.draggable.droppableId&&t.draggable.type===n.draggable.type&&t.draggable.index===n.draggable.index,i=t.droppable.id===n.droppable.id&&t.droppable.type===n.droppable.type;return r&&i},na=function(t,n){n()},ys=function(t,n){return{draggableId:t.draggable.id,type:t.droppable.type,source:{droppableId:t.droppable.id,index:t.draggable.index},mode:n}},yf=function(t,n,r,i){if(!t){r(i(n));return}var o=P$(r),a={announce:o};t(n,a),o.wasCalled()||r(i(n))},z$=function(e,t){var n=L$(),r=null,i=function(f,p){r&&Q(!1),na("onBeforeCapture",function(){var g=e().onBeforeCapture;if(g){var h={draggableId:f,mode:p};g(h)}})},o=function(f,p){r&&Q(!1),na("onBeforeDragStart",function(){var g=e().onBeforeDragStart;g&&g(ys(f,p))})},a=function(f,p){r&&Q(!1);var g=ys(f,p);r={mode:p,lastCritical:f,lastLocation:g.source,lastCombine:null},n.add(function(){na("onDragStart",function(){return yf(e().onDragStart,g,t,$s.onDragStart)})})},l=function(f,p){var g=Zg(p),h=td(p);r||Q(!1);var w=!k$(f,r.lastCritical);w&&(r.lastCritical=f);var I=!R$(r.lastLocation,g);I&&(r.lastLocation=g);var y=!O$(r.lastCombine,h);if(y&&(r.lastCombine=h),!(!w&&!I&&!y)){var b=le({},ys(f,r.mode),{combine:h,destination:g});n.add(function(){na("onDragUpdate",function(){return yf(e().onDragUpdate,b,t,$s.onDragUpdate)})})}},s=function(){r||Q(!1),n.flush()},u=function(f){r||Q(!1),r=null,na("onDragEnd",function(){return yf(e().onDragEnd,f,t,$s.onDragEnd)})},c=function(){if(r){var f=le({},ys(r.lastCritical,r.mode),{combine:null,destination:null,reason:"CANCEL"});u(f)}};return{beforeCapture:i,beforeStart:o,start:a,update:l,flush:s,drop:u,abort:c}},B$=function(e,t){var n=z$(e,t);return function(r){return function(i){return function(o){if(o.type==="BEFORE_INITIAL_CAPTURE"){n.beforeCapture(o.payload.draggableId,o.payload.movementMode);return}if(o.type==="INITIAL_PUBLISH"){var a=o.payload.critical;n.beforeStart(a,o.payload.movementMode),i(o),n.start(a,o.payload.movementMode);return}if(o.type==="DROP_COMPLETE"){var l=o.payload.completed.result;n.flush(),i(o),n.drop(l);return}if(i(o),o.type==="FLUSH"){n.abort();return}var s=r.getState();s.phase==="DRAGGING"&&n.update(s.critical,s.impact)}}}},U$=function(e){return function(t){return function(n){if(n.type!=="DROP_ANIMATION_FINISHED"){t(n);return}var r=e.getState();r.phase!=="DROP_ANIMATING"&&Q(!1),e.dispatch(eh({completed:r.completed}))}}},$$=function(e){var t=null,n=null;function r(){n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)}return function(i){return function(o){if((o.type==="FLUSH"||o.type==="DROP_COMPLETE"||o.type==="DROP_ANIMATION_FINISHED")&&r(),i(o),o.type==="DROP_ANIMATE"){var a={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){var s=e.getState();s.phase==="DROP_ANIMATING"&&e.dispatch(ZS())}};n=requestAnimationFrame(function(){n=null,t=vn(window,[a])})}}}},_$=function(e){return function(){return function(t){return function(n){(n.type==="DROP_COMPLETE"||n.type==="FLUSH"||n.type==="DROP_ANIMATE")&&e.stopPublishing(),t(n)}}}},F$=function(e){var t=!1;return function(){return function(n){return function(r){if(r.type==="INITIAL_PUBLISH"){t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),e.tryRestoreFocusRecorded();return}if(n(r),!!t){if(r.type==="FLUSH"){t=!1,e.tryRestoreFocusRecorded();return}if(r.type==="DROP_COMPLETE"){t=!1;var i=r.payload.completed.result;i.combine&&e.tryShiftRecord(i.draggableId,i.combine.draggableId),e.tryRestoreFocusRecorded()}}}}}},H$=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},W$=function(e){return function(t){return function(n){return function(r){if(H$(r)){e.stop(),n(r);return}if(r.type==="INITIAL_PUBLISH"){n(r);var i=t.getState();i.phase!=="DRAGGING"&&Q(!1),e.start(i);return}n(r),e.scroll(t.getState())}}}},G$=function(e){return function(t){return function(n){if(t(n),n.type==="PUBLISH_WHILE_DRAGGING"){var r=e.getState();r.phase==="DROP_PENDING"&&(r.isWaiting||e.dispatch(VS({reason:r.reason})))}}}},V$=tS,Z$=function(e){var t=e.dimensionMarshal,n=e.focusMarshal,r=e.styleMarshal,i=e.getResponders,o=e.announce,a=e.autoScroller;return eS(r$,V$(PB(b$(r),_$(t),w$(t),A$,U$,$$,G$,W$(a),j$,F$(n),B$(i,o))))},If=function(){return{additions:{},removals:{},modified:{}}};function Y$(e){var t=e.registry,n=e.callbacks,r=If(),i=null,o=function(){i||(n.collectionStarting(),i=requestAnimationFrame(function(){i=null;var c=r,d=c.additions,f=c.removals,p=c.modified,g=Object.keys(d).map(function(I){return t.draggable.getById(I).getDimension(ct)}).sort(function(I,y){return I.descriptor.index-y.descriptor.index}),h=Object.keys(p).map(function(I){var y=t.droppable.getById(I),b=y.callbacks.getScrollWhileDragging();return{droppableId:I,scroll:b}}),w={additions:g,removals:Object.keys(f),modified:h};r=If(),n.publish(w)}))},a=function(c){var d=c.descriptor.id;r.additions[d]=c,r.modified[c.descriptor.droppableId]=!0,r.removals[d]&&delete r.removals[d],o()},l=function(c){var d=c.descriptor;r.removals[d.id]=!0,r.modified[d.droppableId]=!0,r.additions[d.id]&&delete r.additions[d.id],o()},s=function(){i&&(cancelAnimationFrame(i),i=null,r=If())};return{add:a,remove:l,stop:s}}var JS=function(e){var t=e.scrollHeight,n=e.scrollWidth,r=e.height,i=e.width,o=Xt({x:n,y:t},{x:i,y:r}),a={x:Math.max(0,o.x),y:Math.max(0,o.y)};return a},XS=function(){var e=document.documentElement;return e||Q(!1),e},qS=function(){var e=XS(),t=JS({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight});return t},Q$=function(){var e=QS(),t=qS(),n=e.y,r=e.x,i=XS(),o=i.clientWidth,a=i.clientHeight,l=r+o,s=n+a,u=Tn({top:n,left:r,right:l,bottom:s}),c={frame:u,scroll:{initial:e,current:e,max:t,diff:{value:ct,displacement:ct}}};return c},J$=function(e){var t=e.critical,n=e.scrollOptions,r=e.registry,i=Q$(),o=i.scroll.current,a=t.droppable,l=r.droppable.getAllByType(a.type).map(function(d){return d.callbacks.getDimensionAndWatchScroll(o,n)}),s=r.draggable.getAllByType(t.draggable.type).map(function(d){return d.getDimension(o)}),u={draggables:AS(s),droppables:DS(l)},c={dimensions:u,critical:t,viewport:i};return c};function u0(e,t,n){if(n.descriptor.id===t.id||n.descriptor.type!==t.type)return!1;var r=e.droppable.getById(n.descriptor.droppableId);return r.descriptor.mode==="virtual"}var X$=function(e,t){var n=null,r=Y$({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),i=function(p,g){e.droppable.exists(p)||Q(!1),n&&t.updateDroppableIsEnabled({id:p,isEnabled:g})},o=function(p,g){n&&(e.droppable.exists(p)||Q(!1),t.updateDroppableIsCombineEnabled({id:p,isCombineEnabled:g}))},a=function(p,g){n&&(e.droppable.exists(p)||Q(!1),t.updateDroppableScroll({id:p,newScroll:g}))},l=function(p,g){n&&e.droppable.getById(p).callbacks.scroll(g)},s=function(){if(n){r.stop();var p=n.critical.droppable;e.droppable.getAllByType(p.type).forEach(function(g){return g.callbacks.dragStopped()}),n.unsubscribe(),n=null}},u=function(p){n||Q(!1);var g=n.critical.draggable;p.type==="ADDITION"&&u0(e,g,p.value)&&r.add(p.value),p.type==="REMOVAL"&&u0(e,g,p.value)&&r.remove(p.value)},c=function(p){n&&Q(!1);var g=e.draggable.getById(p.draggableId),h=e.droppable.getById(g.descriptor.droppableId),w={draggable:g.descriptor,droppable:h.descriptor},I=e.subscribe(u);return n={critical:w,unsubscribe:I},J$({critical:w,registry:e,scrollOptions:p.scrollOptions})},d={updateDroppableIsEnabled:i,updateDroppableIsCombineEnabled:o,scrollDroppable:l,updateDroppableScroll:a,startPublishing:c,stopPublishing:s};return d},KS=function(e,t){return e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===t?!1:e.completed.result.reason==="DROP"},q$=function(e){window.scrollBy(e.x,e.y)},K$=ut(function(e){return ed(e).filter(function(t){return!(!t.isEnabled||!t.frame)})}),e_=function(t,n){var r=Jr(K$(n),function(i){return i.frame||Q(!1),zS(i.frame.pageMarginBox)(t)});return r},t_=function(e){var t=e.center,n=e.destination,r=e.droppables;if(n){var i=r[n];return i.frame?i:null}var o=e_(t,r);return o},Br={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(t){return Math.pow(t,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},n_=function(e,t){var n=e[t.size]*Br.startFromPercentage,r=e[t.size]*Br.maxScrollAtPercentage,i={startScrollingFrom:n,maxScrollValueAt:r};return i},eN=function(e){var t=e.startOfRange,n=e.endOfRange,r=e.current,i=n-t;if(i===0)return 0;var o=r-t,a=o/i;return a},rh=1,r_=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return Br.maxPixelScroll;if(e===t.startScrollingFrom)return rh;var n=eN({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),r=1-n,i=Br.maxPixelScroll*Br.ease(r);return Math.ceil(i)},c0=Br.durationDampening.accelerateAt,d0=Br.durationDampening.stopDampeningAt,i_=function(e,t){var n=t,r=d0,i=Date.now(),o=i-n;if(o>=d0)return e;if(o<c0)return rh;var a=eN({startOfRange:c0,endOfRange:r,current:o}),l=e*Br.ease(a);return Math.ceil(l)},f0=function(e){var t=e.distanceToEdge,n=e.thresholds,r=e.dragStartTime,i=e.shouldUseTimeDampening,o=r_(t,n);return o===0?0:i?Math.max(i_(o,r),rh):o},p0=function(e){var t=e.container,n=e.distanceToEdges,r=e.dragStartTime,i=e.axis,o=e.shouldUseTimeDampening,a=n_(t,i),l=n[i.end]<n[i.start];return l?f0({distanceToEdge:n[i.end],thresholds:a,dragStartTime:r,shouldUseTimeDampening:o}):-1*f0({distanceToEdge:n[i.start],thresholds:a,dragStartTime:r,shouldUseTimeDampening:o})},o_=function(e){var t=e.container,n=e.subject,r=e.proposedScroll,i=n.height>t.height,o=n.width>t.width;return!o&&!i?r:o&&i?null:{x:o?0:r.x,y:i?0:r.y}},a_=SS(function(e){return e===0?0:e}),tN=function(e){var t=e.dragStartTime,n=e.container,r=e.subject,i=e.center,o=e.shouldUseTimeDampening,a={top:i.y-n.top,right:n.right-i.x,bottom:n.bottom-i.y,left:i.x-n.left},l=p0({container:n,distanceToEdges:a,dragStartTime:t,axis:Yg,shouldUseTimeDampening:o}),s=p0({container:n,distanceToEdges:a,dragStartTime:t,axis:TS,shouldUseTimeDampening:o}),u=a_({x:s,y:l});if(zr(u,ct))return null;var c=o_({container:n,subject:r,proposedScroll:u});return c?zr(c,ct)?null:c:null},l_=SS(function(e){return e===0?0:e>0?1:-1}),ih=function(){var e=function(n,r){return n<0?n:n>r?n-r:0};return function(t){var n=t.current,r=t.max,i=t.change,o=vt(n,i),a={x:e(o.x,r.x),y:e(o.y,r.y)};return zr(a,ct)?null:a}}(),nN=function(t){var n=t.max,r=t.current,i=t.change,o={x:Math.max(r.x,n.x),y:Math.max(r.y,n.y)},a=l_(i),l=ih({max:o,current:r,change:a});return!l||a.x!==0&&l.x===0||a.y!==0&&l.y===0},oh=function(t,n){return nN({current:t.scroll.current,max:t.scroll.max,change:n})},s_=function(t,n){if(!oh(t,n))return null;var r=t.scroll.max,i=t.scroll.current;return ih({current:i,max:r,change:n})},ah=function(t,n){var r=t.frame;return r?nN({current:r.scroll.current,max:r.scroll.max,change:n}):!1},u_=function(t,n){var r=t.frame;return!r||!ah(t,n)?null:ih({current:r.scroll.current,max:r.scroll.max,change:n})},c_=function(e){var t=e.viewport,n=e.subject,r=e.center,i=e.dragStartTime,o=e.shouldUseTimeDampening,a=tN({dragStartTime:i,container:t.frame,subject:n,center:r,shouldUseTimeDampening:o});return a&&oh(t,a)?a:null},d_=function(e){var t=e.droppable,n=e.subject,r=e.center,i=e.dragStartTime,o=e.shouldUseTimeDampening,a=t.frame;if(!a)return null;var l=tN({dragStartTime:i,container:a.pageMarginBox,subject:n,center:r,shouldUseTimeDampening:o});return l&&ah(t,l)?l:null},m0=function(e){var t=e.state,n=e.dragStartTime,r=e.shouldUseTimeDampening,i=e.scrollWindow,o=e.scrollDroppable,a=t.current.page.borderBoxCenter,l=t.dimensions.draggables[t.critical.draggable.id],s=l.page.marginBox;if(t.isWindowScrollAllowed){var u=t.viewport,c=c_({dragStartTime:n,viewport:u,subject:s,center:a,shouldUseTimeDampening:r});if(c){i(c);return}}var d=t_({center:a,destination:en(t.impact),droppables:t.dimensions.droppables});if(d){var f=d_({dragStartTime:n,droppable:d,subject:s,center:a,shouldUseTimeDampening:r});f&&o(d.descriptor.id,f)}},f_=function(e){var t=e.scrollWindow,n=e.scrollDroppable,r=Ka(t),i=Ka(n),o=null,a=function(c){o||Q(!1);var d=o,f=d.shouldUseTimeDampening,p=d.dragStartTime;m0({state:c,scrollWindow:r,scrollDroppable:i,dragStartTime:p,shouldUseTimeDampening:f})},l=function(c){o&&Q(!1);var d=Date.now(),f=!1,p=function(){f=!0};m0({state:c,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:p,scrollDroppable:p}),o={dragStartTime:d,shouldUseTimeDampening:f},f&&a(c)},s=function(){o&&(r.cancel(),i.cancel(),o=null)};return{start:l,stop:s,scroll:a}},p_=function(e){var t=e.move,n=e.scrollDroppable,r=e.scrollWindow,i=function(u,c){var d=vt(u.current.client.selection,c);t({client:d})},o=function(u,c){if(!ah(u,c))return c;var d=u_(u,c);if(!d)return n(u.descriptor.id,c),null;var f=Xt(c,d);n(u.descriptor.id,f);var p=Xt(c,f);return p},a=function(u,c,d){if(!u||!oh(c,d))return d;var f=s_(c,d);if(!f)return r(d),null;var p=Xt(d,f);r(p);var g=Xt(d,p);return g},l=function(u){var c=u.scrollJumpRequest;if(c){var d=en(u.impact);d||Q(!1);var f=o(u.dimensions.droppables[d],c);if(f){var p=u.viewport,g=a(u.isWindowScrollAllowed,p,f);g&&i(u,g)}}};return l},m_=function(e){var t=e.scrollDroppable,n=e.scrollWindow,r=e.move,i=f_({scrollWindow:n,scrollDroppable:t}),o=p_({move:r,scrollWindow:n,scrollDroppable:t}),a=function(u){if(u.phase==="DRAGGING"){if(u.movementMode==="FLUID"){i.scroll(u);return}u.scrollJumpRequest&&o(u)}},l={scroll:a,start:i.start,stop:i.stop};return l},Mo="data-rbd",So=function(){var e=Mo+"-drag-handle";return{base:e,draggableId:e+"-draggable-id",contextId:e+"-context-id"}}(),Vp=function(){var e=Mo+"-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),g_=function(){var e=Mo+"-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),g0={contextId:Mo+"-scroll-container-context-id"},h_=function(t){return function(n){return"["+n+'="'+t+'"]'}},ra=function(t,n){return t.map(function(r){var i=r.styles[n];return i?r.selector+" { "+i+" }":""}).join(" ")},v_="pointer-events: none;",y_=function(e){var t=h_(e),n=function(){var l=`
146
+ `},$s={dragHandleUsageInstructions:JU,onDragStart:XU,onDragUpdate:qU,onDragEnd:KU},ct={x:0,y:0},vt=function(t,n){return{x:t.x+n.x,y:t.y+n.y}},Xt=function(t,n){return{x:t.x-n.x,y:t.y-n.y}},zr=function(t,n){return t.x===n.x&&t.y===n.y},Ro=function(t){return{x:t.x!==0?-t.x:0,y:t.y!==0?-t.y:0}},Si=function(t,n,r){var i;return r===void 0&&(r=0),i={},i[t]=n,i[t==="x"?"y":"x"]=r,i},el=function(t,n){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))},Ky=function(t,n){return Math.min.apply(Math,n.map(function(r){return el(t,r)}))},NN=function(t){return function(n){return{x:t(n.x),y:t(n.y)}}},e5=function(e,t){var n=Tn({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n},_l=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},e0=function(t){return[{x:t.left,y:t.top},{x:t.right,y:t.top},{x:t.left,y:t.bottom},{x:t.right,y:t.bottom}]},t5={top:0,right:0,bottom:0,left:0},n5=function(t,n){return n?_l(t,n.scroll.diff.displacement):t},r5=function(t,n,r){if(r&&r.increasedBy){var i;return le({},t,(i={},i[n.end]=t[n.end]+r.increasedBy[n.line],i))}return t},i5=function(t,n){return n&&n.shouldClipSubject?e5(n.pageMarginBox,t):Tn(t)},xo=function(e){var t=e.page,n=e.withPlaceholder,r=e.axis,i=e.frame,o=n5(t.marginBox,i),a=r5(o,r,n),l=i5(a,i);return{page:t,withPlaceholder:n,active:l}},Wg=function(e,t){e.frame||Q(!1);var n=e.frame,r=Xt(t,n.scroll.initial),i=Ro(r),o=le({},n,{scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:i},max:n.scroll.max}}),a=xo({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:o}),l=le({},e,{frame:o,subject:a});return l};function Pu(e){return Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]})}function Vg(e,t){if(e.findIndex)return e.findIndex(t);for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}function Jr(e,t){if(e.find)return e.find(t);var n=Vg(e,t);if(n!==-1)return e[n]}function SN(e){return Array.prototype.slice.call(e)}var DN=ut(function(e){return e.reduce(function(t,n){return t[n.descriptor.id]=n,t},{})}),AN=ut(function(e){return e.reduce(function(t,n){return t[n.descriptor.id]=n,t},{})}),ed=ut(function(e){return Pu(e)}),o5=ut(function(e){return Pu(e)}),Oo=ut(function(e,t){var n=o5(t).filter(function(r){return e===r.descriptor.droppableId}).sort(function(r,i){return r.descriptor.index-i.descriptor.index});return n});function Zg(e){return e.at&&e.at.type==="REORDER"?e.at.destination:null}function td(e){return e.at&&e.at.type==="COMBINE"?e.at.combine:null}var nd=ut(function(e,t){return t.filter(function(n){return n.descriptor.id!==e.descriptor.id})}),a5=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,i=e.insideDestination,o=e.previousImpact;if(!r.isCombineEnabled)return null;var a=Zg(o);if(!a)return null;function l(h){var w={type:"COMBINE",combine:{draggableId:h,droppableId:r.descriptor.id}};return le({},o,{at:w})}var s=o.displaced.all,u=s.length?s[0]:null;if(t)return u?l(u):null;var c=nd(n,i);if(!u){if(!c.length)return null;var d=c[c.length-1];return l(d.descriptor.id)}var f=Vg(c,function(h){return h.descriptor.id===u});f===-1&&Q(!1);var p=f-1;if(p<0)return null;var g=c[p];return l(g.descriptor.id)},ko=function(e,t){return e.descriptor.droppableId===t.descriptor.id},CN={point:ct,value:0},tl={invisible:{},visible:{},all:[]},l5={displaced:tl,displacedBy:CN,at:null},In=function(e,t){return function(n){return e<=n&&n<=t}},EN=function(e){var t=In(e.top,e.bottom),n=In(e.left,e.right);return function(r){var i=t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right);if(i)return!0;var o=t(r.top)||t(r.bottom),a=n(r.left)||n(r.right),l=o&&a;if(l)return!0;var s=r.top<e.top&&r.bottom>e.bottom,u=r.left<e.left&&r.right>e.right,c=s&&u;if(c)return!0;var d=s&&a||u&&o;return d}},s5=function(e){var t=In(e.top,e.bottom),n=In(e.left,e.right);return function(r){var i=t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right);return i}},Yg={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},TN={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},u5=function(e){return function(t){var n=In(t.top,t.bottom),r=In(t.left,t.right);return function(i){return e===Yg?n(i.top)&&n(i.bottom):r(i.left)&&r(i.right)}}},c5=function(t,n){var r=n.frame?n.frame.scroll.diff.displacement:ct;return _l(t,r)},d5=function(t,n,r){return n.subject.active?r(n.subject.active)(t):!1},f5=function(t,n,r){return r(n)(t)},Qg=function(t){var n=t.target,r=t.destination,i=t.viewport,o=t.withDroppableDisplacement,a=t.isVisibleThroughFrameFn,l=o?c5(n,r):n;return d5(l,r,a)&&f5(l,i,a)},p5=function(t){return Qg(le({},t,{isVisibleThroughFrameFn:EN}))},jN=function(t){return Qg(le({},t,{isVisibleThroughFrameFn:s5}))},m5=function(t){return Qg(le({},t,{isVisibleThroughFrameFn:u5(t.destination.axis)}))},g5=function(t,n,r){if(typeof r=="boolean")return r;if(!n)return!0;var i=n.invisible,o=n.visible;if(i[t])return!1;var a=o[t];return a?a.shouldAnimate:!0};function h5(e,t){var n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return Tn(Hg(n,r))}function nl(e){var t=e.afterDragging,n=e.destination,r=e.displacedBy,i=e.viewport,o=e.forceShouldAnimate,a=e.last;return t.reduce(function(s,u){var c=h5(u,r),d=u.descriptor.id;s.all.push(d);var f=p5({target:c,destination:n,viewport:i,withDroppableDisplacement:!0});if(!f)return s.invisible[u.descriptor.id]=!0,s;var p=g5(d,a,o),g={draggableId:d,shouldAnimate:p};return s.visible[d]=g,s},{all:[],visible:{},invisible:{}})}function v5(e,t){if(!e.length)return 0;var n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}function t0(e){var t=e.insideDestination,n=e.inHomeList,r=e.displacedBy,i=e.destination,o=v5(t,{inHomeList:n});return{displaced:tl,displacedBy:r,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:o}}}}function Ru(e){var t=e.draggable,n=e.insideDestination,r=e.destination,i=e.viewport,o=e.displacedBy,a=e.last,l=e.index,s=e.forceShouldAnimate,u=ko(t,r);if(l==null)return t0({insideDestination:n,inHomeList:u,displacedBy:o,destination:r});var c=Jr(n,function(h){return h.descriptor.index===l});if(!c)return t0({insideDestination:n,inHomeList:u,displacedBy:o,destination:r});var d=nd(t,n),f=n.indexOf(c),p=d.slice(f),g=nl({afterDragging:p,destination:r,displacedBy:o,last:a,viewport:i.frame,forceShouldAnimate:s});return{displaced:g,displacedBy:o,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:l}}}}function Fr(e,t){return!!t.effected[e]}var y5=function(e){var t=e.isMovingForward,n=e.destination,r=e.draggables,i=e.combine,o=e.afterCritical;if(!n.isCombineEnabled)return null;var a=i.draggableId,l=r[a],s=l.descriptor.index,u=Fr(a,o);return u?t?s:s-1:t?s+1:s},I5=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.insideDestination,i=e.location;if(!r.length)return null;var o=i.index,a=t?o+1:o-1,l=r[0].descriptor.index,s=r[r.length-1].descriptor.index,u=n?s:s+1;return a<l||a>u?null:a},w5=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.draggable,i=e.draggables,o=e.destination,a=e.insideDestination,l=e.previousImpact,s=e.viewport,u=e.afterCritical,c=l.at;if(c||Q(!1),c.type==="REORDER"){var d=I5({isMovingForward:t,isInHomeList:n,location:c.destination,insideDestination:a});return d==null?null:Ru({draggable:r,insideDestination:a,destination:o,viewport:s,last:l.displaced,displacedBy:l.displacedBy,index:d})}var f=y5({isMovingForward:t,destination:o,displaced:l.displaced,draggables:i,combine:c.combine,afterCritical:u});return f==null?null:Ru({draggable:r,insideDestination:a,destination:o,viewport:s,last:l.displaced,displacedBy:l.displacedBy,index:f})},M5=function(e){var t=e.displaced,n=e.afterCritical,r=e.combineWith,i=e.displacedBy,o=!!(t.visible[r]||t.invisible[r]);return Fr(r,n)?o?ct:Ro(i.point):o?i.point:ct},x5=function(e){var t=e.afterCritical,n=e.impact,r=e.draggables,i=td(n);i||Q(!1);var o=i.draggableId,a=r[o].page.borderBox.center,l=M5({displaced:n.displaced,afterCritical:t,combineWith:o,displacedBy:n.displacedBy});return vt(a,l)},LN=function(t,n){return n.margin[t.start]+n.borderBox[t.size]/2},b5=function(t,n){return n.margin[t.end]+n.borderBox[t.size]/2},Jg=function(t,n,r){return n[t.crossAxisStart]+r.margin[t.crossAxisStart]+r.borderBox[t.crossAxisSize]/2},n0=function(t){var n=t.axis,r=t.moveRelativeTo,i=t.isMoving;return Si(n.line,r.marginBox[n.end]+LN(n,i),Jg(n,r.marginBox,i))},r0=function(t){var n=t.axis,r=t.moveRelativeTo,i=t.isMoving;return Si(n.line,r.marginBox[n.start]-b5(n,i),Jg(n,r.marginBox,i))},N5=function(t){var n=t.axis,r=t.moveInto,i=t.isMoving;return Si(n.line,r.contentBox[n.start]+LN(n,i),Jg(n,r.contentBox,i))},S5=function(e){var t=e.impact,n=e.draggable,r=e.draggables,i=e.droppable,o=e.afterCritical,a=Oo(i.descriptor.id,r),l=n.page,s=i.axis;if(!a.length)return N5({axis:s,moveInto:i.page,isMoving:l});var u=t.displaced,c=t.displacedBy,d=u.all[0];if(d){var f=r[d];if(Fr(d,o))return r0({axis:s,moveRelativeTo:f.page,isMoving:l});var p=Eu(f.page,c.point);return r0({axis:s,moveRelativeTo:p,isMoving:l})}var g=a[a.length-1];if(g.descriptor.id===n.descriptor.id)return l.borderBox.center;if(Fr(g.descriptor.id,o)){var h=Eu(g.page,Ro(o.displacedBy.point));return n0({axis:s,moveRelativeTo:h,isMoving:l})}return n0({axis:s,moveRelativeTo:g.page,isMoving:l})},Fp=function(e,t){var n=e.frame;return n?vt(t,n.scroll.diff.displacement):t},D5=function(t){var n=t.impact,r=t.draggable,i=t.droppable,o=t.draggables,a=t.afterCritical,l=r.page.borderBox.center,s=n.at;return!i||!s?l:s.type==="REORDER"?S5({impact:n,draggable:r,draggables:o,droppable:i,afterCritical:a}):x5({impact:n,draggables:o,afterCritical:a})},rd=function(e){var t=D5(e),n=e.droppable,r=n?Fp(n,t):t;return r},PN=function(e,t){var n=Xt(t,e.scroll.initial),r=Ro(n),i=Tn({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),o={frame:i,scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}};return o};function i0(e,t){return e.map(function(n){return t[n]})}function A5(e,t){for(var n=0;n<t.length;n++){var r=t[n].visible[e];if(r)return r}return null}var C5=function(e){var t=e.impact,n=e.viewport,r=e.destination,i=e.draggables,o=e.maxScrollChange,a=PN(n,vt(n.scroll.current,o)),l=r.frame?Wg(r,vt(r.frame.scroll.current,o)):r,s=t.displaced,u=nl({afterDragging:i0(s.all,i),destination:r,displacedBy:t.displacedBy,viewport:a.frame,last:s,forceShouldAnimate:!1}),c=nl({afterDragging:i0(s.all,i),destination:l,displacedBy:t.displacedBy,viewport:n.frame,last:s,forceShouldAnimate:!1}),d={},f={},p=[s,u,c];s.all.forEach(function(h){var w=A5(h,p);if(w){f[h]=w;return}d[h]=!0});var g=le({},t,{displaced:{all:s.all,invisible:d,visible:f}});return g},E5=function(e,t){return vt(e.scroll.diff.displacement,t)},Xg=function(e){var t=e.pageBorderBoxCenter,n=e.draggable,r=e.viewport,i=E5(r,t),o=Xt(i,n.page.borderBox.center);return vt(n.client.borderBox.center,o)},RN=function(e){var t=e.draggable,n=e.destination,r=e.newPageBorderBoxCenter,i=e.viewport,o=e.withDroppableDisplacement,a=e.onlyOnMainAxis,l=a===void 0?!1:a,s=Xt(r,t.page.borderBox.center),u=_l(t.page.borderBox,s),c={target:u,destination:n,withDroppableDisplacement:o,viewport:i};return l?m5(c):jN(c)},T5=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,i=e.draggables,o=e.previousImpact,a=e.viewport,l=e.previousPageBorderBoxCenter,s=e.previousClientSelection,u=e.afterCritical;if(!r.isEnabled)return null;var c=Oo(r.descriptor.id,i),d=ko(n,r),f=a5({isMovingForward:t,draggable:n,destination:r,insideDestination:c,previousImpact:o})||w5({isMovingForward:t,isInHomeList:d,draggable:n,draggables:i,destination:r,insideDestination:c,previousImpact:o,viewport:a,afterCritical:u});if(!f)return null;var p=rd({impact:f,draggable:n,droppable:r,draggables:i,afterCritical:u}),g=RN({draggable:n,destination:r,newPageBorderBoxCenter:p,viewport:a.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});if(g){var h=Xg({pageBorderBoxCenter:p,draggable:n,viewport:a});return{clientSelection:h,impact:f,scrollJumpRequest:null}}var w=Xt(p,l),I=C5({impact:f,viewport:a,destination:r,draggables:i,maxScrollChange:w});return{clientSelection:s,impact:I,scrollJumpRequest:w}},Tt=function(t){var n=t.subject.active;return n||Q(!1),n},j5=function(e){var t=e.isMovingForward,n=e.pageBorderBoxCenter,r=e.source,i=e.droppables,o=e.viewport,a=r.subject.active;if(!a)return null;var l=r.axis,s=In(a[l.start],a[l.end]),u=ed(i).filter(function(d){return d!==r}).filter(function(d){return d.isEnabled}).filter(function(d){return!!d.subject.active}).filter(function(d){return EN(o.frame)(Tt(d))}).filter(function(d){var f=Tt(d);return t?a[l.crossAxisEnd]<f[l.crossAxisEnd]:f[l.crossAxisStart]<a[l.crossAxisStart]}).filter(function(d){var f=Tt(d),p=In(f[l.start],f[l.end]);return s(f[l.start])||s(f[l.end])||p(a[l.start])||p(a[l.end])}).sort(function(d,f){var p=Tt(d)[l.crossAxisStart],g=Tt(f)[l.crossAxisStart];return t?p-g:g-p}).filter(function(d,f,p){return Tt(d)[l.crossAxisStart]===Tt(p[0])[l.crossAxisStart]});if(!u.length)return null;if(u.length===1)return u[0];var c=u.filter(function(d){var f=In(Tt(d)[l.start],Tt(d)[l.end]);return f(n[l.line])});return c.length===1?c[0]:c.length>1?c.sort(function(d,f){return Tt(d)[l.start]-Tt(f)[l.start]})[0]:u.sort(function(d,f){var p=Ky(n,e0(Tt(d))),g=Ky(n,e0(Tt(f)));return p!==g?p-g:Tt(d)[l.start]-Tt(f)[l.start]})[0]},o0=function(t,n){var r=t.page.borderBox.center;return Fr(t.descriptor.id,n)?Xt(r,n.displacedBy.point):r},L5=function(t,n){var r=t.page.borderBox;return Fr(t.descriptor.id,n)?_l(r,Ro(n.displacedBy.point)):r},P5=function(e){var t=e.pageBorderBoxCenter,n=e.viewport,r=e.destination,i=e.insideDestination,o=e.afterCritical,a=i.filter(function(l){return jN({target:L5(l,o),destination:r,viewport:n.frame,withDroppableDisplacement:!0})}).sort(function(l,s){var u=el(t,Fp(r,o0(l,o))),c=el(t,Fp(r,o0(s,o)));return u<c?-1:c<u?1:l.descriptor.index-s.descriptor.index});return a[0]||null},Fl=ut(function(t,n){var r=n[t.line];return{value:r,point:Si(t.line,r)}}),R5=function(t,n,r){var i=t.axis;if(t.descriptor.mode==="virtual")return Si(i.line,n[i.line]);var o=t.subject.page.contentBox[i.size],a=Oo(t.descriptor.id,r),l=a.reduce(function(c,d){return c+d.client.marginBox[i.size]},0),s=l+n[i.line],u=s-o;return u<=0?null:Si(i.line,u)},ON=function(t,n){return le({},t,{scroll:le({},t.scroll,{max:n})})},kN=function(t,n,r){var i=t.frame;ko(n,t)&&Q(!1),t.subject.withPlaceholder&&Q(!1);var o=Fl(t.axis,n.displaceBy).point,a=R5(t,o,r),l={placeholderSize:o,increasedBy:a,oldFrameMaxScroll:t.frame?t.frame.scroll.max:null};if(!i){var s=xo({page:t.subject.page,withPlaceholder:l,axis:t.axis,frame:t.frame});return le({},t,{subject:s})}var u=a?vt(i.scroll.max,a):i.scroll.max,c=ON(i,u),d=xo({page:t.subject.page,withPlaceholder:l,axis:t.axis,frame:c});return le({},t,{subject:d,frame:c})},O5=function(t){var n=t.subject.withPlaceholder;n||Q(!1);var r=t.frame;if(!r){var i=xo({page:t.subject.page,axis:t.axis,frame:null,withPlaceholder:null});return le({},t,{subject:i})}var o=n.oldFrameMaxScroll;o||Q(!1);var a=ON(r,o),l=xo({page:t.subject.page,axis:t.axis,frame:a,withPlaceholder:null});return le({},t,{subject:l,frame:a})},k5=function(e){var t=e.previousPageBorderBoxCenter,n=e.moveRelativeTo,r=e.insideDestination,i=e.draggable,o=e.draggables,a=e.destination,l=e.viewport,s=e.afterCritical;if(!n){if(r.length)return null;var u={displaced:tl,displacedBy:CN,at:{type:"REORDER",destination:{droppableId:a.descriptor.id,index:0}}},c=rd({impact:u,draggable:i,droppable:a,draggables:o,afterCritical:s}),d=ko(i,a)?a:kN(a,i,o),f=RN({draggable:i,destination:d,newPageBorderBoxCenter:c,viewport:l.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});return f?u:null}var p=t[a.axis.line]<=n.page.borderBox.center[a.axis.line],g=function(){var w=n.descriptor.index;return n.descriptor.id===i.descriptor.id||p?w:w+1}(),h=Fl(a.axis,i.displaceBy);return Ru({draggable:i,insideDestination:r,destination:a,viewport:l,displacedBy:h,last:tl,index:g})},z5=function(e){var t=e.isMovingForward,n=e.previousPageBorderBoxCenter,r=e.draggable,i=e.isOver,o=e.draggables,a=e.droppables,l=e.viewport,s=e.afterCritical,u=j5({isMovingForward:t,pageBorderBoxCenter:n,source:i,droppables:a,viewport:l});if(!u)return null;var c=Oo(u.descriptor.id,o),d=P5({pageBorderBoxCenter:n,viewport:l,destination:u,insideDestination:c,afterCritical:s}),f=k5({previousPageBorderBoxCenter:n,destination:u,draggable:r,draggables:o,moveRelativeTo:d,insideDestination:c,viewport:l,afterCritical:s});if(!f)return null;var p=rd({impact:f,draggable:r,droppable:u,draggables:o,afterCritical:s}),g=Xg({pageBorderBoxCenter:p,draggable:r,viewport:l});return{clientSelection:g,impact:f,scrollJumpRequest:null}},en=function(e){var t=e.at;return t?t.type==="REORDER"?t.destination.droppableId:t.combine.droppableId:null},B5=function(t,n){var r=en(t);return r?n[r]:null},U5=function(e){var t=e.state,n=e.type,r=B5(t.impact,t.dimensions.droppables),i=!!r,o=t.dimensions.droppables[t.critical.droppable.id],a=r||o,l=a.axis.direction,s=l==="vertical"&&(n==="MOVE_UP"||n==="MOVE_DOWN")||l==="horizontal"&&(n==="MOVE_LEFT"||n==="MOVE_RIGHT");if(s&&!i)return null;var u=n==="MOVE_DOWN"||n==="MOVE_RIGHT",c=t.dimensions.draggables[t.critical.draggable.id],d=t.current.page.borderBoxCenter,f=t.dimensions,p=f.draggables,g=f.droppables;return s?T5({isMovingForward:u,previousPageBorderBoxCenter:d,draggable:c,destination:a,draggables:p,viewport:t.viewport,previousClientSelection:t.current.client.selection,previousImpact:t.impact,afterCritical:t.afterCritical}):z5({isMovingForward:u,previousPageBorderBoxCenter:d,draggable:c,isOver:a,draggables:p,droppables:g,viewport:t.viewport,afterCritical:t.afterCritical})};function ni(e){return e.phase==="DRAGGING"||e.phase==="COLLECTING"}function zN(e){var t=In(e.top,e.bottom),n=In(e.left,e.right);return function(i){return t(i.y)&&n(i.x)}}function $5(e,t){return e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top}function _5(e){var t=e.pageBorderBox,n=e.draggable,r=e.candidates,i=n.page.borderBox.center,o=r.map(function(a){var l=a.axis,s=Si(a.axis.line,t.center[l.line],a.page.borderBox.center[l.crossAxisLine]);return{id:a.descriptor.id,distance:el(i,s)}}).sort(function(a,l){return l.distance-a.distance});return o[0]?o[0].id:null}function F5(e){var t=e.pageBorderBox,n=e.draggable,r=e.droppables,i=ed(r).filter(function(o){if(!o.isEnabled)return!1;var a=o.subject.active;if(!a||!$5(t,a))return!1;if(zN(a)(t.center))return!0;var l=o.axis,s=a.center[l.crossAxisLine],u=t[l.crossAxisStart],c=t[l.crossAxisEnd],d=In(a[l.crossAxisStart],a[l.crossAxisEnd]),f=d(u),p=d(c);return!f&&!p?!0:f?u<s:c>s});return i.length?i.length===1?i[0].descriptor.id:_5({pageBorderBox:t,draggable:n,candidates:i}):null}var BN=function(t,n){return Tn(_l(t,n))},H5=function(e,t){var n=e.frame;return n?BN(t,n.scroll.diff.value):t};function UN(e){var t=e.displaced,n=e.id;return!!(t.visible[n]||t.invisible[n])}function G5(e){var t=e.draggable,n=e.closest,r=e.inHomeList;return n?r&&n.descriptor.index>t.descriptor.index?n.descriptor.index-1:n.descriptor.index:null}var W5=function(e){var t=e.pageBorderBoxWithDroppableScroll,n=e.draggable,r=e.destination,i=e.insideDestination,o=e.last,a=e.viewport,l=e.afterCritical,s=r.axis,u=Fl(r.axis,n.displaceBy),c=u.value,d=t[s.start],f=t[s.end],p=nd(n,i),g=Jr(p,function(w){var I=w.descriptor.id,y=w.page.borderBox.center[s.line],M=Fr(I,l),x=UN({displaced:o,id:I});return M?x?f<=y:d<y-c:x?f<=y+c:d<y}),h=G5({draggable:n,closest:g,inHomeList:ko(n,r)});return Ru({draggable:n,insideDestination:i,destination:r,viewport:a,last:o,displacedBy:u,index:h})},V5=4,Z5=function(e){var t=e.draggable,n=e.pageBorderBoxWithDroppableScroll,r=e.previousImpact,i=e.destination,o=e.insideDestination,a=e.afterCritical;if(!i.isCombineEnabled)return null;var l=i.axis,s=Fl(i.axis,t.displaceBy),u=s.value,c=n[l.start],d=n[l.end],f=nd(t,o),p=Jr(f,function(h){var w=h.descriptor.id,I=h.page.borderBox,y=I[l.size],M=y/V5,x=Fr(w,a),S=UN({displaced:r.displaced,id:w});return x?S?d>I[l.start]+M&&d<I[l.end]-M:c>I[l.start]-u+M&&c<I[l.end]-u-M:S?d>I[l.start]+u+M&&d<I[l.end]+u-M:c>I[l.start]+M&&c<I[l.end]-M});if(!p)return null;var g={displacedBy:s,displaced:r.displaced,at:{type:"COMBINE",combine:{draggableId:p.descriptor.id,droppableId:i.descriptor.id}}};return g},$N=function(e){var t=e.pageOffset,n=e.draggable,r=e.draggables,i=e.droppables,o=e.previousImpact,a=e.viewport,l=e.afterCritical,s=BN(n.page.borderBox,t),u=F5({pageBorderBox:s,draggable:n,droppables:i});if(!u)return l5;var c=i[u],d=Oo(c.descriptor.id,r),f=H5(c,s);return Z5({pageBorderBoxWithDroppableScroll:f,draggable:n,previousImpact:o,destination:c,insideDestination:d,afterCritical:l})||W5({pageBorderBoxWithDroppableScroll:f,draggable:n,destination:c,insideDestination:d,last:o.displaced,viewport:a,afterCritical:l})},qg=function(e,t){var n;return le({},e,(n={},n[t.descriptor.id]=t,n))},Y5=function(t){var n=t.previousImpact,r=t.impact,i=t.droppables,o=en(n),a=en(r);if(!o||o===a)return i;var l=i[o];if(!l.subject.withPlaceholder)return i;var s=O5(l);return qg(i,s)},Q5=function(e){var t=e.draggable,n=e.draggables,r=e.droppables,i=e.previousImpact,o=e.impact,a=Y5({previousImpact:i,impact:o,droppables:r}),l=en(o);if(!l)return a;var s=r[l];if(ko(t,s)||s.subject.withPlaceholder)return a;var u=kN(s,t,n);return qg(a,u)},Ea=function(e){var t=e.state,n=e.clientSelection,r=e.dimensions,i=e.viewport,o=e.impact,a=e.scrollJumpRequest,l=i||t.viewport,s=r||t.dimensions,u=n||t.current.client.selection,c=Xt(u,t.initial.client.selection),d={offset:c,selection:u,borderBoxCenter:vt(t.initial.client.borderBoxCenter,c)},f={selection:vt(d.selection,l.scroll.current),borderBoxCenter:vt(d.borderBoxCenter,l.scroll.current),offset:vt(d.offset,l.scroll.diff.value)},p={client:d,page:f};if(t.phase==="COLLECTING")return le({phase:"COLLECTING"},t,{dimensions:s,viewport:l,current:p});var g=s.draggables[t.critical.draggable.id],h=o||$N({pageOffset:f.offset,draggable:g,draggables:s.draggables,droppables:s.droppables,previousImpact:t.impact,viewport:l,afterCritical:t.afterCritical}),w=Q5({draggable:g,impact:h,previousImpact:t.impact,draggables:s.draggables,droppables:s.droppables}),I=le({},t,{current:p,dimensions:{draggables:s.draggables,droppables:w},impact:h,viewport:l,scrollJumpRequest:a||null,forceShouldAnimate:a?!1:null});return I};function J5(e,t){return e.map(function(n){return t[n]})}var _N=function(e){var t=e.impact,n=e.viewport,r=e.draggables,i=e.destination,o=e.forceShouldAnimate,a=t.displaced,l=J5(a.all,r),s=nl({afterDragging:l,destination:i,displacedBy:t.displacedBy,viewport:n.frame,forceShouldAnimate:o,last:a});return le({},t,{displaced:s})},FN=function(e){var t=e.impact,n=e.draggable,r=e.droppable,i=e.draggables,o=e.viewport,a=e.afterCritical,l=rd({impact:t,draggable:n,draggables:i,droppable:r,afterCritical:a});return Xg({pageBorderBoxCenter:l,draggable:n,viewport:o})},HN=function(e){var t=e.state,n=e.dimensions,r=e.viewport;t.movementMode!=="SNAP"&&Q(!1);var i=t.impact,o=r||t.viewport,a=n||t.dimensions,l=a.draggables,s=a.droppables,u=l[t.critical.draggable.id],c=en(i);c||Q(!1);var d=s[c],f=_N({impact:i,viewport:o,destination:d,draggables:l}),p=FN({impact:f,draggable:u,droppable:d,draggables:l,viewport:o,afterCritical:t.afterCritical});return Ea({impact:f,clientSelection:p,state:t,dimensions:a,viewport:o})},X5=function(e){return{index:e.index,droppableId:e.droppableId}},GN=function(e){var t=e.draggable,n=e.home,r=e.draggables,i=e.viewport,o=Fl(n.axis,t.displaceBy),a=Oo(n.descriptor.id,r),l=a.indexOf(t);l===-1&&Q(!1);var s=a.slice(l+1),u=s.reduce(function(p,g){return p[g.descriptor.id]=!0,p},{}),c={inVirtualList:n.descriptor.mode==="virtual",displacedBy:o,effected:u},d=nl({afterDragging:s,destination:n,displacedBy:o,last:null,viewport:i.frame,forceShouldAnimate:!1}),f={displaced:d,displacedBy:o,at:{type:"REORDER",destination:X5(t.descriptor)}};return{impact:f,afterCritical:c}},q5=function(e,t){return{draggables:e.draggables,droppables:qg(e.droppables,t)}},K5=function(e){var t=e.draggable,n=e.offset,r=e.initialWindowScroll,i=Eu(t.client,n),o=Tu(i,r),a=le({},t,{placeholder:le({},t.placeholder,{client:i}),client:i,page:o});return a},e$=function(e){var t=e.frame;return t||Q(!1),t},t$=function(e){var t=e.additions,n=e.updatedDroppables,r=e.viewport,i=r.scroll.diff.value;return t.map(function(o){var a=o.descriptor.droppableId,l=n[a],s=e$(l),u=s.scroll.diff.value,c=vt(i,u),d=K5({draggable:o,offset:c,initialWindowScroll:r.scroll.initial});return d})},n$=function(e){var t=e.state,n=e.published,r=n.modified.map(function(M){var x=t.dimensions.droppables[M.droppableId],S=Wg(x,M.scroll);return S}),i=le({},t.dimensions.droppables,{},DN(r)),o=AN(t$({additions:n.additions,updatedDroppables:i,viewport:t.viewport})),a=le({},t.dimensions.draggables,{},o);n.removals.forEach(function(M){delete a[M]});var l={droppables:i,draggables:a},s=en(t.impact),u=s?l.droppables[s]:null,c=l.draggables[t.critical.draggable.id],d=l.droppables[t.critical.droppable.id],f=GN({draggable:c,home:d,draggables:a,viewport:t.viewport}),p=f.impact,g=f.afterCritical,h=u&&u.isCombineEnabled?t.impact:p,w=$N({pageOffset:t.current.page.offset,draggable:l.draggables[t.critical.draggable.id],draggables:l.draggables,droppables:l.droppables,previousImpact:h,viewport:t.viewport,afterCritical:g}),I=le({phase:"DRAGGING"},t,{phase:"DRAGGING",impact:w,onLiftImpact:p,dimensions:l,afterCritical:g,forceShouldAnimate:!1});if(t.phase==="COLLECTING")return I;var y=le({phase:"DROP_PENDING"},I,{phase:"DROP_PENDING",reason:t.reason,isWaiting:!1});return y},Hp=function(t){return t.movementMode==="SNAP"},hf=function(t,n,r){var i=q5(t.dimensions,n);return!Hp(t)||r?Ea({state:t,dimensions:i}):HN({state:t,dimensions:i})};function vf(e){return e.isDragging&&e.movementMode==="SNAP"?le({phase:"DRAGGING"},e,{scrollJumpRequest:null}):e}var a0={phase:"IDLE",completed:null,shouldFlush:!1},r$=function(e,t){if(e===void 0&&(e=a0),t.type==="FLUSH")return le({},a0,{shouldFlush:!0});if(t.type==="INITIAL_PUBLISH"){e.phase!=="IDLE"&&Q(!1);var n=t.payload,r=n.critical,i=n.clientSelection,o=n.viewport,a=n.dimensions,l=n.movementMode,s=a.draggables[r.draggable.id],u=a.droppables[r.droppable.id],c={selection:i,borderBoxCenter:s.client.borderBox.center,offset:ct},d={client:c,page:{selection:vt(c.selection,o.scroll.initial),borderBoxCenter:vt(c.selection,o.scroll.initial),offset:vt(c.selection,o.scroll.diff.value)}},f=ed(a.droppables).every(function(Ie){return!Ie.isFixedOnPage}),p=GN({draggable:s,home:u,draggables:a.draggables,viewport:o}),g=p.impact,h=p.afterCritical,w={phase:"DRAGGING",isDragging:!0,critical:r,movementMode:l,dimensions:a,initial:d,current:d,isWindowScrollAllowed:f,impact:g,afterCritical:h,onLiftImpact:g,viewport:o,scrollJumpRequest:null,forceShouldAnimate:null};return w}if(t.type==="COLLECTION_STARTING"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&Q(!1);var I=le({phase:"COLLECTING"},e,{phase:"COLLECTING"});return I}if(t.type==="PUBLISH_WHILE_DRAGGING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"||Q(!1),n$({state:e,published:t.payload});if(t.type==="MOVE"){if(e.phase==="DROP_PENDING")return e;ni(e)||Q(!1);var y=t.payload.client;return zr(y,e.current.client.selection)?e:Ea({state:e,clientSelection:y,impact:Hp(e)?e.impact:null})}if(t.type==="UPDATE_DROPPABLE_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="COLLECTING")return vf(e);ni(e)||Q(!1);var M=t.payload,x=M.id,S=M.newScroll,b=e.dimensions.droppables[x];if(!b)return e;var N=Wg(b,S);return hf(e,N,!1)}if(t.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(e.phase==="DROP_PENDING")return e;ni(e)||Q(!1);var C=t.payload,P=C.id,R=C.isEnabled,O=e.dimensions.droppables[P];O||Q(!1),O.isEnabled===R&&Q(!1);var J=le({},O,{isEnabled:R});return hf(e,J,!0)}if(t.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(e.phase==="DROP_PENDING")return e;ni(e)||Q(!1);var U=t.payload,W=U.id,Z=U.isCombineEnabled,$=e.dimensions.droppables[W];$||Q(!1),$.isCombineEnabled===Z&&Q(!1);var ee=le({},$,{isCombineEnabled:Z});return hf(e,ee,!0)}if(t.type==="MOVE_BY_WINDOW_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="DROP_ANIMATING")return e;ni(e)||Q(!1),e.isWindowScrollAllowed||Q(!1);var L=t.payload.newScroll;if(zr(e.viewport.scroll.current,L))return vf(e);var B=PN(e.viewport,L);return Hp(e)?HN({state:e,viewport:B}):Ea({state:e,viewport:B})}if(t.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!ni(e))return e;var F=t.payload.maxScroll;if(zr(F,e.viewport.scroll.max))return e;var V=le({},e.viewport,{scroll:le({},e.viewport.scroll,{max:F})});return le({phase:"DRAGGING"},e,{viewport:V})}if(t.type==="MOVE_UP"||t.type==="MOVE_DOWN"||t.type==="MOVE_LEFT"||t.type==="MOVE_RIGHT"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&Q(!1);var D=U5({state:e,type:t.type});return D?Ea({state:e,impact:D.impact,clientSelection:D.clientSelection,scrollJumpRequest:D.scrollJumpRequest}):e}if(t.type==="DROP_PENDING"){var E=t.payload.reason;e.phase!=="COLLECTING"&&Q(!1);var T=le({phase:"DROP_PENDING"},e,{phase:"DROP_PENDING",isWaiting:!0,reason:E});return T}if(t.type==="DROP_ANIMATE"){var z=t.payload,_=z.completed,ie=z.dropDuration,ue=z.newHomeClientOffset;e.phase==="DRAGGING"||e.phase==="DROP_PENDING"||Q(!1);var X={phase:"DROP_ANIMATING",completed:_,dropDuration:ie,newHomeClientOffset:ue,dimensions:e.dimensions};return X}if(t.type==="DROP_COMPLETE"){var me=t.payload.completed;return{phase:"IDLE",completed:me,shouldFlush:!1}}return e},i$=function(t){return{type:"BEFORE_INITIAL_CAPTURE",payload:t}},o$=function(t){return{type:"LIFT",payload:t}},a$=function(t){return{type:"INITIAL_PUBLISH",payload:t}},l$=function(t){return{type:"PUBLISH_WHILE_DRAGGING",payload:t}},s$=function(){return{type:"COLLECTION_STARTING",payload:null}},u$=function(t){return{type:"UPDATE_DROPPABLE_SCROLL",payload:t}},c$=function(t){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:t}},d$=function(t){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:t}},WN=function(t){return{type:"MOVE",payload:t}},f$=function(t){return{type:"MOVE_BY_WINDOW_SCROLL",payload:t}},p$=function(t){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:t}},m$=function(){return{type:"MOVE_UP",payload:null}},g$=function(){return{type:"MOVE_DOWN",payload:null}},h$=function(){return{type:"MOVE_RIGHT",payload:null}},v$=function(){return{type:"MOVE_LEFT",payload:null}},Kg=function(){return{type:"FLUSH",payload:null}},y$=function(t){return{type:"DROP_ANIMATE",payload:t}},eh=function(t){return{type:"DROP_COMPLETE",payload:t}},VN=function(t){return{type:"DROP",payload:t}},I$=function(t){return{type:"DROP_PENDING",payload:t}},ZN=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}},w$=function(e){return function(t){var n=t.getState,r=t.dispatch;return function(i){return function(o){if(o.type!=="LIFT"){i(o);return}var a=o.payload,l=a.id,s=a.clientSelection,u=a.movementMode,c=n();c.phase==="DROP_ANIMATING"&&r(eh({completed:c.completed})),n().phase!=="IDLE"&&Q(!1),r(Kg()),r(i$({draggableId:l,movementMode:u}));var d={shouldPublishImmediately:u==="SNAP"},f={draggableId:l,scrollOptions:d},p=e.startPublishing(f),g=p.critical,h=p.dimensions,w=p.viewport;r(a$({critical:g,dimensions:h,clientSelection:s,movementMode:u,viewport:w}))}}}},M$=function(e){return function(){return function(t){return function(n){n.type==="INITIAL_PUBLISH"&&e.dragging(),n.type==="DROP_ANIMATE"&&e.dropping(n.payload.completed.result.reason),(n.type==="FLUSH"||n.type==="DROP_COMPLETE")&&e.resting(),t(n)}}}},th={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},rl={opacity:{drop:0,combining:.7},scale:{drop:.75}},nh={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},Kr=nh.outOfTheWay+"s "+th.outOfTheWay,Ta={fluid:"opacity "+Kr,snap:"transform "+Kr+", opacity "+Kr,drop:function(t){var n=t+"s "+th.drop;return"transform "+n+", opacity "+n},outOfTheWay:"transform "+Kr,placeholder:"height "+Kr+", width "+Kr+", margin "+Kr},l0=function(t){return zr(t,ct)?null:"translate("+t.x+"px, "+t.y+"px)"},Gp={moveTo:l0,drop:function(t,n){var r=l0(t);return r?n?r+" scale("+rl.scale.drop+")":r:null}},Wp=nh.minDropTime,YN=nh.maxDropTime,x$=YN-Wp,s0=1500,b$=.6,N$=function(e){var t=e.current,n=e.destination,r=e.reason,i=el(t,n);if(i<=0)return Wp;if(i>=s0)return YN;var o=i/s0,a=Wp+x$*o,l=r==="CANCEL"?a*b$:a;return Number(l.toFixed(2))},S$=function(e){var t=e.impact,n=e.draggable,r=e.dimensions,i=e.viewport,o=e.afterCritical,a=r.draggables,l=r.droppables,s=en(t),u=s?l[s]:null,c=l[n.descriptor.droppableId],d=FN({impact:t,draggable:n,draggables:a,afterCritical:o,droppable:u||c,viewport:i}),f=Xt(d,n.client.borderBox.center);return f},D$=function(e){var t=e.draggables,n=e.reason,r=e.lastImpact,i=e.home,o=e.viewport,a=e.onLiftImpact;if(!r.at||n!=="DROP"){var l=_N({draggables:t,impact:a,destination:i,viewport:o,forceShouldAnimate:!0});return{impact:l,didDropInsideDroppable:!1}}if(r.at.type==="REORDER")return{impact:r,didDropInsideDroppable:!0};var s=le({},r,{displaced:tl});return{impact:s,didDropInsideDroppable:!0}},A$=function(e){var t=e.getState,n=e.dispatch;return function(r){return function(i){if(i.type!=="DROP"){r(i);return}var o=t(),a=i.payload.reason;if(o.phase==="COLLECTING"){n(I$({reason:a}));return}if(o.phase!=="IDLE"){var l=o.phase==="DROP_PENDING"&&o.isWaiting;l&&Q(!1),o.phase==="DRAGGING"||o.phase==="DROP_PENDING"||Q(!1);var s=o.critical,u=o.dimensions,c=u.draggables[o.critical.draggable.id],d=D$({reason:a,lastImpact:o.impact,afterCritical:o.afterCritical,onLiftImpact:o.onLiftImpact,home:o.dimensions.droppables[o.critical.droppable.id],viewport:o.viewport,draggables:o.dimensions.draggables}),f=d.impact,p=d.didDropInsideDroppable,g=p?Zg(f):null,h=p?td(f):null,w={index:s.draggable.index,droppableId:s.droppable.id},I={draggableId:c.descriptor.id,type:c.descriptor.type,source:w,reason:a,mode:o.movementMode,destination:g,combine:h},y=S$({impact:f,draggable:c,dimensions:u,viewport:o.viewport,afterCritical:o.afterCritical}),M={critical:o.critical,afterCritical:o.afterCritical,result:I,impact:f},x=!zr(o.current.client.offset,y)||!!I.combine;if(!x){n(eh({completed:M}));return}var S=N$({current:o.current.client.offset,destination:y,reason:a}),b={newHomeClientOffset:y,dropDuration:S,completed:M};n(y$(b))}}}},QN=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function C$(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(n){n.target!==window&&n.target!==window.document||e()}}}function E$(e){var t=e.onWindowScroll;function n(){t(QN())}var r=Ka(n),i=C$(r),o=kr;function a(){return o!==kr}function l(){a()&&Q(!1),o=vn(window,[i])}function s(){a()||Q(!1),r.cancel(),o(),o=kr}return{start:l,stop:s,isActive:a}}var T$=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},j$=function(e){var t=E$({onWindowScroll:function(r){e.dispatch(f$({newScroll:r}))}});return function(n){return function(r){!t.isActive()&&r.type==="INITIAL_PUBLISH"&&t.start(),t.isActive()&&T$(r)&&t.stop(),n(r)}}},L$=function(e){var t=!1,n=!1,r=setTimeout(function(){n=!0}),i=function(a){t||n||(t=!0,e(a),clearTimeout(r))};return i.wasCalled=function(){return t},i},P$=function(){var e=[],t=function(o){var a=Vg(e,function(u){return u.timerId===o});a===-1&&Q(!1);var l=e.splice(a,1),s=l[0];s.callback()},n=function(o){var a=setTimeout(function(){return t(a)}),l={timerId:a,callback:o};e.push(l)},r=function(){if(e.length){var o=[].concat(e);e.length=0,o.forEach(function(a){clearTimeout(a.timerId),a.callback()})}};return{add:n,flush:r}},R$=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.droppableId===n.droppableId&&t.index===n.index},O$=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.draggableId===n.draggableId&&t.droppableId===n.droppableId},k$=function(t,n){if(t===n)return!0;var r=t.draggable.id===n.draggable.id&&t.draggable.droppableId===n.draggable.droppableId&&t.draggable.type===n.draggable.type&&t.draggable.index===n.draggable.index,i=t.droppable.id===n.droppable.id&&t.droppable.type===n.droppable.type;return r&&i},na=function(t,n){n()},ys=function(t,n){return{draggableId:t.draggable.id,type:t.droppable.type,source:{droppableId:t.droppable.id,index:t.draggable.index},mode:n}},yf=function(t,n,r,i){if(!t){r(i(n));return}var o=L$(r),a={announce:o};t(n,a),o.wasCalled()||r(i(n))},z$=function(e,t){var n=P$(),r=null,i=function(f,p){r&&Q(!1),na("onBeforeCapture",function(){var g=e().onBeforeCapture;if(g){var h={draggableId:f,mode:p};g(h)}})},o=function(f,p){r&&Q(!1),na("onBeforeDragStart",function(){var g=e().onBeforeDragStart;g&&g(ys(f,p))})},a=function(f,p){r&&Q(!1);var g=ys(f,p);r={mode:p,lastCritical:f,lastLocation:g.source,lastCombine:null},n.add(function(){na("onDragStart",function(){return yf(e().onDragStart,g,t,$s.onDragStart)})})},l=function(f,p){var g=Zg(p),h=td(p);r||Q(!1);var w=!k$(f,r.lastCritical);w&&(r.lastCritical=f);var I=!R$(r.lastLocation,g);I&&(r.lastLocation=g);var y=!O$(r.lastCombine,h);if(y&&(r.lastCombine=h),!(!w&&!I&&!y)){var M=le({},ys(f,r.mode),{combine:h,destination:g});n.add(function(){na("onDragUpdate",function(){return yf(e().onDragUpdate,M,t,$s.onDragUpdate)})})}},s=function(){r||Q(!1),n.flush()},u=function(f){r||Q(!1),r=null,na("onDragEnd",function(){return yf(e().onDragEnd,f,t,$s.onDragEnd)})},c=function(){if(r){var f=le({},ys(r.lastCritical,r.mode),{combine:null,destination:null,reason:"CANCEL"});u(f)}};return{beforeCapture:i,beforeStart:o,start:a,update:l,flush:s,drop:u,abort:c}},B$=function(e,t){var n=z$(e,t);return function(r){return function(i){return function(o){if(o.type==="BEFORE_INITIAL_CAPTURE"){n.beforeCapture(o.payload.draggableId,o.payload.movementMode);return}if(o.type==="INITIAL_PUBLISH"){var a=o.payload.critical;n.beforeStart(a,o.payload.movementMode),i(o),n.start(a,o.payload.movementMode);return}if(o.type==="DROP_COMPLETE"){var l=o.payload.completed.result;n.flush(),i(o),n.drop(l);return}if(i(o),o.type==="FLUSH"){n.abort();return}var s=r.getState();s.phase==="DRAGGING"&&n.update(s.critical,s.impact)}}}},U$=function(e){return function(t){return function(n){if(n.type!=="DROP_ANIMATION_FINISHED"){t(n);return}var r=e.getState();r.phase!=="DROP_ANIMATING"&&Q(!1),e.dispatch(eh({completed:r.completed}))}}},$$=function(e){var t=null,n=null;function r(){n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)}return function(i){return function(o){if((o.type==="FLUSH"||o.type==="DROP_COMPLETE"||o.type==="DROP_ANIMATION_FINISHED")&&r(),i(o),o.type==="DROP_ANIMATE"){var a={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){var s=e.getState();s.phase==="DROP_ANIMATING"&&e.dispatch(ZN())}};n=requestAnimationFrame(function(){n=null,t=vn(window,[a])})}}}},_$=function(e){return function(){return function(t){return function(n){(n.type==="DROP_COMPLETE"||n.type==="FLUSH"||n.type==="DROP_ANIMATE")&&e.stopPublishing(),t(n)}}}},F$=function(e){var t=!1;return function(){return function(n){return function(r){if(r.type==="INITIAL_PUBLISH"){t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),e.tryRestoreFocusRecorded();return}if(n(r),!!t){if(r.type==="FLUSH"){t=!1,e.tryRestoreFocusRecorded();return}if(r.type==="DROP_COMPLETE"){t=!1;var i=r.payload.completed.result;i.combine&&e.tryShiftRecord(i.draggableId,i.combine.draggableId),e.tryRestoreFocusRecorded()}}}}}},H$=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},G$=function(e){return function(t){return function(n){return function(r){if(H$(r)){e.stop(),n(r);return}if(r.type==="INITIAL_PUBLISH"){n(r);var i=t.getState();i.phase!=="DRAGGING"&&Q(!1),e.start(i);return}n(r),e.scroll(t.getState())}}}},W$=function(e){return function(t){return function(n){if(t(n),n.type==="PUBLISH_WHILE_DRAGGING"){var r=e.getState();r.phase==="DROP_PENDING"&&(r.isWaiting||e.dispatch(VN({reason:r.reason})))}}}},V$=tN,Z$=function(e){var t=e.dimensionMarshal,n=e.focusMarshal,r=e.styleMarshal,i=e.getResponders,o=e.announce,a=e.autoScroller;return eN(r$,V$(LB(M$(r),_$(t),w$(t),A$,U$,$$,W$,G$(a),j$,F$(n),B$(i,o))))},If=function(){return{additions:{},removals:{},modified:{}}};function Y$(e){var t=e.registry,n=e.callbacks,r=If(),i=null,o=function(){i||(n.collectionStarting(),i=requestAnimationFrame(function(){i=null;var c=r,d=c.additions,f=c.removals,p=c.modified,g=Object.keys(d).map(function(I){return t.draggable.getById(I).getDimension(ct)}).sort(function(I,y){return I.descriptor.index-y.descriptor.index}),h=Object.keys(p).map(function(I){var y=t.droppable.getById(I),M=y.callbacks.getScrollWhileDragging();return{droppableId:I,scroll:M}}),w={additions:g,removals:Object.keys(f),modified:h};r=If(),n.publish(w)}))},a=function(c){var d=c.descriptor.id;r.additions[d]=c,r.modified[c.descriptor.droppableId]=!0,r.removals[d]&&delete r.removals[d],o()},l=function(c){var d=c.descriptor;r.removals[d.id]=!0,r.modified[d.droppableId]=!0,r.additions[d.id]&&delete r.additions[d.id],o()},s=function(){i&&(cancelAnimationFrame(i),i=null,r=If())};return{add:a,remove:l,stop:s}}var JN=function(e){var t=e.scrollHeight,n=e.scrollWidth,r=e.height,i=e.width,o=Xt({x:n,y:t},{x:i,y:r}),a={x:Math.max(0,o.x),y:Math.max(0,o.y)};return a},XN=function(){var e=document.documentElement;return e||Q(!1),e},qN=function(){var e=XN(),t=JN({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight});return t},Q$=function(){var e=QN(),t=qN(),n=e.y,r=e.x,i=XN(),o=i.clientWidth,a=i.clientHeight,l=r+o,s=n+a,u=Tn({top:n,left:r,right:l,bottom:s}),c={frame:u,scroll:{initial:e,current:e,max:t,diff:{value:ct,displacement:ct}}};return c},J$=function(e){var t=e.critical,n=e.scrollOptions,r=e.registry,i=Q$(),o=i.scroll.current,a=t.droppable,l=r.droppable.getAllByType(a.type).map(function(d){return d.callbacks.getDimensionAndWatchScroll(o,n)}),s=r.draggable.getAllByType(t.draggable.type).map(function(d){return d.getDimension(o)}),u={draggables:AN(s),droppables:DN(l)},c={dimensions:u,critical:t,viewport:i};return c};function u0(e,t,n){if(n.descriptor.id===t.id||n.descriptor.type!==t.type)return!1;var r=e.droppable.getById(n.descriptor.droppableId);return r.descriptor.mode==="virtual"}var X$=function(e,t){var n=null,r=Y$({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),i=function(p,g){e.droppable.exists(p)||Q(!1),n&&t.updateDroppableIsEnabled({id:p,isEnabled:g})},o=function(p,g){n&&(e.droppable.exists(p)||Q(!1),t.updateDroppableIsCombineEnabled({id:p,isCombineEnabled:g}))},a=function(p,g){n&&(e.droppable.exists(p)||Q(!1),t.updateDroppableScroll({id:p,newScroll:g}))},l=function(p,g){n&&e.droppable.getById(p).callbacks.scroll(g)},s=function(){if(n){r.stop();var p=n.critical.droppable;e.droppable.getAllByType(p.type).forEach(function(g){return g.callbacks.dragStopped()}),n.unsubscribe(),n=null}},u=function(p){n||Q(!1);var g=n.critical.draggable;p.type==="ADDITION"&&u0(e,g,p.value)&&r.add(p.value),p.type==="REMOVAL"&&u0(e,g,p.value)&&r.remove(p.value)},c=function(p){n&&Q(!1);var g=e.draggable.getById(p.draggableId),h=e.droppable.getById(g.descriptor.droppableId),w={draggable:g.descriptor,droppable:h.descriptor},I=e.subscribe(u);return n={critical:w,unsubscribe:I},J$({critical:w,registry:e,scrollOptions:p.scrollOptions})},d={updateDroppableIsEnabled:i,updateDroppableIsCombineEnabled:o,scrollDroppable:l,updateDroppableScroll:a,startPublishing:c,stopPublishing:s};return d},KN=function(e,t){return e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===t?!1:e.completed.result.reason==="DROP"},q$=function(e){window.scrollBy(e.x,e.y)},K$=ut(function(e){return ed(e).filter(function(t){return!(!t.isEnabled||!t.frame)})}),e_=function(t,n){var r=Jr(K$(n),function(i){return i.frame||Q(!1),zN(i.frame.pageMarginBox)(t)});return r},t_=function(e){var t=e.center,n=e.destination,r=e.droppables;if(n){var i=r[n];return i.frame?i:null}var o=e_(t,r);return o},Br={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(t){return Math.pow(t,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},n_=function(e,t){var n=e[t.size]*Br.startFromPercentage,r=e[t.size]*Br.maxScrollAtPercentage,i={startScrollingFrom:n,maxScrollValueAt:r};return i},eS=function(e){var t=e.startOfRange,n=e.endOfRange,r=e.current,i=n-t;if(i===0)return 0;var o=r-t,a=o/i;return a},rh=1,r_=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return Br.maxPixelScroll;if(e===t.startScrollingFrom)return rh;var n=eS({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),r=1-n,i=Br.maxPixelScroll*Br.ease(r);return Math.ceil(i)},c0=Br.durationDampening.accelerateAt,d0=Br.durationDampening.stopDampeningAt,i_=function(e,t){var n=t,r=d0,i=Date.now(),o=i-n;if(o>=d0)return e;if(o<c0)return rh;var a=eS({startOfRange:c0,endOfRange:r,current:o}),l=e*Br.ease(a);return Math.ceil(l)},f0=function(e){var t=e.distanceToEdge,n=e.thresholds,r=e.dragStartTime,i=e.shouldUseTimeDampening,o=r_(t,n);return o===0?0:i?Math.max(i_(o,r),rh):o},p0=function(e){var t=e.container,n=e.distanceToEdges,r=e.dragStartTime,i=e.axis,o=e.shouldUseTimeDampening,a=n_(t,i),l=n[i.end]<n[i.start];return l?f0({distanceToEdge:n[i.end],thresholds:a,dragStartTime:r,shouldUseTimeDampening:o}):-1*f0({distanceToEdge:n[i.start],thresholds:a,dragStartTime:r,shouldUseTimeDampening:o})},o_=function(e){var t=e.container,n=e.subject,r=e.proposedScroll,i=n.height>t.height,o=n.width>t.width;return!o&&!i?r:o&&i?null:{x:o?0:r.x,y:i?0:r.y}},a_=NN(function(e){return e===0?0:e}),tS=function(e){var t=e.dragStartTime,n=e.container,r=e.subject,i=e.center,o=e.shouldUseTimeDampening,a={top:i.y-n.top,right:n.right-i.x,bottom:n.bottom-i.y,left:i.x-n.left},l=p0({container:n,distanceToEdges:a,dragStartTime:t,axis:Yg,shouldUseTimeDampening:o}),s=p0({container:n,distanceToEdges:a,dragStartTime:t,axis:TN,shouldUseTimeDampening:o}),u=a_({x:s,y:l});if(zr(u,ct))return null;var c=o_({container:n,subject:r,proposedScroll:u});return c?zr(c,ct)?null:c:null},l_=NN(function(e){return e===0?0:e>0?1:-1}),ih=function(){var e=function(n,r){return n<0?n:n>r?n-r:0};return function(t){var n=t.current,r=t.max,i=t.change,o=vt(n,i),a={x:e(o.x,r.x),y:e(o.y,r.y)};return zr(a,ct)?null:a}}(),nS=function(t){var n=t.max,r=t.current,i=t.change,o={x:Math.max(r.x,n.x),y:Math.max(r.y,n.y)},a=l_(i),l=ih({max:o,current:r,change:a});return!l||a.x!==0&&l.x===0||a.y!==0&&l.y===0},oh=function(t,n){return nS({current:t.scroll.current,max:t.scroll.max,change:n})},s_=function(t,n){if(!oh(t,n))return null;var r=t.scroll.max,i=t.scroll.current;return ih({current:i,max:r,change:n})},ah=function(t,n){var r=t.frame;return r?nS({current:r.scroll.current,max:r.scroll.max,change:n}):!1},u_=function(t,n){var r=t.frame;return!r||!ah(t,n)?null:ih({current:r.scroll.current,max:r.scroll.max,change:n})},c_=function(e){var t=e.viewport,n=e.subject,r=e.center,i=e.dragStartTime,o=e.shouldUseTimeDampening,a=tS({dragStartTime:i,container:t.frame,subject:n,center:r,shouldUseTimeDampening:o});return a&&oh(t,a)?a:null},d_=function(e){var t=e.droppable,n=e.subject,r=e.center,i=e.dragStartTime,o=e.shouldUseTimeDampening,a=t.frame;if(!a)return null;var l=tS({dragStartTime:i,container:a.pageMarginBox,subject:n,center:r,shouldUseTimeDampening:o});return l&&ah(t,l)?l:null},m0=function(e){var t=e.state,n=e.dragStartTime,r=e.shouldUseTimeDampening,i=e.scrollWindow,o=e.scrollDroppable,a=t.current.page.borderBoxCenter,l=t.dimensions.draggables[t.critical.draggable.id],s=l.page.marginBox;if(t.isWindowScrollAllowed){var u=t.viewport,c=c_({dragStartTime:n,viewport:u,subject:s,center:a,shouldUseTimeDampening:r});if(c){i(c);return}}var d=t_({center:a,destination:en(t.impact),droppables:t.dimensions.droppables});if(d){var f=d_({dragStartTime:n,droppable:d,subject:s,center:a,shouldUseTimeDampening:r});f&&o(d.descriptor.id,f)}},f_=function(e){var t=e.scrollWindow,n=e.scrollDroppable,r=Ka(t),i=Ka(n),o=null,a=function(c){o||Q(!1);var d=o,f=d.shouldUseTimeDampening,p=d.dragStartTime;m0({state:c,scrollWindow:r,scrollDroppable:i,dragStartTime:p,shouldUseTimeDampening:f})},l=function(c){o&&Q(!1);var d=Date.now(),f=!1,p=function(){f=!0};m0({state:c,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:p,scrollDroppable:p}),o={dragStartTime:d,shouldUseTimeDampening:f},f&&a(c)},s=function(){o&&(r.cancel(),i.cancel(),o=null)};return{start:l,stop:s,scroll:a}},p_=function(e){var t=e.move,n=e.scrollDroppable,r=e.scrollWindow,i=function(u,c){var d=vt(u.current.client.selection,c);t({client:d})},o=function(u,c){if(!ah(u,c))return c;var d=u_(u,c);if(!d)return n(u.descriptor.id,c),null;var f=Xt(c,d);n(u.descriptor.id,f);var p=Xt(c,f);return p},a=function(u,c,d){if(!u||!oh(c,d))return d;var f=s_(c,d);if(!f)return r(d),null;var p=Xt(d,f);r(p);var g=Xt(d,p);return g},l=function(u){var c=u.scrollJumpRequest;if(c){var d=en(u.impact);d||Q(!1);var f=o(u.dimensions.droppables[d],c);if(f){var p=u.viewport,g=a(u.isWindowScrollAllowed,p,f);g&&i(u,g)}}};return l},m_=function(e){var t=e.scrollDroppable,n=e.scrollWindow,r=e.move,i=f_({scrollWindow:n,scrollDroppable:t}),o=p_({move:r,scrollWindow:n,scrollDroppable:t}),a=function(u){if(u.phase==="DRAGGING"){if(u.movementMode==="FLUID"){i.scroll(u);return}u.scrollJumpRequest&&o(u)}},l={scroll:a,start:i.start,stop:i.stop};return l},bo="data-rbd",No=function(){var e=bo+"-drag-handle";return{base:e,draggableId:e+"-draggable-id",contextId:e+"-context-id"}}(),Vp=function(){var e=bo+"-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),g_=function(){var e=bo+"-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),g0={contextId:bo+"-scroll-container-context-id"},h_=function(t){return function(n){return"["+n+'="'+t+'"]'}},ra=function(t,n){return t.map(function(r){var i=r.styles[n];return i?r.selector+" { "+i+" }":""}).join(" ")},v_="pointer-events: none;",y_=function(e){var t=h_(e),n=function(){var l=`
147
147
  cursor: -webkit-grab;
148
148
  cursor: grab;
149
- `;return{selector:t(So.contextId),styles:{always:`
149
+ `;return{selector:t(No.contextId),styles:{always:`
150
150
  -webkit-touch-callout: none;
151
151
  -webkit-tap-highlight-color: rgba(0,0,0,0);
152
152
  touch-action: manipulation;
@@ -160,12 +160,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
160
160
  -moz-user-select: none;
161
161
  -ms-user-select: none;
162
162
  overflow-anchor: none;
163
- `}},a=[r,n,i,o];return{always:ra(a,"always"),resting:ra(a,"resting"),dragging:ra(a,"dragging"),dropAnimating:ra(a,"dropAnimating"),userCancel:ra(a,"userCancel")}},tn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?v.useLayoutEffect:v.useEffect,wf=function(){var t=document.querySelector("head");return t||Q(!1),t},h0=function(t){var n=document.createElement("style");return t&&n.setAttribute("nonce",t),n.type="text/css",n};function I_(e,t){var n=we(function(){return y_(e)},[e]),r=v.useRef(null),i=v.useRef(null),o=oe(ut(function(d){var f=i.current;f||Q(!1),f.textContent=d}),[]),a=oe(function(d){var f=r.current;f||Q(!1),f.textContent=d},[]);tn(function(){!r.current&&!i.current||Q(!1);var d=h0(t),f=h0(t);return r.current=d,i.current=f,d.setAttribute(Mo+"-always",e),f.setAttribute(Mo+"-dynamic",e),wf().appendChild(d),wf().appendChild(f),a(n.always),o(n.resting),function(){var p=function(h){var w=h.current;w||Q(!1),wf().removeChild(w),h.current=null};p(r),p(i)}},[t,a,o,n.always,n.resting,e]);var l=oe(function(){return o(n.dragging)},[o,n.dragging]),s=oe(function(d){if(d==="DROP"){o(n.dropAnimating);return}o(n.userCancel)},[o,n.dropAnimating,n.userCancel]),u=oe(function(){i.current&&o(n.resting)},[o,n.resting]),c=we(function(){return{dragging:l,dropping:s,resting:u}},[l,s,u]);return c}var rN=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function id(e){return e instanceof rN(e).HTMLElement}function w_(e,t){var n="["+So.contextId+'="'+e+'"]',r=NS(document.querySelectorAll(n));if(!r.length)return null;var i=Jr(r,function(o){return o.getAttribute(So.draggableId)===t});return!i||!id(i)?null:i}function b_(e){var t=v.useRef({}),n=v.useRef(null),r=v.useRef(null),i=v.useRef(!1),o=oe(function(f,p){var g={id:f,focus:p};return t.current[f]=g,function(){var w=t.current,I=w[f];I!==g&&delete w[f]}},[]),a=oe(function(f){var p=w_(e,f);p&&p!==document.activeElement&&p.focus()},[e]),l=oe(function(f,p){n.current===f&&(n.current=p)},[]),s=oe(function(){r.current||i.current&&(r.current=requestAnimationFrame(function(){r.current=null;var f=n.current;f&&a(f)}))},[a]),u=oe(function(f){n.current=null;var p=document.activeElement;p&&p.getAttribute(So.draggableId)===f&&(n.current=f)},[]);tn(function(){return i.current=!0,function(){i.current=!1;var f=r.current;f&&cancelAnimationFrame(f)}},[]);var c=we(function(){return{register:o,tryRecordFocus:u,tryRestoreFocusRecorded:s,tryShiftRecord:l}},[o,u,s,l]);return c}function x_(){var e={draggables:{},droppables:{}},t=[];function n(d){return t.push(d),function(){var p=t.indexOf(d);p!==-1&&t.splice(p,1)}}function r(d){t.length&&t.forEach(function(f){return f(d)})}function i(d){return e.draggables[d]||null}function o(d){var f=i(d);return f||Q(!1),f}var a={register:function(f){e.draggables[f.descriptor.id]=f,r({type:"ADDITION",value:f})},update:function(f,p){var g=e.draggables[p.descriptor.id];g&&g.uniqueId===f.uniqueId&&(delete e.draggables[p.descriptor.id],e.draggables[f.descriptor.id]=f)},unregister:function(f){var p=f.descriptor.id,g=i(p);g&&f.uniqueId===g.uniqueId&&(delete e.draggables[p],r({type:"REMOVAL",value:f}))},getById:o,findById:i,exists:function(f){return!!i(f)},getAllByType:function(f){return Lu(e.draggables).filter(function(p){return p.descriptor.type===f})}};function l(d){return e.droppables[d]||null}function s(d){var f=l(d);return f||Q(!1),f}var u={register:function(f){e.droppables[f.descriptor.id]=f},unregister:function(f){var p=l(f.descriptor.id);p&&f.uniqueId===p.uniqueId&&delete e.droppables[f.descriptor.id]},getById:s,findById:l,exists:function(f){return!!l(f)},getAllByType:function(f){return Lu(e.droppables).filter(function(p){return p.descriptor.type===f})}};function c(){e.draggables={},e.droppables={},t.length=0}return{draggable:a,droppable:u,subscribe:n,clean:c}}function M_(){var e=we(x_,[]);return v.useEffect(function(){return function(){requestAnimationFrame(e.clean)}},[e]),e}var lh=k.createContext(null),Ou=function(){var e=document.body;return e||Q(!1),e},S_={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},N_=function(t){return"rbd-announcement-"+t};function D_(e){var t=we(function(){return N_(e)},[e]),n=v.useRef(null);v.useEffect(function(){var o=document.createElement("div");return n.current=o,o.id=t,o.setAttribute("aria-live","assertive"),o.setAttribute("aria-atomic","true"),le(o.style,S_),Ou().appendChild(o),function(){setTimeout(function(){var s=Ou();s.contains(o)&&s.removeChild(o),o===n.current&&(n.current=null)})}},[t]);var r=oe(function(i){var o=n.current;if(o){o.textContent=i;return}},[]);return r}var A_=0,C_={separator:"::"};function sh(e,t){return t===void 0&&(t=C_),we(function(){return""+e+t.separator+A_++},[t.separator,e])}function E_(e){var t=e.contextId,n=e.uniqueId;return"rbd-hidden-text-"+t+"-"+n}function T_(e){var t=e.contextId,n=e.text,r=sh("hidden-text",{separator:"-"}),i=we(function(){return E_({contextId:t,uniqueId:r})},[r,t]);return v.useEffect(function(){var a=document.createElement("div");return a.id=i,a.textContent=n,a.style.display="none",Ou().appendChild(a),function(){var s=Ou();s.contains(a)&&s.removeChild(a)}},[i,n]),i}var od=k.createContext(null);function iN(e){var t=v.useRef(e);return v.useEffect(function(){t.current=e}),t}function j_(){var e=null;function t(){return!!e}function n(a){return a===e}function r(a){e&&Q(!1);var l={abandon:a};return e=l,l}function i(){e||Q(!1),e=null}function o(){e&&(e.abandon(),i())}return{isClaimed:t,isActive:n,claim:r,release:i,tryAbandon:o}}var P_=9,L_=13,uh=27,oN=32,R_=33,O_=34,k_=35,z_=36,B_=37,U_=38,$_=39,__=40,Is,F_=(Is={},Is[L_]=!0,Is[P_]=!0,Is),aN=function(e){F_[e.keyCode]&&e.preventDefault()},ad=function(){var e="visibilitychange";if(typeof document>"u")return e;var t=[e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],n=Jr(t,function(r){return"on"+r in document});return n||e}(),lN=0,v0=5;function H_(e,t){return Math.abs(t.x-e.x)>=v0||Math.abs(t.y-e.y)>=v0}var y0={type:"IDLE"};function W_(e){var t=e.cancel,n=e.completed,r=e.getPhase,i=e.setPhase;return[{eventName:"mousemove",fn:function(a){var l=a.button,s=a.clientX,u=a.clientY;if(l===lN){var c={x:s,y:u},d=r();if(d.type==="DRAGGING"){a.preventDefault(),d.actions.move(c);return}d.type!=="PENDING"&&Q(!1);var f=d.point;if(H_(f,c)){a.preventDefault();var p=d.actions.fluidLift(c);i({type:"DRAGGING",actions:p})}}}},{eventName:"mouseup",fn:function(a){var l=r();if(l.type!=="DRAGGING"){t();return}a.preventDefault(),l.actions.drop({shouldBlockNextClick:!0}),n()}},{eventName:"mousedown",fn:function(a){r().type==="DRAGGING"&&a.preventDefault(),t()}},{eventName:"keydown",fn:function(a){var l=r();if(l.type==="PENDING"){t();return}if(a.keyCode===uh){a.preventDefault(),t();return}aN(a)}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){r().type==="PENDING"&&t()}},{eventName:"webkitmouseforcedown",fn:function(a){var l=r();if(l.type==="IDLE"&&Q(!1),l.actions.shouldRespectForcePress()){t();return}a.preventDefault()}},{eventName:ad,fn:t}]}function G_(e){var t=v.useRef(y0),n=v.useRef(kr),r=we(function(){return{eventName:"mousedown",fn:function(d){if(!d.defaultPrevented&&d.button===lN&&!(d.ctrlKey||d.metaKey||d.shiftKey||d.altKey)){var f=e.findClosestDraggableId(d);if(f){var p=e.tryGetLock(f,a,{sourceEvent:d});if(p){d.preventDefault();var g={x:d.clientX,y:d.clientY};n.current(),u(p,g)}}}}}},[e]),i=we(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(d){if(!d.defaultPrevented){var f=e.findClosestDraggableId(d);if(f){var p=e.findOptionsForDraggable(f);p&&(p.shouldRespectForcePress||e.canGetLock(f)&&d.preventDefault())}}}}},[e]),o=oe(function(){var d={passive:!1,capture:!0};n.current=vn(window,[i,r],d)},[i,r]),a=oe(function(){var c=t.current;c.type!=="IDLE"&&(t.current=y0,n.current(),o())},[o]),l=oe(function(){var c=t.current;a(),c.type==="DRAGGING"&&c.actions.cancel({shouldBlockNextClick:!0}),c.type==="PENDING"&&c.actions.abort()},[a]),s=oe(function(){var d={capture:!0,passive:!1},f=W_({cancel:l,completed:a,getPhase:function(){return t.current},setPhase:function(g){t.current=g}});n.current=vn(window,f,d)},[l,a]),u=oe(function(d,f){t.current.type!=="IDLE"&&Q(!1),t.current={type:"PENDING",point:f,actions:d},s()},[s]);tn(function(){return o(),function(){n.current()}},[o])}var ki;function V_(){}var Z_=(ki={},ki[O_]=!0,ki[R_]=!0,ki[z_]=!0,ki[k_]=!0,ki);function Y_(e,t){function n(){t(),e.cancel()}function r(){t(),e.drop()}return[{eventName:"keydown",fn:function(o){if(o.keyCode===uh){o.preventDefault(),n();return}if(o.keyCode===oN){o.preventDefault(),r();return}if(o.keyCode===__){o.preventDefault(),e.moveDown();return}if(o.keyCode===U_){o.preventDefault(),e.moveUp();return}if(o.keyCode===$_){o.preventDefault(),e.moveRight();return}if(o.keyCode===B_){o.preventDefault(),e.moveLeft();return}if(Z_[o.keyCode]){o.preventDefault();return}aN(o)}},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:ad,fn:n}]}function Q_(e){var t=v.useRef(V_),n=we(function(){return{eventName:"keydown",fn:function(o){if(o.defaultPrevented||o.keyCode!==oN)return;var a=e.findClosestDraggableId(o);if(!a)return;var l=e.tryGetLock(a,c,{sourceEvent:o});if(!l)return;o.preventDefault();var s=!0,u=l.snapLift();t.current();function c(){s||Q(!1),s=!1,t.current(),r()}t.current=vn(window,Y_(u,c),{capture:!0,passive:!1})}}},[e]),r=oe(function(){var o={passive:!1,capture:!0};t.current=vn(window,[n],o)},[n]);tn(function(){return r(),function(){t.current()}},[r])}var bf={type:"IDLE"},J_=120,X_=.15;function q_(e){var t=e.cancel,n=e.getPhase;return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:function(i){i.preventDefault()}},{eventName:"keydown",fn:function(i){if(n().type!=="DRAGGING"){t();return}i.keyCode===uh&&i.preventDefault(),t()}},{eventName:ad,fn:t}]}function K_(e){var t=e.cancel,n=e.completed,r=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(o){var a=r();if(a.type!=="DRAGGING"){t();return}a.hasMoved=!0;var l=o.touches[0],s=l.clientX,u=l.clientY,c={x:s,y:u};o.preventDefault(),a.actions.move(c)}},{eventName:"touchend",fn:function(o){var a=r();if(a.type!=="DRAGGING"){t();return}o.preventDefault(),a.actions.drop({shouldBlockNextClick:!0}),n()}},{eventName:"touchcancel",fn:function(o){if(r().type!=="DRAGGING"){t();return}o.preventDefault(),t()}},{eventName:"touchforcechange",fn:function(o){var a=r();a.type==="IDLE"&&Q(!1);var l=o.touches[0];if(l){var s=l.force>=X_;if(s){var u=a.actions.shouldRespectForcePress();if(a.type==="PENDING"){u&&t();return}if(u){if(a.hasMoved){o.preventDefault();return}t();return}o.preventDefault()}}}},{eventName:ad,fn:t}]}function eF(e){var t=v.useRef(bf),n=v.useRef(kr),r=oe(function(){return t.current},[]),i=oe(function(p){t.current=p},[]),o=we(function(){return{eventName:"touchstart",fn:function(p){if(!p.defaultPrevented){var g=e.findClosestDraggableId(p);if(g){var h=e.tryGetLock(g,l,{sourceEvent:p});if(h){var w=p.touches[0],I=w.clientX,y=w.clientY,b={x:I,y};n.current(),d(h,b)}}}}}},[e]),a=oe(function(){var p={capture:!0,passive:!1};n.current=vn(window,[o],p)},[o]),l=oe(function(){var f=t.current;f.type!=="IDLE"&&(f.type==="PENDING"&&clearTimeout(f.longPressTimerId),i(bf),n.current(),a())},[a,i]),s=oe(function(){var f=t.current;l(),f.type==="DRAGGING"&&f.actions.cancel({shouldBlockNextClick:!0}),f.type==="PENDING"&&f.actions.abort()},[l]),u=oe(function(){var p={capture:!0,passive:!1},g={cancel:s,completed:l,getPhase:r},h=vn(window,K_(g),p),w=vn(window,q_(g),p);n.current=function(){h(),w()}},[s,r,l]),c=oe(function(){var p=r();p.type!=="PENDING"&&Q(!1);var g=p.actions.fluidLift(p.point);i({type:"DRAGGING",actions:g,hasMoved:!1})},[r,i]),d=oe(function(p,g){r().type!=="IDLE"&&Q(!1);var h=setTimeout(c,J_);i({type:"PENDING",point:g,actions:p,longPressTimerId:h}),u()},[u,r,i,c]);tn(function(){return a(),function(){n.current();var g=r();g.type==="PENDING"&&(clearTimeout(g.longPressTimerId),i(bf))}},[r,a,i]),tn(function(){var p=vn(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return p},[])}var tF={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function sN(e,t){if(t==null)return!1;var n=!!tF[t.tagName.toLowerCase()];if(n)return!0;var r=t.getAttribute("contenteditable");return r==="true"||r===""?!0:t===e?!1:sN(e,t.parentElement)}function nF(e,t){var n=t.target;return id(n)?sN(e,n):!1}var rF=function(e){return Tn(e.getBoundingClientRect()).center};function iF(e){return e instanceof rN(e).Element}var oF=function(){var e="matches";if(typeof document>"u")return e;var t=[e,"msMatchesSelector","webkitMatchesSelector"],n=Jr(t,function(r){return r in Element.prototype});return n||e}();function uN(e,t){return e==null?null:e[oF](t)?e:uN(e.parentElement,t)}function aF(e,t){return e.closest?e.closest(t):uN(e,t)}function lF(e){return"["+So.contextId+'="'+e+'"]'}function sF(e,t){var n=t.target;if(!iF(n))return null;var r=lF(e),i=aF(n,r);return!i||!id(i)?null:i}function uF(e,t){var n=sF(e,t);return n?n.getAttribute(So.draggableId):null}function cF(e,t){var n="["+Vp.contextId+'="'+e+'"]',r=NS(document.querySelectorAll(n)),i=Jr(r,function(o){return o.getAttribute(Vp.id)===t});return!i||!id(i)?null:i}function dF(e){e.preventDefault()}function ws(e){var t=e.expected,n=e.phase,r=e.isLockActive;return e.shouldWarn,!(!r()||t!==n)}function cN(e){var t=e.lockAPI,n=e.store,r=e.registry,i=e.draggableId;if(t.isClaimed())return!1;var o=r.draggable.findById(i);return!(!o||!o.options.isEnabled||!KS(n.getState(),i))}function fF(e){var t=e.lockAPI,n=e.contextId,r=e.store,i=e.registry,o=e.draggableId,a=e.forceSensorStop,l=e.sourceEvent,s=cN({lockAPI:t,store:r,registry:i,draggableId:o});if(!s)return null;var u=i.draggable.getById(o),c=cF(n,u.descriptor.id);if(!c||l&&!u.options.canDragInteractiveElements&&nF(c,l))return null;var d=t.claim(a||kr),f="PRE_DRAG";function p(){return u.options.shouldRespectForcePress}function g(){return t.isActive(d)}function h(M,S){ws({expected:M,phase:f,isLockActive:g,shouldWarn:!0})&&r.dispatch(S())}var w=h.bind(null,"DRAGGING");function I(M){function S(){t.release(),f="COMPLETED"}f!=="PRE_DRAG"&&(S(),f!=="PRE_DRAG"&&Q(!1)),r.dispatch(o$(M.liftActionArgs)),f="DRAGGING";function C(L,R){if(R===void 0&&(R={shouldBlockNextClick:!1}),M.cleanup(),R.shouldBlockNextClick){var O=vn(window,[{eventName:"click",fn:dF,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(O)}S(),r.dispatch(VS({reason:L}))}return le({isActive:function(){return ws({expected:"DRAGGING",phase:f,isLockActive:g,shouldWarn:!1})},shouldRespectForcePress:p,drop:function(R){return C("DROP",R)},cancel:function(R){return C("CANCEL",R)}},M.actions)}function y(M){var S=Ka(function(L){w(function(){return GS({client:L})})}),C=I({liftActionArgs:{id:o,clientSelection:M,movementMode:"FLUID"},cleanup:function(){return S.cancel()},actions:{move:S}});return le({},C,{move:S})}function b(){var M={moveUp:function(){return w(m$)},moveRight:function(){return w(h$)},moveDown:function(){return w(g$)},moveLeft:function(){return w(v$)}};return I({liftActionArgs:{id:o,clientSelection:rF(c),movementMode:"SNAP"},cleanup:kr,actions:M})}function x(){var M=ws({expected:"PRE_DRAG",phase:f,isLockActive:g,shouldWarn:!0});M&&t.release()}var N={isActive:function(){return ws({expected:"PRE_DRAG",phase:f,isLockActive:g,shouldWarn:!1})},shouldRespectForcePress:p,fluidLift:y,snapLift:b,abort:x};return N}var pF=[G_,Q_,eF];function mF(e){var t=e.contextId,n=e.store,r=e.registry,i=e.customSensors,o=e.enableDefaultSensors,a=[].concat(o?pF:[],i||[]),l=v.useState(function(){return j_()})[0],s=oe(function(y,b){y.isDragging&&!b.isDragging&&l.tryAbandon()},[l]);tn(function(){var y=n.getState(),b=n.subscribe(function(){var x=n.getState();s(y,x),y=x});return b},[l,n,s]),tn(function(){return l.tryAbandon},[l.tryAbandon]);for(var u=oe(function(I){return cN({lockAPI:l,registry:r,store:n,draggableId:I})},[l,r,n]),c=oe(function(I,y,b){return fF({lockAPI:l,registry:r,contextId:t,store:n,draggableId:I,forceSensorStop:y,sourceEvent:b&&b.sourceEvent?b.sourceEvent:null})},[t,l,r,n]),d=oe(function(I){return uF(t,I)},[t]),f=oe(function(I){var y=r.draggable.findById(I);return y?y.options:null},[r.draggable]),p=oe(function(){l.isClaimed()&&(l.tryAbandon(),n.getState().phase!=="IDLE"&&n.dispatch(Kg()))},[l,n]),g=oe(l.isClaimed,[l]),h=we(function(){return{canGetLock:u,tryGetLock:c,findClosestDraggableId:d,findOptionsForDraggable:f,tryReleaseLock:p,isLockClaimed:g}},[u,c,d,f,p,g]),w=0;w<a.length;w++)a[w](h)}var gF=function(t){return{onBeforeCapture:t.onBeforeCapture,onBeforeDragStart:t.onBeforeDragStart,onDragStart:t.onDragStart,onDragEnd:t.onDragEnd,onDragUpdate:t.onDragUpdate}};function ia(e){return e.current||Q(!1),e.current}function hF(e){var t=e.contextId,n=e.setCallbacks,r=e.sensors,i=e.nonce,o=e.dragHandleUsageInstructions,a=v.useRef(null),l=iN(e),s=oe(function(){return gF(l.current)},[l]),u=D_(t),c=T_({contextId:t,text:o}),d=I_(t,i),f=oe(function(L){ia(a).dispatch(L)},[]),p=we(function(){return _y({publishWhileDragging:l$,updateDroppableScroll:u$,updateDroppableIsEnabled:c$,updateDroppableIsCombineEnabled:d$,collectionStarting:s$},f)},[f]),g=M_(),h=we(function(){return X$(g,p)},[g,p]),w=we(function(){return m_(le({scrollWindow:q$,scrollDroppable:h.scrollDroppable},_y({move:GS},f)))},[h.scrollDroppable,f]),I=b_(t),y=we(function(){return Z$({announce:u,autoScroller:w,dimensionMarshal:h,focusMarshal:I,getResponders:s,styleMarshal:d})},[u,w,h,I,s,d]);a.current=y;var b=oe(function(){var L=ia(a),R=L.getState();R.phase!=="IDLE"&&L.dispatch(Kg())},[]),x=oe(function(){var L=ia(a).getState();return L.isDragging||L.phase==="DROP_ANIMATING"},[]),N=we(function(){return{isDragging:x,tryAbort:b}},[x,b]);n(N);var M=oe(function(L){return KS(ia(a).getState(),L)},[]),S=oe(function(){return ni(ia(a).getState())},[]),C=we(function(){return{marshal:h,focus:I,contextId:t,canLift:M,isMovementAllowed:S,dragHandleUsageInstructionsId:c,registry:g}},[t,h,c,I,M,S,g]);return mF({contextId:t,store:y,registry:g,customSensors:r,enableDefaultSensors:e.enableDefaultSensors!==!1}),v.useEffect(function(){return b},[b]),k.createElement(od.Provider,{value:C},k.createElement(zB,{context:lh,store:y},e.children))}var vF=0;function yF(){return we(function(){return""+vF++},[])}function IF(e){var t=yF(),n=e.dragHandleUsageInstructions||$s.dragHandleUsageInstructions;return k.createElement(QU,null,function(r){return k.createElement(hF,{nonce:e.nonce,contextId:t,setCallbacks:r,dragHandleUsageInstructions:n,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd},e.children)})}var dN=function(t){return function(n){return t===n}},wF=dN("scroll"),bF=dN("auto"),I0=function(t,n){return n(t.overflowX)||n(t.overflowY)},xF=function(t){var n=window.getComputedStyle(t),r={overflowX:n.overflowX,overflowY:n.overflowY};return I0(r,wF)||I0(r,bF)},MF=function(){return!1},SF=function e(t){return t==null?null:t===document.body?MF()?t:null:t===document.documentElement?null:xF(t)?t:e(t.parentElement)},Zp=function(e){return{x:e.scrollLeft,y:e.scrollTop}},NF=function e(t){if(!t)return!1;var n=window.getComputedStyle(t);return n.position==="fixed"?!0:e(t.parentElement)},DF=function(e){var t=SF(e),n=NF(e);return{closestScrollable:t,isFixedOnPage:n}},AF=function(e){var t=e.descriptor,n=e.isEnabled,r=e.isCombineEnabled,i=e.isFixedOnPage,o=e.direction,a=e.client,l=e.page,s=e.closest,u=function(){if(!s)return null;var p=s.scrollSize,g=s.client,h=JS({scrollHeight:p.scrollHeight,scrollWidth:p.scrollWidth,height:g.paddingBox.height,width:g.paddingBox.width});return{pageMarginBox:s.page.marginBox,frameClient:g,scrollSize:p,shouldClipSubject:s.shouldClipSubject,scroll:{initial:s.scroll,current:s.scroll,max:h,diff:{value:ct,displacement:ct}}}}(),c=o==="vertical"?Yg:TS,d=xo({page:l,withPlaceholder:null,axis:c,frame:u}),f={descriptor:t,isCombineEnabled:r,isFixedOnPage:i,axis:c,isEnabled:n,client:a,page:l,frame:u,subject:d};return f},CF=function(t,n){var r=wS(t);if(!n||t!==n)return r;var i=r.paddingBox.top-n.scrollTop,o=r.paddingBox.left-n.scrollLeft,a=i+n.scrollHeight,l=o+n.scrollWidth,s={top:i,right:l,bottom:a,left:o},u=Hg(s,r.border),c=Wg({borderBox:u,margin:r.margin,border:r.border,padding:r.padding});return c},EF=function(e){var t=e.ref,n=e.descriptor,r=e.env,i=e.windowScroll,o=e.direction,a=e.isDropDisabled,l=e.isCombineEnabled,s=e.shouldClipSubject,u=r.closestScrollable,c=CF(t,u),d=Tu(c,i),f=function(){if(!u)return null;var g=wS(u),h={scrollHeight:u.scrollHeight,scrollWidth:u.scrollWidth};return{client:g,page:Tu(g,i),scroll:Zp(u),scrollSize:h,shouldClipSubject:s}}(),p=AF({descriptor:n,isEnabled:!a,isCombineEnabled:l,isFixedOnPage:r.isFixedOnPage,direction:o,client:c,page:d,closest:f});return p},TF={passive:!1},jF={passive:!0},w0=function(e){return e.shouldPublishImmediately?TF:jF};function ku(e){var t=v.useContext(e);return t||Q(!1),t}var bs=function(t){return t&&t.env.closestScrollable||null};function PF(e){var t=v.useRef(null),n=ku(od),r=sh("droppable"),i=n.registry,o=n.marshal,a=iN(e),l=we(function(){return{id:e.droppableId,type:e.type,mode:e.mode}},[e.droppableId,e.mode,e.type]),s=v.useRef(l),u=we(function(){return ut(function(x,N){t.current||Q(!1);var M={x,y:N};o.updateDroppableScroll(l.id,M)})},[l.id,o]),c=oe(function(){var x=t.current;return!x||!x.env.closestScrollable?ct:Zp(x.env.closestScrollable)},[]),d=oe(function(){var x=c();u(x.x,x.y)},[c,u]),f=we(function(){return Ka(d)},[d]),p=oe(function(){var x=t.current,N=bs(x);x&&N||Q(!1);var M=x.scrollOptions;if(M.shouldPublishImmediately){d();return}f()},[f,d]),g=oe(function(x,N){t.current&&Q(!1);var M=a.current,S=M.getDroppableRef();S||Q(!1);var C=DF(S),L={ref:S,descriptor:l,env:C,scrollOptions:N};t.current=L;var R=EF({ref:S,descriptor:l,env:C,windowScroll:x,direction:M.direction,isDropDisabled:M.isDropDisabled,isCombineEnabled:M.isCombineEnabled,shouldClipSubject:!M.ignoreContainerClipping}),O=C.closestScrollable;return O&&(O.setAttribute(g0.contextId,n.contextId),O.addEventListener("scroll",p,w0(L.scrollOptions))),R},[n.contextId,l,p,a]),h=oe(function(){var x=t.current,N=bs(x);return x&&N||Q(!1),Zp(N)},[]),w=oe(function(){var x=t.current;x||Q(!1);var N=bs(x);t.current=null,N&&(f.cancel(),N.removeAttribute(g0.contextId),N.removeEventListener("scroll",p,w0(x.scrollOptions)))},[p,f]),I=oe(function(x){var N=t.current;N||Q(!1);var M=bs(N);M||Q(!1),M.scrollTop+=x.y,M.scrollLeft+=x.x},[]),y=we(function(){return{getDimensionAndWatchScroll:g,getScrollWhileDragging:h,dragStopped:w,scroll:I}},[w,g,h,I]),b=we(function(){return{uniqueId:r,descriptor:l,callbacks:y}},[y,l,r]);tn(function(){return s.current=b.descriptor,i.droppable.register(b),function(){t.current&&w(),i.droppable.unregister(b)}},[y,l,w,b,o,i.droppable]),tn(function(){t.current&&o.updateDroppableIsEnabled(s.current.id,!e.isDropDisabled)},[e.isDropDisabled,o]),tn(function(){t.current&&o.updateDroppableIsCombineEnabled(s.current.id,e.isCombineEnabled)},[e.isCombineEnabled,o])}function xf(){}var b0={width:0,height:0,margin:t5},LF=function(t){var n=t.isAnimatingOpenOnMount,r=t.placeholder,i=t.animate;return n||i==="close"?b0:{height:r.client.borderBox.height,width:r.client.borderBox.width,margin:r.client.margin}},RF=function(t){var n=t.isAnimatingOpenOnMount,r=t.placeholder,i=t.animate,o=LF({isAnimatingOpenOnMount:n,placeholder:r,animate:i});return{display:r.display,boxSizing:"border-box",width:o.width,height:o.height,marginTop:o.margin.top,marginRight:o.margin.right,marginBottom:o.margin.bottom,marginLeft:o.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:i!=="none"?Ta.placeholder:null}};function OF(e){var t=v.useRef(null),n=oe(function(){t.current&&(clearTimeout(t.current),t.current=null)},[]),r=e.animate,i=e.onTransitionEnd,o=e.onClose,a=e.contextId,l=v.useState(e.animate==="open"),s=l[0],u=l[1];v.useEffect(function(){return s?r!=="open"?(n(),u(!1),xf):t.current?xf:(t.current=setTimeout(function(){t.current=null,u(!1)}),n):xf},[r,s,n]);var c=oe(function(f){f.propertyName==="height"&&(i(),r==="close"&&o())},[r,o,i]),d=RF({isAnimatingOpenOnMount:s,animate:e.animate,placeholder:e.placeholder});return k.createElement(e.placeholder.tagName,{style:d,"data-rbd-placeholder-context-id":a,onTransitionEnd:c,ref:e.innerRef})}var kF=k.memo(OF),ch=k.createContext(null),zF=function(e){KM(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return r=e.call.apply(e,[this].concat(o))||this,r.state={isVisible:!!r.props.on,data:r.props.on,animate:r.props.shouldAnimate&&r.props.on?"open":"none"},r.onClose=function(){r.state.animate==="close"&&r.setState({isVisible:!1})},r}t.getDerivedStateFromProps=function(i,o){return i.shouldAnimate?i.on?{isVisible:!0,data:i.on,animate:"open"}:o.isVisible?{isVisible:!0,data:o.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!i.on,data:i.on,animate:"none"}};var n=t.prototype;return n.render=function(){if(!this.state.isVisible)return null;var i={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(i)},t}(k.PureComponent),x0={dragging:5e3,dropAnimating:4500},BF=function(t,n){return n?Ta.drop(n.duration):t?Ta.snap:Ta.fluid},UF=function(t,n){return t?n?rl.opacity.drop:rl.opacity.combining:null},$F=function(t){return t.forceShouldAnimate!=null?t.forceShouldAnimate:t.mode==="SNAP"};function _F(e){var t=e.dimension,n=t.client,r=e.offset,i=e.combineWith,o=e.dropping,a=!!i,l=$F(e),s=!!o,u=s?Wp.drop(r,a):Wp.moveTo(r),c={position:"fixed",top:n.marginBox.top,left:n.marginBox.left,boxSizing:"border-box",width:n.borderBox.width,height:n.borderBox.height,transition:BF(l,o),transform:u,opacity:UF(a,s),zIndex:s?x0.dropAnimating:x0.dragging,pointerEvents:"none"};return c}function FF(e){return{transform:Wp.moveTo(e.offset),transition:e.shouldAnimateDisplacement?null:"none"}}function HF(e){return e.type==="DRAGGING"?_F(e):FF(e)}function WF(e,t,n){n===void 0&&(n=ct);var r=window.getComputedStyle(t),i=t.getBoundingClientRect(),o=IS(i,r),a=Tu(o,n),l={client:o,tagName:t.tagName.toLowerCase(),display:r.display},s={x:o.marginBox.width,y:o.marginBox.height},u={descriptor:e,placeholder:l,displaceBy:s,client:o,page:a};return u}function GF(e){var t=sh("draggable"),n=e.descriptor,r=e.registry,i=e.getDraggableRef,o=e.canDragInteractiveElements,a=e.shouldRespectForcePress,l=e.isEnabled,s=we(function(){return{canDragInteractiveElements:o,shouldRespectForcePress:a,isEnabled:l}},[o,l,a]),u=oe(function(p){var g=i();return g||Q(!1),WF(n,g,p)},[n,i]),c=we(function(){return{uniqueId:t,descriptor:n,options:s,getDimension:u}},[n,u,s,t]),d=v.useRef(c),f=v.useRef(!0);tn(function(){return r.draggable.register(d.current),function(){return r.draggable.unregister(d.current)}},[r.draggable]),tn(function(){if(f.current){f.current=!1;return}var p=d.current;d.current=c,r.draggable.update(c,p)},[c,r.draggable])}function VF(e){e.preventDefault()}function ZF(e){var t=v.useRef(null),n=oe(function(L){t.current=L},[]),r=oe(function(){return t.current},[]),i=ku(od),o=i.contextId,a=i.dragHandleUsageInstructionsId,l=i.registry,s=ku(ch),u=s.type,c=s.droppableId,d=we(function(){return{id:e.draggableId,index:e.index,type:u,droppableId:c}},[e.draggableId,e.index,u,c]),f=e.children,p=e.draggableId,g=e.isEnabled,h=e.shouldRespectForcePress,w=e.canDragInteractiveElements,I=e.isClone,y=e.mapped,b=e.dropAnimationFinished;if(!I){var x=we(function(){return{descriptor:d,registry:l,getDraggableRef:r,canDragInteractiveElements:w,shouldRespectForcePress:h,isEnabled:g}},[d,l,r,w,h,g]);GF(x)}var N=we(function(){return g?{tabIndex:0,role:"button","aria-describedby":a,"data-rbd-drag-handle-draggable-id":p,"data-rbd-drag-handle-context-id":o,draggable:!1,onDragStart:VF}:null},[o,a,p,g]),M=oe(function(L){y.type==="DRAGGING"&&y.dropping&&L.propertyName==="transform"&&b()},[b,y]),S=we(function(){var L=HF(y),R=y.type==="DRAGGING"&&y.dropping?M:null,O={innerRef:n,draggableProps:{"data-rbd-draggable-context-id":o,"data-rbd-draggable-id":p,style:L,onTransitionEnd:R},dragHandleProps:N};return O},[o,N,p,y,M,n]),C=we(function(){return{draggableId:d.id,type:d.type,source:{index:d.index,droppableId:d.droppableId}}},[d.droppableId,d.id,d.index,d.type]);return f(S,y.snapshot,C)}var fN=function(e,t){return e===t},pN=function(e){var t=e.combine,n=e.destination;return n?n.droppableId:t?t.droppableId:null},YF=function(t){return t.combine?t.combine.draggableId:null},QF=function(t){return t.at&&t.at.type==="COMBINE"?t.at.combine.draggableId:null};function JF(){var e=ut(function(i,o){return{x:i,y:o}}),t=ut(function(i,o,a,l,s){return{isDragging:!0,isClone:o,isDropAnimating:!!s,dropAnimation:s,mode:i,draggingOver:a,combineWith:l,combineTargetFor:null}}),n=ut(function(i,o,a,l,s,u,c){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:s,combineWith:u,mode:o,offset:i,dimension:a,forceShouldAnimate:c,snapshot:t(o,l,s,u,null)}}}),r=function(o,a){if(o.isDragging){if(o.critical.draggable.id!==a.draggableId)return null;var l=o.current.client.offset,s=o.dimensions.draggables[a.draggableId],u=en(o.impact),c=QF(o.impact),d=o.forceShouldAnimate;return n(e(l.x,l.y),o.movementMode,s,a.isClone,u,c,d)}if(o.phase==="DROP_ANIMATING"){var f=o.completed;if(f.result.draggableId!==a.draggableId)return null;var p=a.isClone,g=o.dimensions.draggables[a.draggableId],h=f.result,w=h.mode,I=pN(h),y=YF(h),b=o.dropDuration,x={duration:b,curve:th.drop,moveTo:o.newHomeClientOffset,opacity:y?rl.opacity.drop:null,scale:y?rl.scale.drop:null};return{mapped:{type:"DRAGGING",offset:o.newHomeClientOffset,dimension:g,dropping:x,draggingOver:I,combineWith:y,mode:w,forceShouldAnimate:null,snapshot:t(w,p,I,y,x)}}}return null};return r}function mN(e){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}var XF={mapped:{type:"SECONDARY",offset:ct,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:mN(null)}};function qF(){var e=ut(function(a,l){return{x:a,y:l}}),t=ut(mN),n=ut(function(a,l,s){return l===void 0&&(l=null),{mapped:{type:"SECONDARY",offset:a,combineTargetFor:l,shouldAnimateDisplacement:s,snapshot:t(l)}}}),r=function(l){return l?n(ct,l,!0):null},i=function(l,s,u,c){var d=u.displaced.visible[l],f=!!(c.inVirtualList&&c.effected[l]),p=td(u),g=p&&p.draggableId===l?s:null;if(!d){if(!f)return r(g);if(u.displaced.invisible[l])return null;var h=Ro(c.displacedBy.point),w=e(h.x,h.y);return n(w,g,!0)}if(f)return r(g);var I=u.displacedBy.point,y=e(I.x,I.y);return n(y,g,d.shouldAnimate)},o=function(l,s){if(l.isDragging)return l.critical.draggable.id===s.draggableId?null:i(s.draggableId,l.critical.draggable.id,l.impact,l.afterCritical);if(l.phase==="DROP_ANIMATING"){var u=l.completed;return u.result.draggableId===s.draggableId?null:i(s.draggableId,u.result.draggableId,u.impact,u.afterCritical)}return null};return o}var KF=function(){var t=JF(),n=qF(),r=function(o,a){return t(o,a)||n(o,a)||XF};return r},eH={dropAnimationFinished:ZS},tH=vS(KF,eH,null,{context:lh,pure:!0,areStatePropsEqual:fN})(ZF);function gN(e){var t=ku(ch),n=t.isUsingCloneFor;return n===e.draggableId&&!e.isClone?null:k.createElement(tH,e)}function nH(e){var t=typeof e.isDragDisabled=="boolean"?!e.isDragDisabled:!0,n=!!e.disableInteractiveElementBlocking,r=!!e.shouldRespectForcePress;return k.createElement(gN,le({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}function rH(e){var t=v.useContext(od);t||Q(!1);var n=t.contextId,r=t.isMovementAllowed,i=v.useRef(null),o=v.useRef(null),a=e.children,l=e.droppableId,s=e.type,u=e.mode,c=e.direction,d=e.ignoreContainerClipping,f=e.isDropDisabled,p=e.isCombineEnabled,g=e.snapshot,h=e.useClone,w=e.updateViewportMaxScroll,I=e.getContainerForClone,y=oe(function(){return i.current},[]),b=oe(function(O){i.current=O},[]);oe(function(){return o.current},[]);var x=oe(function(O){o.current=O},[]),N=oe(function(){r()&&w({maxScroll:qS()})},[r,w]);PF({droppableId:l,type:s,mode:u,direction:c,isDropDisabled:f,isCombineEnabled:p,ignoreContainerClipping:d,getDroppableRef:y});var M=k.createElement(zF,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},function(O){var J=O.onClose,U=O.data,G=O.animate;return k.createElement(kF,{placeholder:U,onClose:J,innerRef:x,animate:G,contextId:n,onTransitionEnd:N})}),S=we(function(){return{innerRef:b,placeholder:M,droppableProps:{"data-rbd-droppable-id":l,"data-rbd-droppable-context-id":n}}},[n,l,M,b]),C=h?h.dragging.draggableId:null,L=we(function(){return{droppableId:l,type:s,isUsingCloneFor:C}},[l,C,s]);function R(){if(!h)return null;var O=h.dragging,J=h.render,U=k.createElement(gN,{draggableId:O.draggableId,index:O.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},function(G,Z){return J(G,Z,O)});return lb.createPortal(U,I())}return k.createElement(ch.Provider,{value:L},a(S,g),R())}var Mf=function(t,n){return t===n.droppable.type},M0=function(t,n){return n.draggables[t.draggable.id]},iH=function(){var t={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},n=le({},t,{shouldAnimatePlaceholder:!1}),r=ut(function(a){return{draggableId:a.id,type:a.type,source:{index:a.index,droppableId:a.droppableId}}}),i=ut(function(a,l,s,u,c,d){var f=c.descriptor.id,p=c.descriptor.droppableId===a;if(p){var g=d?{render:d,dragging:r(c.descriptor)}:null,h={isDraggingOver:s,draggingOverWith:s?f:null,draggingFromThisWith:f,isUsingPlaceholder:!0};return{placeholder:c.placeholder,shouldAnimatePlaceholder:!1,snapshot:h,useClone:g}}if(!l)return n;if(!u)return t;var w={isDraggingOver:s,draggingOverWith:f,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:c.placeholder,shouldAnimatePlaceholder:!0,snapshot:w,useClone:null}}),o=function(l,s){var u=s.droppableId,c=s.type,d=!s.isDropDisabled,f=s.renderClone;if(l.isDragging){var p=l.critical;if(!Mf(c,p))return n;var g=M0(p,l.dimensions),h=en(l.impact)===u;return i(u,d,h,h,g,f)}if(l.phase==="DROP_ANIMATING"){var w=l.completed;if(!Mf(c,w.critical))return n;var I=M0(w.critical,l.dimensions);return i(u,d,pN(w.result)===u,en(w.impact)===u,I,f)}if(l.phase==="IDLE"&&l.completed&&!l.shouldFlush){var y=l.completed;if(!Mf(c,y.critical))return n;var b=en(y.impact)===u,x=!!(y.impact.at&&y.impact.at.type==="COMBINE"),N=y.critical.droppable.id===u;return b?x?t:n:N?t:n}return n};return o},oH={updateViewportMaxScroll:p$};function aH(){return document.body||Q(!1),document.body}var lH={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:aH},hN=vS(iH,oH,null,{context:lh,pure:!0,areStatePropsEqual:fN})(rH);hN.defaultProps=lH;const sH=3,uH=({onClick:e,stackType:t,policyManager:n})=>{var s;const[r,i]=v.useState(!1),o=()=>{i(!r)},a=((s=n.policiesUsageInfo)==null?void 0:s.filter(u=>Qi(u.policyType)===t).sort((u,c)=>c.operations.length-u.operations.length))??[];let l=a;return r||(l=a.slice(0,sH)),l.length===0?null:m.jsxs("div",{className:"flex flex-col w-full",children:[m.jsx("p",{className:"text-gray-500 font-semibold text-md pb-2",children:"EXISTING POLICIES"}),m.jsx("div",{className:"grid grid-cols-3 gap-2 h-fit max-h-40 overflow-y-auto",children:l.map(u=>{const c=jl(u.policyType),d=()=>e(u,u.policyType),f=u.operations.length;return m.jsxs("button",{type:"button",onClick:d,className:"flex flex-col items-center justify-content-center h-16 border border-gray-300 shadow-sm rounded bg-gray-50 hover:bg-gray-200 p-3",children:[m.jsxs("div",{className:"h-full flex flex-row items-center justify-content-center",children:[m.jsx("img",{className:"w-6 h-6 mr-2",src:c==null?void 0:c.icon,alt:u.policyType}),m.jsx("div",{className:"text-md font-semibold truncate w-64",children:u.name})]}),m.jsx("p",{className:"w-full text-sm text-gray-400",children:`Used in ${f} ${f>1?"routes":"route"}`})]},u.name)})}),a.length>l.length&&!r&&m.jsx("div",{className:"pt-2",children:m.jsx("button",{onClick:o,type:"button",className:"border border-gray-300 shadow-sm rounded-md bg-gray-50 hover:bg-gray-200 w-full self-center px-3 py-1",children:"See All"})})]})},cH=({onClick:e,id:t,name:n,icon:r})=>{const i=()=>e(t);return m.jsxs("button",{type:"button","data-test":t,className:"h-32 border border-gray-300 shadow-sm flex flex-col items-center justify-content-center rounded bg-gray-50 hover:bg-gray-200 p-3",onClick:i,children:[m.jsx("div",{className:"m-3",children:m.jsx("img",{className:"w-12 h-12",src:r,alt:n})}),m.jsx("div",{className:"font-bold",children:n})]})},dH=({onClick:e,stackType:t})=>{const[n,r]=v.useState(),i=l=>{r(l.currentTarget.value)},o=v.useRef(null);v.useEffect(()=>{var l;(l=o.current)==null||l.focus()},[]);const a=XM().filter(l=>!l.isDeprecated).filter(l=>n?l.name.toLowerCase().includes(n.toLowerCase()):!0).filter(l=>l.id.endsWith(`-${t}`)).sort((l,s)=>l.name<s.name?1:l.name>s.name?-1:0).sort(l=>l.isPaidAddOn||l.isPreview?1:-1);return m.jsxs(m.Fragment,{children:[m.jsx("p",{className:"text-gray-500 font-semibold text-md",children:"ADD A NEW POLICY"}),m.jsxs("div",{className:"mt-2 relative rounded-md shadow-sm",children:[m.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:m.jsx(ub,{className:"h-5 w-5 text-gray-400","aria-hidden":"true"})}),m.jsx("input",{ref:o,defaultValue:n,className:"focus:ring-indigo-500 focus:border-indigo-500 block w-full h-8 pl-10 sm:text-sm border border-gray-300 shadow-sm rounded",placeholder:"Search for a Policy",onChange:i})]}),m.jsx("div",{className:"h-55vh overflow-y-auto",children:m.jsx("div",{className:"mt-2 pb-10 grid grid-cols-3 gap-2 h-fit max-h-55vh",children:a.map(l=>m.jsx(cH,{onClick:e,...l},l.id))})})]})};function fH({stackType:e,shouldHideExistingPolicies:t=!1,policyManager:n,onPolicySelected:r,onExistingPolicySelected:i}){const o=l=>{r(l)},a=l=>{i(l)};return m.jsxs("div",{className:"flex flex-col w-full pl-8 pr-6 mt-2",children:[t?null:m.jsx("div",{className:"pb-4",children:m.jsx(uH,{onClick:a,policyManager:n,stackType:e})}),m.jsx("div",{className:"mt-2",children:m.jsx(dH,{onClick:o,stackType:e})})]})}const pH=({fakePolicyUrl:e,designConfig:t,onCancel:n})=>{const r=()=>{window.open(e,"_blank")};return m.jsxs("div",{className:"flex flex-col w-[600px] gap-y-4",children:[m.jsx("div",{className:"pt-4 pl-8 text-lg text-gray-500",children:t.name}),m.jsx("div",{className:"w-full",children:t.exampleHtml?m.jsx(Og,{documentationSrc:t.exampleHtml}):m.jsxs("div",{className:"bg-gray-100 h-60 text-center flex flex-col items-center justify-center",children:[bi.COMING_SOON.icon,m.jsx("div",{children:bi.COMING_SOON.defaultTitle})]})}),m.jsxs("div",{className:"flex w-full gap-x-4 justify-end pr-6 pb-4",children:[m.jsx(En,{label:"Cancel",buttonType:xi.WHITE,classNames:"w-24 justify-center",onClick:n,dataTestId:"policy-picker-footer-cancel-btn"}),m.jsx(En,{label:"Open Guide",classNames:"w-36 justify-center",onClick:r,dataTestId:"policy-picker-footer-request-access-btn"})]})]})},mH="There's already a policy with this name",gH="Policy name can't be empty",hH=({policyID:e,operation:t,onComplete:n,onCancel:r,policyManager:i})=>{const o=i.getPolicyListEnforced(),a=jl(e),l=!!(a!=null&&a.isPreview)||!!(a!=null&&a.isPaidAddOn),[s,u]=v.useState(SB(o,e)),[c,d]=v.useState(null),[f,p]=v.useState(null),g=v.useRef();if(v.useEffect(()=>{(N=>{if(!N){d(gH);return}if(o.find(S=>S.name===N)){d(mH);return}d(null)})(s)},[s,o]),!a)return null;if(a.fakePolicyUrl)return m.jsx(pH,{fakePolicyUrl:a.fakePolicyUrl,designConfig:a,onCancel:r});const h=(x,N)=>{const M={handler:N,name:s,policyType:x};i.createPolicy(M,t?[t]:void 0)},w=()=>{var N;const x=(N=g.current)==null?void 0:N.getValue();if(!(!e||!x))try{const M=JSON.parse(x);h(e,M),n()}catch(M){p(M.message)}},I=x=>{u(qM(x.toLowerCase()))};function y(x){g.current=x}const b=!!c;return m.jsxs("div",{className:"flex flex-col w-full",children:[m.jsx("div",{className:"pl-24 max-w-lg mt-4",children:m.jsx(QM,{name:s,onChangeName:I,policyTypeInformation:{documentationUrl:a.documentationUrl,typeName:a.name},validationErrorName:c,disabled:l})}),m.jsxs("div",{className:"grid grid-cols-2 h-64 mt-4 mb-4",children:[m.jsxs(Au,{label:"Configuration",classNameLabel:"ml-6",children:[m.jsx(ZM,{options:{hideCursorInOverviewRuler:!0,minimap:{enabled:!1},overviewRulerBorder:!1,overviewRulerLanes:0,readOnly:!1,renderLineHighlight:"none",roundedSelection:!1,scrollBeyondLastLine:!1},className:ae("h-60",{"border-2 border-red-500":!!f}),width:"100%",language:"json",onMount:y,defaultValue:JSON.stringify(a.defaultHandler,void 0,CM)}),f?m.jsx("p",{className:"text-red-500 ml-2 mt-1",children:f}):null]}),m.jsx(Au,{label:"Usage",classNameLabel:"ml-2",children:a.exampleHtml?m.jsx(Og,{documentationSrc:a.exampleHtml}):m.jsxs("div",{className:"bg-gray-100 h-60 text-center flex flex-col items-center justify-center",children:[bi.COMING_SOON.icon,m.jsx("div",{children:bi.COMING_SOON.defaultTitle})]})})]}),m.jsx(YM,{onConfirm:w,onCancel:r,isDisabled:b,mustRequestAccess:l})]})},vH=e=>{switch(e){case"policy-picker":return"Choose Policy";case"policy-access-requested":return"Access Requested";case"policy-configurator":return"Create Policy"}},yH=({isOpen:e,setIsOpen:t,stackType:n,operation:r,shouldHideExistingPolicies:i=!1,policyManager:o})=>{const[a,l]=v.useState("policy-picker"),[s,u]=v.useState(),c=()=>{t(!1)},d=w=>{u(w),l("policy-configurator")},f=r?{filePath:r.additionalOperationContext.oasFilePath,path:r.additionalOperationContext.path,method:r.additionalOperationContext.method}:void 0,p=w=>{if(r==null||f==null)throw new Error("Operation config not found to add policy to");o.applyPolicy(w.name,[f]),c()};let g,h=!1;if(s&&a==="policy-configurator"){const w=jl(s);g=w!=null&&w.isPaidAddOn?"Paid Add On":w!=null&&w.isPreview&&!w.fakePolicyUrl?"Private Preview":void 0,h=(w==null?void 0:w.fakePolicyUrl)!=null}return m.jsxs(BM,{title:vH(a),isOpen:e,badgeTitle:g,setIsOpen:t,matchWidth:h,children:[a==="policy-picker"?m.jsx(fH,{stackType:n,shouldHideExistingPolicies:i,policyManager:o,onPolicySelected:d,onExistingPolicySelected:p}):null,a==="policy-configurator"&&s!=null?m.jsx(hH,{policyID:s,operation:f,onComplete:c,onCancel:c,policyManager:o}):null]})},S0=({policies:e,stackType:t,operation:n})=>{const r=El(),i={filePath:n.additionalOperationContext.oasFilePath,path:n.additionalOperationContext.path,method:n.additionalOperationContext.method},[o,a]=ho(()=>m.jsx(yH,{isOpen:!0,setIsOpen:a,stackType:t,operation:n,policyManager:r}),[t,n,r]),l=u=>{const c=e[u];r.removePolicy(c,t,[i])},s=u=>{u.destination&&u.destination.index!==u.source.index&&r.movePolicy(e,u.source.index,u.destination.index,t,i)};return m.jsx(IF,{onDragEnd:s,children:m.jsxs("div",{className:"flex flex-col w-full max-w-full items-center gap-y-2 px-3",children:[m.jsx(hN,{droppableId:"list",children:u=>m.jsxs("div",{className:"w-full max-w-full xl:w-fit flex flex-col items-stretch",ref:u.innerRef,...u.droppableProps,children:[e.map((c,d)=>m.jsx(nH,{draggableId:`${c}-${d}`,index:d,isDragDisabled:!1,children:f=>m.jsx("div",{className:"flex w-full max-w-full py-2",ref:f.innerRef,...f.draggableProps,...f.dragHandleProps,children:m.jsx(AB,{isReadOnly:!1,index:d,policy:c,stackType:t,onDelete:l})})},`${c}-${d}`)),u.placeholder]})}),m.jsx("div",{className:"flex flex-row justify-center",children:m.jsx(En,{dataTestId:`add-${t}-policy`,buttonType:xi.GRAY,onClick:()=>{o()},label:"Add Policy",icon:m.jsx(JC,{className:"w-5 h-auto text-gray-500"}),iconAlignment:"left"})})]})})},N0=({children:e,direction:t})=>m.jsxs("div",{className:"grid h-full w-full max-w-full",children:[m.jsxs("div",{className:"w-full max-w-full flex flex-col items-center col-start-1 row-start-1",children:[t==="up"?m.jsx("div",{className:"flex-none pl-[0.06rem]",children:m.jsx("img",{src:"/icons/arrow_head_up.svg",alt:"arrow-down"})}):m.jsx(m.Fragment,{}),m.jsx("div",{className:"flex-grow",children:m.jsx("img",{className:"h-full w-3",src:"/icons/arrow_line.svg",alt:"arrow-line"})}),t==="down"?m.jsx("div",{className:"flex-none",children:m.jsx("img",{src:"/icons/arrow_head_down.svg",alt:"arrow-down"})}):m.jsx(m.Fragment,{})]}),m.jsx("div",{className:"w-full max-w-full min-w-0 col-start-1 row-start-1 pt-4 pb-6",children:e})]}),IH=({children:e,isPoliciesExpanded:t,onPoliciesExpandedChange:n,inboundPolicies:r,outboundPolicies:i,operation:o})=>m.jsxs("div",{className:"w-full 2xl:col-span-12 flex flex-col justify-start",children:[m.jsx("div",{className:ae("rounded-t absolute h-12 right-0 ",{"bg-gray-100":t}),children:" "}),m.jsx("button",{type:"button","data-test":"policy-designer-expand-collapse",onClick:()=>{n()},className:ae("text-sm flex text-center px-3 py-2 z-5 w-full text-black bg-gray-100 hover:bg-gray-200",t?"rounded-t":"rounded"),children:m.jsxs("span",{className:"inline-flex items-center text-lg",children:[t?m.jsx(oc,{className:"w-5 h-auto"}):m.jsx(TC,{className:"w-5 h-auto"})," Policies"]})}),t?m.jsxs("div",{className:"flex flex-col pb-4 bg-gray-100 rounded-b",children:[m.jsx("div",{className:"flex flex-col",children:m.jsxs("div",{className:"grid grid-cols-2 pb-4",children:[m.jsxs("div",{className:"flex flex-col items-center h-auto",children:[m.jsx("span",{className:"text-center flex-none my-1 text-sm",children:"Request"}),m.jsx(N0,{direction:"down",children:m.jsx(S0,{operation:o,policies:r,stackType:"inbound"})})]}),m.jsxs("div",{className:"flex-grow flex flex-col",children:[m.jsx("span",{className:"text-center flex-none my-1 text-sm",children:"Response"}),m.jsx(N0,{direction:"up",children:m.jsx(S0,{operation:o,policies:i,stackType:"outbound"})})]})]})}),e]}):null]});function wH({operationData:e}){return e?m.jsx("div",{className:"w-full h-fit flex flex-col",children:m.jsx(bH,{operationData:e})}):m.jsx("div",{className:"m-auto flex text-center",children:m.jsxs("h1",{className:"text-gray-400 text-xl mb-5",children:["No operation selected ",m.jsx("br",{}),"Select an operation to start editing"]})})}const bH=({operationData:e})=>{var $,ee,P,B,F,V;const t=Cl().get("path");if(!t)throw new Error("Open API file path not found in URL");const n=gz(t),{path:r,method:i}=e.additionalOperationContext,{additionalOperationContext:o,...a}=e,l=$c(),s=El(),u="",[c,d]=v.useState(),[f,p]=v.useState(),[g,h]=v.useState(),[w,I]=v.useState(!1),y=(P=(ee=($=l.openApiData)==null?void 0:$.servers)==null?void 0:ee.at(0))==null?void 0:P.url,b=a[Dr]??zu(y??Qa),x=a[sy]===!0;v.useEffect(()=>{d(void 0),p(void 0)},[e.operationId]);const N=()=>{I(!w)},M=D=>{const E={...D},T={...b,handler:E};l.updateOperation({path:r,method:i,newOperationObject:{...a,[Dr]:T}}),d(void 0)},S=D=>{l.updateOperation({path:r,method:i,newOperationObject:{...a,summary:D}}),d(void 0)},C=D=>{l.updateOperation({path:r,method:i,newOperationObject:{...a,[sy]:D}})},L=D=>{let{newPath:E}=D;const{newMethod:T}=D;g!=null&&E==null&&(E=g);try{l.updateOperation({path:r,newPath:E,method:i,newMethod:T,newOperationObject:a}),p(void 0),d(void 0),h(void 0)}catch(z){z instanceof Error&&(E!=null&&(h(E),p(z.message)),T!=null&&d(z.message))}},R=D=>{if(D===r){p(void 0),d(void 0),h(void 0);return}const E=D.startsWith("/")?D:"/"+D;L({newPath:E})},O=({value:D})=>{const E=D;if(E===i){d(void 0);return}L({newMethod:E})},J=D=>{const E={...b,corsPolicy:D};l.updateOperation({path:r,method:i,newOperationObject:{...a,[Dr]:E}}),d(void 0)},U=D=>{const E={...e.additionalOperationContext.pathZuploConfig,pathMode:D},z=l.getOpenApiDataEnforced().paths;if(!z)throw new Error("Property 'paths' is undefined");const _=z[r];if(!_)throw new Error(`Path Item '${r}' is undefined`);l.updatePathItem(r,{..._,[cM]:E}),d(void 0)},G=()=>{n(Nt.modified)},Z=m.jsx("div",{className:`${w?"mx-4":""}`,children:m.jsx(zz,{isOpenApi:!0,routeHandler:(e[Dr]??zu(y??Qa)).handler,onRequestHandlerChange:M})});return m.jsxs("div",{className:"m-2 p-3 pt-3 rounded","data-test":"route-handling-section",children:[m.jsxs("div",{className:"flex items-center mb-4",children:[m.jsx("span",{className:"pr-3 text-lg font-medium text-gray-900 whitespace-nowrap flex-none",children:"Request Handling"}),m.jsx("div",{className:"border-t border-gray-300 flex-grow"})]}),m.jsxs("div",{className:"flex flex-col gap-y-3 pb-4",children:[m.jsx(vj,{initialSummary:a.summary,span:4,onSummaryChange:S,onFieldModified:G}),m.jsxs("div",{className:"flex flex-col",children:[m.jsx(hj,{initialPath:r,method:i,summary:e.summary,span:6,pathMode:(B=e.additionalOperationContext.pathZuploConfig)==null?void 0:B.pathMode,hasError:f!=null,onPathChange:R,onPathModeChange:U,operationData:e,onFieldModified:G}),f?m.jsx("p",{"data-test":"path-error",className:"text-sm text-red-600 pt-1 ml-10",children:f}):null]}),m.jsxs("div",{className:"flex flex-col",children:[m.jsxs("div",{className:"flex justify-start gap-x-3 xl:gap-x-8 w-full items-center flex-wrap gap-y-3 lg:gap-y-0 lg:flex-nowrap",children:[m.jsx(gj,{selectedMethod:i,onSelectionChanged:O,versionPathPrefix:u,span:4}),m.jsx(fj,{selectedCorsPolicy:b.corsPolicy,corsPolicies:s.corsPolicyList??[],span:3,onCORSSelectionChanged:J}),m.jsx(pj,{shouldExcludeFromDocs:x,span:3,onSelectionChanged:C})]}),c?m.jsx("p",{"data-test":"method-error",className:"text-sm text-red-600 pt-1 w-full",children:c}):null]}),m.jsx(IH,{inboundPolicies:((F=b.policies)==null?void 0:F.inbound)??[],outboundPolicies:((V=b.policies)==null?void 0:V.outbound)??[],operation:e,isPoliciesExpanded:w,onPoliciesExpandedChange:N,children:w?Z:null})]}),w?null:m.jsx("div",{className:"w-full col-span-12",children:Z})]})};let xs;const xH=new Uint8Array(16);function MH(){if(!xs&&(xs=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!xs))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return xs(xH)}const mt=[];for(let e=0;e<256;++e)mt.push((e+256).toString(16).slice(1));function SH(e,t=0){return mt[e[t+0]]+mt[e[t+1]]+mt[e[t+2]]+mt[e[t+3]]+"-"+mt[e[t+4]]+mt[e[t+5]]+"-"+mt[e[t+6]]+mt[e[t+7]]+"-"+mt[e[t+8]]+mt[e[t+9]]+"-"+mt[e[t+10]]+mt[e[t+11]]+mt[e[t+12]]+mt[e[t+13]]+mt[e[t+14]]+mt[e[t+15]]}const NH=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),D0={randomUUID:NH};function DH(e,t,n){if(D0.randomUUID&&!t&&!e)return D0.randomUUID();e=e||{};const r=e.random||(e.rng||MH)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return SH(r)}const AH="Document Order",CH=["Document Order","Path","Summary"],Sf="Untagged";function EH(e){return{summary:"New Route",description:"Lorem ipsum dolor sit amet, **consectetur adipiscing** elit, sed do `eiusmod tempor` incididunt ut labore et dolore magna aliqua.",[Dr]:zu(e),operationId:DH()}}function zu(e){return{corsPolicy:"none",handler:{export:"urlForwardHandler",module:"$import(@zuplo/runtime)",options:{baseUrl:e}},policies:{inbound:[]}}}const TH=()=>{var ee;const[e,t]=v.useState(),[n,r]=v.useState([]),[i,o]=v.useState(),[a,l]=v.useState(void 0),[s,u]=v.useState(AH),[c,d]=v.useState(void 0),f=$c(),[p,g]=v.useState(),[h,w]=v.useState(),[I,y]=ho(()=>{if(i==null)throw new Error("Invalid state, operationToDelete should not be undefined");const P=()=>{try{C(i.path,i.method)}catch(F){F instanceof Error&&(d(F.message),b())}o(void 0),y()},B=()=>{o(void 0),y()};return m.jsx(Ap,{hideModal:y,alertType:"DELETE",bodyText:"Are you sure you want to delete this operation?",primaryButtonText:"Confirm",secondaryButtonText:"Cancel",onPrimaryButtonClick:P,onSecondaryButtonClick:B,primaryButtonTestID:"confirm-delete-btn"})},[i,o]),[b,x]=ho(()=>{const P=()=>{d(void 0),x()};return m.jsx(Ap,{alertType:"ERROR",bodyText:c??"",onPrimaryButtonClick:()=>{},onSecondaryButtonClick:P,primaryButtonText:"Edit file directly",secondaryButtonText:"Cancel",hideModal:P,title:"Error"})},[c]);if(!f.openApiData)throw new Error("Invalid State - no OpenApiData");const N=(ee=f.openApiData.tags)==null?void 0:ee.map(P=>({value:P.name,label:P.name,shouldSupportOnly:!0}));N==null||N.push({value:Sf,label:Sf,shouldSupportOnly:!0});const M=n.reduce((P,B)=>(P.set(B,!0),P),new Map),S=f.operationArray,C=(P,B)=>{f.deleteOperation(P,B)},L=()=>{var E,T,z,_;const P=(z=(T=(E=f.openApiData)==null?void 0:E.servers)==null?void 0:T.at(0))==null?void 0:z.url,B=EH(P??Qa),V=`/path-${((_=f.operationArray)==null?void 0:_.length)??0}`,D=zn.OpenAPIV3.HttpMethods.GET;try{f.addOperation(V,D,B)}catch(ie){ie instanceof Error&&(d(ie.message),b())}l(B.operationId)},R=(P,B,F)=>{o({path:P,method:B,operationId:F}),I()},O=P=>{t(P)},J=P=>{r(P)},U=P=>{u(P.value)},G=P=>{var F;if(!e||e==="")return!0;const B=e.toLowerCase();return P.additionalOperationContext.path.includes(B)||((F=P.summary)==null?void 0:F.toLowerCase().includes(B))},Z=P=>{if(n.length===0)return!0;const B=P.tags;return B?B.some(F=>M.has(F)):n.includes(Sf)},$=(P,B)=>{var F;switch(s){case"Document Order":return 0;case"Path":return P.additionalOperationContext.path.localeCompare(B.additionalOperationContext.path);case"Summary":return!P.summary&&!B.summary?0:!P.summary&&B.summary?1:P.summary&&!B.summary?-1:((F=P.summary)==null?void 0:F.localeCompare(B.summary??""))??0}};return!S||S.length===0&&(!e||e.trim().length===0)?m.jsx(oj,{addRoute:L}):m.jsx(m.Fragment,{children:m.jsxs("div",{className:"mx-2 grid grid-cols-3 h-full flex-grow",children:[m.jsxs("div",{className:"flex flex-col justify-start col-span-1 h-full py-6 pl-3 mx-2",children:[m.jsx("div",{className:"flex w-full mr-3 pb-5",children:m.jsx(sj,{onSearch:O})}),m.jsxs("div",{className:"flex flex-wrap w-full justify-between gap-x-4 gap-y-2 mr-3 pb-5",children:[m.jsx(Zr,{labelPrefixElement:m.jsx("span",{className:"hidden 2xl:inline mr-1",children:"Sort:"}),selected:{label:s,value:s},onChange:U,options:CH.map(P=>({label:P,value:P}))}),m.jsx(VT,{filterPrefixClassName:"hidden 2xl:inline",filterName:n.length===1?"Tag":"Tags",activeFilters:n,options:N??[],onFilterChange:J,isDisabled:!N})]}),m.jsx("div",{className:"relative max-h-[calc(100vh-265px)] overflow-auto w-full mb-2",children:S.filter(G).filter(Z).sort($).map(({additionalOperationContext:P,...B})=>{const F=B.operationId===a,V=F&&p?p:P.path,D=F&&h?h:B.summary;return m.jsx("div",{className:"flex w-full items-center",children:m.jsx(lj,{path:V,method:P.method,summary:D,operationId:B.operationId,isSelected:B.operationId===a,onOperationSelected:E=>{l(E),g(""),w("")},onDelete:R})},B.operationId)})}),m.jsx("div",{className:"flex justify-center",children:m.jsxs("button",{type:"button",onClick:L,className:"inline-flex items-center shadow-sm px-4 py-1.5 border border-gray-300 text-sm leading-5 font-medium rounded-full text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500","data-test":"add-route-btn",children:[m.jsx(KC,{className:"-ml-1.5 mr-1 h-5 w-5 text-gray-400","aria-hidden":"true"}),m.jsx("span",{children:"Add Route"})]})})]}),m.jsx("div",{className:"col-span-2 flex flex-col",children:m.jsx(lg.Provider,{value:{setPath:g,setSummary:w},children:m.jsx(wH,{operationData:S.find(P=>P.operationId===a)})})})]})})},jH=({url:e,surfaceResponse:t})=>{const n=Cl().get("path"),[r,i]=v.useState(!1),o=$c(),a=El(),l=Al(),s=async()=>{try{if(!n)throw new Error("You must pick a file before saving");i(!0);const c=await fetch(`${e}/save-open-api-updates`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify([{filePath:n,content:o.openApiData},{filePath:a.policyListFileModel.path,content:a.policyListFileModel.content?JSON.parse(a.policyListFileModel.content):a.policyListFileModel.content}])}),d=await c.json();if(t(d.message,c.status===200?"success":"error"),c.status===200){l(a.policyListFileModel,Nt.unmodified),l(o.openApiFileModel,Nt.unmodified);return}}catch(c){const d=c.message&&c.message.includes("Failed to fetch")?Bc:`Error: ${c.message}`;t(d,"error")}finally{i(!1)}};v.useEffect(()=>{const c=async d=>{(d.metaKey||d.ctrlKey)&&d.key==="s"&&(d.preventDefault(),(a.policyListFileModel.saveState!==Nt.unmodified||o.openApiFileModel.saveState!==Nt.unmodified)&&await s())};return window.addEventListener("keydown",c),()=>{window.removeEventListener("keydown",c)}},[a,o]);const u=a.policyListFileModel.saveState!==Nt.unmodified||o.openApiFileModel.saveState!==Nt.unmodified;return m.jsx("div",{className:"mt-5 text-right justify-end pl-3",children:m.jsx("div",{className:"inline-block",children:r?m.jsx(hc,{className:"w-4 h-4 mr-4 float-right"}):m.jsxs(m.Fragment,{children:[m.jsx("button",{type:"button",onClick:()=>s(),className:ae(`ml-1 ${u?"bg-zuplo-highlight hover:bg-zuplo-highlight-hover":"bg-gray-200 hover:bg-gray-300"} rounded text-sm justify-center py-2 px-4 inline-flex items-center h-[38px] w-40`),disabled:!u,children:"Save All"}),u?m.jsxs("span",{className:"absolute flex h-3 w-3 -mx-[-158px] -mt-[45px]",children:[m.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-zuplo-pink opacity-75"}),m.jsx("span",{className:"relative inline-flex rounded-full h-3 w-3 bg-zuplo-pink"})]}):null]})})})},PH=({message:e,type:t,className:n})=>m.jsx(m.Fragment,{children:m.jsx(Wn,{show:e!=="",enter:"transform ease-out duration-300 transition",enterFrom:"translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2",enterTo:"translate-y-0 opacity-100 sm:translate-x-0",leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",className:ae("col-span-12 rounded-md py-3 px-5 mt-2",{"bg-pink-100":t==="error","bg-green-100 ":t==="success","bg-blue-100":t=="info"},n),children:m.jsx("span",{className:"text-sm text-gray-500 inline-block",children:e})})});var A0=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function LH(e,t){return!!(e===t||A0(e)&&A0(t))}function RH(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!LH(e[n],t[n]))return!1;return!0}function OH(e,t){t===void 0&&(t=RH);var n=null;function r(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];if(n&&n.lastThis===this&&t(i,n.lastArgs))return n.lastResult;var a=e.apply(this,i);return n={lastResult:a,lastArgs:i,lastThis:this},a}return r.clear=function(){n=null},r}function Xn(){}Xn.prototype={diff:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=r.callback;typeof r=="function"&&(i=r,r={}),this.options=r;var o=this;function a(h){return i?(setTimeout(function(){i(void 0,h)},0),!0):h}t=this.castInput(t),n=this.castInput(n),t=this.removeEmpty(this.tokenize(t)),n=this.removeEmpty(this.tokenize(n));var l=n.length,s=t.length,u=1,c=l+s,d=[{newPos:-1,components:[]}],f=this.extractCommon(d[0],n,t,0);if(d[0].newPos+1>=l&&f+1>=s)return a([{value:this.join(n),count:n.length}]);function p(){for(var h=-1*u;h<=u;h+=2){var w=void 0,I=d[h-1],y=d[h+1],b=(y?y.newPos:0)-h;I&&(d[h-1]=void 0);var x=I&&I.newPos+1<l,N=y&&0<=b&&b<s;if(!x&&!N){d[h]=void 0;continue}if(!x||N&&I.newPos<y.newPos?(w=zH(y),o.pushComponent(w.components,void 0,!0)):(w=I,w.newPos++,o.pushComponent(w.components,!0,void 0)),b=o.extractCommon(w,n,t,h),w.newPos+1>=l&&b+1>=s)return a(kH(o,w.components,n,t,o.useLongestToken));d[h]=w}u++}if(i)(function h(){setTimeout(function(){if(u>c)return i();p()||h()},0)})();else for(;u<=c;){var g=p();if(g)return g}},pushComponent:function(t,n,r){var i=t[t.length-1];i&&i.added===n&&i.removed===r?t[t.length-1]={count:i.count+1,added:n,removed:r}:t.push({count:1,added:n,removed:r})},extractCommon:function(t,n,r,i){for(var o=n.length,a=r.length,l=t.newPos,s=l-i,u=0;l+1<o&&s+1<a&&this.equals(n[l+1],r[s+1]);)l++,s++,u++;return u&&t.components.push({count:u}),t.newPos=l,s},equals:function(t,n){return this.options.comparator?this.options.comparator(t,n):t===n||this.options.ignoreCase&&t.toLowerCase()===n.toLowerCase()},removeEmpty:function(t){for(var n=[],r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function kH(e,t,n,r,i){for(var o=0,a=t.length,l=0,s=0;o<a;o++){var u=t[o];if(u.removed){if(u.value=e.join(r.slice(s,s+u.count)),s+=u.count,o&&t[o-1].added){var d=t[o-1];t[o-1]=t[o],t[o]=d}}else{if(!u.added&&i){var c=n.slice(l,l+u.count);c=c.map(function(p,g){var h=r[s+g];return h.length>p.length?h:p}),u.value=e.join(c)}else u.value=e.join(n.slice(l,l+u.count));l+=u.count,u.added||(s+=u.count)}}var f=t[a-1];return a>1&&typeof f.value=="string"&&(f.added||f.removed)&&e.equals("",f.value)&&(t[a-2].value+=f.value,t.pop()),t}function zH(e){return{newPos:e.newPos,components:e.components.slice(0)}}var BH=new Xn;function UH(e,t,n){return BH.diff(e,t,n)}function vN(e,t){if(typeof e=="function")t.callback=e;else if(e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}var C0=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,E0=/\S/,ld=new Xn;ld.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!E0.test(e)&&!E0.test(t)};ld.tokenize=function(e){for(var t=e.split(/(\s+|[()[\]{}'"]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&C0.test(t[n])&&C0.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};function $H(e,t,n){return n=vN(n,{ignoreWhitespace:!0}),ld.diff(e,t,n)}function _H(e,t,n){return ld.diff(e,t,n)}var sd=new Xn;sd.tokenize=function(e){var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var i=n[r];r%2&&!this.options.newlineIsToken?t[t.length-1]+=i:(this.options.ignoreWhitespace&&(i=i.trim()),t.push(i))}return t};function dh(e,t,n){return sd.diff(e,t,n)}function FH(e,t,n){var r=vN(n,{ignoreWhitespace:!0});return sd.diff(e,t,r)}var yN=new Xn;yN.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};function HH(e,t,n){return yN.diff(e,t,n)}var IN=new Xn;IN.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function WH(e,t,n){return IN.diff(e,t,n)}function _s(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_s=function(t){return typeof t}:_s=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_s(e)}function or(e){return GH(e)||VH(e)||ZH()}function GH(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}function VH(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function ZH(){throw new TypeError("Invalid attempt to spread non-iterable instance")}var YH=Object.prototype.toString,No=new Xn;No.useLongestToken=!0;No.tokenize=sd.tokenize;No.castInput=function(e){var t=this.options,n=t.undefinedReplacement,r=t.stringifyReplacer,i=r===void 0?function(o,a){return typeof a>"u"?n:a}:r;return typeof e=="string"?e:JSON.stringify(Bu(e,null,null,i),i," ")};No.equals=function(e,t){return Xn.prototype.equals.call(No,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function QH(e,t,n){return No.diff(e,t,n)}function Bu(e,t,n,r,i){t=t||[],n=n||[],r&&(e=r(i,e));var o;for(o=0;o<t.length;o+=1)if(t[o]===e)return n[o];var a;if(YH.call(e)==="[object Array]"){for(t.push(e),a=new Array(e.length),n.push(a),o=0;o<e.length;o+=1)a[o]=Bu(e[o],t,n,r,i);return t.pop(),n.pop(),a}if(e&&e.toJSON&&(e=e.toJSON()),_s(e)==="object"&&e!==null){t.push(e),a={},n.push(a);var l=[],s;for(s in e)e.hasOwnProperty(s)&&l.push(s);for(l.sort(),o=0;o<l.length;o+=1)s=l[o],a[s]=Bu(e[s],t,n,r,s);t.pop(),n.pop()}else a=e;return a}var Uu=new Xn;Uu.tokenize=function(e){return e.slice()};Uu.join=Uu.removeEmpty=function(e){return e};function JH(e,t,n){return Uu.diff(e,t,n)}function ud(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.split(/\r\n|[\n\v\f\r\x85]/),r=e.match(/\r\n|[\n\v\f\r\x85]/g)||[],i=[],o=0;function a(){var u={};for(i.push(u);o<n.length;){var c=n[o];if(/^(\-\-\-|\+\+\+|@@)\s/.test(c))break;var d=/^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(c);d&&(u.index=d[1]),o++}for(l(u),l(u),u.hunks=[];o<n.length;){var f=n[o];if(/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(f))break;if(/^@@/.test(f))u.hunks.push(s());else{if(f&&t.strict)throw new Error("Unknown line "+(o+1)+" "+JSON.stringify(f));o++}}}function l(u){var c=/^(---|\+\+\+)\s+(.*)$/.exec(n[o]);if(c){var d=c[1]==="---"?"old":"new",f=c[2].split(" ",2),p=f[0].replace(/\\\\/g,"\\");/^".*"$/.test(p)&&(p=p.substr(1,p.length-2)),u[d+"FileName"]=p,u[d+"Header"]=(f[1]||"").trim(),o++}}function s(){for(var u=o,c=n[o++],d=c.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/),f={oldStart:+d[1],oldLines:+d[2]||1,newStart:+d[3],newLines:+d[4]||1,lines:[],linedelimiters:[]},p=0,g=0;o<n.length&&!(n[o].indexOf("--- ")===0&&o+2<n.length&&n[o+1].indexOf("+++ ")===0&&n[o+2].indexOf("@@")===0);o++){var h=n[o].length==0&&o!=n.length-1?" ":n[o][0];if(h==="+"||h==="-"||h===" "||h==="\\")f.lines.push(n[o]),f.linedelimiters.push(r[o]||`
164
- `),h==="+"?p++:h==="-"?g++:h===" "&&(p++,g++);else break}if(!p&&f.newLines===1&&(f.newLines=0),!g&&f.oldLines===1&&(f.oldLines=0),t.strict){if(p!==f.newLines)throw new Error("Added line count did not match for hunk at line "+(u+1));if(g!==f.oldLines)throw new Error("Removed line count did not match for hunk at line "+(u+1))}return f}for(;o<n.length;)a();return i}function XH(e,t,n){var r=!0,i=!1,o=!1,a=1;return function l(){if(r&&!o){if(i?a++:r=!1,e+a<=n)return a;o=!0}if(!i)return o||(r=!0),t<=e-a?-a++:(i=!0,l())}}function wN(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(typeof t=="string"&&(t=ud(t)),Array.isArray(t)){if(t.length>1)throw new Error("applyPatch only works with a single input.");t=t[0]}var r=e.split(/\r\n|[\n\v\f\r\x85]/),i=e.match(/\r\n|[\n\v\f\r\x85]/g)||[],o=t.hunks,a=n.compareLine||function(Z,$,ee,P){return $===P},l=0,s=n.fuzzFactor||0,u=0,c=0,d,f;function p(Z,$){for(var ee=0;ee<Z.lines.length;ee++){var P=Z.lines[ee],B=P.length>0?P[0]:" ",F=P.length>0?P.substr(1):P;if(B===" "||B==="-"){if(!a($+1,r[$],B,F)&&(l++,l>s))return!1;$++}}return!0}for(var g=0;g<o.length;g++){for(var h=o[g],w=r.length-h.oldLines,I=0,y=c+h.oldStart-1,b=XH(y,u,w);I!==void 0;I=b())if(p(h,y+I)){h.offset=c+=I;break}if(I===void 0)return!1;u=h.offset+h.oldStart+h.oldLines}for(var x=0,N=0;N<o.length;N++){var M=o[N],S=M.oldStart+M.offset+x-1;x+=M.newLines-M.oldLines,S<0&&(S=0);for(var C=0;C<M.lines.length;C++){var L=M.lines[C],R=L.length>0?L[0]:" ",O=L.length>0?L.substr(1):L,J=M.linedelimiters[C];if(R===" ")S++;else if(R==="-")r.splice(S,1),i.splice(S,1);else if(R==="+")r.splice(S,0,O),i.splice(S,0,J),S++;else if(R==="\\"){var U=M.lines[C-1]?M.lines[C-1][0]:null;U==="+"?d=!0:U==="-"&&(f=!0)}}}if(d)for(;!r[r.length-1];)r.pop(),i.pop();else f&&(r.push(""),i.push(`
165
- `));for(var G=0;G<r.length-1;G++)r[G]=r[G]+i[G];return r.join("")}function qH(e,t){typeof e=="string"&&(e=ud(e));var n=0;function r(){var i=e[n++];if(!i)return t.complete();t.loadFile(i,function(o,a){if(o)return t.complete(o);var l=wN(a,i,t);t.patched(i,l,function(s){if(s)return t.complete(s);r()})})}r()}function fh(e,t,n,r,i,o,a){a||(a={}),typeof a.context>"u"&&(a.context=4);var l=dh(n,r,a);l.push({value:"",lines:[]});function s(I){return I.map(function(y){return" "+y})}for(var u=[],c=0,d=0,f=[],p=1,g=1,h=function(y){var b=l[y],x=b.lines||b.value.replace(/\n$/,"").split(`
166
- `);if(b.lines=x,b.added||b.removed){var N;if(!c){var M=l[y-1];c=p,d=g,M&&(f=a.context>0?s(M.lines.slice(-a.context)):[],c-=f.length,d-=f.length)}(N=f).push.apply(N,or(x.map(function(G){return(b.added?"+":"-")+G}))),b.added?g+=x.length:p+=x.length}else{if(c)if(x.length<=a.context*2&&y<l.length-2){var S;(S=f).push.apply(S,or(s(x)))}else{var C,L=Math.min(x.length,a.context);(C=f).push.apply(C,or(s(x.slice(0,L))));var R={oldStart:c,oldLines:p-c+L,newStart:d,newLines:g-d+L,lines:f};if(y>=l.length-2&&x.length<=a.context){var O=/\n$/.test(n),J=/\n$/.test(r),U=x.length==0&&f.length>R.oldLines;!O&&U&&f.splice(R.oldLines,0,"\"),(!O&&!U||!J)&&f.push("\")}u.push(R),c=0,d=0,f=[]}p+=x.length,g+=x.length}},w=0;w<l.length;w++)h(w);return{oldFileName:e,newFileName:t,oldHeader:i,newHeader:o,hunks:u}}function bN(e,t,n,r,i,o,a){var l=fh(e,t,n,r,i,o,a),s=[];e==t&&s.push("Index: "+e),s.push("==================================================================="),s.push("--- "+l.oldFileName+(typeof l.oldHeader>"u"?"":" "+l.oldHeader)),s.push("+++ "+l.newFileName+(typeof l.newHeader>"u"?"":" "+l.newHeader));for(var u=0;u<l.hunks.length;u++){var c=l.hunks[u];s.push("@@ -"+c.oldStart+","+c.oldLines+" +"+c.newStart+","+c.newLines+" @@"),s.push.apply(s,c.lines)}return s.join(`
163
+ `}},a=[r,n,i,o];return{always:ra(a,"always"),resting:ra(a,"resting"),dragging:ra(a,"dragging"),dropAnimating:ra(a,"dropAnimating"),userCancel:ra(a,"userCancel")}},tn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?v.useLayoutEffect:v.useEffect,wf=function(){var t=document.querySelector("head");return t||Q(!1),t},h0=function(t){var n=document.createElement("style");return t&&n.setAttribute("nonce",t),n.type="text/css",n};function I_(e,t){var n=we(function(){return y_(e)},[e]),r=v.useRef(null),i=v.useRef(null),o=oe(ut(function(d){var f=i.current;f||Q(!1),f.textContent=d}),[]),a=oe(function(d){var f=r.current;f||Q(!1),f.textContent=d},[]);tn(function(){!r.current&&!i.current||Q(!1);var d=h0(t),f=h0(t);return r.current=d,i.current=f,d.setAttribute(bo+"-always",e),f.setAttribute(bo+"-dynamic",e),wf().appendChild(d),wf().appendChild(f),a(n.always),o(n.resting),function(){var p=function(h){var w=h.current;w||Q(!1),wf().removeChild(w),h.current=null};p(r),p(i)}},[t,a,o,n.always,n.resting,e]);var l=oe(function(){return o(n.dragging)},[o,n.dragging]),s=oe(function(d){if(d==="DROP"){o(n.dropAnimating);return}o(n.userCancel)},[o,n.dropAnimating,n.userCancel]),u=oe(function(){i.current&&o(n.resting)},[o,n.resting]),c=we(function(){return{dragging:l,dropping:s,resting:u}},[l,s,u]);return c}var rS=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function id(e){return e instanceof rS(e).HTMLElement}function w_(e,t){var n="["+No.contextId+'="'+e+'"]',r=SN(document.querySelectorAll(n));if(!r.length)return null;var i=Jr(r,function(o){return o.getAttribute(No.draggableId)===t});return!i||!id(i)?null:i}function M_(e){var t=v.useRef({}),n=v.useRef(null),r=v.useRef(null),i=v.useRef(!1),o=oe(function(f,p){var g={id:f,focus:p};return t.current[f]=g,function(){var w=t.current,I=w[f];I!==g&&delete w[f]}},[]),a=oe(function(f){var p=w_(e,f);p&&p!==document.activeElement&&p.focus()},[e]),l=oe(function(f,p){n.current===f&&(n.current=p)},[]),s=oe(function(){r.current||i.current&&(r.current=requestAnimationFrame(function(){r.current=null;var f=n.current;f&&a(f)}))},[a]),u=oe(function(f){n.current=null;var p=document.activeElement;p&&p.getAttribute(No.draggableId)===f&&(n.current=f)},[]);tn(function(){return i.current=!0,function(){i.current=!1;var f=r.current;f&&cancelAnimationFrame(f)}},[]);var c=we(function(){return{register:o,tryRecordFocus:u,tryRestoreFocusRecorded:s,tryShiftRecord:l}},[o,u,s,l]);return c}function x_(){var e={draggables:{},droppables:{}},t=[];function n(d){return t.push(d),function(){var p=t.indexOf(d);p!==-1&&t.splice(p,1)}}function r(d){t.length&&t.forEach(function(f){return f(d)})}function i(d){return e.draggables[d]||null}function o(d){var f=i(d);return f||Q(!1),f}var a={register:function(f){e.draggables[f.descriptor.id]=f,r({type:"ADDITION",value:f})},update:function(f,p){var g=e.draggables[p.descriptor.id];g&&g.uniqueId===f.uniqueId&&(delete e.draggables[p.descriptor.id],e.draggables[f.descriptor.id]=f)},unregister:function(f){var p=f.descriptor.id,g=i(p);g&&f.uniqueId===g.uniqueId&&(delete e.draggables[p],r({type:"REMOVAL",value:f}))},getById:o,findById:i,exists:function(f){return!!i(f)},getAllByType:function(f){return Pu(e.draggables).filter(function(p){return p.descriptor.type===f})}};function l(d){return e.droppables[d]||null}function s(d){var f=l(d);return f||Q(!1),f}var u={register:function(f){e.droppables[f.descriptor.id]=f},unregister:function(f){var p=l(f.descriptor.id);p&&f.uniqueId===p.uniqueId&&delete e.droppables[f.descriptor.id]},getById:s,findById:l,exists:function(f){return!!l(f)},getAllByType:function(f){return Pu(e.droppables).filter(function(p){return p.descriptor.type===f})}};function c(){e.draggables={},e.droppables={},t.length=0}return{draggable:a,droppable:u,subscribe:n,clean:c}}function b_(){var e=we(x_,[]);return v.useEffect(function(){return function(){requestAnimationFrame(e.clean)}},[e]),e}var lh=k.createContext(null),Ou=function(){var e=document.body;return e||Q(!1),e},N_={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},S_=function(t){return"rbd-announcement-"+t};function D_(e){var t=we(function(){return S_(e)},[e]),n=v.useRef(null);v.useEffect(function(){var o=document.createElement("div");return n.current=o,o.id=t,o.setAttribute("aria-live","assertive"),o.setAttribute("aria-atomic","true"),le(o.style,N_),Ou().appendChild(o),function(){setTimeout(function(){var s=Ou();s.contains(o)&&s.removeChild(o),o===n.current&&(n.current=null)})}},[t]);var r=oe(function(i){var o=n.current;if(o){o.textContent=i;return}},[]);return r}var A_=0,C_={separator:"::"};function sh(e,t){return t===void 0&&(t=C_),we(function(){return""+e+t.separator+A_++},[t.separator,e])}function E_(e){var t=e.contextId,n=e.uniqueId;return"rbd-hidden-text-"+t+"-"+n}function T_(e){var t=e.contextId,n=e.text,r=sh("hidden-text",{separator:"-"}),i=we(function(){return E_({contextId:t,uniqueId:r})},[r,t]);return v.useEffect(function(){var a=document.createElement("div");return a.id=i,a.textContent=n,a.style.display="none",Ou().appendChild(a),function(){var s=Ou();s.contains(a)&&s.removeChild(a)}},[i,n]),i}var od=k.createContext(null);function iS(e){var t=v.useRef(e);return v.useEffect(function(){t.current=e}),t}function j_(){var e=null;function t(){return!!e}function n(a){return a===e}function r(a){e&&Q(!1);var l={abandon:a};return e=l,l}function i(){e||Q(!1),e=null}function o(){e&&(e.abandon(),i())}return{isClaimed:t,isActive:n,claim:r,release:i,tryAbandon:o}}var L_=9,P_=13,uh=27,oS=32,R_=33,O_=34,k_=35,z_=36,B_=37,U_=38,$_=39,__=40,Is,F_=(Is={},Is[P_]=!0,Is[L_]=!0,Is),aS=function(e){F_[e.keyCode]&&e.preventDefault()},ad=function(){var e="visibilitychange";if(typeof document>"u")return e;var t=[e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],n=Jr(t,function(r){return"on"+r in document});return n||e}(),lS=0,v0=5;function H_(e,t){return Math.abs(t.x-e.x)>=v0||Math.abs(t.y-e.y)>=v0}var y0={type:"IDLE"};function G_(e){var t=e.cancel,n=e.completed,r=e.getPhase,i=e.setPhase;return[{eventName:"mousemove",fn:function(a){var l=a.button,s=a.clientX,u=a.clientY;if(l===lS){var c={x:s,y:u},d=r();if(d.type==="DRAGGING"){a.preventDefault(),d.actions.move(c);return}d.type!=="PENDING"&&Q(!1);var f=d.point;if(H_(f,c)){a.preventDefault();var p=d.actions.fluidLift(c);i({type:"DRAGGING",actions:p})}}}},{eventName:"mouseup",fn:function(a){var l=r();if(l.type!=="DRAGGING"){t();return}a.preventDefault(),l.actions.drop({shouldBlockNextClick:!0}),n()}},{eventName:"mousedown",fn:function(a){r().type==="DRAGGING"&&a.preventDefault(),t()}},{eventName:"keydown",fn:function(a){var l=r();if(l.type==="PENDING"){t();return}if(a.keyCode===uh){a.preventDefault(),t();return}aS(a)}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){r().type==="PENDING"&&t()}},{eventName:"webkitmouseforcedown",fn:function(a){var l=r();if(l.type==="IDLE"&&Q(!1),l.actions.shouldRespectForcePress()){t();return}a.preventDefault()}},{eventName:ad,fn:t}]}function W_(e){var t=v.useRef(y0),n=v.useRef(kr),r=we(function(){return{eventName:"mousedown",fn:function(d){if(!d.defaultPrevented&&d.button===lS&&!(d.ctrlKey||d.metaKey||d.shiftKey||d.altKey)){var f=e.findClosestDraggableId(d);if(f){var p=e.tryGetLock(f,a,{sourceEvent:d});if(p){d.preventDefault();var g={x:d.clientX,y:d.clientY};n.current(),u(p,g)}}}}}},[e]),i=we(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(d){if(!d.defaultPrevented){var f=e.findClosestDraggableId(d);if(f){var p=e.findOptionsForDraggable(f);p&&(p.shouldRespectForcePress||e.canGetLock(f)&&d.preventDefault())}}}}},[e]),o=oe(function(){var d={passive:!1,capture:!0};n.current=vn(window,[i,r],d)},[i,r]),a=oe(function(){var c=t.current;c.type!=="IDLE"&&(t.current=y0,n.current(),o())},[o]),l=oe(function(){var c=t.current;a(),c.type==="DRAGGING"&&c.actions.cancel({shouldBlockNextClick:!0}),c.type==="PENDING"&&c.actions.abort()},[a]),s=oe(function(){var d={capture:!0,passive:!1},f=G_({cancel:l,completed:a,getPhase:function(){return t.current},setPhase:function(g){t.current=g}});n.current=vn(window,f,d)},[l,a]),u=oe(function(d,f){t.current.type!=="IDLE"&&Q(!1),t.current={type:"PENDING",point:f,actions:d},s()},[s]);tn(function(){return o(),function(){n.current()}},[o])}var ki;function V_(){}var Z_=(ki={},ki[O_]=!0,ki[R_]=!0,ki[z_]=!0,ki[k_]=!0,ki);function Y_(e,t){function n(){t(),e.cancel()}function r(){t(),e.drop()}return[{eventName:"keydown",fn:function(o){if(o.keyCode===uh){o.preventDefault(),n();return}if(o.keyCode===oS){o.preventDefault(),r();return}if(o.keyCode===__){o.preventDefault(),e.moveDown();return}if(o.keyCode===U_){o.preventDefault(),e.moveUp();return}if(o.keyCode===$_){o.preventDefault(),e.moveRight();return}if(o.keyCode===B_){o.preventDefault(),e.moveLeft();return}if(Z_[o.keyCode]){o.preventDefault();return}aS(o)}},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:ad,fn:n}]}function Q_(e){var t=v.useRef(V_),n=we(function(){return{eventName:"keydown",fn:function(o){if(o.defaultPrevented||o.keyCode!==oS)return;var a=e.findClosestDraggableId(o);if(!a)return;var l=e.tryGetLock(a,c,{sourceEvent:o});if(!l)return;o.preventDefault();var s=!0,u=l.snapLift();t.current();function c(){s||Q(!1),s=!1,t.current(),r()}t.current=vn(window,Y_(u,c),{capture:!0,passive:!1})}}},[e]),r=oe(function(){var o={passive:!1,capture:!0};t.current=vn(window,[n],o)},[n]);tn(function(){return r(),function(){t.current()}},[r])}var Mf={type:"IDLE"},J_=120,X_=.15;function q_(e){var t=e.cancel,n=e.getPhase;return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:function(i){i.preventDefault()}},{eventName:"keydown",fn:function(i){if(n().type!=="DRAGGING"){t();return}i.keyCode===uh&&i.preventDefault(),t()}},{eventName:ad,fn:t}]}function K_(e){var t=e.cancel,n=e.completed,r=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(o){var a=r();if(a.type!=="DRAGGING"){t();return}a.hasMoved=!0;var l=o.touches[0],s=l.clientX,u=l.clientY,c={x:s,y:u};o.preventDefault(),a.actions.move(c)}},{eventName:"touchend",fn:function(o){var a=r();if(a.type!=="DRAGGING"){t();return}o.preventDefault(),a.actions.drop({shouldBlockNextClick:!0}),n()}},{eventName:"touchcancel",fn:function(o){if(r().type!=="DRAGGING"){t();return}o.preventDefault(),t()}},{eventName:"touchforcechange",fn:function(o){var a=r();a.type==="IDLE"&&Q(!1);var l=o.touches[0];if(l){var s=l.force>=X_;if(s){var u=a.actions.shouldRespectForcePress();if(a.type==="PENDING"){u&&t();return}if(u){if(a.hasMoved){o.preventDefault();return}t();return}o.preventDefault()}}}},{eventName:ad,fn:t}]}function eF(e){var t=v.useRef(Mf),n=v.useRef(kr),r=oe(function(){return t.current},[]),i=oe(function(p){t.current=p},[]),o=we(function(){return{eventName:"touchstart",fn:function(p){if(!p.defaultPrevented){var g=e.findClosestDraggableId(p);if(g){var h=e.tryGetLock(g,l,{sourceEvent:p});if(h){var w=p.touches[0],I=w.clientX,y=w.clientY,M={x:I,y};n.current(),d(h,M)}}}}}},[e]),a=oe(function(){var p={capture:!0,passive:!1};n.current=vn(window,[o],p)},[o]),l=oe(function(){var f=t.current;f.type!=="IDLE"&&(f.type==="PENDING"&&clearTimeout(f.longPressTimerId),i(Mf),n.current(),a())},[a,i]),s=oe(function(){var f=t.current;l(),f.type==="DRAGGING"&&f.actions.cancel({shouldBlockNextClick:!0}),f.type==="PENDING"&&f.actions.abort()},[l]),u=oe(function(){var p={capture:!0,passive:!1},g={cancel:s,completed:l,getPhase:r},h=vn(window,K_(g),p),w=vn(window,q_(g),p);n.current=function(){h(),w()}},[s,r,l]),c=oe(function(){var p=r();p.type!=="PENDING"&&Q(!1);var g=p.actions.fluidLift(p.point);i({type:"DRAGGING",actions:g,hasMoved:!1})},[r,i]),d=oe(function(p,g){r().type!=="IDLE"&&Q(!1);var h=setTimeout(c,J_);i({type:"PENDING",point:g,actions:p,longPressTimerId:h}),u()},[u,r,i,c]);tn(function(){return a(),function(){n.current();var g=r();g.type==="PENDING"&&(clearTimeout(g.longPressTimerId),i(Mf))}},[r,a,i]),tn(function(){var p=vn(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return p},[])}var tF={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function sS(e,t){if(t==null)return!1;var n=!!tF[t.tagName.toLowerCase()];if(n)return!0;var r=t.getAttribute("contenteditable");return r==="true"||r===""?!0:t===e?!1:sS(e,t.parentElement)}function nF(e,t){var n=t.target;return id(n)?sS(e,n):!1}var rF=function(e){return Tn(e.getBoundingClientRect()).center};function iF(e){return e instanceof rS(e).Element}var oF=function(){var e="matches";if(typeof document>"u")return e;var t=[e,"msMatchesSelector","webkitMatchesSelector"],n=Jr(t,function(r){return r in Element.prototype});return n||e}();function uS(e,t){return e==null?null:e[oF](t)?e:uS(e.parentElement,t)}function aF(e,t){return e.closest?e.closest(t):uS(e,t)}function lF(e){return"["+No.contextId+'="'+e+'"]'}function sF(e,t){var n=t.target;if(!iF(n))return null;var r=lF(e),i=aF(n,r);return!i||!id(i)?null:i}function uF(e,t){var n=sF(e,t);return n?n.getAttribute(No.draggableId):null}function cF(e,t){var n="["+Vp.contextId+'="'+e+'"]',r=SN(document.querySelectorAll(n)),i=Jr(r,function(o){return o.getAttribute(Vp.id)===t});return!i||!id(i)?null:i}function dF(e){e.preventDefault()}function ws(e){var t=e.expected,n=e.phase,r=e.isLockActive;return e.shouldWarn,!(!r()||t!==n)}function cS(e){var t=e.lockAPI,n=e.store,r=e.registry,i=e.draggableId;if(t.isClaimed())return!1;var o=r.draggable.findById(i);return!(!o||!o.options.isEnabled||!KN(n.getState(),i))}function fF(e){var t=e.lockAPI,n=e.contextId,r=e.store,i=e.registry,o=e.draggableId,a=e.forceSensorStop,l=e.sourceEvent,s=cS({lockAPI:t,store:r,registry:i,draggableId:o});if(!s)return null;var u=i.draggable.getById(o),c=cF(n,u.descriptor.id);if(!c||l&&!u.options.canDragInteractiveElements&&nF(c,l))return null;var d=t.claim(a||kr),f="PRE_DRAG";function p(){return u.options.shouldRespectForcePress}function g(){return t.isActive(d)}function h(b,N){ws({expected:b,phase:f,isLockActive:g,shouldWarn:!0})&&r.dispatch(N())}var w=h.bind(null,"DRAGGING");function I(b){function N(){t.release(),f="COMPLETED"}f!=="PRE_DRAG"&&(N(),f!=="PRE_DRAG"&&Q(!1)),r.dispatch(o$(b.liftActionArgs)),f="DRAGGING";function C(P,R){if(R===void 0&&(R={shouldBlockNextClick:!1}),b.cleanup(),R.shouldBlockNextClick){var O=vn(window,[{eventName:"click",fn:dF,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(O)}N(),r.dispatch(VN({reason:P}))}return le({isActive:function(){return ws({expected:"DRAGGING",phase:f,isLockActive:g,shouldWarn:!1})},shouldRespectForcePress:p,drop:function(R){return C("DROP",R)},cancel:function(R){return C("CANCEL",R)}},b.actions)}function y(b){var N=Ka(function(P){w(function(){return WN({client:P})})}),C=I({liftActionArgs:{id:o,clientSelection:b,movementMode:"FLUID"},cleanup:function(){return N.cancel()},actions:{move:N}});return le({},C,{move:N})}function M(){var b={moveUp:function(){return w(m$)},moveRight:function(){return w(h$)},moveDown:function(){return w(g$)},moveLeft:function(){return w(v$)}};return I({liftActionArgs:{id:o,clientSelection:rF(c),movementMode:"SNAP"},cleanup:kr,actions:b})}function x(){var b=ws({expected:"PRE_DRAG",phase:f,isLockActive:g,shouldWarn:!0});b&&t.release()}var S={isActive:function(){return ws({expected:"PRE_DRAG",phase:f,isLockActive:g,shouldWarn:!1})},shouldRespectForcePress:p,fluidLift:y,snapLift:M,abort:x};return S}var pF=[W_,Q_,eF];function mF(e){var t=e.contextId,n=e.store,r=e.registry,i=e.customSensors,o=e.enableDefaultSensors,a=[].concat(o?pF:[],i||[]),l=v.useState(function(){return j_()})[0],s=oe(function(y,M){y.isDragging&&!M.isDragging&&l.tryAbandon()},[l]);tn(function(){var y=n.getState(),M=n.subscribe(function(){var x=n.getState();s(y,x),y=x});return M},[l,n,s]),tn(function(){return l.tryAbandon},[l.tryAbandon]);for(var u=oe(function(I){return cS({lockAPI:l,registry:r,store:n,draggableId:I})},[l,r,n]),c=oe(function(I,y,M){return fF({lockAPI:l,registry:r,contextId:t,store:n,draggableId:I,forceSensorStop:y,sourceEvent:M&&M.sourceEvent?M.sourceEvent:null})},[t,l,r,n]),d=oe(function(I){return uF(t,I)},[t]),f=oe(function(I){var y=r.draggable.findById(I);return y?y.options:null},[r.draggable]),p=oe(function(){l.isClaimed()&&(l.tryAbandon(),n.getState().phase!=="IDLE"&&n.dispatch(Kg()))},[l,n]),g=oe(l.isClaimed,[l]),h=we(function(){return{canGetLock:u,tryGetLock:c,findClosestDraggableId:d,findOptionsForDraggable:f,tryReleaseLock:p,isLockClaimed:g}},[u,c,d,f,p,g]),w=0;w<a.length;w++)a[w](h)}var gF=function(t){return{onBeforeCapture:t.onBeforeCapture,onBeforeDragStart:t.onBeforeDragStart,onDragStart:t.onDragStart,onDragEnd:t.onDragEnd,onDragUpdate:t.onDragUpdate}};function ia(e){return e.current||Q(!1),e.current}function hF(e){var t=e.contextId,n=e.setCallbacks,r=e.sensors,i=e.nonce,o=e.dragHandleUsageInstructions,a=v.useRef(null),l=iS(e),s=oe(function(){return gF(l.current)},[l]),u=D_(t),c=T_({contextId:t,text:o}),d=I_(t,i),f=oe(function(P){ia(a).dispatch(P)},[]),p=we(function(){return _y({publishWhileDragging:l$,updateDroppableScroll:u$,updateDroppableIsEnabled:c$,updateDroppableIsCombineEnabled:d$,collectionStarting:s$},f)},[f]),g=b_(),h=we(function(){return X$(g,p)},[g,p]),w=we(function(){return m_(le({scrollWindow:q$,scrollDroppable:h.scrollDroppable},_y({move:WN},f)))},[h.scrollDroppable,f]),I=M_(t),y=we(function(){return Z$({announce:u,autoScroller:w,dimensionMarshal:h,focusMarshal:I,getResponders:s,styleMarshal:d})},[u,w,h,I,s,d]);a.current=y;var M=oe(function(){var P=ia(a),R=P.getState();R.phase!=="IDLE"&&P.dispatch(Kg())},[]),x=oe(function(){var P=ia(a).getState();return P.isDragging||P.phase==="DROP_ANIMATING"},[]),S=we(function(){return{isDragging:x,tryAbort:M}},[x,M]);n(S);var b=oe(function(P){return KN(ia(a).getState(),P)},[]),N=oe(function(){return ni(ia(a).getState())},[]),C=we(function(){return{marshal:h,focus:I,contextId:t,canLift:b,isMovementAllowed:N,dragHandleUsageInstructionsId:c,registry:g}},[t,h,c,I,b,N,g]);return mF({contextId:t,store:y,registry:g,customSensors:r,enableDefaultSensors:e.enableDefaultSensors!==!1}),v.useEffect(function(){return M},[M]),k.createElement(od.Provider,{value:C},k.createElement(zB,{context:lh,store:y},e.children))}var vF=0;function yF(){return we(function(){return""+vF++},[])}function IF(e){var t=yF(),n=e.dragHandleUsageInstructions||$s.dragHandleUsageInstructions;return k.createElement(QU,null,function(r){return k.createElement(hF,{nonce:e.nonce,contextId:t,setCallbacks:r,dragHandleUsageInstructions:n,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd},e.children)})}var dS=function(t){return function(n){return t===n}},wF=dS("scroll"),MF=dS("auto"),I0=function(t,n){return n(t.overflowX)||n(t.overflowY)},xF=function(t){var n=window.getComputedStyle(t),r={overflowX:n.overflowX,overflowY:n.overflowY};return I0(r,wF)||I0(r,MF)},bF=function(){return!1},NF=function e(t){return t==null?null:t===document.body?bF()?t:null:t===document.documentElement?null:xF(t)?t:e(t.parentElement)},Zp=function(e){return{x:e.scrollLeft,y:e.scrollTop}},SF=function e(t){if(!t)return!1;var n=window.getComputedStyle(t);return n.position==="fixed"?!0:e(t.parentElement)},DF=function(e){var t=NF(e),n=SF(e);return{closestScrollable:t,isFixedOnPage:n}},AF=function(e){var t=e.descriptor,n=e.isEnabled,r=e.isCombineEnabled,i=e.isFixedOnPage,o=e.direction,a=e.client,l=e.page,s=e.closest,u=function(){if(!s)return null;var p=s.scrollSize,g=s.client,h=JN({scrollHeight:p.scrollHeight,scrollWidth:p.scrollWidth,height:g.paddingBox.height,width:g.paddingBox.width});return{pageMarginBox:s.page.marginBox,frameClient:g,scrollSize:p,shouldClipSubject:s.shouldClipSubject,scroll:{initial:s.scroll,current:s.scroll,max:h,diff:{value:ct,displacement:ct}}}}(),c=o==="vertical"?Yg:TN,d=xo({page:l,withPlaceholder:null,axis:c,frame:u}),f={descriptor:t,isCombineEnabled:r,isFixedOnPage:i,axis:c,isEnabled:n,client:a,page:l,frame:u,subject:d};return f},CF=function(t,n){var r=wN(t);if(!n||t!==n)return r;var i=r.paddingBox.top-n.scrollTop,o=r.paddingBox.left-n.scrollLeft,a=i+n.scrollHeight,l=o+n.scrollWidth,s={top:i,right:l,bottom:a,left:o},u=Hg(s,r.border),c=Gg({borderBox:u,margin:r.margin,border:r.border,padding:r.padding});return c},EF=function(e){var t=e.ref,n=e.descriptor,r=e.env,i=e.windowScroll,o=e.direction,a=e.isDropDisabled,l=e.isCombineEnabled,s=e.shouldClipSubject,u=r.closestScrollable,c=CF(t,u),d=Tu(c,i),f=function(){if(!u)return null;var g=wN(u),h={scrollHeight:u.scrollHeight,scrollWidth:u.scrollWidth};return{client:g,page:Tu(g,i),scroll:Zp(u),scrollSize:h,shouldClipSubject:s}}(),p=AF({descriptor:n,isEnabled:!a,isCombineEnabled:l,isFixedOnPage:r.isFixedOnPage,direction:o,client:c,page:d,closest:f});return p},TF={passive:!1},jF={passive:!0},w0=function(e){return e.shouldPublishImmediately?TF:jF};function ku(e){var t=v.useContext(e);return t||Q(!1),t}var Ms=function(t){return t&&t.env.closestScrollable||null};function LF(e){var t=v.useRef(null),n=ku(od),r=sh("droppable"),i=n.registry,o=n.marshal,a=iS(e),l=we(function(){return{id:e.droppableId,type:e.type,mode:e.mode}},[e.droppableId,e.mode,e.type]),s=v.useRef(l),u=we(function(){return ut(function(x,S){t.current||Q(!1);var b={x,y:S};o.updateDroppableScroll(l.id,b)})},[l.id,o]),c=oe(function(){var x=t.current;return!x||!x.env.closestScrollable?ct:Zp(x.env.closestScrollable)},[]),d=oe(function(){var x=c();u(x.x,x.y)},[c,u]),f=we(function(){return Ka(d)},[d]),p=oe(function(){var x=t.current,S=Ms(x);x&&S||Q(!1);var b=x.scrollOptions;if(b.shouldPublishImmediately){d();return}f()},[f,d]),g=oe(function(x,S){t.current&&Q(!1);var b=a.current,N=b.getDroppableRef();N||Q(!1);var C=DF(N),P={ref:N,descriptor:l,env:C,scrollOptions:S};t.current=P;var R=EF({ref:N,descriptor:l,env:C,windowScroll:x,direction:b.direction,isDropDisabled:b.isDropDisabled,isCombineEnabled:b.isCombineEnabled,shouldClipSubject:!b.ignoreContainerClipping}),O=C.closestScrollable;return O&&(O.setAttribute(g0.contextId,n.contextId),O.addEventListener("scroll",p,w0(P.scrollOptions))),R},[n.contextId,l,p,a]),h=oe(function(){var x=t.current,S=Ms(x);return x&&S||Q(!1),Zp(S)},[]),w=oe(function(){var x=t.current;x||Q(!1);var S=Ms(x);t.current=null,S&&(f.cancel(),S.removeAttribute(g0.contextId),S.removeEventListener("scroll",p,w0(x.scrollOptions)))},[p,f]),I=oe(function(x){var S=t.current;S||Q(!1);var b=Ms(S);b||Q(!1),b.scrollTop+=x.y,b.scrollLeft+=x.x},[]),y=we(function(){return{getDimensionAndWatchScroll:g,getScrollWhileDragging:h,dragStopped:w,scroll:I}},[w,g,h,I]),M=we(function(){return{uniqueId:r,descriptor:l,callbacks:y}},[y,l,r]);tn(function(){return s.current=M.descriptor,i.droppable.register(M),function(){t.current&&w(),i.droppable.unregister(M)}},[y,l,w,M,o,i.droppable]),tn(function(){t.current&&o.updateDroppableIsEnabled(s.current.id,!e.isDropDisabled)},[e.isDropDisabled,o]),tn(function(){t.current&&o.updateDroppableIsCombineEnabled(s.current.id,e.isCombineEnabled)},[e.isCombineEnabled,o])}function xf(){}var M0={width:0,height:0,margin:t5},PF=function(t){var n=t.isAnimatingOpenOnMount,r=t.placeholder,i=t.animate;return n||i==="close"?M0:{height:r.client.borderBox.height,width:r.client.borderBox.width,margin:r.client.margin}},RF=function(t){var n=t.isAnimatingOpenOnMount,r=t.placeholder,i=t.animate,o=PF({isAnimatingOpenOnMount:n,placeholder:r,animate:i});return{display:r.display,boxSizing:"border-box",width:o.width,height:o.height,marginTop:o.margin.top,marginRight:o.margin.right,marginBottom:o.margin.bottom,marginLeft:o.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:i!=="none"?Ta.placeholder:null}};function OF(e){var t=v.useRef(null),n=oe(function(){t.current&&(clearTimeout(t.current),t.current=null)},[]),r=e.animate,i=e.onTransitionEnd,o=e.onClose,a=e.contextId,l=v.useState(e.animate==="open"),s=l[0],u=l[1];v.useEffect(function(){return s?r!=="open"?(n(),u(!1),xf):t.current?xf:(t.current=setTimeout(function(){t.current=null,u(!1)}),n):xf},[r,s,n]);var c=oe(function(f){f.propertyName==="height"&&(i(),r==="close"&&o())},[r,o,i]),d=RF({isAnimatingOpenOnMount:s,animate:e.animate,placeholder:e.placeholder});return k.createElement(e.placeholder.tagName,{style:d,"data-rbd-placeholder-context-id":a,onTransitionEnd:c,ref:e.innerRef})}var kF=k.memo(OF),ch=k.createContext(null),zF=function(e){Kb(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return r=e.call.apply(e,[this].concat(o))||this,r.state={isVisible:!!r.props.on,data:r.props.on,animate:r.props.shouldAnimate&&r.props.on?"open":"none"},r.onClose=function(){r.state.animate==="close"&&r.setState({isVisible:!1})},r}t.getDerivedStateFromProps=function(i,o){return i.shouldAnimate?i.on?{isVisible:!0,data:i.on,animate:"open"}:o.isVisible?{isVisible:!0,data:o.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!i.on,data:i.on,animate:"none"}};var n=t.prototype;return n.render=function(){if(!this.state.isVisible)return null;var i={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(i)},t}(k.PureComponent),x0={dragging:5e3,dropAnimating:4500},BF=function(t,n){return n?Ta.drop(n.duration):t?Ta.snap:Ta.fluid},UF=function(t,n){return t?n?rl.opacity.drop:rl.opacity.combining:null},$F=function(t){return t.forceShouldAnimate!=null?t.forceShouldAnimate:t.mode==="SNAP"};function _F(e){var t=e.dimension,n=t.client,r=e.offset,i=e.combineWith,o=e.dropping,a=!!i,l=$F(e),s=!!o,u=s?Gp.drop(r,a):Gp.moveTo(r),c={position:"fixed",top:n.marginBox.top,left:n.marginBox.left,boxSizing:"border-box",width:n.borderBox.width,height:n.borderBox.height,transition:BF(l,o),transform:u,opacity:UF(a,s),zIndex:s?x0.dropAnimating:x0.dragging,pointerEvents:"none"};return c}function FF(e){return{transform:Gp.moveTo(e.offset),transition:e.shouldAnimateDisplacement?null:"none"}}function HF(e){return e.type==="DRAGGING"?_F(e):FF(e)}function GF(e,t,n){n===void 0&&(n=ct);var r=window.getComputedStyle(t),i=t.getBoundingClientRect(),o=IN(i,r),a=Tu(o,n),l={client:o,tagName:t.tagName.toLowerCase(),display:r.display},s={x:o.marginBox.width,y:o.marginBox.height},u={descriptor:e,placeholder:l,displaceBy:s,client:o,page:a};return u}function WF(e){var t=sh("draggable"),n=e.descriptor,r=e.registry,i=e.getDraggableRef,o=e.canDragInteractiveElements,a=e.shouldRespectForcePress,l=e.isEnabled,s=we(function(){return{canDragInteractiveElements:o,shouldRespectForcePress:a,isEnabled:l}},[o,l,a]),u=oe(function(p){var g=i();return g||Q(!1),GF(n,g,p)},[n,i]),c=we(function(){return{uniqueId:t,descriptor:n,options:s,getDimension:u}},[n,u,s,t]),d=v.useRef(c),f=v.useRef(!0);tn(function(){return r.draggable.register(d.current),function(){return r.draggable.unregister(d.current)}},[r.draggable]),tn(function(){if(f.current){f.current=!1;return}var p=d.current;d.current=c,r.draggable.update(c,p)},[c,r.draggable])}function VF(e){e.preventDefault()}function ZF(e){var t=v.useRef(null),n=oe(function(P){t.current=P},[]),r=oe(function(){return t.current},[]),i=ku(od),o=i.contextId,a=i.dragHandleUsageInstructionsId,l=i.registry,s=ku(ch),u=s.type,c=s.droppableId,d=we(function(){return{id:e.draggableId,index:e.index,type:u,droppableId:c}},[e.draggableId,e.index,u,c]),f=e.children,p=e.draggableId,g=e.isEnabled,h=e.shouldRespectForcePress,w=e.canDragInteractiveElements,I=e.isClone,y=e.mapped,M=e.dropAnimationFinished;if(!I){var x=we(function(){return{descriptor:d,registry:l,getDraggableRef:r,canDragInteractiveElements:w,shouldRespectForcePress:h,isEnabled:g}},[d,l,r,w,h,g]);WF(x)}var S=we(function(){return g?{tabIndex:0,role:"button","aria-describedby":a,"data-rbd-drag-handle-draggable-id":p,"data-rbd-drag-handle-context-id":o,draggable:!1,onDragStart:VF}:null},[o,a,p,g]),b=oe(function(P){y.type==="DRAGGING"&&y.dropping&&P.propertyName==="transform"&&M()},[M,y]),N=we(function(){var P=HF(y),R=y.type==="DRAGGING"&&y.dropping?b:null,O={innerRef:n,draggableProps:{"data-rbd-draggable-context-id":o,"data-rbd-draggable-id":p,style:P,onTransitionEnd:R},dragHandleProps:S};return O},[o,S,p,y,b,n]),C=we(function(){return{draggableId:d.id,type:d.type,source:{index:d.index,droppableId:d.droppableId}}},[d.droppableId,d.id,d.index,d.type]);return f(N,y.snapshot,C)}var fS=function(e,t){return e===t},pS=function(e){var t=e.combine,n=e.destination;return n?n.droppableId:t?t.droppableId:null},YF=function(t){return t.combine?t.combine.draggableId:null},QF=function(t){return t.at&&t.at.type==="COMBINE"?t.at.combine.draggableId:null};function JF(){var e=ut(function(i,o){return{x:i,y:o}}),t=ut(function(i,o,a,l,s){return{isDragging:!0,isClone:o,isDropAnimating:!!s,dropAnimation:s,mode:i,draggingOver:a,combineWith:l,combineTargetFor:null}}),n=ut(function(i,o,a,l,s,u,c){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:s,combineWith:u,mode:o,offset:i,dimension:a,forceShouldAnimate:c,snapshot:t(o,l,s,u,null)}}}),r=function(o,a){if(o.isDragging){if(o.critical.draggable.id!==a.draggableId)return null;var l=o.current.client.offset,s=o.dimensions.draggables[a.draggableId],u=en(o.impact),c=QF(o.impact),d=o.forceShouldAnimate;return n(e(l.x,l.y),o.movementMode,s,a.isClone,u,c,d)}if(o.phase==="DROP_ANIMATING"){var f=o.completed;if(f.result.draggableId!==a.draggableId)return null;var p=a.isClone,g=o.dimensions.draggables[a.draggableId],h=f.result,w=h.mode,I=pS(h),y=YF(h),M=o.dropDuration,x={duration:M,curve:th.drop,moveTo:o.newHomeClientOffset,opacity:y?rl.opacity.drop:null,scale:y?rl.scale.drop:null};return{mapped:{type:"DRAGGING",offset:o.newHomeClientOffset,dimension:g,dropping:x,draggingOver:I,combineWith:y,mode:w,forceShouldAnimate:null,snapshot:t(w,p,I,y,x)}}}return null};return r}function mS(e){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}var XF={mapped:{type:"SECONDARY",offset:ct,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:mS(null)}};function qF(){var e=ut(function(a,l){return{x:a,y:l}}),t=ut(mS),n=ut(function(a,l,s){return l===void 0&&(l=null),{mapped:{type:"SECONDARY",offset:a,combineTargetFor:l,shouldAnimateDisplacement:s,snapshot:t(l)}}}),r=function(l){return l?n(ct,l,!0):null},i=function(l,s,u,c){var d=u.displaced.visible[l],f=!!(c.inVirtualList&&c.effected[l]),p=td(u),g=p&&p.draggableId===l?s:null;if(!d){if(!f)return r(g);if(u.displaced.invisible[l])return null;var h=Ro(c.displacedBy.point),w=e(h.x,h.y);return n(w,g,!0)}if(f)return r(g);var I=u.displacedBy.point,y=e(I.x,I.y);return n(y,g,d.shouldAnimate)},o=function(l,s){if(l.isDragging)return l.critical.draggable.id===s.draggableId?null:i(s.draggableId,l.critical.draggable.id,l.impact,l.afterCritical);if(l.phase==="DROP_ANIMATING"){var u=l.completed;return u.result.draggableId===s.draggableId?null:i(s.draggableId,u.result.draggableId,u.impact,u.afterCritical)}return null};return o}var KF=function(){var t=JF(),n=qF(),r=function(o,a){return t(o,a)||n(o,a)||XF};return r},eH={dropAnimationFinished:ZN},tH=vN(KF,eH,null,{context:lh,pure:!0,areStatePropsEqual:fS})(ZF);function gS(e){var t=ku(ch),n=t.isUsingCloneFor;return n===e.draggableId&&!e.isClone?null:k.createElement(tH,e)}function nH(e){var t=typeof e.isDragDisabled=="boolean"?!e.isDragDisabled:!0,n=!!e.disableInteractiveElementBlocking,r=!!e.shouldRespectForcePress;return k.createElement(gS,le({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}function rH(e){var t=v.useContext(od);t||Q(!1);var n=t.contextId,r=t.isMovementAllowed,i=v.useRef(null),o=v.useRef(null),a=e.children,l=e.droppableId,s=e.type,u=e.mode,c=e.direction,d=e.ignoreContainerClipping,f=e.isDropDisabled,p=e.isCombineEnabled,g=e.snapshot,h=e.useClone,w=e.updateViewportMaxScroll,I=e.getContainerForClone,y=oe(function(){return i.current},[]),M=oe(function(O){i.current=O},[]);oe(function(){return o.current},[]);var x=oe(function(O){o.current=O},[]),S=oe(function(){r()&&w({maxScroll:qN()})},[r,w]);LF({droppableId:l,type:s,mode:u,direction:c,isDropDisabled:f,isCombineEnabled:p,ignoreContainerClipping:d,getDroppableRef:y});var b=k.createElement(zF,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},function(O){var J=O.onClose,U=O.data,W=O.animate;return k.createElement(kF,{placeholder:U,onClose:J,innerRef:x,animate:W,contextId:n,onTransitionEnd:S})}),N=we(function(){return{innerRef:M,placeholder:b,droppableProps:{"data-rbd-droppable-id":l,"data-rbd-droppable-context-id":n}}},[n,l,b,M]),C=h?h.dragging.draggableId:null,P=we(function(){return{droppableId:l,type:s,isUsingCloneFor:C}},[l,C,s]);function R(){if(!h)return null;var O=h.dragging,J=h.render,U=k.createElement(gS,{draggableId:O.draggableId,index:O.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},function(W,Z){return J(W,Z,O)});return lM.createPortal(U,I())}return k.createElement(ch.Provider,{value:P},a(N,g),R())}var bf=function(t,n){return t===n.droppable.type},b0=function(t,n){return n.draggables[t.draggable.id]},iH=function(){var t={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},n=le({},t,{shouldAnimatePlaceholder:!1}),r=ut(function(a){return{draggableId:a.id,type:a.type,source:{index:a.index,droppableId:a.droppableId}}}),i=ut(function(a,l,s,u,c,d){var f=c.descriptor.id,p=c.descriptor.droppableId===a;if(p){var g=d?{render:d,dragging:r(c.descriptor)}:null,h={isDraggingOver:s,draggingOverWith:s?f:null,draggingFromThisWith:f,isUsingPlaceholder:!0};return{placeholder:c.placeholder,shouldAnimatePlaceholder:!1,snapshot:h,useClone:g}}if(!l)return n;if(!u)return t;var w={isDraggingOver:s,draggingOverWith:f,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:c.placeholder,shouldAnimatePlaceholder:!0,snapshot:w,useClone:null}}),o=function(l,s){var u=s.droppableId,c=s.type,d=!s.isDropDisabled,f=s.renderClone;if(l.isDragging){var p=l.critical;if(!bf(c,p))return n;var g=b0(p,l.dimensions),h=en(l.impact)===u;return i(u,d,h,h,g,f)}if(l.phase==="DROP_ANIMATING"){var w=l.completed;if(!bf(c,w.critical))return n;var I=b0(w.critical,l.dimensions);return i(u,d,pS(w.result)===u,en(w.impact)===u,I,f)}if(l.phase==="IDLE"&&l.completed&&!l.shouldFlush){var y=l.completed;if(!bf(c,y.critical))return n;var M=en(y.impact)===u,x=!!(y.impact.at&&y.impact.at.type==="COMBINE"),S=y.critical.droppable.id===u;return M?x?t:n:S?t:n}return n};return o},oH={updateViewportMaxScroll:p$};function aH(){return document.body||Q(!1),document.body}var lH={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:aH},hS=vN(iH,oH,null,{context:lh,pure:!0,areStatePropsEqual:fS})(rH);hS.defaultProps=lH;const sH=3,uH=({onClick:e,stackType:t,policyManager:n})=>{var s;const[r,i]=v.useState(!1),o=()=>{i(!r)},a=((s=n.policiesUsageInfo)==null?void 0:s.filter(u=>Qi(u.policyType)===t).sort((u,c)=>c.operations.length-u.operations.length))??[];let l=a;return r||(l=a.slice(0,sH)),l.length===0?null:m.jsxs("div",{className:"flex flex-col w-full",children:[m.jsx("p",{className:"text-gray-500 font-semibold text-md pb-2",children:"EXISTING POLICIES"}),m.jsx("div",{className:"grid grid-cols-3 gap-2 h-fit max-h-40 overflow-y-auto",children:l.map(u=>{const c=jl(u.policyType),d=()=>e(u,u.policyType),f=u.operations.length;return m.jsxs("button",{type:"button",onClick:d,className:"flex flex-col items-center justify-content-center h-16 border border-gray-300 shadow-sm rounded bg-gray-50 hover:bg-gray-200 p-3",children:[m.jsxs("div",{className:"h-full flex flex-row items-center justify-content-center",children:[m.jsx("img",{className:"w-6 h-6 mr-2",src:c==null?void 0:c.icon,alt:u.policyType}),m.jsx("div",{className:"text-md font-semibold truncate w-64",children:u.name})]}),m.jsx("p",{className:"w-full text-sm text-gray-400",children:`Used in ${f} ${f>1?"routes":"route"}`})]},u.name)})}),a.length>l.length&&!r&&m.jsx("div",{className:"pt-2",children:m.jsx("button",{onClick:o,type:"button",className:"border border-gray-300 shadow-sm rounded-md bg-gray-50 hover:bg-gray-200 w-full self-center px-3 py-1",children:"See All"})})]})},cH=({onClick:e,id:t,name:n,icon:r})=>{const i=()=>e(t);return m.jsxs("button",{type:"button","data-test":t,className:"h-32 border border-gray-300 shadow-sm flex flex-col items-center justify-content-center rounded bg-gray-50 hover:bg-gray-200 p-3",onClick:i,children:[m.jsx("div",{className:"m-3",children:m.jsx("img",{className:"w-12 h-12",src:r,alt:n})}),m.jsx("div",{className:"font-bold",children:n})]})},dH=({onClick:e,stackType:t})=>{const[n,r]=v.useState(),i=l=>{r(l.currentTarget.value)},o=v.useRef(null);v.useEffect(()=>{var l;(l=o.current)==null||l.focus()},[]);const a=Xb().filter(l=>!l.isDeprecated).filter(l=>n?l.name.toLowerCase().includes(n.toLowerCase()):!0).filter(l=>l.id.endsWith(`-${t}`)).sort((l,s)=>l.name<s.name?1:l.name>s.name?-1:0).sort(l=>l.isPaidAddOn||l.isPreview?1:-1);return m.jsxs(m.Fragment,{children:[m.jsx("p",{className:"text-gray-500 font-semibold text-md",children:"ADD A NEW POLICY"}),m.jsxs("div",{className:"mt-2 relative rounded-md shadow-sm",children:[m.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:m.jsx(uM,{className:"h-5 w-5 text-gray-400","aria-hidden":"true"})}),m.jsx("input",{ref:o,defaultValue:n,className:"focus:ring-indigo-500 focus:border-indigo-500 block w-full h-8 pl-10 sm:text-sm border border-gray-300 shadow-sm rounded",placeholder:"Search for a Policy",onChange:i})]}),m.jsx("div",{className:"h-55vh overflow-y-auto",children:m.jsx("div",{className:"mt-2 pb-10 grid grid-cols-3 gap-2 h-fit max-h-55vh",children:a.map(l=>m.jsx(cH,{onClick:e,...l},l.id))})})]})};function fH({stackType:e,shouldHideExistingPolicies:t=!1,policyManager:n,onPolicySelected:r,onExistingPolicySelected:i}){const o=l=>{r(l)},a=l=>{i(l)};return m.jsxs("div",{className:"flex flex-col w-full pl-8 pr-6 mt-2",children:[t?null:m.jsx("div",{className:"pb-4",children:m.jsx(uH,{onClick:a,policyManager:n,stackType:e})}),m.jsx("div",{className:"mt-2",children:m.jsx(dH,{onClick:o,stackType:e})})]})}const pH=({fakePolicyUrl:e,designConfig:t,onCancel:n})=>{const r=()=>{window.open(e,"_blank")};return m.jsxs("div",{className:"flex flex-col w-[600px] gap-y-4",children:[m.jsx("div",{className:"pt-4 pl-8 text-lg text-gray-500",children:t.name}),m.jsx("div",{className:"w-full",children:t.exampleHtml?m.jsx(Og,{documentationSrc:t.exampleHtml}):m.jsxs("div",{className:"bg-gray-100 h-60 text-center flex flex-col items-center justify-center",children:[Mi.COMING_SOON.icon,m.jsx("div",{children:Mi.COMING_SOON.defaultTitle})]})}),m.jsxs("div",{className:"flex w-full gap-x-4 justify-end pr-6 pb-4",children:[m.jsx(En,{label:"Cancel",buttonType:xi.WHITE,classNames:"w-24 justify-center",onClick:n,dataTestId:"policy-picker-footer-cancel-btn"}),m.jsx(En,{label:"Open Guide",classNames:"w-36 justify-center",onClick:r,dataTestId:"policy-picker-footer-request-access-btn"})]})]})},mH="There's already a policy with this name",gH="Policy name can't be empty",hH=({policyID:e,operation:t,onComplete:n,onCancel:r,policyManager:i})=>{const o=i.getPolicyListEnforced(),a=jl(e),l=!!(a!=null&&a.isPreview)||!!(a!=null&&a.isPaidAddOn),[s,u]=v.useState(NB(o,e)),[c,d]=v.useState(null),[f,p]=v.useState(null),g=v.useRef();if(v.useEffect(()=>{(S=>{if(!S){d(gH);return}if(o.find(N=>N.name===S)){d(mH);return}d(null)})(s)},[s,o]),!a)return null;if(a.fakePolicyUrl)return m.jsx(pH,{fakePolicyUrl:a.fakePolicyUrl,designConfig:a,onCancel:r});const h=(x,S)=>{const b={handler:S,name:s,policyType:x};i.createPolicy(b,t?[t]:void 0)},w=()=>{var S;const x=(S=g.current)==null?void 0:S.getValue();if(!(!e||!x))try{const b=JSON.parse(x);h(e,b),n()}catch(b){p(b.message)}},I=x=>{u(qb(x.toLowerCase()))};function y(x){g.current=x}const M=!!c;return m.jsxs("div",{className:"flex flex-col w-full",children:[m.jsx("div",{className:"pl-24 max-w-lg mt-4",children:m.jsx(Qb,{name:s,onChangeName:I,policyTypeInformation:{documentationUrl:a.documentationUrl,typeName:a.name},validationErrorName:c,disabled:l})}),m.jsxs("div",{className:"grid grid-cols-2 h-64 mt-4 mb-4",children:[m.jsxs(Au,{label:"Configuration",classNameLabel:"ml-6",children:[m.jsx(Zb,{options:{hideCursorInOverviewRuler:!0,minimap:{enabled:!1},overviewRulerBorder:!1,overviewRulerLanes:0,readOnly:!1,renderLineHighlight:"none",roundedSelection:!1,scrollBeyondLastLine:!1},className:ae("h-60",{"border-2 border-red-500":!!f}),width:"100%",language:"json",onMount:y,defaultValue:JSON.stringify(a.defaultHandler,void 0,Cb)}),f?m.jsx("p",{className:"text-red-500 ml-2 mt-1",children:f}):null]}),m.jsx(Au,{label:"Usage",classNameLabel:"ml-2",children:a.exampleHtml?m.jsx(Og,{documentationSrc:a.exampleHtml}):m.jsxs("div",{className:"bg-gray-100 h-60 text-center flex flex-col items-center justify-center",children:[Mi.COMING_SOON.icon,m.jsx("div",{children:Mi.COMING_SOON.defaultTitle})]})})]}),m.jsx(Yb,{onConfirm:w,onCancel:r,isDisabled:M,mustRequestAccess:l})]})},vH=e=>{switch(e){case"policy-picker":return"Choose Policy";case"policy-access-requested":return"Access Requested";case"policy-configurator":return"Create Policy"}},yH=({isOpen:e,setIsOpen:t,stackType:n,operation:r,shouldHideExistingPolicies:i=!1,policyManager:o})=>{const[a,l]=v.useState("policy-picker"),[s,u]=v.useState(),c=()=>{t(!1)},d=w=>{u(w),l("policy-configurator")},f=r?{filePath:r.additionalOperationContext.oasFilePath,path:r.additionalOperationContext.path,method:r.additionalOperationContext.method}:void 0,p=w=>{if(r==null||f==null)throw new Error("Operation config not found to add policy to");o.applyPolicy(w.name,[f]),c()};let g,h=!1;if(s&&a==="policy-configurator"){const w=jl(s);g=w!=null&&w.isPaidAddOn?"Paid Add On":w!=null&&w.isPreview&&!w.fakePolicyUrl?"Private Preview":void 0,h=(w==null?void 0:w.fakePolicyUrl)!=null}return m.jsxs(Bb,{title:vH(a),isOpen:e,badgeTitle:g,setIsOpen:t,matchWidth:h,children:[a==="policy-picker"?m.jsx(fH,{stackType:n,shouldHideExistingPolicies:i,policyManager:o,onPolicySelected:d,onExistingPolicySelected:p}):null,a==="policy-configurator"&&s!=null?m.jsx(hH,{policyID:s,operation:f,onComplete:c,onCancel:c,policyManager:o}):null]})},N0=({policies:e,stackType:t,operation:n})=>{const r=El(),i={filePath:n.additionalOperationContext.oasFilePath,path:n.additionalOperationContext.path,method:n.additionalOperationContext.method},[o,a]=ho(()=>m.jsx(yH,{isOpen:!0,setIsOpen:a,stackType:t,operation:n,policyManager:r}),[t,n,r]),l=u=>{const c=e[u];r.removePolicy(c,t,[i])},s=u=>{u.destination&&u.destination.index!==u.source.index&&r.movePolicy(e,u.source.index,u.destination.index,t,i)};return m.jsx(IF,{onDragEnd:s,children:m.jsxs("div",{className:"flex flex-col w-full max-w-full items-center gap-y-2 px-3",children:[m.jsx(hS,{droppableId:"list",children:u=>m.jsxs("div",{className:"w-full max-w-full xl:w-fit flex flex-col items-stretch",ref:u.innerRef,...u.droppableProps,children:[e.map((c,d)=>m.jsx(nH,{draggableId:`${c}-${d}`,index:d,isDragDisabled:!1,children:f=>m.jsx("div",{className:"flex w-full max-w-full py-2",ref:f.innerRef,...f.draggableProps,...f.dragHandleProps,children:m.jsx(AB,{isReadOnly:!1,index:d,policy:c,stackType:t,onDelete:l})})},`${c}-${d}`)),u.placeholder]})}),m.jsx("div",{className:"flex flex-row justify-center",children:m.jsx(En,{dataTestId:`add-${t}-policy`,buttonType:xi.GRAY,onClick:()=>{o()},label:"Add Policy",icon:m.jsx(JC,{className:"w-5 h-auto text-gray-500"}),iconAlignment:"left"})})]})})},S0=({children:e,direction:t})=>m.jsxs("div",{className:"grid h-full w-full max-w-full",children:[m.jsxs("div",{className:"w-full max-w-full flex flex-col items-center col-start-1 row-start-1",children:[t==="up"?m.jsx("div",{className:"flex-none pl-[0.06rem]",children:m.jsx("img",{src:"/icons/arrow_head_up.svg",alt:"arrow-down"})}):m.jsx(m.Fragment,{}),m.jsx("div",{className:"flex-grow",children:m.jsx("img",{className:"h-full w-3",src:"/icons/arrow_line.svg",alt:"arrow-line"})}),t==="down"?m.jsx("div",{className:"flex-none",children:m.jsx("img",{src:"/icons/arrow_head_down.svg",alt:"arrow-down"})}):m.jsx(m.Fragment,{})]}),m.jsx("div",{className:"w-full max-w-full min-w-0 col-start-1 row-start-1 pt-4 pb-6",children:e})]}),IH=({children:e,isPoliciesExpanded:t,onPoliciesExpandedChange:n,inboundPolicies:r,outboundPolicies:i,operation:o})=>m.jsxs("div",{className:"w-full 2xl:col-span-12 flex flex-col justify-start",children:[m.jsx("div",{className:ae("rounded-t absolute h-12 right-0 ",{"bg-gray-100":t}),children:" "}),m.jsx("button",{type:"button","data-test":"policy-designer-expand-collapse",onClick:()=>{n()},className:ae("text-sm flex text-center px-3 py-2 z-5 w-full text-black bg-gray-100 hover:bg-gray-200",t?"rounded-t":"rounded"),children:m.jsxs("span",{className:"inline-flex items-center text-lg",children:[t?m.jsx(oc,{className:"w-5 h-auto"}):m.jsx(TC,{className:"w-5 h-auto"})," Policies"]})}),t?m.jsxs("div",{className:"flex flex-col pb-4 bg-gray-100 rounded-b",children:[m.jsx("div",{className:"flex flex-col",children:m.jsxs("div",{className:"grid grid-cols-2 pb-4",children:[m.jsxs("div",{className:"flex flex-col items-center h-auto",children:[m.jsx("span",{className:"text-center flex-none my-1 text-sm",children:"Request"}),m.jsx(S0,{direction:"down",children:m.jsx(N0,{operation:o,policies:r,stackType:"inbound"})})]}),m.jsxs("div",{className:"flex-grow flex flex-col",children:[m.jsx("span",{className:"text-center flex-none my-1 text-sm",children:"Response"}),m.jsx(S0,{direction:"up",children:m.jsx(N0,{operation:o,policies:i,stackType:"outbound"})})]})]})}),e]}):null]});function wH({operationData:e}){return e?m.jsx("div",{className:"w-full h-fit flex flex-col",children:m.jsx(MH,{operationData:e})}):m.jsx("div",{className:"m-auto flex text-center",children:m.jsxs("h1",{className:"text-gray-400 text-xl mb-5",children:["No operation selected ",m.jsx("br",{}),"Select an operation to start editing"]})})}const MH=({operationData:e})=>{var $,ee,L,B,F,V;const t=Cl().get("path");if(!t)throw new Error("Open API file path not found in URL");const n=gz(t),{path:r,method:i}=e.additionalOperationContext,{additionalOperationContext:o,...a}=e,l=$c(),s=El(),u="",[c,d]=v.useState(),[f,p]=v.useState(),[g,h]=v.useState(),[w,I]=v.useState(!1),y=(L=(ee=($=l.openApiData)==null?void 0:$.servers)==null?void 0:ee.at(0))==null?void 0:L.url,M=a[Dr]??zu(y??Qa),x=a[sy]===!0;v.useEffect(()=>{d(void 0),p(void 0)},[e.operationId]);const S=()=>{I(!w)},b=D=>{const E={...D},T={...M,handler:E};l.updateOperation({path:r,method:i,newOperationObject:{...a,[Dr]:T}}),d(void 0)},N=D=>{l.updateOperation({path:r,method:i,newOperationObject:{...a,summary:D}}),d(void 0)},C=D=>{l.updateOperation({path:r,method:i,newOperationObject:{...a,[sy]:D}})},P=D=>{let{newPath:E}=D;const{newMethod:T}=D;g!=null&&E==null&&(E=g);try{l.updateOperation({path:r,newPath:E,method:i,newMethod:T,newOperationObject:a}),p(void 0),d(void 0),h(void 0)}catch(z){z instanceof Error&&(E!=null&&(h(E),p(z.message)),T!=null&&d(z.message))}},R=D=>{if(D===r){p(void 0),d(void 0),h(void 0);return}const E=D.startsWith("/")?D:"/"+D;P({newPath:E})},O=({value:D})=>{const E=D;if(E===i){d(void 0);return}P({newMethod:E})},J=D=>{const E={...M,corsPolicy:D};l.updateOperation({path:r,method:i,newOperationObject:{...a,[Dr]:E}}),d(void 0)},U=D=>{const E={...e.additionalOperationContext.pathZuploConfig,pathMode:D},z=l.getOpenApiDataEnforced().paths;if(!z)throw new Error("Property 'paths' is undefined");const _=z[r];if(!_)throw new Error(`Path Item '${r}' is undefined`);l.updatePathItem(r,{..._,[cb]:E}),d(void 0)},W=()=>{n(St.modified)},Z=m.jsx("div",{className:`${w?"mx-4":""}`,children:m.jsx(zz,{isOpenApi:!0,routeHandler:(e[Dr]??zu(y??Qa)).handler,onRequestHandlerChange:b})});return m.jsxs("div",{className:"m-2 p-3 pt-3 rounded","data-test":"route-handling-section",children:[m.jsxs("div",{className:"flex items-center mb-4",children:[m.jsx("span",{className:"pr-3 text-lg font-medium text-gray-900 whitespace-nowrap flex-none",children:"Request Handling"}),m.jsx("div",{className:"border-t border-gray-300 flex-grow"})]}),m.jsxs("div",{className:"flex flex-col gap-y-3 pb-4",children:[m.jsx(vj,{initialSummary:a.summary,span:4,onSummaryChange:N,onFieldModified:W}),m.jsxs("div",{className:"flex flex-col",children:[m.jsx(hj,{initialPath:r,method:i,summary:e.summary,span:6,pathMode:(B=e.additionalOperationContext.pathZuploConfig)==null?void 0:B.pathMode,hasError:f!=null,onPathChange:R,onPathModeChange:U,operationData:e,onFieldModified:W}),f?m.jsx("p",{"data-test":"path-error",className:"text-sm text-red-600 pt-1 ml-10",children:f}):null]}),m.jsxs("div",{className:"flex flex-col",children:[m.jsxs("div",{className:"flex justify-start gap-x-3 xl:gap-x-8 w-full items-center flex-wrap gap-y-3 lg:gap-y-0 lg:flex-nowrap",children:[m.jsx(gj,{selectedMethod:i,onSelectionChanged:O,versionPathPrefix:u,span:4}),m.jsx(fj,{selectedCorsPolicy:M.corsPolicy,corsPolicies:s.corsPolicyList??[],span:3,onCORSSelectionChanged:J}),m.jsx(pj,{shouldExcludeFromDocs:x,span:3,onSelectionChanged:C})]}),c?m.jsx("p",{"data-test":"method-error",className:"text-sm text-red-600 pt-1 w-full",children:c}):null]}),m.jsx(IH,{inboundPolicies:((F=M.policies)==null?void 0:F.inbound)??[],outboundPolicies:((V=M.policies)==null?void 0:V.outbound)??[],operation:e,isPoliciesExpanded:w,onPoliciesExpandedChange:S,children:w?Z:null})]}),w?null:m.jsx("div",{className:"w-full col-span-12",children:Z})]})};let xs;const xH=new Uint8Array(16);function bH(){if(!xs&&(xs=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!xs))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return xs(xH)}const mt=[];for(let e=0;e<256;++e)mt.push((e+256).toString(16).slice(1));function NH(e,t=0){return mt[e[t+0]]+mt[e[t+1]]+mt[e[t+2]]+mt[e[t+3]]+"-"+mt[e[t+4]]+mt[e[t+5]]+"-"+mt[e[t+6]]+mt[e[t+7]]+"-"+mt[e[t+8]]+mt[e[t+9]]+"-"+mt[e[t+10]]+mt[e[t+11]]+mt[e[t+12]]+mt[e[t+13]]+mt[e[t+14]]+mt[e[t+15]]}const SH=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),D0={randomUUID:SH};function DH(e,t,n){if(D0.randomUUID&&!t&&!e)return D0.randomUUID();e=e||{};const r=e.random||(e.rng||bH)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return NH(r)}const AH="Document Order",CH=["Document Order","Path","Summary"],Nf="Untagged";function EH(e){return{summary:"New Route",description:"Lorem ipsum dolor sit amet, **consectetur adipiscing** elit, sed do `eiusmod tempor` incididunt ut labore et dolore magna aliqua.",[Dr]:zu(e),operationId:DH()}}function zu(e){return{corsPolicy:"none",handler:{export:"urlForwardHandler",module:"$import(@zuplo/runtime)",options:{baseUrl:e}},policies:{inbound:[]}}}const TH=()=>{var ee;const[e,t]=v.useState(),[n,r]=v.useState([]),[i,o]=v.useState(),[a,l]=v.useState(void 0),[s,u]=v.useState(AH),[c,d]=v.useState(void 0),f=$c(),[p,g]=v.useState(),[h,w]=v.useState(),[I,y]=ho(()=>{if(i==null)throw new Error("Invalid state, operationToDelete should not be undefined");const L=()=>{try{C(i.path,i.method)}catch(F){F instanceof Error&&(d(F.message),M())}o(void 0),y()},B=()=>{o(void 0),y()};return m.jsx(Ap,{hideModal:y,alertType:"DELETE",bodyText:"Are you sure you want to delete this operation?",primaryButtonText:"Confirm",secondaryButtonText:"Cancel",onPrimaryButtonClick:L,onSecondaryButtonClick:B,primaryButtonTestID:"confirm-delete-btn"})},[i,o]),[M,x]=ho(()=>{const L=()=>{d(void 0),x()};return m.jsx(Ap,{alertType:"ERROR",bodyText:c??"",onPrimaryButtonClick:()=>{},onSecondaryButtonClick:L,primaryButtonText:"Edit file directly",secondaryButtonText:"Cancel",hideModal:L,title:"Error"})},[c]);if(!f.openApiData)throw new Error("Invalid State - no OpenApiData");const S=(ee=f.openApiData.tags)==null?void 0:ee.map(L=>({value:L.name,label:L.name,shouldSupportOnly:!0}));S==null||S.push({value:Nf,label:Nf,shouldSupportOnly:!0});const b=n.reduce((L,B)=>(L.set(B,!0),L),new Map),N=f.operationArray,C=(L,B)=>{f.deleteOperation(L,B)},P=()=>{var E,T,z,_;const L=(z=(T=(E=f.openApiData)==null?void 0:E.servers)==null?void 0:T.at(0))==null?void 0:z.url,B=EH(L??Qa),V=`/path-${((_=f.operationArray)==null?void 0:_.length)??0}`,D=zn.OpenAPIV3.HttpMethods.GET;try{f.addOperation(V,D,B)}catch(ie){ie instanceof Error&&(d(ie.message),M())}l(B.operationId)},R=(L,B,F)=>{o({path:L,method:B,operationId:F}),I()},O=L=>{t(L)},J=L=>{r(L)},U=L=>{u(L.value)},W=L=>{var F;if(!e||e==="")return!0;const B=e.toLowerCase();return L.additionalOperationContext.path.includes(B)||((F=L.summary)==null?void 0:F.toLowerCase().includes(B))},Z=L=>{if(n.length===0)return!0;const B=L.tags;return B?B.some(F=>b.has(F)):n.includes(Nf)},$=(L,B)=>{var F;switch(s){case"Document Order":return 0;case"Path":return L.additionalOperationContext.path.localeCompare(B.additionalOperationContext.path);case"Summary":return!L.summary&&!B.summary?0:!L.summary&&B.summary?1:L.summary&&!B.summary?-1:((F=L.summary)==null?void 0:F.localeCompare(B.summary??""))??0}};return!N||N.length===0&&(!e||e.trim().length===0)?m.jsx(oj,{addRoute:P}):m.jsx(m.Fragment,{children:m.jsxs("div",{className:"mx-2 grid grid-cols-3 h-full flex-grow",children:[m.jsxs("div",{className:"flex flex-col justify-start col-span-1 h-full py-6 pl-3 mx-2",children:[m.jsx("div",{className:"flex w-full mr-3 pb-5",children:m.jsx(sj,{onSearch:O})}),m.jsxs("div",{className:"flex flex-wrap w-full justify-between gap-x-4 gap-y-2 mr-3 pb-5",children:[m.jsx(Zr,{labelPrefixElement:m.jsx("span",{className:"hidden 2xl:inline mr-1",children:"Sort:"}),selected:{label:s,value:s},onChange:U,options:CH.map(L=>({label:L,value:L}))}),m.jsx(VT,{filterPrefixClassName:"hidden 2xl:inline",filterName:n.length===1?"Tag":"Tags",activeFilters:n,options:S??[],onFilterChange:J,isDisabled:!S})]}),m.jsx("div",{className:"relative max-h-[calc(100vh-265px)] overflow-auto w-full mb-2",children:N.filter(W).filter(Z).sort($).map(({additionalOperationContext:L,...B})=>{const F=B.operationId===a,V=F&&p?p:L.path,D=F&&h?h:B.summary;return m.jsx("div",{className:"flex w-full items-center",children:m.jsx(lj,{path:V,method:L.method,summary:D,operationId:B.operationId,isSelected:B.operationId===a,onOperationSelected:E=>{l(E),g(""),w("")},onDelete:R})},B.operationId)})}),m.jsx("div",{className:"flex justify-center",children:m.jsxs("button",{type:"button",onClick:P,className:"inline-flex items-center shadow-sm px-4 py-1.5 border border-gray-300 text-sm leading-5 font-medium rounded-full text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500","data-test":"add-route-btn",children:[m.jsx(KC,{className:"-ml-1.5 mr-1 h-5 w-5 text-gray-400","aria-hidden":"true"}),m.jsx("span",{children:"Add Route"})]})})]}),m.jsx("div",{className:"col-span-2 flex flex-col",children:m.jsx(lg.Provider,{value:{setPath:g,setSummary:w},children:m.jsx(wH,{operationData:N.find(L=>L.operationId===a)})})})]})})},jH=({url:e,surfaceResponse:t})=>{const n=Cl().get("path"),[r,i]=v.useState(!1),o=$c(),a=El(),l=Al(),s=async()=>{try{if(!n)throw new Error("You must pick a file before saving");i(!0);const c=await fetch(`${e}/save-open-api-updates`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify([{filePath:n,content:o.openApiData},{filePath:a.policyListFileModel.path,content:a.policyListFileModel.content?JSON.parse(a.policyListFileModel.content):a.policyListFileModel.content}])}),d=await c.json();if(t(d.message,c.status===200?"success":"error"),c.status===200){l(a.policyListFileModel,St.unmodified),l(o.openApiFileModel,St.unmodified);return}}catch(c){const d=c.message&&c.message.includes("Failed to fetch")?Bc:`Error: ${c.message}`;t(d,"error")}finally{i(!1)}};v.useEffect(()=>{const c=async d=>{(d.metaKey||d.ctrlKey)&&d.key==="s"&&(d.preventDefault(),(a.policyListFileModel.saveState!==St.unmodified||o.openApiFileModel.saveState!==St.unmodified)&&await s())};return window.addEventListener("keydown",c),()=>{window.removeEventListener("keydown",c)}},[a,o]);const u=a.policyListFileModel.saveState!==St.unmodified||o.openApiFileModel.saveState!==St.unmodified;return m.jsx("div",{className:"mt-5 text-right justify-end pl-3",children:m.jsx("div",{className:"inline-block",children:r?m.jsx(hc,{className:"w-4 h-4 mr-4 float-right"}):m.jsxs(m.Fragment,{children:[m.jsx("button",{type:"button",onClick:()=>s(),className:ae(`ml-1 ${u?"bg-zuplo-highlight hover:bg-zuplo-highlight-hover":"bg-gray-200 hover:bg-gray-300"} rounded text-sm justify-center py-2 px-4 inline-flex items-center h-[38px] w-40`),disabled:!u,children:"Save All"}),u?m.jsxs("span",{className:"absolute flex h-3 w-3 -mx-[-158px] -mt-[45px]",children:[m.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-zuplo-pink opacity-75"}),m.jsx("span",{className:"relative inline-flex rounded-full h-3 w-3 bg-zuplo-pink"})]}):null]})})})},LH=({message:e,type:t,className:n})=>m.jsx(m.Fragment,{children:m.jsx(Gn,{show:e!=="",enter:"transform ease-out duration-300 transition",enterFrom:"translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2",enterTo:"translate-y-0 opacity-100 sm:translate-x-0",leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",className:ae("col-span-12 rounded-md py-3 px-5 mt-2",{"bg-pink-100":t==="error","bg-green-100 ":t==="success","bg-blue-100":t=="info"},n),children:m.jsx("span",{className:"text-sm text-gray-500 inline-block",children:e})})});var A0=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function PH(e,t){return!!(e===t||A0(e)&&A0(t))}function RH(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!PH(e[n],t[n]))return!1;return!0}function OH(e,t){t===void 0&&(t=RH);var n=null;function r(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];if(n&&n.lastThis===this&&t(i,n.lastArgs))return n.lastResult;var a=e.apply(this,i);return n={lastResult:a,lastArgs:i,lastThis:this},a}return r.clear=function(){n=null},r}function Xn(){}Xn.prototype={diff:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=r.callback;typeof r=="function"&&(i=r,r={}),this.options=r;var o=this;function a(h){return i?(setTimeout(function(){i(void 0,h)},0),!0):h}t=this.castInput(t),n=this.castInput(n),t=this.removeEmpty(this.tokenize(t)),n=this.removeEmpty(this.tokenize(n));var l=n.length,s=t.length,u=1,c=l+s,d=[{newPos:-1,components:[]}],f=this.extractCommon(d[0],n,t,0);if(d[0].newPos+1>=l&&f+1>=s)return a([{value:this.join(n),count:n.length}]);function p(){for(var h=-1*u;h<=u;h+=2){var w=void 0,I=d[h-1],y=d[h+1],M=(y?y.newPos:0)-h;I&&(d[h-1]=void 0);var x=I&&I.newPos+1<l,S=y&&0<=M&&M<s;if(!x&&!S){d[h]=void 0;continue}if(!x||S&&I.newPos<y.newPos?(w=zH(y),o.pushComponent(w.components,void 0,!0)):(w=I,w.newPos++,o.pushComponent(w.components,!0,void 0)),M=o.extractCommon(w,n,t,h),w.newPos+1>=l&&M+1>=s)return a(kH(o,w.components,n,t,o.useLongestToken));d[h]=w}u++}if(i)(function h(){setTimeout(function(){if(u>c)return i();p()||h()},0)})();else for(;u<=c;){var g=p();if(g)return g}},pushComponent:function(t,n,r){var i=t[t.length-1];i&&i.added===n&&i.removed===r?t[t.length-1]={count:i.count+1,added:n,removed:r}:t.push({count:1,added:n,removed:r})},extractCommon:function(t,n,r,i){for(var o=n.length,a=r.length,l=t.newPos,s=l-i,u=0;l+1<o&&s+1<a&&this.equals(n[l+1],r[s+1]);)l++,s++,u++;return u&&t.components.push({count:u}),t.newPos=l,s},equals:function(t,n){return this.options.comparator?this.options.comparator(t,n):t===n||this.options.ignoreCase&&t.toLowerCase()===n.toLowerCase()},removeEmpty:function(t){for(var n=[],r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function kH(e,t,n,r,i){for(var o=0,a=t.length,l=0,s=0;o<a;o++){var u=t[o];if(u.removed){if(u.value=e.join(r.slice(s,s+u.count)),s+=u.count,o&&t[o-1].added){var d=t[o-1];t[o-1]=t[o],t[o]=d}}else{if(!u.added&&i){var c=n.slice(l,l+u.count);c=c.map(function(p,g){var h=r[s+g];return h.length>p.length?h:p}),u.value=e.join(c)}else u.value=e.join(n.slice(l,l+u.count));l+=u.count,u.added||(s+=u.count)}}var f=t[a-1];return a>1&&typeof f.value=="string"&&(f.added||f.removed)&&e.equals("",f.value)&&(t[a-2].value+=f.value,t.pop()),t}function zH(e){return{newPos:e.newPos,components:e.components.slice(0)}}var BH=new Xn;function UH(e,t,n){return BH.diff(e,t,n)}function vS(e,t){if(typeof e=="function")t.callback=e;else if(e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}var C0=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,E0=/\S/,ld=new Xn;ld.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!E0.test(e)&&!E0.test(t)};ld.tokenize=function(e){for(var t=e.split(/(\s+|[()[\]{}'"]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&C0.test(t[n])&&C0.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};function $H(e,t,n){return n=vS(n,{ignoreWhitespace:!0}),ld.diff(e,t,n)}function _H(e,t,n){return ld.diff(e,t,n)}var sd=new Xn;sd.tokenize=function(e){var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var i=n[r];r%2&&!this.options.newlineIsToken?t[t.length-1]+=i:(this.options.ignoreWhitespace&&(i=i.trim()),t.push(i))}return t};function dh(e,t,n){return sd.diff(e,t,n)}function FH(e,t,n){var r=vS(n,{ignoreWhitespace:!0});return sd.diff(e,t,r)}var yS=new Xn;yS.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};function HH(e,t,n){return yS.diff(e,t,n)}var IS=new Xn;IS.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function GH(e,t,n){return IS.diff(e,t,n)}function _s(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_s=function(t){return typeof t}:_s=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_s(e)}function or(e){return WH(e)||VH(e)||ZH()}function WH(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}function VH(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function ZH(){throw new TypeError("Invalid attempt to spread non-iterable instance")}var YH=Object.prototype.toString,So=new Xn;So.useLongestToken=!0;So.tokenize=sd.tokenize;So.castInput=function(e){var t=this.options,n=t.undefinedReplacement,r=t.stringifyReplacer,i=r===void 0?function(o,a){return typeof a>"u"?n:a}:r;return typeof e=="string"?e:JSON.stringify(Bu(e,null,null,i),i," ")};So.equals=function(e,t){return Xn.prototype.equals.call(So,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function QH(e,t,n){return So.diff(e,t,n)}function Bu(e,t,n,r,i){t=t||[],n=n||[],r&&(e=r(i,e));var o;for(o=0;o<t.length;o+=1)if(t[o]===e)return n[o];var a;if(YH.call(e)==="[object Array]"){for(t.push(e),a=new Array(e.length),n.push(a),o=0;o<e.length;o+=1)a[o]=Bu(e[o],t,n,r,i);return t.pop(),n.pop(),a}if(e&&e.toJSON&&(e=e.toJSON()),_s(e)==="object"&&e!==null){t.push(e),a={},n.push(a);var l=[],s;for(s in e)e.hasOwnProperty(s)&&l.push(s);for(l.sort(),o=0;o<l.length;o+=1)s=l[o],a[s]=Bu(e[s],t,n,r,s);t.pop(),n.pop()}else a=e;return a}var Uu=new Xn;Uu.tokenize=function(e){return e.slice()};Uu.join=Uu.removeEmpty=function(e){return e};function JH(e,t,n){return Uu.diff(e,t,n)}function ud(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.split(/\r\n|[\n\v\f\r\x85]/),r=e.match(/\r\n|[\n\v\f\r\x85]/g)||[],i=[],o=0;function a(){var u={};for(i.push(u);o<n.length;){var c=n[o];if(/^(\-\-\-|\+\+\+|@@)\s/.test(c))break;var d=/^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(c);d&&(u.index=d[1]),o++}for(l(u),l(u),u.hunks=[];o<n.length;){var f=n[o];if(/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(f))break;if(/^@@/.test(f))u.hunks.push(s());else{if(f&&t.strict)throw new Error("Unknown line "+(o+1)+" "+JSON.stringify(f));o++}}}function l(u){var c=/^(---|\+\+\+)\s+(.*)$/.exec(n[o]);if(c){var d=c[1]==="---"?"old":"new",f=c[2].split(" ",2),p=f[0].replace(/\\\\/g,"\\");/^".*"$/.test(p)&&(p=p.substr(1,p.length-2)),u[d+"FileName"]=p,u[d+"Header"]=(f[1]||"").trim(),o++}}function s(){for(var u=o,c=n[o++],d=c.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/),f={oldStart:+d[1],oldLines:+d[2]||1,newStart:+d[3],newLines:+d[4]||1,lines:[],linedelimiters:[]},p=0,g=0;o<n.length&&!(n[o].indexOf("--- ")===0&&o+2<n.length&&n[o+1].indexOf("+++ ")===0&&n[o+2].indexOf("@@")===0);o++){var h=n[o].length==0&&o!=n.length-1?" ":n[o][0];if(h==="+"||h==="-"||h===" "||h==="\\")f.lines.push(n[o]),f.linedelimiters.push(r[o]||`
164
+ `),h==="+"?p++:h==="-"?g++:h===" "&&(p++,g++);else break}if(!p&&f.newLines===1&&(f.newLines=0),!g&&f.oldLines===1&&(f.oldLines=0),t.strict){if(p!==f.newLines)throw new Error("Added line count did not match for hunk at line "+(u+1));if(g!==f.oldLines)throw new Error("Removed line count did not match for hunk at line "+(u+1))}return f}for(;o<n.length;)a();return i}function XH(e,t,n){var r=!0,i=!1,o=!1,a=1;return function l(){if(r&&!o){if(i?a++:r=!1,e+a<=n)return a;o=!0}if(!i)return o||(r=!0),t<=e-a?-a++:(i=!0,l())}}function wS(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(typeof t=="string"&&(t=ud(t)),Array.isArray(t)){if(t.length>1)throw new Error("applyPatch only works with a single input.");t=t[0]}var r=e.split(/\r\n|[\n\v\f\r\x85]/),i=e.match(/\r\n|[\n\v\f\r\x85]/g)||[],o=t.hunks,a=n.compareLine||function(Z,$,ee,L){return $===L},l=0,s=n.fuzzFactor||0,u=0,c=0,d,f;function p(Z,$){for(var ee=0;ee<Z.lines.length;ee++){var L=Z.lines[ee],B=L.length>0?L[0]:" ",F=L.length>0?L.substr(1):L;if(B===" "||B==="-"){if(!a($+1,r[$],B,F)&&(l++,l>s))return!1;$++}}return!0}for(var g=0;g<o.length;g++){for(var h=o[g],w=r.length-h.oldLines,I=0,y=c+h.oldStart-1,M=XH(y,u,w);I!==void 0;I=M())if(p(h,y+I)){h.offset=c+=I;break}if(I===void 0)return!1;u=h.offset+h.oldStart+h.oldLines}for(var x=0,S=0;S<o.length;S++){var b=o[S],N=b.oldStart+b.offset+x-1;x+=b.newLines-b.oldLines,N<0&&(N=0);for(var C=0;C<b.lines.length;C++){var P=b.lines[C],R=P.length>0?P[0]:" ",O=P.length>0?P.substr(1):P,J=b.linedelimiters[C];if(R===" ")N++;else if(R==="-")r.splice(N,1),i.splice(N,1);else if(R==="+")r.splice(N,0,O),i.splice(N,0,J),N++;else if(R==="\\"){var U=b.lines[C-1]?b.lines[C-1][0]:null;U==="+"?d=!0:U==="-"&&(f=!0)}}}if(d)for(;!r[r.length-1];)r.pop(),i.pop();else f&&(r.push(""),i.push(`
165
+ `));for(var W=0;W<r.length-1;W++)r[W]=r[W]+i[W];return r.join("")}function qH(e,t){typeof e=="string"&&(e=ud(e));var n=0;function r(){var i=e[n++];if(!i)return t.complete();t.loadFile(i,function(o,a){if(o)return t.complete(o);var l=wS(a,i,t);t.patched(i,l,function(s){if(s)return t.complete(s);r()})})}r()}function fh(e,t,n,r,i,o,a){a||(a={}),typeof a.context>"u"&&(a.context=4);var l=dh(n,r,a);l.push({value:"",lines:[]});function s(I){return I.map(function(y){return" "+y})}for(var u=[],c=0,d=0,f=[],p=1,g=1,h=function(y){var M=l[y],x=M.lines||M.value.replace(/\n$/,"").split(`
166
+ `);if(M.lines=x,M.added||M.removed){var S;if(!c){var b=l[y-1];c=p,d=g,b&&(f=a.context>0?s(b.lines.slice(-a.context)):[],c-=f.length,d-=f.length)}(S=f).push.apply(S,or(x.map(function(W){return(M.added?"+":"-")+W}))),M.added?g+=x.length:p+=x.length}else{if(c)if(x.length<=a.context*2&&y<l.length-2){var N;(N=f).push.apply(N,or(s(x)))}else{var C,P=Math.min(x.length,a.context);(C=f).push.apply(C,or(s(x.slice(0,P))));var R={oldStart:c,oldLines:p-c+P,newStart:d,newLines:g-d+P,lines:f};if(y>=l.length-2&&x.length<=a.context){var O=/\n$/.test(n),J=/\n$/.test(r),U=x.length==0&&f.length>R.oldLines;!O&&U&&f.splice(R.oldLines,0,"\"),(!O&&!U||!J)&&f.push("\")}u.push(R),c=0,d=0,f=[]}p+=x.length,g+=x.length}},w=0;w<l.length;w++)h(w);return{oldFileName:e,newFileName:t,oldHeader:i,newHeader:o,hunks:u}}function MS(e,t,n,r,i,o,a){var l=fh(e,t,n,r,i,o,a),s=[];e==t&&s.push("Index: "+e),s.push("==================================================================="),s.push("--- "+l.oldFileName+(typeof l.oldHeader>"u"?"":" "+l.oldHeader)),s.push("+++ "+l.newFileName+(typeof l.newHeader>"u"?"":" "+l.newHeader));for(var u=0;u<l.hunks.length;u++){var c=l.hunks[u];s.push("@@ -"+c.oldStart+","+c.oldLines+" +"+c.newStart+","+c.newLines+" @@"),s.push.apply(s,c.lines)}return s.join(`
167
167
  `)+`
168
- `}function KH(e,t,n,r,i,o){return bN(e,e,t,n,r,i,o)}function eW(e,t){return e.length!==t.length?!1:Yp(e,t)}function Yp(e,t){if(t.length>e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function tW(e){var t=Qp(e.lines),n=t.oldLines,r=t.newLines;n!==void 0?e.oldLines=n:delete e.oldLines,r!==void 0?e.newLines=r:delete e.newLines}function nW(e,t,n){e=T0(e,n),t=T0(t,n);var r={};(e.index||t.index)&&(r.index=e.index||t.index),(e.newFileName||t.newFileName)&&(j0(e)?j0(t)?(r.oldFileName=Ms(r,e.oldFileName,t.oldFileName),r.newFileName=Ms(r,e.newFileName,t.newFileName),r.oldHeader=Ms(r,e.oldHeader,t.oldHeader),r.newHeader=Ms(r,e.newHeader,t.newHeader)):(r.oldFileName=e.oldFileName,r.newFileName=e.newFileName,r.oldHeader=e.oldHeader,r.newHeader=e.newHeader):(r.oldFileName=t.oldFileName||e.oldFileName,r.newFileName=t.newFileName||e.newFileName,r.oldHeader=t.oldHeader||e.oldHeader,r.newHeader=t.newHeader||e.newHeader)),r.hunks=[];for(var i=0,o=0,a=0,l=0;i<e.hunks.length||o<t.hunks.length;){var s=e.hunks[i]||{oldStart:1/0},u=t.hunks[o]||{oldStart:1/0};if(P0(s,u))r.hunks.push(L0(s,a)),i++,l+=s.newLines-s.oldLines;else if(P0(u,s))r.hunks.push(L0(u,l)),o++,a+=u.newLines-u.oldLines;else{var c={oldStart:Math.min(s.oldStart,u.oldStart),oldLines:0,newStart:Math.min(s.newStart+a,u.oldStart+l),newLines:0,lines:[]};rW(c,s.oldStart,s.lines,u.oldStart,u.lines),o++,i++,r.hunks.push(c)}}return r}function T0(e,t){if(typeof e=="string"){if(/^@@/m.test(e)||/^Index:/m.test(e))return ud(e)[0];if(!t)throw new Error("Must provide a base reference or pass in a patch");return fh(void 0,void 0,t,e)}return e}function j0(e){return e.newFileName&&e.newFileName!==e.oldFileName}function Ms(e,t,n){return t===n?t:(e.conflict=!0,{mine:t,theirs:n})}function P0(e,t){return e.oldStart<t.oldStart&&e.oldStart+e.oldLines<t.oldStart}function L0(e,t){return{oldStart:e.oldStart,oldLines:e.oldLines,newStart:e.newStart+t,newLines:e.newLines,lines:e.lines}}function rW(e,t,n,r,i){var o={offset:t,lines:n,index:0},a={offset:r,lines:i,index:0};for(O0(e,o,a),O0(e,a,o);o.index<o.lines.length&&a.index<a.lines.length;){var l=o.lines[o.index],s=a.lines[a.index];if((l[0]==="-"||l[0]==="+")&&(s[0]==="-"||s[0]==="+"))iW(e,o,a);else if(l[0]==="+"&&s[0]===" "){var u;(u=e.lines).push.apply(u,or(ui(o)))}else if(s[0]==="+"&&l[0]===" "){var c;(c=e.lines).push.apply(c,or(ui(a)))}else l[0]==="-"&&s[0]===" "?R0(e,o,a):s[0]==="-"&&l[0]===" "?R0(e,a,o,!0):l===s?(e.lines.push(l),o.index++,a.index++):ph(e,ui(o),ui(a))}k0(e,o),k0(e,a),tW(e)}function iW(e,t,n){var r=ui(t),i=ui(n);if(z0(r)&&z0(i)){if(Yp(r,i)&&B0(n,r,r.length-i.length)){var o;(o=e.lines).push.apply(o,or(r));return}else if(Yp(i,r)&&B0(t,i,i.length-r.length)){var a;(a=e.lines).push.apply(a,or(i));return}}else if(eW(r,i)){var l;(l=e.lines).push.apply(l,or(r));return}ph(e,r,i)}function R0(e,t,n,r){var i=ui(t),o=oW(n,i);if(o.merged){var a;(a=e.lines).push.apply(a,or(o.merged))}else ph(e,r?o:i,r?i:o)}function ph(e,t,n){e.conflict=!0,e.lines.push({conflict:!0,mine:t,theirs:n})}function O0(e,t,n){for(;t.offset<n.offset&&t.index<t.lines.length;){var r=t.lines[t.index++];e.lines.push(r),t.offset++}}function k0(e,t){for(;t.index<t.lines.length;){var n=t.lines[t.index++];e.lines.push(n)}}function ui(e){for(var t=[],n=e.lines[e.index][0];e.index<e.lines.length;){var r=e.lines[e.index];if(n==="-"&&r[0]==="+"&&(n="+"),n===r[0])t.push(r),e.index++;else break}return t}function oW(e,t){for(var n=[],r=[],i=0,o=!1,a=!1;i<t.length&&e.index<e.lines.length;){var l=e.lines[e.index],s=t[i];if(s[0]==="+")break;if(o=o||l[0]!==" ",r.push(s),i++,l[0]==="+")for(a=!0;l[0]==="+";)n.push(l),l=e.lines[++e.index];s.substr(1)===l.substr(1)?(n.push(l),e.index++):a=!0}if((t[i]||"")[0]==="+"&&o&&(a=!0),a)return n;for(;i<t.length;)r.push(t[i++]);return{merged:r,changes:n}}function z0(e){return e.reduce(function(t,n){return t&&n[0]==="-"},!0)}function B0(e,t,n){for(var r=0;r<n;r++){var i=t[t.length-n+r].substr(1);if(e.lines[e.index+r]!==" "+i)return!1}return e.index+=n,!0}function Qp(e){var t=0,n=0;return e.forEach(function(r){if(typeof r!="string"){var i=Qp(r.mine),o=Qp(r.theirs);t!==void 0&&(i.oldLines===o.oldLines?t+=i.oldLines:t=void 0),n!==void 0&&(i.newLines===o.newLines?n+=i.newLines:n=void 0)}else n!==void 0&&(r[0]==="+"||r[0]===" ")&&n++,t!==void 0&&(r[0]==="-"||r[0]===" ")&&t++}),{oldLines:t,newLines:n}}function aW(e){for(var t=[],n,r,i=0;i<e.length;i++)n=e[i],n.added?r=1:n.removed?r=-1:r=0,t.push([r,n.value]);return t}function lW(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];r.added?t.push("<ins>"):r.removed&&t.push("<del>"),t.push(sW(r.value)),r.added?t.push("</ins>"):r.removed&&t.push("</del>")}return t.join("")}function sW(e){var t=e;return t=t.replace(/&/g,"&amp;"),t=t.replace(/</g,"&lt;"),t=t.replace(/>/g,"&gt;"),t=t.replace(/"/g,"&quot;"),t}const uW=Object.freeze(Object.defineProperty({__proto__:null,Diff:Xn,applyPatch:wN,applyPatches:qH,canonicalize:Bu,convertChangesToDMP:aW,convertChangesToXML:lW,createPatch:KH,createTwoFilesPatch:bN,diffArrays:JH,diffChars:UH,diffCss:WH,diffJson:QH,diffLines:dh,diffSentences:HH,diffTrimmedLines:FH,diffWords:$H,diffWordsWithSpace:_H,merge:nW,parsePatch:ud,structuredPatch:fh},Symbol.toStringTag,{value:"Module"}));function cW(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function dW(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var fW=function(){function e(n){var r=this;this._insertTag=function(i){var o;r.tags.length===0?r.insertionPoint?o=r.insertionPoint.nextSibling:r.prepend?o=r.container.firstChild:o=r.before:o=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,o),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(dW(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=cW(i);try{o.insertRule(r,o.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){return r.parentNode&&r.parentNode.removeChild(r)}),this.tags=[],this.ctr=0},e}(),xt="-ms-",$u="-moz-",xe="-webkit-",xN="comm",mh="rule",gh="decl",pW="@import",MN="@keyframes",mW="@layer",gW=Math.abs,cd=String.fromCharCode,hW=Object.assign;function vW(e,t){return ht(e,0)^45?(((t<<2^ht(e,0))<<2^ht(e,1))<<2^ht(e,2))<<2^ht(e,3):0}function SN(e){return e.trim()}function yW(e,t){return(e=t.exec(e))?e[0]:e}function Me(e,t,n){return e.replace(t,n)}function Jp(e,t){return e.indexOf(t)}function ht(e,t){return e.charCodeAt(t)|0}function il(e,t,n){return e.slice(t,n)}function Bn(e){return e.length}function hh(e){return e.length}function Ss(e,t){return t.push(e),e}function IW(e,t){return e.map(t).join("")}var dd=1,Do=1,NN=0,Gt=0,qe=0,zo="";function fd(e,t,n,r,i,o,a){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:dd,column:Do,length:a,return:""}}function oa(e,t){return hW(fd("",null,null,"",null,null,0),e,{length:-e.length},t)}function wW(){return qe}function bW(){return qe=Gt>0?ht(zo,--Gt):0,Do--,qe===10&&(Do=1,dd--),qe}function nn(){return qe=Gt<NN?ht(zo,Gt++):0,Do++,qe===10&&(Do=1,dd++),qe}function Vn(){return ht(zo,Gt)}function Fs(){return Gt}function Hl(e,t){return il(zo,e,t)}function ol(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function DN(e){return dd=Do=1,NN=Bn(zo=e),Gt=0,[]}function AN(e){return zo="",e}function Hs(e){return SN(Hl(Gt-1,Xp(e===91?e+2:e===40?e+1:e)))}function xW(e){for(;(qe=Vn())&&qe<33;)nn();return ol(e)>2||ol(qe)>3?"":" "}function MW(e,t){for(;--t&&nn()&&!(qe<48||qe>102||qe>57&&qe<65||qe>70&&qe<97););return Hl(e,Fs()+(t<6&&Vn()==32&&nn()==32))}function Xp(e){for(;nn();)switch(qe){case e:return Gt;case 34:case 39:e!==34&&e!==39&&Xp(qe);break;case 40:e===41&&Xp(e);break;case 92:nn();break}return Gt}function SW(e,t){for(;nn()&&e+qe!==47+10;)if(e+qe===42+42&&Vn()===47)break;return"/*"+Hl(t,Gt-1)+"*"+cd(e===47?e:nn())}function NW(e){for(;!ol(Vn());)nn();return Hl(e,Gt)}function DW(e){return AN(Ws("",null,null,null,[""],e=DN(e),0,[0],e))}function Ws(e,t,n,r,i,o,a,l,s){for(var u=0,c=0,d=a,f=0,p=0,g=0,h=1,w=1,I=1,y=0,b="",x=i,N=o,M=r,S=b;w;)switch(g=y,y=nn()){case 40:if(g!=108&&ht(S,d-1)==58){Jp(S+=Me(Hs(y),"&","&\f"),"&\f")!=-1&&(I=-1);break}case 34:case 39:case 91:S+=Hs(y);break;case 9:case 10:case 13:case 32:S+=xW(g);break;case 92:S+=MW(Fs()-1,7);continue;case 47:switch(Vn()){case 42:case 47:Ss(AW(SW(nn(),Fs()),t,n),s);break;default:S+="/"}break;case 123*h:l[u++]=Bn(S)*I;case 125*h:case 59:case 0:switch(y){case 0:case 125:w=0;case 59+c:I==-1&&(S=Me(S,/\f/g,"")),p>0&&Bn(S)-d&&Ss(p>32?$0(S+";",r,n,d-1):$0(Me(S," ","")+";",r,n,d-2),s);break;case 59:S+=";";default:if(Ss(M=U0(S,t,n,u,c,i,l,b,x=[],N=[],d),o),y===123)if(c===0)Ws(S,t,M,M,x,o,d,l,N);else switch(f===99&&ht(S,3)===110?100:f){case 100:case 108:case 109:case 115:Ws(e,M,M,r&&Ss(U0(e,M,M,0,0,i,l,b,i,x=[],d),N),i,N,d,l,r?x:N);break;default:Ws(S,M,M,M,[""],N,0,l,N)}}u=c=p=0,h=I=1,b=S="",d=a;break;case 58:d=1+Bn(S),p=g;default:if(h<1){if(y==123)--h;else if(y==125&&h++==0&&bW()==125)continue}switch(S+=cd(y),y*h){case 38:I=c>0?1:(S+="\f",-1);break;case 44:l[u++]=(Bn(S)-1)*I,I=1;break;case 64:Vn()===45&&(S+=Hs(nn())),f=Vn(),c=d=Bn(b=S+=NW(Fs())),y++;break;case 45:g===45&&Bn(S)==2&&(h=0)}}return o}function U0(e,t,n,r,i,o,a,l,s,u,c){for(var d=i-1,f=i===0?o:[""],p=hh(f),g=0,h=0,w=0;g<r;++g)for(var I=0,y=il(e,d+1,d=gW(h=a[g])),b=e;I<p;++I)(b=SN(h>0?f[I]+" "+y:Me(y,/&\f/g,f[I])))&&(s[w++]=b);return fd(e,t,n,i===0?mh:l,s,u,c)}function AW(e,t,n){return fd(e,t,n,xN,cd(wW()),il(e,2,-2),0)}function $0(e,t,n,r){return fd(e,t,n,gh,il(e,0,r),il(e,r+1,-1),r)}function oo(e,t){for(var n="",r=hh(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function CW(e,t,n,r){switch(e.type){case mW:if(e.children.length)break;case pW:case gh:return e.return=e.return||e.value;case xN:return"";case MN:return e.return=e.value+"{"+oo(e.children,r)+"}";case mh:e.value=e.props.join(",")}return Bn(n=oo(e.children,r))?e.return=e.value+"{"+n+"}":""}function EW(e){var t=hh(e);return function(n,r,i,o){for(var a="",l=0;l<t;l++)a+=e[l](n,r,i,o)||"";return a}}function TW(e){return function(t){t.root||(t=t.return)&&e(t)}}function jW(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var PW=function(t,n,r){for(var i=0,o=0;i=o,o=Vn(),i===38&&o===12&&(n[r]=1),!ol(o);)nn();return Hl(t,Gt)},LW=function(t,n){var r=-1,i=44;do switch(ol(i)){case 0:i===38&&Vn()===12&&(n[r]=1),t[r]+=PW(Gt-1,n,r);break;case 2:t[r]+=Hs(i);break;case 4:if(i===44){t[++r]=Vn()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=cd(i)}while(i=nn());return t},RW=function(t,n){return AN(LW(DN(t),n))},_0=new WeakMap,OW=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,i=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!_0.get(r))&&!i){_0.set(t,!0);for(var o=[],a=RW(n,o),l=r.props,s=0,u=0;s<a.length;s++)for(var c=0;c<l.length;c++,u++)t.props[u]=o[s]?a[s].replace(/&\f/g,l[c]):l[c]+" "+a[s]}}},kW=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function CN(e,t){switch(vW(e,t)){case 5103:return xe+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return xe+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return xe+e+$u+e+xt+e+e;case 6828:case 4268:return xe+e+xt+e+e;case 6165:return xe+e+xt+"flex-"+e+e;case 5187:return xe+e+Me(e,/(\w+).+(:[^]+)/,xe+"box-$1$2"+xt+"flex-$1$2")+e;case 5443:return xe+e+xt+"flex-item-"+Me(e,/flex-|-self/,"")+e;case 4675:return xe+e+xt+"flex-line-pack"+Me(e,/align-content|flex-|-self/,"")+e;case 5548:return xe+e+xt+Me(e,"shrink","negative")+e;case 5292:return xe+e+xt+Me(e,"basis","preferred-size")+e;case 6060:return xe+"box-"+Me(e,"-grow","")+xe+e+xt+Me(e,"grow","positive")+e;case 4554:return xe+Me(e,/([^-])(transform)/g,"$1"+xe+"$2")+e;case 6187:return Me(Me(Me(e,/(zoom-|grab)/,xe+"$1"),/(image-set)/,xe+"$1"),e,"")+e;case 5495:case 3959:return Me(e,/(image-set\([^]*)/,xe+"$1$`$1");case 4968:return Me(Me(e,/(.+:)(flex-)?(.*)/,xe+"box-pack:$3"+xt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+xe+e+e;case 4095:case 3583:case 4068:case 2532:return Me(e,/(.+)-inline(.+)/,xe+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Bn(e)-1-t>6)switch(ht(e,t+1)){case 109:if(ht(e,t+4)!==45)break;case 102:return Me(e,/(.+:)(.+)-([^]+)/,"$1"+xe+"$2-$3$1"+$u+(ht(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Jp(e,"stretch")?CN(Me(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(ht(e,t+1)!==115)break;case 6444:switch(ht(e,Bn(e)-3-(~Jp(e,"!important")&&10))){case 107:return Me(e,":",":"+xe)+e;case 101:return Me(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+xe+(ht(e,14)===45?"inline-":"")+"box$3$1"+xe+"$2$3$1"+xt+"$2box$3")+e}break;case 5936:switch(ht(e,t+11)){case 114:return xe+e+xt+Me(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return xe+e+xt+Me(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return xe+e+xt+Me(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return xe+e+xt+e+e}return e}var zW=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case gh:t.return=CN(t.value,t.length);break;case MN:return oo([oa(t,{value:Me(t.value,"@","@"+xe)})],i);case mh:if(t.length)return IW(t.props,function(o){switch(yW(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return oo([oa(t,{props:[Me(o,/:(read-\w+)/,":"+$u+"$1")]})],i);case"::placeholder":return oo([oa(t,{props:[Me(o,/:(plac\w+)/,":"+xe+"input-$1")]}),oa(t,{props:[Me(o,/:(plac\w+)/,":"+$u+"$1")]}),oa(t,{props:[Me(o,/:(plac\w+)/,xt+"input-$1")]})],i)}return""})}},BW=[zW],UW=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(h){var w=h.getAttribute("data-emotion");w.indexOf(" ")!==-1&&(document.head.appendChild(h),h.setAttribute("data-s",""))})}var i=t.stylisPlugins||BW,o={},a,l=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(h){for(var w=h.getAttribute("data-emotion").split(" "),I=1;I<w.length;I++)o[w[I]]=!0;l.push(h)});var s,u=[OW,kW];{var c,d=[CW,TW(function(h){c.insert(h)})],f=EW(u.concat(i,d)),p=function(w){return oo(DW(w),f)};s=function(w,I,y,b){c=y,p(w?w+"{"+I.styles+"}":I.styles),b&&(g.inserted[I.name]=!0)}}var g={key:n,sheet:new fW({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:s};return g.sheet.hydrate(l),g};function $W(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var _W={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},FW=/[A-Z]|^ms/g,HW=/_EMO_([^_]+?)_([^]*?)_EMO_/g,EN=function(t){return t.charCodeAt(1)===45},F0=function(t){return t!=null&&typeof t!="boolean"},Nf=jW(function(e){return EN(e)?e:e.replace(FW,"-$&").toLowerCase()}),H0=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(HW,function(r,i,o){return Un={name:i,styles:o,next:Un},i})}return _W[t]!==1&&!EN(t)&&typeof n=="number"&&n!==0?n+"px":n};function al(e,t,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 Un={name:n.name,styles:n.styles,next:Un},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)Un={name:r.name,styles:r.styles,next:Un},r=r.next;var i=n.styles+";";return i}return WW(e,t,n)}case"function":{if(e!==void 0){var o=Un,a=n(e);return Un=o,al(e,t,a)}break}}if(t==null)return n;var l=t[n];return l!==void 0?l:n}function WW(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=al(e,t,n[i])+";";else for(var o in n){var a=n[o];if(typeof a!="object")t!=null&&t[a]!==void 0?r+=o+"{"+t[a]+"}":F0(a)&&(r+=Nf(o)+":"+H0(o,a)+";");else if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var l=0;l<a.length;l++)F0(a[l])&&(r+=Nf(o)+":"+H0(o,a[l])+";");else{var s=al(e,t,a);switch(o){case"animation":case"animationName":{r+=Nf(o)+":"+s+";";break}default:r+=o+"{"+s+"}"}}}return r}var W0=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Un,Df=function(t,n,r){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var i=!0,o="";Un=void 0;var a=t[0];a==null||a.raw===void 0?(i=!1,o+=al(r,n,a)):o+=a[0];for(var l=1;l<t.length;l++)o+=al(r,n,t[l]),i&&(o+=a[l]);W0.lastIndex=0;for(var s="",u;(u=W0.exec(o))!==null;)s+="-"+u[1];var c=$W(o)+s;return{name:c,styles:o,next:Un}},GW=!0;function TN(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):r+=i+" "}),r}var VW=function(t,n,r){var i=t.key+"-"+n.name;(r===!1||GW===!1)&&t.registered[i]===void 0&&(t.registered[i]=n.styles)},ZW=function(t,n,r){VW(t,n,r);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+i:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function G0(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function V0(e,t,n){var r=[],i=TN(e,r,n);return r.length<2?n:i+t(r)}var YW=function(t){var n=UW(t);n.sheet.speedy=function(l){this.isSpeedy=l},n.compat=!0;var r=function(){for(var s=arguments.length,u=new Array(s),c=0;c<s;c++)u[c]=arguments[c];var d=Df(u,n.registered,void 0);return ZW(n,d,!1),n.key+"-"+d.name},i=function(){for(var s=arguments.length,u=new Array(s),c=0;c<s;c++)u[c]=arguments[c];var d=Df(u,n.registered),f="animation-"+d.name;return G0(n,{name:d.name,styles:"@keyframes "+f+"{"+d.styles+"}"}),f},o=function(){for(var s=arguments.length,u=new Array(s),c=0;c<s;c++)u[c]=arguments[c];var d=Df(u,n.registered);G0(n,d)},a=function(){for(var s=arguments.length,u=new Array(s),c=0;c<s;c++)u[c]=arguments[c];return V0(n.registered,r,QW(u))};return{css:r,cx:a,injectGlobal:o,keyframes:i,hydrate:function(s){s.forEach(function(u){n.inserted[u]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:TN.bind(null,n.registered),merge:V0.bind(null,n.registered,r)}},QW=function e(t){for(var n="",r=0;r<t.length;r++){var i=t[r];if(i!=null){var o=void 0;switch(typeof i){case"boolean":break;case"object":{if(Array.isArray(i))o=e(i);else{o="";for(var a in i)i[a]&&a&&(o&&(o+=" "),o+=a)}break}default:o=i}o&&(n&&(n+=" "),n+=o)}}return n},jN=YW({key:"css"}),JW=jN.cx,We=jN.css,XW=uW,Z0=e=>{const t=e.split(`
169
- `);if(t.every(o=>!o))return t.length===2?[]:(t.pop(),t);const r=t[t.length-1],i=t[0];return r||t.pop(),i||t.shift(),t},qW=(e,t,n="diffChars")=>{const r=XW[n](e,t),i={left:[],right:[]};return r.forEach(({added:o,removed:a,value:l})=>{const s={};return o&&(s.type=1,s.value=l,i.right.push(s)),a&&(s.type=2,s.value=l,i.left.push(s)),!a&&!o&&(s.type=0,s.value=l,i.right.push(s),i.left.push(s)),s}),i},KW=(e,t,n=!1,r="diffChars",i=0)=>{const o=dh(e.trimRight(),t.trimRight(),{newlineIsToken:!0,ignoreWhitespace:!1,ignoreCase:!1});let a=i,l=i,s=[],u=0;const c=[],d=[],f=(p,g,h,w,I)=>Z0(p).map((b,x)=>{const N={},M={};if(!(d.includes(`${g}-${x}`)||I&&x!==0)){if(h||w)if(c.includes(u)||c.push(u),w){l+=1,N.lineNumber=l,N.type=2,N.value=b||" ";const S=o[g+1];if(S&&S.added&&Z0(S.value)[x]){const{value:L,lineNumber:R,type:O}=f(S.value,g,!0,!1,!0)[0].right;if(d.push(`${g+1}-${x}`),M.lineNumber=R,M.type=O,n)M.value=L;else{const J=qW(b,L,r);M.value=J.right,N.value=J.left}}}else a+=1,M.lineNumber=a,M.type=1,M.value=b;else l+=1,a+=1,N.lineNumber=l,N.type=0,N.value=b,M.lineNumber=a,M.type=0,M.value=b;return u+=1,{right:M,left:N}}}).filter(Boolean);return o.forEach(({added:p,removed:g,value:h},w)=>{s=[...s,...f(h,w,p,g)]}),{lineInformation:s,diffLines:c}},eG=(e,t=!1)=>{const{variables:n={},...r}=e,i={light:{diffViewerBackground:"#fff",diffViewerColor:"#212529",addedBackground:"#e6ffed",addedColor:"#24292e",removedBackground:"#ffeef0",removedColor:"#24292e",wordAddedBackground:"#acf2bd",wordRemovedBackground:"#fdb8c0",addedGutterBackground:"#cdffd8",removedGutterBackground:"#ffdce0",gutterBackground:"#f7f7f7",gutterBackgroundDark:"#f3f1f1",highlightBackground:"#fffbdd",highlightGutterBackground:"#fff5b1",codeFoldGutterBackground:"#dbedff",codeFoldBackground:"#f1f8ff",emptyLineBackground:"#fafbfc",gutterColor:"#212529",addedGutterColor:"#212529",removedGutterColor:"#212529",codeFoldContentColor:"#212529",diffViewerTitleBackground:"#fafbfc",diffViewerTitleColor:"#212529",diffViewerTitleBorderColor:"#eee",...n.light||{}},dark:{diffViewerBackground:"#2e303c",diffViewerColor:"#FFF",addedBackground:"#044B53",addedColor:"white",removedBackground:"#632F34",removedColor:"white",wordAddedBackground:"#055d67",wordRemovedBackground:"#7d383f",addedGutterBackground:"#034148",removedGutterBackground:"#632b30",gutterBackground:"#2c2f3a",gutterBackgroundDark:"#262933",highlightBackground:"#2a3967",highlightGutterBackground:"#2d4077",codeFoldGutterBackground:"#21232b",codeFoldBackground:"#262831",emptyLineBackground:"#363946",gutterColor:"#464c67",addedGutterColor:"#8c8c8c",removedGutterColor:"#8c8c8c",codeFoldContentColor:"#555a7b",diffViewerTitleBackground:"#2f323e",diffViewerTitleColor:"#555a7b",diffViewerTitleBorderColor:"#353846",...n.dark||{}}},o=t?i.dark:i.light,a=We({width:"100%",label:"content"}),l=We({[`.${a}`]:{width:"50%"},label:"split-view"}),s=We({width:"100%",background:o.diffViewerBackground,pre:{margin:0,whiteSpace:"pre-wrap",lineHeight:"25px"},label:"diff-container",borderCollapse:"collapse"}),u=We({color:o.codeFoldContentColor,label:"code-fold-content"}),c=We({color:o.diffViewerColor,label:"content-text"}),d=We({background:o.diffViewerTitleBackground,padding:10,borderBottom:`1px solid ${o.diffViewerTitleBorderColor}`,label:"title-block",":last-child":{borderLeft:`1px solid ${o.diffViewerTitleBorderColor}`},[`.${c}`]:{color:o.diffViewerTitleColor}}),f=We({color:o.gutterColor,label:"line-number"}),p=We({background:o.removedBackground,color:o.removedColor,pre:{color:o.removedColor},[`.${f}`]:{color:o.removedGutterColor},label:"diff-removed"}),g=We({background:o.addedBackground,color:o.addedColor,pre:{color:o.addedColor},[`.${f}`]:{color:o.addedGutterColor},label:"diff-added"}),h=We({padding:2,display:"inline-flex",borderRadius:1,label:"word-diff"}),w=We({background:o.wordAddedBackground,label:"word-added"}),I=We({background:o.wordRemovedBackground,label:"word-removed"}),y=We({backgroundColor:o.codeFoldGutterBackground,label:"code-fold-gutter"}),b=We({backgroundColor:o.codeFoldBackground,height:40,fontSize:14,fontWeight:700,label:"code-fold",a:{textDecoration:"underline !important",cursor:"pointer",pre:{display:"inline"}}}),x=We({backgroundColor:o.emptyLineBackground,label:"empty-line"}),N=We({width:25,paddingLeft:10,paddingRight:10,userSelect:"none",label:"marker",[`&.${g}`]:{pre:{color:o.addedColor}},[`&.${p}`]:{pre:{color:o.removedColor}}}),M=We({background:o.highlightBackground,label:"highlighted-line",[`.${w}, .${I}`]:{backgroundColor:"initial"}}),S=We({label:"highlighted-gutter"}),C=We({userSelect:"none",minWidth:50,padding:"0 10px",label:"gutter",textAlign:"right",background:o.gutterBackground,"&:hover":{cursor:"pointer",background:o.gutterBackgroundDark,pre:{opacity:1}},pre:{opacity:.5},[`&.${g}`]:{background:o.addedGutterBackground},[`&.${p}`]:{background:o.removedGutterBackground},[`&.${S}`]:{background:o.highlightGutterBackground,"&:hover":{background:o.highlightGutterBackground}}}),L=We({"&:hover":{background:o.gutterBackground,cursor:"initial"},label:"empty-gutter"}),R=We({verticalAlign:"baseline",label:"line"}),O={diffContainer:s,diffRemoved:p,diffAdded:g,splitView:l,marker:N,highlightedGutter:S,highlightedLine:M,gutter:C,line:R,wordDiff:h,wordAdded:w,wordRemoved:I,codeFoldGutter:y,codeFold:b,emptyGutter:L,emptyLine:x,lineNumber:f,contentText:c,content:a,codeFoldContent:u,titleBlock:d},J=Object.keys(r).reduce((U,G)=>({...U,[G]:We(r[G])}),{});return Object.keys(O).reduce((U,G)=>({...U,[G]:J[G]?JW(O[G],J[G]):O[G]}),{})},PN=class extends v.Component{constructor(e){super(e),this.resetCodeBlocks=()=>this.state.expandedBlocks.length>0?(this.setState({expandedBlocks:[]}),!0):!1,this.onBlockExpand=t=>{const n=this.state.expandedBlocks.slice();n.push(t),this.setState({expandedBlocks:n})},this.computeStyles=OH(eG),this.onLineNumberClickProxy=t=>this.props.onLineNumberClick?n=>this.props.onLineNumberClick(t,n):()=>{},this.renderWordDiff=(t,n)=>t.map((r,i)=>v.createElement("span",{key:i,className:ae(this.styles.wordDiff,{[this.styles.wordAdded]:r.type===1,[this.styles.wordRemoved]:r.type===2})},n?n(r.value):r.value)),this.renderLine=(t,n,r,i,o,a)=>{const l=`${r}-${t}`,s=`${a}-${o}`,u=this.props.highlightLines.includes(l)||this.props.highlightLines.includes(s),c=n===1,d=n===2;let f;return Array.isArray(i)?f=this.renderWordDiff(i,this.props.renderContent):this.props.renderContent?f=this.props.renderContent(i):f=i,v.createElement(v.Fragment,null,!this.props.hideLineNumbers&&v.createElement("td",{onClick:t&&this.onLineNumberClickProxy(l),className:ae(this.styles.gutter,{[this.styles.emptyGutter]:!t,[this.styles.diffAdded]:c,[this.styles.diffRemoved]:d,[this.styles.highlightedGutter]:u})},v.createElement("pre",{className:this.styles.lineNumber},t)),!this.props.splitView&&!this.props.hideLineNumbers&&v.createElement("td",{onClick:o&&this.onLineNumberClickProxy(s),className:ae(this.styles.gutter,{[this.styles.emptyGutter]:!o,[this.styles.diffAdded]:c,[this.styles.diffRemoved]:d,[this.styles.highlightedGutter]:u})},v.createElement("pre",{className:this.styles.lineNumber},o)),v.createElement("td",{className:ae(this.styles.marker,{[this.styles.emptyLine]:!f,[this.styles.diffAdded]:c,[this.styles.diffRemoved]:d,[this.styles.highlightedLine]:u})},v.createElement("pre",null,c&&"+",d&&"-")),v.createElement("td",{className:ae(this.styles.content,{[this.styles.emptyLine]:!f,[this.styles.diffAdded]:c,[this.styles.diffRemoved]:d,[this.styles.highlightedLine]:u})},v.createElement("pre",{className:this.styles.contentText},f)))},this.renderSplitView=({left:t,right:n},r)=>v.createElement("tr",{key:r,className:this.styles.line},this.renderLine(t.lineNumber,t.type,"L",t.value),this.renderLine(n.lineNumber,n.type,"R",n.value)),this.renderInlineView=({left:t,right:n},r)=>{let i;return t.type===2&&n.type===1?v.createElement(v.Fragment,{key:r},v.createElement("tr",{className:this.styles.line},this.renderLine(t.lineNumber,t.type,"L",t.value,null)),v.createElement("tr",{className:this.styles.line},this.renderLine(null,n.type,"R",n.value,n.lineNumber))):(t.type===2&&(i=this.renderLine(t.lineNumber,t.type,"L",t.value,null)),t.type===0&&(i=this.renderLine(t.lineNumber,t.type,"L",t.value,n.lineNumber,"R")),n.type===1&&(i=this.renderLine(null,n.type,"R",n.value,n.lineNumber)),v.createElement("tr",{key:r,className:this.styles.line},i))},this.onBlockClickProxy=t=>()=>this.onBlockExpand(t),this.renderSkippedLineIndicator=(t,n,r,i)=>{const{hideLineNumbers:o,splitView:a}=this.props,l=this.props.codeFoldMessageRenderer?this.props.codeFoldMessageRenderer(t,r,i):v.createElement("pre",{className:this.styles.codeFoldContent},"Expand ",t," lines ..."),s=v.createElement("td",null,v.createElement("a",{onClick:this.onBlockClickProxy(n),tabIndex:0},l)),u=!a&&!o;return v.createElement("tr",{key:`${r}-${i}`,className:this.styles.codeFold},!o&&v.createElement("td",{className:this.styles.codeFoldGutter}),v.createElement("td",{className:ae({[this.styles.codeFoldGutter]:u})}),u?v.createElement(v.Fragment,null,v.createElement("td",null),s):v.createElement(v.Fragment,null,s,v.createElement("td",null)),v.createElement("td",null),v.createElement("td",null))},this.renderDiff=()=>{const{oldValue:t,newValue:n,splitView:r,disableWordDiff:i,compareMethod:o,linesOffset:a}=this.props,{lineInformation:l,diffLines:s}=KW(t,n,i,o,a),u=this.props.extraLinesSurroundingDiff<0?0:this.props.extraLinesSurroundingDiff;let c=[];return l.map((d,f)=>{const p=s[0],g=p-f;if(this.props.showDiffOnly&&(g===-u&&(c=[],s.shift()),d.left.type===0&&(g>u||typeof p>"u")&&!this.state.expandedBlocks.includes(p)))return c.push(f+1),f===l.length-1&&c.length>1?this.renderSkippedLineIndicator(c.length,p,d.left.lineNumber,d.right.lineNumber):null;const h=r?this.renderSplitView(d,f):this.renderInlineView(d,f);if(g===u&&c.length>0){const{length:w}=c;return c=[],v.createElement(v.Fragment,{key:f},this.renderSkippedLineIndicator(w,p,d.left.lineNumber,d.right.lineNumber),h)}return h})},this.render=()=>{const{oldValue:t,newValue:n,useDarkTheme:r,leftTitle:i,rightTitle:o,splitView:a,hideLineNumbers:l}=this.props;if(typeof t!="string"||typeof n!="string")throw Error('"oldValue" and "newValue" should be strings');this.styles=this.computeStyles(this.props.styles,r);const s=this.renderDiff(),u=l?2:3,c=l?2:4,d=(i||o)&&v.createElement("tr",null,v.createElement("td",{colSpan:a?u:c,className:this.styles.titleBlock},v.createElement("pre",{className:this.styles.contentText},i)),a&&v.createElement("td",{colSpan:u,className:this.styles.titleBlock},v.createElement("pre",{className:this.styles.contentText},o)));return v.createElement("table",{className:ae(this.styles.diffContainer,{[this.styles.splitView]:a})},v.createElement("tbody",null,d,s))},this.state={expandedBlocks:[]}}};PN.defaultProps={oldValue:"",newValue:"",splitView:!0,highlightLines:[],disableWordDiff:!1,compareMethod:"diffChars",styles:{},hideLineNumbers:!1,extraLinesSurroundingDiff:3,showDiffOnly:!0,useDarkTheme:!1,linesOffset:0};var tG=PN;const nG={line:{padding:"5px 2px","&:hover":{background:"#a26ea1"}},titleBlock:{padding:"5px",paddingLeft:"15px"}},rG=({url:e,surfaceResponse:t})=>{const n=Cl().get("path"),r=$c(),i=El(),o=Al(),[a,l]=v.useState(!1),[s,u]=v.useState(!1),[c,d]=v.useState(null),[f,p]=v.useState(null),[g,h]=v.useState(!0);v.useEffect(()=>{(async()=>{try{(await fetch(`${e}/ping`)).ok||h(!1)}catch{h(!1)}})()},[g]),v.useEffect(()=>{async function N(M){const S=await fetch(`${e}/open-api-content?path=${n}`,{method:"GET"});if(S.status!==200){const R=await S.json();throw Error(R.message)}const L=(await S.json()).filter(R=>R.path===M);if(L.length>0)return L[0]}if(g){const M=new EventSource(`${e}/updates`);return M.onmessage=async S=>{const C=JSON.parse(S.data);if(C.type==="update"){if(n===null)return;const R=/([a-zA-Z0-9\.\-\_]*)$/.exec(C.filePath);if(!R||!R[0])return;const O=R[0];if(O!==zp&&O!==n){console.log(`discarded event since changes were on '${C.filePath}'`);return}try{const J=await N(O);if(J){const U={path:J.path,type:xu.File,content:JSON.stringify(J.content,void 0,4),saveState:Nt.unmodified};O===zp&&i.policyListFileModel.saveState!==Nt.unmodified||O===n&&r.openApiFileModel.saveState!==Nt.unmodified?x(O,U):(o(U,Nt.unmodified),t(`Successfully updated Local Designer with external file changes from '${U.path}'.`,"info"))}}catch(J){const U=J.message&&J.message.includes("Failed to fetch")?Bc:`Error: ${J.message}`;t(U,"error")}}},M.onerror=S=>{console.warn("Hot-reload error:",S),t("An error occurred while attempting to set the hot-reload connection. Try restarting the editor.","error"),M.close(),h(!1)},M.addEventListener("close",()=>M.close()),()=>{M.close()}}},[i,r,g]);const w=()=>{l(!1),b(),d(null),p(null),u(!1)},I=()=>{if(f===null){t("An error occurred while attempting to overwrite using the external file changes. Try refreshing the editor session.","error"),w();return}o(f,Nt.unmodified),t(`Successfully updated Local Designer with external file changes from '${f.path}'.`,"info"),w()},[y,b]=ho(()=>m.jsx(kb,{onClose:w,isOpen:!0,maxWidth:"max-w-4xl",children:m.jsxs("div",{className:"space-y-4",children:[m.jsx("div",{className:"text-xl font-bold",children:"Changes outside of Local Designer"}),m.jsx("div",{className:"text-left text-sm text-gray-600 whitespace-pre-line w-full mb-2",children:m.jsxs("p",{className:"leading-6 mb-5",children:["Failed to hot-reload '",c,"': The content in Local Designer is newer.",m.jsx("br",{})," Please choose if you want to keep current Local Designer changes or overwrite them with the external changes."]})}),s?m.jsx("div",{className:"overflow-scroll h-96 text-sm border",children:m.jsx(tG,{oldValue:(f==null?void 0:f.path)==="policies.json"?i.policyListFileModel.content:r.openApiFileModel.content,newValue:f==null?void 0:f.content,splitView:!0,leftTitle:"Current changes",rightTitle:"External changes",styles:nG})}):m.jsx("div",{className:"text-sm",children:"* This diff is too large to display properly."}),m.jsxs("div",{className:"flex flex-row items-center justify-center space-x-2",children:[m.jsx(En,{label:"Keep current changes",onClick:w}),m.jsx(En,{dataTestId:"connect-non-empty-repo-confirm",buttonType:xi.WHITE,label:"Overwrite current changes",onClick:I})]})]})}),[c,i,f,r]),x=(N,M)=>{d(N),p(M);try{if(M.path.endsWith(".oas.json")&&M.content){const S=JSON.parse(M.content);S.paths&&Object.keys(S.paths).length<40&&u(!0)}else if(M.path.endsWith("policies.json")&&M.content){const S=JSON.parse(M.content);S.policies&&S.policies.length<40&&u(!0)}}catch{console.warn("Failed while calculating the diff size")}y()};return m.jsx("div",{})},iG=5e3;function oG(){const[e,t]=v.useState(null),n=a=>{t({message:a,type:"error"})},r=(a,l)=>{t({message:a,type:l}),setTimeout(()=>{t(null)},iG)},i=window.SERVER_DATA,o=`http://${i.server_address}:${i.server_port}`;return m.jsx("div",{className:"h-screen min-w-lg",children:m.jsx(a3,{children:m.jsx(yC,{children:m.jsx(mk,{children:m.jsx(s3,{url:o,handleErrors:n,children:m.jsx(f3,{children:m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"flex gap-5 px-3 mx-4 ",children:[m.jsx("div",{className:"flex-grow",children:m.jsx(OM,{url:o,handleErrors:n})}),m.jsx("div",{className:"flex-grow",children:e!==null&&m.jsx(PH,{message:e.message,type:e.type})}),m.jsx("div",{className:"flex-grow",children:m.jsx(jH,{url:o,surfaceResponse:r})})]}),m.jsx(rG,{url:o,surfaceResponse:r}),m.jsx("div",{className:"flex-grow",children:m.jsx(TH,{})})]})})})})})})})}Af.createRoot(document.getElementById("root")).render(m.jsx(k.StrictMode,{children:m.jsx(oG,{})}));
168
+ `}function KH(e,t,n,r,i,o){return MS(e,e,t,n,r,i,o)}function eG(e,t){return e.length!==t.length?!1:Yp(e,t)}function Yp(e,t){if(t.length>e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function tG(e){var t=Qp(e.lines),n=t.oldLines,r=t.newLines;n!==void 0?e.oldLines=n:delete e.oldLines,r!==void 0?e.newLines=r:delete e.newLines}function nG(e,t,n){e=T0(e,n),t=T0(t,n);var r={};(e.index||t.index)&&(r.index=e.index||t.index),(e.newFileName||t.newFileName)&&(j0(e)?j0(t)?(r.oldFileName=bs(r,e.oldFileName,t.oldFileName),r.newFileName=bs(r,e.newFileName,t.newFileName),r.oldHeader=bs(r,e.oldHeader,t.oldHeader),r.newHeader=bs(r,e.newHeader,t.newHeader)):(r.oldFileName=e.oldFileName,r.newFileName=e.newFileName,r.oldHeader=e.oldHeader,r.newHeader=e.newHeader):(r.oldFileName=t.oldFileName||e.oldFileName,r.newFileName=t.newFileName||e.newFileName,r.oldHeader=t.oldHeader||e.oldHeader,r.newHeader=t.newHeader||e.newHeader)),r.hunks=[];for(var i=0,o=0,a=0,l=0;i<e.hunks.length||o<t.hunks.length;){var s=e.hunks[i]||{oldStart:1/0},u=t.hunks[o]||{oldStart:1/0};if(L0(s,u))r.hunks.push(P0(s,a)),i++,l+=s.newLines-s.oldLines;else if(L0(u,s))r.hunks.push(P0(u,l)),o++,a+=u.newLines-u.oldLines;else{var c={oldStart:Math.min(s.oldStart,u.oldStart),oldLines:0,newStart:Math.min(s.newStart+a,u.oldStart+l),newLines:0,lines:[]};rG(c,s.oldStart,s.lines,u.oldStart,u.lines),o++,i++,r.hunks.push(c)}}return r}function T0(e,t){if(typeof e=="string"){if(/^@@/m.test(e)||/^Index:/m.test(e))return ud(e)[0];if(!t)throw new Error("Must provide a base reference or pass in a patch");return fh(void 0,void 0,t,e)}return e}function j0(e){return e.newFileName&&e.newFileName!==e.oldFileName}function bs(e,t,n){return t===n?t:(e.conflict=!0,{mine:t,theirs:n})}function L0(e,t){return e.oldStart<t.oldStart&&e.oldStart+e.oldLines<t.oldStart}function P0(e,t){return{oldStart:e.oldStart,oldLines:e.oldLines,newStart:e.newStart+t,newLines:e.newLines,lines:e.lines}}function rG(e,t,n,r,i){var o={offset:t,lines:n,index:0},a={offset:r,lines:i,index:0};for(O0(e,o,a),O0(e,a,o);o.index<o.lines.length&&a.index<a.lines.length;){var l=o.lines[o.index],s=a.lines[a.index];if((l[0]==="-"||l[0]==="+")&&(s[0]==="-"||s[0]==="+"))iG(e,o,a);else if(l[0]==="+"&&s[0]===" "){var u;(u=e.lines).push.apply(u,or(ui(o)))}else if(s[0]==="+"&&l[0]===" "){var c;(c=e.lines).push.apply(c,or(ui(a)))}else l[0]==="-"&&s[0]===" "?R0(e,o,a):s[0]==="-"&&l[0]===" "?R0(e,a,o,!0):l===s?(e.lines.push(l),o.index++,a.index++):ph(e,ui(o),ui(a))}k0(e,o),k0(e,a),tG(e)}function iG(e,t,n){var r=ui(t),i=ui(n);if(z0(r)&&z0(i)){if(Yp(r,i)&&B0(n,r,r.length-i.length)){var o;(o=e.lines).push.apply(o,or(r));return}else if(Yp(i,r)&&B0(t,i,i.length-r.length)){var a;(a=e.lines).push.apply(a,or(i));return}}else if(eG(r,i)){var l;(l=e.lines).push.apply(l,or(r));return}ph(e,r,i)}function R0(e,t,n,r){var i=ui(t),o=oG(n,i);if(o.merged){var a;(a=e.lines).push.apply(a,or(o.merged))}else ph(e,r?o:i,r?i:o)}function ph(e,t,n){e.conflict=!0,e.lines.push({conflict:!0,mine:t,theirs:n})}function O0(e,t,n){for(;t.offset<n.offset&&t.index<t.lines.length;){var r=t.lines[t.index++];e.lines.push(r),t.offset++}}function k0(e,t){for(;t.index<t.lines.length;){var n=t.lines[t.index++];e.lines.push(n)}}function ui(e){for(var t=[],n=e.lines[e.index][0];e.index<e.lines.length;){var r=e.lines[e.index];if(n==="-"&&r[0]==="+"&&(n="+"),n===r[0])t.push(r),e.index++;else break}return t}function oG(e,t){for(var n=[],r=[],i=0,o=!1,a=!1;i<t.length&&e.index<e.lines.length;){var l=e.lines[e.index],s=t[i];if(s[0]==="+")break;if(o=o||l[0]!==" ",r.push(s),i++,l[0]==="+")for(a=!0;l[0]==="+";)n.push(l),l=e.lines[++e.index];s.substr(1)===l.substr(1)?(n.push(l),e.index++):a=!0}if((t[i]||"")[0]==="+"&&o&&(a=!0),a)return n;for(;i<t.length;)r.push(t[i++]);return{merged:r,changes:n}}function z0(e){return e.reduce(function(t,n){return t&&n[0]==="-"},!0)}function B0(e,t,n){for(var r=0;r<n;r++){var i=t[t.length-n+r].substr(1);if(e.lines[e.index+r]!==" "+i)return!1}return e.index+=n,!0}function Qp(e){var t=0,n=0;return e.forEach(function(r){if(typeof r!="string"){var i=Qp(r.mine),o=Qp(r.theirs);t!==void 0&&(i.oldLines===o.oldLines?t+=i.oldLines:t=void 0),n!==void 0&&(i.newLines===o.newLines?n+=i.newLines:n=void 0)}else n!==void 0&&(r[0]==="+"||r[0]===" ")&&n++,t!==void 0&&(r[0]==="-"||r[0]===" ")&&t++}),{oldLines:t,newLines:n}}function aG(e){for(var t=[],n,r,i=0;i<e.length;i++)n=e[i],n.added?r=1:n.removed?r=-1:r=0,t.push([r,n.value]);return t}function lG(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];r.added?t.push("<ins>"):r.removed&&t.push("<del>"),t.push(sG(r.value)),r.added?t.push("</ins>"):r.removed&&t.push("</del>")}return t.join("")}function sG(e){var t=e;return t=t.replace(/&/g,"&amp;"),t=t.replace(/</g,"&lt;"),t=t.replace(/>/g,"&gt;"),t=t.replace(/"/g,"&quot;"),t}const uG=Object.freeze(Object.defineProperty({__proto__:null,Diff:Xn,applyPatch:wS,applyPatches:qH,canonicalize:Bu,convertChangesToDMP:aG,convertChangesToXML:lG,createPatch:KH,createTwoFilesPatch:MS,diffArrays:JH,diffChars:UH,diffCss:GH,diffJson:QH,diffLines:dh,diffSentences:HH,diffTrimmedLines:FH,diffWords:$H,diffWordsWithSpace:_H,merge:nG,parsePatch:ud,structuredPatch:fh},Symbol.toStringTag,{value:"Module"}));function cG(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function dG(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var fG=function(){function e(n){var r=this;this._insertTag=function(i){var o;r.tags.length===0?r.insertionPoint?o=r.insertionPoint.nextSibling:r.prepend?o=r.container.firstChild:o=r.before:o=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,o),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(dG(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=cG(i);try{o.insertRule(r,o.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){return r.parentNode&&r.parentNode.removeChild(r)}),this.tags=[],this.ctr=0},e}(),xt="-ms-",$u="-moz-",xe="-webkit-",xS="comm",mh="rule",gh="decl",pG="@import",bS="@keyframes",mG="@layer",gG=Math.abs,cd=String.fromCharCode,hG=Object.assign;function vG(e,t){return ht(e,0)^45?(((t<<2^ht(e,0))<<2^ht(e,1))<<2^ht(e,2))<<2^ht(e,3):0}function NS(e){return e.trim()}function yG(e,t){return(e=t.exec(e))?e[0]:e}function be(e,t,n){return e.replace(t,n)}function Jp(e,t){return e.indexOf(t)}function ht(e,t){return e.charCodeAt(t)|0}function il(e,t,n){return e.slice(t,n)}function Bn(e){return e.length}function hh(e){return e.length}function Ns(e,t){return t.push(e),e}function IG(e,t){return e.map(t).join("")}var dd=1,Do=1,SS=0,Wt=0,qe=0,zo="";function fd(e,t,n,r,i,o,a){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:dd,column:Do,length:a,return:""}}function oa(e,t){return hG(fd("",null,null,"",null,null,0),e,{length:-e.length},t)}function wG(){return qe}function MG(){return qe=Wt>0?ht(zo,--Wt):0,Do--,qe===10&&(Do=1,dd--),qe}function nn(){return qe=Wt<SS?ht(zo,Wt++):0,Do++,qe===10&&(Do=1,dd++),qe}function Vn(){return ht(zo,Wt)}function Fs(){return Wt}function Hl(e,t){return il(zo,e,t)}function ol(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function DS(e){return dd=Do=1,SS=Bn(zo=e),Wt=0,[]}function AS(e){return zo="",e}function Hs(e){return NS(Hl(Wt-1,Xp(e===91?e+2:e===40?e+1:e)))}function xG(e){for(;(qe=Vn())&&qe<33;)nn();return ol(e)>2||ol(qe)>3?"":" "}function bG(e,t){for(;--t&&nn()&&!(qe<48||qe>102||qe>57&&qe<65||qe>70&&qe<97););return Hl(e,Fs()+(t<6&&Vn()==32&&nn()==32))}function Xp(e){for(;nn();)switch(qe){case e:return Wt;case 34:case 39:e!==34&&e!==39&&Xp(qe);break;case 40:e===41&&Xp(e);break;case 92:nn();break}return Wt}function NG(e,t){for(;nn()&&e+qe!==47+10;)if(e+qe===42+42&&Vn()===47)break;return"/*"+Hl(t,Wt-1)+"*"+cd(e===47?e:nn())}function SG(e){for(;!ol(Vn());)nn();return Hl(e,Wt)}function DG(e){return AS(Gs("",null,null,null,[""],e=DS(e),0,[0],e))}function Gs(e,t,n,r,i,o,a,l,s){for(var u=0,c=0,d=a,f=0,p=0,g=0,h=1,w=1,I=1,y=0,M="",x=i,S=o,b=r,N=M;w;)switch(g=y,y=nn()){case 40:if(g!=108&&ht(N,d-1)==58){Jp(N+=be(Hs(y),"&","&\f"),"&\f")!=-1&&(I=-1);break}case 34:case 39:case 91:N+=Hs(y);break;case 9:case 10:case 13:case 32:N+=xG(g);break;case 92:N+=bG(Fs()-1,7);continue;case 47:switch(Vn()){case 42:case 47:Ns(AG(NG(nn(),Fs()),t,n),s);break;default:N+="/"}break;case 123*h:l[u++]=Bn(N)*I;case 125*h:case 59:case 0:switch(y){case 0:case 125:w=0;case 59+c:I==-1&&(N=be(N,/\f/g,"")),p>0&&Bn(N)-d&&Ns(p>32?$0(N+";",r,n,d-1):$0(be(N," ","")+";",r,n,d-2),s);break;case 59:N+=";";default:if(Ns(b=U0(N,t,n,u,c,i,l,M,x=[],S=[],d),o),y===123)if(c===0)Gs(N,t,b,b,x,o,d,l,S);else switch(f===99&&ht(N,3)===110?100:f){case 100:case 108:case 109:case 115:Gs(e,b,b,r&&Ns(U0(e,b,b,0,0,i,l,M,i,x=[],d),S),i,S,d,l,r?x:S);break;default:Gs(N,b,b,b,[""],S,0,l,S)}}u=c=p=0,h=I=1,M=N="",d=a;break;case 58:d=1+Bn(N),p=g;default:if(h<1){if(y==123)--h;else if(y==125&&h++==0&&MG()==125)continue}switch(N+=cd(y),y*h){case 38:I=c>0?1:(N+="\f",-1);break;case 44:l[u++]=(Bn(N)-1)*I,I=1;break;case 64:Vn()===45&&(N+=Hs(nn())),f=Vn(),c=d=Bn(M=N+=SG(Fs())),y++;break;case 45:g===45&&Bn(N)==2&&(h=0)}}return o}function U0(e,t,n,r,i,o,a,l,s,u,c){for(var d=i-1,f=i===0?o:[""],p=hh(f),g=0,h=0,w=0;g<r;++g)for(var I=0,y=il(e,d+1,d=gG(h=a[g])),M=e;I<p;++I)(M=NS(h>0?f[I]+" "+y:be(y,/&\f/g,f[I])))&&(s[w++]=M);return fd(e,t,n,i===0?mh:l,s,u,c)}function AG(e,t,n){return fd(e,t,n,xS,cd(wG()),il(e,2,-2),0)}function $0(e,t,n,r){return fd(e,t,n,gh,il(e,0,r),il(e,r+1,-1),r)}function oo(e,t){for(var n="",r=hh(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function CG(e,t,n,r){switch(e.type){case mG:if(e.children.length)break;case pG:case gh:return e.return=e.return||e.value;case xS:return"";case bS:return e.return=e.value+"{"+oo(e.children,r)+"}";case mh:e.value=e.props.join(",")}return Bn(n=oo(e.children,r))?e.return=e.value+"{"+n+"}":""}function EG(e){var t=hh(e);return function(n,r,i,o){for(var a="",l=0;l<t;l++)a+=e[l](n,r,i,o)||"";return a}}function TG(e){return function(t){t.root||(t=t.return)&&e(t)}}function jG(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var LG=function(t,n,r){for(var i=0,o=0;i=o,o=Vn(),i===38&&o===12&&(n[r]=1),!ol(o);)nn();return Hl(t,Wt)},PG=function(t,n){var r=-1,i=44;do switch(ol(i)){case 0:i===38&&Vn()===12&&(n[r]=1),t[r]+=LG(Wt-1,n,r);break;case 2:t[r]+=Hs(i);break;case 4:if(i===44){t[++r]=Vn()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=cd(i)}while(i=nn());return t},RG=function(t,n){return AS(PG(DS(t),n))},_0=new WeakMap,OG=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,i=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!_0.get(r))&&!i){_0.set(t,!0);for(var o=[],a=RG(n,o),l=r.props,s=0,u=0;s<a.length;s++)for(var c=0;c<l.length;c++,u++)t.props[u]=o[s]?a[s].replace(/&\f/g,l[c]):l[c]+" "+a[s]}}},kG=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function CS(e,t){switch(vG(e,t)){case 5103:return xe+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return xe+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return xe+e+$u+e+xt+e+e;case 6828:case 4268:return xe+e+xt+e+e;case 6165:return xe+e+xt+"flex-"+e+e;case 5187:return xe+e+be(e,/(\w+).+(:[^]+)/,xe+"box-$1$2"+xt+"flex-$1$2")+e;case 5443:return xe+e+xt+"flex-item-"+be(e,/flex-|-self/,"")+e;case 4675:return xe+e+xt+"flex-line-pack"+be(e,/align-content|flex-|-self/,"")+e;case 5548:return xe+e+xt+be(e,"shrink","negative")+e;case 5292:return xe+e+xt+be(e,"basis","preferred-size")+e;case 6060:return xe+"box-"+be(e,"-grow","")+xe+e+xt+be(e,"grow","positive")+e;case 4554:return xe+be(e,/([^-])(transform)/g,"$1"+xe+"$2")+e;case 6187:return be(be(be(e,/(zoom-|grab)/,xe+"$1"),/(image-set)/,xe+"$1"),e,"")+e;case 5495:case 3959:return be(e,/(image-set\([^]*)/,xe+"$1$`$1");case 4968:return be(be(e,/(.+:)(flex-)?(.*)/,xe+"box-pack:$3"+xt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+xe+e+e;case 4095:case 3583:case 4068:case 2532:return be(e,/(.+)-inline(.+)/,xe+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Bn(e)-1-t>6)switch(ht(e,t+1)){case 109:if(ht(e,t+4)!==45)break;case 102:return be(e,/(.+:)(.+)-([^]+)/,"$1"+xe+"$2-$3$1"+$u+(ht(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Jp(e,"stretch")?CS(be(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(ht(e,t+1)!==115)break;case 6444:switch(ht(e,Bn(e)-3-(~Jp(e,"!important")&&10))){case 107:return be(e,":",":"+xe)+e;case 101:return be(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+xe+(ht(e,14)===45?"inline-":"")+"box$3$1"+xe+"$2$3$1"+xt+"$2box$3")+e}break;case 5936:switch(ht(e,t+11)){case 114:return xe+e+xt+be(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return xe+e+xt+be(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return xe+e+xt+be(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return xe+e+xt+e+e}return e}var zG=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case gh:t.return=CS(t.value,t.length);break;case bS:return oo([oa(t,{value:be(t.value,"@","@"+xe)})],i);case mh:if(t.length)return IG(t.props,function(o){switch(yG(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return oo([oa(t,{props:[be(o,/:(read-\w+)/,":"+$u+"$1")]})],i);case"::placeholder":return oo([oa(t,{props:[be(o,/:(plac\w+)/,":"+xe+"input-$1")]}),oa(t,{props:[be(o,/:(plac\w+)/,":"+$u+"$1")]}),oa(t,{props:[be(o,/:(plac\w+)/,xt+"input-$1")]})],i)}return""})}},BG=[zG],UG=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(h){var w=h.getAttribute("data-emotion");w.indexOf(" ")!==-1&&(document.head.appendChild(h),h.setAttribute("data-s",""))})}var i=t.stylisPlugins||BG,o={},a,l=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(h){for(var w=h.getAttribute("data-emotion").split(" "),I=1;I<w.length;I++)o[w[I]]=!0;l.push(h)});var s,u=[OG,kG];{var c,d=[CG,TG(function(h){c.insert(h)})],f=EG(u.concat(i,d)),p=function(w){return oo(DG(w),f)};s=function(w,I,y,M){c=y,p(w?w+"{"+I.styles+"}":I.styles),M&&(g.inserted[I.name]=!0)}}var g={key:n,sheet:new fG({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:s};return g.sheet.hydrate(l),g};function $G(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var _G={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},FG=/[A-Z]|^ms/g,HG=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ES=function(t){return t.charCodeAt(1)===45},F0=function(t){return t!=null&&typeof t!="boolean"},Sf=jG(function(e){return ES(e)?e:e.replace(FG,"-$&").toLowerCase()}),H0=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(HG,function(r,i,o){return Un={name:i,styles:o,next:Un},i})}return _G[t]!==1&&!ES(t)&&typeof n=="number"&&n!==0?n+"px":n};function al(e,t,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 Un={name:n.name,styles:n.styles,next:Un},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)Un={name:r.name,styles:r.styles,next:Un},r=r.next;var i=n.styles+";";return i}return GG(e,t,n)}case"function":{if(e!==void 0){var o=Un,a=n(e);return Un=o,al(e,t,a)}break}}if(t==null)return n;var l=t[n];return l!==void 0?l:n}function GG(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=al(e,t,n[i])+";";else for(var o in n){var a=n[o];if(typeof a!="object")t!=null&&t[a]!==void 0?r+=o+"{"+t[a]+"}":F0(a)&&(r+=Sf(o)+":"+H0(o,a)+";");else if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var l=0;l<a.length;l++)F0(a[l])&&(r+=Sf(o)+":"+H0(o,a[l])+";");else{var s=al(e,t,a);switch(o){case"animation":case"animationName":{r+=Sf(o)+":"+s+";";break}default:r+=o+"{"+s+"}"}}}return r}var G0=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Un,Df=function(t,n,r){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var i=!0,o="";Un=void 0;var a=t[0];a==null||a.raw===void 0?(i=!1,o+=al(r,n,a)):o+=a[0];for(var l=1;l<t.length;l++)o+=al(r,n,t[l]),i&&(o+=a[l]);G0.lastIndex=0;for(var s="",u;(u=G0.exec(o))!==null;)s+="-"+u[1];var c=$G(o)+s;return{name:c,styles:o,next:Un}},WG=!0;function TS(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):r+=i+" "}),r}var VG=function(t,n,r){var i=t.key+"-"+n.name;(r===!1||WG===!1)&&t.registered[i]===void 0&&(t.registered[i]=n.styles)},ZG=function(t,n,r){VG(t,n,r);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+i:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function W0(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function V0(e,t,n){var r=[],i=TS(e,r,n);return r.length<2?n:i+t(r)}var YG=function(t){var n=UG(t);n.sheet.speedy=function(l){this.isSpeedy=l},n.compat=!0;var r=function(){for(var s=arguments.length,u=new Array(s),c=0;c<s;c++)u[c]=arguments[c];var d=Df(u,n.registered,void 0);return ZG(n,d,!1),n.key+"-"+d.name},i=function(){for(var s=arguments.length,u=new Array(s),c=0;c<s;c++)u[c]=arguments[c];var d=Df(u,n.registered),f="animation-"+d.name;return W0(n,{name:d.name,styles:"@keyframes "+f+"{"+d.styles+"}"}),f},o=function(){for(var s=arguments.length,u=new Array(s),c=0;c<s;c++)u[c]=arguments[c];var d=Df(u,n.registered);W0(n,d)},a=function(){for(var s=arguments.length,u=new Array(s),c=0;c<s;c++)u[c]=arguments[c];return V0(n.registered,r,QG(u))};return{css:r,cx:a,injectGlobal:o,keyframes:i,hydrate:function(s){s.forEach(function(u){n.inserted[u]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:TS.bind(null,n.registered),merge:V0.bind(null,n.registered,r)}},QG=function e(t){for(var n="",r=0;r<t.length;r++){var i=t[r];if(i!=null){var o=void 0;switch(typeof i){case"boolean":break;case"object":{if(Array.isArray(i))o=e(i);else{o="";for(var a in i)i[a]&&a&&(o&&(o+=" "),o+=a)}break}default:o=i}o&&(n&&(n+=" "),n+=o)}}return n},jS=YG({key:"css"}),JG=jS.cx,Ge=jS.css,XG=uG,Z0=e=>{const t=e.split(`
169
+ `);if(t.every(o=>!o))return t.length===2?[]:(t.pop(),t);const r=t[t.length-1],i=t[0];return r||t.pop(),i||t.shift(),t},qG=(e,t,n="diffChars")=>{const r=XG[n](e,t),i={left:[],right:[]};return r.forEach(({added:o,removed:a,value:l})=>{const s={};return o&&(s.type=1,s.value=l,i.right.push(s)),a&&(s.type=2,s.value=l,i.left.push(s)),!a&&!o&&(s.type=0,s.value=l,i.right.push(s),i.left.push(s)),s}),i},KG=(e,t,n=!1,r="diffChars",i=0)=>{const o=dh(e.trimRight(),t.trimRight(),{newlineIsToken:!0,ignoreWhitespace:!1,ignoreCase:!1});let a=i,l=i,s=[],u=0;const c=[],d=[],f=(p,g,h,w,I)=>Z0(p).map((M,x)=>{const S={},b={};if(!(d.includes(`${g}-${x}`)||I&&x!==0)){if(h||w)if(c.includes(u)||c.push(u),w){l+=1,S.lineNumber=l,S.type=2,S.value=M||" ";const N=o[g+1];if(N&&N.added&&Z0(N.value)[x]){const{value:P,lineNumber:R,type:O}=f(N.value,g,!0,!1,!0)[0].right;if(d.push(`${g+1}-${x}`),b.lineNumber=R,b.type=O,n)b.value=P;else{const J=qG(M,P,r);b.value=J.right,S.value=J.left}}}else a+=1,b.lineNumber=a,b.type=1,b.value=M;else l+=1,a+=1,S.lineNumber=l,S.type=0,S.value=M,b.lineNumber=a,b.type=0,b.value=M;return u+=1,{right:b,left:S}}}).filter(Boolean);return o.forEach(({added:p,removed:g,value:h},w)=>{s=[...s,...f(h,w,p,g)]}),{lineInformation:s,diffLines:c}},eW=(e,t=!1)=>{const{variables:n={},...r}=e,i={light:{diffViewerBackground:"#fff",diffViewerColor:"#212529",addedBackground:"#e6ffed",addedColor:"#24292e",removedBackground:"#ffeef0",removedColor:"#24292e",wordAddedBackground:"#acf2bd",wordRemovedBackground:"#fdb8c0",addedGutterBackground:"#cdffd8",removedGutterBackground:"#ffdce0",gutterBackground:"#f7f7f7",gutterBackgroundDark:"#f3f1f1",highlightBackground:"#fffbdd",highlightGutterBackground:"#fff5b1",codeFoldGutterBackground:"#dbedff",codeFoldBackground:"#f1f8ff",emptyLineBackground:"#fafbfc",gutterColor:"#212529",addedGutterColor:"#212529",removedGutterColor:"#212529",codeFoldContentColor:"#212529",diffViewerTitleBackground:"#fafbfc",diffViewerTitleColor:"#212529",diffViewerTitleBorderColor:"#eee",...n.light||{}},dark:{diffViewerBackground:"#2e303c",diffViewerColor:"#FFF",addedBackground:"#044B53",addedColor:"white",removedBackground:"#632F34",removedColor:"white",wordAddedBackground:"#055d67",wordRemovedBackground:"#7d383f",addedGutterBackground:"#034148",removedGutterBackground:"#632b30",gutterBackground:"#2c2f3a",gutterBackgroundDark:"#262933",highlightBackground:"#2a3967",highlightGutterBackground:"#2d4077",codeFoldGutterBackground:"#21232b",codeFoldBackground:"#262831",emptyLineBackground:"#363946",gutterColor:"#464c67",addedGutterColor:"#8c8c8c",removedGutterColor:"#8c8c8c",codeFoldContentColor:"#555a7b",diffViewerTitleBackground:"#2f323e",diffViewerTitleColor:"#555a7b",diffViewerTitleBorderColor:"#353846",...n.dark||{}}},o=t?i.dark:i.light,a=Ge({width:"100%",label:"content"}),l=Ge({[`.${a}`]:{width:"50%"},label:"split-view"}),s=Ge({width:"100%",background:o.diffViewerBackground,pre:{margin:0,whiteSpace:"pre-wrap",lineHeight:"25px"},label:"diff-container",borderCollapse:"collapse"}),u=Ge({color:o.codeFoldContentColor,label:"code-fold-content"}),c=Ge({color:o.diffViewerColor,label:"content-text"}),d=Ge({background:o.diffViewerTitleBackground,padding:10,borderBottom:`1px solid ${o.diffViewerTitleBorderColor}`,label:"title-block",":last-child":{borderLeft:`1px solid ${o.diffViewerTitleBorderColor}`},[`.${c}`]:{color:o.diffViewerTitleColor}}),f=Ge({color:o.gutterColor,label:"line-number"}),p=Ge({background:o.removedBackground,color:o.removedColor,pre:{color:o.removedColor},[`.${f}`]:{color:o.removedGutterColor},label:"diff-removed"}),g=Ge({background:o.addedBackground,color:o.addedColor,pre:{color:o.addedColor},[`.${f}`]:{color:o.addedGutterColor},label:"diff-added"}),h=Ge({padding:2,display:"inline-flex",borderRadius:1,label:"word-diff"}),w=Ge({background:o.wordAddedBackground,label:"word-added"}),I=Ge({background:o.wordRemovedBackground,label:"word-removed"}),y=Ge({backgroundColor:o.codeFoldGutterBackground,label:"code-fold-gutter"}),M=Ge({backgroundColor:o.codeFoldBackground,height:40,fontSize:14,fontWeight:700,label:"code-fold",a:{textDecoration:"underline !important",cursor:"pointer",pre:{display:"inline"}}}),x=Ge({backgroundColor:o.emptyLineBackground,label:"empty-line"}),S=Ge({width:25,paddingLeft:10,paddingRight:10,userSelect:"none",label:"marker",[`&.${g}`]:{pre:{color:o.addedColor}},[`&.${p}`]:{pre:{color:o.removedColor}}}),b=Ge({background:o.highlightBackground,label:"highlighted-line",[`.${w}, .${I}`]:{backgroundColor:"initial"}}),N=Ge({label:"highlighted-gutter"}),C=Ge({userSelect:"none",minWidth:50,padding:"0 10px",label:"gutter",textAlign:"right",background:o.gutterBackground,"&:hover":{cursor:"pointer",background:o.gutterBackgroundDark,pre:{opacity:1}},pre:{opacity:.5},[`&.${g}`]:{background:o.addedGutterBackground},[`&.${p}`]:{background:o.removedGutterBackground},[`&.${N}`]:{background:o.highlightGutterBackground,"&:hover":{background:o.highlightGutterBackground}}}),P=Ge({"&:hover":{background:o.gutterBackground,cursor:"initial"},label:"empty-gutter"}),R=Ge({verticalAlign:"baseline",label:"line"}),O={diffContainer:s,diffRemoved:p,diffAdded:g,splitView:l,marker:S,highlightedGutter:N,highlightedLine:b,gutter:C,line:R,wordDiff:h,wordAdded:w,wordRemoved:I,codeFoldGutter:y,codeFold:M,emptyGutter:P,emptyLine:x,lineNumber:f,contentText:c,content:a,codeFoldContent:u,titleBlock:d},J=Object.keys(r).reduce((U,W)=>({...U,[W]:Ge(r[W])}),{});return Object.keys(O).reduce((U,W)=>({...U,[W]:J[W]?JG(O[W],J[W]):O[W]}),{})},LS=class extends v.Component{constructor(e){super(e),this.resetCodeBlocks=()=>this.state.expandedBlocks.length>0?(this.setState({expandedBlocks:[]}),!0):!1,this.onBlockExpand=t=>{const n=this.state.expandedBlocks.slice();n.push(t),this.setState({expandedBlocks:n})},this.computeStyles=OH(eW),this.onLineNumberClickProxy=t=>this.props.onLineNumberClick?n=>this.props.onLineNumberClick(t,n):()=>{},this.renderWordDiff=(t,n)=>t.map((r,i)=>v.createElement("span",{key:i,className:ae(this.styles.wordDiff,{[this.styles.wordAdded]:r.type===1,[this.styles.wordRemoved]:r.type===2})},n?n(r.value):r.value)),this.renderLine=(t,n,r,i,o,a)=>{const l=`${r}-${t}`,s=`${a}-${o}`,u=this.props.highlightLines.includes(l)||this.props.highlightLines.includes(s),c=n===1,d=n===2;let f;return Array.isArray(i)?f=this.renderWordDiff(i,this.props.renderContent):this.props.renderContent?f=this.props.renderContent(i):f=i,v.createElement(v.Fragment,null,!this.props.hideLineNumbers&&v.createElement("td",{onClick:t&&this.onLineNumberClickProxy(l),className:ae(this.styles.gutter,{[this.styles.emptyGutter]:!t,[this.styles.diffAdded]:c,[this.styles.diffRemoved]:d,[this.styles.highlightedGutter]:u})},v.createElement("pre",{className:this.styles.lineNumber},t)),!this.props.splitView&&!this.props.hideLineNumbers&&v.createElement("td",{onClick:o&&this.onLineNumberClickProxy(s),className:ae(this.styles.gutter,{[this.styles.emptyGutter]:!o,[this.styles.diffAdded]:c,[this.styles.diffRemoved]:d,[this.styles.highlightedGutter]:u})},v.createElement("pre",{className:this.styles.lineNumber},o)),v.createElement("td",{className:ae(this.styles.marker,{[this.styles.emptyLine]:!f,[this.styles.diffAdded]:c,[this.styles.diffRemoved]:d,[this.styles.highlightedLine]:u})},v.createElement("pre",null,c&&"+",d&&"-")),v.createElement("td",{className:ae(this.styles.content,{[this.styles.emptyLine]:!f,[this.styles.diffAdded]:c,[this.styles.diffRemoved]:d,[this.styles.highlightedLine]:u})},v.createElement("pre",{className:this.styles.contentText},f)))},this.renderSplitView=({left:t,right:n},r)=>v.createElement("tr",{key:r,className:this.styles.line},this.renderLine(t.lineNumber,t.type,"L",t.value),this.renderLine(n.lineNumber,n.type,"R",n.value)),this.renderInlineView=({left:t,right:n},r)=>{let i;return t.type===2&&n.type===1?v.createElement(v.Fragment,{key:r},v.createElement("tr",{className:this.styles.line},this.renderLine(t.lineNumber,t.type,"L",t.value,null)),v.createElement("tr",{className:this.styles.line},this.renderLine(null,n.type,"R",n.value,n.lineNumber))):(t.type===2&&(i=this.renderLine(t.lineNumber,t.type,"L",t.value,null)),t.type===0&&(i=this.renderLine(t.lineNumber,t.type,"L",t.value,n.lineNumber,"R")),n.type===1&&(i=this.renderLine(null,n.type,"R",n.value,n.lineNumber)),v.createElement("tr",{key:r,className:this.styles.line},i))},this.onBlockClickProxy=t=>()=>this.onBlockExpand(t),this.renderSkippedLineIndicator=(t,n,r,i)=>{const{hideLineNumbers:o,splitView:a}=this.props,l=this.props.codeFoldMessageRenderer?this.props.codeFoldMessageRenderer(t,r,i):v.createElement("pre",{className:this.styles.codeFoldContent},"Expand ",t," lines ..."),s=v.createElement("td",null,v.createElement("a",{onClick:this.onBlockClickProxy(n),tabIndex:0},l)),u=!a&&!o;return v.createElement("tr",{key:`${r}-${i}`,className:this.styles.codeFold},!o&&v.createElement("td",{className:this.styles.codeFoldGutter}),v.createElement("td",{className:ae({[this.styles.codeFoldGutter]:u})}),u?v.createElement(v.Fragment,null,v.createElement("td",null),s):v.createElement(v.Fragment,null,s,v.createElement("td",null)),v.createElement("td",null),v.createElement("td",null))},this.renderDiff=()=>{const{oldValue:t,newValue:n,splitView:r,disableWordDiff:i,compareMethod:o,linesOffset:a}=this.props,{lineInformation:l,diffLines:s}=KG(t,n,i,o,a),u=this.props.extraLinesSurroundingDiff<0?0:this.props.extraLinesSurroundingDiff;let c=[];return l.map((d,f)=>{const p=s[0],g=p-f;if(this.props.showDiffOnly&&(g===-u&&(c=[],s.shift()),d.left.type===0&&(g>u||typeof p>"u")&&!this.state.expandedBlocks.includes(p)))return c.push(f+1),f===l.length-1&&c.length>1?this.renderSkippedLineIndicator(c.length,p,d.left.lineNumber,d.right.lineNumber):null;const h=r?this.renderSplitView(d,f):this.renderInlineView(d,f);if(g===u&&c.length>0){const{length:w}=c;return c=[],v.createElement(v.Fragment,{key:f},this.renderSkippedLineIndicator(w,p,d.left.lineNumber,d.right.lineNumber),h)}return h})},this.render=()=>{const{oldValue:t,newValue:n,useDarkTheme:r,leftTitle:i,rightTitle:o,splitView:a,hideLineNumbers:l}=this.props;if(typeof t!="string"||typeof n!="string")throw Error('"oldValue" and "newValue" should be strings');this.styles=this.computeStyles(this.props.styles,r);const s=this.renderDiff(),u=l?2:3,c=l?2:4,d=(i||o)&&v.createElement("tr",null,v.createElement("td",{colSpan:a?u:c,className:this.styles.titleBlock},v.createElement("pre",{className:this.styles.contentText},i)),a&&v.createElement("td",{colSpan:u,className:this.styles.titleBlock},v.createElement("pre",{className:this.styles.contentText},o)));return v.createElement("table",{className:ae(this.styles.diffContainer,{[this.styles.splitView]:a})},v.createElement("tbody",null,d,s))},this.state={expandedBlocks:[]}}};LS.defaultProps={oldValue:"",newValue:"",splitView:!0,highlightLines:[],disableWordDiff:!1,compareMethod:"diffChars",styles:{},hideLineNumbers:!1,extraLinesSurroundingDiff:3,showDiffOnly:!0,useDarkTheme:!1,linesOffset:0};var tW=LS;const nW={line:{padding:"5px 2px","&:hover":{background:"#a26ea1"}},titleBlock:{padding:"5px",paddingLeft:"15px"}},rW=({url:e,surfaceResponse:t})=>{const n=Cl().get("path"),r=$c(),i=El(),o=Al(),[a,l]=v.useState(!1),[s,u]=v.useState(!1),[c,d]=v.useState(null),[f,p]=v.useState(null),[g,h]=v.useState(!0);v.useEffect(()=>{(async()=>{try{(await fetch(`${e}/ping`)).ok||h(!1)}catch{h(!1)}})()},[g]),v.useEffect(()=>{async function S(b){const N=await fetch(`${e}/open-api-content?path=${n}`,{method:"GET"});if(N.status!==200){const R=await N.json();throw Error(R.message)}const P=(await N.json()).filter(R=>R.path===b);if(P.length>0)return P[0]}if(g){const b=new EventSource(`${e}/updates`);return b.onmessage=async N=>{const C=JSON.parse(N.data);if(C.type==="update"){if(n===null)return;const R=/([a-zA-Z0-9\.\-\_]*)$/.exec(C.filePath);if(!R||!R[0])return;const O=R[0];if(O!==zp&&O!==n){console.log(`discarded event since changes were on '${C.filePath}'`);return}try{const J=await S(O);if(J){const U={path:J.path,type:xu.File,content:JSON.stringify(J.content,void 0,4),saveState:St.unmodified};O===zp&&i.policyListFileModel.saveState!==St.unmodified||O===n&&r.openApiFileModel.saveState!==St.unmodified?x(O,U):(o(U,St.unmodified),t(`Successfully updated Local Designer with external file changes from '${U.path}'.`,"info"))}}catch(J){const U=J.message&&J.message.includes("Failed to fetch")?Bc:`Error: ${J.message}`;t(U,"error")}}},b.onerror=N=>{console.warn("Hot-reload error:",N),t("An error occurred while attempting to set the hot-reload connection. Try restarting the editor.","error"),b.close(),h(!1)},b.addEventListener("close",()=>b.close()),()=>{b.close()}}},[i,r,g]);const w=()=>{l(!1),M(),d(null),p(null),u(!1)},I=()=>{if(f===null){t("An error occurred while attempting to overwrite using the external file changes. Try refreshing the editor session.","error"),w();return}o(f,St.unmodified),t(`Successfully updated Local Designer with external file changes from '${f.path}'.`,"info"),w()},[y,M]=ho(()=>m.jsx(kM,{onClose:w,isOpen:!0,maxWidth:"max-w-4xl",children:m.jsxs("div",{className:"space-y-4",children:[m.jsx("div",{className:"text-xl font-bold",children:"Changes outside of Local Designer"}),m.jsx("div",{className:"text-left text-sm text-gray-600 whitespace-pre-line w-full mb-2",children:m.jsxs("p",{className:"leading-6 mb-5",children:["Failed to hot-reload '",c,"': The content in Local Designer is newer.",m.jsx("br",{})," Please choose if you want to keep current Local Designer changes or overwrite them with the external changes."]})}),s?m.jsx("div",{className:"overflow-scroll h-96 text-sm border",children:m.jsx(tW,{oldValue:(f==null?void 0:f.path)==="policies.json"?i.policyListFileModel.content:r.openApiFileModel.content,newValue:f==null?void 0:f.content,splitView:!0,leftTitle:"Current changes",rightTitle:"External changes",styles:nW})}):m.jsx("div",{className:"text-sm",children:"* This diff is too large to display properly."}),m.jsxs("div",{className:"flex flex-row items-center justify-center space-x-2",children:[m.jsx(En,{label:"Keep current changes",onClick:w}),m.jsx(En,{dataTestId:"connect-non-empty-repo-confirm",buttonType:xi.WHITE,label:"Overwrite current changes",onClick:I})]})]})}),[c,i,f,r]),x=(S,b)=>{d(S),p(b);try{if(b.path.endsWith(".oas.json")&&b.content){const N=JSON.parse(b.content);N.paths&&Object.keys(N.paths).length<40&&u(!0)}else if(b.path.endsWith("policies.json")&&b.content){const N=JSON.parse(b.content);N.policies&&N.policies.length<40&&u(!0)}}catch{console.warn("Failed while calculating the diff size")}y()};return m.jsx("div",{})},iW=5e3;function oW(){const[e,t]=v.useState(null),n=a=>{t({message:a,type:"error"})},r=(a,l)=>{t({message:a,type:l}),setTimeout(()=>{t(null)},iW)},i=window.SERVER_DATA,o=`http://${i.server_address}:${i.server_port}`;return m.jsx("div",{className:"h-screen min-w-lg",children:m.jsx(a3,{children:m.jsx(yC,{children:m.jsx(mk,{children:m.jsx(s3,{url:o,handleErrors:n,children:m.jsx(f3,{children:m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"flex gap-5 px-3 mx-4 ",children:[m.jsx("div",{className:"flex-grow",children:m.jsx(Ob,{url:o,handleErrors:n})}),m.jsx("div",{className:"flex-grow",children:e!==null&&m.jsx(LH,{message:e.message,type:e.type})}),m.jsx("div",{className:"flex-grow",children:m.jsx(jH,{url:o,surfaceResponse:r})})]}),m.jsx(rW,{url:o,surfaceResponse:r}),m.jsx("div",{className:"flex-grow",children:m.jsx(TH,{})})]})})})})})})})}Af.createRoot(document.getElementById("root")).render(m.jsx(k.StrictMode,{children:m.jsx(oW,{})}));
170
170
 
171
- //# debugId=5edc969f-4bac-5407-9c30-62b86cd293e3
171
+ //# debugId=aee89485-cf69-52ad-a454-730d4ed42d1e