adminizer 4.6.0-build.220 → 4.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/{add-UbYCOEiH.js → add-BlvzWQKF.js} +1 -1
- package/assets/{add-group-B9JLJ-Va.js → add-group-1Uoq9NWe.js} +1 -1
- package/assets/{add-user-XpnnP6H3.js → add-user-BQCAsaRy.js} +1 -1
- package/assets/{app-layout-eaqKl80J.js → app-layout-CAm60qoE.js} +1 -1
- package/assets/{app-sidebar-D7JH6Mij.js → app-sidebar-CfaYbnSy.js} +1 -1
- package/assets/app.js +2 -2
- package/assets/{catalog-BcRt4ROd.js → catalog-k5myk7fk.js} +1 -1
- package/assets/{dashboard-BtOlwyEq.js → dashboard-BkL9ybBw.js} +1 -1
- package/assets/{form-CPqj1jmF.js → form-DJapG3qF.js} +1 -1
- package/assets/{history-Dd6SJZpb.js → history-CluyR-yJ.js} +1 -1
- package/assets/{home-JmQxKJUy.js → home-Dug9zBzM.js} +2 -2
- package/assets/{list-BKkw1gD-.js → list-CuexshNt.js} +1 -1
- package/assets/manifest.json +26 -26
- package/assets/{module-BC9jG3ya.js → module-Cd4Tm6uq.js} +1 -1
- package/assets/{notification-Coh8e4AC.js → notification-D64qvni-.js} +1 -1
- package/assets/{welcome-R6Ht32h7.js → welcome-PDp-gUei.js} +1 -1
- package/helpers/runtimeMode.d.ts +1 -0
- package/helpers/runtimeMode.js +3 -0
- package/helpers/viteHelper.js +2 -1
- package/lib/Adminizer.js +2 -1
- package/lib/widgets/widgetHandler.js +2 -2
- package/package.json +7 -7
- package/system/bindInertia.js +2 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as m,C as dc,E as hc,a as fc,L as Fe,b as Pe,S as jr,c as _r,d as Br,e as Fr,f as zr,g as sn,B as Ee,P as Ao,h as W,I as lr,D as pc,i as gc,k as mc,l as jn,u as vc,r as Bi,t as Fi,m as _n,T as yc,n as bc,o as xc,p as Tc,q as Sc,s as wc,v as Dc,w as Cc,x as Ec,y as Pc,z as Oc,A as Ic,F as jt}from"./app.js";import{A as Ac}from"./app-layout-
|
|
1
|
+
import{j as m,C as dc,E as hc,a as fc,L as Fe,b as Pe,S as jr,c as _r,d as Br,e as Fr,f as zr,g as sn,B as Ee,P as Ao,h as W,I as lr,D as pc,i as gc,k as mc,l as jn,u as vc,r as Bi,t as Fi,m as _n,T as yc,n as bc,o as xc,p as Tc,q as Sc,s as wc,v as Dc,w as Cc,x as Ec,y as Pc,z as Oc,A as Ic,F as jt}from"./app.js";import{A as Ac}from"./app-layout-CAm60qoE.js";import{r as v,e as z}from"./handsontable-PxYdjN8c.js";import{g as Mc,r as Rc,e as kc}from"./jsoneditor-De1FvcYu.js";import on from"./material-icon-DMT8KdmE.js";import{D as Nc}from"./del-modal-BoyXZloG.js";import{A as _t}from"./RelationDialogStack-D9UVEF9s.js";import"./monaco-BhBYtg3d.js";import"./app-shell-QWCtn9ye.js";import"./app-sidebar-CfaYbnSy.js";import"./nav-main-BctqyzeV.js";import"./app-sidebar-header-BsPFDhZ8.js";import"./breadcrumbs-CZZirDj8.js";import"./nav-user-Bn1Lt-BZ.js";import"./user-info-DtBK5Kh8.js";import"./user-menu-content-0XYOCMaA.js";import"./theme-switcher-DfExsHW2.js";import"./icon-DfDLMG5f.js";import"./dynamic-controls-k61T9W2P.js";import"./input-error-DuuqFgZa.js";function Mo(t){let e=null;return()=>(e==null&&(e=t()),e)}function Lc(t,e){return t.filter(n=>n!==e)}function Vc(t,e){const n=new Set,r=s=>n.add(s);t.forEach(r),e.forEach(r);const i=[];return n.forEach(s=>i.push(s)),i}class jc{enter(e){const n=this.entered.length,r=i=>this.isNodeInDocument(i)&&(!i.contains||i.contains(e));return this.entered=Vc(this.entered.filter(r),[e]),n===0&&this.entered.length>0}leave(e){const n=this.entered.length;return this.entered=Lc(this.entered.filter(this.isNodeInDocument),e),n>0&&this.entered.length===0}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}}class _c{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null}})})}loadDataTransfer(e){if(e){const n={};Object.keys(this.config.exposeProperties).forEach(r=>{const i=this.config.exposeProperties[r];i!=null&&(n[r]={value:i(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,n)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,n){return n===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}}const Ro="__NATIVE_FILE__",ko="__NATIVE_URL__",No="__NATIVE_TEXT__",Lo="__NATIVE_HTML__",zi=Object.freeze(Object.defineProperty({__proto__:null,FILE:Ro,HTML:Lo,TEXT:No,URL:ko},Symbol.toStringTag,{value:"Module"}));function Bn(t,e,n){const r=e.reduce((i,s)=>i||t.getData(s),"");return r??n}const cr={[Ro]:{exposeProperties:{files:t=>Array.prototype.slice.call(t.files),items:t=>t.items,dataTransfer:t=>t},matchesTypes:["Files"]},[Lo]:{exposeProperties:{html:(t,e)=>Bn(t,e,""),dataTransfer:t=>t},matchesTypes:["Html","text/html"]},[ko]:{exposeProperties:{urls:(t,e)=>Bn(t,e,"").split(`
|
|
2
2
|
`),dataTransfer:t=>t},matchesTypes:["Url","text/uri-list"]},[No]:{exposeProperties:{text:(t,e)=>Bn(t,e,""),dataTransfer:t=>t},matchesTypes:["Text","text/plain"]}};function Bc(t,e){const n=cr[t];if(!n)throw new Error(`native type ${t} has no configuration`);const r=new _c(n);return r.loadDataTransfer(e),r}function Fn(t){if(!t)return null;const e=Array.prototype.slice.call(t.types||[]);return Object.keys(cr).filter(n=>{const r=cr[n];return r!=null&&r.matchesTypes?r.matchesTypes.some(i=>e.indexOf(i)>-1):!1})[0]||null}const Fc=Mo(()=>/firefox/i.test(navigator.userAgent)),Vo=Mo(()=>!!window.safari);class Ui{interpolate(e){const{xs:n,ys:r,c1s:i,c2s:s,c3s:o}=this;let a=n.length-1;if(e===n[a])return r[a];let l=0,c=o.length-1,u;for(;l<=c;){u=Math.floor(.5*(l+c));const f=n[u];if(f<e)l=u+1;else if(f>e)c=u-1;else return r[u]}a=Math.max(0,c);const d=e-n[a],h=d*d;return r[a]+i[a]*d+s[a]*h+o[a]*d*h}constructor(e,n){const{length:r}=e,i=[];for(let f=0;f<r;f++)i.push(f);i.sort((f,p)=>e[f]<e[p]?-1:1);const s=[],o=[];let a,l;for(let f=0;f<r-1;f++)a=e[f+1]-e[f],l=n[f+1]-n[f],s.push(a),o.push(l/a);const c=[o[0]];for(let f=0;f<s.length-1;f++){const p=o[f],g=o[f+1];if(p*g<=0)c.push(0);else{a=s[f];const b=s[f+1],y=a+b;c.push(3*y/((y+b)/p+(y+a)/g))}}c.push(o[o.length-1]);const u=[],d=[];let h;for(let f=0;f<c.length-1;f++){h=o[f];const p=c[f],g=1/s[f],b=p+c[f+1]-h-h;u.push((h-p-b)*g),d.push(b*g*g)}this.xs=e,this.ys=n,this.c1s=c,this.c2s=u,this.c3s=d}}const zc=1;function jo(t){const e=t.nodeType===zc?t:t.parentElement;if(!e)return null;const{top:n,left:r}=e.getBoundingClientRect();return{x:r,y:n}}function Bt(t){return{x:t.clientX,y:t.clientY}}function Uc(t){var e;return t.nodeName==="IMG"&&(Fc()||!(!((e=document.documentElement)===null||e===void 0)&&e.contains(t)))}function Hc(t,e,n,r){let i=t?e.width:n,s=t?e.height:r;return Vo()&&t&&(s/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:s}}function $c(t,e,n,r,i){const s=Uc(e),a=jo(s?t:e),l={x:n.x-a.x,y:n.y-a.y},{offsetWidth:c,offsetHeight:u}=t,{anchorX:d,anchorY:h}=r,{dragPreviewWidth:f,dragPreviewHeight:p}=Hc(s,e,c,u),g=()=>{let O=new Ui([0,.5,1],[l.y,l.y/u*p,l.y+p-u]).interpolate(h);return Vo()&&s&&(O+=(window.devicePixelRatio-1)*p),O},b=()=>new Ui([0,.5,1],[l.x,l.x/c*f,l.x+f-c]).interpolate(d),{offsetX:y,offsetY:T}=i,S=y===0||y,C=T===0||T;return{x:S?y:b(),y:C?T:g()}}let Wc=class{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var e;return!((e=this.globalContext)===null||e===void 0)&&e.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var e;return((e=this.optionsArgs)===null||e===void 0?void 0:e.rootElement)||this.window}constructor(e,n){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=n}};function Gc(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Hi(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){Gc(t,i,n[i])})}return t}class qc{profile(){var e,n;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((e=this.dragStartSourceIds)===null||e===void 0?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((n=this.dragOverTargetIds)===null||n===void 0?void 0:n.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const e=this.rootElement;if(e!==void 0){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){const e=this.rootElement;if(e!==void 0&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var n;(n=this.window)===null||n===void 0||n.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(e,n,r){return this.sourcePreviewNodeOptions.set(e,r),this.sourcePreviewNodes.set(e,n),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,n,r){this.sourceNodes.set(e,n),this.sourceNodeOptions.set(e,r);const i=o=>this.handleDragStart(o,e),s=o=>this.handleSelectStart(o);return n.setAttribute("draggable","true"),n.addEventListener("dragstart",i),n.addEventListener("selectstart",s),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),n.removeEventListener("dragstart",i),n.removeEventListener("selectstart",s),n.setAttribute("draggable","false")}}connectDropTarget(e,n){const r=o=>this.handleDragEnter(o,e),i=o=>this.handleDragOver(o,e),s=o=>this.handleDrop(o,e);return n.addEventListener("dragenter",r),n.addEventListener("dragover",i),n.addEventListener("drop",s),()=>{n.removeEventListener("dragenter",r),n.removeEventListener("dragover",i),n.removeEventListener("drop",s)}}addEventListeners(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const e=this.monitor.getSourceId(),n=this.sourceNodeOptions.get(e);return Hi({dropEffect:this.altKeyPressed?"copy":"move"},n||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const e=this.monitor.getSourceId(),n=this.sourcePreviewNodeOptions.get(e);return Hi({anchorX:.5,anchorY:.5,captureDraggingState:!1},n||{})}isDraggingNativeItem(){const e=this.monitor.getItemType();return Object.keys(zi).some(n=>zi[n]===e)}beginDragNativeItem(e,n){this.clearCurrentDragSourceNode(),this.currentNativeSource=Bc(e,n),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e;const n=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var r;return(r=this.rootElement)===null||r===void 0?void 0:r.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},n)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var e;(e=this.window)===null||e===void 0||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,n){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(n))}handleDragEnter(e,n){this.dragEnterTargetIds.unshift(n)}handleDragOver(e,n){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(n)}handleDrop(e,n){this.dropTargetIds.unshift(n)}constructor(e,n,r){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=i=>{const s=this.sourceNodes.get(i);return s&&jo(s)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=i=>!!(i&&this.document&&this.document.body&&this.document.body.contains(i)),this.endDragIfSourceWasRemovedFromDOM=()=>{const i=this.currentDragSourceNode;i==null||this.isNodeInDocument(i)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=i=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(i||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=i=>{if(i.defaultPrevented)return;const{dragStartSourceIds:s}=this;this.dragStartSourceIds=null;const o=Bt(i);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(s||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:o});const{dataTransfer:a}=i,l=Fn(a);if(this.monitor.isDragging()){if(a&&typeof a.setDragImage=="function"){const u=this.monitor.getSourceId(),d=this.sourceNodes.get(u),h=this.sourcePreviewNodes.get(u)||d;if(h){const{anchorX:f,anchorY:p,offsetX:g,offsetY:b}=this.getCurrentSourcePreviewNodeOptions(),S=$c(d,h,o,{anchorX:f,anchorY:p},{offsetX:g,offsetY:b});a.setDragImage(h,S.x,S.y)}}try{a==null||a.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(i.target);const{captureDraggingState:c}=this.getCurrentSourcePreviewNodeOptions();c?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(l)this.beginDragNativeItem(l);else{if(a&&!a.types&&(i.target&&!i.target.hasAttribute||!i.target.hasAttribute("draggable")))return;i.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=i=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var s;(s=this.currentNativeSource)===null||s===void 0||s.loadDataTransfer(i.dataTransfer)}if(!this.enterLeaveCounter.enter(i.target)||this.monitor.isDragging())return;const{dataTransfer:a}=i,l=Fn(a);l&&this.beginDragNativeItem(l,a)},this.handleTopDragEnter=i=>{const{dragEnterTargetIds:s}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=i.altKey,s.length>0&&this.actions.hover(s,{clientOffset:Bt(i)}),s.some(a=>this.monitor.canDropOnTarget(a))&&(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=i=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var s;(s=this.currentNativeSource)===null||s===void 0||s.loadDataTransfer(i.dataTransfer)}},this.handleTopDragOver=i=>{const{dragOverTargetIds:s}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none");return}this.altKeyPressed=i.altKey,this.lastClientOffset=Bt(i),this.scheduleHover(s),(s||[]).some(a=>this.monitor.canDropOnTarget(a))?(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?i.preventDefault():(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=i=>{this.isDraggingNativeItem()&&i.preventDefault(),this.enterLeaveCounter.leave(i.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=i=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var s;i.preventDefault(),(s=this.currentNativeSource)===null||s===void 0||s.loadDataTransfer(i.dataTransfer)}else Fn(i.dataTransfer)&&i.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=i=>{const{dropTargetIds:s}=this;this.dropTargetIds=[],this.actions.hover(s,{clientOffset:Bt(i)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=i=>{const s=i.target;typeof s.dragDrop=="function"&&(s.tagName==="INPUT"||s.tagName==="SELECT"||s.tagName==="TEXTAREA"||s.isContentEditable||(i.preventDefault(),s.dragDrop()))},this.options=new Wc(n,r),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new jc(this.isNodeInDocument)}}let Ft;function Kc(){return Ft||(Ft=new Image,Ft.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),Ft}const Xc=function(e,n,r){return new qc(e,n,r)};var ze=[],Yc=function(){return ze.some(function(t){return t.activeTargets.length>0})},Zc=function(){return ze.some(function(t){return t.skippedTargets.length>0})},$i="ResizeObserver loop completed with undelivered notifications.",Jc=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:$i}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=$i),window.dispatchEvent(t)},Dt;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Dt||(Dt={}));var Ue=function(t){return Object.freeze(t)},Qc=(function(){function t(e,n){this.inlineSize=e,this.blockSize=n,Ue(this)}return t})(),_o=(function(){function t(e,n,r,i){return this.x=e,this.y=n,this.width=r,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Ue(this)}return t.prototype.toJSON=function(){var e=this,n=e.x,r=e.y,i=e.top,s=e.right,o=e.bottom,a=e.left,l=e.width,c=e.height;return{x:n,y:r,top:i,right:s,bottom:o,left:a,width:l,height:c}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t})(),Ur=function(t){return t instanceof SVGElement&&"getBBox"in t},Bo=function(t){if(Ur(t)){var e=t.getBBox(),n=e.width,r=e.height;return!n&&!r}var i=t,s=i.offsetWidth,o=i.offsetHeight;return!(s||o||t.getClientRects().length)},Wi=function(t){var e;if(t instanceof Element)return!0;var n=(e=t==null?void 0:t.ownerDocument)===null||e===void 0?void 0:e.defaultView;return!!(n&&t instanceof n.Element)},eu=function(t){switch(t.tagName){case"INPUT":if(t.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},vt=typeof window<"u"?window:{},zt=new WeakMap,Gi=/auto|scroll/,tu=/^tb|vertical/,nu=/msie|trident/i.test(vt.navigator&&vt.navigator.userAgent),pe=function(t){return parseFloat(t||"0")},Qe=function(t,e,n){return t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=!1),new Qc((n?e:t)||0,(n?t:e)||0)},qi=Ue({devicePixelContentBoxSize:Qe(),borderBoxSize:Qe(),contentBoxSize:Qe(),contentRect:new _o(0,0,0,0)}),Fo=function(t,e){if(e===void 0&&(e=!1),zt.has(t)&&!e)return zt.get(t);if(Bo(t))return zt.set(t,qi),qi;var n=getComputedStyle(t),r=Ur(t)&&t.ownerSVGElement&&t.getBBox(),i=!nu&&n.boxSizing==="border-box",s=tu.test(n.writingMode||""),o=!r&&Gi.test(n.overflowY||""),a=!r&&Gi.test(n.overflowX||""),l=r?0:pe(n.paddingTop),c=r?0:pe(n.paddingRight),u=r?0:pe(n.paddingBottom),d=r?0:pe(n.paddingLeft),h=r?0:pe(n.borderTopWidth),f=r?0:pe(n.borderRightWidth),p=r?0:pe(n.borderBottomWidth),g=r?0:pe(n.borderLeftWidth),b=d+c,y=l+u,T=g+f,S=h+p,C=a?t.offsetHeight-S-t.clientHeight:0,D=o?t.offsetWidth-T-t.clientWidth:0,O=i?b+T:0,N=i?y+S:0,A=r?r.width:pe(n.width)-O-D,U=r?r.height:pe(n.height)-N-C,_=A+b+D+T,J=U+y+C+S,de=Ue({devicePixelContentBoxSize:Qe(Math.round(A*devicePixelRatio),Math.round(U*devicePixelRatio),s),borderBoxSize:Qe(_,J,s),contentBoxSize:Qe(A,U,s),contentRect:new _o(d,l,A,U)});return zt.set(t,de),de},zo=function(t,e,n){var r=Fo(t,n),i=r.borderBoxSize,s=r.contentBoxSize,o=r.devicePixelContentBoxSize;switch(e){case Dt.DEVICE_PIXEL_CONTENT_BOX:return o;case Dt.BORDER_BOX:return i;default:return s}},ru=(function(){function t(e){var n=Fo(e);this.target=e,this.contentRect=n.contentRect,this.borderBoxSize=Ue([n.borderBoxSize]),this.contentBoxSize=Ue([n.contentBoxSize]),this.devicePixelContentBoxSize=Ue([n.devicePixelContentBoxSize])}return t})(),Uo=function(t){if(Bo(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},iu=function(){var t=1/0,e=[];ze.forEach(function(o){if(o.activeTargets.length!==0){var a=[];o.activeTargets.forEach(function(c){var u=new ru(c.target),d=Uo(c.target);a.push(u),c.lastReportedSize=zo(c.target,c.observedBox),d<t&&(t=d)}),e.push(function(){o.callback.call(o.observer,a,o.observer)}),o.activeTargets.splice(0,o.activeTargets.length)}});for(var n=0,r=e;n<r.length;n++){var i=r[n];i()}return t},Ki=function(t){ze.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(i){i.isActive()&&(Uo(i.target)>t?n.activeTargets.push(i):n.skippedTargets.push(i))})})},su=function(){var t=0;for(Ki(t);Yc();)t=iu(),Ki(t);return Zc()&&Jc(),t>0},zn,Ho=[],ou=function(){return Ho.splice(0).forEach(function(t){return t()})},au=function(t){if(!zn){var e=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return ou()}).observe(n,r),zn=function(){n.textContent="".concat(e?e--:e++)}}Ho.push(t),zn()},lu=function(t){au(function(){requestAnimationFrame(t)})},Xt=0,cu=function(){return!!Xt},uu=250,du={attributes:!0,characterData:!0,childList:!0,subtree:!0},Xi=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Yi=function(t){return t===void 0&&(t=0),Date.now()+t},Un=!1,hu=(function(){function t(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return t.prototype.run=function(e){var n=this;if(e===void 0&&(e=uu),!Un){Un=!0;var r=Yi(e);lu(function(){var i=!1;try{i=su()}finally{if(Un=!1,e=r-Yi(),!cu())return;i?n.run(1e3):e>0?n.run(e):n.start()}})}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var e=this,n=function(){return e.observer&&e.observer.observe(document.body,du)};document.body?n():vt.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Xi.forEach(function(n){return vt.addEventListener(n,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),Xi.forEach(function(n){return vt.removeEventListener(n,e.listener,!0)}),this.stopped=!0)},t})(),ur=new hu,Zi=function(t){!Xt&&t>0&&ur.start(),Xt+=t,!Xt&&ur.stop()},fu=function(t){return!Ur(t)&&!eu(t)&&getComputedStyle(t).display==="inline"},pu=(function(){function t(e,n){this.target=e,this.observedBox=n||Dt.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=zo(this.target,this.observedBox,!0);return fu(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t})(),gu=(function(){function t(e,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=n}return t})(),Ut=new WeakMap,Ji=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},Ht=(function(){function t(){}return t.connect=function(e,n){var r=new gu(e,n);Ut.set(e,r)},t.observe=function(e,n,r){var i=Ut.get(e),s=i.observationTargets.length===0;Ji(i.observationTargets,n)<0&&(s&&ze.push(i),i.observationTargets.push(new pu(n,r&&r.box)),Zi(1),ur.schedule())},t.unobserve=function(e,n){var r=Ut.get(e),i=Ji(r.observationTargets,n),s=r.observationTargets.length===1;i>=0&&(s&&ze.splice(ze.indexOf(r),1),r.observationTargets.splice(i,1),Zi(-1))},t.disconnect=function(e){var n=this,r=Ut.get(e);r.observationTargets.slice().forEach(function(i){return n.unobserve(e,i.target)}),r.activeTargets.splice(0,r.activeTargets.length)},t})(),mu=(function(){function t(e){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof e!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Ht.connect(this,e)}return t.prototype.observe=function(e,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Wi(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Ht.observe(this,e,n)},t.prototype.unobserve=function(e){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Wi(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Ht.unobserve(this,e)},t.prototype.disconnect=function(){Ht.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t})();const $o=v.createContext({});function vu(t){const e=v.useRef(null);return e.current===null&&(e.current=t()),e.current}const Hr=v.createContext(null),Wo=v.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function yu(t=!0){const e=v.useContext(Hr);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=e,s=v.useId();v.useEffect(()=>{t&&i(s)},[t]);const o=v.useCallback(()=>t&&r&&r(s),[s,r,t]);return!n&&r?[!1,o]:[!0]}const $r=typeof window<"u",bu=$r?v.useLayoutEffect:v.useEffect,te=t=>t;let Go=te;function Wr(t){let e;return()=>(e===void 0&&(e=t()),e)}const et=(t,e,n)=>{const r=e-t;return r===0?1:(n-t)/r},ye=t=>t*1e3,be=t=>t/1e3,xu={useManualTiming:!1};function Tu(t){let e=new Set,n=new Set,r=!1,i=!1;const s=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(c){s.has(c)&&(l.schedule(c),t()),c(o)}const l={schedule:(c,u=!1,d=!1)=>{const f=d&&r?e:n;return u&&s.add(c),f.has(c)||f.add(c),c},cancel:c=>{n.delete(c),s.delete(c)},process:c=>{if(o=c,r){i=!0;return}r=!0,[e,n]=[n,e],e.forEach(a),e.clear(),r=!1,i&&(i=!1,l.process(c))}};return l}const $t=["read","resolveKeyframes","update","preRender","render","postRender"],Su=40;function qo(t,e){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=$t.reduce((y,T)=>(y[T]=Tu(s),y),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:h}=o,f=()=>{const y=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(y-i.timestamp,Su),1),i.timestamp=y,i.isProcessing=!0,a.process(i),l.process(i),c.process(i),u.process(i),d.process(i),h.process(i),i.isProcessing=!1,n&&e&&(r=!1,t(f))},p=()=>{n=!0,r=!0,i.isProcessing||t(f)};return{schedule:$t.reduce((y,T)=>{const S=o[T];return y[T]=(C,D=!1,O=!1)=>(n||p(),S.schedule(C,D,O)),y},{}),cancel:y=>{for(let T=0;T<$t.length;T++)o[$t[T]].cancel(y)},state:i,steps:o}}const{schedule:B,cancel:Ie,state:K,steps:Hn}=qo(typeof requestAnimationFrame<"u"?requestAnimationFrame:te,!0),Ko=v.createContext({strict:!1}),Qi={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"]},tt={};for(const t in Qi)tt[t]={isEnabled:e=>Qi[t].some(n=>!!e[n])};function wu(t){for(const e in t)tt[e]={...tt[e],...t[e]}}const Du=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","ignoreStrict","viewport"]);function an(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Du.has(t)}let Xo=t=>!an(t);function Cu(t){t&&(Xo=e=>e.startsWith("on")?!an(e):t(e))}try{Cu(require("@emotion/is-prop-valid").default)}catch{}function Eu(t,e,n){const r={};for(const i in t)i==="values"&&typeof t.values=="object"||(Xo(i)||n===!0&&an(i)||!e&&!an(i)||t.draggable&&i.startsWith("onDrag"))&&(r[i]=t[i]);return r}function Pu(t){if(typeof Proxy>"u")return t;const e=new Map,n=(...r)=>t(...r);return new Proxy(n,{get:(r,i)=>i==="create"?t:(e.has(i)||e.set(i,t(i)),e.get(i))})}const gn=v.createContext({});function Ct(t){return typeof t=="string"||Array.isArray(t)}function mn(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const Gr=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],qr=["initial",...Gr];function vn(t){return mn(t.animate)||qr.some(e=>Ct(t[e]))}function Yo(t){return!!(vn(t)||t.variants)}function Ou(t,e){if(vn(t)){const{initial:n,animate:r}=t;return{initial:n===!1||Ct(n)?n:void 0,animate:Ct(r)?r:void 0}}return t.inherit!==!1?e:{}}function Iu(t){const{initial:e,animate:n}=Ou(t,v.useContext(gn));return v.useMemo(()=>({initial:e,animate:n}),[es(e),es(n)])}function es(t){return Array.isArray(t)?t.join(" "):t}const Au=Symbol.for("motionComponentSymbol");function Ke(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Mu(t,e,n){return v.useCallback(r=>{r&&t.onMount&&t.onMount(r),e&&(r?e.mount(r):e.unmount()),n&&(typeof n=="function"?n(r):Ke(n)&&(n.current=r))},[e])}const Kr=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Ru="framerAppearId",Zo="data-"+Kr(Ru),{schedule:Xr}=qo(queueMicrotask,!1),Jo=v.createContext({});function ku(t,e,n,r,i){var s,o;const{visualElement:a}=v.useContext(gn),l=v.useContext(Ko),c=v.useContext(Hr),u=v.useContext(Wo).reducedMotion,d=v.useRef(null);r=r||l.renderer,!d.current&&r&&(d.current=r(t,{visualState:e,parent:a,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));const h=d.current,f=v.useContext(Jo);h&&!h.projection&&i&&(h.type==="html"||h.type==="svg")&&Nu(d.current,n,i,f);const p=v.useRef(!1);v.useInsertionEffect(()=>{h&&p.current&&h.update(n,c)});const g=n[Zo],b=v.useRef(!!g&&!(!((s=window.MotionHandoffIsComplete)===null||s===void 0)&&s.call(window,g))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,g)));return bu(()=>{h&&(p.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),Xr.render(h.render),b.current&&h.animationState&&h.animationState.animateChanges())}),v.useEffect(()=>{h&&(!b.current&&h.animationState&&h.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var y;(y=window.MotionHandoffMarkAsComplete)===null||y===void 0||y.call(window,g)}),b.current=!1))}),h}function Nu(t,e,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Qo(t.parent)),t.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&Ke(a),visualElement:t,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function Qo(t){if(t)return t.options.allowProjection!==!1?t.projection:Qo(t.parent)}function Lu({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:r,Component:i}){var s,o;t&&wu(t);function a(c,u){let d;const h={...v.useContext(Wo),...c,layoutId:Vu(c)},{isStatic:f}=h,p=Iu(c),g=r(c,f);if(!f&&$r){ju();const b=_u(h);d=b.MeasureLayout,p.visualElement=ku(i,g,h,e,b.ProjectionNode)}return m.jsxs(gn.Provider,{value:p,children:[d&&p.visualElement?m.jsx(d,{visualElement:p.visualElement,...h}):null,n(i,c,Mu(g,p.visualElement,u),g,f,p.visualElement)]})}a.displayName=`motion.${typeof i=="string"?i:`create(${(o=(s=i.displayName)!==null&&s!==void 0?s:i.name)!==null&&o!==void 0?o:""})`}`;const l=v.forwardRef(a);return l[Au]=i,l}function Vu({layoutId:t}){const e=v.useContext($o).id;return e&&t!==void 0?e+"-"+t:t}function ju(t,e){v.useContext(Ko).strict}function _u(t){const{drag:e,layout:n}=tt;if(!e&&!n)return{};const r={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const Bu=["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 Yr(t){return typeof t!="string"||t.includes("-")?!1:!!(Bu.indexOf(t)>-1||/[A-Z]/u.test(t))}function ts(t){const e=[{},{}];return t==null||t.values.forEach((n,r)=>{e[0][r]=n.get(),e[1][r]=n.getVelocity()}),e}function Zr(t,e,n,r){if(typeof e=="function"){const[i,s]=ts(r);e=e(n!==void 0?n:t.custom,i,s)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,s]=ts(r);e=e(n!==void 0?n:t.custom,i,s)}return e}const dr=t=>Array.isArray(t),Fu=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),zu=t=>dr(t)?t[t.length-1]||0:t,Y=t=>!!(t&&t.getVelocity);function Yt(t){const e=Y(t)?t.get():t;return Fu(e)?e.toValue():e}function Uu({scrapeMotionValuesFromProps:t,createRenderState:e,onUpdate:n},r,i,s){const o={latestValues:Hu(r,i,s,t),renderState:e()};return n&&(o.onMount=a=>n({props:r,current:a,...o}),o.onUpdate=a=>n(a)),o}const ea=t=>(e,n)=>{const r=v.useContext(gn),i=v.useContext(Hr),s=()=>Uu(t,e,r,i);return n?s():vu(s)};function Hu(t,e,n,r){const i={},s=r(t,{});for(const h in s)i[h]=Yt(s[h]);let{initial:o,animate:a}=t;const l=vn(t),c=Yo(t);e&&c&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||o===!1;const d=u?a:o;if(d&&typeof d!="boolean"&&!mn(d)){const h=Array.isArray(d)?d:[d];for(let f=0;f<h.length;f++){const p=Zr(t,h[f]);if(p){const{transitionEnd:g,transition:b,...y}=p;for(const T in y){let S=y[T];if(Array.isArray(S)){const C=u?S.length-1:0;S=S[C]}S!==null&&(i[T]=S)}for(const T in g)i[T]=g[T]}}}return i}const rt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],We=new Set(rt),ta=t=>e=>typeof e=="string"&&e.startsWith(t),na=ta("--"),$u=ta("var(--"),Jr=t=>$u(t)?Wu.test(t.split("/*")[0].trim()):!1,Wu=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,ra=(t,e)=>e&&typeof t=="number"?e.transform(t):t,xe=(t,e,n)=>n>e?e:n<t?t:n,it={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Et={...it,transform:t=>xe(0,1,t)},Wt={...it,default:1},At=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),De=At("deg"),ge=At("%"),I=At("px"),Gu=At("vh"),qu=At("vw"),ns={...ge,parse:t=>ge.parse(t)/100,transform:t=>ge.transform(t*100)},Ku={borderWidth:I,borderTopWidth:I,borderRightWidth:I,borderBottomWidth:I,borderLeftWidth:I,borderRadius:I,radius:I,borderTopLeftRadius:I,borderTopRightRadius:I,borderBottomRightRadius:I,borderBottomLeftRadius:I,width:I,maxWidth:I,height:I,maxHeight:I,top:I,right:I,bottom:I,left:I,padding:I,paddingTop:I,paddingRight:I,paddingBottom:I,paddingLeft:I,margin:I,marginTop:I,marginRight:I,marginBottom:I,marginLeft:I,backgroundPositionX:I,backgroundPositionY:I},Xu={rotate:De,rotateX:De,rotateY:De,rotateZ:De,scale:Wt,scaleX:Wt,scaleY:Wt,scaleZ:Wt,skew:De,skewX:De,skewY:De,distance:I,translateX:I,translateY:I,translateZ:I,x:I,y:I,z:I,perspective:I,transformPerspective:I,opacity:Et,originX:ns,originY:ns,originZ:I},rs={...it,transform:Math.round},Qr={...Ku,...Xu,zIndex:rs,size:I,fillOpacity:Et,strokeOpacity:Et,numOctaves:rs},Yu={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Zu=rt.length;function Ju(t,e,n){let r="",i=!0;for(let s=0;s<Zu;s++){const o=rt[s],a=t[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=ra(a,Qr[o]);if(!l){i=!1;const u=Yu[o]||o;r+=`${u}(${c}) `}n&&(e[o]=c)}}return r=r.trim(),n?r=n(e,i?"":r):i&&(r="none"),r}function ei(t,e,n){const{style:r,vars:i,transformOrigin:s}=t;let o=!1,a=!1;for(const l in e){const c=e[l];if(We.has(l)){o=!0;continue}else if(na(l)){i[l]=c;continue}else{const u=ra(c,Qr[l]);l.startsWith("origin")?(a=!0,s[l]=u):r[l]=u}}if(e.transform||(o||n?r.transform=Ju(e,t.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=s;r.transformOrigin=`${l} ${c} ${u}`}}const Qu={offset:"stroke-dashoffset",array:"stroke-dasharray"},ed={offset:"strokeDashoffset",array:"strokeDasharray"};function td(t,e,n=1,r=0,i=!0){t.pathLength=1;const s=i?Qu:ed;t[s.offset]=I.transform(-r);const o=I.transform(e),a=I.transform(n);t[s.array]=`${o} ${a}`}function is(t,e,n){return typeof t=="string"?t:I.transform(e+n*t)}function nd(t,e,n){const r=is(e,t.x,t.width),i=is(n,t.y,t.height);return`${r} ${i}`}function ti(t,{attrX:e,attrY:n,attrScale:r,originX:i,originY:s,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(ei(t,c,d),u){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:f,dimensions:p}=t;h.transform&&(p&&(f.transform=h.transform),delete h.transform),p&&(i!==void 0||s!==void 0||f.transform)&&(f.transformOrigin=nd(p,i!==void 0?i:.5,s!==void 0?s:.5)),e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),o!==void 0&&td(h,o,a,l,!1)}const ni=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),ia=()=>({...ni(),attrs:{}}),ri=t=>typeof t=="string"&&t.toLowerCase()==="svg";function sa(t,{style:e,vars:n},r,i){Object.assign(t.style,e,i&&i.getProjectionStyles(r));for(const s in n)t.style.setProperty(s,n[s])}const oa=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"]);function aa(t,e,n,r){sa(t,e,void 0,r);for(const i in e.attrs)t.setAttribute(oa.has(i)?i:Kr(i),e.attrs[i])}const ln={};function rd(t){Object.assign(ln,t)}function la(t,{layout:e,layoutId:n}){return We.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!ln[t]||t==="opacity")}function ii(t,e,n){var r;const{style:i}=t,s={};for(const o in i)(Y(i[o])||e.style&&Y(e.style[o])||la(o,t)||((r=n==null?void 0:n.getValue(o))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(s[o]=i[o]);return s}function ca(t,e,n){const r=ii(t,e,n);for(const i in t)if(Y(t[i])||Y(e[i])){const s=rt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=t[i]}return r}function id(t,e){try{e.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{e.dimensions={x:0,y:0,width:0,height:0}}}const ss=["x","y","width","height","cx","cy","r"],sd={useVisualState:ea({scrapeMotionValuesFromProps:ca,createRenderState:ia,onUpdate:({props:t,prevProps:e,current:n,renderState:r,latestValues:i})=>{if(!n)return;let s=!!t.drag;if(!s){for(const a in i)if(We.has(a)){s=!0;break}}if(!s)return;let o=!e;if(e)for(let a=0;a<ss.length;a++){const l=ss[a];t[l]!==e[l]&&(o=!0)}o&&B.read(()=>{id(n,r),B.render(()=>{ti(r,i,ri(n.tagName),t.transformTemplate),aa(n,r)})})}})},od={useVisualState:ea({scrapeMotionValuesFromProps:ii,createRenderState:ni})};function ua(t,e,n){for(const r in e)!Y(e[r])&&!la(r,n)&&(t[r]=e[r])}function ad({transformTemplate:t},e){return v.useMemo(()=>{const n=ni();return ei(n,e,t),Object.assign({},n.vars,n.style)},[e])}function ld(t,e){const n=t.style||{},r={};return ua(r,n,t),Object.assign(r,ad(t,e)),r}function cd(t,e){const n={},r=ld(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=r,n}function ud(t,e,n,r){const i=v.useMemo(()=>{const s=ia();return ti(s,e,ri(r),t.transformTemplate),{...s.attrs,style:{...s.style}}},[e]);if(t.style){const s={};ua(s,t.style,t),i.style={...s,...i.style}}return i}function dd(t=!1){return(n,r,i,{latestValues:s},o)=>{const l=(Yr(n)?ud:cd)(r,s,o,n),c=Eu(r,typeof n=="string",t),u=n!==v.Fragment?{...c,...l,ref:i}:{},{children:d}=r,h=v.useMemo(()=>Y(d)?d.get():d,[d]);return v.createElement(n,{...u,children:h})}}function hd(t,e){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...Yr(r)?sd:od,preloadedFeatures:t,useRender:dd(i),createVisualElement:e,Component:r};return Lu(o)}}function da(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}function yn(t,e,n){const r=t.getProps();return Zr(r,e,n!==void 0?n:r.custom,t)}const fd=Wr(()=>window.ScrollTimeline!==void 0);class pd{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>"finished"in e?e.finished:e))}getAll(e){return this.animations[0][e]}setAll(e,n){for(let r=0;r<this.animations.length;r++)this.animations[r][e]=n}attachTimeline(e,n){const r=this.animations.map(i=>{if(fd()&&i.attachTimeline)return i.attachTimeline(e);if(typeof n=="function")return n(i)});return()=>{r.forEach((i,s)=>{i&&i(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let n=0;n<this.animations.length;n++)e=Math.max(e,this.animations[n].duration);return e}runAll(e){this.animations.forEach(n=>n[e]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class gd extends pd{then(e,n){return Promise.all(this.animations).then(e).catch(n)}}function si(t,e){return t?t[e]||t.default||t:void 0}const hr=2e4;function ha(t){let e=0;const n=50;let r=t.next(e);for(;!r.done&&e<hr;)e+=n,r=t.next(e);return e>=hr?1/0:e}function oi(t){return typeof t=="function"}function os(t,e){t.timeline=e,t.onfinish=null}const ai=t=>Array.isArray(t)&&typeof t[0]=="number",md={linearEasing:void 0};function vd(t,e){const n=Wr(t);return()=>{var r;return(r=md[e])!==null&&r!==void 0?r:n()}}const cn=vd(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),fa=(t,e,n=10)=>{let r="";const i=Math.max(Math.round(e/n),2);for(let s=0;s<i;s++)r+=t(et(0,i-1,s))+", ";return`linear(${r.substring(0,r.length-2)})`};function pa(t){return!!(typeof t=="function"&&cn()||!t||typeof t=="string"&&(t in fr||cn())||ai(t)||Array.isArray(t)&&t.every(pa))}const ht=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,fr={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ht([0,.65,.55,1]),circOut:ht([.55,0,1,.45]),backIn:ht([.31,.01,.66,-.59]),backOut:ht([.33,1.53,.69,.99])};function ga(t,e){if(t)return typeof t=="function"&&cn()?fa(t,e):ai(t)?ht(t):Array.isArray(t)?t.map(n=>ga(n,e)||fr.easeOut):fr[t]}const ue={x:!1,y:!1};function ma(){return ue.x||ue.y}function yd(t,e,n){var r;if(t instanceof Element)return[t];if(typeof t=="string"){let i=document;const s=(r=void 0)!==null&&r!==void 0?r:i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t)}function va(t,e){const n=yd(t),r=new AbortController,i={passive:!0,...e,signal:r.signal};return[n,i,()=>r.abort()]}function as(t){return e=>{e.pointerType==="touch"||ma()||t(e)}}function bd(t,e,n={}){const[r,i,s]=va(t,n),o=as(a=>{const{target:l}=a,c=e(a);if(typeof c!="function"||!l)return;const u=as(d=>{c(d),l.removeEventListener("pointerleave",u)});l.addEventListener("pointerleave",u,i)});return r.forEach(a=>{a.addEventListener("pointerenter",o,i)}),s}const ya=(t,e)=>e?t===e?!0:ya(t,e.parentElement):!1,li=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,xd=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Td(t){return xd.has(t.tagName)||t.tabIndex!==-1}const ft=new WeakSet;function ls(t){return e=>{e.key==="Enter"&&t(e)}}function $n(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Sd=(t,e)=>{const n=t.currentTarget;if(!n)return;const r=ls(()=>{if(ft.has(n))return;$n(n,"down");const i=ls(()=>{$n(n,"up")}),s=()=>$n(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",s,e)});n.addEventListener("keydown",r,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),e)};function cs(t){return li(t)&&!ma()}function wd(t,e,n={}){const[r,i,s]=va(t,n),o=a=>{const l=a.currentTarget;if(!cs(a)||ft.has(l))return;ft.add(l);const c=e(a),u=(f,p)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",h),!(!cs(f)||!ft.has(l))&&(ft.delete(l),typeof c=="function"&&c(f,{success:p}))},d=f=>{u(f,n.useGlobalTarget||ya(l,f.target))},h=f=>{u(f,!1)};window.addEventListener("pointerup",d,i),window.addEventListener("pointercancel",h,i)};return r.forEach(a=>{!Td(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0),(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),a.addEventListener("focus",c=>Sd(c,i),i)}),s}function Dd(t){return t==="x"||t==="y"?ue[t]?null:(ue[t]=!0,()=>{ue[t]=!1}):ue.x||ue.y?null:(ue.x=ue.y=!0,()=>{ue.x=ue.y=!1})}const ba=new Set(["width","height","top","left","right","bottom",...rt]);let Zt;function Cd(){Zt=void 0}const me={now:()=>(Zt===void 0&&me.set(K.isProcessing||xu.useManualTiming?K.timestamp:performance.now()),Zt),set:t=>{Zt=t,queueMicrotask(Cd)}};function ci(t,e){t.indexOf(e)===-1&&t.push(e)}function ui(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class di{constructor(){this.subscriptions=[]}add(e){return ci(this.subscriptions,e),()=>ui(this.subscriptions,e)}notify(e,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,r);else for(let s=0;s<i;s++){const o=this.subscriptions[s];o&&o(e,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function xa(t,e){return e?t*(1e3/e):0}const us=30,Ed=t=>!isNaN(parseFloat(t));class Pd{constructor(e,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const s=me.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=me.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Ed(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new di);const r=this.events[e].add(n);return e==="change"?()=>{r(),B.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=me.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>us)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,us);return xa(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),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.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Pt(t,e){return new Pd(t,e)}function Od(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Pt(n))}function Id(t,e){const n=yn(t,e);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=zu(s[o]);Od(t,o,a)}}function Ad(t){return!!(Y(t)&&t.add)}function pr(t,e){const n=t.getValue("willChange");if(Ad(n))return n.add(e)}function Ta(t){return t.props[Zo]}const Sa=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Md=1e-7,Rd=12;function kd(t,e,n,r,i){let s,o,a=0;do o=e+(n-e)/2,s=Sa(o,r,i)-t,s>0?n=o:e=o;while(Math.abs(s)>Md&&++a<Rd);return o}function Mt(t,e,n,r){if(t===e&&n===r)return te;const i=s=>kd(s,0,1,t,n);return s=>s===0||s===1?s:Sa(i(s),e,r)}const wa=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Da=t=>e=>1-t(1-e),Ca=Mt(.33,1.53,.69,.99),hi=Da(Ca),Ea=wa(hi),Pa=t=>(t*=2)<1?.5*hi(t):.5*(2-Math.pow(2,-10*(t-1))),fi=t=>1-Math.sin(Math.acos(t)),Oa=Da(fi),Ia=wa(fi),Aa=t=>/^0[^.\s]+$/u.test(t);function Nd(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Aa(t):!0}const yt=t=>Math.round(t*1e5)/1e5,pi=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ld(t){return t==null}const Vd=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,gi=(t,e)=>n=>!!(typeof n=="string"&&Vd.test(n)&&n.startsWith(t)||e&&!Ld(n)&&Object.prototype.hasOwnProperty.call(n,e)),Ma=(t,e,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match(pi);return{[t]:parseFloat(i),[e]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},jd=t=>xe(0,255,t),Wn={...it,transform:t=>Math.round(jd(t))},Be={test:gi("rgb","red"),parse:Ma("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+Wn.transform(t)+", "+Wn.transform(e)+", "+Wn.transform(n)+", "+yt(Et.transform(r))+")"};function _d(t){let e="",n="",r="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),r=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,r+=r,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const gr={test:gi("#"),parse:_d,transform:Be.transform},Xe={test:gi("hsl","hue"),parse:Ma("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+ge.transform(yt(e))+", "+ge.transform(yt(n))+", "+yt(Et.transform(r))+")"},X={test:t=>Be.test(t)||gr.test(t)||Xe.test(t),parse:t=>Be.test(t)?Be.parse(t):Xe.test(t)?Xe.parse(t):gr.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?Be.transform(t):Xe.transform(t)},Bd=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Fd(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(pi))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(Bd))===null||n===void 0?void 0:n.length)||0)>0}const Ra="number",ka="color",zd="var",Ud="var(",ds="${}",Hd=/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 Ot(t){const e=t.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=e.replace(Hd,l=>(X.test(l)?(r.color.push(s),i.push(ka),n.push(X.parse(l))):l.startsWith(Ud)?(r.var.push(s),i.push(zd),n.push(l)):(r.number.push(s),i.push(Ra),n.push(parseFloat(l))),++s,ds)).split(ds);return{values:n,split:a,indexes:r,types:i}}function Na(t){return Ot(t).values}function La(t){const{split:e,types:n}=Ot(t),r=e.length;return i=>{let s="";for(let o=0;o<r;o++)if(s+=e[o],i[o]!==void 0){const a=n[o];a===Ra?s+=yt(i[o]):a===ka?s+=X.transform(i[o]):s+=i[o]}return s}}const $d=t=>typeof t=="number"?0:t;function Wd(t){const e=Na(t);return La(t)(e.map($d))}const Ae={test:Fd,parse:Na,createTransformer:La,getAnimatableNone:Wd},Gd=new Set(["brightness","contrast","saturate","opacity"]);function qd(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(pi)||[];if(!r)return t;const i=n.replace(r,"");let s=Gd.has(e)?1:0;return r!==n&&(s*=100),e+"("+s+i+")"}const Kd=/\b([a-z-]*)\(.*?\)/gu,mr={...Ae,getAnimatableNone:t=>{const e=t.match(Kd);return e?e.map(qd).join(" "):t}},Xd={...Qr,color:X,backgroundColor:X,outlineColor:X,fill:X,stroke:X,borderColor:X,borderTopColor:X,borderRightColor:X,borderBottomColor:X,borderLeftColor:X,filter:mr,WebkitFilter:mr},mi=t=>Xd[t];function Va(t,e){let n=mi(t);return n!==mr&&(n=Ae),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Yd=new Set(["auto","none","0"]);function Zd(t,e,n){let r=0,i;for(;r<t.length&&!i;){const s=t[r];typeof s=="string"&&!Yd.has(s)&&Ot(s).values.length&&(i=t[r]),r++}if(i&&n)for(const s of e)t[s]=Va(n,i)}const hs=t=>t===it||t===I,fs=(t,e)=>parseFloat(t.split(", ")[e]),ps=(t,e)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return fs(i[1],e);{const s=r.match(/^matrix\((.+)\)$/u);return s?fs(s[1],t):0}},Jd=new Set(["x","y","z"]),Qd=rt.filter(t=>!Jd.has(t));function eh(t){const e=[];return Qd.forEach(n=>{const r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e}const nt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:ps(4,13),y:ps(5,14)};nt.translateX=nt.x;nt.translateY=nt.y;const He=new Set;let vr=!1,yr=!1;function ja(){if(yr){const t=Array.from(He).filter(r=>r.needsMeasurement),e=new Set(t.map(r=>r.element)),n=new Map;e.forEach(r=>{const i=eh(r);i.length&&(n.set(r,i),r.render())}),t.forEach(r=>r.measureInitialState()),e.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([s,o])=>{var a;(a=r.getValue(s))===null||a===void 0||a.set(o)})}),t.forEach(r=>r.measureEndState()),t.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}yr=!1,vr=!1,He.forEach(t=>t.complete()),He.clear()}function _a(){He.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(yr=!0)})}function th(){_a(),ja()}class vi{constructor(e,n,r,i,s,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=r,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(He.add(this),vr||(vr=!0,B.read(_a),B.resolveKeyframes(ja))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:r,motionValue:i}=this;for(let s=0;s<e.length;s++)if(e[s]===null)if(s===0){const o=i==null?void 0:i.get(),a=e[e.length-1];if(o!==void 0)e[0]=o;else if(r&&n){const l=r.readValue(n,a);l!=null&&(e[0]=l)}e[0]===void 0&&(e[0]=a),i&&o===void 0&&i.set(e[0])}else e[s]=e[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),He.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,He.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Ba=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),nh=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function rh(t){const e=nh.exec(t);if(!e)return[,];const[,n,r,i]=e;return[`--${n??r}`,i]}function Fa(t,e,n=1){const[r,i]=rh(t);if(!r)return;const s=window.getComputedStyle(e).getPropertyValue(r);if(s){const o=s.trim();return Ba(o)?parseFloat(o):o}return Jr(i)?Fa(i,e,n+1):i}const za=t=>e=>e.test(t),ih={test:t=>t==="auto",parse:t=>t},Ua=[it,I,ge,De,qu,Gu,ih],gs=t=>Ua.find(za(t));class Ha extends vi{constructor(e,n,r,i,s){super(e,n,r,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let c=e[l];if(typeof c=="string"&&(c=c.trim(),Jr(c))){const u=Fa(c,n.current);u!==void 0&&(e[l]=u),l===e.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!ba.has(r)||e.length!==2)return;const[i,s]=e,o=gs(i),a=gs(s);if(o!==a)if(hs(o)&&hs(a))for(let l=0;l<e.length;l++){const c=e[l];typeof c=="string"&&(e[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,r=[];for(let i=0;i<e.length;i++)Nd(e[i])&&r.push(i);r.length&&Zd(e,r,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:r}=this;if(!e||!e.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=nt[r](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(r,i).jump(i,!1)}measureEndState(){var e;const{element:n,name:r,unresolvedKeyframes:i}=this;if(!n||!n.current)return;const s=n.getValue(r);s&&s.jump(this.measuredOrigin,!1);const o=i.length-1,a=i[o];i[o]=nt[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((e=this.removedTransforms)===null||e===void 0)&&e.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const ms=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Ae.test(t)||t==="0")&&!t.startsWith("url("));function sh(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function oh(t,e,n,r){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const s=t[t.length-1],o=ms(i,e),a=ms(s,e);return!o||!a?!1:sh(t)||(n==="spring"||oi(n))&&r}const ah=t=>t!==null;function bn(t,{repeat:e,repeatType:n="loop"},r){const i=t.filter(ah),s=e&&n!=="loop"&&e%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const lh=40;class $a{constructor({autoplay:e=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=me.now(),this.options={autoplay:e,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:o,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>lh?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&th(),this._resolved}onKeyframesResolved(e,n){this.resolvedAt=me.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:s,delay:o,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!oh(e,r,i,s))if(o)this.options.duration=0;else{l&&l(bn(e,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const u=this.initPlayback(e,n);u!==!1&&(this._resolved={keyframes:e,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(e,n){return this.currentFinishedPromise.then(e,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}const H=(t,e,n)=>t+(e-t)*n;function Gn(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function ch({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,e/=100,n/=100;let i=0,s=0,o=0;if(!e)i=s=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=Gn(l,a,t+1/3),s=Gn(l,a,t),o=Gn(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function un(t,e){return n=>n>0?e:t}const qn=(t,e,n)=>{const r=t*t,i=n*(e*e-r)+r;return i<0?0:Math.sqrt(i)},uh=[gr,Be,Xe],dh=t=>uh.find(e=>e.test(t));function vs(t){const e=dh(t);if(!e)return!1;let n=e.parse(t);return e===Xe&&(n=ch(n)),n}const ys=(t,e)=>{const n=vs(t),r=vs(e);if(!n||!r)return un(t,e);const i={...n};return s=>(i.red=qn(n.red,r.red,s),i.green=qn(n.green,r.green,s),i.blue=qn(n.blue,r.blue,s),i.alpha=H(n.alpha,r.alpha,s),Be.transform(i))},hh=(t,e)=>n=>e(t(n)),Rt=(...t)=>t.reduce(hh),br=new Set(["none","hidden"]);function fh(t,e){return br.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function ph(t,e){return n=>H(t,e,n)}function yi(t){return typeof t=="number"?ph:typeof t=="string"?Jr(t)?un:X.test(t)?ys:vh:Array.isArray(t)?Wa:typeof t=="object"?X.test(t)?ys:gh:un}function Wa(t,e){const n=[...t],r=n.length,i=t.map((s,o)=>yi(s)(s,e[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function gh(t,e){const n={...t,...e},r={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(r[i]=yi(t[i])(t[i],e[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function mh(t,e){var n;const r=[],i={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const o=e.types[s],a=t.indexes[o][i[o]],l=(n=t.values[a])!==null&&n!==void 0?n:0;r[s]=l,i[o]++}return r}const vh=(t,e)=>{const n=Ae.createTransformer(e),r=Ot(t),i=Ot(e);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?br.has(t)&&!i.values.length||br.has(e)&&!r.values.length?fh(t,e):Rt(Wa(mh(r,i),i.values),n):un(t,e)};function Ga(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?H(t,e,n):yi(t)(t,e)}const yh=5;function qa(t,e,n){const r=Math.max(e-yh,0);return xa(n-t(r),e-r)}const $={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},Kn=.001;function bh({duration:t=$.duration,bounce:e=$.bounce,velocity:n=$.velocity,mass:r=$.mass}){let i,s,o=1-e;o=xe($.minDamping,$.maxDamping,o),t=xe($.minDuration,$.maxDuration,be(t)),o<1?(i=c=>{const u=c*o,d=u*t,h=u-n,f=xr(c,o),p=Math.exp(-d);return Kn-h/f*p},s=c=>{const d=c*o*t,h=d*n+n,f=Math.pow(o,2)*Math.pow(c,2)*t,p=Math.exp(-d),g=xr(Math.pow(c,2),o);return(-i(c)+Kn>0?-1:1)*((h-f)*p)/g}):(i=c=>{const u=Math.exp(-c*t),d=(c-n)*t+1;return-Kn+u*d},s=c=>{const u=Math.exp(-c*t),d=(n-c)*(t*t);return u*d});const a=5/t,l=Th(i,s,a);if(t=ye(t),isNaN(l))return{stiffness:$.stiffness,damping:$.damping,duration:t};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:o*2*Math.sqrt(r*c),duration:t}}}const xh=12;function Th(t,e,n){let r=n;for(let i=1;i<xh;i++)r=r-t(r)/e(r);return r}function xr(t,e){return t*Math.sqrt(1-e*e)}const Sh=["duration","bounce"],wh=["stiffness","damping","mass"];function bs(t,e){return e.some(n=>t[n]!==void 0)}function Dh(t){let e={velocity:$.velocity,stiffness:$.stiffness,damping:$.damping,mass:$.mass,isResolvedFromDuration:!1,...t};if(!bs(t,wh)&&bs(t,Sh))if(t.visualDuration){const n=t.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*xe(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:$.mass,stiffness:i,damping:s}}else{const n=bh(t);e={...e,...n,mass:$.mass},e.isResolvedFromDuration=!0}return e}function Ka(t=$.visualDuration,e=$.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:r,restDelta:i}=n;const s=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:c,mass:u,duration:d,velocity:h,isResolvedFromDuration:f}=Dh({...n,velocity:-be(n.velocity||0)}),p=h||0,g=c/(2*Math.sqrt(l*u)),b=o-s,y=be(Math.sqrt(l/u)),T=Math.abs(b)<5;r||(r=T?$.restSpeed.granular:$.restSpeed.default),i||(i=T?$.restDelta.granular:$.restDelta.default);let S;if(g<1){const D=xr(y,g);S=O=>{const N=Math.exp(-g*y*O);return o-N*((p+g*y*b)/D*Math.sin(D*O)+b*Math.cos(D*O))}}else if(g===1)S=D=>o-Math.exp(-y*D)*(b+(p+y*b)*D);else{const D=y*Math.sqrt(g*g-1);S=O=>{const N=Math.exp(-g*y*O),A=Math.min(D*O,300);return o-N*((p+g*y*b)*Math.sinh(A)+D*b*Math.cosh(A))/D}}const C={calculatedDuration:f&&d||null,next:D=>{const O=S(D);if(f)a.done=D>=d;else{let N=0;g<1&&(N=D===0?ye(p):qa(S,D,O));const A=Math.abs(N)<=r,U=Math.abs(o-O)<=i;a.done=A&&U}return a.value=a.done?o:O,a},toString:()=>{const D=Math.min(ha(C),hr),O=fa(N=>C.next(D*N).value,D,30);return D+"ms "+O}};return C}function xs({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=t[0],h={done:!1,value:d},f=A=>a!==void 0&&A<a||l!==void 0&&A>l,p=A=>a===void 0?l:l===void 0||Math.abs(a-A)<Math.abs(l-A)?a:l;let g=n*e;const b=d+g,y=o===void 0?b:o(b);y!==b&&(g=y-d);const T=A=>-g*Math.exp(-A/r),S=A=>y+T(A),C=A=>{const U=T(A),_=S(A);h.done=Math.abs(U)<=c,h.value=h.done?y:_};let D,O;const N=A=>{f(h.value)&&(D=A,O=Ka({keyframes:[h.value,p(h.value)],velocity:qa(S,A,h.value),damping:i,stiffness:s,restDelta:c,restSpeed:u}))};return N(0),{calculatedDuration:null,next:A=>{let U=!1;return!O&&D===void 0&&(U=!0,C(A),N(A)),D!==void 0&&A>=D?O.next(A-D):(!U&&C(A),h)}}}const Ch=Mt(.42,0,1,1),Eh=Mt(0,0,.58,1),Xa=Mt(.42,0,.58,1),Ph=t=>Array.isArray(t)&&typeof t[0]!="number",Oh={linear:te,easeIn:Ch,easeInOut:Xa,easeOut:Eh,circIn:fi,circInOut:Ia,circOut:Oa,backIn:hi,backInOut:Ea,backOut:Ca,anticipate:Pa},Ts=t=>{if(ai(t)){Go(t.length===4);const[e,n,r,i]=t;return Mt(e,n,r,i)}else if(typeof t=="string")return Oh[t];return t};function Ih(t,e,n){const r=[],i=n||Ga,s=t.length-1;for(let o=0;o<s;o++){let a=i(t[o],t[o+1]);if(e){const l=Array.isArray(e)?e[o]||te:e;a=Rt(l,a)}r.push(a)}return r}function Ah(t,e,{clamp:n=!0,ease:r,mixer:i}={}){const s=t.length;if(Go(s===e.length),s===1)return()=>e[0];if(s===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[s-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=Ih(e,r,i),l=a.length,c=u=>{if(o&&u<t[0])return e[0];let d=0;if(l>1)for(;d<t.length-2&&!(u<t[d+1]);d++);const h=et(t[d],t[d+1],u);return a[d](h)};return n?u=>c(xe(t[0],t[s-1],u)):c}function Mh(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const i=et(0,e,r);t.push(H(n,1,i))}}function Rh(t){const e=[0];return Mh(e,t.length-1),e}function kh(t,e){return t.map(n=>n*e)}function Nh(t,e){return t.map(()=>e||Xa).splice(0,t.length-1)}function dn({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const i=Ph(r)?r.map(Ts):Ts(r),s={done:!1,value:e[0]},o=kh(n&&n.length===e.length?n:Rh(e),t),a=Ah(o,e,{ease:Array.isArray(i)?i:Nh(e,i)});return{calculatedDuration:t,next:l=>(s.value=a(l),s.done=l>=t,s)}}const Lh=t=>{const e=({timestamp:n})=>t(n);return{start:()=>B.update(e,!0),stop:()=>Ie(e),now:()=>K.isProcessing?K.timestamp:me.now()}},Vh={decay:xs,inertia:xs,tween:dn,keyframes:dn,spring:Ka},jh=t=>t/100;class bi extends $a{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:i,keyframes:s}=this.options,o=(i==null?void 0:i.KeyframeResolver)||vi,a=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new o(s,a,n,r,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=this.options,a=oi(n)?n:Vh[n]||dn;let l,c;a!==dn&&typeof e[0]!="number"&&(l=Rt(jh,Ga(e[0],e[1])),e=[0,100]);const u=a({...this.options,keyframes:e});s==="mirror"&&(c=a({...this.options,keyframes:[...e].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=ha(u));const{calculatedDuration:d}=u,h=d+i,f=h*(r+1)-i;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:h,totalDuration:f}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!e?this.pause():this.state=this.pendingPlayState}tick(e,n=!1){const{resolved:r}=this;if(!r){const{keyframes:A}=this.options;return{done:!0,value:A[A.length-1]}}const{finalKeyframe:i,generator:s,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=r;if(this.startTime===null)return s.next(0);const{delay:h,repeat:f,repeatType:p,repeatDelay:g,onUpdate:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-u/this.speed,this.startTime)),n?this.currentTime=e:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const y=this.currentTime-h*(this.speed>=0?1:-1),T=this.speed>=0?y<0:y>u;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let S=this.currentTime,C=s;if(f){const A=Math.min(this.currentTime,u)/d;let U=Math.floor(A),_=A%1;!_&&A>=1&&(_=1),_===1&&U--,U=Math.min(U,f+1),!!(U%2)&&(p==="reverse"?(_=1-_,g&&(_-=g/d)):p==="mirror"&&(C=o)),S=xe(0,1,_)*d}const D=T?{done:!1,value:l[0]}:C.next(S);a&&(D.value=a(D.value));let{done:O}=D;!T&&c!==null&&(O=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const N=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&O);return N&&i!==void 0&&(D.value=bn(l,this.options,i)),b&&b(D.value),N&&this.finish(),D}get duration(){const{resolved:e}=this;return e?be(e.calculatedDuration):0}get time(){return be(this.currentTime)}set time(e){e=ye(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=be(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=Lh,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=e(s=>this.tick(s))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(e=this.currentTime)!==null&&e!==void 0?e:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const _h=new Set(["opacity","clipPath","filter","transform"]);function Bh(t,e,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeInOut",times:l}={}){const c={[e]:n};l&&(c.offset=l);const u=ga(a,i);return Array.isArray(u)&&(c.easing=u),t.animate(c,{delay:r,duration:i,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"})}const Fh=Wr(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),hn=10,zh=2e4;function Uh(t){return oi(t.type)||t.type==="spring"||!pa(t.ease)}function Hh(t,e){const n=new bi({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:t[0]};const i=[];let s=0;for(;!r.done&&s<zh;)r=n.sample(s),i.push(r.value),s+=hn;return{times:void 0,keyframes:i,duration:s-hn,ease:"linear"}}const Ya={anticipate:Pa,backInOut:Ea,circInOut:Ia};function $h(t){return t in Ya}class Ss extends $a{constructor(e){super(e);const{name:n,motionValue:r,element:i,keyframes:s}=this.options;this.resolver=new Ha(s,(o,a)=>this.onKeyframesResolved(o,a),n,r,i),this.resolver.scheduleResolve()}initPlayback(e,n){let{duration:r=300,times:i,ease:s,type:o,motionValue:a,name:l,startTime:c}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof s=="string"&&cn()&&$h(s)&&(s=Ya[s]),Uh(this.options)){const{onComplete:d,onUpdate:h,motionValue:f,element:p,...g}=this.options,b=Hh(e,g);e=b.keyframes,e.length===1&&(e[1]=e[0]),r=b.duration,i=b.times,s=b.ease,o="keyframes"}const u=Bh(a.owner.current,l,e,{...this.options,duration:r,times:i,ease:s});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(os(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:d}=this.options;a.set(bn(e,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:r,times:i,type:o,ease:s,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:n}=e;return be(n)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:n}=e;return be(n.currentTime||0)}set time(e){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=ye(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:n}=e;return n.playbackRate}set speed(e){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:n}=e;return n.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:n}=e;return n.startTime}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{const{resolved:n}=this;if(!n)return te;const{animation:r}=n;os(r,e)}return te}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:n,keyframes:r,duration:i,type:s,ease:o,times:a}=e;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:d,element:h,...f}=this.options,p=new bi({...f,keyframes:r,duration:i,type:s,ease:o,times:a,isGenerator:!0}),g=ye(this.time);c.setWithVelocity(p.sample(g-hn).value,p.sample(g).value,hn)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:n,name:r,repeatDelay:i,repeatType:s,damping:o,type:a}=e;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return Fh()&&r&&_h.has(r)&&!l&&!c&&!i&&s!=="mirror"&&o!==0&&a!=="inertia"}}const Wh={type:"spring",stiffness:500,damping:25,restSpeed:10},Gh=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),qh={type:"keyframes",duration:.8},Kh={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Xh=(t,{keyframes:e})=>e.length>2?qh:We.has(t)?t.startsWith("scale")?Gh(e[1]):Wh:Kh;function Yh({when:t,delay:e,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const xi=(t,e,n,r={},i,s)=>o=>{const a=si(r,t)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-ye(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:h=>{e.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:s?void 0:i};Yh(a)||(u={...u,...Xh(t,u)}),u.duration&&(u.duration=ye(u.duration)),u.repeatDelay&&(u.repeatDelay=ye(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),d&&!s&&e.get()!==void 0){const h=bn(u.keyframes,a);if(h!==void 0)return B.update(()=>{u.onUpdate(h),u.onComplete()}),new gd([])}return!s&&Ss.supports(u)?new Ss(u):new bi(u)};function Zh({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,r}function Za(t,e,{delay:n=0,transitionOverride:r,type:i}={}){var s;let{transition:o=t.getDefaultTransition(),transitionEnd:a,...l}=e;r&&(o=r);const c=[],u=i&&t.animationState&&t.animationState.getState()[i];for(const d in l){const h=t.getValue(d,(s=t.latestValues[d])!==null&&s!==void 0?s:null),f=l[d];if(f===void 0||u&&Zh(u,d))continue;const p={delay:n,...si(o||{},d)};let g=!1;if(window.MotionHandoffAnimation){const y=Ta(t);if(y){const T=window.MotionHandoffAnimation(y,d,B);T!==null&&(p.startTime=T,g=!0)}}pr(t,d),h.start(xi(d,h,f,t.shouldReduceMotion&&ba.has(d)?{type:!1}:p,t,g));const b=h.animation;b&&c.push(b)}return a&&Promise.all(c).then(()=>{B.update(()=>{a&&Id(t,a)})}),c}function Tr(t,e,n={}){var r;const i=yn(t,e,n.type==="exit"?(r=t.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(Za(t,i,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:h}=s;return Jh(t,e,u+c,d,h,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[c,u]=l==="beforeChildren"?[o,a]:[a,o];return c().then(()=>u())}else return Promise.all([o(),a(n.delay)])}function Jh(t,e,n=0,r=0,i=1,s){const o=[],a=(t.variantChildren.size-1)*r,l=i===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(t.variantChildren).sort(Qh).forEach((c,u)=>{c.notify("AnimationStart",e),o.push(Tr(c,e,{...s,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(o)}function Qh(t,e){return t.sortNodePosition(e)}function ef(t,e,n={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){const i=e.map(s=>Tr(t,s,n));r=Promise.all(i)}else if(typeof e=="string")r=Tr(t,e,n);else{const i=typeof e=="function"?yn(t,e,n.custom):e;r=Promise.all(Za(t,i,n))}return r.then(()=>{t.notify("AnimationComplete",e)})}const tf=qr.length;function Ja(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Ja(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<tf;n++){const r=qr[n],i=t.props[r];(Ct(i)||i===!1)&&(e[r]=i)}return e}const nf=[...Gr].reverse(),rf=Gr.length;function sf(t){return e=>Promise.all(e.map(({animation:n,options:r})=>ef(t,n,r)))}function of(t){let e=sf(t),n=ws(),r=!0;const i=l=>(c,u)=>{var d;const h=yn(t,u,l==="exit"?(d=t.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(h){const{transition:f,transitionEnd:p,...g}=h;c={...c,...g,...p}}return c};function s(l){e=l(t)}function o(l){const{props:c}=t,u=Ja(t.parent)||{},d=[],h=new Set;let f={},p=1/0;for(let b=0;b<rf;b++){const y=nf[b],T=n[y],S=c[y]!==void 0?c[y]:u[y],C=Ct(S),D=y===l?T.isActive:null;D===!1&&(p=b);let O=S===u[y]&&S!==c[y]&&C;if(O&&r&&t.manuallyAnimateOnMount&&(O=!1),T.protectedKeys={...f},!T.isActive&&D===null||!S&&!T.prevProp||mn(S)||typeof S=="boolean")continue;const N=af(T.prevProp,S);let A=N||y===l&&T.isActive&&!O&&C||b>p&&C,U=!1;const _=Array.isArray(S)?S:[S];let J=_.reduce(i(y),{});D===!1&&(J={});const{prevResolvedValues:de={}}=T,En={...de,...J},st=q=>{A=!0,h.has(q)&&(U=!0,h.delete(q)),T.needsAnimating[q]=!0;const ce=t.getValue(q);ce&&(ce.liveStyle=!1)};for(const q in En){const ce=J[q],ot=de[q];if(f.hasOwnProperty(q))continue;let Ge=!1;dr(ce)&&dr(ot)?Ge=!da(ce,ot):Ge=ce!==ot,Ge?ce!=null?st(q):h.add(q):ce!==void 0&&h.has(q)?st(q):T.protectedKeys[q]=!0}T.prevProp=S,T.prevResolvedValues=J,T.isActive&&(f={...f,...J}),r&&t.blockInitialAnimation&&(A=!1),A&&(!(O&&N)||U)&&d.push(..._.map(q=>({animation:q,options:{type:y}})))}if(h.size){const b={};h.forEach(y=>{const T=t.getBaseTarget(y),S=t.getValue(y);S&&(S.liveStyle=!0),b[y]=T??null}),d.push({animation:b})}let g=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(g=!1),r=!1,g?e(d):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=t.variantChildren)===null||u===void 0||u.forEach(h=>{var f;return(f=h.animationState)===null||f===void 0?void 0:f.setActive(l,c)}),n[l].isActive=c;const d=o(l);for(const h in n)n[h].protectedKeys={};return d}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=ws(),r=!0}}}function af(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!da(e,t):!1}function Ne(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ws(){return{animate:Ne(!0),whileInView:Ne(),whileHover:Ne(),whileTap:Ne(),whileDrag:Ne(),whileFocus:Ne(),exit:Ne()}}class Re{constructor(e){this.isMounted=!1,this.node=e}update(){}}class lf extends Re{constructor(e){super(e),e.animationState||(e.animationState=of(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();mn(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)===null||e===void 0||e.call(this)}}let cf=0;class uf extends Re{constructor(){super(...arguments),this.id=cf++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const df={animation:{Feature:lf},exit:{Feature:uf}};function It(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}function kt(t){return{point:{x:t.pageX,y:t.pageY}}}const hf=t=>e=>li(e)&&t(e,kt(e));function bt(t,e,n,r){return It(t,e,hf(n),r)}const Ds=(t,e)=>Math.abs(t-e);function ff(t,e){const n=Ds(t.x,e.x),r=Ds(t.y,e.y);return Math.sqrt(n**2+r**2)}class Qa{constructor(e,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=Yn(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,f=ff(d.offset,{x:0,y:0})>=3;if(!h&&!f)return;const{point:p}=d,{timestamp:g}=K;this.history.push({...p,timestamp:g});const{onStart:b,onMove:y}=this.handlers;h||(b&&b(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,d)},this.handlePointerMove=(d,h)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Xn(h,this.transformPagePoint),B.update(this.updatePoint,!0)},this.handlePointerUp=(d,h)=>{this.end();const{onEnd:f,onSessionEnd:p,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Yn(d.type==="pointercancel"?this.lastMoveEventInfo:Xn(h,this.transformPagePoint),this.history);this.startEvent&&f&&f(d,b),p&&p(d,b)},!li(e))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=kt(e),a=Xn(o,this.transformPagePoint),{point:l}=a,{timestamp:c}=K;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(e,Yn(a,this.history)),this.removeListeners=Rt(bt(this.contextWindow,"pointermove",this.handlePointerMove),bt(this.contextWindow,"pointerup",this.handlePointerUp),bt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Ie(this.updatePoint)}}function Xn(t,e){return e?{point:e(t.point)}:t}function Cs(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Yn({point:t},e){return{point:t,delta:Cs(t,el(e)),offset:Cs(t,pf(e)),velocity:gf(e,.1)}}function pf(t){return t[0]}function el(t){return t[t.length-1]}function gf(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const i=el(t);for(;n>=0&&(r=t[n],!(i.timestamp-r.timestamp>ye(e)));)n--;if(!r)return{x:0,y:0};const s=be(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const o={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}const tl=1e-4,mf=1-tl,vf=1+tl,nl=.01,yf=0-nl,bf=0+nl;function ne(t){return t.max-t.min}function xf(t,e,n){return Math.abs(t-e)<=n}function Es(t,e,n,r=.5){t.origin=r,t.originPoint=H(e.min,e.max,t.origin),t.scale=ne(n)/ne(e),t.translate=H(n.min,n.max,t.origin)-t.originPoint,(t.scale>=mf&&t.scale<=vf||isNaN(t.scale))&&(t.scale=1),(t.translate>=yf&&t.translate<=bf||isNaN(t.translate))&&(t.translate=0)}function xt(t,e,n,r){Es(t.x,e.x,n.x,r?r.originX:void 0),Es(t.y,e.y,n.y,r?r.originY:void 0)}function Ps(t,e,n){t.min=n.min+e.min,t.max=t.min+ne(e)}function Tf(t,e,n){Ps(t.x,e.x,n.x),Ps(t.y,e.y,n.y)}function Os(t,e,n){t.min=e.min-n.min,t.max=t.min+ne(e)}function Tt(t,e,n){Os(t.x,e.x,n.x),Os(t.y,e.y,n.y)}function Sf(t,{min:e,max:n},r){return e!==void 0&&t<e?t=r?H(e,t,r.min):Math.max(t,e):n!==void 0&&t>n&&(t=r?H(n,t,r.max):Math.min(t,n)),t}function Is(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function wf(t,{top:e,left:n,bottom:r,right:i}){return{x:Is(t.x,n,i),y:Is(t.y,e,r)}}function As(t,e){let n=e.min-t.min,r=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,r]=[r,n]),{min:n,max:r}}function Df(t,e){return{x:As(t.x,e.x),y:As(t.y,e.y)}}function Cf(t,e){let n=.5;const r=ne(t),i=ne(e);return i>r?n=et(e.min,e.max-r,t.min):r>i&&(n=et(t.min,t.max-i,e.min)),xe(0,1,n)}function Ef(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Sr=.35;function Pf(t=Sr){return t===!1?t=0:t===!0&&(t=Sr),{x:Ms(t,"left","right"),y:Ms(t,"top","bottom")}}function Ms(t,e,n){return{min:Rs(t,e),max:Rs(t,n)}}function Rs(t,e){return typeof t=="number"?t:t[e]||0}const ks=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ye=()=>({x:ks(),y:ks()}),Ns=()=>({min:0,max:0}),G=()=>({x:Ns(),y:Ns()});function oe(t){return[t("x"),t("y")]}function rl({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function Of({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function If(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Zn(t){return t===void 0||t===1}function wr({scale:t,scaleX:e,scaleY:n}){return!Zn(t)||!Zn(e)||!Zn(n)}function Le(t){return wr(t)||il(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function il(t){return Ls(t.x)||Ls(t.y)}function Ls(t){return t&&t!=="0%"}function fn(t,e,n){const r=t-n,i=e*r;return n+i}function Vs(t,e,n,r,i){return i!==void 0&&(t=fn(t,i,r)),fn(t,n,r)+e}function Dr(t,e=0,n=1,r,i){t.min=Vs(t.min,e,n,r,i),t.max=Vs(t.max,e,n,r,i)}function sl(t,{x:e,y:n}){Dr(t.x,e.translate,e.scale,e.originPoint),Dr(t.y,n.translate,n.scale,n.originPoint)}const js=.999999999999,_s=1.0000000000001;function Af(t,e,n,r=!1){const i=n.length;if(!i)return;e.x=e.y=1;let s,o;for(let a=0;a<i;a++){s=n[a],o=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Je(t,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,sl(t,o)),r&&Le(s.latestValues)&&Je(t,s.latestValues))}e.x<_s&&e.x>js&&(e.x=1),e.y<_s&&e.y>js&&(e.y=1)}function Ze(t,e){t.min=t.min+e,t.max=t.max+e}function Bs(t,e,n,r,i=.5){const s=H(t.min,t.max,i);Dr(t,e,n,s,r)}function Je(t,e){Bs(t.x,e.x,e.scaleX,e.scale,e.originX),Bs(t.y,e.y,e.scaleY,e.scale,e.originY)}function ol(t,e){return rl(If(t.getBoundingClientRect(),e))}function Mf(t,e,n){const r=ol(t,n),{scroll:i}=e;return i&&(Ze(r.x,i.offset.x),Ze(r.y,i.offset.y)),r}const al=({current:t})=>t?t.ownerDocument.defaultView:null,Rf=new WeakMap;class kf{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=G(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(kt(u).point)},s=(u,d)=>{const{drag:h,dragPropagation:f,onDragStart:p}=this.getProps();if(h&&!f&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Dd(h),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),oe(b=>{let y=this.getAxisMotionValue(b).get()||0;if(ge.test(y)){const{projection:T}=this.visualElement;if(T&&T.layout){const S=T.layout.layoutBox[b];S&&(y=ne(S)*(parseFloat(y)/100))}}this.originPoint[b]=y}),p&&B.postRender(()=>p(u,d)),pr(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},o=(u,d)=>{const{dragPropagation:h,dragDirectionLock:f,onDirectionLock:p,onDrag:g}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:b}=d;if(f&&this.currentDirection===null){this.currentDirection=Nf(b),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",d.point,b),this.updateAxis("y",d.point,b),this.visualElement.render(),g&&g(u,d)},a=(u,d)=>this.stop(u,d),l=()=>oe(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Qa(e,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:al(this.visualElement)})}stop(e,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&B.postRender(()=>s(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,r){const{drag:i}=this.getProps();if(!r||!Gt(e,i,this.currentDirection))return;const s=this.getAxisMotionValue(e);let o=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(o=Sf(o,this.constraints[e],this.elastic[e])),s.set(o)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,s=this.constraints;n&&Ke(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=wf(i.layoutBox,n):this.constraints=!1,this.elastic=Pf(r),s!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&oe(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Ef(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Ke(e))return!1;const r=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=Mf(r,i.root,this.visualElement.getTransformPagePoint());let o=Df(i.layout.layoutBox,s);if(n){const a=n(Of(o));this.hasMutatedConstraints=!!a,a&&(o=rl(a))}return o}startAnimation(e){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=oe(u=>{if(!Gt(u,n,this.currentDirection))return;let d=l&&l[u]||{};o&&(d={min:0,max:0});const h=i?200:1e6,f=i?40:1e7,p={type:"inertia",velocity:r?e[u]:0,bounceStiffness:h,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const r=this.getAxisMotionValue(e);return pr(this.visualElement,e),r.start(xi(e,r,0,n,this.visualElement,!1))}stopAnimation(){oe(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){oe(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){oe(n=>{const{drag:r}=this.getProps();if(!Gt(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];s.set(e[n]-H(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Ke(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};oe(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=Cf({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),oe(o=>{if(!Gt(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(H(l,c,i[o]))})}addListeners(){if(!this.visualElement.current)return;Rf.set(this.visualElement,this);const e=this.visualElement.current,n=bt(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Ke(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),B.read(r);const o=It(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(oe(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())}));return()=>{o(),n(),s(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=Sr,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function Gt(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Nf(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class Lf extends Re{constructor(e){super(e),this.removeGroupControls=te,this.removeListeners=te,this.controls=new kf(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||te}unmount(){this.removeGroupControls(),this.removeListeners()}}const Fs=t=>(e,n)=>{t&&B.postRender(()=>t(e,n))};class Vf extends Re{constructor(){super(...arguments),this.removePointerDownListener=te}onPointerDown(e){this.session=new Qa(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:al(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:Fs(e),onStart:Fs(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&B.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=bt(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Jt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function zs(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const lt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(I.test(t))t=parseFloat(t);else return t;const n=zs(t,e.target.x),r=zs(t,e.target.y);return`${n}% ${r}%`}},jf={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,i=Ae.parse(t);if(i.length>5)return r;const s=Ae.createTransformer(t),o=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+o]/=a,i[1+o]/=l;const c=H(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=c),typeof i[3+o]=="number"&&(i[3+o]/=c),s(i)}};class _f extends v.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=e;rd(Bf),s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Jt.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,o=r.projection;return o&&(o.isPresent=s,i||e.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?o.promote():o.relegate()||B.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Xr.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function ll(t){const[e,n]=yu(),r=v.useContext($o);return m.jsx(_f,{...t,layoutGroup:r,switchLayoutGroup:v.useContext(Jo),isPresent:e,safeToRemove:n})}const Bf={borderRadius:{...lt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:lt,borderTopRightRadius:lt,borderBottomLeftRadius:lt,borderBottomRightRadius:lt,boxShadow:jf};function Ff(t,e,n){const r=Y(t)?t:Pt(t);return r.start(xi("",r,e,n)),r.animation}function zf(t){return t instanceof SVGElement&&t.tagName!=="svg"}const Uf=(t,e)=>t.depth-e.depth;class Hf{constructor(){this.children=[],this.isDirty=!1}add(e){ci(this.children,e),this.isDirty=!0}remove(e){ui(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Uf),this.isDirty=!1,this.children.forEach(e)}}function $f(t,e){const n=me.now(),r=({timestamp:i})=>{const s=i-n;s>=e&&(Ie(r),t(s-e))};return B.read(r,!0),()=>Ie(r)}const cl=["TopLeft","TopRight","BottomLeft","BottomRight"],Wf=cl.length,Us=t=>typeof t=="string"?parseFloat(t):t,Hs=t=>typeof t=="number"||I.test(t);function Gf(t,e,n,r,i,s){i?(t.opacity=H(0,n.opacity!==void 0?n.opacity:1,qf(r)),t.opacityExit=H(e.opacity!==void 0?e.opacity:1,0,Kf(r))):s&&(t.opacity=H(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let o=0;o<Wf;o++){const a=`border${cl[o]}Radius`;let l=$s(e,a),c=$s(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Hs(l)===Hs(c)?(t[a]=Math.max(H(Us(l),Us(c),r),0),(ge.test(c)||ge.test(l))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=H(e.rotate||0,n.rotate||0,r))}function $s(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const qf=ul(0,.5,Oa),Kf=ul(.5,.95,te);function ul(t,e,n){return r=>r<t?0:r>e?1:n(et(t,e,r))}function Ws(t,e){t.min=e.min,t.max=e.max}function re(t,e){Ws(t.x,e.x),Ws(t.y,e.y)}function Gs(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function qs(t,e,n,r,i){return t-=e,t=fn(t,1/n,r),i!==void 0&&(t=fn(t,1/i,r)),t}function Xf(t,e=0,n=1,r=.5,i,s=t,o=t){if(ge.test(e)&&(e=parseFloat(e),e=H(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=H(s.min,s.max,r);t===s&&(a-=e),t.min=qs(t.min,e,n,a,i),t.max=qs(t.max,e,n,a,i)}function Ks(t,e,[n,r,i],s,o){Xf(t,e[n],e[r],e[i],e.scale,s,o)}const Yf=["x","scaleX","originX"],Zf=["y","scaleY","originY"];function Xs(t,e,n,r){Ks(t.x,e,Yf,n?n.x:void 0,r?r.x:void 0),Ks(t.y,e,Zf,n?n.y:void 0,r?r.y:void 0)}function Ys(t){return t.translate===0&&t.scale===1}function dl(t){return Ys(t.x)&&Ys(t.y)}function Zs(t,e){return t.min===e.min&&t.max===e.max}function Jf(t,e){return Zs(t.x,e.x)&&Zs(t.y,e.y)}function Js(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function hl(t,e){return Js(t.x,e.x)&&Js(t.y,e.y)}function Qs(t){return ne(t.x)/ne(t.y)}function eo(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Qf{constructor(){this.members=[]}add(e){ci(this.members,e),e.scheduleRender()}remove(e){if(ui(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(e,n){const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,n&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:r}=e;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function ep(t,e,n){let r="";const i=t.x.translate/e.x,s=t.y.translate/e.y,o=(n==null?void 0:n.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),(e.x!==1||e.y!==1)&&(r+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:h,skewX:f,skewY:p}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),h&&(r+=`rotateY(${h}deg) `),f&&(r+=`skewX(${f}deg) `),p&&(r+=`skewY(${p}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const Ve={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},pt=typeof window<"u"&&window.MotionDebug!==void 0,Jn=["","X","Y","Z"],tp={visibility:"hidden"},to=1e3;let np=0;function Qn(t,e,n,r){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),r&&(r[t]=0))}function fl(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Ta(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",B,!(i||s))}const{parent:r}=t;r&&!r.hasCheckedOptimisedAppear&&fl(r)}function pl({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=e==null?void 0:e()){this.id=np++,this.animationId=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.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,pt&&(Ve.totalNodes=Ve.resolvedTargetDeltas=Ve.recalculatedProjection=0),this.nodes.forEach(sp),this.nodes.forEach(up),this.nodes.forEach(dp),this.nodes.forEach(op),pt&&window.MotionDebug.record(Ve)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Hf)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new di),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=zf(o),this.instance=o;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),t){let d;const h=()=>this.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=$f(h,250),Jt.hasAnimatedSinceResize&&(Jt.hasAnimatedSinceResize=!1,this.nodes.forEach(ro))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeTargetChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||u.getDefaultTransition()||mp,{onLayoutAnimationStart:b,onLayoutAnimationComplete:y}=u.getProps(),T=!this.targetLayout||!hl(this.targetLayout,p)||f,S=!h&&f;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||S||h&&(T||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,S);const C={...si(g,"layout"),onPlay:b,onComplete:y};(u.shouldReduceMotion||this.options.layoutRoot)&&(C.delay=0,C.type=!1),this.startAnimation(C)}else h||ro(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Ie(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(hp),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&fl(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(no);return}this.isUpdating||this.nodes.forEach(lp),this.isUpdating=!1,this.nodes.forEach(cp),this.nodes.forEach(rp),this.nodes.forEach(ip),this.clearAllSnapshots();const a=me.now();K.delta=xe(0,1e3/60,a-K.timestamp),K.timestamp=a,K.isProcessing=!0,Hn.update.process(K),Hn.preRender.process(K),Hn.render.process(K),K.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Xr.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ap),this.sharedNodes.forEach(fp)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,B.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){B.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=G(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!dl(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;o&&(a||Le(this.latestValues)||u)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),vp(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var o;const{visualElement:a}=this.options;if(!a)return G();const l=a.measureViewportBox();if(!(((o=this.scroll)===null||o===void 0?void 0:o.wasRoot)||this.path.some(yp))){const{scroll:u}=this.root;u&&(Ze(l.x,u.offset.x),Ze(l.y,u.offset.y))}return l}removeElementScroll(o){var a;const l=G();if(re(l,o),!((a=this.scroll)===null||a===void 0)&&a.wasRoot)return l;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:h}=u;u!==this.root&&d&&h.layoutScroll&&(d.wasRoot&&re(l,o),Ze(l.x,d.offset.x),Ze(l.y,d.offset.y))}return l}applyTransform(o,a=!1){const l=G();re(l,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Je(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Le(u.latestValues)&&Je(l,u.latestValues)}return Le(this.latestValues)&&Je(l,this.latestValues),l}removeTransform(o){const a=G();re(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Le(c.latestValues))continue;wr(c.latestValues)&&c.updateSnapshot();const u=G(),d=c.measurePageBox();re(u,d),Xs(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return Le(this.latestValues)&&Xs(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}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!==K.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:h}=this.options;if(!(!this.layout||!(d||h))){if(this.resolvedRelativeTargetAt=K.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=G(),this.relativeTargetOrigin=G(),Tt(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),re(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=G(),this.targetWithTransforms=G()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Tf(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):re(this.target,this.layout.layoutBox),sl(this.target,this.targetDelta)):re(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=G(),this.relativeTargetOrigin=G(),Tt(this.relativeTargetOrigin,this.target,f.target),re(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}pt&&Ve.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||wr(this.parent.latestValues)||il(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var o;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===K.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;re(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;Af(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=G());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Gs(this.prevProjectionDelta.x,this.projectionDelta.x),Gs(this.prevProjectionDelta.y,this.projectionDelta.y)),xt(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!eo(this.projectionDelta.x,this.prevProjectionDelta.x)||!eo(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),pt&&Ve.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)===null||a===void 0||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ye(),this.projectionDelta=Ye(),this.projectionDeltaWithTransform=Ye()}setAnimationOrigin(o,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=Ye();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=G(),f=l?l.source:void 0,p=this.layout?this.layout.source:void 0,g=f!==p,b=this.getStack(),y=!b||b.members.length<=1,T=!!(g&&!y&&this.options.crossfade===!0&&!this.path.some(gp));this.animationProgress=0;let S;this.mixTargetDelta=C=>{const D=C/1e3;io(d.x,o.x,D),io(d.y,o.y,D),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Tt(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),pp(this.relativeTarget,this.relativeTargetOrigin,h,D),S&&Jf(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=G()),re(S,this.relativeTarget)),g&&(this.animationValues=u,Gf(u,c,this.latestValues,D,T,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=D},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Ie(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=B.update(()=>{Jt.hasAnimatedSinceResize=!0,this.currentAnimation=Ff(0,to,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.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);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(to),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&gl(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||G();const d=ne(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const h=ne(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+h}re(a,l),Je(a,u),xt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Qf),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Qn("z",o,c,this.animationValues);for(let u=0;u<Jn.length;u++)Qn(`rotate${Jn[u]}`,o,c,this.animationValues),Qn(`skew${Jn[u]}`,o,c,this.animationValues);o.render();for(const u in c)o.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);o.scheduleRender()}getProjectionStyles(o){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return tp;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=Yt(o==null?void 0:o.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=Yt(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!Le(this.latestValues)&&(g.transform=u?u({},""):"none",this.hasProjected=!1),g}const h=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=ep(this.projectionDeltaWithTransform,this.treeScale,h),u&&(c.transform=u(h,c.transform));const{x:f,y:p}=this.projectionDelta;c.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(a=h.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:c.opacity=d===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const g in ln){if(h[g]===void 0)continue;const{correct:b,applyTo:y}=ln[g],T=c.transform==="none"?h[g]:b(h[g],d);if(y){const S=y.length;for(let C=0;C<S;C++)c[y[C]]=T}else c[g]=T}return this.options.layoutId&&(c.pointerEvents=d===this?Yt(o==null?void 0:o.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(no),this.root.sharedNodes.clear()}}}function rp(t){t.updateLayout()}function ip(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=t.layout,{animationType:s}=t.options,o=n.source!==t.layout.source;s==="size"?oe(d=>{const h=o?n.measuredBox[d]:n.layoutBox[d],f=ne(h);h.min=r[d].min,h.max=h.min+f}):gl(s,n.layoutBox,r)&&oe(d=>{const h=o?n.measuredBox[d]:n.layoutBox[d],f=ne(r[d]);h.max=h.min+f,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[d].max=t.relativeTarget[d].min+f)});const a=Ye();xt(a,r,n.layoutBox);const l=Ye();o?xt(l,t.applyTransform(i,!0),n.measuredBox):xt(l,r,n.layoutBox);const c=!dl(a);let u=!1;if(!t.resumeFrom){const d=t.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:h,layout:f}=d;if(h&&f){const p=G();Tt(p,n.layoutBox,h.layoutBox);const g=G();Tt(g,r,f.layoutBox),hl(p,g)||(u=!0),d.options.layoutRoot&&(t.relativeTarget=g,t.relativeTargetOrigin=p,t.relativeParent=d)}}}t.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:r}=t.options;r&&r()}t.options.transition=void 0}function sp(t){pt&&Ve.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function op(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function ap(t){t.clearSnapshot()}function no(t){t.clearMeasurements()}function lp(t){t.isLayoutDirty=!1}function cp(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function ro(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function up(t){t.resolveTargetDelta()}function dp(t){t.calcProjection()}function hp(t){t.resetSkewAndRotation()}function fp(t){t.removeLeadSnapshot()}function io(t,e,n){t.translate=H(e.translate,0,n),t.scale=H(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function so(t,e,n,r){t.min=H(e.min,n.min,r),t.max=H(e.max,n.max,r)}function pp(t,e,n,r){so(t.x,e.x,n.x,r),so(t.y,e.y,n.y,r)}function gp(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const mp={duration:.45,ease:[.4,0,.1,1]},oo=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),ao=oo("applewebkit/")&&!oo("chrome/")?Math.round:te;function lo(t){t.min=ao(t.min),t.max=ao(t.max)}function vp(t){lo(t.x),lo(t.y)}function gl(t,e,n){return t==="position"||t==="preserve-aspect"&&!xf(Qs(e),Qs(n),.2)}function yp(t){var e;return t!==t.root&&((e=t.scroll)===null||e===void 0?void 0:e.wasRoot)}const bp=pl({attachResizeListener:(t,e)=>It(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),er={current:void 0},ml=pl({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!er.current){const t=new bp({});t.mount(window),t.setOptions({layoutScroll:!0}),er.current=t}return er.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),xp={pan:{Feature:Vf},drag:{Feature:Lf,ProjectionNode:ml,MeasureLayout:ll}};function co(t,e,n){const{props:r}=t;t.animationState&&r.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=r[i];s&&B.postRender(()=>s(e,kt(e)))}class Tp extends Re{mount(){const{current:e}=this.node;e&&(this.unmount=bd(e,n=>(co(this.node,n,"Start"),r=>co(this.node,r,"End"))))}unmount(){}}class Sp extends Re{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=Rt(It(this.node.current,"focus",()=>this.onFocus()),It(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function uo(t,e,n){const{props:r}=t;t.animationState&&r.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=r[i];s&&B.postRender(()=>s(e,kt(e)))}class wp extends Re{mount(){const{current:e}=this.node;e&&(this.unmount=wd(e,n=>(uo(this.node,n,"Start"),(r,{success:i})=>uo(this.node,r,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Cr=new WeakMap,tr=new WeakMap,Dp=t=>{const e=Cr.get(t.target);e&&e(t)},Cp=t=>{t.forEach(Dp)};function Ep({root:t,...e}){const n=t||document;tr.has(n)||tr.set(n,{});const r=tr.get(n),i=JSON.stringify(e);return r[i]||(r[i]=new IntersectionObserver(Cp,{root:t,...e})),r[i]}function Pp(t,e,n){const r=Ep(e);return Cr.set(t,n),r.observe(t),()=>{Cr.delete(t),r.unobserve(t)}}const Op={some:0,all:1};class Ip extends Re{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:s}=e,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:Op[i]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),h=c?u:d;h&&h(l)};return Pp(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(Ap(e,n))&&this.startObserver()}unmount(){}}function Ap({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Mp={inView:{Feature:Ip},tap:{Feature:wp},focus:{Feature:Sp},hover:{Feature:Tp}},Rp={layout:{ProjectionNode:ml,MeasureLayout:ll}},Er={current:null},vl={current:!1};function kp(){if(vl.current=!0,!!$r)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Er.current=t.matches;t.addListener(e),e()}else Er.current=!1}const Np=[...Ua,X,Ae],Lp=t=>Np.find(za(t)),ho=new WeakMap;function Vp(t,e,n){for(const r in e){const i=e[r],s=n[r];if(Y(i))t.addValue(r,i);else if(Y(s))t.addValue(r,Pt(i,{owner:t}));else if(s!==i)if(t.hasValue(r)){const o=t.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=t.getStaticValue(r);t.addValue(r,Pt(o!==void 0?o:i,{owner:t}))}}for(const r in n)e[r]===void 0&&t.removeValue(r);return e}const fo=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class jp{scrapeMotionValuesFromProps(e,n,r){return{}}constructor({parent:e,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=vi,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},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=()=>{const f=me.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,B.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:u}=o;this.onUpdate=u,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=vn(n),this.isVariantNode=Yo(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:d,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in h){const p=h[f];l[f]!==void 0&&Y(p)&&p.set(l[f],!1)}}mount(e){this.current=e,ho.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((n,r)=>this.bindToMotionValue(r,n)),vl.current||kp(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Er.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){ho.delete(this.current),this.projection&&this.projection.unmount(),Ie(this.notifyUpdate),Ie(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const r=We.has(e),i=n.on("change",a=>{this.latestValues[e]=a,this.props.onUpdate&&B.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),s(),o&&o(),n.owner&&n.stop()})}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 tt){const n=tt[e];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[e]&&i&&r(this.props)&&(this.features[e]=new i(this)),this.features[e]){const s=this.features[e];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):G()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<fo.length;r++){const i=fo[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s="on"+i,o=e[s];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=Vp(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}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){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const r=this.values.get(e);n!==r&&(r&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return r===void 0&&n!==void 0&&(r=Pt(n===null?void 0:n,{owner:this}),this.addValue(e,r)),r}readValue(e,n){var r;let i=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(r=this.getBaseTargetFromProps(this.props,e))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,e,this.options);return i!=null&&(typeof i=="string"&&(Ba(i)||Aa(i))?i=parseFloat(i):!Lp(i)&&Ae.test(n)&&(i=Va(e,n)),this.setBaseTarget(e,Y(i)?i.get():i)),Y(i)?i.get():i}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const o=Zr(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(i=o[e])}if(r&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,e);return s!==void 0&&!Y(s)?s:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new di),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class yl extends jp{constructor(){super(...arguments),this.KeyframeResolver=Ha}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:r}){delete n[e],delete r[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Y(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function _p(t){return window.getComputedStyle(t)}class Bp extends yl{constructor(){super(...arguments),this.type="html",this.renderInstance=sa}readValueFromInstance(e,n){if(We.has(n)){const r=mi(n);return r&&r.default||0}else{const r=_p(e),i=(na(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return ol(e,n)}build(e,n,r){ei(e,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,n,r){return ii(e,n,r)}}class Fp extends yl{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=G}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(We.has(n)){const r=mi(n);return r&&r.default||0}return n=oa.has(n)?n:Kr(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,r){return ca(e,n,r)}build(e,n,r){ti(e,n,this.isSVGTag,r.transformTemplate)}renderInstance(e,n,r,i){aa(e,n,r,i)}mount(e){this.isSVGTag=ri(e.tagName),super.mount(e)}}const zp=(t,e)=>Yr(t)?new Fp(e):new Bp(e,{allowProjection:t!==v.Fragment}),Up=hd({...df,...Mp,...xp,...Rp},zp),Hp=Pu(Up);function po(t,e){let n;return(...r)=>{window.clearTimeout(n),n=window.setTimeout(()=>t(...r),e)}}function $p({debounce:t,scroll:e,polyfill:n,offsetSize:r}={debounce:0,scroll:!1,offsetSize:!1}){const i=n||(typeof window>"u"?class{}:window.ResizeObserver);if(!i)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[s,o]=v.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),a=v.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:s,orientationHandler:null}),l=t?typeof t=="number"?t:t.scroll:null,c=t?typeof t=="number"?t:t.resize:null,u=v.useRef(!1);v.useEffect(()=>(u.current=!0,()=>void(u.current=!1)));const[d,h,f]=v.useMemo(()=>{const y=()=>{if(!a.current.element)return;const{left:T,top:S,width:C,height:D,bottom:O,right:N,x:A,y:U}=a.current.element.getBoundingClientRect(),_={left:T,top:S,width:C,height:D,bottom:O,right:N,x:A,y:U};a.current.element instanceof HTMLElement&&r&&(_.height=a.current.element.offsetHeight,_.width=a.current.element.offsetWidth),Object.freeze(_),u.current&&!Kp(a.current.lastBounds,_)&&o(a.current.lastBounds=_)};return[y,c?po(y,c):y,l?po(y,l):y]},[o,r,l,c]);function p(){a.current.scrollContainers&&(a.current.scrollContainers.forEach(y=>y.removeEventListener("scroll",f,!0)),a.current.scrollContainers=null),a.current.resizeObserver&&(a.current.resizeObserver.disconnect(),a.current.resizeObserver=null),a.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",a.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",a.current.orientationHandler))}function g(){a.current.element&&(a.current.resizeObserver=new i(f),a.current.resizeObserver.observe(a.current.element),e&&a.current.scrollContainers&&a.current.scrollContainers.forEach(y=>y.addEventListener("scroll",f,{capture:!0,passive:!0})),a.current.orientationHandler=()=>{f()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",a.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",a.current.orientationHandler))}const b=y=>{!y||y===a.current.element||(p(),a.current.element=y,a.current.scrollContainers=bl(y),g())};return Gp(f,!!e),Wp(h),v.useEffect(()=>{p(),g()},[e,f,h]),v.useEffect(()=>p,[]),[b,s,d]}function Wp(t){v.useEffect(()=>{const e=t;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[t])}function Gp(t,e){v.useEffect(()=>{if(e){const n=t;return window.addEventListener("scroll",n,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",n,!0)}},[t,e])}function bl(t){const e=[];if(!t||t===document.body)return e;const{overflow:n,overflowX:r,overflowY:i}=window.getComputedStyle(t);return[n,r,i].some(s=>s==="auto"||s==="scroll")&&e.push(t),[...e,...bl(t.parentElement)]}const qp=["x","y","top","bottom","left","right","width","height"],Kp=(t,e)=>qp.every(n=>t[n]===e[n]),xl=v.createContext({dragDropManager:void 0});function ie(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var go=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),mo=function(){return Math.random().toString(36).substring(7).split("").join(".")},vo={INIT:"@@redux/INIT"+mo(),REPLACE:"@@redux/REPLACE"+mo()};function Xp(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Tl(t,e,n){var r;if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(ie(0));if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(ie(1));return n(Tl)(t,e)}if(typeof t!="function")throw new Error(ie(2));var i=t,s=e,o=[],a=o,l=!1;function c(){a===o&&(a=o.slice())}function u(){if(l)throw new Error(ie(3));return s}function d(g){if(typeof g!="function")throw new Error(ie(4));if(l)throw new Error(ie(5));var b=!0;return c(),a.push(g),function(){if(b){if(l)throw new Error(ie(6));b=!1,c();var T=a.indexOf(g);a.splice(T,1),o=null}}}function h(g){if(!Xp(g))throw new Error(ie(7));if(typeof g.type>"u")throw new Error(ie(8));if(l)throw new Error(ie(9));try{l=!0,s=i(s,g)}finally{l=!1}for(var b=o=a,y=0;y<b.length;y++){var T=b[y];T()}return g}function f(g){if(typeof g!="function")throw new Error(ie(10));i=g,h({type:vo.REPLACE})}function p(){var g,b=d;return g={subscribe:function(T){if(typeof T!="object"||T===null)throw new Error(ie(11));function S(){T.next&&T.next(u())}S();var C=b(S);return{unsubscribe:C}}},g[go]=function(){return this},g}return h({type:vo.INIT}),r={dispatch:h,subscribe:d,getState:u,replaceReducer:f},r[go]=p,r}function L(t,e,...n){if(Yp()&&e===void 0)throw new Error("invariant requires an error message argument");if(!t){let r;if(e===void 0)r=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let i=0;r=new Error(e.replace(/%s/g,function(){return n[i++]})),r.name="Invariant Violation"}throw r.framesToPop=1,r}}function Yp(){return typeof process<"u"&&!0}function Zp(t,e,n){return e.split(".").reduce((r,i)=>r&&r[i]?r[i]:n||null,t)}function Jp(t,e){return t.filter(n=>n!==e)}function Sl(t){return typeof t=="object"}function Qp(t,e){const n=new Map,r=s=>{n.set(s,n.has(s)?n.get(s)+1:1)};t.forEach(r),e.forEach(r);const i=[];return n.forEach((s,o)=>{s===1&&i.push(o)}),i}function eg(t,e){return t.filter(n=>e.indexOf(n)>-1)}const Ti="dnd-core/INIT_COORDS",xn="dnd-core/BEGIN_DRAG",Si="dnd-core/PUBLISH_DRAG_SOURCE",Tn="dnd-core/HOVER",Sn="dnd-core/DROP",wn="dnd-core/END_DRAG";function yo(t,e){return{type:Ti,payload:{sourceClientOffset:e||null,clientOffset:t||null}}}const tg={type:Ti,payload:{clientOffset:null,sourceClientOffset:null}};function ng(t){return function(n=[],r={publishSource:!0}){const{publishSource:i=!0,clientOffset:s,getSourceClientOffset:o}=r,a=t.getMonitor(),l=t.getRegistry();t.dispatch(yo(s)),rg(n,a,l);const c=og(n,a);if(c==null){t.dispatch(tg);return}let u=null;if(s){if(!o)throw new Error("getSourceClientOffset must be defined");ig(o),u=o(c)}t.dispatch(yo(s,u));const h=l.getSource(c).beginDrag(a,c);if(h==null)return;sg(h),l.pinSource(c);const f=l.getSourceType(c);return{type:xn,payload:{itemType:f,item:h,sourceId:c,clientOffset:s||null,sourceClientOffset:u||null,isSourcePublic:!!i}}}}function rg(t,e,n){L(!e.isDragging(),"Cannot call beginDrag while dragging."),t.forEach(function(r){L(n.getSource(r),"Expected sourceIds to be registered.")})}function ig(t){L(typeof t=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function sg(t){L(Sl(t),"Item must be an object.")}function og(t,e){let n=null;for(let r=t.length-1;r>=0;r--)if(e.canDragSource(t[r])){n=t[r];break}return n}function ag(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function lg(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){ag(t,i,n[i])})}return t}function cg(t){return function(n={}){const r=t.getMonitor(),i=t.getRegistry();ug(r),fg(r).forEach((o,a)=>{const l=dg(o,a,i,r),c={type:Sn,payload:{dropResult:lg({},n,l)}};t.dispatch(c)})}}function ug(t){L(t.isDragging(),"Cannot call drop while not dragging."),L(!t.didDrop(),"Cannot call drop twice during one drag operation.")}function dg(t,e,n,r){const i=n.getTarget(t);let s=i?i.drop(r,t):void 0;return hg(s),typeof s>"u"&&(s=e===0?{}:r.getDropResult()),s}function hg(t){L(typeof t>"u"||Sl(t),"Drop result must either be an object or undefined.")}function fg(t){const e=t.getTargetIds().filter(t.canDropOnTarget,t);return e.reverse(),e}function pg(t){return function(){const n=t.getMonitor(),r=t.getRegistry();gg(n);const i=n.getSourceId();return i!=null&&(r.getSource(i,!0).endDrag(n,i),r.unpinSource()),{type:wn}}}function gg(t){L(t.isDragging(),"Cannot call endDrag while not dragging.")}function Pr(t,e){return e===null?t===null:Array.isArray(t)?t.some(n=>n===e):t===e}function mg(t){return function(n,{clientOffset:r}={}){vg(n);const i=n.slice(0),s=t.getMonitor(),o=t.getRegistry(),a=s.getItemType();return bg(i,o,a),yg(i,s,o),xg(i,s,o),{type:Tn,payload:{targetIds:i,clientOffset:r||null}}}}function vg(t){L(Array.isArray(t),"Expected targetIds to be an array.")}function yg(t,e,n){L(e.isDragging(),"Cannot call hover while not dragging."),L(!e.didDrop(),"Cannot call hover after drop.");for(let r=0;r<t.length;r++){const i=t[r];L(t.lastIndexOf(i)===r,"Expected targetIds to be unique in the passed array.");const s=n.getTarget(i);L(s,"Expected targetIds to be registered.")}}function bg(t,e,n){for(let r=t.length-1;r>=0;r--){const i=t[r],s=e.getTargetType(i);Pr(s,n)||t.splice(r,1)}}function xg(t,e,n){t.forEach(function(r){n.getTarget(r).hover(e,r)})}function Tg(t){return function(){if(t.getMonitor().isDragging())return{type:Si}}}function Sg(t){return{beginDrag:ng(t),publishDragSource:Tg(t),hover:mg(t),drop:cg(t),endDrag:pg(t)}}class wg{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:n}=this.store;function r(s){return(...o)=>{const a=s.apply(e,o);typeof a<"u"&&n(a)}}const i=Sg(this);return Object.keys(i).reduce((s,o)=>{const a=i[o];return s[o]=r(a),s},{})}dispatch(e){this.store.dispatch(e)}constructor(e,n){this.isSetUp=!1,this.handleRefCountChange=()=>{const r=this.store.getState().refCount>0;this.backend&&(r&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!r&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=n,e.subscribe(this.handleRefCountChange)}}function Dg(t,e){return{x:t.x+e.x,y:t.y+e.y}}function wl(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Cg(t){const{clientOffset:e,initialClientOffset:n,initialSourceClientOffset:r}=t;return!e||!n||!r?null:wl(Dg(e,r),n)}function Eg(t){const{clientOffset:e,initialClientOffset:n}=t;return!e||!n?null:wl(e,n)}const St=[],wi=[];St.__IS_NONE__=!0;wi.__IS_ALL__=!0;function Pg(t,e){return t===St?!1:t===wi||typeof e>"u"?!0:eg(e,t).length>0}class Og{subscribeToStateChange(e,n={}){const{handlerIds:r}=n;L(typeof e=="function","listener must be a function."),L(typeof r>"u"||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");let i=this.store.getState().stateId;const s=()=>{const o=this.store.getState(),a=o.stateId;try{a===i||a===i+1&&!Pg(o.dirtyHandlerIds,r)||e()}finally{i=a}};return this.store.subscribe(s)}subscribeToOffsetChange(e){L(typeof e=="function","listener must be a function.");let n=this.store.getState().dragOffset;const r=()=>{const i=this.store.getState().dragOffset;i!==n&&(n=i,e())};return this.store.subscribe(r)}canDragSource(e){if(!e)return!1;const n=this.registry.getSource(e);return L(n,`Expected to find a valid source. sourceId=${e}`),this.isDragging()?!1:n.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const n=this.registry.getTarget(e);if(L(n,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop())return!1;const r=this.registry.getTargetType(e),i=this.getItemType();return Pr(r,i)&&n.canDrop(this,e)}isDragging(){return!!this.getItemType()}isDraggingSource(e){if(!e)return!1;const n=this.registry.getSource(e,!0);if(L(n,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic())return!1;const r=this.registry.getSourceType(e),i=this.getItemType();return r!==i?!1:n.isDragging(this,e)}isOverTarget(e,n={shallow:!1}){if(!e)return!1;const{shallow:r}=n;if(!this.isDragging())return!1;const i=this.registry.getTargetType(e),s=this.getItemType();if(s&&!Pr(i,s))return!1;const o=this.getTargetIds();if(!o.length)return!1;const a=o.indexOf(e);return r?a===o.length-1:a>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return Cg(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return Eg(this.store.getState().dragOffset)}constructor(e,n){this.store=e,this.registry=n}}const bo=typeof global<"u"?global:self,Dl=bo.MutationObserver||bo.WebKitMutationObserver;function Cl(t){return function(){const n=setTimeout(i,0),r=setInterval(i,50);function i(){clearTimeout(n),clearInterval(r),t()}}}function Ig(t){let e=1;const n=new Dl(t),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){e=-e,r.data=e}}const Ag=typeof Dl=="function"?Ig:Cl;class Mg{enqueueTask(e){const{queue:n,requestFlush:r}=this;n.length||(r(),this.flushing=!0),n[n.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const n=this.index;if(this.index++,e[n].call(),this.index>this.capacity){for(let r=0,i=e.length-this.index;r<i;r++)e[r]=e[r+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=Ag(this.flush),this.requestErrorThrow=Cl(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class Rg{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,n){this.onError=e,this.release=n,this.task=null}}class kg{create(e){const n=this.freeTasks,r=n.length?n.pop():new Rg(this.onError,i=>n[n.length]=i);return r.task=e,r}constructor(e){this.onError=e,this.freeTasks=[]}}const El=new Mg,Ng=new kg(El.registerPendingError);function Lg(t){El.enqueueTask(Ng.create(t))}const Di="dnd-core/ADD_SOURCE",Ci="dnd-core/ADD_TARGET",Ei="dnd-core/REMOVE_SOURCE",Dn="dnd-core/REMOVE_TARGET";function Vg(t){return{type:Di,payload:{sourceId:t}}}function jg(t){return{type:Ci,payload:{targetId:t}}}function _g(t){return{type:Ei,payload:{sourceId:t}}}function Bg(t){return{type:Dn,payload:{targetId:t}}}function Fg(t){L(typeof t.canDrag=="function","Expected canDrag to be a function."),L(typeof t.beginDrag=="function","Expected beginDrag to be a function."),L(typeof t.endDrag=="function","Expected endDrag to be a function.")}function zg(t){L(typeof t.canDrop=="function","Expected canDrop to be a function."),L(typeof t.hover=="function","Expected hover to be a function."),L(typeof t.drop=="function","Expected beginDrag to be a function.")}function Or(t,e){if(e&&Array.isArray(t)){t.forEach(n=>Or(n,!1));return}L(typeof t=="string"||typeof t=="symbol",e?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var ae;(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})(ae||(ae={}));let Ug=0;function Hg(){return Ug++}function $g(t){const e=Hg().toString();switch(t){case ae.SOURCE:return`S${e}`;case ae.TARGET:return`T${e}`;default:throw new Error(`Unknown Handler Role: ${t}`)}}function xo(t){switch(t[0]){case"S":return ae.SOURCE;case"T":return ae.TARGET;default:throw new Error(`Cannot parse handler ID: ${t}`)}}function To(t,e){const n=t.entries();let r=!1;do{const{done:i,value:[,s]}=n.next();if(s===e)return!0;r=!!i}while(!r);return!1}class Wg{addSource(e,n){Or(e),Fg(n);const r=this.addHandler(ae.SOURCE,e,n);return this.store.dispatch(Vg(r)),r}addTarget(e,n){Or(e,!0),zg(n);const r=this.addHandler(ae.TARGET,e,n);return this.store.dispatch(jg(r)),r}containsHandler(e){return To(this.dragSources,e)||To(this.dropTargets,e)}getSource(e,n=!1){return L(this.isSourceId(e),"Expected a valid source ID."),n&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return L(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return L(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return L(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return xo(e)===ae.SOURCE}isTargetId(e){return xo(e)===ae.TARGET}removeSource(e){L(this.getSource(e),"Expected an existing source."),this.store.dispatch(_g(e)),Lg(()=>{this.dragSources.delete(e),this.types.delete(e)})}removeTarget(e){L(this.getTarget(e),"Expected an existing target."),this.store.dispatch(Bg(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const n=this.getSource(e);L(n,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=n}unpinSource(){L(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,n,r){const i=$g(e);return this.types.set(i,n),e===ae.SOURCE?this.dragSources.set(i,r):e===ae.TARGET&&this.dropTargets.set(i,r),i}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}}const Gg=(t,e)=>t===e;function qg(t,e){return!t&&!e?!0:!t||!e?!1:t.x===e.x&&t.y===e.y}function Kg(t,e,n=Gg){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(!n(t[r],e[r]))return!1;return!0}function Xg(t=St,e){switch(e.type){case Tn:break;case Di:case Ci:case Dn:case Ei:return St;case xn:case Si:case wn:case Sn:default:return wi}const{targetIds:n=[],prevTargetIds:r=[]}=e.payload,i=Qp(n,r);if(!(i.length>0||!Kg(n,r)))return St;const o=r[r.length-1],a=n[n.length-1];return o!==a&&(o&&i.push(o),a&&i.push(a)),i}function Yg(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Zg(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){Yg(t,i,n[i])})}return t}const So={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function Jg(t=So,e){const{payload:n}=e;switch(e.type){case Ti:case xn:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case Tn:return qg(t.clientOffset,n.clientOffset)?t:Zg({},t,{clientOffset:n.clientOffset});case wn:case Sn:return So;default:return t}}function Qg(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function qe(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){Qg(t,i,n[i])})}return t}const em={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function tm(t=em,e){const{payload:n}=e;switch(e.type){case xn:return qe({},t,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case Si:return qe({},t,{isSourcePublic:!0});case Tn:return qe({},t,{targetIds:n.targetIds});case Dn:return t.targetIds.indexOf(n.targetId)===-1?t:qe({},t,{targetIds:Jp(t.targetIds,n.targetId)});case Sn:return qe({},t,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case wn:return qe({},t,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}}function nm(t=0,e){switch(e.type){case Di:case Ci:return t+1;case Ei:case Dn:return t-1;default:return t}}function rm(t=0){return t+1}function im(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function sm(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){im(t,i,n[i])})}return t}function om(t={},e){return{dirtyHandlerIds:Xg(t.dirtyHandlerIds,{type:e.type,payload:sm({},e.payload,{prevTargetIds:Zp(t,"dragOperation.targetIds",[])})}),dragOffset:Jg(t.dragOffset,e),refCount:nm(t.refCount,e),dragOperation:tm(t.dragOperation,e),stateId:rm(t.stateId)}}function am(t,e=void 0,n={},r=!1){const i=lm(r),s=new Og(i,new Wg(i)),o=new wg(i,s),a=t(o,e,n);return o.receiveBackend(a),o}function lm(t){const e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return Tl(om,t&&e&&e({name:"dnd-core",instanceId:"dnd-core"}))}function cm(t,e){if(t==null)return{};var n=um(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function um(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}let wo=0;const Qt=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var dm=v.memo(function(e){var{children:n}=e,r=cm(e,["children"]);const[i,s]=hm(r);return v.useEffect(()=>{if(s){const o=Pl();return++wo,()=>{--wo===0&&(o[Qt]=null)}}},[]),m.jsx(xl.Provider,{value:i,children:n})});function hm(t){if("manager"in t)return[{dragDropManager:t.manager},!1];const e=fm(t.backend,t.context,t.options,t.debugMode),n=!t.context;return[e,n]}function fm(t,e=Pl(),n,r){const i=e;return i[Qt]||(i[Qt]={dragDropManager:am(t,e,n,r)}),i[Qt]}function Pl(){return typeof global<"u"?global:window}var pm=Rc();const gm=Mc(pm),$e=typeof window<"u"?v.useLayoutEffect:v.useEffect;function Ol(t,e,n){const[r,i]=v.useState(()=>e(t)),s=v.useCallback(()=>{const o=e(t);gm(r,o)||(i(o),n&&n())},[r,t,n]);return $e(s),[r,s]}function mm(t,e,n){const[r,i]=Ol(t,e,n);return $e(function(){const o=t.getHandlerId();if(o!=null)return t.subscribeToStateChange(i,{handlerIds:[o]})},[t,i]),r}function Il(t,e,n){return mm(e,t||(()=>({})),()=>n.reconnect())}function Al(t,e){const n=[];return typeof t!="function"&&n.push(t),v.useMemo(()=>typeof t=="function"?t():t,n)}function vm(t){return v.useMemo(()=>t.hooks.dragSource(),[t])}function ym(t){return v.useMemo(()=>t.hooks.dragPreview(),[t])}let nr=!1,rr=!1;class bm{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){L(!nr,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return nr=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{nr=!1}}isDragging(){if(!this.sourceId)return!1;L(!rr,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return rr=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{rr=!1}}subscribeToStateChange(e,n){return this.internalMonitor.subscribeToStateChange(e,n)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,n){return this.internalMonitor.isOverTarget(e,n)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}}let ir=!1;class xm{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,n){return this.internalMonitor.subscribeToStateChange(e,n)}canDrop(){if(!this.targetId)return!1;L(!ir,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return ir=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{ir=!1}}isOver(e){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,e):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}}function Tm(t,e,n){const r=n.getRegistry(),i=r.addTarget(t,e);return[i,()=>r.removeTarget(i)]}function Sm(t,e,n){const r=n.getRegistry(),i=r.addSource(t,e);return[i,()=>r.removeSource(i)]}function Ir(t,e,n,r){let i;if(i!==void 0)return!!i;if(t===e)return!0;if(typeof t!="object"||!t||typeof e!="object"||!e)return!1;const s=Object.keys(t),o=Object.keys(e);if(s.length!==o.length)return!1;const a=Object.prototype.hasOwnProperty.bind(e);for(let l=0;l<s.length;l++){const c=s[l];if(!a(c))return!1;const u=t[c],d=e[c];if(i=void 0,i===!1||i===void 0&&u!==d)return!1}return!0}function Ar(t){return t!==null&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function wm(t){if(typeof t.type=="string")return;const e=t.type.displayName||t.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${e} into a <div>, or turn it into a drag source or a drop target itself.`)}function Dm(t){return(e=null,n=null)=>{if(!v.isValidElement(e)){const s=e;return t(s,n),s}const r=e;return wm(r),Cm(r,n?s=>t(s,n):t)}}function Ml(t){const e={};return Object.keys(t).forEach(n=>{const r=t[n];if(n.endsWith("Ref"))e[n]=t[n];else{const i=Dm(r);e[n]=()=>i}}),e}function Do(t,e){typeof t=="function"?t(e):t.current=e}function Cm(t,e){const n=t.ref;return L(typeof n!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?v.cloneElement(t,{ref:r=>{Do(n,r),Do(e,r)}}):v.cloneElement(t,{ref:e})}class Em{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){const e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){const e=this.dragSource,n=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return n&&this.disconnectDragSource(),this.handlerId?e?(n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),n):(this.lastConnectedDragSource=e,n):n}reconnectDragPreview(e=!1){const n=this.dragPreview,r=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(r&&this.disconnectDragPreview(),!!this.handlerId){if(!n){this.lastConnectedDragPreview=n;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=n,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,n,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!Ir(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!Ir(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=Ml({dragSource:(n,r)=>{this.clearDragSource(),this.dragSourceOptions=r||null,Ar(n)?this.dragSourceRef=n:this.dragSourceNode=n,this.reconnectDragSource()},dragPreview:(n,r)=>{this.clearDragPreview(),this.dragPreviewOptions=r||null,Ar(n)?this.dragPreviewRef=n:this.dragPreviewNode=n,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}}class Pm{get connectTarget(){return this.dropTarget}reconnect(){const e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();const n=this.dropTarget;if(this.handlerId){if(!n){this.lastConnectedDropTarget=n;return}e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=n,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,n,this.dropTargetOptions))}}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!Ir(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=Ml({dropTarget:(n,r)=>{this.clearDropTarget(),this.dropTargetOptions=r,Ar(n)?this.dropTargetRef=n:this.dropTargetNode=n,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}}function Te(){const{dragDropManager:t}=v.useContext(xl);return L(t!=null,"Expected drag drop context"),t}function Om(t,e){const n=Te(),r=v.useMemo(()=>new Em(n.getBackend()),[n]);return $e(()=>(r.dragSourceOptions=t||null,r.reconnect(),()=>r.disconnectDragSource()),[r,t]),$e(()=>(r.dragPreviewOptions=e||null,r.reconnect(),()=>r.disconnectDragPreview()),[r,e]),r}function Im(){const t=Te();return v.useMemo(()=>new bm(t),[t])}class Am{beginDrag(){const e=this.spec,n=this.monitor;let r=null;return typeof e.item=="object"?r=e.item:typeof e.item=="function"?r=e.item(n):r={},r??null}canDrag(){const e=this.spec,n=this.monitor;return typeof e.canDrag=="boolean"?e.canDrag:typeof e.canDrag=="function"?e.canDrag(n):!0}isDragging(e,n){const r=this.spec,i=this.monitor,{isDragging:s}=r;return s?s(i):n===e.getSourceId()}endDrag(){const e=this.spec,n=this.monitor,r=this.connector,{end:i}=e;i&&i(n.getItem(),n),r.reconnect()}constructor(e,n,r){this.spec=e,this.monitor=n,this.connector=r}}function Mm(t,e,n){const r=v.useMemo(()=>new Am(t,e,n),[e,n]);return v.useEffect(()=>{r.spec=t},[t]),r}function Rm(t){return v.useMemo(()=>{const e=t.type;return L(e!=null,"spec.type must be defined"),e},[t])}function km(t,e,n){const r=Te(),i=Mm(t,e,n),s=Rm(t);$e(function(){if(s!=null){const[a,l]=Sm(s,i,r);return e.receiveHandlerId(a),n.receiveHandlerId(a),l}},[r,e,n,i,s])}function Nm(t,e){const n=Al(t);L(!n.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const r=Im(),i=Om(n.options,n.previewOptions);return km(n,r,i),[Il(n.collect,r,i),vm(i),ym(i)]}function Lm(t){const n=Te().getMonitor(),[r,i]=Ol(n,t);return v.useEffect(()=>n.subscribeToOffsetChange(i)),v.useEffect(()=>n.subscribeToStateChange(i)),r}function Vm(t){return v.useMemo(()=>t.hooks.dropTarget(),[t])}function jm(t){const e=Te(),n=v.useMemo(()=>new Pm(e.getBackend()),[e]);return $e(()=>(n.dropTargetOptions=t||null,n.reconnect(),()=>n.disconnectDropTarget()),[t]),n}function _m(){const t=Te();return v.useMemo(()=>new xm(t),[t])}function Bm(t){const{accept:e}=t;return v.useMemo(()=>(L(t.accept!=null,"accept must be defined"),Array.isArray(e)?e:[e]),[e])}class Fm{canDrop(){const e=this.spec,n=this.monitor;return e.canDrop?e.canDrop(n.getItem(),n):!0}hover(){const e=this.spec,n=this.monitor;e.hover&&e.hover(n.getItem(),n)}drop(){const e=this.spec,n=this.monitor;if(e.drop)return e.drop(n.getItem(),n)}constructor(e,n){this.spec=e,this.monitor=n}}function zm(t,e){const n=v.useMemo(()=>new Fm(t,e),[e]);return v.useEffect(()=>{n.spec=t},[t]),n}function Um(t,e,n){const r=Te(),i=zm(t,e),s=Bm(t);$e(function(){const[a,l]=Tm(s,i,r);return e.receiveHandlerId(a),n.receiveHandlerId(a),l},[r,e,i,n,s.map(o=>o.toString()).join("|")])}function Rl(t,e){const n=Al(t),r=_m(),i=jm(n.options);return Um(n,r,i),[Il(n.collect,r,i),Vm(i)]}var kl=t=>{throw TypeError(t)},Nl=(t,e,n)=>e.has(t)||kl("Cannot "+n),k=(t,e,n)=>(Nl(t,e,"read from private field"),n?n.call(t):e.get(t)),se=(t,e,n)=>e.has(t)?kl("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),je=(t,e,n,r)=>(Nl(t,e,"write to private field"),e.set(t,n),n),Ce,Hm=class{constructor(){se(this,Ce),this.register=t=>{k(this,Ce).push(t)},this.unregister=t=>{for(;k(this,Ce).indexOf(t)!==-1;)k(this,Ce).splice(k(this,Ce).indexOf(t),1)},this.backendChanged=t=>{for(let e of k(this,Ce))e.backendChanged(t)},je(this,Ce,[])}};Ce=new WeakMap;var Q,gt,ee,ve,_e,Mr,Rr,kr,en,tn,mt,Ll=class nn{constructor(e,n,r){if(se(this,Q),se(this,gt),se(this,ee),se(this,ve),se(this,_e),se(this,Mr,(i,s,o)=>{if(!o.backend)throw new Error(`You must specify a 'backend' property in your Backend entry: ${JSON.stringify(o)}`);let a=o.backend(i,s,o.options),l=o.id,c=!o.id&&a&&a.constructor;if(c&&(l=a.constructor.name),!l)throw new Error(`You must specify an 'id' property in your Backend entry: ${JSON.stringify(o)}
|
|
3
3
|
see this guide: https://github.com/louisbrunner/dnd-multi-backend/tree/master/packages/react-dnd-multi-backend#migrating-from-5xx`);if(c&&console.warn(`Deprecation notice: You are using a pipeline which doesn't include backends' 'id'.
|
|
4
4
|
This might be unsupported in the future, please specify 'id' explicitely for every backend.`),k(this,ee)[l])throw new Error(`You must specify a unique 'id' property in your Backend entry:
|