@crystaldesign/diva-support 25.13.0-beta.2 → 25.13.0-beta.21

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crystaldesign/diva-support",
3
- "version": "25.13.0-beta.2",
3
+ "version": "25.13.0-beta.21",
4
4
  "scripts": {
5
5
  "test": "echo \"Error: no test specified\" && exit 1"
6
6
  },
@@ -15,8 +15,8 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "@cometchat-pro/chat": "3.0.11",
18
- "@crystaldesign/diva-core": "25.13.0-beta.2",
19
- "@crystaldesign/live-planner": "25.13.0-beta.2",
18
+ "@crystaldesign/diva-core": "25.13.0-beta.21",
19
+ "@crystaldesign/live-planner": "25.13.0-beta.21",
20
20
  "@emotion/react": "^11.13.3",
21
21
  "@emotion/styled": "^11.13.0",
22
22
  "@twemoji/api": "14.1.0",
@@ -35,5 +35,5 @@
35
35
  "react": "^18.3.1",
36
36
  "react-dom": "^18.3.1"
37
37
  },
38
- "gitHead": "541bdea1dac75b23551057f487326de19d978bc0"
38
+ "gitHead": "d428b6cb4118969a76376ba4ae2ef255a44cef02"
39
39
  }
@@ -1,2 +0,0 @@
1
- /*! For license information please see 823.diva-support.umd.min.js.LICENSE.txt */
2
- (self.webpackChunkCrystaldesignDivaSupport=self.webpackChunkCrystaldesignDivaSupport||[]).push([[823],{6033:(e,t,o)=>{"use strict";o.d(t,{Z:()=>F});var r=o(7363),n=o(7726),a=o(9916),s=o(5689),i=o(7843),l=o(518),c=o(2893),d=o(7562),p=o(2791),u=o(8981),f=o(9173),h=o(4685),m=o(9503);function getAlertUtilityClass(e){return(0,m.ZP)("MuiAlert",e)}const g=(0,h.Z)("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]);var v=o(3697),w=o(6177),y=o(7514);const x=(0,w.Z)((0,y.jsx)("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),S=(0,w.Z)((0,y.jsx)("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),C=(0,w.Z)((0,y.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),k=(0,w.Z)((0,y.jsx)("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),b=(0,w.Z)((0,y.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),Z=(0,i.ZP)(f.Z,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t[o.variant],t[`${o.variant}${(0,p.Z)(o.color||o.severity)}`]]}})((0,l.Z)((({theme:e})=>{const t="light"===e.palette.mode?s._j:s.$n,o="light"===e.palette.mode?s.$n:s._j;return{...e.typography.body2,backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(e.palette).filter((0,u.Z)(["light"])).map((([r])=>({props:{colorSeverity:r,variant:"standard"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${r}StandardBg`]:o(e.palette[r].light,.9),[`& .${g.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}}))),...Object.entries(e.palette).filter((0,u.Z)(["light"])).map((([o])=>({props:{colorSeverity:o,variant:"outlined"},style:{color:e.vars?e.vars.palette.Alert[`${o}Color`]:t(e.palette[o].light,.6),border:`1px solid ${(e.vars||e).palette[o].light}`,[`& .${g.icon}`]:e.vars?{color:e.vars.palette.Alert[`${o}IconColor`]}:{color:e.palette[o].main}}}))),...Object.entries(e.palette).filter((0,u.Z)(["dark"])).map((([t])=>({props:{colorSeverity:t,variant:"filled"},style:{fontWeight:e.typography.fontWeightMedium,...e.vars?{color:e.vars.palette.Alert[`${t}FilledColor`],backgroundColor:e.vars.palette.Alert[`${t}FilledBg`]}:{backgroundColor:"dark"===e.palette.mode?e.palette[t].dark:e.palette[t].main,color:e.palette.getContrastText(e.palette[t].main)}}})))]}}))),P=(0,i.ZP)("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(e,t)=>t.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),z=(0,i.ZP)("div",{name:"MuiAlert",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),M=(0,i.ZP)("div",{name:"MuiAlert",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),j={success:(0,y.jsx)(x,{fontSize:"inherit"}),warning:(0,y.jsx)(S,{fontSize:"inherit"}),error:(0,y.jsx)(C,{fontSize:"inherit"}),info:(0,y.jsx)(k,{fontSize:"inherit"})},F=r.forwardRef((function Alert(e,t){const o=(0,c.i)({props:e,name:"MuiAlert"}),{action:r,children:s,className:i,closeText:l="Close",color:u,components:f={},componentsProps:h={},icon:m,iconMapping:g=j,onClose:w,role:x="alert",severity:S="success",slotProps:C={},slots:k={},variant:F="standard",...A}=o,R={...o,color:u,severity:S,variant:F,colorSeverity:u||S},I=(e=>{const{variant:t,color:o,severity:r,classes:n}=e,s={root:["root",`color${(0,p.Z)(o||r)}`,`${t}${(0,p.Z)(o||r)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]};return(0,a.Z)(s,getAlertUtilityClass,n)})(R),$={slots:{closeButton:f.CloseButton,closeIcon:f.CloseIcon,...k},slotProps:{...h,...C}},[O,E]=(0,d.Z)("root",{ref:t,shouldForwardComponentProp:!0,className:(0,n.Z)(I.root,i),elementType:Z,externalForwardedProps:{...$,...A},ownerState:R,additionalProps:{role:x,elevation:0}}),[B,L]=(0,d.Z)("icon",{className:I.icon,elementType:P,externalForwardedProps:$,ownerState:R}),[T,q]=(0,d.Z)("message",{className:I.message,elementType:z,externalForwardedProps:$,ownerState:R}),[W,H]=(0,d.Z)("action",{className:I.action,elementType:M,externalForwardedProps:$,ownerState:R}),[U,N]=(0,d.Z)("closeButton",{elementType:v.Z,externalForwardedProps:$,ownerState:R}),[V,D]=(0,d.Z)("closeIcon",{elementType:b,externalForwardedProps:$,ownerState:R});return(0,y.jsxs)(O,{...E,children:[!1!==m?(0,y.jsx)(B,{...L,children:m||g[S]||j[S]}):null,(0,y.jsx)(T,{...q,children:s}),null!=r?(0,y.jsx)(W,{...H,children:r}):null,null==r&&w?(0,y.jsx)(W,{...H,children:(0,y.jsx)(U,{size:"small","aria-label":l,title:l,color:"inherit",onClick:w,...N,children:(0,y.jsx)(V,{fontSize:"small",...D})})}):null]})}))},7186:(e,t,o)=>{"use strict";o.d(t,{Z:()=>I});var r=o(7363),n=o(7726),a=o(9916),s=o(5689),i=o(2791),l=o(4039),c=o(7843),d=o(8901),p=o(5739),u=o(9495),f=o(4685),h=o(9503);function getSwitchBaseUtilityClass(e){return(0,h.ZP)("PrivateSwitchBase",e)}(0,f.Z)("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);var m=o(7562),g=o(7514);const v=(0,c.ZP)(u.Z)({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>"start"===e&&"small"!==t.size,style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>"end"===e&&"small"!==t.size,style:{marginRight:-12}}]}),w=(0,c.ZP)("input",{shouldForwardProp:l.Z})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),y=r.forwardRef((function SwitchBase(e,t){const{autoFocus:o,checked:r,checkedIcon:n,defaultChecked:s,disabled:l,disableFocusRipple:c=!1,edge:u=!1,icon:f,id:h,inputProps:y,inputRef:x,name:S,onBlur:C,onChange:k,onFocus:b,readOnly:Z,required:P=!1,tabIndex:z,type:M,value:j,slots:F={},slotProps:A={},...R}=e,[I,$]=(0,d.Z)({controlled:r,default:Boolean(s),name:"SwitchBase",state:"checked"}),O=(0,p.Z)();let E=l;O&&void 0===E&&(E=O.disabled);const B="checkbox"===M||"radio"===M,L={...e,checked:I,disabled:E,disableFocusRipple:c,edge:u},T=(e=>{const{classes:t,checked:o,disabled:r,edge:n}=e,s={root:["root",o&&"checked",r&&"disabled",n&&`edge${(0,i.Z)(n)}`],input:["input"]};return(0,a.Z)(s,getSwitchBaseUtilityClass,t)})(L),q={slots:F,slotProps:{input:y,...A}},[W,H]=(0,m.Z)("root",{ref:t,elementType:v,className:T.root,shouldForwardComponentProp:!0,externalForwardedProps:{...q,component:"span",...R},getSlotProps:e=>({...e,onFocus:t=>{e.onFocus?.(t),(e=>{b&&b(e),O&&O.onFocus&&O.onFocus(e)})(t)},onBlur:t=>{e.onBlur?.(t),(e=>{C&&C(e),O&&O.onBlur&&O.onBlur(e)})(t)}}),ownerState:L,additionalProps:{centerRipple:!0,focusRipple:!c,disabled:E,role:void 0,tabIndex:null}}),[U,N]=(0,m.Z)("input",{ref:x,elementType:w,className:T.input,externalForwardedProps:q,getSlotProps:e=>({onChange:t=>{e.onChange?.(t),(e=>{if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked;$(t),k&&k(e,t)})(t)}}),ownerState:L,additionalProps:{autoFocus:o,checked:r,defaultChecked:s,disabled:E,id:B?h:void 0,name:S,readOnly:Z,required:P,tabIndex:z,type:M,..."checkbox"===M&&void 0===j?{}:{value:j}}});return(0,g.jsxs)(W,{...H,children:[(0,g.jsx)(U,{...N}),I?n:f]})}));var x=o(6177);const S=(0,x.Z)((0,g.jsx)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),C=(0,x.Z)((0,g.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),k=(0,x.Z)((0,g.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function getCheckboxUtilityClass(e){return(0,h.ZP)("MuiCheckbox",e)}const b=(0,f.Z)("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]);var Z=o(518),P=o(8981),z=o(2893),M=o(85);const j=(0,c.ZP)(y,{shouldForwardProp:e=>(0,l.Z)(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,o.indeterminate&&t.indeterminate,t[`size${(0,i.Z)(o.size)}`],"default"!==o.color&&t[`color${(0,i.Z)(o.color)}`]]}})((0,Z.Z)((({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,s.Fq)(e.palette.action.active,e.palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter((0,P.Z)()).map((([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,s.Fq)(e.palette[t].main,e.palette.action.hoverOpacity)}}}))),...Object.entries(e.palette).filter((0,P.Z)()).map((([t])=>({props:{color:t},style:{[`&.${b.checked}, &.${b.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${b.disabled}`]:{color:(e.vars||e).palette.action.disabled}}}))),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]})))),F=(0,g.jsx)(C,{}),A=(0,g.jsx)(S,{}),R=(0,g.jsx)(k,{}),I=r.forwardRef((function Checkbox(e,t){const o=(0,z.i)({props:e,name:"MuiCheckbox"}),{checkedIcon:s=F,color:l="primary",icon:c=A,indeterminate:d=!1,indeterminateIcon:p=R,inputProps:u,size:f="medium",disableRipple:h=!1,className:v,slots:w={},slotProps:y={},...x}=o,S=d?p:c,C=d?p:s,k={...o,disableRipple:h,color:l,indeterminate:d,size:f},b=(e=>{const{classes:t,indeterminate:o,color:r,size:n}=e,s={root:["root",o&&"indeterminate",`color${(0,i.Z)(r)}`,`size${(0,i.Z)(n)}`]},l=(0,a.Z)(s,getCheckboxUtilityClass,t);return{...t,...l}})(k),Z=y.input??u,[P,I]=(0,m.Z)("root",{ref:t,elementType:j,className:(0,n.Z)(b.root,v),shouldForwardComponentProp:!0,externalForwardedProps:{slots:w,slotProps:y,...x},ownerState:k,additionalProps:{type:"checkbox",icon:r.cloneElement(S,{fontSize:S.props.fontSize??f}),checkedIcon:r.cloneElement(C,{fontSize:C.props.fontSize??f}),disableRipple:h,slots:w,slotProps:{input:(0,M.Z)("function"==typeof Z?Z(k):Z,{"data-indeterminate":d})}}});return(0,g.jsx)(P,{...I,classes:b})}))},8942:(e,t,o)=>{var r=o(5108),n="undefined"!=typeof Element,a="function"==typeof Map,s="function"==typeof Set,i="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function equal(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;var o,r,l,c;if(Array.isArray(e)){if((o=e.length)!=t.length)return!1;for(r=o;0!=r--;)if(!equal(e[r],t[r]))return!1;return!0}if(a&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(c=e.entries();!(r=c.next()).done;)if(!t.has(r.value[0]))return!1;for(c=e.entries();!(r=c.next()).done;)if(!equal(r.value[1],t.get(r.value[0])))return!1;return!0}if(s&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(c=e.entries();!(r=c.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(i&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if((o=e.length)!=t.length)return!1;for(r=o;0!=r--;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&"function"==typeof e.valueOf&&"function"==typeof t.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&"function"==typeof e.toString&&"function"==typeof t.toString)return e.toString()===t.toString();if((o=(l=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=o;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,l[r]))return!1;if(n&&e instanceof Element)return!1;for(r=o;0!=r--;)if(("_owner"!==l[r]&&"__v"!==l[r]&&"__o"!==l[r]||!e.$$typeof)&&!equal(e[l[r]],t[l[r]]))return!1;return!0}return e!=e&&t!=t}e.exports=function isEqual(e,t){try{return equal(e,t)}catch(e){if((e.message||"").match(/stack|recursion/i))return r.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}},4376:(e,t,o)=>{"use strict";o.d(t,{Z:()=>lib_Snowfall});var r=o(7363),n=o(8942);function random(e,t){const o=Math.random()*(t-e+1)+e;return Number.isInteger(e)&&Number.isInteger(t)?Math.floor(o):o}function lerp(e,t,o){return(1-o)*e+o*t}function getSize(e){return e?{height:e.offsetHeight,width:e.offsetWidth}:{height:0,width:0}}const a=2*Math.PI,s={color:"#dee4fd",radius:[.5,3],speed:[1,3],wind:[-.5,2],changeFrequency:200,rotationSpeed:[-1,1],opacity:[1,1]};class Snowflake{static createSnowflakes(e,t,o){if(!e)return[];const r=[];for(let n=0;n<t;n++)r.push(new Snowflake(e,o));return r}constructor(e,t={}){this.updateConfig(t);const{radius:o,wind:r,speed:n,rotationSpeed:a,opacity:s}=this.config;this.params={x:random(0,e.offsetWidth),y:random(-e.offsetHeight,0),rotation:random(0,360),radius:random(...o),speed:random(...n),wind:random(...r),rotationSpeed:random(...a),nextSpeed:random(...n),nextWind:random(...r),nextRotationSpeed:random(...a),opacity:random(...s)},this.framesSinceLastUpdate=0}selectImage(){this.config.images&&this.config.images.length>0?this.image=function randomElement(e){return e[Math.floor(Math.random()*e.length)]}(this.config.images):this.image=void 0}updateConfig(e){const t=this.config;this.config={...s,...e},this.config.changeFrequency=random(this.config.changeFrequency,1.5*this.config.changeFrequency),this.params&&!n(this.config.radius,null==t?void 0:t.radius)&&(this.params.radius=random(...this.config.radius)),n(this.config.images,null==t?void 0:t.images)||this.selectImage()}updateTargetParams(){this.params.nextSpeed=random(...this.config.speed),this.params.nextWind=random(...this.config.wind),this.image&&(this.params.nextRotationSpeed=random(...this.config.rotationSpeed))}update(e,t,o=1){const{x:r,y:n,rotation:a,rotationSpeed:s,nextRotationSpeed:i,wind:l,speed:c,nextWind:d,nextSpeed:p,radius:u}=this.params;this.params.x=(r+l*o)%(e+2*u),this.params.x>e+u&&(this.params.x=-u),this.params.y=(n+c*o)%(t+2*u),this.params.y>t+u&&(this.params.y=-u),this.image&&(this.params.rotation=(a+s)%360),this.params.speed=lerp(c,p,.01),this.params.wind=lerp(l,d,.01),this.params.rotationSpeed=lerp(s,i,.01),this.framesSinceLastUpdate++>this.config.changeFrequency&&(this.updateTargetParams(),this.framesSinceLastUpdate=0)}getImageOffscreenCanvas(e,t){var o,r;if(e instanceof HTMLImageElement&&e.loading)return e;let n=Snowflake.offscreenCanvases.get(e);if(n||(n={},Snowflake.offscreenCanvases.set(e,n)),!(t in n)){const r=document.createElement("canvas");r.width=t,r.height=t,null===(o=r.getContext("2d"))||void 0===o||o.drawImage(e,0,0,t,t),n[t]=r}return null!==(r=n[t])&&void 0!==r?r:e}drawCircle(e){e.moveTo(this.params.x,this.params.y),e.arc(this.params.x,this.params.y,this.params.radius,0,a)}drawImage(e){const{x:t,y:o,rotation:r,radius:n}=this.params,a=r*Math.PI/180,s=Math.cos(a),i=Math.sin(a);1!==this.params.opacity&&(e.save(),e.globalAlpha=this.params.opacity),e.setTransform(s,i,-i,s,t,o);const l=this.getImageOffscreenCanvas(this.image,n);e.drawImage(l,-n/2,-n/2,n,n),1!==this.params.opacity&&e.restore()}}Snowflake.offscreenCanvases=new WeakMap;const i=Snowflake,l={pointerEvents:"none",backgroundColor:"transparent",position:"absolute",top:0,left:0,width:"100%",height:"100%"};var c,d,__classPrivateFieldGet=function(e,t,o,r){if("a"===o&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===o?r:"a"===o?r.call(e):r?r.value:t.get(e)},__classPrivateFieldSet=function(e,t,o,r,n){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?n.call(e,o):n?n.value=o:t.set(e,o),o};class SnowfallCanvas{get ctx(){return __classPrivateFieldGet(this,c,"f")}get canvas(){return __classPrivateFieldGet(this,d,"f")}set canvas(e){__classPrivateFieldSet(this,d,e,"f"),__classPrivateFieldSet(this,c,e.getContext("2d"),"f")}constructor(e,t){this.lastUpdate=Date.now(),this.snowflakes=[],c.set(this,void 0),d.set(this,void 0),__classPrivateFieldSet(this,d,e,"f"),__classPrivateFieldSet(this,c,e.getContext("2d"),"f"),this.config={snowflakeCount:150,...s,...t},this.snowflakes=[],this.snowflakes=i.createSnowflakes(e,t.snowflakeCount||150,t),this.play()}updateConfig(e){this.config={...this.config,...e};const t=this.config.snowflakeCount-this.snowflakes.length;t>0&&(this.snowflakes=[...this.snowflakes,...i.createSnowflakes(this.canvas,t,e)]),t<0&&(this.snowflakes=this.snowflakes.slice(0,this.config.snowflakeCount));for(const e of this.snowflakes)e.updateConfig(this.config)}render(e=1){const{ctx:t,canvas:o,snowflakes:r}=this;if(!t||!o)return;const{offsetWidth:n,offsetHeight:a}=o;for(const t of r)t.update(n,a,e);if(t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,n,a),this.config.images&&this.config.images.length>0)for(const e of r)e.drawImage(t);else{t.beginPath();for(const e of r)e.drawCircle(t);t.fillStyle=this.config.color,t.fill()}}loop(){const e=Date.now(),t=Date.now()-this.lastUpdate;this.lastUpdate=e;const o=t/16.666666666666668;this.render(o),this.animationFrame=requestAnimationFrame((()=>this.loop()))}play(){this.loop()}pause(){this.animationFrame&&(cancelAnimationFrame(this.animationFrame),this.animationFrame=void 0)}}c=new WeakMap,d=new WeakMap;function useDeepMemo(e){const[t,o]=(0,r.useState)(e);return function useDeepCompareEffect(e,t){const o=(0,r.useRef)(t);return n(t,o.current)||(o.current=t),(0,r.useEffect)(e,o.current)}((()=>o(e)),[e]),t}const lib_Snowfall=({color:e=s.color,changeFrequency:t=s.changeFrequency,radius:o=s.radius,speed:n=s.speed,wind:a=s.wind,rotationSpeed:i=s.rotationSpeed,opacity:c=s.opacity,snowflakeCount:d=150,images:p,style:u}={})=>{const f=(h=u,(0,r.useMemo)((()=>({...l,...h||{}})),[h]));var h;const m=(0,r.useRef)(null),g=(e=>{const[t,o]=(0,r.useState)(getSize(e.current)),n=(0,r.useCallback)((()=>{e.current&&o(getSize(e.current))}),[e]);return(0,r.useEffect)((()=>{const{ResizeObserver:t}=window;if(e.current){if(n(),"function"==typeof t){const o=new t(n);return o.observe(e.current),()=>o.disconnect()}return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)}}),[e,n]),t})(m),v=useDeepMemo({color:e,changeFrequency:t,radius:o,speed:n,wind:a,rotationSpeed:i,images:p,snowflakeCount:d,opacity:c}),w=(0,r.useRef)(v),y=(0,r.useRef)();return(0,r.useEffect)((()=>(!y.current&&m.current&&(y.current=new SnowfallCanvas(m.current,w.current)),()=>{var e;null===(e=y.current)||void 0===e||e.pause(),y.current=void 0})),[]),(0,r.useEffect)((()=>{y.current&&y.current.updateConfig(v)}),[v]),r.createElement("canvas",{ref:m,height:g.height,width:g.width,style:f,"data-testid":"SnowfallCanvas"})}}}]);
@@ -1 +0,0 @@
1
- /*! filename:823 */
@@ -1,2 +0,0 @@
1
- /*! For license information please see 940.diva-support.umd.min.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkCrystaldesignDivaSupport=self.webpackChunkCrystaldesignDivaSupport||[]).push([[940],{1679:(n,o,e)=>{e.d(o,{Z:()=>s});var t=e(8081),i=e.n(t),r=e(3645),a=e.n(r)()(i());a.push([n.id,".diva-media-viewer .zoom-controls {\n transform: translateX(-50%);\n left: 50%;\n right: auto;\n right: initial;\n}\n\n.diva-media-viewer .zoom-controls .zoom-out, .diva-media-viewer .zoom-controls .zoom-in {\n border: none;\n background: none;\n width: 28px;\n height: 28px;\n color: #4f4f4f;\n}\n",""]);const s=a},2940:(n,o,e)=>{e.r(o),e.d(o,{default:()=>g});var t=e(3379),i=e.n(t),r=e(7795),a=e.n(r),s=e(569),l=e.n(s),d=e(3565),u=e.n(d),c=e(9216),m=e.n(c),v=e(4589),h=e.n(v),p=e(1679),f={};f.styleTagTransform=h(),f.setAttributes=u(),f.insert=l().bind(null,"head"),f.domAPI=a(),f.insertStyleElement=m();i()(p.Z,f);const g=p.Z&&p.Z.locals?p.Z.locals:void 0}}]);
@@ -1 +0,0 @@
1
- /*! filename:940 */