@zydon/common-csr 2.0.40 → 2.0.42

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.
@@ -0,0 +1,3 @@
1
+ var g=Object.create;var f=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var m=(a=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(b,c)=>(typeof require<"u"?require:b)[c]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+a+'" is not supported')});var n=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);var l=(a,b,c,e)=>{if(b&&typeof b=="object"||typeof b=="function")for(let d of i(b))!k.call(a,d)&&d!==c&&f(a,d,{get:()=>b[d],enumerable:!(e=h(b,d))||e.enumerable});return a};var o=(a,b,c)=>(c=a!=null?g(j(a)):{},l(b||!a||!a.__esModule?f(c,"default",{value:a,enumerable:!0}):c,a));
2
+
3
+ export { m as a, n as b, o as c };
@@ -1,4 +1,5 @@
1
1
  import { b } from '../../chunk-KHFLUPBJ.mjs';
2
+ import '../../chunk-FUA3A67U.mjs';
2
3
  import { useFormContext, Controller } from 'react-hook-form';
3
4
  import { jsx } from 'react/jsx-runtime';
4
5
 
@@ -1 +1,2 @@
1
1
  export { a as default } from '../../chunk-N4W37KLS.mjs';
2
+ import '../../chunk-FUA3A67U.mjs';
@@ -1,4 +1,5 @@
1
1
  import { a as a$1 } from '../../chunk-N4W37KLS.mjs';
2
+ import '../../chunk-FUA3A67U.mjs';
2
3
  import { useFormContext, Controller } from 'react-hook-form';
3
4
  import { jsx } from 'react/jsx-runtime';
4
5
 
@@ -1 +1,2 @@
1
1
  export { b as Editor, a as editorClasses } from '../../chunk-KHFLUPBJ.mjs';
2
+ import '../../chunk-FUA3A67U.mjs';
@@ -1,4 +1,5 @@
1
1
  import { a } from '../../../chunk-75QNIQAU.mjs';
2
+ import '../../../chunk-FUA3A67U.mjs';
2
3
  import { useState, useEffect } from 'react';
3
4
  import { useFormContext, useFieldArray } from 'react-hook-form';
4
5
  import to from '@mui/material/Button';
@@ -1,3 +1,4 @@
1
+ import '../../../chunk-FUA3A67U.mjs';
1
2
  import { useState, useEffect } from 'react';
2
3
  import { useFormContext } from 'react-hook-form';
3
4
  import P from '@mui/material/Accordion';
@@ -1 +1,2 @@
1
1
  export { a as default } from '../../../chunk-CGG4TIH7.mjs';
2
+ import '../../../chunk-FUA3A67U.mjs';
@@ -1,4 +1,5 @@
1
1
  import { a } from '../../../chunk-CGG4TIH7.mjs';
2
+ import '../../../chunk-FUA3A67U.mjs';
2
3
  import m from '@mui/material/Button';
3
4
  import u from '@zydon/common/components/ActionButton';
4
5
  import p from '@zydon/common/components/Modal';
@@ -1,3 +1,4 @@
1
+ import '../../../chunk-FUA3A67U.mjs';
1
2
  import { useEffect, useState } from 'react';
2
3
  import { useFormContext } from 'react-hook-form';
3
4
  import s from '@mui/material/Stack';
@@ -1,9 +1,9 @@
1
+ import { b, a, c } from '../../chunk-FUA3A67U.mjs';
1
2
  import { forwardRef } from 'react';
2
- import { LazyLoadImage } from 'react-lazy-load-image-component';
3
- import p from '@mui/material/Box';
3
+ import Ce from '@mui/material/Box';
4
4
  import { styled } from '@mui/material/styles';
5
5
  import { jsx, jsxs } from 'react/jsx-runtime';
6
6
 
