@becomeopc/trendpublish 4.0.0-alpha.4 → 4.0.0-beta.2

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.
Files changed (95) hide show
  1. package/dashboard/assets/{-association-list-CpJphL0B.js → -association-list-BCgF9OJ5.js} +1 -1
  2. package/dashboard/assets/-channel-templates-TSR8kCHV.js +6 -0
  3. package/dashboard/assets/-content-package-preview-WEf6gP0Z.js +1 -0
  4. package/dashboard/assets/-editor-page-BKralop5.js +1 -0
  5. package/dashboard/assets/-run-detail-view-Ct-CFBHw.js +12 -0
  6. package/dashboard/assets/{-run-presentation-Dhp1MLMP.js → -run-presentation-YaGz8Mmh.js} +1 -1
  7. package/dashboard/assets/AnimatePresence-B54uy4uL.js +9 -0
  8. package/dashboard/assets/_app-BWreYBOO.js +1 -0
  9. package/dashboard/assets/arrow-left-BNY_Z0Z5.js +1 -0
  10. package/dashboard/assets/arrow-right-C0jNZ8V5.js +1 -0
  11. package/dashboard/assets/articles-DbWTuxIi.js +1 -0
  12. package/dashboard/assets/automations-DwCc1vrP.js +2 -0
  13. package/dashboard/assets/book-open-du7Gj22W.js +1 -0
  14. package/dashboard/assets/{connections-Dfyth9tv.js → connections-BTXTwVZi.js} +1 -1
  15. package/dashboard/assets/content-plans-D6yuDh9V.js +1 -0
  16. package/dashboard/assets/content-plans_._planId.edit-C8shQP9y.js +1 -0
  17. package/dashboard/assets/content-plans_.new-C8shQP9y.js +1 -0
  18. package/dashboard/assets/dropdown-menu-DTA5frsM.js +1 -0
  19. package/dashboard/assets/{eye-BSHReAUR.js → eye-DMK6MTEX.js} +1 -1
  20. package/dashboard/assets/{file-text-CfJolIKb.js → file-text-Dk3RSPpD.js} +1 -1
  21. package/dashboard/assets/{fingerprint-pattern-ISviPnO_.js → fingerprint-pattern-Cks8v6lo.js} +1 -1
  22. package/dashboard/assets/history-D3HAlwJG.js +1 -0
  23. package/dashboard/assets/identities-QxZaI_E_.js +3 -0
  24. package/dashboard/assets/index-BOzzoHMf.css +2 -0
  25. package/dashboard/assets/{index-DhKRJHPQ.js → index-D0I6_F8W.js} +2 -2
  26. package/dashboard/assets/jobs-ChEmSaQx.js +1 -0
  27. package/dashboard/assets/jobs_._runId-CfjxSQt9.js +1 -0
  28. package/dashboard/assets/knowledge-CRTKmAlZ.js +1 -0
  29. package/dashboard/assets/{layers-CWm3FyHG.js → layers-CljIhILo.js} +1 -1
  30. package/dashboard/assets/{layout-template-yIjk7F-q.js → layout-template-DPTpa7SQ.js} +1 -1
  31. package/dashboard/assets/library-D9UGRwnB.js +1 -0
  32. package/dashboard/assets/{newspaper-DPOzKLbY.js → newspaper-Cg846KNZ.js} +1 -1
  33. package/dashboard/assets/play-yWTFijkx.js +1 -0
  34. package/dashboard/assets/publication-destination-picker-D2jwBhXQ.js +1 -0
  35. package/dashboard/assets/publishing-B-ep_uLv.js +1 -0
  36. package/dashboard/assets/publishing_.styles-BvhTRB2V.js +1 -0
  37. package/dashboard/assets/publishing_.templates-DxInNuCT.js +1 -0
  38. package/dashboard/assets/{publishing_.templates_.sessions._sessionId-C32Beg6R.js → publishing_.templates_.sessions._sessionId-Cp76DzJU.js} +1 -1
  39. package/dashboard/assets/radio-DfCCCOl6.js +1 -0
  40. package/dashboard/assets/{radio-tower-lWqWRAVm.js → radio-tower-C_0U-HML.js} +1 -1
  41. package/dashboard/assets/rotate-ccw-Zuvqn_AI.js +1 -0
  42. package/dashboard/assets/{routes-BnBNI1ke.js → routes-qtUdBWvm.js} +1 -1
  43. package/dashboard/assets/{runs-CKnSOKv4.js → runs-DqZN97cd.js} +1 -1
  44. package/dashboard/assets/send-C23FtqUb.js +1 -0
  45. package/dashboard/assets/settings-ClPaRCaX.js +1 -0
  46. package/dashboard/assets/{shield-check-BssN3Hif.js → shield-check-B7Yvlur7.js} +1 -1
  47. package/dashboard/assets/sources-GeyaDXk5.js +1 -0
  48. package/dashboard/assets/{sse-pzRA-f9J.js → sse-jXGgzf_z.js} +2 -2
  49. package/dashboard/assets/tabs-CrjUBr8m.js +1 -0
  50. package/dashboard/assets/{trash-2-CURppE4-.js → trash-2-BTZ4IDG9.js} +1 -1
  51. package/dashboard/assets/use-onboarding-qU_hZdm6.js +1 -0
  52. package/dashboard/assets/use-workspace-snapshot-BHt8EEHC.js +1 -0
  53. package/dashboard/assets/workspace-DGrhaBe1.js +1 -0
  54. package/dashboard/assets/wrench-BoK9QQr-.js +1 -0
  55. package/dashboard/index.html +2 -2
  56. package/dist/app.js +80102 -33228
  57. package/drizzle/0004_stale_starbolt.sql +28 -0
  58. package/drizzle/0005_pale_doctor_spectrum.sql +48 -0
  59. package/drizzle/meta/0004_snapshot.json +2687 -0
  60. package/drizzle/meta/0005_snapshot.json +2805 -0
  61. package/drizzle/meta/_journal.json +14 -0
  62. package/package.json +1 -1
  63. package/dashboard/assets/-channel-templates-COQosj8a.js +0 -6
  64. package/dashboard/assets/-content-package-preview-DeF-8PPH.js +0 -1
  65. package/dashboard/assets/-editor-page-BISl-fTZ.js +0 -1
  66. package/dashboard/assets/-run-detail-view-DMxo9b8x.js +0 -12
  67. package/dashboard/assets/AnimatePresence-DzUloIx0.js +0 -9
  68. package/dashboard/assets/_app-rmP4sHWt.js +0 -1
  69. package/dashboard/assets/arrow-left-D5-ez4tP.js +0 -1
  70. package/dashboard/assets/arrow-right-BUTx8i5Q.js +0 -1
  71. package/dashboard/assets/articles-Bn3Z1siU.js +0 -1
  72. package/dashboard/assets/automations-DMZkw8g6.js +0 -2
  73. package/dashboard/assets/content-plans-me2sZDLU.js +0 -1
  74. package/dashboard/assets/content-plans_._planId.edit-7BHuv528.js +0 -1
  75. package/dashboard/assets/content-plans_.new-7BHuv528.js +0 -1
  76. package/dashboard/assets/copy-B-eZtbzt.js +0 -1
  77. package/dashboard/assets/dropdown-menu-DAjCMI6K.js +0 -1
  78. package/dashboard/assets/identities-CIy7Q2wP.js +0 -3
  79. package/dashboard/assets/index-BoLpab45.css +0 -2
  80. package/dashboard/assets/jobs-CMViOJeL.js +0 -1
  81. package/dashboard/assets/jobs_._runId-CA8TTEqw.js +0 -1
  82. package/dashboard/assets/knowledge-DQcgNI2r.js +0 -1
  83. package/dashboard/assets/library-BUCfApCB.js +0 -1
  84. package/dashboard/assets/play-BstQsP-v.js +0 -1
  85. package/dashboard/assets/publication-destination-picker-CJuQVZ8Z.js +0 -1
  86. package/dashboard/assets/publishing-PmNqeFKZ.js +0 -1
  87. package/dashboard/assets/publishing_.styles-B3gViZHT.js +0 -1
  88. package/dashboard/assets/publishing_.templates-DyfaO52q.js +0 -1
  89. package/dashboard/assets/settings-COO33aq9.js +0 -1
  90. package/dashboard/assets/sources-IjjBA3jh.js +0 -1
  91. package/dashboard/assets/tabs-BoQLEzMe.js +0 -1
  92. package/dashboard/assets/use-onboarding-CGXnn74b.js +0 -1
  93. package/dashboard/assets/use-workspace-snapshot-CQHMnuFv.js +0 -1
  94. package/dashboard/assets/workspace-BpJcl3Mc.js +0 -1
  95. package/dashboard/assets/wrench-DEPBG9g2.js +0 -1
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/routes-BnBNI1ke.js","assets/rolldown-runtime-DoHqwKmD.js","assets/arrow-right-BUTx8i5Q.js","assets/play-BstQsP-v.js","assets/shield-check-BssN3Hif.js","assets/layers-CWm3FyHG.js","assets/radio-tower-lWqWRAVm.js","assets/_app-rmP4sHWt.js","assets/fingerprint-pattern-ISviPnO_.js","assets/layout-template-yIjk7F-q.js","assets/use-onboarding-CGXnn74b.js","assets/execution-Brd94hIY.js","assets/use-workspace-snapshot-CQHMnuFv.js","assets/newspaper-DPOzKLbY.js","assets/automations-DMZkw8g6.js","assets/content-plans-me2sZDLU.js","assets/copy-B-eZtbzt.js","assets/eye-BSHReAUR.js","assets/identities-CIy7Q2wP.js","assets/jobs-CMViOJeL.js","assets/runs-CKnSOKv4.js","assets/sse-pzRA-f9J.js","assets/-run-presentation-Dhp1MLMP.js","assets/knowledge-DQcgNI2r.js","assets/file-text-CfJolIKb.js","assets/library-BUCfApCB.js","assets/articles-Bn3Z1siU.js","assets/publication-destination-picker-CJuQVZ8Z.js","assets/-content-package-preview-DeF-8PPH.js","assets/publishing-PmNqeFKZ.js","assets/arrow-left-D5-ez4tP.js","assets/AnimatePresence-DzUloIx0.js","assets/-association-list-CpJphL0B.js","assets/trash-2-CURppE4-.js","assets/dropdown-menu-DAjCMI6K.js","assets/settings-COO33aq9.js","assets/sources-IjjBA3jh.js","assets/workspace-BpJcl3Mc.js","assets/content-plans_.new-7BHuv528.js","assets/-editor-page-BISl-fTZ.js","assets/tabs-BoQLEzMe.js","assets/-run-detail-view-DMxo9b8x.js","assets/wrench-DEPBG9g2.js","assets/jobs_._runId-CA8TTEqw.js","assets/publishing_.styles-B3gViZHT.js","assets/publishing_.templates-DyfaO52q.js","assets/-channel-templates-COQosj8a.js","assets/content-plans_._planId.edit-7BHuv528.js","assets/publishing_.templates_.sessions._sessionId-C32Beg6R.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/routes-qtUdBWvm.js","assets/rolldown-runtime-DoHqwKmD.js","assets/arrow-right-C0jNZ8V5.js","assets/play-yWTFijkx.js","assets/shield-check-B7Yvlur7.js","assets/layers-CljIhILo.js","assets/radio-tower-C_0U-HML.js","assets/_app-BWreYBOO.js","assets/fingerprint-pattern-Cks8v6lo.js","assets/layout-template-DPTpa7SQ.js","assets/use-onboarding-qU_hZdm6.js","assets/execution-Brd94hIY.js","assets/use-workspace-snapshot-BHt8EEHC.js","assets/newspaper-Cg846KNZ.js","assets/eye-DMK6MTEX.js","assets/articles-DbWTuxIi.js","assets/automations-DwCc1vrP.js","assets/content-plans-D6yuDh9V.js","assets/identities-QxZaI_E_.js","assets/jobs-ChEmSaQx.js","assets/runs-DqZN97cd.js","assets/sse-jXGgzf_z.js","assets/-run-presentation-YaGz8Mmh.js","assets/knowledge-CRTKmAlZ.js","assets/file-text-Dk3RSPpD.js","assets/library-D9UGRwnB.js","assets/send-C23FtqUb.js","assets/publication-destination-picker-D2jwBhXQ.js","assets/-content-package-preview-WEf6gP0Z.js","assets/publishing-B-ep_uLv.js","assets/arrow-left-BNY_Z0Z5.js","assets/AnimatePresence-B54uy4uL.js","assets/-association-list-BCgF9OJ5.js","assets/trash-2-BTZ4IDG9.js","assets/dropdown-menu-DTA5frsM.js","assets/settings-ClPaRCaX.js","assets/sources-GeyaDXk5.js","assets/history-D3HAlwJG.js","assets/radio-DfCCCOl6.js","assets/rotate-ccw-Zuvqn_AI.js","assets/workspace-DGrhaBe1.js","assets/book-open-du7Gj22W.js","assets/content-plans_.new-C8shQP9y.js","assets/-editor-page-BKralop5.js","assets/tabs-CrjUBr8m.js","assets/-run-detail-view-Ct-CFBHw.js","assets/wrench-BoK9QQr-.js","assets/jobs_._runId-CfjxSQt9.js","assets/publishing_.styles-BvhTRB2V.js","assets/publishing_.templates-DxInNuCT.js","assets/-channel-templates-TSR8kCHV.js","assets/content-plans_._planId.edit-C8shQP9y.js","assets/publishing_.templates_.sessions._sessionId-Cp76DzJU.js"])))=>i.map(i=>d[i]);
2
2
  import{a as e,i as t,n,r,t as i}from"./rolldown-runtime-DoHqwKmD.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var a=i((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`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`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ee(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var k=/\/+/g;function te(e,t){return typeof e==`object`&&e&&e.key!=null?ee(``+e.key):t.toString(36)}function ne(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function A(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,A(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+te(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(k,`$&/`)+`/`),A(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(k,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+te(a,u),c+=A(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+te(a,u++),c+=A(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return A(ne(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function re(e,t,n){if(e==null)return e;var r=[],i=0;return A(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ie(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var j=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},M={map:re,forEach:function(e,t,n){re(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return re(e,function(){t++}),t},toArray:function(e){return re(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=M,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ie}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,j)}catch(e){j(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.6`})),o=i(((e,t)=>{t.exports=a()})),s=i((e=>{function t(e,t){var n=e.length;for(e.push(t);0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&te(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{e:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{t:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break t}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&te(x,u.startTime-t),i=!1}}break e}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var ee=new MessageChannel,k=ee.port2;ee.port1.onmessage=D,O=function(){k.postMessage(null)}}else O=function(){_(D,0)};function te(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=0x3fffffff;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,te(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),c=i(((e,t)=>{t.exports=s()})),l=i((e=>{var t=o();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;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.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return s(e,t,null,r)},e.flushSync=function(e){var t=c.T,n=i.p;try{if(c.T=null,i.p=2,e)return e()}finally{c.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=l(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=l(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.6`})),u=i(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=l()})),d=i((e=>{var t=c(),n=o(),r=u();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;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.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function s(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 l(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 d(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function f(e){if(s(e)!==e)throw Error(i(188))}function p(e){var t=e.alternate;if(!t){if(t=s(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var o=a.alternate;if(o===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===n)return f(a),e;if(o===r)return f(a),t;o=o.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=o;else{for(var c=!1,l=a.child;l;){if(l===n){c=!0,n=a,r=o;break}if(l===r){c=!0,r=a,n=o;break}l=l.sibling}if(!c){for(l=o.child;l;){if(l===n){c=!0,n=o,r=a;break}if(l===r){c=!0,r=o,n=a;break}l=l.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),ee=Symbol.for(`react.activity`),k=Symbol.for(`react.memo_cache_sentinel`),te=Symbol.iterator;function ne(e){return typeof e!=`object`||!e?null:(e=te&&e[te]||e[`@@iterator`],typeof e==`function`?e:null)}var A=Symbol.for(`react.client.reference`);function re(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===A?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case ee:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?re(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return re(e(t))}catch{}}return null}var ie=Array.isArray,j=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,M=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae={pending:!1,data:null,method:null,action:null},oe=[],se=-1;function ce(e){return{current:e}}function N(e){0>se||(e.current=oe[se],oe[se]=null,se--)}function le(e,t){se++,oe[se]=e.current,e.current=t}var ue=ce(null),de=ce(null),fe=ce(null),pe=ce(null);function me(e,t){switch(le(fe,t),le(de,e),le(ue,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?tf(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=tf(t),e=nf(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}N(ue),le(ue,e)}function he(){N(ue),N(de),N(fe)}function ge(e){e.memoizedState!==null&&le(pe,e);var t=ue.current,n=nf(t,e.type);t!==n&&(le(de,e),le(ue,n))}function _e(e){de.current===e&&(N(ue),N(de)),pe.current===e&&(N(pe),fp._currentValue=ae)}var ve,ye;function be(e){if(ve===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ve=t&&t[1]||``,ye=-1<e.stack.indexOf(`
3
3
  at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4
4
  `+ve+e+ye}var xe=!1;function Se(e,t){if(!e||xe)return``;xe=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
@@ -48,4 +48,4 @@ Error generating stack: `+e.message+`
48
48
  `},sl=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},cl=function(){p.useEffect(function(){return document.body.setAttribute(al,(sl()+1).toString()),function(){var e=sl()-1;e<=0?document.body.removeAttribute(al):document.body.setAttribute(al,e.toString())}},[])},ll=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;cl();var a=p.useMemo(function(){return rl(i)},[i]);return p.createElement(il,{styles:ol(a,!t,i,n?``:`!important`)})},ul=!1;if(typeof window<`u`)try{var dl=Object.defineProperty({},"passive",{get:function(){return ul=!0,!0}});window.addEventListener(`test`,dl,dl),window.removeEventListener(`test`,dl,dl)}catch{ul=!1}var fl=ul?{passive:!1}:!1,pl=function(e){return e.tagName===`TEXTAREA`},ml=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!pl(e)&&n[t]===`visible`)},hl=function(e){return ml(e,`overflowY`)},gl=function(e){return ml(e,`overflowX`)},_l=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),bl(e,r)){var i=xl(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},vl=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},yl=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},bl=function(e,t){return e===`v`?hl(t):gl(t)},xl=function(e,t){return e===`v`?vl(t):yl(t)},Sl=function(e,t){return e===`h`&&t===`rtl`?-1:1},Cl=function(e,t,n,r,i){var a=Sl(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=xl(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&bl(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},wl=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Tl=function(e){return[e.deltaX,e.deltaY]},El=function(e){return e&&`current`in e?e.current:e},Dl=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Ol=function(e){return`
49
49
  .block-interactivity-${e} {pointer-events: none;}
50
50
  .allow-interactivity-${e} {pointer-events: all;}
51
- `},kl=0,Al=[];function jl(e){var t=p.useRef([]),n=p.useRef([0,0]),r=p.useRef(),i=p.useState(kl++)[0],a=p.useState($c)[0],o=p.useRef(e);p.useEffect(function(){o.current=e},[e]),p.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=kc([e.lockRef.current],(e.shards||[]).map(El),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=p.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=wl(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=_l(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=_l(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return Cl(h,t,e,h===`h`?s:c,!0)},[]),c=p.useCallback(function(e){var n=e;if(Al.length&&Al[Al.length-1]===a){var r=`deltaY`in n?Tl(n):wl(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Dl(e.delta,r)})[0];if(i&&i.should)n.cancelable&&n.preventDefault();else if(!i){var c=(o.current.shards||[]).map(El).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=p.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Ml(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=p.useCallback(function(e){n.current=wl(e),r.current=void 0},[]),d=p.useCallback(function(t){l(t.type,Tl(t),t.target,s(t,e.lockRef.current))},[]),f=p.useCallback(function(t){l(t.type,wl(t),t.target,s(t,e.lockRef.current))},[]);p.useEffect(function(){return Al.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,fl),document.addEventListener(`touchmove`,c,fl),document.addEventListener(`touchstart`,u,fl),function(){Al=Al.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,fl),document.removeEventListener(`touchmove`,c,fl),document.removeEventListener(`touchstart`,u,fl)}},[]);var m=e.removeScrollBar,h=e.inert;return p.createElement(p.Fragment,null,h?p.createElement(a,{styles:Ol(i)}):null,m?p.createElement(ll,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ml(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Nl=Uc(Wc,jl),Pl=p.forwardRef(function(e,t){return p.createElement(Kc,Dc({},e,{ref:t,sideCar:Nl}))});Pl.classNames=Kc.classNames;var Fl=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Il=new WeakMap,Ll=new WeakMap,Rl={},zl=0,Bl=function(e){return e&&(e.host||Bl(e.parentNode))},Vl=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Bl(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Hl=function(e,t,n,r){var i=Vl(t,Array.isArray(e)?e:[e]);Rl[n]||(Rl[n]=new WeakMap);var a=Rl[n],o=[],s=new Set,c=new Set(i),l=function(e){e&&!s.has(e)&&(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){e&&!c.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Il.get(e)||0)+1,l=(a.get(e)||0)+1;Il.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Ll.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),zl++,function(){o.forEach(function(e){var t=Il.get(e)-1,i=a.get(e)-1;Il.set(e,t),a.set(e,i),t||(Ll.has(e)||e.removeAttribute(r),Ll.delete(e)),i||e.removeAttribute(n)}),zl--,zl||(Il=new WeakMap,Il=new WeakMap,Ll=new WeakMap,Rl={})}},Ul=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Fl(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Hl(r,i,n,`aria-hidden`)):function(){return null}},Wl=Object.defineProperty,Gl=(e,t)=>Wl(e,`name`,{value:t,configurable:!0}),Kl=`Dialog`,[ql,Jl]=Ao(Kl),[Yl,L]=ql(Kl),R=Gl(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=p.useRef(null),c=p.useRef(null),{nodes:l,registry:u}=ac(),[d,f]=ls({prop:r,defaultProp:i??!1,onChange:a,caller:Kl}),[m,h]=p.useState(0),[g,_]=p.useState(0);return(0,P.jsx)(Yl,{scope:t,triggerRef:s,contentRef:c,contentId:Ds(),titleId:Ds(),descriptionId:Ds(),titlePresent:m>0,descriptionPresent:g>0,setTitleCount:h,setDescriptionCount:_,open:d,onOpenChange:f,onOpenToggle:p.useCallback(()=>f(e=>!e),[f]),modal:o,branchNodes:l,branchRegistry:u,children:n})},`Dialog`),Xl=`DialogTrigger`,Zl=p.forwardRef(Gl(function(e,t){let{__scopeDialog:n,...r}=e,i=L(Xl,n),a=ro(t,i.triggerRef);return(0,P.jsx)(wo.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":gu(i.open),...r,ref:a,onClick:Xo(e.onClick,i.onOpenToggle)})},`DialogTrigger`)),Ql=`DialogPortal`,[$l,eu]=ql(Ql,{forceMount:void 0}),tu=Gl(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=L(Ql,t);return(0,P.jsx)($l,{scope:t,forceMount:n,children:p.Children.map(r,e=>(0,P.jsx)(_s,{present:n||a.open,children:(0,P.jsx)(yc,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),nu=`DialogOverlay`,ru=p.forwardRef(Gl(function(e,t){let n=eu(nu,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=L(nu,e.__scopeDialog);return a.modal?(0,P.jsx)(_s,{present:r||a.open,children:(0,P.jsx)(au,{...i,ref:t})}):null},`DialogOverlay`)),iu=oo(`DialogOverlay.RemoveScroll`),au=p.forwardRef(Gl(function(e,t){let{__scopeDialog:n,...r}=e,i=L(nu,n),a=ro(t,Gs());return(0,P.jsx)(Pl,{as:iu,allowPinchZoom:!0,shards:p.useMemo(()=>[i.contentRef,...i.branchNodes.map(e=>({current:e}))],[i.contentRef,i.branchNodes]),children:(0,P.jsx)(wo.div,{"data-state":gu(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),ou=`DialogContent`,su=p.forwardRef(Gl(function(e,t){let n=eu(ou,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=L(ou,e.__scopeDialog);return(0,P.jsx)(_s,{present:r||a.open,children:a.modal?(0,P.jsx)(cu,{...i,ref:t}):(0,P.jsx)(lu,{...i,ref:t})})},`DialogContent`)),cu=p.forwardRef(Gl(function(e,t){let n=L(ou,e.__scopeDialog),r=p.useRef(null),i=ro(t,n.contentRef,r);return p.useEffect(()=>{let e=r.current;if(e)return Ul(e)},[]),(0,P.jsx)(uu,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:Xo(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Xo(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:Xo(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),lu=p.forwardRef(Gl(function(e,t){let n=L(ou,e.__scopeDialog),r=p.useRef(!1),i=p.useRef(!1);return(0,P.jsx)(uu,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`DialogContentNonModal`)),uu=p.forwardRef(Gl(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,"aria-describedby":o,children:s,...c}=e,l=L(ou,n);return Tc(),(0,P.jsx)(ic,{registry:l.branchRegistry,children:(0,P.jsx)(nc,{asChild:!0,loop:!0,trapped:r,branches:l.branchNodes,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,P.jsx)(Ws,{role:`dialog`,id:l.contentId,"aria-labelledby":l.titlePresent?l.titleId:void 0,"aria-describedby":l.descriptionPresent?hu(o,l.descriptionId):o,"data-state":gu(l.open),...c,ref:t,deferPointerDownOutside:!0,onDismiss:()=>l.onOpenChange(!1),children:s})})})},`DialogContentImpl`)),du=p.forwardRef(Gl(function(e,t){let{__scopeDialog:n,...r}=e,i=L(`DialogTitle`,n),{setTitleCount:a}=i;return Mo(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,P.jsx)(wo.h2,{id:i.titleId,...r,ref:t})},`DialogTitle`)),fu=p.forwardRef(Gl(function(e,t){let{__scopeDialog:n,...r}=e,i=L(`DialogDescription`,n),{setDescriptionCount:a}=i;return Mo(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,P.jsx)(wo.p,{id:i.descriptionId,...r,ref:t})},`DialogDescription`)),pu=`DialogClose`,mu=p.forwardRef(Gl(function(e,t){let{__scopeDialog:n,...r}=e,i=L(pu,n);return(0,P.jsx)(wo.button,{type:`button`,...r,ref:t,onClick:Xo(e.onClick,()=>i.onOpenChange(!1))})},`DialogClose`));function hu(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}Gl(hu,`concatAriaDescribedby`);function gu(e){return e?`open`:`closed`}Gl(gu,`getState`);var _u=Object.defineProperty,vu=(e,t)=>_u(e,`name`,{value:t,configurable:!0}),[yu,bu]=Ao(`AlertDialog`,[Jl]),xu=Jl(),Su=vu(e=>{let{__scopeAlertDialog:t,...n}=e,r=xu(t);return(0,P.jsx)(R,{...r,...n,modal:!0})},`AlertDialog`);p.forwardRef(vu(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=xu(n);return(0,P.jsx)(Zl,{...i,...r,ref:t})},`AlertDialogTrigger`));var Cu=vu(e=>{let{__scopeAlertDialog:t,...n}=e,r=xu(t);return(0,P.jsx)(tu,{...r,...n})},`AlertDialogPortal`),wu=p.forwardRef(vu(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=xu(n);return(0,P.jsx)(ru,{...i,...r,ref:t})},`AlertDialogOverlay`)),[Tu,Eu]=yu(`AlertDialogContent`),Du=p.forwardRef(vu(function(e,t){let{__scopeAlertDialog:n,children:r,...i}=e,a=xu(n),o=ro(t,p.useRef(null)),s=p.useRef(null);return(0,P.jsx)(Tu,{scope:n,cancelRef:s,children:(0,P.jsx)(su,{role:`alertdialog`,...a,...i,ref:o,onOpenAutoFocus:Xo(i.onOpenAutoFocus,e=>{e.preventDefault(),s.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:r})})},`AlertDialogContent`)),Ou=p.forwardRef(vu(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=xu(n);return(0,P.jsx)(du,{...i,...r,ref:t})},`AlertDialogTitle`)),ku=p.forwardRef(vu(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=xu(n);return(0,P.jsx)(fu,{...i,...r,ref:t})},`AlertDialogDescription`)),Au=p.forwardRef(vu(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=xu(n);return(0,P.jsx)(mu,{...i,...r,ref:t})},`AlertDialogAction`)),ju=`AlertDialogCancel`,Mu=p.forwardRef(vu(function(e,t){let{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=Eu(ju,n),a=xu(n),o=ro(t,i);return(0,P.jsx)(mu,{...a,...r,ref:o})},`AlertDialogCancel`)),Nu=Object.defineProperty,Pu=(e,t)=>Nu(e,`name`,{value:t,configurable:!0});function Fu(e){let[t,n]=p.useState(void 0);return Mo(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=0,r=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;let i=r[0];window.cancelAnimationFrame(t),t=window.requestAnimationFrame(()=>{let t,r;if(`borderBoxSize`in i){let e=i.borderBoxSize,n=Array.isArray(e)?e[0]:e;t=n.inlineSize,r=n.blockSize}else t=e.offsetWidth,r=e.offsetHeight;n({width:t,height:r})})});return r.observe(e,{box:`border-box`}),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}n(void 0)},[e]),t}Pu(Fu,`useSize`);var Iu=[`top`,`right`,`bottom`,`left`],Lu=Math.min,Ru=Math.max,zu=Math.round,Bu=Math.floor,Vu=e=>({x:e,y:e}),Hu={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Uu(e,t,n){return Ru(e,Lu(t,n))}function Wu(e,t){return typeof e==`function`?e(t):e}function Gu(e){return e.split(`-`)[0]}function Ku(e){return e.split(`-`)[1]}function qu(e){return e===`x`?`y`:`x`}function Ju(e){return e===`y`?`height`:`width`}function Yu(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Xu(e){return qu(Yu(e))}function Zu(e,t,n){n===void 0&&(n=!1);let r=Ku(e),i=Xu(e),a=Ju(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=od(o)),[o,od(o)]}function Qu(e){let t=od(e);return[$u(e),t,$u(t)]}function $u(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var ed=[`left`,`right`],td=[`right`,`left`],nd=[`top`,`bottom`],rd=[`bottom`,`top`];function id(e,t,n){switch(e){case`top`:case`bottom`:return n?t?td:ed:t?ed:td;case`left`:case`right`:return t?nd:rd;default:return[]}}function ad(e,t,n,r){let i=Ku(e),a=id(Gu(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map($u)))),a}function od(e){let t=Gu(e);return Hu[t]+e.slice(t.length)}function sd(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function cd(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:sd(e)}function ld(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function ud(e,t,n){let{reference:r,floating:i}=e,a=Yu(t),o=Xu(t),s=Ju(o),c=Gu(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Ku(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function dd(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Wu(t,e),p=cd(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=ld(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=ld(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var fd=50,pd=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:dd},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=ud(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<fd&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=ud(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},md=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Wu(e,t)||{};if(l==null)return{};let d=cd(u),f={x:n,y:r},p=Xu(i),m=Ju(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;C&&await(o.isElement==null?void 0:o.isElement(S))||(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Lu(d[_],T),D=Lu(d[v],T),O=C-h[m]-D,ee=C/2-h[m]/2+w,k=Uu(E,ee,O),te=!c.arrow&&Ku(i)!=null&&ee!==k&&a.reference[m]/2-(ee<E?E:D)-h[m]/2<0,ne=te?ee<E?ee-E:ee-O:0;return{[p]:f[p]+ne,data:{[p]:k,centerOffset:ee-k-ne,...te&&{alignmentOffset:ne}},reset:te}}}),hd=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Wu(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Gu(r),_=Yu(o),v=Gu(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[od(o)]:Qu(o)),x=p!==`none`;!d&&x&&b.push(...ad(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Zu(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===Yu(t)||T.every(e=>Yu(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Yu(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function gd(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function _d(e){return Iu.some(t=>e[t]>=0)}var vd=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Wu(e,t);switch(i){case`referenceHidden`:{let e=gd(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:_d(e)}}}case`escaped`:{let e=gd(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:_d(e)}}}default:return{}}}}},yd=new Set([`left`,`top`]);async function bd(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Gu(n),s=Ku(n),c=Yu(n)===`y`,l=yd.has(o)?-1:1,u=a&&c?-1:1,d=Wu(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var xd=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await bd(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Sd=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Wu(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Yu(i),p=qu(f),m=u[p],h=u[f],g=(e,t)=>Uu(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},Cd=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Wu(e,t),u={x:n,y:r},d=Yu(i),f=qu(d),p=u[f],m=u[d],h=Wu(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=yd.has(Gu(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},wd=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=Wu(e,t),c=await i.detectOverflow(t,s),l=Gu(n),u=Ku(n),d=Yu(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=Lu(p-c[m],g),y=Lu(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*Ru(c.left,c.right):S=p-2*Ru(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function Td(){return typeof window<`u`}function Ed(e){return kd(e)?(e.nodeName||``).toLowerCase():`#document`}function Dd(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Od(e){return((kd(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function kd(e){return Td()?e instanceof Node||e instanceof Dd(e).Node:!1}function Ad(e){return Td()?e instanceof Element||e instanceof Dd(e).Element:!1}function jd(e){return Td()?e instanceof HTMLElement||e instanceof Dd(e).HTMLElement:!1}function Md(e){return!Td()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Dd(e).ShadowRoot}function z(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Ud(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Nd(e){return/^(table|td|th)$/.test(Ed(e))}function Pd(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Fd=/transform|translate|scale|rotate|perspective|filter/,Id=/paint|layout|strict|content/,Ld=e=>!!e&&e!==`none`,Rd;function zd(e){let t=Ad(e)?Ud(e):e;return Ld(t.transform)||Ld(t.translate)||Ld(t.scale)||Ld(t.rotate)||Ld(t.perspective)||!Vd()&&(Ld(t.backdropFilter)||Ld(t.filter))||Fd.test(t.willChange||``)||Id.test(t.contain||``)}function Bd(e){let t=Gd(e);for(;jd(t)&&!Hd(t);){if(zd(t))return t;if(Pd(t))return null;t=Gd(t)}return null}function Vd(){return Rd??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Rd}function Hd(e){return/^(html|body|#document)$/.test(Ed(e))}function Ud(e){return Dd(e).getComputedStyle(e)}function Wd(e){return Ad(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Gd(e){if(Ed(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Md(e)&&e.host||Od(e);return Md(t)?t.host:t}function Kd(e){let t=Gd(e);return Hd(t)?(e.ownerDocument||e).body:jd(t)&&z(t)?t:Kd(t)}function qd(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Kd(e),i=r===e.ownerDocument?.body,a=Dd(r);if(i){let e=Jd(a);return t.concat(a,a.visualViewport||[],z(r)?r:[],e&&n?qd(e):[])}return t.concat(r,qd(r,[],n))}function Jd(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Yd(e){let t=Ud(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=jd(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=zu(n)!==a||zu(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Xd(e){return Ad(e)?e:e.contextElement}function Zd(e){let t=Xd(e);if(!jd(t))return Vu(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Yd(t),o=(a?zu(n.width):n.width)/r,s=(a?zu(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}var Qd=Vu(0);function $d(e){let t=Dd(e);return!Vd()||!t.visualViewport?Qd:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ef(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Dd(e)}function tf(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Xd(e),o=Vu(1);t&&(r?Ad(r)&&(o=Zd(r)):o=Zd(e));let s=ef(a,n,r)?$d(a):Vu(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=Dd(a),t=Ad(r)?Dd(r):r,n=e,i=Jd(n);for(;i&&t!==n;){let e=Zd(i),t=i.getBoundingClientRect(),r=Ud(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Dd(i),i=Jd(n)}}return ld({width:u,height:d,x:c,y:l})}function nf(e,t){let n=Wd(e).scrollLeft;return t?t.left+n:tf(Od(e)).left+n}function rf(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-nf(e,n),y:n.top+t.scrollTop}}function af(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Od(r),s=t?Pd(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Vu(1),u=Vu(0),d=jd(r);if((d||!a)&&((Ed(r)!==`body`||z(o))&&(c=Wd(r)),d)){let e=tf(r);l=Zd(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?rf(o,c):Vu(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function of(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function sf(e){let t=Wd(e),n=e.ownerDocument.body,r=Ru(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Ru(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+nf(e),o=-t.scrollTop;return Ud(n).direction===`rtl`&&(a+=Ru(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var cf=25;function lf(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Dd(e),a=Od(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Vd()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(nf(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=cf&&(s-=o)}return{width:s,height:c,x:l,y:u}}function uf(e,t){let n=tf(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Zd(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function df(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=lf(e,n,t);else if(t===`document`)r=sf(Od(e));else if(Ad(t))r=uf(t,n);else{let n=$d(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return ld(r)}function ff(e,t){let n=t.get(e);if(n)return n;let r=qd(e,[],!1).filter(e=>Ad(e)&&Ed(e)!==`body`),i=null,a=Ud(e).position===`fixed`,o=a?Gd(e):e;for(;Ad(o)&&!Hd(o);){let e=Ud(o),t=zd(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=Gd(o)}return t.set(e,r),r}function pf(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Pd(t)?[]:ff(t,this._c):[].concat(n),r],o=df(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=df(t,a[e],i);s=Ru(n.top,s),c=Lu(n.right,c),l=Lu(n.bottom,l),u=Ru(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function mf(e){let{width:t,height:n}=Yd(e);return{width:t,height:n}}function hf(e,t,n){let r=jd(t),i=Od(t),a=n===`fixed`,o=tf(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Vu(0);if((r||!a)&&((Ed(t)!==`body`||z(i))&&(s=Wd(t)),r)){let e=tf(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=nf(i));let l=i&&!r&&!a?rf(i,s):Vu(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function gf(e){return Ud(e).position===`static`}function _f(e,t){if(!jd(e)||Ud(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Od(e)===n&&(n=n.ownerDocument.body),n}function vf(e,t){let n=Dd(e);if(Pd(e))return n;if(!jd(e)){let t=Gd(e);for(;t&&!Hd(t);){if(Ad(t)&&!gf(t))return t;t=Gd(t)}return n}let r=_f(e,t);for(;r&&Nd(r)&&gf(r);)r=_f(r,t);return r&&Hd(r)&&gf(r)&&!zd(r)?n:r||Bd(e)||n}var yf=async function(e){let t=this.getOffsetParent||vf,n=await(0,this.getDimensions)(e.floating);return{reference:hf(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function bf(e){return Ud(e).direction===`rtl`}var xf={convertOffsetParentRelativeRectToViewportRelativeRect:af,getDocumentElement:Od,getClippingRect:pf,getOffsetParent:vf,getElementRects:yf,getClientRects:of,getDimensions:mf,getScale:Zd,isElement:Ad,isRTL:bf};function Sf(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Cf(e,t,n){let r=null,i,a=Od(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=Bu(d),h=Bu(a.clientWidth-(u+f)),g=Bu(a.clientHeight-(d+p)),_=Bu(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Ru(0,Lu(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!Sf(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=Dd(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function wf(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Xd(e),u=i||a?[...l?qd(l):[],...t?qd(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Cf(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?tf(e):null;c&&g();function g(){let t=tf(e);h&&!Sf(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Tf=xd,Ef=Sd,Df=hd,Of=wd,kf=vd,Af=md,jf=Cd,Mf=(e,t,n)=>{let r=new Map,i=n??{},a={...xf,...i.platform,_c:r};return pd(e,t,{...i,platform:a})},Nf=typeof document<`u`?p.useLayoutEffect:function(){};function Pf(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Pf(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Pf(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Ff(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function If(e,t){let n=Ff(e);return Math.round(t*n)/n}function Lf(e){let t=p.useRef(e);return Nf(()=>{t.current=e}),t}function Rf(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=p.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,m]=p.useState(r);Pf(f,r)||m(r);let[h,g]=p.useState(null),[_,v]=p.useState(null),y=p.useCallback(e=>{e!==C.current&&(C.current=e,g(e))},[]),b=p.useCallback(e=>{e!==w.current&&(w.current=e,v(e))},[]),x=a||h,S=o||_,C=p.useRef(null),w=p.useRef(null),T=p.useRef(u),E=c!=null,D=Lf(c),O=Lf(i),ee=Lf(l),k=p.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),Mf(C.current,w.current,e).then(e=>{let t={...e,isPositioned:ee.current!==!1};te.current&&!Pf(T.current,t)&&(T.current=t,xo.flushSync(()=>{d(t)}))})},[f,t,n,O,ee]);Nf(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let te=p.useRef(!1);Nf(()=>(te.current=!0,()=>{te.current=!1}),[]),Nf(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,k);k()}},[x,S,k,D,E]);let ne=p.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),A=p.useMemo(()=>({reference:x,floating:S}),[x,S]),re=p.useMemo(()=>{let e={position:n,left:0,top:0};if(!A.floating)return e;let t=If(A.floating,u.x),r=If(A.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Ff(A.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,A.floating,u.x,u.y]);return p.useMemo(()=>({...u,update:k,refs:ne,elements:A,floatingStyles:re}),[u,k,ne,A,re])}var zf=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Af({element:r.current,padding:i}).fn(n):r?Af({element:r,padding:i}).fn(n):{}}}},Bf=(e,t)=>{let n=Tf(e);return{name:n.name,fn:n.fn,options:[e,t]}},Vf=(e,t)=>{let n=Ef(e);return{name:n.name,fn:n.fn,options:[e,t]}},Hf=(e,t)=>({fn:jf(e).fn,options:[e,t]}),Uf=(e,t)=>{let n=Df(e);return{name:n.name,fn:n.fn,options:[e,t]}},Wf=(e,t)=>{let n=Of(e);return{name:n.name,fn:n.fn,options:[e,t]}},Gf=(e,t)=>{let n=kf(e);return{name:n.name,fn:n.fn,options:[e,t]}},Kf=(e,t)=>{let n=zf(e);return{name:n.name,fn:n.fn,options:[e,t]}},qf=Object.defineProperty,Jf=(e,t)=>qf(e,`name`,{value:t,configurable:!0}),Yf={Partial:`partial`,Always:`always`},Xf={Optimized:`optimized`,Always:`always`},Zf=`Popper`,[Qf,$f]=Ao(Zf),[ep,tp]=Qf(Zf),np=Jf(e=>{let{__scopePopper:t,children:n}=e,[r,i]=p.useState(null),[a,o]=p.useState(void 0);return(0,P.jsx)(ep,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),rp=`PopperAnchor`,ip=p.forwardRef(Jf(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=tp(rp,n),o=p.useRef(null),s=a.onAnchorChange,c=ro(t,p.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=p.useRef(null);p.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&dp(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,P.jsx)(wo.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})},`PopperAnchor`)),ap=`PopperContent`,[op,sp]=Qf(ap),cp=p.forwardRef(Jf(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=Yf.Partial,hideWhenDetached:f=!1,updatePositionStrategy:m=Xf.Optimized,onPlaced:h,...g}=e,_=tp(ap,n),[v,y]=p.useState(null),b=ro(t,y),[x,S]=p.useState(null),C=Fu(x),w=C?.width??0,T=C?.height??0,E=r+(a===`center`?``:`-`+a),D=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},O=Array.isArray(l)?l:[l],ee=O.length>0,k={padding:D,boundary:O.filter(lp),altBoundary:ee},{refs:te,floatingStyles:ne,placement:A,isPositioned:re,middlewareData:ie}=Rf({strategy:`fixed`,placement:E,whileElementsMounted:Jf((...e)=>wf(...e,{animationFrame:m===Xf.Always}),`whileElementsMounted`),elements:{reference:_.anchor},middleware:[Bf({mainAxis:i+T,alignmentAxis:o}),c&&Vf({mainAxis:!0,crossAxis:!1,...d===Yf.Partial?{limiter:Hf()}:{},...k}),c&&Uf({...k}),Wf({...k,apply:Jf(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}),x&&Kf({element:x,padding:s}),up({arrowWidth:w,arrowHeight:T}),f&&Gf(ee?{strategy:`referenceHidden`,...k}:{strategy:`referenceHidden`,padding:k.padding,altBoundary:k.altBoundary})]}),j=_.setPlacementState;Mo(()=>(j(A),()=>{j(void 0)}),[A,j]);let[M,ae]=dp(A),oe=Is(h);Mo(()=>{re&&oe?.()},[re,oe]);let se=ie.arrow?.x,ce=ie.arrow?.y,N=ie.arrow?.centerOffset!==0,[le,ue]=p.useState();return Mo(()=>{v&&ue(window.getComputedStyle(v).zIndex)},[v]),(0,P.jsx)(`div`,{ref:te.setFloating,"data-radix-popper-content-wrapper":``,style:{...ne,transform:re?ne.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:le,"--radix-popper-transform-origin":[ie.transformOrigin?.x,ie.transformOrigin?.y].join(` `),...ie.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,P.jsx)(op,{scope:n,placedSide:M,placedAlign:ae,onArrowChange:S,arrowX:se,arrowY:ce,shouldHideArrow:N,children:(0,P.jsx)(wo.div,{"data-side":M,"data-align":ae,...g,ref:b,style:{...g.style,animation:re?g.style?.animation:`none`}})})})},`PopperContent`));function lp(e){return e!==null}Jf(lp,`isNotNull`);var up=Jf(e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=dp(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function dp(e){let[t,n=`center`]=e.split(`-`);return[t,n]}Jf(dp,`getSideAndAlignFromPlacement`);var fp=Object.defineProperty,pp=(e,t)=>fp(e,`name`,{value:t,configurable:!0});function mp(e,[t,n]){return Math.min(n,Math.max(t,e))}pp(mp,`clamp`);var hp=Object.defineProperty,gp=(e,t)=>hp(e,`name`,{value:t,configurable:!0}),_p=`Popover`,[vp,yp]=Ao(_p,[$f]),bp=$f(),[xp,Sp]=vp(_p),Cp=gp(e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=bp(t),c=p.useRef(null),[l,u]=p.useState(!1),[d,f]=p.useState(0),[m,h]=p.useState(0),[g,_]=ls({prop:r,defaultProp:i??!1,onChange:a,caller:_p});return(0,P.jsx)(np,{...s,children:(0,P.jsx)(xp,{scope:t,contentId:Ds(),titleId:Ds(),descriptionId:Ds(),titlePresent:d>0,descriptionPresent:m>0,setTitleCount:f,setDescriptionCount:h,triggerRef:c,open:g,onOpenChange:_,onOpenToggle:p.useCallback(()=>_(e=>!e),[_]),hasCustomAnchor:l,onCustomAnchorAdd:p.useCallback(()=>u(!0),[]),onCustomAnchorRemove:p.useCallback(()=>u(!1),[]),modal:o,children:n})})},`Popover`),wp=`PopoverTrigger`,Tp=p.forwardRef(gp(function(e,t){let{__scopePopover:n,...r}=e,i=Sp(wp,n),a=bp(n),o=ro(t,i.triggerRef),s=(0,P.jsx)(wo.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":Ip(i.open),...r,ref:o,onClick:Xo(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,P.jsx)(ip,{asChild:!0,...a,children:s})},`PopoverTrigger`)),Ep=`PopoverPortal`,[Dp,Op]=vp(Ep,{forceMount:void 0}),kp=gp(e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=Sp(Ep,t);return(0,P.jsx)(Dp,{scope:t,forceMount:n,children:(0,P.jsx)(_s,{present:n||a.open,children:(0,P.jsx)(yc,{asChild:!0,container:i,children:r})})})},`PopoverPortal`),Ap=`PopoverContent`,jp=p.forwardRef(gp(function(e,t){let n=Op(Ap,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=Sp(Ap,e.__scopePopover);return(0,P.jsx)(_s,{present:r||a.open,children:a.modal?(0,P.jsx)(Np,{...i,ref:t}):(0,P.jsx)(Pp,{...i,ref:t})})},`PopoverContent`)),Mp=oo(`PopoverContent.RemoveScroll`),Np=p.forwardRef(gp(function(e,t){let n=Sp(Ap,e.__scopePopover),r=p.useRef(null),i=ro(t,r),a=p.useRef(!1),{nodes:o,registry:s}=ac();return p.useEffect(()=>{let e=r.current;if(e)return Ul(e)},[]),(0,P.jsx)(Pl,{as:Mp,allowPinchZoom:!0,shards:p.useMemo(()=>[r,...o.map(e=>({current:e}))],[r,o]),children:(0,P.jsx)(Fp,{...e,ref:i,branchNodes:o,branchRegistry:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Xo(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:Xo(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;a.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:Xo(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})},`PopoverContentModal`)),Pp=p.forwardRef(gp(function(e,t){let n=Sp(Ap,e.__scopePopover),r=p.useRef(!1),i=p.useRef(!1);return(0,P.jsx)(Fp,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`PopoverContentNonModal`)),Fp=p.forwardRef(gp(function(e,t){let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,"aria-describedby":d,branchNodes:f,branchRegistry:m,...h}=e,g=Sp(Ap,n),_=bp(n),[v,y]=p.useState(null),b=ro(t,y);return oc(v),Tc(),(0,P.jsx)(ic,{registry:m,children:(0,P.jsx)(nc,{asChild:!0,loop:!0,trapped:r,branches:f,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,P.jsx)(Ws,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>g.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,P.jsx)(cp,{"data-state":Ip(g.open),role:`dialog`,id:g.contentId,"aria-labelledby":g.titlePresent?g.titleId:void 0,"aria-describedby":g.descriptionPresent?Lp(d,g.descriptionId):d,..._,...h,ref:b,style:{...h.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})})},`PopoverContentImpl`));function Ip(e){return e?`open`:`closed`}gp(Ip,`getState`);function Lp(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}gp(Lp,`concatAriaDescribedby`);var Rp=Object.defineProperty,zp=(e,t)=>Rp(e,`name`,{value:t,configurable:!0}),Bp={ItemAligned:`item-aligned`,Popper:`popper`},Vp={LTR:`ltr`,RTL:`rtl`},Hp=[` `,`Enter`,`ArrowUp`,`ArrowDown`],Up=[` `,`Enter`],Wp=`Select`,[Gp,Kp,qp]=Fo(Wp),[Jp,Yp]=Ao(Wp,[qp,$f]),Xp=$f(),[Zp,Qp]=Jp(Wp),[$p,em]=Jp(Wp);function tm(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:m,form:h,internal_do_not_use_render:g}=e,_=Xp(t),[v,y]=p.useState(null),[b,x]=p.useState(null),[S,C]=p.useState(!1),w=Ms(l),[T,E]=ls({prop:r,defaultProp:i??!1,onChange:a,caller:Wp}),[D,O]=ls({prop:o,defaultProp:s,onChange:c,caller:Wp}),ee=p.useRef(null),k=p.useRef(!1),[te,ne]=p.useState(null),A=zp(e=>{ne({value:e,hasConsumerStoppedPropagation:k.current}),O(e)},`handleUserSelect`),re=p.useRef(D);p.useEffect(()=>{let e=h?v?.ownerDocument.getElementById(h):v?.form;if(e instanceof HTMLFormElement){let t=zp(()=>O(re.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[h,v,O]);let ie=!v||!!h||!!v.closest(`form`),[j,M]=p.useState(new Set),ae=Ds(),oe=Array.from(j).map(e=>e.props.value).join(`;`),se=p.useCallback(e=>{M(t=>new Set(t).add(e))},[]),ce=p.useCallback(e=>{M(t=>{let n=new Set(t);return n.delete(e),n})},[]),N={required:m,trigger:v,onTriggerChange:y,valueNode:b,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:ae,value:D,onValueChange:O,hasConsumerStoppedPropagationRef:k,userSelection:te,onUserSelect:A,open:T,onOpenChange:E,dir:w,triggerPointerDownPosRef:ee,disabled:f,name:u,autoComplete:d,form:h,nativeOptions:j,nativeSelectKey:oe,isFormControl:ie};return(0,P.jsx)(np,{..._,children:(0,P.jsx)(Zp,{scope:t,...N,children:(0,P.jsx)(Gp.Provider,{scope:t,children:(0,P.jsx)($p,{scope:t,onNativeOptionAdd:se,onNativeOptionRemove:ce,children:Um(g)?g(N):n})})})})}zp(tm,`SelectProvider`);var nm=zp(e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,P.jsx)(tm,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,P.jsxs)(P.Fragment,{children:[n,e?(0,P.jsx)(Hm,{__scopeSelect:t}):null]})})},`Select`),rm=`SelectTrigger`,im=p.forwardRef(zp(function(e,t){let{__scopeSelect:n,disabled:r=!1,...i}=e,a=Xp(n),o=Qp(rm,n),s=o.disabled||r,c=ro(t,o.onTriggerChange),l=Kp(n),u=p.useRef(`touch`),[d,f,m]=Gm(e=>{let t=l().filter(e=>!e.disabled),n=Km(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onUserSelect(n.value)}),h=zp(e=>{s||(o.onOpenChange(!0),m()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})},`handleOpen`);return(0,P.jsx)(ip,{asChild:!0,...a,children:(0,P.jsx)(wo.button,{type:`button`,role:`combobox`,"aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":Wm(o.value)?``:void 0,...i,ref:c,onClick:Xo(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&h(e)}),onPointerDown:Xo(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(h(e),e.preventDefault())}),onKeyDown:Xo(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&(o.hasConsumerStoppedPropagationRef.current=e.isPropagationStopped(),f(e.key)),t&&e.key===` `||Hp.includes(e.key)&&(h(),e.preventDefault())})})})},`SelectTrigger`)),am=`SelectValue`,om=p.forwardRef(zp(function(e,t){let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=Qp(am,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=ro(t,c.onValueNodeChange);Mo(()=>{l(u)},[l,u]);let f=Wm(c.value);return(0,P.jsx)(wo.span,{...s,asChild:!f&&s.asChild,ref:d,style:{pointerEvents:`none`},children:(0,P.jsx)(p.Fragment,{children:f?o:a},f?`placeholder`:`value`)})},`SelectValue`)),sm=p.forwardRef(zp(function(e,t){let{__scopeSelect:n,children:r,...i}=e;return(0,P.jsx)(wo.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})},`SelectIcon`)),[cm,lm]=Jp(`SelectPortal`,{forceMount:void 0}),um=zp(e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,P.jsx)(cm,{scope:e.__scopeSelect,forceMount:n,children:(0,P.jsx)(yc,{asChild:!0,...r})})},`SelectPortal`),dm=`SelectContent`,fm=p.forwardRef(zp(function(e,t){let n=lm(dm,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=Qp(dm,e.__scopeSelect),[o,s]=p.useState();return Mo(()=>{s(new DocumentFragment)},[]),(0,P.jsx)(_s,{present:r||a.open,children:({present:e})=>e?(0,P.jsx)(vm,{...i,ref:t}):(0,P.jsx)(pm,{...i,fragment:o})})},`SelectContent`)),pm=p.forwardRef(zp(function(e,t){let{__scopeSelect:n,children:r,fragment:i}=e;return i?xo.createPortal((0,P.jsx)(hm,{scope:n,children:(0,P.jsx)(Gp.Slot,{scope:n,children:(0,P.jsx)(`div`,{ref:t,children:r})})}),i):null},`SelectContentFragment`)),mm=10,[hm,gm]=Jp(dm),_m=oo(`SelectContent.RemoveScroll`),vm=p.forwardRef(zp(function(e,t){let{__scopeSelect:n}=e,{position:r=Bp.ItemAligned,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:m,sticky:h,hideWhenDetached:g,avoidCollisions:_,...v}=e,y=Qp(dm,n),[b,x]=p.useState(null),[S,C]=p.useState(null),w=ro(t,x),[T,E]=p.useState(null),[D,O]=p.useState(null),ee=Kp(n),[k,te]=p.useState(!1),ne=p.useRef(!1),A=p.useRef(!1),re=p.useRef(!1);p.useEffect(()=>{if(b)return Ul(b)},[b]),Tc();let ie=p.useCallback(e=>{let[t,...n]=ee().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&S&&(S.scrollTop=0),n===r&&S&&(S.scrollTop=S.scrollHeight),n?.focus(),document.activeElement!==i))return},[ee,S]),j=p.useCallback(()=>ie([T,b]),[ie,T,b]);p.useEffect(()=>{k&&j()},[k,j]);let{onOpenChange:M,triggerPointerDownPosRef:ae}=y;p.useEffect(()=>{if(b){let e={x:0,y:0},t=zp(t=>{e={x:Math.abs(Math.round(t.pageX)-(ae.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(ae.current?.y??0))}},`handlePointerMove`),n=zp(n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(b)||M(!1),document.removeEventListener(`pointermove`,t),ae.current=null},`handlePointerUp`);return ae.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[b,M,ae]),p.useEffect(()=>{let e=zp(()=>M(!1),`close`);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[M]);let[oe,se]=Gm(e=>{let t=ee().filter(e=>!e.disabled),n=Km(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),ce=p.useCallback((e,t,n)=>{let r=!A.current;r&&(A.current=!0);let i=!ne.current&&!n;y.value!==void 0&&y.value===t||i?(E(e),i&&(ne.current=!0)):r&&E(e)},[y.value]),N=p.useCallback(()=>b?.focus(),[b]),le=p.useCallback((e,t,n)=>{if(!e)return;let r=!re.current;r&&(re.current=!0);let i=!ne.current&&!n;(y.value!==void 0&&y.value===t||i||r)&&O(e)},[y.value]),ue=r===Bp.Popper?bm:ym,de=ue===bm?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:m,sticky:h,hideWhenDetached:g,avoidCollisions:_}:{};return(0,P.jsx)(hm,{scope:n,content:b,viewport:S,onViewportChange:C,itemRefCallback:ce,selectedItem:T,onItemLeave:N,itemTextRefCallback:le,focusSelectedItem:j,selectedItemText:D,position:r,isPositioned:k,searchRef:oe,children:(0,P.jsx)(Pl,{as:_m,allowPinchZoom:!0,children:(0,P.jsx)(nc,{asChild:!0,trapped:y.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:Xo(i,e=>{y.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,P.jsx)(Ws,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:(0,P.jsx)(ue,{role:`listbox`,id:y.contentId,"data-state":y.open?`open`:`closed`,dir:y.dir,onContextMenu:e=>e.preventDefault(),...v,...de,onPlaced:()=>te(!0),ref:w,style:{display:`flex`,flexDirection:`column`,outline:`none`,...v.style},onKeyDown:Xo(v.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&se(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=ee().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>ie(t)),e.preventDefault()}})})})})})})},`SelectContentImpl`)),ym=p.forwardRef(zp(function(e,t){let{__scopeSelect:n,onPlaced:r,...i}=e,a=Qp(dm,n),o=gm(dm,n),[s,c]=p.useState(null),[l,u]=p.useState(null),d=ro(t,u),f=Kp(n),m=p.useRef(!1),h=p.useRef(!0),{viewport:g,selectedItem:_,selectedItemText:v,focusSelectedItem:y}=o,b=p.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&g&&_&&v){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=v.getBoundingClientRect();if(a.dir!==Vp.RTL){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-mm,d=mp(a,[mm,Math.max(mm,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-mm,d=mp(a,[mm,Math.max(mm,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-mm*2,u=g.scrollHeight,d=window.getComputedStyle(l),p=parseInt(d.borderTopWidth,10),h=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=p+h+u+b+y,S=Math.min(_.offsetHeight*5,x),C=window.getComputedStyle(g),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-mm,D=c-E,O=_.offsetHeight/2,ee=_.offsetTop+O,k=p+h+ee,te=x-k;if(k<=E){let e=o.length>0&&_===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-g.offsetTop-g.offsetHeight,n=k+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&_===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,p+g.offsetTop+(e?w:0)+O)+te;s.style.height=t+`px`,g.scrollTop=k-E+g.offsetTop}s.style.margin=`${mm}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>m.current=!0)}},[f,a.trigger,a.valueNode,s,l,g,_,v,a.dir,r]);Mo(()=>b(),[b]);let[x,S]=p.useState();Mo(()=>{l&&S(window.getComputedStyle(l).zIndex)},[l]);let C=p.useCallback(e=>{e&&h.current===!0&&(b(),y?.(),h.current=!1)},[b,y]);return(0,P.jsx)(xm,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:m,onScrollButtonChange:C,children:(0,P.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:x},children:(0,P.jsx)(wo.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})},`SelectItemAlignedPosition`)),bm=p.forwardRef(zp(function(e,t){let{__scopeSelect:n,align:r=`start`,collisionPadding:i=mm,...a}=e,o=Xp(n);return(0,P.jsx)(cp,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})},`SelectPopperPosition`)),[xm,Sm]=Jp(dm,{}),Cm=`SelectViewport`,wm=p.forwardRef(zp(function(e,t){let{__scopeSelect:n,nonce:r,...i}=e,a=gm(Cm,n),o=Sm(Cm,n),s=ro(t,a.onViewportChange),c=p.useRef(0);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,P.jsx)(Gp.Slot,{scope:n,children:(0,P.jsx)(wo.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:Xo(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-mm*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})},`SelectViewport`)),[Tm,Em]=Jp(`SelectGroup`),Dm=p.forwardRef(zp(function(e,t){let{__scopeSelect:n,...r}=e,i=Ds();return(0,P.jsx)(Tm,{scope:n,id:i,children:(0,P.jsx)(wo.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})},`SelectGroup`)),Om=`SelectItem`,[km,Am]=Jp(Om),jm=p.forwardRef(zp(function(e,t){let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=Qp(Om,n),c=gm(Om,n),l=s.value===r,[u,d]=p.useState(a??``),[f,m]=p.useState(!1),h=ro(t,Is(e=>c.itemRefCallback?.(e,r,i))),g=Ds(),_=p.useRef(`touch`);function v(e){s.hasConsumerStoppedPropagationRef.current=e.isPropagationStopped(),s.onUserSelect(r),s.onOpenChange(!1)}return zp(v,`handleSelect`),(0,P.jsx)(km,{scope:n,value:r,disabled:i,textId:g,isSelected:l,onItemTextChange:p.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,P.jsx)(Gp.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,P.jsx)(wo.div,{role:`option`,"aria-labelledby":g,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:h,onFocus:Xo(o.onFocus,()=>m(!0)),onBlur:Xo(o.onBlur,()=>m(!1)),onClick:Xo(o.onClick,e=>{i||_.current!==`mouse`&&v(e)}),onPointerUp:Xo(o.onPointerUp,e=>{i||_.current===`mouse`&&v(e)}),onPointerDown:Xo(o.onPointerDown,e=>{_.current=e.pointerType}),onPointerMove:Xo(o.onPointerMove,e=>{_.current=e.pointerType,i?c.onItemLeave?.():_.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Xo(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:Xo(o.onKeyDown,e=>{i||e.target!==e.currentTarget||(c.searchRef?.current===``||e.key!==` `)&&(Up.includes(e.key)&&v(e),e.key===` `&&e.preventDefault())})})})})},`SelectItem`)),Mm=`SelectItemText`,Nm=p.forwardRef(zp(function(e,t){let{__scopeSelect:n,className:r,style:i,...a}=e,o=Qp(Mm,n),s=gm(Mm,n),c=Am(Mm,n),l=em(Mm,n),[u,d]=p.useState(null),f=Is(e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),m=ro(t,d,c.onItemTextChange,f),h=u?.textContent,g=p.useMemo(()=>(0,P.jsx)(`option`,{value:c.value,disabled:c.disabled,children:h},c.value),[c.disabled,c.value,h]),{onNativeOptionAdd:_,onNativeOptionRemove:v}=l;return Mo(()=>(_(g),()=>v(g)),[_,v,g]),(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(wo.span,{id:c.textId,...a,ref:m}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren&&!Wm(o.value)?xo.createPortal(a.children,o.valueNode):null]})},`SelectItemText`)),Pm=`SelectItemIndicator`,Fm=p.forwardRef(zp(function(e,t){let{__scopeSelect:n,...r}=e;return Am(Pm,n).isSelected?(0,P.jsx)(wo.span,{"aria-hidden":!0,...r,ref:t}):null},`SelectItemIndicator`)),Im=`SelectScrollUpButton`,Lm=p.forwardRef(zp(function(e,t){let n=gm(Im,e.__scopeSelect),r=Sm(Im,e.__scopeSelect),[i,a]=p.useState(!1),o=ro(t,r.onScrollButtonChange);return Mo(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollTop>0;a(e)};zp(e,`handleScroll`);let t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,P.jsx)(Bm,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null},`SelectScrollUpButton`)),Rm=`SelectScrollDownButton`,zm=p.forwardRef(zp(function(e,t){let n=gm(Rm,e.__scopeSelect),r=Sm(Rm,e.__scopeSelect),[i,a]=p.useState(!1),o=ro(t,r.onScrollButtonChange);return Mo(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)};zp(e,`handleScroll`);let t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,P.jsx)(Bm,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null},`SelectScrollDownButton`)),Bm=p.forwardRef(zp(function(e,t){let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=gm(`SelectScrollButton`,n),o=p.useRef(null),s=Kp(n),c=p.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return p.useEffect(()=>()=>c(),[c]),Mo(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,P.jsx)(wo.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Xo(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:Xo(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:Xo(i.onPointerLeave,()=>{c()})})},`SelectScrollButtonImpl`)),Vm=`SelectBubbleInput`,Hm=p.forwardRef(zp(function({__scopeSelect:e,...t},n){let r=Qp(Vm,e),{value:i,onValueChange:a,required:o,disabled:s,name:c,autoComplete:l,form:u,userSelection:d}=r,{nativeOptions:f,nativeSelectKey:m}=r,h=p.useRef(null),g=ro(n,h),_=i??``,v=p.useRef(_),y=p.useRef(d),b=p.useRef(!1),x=Array.from(f).some(e=>(e.props.value??``)===``);return p.useEffect(()=>{let e=h.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set,r=d!==null&&d!==y.current;y.current=d;let i=v.current!==_;v.current=_;let a=r&&i;if(r&&!i&&d.value!==_&&!d.hasConsumerStoppedPropagation&&n){b.current=!0;try{n.call(e,d.value),e.dispatchEvent(new Event(`change`,{bubbles:!0}))}finally{b.current=!1,n.call(e,_)}return}let o=a&&!d.hasConsumerStoppedPropagation;if(i&&n){let t=new Event(`change`,{bubbles:o});n.call(e,_),e.dispatchEvent(t)}},[_,d]),(0,P.jsxs)(wo.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:c,autoComplete:l,disabled:s,form:u,onChange:e=>{b.current||a(e.target.value)},...t,style:{...Eo,...t.style},ref:g,defaultValue:_,children:[Wm(i)&&!x?(0,P.jsx)(`option`,{value:``}):null,Array.from(f)]},m)},`SelectBubbleInput`));function Um(e){return typeof e==`function`}zp(Um,`isFunction`);function Wm(e){return e===``||e===void 0}zp(Wm,`shouldShowPlaceholder`);function Gm(e){let t=Is(e),n=p.useRef(``),r=p.useRef(0),i=p.useCallback(e=>{let i=n.current+e;t(i);function a(e){n.current=e,window.clearTimeout(r.current),e!==``&&(r.current=window.setTimeout(()=>a(``),1e3))}zp(a,`updateSearch`),a(i)},[t]),a=p.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return p.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}zp(Gm,`useTypeaheadSearch`);function Km(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=qm(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}zp(Km,`findNextItem`);function qm(e,t){return e.map((n,r)=>e[(t+r)%e.length])}zp(qm,`wrapArray`);var Jm=Object.defineProperty,Ym=(e,t)=>Jm(e,`name`,{value:t,configurable:!0}),[Xm,Zm]=Ao(`Tooltip`,[$f]);$f();var Qm=`TooltipProvider`,$m=700,[eh,th]=Xm(Qm),nh=Ym(e=>{let{__scopeTooltip:t,delayDuration:n=$m,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=p.useRef(!0),s=p.useRef(!1),c=p.useRef(0);return p.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,P.jsx)(eh,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:p.useCallback(()=>{r<=0||(window.clearTimeout(c.current),o.current=!1)},[r]),onClose:p.useCallback(()=>{r<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r))},[r]),isPointerInTransitRef:s,onPointerInTransitChange:p.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})},`TooltipProvider`),[rh,ih]=Xm(`Tooltip`),[ah,oh]=Xm(`TooltipPortal`,{forceMount:void 0});function sh(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}Ym(sh,`getExitSideFromRect`);function ch(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}Ym(ch,`getPaddedExitPoints`);function lh(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}Ym(lh,`getPointsFromRect`);function uh(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}Ym(uh,`isPointInPolygon`);function dh(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),fh(t)}Ym(dh,`getHull`);function fh(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}Ym(fh,`getHullPresorted`);function ph(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}Ym(ph,`concatAriaDescribedby`);function mh(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=mh(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function hh(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=mh(e))&&(r&&(r+=` `),r+=t);return r}var gh=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},_h=(e,t)=>({classGroupId:e,validator:t}),vh=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),yh=`-`,bh=[],xh=`arbitrary..`,Sh=e=>{let t=Th(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return wh(e);let n=e.split(yh);return Ch(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?gh(i,t):t:i||bh}return n[e]||bh}}},Ch=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=Ch(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(yh):e.slice(t).join(yh),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},wh=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?xh+r:void 0})(),Th=e=>{let{theme:t,classGroups:n}=e;return Eh(n,t)},Eh=(e,t)=>{let n=vh();for(let r in e)Dh(e[r],n,r,t);return n},Dh=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++)Oh(e[a],t,n,r)},Oh=(e,t,n,r)=>{typeof e==`string`?kh(e,t,n):typeof e==`function`?Ah(e,t,n,r):jh(e,t,n,r)},kh=(e,t,n)=>{let r=e===``?t:Mh(t,e);r.classGroupId=n},Ah=(e,t,n,r)=>{Nh(e)?Dh(e(r),t,n,r):(t.validators===null&&(t.validators=[]),t.validators.push(_h(n,e)))},jh=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Dh(o,Mh(t,a),n,r)}},Mh=(e,t)=>{let n=e,r=t.split(yh),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=vh(),n.nextPart.set(t,i)),n=i}return n},Nh=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Ph=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},Fh=`!`,Ih=`:`,Lh=[],Rh=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),zh=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let c=e[s];if(n===0&&r===0){if(c===Ih){t.push(e.slice(i,s)),i=s+1;continue}if(c===`/`){a=s;continue}}if(c===`[`)n++;else if(c===`]`)n--;else if(c===`(`)r++;else if(c===`)`)r--;else if(c===`\\`)s++;else if(c===`"`||c===`'`)for(;++s<o;){let t=e[s];if(t===`\\`)s++;else if(t===c)break}}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(Fh)?(c=s.slice(0,-1),l=!0):s.startsWith(Fh)&&(c=s.slice(1),l=!0);let u=l&&s.startsWith(Fh)?1:0,d=a&&a>i?a-i-u:void 0;return Rh(t,l,c,d)};if(t){let e=t+Ih,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Rh(Lh,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Bh=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},Vh=e=>({cache:Ph(e.cacheSize),parseClassName:zh(e),sortModifiers:Bh(e),postfixLookupClassGroupIds:Hh(e),...Sh(e)}),Hh=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},Uh=/\s+/,Wh=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(Uh),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h||(g=r(p),!g)){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+Fh:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},Gh=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Kh(n))&&(i&&(i+=` `),i+=r);return i},Kh=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Kh(e[r]))&&(n&&(n+=` `),n+=t);return n},qh=(e,...t)=>{let n,r,i,a,o=o=>(n=Vh(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=Wh(e,n);return i(e,a),a};return a=o,(...e)=>a(Gh(...e))},Jh=[],Yh=e=>{let t=t=>t[e]||Jh;return t.isThemeGetter=!0,t.themeKey=e,t},Xh=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Zh=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Qh=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,$h=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,eg=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|Q|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^--spacing\(.+\)|^0$/,tg=/^[+-]?(?:\d*\.)?\d+(?:[eE][+-]?\d+)?(?:r?ic|r(?:cap|ch|ex))$/,ng=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark|contrast-color|device-cmyk|--alpha)\(.+\)$/i,rg=/^(?:_*[+-]?(?:\d|\.\d)|[\w-]+\(|_*(?:inherit|initial|revert(?:-layer)?|unset)_*$)/i,ig=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ag=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,og=e=>Qh.test(e),B=e=>!!e&&!Number.isNaN(Number(e)),sg=e=>!!e&&Number.isInteger(Number(e)),cg=e=>e.endsWith(`%`)&&B(e.slice(0,-1)),lg=e=>$h.test(e),ug=()=>!0,dg=e=>(eg.test(e)||tg.test(e))&&!ng.test(e),fg=e=>rg.test(e)&&!ng.test(e),pg=()=>!1,mg=e=>ig.test(e),hg=e=>ag.test(e),gg=e=>!V(e)&&!H(e),_g=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),vg=e=>Fg(e,zg,pg),V=e=>Xh.test(e),yg=e=>Fg(e,Bg,dg),bg=e=>Fg(e,Vg,fg),xg=e=>Fg(e,Hg,B),Sg=e=>Fg(e,Wg,ug),Cg=e=>Fg(e,Ug,pg),wg=e=>Fg(e,Lg,pg),Tg=e=>Fg(e,Rg,hg),Eg=e=>Fg(e,Gg,mg),H=e=>Zh.test(e),Dg=e=>Ig(e,Bg),Og=e=>Ig(e,Vg,!0),kg=e=>Ig(e,Ug),Ag=e=>Ig(e,Lg),jg=e=>Ig(e,zg),Mg=e=>Ig(e,Rg),Ng=e=>Ig(e,Gg,!0),Pg=e=>Ig(e,Wg,!0),Fg=(e,t,n)=>{let r=Xh.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Ig=(e,t,n=!1)=>{let r=Zh.exec(e);return r?r[1]?t(r[1]):n:!1},Lg=e=>e===`position`||e===`percentage`,Rg=e=>e===`image`||e===`url`,zg=e=>e===`length`||e===`size`||e===`bg-size`,Bg=e=>e===`length`,Vg=e=>e!==`color`,Hg=e=>e===`number`,Ug=e=>e===`family-name`,Wg=e=>e===`number`||e===`weight`,Gg=e=>e===`shadow`,Kg=qh(()=>{let e=Yh(`color`),t=Yh(`font`),n=Yh(`text`),r=Yh(`font-weight`),i=Yh(`tracking`),a=Yh(`leading`),o=Yh(`breakpoint`),s=Yh(`container`),c=Yh(`spacing`),l=Yh(`radius`),u=Yh(`shadow`),d=Yh(`inset-shadow`),f=Yh(`text-shadow`),p=Yh(`drop-shadow`),m=Yh(`blur`),h=Yh(`perspective`),g=Yh(`aspect`),_=Yh(`ease`),v=Yh(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),H,V],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[H,V,c],T=()=>[og,`full`,`auto`,...w()],E=()=>[sg,`none`,`subgrid`,H,V],D=()=>[`auto`,{span:[`full`,sg,H,V]},sg,H,V],O=()=>[sg,`auto`,H,V],ee=()=>[`auto`,`min`,`max`,`fr`,B,H,V],k=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],te=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],ne=()=>[`auto`,...w()],A=()=>[og,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],re=()=>[s,og,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],ie=()=>[og,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],j=()=>[e,H,V],M=()=>[...b(),Ag,wg,{position:[H,V]}],ae=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],oe=()=>[`auto`,`cover`,`contain`,jg,vg,{size:[H,V]}],se=()=>[cg,Dg,yg],ce=()=>[``,`none`,`full`,l,H,V],N=()=>[``,B,Dg,yg],le=()=>[`solid`,`dashed`,`dotted`,`double`],ue=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],de=()=>[B,cg,Og,bg],fe=()=>[``,`none`,m,H,V],pe=()=>[`none`,B,H,V],me=()=>[`none`,B,H,V],he=()=>[B,H,V],ge=()=>[og,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[lg],breakpoint:[lg],color:[ug],container:[lg],"drop-shadow":[lg],ease:[`in`,`out`,`in-out`],font:[gg],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[lg],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[lg],shadow:[lg],spacing:[`px`,B],text:[lg],"text-shadow":[lg],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,og,V,H,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,H,V]}],"container-named":[_g],columns:[{columns:[B,`auto`,V,H,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`],"not-sr":[`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],contain:[{contain:[`none`,`content`,`strict`,H,V]}],"contain-size":[{contain:[`size`,`inline-size`]}],"contain-layout":[`contain-layout`],"contain-paint":[`contain-paint`],"contain-style":[`contain-style`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[sg,`auto`,H,V]}],basis:[{basis:[og,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[B,og,`auto`,`initial`,`none`,H,V]}],grow:[{grow:[``,B,H,V]}],shrink:[{shrink:[``,B,H,V]}],order:[{order:[sg,`first`,`last`,`none`,H,V]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":ee()}],"auto-rows":[{"auto-rows":ee()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...k(),`normal`]}],"justify-items":[{"justify-items":[...te(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...te()]}],"align-content":[{content:[`normal`,...k()]}],"align-items":[{items:[...te(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...te(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":k()}],"place-items":[{"place-items":[...te(),`baseline`]}],"place-self":[{"place-self":[`auto`,...te()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:ne()}],mx:[{mx:ne()}],my:[{my:ne()}],ms:[{ms:ne()}],me:[{me:ne()}],mbs:[{mbs:ne()}],mbe:[{mbe:ne()}],mt:[{mt:ne()}],mr:[{mr:ne()}],mb:[{mb:ne()}],ml:[{ml:ne()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:A()}],"inline-size":[{inline:[`auto`,...re()]}],"min-inline-size":[{"min-inline":[`auto`,...re()]}],"max-inline-size":[{"max-inline":[`none`,...re()]}],"block-size":[{block:[`auto`,...ie()]}],"min-block-size":[{"min-block":[`auto`,...ie()]}],"max-block-size":[{"max-block":[`none`,...ie()]}],w:[{w:[s,`screen`,...A()]}],"min-w":[{"min-w":[s,`screen`,`none`,...A()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...A()]}],h:[{h:[`screen`,`lh`,...A()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...A()]}],"max-h":[{"max-h":[`screen`,`lh`,`none`,...A()]}],"font-size":[{text:[`base`,n,Dg,yg]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Pg,Sg]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,cg,H,V]}],"font-family":[{font:[kg,Cg,t]}],"font-features":[{"font-features":[H,V]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,H,V]}],"line-clamp":[{"line-clamp":[B,`none`,H,V]}],leading:[{leading:[`none`,a,...w()]}],"list-image":[{"list-image":[`none`,H,V]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,H,V]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:j()}],"text-color":[{text:j()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...le(),`wavy`]}],"text-decoration-thickness":[{decoration:[B,`from-font`,`auto`,Dg,Ag,yg]}],"text-decoration-color":[{decoration:j()}],"underline-offset":[{"underline-offset":[B,`auto`,H,V]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`text-ellipsis`,`text-clip`],truncate:[`truncate`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[sg,H,V]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,H,V]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,H,V]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:M()}],"bg-repeat":[{bg:ae()}],"bg-size":[{bg:oe()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},sg,H,V],radial:[``,H,V],conic:[``,sg,H,V]},Mg,Tg]}],"bg-color":[{bg:j()}],"gradient-from-pos":[{from:se()}],"gradient-via-pos":[{via:se()}],"gradient-to-pos":[{to:se()}],"gradient-from":[{from:j()}],"gradient-via":[{via:j()}],"gradient-to":[{to:j()}],rounded:[{rounded:ce()}],"rounded-s":[{"rounded-s":ce()}],"rounded-e":[{"rounded-e":ce()}],"rounded-t":[{"rounded-t":ce()}],"rounded-r":[{"rounded-r":ce()}],"rounded-b":[{"rounded-b":ce()}],"rounded-l":[{"rounded-l":ce()}],"rounded-ss":[{"rounded-ss":ce()}],"rounded-se":[{"rounded-se":ce()}],"rounded-ee":[{"rounded-ee":ce()}],"rounded-es":[{"rounded-es":ce()}],"rounded-tl":[{"rounded-tl":ce()}],"rounded-tr":[{"rounded-tr":ce()}],"rounded-br":[{"rounded-br":ce()}],"rounded-bl":[{"rounded-bl":ce()}],"border-w":[{border:N()}],"border-w-x":[{"border-x":N()}],"border-w-y":[{"border-y":N()}],"border-w-s":[{"border-s":N()}],"border-w-e":[{"border-e":N()}],"border-w-bs":[{"border-bs":N()}],"border-w-be":[{"border-be":N()}],"border-w-t":[{"border-t":N()}],"border-w-r":[{"border-r":N()}],"border-w-b":[{"border-b":N()}],"border-w-l":[{"border-l":N()}],"divide-x":[{"divide-x":N()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":N()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...le(),`hidden`,`none`]}],"divide-style":[{divide:[...le(),`hidden`,`none`]}],"border-color":[{border:j()}],"border-color-x":[{"border-x":j()}],"border-color-y":[{"border-y":j()}],"border-color-s":[{"border-s":j()}],"border-color-e":[{"border-e":j()}],"border-color-bs":[{"border-bs":j()}],"border-color-be":[{"border-be":j()}],"border-color-t":[{"border-t":j()}],"border-color-r":[{"border-r":j()}],"border-color-b":[{"border-b":j()}],"border-color-l":[{"border-l":j()}],"divide-color":[{divide:j()}],"outline-style":[{outline:[...le(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[B,H,V]}],"outline-w":[{outline:[``,B,Dg,yg]}],"outline-color":[{outline:j()}],shadow:[{shadow:[``,`inner`,`none`,u,Ng,Eg]}],"shadow-color":[{shadow:j()}],"inset-shadow":[{"inset-shadow":[`none`,d,Ng,Eg]}],"inset-shadow-color":[{"inset-shadow":j()}],"ring-w":[{ring:N()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:j()}],"ring-offset-w":[{"ring-offset":[B,yg]}],"ring-offset-color":[{"ring-offset":j()}],"inset-ring-w":[{"inset-ring":N()}],"inset-ring-color":[{"inset-ring":j()}],"text-shadow":[{"text-shadow":[`none`,f,Ng,Eg]}],"text-shadow-color":[{"text-shadow":j()}],opacity:[{opacity:[B,H,V]}],"mix-blend":[{"mix-blend":[...ue(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ue()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[B,H,V]}],"mask-image-linear-from-pos":[{"mask-linear-from":de()}],"mask-image-linear-to-pos":[{"mask-linear-to":de()}],"mask-image-linear-from-color":[{"mask-linear-from":j()}],"mask-image-linear-to-color":[{"mask-linear-to":j()}],"mask-image-t-from-pos":[{"mask-t-from":de()}],"mask-image-t-to-pos":[{"mask-t-to":de()}],"mask-image-t-from-color":[{"mask-t-from":j()}],"mask-image-t-to-color":[{"mask-t-to":j()}],"mask-image-r-from-pos":[{"mask-r-from":de()}],"mask-image-r-to-pos":[{"mask-r-to":de()}],"mask-image-r-from-color":[{"mask-r-from":j()}],"mask-image-r-to-color":[{"mask-r-to":j()}],"mask-image-b-from-pos":[{"mask-b-from":de()}],"mask-image-b-to-pos":[{"mask-b-to":de()}],"mask-image-b-from-color":[{"mask-b-from":j()}],"mask-image-b-to-color":[{"mask-b-to":j()}],"mask-image-l-from-pos":[{"mask-l-from":de()}],"mask-image-l-to-pos":[{"mask-l-to":de()}],"mask-image-l-from-color":[{"mask-l-from":j()}],"mask-image-l-to-color":[{"mask-l-to":j()}],"mask-image-x-from-pos":[{"mask-x-from":de()}],"mask-image-x-to-pos":[{"mask-x-to":de()}],"mask-image-x-from-color":[{"mask-x-from":j()}],"mask-image-x-to-color":[{"mask-x-to":j()}],"mask-image-y-from-pos":[{"mask-y-from":de()}],"mask-image-y-to-pos":[{"mask-y-to":de()}],"mask-image-y-from-color":[{"mask-y-from":j()}],"mask-image-y-to-color":[{"mask-y-to":j()}],"mask-image-radial":[{"mask-radial":[H,V]}],"mask-image-radial-from-pos":[{"mask-radial-from":de()}],"mask-image-radial-to-pos":[{"mask-radial-to":de()}],"mask-image-radial-from-color":[{"mask-radial-from":j()}],"mask-image-radial-to-color":[{"mask-radial-to":j()}],"mask-image-radial-shape":[{mask:[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":x()}],"mask-image-conic-pos":[{"mask-conic":[B,H,V]}],"mask-image-conic-from-pos":[{"mask-conic-from":de()}],"mask-image-conic-to-pos":[{"mask-conic-to":de()}],"mask-image-conic-from-color":[{"mask-conic-from":j()}],"mask-image-conic-to-color":[{"mask-conic-to":j()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:M()}],"mask-repeat":[{mask:ae()}],"mask-size":[{mask:oe()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,H,V]}],filter:[{filter:[``,`none`,H,V]}],blur:[{blur:fe()}],brightness:[{brightness:[B,H,V]}],contrast:[{contrast:[B,H,V]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Ng,Eg]}],"drop-shadow-color":[{"drop-shadow":j()}],grayscale:[{grayscale:[``,B,H,V]}],"hue-rotate":[{"hue-rotate":[B,H,V]}],invert:[{invert:[``,B,H,V]}],saturate:[{saturate:[B,H,V]}],sepia:[{sepia:[``,B,H,V]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,H,V]}],"backdrop-blur":[{"backdrop-blur":fe()}],"backdrop-brightness":[{"backdrop-brightness":[B,H,V]}],"backdrop-contrast":[{"backdrop-contrast":[B,H,V]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,B,H,V]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[B,H,V]}],"backdrop-invert":[{"backdrop-invert":[``,B,H,V]}],"backdrop-opacity":[{"backdrop-opacity":[B,H,V]}],"backdrop-saturate":[{"backdrop-saturate":[B,H,V]}],"backdrop-sepia":[{"backdrop-sepia":[``,B,H,V]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,H,V]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[B,`initial`,H,V]}],ease:[{ease:[`linear`,`initial`,_,H,V]}],delay:[{delay:[B,H,V]}],animate:[{animate:[`none`,v,H,V]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,H,V]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:pe()}],"rotate-x":[{"rotate-x":pe()}],"rotate-y":[{"rotate-y":pe()}],"rotate-z":[{"rotate-z":pe()}],scale:[{scale:me()}],"scale-x":[{"scale-x":me()}],"scale-y":[{"scale-y":me()}],"scale-z":[{"scale-z":me()}],"scale-3d":[`scale-3d`],skew:[{skew:he()}],"skew-x":[{"skew-x":he()}],"skew-y":[{"skew-y":he()}],transform:[{transform:[H,V,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],"transform-box":[{transform:[`content`,`border`,`fill`,`stroke`,`view`]}],translate:[{translate:ge()}],"translate-x":[{"translate-x":ge()}],"translate-y":[{"translate-y":ge()}],"translate-z":[{"translate-z":ge()}],"translate-none":[`translate-none`],"translate-3d":[`translate-3d`],zoom:[{zoom:[sg,H,V]}],accent:[{accent:j()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:j()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,H,V]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":j()}],"scrollbar-track-color":[{"scrollbar-track":j()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,H,V]}],fill:[{fill:[`none`,...j()]}],"stroke-w":[{stroke:[B,Dg,yg,xg]}],stroke:[{stroke:[`none`,...j()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`start`,`end`,`right`,`left`],"inset-y":[`inset-bs`,`inset-be`,`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],"place-content":[`align-content`,`justify-content`],"place-items":[`align-items`,`justify-items`],"place-self":[`align-self`,`justify-self`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`ps`,`pe`,`pr`,`pl`],py:[`pbs`,`pbe`,`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`ms`,`me`,`mr`,`ml`],my:[`mbs`,`mbe`,`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],truncate:[`text-overflow`,`overflow`,`overflow-x`,`overflow-y`,`whitespace`],sr:`not-sr.position.size.w.h.p.px.py.ps.pe.pbs.pbe.pt.pr.pb.pl.m.mx.my.ms.me.mbs.mbe.mt.mr.mb.ml.overflow.overflow-x.overflow-y.whitespace`.split(`.`),"not-sr":[`sr`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-s`,`border-w-e`,`border-w-r`,`border-w-l`],"border-w-y":[`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-s`,`border-color-e`,`border-color-r`,`border-color-l`],"border-color-y":[`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-b`],"mask-image-x-from-pos":[`mask-image-r-from-pos`,`mask-image-l-from-pos`],"mask-image-x-to-pos":[`mask-image-r-to-pos`,`mask-image-l-to-pos`],"mask-image-x-from-color":[`mask-image-r-from-color`,`mask-image-l-from-color`],"mask-image-x-to-color":[`mask-image-r-to-color`,`mask-image-l-to-color`],"mask-image-y-from-pos":[`mask-image-t-from-pos`,`mask-image-b-from-pos`],"mask-image-y-to-pos":[`mask-image-t-to-pos`,`mask-image-b-to-pos`],"mask-image-y-from-color":[`mask-image-t-from-color`,`mask-image-b-from-color`],"mask-image-y-to-color":[`mask-image-t-to-color`,`mask-image-b-to-color`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`,`translate-3d`],"translate-x":[`translate-none`],"translate-y":[`translate-none`],"translate-z":[`translate-none`],"translate-3d":[`translate-none`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-ms`,`scroll-me`,`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-ps`,`scroll-pe`,`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pb`],contain:[`contain-size`,`contain-layout`,`contain-paint`,`contain-style`],"contain-size":[`contain`],"contain-layout":[`contain`],"contain-paint":[`contain`],"contain-style":[`contain`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function U(...e){return Kg(hh(e))}function qg(e){return e.split(/\r?\n/).map(e=>e.trim()).filter(Boolean)}function Jg({delayDuration:e=0,...t}){return(0,P.jsx)(nh,{"data-slot":`tooltip-provider`,delayDuration:e,...t})}var Yg=class extends Error{status;statusText;path;constructor({message:e,status:t,statusText:n,path:r}){super(e),this.name=`ApiError`,this.status=t,this.statusText=n,this.path=r}},Xg=class extends Error{retryable;constructor(e,t){super(e),this.name=`EventStreamError`,this.retryable=t}};function Zg(e){return e instanceof Yg}function Qg(e){return e instanceof Xg?!e.retryable:Zg(e)?e.status>=400&&e.status<500&&![408,425,429].includes(e.status):!1}function $g(e){return Zg(e)&&(e.status===401||e.status===403)}function e_(e){return e instanceof Error?e.message:typeof e==`string`?e:`请求失败`}function t_(e,t){return!$g(t)&&e<1}var n_=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),r_=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),i_=e=>{let t=r_(e);return t.charAt(0).toUpperCase()+t.slice(1)},a_=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),o_=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0},s_={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},c_=(0,p.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,p.createElement)(`svg`,{ref:c,...s_,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:a_(`lucide`,i),...!a&&!o_(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,p.createElement)(e,t)),...Array.isArray(a)?a:[a]])),l_=(e,t)=>{let n=(0,p.forwardRef)(({className:n,...r},i)=>(0,p.createElement)(c_,{ref:i,iconNode:t,className:a_(`lucide-${n_(i_(e))}`,`lucide-${e}`,n),...r}));return n.displayName=i_(e),n},u_=l_(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),d_=l_(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),f_=l_(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),p_=l_(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),m_=l_(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),h_=l_(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),g_=l_(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),__=l_(`flask-conical`,[[`path`,{d:`M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2`,key:`18mbvz`}],[`path`,{d:`M6.453 15h11.094`,key:`3shlmq`}],[`path`,{d:`M8.5 2h7`,key:`csnxdl`}]]),v_=l_(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),y_=l_(`link-2`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]),b_=l_(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),x_=l_(`octagon-x`,[[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z`,key:`2d38gg`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),S_=l_(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),C_=l_(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),w_=l_(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),T_=l_(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),E_=l_(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),D_=l_(`unlink`,[[`path`,{d:`m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71`,key:`yqzxt4`}],[`path`,{d:`m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71`,key:`4qinb0`}],[`line`,{x1:`8`,x2:`8`,y1:`2`,y2:`5`,key:`1041cp`}],[`line`,{x1:`2`,x2:`5`,y1:`8`,y2:`8`,key:`14m1p5`}],[`line`,{x1:`16`,x2:`16`,y1:`19`,y2:`22`,key:`rzdirn`}],[`line`,{x1:`19`,x2:`22`,y1:`16`,y2:`16`,key:`ox905f`}]]),O_=l_(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),k_=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,A_=hh,j_=(e,t)=>n=>{if(t?.variants==null)return A_(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=k_(t)||k_(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return A_(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},M_=j_(`inline-flex min-h-9 items-center justify-center gap-2 whitespace-nowrap rounded-[var(--radius-sm)] px-3 text-sm font-medium transition-[background-color,border-color,color,transform,box-shadow] duration-[var(--duration-fast)] ease-[var(--ease-out)] active:scale-[0.98] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--focus)] focus-visible:ring-offset-1 disabled:pointer-events-none disabled:opacity-50`,{variants:{variant:{default:`border border-[var(--border)] bg-[var(--surface)] text-[var(--ink)] shadow-[var(--shadow-xs)] hover:bg-[var(--surface-2)]`,destructive:`bg-[var(--danger)] text-white hover:bg-[var(--danger-strong)] focus-visible:ring-[color-mix(in_srgb,var(--danger)_24%,transparent)]`,outline:`border border-[var(--border)] bg-transparent text-[var(--ink)] hover:bg-[var(--overlay)]`,primary:`bg-[var(--ink)] text-white shadow-[var(--shadow-xs)] hover:bg-[var(--ink-2)]`,secondary:`border border-[var(--border)] bg-[var(--surface)] text-[var(--ink)] shadow-[var(--shadow-xs)] hover:bg-[var(--surface-2)]`,ghost:`text-[var(--muted-strong)] hover:bg-[var(--overlay)] hover:text-[var(--ink)]`,danger:`bg-[var(--danger)] text-white hover:bg-[var(--danger-strong)]`,accent:`bg-[var(--accent)] text-[var(--accent-ink)] hover:bg-[var(--accent-strong)]`,link:`text-[var(--ink)] underline-offset-4 hover:underline`},size:{sm:`min-h-8 px-2.5 text-xs`,md:`min-h-9 px-3 text-sm`,lg:`min-h-10 px-4 text-sm`,icon:`size-9 min-h-0 px-0`}},defaultVariants:{variant:`secondary`,size:`md`}});function N_({className:e,variant:t,size:n,loading:r,children:i,...a}){return(0,P.jsxs)(`button`,{className:U(M_({variant:t,size:n}),e),disabled:r||a.disabled,"aria-busy":r||void 0,...a,children:[r&&(0,P.jsx)(b_,{className:`size-4 shrink-0 animate-spin`,"aria-hidden":!0}),i]})}function P_({label:e,loading:t,children:n,...r}){return(0,P.jsx)(N_,{size:`icon`,"aria-label":e,title:e,disabled:t||r.disabled,"aria-busy":t||void 0,...r,children:t?(0,P.jsx)(b_,{className:`size-4 animate-spin`,"aria-hidden":!0}):n})}function F_(e){return(0,P.jsx)(Su,{"data-slot":`alert-dialog`,...e})}function I_(e){return(0,P.jsx)(Cu,{"data-slot":`alert-dialog-portal`,...e})}function L_({className:e,...t}){return(0,P.jsx)(wu,{"data-slot":`alert-dialog-overlay`,className:U(`dialog-overlay-motion fixed inset-0 z-50 bg-black/42`,e),...t})}function R_({className:e,...t}){return(0,P.jsxs)(I_,{children:[(0,P.jsx)(L_,{}),(0,P.jsx)(`div`,{className:`dialog-positioner`,children:(0,P.jsx)(Du,{"data-slot":`alert-dialog-content`,className:U(`dialog-content-motion pointer-events-auto relative z-50 grid w-full max-w-[calc(100vw-2rem)] gap-5 rounded-[var(--radius)] border border-[var(--border)] bg-[var(--surface)] p-5 shadow-[0_4px_12px_rgba(20,20,24,0.16)] outline-none sm:max-w-md`,e),...t})})]})}function z_({className:e,...t}){return(0,P.jsx)(`div`,{className:U(`grid min-w-0 gap-1.5`,e),...t})}function B_({className:e,...t}){return(0,P.jsx)(`div`,{className:U(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...t})}function V_({className:e,...t}){return(0,P.jsx)(Ou,{className:U(`break-words text-base font-semibold leading-6 text-[var(--ink)]`,e),...t})}function H_({className:e,...t}){return(0,P.jsx)(ku,{className:U(`break-words text-sm leading-6 text-[var(--muted-strong)]`,e),...t})}function U_({className:e,variant:t=`primary`,size:n=`md`,...r}){return(0,P.jsx)(Au,{className:U(M_({variant:t,size:n}),e),...r})}function W_({className:e,variant:t=`secondary`,size:n=`md`,...r}){return(0,P.jsx)(Mu,{className:U(M_({variant:t,size:n}),e),...r})}function G_({error:e}){return e?(0,P.jsx)(`p`,{className:`rounded-[var(--radius-sm)] border border-[var(--danger-border)] bg-[var(--danger-bg)] px-3 py-2 text-xs text-[var(--danger)]`,children:K_(e)}):null}function K_(e){if(e instanceof Error)return e.message;if(typeof e==`string`)return e;try{return JSON.stringify(e)??`请求失败`}catch{return`请求失败`}}var q_=(0,p.createContext)(null);function J_({children:e}){let[t,n]=(0,p.useState)(null),[r,i]=(0,p.useState)(!1),[a,o]=(0,p.useState)(),s=(0,p.useCallback)(e=>{o(void 0),i(!1),n({options:e})},[]),c=()=>{r||(n(null),o(void 0))},l=async()=>{if(t&&!r){i(!0),o(void 0);try{await t.options.action(),n(null)}catch(e){o(e)}finally{i(!1)}}};return(0,P.jsxs)(q_.Provider,{value:s,children:[e,(0,P.jsx)(F_,{open:!!t,onOpenChange:e=>!e&&c(),children:(0,P.jsxs)(R_,{"aria-busy":r,onEscapeKeyDown:e=>r&&e.preventDefault(),children:[(0,P.jsxs)(z_,{children:[(0,P.jsx)(V_,{children:t?.options.title}),(0,P.jsx)(H_,{children:t?.options.description})]}),(0,P.jsx)(G_,{error:a}),(0,P.jsxs)(B_,{children:[(0,P.jsx)(W_,{disabled:r,children:`取消`}),(0,P.jsxs)(U_,{variant:t?.options.destructive?`destructive`:`primary`,disabled:r,onClick:e=>{e.preventDefault(),l()},children:[r?(0,P.jsx)(b_,{className:`size-4 animate-spin`}):null,t?.options.confirmLabel??`确认`]})]})]})})]})}function Y_(){let e=(0,p.useContext)(q_);if(!e)throw Error(`useConfirmation must be used inside ConfirmationProvider`);return e}function X_(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var Z_=e=>{switch(e){case`success`:return e1;case`info`:return n1;case`warning`:return t1;case`error`:return r1;default:return null}},Q_=Array(12).fill(0),$_=({visible:e,className:t})=>p.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},p.createElement(`div`,{className:`sonner-spinner`},Q_.map((e,t)=>p.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),e1=p.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},p.createElement(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,clipRule:`evenodd`})),t1=p.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},p.createElement(`path`,{fillRule:`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,clipRule:`evenodd`})),n1=p.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},p.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,clipRule:`evenodd`})),r1=p.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},p.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})),i1=p.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`},p.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),p.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),a1=()=>{let[e,t]=p.useState(document.hidden);return p.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[]),e},o1=1,s1=100,c1=e=>typeof e?.id==`number`||e?.id?.length>0?e.id:o1++,l1=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),this.getActiveToasts().forEach(t=>e(t)),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e],this.trimHistory()},this.trimHistory=()=>{let e=this.toasts.length-s1;e<=0||(this.toasts=this.toasts.filter(t=>e>0&&this.dismissedToasts.has(t.id)?(this.dismissedToasts.delete(t.id),e--,!1):!0))},this.create=e=>{let{message:t,...n}=e,r=c1(e),i=this.pendingDismissals.get(r);i!==void 0&&(cancelAnimationFrame(i),this.pendingDismissals.delete(r),this.dismissedToasts.delete(r));let a=this.dismissedToasts.has(r),o=e.dismissible===void 0||e.dismissible;return a&&(this.dismissedToasts.delete(r),this.toasts=this.toasts.filter(e=>e.id!==r)),!a&&this.toasts.find(e=>e.id===r)?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:o,title:t}):n):this.addToast({title:t,...n,dismissible:o,id:r}),r},this.dismiss=e=>{if(e==null)return this.getActiveToasts().forEach(e=>{this.dismissedToasts.add(e.id),this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e;this.dismissedToasts.add(e);let t=this.pendingDismissals.get(e);return t!==void 0&&cancelAnimationFrame(t),this.pendingDismissals.set(e,requestAnimationFrame(()=>{this.pendingDismissals.delete(e),this.subscribers.forEach(t=>t({id:e,dismiss:!0}))})),e},this.message=(e,t)=>this.create({...t,message:e,type:void 0}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],p.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(d1(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!p.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!p.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!p.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!p.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=c1(t);return this.create({...t,jsx:e(n),id:n,type:void 0}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}},u1=(e,t)=>l1.message(e,t),d1=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,f1=Object.assign(u1,{success:l1.success,info:l1.info,warning:l1.warning,error:l1.error,custom:l1.custom,message:l1.message,promise:l1.promise,dismiss:l1.dismiss,loading:l1.loading},{getHistory:()=>l1.toasts,getToasts:()=>l1.getActiveToasts()});X_(`[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}`);function p1(e){return e.label!==void 0}var m1=3,h1=`24px`,g1=`16px`,_1=4e3,v1=356,y1=14,b1=45,x1=200;function S1(...e){return e.filter(Boolean).join(` `)}function C1(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var w1=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:a,visibleToasts:o,heights:s,index:c,toasts:l,expanded:u,removeToast:d,defaultRichColors:f,closeButton:m,style:h,cancelButtonStyle:g,actionButtonStyle:_,className:v=``,descriptionClassName:y=``,duration:b,position:x,gap:S,expandByDefault:C,classNames:w,icons:T,closeButtonAriaLabel:E=`Close toast`}=e,[D,O]=p.useState(null),[ee,k]=p.useState(null),[te,ne]=p.useState(!1),[A,re]=p.useState(!1),[ie,j]=p.useState(!1),[M,ae]=p.useState(!1),[oe,se]=p.useState(!1),[ce,N]=p.useState(0),[le,ue]=p.useState(0),de=p.useRef(n.duration||b||_1),fe=p.useRef(null),pe=p.useRef(null),me=c===0,he=c+1<=o,ge=n.type,_e=ge??`default`,ve=n.dismissible!==!1,ye=n.className||``,be=n.descriptionClassName||``,xe=p.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),Se=p.useMemo(()=>n.closeButton??m,[n.closeButton,m]),Ce=p.useMemo(()=>n.duration||b||_1,[n.duration,b]),we=p.useRef(0),Te=p.useRef(0),Ee=p.useRef(0),De=p.useRef(null),[Oe,ke]=x.split(`-`),Ae=p.useMemo(()=>s.reduce((e,t,n)=>n>=xe?e:e+t.height,0),[s,xe]),je=a1(),Me=p.useMemo(()=>e.swipeDirections??C1(x),[e.swipeDirections,x]),Ne=n.invert||t,Pe=ge===`loading`;Te.current=p.useMemo(()=>xe*S+Ae,[xe,Ae]),p.useEffect(()=>{de.current=Ce},[Ce]),p.useEffect(()=>{ne(!0)},[]),p.useEffect(()=>{let e=pe.current;if(e){let t=e.getBoundingClientRect().height;return ue(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),p.useLayoutEffect(()=>{if(!te)return;let e=pe.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,ue(r),a(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[te,n.title,n.description,a,n.id,n.jsx,n.action,n.cancel]);let Fe=p.useCallback(()=>{re(!0),N(Te.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{d(n)},x1)},[n,d,a,Te]);p.useEffect(()=>{if(n.promise&&ge===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return u||i||je?(()=>{if(Ee.current<we.current){let e=new Date().getTime()-we.current;de.current-=e}Ee.current=new Date().getTime()})():de.current!==1/0&&(we.current=new Date().getTime(),e=setTimeout(()=>{n.onAutoClose==null||n.onAutoClose.call(n,n),Fe()},de.current)),()=>clearTimeout(e)},[u,i,n,ge,je,Fe]),p.useEffect(()=>{n.delete&&(Fe(),n.onDismiss==null||n.onDismiss.call(n,n))},[Fe,n.delete]);function Ie(){return T?.loading?p.createElement(`div`,{className:S1(w?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":ge===`loading`},T.loading):p.createElement($_,{className:S1(w?.loader,n?.classNames?.loader),visible:ge===`loading`})}let Le=n.icon||T?.[ge]||Z_(ge);return p.createElement(`li`,{tabIndex:0,ref:pe,className:S1(v,ye,w?.toast,n?.classNames?.toast,w?.[_e],n?.classNames?.[_e]),"data-sonner-toast":``,"data-rich-colors":n.richColors??f,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":te,"data-promise":!!n.promise,"data-swiped":oe,"data-removed":A,"data-visible":he,"data-y-position":Oe,"data-x-position":ke,"data-index":c,"data-front":me,"data-swiping":ie,"data-dismissible":ve,"data-type":ge,"data-invert":Ne,"data-swipe-out":M,"data-swipe-direction":ee,"data-expanded":!!(u||C&&te),"data-testid":n.testId,style:{"--index":c,"--toasts-before":c,"--z-index":l.length-c,"--offset":`${A?ce:Te.current}px`,"--initial-height":C?`auto`:`${le}px`,...h,...n.style},onDragEnd:()=>{j(!1),O(null),De.current=null},onPointerDown:e=>{e.button!==2&&!Pe&&ve&&(fe.current=new Date,N(Te.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(j(!0),De.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{if(M||!ve)return;De.current=null;let e=Number(pe.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(pe.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-fe.current?.getTime(),i=D===`x`?e:t,a=Math.abs(i)/r;if((D===`x`?Me.includes(e>0?`right`:`left`):Me.includes(t>0?`bottom`:`top`))&&(Math.abs(i)>=b1||a>.11))N(Te.current),n.onDismiss==null||n.onDismiss.call(n,n),k(D===`x`?e>0?`right`:`left`:t>0?`down`:`up`),Fe(),ae(!0);else{var o,s;(o=pe.current)==null||o.style.setProperty(`--swipe-amount-x`,`0px`),(s=pe.current)==null||s.style.setProperty(`--swipe-amount-y`,`0px`),se(!1),j(!1),O(null)}},onPointerMove:e=>{var t,n;if(!De.current||!ve||window.getSelection()?.toString().length>0)return;let r=e.clientY-De.current.y,i=e.clientX-De.current.x;!D&&(Math.abs(i)>1||Math.abs(r)>1)&&O(Math.abs(i)>Math.abs(r)?`x`:`y`);let a={x:0,y:0},o=e=>1/(1.5+Math.abs(e)/20);if(D===`y`){if(Me.includes(`top`)||Me.includes(`bottom`)){if(Me.includes(`top`)&&r<0||Me.includes(`bottom`)&&r>0)a.y=r;else{let e=r*o(r);a.y=Math.abs(e)<Math.abs(r)?e:r}}}else if(D===`x`&&(Me.includes(`left`)||Me.includes(`right`))){if(Me.includes(`left`)&&i<0||Me.includes(`right`)&&i>0)a.x=i;else{let e=i*o(i);a.x=Math.abs(e)<Math.abs(i)?e:i}}(Math.abs(a.x)>0||Math.abs(a.y)>0)&&se(!0),(t=pe.current)==null||t.style.setProperty(`--swipe-amount-x`,`${a.x}px`),(n=pe.current)==null||n.style.setProperty(`--swipe-amount-y`,`${a.y}px`)}},Se&&!n.jsx&&ge!==`loading`?p.createElement(`button`,{"aria-label":E,"data-disabled":Pe,"data-close-button":!0,onClick:Pe||!ve?()=>{}:()=>{Fe(),n.onDismiss==null||n.onDismiss.call(n,n)},className:S1(w?.closeButton,n?.classNames?.closeButton)},T?.close??i1):null,(ge||n.icon||n.promise)&&n.icon!==null&&(T?.[ge]!==null||n.icon)?p.createElement(`div`,{"data-icon":``,className:S1(w?.icon,n?.classNames?.icon)},ge===`loading`?n.icon||Ie():n.promise?Ie():null,ge===`loading`?null:Le):null,p.createElement(`div`,{"data-content":``,className:S1(w?.content,n?.classNames?.content)},p.createElement(`div`,{"data-title":``,className:S1(w?.title,n?.classNames?.title)},n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title),n.description?p.createElement(`div`,{"data-description":``,className:S1(y,be,w?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),p.isValidElement(n.cancel)?n.cancel:n.cancel&&p1(n.cancel)?p.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||g,onClick:e=>{p1(n.cancel)&&ve&&(n.cancel.onClick==null||n.cancel.onClick.call(n.cancel,e),Fe())},className:S1(w?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,p.isValidElement(n.action)?n.action:n.action&&p1(n.action)?p.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||_,onClick:e=>{p1(n.action)&&(n.action.onClick==null||n.action.onClick.call(n.action,e),e.defaultPrevented||Fe())},className:S1(w?.actionButton,n?.classNames?.actionButton)},n.action.label):null)};function T1(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function E1(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?g1:h1;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var D1=p.forwardRef(function(e,t){let{id:n,invert:r,position:i=`bottom-right`,hotkey:a=[`altKey`,`KeyT`],expand:o,closeButton:s,className:c,offset:l,mobileOffset:u,theme:d=`light`,richColors:f,duration:m,style:h,visibleToasts:g=m1,toastOptions:_,dir:v=T1(),gap:y=y1,icons:b,customAriaLabel:x,containerAriaLabel:S=`Notifications`}=e,[C,w]=p.useState([]),T=p.useMemo(()=>n?C.filter(e=>e.toasterId===n):C.filter(e=>!e.toasterId),[C,n]),E=p.useMemo(()=>Array.from(new Set([i].concat(T.filter(e=>e.position).map(e=>e.position)))),[T,i]),[D,O]=p.useState([]),[ee,k]=p.useState(!1),[te,ne]=p.useState(!1),[A,re]=p.useState(d===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:d),ie=p.useRef(null),j=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),M=p.useRef(null),ae=p.useRef(!1),oe=p.useCallback(e=>{w(t=>(t.find(t=>t.id===e.id)?.delete||l1.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]);return p.useEffect(()=>l1.subscribe(e=>{e.dismiss?requestAnimationFrame(()=>{w(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))}):setTimeout(()=>{xo.flushSync(()=>{w(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[]),p.useEffect(()=>{if(d!==`system`){re(d);return}if(d===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?re(`dark`):re(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{re(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{re(e?`dark`:`light`)}catch(e){console.error(e)}})}},[d]),p.useEffect(()=>{C.length<=1&&k(!1)},[C]),p.useEffect(()=>{let e=e=>{if(a.length>0&&a.every(t=>e[t]||e.code===t)){var t;k(!0),(t=ie.current)==null||t.focus()}e.code===`Escape`&&(document.activeElement===ie.current||ie.current?.contains(document.activeElement))&&k(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),p.useEffect(()=>{if(ie.current)return()=>{M.current&&(M.current.focus({preventScroll:!0}),M.current=null,ae.current=!1)}},[ie.current]),p.createElement(`section`,{ref:t,"aria-label":x??`${S} ${j}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},E.map((t,n)=>{let[i,a]=t.split(`-`);return T.length?p.createElement(`ol`,{key:t,dir:v===`auto`?T1():v,tabIndex:-1,ref:ie,className:c,"data-sonner-toaster":!0,"data-sonner-theme":A,"data-y-position":i,"data-x-position":a,style:{"--front-toast-height":`${D[0]?.height||0}px`,"--width":`${v1}px`,"--gap":`${y}px`,...h,...E1(l,u)},onBlur:e=>{ae.current&&!e.currentTarget.contains(e.relatedTarget)&&(ae.current=!1,M.current&&=(M.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||ae.current||(ae.current=!0,M.current=e.relatedTarget)},onMouseEnter:()=>k(!0),onMouseMove:()=>k(!0),onMouseLeave:()=>{te||k(!1)},onDragEnd:()=>k(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||ne(!0)},onPointerUp:()=>ne(!1)},T.filter(e=>!e.position&&n===0||e.position===t).map((n,i)=>p.createElement(w1,{key:n.id,icons:b,index:i,toast:n,defaultRichColors:f,duration:_?.duration??m,className:_?.className,descriptionClassName:_?.descriptionClassName,invert:r,visibleToasts:g,closeButton:_?.closeButton??s,interacting:te,position:t,style:_?.style,unstyled:_?.unstyled,classNames:_?.classNames,cancelButtonStyle:_?.cancelButtonStyle,actionButtonStyle:_?.actionButtonStyle,closeButtonAriaLabel:_?.closeButtonAriaLabel,removeToast:oe,toasts:T.filter(e=>e.position==n.position),heights:D.filter(e=>e.position==n.position),setHeights:O,expandByDefault:o,gap:y,expanded:ee,swipeDirections:e.swipeDirections}))):null}))});function O1(e){return(0,P.jsx)(D1,{theme:`light`,position:`top-right`,closeButton:!0,gap:8,visibleToasts:4,duration:4500,className:`toaster group`,icons:{success:(0,P.jsx)(h_,{className:`size-4 text-[var(--success)]`}),info:(0,P.jsx)(v_,{className:`size-4 text-[var(--info)]`}),warning:(0,P.jsx)(E_,{className:`size-4 text-[var(--warning)]`}),error:(0,P.jsx)(x_,{className:`size-4 text-[var(--danger)]`}),loading:(0,P.jsx)(b_,{className:`size-4 animate-spin`})},style:{"--normal-bg":`var(--surface)`,"--normal-text":`var(--ink)`,"--normal-border":`var(--border)`,"--border-radius":`var(--radius-sm)`},toastOptions:{classNames:{toast:`font-sans shadow-[var(--shadow-raised)]`,title:`text-sm font-semibold`,description:`text-xs leading-5 text-[var(--muted-strong)]`}},...e})}var k1=new xa({defaultOptions:{queries:{retry:t_,refetchOnWindowFocus:!1,staleTime:2e4}}});function A1({children:e}){return(0,P.jsx)(wa,{client:k1,children:(0,P.jsxs)(Jg,{delayDuration:300,skipDelayDuration:100,children:[(0,P.jsx)(Za,{children:(0,P.jsx)(J_,{children:e})}),(0,P.jsx)(O1,{})]})})}var j1=Jr({component:oi}),M1=`modulepreload`,N1=function(e){return`/dashboard/`+e},P1={},F1={},I1=function(e){return e.pathname.endsWith(`.css`)},L1=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw delete e[t],n});return e[t]=i,i},R1=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=N1(t,n);let r=s(t),i=I1(r);return L1(P1,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}let t=i?e.styles:e.all,n=i?F1[r.href]:void 0;if(!n&&t.has(r.href))return;let o=document.createElement(`link`);if(o.rel=i?`stylesheet`:M1,i||(o.as=`script`),o.crossOrigin=``,o.href=r.href,a&&o.setAttribute(`nonce`,a),n&&delete F1[r.href],n?.isConnected?n.replaceWith(o):document.head.appendChild(o),i)return new Promise((e,t)=>{let n=i=>{o.removeEventListener(`load`,n),o.removeEventListener(`error`,n),i.type===`error`?(F1[r.href]=o,t(Error(`Unable to preload CSS for ${r}`))):e(i)};o.addEventListener(`load`,n),o.addEventListener(`error`,n)})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},z1=Yr(`/`)({component:Xr(()=>R1(()=>import(`./routes-BnBNI1ke.js`),__vite__mapDeps([0,1,2,3,4,5,6])),`component`)}),B1=()=>R1(()=>import(`./_app-rmP4sHWt.js`),__vite__mapDeps([7,1,8,9,10,11,12,13,6,2]));function V1(e){return{tab:e.tab===`config`||e.tab===`runs`?e.tab:void 0,panel:e.panel===`basic`||e.panel===`identity`||e.panel===`knowledge`||e.panel===`sources`||e.panel===`publishing`?e.panel:void 0,run:typeof e.run==`string`&&e.run?e.run:void 0,runPage:e.runPage===void 0?void 0:Math.max(1,Number(e.runPage)||1),runTab:e.runTab===`main`||e.runTab===`publication`?e.runTab:void 0,destination:typeof e.destination==`string`&&e.destination?e.destination:void 0}}var H1=Yr(`/_app`)({validateSearch:V1,component:Xr(B1,`component`)}),U1=Yr(`/_app/automations`)({validateSearch:e=>({page:Number(e.page??1)||1}),component:Xr(()=>R1(()=>import(`./automations-DMZkw8g6.js`),__vite__mapDeps([14,1,3,12])),`component`)}),W1=(e,t)=>{let n=e.length;for(;e[n-1]===`/`;)n--;return t=t.replace(/^\/+/,``),e.slice(0,n)+`/`+t},G1=/^(?:[/\\][\t\n\r]*){2}/,K1=(e,t)=>{let n=G1.test(e);for(let[n,r]of Object.entries(t)){let t=RegExp(`/:`+n+`(?:{[^/]+})?\\??(?=/|$)`);e=e.replace(t,()=>r?`/${r}`:``)}return!n&&G1.test(e)?e.replace(/^[/\\\t\n\r]+/,`/`):e},q1=e=>{let t=new URLSearchParams;for(let[n,r]of Object.entries(e))if(r!==void 0){if(Array.isArray(r))for(let e of r)e!==void 0&&t.append(n,e);else t.set(n,r)}return t},J1=(e,t)=>{switch(t){case`ws`:return e.replace(/^http/,`ws`);case`http`:return e.replace(/^ws/,`http`)}},Y1=e=>/^https?:\/\/[^\/]+?\/index(?=\?|$)/.test(e)?e.replace(/\/index(?=\?|$)/,`/`):e.replace(/\/index(?=\?|$)/,``);function X1(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}function Z1(e,t){if(!X1(e)&&!X1(t))return t;let n={...e};for(let e in t){let r=t[e];n[e]=X1(n[e])&&X1(r)?Z1(n[e],r):r}return n}var Q1=/^[\w!#$%&'*.^`|~+-]+$/,$1=(e,t,n={})=>{if(!Q1.test(e))throw Error(`Invalid cookie name`);let r=`${e}=${t}`;if(/^__secure-/i.test(e)&&!n.secure)throw Error(`__Secure- Cookie must have Secure attributes`);if(/^__host-/i.test(e)){if(!n.secure)throw Error(`__Host- Cookie must have Secure attributes`);if(n.path!==`/`)throw Error(`__Host- Cookie must have Path attributes with "/"`);if(n.domain)throw Error(`__Host- Cookie must not have Domain attributes`)}for(let e of[`domain`,`path`,`sameSite`,`priority`])if(n[e]&&/[;\r\n]/.test(n[e]))throw Error(`${e} must not contain ";", "\\r", or "\\n"`);if(n&&typeof n.maxAge==`number`&&n.maxAge>=0){if(n.maxAge>3456e4)throw Error(`Cookies Max-Age SHOULD NOT be greater than 400 days (34560000 seconds) in duration.`);r+=`; Max-Age=${n.maxAge|0}`}if(n.domain&&n.prefix!==`host`&&(r+=`; Domain=${n.domain}`),n.path&&(r+=`; Path=${n.path}`),n.expires){if(n.expires.getTime()-Date.now()>3456e7)throw Error(`Cookies Expires SHOULD NOT be greater than 400 days (34560000 seconds) in the future.`);r+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(r+=`; HttpOnly`),n.secure&&(r+=`; Secure`),n.sameSite&&(r+=`; SameSite=${n.sameSite.charAt(0).toUpperCase()+n.sameSite.slice(1)}`),n.priority&&(r+=`; Priority=${n.priority.charAt(0).toUpperCase()+n.priority.slice(1)}`),n.partitioned){if(!n.secure)throw Error(`Partitioned Cookie must have Secure attributes`);r+=`; Partitioned`}return r},e0=(e,t,n)=>(t=encodeURIComponent(t),$1(e,t,n)),t0=(e,t)=>new Proxy(()=>{},{get(n,r){if(typeof r==`string`&&r!==`then`)return t0(e,[...t,r])},apply(n,r,i){return e({path:t,args:i})}}),n0=(e,t)=>{let n=t.toString();return n?`${e}?${n}`:e},r0=class{url;method;buildSearchParams;queryParams=void 0;pathParams={};rBody;cType=void 0;constructor(e,t,n){this.url=e,this.method=t,this.buildSearchParams=n.buildSearchParams}fetch=async(e,t)=>{if(e){if(e.query&&(this.queryParams=this.buildSearchParams(e.query)),e.form){let t=new FormData;for(let[n,r]of Object.entries(e.form))if(r!==void 0){if(Array.isArray(r))for(let e of r)e!==void 0&&t.append(n,e);else t.append(n,r)}this.rBody=t}e.json!==void 0&&(this.rBody=JSON.stringify(e.json),this.cType=`application/json`),e.param&&(this.pathParams=e.param)}let n=this.method.toUpperCase(),r={...e?.header,...typeof t?.headers==`function`?await t.headers():t?.headers};if(e?.cookie){let t=[];for(let[n,r]of Object.entries(e.cookie))r!==void 0&&t.push(e0(n,r));t.length>0&&(r.Cookie=t.join(`; `))}this.cType&&(r[`Content-Type`]=this.cType);let i=new Headers;for(let[e,t]of Object.entries(r))t!==void 0&&i.set(e,t);let a=this.url;a=Y1(a),a=K1(a,this.pathParams),this.queryParams&&(a=n0(a,this.queryParams)),n=this.method.toUpperCase();let o=n!==`GET`&&n!==`HEAD`;return(t?.fetch||fetch)(a,{body:o?this.rBody:void 0,method:n,headers:i,...t?.init})}},i0=(e,t)=>t0(function n(r){let i=t?.buildSearchParams??q1,a=[...r.path],o=a.slice(-3).reverse();if(o[0]===`toString`)return o[1]===`name`?o[2]||``:n.toString();if(o[0]===`valueOf`)return o[1]===`name`?o[2]||``:n;let s=``;if(/^\$/.test(o[0])){let e=a.pop();e&&(s=e.replace(/^\$/,``))}let c=W1(e,a.join(`/`));if(s===`url`||s===`path`){let t=Y1(c);return r.args[0]&&(r.args[0].param&&(t=K1(t,r.args[0].param)),r.args[0].query&&(t=n0(t,i(r.args[0].query)))),s===`url`?new URL(t):t.slice(e.replace(/\/+$/,``).length).replace(/^\/?/,`/`)}if(s===`ws`){let e=Y1(c),n=J1(r.args[0]?.param?K1(e,r.args[0].param):e,`ws`),a=new URL(n),o=r.args[0]?.query;return o&&i(o).forEach((e,t)=>{a.searchParams.append(t,e)}),((...e)=>t?.webSocket!==void 0&&typeof t.webSocket==`function`?t.webSocket(...e):new WebSocket(...e))(a.toString())}let l=new r0(c,s,{buildSearchParams:i});if(s){t??={};let e={...r.args[1]},n=t.headers,i=e.headers;n&&i&&(e.headers=async()=>({...typeof n==`function`?await n():n,...typeof i==`function`?await i():i}));let a=Z1(t,e);return l.fetch(r.args[0],a)}return l},[]);function a0(e,t){let n=Ka.read(),r=new Headers(t?.headers);return n&&!r.has(`Authorization`)&&r.set(`Authorization`,`Bearer ${n}`),globalThis.fetch(e,{...t,headers:r})}var o0=i0(`/`,{fetch:a0});async function s0(e){let t=await e.text();if(!t)return`${e.status} ${e.statusText}`;try{let e=JSON.parse(t),n=e.error??`请求失败`,r=e.issues?.map(e=>[e.path,e.message].filter(Boolean).join(`: `)).filter(Boolean);return r?.length?`${n}:${r.join(`;`)}`:n}catch{return t}}async function c0(e){let t=await e;if(!t.ok)throw new Yg({message:await s0(t),status:t.status,statusText:t.statusText,path:t.url});return await t.json()}async function l0(e,t){let n=await a0(e,{method:`POST`,body:t});if(!n.ok)throw new Yg({message:await s0(n),status:n.status,statusText:n.statusText,path:e});return await n.json()}var u0=(e=1,t=20,n)=>c0(o0.api.connections.$get({query:{page:String(e),pageSize:String(t),...n&&n!==`all`?{category:n}:{}}})),d0=e=>c0(o0.api.connections.$post({json:e})),f0=(e,t)=>c0(o0.api.connections[`:id`].$patch({param:{id:e},json:t})),p0=e=>c0(o0.api.connections[`:id`].$delete({param:{id:e}})),m0=e=>c0(o0.api.connections.test.$post({json:e})),h0=(0,p.createContext)({});function g0(e){let t=(0,p.useRef)(null);return t.current===null&&(t.current=e()),t.current}var _0=typeof window<`u`?p.useLayoutEffect:p.useEffect,v0=(0,p.createContext)(null);function y0(e,t){e.indexOf(t)===-1&&e.push(t)}function b0(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var x0=(e,t,n)=>n>t?t:n<e?e:n,S0={},C0=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),w0=e=>typeof e==`object`&&!!e,T0=e=>/^0[^.\s]+$/u.test(e);function E0(e){let t;return()=>(t===void 0&&(t=e()),t)}var D0=e=>e,O0=(...e)=>e.reduce((e,t)=>n=>t(e(n))),k0=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},A0=class{constructor(){this.subscriptions=[]}add(e){return y0(this.subscriptions,e),()=>b0(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r){if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},j0=e=>e*1e3,M0=e=>e/1e3,N0=(e,t)=>t?1e3/t*e:0,P0=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,F0=1e-7,I0=12;function L0(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=P0(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>F0&&++s<I0);return o}function R0(e,t,n,r){if(e===t&&n===r)return D0;let i=t=>L0(t,0,1,e,n);return e=>e===0||e===1?e:P0(i(e),t,r)}var z0=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,B0=e=>t=>1-e(1-t),V0=R0(.33,1.53,.69,.99),H0=B0(V0),U0=z0(H0),W0=e=>e>=1?1:(e*=2)<1?.5*H0(e):.5*(2-2**(-10*(e-1))),G0=e=>1-Math.sin(Math.acos(e)),K0=B0(G0),q0=z0(G0),J0=R0(.42,0,1,1),Y0=R0(0,0,.58,1),X0=R0(.42,0,.58,1),Z0=e=>Array.isArray(e)&&typeof e[0]!=`number`,Q0=e=>Array.isArray(e)&&typeof e[0]==`number`,$0={linear:D0,easeIn:J0,easeInOut:X0,easeOut:Y0,circIn:G0,circInOut:q0,circOut:K0,backIn:H0,backInOut:U0,backOut:V0,anticipate:W0},ev=e=>typeof e==`string`,tv=e=>{if(Q0(e)){e.length;let[t,n,r,i]=e;return R0(t,n,r,i)}return ev(e)?($0[e],`${e}`,$0[e]):e},nv=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`];function rv(e){let t=new Set,n=new Set,r=!1,i=!1,a=new WeakSet,o={delta:0,timestamp:0,isProcessing:!1};function s(t){a.has(t)&&(c.schedule(t),e()),t(o)}let c={schedule:(e,i=!1,o=!1)=>{let s=o&&r?t:n;return i&&a.add(e),s.add(e),e},cancel:e=>{n.delete(e),a.delete(e)},process:e=>{if(o=e,r){i=!0;return}r=!0;let a=t;t=n,n=a,t.forEach(s),t.clear(),r=!1,i&&(i=!1,c.process(e))}};return c}var iv=40;function av(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=nv.reduce((e,t)=>(e[t]=rv(a),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=S0.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,iv),1)),i.timestamp=o,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:nv.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<nv.length;t++)o[nv[t]].cancel(e)},state:i,steps:o}}var{schedule:ov,cancel:sv,state:cv,steps:lv}=av(typeof requestAnimationFrame<`u`?requestAnimationFrame:D0,!0),uv;function dv(){uv=void 0}var fv={now:()=>(uv===void 0&&fv.set(cv.isProcessing||S0.useManualTiming?cv.timestamp:performance.now()),uv),set:e=>{uv=e,queueMicrotask(dv)}},pv=e=>t=>typeof t==`string`&&t.startsWith(e),mv=pv(`--`),hv=pv(`var(--`),gv=e=>hv(e)?_v.test(e.split(`/*`)[0].trim()):!1,_v=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function vv(e){return typeof e==`string`&&e.split(`/*`)[0].includes(`var(--`)}var yv={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},bv={...yv,transform:e=>x0(0,1,e)},xv={...yv,default:1},Sv=e=>Math.round(e*1e5)/1e5,Cv=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function wv(e){return e==null}var Tv=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ev=(e,t)=>n=>!!(typeof n==`string`&&Tv.test(n)&&n.startsWith(e)||t&&!wv(n)&&Object.prototype.hasOwnProperty.call(n,t)),Dv=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(Cv);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},Ov=e=>x0(0,255,e),kv={...yv,transform:e=>Math.round(Ov(e))},Av={test:Ev(`rgb`,`red`),parse:Dv(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+kv.transform(e)+`, `+kv.transform(t)+`, `+kv.transform(n)+`, `+Sv(bv.transform(r))+`)`};function jv(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var Mv={test:Ev(`#`),parse:jv,transform:Av.transform},Nv=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Pv=Nv(`deg`),Fv=Nv(`%`),W=Nv(`px`),Iv=Nv(`vh`),Lv=Nv(`vw`),Rv={...Fv,parse:e=>Fv.parse(e)/100,transform:e=>Fv.transform(e*100)},zv={test:Ev(`hsl`,`hue`),parse:Dv(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+Fv.transform(Sv(t))+`, `+Fv.transform(Sv(n))+`, `+Sv(bv.transform(r))+`)`},Bv={test:e=>Av.test(e)||Mv.test(e)||zv.test(e),parse:e=>Av.test(e)?Av.parse(e):zv.test(e)?zv.parse(e):Mv.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?Av.transform(e):zv.transform(e),getAnimatableNone:e=>{let t=Bv.parse(e);return t.alpha=0,Bv.transform(t)}},Vv=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Hv(e){return isNaN(e)&&typeof e==`string`&&(e.match(Cv)?.length||0)+(e.match(Vv)?.length||0)>0}var Uv=`number`,Wv=`color`,Gv=`var`,Kv=`var(`,qv="${}",Jv=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Yv(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(Jv,e=>(Bv.test(e)?(r.color.push(a),i.push(Wv),n.push(Bv.parse(e))):e.startsWith(Kv)?(r.var.push(a),i.push(Gv),n.push(e)):(r.number.push(a),i.push(Uv),n.push(parseFloat(e))),++a,qv)).split(qv),indexes:r,types:i}}function Xv(e){return Yv(e).values}function Zv({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];i+=e===Uv?Sv(r[a]):e===Wv?Bv.transform(r[a]):r[a]}return i}}function Qv(e){return Zv(Yv(e))}var $v=e=>typeof e==`number`?0:Bv.test(e)?Bv.getAnimatableNone(e):e,ey=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:$v(e);function ty(e){let t=Yv(e);return Zv(t)(t.values.map((e,n)=>ey(e,t.split[n])))}var ny={test:Hv,parse:Xv,createTransformer:Qv,getAnimatableNone:ty};function ry(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function iy({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=ry(s,r,e+1/3),a=ry(s,r,e),o=ry(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function ay(e,t){return n=>n>0?t:e}var oy=(e,t,n)=>e+(t-e)*n,sy=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},cy=[Mv,Av,zv],ly=e=>cy.find(t=>t.test(e));function uy(e){let t=ly(e);if(`${e}`,!t)return!1;let n=t.parse(e);return t===zv&&(n=iy(n)),n}var dy=(e,t)=>{let n=uy(e),r=uy(t);if(!n||!r)return ay(e,t);let i={...n};return e=>(i.red=sy(n.red,r.red,e),i.green=sy(n.green,r.green,e),i.blue=sy(n.blue,r.blue,e),i.alpha=oy(n.alpha,r.alpha,e),Av.transform(i))},fy=new Set([`none`,`hidden`]);function py(e,t){return fy.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function my(e,t){return n=>oy(e,t,n)}function hy(e){return typeof e==`number`?my:typeof e==`string`?gv(e)?ay:Bv.test(e)?dy:yy:Array.isArray(e)?gy:typeof e==`object`?Bv.test(e)?dy:_y:ay}function gy(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>hy(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function _y(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=hy(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function vy(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]],s=e.values[o]??0;n[i]=s,r[a]++}return n}var yy=(e,t)=>{let n=ny.createTransformer(t),r=Yv(e),i=Yv(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?fy.has(e)&&!i.values.length||fy.has(t)&&!r.values.length?py(e,t):O0(gy(vy(r,i),i.values),n):(`${e}${t}`,ay(e,t))};function by(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?oy(e,t,n):hy(e)(e,t)}var xy=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>ov.update(t,e),stop:()=>sv(t),now:()=>cv.isProcessing?cv.timestamp:fv.now()}},Sy=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},Cy=2e4;function wy(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function Ty(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(wy(r),Cy);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:M0(i)}}var Ey={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Dy(e,t){return e*Math.sqrt(1-t*t)}var Oy=12;function ky(e,t,n){let r=n;for(let n=1;n<Oy;n++)r-=e(r)/t(r);return r}var Ay=.001;function jy({duration:e=Ey.duration,bounce:t=Ey.bounce,velocity:n=Ey.velocity,mass:r=Ey.mass}){let i,a;Ey.maxDuration;let o=1-t;o=x0(Ey.minDamping,Ey.maxDamping,o),e=x0(Ey.minDuration,Ey.maxDuration,M0(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=Dy(t,o),c=Math.exp(-i);return Ay-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=Dy(t**2,o);return(-i(t)+Ay>0?-1:1)*((a-s)*c)/l}):(i=t=>-.001+Math.exp(-t*e)*((t-n)*e+1),a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=ky(i,a,s);if(e=j0(e),isNaN(c))return{stiffness:Ey.stiffness,damping:Ey.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var My=[`duration`,`bounce`],Ny=[`stiffness`,`damping`,`mass`];function Py(e,t){return t.some(t=>e[t]!==void 0)}function Fy(e){let t={velocity:Ey.velocity,stiffness:Ey.stiffness,damping:Ey.damping,mass:Ey.mass,isResolvedFromDuration:!1,...e};if(!Py(e,Ny)&&Py(e,My)){if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*x0(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Ey.mass,stiffness:i,damping:a}}else{let n=jy({...e,velocity:0});t={...t,...n,mass:Ey.mass},t.isResolvedFromDuration=!0}}return t}function Iy(e=Ey.visualDuration,t=Ey.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=Fy({...n,velocity:-M0(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=M0(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?Ey.restSpeed.granular:Ey.restSpeed.default,i||=v?Ey.restDelta.granular:Ey.restDelta.default;let y,b,x,S,C,w;if(h<1)x=Dy(_,h),S=(m+h*_*g)/x,y=e=>{let t=Math.exp(-h*_*e);return o-t*(S*Math.sin(x*e)+g*Math.cos(x*e))},C=h*_*S+g*x,w=h*_*g-S*x,b=e=>Math.exp(-h*_*e)*(C*Math.sin(x*e)+w*Math.cos(x*e));else if(h===1){y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);let e=m+_*g;b=t=>Math.exp(-_*t)*(_*e*t-m)}else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};let t=(m+h*_*g)/e,n=h*_*t-g*e,r=h*_*g-t*e;b=t=>{let i=Math.exp(-h*_*t),a=Math.min(e*t,300);return i*(n*Math.sinh(a)+r*Math.cosh(a))}}let T={calculatedDuration:p&&d||null,velocity:e=>j0(b(e)),next:e=>{if(!p&&h<1){let t=Math.exp(-h*_*e),n=Math.sin(x*e),a=Math.cos(x*e),c=o-t*(S*n+g*a),l=j0(t*(C*n+w*a));return s.done=Math.abs(l)<=r&&Math.abs(o-c)<=i,s.value=s.done?o:c,s}let t=y(e);if(p)s.done=e>=d;else{let n=j0(b(e));s.done=Math.abs(n)<=r&&Math.abs(o-t)<=i}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(wy(T),Cy),t=Sy(t=>T.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return T}Iy.applyToOptions=e=>{let t=Ty(e,100,Iy);return e.ease=t.ease,e.duration=j0(t.duration),e.type=`keyframes`,e};var Ly=5;function Ry(e,t,n){let r=Math.max(t-Ly,0);return N0(n-e(r),t-r)}function zy({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=Iy({keyframes:[f.value,m(f.value)],velocity:Ry(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function By(e,t,n){let r=[],i=n||S0.mix||by,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=O0(Array.isArray(t)?t[n]||D0:t,a)),r.push(a)}return r}function Vy(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(t.length,a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=By(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=k0(e[r],e[r+1],n);return s[r](i)};return n?t=>l(x0(e[0],e[a-1],t)):l}function Hy(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=k0(0,t,r);e.push(oy(n,1,i))}}function Uy(e){let t=[0];return Hy(t,e.length-1),t}function Wy(e,t){return e.map(e=>e*t)}function Gy(e,t){return e.map(()=>t||X0).splice(0,e.length-1)}function Ky({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=Z0(r)?r.map(tv):tv(r),a={done:!1,value:t[0]},o=Vy(Wy(n&&n.length===t.length?n:Uy(t),e),t,{ease:Array.isArray(i)?i:Gy(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var qy=e=>e!==null;function Jy(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(qy),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var Yy={decay:zy,inertia:zy,tween:Ky,keyframes:Ky,spring:Iy};function Xy(e){typeof e.type==`string`&&(e.type=Yy[e.type])}var Zy=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},Qy=e=>e/100,$y=class extends Zy{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==fv.now()&&this.tick(fv.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;Xy(e);let{type:t=Ky,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||Ky;s!==Ky&&typeof o[0]!=`number`&&(this.mixKeyframes=O0(Qy,by(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=wy(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.currentTime=this.holdTime===null?t:this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=x0(0,1,n)*o}let b;_?(this.delayState.value=l[0],b=this.delayState):b=y.next(v),i&&!_&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==zy&&(b.value=Jy(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return M0(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+M0(e)}get time(){return M0(this.currentTime)}set time(e){e=j0(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;return e<=0?this.options.velocity||0:this.generator.velocity?this.generator.velocity(e):Ry(e=>this.generator.next(e).value,e,this.generator.next(e).value)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(fv.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=M0(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=xy,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(fv.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function e2(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var t2=e=>e*180/Math.PI,n2=e=>i2(t2(Math.atan2(e[1],e[0]))),r2={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:n2,rotateZ:n2,skewX:e=>t2(Math.atan(e[1])),skewY:e=>t2(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},i2=e=>(e%=360,e<0&&(e+=360),e),a2=n2,o2=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),s2=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),c2={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:o2,scaleY:s2,scale:e=>(o2(e)+s2(e))/2,rotateX:e=>i2(t2(Math.atan2(e[6],e[5]))),rotateY:e=>i2(t2(Math.atan2(-e[2],e[0]))),rotateZ:a2,rotate:a2,skewX:e=>t2(Math.atan(e[4])),skewY:e=>t2(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function l2(e){return+!!e.includes(`scale`)}function u2(e,t){if(!e||e===`none`)return l2(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=c2,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=r2,i=t}if(!i)return l2(t);let a=r[t],o=i[1].split(`,`).map(f2);return typeof a==`function`?a(o):o[a]}var d2=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return u2(n,t)};function f2(e){return parseFloat(e.trim())}var p2=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],m2=new Set([...p2,`pathRotation`]),h2=e=>e===yv||e===W,g2=new Set([`x`,`y`,`z`]),_2=p2.filter(e=>!g2.has(e));function v2(e){let t=[];return _2.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}var y2={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>u2(t,`x`),y:(e,{transform:t})=>u2(t,`y`)};y2.translateX=y2.x,y2.translateY=y2.y;var b2=new Set,x2=!1,S2=!1,C2=!1;function w2(){if(S2){let e=Array.from(b2).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=v2(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}S2=!1,x2=!1,b2.forEach(e=>e.complete(C2)),b2.clear()}function T2(){b2.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(S2=!0)})}function E2(){C2=!0,T2(),w2(),C2=!1}var D2=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(b2.add(this),x2||(x2=!0,ov.read(T2),ov.resolveKeyframes(w2))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}e2(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),b2.delete(this)}cancel(){this.state===`scheduled`&&(b2.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},O2=e=>e.startsWith(`--`);function k2(e,t,n){O2(t)?e.style.setProperty(t,n):e.style[t]=n}var A2={};function j2(e,t){let n=E0(e);return()=>A2[t]??n()}var M2=j2(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),N2=j2(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),P2=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,F2={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:P2([0,.65,.55,1]),circOut:P2([.55,0,1,.45]),backIn:P2([.31,.01,.66,-.59]),backOut:P2([.33,1.53,.69,.99])};function I2(e,t){if(e)return typeof e==`function`?N2()?Sy(e,t):`ease-out`:Q0(e)?P2(e):Array.isArray(e)?e.map(e=>I2(e,t)||F2.easeOut):F2[e]}function L2(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=I2(s,i);Array.isArray(d)&&(u.easing=d);let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};return l&&(f.pseudoElement=l),e.animate(u,f)}function R2(e){return typeof e==`function`&&`applyToOptions`in e}function z2({type:e,...t}){return R2(e)&&N2()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var B2=class extends Zy{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=z2(e);this.animation=L2(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=Jy(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),k2(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e!==`idle`&&e!==`finished`&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return M0(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+M0(e)}get time(){return M0(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=j0(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&M2()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),D0):r(this)}},V2={anticipate:W0,backInOut:U0,circInOut:q0};function H2(e){return e in V2}function U2(e){typeof e.ease==`string`&&H2(e.ease)&&(e.ease=V2[e.ease])}var W2=10,G2=class extends B2{constructor(e){U2(e),Xy(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new $y({...a,autoplay:!1}),s=Math.max(W2,fv.now()-this.startTime),c=x0(0,W2,s-W2),l=o.sample(s).value,{name:u}=this.options;i&&u&&k2(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},K2=(e,t)=>t!==`zIndex`&&!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(ny.test(e)||e===`0`)&&!e.startsWith(`url(`));function q2(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function J2(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=K2(i,t),s=K2(a,t);return`${t}${i}${a}${o?a:i}`,!o||!s?!1:q2(e)||(n===`spring`||R2(n))&&r}function Y2(e){e.duration=0,e.type=`keyframes`}var X2=new Set([`opacity`,`clipPath`,`filter`,`transform`,`backgroundColor`]),Z2=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Q2(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&Z2.test(e[t]))return!0;return!1}var $2=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),e4=E0(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function t4(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e,c=t?.owner?.current;if(!(c instanceof HTMLElement)&&!(c instanceof SVGElement))return!1;let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return e4()&&n&&(X2.has(n)||$2.has(n)&&Q2(s))&&(n!==`transform`||!u)&&!l&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var n4=40,r4=class extends Zy{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=fv.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u},f=l?.KeyframeResolver||D2;this.keyframeResolver=new f(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=fv.now();let u=!0;J2(e,i,a,o)||(u=!1,(S0.instantAnimations||!s)&&l?.(Jy(e,n,t)),e[0]=e[e.length-1],Y2(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>n4?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!c&&t4(d),p=d.motionValue?.owner?.current,m;if(f)try{m=new G2({...d,element:p})}catch{m=new $y(d)}else m=new $y(d);m.finished.then(()=>{this.notifyFinished()}).catch(D0),this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),E2()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function i4(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var a4=30,o4=e=>!isNaN(parseFloat(e)),s4={current:void 0},c4=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=fv.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=fv.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=o4(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new A0);let n=this.events[e].add(t);return e===`change`?()=>{n(),ov.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return s4.current&&s4.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=fv.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>a4)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,a4);return N0(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function l4(e,t){return new c4(e,t)}function u4(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function d4(e,t){let n=e?.[t]??e?.default??e;return n===e?n:u4(n,e)}var f4={type:`spring`,stiffness:500,damping:25,restSpeed:10},p4=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),m4={type:`keyframes`,duration:.8},h4={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},g4=(e,{keyframes:t})=>t.length>2?m4:m2.has(e)?e.startsWith(`scale`)?p4(t[1]):f4:h4,_4=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function v4(e){for(let t in e)if(!_4.has(t))return!0;return!1}var y4=(e,t,n,r={},i,a)=>o=>{let s=d4(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=j0(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};v4(s)||Object.assign(u,g4(e,u)),u.duration&&=j0(u.duration),u.repeatDelay&&=j0(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Y2(u),u.delay===0&&(d=!0)),(S0.instantAnimations||S0.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,Y2(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=Jy(u.keyframes,s);if(e!==void 0){ov.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new $y(u):new r4(u)},b4=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function x4(e){let t=b4.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function S4(e,t,n=1){`${e}`;let[r,i]=x4(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return C0(e)?parseFloat(e):e}return gv(i)?S4(i,t,n+1):i}function C4(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function w4(e,t,n,r){if(typeof t==`function`){let[i,a]=C4(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=C4(r);t=t(n===void 0?e.custom:n,i,a)}return t}function T4(e,t,n){let r=e.getProps();return w4(r,t,n===void 0?r.custom:n,e)}var E4=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...p2]),D4=e=>Array.isArray(e);function O4(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,l4(n))}function k4(e){return D4(e)?e[e.length-1]||0:e}function A4(e,t){let{transitionEnd:n={},transition:r={},...i}=T4(e,t)||{};i={...i,...n};for(let t in i)O4(e,t,k4(i[t]))}var j4=e=>!!(e&&e.getVelocity);function M4(e){return!!(j4(e)&&e.add)}function N4(e,t){let n=e.getValue(`willChange`);if(M4(n))return n.add(t);if(!n&&S0.WillChange){let n=new S0.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function P4(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var F4=`data-`+P4(`framerAppearId`);function I4(e){return e.props[F4]}function L4({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function R4(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?u4(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState&&e.animationState.getState()[i],p=a?.path;p&&p.animateVisualElement(e,s,a,n,d);for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&L4(f,t))continue;let o={delay:n,...d4(a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){ov.update(()=>r.set(i));continue}let p=!1;if(window.MotionHandoffAnimation){let n=I4(e);if(n){let e=window.MotionHandoffAnimation(n,t,ov);e!==null&&(o.startTime=e,p=!0)}}N4(e,t);let m=l??e.shouldReduceMotion;r.start(y4(t,r,i,m&&E4.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>ov.update(()=>{o&&A4(e,o)});d.length?Promise.all(d).then(t):t()}return d}function z4(e,t,n={}){let r=T4(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(R4(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return B4(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}return Promise.all([a(),o(n.delay)])}function B4(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push(z4(c,t,{...o,delay:n+(typeof r==`function`?0:r)+i4(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function V4(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>z4(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=z4(e,t,n);else{let i=typeof t==`function`?T4(e,t,n.custom):t;r=Promise.all(R4(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var H4={test:e=>e===`auto`,parse:e=>e},U4=e=>t=>t.test(e),W4=[yv,W,Fv,Pv,Lv,Iv,H4],G4=e=>W4.find(U4(e));function K4(e){return typeof e==`number`?e===0:e===null||e===`none`||e===`0`||T0(e)}var q4=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function J4(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(Cv)||[];if(!r)return e;let i=n.replace(r,``),a=+!!q4.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var Y4=/\b([a-z-]*)\(.*?\)/gu,X4={...ny,getAnimatableNone:e=>{let t=e.match(Y4);return t?t.map(J4).join(` `):e}},Z4={...ny,getAnimatableNone:e=>{let t=ny.parse(e);return ny.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},Q4={...yv,transform:Math.round},$4={borderWidth:W,borderTopWidth:W,borderRightWidth:W,borderBottomWidth:W,borderLeftWidth:W,borderRadius:W,borderTopLeftRadius:W,borderTopRightRadius:W,borderBottomRightRadius:W,borderBottomLeftRadius:W,width:W,maxWidth:W,height:W,maxHeight:W,top:W,right:W,bottom:W,left:W,inset:W,insetBlock:W,insetBlockStart:W,insetBlockEnd:W,insetInline:W,insetInlineStart:W,insetInlineEnd:W,padding:W,paddingTop:W,paddingRight:W,paddingBottom:W,paddingLeft:W,paddingBlock:W,paddingBlockStart:W,paddingBlockEnd:W,paddingInline:W,paddingInlineStart:W,paddingInlineEnd:W,margin:W,marginTop:W,marginRight:W,marginBottom:W,marginLeft:W,marginBlock:W,marginBlockStart:W,marginBlockEnd:W,marginInline:W,marginInlineStart:W,marginInlineEnd:W,fontSize:W,backgroundPositionX:W,backgroundPositionY:W,rotate:Pv,pathRotation:Pv,rotateX:Pv,rotateY:Pv,rotateZ:Pv,scale:xv,scaleX:xv,scaleY:xv,scaleZ:xv,skew:Pv,skewX:Pv,skewY:Pv,distance:W,translateX:W,translateY:W,translateZ:W,x:W,y:W,z:W,perspective:W,transformPerspective:W,opacity:bv,originX:Rv,originY:Rv,originZ:W,zIndex:Q4,fillOpacity:bv,strokeOpacity:bv,numOctaves:Q4},e3={...$4,color:Bv,backgroundColor:Bv,outlineColor:Bv,fill:Bv,stroke:Bv,borderColor:Bv,borderTopColor:Bv,borderRightColor:Bv,borderBottomColor:Bv,borderLeftColor:Bv,filter:X4,WebkitFilter:X4,mask:Z4,WebkitMask:Z4},t3=e=>e3[e],n3=new Set([X4,Z4]);function r3(e,t){let n=t3(e);return n3.has(n)||(n=ny),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var i3=new Set([`auto`,`none`,`0`]);function a3(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!i3.has(t)&&Yv(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=r3(n,i)}var o3=class extends D2{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),gv(r))){let i=S4(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!E4.has(n)||e.length!==2)return;let[r,i]=e,a=G4(r),o=G4(i);if(vv(r)!==vv(i)&&y2[n])this.needsMeasurement=!0;else if(a!==o){if(h2(a)&&h2(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else y2[n]&&(this.needsMeasurement=!0)}}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||K4(e[t]))&&n.push(t);n.length&&a3(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=y2[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=y2[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}},s3=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`];function c3(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var l3=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function u3(e){return w0(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}var{schedule:d3,cancel:f3}=av(queueMicrotask,!1),p3={x:!1,y:!1};function m3(){return p3.x||p3.y}function h3(e){return e===`x`||e===`y`?p3[e]?null:(p3[e]=!0,()=>{p3[e]=!1}):p3.x||p3.y?null:(p3.x=p3.y=!0,()=>{p3.x=p3.y=!1})}function g3(e,t){let n=c3(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function _3(e){return!(e.pointerType===`touch`||m3())}function v3(e,t,n={}){let[r,i,a]=g3(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{e.pointerType!==`touch`&&(n?r=!0:s(e))};e.addEventListener(`pointerenter`,n=>{if(!_3(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var y3=(e,t)=>t?e===t||y3(e,t.parentElement):!1,b3=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,x3=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function S3(e){return x3.has(e.tagName)||e.isContentEditable===!0}var C3=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function w3(e){return C3.has(e.tagName)||e.isContentEditable===!0}var T3=new WeakSet;function E3(e){return t=>{t.key===`Enter`&&e(t)}}function D3(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var O3=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=E3(()=>{if(T3.has(n))return;D3(n,`down`);let e=E3(()=>{D3(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>D3(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function k3(e){return b3(e)&&!m3()}var A3=new WeakSet;function j3(e,t,n={}){let[r,i,a]=g3(e,n),o=e=>{let r=e.currentTarget;if(!k3(e)||A3.has(e))return;T3.add(r),n.stopPropagation&&A3.add(e);let a=t(r,e),o={...i,capture:!0},s=(e,t)=>{window.removeEventListener(`pointerup`,c,o),window.removeEventListener(`pointercancel`,l,o),T3.has(r)&&T3.delete(r),k3(e)&&typeof a==`function`&&a(e,{success:t})},c=e=>{s(e,r===window||r===document||n.useGlobalTarget||y3(r,e.target))},l=e=>{s(e,!1)};window.addEventListener(`pointerup`,c,o),window.addEventListener(`pointercancel`,l,o)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),u3(e)&&(e.addEventListener(`focus`,e=>O3(e,i)),!S3(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function M3(e){return w0(e)&&`ownerSVGElement`in e}var N3=new WeakMap,P3,F3=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:M3(r)&&`getBBox`in r?r.getBBox()[t]:r[n],I3=F3(`inline`,`width`,`offsetWidth`),L3=F3(`block`,`height`,`offsetHeight`);function R3({target:e,borderBoxSize:t}){N3.get(e)?.forEach(n=>{n(e,{get width(){return I3(e,t)},get height(){return L3(e,t)}})})}function z3(e){e.forEach(R3)}function B3(){typeof ResizeObserver<`u`&&(P3=new ResizeObserver(z3))}function V3(e,t){P3||B3();let n=c3(e);return n.forEach(e=>{let n=N3.get(e);n||(n=new Set,N3.set(e,n)),n.add(t),P3?.observe(e)}),()=>{n.forEach(e=>{let n=N3.get(e);n?.delete(t),n?.size||P3?.unobserve(e)})}}var H3=new Set,U3;function W3(){U3=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};H3.forEach(t=>t(e))},window.addEventListener(`resize`,U3)}function G3(e){return H3.add(e),U3||W3(),()=>{H3.delete(e),!H3.size&&typeof U3==`function`&&(window.removeEventListener(`resize`,U3),U3=void 0)}}function K3(e,t){return typeof e==`function`?G3(e):V3(e,t)}var q3={value:null,addProjectionMetrics:null};function J3(e){return M3(e)&&e.tagName===`svg`}var Y3=[...W4,Bv,ny],X3=e=>Y3.find(U4(e)),Z3=()=>({translate:0,scale:1,origin:0,originPoint:0}),Q3=()=>({x:Z3(),y:Z3()}),$3=()=>({min:0,max:0}),e6=()=>({x:$3(),y:$3()}),t6=new WeakMap;function n6(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function r6(e){return typeof e==`string`||Array.isArray(e)}var i6=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],a6=[`initial`,...i6];function o6(e){return n6(e.animate)||a6.some(t=>r6(e[t]))}function s6(e){return!!(o6(e)||e.variants)}function c6(e,t,n){for(let r in t){let i=t[r],a=n[r];if(j4(i))e.addValue(r,i);else if(j4(a))e.addValue(r,l4(i,{owner:e}));else if(a!==i){if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,l4(t===void 0?i:t,{owner:e}))}}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var l6={current:null},u6={current:!1},d6=typeof window<`u`;function f6(){if(u6.current=!0,d6){if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>l6.current=e.matches;e.addEventListener(`change`,t),t()}else l6.current=!1}}var p6=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],m6={};function h6(e){m6=e}function g6(){return m6}var _6=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=D2,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=fv.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,ov.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=o6(t),this.isVariantNode=s6(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&j4(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,t6.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(u6.current||f6(),this.shouldReduceMotion=l6.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),sv(this.notifyUpdate),sv(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&X2.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new B2({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:j0(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=m2.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&ov.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in m6){let t=m6[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):e6()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<p6.length;t++){let n=p6[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=c6(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=l4(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(C0(n)||T0(n))?n=parseFloat(n):!X3(n)&&ny.test(t)&&(n=r3(e,t)),this.setBaseTarget(e,j4(n)?n.get():n)),j4(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=w4(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!j4(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new A0),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){d3.render(this.render)}},v6=class extends _6{constructor(){super(...arguments),this.KeyframeResolver=o3}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;j4(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},y6=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function b6({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function x6({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function S6(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function C6(e){return e===void 0||e===1}function w6({scale:e,scaleX:t,scaleY:n}){return!C6(e)||!C6(t)||!C6(n)}function T6(e){return w6(e)||E6(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function E6(e){return D6(e.x)||D6(e.y)}function D6(e){return e&&e!==`0%`}function O6(e,t,n){return n+t*(e-n)}function k6(e,t,n,r,i){return i!==void 0&&(e=O6(e,i,r)),O6(e,n,r)+t}function A6(e,t=0,n=1,r,i){e.min=k6(e.min,t,n,r,i),e.max=k6(e.max,t,n,r,i)}function j6(e,{x:t,y:n}){A6(e.x,t.translate,t.scale,t.originPoint),A6(e.y,n.translate,n.scale,n.originPoint)}var M6=.999999999999,N6=1.0000000000001;function P6(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(F6(e.x,-a.scroll.offset.x),F6(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,j6(e,o)),r&&T6(a.latestValues)&&R6(e,a.latestValues,a.layout?.layoutBox))}t.x<N6&&t.x>M6&&(t.x=1),t.y<N6&&t.y>M6&&(t.y=1)}function F6(e,t){e.min+=t,e.max+=t}function I6(e,t,n,r,i=.5){A6(e,t,n,oy(e.min,e.max,i),r)}function L6(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function R6(e,t,n){let r=n??e;I6(e.x,L6(t.x,r.x),t.scaleX,t.scale,t.originX),I6(e.y,L6(t.y,r.y),t.scaleY,t.scale,t.originY)}function z6(e,t){return b6(S6(e.getBoundingClientRect(),t))}function B6(e,t,n){let r=z6(e,n),{scroll:i}=t;return i&&(F6(r.x,i.offset.x),F6(r.y,i.offset.y)),r}var V6={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},H6=p2.length;function U6(e,t,n){let r=``,i=!0;for(let a=0;a<H6;a++){let o=p2[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===+!!o.startsWith(`scale`);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=l3(s,$4[o]);if(!c){i=!1;let t=V6[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}let a=e.pathRotation;return a&&(i=!1,r+=`rotate(${l3(a,$4.pathRotation)}) `),r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function W6(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(m2.has(e))o=!0;else if(mv(e))i[e]=n;else{let t=l3(n,$4[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=U6(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}function G6(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function K6(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var q6={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`){if(W.test(e))e=parseFloat(e);else return e}return`${K6(e,t.target.x)}% ${K6(e,t.target.y)}%`}},J6={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=ny.parse(e);if(i.length>5)return r;let a=ny.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=oy(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},Y6={borderRadius:{...q6,applyTo:[...s3]},borderTopLeftRadius:q6,borderTopRightRadius:q6,borderBottomLeftRadius:q6,borderBottomRightRadius:q6,boxShadow:J6};function X6(e,{layout:t,layoutId:n}){return m2.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!Y6[e]||e===`opacity`)}function Z6(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(j4(r[t])||i&&j4(i[t])||X6(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function Q6(e){return window.getComputedStyle(e)}var $6=class extends v6{constructor(){super(...arguments),this.type=`html`,this.renderInstance=G6}mount(e){e.style,super.mount(e)}readValueFromInstance(e,t){if(m2.has(t))return this.projection?.isProjecting?l2(t):d2(e,t);{let n=Q6(e),r=(mv(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return z6(e,t)}build(e,t,n){W6(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Z6(e,t,n)}},eb={offset:`stroke-dashoffset`,array:`stroke-dasharray`},tb={offset:`strokeDashoffset`,array:`strokeDasharray`};function nb(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?eb:tb;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var rb=[`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function ib(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(W6(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox);for(let e of rb)d[e]!==void 0&&(f[e]=d[e],delete d[e]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&nb(d,i,a,o,!1)}var ab=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]),ob=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function sb(e,t,n,r){G6(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(ab.has(n)?n:P4(n),t.attrs[n])}function cb(e,t,n){let r=Z6(e,t,n);for(let n in e)if(j4(e[n])||j4(t[n])){let t=p2.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var lb=class extends v6{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=e6}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(m2.has(t)){let e=t3(t);return e&&e.default||0}return t=ab.has(t)?t:P4(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return cb(e,t,n)}build(e,t,n){ib(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){sb(e,t,n,r)}mount(e){this.isSVGTag=ob(e.tagName),super.mount(e)}},ub=a6.length;function db(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&db(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<ub;n++){let r=a6[n],i=e.props[r];(r6(i)||i===!1)&&(t[r]=i)}return t}function fb(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var pb=[...i6].reverse(),mb=i6.length;function hb(e){return t=>Promise.all(t.map(({animation:t,options:n})=>V4(e,t,n)))}function gb(e){let t=hb(e),n=yb(),r=!0,i=!1,a=t=>(n,r)=>{let i=T4(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function o(n){t=n(e)}function s(o){let{props:s}=e,c=db(e.parent)||{},l=[],u=new Set,d={},f=1/0;for(let t=0;t<mb;t++){let p=pb[t],m=n[p],h=s[p]===void 0?c[p]:s[p],g=r6(h),_=p===o?m.isActive:null;_===!1&&(f=t);let v=h===c[p]&&h!==s[p]&&g;if(v&&(r||i)&&e.manuallyAnimateOnMount&&(v=!1),m.protectedKeys={...d},!m.isActive&&_===null||!h&&!m.prevProp||n6(h)||typeof h==`boolean`)continue;if(p===`exit`&&m.isActive&&_!==!0){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}let y=_b(m.prevProp,h),b=y||p===o&&m.isActive&&!v&&g||t>f&&g,x=!1,S=Array.isArray(h)?h:[h],C=S.reduce(a(p),{});_===!1&&(C={});let{prevResolvedValues:w={}}=m,T={...w,...C},E=t=>{b=!0,u.has(t)&&(x=!0,u.delete(t)),m.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in T){let t=C[e],n=w[e];if(d.hasOwnProperty(e))continue;let r=!1;r=D4(t)&&D4(n)?!fb(t,n)||y:t!==n,r?t==null?u.add(e):E(e):t!==void 0&&u.has(e)?E(e):m.protectedKeys[e]=!0}m.prevProp=h,m.prevResolvedValues=C,m.isActive&&(d={...d,...C}),(r||i)&&e.blockInitialAnimation&&(b=!1);let D=v&&y;b&&(!D||x)&&l.push(...S.map(t=>{let n={type:p};if(typeof t==`string`&&(r||i)&&!D&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=T4(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=i4(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if(typeof s.initial!=`boolean`){let n=T4(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),l.push({animation:t})}let p=!!l.length;return r&&(s.initial===!1||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,i=!1,p?t(l):Promise.resolve()}function c(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=s(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:s,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=yb(),i=!0}}}function _b(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!fb(t,e):!1}function vb(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function yb(){return{animate:vb(!0),whileInView:vb(),whileHover:vb(),whileTap:vb(),whileDrag:vb(),whileFocus:vb(),exit:vb()}}function bb(e,t){e.min=t.min,e.max=t.max}function xb(e,t){bb(e.x,t.x),bb(e.y,t.y)}function Sb(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var Cb=.9999,wb=1.0001,Tb=-.01,Eb=.01;function Db(e){return e.max-e.min}function Ob(e,t,n){return Math.abs(e-t)<=n}function kb(e,t,n,r=.5){e.origin=r,e.originPoint=oy(t.min,t.max,e.origin),e.scale=Db(n)/Db(t),e.translate=oy(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Cb&&e.scale<=wb||isNaN(e.scale))&&(e.scale=1),(e.translate>=Tb&&e.translate<=Eb||isNaN(e.translate))&&(e.translate=0)}function Ab(e,t,n,r){kb(e.x,t.x,n.x,r?r.originX:void 0),kb(e.y,t.y,n.y,r?r.originY:void 0)}function jb(e,t,n,r=0){e.min=(r?oy(n.min,n.max,r):n.min)+t.min,e.max=e.min+Db(t)}function Mb(e,t,n,r){jb(e.x,t.x,n.x,r?.x),jb(e.y,t.y,n.y,r?.y)}function Nb(e,t,n,r=0){let i=r?oy(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+Db(t)}function Pb(e,t,n,r){Nb(e.x,t.x,n.x,r?.x),Nb(e.y,t.y,n.y,r?.y)}function Fb(e,t,n,r,i){return e-=t,e=O6(e,1/n,r),i!==void 0&&(e=O6(e,1/i,r)),e}function Ib(e,t=0,n=1,r=.5,i,a=e,o=e){if(Fv.test(t)&&(t=parseFloat(t),t=oy(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=oy(a.min,a.max,r);e===a&&(s-=t),e.min=Fb(e.min,t,n,s,i),e.max=Fb(e.max,t,n,s,i)}function Lb(e,t,[n,r,i],a,o){Ib(e,t[n],t[r],t[i],t.scale,a,o)}var Rb=[`x`,`scaleX`,`originX`],zb=[`y`,`scaleY`,`originY`];function Bb(e,t,n,r){Lb(e.x,t,Rb,n?n.x:void 0,r?r.x:void 0),Lb(e.y,t,zb,n?n.y:void 0,r?r.y:void 0)}function Vb(e){return e.translate===0&&e.scale===1}function Hb(e){return Vb(e.x)&&Vb(e.y)}function Ub(e,t){return e.min===t.min&&e.max===t.max}function Wb(e,t){return Ub(e.x,t.x)&&Ub(e.y,t.y)}function Gb(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Kb(e,t){return Gb(e.x,t.x)&&Gb(e.y,t.y)}function qb(e){return Db(e.x)/Db(e.y)}function Jb(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Yb(e){return[e(`x`),e(`y`)]}function Xb(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,pathRotation:i,rotateX:a,rotateY:o,skewX:s,skewY:c}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotate(${i}deg) `),a&&(r+=`rotateX(${a}deg) `),o&&(r+=`rotateY(${o}deg) `),s&&(r+=`skewX(${s}deg) `),c&&(r+=`skewY(${c}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var Zb=s3.length,Qb=e=>typeof e==`string`?parseFloat(e):e,$b=e=>typeof e==`number`||W.test(e);function e8(e,t,n,r,i,a){i?(e.opacity=oy(0,n.opacity??1,n8(r)),e.opacityExit=oy(t.opacity??1,0,r8(r))):a&&(e.opacity=oy(t.opacity??1,n.opacity??1,r));for(let i=0;i<Zb;i++){let a=s3[i],o=t8(t,a),s=t8(n,a);(o!==void 0||s!==void 0)&&(o||=0,s||=0,o===0||s===0||$b(o)===$b(s)?(e[a]=Math.max(oy(Qb(o),Qb(s),r),0),(Fv.test(s)||Fv.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=oy(t.rotate||0,n.rotate||0,r))}function t8(e,t){return e[t]===void 0?e.borderRadius:e[t]}var n8=i8(0,.5,K0),r8=i8(.5,.95,D0);function i8(e,t,n){return r=>r<e?0:r>t?1:n(k0(e,t,r))}function a8(e,t,n){let r=j4(e)?e:l4(e);return r.start(y4(``,r,t,n)),r.animation}function o8(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var s8=(e,t)=>e.depth-t.depth,c8=class{constructor(){this.children=[],this.isDirty=!1}add(e){y0(this.children,e),this.isDirty=!0}remove(e){b0(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(s8),this.isDirty=!1,this.children.forEach(e)}};function l8(e,t){let n=fv.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(sv(r),e(a-t))};return ov.setup(r,!0),()=>sv(r)}function u8(e){return j4(e)?e.get():e}var d8=class{constructor(){this.members=[]}add(e){y0(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;r&&r.isConnected!==!1||n.snapshot||(b0(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(b0(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}},f8={hasAnimatedSinceResize:!0,hasEverUpdated:!1},p8={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},m8=[``,`X`,`Y`,`Z`],h8=1e3,g8=0;function _8(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function v8(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=I4(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,ov,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&v8(r)}function y8({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=g8++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,q3.value&&(p8.nodes=p8.calculatedTargetDeltas=p8.calculatedProjections=0),this.nodes.forEach(S8),this.nodes.forEach(j8),this.nodes.forEach(M8),this.nodes.forEach(C8),q3.addProjectionMetrics&&q3.addProjectionMetrics(p8)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new c8)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new A0),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=M3(t)&&!J3(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;ov.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=l8(i,250),f8.hasAnimatedSinceResize&&(f8.hasAnimatedSinceResize=!1,this.nodes.forEach(A8)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||z8,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!Kb(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...d4(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l,t.path)}else t||A8(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),sv(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(N8),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&v8(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(E8),this.nodes.forEach(T8);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(D8);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(O8),this.nodes.forEach(k8),this.nodes.forEach(b8),this.nodes.forEach(x8)):this.nodes.forEach(D8),this.clearAllSnapshots();let e=fv.now();cv.delta=x0(0,1e3/60,e-cv.timestamp),cv.timestamp=e,cv.isProcessing=!0,lv.update.process(cv),lv.preRender.process(cv),lv.render.process(cv),cv.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,d3.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(w8),this.sharedNodes.forEach(P8)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ov.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ov.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),this.snapshot&&!Db(this.snapshot.measuredBox.x)&&!Db(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||=e6(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!Hb(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||T6(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),U8(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return e6();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(G8))){let{scroll:e}=this.root;e&&(F6(t.x,e.offset.x),F6(t.y,e.offset.y))}return t}removeElementScroll(e){let t=e6();if(xb(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&xb(t,e),F6(t.x,i.offset.x),F6(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||e6();xb(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(F6(r.x,-n.scroll.offset.x),F6(r.y,-n.scroll.offset.y)),T6(n.latestValues)&&R6(r,n.latestValues,n.layout?.layoutBox)}return T6(this.latestValues)&&R6(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=e6();xb(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!T6(n.latestValues))continue;let r;n.instance&&(w6(n.latestValues)&&n.updateSnapshot(),r=e6(),xb(r,n.measurePageBox())),Bb(t,n.latestValues,n.snapshot?.layoutBox,r)}return T6(this.latestValues)&&Bb(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==cv.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=cv.timestamp;let a=this.getClosestProjectingParent();a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target=e6(),this.targetWithTransforms=e6()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Mb(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):xb(this.target,this.layout.layoutBox),j6(this.target,this.targetDelta)):xb(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),q3.value&&p8.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||w6(this.parent.latestValues)||E6(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=e6(),this.relativeTargetOrigin=e6(),Pb(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),xb(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===cv.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;xb(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;P6(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=e6());let{target:s}=e;s?(!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Sb(this.prevProjectionDelta.x,this.projectionDelta.x),Sb(this.prevProjectionDelta.y,this.projectionDelta.y)),Ab(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.treeScale.x===a&&this.treeScale.y===o&&Jb(this.projectionDelta.x,this.prevProjectionDelta.x)&&Jb(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),q3.value&&p8.calculatedProjections++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Q3(),this.projectionDelta=Q3(),this.projectionDeltaWithTransform=Q3()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=Q3();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=e6(),c=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,d=!(!c||u||this.options.crossfade!==!0||this.path.some(R8));this.animationProgress=0;let f,p=n?.interpolateProjection(e);this.mixTargetDelta=t=>{let n=t/1e3,r=p?.(n);r?(o.x.translate=r.x,o.x.scale=oy(e.x.scale,1,n),o.x.origin=e.x.origin,o.x.originPoint=e.x.originPoint,o.y.translate=r.y,o.y.scale=oy(e.y.scale,1,n),o.y.origin=e.y.origin,o.y.originPoint=e.y.originPoint):(F8(o.x,e.x,n),F8(o.y,e.y,n)),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Pb(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),L8(this.relativeTarget,this.relativeTargetOrigin,s,n),f&&Wb(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=e6(),xb(f,this.relativeTarget)),c&&(this.animationValues=a,e8(a,i,this.latestValues,n,d,u)),r&&r.rotate!==void 0&&(this.animationValues||=a,this.animationValues.pathRotation=r.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(sv(this.pendingAnimation),void 0),this.pendingAnimation=ov.update(()=>{f8.hasAnimatedSinceResize=!0,this.motionValue||=l4(0),this.motionValue.jump(0,!1),this.currentAnimation=a8(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(h8),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&W8(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||e6();let t=Db(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=Db(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}xb(t,n),R6(t,i),Ab(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new d8),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&_8(`z`,e,r,this.animationValues);for(let t=0;t<m8.length;t++)_8(`rotate${m8[t]}`,e,r,this.animationValues),_8(`skew${m8[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=u8(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=u8(t?.pointerEvents)||``),this.hasProjected&&!T6(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=Xb(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,e.opacity=r.animationValues?r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in Y6){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=Y6[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?u8(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(T8),this.root.sharedNodes.clear()}}}function b8(e){e.updateLayout()}function x8(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i===`size`)Yb(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=Db(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;bb(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else W8(i,t.layoutBox,n)&&Yb(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=Db(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=Q3();Ab(o,n,t.layoutBox);let s=Q3();a?Ab(s,e.applyTransform(r,!0),t.measuredBox):Ab(s,n,t.layoutBox);let c=!Hb(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=e.options.layoutAnchor||void 0,s=e6();Pb(s,t.layoutBox,i.layoutBox,o);let c=e6();Pb(c,n,a.layoutBox,o),Kb(s,c)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=c,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function S8(e){q3.value&&p8.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function C8(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function w8(e){e.clearSnapshot()}function T8(e){e.clearMeasurements()}function E8(e){e.isLayoutDirty=!0,e.updateLayout()}function D8(e){e.isLayoutDirty=!1}function O8(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function k8(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function A8(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function j8(e){e.resolveTargetDelta()}function M8(e){e.calcProjection()}function N8(e){e.resetSkewAndRotation()}function P8(e){e.removeLeadSnapshot()}function F8(e,t,n){e.translate=oy(t.translate,0,n),e.scale=oy(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function I8(e,t,n,r){e.min=oy(t.min,n.min,r),e.max=oy(t.max,n.max,r)}function L8(e,t,n,r){I8(e.x,t.x,n.x,r),I8(e.y,t.y,n.y,r)}function R8(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var z8={duration:.45,ease:[.4,0,.1,1]},B8=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),V8=B8(`applewebkit/`)&&!B8(`chrome/`)?Math.round:D0;function H8(e){e.min=V8(e.min),e.max=V8(e.max)}function U8(e){H8(e.x),H8(e.y)}function W8(e,t,n){return e===`position`||e===`preserve-aspect`&&!Ob(qb(t),qb(n),.2)}function G8(e){return e!==e.root&&e.scroll?.wasRoot}var K8=y8({attachResizeListener:(e,t)=>o8(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),q8={current:void 0},J8=y8({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!q8.current){let e=new K8({});e.mount(window),e.setOptions({layoutScroll:!0}),q8.current=e}return q8.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),Y8=(0,p.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function X8(e=!0){let t=(0,p.useContext)(v0);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,p.useId)();(0,p.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,p.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var Z8=(0,p.createContext)({strict:!1}),Q8={animation:[`animate`,`variants`,`whileHover`,`whileTap`,`exit`,`whileInView`,`whileFocus`,`whileDrag`],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},$8=!1;function ex(){if($8)return;let e={};for(let t in Q8)e[t]={isEnabled:e=>Q8[t].some(t=>!!e[t])};h6(e),$8=!0}function tx(){return ex(),g6()}function nx(e){let t=tx();for(let n in e)t[n]={...t[n],...e[n]};h6(t)}var rx=new Set(`animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`));function ix(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||rx.has(e)}var ax=r({default:()=>ox}),ox,sx=n((()=>{throw ox={},Error(`Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?`)})),cx=e=>!ix(e);function lx(e){typeof e==`function`&&(cx=t=>t.startsWith(`on`)?!ix(t):e(t))}try{lx((sx(),t(ax)).default)}catch{}function ux(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||j4(e[i])||(cx(i)||n===!0&&ix(i)||!t&&!ix(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}var dx=(0,p.createContext)({});function fx(e,t){if(o6(e)){let{initial:t,animate:n}=e;return{initial:t===!1||r6(t)?t:void 0,animate:r6(n)?n:void 0}}return e.inherit===!1?{}:t}function px(e){let{initial:t,animate:n}=fx(e,(0,p.useContext)(dx));return(0,p.useMemo)(()=>({initial:t,animate:n}),[mx(t),mx(n)])}function mx(e){return Array.isArray(e)?e.join(` `):e}var hx=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function gx(e,t,n){for(let r in t)!j4(t[r])&&!X6(r,n)&&(e[r]=t[r])}function _x({transformTemplate:e},t){return(0,p.useMemo)(()=>{let n=hx();return W6(n,t,e),Object.assign({},n.vars,n.style)},[t])}function vx(e,t){let n=e.style||{},r={};return gx(r,n,e),Object.assign(r,_x(e,t)),r}function yx(e,t){let n={},r=vx(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var bx=()=>({...hx(),attrs:{}});function xx(e,t,n,r){let i=(0,p.useMemo)(()=>{let n=bx();return ib(n,t,ob(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};gx(t,e.style,e),i.style={...t,...i.style}}return i}var Sx=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function Cx(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(Sx.indexOf(e)>-1||/[A-Z]/u.test(e))}function wx(e,t,n,{latestValues:r},i,a=!1,o){let s=(o??Cx(e)?xx:yx)(t,r,i,e),c=ux(t,typeof e==`string`,a),l=e===p.Fragment?{}:{...c,...s,ref:n},{children:u}=t,d=(0,p.useMemo)(()=>j4(u)?u.get():u,[u]);return(0,p.createElement)(e,{...l,children:d})}function Tx({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Ex(n,r,i,e),renderState:t()}}function Ex(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=u8(a[e]);let{initial:o,animate:s}=e,c=o6(e),l=s6(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!n6(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=w4(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var Dx=e=>(t,n)=>{let r=(0,p.useContext)(dx),i=(0,p.useContext)(v0),a=()=>Tx(e,t,r,i);return n?a():g0(a)},Ox=Dx({scrapeMotionValuesFromProps:Z6,createRenderState:hx}),kx=Dx({scrapeMotionValuesFromProps:cb,createRenderState:bx}),Ax=Symbol.for(`motionComponentSymbol`);function jx(e,t,n){let r=(0,p.useRef)(n);(0,p.useInsertionEffect)(()=>{r.current=n});let i=(0,p.useRef)(null);return(0,p.useCallback)(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());let a=r.current;if(typeof a==`function`){if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n)}else a&&(a.current=n)},[t])}var Mx=(0,p.createContext)({});function Nx(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function Px(e,t,n,r,i,a){let{visualElement:o}=(0,p.useContext)(dx),s=(0,p.useContext)(Z8),c=(0,p.useContext)(v0),l=(0,p.useContext)(Y8),u=l.reducedMotion,d=l.skipAnimations,f=(0,p.useRef)(null),m=(0,p.useRef)(!1);r||=s.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:a}),m.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));let h=f.current,g=(0,p.useContext)(Mx);h&&!h.projection&&i&&(h.type===`html`||h.type===`svg`)&&Fx(f.current,n,i,g);let _=(0,p.useRef)(!1);(0,p.useInsertionEffect)(()=>{h&&_.current&&h.update(n,c)});let v=n[F4],y=(0,p.useRef)(!!v&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return _0(()=>{m.current=!0,h&&(_.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),h.scheduleRenderMicrotask(),y.current&&h.animationState&&h.animationState.animateChanges())}),(0,p.useEffect)(()=>{h&&(!y.current&&h.animationState&&h.animationState.animateChanges(),y.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),!1),h.enteringChildren=void 0)}),h}function Fx(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:Ix(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&Nx(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function Ix(e){if(e)return e.options.allowProjection===!1?Ix(e.parent):e.projection}function Lx(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&nx(r);let a=n?n===`svg`:Cx(e),o=a?kx:Ox;function s(n,s){let c,l={...(0,p.useContext)(Y8),...n,layoutId:Rx(n)},{isStatic:u}=l,d=px(n),f=o(n,u);if(!u&&typeof window<`u`){zx(l,r);let t=Bx(l);c=t.MeasureLayout,d.visualElement=Px(e,f,l,i,t.ProjectionNode,a)}return(0,P.jsxs)(dx.Provider,{value:d,children:[c&&d.visualElement?(0,P.jsx)(c,{visualElement:d.visualElement,...l}):null,wx(e,n,jx(f,d.visualElement,s),f,u,t,a)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,p.forwardRef)(s);return c[Ax]=e,c}function Rx({layoutId:e}){let t=(0,p.useContext)(h0).id;return t&&e!==void 0?t+`-`+e:e}function zx(e,t){(0,p.useContext)(Z8).strict}function Bx(e){let{drag:t,layout:n}=tx();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function Vx(e,t){if(typeof Proxy>`u`)return Lx;let n=new Map,r=(n,r)=>Lx(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,Lx(a,void 0,e,t)),n.get(a))})}var Hx=(e,t)=>t.isSVG??Cx(e)?new lb(t):new $6(t,{allowProjection:e!==p.Fragment}),Ux=class extends y6{constructor(e){super(e),e.animationState||=gb(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();n6(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},Wx=0,Gx={animation:{Feature:Ux},exit:{Feature:class extends y6{constructor(){super(...arguments),this.id=Wx++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&n===!1){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if(typeof e==`string`||typeof e==`object`&&e&&!Array.isArray(e)){let n=T4(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...r}=n;for(let e in r)this.node.getValue(e)?.jump(r[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive(`exit`,!1);this.isExitComplete=!1;return}let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function Kx(e){return{point:{x:e.pageX,y:e.pageY}}}var qx=e=>t=>b3(t)&&e(t,Kx(t));function Jx(e,t,n,r){return o8(e,t,qx(n),r)}var Yx=({current:e})=>e?e.ownerDocument.defaultView:null,Xx=(e,t)=>Math.abs(e-t);function Zx(e,t){let n=Xx(e.x,t.x),r=Xx(e.y,t.y);return Math.sqrt(n**2+r**2)}var Qx=new Set([`auto`,`scroll`]),$x=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=e5(this.lastRawMoveEventInfo,this.transformPagePoint));let e=n5(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=Zx(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=cv;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=e5(t,this.transformPagePoint),ov.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=n5(e.type===`pointercancel`?this.lastMoveEventInfo:e5(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!b3(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=e5(Kx(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=cv;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,n5(s,this.history));let d={passive:!0,capture:!0};this.removeListeners=O0(Jx(this.contextWindow,`pointermove`,this.handlePointerMove,d),Jx(this.contextWindow,`pointerup`,this.handlePointerUp,d),Jx(this.contextWindow,`pointercancel`,this.handlePointerUp,d)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(Qx.has(e.overflowX)||Qx.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.addEventListener(`scroll`,this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};(i.x!==0||i.y!==0)&&(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),ov.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),sv(this.updatePoint)}};function e5(e,t){return t?{point:t(e.point)}:e}function t5(e,t){return{x:e.x-t.x,y:e.y-t.y}}function n5({point:e},t){return{point:e,delta:t5(e,i5(t)),offset:t5(e,r5(t)),velocity:a5(t,.1)}}function r5(e){return e[0]}function i5(e){return e[e.length-1]}function a5(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=i5(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>j0(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>j0(t)*2&&(r=e[1]);let a=M0(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function o5(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?oy(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?oy(n,e,r.max):Math.min(e,n)),e}function s5(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function c5(e,{top:t,left:n,bottom:r,right:i}){return{x:s5(e.x,n,i),y:s5(e.y,t,r)}}function l5(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function u5(e,t){return{x:l5(e.x,t.x),y:l5(e.y,t.y)}}function d5(e,t){let n=.5,r=Db(e),i=Db(t);return i>r?n=k0(t.min,t.max-r,e.min):r>i&&(n=k0(e.min,e.max-i,t.min)),x0(0,1,n)}function f5(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var p5=.35;function m5(e=p5){return e===!1?e=0:e===!0&&(e=p5),{x:h5(e,`left`,`right`),y:h5(e,`top`,`bottom`)}}function h5(e,t,n){return{min:g5(e,t),max:g5(e,n)}}function g5(e,t){return typeof e==`number`?e:e[t]||0}var _5=new WeakMap,v5=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=e6(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t&&this.snapToCursor(Kx(e).point),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=h3(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Yb(e=>{let t=this.getAxisMotionValue(e).get()||0;if(Fv.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=Db(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&ov.update(()=>i(e,t),!1,!0),N4(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;r&&this.currentDirection===null?(this.currentDirection=S5(o),this.currentDirection!==null&&i&&i(this.currentDirection)):(this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&ov.update(()=>a(e,t),!1,!0))},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new $x(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:Yx(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&ov.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!x5(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=o5(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&Nx(e)?this.constraints||=this.resolveRefConstraints():this.constraints=e&&n?c5(n.layoutBox,e):!1,this.elastic=m5(t),r!==this.constraints&&!Nx(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&Yb(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=f5(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Nx(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;r.root&&(r.root.scroll=void 0,r.root.updateScroll());let i=B6(n,r.root,this.visualElement.getTransformPagePoint()),a=u5(r.layout.layoutBox,i);if(t){let e=t(x6(a));this.hasMutatedConstraints=!!e,e&&(a=b6(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=Yb(o=>{if(!x5(o,t,this.currentDirection))return;let c=s&&s[o]||{};(a===!0||a===o)&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return N4(this.visualElement,e),n.start(y4(e,n,0,t,this.visualElement,!1))}stopAnimation(){Yb(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.visualElement.getProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){Yb(t=>{let{drag:n}=this.getProps();if(!x5(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t],o=i.get()||0;i.set(e[t]-oy(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Nx(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};Yb(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=d5({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),Yb(t=>{if(!x5(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(oy(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;_5.set(this.visualElement,this);let e=this.visualElement.current,t=Jx(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&w3(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();Nx(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=b5(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ov.read(r);let o=o8(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Yb(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{o(),t(),a(),s&&s(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=p5,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function y5(e){let t=!0;return()=>{t?t=!1:e()}}function b5(e,t,n){let r=K3(e,y5(n)),i=K3(t,y5(n));return()=>{r(),i()}}function x5(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function S5(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var C5=class extends y6{constructor(e){super(e),this.removeGroupControls=D0,this.removeListeners=D0,this.controls=new v5(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||D0}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},w5=e=>(t,n)=>{e&&ov.update(()=>e(t,n),!1,!0)},T5=class extends y6{constructor(){super(...arguments),this.removePointerDownListener=D0}onPointerDown(e){this.session=new $x(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Yx(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:w5(e),onStart:w5(t),onMove:w5(n),onEnd:(e,t)=>{delete this.session,r&&ov.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=Jx(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},E5=!1,D5=class extends p.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),E5&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),f8.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a&&(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),E5=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||ov.postRender(()=>{let e=a.getStack();e&&e.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),d3.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;E5=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function O5(e){let[t,n]=X8(),r=(0,p.useContext)(h0);return(0,P.jsx)(D5,{...e,layoutGroup:r,switchLayoutGroup:(0,p.useContext)(Mx),isPresent:t,safeToRemove:n})}var k5={pan:{Feature:T5},drag:{Feature:C5,ProjectionNode:J8,MeasureLayout:O5}};function A5(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&ov.postRender(()=>i(t,Kx(t)))}var j5=class extends y6{mount(){let{current:e}=this.node;e&&(this.unmount=v3(e,(e,t)=>(A5(this.node,t,`Start`),e=>A5(this.node,e,`End`))))}unmount(){}},M5=class extends y6{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}e&&this.node.animationState&&(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=O0(o8(this.node.current,`focus`,()=>this.onFocus()),o8(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function N5(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&ov.postRender(()=>i(t,Kx(t)))}var P5=class extends y6{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=j3(e,(e,t)=>(N5(this.node,t,`Start`),(e,{success:t})=>N5(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},F5=new WeakMap,I5=new WeakMap,L5=e=>{let t=F5.get(e.target);t&&t(e)},R5=e=>{e.forEach(L5)};function z5({root:e,...t}){let n=e||document;I5.has(n)||I5.set(n,{});let r=I5.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(R5,{root:e,...t})),r[i]}function B5(e,t,n){let r=z5(t);return F5.set(e,n),r.observe(e),()=>{F5.delete(e),r.unobserve(e)}}var V5={some:0,all:1},H5=class extends y6{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:V5[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=B5(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(U5(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function U5({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var W5={inView:{Feature:H5},tap:{Feature:P5},focus:{Feature:M5},hover:{Feature:j5}},G5={layout:{ProjectionNode:J8,MeasureLayout:O5}},K5=Vx({...Gx,...W5,...k5,...G5},Hx);function q5(){!u6.current&&f6();let[e]=(0,p.useState)(l6.current);return e}var J5=K5;function Y5({className:e,type:t,...n}){return(0,P.jsx)(`input`,{type:t,"data-slot":`input`,className:U(`min-h-10 w-full min-w-0 rounded-[var(--radius-sm)] border border-[var(--border)] bg-[var(--surface)] px-3 py-2 text-base text-[var(--ink)] outline-none transition duration-200 ease-[var(--ease-standard)] selection:bg-[var(--ink)] selection:text-[var(--paper)] file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-[var(--ink)] placeholder:text-[var(--muted)] disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-[var(--surface-2)] disabled:text-[var(--muted)] disabled:opacity-70 md:text-sm`,`focus-visible:border-[var(--ink)] focus-visible:ring-2 focus-visible:ring-[var(--focus)]`,`aria-invalid:border-[var(--danger)] aria-invalid:ring-2 aria-invalid:ring-[color-mix(in_srgb,var(--danger)_18%,transparent)]`,e),...n})}function X5({...e}){return(0,P.jsx)(nm,{"data-slot":`select`,...e})}function Z5({...e}){return(0,P.jsx)(Dm,{"data-slot":`select-group`,...e})}function Q5({...e}){return(0,P.jsx)(om,{"data-slot":`select-value`,...e})}function $5({className:e,size:t=`default`,children:n,...r}){return(0,P.jsxs)(im,{"data-slot":`select-trigger`,"data-size":t,className:U(`flex min-h-10 w-fit items-center justify-between gap-2 rounded-[var(--radius-sm)] border border-[var(--border)] bg-[var(--surface)] px-3 py-2 text-sm text-[var(--ink)] whitespace-nowrap outline-none transition duration-200 ease-[var(--ease-standard)] focus-visible:border-[var(--ink)] focus-visible:ring-2 focus-visible:ring-[var(--focus)] disabled:cursor-not-allowed disabled:bg-[var(--surface-2)] disabled:text-[var(--muted)] disabled:opacity-70 aria-invalid:border-[var(--danger)] aria-invalid:ring-2 aria-invalid:ring-[color-mix(in_srgb,var(--danger)_18%,transparent)] data-[placeholder]:text-[var(--muted)] data-[size=default]:min-h-10 data-[size=sm]:min-h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-[var(--muted)]`,e),...r,children:[n,(0,P.jsx)(sm,{asChild:!0,children:(0,P.jsx)(d_,{className:`size-4 opacity-50`})})]})}function e7({className:e,children:t,position:n=`item-aligned`,align:r=`center`,...i}){return(0,P.jsx)(um,{children:(0,P.jsxs)(fm,{"data-slot":`select-content`,className:U(`dropdown-content-motion relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-[var(--radius-sm)] border border-[var(--border)] bg-[var(--surface)] text-[var(--ink)] shadow-[0_8px_24px_rgba(20,20,24,0.12)]`,n===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,e),position:n,align:r,...i,children:[(0,P.jsx)(n7,{}),(0,P.jsx)(wm,{className:U(`p-1`,n===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1`),children:t}),(0,P.jsx)(r7,{})]})})}function t7({className:e,children:t,...n}){return(0,P.jsxs)(jm,{"data-slot":`select-item`,className:U(`relative flex w-full cursor-default items-center gap-2 rounded-[var(--radius-xs)] py-1.5 pr-8 pl-2 text-sm text-[var(--ink)] outline-hidden select-none focus:bg-[var(--surface-2)] data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-[var(--muted)] *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,e),...n,children:[(0,P.jsx)(`span`,{"data-slot":`select-item-indicator`,className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,P.jsx)(Fm,{children:(0,P.jsx)(u_,{className:`size-4`})})}),(0,P.jsx)(Nm,{children:t})]})}function n7({className:e,...t}){return(0,P.jsx)(Lm,{"data-slot":`select-scroll-up-button`,className:U(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,P.jsx)(m_,{className:`size-4`})})}function r7({className:e,...t}){return(0,P.jsx)(zm,{"data-slot":`select-scroll-down-button`,className:U(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,P.jsx)(d_,{className:`size-4`})})}function i7({className:e,children:t,id:n,name:r,value:i,defaultValue:a,disabled:o,required:s,onBlur:c,onChange:l,autoFocus:u,"aria-label":d,"aria-labelledby":f,"aria-invalid":m,...h}){let g=p.Children.toArray(t).flatMap(e=>!p.isValidElement(e)||e.type!==`option`?[]:[{value:String(e.props.value??``),label:e.props.children,disabled:e.props.disabled}]),_=g.find(e=>e.value===``)?.label,v=g.filter(e=>e.value!==``);return(0,P.jsxs)(nm,{name:r,value:i==null?void 0:String(i),defaultValue:a==null?void 0:String(a),disabled:o,required:s,onValueChange:e=>{l?.({target:{value:e},currentTarget:{value:e}})},children:[(0,P.jsx)($5,{id:n,className:U(`w-full`,e),"aria-label":d,"aria-labelledby":f,"aria-invalid":m,onBlur:e=>c?.(e),autoFocus:u,...a7(h),children:(0,P.jsx)(Q5,{placeholder:_})}),(0,P.jsx)(e7,{position:`popper`,align:`start`,children:(0,P.jsx)(Z5,{children:v.map(e=>(0,P.jsx)(t7,{value:e.value,disabled:e.disabled,children:e.label},e.value))})})]})}function a7(e){return{"aria-describedby":e[`aria-describedby`],"aria-errormessage":e[`aria-errormessage`],title:e.title}}function o7({className:e,...t}){return(0,P.jsx)(`textarea`,{"data-slot":`textarea`,className:U(`flex field-sizing-content min-h-16 w-full rounded-[var(--radius-sm)] border border-[var(--border)] bg-[var(--surface)] px-3 py-2 text-base text-[var(--ink)] outline-none transition duration-200 ease-[var(--ease-standard)] placeholder:text-[var(--muted)] focus-visible:border-[var(--ink)] focus-visible:ring-2 focus-visible:ring-[var(--focus)] disabled:cursor-not-allowed disabled:bg-[var(--surface-2)] disabled:text-[var(--muted)] disabled:opacity-70 aria-invalid:border-[var(--danger)] aria-invalid:ring-2 aria-invalid:ring-[color-mix(in_srgb,var(--danger)_18%,transparent)] md:text-sm`,e),...t})}function s7({...e}){return(0,P.jsx)(R,{"data-slot":`dialog`,...e})}function c7({...e}){return(0,P.jsx)(tu,{"data-slot":`dialog-portal`,...e})}function l7({...e}){return(0,P.jsx)(mu,{"data-slot":`dialog-close`,...e})}function u7({className:e,...t}){return(0,P.jsx)(ru,{"data-slot":`dialog-overlay`,className:U(`dialog-overlay-motion fixed inset-0 z-50 bg-black/42`,e),...t})}function d7({className:e,children:t,showCloseButton:n=!0,...r}){return(0,P.jsxs)(c7,{"data-slot":`dialog-portal`,children:[(0,P.jsx)(u7,{}),(0,P.jsx)(`div`,{className:`dialog-positioner`,children:(0,P.jsxs)(su,{"data-slot":`dialog-content`,className:U(`dialog-content-motion pointer-events-auto relative z-50 grid w-full max-w-[calc(100vw-2rem)] gap-4 rounded-lg border bg-background p-6 shadow-lg outline-none sm:max-w-lg`,e),...r,children:[t,n&&(0,P.jsxs)(mu,{"data-slot":`dialog-close`,className:`absolute right-4 top-3.5 grid size-8 place-items-center rounded-[var(--radius-sm)] text-[var(--muted)] transition-colors hover:bg-[var(--surface-2)] hover:text-[var(--ink)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--focus)] disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:size-4`,children:[(0,P.jsx)(O_,{}),(0,P.jsx)(`span`,{className:`sr-only`,children:`关闭`})]})]})})]})}function f7({className:e,...t}){return(0,P.jsx)(`div`,{"data-slot":`dialog-header`,className:U(`flex flex-col gap-2 text-center sm:text-left`,e),...t})}function p7({className:e,...t}){return(0,P.jsx)(du,{"data-slot":`dialog-title`,className:U(`text-lg leading-none font-semibold`,e),...t})}function m7({className:e,...t}){return(0,P.jsx)(fu,{"data-slot":`dialog-description`,className:U(`text-sm text-muted-foreground`,e),...t})}var h7=(0,p.createContext)(null);function g7(){return(0,p.useContext)(h7)}function _7({children:e,outletClassName:t}){let[n,r]=(0,p.useState)(null),[i,a]=(0,p.useState)([]),o=(0,p.useCallback)(e=>{a(t=>t.includes(e)?t:[...t,e])},[]),s=(0,p.useCallback)(e=>{a(t=>t.filter(t=>t!==e))},[]),c=(0,p.useMemo)(()=>({host:n,layers:i,register:o,unregister:s}),[n,i,o,s]),l=i.length>0;return(0,P.jsxs)(h7.Provider,{value:c,children:[(0,P.jsx)(`div`,{className:U(`sheet-surface-outlet min-h-0 flex-1 overflow-y-auto overscroll-contain`,l&&`sheet-surface-receded`,t),"aria-hidden":l||void 0,children:e}),(0,P.jsx)(`div`,{ref:r,className:`sheet-host-portal`})]})}var v7=240,y7={sm:`rise-sheet-sm`,md:`rise-sheet-md`,lg:`rise-sheet-lg`};function b7(e,t){let[n,r]=(0,p.useState)(e);return(0,p.useEffect)(()=>{if(e){r(!0);return}let n=globalThis.setTimeout(()=>r(!1),t);return()=>globalThis.clearTimeout(n)},[e,t]),{mounted:e||n,closing:!e&&n}}function x7({open:e,onClose:t,title:n,description:r,size:i=`md`,escapeDisabled:a=!1,contentClassName:o,footerRef:s,children:c}){let{mounted:l,closing:u}=b7(e,v7),d=(0,p.useRef)(null),f=g7(),m=(0,p.useId)(),h=f?.layers.includes(m)??!1,g=(0,p.useRef)(0);f&&h&&(g.current=f.layers.indexOf(m));let _=g.current,v=!f||!h||f.layers[f.layers.length-1]===m,y=h&&!v,b=y&&f?f.layers.length-1-_:0,x=f?.register,S=f?.unregister;(0,p.useEffect)(()=>{if(e&&x&&S)return x(m),()=>S(m)},[e,x,S,m]);let C=(0,p.useRef)(t);if(C.current=t,(0,p.useEffect)(()=>{e&&v&&d.current?.focus({preventScroll:!0})},[e,v]),(0,p.useEffect)(()=>{if(!e||!v)return;let t=e=>{e.key===`Escape`&&!a&&(e.preventDefault(),C.current())};return globalThis.addEventListener(`keydown`,t),()=>globalThis.removeEventListener(`keydown`,t)},[e,v,a]),!l||f&&!f.host)return null;let w=(0,P.jsxs)(`div`,{"data-slot":`rise-sheet-layer`,className:U(`rise-sheet-layer`,!f&&`rise-sheet-layer-fixed`,u&&`rise-sheet-closing`),style:{"--layer-index":_,"--sheet-exit":`${v7}ms`},"aria-hidden":y||void 0,...y?{inert:``}:{},children:[(0,P.jsx)(`div`,{className:`rise-sheet-dismiss`,onClick:v?t:void 0,"aria-hidden":!0}),(0,P.jsxs)(`section`,{ref:d,"data-slot":`rise-sheet`,className:U(`rise-sheet-panel`,y7[i],y&&`rise-sheet-behind`),style:{"--sheet-depth":b},role:`dialog`,"aria-modal":`true`,"aria-label":n,tabIndex:-1,children:[(0,P.jsx)(`div`,{className:`rise-sheet-grip`,"aria-hidden":!0}),(0,P.jsxs)(`header`,{className:`flex flex-none items-start justify-between gap-4 border-b border-[var(--border)] bg-[var(--surface)] px-6 py-3.5`,children:[(0,P.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-0.5`,children:[(0,P.jsx)(`h2`,{className:`break-words text-base font-semibold leading-6 tracking-[var(--tracking-heading)] text-[var(--ink)]`,children:n}),r?(0,P.jsx)(`p`,{className:`break-words text-xs leading-5 text-[var(--muted-strong)]`,children:r}):null]}),(0,P.jsx)(`button`,{type:`button`,"aria-label":`关闭面板`,title:`关闭 (Esc)`,onClick:t,className:`grid size-8 shrink-0 place-items-center rounded-[var(--radius-sm)] text-[var(--muted)] transition-[background-color,color,transform] duration-[var(--duration-fast)] ease-[var(--ease-out)] hover:bg-[var(--overlay)] hover:text-[var(--ink)] active:scale-95 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--focus)]`,children:(0,P.jsx)(O_,{className:`size-4`})})]}),(0,P.jsx)(`div`,{"data-slot":`app-dialog-content`,className:U(`scrollbar-stable min-h-0 flex-1 overflow-y-auto overscroll-contain bg-[var(--surface)] px-6 py-5`,o),children:c}),(0,P.jsx)(`div`,{"data-slot":`app-dialog-footer-root`,ref:s})]})]});return f?.host?(0,xo.createPortal)(w,f.host):typeof document<`u`?(0,xo.createPortal)(w,document.body):w}var S7=(0,p.createContext)(null);function C7({open:e,onOpenChange:t,title:n,description:r,size:i=`default`,variant:a=`sheet`,children:o,contentClassName:s}){let[c,l]=(0,p.useState)(null);return a===`sheet`?(0,P.jsx)(x7,{open:e,onClose:()=>t(!1),title:n,description:r,size:i===`wide`?`lg`:i===`medium`?`md`:`sm`,contentClassName:s,footerRef:l,children:(0,P.jsx)(S7.Provider,{value:c,children:o})}):(0,P.jsx)(s7,{open:e,onOpenChange:t,children:(0,P.jsx)(d7,{className:U(`grid max-h-[min(800px,calc(100dvh-24px))] grid-rows-[auto_minmax(0,1fr)_auto] gap-0 overflow-hidden rounded-[var(--radius)] border-[var(--border)] bg-[var(--surface)] p-0 shadow-[0_12px_32px_rgba(17,24,39,0.14)]`,i===`wide`?`sm:max-w-[min(1080px,calc(100vw-32px))]`:i===`medium`?`sm:max-w-[min(800px,calc(100vw-32px))]`:`sm:max-w-xl`),children:(0,P.jsxs)(S7.Provider,{value:c,children:[(0,P.jsxs)(f7,{className:`grid min-w-0 gap-1 border-b border-[var(--border)] bg-[var(--surface)] px-5 py-3.5 pr-14 text-left`,children:[(0,P.jsx)(p7,{className:`min-w-0 break-words text-base font-semibold leading-6 tracking-[var(--tracking-heading)] text-[var(--ink)]`,children:n}),r?(0,P.jsx)(m7,{className:`min-w-0 break-words text-xs leading-5 text-[var(--muted-strong)]`,children:r}):null]}),(0,P.jsx)(`div`,{"data-slot":`app-dialog-content`,className:U(`scrollbar-stable min-h-0 overflow-y-auto overscroll-contain bg-[var(--surface)] p-5`,s),children:o}),(0,P.jsx)(`div`,{"data-slot":`app-dialog-footer-root`,ref:l})]})})})}function w7({className:e,...t}){let n=(0,p.useContext)(S7);return n?(0,xo.createPortal)((0,P.jsx)(`div`,{"data-slot":`app-dialog-footer`,className:U(`border-t border-[var(--border)] bg-[var(--surface)] px-6 py-3 [&_button]:min-h-8 [&_button]:px-3 [&_button]:text-xs`,e),...t}),n):null}var T7=()=>[`becomeopc`,`status`],E7=()=>c0(o0.api.becomeopc.status.$get()),D7=()=>c0(o0.api.becomeopc.sync.$post()),O7=()=>c0(o0.api.becomeopc.connection.$delete()),k7=()=>c0(o0.api.becomeopc.oauth.start.$post()),A7=e=>c0(o0.api.becomeopc.oauth.status.$get({query:{state:e}}));function j7(){return Ra({queryKey:T7(),queryFn:E7,staleTime:3e4,retry:!1})}function M7(e){if(!e)return`TrendPublish 托管订阅`;let t=e.toLowerCase();return t.includes(`bundle`)?t.includes(`year`)||t.includes(`annual`)?`全家桶年付`:t.includes(`month`)?`全家桶月付`:`全家桶订阅`:t.includes(`year`)||t.includes(`annual`)?`年付订阅`:t.includes(`month`)?`月付订阅`:t.includes(`trial`)?`试用版`:t.includes(`pro`)?`Pro 订阅`:e}function N7(e,t=Date.now()){if(!e)return!1;if(e.status===`trialing`)return!0;if(!e.trialEnd)return!1;let n=Date.parse(e.trialEnd);return Number.isFinite(n)&&n>t}function P7(e,t=Date.now()){if(!e||!e.connected)return{label:`未连接`,tone:`neutral`};if(e.expired)return{label:`已过期`,tone:`danger`};if(N7(e,t))return{label:`试用中`,tone:`info`};switch(e.status){case`active`:return{label:`已订阅`,tone:`success`};case`canceling`:return{label:`到期后取消`,tone:`warning`};case`past_due`:return{label:`待续费`,tone:`warning`};default:return e.entitled?{label:`已连接`,tone:`success`}:{label:`未生效`,tone:`warning`}}}function F7(e){if(!e)return`—`;let t=Date.parse(e);return Number.isFinite(t)?new Intl.DateTimeFormat(`zh-CN`,{year:`numeric`,month:`2-digit`,day:`2-digit`}).format(new Date(t)):e}var I7=j_(`inline-flex min-h-5 max-w-full items-center gap-1 rounded-[6px] border px-1.5 text-[11px] font-medium`,{variants:{tone:{neutral:`border-[var(--border)] bg-[var(--surface-2)] text-[var(--muted-strong)]`,success:`border-[var(--success-border)] bg-[var(--success-bg)] text-[var(--success)]`,warning:`border-[var(--warning-border)] bg-[var(--warning-bg)] text-[var(--warning)]`,danger:`border-[var(--danger-border)] bg-[var(--danger-bg)] text-[var(--danger)]`,info:`border-[var(--info-border)] bg-[var(--info-bg)] text-[var(--info)]`,accent:`border-[var(--accent-border)] bg-[var(--accent-bg)] text-[var(--accent)]`}},defaultVariants:{tone:`neutral`}});function L7({tone:e,className:t,children:n,title:r}){return(0,P.jsx)(`span`,{title:r,className:U(I7({tone:e}),t),children:n})}var R7={success(e,t){f1.success(e,{description:t})},error(e,t){f1.error(e,{description:e_(t)})},info(e,t){f1.info(e,{description:t})}},z7=1200;function B7(){let e=Ca(),{data:t,isLoading:n}=j7(),[r,i]=(0,p.useState)(null),[a,o]=(0,p.useState)(null),[s,c]=(0,p.useState)(!1),l=(0,p.useRef)(null),u=()=>{l.current&&=(clearInterval(l.current),null),i(null)};(0,p.useEffect)(()=>u,[]),(0,p.useEffect)(()=>{if(!r)return;let t=async()=>{try{let t=await A7(r);if(t.status===`pending`)return;if(u(),t.status===`completed`){o(null),await e.invalidateQueries({queryKey:T7()}),await e.invalidateQueries({queryKey:[`connections`]}),R7.success(t.synced?`已连接 BecomeOPC,并同步 ${t.synced} 个微信 Relay 连接`:`已连接 BecomeOPC 订阅`);return}if(t.status===`not_entitled`){o(t.error??`当前 BecomeOPC 账户尚未订阅 TrendPublish,请先前往订阅或开始试用。`),R7.info(`已登录 BecomeOPC,当前账户尚未订阅 TrendPublish`);return}R7.error(`连接 BecomeOPC 失败`,t.error??`登录会话已结束`)}catch(e){u(),R7.error(`检查 BecomeOPC 登录状态失败`,e)}};return l.current=setInterval(()=>void t(),z7),()=>{l.current&&=(clearInterval(l.current),null)}},[r,e]);let d=za({mutationFn:k7,onSuccess:({state:e,authorizeUrl:t})=>{o(null),i(e),window.open(t,`_blank`,`noopener,noreferrer`)?R7.info(`已打开 BecomeOPC 授权页面,完成登录后将自动同步`):R7.info(`浏览器拦截了弹窗,请允许新窗口或手动打开授权页`)},onError:e=>R7.error(`发起 BecomeOPC 连接失败`,e)}),f=za({mutationFn:D7,onSuccess:async t=>{o(null),await e.invalidateQueries({queryKey:T7()}),R7.success(t.synced?`订阅状态已刷新,并同步 ${t.synced} 个微信 Relay 连接`:`BecomeOPC 订阅状态已刷新`)},onError:e=>R7.error(`刷新 BecomeOPC 订阅失败`,e)}),m=za({mutationFn:O7,onSuccess:async()=>{c(!1),o(null),await e.invalidateQueries({queryKey:T7()}),R7.success(`已断开本地 BecomeOPC 订阅凭证`)},onError:e=>R7.error(`断开 BecomeOPC 连接失败`,e)}),h=P7(t),g=t?.urls.subscribe??`https://becomeopc.com/trendpublish/zh#pricing`,_=t?.urls.manage??`https://becomeopc.com/account?product=trendpublish&lang=zh`,v=!!r,y=N7(t),b=(y?t?.trialEnd:null)??t?.periodEnd??t?.expiresAt??null;return(0,P.jsxs)(`section`,{"aria-label":`BecomeOPC 订阅与托管 Relay`,className:`grid gap-3.5 rounded-[var(--radius-md)] border border-[var(--border)] bg-[var(--surface)] p-4 sm:p-5`,children:[(0,P.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,P.jsxs)(`div`,{className:`flex min-w-0 items-start gap-3`,children:[(0,P.jsx)(`div`,{className:`flex size-9 shrink-0 items-center justify-center rounded-[var(--radius-sm)] border border-[var(--accent-border)] bg-[var(--accent-bg)] text-[var(--accent)]`,children:(0,P.jsx)(T_,{className:`size-4`,"aria-hidden":!0})}),(0,P.jsxs)(`div`,{className:`min-w-0`,children:[(0,P.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,P.jsx)(`h2`,{className:`text-sm font-semibold text-[var(--ink)]`,children:`BecomeOPC 订阅 · 托管微信 Relay`}),(0,P.jsx)(L7,{tone:h.tone,children:n?`检查中…`:h.label})]}),(0,P.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-[var(--muted-strong)]`,children:`无需自备国内固定 IP 服务器,订阅后自动同步微信公众号托管 Relay 凭证并每 6 小时自动续期。`})]})]}),(0,P.jsx)(`div`,{className:`flex flex-wrap items-center gap-2`,children:t?.connected?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`a`,{href:t.expired?g:_,target:`_blank`,rel:`noopener noreferrer`,className:U(M_({variant:t.expired?`primary`:`secondary`,size:`sm`})),children:[t.expired?`前往 BecomeOPC 续费`:`管理订阅`,(0,P.jsx)(g_,{className:`size-3.5`,"aria-hidden":!0})]}),(0,P.jsxs)(N_,{type:`button`,size:`sm`,variant:`secondary`,loading:f.isPending,onClick:()=>f.mutate(),children:[!f.isPending&&(0,P.jsx)(C_,{className:`size-3.5`,"aria-hidden":!0}),`刷新同步`]}),t.expired&&t.canBrowserLogin?(0,P.jsxs)(N_,{type:`button`,size:`sm`,variant:`secondary`,loading:d.isPending||v,onClick:()=>d.mutate(),children:[!d.isPending&&!v&&(0,P.jsx)(y_,{className:`size-3.5`,"aria-hidden":!0}),v?`等待授权…`:`重新连接`]}):null,s?(0,P.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,P.jsx)(N_,{type:`button`,size:`sm`,variant:`danger`,loading:m.isPending,onClick:()=>m.mutate(),children:`确认断开`}),(0,P.jsx)(N_,{type:`button`,size:`sm`,variant:`ghost`,disabled:m.isPending,onClick:()=>c(!1),children:`取消`})]}):(0,P.jsxs)(N_,{type:`button`,size:`sm`,variant:`ghost`,onClick:()=>c(!0),children:[(0,P.jsx)(D_,{className:`size-3.5`,"aria-hidden":!0}),`断开`]})]}):(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`a`,{href:g,target:`_blank`,rel:`noopener noreferrer`,className:U(M_({variant:`primary`,size:`sm`})),children:[`前往 BecomeOPC 订阅`,(0,P.jsx)(g_,{className:`size-3.5`,"aria-hidden":!0})]}),t?.canBrowserLogin?v?(0,P.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,P.jsx)(N_,{type:`button`,size:`sm`,variant:`secondary`,loading:!0,children:`等待浏览器授权…`}),(0,P.jsx)(N_,{type:`button`,size:`sm`,variant:`ghost`,onClick:u,children:`取消`})]}):(0,P.jsxs)(N_,{type:`button`,size:`sm`,variant:`secondary`,loading:d.isPending,onClick:()=>d.mutate(),children:[!d.isPending&&(0,P.jsx)(y_,{className:`size-3.5`,"aria-hidden":!0}),`连接 BecomeOPC 账号`]}):(0,P.jsx)(`span`,{className:`rounded-[var(--radius-sm)] border border-[var(--border)] bg-[var(--surface-2)] px-2.5 py-1.5 font-mono text-[11px] text-[var(--muted-strong)]`,children:`CLI 执行 trendpublish login 绑定`})]})})]}),t?.connected?(0,P.jsxs)(`div`,{className:`grid gap-2.5 sm:grid-cols-3`,children:[(0,P.jsxs)(`div`,{className:`rounded-[var(--radius-sm)] border border-[var(--border)] bg-[var(--surface-2)] px-3 py-2`,children:[(0,P.jsx)(`div`,{className:`text-[11px] text-[var(--muted)]`,children:`当前套餐`}),(0,P.jsx)(`div`,{className:`mt-0.5 text-sm font-medium text-[var(--ink)]`,children:M7(t.plan)})]}),(0,P.jsxs)(`div`,{className:`rounded-[var(--radius-sm)] border border-[var(--border)] bg-[var(--surface-2)] px-3 py-2`,children:[(0,P.jsx)(`div`,{className:`text-[11px] text-[var(--muted)]`,children:y?`试用到期`:t.periodEnd?`当前周期截止`:`本地凭证有效至`}),(0,P.jsx)(`div`,{className:`mt-0.5 text-sm font-medium tabular-nums text-[var(--ink)]`,children:F7(b)})]}),(0,P.jsxs)(`div`,{className:`rounded-[var(--radius-sm)] border border-[var(--border)] bg-[var(--surface-2)] px-3 py-2`,children:[(0,P.jsx)(`div`,{className:`text-[11px] text-[var(--muted)]`,children:`托管 Relay 地址`}),(0,P.jsxs)(`div`,{className:`mt-0.5 flex items-center justify-between gap-2 text-xs font-medium text-[var(--ink)]`,children:[(0,P.jsx)(`span`,{className:`truncate font-mono`,children:t.managedRelayUrl}),(0,P.jsxs)(`span`,{className:`shrink-0 text-[11px] tabular-nums text-[var(--muted)]`,children:[`已同步 `,t.syncedRelayCount,` 个`]})]})]})]}):null,a?(0,P.jsxs)(`div`,{role:`status`,className:`flex flex-wrap items-center justify-between gap-3 rounded-[var(--radius-sm)] border border-[var(--warning-border)] bg-[var(--warning-bg)] px-3.5 py-2.5`,children:[(0,P.jsxs)(`div`,{className:`flex min-w-0 items-start gap-2.5 text-xs leading-5 text-[var(--ink)]`,children:[(0,P.jsx)(E_,{className:`mt-0.5 size-4 shrink-0 text-[var(--warning)]`,"aria-hidden":!0}),(0,P.jsx)(`span`,{children:a})]}),(0,P.jsxs)(`a`,{href:g,target:`_blank`,rel:`noopener noreferrer`,className:U(M_({variant:`secondary`,size:`sm`})),children:[`去购买 / 开始试用`,(0,P.jsx)(g_,{className:`size-3.5`,"aria-hidden":!0})]})]}):null]})}function V7({className:e,...t}){return(0,P.jsx)(`div`,{"data-slot":`field`,className:U(`grid gap-2 text-sm`,e),...t})}function H7({className:e,...t}){return(0,P.jsx)(`label`,{"data-slot":`field-label`,className:U(`text-xs font-semibold uppercase text-[var(--muted)]`,e),...t})}function U7({className:e,...t}){return(0,P.jsx)(`p`,{"data-slot":`field-description`,className:U(`text-xs leading-5 text-[var(--muted-strong)]`,e),...t})}function W7({className:e,...t}){return(0,P.jsx)(`p`,{"data-slot":`field-error`,className:U(`text-xs leading-5 text-[var(--danger)]`,e),...t})}function G7({label:e,children:t,htmlFor:n,required:r,helper:i,error:a,className:o}){return(0,P.jsxs)(V7,{className:U(`gap-1.5`,o),children:[(0,P.jsxs)(H7,{htmlFor:n,className:`flex items-center gap-1`,children:[e,r?(0,P.jsx)(`span`,{"aria-hidden":`true`,className:`text-[var(--danger)]`,children:`*`}):null]}),t,i||a?(0,P.jsx)(`div`,{className:`min-h-5`,"aria-live":`polite`,children:a?(0,P.jsx)(W7,{children:a}):i?(0,P.jsx)(U7,{children:i}):null}):null]})}function K7({className:e,...t}){return(0,P.jsx)(`div`,{"data-slot":`empty`,className:U(`flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded-lg border-dashed p-6 text-center text-balance md:p-12`,e),...t})}function q7({className:e,...t}){return(0,P.jsx)(`div`,{"data-slot":`empty-header`,className:U(`flex max-w-sm flex-col items-center gap-2 text-center`,e),...t})}function J7({className:e,...t}){return(0,P.jsx)(`div`,{"data-slot":`empty-title`,className:U(`text-lg font-medium tracking-tight`,e),...t})}function Y7({className:e,...t}){return(0,P.jsx)(`div`,{"data-slot":`empty-description`,className:U(`text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary`,e),...t})}function X7({className:e,...t}){return(0,P.jsx)(`div`,{"data-slot":`empty-content`,className:U(`flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance`,e),...t})}function Z7({title:e=`暂无数据`,description:t,action:n,className:r}){return(0,P.jsxs)(K7,{className:U(`min-h-36 bg-[var(--surface)] px-5 py-8`,r),children:[(0,P.jsxs)(q7,{children:[(0,P.jsx)(J7,{className:`text-sm font-semibold text-[var(--ink)]`,children:e}),t?(0,P.jsx)(Y7,{className:`max-w-md text-sm leading-6 text-[var(--muted-strong)]`,children:t}):null]}),n?(0,P.jsx)(X7,{children:n}):null]})}function Q7({title:e,description:t,action:n,toolbar:r,compact:i,summary:a,children:o,className:s}){return(0,P.jsxs)(`section`,{"aria-label":e,className:U(`min-w-0 overflow-hidden rounded-[var(--radius)] border border-[var(--border)] bg-[var(--surface)]`,s),children:[(0,P.jsxs)(`div`,{className:`grid gap-3 border-b border-[var(--border)] px-4 py-3.5 lg:grid-cols-[minmax(0,1fr)_auto] lg:items-center sm:px-5`,children:[i?(0,P.jsxs)(`div`,{className:`min-w-0`,children:[(0,P.jsx)(`h2`,{className:`sr-only`,children:e}),(0,P.jsx)(`p`,{className:`sr-only`,children:t}),(0,P.jsx)(`p`,{className:`text-xs font-medium text-[var(--muted-strong)]`,children:a??e})]}):(0,P.jsxs)(`div`,{className:`min-w-0`,children:[(0,P.jsx)(`h2`,{className:`text-sm font-semibold text-[var(--ink)]`,children:e}),(0,P.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-[var(--muted-strong)]`,children:t})]}),(r||n)&&(0,P.jsxs)(`div`,{className:`flex min-w-0 flex-wrap gap-2 lg:justify-end`,children:[r,n]})]}),(0,P.jsx)(`div`,{className:`divide-y divide-[var(--border)]`,children:o})]})}function $7(e){return(0,P.jsx)(Cp,{"data-slot":`popover`,...e})}function e9(e){return(0,P.jsx)(Tp,{"data-slot":`popover-trigger`,...e})}function t9({className:e,align:t=`center`,sideOffset:n=6,...r}){return(0,P.jsx)(kp,{children:(0,P.jsx)(jp,{"data-slot":`popover-content`,align:t,sideOffset:n,className:U(`dropdown-content-motion z-50 w-72 origin-[var(--radix-popover-content-transform-origin)] rounded-[var(--radius-sm)] border border-[var(--border)] bg-[var(--surface)] p-3 text-[var(--ink)] shadow-[var(--shadow-raised)] outline-none`,e),...r})})}function n9({name:e,description:t,onConfirm:n}){let[r,i]=(0,p.useState)(!1),[a,o]=(0,p.useState)(!1),s=e=>{a||i(e)},c=async()=>{if(!a){o(!0);try{await n(),i(!1),R7.success(`删除成功`,`“${e}”已删除。`)}catch(e){R7.error(`删除失败`,e)}finally{o(!1)}}};return(0,P.jsxs)($7,{open:r,onOpenChange:s,children:[(0,P.jsx)(e9,{asChild:!0,children:(0,P.jsx)(N_,{variant:`ghost`,children:`删除`})}),(0,P.jsx)(t9,{align:`end`,side:`top`,collisionPadding:12,children:(0,P.jsxs)(`div`,{className:`grid gap-3`,children:[(0,P.jsxs)(`div`,{className:`grid min-w-0 gap-1`,children:[(0,P.jsxs)(`p`,{className:`break-words text-sm font-semibold`,children:[`删除“`,e,`”?`]}),(0,P.jsx)(`p`,{className:`break-words text-xs leading-5 text-[var(--muted-strong)]`,children:t??`删除后无法恢复。`})]}),(0,P.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,P.jsx)(N_,{size:`sm`,disabled:a,onClick:()=>s(!1),children:`取消`}),(0,P.jsx)(N_,{size:`sm`,variant:`destructive`,loading:a,onClick:()=>void c(),children:`确认删除`})]})]})})]})}function r9({title:e,description:t,action:n,compact:r,summary:i,empty:a,emptyTitle:o,emptyDescription:s,emptyAction:c,pagination:l,children:u}){return(0,P.jsxs)(Q7,{title:e,description:t,action:n,compact:r,summary:i,children:[a?(0,P.jsx)(Z7,{title:o??`暂无内容`,description:s??`创建第一个对象后会显示在这里。`,action:c}):u,l]})}function i9({title:e,description:t,status:n,meta:r,onOpen:i,onEdit:a,onDelete:o,deleteDescription:s,children:c}){return(0,P.jsxs)(`div`,{className:`grid min-w-0 gap-3 px-4 py-3.5 lg:grid-cols-[minmax(0,1fr)_auto] lg:items-center sm:px-5`,children:[i?(0,P.jsx)(`button`,{type:`button`,className:`min-w-0 rounded-[var(--radius-xs)] text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--focus)]`,onClick:i,children:(0,P.jsx)(a9,{title:e,description:t,status:n,meta:r})}):(0,P.jsx)(`div`,{className:`min-w-0`,children:(0,P.jsx)(a9,{title:e,description:t,status:n,meta:r})}),(0,P.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5 lg:justify-end [&_button]:min-h-8 [&_button]:px-2.5 [&_button]:text-xs`,children:[c,a?(0,P.jsx)(N_,{variant:`ghost`,onClick:a,children:`编辑`}):null,o?(0,P.jsx)(n9,{name:e,description:s,onConfirm:o}):null]})]})}function a9({title:e,description:t,status:n,meta:r}){return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,P.jsx)(`h3`,{className:`truncate text-sm font-semibold text-[var(--ink)]`,children:e}),n&&n!==`ready`?(0,P.jsx)(L7,{tone:n===`warning`?`warning`:`neutral`,children:n===`warning`?`需处理`:`已停用`}):null,r]}),(0,P.jsx)(`p`,{className:`mt-1 max-w-[90ch] text-xs leading-5 text-[var(--muted-strong)]`,children:t})]})}function o9({children:e}){return(0,P.jsx)(`div`,{className:`grid gap-4`,children:e})}function s9({page:e,pageSize:t,total:n,onChange:r,className:i,compact:a=!1}){let o=Math.max(1,Math.ceil(n/t)),s=Math.min(Math.max(1,e),o);if((0,p.useEffect)(()=>{e!==s&&r(s)},[s,r,e]),o<=1)return null;let c=l9(s,o);return(0,P.jsxs)(`nav`,{"aria-label":`分页导航`,className:U(`flex items-center justify-between gap-4 px-4 py-3 sm:px-5`,a&&`gap-2 px-3 sm:px-3`,i),children:[(0,P.jsx)(`p`,{className:`text-xs text-[var(--muted-strong)]`,children:a?`共 ${n} 条`:`第 ${(s-1)*t+1}–${Math.min(s*t,n)} 条,共 ${n} 条`}),(0,P.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,P.jsx)(c9,{label:`上一页`,icon:(0,P.jsx)(f_,{className:`size-4`}),disabled:s<=1,onClick:()=>r(s-1)}),!a&&c.map((e,t)=>e===`ellipsis`?(0,P.jsx)(`span`,{className:`flex size-8 items-center justify-center text-xs text-[var(--muted)]`,children:`…`},`ellipsis-${t}`):(0,P.jsx)(c9,{label:String(e),active:e===s,onClick:()=>r(e)},e)),(0,P.jsx)(c9,{label:`下一页`,icon:(0,P.jsx)(p_,{className:`size-4`}),disabled:s>=o,onClick:()=>r(s+1)})]})]})}function c9({label:e,icon:t,active:n,disabled:r,onClick:i}){return(0,P.jsx)(`button`,{type:`button`,"aria-label":e,"aria-current":n?`page`:void 0,disabled:r,onClick:i,className:U(`flex size-8 items-center justify-center rounded-[var(--radius-xs)] text-xs transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--focus)]`,n?`bg-[var(--ink)] font-semibold text-[var(--surface)]`:r?`cursor-not-allowed text-[var(--muted)] opacity-40`:`text-[var(--muted-strong)] hover:bg-[var(--surface-3)] hover:text-[var(--ink)]`),children:t??e})}function l9(e,t){if(t<=7)return Array.from({length:t},(e,t)=>t+1);let n=[];n.push(1),e>4&&n.push(`ellipsis`);for(let r=Math.max(2,e-1);r<=Math.min(t-1,e+1);r++)n.push(r);return e<t-3&&n.push(`ellipsis`),n.push(t),n}function u9(e,t){let n=e.trim(),r=new Set(t.map(e=>e.trim().toLocaleLowerCase()));if(!r.has(n.toLocaleLowerCase()))return n;let i=2;for(;r.has(`${n} ${i}`.toLocaleLowerCase());)i+=1;return`${n} ${i}`}var d9={Model:`model`,Source:`source`,Notification:`notification`,Delivery:`delivery`,Channel:`channel`},f9={Zhihu:`zhihu`,Juejin:`juejin`,Xiaohongshu:`xiaohongshu`,Toutiao:`toutiao`,Csdn:`csdn`,Bilibili:`bilibili`,WeixinWeb:`weixin-web`,Weibo:`weibo`,Douyin:`douyin`,Baijiahao:`baijiahao`,Sohu:`sohu`,Jianshu:`jianshu`,Cnblogs:`cnblogs`,Segmentfault:`segmentfault`,Oschina:`oschina`,Douban:`douban`,Xueqiu:`xueqiu`,WeixinChannels:`weixin-channels`,Medium:`medium`,Substack:`substack`};f9.Zhihu,f9.Juejin,f9.Xiaohongshu,f9.Toutiao,f9.Csdn,f9.Bilibili,f9.WeixinWeb,f9.Weibo,f9.Douyin,f9.Baijiahao,f9.Sohu,f9.Jianshu,f9.Cnblogs,f9.Segmentfault,f9.Oschina,f9.Douban,f9.Xueqiu,f9.WeixinChannels,f9.Medium,f9.Substack;var p9={Inherit:`inherit`,Adaptive:`adaptive`,Template:`template`},m9={Inherit:`inherit`,None:`none`,Style:`style`},h9;(function(e){e.assertEqual=e=>{},e.assertIs=function(e){},e.assertNever=function(e){throw Error()},e.arrayToEnum=e=>{let t={};for(let n of e)t[n]=n;return t},e.getValidEnumValues=t=>{let n=e.objectKeys(t).filter(e=>typeof t[t[e]]!=`number`),r={};for(let e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys=typeof Object.keys==`function`?e=>Object.keys(e):e=>{let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(let n of e)if(t(n))return n},e.isInteger=typeof Number.isInteger==`function`?e=>Number.isInteger(e):e=>typeof e==`number`&&Number.isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=` | `){return e.map(e=>typeof e==`string`?`'${e}'`:e).join(t)},e.jsonStringifyReplacer=(e,t)=>typeof t==`bigint`?t.toString():t})(h9||={});var g9;(function(e){e.mergeShapes=(e,t)=>({...e,...t})})(g9||={});var G=h9.arrayToEnum([`string`,`nan`,`number`,`integer`,`float`,`boolean`,`date`,`bigint`,`symbol`,`function`,`undefined`,`null`,`array`,`object`,`unknown`,`promise`,`void`,`never`,`map`,`set`]),_9=e=>{switch(typeof e){case`undefined`:return G.undefined;case`string`:return G.string;case`number`:return Number.isNaN(e)?G.nan:G.number;case`boolean`:return G.boolean;case`function`:return G.function;case`bigint`:return G.bigint;case`symbol`:return G.symbol;case`object`:return Array.isArray(e)?G.array:e===null?G.null:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?G.promise:typeof Map<`u`&&e instanceof Map?G.map:typeof Set<`u`&&e instanceof Set?G.set:typeof Date<`u`&&e instanceof Date?G.date:G.object;default:return G.unknown}},K=h9.arrayToEnum([`invalid_type`,`invalid_literal`,`custom`,`invalid_union`,`invalid_union_discriminator`,`invalid_enum_value`,`unrecognized_keys`,`invalid_arguments`,`invalid_return_type`,`invalid_date`,`invalid_string`,`too_small`,`too_big`,`invalid_intersection_types`,`not_multiple_of`,`not_finite`]),v9=class e extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name=`ZodError`,this.issues=e}format(e){let t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`)i.unionErrors.map(r);else if(i.code===`invalid_return_type`)r(i.returnTypeError);else if(i.code===`invalid_arguments`)r(i.argumentsError);else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}static assert(t){if(!(t instanceof e))throw Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,h9.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=e=>e.message){let t={},n=[];for(let r of this.issues)if(r.path.length>0){let n=r.path[0];t[n]=t[n]||[],t[n].push(e(r))}else n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}};v9.create=e=>new v9(e);var y9=(e,t)=>{let n;switch(e.code){case K.invalid_type:n=e.received===G.undefined?`Required`:`Expected ${e.expected}, received ${e.received}`;break;case K.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,h9.jsonStringifyReplacer)}`;break;case K.unrecognized_keys:n=`Unrecognized key(s) in object: ${h9.joinValues(e.keys,`, `)}`;break;case K.invalid_union:n=`Invalid input`;break;case K.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${h9.joinValues(e.options)}`;break;case K.invalid_enum_value:n=`Invalid enum value. Expected ${h9.joinValues(e.options)}, received '${e.received}'`;break;case K.invalid_arguments:n=`Invalid function arguments`;break;case K.invalid_return_type:n=`Invalid function return type`;break;case K.invalid_date:n=`Invalid date`;break;case K.invalid_string:typeof e.validation==`object`?`includes`in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position==`number`&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):`startsWith`in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:`endsWith`in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:h9.assertNever(e.validation):n=e.validation===`regex`?`Invalid`:`Invalid ${e.validation}`;break;case K.too_small:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at least`:`more than`} ${e.minimum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at least`:`over`} ${e.minimum} character(s)`:e.type===`number`||e.type===`bigint`?`Number must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${e.minimum}`:e.type===`date`?`Date must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${new Date(Number(e.minimum))}`:`Invalid input`;break;case K.too_big:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at most`:`less than`} ${e.maximum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at most`:`under`} ${e.maximum} character(s)`:e.type===`number`?`Number must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`bigint`?`BigInt must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`date`?`Date must be ${e.exact?`exactly`:e.inclusive?`smaller than or equal to`:`smaller than`} ${new Date(Number(e.maximum))}`:`Invalid input`;break;case K.custom:n=`Invalid input`;break;case K.invalid_intersection_types:n=`Intersection results could not be merged`;break;case K.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case K.not_finite:n=`Number must be finite`;break;default:n=t.defaultError,h9.assertNever(e)}return{message:n}},b9=y9;function x9(){return b9}var S9=e=>{let{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s=``,c=r.filter(e=>!!e).slice().reverse();for(let e of c)s=e(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}};function q(e,t){let n=x9(),r=S9({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===y9?void 0:y9].filter(e=>!!e)});e.common.issues.push(r)}var C9=class e{constructor(){this.value=`valid`}dirty(){this.value===`valid`&&(this.value=`dirty`)}abort(){this.value!==`aborted`&&(this.value=`aborted`)}static mergeArray(e,t){let n=[];for(let r of t){if(r.status===`aborted`)return J;r.status===`dirty`&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(t,n){let r=[];for(let e of n){let t=await e.key,n=await e.value;r.push({key:t,value:n})}return e.mergeObjectSync(t,r)}static mergeObjectSync(e,t){let n={};for(let r of t){let{key:t,value:i}=r;if(t.status===`aborted`||i.status===`aborted`)return J;t.status===`dirty`&&e.dirty(),i.status===`dirty`&&e.dirty(),t.value!==`__proto__`&&(i.value!==void 0||r.alwaysSet)&&(n[t.value]=i.value)}return{status:e.value,value:n}}},J=Object.freeze({status:`aborted`}),w9=e=>({status:`dirty`,value:e}),T9=e=>({status:`valid`,value:e}),E9=e=>e.status===`aborted`,D9=e=>e.status===`dirty`,O9=e=>e.status===`valid`,k9=e=>typeof Promise<`u`&&e instanceof Promise,Y;(function(e){e.errToObj=e=>typeof e==`string`?{message:e}:e||{},e.toString=e=>typeof e==`string`?e:e?.message})(Y||={});var A9=class{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},j9=(e,t)=>{if(O9(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error(`Validation failed but no issues detected.`);return{success:!1,get error(){if(this._error)return this._error;let t=new v9(e.common.issues);return this._error=t,this._error}}};function X(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:a}=e;return t.code===`invalid_enum_value`?{message:a??i.defaultError}:i.data===void 0?{message:a??r??i.defaultError}:t.code===`invalid_type`?{message:a??n??i.defaultError}:{message:i.defaultError}},description:i}}var M9=class{get description(){return this._def.description}_getType(e){return _9(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:_9(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new C9,ctx:{common:e.parent.common,data:e.data,parsedType:_9(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(k9(t))throw Error(`Synchronous parse encountered promise.`);return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){let n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:_9(e)};return j9(n,this._parseSync({data:e,path:n.path,parent:n}))}"~validate"(e){let t={common:{issues:[],async:!!this[`~standard`].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:_9(e)};if(!this[`~standard`].async)try{let n=this._parseSync({data:e,path:[],parent:t});return O9(n)?{value:n.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes(`encountered`)&&(this[`~standard`].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>O9(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:_9(e)},r=this._parse({data:e,path:n.path,parent:n});return j9(n,await(k9(r)?r:Promise.resolve(r)))}refine(e,t){let n=e=>typeof t==`string`||t===void 0?{message:t}:typeof t==`function`?t(e):t;return this._refinement((t,r)=>{let i=e(t),a=()=>r.addIssue({code:K.custom,...n(t)});return typeof Promise<`u`&&i instanceof Promise?i.then(e=>e?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(e,t){return this._refinement((n,r)=>e(n)?!0:(r.addIssue(typeof t==`function`?t(n,r):t),!1))}_refinement(e){return new FS({schema:this,typeName:Z.ZodEffects,effect:{type:`refinement`,refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this[`~standard`]={version:1,vendor:`zod`,validate:e=>this[`~validate`](e)}}optional(){return IS.create(this,this._def)}nullable(){return LS.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return gS.create(this)}promise(){return PS.create(this,this._def)}or(e){return yS.create([this,e],this._def)}and(e){return CS.create(this,e,this._def)}transform(e){return new FS({...X(this._def),schema:this,typeName:Z.ZodEffects,effect:{type:`transform`,transform:e}})}default(e){let t=typeof e==`function`?e:()=>e;return new RS({...X(this._def),innerType:this,defaultValue:t,typeName:Z.ZodDefault})}brand(){return new VS({typeName:Z.ZodBranded,type:this,...X(this._def)})}catch(e){let t=typeof e==`function`?e:()=>e;return new zS({...X(this._def),innerType:this,catchValue:t,typeName:Z.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return HS.create(this,e)}readonly(){return US.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},N9=/^c[^\s-]{8,}$/i,P9=/^[0-9a-z]+$/,F9=/^[0-9A-HJKMNP-TV-Z]{26}$/i,I9=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,L9=/^[a-z0-9_-]{21}$/i,R9=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,z9=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,B9=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,V9=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,H9,U9=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,W9=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,G9=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,K9=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,q9=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,J9=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Y9=`((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`,X9=RegExp(`^${Y9}$`);function Z9(e){let t=`[0-5]\\d`;e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision??(t=`${t}(\\.\\d+)?`);let n=e.precision?`+`:`?`;return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function Q9(e){return RegExp(`^${Z9(e)}$`)}function $9(e){let t=`${Y9}T${Z9(e)}`,n=[];return n.push(e.local?`Z?`:`Z`),e.offset&&n.push(`([+-]\\d{2}:?\\d{2})`),t=`${t}(${n.join(`|`)})`,RegExp(`^${t}$`)}function eS(e,t){return!((t!==`v4`&&t||!U9.test(e))&&(t!==`v6`&&t||!G9.test(e)))}function tS(e,t){if(!R9.test(e))return!1;try{let[n]=e.split(`.`);if(!n)return!1;let r=n.replace(/-/g,`+`).replace(/_/g,`/`).padEnd(n.length+(4-n.length%4)%4,`=`),i=JSON.parse(atob(r));return!(typeof i!=`object`||!i||`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&i.alg!==t)}catch{return!1}}function nS(e,t){return!((t!==`v4`&&t||!W9.test(e))&&(t!==`v6`&&t||!K9.test(e)))}var rS=class e extends M9{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==G.string){let t=this._getOrReturnCtx(e);return q(t,{code:K.invalid_type,expected:G.string,received:t.parsedType}),J}let t=new C9,n;for(let r of this._def.checks)if(r.kind===`min`)e.data.length<r.value&&(n=this._getOrReturnCtx(e,n),q(n,{code:K.too_small,minimum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),t.dirty());else if(r.kind===`max`)e.data.length>r.value&&(n=this._getOrReturnCtx(e,n),q(n,{code:K.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),t.dirty());else if(r.kind===`length`){let i=e.data.length>r.value,a=e.data.length<r.value;(i||a)&&(n=this._getOrReturnCtx(e,n),i?q(n,{code:K.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!0,message:r.message}):a&&q(n,{code:K.too_small,minimum:r.value,type:`string`,inclusive:!0,exact:!0,message:r.message}),t.dirty())}else if(r.kind===`email`)B9.test(e.data)||(n=this._getOrReturnCtx(e,n),q(n,{validation:`email`,code:K.invalid_string,message:r.message}),t.dirty());else if(r.kind===`emoji`)H9||=new RegExp(V9,`u`),H9.test(e.data)||(n=this._getOrReturnCtx(e,n),q(n,{validation:`emoji`,code:K.invalid_string,message:r.message}),t.dirty());else if(r.kind===`uuid`)I9.test(e.data)||(n=this._getOrReturnCtx(e,n),q(n,{validation:`uuid`,code:K.invalid_string,message:r.message}),t.dirty());else if(r.kind===`nanoid`)L9.test(e.data)||(n=this._getOrReturnCtx(e,n),q(n,{validation:`nanoid`,code:K.invalid_string,message:r.message}),t.dirty());else if(r.kind===`cuid`)N9.test(e.data)||(n=this._getOrReturnCtx(e,n),q(n,{validation:`cuid`,code:K.invalid_string,message:r.message}),t.dirty());else if(r.kind===`cuid2`)P9.test(e.data)||(n=this._getOrReturnCtx(e,n),q(n,{validation:`cuid2`,code:K.invalid_string,message:r.message}),t.dirty());else if(r.kind===`ulid`)F9.test(e.data)||(n=this._getOrReturnCtx(e,n),q(n,{validation:`ulid`,code:K.invalid_string,message:r.message}),t.dirty());else if(r.kind===`url`)try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),q(n,{validation:`url`,code:K.invalid_string,message:r.message}),t.dirty()}else r.kind===`regex`?(r.regex.lastIndex=0,r.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),q(n,{validation:`regex`,code:K.invalid_string,message:r.message}),t.dirty())):r.kind===`trim`?e.data=e.data.trim():r.kind===`includes`?e.data.includes(r.value,r.position)||(n=this._getOrReturnCtx(e,n),q(n,{code:K.invalid_string,validation:{includes:r.value,position:r.position},message:r.message}),t.dirty()):r.kind===`toLowerCase`?e.data=e.data.toLowerCase():r.kind===`toUpperCase`?e.data=e.data.toUpperCase():r.kind===`startsWith`?e.data.startsWith(r.value)||(n=this._getOrReturnCtx(e,n),q(n,{code:K.invalid_string,validation:{startsWith:r.value},message:r.message}),t.dirty()):r.kind===`endsWith`?e.data.endsWith(r.value)||(n=this._getOrReturnCtx(e,n),q(n,{code:K.invalid_string,validation:{endsWith:r.value},message:r.message}),t.dirty()):r.kind===`datetime`?$9(r).test(e.data)||(n=this._getOrReturnCtx(e,n),q(n,{code:K.invalid_string,validation:`datetime`,message:r.message}),t.dirty()):r.kind===`date`?X9.test(e.data)||(n=this._getOrReturnCtx(e,n),q(n,{code:K.invalid_string,validation:`date`,message:r.message}),t.dirty()):r.kind===`time`?Q9(r).test(e.data)||(n=this._getOrReturnCtx(e,n),q(n,{code:K.invalid_string,validation:`time`,message:r.message}),t.dirty()):r.kind===`duration`?z9.test(e.data)||(n=this._getOrReturnCtx(e,n),q(n,{validation:`duration`,code:K.invalid_string,message:r.message}),t.dirty()):r.kind===`ip`?eS(e.data,r.version)||(n=this._getOrReturnCtx(e,n),q(n,{validation:`ip`,code:K.invalid_string,message:r.message}),t.dirty()):r.kind===`jwt`?tS(e.data,r.alg)||(n=this._getOrReturnCtx(e,n),q(n,{validation:`jwt`,code:K.invalid_string,message:r.message}),t.dirty()):r.kind===`cidr`?nS(e.data,r.version)||(n=this._getOrReturnCtx(e,n),q(n,{validation:`cidr`,code:K.invalid_string,message:r.message}),t.dirty()):r.kind===`base64`?q9.test(e.data)||(n=this._getOrReturnCtx(e,n),q(n,{validation:`base64`,code:K.invalid_string,message:r.message}),t.dirty()):r.kind===`base64url`?J9.test(e.data)||(n=this._getOrReturnCtx(e,n),q(n,{validation:`base64url`,code:K.invalid_string,message:r.message}),t.dirty()):h9.assertNever(r);return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement(t=>e.test(t),{validation:t,code:K.invalid_string,...Y.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(e){return this._addCheck({kind:`email`,...Y.errToObj(e)})}url(e){return this._addCheck({kind:`url`,...Y.errToObj(e)})}emoji(e){return this._addCheck({kind:`emoji`,...Y.errToObj(e)})}uuid(e){return this._addCheck({kind:`uuid`,...Y.errToObj(e)})}nanoid(e){return this._addCheck({kind:`nanoid`,...Y.errToObj(e)})}cuid(e){return this._addCheck({kind:`cuid`,...Y.errToObj(e)})}cuid2(e){return this._addCheck({kind:`cuid2`,...Y.errToObj(e)})}ulid(e){return this._addCheck({kind:`ulid`,...Y.errToObj(e)})}base64(e){return this._addCheck({kind:`base64`,...Y.errToObj(e)})}base64url(e){return this._addCheck({kind:`base64url`,...Y.errToObj(e)})}jwt(e){return this._addCheck({kind:`jwt`,...Y.errToObj(e)})}ip(e){return this._addCheck({kind:`ip`,...Y.errToObj(e)})}cidr(e){return this._addCheck({kind:`cidr`,...Y.errToObj(e)})}datetime(e){return typeof e==`string`?this._addCheck({kind:`datetime`,precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:`datetime`,precision:e?.precision===void 0?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...Y.errToObj(e?.message)})}date(e){return this._addCheck({kind:`date`,message:e})}time(e){return typeof e==`string`?this._addCheck({kind:`time`,precision:null,message:e}):this._addCheck({kind:`time`,precision:e?.precision===void 0?null:e?.precision,...Y.errToObj(e?.message)})}duration(e){return this._addCheck({kind:`duration`,...Y.errToObj(e)})}regex(e,t){return this._addCheck({kind:`regex`,regex:e,...Y.errToObj(t)})}includes(e,t){return this._addCheck({kind:`includes`,value:e,position:t?.position,...Y.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:`startsWith`,value:e,...Y.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:`endsWith`,value:e,...Y.errToObj(t)})}min(e,t){return this._addCheck({kind:`min`,value:e,...Y.errToObj(t)})}max(e,t){return this._addCheck({kind:`max`,value:e,...Y.errToObj(t)})}length(e,t){return this._addCheck({kind:`length`,value:e,...Y.errToObj(t)})}nonempty(e){return this.min(1,Y.errToObj(e))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:`trim`}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toLowerCase`}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toUpperCase`}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind===`datetime`)}get isDate(){return!!this._def.checks.find(e=>e.kind===`date`)}get isTime(){return!!this._def.checks.find(e=>e.kind===`time`)}get isDuration(){return!!this._def.checks.find(e=>e.kind===`duration`)}get isEmail(){return!!this._def.checks.find(e=>e.kind===`email`)}get isURL(){return!!this._def.checks.find(e=>e.kind===`url`)}get isEmoji(){return!!this._def.checks.find(e=>e.kind===`emoji`)}get isUUID(){return!!this._def.checks.find(e=>e.kind===`uuid`)}get isNANOID(){return!!this._def.checks.find(e=>e.kind===`nanoid`)}get isCUID(){return!!this._def.checks.find(e=>e.kind===`cuid`)}get isCUID2(){return!!this._def.checks.find(e=>e.kind===`cuid2`)}get isULID(){return!!this._def.checks.find(e=>e.kind===`ulid`)}get isIP(){return!!this._def.checks.find(e=>e.kind===`ip`)}get isCIDR(){return!!this._def.checks.find(e=>e.kind===`cidr`)}get isBase64(){return!!this._def.checks.find(e=>e.kind===`base64`)}get isBase64url(){return!!this._def.checks.find(e=>e.kind===`base64url`)}get minLength(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}};rS.create=e=>new rS({checks:[],typeName:Z.ZodString,coerce:e?.coerce??!1,...X(e)});function iS(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=(t.toString().split(`.`)[1]||``).length,i=n>r?n:r;return Number.parseInt(e.toFixed(i).replace(`.`,``))%Number.parseInt(t.toFixed(i).replace(`.`,``))/10**i}var aS=class e extends M9{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==G.number){let t=this._getOrReturnCtx(e);return q(t,{code:K.invalid_type,expected:G.number,received:t.parsedType}),J}let t,n=new C9;for(let r of this._def.checks)r.kind===`int`?h9.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),q(t,{code:K.invalid_type,expected:`integer`,received:`float`,message:r.message}),n.dirty()):r.kind===`min`?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),q(t,{code:K.too_small,minimum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind===`max`?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),q(t,{code:K.too_big,maximum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind===`multipleOf`?iS(e.data,r.value)!==0&&(t=this._getOrReturnCtx(e,t),q(t,{code:K.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):r.kind===`finite`?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),q(t,{code:K.not_finite,message:r.message}),n.dirty()):h9.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit(`min`,e,!0,Y.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,Y.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,Y.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,Y.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Y.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(e){return this._addCheck({kind:`int`,message:Y.toString(e)})}positive(e){return this._addCheck({kind:`min`,value:0,inclusive:!1,message:Y.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:0,inclusive:!1,message:Y.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:0,inclusive:!0,message:Y.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:0,inclusive:!0,message:Y.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:Y.toString(t)})}finite(e){return this._addCheck({kind:`finite`,message:Y.toString(e)})}safe(e){return this._addCheck({kind:`min`,inclusive:!0,value:-(2**53-1),message:Y.toString(e)})._addCheck({kind:`max`,inclusive:!0,value:2**53-1,message:Y.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind===`int`||e.kind===`multipleOf`&&h9.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks)if(n.kind===`finite`||n.kind===`int`||n.kind===`multipleOf`)return!0;else n.kind===`min`?(t===null||n.value>t)&&(t=n.value):n.kind===`max`&&(e===null||n.value<e)&&(e=n.value);return Number.isFinite(t)&&Number.isFinite(e)}};aS.create=e=>new aS({checks:[],typeName:Z.ZodNumber,coerce:e?.coerce||!1,...X(e)});var oS=class e extends M9{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==G.bigint)return this._getInvalidInput(e);let t,n=new C9;for(let r of this._def.checks)r.kind===`min`?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),q(t,{code:K.too_small,type:`bigint`,minimum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind===`max`?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),q(t,{code:K.too_big,type:`bigint`,maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind===`multipleOf`?e.data%r.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),q(t,{code:K.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):h9.assertNever(r);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return q(t,{code:K.invalid_type,expected:G.bigint,received:t.parsedType}),J}gte(e,t){return this.setLimit(`min`,e,!0,Y.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,Y.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,Y.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,Y.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Y.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!1,message:Y.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!1,message:Y.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!0,message:Y.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!0,message:Y.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:Y.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}};oS.create=e=>new oS({checks:[],typeName:Z.ZodBigInt,coerce:e?.coerce??!1,...X(e)});var sS=class extends M9{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==G.boolean){let t=this._getOrReturnCtx(e);return q(t,{code:K.invalid_type,expected:G.boolean,received:t.parsedType}),J}return T9(e.data)}};sS.create=e=>new sS({typeName:Z.ZodBoolean,coerce:e?.coerce||!1,...X(e)});var cS=class e extends M9{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==G.date){let t=this._getOrReturnCtx(e);return q(t,{code:K.invalid_type,expected:G.date,received:t.parsedType}),J}if(Number.isNaN(e.data.getTime()))return q(this._getOrReturnCtx(e),{code:K.invalid_date}),J;let t=new C9,n;for(let r of this._def.checks)r.kind===`min`?e.data.getTime()<r.value&&(n=this._getOrReturnCtx(e,n),q(n,{code:K.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:`date`}),t.dirty()):r.kind===`max`?e.data.getTime()>r.value&&(n=this._getOrReturnCtx(e,n),q(n,{code:K.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:`date`}),t.dirty()):h9.assertNever(r);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(e,t){return this._addCheck({kind:`min`,value:e.getTime(),message:Y.toString(t)})}max(e,t){return this._addCheck({kind:`max`,value:e.getTime(),message:Y.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e==null?null:new Date(e)}get maxDate(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e==null?null:new Date(e)}};cS.create=e=>new cS({checks:[],coerce:e?.coerce||!1,typeName:Z.ZodDate,...X(e)});var lS=class extends M9{_parse(e){if(this._getType(e)!==G.symbol){let t=this._getOrReturnCtx(e);return q(t,{code:K.invalid_type,expected:G.symbol,received:t.parsedType}),J}return T9(e.data)}};lS.create=e=>new lS({typeName:Z.ZodSymbol,...X(e)});var uS=class extends M9{_parse(e){if(this._getType(e)!==G.undefined){let t=this._getOrReturnCtx(e);return q(t,{code:K.invalid_type,expected:G.undefined,received:t.parsedType}),J}return T9(e.data)}};uS.create=e=>new uS({typeName:Z.ZodUndefined,...X(e)});var dS=class extends M9{_parse(e){if(this._getType(e)!==G.null){let t=this._getOrReturnCtx(e);return q(t,{code:K.invalid_type,expected:G.null,received:t.parsedType}),J}return T9(e.data)}};dS.create=e=>new dS({typeName:Z.ZodNull,...X(e)});var fS=class extends M9{constructor(){super(...arguments),this._any=!0}_parse(e){return T9(e.data)}};fS.create=e=>new fS({typeName:Z.ZodAny,...X(e)});var pS=class extends M9{constructor(){super(...arguments),this._unknown=!0}_parse(e){return T9(e.data)}};pS.create=e=>new pS({typeName:Z.ZodUnknown,...X(e)});var mS=class extends M9{_parse(e){let t=this._getOrReturnCtx(e);return q(t,{code:K.invalid_type,expected:G.never,received:t.parsedType}),J}};mS.create=e=>new mS({typeName:Z.ZodNever,...X(e)});var hS=class extends M9{_parse(e){if(this._getType(e)!==G.undefined){let t=this._getOrReturnCtx(e);return q(t,{code:K.invalid_type,expected:G.void,received:t.parsedType}),J}return T9(e.data)}};hS.create=e=>new hS({typeName:Z.ZodVoid,...X(e)});var gS=class e extends M9{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==G.array)return q(t,{code:K.invalid_type,expected:G.array,received:t.parsedType}),J;if(r.exactLength!==null){let e=t.data.length>r.exactLength.value,i=t.data.length<r.exactLength.value;(e||i)&&(q(t,{code:e?K.too_big:K.too_small,minimum:i?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:`array`,inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(r.minLength!==null&&t.data.length<r.minLength.value&&(q(t,{code:K.too_small,minimum:r.minLength.value,type:`array`,inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),r.maxLength!==null&&t.data.length>r.maxLength.value&&(q(t,{code:K.too_big,maximum:r.maxLength.value,type:`array`,inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((e,n)=>r.type._parseAsync(new A9(t,e,t.path,n)))).then(e=>C9.mergeArray(n,e));let i=[...t.data].map((e,n)=>r.type._parseSync(new A9(t,e,t.path,n)));return C9.mergeArray(n,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:Y.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:Y.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:Y.toString(n)}})}nonempty(e){return this.min(1,e)}};gS.create=(e,t)=>new gS({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Z.ZodArray,...X(t)});function _S(e){if(e instanceof vS){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=IS.create(_S(r))}return new vS({...e._def,shape:()=>t})}return e instanceof gS?new gS({...e._def,type:_S(e.element)}):e instanceof IS?IS.create(_S(e.unwrap())):e instanceof LS?LS.create(_S(e.unwrap())):e instanceof wS?wS.create(e.items.map(e=>_S(e))):e}var vS=class e extends M9{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=h9.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==G.object){let t=this._getOrReturnCtx(e);return q(t,{code:K.invalid_type,expected:G.object,received:t.parsedType}),J}let{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof mS&&this._def.unknownKeys===`strip`))for(let e in n.data)i.includes(e)||a.push(e);let o=[];for(let e of i){let t=r[e],i=n.data[e];o.push({key:{status:`valid`,value:e},value:t._parse(new A9(n,i,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof mS){let e=this._def.unknownKeys;if(e===`passthrough`)for(let e of a)o.push({key:{status:`valid`,value:e},value:{status:`valid`,value:n.data[e]}});else if(e===`strict`)a.length>0&&(q(n,{code:K.unrecognized_keys,keys:a}),t.dirty());else if(e!==`strip`)throw Error(`Internal ZodObject error: invalid unknownKeys value.`)}else{let e=this._def.catchall;for(let t of a){let r=n.data[t];o.push({key:{status:`valid`,value:t},value:e._parse(new A9(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of o){let n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e}).then(e=>C9.mergeObjectSync(t,e)):C9.mergeObjectSync(t,o)}get shape(){return this._def.shape()}strict(t){return Y.errToObj,new e({...this._def,unknownKeys:`strict`,...t===void 0?{}:{errorMap:(e,n)=>{let r=this._def.errorMap?.(e,n).message??n.defaultError;return e.code===`unrecognized_keys`?{message:Y.errToObj(t).message??r}:{message:r}}}})}strip(){return new e({...this._def,unknownKeys:`strip`})}passthrough(){return new e({...this._def,unknownKeys:`passthrough`})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Z.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};for(let e of h9.objectKeys(t))t[e]&&this.shape[e]&&(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}omit(t){let n={};for(let e of h9.objectKeys(this.shape))t[e]||(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}deepPartial(){return _S(this)}partial(t){let n={};for(let e of h9.objectKeys(this.shape)){let r=this.shape[e];n[e]=t&&!t[e]?r:r.optional()}return new e({...this._def,shape:()=>n})}required(t){let n={};for(let e of h9.objectKeys(this.shape))if(t&&!t[e])n[e]=this.shape[e];else{let t=this.shape[e];for(;t instanceof IS;)t=t._def.innerType;n[e]=t}return new e({...this._def,shape:()=>n})}keyof(){return jS(h9.objectKeys(this.shape))}};vS.create=(e,t)=>new vS({shape:()=>e,unknownKeys:`strip`,catchall:mS.create(),typeName:Z.ZodObject,...X(t)}),vS.strictCreate=(e,t)=>new vS({shape:()=>e,unknownKeys:`strict`,catchall:mS.create(),typeName:Z.ZodObject,...X(t)}),vS.lazycreate=(e,t)=>new vS({shape:e,unknownKeys:`strip`,catchall:mS.create(),typeName:Z.ZodObject,...X(t)});var yS=class extends M9{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;function r(e){for(let t of e)if(t.result.status===`valid`)return t.result;for(let n of e)if(n.result.status===`dirty`)return t.common.issues.push(...n.ctx.common.issues),n.result;let n=e.map(e=>new v9(e.ctx.common.issues));return q(t,{code:K.invalid_union,unionErrors:n}),J}if(t.common.async)return Promise.all(n.map(async e=>{let n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}})).then(r);{let e,r=[];for(let i of n){let n={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:n});if(a.status===`valid`)return a;a.status===`dirty`&&!e&&(e={result:a,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=r.map(e=>new v9(e));return q(t,{code:K.invalid_union,unionErrors:i}),J}}get options(){return this._def.options}};yS.create=(e,t)=>new yS({options:e,typeName:Z.ZodUnion,...X(t)});var bS=e=>e instanceof kS?bS(e.schema):e instanceof FS?bS(e.innerType()):e instanceof AS?[e.value]:e instanceof MS?e.options:e instanceof NS?h9.objectValues(e.enum):e instanceof RS?bS(e._def.innerType):e instanceof uS?[void 0]:e instanceof dS?[null]:e instanceof IS?[void 0,...bS(e.unwrap())]:e instanceof LS?[null,...bS(e.unwrap())]:e instanceof VS||e instanceof US?bS(e.unwrap()):e instanceof zS?bS(e._def.innerType):[],xS=class e extends M9{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==G.object)return q(t,{code:K.invalid_type,expected:G.object,received:t.parsedType}),J;let n=this.discriminator,r=t.data[n],i=this.optionsMap.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(q(t,{code:K.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),J)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){let i=new Map;for(let e of n){let n=bS(e.shape[t]);if(!n.length)throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let r of n){if(i.has(r))throw Error(`Discriminator property ${String(t)} has duplicate value ${String(r)}`);i.set(r,e)}}return new e({typeName:Z.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...X(r)})}};function SS(e,t){let n=_9(e),r=_9(t);if(e===t)return{valid:!0,data:e};if(n===G.object&&r===G.object){let n=h9.objectKeys(t),r=h9.objectKeys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=SS(e[n],t[n]);if(!r.valid)return{valid:!1};i[n]=r.data}return{valid:!0,data:i}}if(n===G.array&&r===G.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let r=0;r<e.length;r++){let i=SS(e[r],t[r]);if(!i.valid)return{valid:!1};n.push(i.data)}return{valid:!0,data:n}}return n===G.date&&r===G.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var CS=class extends M9{_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(E9(e)||E9(r))return J;let i=SS(e.value,r.value);return i.valid?((D9(e)||D9(r))&&t.dirty(),{status:t.value,value:i.data}):(q(n,{code:K.invalid_intersection_types}),J)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([e,t])=>r(e,t)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};CS.create=(e,t,n)=>new CS({left:e,right:t,typeName:Z.ZodIntersection,...X(n)});var wS=class e extends M9{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==G.array)return q(n,{code:K.invalid_type,expected:G.array,received:n.parsedType}),J;if(n.data.length<this._def.items.length)return q(n,{code:K.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),J;!this._def.rest&&n.data.length>this._def.items.length&&(q(n,{code:K.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),t.dirty());let r=[...n.data].map((e,t)=>{let r=this._def.items[t]||this._def.rest;return r?r._parse(new A9(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(r).then(e=>C9.mergeArray(t,e)):C9.mergeArray(t,r)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};wS.create=(e,t)=>{if(!Array.isArray(e))throw Error(`You must pass an array of schemas to z.tuple([ ... ])`);return new wS({items:e,typeName:Z.ZodTuple,rest:null,...X(t)})};var TS=class e extends M9{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==G.object)return q(n,{code:K.invalid_type,expected:G.object,received:n.parsedType}),J;let r=[],i=this._def.keyType,a=this._def.valueType;for(let e in n.data)r.push({key:i._parse(new A9(n,e,n.path,e)),value:a._parse(new A9(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?C9.mergeObjectAsync(t,r):C9.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof M9?new e({keyType:t,valueType:n,typeName:Z.ZodRecord,...X(r)}):new e({keyType:rS.create(),valueType:t,typeName:Z.ZodRecord,...X(n)})}},ES=class extends M9{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==G.map)return q(n,{code:K.invalid_type,expected:G.map,received:n.parsedType}),J;let r=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(([e,t],a)=>({key:r._parse(new A9(n,e,n.path,[a,`key`])),value:i._parse(new A9(n,t,n.path,[a,`value`]))}));if(n.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let n of a){let r=await n.key,i=await n.value;if(r.status===`aborted`||i.status===`aborted`)return J;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}})}{let e=new Map;for(let n of a){let r=n.key,i=n.value;if(r.status===`aborted`||i.status===`aborted`)return J;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}};ES.create=(e,t,n)=>new ES({valueType:t,keyType:e,typeName:Z.ZodMap,...X(n)});var DS=class e extends M9{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==G.set)return q(n,{code:K.invalid_type,expected:G.set,received:n.parsedType}),J;let r=this._def;r.minSize!==null&&n.data.size<r.minSize.value&&(q(n,{code:K.too_small,minimum:r.minSize.value,type:`set`,inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),r.maxSize!==null&&n.data.size>r.maxSize.value&&(q(n,{code:K.too_big,maximum:r.maxSize.value,type:`set`,inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());let i=this._def.valueType;function a(e){let n=new Set;for(let r of e){if(r.status===`aborted`)return J;r.status===`dirty`&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}let o=[...n.data.values()].map((e,t)=>i._parse(new A9(n,e,n.path,t)));return n.common.async?Promise.all(o).then(e=>a(e)):a(o)}min(t,n){return new e({...this._def,minSize:{value:t,message:Y.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:Y.toString(n)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};DS.create=(e,t)=>new DS({valueType:e,minSize:null,maxSize:null,typeName:Z.ZodSet,...X(t)});var OS=class e extends M9{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==G.function)return q(t,{code:K.invalid_type,expected:G.function,received:t.parsedType}),J;function n(e,n){return S9({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,x9(),y9].filter(e=>!!e),issueData:{code:K.invalid_arguments,argumentsError:n}})}function r(e,n){return S9({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,x9(),y9].filter(e=>!!e),issueData:{code:K.invalid_return_type,returnTypeError:n}})}let i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof PS){let e=this;return T9(async function(...t){let o=new v9([]),s=await e._def.args.parseAsync(t,i).catch(e=>{throw o.addIssue(n(t,e)),o}),c=await Reflect.apply(a,this,s);return await e._def.returns._def.type.parseAsync(c,i).catch(e=>{throw o.addIssue(r(c,e)),o})})}{let e=this;return T9(function(...t){let o=e._def.args.safeParse(t,i);if(!o.success)throw new v9([n(t,o.error)]);let s=Reflect.apply(a,this,o.data),c=e._def.returns.safeParse(s,i);if(!c.success)throw new v9([r(s,c.error)]);return c.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:wS.create(t).rest(pS.create())})}returns(t){return new e({...this._def,returns:t})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(t,n,r){return new e({args:t||wS.create([]).rest(pS.create()),returns:n||pS.create(),typeName:Z.ZodFunction,...X(r)})}},kS=class extends M9{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};kS.create=(e,t)=>new kS({getter:e,typeName:Z.ZodLazy,...X(t)});var AS=class extends M9{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return q(t,{received:t.data,code:K.invalid_literal,expected:this._def.value}),J}return{status:`valid`,value:e.data}}get value(){return this._def.value}};AS.create=(e,t)=>new AS({value:e,typeName:Z.ZodLiteral,...X(t)});function jS(e,t){return new MS({values:e,typeName:Z.ZodEnum,...X(t)})}var MS=class e extends M9{_parse(e){if(typeof e.data!=`string`){let t=this._getOrReturnCtx(e),n=this._def.values;return q(t,{expected:h9.joinValues(n),received:t.parsedType,code:K.invalid_type}),J}if(this._cache||=new Set(this._def.values),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return q(t,{received:t.data,code:K.invalid_enum_value,options:n}),J}return T9(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(t,n=this._def){return e.create(t,{...this._def,...n})}exclude(t,n=this._def){return e.create(this.options.filter(e=>!t.includes(e)),{...this._def,...n})}};MS.create=jS;var NS=class extends M9{_parse(e){let t=h9.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==G.string&&n.parsedType!==G.number){let e=h9.objectValues(t);return q(n,{expected:h9.joinValues(e),received:n.parsedType,code:K.invalid_type}),J}if(this._cache||=new Set(h9.getValidEnumValues(this._def.values)),!this._cache.has(e.data)){let e=h9.objectValues(t);return q(n,{received:n.data,code:K.invalid_enum_value,options:e}),J}return T9(e.data)}get enum(){return this._def.values}};NS.create=(e,t)=>new NS({values:e,typeName:Z.ZodNativeEnum,...X(t)});var PS=class extends M9{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==G.promise&&t.common.async===!1?(q(t,{code:K.invalid_type,expected:G.promise,received:t.parsedType}),J):T9((t.parsedType===G.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}};PS.create=(e,t)=>new PS({type:e,typeName:Z.ZodPromise,...X(t)});var FS=class extends M9{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Z.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,i={addIssue:e=>{q(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),r.type===`preprocess`){let e=r.transform(n.data,i);if(n.common.async)return Promise.resolve(e).then(async e=>{if(t.value===`aborted`)return J;let r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return r.status===`aborted`?J:r.status===`dirty`||t.value===`dirty`?w9(r.value):r});{if(t.value===`aborted`)return J;let r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return r.status===`aborted`?J:r.status===`dirty`||t.value===`dirty`?w9(r.value):r}}if(r.type===`refinement`){let e=e=>{let t=r.refinement(e,i);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error(`Async refinement encountered during synchronous parse operation. Use .parseAsync instead.`);return e};if(n.common.async===!1){let r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return r.status===`aborted`?J:(r.status===`dirty`&&t.dirty(),e(r.value),{status:t.value,value:r.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>n.status===`aborted`?J:(n.status===`dirty`&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))))}if(r.type===`transform`){if(n.common.async===!1){let e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!O9(e))return J;let a=r.transform(e.value,i);if(a instanceof Promise)throw Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);return{status:t.value,value:a}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>O9(e)?Promise.resolve(r.transform(e.value,i)).then(e=>({status:t.value,value:e})):J)}h9.assertNever(r)}};FS.create=(e,t,n)=>new FS({schema:e,typeName:Z.ZodEffects,effect:t,...X(n)}),FS.createWithPreprocess=(e,t,n)=>new FS({schema:t,effect:{type:`preprocess`,transform:e},typeName:Z.ZodEffects,...X(n)});var IS=class extends M9{_parse(e){return this._getType(e)===G.undefined?T9(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};IS.create=(e,t)=>new IS({innerType:e,typeName:Z.ZodOptional,...X(t)});var LS=class extends M9{_parse(e){return this._getType(e)===G.null?T9(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};LS.create=(e,t)=>new LS({innerType:e,typeName:Z.ZodNullable,...X(t)});var RS=class extends M9{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===G.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};RS.create=(e,t)=>new RS({innerType:e,typeName:Z.ZodDefault,defaultValue:typeof t.default==`function`?t.default:()=>t.default,...X(t)});var zS=class extends M9{_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return k9(r)?r.then(e=>({status:`valid`,value:e.status===`valid`?e.value:this._def.catchValue({get error(){return new v9(n.common.issues)},input:n.data})})):{status:`valid`,value:r.status===`valid`?r.value:this._def.catchValue({get error(){return new v9(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};zS.create=(e,t)=>new zS({innerType:e,typeName:Z.ZodCatch,catchValue:typeof t.catch==`function`?t.catch:()=>t.catch,...X(t)});var BS=class extends M9{_parse(e){if(this._getType(e)!==G.nan){let t=this._getOrReturnCtx(e);return q(t,{code:K.invalid_type,expected:G.nan,received:t.parsedType}),J}return{status:`valid`,value:e.data}}};BS.create=e=>new BS({typeName:Z.ZodNaN,...X(e)});var VS=class extends M9{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}},HS=class e extends M9{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?J:e.status===`dirty`?(t.dirty(),w9(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{let e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?J:e.status===`dirty`?(t.dirty(),{status:`dirty`,value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(t,n){return new e({in:t,out:n,typeName:Z.ZodPipeline})}},US=class extends M9{_parse(e){let t=this._def.innerType._parse(e),n=e=>(O9(e)&&(e.value=Object.freeze(e.value)),e);return k9(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}};US.create=(e,t)=>new US({innerType:e,typeName:Z.ZodReadonly,...X(t)}),vS.lazycreate;var Z;(function(e){e.ZodString=`ZodString`,e.ZodNumber=`ZodNumber`,e.ZodNaN=`ZodNaN`,e.ZodBigInt=`ZodBigInt`,e.ZodBoolean=`ZodBoolean`,e.ZodDate=`ZodDate`,e.ZodSymbol=`ZodSymbol`,e.ZodUndefined=`ZodUndefined`,e.ZodNull=`ZodNull`,e.ZodAny=`ZodAny`,e.ZodUnknown=`ZodUnknown`,e.ZodNever=`ZodNever`,e.ZodVoid=`ZodVoid`,e.ZodArray=`ZodArray`,e.ZodObject=`ZodObject`,e.ZodUnion=`ZodUnion`,e.ZodDiscriminatedUnion=`ZodDiscriminatedUnion`,e.ZodIntersection=`ZodIntersection`,e.ZodTuple=`ZodTuple`,e.ZodRecord=`ZodRecord`,e.ZodMap=`ZodMap`,e.ZodSet=`ZodSet`,e.ZodFunction=`ZodFunction`,e.ZodLazy=`ZodLazy`,e.ZodLiteral=`ZodLiteral`,e.ZodEnum=`ZodEnum`,e.ZodEffects=`ZodEffects`,e.ZodNativeEnum=`ZodNativeEnum`,e.ZodOptional=`ZodOptional`,e.ZodNullable=`ZodNullable`,e.ZodDefault=`ZodDefault`,e.ZodCatch=`ZodCatch`,e.ZodPromise=`ZodPromise`,e.ZodBranded=`ZodBranded`,e.ZodPipeline=`ZodPipeline`,e.ZodReadonly=`ZodReadonly`})(Z||={});var Q=rS.create,WS=aS.create;BS.create,oS.create;var GS=sS.create;cS.create,lS.create,uS.create;var KS=dS.create;fS.create;var qS=pS.create;mS.create,hS.create;var JS=gS.create,$=vS.create;vS.strictCreate;var YS=yS.create,XS=xS.create;CS.create,wS.create;var ZS=TS.create;ES.create,DS.create,OS.create;var QS=kS.create,$S=AS.create,eC=MS.create;NS.create,PS.create,FS.create,IS.create,LS.create,FS.createWithPreprocess,HS.create;var tC={string:(e=>rS.create({...e,coerce:!0})),number:(e=>aS.create({...e,coerce:!0})),boolean:(e=>sS.create({...e,coerce:!0})),bigint:(e=>oS.create({...e,coerce:!0})),date:(e=>cS.create({...e,coerce:!0}))},nC={DailyBrief:`daily-brief`,DeepAnalysis:`deep-analysis`,PracticalGuide:`practical-guide`},rC=nC.DailyBrief,iC=Q().trim().min(1).max(200),aC=WS().int().positive(),oC=QS(()=>YS([Q(),WS().finite(),GS(),KS(),JS(oC),ZS(Q(),oC)])),sC=ZS(Q().min(1).max(120),oC),cC=$({mode:eC([p9.Inherit,p9.Adaptive,p9.Template]),prompt:Q().trim().max(4e3).optional(),templateId:iC.optional(),templateVersionId:iC.optional()}).superRefine((e,t)=>{e.prompt&&t.addIssue({code:`custom`,path:[`prompt`],message:`运行时排版提示词已停用,请制作并选择固定模板版本`}),e.mode===p9.Template&&!e.templateId&&t.addIssue({code:`custom`,path:[`templateId`],message:`请选择排版模板`})}),lC=$({mode:eC([m9.Inherit,m9.None,m9.Style]),styleId:iC.optional()}).superRefine((e,t)=>{e.mode===m9.Style&&!e.styleId&&t.addIssue({code:`custom`,path:[`styleId`],message:`请选择写作风格`})}),uC=$({title:Q().trim().max(200).optional(),text:Q().trim().min(1).max(8e3)});$({revision:aC.optional(),name:Q().trim().min(1).max(120),description:Q().trim().max(500).optional(),enabled:GS().default(!0),channel:iC.optional(),rules:$({register:eC([`formal`,`editorial`,`conversational`,`sharp`]),sentenceRhythm:eC([`short`,`balanced`,`long`]),structure:eC([`narrative`,`scannable-sections`,`bullet-cards`,`step-by-step`]),emojiDensity:eC([`none`,`light`,`moderate`]),lengthTarget:eC([`short`,`medium`,`long`]),titlePattern:Q().trim().min(1).max(200),guidance:Q().trim().max(2e3).optional()}),samples:JS(uC).max(5).optional()}),$({samples:JS(uC).min(1).max(5),channel:iC.optional()});var dC=$({accountId:iC,publicationType:iC,layout:cC.optional(),writingStyle:lC.optional(),options:sC.optional()});$({id:iC.optional(),revision:aC.optional(),connectorId:iC,name:Q().trim().min(1).max(120),enabled:GS().default(!0),settings:sC,credentials:sC.default({}),clearCredentials:JS(Q().min(1).max(120)).max(50).default([]),overrides:$({headers:ZS(Q(),Q()).optional(),query:ZS(Q(),Q()).optional(),body:ZS(Q(),oC).optional()}).optional()}),$({revision:aC.optional(),name:Q().trim().min(1).max(120),enabled:GS(),positioning:Q().trim().min(1).max(1e3),audience:Q().trim().min(1).max(1e3),tone:Q().trim().min(1).max(500),forbiddenTopics:JS(Q().trim().min(1).max(300)).max(50).default([])}),$({revision:aC.optional(),name:Q().trim().min(1).max(120),enabled:GS(),documents:JS($({id:iC.optional(),title:Q().trim().min(1).max(500),content:Q().trim().min(1).max(2e6),fileName:Q().trim().max(500).optional(),mediaType:Q().trim().max(200).optional()})).max(200)});var fC=$({id:iC.optional(),title:Q().trim().max(500).optional(),enabled:GS().default(!0)}),pC=XS(`kind`,[fC.extend({kind:$S(`url`),url:Q().url().max(4e3)}),fC.extend({kind:$S(`query`),query:Q().trim().min(1).max(1e3)})]);$({revision:aC.optional(),name:Q().trim().min(1).max(120),enabled:GS(),sources:JS(pC).min(1).max(500)}),$({revision:aC.optional(),name:Q().trim().min(1).max(120),enabled:GS(),identityId:iC,knowledgeBaseIds:JS(iC).max(50).default([]),sourceCollectionIds:JS(iC).max(50),connections:ZS(Q().min(1).max(80),iC),agent:$({modelConnectionId:iC,strategyId:eC([nC.DailyBrief,nC.DeepAnalysis,nC.PracticalGuide]),toolConnectionIds:JS(iC).max(50).default([]),budget:$({maxTurns:WS().int().min(1).max(100).optional()}).optional()}).optional(),researchConnections:$({search:JS(iC).max(20),fetch:JS(iC).max(20)}).refine(e=>new Set(e.search).size===e.search.length&&new Set(e.fetch).size===e.fetch.length,{message:`同一种研究连接不能重复添加`}).default({search:[],fetch:[]}),publishing:$({destinations:JS(dC).max(50)}).default({destinations:[]})}).superRefine((e,t)=>{let n=e.publishing.destinations.map(e=>`${e.accountId}:${e.publicationType}`);new Set(n).size!==n.length&&t.addIssue({code:`custom`,path:[`publishing`,`destinations`],message:`同一账号的发布类型不能重复添加`})}),$({revision:aC.optional(),name:Q().trim().min(1).max(120),enabled:GS().default(!0),channel:iC,connectorId:iC,settings:sC,credentials:sC.optional(),clearCredentials:JS(iC).max(50).optional(),publisher:$({toolConnectionIds:JS(iC).max(20).default([]),layouts:ZS(iC,cC).optional(),writingStyles:ZS(iC,lC).optional()}).optional()}).extend({accountId:iC.optional()}),$({revision:aC.optional(),name:Q().trim().min(1).max(120),enabled:GS(),contentPlanId:iC,instructions:Q().trim().max(4e3).optional(),keywords:JS(Q().trim().min(1).max(100)).max(50).default([]),trigger:XS(`type`,[$({type:$S(`manual`)}),$({type:$S(`schedule`),cron:Q().trim().min(1).max(120),timezone:Q().trim().min(1).max(120)}),$({type:$S(`hotspot`),query:Q().trim().min(1).max(500),intervalMinutes:WS().int().min(5).max(10080)}),$({type:$S(`api`),tokenName:Q().trim().max(120).optional()})])}),$({requestedTopic:Q().trim().min(1).max(500).optional()}),$({planId:iC,requestedTopic:Q().trim().min(1).max(500).optional()}),$({packageId:iC,destinations:JS(dC).min(1).max(50)}).superRefine((e,t)=>{let n=e.destinations.map(e=>`${e.accountId}:${e.publicationType}`);new Set(n).size!==n.length&&t.addIssue({code:`custom`,path:[`destinations`],message:`同一账号的发布类型不能重复添加`})}),$({id:iC}),$({jobId:iC}),$({channel:iC,publicationType:iC,page:tC.number().int().min(1).default(1),pageSize:tC.number().int().min(1).max(100).default(20)}),$({revision:aC}),$({id:iC,versionId:iC});var mC=Q().trim().min(1).max(300);$({profileId:mC}),$({sessionId:mC}),$({sessionId:mC,artifactId:mC}),$({sessionId:mC,turnId:mC}),$({profileId:mC,context:ZS(qS()).default({})}),$({clientTurnId:mC,message:Q().max(2e4).optional(),answers:JS($({questionId:mC,selectedOptionIds:JS(mC).max(12).optional(),text:Q().max(1e4).optional(),urls:JS(Q().url().max(4e3)).max(10).optional(),confirmed:GS().optional(),skipped:GS().optional()})).max(3).optional()}).refine(e=>!!(e.message?.trim()||e.answers?.length),{message:`请输入消息或回答问题`}),$({contentPackageId:mC}),$({receipt:Q().min(1).max(2e4),name:Q().trim().min(1).max(120),description:Q().trim().max(500).optional(),templateId:mC.optional(),revision:aC.optional()}),$({beforeSequence:Q().optional(),afterSequence:Q().optional(),limit:Q().optional()}),$({afterSequence:Q().optional(),sessionId:Q().optional()});var hC=[{id:`all`,label:`全部`,description:`查看全部外部能力连接。`},{id:d9.Model,label:`模型与生成`,description:`对话、向量检索与图片生成模型连接。`},{id:d9.Source,label:`信息来源`,description:`联网搜索、网页抓取与开放社区数据源。`},{id:d9.Notification,label:`通知推送`,description:`任务完成或需要关注时的外部提醒。`},{id:d9.Delivery,label:`发布扩展与网关`,description:`共享发布网关与扩展底座;单平台发布账号仍在「发布账号」中管理。`}];function gC(e){return e===d9.Model||e===d9.Source||e===d9.Notification||e===d9.Delivery?e:`all`}var _C=()=>[`connections`],vC=20;function yC(e=1,t=`all`){return Ra({queryKey:[..._C(),t,e],queryFn:()=>u0(e,vC,t)})}function bC(){let e=Ca();return za({mutationFn:e=>p0(e),onSuccess:()=>e.invalidateQueries({queryKey:_C()})})}function xC(){let e=Ca();return za({mutationFn:({id:e,body:t})=>e?f0(e,t):d0(t),onSuccess:()=>e.invalidateQueries({queryKey:_C()})})}function SC(){return za({mutationFn:e=>m0(e)})}function CC({page:e,category:t=`all`,onPageChange:n,onCategoryChange:r}){let{data:i}=yC(e,t),[a,o]=(0,p.useState)(null),[s,c]=(0,p.useState)(!1),[l,u]=(0,p.useState)(t),[d,f]=(0,p.useState)(``),m=q5(),h=bC(),g=i?.definitions??[],_=i?.items??[],v=i?.countsByCategory??{},y=i?.totalAll??i?.total??0,b=(0,p.useMemo)(()=>new Map((i?.executorStatuses??[]).map(e=>[e.connectionId,e])),[i?.executorStatuses]),x=(0,p.useMemo)(()=>new Map(g.map(e=>[e.id,e])),[g]),S=hC.find(e=>e.id===t)??hC[0],C=(0,p.useMemo)(()=>{let e=d.trim().toLowerCase();return g.filter(t=>l!==`all`&&t.category!==l?!1:!e||t.displayName.toLowerCase().includes(e)||t.description.toLowerCase().includes(e)||t.id.toLowerCase().includes(e)||t.capabilities.some(t=>t.toLowerCase().includes(e))||(t.group?.toLowerCase().includes(e)??!1))},[g,l,d]),w=(0,p.useMemo)(()=>{let e=new Map;for(let t of C){let n=t.group??hC.find(e=>e.id===t.category)?.label??`其他`,r=e.get(n)??[];r.push(t),e.set(n,r)}return[...e.entries()]},[C]);return(0,P.jsxs)(o9,{children:[(0,P.jsx)(B7,{}),(0,P.jsx)(`div`,{className:`overflow-hidden rounded-[var(--radius)] border border-[var(--border)] bg-[var(--surface)]`,children:(0,P.jsx)(`div`,{role:`tablist`,"aria-label":`连接器分类`,className:`flex min-h-11 items-stretch gap-1 overflow-x-auto px-3 sm:px-4`,children:hC.map(e=>{let n=e.id===t,i=e.id===`all`?y:v[e.id]??0;return(0,P.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":n,className:U(`relative flex shrink-0 items-center gap-1.5 px-3 text-sm font-medium text-[var(--muted)] transition-colors duration-[var(--motion-fast)] hover:text-[var(--ink)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--focus)]`,n&&`text-[var(--ink)]`),onClick:()=>r?.(e.id),children:[(0,P.jsx)(`span`,{children:e.label}),(0,P.jsx)(`span`,{className:`text-[11px] font-normal text-[var(--muted)]`,children:i}),n?(0,P.jsx)(J5.span,{layoutId:`connections-category-indicator`,"aria-hidden":!0,className:`absolute inset-x-3 bottom-0 h-px bg-[var(--ink)]`,transition:{duration:m?0:.22,ease:[.16,1,.3,1]}}):null]},e.id)})})}),(0,P.jsx)(r9,{title:t===`all`?`连接列表`:`${S.label}连接`,description:t===`all`?`超时、重试与恢复不属于连接配置;调用失败会由运行记录和检查点安全处理。`:S.description,compact:!0,summary:`共 ${i?.total??0} 个连接`,action:(0,P.jsxs)(N_,{variant:`primary`,onClick:()=>{u(t),f(``),c(!0)},children:[(0,P.jsx)(S_,{className:`size-4`}),`新建连接`]}),empty:!_.length,pagination:(0,P.jsx)(s9,{page:e,pageSize:vC,total:i?.total??0,onChange:n}),children:_.map(e=>{let t=x.get(e.connectorId),n=b.get(e.id),r=n?.platforms.filter(e=>e.loggedIn).length??0,i=n?.accounts?.length??0;return(0,P.jsx)(i9,{title:e.name,description:`${t?.displayName??e.connectorId} · ${t?.description??``}`,status:e.enabled?`ready`:`disabled`,meta:(0,P.jsxs)(`span`,{className:`flex flex-wrap gap-1`,children:[e.connectorId===`browser-extension`?(0,P.jsx)(L7,{tone:n?.online?`success`:`neutral`,children:n?.online?`扩展在线 · ${r} 平台 · ${i} 隔离账号`:`等待扩展配对`}):null,t?.capabilities.map(e=>(0,P.jsx)(L7,{children:e},e))]}),onEdit:()=>t&&o({definition:t,connection:e}),deleteDescription:`删除后无法恢复;正在被方案或账号使用时不会删除。`,onDelete:()=>h.mutateAsync(e.id)},e.id)})}),(0,P.jsx)(C7,{open:s,onOpenChange:c,title:`选择 Connector`,description:`按分类筛选或搜索外部能力连接器;单平台发布账号请在「发布账号」中新增。`,size:`medium`,children:(0,P.jsxs)(`div`,{className:`grid gap-3`,children:[(0,P.jsxs)(`div`,{className:`relative`,children:[(0,P.jsx)(w_,{"aria-hidden":!0,className:`pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-[var(--muted)]`}),(0,P.jsx)(Y5,{value:d,onChange:e=>f(e.target.value),placeholder:`搜索连接器名称或能力…`,className:`pl-9`,"aria-label":`搜索连接器`})]}),(0,P.jsx)(`div`,{role:`tablist`,"aria-label":`选择连接器分类`,className:`flex items-stretch gap-1 overflow-x-auto border-b border-[var(--border)]`,children:hC.map(e=>{let t=e.id===l,n=e.id===`all`?g.length:g.filter(t=>t.category===e.id).length;return(0,P.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":t,className:U(`shrink-0 border-b-2 px-2.5 pb-2 text-xs font-medium transition-colors`,t?`border-[var(--ink)] text-[var(--ink)]`:`border-transparent text-[var(--muted)] hover:text-[var(--ink)]`),onClick:()=>u(e.id),children:[e.label,` (`,n,`)`]},e.id)})}),w.length?(0,P.jsx)(`div`,{className:`grid max-h-[52vh] gap-4 overflow-y-auto pr-1`,children:w.map(([e,t])=>(0,P.jsxs)(`section`,{className:`grid gap-1`,children:[(0,P.jsx)(`h4`,{className:`px-2 text-[11px] font-medium text-[var(--muted)]`,children:e}),(0,P.jsx)(`div`,{className:`divide-y divide-[var(--border)]`,children:t.map(e=>(0,P.jsxs)(`button`,{type:`button`,className:`grid w-full gap-1 rounded-[var(--radius-sm)] px-2 py-3 text-left transition-colors duration-[var(--duration-fast)] hover:bg-[var(--overlay)]`,onClick:()=>{o({definition:e,suggestedName:u9(e.displayName,_.map(e=>e.name))})},children:[(0,P.jsxs)(`span`,{className:`flex flex-wrap items-center gap-2 text-sm font-semibold`,children:[e.displayName,(0,P.jsx)(`span`,{className:`flex flex-wrap gap-1`,children:e.capabilities.map(e=>(0,P.jsx)(L7,{children:e},e))})]}),(0,P.jsx)(`span`,{className:`text-xs leading-5 text-[var(--muted-strong)]`,children:e.description})]},e.id))})]},e))}):(0,P.jsx)(`p`,{className:`py-8 text-center text-xs text-[var(--muted)]`,children:`没有匹配的连接器,试试切换分类或清空搜索词。`})]})}),(0,P.jsx)(wC,{editor:a,onOpenChange:e=>!e&&o(null),onSaved:()=>{o(null),c(!1)}})]})}function wC({editor:e,onOpenChange:t,onSaved:n}){let[r,i]=(0,p.useState)(``),[a,o]=(0,p.useState)(!0),[s,c]=(0,p.useState)({}),[l,u]=(0,p.useState)([]),[d,f]=(0,p.useState)(`{}`),[m,h]=(0,p.useState)(`{}`),[g,_]=(0,p.useState)(`{}`),[v,y]=(0,p.useState)(!1),[b,x]=(0,p.useState)();(0,p.useEffect)(()=>{if(!e)return;i(e.connection?.name??e.suggestedName??e.definition.displayName),o(e.connection?.enabled??!0);let t=Object.fromEntries(e.definition.fields.filter(e=>e.defaultValue!==void 0).map(e=>[e.key,e.defaultValue]));c({...t,...e.connection?.settings}),u([]),f(JSON.stringify(e.connection?.overrides?.headers??{},null,2)),h(JSON.stringify(e.connection?.overrides?.query??{},null,2)),_(JSON.stringify(e.connection?.overrides?.body??{},null,2)),y(!1),x(void 0)},[e]);let S=(e,t)=>{c(n=>({...n,[e.key]:t})),e.location===`credentials`&&typeof t==`string`&&t.trim()&&u(t=>t.filter(t=>t!==e.key))},C=e=>{u(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]),c(t=>({...t,[e]:``}))},w=()=>({id:e?.connection?.id,revision:e?.connection?.revision,connectorId:e.definition.id,name:r.trim(),enabled:a,settings:Object.fromEntries(e.definition.fields.filter(e=>e.location===`settings`).map(e=>[e.key,s[e.key]]).filter(([,e])=>e!==void 0&&e!==``)),credentials:Object.fromEntries(e.definition.fields.filter(e=>e.location===`credentials`).map(e=>[e.key,s[e.key]]).filter(([,e])=>e!==void 0&&e!==``)),...l.length?{clearCredentials:l}:{},overrides:e.definition.requestOverrides?{headers:EC(d,`Headers`),query:EC(m,`Query`),body:EC(g,`Body`)}:void 0}),T=xC(),E=SC();if(!e)return null;let D=[...e.definition.fields].sort((e,t)=>(e.order??0)-(t.order??0)),O=D.filter(e=>e.defaultValue===void 0),ee=D.filter(e=>e.defaultValue!==void 0),k=D.some(t=>{if(!t.required)return!1;let n=s[t.key];return n!==void 0&&n!==``?!1:!(t.location===`credentials`&&e.connection?.credentialState[t.key])});return(0,P.jsxs)(C7,{open:!0,onOpenChange:t,title:e.connection?`编辑连接`:`新建连接`,description:`${e.definition.displayName} · ${e.definition.capabilities.join(` / `)}`,size:`medium`,children:[(0,P.jsxs)(`div`,{className:`grid gap-4`,children:[(0,P.jsx)(`div`,{className:`grid gap-4`,children:O.map(t=>(0,P.jsx)(TC,{field:t,value:s[t.key],hasStoredCredential:!!e.connection?.credentialState[t.key],clearingCredential:l.includes(t.key),onToggleClearCredential:t.location===`credentials`&&!t.required?()=>C(t.key):void 0,onChange:e=>S(t,e)},`${t.location}:${t.key}`))}),(0,P.jsxs)(`details`,{className:`group border-t border-[var(--border)] pt-4`,open:v,onToggle:e=>y(e.currentTarget.open),children:[(0,P.jsxs)(`summary`,{className:`cursor-pointer list-none text-sm font-medium text-[var(--muted-strong)] hover:text-[var(--ink)]`,children:[`高级设置`,(0,P.jsx)(`span`,{className:`ml-2 text-xs font-normal text-[var(--muted)]`,children:`名称、状态与接口参数`})]}),(0,P.jsxs)(`div`,{className:`mt-4 grid gap-4`,children:[(0,P.jsxs)(`div`,{className:`grid gap-4 md:grid-cols-[1fr_auto]`,children:[(0,P.jsx)(G7,{label:`连接名称`,required:!0,children:(0,P.jsx)(Y5,{value:r,onChange:e=>i(e.target.value)})}),(0,P.jsx)(G7,{label:`状态`,children:(0,P.jsxs)(`label`,{className:`flex min-h-11 items-center gap-2`,children:[(0,P.jsx)(`input`,{type:`checkbox`,checked:a,onChange:e=>o(e.target.checked)}),`启用`]})})]}),ee.length?(0,P.jsx)(`div`,{className:`grid gap-4 md:grid-cols-2`,children:ee.map(t=>(0,P.jsx)(TC,{field:t,value:s[t.key],hasStoredCredential:!!e.connection?.credentialState[t.key],clearingCredential:l.includes(t.key),onToggleClearCredential:t.location===`credentials`&&!t.required?()=>C(t.key):void 0,onChange:e=>S(t,e)},`${t.location}:${t.key}`))}):null,e.definition.requestOverrides?(0,P.jsxs)(`details`,{className:`border-t border-[var(--border)] pt-4`,children:[(0,P.jsxs)(`summary`,{className:`cursor-pointer list-none text-sm font-medium`,children:[`请求覆盖`,(0,P.jsx)(`span`,{className:`ml-2 text-xs font-normal text-[var(--muted)]`,children:`Headers · Query · Body`})]}),(0,P.jsx)(`p`,{className:`mt-2 text-xs leading-5 text-[var(--muted-strong)]`,children:`仅用于特殊接入;认证保留字段不能覆盖。`}),(0,P.jsxs)(`div`,{className:`mt-4 grid gap-4`,children:[(0,P.jsx)(G7,{label:`Headers`,children:(0,P.jsx)(o7,{className:`min-h-32 font-mono text-xs`,value:d,onChange:e=>f(e.target.value)})}),(0,P.jsx)(G7,{label:`Query`,children:(0,P.jsx)(o7,{className:`min-h-32 font-mono text-xs`,value:m,onChange:e=>h(e.target.value)})}),(0,P.jsx)(G7,{label:`Body`,children:(0,P.jsx)(o7,{className:`min-h-32 font-mono text-xs`,value:g,onChange:e=>_(e.target.value)})})]})]}):null]})]}),b?(0,P.jsxs)(`div`,{role:`status`,"aria-live":`polite`,className:`rounded border px-3 py-2 text-xs ${b.success?`border-[var(--success-border)] bg-[var(--success-bg)] text-[var(--success)]`:`border-[var(--danger-border)] bg-[var(--danger-bg)] text-[var(--danger)]`}`,children:[b.message,` · `,b.latencyMs,` ms`]}):null,(0,P.jsx)(G_,{error:T.error??E.error})]}),(0,P.jsxs)(w7,{className:`flex justify-between gap-2`,children:[(0,P.jsxs)(N_,{loading:E.isPending,disabled:k,onClick:()=>{x(void 0);try{E.mutate(w(),{onSuccess:e=>{x(e.test),e.test.success?R7.success(`连接测试成功`,`${e.test.message} · ${e.test.latencyMs} ms`):R7.error(`连接测试失败`,e.test.message)},onError:e=>R7.error(`连接测试失败`,e)})}catch(e){x({success:!1,message:K_(e),latencyMs:0}),R7.error(`连接测试失败`,e)}},children:[!E.isPending&&(0,P.jsx)(__,{className:`size-4`}),`测试连接`]}),(0,P.jsxs)(`div`,{className:`flex gap-2`,children:[(0,P.jsx)(N_,{onClick:()=>t(!1),children:`取消`}),(0,P.jsx)(N_,{variant:`primary`,loading:T.isPending,disabled:!r.trim()||k,onClick:()=>T.mutate({id:e.connection?.id,body:w()},{onSuccess:()=>{n(),R7.success(`连接已保存`,`“${r.trim()}”可以用于 Agent。`)},onError:e=>R7.error(`保存连接失败`,e)}),children:`保存连接`})]})]})]})}function TC({field:e,value:t,hasStoredCredential:n,clearingCredential:r=!1,onToggleClearCredential:i,onChange:a}){let o=e.location===`credentials`&&!e.required&&n&&i;return(0,P.jsx)(G7,{label:e.label,required:e.required,helper:e.description,children:e.input===`boolean`?(0,P.jsxs)(`label`,{className:`flex min-h-11 items-center gap-2`,children:[(0,P.jsx)(`input`,{type:`checkbox`,checked:!!t,onChange:e=>a(e.target.checked)}),`启用`]}):e.input===`select`?(0,P.jsx)(i7,{value:DC(t),onChange:e=>a(e.target.value),children:e.options?.map(e=>(0,P.jsx)(`option`,{value:e.value,children:e.label},e.value))}):(0,P.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,P.jsx)(Y5,{type:e.input===`password`?`password`:e.input===`number`?`number`:e.input===`url`?`url`:`text`,value:DC(t),placeholder:n&&!r?`留空保留已有值`:e.placeholder,onChange:t=>a(e.input===`number`?Number(t.target.value):t.target.value)}),o?(0,P.jsxs)(`div`,{className:`flex items-center justify-between gap-2 text-xs text-[var(--muted-strong)]`,children:[(0,P.jsx)(`span`,{children:r?`保存后将清除已存密钥`:`已保存密钥`}),(0,P.jsx)(`button`,{type:`button`,className:`font-medium text-[var(--accent)] hover:underline`,onClick:i,children:r?`撤销清除`:`清除已保存值`})]}):null]})})}function EC(e,t){let n=JSON.parse(e||`{}`);if(!n||typeof n!=`object`||Array.isArray(n))throw Error(`${t} 必须是 JSON 对象`);return n}function DC(e){return typeof e==`string`||typeof e==`number`?String(e):``}var OC=Yr(`/_app/connections`)({validateSearch:e=>{let t=gC(e.category);return{page:Math.max(1,Number(e.page??1)||1),...t===`all`?{}:{category:t}}},component:Xr(()=>R1(()=>import(`./connections-Dfyth9tv.js`),[]),`component`)}),kC=(e=1,t=20)=>c0(o0.api[`content-plans`].$get({query:{page:String(e),pageSize:String(t)}})),AC=e=>c0(o0.api[`content-plans`].$post({json:e})),jC=(e,t)=>c0(o0.api[`content-plans`][`:id`].$patch({param:{id:e},json:t})),MC=e=>c0(o0.api[`content-plans`][`:id`].$delete({param:{id:e}})),NC=()=>R1(()=>import(`./content-plans-me2sZDLU.js`),__vite__mapDeps([15,16,17,12])),PC=()=>[`content-plans`],FC=Yr(`/_app/content-plans`)({validateSearch:e=>({page:Number(e.page??1)||1}),component:Xr(NC,`component`)}),IC=(e=1,t=20)=>c0(o0.api.identities.$get({query:{page:String(e),pageSize:String(t)}})),LC=e=>c0(o0.api.identities.$post({json:e})),RC=(e,t)=>c0(o0.api.identities[`:id`].$patch({param:{id:e},json:t})),zC=e=>c0(o0.api.identities[`:id`].$delete({param:{id:e}})),BC=()=>R1(()=>import(`./identities-CIy7Q2wP.js`),__vite__mapDeps([18,1])),VC=()=>[`identities`],HC=Yr(`/_app/identities`)({validateSearch:e=>({page:Number(e.page??1)||1}),component:Xr(BC,`component`)}),UC=()=>R1(()=>import(`./jobs-CMViOJeL.js`),__vite__mapDeps([19,20,21,22,11])),WC=()=>[`runs`],GC=Yr(`/_app/jobs`)({validateSearch:e=>({page:Number(e.page??1)||1}),component:Xr(UC,`component`)}),KC=(e=1,t=20)=>c0(o0.api[`knowledge-bases`].$get({query:{page:String(e),pageSize:String(t)}})),qC=e=>c0(o0.api[`knowledge-bases`].$post({json:e})),JC=(e,t)=>c0(o0.api[`knowledge-bases`][`:id`].$patch({param:{id:e},json:t})),YC=e=>c0(o0.api[`knowledge-bases`][`:id`].$delete({param:{id:e}})),XC=()=>R1(()=>import(`./knowledge-DQcgNI2r.js`),__vite__mapDeps([23,1,24])),ZC=()=>[`knowledge-bases`],QC=Yr(`/_app/knowledge`)({validateSearch:e=>({page:Number(e.page??1)||1}),component:Xr(XC,`component`)}),$C=Yr(`/_app/library`)({validateSearch:e=>({page:Math.max(1,Number(e.page??1)||1)}),component:Xr(()=>R1(()=>import(`./library-BUCfApCB.js`),__vite__mapDeps([25,1,26,12,27,28,22,11])),`component`)}),ew=Yr(`/_app/publishing`)({validateSearch:e=>({page:Math.max(1,Number(e.page??1)||1),channel:typeof e.channel==`string`?e.channel:void 0}),component:Xr(()=>R1(()=>import(`./publishing-PmNqeFKZ.js`),__vite__mapDeps([29,1,12,30,2,9,4,31,32,33,34])),`component`)}),tw=Yr(`/_app/settings`)({component:Xr(()=>R1(()=>import(`./settings-COO33aq9.js`),__vite__mapDeps([35,12])),`component`)}),nw=(e=1,t=20)=>c0(o0.api[`source-collections`].$get({query:{page:String(e),pageSize:String(t)}})),rw=e=>c0(o0.api[`source-collections`].$post({json:e})),iw=(e,t)=>c0(o0.api[`source-collections`][`:id`].$patch({param:{id:e},json:t})),aw=e=>c0(o0.api[`source-collections`][`:id`].$delete({param:{id:e}})),ow=()=>R1(()=>import(`./sources-IjjBA3jh.js`),__vite__mapDeps([36,1,33])),sw=()=>[`source-collections`],cw=Yr(`/_app/sources`)({validateSearch:e=>({page:Number(e.page??1)||1}),component:Xr(ow,`component`)}),lw=Yr(`/_app/workspace`)({component:Xr(()=>R1(()=>import(`./workspace-BpJcl3Mc.js`),__vite__mapDeps([37,10,1,11,12,2])),`component`)}),uw=Yr(`/_app/content-plans_/new`)({component:Xr(()=>R1(()=>import(`./content-plans_.new-7BHuv528.js`),__vite__mapDeps([38,39,1,3,12,26,40,8,6,31,27,32,33,34,20,21,41,42,17,11,28,22,13])),`component`)}),dw=Yr(`/_app/jobs_/$runId`)({component:Xr(()=>R1(()=>import(`./jobs_._runId-CA8TTEqw.js`),__vite__mapDeps([43,41,1,42,17,20,21,26,31,11,28,22,13])),`component`)}),fw=Yr(`/_app/publishing_/styles`)({validateSearch:e=>({page:Math.max(1,Number(e.page??1)||1),channel:typeof e.channel==`string`?e.channel:void 0}),component:Xr(()=>R1(()=>import(`./publishing_.styles-B3gViZHT.js`),__vite__mapDeps([44,1,16,33,12])),`component`)}),pw=Yr(`/_app/publishing_/templates`)({validateSearch:e=>({page:Math.max(1,Number(e.page??1)||1),channel:typeof e.channel==`string`?e.channel:void 0,publicationType:typeof e.publicationType==`string`?e.publicationType:void 0}),component:Xr(()=>R1(()=>import(`./publishing_.templates-DyfaO52q.js`),__vite__mapDeps([45,1,12,46,34,30,2,42,17,24,5,26,31,40,21])),`component`)}),mw=Yr(`/_app/content-plans_/$planId/edit`)({component:Xr(()=>R1(()=>import(`./content-plans_._planId.edit-7BHuv528.js`),__vite__mapDeps([47,39,1,3,12,26,40,8,6,31,27,32,33,34,20,21,41,42,17,11,28,22,13])),`component`)}),hw=Yr(`/_app/publishing_/templates_/sessions/$sessionId`)({validateSearch:e=>({channel:typeof e.channel==`string`?e.channel:``,publicationType:typeof e.publicationType==`string`?e.publicationType:`article`,page:Math.max(1,Number(e.page??1)||1)}),component:Xr(()=>R1(()=>import(`./publishing_.templates_.sessions._sessionId-C32Beg6R.js`),__vite__mapDeps([48,46,1,34,30,2,42,17,24,5,26,31,12,40,21])),`component`)}),gw=z1.update({id:`/`,path:`/`,getParentRoute:()=>j1}),_w=H1.update({id:`/_app`,getParentRoute:()=>j1}),vw={AppAutomationsRoute:U1.update({id:`/automations`,path:`/automations`,getParentRoute:()=>_w}),AppConnectionsRoute:OC.update({id:`/connections`,path:`/connections`,getParentRoute:()=>_w}),AppContentPlansRoute:FC.update({id:`/content-plans`,path:`/content-plans`,getParentRoute:()=>_w}),AppIdentitiesRoute:HC.update({id:`/identities`,path:`/identities`,getParentRoute:()=>_w}),AppJobsRoute:GC.update({id:`/jobs`,path:`/jobs`,getParentRoute:()=>_w}),AppKnowledgeRoute:QC.update({id:`/knowledge`,path:`/knowledge`,getParentRoute:()=>_w}),AppLibraryRoute:$C.update({id:`/library`,path:`/library`,getParentRoute:()=>_w}),AppPublishingRoute:ew.update({id:`/publishing`,path:`/publishing`,getParentRoute:()=>_w}),AppSettingsRoute:tw.update({id:`/settings`,path:`/settings`,getParentRoute:()=>_w}),AppSourcesRoute:cw.update({id:`/sources`,path:`/sources`,getParentRoute:()=>_w}),AppWorkspaceRoute:lw.update({id:`/workspace`,path:`/workspace`,getParentRoute:()=>_w}),AppContentPlansNewRoute:uw.update({id:`/content-plans_/new`,path:`/content-plans/new`,getParentRoute:()=>_w}),AppJobsRunIdRoute:dw.update({id:`/jobs_/$runId`,path:`/jobs/$runId`,getParentRoute:()=>_w}),AppPublishingStylesRoute:fw.update({id:`/publishing_/styles`,path:`/publishing/styles`,getParentRoute:()=>_w}),AppPublishingTemplatesRoute:pw.update({id:`/publishing_/templates`,path:`/publishing/templates`,getParentRoute:()=>_w}),AppContentPlansPlanIdEditRoute:mw.update({id:`/content-plans_/$planId/edit`,path:`/content-plans/$planId/edit`,getParentRoute:()=>_w}),AppPublishingTemplatesSessionsSessionIdRoute:hw.update({id:`/publishing_/templates_/sessions/$sessionId`,path:`/publishing/templates/sessions/$sessionId`,getParentRoute:()=>_w})},yw={IndexRoute:gw,AppRoute:_w._addFileChildren(vw)},bw=fi({routeTree:j1._addFileChildren(yw)._addFileTypes(),basepath:`/dashboard/`,defaultPreload:`intent`});function xw(){(0,Ba.createRoot)(document.getElementById(`root`)).render((0,P.jsx)(p.StrictMode,{children:(0,P.jsx)(A1,{children:(0,P.jsx)(hi,{router:bw})})}))}xw();export{l7 as $,np as $t,MC as A,oi as An,M_ as At,r9 as B,h_ as Bt,LC as C,oo as Cn,l0 as Ct,FC as D,za as Dn,G_ as Dt,RC as E,Ka as En,Y_ as Et,rC as F,xr as Fn,C_ as Ft,L7 as G,l_ as Gt,Z7 as H,f_ as Ht,p9 as I,yr as In,S_ as It,j7 as J,e_ as Jt,P7 as K,Yg as Kt,m9 as L,Kn as Ln,b_ as Lt,jC as M,Or as Mn,E_ as Mt,OC as N,Dr as Nn,T_ as Nt,PC as O,Ra as On,N_ as Ot,CC as P,Tr as Pn,w_ as Pt,s7 as Q,qg as Qt,s9 as R,Ln as Rn,__ as Rt,VC as S,To as Sn,c0 as St,IC as T,Qa as Tn,H1 as Tt,G7 as U,d_ as Ut,i9 as V,p_ as Vt,R7 as W,u_ as Wt,w7 as X,$g as Xt,C7 as Y,Qg as Yt,_7 as Z,U as Zt,KC as _,Xo as _n,_0 as _t,cw as a,Tc as an,X5 as at,WC as b,Ao as bn,u0 as bt,aw as c,ic as cn,$5 as ct,ew as d,Ws as dn,J5 as dt,ip as en,d7 as et,$C as f,Is as fn,q5 as ft,YC as g,ls as gn,v0 as gt,qC as h,_s as hn,u3 as ht,dw as i,Pl as in,i7 as it,kC as j,Ur as jn,O_ as jt,AC as k,Ca as kn,P_ as kt,nw as l,oc as ln,Q5 as lt,ZC as m,Ds as mn,Y8 as mt,pw as n,$f as nn,p7 as nt,sw as o,yc as on,e7 as ot,QC as p,Ms as pn,X8 as pt,M7 as q,Xg as qt,fw as r,Ul as rn,o7 as rt,rw as s,nc as sn,t7 as st,hw as t,cp as tn,m7 as tt,iw as u,ac as un,Y5 as ut,JC as v,Fo as vn,g0 as vt,zC as w,ro as wn,U1 as wt,HC as x,wo as xn,o0 as xt,GC as y,Mo as yn,h0 as yt,o9 as z,o as zn,g_ as zt};
51
+ `},kl=0,Al=[];function jl(e){var t=p.useRef([]),n=p.useRef([0,0]),r=p.useRef(),i=p.useState(kl++)[0],a=p.useState($c)[0],o=p.useRef(e);p.useEffect(function(){o.current=e},[e]),p.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=kc([e.lockRef.current],(e.shards||[]).map(El),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=p.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=wl(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=_l(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=_l(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return Cl(h,t,e,h===`h`?s:c,!0)},[]),c=p.useCallback(function(e){var n=e;if(Al.length&&Al[Al.length-1]===a){var r=`deltaY`in n?Tl(n):wl(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Dl(e.delta,r)})[0];if(i&&i.should)n.cancelable&&n.preventDefault();else if(!i){var c=(o.current.shards||[]).map(El).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=p.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Ml(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=p.useCallback(function(e){n.current=wl(e),r.current=void 0},[]),d=p.useCallback(function(t){l(t.type,Tl(t),t.target,s(t,e.lockRef.current))},[]),f=p.useCallback(function(t){l(t.type,wl(t),t.target,s(t,e.lockRef.current))},[]);p.useEffect(function(){return Al.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,fl),document.addEventListener(`touchmove`,c,fl),document.addEventListener(`touchstart`,u,fl),function(){Al=Al.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,fl),document.removeEventListener(`touchmove`,c,fl),document.removeEventListener(`touchstart`,u,fl)}},[]);var m=e.removeScrollBar,h=e.inert;return p.createElement(p.Fragment,null,h?p.createElement(a,{styles:Ol(i)}):null,m?p.createElement(ll,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ml(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Nl=Uc(Wc,jl),Pl=p.forwardRef(function(e,t){return p.createElement(Kc,Dc({},e,{ref:t,sideCar:Nl}))});Pl.classNames=Kc.classNames;var Fl=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Il=new WeakMap,Ll=new WeakMap,Rl={},zl=0,Bl=function(e){return e&&(e.host||Bl(e.parentNode))},Vl=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Bl(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Hl=function(e,t,n,r){var i=Vl(t,Array.isArray(e)?e:[e]);Rl[n]||(Rl[n]=new WeakMap);var a=Rl[n],o=[],s=new Set,c=new Set(i),l=function(e){e&&!s.has(e)&&(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){e&&!c.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Il.get(e)||0)+1,l=(a.get(e)||0)+1;Il.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Ll.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),zl++,function(){o.forEach(function(e){var t=Il.get(e)-1,i=a.get(e)-1;Il.set(e,t),a.set(e,i),t||(Ll.has(e)||e.removeAttribute(r),Ll.delete(e)),i||e.removeAttribute(n)}),zl--,zl||(Il=new WeakMap,Il=new WeakMap,Ll=new WeakMap,Rl={})}},Ul=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Fl(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Hl(r,i,n,`aria-hidden`)):function(){return null}},Wl=Object.defineProperty,Gl=(e,t)=>Wl(e,`name`,{value:t,configurable:!0}),Kl=`Dialog`,[ql,Jl]=Ao(Kl),[Yl,L]=ql(Kl),R=Gl(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=p.useRef(null),c=p.useRef(null),{nodes:l,registry:u}=ac(),[d,f]=ls({prop:r,defaultProp:i??!1,onChange:a,caller:Kl}),[m,h]=p.useState(0),[g,_]=p.useState(0);return(0,P.jsx)(Yl,{scope:t,triggerRef:s,contentRef:c,contentId:Ds(),titleId:Ds(),descriptionId:Ds(),titlePresent:m>0,descriptionPresent:g>0,setTitleCount:h,setDescriptionCount:_,open:d,onOpenChange:f,onOpenToggle:p.useCallback(()=>f(e=>!e),[f]),modal:o,branchNodes:l,branchRegistry:u,children:n})},`Dialog`),Xl=`DialogTrigger`,Zl=p.forwardRef(Gl(function(e,t){let{__scopeDialog:n,...r}=e,i=L(Xl,n),a=ro(t,i.triggerRef);return(0,P.jsx)(wo.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":gu(i.open),...r,ref:a,onClick:Xo(e.onClick,i.onOpenToggle)})},`DialogTrigger`)),Ql=`DialogPortal`,[$l,eu]=ql(Ql,{forceMount:void 0}),tu=Gl(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=L(Ql,t);return(0,P.jsx)($l,{scope:t,forceMount:n,children:p.Children.map(r,e=>(0,P.jsx)(_s,{present:n||a.open,children:(0,P.jsx)(yc,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),nu=`DialogOverlay`,ru=p.forwardRef(Gl(function(e,t){let n=eu(nu,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=L(nu,e.__scopeDialog);return a.modal?(0,P.jsx)(_s,{present:r||a.open,children:(0,P.jsx)(au,{...i,ref:t})}):null},`DialogOverlay`)),iu=oo(`DialogOverlay.RemoveScroll`),au=p.forwardRef(Gl(function(e,t){let{__scopeDialog:n,...r}=e,i=L(nu,n),a=ro(t,Gs());return(0,P.jsx)(Pl,{as:iu,allowPinchZoom:!0,shards:p.useMemo(()=>[i.contentRef,...i.branchNodes.map(e=>({current:e}))],[i.contentRef,i.branchNodes]),children:(0,P.jsx)(wo.div,{"data-state":gu(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),ou=`DialogContent`,su=p.forwardRef(Gl(function(e,t){let n=eu(ou,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=L(ou,e.__scopeDialog);return(0,P.jsx)(_s,{present:r||a.open,children:a.modal?(0,P.jsx)(cu,{...i,ref:t}):(0,P.jsx)(lu,{...i,ref:t})})},`DialogContent`)),cu=p.forwardRef(Gl(function(e,t){let n=L(ou,e.__scopeDialog),r=p.useRef(null),i=ro(t,n.contentRef,r);return p.useEffect(()=>{let e=r.current;if(e)return Ul(e)},[]),(0,P.jsx)(uu,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:Xo(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Xo(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:Xo(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),lu=p.forwardRef(Gl(function(e,t){let n=L(ou,e.__scopeDialog),r=p.useRef(!1),i=p.useRef(!1);return(0,P.jsx)(uu,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`DialogContentNonModal`)),uu=p.forwardRef(Gl(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,"aria-describedby":o,children:s,...c}=e,l=L(ou,n);return Tc(),(0,P.jsx)(ic,{registry:l.branchRegistry,children:(0,P.jsx)(nc,{asChild:!0,loop:!0,trapped:r,branches:l.branchNodes,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,P.jsx)(Ws,{role:`dialog`,id:l.contentId,"aria-labelledby":l.titlePresent?l.titleId:void 0,"aria-describedby":l.descriptionPresent?hu(o,l.descriptionId):o,"data-state":gu(l.open),...c,ref:t,deferPointerDownOutside:!0,onDismiss:()=>l.onOpenChange(!1),children:s})})})},`DialogContentImpl`)),du=p.forwardRef(Gl(function(e,t){let{__scopeDialog:n,...r}=e,i=L(`DialogTitle`,n),{setTitleCount:a}=i;return Mo(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,P.jsx)(wo.h2,{id:i.titleId,...r,ref:t})},`DialogTitle`)),fu=p.forwardRef(Gl(function(e,t){let{__scopeDialog:n,...r}=e,i=L(`DialogDescription`,n),{setDescriptionCount:a}=i;return Mo(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,P.jsx)(wo.p,{id:i.descriptionId,...r,ref:t})},`DialogDescription`)),pu=`DialogClose`,mu=p.forwardRef(Gl(function(e,t){let{__scopeDialog:n,...r}=e,i=L(pu,n);return(0,P.jsx)(wo.button,{type:`button`,...r,ref:t,onClick:Xo(e.onClick,()=>i.onOpenChange(!1))})},`DialogClose`));function hu(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}Gl(hu,`concatAriaDescribedby`);function gu(e){return e?`open`:`closed`}Gl(gu,`getState`);var _u=Object.defineProperty,vu=(e,t)=>_u(e,`name`,{value:t,configurable:!0}),[yu,bu]=Ao(`AlertDialog`,[Jl]),xu=Jl(),Su=vu(e=>{let{__scopeAlertDialog:t,...n}=e,r=xu(t);return(0,P.jsx)(R,{...r,...n,modal:!0})},`AlertDialog`);p.forwardRef(vu(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=xu(n);return(0,P.jsx)(Zl,{...i,...r,ref:t})},`AlertDialogTrigger`));var Cu=vu(e=>{let{__scopeAlertDialog:t,...n}=e,r=xu(t);return(0,P.jsx)(tu,{...r,...n})},`AlertDialogPortal`),wu=p.forwardRef(vu(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=xu(n);return(0,P.jsx)(ru,{...i,...r,ref:t})},`AlertDialogOverlay`)),[Tu,Eu]=yu(`AlertDialogContent`),Du=p.forwardRef(vu(function(e,t){let{__scopeAlertDialog:n,children:r,...i}=e,a=xu(n),o=ro(t,p.useRef(null)),s=p.useRef(null);return(0,P.jsx)(Tu,{scope:n,cancelRef:s,children:(0,P.jsx)(su,{role:`alertdialog`,...a,...i,ref:o,onOpenAutoFocus:Xo(i.onOpenAutoFocus,e=>{e.preventDefault(),s.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:r})})},`AlertDialogContent`)),Ou=p.forwardRef(vu(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=xu(n);return(0,P.jsx)(du,{...i,...r,ref:t})},`AlertDialogTitle`)),ku=p.forwardRef(vu(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=xu(n);return(0,P.jsx)(fu,{...i,...r,ref:t})},`AlertDialogDescription`)),Au=p.forwardRef(vu(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=xu(n);return(0,P.jsx)(mu,{...i,...r,ref:t})},`AlertDialogAction`)),ju=`AlertDialogCancel`,Mu=p.forwardRef(vu(function(e,t){let{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=Eu(ju,n),a=xu(n),o=ro(t,i);return(0,P.jsx)(mu,{...a,...r,ref:o})},`AlertDialogCancel`)),Nu=Object.defineProperty,Pu=(e,t)=>Nu(e,`name`,{value:t,configurable:!0});function Fu(e){let[t,n]=p.useState(void 0);return Mo(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=0,r=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;let i=r[0];window.cancelAnimationFrame(t),t=window.requestAnimationFrame(()=>{let t,r;if(`borderBoxSize`in i){let e=i.borderBoxSize,n=Array.isArray(e)?e[0]:e;t=n.inlineSize,r=n.blockSize}else t=e.offsetWidth,r=e.offsetHeight;n({width:t,height:r})})});return r.observe(e,{box:`border-box`}),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}n(void 0)},[e]),t}Pu(Fu,`useSize`);var Iu=[`top`,`right`,`bottom`,`left`],Lu=Math.min,Ru=Math.max,zu=Math.round,Bu=Math.floor,Vu=e=>({x:e,y:e}),Hu={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Uu(e,t,n){return Ru(e,Lu(t,n))}function Wu(e,t){return typeof e==`function`?e(t):e}function Gu(e){return e.split(`-`)[0]}function Ku(e){return e.split(`-`)[1]}function qu(e){return e===`x`?`y`:`x`}function Ju(e){return e===`y`?`height`:`width`}function Yu(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Xu(e){return qu(Yu(e))}function Zu(e,t,n){n===void 0&&(n=!1);let r=Ku(e),i=Xu(e),a=Ju(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=od(o)),[o,od(o)]}function Qu(e){let t=od(e);return[$u(e),t,$u(t)]}function $u(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var ed=[`left`,`right`],td=[`right`,`left`],nd=[`top`,`bottom`],rd=[`bottom`,`top`];function id(e,t,n){switch(e){case`top`:case`bottom`:return n?t?td:ed:t?ed:td;case`left`:case`right`:return t?nd:rd;default:return[]}}function ad(e,t,n,r){let i=Ku(e),a=id(Gu(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map($u)))),a}function od(e){let t=Gu(e);return Hu[t]+e.slice(t.length)}function sd(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function cd(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:sd(e)}function ld(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function ud(e,t,n){let{reference:r,floating:i}=e,a=Yu(t),o=Xu(t),s=Ju(o),c=Gu(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Ku(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function dd(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Wu(t,e),p=cd(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=ld(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=ld(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var fd=50,pd=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:dd},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=ud(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<fd&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=ud(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},md=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Wu(e,t)||{};if(l==null)return{};let d=cd(u),f={x:n,y:r},p=Xu(i),m=Ju(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;C&&await(o.isElement==null?void 0:o.isElement(S))||(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Lu(d[_],T),D=Lu(d[v],T),O=C-h[m]-D,ee=C/2-h[m]/2+w,k=Uu(E,ee,O),te=!c.arrow&&Ku(i)!=null&&ee!==k&&a.reference[m]/2-(ee<E?E:D)-h[m]/2<0,ne=te?ee<E?ee-E:ee-O:0;return{[p]:f[p]+ne,data:{[p]:k,centerOffset:ee-k-ne,...te&&{alignmentOffset:ne}},reset:te}}}),hd=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Wu(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Gu(r),_=Yu(o),v=Gu(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[od(o)]:Qu(o)),x=p!==`none`;!d&&x&&b.push(...ad(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Zu(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===Yu(t)||T.every(e=>Yu(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Yu(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function gd(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function _d(e){return Iu.some(t=>e[t]>=0)}var vd=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Wu(e,t);switch(i){case`referenceHidden`:{let e=gd(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:_d(e)}}}case`escaped`:{let e=gd(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:_d(e)}}}default:return{}}}}},yd=new Set([`left`,`top`]);async function bd(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Gu(n),s=Ku(n),c=Yu(n)===`y`,l=yd.has(o)?-1:1,u=a&&c?-1:1,d=Wu(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var xd=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await bd(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Sd=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Wu(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Yu(i),p=qu(f),m=u[p],h=u[f],g=(e,t)=>Uu(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},Cd=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Wu(e,t),u={x:n,y:r},d=Yu(i),f=qu(d),p=u[f],m=u[d],h=Wu(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=yd.has(Gu(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},wd=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=Wu(e,t),c=await i.detectOverflow(t,s),l=Gu(n),u=Ku(n),d=Yu(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=Lu(p-c[m],g),y=Lu(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*Ru(c.left,c.right):S=p-2*Ru(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function Td(){return typeof window<`u`}function Ed(e){return kd(e)?(e.nodeName||``).toLowerCase():`#document`}function Dd(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Od(e){return((kd(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function kd(e){return Td()?e instanceof Node||e instanceof Dd(e).Node:!1}function Ad(e){return Td()?e instanceof Element||e instanceof Dd(e).Element:!1}function jd(e){return Td()?e instanceof HTMLElement||e instanceof Dd(e).HTMLElement:!1}function Md(e){return!Td()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Dd(e).ShadowRoot}function z(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Ud(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Nd(e){return/^(table|td|th)$/.test(Ed(e))}function Pd(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Fd=/transform|translate|scale|rotate|perspective|filter/,Id=/paint|layout|strict|content/,Ld=e=>!!e&&e!==`none`,Rd;function zd(e){let t=Ad(e)?Ud(e):e;return Ld(t.transform)||Ld(t.translate)||Ld(t.scale)||Ld(t.rotate)||Ld(t.perspective)||!Vd()&&(Ld(t.backdropFilter)||Ld(t.filter))||Fd.test(t.willChange||``)||Id.test(t.contain||``)}function Bd(e){let t=Gd(e);for(;jd(t)&&!Hd(t);){if(zd(t))return t;if(Pd(t))return null;t=Gd(t)}return null}function Vd(){return Rd??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Rd}function Hd(e){return/^(html|body|#document)$/.test(Ed(e))}function Ud(e){return Dd(e).getComputedStyle(e)}function Wd(e){return Ad(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Gd(e){if(Ed(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Md(e)&&e.host||Od(e);return Md(t)?t.host:t}function Kd(e){let t=Gd(e);return Hd(t)?(e.ownerDocument||e).body:jd(t)&&z(t)?t:Kd(t)}function qd(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Kd(e),i=r===e.ownerDocument?.body,a=Dd(r);if(i){let e=Jd(a);return t.concat(a,a.visualViewport||[],z(r)?r:[],e&&n?qd(e):[])}return t.concat(r,qd(r,[],n))}function Jd(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Yd(e){let t=Ud(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=jd(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=zu(n)!==a||zu(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Xd(e){return Ad(e)?e:e.contextElement}function Zd(e){let t=Xd(e);if(!jd(t))return Vu(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Yd(t),o=(a?zu(n.width):n.width)/r,s=(a?zu(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}var Qd=Vu(0);function $d(e){let t=Dd(e);return!Vd()||!t.visualViewport?Qd:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ef(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Dd(e)}function tf(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Xd(e),o=Vu(1);t&&(r?Ad(r)&&(o=Zd(r)):o=Zd(e));let s=ef(a,n,r)?$d(a):Vu(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=Dd(a),t=Ad(r)?Dd(r):r,n=e,i=Jd(n);for(;i&&t!==n;){let e=Zd(i),t=i.getBoundingClientRect(),r=Ud(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Dd(i),i=Jd(n)}}return ld({width:u,height:d,x:c,y:l})}function nf(e,t){let n=Wd(e).scrollLeft;return t?t.left+n:tf(Od(e)).left+n}function rf(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-nf(e,n),y:n.top+t.scrollTop}}function af(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Od(r),s=t?Pd(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Vu(1),u=Vu(0),d=jd(r);if((d||!a)&&((Ed(r)!==`body`||z(o))&&(c=Wd(r)),d)){let e=tf(r);l=Zd(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?rf(o,c):Vu(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function of(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function sf(e){let t=Wd(e),n=e.ownerDocument.body,r=Ru(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Ru(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+nf(e),o=-t.scrollTop;return Ud(n).direction===`rtl`&&(a+=Ru(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var cf=25;function lf(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Dd(e),a=Od(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Vd()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(nf(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=cf&&(s-=o)}return{width:s,height:c,x:l,y:u}}function uf(e,t){let n=tf(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Zd(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function df(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=lf(e,n,t);else if(t===`document`)r=sf(Od(e));else if(Ad(t))r=uf(t,n);else{let n=$d(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return ld(r)}function ff(e,t){let n=t.get(e);if(n)return n;let r=qd(e,[],!1).filter(e=>Ad(e)&&Ed(e)!==`body`),i=null,a=Ud(e).position===`fixed`,o=a?Gd(e):e;for(;Ad(o)&&!Hd(o);){let e=Ud(o),t=zd(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=Gd(o)}return t.set(e,r),r}function pf(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Pd(t)?[]:ff(t,this._c):[].concat(n),r],o=df(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=df(t,a[e],i);s=Ru(n.top,s),c=Lu(n.right,c),l=Lu(n.bottom,l),u=Ru(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function mf(e){let{width:t,height:n}=Yd(e);return{width:t,height:n}}function hf(e,t,n){let r=jd(t),i=Od(t),a=n===`fixed`,o=tf(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Vu(0);if((r||!a)&&((Ed(t)!==`body`||z(i))&&(s=Wd(t)),r)){let e=tf(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=nf(i));let l=i&&!r&&!a?rf(i,s):Vu(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function gf(e){return Ud(e).position===`static`}function _f(e,t){if(!jd(e)||Ud(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Od(e)===n&&(n=n.ownerDocument.body),n}function vf(e,t){let n=Dd(e);if(Pd(e))return n;if(!jd(e)){let t=Gd(e);for(;t&&!Hd(t);){if(Ad(t)&&!gf(t))return t;t=Gd(t)}return n}let r=_f(e,t);for(;r&&Nd(r)&&gf(r);)r=_f(r,t);return r&&Hd(r)&&gf(r)&&!zd(r)?n:r||Bd(e)||n}var yf=async function(e){let t=this.getOffsetParent||vf,n=await(0,this.getDimensions)(e.floating);return{reference:hf(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function bf(e){return Ud(e).direction===`rtl`}var xf={convertOffsetParentRelativeRectToViewportRelativeRect:af,getDocumentElement:Od,getClippingRect:pf,getOffsetParent:vf,getElementRects:yf,getClientRects:of,getDimensions:mf,getScale:Zd,isElement:Ad,isRTL:bf};function Sf(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Cf(e,t,n){let r=null,i,a=Od(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=Bu(d),h=Bu(a.clientWidth-(u+f)),g=Bu(a.clientHeight-(d+p)),_=Bu(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Ru(0,Lu(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!Sf(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=Dd(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function wf(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Xd(e),u=i||a?[...l?qd(l):[],...t?qd(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Cf(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?tf(e):null;c&&g();function g(){let t=tf(e);h&&!Sf(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Tf=xd,Ef=Sd,Df=hd,Of=wd,kf=vd,Af=md,jf=Cd,Mf=(e,t,n)=>{let r=new Map,i=n??{},a={...xf,...i.platform,_c:r};return pd(e,t,{...i,platform:a})},Nf=typeof document<`u`?p.useLayoutEffect:function(){};function Pf(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Pf(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Pf(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Ff(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function If(e,t){let n=Ff(e);return Math.round(t*n)/n}function Lf(e){let t=p.useRef(e);return Nf(()=>{t.current=e}),t}function Rf(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=p.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,m]=p.useState(r);Pf(f,r)||m(r);let[h,g]=p.useState(null),[_,v]=p.useState(null),y=p.useCallback(e=>{e!==C.current&&(C.current=e,g(e))},[]),b=p.useCallback(e=>{e!==w.current&&(w.current=e,v(e))},[]),x=a||h,S=o||_,C=p.useRef(null),w=p.useRef(null),T=p.useRef(u),E=c!=null,D=Lf(c),O=Lf(i),ee=Lf(l),k=p.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),Mf(C.current,w.current,e).then(e=>{let t={...e,isPositioned:ee.current!==!1};te.current&&!Pf(T.current,t)&&(T.current=t,xo.flushSync(()=>{d(t)}))})},[f,t,n,O,ee]);Nf(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let te=p.useRef(!1);Nf(()=>(te.current=!0,()=>{te.current=!1}),[]),Nf(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,k);k()}},[x,S,k,D,E]);let ne=p.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),A=p.useMemo(()=>({reference:x,floating:S}),[x,S]),re=p.useMemo(()=>{let e={position:n,left:0,top:0};if(!A.floating)return e;let t=If(A.floating,u.x),r=If(A.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Ff(A.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,A.floating,u.x,u.y]);return p.useMemo(()=>({...u,update:k,refs:ne,elements:A,floatingStyles:re}),[u,k,ne,A,re])}var zf=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Af({element:r.current,padding:i}).fn(n):r?Af({element:r,padding:i}).fn(n):{}}}},Bf=(e,t)=>{let n=Tf(e);return{name:n.name,fn:n.fn,options:[e,t]}},Vf=(e,t)=>{let n=Ef(e);return{name:n.name,fn:n.fn,options:[e,t]}},Hf=(e,t)=>({fn:jf(e).fn,options:[e,t]}),Uf=(e,t)=>{let n=Df(e);return{name:n.name,fn:n.fn,options:[e,t]}},Wf=(e,t)=>{let n=Of(e);return{name:n.name,fn:n.fn,options:[e,t]}},Gf=(e,t)=>{let n=kf(e);return{name:n.name,fn:n.fn,options:[e,t]}},Kf=(e,t)=>{let n=zf(e);return{name:n.name,fn:n.fn,options:[e,t]}},qf=Object.defineProperty,Jf=(e,t)=>qf(e,`name`,{value:t,configurable:!0}),Yf={Partial:`partial`,Always:`always`},Xf={Optimized:`optimized`,Always:`always`},Zf=`Popper`,[Qf,$f]=Ao(Zf),[ep,tp]=Qf(Zf),np=Jf(e=>{let{__scopePopper:t,children:n}=e,[r,i]=p.useState(null),[a,o]=p.useState(void 0);return(0,P.jsx)(ep,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),rp=`PopperAnchor`,ip=p.forwardRef(Jf(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=tp(rp,n),o=p.useRef(null),s=a.onAnchorChange,c=ro(t,p.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=p.useRef(null);p.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&dp(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,P.jsx)(wo.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})},`PopperAnchor`)),ap=`PopperContent`,[op,sp]=Qf(ap),cp=p.forwardRef(Jf(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=Yf.Partial,hideWhenDetached:f=!1,updatePositionStrategy:m=Xf.Optimized,onPlaced:h,...g}=e,_=tp(ap,n),[v,y]=p.useState(null),b=ro(t,y),[x,S]=p.useState(null),C=Fu(x),w=C?.width??0,T=C?.height??0,E=r+(a===`center`?``:`-`+a),D=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},O=Array.isArray(l)?l:[l],ee=O.length>0,k={padding:D,boundary:O.filter(lp),altBoundary:ee},{refs:te,floatingStyles:ne,placement:A,isPositioned:re,middlewareData:ie}=Rf({strategy:`fixed`,placement:E,whileElementsMounted:Jf((...e)=>wf(...e,{animationFrame:m===Xf.Always}),`whileElementsMounted`),elements:{reference:_.anchor},middleware:[Bf({mainAxis:i+T,alignmentAxis:o}),c&&Vf({mainAxis:!0,crossAxis:!1,...d===Yf.Partial?{limiter:Hf()}:{},...k}),c&&Uf({...k}),Wf({...k,apply:Jf(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}),x&&Kf({element:x,padding:s}),up({arrowWidth:w,arrowHeight:T}),f&&Gf(ee?{strategy:`referenceHidden`,...k}:{strategy:`referenceHidden`,padding:k.padding,altBoundary:k.altBoundary})]}),j=_.setPlacementState;Mo(()=>(j(A),()=>{j(void 0)}),[A,j]);let[M,ae]=dp(A),oe=Is(h);Mo(()=>{re&&oe?.()},[re,oe]);let se=ie.arrow?.x,ce=ie.arrow?.y,N=ie.arrow?.centerOffset!==0,[le,ue]=p.useState();return Mo(()=>{v&&ue(window.getComputedStyle(v).zIndex)},[v]),(0,P.jsx)(`div`,{ref:te.setFloating,"data-radix-popper-content-wrapper":``,style:{...ne,transform:re?ne.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:le,"--radix-popper-transform-origin":[ie.transformOrigin?.x,ie.transformOrigin?.y].join(` `),...ie.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,P.jsx)(op,{scope:n,placedSide:M,placedAlign:ae,onArrowChange:S,arrowX:se,arrowY:ce,shouldHideArrow:N,children:(0,P.jsx)(wo.div,{"data-side":M,"data-align":ae,...g,ref:b,style:{...g.style,animation:re?g.style?.animation:`none`}})})})},`PopperContent`));function lp(e){return e!==null}Jf(lp,`isNotNull`);var up=Jf(e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=dp(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function dp(e){let[t,n=`center`]=e.split(`-`);return[t,n]}Jf(dp,`getSideAndAlignFromPlacement`);var fp=Object.defineProperty,pp=(e,t)=>fp(e,`name`,{value:t,configurable:!0});function mp(e,[t,n]){return Math.min(n,Math.max(t,e))}pp(mp,`clamp`);var hp=Object.defineProperty,gp=(e,t)=>hp(e,`name`,{value:t,configurable:!0}),_p=`Popover`,[vp,yp]=Ao(_p,[$f]),bp=$f(),[xp,Sp]=vp(_p),Cp=gp(e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=bp(t),c=p.useRef(null),[l,u]=p.useState(!1),[d,f]=p.useState(0),[m,h]=p.useState(0),[g,_]=ls({prop:r,defaultProp:i??!1,onChange:a,caller:_p});return(0,P.jsx)(np,{...s,children:(0,P.jsx)(xp,{scope:t,contentId:Ds(),titleId:Ds(),descriptionId:Ds(),titlePresent:d>0,descriptionPresent:m>0,setTitleCount:f,setDescriptionCount:h,triggerRef:c,open:g,onOpenChange:_,onOpenToggle:p.useCallback(()=>_(e=>!e),[_]),hasCustomAnchor:l,onCustomAnchorAdd:p.useCallback(()=>u(!0),[]),onCustomAnchorRemove:p.useCallback(()=>u(!1),[]),modal:o,children:n})})},`Popover`),wp=`PopoverTrigger`,Tp=p.forwardRef(gp(function(e,t){let{__scopePopover:n,...r}=e,i=Sp(wp,n),a=bp(n),o=ro(t,i.triggerRef),s=(0,P.jsx)(wo.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":Ip(i.open),...r,ref:o,onClick:Xo(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,P.jsx)(ip,{asChild:!0,...a,children:s})},`PopoverTrigger`)),Ep=`PopoverPortal`,[Dp,Op]=vp(Ep,{forceMount:void 0}),kp=gp(e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=Sp(Ep,t);return(0,P.jsx)(Dp,{scope:t,forceMount:n,children:(0,P.jsx)(_s,{present:n||a.open,children:(0,P.jsx)(yc,{asChild:!0,container:i,children:r})})})},`PopoverPortal`),Ap=`PopoverContent`,jp=p.forwardRef(gp(function(e,t){let n=Op(Ap,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=Sp(Ap,e.__scopePopover);return(0,P.jsx)(_s,{present:r||a.open,children:a.modal?(0,P.jsx)(Np,{...i,ref:t}):(0,P.jsx)(Pp,{...i,ref:t})})},`PopoverContent`)),Mp=oo(`PopoverContent.RemoveScroll`),Np=p.forwardRef(gp(function(e,t){let n=Sp(Ap,e.__scopePopover),r=p.useRef(null),i=ro(t,r),a=p.useRef(!1),{nodes:o,registry:s}=ac();return p.useEffect(()=>{let e=r.current;if(e)return Ul(e)},[]),(0,P.jsx)(Pl,{as:Mp,allowPinchZoom:!0,shards:p.useMemo(()=>[r,...o.map(e=>({current:e}))],[r,o]),children:(0,P.jsx)(Fp,{...e,ref:i,branchNodes:o,branchRegistry:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Xo(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:Xo(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;a.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:Xo(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})},`PopoverContentModal`)),Pp=p.forwardRef(gp(function(e,t){let n=Sp(Ap,e.__scopePopover),r=p.useRef(!1),i=p.useRef(!1);return(0,P.jsx)(Fp,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`PopoverContentNonModal`)),Fp=p.forwardRef(gp(function(e,t){let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,"aria-describedby":d,branchNodes:f,branchRegistry:m,...h}=e,g=Sp(Ap,n),_=bp(n),[v,y]=p.useState(null),b=ro(t,y);return oc(v),Tc(),(0,P.jsx)(ic,{registry:m,children:(0,P.jsx)(nc,{asChild:!0,loop:!0,trapped:r,branches:f,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,P.jsx)(Ws,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>g.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,P.jsx)(cp,{"data-state":Ip(g.open),role:`dialog`,id:g.contentId,"aria-labelledby":g.titlePresent?g.titleId:void 0,"aria-describedby":g.descriptionPresent?Lp(d,g.descriptionId):d,..._,...h,ref:b,style:{...h.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})})},`PopoverContentImpl`));function Ip(e){return e?`open`:`closed`}gp(Ip,`getState`);function Lp(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}gp(Lp,`concatAriaDescribedby`);var Rp=Object.defineProperty,zp=(e,t)=>Rp(e,`name`,{value:t,configurable:!0}),Bp={ItemAligned:`item-aligned`,Popper:`popper`},Vp={LTR:`ltr`,RTL:`rtl`},Hp=[` `,`Enter`,`ArrowUp`,`ArrowDown`],Up=[` `,`Enter`],Wp=`Select`,[Gp,Kp,qp]=Fo(Wp),[Jp,Yp]=Ao(Wp,[qp,$f]),Xp=$f(),[Zp,Qp]=Jp(Wp),[$p,em]=Jp(Wp);function tm(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:m,form:h,internal_do_not_use_render:g}=e,_=Xp(t),[v,y]=p.useState(null),[b,x]=p.useState(null),[S,C]=p.useState(!1),w=Ms(l),[T,E]=ls({prop:r,defaultProp:i??!1,onChange:a,caller:Wp}),[D,O]=ls({prop:o,defaultProp:s,onChange:c,caller:Wp}),ee=p.useRef(null),k=p.useRef(!1),[te,ne]=p.useState(null),A=zp(e=>{ne({value:e,hasConsumerStoppedPropagation:k.current}),O(e)},`handleUserSelect`),re=p.useRef(D);p.useEffect(()=>{let e=h?v?.ownerDocument.getElementById(h):v?.form;if(e instanceof HTMLFormElement){let t=zp(()=>O(re.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[h,v,O]);let ie=!v||!!h||!!v.closest(`form`),[j,M]=p.useState(new Set),ae=Ds(),oe=Array.from(j).map(e=>e.props.value).join(`;`),se=p.useCallback(e=>{M(t=>new Set(t).add(e))},[]),ce=p.useCallback(e=>{M(t=>{let n=new Set(t);return n.delete(e),n})},[]),N={required:m,trigger:v,onTriggerChange:y,valueNode:b,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:ae,value:D,onValueChange:O,hasConsumerStoppedPropagationRef:k,userSelection:te,onUserSelect:A,open:T,onOpenChange:E,dir:w,triggerPointerDownPosRef:ee,disabled:f,name:u,autoComplete:d,form:h,nativeOptions:j,nativeSelectKey:oe,isFormControl:ie};return(0,P.jsx)(np,{..._,children:(0,P.jsx)(Zp,{scope:t,...N,children:(0,P.jsx)(Gp.Provider,{scope:t,children:(0,P.jsx)($p,{scope:t,onNativeOptionAdd:se,onNativeOptionRemove:ce,children:Um(g)?g(N):n})})})})}zp(tm,`SelectProvider`);var nm=zp(e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,P.jsx)(tm,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,P.jsxs)(P.Fragment,{children:[n,e?(0,P.jsx)(Hm,{__scopeSelect:t}):null]})})},`Select`),rm=`SelectTrigger`,im=p.forwardRef(zp(function(e,t){let{__scopeSelect:n,disabled:r=!1,...i}=e,a=Xp(n),o=Qp(rm,n),s=o.disabled||r,c=ro(t,o.onTriggerChange),l=Kp(n),u=p.useRef(`touch`),[d,f,m]=Gm(e=>{let t=l().filter(e=>!e.disabled),n=Km(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onUserSelect(n.value)}),h=zp(e=>{s||(o.onOpenChange(!0),m()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})},`handleOpen`);return(0,P.jsx)(ip,{asChild:!0,...a,children:(0,P.jsx)(wo.button,{type:`button`,role:`combobox`,"aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":Wm(o.value)?``:void 0,...i,ref:c,onClick:Xo(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&h(e)}),onPointerDown:Xo(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(h(e),e.preventDefault())}),onKeyDown:Xo(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&(o.hasConsumerStoppedPropagationRef.current=e.isPropagationStopped(),f(e.key)),t&&e.key===` `||Hp.includes(e.key)&&(h(),e.preventDefault())})})})},`SelectTrigger`)),am=`SelectValue`,om=p.forwardRef(zp(function(e,t){let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=Qp(am,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=ro(t,c.onValueNodeChange);Mo(()=>{l(u)},[l,u]);let f=Wm(c.value);return(0,P.jsx)(wo.span,{...s,asChild:!f&&s.asChild,ref:d,style:{pointerEvents:`none`},children:(0,P.jsx)(p.Fragment,{children:f?o:a},f?`placeholder`:`value`)})},`SelectValue`)),sm=p.forwardRef(zp(function(e,t){let{__scopeSelect:n,children:r,...i}=e;return(0,P.jsx)(wo.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})},`SelectIcon`)),[cm,lm]=Jp(`SelectPortal`,{forceMount:void 0}),um=zp(e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,P.jsx)(cm,{scope:e.__scopeSelect,forceMount:n,children:(0,P.jsx)(yc,{asChild:!0,...r})})},`SelectPortal`),dm=`SelectContent`,fm=p.forwardRef(zp(function(e,t){let n=lm(dm,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=Qp(dm,e.__scopeSelect),[o,s]=p.useState();return Mo(()=>{s(new DocumentFragment)},[]),(0,P.jsx)(_s,{present:r||a.open,children:({present:e})=>e?(0,P.jsx)(vm,{...i,ref:t}):(0,P.jsx)(pm,{...i,fragment:o})})},`SelectContent`)),pm=p.forwardRef(zp(function(e,t){let{__scopeSelect:n,children:r,fragment:i}=e;return i?xo.createPortal((0,P.jsx)(hm,{scope:n,children:(0,P.jsx)(Gp.Slot,{scope:n,children:(0,P.jsx)(`div`,{ref:t,children:r})})}),i):null},`SelectContentFragment`)),mm=10,[hm,gm]=Jp(dm),_m=oo(`SelectContent.RemoveScroll`),vm=p.forwardRef(zp(function(e,t){let{__scopeSelect:n}=e,{position:r=Bp.ItemAligned,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:m,sticky:h,hideWhenDetached:g,avoidCollisions:_,...v}=e,y=Qp(dm,n),[b,x]=p.useState(null),[S,C]=p.useState(null),w=ro(t,x),[T,E]=p.useState(null),[D,O]=p.useState(null),ee=Kp(n),[k,te]=p.useState(!1),ne=p.useRef(!1),A=p.useRef(!1),re=p.useRef(!1);p.useEffect(()=>{if(b)return Ul(b)},[b]),Tc();let ie=p.useCallback(e=>{let[t,...n]=ee().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&S&&(S.scrollTop=0),n===r&&S&&(S.scrollTop=S.scrollHeight),n?.focus(),document.activeElement!==i))return},[ee,S]),j=p.useCallback(()=>ie([T,b]),[ie,T,b]);p.useEffect(()=>{k&&j()},[k,j]);let{onOpenChange:M,triggerPointerDownPosRef:ae}=y;p.useEffect(()=>{if(b){let e={x:0,y:0},t=zp(t=>{e={x:Math.abs(Math.round(t.pageX)-(ae.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(ae.current?.y??0))}},`handlePointerMove`),n=zp(n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(b)||M(!1),document.removeEventListener(`pointermove`,t),ae.current=null},`handlePointerUp`);return ae.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[b,M,ae]),p.useEffect(()=>{let e=zp(()=>M(!1),`close`);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[M]);let[oe,se]=Gm(e=>{let t=ee().filter(e=>!e.disabled),n=Km(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),ce=p.useCallback((e,t,n)=>{let r=!A.current;r&&(A.current=!0);let i=!ne.current&&!n;y.value!==void 0&&y.value===t||i?(E(e),i&&(ne.current=!0)):r&&E(e)},[y.value]),N=p.useCallback(()=>b?.focus(),[b]),le=p.useCallback((e,t,n)=>{if(!e)return;let r=!re.current;r&&(re.current=!0);let i=!ne.current&&!n;(y.value!==void 0&&y.value===t||i||r)&&O(e)},[y.value]),ue=r===Bp.Popper?bm:ym,de=ue===bm?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:m,sticky:h,hideWhenDetached:g,avoidCollisions:_}:{};return(0,P.jsx)(hm,{scope:n,content:b,viewport:S,onViewportChange:C,itemRefCallback:ce,selectedItem:T,onItemLeave:N,itemTextRefCallback:le,focusSelectedItem:j,selectedItemText:D,position:r,isPositioned:k,searchRef:oe,children:(0,P.jsx)(Pl,{as:_m,allowPinchZoom:!0,children:(0,P.jsx)(nc,{asChild:!0,trapped:y.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:Xo(i,e=>{y.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,P.jsx)(Ws,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:(0,P.jsx)(ue,{role:`listbox`,id:y.contentId,"data-state":y.open?`open`:`closed`,dir:y.dir,onContextMenu:e=>e.preventDefault(),...v,...de,onPlaced:()=>te(!0),ref:w,style:{display:`flex`,flexDirection:`column`,outline:`none`,...v.style},onKeyDown:Xo(v.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&se(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=ee().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>ie(t)),e.preventDefault()}})})})})})})},`SelectContentImpl`)),ym=p.forwardRef(zp(function(e,t){let{__scopeSelect:n,onPlaced:r,...i}=e,a=Qp(dm,n),o=gm(dm,n),[s,c]=p.useState(null),[l,u]=p.useState(null),d=ro(t,u),f=Kp(n),m=p.useRef(!1),h=p.useRef(!0),{viewport:g,selectedItem:_,selectedItemText:v,focusSelectedItem:y}=o,b=p.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&g&&_&&v){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=v.getBoundingClientRect();if(a.dir!==Vp.RTL){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-mm,d=mp(a,[mm,Math.max(mm,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-mm,d=mp(a,[mm,Math.max(mm,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-mm*2,u=g.scrollHeight,d=window.getComputedStyle(l),p=parseInt(d.borderTopWidth,10),h=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=p+h+u+b+y,S=Math.min(_.offsetHeight*5,x),C=window.getComputedStyle(g),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-mm,D=c-E,O=_.offsetHeight/2,ee=_.offsetTop+O,k=p+h+ee,te=x-k;if(k<=E){let e=o.length>0&&_===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-g.offsetTop-g.offsetHeight,n=k+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&_===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,p+g.offsetTop+(e?w:0)+O)+te;s.style.height=t+`px`,g.scrollTop=k-E+g.offsetTop}s.style.margin=`${mm}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>m.current=!0)}},[f,a.trigger,a.valueNode,s,l,g,_,v,a.dir,r]);Mo(()=>b(),[b]);let[x,S]=p.useState();Mo(()=>{l&&S(window.getComputedStyle(l).zIndex)},[l]);let C=p.useCallback(e=>{e&&h.current===!0&&(b(),y?.(),h.current=!1)},[b,y]);return(0,P.jsx)(xm,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:m,onScrollButtonChange:C,children:(0,P.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:x},children:(0,P.jsx)(wo.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})},`SelectItemAlignedPosition`)),bm=p.forwardRef(zp(function(e,t){let{__scopeSelect:n,align:r=`start`,collisionPadding:i=mm,...a}=e,o=Xp(n);return(0,P.jsx)(cp,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})},`SelectPopperPosition`)),[xm,Sm]=Jp(dm,{}),Cm=`SelectViewport`,wm=p.forwardRef(zp(function(e,t){let{__scopeSelect:n,nonce:r,...i}=e,a=gm(Cm,n),o=Sm(Cm,n),s=ro(t,a.onViewportChange),c=p.useRef(0);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,P.jsx)(Gp.Slot,{scope:n,children:(0,P.jsx)(wo.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:Xo(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-mm*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})},`SelectViewport`)),[Tm,Em]=Jp(`SelectGroup`),Dm=p.forwardRef(zp(function(e,t){let{__scopeSelect:n,...r}=e,i=Ds();return(0,P.jsx)(Tm,{scope:n,id:i,children:(0,P.jsx)(wo.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})},`SelectGroup`)),Om=`SelectItem`,[km,Am]=Jp(Om),jm=p.forwardRef(zp(function(e,t){let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=Qp(Om,n),c=gm(Om,n),l=s.value===r,[u,d]=p.useState(a??``),[f,m]=p.useState(!1),h=ro(t,Is(e=>c.itemRefCallback?.(e,r,i))),g=Ds(),_=p.useRef(`touch`);function v(e){s.hasConsumerStoppedPropagationRef.current=e.isPropagationStopped(),s.onUserSelect(r),s.onOpenChange(!1)}return zp(v,`handleSelect`),(0,P.jsx)(km,{scope:n,value:r,disabled:i,textId:g,isSelected:l,onItemTextChange:p.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,P.jsx)(Gp.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,P.jsx)(wo.div,{role:`option`,"aria-labelledby":g,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:h,onFocus:Xo(o.onFocus,()=>m(!0)),onBlur:Xo(o.onBlur,()=>m(!1)),onClick:Xo(o.onClick,e=>{i||_.current!==`mouse`&&v(e)}),onPointerUp:Xo(o.onPointerUp,e=>{i||_.current===`mouse`&&v(e)}),onPointerDown:Xo(o.onPointerDown,e=>{_.current=e.pointerType}),onPointerMove:Xo(o.onPointerMove,e=>{_.current=e.pointerType,i?c.onItemLeave?.():_.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Xo(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:Xo(o.onKeyDown,e=>{i||e.target!==e.currentTarget||(c.searchRef?.current===``||e.key!==` `)&&(Up.includes(e.key)&&v(e),e.key===` `&&e.preventDefault())})})})})},`SelectItem`)),Mm=`SelectItemText`,Nm=p.forwardRef(zp(function(e,t){let{__scopeSelect:n,className:r,style:i,...a}=e,o=Qp(Mm,n),s=gm(Mm,n),c=Am(Mm,n),l=em(Mm,n),[u,d]=p.useState(null),f=Is(e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),m=ro(t,d,c.onItemTextChange,f),h=u?.textContent,g=p.useMemo(()=>(0,P.jsx)(`option`,{value:c.value,disabled:c.disabled,children:h},c.value),[c.disabled,c.value,h]),{onNativeOptionAdd:_,onNativeOptionRemove:v}=l;return Mo(()=>(_(g),()=>v(g)),[_,v,g]),(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(wo.span,{id:c.textId,...a,ref:m}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren&&!Wm(o.value)?xo.createPortal(a.children,o.valueNode):null]})},`SelectItemText`)),Pm=`SelectItemIndicator`,Fm=p.forwardRef(zp(function(e,t){let{__scopeSelect:n,...r}=e;return Am(Pm,n).isSelected?(0,P.jsx)(wo.span,{"aria-hidden":!0,...r,ref:t}):null},`SelectItemIndicator`)),Im=`SelectScrollUpButton`,Lm=p.forwardRef(zp(function(e,t){let n=gm(Im,e.__scopeSelect),r=Sm(Im,e.__scopeSelect),[i,a]=p.useState(!1),o=ro(t,r.onScrollButtonChange);return Mo(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollTop>0;a(e)};zp(e,`handleScroll`);let t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,P.jsx)(Bm,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null},`SelectScrollUpButton`)),Rm=`SelectScrollDownButton`,zm=p.forwardRef(zp(function(e,t){let n=gm(Rm,e.__scopeSelect),r=Sm(Rm,e.__scopeSelect),[i,a]=p.useState(!1),o=ro(t,r.onScrollButtonChange);return Mo(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)};zp(e,`handleScroll`);let t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,P.jsx)(Bm,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null},`SelectScrollDownButton`)),Bm=p.forwardRef(zp(function(e,t){let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=gm(`SelectScrollButton`,n),o=p.useRef(null),s=Kp(n),c=p.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return p.useEffect(()=>()=>c(),[c]),Mo(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,P.jsx)(wo.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Xo(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:Xo(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:Xo(i.onPointerLeave,()=>{c()})})},`SelectScrollButtonImpl`)),Vm=`SelectBubbleInput`,Hm=p.forwardRef(zp(function({__scopeSelect:e,...t},n){let r=Qp(Vm,e),{value:i,onValueChange:a,required:o,disabled:s,name:c,autoComplete:l,form:u,userSelection:d}=r,{nativeOptions:f,nativeSelectKey:m}=r,h=p.useRef(null),g=ro(n,h),_=i??``,v=p.useRef(_),y=p.useRef(d),b=p.useRef(!1),x=Array.from(f).some(e=>(e.props.value??``)===``);return p.useEffect(()=>{let e=h.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set,r=d!==null&&d!==y.current;y.current=d;let i=v.current!==_;v.current=_;let a=r&&i;if(r&&!i&&d.value!==_&&!d.hasConsumerStoppedPropagation&&n){b.current=!0;try{n.call(e,d.value),e.dispatchEvent(new Event(`change`,{bubbles:!0}))}finally{b.current=!1,n.call(e,_)}return}let o=a&&!d.hasConsumerStoppedPropagation;if(i&&n){let t=new Event(`change`,{bubbles:o});n.call(e,_),e.dispatchEvent(t)}},[_,d]),(0,P.jsxs)(wo.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:c,autoComplete:l,disabled:s,form:u,onChange:e=>{b.current||a(e.target.value)},...t,style:{...Eo,...t.style},ref:g,defaultValue:_,children:[Wm(i)&&!x?(0,P.jsx)(`option`,{value:``}):null,Array.from(f)]},m)},`SelectBubbleInput`));function Um(e){return typeof e==`function`}zp(Um,`isFunction`);function Wm(e){return e===``||e===void 0}zp(Wm,`shouldShowPlaceholder`);function Gm(e){let t=Is(e),n=p.useRef(``),r=p.useRef(0),i=p.useCallback(e=>{let i=n.current+e;t(i);function a(e){n.current=e,window.clearTimeout(r.current),e!==``&&(r.current=window.setTimeout(()=>a(``),1e3))}zp(a,`updateSearch`),a(i)},[t]),a=p.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return p.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}zp(Gm,`useTypeaheadSearch`);function Km(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=qm(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}zp(Km,`findNextItem`);function qm(e,t){return e.map((n,r)=>e[(t+r)%e.length])}zp(qm,`wrapArray`);var Jm=Object.defineProperty,Ym=(e,t)=>Jm(e,`name`,{value:t,configurable:!0}),[Xm,Zm]=Ao(`Tooltip`,[$f]);$f();var Qm=`TooltipProvider`,$m=700,[eh,th]=Xm(Qm),nh=Ym(e=>{let{__scopeTooltip:t,delayDuration:n=$m,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=p.useRef(!0),s=p.useRef(!1),c=p.useRef(0);return p.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,P.jsx)(eh,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:p.useCallback(()=>{r<=0||(window.clearTimeout(c.current),o.current=!1)},[r]),onClose:p.useCallback(()=>{r<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r))},[r]),isPointerInTransitRef:s,onPointerInTransitChange:p.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})},`TooltipProvider`),[rh,ih]=Xm(`Tooltip`),[ah,oh]=Xm(`TooltipPortal`,{forceMount:void 0});function sh(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}Ym(sh,`getExitSideFromRect`);function ch(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}Ym(ch,`getPaddedExitPoints`);function lh(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}Ym(lh,`getPointsFromRect`);function uh(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}Ym(uh,`isPointInPolygon`);function dh(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),fh(t)}Ym(dh,`getHull`);function fh(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}Ym(fh,`getHullPresorted`);function ph(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}Ym(ph,`concatAriaDescribedby`);function mh(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=mh(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function hh(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=mh(e))&&(r&&(r+=` `),r+=t);return r}var gh=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},_h=(e,t)=>({classGroupId:e,validator:t}),vh=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),yh=`-`,bh=[],xh=`arbitrary..`,Sh=e=>{let t=Th(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return wh(e);let n=e.split(yh);return Ch(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?gh(i,t):t:i||bh}return n[e]||bh}}},Ch=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=Ch(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(yh):e.slice(t).join(yh),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},wh=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?xh+r:void 0})(),Th=e=>{let{theme:t,classGroups:n}=e;return Eh(n,t)},Eh=(e,t)=>{let n=vh();for(let r in e)Dh(e[r],n,r,t);return n},Dh=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++)Oh(e[a],t,n,r)},Oh=(e,t,n,r)=>{typeof e==`string`?kh(e,t,n):typeof e==`function`?Ah(e,t,n,r):jh(e,t,n,r)},kh=(e,t,n)=>{let r=e===``?t:Mh(t,e);r.classGroupId=n},Ah=(e,t,n,r)=>{Nh(e)?Dh(e(r),t,n,r):(t.validators===null&&(t.validators=[]),t.validators.push(_h(n,e)))},jh=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Dh(o,Mh(t,a),n,r)}},Mh=(e,t)=>{let n=e,r=t.split(yh),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=vh(),n.nextPart.set(t,i)),n=i}return n},Nh=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Ph=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},Fh=`!`,Ih=`:`,Lh=[],Rh=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),zh=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let c=e[s];if(n===0&&r===0){if(c===Ih){t.push(e.slice(i,s)),i=s+1;continue}if(c===`/`){a=s;continue}}if(c===`[`)n++;else if(c===`]`)n--;else if(c===`(`)r++;else if(c===`)`)r--;else if(c===`\\`)s++;else if(c===`"`||c===`'`)for(;++s<o;){let t=e[s];if(t===`\\`)s++;else if(t===c)break}}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(Fh)?(c=s.slice(0,-1),l=!0):s.startsWith(Fh)&&(c=s.slice(1),l=!0);let u=l&&s.startsWith(Fh)?1:0,d=a&&a>i?a-i-u:void 0;return Rh(t,l,c,d)};if(t){let e=t+Ih,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Rh(Lh,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Bh=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},Vh=e=>({cache:Ph(e.cacheSize),parseClassName:zh(e),sortModifiers:Bh(e),postfixLookupClassGroupIds:Hh(e),...Sh(e)}),Hh=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},Uh=/\s+/,Wh=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(Uh),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h||(g=r(p),!g)){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+Fh:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},Gh=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Kh(n))&&(i&&(i+=` `),i+=r);return i},Kh=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Kh(e[r]))&&(n&&(n+=` `),n+=t);return n},qh=(e,...t)=>{let n,r,i,a,o=o=>(n=Vh(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=Wh(e,n);return i(e,a),a};return a=o,(...e)=>a(Gh(...e))},Jh=[],Yh=e=>{let t=t=>t[e]||Jh;return t.isThemeGetter=!0,t.themeKey=e,t},Xh=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Zh=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Qh=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,$h=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,eg=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|Q|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^--spacing\(.+\)|^0$/,tg=/^[+-]?(?:\d*\.)?\d+(?:[eE][+-]?\d+)?(?:r?ic|r(?:cap|ch|ex))$/,ng=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark|contrast-color|device-cmyk|--alpha)\(.+\)$/i,rg=/^(?:_*[+-]?(?:\d|\.\d)|[\w-]+\(|_*(?:inherit|initial|revert(?:-layer)?|unset)_*$)/i,ig=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ag=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,og=e=>Qh.test(e),B=e=>!!e&&!Number.isNaN(Number(e)),sg=e=>!!e&&Number.isInteger(Number(e)),cg=e=>e.endsWith(`%`)&&B(e.slice(0,-1)),lg=e=>$h.test(e),ug=()=>!0,dg=e=>(eg.test(e)||tg.test(e))&&!ng.test(e),fg=e=>rg.test(e)&&!ng.test(e),pg=()=>!1,mg=e=>ig.test(e),hg=e=>ag.test(e),gg=e=>!V(e)&&!H(e),_g=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),vg=e=>Fg(e,zg,pg),V=e=>Xh.test(e),yg=e=>Fg(e,Bg,dg),bg=e=>Fg(e,Vg,fg),xg=e=>Fg(e,Hg,B),Sg=e=>Fg(e,Wg,ug),Cg=e=>Fg(e,Ug,pg),wg=e=>Fg(e,Lg,pg),Tg=e=>Fg(e,Rg,hg),Eg=e=>Fg(e,Gg,mg),H=e=>Zh.test(e),Dg=e=>Ig(e,Bg),Og=e=>Ig(e,Vg,!0),kg=e=>Ig(e,Ug),Ag=e=>Ig(e,Lg),jg=e=>Ig(e,zg),Mg=e=>Ig(e,Rg),Ng=e=>Ig(e,Gg,!0),Pg=e=>Ig(e,Wg,!0),Fg=(e,t,n)=>{let r=Xh.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Ig=(e,t,n=!1)=>{let r=Zh.exec(e);return r?r[1]?t(r[1]):n:!1},Lg=e=>e===`position`||e===`percentage`,Rg=e=>e===`image`||e===`url`,zg=e=>e===`length`||e===`size`||e===`bg-size`,Bg=e=>e===`length`,Vg=e=>e!==`color`,Hg=e=>e===`number`,Ug=e=>e===`family-name`,Wg=e=>e===`number`||e===`weight`,Gg=e=>e===`shadow`,Kg=qh(()=>{let e=Yh(`color`),t=Yh(`font`),n=Yh(`text`),r=Yh(`font-weight`),i=Yh(`tracking`),a=Yh(`leading`),o=Yh(`breakpoint`),s=Yh(`container`),c=Yh(`spacing`),l=Yh(`radius`),u=Yh(`shadow`),d=Yh(`inset-shadow`),f=Yh(`text-shadow`),p=Yh(`drop-shadow`),m=Yh(`blur`),h=Yh(`perspective`),g=Yh(`aspect`),_=Yh(`ease`),v=Yh(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),H,V],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[H,V,c],T=()=>[og,`full`,`auto`,...w()],E=()=>[sg,`none`,`subgrid`,H,V],D=()=>[`auto`,{span:[`full`,sg,H,V]},sg,H,V],O=()=>[sg,`auto`,H,V],ee=()=>[`auto`,`min`,`max`,`fr`,B,H,V],k=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],te=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],ne=()=>[`auto`,...w()],A=()=>[og,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],re=()=>[s,og,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],ie=()=>[og,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],j=()=>[e,H,V],M=()=>[...b(),Ag,wg,{position:[H,V]}],ae=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],oe=()=>[`auto`,`cover`,`contain`,jg,vg,{size:[H,V]}],se=()=>[cg,Dg,yg],ce=()=>[``,`none`,`full`,l,H,V],N=()=>[``,B,Dg,yg],le=()=>[`solid`,`dashed`,`dotted`,`double`],ue=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],de=()=>[B,cg,Og,bg],fe=()=>[``,`none`,m,H,V],pe=()=>[`none`,B,H,V],me=()=>[`none`,B,H,V],he=()=>[B,H,V],ge=()=>[og,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[lg],breakpoint:[lg],color:[ug],container:[lg],"drop-shadow":[lg],ease:[`in`,`out`,`in-out`],font:[gg],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[lg],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[lg],shadow:[lg],spacing:[`px`,B],text:[lg],"text-shadow":[lg],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,og,V,H,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,H,V]}],"container-named":[_g],columns:[{columns:[B,`auto`,V,H,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`],"not-sr":[`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],contain:[{contain:[`none`,`content`,`strict`,H,V]}],"contain-size":[{contain:[`size`,`inline-size`]}],"contain-layout":[`contain-layout`],"contain-paint":[`contain-paint`],"contain-style":[`contain-style`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[sg,`auto`,H,V]}],basis:[{basis:[og,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[B,og,`auto`,`initial`,`none`,H,V]}],grow:[{grow:[``,B,H,V]}],shrink:[{shrink:[``,B,H,V]}],order:[{order:[sg,`first`,`last`,`none`,H,V]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":ee()}],"auto-rows":[{"auto-rows":ee()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...k(),`normal`]}],"justify-items":[{"justify-items":[...te(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...te()]}],"align-content":[{content:[`normal`,...k()]}],"align-items":[{items:[...te(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...te(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":k()}],"place-items":[{"place-items":[...te(),`baseline`]}],"place-self":[{"place-self":[`auto`,...te()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:ne()}],mx:[{mx:ne()}],my:[{my:ne()}],ms:[{ms:ne()}],me:[{me:ne()}],mbs:[{mbs:ne()}],mbe:[{mbe:ne()}],mt:[{mt:ne()}],mr:[{mr:ne()}],mb:[{mb:ne()}],ml:[{ml:ne()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:A()}],"inline-size":[{inline:[`auto`,...re()]}],"min-inline-size":[{"min-inline":[`auto`,...re()]}],"max-inline-size":[{"max-inline":[`none`,...re()]}],"block-size":[{block:[`auto`,...ie()]}],"min-block-size":[{"min-block":[`auto`,...ie()]}],"max-block-size":[{"max-block":[`none`,...ie()]}],w:[{w:[s,`screen`,...A()]}],"min-w":[{"min-w":[s,`screen`,`none`,...A()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...A()]}],h:[{h:[`screen`,`lh`,...A()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...A()]}],"max-h":[{"max-h":[`screen`,`lh`,`none`,...A()]}],"font-size":[{text:[`base`,n,Dg,yg]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Pg,Sg]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,cg,H,V]}],"font-family":[{font:[kg,Cg,t]}],"font-features":[{"font-features":[H,V]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,H,V]}],"line-clamp":[{"line-clamp":[B,`none`,H,V]}],leading:[{leading:[`none`,a,...w()]}],"list-image":[{"list-image":[`none`,H,V]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,H,V]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:j()}],"text-color":[{text:j()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...le(),`wavy`]}],"text-decoration-thickness":[{decoration:[B,`from-font`,`auto`,Dg,Ag,yg]}],"text-decoration-color":[{decoration:j()}],"underline-offset":[{"underline-offset":[B,`auto`,H,V]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`text-ellipsis`,`text-clip`],truncate:[`truncate`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[sg,H,V]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,H,V]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,H,V]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:M()}],"bg-repeat":[{bg:ae()}],"bg-size":[{bg:oe()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},sg,H,V],radial:[``,H,V],conic:[``,sg,H,V]},Mg,Tg]}],"bg-color":[{bg:j()}],"gradient-from-pos":[{from:se()}],"gradient-via-pos":[{via:se()}],"gradient-to-pos":[{to:se()}],"gradient-from":[{from:j()}],"gradient-via":[{via:j()}],"gradient-to":[{to:j()}],rounded:[{rounded:ce()}],"rounded-s":[{"rounded-s":ce()}],"rounded-e":[{"rounded-e":ce()}],"rounded-t":[{"rounded-t":ce()}],"rounded-r":[{"rounded-r":ce()}],"rounded-b":[{"rounded-b":ce()}],"rounded-l":[{"rounded-l":ce()}],"rounded-ss":[{"rounded-ss":ce()}],"rounded-se":[{"rounded-se":ce()}],"rounded-ee":[{"rounded-ee":ce()}],"rounded-es":[{"rounded-es":ce()}],"rounded-tl":[{"rounded-tl":ce()}],"rounded-tr":[{"rounded-tr":ce()}],"rounded-br":[{"rounded-br":ce()}],"rounded-bl":[{"rounded-bl":ce()}],"border-w":[{border:N()}],"border-w-x":[{"border-x":N()}],"border-w-y":[{"border-y":N()}],"border-w-s":[{"border-s":N()}],"border-w-e":[{"border-e":N()}],"border-w-bs":[{"border-bs":N()}],"border-w-be":[{"border-be":N()}],"border-w-t":[{"border-t":N()}],"border-w-r":[{"border-r":N()}],"border-w-b":[{"border-b":N()}],"border-w-l":[{"border-l":N()}],"divide-x":[{"divide-x":N()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":N()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...le(),`hidden`,`none`]}],"divide-style":[{divide:[...le(),`hidden`,`none`]}],"border-color":[{border:j()}],"border-color-x":[{"border-x":j()}],"border-color-y":[{"border-y":j()}],"border-color-s":[{"border-s":j()}],"border-color-e":[{"border-e":j()}],"border-color-bs":[{"border-bs":j()}],"border-color-be":[{"border-be":j()}],"border-color-t":[{"border-t":j()}],"border-color-r":[{"border-r":j()}],"border-color-b":[{"border-b":j()}],"border-color-l":[{"border-l":j()}],"divide-color":[{divide:j()}],"outline-style":[{outline:[...le(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[B,H,V]}],"outline-w":[{outline:[``,B,Dg,yg]}],"outline-color":[{outline:j()}],shadow:[{shadow:[``,`inner`,`none`,u,Ng,Eg]}],"shadow-color":[{shadow:j()}],"inset-shadow":[{"inset-shadow":[`none`,d,Ng,Eg]}],"inset-shadow-color":[{"inset-shadow":j()}],"ring-w":[{ring:N()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:j()}],"ring-offset-w":[{"ring-offset":[B,yg]}],"ring-offset-color":[{"ring-offset":j()}],"inset-ring-w":[{"inset-ring":N()}],"inset-ring-color":[{"inset-ring":j()}],"text-shadow":[{"text-shadow":[`none`,f,Ng,Eg]}],"text-shadow-color":[{"text-shadow":j()}],opacity:[{opacity:[B,H,V]}],"mix-blend":[{"mix-blend":[...ue(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ue()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[B,H,V]}],"mask-image-linear-from-pos":[{"mask-linear-from":de()}],"mask-image-linear-to-pos":[{"mask-linear-to":de()}],"mask-image-linear-from-color":[{"mask-linear-from":j()}],"mask-image-linear-to-color":[{"mask-linear-to":j()}],"mask-image-t-from-pos":[{"mask-t-from":de()}],"mask-image-t-to-pos":[{"mask-t-to":de()}],"mask-image-t-from-color":[{"mask-t-from":j()}],"mask-image-t-to-color":[{"mask-t-to":j()}],"mask-image-r-from-pos":[{"mask-r-from":de()}],"mask-image-r-to-pos":[{"mask-r-to":de()}],"mask-image-r-from-color":[{"mask-r-from":j()}],"mask-image-r-to-color":[{"mask-r-to":j()}],"mask-image-b-from-pos":[{"mask-b-from":de()}],"mask-image-b-to-pos":[{"mask-b-to":de()}],"mask-image-b-from-color":[{"mask-b-from":j()}],"mask-image-b-to-color":[{"mask-b-to":j()}],"mask-image-l-from-pos":[{"mask-l-from":de()}],"mask-image-l-to-pos":[{"mask-l-to":de()}],"mask-image-l-from-color":[{"mask-l-from":j()}],"mask-image-l-to-color":[{"mask-l-to":j()}],"mask-image-x-from-pos":[{"mask-x-from":de()}],"mask-image-x-to-pos":[{"mask-x-to":de()}],"mask-image-x-from-color":[{"mask-x-from":j()}],"mask-image-x-to-color":[{"mask-x-to":j()}],"mask-image-y-from-pos":[{"mask-y-from":de()}],"mask-image-y-to-pos":[{"mask-y-to":de()}],"mask-image-y-from-color":[{"mask-y-from":j()}],"mask-image-y-to-color":[{"mask-y-to":j()}],"mask-image-radial":[{"mask-radial":[H,V]}],"mask-image-radial-from-pos":[{"mask-radial-from":de()}],"mask-image-radial-to-pos":[{"mask-radial-to":de()}],"mask-image-radial-from-color":[{"mask-radial-from":j()}],"mask-image-radial-to-color":[{"mask-radial-to":j()}],"mask-image-radial-shape":[{mask:[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":x()}],"mask-image-conic-pos":[{"mask-conic":[B,H,V]}],"mask-image-conic-from-pos":[{"mask-conic-from":de()}],"mask-image-conic-to-pos":[{"mask-conic-to":de()}],"mask-image-conic-from-color":[{"mask-conic-from":j()}],"mask-image-conic-to-color":[{"mask-conic-to":j()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:M()}],"mask-repeat":[{mask:ae()}],"mask-size":[{mask:oe()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,H,V]}],filter:[{filter:[``,`none`,H,V]}],blur:[{blur:fe()}],brightness:[{brightness:[B,H,V]}],contrast:[{contrast:[B,H,V]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Ng,Eg]}],"drop-shadow-color":[{"drop-shadow":j()}],grayscale:[{grayscale:[``,B,H,V]}],"hue-rotate":[{"hue-rotate":[B,H,V]}],invert:[{invert:[``,B,H,V]}],saturate:[{saturate:[B,H,V]}],sepia:[{sepia:[``,B,H,V]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,H,V]}],"backdrop-blur":[{"backdrop-blur":fe()}],"backdrop-brightness":[{"backdrop-brightness":[B,H,V]}],"backdrop-contrast":[{"backdrop-contrast":[B,H,V]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,B,H,V]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[B,H,V]}],"backdrop-invert":[{"backdrop-invert":[``,B,H,V]}],"backdrop-opacity":[{"backdrop-opacity":[B,H,V]}],"backdrop-saturate":[{"backdrop-saturate":[B,H,V]}],"backdrop-sepia":[{"backdrop-sepia":[``,B,H,V]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,H,V]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[B,`initial`,H,V]}],ease:[{ease:[`linear`,`initial`,_,H,V]}],delay:[{delay:[B,H,V]}],animate:[{animate:[`none`,v,H,V]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,H,V]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:pe()}],"rotate-x":[{"rotate-x":pe()}],"rotate-y":[{"rotate-y":pe()}],"rotate-z":[{"rotate-z":pe()}],scale:[{scale:me()}],"scale-x":[{"scale-x":me()}],"scale-y":[{"scale-y":me()}],"scale-z":[{"scale-z":me()}],"scale-3d":[`scale-3d`],skew:[{skew:he()}],"skew-x":[{"skew-x":he()}],"skew-y":[{"skew-y":he()}],transform:[{transform:[H,V,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],"transform-box":[{transform:[`content`,`border`,`fill`,`stroke`,`view`]}],translate:[{translate:ge()}],"translate-x":[{"translate-x":ge()}],"translate-y":[{"translate-y":ge()}],"translate-z":[{"translate-z":ge()}],"translate-none":[`translate-none`],"translate-3d":[`translate-3d`],zoom:[{zoom:[sg,H,V]}],accent:[{accent:j()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:j()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,H,V]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":j()}],"scrollbar-track-color":[{"scrollbar-track":j()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,H,V]}],fill:[{fill:[`none`,...j()]}],"stroke-w":[{stroke:[B,Dg,yg,xg]}],stroke:[{stroke:[`none`,...j()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`start`,`end`,`right`,`left`],"inset-y":[`inset-bs`,`inset-be`,`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],"place-content":[`align-content`,`justify-content`],"place-items":[`align-items`,`justify-items`],"place-self":[`align-self`,`justify-self`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`ps`,`pe`,`pr`,`pl`],py:[`pbs`,`pbe`,`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`ms`,`me`,`mr`,`ml`],my:[`mbs`,`mbe`,`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],truncate:[`text-overflow`,`overflow`,`overflow-x`,`overflow-y`,`whitespace`],sr:`not-sr.position.size.w.h.p.px.py.ps.pe.pbs.pbe.pt.pr.pb.pl.m.mx.my.ms.me.mbs.mbe.mt.mr.mb.ml.overflow.overflow-x.overflow-y.whitespace`.split(`.`),"not-sr":[`sr`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-s`,`border-w-e`,`border-w-r`,`border-w-l`],"border-w-y":[`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-s`,`border-color-e`,`border-color-r`,`border-color-l`],"border-color-y":[`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-b`],"mask-image-x-from-pos":[`mask-image-r-from-pos`,`mask-image-l-from-pos`],"mask-image-x-to-pos":[`mask-image-r-to-pos`,`mask-image-l-to-pos`],"mask-image-x-from-color":[`mask-image-r-from-color`,`mask-image-l-from-color`],"mask-image-x-to-color":[`mask-image-r-to-color`,`mask-image-l-to-color`],"mask-image-y-from-pos":[`mask-image-t-from-pos`,`mask-image-b-from-pos`],"mask-image-y-to-pos":[`mask-image-t-to-pos`,`mask-image-b-to-pos`],"mask-image-y-from-color":[`mask-image-t-from-color`,`mask-image-b-from-color`],"mask-image-y-to-color":[`mask-image-t-to-color`,`mask-image-b-to-color`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`,`translate-3d`],"translate-x":[`translate-none`],"translate-y":[`translate-none`],"translate-z":[`translate-none`],"translate-3d":[`translate-none`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-ms`,`scroll-me`,`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-ps`,`scroll-pe`,`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pb`],contain:[`contain-size`,`contain-layout`,`contain-paint`,`contain-style`],"contain-size":[`contain`],"contain-layout":[`contain`],"contain-paint":[`contain`],"contain-style":[`contain`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function U(...e){return Kg(hh(e))}function qg(e){return e.split(/\r?\n/).map(e=>e.trim()).filter(Boolean)}function Jg({delayDuration:e=0,...t}){return(0,P.jsx)(nh,{"data-slot":`tooltip-provider`,delayDuration:e,...t})}var Yg=class extends Error{status;statusText;path;constructor({message:e,status:t,statusText:n,path:r}){super(e),this.name=`ApiError`,this.status=t,this.statusText=n,this.path=r}},Xg=class extends Error{retryable;constructor(e,t){super(e),this.name=`EventStreamError`,this.retryable=t}};function Zg(e){return e instanceof Yg}function Qg(e){return e instanceof Xg?!e.retryable:Zg(e)?e.status>=400&&e.status<500&&![408,425,429].includes(e.status):!1}function $g(e){return Zg(e)&&(e.status===401||e.status===403)}function e_(e){return e instanceof Error?e.message:typeof e==`string`?e:`请求失败`}function t_(e,t){return!$g(t)&&e<1}var n_=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),r_=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),i_=e=>{let t=r_(e);return t.charAt(0).toUpperCase()+t.slice(1)},a_=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),o_=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0},s_={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},c_=(0,p.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,p.createElement)(`svg`,{ref:c,...s_,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:a_(`lucide`,i),...!a&&!o_(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,p.createElement)(e,t)),...Array.isArray(a)?a:[a]])),l_=(e,t)=>{let n=(0,p.forwardRef)(({className:n,...r},i)=>(0,p.createElement)(c_,{ref:i,iconNode:t,className:a_(`lucide-${n_(i_(e))}`,`lucide-${e}`,n),...r}));return n.displayName=i_(e),n},u_=l_(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),d_=l_(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),f_=l_(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),p_=l_(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),m_=l_(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),h_=l_(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),g_=l_(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),__=l_(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),v_=l_(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),y_=l_(`flask-conical`,[[`path`,{d:`M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2`,key:`18mbvz`}],[`path`,{d:`M6.453 15h11.094`,key:`3shlmq`}],[`path`,{d:`M8.5 2h7`,key:`csnxdl`}]]),b_=l_(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),x_=l_(`link-2`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]),S_=l_(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),C_=l_(`octagon-x`,[[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z`,key:`2d38gg`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),w_=l_(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),T_=l_(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),E_=l_(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),D_=l_(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),O_=l_(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),k_=l_(`unlink`,[[`path`,{d:`m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71`,key:`yqzxt4`}],[`path`,{d:`m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71`,key:`4qinb0`}],[`line`,{x1:`8`,x2:`8`,y1:`2`,y2:`5`,key:`1041cp`}],[`line`,{x1:`2`,x2:`5`,y1:`8`,y2:`8`,key:`14m1p5`}],[`line`,{x1:`16`,x2:`16`,y1:`19`,y2:`22`,key:`rzdirn`}],[`line`,{x1:`19`,x2:`22`,y1:`16`,y2:`16`,key:`ox905f`}]]),A_=l_(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),j_=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,M_=hh,N_=(e,t)=>n=>{if(t?.variants==null)return M_(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=j_(t)||j_(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return M_(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},P_=N_(`inline-flex min-h-9 cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-[var(--radius-sm)] px-3 text-sm font-medium transition-[background-color,border-color,color,transform,box-shadow] duration-[var(--duration-fast)] ease-[var(--ease-out)] active:scale-[0.975] focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-[rgba(17,24,39,0.12)] focus-visible:ring-offset-1 disabled:pointer-events-none disabled:opacity-45`,{variants:{variant:{default:`border border-[rgba(17,24,39,0.11)] bg-[var(--surface)] text-[var(--ink)] shadow-[0_1px_1.5px_rgba(17,24,39,0.04),inset_0_1px_0_rgba(255,255,255,0.85)] hover:border-[rgba(17,24,39,0.18)] hover:bg-[var(--surface-2)]`,destructive:`bg-[var(--danger)] text-white shadow-[0_1px_2px_rgba(197,48,48,0.22),inset_0_1px_0_rgba(255,255,255,0.16)] hover:bg-[var(--danger-strong)] focus-visible:ring-[color-mix(in_srgb,var(--danger)_24%,transparent)]`,outline:`border border-[rgba(17,24,39,0.11)] bg-transparent text-[var(--ink)] hover:border-[rgba(17,24,39,0.18)] hover:bg-[var(--overlay)]`,primary:`bg-[var(--ink)] text-white shadow-[0_1px_2px_rgba(17,24,39,0.20),inset_0_1px_0_rgba(255,255,255,0.14)] hover:bg-[var(--ink-2)]`,secondary:`border border-[rgba(17,24,39,0.11)] bg-[var(--surface)] text-[var(--ink)] shadow-[0_1px_1.5px_rgba(17,24,39,0.04),inset_0_1px_0_rgba(255,255,255,0.85)] hover:border-[rgba(17,24,39,0.18)] hover:bg-[var(--surface-2)]`,ghost:`text-[var(--muted-strong)] hover:bg-[var(--overlay)] hover:text-[var(--ink)]`,danger:`bg-[var(--danger)] text-white shadow-[0_1px_2px_rgba(197,48,48,0.22),inset_0_1px_0_rgba(255,255,255,0.16)] hover:bg-[var(--danger-strong)]`,accent:`bg-[var(--accent)] text-[var(--accent-ink)] shadow-[0_1px_2px_rgba(232,95,53,0.28),inset_0_1px_0_rgba(255,255,255,0.22)] hover:bg-[var(--accent-strong)] focus-visible:ring-[rgba(232,95,53,0.28)]`,link:`text-[var(--ink)] underline-offset-4 hover:underline`},size:{sm:`min-h-8 px-2.5 text-xs`,md:`min-h-9 px-3 text-sm`,lg:`min-h-10 px-4 text-sm`,icon:`size-9 min-h-0 px-0`}},defaultVariants:{variant:`secondary`,size:`md`}});function F_({className:e,variant:t,size:n,loading:r,children:i,...a}){return(0,P.jsxs)(`button`,{className:U(P_({variant:t,size:n}),e),disabled:r||a.disabled,"aria-busy":r||void 0,...a,children:[r&&(0,P.jsx)(S_,{className:`size-4 shrink-0 animate-spin`,"aria-hidden":!0}),i]})}function I_({label:e,loading:t,children:n,...r}){return(0,P.jsx)(F_,{size:`icon`,"aria-label":e,title:e,disabled:t||r.disabled,"aria-busy":t||void 0,...r,children:t?(0,P.jsx)(S_,{className:`size-4 animate-spin`,"aria-hidden":!0}):n})}function L_(e){return(0,P.jsx)(Su,{"data-slot":`alert-dialog`,...e})}function R_(e){return(0,P.jsx)(Cu,{"data-slot":`alert-dialog-portal`,...e})}function z_({className:e,...t}){return(0,P.jsx)(wu,{"data-slot":`alert-dialog-overlay`,className:U(`dialog-overlay-motion fixed inset-0 z-50 bg-[rgba(15,23,42,0.34)] backdrop-blur-[3px]`,e),...t})}function B_({className:e,...t}){return(0,P.jsxs)(R_,{children:[(0,P.jsx)(z_,{}),(0,P.jsx)(`div`,{className:`dialog-positioner`,children:(0,P.jsx)(Du,{"data-slot":`alert-dialog-content`,className:U(`dialog-content-motion pointer-events-auto relative z-50 grid w-full max-w-[calc(100vw-2rem)] gap-5 rounded-[14px] border border-[rgba(17,24,39,0.09)] bg-[var(--surface)] p-5 shadow-[0_24px_60px_-12px_rgba(17,24,39,0.22),0_4px_14px_rgba(17,24,39,0.08)] outline-none sm:max-w-md`,e),...t})})]})}function V_({className:e,...t}){return(0,P.jsx)(`div`,{className:U(`grid min-w-0 gap-1.5`,e),...t})}function H_({className:e,...t}){return(0,P.jsx)(`div`,{className:U(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...t})}function U_({className:e,...t}){return(0,P.jsx)(Ou,{className:U(`break-words text-base font-semibold leading-6 text-[var(--ink)]`,e),...t})}function W_({className:e,...t}){return(0,P.jsx)(ku,{className:U(`break-words text-sm leading-6 text-[var(--muted-strong)]`,e),...t})}function G_({className:e,variant:t=`primary`,size:n=`md`,...r}){return(0,P.jsx)(Au,{className:U(P_({variant:t,size:n}),e),...r})}function K_({className:e,variant:t=`secondary`,size:n=`md`,...r}){return(0,P.jsx)(Mu,{className:U(P_({variant:t,size:n}),e),...r})}function q_({error:e}){return e?(0,P.jsx)(`p`,{className:`rounded-[var(--radius-sm)] border border-[var(--danger-border)] bg-[var(--danger-bg)] px-3 py-2 text-xs text-[var(--danger)]`,children:J_(e)}):null}function J_(e){if(e instanceof Error)return e.message;if(typeof e==`string`)return e;try{return JSON.stringify(e)??`请求失败`}catch{return`请求失败`}}var Y_=(0,p.createContext)(null);function X_({children:e}){let[t,n]=(0,p.useState)(null),[r,i]=(0,p.useState)(!1),[a,o]=(0,p.useState)(),s=(0,p.useCallback)(e=>{o(void 0),i(!1),n({options:e})},[]),c=()=>{r||(n(null),o(void 0))},l=async()=>{if(t&&!r){i(!0),o(void 0);try{await t.options.action(),n(null)}catch(e){o(e)}finally{i(!1)}}};return(0,P.jsxs)(Y_.Provider,{value:s,children:[e,(0,P.jsx)(L_,{open:!!t,onOpenChange:e=>!e&&c(),children:(0,P.jsxs)(B_,{"aria-busy":r,onEscapeKeyDown:e=>r&&e.preventDefault(),children:[(0,P.jsxs)(V_,{children:[(0,P.jsx)(U_,{children:t?.options.title}),(0,P.jsx)(W_,{children:t?.options.description})]}),(0,P.jsx)(q_,{error:a}),(0,P.jsxs)(H_,{children:[(0,P.jsx)(K_,{disabled:r,children:`取消`}),(0,P.jsxs)(G_,{variant:t?.options.destructive?`destructive`:`primary`,disabled:r,onClick:e=>{e.preventDefault(),l()},children:[r?(0,P.jsx)(S_,{className:`size-4 animate-spin`}):null,t?.options.confirmLabel??`确认`]})]})]})})]})}function Z_(){let e=(0,p.useContext)(Y_);if(!e)throw Error(`useConfirmation must be used inside ConfirmationProvider`);return e}function Q_(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var $_=e=>{switch(e){case`success`:return n1;case`info`:return i1;case`warning`:return r1;case`error`:return a1;default:return null}},e1=Array(12).fill(0),t1=({visible:e,className:t})=>p.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},p.createElement(`div`,{className:`sonner-spinner`},e1.map((e,t)=>p.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),n1=p.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},p.createElement(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,clipRule:`evenodd`})),r1=p.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},p.createElement(`path`,{fillRule:`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,clipRule:`evenodd`})),i1=p.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},p.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,clipRule:`evenodd`})),a1=p.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},p.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})),o1=p.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`},p.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),p.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),s1=()=>{let[e,t]=p.useState(document.hidden);return p.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[]),e},c1=1,l1=100,u1=e=>typeof e?.id==`number`||e?.id?.length>0?e.id:c1++,d1=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),this.getActiveToasts().forEach(t=>e(t)),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e],this.trimHistory()},this.trimHistory=()=>{let e=this.toasts.length-l1;e<=0||(this.toasts=this.toasts.filter(t=>e>0&&this.dismissedToasts.has(t.id)?(this.dismissedToasts.delete(t.id),e--,!1):!0))},this.create=e=>{let{message:t,...n}=e,r=u1(e),i=this.pendingDismissals.get(r);i!==void 0&&(cancelAnimationFrame(i),this.pendingDismissals.delete(r),this.dismissedToasts.delete(r));let a=this.dismissedToasts.has(r),o=e.dismissible===void 0||e.dismissible;return a&&(this.dismissedToasts.delete(r),this.toasts=this.toasts.filter(e=>e.id!==r)),!a&&this.toasts.find(e=>e.id===r)?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:o,title:t}):n):this.addToast({title:t,...n,dismissible:o,id:r}),r},this.dismiss=e=>{if(e==null)return this.getActiveToasts().forEach(e=>{this.dismissedToasts.add(e.id),this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e;this.dismissedToasts.add(e);let t=this.pendingDismissals.get(e);return t!==void 0&&cancelAnimationFrame(t),this.pendingDismissals.set(e,requestAnimationFrame(()=>{this.pendingDismissals.delete(e),this.subscribers.forEach(t=>t({id:e,dismiss:!0}))})),e},this.message=(e,t)=>this.create({...t,message:e,type:void 0}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],p.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(p1(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!p.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!p.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!p.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!p.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=u1(t);return this.create({...t,jsx:e(n),id:n,type:void 0}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}},f1=(e,t)=>d1.message(e,t),p1=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,m1=Object.assign(f1,{success:d1.success,info:d1.info,warning:d1.warning,error:d1.error,custom:d1.custom,message:d1.message,promise:d1.promise,dismiss:d1.dismiss,loading:d1.loading},{getHistory:()=>d1.toasts,getToasts:()=>d1.getActiveToasts()});Q_(`[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}`);function h1(e){return e.label!==void 0}var g1=3,_1=`24px`,v1=`16px`,y1=4e3,b1=356,x1=14,S1=45,C1=200;function w1(...e){return e.filter(Boolean).join(` `)}function T1(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var E1=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:a,visibleToasts:o,heights:s,index:c,toasts:l,expanded:u,removeToast:d,defaultRichColors:f,closeButton:m,style:h,cancelButtonStyle:g,actionButtonStyle:_,className:v=``,descriptionClassName:y=``,duration:b,position:x,gap:S,expandByDefault:C,classNames:w,icons:T,closeButtonAriaLabel:E=`Close toast`}=e,[D,O]=p.useState(null),[ee,k]=p.useState(null),[te,ne]=p.useState(!1),[A,re]=p.useState(!1),[ie,j]=p.useState(!1),[M,ae]=p.useState(!1),[oe,se]=p.useState(!1),[ce,N]=p.useState(0),[le,ue]=p.useState(0),de=p.useRef(n.duration||b||y1),fe=p.useRef(null),pe=p.useRef(null),me=c===0,he=c+1<=o,ge=n.type,_e=ge??`default`,ve=n.dismissible!==!1,ye=n.className||``,be=n.descriptionClassName||``,xe=p.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),Se=p.useMemo(()=>n.closeButton??m,[n.closeButton,m]),Ce=p.useMemo(()=>n.duration||b||y1,[n.duration,b]),we=p.useRef(0),Te=p.useRef(0),Ee=p.useRef(0),De=p.useRef(null),[Oe,ke]=x.split(`-`),Ae=p.useMemo(()=>s.reduce((e,t,n)=>n>=xe?e:e+t.height,0),[s,xe]),je=s1(),Me=p.useMemo(()=>e.swipeDirections??T1(x),[e.swipeDirections,x]),Ne=n.invert||t,Pe=ge===`loading`;Te.current=p.useMemo(()=>xe*S+Ae,[xe,Ae]),p.useEffect(()=>{de.current=Ce},[Ce]),p.useEffect(()=>{ne(!0)},[]),p.useEffect(()=>{let e=pe.current;if(e){let t=e.getBoundingClientRect().height;return ue(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),p.useLayoutEffect(()=>{if(!te)return;let e=pe.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,ue(r),a(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[te,n.title,n.description,a,n.id,n.jsx,n.action,n.cancel]);let Fe=p.useCallback(()=>{re(!0),N(Te.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{d(n)},C1)},[n,d,a,Te]);p.useEffect(()=>{if(n.promise&&ge===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return u||i||je?(()=>{if(Ee.current<we.current){let e=new Date().getTime()-we.current;de.current-=e}Ee.current=new Date().getTime()})():de.current!==1/0&&(we.current=new Date().getTime(),e=setTimeout(()=>{n.onAutoClose==null||n.onAutoClose.call(n,n),Fe()},de.current)),()=>clearTimeout(e)},[u,i,n,ge,je,Fe]),p.useEffect(()=>{n.delete&&(Fe(),n.onDismiss==null||n.onDismiss.call(n,n))},[Fe,n.delete]);function Ie(){return T?.loading?p.createElement(`div`,{className:w1(w?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":ge===`loading`},T.loading):p.createElement(t1,{className:w1(w?.loader,n?.classNames?.loader),visible:ge===`loading`})}let Le=n.icon||T?.[ge]||$_(ge);return p.createElement(`li`,{tabIndex:0,ref:pe,className:w1(v,ye,w?.toast,n?.classNames?.toast,w?.[_e],n?.classNames?.[_e]),"data-sonner-toast":``,"data-rich-colors":n.richColors??f,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":te,"data-promise":!!n.promise,"data-swiped":oe,"data-removed":A,"data-visible":he,"data-y-position":Oe,"data-x-position":ke,"data-index":c,"data-front":me,"data-swiping":ie,"data-dismissible":ve,"data-type":ge,"data-invert":Ne,"data-swipe-out":M,"data-swipe-direction":ee,"data-expanded":!!(u||C&&te),"data-testid":n.testId,style:{"--index":c,"--toasts-before":c,"--z-index":l.length-c,"--offset":`${A?ce:Te.current}px`,"--initial-height":C?`auto`:`${le}px`,...h,...n.style},onDragEnd:()=>{j(!1),O(null),De.current=null},onPointerDown:e=>{e.button!==2&&!Pe&&ve&&(fe.current=new Date,N(Te.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(j(!0),De.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{if(M||!ve)return;De.current=null;let e=Number(pe.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(pe.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-fe.current?.getTime(),i=D===`x`?e:t,a=Math.abs(i)/r;if((D===`x`?Me.includes(e>0?`right`:`left`):Me.includes(t>0?`bottom`:`top`))&&(Math.abs(i)>=S1||a>.11))N(Te.current),n.onDismiss==null||n.onDismiss.call(n,n),k(D===`x`?e>0?`right`:`left`:t>0?`down`:`up`),Fe(),ae(!0);else{var o,s;(o=pe.current)==null||o.style.setProperty(`--swipe-amount-x`,`0px`),(s=pe.current)==null||s.style.setProperty(`--swipe-amount-y`,`0px`),se(!1),j(!1),O(null)}},onPointerMove:e=>{var t,n;if(!De.current||!ve||window.getSelection()?.toString().length>0)return;let r=e.clientY-De.current.y,i=e.clientX-De.current.x;!D&&(Math.abs(i)>1||Math.abs(r)>1)&&O(Math.abs(i)>Math.abs(r)?`x`:`y`);let a={x:0,y:0},o=e=>1/(1.5+Math.abs(e)/20);if(D===`y`){if(Me.includes(`top`)||Me.includes(`bottom`)){if(Me.includes(`top`)&&r<0||Me.includes(`bottom`)&&r>0)a.y=r;else{let e=r*o(r);a.y=Math.abs(e)<Math.abs(r)?e:r}}}else if(D===`x`&&(Me.includes(`left`)||Me.includes(`right`))){if(Me.includes(`left`)&&i<0||Me.includes(`right`)&&i>0)a.x=i;else{let e=i*o(i);a.x=Math.abs(e)<Math.abs(i)?e:i}}(Math.abs(a.x)>0||Math.abs(a.y)>0)&&se(!0),(t=pe.current)==null||t.style.setProperty(`--swipe-amount-x`,`${a.x}px`),(n=pe.current)==null||n.style.setProperty(`--swipe-amount-y`,`${a.y}px`)}},Se&&!n.jsx&&ge!==`loading`?p.createElement(`button`,{"aria-label":E,"data-disabled":Pe,"data-close-button":!0,onClick:Pe||!ve?()=>{}:()=>{Fe(),n.onDismiss==null||n.onDismiss.call(n,n)},className:w1(w?.closeButton,n?.classNames?.closeButton)},T?.close??o1):null,(ge||n.icon||n.promise)&&n.icon!==null&&(T?.[ge]!==null||n.icon)?p.createElement(`div`,{"data-icon":``,className:w1(w?.icon,n?.classNames?.icon)},ge===`loading`?n.icon||Ie():n.promise?Ie():null,ge===`loading`?null:Le):null,p.createElement(`div`,{"data-content":``,className:w1(w?.content,n?.classNames?.content)},p.createElement(`div`,{"data-title":``,className:w1(w?.title,n?.classNames?.title)},n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title),n.description?p.createElement(`div`,{"data-description":``,className:w1(y,be,w?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),p.isValidElement(n.cancel)?n.cancel:n.cancel&&h1(n.cancel)?p.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||g,onClick:e=>{h1(n.cancel)&&ve&&(n.cancel.onClick==null||n.cancel.onClick.call(n.cancel,e),Fe())},className:w1(w?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,p.isValidElement(n.action)?n.action:n.action&&h1(n.action)?p.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||_,onClick:e=>{h1(n.action)&&(n.action.onClick==null||n.action.onClick.call(n.action,e),e.defaultPrevented||Fe())},className:w1(w?.actionButton,n?.classNames?.actionButton)},n.action.label):null)};function D1(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function O1(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?v1:_1;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var k1=p.forwardRef(function(e,t){let{id:n,invert:r,position:i=`bottom-right`,hotkey:a=[`altKey`,`KeyT`],expand:o,closeButton:s,className:c,offset:l,mobileOffset:u,theme:d=`light`,richColors:f,duration:m,style:h,visibleToasts:g=g1,toastOptions:_,dir:v=D1(),gap:y=x1,icons:b,customAriaLabel:x,containerAriaLabel:S=`Notifications`}=e,[C,w]=p.useState([]),T=p.useMemo(()=>n?C.filter(e=>e.toasterId===n):C.filter(e=>!e.toasterId),[C,n]),E=p.useMemo(()=>Array.from(new Set([i].concat(T.filter(e=>e.position).map(e=>e.position)))),[T,i]),[D,O]=p.useState([]),[ee,k]=p.useState(!1),[te,ne]=p.useState(!1),[A,re]=p.useState(d===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:d),ie=p.useRef(null),j=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),M=p.useRef(null),ae=p.useRef(!1),oe=p.useCallback(e=>{w(t=>(t.find(t=>t.id===e.id)?.delete||d1.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]);return p.useEffect(()=>d1.subscribe(e=>{e.dismiss?requestAnimationFrame(()=>{w(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))}):setTimeout(()=>{xo.flushSync(()=>{w(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[]),p.useEffect(()=>{if(d!==`system`){re(d);return}if(d===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?re(`dark`):re(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{re(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{re(e?`dark`:`light`)}catch(e){console.error(e)}})}},[d]),p.useEffect(()=>{C.length<=1&&k(!1)},[C]),p.useEffect(()=>{let e=e=>{if(a.length>0&&a.every(t=>e[t]||e.code===t)){var t;k(!0),(t=ie.current)==null||t.focus()}e.code===`Escape`&&(document.activeElement===ie.current||ie.current?.contains(document.activeElement))&&k(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),p.useEffect(()=>{if(ie.current)return()=>{M.current&&(M.current.focus({preventScroll:!0}),M.current=null,ae.current=!1)}},[ie.current]),p.createElement(`section`,{ref:t,"aria-label":x??`${S} ${j}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},E.map((t,n)=>{let[i,a]=t.split(`-`);return T.length?p.createElement(`ol`,{key:t,dir:v===`auto`?D1():v,tabIndex:-1,ref:ie,className:c,"data-sonner-toaster":!0,"data-sonner-theme":A,"data-y-position":i,"data-x-position":a,style:{"--front-toast-height":`${D[0]?.height||0}px`,"--width":`${b1}px`,"--gap":`${y}px`,...h,...O1(l,u)},onBlur:e=>{ae.current&&!e.currentTarget.contains(e.relatedTarget)&&(ae.current=!1,M.current&&=(M.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||ae.current||(ae.current=!0,M.current=e.relatedTarget)},onMouseEnter:()=>k(!0),onMouseMove:()=>k(!0),onMouseLeave:()=>{te||k(!1)},onDragEnd:()=>k(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||ne(!0)},onPointerUp:()=>ne(!1)},T.filter(e=>!e.position&&n===0||e.position===t).map((n,i)=>p.createElement(E1,{key:n.id,icons:b,index:i,toast:n,defaultRichColors:f,duration:_?.duration??m,className:_?.className,descriptionClassName:_?.descriptionClassName,invert:r,visibleToasts:g,closeButton:_?.closeButton??s,interacting:te,position:t,style:_?.style,unstyled:_?.unstyled,classNames:_?.classNames,cancelButtonStyle:_?.cancelButtonStyle,actionButtonStyle:_?.actionButtonStyle,closeButtonAriaLabel:_?.closeButtonAriaLabel,removeToast:oe,toasts:T.filter(e=>e.position==n.position),heights:D.filter(e=>e.position==n.position),setHeights:O,expandByDefault:o,gap:y,expanded:ee,swipeDirections:e.swipeDirections}))):null}))});function A1(e){return(0,P.jsx)(k1,{theme:`light`,position:`top-right`,closeButton:!0,gap:8,visibleToasts:4,duration:4500,className:`toaster group`,icons:{success:(0,P.jsx)(h_,{className:`size-4 text-[var(--success)]`}),info:(0,P.jsx)(b_,{className:`size-4 text-[var(--info)]`}),warning:(0,P.jsx)(O_,{className:`size-4 text-[var(--warning)]`}),error:(0,P.jsx)(C_,{className:`size-4 text-[var(--danger)]`}),loading:(0,P.jsx)(S_,{className:`size-4 animate-spin`})},style:{"--normal-bg":`rgba(255, 255, 255, 0.94)`,"--normal-text":`var(--ink)`,"--normal-border":`rgba(17, 24, 39, 0.09)`,"--border-radius":`12px`},toastOptions:{classNames:{toast:`font-sans backdrop-blur-xl shadow-[0_12px_32px_-4px_rgba(17,24,39,0.15),0_2px_6px_rgba(17,24,39,0.06)]`,title:`text-sm font-semibold tracking-[-0.01em]`,description:`text-xs leading-5 text-[var(--muted-strong)]`}},...e})}var j1=new xa({defaultOptions:{queries:{retry:t_,refetchOnWindowFocus:!1,staleTime:2e4}}});function M1({children:e}){return(0,P.jsx)(wa,{client:j1,children:(0,P.jsxs)(Jg,{delayDuration:300,skipDelayDuration:100,children:[(0,P.jsx)(Za,{children:(0,P.jsx)(X_,{children:e})}),(0,P.jsx)(A1,{})]})})}var N1=Jr({component:oi}),P1=`modulepreload`,F1=function(e){return`/dashboard/`+e},I1={},L1={},R1=function(e){return e.pathname.endsWith(`.css`)},z1=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw delete e[t],n});return e[t]=i,i},B1=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=F1(t,n);let r=s(t),i=R1(r);return z1(I1,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}let t=i?e.styles:e.all,n=i?L1[r.href]:void 0;if(!n&&t.has(r.href))return;let o=document.createElement(`link`);if(o.rel=i?`stylesheet`:P1,i||(o.as=`script`),o.crossOrigin=``,o.href=r.href,a&&o.setAttribute(`nonce`,a),n&&delete L1[r.href],n?.isConnected?n.replaceWith(o):document.head.appendChild(o),i)return new Promise((e,t)=>{let n=i=>{o.removeEventListener(`load`,n),o.removeEventListener(`error`,n),i.type===`error`?(L1[r.href]=o,t(Error(`Unable to preload CSS for ${r}`))):e(i)};o.addEventListener(`load`,n),o.addEventListener(`error`,n)})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},V1=Yr(`/`)({component:Xr(()=>B1(()=>import(`./routes-qtUdBWvm.js`),__vite__mapDeps([0,1,2,3,4,5,6])),`component`)}),H1=()=>B1(()=>import(`./_app-BWreYBOO.js`),__vite__mapDeps([7,1,8,9,10,11,12,13,6,2,14,3,15]));function U1(e){return{tab:e.tab===`config`||e.tab===`runs`?e.tab:void 0,panel:e.panel===`basic`||e.panel===`identity`||e.panel===`knowledge`||e.panel===`sources`||e.panel===`publishing`?e.panel:void 0,run:typeof e.run==`string`&&e.run?e.run:void 0,runPage:e.runPage===void 0?void 0:Math.max(1,Number(e.runPage)||1),runTab:e.runTab===`main`||e.runTab===`publication`?e.runTab:void 0,destination:typeof e.destination==`string`&&e.destination?e.destination:void 0}}var W1=Yr(`/_app`)({validateSearch:U1,component:Xr(H1,`component`)}),G1=Yr(`/_app/automations`)({validateSearch:e=>({page:Number(e.page??1)||1}),component:Xr(()=>B1(()=>import(`./automations-DwCc1vrP.js`),__vite__mapDeps([16,1,3,12])),`component`)}),K1=(e,t)=>{let n=e.length;for(;e[n-1]===`/`;)n--;return t=t.replace(/^\/+/,``),e.slice(0,n)+`/`+t},q1=/^(?:[/\\][\t\n\r]*){2}/,J1=(e,t)=>{let n=q1.test(e);for(let[n,r]of Object.entries(t)){let t=RegExp(`/:`+n+`(?:{[^/]+})?\\??(?=/|$)`);e=e.replace(t,()=>r?`/${r}`:``)}return!n&&q1.test(e)?e.replace(/^[/\\\t\n\r]+/,`/`):e},Y1=e=>{let t=new URLSearchParams;for(let[n,r]of Object.entries(e))if(r!==void 0){if(Array.isArray(r))for(let e of r)e!==void 0&&t.append(n,e);else t.set(n,r)}return t},X1=(e,t)=>{switch(t){case`ws`:return e.replace(/^http/,`ws`);case`http`:return e.replace(/^ws/,`http`)}},Z1=e=>/^https?:\/\/[^\/]+?\/index(?=\?|$)/.test(e)?e.replace(/\/index(?=\?|$)/,`/`):e.replace(/\/index(?=\?|$)/,``);function Q1(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}function $1(e,t){if(!Q1(e)&&!Q1(t))return t;let n={...e};for(let e in t){let r=t[e];n[e]=Q1(n[e])&&Q1(r)?$1(n[e],r):r}return n}var e0=/^[\w!#$%&'*.^`|~+-]+$/,t0=(e,t,n={})=>{if(!e0.test(e))throw Error(`Invalid cookie name`);let r=`${e}=${t}`;if(/^__secure-/i.test(e)&&!n.secure)throw Error(`__Secure- Cookie must have Secure attributes`);if(/^__host-/i.test(e)){if(!n.secure)throw Error(`__Host- Cookie must have Secure attributes`);if(n.path!==`/`)throw Error(`__Host- Cookie must have Path attributes with "/"`);if(n.domain)throw Error(`__Host- Cookie must not have Domain attributes`)}for(let e of[`domain`,`path`,`sameSite`,`priority`])if(n[e]&&/[;\r\n]/.test(n[e]))throw Error(`${e} must not contain ";", "\\r", or "\\n"`);if(n&&typeof n.maxAge==`number`&&n.maxAge>=0){if(n.maxAge>3456e4)throw Error(`Cookies Max-Age SHOULD NOT be greater than 400 days (34560000 seconds) in duration.`);r+=`; Max-Age=${n.maxAge|0}`}if(n.domain&&n.prefix!==`host`&&(r+=`; Domain=${n.domain}`),n.path&&(r+=`; Path=${n.path}`),n.expires){if(n.expires.getTime()-Date.now()>3456e7)throw Error(`Cookies Expires SHOULD NOT be greater than 400 days (34560000 seconds) in the future.`);r+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(r+=`; HttpOnly`),n.secure&&(r+=`; Secure`),n.sameSite&&(r+=`; SameSite=${n.sameSite.charAt(0).toUpperCase()+n.sameSite.slice(1)}`),n.priority&&(r+=`; Priority=${n.priority.charAt(0).toUpperCase()+n.priority.slice(1)}`),n.partitioned){if(!n.secure)throw Error(`Partitioned Cookie must have Secure attributes`);r+=`; Partitioned`}return r},n0=(e,t,n)=>(t=encodeURIComponent(t),t0(e,t,n)),r0=(e,t)=>new Proxy(()=>{},{get(n,r){if(typeof r==`string`&&r!==`then`)return r0(e,[...t,r])},apply(n,r,i){return e({path:t,args:i})}}),i0=(e,t)=>{let n=t.toString();return n?`${e}?${n}`:e},a0=class{url;method;buildSearchParams;queryParams=void 0;pathParams={};rBody;cType=void 0;constructor(e,t,n){this.url=e,this.method=t,this.buildSearchParams=n.buildSearchParams}fetch=async(e,t)=>{if(e){if(e.query&&(this.queryParams=this.buildSearchParams(e.query)),e.form){let t=new FormData;for(let[n,r]of Object.entries(e.form))if(r!==void 0){if(Array.isArray(r))for(let e of r)e!==void 0&&t.append(n,e);else t.append(n,r)}this.rBody=t}e.json!==void 0&&(this.rBody=JSON.stringify(e.json),this.cType=`application/json`),e.param&&(this.pathParams=e.param)}let n=this.method.toUpperCase(),r={...e?.header,...typeof t?.headers==`function`?await t.headers():t?.headers};if(e?.cookie){let t=[];for(let[n,r]of Object.entries(e.cookie))r!==void 0&&t.push(n0(n,r));t.length>0&&(r.Cookie=t.join(`; `))}this.cType&&(r[`Content-Type`]=this.cType);let i=new Headers;for(let[e,t]of Object.entries(r))t!==void 0&&i.set(e,t);let a=this.url;a=Z1(a),a=J1(a,this.pathParams),this.queryParams&&(a=i0(a,this.queryParams)),n=this.method.toUpperCase();let o=n!==`GET`&&n!==`HEAD`;return(t?.fetch||fetch)(a,{body:o?this.rBody:void 0,method:n,headers:i,...t?.init})}},o0=(e,t)=>r0(function n(r){let i=t?.buildSearchParams??Y1,a=[...r.path],o=a.slice(-3).reverse();if(o[0]===`toString`)return o[1]===`name`?o[2]||``:n.toString();if(o[0]===`valueOf`)return o[1]===`name`?o[2]||``:n;let s=``;if(/^\$/.test(o[0])){let e=a.pop();e&&(s=e.replace(/^\$/,``))}let c=K1(e,a.join(`/`));if(s===`url`||s===`path`){let t=Z1(c);return r.args[0]&&(r.args[0].param&&(t=J1(t,r.args[0].param)),r.args[0].query&&(t=i0(t,i(r.args[0].query)))),s===`url`?new URL(t):t.slice(e.replace(/\/+$/,``).length).replace(/^\/?/,`/`)}if(s===`ws`){let e=Z1(c),n=X1(r.args[0]?.param?J1(e,r.args[0].param):e,`ws`),a=new URL(n),o=r.args[0]?.query;return o&&i(o).forEach((e,t)=>{a.searchParams.append(t,e)}),((...e)=>t?.webSocket!==void 0&&typeof t.webSocket==`function`?t.webSocket(...e):new WebSocket(...e))(a.toString())}let l=new a0(c,s,{buildSearchParams:i});if(s){t??={};let e={...r.args[1]},n=t.headers,i=e.headers;n&&i&&(e.headers=async()=>({...typeof n==`function`?await n():n,...typeof i==`function`?await i():i}));let a=$1(t,e);return l.fetch(r.args[0],a)}return l},[]);function s0(e,t){let n=Ka.read(),r=new Headers(t?.headers);return n&&!r.has(`Authorization`)&&r.set(`Authorization`,`Bearer ${n}`),globalThis.fetch(e,{...t,headers:r})}var c0=o0(`/`,{fetch:s0});async function l0(e){let t=await e.text();if(!t)return`${e.status} ${e.statusText}`;try{let e=JSON.parse(t),n=e.error??`请求失败`,r=e.issues?.map(e=>[e.path,e.message].filter(Boolean).join(`: `)).filter(Boolean);return r?.length?`${n}:${r.join(`;`)}`:n}catch{return t}}async function u0(e){let t=await e;if(!t.ok)throw new Yg({message:await l0(t),status:t.status,statusText:t.statusText,path:t.url});return await t.json()}async function d0(e,t){let n=await s0(e,{method:`POST`,body:t});if(!n.ok)throw new Yg({message:await l0(n),status:n.status,statusText:n.statusText,path:e});return await n.json()}var f0=(e=1,t=20,n)=>u0(c0.api.connections.$get({query:{page:String(e),pageSize:String(t),...n&&n!==`all`?{category:n}:{}}})),p0=e=>u0(c0.api.connections.$post({json:e})),m0=(e,t)=>u0(c0.api.connections[`:id`].$patch({param:{id:e},json:t})),h0=e=>u0(c0.api.connections[`:id`].$delete({param:{id:e}})),g0=e=>u0(c0.api.connections.test.$post({json:e})),_0=(e={})=>u0(c0.api.connections[`browser-extension`][`pair-ticket`].$post({json:e})),v0=(0,p.createContext)({});function y0(e){let t=(0,p.useRef)(null);return t.current===null&&(t.current=e()),t.current}var b0=typeof window<`u`?p.useLayoutEffect:p.useEffect,x0=(0,p.createContext)(null);function S0(e,t){e.indexOf(t)===-1&&e.push(t)}function C0(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var w0=(e,t,n)=>n>t?t:n<e?e:n,T0={},E0=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),D0=e=>typeof e==`object`&&!!e,O0=e=>/^0[^.\s]+$/u.test(e);function k0(e){let t;return()=>(t===void 0&&(t=e()),t)}var A0=e=>e,j0=(...e)=>e.reduce((e,t)=>n=>t(e(n))),M0=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},N0=class{constructor(){this.subscriptions=[]}add(e){return S0(this.subscriptions,e),()=>C0(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r){if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},P0=e=>e*1e3,F0=e=>e/1e3,I0=(e,t)=>t?1e3/t*e:0,L0=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,R0=1e-7,z0=12;function B0(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=L0(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>R0&&++s<z0);return o}function V0(e,t,n,r){if(e===t&&n===r)return A0;let i=t=>B0(t,0,1,e,n);return e=>e===0||e===1?e:L0(i(e),t,r)}var H0=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,U0=e=>t=>1-e(1-t),W0=V0(.33,1.53,.69,.99),G0=U0(W0),K0=H0(G0),q0=e=>e>=1?1:(e*=2)<1?.5*G0(e):.5*(2-2**(-10*(e-1))),J0=e=>1-Math.sin(Math.acos(e)),Y0=U0(J0),X0=H0(J0),Z0=V0(.42,0,1,1),Q0=V0(0,0,.58,1),$0=V0(.42,0,.58,1),ev=e=>Array.isArray(e)&&typeof e[0]!=`number`,tv=e=>Array.isArray(e)&&typeof e[0]==`number`,nv={linear:A0,easeIn:Z0,easeInOut:$0,easeOut:Q0,circIn:J0,circInOut:X0,circOut:Y0,backIn:G0,backInOut:K0,backOut:W0,anticipate:q0},rv=e=>typeof e==`string`,iv=e=>{if(tv(e)){e.length;let[t,n,r,i]=e;return V0(t,n,r,i)}return rv(e)?(nv[e],`${e}`,nv[e]):e},av=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`];function ov(e){let t=new Set,n=new Set,r=!1,i=!1,a=new WeakSet,o={delta:0,timestamp:0,isProcessing:!1};function s(t){a.has(t)&&(c.schedule(t),e()),t(o)}let c={schedule:(e,i=!1,o=!1)=>{let s=o&&r?t:n;return i&&a.add(e),s.add(e),e},cancel:e=>{n.delete(e),a.delete(e)},process:e=>{if(o=e,r){i=!0;return}r=!0;let a=t;t=n,n=a,t.forEach(s),t.clear(),r=!1,i&&(i=!1,c.process(e))}};return c}var sv=40;function cv(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=av.reduce((e,t)=>(e[t]=ov(a),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=T0.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,sv),1)),i.timestamp=o,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:av.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<av.length;t++)o[av[t]].cancel(e)},state:i,steps:o}}var{schedule:lv,cancel:uv,state:dv,steps:fv}=cv(typeof requestAnimationFrame<`u`?requestAnimationFrame:A0,!0),pv;function mv(){pv=void 0}var hv={now:()=>(pv===void 0&&hv.set(dv.isProcessing||T0.useManualTiming?dv.timestamp:performance.now()),pv),set:e=>{pv=e,queueMicrotask(mv)}},gv=e=>t=>typeof t==`string`&&t.startsWith(e),_v=gv(`--`),vv=gv(`var(--`),yv=e=>vv(e)?bv.test(e.split(`/*`)[0].trim()):!1,bv=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function xv(e){return typeof e==`string`&&e.split(`/*`)[0].includes(`var(--`)}var Sv={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},Cv={...Sv,transform:e=>w0(0,1,e)},wv={...Sv,default:1},Tv=e=>Math.round(e*1e5)/1e5,Ev=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Dv(e){return e==null}var Ov=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,kv=(e,t)=>n=>!!(typeof n==`string`&&Ov.test(n)&&n.startsWith(e)||t&&!Dv(n)&&Object.prototype.hasOwnProperty.call(n,t)),Av=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(Ev);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},jv=e=>w0(0,255,e),Mv={...Sv,transform:e=>Math.round(jv(e))},Nv={test:kv(`rgb`,`red`),parse:Av(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+Mv.transform(e)+`, `+Mv.transform(t)+`, `+Mv.transform(n)+`, `+Tv(Cv.transform(r))+`)`};function Pv(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var Fv={test:kv(`#`),parse:Pv,transform:Nv.transform},Iv=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Lv=Iv(`deg`),Rv=Iv(`%`),W=Iv(`px`),zv=Iv(`vh`),Bv=Iv(`vw`),Vv={...Rv,parse:e=>Rv.parse(e)/100,transform:e=>Rv.transform(e*100)},Hv={test:kv(`hsl`,`hue`),parse:Av(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+Rv.transform(Tv(t))+`, `+Rv.transform(Tv(n))+`, `+Tv(Cv.transform(r))+`)`},Uv={test:e=>Nv.test(e)||Fv.test(e)||Hv.test(e),parse:e=>Nv.test(e)?Nv.parse(e):Hv.test(e)?Hv.parse(e):Fv.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?Nv.transform(e):Hv.transform(e),getAnimatableNone:e=>{let t=Uv.parse(e);return t.alpha=0,Uv.transform(t)}},Wv=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Gv(e){return isNaN(e)&&typeof e==`string`&&(e.match(Ev)?.length||0)+(e.match(Wv)?.length||0)>0}var Kv=`number`,qv=`color`,Jv=`var`,Yv=`var(`,Xv="${}",Zv=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Qv(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(Zv,e=>(Uv.test(e)?(r.color.push(a),i.push(qv),n.push(Uv.parse(e))):e.startsWith(Yv)?(r.var.push(a),i.push(Jv),n.push(e)):(r.number.push(a),i.push(Kv),n.push(parseFloat(e))),++a,Xv)).split(Xv),indexes:r,types:i}}function $v(e){return Qv(e).values}function ey({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];i+=e===Kv?Tv(r[a]):e===qv?Uv.transform(r[a]):r[a]}return i}}function ty(e){return ey(Qv(e))}var ny=e=>typeof e==`number`?0:Uv.test(e)?Uv.getAnimatableNone(e):e,ry=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:ny(e);function iy(e){let t=Qv(e);return ey(t)(t.values.map((e,n)=>ry(e,t.split[n])))}var ay={test:Gv,parse:$v,createTransformer:ty,getAnimatableNone:iy};function oy(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function sy({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=oy(s,r,e+1/3),a=oy(s,r,e),o=oy(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function cy(e,t){return n=>n>0?t:e}var ly=(e,t,n)=>e+(t-e)*n,uy=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},dy=[Fv,Nv,Hv],fy=e=>dy.find(t=>t.test(e));function py(e){let t=fy(e);if(`${e}`,!t)return!1;let n=t.parse(e);return t===Hv&&(n=sy(n)),n}var my=(e,t)=>{let n=py(e),r=py(t);if(!n||!r)return cy(e,t);let i={...n};return e=>(i.red=uy(n.red,r.red,e),i.green=uy(n.green,r.green,e),i.blue=uy(n.blue,r.blue,e),i.alpha=ly(n.alpha,r.alpha,e),Nv.transform(i))},hy=new Set([`none`,`hidden`]);function gy(e,t){return hy.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function _y(e,t){return n=>ly(e,t,n)}function vy(e){return typeof e==`number`?_y:typeof e==`string`?yv(e)?cy:Uv.test(e)?my:Sy:Array.isArray(e)?yy:typeof e==`object`?Uv.test(e)?my:by:cy}function yy(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>vy(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function by(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=vy(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function xy(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]],s=e.values[o]??0;n[i]=s,r[a]++}return n}var Sy=(e,t)=>{let n=ay.createTransformer(t),r=Qv(e),i=Qv(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?hy.has(e)&&!i.values.length||hy.has(t)&&!r.values.length?gy(e,t):j0(yy(xy(r,i),i.values),n):(`${e}${t}`,cy(e,t))};function Cy(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?ly(e,t,n):vy(e)(e,t)}var wy=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>lv.update(t,e),stop:()=>uv(t),now:()=>dv.isProcessing?dv.timestamp:hv.now()}},Ty=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},Ey=2e4;function Dy(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function Oy(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(Dy(r),Ey);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:F0(i)}}var ky={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Ay(e,t){return e*Math.sqrt(1-t*t)}var jy=12;function My(e,t,n){let r=n;for(let n=1;n<jy;n++)r-=e(r)/t(r);return r}var Ny=.001;function Py({duration:e=ky.duration,bounce:t=ky.bounce,velocity:n=ky.velocity,mass:r=ky.mass}){let i,a;ky.maxDuration;let o=1-t;o=w0(ky.minDamping,ky.maxDamping,o),e=w0(ky.minDuration,ky.maxDuration,F0(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=Ay(t,o),c=Math.exp(-i);return Ny-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=Ay(t**2,o);return(-i(t)+Ny>0?-1:1)*((a-s)*c)/l}):(i=t=>-.001+Math.exp(-t*e)*((t-n)*e+1),a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=My(i,a,s);if(e=P0(e),isNaN(c))return{stiffness:ky.stiffness,damping:ky.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var Fy=[`duration`,`bounce`],Iy=[`stiffness`,`damping`,`mass`];function Ly(e,t){return t.some(t=>e[t]!==void 0)}function Ry(e){let t={velocity:ky.velocity,stiffness:ky.stiffness,damping:ky.damping,mass:ky.mass,isResolvedFromDuration:!1,...e};if(!Ly(e,Iy)&&Ly(e,Fy)){if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*w0(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:ky.mass,stiffness:i,damping:a}}else{let n=Py({...e,velocity:0});t={...t,...n,mass:ky.mass},t.isResolvedFromDuration=!0}}return t}function zy(e=ky.visualDuration,t=ky.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=Ry({...n,velocity:-F0(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=F0(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?ky.restSpeed.granular:ky.restSpeed.default,i||=v?ky.restDelta.granular:ky.restDelta.default;let y,b,x,S,C,w;if(h<1)x=Ay(_,h),S=(m+h*_*g)/x,y=e=>{let t=Math.exp(-h*_*e);return o-t*(S*Math.sin(x*e)+g*Math.cos(x*e))},C=h*_*S+g*x,w=h*_*g-S*x,b=e=>Math.exp(-h*_*e)*(C*Math.sin(x*e)+w*Math.cos(x*e));else if(h===1){y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);let e=m+_*g;b=t=>Math.exp(-_*t)*(_*e*t-m)}else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};let t=(m+h*_*g)/e,n=h*_*t-g*e,r=h*_*g-t*e;b=t=>{let i=Math.exp(-h*_*t),a=Math.min(e*t,300);return i*(n*Math.sinh(a)+r*Math.cosh(a))}}let T={calculatedDuration:p&&d||null,velocity:e=>P0(b(e)),next:e=>{if(!p&&h<1){let t=Math.exp(-h*_*e),n=Math.sin(x*e),a=Math.cos(x*e),c=o-t*(S*n+g*a),l=P0(t*(C*n+w*a));return s.done=Math.abs(l)<=r&&Math.abs(o-c)<=i,s.value=s.done?o:c,s}let t=y(e);if(p)s.done=e>=d;else{let n=P0(b(e));s.done=Math.abs(n)<=r&&Math.abs(o-t)<=i}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(Dy(T),Ey),t=Ty(t=>T.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return T}zy.applyToOptions=e=>{let t=Oy(e,100,zy);return e.ease=t.ease,e.duration=P0(t.duration),e.type=`keyframes`,e};var By=5;function Vy(e,t,n){let r=Math.max(t-By,0);return I0(n-e(r),t-r)}function Hy({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=zy({keyframes:[f.value,m(f.value)],velocity:Vy(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function Uy(e,t,n){let r=[],i=n||T0.mix||Cy,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=j0(Array.isArray(t)?t[n]||A0:t,a)),r.push(a)}return r}function Wy(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(t.length,a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=Uy(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=M0(e[r],e[r+1],n);return s[r](i)};return n?t=>l(w0(e[0],e[a-1],t)):l}function Gy(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=M0(0,t,r);e.push(ly(n,1,i))}}function Ky(e){let t=[0];return Gy(t,e.length-1),t}function qy(e,t){return e.map(e=>e*t)}function Jy(e,t){return e.map(()=>t||$0).splice(0,e.length-1)}function Yy({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=ev(r)?r.map(iv):iv(r),a={done:!1,value:t[0]},o=Wy(qy(n&&n.length===t.length?n:Ky(t),e),t,{ease:Array.isArray(i)?i:Jy(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var Xy=e=>e!==null;function Zy(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(Xy),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var Qy={decay:Hy,inertia:Hy,tween:Yy,keyframes:Yy,spring:zy};function $y(e){typeof e.type==`string`&&(e.type=Qy[e.type])}var e2=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},t2=e=>e/100,n2=class extends e2{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==hv.now()&&this.tick(hv.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;$y(e);let{type:t=Yy,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||Yy;s!==Yy&&typeof o[0]!=`number`&&(this.mixKeyframes=j0(t2,Cy(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=Dy(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.currentTime=this.holdTime===null?t:this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=w0(0,1,n)*o}let b;_?(this.delayState.value=l[0],b=this.delayState):b=y.next(v),i&&!_&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==Hy&&(b.value=Zy(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return F0(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+F0(e)}get time(){return F0(this.currentTime)}set time(e){e=P0(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;return e<=0?this.options.velocity||0:this.generator.velocity?this.generator.velocity(e):Vy(e=>this.generator.next(e).value,e,this.generator.next(e).value)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(hv.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=F0(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=wy,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(hv.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function r2(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var i2=e=>e*180/Math.PI,a2=e=>s2(i2(Math.atan2(e[1],e[0]))),o2={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:a2,rotateZ:a2,skewX:e=>i2(Math.atan(e[1])),skewY:e=>i2(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},s2=e=>(e%=360,e<0&&(e+=360),e),c2=a2,l2=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),u2=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),d2={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:l2,scaleY:u2,scale:e=>(l2(e)+u2(e))/2,rotateX:e=>s2(i2(Math.atan2(e[6],e[5]))),rotateY:e=>s2(i2(Math.atan2(-e[2],e[0]))),rotateZ:c2,rotate:c2,skewX:e=>i2(Math.atan(e[4])),skewY:e=>i2(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function f2(e){return+!!e.includes(`scale`)}function p2(e,t){if(!e||e===`none`)return f2(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=d2,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=o2,i=t}if(!i)return f2(t);let a=r[t],o=i[1].split(`,`).map(h2);return typeof a==`function`?a(o):o[a]}var m2=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return p2(n,t)};function h2(e){return parseFloat(e.trim())}var g2=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],_2=new Set([...g2,`pathRotation`]),v2=e=>e===Sv||e===W,y2=new Set([`x`,`y`,`z`]),b2=g2.filter(e=>!y2.has(e));function x2(e){let t=[];return b2.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}var S2={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>p2(t,`x`),y:(e,{transform:t})=>p2(t,`y`)};S2.translateX=S2.x,S2.translateY=S2.y;var C2=new Set,w2=!1,T2=!1,E2=!1;function D2(){if(T2){let e=Array.from(C2).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=x2(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}T2=!1,w2=!1,C2.forEach(e=>e.complete(E2)),C2.clear()}function O2(){C2.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(T2=!0)})}function k2(){E2=!0,O2(),D2(),E2=!1}var A2=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(C2.add(this),w2||(w2=!0,lv.read(O2),lv.resolveKeyframes(D2))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}r2(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),C2.delete(this)}cancel(){this.state===`scheduled`&&(C2.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},j2=e=>e.startsWith(`--`);function M2(e,t,n){j2(t)?e.style.setProperty(t,n):e.style[t]=n}var N2={};function P2(e,t){let n=k0(e);return()=>N2[t]??n()}var F2=P2(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),I2=P2(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),L2=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,R2={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:L2([0,.65,.55,1]),circOut:L2([.55,0,1,.45]),backIn:L2([.31,.01,.66,-.59]),backOut:L2([.33,1.53,.69,.99])};function z2(e,t){if(e)return typeof e==`function`?I2()?Ty(e,t):`ease-out`:tv(e)?L2(e):Array.isArray(e)?e.map(e=>z2(e,t)||R2.easeOut):R2[e]}function B2(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=z2(s,i);Array.isArray(d)&&(u.easing=d);let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};return l&&(f.pseudoElement=l),e.animate(u,f)}function V2(e){return typeof e==`function`&&`applyToOptions`in e}function H2({type:e,...t}){return V2(e)&&I2()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var U2=class extends e2{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=H2(e);this.animation=B2(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=Zy(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),M2(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e!==`idle`&&e!==`finished`&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return F0(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+F0(e)}get time(){return F0(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=P0(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&F2()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),A0):r(this)}},W2={anticipate:q0,backInOut:K0,circInOut:X0};function G2(e){return e in W2}function K2(e){typeof e.ease==`string`&&G2(e.ease)&&(e.ease=W2[e.ease])}var q2=10,J2=class extends U2{constructor(e){K2(e),$y(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new n2({...a,autoplay:!1}),s=Math.max(q2,hv.now()-this.startTime),c=w0(0,q2,s-q2),l=o.sample(s).value,{name:u}=this.options;i&&u&&M2(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},Y2=(e,t)=>t!==`zIndex`&&!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(ay.test(e)||e===`0`)&&!e.startsWith(`url(`));function X2(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Z2(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=Y2(i,t),s=Y2(a,t);return`${t}${i}${a}${o?a:i}`,!o||!s?!1:X2(e)||(n===`spring`||V2(n))&&r}function Q2(e){e.duration=0,e.type=`keyframes`}var $2=new Set([`opacity`,`clipPath`,`filter`,`transform`,`backgroundColor`]),e4=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function t4(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&e4.test(e[t]))return!0;return!1}var n4=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),r4=k0(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function i4(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e,c=t?.owner?.current;if(!(c instanceof HTMLElement)&&!(c instanceof SVGElement))return!1;let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return r4()&&n&&($2.has(n)||n4.has(n)&&t4(s))&&(n!==`transform`||!u)&&!l&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var a4=40,o4=class extends e2{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=hv.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u},f=l?.KeyframeResolver||A2;this.keyframeResolver=new f(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=hv.now();let u=!0;Z2(e,i,a,o)||(u=!1,(T0.instantAnimations||!s)&&l?.(Zy(e,n,t)),e[0]=e[e.length-1],Q2(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>a4?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!c&&i4(d),p=d.motionValue?.owner?.current,m;if(f)try{m=new J2({...d,element:p})}catch{m=new n2(d)}else m=new n2(d);m.finished.then(()=>{this.notifyFinished()}).catch(A0),this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),k2()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function s4(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var c4=30,l4=e=>!isNaN(parseFloat(e)),u4={current:void 0},d4=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=hv.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=hv.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=l4(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new N0);let n=this.events[e].add(t);return e===`change`?()=>{n(),lv.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return u4.current&&u4.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=hv.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>c4)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,c4);return I0(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function f4(e,t){return new d4(e,t)}function p4(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function m4(e,t){let n=e?.[t]??e?.default??e;return n===e?n:p4(n,e)}var h4={type:`spring`,stiffness:500,damping:25,restSpeed:10},g4=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),_4={type:`keyframes`,duration:.8},v4={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},y4=(e,{keyframes:t})=>t.length>2?_4:_2.has(e)?e.startsWith(`scale`)?g4(t[1]):h4:v4,b4=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function x4(e){for(let t in e)if(!b4.has(t))return!0;return!1}var S4=(e,t,n,r={},i,a)=>o=>{let s=m4(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=P0(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};x4(s)||Object.assign(u,y4(e,u)),u.duration&&=P0(u.duration),u.repeatDelay&&=P0(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Q2(u),u.delay===0&&(d=!0)),(T0.instantAnimations||T0.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,Q2(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=Zy(u.keyframes,s);if(e!==void 0){lv.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new n2(u):new o4(u)},C4=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function w4(e){let t=C4.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function T4(e,t,n=1){`${e}`;let[r,i]=w4(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return E0(e)?parseFloat(e):e}return yv(i)?T4(i,t,n+1):i}function E4(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function D4(e,t,n,r){if(typeof t==`function`){let[i,a]=E4(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=E4(r);t=t(n===void 0?e.custom:n,i,a)}return t}function O4(e,t,n){let r=e.getProps();return D4(r,t,n===void 0?r.custom:n,e)}var k4=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...g2]),A4=e=>Array.isArray(e);function j4(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,f4(n))}function M4(e){return A4(e)?e[e.length-1]||0:e}function N4(e,t){let{transitionEnd:n={},transition:r={},...i}=O4(e,t)||{};i={...i,...n};for(let t in i)j4(e,t,M4(i[t]))}var P4=e=>!!(e&&e.getVelocity);function F4(e){return!!(P4(e)&&e.add)}function I4(e,t){let n=e.getValue(`willChange`);if(F4(n))return n.add(t);if(!n&&T0.WillChange){let n=new T0.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function L4(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var R4=`data-`+L4(`framerAppearId`);function z4(e){return e.props[R4]}function B4({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function V4(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?p4(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState&&e.animationState.getState()[i],p=a?.path;p&&p.animateVisualElement(e,s,a,n,d);for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&B4(f,t))continue;let o={delay:n,...m4(a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){lv.update(()=>r.set(i));continue}let p=!1;if(window.MotionHandoffAnimation){let n=z4(e);if(n){let e=window.MotionHandoffAnimation(n,t,lv);e!==null&&(o.startTime=e,p=!0)}}I4(e,t);let m=l??e.shouldReduceMotion;r.start(S4(t,r,i,m&&k4.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>lv.update(()=>{o&&N4(e,o)});d.length?Promise.all(d).then(t):t()}return d}function H4(e,t,n={}){let r=O4(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(V4(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return U4(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}return Promise.all([a(),o(n.delay)])}function U4(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push(H4(c,t,{...o,delay:n+(typeof r==`function`?0:r)+s4(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function W4(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>H4(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=H4(e,t,n);else{let i=typeof t==`function`?O4(e,t,n.custom):t;r=Promise.all(V4(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var G4={test:e=>e===`auto`,parse:e=>e},K4=e=>t=>t.test(e),q4=[Sv,W,Rv,Lv,Bv,zv,G4],J4=e=>q4.find(K4(e));function Y4(e){return typeof e==`number`?e===0:e===null||e===`none`||e===`0`||O0(e)}var X4=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function Z4(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(Ev)||[];if(!r)return e;let i=n.replace(r,``),a=+!!X4.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var Q4=/\b([a-z-]*)\(.*?\)/gu,$4={...ay,getAnimatableNone:e=>{let t=e.match(Q4);return t?t.map(Z4).join(` `):e}},e3={...ay,getAnimatableNone:e=>{let t=ay.parse(e);return ay.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},t3={...Sv,transform:Math.round},n3={borderWidth:W,borderTopWidth:W,borderRightWidth:W,borderBottomWidth:W,borderLeftWidth:W,borderRadius:W,borderTopLeftRadius:W,borderTopRightRadius:W,borderBottomRightRadius:W,borderBottomLeftRadius:W,width:W,maxWidth:W,height:W,maxHeight:W,top:W,right:W,bottom:W,left:W,inset:W,insetBlock:W,insetBlockStart:W,insetBlockEnd:W,insetInline:W,insetInlineStart:W,insetInlineEnd:W,padding:W,paddingTop:W,paddingRight:W,paddingBottom:W,paddingLeft:W,paddingBlock:W,paddingBlockStart:W,paddingBlockEnd:W,paddingInline:W,paddingInlineStart:W,paddingInlineEnd:W,margin:W,marginTop:W,marginRight:W,marginBottom:W,marginLeft:W,marginBlock:W,marginBlockStart:W,marginBlockEnd:W,marginInline:W,marginInlineStart:W,marginInlineEnd:W,fontSize:W,backgroundPositionX:W,backgroundPositionY:W,rotate:Lv,pathRotation:Lv,rotateX:Lv,rotateY:Lv,rotateZ:Lv,scale:wv,scaleX:wv,scaleY:wv,scaleZ:wv,skew:Lv,skewX:Lv,skewY:Lv,distance:W,translateX:W,translateY:W,translateZ:W,x:W,y:W,z:W,perspective:W,transformPerspective:W,opacity:Cv,originX:Vv,originY:Vv,originZ:W,zIndex:t3,fillOpacity:Cv,strokeOpacity:Cv,numOctaves:t3},r3={...n3,color:Uv,backgroundColor:Uv,outlineColor:Uv,fill:Uv,stroke:Uv,borderColor:Uv,borderTopColor:Uv,borderRightColor:Uv,borderBottomColor:Uv,borderLeftColor:Uv,filter:$4,WebkitFilter:$4,mask:e3,WebkitMask:e3},i3=e=>r3[e],a3=new Set([$4,e3]);function o3(e,t){let n=i3(e);return a3.has(n)||(n=ay),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var s3=new Set([`auto`,`none`,`0`]);function c3(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!s3.has(t)&&Qv(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=o3(n,i)}var l3=class extends A2{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),yv(r))){let i=T4(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!k4.has(n)||e.length!==2)return;let[r,i]=e,a=J4(r),o=J4(i);if(xv(r)!==xv(i)&&S2[n])this.needsMeasurement=!0;else if(a!==o){if(v2(a)&&v2(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else S2[n]&&(this.needsMeasurement=!0)}}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||Y4(e[t]))&&n.push(t);n.length&&c3(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=S2[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=S2[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}},u3=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`];function d3(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var f3=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function p3(e){return D0(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}var{schedule:m3,cancel:h3}=cv(queueMicrotask,!1),g3={x:!1,y:!1};function _3(){return g3.x||g3.y}function v3(e){return e===`x`||e===`y`?g3[e]?null:(g3[e]=!0,()=>{g3[e]=!1}):g3.x||g3.y?null:(g3.x=g3.y=!0,()=>{g3.x=g3.y=!1})}function y3(e,t){let n=d3(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function b3(e){return!(e.pointerType===`touch`||_3())}function x3(e,t,n={}){let[r,i,a]=y3(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{e.pointerType!==`touch`&&(n?r=!0:s(e))};e.addEventListener(`pointerenter`,n=>{if(!b3(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var S3=(e,t)=>t?e===t||S3(e,t.parentElement):!1,C3=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,w3=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function T3(e){return w3.has(e.tagName)||e.isContentEditable===!0}var E3=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function D3(e){return E3.has(e.tagName)||e.isContentEditable===!0}var O3=new WeakSet;function k3(e){return t=>{t.key===`Enter`&&e(t)}}function A3(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var j3=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=k3(()=>{if(O3.has(n))return;A3(n,`down`);let e=k3(()=>{A3(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>A3(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function M3(e){return C3(e)&&!_3()}var N3=new WeakSet;function P3(e,t,n={}){let[r,i,a]=y3(e,n),o=e=>{let r=e.currentTarget;if(!M3(e)||N3.has(e))return;O3.add(r),n.stopPropagation&&N3.add(e);let a=t(r,e),o={...i,capture:!0},s=(e,t)=>{window.removeEventListener(`pointerup`,c,o),window.removeEventListener(`pointercancel`,l,o),O3.has(r)&&O3.delete(r),M3(e)&&typeof a==`function`&&a(e,{success:t})},c=e=>{s(e,r===window||r===document||n.useGlobalTarget||S3(r,e.target))},l=e=>{s(e,!1)};window.addEventListener(`pointerup`,c,o),window.addEventListener(`pointercancel`,l,o)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),p3(e)&&(e.addEventListener(`focus`,e=>j3(e,i)),!T3(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function F3(e){return D0(e)&&`ownerSVGElement`in e}var I3=new WeakMap,L3,R3=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:F3(r)&&`getBBox`in r?r.getBBox()[t]:r[n],z3=R3(`inline`,`width`,`offsetWidth`),B3=R3(`block`,`height`,`offsetHeight`);function V3({target:e,borderBoxSize:t}){I3.get(e)?.forEach(n=>{n(e,{get width(){return z3(e,t)},get height(){return B3(e,t)}})})}function H3(e){e.forEach(V3)}function U3(){typeof ResizeObserver<`u`&&(L3=new ResizeObserver(H3))}function W3(e,t){L3||U3();let n=d3(e);return n.forEach(e=>{let n=I3.get(e);n||(n=new Set,I3.set(e,n)),n.add(t),L3?.observe(e)}),()=>{n.forEach(e=>{let n=I3.get(e);n?.delete(t),n?.size||L3?.unobserve(e)})}}var G3=new Set,K3;function q3(){K3=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};G3.forEach(t=>t(e))},window.addEventListener(`resize`,K3)}function J3(e){return G3.add(e),K3||q3(),()=>{G3.delete(e),!G3.size&&typeof K3==`function`&&(window.removeEventListener(`resize`,K3),K3=void 0)}}function Y3(e,t){return typeof e==`function`?J3(e):W3(e,t)}var X3={value:null,addProjectionMetrics:null};function Z3(e){return F3(e)&&e.tagName===`svg`}var Q3=[...q4,Uv,ay],$3=e=>Q3.find(K4(e)),e6=()=>({translate:0,scale:1,origin:0,originPoint:0}),t6=()=>({x:e6(),y:e6()}),n6=()=>({min:0,max:0}),r6=()=>({x:n6(),y:n6()}),i6=new WeakMap;function a6(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function o6(e){return typeof e==`string`||Array.isArray(e)}var s6=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],c6=[`initial`,...s6];function l6(e){return a6(e.animate)||c6.some(t=>o6(e[t]))}function u6(e){return!!(l6(e)||e.variants)}function d6(e,t,n){for(let r in t){let i=t[r],a=n[r];if(P4(i))e.addValue(r,i);else if(P4(a))e.addValue(r,f4(i,{owner:e}));else if(a!==i){if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,f4(t===void 0?i:t,{owner:e}))}}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var f6={current:null},p6={current:!1},m6=typeof window<`u`;function h6(){if(p6.current=!0,m6){if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>f6.current=e.matches;e.addEventListener(`change`,t),t()}else f6.current=!1}}var g6=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],_6={};function v6(e){_6=e}function y6(){return _6}var b6=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=A2,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=hv.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,lv.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=l6(t),this.isVariantNode=u6(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&P4(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,i6.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(p6.current||h6(),this.shouldReduceMotion=f6.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),uv(this.notifyUpdate),uv(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&$2.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new U2({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:P0(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=_2.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&lv.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in _6){let t=_6[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):r6()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<g6.length;t++){let n=g6[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=d6(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=f4(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(E0(n)||O0(n))?n=parseFloat(n):!$3(n)&&ay.test(t)&&(n=o3(e,t)),this.setBaseTarget(e,P4(n)?n.get():n)),P4(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=D4(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!P4(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new N0),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){m3.render(this.render)}},x6=class extends b6{constructor(){super(...arguments),this.KeyframeResolver=l3}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;P4(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},S6=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function C6({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function w6({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function T6(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function E6(e){return e===void 0||e===1}function D6({scale:e,scaleX:t,scaleY:n}){return!E6(e)||!E6(t)||!E6(n)}function O6(e){return D6(e)||k6(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function k6(e){return A6(e.x)||A6(e.y)}function A6(e){return e&&e!==`0%`}function j6(e,t,n){return n+t*(e-n)}function M6(e,t,n,r,i){return i!==void 0&&(e=j6(e,i,r)),j6(e,n,r)+t}function N6(e,t=0,n=1,r,i){e.min=M6(e.min,t,n,r,i),e.max=M6(e.max,t,n,r,i)}function P6(e,{x:t,y:n}){N6(e.x,t.translate,t.scale,t.originPoint),N6(e.y,n.translate,n.scale,n.originPoint)}var F6=.999999999999,I6=1.0000000000001;function L6(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(R6(e.x,-a.scroll.offset.x),R6(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,P6(e,o)),r&&O6(a.latestValues)&&V6(e,a.latestValues,a.layout?.layoutBox))}t.x<I6&&t.x>F6&&(t.x=1),t.y<I6&&t.y>F6&&(t.y=1)}function R6(e,t){e.min+=t,e.max+=t}function z6(e,t,n,r,i=.5){N6(e,t,n,ly(e.min,e.max,i),r)}function B6(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function V6(e,t,n){let r=n??e;z6(e.x,B6(t.x,r.x),t.scaleX,t.scale,t.originX),z6(e.y,B6(t.y,r.y),t.scaleY,t.scale,t.originY)}function H6(e,t){return C6(T6(e.getBoundingClientRect(),t))}function U6(e,t,n){let r=H6(e,n),{scroll:i}=t;return i&&(R6(r.x,i.offset.x),R6(r.y,i.offset.y)),r}var W6={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},G6=g2.length;function K6(e,t,n){let r=``,i=!0;for(let a=0;a<G6;a++){let o=g2[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===+!!o.startsWith(`scale`);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=f3(s,n3[o]);if(!c){i=!1;let t=W6[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}let a=e.pathRotation;return a&&(i=!1,r+=`rotate(${f3(a,n3.pathRotation)}) `),r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function q6(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(_2.has(e))o=!0;else if(_v(e))i[e]=n;else{let t=f3(n,n3[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=K6(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}function J6(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function Y6(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var X6={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`){if(W.test(e))e=parseFloat(e);else return e}return`${Y6(e,t.target.x)}% ${Y6(e,t.target.y)}%`}},Z6={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=ay.parse(e);if(i.length>5)return r;let a=ay.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=ly(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},Q6={borderRadius:{...X6,applyTo:[...u3]},borderTopLeftRadius:X6,borderTopRightRadius:X6,borderBottomLeftRadius:X6,borderBottomRightRadius:X6,boxShadow:Z6};function $6(e,{layout:t,layoutId:n}){return _2.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!Q6[e]||e===`opacity`)}function eb(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(P4(r[t])||i&&P4(i[t])||$6(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function tb(e){return window.getComputedStyle(e)}var nb=class extends x6{constructor(){super(...arguments),this.type=`html`,this.renderInstance=J6}mount(e){e.style,super.mount(e)}readValueFromInstance(e,t){if(_2.has(t))return this.projection?.isProjecting?f2(t):m2(e,t);{let n=tb(e),r=(_v(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return H6(e,t)}build(e,t,n){q6(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return eb(e,t,n)}},rb={offset:`stroke-dashoffset`,array:`stroke-dasharray`},ib={offset:`strokeDashoffset`,array:`strokeDasharray`};function ab(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?rb:ib;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var ob=[`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function sb(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(q6(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox);for(let e of ob)d[e]!==void 0&&(f[e]=d[e],delete d[e]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&ab(d,i,a,o,!1)}var cb=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]),lb=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function ub(e,t,n,r){J6(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(cb.has(n)?n:L4(n),t.attrs[n])}function db(e,t,n){let r=eb(e,t,n);for(let n in e)if(P4(e[n])||P4(t[n])){let t=g2.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var fb=class extends x6{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=r6}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(_2.has(t)){let e=i3(t);return e&&e.default||0}return t=cb.has(t)?t:L4(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return db(e,t,n)}build(e,t,n){sb(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){ub(e,t,n,r)}mount(e){this.isSVGTag=lb(e.tagName),super.mount(e)}},pb=c6.length;function mb(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&mb(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<pb;n++){let r=c6[n],i=e.props[r];(o6(i)||i===!1)&&(t[r]=i)}return t}function hb(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var gb=[...s6].reverse(),_b=s6.length;function vb(e){return t=>Promise.all(t.map(({animation:t,options:n})=>W4(e,t,n)))}function yb(e){let t=vb(e),n=Sb(),r=!0,i=!1,a=t=>(n,r)=>{let i=O4(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function o(n){t=n(e)}function s(o){let{props:s}=e,c=mb(e.parent)||{},l=[],u=new Set,d={},f=1/0;for(let t=0;t<_b;t++){let p=gb[t],m=n[p],h=s[p]===void 0?c[p]:s[p],g=o6(h),_=p===o?m.isActive:null;_===!1&&(f=t);let v=h===c[p]&&h!==s[p]&&g;if(v&&(r||i)&&e.manuallyAnimateOnMount&&(v=!1),m.protectedKeys={...d},!m.isActive&&_===null||!h&&!m.prevProp||a6(h)||typeof h==`boolean`)continue;if(p===`exit`&&m.isActive&&_!==!0){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}let y=bb(m.prevProp,h),b=y||p===o&&m.isActive&&!v&&g||t>f&&g,x=!1,S=Array.isArray(h)?h:[h],C=S.reduce(a(p),{});_===!1&&(C={});let{prevResolvedValues:w={}}=m,T={...w,...C},E=t=>{b=!0,u.has(t)&&(x=!0,u.delete(t)),m.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in T){let t=C[e],n=w[e];if(d.hasOwnProperty(e))continue;let r=!1;r=A4(t)&&A4(n)?!hb(t,n)||y:t!==n,r?t==null?u.add(e):E(e):t!==void 0&&u.has(e)?E(e):m.protectedKeys[e]=!0}m.prevProp=h,m.prevResolvedValues=C,m.isActive&&(d={...d,...C}),(r||i)&&e.blockInitialAnimation&&(b=!1);let D=v&&y;b&&(!D||x)&&l.push(...S.map(t=>{let n={type:p};if(typeof t==`string`&&(r||i)&&!D&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=O4(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=s4(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if(typeof s.initial!=`boolean`){let n=O4(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),l.push({animation:t})}let p=!!l.length;return r&&(s.initial===!1||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,i=!1,p?t(l):Promise.resolve()}function c(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=s(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:s,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Sb(),i=!0}}}function bb(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!hb(t,e):!1}function xb(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Sb(){return{animate:xb(!0),whileInView:xb(),whileHover:xb(),whileTap:xb(),whileDrag:xb(),whileFocus:xb(),exit:xb()}}function Cb(e,t){e.min=t.min,e.max=t.max}function wb(e,t){Cb(e.x,t.x),Cb(e.y,t.y)}function Tb(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var Eb=.9999,Db=1.0001,Ob=-.01,kb=.01;function Ab(e){return e.max-e.min}function jb(e,t,n){return Math.abs(e-t)<=n}function Mb(e,t,n,r=.5){e.origin=r,e.originPoint=ly(t.min,t.max,e.origin),e.scale=Ab(n)/Ab(t),e.translate=ly(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Eb&&e.scale<=Db||isNaN(e.scale))&&(e.scale=1),(e.translate>=Ob&&e.translate<=kb||isNaN(e.translate))&&(e.translate=0)}function Nb(e,t,n,r){Mb(e.x,t.x,n.x,r?r.originX:void 0),Mb(e.y,t.y,n.y,r?r.originY:void 0)}function Pb(e,t,n,r=0){e.min=(r?ly(n.min,n.max,r):n.min)+t.min,e.max=e.min+Ab(t)}function Fb(e,t,n,r){Pb(e.x,t.x,n.x,r?.x),Pb(e.y,t.y,n.y,r?.y)}function Ib(e,t,n,r=0){let i=r?ly(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+Ab(t)}function Lb(e,t,n,r){Ib(e.x,t.x,n.x,r?.x),Ib(e.y,t.y,n.y,r?.y)}function Rb(e,t,n,r,i){return e-=t,e=j6(e,1/n,r),i!==void 0&&(e=j6(e,1/i,r)),e}function zb(e,t=0,n=1,r=.5,i,a=e,o=e){if(Rv.test(t)&&(t=parseFloat(t),t=ly(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=ly(a.min,a.max,r);e===a&&(s-=t),e.min=Rb(e.min,t,n,s,i),e.max=Rb(e.max,t,n,s,i)}function Bb(e,t,[n,r,i],a,o){zb(e,t[n],t[r],t[i],t.scale,a,o)}var Vb=[`x`,`scaleX`,`originX`],Hb=[`y`,`scaleY`,`originY`];function Ub(e,t,n,r){Bb(e.x,t,Vb,n?n.x:void 0,r?r.x:void 0),Bb(e.y,t,Hb,n?n.y:void 0,r?r.y:void 0)}function Wb(e){return e.translate===0&&e.scale===1}function Gb(e){return Wb(e.x)&&Wb(e.y)}function Kb(e,t){return e.min===t.min&&e.max===t.max}function qb(e,t){return Kb(e.x,t.x)&&Kb(e.y,t.y)}function Jb(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Yb(e,t){return Jb(e.x,t.x)&&Jb(e.y,t.y)}function Xb(e){return Ab(e.x)/Ab(e.y)}function Zb(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Qb(e){return[e(`x`),e(`y`)]}function $b(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,pathRotation:i,rotateX:a,rotateY:o,skewX:s,skewY:c}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotate(${i}deg) `),a&&(r+=`rotateX(${a}deg) `),o&&(r+=`rotateY(${o}deg) `),s&&(r+=`skewX(${s}deg) `),c&&(r+=`skewY(${c}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var e8=u3.length,t8=e=>typeof e==`string`?parseFloat(e):e,n8=e=>typeof e==`number`||W.test(e);function r8(e,t,n,r,i,a){i?(e.opacity=ly(0,n.opacity??1,a8(r)),e.opacityExit=ly(t.opacity??1,0,o8(r))):a&&(e.opacity=ly(t.opacity??1,n.opacity??1,r));for(let i=0;i<e8;i++){let a=u3[i],o=i8(t,a),s=i8(n,a);(o!==void 0||s!==void 0)&&(o||=0,s||=0,o===0||s===0||n8(o)===n8(s)?(e[a]=Math.max(ly(t8(o),t8(s),r),0),(Rv.test(s)||Rv.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=ly(t.rotate||0,n.rotate||0,r))}function i8(e,t){return e[t]===void 0?e.borderRadius:e[t]}var a8=s8(0,.5,Y0),o8=s8(.5,.95,A0);function s8(e,t,n){return r=>r<e?0:r>t?1:n(M0(e,t,r))}function c8(e,t,n){let r=P4(e)?e:f4(e);return r.start(S4(``,r,t,n)),r.animation}function l8(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var u8=(e,t)=>e.depth-t.depth,d8=class{constructor(){this.children=[],this.isDirty=!1}add(e){S0(this.children,e),this.isDirty=!0}remove(e){C0(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(u8),this.isDirty=!1,this.children.forEach(e)}};function f8(e,t){let n=hv.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(uv(r),e(a-t))};return lv.setup(r,!0),()=>uv(r)}function p8(e){return P4(e)?e.get():e}var m8=class{constructor(){this.members=[]}add(e){S0(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;r&&r.isConnected!==!1||n.snapshot||(C0(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(C0(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}},h8={hasAnimatedSinceResize:!0,hasEverUpdated:!1},g8={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},_8=[``,`X`,`Y`,`Z`],v8=1e3,y8=0;function b8(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function x8(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=z4(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,lv,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&x8(r)}function S8({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=y8++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,X3.value&&(g8.nodes=g8.calculatedTargetDeltas=g8.calculatedProjections=0),this.nodes.forEach(T8),this.nodes.forEach(P8),this.nodes.forEach(F8),this.nodes.forEach(E8),X3.addProjectionMetrics&&X3.addProjectionMetrics(g8)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new d8)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new N0),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=F3(t)&&!Z3(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;lv.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=f8(i,250),h8.hasAnimatedSinceResize&&(h8.hasAnimatedSinceResize=!1,this.nodes.forEach(N8)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||H8,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!Yb(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...m4(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l,t.path)}else t||N8(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),uv(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(I8),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&x8(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(k8),this.nodes.forEach(O8);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(A8);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(j8),this.nodes.forEach(M8),this.nodes.forEach(C8),this.nodes.forEach(w8)):this.nodes.forEach(A8),this.clearAllSnapshots();let e=hv.now();dv.delta=w0(0,1e3/60,e-dv.timestamp),dv.timestamp=e,dv.isProcessing=!0,fv.update.process(dv),fv.preRender.process(dv),fv.render.process(dv),dv.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,m3.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(D8),this.sharedNodes.forEach(L8)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,lv.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){lv.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),this.snapshot&&!Ab(this.snapshot.measuredBox.x)&&!Ab(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||=r6(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!Gb(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||O6(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),K8(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return r6();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(J8))){let{scroll:e}=this.root;e&&(R6(t.x,e.offset.x),R6(t.y,e.offset.y))}return t}removeElementScroll(e){let t=r6();if(wb(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&wb(t,e),R6(t.x,i.offset.x),R6(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||r6();wb(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(R6(r.x,-n.scroll.offset.x),R6(r.y,-n.scroll.offset.y)),O6(n.latestValues)&&V6(r,n.latestValues,n.layout?.layoutBox)}return O6(this.latestValues)&&V6(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=r6();wb(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!O6(n.latestValues))continue;let r;n.instance&&(D6(n.latestValues)&&n.updateSnapshot(),r=r6(),wb(r,n.measurePageBox())),Ub(t,n.latestValues,n.snapshot?.layoutBox,r)}return O6(this.latestValues)&&Ub(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==dv.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=dv.timestamp;let a=this.getClosestProjectingParent();a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target=r6(),this.targetWithTransforms=r6()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Fb(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):wb(this.target,this.layout.layoutBox),P6(this.target,this.targetDelta)):wb(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),X3.value&&g8.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||D6(this.parent.latestValues)||k6(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=r6(),this.relativeTargetOrigin=r6(),Lb(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),wb(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===dv.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;wb(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;L6(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=r6());let{target:s}=e;s?(!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Tb(this.prevProjectionDelta.x,this.projectionDelta.x),Tb(this.prevProjectionDelta.y,this.projectionDelta.y)),Nb(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.treeScale.x===a&&this.treeScale.y===o&&Zb(this.projectionDelta.x,this.prevProjectionDelta.x)&&Zb(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),X3.value&&g8.calculatedProjections++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=t6(),this.projectionDelta=t6(),this.projectionDeltaWithTransform=t6()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=t6();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=r6(),c=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,d=!(!c||u||this.options.crossfade!==!0||this.path.some(V8));this.animationProgress=0;let f,p=n?.interpolateProjection(e);this.mixTargetDelta=t=>{let n=t/1e3,r=p?.(n);r?(o.x.translate=r.x,o.x.scale=ly(e.x.scale,1,n),o.x.origin=e.x.origin,o.x.originPoint=e.x.originPoint,o.y.translate=r.y,o.y.scale=ly(e.y.scale,1,n),o.y.origin=e.y.origin,o.y.originPoint=e.y.originPoint):(R8(o.x,e.x,n),R8(o.y,e.y,n)),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Lb(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),B8(this.relativeTarget,this.relativeTargetOrigin,s,n),f&&qb(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=r6(),wb(f,this.relativeTarget)),c&&(this.animationValues=a,r8(a,i,this.latestValues,n,d,u)),r&&r.rotate!==void 0&&(this.animationValues||=a,this.animationValues.pathRotation=r.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(uv(this.pendingAnimation),void 0),this.pendingAnimation=lv.update(()=>{h8.hasAnimatedSinceResize=!0,this.motionValue||=f4(0),this.motionValue.jump(0,!1),this.currentAnimation=c8(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(v8),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&q8(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||r6();let t=Ab(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=Ab(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}wb(t,n),V6(t,i),Nb(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new m8),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&b8(`z`,e,r,this.animationValues);for(let t=0;t<_8.length;t++)b8(`rotate${_8[t]}`,e,r,this.animationValues),b8(`skew${_8[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=p8(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=p8(t?.pointerEvents)||``),this.hasProjected&&!O6(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=$b(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,e.opacity=r.animationValues?r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in Q6){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=Q6[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?p8(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(O8),this.root.sharedNodes.clear()}}}function C8(e){e.updateLayout()}function w8(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i===`size`)Qb(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=Ab(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;Cb(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else q8(i,t.layoutBox,n)&&Qb(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=Ab(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=t6();Nb(o,n,t.layoutBox);let s=t6();a?Nb(s,e.applyTransform(r,!0),t.measuredBox):Nb(s,n,t.layoutBox);let c=!Gb(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=e.options.layoutAnchor||void 0,s=r6();Lb(s,t.layoutBox,i.layoutBox,o);let c=r6();Lb(c,n,a.layoutBox,o),Yb(s,c)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=c,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function T8(e){X3.value&&g8.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function E8(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function D8(e){e.clearSnapshot()}function O8(e){e.clearMeasurements()}function k8(e){e.isLayoutDirty=!0,e.updateLayout()}function A8(e){e.isLayoutDirty=!1}function j8(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function M8(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function N8(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function P8(e){e.resolveTargetDelta()}function F8(e){e.calcProjection()}function I8(e){e.resetSkewAndRotation()}function L8(e){e.removeLeadSnapshot()}function R8(e,t,n){e.translate=ly(t.translate,0,n),e.scale=ly(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function z8(e,t,n,r){e.min=ly(t.min,n.min,r),e.max=ly(t.max,n.max,r)}function B8(e,t,n,r){z8(e.x,t.x,n.x,r),z8(e.y,t.y,n.y,r)}function V8(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var H8={duration:.45,ease:[.4,0,.1,1]},U8=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),W8=U8(`applewebkit/`)&&!U8(`chrome/`)?Math.round:A0;function G8(e){e.min=W8(e.min),e.max=W8(e.max)}function K8(e){G8(e.x),G8(e.y)}function q8(e,t,n){return e===`position`||e===`preserve-aspect`&&!jb(Xb(t),Xb(n),.2)}function J8(e){return e!==e.root&&e.scroll?.wasRoot}var Y8=S8({attachResizeListener:(e,t)=>l8(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),X8={current:void 0},Z8=S8({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!X8.current){let e=new Y8({});e.mount(window),e.setOptions({layoutScroll:!0}),X8.current=e}return X8.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),Q8=(0,p.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function $8(e=!0){let t=(0,p.useContext)(x0);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,p.useId)();(0,p.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,p.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var ex=(0,p.createContext)({strict:!1}),tx={animation:[`animate`,`variants`,`whileHover`,`whileTap`,`exit`,`whileInView`,`whileFocus`,`whileDrag`],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},nx=!1;function rx(){if(nx)return;let e={};for(let t in tx)e[t]={isEnabled:e=>tx[t].some(t=>!!e[t])};v6(e),nx=!0}function ix(){return rx(),y6()}function ax(e){let t=ix();for(let n in e)t[n]={...t[n],...e[n]};v6(t)}var ox=new Set(`animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`));function sx(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||ox.has(e)}var cx=r({default:()=>lx}),lx,ux=n((()=>{throw lx={},Error(`Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?`)})),dx=e=>!sx(e);function fx(e){typeof e==`function`&&(dx=t=>t.startsWith(`on`)?!sx(t):e(t))}try{fx((ux(),t(cx)).default)}catch{}function px(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||P4(e[i])||(dx(i)||n===!0&&sx(i)||!t&&!sx(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}var mx=(0,p.createContext)({});function hx(e,t){if(l6(e)){let{initial:t,animate:n}=e;return{initial:t===!1||o6(t)?t:void 0,animate:o6(n)?n:void 0}}return e.inherit===!1?{}:t}function gx(e){let{initial:t,animate:n}=hx(e,(0,p.useContext)(mx));return(0,p.useMemo)(()=>({initial:t,animate:n}),[_x(t),_x(n)])}function _x(e){return Array.isArray(e)?e.join(` `):e}var vx=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function yx(e,t,n){for(let r in t)!P4(t[r])&&!$6(r,n)&&(e[r]=t[r])}function bx({transformTemplate:e},t){return(0,p.useMemo)(()=>{let n=vx();return q6(n,t,e),Object.assign({},n.vars,n.style)},[t])}function xx(e,t){let n=e.style||{},r={};return yx(r,n,e),Object.assign(r,bx(e,t)),r}function Sx(e,t){let n={},r=xx(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var Cx=()=>({...vx(),attrs:{}});function wx(e,t,n,r){let i=(0,p.useMemo)(()=>{let n=Cx();return sb(n,t,lb(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};yx(t,e.style,e),i.style={...t,...i.style}}return i}var Tx=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function Ex(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(Tx.indexOf(e)>-1||/[A-Z]/u.test(e))}function Dx(e,t,n,{latestValues:r},i,a=!1,o){let s=(o??Ex(e)?wx:Sx)(t,r,i,e),c=px(t,typeof e==`string`,a),l=e===p.Fragment?{}:{...c,...s,ref:n},{children:u}=t,d=(0,p.useMemo)(()=>P4(u)?u.get():u,[u]);return(0,p.createElement)(e,{...l,children:d})}function Ox({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:kx(n,r,i,e),renderState:t()}}function kx(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=p8(a[e]);let{initial:o,animate:s}=e,c=l6(e),l=u6(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!a6(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=D4(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var Ax=e=>(t,n)=>{let r=(0,p.useContext)(mx),i=(0,p.useContext)(x0),a=()=>Ox(e,t,r,i);return n?a():y0(a)},jx=Ax({scrapeMotionValuesFromProps:eb,createRenderState:vx}),Mx=Ax({scrapeMotionValuesFromProps:db,createRenderState:Cx}),Nx=Symbol.for(`motionComponentSymbol`);function Px(e,t,n){let r=(0,p.useRef)(n);(0,p.useInsertionEffect)(()=>{r.current=n});let i=(0,p.useRef)(null);return(0,p.useCallback)(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());let a=r.current;if(typeof a==`function`){if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n)}else a&&(a.current=n)},[t])}var Fx=(0,p.createContext)({});function Ix(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function Lx(e,t,n,r,i,a){let{visualElement:o}=(0,p.useContext)(mx),s=(0,p.useContext)(ex),c=(0,p.useContext)(x0),l=(0,p.useContext)(Q8),u=l.reducedMotion,d=l.skipAnimations,f=(0,p.useRef)(null),m=(0,p.useRef)(!1);r||=s.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:a}),m.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));let h=f.current,g=(0,p.useContext)(Fx);h&&!h.projection&&i&&(h.type===`html`||h.type===`svg`)&&Rx(f.current,n,i,g);let _=(0,p.useRef)(!1);(0,p.useInsertionEffect)(()=>{h&&_.current&&h.update(n,c)});let v=n[R4],y=(0,p.useRef)(!!v&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return b0(()=>{m.current=!0,h&&(_.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),h.scheduleRenderMicrotask(),y.current&&h.animationState&&h.animationState.animateChanges())}),(0,p.useEffect)(()=>{h&&(!y.current&&h.animationState&&h.animationState.animateChanges(),y.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),!1),h.enteringChildren=void 0)}),h}function Rx(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:zx(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&Ix(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function zx(e){if(e)return e.options.allowProjection===!1?zx(e.parent):e.projection}function Bx(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&ax(r);let a=n?n===`svg`:Ex(e),o=a?Mx:jx;function s(n,s){let c,l={...(0,p.useContext)(Q8),...n,layoutId:Vx(n)},{isStatic:u}=l,d=gx(n),f=o(n,u);if(!u&&typeof window<`u`){Hx(l,r);let t=Ux(l);c=t.MeasureLayout,d.visualElement=Lx(e,f,l,i,t.ProjectionNode,a)}return(0,P.jsxs)(mx.Provider,{value:d,children:[c&&d.visualElement?(0,P.jsx)(c,{visualElement:d.visualElement,...l}):null,Dx(e,n,Px(f,d.visualElement,s),f,u,t,a)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,p.forwardRef)(s);return c[Nx]=e,c}function Vx({layoutId:e}){let t=(0,p.useContext)(v0).id;return t&&e!==void 0?t+`-`+e:e}function Hx(e,t){(0,p.useContext)(ex).strict}function Ux(e){let{drag:t,layout:n}=ix();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function Wx(e,t){if(typeof Proxy>`u`)return Bx;let n=new Map,r=(n,r)=>Bx(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,Bx(a,void 0,e,t)),n.get(a))})}var Gx=(e,t)=>t.isSVG??Ex(e)?new fb(t):new nb(t,{allowProjection:e!==p.Fragment}),Kx=class extends S6{constructor(e){super(e),e.animationState||=yb(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();a6(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},qx=0,Jx={animation:{Feature:Kx},exit:{Feature:class extends S6{constructor(){super(...arguments),this.id=qx++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&n===!1){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if(typeof e==`string`||typeof e==`object`&&e&&!Array.isArray(e)){let n=O4(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...r}=n;for(let e in r)this.node.getValue(e)?.jump(r[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive(`exit`,!1);this.isExitComplete=!1;return}let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function Yx(e){return{point:{x:e.pageX,y:e.pageY}}}var Xx=e=>t=>C3(t)&&e(t,Yx(t));function Zx(e,t,n,r){return l8(e,t,Xx(n),r)}var Qx=({current:e})=>e?e.ownerDocument.defaultView:null,$x=(e,t)=>Math.abs(e-t);function e5(e,t){let n=$x(e.x,t.x),r=$x(e.y,t.y);return Math.sqrt(n**2+r**2)}var t5=new Set([`auto`,`scroll`]),n5=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=r5(this.lastRawMoveEventInfo,this.transformPagePoint));let e=a5(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=e5(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=dv;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=r5(t,this.transformPagePoint),lv.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=a5(e.type===`pointercancel`?this.lastMoveEventInfo:r5(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!C3(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=r5(Yx(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=dv;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,a5(s,this.history));let d={passive:!0,capture:!0};this.removeListeners=j0(Zx(this.contextWindow,`pointermove`,this.handlePointerMove,d),Zx(this.contextWindow,`pointerup`,this.handlePointerUp,d),Zx(this.contextWindow,`pointercancel`,this.handlePointerUp,d)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(t5.has(e.overflowX)||t5.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.addEventListener(`scroll`,this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};(i.x!==0||i.y!==0)&&(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),lv.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),uv(this.updatePoint)}};function r5(e,t){return t?{point:t(e.point)}:e}function i5(e,t){return{x:e.x-t.x,y:e.y-t.y}}function a5({point:e},t){return{point:e,delta:i5(e,s5(t)),offset:i5(e,o5(t)),velocity:c5(t,.1)}}function o5(e){return e[0]}function s5(e){return e[e.length-1]}function c5(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=s5(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>P0(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>P0(t)*2&&(r=e[1]);let a=F0(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function l5(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ly(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ly(n,e,r.max):Math.min(e,n)),e}function u5(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function d5(e,{top:t,left:n,bottom:r,right:i}){return{x:u5(e.x,n,i),y:u5(e.y,t,r)}}function f5(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function p5(e,t){return{x:f5(e.x,t.x),y:f5(e.y,t.y)}}function m5(e,t){let n=.5,r=Ab(e),i=Ab(t);return i>r?n=M0(t.min,t.max-r,e.min):r>i&&(n=M0(e.min,e.max-i,t.min)),w0(0,1,n)}function h5(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var g5=.35;function _5(e=g5){return e===!1?e=0:e===!0&&(e=g5),{x:v5(e,`left`,`right`),y:v5(e,`top`,`bottom`)}}function v5(e,t,n){return{min:y5(e,t),max:y5(e,n)}}function y5(e,t){return typeof e==`number`?e:e[t]||0}var b5=new WeakMap,x5=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=r6(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t&&this.snapToCursor(Yx(e).point),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=v3(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Qb(e=>{let t=this.getAxisMotionValue(e).get()||0;if(Rv.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=Ab(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&lv.update(()=>i(e,t),!1,!0),I4(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;r&&this.currentDirection===null?(this.currentDirection=T5(o),this.currentDirection!==null&&i&&i(this.currentDirection)):(this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&lv.update(()=>a(e,t),!1,!0))},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new n5(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:Qx(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&lv.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!w5(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=l5(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&Ix(e)?this.constraints||=this.resolveRefConstraints():this.constraints=e&&n?d5(n.layoutBox,e):!1,this.elastic=_5(t),r!==this.constraints&&!Ix(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&Qb(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=h5(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Ix(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;r.root&&(r.root.scroll=void 0,r.root.updateScroll());let i=U6(n,r.root,this.visualElement.getTransformPagePoint()),a=p5(r.layout.layoutBox,i);if(t){let e=t(w6(a));this.hasMutatedConstraints=!!e,e&&(a=C6(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=Qb(o=>{if(!w5(o,t,this.currentDirection))return;let c=s&&s[o]||{};(a===!0||a===o)&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return I4(this.visualElement,e),n.start(S4(e,n,0,t,this.visualElement,!1))}stopAnimation(){Qb(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.visualElement.getProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){Qb(t=>{let{drag:n}=this.getProps();if(!w5(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t],o=i.get()||0;i.set(e[t]-ly(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Ix(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};Qb(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=m5({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),Qb(t=>{if(!w5(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(ly(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;b5.set(this.visualElement,this);let e=this.visualElement.current,t=Zx(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&D3(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();Ix(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=C5(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),lv.read(r);let o=l8(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Qb(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{o(),t(),a(),s&&s(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=g5,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function S5(e){let t=!0;return()=>{t?t=!1:e()}}function C5(e,t,n){let r=Y3(e,S5(n)),i=Y3(t,S5(n));return()=>{r(),i()}}function w5(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function T5(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var E5=class extends S6{constructor(e){super(e),this.removeGroupControls=A0,this.removeListeners=A0,this.controls=new x5(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||A0}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},D5=e=>(t,n)=>{e&&lv.update(()=>e(t,n),!1,!0)},O5=class extends S6{constructor(){super(...arguments),this.removePointerDownListener=A0}onPointerDown(e){this.session=new n5(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Qx(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:D5(e),onStart:D5(t),onMove:D5(n),onEnd:(e,t)=>{delete this.session,r&&lv.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=Zx(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},k5=!1,A5=class extends p.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),k5&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),h8.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a&&(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),k5=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||lv.postRender(()=>{let e=a.getStack();e&&e.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),m3.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;k5=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function j5(e){let[t,n]=$8(),r=(0,p.useContext)(v0);return(0,P.jsx)(A5,{...e,layoutGroup:r,switchLayoutGroup:(0,p.useContext)(Fx),isPresent:t,safeToRemove:n})}var M5={pan:{Feature:O5},drag:{Feature:E5,ProjectionNode:Z8,MeasureLayout:j5}};function N5(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&lv.postRender(()=>i(t,Yx(t)))}var P5=class extends S6{mount(){let{current:e}=this.node;e&&(this.unmount=x3(e,(e,t)=>(N5(this.node,t,`Start`),e=>N5(this.node,e,`End`))))}unmount(){}},F5=class extends S6{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}e&&this.node.animationState&&(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=j0(l8(this.node.current,`focus`,()=>this.onFocus()),l8(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function I5(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&lv.postRender(()=>i(t,Yx(t)))}var L5=class extends S6{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=P3(e,(e,t)=>(I5(this.node,t,`Start`),(e,{success:t})=>I5(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},R5=new WeakMap,z5=new WeakMap,B5=e=>{let t=R5.get(e.target);t&&t(e)},V5=e=>{e.forEach(B5)};function H5({root:e,...t}){let n=e||document;z5.has(n)||z5.set(n,{});let r=z5.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(V5,{root:e,...t})),r[i]}function U5(e,t,n){let r=H5(t);return R5.set(e,n),r.observe(e),()=>{R5.delete(e),r.unobserve(e)}}var W5={some:0,all:1},G5=class extends S6{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:W5[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=U5(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(K5(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function K5({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var q5={inView:{Feature:G5},tap:{Feature:L5},focus:{Feature:F5},hover:{Feature:P5}},J5={layout:{ProjectionNode:Z8,MeasureLayout:j5}},Y5=Wx({...Jx,...q5,...M5,...J5},Gx);function X5(){!p6.current&&h6();let[e]=(0,p.useState)(f6.current);return e}var Z5=Y5;function Q5({className:e,type:t,...n}){return(0,P.jsx)(`input`,{type:t,"data-slot":`input`,className:U(`min-h-10 w-full min-w-0 rounded-[var(--radius-sm)] border border-[rgba(17,24,39,0.12)] bg-[var(--surface)] px-3 py-2 text-base text-[var(--ink)] shadow-[0_1px_1.5px_rgba(17,24,39,0.025)] outline-none transition-[border-color,box-shadow,background-color] duration-150 ease-[var(--ease-standard)] selection:bg-[var(--ink)] selection:text-[var(--paper)] hover:border-[rgba(17,24,39,0.22)] file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-[var(--ink)] placeholder:text-[var(--muted)] disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-[var(--surface-2)] disabled:text-[var(--muted)] disabled:opacity-70 md:text-sm`,`focus-visible:border-[rgba(17,24,39,0.42)] focus-visible:ring-[3px] focus-visible:ring-[rgba(17,24,39,0.08)]`,`aria-invalid:border-[var(--danger)] aria-invalid:ring-[3px] aria-invalid:ring-[color-mix(in_srgb,var(--danger)_18%,transparent)]`,e),...n})}function $5({...e}){return(0,P.jsx)(nm,{"data-slot":`select`,...e})}function e7({...e}){return(0,P.jsx)(Dm,{"data-slot":`select-group`,...e})}function t7({...e}){return(0,P.jsx)(om,{"data-slot":`select-value`,...e})}function n7({className:e,size:t=`default`,children:n,...r}){return(0,P.jsxs)(im,{"data-slot":`select-trigger`,"data-size":t,className:U(`flex min-h-10 w-fit cursor-pointer items-center justify-between gap-2 rounded-[var(--radius-sm)] border border-[rgba(17,24,39,0.12)] bg-[var(--surface)] px-3 py-2 text-sm text-[var(--ink)] whitespace-nowrap shadow-[0_1px_1.5px_rgba(17,24,39,0.025)] outline-none transition-[border-color,box-shadow,background-color] duration-150 ease-[var(--ease-standard)] hover:border-[rgba(17,24,39,0.22)] focus-visible:border-[rgba(17,24,39,0.42)] focus-visible:ring-[3px] focus-visible:ring-[rgba(17,24,39,0.08)] disabled:cursor-not-allowed disabled:bg-[var(--surface-2)] disabled:text-[var(--muted)] disabled:opacity-70 aria-invalid:border-[var(--danger)] aria-invalid:ring-[3px] aria-invalid:ring-[color-mix(in_srgb,var(--danger)_18%,transparent)] data-[placeholder]:text-[var(--muted)] data-[size=default]:min-h-10 data-[size=sm]:min-h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-[var(--muted)]`,e),...r,children:[n,(0,P.jsx)(sm,{asChild:!0,children:(0,P.jsx)(d_,{className:`size-4 opacity-50`})})]})}function r7({className:e,children:t,position:n=`item-aligned`,align:r=`center`,...i}){return(0,P.jsx)(um,{children:(0,P.jsxs)(fm,{"data-slot":`select-content`,className:U(`dropdown-content-motion relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-[10px] border border-[rgba(17,24,39,0.09)] bg-[rgba(255,255,255,0.96)] text-[var(--ink)] shadow-[0_12px_32px_-4px_rgba(17,24,39,0.14),0_2px_6px_rgba(17,24,39,0.06)] backdrop-blur-xl`,n===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,e),position:n,align:r,...i,children:[(0,P.jsx)(a7,{}),(0,P.jsx)(wm,{className:U(`p-1`,n===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1`),children:t}),(0,P.jsx)(o7,{})]})})}function i7({className:e,children:t,...n}){return(0,P.jsxs)(jm,{"data-slot":`select-item`,className:U(`relative flex w-full cursor-default items-center gap-2 rounded-[var(--radius-xs)] py-1.5 pr-8 pl-2 text-sm text-[var(--ink)] outline-hidden select-none focus:bg-[var(--surface-2)] data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-[var(--muted)] *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,e),...n,children:[(0,P.jsx)(`span`,{"data-slot":`select-item-indicator`,className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,P.jsx)(Fm,{children:(0,P.jsx)(u_,{className:`size-4`})})}),(0,P.jsx)(Nm,{children:t})]})}function a7({className:e,...t}){return(0,P.jsx)(Lm,{"data-slot":`select-scroll-up-button`,className:U(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,P.jsx)(m_,{className:`size-4`})})}function o7({className:e,...t}){return(0,P.jsx)(zm,{"data-slot":`select-scroll-down-button`,className:U(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,P.jsx)(d_,{className:`size-4`})})}function s7({className:e,children:t,id:n,name:r,value:i,defaultValue:a,disabled:o,required:s,onBlur:c,onChange:l,autoFocus:u,"aria-label":d,"aria-labelledby":f,"aria-invalid":m,...h}){let g=p.Children.toArray(t).flatMap(e=>!p.isValidElement(e)||e.type!==`option`?[]:[{value:String(e.props.value??``),label:e.props.children,disabled:e.props.disabled}]),_=g.find(e=>e.value===``)?.label,v=g.filter(e=>e.value!==``);return(0,P.jsxs)(nm,{name:r,value:i==null?void 0:String(i),defaultValue:a==null?void 0:String(a),disabled:o,required:s,onValueChange:e=>{l?.({target:{value:e},currentTarget:{value:e}})},children:[(0,P.jsx)(n7,{id:n,className:U(`w-full`,e),"aria-label":d,"aria-labelledby":f,"aria-invalid":m,onBlur:e=>c?.(e),autoFocus:u,...c7(h),children:(0,P.jsx)(t7,{placeholder:_})}),(0,P.jsx)(r7,{position:`popper`,align:`start`,children:(0,P.jsx)(e7,{children:v.map(e=>(0,P.jsx)(i7,{value:e.value,disabled:e.disabled,children:e.label},e.value))})})]})}function c7(e){return{"aria-describedby":e[`aria-describedby`],"aria-errormessage":e[`aria-errormessage`],title:e.title}}function l7({id:e,checked:t,onCheckedChange:n,disabled:r,size:i=`md`,ariaLabel:a,className:o}){let s=i===`sm`;return(0,P.jsx)(`button`,{id:e,type:`button`,role:`switch`,"aria-checked":t,"aria-label":a,disabled:r,onClick:()=>n(!t),className:U(`group relative inline-flex shrink-0 cursor-pointer items-center rounded-full p-[2px] transition-[background-color,box-shadow] duration-[220ms] ease-[cubic-bezier(0.32,0.72,0,1)] focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-[rgba(232,95,53,0.24)] focus-visible:ring-offset-1 disabled:pointer-events-none disabled:opacity-45`,s?`h-[18px] w-[32px]`:`h-[22px] w-[38px]`,t?`bg-[var(--accent)] shadow-[inset_0_0_0_0.5px_rgba(0,0,0,0.08),inset_0_1px_1.5px_rgba(0,0,0,0.08)] hover:bg-[color-mix(in_srgb,var(--accent)_93%,#000)]`:`bg-[rgba(120,120,128,0.22)] shadow-[inset_0_0_0_0.5px_rgba(0,0,0,0.06),inset_0_1px_1.5px_rgba(0,0,0,0.06)] hover:bg-[rgba(120,120,128,0.28)]`,o),children:(0,P.jsx)(`span`,{"aria-hidden":`true`,className:U(`pointer-events-none block rounded-full bg-white shadow-[0_2px_5px_rgba(17,24,39,0.20),0_0.5px_1px_rgba(17,24,39,0.12),inset_0_0.5px_0_rgba(255,255,255,0.95)] transition-[transform,width] duration-[220ms] ease-[cubic-bezier(0.32,0.72,0,1)]`,s?U(`h-[14px] w-[14px] group-active:w-[17px]`,t?`translate-x-[14px] group-active:translate-x-[11px]`:`translate-x-0`):U(`h-[18px] w-[18px] group-active:w-[22px]`,t?`translate-x-[16px] group-active:translate-x-[12px]`:`translate-x-0`))})})}function u7({checked:e,onCheckedChange:t,disabled:n,size:r=`md`,label:i,className:a}){let o=(0,p.useId)();return(0,P.jsxs)(`div`,{className:U(`inline-flex items-center gap-2.5`,a),children:[(0,P.jsx)(l7,{id:o,checked:e,onCheckedChange:t,disabled:n,size:r,ariaLabel:i}),(0,P.jsx)(`label`,{htmlFor:o,className:U(`cursor-pointer select-none text-sm text-[var(--ink)]`,n&&`cursor-not-allowed opacity-50`),children:i})]})}function d7({className:e,...t}){return(0,P.jsx)(`textarea`,{"data-slot":`textarea`,className:U(`flex field-sizing-content min-h-16 w-full rounded-[var(--radius-sm)] border border-[rgba(17,24,39,0.12)] bg-[var(--surface)] px-3 py-2 text-base text-[var(--ink)] shadow-[0_1px_1.5px_rgba(17,24,39,0.025)] outline-none transition-[border-color,box-shadow,background-color] duration-150 ease-[var(--ease-standard)] hover:border-[rgba(17,24,39,0.22)] placeholder:text-[var(--muted)] focus-visible:border-[rgba(17,24,39,0.42)] focus-visible:ring-[3px] focus-visible:ring-[rgba(17,24,39,0.08)] disabled:cursor-not-allowed disabled:bg-[var(--surface-2)] disabled:text-[var(--muted)] disabled:opacity-70 aria-invalid:border-[var(--danger)] aria-invalid:ring-[3px] aria-invalid:ring-[color-mix(in_srgb,var(--danger)_18%,transparent)] md:text-sm`,e),...t})}function f7({...e}){return(0,P.jsx)(R,{"data-slot":`dialog`,...e})}function p7({...e}){return(0,P.jsx)(tu,{"data-slot":`dialog-portal`,...e})}function m7({...e}){return(0,P.jsx)(mu,{"data-slot":`dialog-close`,...e})}function h7({className:e,...t}){return(0,P.jsx)(ru,{"data-slot":`dialog-overlay`,className:U(`dialog-overlay-motion fixed inset-0 z-50 bg-[rgba(15,23,42,0.34)] backdrop-blur-[3px]`,e),...t})}function g7({className:e,children:t,showCloseButton:n=!0,...r}){return(0,P.jsxs)(p7,{"data-slot":`dialog-portal`,children:[(0,P.jsx)(h7,{}),(0,P.jsx)(`div`,{className:`dialog-positioner`,children:(0,P.jsxs)(su,{"data-slot":`dialog-content`,className:U(`dialog-content-motion pointer-events-auto relative z-50 grid w-full max-w-[calc(100vw-2rem)] gap-4 rounded-lg border bg-background p-6 shadow-lg outline-none sm:max-w-lg`,e),...r,children:[t,n&&(0,P.jsxs)(mu,{"data-slot":`dialog-close`,className:`absolute right-4 top-3.5 grid size-7 cursor-pointer place-items-center rounded-full bg-[rgba(17,24,39,0.055)] text-[var(--muted-strong)] transition-[background-color,color,transform] duration-[var(--duration-fast)] hover:bg-[rgba(17,24,39,0.10)] hover:text-[var(--ink)] active:scale-90 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--focus)] disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:size-3.5`,children:[(0,P.jsx)(A_,{}),(0,P.jsx)(`span`,{className:`sr-only`,children:`关闭`})]})]})})]})}function _7({className:e,...t}){return(0,P.jsx)(`div`,{"data-slot":`dialog-header`,className:U(`flex flex-col gap-2 text-center sm:text-left`,e),...t})}function v7({className:e,...t}){return(0,P.jsx)(du,{"data-slot":`dialog-title`,className:U(`text-lg leading-none font-semibold`,e),...t})}function y7({className:e,...t}){return(0,P.jsx)(fu,{"data-slot":`dialog-description`,className:U(`text-sm text-muted-foreground`,e),...t})}var b7=(0,p.createContext)(null);function x7(){return(0,p.useContext)(b7)}function S7({children:e,ariaLabel:t,outletClassName:n}){let[r,i]=(0,p.useState)(null),[a,o]=(0,p.useState)([]),s=(0,p.useCallback)(e=>{o(t=>t.includes(e)?t:[...t,e])},[]),c=(0,p.useCallback)(e=>{o(t=>t.filter(t=>t!==e))},[]),l=(0,p.useMemo)(()=>({host:r,layers:a,register:s,unregister:c}),[r,a,s,c]),u=a.length>0;return(0,P.jsx)(b7.Provider,{value:l,children:(0,P.jsxs)(`div`,{className:`sheet-host-stage`,children:[(0,P.jsx)(`section`,{"aria-label":t,className:U(`sheet-surface-outlet min-h-0 flex-1 overflow-y-auto overscroll-contain`,u&&`sheet-surface-receded`,n),"aria-hidden":u||void 0,children:e}),(0,P.jsx)(`div`,{ref:i,className:`sheet-host-portal`})]})})}var C7=240,w7={sm:`rise-sheet-sm`,md:`rise-sheet-md`,lg:`rise-sheet-lg`};function T7(e,t){let[n,r]=(0,p.useState)(e);return(0,p.useEffect)(()=>{if(e){r(!0);return}let n=globalThis.setTimeout(()=>r(!1),t);return()=>globalThis.clearTimeout(n)},[e,t]),{mounted:e||n,closing:!e&&n}}function E7({open:e,onClose:t,title:n,description:r,size:i=`md`,escapeDisabled:a=!1,contentClassName:o,footerRef:s,children:c}){let{mounted:l,closing:u}=T7(e,C7),d=(0,p.useRef)(null),f=x7(),m=(0,p.useId)(),h=f?.layers.includes(m)??!1,g=(0,p.useRef)(0);f&&h&&(g.current=f.layers.indexOf(m));let _=g.current,v=!f||!h||f.layers[f.layers.length-1]===m,y=h&&!v,b=y&&f?f.layers.length-1-_:0,x=f?.register,S=f?.unregister;(0,p.useEffect)(()=>{if(e&&x&&S)return x(m),()=>S(m)},[e,x,S,m]);let C=(0,p.useRef)(t);if(C.current=t,(0,p.useEffect)(()=>{e&&v&&d.current?.focus({preventScroll:!0})},[e,v]),(0,p.useEffect)(()=>{if(!e||!v)return;let t=e=>{e.key===`Escape`&&!a&&(e.preventDefault(),C.current())};return globalThis.addEventListener(`keydown`,t),()=>globalThis.removeEventListener(`keydown`,t)},[e,v,a]),!l||f&&!f.host)return null;let w=(0,P.jsxs)(`div`,{"data-slot":`rise-sheet-layer`,className:U(`rise-sheet-layer`,!f&&`rise-sheet-layer-fixed`,u&&`rise-sheet-closing`),style:{"--layer-index":_,"--sheet-exit":`${C7}ms`},"aria-hidden":y||void 0,...y?{inert:``}:{},children:[(0,P.jsx)(`div`,{className:`rise-sheet-dismiss`,onClick:v?t:void 0,"aria-hidden":!0}),(0,P.jsxs)(`section`,{ref:d,"data-slot":`rise-sheet`,className:U(`rise-sheet-panel`,w7[i],y&&`rise-sheet-behind`),style:{"--sheet-depth":b},role:`dialog`,"aria-modal":`true`,"aria-label":n,tabIndex:-1,children:[(0,P.jsx)(`div`,{className:`flex flex-none justify-center pt-2 pb-0.5`,children:(0,P.jsx)(`button`,{type:`button`,tabIndex:-1,"aria-label":`收起面板`,title:`点击收起 (Esc)`,onClick:t,className:`rise-sheet-grip-hit group grid h-3 w-16 cursor-pointer place-items-center rounded-full focus:outline-none`,children:(0,P.jsx)(`span`,{className:`rise-sheet-grip`,"aria-hidden":!0})})}),(0,P.jsxs)(`header`,{className:`flex flex-none items-start justify-between gap-4 border-b border-[rgba(17,24,39,0.07)] bg-[rgba(255,255,255,0.88)] px-6 pt-2.5 pb-3.5 backdrop-blur-md`,children:[(0,P.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-0.5`,children:[(0,P.jsx)(`h2`,{className:`break-words text-[15px] font-semibold leading-6 tracking-[var(--tracking-heading)] text-[var(--ink)]`,children:n}),r?(0,P.jsx)(`p`,{className:`break-words text-xs leading-5 text-[var(--muted-strong)]`,children:r}):null]}),(0,P.jsx)(`button`,{type:`button`,"aria-label":`关闭面板`,title:`关闭 (Esc)`,onClick:t,className:`mt-0.5 grid size-7 shrink-0 cursor-pointer place-items-center rounded-full bg-[rgba(17,24,39,0.055)] text-[var(--muted-strong)] transition-[background-color,color,transform] duration-[var(--duration-fast)] ease-[var(--ease-out)] hover:bg-[rgba(17,24,39,0.10)] hover:text-[var(--ink)] active:scale-90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--focus)]`,children:(0,P.jsx)(A_,{className:`size-3.5 stroke-[2.25]`})})]}),(0,P.jsx)(`div`,{"data-slot":`app-dialog-content`,className:U(`scrollbar-stable min-h-0 flex-1 overflow-y-auto overscroll-contain bg-[var(--surface)] px-6 py-5`,o),children:c}),(0,P.jsx)(`div`,{"data-slot":`app-dialog-footer-root`,ref:s})]})]});return f?.host?(0,xo.createPortal)(w,f.host):typeof document<`u`?(0,xo.createPortal)(w,document.body):w}var D7=(0,p.createContext)(null);function O7({open:e,onOpenChange:t,title:n,description:r,size:i=`default`,variant:a=`sheet`,children:o,contentClassName:s}){let[c,l]=(0,p.useState)(null);return a===`sheet`?(0,P.jsx)(E7,{open:e,onClose:()=>t(!1),title:n,description:r,size:i===`wide`?`lg`:i===`medium`?`md`:`sm`,contentClassName:s,footerRef:l,children:(0,P.jsx)(D7.Provider,{value:c,children:o})}):(0,P.jsx)(f7,{open:e,onOpenChange:t,children:(0,P.jsx)(g7,{className:U(`grid max-h-[min(800px,calc(100dvh-24px))] grid-rows-[auto_minmax(0,1fr)_auto] gap-0 overflow-hidden rounded-[var(--radius)] border-[var(--border)] bg-[var(--surface)] p-0 shadow-[0_12px_32px_rgba(17,24,39,0.14)]`,i===`wide`?`sm:max-w-[min(1080px,calc(100vw-32px))]`:i===`medium`?`sm:max-w-[min(800px,calc(100vw-32px))]`:`sm:max-w-xl`),children:(0,P.jsxs)(D7.Provider,{value:c,children:[(0,P.jsxs)(_7,{className:`grid min-w-0 gap-1 border-b border-[var(--border)] bg-[var(--surface)] px-5 py-3.5 pr-14 text-left`,children:[(0,P.jsx)(v7,{className:`min-w-0 break-words text-base font-semibold leading-6 tracking-[var(--tracking-heading)] text-[var(--ink)]`,children:n}),r?(0,P.jsx)(y7,{className:`min-w-0 break-words text-xs leading-5 text-[var(--muted-strong)]`,children:r}):null]}),(0,P.jsx)(`div`,{"data-slot":`app-dialog-content`,className:U(`scrollbar-stable min-h-0 overflow-y-auto overscroll-contain bg-[var(--surface)] p-5`,s),children:o}),(0,P.jsx)(`div`,{"data-slot":`app-dialog-footer-root`,ref:l})]})})})}function k7({className:e,...t}){let n=(0,p.useContext)(D7);return n?(0,xo.createPortal)((0,P.jsx)(`div`,{"data-slot":`app-dialog-footer`,className:U(`border-t border-[rgba(17,24,39,0.07)] bg-[rgba(250,250,251,0.92)] px-6 py-3 backdrop-blur-md [&_button]:min-h-8 [&_button]:px-3.5 [&_button]:text-xs`,e),...t}),n):null}var A7=()=>[`becomeopc`,`status`],j7=()=>u0(c0.api.becomeopc.status.$get()),M7=()=>u0(c0.api.becomeopc.sync.$post()),N7=()=>u0(c0.api.becomeopc.connection.$delete()),P7=()=>u0(c0.api.becomeopc.oauth.start.$post()),F7=e=>u0(c0.api.becomeopc.oauth.status.$get({query:{state:e}}));function I7(){return Ra({queryKey:A7(),queryFn:j7,staleTime:3e4,retry:!1})}function L7(e){if(!e)return`TrendPublish 托管订阅`;let t=e.toLowerCase();return t.includes(`bundle`)?t.includes(`year`)||t.includes(`annual`)?`全家桶年付`:t.includes(`month`)?`全家桶月付`:`全家桶订阅`:t.includes(`year`)||t.includes(`annual`)?`年付订阅`:t.includes(`month`)?`月付订阅`:t.includes(`trial`)?`试用版`:t.includes(`pro`)?`Pro 订阅`:e}function R7(e,t=Date.now()){if(!e)return!1;if(e.status===`trialing`)return!0;if(!e.trialEnd)return!1;let n=Date.parse(e.trialEnd);return Number.isFinite(n)&&n>t}function z7(e,t=Date.now()){if(!e||!e.connected)return{label:`未连接`,tone:`neutral`};if(e.expired)return{label:`已过期`,tone:`danger`};if(R7(e,t))return{label:`试用中`,tone:`info`};switch(e.status){case`active`:return{label:`已订阅`,tone:`success`};case`canceling`:return{label:`到期后取消`,tone:`warning`};case`past_due`:return{label:`待续费`,tone:`warning`};default:return e.entitled?{label:`已连接`,tone:`success`}:{label:`未生效`,tone:`warning`}}}function B7(e){if(!e)return`—`;let t=Date.parse(e);return Number.isFinite(t)?new Intl.DateTimeFormat(`zh-CN`,{year:`numeric`,month:`2-digit`,day:`2-digit`}).format(new Date(t)):e}var V7=N_(`inline-flex min-h-5 max-w-full items-center gap-1 rounded-[6px] border px-1.5 text-[11px] font-medium`,{variants:{tone:{neutral:`border-[var(--border)] bg-[var(--surface-2)] text-[var(--muted-strong)]`,success:`border-[var(--success-border)] bg-[var(--success-bg)] text-[var(--success)]`,warning:`border-[var(--warning-border)] bg-[var(--warning-bg)] text-[var(--warning)]`,danger:`border-[var(--danger-border)] bg-[var(--danger-bg)] text-[var(--danger)]`,info:`border-[var(--info-border)] bg-[var(--info-bg)] text-[var(--info)]`,accent:`border-[var(--accent-border)] bg-[var(--accent-bg)] text-[var(--accent)]`}},defaultVariants:{tone:`neutral`}});function H7({tone:e,className:t,children:n,title:r}){return(0,P.jsx)(`span`,{title:r,className:U(V7({tone:e}),t),children:n})}var U7={success(e,t){m1.success(e,{description:t})},error(e,t){m1.error(e,{description:e_(t)})},info(e,t){m1.info(e,{description:t})}},W7=1200;function G7(){let e=Ca(),{data:t,isLoading:n}=I7(),[r,i]=(0,p.useState)(null),[a,o]=(0,p.useState)(null),[s,c]=(0,p.useState)(!1),l=(0,p.useRef)(null),u=()=>{l.current&&=(clearInterval(l.current),null),i(null)};(0,p.useEffect)(()=>u,[]),(0,p.useEffect)(()=>{if(!r)return;let t=async()=>{try{let t=await F7(r);if(t.status===`pending`)return;if(u(),t.status===`completed`){o(null),await e.invalidateQueries({queryKey:A7()}),await e.invalidateQueries({queryKey:[`connections`]}),U7.success(t.synced?`已连接 BecomeOPC,并同步 ${t.synced} 个微信 Relay 连接`:`已连接 BecomeOPC 订阅`);return}if(t.status===`not_entitled`){o(t.error??`当前 BecomeOPC 账户尚未订阅 TrendPublish,请先前往订阅或开始试用。`),U7.info(`已登录 BecomeOPC,当前账户尚未订阅 TrendPublish`);return}U7.error(`连接 BecomeOPC 失败`,t.error??`登录会话已结束`)}catch(e){u(),U7.error(`检查 BecomeOPC 登录状态失败`,e)}};return l.current=setInterval(()=>void t(),W7),()=>{l.current&&=(clearInterval(l.current),null)}},[r,e]);let d=za({mutationFn:P7,onSuccess:({state:e,authorizeUrl:t})=>{o(null),i(e),window.open(t,`_blank`,`noopener,noreferrer`)?U7.info(`已打开 BecomeOPC 授权页面,完成登录后将自动同步`):U7.info(`浏览器拦截了弹窗,请允许新窗口或手动打开授权页`)},onError:e=>U7.error(`发起 BecomeOPC 连接失败`,e)}),f=za({mutationFn:M7,onSuccess:async t=>{o(null),await e.invalidateQueries({queryKey:A7()}),U7.success(t.synced?`订阅状态已刷新,并同步 ${t.synced} 个微信 Relay 连接`:`BecomeOPC 订阅状态已刷新`)},onError:e=>U7.error(`刷新 BecomeOPC 订阅失败`,e)}),m=za({mutationFn:N7,onSuccess:async()=>{c(!1),o(null),await e.invalidateQueries({queryKey:A7()}),U7.success(`已断开本地 BecomeOPC 订阅凭证`)},onError:e=>U7.error(`断开 BecomeOPC 连接失败`,e)}),h=z7(t),g=t?.urls.subscribe??`https://becomeopc.com/trendpublish/zh#pricing`,_=t?.urls.manage??`https://becomeopc.com/account?product=trendpublish&lang=zh`,v=!!r,y=R7(t),b=(y?t?.trialEnd:null)??t?.periodEnd??t?.expiresAt??null;return(0,P.jsxs)(`section`,{"aria-label":`BecomeOPC 订阅与托管 Relay`,className:`grid gap-3.5 rounded-[var(--radius-md)] border border-[var(--border)] bg-[var(--surface)] p-4 sm:p-5`,children:[(0,P.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,P.jsxs)(`div`,{className:`flex min-w-0 items-start gap-3`,children:[(0,P.jsx)(`div`,{className:`flex size-9 shrink-0 items-center justify-center rounded-[var(--radius-sm)] border border-[var(--accent-border)] bg-[var(--accent-bg)] text-[var(--accent)]`,children:(0,P.jsx)(D_,{className:`size-4`,"aria-hidden":!0})}),(0,P.jsxs)(`div`,{className:`min-w-0`,children:[(0,P.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,P.jsx)(`h2`,{className:`text-sm font-semibold text-[var(--ink)]`,children:`BecomeOPC 订阅 · 托管微信 Relay`}),(0,P.jsx)(H7,{tone:h.tone,children:n?`检查中…`:h.label})]}),(0,P.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-[var(--muted-strong)]`,children:`无需自备国内固定 IP 服务器,订阅后自动同步微信公众号托管 Relay 凭证并每 6 小时自动续期。`})]})]}),(0,P.jsx)(`div`,{className:`flex flex-wrap items-center gap-2`,children:t?.connected?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`a`,{href:t.expired?g:_,target:`_blank`,rel:`noopener noreferrer`,className:U(P_({variant:t.expired?`primary`:`secondary`,size:`sm`})),children:[t.expired?`前往 BecomeOPC 续费`:`管理订阅`,(0,P.jsx)(v_,{className:`size-3.5`,"aria-hidden":!0})]}),(0,P.jsxs)(F_,{type:`button`,size:`sm`,variant:`secondary`,loading:f.isPending,onClick:()=>f.mutate(),children:[!f.isPending&&(0,P.jsx)(T_,{className:`size-3.5`,"aria-hidden":!0}),`刷新同步`]}),t.expired&&t.canBrowserLogin?(0,P.jsxs)(F_,{type:`button`,size:`sm`,variant:`secondary`,loading:d.isPending||v,onClick:()=>d.mutate(),children:[!d.isPending&&!v&&(0,P.jsx)(x_,{className:`size-3.5`,"aria-hidden":!0}),v?`等待授权…`:`重新连接`]}):null,s?(0,P.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,P.jsx)(F_,{type:`button`,size:`sm`,variant:`danger`,loading:m.isPending,onClick:()=>m.mutate(),children:`确认断开`}),(0,P.jsx)(F_,{type:`button`,size:`sm`,variant:`ghost`,disabled:m.isPending,onClick:()=>c(!1),children:`取消`})]}):(0,P.jsxs)(F_,{type:`button`,size:`sm`,variant:`ghost`,onClick:()=>c(!0),children:[(0,P.jsx)(k_,{className:`size-3.5`,"aria-hidden":!0}),`断开`]})]}):(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`a`,{href:g,target:`_blank`,rel:`noopener noreferrer`,className:U(P_({variant:`primary`,size:`sm`})),children:[`前往 BecomeOPC 订阅`,(0,P.jsx)(v_,{className:`size-3.5`,"aria-hidden":!0})]}),t?.canBrowserLogin?v?(0,P.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,P.jsx)(F_,{type:`button`,size:`sm`,variant:`secondary`,loading:!0,children:`等待浏览器授权…`}),(0,P.jsx)(F_,{type:`button`,size:`sm`,variant:`ghost`,onClick:u,children:`取消`})]}):(0,P.jsxs)(F_,{type:`button`,size:`sm`,variant:`secondary`,loading:d.isPending,onClick:()=>d.mutate(),children:[!d.isPending&&(0,P.jsx)(x_,{className:`size-3.5`,"aria-hidden":!0}),`连接 BecomeOPC 账号`]}):(0,P.jsx)(`span`,{className:`rounded-[var(--radius-sm)] border border-[var(--border)] bg-[var(--surface-2)] px-2.5 py-1.5 font-mono text-[11px] text-[var(--muted-strong)]`,children:`CLI 执行 trendpublish login 绑定`})]})})]}),t?.connected?(0,P.jsxs)(`div`,{className:`grid gap-2.5 sm:grid-cols-3`,children:[(0,P.jsxs)(`div`,{className:`rounded-[var(--radius-sm)] border border-[var(--border)] bg-[var(--surface-2)] px-3 py-2`,children:[(0,P.jsx)(`div`,{className:`text-[11px] text-[var(--muted)]`,children:`当前套餐`}),(0,P.jsx)(`div`,{className:`mt-0.5 text-sm font-medium text-[var(--ink)]`,children:L7(t.plan)})]}),(0,P.jsxs)(`div`,{className:`rounded-[var(--radius-sm)] border border-[var(--border)] bg-[var(--surface-2)] px-3 py-2`,children:[(0,P.jsx)(`div`,{className:`text-[11px] text-[var(--muted)]`,children:y?`试用到期`:t.periodEnd?`当前周期截止`:`本地凭证有效至`}),(0,P.jsx)(`div`,{className:`mt-0.5 text-sm font-medium tabular-nums text-[var(--ink)]`,children:B7(b)})]}),(0,P.jsxs)(`div`,{className:`rounded-[var(--radius-sm)] border border-[var(--border)] bg-[var(--surface-2)] px-3 py-2`,children:[(0,P.jsx)(`div`,{className:`text-[11px] text-[var(--muted)]`,children:`托管 Relay 地址`}),(0,P.jsxs)(`div`,{className:`mt-0.5 flex items-center justify-between gap-2 text-xs font-medium text-[var(--ink)]`,children:[(0,P.jsx)(`span`,{className:`truncate font-mono`,children:t.managedRelayUrl}),(0,P.jsxs)(`span`,{className:`shrink-0 text-[11px] tabular-nums text-[var(--muted)]`,children:[`已同步 `,t.syncedRelayCount,` 个`]})]})]})]}):null,a?(0,P.jsxs)(`div`,{role:`status`,className:`flex flex-wrap items-center justify-between gap-3 rounded-[var(--radius-sm)] border border-[var(--warning-border)] bg-[var(--warning-bg)] px-3.5 py-2.5`,children:[(0,P.jsxs)(`div`,{className:`flex min-w-0 items-start gap-2.5 text-xs leading-5 text-[var(--ink)]`,children:[(0,P.jsx)(O_,{className:`mt-0.5 size-4 shrink-0 text-[var(--warning)]`,"aria-hidden":!0}),(0,P.jsx)(`span`,{children:a})]}),(0,P.jsxs)(`a`,{href:g,target:`_blank`,rel:`noopener noreferrer`,className:U(P_({variant:`secondary`,size:`sm`})),children:[`去购买 / 开始试用`,(0,P.jsx)(v_,{className:`size-3.5`,"aria-hidden":!0})]})]}):null]})}function K7({className:e,...t}){return(0,P.jsx)(`div`,{"data-slot":`field`,className:U(`grid gap-2 text-sm`,e),...t})}function q7({className:e,...t}){return(0,P.jsx)(`label`,{"data-slot":`field-label`,className:U(`text-xs font-semibold uppercase text-[var(--muted)]`,e),...t})}function J7({className:e,...t}){return(0,P.jsx)(`p`,{"data-slot":`field-description`,className:U(`text-xs leading-5 text-[var(--muted-strong)]`,e),...t})}function Y7({className:e,...t}){return(0,P.jsx)(`p`,{"data-slot":`field-error`,className:U(`text-xs leading-5 text-[var(--danger)]`,e),...t})}function X7({label:e,children:t,htmlFor:n,required:r,helper:i,error:a,className:o}){return(0,P.jsxs)(K7,{className:U(`gap-1.5`,o),children:[(0,P.jsxs)(q7,{htmlFor:n,className:`flex items-center gap-1`,children:[e,r?(0,P.jsx)(`span`,{"aria-hidden":`true`,className:`text-[var(--danger)]`,children:`*`}):null]}),t,i||a?(0,P.jsx)(`div`,{className:`min-h-5`,"aria-live":`polite`,children:a?(0,P.jsx)(Y7,{children:a}):i?(0,P.jsx)(J7,{children:i}):null}):null]})}function Z7({className:e,...t}){return(0,P.jsx)(`div`,{"data-slot":`empty`,className:U(`flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded-lg border-dashed p-6 text-center text-balance md:p-12`,e),...t})}function Q7({className:e,...t}){return(0,P.jsx)(`div`,{"data-slot":`empty-header`,className:U(`flex max-w-sm flex-col items-center gap-2 text-center`,e),...t})}function $7({className:e,...t}){return(0,P.jsx)(`div`,{"data-slot":`empty-title`,className:U(`text-lg font-medium tracking-tight`,e),...t})}function e9({className:e,...t}){return(0,P.jsx)(`div`,{"data-slot":`empty-description`,className:U(`text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary`,e),...t})}function t9({className:e,...t}){return(0,P.jsx)(`div`,{"data-slot":`empty-content`,className:U(`flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance`,e),...t})}function n9({title:e=`暂无数据`,description:t,action:n,className:r}){return(0,P.jsxs)(Z7,{className:U(`min-h-36 bg-[var(--surface)] px-5 py-8`,r),children:[(0,P.jsxs)(Q7,{children:[(0,P.jsx)($7,{className:`text-sm font-semibold text-[var(--ink)]`,children:e}),t?(0,P.jsx)(e9,{className:`max-w-md text-sm leading-6 text-[var(--muted-strong)]`,children:t}):null]}),n?(0,P.jsx)(t9,{children:n}):null]})}function r9({title:e,description:t,action:n,toolbar:r,compact:i,summary:a,children:o,className:s}){return(0,P.jsxs)(`section`,{"aria-label":e,className:U(`min-w-0 overflow-hidden rounded-[var(--radius)] border border-[var(--border)] bg-[var(--surface)]`,s),children:[(0,P.jsxs)(`div`,{className:`grid gap-3 border-b border-[var(--border)] px-4 py-3.5 lg:grid-cols-[minmax(0,1fr)_auto] lg:items-center sm:px-5`,children:[i?(0,P.jsxs)(`div`,{className:`min-w-0`,children:[(0,P.jsx)(`h2`,{className:`sr-only`,children:e}),(0,P.jsx)(`p`,{className:`sr-only`,children:t}),(0,P.jsx)(`p`,{className:`text-xs font-medium text-[var(--muted-strong)]`,children:a??e})]}):(0,P.jsxs)(`div`,{className:`min-w-0`,children:[(0,P.jsx)(`h2`,{className:`text-sm font-semibold text-[var(--ink)]`,children:e}),(0,P.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-[var(--muted-strong)]`,children:t})]}),(r||n)&&(0,P.jsxs)(`div`,{className:`flex min-w-0 flex-wrap gap-2 lg:justify-end`,children:[r,n]})]}),(0,P.jsx)(`div`,{className:`divide-y divide-[var(--border)]`,children:o})]})}function i9(e){return(0,P.jsx)(Cp,{"data-slot":`popover`,...e})}function a9(e){return(0,P.jsx)(Tp,{"data-slot":`popover-trigger`,...e})}function o9({className:e,align:t=`center`,sideOffset:n=6,...r}){return(0,P.jsx)(kp,{children:(0,P.jsx)(jp,{"data-slot":`popover-content`,align:t,sideOffset:n,className:U(`dropdown-content-motion z-50 w-72 origin-[var(--radix-popover-content-transform-origin)] rounded-[12px] border border-[rgba(17,24,39,0.09)] bg-[rgba(255,255,255,0.96)] p-3 text-[var(--ink)] shadow-[0_14px_36px_-6px_rgba(17,24,39,0.16),0_2px_6px_rgba(17,24,39,0.06)] backdrop-blur-xl outline-none`,e),...r})})}function s9({name:e,description:t,onConfirm:n}){let[r,i]=(0,p.useState)(!1),[a,o]=(0,p.useState)(!1),s=e=>{a||i(e)},c=async()=>{if(!a){o(!0);try{await n(),i(!1),U7.success(`删除成功`,`“${e}”已删除。`)}catch(e){U7.error(`删除失败`,e)}finally{o(!1)}}};return(0,P.jsxs)(i9,{open:r,onOpenChange:s,children:[(0,P.jsx)(a9,{asChild:!0,children:(0,P.jsx)(F_,{variant:`ghost`,children:`删除`})}),(0,P.jsx)(o9,{align:`end`,side:`top`,collisionPadding:12,children:(0,P.jsxs)(`div`,{className:`grid gap-3`,children:[(0,P.jsxs)(`div`,{className:`grid min-w-0 gap-1`,children:[(0,P.jsxs)(`p`,{className:`break-words text-sm font-semibold`,children:[`删除“`,e,`”?`]}),(0,P.jsx)(`p`,{className:`break-words text-xs leading-5 text-[var(--muted-strong)]`,children:t??`删除后无法恢复。`})]}),(0,P.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,P.jsx)(F_,{size:`sm`,disabled:a,onClick:()=>s(!1),children:`取消`}),(0,P.jsx)(F_,{size:`sm`,variant:`destructive`,loading:a,onClick:()=>void c(),children:`确认删除`})]})]})})]})}function c9({title:e,description:t,action:n,compact:r,summary:i,empty:a,emptyTitle:o,emptyDescription:s,emptyAction:c,pagination:l,children:u}){return(0,P.jsxs)(r9,{title:e,description:t,action:n,compact:r,summary:i,children:[a?(0,P.jsx)(n9,{title:o??`暂无内容`,description:s??`创建第一个对象后会显示在这里。`,action:c}):u,l]})}function l9({title:e,description:t,status:n,meta:r,onOpen:i,onEdit:a,onDelete:o,deleteDescription:s,children:c}){return(0,P.jsxs)(`div`,{className:`grid min-w-0 gap-3 px-4 py-3.5 lg:grid-cols-[minmax(0,1fr)_auto] lg:items-center sm:px-5`,children:[i?(0,P.jsx)(`button`,{type:`button`,className:`min-w-0 rounded-[var(--radius-xs)] text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--focus)]`,onClick:i,children:(0,P.jsx)(u9,{title:e,description:t,status:n,meta:r})}):(0,P.jsx)(`div`,{className:`min-w-0`,children:(0,P.jsx)(u9,{title:e,description:t,status:n,meta:r})}),(0,P.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5 lg:justify-end [&_button]:min-h-8 [&_button]:px-2.5 [&_button]:text-xs`,children:[c,a?(0,P.jsx)(F_,{variant:`ghost`,onClick:a,children:`编辑`}):null,o?(0,P.jsx)(s9,{name:e,description:s,onConfirm:o}):null]})]})}function u9({title:e,description:t,status:n,meta:r}){return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,P.jsx)(`h3`,{className:`truncate text-sm font-semibold text-[var(--ink)]`,children:e}),n&&n!==`ready`?(0,P.jsx)(H7,{tone:n===`warning`?`warning`:`neutral`,children:n===`warning`?`需处理`:`已停用`}):null,r]}),(0,P.jsx)(`p`,{className:`mt-1 max-w-[90ch] text-xs leading-5 text-[var(--muted-strong)]`,children:t})]})}function d9({children:e}){return(0,P.jsx)(`div`,{className:`grid gap-4`,children:e})}function f9({page:e,pageSize:t,total:n,onChange:r,className:i,compact:a=!1}){let o=Math.max(1,Math.ceil(n/t)),s=Math.min(Math.max(1,e),o);if((0,p.useEffect)(()=>{e!==s&&r(s)},[s,r,e]),o<=1)return null;let c=m9(s,o);return(0,P.jsxs)(`nav`,{"aria-label":`分页导航`,className:U(`flex items-center justify-between gap-4 px-4 py-3 sm:px-5`,a&&`gap-2 px-3 sm:px-3`,i),children:[(0,P.jsx)(`p`,{className:`text-xs text-[var(--muted-strong)]`,children:a?`共 ${n} 条`:`第 ${(s-1)*t+1}–${Math.min(s*t,n)} 条,共 ${n} 条`}),(0,P.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,P.jsx)(p9,{label:`上一页`,icon:(0,P.jsx)(f_,{className:`size-4`}),disabled:s<=1,onClick:()=>r(s-1)}),!a&&c.map((e,t)=>e===`ellipsis`?(0,P.jsx)(`span`,{className:`flex size-8 items-center justify-center text-xs text-[var(--muted)]`,children:`…`},`ellipsis-${t}`):(0,P.jsx)(p9,{label:String(e),active:e===s,onClick:()=>r(e)},e)),(0,P.jsx)(p9,{label:`下一页`,icon:(0,P.jsx)(p_,{className:`size-4`}),disabled:s>=o,onClick:()=>r(s+1)})]})]})}function p9({label:e,icon:t,active:n,disabled:r,onClick:i}){return(0,P.jsx)(`button`,{type:`button`,"aria-label":e,"aria-current":n?`page`:void 0,disabled:r,onClick:i,className:U(`flex size-8 items-center justify-center rounded-[var(--radius-xs)] text-xs transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--focus)]`,n?`bg-[var(--ink)] font-semibold text-[var(--surface)]`:r?`cursor-not-allowed text-[var(--muted)] opacity-40`:`text-[var(--muted-strong)] hover:bg-[var(--surface-3)] hover:text-[var(--ink)]`),children:t??e})}function m9(e,t){if(t<=7)return Array.from({length:t},(e,t)=>t+1);let n=[];n.push(1),e>4&&n.push(`ellipsis`);for(let r=Math.max(2,e-1);r<=Math.min(t-1,e+1);r++)n.push(r);return e<t-3&&n.push(`ellipsis`),n.push(t),n}function h9(e,t){let n=e.trim(),r=new Set(t.map(e=>e.trim().toLocaleLowerCase()));if(!r.has(n.toLocaleLowerCase()))return n;let i=2;for(;r.has(`${n} ${i}`.toLocaleLowerCase());)i+=1;return`${n} ${i}`}var g9=`trendpublish-dashboard`,_9=`trendpublish-extension`,v9=`https://lite.ego.app/`,y9=`https://becomeopc.com/trendpublish/downloads/extension.zip`,b9=`https://becomeopc.com/trendpublish/zh/docs/browser-extension`;function x9(e,t){return`${e.trim().replace(/\/+$/,``)}|${t.trim()}`}function S9(e=700){return typeof window>`u`?Promise.resolve(null):new Promise(t=>{let n=`ping_${Date.now()}_${Math.random().toString(36).slice(2,8)}`,r=!1,i=e=>{r||(r=!0,window.removeEventListener(`message`,a),window.clearTimeout(o),t(e))},a=e=>{if(e.source!==window||e.origin!==window.location.origin)return;let t=e.data;t&&t.source===_9&&t.type===`TP_PONG`&&(t.requestId&&t.requestId!==n||i({detected:!0,version:typeof t.version==`string`?t.version:`1.1.0`,paired:!!t.paired,connected:!!t.connected,nodeName:typeof t.nodeName==`string`?t.nodeName:void 0,serverUrl:typeof t.serverUrl==`string`?t.serverUrl:void 0}))},o=window.setTimeout(()=>i(null),e);window.addEventListener(`message`,a),window.postMessage({source:g9,type:`TP_PING`,requestId:n},window.location.origin)})}function C9(e,t,n=8e3){return typeof window>`u`?Promise.resolve({ok:!1,error:`当前环境不支持浏览器扩展桥接`}):new Promise(r=>{let i=`pair_${Date.now()}_${Math.random().toString(36).slice(2,8)}`,a=!1,o=e=>{a||(a=!0,window.removeEventListener(`message`,s),window.clearTimeout(c),r(e))},s=e=>{if(e.source!==window||e.origin!==window.location.origin)return;let t=e.data;t&&t.source===_9&&t.type===`TP_PAIR_RESULT`&&(t.requestId&&t.requestId!==i||o({ok:!!t.ok,nodeName:typeof t.nodeName==`string`?t.nodeName:void 0,message:typeof t.message==`string`?t.message:void 0,error:typeof t.error==`string`?t.error:void 0}))},c=window.setTimeout(()=>o({ok:!1,error:`未检测到扩展响应(若未安装扩展或使用自定义域名,请先下载安装扩展或复制下方 60 秒配对码粘贴到扩展「设置」页)。`}),n);window.addEventListener(`message`,s),window.postMessage({source:g9,type:`TP_PAIR_TICKET`,requestId:i,serverUrl:e,ticket:t},window.location.origin)})}var w9=[{id:`deepseek`,label:`DeepSeek V3`,badge:`推荐 · 性价比最高`,summary:`国内直连、写中文深度稿极稳、原生 Tool Calling 完整。`,connectorId:`openai-compatible`,connectionName:`DeepSeek V3`,endpointUrl:`https://api.deepseek.com/v1`,defaultModel:`deepseek-chat`,keyPlaceholder:`sk-...`,keyHelpUrl:`https://platform.deepseek.com/api_keys`,keyHelpLabel:`去 DeepSeek 控制台获取 Key`},{id:`gemini`,label:`Google Gemini 2.5 Flash`,badge:`免费额度 · 工具调用极稳`,summary:`Google AI Studio 提供慷慨免费额度,长上下文与查证速度快。`,connectorId:`gemini`,connectionName:`Google Gemini 2.5 Flash`,endpointUrl:`https://generativelanguage.googleapis.com`,defaultModel:`gemini-2.5-flash`,keyPlaceholder:`AIza...`,keyHelpUrl:`https://aistudio.google.com/apikey`,keyHelpLabel:`去 Google AI Studio 免费领 Key`},{id:`qwen`,label:`通义千问 Qwen Plus`,badge:`国内直连 · 中文写作强`,summary:`阿里云百炼 OpenAI 兼容接口,中文语感自然、延迟低。`,connectorId:`openai-compatible`,connectionName:`通义千问 Qwen Plus`,endpointUrl:`https://dashscope.aliyuncs.com/compatible-mode/v1`,defaultModel:`qwen-plus`,keyPlaceholder:`sk-...`,keyHelpUrl:`https://bailian.console.aliyun.com/`,keyHelpLabel:`去阿里云百炼获取 Key`},{id:`zhipu`,label:`智谱 GLM-4 Plus`,badge:`国内直连 · 新人免费包`,summary:`智谱开放平台自带新人赠送 Token,中文技术与行业解读表现好。`,connectorId:`openai-compatible`,connectionName:`智谱 GLM-4 Plus`,endpointUrl:`https://open.bigmodel.cn/api/paas/v4`,defaultModel:`glm-4-plus`,keyPlaceholder:`输入智谱 API Key`,keyHelpUrl:`https://open.bigmodel.cn/usercenter/apikeys`,keyHelpLabel:`去智谱开放平台获取 Key`},{id:`openrouter`,label:`OpenRouter`,badge:`全球聚合 · Claude / GPT`,summary:`一个 Key 自由切换 Claude Sonnet 4、GPT-4.1、Gemini 等全球模型。`,connectorId:`openai-compatible`,connectionName:`OpenRouter`,endpointUrl:`https://openrouter.ai/api/v1`,defaultModel:`anthropic/claude-sonnet-4`,keyPlaceholder:`sk-or-v1-...`,keyHelpUrl:`https://openrouter.ai/keys`,keyHelpLabel:`去 OpenRouter 获取 Key`},{id:`openai`,label:`OpenAI GPT-4.1`,badge:`稳定标杆`,summary:`官方 OpenAI 接口,指令遵循与结构化输出稳定。`,connectorId:`openai-compatible`,connectionName:`OpenAI GPT-4.1`,endpointUrl:`https://api.openai.com/v1`,defaultModel:`gpt-4.1`,keyPlaceholder:`sk-proj-...`,keyHelpUrl:`https://platform.openai.com/api-keys`,keyHelpLabel:`去 OpenAI 控制台获取 Key`},{id:`custom-openai`,label:`自定义中转 / Ollama`,badge:`完全可控`,summary:`填写任意 OpenAI Compatible 网关、OneAPI 或本机 Ollama 地址。`,connectorId:`openai-compatible`,connectionName:`自定义对话模型`,endpointUrl:`http://127.0.0.1:11434/v1`,defaultModel:`qwen2.5:14b`,keyPlaceholder:`sk-... 或 ollama`}];function T9(e,t){let n=(t.endpointUrl??e.endpointUrl).trim(),r=(t.model??e.defaultModel).trim(),i=(t.name??e.connectionName).trim()||e.connectionName;return e.connectorId===`gemini`?{connectorId:`gemini`,name:i,enabled:!0,settings:{apiHost:n,model:r},credentials:{apiKey:t.apiKey.trim()}}:{connectorId:`openai-compatible`,name:i,enabled:!0,settings:{baseUrl:n,model:r},credentials:{apiKey:t.apiKey.trim()}}}var E9={Model:`model`,Source:`source`,Notification:`notification`,Delivery:`delivery`,Channel:`channel`},D9={Zhihu:`zhihu`,Juejin:`juejin`,Xiaohongshu:`xiaohongshu`,Toutiao:`toutiao`,Csdn:`csdn`,Bilibili:`bilibili`,WeixinWeb:`weixin-web`,Weibo:`weibo`,Douyin:`douyin`,Baijiahao:`baijiahao`,Sohu:`sohu`,Jianshu:`jianshu`,Cnblogs:`cnblogs`,Segmentfault:`segmentfault`,Oschina:`oschina`,Douban:`douban`,Xueqiu:`xueqiu`,WeixinChannels:`weixin-channels`,Medium:`medium`,Substack:`substack`};D9.Zhihu,D9.Juejin,D9.Xiaohongshu,D9.Toutiao,D9.Csdn,D9.Bilibili,D9.WeixinWeb,D9.Weibo,D9.Douyin,D9.Baijiahao,D9.Sohu,D9.Jianshu,D9.Cnblogs,D9.Segmentfault,D9.Oschina,D9.Douban,D9.Xueqiu,D9.WeixinChannels,D9.Medium,D9.Substack;var O9={Inherit:`inherit`,Adaptive:`adaptive`,Template:`template`},k9={Inherit:`inherit`,None:`none`,Style:`style`},A9;(function(e){e.assertEqual=e=>{},e.assertIs=function(e){},e.assertNever=function(e){throw Error()},e.arrayToEnum=e=>{let t={};for(let n of e)t[n]=n;return t},e.getValidEnumValues=t=>{let n=e.objectKeys(t).filter(e=>typeof t[t[e]]!=`number`),r={};for(let e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys=typeof Object.keys==`function`?e=>Object.keys(e):e=>{let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(let n of e)if(t(n))return n},e.isInteger=typeof Number.isInteger==`function`?e=>Number.isInteger(e):e=>typeof e==`number`&&Number.isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=` | `){return e.map(e=>typeof e==`string`?`'${e}'`:e).join(t)},e.jsonStringifyReplacer=(e,t)=>typeof t==`bigint`?t.toString():t})(A9||={});var j9;(function(e){e.mergeShapes=(e,t)=>({...e,...t})})(j9||={});var G=A9.arrayToEnum([`string`,`nan`,`number`,`integer`,`float`,`boolean`,`date`,`bigint`,`symbol`,`function`,`undefined`,`null`,`array`,`object`,`unknown`,`promise`,`void`,`never`,`map`,`set`]),M9=e=>{switch(typeof e){case`undefined`:return G.undefined;case`string`:return G.string;case`number`:return Number.isNaN(e)?G.nan:G.number;case`boolean`:return G.boolean;case`function`:return G.function;case`bigint`:return G.bigint;case`symbol`:return G.symbol;case`object`:return Array.isArray(e)?G.array:e===null?G.null:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?G.promise:typeof Map<`u`&&e instanceof Map?G.map:typeof Set<`u`&&e instanceof Set?G.set:typeof Date<`u`&&e instanceof Date?G.date:G.object;default:return G.unknown}},K=A9.arrayToEnum([`invalid_type`,`invalid_literal`,`custom`,`invalid_union`,`invalid_union_discriminator`,`invalid_enum_value`,`unrecognized_keys`,`invalid_arguments`,`invalid_return_type`,`invalid_date`,`invalid_string`,`too_small`,`too_big`,`invalid_intersection_types`,`not_multiple_of`,`not_finite`]),N9=class e extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name=`ZodError`,this.issues=e}format(e){let t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`)i.unionErrors.map(r);else if(i.code===`invalid_return_type`)r(i.returnTypeError);else if(i.code===`invalid_arguments`)r(i.argumentsError);else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}static assert(t){if(!(t instanceof e))throw Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,A9.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=e=>e.message){let t={},n=[];for(let r of this.issues)if(r.path.length>0){let n=r.path[0];t[n]=t[n]||[],t[n].push(e(r))}else n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}};N9.create=e=>new N9(e);var P9=(e,t)=>{let n;switch(e.code){case K.invalid_type:n=e.received===G.undefined?`Required`:`Expected ${e.expected}, received ${e.received}`;break;case K.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,A9.jsonStringifyReplacer)}`;break;case K.unrecognized_keys:n=`Unrecognized key(s) in object: ${A9.joinValues(e.keys,`, `)}`;break;case K.invalid_union:n=`Invalid input`;break;case K.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${A9.joinValues(e.options)}`;break;case K.invalid_enum_value:n=`Invalid enum value. Expected ${A9.joinValues(e.options)}, received '${e.received}'`;break;case K.invalid_arguments:n=`Invalid function arguments`;break;case K.invalid_return_type:n=`Invalid function return type`;break;case K.invalid_date:n=`Invalid date`;break;case K.invalid_string:typeof e.validation==`object`?`includes`in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position==`number`&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):`startsWith`in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:`endsWith`in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:A9.assertNever(e.validation):n=e.validation===`regex`?`Invalid`:`Invalid ${e.validation}`;break;case K.too_small:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at least`:`more than`} ${e.minimum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at least`:`over`} ${e.minimum} character(s)`:e.type===`number`||e.type===`bigint`?`Number must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${e.minimum}`:e.type===`date`?`Date must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${new Date(Number(e.minimum))}`:`Invalid input`;break;case K.too_big:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at most`:`less than`} ${e.maximum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at most`:`under`} ${e.maximum} character(s)`:e.type===`number`?`Number must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`bigint`?`BigInt must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`date`?`Date must be ${e.exact?`exactly`:e.inclusive?`smaller than or equal to`:`smaller than`} ${new Date(Number(e.maximum))}`:`Invalid input`;break;case K.custom:n=`Invalid input`;break;case K.invalid_intersection_types:n=`Intersection results could not be merged`;break;case K.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case K.not_finite:n=`Number must be finite`;break;default:n=t.defaultError,A9.assertNever(e)}return{message:n}},F9=P9;function I9(){return F9}var L9=e=>{let{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s=``,c=r.filter(e=>!!e).slice().reverse();for(let e of c)s=e(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}};function q(e,t){let n=I9(),r=L9({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===P9?void 0:P9].filter(e=>!!e)});e.common.issues.push(r)}var R9=class e{constructor(){this.value=`valid`}dirty(){this.value===`valid`&&(this.value=`dirty`)}abort(){this.value!==`aborted`&&(this.value=`aborted`)}static mergeArray(e,t){let n=[];for(let r of t){if(r.status===`aborted`)return J;r.status===`dirty`&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(t,n){let r=[];for(let e of n){let t=await e.key,n=await e.value;r.push({key:t,value:n})}return e.mergeObjectSync(t,r)}static mergeObjectSync(e,t){let n={};for(let r of t){let{key:t,value:i}=r;if(t.status===`aborted`||i.status===`aborted`)return J;t.status===`dirty`&&e.dirty(),i.status===`dirty`&&e.dirty(),t.value!==`__proto__`&&(i.value!==void 0||r.alwaysSet)&&(n[t.value]=i.value)}return{status:e.value,value:n}}},J=Object.freeze({status:`aborted`}),z9=e=>({status:`dirty`,value:e}),B9=e=>({status:`valid`,value:e}),V9=e=>e.status===`aborted`,H9=e=>e.status===`dirty`,U9=e=>e.status===`valid`,W9=e=>typeof Promise<`u`&&e instanceof Promise,Y;(function(e){e.errToObj=e=>typeof e==`string`?{message:e}:e||{},e.toString=e=>typeof e==`string`?e:e?.message})(Y||={});var G9=class{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},K9=(e,t)=>{if(U9(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error(`Validation failed but no issues detected.`);return{success:!1,get error(){if(this._error)return this._error;let t=new N9(e.common.issues);return this._error=t,this._error}}};function X(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:a}=e;return t.code===`invalid_enum_value`?{message:a??i.defaultError}:i.data===void 0?{message:a??r??i.defaultError}:t.code===`invalid_type`?{message:a??n??i.defaultError}:{message:i.defaultError}},description:i}}var q9=class{get description(){return this._def.description}_getType(e){return M9(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:M9(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new R9,ctx:{common:e.parent.common,data:e.data,parsedType:M9(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(W9(t))throw Error(`Synchronous parse encountered promise.`);return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){let n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:M9(e)};return K9(n,this._parseSync({data:e,path:n.path,parent:n}))}"~validate"(e){let t={common:{issues:[],async:!!this[`~standard`].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:M9(e)};if(!this[`~standard`].async)try{let n=this._parseSync({data:e,path:[],parent:t});return U9(n)?{value:n.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes(`encountered`)&&(this[`~standard`].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>U9(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:M9(e)},r=this._parse({data:e,path:n.path,parent:n});return K9(n,await(W9(r)?r:Promise.resolve(r)))}refine(e,t){let n=e=>typeof t==`string`||t===void 0?{message:t}:typeof t==`function`?t(e):t;return this._refinement((t,r)=>{let i=e(t),a=()=>r.addIssue({code:K.custom,...n(t)});return typeof Promise<`u`&&i instanceof Promise?i.then(e=>e?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(e,t){return this._refinement((n,r)=>e(n)?!0:(r.addIssue(typeof t==`function`?t(n,r):t),!1))}_refinement(e){return new XS({schema:this,typeName:Z.ZodEffects,effect:{type:`refinement`,refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this[`~standard`]={version:1,vendor:`zod`,validate:e=>this[`~validate`](e)}}optional(){return ZS.create(this,this._def)}nullable(){return QS.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return jS.create(this)}promise(){return YS.create(this,this._def)}or(e){return PS.create([this,e],this._def)}and(e){return RS.create(this,e,this._def)}transform(e){return new XS({...X(this._def),schema:this,typeName:Z.ZodEffects,effect:{type:`transform`,transform:e}})}default(e){let t=typeof e==`function`?e:()=>e;return new $S({...X(this._def),innerType:this,defaultValue:t,typeName:Z.ZodDefault})}brand(){return new nC({typeName:Z.ZodBranded,type:this,...X(this._def)})}catch(e){let t=typeof e==`function`?e:()=>e;return new eC({...X(this._def),innerType:this,catchValue:t,typeName:Z.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return rC.create(this,e)}readonly(){return iC.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},J9=/^c[^\s-]{8,}$/i,Y9=/^[0-9a-z]+$/,X9=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Z9=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Q9=/^[a-z0-9_-]{21}$/i,$9=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,eS=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,tS=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,nS=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,rS,iS=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,aS=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,oS=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,sS=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,cS=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,lS=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,uS=`((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`,dS=RegExp(`^${uS}$`);function fS(e){let t=`[0-5]\\d`;e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision??(t=`${t}(\\.\\d+)?`);let n=e.precision?`+`:`?`;return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function pS(e){return RegExp(`^${fS(e)}$`)}function mS(e){let t=`${uS}T${fS(e)}`,n=[];return n.push(e.local?`Z?`:`Z`),e.offset&&n.push(`([+-]\\d{2}:?\\d{2})`),t=`${t}(${n.join(`|`)})`,RegExp(`^${t}$`)}function hS(e,t){return!((t!==`v4`&&t||!iS.test(e))&&(t!==`v6`&&t||!oS.test(e)))}function gS(e,t){if(!$9.test(e))return!1;try{let[n]=e.split(`.`);if(!n)return!1;let r=n.replace(/-/g,`+`).replace(/_/g,`/`).padEnd(n.length+(4-n.length%4)%4,`=`),i=JSON.parse(atob(r));return!(typeof i!=`object`||!i||`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&i.alg!==t)}catch{return!1}}function _S(e,t){return!((t!==`v4`&&t||!aS.test(e))&&(t!==`v6`&&t||!sS.test(e)))}var vS=class e extends q9{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==G.string){let t=this._getOrReturnCtx(e);return q(t,{code:K.invalid_type,expected:G.string,received:t.parsedType}),J}let t=new R9,n;for(let r of this._def.checks)if(r.kind===`min`)e.data.length<r.value&&(n=this._getOrReturnCtx(e,n),q(n,{code:K.too_small,minimum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),t.dirty());else if(r.kind===`max`)e.data.length>r.value&&(n=this._getOrReturnCtx(e,n),q(n,{code:K.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),t.dirty());else if(r.kind===`length`){let i=e.data.length>r.value,a=e.data.length<r.value;(i||a)&&(n=this._getOrReturnCtx(e,n),i?q(n,{code:K.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!0,message:r.message}):a&&q(n,{code:K.too_small,minimum:r.value,type:`string`,inclusive:!0,exact:!0,message:r.message}),t.dirty())}else if(r.kind===`email`)tS.test(e.data)||(n=this._getOrReturnCtx(e,n),q(n,{validation:`email`,code:K.invalid_string,message:r.message}),t.dirty());else if(r.kind===`emoji`)rS||=new RegExp(nS,`u`),rS.test(e.data)||(n=this._getOrReturnCtx(e,n),q(n,{validation:`emoji`,code:K.invalid_string,message:r.message}),t.dirty());else if(r.kind===`uuid`)Z9.test(e.data)||(n=this._getOrReturnCtx(e,n),q(n,{validation:`uuid`,code:K.invalid_string,message:r.message}),t.dirty());else if(r.kind===`nanoid`)Q9.test(e.data)||(n=this._getOrReturnCtx(e,n),q(n,{validation:`nanoid`,code:K.invalid_string,message:r.message}),t.dirty());else if(r.kind===`cuid`)J9.test(e.data)||(n=this._getOrReturnCtx(e,n),q(n,{validation:`cuid`,code:K.invalid_string,message:r.message}),t.dirty());else if(r.kind===`cuid2`)Y9.test(e.data)||(n=this._getOrReturnCtx(e,n),q(n,{validation:`cuid2`,code:K.invalid_string,message:r.message}),t.dirty());else if(r.kind===`ulid`)X9.test(e.data)||(n=this._getOrReturnCtx(e,n),q(n,{validation:`ulid`,code:K.invalid_string,message:r.message}),t.dirty());else if(r.kind===`url`)try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),q(n,{validation:`url`,code:K.invalid_string,message:r.message}),t.dirty()}else r.kind===`regex`?(r.regex.lastIndex=0,r.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),q(n,{validation:`regex`,code:K.invalid_string,message:r.message}),t.dirty())):r.kind===`trim`?e.data=e.data.trim():r.kind===`includes`?e.data.includes(r.value,r.position)||(n=this._getOrReturnCtx(e,n),q(n,{code:K.invalid_string,validation:{includes:r.value,position:r.position},message:r.message}),t.dirty()):r.kind===`toLowerCase`?e.data=e.data.toLowerCase():r.kind===`toUpperCase`?e.data=e.data.toUpperCase():r.kind===`startsWith`?e.data.startsWith(r.value)||(n=this._getOrReturnCtx(e,n),q(n,{code:K.invalid_string,validation:{startsWith:r.value},message:r.message}),t.dirty()):r.kind===`endsWith`?e.data.endsWith(r.value)||(n=this._getOrReturnCtx(e,n),q(n,{code:K.invalid_string,validation:{endsWith:r.value},message:r.message}),t.dirty()):r.kind===`datetime`?mS(r).test(e.data)||(n=this._getOrReturnCtx(e,n),q(n,{code:K.invalid_string,validation:`datetime`,message:r.message}),t.dirty()):r.kind===`date`?dS.test(e.data)||(n=this._getOrReturnCtx(e,n),q(n,{code:K.invalid_string,validation:`date`,message:r.message}),t.dirty()):r.kind===`time`?pS(r).test(e.data)||(n=this._getOrReturnCtx(e,n),q(n,{code:K.invalid_string,validation:`time`,message:r.message}),t.dirty()):r.kind===`duration`?eS.test(e.data)||(n=this._getOrReturnCtx(e,n),q(n,{validation:`duration`,code:K.invalid_string,message:r.message}),t.dirty()):r.kind===`ip`?hS(e.data,r.version)||(n=this._getOrReturnCtx(e,n),q(n,{validation:`ip`,code:K.invalid_string,message:r.message}),t.dirty()):r.kind===`jwt`?gS(e.data,r.alg)||(n=this._getOrReturnCtx(e,n),q(n,{validation:`jwt`,code:K.invalid_string,message:r.message}),t.dirty()):r.kind===`cidr`?_S(e.data,r.version)||(n=this._getOrReturnCtx(e,n),q(n,{validation:`cidr`,code:K.invalid_string,message:r.message}),t.dirty()):r.kind===`base64`?cS.test(e.data)||(n=this._getOrReturnCtx(e,n),q(n,{validation:`base64`,code:K.invalid_string,message:r.message}),t.dirty()):r.kind===`base64url`?lS.test(e.data)||(n=this._getOrReturnCtx(e,n),q(n,{validation:`base64url`,code:K.invalid_string,message:r.message}),t.dirty()):A9.assertNever(r);return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement(t=>e.test(t),{validation:t,code:K.invalid_string,...Y.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(e){return this._addCheck({kind:`email`,...Y.errToObj(e)})}url(e){return this._addCheck({kind:`url`,...Y.errToObj(e)})}emoji(e){return this._addCheck({kind:`emoji`,...Y.errToObj(e)})}uuid(e){return this._addCheck({kind:`uuid`,...Y.errToObj(e)})}nanoid(e){return this._addCheck({kind:`nanoid`,...Y.errToObj(e)})}cuid(e){return this._addCheck({kind:`cuid`,...Y.errToObj(e)})}cuid2(e){return this._addCheck({kind:`cuid2`,...Y.errToObj(e)})}ulid(e){return this._addCheck({kind:`ulid`,...Y.errToObj(e)})}base64(e){return this._addCheck({kind:`base64`,...Y.errToObj(e)})}base64url(e){return this._addCheck({kind:`base64url`,...Y.errToObj(e)})}jwt(e){return this._addCheck({kind:`jwt`,...Y.errToObj(e)})}ip(e){return this._addCheck({kind:`ip`,...Y.errToObj(e)})}cidr(e){return this._addCheck({kind:`cidr`,...Y.errToObj(e)})}datetime(e){return typeof e==`string`?this._addCheck({kind:`datetime`,precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:`datetime`,precision:e?.precision===void 0?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...Y.errToObj(e?.message)})}date(e){return this._addCheck({kind:`date`,message:e})}time(e){return typeof e==`string`?this._addCheck({kind:`time`,precision:null,message:e}):this._addCheck({kind:`time`,precision:e?.precision===void 0?null:e?.precision,...Y.errToObj(e?.message)})}duration(e){return this._addCheck({kind:`duration`,...Y.errToObj(e)})}regex(e,t){return this._addCheck({kind:`regex`,regex:e,...Y.errToObj(t)})}includes(e,t){return this._addCheck({kind:`includes`,value:e,position:t?.position,...Y.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:`startsWith`,value:e,...Y.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:`endsWith`,value:e,...Y.errToObj(t)})}min(e,t){return this._addCheck({kind:`min`,value:e,...Y.errToObj(t)})}max(e,t){return this._addCheck({kind:`max`,value:e,...Y.errToObj(t)})}length(e,t){return this._addCheck({kind:`length`,value:e,...Y.errToObj(t)})}nonempty(e){return this.min(1,Y.errToObj(e))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:`trim`}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toLowerCase`}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toUpperCase`}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind===`datetime`)}get isDate(){return!!this._def.checks.find(e=>e.kind===`date`)}get isTime(){return!!this._def.checks.find(e=>e.kind===`time`)}get isDuration(){return!!this._def.checks.find(e=>e.kind===`duration`)}get isEmail(){return!!this._def.checks.find(e=>e.kind===`email`)}get isURL(){return!!this._def.checks.find(e=>e.kind===`url`)}get isEmoji(){return!!this._def.checks.find(e=>e.kind===`emoji`)}get isUUID(){return!!this._def.checks.find(e=>e.kind===`uuid`)}get isNANOID(){return!!this._def.checks.find(e=>e.kind===`nanoid`)}get isCUID(){return!!this._def.checks.find(e=>e.kind===`cuid`)}get isCUID2(){return!!this._def.checks.find(e=>e.kind===`cuid2`)}get isULID(){return!!this._def.checks.find(e=>e.kind===`ulid`)}get isIP(){return!!this._def.checks.find(e=>e.kind===`ip`)}get isCIDR(){return!!this._def.checks.find(e=>e.kind===`cidr`)}get isBase64(){return!!this._def.checks.find(e=>e.kind===`base64`)}get isBase64url(){return!!this._def.checks.find(e=>e.kind===`base64url`)}get minLength(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}};vS.create=e=>new vS({checks:[],typeName:Z.ZodString,coerce:e?.coerce??!1,...X(e)});function yS(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=(t.toString().split(`.`)[1]||``).length,i=n>r?n:r;return Number.parseInt(e.toFixed(i).replace(`.`,``))%Number.parseInt(t.toFixed(i).replace(`.`,``))/10**i}var bS=class e extends q9{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==G.number){let t=this._getOrReturnCtx(e);return q(t,{code:K.invalid_type,expected:G.number,received:t.parsedType}),J}let t,n=new R9;for(let r of this._def.checks)r.kind===`int`?A9.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),q(t,{code:K.invalid_type,expected:`integer`,received:`float`,message:r.message}),n.dirty()):r.kind===`min`?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),q(t,{code:K.too_small,minimum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind===`max`?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),q(t,{code:K.too_big,maximum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind===`multipleOf`?yS(e.data,r.value)!==0&&(t=this._getOrReturnCtx(e,t),q(t,{code:K.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):r.kind===`finite`?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),q(t,{code:K.not_finite,message:r.message}),n.dirty()):A9.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit(`min`,e,!0,Y.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,Y.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,Y.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,Y.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Y.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(e){return this._addCheck({kind:`int`,message:Y.toString(e)})}positive(e){return this._addCheck({kind:`min`,value:0,inclusive:!1,message:Y.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:0,inclusive:!1,message:Y.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:0,inclusive:!0,message:Y.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:0,inclusive:!0,message:Y.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:Y.toString(t)})}finite(e){return this._addCheck({kind:`finite`,message:Y.toString(e)})}safe(e){return this._addCheck({kind:`min`,inclusive:!0,value:-(2**53-1),message:Y.toString(e)})._addCheck({kind:`max`,inclusive:!0,value:2**53-1,message:Y.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind===`int`||e.kind===`multipleOf`&&A9.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks)if(n.kind===`finite`||n.kind===`int`||n.kind===`multipleOf`)return!0;else n.kind===`min`?(t===null||n.value>t)&&(t=n.value):n.kind===`max`&&(e===null||n.value<e)&&(e=n.value);return Number.isFinite(t)&&Number.isFinite(e)}};bS.create=e=>new bS({checks:[],typeName:Z.ZodNumber,coerce:e?.coerce||!1,...X(e)});var xS=class e extends q9{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==G.bigint)return this._getInvalidInput(e);let t,n=new R9;for(let r of this._def.checks)r.kind===`min`?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),q(t,{code:K.too_small,type:`bigint`,minimum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind===`max`?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),q(t,{code:K.too_big,type:`bigint`,maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind===`multipleOf`?e.data%r.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),q(t,{code:K.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):A9.assertNever(r);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return q(t,{code:K.invalid_type,expected:G.bigint,received:t.parsedType}),J}gte(e,t){return this.setLimit(`min`,e,!0,Y.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,Y.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,Y.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,Y.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Y.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!1,message:Y.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!1,message:Y.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!0,message:Y.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!0,message:Y.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:Y.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}};xS.create=e=>new xS({checks:[],typeName:Z.ZodBigInt,coerce:e?.coerce??!1,...X(e)});var SS=class extends q9{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==G.boolean){let t=this._getOrReturnCtx(e);return q(t,{code:K.invalid_type,expected:G.boolean,received:t.parsedType}),J}return B9(e.data)}};SS.create=e=>new SS({typeName:Z.ZodBoolean,coerce:e?.coerce||!1,...X(e)});var CS=class e extends q9{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==G.date){let t=this._getOrReturnCtx(e);return q(t,{code:K.invalid_type,expected:G.date,received:t.parsedType}),J}if(Number.isNaN(e.data.getTime()))return q(this._getOrReturnCtx(e),{code:K.invalid_date}),J;let t=new R9,n;for(let r of this._def.checks)r.kind===`min`?e.data.getTime()<r.value&&(n=this._getOrReturnCtx(e,n),q(n,{code:K.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:`date`}),t.dirty()):r.kind===`max`?e.data.getTime()>r.value&&(n=this._getOrReturnCtx(e,n),q(n,{code:K.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:`date`}),t.dirty()):A9.assertNever(r);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(e,t){return this._addCheck({kind:`min`,value:e.getTime(),message:Y.toString(t)})}max(e,t){return this._addCheck({kind:`max`,value:e.getTime(),message:Y.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e==null?null:new Date(e)}get maxDate(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e==null?null:new Date(e)}};CS.create=e=>new CS({checks:[],coerce:e?.coerce||!1,typeName:Z.ZodDate,...X(e)});var wS=class extends q9{_parse(e){if(this._getType(e)!==G.symbol){let t=this._getOrReturnCtx(e);return q(t,{code:K.invalid_type,expected:G.symbol,received:t.parsedType}),J}return B9(e.data)}};wS.create=e=>new wS({typeName:Z.ZodSymbol,...X(e)});var TS=class extends q9{_parse(e){if(this._getType(e)!==G.undefined){let t=this._getOrReturnCtx(e);return q(t,{code:K.invalid_type,expected:G.undefined,received:t.parsedType}),J}return B9(e.data)}};TS.create=e=>new TS({typeName:Z.ZodUndefined,...X(e)});var ES=class extends q9{_parse(e){if(this._getType(e)!==G.null){let t=this._getOrReturnCtx(e);return q(t,{code:K.invalid_type,expected:G.null,received:t.parsedType}),J}return B9(e.data)}};ES.create=e=>new ES({typeName:Z.ZodNull,...X(e)});var DS=class extends q9{constructor(){super(...arguments),this._any=!0}_parse(e){return B9(e.data)}};DS.create=e=>new DS({typeName:Z.ZodAny,...X(e)});var OS=class extends q9{constructor(){super(...arguments),this._unknown=!0}_parse(e){return B9(e.data)}};OS.create=e=>new OS({typeName:Z.ZodUnknown,...X(e)});var kS=class extends q9{_parse(e){let t=this._getOrReturnCtx(e);return q(t,{code:K.invalid_type,expected:G.never,received:t.parsedType}),J}};kS.create=e=>new kS({typeName:Z.ZodNever,...X(e)});var AS=class extends q9{_parse(e){if(this._getType(e)!==G.undefined){let t=this._getOrReturnCtx(e);return q(t,{code:K.invalid_type,expected:G.void,received:t.parsedType}),J}return B9(e.data)}};AS.create=e=>new AS({typeName:Z.ZodVoid,...X(e)});var jS=class e extends q9{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==G.array)return q(t,{code:K.invalid_type,expected:G.array,received:t.parsedType}),J;if(r.exactLength!==null){let e=t.data.length>r.exactLength.value,i=t.data.length<r.exactLength.value;(e||i)&&(q(t,{code:e?K.too_big:K.too_small,minimum:i?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:`array`,inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(r.minLength!==null&&t.data.length<r.minLength.value&&(q(t,{code:K.too_small,minimum:r.minLength.value,type:`array`,inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),r.maxLength!==null&&t.data.length>r.maxLength.value&&(q(t,{code:K.too_big,maximum:r.maxLength.value,type:`array`,inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((e,n)=>r.type._parseAsync(new G9(t,e,t.path,n)))).then(e=>R9.mergeArray(n,e));let i=[...t.data].map((e,n)=>r.type._parseSync(new G9(t,e,t.path,n)));return R9.mergeArray(n,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:Y.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:Y.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:Y.toString(n)}})}nonempty(e){return this.min(1,e)}};jS.create=(e,t)=>new jS({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Z.ZodArray,...X(t)});function MS(e){if(e instanceof NS){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=ZS.create(MS(r))}return new NS({...e._def,shape:()=>t})}return e instanceof jS?new jS({...e._def,type:MS(e.element)}):e instanceof ZS?ZS.create(MS(e.unwrap())):e instanceof QS?QS.create(MS(e.unwrap())):e instanceof zS?zS.create(e.items.map(e=>MS(e))):e}var NS=class e extends q9{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=A9.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==G.object){let t=this._getOrReturnCtx(e);return q(t,{code:K.invalid_type,expected:G.object,received:t.parsedType}),J}let{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof kS&&this._def.unknownKeys===`strip`))for(let e in n.data)i.includes(e)||a.push(e);let o=[];for(let e of i){let t=r[e],i=n.data[e];o.push({key:{status:`valid`,value:e},value:t._parse(new G9(n,i,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof kS){let e=this._def.unknownKeys;if(e===`passthrough`)for(let e of a)o.push({key:{status:`valid`,value:e},value:{status:`valid`,value:n.data[e]}});else if(e===`strict`)a.length>0&&(q(n,{code:K.unrecognized_keys,keys:a}),t.dirty());else if(e!==`strip`)throw Error(`Internal ZodObject error: invalid unknownKeys value.`)}else{let e=this._def.catchall;for(let t of a){let r=n.data[t];o.push({key:{status:`valid`,value:t},value:e._parse(new G9(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of o){let n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e}).then(e=>R9.mergeObjectSync(t,e)):R9.mergeObjectSync(t,o)}get shape(){return this._def.shape()}strict(t){return Y.errToObj,new e({...this._def,unknownKeys:`strict`,...t===void 0?{}:{errorMap:(e,n)=>{let r=this._def.errorMap?.(e,n).message??n.defaultError;return e.code===`unrecognized_keys`?{message:Y.errToObj(t).message??r}:{message:r}}}})}strip(){return new e({...this._def,unknownKeys:`strip`})}passthrough(){return new e({...this._def,unknownKeys:`passthrough`})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Z.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};for(let e of A9.objectKeys(t))t[e]&&this.shape[e]&&(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}omit(t){let n={};for(let e of A9.objectKeys(this.shape))t[e]||(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}deepPartial(){return MS(this)}partial(t){let n={};for(let e of A9.objectKeys(this.shape)){let r=this.shape[e];n[e]=t&&!t[e]?r:r.optional()}return new e({...this._def,shape:()=>n})}required(t){let n={};for(let e of A9.objectKeys(this.shape))if(t&&!t[e])n[e]=this.shape[e];else{let t=this.shape[e];for(;t instanceof ZS;)t=t._def.innerType;n[e]=t}return new e({...this._def,shape:()=>n})}keyof(){return KS(A9.objectKeys(this.shape))}};NS.create=(e,t)=>new NS({shape:()=>e,unknownKeys:`strip`,catchall:kS.create(),typeName:Z.ZodObject,...X(t)}),NS.strictCreate=(e,t)=>new NS({shape:()=>e,unknownKeys:`strict`,catchall:kS.create(),typeName:Z.ZodObject,...X(t)}),NS.lazycreate=(e,t)=>new NS({shape:e,unknownKeys:`strip`,catchall:kS.create(),typeName:Z.ZodObject,...X(t)});var PS=class extends q9{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;function r(e){for(let t of e)if(t.result.status===`valid`)return t.result;for(let n of e)if(n.result.status===`dirty`)return t.common.issues.push(...n.ctx.common.issues),n.result;let n=e.map(e=>new N9(e.ctx.common.issues));return q(t,{code:K.invalid_union,unionErrors:n}),J}if(t.common.async)return Promise.all(n.map(async e=>{let n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}})).then(r);{let e,r=[];for(let i of n){let n={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:n});if(a.status===`valid`)return a;a.status===`dirty`&&!e&&(e={result:a,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=r.map(e=>new N9(e));return q(t,{code:K.invalid_union,unionErrors:i}),J}}get options(){return this._def.options}};PS.create=(e,t)=>new PS({options:e,typeName:Z.ZodUnion,...X(t)});var FS=e=>e instanceof WS?FS(e.schema):e instanceof XS?FS(e.innerType()):e instanceof GS?[e.value]:e instanceof qS?e.options:e instanceof JS?A9.objectValues(e.enum):e instanceof $S?FS(e._def.innerType):e instanceof TS?[void 0]:e instanceof ES?[null]:e instanceof ZS?[void 0,...FS(e.unwrap())]:e instanceof QS?[null,...FS(e.unwrap())]:e instanceof nC||e instanceof iC?FS(e.unwrap()):e instanceof eC?FS(e._def.innerType):[],IS=class e extends q9{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==G.object)return q(t,{code:K.invalid_type,expected:G.object,received:t.parsedType}),J;let n=this.discriminator,r=t.data[n],i=this.optionsMap.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(q(t,{code:K.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),J)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){let i=new Map;for(let e of n){let n=FS(e.shape[t]);if(!n.length)throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let r of n){if(i.has(r))throw Error(`Discriminator property ${String(t)} has duplicate value ${String(r)}`);i.set(r,e)}}return new e({typeName:Z.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...X(r)})}};function LS(e,t){let n=M9(e),r=M9(t);if(e===t)return{valid:!0,data:e};if(n===G.object&&r===G.object){let n=A9.objectKeys(t),r=A9.objectKeys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=LS(e[n],t[n]);if(!r.valid)return{valid:!1};i[n]=r.data}return{valid:!0,data:i}}if(n===G.array&&r===G.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let r=0;r<e.length;r++){let i=LS(e[r],t[r]);if(!i.valid)return{valid:!1};n.push(i.data)}return{valid:!0,data:n}}return n===G.date&&r===G.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var RS=class extends q9{_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(V9(e)||V9(r))return J;let i=LS(e.value,r.value);return i.valid?((H9(e)||H9(r))&&t.dirty(),{status:t.value,value:i.data}):(q(n,{code:K.invalid_intersection_types}),J)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([e,t])=>r(e,t)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};RS.create=(e,t,n)=>new RS({left:e,right:t,typeName:Z.ZodIntersection,...X(n)});var zS=class e extends q9{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==G.array)return q(n,{code:K.invalid_type,expected:G.array,received:n.parsedType}),J;if(n.data.length<this._def.items.length)return q(n,{code:K.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),J;!this._def.rest&&n.data.length>this._def.items.length&&(q(n,{code:K.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),t.dirty());let r=[...n.data].map((e,t)=>{let r=this._def.items[t]||this._def.rest;return r?r._parse(new G9(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(r).then(e=>R9.mergeArray(t,e)):R9.mergeArray(t,r)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};zS.create=(e,t)=>{if(!Array.isArray(e))throw Error(`You must pass an array of schemas to z.tuple([ ... ])`);return new zS({items:e,typeName:Z.ZodTuple,rest:null,...X(t)})};var BS=class e extends q9{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==G.object)return q(n,{code:K.invalid_type,expected:G.object,received:n.parsedType}),J;let r=[],i=this._def.keyType,a=this._def.valueType;for(let e in n.data)r.push({key:i._parse(new G9(n,e,n.path,e)),value:a._parse(new G9(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?R9.mergeObjectAsync(t,r):R9.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof q9?new e({keyType:t,valueType:n,typeName:Z.ZodRecord,...X(r)}):new e({keyType:vS.create(),valueType:t,typeName:Z.ZodRecord,...X(n)})}},VS=class extends q9{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==G.map)return q(n,{code:K.invalid_type,expected:G.map,received:n.parsedType}),J;let r=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(([e,t],a)=>({key:r._parse(new G9(n,e,n.path,[a,`key`])),value:i._parse(new G9(n,t,n.path,[a,`value`]))}));if(n.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let n of a){let r=await n.key,i=await n.value;if(r.status===`aborted`||i.status===`aborted`)return J;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}})}{let e=new Map;for(let n of a){let r=n.key,i=n.value;if(r.status===`aborted`||i.status===`aborted`)return J;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}};VS.create=(e,t,n)=>new VS({valueType:t,keyType:e,typeName:Z.ZodMap,...X(n)});var HS=class e extends q9{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==G.set)return q(n,{code:K.invalid_type,expected:G.set,received:n.parsedType}),J;let r=this._def;r.minSize!==null&&n.data.size<r.minSize.value&&(q(n,{code:K.too_small,minimum:r.minSize.value,type:`set`,inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),r.maxSize!==null&&n.data.size>r.maxSize.value&&(q(n,{code:K.too_big,maximum:r.maxSize.value,type:`set`,inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());let i=this._def.valueType;function a(e){let n=new Set;for(let r of e){if(r.status===`aborted`)return J;r.status===`dirty`&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}let o=[...n.data.values()].map((e,t)=>i._parse(new G9(n,e,n.path,t)));return n.common.async?Promise.all(o).then(e=>a(e)):a(o)}min(t,n){return new e({...this._def,minSize:{value:t,message:Y.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:Y.toString(n)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};HS.create=(e,t)=>new HS({valueType:e,minSize:null,maxSize:null,typeName:Z.ZodSet,...X(t)});var US=class e extends q9{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==G.function)return q(t,{code:K.invalid_type,expected:G.function,received:t.parsedType}),J;function n(e,n){return L9({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,I9(),P9].filter(e=>!!e),issueData:{code:K.invalid_arguments,argumentsError:n}})}function r(e,n){return L9({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,I9(),P9].filter(e=>!!e),issueData:{code:K.invalid_return_type,returnTypeError:n}})}let i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof YS){let e=this;return B9(async function(...t){let o=new N9([]),s=await e._def.args.parseAsync(t,i).catch(e=>{throw o.addIssue(n(t,e)),o}),c=await Reflect.apply(a,this,s);return await e._def.returns._def.type.parseAsync(c,i).catch(e=>{throw o.addIssue(r(c,e)),o})})}{let e=this;return B9(function(...t){let o=e._def.args.safeParse(t,i);if(!o.success)throw new N9([n(t,o.error)]);let s=Reflect.apply(a,this,o.data),c=e._def.returns.safeParse(s,i);if(!c.success)throw new N9([r(s,c.error)]);return c.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:zS.create(t).rest(OS.create())})}returns(t){return new e({...this._def,returns:t})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(t,n,r){return new e({args:t||zS.create([]).rest(OS.create()),returns:n||OS.create(),typeName:Z.ZodFunction,...X(r)})}},WS=class extends q9{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};WS.create=(e,t)=>new WS({getter:e,typeName:Z.ZodLazy,...X(t)});var GS=class extends q9{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return q(t,{received:t.data,code:K.invalid_literal,expected:this._def.value}),J}return{status:`valid`,value:e.data}}get value(){return this._def.value}};GS.create=(e,t)=>new GS({value:e,typeName:Z.ZodLiteral,...X(t)});function KS(e,t){return new qS({values:e,typeName:Z.ZodEnum,...X(t)})}var qS=class e extends q9{_parse(e){if(typeof e.data!=`string`){let t=this._getOrReturnCtx(e),n=this._def.values;return q(t,{expected:A9.joinValues(n),received:t.parsedType,code:K.invalid_type}),J}if(this._cache||=new Set(this._def.values),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return q(t,{received:t.data,code:K.invalid_enum_value,options:n}),J}return B9(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(t,n=this._def){return e.create(t,{...this._def,...n})}exclude(t,n=this._def){return e.create(this.options.filter(e=>!t.includes(e)),{...this._def,...n})}};qS.create=KS;var JS=class extends q9{_parse(e){let t=A9.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==G.string&&n.parsedType!==G.number){let e=A9.objectValues(t);return q(n,{expected:A9.joinValues(e),received:n.parsedType,code:K.invalid_type}),J}if(this._cache||=new Set(A9.getValidEnumValues(this._def.values)),!this._cache.has(e.data)){let e=A9.objectValues(t);return q(n,{received:n.data,code:K.invalid_enum_value,options:e}),J}return B9(e.data)}get enum(){return this._def.values}};JS.create=(e,t)=>new JS({values:e,typeName:Z.ZodNativeEnum,...X(t)});var YS=class extends q9{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==G.promise&&t.common.async===!1?(q(t,{code:K.invalid_type,expected:G.promise,received:t.parsedType}),J):B9((t.parsedType===G.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}};YS.create=(e,t)=>new YS({type:e,typeName:Z.ZodPromise,...X(t)});var XS=class extends q9{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Z.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,i={addIssue:e=>{q(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),r.type===`preprocess`){let e=r.transform(n.data,i);if(n.common.async)return Promise.resolve(e).then(async e=>{if(t.value===`aborted`)return J;let r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return r.status===`aborted`?J:r.status===`dirty`||t.value===`dirty`?z9(r.value):r});{if(t.value===`aborted`)return J;let r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return r.status===`aborted`?J:r.status===`dirty`||t.value===`dirty`?z9(r.value):r}}if(r.type===`refinement`){let e=e=>{let t=r.refinement(e,i);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error(`Async refinement encountered during synchronous parse operation. Use .parseAsync instead.`);return e};if(n.common.async===!1){let r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return r.status===`aborted`?J:(r.status===`dirty`&&t.dirty(),e(r.value),{status:t.value,value:r.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>n.status===`aborted`?J:(n.status===`dirty`&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))))}if(r.type===`transform`){if(n.common.async===!1){let e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!U9(e))return J;let a=r.transform(e.value,i);if(a instanceof Promise)throw Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);return{status:t.value,value:a}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>U9(e)?Promise.resolve(r.transform(e.value,i)).then(e=>({status:t.value,value:e})):J)}A9.assertNever(r)}};XS.create=(e,t,n)=>new XS({schema:e,typeName:Z.ZodEffects,effect:t,...X(n)}),XS.createWithPreprocess=(e,t,n)=>new XS({schema:t,effect:{type:`preprocess`,transform:e},typeName:Z.ZodEffects,...X(n)});var ZS=class extends q9{_parse(e){return this._getType(e)===G.undefined?B9(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};ZS.create=(e,t)=>new ZS({innerType:e,typeName:Z.ZodOptional,...X(t)});var QS=class extends q9{_parse(e){return this._getType(e)===G.null?B9(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};QS.create=(e,t)=>new QS({innerType:e,typeName:Z.ZodNullable,...X(t)});var $S=class extends q9{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===G.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};$S.create=(e,t)=>new $S({innerType:e,typeName:Z.ZodDefault,defaultValue:typeof t.default==`function`?t.default:()=>t.default,...X(t)});var eC=class extends q9{_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return W9(r)?r.then(e=>({status:`valid`,value:e.status===`valid`?e.value:this._def.catchValue({get error(){return new N9(n.common.issues)},input:n.data})})):{status:`valid`,value:r.status===`valid`?r.value:this._def.catchValue({get error(){return new N9(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};eC.create=(e,t)=>new eC({innerType:e,typeName:Z.ZodCatch,catchValue:typeof t.catch==`function`?t.catch:()=>t.catch,...X(t)});var tC=class extends q9{_parse(e){if(this._getType(e)!==G.nan){let t=this._getOrReturnCtx(e);return q(t,{code:K.invalid_type,expected:G.nan,received:t.parsedType}),J}return{status:`valid`,value:e.data}}};tC.create=e=>new tC({typeName:Z.ZodNaN,...X(e)});var nC=class extends q9{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}},rC=class e extends q9{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?J:e.status===`dirty`?(t.dirty(),z9(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{let e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?J:e.status===`dirty`?(t.dirty(),{status:`dirty`,value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(t,n){return new e({in:t,out:n,typeName:Z.ZodPipeline})}},iC=class extends q9{_parse(e){let t=this._def.innerType._parse(e),n=e=>(U9(e)&&(e.value=Object.freeze(e.value)),e);return W9(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}};iC.create=(e,t)=>new iC({innerType:e,typeName:Z.ZodReadonly,...X(t)}),NS.lazycreate;var Z;(function(e){e.ZodString=`ZodString`,e.ZodNumber=`ZodNumber`,e.ZodNaN=`ZodNaN`,e.ZodBigInt=`ZodBigInt`,e.ZodBoolean=`ZodBoolean`,e.ZodDate=`ZodDate`,e.ZodSymbol=`ZodSymbol`,e.ZodUndefined=`ZodUndefined`,e.ZodNull=`ZodNull`,e.ZodAny=`ZodAny`,e.ZodUnknown=`ZodUnknown`,e.ZodNever=`ZodNever`,e.ZodVoid=`ZodVoid`,e.ZodArray=`ZodArray`,e.ZodObject=`ZodObject`,e.ZodUnion=`ZodUnion`,e.ZodDiscriminatedUnion=`ZodDiscriminatedUnion`,e.ZodIntersection=`ZodIntersection`,e.ZodTuple=`ZodTuple`,e.ZodRecord=`ZodRecord`,e.ZodMap=`ZodMap`,e.ZodSet=`ZodSet`,e.ZodFunction=`ZodFunction`,e.ZodLazy=`ZodLazy`,e.ZodLiteral=`ZodLiteral`,e.ZodEnum=`ZodEnum`,e.ZodEffects=`ZodEffects`,e.ZodNativeEnum=`ZodNativeEnum`,e.ZodOptional=`ZodOptional`,e.ZodNullable=`ZodNullable`,e.ZodDefault=`ZodDefault`,e.ZodCatch=`ZodCatch`,e.ZodPromise=`ZodPromise`,e.ZodBranded=`ZodBranded`,e.ZodPipeline=`ZodPipeline`,e.ZodReadonly=`ZodReadonly`})(Z||={});var Q=vS.create,aC=bS.create;tC.create,xS.create;var oC=SS.create;CS.create,wS.create,TS.create;var sC=ES.create;DS.create;var cC=OS.create;kS.create,AS.create;var lC=jS.create,$=NS.create;NS.strictCreate;var uC=PS.create,dC=IS.create;RS.create,zS.create;var fC=BS.create;VS.create,HS.create,US.create;var pC=WS.create,mC=GS.create,hC=qS.create;JS.create,YS.create,XS.create,ZS.create,QS.create,XS.createWithPreprocess,rC.create;var gC={string:(e=>vS.create({...e,coerce:!0})),number:(e=>bS.create({...e,coerce:!0})),boolean:(e=>SS.create({...e,coerce:!0})),bigint:(e=>xS.create({...e,coerce:!0})),date:(e=>CS.create({...e,coerce:!0}))},_C={Day:`24h`,ThreeDays:`72h`,Week:`7d`,Month:`30d`,All:`all`},vC={Rss:`rss`,SiteMonitor:`site-monitor`,Feed:`feed`,Search:`search`,MediaChannel:`media-channel`,Url:`url`,CustomApi:`custom-api`,Webhook:`webhook`},yC={Rss:`rss`,Rsshub:`rsshub`,GithubTrending:`github-trending`,HfPapers:`hf-papers`,HnTop:`hn-top`,Reddit:`reddit`,ProductHunt:`producthunt`,CnHotlist:`cn-hotlist`},bC={Skip:`skip`,Force:`force`},xC={DailyBrief:`daily-brief`,DeepAnalysis:`deep-analysis`,PracticalGuide:`practical-guide`},SC=xC.DailyBrief,CC=Q().trim().min(1).max(200),wC=Q().trim().url().max(4e3).refine(e=>{try{let t=new URL(e).protocol;return t===`http:`||t===`https:`}catch{return!1}},`仅支持 http:// 或 https:// 链接`),TC=aC().int().positive(),EC=pC(()=>uC([Q(),aC().finite(),oC(),sC(),lC(EC),fC(Q(),EC)])),DC=fC(Q().min(1).max(120),EC),OC=$({mode:hC([O9.Inherit,O9.Adaptive,O9.Template]),prompt:Q().trim().max(4e3).optional(),templateId:CC.optional(),templateVersionId:CC.optional()}).superRefine((e,t)=>{e.prompt&&t.addIssue({code:`custom`,path:[`prompt`],message:`运行时排版提示词已停用,请制作并选择固定模板版本`}),e.mode===O9.Template&&!e.templateId&&t.addIssue({code:`custom`,path:[`templateId`],message:`请选择排版模板`})}),kC=$({mode:hC([k9.Inherit,k9.None,k9.Style]),styleId:CC.optional()}).superRefine((e,t)=>{e.mode===k9.Style&&!e.styleId&&t.addIssue({code:`custom`,path:[`styleId`],message:`请选择写作风格`})}),AC=$({title:Q().trim().max(200).optional(),text:Q().trim().min(1).max(8e3)});$({revision:TC.optional(),name:Q().trim().min(1).max(120),description:Q().trim().max(500).optional(),enabled:oC().default(!0),channel:CC.optional(),rules:$({register:hC([`formal`,`editorial`,`conversational`,`sharp`]),sentenceRhythm:hC([`short`,`balanced`,`long`]),structure:hC([`narrative`,`scannable-sections`,`bullet-cards`,`step-by-step`]),emojiDensity:hC([`none`,`light`,`moderate`]),lengthTarget:hC([`short`,`medium`,`long`]),titlePattern:Q().trim().min(1).max(200),guidance:Q().trim().max(2e3).optional()}),samples:lC(AC).max(5).optional()}),$({samples:lC(AC).min(1).max(5),channel:CC.optional()});var jC=$({accountId:CC,publicationType:CC,layout:OC.optional(),writingStyle:kC.optional(),options:DC.optional()});$({id:CC.optional(),revision:TC.optional(),connectorId:CC,name:Q().trim().min(1).max(120),enabled:oC().default(!0),settings:DC,credentials:DC.default({}),clearCredentials:lC(Q().min(1).max(120)).max(50).default([]),overrides:$({headers:fC(Q(),Q()).optional(),query:fC(Q(),Q()).optional(),body:fC(Q(),EC).optional()}).optional()}),$({revision:TC.optional(),name:Q().trim().min(1).max(120),enabled:oC(),positioning:Q().trim().min(1).max(1e3),audience:Q().trim().min(1).max(1e3),tone:Q().trim().min(1).max(500),forbiddenTopics:lC(Q().trim().min(1).max(300)).max(50).default([])}),$({revision:TC.optional(),name:Q().trim().min(1).max(120),enabled:oC(),documents:lC($({id:CC.optional(),title:Q().trim().min(1).max(500),content:Q().trim().min(1).max(2e6),fileName:Q().trim().max(500).optional(),mediaType:Q().trim().max(200).optional()})).max(200)});var MC=hC([_C.Day,_C.ThreeDays,_C.Week,_C.Month,_C.All]),NC=$({includeKeywords:lC(Q().trim().min(1).max(100)).max(30).optional(),excludeKeywords:lC(Q().trim().min(1).max(100)).max(30).optional(),minScore:aC().min(0).max(1e6).optional(),timeRange:MC.optional(),limit:aC().int().min(1).max(50).optional()}),PC=Q().trim().min(1).max(60),FC=$({revision:TC.optional(),name:Q().trim().min(1).max(120),enabled:oC().default(!0),tags:lC(PC).max(20).default([]),priorityWeight:aC().min(.1).max(5).default(1),filters:NC.optional()}),IC=$({url:wC}),LC=$({url:wC,linkPattern:Q().trim().max(500).optional(),useExtension:oC().optional()}),RC=$({provider:hC([yC.Rsshub,yC.GithubTrending,yC.HfPapers,yC.HnTop,yC.Reddit,yC.ProductHunt,yC.CnHotlist]),githubLanguage:Q().trim().max(60).optional(),githubSince:hC([`daily`,`weekly`,`monthly`]).optional(),hfDate:Q().trim().regex(/^\d{4}-\d{2}-\d{2}$/,`日期格式需为 YYYY-MM-DD`).optional().or(mC(``).transform(()=>void 0)),hnCategory:hC([`front_page`,`show_hn`,`ask_hn`]).optional(),redditSubreddit:Q().trim().max(100).optional(),redditSort:hC([`hot`,`top`,`new`,`rising`]).optional(),cnPlatform:hC([`v2ex`,`36kr`,`sspai`,`ithome`,`ifanr`,`huxiu`]).optional(),rsshubRoute:Q().trim().max(1e3).optional(),rsshubConnectionId:CC.optional()}).superRefine((e,t)=>{e.provider===yC.Reddit&&!e.redditSubreddit?.trim()&&t.addIssue({code:`custom`,path:[`redditSubreddit`],message:`请填写 Reddit 子版块名称(如 LocalLLaMA)`}),e.provider===yC.Rsshub&&!e.rsshubRoute?.trim()&&t.addIssue({code:`custom`,path:[`rsshubRoute`],message:`请填写 RSSHub 路由(如 /github/trending/daily/any)`})}),zC=$({query:Q().trim().min(1).max(1e3),language:Q().trim().max(20).optional(),includeDomains:lC(Q().trim().min(1).max(200)).max(20).optional(),excludeDomains:lC(Q().trim().min(1).max(200)).max(20).optional(),preferredConnectionId:CC.optional()}),BC=$({platform:hC([`youtube-channel`,`bilibili-up`,`podcast-rss`]),target:Q().trim().min(1).max(2e3)}),VC=$({url:wC,useExtension:oC().optional()}),HC=$({url:wC,method:hC([`GET`,`POST`]).default(`GET`),headers:fC(Q().min(1).max(120),Q().max(2e3)).optional(),body:EC.optional(),itemsPath:Q().trim().max(300).optional(),titleField:Q().trim().min(1).max(200),urlField:Q().trim().min(1).max(200),summaryField:Q().trim().max(200).optional(),publishedAtField:Q().trim().max(200).optional(),scoreField:Q().trim().max(200).optional(),authorField:Q().trim().max(200).optional()}),UC=$({ingestToken:Q().trim().min(8).max(200).optional(),description:Q().trim().max(500).optional()});dC(`kind`,[FC.extend({kind:mC(vC.Rss),config:IC}),FC.extend({kind:mC(vC.SiteMonitor),config:LC}),FC.extend({kind:mC(vC.Feed),config:RC}),FC.extend({kind:mC(vC.Search),config:zC}),FC.extend({kind:mC(vC.MediaChannel),config:BC}),FC.extend({kind:mC(vC.Url),config:VC}),FC.extend({kind:mC(vC.CustomApi),config:HC}),FC.extend({kind:mC(vC.Webhook),config:UC})]),$({input:Q().trim().min(1).max(4e3)});var WC=$({title:Q().trim().min(1).max(500),url:wC,snippet:Q().trim().max(4e3).optional(),content:Q().trim().max(2e5).optional(),author:Q().trim().max(200).optional(),publishedAt:Q().trim().max(100).optional(),score:aC().finite().optional(),mediaType:hC([`webpage`,`document`,`video`,`audio`]).optional()});uC([WC,$({items:lC(WC).min(1).max(100)})]),$({opml:Q().trim().min(1).max(2e6),tags:lC(PC).max(20).default([])}),$({packId:CC}),$({revision:TC.optional(),name:Q().trim().min(1).max(120),enabled:oC(),identityId:CC,knowledgeBaseIds:lC(CC).max(50).default([]),sourceIds:lC(CC).max(100).default([]),sourceTags:lC(PC).max(30).default([]),emptySignalPolicy:hC([bC.Skip,bC.Force]).default(bC.Skip),connections:fC(Q().min(1).max(80),CC),agent:$({modelConnectionId:CC,strategyId:hC([xC.DailyBrief,xC.DeepAnalysis,xC.PracticalGuide]),toolConnectionIds:lC(CC).max(50).default([]),allowAdHocSearch:oC().default(!0),budget:$({maxTurns:aC().int().min(1).max(100).optional()}).optional()}).optional(),publishing:$({destinations:lC(jC).max(50)}).default({destinations:[]})}).superRefine((e,t)=>{let n=e.publishing.destinations.map(e=>`${e.accountId}:${e.publicationType}`);new Set(n).size!==n.length&&t.addIssue({code:`custom`,path:[`publishing`,`destinations`],message:`同一账号的发布类型不能重复添加`})}),$({revision:TC.optional(),name:Q().trim().min(1).max(120),enabled:oC().default(!0),channel:CC,connectorId:CC,settings:DC,credentials:DC.optional(),clearCredentials:lC(CC).max(50).optional(),publisher:$({toolConnectionIds:lC(CC).max(20).default([]),layouts:fC(CC,OC).optional(),writingStyles:fC(CC,kC).optional()}).optional()}).extend({accountId:CC.optional()}),$({revision:TC.optional(),name:Q().trim().min(1).max(120),enabled:oC(),contentPlanId:CC,instructions:Q().trim().max(4e3).optional(),keywords:lC(Q().trim().min(1).max(100)).max(50).default([]),trigger:dC(`type`,[$({type:mC(`manual`)}),$({type:mC(`schedule`),cron:Q().trim().min(1).max(120),timezone:Q().trim().min(1).max(120)}),$({type:mC(`hotspot`),query:Q().trim().min(1).max(500),intervalMinutes:aC().int().min(5).max(10080)}),$({type:mC(`api`),tokenName:Q().trim().max(120).optional()})])}),$({requestedTopic:Q().trim().min(1).max(500).optional()}),$({planId:CC,requestedTopic:Q().trim().min(1).max(500).optional()}),$({packageId:CC,destinations:lC(jC).min(1).max(50)}).superRefine((e,t)=>{let n=e.destinations.map(e=>`${e.accountId}:${e.publicationType}`);new Set(n).size!==n.length&&t.addIssue({code:`custom`,path:[`destinations`],message:`同一账号的发布类型不能重复添加`})}),$({id:CC}),$({jobId:CC}),$({channel:CC,publicationType:CC,page:gC.number().int().min(1).default(1),pageSize:gC.number().int().min(1).max(100).default(20)}),$({revision:TC}),$({id:CC,versionId:CC});var GC=Q().trim().min(1).max(300);$({profileId:GC}),$({sessionId:GC}),$({sessionId:GC,artifactId:GC}),$({sessionId:GC,turnId:GC}),$({profileId:GC,context:fC(cC()).default({})}),$({clientTurnId:GC,message:Q().max(2e4).optional(),answers:lC($({questionId:GC,selectedOptionIds:lC(GC).max(12).optional(),text:Q().max(1e4).optional(),urls:lC(Q().url().max(4e3)).max(10).optional(),confirmed:oC().optional(),skipped:oC().optional()})).max(3).optional()}).refine(e=>!!(e.message?.trim()||e.answers?.length),{message:`请输入消息或回答问题`}),$({contentPackageId:GC}),$({receipt:Q().min(1).max(2e4),name:Q().trim().min(1).max(120),description:Q().trim().max(500).optional(),templateId:GC.optional(),revision:TC.optional()}),$({beforeSequence:Q().optional(),afterSequence:Q().optional(),limit:Q().optional()}),$({afterSequence:Q().optional(),sessionId:Q().optional()});var KC=[{id:`all`,label:`全部`,description:`查看全部外部能力连接。`},{id:E9.Model,label:`模型与生成`,description:`对话、向量检索与图片生成模型连接。`},{id:E9.Source,label:`信息来源增强`,description:`配置需要 API Key 或自建地址的增强引擎(博查/Tavily/Firecrawl/Jina/RSSHub/Whisper);零配置内置采集能力无需建连接,已自动就绪。`},{id:E9.Notification,label:`通知推送`,description:`任务完成或需要关注时的外部提醒。`},{id:E9.Delivery,label:`发布扩展与网关`,description:`共享发布网关与扩展底座;单平台发布账号仍在「发布账号」中管理。`}];function qC(e){return e===E9.Model||e===E9.Source||e===E9.Notification||e===E9.Delivery?e:`all`}var JC=()=>[`connections`],YC=20;function XC(e=1,t=`all`){return Ra({queryKey:[...JC(),t,e],queryFn:()=>f0(e,YC,t)})}function ZC(){let e=Ca();return za({mutationFn:e=>h0(e),onSuccess:()=>e.invalidateQueries({queryKey:JC()})})}function QC(){let e=Ca();return za({mutationFn:({id:e,body:t})=>e?m0(e,t):p0(t),onSuccess:()=>e.invalidateQueries({queryKey:JC()})})}function $C(){return za({mutationFn:e=>g0(e)})}function ew({page:e,category:t=`all`,onPageChange:n,onCategoryChange:r}){let{data:i}=XC(e,t),[a,o]=(0,p.useState)(null),[s,c]=(0,p.useState)(!1),[l,u]=(0,p.useState)(t),[d,f]=(0,p.useState)(``),[m,h]=(0,p.useState)(null),[g,_]=(0,p.useState)(!1),[v,y]=(0,p.useState)(null),[b,x]=(0,p.useState)(!1),S=Ca(),C=X5();(0,p.useEffect)(()=>{(t===E9.Delivery||t===`all`)&&S9().then(h)},[t]);let w=async()=>{_(!0);try{let e=await _0(),t=window.location.origin,n=x9(t,e.ticket);if(y(n),(m?.detected?m:await S9(500))?.detected){let n=await C9(t,e.ticket);if(n.ok){U7.success(`浏览器扩展一键配对成功`,n.message??`已自动连接到节点「${e.nodeName}」`),await S.invalidateQueries({queryKey:JC()}),S9().then(h);return}U7.info(`已生成 60 秒配对码`,n.error??`请复制下方配对码粘贴到扩展「设置」页完成连接。`);return}await S.invalidateQueries({queryKey:JC()}),U7.success(`已生成 60 秒配对码`,`复制下方配对码粘贴到浏览器扩展「设置 → 60 秒配对码快速连接」即可立即连接。`)}catch(e){U7.error(`扩展一键配对失败`,e)}finally{_(!1)}},T=ZC(),E=i?.definitions??[],D=i?.items??[],O=i?.countsByCategory??{},ee=i?.totalAll??i?.total??0,k=(0,p.useMemo)(()=>new Map((i?.executorStatuses??[]).map(e=>[e.connectionId,e])),[i?.executorStatuses]),te=(0,p.useMemo)(()=>new Map(E.map(e=>[e.id,e])),[E]),ne=KC.find(e=>e.id===t)??KC[0],A=(0,p.useMemo)(()=>{let e=d.trim().toLowerCase();return E.filter(t=>l!==`all`&&t.category!==l?!1:!e||t.displayName.toLowerCase().includes(e)||t.description.toLowerCase().includes(e)||t.id.toLowerCase().includes(e)||t.capabilities.some(t=>t.toLowerCase().includes(e))||(t.group?.toLowerCase().includes(e)??!1))},[E,l,d]),re=(0,p.useMemo)(()=>{let e=new Map;for(let t of A){let n=t.group??KC.find(e=>e.id===t.category)?.label??`其他`,r=e.get(n)??[];r.push(t),e.set(n,r)}return[...e.entries()]},[A]);return(0,P.jsxs)(d9,{children:[(0,P.jsx)(G7,{}),(0,P.jsx)(`div`,{className:`overflow-hidden rounded-[var(--radius)] border border-[var(--border)] bg-[var(--surface)]`,children:(0,P.jsx)(`div`,{role:`tablist`,"aria-label":`连接器分类`,className:`flex min-h-11 items-stretch gap-1 overflow-x-auto px-3 sm:px-4`,children:KC.map(e=>{let n=e.id===t,i=e.id===`all`?ee:O[e.id]??0;return(0,P.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":n,className:U(`relative flex shrink-0 items-center gap-1.5 px-3 text-sm font-medium text-[var(--muted)] transition-colors duration-[var(--motion-fast)] hover:text-[var(--ink)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[var(--focus)]`,n&&`text-[var(--ink)]`),onClick:()=>r?.(e.id),children:[(0,P.jsx)(`span`,{children:e.label}),(0,P.jsx)(`span`,{className:`text-[11px] font-normal text-[var(--muted)]`,children:i}),n?(0,P.jsx)(Z5.span,{layoutId:`connections-category-indicator`,"aria-hidden":!0,className:`absolute inset-x-3 bottom-0 h-px bg-[var(--ink)]`,transition:{duration:C?0:.22,ease:[.16,1,.3,1]}}):null]},e.id)})})}),t===E9.Delivery?(0,P.jsxs)(`section`,{className:`grid gap-3 rounded-[var(--radius)] border border-[var(--border)] bg-[var(--surface)] p-4`,children:[(0,P.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-2`,children:[(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`h3`,{className:`text-sm font-semibold text-[var(--ink)]`,children:`TrendPublish Companion 浏览器扩展 · 零令牌一键配对`}),(0,P.jsx)(`p`,{className:`mt-0.5 text-xs leading-5 text-[var(--muted-strong)]`,children:m?.detected?`已检测到浏览器扩展 v${m.version}${m.connected&&m.nodeName?`(当前在线:${m.nodeName})`:``},点击下方按钮即可免填令牌自动配对。`:`安装官方扩展后即可免 API 同步知乎、掘金、小红书、B 站、抖音、公众号网页版等 20 个平台草稿箱;推荐配合 Ego 浏览器隔离多账号。`})]}),(0,P.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,P.jsxs)(F_,{variant:`primary`,size:`sm`,loading:g,onClick:()=>void w(),children:[!g&&(0,P.jsx)(x_,{className:`size-3.5`}),m?.detected?`一键配对浏览器扩展`:`生成 60 秒配对码`]}),(0,P.jsxs)(`a`,{href:y9,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex h-8 items-center gap-1.5 rounded-[var(--radius-sm)] border border-[var(--border)] bg-[var(--surface-2)] px-2.5 text-xs font-medium text-[var(--ink)] hover:bg-[var(--surface)]`,children:[(0,P.jsx)(__,{className:`size-3.5`}),`下载扩展 ZIP`]}),(0,P.jsxs)(`a`,{href:v9,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex h-8 items-center gap-1.5 rounded-[var(--radius-sm)] border border-[var(--border)] bg-[var(--surface-2)] px-2.5 text-xs font-medium text-[var(--ink)] hover:bg-[var(--surface)]`,children:[(0,P.jsx)(v_,{className:`size-3.5`}),`Ego 浏览器官网`]})]})]}),v?(0,P.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2 rounded-[var(--radius-sm)] border border-[var(--border)] bg-[var(--surface-2)] px-3 py-2 text-xs`,children:[(0,P.jsx)(`code`,{className:`truncate font-mono text-[11px] text-[var(--ink)]`,children:v}),(0,P.jsxs)(F_,{variant:`ghost`,size:`sm`,onClick:()=>{navigator.clipboard?.writeText(v),x(!0),window.setTimeout(()=>x(!1),1800)},children:[b?(0,P.jsx)(u_,{className:`size-3.5`}):(0,P.jsx)(g_,{className:`size-3.5`}),b?`已复制`:`复制 60 秒配对码`]})]}):null]}):null,(0,P.jsx)(c9,{title:t===`all`?`连接列表`:`${ne.label}连接`,description:t===`all`?`超时、重试与恢复不属于连接配置;调用失败会由运行记录和检查点安全处理。`:ne.description,compact:!0,summary:`共 ${i?.total??0} 个连接`,action:(0,P.jsxs)(F_,{variant:`primary`,onClick:()=>{u(t),f(``),c(!0)},children:[(0,P.jsx)(w_,{className:`size-4`}),`新建连接`]}),empty:!D.length,pagination:(0,P.jsx)(f9,{page:e,pageSize:YC,total:i?.total??0,onChange:n}),children:D.map(e=>{let t=te.get(e.connectorId),n=k.get(e.id),r=n?.platforms.filter(e=>e.loggedIn).length??0,i=n?.accounts?.length??0;return(0,P.jsx)(l9,{title:e.name,description:`${t?.displayName??e.connectorId} · ${t?.description??``}`,status:e.enabled?`ready`:`disabled`,meta:(0,P.jsxs)(`span`,{className:`flex flex-wrap gap-1`,children:[e.connectorId===`browser-extension`?(0,P.jsx)(H7,{tone:n?.online?`success`:`neutral`,children:n?.online?`扩展在线 · ${r} 平台 · ${i} 隔离账号`:`等待扩展配对`}):null,t?.capabilities.map(e=>(0,P.jsx)(H7,{children:e},e))]}),onEdit:()=>t&&o({definition:t,connection:e}),deleteDescription:`删除后无法恢复;正在被方案或账号使用时不会删除。`,onDelete:()=>T.mutateAsync(e.id)},e.id)})}),(0,P.jsx)(O7,{open:s,onOpenChange:c,title:`选择 Connector`,description:`按分类筛选或搜索外部能力连接器;单平台发布账号请在「发布账号」中新增。`,size:`medium`,children:(0,P.jsxs)(`div`,{className:`grid gap-3`,children:[(0,P.jsxs)(`div`,{className:`relative`,children:[(0,P.jsx)(E_,{"aria-hidden":!0,className:`pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-[var(--muted)]`}),(0,P.jsx)(Q5,{value:d,onChange:e=>f(e.target.value),placeholder:`搜索连接器名称或能力…`,className:`pl-9`,"aria-label":`搜索连接器`})]}),(0,P.jsx)(`div`,{role:`tablist`,"aria-label":`选择连接器分类`,className:`flex items-stretch gap-1 overflow-x-auto border-b border-[var(--border)]`,children:KC.map(e=>{let t=e.id===l,n=e.id===`all`?E.length:E.filter(t=>t.category===e.id).length;return(0,P.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":t,className:U(`shrink-0 border-b-2 px-2.5 pb-2 text-xs font-medium transition-colors`,t?`border-[var(--ink)] text-[var(--ink)]`:`border-transparent text-[var(--muted)] hover:text-[var(--ink)]`),onClick:()=>u(e.id),children:[e.label,` (`,n,`)`]},e.id)})}),re.length?(0,P.jsx)(`div`,{className:`grid max-h-[52vh] gap-4 overflow-y-auto pr-1`,children:re.map(([e,t])=>(0,P.jsxs)(`section`,{className:`grid gap-1`,children:[(0,P.jsx)(`h4`,{className:`px-2 text-[11px] font-medium text-[var(--muted)]`,children:e}),(0,P.jsx)(`div`,{className:`divide-y divide-[var(--border)]`,children:t.map(e=>(0,P.jsxs)(`button`,{type:`button`,className:`grid w-full gap-1 rounded-[var(--radius-sm)] px-2 py-3 text-left transition-colors duration-[var(--duration-fast)] hover:bg-[var(--overlay)]`,onClick:()=>{o({definition:e,suggestedName:h9(e.displayName,D.map(e=>e.name))})},children:[(0,P.jsxs)(`span`,{className:`flex flex-wrap items-center gap-2 text-sm font-semibold`,children:[e.displayName,(0,P.jsx)(`span`,{className:`flex flex-wrap gap-1`,children:e.capabilities.map(e=>(0,P.jsx)(H7,{children:e},e))})]}),(0,P.jsx)(`span`,{className:`text-xs leading-5 text-[var(--muted-strong)]`,children:e.description})]},e.id))})]},e))}):(0,P.jsx)(`p`,{className:`py-8 text-center text-xs text-[var(--muted)]`,children:`没有匹配的连接器,试试切换分类或清空搜索词。`})]})}),(0,P.jsx)(tw,{editor:a,onOpenChange:e=>!e&&o(null),onSaved:()=>{o(null),c(!1)}})]})}function tw({editor:e,onOpenChange:t,onSaved:n}){let[r,i]=(0,p.useState)(``),[a,o]=(0,p.useState)(!0),[s,c]=(0,p.useState)({}),[l,u]=(0,p.useState)([]),[d,f]=(0,p.useState)(`{}`),[m,h]=(0,p.useState)(`{}`),[g,_]=(0,p.useState)(`{}`),[v,y]=(0,p.useState)(!1),[b,x]=(0,p.useState)();(0,p.useEffect)(()=>{if(!e)return;i(e.connection?.name??e.suggestedName??e.definition.displayName),o(e.connection?.enabled??!0);let t=Object.fromEntries(e.definition.fields.filter(e=>e.defaultValue!==void 0).map(e=>[e.key,e.defaultValue]));c({...t,...e.connection?.settings}),u([]),f(JSON.stringify(e.connection?.overrides?.headers??{},null,2)),h(JSON.stringify(e.connection?.overrides?.query??{},null,2)),_(JSON.stringify(e.connection?.overrides?.body??{},null,2)),y(!1),x(void 0)},[e]);let S=(e,t)=>{c(n=>({...n,[e.key]:t})),e.location===`credentials`&&typeof t==`string`&&t.trim()&&u(t=>t.filter(t=>t!==e.key))},C=e=>{u(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]),c(t=>({...t,[e]:``}))},w=()=>({id:e?.connection?.id,revision:e?.connection?.revision,connectorId:e.definition.id,name:r.trim(),enabled:a,settings:Object.fromEntries(e.definition.fields.filter(e=>e.location===`settings`).map(e=>[e.key,s[e.key]]).filter(([,e])=>e!==void 0&&e!==``)),credentials:Object.fromEntries(e.definition.fields.filter(e=>e.location===`credentials`).map(e=>[e.key,s[e.key]]).filter(([,e])=>e!==void 0&&e!==``)),...l.length?{clearCredentials:l}:{},overrides:e.definition.requestOverrides?{headers:rw(d,`Headers`),query:rw(m,`Query`),body:rw(g,`Body`)}:void 0}),T=QC(),E=$C();if(!e)return null;let D=[...e.definition.fields].sort((e,t)=>(e.order??0)-(t.order??0)),O=D.filter(e=>e.defaultValue===void 0),ee=D.filter(e=>e.defaultValue!==void 0),k=D.some(t=>{if(!t.required)return!1;let n=s[t.key];return n!==void 0&&n!==``?!1:!(t.location===`credentials`&&e.connection?.credentialState[t.key])});return(0,P.jsxs)(O7,{open:!0,onOpenChange:t,title:e.connection?`编辑连接`:`新建连接`,description:`${e.definition.displayName} · ${e.definition.capabilities.join(` / `)}`,size:`medium`,children:[(0,P.jsxs)(`div`,{className:`grid gap-4`,children:[!e.connection&&(e.definition.id===`openai-compatible`||e.definition.id===`gemini`)?(0,P.jsxs)(`div`,{className:`grid gap-2 rounded-[var(--radius-sm)] border border-[var(--border)] bg-[var(--surface-2)] p-3`,children:[(0,P.jsx)(`span`,{className:`text-xs font-medium text-[var(--ink)]`,children:`快捷填充主流服务商预设(选完后只需粘贴 API Key)`}),(0,P.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:w9.filter(t=>t.connectorId===e.definition.id).map(e=>(0,P.jsxs)(`button`,{type:`button`,onClick:()=>{i(e.connectionName),c(t=>({...t,...e.connectorId===`gemini`?{apiHost:e.endpointUrl,model:e.defaultModel}:{baseUrl:e.endpointUrl,model:e.defaultModel}})),x(void 0)},className:`rounded border border-[var(--border)] bg-[var(--surface)] px-2.5 py-1 text-xs font-medium text-[var(--ink)] transition-colors hover:border-[var(--ink)]`,children:[e.label,(0,P.jsx)(`span`,{className:`ml-1.5 text-[10px] font-normal text-[var(--muted)]`,children:e.badge})]},e.id))})]}):null,(0,P.jsx)(`div`,{className:`grid gap-4`,children:O.map(t=>(0,P.jsx)(nw,{field:t,value:s[t.key],hasStoredCredential:!!e.connection?.credentialState[t.key],clearingCredential:l.includes(t.key),onToggleClearCredential:t.location===`credentials`&&!t.required?()=>C(t.key):void 0,onChange:e=>S(t,e)},`${t.location}:${t.key}`))}),(0,P.jsxs)(`details`,{className:`group border-t border-[var(--border)] pt-4`,open:v,onToggle:e=>y(e.currentTarget.open),children:[(0,P.jsxs)(`summary`,{className:`cursor-pointer list-none text-sm font-medium text-[var(--muted-strong)] hover:text-[var(--ink)]`,children:[`高级设置`,(0,P.jsx)(`span`,{className:`ml-2 text-xs font-normal text-[var(--muted)]`,children:`名称、状态与接口参数`})]}),(0,P.jsxs)(`div`,{className:`mt-4 grid gap-4`,children:[(0,P.jsxs)(`div`,{className:`grid gap-4 md:grid-cols-[1fr_auto]`,children:[(0,P.jsx)(X7,{label:`连接名称`,required:!0,children:(0,P.jsx)(Q5,{value:r,onChange:e=>i(e.target.value)})}),(0,P.jsx)(X7,{label:`状态`,children:(0,P.jsx)(u7,{className:`min-h-11`,checked:a,onCheckedChange:o,label:`启用`})})]}),ee.length?(0,P.jsx)(`div`,{className:`grid gap-4 md:grid-cols-2`,children:ee.map(t=>(0,P.jsx)(nw,{field:t,value:s[t.key],hasStoredCredential:!!e.connection?.credentialState[t.key],clearingCredential:l.includes(t.key),onToggleClearCredential:t.location===`credentials`&&!t.required?()=>C(t.key):void 0,onChange:e=>S(t,e)},`${t.location}:${t.key}`))}):null,e.definition.requestOverrides?(0,P.jsxs)(`details`,{className:`border-t border-[var(--border)] pt-4`,children:[(0,P.jsxs)(`summary`,{className:`cursor-pointer list-none text-sm font-medium`,children:[`请求覆盖`,(0,P.jsx)(`span`,{className:`ml-2 text-xs font-normal text-[var(--muted)]`,children:`Headers · Query · Body`})]}),(0,P.jsx)(`p`,{className:`mt-2 text-xs leading-5 text-[var(--muted-strong)]`,children:`仅用于特殊接入;认证保留字段不能覆盖。`}),(0,P.jsxs)(`div`,{className:`mt-4 grid gap-4`,children:[(0,P.jsx)(X7,{label:`Headers`,children:(0,P.jsx)(d7,{className:`min-h-32 font-mono text-xs`,value:d,onChange:e=>f(e.target.value)})}),(0,P.jsx)(X7,{label:`Query`,children:(0,P.jsx)(d7,{className:`min-h-32 font-mono text-xs`,value:m,onChange:e=>h(e.target.value)})}),(0,P.jsx)(X7,{label:`Body`,children:(0,P.jsx)(d7,{className:`min-h-32 font-mono text-xs`,value:g,onChange:e=>_(e.target.value)})})]})]}):null]})]}),b?(0,P.jsxs)(`div`,{role:`status`,"aria-live":`polite`,className:`rounded border px-3 py-2 text-xs ${b.success?`border-[var(--success-border)] bg-[var(--success-bg)] text-[var(--success)]`:`border-[var(--danger-border)] bg-[var(--danger-bg)] text-[var(--danger)]`}`,children:[b.message,` · `,b.latencyMs,` ms`]}):null,(0,P.jsx)(q_,{error:T.error??E.error})]}),(0,P.jsxs)(k7,{className:`flex justify-between gap-2`,children:[(0,P.jsxs)(F_,{loading:E.isPending,disabled:k,onClick:()=>{x(void 0);try{E.mutate(w(),{onSuccess:e=>{x(e.test),e.test.success?U7.success(`连接测试成功`,`${e.test.message} · ${e.test.latencyMs} ms`):U7.error(`连接测试失败`,e.test.message)},onError:e=>U7.error(`连接测试失败`,e)})}catch(e){x({success:!1,message:J_(e),latencyMs:0}),U7.error(`连接测试失败`,e)}},children:[!E.isPending&&(0,P.jsx)(y_,{className:`size-4`}),`测试连接`]}),(0,P.jsxs)(`div`,{className:`flex gap-2`,children:[(0,P.jsx)(F_,{onClick:()=>t(!1),children:`取消`}),(0,P.jsx)(F_,{variant:`primary`,loading:T.isPending,disabled:!r.trim()||k,onClick:()=>T.mutate({id:e.connection?.id,body:w()},{onSuccess:()=>{n(),U7.success(`连接已保存`,`“${r.trim()}”可以用于 Agent。`)},onError:e=>U7.error(`保存连接失败`,e)}),children:`保存连接`})]})]})]})}function nw({field:e,value:t,hasStoredCredential:n,clearingCredential:r=!1,onToggleClearCredential:i,onChange:a}){let o=e.location===`credentials`&&!e.required&&n&&i;return(0,P.jsx)(X7,{label:e.label,required:e.required,helper:e.description,children:e.input===`boolean`?(0,P.jsx)(u7,{className:`min-h-11`,checked:!!t,onCheckedChange:e=>a(e),label:`启用`}):e.input===`select`?(0,P.jsx)(s7,{value:iw(t),onChange:e=>a(e.target.value),children:e.options?.map(e=>(0,P.jsx)(`option`,{value:e.value,children:e.label},e.value))}):(0,P.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,P.jsx)(Q5,{type:e.input===`password`?`password`:e.input===`number`?`number`:e.input===`url`?`url`:`text`,value:iw(t),placeholder:n&&!r?`留空保留已有值`:e.placeholder,onChange:t=>a(e.input===`number`?Number(t.target.value):t.target.value)}),o?(0,P.jsxs)(`div`,{className:`flex items-center justify-between gap-2 text-xs text-[var(--muted-strong)]`,children:[(0,P.jsx)(`span`,{children:r?`保存后将清除已存密钥`:`已保存密钥`}),(0,P.jsx)(`button`,{type:`button`,className:`font-medium text-[var(--accent)] hover:underline`,onClick:i,children:r?`撤销清除`:`清除已保存值`})]}):null]})})}function rw(e,t){let n=JSON.parse(e||`{}`);if(!n||typeof n!=`object`||Array.isArray(n))throw Error(`${t} 必须是 JSON 对象`);return n}function iw(e){return typeof e==`string`||typeof e==`number`?String(e):``}var aw=Yr(`/_app/connections`)({validateSearch:e=>{let t=qC(e.category);return{page:Math.max(1,Number(e.page??1)||1),...t===`all`?{}:{category:t}}},component:Xr(()=>B1(()=>import(`./connections-BTXTwVZi.js`),[]),`component`)}),ow=(e=1,t=20)=>u0(c0.api[`content-plans`].$get({query:{page:String(e),pageSize:String(t)}})),sw=e=>u0(c0.api[`content-plans`].$post({json:e})),cw=(e,t)=>u0(c0.api[`content-plans`][`:id`].$patch({param:{id:e},json:t})),lw=e=>u0(c0.api[`content-plans`][`:id`].$delete({param:{id:e}})),uw=()=>B1(()=>import(`./content-plans-D6yuDh9V.js`),__vite__mapDeps([17,14,12])),dw=()=>[`content-plans`],fw=Yr(`/_app/content-plans`)({validateSearch:e=>({page:Number(e.page??1)||1}),component:Xr(uw,`component`)}),pw=(e=1,t=20)=>u0(c0.api.identities.$get({query:{page:String(e),pageSize:String(t)}})),mw=e=>u0(c0.api.identities.$post({json:e})),hw=(e,t)=>u0(c0.api.identities[`:id`].$patch({param:{id:e},json:t})),gw=e=>u0(c0.api.identities[`:id`].$delete({param:{id:e}})),_w=()=>B1(()=>import(`./identities-QxZaI_E_.js`),__vite__mapDeps([18,1])),vw=()=>[`identities`],yw=Yr(`/_app/identities`)({validateSearch:e=>({page:Number(e.page??1)||1}),component:Xr(_w,`component`)}),bw=()=>B1(()=>import(`./jobs-ChEmSaQx.js`),__vite__mapDeps([19,20,21,22,11])),xw=()=>[`runs`],Sw=Yr(`/_app/jobs`)({validateSearch:e=>({page:Number(e.page??1)||1}),component:Xr(bw,`component`)}),Cw=(e=1,t=20)=>u0(c0.api[`knowledge-bases`].$get({query:{page:String(e),pageSize:String(t)}})),ww=e=>u0(c0.api[`knowledge-bases`].$post({json:e})),Tw=(e,t)=>u0(c0.api[`knowledge-bases`][`:id`].$patch({param:{id:e},json:t})),Ew=e=>u0(c0.api[`knowledge-bases`][`:id`].$delete({param:{id:e}})),Dw=()=>B1(()=>import(`./knowledge-CRTKmAlZ.js`),__vite__mapDeps([23,1,24])),Ow=()=>[`knowledge-bases`],kw=Yr(`/_app/knowledge`)({validateSearch:e=>({page:Number(e.page??1)||1}),component:Xr(Dw,`component`)}),Aw=Yr(`/_app/library`)({validateSearch:e=>({page:Math.max(1,Number(e.page??1)||1)}),component:Xr(()=>B1(()=>import(`./library-D9UGRwnB.js`),__vite__mapDeps([25,1,26,15,12,27,28,22,11])),`component`)}),jw=Yr(`/_app/publishing`)({validateSearch:e=>({page:Math.max(1,Number(e.page??1)||1),channel:typeof e.channel==`string`?e.channel:void 0}),component:Xr(()=>B1(()=>import(`./publishing-B-ep_uLv.js`),__vite__mapDeps([29,1,12,30,2,9,4,31,32,33,34])),`component`)}),Mw=Yr(`/_app/settings`)({component:Xr(()=>B1(()=>import(`./settings-ClPaRCaX.js`),__vite__mapDeps([35,12])),`component`)}),Nw=(e=1,t=20,n={})=>u0(c0.api.sources.$get({query:{page:String(e),pageSize:String(t),...n.tag?{tag:n.tag}:{},...n.kind&&n.kind!==`all`?{kind:n.kind}:{},...n.q?.trim()?{q:n.q.trim()}:{}}})),Pw=e=>u0(c0.api.sources.$post({json:e})),Fw=(e,t)=>u0(c0.api.sources[`:id`].$patch({param:{id:e},json:t})),Iw=e=>u0(c0.api.sources[`:id`].$delete({param:{id:e}})),Lw=e=>u0(c0.api.sources.probe.$post({json:{input:e}})),Rw=e=>u0(c0.api.sources.preview.$post({json:e})),zw=e=>u0(c0.api.sources[`:id`].preview.$post({param:{id:e}})),Bw=e=>u0(c0.api.sources[`:id`].signals.$get({param:{id:e}})),Vw=e=>u0(c0.api.sources.packs.apply.$post({json:{packId:e}})),Hw=(e,t=[])=>u0(c0.api.sources[`import-opml`].$post({json:{opml:e,tags:t}})),Uw=e=>u0(c0.api.sources.consumed.$get({query:e?.trim()?{q:e.trim()}:{}})),Ww=e=>u0(c0.api.sources.consumed[`:id`].$delete({param:{id:e}})),Gw=()=>u0(c0.api.sources.consumed.$delete()),Kw=()=>B1(()=>import(`./sources-GeyaDXk5.js`),__vite__mapDeps([36,1,12,37,38,39,33])),qw=()=>[`sources`],Jw=Yr(`/_app/sources`)({validateSearch:e=>({page:Number(e.page??1)||1}),component:Xr(Kw,`component`)}),Yw=Yr(`/_app/workspace`)({component:Xr(()=>B1(()=>import(`./workspace-DGrhaBe1.js`),__vite__mapDeps([40,10,1,11,12,2,41])),`component`)}),Xw=Yr(`/_app/content-plans_/new`)({component:Xr(()=>B1(()=>import(`./content-plans_.new-C8shQP9y.js`),__vite__mapDeps([42,43,1,3,12,15,44,41,8,31,6,27,32,33,34,20,21,45,46,14,38,39,11,28,22,13,26])),`component`)}),Zw=Yr(`/_app/jobs_/$runId`)({component:Xr(()=>B1(()=>import(`./jobs_._runId-CfjxSQt9.js`),__vite__mapDeps([47,45,1,46,14,38,39,20,21,15,31,11,28,22,13,26])),`component`)}),Qw=Yr(`/_app/publishing_/styles`)({validateSearch:e=>({page:Math.max(1,Number(e.page??1)||1),channel:typeof e.channel==`string`?e.channel:void 0}),component:Xr(()=>B1(()=>import(`./publishing_.styles-BvhTRB2V.js`),__vite__mapDeps([48,1,33,12])),`component`)}),$w=Yr(`/_app/publishing_/templates`)({validateSearch:e=>({page:Math.max(1,Number(e.page??1)||1),channel:typeof e.channel==`string`?e.channel:void 0,publicationType:typeof e.publicationType==`string`?e.publicationType:void 0}),component:Xr(()=>B1(()=>import(`./publishing_.templates-DxInNuCT.js`),__vite__mapDeps([49,1,12,50,34,30,2,46,14,24,37,5,39,26,31,15,44,21])),`component`)}),eT=Yr(`/_app/content-plans_/$planId/edit`)({component:Xr(()=>B1(()=>import(`./content-plans_._planId.edit-C8shQP9y.js`),__vite__mapDeps([51,43,1,3,12,15,44,41,8,31,6,27,32,33,34,20,21,45,46,14,38,39,11,28,22,13,26])),`component`)}),tT=Yr(`/_app/publishing_/templates_/sessions/$sessionId`)({validateSearch:e=>({channel:typeof e.channel==`string`?e.channel:``,publicationType:typeof e.publicationType==`string`?e.publicationType:`article`,page:Math.max(1,Number(e.page??1)||1)}),component:Xr(()=>B1(()=>import(`./publishing_.templates_.sessions._sessionId-Cp76DzJU.js`),__vite__mapDeps([52,50,1,34,30,2,46,14,24,37,5,39,26,31,12,15,44,21])),`component`)}),nT=V1.update({id:`/`,path:`/`,getParentRoute:()=>N1}),rT=W1.update({id:`/_app`,getParentRoute:()=>N1}),iT={AppAutomationsRoute:G1.update({id:`/automations`,path:`/automations`,getParentRoute:()=>rT}),AppConnectionsRoute:aw.update({id:`/connections`,path:`/connections`,getParentRoute:()=>rT}),AppContentPlansRoute:fw.update({id:`/content-plans`,path:`/content-plans`,getParentRoute:()=>rT}),AppIdentitiesRoute:yw.update({id:`/identities`,path:`/identities`,getParentRoute:()=>rT}),AppJobsRoute:Sw.update({id:`/jobs`,path:`/jobs`,getParentRoute:()=>rT}),AppKnowledgeRoute:kw.update({id:`/knowledge`,path:`/knowledge`,getParentRoute:()=>rT}),AppLibraryRoute:Aw.update({id:`/library`,path:`/library`,getParentRoute:()=>rT}),AppPublishingRoute:jw.update({id:`/publishing`,path:`/publishing`,getParentRoute:()=>rT}),AppSettingsRoute:Mw.update({id:`/settings`,path:`/settings`,getParentRoute:()=>rT}),AppSourcesRoute:Jw.update({id:`/sources`,path:`/sources`,getParentRoute:()=>rT}),AppWorkspaceRoute:Yw.update({id:`/workspace`,path:`/workspace`,getParentRoute:()=>rT}),AppContentPlansNewRoute:Xw.update({id:`/content-plans_/new`,path:`/content-plans/new`,getParentRoute:()=>rT}),AppJobsRunIdRoute:Zw.update({id:`/jobs_/$runId`,path:`/jobs/$runId`,getParentRoute:()=>rT}),AppPublishingStylesRoute:Qw.update({id:`/publishing_/styles`,path:`/publishing/styles`,getParentRoute:()=>rT}),AppPublishingTemplatesRoute:$w.update({id:`/publishing_/templates`,path:`/publishing/templates`,getParentRoute:()=>rT}),AppContentPlansPlanIdEditRoute:eT.update({id:`/content-plans_/$planId/edit`,path:`/content-plans/$planId/edit`,getParentRoute:()=>rT}),AppPublishingTemplatesSessionsSessionIdRoute:tT.update({id:`/publishing_/templates_/sessions/$sessionId`,path:`/publishing/templates/sessions/$sessionId`,getParentRoute:()=>rT})},aT={IndexRoute:nT,AppRoute:rT._addFileChildren(iT)},oT=fi({routeTree:N1._addFileChildren(aT)._addFileTypes(),basepath:`/dashboard/`,defaultPreload:`intent`});function sT(){(0,Ba.createRoot)(document.getElementById(`root`)).render((0,P.jsx)(p.StrictMode,{children:(0,P.jsx)(M1,{children:(0,P.jsx)(hi,{router:oT})})}))}sT();export{v9 as $,oo as $n,q_ as $t,yw as A,ip as An,i7 as At,ow as B,ac as Bn,b0 as Bt,Ow as C,Xg as Cn,v7 as Ct,Tw as D,U as Dn,s7 as Dt,Cw as E,$g as En,u7 as Et,hw as F,Tc as Fn,X5 as Ft,SC as G,_s as Gn,f0 as Gt,aw as H,Is as Hn,v0 as Ht,fw as I,yc as In,$8 as It,vC as J,Fo as Jn,u0 as Jt,bC as K,ls as Kn,g0 as Kt,dw as L,nc as Ln,Q8 as Lt,mw as M,$f as Mn,t7 as Mt,gw as N,Ul as Nn,Q5 as Nt,Sw as O,qg as On,$5 as Ot,pw as P,Pl as Pn,Z5 as Pt,T9 as Q,To as Qn,Z_ as Qt,sw as R,ic as Rn,p3 as Rt,kw as S,Yg as Sn,y7 as St,Ew as T,Qg as Tn,l7 as Tt,ew as U,Ms as Un,p0 as Ut,cw as V,Ws as Vn,y0 as Vt,xC as W,Ds as Wn,_0 as Wt,k9 as X,Ao as Xn,G1 as Xt,O9 as Y,Mo as Yn,d0 as Yt,w9 as Z,wo as Zn,W1 as Zt,zw as _,p_ as _n,k7 as _t,Jw as a,O_ as an,Ca as ar,f9 as at,jw as b,u_ as bn,m7 as bt,Gw as c,T_ as cn,Or as cr,l9 as ct,Iw as d,x_ as dn,xr as dr,U7 as dt,J_ as en,ro as er,y9 as et,Hw as f,y_ as fn,yr as fr,H7 as ft,Rw as g,h_ as gn,O7 as gt,Nw as h,g_ as hn,o as hr,I7 as ht,Zw as i,A_ as in,Ra as ir,S9 as it,vw as j,cp as jn,n7 as jt,xw as k,np as kn,r7 as kt,Pw as l,w_ as ln,Dr as lr,n9 as lt,Bw as m,__ as mn,Ln as mr,L7 as mt,$w as n,I_ as nn,Ka as nr,x9 as nt,qw as o,D_ as on,oi as or,d9 as ot,Uw as p,v_ as pn,Kn as pr,z7 as pt,yC as q,Xo as qn,c0 as qt,Qw as r,P_ as rn,za as rr,C9 as rt,Vw as s,E_ as sn,Ur as sr,c9 as st,tT as t,F_ as tn,Qa as tr,b9 as tt,Ww as u,S_ as un,Tr as ur,X7 as ut,Lw as v,f_ as vn,S7 as vt,ww as w,e_ as wn,d7 as wt,Aw as x,l_ as xn,g7 as xt,Fw as y,d_ as yn,f7 as yt,lw as z,oc as zn,x0 as zt};