@zeniai/web-app-ui 5.1.65-prod → 5.1.66-dev
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/dist/assets/AddressRoutes-DEXYkqV1.js +1 -0
- package/dist/assets/{AddressScreen-DBh2kopg.js → AddressScreen-D8kv1hF_.js} +2 -2
- package/dist/assets/AiCfoScreen-BrNLceCE.js +22 -0
- package/dist/assets/BillPayApprovalRoutes-CvKgF8Ok.js +1 -0
- package/dist/assets/BillPayRoutes-DYswIHAT.js +119 -0
- package/dist/assets/BusinessVerificationPageScreen-YVk91Fzz.js +9 -0
- package/dist/assets/CardsAiCfoScreen-BO5V838O.js +14 -0
- package/dist/assets/ChargeCardRoutes-BZOF502-.js +71 -0
- package/dist/assets/CompanyPassportScreen-CPKfXmmb.js +1 -0
- package/dist/assets/ConnectionAuthScreen-Cv-HiaYb.js +11 -0
- package/dist/assets/CustomerOnboardingAuthScreen-DdX8BaLn.js +1 -0
- package/dist/assets/CustomerOnboardingRoutes-CKdlHWlk.js +30 -0
- package/dist/assets/{DashboardRoutes-CvxLfoR-.js → DashboardRoutes-CopaUmWi.js} +4 -4
- package/dist/assets/DefaultTenantHome-eT4t7R06.js +1 -0
- package/dist/assets/DomesticWireDetailScreen-Cbmuyang.js +18 -0
- package/dist/assets/DrawerScreen-CCxq1yzF.js +1 -0
- package/dist/assets/EntityDetailRoutes-DK7l7FnA.js +1 -0
- package/dist/assets/ExpenseAutomationRoutes-C3RWrFV-.js +25 -0
- package/dist/assets/FeaturePreviewScreen-BuXd4W0P.js +1 -0
- package/dist/assets/HubSpotOAuthCallbackScreen-D1enkInm.js +1 -0
- package/dist/assets/MagicLinkRoutes-BSRFSffK.js +72 -0
- package/dist/assets/MagicLinkSignInScreen-BSh1nXKM.js +12 -0
- package/dist/assets/{MobileAppDrawer-qPZdyrO4.js → MobileAppDrawer-BIP1MEKX.js} +1 -1
- package/dist/assets/NotFoundScreen-DY1Wwus4.js +1 -0
- package/dist/assets/NotificationRoutes-6rN7RQjW.js +1 -0
- package/dist/assets/OAuthConsentScreen-BqL6PD1E.js +1 -0
- package/dist/assets/PandLWithForecastRoutes-AcF3aqCk.js +1 -0
- package/dist/assets/PeopleRoutes-DPUTbQp_.js +22 -0
- package/dist/assets/PerformanceRoutes-Cn4Ovnir.js +1 -0
- package/dist/assets/{Preview-Dk_ia_hl.js → Preview-DDPGc7EO.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-DMhJk96k.js → QBOConnectionScreen-BEQPddK1.js} +1 -1
- package/dist/assets/ReferralListScreen-CQycV-0F.js +5 -0
- package/dist/assets/ReimbursementApprovalRoutes-Ch3sYOOh.js +1 -0
- package/dist/assets/ReimbursementApprovalRuleDetailScreen-BJZRYRum.js +1 -0
- package/dist/assets/ReimbursementRoutes-CgQPRNMh.js +68 -0
- package/dist/assets/ReportsRoutes-CQztdl9E.js +1 -0
- package/dist/assets/RewardsRoutes-B0jOOo8W.js +1 -0
- package/dist/assets/ScreenRoutes-D7kpFxVk.js +2 -0
- package/dist/assets/SettingsRoutes-CdvEgvyN.js +57 -0
- package/dist/assets/SetupPagesScreen-Dh6d6vu-.js +29 -0
- package/dist/assets/SignInScreen-FuVo71JP.js +1 -0
- package/dist/assets/SignOutScreen-DJh4f2Aj.js +9 -0
- package/dist/assets/TaskListScreen-CnT3FhwB.js +9 -0
- package/dist/assets/TaskRoutes-BlDolQ3c.js +9 -0
- package/dist/assets/TransactionDetailRoutes-C2XNyTUH.js +1 -0
- package/dist/assets/TransactionDetailScreen-Ch_kEoMB.js +5 -0
- package/dist/assets/TransactionListRoutes-CAZZrQj-.js +1 -0
- package/dist/assets/TreasuryRoutes-BQCtQUx_.js +37 -0
- package/dist/assets/{VendorsRoutes-Hio5Sfl7.js → VendorsRoutes-BGB3F2EZ.js} +27 -27
- package/dist/assets/WiseConfirmationScreen-BSryCvdh.js +12 -0
- package/dist/assets/ZeniAccountRoutes-D-szpn5h.js +73 -0
- package/dist/assets/ZeniAccountStatementScreen-BORtLhU4.js +9 -0
- package/dist/assets/{accountMappingHelper-BJc8FF-F.js → accountMappingHelper-SrHoNEDL.js} +1 -1
- package/dist/assets/{analytics-7_b07CgE.js → analytics-CkLW7NeW.js} +1 -1
- package/dist/assets/{analyticsHelper-DGI02sYS.js → analyticsHelper-BsiU5y2K.js} +1 -1
- package/dist/assets/{core-C1GB7aB-.js → core-Crl6eqZl.js} +2 -2
- package/dist/assets/{decodeURIComponentSafe-okum9C8e.js → decodeURIComponentSafe-DwYiSzjo.js} +1 -1
- package/dist/assets/dnd-tE28jHT7.js +6 -0
- package/dist/assets/{empty-DcVAbZV4.js → empty-BpRPQOis.js} +1 -1
- package/dist/assets/{index-D934ejNp.js → empty-C7ggsb2s.js} +1 -1
- package/dist/assets/{emptyVideoElement-2r8hCQGV.js → emptyVideoElement-BvjVfzOS.js} +1 -1
- package/dist/assets/epic-Qgvh4PH7.js +2 -0
- package/dist/assets/getLocaleForTenant-DiFaMSxg.js +1 -0
- package/dist/assets/{index-CJkoGhEu.js → index-B5it1rE5.js} +1 -1
- package/dist/assets/{index-R6GjjTB3.css → index-BUmr5maU.css} +1 -1
- package/dist/assets/index-BdlPaglK.js +1 -0
- package/dist/assets/{index-DwUJQ44f.js → index-Bs_5Wou0.js} +2 -2
- package/dist/assets/{index-D4_FYu1h.js → index-CJknvk0s.js} +33673 -28214
- package/dist/assets/index-CZNTdKXM.js +1 -0
- package/dist/assets/{index-DgOeAv6K.js → index-Cg0vsa8G.js} +1 -1
- package/dist/assets/{index-Cgq5e8kx.js → index-D5ItYKRr.js} +1 -1
- package/dist/assets/{index-DcSDyNQG.js → index-Dvok4kj_.js} +1 -1
- package/dist/assets/{lexical-Dcuk4Yua.js → lexical-Bm_vZOjC.js} +1 -1
- package/dist/assets/{liveblocks-Dx9GJaKJ.js → liveblocks-B5ZW-VBI.js} +1 -1
- package/dist/assets/{lottie-MYbVFail.js → lottie-hSeCd_VX.js} +1 -1
- package/dist/assets/{mui-S6TXegyD.js → mui-U77PQnc2.js} +1 -1
- package/dist/assets/{pathToGoBack-CYxRwoYN.js → pathToGoBack-BWWNiH76.js} +1 -1
- package/dist/assets/{pdf-BijcgxIK.js → pdf-DDcPh2pm.js} +4 -4
- package/dist/assets/{pdf-lib-DXIgr0ip.js → pdf-lib-ImawEH2S.js} +1 -1
- package/dist/assets/{plaid-nqaFvQD8.js → plaid-TCRHScH1.js} +1 -1
- package/dist/assets/{pusher-Dwxn49q9.js → pusher-CimMrDFu.js} +1 -1
- package/dist/assets/{react-0X27mp_1.js → react-BUcjX1FU.js} +1 -1
- package/dist/assets/{react-BKDInzaa.js → react-BghKQeK_.js} +1 -1
- package/dist/assets/{react-ClmE3BGe.js → react-DdRuig8o.js} +1 -1
- package/dist/assets/{react-CtohstEB.js → react-DyFf3w8Z.js} +1 -1
- package/dist/assets/{react-BmdAxlR-.js → react-DzBjlQkv.js} +1 -1
- package/dist/assets/{react-BK9aeab9.js → react-z5kfbX38.js} +1 -1
- package/dist/assets/{recharts-DgDFrpbv.js → recharts-e5u-LCPv.js} +3 -3
- package/dist/assets/{routePaths-dZ-9-pnI.js → routePaths-jWP9zfXs.js} +1 -1
- package/dist/assets/{sentry-i8uQ0afM.js → sentry-BxWyF9h9.js} +1 -1
- package/dist/assets/{url-B7pK2_FE.js → url-DTS3WRFG.js} +1 -1
- package/dist/assets/{url-DUqjNyjV.js → url-jBDeguac.js} +1 -1
- package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-CgykUI65.js +1 -0
- package/dist/assets/useAskAiCfoHostNavButtonProps-BAtYgUWq.js +1 -0
- package/dist/assets/useCashManagementBanner-CRbG3Xtj.js +1 -0
- package/dist/assets/useChargeCardPusherEvents-Dq1SGHUY.js +1 -0
- package/dist/assets/{useDeviceId-AH1KsB1z.js → useDeviceId-BZa5m-bZ.js} +1 -1
- package/dist/assets/useEmailConnectResultRefresh-CiGW-Jar.js +1 -0
- package/dist/assets/useInitialThreadRequest-DZr1J4rc.js +1 -0
- package/dist/assets/{utils-BGTnhJzp.js → utils-BjvWDnmB.js} +2 -2
- package/dist/assets/withTransactionSidePanel-DKnep6Xn.js +21 -0
- package/dist/assets/zeni-epic-state-DTyrT1Ga.js +13 -0
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/AddressRoutes-CaAZUR1d.js +0 -1
- package/dist/assets/AiCfoScreen-0P2uyYnp.js +0 -22
- package/dist/assets/BillPayApprovalRoutes-Bf6ESEC4.js +0 -1
- package/dist/assets/BillPayRoutes-JaK42ohp.js +0 -119
- package/dist/assets/BusinessVerificationPageScreen-yN_GrrFh.js +0 -9
- package/dist/assets/ChargeCardRoutes-DIGTV0Mu.js +0 -71
- package/dist/assets/CompanyPassportScreen-ioZCXwD_.js +0 -1
- package/dist/assets/ConnectionAuthScreen-BjfktFq2.js +0 -11
- package/dist/assets/CustomerOnboardingAuthScreen-Dzpz1U1f.js +0 -1
- package/dist/assets/CustomerOnboardingRoutes-Br-Z1BtF.js +0 -23
- package/dist/assets/DefaultTenantHome-GIFjQHwa.js +0 -1
- package/dist/assets/DomesticWireDetailScreen-DM1m923S.js +0 -18
- package/dist/assets/DrawerScreen-Bw0Jl3tu.js +0 -1
- package/dist/assets/EntityDetailRoutes-DpkUcZ1b.js +0 -1
- package/dist/assets/ExpenseAutomationRoutes-D1H-vOTZ.js +0 -25
- package/dist/assets/FeaturePreviewScreen-RdL9x4ht.js +0 -1
- package/dist/assets/HubSpotOAuthCallbackScreen-ChOR5mQ9.js +0 -1
- package/dist/assets/MagicLinkRoutes-B0Bm7tIZ.js +0 -72
- package/dist/assets/MagicLinkSignInScreen-BSGPgcvY.js +0 -12
- package/dist/assets/NotFoundScreen-CLwfUXdC.js +0 -1
- package/dist/assets/NotificationRoutes-CsG2sL7b.js +0 -1
- package/dist/assets/OAuthConsentScreen-y-MvR-GE.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-DhJIPrDf.js +0 -1
- package/dist/assets/PeopleRoutes-Bj5rMpkn.js +0 -22
- package/dist/assets/PerformanceRoutes-Dh41RQnX.js +0 -1
- package/dist/assets/ReferralListScreen-BTezTn63.js +0 -5
- package/dist/assets/ReimbursementApprovalRoutes-DMZ_8HxF.js +0 -1
- package/dist/assets/ReimbursementApprovalRuleDetailScreen-D4-WsBma.js +0 -1
- package/dist/assets/ReimbursementRoutes-CEmvBqU2.js +0 -68
- package/dist/assets/ReportsRoutes-DHk4zguu.js +0 -1
- package/dist/assets/RewardsRoutes-a_wmpytf.js +0 -1
- package/dist/assets/ScreenRoutes-DRJIZt7d.js +0 -2
- package/dist/assets/SettingsRoutes-C70whJIl.js +0 -57
- package/dist/assets/SetupPagesScreen-BN4AuJYP.js +0 -29
- package/dist/assets/SignInScreen-l-2YMbZy.js +0 -1
- package/dist/assets/SignOutScreen-Yt1oM0Fq.js +0 -9
- package/dist/assets/TaskListScreen-DHIOYmiB.js +0 -9
- package/dist/assets/TaskRoutes-PlhqIOO4.js +0 -9
- package/dist/assets/TransactionDetailRoutes-Da9AxMSb.js +0 -1
- package/dist/assets/TransactionDetailScreen-DT8xA3x1.js +0 -5
- package/dist/assets/TransactionListRoutes-BukrAqP2.js +0 -1
- package/dist/assets/TreasuryRoutes-CoolddxK.js +0 -37
- package/dist/assets/WiseConfirmationScreen-CvwI66d8.js +0 -12
- package/dist/assets/ZeniAccountRoutes-Bdh4wUlu.js +0 -57
- package/dist/assets/ZeniAccountStatementScreen-C1LlIbPZ.js +0 -9
- package/dist/assets/dnd-BKLSY4Qp.js +0 -6
- package/dist/assets/empty-BAGbIBoq.js +0 -1
- package/dist/assets/epic-BFBt-3XZ.js +0 -2
- package/dist/assets/getLocaleForTenant-COPdXUFc.js +0 -1
- package/dist/assets/index-DFPmY4t1.js +0 -1
- package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-zin4AQfk.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-Zz8eSFW2.js +0 -1
- package/dist/assets/useInitialThreadRequest-BKY0Q6gT.js +0 -1
- package/dist/assets/withTransactionSidePanel-yGfWimRu.js +0 -21
- package/dist/assets/zeni-epic-state-BJXbyZuT.js +0 -13
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{a as v,p as ae,c as V,g as ce,b as et}from"./sentry-i8uQ0afM.js";import{b as ue}from"./core-C1GB7aB-.js";import{j as de}from"./liveblocks-Dx9GJaKJ.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new r.Error().stack;t&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[t]="e378fd9b-1174-40ce-8839-da91dfd3673e",r._sentryDebugIdIdentifier="sentry-dbid-e378fd9b-1174-40ce-8839-da91dfd3673e")}catch{}})();function Yt(r){let t=null;return()=>(t==null&&(t=r()),t)}class he{enter(t){const e=this.entered.length;return this.entered=function(i,n){const s=new Set,o=c=>s.add(c);i.forEach(o),n.forEach(o);const a=[];return s.forEach(c=>a.push(c)),a}(this.entered.filter(i=>this.isNodeInDocument(i)&&(!i.contains||i.contains(t))),[t]),e===0&&this.entered.length>0}leave(t){const e=this.entered.length;var i,n;return this.entered=(i=this.entered.filter(this.isNodeInDocument),n=t,i.filter(s=>s!==n)),e>0&&this.entered.length===0}reset(){this.entered=[]}constructor(t){this.entered=[],this.isNodeInDocument=t}}class le{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(t=>{Object.defineProperty(this.item,t,{configurable:!0,enumerable:!0,get:()=>(console.warn(`Browser doesn't allow reading "${t}" until the drop event.`),null)})})}loadDataTransfer(t){if(t){const e={};Object.keys(this.config.exposeProperties).forEach(i=>{const n=this.config.exposeProperties[i];n!=null&&(e[i]={value:n(t,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,e)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(t,e){return e===t.getSourceId()}endDrag(){}constructor(t){this.config=t,this.item={},this.initializeExposedProperties()}}const $t="__NATIVE_FILE__",Xt="__NATIVE_URL__",qt="__NATIVE_TEXT__",Gt="__NATIVE_HTML__",It=Object.freeze(Object.defineProperty({__proto__:null,FILE:$t,HTML:Gt,TEXT:qt,URL:Xt},Symbol.toStringTag,{value:"Module"}));function rt(r,t,e){const i=t.reduce((n,s)=>n||r.getData(s),"");return i??e}const ut={[$t]:{exposeProperties:{files:r=>Array.prototype.slice.call(r.files),items:r=>r.items,dataTransfer:r=>r},matchesTypes:["Files"]},[Gt]:{exposeProperties:{html:(r,t)=>rt(r,t,""),dataTransfer:r=>r},matchesTypes:["Html","text/html"]},[Xt]:{exposeProperties:{urls:(r,t)=>rt(r,t,"").split(`
|
|
2
|
-
`),dataTransfer:r=>r},matchesTypes:["Url","text/uri-list"]},[qt]:{exposeProperties:{text:(r,t)=>rt(r,t,""),dataTransfer:r=>r},matchesTypes:["Text","text/plain"]}};function nt(r){if(!r)return null;const t=Array.prototype.slice.call(r.types||[]);return Object.keys(ut).filter(e=>{const i=ut[e];return!!i?.matchesTypes&&i.matchesTypes.some(n=>t.indexOf(n)>-1)})[0]||null}const ge=Yt(()=>/firefox/i.test(navigator.userAgent)),Ct=Yt(()=>!!window.safari);class Nt{interpolate(t){const{xs:e,ys:i,c1s:n,c2s:s,c3s:o}=this;let a=e.length-1;if(t===e[a])return i[a];let c,u=0,d=o.length-1;for(;u<=d;){c=Math.floor(.5*(u+d));const h=e[c];if(h<t)u=c+1;else{if(!(h>t))return i[c];d=c-1}}a=Math.max(0,d);const g=t-e[a],f=g*g;return i[a]+n[a]*g+s[a]*f+o[a]*g*f}constructor(t,e){const{length:i}=t,n=[];for(let h=0;h<i;h++)n.push(h);n.sort((h,m)=>t[h]<t[m]?-1:1);const s=[],o=[];let a,c;for(let h=0;h<i-1;h++)a=t[h+1]-t[h],c=e[h+1]-e[h],s.push(a),o.push(c/a);const u=[o[0]];for(let h=0;h<s.length-1;h++){const m=o[h],y=o[h+1];if(m*y<=0)u.push(0);else{a=s[h];const S=s[h+1],O=a+S;u.push(3*O/((O+S)/m+(O+a)/y))}}u.push(o[o.length-1]);const d=[],g=[];let f;for(let h=0;h<u.length-1;h++){f=o[h];const m=u[h],y=1/s[h],S=m+u[h+1]-f-f;d.push((f-m-S)*y),g.push(S*y*y)}this.xs=t,this.ys=e,this.c1s=u,this.c2s=d,this.c3s=g}}function Kt(r){const t=r.nodeType===1?r:r.parentElement;if(!t)return null;const{top:e,left:i}=t.getBoundingClientRect();return{x:i,y:e}}function X(r){return{x:r.clientX,y:r.clientY}}function fe(r,t,e,i,n){const s=(o=t).nodeName==="IMG"&&(ge()||!(!((a=document.documentElement)===null||a===void 0)&&a.contains(o)));var o,a;const c=Kt(s?r:t),u={x:e.x-c.x,y:e.y-c.y},{offsetWidth:d,offsetHeight:g}=r,{anchorX:f,anchorY:h}=i,{dragPreviewWidth:m,dragPreviewHeight:y}=function(b,L,tt,A){let H=b?L.width:tt,_=b?L.height:A;return Ct()&&b&&(_/=window.devicePixelRatio,H/=window.devicePixelRatio),{dragPreviewWidth:H,dragPreviewHeight:_}}(s,t,d,g),{offsetX:S,offsetY:O}=n,D=O===0||O;return{x:S===0||S?S:new Nt([0,.5,1],[u.x,u.x/d*m,u.x+m-d]).interpolate(f),y:D?O:(()=>{let b=new Nt([0,.5,1],[u.y,u.y/g*y,u.y+y-g]).interpolate(h);return Ct()&&s&&(b+=(window.devicePixelRatio-1)*y),b})()}}let pe=class{get window(){return this.globalContext?this.globalContext:typeof window<"u"?window:void 0}get document(){var r;return!((r=this.globalContext)===null||r===void 0)&&r.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var r;return((r=this.optionsArgs)===null||r===void 0?void 0:r.rootElement)||this.window}constructor(r,t){this.ownerDocument=null,this.globalContext=r,this.optionsArgs=t}};function ve(r,t,e){return t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}function Pt(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{},i=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(e).filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.forEach(function(n){ve(r,n,e[n])})}return r}class me{profile(){var t,e;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((t=this.dragStartSourceIds)===null||t===void 0?void 0:t.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((e=this.dragOverTargetIds)===null||e===void 0?void 0:e.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const t=this.rootElement;if(t!==void 0){if(t.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");t.__isReactDndBackendSetUp=!0,this.addEventListeners(t)}}teardown(){const t=this.rootElement;var e;t!==void 0&&(t.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId&&((e=this.window)===null||e===void 0||e.cancelAnimationFrame(this.asyncEndDragFrameId)))}connectDragPreview(t,e,i){return this.sourcePreviewNodeOptions.set(t,i),this.sourcePreviewNodes.set(t,e),()=>{this.sourcePreviewNodes.delete(t),this.sourcePreviewNodeOptions.delete(t)}}connectDragSource(t,e,i){this.sourceNodes.set(t,e),this.sourceNodeOptions.set(t,i);const n=o=>this.handleDragStart(o,t),s=o=>this.handleSelectStart(o);return e.setAttribute("draggable","true"),e.addEventListener("dragstart",n),e.addEventListener("selectstart",s),()=>{this.sourceNodes.delete(t),this.sourceNodeOptions.delete(t),e.removeEventListener("dragstart",n),e.removeEventListener("selectstart",s),e.setAttribute("draggable","false")}}connectDropTarget(t,e){const i=o=>this.handleDragEnter(o,t),n=o=>this.handleDragOver(o,t),s=o=>this.handleDrop(o,t);return e.addEventListener("dragenter",i),e.addEventListener("dragover",n),e.addEventListener("drop",s),()=>{e.removeEventListener("dragenter",i),e.removeEventListener("dragover",n),e.removeEventListener("drop",s)}}addEventListeners(t){t.addEventListener&&(t.addEventListener("dragstart",this.handleTopDragStart),t.addEventListener("dragstart",this.handleTopDragStartCapture,!0),t.addEventListener("dragend",this.handleTopDragEndCapture,!0),t.addEventListener("dragenter",this.handleTopDragEnter),t.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.addEventListener("dragover",this.handleTopDragOver),t.addEventListener("dragover",this.handleTopDragOverCapture,!0),t.addEventListener("drop",this.handleTopDrop),t.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(t){t.removeEventListener&&(t.removeEventListener("dragstart",this.handleTopDragStart),t.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),t.removeEventListener("dragend",this.handleTopDragEndCapture,!0),t.removeEventListener("dragenter",this.handleTopDragEnter),t.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.removeEventListener("dragover",this.handleTopDragOver),t.removeEventListener("dragover",this.handleTopDragOverCapture,!0),t.removeEventListener("drop",this.handleTopDrop),t.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const t=this.monitor.getSourceId(),e=this.sourceNodeOptions.get(t);return Pt({dropEffect:this.altKeyPressed?"copy":"move"},e||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const t=this.monitor.getSourceId();return Pt({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(t)||{})}isDraggingNativeItem(){const t=this.monitor.getItemType();return Object.keys(It).some(e=>It[e]===t)}beginDragNativeItem(t,e){this.clearCurrentDragSourceNode(),this.currentNativeSource=function(i,n){const s=ut[i];if(!s)throw new Error(`native type ${i} has no configuration`);const o=new le(s);return o.loadDataTransfer(n),o}(t,e),this.currentNativeHandle=this.registry.addSource(t,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(t){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=t,this.mouseMoveTimeoutTimer=setTimeout(()=>{var e;return(e=this.rootElement)===null||e===void 0?void 0:e.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},1e3)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){var t;return this.currentDragSourceNode=null,this.rootElement&&((t=this.window)===null||t===void 0||t.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)),this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(t,e){t.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(e))}handleDragEnter(t,e){this.dragEnterTargetIds.unshift(e)}handleDragOver(t,e){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(e)}handleDrop(t,e){this.dropTargetIds.unshift(e)}constructor(t,e,i){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=n=>{const s=this.sourceNodes.get(n);return s&&Kt(s)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=n=>!!(n&&this.document&&this.document.body&&this.document.body.contains(n)),this.endDragIfSourceWasRemovedFromDOM=()=>{const n=this.currentDragSourceNode;n==null||this.isNodeInDocument(n)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=n=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(n||[],{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=n=>{if(n.defaultPrevented)return;const{dragStartSourceIds:s}=this;this.dragStartSourceIds=null;const o=X(n);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(s||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:o});const{dataTransfer:a}=n,c=nt(a);if(this.monitor.isDragging()){if(a&&typeof a.setDragImage=="function"){const d=this.monitor.getSourceId(),g=this.sourceNodes.get(d),f=this.sourcePreviewNodes.get(d)||g;if(f){const{anchorX:h,anchorY:m,offsetX:y,offsetY:S}=this.getCurrentSourcePreviewNodeOptions(),O=fe(g,f,o,{anchorX:h,anchorY:m},{offsetX:y,offsetY:S});a.setDragImage(f,O.x,O.y)}}try{a?.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(n.target);const{captureDraggingState:u}=this.getCurrentSourcePreviewNodeOptions();u?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(c)this.beginDragNativeItem(c);else{if(a&&!a.types&&(n.target&&!n.target.hasAttribute||!n.target.hasAttribute("draggable")))return;n.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=n=>{var s;if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()&&((s=this.currentNativeSource)===null||s===void 0||s.loadDataTransfer(n.dataTransfer)),!this.enterLeaveCounter.enter(n.target)||this.monitor.isDragging())return;const{dataTransfer:o}=n,a=nt(o);a&&this.beginDragNativeItem(a,o)},this.handleTopDragEnter=n=>{const{dragEnterTargetIds:s}=this;this.dragEnterTargetIds=[],this.monitor.isDragging()&&(this.altKeyPressed=n.altKey,s.length>0&&this.actions.hover(s,{clientOffset:X(n)}),s.some(o=>this.monitor.canDropOnTarget(o))&&(n.preventDefault(),n.dataTransfer&&(n.dataTransfer.dropEffect=this.getCurrentDropEffect())))},this.handleTopDragOverCapture=n=>{var s;this.dragOverTargetIds=[],this.isDraggingNativeItem()&&((s=this.currentNativeSource)===null||s===void 0||s.loadDataTransfer(n.dataTransfer))},this.handleTopDragOver=n=>{const{dragOverTargetIds:s}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging())return n.preventDefault(),void(n.dataTransfer&&(n.dataTransfer.dropEffect="none"));this.altKeyPressed=n.altKey,this.lastClientOffset=X(n),this.scheduleHover(s),(s||[]).some(o=>this.monitor.canDropOnTarget(o))?(n.preventDefault(),n.dataTransfer&&(n.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?n.preventDefault():(n.preventDefault(),n.dataTransfer&&(n.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=n=>{this.isDraggingNativeItem()&&n.preventDefault(),this.enterLeaveCounter.leave(n.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=n=>{var s;this.dropTargetIds=[],this.isDraggingNativeItem()?(n.preventDefault(),(s=this.currentNativeSource)===null||s===void 0||s.loadDataTransfer(n.dataTransfer)):nt(n.dataTransfer)&&n.preventDefault(),this.enterLeaveCounter.reset()},this.handleTopDrop=n=>{const{dropTargetIds:s}=this;this.dropTargetIds=[],this.actions.hover(s,{clientOffset:X(n)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=n=>{const s=n.target;typeof s.dragDrop=="function"&&(s.tagName==="INPUT"||s.tagName==="SELECT"||s.tagName==="TEXTAREA"||s.isContentEditable||(n.preventDefault(),s.dragDrop()))},this.options=new pe(e,i),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.enterLeaveCounter=new he(this.isNodeInDocument)}}const Sr=function(r,t,e){return new me(r,t,e)};var M,zt=(r,t,e)=>{if(!t.has(r))throw TypeError("Cannot "+e)},l=(r,t,e)=>(zt(r,t,"read from private field"),e?e.call(r):t.get(r)),E=(r,t,e)=>{if(t.has(r))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(r):t.set(r,e)},x=(r,t,e,i)=>(zt(r,t,"write to private field"),t.set(r,e),e),ye=class{constructor(){E(this,M,void 0),this.register=r=>{l(this,M).push(r)},this.unregister=r=>{let t;for(;(t=l(this,M).indexOf(r))!==-1;)l(this,M).splice(t,1)},this.backendChanged=r=>{for(let t of l(this,M))t.backendChanged(r)},x(this,M,[])}};M=new WeakMap;var T,B,w,C,N,dt,ht,lt,G,K,W,z=class{constructor(r,t,e){if(E(this,T,void 0),E(this,B,void 0),E(this,w,void 0),E(this,C,void 0),E(this,N,void 0),E(this,dt,(i,n,s)=>{if(!s.backend)throw new Error(`You must specify a 'backend' property in your Backend entry: ${JSON.stringify(s)}`);let o=s.backend(i,n,s.options),a=s.id,c=!s.id&&o&&o.constructor;if(c&&(a=o.constructor.name),!a)throw new Error(`You must specify an 'id' property in your Backend entry: ${JSON.stringify(s)}
|
|
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
|
-
This might be unsupported in the future, please specify 'id' explicitely for every backend.`),l(this,w)[a])throw new Error(`You must specify a unique 'id' property in your Backend entry:
|
|
5
|
-
${JSON.stringify(s)} (conflicts with: ${JSON.stringify(l(this,w)[a])})`);return{id:a,instance:o,preview:s.preview??!1,transition:s.transition,skipDispatchOnTransition:s.skipDispatchOnTransition??!1}}),this.setup=()=>{if(!(typeof window>"u")){if(z.isSetUp)throw new Error("Cannot have two MultiBackends at the same time.");z.isSetUp=!0,l(this,ht).call(this,window),l(this,w)[l(this,T)].instance.setup()}},this.teardown=()=>{typeof window>"u"||(z.isSetUp=!1,l(this,lt).call(this,window),l(this,w)[l(this,T)].instance.teardown())},this.connectDragSource=(i,n,s)=>l(this,W).call(this,"connectDragSource",i,n,s),this.connectDragPreview=(i,n,s)=>l(this,W).call(this,"connectDragPreview",i,n,s),this.connectDropTarget=(i,n,s)=>l(this,W).call(this,"connectDropTarget",i,n,s),this.profile=()=>l(this,w)[l(this,T)].instance.profile(),this.previewEnabled=()=>l(this,w)[l(this,T)].preview,this.previewsList=()=>l(this,B),this.backendsList=()=>l(this,C),E(this,ht,i=>{l(this,C).forEach(n=>{n.transition&&i.addEventListener(n.transition.event,l(this,G))})}),E(this,lt,i=>{l(this,C).forEach(n=>{n.transition&&i.removeEventListener(n.transition.event,l(this,G))})}),E(this,G,i=>{let n=l(this,T);if(l(this,C).some(s=>!(s.id===l(this,T)||!s.transition||!s.transition.check(i))&&(x(this,T,s.id),!0)),l(this,T)!==n){l(this,w)[n].instance.teardown(),Object.keys(l(this,N)).forEach(a=>{let c=l(this,N)[a];c.unsubscribe(),c.unsubscribe=l(this,K).call(this,c.func,...c.args)}),l(this,B).backendChanged(this);let s=l(this,w)[l(this,T)];if(s.instance.setup(),s.skipDispatchOnTransition)return;let o=new i.constructor(i.type,i);i.target?.dispatchEvent(o)}}),E(this,K,(i,n,s,o)=>l(this,w)[l(this,T)].instance[i](n,s,o)),E(this,W,(i,n,s,o)=>{let a=`${i}_${n}`,c=l(this,K).call(this,i,n,s,o);return l(this,N)[a]={func:i,args:[n,s,o],unsubscribe:c},()=>{l(this,N)[a].unsubscribe(),delete l(this,N)[a]}}),!e||!e.backends||e.backends.length<1)throw new Error(`You must specify at least one Backend, if you are coming from 2.x.x (or don't understand this error)
|
|
6
|
-
see this guide: https://github.com/louisbrunner/dnd-multi-backend/tree/master/packages/react-dnd-multi-backend#migrating-from-2xx`);x(this,B,new ye),x(this,w,{}),x(this,C,[]),e.backends.forEach(i=>{let n=l(this,dt).call(this,r,t,i);l(this,w)[n.id]=n,l(this,C).push(n)}),x(this,T,l(this,C)[0].id),x(this,N,{})}},Vt=z;T=new WeakMap,B=new WeakMap,w=new WeakMap,C=new WeakMap,N=new WeakMap,dt=new WeakMap,ht=new WeakMap,lt=new WeakMap,G=new WeakMap,K=new WeakMap,W=new WeakMap,Vt.isSetUp=!1;var De=(r,t,e)=>new Vt(r,t,e),Jt=(r,t)=>({event:r,check:t}),Or=Jt("touchstart",r=>{let t=r;return t.touches!==null&&t.touches!==void 0}),Tr=Jt("mousedown",r=>r.type.indexOf("touch")===-1&&r.type.indexOf("mouse")!==-1);const mt=v.createContext({dragDropManager:void 0});function p(r,t,...e){if(ae!==void 0&&t===void 0)throw new Error("invariant requires an error message argument");if(!r){let i;if(t===void 0)i=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let n=0;i=new Error(t.replace(/%s/g,function(){return e[n++]})),i.name="Invariant Violation"}throw i.framesToPop=1,i}}function Zt(r){return typeof r=="object"}const yt="dnd-core/INIT_COORDS",Dt="dnd-core/BEGIN_DRAG",Qt="dnd-core/PUBLISH_DRAG_SOURCE",Z="dnd-core/HOVER",bt="dnd-core/DROP",St="dnd-core/END_DRAG";function Mt(r,t){return{type:yt,payload:{sourceClientOffset:t||null,clientOffset:r||null}}}const be={type:yt,payload:{clientOffset:null,sourceClientOffset:null}};function Se(r){return function(t=[],e={publishSource:!0}){const{publishSource:i=!0,clientOffset:n,getSourceClientOffset:s}=e,o=r.getMonitor(),a=r.getRegistry();r.dispatch(Mt(n)),function(f,h,m){p(!h.isDragging(),"Cannot call beginDrag while dragging."),f.forEach(function(y){p(m.getSource(y),"Expected sourceIds to be registered.")})}(t,o,a);const c=function(f,h){let m=null;for(let y=f.length-1;y>=0;y--)if(h.canDragSource(f[y])){m=f[y];break}return m}(t,o);if(c==null)return void r.dispatch(be);let u=null;if(n){if(!s)throw new Error("getSourceClientOffset must be defined");(function(f){p(typeof f=="function","When clientOffset is provided, getSourceClientOffset must be a function.")})(s),u=s(c)}r.dispatch(Mt(n,u));const d=a.getSource(c).beginDrag(o,c);if(d==null)return;(function(f){p(Zt(f),"Item must be an object.")})(d),a.pinSource(c);const g=a.getSourceType(c);return{type:Dt,payload:{itemType:g,item:d,sourceId:c,clientOffset:n||null,sourceClientOffset:u||null,isSourcePublic:!!i}}}}function Oe(r,t,e){return t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}function Te(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{},i=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(e).filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.forEach(function(n){Oe(r,n,e[n])})}return r}function we(r){return function(t={}){const e=r.getMonitor(),i=r.getRegistry();(function(s){p(s.isDragging(),"Cannot call drop while not dragging."),p(!s.didDrop(),"Cannot call drop twice during one drag operation.")})(e),function(s){const o=s.getTargetIds().filter(s.canDropOnTarget,s);return o.reverse(),o}(e).forEach((s,o)=>{const a=function(u,d,g,f){const h=g.getTarget(u);let m=h?h.drop(f,u):void 0;return function(y){p(y===void 0||Zt(y),"Drop result must either be an object or undefined.")}(m),m===void 0&&(m=d===0?{}:f.getDropResult()),m}(s,o,i,e),c={type:bt,payload:{dropResult:Te({},t,a)}};r.dispatch(c)})}}function Ee(r){return function(){const t=r.getMonitor(),e=r.getRegistry();(function(n){p(n.isDragging(),"Cannot call endDrag while not dragging.")})(t);const i=t.getSourceId();return i!=null&&(e.getSource(i,!0).endDrag(t,i),e.unpinSource()),{type:St}}}function gt(r,t){return t===null?r===null:Array.isArray(r)?r.some(e=>e===t):r===t}function Ie(r){return function(t,{clientOffset:e}={}){(function(o){p(Array.isArray(o),"Expected targetIds to be an array.")})(t);const i=t.slice(0),n=r.getMonitor(),s=r.getRegistry();return function(o,a,c){for(let u=o.length-1;u>=0;u--){const d=o[u];gt(a.getTargetType(d),c)||o.splice(u,1)}}(i,s,n.getItemType()),function(o,a,c){p(a.isDragging(),"Cannot call hover while not dragging."),p(!a.didDrop(),"Cannot call hover after drop.");for(let u=0;u<o.length;u++){const d=o[u];p(o.lastIndexOf(d)===u,"Expected targetIds to be unique in the passed array."),p(c.getTarget(d),"Expected targetIds to be registered.")}}(i,n,s),function(o,a,c){o.forEach(function(u){c.getTarget(u).hover(a,u)})}(i,n,s),{type:Z,payload:{targetIds:i,clientOffset:e||null}}}}function Ce(r){return function(){if(r.getMonitor().isDragging())return{type:Qt}}}class Ne{receiveBackend(t){this.backend=t}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const t=this,{dispatch:e}=this.store,i=function(n){return{beginDrag:Se(n),publishDragSource:Ce(n),hover:Ie(n),drop:we(n),endDrag:Ee(n)}}(this);return Object.keys(i).reduce((n,s)=>{const o=i[s];var a;return n[s]=(a=o,(...c)=>{const u=a.apply(t,c);u!==void 0&&e(u)}),n},{})}dispatch(t){this.store.dispatch(t)}constructor(t,e){this.isSetUp=!1,this.handleRefCountChange=()=>{const i=this.store.getState().refCount>0;this.backend&&(i&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!i&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=t,this.monitor=e,t.subscribe(this.handleRefCountChange)}}function xt(r,t){return{x:r.x-t.x,y:r.y-t.y}}const Y=[],Ot=[];Y.__IS_NONE__=!0,Ot.__IS_ALL__=!0;class Pe{subscribeToStateChange(t,e={}){const{handlerIds:i}=e;p(typeof t=="function","listener must be a function."),p(i===void 0||Array.isArray(i),"handlerIds, when specified, must be an array of strings.");let n=this.store.getState().stateId;return this.store.subscribe(()=>{const s=this.store.getState(),o=s.stateId;try{o===n||o===n+1&&!function(c,u){if(c===Y)return!1;if(c===Ot||u===void 0)return!0;const d=(g=c,u.filter(f=>g.indexOf(f)>-1));var g;return d.length>0}(s.dirtyHandlerIds,i)||t()}finally{n=o}})}subscribeToOffsetChange(t){p(typeof t=="function","listener must be a function.");let e=this.store.getState().dragOffset;return this.store.subscribe(()=>{const i=this.store.getState().dragOffset;i!==e&&(e=i,t())})}canDragSource(t){if(!t)return!1;const e=this.registry.getSource(t);return p(e,`Expected to find a valid source. sourceId=${t}`),!this.isDragging()&&e.canDrag(this,t)}canDropOnTarget(t){if(!t)return!1;const e=this.registry.getTarget(t);return p(e,`Expected to find a valid target. targetId=${t}`),!this.isDragging()||this.didDrop()?!1:gt(this.registry.getTargetType(t),this.getItemType())&&e.canDrop(this,t)}isDragging(){return!!this.getItemType()}isDraggingSource(t){if(!t)return!1;const e=this.registry.getSource(t,!0);return p(e,`Expected to find a valid source. sourceId=${t}`),!this.isDragging()||!this.isSourcePublic()?!1:this.registry.getSourceType(t)===this.getItemType()&&e.isDragging(this,t)}isOverTarget(t,e={shallow:!1}){if(!t)return!1;const{shallow:i}=e;if(!this.isDragging())return!1;const n=this.registry.getTargetType(t),s=this.getItemType();if(s&&!gt(n,s))return!1;const o=this.getTargetIds();if(!o.length)return!1;const a=o.indexOf(t);return i?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 function(t){const{clientOffset:e,initialClientOffset:i,initialSourceClientOffset:n}=t;return e&&i&&n?xt(function(s,o){return{x:s.x+o.x,y:s.y+o.y}}(e,n),i):null}(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return function(t){const{clientOffset:e,initialClientOffset:i}=t;return e&&i?xt(e,i):null}(this.store.getState().dragOffset)}constructor(t,e){this.store=t,this.registry=e}}const kt=V!==void 0?V:self,Rt=kt.MutationObserver||kt.WebKitMutationObserver;function te(r){return function(){const t=setTimeout(i,0),e=setInterval(i,50);function i(){clearTimeout(t),clearInterval(e),r()}}}const Me=typeof Rt=="function"?function(r){let t=1;const e=new Rt(r),i=document.createTextNode("");return e.observe(i,{characterData:!0}),function(){t=-t,i.data=t}}:te;class xe{call(){try{this.task&&this.task()}catch(t){this.onError(t)}finally{this.task=null,this.release(this)}}constructor(t,e){this.onError=t,this.release=e,this.task=null}}const ee=new class{enqueueTask(r){const{queue:t,requestFlush:e}=this;t.length||(e(),this.flushing=!0),t[t.length]=r}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:r}=this;for(;this.index<r.length;){const t=this.index;if(this.index++,r[t].call(),this.index>this.capacity){for(let e=0,i=r.length-this.index;e<i;e++)r[e]=r[e+this.index];r.length-=this.index,this.index=0}}r.length=0,this.index=0,this.flushing=!1},this.registerPendingError=r=>{this.pendingErrors.push(r),this.requestErrorThrow()},this.requestFlush=Me(this.flush),this.requestErrorThrow=te(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}},ke=new class{create(r){const t=this.freeTasks,e=t.length?t.pop():new xe(this.onError,i=>t[t.length]=i);return e.task=r,e}constructor(r){this.onError=r,this.freeTasks=[]}}(ee.registerPendingError),Tt="dnd-core/ADD_SOURCE",wt="dnd-core/ADD_TARGET",Et="dnd-core/REMOVE_SOURCE",Q="dnd-core/REMOVE_TARGET";function ft(r,t){t&&Array.isArray(r)?r.forEach(e=>ft(e,!1)):p(typeof r=="string"||typeof r=="symbol",t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var I;(function(r){r.SOURCE="SOURCE",r.TARGET="TARGET"})(I||(I={}));let Re=0;function Le(r){const t=(Re++).toString();switch(r){case I.SOURCE:return`S${t}`;case I.TARGET:return`T${t}`;default:throw new Error(`Unknown Handler Role: ${r}`)}}function Lt(r){switch(r[0]){case"S":return I.SOURCE;case"T":return I.TARGET;default:throw new Error(`Cannot parse handler ID: ${r}`)}}function _t(r,t){const e=r.entries();let i=!1;do{const{done:n,value:[,s]}=e.next();if(s===t)return!0;i=!!n}while(!i);return!1}class _e{addSource(t,e){ft(t),function(n){p(typeof n.canDrag=="function","Expected canDrag to be a function."),p(typeof n.beginDrag=="function","Expected beginDrag to be a function."),p(typeof n.endDrag=="function","Expected endDrag to be a function.")}(e);const i=this.addHandler(I.SOURCE,t,e);return this.store.dispatch(function(n){return{type:Tt,payload:{sourceId:n}}}(i)),i}addTarget(t,e){ft(t,!0),function(n){p(typeof n.canDrop=="function","Expected canDrop to be a function."),p(typeof n.hover=="function","Expected hover to be a function."),p(typeof n.drop=="function","Expected beginDrag to be a function.")}(e);const i=this.addHandler(I.TARGET,t,e);return this.store.dispatch(function(n){return{type:wt,payload:{targetId:n}}}(i)),i}containsHandler(t){return _t(this.dragSources,t)||_t(this.dropTargets,t)}getSource(t,e=!1){return p(this.isSourceId(t),"Expected a valid source ID."),e&&t===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(t)}getTarget(t){return p(this.isTargetId(t),"Expected a valid target ID."),this.dropTargets.get(t)}getSourceType(t){return p(this.isSourceId(t),"Expected a valid source ID."),this.types.get(t)}getTargetType(t){return p(this.isTargetId(t),"Expected a valid target ID."),this.types.get(t)}isSourceId(t){return Lt(t)===I.SOURCE}isTargetId(t){return Lt(t)===I.TARGET}removeSource(t){var e;p(this.getSource(t),"Expected an existing source."),this.store.dispatch(function(i){return{type:Et,payload:{sourceId:i}}}(t)),e=()=>{this.dragSources.delete(t),this.types.delete(t)},ee.enqueueTask(ke.create(e))}removeTarget(t){p(this.getTarget(t),"Expected an existing target."),this.store.dispatch(function(e){return{type:Q,payload:{targetId:e}}}(t)),this.dropTargets.delete(t),this.types.delete(t)}pinSource(t){const e=this.getSource(t);p(e,"Expected an existing source."),this.pinnedSourceId=t,this.pinnedSource=e}unpinSource(){p(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(t,e,i){const n=Le(t);return this.types.set(n,e),t===I.SOURCE?this.dragSources.set(n,i):t===I.TARGET&&this.dropTargets.set(n,i),n}constructor(t){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=t}}const je=(r,t)=>r===t;function Ae(r=Y,t){switch(t.type){case Z:break;case Tt:case wt:case Q:case Et:return Y;default:return Ot}const{targetIds:e=[],prevTargetIds:i=[]}=t.payload,n=function(c,u){const d=new Map,g=h=>{d.set(h,d.has(h)?d.get(h)+1:1)};c.forEach(g),u.forEach(g);const f=[];return d.forEach((h,m)=>{h===1&&f.push(m)}),f}(e,i);if(!(n.length>0||!function(c,u,d=je){if(c.length!==u.length)return!1;for(let g=0;g<c.length;++g)if(!d(c[g],u[g]))return!1;return!0}(e,i)))return Y;const o=i[i.length-1],a=e[e.length-1];return o!==a&&(o&&n.push(o),a&&n.push(a)),n}function He(r,t,e){return t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}const jt={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function Ue(r=jt,t){const{payload:e}=t;switch(t.type){case yt:case Dt:return{initialSourceClientOffset:e.sourceClientOffset,initialClientOffset:e.clientOffset,clientOffset:e.clientOffset};case Z:return i=r.clientOffset,n=e.clientOffset,!i&&!n||i&&n&&i.x===n.x&&i.y===n.y?r:function(s){for(var o=1;o<arguments.length;o++){var a=arguments[o]!=null?arguments[o]:{},c=Object.keys(a);typeof Object.getOwnPropertySymbols=="function"&&(c=c.concat(Object.getOwnPropertySymbols(a).filter(function(u){return Object.getOwnPropertyDescriptor(a,u).enumerable}))),c.forEach(function(u){He(s,u,a[u])})}return s}({},r,{clientOffset:e.clientOffset});case St:case bt:return jt;default:return r}var i,n}function Fe(r,t,e){return t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}function j(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{},i=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(e).filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.forEach(function(n){Fe(r,n,e[n])})}return r}const Be={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function We(r=Be,t){const{payload:e}=t;switch(t.type){case Dt:return j({},r,{itemType:e.itemType,item:e.item,sourceId:e.sourceId,isSourcePublic:e.isSourcePublic,dropResult:null,didDrop:!1});case Qt:return j({},r,{isSourcePublic:!0});case Z:return j({},r,{targetIds:e.targetIds});case Q:return r.targetIds.indexOf(e.targetId)===-1?r:j({},r,{targetIds:(i=r.targetIds,n=e.targetId,i.filter(s=>s!==n))});case bt:return j({},r,{dropResult:e.dropResult,didDrop:!0,targetIds:[]});case St:return j({},r,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return r}var i,n}function Ye(r=0,t){switch(t.type){case Tt:case wt:return r+1;case Et:case Q:return r-1;default:return r}}function $e(r=0){return r+1}function Xe(r,t,e){return t in r?Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[t]=e,r}function qe(r){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{},i=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(e).filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.forEach(function(n){Xe(r,n,e[n])})}return r}function Ge(r={},t){return{dirtyHandlerIds:Ae(r.dirtyHandlerIds,{type:t.type,payload:qe({},t.payload,{prevTargetIds:(e=r,i="dragOperation.targetIds",n=[],i.split(".").reduce((s,o)=>s&&s[o]?s[o]:n||null,e))})}),dragOffset:Ue(r.dragOffset,t),refCount:Ye(r.refCount,t),dragOperation:We(r.dragOperation,t),stateId:$e(r.stateId)};var e,i,n}function Ke(r,t=void 0,e={},i=!1){const n=function(c){const u=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return ue(Ge,c&&u&&u({name:"dnd-core",instanceId:"dnd-core"}))}(i),s=new Pe(n,new _e(n)),o=new Ne(n,s),a=r(o,t,e);return o.receiveBackend(a),o}function ze(r,t){if(r==null)return{};var e,i,n=function(o,a){if(o==null)return{};var c,u,d={},g=Object.keys(o);for(u=0;u<g.length;u++)c=g[u],a.indexOf(c)>=0||(d[c]=o[c]);return d}(r,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(r);for(i=0;i<s.length;i++)e=s[i],t.indexOf(e)>=0||Object.prototype.propertyIsEnumerable.call(r,e)&&(n[e]=r[e])}return n}let At=0;const q=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var Ht,Ut,Ve=v.memo(function(r){var{children:t}=r,e=ze(r,["children"]);const[i,n]=function(s){if("manager"in s)return[{dragDropManager:s.manager},!1];const o=function(c,u=Ft(),d,g){const f=u;return f[q]||(f[q]={dragDropManager:Ke(c,u,d,g)}),f[q]}(s.backend,s.context,s.options,s.debugMode),a=!s.context;return[o,a]}(e);return v.useEffect(()=>{if(n){const s=Ft();return++At,()=>{--At==0&&(s[q]=null)}}},[]),de.jsx(mt.Provider,{value:i,children:t})});function Ft(){return V!==void 0?V:window}var Je=(Ut||(Ut=1,Ht=function r(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var i,n,s;if(Array.isArray(t)){if((i=t.length)!=e.length)return!1;for(n=i;n--!=0;)if(!r(t[n],e[n]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();if((i=(s=Object.keys(t)).length)!==Object.keys(e).length)return!1;for(n=i;n--!=0;)if(!Object.prototype.hasOwnProperty.call(e,s[n]))return!1;for(n=i;n--!=0;){var o=s[n];if(!r(t[o],e[o]))return!1}return!0}return t!=t&&e!=e}),Ht);const Ze=ce(Je),k=typeof window<"u"?v.useLayoutEffect:v.useEffect;function re(r,t,e){const[i,n]=v.useState(()=>t(r)),s=v.useCallback(()=>{const o=t(r);Ze(i,o)||(n(o),e&&e())},[i,r,e]);return k(s),[i,s]}function ne(r,t,e){return function(i,n,s){const[o,a]=re(i,n,s);return k(function(){const c=i.getHandlerId();if(c!=null)return i.subscribeToStateChange(a,{handlerIds:[c]})},[i,a]),o}(t,r||(()=>({})),()=>e.reconnect())}function ie(r,t){const e=[];return typeof r!="function"&&e.push(r),v.useMemo(()=>typeof r=="function"?r():r,e)}function Qe(r){return v.useMemo(()=>r.hooks.dragSource(),[r])}function tr(r){return v.useMemo(()=>r.hooks.dragPreview(),[r])}let it=!1,st=!1;class er{receiveHandlerId(t){this.sourceId=t}getHandlerId(){return this.sourceId}canDrag(){p(!it,"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 it=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{it=!1}}isDragging(){if(!this.sourceId)return!1;p(!st,"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 st=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{st=!1}}subscribeToStateChange(t,e){return this.internalMonitor.subscribeToStateChange(t,e)}isDraggingSource(t){return this.internalMonitor.isDraggingSource(t)}isOverTarget(t,e){return this.internalMonitor.isOverTarget(t,e)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(t){return this.internalMonitor.subscribeToOffsetChange(t)}canDragSource(t){return this.internalMonitor.canDragSource(t)}canDropOnTarget(t){return this.internalMonitor.canDropOnTarget(t)}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(t){this.sourceId=null,this.internalMonitor=t.getMonitor()}}let ot=!1;class rr{receiveHandlerId(t){this.targetId=t}getHandlerId(){return this.targetId}subscribeToStateChange(t,e){return this.internalMonitor.subscribeToStateChange(t,e)}canDrop(){if(!this.targetId)return!1;p(!ot,"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 ot=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{ot=!1}}isOver(t){return!!this.targetId&&this.internalMonitor.isOverTarget(this.targetId,t)}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(t){this.targetId=null,this.internalMonitor=t.getMonitor()}}function pt(r,t,e,i){let n;if(n!==void 0)return!!n;if(r===t)return!0;if(typeof r!="object"||!r||typeof t!="object"||!t)return!1;const s=Object.keys(r),o=Object.keys(t);if(s.length!==o.length)return!1;const a=Object.prototype.hasOwnProperty.bind(t);for(let c=0;c<s.length;c++){const u=s[c];if(!a(u))return!1;const d=r[u],g=t[u];if(n=void 0,n===!1||n===void 0&&d!==g)return!1}return!0}function vt(r){return r!==null&&typeof r=="object"&&Object.prototype.hasOwnProperty.call(r,"current")}function nr(r){return(t=null,e=null)=>{if(!v.isValidElement(t)){const n=t;return r(n,e),n}const i=t;return function(n){if(typeof n.type=="string")return;const s=n.type.displayName||n.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${s} into a <div>, or turn it into a drag source or a drop target itself.`)}(i),function(n,s){const o=n.ref;return p(typeof o!="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"),o?v.cloneElement(n,{ref:a=>{Bt(o,a),Bt(s,a)}}):v.cloneElement(n,{ref:s})}(i,e?n=>r(n,e):r)}}function se(r){const t={};return Object.keys(r).forEach(e=>{const i=r[e];if(e.endsWith("Ref"))t[e]=r[e];else{const n=nr(i);t[e]=()=>n}}),t}function Bt(r,t){typeof r=="function"?r(t):r.current=t}class ir{receiveHandlerId(t){this.handlerId!==t&&(this.handlerId=t,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(t){this.dragSourceOptionsInternal=t}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(t){this.dragPreviewOptionsInternal=t}reconnect(){const t=this.reconnectDragSource();this.reconnectDragPreview(t)}reconnectDragSource(){const t=this.dragSource,e=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return e&&this.disconnectDragSource(),this.handlerId?t?(e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=t,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,t,this.dragSourceOptions)),e):(this.lastConnectedDragSource=t,e):e}reconnectDragPreview(t=!1){const e=this.dragPreview,i=t||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();i&&this.disconnectDragPreview(),this.handlerId&&(e?i&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=e,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,e,this.dragPreviewOptions)):this.lastConnectedDragPreview=e)}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!pt(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!pt(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(t){this.hooks=se({dragSource:(e,i)=>{this.clearDragSource(),this.dragSourceOptions=i||null,vt(e)?this.dragSourceRef=e:this.dragSourceNode=e,this.reconnectDragSource()},dragPreview:(e,i)=>{this.clearDragPreview(),this.dragPreviewOptions=i||null,vt(e)?this.dragPreviewRef=e:this.dragPreviewNode=e,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=t}}class sr{get connectTarget(){return this.dropTarget}reconnect(){const t=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();t&&this.disconnectDropTarget();const e=this.dropTarget;this.handlerId&&(e?t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=e,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,e,this.dropTargetOptions)):this.lastConnectedDropTarget=e)}receiveHandlerId(t){t!==this.handlerId&&(this.handlerId=t,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(t){this.dropTargetOptionsInternal=t}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!pt(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(t){this.hooks=se({dropTarget:(e,i)=>{this.clearDropTarget(),this.dropTargetOptions=i,vt(e)?this.dropTargetRef=e:this.dropTargetNode=e,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=t}}function R(){const{dragDropManager:r}=v.useContext(mt);return p(r!=null,"Expected drag drop context"),r}class or{beginDrag(){const t=this.spec,e=this.monitor;let i=null;return i=typeof t.item=="object"?t.item:typeof t.item=="function"?t.item(e):{},i??null}canDrag(){const t=this.spec,e=this.monitor;return typeof t.canDrag=="boolean"?t.canDrag:typeof t.canDrag!="function"||t.canDrag(e)}isDragging(t,e){const i=this.spec,n=this.monitor,{isDragging:s}=i;return s?s(n):e===t.getSourceId()}endDrag(){const t=this.spec,e=this.monitor,i=this.connector,{end:n}=t;n&&n(e.getItem(),e),i.reconnect()}constructor(t,e,i){this.spec=t,this.monitor=e,this.connector=i}}function ar(r,t,e){const i=R(),n=function(o,a,c){const u=v.useMemo(()=>new or(o,a,c),[a,c]);return v.useEffect(()=>{u.spec=o},[o]),u}(r,t,e),s=function(o){return v.useMemo(()=>{const a=o.type;return p(a!=null,"spec.type must be defined"),a},[o])}(r);k(function(){if(s!=null){const[o,a]=function(c,u,d){const g=d.getRegistry(),f=g.addSource(c,u);return[f,()=>g.removeSource(f)]}(s,n,i);return t.receiveHandlerId(o),e.receiveHandlerId(o),a}},[i,t,e,n,s])}function wr(r,t){const e=ie(r);p(!e.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 i=function(){const s=R();return v.useMemo(()=>new er(s),[s])}(),n=function(s,o){const a=R(),c=v.useMemo(()=>new ir(a.getBackend()),[a]);return k(()=>(c.dragSourceOptions=s||null,c.reconnect(),()=>c.disconnectDragSource()),[c,s]),k(()=>(c.dragPreviewOptions=o||null,c.reconnect(),()=>c.disconnectDragPreview()),[c,o]),c}(e.options,e.previewOptions);return ar(e,i,n),[ne(e.collect,i,n),Qe(n),tr(n)]}function cr(r){return v.useMemo(()=>r.hooks.dropTarget(),[r])}class ur{canDrop(){const t=this.spec,e=this.monitor;return!t.canDrop||t.canDrop(e.getItem(),e)}hover(){const t=this.spec,e=this.monitor;t.hover&&t.hover(e.getItem(),e)}drop(){const t=this.spec,e=this.monitor;if(t.drop)return t.drop(e.getItem(),e)}constructor(t,e){this.spec=t,this.monitor=e}}function dr(r,t,e){const i=R(),n=function(o,a){const c=v.useMemo(()=>new ur(o,a),[a]);return v.useEffect(()=>{c.spec=o},[o]),c}(r,t),s=function(o){const{accept:a}=o;return v.useMemo(()=>(p(o.accept!=null,"accept must be defined"),Array.isArray(a)?a:[a]),[a])}(r);k(function(){const[o,a]=function(c,u,d){const g=d.getRegistry(),f=g.addTarget(c,u);return[f,()=>g.removeTarget(f)]}(s,n,i);return t.receiveHandlerId(o),e.receiveHandlerId(o),a},[i,t,n,e,s.map(o=>o.toString()).join("|")])}function Er(r,t){const e=ie(r),i=function(){const s=R();return v.useMemo(()=>new rr(s),[s])}(),n=function(s){const o=R(),a=v.useMemo(()=>new sr(o.getBackend()),[o]);return k(()=>(a.dropTargetOptions=s||null,a.reconnect(),()=>a.disconnectDropTarget()),[s]),a}(e.options);return dr(e,i,n),[ne(e.collect,i,n),cr(n)]}var at=(r,t)=>({x:r.x-t.x,y:r.y-t.y}),hr=(r,t)=>{let e=r.getClientOffset();if(e===null)return null;if(!t.current||!t.current.getBoundingClientRect)return at(e,(s=>{let o=s.getInitialClientOffset(),a=s.getInitialSourceClientOffset();return o===null||a===null?{x:0,y:0}:at(o,a)})(r));let i=t.current.getBoundingClientRect(),n={x:i.width/2,y:i.height/2};return at(e,n)},lr=r=>{let t=`translate(${r.x.toFixed(1)}px, ${r.y.toFixed(1)}px)`;return{pointerEvents:"none",position:"fixed",top:0,left:0,transform:t,WebkitTransform:t}},gr=()=>{let r=v.useRef(null),t=function(e){const i=R().getMonitor(),[n,s]=re(i,e);return v.useEffect(()=>i.subscribeToOffsetChange(s)),v.useEffect(()=>i.subscribeToStateChange(s)),n}(e=>({currentOffset:hr(e,r),isDragging:e.isDragging(),itemType:e.getItemType(),item:e.getItem(),monitor:e}));return t.isDragging&&t.currentOffset!==null?{display:!0,itemType:t.itemType,item:t.item,style:lr(t.currentOffset),monitor:t.monitor,ref:r}:{display:!1}};v.createContext(void 0);var P,fr=v.createContext(null),Ir=({portal:r,...t})=>{let[e,i]=v.useState(null);return et.createElement(fr.Provider,{value:r??e},et.createElement(Ve,{backend:De,...t}),r?null:et.createElement("div",{ref:i}))},Cr=()=>{let r=(()=>{let[e,i]=v.useState(!1),n=v.useContext(mt);return v.useEffect(()=>{let s=n?.dragDropManager?.getBackend(),o={backendChanged:a=>{i(a.previewEnabled())}};return i(s.previewEnabled()),s.previewsList().register(o),()=>{s.previewsList().unregister(o)}},[n,n.dragDropManager]),e})(),t=gr();return r?t:{display:!1}};(function(r){r.mouse="mouse",r.touch="touch",r.keyboard="keyboard"})(P||(P={}));class pr{get delay(){var t;return(t=this.args.delay)!==null&&t!==void 0?t:0}get scrollAngleRanges(){return this.args.scrollAngleRanges}get getDropTargetElementsAtPoint(){return this.args.getDropTargetElementsAtPoint}get ignoreContextMenu(){var t;return(t=this.args.ignoreContextMenu)!==null&&t!==void 0&&t}get enableHoverOutsideTarget(){var t;return(t=this.args.enableHoverOutsideTarget)!==null&&t!==void 0&&t}get enableKeyboardEvents(){var t;return(t=this.args.enableKeyboardEvents)!==null&&t!==void 0&&t}get enableMouseEvents(){var t;return(t=this.args.enableMouseEvents)!==null&&t!==void 0&&t}get enableTouchEvents(){var t;return(t=this.args.enableTouchEvents)===null||t===void 0||t}get touchSlop(){return this.args.touchSlop||0}get delayTouchStart(){var t,e,i,n;return(n=(i=(t=this.args)===null||t===void 0?void 0:t.delayTouchStart)!==null&&i!==void 0?i:(e=this.args)===null||e===void 0?void 0:e.delay)!==null&&n!==void 0?n:0}get delayMouseStart(){var t,e,i,n;return(n=(i=(t=this.args)===null||t===void 0?void 0:t.delayMouseStart)!==null&&i!==void 0?i:(e=this.args)===null||e===void 0?void 0:e.delay)!==null&&n!==void 0?n:0}get window(){return this.context&&this.context.window?this.context.window:typeof window<"u"?window:void 0}get document(){var t;return!((t=this.context)===null||t===void 0)&&t.document?this.context.document:this.window?this.window.document:void 0}get rootElement(){var t;return((t=this.args)===null||t===void 0?void 0:t.rootElement)||this.document}constructor(t,e){this.args=t,this.context=e}}const vr=1,mr=0;function ct(r){return r.button===void 0||r.button===mr}function oe(r){return!!r.targetTouches}function J(r,t){return oe(r)?function(e,i){return e.targetTouches.length===1?J(e.targetTouches[0]):i&&e.touches.length===1&&e.touches[0].target===i.target?J(e.touches[0]):void 0}(r,t):{x:r.clientX,y:r.clientY}}const Wt=(()=>{let r=!1;try{addEventListener("test",()=>{},Object.defineProperty({},"passive",{get:()=>(r=!0,!0)}))}catch{}return r})(),F={[P.mouse]:{start:"mousedown",move:"mousemove",end:"mouseup",contextmenu:"contextmenu"},[P.touch]:{start:"touchstart",move:"touchmove",end:"touchend"},[P.keyboard]:{keydown:"keydown"}};class ${profile(){var t;return{sourceNodes:this.sourceNodes.size,sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,targetNodes:this.targetNodes.size,dragOverTargetIds:((t=this.dragOverTargetIds)===null||t===void 0?void 0:t.length)||0}}get document(){return this.options.document}setup(){const t=this.options.rootElement;t&&(p(!$.isSetUp,"Cannot have two Touch backends at the same time."),$.isSetUp=!0,this.addEventListener(t,"start",this.getTopMoveStartHandler()),this.addEventListener(t,"start",this.handleTopMoveStartCapture,!0),this.addEventListener(t,"move",this.handleTopMove),this.addEventListener(t,"move",this.handleTopMoveCapture,!0),this.addEventListener(t,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.addEventListener(t,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.addEventListener(t,"keydown",this.handleCancelOnEscape,!0))}teardown(){const t=this.options.rootElement;t&&($.isSetUp=!1,this._mouseClientOffset={},this.removeEventListener(t,"start",this.handleTopMoveStartCapture,!0),this.removeEventListener(t,"start",this.handleTopMoveStart),this.removeEventListener(t,"move",this.handleTopMoveCapture,!0),this.removeEventListener(t,"move",this.handleTopMove),this.removeEventListener(t,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.removeEventListener(t,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.removeEventListener(t,"keydown",this.handleCancelOnEscape,!0),this.uninstallSourceNodeRemovalObserver())}addEventListener(t,e,i,n=!1){const s=Wt?{capture:n,passive:!1}:n;this.listenerTypes.forEach(function(o){const a=F[o][e];a&&t.addEventListener(a,i,s)})}removeEventListener(t,e,i,n=!1){const s=Wt?{capture:n,passive:!1}:n;this.listenerTypes.forEach(function(o){const a=F[o][e];a&&t.removeEventListener(a,i,s)})}connectDragSource(t,e){const i=this.handleMoveStart.bind(this,t);return this.sourceNodes.set(t,e),this.addEventListener(e,"start",i),()=>{this.sourceNodes.delete(t),this.removeEventListener(e,"start",i)}}connectDragPreview(t,e,i){return this.sourcePreviewNodeOptions.set(t,i),this.sourcePreviewNodes.set(t,e),()=>{this.sourcePreviewNodes.delete(t),this.sourcePreviewNodeOptions.delete(t)}}connectDropTarget(t,e){const i=this.options.rootElement;if(!this.document||!i)return()=>{};const n=s=>{if(!this.document||!i||!this.monitor.isDragging())return;let o;switch(s.type){case F.mouse.move:o={x:s.clientX,y:s.clientY};break;case F.touch.move:var a,c;o={x:((a=s.touches[0])===null||a===void 0?void 0:a.clientX)||0,y:((c=s.touches[0])===null||c===void 0?void 0:c.clientY)||0}}const u=o!=null?this.document.elementFromPoint(o.x,o.y):void 0,d=u&&e.contains(u);return u===e||d?this.handleMove(s,t):void 0};return this.addEventListener(this.document.body,"move",n),this.targetNodes.set(t,e),()=>{this.document&&(this.targetNodes.delete(t),this.removeEventListener(this.document.body,"move",n))}}getTopMoveStartHandler(){return this.options.delayTouchStart||this.options.delayMouseStart?this.handleTopMoveStartDelay:this.handleTopMoveStart}installSourceNodeRemovalObserver(t){this.uninstallSourceNodeRemovalObserver(),this.draggedSourceNode=t,this.draggedSourceNodeRemovalObserver=new MutationObserver(()=>{t&&!t.parentElement&&(this.resurrectSourceNode(),this.uninstallSourceNodeRemovalObserver())}),t&&t.parentElement&&this.draggedSourceNodeRemovalObserver.observe(t.parentElement,{childList:!0})}resurrectSourceNode(){this.document&&this.draggedSourceNode&&(this.draggedSourceNode.style.display="none",this.draggedSourceNode.removeAttribute("data-reactid"),this.document.body.appendChild(this.draggedSourceNode))}uninstallSourceNodeRemovalObserver(){this.draggedSourceNodeRemovalObserver&&this.draggedSourceNodeRemovalObserver.disconnect(),this.draggedSourceNodeRemovalObserver=void 0,this.draggedSourceNode=void 0}constructor(t,e,i){this.getSourceClientOffset=n=>{const s=this.sourceNodes.get(n);return s&&function(o){const a=o.nodeType===1?o:o.parentElement;if(!a)return;const{top:c,left:u}=a.getBoundingClientRect();return{x:u,y:c}}(s)},this.handleTopMoveStartCapture=n=>{ct(n)&&(this.moveStartSourceIds=[])},this.handleMoveStart=n=>{Array.isArray(this.moveStartSourceIds)&&this.moveStartSourceIds.unshift(n)},this.handleTopMoveStart=n=>{if(!ct(n))return;const s=J(n);s&&(oe(n)&&(this.lastTargetTouchFallback=n.targetTouches[0]),this._mouseClientOffset=s),this.waitingForDelay=!1},this.handleTopMoveStartDelay=n=>{if(!ct(n))return;const s=n.type===F.touch.start?this.options.delayTouchStart:this.options.delayMouseStart;this.timeout=setTimeout(this.handleTopMoveStart.bind(this,n),s),this.waitingForDelay=!0},this.handleTopMoveCapture=()=>{this.dragOverTargetIds=[]},this.handleMove=(n,s)=>{this.dragOverTargetIds&&this.dragOverTargetIds.unshift(s)},this.handleTopMove=n=>{if(this.timeout&&clearTimeout(this.timeout),!this.document||this.waitingForDelay)return;const{moveStartSourceIds:s,dragOverTargetIds:o}=this,a=this.options.enableHoverOutsideTarget,c=J(n,this.lastTargetTouchFallback);if(!c)return;if(this._isScrolling||!this.monitor.isDragging()&&function(D,b,L,tt,A){if(!A)return!1;const H=180*Math.atan2(tt-b,L-D)/Math.PI+180;for(let _=0;_<A.length;++_){const U=A[_];if(U&&(U.start==null||H>=U.start)&&(U.end==null||H<=U.end))return!0}return!1}(this._mouseClientOffset.x||0,this._mouseClientOffset.y||0,c.x,c.y,this.options.scrollAngleRanges))return void(this._isScrolling=!0);var u,d,g,f;if(!this.monitor.isDragging()&&this._mouseClientOffset.hasOwnProperty("x")&&s&&(u=this._mouseClientOffset.x||0,d=this._mouseClientOffset.y||0,g=c.x,f=c.y,Math.sqrt(Math.pow(Math.abs(g-u),2)+Math.pow(Math.abs(f-d),2))>(this.options.touchSlop?this.options.touchSlop:0))&&(this.moveStartSourceIds=void 0,this.actions.beginDrag(s,{clientOffset:this._mouseClientOffset,getSourceClientOffset:this.getSourceClientOffset,publishSource:!1})),!this.monitor.isDragging())return;const h=this.sourceNodes.get(this.monitor.getSourceId());this.installSourceNodeRemovalObserver(h),this.actions.publishDragSource(),n.cancelable&&n.preventDefault();const m=(o||[]).map(D=>this.targetNodes.get(D)).filter(D=>!!D),y=this.options.getDropTargetElementsAtPoint?this.options.getDropTargetElementsAtPoint(c.x,c.y,m):this.document.elementsFromPoint(c.x,c.y),S=[];for(const D in y){if(!y.hasOwnProperty(D))continue;let b=y[D];for(b!=null&&S.push(b);b;)b=b.parentElement,b&&S.indexOf(b)===-1&&S.push(b)}const O=S.filter(D=>m.indexOf(D)>-1).map(D=>this._getDropTargetId(D)).filter(D=>!!D).filter((D,b,L)=>L.indexOf(D)===b);if(a)for(const D in this.targetNodes){const b=this.targetNodes.get(D);if(h&&b&&b.contains(h)&&O.indexOf(D)===-1){O.unshift(D);break}}O.reverse(),this.actions.hover(O,{clientOffset:c})},this._getDropTargetId=n=>{const s=this.targetNodes.keys();let o=s.next();for(;o.done===!1;){const a=o.value;if(n===this.targetNodes.get(a))return a;o=s.next()}},this.handleTopMoveEndCapture=n=>{this._isScrolling=!1,this.lastTargetTouchFallback=void 0,function(s){return s.buttons===void 0||!(s.buttons&vr)}(n)&&(this.monitor.isDragging()&&!this.monitor.didDrop()?(n.cancelable&&n.preventDefault(),this._mouseClientOffset={},this.uninstallSourceNodeRemovalObserver(),this.actions.drop(),this.actions.endDrag()):this.moveStartSourceIds=void 0)},this.handleCancelOnEscape=n=>{n.key==="Escape"&&this.monitor.isDragging()&&(this._mouseClientOffset={},this.uninstallSourceNodeRemovalObserver(),this.actions.endDrag())},this.options=new pr(i,e),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.sourceNodes=new Map,this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.targetNodes=new Map,this.listenerTypes=[],this._mouseClientOffset={},this._isScrolling=!1,this.options.enableMouseEvents&&this.listenerTypes.push(P.mouse),this.options.enableTouchEvents&&this.listenerTypes.push(P.touch),this.options.enableKeyboardEvents&&this.listenerTypes.push(P.keyboard)}}const Nr=function(r,t={},e={}){return new $(r,t,e)};export{Sr as H,Tr as O,Or as S,Nr as T,Cr as a,wr as b,Ir as g,Er as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as i}from"./sentry-i8uQ0afM.js";import{r as a}from"./empty-DcVAbZV4.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="ba2de560-ec3d-4f77-9dc7-083cc80bdf0a",e._sentryDebugIdIdentifier="sentry-dbid-ba2de560-ec3d-4f77-9dc7-083cc80bdf0a")}catch{}})();function c(e,t){for(var o=0;o<t.length;o++){const r=t[o];if(typeof r!="string"&&!Array.isArray(r)){for(const n in r)if(n!=="default"&&!(n in e)){const d=Object.getOwnPropertyDescriptor(r,n);d&&Object.defineProperty(e,n,d.get?d:{enumerable:!0,get:()=>r[n]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var f=a();const l=c({__proto__:null,default:i(f)},[f]);export{l as e};
|