7
- var e={root:"mnl__image__root",wrapper:"mnl__image__wrapper",overlay:"mnl__image__overlay"};var E=styled(p)({overflow:"hidden",position:"relative",verticalAlign:"bottom",display:"inline-block",[`& .${e.wrapper}`]:{width:"100%",height:"100%",verticalAlign:"bottom",backgroundSize:"cover !important"}}),I=styled("span")({top:0,left:0,zIndex:1,width:"100%",height:"100%",position:"absolute"}),O=forwardRef(({ratio:r,disabledEffect:t=!1,alt:l,src:s,delayTime:m,threshold:n,beforeLoad:d,delayMethod:g,placeholder:c,wrapperProps:f,scrollPosition:h,effect:w="blur",visibleByDefault:o,wrapperClassName:v,useIntersectionObserver:D,slotProps:a,sx:y,...x},C)=>{let F=jsx(p,{component:LazyLoadImage,alt:l,src:s,delayTime:m,threshold:n,beforeLoad:d,delayMethod:g,placeholder:c,wrapperProps:f,scrollPosition:h,visibleByDefault:o,effect:o||t?void 0:w,useIntersectionObserver:D,wrapperClassName:v||e.wrapper,placeholderSrc:o||t?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACAQMAAACjTyRkAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAApJREFUCNdjAAIAAAQAASDSLW8AAAAASUVORK5CYII=":"data:image/svg+xml,%3Csvg%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%20width%3D%22512%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%0A%20%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%0A%20%20%3CradialGradient%20id%3D%22a%22%20cx%3D%2250%25%22%20cy%3D%2246.801102%25%22%20r%3D%2295.497112%25%22%3E%0A%20%20%20%20%3Cstop%20offset%3D%220%22%20stop-color%3D%22%23fff%22%20stop-opacity%3D%220%22%20%2F%3E%0A%20%20%20%20%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23919eab%22%20stop-opacity%3D%22.48%22%20%2F%3E%0A%20%20%3C%2FradialGradient%3E%0A%20%20%3Cpath%20d%3D%22m88%2086h512v512h-512z%22%20fill%3D%22url(%23a)%22%20fill-rule%3D%22evenodd%22%20transform%3D%22translate(-88%20-86)%22%20%2F%3E%0A%3C%2Fsvg%3E%0A",sx:{width:1,height:1,objectFit:"cover",verticalAlign:"bottom",aspectRatio:r}});return jsxs(E,{ref:C,component:"span",className:e.root,sx:{...!!r&&{width:1},...y},...x,children:[a?.overlay&&jsx(I,{className:e.overlay,sx:a?.overlay}),F]})});
7
+ var Le=b((Je,xe)=>{(()=>{var pe={181:(p,f,a)=>{var q=/^\s+|\s+$/g,x=/^[-+]0x[0-9a-f]+$/i,Q=/^0b[01]+$/i,h=/^0o[0-7]+$/i,k=parseInt,R=typeof a.g=="object"&&a.g&&a.g.Object===Object&&a.g,te=typeof self=="object"&&self&&self.Object===Object&&self,ee=R||te||Function("return this")(),H=Object.prototype.toString,Z=Math.max,re=Math.min,F=function(){return ee.Date.now()};function B(y){var g=typeof y;return !!y&&(g=="object"||g=="function")}function ne(y){if(typeof y=="number")return y;if(function(u){return typeof u=="symbol"||function(O){return !!O&&typeof O=="object"}(u)&&H.call(u)=="[object Symbol]"}(y))return NaN;if(B(y)){var g=typeof y.valueOf=="function"?y.valueOf():y;y=B(g)?g+"":g;}if(typeof y!="string")return y===0?y:+y;y=y.replace(q,"");var M=Q.test(y);return M||h.test(y)?k(y.slice(2),M?2:8):x.test(y)?NaN:+y}p.exports=function(y,g,M){var u,O,L,P,j,N,D=0,X=!1,W=!1,Y=!0;if(typeof y!="function")throw new TypeError("Expected a function");function K(E){var w=u,$=O;return u=O=void 0,D=E,P=y.apply($,w)}function z(E){var w=E-N;return N===void 0||w>=g||w<0||W&&E-D>=L}function T(){var E=F();if(z(E))return U(E);j=setTimeout(T,function(w){var $=g-(w-N);return W?re($,L-(w-D)):$}(E));}function U(E){return j=void 0,Y&&u?K(E):(u=O=void 0,P)}function G(){var E=F(),w=z(E);if(u=arguments,O=this,N=E,w){if(j===void 0)return function($){return D=$,j=setTimeout(T,g),X?K($):P}(N);if(W)return j=setTimeout(T,g),K(N)}return j===void 0&&(j=setTimeout(T,g)),P}return g=ne(g)||0,B(M)&&(X=!!M.leading,L=(W="maxWait"in M)?Z(ne(M.maxWait)||0,g):L,Y="trailing"in M?!!M.trailing:Y),G.cancel=function(){j!==void 0&&clearTimeout(j),D=0,u=N=O=j=void 0;},G.flush=function(){return j===void 0?P:U(F())},G};},858:(p,f,a)=>{var q="Expected a function",x=NaN,Q="[object Symbol]",h=/^\s+|\s+$/g,k=/^[-+]0x[0-9a-f]+$/i,R=/^0b[01]+$/i,te=/^0o[0-7]+$/i,ee=parseInt,H=typeof a.g=="object"&&a.g&&a.g.Object===Object&&a.g,Z=typeof self=="object"&&self&&self.Object===Object&&self,re=H||Z||Function("return this")(),F=Object.prototype.toString,B=Math.max,ne=Math.min,y=function(){return re.Date.now()};function g(u){var O=typeof u;return !!u&&(O=="object"||O=="function")}function M(u){if(typeof u=="number")return u;if(function(P){return typeof P=="symbol"||function(j){return !!j&&typeof j=="object"}(P)&&F.call(P)==Q}(u))return x;if(g(u)){var O=typeof u.valueOf=="function"?u.valueOf():u;u=g(O)?O+"":O;}if(typeof u!="string")return u===0?u:+u;u=u.replace(h,"");var L=R.test(u);return L||te.test(u)?ee(u.slice(2),L?2:8):k.test(u)?x:+u}p.exports=function(u,O,L){var P=!0,j=!0;if(typeof u!="function")throw new TypeError(q);return g(L)&&(P="leading"in L?!!L.leading:P,j="trailing"in L?!!L.trailing:j),function(N,D,X){var W,Y,K,z,T,U,G=0,E=!1,w=!1,$=!0;if(typeof N!="function")throw new TypeError(q);function ce(C){var J=W,V=Y;return W=Y=void 0,G=C,z=N.apply(V,J)}function ye(C){var J=C-U;return U===void 0||J>=D||J<0||w&&C-G>=K}function oe(){var C=y();if(ye(C))return ie(C);T=setTimeout(oe,function(J){var V=D-(J-U);return w?ne(V,K-(J-G)):V}(C));}function ie(C){return T=void 0,$&&W?ce(C):(W=Y=void 0,z)}function ae(){var C=y(),J=ye(C);if(W=arguments,Y=this,U=C,J){if(T===void 0)return function(V){return G=V,T=setTimeout(oe,D),E?ce(V):z}(U);if(w)return T=setTimeout(oe,D),ce(U)}return T===void 0&&(T=setTimeout(oe,D)),z}return D=M(D)||0,g(X)&&(E=!!X.leading,K=(w="maxWait"in X)?B(M(X.maxWait)||0,D):K,$="trailing"in X?!!X.trailing:$),ae.cancel=function(){T!==void 0&&clearTimeout(T),G=0,W=U=Y=T=void 0;},ae.flush=function(){return T===void 0?z:ie(y())},ae}(u,O,{leading:P,maxWait:O,trailing:j})};},694:(p,f,a)=>{var q=a(925);function x(){}function Q(){}Q.resetWarningCache=x,p.exports=function(){function h(te,ee,H,Z,re,F){if(F!==q){var B=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 B.name="Invariant Violation",B}}function k(){return h}h.isRequired=h;var R={array:h,bigint:h,bool:h,func:h,number:h,object:h,string:h,symbol:h,any:h,arrayOf:k,element:h,elementType:h,instanceOf:k,node:h,objectOf:k,oneOf:k,oneOfType:k,shape:k,exact:k,checkPropTypes:Q,resetWarningCache:x};return R.PropTypes=R,R};},556:(p,f,a)=>{p.exports=a(694)();},925:p=>{p.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";}},le={};function S(p){var f=le[p];if(f!==void 0)return f.exports;var a=le[p]={exports:{}};return pe[p](a,a.exports,S),a.exports}S.n=p=>{var f=p&&p.__esModule?()=>p.default:()=>p;return S.d(f,{a:f}),f},S.d=(p,f)=>{for(var a in f)S.o(f,a)&&!S.o(p,a)&&Object.defineProperty(p,a,{enumerable:!0,get:f[a]});},S.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),S.o=(p,f)=>Object.prototype.hasOwnProperty.call(p,f),S.r=p=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(p,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(p,"__esModule",{value:!0});};var ue={};(()=>{S.r(ue),S.d(ue,{LazyLoadComponent:()=>Te,LazyLoadImage:()=>Ue,trackWindowScroll:()=>E});let p=a("react");var f=S.n(p),a$1=S(556);function q(){return typeof window<"u"&&"IntersectionObserver"in window&&"isIntersecting"in window.IntersectionObserverEntry.prototype}function x(n){return x=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(n)}function Q(n,e){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);e&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})),r.push.apply(r,i);}return r}function h(n,e,r){return (e=R(e))in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}function k(n,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,R(i.key),i);}}function R(n){var e=function(r,i){if(x(r)!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var o=t.call(r,"string");if(x(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}(n);return x(e)=="symbol"?e:e+""}function te(n,e,r){return e=H(e),function(i,t){if(t&&(x(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(i)}(n,ee()?Reflect.construct(e,r||[],H(n).constructor):e.apply(n,r))}function ee(){try{var n=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return (ee=function(){return !!n})()}function H(n){return H=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},H(n)}function Z(n,e){return Z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Z(n,e)}var re=function(n){n.forEach(function(e){e.isIntersecting&&e.target.onVisible();});},F={},B=function(n){function e(t){var o;if(function(s,c){if(!(s instanceof c))throw new TypeError("Cannot call a class as a function")}(this,e),(o=te(this,e,[t])).supportsObserver=!t.scrollPosition&&t.useIntersectionObserver&&q(),o.supportsObserver){var l=t.threshold;o.observer=function(s){return F[s]=F[s]||new IntersectionObserver(re,{rootMargin:s+"px"}),F[s]}(l);}return o}return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(o&&o.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),o&&Z(t,o);}(e,n),r=e,i=[{key:"componentDidMount",value:function(){this.placeholder&&this.observer&&(this.placeholder.onVisible=this.props.onVisible,this.observer.observe(this.placeholder)),this.supportsObserver||this.updateVisibility();}},{key:"componentWillUnmount",value:function(){this.observer&&this.placeholder&&this.observer.unobserve(this.placeholder);}},{key:"componentDidUpdate",value:function(){this.supportsObserver||this.updateVisibility();}},{key:"getPlaceholderBoundingBox",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props.scrollPosition,o=this.placeholder.getBoundingClientRect(),l=this.placeholder.style,s=parseInt(l.getPropertyValue("margin-left"),10)||0,c=parseInt(l.getPropertyValue("margin-top"),10)||0;return {bottom:t.y+o.bottom+c,left:t.x+o.left+s,right:t.x+o.right+s,top:t.y+o.top+c}}},{key:"isPlaceholderInViewport",value:function(){if(typeof window>"u"||!this.placeholder)return !1;var t=this.props,o=t.scrollPosition,l=t.threshold,s=this.getPlaceholderBoundingBox(o),c=o.y+window.innerHeight,d=o.x,v=o.x+window.innerWidth,m=o.y;return m-l<=s.bottom&&c+l>=s.top&&d-l<=s.right&&v+l>=s.left}},{key:"updateVisibility",value:function(){this.isPlaceholderInViewport()&&this.props.onVisible();}},{key:"render",value:function(){var t=this,o=this.props,l=o.className,s=o.height,c=o.placeholder,d=o.style,v=o.width;if(c&&typeof c.type!="function")return f().cloneElement(c,{ref:function(b){return t.placeholder=b}});var m=function(b){for(var A=1;A<arguments.length;A++){var _=arguments[A]!=null?arguments[A]:{};A%2?Q(Object(_),!0).forEach(function(I){h(b,I,_[I]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(b,Object.getOwnPropertyDescriptors(_)):Q(Object(_)).forEach(function(I){Object.defineProperty(b,I,Object.getOwnPropertyDescriptor(_,I));});}return b}({display:"inline-block"},d);return v!==void 0&&(m.width=v),s!==void 0&&(m.height=s),f().createElement("span",{className:l,ref:function(b){return t.placeholder=b},style:m},c)}}],i&&k(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i;}(f().Component);B.propTypes={onVisible:a$1.PropTypes.func.isRequired,className:a$1.PropTypes.string,height:a$1.PropTypes.oneOfType([a$1.PropTypes.number,a$1.PropTypes.string]),placeholder:a$1.PropTypes.element,threshold:a$1.PropTypes.number,useIntersectionObserver:a$1.PropTypes.bool,scrollPosition:a$1.PropTypes.shape({x:a$1.PropTypes.number.isRequired,y:a$1.PropTypes.number.isRequired}),width:a$1.PropTypes.oneOfType([a$1.PropTypes.number,a$1.PropTypes.string])},B.defaultProps={className:"",placeholder:null,threshold:100,useIntersectionObserver:!0};let ne=B;var y=S(181),g=S.n(y),M=S(858),u=S.n(M),O=function(n){var e=getComputedStyle(n,null);return e.getPropertyValue("overflow")+e.getPropertyValue("overflow-y")+e.getPropertyValue("overflow-x")};let L=function(n){if(!(n instanceof HTMLElement))return window;for(var e=n;e&&e instanceof HTMLElement;){if(/(scroll|auto)/.test(O(e)))return e;e=e.parentNode;}return window};function P(n){return P=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},P(n)}var j=["delayMethod","delayTime"];function N(){return N=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var i in r)({}).hasOwnProperty.call(r,i)&&(n[i]=r[i]);}return n},N.apply(null,arguments)}function D(n,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,X(i.key),i);}}function X(n){var e=function(r,i){if(P(r)!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var o=t.call(r,"string");if(P(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}(n);return P(e)=="symbol"?e:e+""}function W(n,e,r){return e=z(e),Y(n,K()?Reflect.construct(e,r||[],z(n).constructor):e.apply(n,r))}function Y(n,e){if(e&&(P(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}(n)}function K(){try{var n=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return (K=function(){return !!n})()}function z(n){return z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},z(n)}function T(n,e){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},T(n,e)}var U=function(){return typeof window>"u"?0:window.scrollX||window.pageXOffset},G=function(){return typeof window>"u"?0:window.scrollY||window.pageYOffset};let E=function(n){var e=function(r){function i(l){var s;if(function(d,v){if(!(d instanceof v))throw new TypeError("Cannot call a class as a function")}(this,i),(s=W(this,i,[l])).useIntersectionObserver=l.useIntersectionObserver&&q(),s.useIntersectionObserver)return Y(s);var c=s.onChangeScroll.bind(s);return l.delayMethod==="debounce"?s.delayedScroll=g()(c,l.delayTime):l.delayMethod==="throttle"&&(s.delayedScroll=u()(c,l.delayTime)),s.state={scrollPosition:{x:U(),y:G()}},s.baseComponentRef=f().createRef(),s}return function(l,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(s&&s.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),Object.defineProperty(l,"prototype",{writable:!1}),s&&T(l,s);}(i,r),t=i,o=[{key:"componentDidMount",value:function(){this.addListeners();}},{key:"componentWillUnmount",value:function(){this.removeListeners();}},{key:"componentDidUpdate",value:function(){typeof window>"u"||this.useIntersectionObserver||L(this.baseComponentRef.current)!==this.scrollElement&&(this.removeListeners(),this.addListeners());}},{key:"addListeners",value:function(){typeof window>"u"||this.useIntersectionObserver||(this.scrollElement=L(this.baseComponentRef.current),this.scrollElement.addEventListener("scroll",this.delayedScroll,{passive:!0}),window.addEventListener("resize",this.delayedScroll,{passive:!0}),this.scrollElement!==window&&window.addEventListener("scroll",this.delayedScroll,{passive:!0}));}},{key:"removeListeners",value:function(){typeof window>"u"||this.useIntersectionObserver||(this.scrollElement.removeEventListener("scroll",this.delayedScroll),window.removeEventListener("resize",this.delayedScroll),this.scrollElement!==window&&window.removeEventListener("scroll",this.delayedScroll));}},{key:"onChangeScroll",value:function(){this.useIntersectionObserver||this.setState({scrollPosition:{x:U(),y:G()}});}},{key:"render",value:function(){var l=this.props,s=(l.delayMethod,l.delayTime,function(d,v){if(d==null)return {};var m,b,A=function(I,Pe){if(I==null)return {};var Ie={};for(var ve in I)if({}.hasOwnProperty.call(I,ve)){if(Pe.indexOf(ve)>=0)continue;Ie[ve]=I[ve];}return Ie}(d,v);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(d);for(b=0;b<_.length;b++)m=_[b],v.indexOf(m)>=0||{}.propertyIsEnumerable.call(d,m)&&(A[m]=d[m]);}return A}(l,j)),c=this.useIntersectionObserver?null:this.state.scrollPosition;return f().createElement(n,N({forwardRef:this.baseComponentRef,scrollPosition:c},s))}}],o&&D(t.prototype,o),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,o;}(f().Component);return e.propTypes={delayMethod:a$1.PropTypes.oneOf(["debounce","throttle"]),delayTime:a$1.PropTypes.number,useIntersectionObserver:a$1.PropTypes.bool},e.defaultProps={delayMethod:"throttle",delayTime:300,useIntersectionObserver:!0},e};function w(n){return w=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(n)}function $(n,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,ce(i.key),i);}}function ce(n){var e=function(r,i){if(w(r)!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var o=t.call(r,"string");if(w(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}(n);return w(e)=="symbol"?e:e+""}function ye(n,e,r){return e=ie(e),function(i,t){if(t&&(w(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(i)}(n,oe()?Reflect.construct(e,r||[],ie(n).constructor):e.apply(n,r))}function oe(){try{var n=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return (oe=function(){return !!n})()}function ie(n){return ie=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ie(n)}function ae(n,e){return ae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},ae(n,e)}var C=function(n){function e(t){return function(o,l){if(!(o instanceof l))throw new TypeError("Cannot call a class as a function")}(this,e),ye(this,e,[t])}return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(o&&o.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),o&&ae(t,o);}(e,n),r=e,(i=[{key:"render",value:function(){return f().createElement(ne,this.props)}}])&&$(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i;}(f().Component);let J=E(C);function V(n){return V=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},V(n)}function Be(n,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,Me(i.key),i);}}function Me(n){var e=function(r,i){if(V(r)!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var o=t.call(r,"string");if(V(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}(n);return V(e)=="symbol"?e:e+""}function Ne(n,e,r){return e=de(e),function(i,t){if(t&&(V(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(i)}(n,je()?Reflect.construct(e,r||[],de(n).constructor):e.apply(n,r))}function je(){try{var n=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return (je=function(){return !!n})()}function de(n){return de=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},de(n)}function me(n,e){return me=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},me(n,e)}var ge=function(n){function e(t){var o;((function(v,m){if(!(v instanceof m))throw new TypeError("Cannot call a class as a function")}))(this,e),o=Ne(this,e,[t]);var l=t.afterLoad,s=t.beforeLoad,c=t.scrollPosition,d=t.visibleByDefault;return o.state={visible:d},d&&(s(),l()),o.onVisible=o.onVisible.bind(o),o.isScrollTracked=!!(c&&Number.isFinite(c.x)&&c.x>=0&&Number.isFinite(c.y)&&c.y>=0),o}return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(o&&o.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),o&&me(t,o);}(e,n),r=e,(i=[{key:"componentDidUpdate",value:function(t,o){o.visible!==this.state.visible&&this.props.afterLoad();}},{key:"onVisible",value:function(){this.props.beforeLoad(),this.setState({visible:!0});}},{key:"render",value:function(){if(this.state.visible)return this.props.children;var t=this.props,o=t.className,l=t.delayMethod,s=t.delayTime,c=t.height,d=t.placeholder,v=t.scrollPosition,m=t.style,b=t.threshold,A=t.useIntersectionObserver,_=t.width;return this.isScrollTracked||A&&q()?f().createElement(ne,{className:o,height:c,onVisible:this.onVisible,placeholder:d,scrollPosition:v,style:m,threshold:b,useIntersectionObserver:A,width:_}):f().createElement(J,{className:o,delayMethod:l,delayTime:s,height:c,onVisible:this.onVisible,placeholder:d,style:m,threshold:b,width:_})}}])&&Be(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i;}(f().Component);ge.propTypes={afterLoad:a$1.PropTypes.func,beforeLoad:a$1.PropTypes.func,useIntersectionObserver:a$1.PropTypes.bool,visibleByDefault:a$1.PropTypes.bool},ge.defaultProps={afterLoad:function(){return {}},beforeLoad:function(){return {}},useIntersectionObserver:!0,visibleByDefault:!1};let Te=ge;function se(n){return se=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},se(n)}var Ve=["afterLoad","beforeLoad","delayMethod","delayTime","effect","placeholder","placeholderSrc","scrollPosition","threshold","useIntersectionObserver","visibleByDefault","wrapperClassName","wrapperProps"];function Se(n,e){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);e&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})),r.push.apply(r,i);}return r}function Ee(n){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Se(Object(r),!0).forEach(function(i){Fe(n,i,r[i]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):Se(Object(r)).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(r,i));});}return n}function Fe(n,e,r){return (e=_e(e))in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}function be(){return be=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var i in r)({}).hasOwnProperty.call(r,i)&&(n[i]=r[i]);}return n},be.apply(null,arguments)}function We(n,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,_e(i.key),i);}}function _e(n){var e=function(r,i){if(se(r)!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var o=t.call(r,"string");if(se(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}(n);return se(e)=="symbol"?e:e+""}function ze(n,e,r){return e=he(e),function(i,t){if(t&&(se(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(i)}(n,Ae()?Reflect.construct(e,r||[],he(n).constructor):e.apply(n,r))}function Ae(){try{var n=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch{}return (Ae=function(){return !!n})()}function he(n){return he=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},he(n)}function we(n,e){return we=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},we(n,e)}var Oe=function(n){function e(t){var o;return function(l,s){if(!(l instanceof s))throw new TypeError("Cannot call a class as a function")}(this,e),(o=ze(this,e,[t])).state={loaded:!1},o}return function(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(o&&o.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),o&&we(t,o);}(e,n),r=e,i=[{key:"onImageLoad",value:function(){var t=this;return this.state.loaded?null:function(o){t.props.onLoad(o),t.props.afterLoad(),t.setState({loaded:!0});}}},{key:"getImg",value:function(){var t=this.props,o=(t.afterLoad,t.beforeLoad,t.delayMethod,t.delayTime,t.effect,t.placeholder,t.placeholderSrc,t.scrollPosition,t.threshold,t.useIntersectionObserver,t.visibleByDefault,t.wrapperClassName,t.wrapperProps,function(l,s){if(l==null)return {};var c,d,v=function(b,A){if(b==null)return {};var _={};for(var I in b)if({}.hasOwnProperty.call(b,I)){if(A.indexOf(I)>=0)continue;_[I]=b[I];}return _}(l,s);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(l);for(d=0;d<m.length;d++)c=m[d],s.indexOf(c)>=0||{}.propertyIsEnumerable.call(l,c)&&(v[c]=l[c]);}return v}(t,Ve));return f().createElement("img",be({},o,{onLoad:this.onImageLoad()}))}},{key:"getLazyLoadImage",value:function(){var t=this.props,o=t.beforeLoad,l=t.className,s=t.delayMethod,c=t.delayTime,d=t.height,v=t.placeholder,m=t.scrollPosition,b=t.style,A=t.threshold,_=t.useIntersectionObserver,I=t.visibleByDefault,Pe=t.width;return f().createElement(Te,{beforeLoad:o,className:l,delayMethod:s,delayTime:c,height:d,placeholder:v,scrollPosition:m,style:b,threshold:A,useIntersectionObserver:_,visibleByDefault:I,width:Pe},this.getImg())}},{key:"getWrappedLazyLoadImage",value:function(t){var o=this.props,l=o.effect,s=o.height,c=o.placeholderSrc,d=o.width,v=o.wrapperClassName,m=o.wrapperProps,b=this.state.loaded,A=b?" lazy-load-image-loaded":"",_=b||!c?{}:{backgroundImage:"url(".concat(c,")"),backgroundSize:"100% 100%"};return f().createElement("span",be({className:v+" lazy-load-image-background "+l+A,style:Ee(Ee({},_),{},{color:"transparent",display:"inline-block",height:s,width:d})},m),t)}},{key:"render",value:function(){var t=this.props,o=t.effect,l=t.placeholderSrc,s=t.visibleByDefault,c=t.wrapperClassName,d=t.wrapperProps,v=this.getLazyLoadImage();return (o||l)&&!s||c||d?this.getWrappedLazyLoadImage(v):v}}],i&&We(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i;}(f().Component);Oe.propTypes={onLoad:a$1.PropTypes.func,afterLoad:a$1.PropTypes.func,beforeLoad:a$1.PropTypes.func,delayMethod:a$1.PropTypes.string,delayTime:a$1.PropTypes.number,effect:a$1.PropTypes.string,placeholderSrc:a$1.PropTypes.string,threshold:a$1.PropTypes.number,useIntersectionObserver:a$1.PropTypes.bool,visibleByDefault:a$1.PropTypes.bool,wrapperClassName:a$1.PropTypes.string,wrapperProps:a$1.PropTypes.object},Oe.defaultProps={onLoad:function(){},afterLoad:function(){return {}},beforeLoad:function(){return {}},delayMethod:"throttle",delayTime:300,effect:"",placeholderSrc:null,threshold:100,useIntersectionObserver:!0,visibleByDefault:!1,wrapperClassName:""};let Ue=Oe;})(),xe.exports=ue;})();});var fe={root:"mnl__image__root",wrapper:"mnl__image__wrapper",overlay:"mnl__image__overlay"};var ke=c(Le());var Ge=styled(Ce)({overflow:"hidden",position:"relative",verticalAlign:"bottom",display:"inline-block",[`& .${fe.wrapper}`]:{width:"100%",height:"100%",verticalAlign:"bottom",backgroundSize:"cover !important"}}),Qe=styled("span")({top:0,left:0,zIndex:1,width:"100%",height:"100%",position:"absolute"}),nt=forwardRef(({ratio:pe,disabledEffect:le=!1,alt:S,src:ue,delayTime:p,threshold:f,beforeLoad:a,delayMethod:q,placeholder:x,wrapperProps:Q,scrollPosition:h,effect:k="blur",visibleByDefault:R,wrapperClassName:te,useIntersectionObserver:ee,slotProps:H,sx:Z,...re},F)=>{let B=jsx(Ce,{component:ke.LazyLoadImage,alt:S,src:ue,delayTime:p,threshold:f,beforeLoad:a,delayMethod:q,placeholder:x,wrapperProps:Q,scrollPosition:h,visibleByDefault:R,effect:R||le?void 0:k,useIntersectionObserver:ee,wrapperClassName:te||fe.wrapper,placeholderSrc:R||le?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACAQMAAACjTyRkAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAApJREFUCNdjAAIAAAQAASDSLW8AAAAASUVORK5CYII=":"data:image/svg+xml,%3Csvg%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%20width%3D%22512%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%0A%20%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%0A%20%20%3CradialGradient%20id%3D%22a%22%20cx%3D%2250%25%22%20cy%3D%2246.801102%25%22%20r%3D%2295.497112%25%22%3E%0A%20%20%20%20%3Cstop%20offset%3D%220%22%20stop-color%3D%22%23fff%22%20stop-opacity%3D%220%22%20%2F%3E%0A%20%20%20%20%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23919eab%22%20stop-opacity%3D%22.48%22%20%2F%3E%0A%20%20%3C%2FradialGradient%3E%0A%20%20%3Cpath%20d%3D%22m88%2086h512v512h-512z%22%20fill%3D%22url(%23a)%22%20fill-rule%3D%22evenodd%22%20transform%3D%22translate(-88%20-86)%22%20%2F%3E%0A%3C%2Fsvg%3E%0A",sx:{width:1,height:1,objectFit:"cover",verticalAlign:"bottom",aspectRatio:pe}});return jsxs(Ge,{ref:F,component:"span",className:fe.root,sx:{...!!pe&&{width:1},...Z},...re,children:[H?.overlay&&jsx(Qe,{className:fe.overlay,sx:H?.overlay}),B]})});
8
8
 
9
- export { O as Image, e as imageClasses };
9
+ export { nt as Image, fe as imageClasses };
@@ -1,3 +1,4 @@
1
+ import '../../chunk-FUA3A67U.mjs';
1
2
  import { stylesMode, paper, varAlpha } from '@zydon/common/theme/styles';
2
3
  import { forwardRef, cloneElement, useState, useCallback, useRef, useEffect, useMemo } from 'react';
3
4
  import U from '@mui/material/Box';
@@ -1,3 +1,4 @@
1
+ import '../chunk-FUA3A67U.mjs';
1
2
  import { useLocation, matchPath } from 'react-router-dom';
2
3
 
3
4
  var a=(e,i=!0)=>{let{pathname:t}=useLocation(),o=e?!!matchPath({path:e,end:!0},t):!1,r=e?!!matchPath({path:e,end:!1},t):!1;return {active:i?r:o,isExternalLink:e.includes("http")}},l=a;
package/dist/index.mjs CHANGED
@@ -1,3 +1,5 @@
1
+ import './chunk-FUA3A67U.mjs';
2
+
1
3
  var t=()=>!0;
2
4
 
3
5
  export { t as test };
@@ -1,3 +1,5 @@
1
+ import '../chunk-FUA3A67U.mjs';
2
+
1
3
  function r(e){return e.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9-]/g,"")}function t(e){return e.toLowerCase().replace(/\s+/g,"_").replace(/[^a-z0-9_]/g,"")}function n(e){return e.charAt(0).toUpperCase()+e.slice(1)}
2
4
 
3
5
  export { r as paramCase, n as sentenceCase, t as snakeCase };
@@ -1 +1,2 @@
1
1
  export { a as default } from '../chunk-75QNIQAU.mjs';
2
+ import '../chunk-FUA3A67U.mjs';
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.0.40",
2
+ "version": "2.0.42",
3
3
  "name": "@zydon/common-csr",
4
4
  "description": "Zydon common resources for React projects (only Client-Side Rendering (CSR))",
5
5
  "license": "MIT",