@crystaldesign/diva-core 25.5.0-beta.22 → 25.5.0-beta.24
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/build/esm/{ModalsWrapper-ee2120f1.js → ModalsWrapper-7a2ef05c.js} +1 -1
- package/build/esm/{index-db8e2a73.js → index-0327e8ea.js} +1 -1
- package/build/esm/{index-4e4e9fad.js → index-ac126fea.js} +103 -4
- package/build/esm/index.js +1 -1
- package/build/types/core/src/handler/AnalyticsHandler/index.d.ts +2 -1
- package/build/types/core/src/handler/AnalyticsHandler/index.d.ts.map +1 -1
- package/build/types/core/src/handler/AnalyticsHandler/types.d.ts +9 -0
- package/build/types/core/src/handler/AnalyticsHandler/types.d.ts.map +1 -1
- package/build/types/core/src/handler/AuthorizationHandler/index.d.ts +1 -0
- package/build/types/core/src/handler/AuthorizationHandler/index.d.ts.map +1 -1
- package/build/types/core/src/store/RootStore.d.ts.map +1 -1
- package/build/umd/122.diva-core.umd.min.js +1 -1
- package/build/umd/210.diva-core.umd.min.js +1 -1
- package/build/umd/215.diva-core.umd.min.js +1 -1
- package/build/umd/515.diva-core.umd.min.js +2 -0
- package/build/umd/515.diva-core.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/731.diva-core.umd.min.js +1 -1
- package/build/umd/83.diva-core.umd.min.js +1 -1
- package/build/umd/922.diva-core.umd.min.js +2 -0
- package/build/umd/922.diva-core.umd.min.js.LICENSE.txt +1 -0
- package/build/umd/959.diva-core.umd.min.js +1 -1
- package/build/umd/diva-core.umd.min.js +19 -19
- package/build/umd/diva-core.umd.min.js.LICENSE.txt +2 -2
- package/build/umd/report.html +1 -1
- package/package.json +10 -10
- package/build/umd/429.diva-core.umd.min.js +0 -2
- package/build/umd/429.diva-core.umd.min.js.LICENSE.txt +0 -1
- package/build/umd/43.diva-core.umd.min.js +0 -2
- package/build/umd/43.diva-core.umd.min.js.LICENSE.txt +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crystaldesign/diva-core",
|
|
3
|
-
"version": "25.5.0-beta.
|
|
3
|
+
"version": "25.5.0-beta.24",
|
|
4
4
|
"license": "COMMERCIAL",
|
|
5
5
|
"homepage": "https://www.diva-portal.de",
|
|
6
6
|
"devDependencies": {
|
|
@@ -12,14 +12,14 @@
|
|
|
12
12
|
"react-dom": "18.3.1"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@crystaldesign/basket-handler": "25.5.0-beta.
|
|
16
|
-
"@crystaldesign/basket-model": "25.5.0-beta.
|
|
17
|
-
"@crystaldesign/content-box": "25.5.0-beta.
|
|
18
|
-
"@crystaldesign/diva-utils": "25.5.0-beta.
|
|
19
|
-
"@crystaldesign/forms": "25.5.0-beta.
|
|
20
|
-
"@crystaldesign/grid": "25.5.0-beta.
|
|
21
|
-
"@crystaldesign/media-upload": "25.5.0-beta.
|
|
22
|
-
"@crystaldesign/product-handler": "25.5.0-beta.
|
|
15
|
+
"@crystaldesign/basket-handler": "25.5.0-beta.24",
|
|
16
|
+
"@crystaldesign/basket-model": "25.5.0-beta.24",
|
|
17
|
+
"@crystaldesign/content-box": "25.5.0-beta.24",
|
|
18
|
+
"@crystaldesign/diva-utils": "25.5.0-beta.24",
|
|
19
|
+
"@crystaldesign/forms": "25.5.0-beta.24",
|
|
20
|
+
"@crystaldesign/grid": "25.5.0-beta.24",
|
|
21
|
+
"@crystaldesign/media-upload": "25.5.0-beta.24",
|
|
22
|
+
"@crystaldesign/product-handler": "25.5.0-beta.24",
|
|
23
23
|
"@elastic/apm-rum": "^5.16.1",
|
|
24
24
|
"@elastic/apm-rum-react": "^2.0.2",
|
|
25
25
|
"@emotion/react": "^11.4.1",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
},
|
|
51
51
|
"types": "./build/types/core/src/index.d.ts",
|
|
52
52
|
"module": "build/esm/index.js",
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "b0281d1b0a636e6ec318b25ce2f3c29d5fec5d49"
|
|
54
54
|
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 429.diva-core.umd.min.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkCrystaldesignDivaCore=self.webpackChunkCrystaldesignDivaCore||[]).push([[429],{956:(e,t,n)=>{n.d(t,{Z:()=>z});var o=n(7363),r=n(7726),i=n(4062),a=n(8556),s=n(1522),l=n(2793),d=n(9045),c=n(7582),u=n(7514);const p=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function defaultGetTabbable(e){const t=[],n=[];return Array.from(e.querySelectorAll(p)).forEach(((e,o)=>{const r=function getTabIndex(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==r&&function isNodeMatchingSelectorFocusable(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function isNonTabbableRadio(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const getRadio=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`);let t=getRadio(`[name="${e.name}"]:checked`);return t||(t=getRadio(`[name="${e.name}"]`)),t!==e}(e))}(e)&&(0===r?t.push(e):n.push({documentOrder:o,tabIndex:r,node:e}))})),n.sort(((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex)).map((e=>e.node)).concat(t)}function defaultIsEnabled(){return!0}const f=function FocusTrap(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:a=defaultGetTabbable,isEnabled:s=defaultIsEnabled,open:p}=e,f=o.useRef(!1),m=o.useRef(null),g=o.useRef(null),h=o.useRef(null),b=o.useRef(null),x=o.useRef(!1),v=o.useRef(null),y=(0,l.Z)((0,d.Z)(t),v),w=o.useRef(null);o.useEffect((()=>{p&&v.current&&(x.current=!n)}),[n,p]),o.useEffect((()=>{if(!p||!v.current)return;const e=(0,c.Z)(v.current);return v.current.contains(e.activeElement)||(v.current.hasAttribute("tabIndex")||v.current.setAttribute("tabIndex","-1"),x.current&&v.current.focus()),()=>{i||(h.current&&h.current.focus&&(f.current=!0,h.current.focus()),h.current=null)}}),[p]),o.useEffect((()=>{if(!p||!v.current)return;const e=(0,c.Z)(v.current),loopFocus=t=>{w.current=t,!r&&s()&&"Tab"===t.key&&e.activeElement===v.current&&t.shiftKey&&(f.current=!0,g.current&&g.current.focus())},contain=()=>{const t=v.current;if(null===t)return;if(!e.hasFocus()||!s()||f.current)return void(f.current=!1);if(t.contains(e.activeElement))return;if(r&&e.activeElement!==m.current&&e.activeElement!==g.current)return;if(e.activeElement!==b.current)b.current=null;else if(null!==b.current)return;if(!x.current)return;let n=[];if(e.activeElement!==m.current&&e.activeElement!==g.current||(n=a(v.current)),n.length>0){const e=Boolean(w.current?.shiftKey&&"Tab"===w.current?.key),t=n[0],o=n[n.length-1];"string"!=typeof t&&"string"!=typeof o&&(e?o.focus():t.focus())}else t.focus()};e.addEventListener("focusin",contain),e.addEventListener("keydown",loopFocus,!0);const t=setInterval((()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&contain()}),50);return()=>{clearInterval(t),e.removeEventListener("focusin",contain),e.removeEventListener("keydown",loopFocus,!0)}}),[n,r,i,s,p,a]);const handleFocusSentinel=e=>{null===h.current&&(h.current=e.relatedTarget),x.current=!0};return(0,u.jsxs)(o.Fragment,{children:[(0,u.jsx)("div",{tabIndex:p?0:-1,onFocus:handleFocusSentinel,ref:m,"data-testid":"sentinelStart"}),o.cloneElement(t,{ref:y,onFocus:e=>{null===h.current&&(h.current=e.relatedTarget),x.current=!0,b.current=e.target;const n=t.props.onFocus;n&&n(e)}}),(0,u.jsx)("div",{tabIndex:p?0:-1,onFocus:handleFocusSentinel,ref:g,"data-testid":"sentinelEnd"})]})};var m=n(1533),g=n(2950),h=n(2221);const b=o.forwardRef((function Portal(e,t){const{children:n,container:r,disablePortal:i=!1}=e,[a,s]=o.useState(null),c=(0,l.Z)(o.isValidElement(n)?(0,d.Z)(n):null,t);if((0,g.Z)((()=>{i||s(function getContainer(e){return"function"==typeof e?e():e}(r)||document.body)}),[r,i]),(0,g.Z)((()=>{if(a&&!i)return(0,h.Z)(t,a),()=>{(0,h.Z)(t,null)}}),[t,a,i]),i){if(o.isValidElement(n)){const e={ref:c};return o.cloneElement(n,e)}return n}return a?m.createPortal(n,a):a}));var x=n(7843),v=n(518),y=n(2893),w=n(7204),Z=n(3767),C=n(1499),E=n(23),P=n(8080);const S={entering:{opacity:1},entered:{opacity:1}},k=o.forwardRef((function Fade(e,t){const n=(0,C.Z)(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:s,easing:l,in:c,onEnter:p,onEntered:f,onEntering:m,onExit:g,onExited:h,onExiting:b,style:x,timeout:v=r,TransitionComponent:y=Z.ZP,...w}=e,k=o.useRef(null),R=(0,P.Z)(k,(0,d.Z)(s),t),normalizedTransitionCallback=e=>t=>{if(e){const n=k.current;void 0===t?e(n):e(n,t)}},T=normalizedTransitionCallback(m),M=normalizedTransitionCallback(((e,t)=>{(0,E.n)(e);const o=(0,E.C)({style:x,timeout:v,easing:l},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",o),e.style.transition=n.transitions.create("opacity",o),p&&p(e,t)})),D=normalizedTransitionCallback(f),F=normalizedTransitionCallback(b),I=normalizedTransitionCallback((e=>{const t=(0,E.C)({style:x,timeout:v,easing:l},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),g&&g(e)})),W=normalizedTransitionCallback(h);return(0,u.jsx)(y,{appear:a,in:c,nodeRef:k,onEnter:M,onEntered:D,onEntering:T,onExit:I,onExited:W,onExiting:F,addEndListener:e=>{i&&i(k.current,e)},timeout:v,...w,children:(e,{ownerState:t,...n})=>o.cloneElement(s,{style:{opacity:0,visibility:"exited"!==e||c?void 0:"hidden",...S[e],...x,...s.props.style},ref:R,...n})})}));var R=n(3966),T=n(431);function getBackdropUtilityClass(e){return(0,T.ZP)("MuiBackdrop",e)}(0,R.Z)("MuiBackdrop",["root","invisible"]);const M=(0,x.ZP)("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),D=o.forwardRef((function Backdrop(e,t){const n=(0,y.i)({props:e,name:"MuiBackdrop"}),{children:o,className:a,component:s="div",invisible:l=!1,open:d,components:c={},componentsProps:p={},slotProps:f={},slots:m={},TransitionComponent:g,transitionDuration:h,...b}=n,x={...n,component:s,invisible:l},v=(e=>{const{classes:t,invisible:n}=e,o={root:["root",n&&"invisible"]};return(0,i.Z)(o,getBackdropUtilityClass,t)})(x),Z={slots:{transition:g,root:c.Root,...m},slotProps:{...p,...f}},[C,E]=(0,w.Z)("root",{elementType:M,externalForwardedProps:Z,className:(0,r.Z)(v.root,a),ownerState:x}),[P,S]=(0,w.Z)("transition",{elementType:k,externalForwardedProps:Z,ownerState:x});return(0,u.jsx)(P,{in:d,timeout:h,...b,...S,children:(0,u.jsx)(C,{"aria-hidden":!0,...E,classes:v,ref:t,children:o})})}));var F=n(5325);function createChainedFunction(...e){return e.reduce(((e,t)=>null==t?e:function chainedFunction(...n){e.apply(this,n),t.apply(this,n)}),(()=>{}))}var I=n(5422);function ownerWindow(e){return(0,c.Z)(e).defaultView||window}function ariaHidden(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function getPaddingRight(e){return parseInt(ownerWindow(e).getComputedStyle(e).paddingRight,10)||0}function ariaHiddenSiblings(e,t,n,o,r){const i=[t,n,...o];[].forEach.call(e.children,(e=>{const t=!i.includes(e),n=!function isAriaHiddenForbiddenOnElement(e){const t=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&ariaHidden(e,r)}))}function findIndexOf(e,t){let n=-1;return e.some(((e,o)=>!!t(e)&&(n=o,!0))),n}function handleContainer(e,t){const n=[],o=e.container;if(!t.disableScrollLock){if(function isOverflowing(e){const t=(0,c.Z)(e);return t.body===e?ownerWindow(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(o)){const e=function getScrollbarSize(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}(ownerWindow(o));n.push({value:o.style.paddingRight,property:"padding-right",el:o}),o.style.paddingRight=`${getPaddingRight(o)+e}px`;const t=(0,c.Z)(o).querySelectorAll(".mui-fixed");[].forEach.call(t,(t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${getPaddingRight(t)+e}px`}))}let e;if(o.parentNode instanceof DocumentFragment)e=(0,c.Z)(o).body;else{const t=o.parentElement,n=ownerWindow(o);e="HTML"===t?.nodeName&&"scroll"===n.getComputedStyle(t).overflowY?t:o}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach((({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)}))}}const noop=()=>{},W=new class ModalManager{constructor(){this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&ariaHidden(e.modalRef,!1);const o=function getHiddenSiblings(e){const t=[];return[].forEach.call(e.children,(e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);ariaHiddenSiblings(t,e.mount,e.modalRef,o,!0);const r=findIndexOf(this.containers,(e=>e.container===t));return-1!==r?(this.containers[r].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:o}),n)}mount(e,t){const n=findIndexOf(this.containers,(t=>t.modals.includes(e))),o=this.containers[n];o.restore||(o.restore=handleContainer(o,t))}remove(e,t=!0){const n=this.modals.indexOf(e);if(-1===n)return n;const o=findIndexOf(this.containers,(t=>t.modals.includes(e))),r=this.containers[o];if(r.modals.splice(r.modals.indexOf(e),1),this.modals.splice(n,1),0===r.modals.length)r.restore&&r.restore(),e.modalRef&&ariaHidden(e.modalRef,t),ariaHiddenSiblings(r.container,e.mount,e.modalRef,r.hiddenSiblings,!1),this.containers.splice(o,1);else{const e=r.modals[r.modals.length-1];e.modalRef&&ariaHidden(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};const A=function useModal(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:i=!1,onTransitionEnter:a,onTransitionExited:s,children:d,onClose:u,open:p,rootRef:f}=e,m=o.useRef({}),g=o.useRef(null),h=o.useRef(null),b=(0,l.Z)(h,f),[x,v]=o.useState(!p),y=function getHasTransition(e){return!!e&&e.props.hasOwnProperty("in")}(d);let w=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(w=!1);const getModal=()=>(m.current.modalRef=h.current,m.current.mount=g.current,m.current),handleMounted=()=>{W.mount(getModal(),{disableScrollLock:r}),h.current&&(h.current.scrollTop=0)},Z=(0,F.Z)((()=>{const e=function useModal_getContainer(e){return"function"==typeof e?e():e}(t)||(0,c.Z)(g.current).body;W.add(getModal(),e),h.current&&handleMounted()})),isTopModal=()=>W.isTopModal(getModal()),C=(0,F.Z)((e=>{g.current=e,e&&(p&&isTopModal()?handleMounted():h.current&&ariaHidden(h.current,w))})),E=o.useCallback((()=>{W.remove(getModal(),w)}),[w]);o.useEffect((()=>()=>{E()}),[E]),o.useEffect((()=>{p?Z():y&&i||E()}),[p,E,y,i,Z]);const createHandleKeyDown=e=>t=>{e.onKeyDown?.(t),"Escape"===t.key&&229!==t.which&&isTopModal()&&(n||(t.stopPropagation(),u&&u(t,"escapeKeyDown")))},createHandleBackdropClick=e=>t=>{e.onClick?.(t),t.target===t.currentTarget&&u&&u(t,"backdropClick")};return{getRootProps:(t={})=>{const n=(0,I.Z)(e);delete n.onTransitionEnter,delete n.onTransitionExited;const o={...n,...t};return{role:"presentation",...o,onKeyDown:createHandleKeyDown(o),ref:b}},getBackdropProps:(e={})=>{const t=e;return{"aria-hidden":!0,...t,onClick:createHandleBackdropClick(t),open:p}},getTransitionProps:()=>({onEnter:createChainedFunction((()=>{v(!1),a&&a()}),d?.props.onEnter??noop),onExited:createChainedFunction((()=>{v(!0),s&&s(),i&&E()}),d?.props.onExited??noop)}),rootRef:b,portalRef:C,isTopModal,exited:x,hasTransition:y}};function getModalUtilityClass(e){return(0,T.ZP)("MuiModal",e)}(0,R.Z)("MuiModal",["root","hidden","backdrop"]);const N=(0,x.ZP)("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})((0,v.Z)((({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:e})=>!e.open&&e.exited,style:{visibility:"hidden"}}]})))),B=(0,x.ZP)(D,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),j=o.forwardRef((function Modal(e,t){const n=(0,y.i)({name:"MuiModal",props:e}),{BackdropComponent:a=B,BackdropProps:s,classes:l,className:d,closeAfterTransition:c=!1,children:p,container:m,component:g,components:h={},componentsProps:x={},disableAutoFocus:v=!1,disableEnforceFocus:Z=!1,disableEscapeKeyDown:C=!1,disablePortal:E=!1,disableRestoreFocus:P=!1,disableScrollLock:S=!1,hideBackdrop:k=!1,keepMounted:R=!1,onBackdropClick:T,onClose:M,onTransitionEnter:D,onTransitionExited:F,open:I,slotProps:W={},slots:j={},theme:O,...L}=n,U={...n,closeAfterTransition:c,disableAutoFocus:v,disableEnforceFocus:Z,disableEscapeKeyDown:C,disablePortal:E,disableRestoreFocus:P,disableScrollLock:S,hideBackdrop:k,keepMounted:R},{getRootProps:$,getBackdropProps:H,getTransitionProps:K,portalRef:Y,isTopModal:z,exited:V,hasTransition:X}=A({...U,rootRef:t}),q={...U,exited:V},G=(e=>{const{open:t,exited:n,classes:o}=e,r={root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]};return(0,i.Z)(r,getModalUtilityClass,o)})(q),_={};if(void 0===p.props.tabIndex&&(_.tabIndex="-1"),X){const{onEnter:e,onExited:t}=K();_.onEnter=e,_.onExited=t}const J={slots:{root:h.Root,backdrop:h.Backdrop,...j},slotProps:{...x,...W}},[Q,ee]=(0,w.Z)("root",{ref:t,elementType:N,externalForwardedProps:{...J,...L,component:g},getSlotProps:$,ownerState:q,className:(0,r.Z)(d,G?.root,!q.open&&q.exited&&G?.hidden)}),[te,ne]=(0,w.Z)("backdrop",{ref:s?.ref,elementType:a,externalForwardedProps:J,shouldForwardComponentProp:!0,additionalProps:s,getSlotProps:e=>H({...e,onClick:t=>{T&&T(t),e?.onClick&&e.onClick(t)}}),className:(0,r.Z)(s?.className,G?.backdrop),ownerState:q});return R||I||X&&!V?(0,u.jsx)(b,{ref:Y,container:m,disablePortal:E,children:(0,u.jsxs)(Q,{...ee,children:[!k&&a?(0,u.jsx)(te,{...ne}):null,(0,u.jsx)(f,{disableEnforceFocus:Z,disableAutoFocus:v,disableRestoreFocus:P,isEnabled:z,open:I,children:o.cloneElement(p,_)})]})}):null}));var O=n(9173);function getDialogUtilityClass(e){return(0,T.ZP)("MuiDialog",e)}const L=(0,R.Z)("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]);var U=n(5814);const $=(0,x.ZP)(D,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),H=(0,x.ZP)(j,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),K=(0,x.ZP)("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${(0,s.Z)(n.scroll)}`]]}})({height:"100%","@media print":{height:"auto"},outline:0,variants:[{props:{scroll:"paper"},style:{display:"flex",justifyContent:"center",alignItems:"center"}},{props:{scroll:"body"},style:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}}]}),Y=(0,x.ZP)(O.Z,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${(0,s.Z)(n.scroll)}`],t[`paperWidth${(0,s.Z)(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})((0,v.Z)((({theme:e})=>({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"},variants:[{props:{scroll:"paper"},style:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"}},{props:{scroll:"body"},style:{display:"inline-block",verticalAlign:"middle",textAlign:"initial"}},{props:({ownerState:e})=>!e.maxWidth,style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:"px"===e.breakpoints.unit?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${L.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}}},...Object.keys(e.breakpoints.values).filter((e=>"xs"!==e)).map((t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`,[`&.${L.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t]+64)]:{maxWidth:"calc(100% - 64px)"}}}}))),{props:({ownerState:e})=>e.fullWidth,style:{width:"calc(100% - 64px)"}},{props:({ownerState:e})=>e.fullScreen,style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${L.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]})))),z=o.forwardRef((function Dialog(e,t){const n=(0,y.i)({props:e,name:"MuiDialog"}),l=(0,C.Z)(),d={enter:l.transitions.duration.enteringScreen,exit:l.transitions.duration.leavingScreen},{"aria-describedby":c,"aria-labelledby":p,"aria-modal":f=!0,BackdropComponent:m,BackdropProps:g,children:h,className:b,disableEscapeKeyDown:x=!1,fullScreen:v=!1,fullWidth:Z=!1,maxWidth:E="sm",onBackdropClick:P,onClick:S,onClose:R,open:T,PaperComponent:M=O.Z,PaperProps:D={},scroll:F="paper",slots:I={},slotProps:W={},TransitionComponent:A=k,transitionDuration:N=d,TransitionProps:B,...j}=n,L={...n,disableEscapeKeyDown:x,fullScreen:v,fullWidth:Z,maxWidth:E,scroll:F},z=(e=>{const{classes:t,scroll:n,maxWidth:o,fullWidth:r,fullScreen:a}=e,l={root:["root"],container:["container",`scroll${(0,s.Z)(n)}`],paper:["paper",`paperScroll${(0,s.Z)(n)}`,`paperWidth${(0,s.Z)(String(o))}`,r&&"paperFullWidth",a&&"paperFullScreen"]};return(0,i.Z)(l,getDialogUtilityClass,t)})(L),V=o.useRef(),X=(0,a.Z)(p),q=o.useMemo((()=>({titleId:X})),[X]),G={slots:{transition:A,...I},slotProps:{transition:B,paper:D,backdrop:g,...W}},[_,J]=(0,w.Z)("root",{elementType:H,shouldForwardComponentProp:!0,externalForwardedProps:G,ownerState:L,className:(0,r.Z)(z.root,b),ref:t}),[Q,ee]=(0,w.Z)("backdrop",{elementType:$,shouldForwardComponentProp:!0,externalForwardedProps:G,ownerState:L}),[te,ne]=(0,w.Z)("paper",{elementType:Y,shouldForwardComponentProp:!0,externalForwardedProps:G,ownerState:L,className:(0,r.Z)(z.paper,D.className)}),[oe,re]=(0,w.Z)("container",{elementType:K,externalForwardedProps:G,ownerState:L,className:(0,r.Z)(z.container)}),[ie,ae]=(0,w.Z)("transition",{elementType:k,externalForwardedProps:G,ownerState:L,additionalProps:{appear:!0,in:T,timeout:N,role:"presentation"}});return(0,u.jsx)(_,{closeAfterTransition:!0,slots:{backdrop:Q},slotProps:{backdrop:{transitionDuration:N,as:m,...ee}},disableEscapeKeyDown:x,onClose:R,open:T,onClick:e=>{S&&S(e),V.current&&(V.current=null,P&&P(e),R&&R(e,"backdropClick"))},...J,...j,children:(0,u.jsx)(ie,{...ae,children:(0,u.jsx)(oe,{onMouseDown:e=>{V.current=e.target===e.currentTarget},...re,children:(0,u.jsx)(te,{as:M,elevation:24,role:"dialog","aria-describedby":c,"aria-labelledby":X,"aria-modal":f,...ne,children:(0,u.jsx)(U.Z.Provider,{value:q,children:h})})})})})}))},5814:(e,t,n)=>{n.d(t,{Z:()=>r});var o=n(7363);const r=o.createContext({})},9400:(e,t,n)=>{n.d(t,{Z:()=>p});var o=n(7363),r=n(7726),i=n(4062),a=n(7843),s=n(2893),l=n(3966),d=n(431);function getDialogActionsUtilityClass(e){return(0,d.ZP)("MuiDialogActions",e)}(0,l.Z)("MuiDialogActions",["root","spacing"]);var c=n(7514);const u=(0,a.ZP)("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto",variants:[{props:({ownerState:e})=>!e.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),p=o.forwardRef((function DialogActions(e,t){const n=(0,s.i)({props:e,name:"MuiDialogActions"}),{className:o,disableSpacing:a=!1,...l}=n,d={...n,disableSpacing:a},p=(e=>{const{classes:t,disableSpacing:n}=e,o={root:["root",!n&&"spacing"]};return(0,i.Z)(o,getDialogActionsUtilityClass,t)})(d);return(0,c.jsx)(u,{className:(0,r.Z)(p.root,o),ownerState:d,ref:t,...l})}))},4415:(e,t,n)=>{n.d(t,{Z:()=>m});var o=n(7363),r=n(7726),i=n(4062),a=n(7843),s=n(518),l=n(2893),d=n(3966),c=n(431);function getDialogContentUtilityClass(e){return(0,c.ZP)("MuiDialogContent",e)}(0,d.Z)("MuiDialogContent",["root","dividers"]);var u=n(9416),p=n(7514);const f=(0,a.ZP)("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})((0,s.Z)((({theme:e})=>({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px",variants:[{props:({ownerState:e})=>e.dividers,style:{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>!e.dividers,style:{[`.${u.Z.root} + &`]:{paddingTop:0}}}]})))),m=o.forwardRef((function DialogContent(e,t){const n=(0,l.i)({props:e,name:"MuiDialogContent"}),{className:o,dividers:a=!1,...s}=n,d={...n,dividers:a},c=(e=>{const{classes:t,dividers:n}=e,o={root:["root",n&&"dividers"]};return(0,i.Z)(o,getDialogContentUtilityClass,t)})(d);return(0,p.jsx)(f,{className:(0,r.Z)(c.root,o),ownerState:d,ref:t,...s})}))},1824:(e,t,n)=>{n.d(t,{Z:()=>m});var o=n(7363),r=n(7726),i=n(4062),a=n(1684),s=n(7843),l=n(2893),d=n(5282),c=n(3966),u=n(431);function getDialogContentTextUtilityClass(e){return(0,u.ZP)("MuiDialogContentText",e)}(0,c.Z)("MuiDialogContentText",["root"]);var p=n(7514);const f=(0,s.ZP)(d.Z,{shouldForwardProp:e=>(0,a.Z)(e)||"classes"===e,name:"MuiDialogContentText",slot:"Root",overridesResolver:(e,t)=>t.root})({}),m=o.forwardRef((function DialogContentText(e,t){const n=(0,l.i)({props:e,name:"MuiDialogContentText"}),{children:o,className:a,...s}=n,d=(e=>{const{classes:t}=e,n=(0,i.Z)({root:["root"]},getDialogContentTextUtilityClass,t);return{...t,...n}})(s);return(0,p.jsx)(f,{component:"p",variant:"body1",color:"textSecondary",ref:t,ownerState:s,className:(0,r.Z)(d.root,a),...n,classes:d})}))},9763:(e,t,n)=>{n.d(t,{Z:()=>f});var o=n(7363),r=n(7726),i=n(4062),a=n(5282),s=n(7843),l=n(2893),d=n(9416),c=n(5814),u=n(7514);const p=(0,s.ZP)(a.Z,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),f=o.forwardRef((function DialogTitle(e,t){const n=(0,l.i)({props:e,name:"MuiDialogTitle"}),{className:a,id:s,...f}=n,m=n,g=(e=>{const{classes:t}=e;return(0,i.Z)({root:["root"]},d.a,t)})(m),{titleId:h=s}=o.useContext(c.Z);return(0,u.jsx)(p,{component:"h2",className:(0,r.Z)(g.root,a),ownerState:m,ref:t,variant:"h6",id:s??h,...f})}))},9416:(e,t,n)=>{n.d(t,{Z:()=>i,a:()=>getDialogTitleUtilityClass});var o=n(3966),r=n(431);function getDialogTitleUtilityClass(e){return(0,r.ZP)("MuiDialogTitle",e)}const i=(0,o.Z)("MuiDialogTitle",["root"])}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! filename:429 */
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 43.diva-core.umd.min.js.LICENSE.txt */
|
|
2
|
-
(self.webpackChunkCrystaldesignDivaCore=self.webpackChunkCrystaldesignDivaCore||[]).push([[43],{6033:(e,t,r)=>{"use strict";r.d(t,{Z:()=>F});var o=r(7363),n=r(7726),a=r(4062),s=r(9074),i=r(7843),l=r(518),c=r(2893),d=r(7204),p=r(1522),u=r(8981),f=r(9173),h=r(3966),m=r(431);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=r(3697),y=r(6177),w=r(7514);const x=(0,y.Z)((0,w.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"),C=(0,y.Z)((0,w.jsx)("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),S=(0,y.Z)((0,w.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,y.Z)((0,w.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,y.Z)((0,w.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:r}=e;return[t.root,t[r.variant],t[`${r.variant}${(0,p.Z)(r.color||r.severity)}`]]}})((0,l.Z)((({theme:e})=>{const t="light"===e.palette.mode?s._j:s.$n,r="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((([o])=>({props:{colorSeverity:o,variant:"standard"},style:{color:e.vars?e.vars.palette.Alert[`${o}Color`]:t(e.palette[o].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${o}StandardBg`]:r(e.palette[o].light,.9),[`& .${g.icon}`]:e.vars?{color:e.vars.palette.Alert[`${o}IconColor`]}:{color:e.palette[o].main}}}))),...Object.entries(e.palette).filter((0,u.Z)(["light"])).map((([r])=>({props:{colorSeverity:r,variant:"outlined"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),border:`1px solid ${(e.vars||e).palette[r].light}`,[`& .${g.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].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}),A={success:(0,w.jsx)(x,{fontSize:"inherit"}),warning:(0,w.jsx)(C,{fontSize:"inherit"}),error:(0,w.jsx)(S,{fontSize:"inherit"}),info:(0,w.jsx)(k,{fontSize:"inherit"})},F=o.forwardRef((function Alert(e,t){const r=(0,c.i)({props:e,name:"MuiAlert"}),{action:o,children:s,className:i,closeText:l="Close",color:u,components:f={},componentsProps:h={},icon:m,iconMapping:g=A,onClose:y,role:x="alert",severity:C="success",slotProps:S={},slots:k={},variant:F="standard",...j}=r,R={...r,color:u,severity:C,variant:F,colorSeverity:u||C},I=(e=>{const{variant:t,color:r,severity:o,classes:n}=e,s={root:["root",`color${(0,p.Z)(r||o)}`,`${t}${(0,p.Z)(r||o)}`,`${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,...S}},[O,E]=(0,d.Z)("root",{ref:t,shouldForwardComponentProp:!0,className:(0,n.Z)(I.root,i),elementType:Z,externalForwardedProps:{...$,...j},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}),[N,W]=(0,d.Z)("action",{className:I.action,elementType:M,externalForwardedProps:$,ownerState:R}),[H,U]=(0,d.Z)("closeButton",{elementType:v.Z,externalForwardedProps:$,ownerState:R}),[V,D]=(0,d.Z)("closeIcon",{elementType:b,externalForwardedProps:$,ownerState:R});return(0,w.jsxs)(O,{...E,children:[!1!==m?(0,w.jsx)(B,{...L,children:m||g[C]||A[C]}):null,(0,w.jsx)(T,{...q,children:s}),null!=o?(0,w.jsx)(N,{...W,children:o}):null,null==o&&y?(0,w.jsx)(N,{...W,children:(0,w.jsx)(H,{size:"small","aria-label":l,title:l,color:"inherit",onClick:y,...U,children:(0,w.jsx)(V,{fontSize:"small",...D})})}):null]})}))},1705:(e,t,r)=>{"use strict";r.d(t,{Z:()=>R});var o=r(7363),n=r(7726),a=r(4062),s=r(9074),i=r(1522),l=r(1684),c=r(7843);const d=function useControlled({controlled:e,default:t,name:r,state:n="value"}){const{current:a}=o.useRef(void 0!==e),[s,i]=o.useState(t);return[a?e:s,o.useCallback((e=>{a||i(e)}),[])]};const p=o.createContext(void 0);var u=r(189),f=r(3966),h=r(431);function getSwitchBaseUtilityClass(e){return(0,h.ZP)("PrivateSwitchBase",e)}(0,f.Z)("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);var m=r(7204),g=r(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}}]}),y=(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}),w=o.forwardRef((function SwitchBase(e,t){const{autoFocus:r,checked:n,checkedIcon:s,defaultChecked:l,disabled:c,disableFocusRipple:u=!1,edge:f=!1,icon:h,id:w,inputProps:x,inputRef:C,name:S,onBlur:k,onChange:b,onFocus:Z,readOnly:P,required:z=!1,tabIndex:M,type:A,value:F,slots:j={},slotProps:R={},...I}=e,[$,O]=d({controlled:n,default:Boolean(l),name:"SwitchBase",state:"checked"}),E=function useFormControl(){return o.useContext(p)}();let B=c;E&&void 0===B&&(B=E.disabled);const L="checkbox"===A||"radio"===A,T={...e,checked:$,disabled:B,disableFocusRipple:u,edge:f},q=(e=>{const{classes:t,checked:r,disabled:o,edge:n}=e,s={root:["root",r&&"checked",o&&"disabled",n&&`edge${(0,i.Z)(n)}`],input:["input"]};return(0,a.Z)(s,getSwitchBaseUtilityClass,t)})(T),N={slots:j,slotProps:{input:x,...R}},[W,H]=(0,m.Z)("root",{ref:t,elementType:v,className:q.root,shouldForwardComponentProp:!0,externalForwardedProps:{...N,component:"span",...I},getSlotProps:e=>({...e,onFocus:t=>{e.onFocus?.(t),(e=>{Z&&Z(e),E&&E.onFocus&&E.onFocus(e)})(t)},onBlur:t=>{e.onBlur?.(t),(e=>{k&&k(e),E&&E.onBlur&&E.onBlur(e)})(t)}}),ownerState:T,additionalProps:{centerRipple:!0,focusRipple:!u,disabled:B,role:void 0,tabIndex:null}}),[U,V]=(0,m.Z)("input",{ref:C,elementType:y,className:q.input,externalForwardedProps:N,getSlotProps:e=>({onChange:t=>{e.onChange?.(t),(e=>{if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked;O(t),b&&b(e,t)})(t)}}),ownerState:T,additionalProps:{autoFocus:r,checked:n,defaultChecked:l,disabled:B,id:L?w:void 0,name:S,readOnly:P,required:z,tabIndex:M,type:A,..."checkbox"===A&&void 0===F?{}:{value:F}}});return(0,g.jsxs)(W,{...H,children:[(0,g.jsx)(U,{...V}),$?s:h]})}));var x=r(6177);const C=(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"),S=(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=r(518),P=r(8981),z=r(2893);function mergeSlotProps(e,t){if(!e)return t;if("function"==typeof e||"function"==typeof t)return r=>{const o="function"==typeof t?t(r):t,a="function"==typeof e?e({...r,...o}):e,s=(0,n.Z)(r?.className,o?.className,a?.className);return{...o,...a,...!!s&&{className:s},...o?.style&&a?.style&&{style:{...o.style,...a.style}},...o?.sx&&a?.sx&&{sx:[...Array.isArray(o.sx)?o.sx:[o.sx],...Array.isArray(a.sx)?a.sx:[a.sx]]}}};const r=t,o=(0,n.Z)(r?.className,e?.className);return{...t,...e,...!!o&&{className:o},...r?.style&&e?.style&&{style:{...r.style,...e.style}},...r?.sx&&e?.sx&&{sx:[...Array.isArray(r.sx)?r.sx:[r.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}const M=(0,c.ZP)(w,{shouldForwardProp:e=>(0,l.Z)(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.indeterminate&&t.indeterminate,t[`size${(0,i.Z)(r.size)}`],"default"!==r.color&&t[`color${(0,i.Z)(r.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"}}}}]})))),A=(0,g.jsx)(S,{}),F=(0,g.jsx)(C,{}),j=(0,g.jsx)(k,{}),R=o.forwardRef((function Checkbox(e,t){const r=(0,z.i)({props:e,name:"MuiCheckbox"}),{checkedIcon:s=A,color:l="primary",icon:c=F,indeterminate:d=!1,indeterminateIcon:p=j,inputProps:u,size:f="medium",disableRipple:h=!1,className:v,slots:y={},slotProps:w={},...x}=r,C=d?p:c,S=d?p:s,k={...r,disableRipple:h,color:l,indeterminate:d,size:f},b=(e=>{const{classes:t,indeterminate:r,color:o,size:n}=e,s={root:["root",r&&"indeterminate",`color${(0,i.Z)(o)}`,`size${(0,i.Z)(n)}`]},l=(0,a.Z)(s,getCheckboxUtilityClass,t);return{...t,...l}})(k),Z=w.input??u,[P,R]=(0,m.Z)("root",{ref:t,elementType:M,className:(0,n.Z)(b.root,v),shouldForwardComponentProp:!0,externalForwardedProps:{slots:y,slotProps:w,...x},ownerState:k,additionalProps:{type:"checkbox",icon:o.cloneElement(C,{fontSize:C.props.fontSize??f}),checkedIcon:o.cloneElement(S,{fontSize:S.props.fontSize??f}),disableRipple:h,slots:y,slotProps:{input:mergeSlotProps("function"==typeof Z?Z(k):Z,{"data-indeterminate":d})}}});return(0,g.jsx)(P,{...R,classes:b})}))},8942:(e,t,r)=>{var o=r(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 r,o,l,c;if(Array.isArray(e)){if((r=e.length)!=t.length)return!1;for(o=r;0!=o--;)if(!equal(e[o],t[o]))return!1;return!0}if(a&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(c=e.entries();!(o=c.next()).done;)if(!t.has(o.value[0]))return!1;for(c=e.entries();!(o=c.next()).done;)if(!equal(o.value[1],t.get(o.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();!(o=c.next()).done;)if(!t.has(o.value[0]))return!1;return!0}if(i&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if((r=e.length)!=t.length)return!1;for(o=r;0!=o--;)if(e[o]!==t[o])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((r=(l=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(o=r;0!=o--;)if(!Object.prototype.hasOwnProperty.call(t,l[o]))return!1;if(n&&e instanceof Element)return!1;for(o=r;0!=o--;)if(("_owner"!==l[o]&&"__v"!==l[o]&&"__o"!==l[o]||!e.$$typeof)&&!equal(e[l[o]],t[l[o]]))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 o.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}},4376:(e,t,r)=>{"use strict";r.d(t,{Z:()=>lib_Snowfall});var o=r(7363),n=r(8942);function random(e,t){const r=Math.random()*(t-e+1)+e;return Number.isInteger(e)&&Number.isInteger(t)?Math.floor(r):r}function lerp(e,t,r){return(1-r)*e+r*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,r){if(!e)return[];const o=[];for(let n=0;n<t;n++)o.push(new Snowflake(e,r));return o}constructor(e,t={}){this.updateConfig(t);const{radius:r,wind:o,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(...r),speed:random(...n),wind:random(...o),rotationSpeed:random(...a),nextSpeed:random(...n),nextWind:random(...o),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,r=1){const{x:o,y:n,rotation:a,rotationSpeed:s,nextRotationSpeed:i,wind:l,speed:c,nextWind:d,nextSpeed:p,radius:u}=this.params;this.params.x=(o+l*r)%(e+2*u),this.params.x>e+u&&(this.params.x=-u),this.params.y=(n+c*r)%(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 r,o;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 o=document.createElement("canvas");o.width=t,o.height=t,null===(r=o.getContext("2d"))||void 0===r||r.drawImage(e,0,0,t,t),n[t]=o}return null!==(o=n[t])&&void 0!==o?o: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:r,rotation:o,radius:n}=this.params,a=o*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,r);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,r,o){if("a"===r&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?o:"a"===r?o.call(e):o?o.value:t.get(e)},__classPrivateFieldSet=function(e,t,r,o,n){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!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"===o?n.call(e,r):n?n.value=r:t.set(e,r),r};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:r,snowflakes:o}=this;if(!t||!r)return;const{offsetWidth:n,offsetHeight:a}=r;for(const t of o)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 o)e.drawImage(t);else{t.beginPath();for(const e of o)e.drawCircle(t);t.fillStyle=this.config.color,t.fill()}}loop(){const e=Date.now(),t=Date.now()-this.lastUpdate;this.lastUpdate=e;const r=t/16.666666666666668;this.render(r),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,r]=(0,o.useState)(e);return function useDeepCompareEffect(e,t){const r=(0,o.useRef)(t);return n(t,r.current)||(r.current=t),(0,o.useEffect)(e,r.current)}((()=>r(e)),[e]),t}const lib_Snowfall=({color:e=s.color,changeFrequency:t=s.changeFrequency,radius:r=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,o.useMemo)((()=>({...l,...h||{}})),[h]));var h;const m=(0,o.useRef)(null),g=(e=>{const[t,r]=(0,o.useState)(getSize(e.current)),n=(0,o.useCallback)((()=>{e.current&&r(getSize(e.current))}),[e]);return(0,o.useEffect)((()=>{const{ResizeObserver:t}=window;if(e.current){if(n(),"function"==typeof t){const r=new t(n);return r.observe(e.current),()=>r.disconnect()}return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)}}),[e,n]),t})(m),v=useDeepMemo({color:e,changeFrequency:t,radius:r,speed:n,wind:a,rotationSpeed:i,images:p,snowflakeCount:d,opacity:c}),y=(0,o.useRef)(v),w=(0,o.useRef)();return(0,o.useEffect)((()=>(!w.current&&m.current&&(w.current=new SnowfallCanvas(m.current,y.current)),()=>{var e;null===(e=w.current)||void 0===e||e.pause(),w.current=void 0})),[]),(0,o.useEffect)((()=>{w.current&&w.current.updateConfig(v)}),[v]),o.createElement("canvas",{ref:m,height:g.height,width:g.width,style:f,"data-testid":"SnowfallCanvas"})}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! filename:43 */
|