@univerjs/sheets-conditional-formatting-ui 0.6.6 → 0.6.7
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/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +14 -14
package/lib/cjs/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var xr=Object.defineProperty;var Ir=(t,e,r)=>e in t?xr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Ie=(t,e,r)=>Ir(t,typeof e!="symbol"?e+"":e,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("@univerjs/core"),u=require("@univerjs/sheets-conditional-formatting"),X=require("@univerjs/sheets"),ee=require("@univerjs/ui"),I=require("react/jsx-runtime"),j=require("react"),Z=require("@univerjs/design"),Yt=require("@univerjs/engine-formula"),fe=require("@univerjs/sheets-ui"),tr=require("react-dom"),Se=require("rxjs"),dt=require("@univerjs/sheets-formula-ui"),nr=require("@univerjs/engine-render"),it=require("rxjs/operators"),Zt={type:x.CommandType.COMMAND,id:"sheet.command.add-average-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:r,style:n,stopIfTrue:o,operator:i}=e,c=t.get(u.ConditionalFormattingRuleModel),y=t.get(x.ICommandService),p=t.get(x.IUniverInstanceService),S=X.getSheetCommandTarget(p);if(!S)return!1;const{unitId:v,subUnitId:R}=S,_=c.createCfId(v,R),T={ranges:r,cfId:_,stopIfTrue:!!o,rule:{type:u.CFRuleType.highlightCell,subType:u.CFSubRuleType.average,operator:i,style:n}};return y.executeCommand(u.AddConditionalRuleMutation.id,{unitId:v,subUnitId:R,rule:T})}},Jt={type:x.CommandType.COMMAND,id:"sheet.command.add-color-scale-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:r,config:n,stopIfTrue:o}=e,i=t.get(u.ConditionalFormattingRuleModel),c=t.get(x.ICommandService),y=t.get(x.IUniverInstanceService),p=X.getSheetCommandTarget(y);if(!p)return!1;const{unitId:S,subUnitId:v}=p,R=i.createCfId(S,v),_={ranges:r,cfId:R,stopIfTrue:!!o,rule:{type:u.CFRuleType.colorScale,config:n}};return c.executeCommand(u.AddConditionalRuleMutation.id,{unitId:S,subUnitId:v,rule:_})}},Qt={type:x.CommandType.COMMAND,id:"sheet.command.add-data-bar-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:r,min:n,max:o,nativeColor:i,positiveColor:c,isGradient:y,stopIfTrue:p,isShowValue:S}=e,v=t.get(u.ConditionalFormattingRuleModel),R=t.get(x.IUniverInstanceService),_=X.getSheetCommandTarget(R);if(!_)return!1;const{unitId:T,subUnitId:b}=_,w=t.get(x.ICommandService),h=v.createCfId(T,b),a={ranges:r,cfId:h,stopIfTrue:!!p,rule:{type:u.CFRuleType.dataBar,isShowValue:S,config:{min:n,max:o,nativeColor:i,positiveColor:c,isGradient:y}}};return w.executeCommand(u.AddConditionalRuleMutation.id,{unitId:T,subUnitId:b,rule:a})}},en={type:x.CommandType.COMMAND,id:"sheet.command.add-duplicate-values-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:r,style:n,stopIfTrue:o}=e,i=t.get(u.ConditionalFormattingRuleModel),c=t.get(x.ICommandService),y=t.get(x.IUniverInstanceService),p=X.getSheetCommandTarget(y);if(!p)return!1;const{unitId:S,subUnitId:v}=p,R=i.createCfId(S,v),_={ranges:r,cfId:R,stopIfTrue:!!o,rule:{type:u.CFRuleType.highlightCell,subType:u.CFSubRuleType.duplicateValues,style:n}};return c.executeCommand(u.AddConditionalRuleMutation.id,{unitId:S,subUnitId:v,rule:_})}},tn={type:x.CommandType.COMMAND,id:"sheet.command.add-number-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:r,style:n,stopIfTrue:o,operator:i,value:c}=e,y=t.get(u.ConditionalFormattingRuleModel),p=t.get(x.ICommandService),S=t.get(x.IUniverInstanceService),v=X.getSheetCommandTarget(S);if(!v)return!1;const{unitId:R,subUnitId:_}=v,T=y.createCfId(R,_);let b;if([u.CFNumberOperator.between,u.CFNumberOperator.notBetween].includes(i)){const w=c;if(w.length!==2||!Array.isArray(w))return!1;b={ranges:r,cfId:T,stopIfTrue:!!o,rule:{type:u.CFRuleType.highlightCell,subType:u.CFSubRuleType.number,operator:i,style:n,value:w}}}else{const w=c;if(typeof w!="number")return!1;b={ranges:r,cfId:T,stopIfTrue:!!o,rule:{type:u.CFRuleType.highlightCell,subType:u.CFSubRuleType.number,operator:i,style:n,value:w}}}return p.executeCommand(u.AddConditionalRuleMutation.id,{unitId:R,subUnitId:_,rule:b})}},nn={type:x.CommandType.COMMAND,id:"sheet.command.add-rank-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:r,style:n,stopIfTrue:o,isPercent:i,isBottom:c,value:y}=e,p=t.get(u.ConditionalFormattingRuleModel),S=t.get(x.IUniverInstanceService),v=t.get(x.ICommandService),R=X.getSheetCommandTarget(S);if(!R)return!1;const{unitId:_,subUnitId:T}=R,b=p.createCfId(_,T),w={ranges:r,cfId:b,stopIfTrue:!!o,rule:{type:u.CFRuleType.highlightCell,subType:u.CFSubRuleType.rank,isPercent:i,isBottom:c,style:n,value:y}};return v.executeCommand(u.AddConditionalRuleMutation.id,{unitId:_,subUnitId:T,rule:w})}},rn={type:x.CommandType.COMMAND,id:"sheet.command.add-text-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:r,style:n,stopIfTrue:o,operator:i,value:c}=e,y=t.get(u.ConditionalFormattingRuleModel),p=t.get(x.IUniverInstanceService),S=X.getSheetCommandTarget(p);if(!S)return!1;const{unitId:v,subUnitId:R}=S,_=t.get(x.ICommandService),T=y.createCfId(v,R),b={ranges:r,cfId:T,stopIfTrue:!!o,rule:{type:u.CFRuleType.highlightCell,subType:u.CFSubRuleType.text,operator:i,style:n,value:c}};return _.executeCommand(u.AddConditionalRuleMutation.id,{unitId:v,subUnitId:R,rule:b})}},on={type:x.CommandType.COMMAND,id:"sheet.command.add-time-period-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:r,style:n,stopIfTrue:o,operator:i}=e,c=t.get(u.ConditionalFormattingRuleModel),y=t.get(x.IUniverInstanceService),p=t.get(x.ICommandService),S=X.getSheetCommandTarget(y);if(!S)return!1;const{unitId:v,subUnitId:R}=S,_=c.createCfId(v,R),T={ranges:r,cfId:_,stopIfTrue:!!o,rule:{type:u.CFRuleType.highlightCell,subType:u.CFSubRuleType.timePeriod,operator:i,style:n}};return p.executeCommand(u.AddConditionalRuleMutation.id,{unitId:v,subUnitId:R,rule:T})}},an={type:x.CommandType.COMMAND,id:"sheet.command.add-uniqueValues-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:r,style:n,stopIfTrue:o}=e,i=t.get(u.ConditionalFormattingRuleModel),c=t.get(x.IUniverInstanceService),y=t.get(x.ICommandService),p=X.getSheetCommandTarget(c);if(!p)return!1;const{unitId:S,subUnitId:v}=p,R=i.createCfId(S,v),_={ranges:r,cfId:R,stopIfTrue:!!o,rule:{type:u.CFRuleType.highlightCell,subType:u.CFSubRuleType.uniqueValues,style:n}};return y.executeCommand(u.AddConditionalRuleMutation.id,{unitId:S,subUnitId:v,rule:_})}},_r="univer-conditional-formatting-wrap",Er="univer-title",Or="univer-label",Pr="univer-label-container",Dr="univer-m-t-base",Fr="univer-m-t-sm",Mr="univer-m-t-xl",Nr="univer-m-l-sm",jr="univer-m-l-xl",Lr="univer-m-l-xxs",Ur="univer-m-l-0",Vr="univer-m-r-0",z={conditionalFormattingWrap:_r,title:Er,label:Or,labelContainer:Pr,mTBase:Dr,mTSm:Fr,mTXl:Mr,mLSm:Nr,mLXl:jr,mLXxs:Lr,mL0:Ur,mR0:Vr};var Ce=function(){return Ce=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},Ce.apply(this,arguments)},zr=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]]);return r},$e=j.forwardRef(function(t,e){var r=t.icon,n=t.id,o=t.className,i=t.extend,c=zr(t,["icon","id","className","extend"]),y="univerjs-icon univerjs-icon-".concat(n," ").concat(o||"").trim(),p=j.useRef("_".concat(Ar()));return rr(r,"".concat(n),{defIds:r.defIds,idSuffix:p.current},Ce({ref:e,className:y},c),i)});function rr(t,e,r,n,o){return j.createElement(t.tag,Ce(Ce({key:e},kr(t,r,o)),n),($r(t,r).children||[]).map(function(i,c){return rr(i,"".concat(e,"-").concat(t.tag,"-").concat(c),r,void 0,o)}))}function kr(t,e,r){var n=Ce({},t.attrs);r!=null&&r.colorChannel1&&n.fill==="colorChannel1"&&(n.fill=r.colorChannel1),t.tag==="mask"&&n.id&&(n.id=n.id+e.idSuffix),Object.entries(n).forEach(function(i){var c=i[0],y=i[1];c==="mask"&&typeof y=="string"&&(n[c]=y.replace(/url\(#(.*)\)/,"url(#$1".concat(e.idSuffix,")")))});var o=e.defIds;return!o||o.length===0||(t.tag==="use"&&n["xlink:href"]&&(n["xlink:href"]=n["xlink:href"]+e.idSuffix),Object.entries(n).forEach(function(i){var c=i[0],y=i[1];typeof y=="string"&&(n[c]=y.replace(/url\(#(.*)\)/,"url(#$1".concat(e.idSuffix,")")))})),n}function $r(t,e){var r,n=e.defIds;return!n||n.length===0?t:t.tag==="defs"&&(!((r=t.children)===null||r===void 0)&&r.length)?Ce(Ce({},t),{children:t.children.map(function(o){return typeof o.attrs.id=="string"&&n&&n.indexOf(o.attrs.id)>-1?Ce(Ce({},o),{attrs:Ce(Ce({},o.attrs),{id:o.attrs.id+e.idSuffix})}):o})}):t}function Ar(){return Math.random().toString(36).substring(2,8)}$e.displayName="UniverIcon";var qr={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M5.3313 1.4667C5.3313 1.13533 5.59993.866699 5.9313.866699H10.069C10.4004.866699 10.669 1.13533 10.669 1.4667 10.669 1.79807 10.4004 2.0667 10.069 2.0667H5.9313C5.59993 2.0667 5.3313 1.79807 5.3313 1.4667zM1.09985 3.64443C1.09985 3.31306 1.36848 3.04443 1.69985 3.04443H14.2999C14.6312 3.04443 14.8999 3.31306 14.8999 3.64443 14.8999 3.9758 14.6312 4.24443 14.2999 4.24443H1.69985C1.36848 4.24443 1.09985 3.9758 1.09985 3.64443zM6.12398 8.30171C6.35829 8.0674 6.73819 8.0674 6.97251 8.30171L8.00007 9.32928 9.02764 8.30171C9.26195 8.0674 9.64185 8.0674 9.87617 8.30171 10.1105 8.53603 10.1105 8.91593 9.87617 9.15024L8.8486 10.1778 9.87617 11.2054C10.1105 11.4397 10.1105 11.8196 9.87617 12.0539 9.64185 12.2882 9.26195 12.2882 9.02764 12.0539L8.00007 11.0263 6.97251 12.0539C6.73819 12.2882 6.35829 12.2882 6.12398 12.0539 5.88966 11.8196 5.88966 11.4397 6.12398 11.2054L7.15154 10.1778 6.12398 9.15024C5.88966 8.91593 5.88966 8.53603 6.12398 8.30171z"}},{tag:"path",attrs:{fill:"currentColor",d:"M4.75332 5.22217C3.86966 5.22217 3.15332 5.93851 3.15332 6.82217V12.5331C3.15332 13.9691 4.31738 15.1332 5.75332 15.1332H10.2465C11.6825 15.1332 12.8465 13.9691 12.8465 12.5331V6.82217C12.8465 5.93851 12.1302 5.22217 11.2465 5.22217H4.75332ZM4.35332 6.82217C4.35332 6.60125 4.53241 6.42217 4.75332 6.42217H11.2465C11.4674 6.42217 11.6465 6.60125 11.6465 6.82217V12.5331C11.6465 13.3063 11.0197 13.9332 10.2465 13.9332H5.75332C4.98012 13.9332 4.35332 13.3063 4.35332 12.5331V6.82217Z",fillRule:"evenodd",clipRule:"evenodd"}}]},xt=j.forwardRef(function(t,e){return j.createElement($e,Object.assign({},t,{id:"delete-single",ref:e,icon:qr}))});xt.displayName="DeleteSingle";var Wr={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M8.6 1.99991C8.60001 1.66854 8.33138 1.39991 8.00001 1.3999C7.66864 1.3999 7.40001 1.66853 7.4 1.9999L7.39996 7.3999H1.9999C1.66853 7.3999 1.3999 7.66853 1.3999 7.9999C1.3999 8.33127 1.66853 8.5999 1.9999 8.5999H7.39995L7.3999 13.9999C7.3999 14.3313 7.66853 14.5999 7.9999 14.5999C8.33127 14.5999 8.5999 14.3313 8.5999 13.9999L8.59995 8.5999H13.9999C14.3313 8.5999 14.5999 8.33127 14.5999 7.9999C14.5999 7.66853 14.3313 7.3999 13.9999 7.3999H8.59996L8.6 1.99991Z"}}]},or=j.forwardRef(function(t,e){return j.createElement($e,Object.assign({},t,{id:"increase-single",ref:e,icon:Wr}))});or.displayName="IncreaseSingle";var Hr={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z",fillRule:"evenodd",clipRule:"evenodd"}}]},Nt=j.forwardRef(function(t,e){return j.createElement($e,Object.assign({},t,{id:"more-down-single",ref:e,icon:Hr}))});Nt.displayName="MoreDownSingle";var Br={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"mask",attrs:{id:"mask0_622_8",style:{maskType:"alpha"},width:16,height:16,x:0,y:0,maskUnits:"userSpaceOnUse"},children:[{tag:"path",attrs:{fill:"#D9D9D9",d:"M0 0H16V16H0z"}}]},{tag:"g",attrs:{fill:"currentColor",mask:"url(#mask0_622_8)"},children:[{tag:"path",attrs:{d:"M6 5C6.55228 5 7 4.55228 7 4 7 3.44772 6.55228 3 6 3 5.44772 3 5 3.44772 5 4 5 4.55228 5.44772 5 6 5zM6 9C6.55228 9 7 8.55229 7 8 7 7.44772 6.55228 7 6 7 5.44772 7 5 7.44772 5 8 5 8.55229 5.44772 9 6 9zM7 12C7 12.5523 6.55228 13 6 13 5.44772 13 5 12.5523 5 12 5 11.4477 5.44772 11 6 11 6.55228 11 7 11.4477 7 12zM10 5C10.5523 5 11 4.55228 11 4 11 3.44772 10.5523 3 10 3 9.44771 3 9 3.44772 9 4 9 4.55228 9.44771 5 10 5zM11 8C11 8.55229 10.5523 9 10 9 9.44771 9 9 8.55229 9 8 9 7.44772 9.44771 7 10 7 10.5523 7 11 7.44772 11 8zM10 13C10.5523 13 11 12.5523 11 12 11 11.4477 10.5523 11 10 11 9.44771 11 9 11.4477 9 12 9 12.5523 9.44771 13 10 13z"}}]}]},ir=j.forwardRef(function(t,e){return j.createElement($e,Object.assign({},t,{id:"sequence-single",ref:e,icon:Br}))});ir.displayName="SequenceSingle";var Gr={tag:"svg",attrs:{fill:"none",viewBox:"0 0 17 17",width:"1em",height:"1em"},children:[{tag:"mask",attrs:{id:"mask0_436_41",style:{maskType:"alpha"},width:17,height:17,x:0,y:0,maskUnits:"userSpaceOnUse"},children:[{tag:"path",attrs:{fill:"#D9D9D9",d:"M0.35 0.48H16.35V16.48H0.35z"}}]},{tag:"g",attrs:{mask:"url(#mask0_436_41)",fillRule:"evenodd",clipRule:"evenodd"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M2.27177 13.714L13.5855 2.40025L14.434 3.24878L3.1203 14.5625L2.27177 13.714Z"}},{tag:"path",attrs:{fill:"#E5E5E5",d:"M4.2603 1.82495L2.89617 1.82495C2.23343 1.82495 1.69617 2.36221 1.69617 3.02495L1.69617 4.38908L3.02617 4.38908L3.02617 3.15495L4.2603 3.15495L4.2603 1.82495ZM15.0092 4.38908L15.0092 3.02495C15.0092 2.36221 14.4719 1.82495 13.8092 1.82495L12.4451 1.82495L12.4451 3.15495L13.6792 3.15495L13.6792 4.38908L15.0092 4.38908ZM6.98856 1.82495L6.98856 3.15495L9.71681 3.15495L9.71681 1.82495L6.98856 1.82495ZM15.0092 7.11734L13.6792 7.11734L13.6792 9.84559L15.0092 9.84559L15.0092 7.11734ZM15.0092 12.5739L13.6792 12.5739L13.6792 13.808L12.4451 13.808L12.4451 15.138L13.8092 15.138C14.4719 15.138 15.0092 14.6007 15.0092 13.938L15.0092 12.5739ZM9.71681 15.138L9.71681 13.808L6.98856 13.808L6.98856 15.138L9.71681 15.138ZM4.2603 15.138L4.2603 13.808L3.02617 13.808L3.02617 12.5739L1.69617 12.5739L1.69617 13.938C1.69617 14.6007 2.23343 15.138 2.89617 15.138L4.2603 15.138ZM1.69617 9.8456L3.02617 9.8456L3.02617 7.11734L1.69617 7.11734L1.69617 9.8456Z"}}]}]},ft=j.forwardRef(function(t,e){return j.createElement($e,Object.assign({},t,{id:"slash-single",ref:e,icon:Gr}))});ft.displayName="SlashSingle";function Xr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function ar(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:function(){return t[n]}})}),r}var Vt={exports:{}},We={},ot={exports:{}},Yr=ot.exports,pn;function sn(){return pn||(pn=1,function(t,e){(function(r,n){n(e)})(Yr,function(r){function n($){return function(ae,O,P,F,V,B,A){return $(ae,O,A)}}function o($){return function(ae,O,P,F){if(!ae||!O||typeof ae!="object"||typeof O!="object")return $(ae,O,P,F);var V=F.get(ae),B=F.get(O);if(V&&B)return V===O&&B===ae;F.set(ae,O),F.set(O,ae);var A=$(ae,O,P,F);return F.delete(ae),F.delete(O),A}}function i($,K){var ae={};for(var O in $)ae[O]=$[O];for(var O in K)ae[O]=K[O];return ae}function c($){return $.constructor===Object||$.constructor==null}function y($){return typeof $.then=="function"}function p($,K){return $===K||$!==$&&K!==K}var S="[object Arguments]",v="[object Boolean]",R="[object Date]",_="[object RegExp]",T="[object Map]",b="[object Number]",w="[object Object]",h="[object Set]",a="[object String]",s=Object.prototype.toString;function f($){var K=$.areArraysEqual,ae=$.areDatesEqual,O=$.areMapsEqual,P=$.areObjectsEqual,F=$.areRegExpsEqual,V=$.areSetsEqual,B=$.createIsNestedEqual,A=B(Y);function Y(G,te,ce){if(G===te)return!0;if(!G||!te||typeof G!="object"||typeof te!="object")return G!==G&&te!==te;if(c(G)&&c(te))return P(G,te,A,ce);var Pe=Array.isArray(G),ye=Array.isArray(te);if(Pe||ye)return Pe===ye&&K(G,te,A,ce);var ge=s.call(G);return ge!==s.call(te)?!1:ge===R?ae(G,te,A,ce):ge===_?F(G,te,A,ce):ge===T?O(G,te,A,ce):ge===h?V(G,te,A,ce):ge===w||ge===S?y(G)||y(te)?!1:P(G,te,A,ce):ge===v||ge===b||ge===a?p(G.valueOf(),te.valueOf()):!1}return Y}function C($,K,ae,O){var P=$.length;if(K.length!==P)return!1;for(;P-- >0;)if(!ae($[P],K[P],P,P,$,K,O))return!1;return!0}var l=o(C);function m($,K){return p($.valueOf(),K.valueOf())}function d($,K,ae,O){var P=$.size===K.size;if(!P)return!1;if(!$.size)return!0;var F={},V=0;return $.forEach(function(B,A){if(P){var Y=!1,G=0;K.forEach(function(te,ce){!Y&&!F[G]&&(Y=ae(A,ce,V,G,$,K,O)&&ae(B,te,A,ce,$,K,O))&&(F[G]=!0),G++}),V++,P=Y}}),P}var g=o(d),D="_owner",M=Object.prototype.hasOwnProperty;function L($,K,ae,O){var P=Object.keys($),F=P.length;if(Object.keys(K).length!==F)return!1;for(var V;F-- >0;){if(V=P[F],V===D){var B=!!$.$$typeof,A=!!K.$$typeof;if((B||A)&&B!==A)return!1}if(!M.call(K,V)||!ae($[V],K[V],V,V,$,K,O))return!1}return!0}var U=o(L);function E($,K){return $.source===K.source&&$.flags===K.flags}function N($,K,ae,O){var P=$.size===K.size;if(!P)return!1;if(!$.size)return!0;var F={};return $.forEach(function(V,B){if(P){var A=!1,Y=0;K.forEach(function(G,te){!A&&!F[Y]&&(A=ae(V,G,B,te,$,K,O))&&(F[Y]=!0),Y++}),P=A}}),P}var q=o(N),H=Object.freeze({areArraysEqual:C,areDatesEqual:m,areMapsEqual:d,areObjectsEqual:L,areRegExpsEqual:E,areSetsEqual:N,createIsNestedEqual:n}),J=Object.freeze({areArraysEqual:l,areDatesEqual:m,areMapsEqual:g,areObjectsEqual:U,areRegExpsEqual:E,areSetsEqual:q,createIsNestedEqual:n}),ie=f(H);function re($,K){return ie($,K,void 0)}var le=f(i(H,{createIsNestedEqual:function(){return p}}));function k($,K){return le($,K,void 0)}var Q=f(J);function ne($,K){return Q($,K,new WeakMap)}var se=f(i(J,{createIsNestedEqual:function(){return p}}));function de($,K){return se($,K,new WeakMap)}function he($){return f(i(H,$(H)))}function be($){var K=f(i(J,$(J)));return function(ae,O,P){return P===void 0&&(P=new WeakMap),K(ae,O,P)}}r.circularDeepEqual=ne,r.circularShallowEqual=de,r.createCustomCircularEqual=be,r.createCustomEqual=he,r.deepEqual=re,r.sameValueZeroEqual=p,r.shallowEqual=k,Object.defineProperty(r,"__esModule",{value:!0})})}(ot,ot.exports)),ot.exports}var mt={exports:{}},hn;function ln(){if(hn)return mt.exports;hn=1;function t(r){var n,o,i="";if(typeof r=="string"||typeof r=="number")i+=r;else if(typeof r=="object")if(Array.isArray(r)){var c=r.length;for(n=0;n<c;n++)r[n]&&(o=t(r[n]))&&(i&&(i+=" "),i+=o)}else for(o in r)r[o]&&(i&&(i+=" "),i+=o);return i}function e(){for(var r,n,o=0,i="",c=arguments.length;o<c;o++)(r=arguments[o])&&(n=t(r))&&(i&&(i+=" "),i+=n);return i}return mt.exports=e,mt.exports.clsx=e,mt.exports}var oe={},zt,mn;function Kr(){return mn||(mn=1,zt=function(e,r,n){return e===r?!0:e.className===r.className&&n(e.style,r.style)&&e.width===r.width&&e.autoSize===r.autoSize&&e.cols===r.cols&&e.draggableCancel===r.draggableCancel&&e.draggableHandle===r.draggableHandle&&n(e.verticalCompact,r.verticalCompact)&&n(e.compactType,r.compactType)&&n(e.layout,r.layout)&&n(e.margin,r.margin)&&n(e.containerPadding,r.containerPadding)&&e.rowHeight===r.rowHeight&&e.maxRows===r.maxRows&&e.isBounded===r.isBounded&&e.isDraggable===r.isDraggable&&e.isResizable===r.isResizable&&e.allowOverlap===r.allowOverlap&&e.preventCollision===r.preventCollision&&e.useCSSTransforms===r.useCSSTransforms&&e.transformScale===r.transformScale&&e.isDroppable===r.isDroppable&&n(e.resizeHandles,r.resizeHandles)&&n(e.resizeHandle,r.resizeHandle)&&e.onLayoutChange===r.onLayoutChange&&e.onDragStart===r.onDragStart&&e.onDrag===r.onDrag&&e.onDragStop===r.onDragStop&&e.onResizeStart===r.onResizeStart&&e.onResize===r.onResize&&e.onResizeStop===r.onResizeStop&&e.onDrop===r.onDrop&&n(e.droppingItem,r.droppingItem)&&n(e.innerRef,r.innerRef)}),zt}var gn;function Ae(){if(gn)return oe;gn=1,Object.defineProperty(oe,"__esModule",{value:!0}),oe.bottom=n,oe.childrenEqual=p,oe.cloneLayout=o,oe.cloneLayoutItem=y,oe.collides=v,oe.compact=R,oe.compactItem=b,oe.compactType=$,oe.correctBounds=w,oe.fastPositionEqual=S,oe.fastRGLPropsEqual=void 0,oe.getAllCollisions=s,oe.getFirstCollision=a,oe.getLayoutItem=h,oe.getStatics=f,oe.modifyLayout=i,oe.moveElement=C,oe.moveElementAwayFromCollision=l,oe.noop=void 0,oe.perc=m,oe.resizeItemInDirection=le,oe.setTopLeft=Q,oe.setTransform=k,oe.sortLayoutItems=ne,oe.sortLayoutItemsByColRow=de,oe.sortLayoutItemsByRowCol=se,oe.synchronizeLayoutWithChildren=he,oe.validateLayout=be,oe.withLayoutItem=c;var t=sn(),e=r(j);function r(O){return O&&O.__esModule?O:{default:O}}function n(O){let P=0,F;for(let V=0,B=O.length;V<B;V++)F=O[V].y+O[V].h,F>P&&(P=F);return P}function o(O){const P=Array(O.length);for(let F=0,V=O.length;F<V;F++)P[F]=y(O[F]);return P}function i(O,P){const F=Array(O.length);for(let V=0,B=O.length;V<B;V++)P.i===O[V].i?F[V]=P:F[V]=O[V];return F}function c(O,P,F){let V=h(O,P);return V?(V=F(y(V)),O=i(O,V),[O,V]):[O,null]}function y(O){return{w:O.w,h:O.h,x:O.x,y:O.y,i:O.i,minW:O.minW,maxW:O.maxW,minH:O.minH,maxH:O.maxH,moved:!!O.moved,static:!!O.static,isDraggable:O.isDraggable,isResizable:O.isResizable,resizeHandles:O.resizeHandles,isBounded:O.isBounded}}function p(O,P){return(0,t.deepEqual)(e.default.Children.map(O,F=>F==null?void 0:F.key),e.default.Children.map(P,F=>F==null?void 0:F.key))&&(0,t.deepEqual)(e.default.Children.map(O,F=>F==null?void 0:F.props["data-grid"]),e.default.Children.map(P,F=>F==null?void 0:F.props["data-grid"]))}oe.fastRGLPropsEqual=Kr();function S(O,P){return O.left===P.left&&O.top===P.top&&O.width===P.width&&O.height===P.height}function v(O,P){return!(O.i===P.i||O.x+O.w<=P.x||O.x>=P.x+P.w||O.y+O.h<=P.y||O.y>=P.y+P.h)}function R(O,P,F,V){const B=f(O),A=ne(O,P),Y=Array(O.length);for(let G=0,te=A.length;G<te;G++){let ce=y(A[G]);ce.static||(ce=b(B,ce,P,F,A,V),B.push(ce)),Y[O.indexOf(A[G])]=ce,ce.moved=!1}return Y}const _={x:"w",y:"h"};function T(O,P,F,V){const B=_[V];P[V]+=1;const A=O.map(Y=>Y.i).indexOf(P.i);for(let Y=A+1;Y<O.length;Y++){const G=O[Y];if(!G.static){if(G.y>P.y+P.h)break;v(P,G)&&T(O,G,F+P[B],V)}}P[V]=F}function b(O,P,F,V,B,A){const Y=F==="vertical",G=F==="horizontal";if(Y)for(P.y=Math.min(n(O),P.y);P.y>0&&!a(O,P);)P.y--;else if(G)for(;P.x>0&&!a(O,P);)P.x--;let te;for(;(te=a(O,P))&&!(F===null&&A);)if(G?T(B,P,te.x+te.w,"x"):T(B,P,te.y+te.h,"y"),G&&P.x+P.w>V)for(P.x=V-P.w,P.y++;P.x>0&&!a(O,P);)P.x--;return P.y=Math.max(P.y,0),P.x=Math.max(P.x,0),P}function w(O,P){const F=f(O);for(let V=0,B=O.length;V<B;V++){const A=O[V];if(A.x+A.w>P.cols&&(A.x=P.cols-A.w),A.x<0&&(A.x=0,A.w=P.cols),!A.static)F.push(A);else for(;a(F,A);)A.y++}return O}function h(O,P){for(let F=0,V=O.length;F<V;F++)if(O[F].i===P)return O[F]}function a(O,P){for(let F=0,V=O.length;F<V;F++)if(v(O[F],P))return O[F]}function s(O,P){return O.filter(F=>v(F,P))}function f(O){return O.filter(P=>P.static)}function C(O,P,F,V,B,A,Y,G,te){if(P.static&&P.isDraggable!==!0||P.y===V&&P.x===F)return O;`${P.i}${String(F)}${String(V)}${P.x}${P.y}`;const ce=P.x,Pe=P.y;typeof F=="number"&&(P.x=F),typeof V=="number"&&(P.y=V),P.moved=!0;let ye=ne(O,Y);(Y==="vertical"&&typeof V=="number"?Pe>=V:Y==="horizontal"&&typeof F=="number"?ce>=F:!1)&&(ye=ye.reverse());const je=s(ye,P),ht=je.length>0;if(ht&&te)return o(O);if(ht&&A)return`${P.i}`,P.x=ce,P.y=Pe,P.moved=!1,O;for(let Ut=0,wr=je.length;Ut<wr;Ut++){const De=je[Ut];`${P.i}${P.x}${P.y}${De.i}${De.x}${De.y}`,!De.moved&&(De.static?O=l(O,De,P,B,Y):O=l(O,P,De,B,Y))}return O}function l(O,P,F,V,B,A){const Y=B==="horizontal",G=B==="vertical",te=P.static;if(V){V=!1;const ye={x:Y?Math.max(P.x-F.w,0):F.x,y:G?Math.max(P.y-F.h,0):F.y,w:F.w,h:F.h,i:"-1"},ge=a(O,ye),je=ge&&ge.y+ge.h>P.y,ht=ge&&P.x+P.w>ge.x;if(ge){if(je&&G)return C(O,F,void 0,P.y+1,V,te,B);if(je&&B==null)return P.y=F.y,F.y=F.y+F.h,O;if(ht&&Y)return C(O,P,F.x,void 0,V,te,B)}else return`${F.i}${ye.x}${ye.y}`,C(O,F,Y?ye.x:void 0,G?ye.y:void 0,V,te,B)}const ce=Y?F.x+1:void 0,Pe=G?F.y+1:void 0;return ce==null&&Pe==null?O:C(O,F,Y?F.x+1:void 0,G?F.y+1:void 0,V,te,B)}function m(O){return O*100+"%"}const d=(O,P,F,V)=>O+F>V?P:F,g=(O,P,F)=>O<0?P:F,D=O=>Math.max(0,O),M=O=>Math.max(0,O),L=(O,P,F)=>{let{left:V,height:B,width:A}=P;const Y=O.top-(B-O.height);return{left:V,width:A,height:g(Y,O.height,B),top:M(Y)}},U=(O,P,F)=>{let{top:V,left:B,height:A,width:Y}=P;return{top:V,height:A,width:d(O.left,O.width,Y,F),left:D(B)}},E=(O,P,F)=>{let{top:V,height:B,width:A}=P;const Y=O.left-(A-O.width);return{height:B,width:Y<0?O.width:d(O.left,O.width,A,F),top:M(V),left:D(Y)}},N=(O,P,F)=>{let{top:V,left:B,height:A,width:Y}=P;return{width:Y,left:B,height:g(V,O.height,A),top:M(V)}},re={n:L,ne:function(){return L(arguments.length<=0?void 0:arguments[0],U(...arguments))},e:U,se:function(){return N(arguments.length<=0?void 0:arguments[0],U(...arguments))},s:N,sw:function(){return N(arguments.length<=0?void 0:arguments[0],E(...arguments))},w:E,nw:function(){return L(arguments.length<=0?void 0:arguments[0],E(...arguments))}};function le(O,P,F,V){const B=re[O];return B?B(P,{...P,...F},V):F}function k(O){let{top:P,left:F,width:V,height:B}=O;const A=`translate(${F}px,${P}px)`;return{transform:A,WebkitTransform:A,MozTransform:A,msTransform:A,OTransform:A,width:`${V}px`,height:`${B}px`,position:"absolute"}}function Q(O){let{top:P,left:F,width:V,height:B}=O;return{top:`${P}px`,left:`${F}px`,width:`${V}px`,height:`${B}px`,position:"absolute"}}function ne(O,P){return P==="horizontal"?de(O):P==="vertical"?se(O):O}function se(O){return O.slice(0).sort(function(P,F){return P.y>F.y||P.y===F.y&&P.x>F.x?1:P.y===F.y&&P.x===F.x?0:-1})}function de(O){return O.slice(0).sort(function(P,F){return P.x>F.x||P.x===F.x&&P.y>F.y?1:-1})}function he(O,P,F,V,B){O=O||[];const A=[];e.default.Children.forEach(P,G=>{if((G==null?void 0:G.key)==null)return;const te=h(O,String(G.key)),ce=G.props["data-grid"];te&&ce==null?A.push(y(te)):ce?A.push(y({...ce,i:G.key})):A.push(y({w:1,h:1,x:0,y:n(A),i:String(G.key)}))});const Y=w(A,{cols:F});return B?Y:R(Y,V,F)}function be(O){let P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Layout";const F=["x","y","w","h"];if(!Array.isArray(O))throw new Error(P+" must be an array!");for(let V=0,B=O.length;V<B;V++){const A=O[V];for(let Y=0;Y<F.length;Y++)if(typeof A[F[Y]]!="number")throw new Error("ReactGridLayout: "+P+"["+V+"]."+F[Y]+" must be a number!")}}function $(O){const{verticalCompact:P,compactType:F}=O||{};return P===!1?null:F}function K(){}const ae=()=>{};return oe.noop=ae,oe}var Te={},vn;function un(){if(vn)return Te;vn=1,Object.defineProperty(Te,"__esModule",{value:!0}),Te.calcGridColWidth=t,Te.calcGridItemPosition=r,Te.calcGridItemWHPx=e,Te.calcWH=o,Te.calcXY=n,Te.clamp=i;function t(c){const{margin:y,containerPadding:p,containerWidth:S,cols:v}=c;return(S-y[0]*(v-1)-p[0]*2)/v}function e(c,y,p){return Number.isFinite(c)?Math.round(y*c+Math.max(0,c-1)*p):c}function r(c,y,p,S,v,R){const{margin:_,containerPadding:T,rowHeight:b}=c,w=t(c),h={};return R&&R.resizing?(h.width=Math.round(R.resizing.width),h.height=Math.round(R.resizing.height)):(h.width=e(S,w,_[0]),h.height=e(v,b,_[1])),R&&R.dragging?(h.top=Math.round(R.dragging.top),h.left=Math.round(R.dragging.left)):R&&R.resizing&&typeof R.resizing.top=="number"&&typeof R.resizing.left=="number"?(h.top=Math.round(R.resizing.top),h.left=Math.round(R.resizing.left)):(h.top=Math.round((b+_[1])*p+T[1]),h.left=Math.round((w+_[0])*y+T[0])),h}function n(c,y,p,S,v){const{margin:R,cols:_,rowHeight:T,maxRows:b}=c,w=t(c);let h=Math.round((p-R[0])/(w+R[0])),a=Math.round((y-R[1])/(T+R[1]));return h=i(h,0,_-S),a=i(a,0,b-v),{x:h,y:a}}function o(c,y,p,S,v,R){const{margin:_,maxRows:T,cols:b,rowHeight:w}=c,h=t(c);let a=Math.round((y+_[0])/(h+_[0])),s=Math.round((p+_[1])/(w+_[1])),f=i(a,0,b-S),C=i(s,0,T-v);return["sw","w","nw"].indexOf(R)!==-1&&(f=i(a,0,b)),["nw","n","ne"].indexOf(R)!==-1&&(C=i(s,0,T)),{w:f,h:C}}function i(c,y,p){return Math.max(Math.min(c,p),y)}return Te}var He={},kt={exports:{}},$t,yn;function Zr(){if(yn)return $t;yn=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return $t=t,$t}var At,Cn;function Jr(){if(Cn)return At;Cn=1;var t=Zr();function e(){}function r(){}return r.resetWarningCache=e,At=function(){function n(c,y,p,S,v,R){if(R!==t){var _=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw _.name="Invariant Violation",_}}n.isRequired=n;function o(){return n}var i={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:e};return i.PropTypes=i,i},At}var bn;function Oe(){return bn||(bn=1,kt.exports=Jr()()),kt.exports}var Be={exports:{}},qt={};function sr(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(r=sr(t[e]))&&(n&&(n+=" "),n+=r);else for(e in t)t[e]&&(n&&(n+=" "),n+=e);return n}function Sn(){for(var t,e,r=0,n="";r<arguments.length;)(t=arguments[r++])&&(e=sr(t))&&(n&&(n+=" "),n+=e);return n}const Qr=Object.freeze(Object.defineProperty({__proto__:null,clsx:Sn,default:Sn},Symbol.toStringTag,{value:"Module"})),eo=ar(Qr);var pe={},_e={},Rn;function jt(){if(Rn)return _e;Rn=1,Object.defineProperty(_e,"__esModule",{value:!0}),_e.dontSetMe=o,_e.findInArray=t,_e.int=n,_e.isFunction=e,_e.isNum=r;function t(i,c){for(let y=0,p=i.length;y<p;y++)if(c.apply(c,[i[y],y,i]))return i[y]}function e(i){return typeof i=="function"||Object.prototype.toString.call(i)==="[object Function]"}function r(i){return typeof i=="number"&&!isNaN(i)}function n(i){return parseInt(i,10)}function o(i,c,y){if(i[c])return new Error("Invalid prop ".concat(c," passed to ").concat(y," - do not set this, set it on the child."))}return _e}var Ee={},Tn;function to(){if(Tn)return Ee;Tn=1,Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.browserPrefixToKey=r,Ee.browserPrefixToStyle=n,Ee.default=void 0,Ee.getPrefix=e;const t=["Moz","Webkit","O","ms"];function e(){var i;let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window>"u")return"";const y=(i=window.document)===null||i===void 0||(i=i.documentElement)===null||i===void 0?void 0:i.style;if(!y||c in y)return"";for(let p=0;p<t.length;p++)if(r(c,t[p])in y)return t[p];return""}function r(i,c){return c?"".concat(c).concat(o(i)):i}function n(i,c){return c?"-".concat(c.toLowerCase(),"-").concat(i):i}function o(i){let c="",y=!0;for(let p=0;p<i.length;p++)y?(c+=i[p].toUpperCase(),y=!1):i[p]==="-"?y=!0:c+=i[p];return c}return Ee.default=e(),Ee}var wn;function cn(){if(wn)return pe;wn=1,Object.defineProperty(pe,"__esModule",{value:!0}),pe.addClassName=l,pe.addEvent=y,pe.addUserSelectStyles=f,pe.createCSSTransform=b,pe.createSVGTransform=w,pe.getTouch=a,pe.getTouchIdentifier=s,pe.getTranslation=h,pe.innerHeight=R,pe.innerWidth=_,pe.matchesSelector=i,pe.matchesSelectorAndParentsTo=c,pe.offsetXYFromParent=T,pe.outerHeight=S,pe.outerWidth=v,pe.removeClassName=m,pe.removeEvent=p,pe.removeUserSelectStyles=C;var t=jt(),e=n(to());function r(d){if(typeof WeakMap!="function")return null;var g=new WeakMap,D=new WeakMap;return(r=function(M){return M?D:g})(d)}function n(d,g){if(d&&d.__esModule)return d;if(d===null||typeof d!="object"&&typeof d!="function")return{default:d};var D=r(g);if(D&&D.has(d))return D.get(d);var M={},L=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var U in d)if(U!=="default"&&Object.prototype.hasOwnProperty.call(d,U)){var E=L?Object.getOwnPropertyDescriptor(d,U):null;E&&(E.get||E.set)?Object.defineProperty(M,U,E):M[U]=d[U]}return M.default=d,D&&D.set(d,M),M}let o="";function i(d,g){return o||(o=(0,t.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(D){return(0,t.isFunction)(d[D])})),(0,t.isFunction)(d[o])?d[o](g):!1}function c(d,g,D){let M=d;do{if(i(M,g))return!0;if(M===D)return!1;M=M.parentNode}while(M);return!1}function y(d,g,D,M){if(!d)return;const L={capture:!0,...M};d.addEventListener?d.addEventListener(g,D,L):d.attachEvent?d.attachEvent("on"+g,D):d["on"+g]=D}function p(d,g,D,M){if(!d)return;const L={capture:!0,...M};d.removeEventListener?d.removeEventListener(g,D,L):d.detachEvent?d.detachEvent("on"+g,D):d["on"+g]=null}function S(d){let g=d.clientHeight;const D=d.ownerDocument.defaultView.getComputedStyle(d);return g+=(0,t.int)(D.borderTopWidth),g+=(0,t.int)(D.borderBottomWidth),g}function v(d){let g=d.clientWidth;const D=d.ownerDocument.defaultView.getComputedStyle(d);return g+=(0,t.int)(D.borderLeftWidth),g+=(0,t.int)(D.borderRightWidth),g}function R(d){let g=d.clientHeight;const D=d.ownerDocument.defaultView.getComputedStyle(d);return g-=(0,t.int)(D.paddingTop),g-=(0,t.int)(D.paddingBottom),g}function _(d){let g=d.clientWidth;const D=d.ownerDocument.defaultView.getComputedStyle(d);return g-=(0,t.int)(D.paddingLeft),g-=(0,t.int)(D.paddingRight),g}function T(d,g,D){const L=g===g.ownerDocument.body?{left:0,top:0}:g.getBoundingClientRect(),U=(d.clientX+g.scrollLeft-L.left)/D,E=(d.clientY+g.scrollTop-L.top)/D;return{x:U,y:E}}function b(d,g){const D=h(d,g,"px");return{[(0,e.browserPrefixToKey)("transform",e.default)]:D}}function w(d,g){return h(d,g,"")}function h(d,g,D){let{x:M,y:L}=d,U="translate(".concat(M).concat(D,",").concat(L).concat(D,")");if(g){const E="".concat(typeof g.x=="string"?g.x:g.x+D),N="".concat(typeof g.y=="string"?g.y:g.y+D);U="translate(".concat(E,", ").concat(N,")")+U}return U}function a(d,g){return d.targetTouches&&(0,t.findInArray)(d.targetTouches,D=>g===D.identifier)||d.changedTouches&&(0,t.findInArray)(d.changedTouches,D=>g===D.identifier)}function s(d){if(d.targetTouches&&d.targetTouches[0])return d.targetTouches[0].identifier;if(d.changedTouches&&d.changedTouches[0])return d.changedTouches[0].identifier}function f(d){if(!d)return;let g=d.getElementById("react-draggable-style-el");g||(g=d.createElement("style"),g.type="text/css",g.id="react-draggable-style-el",g.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
|
|
1
|
+
"use strict";var xr=Object.defineProperty;var Ir=(t,e,r)=>e in t?xr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Ie=(t,e,r)=>Ir(t,typeof e!="symbol"?e+"":e,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("@univerjs/core"),u=require("@univerjs/sheets-conditional-formatting"),X=require("@univerjs/sheets"),ee=require("@univerjs/ui"),I=require("react/jsx-runtime"),j=require("react"),Z=require("@univerjs/design"),Yt=require("@univerjs/engine-formula"),fe=require("@univerjs/sheets-ui"),tr=require("react-dom"),Se=require("rxjs"),dt=require("@univerjs/sheets-formula-ui"),nr=require("@univerjs/engine-render"),it=require("rxjs/operators"),Zt={type:x.CommandType.COMMAND,id:"sheet.command.add-average-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:r,style:n,stopIfTrue:o,operator:i}=e,c=t.get(u.ConditionalFormattingRuleModel),y=t.get(x.ICommandService),p=t.get(x.IUniverInstanceService),S=X.getSheetCommandTarget(p);if(!S)return!1;const{unitId:v,subUnitId:R}=S,_=c.createCfId(v,R),T={ranges:r,cfId:_,stopIfTrue:!!o,rule:{type:u.CFRuleType.highlightCell,subType:u.CFSubRuleType.average,operator:i,style:n}};return y.executeCommand(u.AddConditionalRuleMutation.id,{unitId:v,subUnitId:R,rule:T})}},Jt={type:x.CommandType.COMMAND,id:"sheet.command.add-color-scale-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:r,config:n,stopIfTrue:o}=e,i=t.get(u.ConditionalFormattingRuleModel),c=t.get(x.ICommandService),y=t.get(x.IUniverInstanceService),p=X.getSheetCommandTarget(y);if(!p)return!1;const{unitId:S,subUnitId:v}=p,R=i.createCfId(S,v),_={ranges:r,cfId:R,stopIfTrue:!!o,rule:{type:u.CFRuleType.colorScale,config:n}};return c.executeCommand(u.AddConditionalRuleMutation.id,{unitId:S,subUnitId:v,rule:_})}},Qt={type:x.CommandType.COMMAND,id:"sheet.command.add-data-bar-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:r,min:n,max:o,nativeColor:i,positiveColor:c,isGradient:y,stopIfTrue:p,isShowValue:S}=e,v=t.get(u.ConditionalFormattingRuleModel),R=t.get(x.IUniverInstanceService),_=X.getSheetCommandTarget(R);if(!_)return!1;const{unitId:T,subUnitId:b}=_,w=t.get(x.ICommandService),h=v.createCfId(T,b),a={ranges:r,cfId:h,stopIfTrue:!!p,rule:{type:u.CFRuleType.dataBar,isShowValue:S,config:{min:n,max:o,nativeColor:i,positiveColor:c,isGradient:y}}};return w.executeCommand(u.AddConditionalRuleMutation.id,{unitId:T,subUnitId:b,rule:a})}},en={type:x.CommandType.COMMAND,id:"sheet.command.add-duplicate-values-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:r,style:n,stopIfTrue:o}=e,i=t.get(u.ConditionalFormattingRuleModel),c=t.get(x.ICommandService),y=t.get(x.IUniverInstanceService),p=X.getSheetCommandTarget(y);if(!p)return!1;const{unitId:S,subUnitId:v}=p,R=i.createCfId(S,v),_={ranges:r,cfId:R,stopIfTrue:!!o,rule:{type:u.CFRuleType.highlightCell,subType:u.CFSubRuleType.duplicateValues,style:n}};return c.executeCommand(u.AddConditionalRuleMutation.id,{unitId:S,subUnitId:v,rule:_})}},tn={type:x.CommandType.COMMAND,id:"sheet.command.add-number-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:r,style:n,stopIfTrue:o,operator:i,value:c}=e,y=t.get(u.ConditionalFormattingRuleModel),p=t.get(x.ICommandService),S=t.get(x.IUniverInstanceService),v=X.getSheetCommandTarget(S);if(!v)return!1;const{unitId:R,subUnitId:_}=v,T=y.createCfId(R,_);let b;if([u.CFNumberOperator.between,u.CFNumberOperator.notBetween].includes(i)){const w=c;if(w.length!==2||!Array.isArray(w))return!1;b={ranges:r,cfId:T,stopIfTrue:!!o,rule:{type:u.CFRuleType.highlightCell,subType:u.CFSubRuleType.number,operator:i,style:n,value:w}}}else{const w=c;if(typeof w!="number")return!1;b={ranges:r,cfId:T,stopIfTrue:!!o,rule:{type:u.CFRuleType.highlightCell,subType:u.CFSubRuleType.number,operator:i,style:n,value:w}}}return p.executeCommand(u.AddConditionalRuleMutation.id,{unitId:R,subUnitId:_,rule:b})}},nn={type:x.CommandType.COMMAND,id:"sheet.command.add-rank-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:r,style:n,stopIfTrue:o,isPercent:i,isBottom:c,value:y}=e,p=t.get(u.ConditionalFormattingRuleModel),S=t.get(x.IUniverInstanceService),v=t.get(x.ICommandService),R=X.getSheetCommandTarget(S);if(!R)return!1;const{unitId:_,subUnitId:T}=R,b=p.createCfId(_,T),w={ranges:r,cfId:b,stopIfTrue:!!o,rule:{type:u.CFRuleType.highlightCell,subType:u.CFSubRuleType.rank,isPercent:i,isBottom:c,style:n,value:y}};return v.executeCommand(u.AddConditionalRuleMutation.id,{unitId:_,subUnitId:T,rule:w})}},rn={type:x.CommandType.COMMAND,id:"sheet.command.add-text-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:r,style:n,stopIfTrue:o,operator:i,value:c}=e,y=t.get(u.ConditionalFormattingRuleModel),p=t.get(x.IUniverInstanceService),S=X.getSheetCommandTarget(p);if(!S)return!1;const{unitId:v,subUnitId:R}=S,_=t.get(x.ICommandService),T=y.createCfId(v,R),b={ranges:r,cfId:T,stopIfTrue:!!o,rule:{type:u.CFRuleType.highlightCell,subType:u.CFSubRuleType.text,operator:i,style:n,value:c}};return _.executeCommand(u.AddConditionalRuleMutation.id,{unitId:v,subUnitId:R,rule:b})}},on={type:x.CommandType.COMMAND,id:"sheet.command.add-time-period-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:r,style:n,stopIfTrue:o,operator:i}=e,c=t.get(u.ConditionalFormattingRuleModel),y=t.get(x.IUniverInstanceService),p=t.get(x.ICommandService),S=X.getSheetCommandTarget(y);if(!S)return!1;const{unitId:v,subUnitId:R}=S,_=c.createCfId(v,R),T={ranges:r,cfId:_,stopIfTrue:!!o,rule:{type:u.CFRuleType.highlightCell,subType:u.CFSubRuleType.timePeriod,operator:i,style:n}};return p.executeCommand(u.AddConditionalRuleMutation.id,{unitId:v,subUnitId:R,rule:T})}},an={type:x.CommandType.COMMAND,id:"sheet.command.add-uniqueValues-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:r,style:n,stopIfTrue:o}=e,i=t.get(u.ConditionalFormattingRuleModel),c=t.get(x.IUniverInstanceService),y=t.get(x.ICommandService),p=X.getSheetCommandTarget(c);if(!p)return!1;const{unitId:S,subUnitId:v}=p,R=i.createCfId(S,v),_={ranges:r,cfId:R,stopIfTrue:!!o,rule:{type:u.CFRuleType.highlightCell,subType:u.CFSubRuleType.uniqueValues,style:n}};return y.executeCommand(u.AddConditionalRuleMutation.id,{unitId:S,subUnitId:v,rule:_})}},_r="univer-conditional-formatting-wrap",Er="univer-title",Or="univer-label",Pr="univer-label-container",Dr="univer-m-t-base",Fr="univer-m-t-sm",Mr="univer-m-t-xl",Nr="univer-m-l-sm",jr="univer-m-l-xl",Lr="univer-m-l-xxs",Ur="univer-m-l-0",Vr="univer-m-r-0",z={conditionalFormattingWrap:_r,title:Er,label:Or,labelContainer:Pr,mTBase:Dr,mTSm:Fr,mTXl:Mr,mLSm:Nr,mLXl:jr,mLXxs:Lr,mL0:Ur,mR0:Vr};var Ce=function(){return Ce=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},Ce.apply(this,arguments)},zr=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]]);return r},$e=j.forwardRef(function(t,e){var r=t.icon,n=t.id,o=t.className,i=t.extend,c=zr(t,["icon","id","className","extend"]),y="univerjs-icon univerjs-icon-".concat(n," ").concat(o||"").trim(),p=j.useRef("_".concat(Ar()));return rr(r,"".concat(n),{defIds:r.defIds,idSuffix:p.current},Ce({ref:e,className:y},c),i)});function rr(t,e,r,n,o){return j.createElement(t.tag,Ce(Ce({key:e},kr(t,r,o)),n),($r(t,r).children||[]).map(function(i,c){return rr(i,"".concat(e,"-").concat(t.tag,"-").concat(c),r,void 0,o)}))}function kr(t,e,r){var n=Ce({},t.attrs);r!=null&&r.colorChannel1&&n.fill==="colorChannel1"&&(n.fill=r.colorChannel1),t.tag==="mask"&&n.id&&(n.id=n.id+e.idSuffix),Object.entries(n).forEach(function(i){var c=i[0],y=i[1];c==="mask"&&typeof y=="string"&&(n[c]=y.replace(/url\(#(.*)\)/,"url(#$1".concat(e.idSuffix,")")))});var o=e.defIds;return!o||o.length===0||(t.tag==="use"&&n["xlink:href"]&&(n["xlink:href"]=n["xlink:href"]+e.idSuffix),Object.entries(n).forEach(function(i){var c=i[0],y=i[1];typeof y=="string"&&(n[c]=y.replace(/url\(#(.*)\)/,"url(#$1".concat(e.idSuffix,")")))})),n}function $r(t,e){var r,n=e.defIds;return!n||n.length===0?t:t.tag==="defs"&&(!((r=t.children)===null||r===void 0)&&r.length)?Ce(Ce({},t),{children:t.children.map(function(o){return typeof o.attrs.id=="string"&&n&&n.indexOf(o.attrs.id)>-1?Ce(Ce({},o),{attrs:Ce(Ce({},o.attrs),{id:o.attrs.id+e.idSuffix})}):o})}):t}function Ar(){return Math.random().toString(36).substring(2,8)}$e.displayName="UniverIcon";var qr={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M5.3313 1.4667C5.3313 1.13533 5.59993.866699 5.9313.866699H10.069C10.4004.866699 10.669 1.13533 10.669 1.4667 10.669 1.79807 10.4004 2.0667 10.069 2.0667H5.9313C5.59993 2.0667 5.3313 1.79807 5.3313 1.4667zM1.09985 3.64443C1.09985 3.31306 1.36848 3.04443 1.69985 3.04443H14.2999C14.6312 3.04443 14.8999 3.31306 14.8999 3.64443 14.8999 3.9758 14.6312 4.24443 14.2999 4.24443H1.69985C1.36848 4.24443 1.09985 3.9758 1.09985 3.64443zM6.12398 8.30171C6.35829 8.0674 6.73819 8.0674 6.97251 8.30171L8.00007 9.32928 9.02764 8.30171C9.26195 8.0674 9.64185 8.0674 9.87617 8.30171 10.1105 8.53603 10.1105 8.91593 9.87617 9.15024L8.8486 10.1778 9.87617 11.2054C10.1105 11.4397 10.1105 11.8196 9.87617 12.0539 9.64185 12.2882 9.26195 12.2882 9.02764 12.0539L8.00007 11.0263 6.97251 12.0539C6.73819 12.2882 6.35829 12.2882 6.12398 12.0539 5.88966 11.8196 5.88966 11.4397 6.12398 11.2054L7.15154 10.1778 6.12398 9.15024C5.88966 8.91593 5.88966 8.53603 6.12398 8.30171z"}},{tag:"path",attrs:{fill:"currentColor",d:"M4.75332 5.22217C3.86966 5.22217 3.15332 5.93851 3.15332 6.82217V12.5331C3.15332 13.9691 4.31738 15.1332 5.75332 15.1332H10.2465C11.6825 15.1332 12.8465 13.9691 12.8465 12.5331V6.82217C12.8465 5.93851 12.1302 5.22217 11.2465 5.22217H4.75332ZM4.35332 6.82217C4.35332 6.60125 4.53241 6.42217 4.75332 6.42217H11.2465C11.4674 6.42217 11.6465 6.60125 11.6465 6.82217V12.5331C11.6465 13.3063 11.0197 13.9332 10.2465 13.9332H5.75332C4.98012 13.9332 4.35332 13.3063 4.35332 12.5331V6.82217Z",fillRule:"evenodd",clipRule:"evenodd"}}]},xt=j.forwardRef(function(t,e){return j.createElement($e,Object.assign({},t,{id:"delete-single",ref:e,icon:qr}))});xt.displayName="DeleteSingle";var Wr={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M8.6 1.99991C8.60001 1.66854 8.33138 1.39991 8.00001 1.3999C7.66864 1.3999 7.40001 1.66853 7.4 1.9999L7.39996 7.3999H1.9999C1.66853 7.3999 1.3999 7.66853 1.3999 7.9999C1.3999 8.33127 1.66853 8.5999 1.9999 8.5999H7.39995L7.3999 13.9999C7.3999 14.3313 7.66853 14.5999 7.9999 14.5999C8.33127 14.5999 8.5999 14.3313 8.5999 13.9999L8.59995 8.5999H13.9999C14.3313 8.5999 14.5999 8.33127 14.5999 7.9999C14.5999 7.66853 14.3313 7.3999 13.9999 7.3999H8.59996L8.6 1.99991Z"}}]},or=j.forwardRef(function(t,e){return j.createElement($e,Object.assign({},t,{id:"increase-single",ref:e,icon:Wr}))});or.displayName="IncreaseSingle";var Hr={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z",fillRule:"evenodd",clipRule:"evenodd"}}]},Nt=j.forwardRef(function(t,e){return j.createElement($e,Object.assign({},t,{id:"more-down-single",ref:e,icon:Hr}))});Nt.displayName="MoreDownSingle";var Br={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"mask",attrs:{id:"mask0_622_8",style:{maskType:"alpha"},width:16,height:16,x:0,y:0,maskUnits:"userSpaceOnUse"},children:[{tag:"path",attrs:{fill:"#D9D9D9",d:"M0 0H16V16H0z"}}]},{tag:"g",attrs:{fill:"currentColor",mask:"url(#mask0_622_8)"},children:[{tag:"path",attrs:{d:"M6 5C6.55228 5 7 4.55228 7 4 7 3.44772 6.55228 3 6 3 5.44772 3 5 3.44772 5 4 5 4.55228 5.44772 5 6 5zM6 9C6.55228 9 7 8.55229 7 8 7 7.44772 6.55228 7 6 7 5.44772 7 5 7.44772 5 8 5 8.55229 5.44772 9 6 9zM7 12C7 12.5523 6.55228 13 6 13 5.44772 13 5 12.5523 5 12 5 11.4477 5.44772 11 6 11 6.55228 11 7 11.4477 7 12zM10 5C10.5523 5 11 4.55228 11 4 11 3.44772 10.5523 3 10 3 9.44771 3 9 3.44772 9 4 9 4.55228 9.44771 5 10 5zM11 8C11 8.55229 10.5523 9 10 9 9.44771 9 9 8.55229 9 8 9 7.44772 9.44771 7 10 7 10.5523 7 11 7.44772 11 8zM10 13C10.5523 13 11 12.5523 11 12 11 11.4477 10.5523 11 10 11 9.44771 11 9 11.4477 9 12 9 12.5523 9.44771 13 10 13z"}}]}]},ir=j.forwardRef(function(t,e){return j.createElement($e,Object.assign({},t,{id:"sequence-single",ref:e,icon:Br}))});ir.displayName="SequenceSingle";var Gr={tag:"svg",attrs:{fill:"none",viewBox:"0 0 17 17",width:"1em",height:"1em"},children:[{tag:"mask",attrs:{id:"mask0_436_41",style:{maskType:"alpha"},width:17,height:17,x:0,y:0,maskUnits:"userSpaceOnUse"},children:[{tag:"path",attrs:{fill:"#D9D9D9",d:"M0.35 0.48H16.35V16.48H0.35z"}}]},{tag:"g",attrs:{mask:"url(#mask0_436_41)",fillRule:"evenodd",clipRule:"evenodd"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M2.27177 13.714L13.5855 2.40025L14.434 3.24878L3.1203 14.5625L2.27177 13.714Z"}},{tag:"path",attrs:{fill:"#E5E5E5",d:"M4.2603 1.82495L2.89617 1.82495C2.23343 1.82495 1.69617 2.36221 1.69617 3.02495L1.69617 4.38908L3.02617 4.38908L3.02617 3.15495L4.2603 3.15495L4.2603 1.82495ZM15.0092 4.38908L15.0092 3.02495C15.0092 2.36221 14.4719 1.82495 13.8092 1.82495L12.4451 1.82495L12.4451 3.15495L13.6792 3.15495L13.6792 4.38908L15.0092 4.38908ZM6.98856 1.82495L6.98856 3.15495L9.71681 3.15495L9.71681 1.82495L6.98856 1.82495ZM15.0092 7.11734L13.6792 7.11734L13.6792 9.84559L15.0092 9.84559L15.0092 7.11734ZM15.0092 12.5739L13.6792 12.5739L13.6792 13.808L12.4451 13.808L12.4451 15.138L13.8092 15.138C14.4719 15.138 15.0092 14.6007 15.0092 13.938L15.0092 12.5739ZM9.71681 15.138L9.71681 13.808L6.98856 13.808L6.98856 15.138L9.71681 15.138ZM4.2603 15.138L4.2603 13.808L3.02617 13.808L3.02617 12.5739L1.69617 12.5739L1.69617 13.938C1.69617 14.6007 2.23343 15.138 2.89617 15.138L4.2603 15.138ZM1.69617 9.8456L3.02617 9.8456L3.02617 7.11734L1.69617 7.11734L1.69617 9.8456Z"}}]}]},ft=j.forwardRef(function(t,e){return j.createElement($e,Object.assign({},t,{id:"slash-single",ref:e,icon:Gr}))});ft.displayName="SlashSingle";function Xr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function ar(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:function(){return t[n]}})}),r}var Vt={exports:{}},We={},ot={exports:{}},Yr=ot.exports,pn;function sn(){return pn||(pn=1,function(t,e){(function(r,n){n(e)})(Yr,function(r){function n($){return function(ae,O,P,F,V,B,A){return $(ae,O,A)}}function o($){return function(ae,O,P,F){if(!ae||!O||typeof ae!="object"||typeof O!="object")return $(ae,O,P,F);var V=F.get(ae),B=F.get(O);if(V&&B)return V===O&&B===ae;F.set(ae,O),F.set(O,ae);var A=$(ae,O,P,F);return F.delete(ae),F.delete(O),A}}function i($,K){var ae={};for(var O in $)ae[O]=$[O];for(var O in K)ae[O]=K[O];return ae}function c($){return $.constructor===Object||$.constructor==null}function y($){return typeof $.then=="function"}function p($,K){return $===K||$!==$&&K!==K}var S="[object Arguments]",v="[object Boolean]",R="[object Date]",_="[object RegExp]",T="[object Map]",b="[object Number]",w="[object Object]",h="[object Set]",a="[object String]",s=Object.prototype.toString;function f($){var K=$.areArraysEqual,ae=$.areDatesEqual,O=$.areMapsEqual,P=$.areObjectsEqual,F=$.areRegExpsEqual,V=$.areSetsEqual,B=$.createIsNestedEqual,A=B(Y);function Y(G,te,ce){if(G===te)return!0;if(!G||!te||typeof G!="object"||typeof te!="object")return G!==G&&te!==te;if(c(G)&&c(te))return P(G,te,A,ce);var Pe=Array.isArray(G),ye=Array.isArray(te);if(Pe||ye)return Pe===ye&&K(G,te,A,ce);var ge=s.call(G);return ge!==s.call(te)?!1:ge===R?ae(G,te,A,ce):ge===_?F(G,te,A,ce):ge===T?O(G,te,A,ce):ge===h?V(G,te,A,ce):ge===w||ge===S?y(G)||y(te)?!1:P(G,te,A,ce):ge===v||ge===b||ge===a?p(G.valueOf(),te.valueOf()):!1}return Y}function C($,K,ae,O){var P=$.length;if(K.length!==P)return!1;for(;P-- >0;)if(!ae($[P],K[P],P,P,$,K,O))return!1;return!0}var l=o(C);function m($,K){return p($.valueOf(),K.valueOf())}function d($,K,ae,O){var P=$.size===K.size;if(!P)return!1;if(!$.size)return!0;var F={},V=0;return $.forEach(function(B,A){if(P){var Y=!1,G=0;K.forEach(function(te,ce){!Y&&!F[G]&&(Y=ae(A,ce,V,G,$,K,O)&&ae(B,te,A,ce,$,K,O))&&(F[G]=!0),G++}),V++,P=Y}}),P}var g=o(d),D="_owner",M=Object.prototype.hasOwnProperty;function L($,K,ae,O){var P=Object.keys($),F=P.length;if(Object.keys(K).length!==F)return!1;for(var V;F-- >0;){if(V=P[F],V===D){var B=!!$.$$typeof,A=!!K.$$typeof;if((B||A)&&B!==A)return!1}if(!M.call(K,V)||!ae($[V],K[V],V,V,$,K,O))return!1}return!0}var U=o(L);function E($,K){return $.source===K.source&&$.flags===K.flags}function N($,K,ae,O){var P=$.size===K.size;if(!P)return!1;if(!$.size)return!0;var F={};return $.forEach(function(V,B){if(P){var A=!1,Y=0;K.forEach(function(G,te){!A&&!F[Y]&&(A=ae(V,G,B,te,$,K,O))&&(F[Y]=!0),Y++}),P=A}}),P}var q=o(N),H=Object.freeze({areArraysEqual:C,areDatesEqual:m,areMapsEqual:d,areObjectsEqual:L,areRegExpsEqual:E,areSetsEqual:N,createIsNestedEqual:n}),J=Object.freeze({areArraysEqual:l,areDatesEqual:m,areMapsEqual:g,areObjectsEqual:U,areRegExpsEqual:E,areSetsEqual:q,createIsNestedEqual:n}),ie=f(H);function re($,K){return ie($,K,void 0)}var le=f(i(H,{createIsNestedEqual:function(){return p}}));function k($,K){return le($,K,void 0)}var Q=f(J);function ne($,K){return Q($,K,new WeakMap)}var se=f(i(J,{createIsNestedEqual:function(){return p}}));function de($,K){return se($,K,new WeakMap)}function he($){return f(i(H,$(H)))}function be($){var K=f(i(J,$(J)));return function(ae,O,P){return P===void 0&&(P=new WeakMap),K(ae,O,P)}}r.circularDeepEqual=ne,r.circularShallowEqual=de,r.createCustomCircularEqual=be,r.createCustomEqual=he,r.deepEqual=re,r.sameValueZeroEqual=p,r.shallowEqual=k,Object.defineProperty(r,"__esModule",{value:!0})})}(ot,ot.exports)),ot.exports}var mt={exports:{}},hn;function ln(){if(hn)return mt.exports;hn=1;function t(r){var n,o,i="";if(typeof r=="string"||typeof r=="number")i+=r;else if(typeof r=="object")if(Array.isArray(r)){var c=r.length;for(n=0;n<c;n++)r[n]&&(o=t(r[n]))&&(i&&(i+=" "),i+=o)}else for(o in r)r[o]&&(i&&(i+=" "),i+=o);return i}function e(){for(var r,n,o=0,i="",c=arguments.length;o<c;o++)(r=arguments[o])&&(n=t(r))&&(i&&(i+=" "),i+=n);return i}return mt.exports=e,mt.exports.clsx=e,mt.exports}var oe={},zt,mn;function Kr(){return mn||(mn=1,zt=function(e,r,n){return e===r?!0:e.className===r.className&&n(e.style,r.style)&&e.width===r.width&&e.autoSize===r.autoSize&&e.cols===r.cols&&e.draggableCancel===r.draggableCancel&&e.draggableHandle===r.draggableHandle&&n(e.verticalCompact,r.verticalCompact)&&n(e.compactType,r.compactType)&&n(e.layout,r.layout)&&n(e.margin,r.margin)&&n(e.containerPadding,r.containerPadding)&&e.rowHeight===r.rowHeight&&e.maxRows===r.maxRows&&e.isBounded===r.isBounded&&e.isDraggable===r.isDraggable&&e.isResizable===r.isResizable&&e.allowOverlap===r.allowOverlap&&e.preventCollision===r.preventCollision&&e.useCSSTransforms===r.useCSSTransforms&&e.transformScale===r.transformScale&&e.isDroppable===r.isDroppable&&n(e.resizeHandles,r.resizeHandles)&&n(e.resizeHandle,r.resizeHandle)&&e.onLayoutChange===r.onLayoutChange&&e.onDragStart===r.onDragStart&&e.onDrag===r.onDrag&&e.onDragStop===r.onDragStop&&e.onResizeStart===r.onResizeStart&&e.onResize===r.onResize&&e.onResizeStop===r.onResizeStop&&e.onDrop===r.onDrop&&n(e.droppingItem,r.droppingItem)&&n(e.innerRef,r.innerRef)}),zt}var gn;function Ae(){if(gn)return oe;gn=1,Object.defineProperty(oe,"__esModule",{value:!0}),oe.bottom=n,oe.childrenEqual=p,oe.cloneLayout=o,oe.cloneLayoutItem=y,oe.collides=v,oe.compact=R,oe.compactItem=b,oe.compactType=$,oe.correctBounds=w,oe.fastPositionEqual=S,oe.fastRGLPropsEqual=void 0,oe.getAllCollisions=s,oe.getFirstCollision=a,oe.getLayoutItem=h,oe.getStatics=f,oe.modifyLayout=i,oe.moveElement=C,oe.moveElementAwayFromCollision=l,oe.noop=void 0,oe.perc=m,oe.resizeItemInDirection=le,oe.setTopLeft=Q,oe.setTransform=k,oe.sortLayoutItems=ne,oe.sortLayoutItemsByColRow=de,oe.sortLayoutItemsByRowCol=se,oe.synchronizeLayoutWithChildren=he,oe.validateLayout=be,oe.withLayoutItem=c;var t=sn(),e=r(j);function r(O){return O&&O.__esModule?O:{default:O}}function n(O){let P=0,F;for(let V=0,B=O.length;V<B;V++)F=O[V].y+O[V].h,F>P&&(P=F);return P}function o(O){const P=Array(O.length);for(let F=0,V=O.length;F<V;F++)P[F]=y(O[F]);return P}function i(O,P){const F=Array(O.length);for(let V=0,B=O.length;V<B;V++)P.i===O[V].i?F[V]=P:F[V]=O[V];return F}function c(O,P,F){let V=h(O,P);return V?(V=F(y(V)),O=i(O,V),[O,V]):[O,null]}function y(O){return{w:O.w,h:O.h,x:O.x,y:O.y,i:O.i,minW:O.minW,maxW:O.maxW,minH:O.minH,maxH:O.maxH,moved:!!O.moved,static:!!O.static,isDraggable:O.isDraggable,isResizable:O.isResizable,resizeHandles:O.resizeHandles,isBounded:O.isBounded}}function p(O,P){return(0,t.deepEqual)(e.default.Children.map(O,F=>F==null?void 0:F.key),e.default.Children.map(P,F=>F==null?void 0:F.key))&&(0,t.deepEqual)(e.default.Children.map(O,F=>F==null?void 0:F.props["data-grid"]),e.default.Children.map(P,F=>F==null?void 0:F.props["data-grid"]))}oe.fastRGLPropsEqual=Kr();function S(O,P){return O.left===P.left&&O.top===P.top&&O.width===P.width&&O.height===P.height}function v(O,P){return!(O.i===P.i||O.x+O.w<=P.x||O.x>=P.x+P.w||O.y+O.h<=P.y||O.y>=P.y+P.h)}function R(O,P,F,V){const B=f(O),A=ne(O,P),Y=Array(O.length);for(let G=0,te=A.length;G<te;G++){let ce=y(A[G]);ce.static||(ce=b(B,ce,P,F,A,V),B.push(ce)),Y[O.indexOf(A[G])]=ce,ce.moved=!1}return Y}const _={x:"w",y:"h"};function T(O,P,F,V){const B=_[V];P[V]+=1;const A=O.map(Y=>Y.i).indexOf(P.i);for(let Y=A+1;Y<O.length;Y++){const G=O[Y];if(!G.static){if(G.y>P.y+P.h)break;v(P,G)&&T(O,G,F+P[B],V)}}P[V]=F}function b(O,P,F,V,B,A){const Y=F==="vertical",G=F==="horizontal";if(Y)for(P.y=Math.min(n(O),P.y);P.y>0&&!a(O,P);)P.y--;else if(G)for(;P.x>0&&!a(O,P);)P.x--;let te;for(;(te=a(O,P))&&!(F===null&&A);)if(G?T(B,P,te.x+te.w,"x"):T(B,P,te.y+te.h,"y"),G&&P.x+P.w>V)for(P.x=V-P.w,P.y++;P.x>0&&!a(O,P);)P.x--;return P.y=Math.max(P.y,0),P.x=Math.max(P.x,0),P}function w(O,P){const F=f(O);for(let V=0,B=O.length;V<B;V++){const A=O[V];if(A.x+A.w>P.cols&&(A.x=P.cols-A.w),A.x<0&&(A.x=0,A.w=P.cols),!A.static)F.push(A);else for(;a(F,A);)A.y++}return O}function h(O,P){for(let F=0,V=O.length;F<V;F++)if(O[F].i===P)return O[F]}function a(O,P){for(let F=0,V=O.length;F<V;F++)if(v(O[F],P))return O[F]}function s(O,P){return O.filter(F=>v(F,P))}function f(O){return O.filter(P=>P.static)}function C(O,P,F,V,B,A,Y,G,te){if(P.static&&P.isDraggable!==!0||P.y===V&&P.x===F)return O;`${P.i}${String(F)}${String(V)}${P.x}${P.y}`;const ce=P.x,Pe=P.y;typeof F=="number"&&(P.x=F),typeof V=="number"&&(P.y=V),P.moved=!0;let ye=ne(O,Y);(Y==="vertical"&&typeof V=="number"?Pe>=V:Y==="horizontal"&&typeof F=="number"?ce>=F:!1)&&(ye=ye.reverse());const je=s(ye,P),ht=je.length>0;if(ht&&te)return o(O);if(ht&&A)return`${P.i}`,P.x=ce,P.y=Pe,P.moved=!1,O;for(let Ut=0,wr=je.length;Ut<wr;Ut++){const De=je[Ut];`${P.i}${P.x}${P.y}${De.i}${De.x}${De.y}`,!De.moved&&(De.static?O=l(O,De,P,B,Y):O=l(O,P,De,B,Y))}return O}function l(O,P,F,V,B,A){const Y=B==="horizontal",G=B==="vertical",te=P.static;if(V){V=!1;const ye={x:Y?Math.max(P.x-F.w,0):F.x,y:G?Math.max(P.y-F.h,0):F.y,w:F.w,h:F.h,i:"-1"},ge=a(O,ye),je=ge&&ge.y+ge.h>P.y,ht=ge&&P.x+P.w>ge.x;if(ge){if(je&&G)return C(O,F,void 0,P.y+1,V,te,B);if(je&&B==null)return P.y=F.y,F.y=F.y+F.h,O;if(ht&&Y)return C(O,P,F.x,void 0,V,te,B)}else return`${F.i}${ye.x}${ye.y}`,C(O,F,Y?ye.x:void 0,G?ye.y:void 0,V,te,B)}const ce=Y?F.x+1:void 0,Pe=G?F.y+1:void 0;return ce==null&&Pe==null?O:C(O,F,Y?F.x+1:void 0,G?F.y+1:void 0,V,te,B)}function m(O){return O*100+"%"}const d=(O,P,F,V)=>O+F>V?P:F,g=(O,P,F)=>O<0?P:F,D=O=>Math.max(0,O),M=O=>Math.max(0,O),L=(O,P,F)=>{let{left:V,height:B,width:A}=P;const Y=O.top-(B-O.height);return{left:V,width:A,height:g(Y,O.height,B),top:M(Y)}},U=(O,P,F)=>{let{top:V,left:B,height:A,width:Y}=P;return{top:V,height:A,width:d(O.left,O.width,Y,F),left:D(B)}},E=(O,P,F)=>{let{top:V,height:B,width:A}=P;const Y=O.left-(A-O.width);return{height:B,width:Y<0?O.width:d(O.left,O.width,A,F),top:M(V),left:D(Y)}},N=(O,P,F)=>{let{top:V,left:B,height:A,width:Y}=P;return{width:Y,left:B,height:g(V,O.height,A),top:M(V)}},re={n:L,ne:function(){return L(arguments.length<=0?void 0:arguments[0],U(...arguments))},e:U,se:function(){return N(arguments.length<=0?void 0:arguments[0],U(...arguments))},s:N,sw:function(){return N(arguments.length<=0?void 0:arguments[0],E(...arguments))},w:E,nw:function(){return L(arguments.length<=0?void 0:arguments[0],E(...arguments))}};function le(O,P,F,V){const B=re[O];return B?B(P,{...P,...F},V):F}function k(O){let{top:P,left:F,width:V,height:B}=O;const A=`translate(${F}px,${P}px)`;return{transform:A,WebkitTransform:A,MozTransform:A,msTransform:A,OTransform:A,width:`${V}px`,height:`${B}px`,position:"absolute"}}function Q(O){let{top:P,left:F,width:V,height:B}=O;return{top:`${P}px`,left:`${F}px`,width:`${V}px`,height:`${B}px`,position:"absolute"}}function ne(O,P){return P==="horizontal"?de(O):P==="vertical"?se(O):O}function se(O){return O.slice(0).sort(function(P,F){return P.y>F.y||P.y===F.y&&P.x>F.x?1:P.y===F.y&&P.x===F.x?0:-1})}function de(O){return O.slice(0).sort(function(P,F){return P.x>F.x||P.x===F.x&&P.y>F.y?1:-1})}function he(O,P,F,V,B){O=O||[];const A=[];e.default.Children.forEach(P,G=>{if((G==null?void 0:G.key)==null)return;const te=h(O,String(G.key)),ce=G.props["data-grid"];te&&ce==null?A.push(y(te)):ce?A.push(y({...ce,i:G.key})):A.push(y({w:1,h:1,x:0,y:n(A),i:String(G.key)}))});const Y=w(A,{cols:F});return B?Y:R(Y,V,F)}function be(O){let P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Layout";const F=["x","y","w","h"];if(!Array.isArray(O))throw new Error(P+" must be an array!");for(let V=0,B=O.length;V<B;V++){const A=O[V];for(let Y=0;Y<F.length;Y++)if(typeof A[F[Y]]!="number")throw new Error("ReactGridLayout: "+P+"["+V+"]."+F[Y]+" must be a number!")}}function $(O){const{verticalCompact:P,compactType:F}=O||{};return P===!1?null:F}function K(){}const ae=()=>{};return oe.noop=ae,oe}var Te={},vn;function un(){if(vn)return Te;vn=1,Object.defineProperty(Te,"__esModule",{value:!0}),Te.calcGridColWidth=t,Te.calcGridItemPosition=r,Te.calcGridItemWHPx=e,Te.calcWH=o,Te.calcXY=n,Te.clamp=i;function t(c){const{margin:y,containerPadding:p,containerWidth:S,cols:v}=c;return(S-y[0]*(v-1)-p[0]*2)/v}function e(c,y,p){return Number.isFinite(c)?Math.round(y*c+Math.max(0,c-1)*p):c}function r(c,y,p,S,v,R){const{margin:_,containerPadding:T,rowHeight:b}=c,w=t(c),h={};return R&&R.resizing?(h.width=Math.round(R.resizing.width),h.height=Math.round(R.resizing.height)):(h.width=e(S,w,_[0]),h.height=e(v,b,_[1])),R&&R.dragging?(h.top=Math.round(R.dragging.top),h.left=Math.round(R.dragging.left)):R&&R.resizing&&typeof R.resizing.top=="number"&&typeof R.resizing.left=="number"?(h.top=Math.round(R.resizing.top),h.left=Math.round(R.resizing.left)):(h.top=Math.round((b+_[1])*p+T[1]),h.left=Math.round((w+_[0])*y+T[0])),h}function n(c,y,p,S,v){const{margin:R,cols:_,rowHeight:T,maxRows:b}=c,w=t(c);let h=Math.round((p-R[0])/(w+R[0])),a=Math.round((y-R[1])/(T+R[1]));return h=i(h,0,_-S),a=i(a,0,b-v),{x:h,y:a}}function o(c,y,p,S,v,R){const{margin:_,maxRows:T,cols:b,rowHeight:w}=c,h=t(c);let a=Math.round((y+_[0])/(h+_[0])),s=Math.round((p+_[1])/(w+_[1])),f=i(a,0,b-S),C=i(s,0,T-v);return["sw","w","nw"].indexOf(R)!==-1&&(f=i(a,0,b)),["nw","n","ne"].indexOf(R)!==-1&&(C=i(s,0,T)),{w:f,h:C}}function i(c,y,p){return Math.max(Math.min(c,p),y)}return Te}var He={},kt={exports:{}},$t,yn;function Zr(){if(yn)return $t;yn=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return $t=t,$t}var At,Cn;function Jr(){if(Cn)return At;Cn=1;var t=Zr();function e(){}function r(){}return r.resetWarningCache=e,At=function(){function n(c,y,p,S,v,R){if(R!==t){var _=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw _.name="Invariant Violation",_}}n.isRequired=n;function o(){return n}var i={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:e};return i.PropTypes=i,i},At}var bn;function Oe(){return bn||(bn=1,kt.exports=Jr()()),kt.exports}var Be={exports:{}},qt={};function sr(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(r=sr(t[e]))&&(n&&(n+=" "),n+=r);else for(e in t)t[e]&&(n&&(n+=" "),n+=e);return n}function Sn(){for(var t,e,r=0,n="";r<arguments.length;)(t=arguments[r++])&&(e=sr(t))&&(n&&(n+=" "),n+=e);return n}const Qr=Object.freeze(Object.defineProperty({__proto__:null,clsx:Sn,default:Sn},Symbol.toStringTag,{value:"Module"})),eo=ar(Qr);var pe={},_e={},Rn;function jt(){if(Rn)return _e;Rn=1,Object.defineProperty(_e,"__esModule",{value:!0}),_e.dontSetMe=o,_e.findInArray=t,_e.int=n,_e.isFunction=e,_e.isNum=r;function t(i,c){for(let y=0,p=i.length;y<p;y++)if(c.apply(c,[i[y],y,i]))return i[y]}function e(i){return typeof i=="function"||Object.prototype.toString.call(i)==="[object Function]"}function r(i){return typeof i=="number"&&!isNaN(i)}function n(i){return parseInt(i,10)}function o(i,c,y){if(i[c])return new Error("Invalid prop ".concat(c," passed to ").concat(y," - do not set this, set it on the child."))}return _e}var Ee={},Tn;function to(){if(Tn)return Ee;Tn=1,Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.browserPrefixToKey=r,Ee.browserPrefixToStyle=n,Ee.default=void 0,Ee.getPrefix=e;const t=["Moz","Webkit","O","ms"];function e(){var i;let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window>"u")return"";const y=(i=window.document)===null||i===void 0||(i=i.documentElement)===null||i===void 0?void 0:i.style;if(!y||c in y)return"";for(let p=0;p<t.length;p++)if(r(c,t[p])in y)return t[p];return""}function r(i,c){return c?"".concat(c).concat(o(i)):i}function n(i,c){return c?"-".concat(c.toLowerCase(),"-").concat(i):i}function o(i){let c="",y=!0;for(let p=0;p<i.length;p++)y?(c+=i[p].toUpperCase(),y=!1):i[p]==="-"?y=!0:c+=i[p];return c}return Ee.default=e(),Ee}var wn;function cn(){if(wn)return pe;wn=1,Object.defineProperty(pe,"__esModule",{value:!0}),pe.addClassName=l,pe.addEvent=y,pe.addUserSelectStyles=f,pe.createCSSTransform=b,pe.createSVGTransform=w,pe.getTouch=a,pe.getTouchIdentifier=s,pe.getTranslation=h,pe.innerHeight=R,pe.innerWidth=_,pe.matchesSelector=i,pe.matchesSelectorAndParentsTo=c,pe.offsetXYFromParent=T,pe.outerHeight=S,pe.outerWidth=v,pe.removeClassName=m,pe.removeEvent=p,pe.removeUserSelectStyles=C;var t=jt(),e=n(to());function r(d){if(typeof WeakMap!="function")return null;var g=new WeakMap,D=new WeakMap;return(r=function(M){return M?D:g})(d)}function n(d,g){if(d&&d.__esModule)return d;if(d===null||typeof d!="object"&&typeof d!="function")return{default:d};var D=r(g);if(D&&D.has(d))return D.get(d);var M={},L=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var U in d)if(U!=="default"&&Object.prototype.hasOwnProperty.call(d,U)){var E=L?Object.getOwnPropertyDescriptor(d,U):null;E&&(E.get||E.set)?Object.defineProperty(M,U,E):M[U]=d[U]}return M.default=d,D&&D.set(d,M),M}let o="";function i(d,g){return o||(o=(0,t.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(D){return(0,t.isFunction)(d[D])})),(0,t.isFunction)(d[o])?d[o](g):!1}function c(d,g,D){let M=d;do{if(i(M,g))return!0;if(M===D)return!1;M=M.parentNode}while(M);return!1}function y(d,g,D,M){if(!d)return;const L={capture:!0,...M};d.addEventListener?d.addEventListener(g,D,L):d.attachEvent?d.attachEvent("on"+g,D):d["on"+g]=D}function p(d,g,D,M){if(!d)return;const L={capture:!0,...M};d.removeEventListener?d.removeEventListener(g,D,L):d.detachEvent?d.detachEvent("on"+g,D):d["on"+g]=null}function S(d){let g=d.clientHeight;const D=d.ownerDocument.defaultView.getComputedStyle(d);return g+=(0,t.int)(D.borderTopWidth),g+=(0,t.int)(D.borderBottomWidth),g}function v(d){let g=d.clientWidth;const D=d.ownerDocument.defaultView.getComputedStyle(d);return g+=(0,t.int)(D.borderLeftWidth),g+=(0,t.int)(D.borderRightWidth),g}function R(d){let g=d.clientHeight;const D=d.ownerDocument.defaultView.getComputedStyle(d);return g-=(0,t.int)(D.paddingTop),g-=(0,t.int)(D.paddingBottom),g}function _(d){let g=d.clientWidth;const D=d.ownerDocument.defaultView.getComputedStyle(d);return g-=(0,t.int)(D.paddingLeft),g-=(0,t.int)(D.paddingRight),g}function T(d,g,D){const L=g===g.ownerDocument.body?{left:0,top:0}:g.getBoundingClientRect(),U=(d.clientX+g.scrollLeft-L.left)/D,E=(d.clientY+g.scrollTop-L.top)/D;return{x:U,y:E}}function b(d,g){const D=h(d,g,"px");return{[(0,e.browserPrefixToKey)("transform",e.default)]:D}}function w(d,g){return h(d,g,"")}function h(d,g,D){let{x:M,y:L}=d,U="translate(".concat(M).concat(D,",").concat(L).concat(D,")");if(g){const E="".concat(typeof g.x=="string"?g.x:g.x+D),N="".concat(typeof g.y=="string"?g.y:g.y+D);U="translate(".concat(E,", ").concat(N,")")+U}return U}function a(d,g){return d.targetTouches&&(0,t.findInArray)(d.targetTouches,D=>g===D.identifier)||d.changedTouches&&(0,t.findInArray)(d.changedTouches,D=>g===D.identifier)}function s(d){if(d.targetTouches&&d.targetTouches[0])return d.targetTouches[0].identifier;if(d.changedTouches&&d.changedTouches[0])return d.changedTouches[0].identifier}function f(d){if(!d)return;let g=d.getElementById("react-draggable-style-el");g||(g=d.createElement("style"),g.type="text/css",g.id="react-draggable-style-el",g.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
|
|
2
2
|
`,g.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
|
|
3
3
|
`,d.getElementsByTagName("head")[0].appendChild(g)),d.body&&l(d.body,"react-draggable-transparent-selection")}function C(d){if(d)try{if(d.body&&m(d.body,"react-draggable-transparent-selection"),d.selection)d.selection.empty();else{const g=(d.defaultView||window).getSelection();g&&g.type!=="Caret"&&g.removeAllRanges()}}catch{}}function l(d,g){d.classList?d.classList.add(g):d.className.match(new RegExp("(?:^|\\s)".concat(g,"(?!\\S)")))||(d.className+=" ".concat(g))}function m(d,g){d.classList?d.classList.remove(g):d.className=d.className.replace(new RegExp("(?:^|\\s)".concat(g,"(?!\\S)"),"g"),"")}return pe}var Re={},xn;function lr(){if(xn)return Re;xn=1,Object.defineProperty(Re,"__esModule",{value:!0}),Re.canDragX=o,Re.canDragY=i,Re.createCoreData=y,Re.createDraggableData=p,Re.getBoundPosition=r,Re.getControlPosition=c,Re.snapToGrid=n;var t=jt(),e=cn();function r(R,_,T){if(!R.props.bounds)return[_,T];let{bounds:b}=R.props;b=typeof b=="string"?b:S(b);const w=v(R);if(typeof b=="string"){const{ownerDocument:h}=w,a=h.defaultView;let s;if(b==="parent"?s=w.parentNode:s=h.querySelector(b),!(s instanceof a.HTMLElement))throw new Error('Bounds selector "'+b+'" could not find an element.');const f=s,C=a.getComputedStyle(w),l=a.getComputedStyle(f);b={left:-w.offsetLeft+(0,t.int)(l.paddingLeft)+(0,t.int)(C.marginLeft),top:-w.offsetTop+(0,t.int)(l.paddingTop)+(0,t.int)(C.marginTop),right:(0,e.innerWidth)(f)-(0,e.outerWidth)(w)-w.offsetLeft+(0,t.int)(l.paddingRight)-(0,t.int)(C.marginRight),bottom:(0,e.innerHeight)(f)-(0,e.outerHeight)(w)-w.offsetTop+(0,t.int)(l.paddingBottom)-(0,t.int)(C.marginBottom)}}return(0,t.isNum)(b.right)&&(_=Math.min(_,b.right)),(0,t.isNum)(b.bottom)&&(T=Math.min(T,b.bottom)),(0,t.isNum)(b.left)&&(_=Math.max(_,b.left)),(0,t.isNum)(b.top)&&(T=Math.max(T,b.top)),[_,T]}function n(R,_,T){const b=Math.round(_/R[0])*R[0],w=Math.round(T/R[1])*R[1];return[b,w]}function o(R){return R.props.axis==="both"||R.props.axis==="x"}function i(R){return R.props.axis==="both"||R.props.axis==="y"}function c(R,_,T){const b=typeof _=="number"?(0,e.getTouch)(R,_):null;if(typeof _=="number"&&!b)return null;const w=v(T),h=T.props.offsetParent||w.offsetParent||w.ownerDocument.body;return(0,e.offsetXYFromParent)(b||R,h,T.props.scale)}function y(R,_,T){const b=!(0,t.isNum)(R.lastX),w=v(R);return b?{node:w,deltaX:0,deltaY:0,lastX:_,lastY:T,x:_,y:T}:{node:w,deltaX:_-R.lastX,deltaY:T-R.lastY,lastX:R.lastX,lastY:R.lastY,x:_,y:T}}function p(R,_){const T=R.props.scale;return{node:_.node,x:R.state.x+_.deltaX/T,y:R.state.y+_.deltaY/T,deltaX:_.deltaX/T,deltaY:_.deltaY/T,lastX:R.state.x,lastY:R.state.y}}function S(R){return{left:R.left,top:R.top,right:R.right,bottom:R.bottom}}function v(R){const _=R.findDOMNode();if(!_)throw new Error("<DraggableCore>: Unmounted during event!");return _}return Re}var Ge={},gt={},In;function ur(){if(In)return gt;In=1,Object.defineProperty(gt,"__esModule",{value:!0}),gt.default=t;function t(){}return gt}var _n;function no(){if(_n)return Ge;_n=1,Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.default=void 0;var t=S(j),e=y(Oe()),r=y(tr),n=cn(),o=lr(),i=jt(),c=y(ur());function y(h){return h&&h.__esModule?h:{default:h}}function p(h){if(typeof WeakMap!="function")return null;var a=new WeakMap,s=new WeakMap;return(p=function(f){return f?s:a})(h)}function S(h,a){if(h&&h.__esModule)return h;if(h===null||typeof h!="object"&&typeof h!="function")return{default:h};var s=p(a);if(s&&s.has(h))return s.get(h);var f={},C=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in h)if(l!=="default"&&Object.prototype.hasOwnProperty.call(h,l)){var m=C?Object.getOwnPropertyDescriptor(h,l):null;m&&(m.get||m.set)?Object.defineProperty(f,l,m):f[l]=h[l]}return f.default=h,s&&s.set(h,f),f}function v(h,a,s){return a=R(a),a in h?Object.defineProperty(h,a,{value:s,enumerable:!0,configurable:!0,writable:!0}):h[a]=s,h}function R(h){var a=_(h,"string");return typeof a=="symbol"?a:String(a)}function _(h,a){if(typeof h!="object"||h===null)return h;var s=h[Symbol.toPrimitive];if(s!==void 0){var f=s.call(h,a);if(typeof f!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(h)}const T={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let b=T.mouse,w=class extends t.Component{constructor(){super(...arguments),v(this,"dragging",!1),v(this,"lastX",NaN),v(this,"lastY",NaN),v(this,"touchIdentifier",null),v(this,"mounted",!1),v(this,"handleDragStart",a=>{if(this.props.onMouseDown(a),!this.props.allowAnyClick&&typeof a.button=="number"&&a.button!==0)return!1;const s=this.findDOMNode();if(!s||!s.ownerDocument||!s.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:f}=s;if(this.props.disabled||!(a.target instanceof f.defaultView.Node)||this.props.handle&&!(0,n.matchesSelectorAndParentsTo)(a.target,this.props.handle,s)||this.props.cancel&&(0,n.matchesSelectorAndParentsTo)(a.target,this.props.cancel,s))return;a.type==="touchstart"&&a.preventDefault();const C=(0,n.getTouchIdentifier)(a);this.touchIdentifier=C;const l=(0,o.getControlPosition)(a,C,this);if(l==null)return;const{x:m,y:d}=l,g=(0,o.createCoreData)(this,m,d);(0,c.default)("DraggableCore: handleDragStart: %j",g),(0,c.default)("calling",this.props.onStart),!(this.props.onStart(a,g)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,n.addUserSelectStyles)(f),this.dragging=!0,this.lastX=m,this.lastY=d,(0,n.addEvent)(f,b.move,this.handleDrag),(0,n.addEvent)(f,b.stop,this.handleDragStop))}),v(this,"handleDrag",a=>{const s=(0,o.getControlPosition)(a,this.touchIdentifier,this);if(s==null)return;let{x:f,y:C}=s;if(Array.isArray(this.props.grid)){let d=f-this.lastX,g=C-this.lastY;if([d,g]=(0,o.snapToGrid)(this.props.grid,d,g),!d&&!g)return;f=this.lastX+d,C=this.lastY+g}const l=(0,o.createCoreData)(this,f,C);if((0,c.default)("DraggableCore: handleDrag: %j",l),this.props.onDrag(a,l)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const g=document.createEvent("MouseEvents");g.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(g)}return}this.lastX=f,this.lastY=C}),v(this,"handleDragStop",a=>{if(!this.dragging)return;const s=(0,o.getControlPosition)(a,this.touchIdentifier,this);if(s==null)return;let{x:f,y:C}=s;if(Array.isArray(this.props.grid)){let g=f-this.lastX||0,D=C-this.lastY||0;[g,D]=(0,o.snapToGrid)(this.props.grid,g,D),f=this.lastX+g,C=this.lastY+D}const l=(0,o.createCoreData)(this,f,C);if(this.props.onStop(a,l)===!1||this.mounted===!1)return!1;const d=this.findDOMNode();d&&this.props.enableUserSelectHack&&(0,n.removeUserSelectStyles)(d.ownerDocument),(0,c.default)("DraggableCore: handleDragStop: %j",l),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,d&&((0,c.default)("DraggableCore: Removing handlers"),(0,n.removeEvent)(d.ownerDocument,b.move,this.handleDrag),(0,n.removeEvent)(d.ownerDocument,b.stop,this.handleDragStop))}),v(this,"onMouseDown",a=>(b=T.mouse,this.handleDragStart(a))),v(this,"onMouseUp",a=>(b=T.mouse,this.handleDragStop(a))),v(this,"onTouchStart",a=>(b=T.touch,this.handleDragStart(a))),v(this,"onTouchEnd",a=>(b=T.touch,this.handleDragStop(a)))}componentDidMount(){this.mounted=!0;const a=this.findDOMNode();a&&(0,n.addEvent)(a,T.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const a=this.findDOMNode();if(a){const{ownerDocument:s}=a;(0,n.removeEvent)(s,T.mouse.move,this.handleDrag),(0,n.removeEvent)(s,T.touch.move,this.handleDrag),(0,n.removeEvent)(s,T.mouse.stop,this.handleDragStop),(0,n.removeEvent)(s,T.touch.stop,this.handleDragStop),(0,n.removeEvent)(a,T.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,n.removeUserSelectStyles)(s)}}findDOMNode(){var a,s;return(a=this.props)!==null&&a!==void 0&&a.nodeRef?(s=this.props)===null||s===void 0||(s=s.nodeRef)===null||s===void 0?void 0:s.current:r.default.findDOMNode(this)}render(){return t.cloneElement(t.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};return Ge.default=w,v(w,"displayName","DraggableCore"),v(w,"propTypes",{allowAnyClick:e.default.bool,children:e.default.node.isRequired,disabled:e.default.bool,enableUserSelectHack:e.default.bool,offsetParent:function(h,a){if(h[a]&&h[a].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:e.default.arrayOf(e.default.number),handle:e.default.string,cancel:e.default.string,nodeRef:e.default.object,onStart:e.default.func,onDrag:e.default.func,onStop:e.default.func,onMouseDown:e.default.func,scale:e.default.number,className:i.dontSetMe,style:i.dontSetMe,transform:i.dontSetMe}),v(w,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),Ge}var En;function ro(){return En||(En=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DraggableCore",{enumerable:!0,get:function(){return p.default}}),t.default=void 0;var e=_(j),r=v(Oe()),n=v(tr),o=v(eo),i=cn(),c=lr(),y=jt(),p=v(no()),S=v(ur());function v(s){return s&&s.__esModule?s:{default:s}}function R(s){if(typeof WeakMap!="function")return null;var f=new WeakMap,C=new WeakMap;return(R=function(l){return l?C:f})(s)}function _(s,f){if(s&&s.__esModule)return s;if(s===null||typeof s!="object"&&typeof s!="function")return{default:s};var C=R(f);if(C&&C.has(s))return C.get(s);var l={},m=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var d in s)if(d!=="default"&&Object.prototype.hasOwnProperty.call(s,d)){var g=m?Object.getOwnPropertyDescriptor(s,d):null;g&&(g.get||g.set)?Object.defineProperty(l,d,g):l[d]=s[d]}return l.default=s,C&&C.set(s,l),l}function T(){return T=Object.assign?Object.assign.bind():function(s){for(var f=1;f<arguments.length;f++){var C=arguments[f];for(var l in C)Object.prototype.hasOwnProperty.call(C,l)&&(s[l]=C[l])}return s},T.apply(this,arguments)}function b(s,f,C){return f=w(f),f in s?Object.defineProperty(s,f,{value:C,enumerable:!0,configurable:!0,writable:!0}):s[f]=C,s}function w(s){var f=h(s,"string");return typeof f=="symbol"?f:String(f)}function h(s,f){if(typeof s!="object"||s===null)return s;var C=s[Symbol.toPrimitive];if(C!==void 0){var l=C.call(s,f);if(typeof l!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(f==="string"?String:Number)(s)}class a extends e.Component{static getDerivedStateFromProps(f,C){let{position:l}=f,{prevPropsPosition:m}=C;return l&&(!m||l.x!==m.x||l.y!==m.y)?((0,S.default)("Draggable: getDerivedStateFromProps %j",{position:l,prevPropsPosition:m}),{x:l.x,y:l.y,prevPropsPosition:{...l}}):null}constructor(f){super(f),b(this,"onDragStart",(C,l)=>{if((0,S.default)("Draggable: onDragStart: %j",l),this.props.onStart(C,(0,c.createDraggableData)(this,l))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),b(this,"onDrag",(C,l)=>{if(!this.state.dragging)return!1;(0,S.default)("Draggable: onDrag: %j",l);const m=(0,c.createDraggableData)(this,l),d={x:m.x,y:m.y,slackX:0,slackY:0};if(this.props.bounds){const{x:D,y:M}=d;d.x+=this.state.slackX,d.y+=this.state.slackY;const[L,U]=(0,c.getBoundPosition)(this,d.x,d.y);d.x=L,d.y=U,d.slackX=this.state.slackX+(D-d.x),d.slackY=this.state.slackY+(M-d.y),m.x=d.x,m.y=d.y,m.deltaX=d.x-this.state.x,m.deltaY=d.y-this.state.y}if(this.props.onDrag(C,m)===!1)return!1;this.setState(d)}),b(this,"onDragStop",(C,l)=>{if(!this.state.dragging||this.props.onStop(C,(0,c.createDraggableData)(this,l))===!1)return!1;(0,S.default)("Draggable: onDragStop: %j",l);const d={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:D,y:M}=this.props.position;d.x=D,d.y=M}this.setState(d)}),this.state={dragging:!1,dragged:!1,x:f.position?f.position.x:f.defaultPosition.x,y:f.position?f.position.y:f.defaultPosition.y,prevPropsPosition:{...f.position},slackX:0,slackY:0,isElementSVG:!1},f.position&&!(f.onDrag||f.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var f,C;return(f=(C=this.props)===null||C===void 0||(C=C.nodeRef)===null||C===void 0?void 0:C.current)!==null&&f!==void 0?f:n.default.findDOMNode(this)}render(){const{axis:f,bounds:C,children:l,defaultPosition:m,defaultClassName:d,defaultClassNameDragging:g,defaultClassNameDragged:D,position:M,positionOffset:L,scale:U,...E}=this.props;let N={},q=null;const J=!!!M||this.state.dragging,ie=M||m,re={x:(0,c.canDragX)(this)&&J?this.state.x:ie.x,y:(0,c.canDragY)(this)&&J?this.state.y:ie.y};this.state.isElementSVG?q=(0,i.createSVGTransform)(re,L):N=(0,i.createCSSTransform)(re,L);const le=(0,o.default)(l.props.className||"",d,{[g]:this.state.dragging,[D]:this.state.dragged});return e.createElement(p.default,T({},E,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),e.cloneElement(e.Children.only(l),{className:le,style:{...l.props.style,...N},transform:q}))}}t.default=a,b(a,"displayName","Draggable"),b(a,"propTypes",{...p.default.propTypes,axis:r.default.oneOf(["both","x","y","none"]),bounds:r.default.oneOfType([r.default.shape({left:r.default.number,right:r.default.number,top:r.default.number,bottom:r.default.number}),r.default.string,r.default.oneOf([!1])]),defaultClassName:r.default.string,defaultClassNameDragging:r.default.string,defaultClassNameDragged:r.default.string,defaultPosition:r.default.shape({x:r.default.number,y:r.default.number}),positionOffset:r.default.shape({x:r.default.oneOfType([r.default.number,r.default.string]),y:r.default.oneOfType([r.default.number,r.default.string])}),position:r.default.shape({x:r.default.number,y:r.default.number}),className:y.dontSetMe,style:y.dontSetMe,transform:y.dontSetMe}),b(a,"defaultProps",{...p.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(qt)),qt}var On;function dn(){if(On)return Be.exports;On=1;const{default:t,DraggableCore:e}=ro();return Be.exports=t,Be.exports.default=t,Be.exports.DraggableCore=e,Be.exports}var Xe={exports:{}},Ye={},vt={},Pn;function oo(){if(Pn)return vt;Pn=1,vt.__esModule=!0,vt.cloneElement=y;var t=e(j);function e(p){return p&&p.__esModule?p:{default:p}}function r(p,S){var v=Object.keys(p);if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(p);S&&(R=R.filter(function(_){return Object.getOwnPropertyDescriptor(p,_).enumerable})),v.push.apply(v,R)}return v}function n(p){for(var S=1;S<arguments.length;S++){var v=arguments[S]!=null?arguments[S]:{};S%2?r(Object(v),!0).forEach(function(R){o(p,R,v[R])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(v)):r(Object(v)).forEach(function(R){Object.defineProperty(p,R,Object.getOwnPropertyDescriptor(v,R))})}return p}function o(p,S,v){return S=i(S),S in p?Object.defineProperty(p,S,{value:v,enumerable:!0,configurable:!0,writable:!0}):p[S]=v,p}function i(p){var S=c(p,"string");return typeof S=="symbol"?S:String(S)}function c(p,S){if(typeof p!="object"||p===null)return p;var v=p[Symbol.toPrimitive];if(v!==void 0){var R=v.call(p,S);if(typeof R!="object")return R;throw new TypeError("@@toPrimitive must return a primitive value.")}return(S==="string"?String:Number)(p)}function y(p,S){return S.style&&p.props.style&&(S.style=n(n({},p.props.style),S.style)),S.className&&p.props.className&&(S.className=p.props.className+" "+S.className),t.default.cloneElement(p,S)}return vt}var Ke={},Dn;function cr(){if(Dn)return Ke;Dn=1,Ke.__esModule=!0,Ke.resizableProps=void 0;var t=e(Oe());dn();function e(n){return n&&n.__esModule?n:{default:n}}var r={axis:t.default.oneOf(["both","x","y","none"]),className:t.default.string,children:t.default.element.isRequired,draggableOpts:t.default.shape({allowAnyClick:t.default.bool,cancel:t.default.string,children:t.default.node,disabled:t.default.bool,enableUserSelectHack:t.default.bool,offsetParent:t.default.node,grid:t.default.arrayOf(t.default.number),handle:t.default.string,nodeRef:t.default.object,onStart:t.default.func,onDrag:t.default.func,onStop:t.default.func,onMouseDown:t.default.func,scale:t.default.number}),height:function(){for(var o=arguments.length,i=new Array(o),c=0;c<o;c++)i[c]=arguments[c];var y=i[0];if(y.axis==="both"||y.axis==="y"){var p;return(p=t.default.number).isRequired.apply(p,i)}return t.default.number.apply(t.default,i)},handle:t.default.oneOfType([t.default.node,t.default.func]),handleSize:t.default.arrayOf(t.default.number),lockAspectRatio:t.default.bool,maxConstraints:t.default.arrayOf(t.default.number),minConstraints:t.default.arrayOf(t.default.number),onResizeStop:t.default.func,onResizeStart:t.default.func,onResize:t.default.func,resizeHandles:t.default.arrayOf(t.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:t.default.number,width:function(){for(var o=arguments.length,i=new Array(o),c=0;c<o;c++)i[c]=arguments[c];var y=i[0];if(y.axis==="both"||y.axis==="x"){var p;return(p=t.default.number).isRequired.apply(p,i)}return t.default.number.apply(t.default,i)}};return Ke.resizableProps=r,Ke}var Fn;function dr(){if(Fn)return Ye;Fn=1,Ye.__esModule=!0,Ye.default=void 0;var t=c(j),e=dn(),r=oo(),n=cr(),o=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function i(a){if(typeof WeakMap!="function")return null;var s=new WeakMap,f=new WeakMap;return(i=function(l){return l?f:s})(a)}function c(a,s){if(a&&a.__esModule)return a;if(a===null||typeof a!="object"&&typeof a!="function")return{default:a};var f=i(s);if(f&&f.has(a))return f.get(a);var C={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var m in a)if(m!=="default"&&Object.prototype.hasOwnProperty.call(a,m)){var d=l?Object.getOwnPropertyDescriptor(a,m):null;d&&(d.get||d.set)?Object.defineProperty(C,m,d):C[m]=a[m]}return C.default=a,f&&f.set(a,C),C}function y(){return y=Object.assign?Object.assign.bind():function(a){for(var s=1;s<arguments.length;s++){var f=arguments[s];for(var C in f)Object.prototype.hasOwnProperty.call(f,C)&&(a[C]=f[C])}return a},y.apply(this,arguments)}function p(a,s){if(a==null)return{};var f={},C=Object.keys(a),l,m;for(m=0;m<C.length;m++)l=C[m],!(s.indexOf(l)>=0)&&(f[l]=a[l]);return f}function S(a,s){var f=Object.keys(a);if(Object.getOwnPropertySymbols){var C=Object.getOwnPropertySymbols(a);s&&(C=C.filter(function(l){return Object.getOwnPropertyDescriptor(a,l).enumerable})),f.push.apply(f,C)}return f}function v(a){for(var s=1;s<arguments.length;s++){var f=arguments[s]!=null?arguments[s]:{};s%2?S(Object(f),!0).forEach(function(C){R(a,C,f[C])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(f)):S(Object(f)).forEach(function(C){Object.defineProperty(a,C,Object.getOwnPropertyDescriptor(f,C))})}return a}function R(a,s,f){return s=_(s),s in a?Object.defineProperty(a,s,{value:f,enumerable:!0,configurable:!0,writable:!0}):a[s]=f,a}function _(a){var s=T(a,"string");return typeof s=="symbol"?s:String(s)}function T(a,s){if(typeof a!="object"||a===null)return a;var f=a[Symbol.toPrimitive];if(f!==void 0){var C=f.call(a,s);if(typeof C!="object")return C;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(a)}function b(a,s){a.prototype=Object.create(s.prototype),a.prototype.constructor=a,w(a,s)}function w(a,s){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(C,l){return C.__proto__=l,C},w(a,s)}var h=function(a){b(s,a);function s(){for(var C,l=arguments.length,m=new Array(l),d=0;d<l;d++)m[d]=arguments[d];return C=a.call.apply(a,[this].concat(m))||this,C.handleRefs={},C.lastHandleRect=null,C.slack=null,C}var f=s.prototype;return f.componentWillUnmount=function(){this.resetData()},f.resetData=function(){this.lastHandleRect=this.slack=null},f.runConstraints=function(l,m){var d=this.props,g=d.minConstraints,D=d.maxConstraints,M=d.lockAspectRatio;if(!g&&!D&&!M)return[l,m];if(M){var L=this.props.width/this.props.height,U=l-this.props.width,E=m-this.props.height;Math.abs(U)>Math.abs(E*L)?m=l/L:l=m*L}var N=l,q=m,H=this.slack||[0,0],J=H[0],ie=H[1];return l+=J,m+=ie,g&&(l=Math.max(g[0],l),m=Math.max(g[1],m)),D&&(l=Math.min(D[0],l),m=Math.min(D[1],m)),this.slack=[J+(N-l),ie+(q-m)],[l,m]},f.resizeHandler=function(l,m){var d=this;return function(g,D){var M=D.node,L=D.deltaX,U=D.deltaY;l==="onResizeStart"&&d.resetData();var E=(d.props.axis==="both"||d.props.axis==="x")&&m!=="n"&&m!=="s",N=(d.props.axis==="both"||d.props.axis==="y")&&m!=="e"&&m!=="w";if(!(!E&&!N)){var q=m[0],H=m[m.length-1],J=M.getBoundingClientRect();if(d.lastHandleRect!=null){if(H==="w"){var ie=J.left-d.lastHandleRect.left;L+=ie}if(q==="n"){var re=J.top-d.lastHandleRect.top;U+=re}}d.lastHandleRect=J,H==="w"&&(L=-L),q==="n"&&(U=-U);var le=d.props.width+(E?L/d.props.transformScale:0),k=d.props.height+(N?U/d.props.transformScale:0),Q=d.runConstraints(le,k);le=Q[0],k=Q[1];var ne=le!==d.props.width||k!==d.props.height,se=typeof d.props[l]=="function"?d.props[l]:null,de=l==="onResize"&&!ne;se&&!de&&(g.persist==null||g.persist(),se(g,{node:M,size:{width:le,height:k},handle:m})),l==="onResizeStop"&&d.resetData()}}},f.renderResizeHandle=function(l,m){var d=this.props.handle;if(!d)return t.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+l,ref:m});if(typeof d=="function")return d(l,m);var g=typeof d.type=="string",D=v({ref:m},g?{}:{handleAxis:l});return t.cloneElement(d,D)},f.render=function(){var l=this,m=this.props,d=m.children,g=m.className,D=m.draggableOpts;m.width,m.height,m.handle,m.handleSize,m.lockAspectRatio,m.axis,m.minConstraints,m.maxConstraints,m.onResize,m.onResizeStop,m.onResizeStart;var M=m.resizeHandles;m.transformScale;var L=p(m,o);return(0,r.cloneElement)(d,v(v({},L),{},{className:(g?g+" ":"")+"react-resizable",children:[].concat(d.props.children,M.map(function(U){var E,N=(E=l.handleRefs[U])!=null?E:l.handleRefs[U]=t.createRef();return t.createElement(e.DraggableCore,y({},D,{nodeRef:N,key:"resizableHandle-"+U,onStop:l.resizeHandler("onResizeStop",U),onStart:l.resizeHandler("onResizeStart",U),onDrag:l.resizeHandler("onResize",U)}),l.renderResizeHandle(U,N))}))}))},s}(t.Component);return Ye.default=h,h.propTypes=n.resizableProps,h.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1},Ye}var Ze={},Mn;function io(){if(Mn)return Ze;Mn=1,Ze.__esModule=!0,Ze.default=void 0;var t=y(j),e=i(Oe()),r=i(dr()),n=cr(),o=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function i(s){return s&&s.__esModule?s:{default:s}}function c(s){if(typeof WeakMap!="function")return null;var f=new WeakMap,C=new WeakMap;return(c=function(m){return m?C:f})(s)}function y(s,f){if(s&&s.__esModule)return s;if(s===null||typeof s!="object"&&typeof s!="function")return{default:s};var C=c(f);if(C&&C.has(s))return C.get(s);var l={},m=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var d in s)if(d!=="default"&&Object.prototype.hasOwnProperty.call(s,d)){var g=m?Object.getOwnPropertyDescriptor(s,d):null;g&&(g.get||g.set)?Object.defineProperty(l,d,g):l[d]=s[d]}return l.default=s,C&&C.set(s,l),l}function p(){return p=Object.assign?Object.assign.bind():function(s){for(var f=1;f<arguments.length;f++){var C=arguments[f];for(var l in C)Object.prototype.hasOwnProperty.call(C,l)&&(s[l]=C[l])}return s},p.apply(this,arguments)}function S(s,f){var C=Object.keys(s);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(s);f&&(l=l.filter(function(m){return Object.getOwnPropertyDescriptor(s,m).enumerable})),C.push.apply(C,l)}return C}function v(s){for(var f=1;f<arguments.length;f++){var C=arguments[f]!=null?arguments[f]:{};f%2?S(Object(C),!0).forEach(function(l){R(s,l,C[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(C)):S(Object(C)).forEach(function(l){Object.defineProperty(s,l,Object.getOwnPropertyDescriptor(C,l))})}return s}function R(s,f,C){return f=_(f),f in s?Object.defineProperty(s,f,{value:C,enumerable:!0,configurable:!0,writable:!0}):s[f]=C,s}function _(s){var f=T(s,"string");return typeof f=="symbol"?f:String(f)}function T(s,f){if(typeof s!="object"||s===null)return s;var C=s[Symbol.toPrimitive];if(C!==void 0){var l=C.call(s,f);if(typeof l!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(f==="string"?String:Number)(s)}function b(s,f){if(s==null)return{};var C={},l=Object.keys(s),m,d;for(d=0;d<l.length;d++)m=l[d],!(f.indexOf(m)>=0)&&(C[m]=s[m]);return C}function w(s,f){s.prototype=Object.create(f.prototype),s.prototype.constructor=s,h(s,f)}function h(s,f){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,m){return l.__proto__=m,l},h(s,f)}var a=function(s){w(f,s);function f(){for(var l,m=arguments.length,d=new Array(m),g=0;g<m;g++)d[g]=arguments[g];return l=s.call.apply(s,[this].concat(d))||this,l.state={width:l.props.width,height:l.props.height,propsWidth:l.props.width,propsHeight:l.props.height},l.onResize=function(D,M){var L=M.size;l.props.onResize?(D.persist==null||D.persist(),l.setState(L,function(){return l.props.onResize&&l.props.onResize(D,M)})):l.setState(L)},l}f.getDerivedStateFromProps=function(m,d){return d.propsWidth!==m.width||d.propsHeight!==m.height?{width:m.width,height:m.height,propsWidth:m.width,propsHeight:m.height}:null};var C=f.prototype;return C.render=function(){var m=this.props,d=m.handle,g=m.handleSize;m.onResize;var D=m.onResizeStart,M=m.onResizeStop,L=m.draggableOpts,U=m.minConstraints,E=m.maxConstraints,N=m.lockAspectRatio,q=m.axis;m.width,m.height;var H=m.resizeHandles,J=m.style,ie=m.transformScale,re=b(m,o);return t.createElement(r.default,{axis:q,draggableOpts:L,handle:d,handleSize:g,height:this.state.height,lockAspectRatio:N,maxConstraints:E,minConstraints:U,onResizeStart:D,onResize:this.onResize,onResizeStop:M,resizeHandles:H,transformScale:ie,width:this.state.width},t.createElement("div",p({},re,{style:v(v({},J),{},{width:this.state.width+"px",height:this.state.height+"px"})})))},f}(t.Component);return Ze.default=a,a.propTypes=v(v({},n.resizableProps),{},{children:e.default.element}),Ze}var Nn;function ao(){return Nn||(Nn=1,Xe.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},Xe.exports.Resizable=dr().default,Xe.exports.ResizableBox=io().default),Xe.exports}var we={},jn;function fr(){if(jn)return we;jn=1,Object.defineProperty(we,"__esModule",{value:!0}),we.resizeHandleType=we.resizeHandleAxesType=we.default=void 0;var t=r(Oe()),e=r(j);function r(i){return i&&i.__esModule?i:{default:i}}const n=we.resizeHandleAxesType=t.default.arrayOf(t.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),o=we.resizeHandleType=t.default.oneOfType([t.default.node,t.default.func]);return we.default={className:t.default.string,style:t.default.object,width:t.default.number,autoSize:t.default.bool,cols:t.default.number,draggableCancel:t.default.string,draggableHandle:t.default.string,verticalCompact:function(i){i.verticalCompact},compactType:t.default.oneOf(["vertical","horizontal"]),layout:function(i){var c=i.layout;c!==void 0&&Ae().validateLayout(c,"layout")},margin:t.default.arrayOf(t.default.number),containerPadding:t.default.arrayOf(t.default.number),rowHeight:t.default.number,maxRows:t.default.number,isBounded:t.default.bool,isDraggable:t.default.bool,isResizable:t.default.bool,allowOverlap:t.default.bool,preventCollision:t.default.bool,useCSSTransforms:t.default.bool,transformScale:t.default.number,isDroppable:t.default.bool,resizeHandles:n,resizeHandle:o,onLayoutChange:t.default.func,onDragStart:t.default.func,onDrag:t.default.func,onDragStop:t.default.func,onResizeStart:t.default.func,onResize:t.default.func,onResizeStop:t.default.func,onDrop:t.default.func,droppingItem:t.default.shape({i:t.default.string.isRequired,w:t.default.number.isRequired,h:t.default.number.isRequired}),children:function(i,c){const y=i[c],p={};e.default.Children.forEach(y,function(S){if((S==null?void 0:S.key)!=null){if(p[S.key])throw new Error('Duplicate child key "'+S.key+'" found! This will cause problems in ReactGridLayout.');p[S.key]=!0}})},innerRef:t.default.any},we}var Ln;function so(){if(Ln)return He;Ln=1,Object.defineProperty(He,"__esModule",{value:!0}),He.default=void 0;var t=p(j),e=p(Oe()),r=dn(),n=ao(),o=Ae(),i=un(),c=fr(),y=p(ln());function p(T){return T&&T.__esModule?T:{default:T}}function S(T,b,w){return b=v(b),b in T?Object.defineProperty(T,b,{value:w,enumerable:!0,configurable:!0,writable:!0}):T[b]=w,T}function v(T){var b=R(T,"string");return typeof b=="symbol"?b:String(b)}function R(T,b){if(typeof T!="object"||T===null)return T;var w=T[Symbol.toPrimitive];if(w!==void 0){var h=w.call(T,b);if(typeof h!="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}return(b==="string"?String:Number)(T)}let _=class extends t.default.Component{constructor(){super(...arguments),S(this,"state",{resizing:null,dragging:null,className:""}),S(this,"elementRef",t.default.createRef()),S(this,"onDragStart",(b,w)=>{let{node:h}=w;const{onDragStart:a,transformScale:s}=this.props;if(!a)return;const f={top:0,left:0},{offsetParent:C}=h;if(!C)return;const l=C.getBoundingClientRect(),m=h.getBoundingClientRect(),d=m.left/s,g=l.left/s,D=m.top/s,M=l.top/s;f.left=d-g+C.scrollLeft,f.top=D-M+C.scrollTop,this.setState({dragging:f});const{x:L,y:U}=(0,i.calcXY)(this.getPositionParams(),f.top,f.left,this.props.w,this.props.h);return a.call(this,this.props.i,L,U,{e:b,node:h,newPosition:f})}),S(this,"onDrag",(b,w)=>{let{node:h,deltaX:a,deltaY:s}=w;const{onDrag:f}=this.props;if(!f)return;if(!this.state.dragging)throw new Error("onDrag called before onDragStart.");let C=this.state.dragging.top+s,l=this.state.dragging.left+a;const{isBounded:m,i:d,w:g,h:D,containerWidth:M}=this.props,L=this.getPositionParams();if(m){const{offsetParent:H}=h;if(H){const{margin:J,rowHeight:ie,containerPadding:re}=this.props,le=H.clientHeight-(0,i.calcGridItemWHPx)(D,ie,J[1]);C=(0,i.clamp)(C-re[1],0,le);const k=(0,i.calcGridColWidth)(L),Q=M-(0,i.calcGridItemWHPx)(g,k,J[0]);l=(0,i.clamp)(l-re[0],0,Q)}}const U={top:C,left:l};this.setState({dragging:U});const{containerPadding:E}=this.props,{x:N,y:q}=(0,i.calcXY)(L,C-E[1],l-E[0],g,D);return f.call(this,d,N,q,{e:b,node:h,newPosition:U})}),S(this,"onDragStop",(b,w)=>{let{node:h}=w;const{onDragStop:a}=this.props;if(!a)return;if(!this.state.dragging)throw new Error("onDragEnd called before onDragStart.");const{w:s,h:f,i:C,containerPadding:l}=this.props,{left:m,top:d}=this.state.dragging,g={top:d,left:m};this.setState({dragging:null});const{x:D,y:M}=(0,i.calcXY)(this.getPositionParams(),d-l[1],m-l[0],s,f);return a.call(this,C,D,M,{e:b,node:h,newPosition:g})}),S(this,"onResizeStop",(b,w,h)=>this.onResizeHandler(b,w,h,"onResizeStop")),S(this,"onResizeStart",(b,w,h)=>this.onResizeHandler(b,w,h,"onResizeStart")),S(this,"onResize",(b,w,h)=>this.onResizeHandler(b,w,h,"onResize"))}shouldComponentUpdate(b,w){if(this.props.children!==b.children||this.props.droppingPosition!==b.droppingPosition)return!0;const h=(0,i.calcGridItemPosition)(this.getPositionParams(this.props),this.props.x,this.props.y,this.props.w,this.props.h,this.state),a=(0,i.calcGridItemPosition)(this.getPositionParams(b),b.x,b.y,b.w,b.h,w);return!(0,o.fastPositionEqual)(h,a)||this.props.useCSSTransforms!==b.useCSSTransforms}componentDidMount(){this.moveDroppingItem({})}componentDidUpdate(b){this.moveDroppingItem(b)}moveDroppingItem(b){const{droppingPosition:w}=this.props;if(!w)return;const h=this.elementRef.current;if(!h)return;const a=b.droppingPosition||{left:0,top:0},{dragging:s}=this.state,f=s&&w.left!==a.left||w.top!==a.top;if(!s)this.onDragStart(w.e,{node:h,deltaX:w.left,deltaY:w.top});else if(f){const C=w.left-s.left,l=w.top-s.top;this.onDrag(w.e,{node:h,deltaX:C,deltaY:l})}}getPositionParams(){let b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props;return{cols:b.cols,containerPadding:b.containerPadding,containerWidth:b.containerWidth,margin:b.margin,maxRows:b.maxRows,rowHeight:b.rowHeight}}createStyle(b){const{usePercentages:w,containerWidth:h,useCSSTransforms:a}=this.props;let s;return a?s=(0,o.setTransform)(b):(s=(0,o.setTopLeft)(b),w&&(s.left=(0,o.perc)(b.left/h),s.width=(0,o.perc)(b.width/h))),s}mixinDraggable(b,w){return t.default.createElement(r.DraggableCore,{disabled:!w,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,handle:this.props.handle,cancel:".react-resizable-handle"+(this.props.cancel?","+this.props.cancel:""),scale:this.props.transformScale,nodeRef:this.elementRef},b)}curryResizeHandler(b,w){return(h,a)=>w(h,a,b)}mixinResizable(b,w,h){const{cols:a,minW:s,minH:f,maxW:C,maxH:l,transformScale:m,resizeHandles:d,resizeHandle:g}=this.props,D=this.getPositionParams(),M=(0,i.calcGridItemPosition)(D,0,0,a,0).width,L=(0,i.calcGridItemPosition)(D,0,0,s,f),U=(0,i.calcGridItemPosition)(D,0,0,C,l),E=[L.width,L.height],N=[Math.min(U.width,M),Math.min(U.height,1/0)];return t.default.createElement(n.Resizable,{draggableOpts:{disabled:!h},className:h?void 0:"react-resizable-hide",width:w.width,height:w.height,minConstraints:E,maxConstraints:N,onResizeStop:this.curryResizeHandler(w,this.onResizeStop),onResizeStart:this.curryResizeHandler(w,this.onResizeStart),onResize:this.curryResizeHandler(w,this.onResize),transformScale:m,resizeHandles:d,handle:g},b)}onResizeHandler(b,w,h,a){let{node:s,size:f,handle:C}=w;const l=this.props[a];if(!l)return;const{x:m,y:d,i:g,maxH:D,minH:M,containerWidth:L}=this.props,{minW:U,maxW:E}=this.props;let N=f;s&&(N=(0,o.resizeItemInDirection)(C,h,f,L),this.setState({resizing:a==="onResizeStop"?null:N}));let{w:q,h:H}=(0,i.calcWH)(this.getPositionParams(),N.width,N.height,m,d,C);q=(0,i.clamp)(q,Math.max(U,1),E),H=(0,i.clamp)(H,M,D),l.call(this,g,q,H,{e:b,node:s,size:N,handle:C})}render(){const{x:b,y:w,w:h,h:a,isDraggable:s,isResizable:f,droppingPosition:C,useCSSTransforms:l}=this.props,m=(0,i.calcGridItemPosition)(this.getPositionParams(),b,w,h,a,this.state),d=t.default.Children.only(this.props.children);let g=t.default.cloneElement(d,{ref:this.elementRef,className:(0,y.default)("react-grid-item",d.props.className,this.props.className,{static:this.props.static,resizing:!!this.state.resizing,"react-draggable":s,"react-draggable-dragging":!!this.state.dragging,dropping:!!C,cssTransforms:l}),style:{...this.props.style,...d.props.style,...this.createStyle(m)}});return g=this.mixinResizable(g,m,f),g=this.mixinDraggable(g,s),g}};return He.default=_,S(_,"propTypes",{children:e.default.element,cols:e.default.number.isRequired,containerWidth:e.default.number.isRequired,rowHeight:e.default.number.isRequired,margin:e.default.array.isRequired,maxRows:e.default.number.isRequired,containerPadding:e.default.array.isRequired,x:e.default.number.isRequired,y:e.default.number.isRequired,w:e.default.number.isRequired,h:e.default.number.isRequired,minW:function(T,b){const w=T[b];if(typeof w!="number")return new Error("minWidth not Number");if(w>T.w||w>T.maxW)return new Error("minWidth larger than item width/maxWidth")},maxW:function(T,b){const w=T[b];if(typeof w!="number")return new Error("maxWidth not Number");if(w<T.w||w<T.minW)return new Error("maxWidth smaller than item width/minWidth")},minH:function(T,b){const w=T[b];if(typeof w!="number")return new Error("minHeight not Number");if(w>T.h||w>T.maxH)return new Error("minHeight larger than item height/maxHeight")},maxH:function(T,b){const w=T[b];if(typeof w!="number")return new Error("maxHeight not Number");if(w<T.h||w<T.minH)return new Error("maxHeight smaller than item height/minHeight")},i:e.default.string.isRequired,resizeHandles:c.resizeHandleAxesType,resizeHandle:c.resizeHandleType,onDragStop:e.default.func,onDragStart:e.default.func,onDrag:e.default.func,onResizeStop:e.default.func,onResizeStart:e.default.func,onResize:e.default.func,isDraggable:e.default.bool.isRequired,isResizable:e.default.bool.isRequired,isBounded:e.default.bool.isRequired,static:e.default.bool,useCSSTransforms:e.default.bool.isRequired,transformScale:e.default.number,className:e.default.string,handle:e.default.string,cancel:e.default.string,droppingPosition:e.default.shape({e:e.default.object.isRequired,left:e.default.number.isRequired,top:e.default.number.isRequired})}),S(_,"defaultProps",{className:"",cancel:"",handle:"",minH:1,minW:1,maxH:1/0,maxW:1/0,transformScale:1}),He}var Un;function pr(){if(Un)return We;Un=1,Object.defineProperty(We,"__esModule",{value:!0}),We.default=void 0;var t=S(j),e=sn(),r=y(ln()),n=Ae(),o=un(),i=y(so()),c=y(fr());function y(h){return h&&h.__esModule?h:{default:h}}function p(h){if(typeof WeakMap!="function")return null;var a=new WeakMap,s=new WeakMap;return(p=function(f){return f?s:a})(h)}function S(h,a){if(h&&h.__esModule)return h;if(h===null||typeof h!="object"&&typeof h!="function")return{default:h};var s=p(a);if(s&&s.has(h))return s.get(h);var f={__proto__:null},C=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in h)if(l!=="default"&&Object.prototype.hasOwnProperty.call(h,l)){var m=C?Object.getOwnPropertyDescriptor(h,l):null;m&&(m.get||m.set)?Object.defineProperty(f,l,m):f[l]=h[l]}return f.default=h,s&&s.set(h,f),f}function v(h,a,s){return a=R(a),a in h?Object.defineProperty(h,a,{value:s,enumerable:!0,configurable:!0,writable:!0}):h[a]=s,h}function R(h){var a=_(h,"string");return typeof a=="symbol"?a:String(a)}function _(h,a){if(typeof h!="object"||h===null)return h;var s=h[Symbol.toPrimitive];if(s!==void 0){var f=s.call(h,a);if(typeof f!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(h)}const T="react-grid-layout";let b=!1;try{b=/firefox/i.test(navigator.userAgent)}catch{}let w=class extends t.Component{constructor(){super(...arguments),v(this,"state",{activeDrag:null,layout:(0,n.synchronizeLayoutWithChildren)(this.props.layout,this.props.children,this.props.cols,(0,n.compactType)(this.props),this.props.allowOverlap),mounted:!1,oldDragItem:null,oldLayout:null,oldResizeItem:null,resizing:!1,droppingDOMNode:null,children:[]}),v(this,"dragEnterCounter",0),v(this,"onDragStart",(a,s,f,C)=>{let{e:l,node:m}=C;const{layout:d}=this.state,g=(0,n.getLayoutItem)(d,a);if(!g)return;const D={w:g.w,h:g.h,x:g.x,y:g.y,placeholder:!0,i:a};return this.setState({oldDragItem:(0,n.cloneLayoutItem)(g),oldLayout:d,activeDrag:D}),this.props.onDragStart(d,g,g,null,l,m)}),v(this,"onDrag",(a,s,f,C)=>{let{e:l,node:m}=C;const{oldDragItem:d}=this.state;let{layout:g}=this.state;const{cols:D,allowOverlap:M,preventCollision:L}=this.props,U=(0,n.getLayoutItem)(g,a);if(!U)return;const E={w:U.w,h:U.h,x:U.x,y:U.y,placeholder:!0,i:a};g=(0,n.moveElement)(g,U,s,f,!0,L,(0,n.compactType)(this.props),D,M),this.props.onDrag(g,d,U,E,l,m),this.setState({layout:M?g:(0,n.compact)(g,(0,n.compactType)(this.props),D),activeDrag:E})}),v(this,"onDragStop",(a,s,f,C)=>{let{e:l,node:m}=C;if(!this.state.activeDrag)return;const{oldDragItem:d}=this.state;let{layout:g}=this.state;const{cols:D,preventCollision:M,allowOverlap:L}=this.props,U=(0,n.getLayoutItem)(g,a);if(!U)return;g=(0,n.moveElement)(g,U,s,f,!0,M,(0,n.compactType)(this.props),D,L);const N=L?g:(0,n.compact)(g,(0,n.compactType)(this.props),D);this.props.onDragStop(N,d,U,null,l,m);const{oldLayout:q}=this.state;this.setState({activeDrag:null,layout:N,oldDragItem:null,oldLayout:null}),this.onLayoutMaybeChanged(N,q)}),v(this,"onResizeStart",(a,s,f,C)=>{let{e:l,node:m}=C;const{layout:d}=this.state,g=(0,n.getLayoutItem)(d,a);g&&(this.setState({oldResizeItem:(0,n.cloneLayoutItem)(g),oldLayout:this.state.layout,resizing:!0}),this.props.onResizeStart(d,g,g,null,l,m))}),v(this,"onResize",(a,s,f,C)=>{let{e:l,node:m,size:d,handle:g}=C;const{oldResizeItem:D}=this.state,{layout:M}=this.state,{cols:L,preventCollision:U,allowOverlap:E}=this.props;let N=!1,q,H,J;const[ie,re]=(0,n.withLayoutItem)(M,a,k=>{let Q;return H=k.x,J=k.y,["sw","w","nw","n","ne"].indexOf(g)!==-1&&(["sw","nw","w"].indexOf(g)!==-1&&(H=k.x+(k.w-s),s=k.x!==H&&H<0?k.w:s,H=H<0?0:H),["ne","n","nw"].indexOf(g)!==-1&&(J=k.y+(k.h-f),f=k.y!==J&&J<0?k.h:f,J=J<0?0:J),N=!0),U&&!E&&(Q=(0,n.getAllCollisions)(M,{...k,w:s,h:f,x:H,y:J}).filter(se=>se.i!==k.i).length>0,Q&&(J=k.y,f=k.h,H=k.x,s=k.w,N=!1)),k.w=s,k.h=f,k});if(!re)return;q=ie,N&&(q=(0,n.moveElement)(ie,re,H,J,!0,this.props.preventCollision,(0,n.compactType)(this.props),L,E));const le={w:re.w,h:re.h,x:re.x,y:re.y,static:!0,i:a};this.props.onResize(q,D,re,le,l,m),this.setState({layout:E?q:(0,n.compact)(q,(0,n.compactType)(this.props),L),activeDrag:le})}),v(this,"onResizeStop",(a,s,f,C)=>{let{e:l,node:m}=C;const{layout:d,oldResizeItem:g}=this.state,{cols:D,allowOverlap:M}=this.props,L=(0,n.getLayoutItem)(d,a),U=M?d:(0,n.compact)(d,(0,n.compactType)(this.props),D);this.props.onResizeStop(U,g,L,null,l,m);const{oldLayout:E}=this.state;this.setState({activeDrag:null,layout:U,oldResizeItem:null,oldLayout:null,resizing:!1}),this.onLayoutMaybeChanged(U,E)}),v(this,"onDragOver",a=>{var ie;if(a.preventDefault(),a.stopPropagation(),b&&!((ie=a.nativeEvent.target)!=null&&ie.classList.contains(T)))return!1;const{droppingItem:s,onDropDragOver:f,margin:C,cols:l,rowHeight:m,maxRows:d,width:g,containerPadding:D,transformScale:M}=this.props,L=f==null?void 0:f(a);if(L===!1)return this.state.droppingDOMNode&&this.removeDroppingPlaceholder(),!1;const U={...s,...L},{layout:E}=this.state,N=a.currentTarget.getBoundingClientRect(),q=a.clientX-N.left,H=a.clientY-N.top,J={left:q/M,top:H/M,e:a};if(this.state.droppingDOMNode){if(this.state.droppingPosition){const{left:re,top:le}=this.state.droppingPosition;(re!=q||le!=H)&&this.setState({droppingPosition:J})}}else{const re={cols:l,margin:C,maxRows:d,rowHeight:m,containerWidth:g,containerPadding:D||C},le=(0,o.calcXY)(re,H,q,U.w,U.h);this.setState({droppingDOMNode:t.createElement("div",{key:U.i}),droppingPosition:J,layout:[...E,{...U,x:le.x,y:le.y,static:!1,isDraggable:!0}]})}}),v(this,"removeDroppingPlaceholder",()=>{const{droppingItem:a,cols:s}=this.props,{layout:f}=this.state,C=(0,n.compact)(f.filter(l=>l.i!==a.i),(0,n.compactType)(this.props),s,this.props.allowOverlap);this.setState({layout:C,droppingDOMNode:null,activeDrag:null,droppingPosition:void 0})}),v(this,"onDragLeave",a=>{a.preventDefault(),a.stopPropagation(),this.dragEnterCounter--,this.dragEnterCounter===0&&this.removeDroppingPlaceholder()}),v(this,"onDragEnter",a=>{a.preventDefault(),a.stopPropagation(),this.dragEnterCounter++}),v(this,"onDrop",a=>{a.preventDefault(),a.stopPropagation();const{droppingItem:s}=this.props,{layout:f}=this.state,C=f.find(l=>l.i===s.i);this.dragEnterCounter=0,this.removeDroppingPlaceholder(),this.props.onDrop(f,C,a)})}componentDidMount(){this.setState({mounted:!0}),this.onLayoutMaybeChanged(this.state.layout,this.props.layout)}static getDerivedStateFromProps(a,s){let f;return s.activeDrag?null:(!(0,e.deepEqual)(a.layout,s.propsLayout)||a.compactType!==s.compactType?f=a.layout:(0,n.childrenEqual)(a.children,s.children)||(f=s.layout),f?{layout:(0,n.synchronizeLayoutWithChildren)(f,a.children,a.cols,(0,n.compactType)(a),a.allowOverlap),compactType:a.compactType,children:a.children,propsLayout:a.layout}:null)}shouldComponentUpdate(a,s){return this.props.children!==a.children||!(0,n.fastRGLPropsEqual)(this.props,a,e.deepEqual)||this.state.activeDrag!==s.activeDrag||this.state.mounted!==s.mounted||this.state.droppingPosition!==s.droppingPosition}componentDidUpdate(a,s){if(!this.state.activeDrag){const f=this.state.layout,C=s.layout;this.onLayoutMaybeChanged(f,C)}}containerHeight(){if(!this.props.autoSize)return;const a=(0,n.bottom)(this.state.layout),s=this.props.containerPadding?this.props.containerPadding[1]:this.props.margin[1];return a*this.props.rowHeight+(a-1)*this.props.margin[1]+s*2+"px"}onLayoutMaybeChanged(a,s){s||(s=this.state.layout),(0,e.deepEqual)(s,a)||this.props.onLayoutChange(a)}placeholder(){const{activeDrag:a}=this.state;if(!a)return null;const{width:s,cols:f,margin:C,containerPadding:l,rowHeight:m,maxRows:d,useCSSTransforms:g,transformScale:D}=this.props;return t.createElement(i.default,{w:a.w,h:a.h,x:a.x,y:a.y,i:a.i,className:`react-grid-placeholder ${this.state.resizing?"placeholder-resizing":""}`,containerWidth:s,cols:f,margin:C,containerPadding:l||C,maxRows:d,rowHeight:m,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:g,transformScale:D},t.createElement("div",null))}processGridItem(a,s){if(!a||!a.key)return;const f=(0,n.getLayoutItem)(this.state.layout,String(a.key));if(!f)return null;const{width:C,cols:l,margin:m,containerPadding:d,rowHeight:g,maxRows:D,isDraggable:M,isResizable:L,isBounded:U,useCSSTransforms:E,transformScale:N,draggableCancel:q,draggableHandle:H,resizeHandles:J,resizeHandle:ie}=this.props,{mounted:re,droppingPosition:le}=this.state,k=typeof f.isDraggable=="boolean"?f.isDraggable:!f.static&&M,Q=typeof f.isResizable=="boolean"?f.isResizable:!f.static&&L,ne=f.resizeHandles||J,se=k&&U&&f.isBounded!==!1;return t.createElement(i.default,{containerWidth:C,cols:l,margin:m,containerPadding:d||m,maxRows:D,rowHeight:g,cancel:q,handle:H,onDragStop:this.onDragStop,onDragStart:this.onDragStart,onDrag:this.onDrag,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,isDraggable:k,isResizable:Q,isBounded:se,useCSSTransforms:E&&re,usePercentages:!re,transformScale:N,w:f.w,h:f.h,x:f.x,y:f.y,i:f.i,minH:f.minH,minW:f.minW,maxH:f.maxH,maxW:f.maxW,static:f.static,droppingPosition:s?le:void 0,resizeHandles:ne,resizeHandle:ie},a)}render(){const{className:a,style:s,isDroppable:f,innerRef:C}=this.props,l=(0,r.default)(T,a),m={height:this.containerHeight(),...s};return t.createElement("div",{ref:C,className:l,style:m,onDrop:f?this.onDrop:n.noop,onDragLeave:f?this.onDragLeave:n.noop,onDragEnter:f?this.onDragEnter:n.noop,onDragOver:f?this.onDragOver:n.noop},t.Children.map(this.props.children,d=>this.processGridItem(d)),f&&this.state.droppingDOMNode&&this.processGridItem(this.state.droppingDOMNode,!0),this.placeholder())}};return We.default=w,v(w,"displayName","ReactGridLayout"),v(w,"propTypes",c.default),v(w,"defaultProps",{autoSize:!0,cols:12,className:"",style:{},draggableHandle:"",draggableCancel:"",containerPadding:null,rowHeight:150,maxRows:1/0,layout:[],margin:[10,10],isBounded:!1,isDraggable:!0,isResizable:!0,allowOverlap:!1,isDroppable:!1,useCSSTransforms:!0,transformScale:1,verticalCompact:!0,compactType:"vertical",preventCollision:!1,droppingItem:{i:"__dropping-elem__",h:1,w:1},resizeHandles:["se"],onLayoutChange:n.noop,onDragStart:n.noop,onDrag:n.noop,onDragStop:n.noop,onResizeStart:n.noop,onResize:n.noop,onResizeStop:n.noop,onDrop:n.noop,onDropDragOver:n.noop}),We}var Je={},Fe={},Vn;function hr(){if(Vn)return Fe;Vn=1,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.findOrGenerateResponsiveLayout=n,Fe.getBreakpointFromWidth=e,Fe.getColsFromBreakpoint=r,Fe.sortBreakpoints=o;var t=Ae();function e(i,c){const y=o(i);let p=y[0];for(let S=1,v=y.length;S<v;S++){const R=y[S];c>i[R]&&(p=R)}return p}function r(i,c){if(!c[i])throw new Error("ResponsiveReactGridLayout: `cols` entry for breakpoint "+i+" is missing!");return c[i]}function n(i,c,y,p,S,v){if(i[y])return(0,t.cloneLayout)(i[y]);let R=i[p];const _=o(c),T=_.slice(_.indexOf(y));for(let b=0,w=T.length;b<w;b++){const h=T[b];if(i[h]){R=i[h];break}}return R=(0,t.cloneLayout)(R||[]),(0,t.compact)((0,t.correctBounds)(R,{cols:S}),v,S)}function o(i){return Object.keys(i).sort(function(y,p){return i[y]-i[p]})}return Fe}var zn;function lo(){if(zn)return Je;zn=1,Object.defineProperty(Je,"__esModule",{value:!0}),Je.default=void 0;var t=p(j),e=c(Oe()),r=sn(),n=Ae(),o=hr(),i=c(pr());function c(h){return h&&h.__esModule?h:{default:h}}function y(h){if(typeof WeakMap!="function")return null;var a=new WeakMap,s=new WeakMap;return(y=function(f){return f?s:a})(h)}function p(h,a){if(h&&h.__esModule)return h;if(h===null||typeof h!="object"&&typeof h!="function")return{default:h};var s=y(a);if(s&&s.has(h))return s.get(h);var f={__proto__:null},C=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in h)if(l!=="default"&&Object.prototype.hasOwnProperty.call(h,l)){var m=C?Object.getOwnPropertyDescriptor(h,l):null;m&&(m.get||m.set)?Object.defineProperty(f,l,m):f[l]=h[l]}return f.default=h,s&&s.set(h,f),f}function S(){return S=Object.assign?Object.assign.bind():function(h){for(var a=1;a<arguments.length;a++){var s=arguments[a];for(var f in s)Object.prototype.hasOwnProperty.call(s,f)&&(h[f]=s[f])}return h},S.apply(this,arguments)}function v(h,a,s){return a=R(a),a in h?Object.defineProperty(h,a,{value:s,enumerable:!0,configurable:!0,writable:!0}):h[a]=s,h}function R(h){var a=_(h,"string");return typeof a=="symbol"?a:String(a)}function _(h,a){if(typeof h!="object"||h===null)return h;var s=h[Symbol.toPrimitive];if(s!==void 0){var f=s.call(h,a);if(typeof f!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(h)}const T=h=>Object.prototype.toString.call(h);function b(h,a){return h==null?null:Array.isArray(h)?h:h[a]}let w=class extends t.Component{constructor(){super(...arguments),v(this,"state",this.generateInitialState()),v(this,"onLayoutChange",a=>{this.props.onLayoutChange(a,{...this.props.layouts,[this.state.breakpoint]:a})})}generateInitialState(){const{width:a,breakpoints:s,layouts:f,cols:C}=this.props,l=(0,o.getBreakpointFromWidth)(s,a),m=(0,o.getColsFromBreakpoint)(l,C),d=this.props.verticalCompact===!1?null:this.props.compactType;return{layout:(0,o.findOrGenerateResponsiveLayout)(f,s,l,l,m,d),breakpoint:l,cols:m}}static getDerivedStateFromProps(a,s){if(!(0,r.deepEqual)(a.layouts,s.layouts)){const{breakpoint:f,cols:C}=s;return{layout:(0,o.findOrGenerateResponsiveLayout)(a.layouts,a.breakpoints,f,f,C,a.compactType),layouts:a.layouts}}return null}componentDidUpdate(a){(this.props.width!=a.width||this.props.breakpoint!==a.breakpoint||!(0,r.deepEqual)(this.props.breakpoints,a.breakpoints)||!(0,r.deepEqual)(this.props.cols,a.cols))&&this.onWidthChange(a)}onWidthChange(a){const{breakpoints:s,cols:f,layouts:C,compactType:l}=this.props,m=this.props.breakpoint||(0,o.getBreakpointFromWidth)(this.props.breakpoints,this.props.width),d=this.state.breakpoint,g=(0,o.getColsFromBreakpoint)(m,f),D={...C};if(d!==m||a.breakpoints!==s||a.cols!==f){d in D||(D[d]=(0,n.cloneLayout)(this.state.layout));let U=(0,o.findOrGenerateResponsiveLayout)(D,s,m,d,g,l);U=(0,n.synchronizeLayoutWithChildren)(U,this.props.children,g,l,this.props.allowOverlap),D[m]=U,this.props.onLayoutChange(U,D),this.props.onBreakpointChange(m,g),this.setState({breakpoint:m,layout:U,cols:g})}const M=b(this.props.margin,m),L=b(this.props.containerPadding,m);this.props.onWidthChange(this.props.width,M,g,L)}render(){const{breakpoint:a,breakpoints:s,cols:f,layouts:C,margin:l,containerPadding:m,onBreakpointChange:d,onLayoutChange:g,onWidthChange:D,...M}=this.props;return t.createElement(i.default,S({},M,{margin:b(l,this.state.breakpoint),containerPadding:b(m,this.state.breakpoint),onLayoutChange:this.onLayoutChange,layout:this.state.layout,cols:this.state.cols}))}};return Je.default=w,v(w,"propTypes",{breakpoint:e.default.string,breakpoints:e.default.object,allowOverlap:e.default.bool,cols:e.default.object,margin:e.default.oneOfType([e.default.array,e.default.object]),containerPadding:e.default.oneOfType([e.default.array,e.default.object]),layouts(h,a){if(T(h[a])!=="[object Object]")throw new Error("Layout property must be an object. Received: "+T(h[a]));Object.keys(h[a]).forEach(s=>{if(!(s in h.breakpoints))throw new Error("Each key in layouts must align with a key in breakpoints.");(0,n.validateLayout)(h.layouts[s],"layouts."+s)})},width:e.default.number.isRequired,onBreakpointChange:e.default.func,onLayoutChange:e.default.func,onWidthChange:e.default.func}),v(w,"defaultProps",{breakpoints:{lg:1200,md:996,sm:768,xs:480,xxs:0},cols:{lg:12,md:10,sm:6,xs:4,xxs:2},containerPadding:{lg:null,md:null,sm:null,xs:null,xxs:null},layouts:{},margin:[10,10],allowOverlap:!1,onBreakpointChange:n.noop,onLayoutChange:n.noop,onWidthChange:n.noop}),Je}var yt={},mr=function(){if(typeof Map<"u")return Map;function t(e,r){var n=-1;return e.some(function(o,i){return o[0]===r?(n=i,!0):!1}),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(r){var n=t(this.__entries__,r),o=this.__entries__[n];return o&&o[1]},e.prototype.set=function(r,n){var o=t(this.__entries__,r);~o?this.__entries__[o][1]=n:this.__entries__.push([r,n])},e.prototype.delete=function(r){var n=this.__entries__,o=t(n,r);~o&&n.splice(o,1)},e.prototype.has=function(r){return!!~t(this.__entries__,r)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(r,n){n===void 0&&(n=null);for(var o=0,i=this.__entries__;o<i.length;o++){var c=i[o];r.call(n,c[1],c[0])}},e}()}(),Kt=typeof window<"u"&&typeof document<"u"&&window.document===document,It=function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()}(),uo=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(It):function(t){return setTimeout(function(){return t(Date.now())},1e3/60)}}(),co=2;function fo(t,e){var r=!1,n=!1,o=0;function i(){r&&(r=!1,t()),n&&y()}function c(){uo(i)}function y(){var p=Date.now();if(r){if(p-o<co)return;n=!0}else r=!0,n=!1,setTimeout(c,e);o=p}return y}var po=20,ho=["top","right","bottom","left","width","height","size","weight"],mo=typeof MutationObserver<"u",go=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=fo(this.refresh.bind(this),po)}return t.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},t.prototype.removeObserver=function(e){var r=this.observers_,n=r.indexOf(e);~n&&r.splice(n,1),!r.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){var e=this.updateObservers_();e&&this.refresh()},t.prototype.updateObservers_=function(){var e=this.observers_.filter(function(r){return r.gatherActive(),r.hasActive()});return e.forEach(function(r){return r.broadcastActive()}),e.length>0},t.prototype.connect_=function(){!Kt||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),mo?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){!Kt||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(e){var r=e.propertyName,n=r===void 0?"":r,o=ho.some(function(i){return!!~n.indexOf(i)});o&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),gr=function(t,e){for(var r=0,n=Object.keys(e);r<n.length;r++){var o=n[r];Object.defineProperty(t,o,{value:e[o],enumerable:!1,writable:!1,configurable:!0})}return t},ze=function(t){var e=t&&t.ownerDocument&&t.ownerDocument.defaultView;return e||It},vr=Lt(0,0,0,0);function _t(t){return parseFloat(t)||0}function kn(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return e.reduce(function(n,o){var i=t["border-"+o+"-width"];return n+_t(i)},0)}function vo(t){for(var e=["top","right","bottom","left"],r={},n=0,o=e;n<o.length;n++){var i=o[n],c=t["padding-"+i];r[i]=_t(c)}return r}function yo(t){var e=t.getBBox();return Lt(0,0,e.width,e.height)}function Co(t){var e=t.clientWidth,r=t.clientHeight;if(!e&&!r)return vr;var n=ze(t).getComputedStyle(t),o=vo(n),i=o.left+o.right,c=o.top+o.bottom,y=_t(n.width),p=_t(n.height);if(n.boxSizing==="border-box"&&(Math.round(y+i)!==e&&(y-=kn(n,"left","right")+i),Math.round(p+c)!==r&&(p-=kn(n,"top","bottom")+c)),!So(t)){var S=Math.round(y+i)-e,v=Math.round(p+c)-r;Math.abs(S)!==1&&(y-=S),Math.abs(v)!==1&&(p-=v)}return Lt(o.left,o.top,y,p)}var bo=function(){return typeof SVGGraphicsElement<"u"?function(t){return t instanceof ze(t).SVGGraphicsElement}:function(t){return t instanceof ze(t).SVGElement&&typeof t.getBBox=="function"}}();function So(t){return t===ze(t).document.documentElement}function Ro(t){return Kt?bo(t)?yo(t):Co(t):vr}function To(t){var e=t.x,r=t.y,n=t.width,o=t.height,i=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,c=Object.create(i.prototype);return gr(c,{x:e,y:r,width:n,height:o,top:r,right:e+n,bottom:o+r,left:e}),c}function Lt(t,e,r,n){return{x:t,y:e,width:r,height:n}}var wo=function(){function t(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Lt(0,0,0,0),this.target=e}return t.prototype.isActive=function(){var e=Ro(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},t}(),xo=function(){function t(e,r){var n=To(r);gr(this,{target:e,contentRect:n})}return t}(),Io=function(){function t(e,r,n){if(this.activeObservations_=[],this.observations_=new mr,typeof e!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=r,this.callbackCtx_=n}return t.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof ze(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(e)||(r.set(e,new wo(e)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof ze(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(e)&&(r.delete(e),r.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(r){r.isActive()&&e.activeObservations_.push(r)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,r=this.activeObservations_.map(function(n){return new xo(n.target,n.broadcastRect())});this.callback_.call(e,r,e),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),yr=typeof WeakMap<"u"?new WeakMap:new mr,Cr=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=go.getInstance(),n=new Io(e,r,this);yr.set(this,n)}return t}();["observe","unobserve","disconnect"].forEach(function(t){Cr.prototype[t]=function(){var e;return(e=yr.get(this))[t].apply(e,arguments)}});var _o=function(){return typeof It.ResizeObserver<"u"?It.ResizeObserver:Cr}();const Eo=Object.freeze(Object.defineProperty({__proto__:null,default:_o},Symbol.toStringTag,{value:"Module"})),Oo=ar(Eo);var $n;function Po(){if($n)return yt;$n=1,Object.defineProperty(yt,"__esModule",{value:!0}),yt.default=_;var t=c(j),e=o(Oe()),r=o(Oo),n=o(ln());function o(T){return T&&T.__esModule?T:{default:T}}function i(T){if(typeof WeakMap!="function")return null;var b=new WeakMap,w=new WeakMap;return(i=function(h){return h?w:b})(T)}function c(T,b){if(T&&T.__esModule)return T;if(T===null||typeof T!="object"&&typeof T!="function")return{default:T};var w=i(b);if(w&&w.has(T))return w.get(T);var h={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in T)if(s!=="default"&&Object.prototype.hasOwnProperty.call(T,s)){var f=a?Object.getOwnPropertyDescriptor(T,s):null;f&&(f.get||f.set)?Object.defineProperty(h,s,f):h[s]=T[s]}return h.default=T,w&&w.set(T,h),h}function y(){return y=Object.assign?Object.assign.bind():function(T){for(var b=1;b<arguments.length;b++){var w=arguments[b];for(var h in w)Object.prototype.hasOwnProperty.call(w,h)&&(T[h]=w[h])}return T},y.apply(this,arguments)}function p(T,b,w){return b=S(b),b in T?Object.defineProperty(T,b,{value:w,enumerable:!0,configurable:!0,writable:!0}):T[b]=w,T}function S(T){var b=v(T,"string");return typeof b=="symbol"?b:String(b)}function v(T,b){if(typeof T!="object"||T===null)return T;var w=T[Symbol.toPrimitive];if(w!==void 0){var h=w.call(T,b);if(typeof h!="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}return(b==="string"?String:Number)(T)}const R="react-grid-layout";function _(T){var b;return b=class extends t.Component{constructor(){super(...arguments),p(this,"state",{width:1280}),p(this,"elementRef",t.createRef()),p(this,"mounted",!1),p(this,"resizeObserver",void 0)}componentDidMount(){this.mounted=!0,this.resizeObserver=new r.default(a=>{if(this.elementRef.current instanceof HTMLElement){const f=a[0].contentRect.width;this.setState({width:f})}});const h=this.elementRef.current;h instanceof HTMLElement&&this.resizeObserver.observe(h)}componentWillUnmount(){this.mounted=!1;const h=this.elementRef.current;h instanceof HTMLElement&&this.resizeObserver.unobserve(h),this.resizeObserver.disconnect()}render(){const{measureBeforeMount:h,...a}=this.props;return h&&!this.mounted?t.createElement("div",{className:(0,n.default)(this.props.className,R),style:this.props.style,ref:this.elementRef}):t.createElement(T,y({innerRef:this.elementRef},a,this.state))}},p(b,"defaultProps",{measureBeforeMount:!1}),p(b,"propTypes",{measureBeforeMount:e.default.bool}),b}return yt}var An;function Do(){return An||(An=1,function(t){t.exports=pr().default,t.exports.utils=Ae(),t.exports.calculateUtils=un(),t.exports.Responsive=lo().default,t.exports.Responsive.utils=hr(),t.exports.WidthProvider=Po().default}(Vt)),Vt.exports}var Fo=Do();const Mo=Xr(Fo);var No=Object.getOwnPropertyDescriptor,jo=(t,e,r,n)=>{for(var o=n>1?void 0:n?No(e,r):e,i=t.length-1,c;i>=0;i--)(c=t[i])&&(o=c(o)||o);return o},Lo=(t,e)=>(r,n)=>e(r,n,t);let ke=class extends x.Disposable{constructor(e){super();Ie(this,"_initLocal",()=>{});Ie(this,"_findReplaceIndex",e=>{const r=/\{([^}]+)?\}/g,n=[];let o=r.exec(e);for(;o;)n.push({startIndex:o.index,key:Number(o[1]),endIndex:o.index+o[0].length-1}),o=r.exec(e);return n});this._localeService=e,this._initLocal()}tWithReactNode(e,...r){const n=this._localeService.getLocales(),o=e.split("."),i=n&&this._localeService.resolveKeyPath(n,o);if(typeof i=="string"){const c=[];return this._findReplaceIndex(i).forEach((y,p,S)=>{const v=S[p-1]||{endIndex:-1};if(v.endIndex+1<y.startIndex){const R=i.slice(v.endIndex+1,y.startIndex);R&&c.push(R)}if(r[y.key]&&c.push(r[y.key]),p===S.length-1){const R=i.slice(y.endIndex+1);R&&c.push(R)}}),c}return[]}};ke=jo([Lo(0,x.Inject(x.LocaleService))],ke);const Uo="univer-cf-preview",Ct={cfPreview:Uo},qe=t=>{var o,i;const e=t.rule;if(!e)return null;const r=j.useMemo(()=>{if(e.type===u.CFRuleType.colorScale){const c=e.config.map((S,v)=>({color:new x.ColorKit(S.color),value:v})),y=c.length-1;return new Array(5).fill("").map((S,v,R)=>v*y/(R.length-1)).map(S=>u.getColorScaleFromValue(c,S))}return null},[e]),n=j.useMemo(()=>{if(e.type===u.CFRuleType.iconSet)return e.config.map(c=>{const y=u.iconMap[c.iconType];return y&&y[Number(c.iconId)]})},[e]);switch(e.type){case u.CFRuleType.dataBar:{const{isGradient:c}=e.config,y={width:"50%",height:"100%"},p=c?`linear-gradient(to right, ${e.config.positiveColor||u.defaultDataBarPositiveColor}, rgb(255 255 255))`:e.config.positiveColor,S=c?`linear-gradient(to right, rgb(255 255 255),${e.config.nativeColor||u.defaultDataBarNativeColor})`:e.config.nativeColor;return I.jsxs("div",{className:Ct.cfPreview,children:[I.jsx("div",{style:{...y,background:S,border:`1px solid ${e.config.nativeColor||u.defaultDataBarNativeColor}`}}),I.jsx("div",{style:{...y,background:p,border:`1px solid ${e.config.positiveColor||u.defaultDataBarPositiveColor}`}})]})}case u.CFRuleType.colorScale:return r&&I.jsx("div",{className:Ct.cfPreview,children:r.map((c,y)=>I.jsx("div",{style:{width:`${100/r.length}%`,height:"100%",background:c}},y))});case u.CFRuleType.iconSet:return n&&I.jsx("div",{className:Ct.cfPreview,children:n.map((c,y)=>c?I.jsx("img",{style:{height:"100%"},src:c},y):I.jsx(ft,{},y))});case u.CFRuleType.highlightCell:{const{ul:c,st:y,it:p,bl:S,bg:v,cl:R}=e.style,_=(c==null?void 0:c.s)===x.BooleanNumber.TRUE,T=(y==null?void 0:y.s)===x.BooleanNumber.TRUE,b=p===x.BooleanNumber.TRUE,w=S===x.BooleanNumber.TRUE,h=(o=v==null?void 0:v.rgb)!=null?o:u.DEFAULT_BG_COLOR,a=(i=R==null?void 0:R.rgb)!=null?i:u.DEFAULT_FONT_COLOR,s={fontWeight:w?"bold":void 0,fontStyle:b?"italic":void 0,textDecoration:`${_?"underline":""} ${T?"line-through":""}`.replace(/^ /,"")||void 0,backgroundColor:h,color:a};return I.jsx("div",{style:s,className:Ct.cfPreview,children:"123"})}}return null},Vo="univer-cf-rule-list",zo="univer-rule-selector",ko="univer-select",$o="univer-btn-list",Ao="univer-gap",qo="univer-icon",Wo="univer-disabled",Ho="univer-rule-item",Bo="univer-rule-describe",Go="univer-rule-type",Xo="univer-rule-range",Yo="univer-active",Ko="univer-draggableHandle",Zo="univer-delete-item",Jo="univer-grid-layout-wrap",me={cfRuleList:Vo,ruleSelector:zo,select:ko,btnList:$o,gap:Ao,icon:qo,disabled:Wo,ruleItem:Ho,ruleDescribe:Bo,ruleType:Go,ruleRange:Xo,active:Yo,draggableHandle:Ko,deleteItem:Zo,gridLayoutWrap:Jo},Qo=(t,e)=>{const r=t.rule;switch(r.type){case u.CFRuleType.colorScale:return e.t("sheet.cf.ruleType.colorScale");case u.CFRuleType.dataBar:return e.t("sheet.cf.ruleType.dataBar");case u.CFRuleType.iconSet:return e.t("sheet.cf.ruleType.iconSet");case u.CFRuleType.highlightCell:switch(r.subType){case u.CFSubRuleType.average:{const n=r.operator;return e.t(`sheet.cf.preview.describe.${n}`,e.t("sheet.cf.subRuleType.average"))}case u.CFSubRuleType.duplicateValues:return e.t("sheet.cf.subRuleType.duplicateValues");case u.CFSubRuleType.uniqueValues:return e.t("sheet.cf.subRuleType.uniqueValues");case u.CFSubRuleType.number:{const n=r.operator;return e.t(`sheet.cf.preview.describe.${n}`,...Array.isArray(r.value)?r.value.map(o=>String(o)):[String(r.value||"")])}case u.CFSubRuleType.text:{const n=r.operator;return e.t(`sheet.cf.preview.describe.${n}`,r.value||"")}case u.CFSubRuleType.timePeriod:{const n=r.operator;return e.t(`sheet.cf.preview.describe.${n}`)}case u.CFSubRuleType.rank:return r.isPercent?r.isBottom?e.t("sheet.cf.preview.describe.bottomNPercent",String(r.value)):e.t("sheet.cf.preview.describe.topNPercent",String(r.value)):r.isBottom?e.t("sheet.cf.preview.describe.bottomN",String(r.value)):e.t("sheet.cf.preview.describe.topN",String(r.value));case u.CFSubRuleType.formula:return e.t("sheet.cf.ruleType.formula")}}};let qn=0;const ei=t=>{const{onClick:e}=t,r=ee.useDependency(u.ConditionalFormattingRuleModel),n=ee.useDependency(x.IUniverInstanceService),o=ee.useDependency(X.SheetsSelectionsService),i=ee.useDependency(x.ICommandService),c=ee.useDependency(x.LocaleService),y=ee.useDependency(x.Injector),p=ee.useDependency(ee.ISidebarService),S=ee.useDependency(ke),v=ee.useObservable(()=>n.getCurrentTypeOfUnit$(x.UniverInstanceType.UNIVER_SHEET),void 0,void 0,[]),R=v.getUnitId(),_=v.getActiveSheet();if(!_)throw new Error("No active sheet found");const T=_.getSheetId(),[b,w]=j.useState([]),[h,a]=j.useState("2"),[s,f]=j.useState(0),[C,l]=j.useState(-1),[m,d]=j.useState(qn),g=j.useRef(null),D=[{label:c.t("sheet.cf.panel.workSheet"),value:"2"},{label:c.t("sheet.cf.panel.selectedRange"),value:"1"}],M=()=>{const k=r.getSubunitRules(R,T);if(!k||!k.length)return[];if(h==="1"){const Q=o.getCurrentLastSelection();if(!Q)return[];const ne=Q.range;return k.filter(de=>de.ranges.some(he=>x.Rectangle.intersects(he,ne)))}else if(h==="2")return[...k];return[]},[L,U]=j.useState(M);fe.useHighlightRange(b),j.useEffect(()=>{const k=i.onCommandExecuted(Q=>{Q.id===X.SetWorksheetActiveOperation.id&&f(Math.random())});return()=>k.dispose()}),j.useEffect(()=>{U(M)},[h,s,R,T]),j.useEffect(()=>{if(h==="2")return;const k=new Se.Observable(Q=>{const ne=[X.SetSelectionsOperation.id,u.AddConditionalRuleMutation.id,u.SetConditionalRuleMutation.id,u.DeleteConditionalRuleMutation.id,u.MoveConditionalRuleMutation.id],se=i.onCommandExecuted(de=>{const{id:he,params:be}=de,$=n.getCurrentUnitOfType(x.UniverInstanceType.UNIVER_SHEET).getUnitId();ne.includes(he)&&be.unitId===$&&Q.next(null)});return()=>se.dispose()}).pipe(Se.debounceTime(16)).subscribe(()=>{U(M)});return()=>{k.unsubscribe()}},[n,h,R,T]),j.useEffect(()=>{const k=r.$ruleChange.subscribe(()=>{f(Math.random())});return()=>k.unsubscribe()},[r]),j.useEffect(()=>{const k=()=>{var de,he;const se=Math.max(0,((he=(de=g.current)==null?void 0:de.getBoundingClientRect().width)!=null?he:0)-8);return qn=se,se},ne=new Se.Observable(se=>{const de=p.getContainer();if(de){let he=setTimeout(()=>{se.next()},150);const be=()=>{he&&clearTimeout(he),he=null},$=K=>{K.propertyName==="width"&&(be(),se.next())};return de.addEventListener("transitionend",$),()=>{be(),de.removeEventListener("transitionend",$)}}}).pipe(Se.debounceTime(16)).subscribe(()=>{d(k())});return()=>{ne.unsubscribe()}},[]);const E=k=>{var se;const Q=n.getCurrentUnitOfType(x.UniverInstanceType.UNIVER_SHEET).getUnitId(),ne=(se=n.getCurrentUnitOfType(x.UniverInstanceType.UNIVER_SHEET).getActiveSheet())==null?void 0:se.getSheetId();if(!Q||!ne)throw new Error("No active sheet found");i.executeCommand(u.DeleteCfCommand.id,{unitId:Q,subUnitId:ne,cfId:k.cfId})},N=(k,Q)=>{l(Q.y)},q=(k,Q,ne)=>{var K;l(-1);const se=n.getCurrentUnitOfType(x.UniverInstanceType.UNIVER_SHEET).getUnitId(),de=(K=n.getCurrentUnitOfType(x.UniverInstanceType.UNIVER_SHEET).getActiveSheet())==null?void 0:K.getSheetId();if(!se||!de)throw new Error("No active sheet found");const he=ae=>{const O=L.length;return Math.min(O-1,Math.max(0,ae))},be=L[he(Q.y)].cfId,$=L[he(ne.y)].cfId;be!==$&&i.executeCommand(u.MoveCfCommand.id,{unitId:se,subUnitId:de,start:{id:be,type:"self"},end:{id:$,type:ne.y>Q.y?"after":"before"}})},H=()=>{t.onCreate()},J=()=>{h==="2"?i.executeCommand(u.ClearWorksheetCfCommand.id):h==="1"&&L.map(Q=>({unitId:R,subUnitId:T,cfId:Q.cfId})).forEach(Q=>{i.executeCommand(u.DeleteCfCommand.id,Q)})},ie=j.useMemo(()=>{const k=n.getCurrentUnitOfType(x.UniverInstanceType.UNIVER_SHEET),Q=k.getActiveSheet();return L.filter(ne=>{const se=ne.ranges;return X.checkRangesEditablePermission(y,k.getUnitId(),Q.getSheetId(),se)})},[L]),re=ie.map((k,Q)=>({i:k.cfId,x:0,w:12,y:Q,h:1,isResizable:!1})),le=j.useMemo(()=>{const k=n.getCurrentUnitOfType(x.UniverInstanceType.UNIVER_SHEET),Q=k.getActiveSheet();return L.every(ne=>{const se=ne.ranges;return X.checkRangesEditablePermission(y,k.getUnitId(),Q.getSheetId(),se)})},[L]);return I.jsxs("div",{className:me.cfRuleList,children:[I.jsxs("div",{className:me.ruleSelector,children:[I.jsx("div",{children:S.tWithReactNode("sheet.cf.panel.managerRuleSelect",I.jsx(Z.Select,{className:me.select,options:D,value:h,onChange:k=>{a(k)}})).map((k,Q)=>I.jsx("span",{children:k},Q))}),I.jsxs("div",{className:me.btnList,children:[I.jsx(Z.Tooltip,{title:c.t("sheet.cf.panel.createRule"),placement:"bottom",children:I.jsx("div",{className:me.icon,onClick:H,children:I.jsx(or,{})})}),L.length&&le?I.jsx(Z.Tooltip,{title:c.t("sheet.cf.panel.clear"),placement:"bottom",children:I.jsx("div",{className:Z.clsx(me.gap,me.icon),onClick:J,children:I.jsx(xt,{})})}):I.jsx("div",{className:Z.clsx(me.gap,me.disabled),children:I.jsx(xt,{})})]})]}),I.jsx("div",{ref:g,className:me.gridLayoutWrap,children:m?I.jsx(Mo,{draggableHandle:".draggableHandle",layout:re,cols:12,rowHeight:60,width:m,margin:[0,10],onDragStop:q,onDragStart:N,children:ie==null?void 0:ie.map((k,Q)=>I.jsx("div",{children:I.jsxs("div",{className:Z.clsx(me.ruleItem,{[me.active]:C===Q}),onMouseMove:()=>{k.ranges!==b&&w(k.ranges)},onMouseLeave:()=>w([]),onClick:()=>{e(k)},children:[I.jsx("div",{className:Z.clsx(me.draggableHandle,"draggableHandle"),onClick:ne=>ne.stopPropagation(),children:I.jsx(ir,{})}),I.jsxs("div",{className:me.ruleDescribe,children:[I.jsx("div",{className:me.ruleType,children:Qo(k,c)}),I.jsx("div",{className:me.ruleRange,children:k.ranges.map(ne=>Yt.serializeRange(ne)).join(",")})]}),I.jsx("div",{className:me.preview,children:I.jsx(qe,{rule:k.rule})}),I.jsx("div",{className:Z.clsx(me.deleteItem,{[me.active]:C===Q}),onClick:ne=>{ne.stopPropagation(),E(k),w([])},children:I.jsx(xt,{})})]})},`${k.cfId}`))}):null})]})},ti="univer-cf-color-picker-icon",ni="univer-icon-dropdown",Wn={cfColorPickerIcon:ti,iconDropdown:ni},Ne=t=>{const{color:e,onChange:r,disable:n=!1,iconId:o="PaintBucket",className:i,isNeedDropdownIcon:c=!0}=t,y=ee.useDependency(ee.ComponentManager),p=j.useMemo(()=>new x.ColorKit(e),[e]),S=y.get(o);return S&&(n?I.jsx(S,{className:i,extend:{colorChannel1:p.isValid?e:"rgb(var(--primary-color))"}}):I.jsx(Z.Dropdown,{overlay:I.jsx("div",{className:"univer-rounded-lg univer-p-4",children:I.jsx(Z.ColorPicker,{value:e,onChange:r})}),children:I.jsxs("span",{className:`
|
|
4
4
|
${Wn.cfColorPickerIcon}
|
package/lib/es/index.js
CHANGED
|
@@ -336,7 +336,7 @@ function Es(t) {
|
|
|
336
336
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
337
337
|
}
|
|
338
338
|
function Fo(t) {
|
|
339
|
-
if (t
|
|
339
|
+
if (Object.prototype.hasOwnProperty.call(t, "__esModule")) return t;
|
|
340
340
|
var e = t.default;
|
|
341
341
|
if (typeof e == "function") {
|
|
342
342
|
var r = function n() {
|
package/lib/umd/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(Z,_){typeof exports=="object"&&typeof module<"u"?_(exports,require("@univerjs/core"),require("@univerjs/sheets-conditional-formatting"),require("@univerjs/sheets"),require("@univerjs/ui"),require("react/jsx-runtime"),require("react"),require("@univerjs/design"),require("@univerjs/engine-formula"),require("@univerjs/sheets-ui"),require("react-dom"),require("rxjs"),require("@univerjs/sheets-formula-ui"),require("@univerjs/engine-render"),require("rxjs/operators")):typeof define=="function"&&define.amd?define(["exports","@univerjs/core","@univerjs/sheets-conditional-formatting","@univerjs/sheets","@univerjs/ui","react/jsx-runtime","react","@univerjs/design","@univerjs/engine-formula","@univerjs/sheets-ui","react-dom","rxjs","@univerjs/sheets-formula-ui","@univerjs/engine-render","rxjs/operators"],_):(Z=typeof globalThis<"u"?globalThis:Z||self,_(Z.UniverSheetsConditionalFormattingUi={},Z.UniverCore,Z.UniverSheetsConditionalFormatting,Z.UniverSheets,Z.UniverUi,Z.React,Z.React,Z.UniverDesign,Z.UniverEngineFormula,Z.UniverSheetsUi,Z.ReactDOM,Z.rxjs,Z.UniverSheetsFormulaUi,Z.UniverEngineRender,Z.rxjs.operators))})(this,function(Z,_,c,X,te,R,V,$,kt,pe,pr,Ce,Ge,hr,qe){"use strict";var mo=Object.defineProperty;var yo=(Z,_,c)=>_ in Z?mo(Z,_,{enumerable:!0,configurable:!0,writable:!0,value:c}):Z[_]=c;var xe=(Z,_,c)=>yo(Z,typeof _!="symbol"?_+"":_,c);const At={type:_.CommandType.COMMAND,id:"sheet.command.add-average-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:n,style:r,stopIfTrue:a,operator:o}=e,u=t.get(c.ConditionalFormattingRuleModel),y=t.get(_.ICommandService),p=t.get(_.IUniverInstanceService),C=X.getSheetCommandTarget(p);if(!C)return!1;const{unitId:m,subUnitId:T}=C,E=u.createCfId(m,T),w={ranges:n,cfId:E,stopIfTrue:!!a,rule:{type:c.CFRuleType.highlightCell,subType:c.CFSubRuleType.average,operator:o,style:r}};return y.executeCommand(c.AddConditionalRuleMutation.id,{unitId:m,subUnitId:T,rule:w})}},Wt={type:_.CommandType.COMMAND,id:"sheet.command.add-color-scale-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:n,config:r,stopIfTrue:a}=e,o=t.get(c.ConditionalFormattingRuleModel),u=t.get(_.ICommandService),y=t.get(_.IUniverInstanceService),p=X.getSheetCommandTarget(y);if(!p)return!1;const{unitId:C,subUnitId:m}=p,T=o.createCfId(C,m),E={ranges:n,cfId:T,stopIfTrue:!!a,rule:{type:c.CFRuleType.colorScale,config:r}};return u.executeCommand(c.AddConditionalRuleMutation.id,{unitId:C,subUnitId:m,rule:E})}},jt={type:_.CommandType.COMMAND,id:"sheet.command.add-data-bar-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:n,min:r,max:a,nativeColor:o,positiveColor:u,isGradient:y,stopIfTrue:p,isShowValue:C}=e,m=t.get(c.ConditionalFormattingRuleModel),T=t.get(_.IUniverInstanceService),E=X.getSheetCommandTarget(T);if(!E)return!1;const{unitId:w,subUnitId:S}=E,I=t.get(_.ICommandService),h=m.createCfId(w,S),i={ranges:n,cfId:h,stopIfTrue:!!p,rule:{type:c.CFRuleType.dataBar,isShowValue:C,config:{min:r,max:a,nativeColor:o,positiveColor:u,isGradient:y}}};return I.executeCommand(c.AddConditionalRuleMutation.id,{unitId:w,subUnitId:S,rule:i})}},Ht={type:_.CommandType.COMMAND,id:"sheet.command.add-duplicate-values-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:n,style:r,stopIfTrue:a}=e,o=t.get(c.ConditionalFormattingRuleModel),u=t.get(_.ICommandService),y=t.get(_.IUniverInstanceService),p=X.getSheetCommandTarget(y);if(!p)return!1;const{unitId:C,subUnitId:m}=p,T=o.createCfId(C,m),E={ranges:n,cfId:T,stopIfTrue:!!a,rule:{type:c.CFRuleType.highlightCell,subType:c.CFSubRuleType.duplicateValues,style:r}};return u.executeCommand(c.AddConditionalRuleMutation.id,{unitId:C,subUnitId:m,rule:E})}},Bt={type:_.CommandType.COMMAND,id:"sheet.command.add-number-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:n,style:r,stopIfTrue:a,operator:o,value:u}=e,y=t.get(c.ConditionalFormattingRuleModel),p=t.get(_.ICommandService),C=t.get(_.IUniverInstanceService),m=X.getSheetCommandTarget(C);if(!m)return!1;const{unitId:T,subUnitId:E}=m,w=y.createCfId(T,E);let S;if([c.CFNumberOperator.between,c.CFNumberOperator.notBetween].includes(o)){const I=u;if(I.length!==2||!Array.isArray(I))return!1;S={ranges:n,cfId:w,stopIfTrue:!!a,rule:{type:c.CFRuleType.highlightCell,subType:c.CFSubRuleType.number,operator:o,style:r,value:I}}}else{const I=u;if(typeof I!="number")return!1;S={ranges:n,cfId:w,stopIfTrue:!!a,rule:{type:c.CFRuleType.highlightCell,subType:c.CFSubRuleType.number,operator:o,style:r,value:I}}}return p.executeCommand(c.AddConditionalRuleMutation.id,{unitId:T,subUnitId:E,rule:S})}},Ft={type:_.CommandType.COMMAND,id:"sheet.command.add-rank-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:n,style:r,stopIfTrue:a,isPercent:o,isBottom:u,value:y}=e,p=t.get(c.ConditionalFormattingRuleModel),C=t.get(_.IUniverInstanceService),m=t.get(_.ICommandService),T=X.getSheetCommandTarget(C);if(!T)return!1;const{unitId:E,subUnitId:w}=T,S=p.createCfId(E,w),I={ranges:n,cfId:S,stopIfTrue:!!a,rule:{type:c.CFRuleType.highlightCell,subType:c.CFSubRuleType.rank,isPercent:o,isBottom:u,style:r,value:y}};return m.executeCommand(c.AddConditionalRuleMutation.id,{unitId:E,subUnitId:w,rule:I})}},Gt={type:_.CommandType.COMMAND,id:"sheet.command.add-text-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:n,style:r,stopIfTrue:a,operator:o,value:u}=e,y=t.get(c.ConditionalFormattingRuleModel),p=t.get(_.IUniverInstanceService),C=X.getSheetCommandTarget(p);if(!C)return!1;const{unitId:m,subUnitId:T}=C,E=t.get(_.ICommandService),w=y.createCfId(m,T),S={ranges:n,cfId:w,stopIfTrue:!!a,rule:{type:c.CFRuleType.highlightCell,subType:c.CFSubRuleType.text,operator:o,style:r,value:u}};return E.executeCommand(c.AddConditionalRuleMutation.id,{unitId:m,subUnitId:T,rule:S})}},qt={type:_.CommandType.COMMAND,id:"sheet.command.add-time-period-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:n,style:r,stopIfTrue:a,operator:o}=e,u=t.get(c.ConditionalFormattingRuleModel),y=t.get(_.IUniverInstanceService),p=t.get(_.ICommandService),C=X.getSheetCommandTarget(y);if(!C)return!1;const{unitId:m,subUnitId:T}=C,E=u.createCfId(m,T),w={ranges:n,cfId:E,stopIfTrue:!!a,rule:{type:c.CFRuleType.highlightCell,subType:c.CFSubRuleType.timePeriod,operator:o,style:r}};return p.executeCommand(c.AddConditionalRuleMutation.id,{unitId:m,subUnitId:T,rule:w})}},Xt={type:_.CommandType.COMMAND,id:"sheet.command.add-uniqueValues-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:n,style:r,stopIfTrue:a}=e,o=t.get(c.ConditionalFormattingRuleModel),u=t.get(_.IUniverInstanceService),y=t.get(_.ICommandService),p=X.getSheetCommandTarget(u);if(!p)return!1;const{unitId:C,subUnitId:m}=p,T=o.createCfId(C,m),E={ranges:n,cfId:T,stopIfTrue:!!a,rule:{type:c.CFRuleType.highlightCell,subType:c.CFSubRuleType.uniqueValues,style:r}};return y.executeCommand(c.AddConditionalRuleMutation.id,{unitId:C,subUnitId:m,rule:E})}},A={conditionalFormattingWrap:"univer-conditional-formatting-wrap",title:"univer-title",label:"univer-label",labelContainer:"univer-label-container",mTBase:"univer-m-t-base",mTSm:"univer-m-t-sm",mTXl:"univer-m-t-xl",mLSm:"univer-m-l-sm",mLXl:"univer-m-l-xl",mLXxs:"univer-m-l-xxs",mL0:"univer-m-l-0",mR0:"univer-m-r-0"};var be=function(){return be=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a])}return t},be.apply(this,arguments)},_n=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(t);a<r.length;a++)e.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(t,r[a])&&(n[r[a]]=t[r[a]]);return n},Ue=V.forwardRef(function(t,e){var n=t.icon,r=t.id,a=t.className,o=t.extend,u=_n(t,["icon","id","className","extend"]),y="univerjs-icon univerjs-icon-".concat(r," ").concat(a||"").trim(),p=V.useRef("_".concat(On()));return gr(n,"".concat(r),{defIds:n.defIds,idSuffix:p.current},be({ref:e,className:y},u),o)});function gr(t,e,n,r,a){return V.createElement(t.tag,be(be({key:e},Rn(t,n,a)),r),(En(t,n).children||[]).map(function(o,u){return gr(o,"".concat(e,"-").concat(t.tag,"-").concat(u),n,void 0,a)}))}function Rn(t,e,n){var r=be({},t.attrs);n!=null&&n.colorChannel1&&r.fill==="colorChannel1"&&(r.fill=n.colorChannel1),t.tag==="mask"&&r.id&&(r.id=r.id+e.idSuffix),Object.entries(r).forEach(function(o){var u=o[0],y=o[1];u==="mask"&&typeof y=="string"&&(r[u]=y.replace(/url\(#(.*)\)/,"url(#$1".concat(e.idSuffix,")")))});var a=e.defIds;return!a||a.length===0||(t.tag==="use"&&r["xlink:href"]&&(r["xlink:href"]=r["xlink:href"]+e.idSuffix),Object.entries(r).forEach(function(o){var u=o[0],y=o[1];typeof y=="string"&&(r[u]=y.replace(/url\(#(.*)\)/,"url(#$1".concat(e.idSuffix,")")))})),r}function En(t,e){var n,r=e.defIds;return!r||r.length===0?t:t.tag==="defs"&&(!((n=t.children)===null||n===void 0)&&n.length)?be(be({},t),{children:t.children.map(function(a){return typeof a.attrs.id=="string"&&r&&r.indexOf(a.attrs.id)>-1?be(be({},a),{attrs:be(be({},a.attrs),{id:a.attrs.id+e.idSuffix})}):a})}):t}function On(){return Math.random().toString(36).substring(2,8)}Ue.displayName="UniverIcon";var Pn={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M5.3313 1.4667C5.3313 1.13533 5.59993.866699 5.9313.866699H10.069C10.4004.866699 10.669 1.13533 10.669 1.4667 10.669 1.79807 10.4004 2.0667 10.069 2.0667H5.9313C5.59993 2.0667 5.3313 1.79807 5.3313 1.4667zM1.09985 3.64443C1.09985 3.31306 1.36848 3.04443 1.69985 3.04443H14.2999C14.6312 3.04443 14.8999 3.31306 14.8999 3.64443 14.8999 3.9758 14.6312 4.24443 14.2999 4.24443H1.69985C1.36848 4.24443 1.09985 3.9758 1.09985 3.64443zM6.12398 8.30171C6.35829 8.0674 6.73819 8.0674 6.97251 8.30171L8.00007 9.32928 9.02764 8.30171C9.26195 8.0674 9.64185 8.0674 9.87617 8.30171 10.1105 8.53603 10.1105 8.91593 9.87617 9.15024L8.8486 10.1778 9.87617 11.2054C10.1105 11.4397 10.1105 11.8196 9.87617 12.0539 9.64185 12.2882 9.26195 12.2882 9.02764 12.0539L8.00007 11.0263 6.97251 12.0539C6.73819 12.2882 6.35829 12.2882 6.12398 12.0539 5.88966 11.8196 5.88966 11.4397 6.12398 11.2054L7.15154 10.1778 6.12398 9.15024C5.88966 8.91593 5.88966 8.53603 6.12398 8.30171z"}},{tag:"path",attrs:{fill:"currentColor",d:"M4.75332 5.22217C3.86966 5.22217 3.15332 5.93851 3.15332 6.82217V12.5331C3.15332 13.9691 4.31738 15.1332 5.75332 15.1332H10.2465C11.6825 15.1332 12.8465 13.9691 12.8465 12.5331V6.82217C12.8465 5.93851 12.1302 5.22217 11.2465 5.22217H4.75332ZM4.35332 6.82217C4.35332 6.60125 4.53241 6.42217 4.75332 6.42217H11.2465C11.4674 6.42217 11.6465 6.60125 11.6465 6.82217V12.5331C11.6465 13.3063 11.0197 13.9332 10.2465 13.9332H5.75332C4.98012 13.9332 4.35332 13.3063 4.35332 12.5331V6.82217Z",fillRule:"evenodd",clipRule:"evenodd"}}]},gt=V.forwardRef(function(t,e){return V.createElement(Ue,Object.assign({},t,{id:"delete-single",ref:e,icon:Pn}))});gt.displayName="DeleteSingle";var xn={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M8.6 1.99991C8.60001 1.66854 8.33138 1.39991 8.00001 1.3999C7.66864 1.3999 7.40001 1.66853 7.4 1.9999L7.39996 7.3999H1.9999C1.66853 7.3999 1.3999 7.66853 1.3999 7.9999C1.3999 8.33127 1.66853 8.5999 1.9999 8.5999H7.39995L7.3999 13.9999C7.3999 14.3313 7.66853 14.5999 7.9999 14.5999C8.33127 14.5999 8.5999 14.3313 8.5999 13.9999L8.59995 8.5999H13.9999C14.3313 8.5999 14.5999 8.33127 14.5999 7.9999C14.5999 7.66853 14.3313 7.3999 13.9999 7.3999H8.59996L8.6 1.99991Z"}}]},vr=V.forwardRef(function(t,e){return V.createElement(Ue,Object.assign({},t,{id:"increase-single",ref:e,icon:xn}))});vr.displayName="IncreaseSingle";var Dn={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z",fillRule:"evenodd",clipRule:"evenodd"}}]},vt=V.forwardRef(function(t,e){return V.createElement(Ue,Object.assign({},t,{id:"more-down-single",ref:e,icon:Dn}))});vt.displayName="MoreDownSingle";var Mn={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"mask",attrs:{id:"mask0_622_8",style:{maskType:"alpha"},width:16,height:16,x:0,y:0,maskUnits:"userSpaceOnUse"},children:[{tag:"path",attrs:{fill:"#D9D9D9",d:"M0 0H16V16H0z"}}]},{tag:"g",attrs:{fill:"currentColor",mask:"url(#mask0_622_8)"},children:[{tag:"path",attrs:{d:"M6 5C6.55228 5 7 4.55228 7 4 7 3.44772 6.55228 3 6 3 5.44772 3 5 3.44772 5 4 5 4.55228 5.44772 5 6 5zM6 9C6.55228 9 7 8.55229 7 8 7 7.44772 6.55228 7 6 7 5.44772 7 5 7.44772 5 8 5 8.55229 5.44772 9 6 9zM7 12C7 12.5523 6.55228 13 6 13 5.44772 13 5 12.5523 5 12 5 11.4477 5.44772 11 6 11 6.55228 11 7 11.4477 7 12zM10 5C10.5523 5 11 4.55228 11 4 11 3.44772 10.5523 3 10 3 9.44771 3 9 3.44772 9 4 9 4.55228 9.44771 5 10 5zM11 8C11 8.55229 10.5523 9 10 9 9.44771 9 9 8.55229 9 8 9 7.44772 9.44771 7 10 7 10.5523 7 11 7.44772 11 8zM10 13C10.5523 13 11 12.5523 11 12 11 11.4477 10.5523 11 10 11 9.44771 11 9 11.4477 9 12 9 12.5523 9.44771 13 10 13z"}}]}]},mr=V.forwardRef(function(t,e){return V.createElement(Ue,Object.assign({},t,{id:"sequence-single",ref:e,icon:Mn}))});mr.displayName="SequenceSingle";var Nn={tag:"svg",attrs:{fill:"none",viewBox:"0 0 17 17",width:"1em",height:"1em"},children:[{tag:"mask",attrs:{id:"mask0_436_41",style:{maskType:"alpha"},width:17,height:17,x:0,y:0,maskUnits:"userSpaceOnUse"},children:[{tag:"path",attrs:{fill:"#D9D9D9",d:"M0.35 0.48H16.35V16.48H0.35z"}}]},{tag:"g",attrs:{mask:"url(#mask0_436_41)",fillRule:"evenodd",clipRule:"evenodd"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M2.27177 13.714L13.5855 2.40025L14.434 3.24878L3.1203 14.5625L2.27177 13.714Z"}},{tag:"path",attrs:{fill:"#E5E5E5",d:"M4.2603 1.82495L2.89617 1.82495C2.23343 1.82495 1.69617 2.36221 1.69617 3.02495L1.69617 4.38908L3.02617 4.38908L3.02617 3.15495L4.2603 3.15495L4.2603 1.82495ZM15.0092 4.38908L15.0092 3.02495C15.0092 2.36221 14.4719 1.82495 13.8092 1.82495L12.4451 1.82495L12.4451 3.15495L13.6792 3.15495L13.6792 4.38908L15.0092 4.38908ZM6.98856 1.82495L6.98856 3.15495L9.71681 3.15495L9.71681 1.82495L6.98856 1.82495ZM15.0092 7.11734L13.6792 7.11734L13.6792 9.84559L15.0092 9.84559L15.0092 7.11734ZM15.0092 12.5739L13.6792 12.5739L13.6792 13.808L12.4451 13.808L12.4451 15.138L13.8092 15.138C14.4719 15.138 15.0092 14.6007 15.0092 13.938L15.0092 12.5739ZM9.71681 15.138L9.71681 13.808L6.98856 13.808L6.98856 15.138L9.71681 15.138ZM4.2603 15.138L4.2603 13.808L3.02617 13.808L3.02617 12.5739L1.69617 12.5739L1.69617 13.938C1.69617 14.6007 2.23343 15.138 2.89617 15.138L4.2603 15.138ZM1.69617 9.8456L3.02617 9.8456L3.02617 7.11734L1.69617 7.11734L1.69617 9.8456Z"}}]}]},Xe=V.forwardRef(function(t,e){return V.createElement(Ue,Object.assign({},t,{id:"slash-single",ref:e,icon:Nn}))});Xe.displayName="SlashSingle";function Ln(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function yr(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var a=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,a.get?a:{enumerable:!0,get:function(){return t[r]}})}),n}var Yt={exports:{}},Ye={},Ke={exports:{}},Vn=Ke.exports,br;function Kt(){return br||(br=1,function(t,e){(function(n,r){r(e)})(Vn,function(n){function r(j){return function(se,P,x,M,k,q,H){return j(se,P,H)}}function a(j){return function(se,P,x,M){if(!se||!P||typeof se!="object"||typeof P!="object")return j(se,P,x,M);var k=M.get(se),q=M.get(P);if(k&&q)return k===P&&q===se;M.set(se,P),M.set(P,se);var H=j(se,P,x,M);return M.delete(se),M.delete(P),H}}function o(j,J){var se={};for(var P in j)se[P]=j[P];for(var P in J)se[P]=J[P];return se}function u(j){return j.constructor===Object||j.constructor==null}function y(j){return typeof j.then=="function"}function p(j,J){return j===J||j!==j&&J!==J}var C="[object Arguments]",m="[object Boolean]",T="[object Date]",E="[object RegExp]",w="[object Map]",S="[object Number]",I="[object Object]",h="[object Set]",i="[object String]",s=Object.prototype.toString;function f(j){var J=j.areArraysEqual,se=j.areDatesEqual,P=j.areMapsEqual,x=j.areObjectsEqual,M=j.areRegExpsEqual,k=j.areSetsEqual,q=j.createIsNestedEqual,H=q(K);function K(Y,re,de){if(Y===re)return!0;if(!Y||!re||typeof Y!="object"||typeof re!="object")return Y!==Y&&re!==re;if(u(Y)&&u(re))return x(Y,re,H,de);var Le=Array.isArray(Y),Se=Array.isArray(re);if(Le||Se)return Le===Se&&J(Y,re,H,de);var me=s.call(Y);return me!==s.call(re)?!1:me===T?se(Y,re,H,de):me===E?M(Y,re,H,de):me===w?P(Y,re,H,de):me===h?k(Y,re,H,de):me===I||me===C?y(Y)||y(re)?!1:x(Y,re,H,de):me===m||me===S||me===i?p(Y.valueOf(),re.valueOf()):!1}return K}function b(j,J,se,P){var x=j.length;if(J.length!==x)return!1;for(;x-- >0;)if(!se(j[x],J[x],x,x,j,J,P))return!1;return!0}var l=a(b);function g(j,J){return p(j.valueOf(),J.valueOf())}function d(j,J,se,P){var x=j.size===J.size;if(!x)return!1;if(!j.size)return!0;var M={},k=0;return j.forEach(function(q,H){if(x){var K=!1,Y=0;J.forEach(function(re,de){!K&&!M[Y]&&(K=se(H,de,k,Y,j,J,P)&&se(q,re,H,de,j,J,P))&&(M[Y]=!0),Y++}),k++,x=K}}),x}var v=a(d),D="_owner",N=Object.prototype.hasOwnProperty;function U(j,J,se,P){var x=Object.keys(j),M=x.length;if(Object.keys(J).length!==M)return!1;for(var k;M-- >0;){if(k=x[M],k===D){var q=!!j.$$typeof,H=!!J.$$typeof;if((q||H)&&q!==H)return!1}if(!N.call(J,k)||!se(j[k],J[k],k,k,j,J,P))return!1}return!0}var z=a(U);function O(j,J){return j.source===J.source&&j.flags===J.flags}function L(j,J,se,P){var x=j.size===J.size;if(!x)return!1;if(!j.size)return!0;var M={};return j.forEach(function(k,q){if(x){var H=!1,K=0;J.forEach(function(Y,re){!H&&!M[K]&&(H=se(k,Y,q,re,j,J,P))&&(M[K]=!0),K++}),x=H}}),x}var B=a(L),G=Object.freeze({areArraysEqual:b,areDatesEqual:g,areMapsEqual:d,areObjectsEqual:U,areRegExpsEqual:O,areSetsEqual:L,createIsNestedEqual:r}),Q=Object.freeze({areArraysEqual:l,areDatesEqual:g,areMapsEqual:v,areObjectsEqual:z,areRegExpsEqual:O,areSetsEqual:B,createIsNestedEqual:r}),ie=f(G);function ae(j,J){return ie(j,J,void 0)}var ce=f(o(G,{createIsNestedEqual:function(){return p}}));function W(j,J){return ce(j,J,void 0)}var ee=f(Q);function ne(j,J){return ee(j,J,new WeakMap)}var le=f(o(Q,{createIsNestedEqual:function(){return p}}));function fe(j,J){return le(j,J,new WeakMap)}function ve(j){return f(o(G,j(G)))}function Te(j){var J=f(o(Q,j(Q)));return function(se,P,x){return x===void 0&&(x=new WeakMap),J(se,P,x)}}n.circularDeepEqual=ne,n.circularShallowEqual=fe,n.createCustomCircularEqual=Te,n.createCustomEqual=ve,n.deepEqual=ae,n.sameValueZeroEqual=p,n.shallowEqual=W,Object.defineProperty(n,"__esModule",{value:!0})})}(Ke,Ke.exports)),Ke.exports}var mt={exports:{}},Sr;function Zt(){if(Sr)return mt.exports;Sr=1;function t(n){var r,a,o="";if(typeof n=="string"||typeof n=="number")o+=n;else if(typeof n=="object")if(Array.isArray(n)){var u=n.length;for(r=0;r<u;r++)n[r]&&(a=t(n[r]))&&(o&&(o+=" "),o+=a)}else for(a in n)n[a]&&(o&&(o+=" "),o+=a);return o}function e(){for(var n,r,a=0,o="",u=arguments.length;a<u;a++)(n=arguments[a])&&(r=t(n))&&(o&&(o+=" "),o+=r);return o}return mt.exports=e,mt.exports.clsx=e,mt.exports}var oe={},$t,Cr;function Un(){return Cr||(Cr=1,$t=function(e,n,r){return e===n?!0:e.className===n.className&&r(e.style,n.style)&&e.width===n.width&&e.autoSize===n.autoSize&&e.cols===n.cols&&e.draggableCancel===n.draggableCancel&&e.draggableHandle===n.draggableHandle&&r(e.verticalCompact,n.verticalCompact)&&r(e.compactType,n.compactType)&&r(e.layout,n.layout)&&r(e.margin,n.margin)&&r(e.containerPadding,n.containerPadding)&&e.rowHeight===n.rowHeight&&e.maxRows===n.maxRows&&e.isBounded===n.isBounded&&e.isDraggable===n.isDraggable&&e.isResizable===n.isResizable&&e.allowOverlap===n.allowOverlap&&e.preventCollision===n.preventCollision&&e.useCSSTransforms===n.useCSSTransforms&&e.transformScale===n.transformScale&&e.isDroppable===n.isDroppable&&r(e.resizeHandles,n.resizeHandles)&&r(e.resizeHandle,n.resizeHandle)&&e.onLayoutChange===n.onLayoutChange&&e.onDragStart===n.onDragStart&&e.onDrag===n.onDrag&&e.onDragStop===n.onDragStop&&e.onResizeStart===n.onResizeStart&&e.onResize===n.onResize&&e.onResizeStop===n.onResizeStop&&e.onDrop===n.onDrop&&r(e.droppingItem,n.droppingItem)&&r(e.innerRef,n.innerRef)}),$t}var Tr;function ze(){if(Tr)return oe;Tr=1,Object.defineProperty(oe,"__esModule",{value:!0}),oe.bottom=r,oe.childrenEqual=p,oe.cloneLayout=a,oe.cloneLayoutItem=y,oe.collides=m,oe.compact=T,oe.compactItem=S,oe.compactType=j,oe.correctBounds=I,oe.fastPositionEqual=C,oe.fastRGLPropsEqual=void 0,oe.getAllCollisions=s,oe.getFirstCollision=i,oe.getLayoutItem=h,oe.getStatics=f,oe.modifyLayout=o,oe.moveElement=b,oe.moveElementAwayFromCollision=l,oe.noop=void 0,oe.perc=g,oe.resizeItemInDirection=ce,oe.setTopLeft=ee,oe.setTransform=W,oe.sortLayoutItems=ne,oe.sortLayoutItemsByColRow=fe,oe.sortLayoutItemsByRowCol=le,oe.synchronizeLayoutWithChildren=ve,oe.validateLayout=Te,oe.withLayoutItem=u;var t=Kt(),e=n(V);function n(P){return P&&P.__esModule?P:{default:P}}function r(P){let x=0,M;for(let k=0,q=P.length;k<q;k++)M=P[k].y+P[k].h,M>x&&(x=M);return x}function a(P){const x=Array(P.length);for(let M=0,k=P.length;M<k;M++)x[M]=y(P[M]);return x}function o(P,x){const M=Array(P.length);for(let k=0,q=P.length;k<q;k++)x.i===P[k].i?M[k]=x:M[k]=P[k];return M}function u(P,x,M){let k=h(P,x);return k?(k=M(y(k)),P=o(P,k),[P,k]):[P,null]}function y(P){return{w:P.w,h:P.h,x:P.x,y:P.y,i:P.i,minW:P.minW,maxW:P.maxW,minH:P.minH,maxH:P.maxH,moved:!!P.moved,static:!!P.static,isDraggable:P.isDraggable,isResizable:P.isResizable,resizeHandles:P.resizeHandles,isBounded:P.isBounded}}function p(P,x){return(0,t.deepEqual)(e.default.Children.map(P,M=>M==null?void 0:M.key),e.default.Children.map(x,M=>M==null?void 0:M.key))&&(0,t.deepEqual)(e.default.Children.map(P,M=>M==null?void 0:M.props["data-grid"]),e.default.Children.map(x,M=>M==null?void 0:M.props["data-grid"]))}oe.fastRGLPropsEqual=Un();function C(P,x){return P.left===x.left&&P.top===x.top&&P.width===x.width&&P.height===x.height}function m(P,x){return!(P.i===x.i||P.x+P.w<=x.x||P.x>=x.x+x.w||P.y+P.h<=x.y||P.y>=x.y+x.h)}function T(P,x,M,k){const q=f(P),H=ne(P,x),K=Array(P.length);for(let Y=0,re=H.length;Y<re;Y++){let de=y(H[Y]);de.static||(de=S(q,de,x,M,H,k),q.push(de)),K[P.indexOf(H[Y])]=de,de.moved=!1}return K}const E={x:"w",y:"h"};function w(P,x,M,k){const q=E[k];x[k]+=1;const H=P.map(K=>K.i).indexOf(x.i);for(let K=H+1;K<P.length;K++){const Y=P[K];if(!Y.static){if(Y.y>x.y+x.h)break;m(x,Y)&&w(P,Y,M+x[q],k)}}x[k]=M}function S(P,x,M,k,q,H){const K=M==="vertical",Y=M==="horizontal";if(K)for(x.y=Math.min(r(P),x.y);x.y>0&&!i(P,x);)x.y--;else if(Y)for(;x.x>0&&!i(P,x);)x.x--;let re;for(;(re=i(P,x))&&!(M===null&&H);)if(Y?w(q,x,re.x+re.w,"x"):w(q,x,re.y+re.h,"y"),Y&&x.x+x.w>k)for(x.x=k-x.w,x.y++;x.x>0&&!i(P,x);)x.x--;return x.y=Math.max(x.y,0),x.x=Math.max(x.x,0),x}function I(P,x){const M=f(P);for(let k=0,q=P.length;k<q;k++){const H=P[k];if(H.x+H.w>x.cols&&(H.x=x.cols-H.w),H.x<0&&(H.x=0,H.w=x.cols),!H.static)M.push(H);else for(;i(M,H);)H.y++}return P}function h(P,x){for(let M=0,k=P.length;M<k;M++)if(P[M].i===x)return P[M]}function i(P,x){for(let M=0,k=P.length;M<k;M++)if(m(P[M],x))return P[M]}function s(P,x){return P.filter(M=>m(M,x))}function f(P){return P.filter(x=>x.static)}function b(P,x,M,k,q,H,K,Y,re){if(x.static&&x.isDraggable!==!0||x.y===k&&x.x===M)return P;`${x.i}${String(M)}${String(k)}${x.x}${x.y}`;const de=x.x,Le=x.y;typeof M=="number"&&(x.x=M),typeof k=="number"&&(x.y=k),x.moved=!0;let Se=ne(P,K);(K==="vertical"&&typeof k=="number"?Le>=k:K==="horizontal"&&typeof M=="number"?de>=M:!1)&&(Se=Se.reverse());const Fe=s(Se,x),zt=Fe.length>0;if(zt&&re)return a(P);if(zt&&H)return`${x.i}`,x.x=de,x.y=Le,x.moved=!1,P;for(let fr=0,vo=Fe.length;fr<vo;fr++){const Ve=Fe[fr];`${x.i}${x.x}${x.y}${Ve.i}${Ve.x}${Ve.y}`,!Ve.moved&&(Ve.static?P=l(P,Ve,x,q,K):P=l(P,x,Ve,q,K))}return P}function l(P,x,M,k,q,H){const K=q==="horizontal",Y=q==="vertical",re=x.static;if(k){k=!1;const Se={x:K?Math.max(x.x-M.w,0):M.x,y:Y?Math.max(x.y-M.h,0):M.y,w:M.w,h:M.h,i:"-1"},me=i(P,Se),Fe=me&&me.y+me.h>x.y,zt=me&&x.x+x.w>me.x;if(me){if(Fe&&Y)return b(P,M,void 0,x.y+1,k,re,q);if(Fe&&q==null)return x.y=M.y,M.y=M.y+M.h,P;if(zt&&K)return b(P,x,M.x,void 0,k,re,q)}else return`${M.i}${Se.x}${Se.y}`,b(P,M,K?Se.x:void 0,Y?Se.y:void 0,k,re,q)}const de=K?M.x+1:void 0,Le=Y?M.y+1:void 0;return de==null&&Le==null?P:b(P,M,K?M.x+1:void 0,Y?M.y+1:void 0,k,re,q)}function g(P){return P*100+"%"}const d=(P,x,M,k)=>P+M>k?x:M,v=(P,x,M)=>P<0?x:M,D=P=>Math.max(0,P),N=P=>Math.max(0,P),U=(P,x,M)=>{let{left:k,height:q,width:H}=x;const K=P.top-(q-P.height);return{left:k,width:H,height:v(K,P.height,q),top:N(K)}},z=(P,x,M)=>{let{top:k,left:q,height:H,width:K}=x;return{top:k,height:H,width:d(P.left,P.width,K,M),left:D(q)}},O=(P,x,M)=>{let{top:k,height:q,width:H}=x;const K=P.left-(H-P.width);return{height:q,width:K<0?P.width:d(P.left,P.width,H,M),top:N(k),left:D(K)}},L=(P,x,M)=>{let{top:k,left:q,height:H,width:K}=x;return{width:K,left:q,height:v(k,P.height,H),top:N(k)}},ae={n:U,ne:function(){return U(arguments.length<=0?void 0:arguments[0],z(...arguments))},e:z,se:function(){return L(arguments.length<=0?void 0:arguments[0],z(...arguments))},s:L,sw:function(){return L(arguments.length<=0?void 0:arguments[0],O(...arguments))},w:O,nw:function(){return U(arguments.length<=0?void 0:arguments[0],O(...arguments))}};function ce(P,x,M,k){const q=ae[P];return q?q(x,{...x,...M},k):M}function W(P){let{top:x,left:M,width:k,height:q}=P;const H=`translate(${M}px,${x}px)`;return{transform:H,WebkitTransform:H,MozTransform:H,msTransform:H,OTransform:H,width:`${k}px`,height:`${q}px`,position:"absolute"}}function ee(P){let{top:x,left:M,width:k,height:q}=P;return{top:`${x}px`,left:`${M}px`,width:`${k}px`,height:`${q}px`,position:"absolute"}}function ne(P,x){return x==="horizontal"?fe(P):x==="vertical"?le(P):P}function le(P){return P.slice(0).sort(function(x,M){return x.y>M.y||x.y===M.y&&x.x>M.x?1:x.y===M.y&&x.x===M.x?0:-1})}function fe(P){return P.slice(0).sort(function(x,M){return x.x>M.x||x.x===M.x&&x.y>M.y?1:-1})}function ve(P,x,M,k,q){P=P||[];const H=[];e.default.Children.forEach(x,Y=>{if((Y==null?void 0:Y.key)==null)return;const re=h(P,String(Y.key)),de=Y.props["data-grid"];re&&de==null?H.push(y(re)):de?H.push(y({...de,i:Y.key})):H.push(y({w:1,h:1,x:0,y:r(H),i:String(Y.key)}))});const K=I(H,{cols:M});return q?K:T(K,k,M)}function Te(P){let x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Layout";const M=["x","y","w","h"];if(!Array.isArray(P))throw new Error(x+" must be an array!");for(let k=0,q=P.length;k<q;k++){const H=P[k];for(let K=0;K<M.length;K++)if(typeof H[M[K]]!="number")throw new Error("ReactGridLayout: "+x+"["+k+"]."+M[K]+" must be a number!")}}function j(P){const{verticalCompact:x,compactType:M}=P||{};return x===!1?null:M}function J(){}const se=()=>{};return oe.noop=se,oe}var Ie={},wr;function Jt(){if(wr)return Ie;wr=1,Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.calcGridColWidth=t,Ie.calcGridItemPosition=n,Ie.calcGridItemWHPx=e,Ie.calcWH=a,Ie.calcXY=r,Ie.clamp=o;function t(u){const{margin:y,containerPadding:p,containerWidth:C,cols:m}=u;return(C-y[0]*(m-1)-p[0]*2)/m}function e(u,y,p){return Number.isFinite(u)?Math.round(y*u+Math.max(0,u-1)*p):u}function n(u,y,p,C,m,T){const{margin:E,containerPadding:w,rowHeight:S}=u,I=t(u),h={};return T&&T.resizing?(h.width=Math.round(T.resizing.width),h.height=Math.round(T.resizing.height)):(h.width=e(C,I,E[0]),h.height=e(m,S,E[1])),T&&T.dragging?(h.top=Math.round(T.dragging.top),h.left=Math.round(T.dragging.left)):T&&T.resizing&&typeof T.resizing.top=="number"&&typeof T.resizing.left=="number"?(h.top=Math.round(T.resizing.top),h.left=Math.round(T.resizing.left)):(h.top=Math.round((S+E[1])*p+w[1]),h.left=Math.round((I+E[0])*y+w[0])),h}function r(u,y,p,C,m){const{margin:T,cols:E,rowHeight:w,maxRows:S}=u,I=t(u);let h=Math.round((p-T[0])/(I+T[0])),i=Math.round((y-T[1])/(w+T[1]));return h=o(h,0,E-C),i=o(i,0,S-m),{x:h,y:i}}function a(u,y,p,C,m,T){const{margin:E,maxRows:w,cols:S,rowHeight:I}=u,h=t(u);let i=Math.round((y+E[0])/(h+E[0])),s=Math.round((p+E[1])/(I+E[1])),f=o(i,0,S-C),b=o(s,0,w-m);return["sw","w","nw"].indexOf(T)!==-1&&(f=o(i,0,S)),["nw","n","ne"].indexOf(T)!==-1&&(b=o(s,0,w)),{w:f,h:b}}function o(u,y,p){return Math.max(Math.min(u,p),y)}return Ie}var Ze={},Qt={exports:{}},er,Ir;function zn(){if(Ir)return er;Ir=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return er=t,er}var tr,_r;function kn(){if(_r)return tr;_r=1;var t=zn();function e(){}function n(){}return n.resetWarningCache=e,tr=function(){function r(u,y,p,C,m,T){if(T!==t){var E=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw E.name="Invariant Violation",E}}r.isRequired=r;function a(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:a,element:r,elementType:r,instanceOf:a,node:r,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:n,resetWarningCache:e};return o.PropTypes=o,o},tr}var Rr;function Ee(){return Rr||(Rr=1,Qt.exports=kn()()),Qt.exports}var $e={exports:{}},rr={};function Er(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(n=Er(t[e]))&&(r&&(r+=" "),r+=n);else for(e in t)t[e]&&(r&&(r+=" "),r+=e);return r}function Or(){for(var t,e,n=0,r="";n<arguments.length;)(t=arguments[n++])&&(e=Er(t))&&(r&&(r+=" "),r+=e);return r}const An=yr(Object.freeze(Object.defineProperty({__proto__:null,clsx:Or,default:Or},Symbol.toStringTag,{value:"Module"})));var he={},Oe={},Pr;function yt(){if(Pr)return Oe;Pr=1,Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.dontSetMe=a,Oe.findInArray=t,Oe.int=r,Oe.isFunction=e,Oe.isNum=n;function t(o,u){for(let y=0,p=o.length;y<p;y++)if(u.apply(u,[o[y],y,o]))return o[y]}function e(o){return typeof o=="function"||Object.prototype.toString.call(o)==="[object Function]"}function n(o){return typeof o=="number"&&!isNaN(o)}function r(o){return parseInt(o,10)}function a(o,u,y){if(o[u])return new Error("Invalid prop ".concat(u," passed to ").concat(y," - do not set this, set it on the child."))}return Oe}var Pe={},xr;function Wn(){if(xr)return Pe;xr=1,Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.browserPrefixToKey=n,Pe.browserPrefixToStyle=r,Pe.default=void 0,Pe.getPrefix=e;const t=["Moz","Webkit","O","ms"];function e(){var o;let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window>"u")return"";const y=(o=window.document)===null||o===void 0||(o=o.documentElement)===null||o===void 0?void 0:o.style;if(!y||u in y)return"";for(let p=0;p<t.length;p++)if(n(u,t[p])in y)return t[p];return""}function n(o,u){return u?"".concat(u).concat(a(o)):o}function r(o,u){return u?"-".concat(u.toLowerCase(),"-").concat(o):o}function a(o){let u="",y=!0;for(let p=0;p<o.length;p++)y?(u+=o[p].toUpperCase(),y=!1):o[p]==="-"?y=!0:u+=o[p];return u}return Pe.default=e(),Pe}var Dr;function nr(){if(Dr)return he;Dr=1,Object.defineProperty(he,"__esModule",{value:!0}),he.addClassName=l,he.addEvent=y,he.addUserSelectStyles=f,he.createCSSTransform=S,he.createSVGTransform=I,he.getTouch=i,he.getTouchIdentifier=s,he.getTranslation=h,he.innerHeight=T,he.innerWidth=E,he.matchesSelector=o,he.matchesSelectorAndParentsTo=u,he.offsetXYFromParent=w,he.outerHeight=C,he.outerWidth=m,he.removeClassName=g,he.removeEvent=p,he.removeUserSelectStyles=b;var t=yt(),e=r(Wn());function n(d){if(typeof WeakMap!="function")return null;var v=new WeakMap,D=new WeakMap;return(n=function(N){return N?D:v})(d)}function r(d,v){if(d&&d.__esModule)return d;if(d===null||typeof d!="object"&&typeof d!="function")return{default:d};var D=n(v);if(D&&D.has(d))return D.get(d);var N={},U=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var z in d)if(z!=="default"&&Object.prototype.hasOwnProperty.call(d,z)){var O=U?Object.getOwnPropertyDescriptor(d,z):null;O&&(O.get||O.set)?Object.defineProperty(N,z,O):N[z]=d[z]}return N.default=d,D&&D.set(d,N),N}let a="";function o(d,v){return a||(a=(0,t.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(D){return(0,t.isFunction)(d[D])})),(0,t.isFunction)(d[a])?d[a](v):!1}function u(d,v,D){let N=d;do{if(o(N,v))return!0;if(N===D)return!1;N=N.parentNode}while(N);return!1}function y(d,v,D,N){if(!d)return;const U={capture:!0,...N};d.addEventListener?d.addEventListener(v,D,U):d.attachEvent?d.attachEvent("on"+v,D):d["on"+v]=D}function p(d,v,D,N){if(!d)return;const U={capture:!0,...N};d.removeEventListener?d.removeEventListener(v,D,U):d.detachEvent?d.detachEvent("on"+v,D):d["on"+v]=null}function C(d){let v=d.clientHeight;const D=d.ownerDocument.defaultView.getComputedStyle(d);return v+=(0,t.int)(D.borderTopWidth),v+=(0,t.int)(D.borderBottomWidth),v}function m(d){let v=d.clientWidth;const D=d.ownerDocument.defaultView.getComputedStyle(d);return v+=(0,t.int)(D.borderLeftWidth),v+=(0,t.int)(D.borderRightWidth),v}function T(d){let v=d.clientHeight;const D=d.ownerDocument.defaultView.getComputedStyle(d);return v-=(0,t.int)(D.paddingTop),v-=(0,t.int)(D.paddingBottom),v}function E(d){let v=d.clientWidth;const D=d.ownerDocument.defaultView.getComputedStyle(d);return v-=(0,t.int)(D.paddingLeft),v-=(0,t.int)(D.paddingRight),v}function w(d,v,D){const U=v===v.ownerDocument.body?{left:0,top:0}:v.getBoundingClientRect(),z=(d.clientX+v.scrollLeft-U.left)/D,O=(d.clientY+v.scrollTop-U.top)/D;return{x:z,y:O}}function S(d,v){const D=h(d,v,"px");return{[(0,e.browserPrefixToKey)("transform",e.default)]:D}}function I(d,v){return h(d,v,"")}function h(d,v,D){let{x:N,y:U}=d,z="translate(".concat(N).concat(D,",").concat(U).concat(D,")");if(v){const O="".concat(typeof v.x=="string"?v.x:v.x+D),L="".concat(typeof v.y=="string"?v.y:v.y+D);z="translate(".concat(O,", ").concat(L,")")+z}return z}function i(d,v){return d.targetTouches&&(0,t.findInArray)(d.targetTouches,D=>v===D.identifier)||d.changedTouches&&(0,t.findInArray)(d.changedTouches,D=>v===D.identifier)}function s(d){if(d.targetTouches&&d.targetTouches[0])return d.targetTouches[0].identifier;if(d.changedTouches&&d.changedTouches[0])return d.changedTouches[0].identifier}function f(d){if(!d)return;let v=d.getElementById("react-draggable-style-el");v||(v=d.createElement("style"),v.type="text/css",v.id="react-draggable-style-el",v.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
|
|
1
|
+
(function(Z,_){typeof exports=="object"&&typeof module<"u"?_(exports,require("@univerjs/core"),require("@univerjs/sheets-conditional-formatting"),require("@univerjs/sheets"),require("@univerjs/ui"),require("react/jsx-runtime"),require("react"),require("@univerjs/design"),require("@univerjs/engine-formula"),require("@univerjs/sheets-ui"),require("react-dom"),require("rxjs"),require("@univerjs/sheets-formula-ui"),require("@univerjs/engine-render"),require("rxjs/operators")):typeof define=="function"&&define.amd?define(["exports","@univerjs/core","@univerjs/sheets-conditional-formatting","@univerjs/sheets","@univerjs/ui","react/jsx-runtime","react","@univerjs/design","@univerjs/engine-formula","@univerjs/sheets-ui","react-dom","rxjs","@univerjs/sheets-formula-ui","@univerjs/engine-render","rxjs/operators"],_):(Z=typeof globalThis<"u"?globalThis:Z||self,_(Z.UniverSheetsConditionalFormattingUi={},Z.UniverCore,Z.UniverSheetsConditionalFormatting,Z.UniverSheets,Z.UniverUi,Z.React,Z.React,Z.UniverDesign,Z.UniverEngineFormula,Z.UniverSheetsUi,Z.ReactDOM,Z.rxjs,Z.UniverSheetsFormulaUi,Z.UniverEngineRender,Z.rxjs.operators))})(this,function(Z,_,c,X,te,R,V,$,kt,pe,pr,Ce,Ge,hr,qe){"use strict";var mo=Object.defineProperty;var yo=(Z,_,c)=>_ in Z?mo(Z,_,{enumerable:!0,configurable:!0,writable:!0,value:c}):Z[_]=c;var xe=(Z,_,c)=>yo(Z,typeof _!="symbol"?_+"":_,c);const At={type:_.CommandType.COMMAND,id:"sheet.command.add-average-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:n,style:r,stopIfTrue:a,operator:o}=e,u=t.get(c.ConditionalFormattingRuleModel),y=t.get(_.ICommandService),p=t.get(_.IUniverInstanceService),C=X.getSheetCommandTarget(p);if(!C)return!1;const{unitId:m,subUnitId:T}=C,E=u.createCfId(m,T),w={ranges:n,cfId:E,stopIfTrue:!!a,rule:{type:c.CFRuleType.highlightCell,subType:c.CFSubRuleType.average,operator:o,style:r}};return y.executeCommand(c.AddConditionalRuleMutation.id,{unitId:m,subUnitId:T,rule:w})}},Wt={type:_.CommandType.COMMAND,id:"sheet.command.add-color-scale-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:n,config:r,stopIfTrue:a}=e,o=t.get(c.ConditionalFormattingRuleModel),u=t.get(_.ICommandService),y=t.get(_.IUniverInstanceService),p=X.getSheetCommandTarget(y);if(!p)return!1;const{unitId:C,subUnitId:m}=p,T=o.createCfId(C,m),E={ranges:n,cfId:T,stopIfTrue:!!a,rule:{type:c.CFRuleType.colorScale,config:r}};return u.executeCommand(c.AddConditionalRuleMutation.id,{unitId:C,subUnitId:m,rule:E})}},jt={type:_.CommandType.COMMAND,id:"sheet.command.add-data-bar-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:n,min:r,max:a,nativeColor:o,positiveColor:u,isGradient:y,stopIfTrue:p,isShowValue:C}=e,m=t.get(c.ConditionalFormattingRuleModel),T=t.get(_.IUniverInstanceService),E=X.getSheetCommandTarget(T);if(!E)return!1;const{unitId:w,subUnitId:S}=E,I=t.get(_.ICommandService),h=m.createCfId(w,S),i={ranges:n,cfId:h,stopIfTrue:!!p,rule:{type:c.CFRuleType.dataBar,isShowValue:C,config:{min:r,max:a,nativeColor:o,positiveColor:u,isGradient:y}}};return I.executeCommand(c.AddConditionalRuleMutation.id,{unitId:w,subUnitId:S,rule:i})}},Ht={type:_.CommandType.COMMAND,id:"sheet.command.add-duplicate-values-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:n,style:r,stopIfTrue:a}=e,o=t.get(c.ConditionalFormattingRuleModel),u=t.get(_.ICommandService),y=t.get(_.IUniverInstanceService),p=X.getSheetCommandTarget(y);if(!p)return!1;const{unitId:C,subUnitId:m}=p,T=o.createCfId(C,m),E={ranges:n,cfId:T,stopIfTrue:!!a,rule:{type:c.CFRuleType.highlightCell,subType:c.CFSubRuleType.duplicateValues,style:r}};return u.executeCommand(c.AddConditionalRuleMutation.id,{unitId:C,subUnitId:m,rule:E})}},Bt={type:_.CommandType.COMMAND,id:"sheet.command.add-number-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:n,style:r,stopIfTrue:a,operator:o,value:u}=e,y=t.get(c.ConditionalFormattingRuleModel),p=t.get(_.ICommandService),C=t.get(_.IUniverInstanceService),m=X.getSheetCommandTarget(C);if(!m)return!1;const{unitId:T,subUnitId:E}=m,w=y.createCfId(T,E);let S;if([c.CFNumberOperator.between,c.CFNumberOperator.notBetween].includes(o)){const I=u;if(I.length!==2||!Array.isArray(I))return!1;S={ranges:n,cfId:w,stopIfTrue:!!a,rule:{type:c.CFRuleType.highlightCell,subType:c.CFSubRuleType.number,operator:o,style:r,value:I}}}else{const I=u;if(typeof I!="number")return!1;S={ranges:n,cfId:w,stopIfTrue:!!a,rule:{type:c.CFRuleType.highlightCell,subType:c.CFSubRuleType.number,operator:o,style:r,value:I}}}return p.executeCommand(c.AddConditionalRuleMutation.id,{unitId:T,subUnitId:E,rule:S})}},Ft={type:_.CommandType.COMMAND,id:"sheet.command.add-rank-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:n,style:r,stopIfTrue:a,isPercent:o,isBottom:u,value:y}=e,p=t.get(c.ConditionalFormattingRuleModel),C=t.get(_.IUniverInstanceService),m=t.get(_.ICommandService),T=X.getSheetCommandTarget(C);if(!T)return!1;const{unitId:E,subUnitId:w}=T,S=p.createCfId(E,w),I={ranges:n,cfId:S,stopIfTrue:!!a,rule:{type:c.CFRuleType.highlightCell,subType:c.CFSubRuleType.rank,isPercent:o,isBottom:u,style:r,value:y}};return m.executeCommand(c.AddConditionalRuleMutation.id,{unitId:E,subUnitId:w,rule:I})}},Gt={type:_.CommandType.COMMAND,id:"sheet.command.add-text-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:n,style:r,stopIfTrue:a,operator:o,value:u}=e,y=t.get(c.ConditionalFormattingRuleModel),p=t.get(_.IUniverInstanceService),C=X.getSheetCommandTarget(p);if(!C)return!1;const{unitId:m,subUnitId:T}=C,E=t.get(_.ICommandService),w=y.createCfId(m,T),S={ranges:n,cfId:w,stopIfTrue:!!a,rule:{type:c.CFRuleType.highlightCell,subType:c.CFSubRuleType.text,operator:o,style:r,value:u}};return E.executeCommand(c.AddConditionalRuleMutation.id,{unitId:m,subUnitId:T,rule:S})}},qt={type:_.CommandType.COMMAND,id:"sheet.command.add-time-period-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:n,style:r,stopIfTrue:a,operator:o}=e,u=t.get(c.ConditionalFormattingRuleModel),y=t.get(_.IUniverInstanceService),p=t.get(_.ICommandService),C=X.getSheetCommandTarget(y);if(!C)return!1;const{unitId:m,subUnitId:T}=C,E=u.createCfId(m,T),w={ranges:n,cfId:E,stopIfTrue:!!a,rule:{type:c.CFRuleType.highlightCell,subType:c.CFSubRuleType.timePeriod,operator:o,style:r}};return p.executeCommand(c.AddConditionalRuleMutation.id,{unitId:m,subUnitId:T,rule:w})}},Xt={type:_.CommandType.COMMAND,id:"sheet.command.add-uniqueValues-conditional-rule",handler(t,e){if(!e)return!1;const{ranges:n,style:r,stopIfTrue:a}=e,o=t.get(c.ConditionalFormattingRuleModel),u=t.get(_.IUniverInstanceService),y=t.get(_.ICommandService),p=X.getSheetCommandTarget(u);if(!p)return!1;const{unitId:C,subUnitId:m}=p,T=o.createCfId(C,m),E={ranges:n,cfId:T,stopIfTrue:!!a,rule:{type:c.CFRuleType.highlightCell,subType:c.CFSubRuleType.uniqueValues,style:r}};return y.executeCommand(c.AddConditionalRuleMutation.id,{unitId:C,subUnitId:m,rule:E})}},A={conditionalFormattingWrap:"univer-conditional-formatting-wrap",title:"univer-title",label:"univer-label",labelContainer:"univer-label-container",mTBase:"univer-m-t-base",mTSm:"univer-m-t-sm",mTXl:"univer-m-t-xl",mLSm:"univer-m-l-sm",mLXl:"univer-m-l-xl",mLXxs:"univer-m-l-xxs",mL0:"univer-m-l-0",mR0:"univer-m-r-0"};var be=function(){return be=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a])}return t},be.apply(this,arguments)},_n=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(t);a<r.length;a++)e.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(t,r[a])&&(n[r[a]]=t[r[a]]);return n},Ue=V.forwardRef(function(t,e){var n=t.icon,r=t.id,a=t.className,o=t.extend,u=_n(t,["icon","id","className","extend"]),y="univerjs-icon univerjs-icon-".concat(r," ").concat(a||"").trim(),p=V.useRef("_".concat(On()));return gr(n,"".concat(r),{defIds:n.defIds,idSuffix:p.current},be({ref:e,className:y},u),o)});function gr(t,e,n,r,a){return V.createElement(t.tag,be(be({key:e},Rn(t,n,a)),r),(En(t,n).children||[]).map(function(o,u){return gr(o,"".concat(e,"-").concat(t.tag,"-").concat(u),n,void 0,a)}))}function Rn(t,e,n){var r=be({},t.attrs);n!=null&&n.colorChannel1&&r.fill==="colorChannel1"&&(r.fill=n.colorChannel1),t.tag==="mask"&&r.id&&(r.id=r.id+e.idSuffix),Object.entries(r).forEach(function(o){var u=o[0],y=o[1];u==="mask"&&typeof y=="string"&&(r[u]=y.replace(/url\(#(.*)\)/,"url(#$1".concat(e.idSuffix,")")))});var a=e.defIds;return!a||a.length===0||(t.tag==="use"&&r["xlink:href"]&&(r["xlink:href"]=r["xlink:href"]+e.idSuffix),Object.entries(r).forEach(function(o){var u=o[0],y=o[1];typeof y=="string"&&(r[u]=y.replace(/url\(#(.*)\)/,"url(#$1".concat(e.idSuffix,")")))})),r}function En(t,e){var n,r=e.defIds;return!r||r.length===0?t:t.tag==="defs"&&(!((n=t.children)===null||n===void 0)&&n.length)?be(be({},t),{children:t.children.map(function(a){return typeof a.attrs.id=="string"&&r&&r.indexOf(a.attrs.id)>-1?be(be({},a),{attrs:be(be({},a.attrs),{id:a.attrs.id+e.idSuffix})}):a})}):t}function On(){return Math.random().toString(36).substring(2,8)}Ue.displayName="UniverIcon";var Pn={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M5.3313 1.4667C5.3313 1.13533 5.59993.866699 5.9313.866699H10.069C10.4004.866699 10.669 1.13533 10.669 1.4667 10.669 1.79807 10.4004 2.0667 10.069 2.0667H5.9313C5.59993 2.0667 5.3313 1.79807 5.3313 1.4667zM1.09985 3.64443C1.09985 3.31306 1.36848 3.04443 1.69985 3.04443H14.2999C14.6312 3.04443 14.8999 3.31306 14.8999 3.64443 14.8999 3.9758 14.6312 4.24443 14.2999 4.24443H1.69985C1.36848 4.24443 1.09985 3.9758 1.09985 3.64443zM6.12398 8.30171C6.35829 8.0674 6.73819 8.0674 6.97251 8.30171L8.00007 9.32928 9.02764 8.30171C9.26195 8.0674 9.64185 8.0674 9.87617 8.30171 10.1105 8.53603 10.1105 8.91593 9.87617 9.15024L8.8486 10.1778 9.87617 11.2054C10.1105 11.4397 10.1105 11.8196 9.87617 12.0539 9.64185 12.2882 9.26195 12.2882 9.02764 12.0539L8.00007 11.0263 6.97251 12.0539C6.73819 12.2882 6.35829 12.2882 6.12398 12.0539 5.88966 11.8196 5.88966 11.4397 6.12398 11.2054L7.15154 10.1778 6.12398 9.15024C5.88966 8.91593 5.88966 8.53603 6.12398 8.30171z"}},{tag:"path",attrs:{fill:"currentColor",d:"M4.75332 5.22217C3.86966 5.22217 3.15332 5.93851 3.15332 6.82217V12.5331C3.15332 13.9691 4.31738 15.1332 5.75332 15.1332H10.2465C11.6825 15.1332 12.8465 13.9691 12.8465 12.5331V6.82217C12.8465 5.93851 12.1302 5.22217 11.2465 5.22217H4.75332ZM4.35332 6.82217C4.35332 6.60125 4.53241 6.42217 4.75332 6.42217H11.2465C11.4674 6.42217 11.6465 6.60125 11.6465 6.82217V12.5331C11.6465 13.3063 11.0197 13.9332 10.2465 13.9332H5.75332C4.98012 13.9332 4.35332 13.3063 4.35332 12.5331V6.82217Z",fillRule:"evenodd",clipRule:"evenodd"}}]},gt=V.forwardRef(function(t,e){return V.createElement(Ue,Object.assign({},t,{id:"delete-single",ref:e,icon:Pn}))});gt.displayName="DeleteSingle";var xn={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M8.6 1.99991C8.60001 1.66854 8.33138 1.39991 8.00001 1.3999C7.66864 1.3999 7.40001 1.66853 7.4 1.9999L7.39996 7.3999H1.9999C1.66853 7.3999 1.3999 7.66853 1.3999 7.9999C1.3999 8.33127 1.66853 8.5999 1.9999 8.5999H7.39995L7.3999 13.9999C7.3999 14.3313 7.66853 14.5999 7.9999 14.5999C8.33127 14.5999 8.5999 14.3313 8.5999 13.9999L8.59995 8.5999H13.9999C14.3313 8.5999 14.5999 8.33127 14.5999 7.9999C14.5999 7.66853 14.3313 7.3999 13.9999 7.3999H8.59996L8.6 1.99991Z"}}]},vr=V.forwardRef(function(t,e){return V.createElement(Ue,Object.assign({},t,{id:"increase-single",ref:e,icon:xn}))});vr.displayName="IncreaseSingle";var Dn={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z",fillRule:"evenodd",clipRule:"evenodd"}}]},vt=V.forwardRef(function(t,e){return V.createElement(Ue,Object.assign({},t,{id:"more-down-single",ref:e,icon:Dn}))});vt.displayName="MoreDownSingle";var Mn={tag:"svg",attrs:{fill:"none",viewBox:"0 0 16 16",width:"1em",height:"1em"},children:[{tag:"mask",attrs:{id:"mask0_622_8",style:{maskType:"alpha"},width:16,height:16,x:0,y:0,maskUnits:"userSpaceOnUse"},children:[{tag:"path",attrs:{fill:"#D9D9D9",d:"M0 0H16V16H0z"}}]},{tag:"g",attrs:{fill:"currentColor",mask:"url(#mask0_622_8)"},children:[{tag:"path",attrs:{d:"M6 5C6.55228 5 7 4.55228 7 4 7 3.44772 6.55228 3 6 3 5.44772 3 5 3.44772 5 4 5 4.55228 5.44772 5 6 5zM6 9C6.55228 9 7 8.55229 7 8 7 7.44772 6.55228 7 6 7 5.44772 7 5 7.44772 5 8 5 8.55229 5.44772 9 6 9zM7 12C7 12.5523 6.55228 13 6 13 5.44772 13 5 12.5523 5 12 5 11.4477 5.44772 11 6 11 6.55228 11 7 11.4477 7 12zM10 5C10.5523 5 11 4.55228 11 4 11 3.44772 10.5523 3 10 3 9.44771 3 9 3.44772 9 4 9 4.55228 9.44771 5 10 5zM11 8C11 8.55229 10.5523 9 10 9 9.44771 9 9 8.55229 9 8 9 7.44772 9.44771 7 10 7 10.5523 7 11 7.44772 11 8zM10 13C10.5523 13 11 12.5523 11 12 11 11.4477 10.5523 11 10 11 9.44771 11 9 11.4477 9 12 9 12.5523 9.44771 13 10 13z"}}]}]},mr=V.forwardRef(function(t,e){return V.createElement(Ue,Object.assign({},t,{id:"sequence-single",ref:e,icon:Mn}))});mr.displayName="SequenceSingle";var Nn={tag:"svg",attrs:{fill:"none",viewBox:"0 0 17 17",width:"1em",height:"1em"},children:[{tag:"mask",attrs:{id:"mask0_436_41",style:{maskType:"alpha"},width:17,height:17,x:0,y:0,maskUnits:"userSpaceOnUse"},children:[{tag:"path",attrs:{fill:"#D9D9D9",d:"M0.35 0.48H16.35V16.48H0.35z"}}]},{tag:"g",attrs:{mask:"url(#mask0_436_41)",fillRule:"evenodd",clipRule:"evenodd"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M2.27177 13.714L13.5855 2.40025L14.434 3.24878L3.1203 14.5625L2.27177 13.714Z"}},{tag:"path",attrs:{fill:"#E5E5E5",d:"M4.2603 1.82495L2.89617 1.82495C2.23343 1.82495 1.69617 2.36221 1.69617 3.02495L1.69617 4.38908L3.02617 4.38908L3.02617 3.15495L4.2603 3.15495L4.2603 1.82495ZM15.0092 4.38908L15.0092 3.02495C15.0092 2.36221 14.4719 1.82495 13.8092 1.82495L12.4451 1.82495L12.4451 3.15495L13.6792 3.15495L13.6792 4.38908L15.0092 4.38908ZM6.98856 1.82495L6.98856 3.15495L9.71681 3.15495L9.71681 1.82495L6.98856 1.82495ZM15.0092 7.11734L13.6792 7.11734L13.6792 9.84559L15.0092 9.84559L15.0092 7.11734ZM15.0092 12.5739L13.6792 12.5739L13.6792 13.808L12.4451 13.808L12.4451 15.138L13.8092 15.138C14.4719 15.138 15.0092 14.6007 15.0092 13.938L15.0092 12.5739ZM9.71681 15.138L9.71681 13.808L6.98856 13.808L6.98856 15.138L9.71681 15.138ZM4.2603 15.138L4.2603 13.808L3.02617 13.808L3.02617 12.5739L1.69617 12.5739L1.69617 13.938C1.69617 14.6007 2.23343 15.138 2.89617 15.138L4.2603 15.138ZM1.69617 9.8456L3.02617 9.8456L3.02617 7.11734L1.69617 7.11734L1.69617 9.8456Z"}}]}]},Xe=V.forwardRef(function(t,e){return V.createElement(Ue,Object.assign({},t,{id:"slash-single",ref:e,icon:Nn}))});Xe.displayName="SlashSingle";function Ln(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function yr(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var a=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,a.get?a:{enumerable:!0,get:function(){return t[r]}})}),n}var Yt={exports:{}},Ye={},Ke={exports:{}},Vn=Ke.exports,br;function Kt(){return br||(br=1,function(t,e){(function(n,r){r(e)})(Vn,function(n){function r(j){return function(se,P,x,M,k,q,H){return j(se,P,H)}}function a(j){return function(se,P,x,M){if(!se||!P||typeof se!="object"||typeof P!="object")return j(se,P,x,M);var k=M.get(se),q=M.get(P);if(k&&q)return k===P&&q===se;M.set(se,P),M.set(P,se);var H=j(se,P,x,M);return M.delete(se),M.delete(P),H}}function o(j,J){var se={};for(var P in j)se[P]=j[P];for(var P in J)se[P]=J[P];return se}function u(j){return j.constructor===Object||j.constructor==null}function y(j){return typeof j.then=="function"}function p(j,J){return j===J||j!==j&&J!==J}var C="[object Arguments]",m="[object Boolean]",T="[object Date]",E="[object RegExp]",w="[object Map]",S="[object Number]",I="[object Object]",h="[object Set]",i="[object String]",s=Object.prototype.toString;function f(j){var J=j.areArraysEqual,se=j.areDatesEqual,P=j.areMapsEqual,x=j.areObjectsEqual,M=j.areRegExpsEqual,k=j.areSetsEqual,q=j.createIsNestedEqual,H=q(K);function K(Y,re,de){if(Y===re)return!0;if(!Y||!re||typeof Y!="object"||typeof re!="object")return Y!==Y&&re!==re;if(u(Y)&&u(re))return x(Y,re,H,de);var Le=Array.isArray(Y),Se=Array.isArray(re);if(Le||Se)return Le===Se&&J(Y,re,H,de);var me=s.call(Y);return me!==s.call(re)?!1:me===T?se(Y,re,H,de):me===E?M(Y,re,H,de):me===w?P(Y,re,H,de):me===h?k(Y,re,H,de):me===I||me===C?y(Y)||y(re)?!1:x(Y,re,H,de):me===m||me===S||me===i?p(Y.valueOf(),re.valueOf()):!1}return K}function b(j,J,se,P){var x=j.length;if(J.length!==x)return!1;for(;x-- >0;)if(!se(j[x],J[x],x,x,j,J,P))return!1;return!0}var l=a(b);function g(j,J){return p(j.valueOf(),J.valueOf())}function d(j,J,se,P){var x=j.size===J.size;if(!x)return!1;if(!j.size)return!0;var M={},k=0;return j.forEach(function(q,H){if(x){var K=!1,Y=0;J.forEach(function(re,de){!K&&!M[Y]&&(K=se(H,de,k,Y,j,J,P)&&se(q,re,H,de,j,J,P))&&(M[Y]=!0),Y++}),k++,x=K}}),x}var v=a(d),D="_owner",N=Object.prototype.hasOwnProperty;function U(j,J,se,P){var x=Object.keys(j),M=x.length;if(Object.keys(J).length!==M)return!1;for(var k;M-- >0;){if(k=x[M],k===D){var q=!!j.$$typeof,H=!!J.$$typeof;if((q||H)&&q!==H)return!1}if(!N.call(J,k)||!se(j[k],J[k],k,k,j,J,P))return!1}return!0}var z=a(U);function O(j,J){return j.source===J.source&&j.flags===J.flags}function L(j,J,se,P){var x=j.size===J.size;if(!x)return!1;if(!j.size)return!0;var M={};return j.forEach(function(k,q){if(x){var H=!1,K=0;J.forEach(function(Y,re){!H&&!M[K]&&(H=se(k,Y,q,re,j,J,P))&&(M[K]=!0),K++}),x=H}}),x}var B=a(L),G=Object.freeze({areArraysEqual:b,areDatesEqual:g,areMapsEqual:d,areObjectsEqual:U,areRegExpsEqual:O,areSetsEqual:L,createIsNestedEqual:r}),Q=Object.freeze({areArraysEqual:l,areDatesEqual:g,areMapsEqual:v,areObjectsEqual:z,areRegExpsEqual:O,areSetsEqual:B,createIsNestedEqual:r}),ie=f(G);function ae(j,J){return ie(j,J,void 0)}var ce=f(o(G,{createIsNestedEqual:function(){return p}}));function W(j,J){return ce(j,J,void 0)}var ee=f(Q);function ne(j,J){return ee(j,J,new WeakMap)}var le=f(o(Q,{createIsNestedEqual:function(){return p}}));function fe(j,J){return le(j,J,new WeakMap)}function ve(j){return f(o(G,j(G)))}function Te(j){var J=f(o(Q,j(Q)));return function(se,P,x){return x===void 0&&(x=new WeakMap),J(se,P,x)}}n.circularDeepEqual=ne,n.circularShallowEqual=fe,n.createCustomCircularEqual=Te,n.createCustomEqual=ve,n.deepEqual=ae,n.sameValueZeroEqual=p,n.shallowEqual=W,Object.defineProperty(n,"__esModule",{value:!0})})}(Ke,Ke.exports)),Ke.exports}var mt={exports:{}},Sr;function Zt(){if(Sr)return mt.exports;Sr=1;function t(n){var r,a,o="";if(typeof n=="string"||typeof n=="number")o+=n;else if(typeof n=="object")if(Array.isArray(n)){var u=n.length;for(r=0;r<u;r++)n[r]&&(a=t(n[r]))&&(o&&(o+=" "),o+=a)}else for(a in n)n[a]&&(o&&(o+=" "),o+=a);return o}function e(){for(var n,r,a=0,o="",u=arguments.length;a<u;a++)(n=arguments[a])&&(r=t(n))&&(o&&(o+=" "),o+=r);return o}return mt.exports=e,mt.exports.clsx=e,mt.exports}var oe={},$t,Cr;function Un(){return Cr||(Cr=1,$t=function(e,n,r){return e===n?!0:e.className===n.className&&r(e.style,n.style)&&e.width===n.width&&e.autoSize===n.autoSize&&e.cols===n.cols&&e.draggableCancel===n.draggableCancel&&e.draggableHandle===n.draggableHandle&&r(e.verticalCompact,n.verticalCompact)&&r(e.compactType,n.compactType)&&r(e.layout,n.layout)&&r(e.margin,n.margin)&&r(e.containerPadding,n.containerPadding)&&e.rowHeight===n.rowHeight&&e.maxRows===n.maxRows&&e.isBounded===n.isBounded&&e.isDraggable===n.isDraggable&&e.isResizable===n.isResizable&&e.allowOverlap===n.allowOverlap&&e.preventCollision===n.preventCollision&&e.useCSSTransforms===n.useCSSTransforms&&e.transformScale===n.transformScale&&e.isDroppable===n.isDroppable&&r(e.resizeHandles,n.resizeHandles)&&r(e.resizeHandle,n.resizeHandle)&&e.onLayoutChange===n.onLayoutChange&&e.onDragStart===n.onDragStart&&e.onDrag===n.onDrag&&e.onDragStop===n.onDragStop&&e.onResizeStart===n.onResizeStart&&e.onResize===n.onResize&&e.onResizeStop===n.onResizeStop&&e.onDrop===n.onDrop&&r(e.droppingItem,n.droppingItem)&&r(e.innerRef,n.innerRef)}),$t}var Tr;function ze(){if(Tr)return oe;Tr=1,Object.defineProperty(oe,"__esModule",{value:!0}),oe.bottom=r,oe.childrenEqual=p,oe.cloneLayout=a,oe.cloneLayoutItem=y,oe.collides=m,oe.compact=T,oe.compactItem=S,oe.compactType=j,oe.correctBounds=I,oe.fastPositionEqual=C,oe.fastRGLPropsEqual=void 0,oe.getAllCollisions=s,oe.getFirstCollision=i,oe.getLayoutItem=h,oe.getStatics=f,oe.modifyLayout=o,oe.moveElement=b,oe.moveElementAwayFromCollision=l,oe.noop=void 0,oe.perc=g,oe.resizeItemInDirection=ce,oe.setTopLeft=ee,oe.setTransform=W,oe.sortLayoutItems=ne,oe.sortLayoutItemsByColRow=fe,oe.sortLayoutItemsByRowCol=le,oe.synchronizeLayoutWithChildren=ve,oe.validateLayout=Te,oe.withLayoutItem=u;var t=Kt(),e=n(V);function n(P){return P&&P.__esModule?P:{default:P}}function r(P){let x=0,M;for(let k=0,q=P.length;k<q;k++)M=P[k].y+P[k].h,M>x&&(x=M);return x}function a(P){const x=Array(P.length);for(let M=0,k=P.length;M<k;M++)x[M]=y(P[M]);return x}function o(P,x){const M=Array(P.length);for(let k=0,q=P.length;k<q;k++)x.i===P[k].i?M[k]=x:M[k]=P[k];return M}function u(P,x,M){let k=h(P,x);return k?(k=M(y(k)),P=o(P,k),[P,k]):[P,null]}function y(P){return{w:P.w,h:P.h,x:P.x,y:P.y,i:P.i,minW:P.minW,maxW:P.maxW,minH:P.minH,maxH:P.maxH,moved:!!P.moved,static:!!P.static,isDraggable:P.isDraggable,isResizable:P.isResizable,resizeHandles:P.resizeHandles,isBounded:P.isBounded}}function p(P,x){return(0,t.deepEqual)(e.default.Children.map(P,M=>M==null?void 0:M.key),e.default.Children.map(x,M=>M==null?void 0:M.key))&&(0,t.deepEqual)(e.default.Children.map(P,M=>M==null?void 0:M.props["data-grid"]),e.default.Children.map(x,M=>M==null?void 0:M.props["data-grid"]))}oe.fastRGLPropsEqual=Un();function C(P,x){return P.left===x.left&&P.top===x.top&&P.width===x.width&&P.height===x.height}function m(P,x){return!(P.i===x.i||P.x+P.w<=x.x||P.x>=x.x+x.w||P.y+P.h<=x.y||P.y>=x.y+x.h)}function T(P,x,M,k){const q=f(P),H=ne(P,x),K=Array(P.length);for(let Y=0,re=H.length;Y<re;Y++){let de=y(H[Y]);de.static||(de=S(q,de,x,M,H,k),q.push(de)),K[P.indexOf(H[Y])]=de,de.moved=!1}return K}const E={x:"w",y:"h"};function w(P,x,M,k){const q=E[k];x[k]+=1;const H=P.map(K=>K.i).indexOf(x.i);for(let K=H+1;K<P.length;K++){const Y=P[K];if(!Y.static){if(Y.y>x.y+x.h)break;m(x,Y)&&w(P,Y,M+x[q],k)}}x[k]=M}function S(P,x,M,k,q,H){const K=M==="vertical",Y=M==="horizontal";if(K)for(x.y=Math.min(r(P),x.y);x.y>0&&!i(P,x);)x.y--;else if(Y)for(;x.x>0&&!i(P,x);)x.x--;let re;for(;(re=i(P,x))&&!(M===null&&H);)if(Y?w(q,x,re.x+re.w,"x"):w(q,x,re.y+re.h,"y"),Y&&x.x+x.w>k)for(x.x=k-x.w,x.y++;x.x>0&&!i(P,x);)x.x--;return x.y=Math.max(x.y,0),x.x=Math.max(x.x,0),x}function I(P,x){const M=f(P);for(let k=0,q=P.length;k<q;k++){const H=P[k];if(H.x+H.w>x.cols&&(H.x=x.cols-H.w),H.x<0&&(H.x=0,H.w=x.cols),!H.static)M.push(H);else for(;i(M,H);)H.y++}return P}function h(P,x){for(let M=0,k=P.length;M<k;M++)if(P[M].i===x)return P[M]}function i(P,x){for(let M=0,k=P.length;M<k;M++)if(m(P[M],x))return P[M]}function s(P,x){return P.filter(M=>m(M,x))}function f(P){return P.filter(x=>x.static)}function b(P,x,M,k,q,H,K,Y,re){if(x.static&&x.isDraggable!==!0||x.y===k&&x.x===M)return P;`${x.i}${String(M)}${String(k)}${x.x}${x.y}`;const de=x.x,Le=x.y;typeof M=="number"&&(x.x=M),typeof k=="number"&&(x.y=k),x.moved=!0;let Se=ne(P,K);(K==="vertical"&&typeof k=="number"?Le>=k:K==="horizontal"&&typeof M=="number"?de>=M:!1)&&(Se=Se.reverse());const Fe=s(Se,x),zt=Fe.length>0;if(zt&&re)return a(P);if(zt&&H)return`${x.i}`,x.x=de,x.y=Le,x.moved=!1,P;for(let fr=0,vo=Fe.length;fr<vo;fr++){const Ve=Fe[fr];`${x.i}${x.x}${x.y}${Ve.i}${Ve.x}${Ve.y}`,!Ve.moved&&(Ve.static?P=l(P,Ve,x,q,K):P=l(P,x,Ve,q,K))}return P}function l(P,x,M,k,q,H){const K=q==="horizontal",Y=q==="vertical",re=x.static;if(k){k=!1;const Se={x:K?Math.max(x.x-M.w,0):M.x,y:Y?Math.max(x.y-M.h,0):M.y,w:M.w,h:M.h,i:"-1"},me=i(P,Se),Fe=me&&me.y+me.h>x.y,zt=me&&x.x+x.w>me.x;if(me){if(Fe&&Y)return b(P,M,void 0,x.y+1,k,re,q);if(Fe&&q==null)return x.y=M.y,M.y=M.y+M.h,P;if(zt&&K)return b(P,x,M.x,void 0,k,re,q)}else return`${M.i}${Se.x}${Se.y}`,b(P,M,K?Se.x:void 0,Y?Se.y:void 0,k,re,q)}const de=K?M.x+1:void 0,Le=Y?M.y+1:void 0;return de==null&&Le==null?P:b(P,M,K?M.x+1:void 0,Y?M.y+1:void 0,k,re,q)}function g(P){return P*100+"%"}const d=(P,x,M,k)=>P+M>k?x:M,v=(P,x,M)=>P<0?x:M,D=P=>Math.max(0,P),N=P=>Math.max(0,P),U=(P,x,M)=>{let{left:k,height:q,width:H}=x;const K=P.top-(q-P.height);return{left:k,width:H,height:v(K,P.height,q),top:N(K)}},z=(P,x,M)=>{let{top:k,left:q,height:H,width:K}=x;return{top:k,height:H,width:d(P.left,P.width,K,M),left:D(q)}},O=(P,x,M)=>{let{top:k,height:q,width:H}=x;const K=P.left-(H-P.width);return{height:q,width:K<0?P.width:d(P.left,P.width,H,M),top:N(k),left:D(K)}},L=(P,x,M)=>{let{top:k,left:q,height:H,width:K}=x;return{width:K,left:q,height:v(k,P.height,H),top:N(k)}},ae={n:U,ne:function(){return U(arguments.length<=0?void 0:arguments[0],z(...arguments))},e:z,se:function(){return L(arguments.length<=0?void 0:arguments[0],z(...arguments))},s:L,sw:function(){return L(arguments.length<=0?void 0:arguments[0],O(...arguments))},w:O,nw:function(){return U(arguments.length<=0?void 0:arguments[0],O(...arguments))}};function ce(P,x,M,k){const q=ae[P];return q?q(x,{...x,...M},k):M}function W(P){let{top:x,left:M,width:k,height:q}=P;const H=`translate(${M}px,${x}px)`;return{transform:H,WebkitTransform:H,MozTransform:H,msTransform:H,OTransform:H,width:`${k}px`,height:`${q}px`,position:"absolute"}}function ee(P){let{top:x,left:M,width:k,height:q}=P;return{top:`${x}px`,left:`${M}px`,width:`${k}px`,height:`${q}px`,position:"absolute"}}function ne(P,x){return x==="horizontal"?fe(P):x==="vertical"?le(P):P}function le(P){return P.slice(0).sort(function(x,M){return x.y>M.y||x.y===M.y&&x.x>M.x?1:x.y===M.y&&x.x===M.x?0:-1})}function fe(P){return P.slice(0).sort(function(x,M){return x.x>M.x||x.x===M.x&&x.y>M.y?1:-1})}function ve(P,x,M,k,q){P=P||[];const H=[];e.default.Children.forEach(x,Y=>{if((Y==null?void 0:Y.key)==null)return;const re=h(P,String(Y.key)),de=Y.props["data-grid"];re&&de==null?H.push(y(re)):de?H.push(y({...de,i:Y.key})):H.push(y({w:1,h:1,x:0,y:r(H),i:String(Y.key)}))});const K=I(H,{cols:M});return q?K:T(K,k,M)}function Te(P){let x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Layout";const M=["x","y","w","h"];if(!Array.isArray(P))throw new Error(x+" must be an array!");for(let k=0,q=P.length;k<q;k++){const H=P[k];for(let K=0;K<M.length;K++)if(typeof H[M[K]]!="number")throw new Error("ReactGridLayout: "+x+"["+k+"]."+M[K]+" must be a number!")}}function j(P){const{verticalCompact:x,compactType:M}=P||{};return x===!1?null:M}function J(){}const se=()=>{};return oe.noop=se,oe}var Ie={},wr;function Jt(){if(wr)return Ie;wr=1,Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.calcGridColWidth=t,Ie.calcGridItemPosition=n,Ie.calcGridItemWHPx=e,Ie.calcWH=a,Ie.calcXY=r,Ie.clamp=o;function t(u){const{margin:y,containerPadding:p,containerWidth:C,cols:m}=u;return(C-y[0]*(m-1)-p[0]*2)/m}function e(u,y,p){return Number.isFinite(u)?Math.round(y*u+Math.max(0,u-1)*p):u}function n(u,y,p,C,m,T){const{margin:E,containerPadding:w,rowHeight:S}=u,I=t(u),h={};return T&&T.resizing?(h.width=Math.round(T.resizing.width),h.height=Math.round(T.resizing.height)):(h.width=e(C,I,E[0]),h.height=e(m,S,E[1])),T&&T.dragging?(h.top=Math.round(T.dragging.top),h.left=Math.round(T.dragging.left)):T&&T.resizing&&typeof T.resizing.top=="number"&&typeof T.resizing.left=="number"?(h.top=Math.round(T.resizing.top),h.left=Math.round(T.resizing.left)):(h.top=Math.round((S+E[1])*p+w[1]),h.left=Math.round((I+E[0])*y+w[0])),h}function r(u,y,p,C,m){const{margin:T,cols:E,rowHeight:w,maxRows:S}=u,I=t(u);let h=Math.round((p-T[0])/(I+T[0])),i=Math.round((y-T[1])/(w+T[1]));return h=o(h,0,E-C),i=o(i,0,S-m),{x:h,y:i}}function a(u,y,p,C,m,T){const{margin:E,maxRows:w,cols:S,rowHeight:I}=u,h=t(u);let i=Math.round((y+E[0])/(h+E[0])),s=Math.round((p+E[1])/(I+E[1])),f=o(i,0,S-C),b=o(s,0,w-m);return["sw","w","nw"].indexOf(T)!==-1&&(f=o(i,0,S)),["nw","n","ne"].indexOf(T)!==-1&&(b=o(s,0,w)),{w:f,h:b}}function o(u,y,p){return Math.max(Math.min(u,p),y)}return Ie}var Ze={},Qt={exports:{}},er,Ir;function zn(){if(Ir)return er;Ir=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return er=t,er}var tr,_r;function kn(){if(_r)return tr;_r=1;var t=zn();function e(){}function n(){}return n.resetWarningCache=e,tr=function(){function r(u,y,p,C,m,T){if(T!==t){var E=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw E.name="Invariant Violation",E}}r.isRequired=r;function a(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:a,element:r,elementType:r,instanceOf:a,node:r,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:n,resetWarningCache:e};return o.PropTypes=o,o},tr}var Rr;function Ee(){return Rr||(Rr=1,Qt.exports=kn()()),Qt.exports}var $e={exports:{}},rr={};function Er(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(n=Er(t[e]))&&(r&&(r+=" "),r+=n);else for(e in t)t[e]&&(r&&(r+=" "),r+=e);return r}function Or(){for(var t,e,n=0,r="";n<arguments.length;)(t=arguments[n++])&&(e=Er(t))&&(r&&(r+=" "),r+=e);return r}const An=yr(Object.freeze(Object.defineProperty({__proto__:null,clsx:Or,default:Or},Symbol.toStringTag,{value:"Module"})));var he={},Oe={},Pr;function yt(){if(Pr)return Oe;Pr=1,Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.dontSetMe=a,Oe.findInArray=t,Oe.int=r,Oe.isFunction=e,Oe.isNum=n;function t(o,u){for(let y=0,p=o.length;y<p;y++)if(u.apply(u,[o[y],y,o]))return o[y]}function e(o){return typeof o=="function"||Object.prototype.toString.call(o)==="[object Function]"}function n(o){return typeof o=="number"&&!isNaN(o)}function r(o){return parseInt(o,10)}function a(o,u,y){if(o[u])return new Error("Invalid prop ".concat(u," passed to ").concat(y," - do not set this, set it on the child."))}return Oe}var Pe={},xr;function Wn(){if(xr)return Pe;xr=1,Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.browserPrefixToKey=n,Pe.browserPrefixToStyle=r,Pe.default=void 0,Pe.getPrefix=e;const t=["Moz","Webkit","O","ms"];function e(){var o;let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window>"u")return"";const y=(o=window.document)===null||o===void 0||(o=o.documentElement)===null||o===void 0?void 0:o.style;if(!y||u in y)return"";for(let p=0;p<t.length;p++)if(n(u,t[p])in y)return t[p];return""}function n(o,u){return u?"".concat(u).concat(a(o)):o}function r(o,u){return u?"-".concat(u.toLowerCase(),"-").concat(o):o}function a(o){let u="",y=!0;for(let p=0;p<o.length;p++)y?(u+=o[p].toUpperCase(),y=!1):o[p]==="-"?y=!0:u+=o[p];return u}return Pe.default=e(),Pe}var Dr;function nr(){if(Dr)return he;Dr=1,Object.defineProperty(he,"__esModule",{value:!0}),he.addClassName=l,he.addEvent=y,he.addUserSelectStyles=f,he.createCSSTransform=S,he.createSVGTransform=I,he.getTouch=i,he.getTouchIdentifier=s,he.getTranslation=h,he.innerHeight=T,he.innerWidth=E,he.matchesSelector=o,he.matchesSelectorAndParentsTo=u,he.offsetXYFromParent=w,he.outerHeight=C,he.outerWidth=m,he.removeClassName=g,he.removeEvent=p,he.removeUserSelectStyles=b;var t=yt(),e=r(Wn());function n(d){if(typeof WeakMap!="function")return null;var v=new WeakMap,D=new WeakMap;return(n=function(N){return N?D:v})(d)}function r(d,v){if(d&&d.__esModule)return d;if(d===null||typeof d!="object"&&typeof d!="function")return{default:d};var D=n(v);if(D&&D.has(d))return D.get(d);var N={},U=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var z in d)if(z!=="default"&&Object.prototype.hasOwnProperty.call(d,z)){var O=U?Object.getOwnPropertyDescriptor(d,z):null;O&&(O.get||O.set)?Object.defineProperty(N,z,O):N[z]=d[z]}return N.default=d,D&&D.set(d,N),N}let a="";function o(d,v){return a||(a=(0,t.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(D){return(0,t.isFunction)(d[D])})),(0,t.isFunction)(d[a])?d[a](v):!1}function u(d,v,D){let N=d;do{if(o(N,v))return!0;if(N===D)return!1;N=N.parentNode}while(N);return!1}function y(d,v,D,N){if(!d)return;const U={capture:!0,...N};d.addEventListener?d.addEventListener(v,D,U):d.attachEvent?d.attachEvent("on"+v,D):d["on"+v]=D}function p(d,v,D,N){if(!d)return;const U={capture:!0,...N};d.removeEventListener?d.removeEventListener(v,D,U):d.detachEvent?d.detachEvent("on"+v,D):d["on"+v]=null}function C(d){let v=d.clientHeight;const D=d.ownerDocument.defaultView.getComputedStyle(d);return v+=(0,t.int)(D.borderTopWidth),v+=(0,t.int)(D.borderBottomWidth),v}function m(d){let v=d.clientWidth;const D=d.ownerDocument.defaultView.getComputedStyle(d);return v+=(0,t.int)(D.borderLeftWidth),v+=(0,t.int)(D.borderRightWidth),v}function T(d){let v=d.clientHeight;const D=d.ownerDocument.defaultView.getComputedStyle(d);return v-=(0,t.int)(D.paddingTop),v-=(0,t.int)(D.paddingBottom),v}function E(d){let v=d.clientWidth;const D=d.ownerDocument.defaultView.getComputedStyle(d);return v-=(0,t.int)(D.paddingLeft),v-=(0,t.int)(D.paddingRight),v}function w(d,v,D){const U=v===v.ownerDocument.body?{left:0,top:0}:v.getBoundingClientRect(),z=(d.clientX+v.scrollLeft-U.left)/D,O=(d.clientY+v.scrollTop-U.top)/D;return{x:z,y:O}}function S(d,v){const D=h(d,v,"px");return{[(0,e.browserPrefixToKey)("transform",e.default)]:D}}function I(d,v){return h(d,v,"")}function h(d,v,D){let{x:N,y:U}=d,z="translate(".concat(N).concat(D,",").concat(U).concat(D,")");if(v){const O="".concat(typeof v.x=="string"?v.x:v.x+D),L="".concat(typeof v.y=="string"?v.y:v.y+D);z="translate(".concat(O,", ").concat(L,")")+z}return z}function i(d,v){return d.targetTouches&&(0,t.findInArray)(d.targetTouches,D=>v===D.identifier)||d.changedTouches&&(0,t.findInArray)(d.changedTouches,D=>v===D.identifier)}function s(d){if(d.targetTouches&&d.targetTouches[0])return d.targetTouches[0].identifier;if(d.changedTouches&&d.changedTouches[0])return d.changedTouches[0].identifier}function f(d){if(!d)return;let v=d.getElementById("react-draggable-style-el");v||(v=d.createElement("style"),v.type="text/css",v.id="react-draggable-style-el",v.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
|
|
2
2
|
`,v.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
|
|
3
3
|
`,d.getElementsByTagName("head")[0].appendChild(v)),d.body&&l(d.body,"react-draggable-transparent-selection")}function b(d){if(d)try{if(d.body&&g(d.body,"react-draggable-transparent-selection"),d.selection)d.selection.empty();else{const v=(d.defaultView||window).getSelection();v&&v.type!=="Caret"&&v.removeAllRanges()}}catch{}}function l(d,v){d.classList?d.classList.add(v):d.className.match(new RegExp("(?:^|\\s)".concat(v,"(?!\\S)")))||(d.className+=" ".concat(v))}function g(d,v){d.classList?d.classList.remove(v):d.className=d.className.replace(new RegExp("(?:^|\\s)".concat(v,"(?!\\S)"),"g"),"")}return he}var we={},Mr;function Nr(){if(Mr)return we;Mr=1,Object.defineProperty(we,"__esModule",{value:!0}),we.canDragX=a,we.canDragY=o,we.createCoreData=y,we.createDraggableData=p,we.getBoundPosition=n,we.getControlPosition=u,we.snapToGrid=r;var t=yt(),e=nr();function n(T,E,w){if(!T.props.bounds)return[E,w];let{bounds:S}=T.props;S=typeof S=="string"?S:C(S);const I=m(T);if(typeof S=="string"){const{ownerDocument:h}=I,i=h.defaultView;let s;if(S==="parent"?s=I.parentNode:s=h.querySelector(S),!(s instanceof i.HTMLElement))throw new Error('Bounds selector "'+S+'" could not find an element.');const f=s,b=i.getComputedStyle(I),l=i.getComputedStyle(f);S={left:-I.offsetLeft+(0,t.int)(l.paddingLeft)+(0,t.int)(b.marginLeft),top:-I.offsetTop+(0,t.int)(l.paddingTop)+(0,t.int)(b.marginTop),right:(0,e.innerWidth)(f)-(0,e.outerWidth)(I)-I.offsetLeft+(0,t.int)(l.paddingRight)-(0,t.int)(b.marginRight),bottom:(0,e.innerHeight)(f)-(0,e.outerHeight)(I)-I.offsetTop+(0,t.int)(l.paddingBottom)-(0,t.int)(b.marginBottom)}}return(0,t.isNum)(S.right)&&(E=Math.min(E,S.right)),(0,t.isNum)(S.bottom)&&(w=Math.min(w,S.bottom)),(0,t.isNum)(S.left)&&(E=Math.max(E,S.left)),(0,t.isNum)(S.top)&&(w=Math.max(w,S.top)),[E,w]}function r(T,E,w){const S=Math.round(E/T[0])*T[0],I=Math.round(w/T[1])*T[1];return[S,I]}function a(T){return T.props.axis==="both"||T.props.axis==="x"}function o(T){return T.props.axis==="both"||T.props.axis==="y"}function u(T,E,w){const S=typeof E=="number"?(0,e.getTouch)(T,E):null;if(typeof E=="number"&&!S)return null;const I=m(w),h=w.props.offsetParent||I.offsetParent||I.ownerDocument.body;return(0,e.offsetXYFromParent)(S||T,h,w.props.scale)}function y(T,E,w){const S=!(0,t.isNum)(T.lastX),I=m(T);return S?{node:I,deltaX:0,deltaY:0,lastX:E,lastY:w,x:E,y:w}:{node:I,deltaX:E-T.lastX,deltaY:w-T.lastY,lastX:T.lastX,lastY:T.lastY,x:E,y:w}}function p(T,E){const w=T.props.scale;return{node:E.node,x:T.state.x+E.deltaX/w,y:T.state.y+E.deltaY/w,deltaX:E.deltaX/w,deltaY:E.deltaY/w,lastX:T.state.x,lastY:T.state.y}}function C(T){return{left:T.left,top:T.top,right:T.right,bottom:T.bottom}}function m(T){const E=T.findDOMNode();if(!E)throw new Error("<DraggableCore>: Unmounted during event!");return E}return we}var Je={},bt={},Lr;function Vr(){if(Lr)return bt;Lr=1,Object.defineProperty(bt,"__esModule",{value:!0}),bt.default=t;function t(){}return bt}var Ur;function jn(){if(Ur)return Je;Ur=1,Object.defineProperty(Je,"__esModule",{value:!0}),Je.default=void 0;var t=C(V),e=y(Ee()),n=y(pr),r=nr(),a=Nr(),o=yt(),u=y(Vr());function y(h){return h&&h.__esModule?h:{default:h}}function p(h){if(typeof WeakMap!="function")return null;var i=new WeakMap,s=new WeakMap;return(p=function(f){return f?s:i})(h)}function C(h,i){if(h&&h.__esModule)return h;if(h===null||typeof h!="object"&&typeof h!="function")return{default:h};var s=p(i);if(s&&s.has(h))return s.get(h);var f={},b=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in h)if(l!=="default"&&Object.prototype.hasOwnProperty.call(h,l)){var g=b?Object.getOwnPropertyDescriptor(h,l):null;g&&(g.get||g.set)?Object.defineProperty(f,l,g):f[l]=h[l]}return f.default=h,s&&s.set(h,f),f}function m(h,i,s){return i=T(i),i in h?Object.defineProperty(h,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):h[i]=s,h}function T(h){var i=E(h,"string");return typeof i=="symbol"?i:String(i)}function E(h,i){if(typeof h!="object"||h===null)return h;var s=h[Symbol.toPrimitive];if(s!==void 0){var f=s.call(h,i);if(typeof f!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(h)}const w={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let S=w.mouse,I=class extends t.Component{constructor(){super(...arguments),m(this,"dragging",!1),m(this,"lastX",NaN),m(this,"lastY",NaN),m(this,"touchIdentifier",null),m(this,"mounted",!1),m(this,"handleDragStart",i=>{if(this.props.onMouseDown(i),!this.props.allowAnyClick&&typeof i.button=="number"&&i.button!==0)return!1;const s=this.findDOMNode();if(!s||!s.ownerDocument||!s.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:f}=s;if(this.props.disabled||!(i.target instanceof f.defaultView.Node)||this.props.handle&&!(0,r.matchesSelectorAndParentsTo)(i.target,this.props.handle,s)||this.props.cancel&&(0,r.matchesSelectorAndParentsTo)(i.target,this.props.cancel,s))return;i.type==="touchstart"&&i.preventDefault();const b=(0,r.getTouchIdentifier)(i);this.touchIdentifier=b;const l=(0,a.getControlPosition)(i,b,this);if(l==null)return;const{x:g,y:d}=l,v=(0,a.createCoreData)(this,g,d);(0,u.default)("DraggableCore: handleDragStart: %j",v),(0,u.default)("calling",this.props.onStart),!(this.props.onStart(i,v)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,r.addUserSelectStyles)(f),this.dragging=!0,this.lastX=g,this.lastY=d,(0,r.addEvent)(f,S.move,this.handleDrag),(0,r.addEvent)(f,S.stop,this.handleDragStop))}),m(this,"handleDrag",i=>{const s=(0,a.getControlPosition)(i,this.touchIdentifier,this);if(s==null)return;let{x:f,y:b}=s;if(Array.isArray(this.props.grid)){let d=f-this.lastX,v=b-this.lastY;if([d,v]=(0,a.snapToGrid)(this.props.grid,d,v),!d&&!v)return;f=this.lastX+d,b=this.lastY+v}const l=(0,a.createCoreData)(this,f,b);if((0,u.default)("DraggableCore: handleDrag: %j",l),this.props.onDrag(i,l)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const v=document.createEvent("MouseEvents");v.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(v)}return}this.lastX=f,this.lastY=b}),m(this,"handleDragStop",i=>{if(!this.dragging)return;const s=(0,a.getControlPosition)(i,this.touchIdentifier,this);if(s==null)return;let{x:f,y:b}=s;if(Array.isArray(this.props.grid)){let v=f-this.lastX||0,D=b-this.lastY||0;[v,D]=(0,a.snapToGrid)(this.props.grid,v,D),f=this.lastX+v,b=this.lastY+D}const l=(0,a.createCoreData)(this,f,b);if(this.props.onStop(i,l)===!1||this.mounted===!1)return!1;const d=this.findDOMNode();d&&this.props.enableUserSelectHack&&(0,r.removeUserSelectStyles)(d.ownerDocument),(0,u.default)("DraggableCore: handleDragStop: %j",l),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,d&&((0,u.default)("DraggableCore: Removing handlers"),(0,r.removeEvent)(d.ownerDocument,S.move,this.handleDrag),(0,r.removeEvent)(d.ownerDocument,S.stop,this.handleDragStop))}),m(this,"onMouseDown",i=>(S=w.mouse,this.handleDragStart(i))),m(this,"onMouseUp",i=>(S=w.mouse,this.handleDragStop(i))),m(this,"onTouchStart",i=>(S=w.touch,this.handleDragStart(i))),m(this,"onTouchEnd",i=>(S=w.touch,this.handleDragStop(i)))}componentDidMount(){this.mounted=!0;const i=this.findDOMNode();i&&(0,r.addEvent)(i,w.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const i=this.findDOMNode();if(i){const{ownerDocument:s}=i;(0,r.removeEvent)(s,w.mouse.move,this.handleDrag),(0,r.removeEvent)(s,w.touch.move,this.handleDrag),(0,r.removeEvent)(s,w.mouse.stop,this.handleDragStop),(0,r.removeEvent)(s,w.touch.stop,this.handleDragStop),(0,r.removeEvent)(i,w.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,r.removeUserSelectStyles)(s)}}findDOMNode(){var i,s;return(i=this.props)!==null&&i!==void 0&&i.nodeRef?(s=this.props)===null||s===void 0||(s=s.nodeRef)===null||s===void 0?void 0:s.current:n.default.findDOMNode(this)}render(){return t.cloneElement(t.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};return Je.default=I,m(I,"displayName","DraggableCore"),m(I,"propTypes",{allowAnyClick:e.default.bool,children:e.default.node.isRequired,disabled:e.default.bool,enableUserSelectHack:e.default.bool,offsetParent:function(h,i){if(h[i]&&h[i].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:e.default.arrayOf(e.default.number),handle:e.default.string,cancel:e.default.string,nodeRef:e.default.object,onStart:e.default.func,onDrag:e.default.func,onStop:e.default.func,onMouseDown:e.default.func,scale:e.default.number,className:o.dontSetMe,style:o.dontSetMe,transform:o.dontSetMe}),m(I,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),Je}var zr;function Hn(){return zr||(zr=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DraggableCore",{enumerable:!0,get:function(){return p.default}}),t.default=void 0;var e=E(V),n=m(Ee()),r=m(pr),a=m(An),o=nr(),u=Nr(),y=yt(),p=m(jn()),C=m(Vr());function m(s){return s&&s.__esModule?s:{default:s}}function T(s){if(typeof WeakMap!="function")return null;var f=new WeakMap,b=new WeakMap;return(T=function(l){return l?b:f})(s)}function E(s,f){if(s&&s.__esModule)return s;if(s===null||typeof s!="object"&&typeof s!="function")return{default:s};var b=T(f);if(b&&b.has(s))return b.get(s);var l={},g=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var d in s)if(d!=="default"&&Object.prototype.hasOwnProperty.call(s,d)){var v=g?Object.getOwnPropertyDescriptor(s,d):null;v&&(v.get||v.set)?Object.defineProperty(l,d,v):l[d]=s[d]}return l.default=s,b&&b.set(s,l),l}function w(){return w=Object.assign?Object.assign.bind():function(s){for(var f=1;f<arguments.length;f++){var b=arguments[f];for(var l in b)Object.prototype.hasOwnProperty.call(b,l)&&(s[l]=b[l])}return s},w.apply(this,arguments)}function S(s,f,b){return f=I(f),f in s?Object.defineProperty(s,f,{value:b,enumerable:!0,configurable:!0,writable:!0}):s[f]=b,s}function I(s){var f=h(s,"string");return typeof f=="symbol"?f:String(f)}function h(s,f){if(typeof s!="object"||s===null)return s;var b=s[Symbol.toPrimitive];if(b!==void 0){var l=b.call(s,f);if(typeof l!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(f==="string"?String:Number)(s)}class i extends e.Component{static getDerivedStateFromProps(f,b){let{position:l}=f,{prevPropsPosition:g}=b;return l&&(!g||l.x!==g.x||l.y!==g.y)?((0,C.default)("Draggable: getDerivedStateFromProps %j",{position:l,prevPropsPosition:g}),{x:l.x,y:l.y,prevPropsPosition:{...l}}):null}constructor(f){super(f),S(this,"onDragStart",(b,l)=>{if((0,C.default)("Draggable: onDragStart: %j",l),this.props.onStart(b,(0,u.createDraggableData)(this,l))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),S(this,"onDrag",(b,l)=>{if(!this.state.dragging)return!1;(0,C.default)("Draggable: onDrag: %j",l);const g=(0,u.createDraggableData)(this,l),d={x:g.x,y:g.y,slackX:0,slackY:0};if(this.props.bounds){const{x:D,y:N}=d;d.x+=this.state.slackX,d.y+=this.state.slackY;const[U,z]=(0,u.getBoundPosition)(this,d.x,d.y);d.x=U,d.y=z,d.slackX=this.state.slackX+(D-d.x),d.slackY=this.state.slackY+(N-d.y),g.x=d.x,g.y=d.y,g.deltaX=d.x-this.state.x,g.deltaY=d.y-this.state.y}if(this.props.onDrag(b,g)===!1)return!1;this.setState(d)}),S(this,"onDragStop",(b,l)=>{if(!this.state.dragging||this.props.onStop(b,(0,u.createDraggableData)(this,l))===!1)return!1;(0,C.default)("Draggable: onDragStop: %j",l);const d={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:D,y:N}=this.props.position;d.x=D,d.y=N}this.setState(d)}),this.state={dragging:!1,dragged:!1,x:f.position?f.position.x:f.defaultPosition.x,y:f.position?f.position.y:f.defaultPosition.y,prevPropsPosition:{...f.position},slackX:0,slackY:0,isElementSVG:!1},f.position&&!(f.onDrag||f.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var f,b;return(f=(b=this.props)===null||b===void 0||(b=b.nodeRef)===null||b===void 0?void 0:b.current)!==null&&f!==void 0?f:r.default.findDOMNode(this)}render(){const{axis:f,bounds:b,children:l,defaultPosition:g,defaultClassName:d,defaultClassNameDragging:v,defaultClassNameDragged:D,position:N,positionOffset:U,scale:z,...O}=this.props;let L={},B=null;const Q=!!!N||this.state.dragging,ie=N||g,ae={x:(0,u.canDragX)(this)&&Q?this.state.x:ie.x,y:(0,u.canDragY)(this)&&Q?this.state.y:ie.y};this.state.isElementSVG?B=(0,o.createSVGTransform)(ae,U):L=(0,o.createCSSTransform)(ae,U);const ce=(0,a.default)(l.props.className||"",d,{[v]:this.state.dragging,[D]:this.state.dragged});return e.createElement(p.default,w({},O,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),e.cloneElement(e.Children.only(l),{className:ce,style:{...l.props.style,...L},transform:B}))}}t.default=i,S(i,"displayName","Draggable"),S(i,"propTypes",{...p.default.propTypes,axis:n.default.oneOf(["both","x","y","none"]),bounds:n.default.oneOfType([n.default.shape({left:n.default.number,right:n.default.number,top:n.default.number,bottom:n.default.number}),n.default.string,n.default.oneOf([!1])]),defaultClassName:n.default.string,defaultClassNameDragging:n.default.string,defaultClassNameDragged:n.default.string,defaultPosition:n.default.shape({x:n.default.number,y:n.default.number}),positionOffset:n.default.shape({x:n.default.oneOfType([n.default.number,n.default.string]),y:n.default.oneOfType([n.default.number,n.default.string])}),position:n.default.shape({x:n.default.number,y:n.default.number}),className:y.dontSetMe,style:y.dontSetMe,transform:y.dontSetMe}),S(i,"defaultProps",{...p.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(rr)),rr}var kr;function ar(){if(kr)return $e.exports;kr=1;const{default:t,DraggableCore:e}=Hn();return $e.exports=t,$e.exports.default=t,$e.exports.DraggableCore=e,$e.exports}var Qe={exports:{}},et={},St={},Ar;function Bn(){if(Ar)return St;Ar=1,St.__esModule=!0,St.cloneElement=y;var t=e(V);function e(p){return p&&p.__esModule?p:{default:p}}function n(p,C){var m=Object.keys(p);if(Object.getOwnPropertySymbols){var T=Object.getOwnPropertySymbols(p);C&&(T=T.filter(function(E){return Object.getOwnPropertyDescriptor(p,E).enumerable})),m.push.apply(m,T)}return m}function r(p){for(var C=1;C<arguments.length;C++){var m=arguments[C]!=null?arguments[C]:{};C%2?n(Object(m),!0).forEach(function(T){a(p,T,m[T])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(m)):n(Object(m)).forEach(function(T){Object.defineProperty(p,T,Object.getOwnPropertyDescriptor(m,T))})}return p}function a(p,C,m){return C=o(C),C in p?Object.defineProperty(p,C,{value:m,enumerable:!0,configurable:!0,writable:!0}):p[C]=m,p}function o(p){var C=u(p,"string");return typeof C=="symbol"?C:String(C)}function u(p,C){if(typeof p!="object"||p===null)return p;var m=p[Symbol.toPrimitive];if(m!==void 0){var T=m.call(p,C);if(typeof T!="object")return T;throw new TypeError("@@toPrimitive must return a primitive value.")}return(C==="string"?String:Number)(p)}function y(p,C){return C.style&&p.props.style&&(C.style=r(r({},p.props.style),C.style)),C.className&&p.props.className&&(C.className=p.props.className+" "+C.className),t.default.cloneElement(p,C)}return St}var tt={},Wr;function jr(){if(Wr)return tt;Wr=1,tt.__esModule=!0,tt.resizableProps=void 0;var t=e(Ee());ar();function e(r){return r&&r.__esModule?r:{default:r}}var n={axis:t.default.oneOf(["both","x","y","none"]),className:t.default.string,children:t.default.element.isRequired,draggableOpts:t.default.shape({allowAnyClick:t.default.bool,cancel:t.default.string,children:t.default.node,disabled:t.default.bool,enableUserSelectHack:t.default.bool,offsetParent:t.default.node,grid:t.default.arrayOf(t.default.number),handle:t.default.string,nodeRef:t.default.object,onStart:t.default.func,onDrag:t.default.func,onStop:t.default.func,onMouseDown:t.default.func,scale:t.default.number}),height:function(){for(var a=arguments.length,o=new Array(a),u=0;u<a;u++)o[u]=arguments[u];var y=o[0];if(y.axis==="both"||y.axis==="y"){var p;return(p=t.default.number).isRequired.apply(p,o)}return t.default.number.apply(t.default,o)},handle:t.default.oneOfType([t.default.node,t.default.func]),handleSize:t.default.arrayOf(t.default.number),lockAspectRatio:t.default.bool,maxConstraints:t.default.arrayOf(t.default.number),minConstraints:t.default.arrayOf(t.default.number),onResizeStop:t.default.func,onResizeStart:t.default.func,onResize:t.default.func,resizeHandles:t.default.arrayOf(t.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:t.default.number,width:function(){for(var a=arguments.length,o=new Array(a),u=0;u<a;u++)o[u]=arguments[u];var y=o[0];if(y.axis==="both"||y.axis==="x"){var p;return(p=t.default.number).isRequired.apply(p,o)}return t.default.number.apply(t.default,o)}};return tt.resizableProps=n,tt}var Hr;function Br(){if(Hr)return et;Hr=1,et.__esModule=!0,et.default=void 0;var t=u(V),e=ar(),n=Bn(),r=jr(),a=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function o(i){if(typeof WeakMap!="function")return null;var s=new WeakMap,f=new WeakMap;return(o=function(l){return l?f:s})(i)}function u(i,s){if(i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var f=o(s);if(f&&f.has(i))return f.get(i);var b={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var g in i)if(g!=="default"&&Object.prototype.hasOwnProperty.call(i,g)){var d=l?Object.getOwnPropertyDescriptor(i,g):null;d&&(d.get||d.set)?Object.defineProperty(b,g,d):b[g]=i[g]}return b.default=i,f&&f.set(i,b),b}function y(){return y=Object.assign?Object.assign.bind():function(i){for(var s=1;s<arguments.length;s++){var f=arguments[s];for(var b in f)Object.prototype.hasOwnProperty.call(f,b)&&(i[b]=f[b])}return i},y.apply(this,arguments)}function p(i,s){if(i==null)return{};var f={},b=Object.keys(i),l,g;for(g=0;g<b.length;g++)l=b[g],!(s.indexOf(l)>=0)&&(f[l]=i[l]);return f}function C(i,s){var f=Object.keys(i);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(i);s&&(b=b.filter(function(l){return Object.getOwnPropertyDescriptor(i,l).enumerable})),f.push.apply(f,b)}return f}function m(i){for(var s=1;s<arguments.length;s++){var f=arguments[s]!=null?arguments[s]:{};s%2?C(Object(f),!0).forEach(function(b){T(i,b,f[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(f)):C(Object(f)).forEach(function(b){Object.defineProperty(i,b,Object.getOwnPropertyDescriptor(f,b))})}return i}function T(i,s,f){return s=E(s),s in i?Object.defineProperty(i,s,{value:f,enumerable:!0,configurable:!0,writable:!0}):i[s]=f,i}function E(i){var s=w(i,"string");return typeof s=="symbol"?s:String(s)}function w(i,s){if(typeof i!="object"||i===null)return i;var f=i[Symbol.toPrimitive];if(f!==void 0){var b=f.call(i,s);if(typeof b!="object")return b;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(i)}function S(i,s){i.prototype=Object.create(s.prototype),i.prototype.constructor=i,I(i,s)}function I(i,s){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(b,l){return b.__proto__=l,b},I(i,s)}var h=function(i){S(s,i);function s(){for(var b,l=arguments.length,g=new Array(l),d=0;d<l;d++)g[d]=arguments[d];return b=i.call.apply(i,[this].concat(g))||this,b.handleRefs={},b.lastHandleRect=null,b.slack=null,b}var f=s.prototype;return f.componentWillUnmount=function(){this.resetData()},f.resetData=function(){this.lastHandleRect=this.slack=null},f.runConstraints=function(l,g){var d=this.props,v=d.minConstraints,D=d.maxConstraints,N=d.lockAspectRatio;if(!v&&!D&&!N)return[l,g];if(N){var U=this.props.width/this.props.height,z=l-this.props.width,O=g-this.props.height;Math.abs(z)>Math.abs(O*U)?g=l/U:l=g*U}var L=l,B=g,G=this.slack||[0,0],Q=G[0],ie=G[1];return l+=Q,g+=ie,v&&(l=Math.max(v[0],l),g=Math.max(v[1],g)),D&&(l=Math.min(D[0],l),g=Math.min(D[1],g)),this.slack=[Q+(L-l),ie+(B-g)],[l,g]},f.resizeHandler=function(l,g){var d=this;return function(v,D){var N=D.node,U=D.deltaX,z=D.deltaY;l==="onResizeStart"&&d.resetData();var O=(d.props.axis==="both"||d.props.axis==="x")&&g!=="n"&&g!=="s",L=(d.props.axis==="both"||d.props.axis==="y")&&g!=="e"&&g!=="w";if(!(!O&&!L)){var B=g[0],G=g[g.length-1],Q=N.getBoundingClientRect();if(d.lastHandleRect!=null){if(G==="w"){var ie=Q.left-d.lastHandleRect.left;U+=ie}if(B==="n"){var ae=Q.top-d.lastHandleRect.top;z+=ae}}d.lastHandleRect=Q,G==="w"&&(U=-U),B==="n"&&(z=-z);var ce=d.props.width+(O?U/d.props.transformScale:0),W=d.props.height+(L?z/d.props.transformScale:0),ee=d.runConstraints(ce,W);ce=ee[0],W=ee[1];var ne=ce!==d.props.width||W!==d.props.height,le=typeof d.props[l]=="function"?d.props[l]:null,fe=l==="onResize"&&!ne;le&&!fe&&(v.persist==null||v.persist(),le(v,{node:N,size:{width:ce,height:W},handle:g})),l==="onResizeStop"&&d.resetData()}}},f.renderResizeHandle=function(l,g){var d=this.props.handle;if(!d)return t.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+l,ref:g});if(typeof d=="function")return d(l,g);var v=typeof d.type=="string",D=m({ref:g},v?{}:{handleAxis:l});return t.cloneElement(d,D)},f.render=function(){var l=this,g=this.props,d=g.children,v=g.className,D=g.draggableOpts;g.width,g.height,g.handle,g.handleSize,g.lockAspectRatio,g.axis,g.minConstraints,g.maxConstraints,g.onResize,g.onResizeStop,g.onResizeStart;var N=g.resizeHandles;g.transformScale;var U=p(g,a);return(0,n.cloneElement)(d,m(m({},U),{},{className:(v?v+" ":"")+"react-resizable",children:[].concat(d.props.children,N.map(function(z){var O,L=(O=l.handleRefs[z])!=null?O:l.handleRefs[z]=t.createRef();return t.createElement(e.DraggableCore,y({},D,{nodeRef:L,key:"resizableHandle-"+z,onStop:l.resizeHandler("onResizeStop",z),onStart:l.resizeHandler("onResizeStart",z),onDrag:l.resizeHandler("onResize",z)}),l.renderResizeHandle(z,L))}))}))},s}(t.Component);return et.default=h,h.propTypes=r.resizableProps,h.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1},et}var rt={},Fr;function Fn(){if(Fr)return rt;Fr=1,rt.__esModule=!0,rt.default=void 0;var t=y(V),e=o(Ee()),n=o(Br()),r=jr(),a=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function o(s){return s&&s.__esModule?s:{default:s}}function u(s){if(typeof WeakMap!="function")return null;var f=new WeakMap,b=new WeakMap;return(u=function(g){return g?b:f})(s)}function y(s,f){if(s&&s.__esModule)return s;if(s===null||typeof s!="object"&&typeof s!="function")return{default:s};var b=u(f);if(b&&b.has(s))return b.get(s);var l={},g=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var d in s)if(d!=="default"&&Object.prototype.hasOwnProperty.call(s,d)){var v=g?Object.getOwnPropertyDescriptor(s,d):null;v&&(v.get||v.set)?Object.defineProperty(l,d,v):l[d]=s[d]}return l.default=s,b&&b.set(s,l),l}function p(){return p=Object.assign?Object.assign.bind():function(s){for(var f=1;f<arguments.length;f++){var b=arguments[f];for(var l in b)Object.prototype.hasOwnProperty.call(b,l)&&(s[l]=b[l])}return s},p.apply(this,arguments)}function C(s,f){var b=Object.keys(s);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(s);f&&(l=l.filter(function(g){return Object.getOwnPropertyDescriptor(s,g).enumerable})),b.push.apply(b,l)}return b}function m(s){for(var f=1;f<arguments.length;f++){var b=arguments[f]!=null?arguments[f]:{};f%2?C(Object(b),!0).forEach(function(l){T(s,l,b[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(b)):C(Object(b)).forEach(function(l){Object.defineProperty(s,l,Object.getOwnPropertyDescriptor(b,l))})}return s}function T(s,f,b){return f=E(f),f in s?Object.defineProperty(s,f,{value:b,enumerable:!0,configurable:!0,writable:!0}):s[f]=b,s}function E(s){var f=w(s,"string");return typeof f=="symbol"?f:String(f)}function w(s,f){if(typeof s!="object"||s===null)return s;var b=s[Symbol.toPrimitive];if(b!==void 0){var l=b.call(s,f);if(typeof l!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(f==="string"?String:Number)(s)}function S(s,f){if(s==null)return{};var b={},l=Object.keys(s),g,d;for(d=0;d<l.length;d++)g=l[d],!(f.indexOf(g)>=0)&&(b[g]=s[g]);return b}function I(s,f){s.prototype=Object.create(f.prototype),s.prototype.constructor=s,h(s,f)}function h(s,f){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,g){return l.__proto__=g,l},h(s,f)}var i=function(s){I(f,s);function f(){for(var l,g=arguments.length,d=new Array(g),v=0;v<g;v++)d[v]=arguments[v];return l=s.call.apply(s,[this].concat(d))||this,l.state={width:l.props.width,height:l.props.height,propsWidth:l.props.width,propsHeight:l.props.height},l.onResize=function(D,N){var U=N.size;l.props.onResize?(D.persist==null||D.persist(),l.setState(U,function(){return l.props.onResize&&l.props.onResize(D,N)})):l.setState(U)},l}f.getDerivedStateFromProps=function(g,d){return d.propsWidth!==g.width||d.propsHeight!==g.height?{width:g.width,height:g.height,propsWidth:g.width,propsHeight:g.height}:null};var b=f.prototype;return b.render=function(){var g=this.props,d=g.handle,v=g.handleSize;g.onResize;var D=g.onResizeStart,N=g.onResizeStop,U=g.draggableOpts,z=g.minConstraints,O=g.maxConstraints,L=g.lockAspectRatio,B=g.axis;g.width,g.height;var G=g.resizeHandles,Q=g.style,ie=g.transformScale,ae=S(g,a);return t.createElement(n.default,{axis:B,draggableOpts:U,handle:d,handleSize:v,height:this.state.height,lockAspectRatio:L,maxConstraints:O,minConstraints:z,onResizeStart:D,onResize:this.onResize,onResizeStop:N,resizeHandles:G,transformScale:ie,width:this.state.width},t.createElement("div",p({},ae,{style:m(m({},Q),{},{width:this.state.width+"px",height:this.state.height+"px"})})))},f}(t.Component);return rt.default=i,i.propTypes=m(m({},r.resizableProps),{},{children:e.default.element}),rt}var Gr;function Gn(){return Gr||(Gr=1,Qe.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},Qe.exports.Resizable=Br().default,Qe.exports.ResizableBox=Fn().default),Qe.exports}var _e={},qr;function Xr(){if(qr)return _e;qr=1,Object.defineProperty(_e,"__esModule",{value:!0}),_e.resizeHandleType=_e.resizeHandleAxesType=_e.default=void 0;var t=n(Ee()),e=n(V);function n(o){return o&&o.__esModule?o:{default:o}}const r=_e.resizeHandleAxesType=t.default.arrayOf(t.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),a=_e.resizeHandleType=t.default.oneOfType([t.default.node,t.default.func]);return _e.default={className:t.default.string,style:t.default.object,width:t.default.number,autoSize:t.default.bool,cols:t.default.number,draggableCancel:t.default.string,draggableHandle:t.default.string,verticalCompact:function(o){o.verticalCompact},compactType:t.default.oneOf(["vertical","horizontal"]),layout:function(o){var u=o.layout;u!==void 0&&ze().validateLayout(u,"layout")},margin:t.default.arrayOf(t.default.number),containerPadding:t.default.arrayOf(t.default.number),rowHeight:t.default.number,maxRows:t.default.number,isBounded:t.default.bool,isDraggable:t.default.bool,isResizable:t.default.bool,allowOverlap:t.default.bool,preventCollision:t.default.bool,useCSSTransforms:t.default.bool,transformScale:t.default.number,isDroppable:t.default.bool,resizeHandles:r,resizeHandle:a,onLayoutChange:t.default.func,onDragStart:t.default.func,onDrag:t.default.func,onDragStop:t.default.func,onResizeStart:t.default.func,onResize:t.default.func,onResizeStop:t.default.func,onDrop:t.default.func,droppingItem:t.default.shape({i:t.default.string.isRequired,w:t.default.number.isRequired,h:t.default.number.isRequired}),children:function(o,u){const y=o[u],p={};e.default.Children.forEach(y,function(C){if((C==null?void 0:C.key)!=null){if(p[C.key])throw new Error('Duplicate child key "'+C.key+'" found! This will cause problems in ReactGridLayout.');p[C.key]=!0}})},innerRef:t.default.any},_e}var Yr;function qn(){if(Yr)return Ze;Yr=1,Object.defineProperty(Ze,"__esModule",{value:!0}),Ze.default=void 0;var t=p(V),e=p(Ee()),n=ar(),r=Gn(),a=ze(),o=Jt(),u=Xr(),y=p(Zt());function p(w){return w&&w.__esModule?w:{default:w}}function C(w,S,I){return S=m(S),S in w?Object.defineProperty(w,S,{value:I,enumerable:!0,configurable:!0,writable:!0}):w[S]=I,w}function m(w){var S=T(w,"string");return typeof S=="symbol"?S:String(S)}function T(w,S){if(typeof w!="object"||w===null)return w;var I=w[Symbol.toPrimitive];if(I!==void 0){var h=I.call(w,S);if(typeof h!="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}return(S==="string"?String:Number)(w)}let E=class extends t.default.Component{constructor(){super(...arguments),C(this,"state",{resizing:null,dragging:null,className:""}),C(this,"elementRef",t.default.createRef()),C(this,"onDragStart",(S,I)=>{let{node:h}=I;const{onDragStart:i,transformScale:s}=this.props;if(!i)return;const f={top:0,left:0},{offsetParent:b}=h;if(!b)return;const l=b.getBoundingClientRect(),g=h.getBoundingClientRect(),d=g.left/s,v=l.left/s,D=g.top/s,N=l.top/s;f.left=d-v+b.scrollLeft,f.top=D-N+b.scrollTop,this.setState({dragging:f});const{x:U,y:z}=(0,o.calcXY)(this.getPositionParams(),f.top,f.left,this.props.w,this.props.h);return i.call(this,this.props.i,U,z,{e:S,node:h,newPosition:f})}),C(this,"onDrag",(S,I)=>{let{node:h,deltaX:i,deltaY:s}=I;const{onDrag:f}=this.props;if(!f)return;if(!this.state.dragging)throw new Error("onDrag called before onDragStart.");let b=this.state.dragging.top+s,l=this.state.dragging.left+i;const{isBounded:g,i:d,w:v,h:D,containerWidth:N}=this.props,U=this.getPositionParams();if(g){const{offsetParent:G}=h;if(G){const{margin:Q,rowHeight:ie,containerPadding:ae}=this.props,ce=G.clientHeight-(0,o.calcGridItemWHPx)(D,ie,Q[1]);b=(0,o.clamp)(b-ae[1],0,ce);const W=(0,o.calcGridColWidth)(U),ee=N-(0,o.calcGridItemWHPx)(v,W,Q[0]);l=(0,o.clamp)(l-ae[0],0,ee)}}const z={top:b,left:l};this.setState({dragging:z});const{containerPadding:O}=this.props,{x:L,y:B}=(0,o.calcXY)(U,b-O[1],l-O[0],v,D);return f.call(this,d,L,B,{e:S,node:h,newPosition:z})}),C(this,"onDragStop",(S,I)=>{let{node:h}=I;const{onDragStop:i}=this.props;if(!i)return;if(!this.state.dragging)throw new Error("onDragEnd called before onDragStart.");const{w:s,h:f,i:b,containerPadding:l}=this.props,{left:g,top:d}=this.state.dragging,v={top:d,left:g};this.setState({dragging:null});const{x:D,y:N}=(0,o.calcXY)(this.getPositionParams(),d-l[1],g-l[0],s,f);return i.call(this,b,D,N,{e:S,node:h,newPosition:v})}),C(this,"onResizeStop",(S,I,h)=>this.onResizeHandler(S,I,h,"onResizeStop")),C(this,"onResizeStart",(S,I,h)=>this.onResizeHandler(S,I,h,"onResizeStart")),C(this,"onResize",(S,I,h)=>this.onResizeHandler(S,I,h,"onResize"))}shouldComponentUpdate(S,I){if(this.props.children!==S.children||this.props.droppingPosition!==S.droppingPosition)return!0;const h=(0,o.calcGridItemPosition)(this.getPositionParams(this.props),this.props.x,this.props.y,this.props.w,this.props.h,this.state),i=(0,o.calcGridItemPosition)(this.getPositionParams(S),S.x,S.y,S.w,S.h,I);return!(0,a.fastPositionEqual)(h,i)||this.props.useCSSTransforms!==S.useCSSTransforms}componentDidMount(){this.moveDroppingItem({})}componentDidUpdate(S){this.moveDroppingItem(S)}moveDroppingItem(S){const{droppingPosition:I}=this.props;if(!I)return;const h=this.elementRef.current;if(!h)return;const i=S.droppingPosition||{left:0,top:0},{dragging:s}=this.state,f=s&&I.left!==i.left||I.top!==i.top;if(!s)this.onDragStart(I.e,{node:h,deltaX:I.left,deltaY:I.top});else if(f){const b=I.left-s.left,l=I.top-s.top;this.onDrag(I.e,{node:h,deltaX:b,deltaY:l})}}getPositionParams(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props;return{cols:S.cols,containerPadding:S.containerPadding,containerWidth:S.containerWidth,margin:S.margin,maxRows:S.maxRows,rowHeight:S.rowHeight}}createStyle(S){const{usePercentages:I,containerWidth:h,useCSSTransforms:i}=this.props;let s;return i?s=(0,a.setTransform)(S):(s=(0,a.setTopLeft)(S),I&&(s.left=(0,a.perc)(S.left/h),s.width=(0,a.perc)(S.width/h))),s}mixinDraggable(S,I){return t.default.createElement(n.DraggableCore,{disabled:!I,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,handle:this.props.handle,cancel:".react-resizable-handle"+(this.props.cancel?","+this.props.cancel:""),scale:this.props.transformScale,nodeRef:this.elementRef},S)}curryResizeHandler(S,I){return(h,i)=>I(h,i,S)}mixinResizable(S,I,h){const{cols:i,minW:s,minH:f,maxW:b,maxH:l,transformScale:g,resizeHandles:d,resizeHandle:v}=this.props,D=this.getPositionParams(),N=(0,o.calcGridItemPosition)(D,0,0,i,0).width,U=(0,o.calcGridItemPosition)(D,0,0,s,f),z=(0,o.calcGridItemPosition)(D,0,0,b,l),O=[U.width,U.height],L=[Math.min(z.width,N),Math.min(z.height,1/0)];return t.default.createElement(r.Resizable,{draggableOpts:{disabled:!h},className:h?void 0:"react-resizable-hide",width:I.width,height:I.height,minConstraints:O,maxConstraints:L,onResizeStop:this.curryResizeHandler(I,this.onResizeStop),onResizeStart:this.curryResizeHandler(I,this.onResizeStart),onResize:this.curryResizeHandler(I,this.onResize),transformScale:g,resizeHandles:d,handle:v},S)}onResizeHandler(S,I,h,i){let{node:s,size:f,handle:b}=I;const l=this.props[i];if(!l)return;const{x:g,y:d,i:v,maxH:D,minH:N,containerWidth:U}=this.props,{minW:z,maxW:O}=this.props;let L=f;s&&(L=(0,a.resizeItemInDirection)(b,h,f,U),this.setState({resizing:i==="onResizeStop"?null:L}));let{w:B,h:G}=(0,o.calcWH)(this.getPositionParams(),L.width,L.height,g,d,b);B=(0,o.clamp)(B,Math.max(z,1),O),G=(0,o.clamp)(G,N,D),l.call(this,v,B,G,{e:S,node:s,size:L,handle:b})}render(){const{x:S,y:I,w:h,h:i,isDraggable:s,isResizable:f,droppingPosition:b,useCSSTransforms:l}=this.props,g=(0,o.calcGridItemPosition)(this.getPositionParams(),S,I,h,i,this.state),d=t.default.Children.only(this.props.children);let v=t.default.cloneElement(d,{ref:this.elementRef,className:(0,y.default)("react-grid-item",d.props.className,this.props.className,{static:this.props.static,resizing:!!this.state.resizing,"react-draggable":s,"react-draggable-dragging":!!this.state.dragging,dropping:!!b,cssTransforms:l}),style:{...this.props.style,...d.props.style,...this.createStyle(g)}});return v=this.mixinResizable(v,g,f),v=this.mixinDraggable(v,s),v}};return Ze.default=E,C(E,"propTypes",{children:e.default.element,cols:e.default.number.isRequired,containerWidth:e.default.number.isRequired,rowHeight:e.default.number.isRequired,margin:e.default.array.isRequired,maxRows:e.default.number.isRequired,containerPadding:e.default.array.isRequired,x:e.default.number.isRequired,y:e.default.number.isRequired,w:e.default.number.isRequired,h:e.default.number.isRequired,minW:function(w,S){const I=w[S];if(typeof I!="number")return new Error("minWidth not Number");if(I>w.w||I>w.maxW)return new Error("minWidth larger than item width/maxWidth")},maxW:function(w,S){const I=w[S];if(typeof I!="number")return new Error("maxWidth not Number");if(I<w.w||I<w.minW)return new Error("maxWidth smaller than item width/minWidth")},minH:function(w,S){const I=w[S];if(typeof I!="number")return new Error("minHeight not Number");if(I>w.h||I>w.maxH)return new Error("minHeight larger than item height/maxHeight")},maxH:function(w,S){const I=w[S];if(typeof I!="number")return new Error("maxHeight not Number");if(I<w.h||I<w.minH)return new Error("maxHeight smaller than item height/minHeight")},i:e.default.string.isRequired,resizeHandles:u.resizeHandleAxesType,resizeHandle:u.resizeHandleType,onDragStop:e.default.func,onDragStart:e.default.func,onDrag:e.default.func,onResizeStop:e.default.func,onResizeStart:e.default.func,onResize:e.default.func,isDraggable:e.default.bool.isRequired,isResizable:e.default.bool.isRequired,isBounded:e.default.bool.isRequired,static:e.default.bool,useCSSTransforms:e.default.bool.isRequired,transformScale:e.default.number,className:e.default.string,handle:e.default.string,cancel:e.default.string,droppingPosition:e.default.shape({e:e.default.object.isRequired,left:e.default.number.isRequired,top:e.default.number.isRequired})}),C(E,"defaultProps",{className:"",cancel:"",handle:"",minH:1,minW:1,maxH:1/0,maxW:1/0,transformScale:1}),Ze}var Kr;function Zr(){if(Kr)return Ye;Kr=1,Object.defineProperty(Ye,"__esModule",{value:!0}),Ye.default=void 0;var t=C(V),e=Kt(),n=y(Zt()),r=ze(),a=Jt(),o=y(qn()),u=y(Xr());function y(h){return h&&h.__esModule?h:{default:h}}function p(h){if(typeof WeakMap!="function")return null;var i=new WeakMap,s=new WeakMap;return(p=function(f){return f?s:i})(h)}function C(h,i){if(h&&h.__esModule)return h;if(h===null||typeof h!="object"&&typeof h!="function")return{default:h};var s=p(i);if(s&&s.has(h))return s.get(h);var f={__proto__:null},b=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in h)if(l!=="default"&&Object.prototype.hasOwnProperty.call(h,l)){var g=b?Object.getOwnPropertyDescriptor(h,l):null;g&&(g.get||g.set)?Object.defineProperty(f,l,g):f[l]=h[l]}return f.default=h,s&&s.set(h,f),f}function m(h,i,s){return i=T(i),i in h?Object.defineProperty(h,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):h[i]=s,h}function T(h){var i=E(h,"string");return typeof i=="symbol"?i:String(i)}function E(h,i){if(typeof h!="object"||h===null)return h;var s=h[Symbol.toPrimitive];if(s!==void 0){var f=s.call(h,i);if(typeof f!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(h)}const w="react-grid-layout";let S=!1;try{S=/firefox/i.test(navigator.userAgent)}catch{}let I=class extends t.Component{constructor(){super(...arguments),m(this,"state",{activeDrag:null,layout:(0,r.synchronizeLayoutWithChildren)(this.props.layout,this.props.children,this.props.cols,(0,r.compactType)(this.props),this.props.allowOverlap),mounted:!1,oldDragItem:null,oldLayout:null,oldResizeItem:null,resizing:!1,droppingDOMNode:null,children:[]}),m(this,"dragEnterCounter",0),m(this,"onDragStart",(i,s,f,b)=>{let{e:l,node:g}=b;const{layout:d}=this.state,v=(0,r.getLayoutItem)(d,i);if(!v)return;const D={w:v.w,h:v.h,x:v.x,y:v.y,placeholder:!0,i};return this.setState({oldDragItem:(0,r.cloneLayoutItem)(v),oldLayout:d,activeDrag:D}),this.props.onDragStart(d,v,v,null,l,g)}),m(this,"onDrag",(i,s,f,b)=>{let{e:l,node:g}=b;const{oldDragItem:d}=this.state;let{layout:v}=this.state;const{cols:D,allowOverlap:N,preventCollision:U}=this.props,z=(0,r.getLayoutItem)(v,i);if(!z)return;const O={w:z.w,h:z.h,x:z.x,y:z.y,placeholder:!0,i};v=(0,r.moveElement)(v,z,s,f,!0,U,(0,r.compactType)(this.props),D,N),this.props.onDrag(v,d,z,O,l,g),this.setState({layout:N?v:(0,r.compact)(v,(0,r.compactType)(this.props),D),activeDrag:O})}),m(this,"onDragStop",(i,s,f,b)=>{let{e:l,node:g}=b;if(!this.state.activeDrag)return;const{oldDragItem:d}=this.state;let{layout:v}=this.state;const{cols:D,preventCollision:N,allowOverlap:U}=this.props,z=(0,r.getLayoutItem)(v,i);if(!z)return;v=(0,r.moveElement)(v,z,s,f,!0,N,(0,r.compactType)(this.props),D,U);const L=U?v:(0,r.compact)(v,(0,r.compactType)(this.props),D);this.props.onDragStop(L,d,z,null,l,g);const{oldLayout:B}=this.state;this.setState({activeDrag:null,layout:L,oldDragItem:null,oldLayout:null}),this.onLayoutMaybeChanged(L,B)}),m(this,"onResizeStart",(i,s,f,b)=>{let{e:l,node:g}=b;const{layout:d}=this.state,v=(0,r.getLayoutItem)(d,i);v&&(this.setState({oldResizeItem:(0,r.cloneLayoutItem)(v),oldLayout:this.state.layout,resizing:!0}),this.props.onResizeStart(d,v,v,null,l,g))}),m(this,"onResize",(i,s,f,b)=>{let{e:l,node:g,size:d,handle:v}=b;const{oldResizeItem:D}=this.state,{layout:N}=this.state,{cols:U,preventCollision:z,allowOverlap:O}=this.props;let L=!1,B,G,Q;const[ie,ae]=(0,r.withLayoutItem)(N,i,W=>{let ee;return G=W.x,Q=W.y,["sw","w","nw","n","ne"].indexOf(v)!==-1&&(["sw","nw","w"].indexOf(v)!==-1&&(G=W.x+(W.w-s),s=W.x!==G&&G<0?W.w:s,G=G<0?0:G),["ne","n","nw"].indexOf(v)!==-1&&(Q=W.y+(W.h-f),f=W.y!==Q&&Q<0?W.h:f,Q=Q<0?0:Q),L=!0),z&&!O&&(ee=(0,r.getAllCollisions)(N,{...W,w:s,h:f,x:G,y:Q}).filter(le=>le.i!==W.i).length>0,ee&&(Q=W.y,f=W.h,G=W.x,s=W.w,L=!1)),W.w=s,W.h=f,W});if(!ae)return;B=ie,L&&(B=(0,r.moveElement)(ie,ae,G,Q,!0,this.props.preventCollision,(0,r.compactType)(this.props),U,O));const ce={w:ae.w,h:ae.h,x:ae.x,y:ae.y,static:!0,i};this.props.onResize(B,D,ae,ce,l,g),this.setState({layout:O?B:(0,r.compact)(B,(0,r.compactType)(this.props),U),activeDrag:ce})}),m(this,"onResizeStop",(i,s,f,b)=>{let{e:l,node:g}=b;const{layout:d,oldResizeItem:v}=this.state,{cols:D,allowOverlap:N}=this.props,U=(0,r.getLayoutItem)(d,i),z=N?d:(0,r.compact)(d,(0,r.compactType)(this.props),D);this.props.onResizeStop(z,v,U,null,l,g);const{oldLayout:O}=this.state;this.setState({activeDrag:null,layout:z,oldResizeItem:null,oldLayout:null,resizing:!1}),this.onLayoutMaybeChanged(z,O)}),m(this,"onDragOver",i=>{var ie;if(i.preventDefault(),i.stopPropagation(),S&&!((ie=i.nativeEvent.target)!=null&&ie.classList.contains(w)))return!1;const{droppingItem:s,onDropDragOver:f,margin:b,cols:l,rowHeight:g,maxRows:d,width:v,containerPadding:D,transformScale:N}=this.props,U=f==null?void 0:f(i);if(U===!1)return this.state.droppingDOMNode&&this.removeDroppingPlaceholder(),!1;const z={...s,...U},{layout:O}=this.state,L=i.currentTarget.getBoundingClientRect(),B=i.clientX-L.left,G=i.clientY-L.top,Q={left:B/N,top:G/N,e:i};if(this.state.droppingDOMNode){if(this.state.droppingPosition){const{left:ae,top:ce}=this.state.droppingPosition;(ae!=B||ce!=G)&&this.setState({droppingPosition:Q})}}else{const ae={cols:l,margin:b,maxRows:d,rowHeight:g,containerWidth:v,containerPadding:D||b},ce=(0,a.calcXY)(ae,G,B,z.w,z.h);this.setState({droppingDOMNode:t.createElement("div",{key:z.i}),droppingPosition:Q,layout:[...O,{...z,x:ce.x,y:ce.y,static:!1,isDraggable:!0}]})}}),m(this,"removeDroppingPlaceholder",()=>{const{droppingItem:i,cols:s}=this.props,{layout:f}=this.state,b=(0,r.compact)(f.filter(l=>l.i!==i.i),(0,r.compactType)(this.props),s,this.props.allowOverlap);this.setState({layout:b,droppingDOMNode:null,activeDrag:null,droppingPosition:void 0})}),m(this,"onDragLeave",i=>{i.preventDefault(),i.stopPropagation(),this.dragEnterCounter--,this.dragEnterCounter===0&&this.removeDroppingPlaceholder()}),m(this,"onDragEnter",i=>{i.preventDefault(),i.stopPropagation(),this.dragEnterCounter++}),m(this,"onDrop",i=>{i.preventDefault(),i.stopPropagation();const{droppingItem:s}=this.props,{layout:f}=this.state,b=f.find(l=>l.i===s.i);this.dragEnterCounter=0,this.removeDroppingPlaceholder(),this.props.onDrop(f,b,i)})}componentDidMount(){this.setState({mounted:!0}),this.onLayoutMaybeChanged(this.state.layout,this.props.layout)}static getDerivedStateFromProps(i,s){let f;return s.activeDrag?null:(!(0,e.deepEqual)(i.layout,s.propsLayout)||i.compactType!==s.compactType?f=i.layout:(0,r.childrenEqual)(i.children,s.children)||(f=s.layout),f?{layout:(0,r.synchronizeLayoutWithChildren)(f,i.children,i.cols,(0,r.compactType)(i),i.allowOverlap),compactType:i.compactType,children:i.children,propsLayout:i.layout}:null)}shouldComponentUpdate(i,s){return this.props.children!==i.children||!(0,r.fastRGLPropsEqual)(this.props,i,e.deepEqual)||this.state.activeDrag!==s.activeDrag||this.state.mounted!==s.mounted||this.state.droppingPosition!==s.droppingPosition}componentDidUpdate(i,s){if(!this.state.activeDrag){const f=this.state.layout,b=s.layout;this.onLayoutMaybeChanged(f,b)}}containerHeight(){if(!this.props.autoSize)return;const i=(0,r.bottom)(this.state.layout),s=this.props.containerPadding?this.props.containerPadding[1]:this.props.margin[1];return i*this.props.rowHeight+(i-1)*this.props.margin[1]+s*2+"px"}onLayoutMaybeChanged(i,s){s||(s=this.state.layout),(0,e.deepEqual)(s,i)||this.props.onLayoutChange(i)}placeholder(){const{activeDrag:i}=this.state;if(!i)return null;const{width:s,cols:f,margin:b,containerPadding:l,rowHeight:g,maxRows:d,useCSSTransforms:v,transformScale:D}=this.props;return t.createElement(o.default,{w:i.w,h:i.h,x:i.x,y:i.y,i:i.i,className:`react-grid-placeholder ${this.state.resizing?"placeholder-resizing":""}`,containerWidth:s,cols:f,margin:b,containerPadding:l||b,maxRows:d,rowHeight:g,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:v,transformScale:D},t.createElement("div",null))}processGridItem(i,s){if(!i||!i.key)return;const f=(0,r.getLayoutItem)(this.state.layout,String(i.key));if(!f)return null;const{width:b,cols:l,margin:g,containerPadding:d,rowHeight:v,maxRows:D,isDraggable:N,isResizable:U,isBounded:z,useCSSTransforms:O,transformScale:L,draggableCancel:B,draggableHandle:G,resizeHandles:Q,resizeHandle:ie}=this.props,{mounted:ae,droppingPosition:ce}=this.state,W=typeof f.isDraggable=="boolean"?f.isDraggable:!f.static&&N,ee=typeof f.isResizable=="boolean"?f.isResizable:!f.static&&U,ne=f.resizeHandles||Q,le=W&&z&&f.isBounded!==!1;return t.createElement(o.default,{containerWidth:b,cols:l,margin:g,containerPadding:d||g,maxRows:D,rowHeight:v,cancel:B,handle:G,onDragStop:this.onDragStop,onDragStart:this.onDragStart,onDrag:this.onDrag,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,isDraggable:W,isResizable:ee,isBounded:le,useCSSTransforms:O&&ae,usePercentages:!ae,transformScale:L,w:f.w,h:f.h,x:f.x,y:f.y,i:f.i,minH:f.minH,minW:f.minW,maxH:f.maxH,maxW:f.maxW,static:f.static,droppingPosition:s?ce:void 0,resizeHandles:ne,resizeHandle:ie},i)}render(){const{className:i,style:s,isDroppable:f,innerRef:b}=this.props,l=(0,n.default)(w,i),g={height:this.containerHeight(),...s};return t.createElement("div",{ref:b,className:l,style:g,onDrop:f?this.onDrop:r.noop,onDragLeave:f?this.onDragLeave:r.noop,onDragEnter:f?this.onDragEnter:r.noop,onDragOver:f?this.onDragOver:r.noop},t.Children.map(this.props.children,d=>this.processGridItem(d)),f&&this.state.droppingDOMNode&&this.processGridItem(this.state.droppingDOMNode,!0),this.placeholder())}};return Ye.default=I,m(I,"displayName","ReactGridLayout"),m(I,"propTypes",u.default),m(I,"defaultProps",{autoSize:!0,cols:12,className:"",style:{},draggableHandle:"",draggableCancel:"",containerPadding:null,rowHeight:150,maxRows:1/0,layout:[],margin:[10,10],isBounded:!1,isDraggable:!0,isResizable:!0,allowOverlap:!1,isDroppable:!1,useCSSTransforms:!0,transformScale:1,verticalCompact:!0,compactType:"vertical",preventCollision:!1,droppingItem:{i:"__dropping-elem__",h:1,w:1},resizeHandles:["se"],onLayoutChange:r.noop,onDragStart:r.noop,onDrag:r.noop,onDragStop:r.noop,onResizeStart:r.noop,onResize:r.noop,onResizeStop:r.noop,onDrop:r.noop,onDropDragOver:r.noop}),Ye}var nt={},De={},$r;function Jr(){if($r)return De;$r=1,Object.defineProperty(De,"__esModule",{value:!0}),De.findOrGenerateResponsiveLayout=r,De.getBreakpointFromWidth=e,De.getColsFromBreakpoint=n,De.sortBreakpoints=a;var t=ze();function e(o,u){const y=a(o);let p=y[0];for(let C=1,m=y.length;C<m;C++){const T=y[C];u>o[T]&&(p=T)}return p}function n(o,u){if(!u[o])throw new Error("ResponsiveReactGridLayout: `cols` entry for breakpoint "+o+" is missing!");return u[o]}function r(o,u,y,p,C,m){if(o[y])return(0,t.cloneLayout)(o[y]);let T=o[p];const E=a(u),w=E.slice(E.indexOf(y));for(let S=0,I=w.length;S<I;S++){const h=w[S];if(o[h]){T=o[h];break}}return T=(0,t.cloneLayout)(T||[]),(0,t.compact)((0,t.correctBounds)(T,{cols:C}),m,C)}function a(o){return Object.keys(o).sort(function(y,p){return o[y]-o[p]})}return De}var Qr;function Xn(){if(Qr)return nt;Qr=1,Object.defineProperty(nt,"__esModule",{value:!0}),nt.default=void 0;var t=p(V),e=u(Ee()),n=Kt(),r=ze(),a=Jr(),o=u(Zr());function u(h){return h&&h.__esModule?h:{default:h}}function y(h){if(typeof WeakMap!="function")return null;var i=new WeakMap,s=new WeakMap;return(y=function(f){return f?s:i})(h)}function p(h,i){if(h&&h.__esModule)return h;if(h===null||typeof h!="object"&&typeof h!="function")return{default:h};var s=y(i);if(s&&s.has(h))return s.get(h);var f={__proto__:null},b=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in h)if(l!=="default"&&Object.prototype.hasOwnProperty.call(h,l)){var g=b?Object.getOwnPropertyDescriptor(h,l):null;g&&(g.get||g.set)?Object.defineProperty(f,l,g):f[l]=h[l]}return f.default=h,s&&s.set(h,f),f}function C(){return C=Object.assign?Object.assign.bind():function(h){for(var i=1;i<arguments.length;i++){var s=arguments[i];for(var f in s)Object.prototype.hasOwnProperty.call(s,f)&&(h[f]=s[f])}return h},C.apply(this,arguments)}function m(h,i,s){return i=T(i),i in h?Object.defineProperty(h,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):h[i]=s,h}function T(h){var i=E(h,"string");return typeof i=="symbol"?i:String(i)}function E(h,i){if(typeof h!="object"||h===null)return h;var s=h[Symbol.toPrimitive];if(s!==void 0){var f=s.call(h,i);if(typeof f!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(h)}const w=h=>Object.prototype.toString.call(h);function S(h,i){return h==null?null:Array.isArray(h)?h:h[i]}let I=class extends t.Component{constructor(){super(...arguments),m(this,"state",this.generateInitialState()),m(this,"onLayoutChange",i=>{this.props.onLayoutChange(i,{...this.props.layouts,[this.state.breakpoint]:i})})}generateInitialState(){const{width:i,breakpoints:s,layouts:f,cols:b}=this.props,l=(0,a.getBreakpointFromWidth)(s,i),g=(0,a.getColsFromBreakpoint)(l,b),d=this.props.verticalCompact===!1?null:this.props.compactType;return{layout:(0,a.findOrGenerateResponsiveLayout)(f,s,l,l,g,d),breakpoint:l,cols:g}}static getDerivedStateFromProps(i,s){if(!(0,n.deepEqual)(i.layouts,s.layouts)){const{breakpoint:f,cols:b}=s;return{layout:(0,a.findOrGenerateResponsiveLayout)(i.layouts,i.breakpoints,f,f,b,i.compactType),layouts:i.layouts}}return null}componentDidUpdate(i){(this.props.width!=i.width||this.props.breakpoint!==i.breakpoint||!(0,n.deepEqual)(this.props.breakpoints,i.breakpoints)||!(0,n.deepEqual)(this.props.cols,i.cols))&&this.onWidthChange(i)}onWidthChange(i){const{breakpoints:s,cols:f,layouts:b,compactType:l}=this.props,g=this.props.breakpoint||(0,a.getBreakpointFromWidth)(this.props.breakpoints,this.props.width),d=this.state.breakpoint,v=(0,a.getColsFromBreakpoint)(g,f),D={...b};if(d!==g||i.breakpoints!==s||i.cols!==f){d in D||(D[d]=(0,r.cloneLayout)(this.state.layout));let z=(0,a.findOrGenerateResponsiveLayout)(D,s,g,d,v,l);z=(0,r.synchronizeLayoutWithChildren)(z,this.props.children,v,l,this.props.allowOverlap),D[g]=z,this.props.onLayoutChange(z,D),this.props.onBreakpointChange(g,v),this.setState({breakpoint:g,layout:z,cols:v})}const N=S(this.props.margin,g),U=S(this.props.containerPadding,g);this.props.onWidthChange(this.props.width,N,v,U)}render(){const{breakpoint:i,breakpoints:s,cols:f,layouts:b,margin:l,containerPadding:g,onBreakpointChange:d,onLayoutChange:v,onWidthChange:D,...N}=this.props;return t.createElement(o.default,C({},N,{margin:S(l,this.state.breakpoint),containerPadding:S(g,this.state.breakpoint),onLayoutChange:this.onLayoutChange,layout:this.state.layout,cols:this.state.cols}))}};return nt.default=I,m(I,"propTypes",{breakpoint:e.default.string,breakpoints:e.default.object,allowOverlap:e.default.bool,cols:e.default.object,margin:e.default.oneOfType([e.default.array,e.default.object]),containerPadding:e.default.oneOfType([e.default.array,e.default.object]),layouts(h,i){if(w(h[i])!=="[object Object]")throw new Error("Layout property must be an object. Received: "+w(h[i]));Object.keys(h[i]).forEach(s=>{if(!(s in h.breakpoints))throw new Error("Each key in layouts must align with a key in breakpoints.");(0,r.validateLayout)(h.layouts[s],"layouts."+s)})},width:e.default.number.isRequired,onBreakpointChange:e.default.func,onLayoutChange:e.default.func,onWidthChange:e.default.func}),m(I,"defaultProps",{breakpoints:{lg:1200,md:996,sm:768,xs:480,xxs:0},cols:{lg:12,md:10,sm:6,xs:4,xxs:2},containerPadding:{lg:null,md:null,sm:null,xs:null,xxs:null},layouts:{},margin:[10,10],allowOverlap:!1,onBreakpointChange:r.noop,onLayoutChange:r.noop,onWidthChange:r.noop}),nt}var Ct={},en=function(){if(typeof Map<"u")return Map;function t(e,n){var r=-1;return e.some(function(a,o){return a[0]===n?(r=o,!0):!1}),r}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(n){var r=t(this.__entries__,n),a=this.__entries__[r];return a&&a[1]},e.prototype.set=function(n,r){var a=t(this.__entries__,n);~a?this.__entries__[a][1]=r:this.__entries__.push([n,r])},e.prototype.delete=function(n){var r=this.__entries__,a=t(r,n);~a&&r.splice(a,1)},e.prototype.has=function(n){return!!~t(this.__entries__,n)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(n,r){r===void 0&&(r=null);for(var a=0,o=this.__entries__;a<o.length;a++){var u=o[a];n.call(r,u[1],u[0])}},e}()}(),or=typeof window<"u"&&typeof document<"u"&&window.document===document,Tt=function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()}(),Yn=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(Tt):function(t){return setTimeout(function(){return t(Date.now())},1e3/60)}}(),Kn=2;function Zn(t,e){var n=!1,r=!1,a=0;function o(){n&&(n=!1,t()),r&&y()}function u(){Yn(o)}function y(){var p=Date.now();if(n){if(p-a<Kn)return;r=!0}else n=!0,r=!1,setTimeout(u,e);a=p}return y}var $n=20,Jn=["top","right","bottom","left","width","height","size","weight"],Qn=typeof MutationObserver<"u",ea=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=Zn(this.refresh.bind(this),$n)}return t.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},t.prototype.removeObserver=function(e){var n=this.observers_,r=n.indexOf(e);~r&&n.splice(r,1),!n.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){var e=this.updateObservers_();e&&this.refresh()},t.prototype.updateObservers_=function(){var e=this.observers_.filter(function(n){return n.gatherActive(),n.hasActive()});return e.forEach(function(n){return n.broadcastActive()}),e.length>0},t.prototype.connect_=function(){!or||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Qn?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){!or||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(e){var n=e.propertyName,r=n===void 0?"":n,a=Jn.some(function(o){return!!~r.indexOf(o)});a&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),tn=function(t,e){for(var n=0,r=Object.keys(e);n<r.length;n++){var a=r[n];Object.defineProperty(t,a,{value:e[a],enumerable:!1,writable:!1,configurable:!0})}return t},ke=function(t){var e=t&&t.ownerDocument&&t.ownerDocument.defaultView;return e||Tt},rn=It(0,0,0,0);function wt(t){return parseFloat(t)||0}function nn(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce(function(r,a){var o=t["border-"+a+"-width"];return r+wt(o)},0)}function ta(t){for(var e=["top","right","bottom","left"],n={},r=0,a=e;r<a.length;r++){var o=a[r],u=t["padding-"+o];n[o]=wt(u)}return n}function ra(t){var e=t.getBBox();return It(0,0,e.width,e.height)}function na(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return rn;var r=ke(t).getComputedStyle(t),a=ta(r),o=a.left+a.right,u=a.top+a.bottom,y=wt(r.width),p=wt(r.height);if(r.boxSizing==="border-box"&&(Math.round(y+o)!==e&&(y-=nn(r,"left","right")+o),Math.round(p+u)!==n&&(p-=nn(r,"top","bottom")+u)),!oa(t)){var C=Math.round(y+o)-e,m=Math.round(p+u)-n;Math.abs(C)!==1&&(y-=C),Math.abs(m)!==1&&(p-=m)}return It(a.left,a.top,y,p)}var aa=function(){return typeof SVGGraphicsElement<"u"?function(t){return t instanceof ke(t).SVGGraphicsElement}:function(t){return t instanceof ke(t).SVGElement&&typeof t.getBBox=="function"}}();function oa(t){return t===ke(t).document.documentElement}function ia(t){return or?aa(t)?ra(t):na(t):rn}function sa(t){var e=t.x,n=t.y,r=t.width,a=t.height,o=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,u=Object.create(o.prototype);return tn(u,{x:e,y:n,width:r,height:a,top:n,right:e+r,bottom:a+n,left:e}),u}function It(t,e,n,r){return{x:t,y:e,width:n,height:r}}var la=function(){function t(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=It(0,0,0,0),this.target=e}return t.prototype.isActive=function(){var e=ia(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},t}(),ca=function(){function t(e,n){var r=sa(n);tn(this,{target:e,contentRect:r})}return t}(),ua=function(){function t(e,n,r){if(this.activeObservations_=[],this.observations_=new en,typeof e!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=n,this.callbackCtx_=r}return t.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof ke(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)||(n.set(e,new la(e)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof ke(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)&&(n.delete(e),n.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&e.activeObservations_.push(n)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,n=this.activeObservations_.map(function(r){return new ca(r.target,r.broadcastRect())});this.callback_.call(e,n,e),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),an=typeof WeakMap<"u"?new WeakMap:new en,on=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=ea.getInstance(),r=new ua(e,n,this);an.set(this,r)}return t}();["observe","unobserve","disconnect"].forEach(function(t){on.prototype[t]=function(){var e;return(e=an.get(this))[t].apply(e,arguments)}});var da=function(){return typeof Tt.ResizeObserver<"u"?Tt.ResizeObserver:on}();const fa=yr(Object.freeze(Object.defineProperty({__proto__:null,default:da},Symbol.toStringTag,{value:"Module"})));var sn;function pa(){if(sn)return Ct;sn=1,Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.default=E;var t=u(V),e=a(Ee()),n=a(fa),r=a(Zt());function a(w){return w&&w.__esModule?w:{default:w}}function o(w){if(typeof WeakMap!="function")return null;var S=new WeakMap,I=new WeakMap;return(o=function(h){return h?I:S})(w)}function u(w,S){if(w&&w.__esModule)return w;if(w===null||typeof w!="object"&&typeof w!="function")return{default:w};var I=o(S);if(I&&I.has(w))return I.get(w);var h={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in w)if(s!=="default"&&Object.prototype.hasOwnProperty.call(w,s)){var f=i?Object.getOwnPropertyDescriptor(w,s):null;f&&(f.get||f.set)?Object.defineProperty(h,s,f):h[s]=w[s]}return h.default=w,I&&I.set(w,h),h}function y(){return y=Object.assign?Object.assign.bind():function(w){for(var S=1;S<arguments.length;S++){var I=arguments[S];for(var h in I)Object.prototype.hasOwnProperty.call(I,h)&&(w[h]=I[h])}return w},y.apply(this,arguments)}function p(w,S,I){return S=C(S),S in w?Object.defineProperty(w,S,{value:I,enumerable:!0,configurable:!0,writable:!0}):w[S]=I,w}function C(w){var S=m(w,"string");return typeof S=="symbol"?S:String(S)}function m(w,S){if(typeof w!="object"||w===null)return w;var I=w[Symbol.toPrimitive];if(I!==void 0){var h=I.call(w,S);if(typeof h!="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}return(S==="string"?String:Number)(w)}const T="react-grid-layout";function E(w){var S;return S=class extends t.Component{constructor(){super(...arguments),p(this,"state",{width:1280}),p(this,"elementRef",t.createRef()),p(this,"mounted",!1),p(this,"resizeObserver",void 0)}componentDidMount(){this.mounted=!0,this.resizeObserver=new n.default(i=>{if(this.elementRef.current instanceof HTMLElement){const f=i[0].contentRect.width;this.setState({width:f})}});const h=this.elementRef.current;h instanceof HTMLElement&&this.resizeObserver.observe(h)}componentWillUnmount(){this.mounted=!1;const h=this.elementRef.current;h instanceof HTMLElement&&this.resizeObserver.unobserve(h),this.resizeObserver.disconnect()}render(){const{measureBeforeMount:h,...i}=this.props;return h&&!this.mounted?t.createElement("div",{className:(0,r.default)(this.props.className,T),style:this.props.style,ref:this.elementRef}):t.createElement(w,y({innerRef:this.elementRef},i,this.state))}},p(S,"defaultProps",{measureBeforeMount:!1}),p(S,"propTypes",{measureBeforeMount:e.default.bool}),S}return Ct}var ln;function ha(){return ln||(ln=1,function(t){t.exports=Zr().default,t.exports.utils=ze(),t.exports.calculateUtils=Jt(),t.exports.Responsive=Xn().default,t.exports.Responsive.utils=Jr(),t.exports.WidthProvider=pa().default}(Yt)),Yt.exports}var ga=ha();const va=Ln(ga);var ma=Object.getOwnPropertyDescriptor,ya=(t,e,n,r)=>{for(var a=r>1?void 0:r?ma(e,n):e,o=t.length-1,u;o>=0;o--)(u=t[o])&&(a=u(a)||a);return a},ba=(t,e)=>(n,r)=>e(n,r,t);let Ae=class extends _.Disposable{constructor(e){super();xe(this,"_initLocal",()=>{});xe(this,"_findReplaceIndex",e=>{const n=/\{([^}]+)?\}/g,r=[];let a=n.exec(e);for(;a;)r.push({startIndex:a.index,key:Number(a[1]),endIndex:a.index+a[0].length-1}),a=n.exec(e);return r});this._localeService=e,this._initLocal()}tWithReactNode(e,...n){const r=this._localeService.getLocales(),a=e.split("."),o=r&&this._localeService.resolveKeyPath(r,a);if(typeof o=="string"){const u=[];return this._findReplaceIndex(o).forEach((y,p,C)=>{const m=C[p-1]||{endIndex:-1};if(m.endIndex+1<y.startIndex){const T=o.slice(m.endIndex+1,y.startIndex);T&&u.push(T)}if(n[y.key]&&u.push(n[y.key]),p===C.length-1){const T=o.slice(y.endIndex+1);T&&u.push(T)}}),u}return[]}};Ae=ya([ba(0,_.Inject(_.LocaleService))],Ae);const _t={cfPreview:"univer-cf-preview"},We=t=>{var a,o;const e=t.rule;if(!e)return null;const n=V.useMemo(()=>{if(e.type===c.CFRuleType.colorScale){const u=e.config.map((C,m)=>({color:new _.ColorKit(C.color),value:m})),y=u.length-1;return new Array(5).fill("").map((C,m,T)=>m*y/(T.length-1)).map(C=>c.getColorScaleFromValue(u,C))}return null},[e]),r=V.useMemo(()=>{if(e.type===c.CFRuleType.iconSet)return e.config.map(u=>{const y=c.iconMap[u.iconType];return y&&y[Number(u.iconId)]})},[e]);switch(e.type){case c.CFRuleType.dataBar:{const{isGradient:u}=e.config,y={width:"50%",height:"100%"},p=u?`linear-gradient(to right, ${e.config.positiveColor||c.defaultDataBarPositiveColor}, rgb(255 255 255))`:e.config.positiveColor,C=u?`linear-gradient(to right, rgb(255 255 255),${e.config.nativeColor||c.defaultDataBarNativeColor})`:e.config.nativeColor;return R.jsxs("div",{className:_t.cfPreview,children:[R.jsx("div",{style:{...y,background:C,border:`1px solid ${e.config.nativeColor||c.defaultDataBarNativeColor}`}}),R.jsx("div",{style:{...y,background:p,border:`1px solid ${e.config.positiveColor||c.defaultDataBarPositiveColor}`}})]})}case c.CFRuleType.colorScale:return n&&R.jsx("div",{className:_t.cfPreview,children:n.map((u,y)=>R.jsx("div",{style:{width:`${100/n.length}%`,height:"100%",background:u}},y))});case c.CFRuleType.iconSet:return r&&R.jsx("div",{className:_t.cfPreview,children:r.map((u,y)=>u?R.jsx("img",{style:{height:"100%"},src:u},y):R.jsx(Xe,{},y))});case c.CFRuleType.highlightCell:{const{ul:u,st:y,it:p,bl:C,bg:m,cl:T}=e.style,E=(u==null?void 0:u.s)===_.BooleanNumber.TRUE,w=(y==null?void 0:y.s)===_.BooleanNumber.TRUE,S=p===_.BooleanNumber.TRUE,I=C===_.BooleanNumber.TRUE,h=(a=m==null?void 0:m.rgb)!=null?a:c.DEFAULT_BG_COLOR,i=(o=T==null?void 0:T.rgb)!=null?o:c.DEFAULT_FONT_COLOR,s={fontWeight:I?"bold":void 0,fontStyle:S?"italic":void 0,textDecoration:`${E?"underline":""} ${w?"line-through":""}`.replace(/^ /,"")||void 0,backgroundColor:h,color:i};return R.jsx("div",{style:s,className:_t.cfPreview,children:"123"})}}return null},ge={cfRuleList:"univer-cf-rule-list",ruleSelector:"univer-rule-selector",select:"univer-select",btnList:"univer-btn-list",gap:"univer-gap",icon:"univer-icon",disabled:"univer-disabled",ruleItem:"univer-rule-item",ruleDescribe:"univer-rule-describe",ruleType:"univer-rule-type",ruleRange:"univer-rule-range",active:"univer-active",draggableHandle:"univer-draggableHandle",deleteItem:"univer-delete-item",gridLayoutWrap:"univer-grid-layout-wrap"},Sa=(t,e)=>{const n=t.rule;switch(n.type){case c.CFRuleType.colorScale:return e.t("sheet.cf.ruleType.colorScale");case c.CFRuleType.dataBar:return e.t("sheet.cf.ruleType.dataBar");case c.CFRuleType.iconSet:return e.t("sheet.cf.ruleType.iconSet");case c.CFRuleType.highlightCell:switch(n.subType){case c.CFSubRuleType.average:{const r=n.operator;return e.t(`sheet.cf.preview.describe.${r}`,e.t("sheet.cf.subRuleType.average"))}case c.CFSubRuleType.duplicateValues:return e.t("sheet.cf.subRuleType.duplicateValues");case c.CFSubRuleType.uniqueValues:return e.t("sheet.cf.subRuleType.uniqueValues");case c.CFSubRuleType.number:{const r=n.operator;return e.t(`sheet.cf.preview.describe.${r}`,...Array.isArray(n.value)?n.value.map(a=>String(a)):[String(n.value||"")])}case c.CFSubRuleType.text:{const r=n.operator;return e.t(`sheet.cf.preview.describe.${r}`,n.value||"")}case c.CFSubRuleType.timePeriod:{const r=n.operator;return e.t(`sheet.cf.preview.describe.${r}`)}case c.CFSubRuleType.rank:return n.isPercent?n.isBottom?e.t("sheet.cf.preview.describe.bottomNPercent",String(n.value)):e.t("sheet.cf.preview.describe.topNPercent",String(n.value)):n.isBottom?e.t("sheet.cf.preview.describe.bottomN",String(n.value)):e.t("sheet.cf.preview.describe.topN",String(n.value));case c.CFSubRuleType.formula:return e.t("sheet.cf.ruleType.formula")}}};let cn=0;const Ca=t=>{const{onClick:e}=t,n=te.useDependency(c.ConditionalFormattingRuleModel),r=te.useDependency(_.IUniverInstanceService),a=te.useDependency(X.SheetsSelectionsService),o=te.useDependency(_.ICommandService),u=te.useDependency(_.LocaleService),y=te.useDependency(_.Injector),p=te.useDependency(te.ISidebarService),C=te.useDependency(Ae),m=te.useObservable(()=>r.getCurrentTypeOfUnit$(_.UniverInstanceType.UNIVER_SHEET),void 0,void 0,[]),T=m.getUnitId(),E=m.getActiveSheet();if(!E)throw new Error("No active sheet found");const w=E.getSheetId(),[S,I]=V.useState([]),[h,i]=V.useState("2"),[s,f]=V.useState(0),[b,l]=V.useState(-1),[g,d]=V.useState(cn),v=V.useRef(null),D=[{label:u.t("sheet.cf.panel.workSheet"),value:"2"},{label:u.t("sheet.cf.panel.selectedRange"),value:"1"}],N=()=>{const W=n.getSubunitRules(T,w);if(!W||!W.length)return[];if(h==="1"){const ee=a.getCurrentLastSelection();if(!ee)return[];const ne=ee.range;return W.filter(fe=>fe.ranges.some(ve=>_.Rectangle.intersects(ve,ne)))}else if(h==="2")return[...W];return[]},[U,z]=V.useState(N);pe.useHighlightRange(S),V.useEffect(()=>{const W=o.onCommandExecuted(ee=>{ee.id===X.SetWorksheetActiveOperation.id&&f(Math.random())});return()=>W.dispose()}),V.useEffect(()=>{z(N)},[h,s,T,w]),V.useEffect(()=>{if(h==="2")return;const W=new Ce.Observable(ee=>{const ne=[X.SetSelectionsOperation.id,c.AddConditionalRuleMutation.id,c.SetConditionalRuleMutation.id,c.DeleteConditionalRuleMutation.id,c.MoveConditionalRuleMutation.id],le=o.onCommandExecuted(fe=>{const{id:ve,params:Te}=fe,j=r.getCurrentUnitOfType(_.UniverInstanceType.UNIVER_SHEET).getUnitId();ne.includes(ve)&&Te.unitId===j&&ee.next(null)});return()=>le.dispose()}).pipe(Ce.debounceTime(16)).subscribe(()=>{z(N)});return()=>{W.unsubscribe()}},[r,h,T,w]),V.useEffect(()=>{const W=n.$ruleChange.subscribe(()=>{f(Math.random())});return()=>W.unsubscribe()},[n]),V.useEffect(()=>{const W=()=>{var fe,ve;const le=Math.max(0,((ve=(fe=v.current)==null?void 0:fe.getBoundingClientRect().width)!=null?ve:0)-8);return cn=le,le},ne=new Ce.Observable(le=>{const fe=p.getContainer();if(fe){let ve=setTimeout(()=>{le.next()},150);const Te=()=>{ve&&clearTimeout(ve),ve=null},j=J=>{J.propertyName==="width"&&(Te(),le.next())};return fe.addEventListener("transitionend",j),()=>{Te(),fe.removeEventListener("transitionend",j)}}}).pipe(Ce.debounceTime(16)).subscribe(()=>{d(W())});return()=>{ne.unsubscribe()}},[]);const O=W=>{var le;const ee=r.getCurrentUnitOfType(_.UniverInstanceType.UNIVER_SHEET).getUnitId(),ne=(le=r.getCurrentUnitOfType(_.UniverInstanceType.UNIVER_SHEET).getActiveSheet())==null?void 0:le.getSheetId();if(!ee||!ne)throw new Error("No active sheet found");o.executeCommand(c.DeleteCfCommand.id,{unitId:ee,subUnitId:ne,cfId:W.cfId})},L=(W,ee)=>{l(ee.y)},B=(W,ee,ne)=>{var J;l(-1);const le=r.getCurrentUnitOfType(_.UniverInstanceType.UNIVER_SHEET).getUnitId(),fe=(J=r.getCurrentUnitOfType(_.UniverInstanceType.UNIVER_SHEET).getActiveSheet())==null?void 0:J.getSheetId();if(!le||!fe)throw new Error("No active sheet found");const ve=se=>{const P=U.length;return Math.min(P-1,Math.max(0,se))},Te=U[ve(ee.y)].cfId,j=U[ve(ne.y)].cfId;Te!==j&&o.executeCommand(c.MoveCfCommand.id,{unitId:le,subUnitId:fe,start:{id:Te,type:"self"},end:{id:j,type:ne.y>ee.y?"after":"before"}})},G=()=>{t.onCreate()},Q=()=>{h==="2"?o.executeCommand(c.ClearWorksheetCfCommand.id):h==="1"&&U.map(ee=>({unitId:T,subUnitId:w,cfId:ee.cfId})).forEach(ee=>{o.executeCommand(c.DeleteCfCommand.id,ee)})},ie=V.useMemo(()=>{const W=r.getCurrentUnitOfType(_.UniverInstanceType.UNIVER_SHEET),ee=W.getActiveSheet();return U.filter(ne=>{const le=ne.ranges;return X.checkRangesEditablePermission(y,W.getUnitId(),ee.getSheetId(),le)})},[U]),ae=ie.map((W,ee)=>({i:W.cfId,x:0,w:12,y:ee,h:1,isResizable:!1})),ce=V.useMemo(()=>{const W=r.getCurrentUnitOfType(_.UniverInstanceType.UNIVER_SHEET),ee=W.getActiveSheet();return U.every(ne=>{const le=ne.ranges;return X.checkRangesEditablePermission(y,W.getUnitId(),ee.getSheetId(),le)})},[U]);return R.jsxs("div",{className:ge.cfRuleList,children:[R.jsxs("div",{className:ge.ruleSelector,children:[R.jsx("div",{children:C.tWithReactNode("sheet.cf.panel.managerRuleSelect",R.jsx($.Select,{className:ge.select,options:D,value:h,onChange:W=>{i(W)}})).map((W,ee)=>R.jsx("span",{children:W},ee))}),R.jsxs("div",{className:ge.btnList,children:[R.jsx($.Tooltip,{title:u.t("sheet.cf.panel.createRule"),placement:"bottom",children:R.jsx("div",{className:ge.icon,onClick:G,children:R.jsx(vr,{})})}),U.length&&ce?R.jsx($.Tooltip,{title:u.t("sheet.cf.panel.clear"),placement:"bottom",children:R.jsx("div",{className:$.clsx(ge.gap,ge.icon),onClick:Q,children:R.jsx(gt,{})})}):R.jsx("div",{className:$.clsx(ge.gap,ge.disabled),children:R.jsx(gt,{})})]})]}),R.jsx("div",{ref:v,className:ge.gridLayoutWrap,children:g?R.jsx(va,{draggableHandle:".draggableHandle",layout:ae,cols:12,rowHeight:60,width:g,margin:[0,10],onDragStop:B,onDragStart:L,children:ie==null?void 0:ie.map((W,ee)=>R.jsx("div",{children:R.jsxs("div",{className:$.clsx(ge.ruleItem,{[ge.active]:b===ee}),onMouseMove:()=>{W.ranges!==S&&I(W.ranges)},onMouseLeave:()=>I([]),onClick:()=>{e(W)},children:[R.jsx("div",{className:$.clsx(ge.draggableHandle,"draggableHandle"),onClick:ne=>ne.stopPropagation(),children:R.jsx(mr,{})}),R.jsxs("div",{className:ge.ruleDescribe,children:[R.jsx("div",{className:ge.ruleType,children:Sa(W,u)}),R.jsx("div",{className:ge.ruleRange,children:W.ranges.map(ne=>kt.serializeRange(ne)).join(",")})]}),R.jsx("div",{className:ge.preview,children:R.jsx(We,{rule:W.rule})}),R.jsx("div",{className:$.clsx(ge.deleteItem,{[ge.active]:b===ee}),onClick:ne=>{ne.stopPropagation(),O(W),I([])},children:R.jsx(gt,{})})]})},`${W.cfId}`))}):null})]})},un={cfColorPickerIcon:"univer-cf-color-picker-icon",iconDropdown:"univer-icon-dropdown"},Me=t=>{const{color:e,onChange:n,disable:r=!1,iconId:a="PaintBucket",className:o,isNeedDropdownIcon:u=!0}=t,y=te.useDependency(te.ComponentManager),p=V.useMemo(()=>new _.ColorKit(e),[e]),C=y.get(a);return C&&(r?R.jsx(C,{className:o,extend:{colorChannel1:p.isValid?e:"rgb(var(--primary-color))"}}):R.jsx($.Dropdown,{overlay:R.jsx("div",{className:"univer-rounded-lg univer-p-4",children:R.jsx($.ColorPicker,{value:e,onChange:n})}),children:R.jsxs("span",{className:`
|
|
4
4
|
${un.cfColorPickerIcon}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs/sheets-conditional-formatting-ui",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.7",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Conditional formatting plugin for Univer Sheets",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -55,18 +55,18 @@
|
|
|
55
55
|
"rxjs": ">=7.0.0"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@univerjs/icons": "^0.2.
|
|
58
|
+
"@univerjs/icons": "^0.2.28",
|
|
59
59
|
"react-grid-layout": "^1.4.4",
|
|
60
60
|
"react-resizable": "^3.0.5",
|
|
61
|
-
"@univerjs/core": "0.6.
|
|
62
|
-
"@univerjs/engine-formula": "0.6.
|
|
63
|
-
"@univerjs/
|
|
64
|
-
"@univerjs/
|
|
65
|
-
"@univerjs/sheets-
|
|
66
|
-
"@univerjs/
|
|
67
|
-
"@univerjs/
|
|
68
|
-
"@univerjs/
|
|
69
|
-
"@univerjs/
|
|
61
|
+
"@univerjs/core": "0.6.7",
|
|
62
|
+
"@univerjs/engine-formula": "0.6.7",
|
|
63
|
+
"@univerjs/engine-render": "0.6.7",
|
|
64
|
+
"@univerjs/sheets": "0.6.7",
|
|
65
|
+
"@univerjs/sheets-formula-ui": "0.6.7",
|
|
66
|
+
"@univerjs/design": "0.6.7",
|
|
67
|
+
"@univerjs/ui": "0.6.7",
|
|
68
|
+
"@univerjs/sheets-conditional-formatting": "0.6.7",
|
|
69
|
+
"@univerjs/sheets-ui": "0.6.7"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@types/react-grid-layout": "^1.3.5",
|
|
@@ -76,9 +76,9 @@
|
|
|
76
76
|
"rxjs": "^7.8.1",
|
|
77
77
|
"tailwindcss": "^3.4.17",
|
|
78
78
|
"typescript": "^5.8.2",
|
|
79
|
-
"vite": "^6.2.
|
|
80
|
-
"vitest": "^3.0.
|
|
81
|
-
"@univerjs-infra/shared": "0.6.
|
|
79
|
+
"vite": "^6.2.3",
|
|
80
|
+
"vitest": "^3.0.9",
|
|
81
|
+
"@univerjs-infra/shared": "0.6.7"
|
|
82
82
|
},
|
|
83
83
|
"scripts": {
|
|
84
84
|
"test": "vitest run",
|