@machinemetrics/mm-react-embeddable 1.0.7 → 1.0.9-1

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.
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react"),H=require("prop-types"),Ye=require("styled-components");var ye={exports:{}},N={};/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),H=require("prop-types"),Le=require("styled-components");var ge={exports:{}},G={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Ve;function wr(){if(Ve)return N;Ve=1;var n=d,o=Symbol.for("react.element"),T=Symbol.for("react.fragment"),c=Object.prototype.hasOwnProperty,h=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,E={key:!0,ref:!0,__self:!0,__source:!0};function F(O,R,S){var m,x={},k=null,A=null;S!==void 0&&(k=""+S),R.key!==void 0&&(k=""+R.key),R.ref!==void 0&&(A=R.ref);for(m in R)c.call(R,m)&&!E.hasOwnProperty(m)&&(x[m]=R[m]);if(O&&O.defaultProps)for(m in R=O.defaultProps,R)x[m]===void 0&&(x[m]=R[m]);return{$$typeof:o,type:O,key:k,ref:A,props:x,_owner:h.current}}return N.Fragment=T,N.jsx=F,N.jsxs=F,N}var G={};/**
9
+ */var Ye;function hr(){if(Ye)return G;Ye=1;var f=c,b=Symbol.for("react.element"),C=Symbol.for("react.fragment"),p=Object.prototype.hasOwnProperty,_=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,E={key:!0,ref:!0,__self:!0,__source:!0};function M(T,y,F){var g,h={},P=null,D=null;F!==void 0&&(P=""+F),y.key!==void 0&&(P=""+y.key),y.ref!==void 0&&(D=y.ref);for(g in y)p.call(y,g)&&!E.hasOwnProperty(g)&&(h[g]=y[g]);if(T&&T.defaultProps)for(g in y=T.defaultProps,y)h[g]===void 0&&(h[g]=y[g]);return{$$typeof:b,type:T,key:P,ref:D,props:h,_owner:_.current}}return G.Fragment=C,G.jsx=M,G.jsxs=M,G}var z={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,22 +14,22 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var qe;function Sr(){return qe||(qe=1,process.env.NODE_ENV!=="production"&&function(){var n=d,o=Symbol.for("react.element"),T=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),h=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),F=Symbol.for("react.provider"),O=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),x=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),A=Symbol.for("react.offscreen"),i=Symbol.iterator,g="@@iterator";function l(e){if(e===null||typeof e!="object")return null;var r=i&&e[i]||e[g];return typeof r=="function"?r:null}var f=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),a=1;a<r;a++)t[a-1]=arguments[a];w("error",e,t)}}function w(e,r,t){{var a=f.ReactDebugCurrentFrame,p=a.getStackAddendum();p!==""&&(r+="%s",t=t.concat([p]));var b=t.map(function(u){return String(u)});b.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,b)}}var D=!1,Y=!1,$=!1,z=!1,X=!1,U;U=Symbol.for("react.module.reference");function ie(e){return!!(typeof e=="string"||typeof e=="function"||e===c||e===E||X||e===h||e===S||e===m||z||e===A||D||Y||$||typeof e=="object"&&e!==null&&(e.$$typeof===k||e.$$typeof===x||e.$$typeof===F||e.$$typeof===O||e.$$typeof===R||e.$$typeof===U||e.getModuleId!==void 0))}function se(e,r,t){var a=e.displayName;if(a)return a;var p=r.displayName||r.name||"";return p!==""?t+"("+p+")":t}function Z(e){return e.displayName||"Context"}function I(e){if(e==null)return null;if(typeof e.tag=="number"&&v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case c:return"Fragment";case T:return"Portal";case E:return"Profiler";case h:return"StrictMode";case S:return"Suspense";case m:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case O:var r=e;return Z(r)+".Consumer";case F:var t=e;return Z(t._context)+".Provider";case R:return se(e,e.render,"ForwardRef");case x:var a=e.displayName||null;return a!==null?a:I(e.type)||"Memo";case k:{var p=e,b=p._payload,u=p._init;try{return I(u(b))}catch{return null}}}return null}var W=Object.assign,B=0,he,Ee,Re,_e,we,Se,Ce;function Te(){}Te.__reactDisabledLog=!0;function He(){{if(B===0){he=console.log,Ee=console.info,Re=console.warn,_e=console.error,we=console.group,Se=console.groupCollapsed,Ce=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Te,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}B++}}function ze(){{if(B--,B===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:W({},e,{value:he}),info:W({},e,{value:Ee}),warn:W({},e,{value:Re}),error:W({},e,{value:_e}),group:W({},e,{value:we}),groupCollapsed:W({},e,{value:Se}),groupEnd:W({},e,{value:Ce})})}B<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ue=f.ReactCurrentDispatcher,ce;function Q(e,r,t){{if(ce===void 0)try{throw Error()}catch(p){var a=p.stack.trim().match(/\n( *(at )?)/);ce=a&&a[1]||""}return`
18
- `+ce+e}}var le=!1,ee;{var Xe=typeof WeakMap=="function"?WeakMap:Map;ee=new Xe}function Oe(e,r){if(!e||le)return"";{var t=ee.get(e);if(t!==void 0)return t}var a;le=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var b;b=ue.current,ue.current=null,He();try{if(r){var u=function(){throw Error()};if(Object.defineProperty(u.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(u,[])}catch(j){a=j}Reflect.construct(e,[],u)}else{try{u.call()}catch(j){a=j}e.call(u.prototype)}}else{try{throw Error()}catch(j){a=j}e()}}catch(j){if(j&&a&&typeof j.stack=="string"){for(var s=j.stack.split(`
19
- `),P=a.stack.split(`
20
- `),y=s.length-1,_=P.length-1;y>=1&&_>=0&&s[y]!==P[_];)_--;for(;y>=1&&_>=0;y--,_--)if(s[y]!==P[_]){if(y!==1||_!==1)do if(y--,_--,_<0||s[y]!==P[_]){var M=`
21
- `+s[y].replace(" at new "," at ");return e.displayName&&M.includes("<anonymous>")&&(M=M.replace("<anonymous>",e.displayName)),typeof e=="function"&&ee.set(e,M),M}while(y>=1&&_>=0);break}}}finally{le=!1,ue.current=b,ze(),Error.prepareStackTrace=p}var q=e?e.displayName||e.name:"",L=q?Q(q):"";return typeof e=="function"&&ee.set(e,L),L}function Qe(e,r,t){return Oe(e,!1)}function er(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function re(e,r,t){if(e==null)return"";if(typeof e=="function")return Oe(e,er(e));if(typeof e=="string")return Q(e);switch(e){case S:return Q("Suspense");case m:return Q("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case R:return Qe(e.render);case x:return re(e.type,r,t);case k:{var a=e,p=a._payload,b=a._init;try{return re(b(p),r,t)}catch{}}}return""}var J=Object.prototype.hasOwnProperty,Pe={},xe=f.ReactDebugCurrentFrame;function te(e){if(e){var r=e._owner,t=re(e.type,e._source,r?r.type:null);xe.setExtraStackFrame(t)}else xe.setExtraStackFrame(null)}function rr(e,r,t,a,p){{var b=Function.call.bind(J);for(var u in e)if(b(e,u)){var s=void 0;try{if(typeof e[u]!="function"){var P=Error((a||"React class")+": "+t+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw P.name="Invariant Violation",P}s=e[u](r,u,a,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(y){s=y}s&&!(s instanceof Error)&&(te(p),v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",a||"React class",t,u,typeof s),te(null)),s instanceof Error&&!(s.message in Pe)&&(Pe[s.message]=!0,te(p),v("Failed %s type: %s",t,s.message),te(null))}}}var tr=Array.isArray;function fe(e){return tr(e)}function nr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function ar(e){try{return je(e),!1}catch{return!0}}function je(e){return""+e}function ke(e){if(ar(e))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",nr(e)),je(e)}var K=f.ReactCurrentOwner,or={key:!0,ref:!0,__self:!0,__source:!0},Me,Fe,de;de={};function ir(e){if(J.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function sr(e){if(J.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function ur(e,r){if(typeof e.ref=="string"&&K.current&&r&&K.current.stateNode!==r){var t=I(K.current.type);de[t]||(v('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',I(K.current.type),e.ref),de[t]=!0)}}function cr(e,r){{var t=function(){Me||(Me=!0,v("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function lr(e,r){{var t=function(){Fe||(Fe=!0,v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var fr=function(e,r,t,a,p,b,u){var s={$$typeof:o,type:e,key:r,ref:t,props:u,_owner:b};return s._store={},Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(s,"_self",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.defineProperty(s,"_source",{configurable:!1,enumerable:!1,writable:!1,value:p}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s};function dr(e,r,t,a,p){{var b,u={},s=null,P=null;t!==void 0&&(ke(t),s=""+t),sr(r)&&(ke(r.key),s=""+r.key),ir(r)&&(P=r.ref,ur(r,p));for(b in r)J.call(r,b)&&!or.hasOwnProperty(b)&&(u[b]=r[b]);if(e&&e.defaultProps){var y=e.defaultProps;for(b in y)u[b]===void 0&&(u[b]=y[b])}if(s||P){var _=typeof e=="function"?e.displayName||e.name||"Unknown":e;s&&cr(u,_),P&&lr(u,_)}return fr(e,s,P,p,a,K.current,u)}}var ve=f.ReactCurrentOwner,Ie=f.ReactDebugCurrentFrame;function V(e){if(e){var r=e._owner,t=re(e.type,e._source,r?r.type:null);Ie.setExtraStackFrame(t)}else Ie.setExtraStackFrame(null)}var pe;pe=!1;function be(e){return typeof e=="object"&&e!==null&&e.$$typeof===o}function De(){{if(ve.current){var e=I(ve.current.type);if(e)return`
17
+ */var Ue;function Rr(){return Ue||(Ue=1,process.env.NODE_ENV!=="production"&&function(){var f=c,b=Symbol.for("react.element"),C=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),M=Symbol.for("react.provider"),T=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),D=Symbol.for("react.offscreen"),I=Symbol.iterator,Z="@@iterator";function s(e){if(e===null||typeof e!="object")return null;var r=I&&e[I]||e[Z];return typeof r=="function"?r:null}var u=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),a=1;a<r;a++)t[a-1]=arguments[a];d("error",e,t)}}function d(e,r,t){{var a=u.ReactDebugCurrentFrame,l=a.getStackAddendum();l!==""&&(r+="%s",t=t.concat([l]));var v=t.map(function(i){return String(i)});v.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,v)}}var w=!1,j=!1,L=!1,Y=!1,$=!1,B;B=Symbol.for("react.module.reference");function X(e){return!!(typeof e=="string"||typeof e=="function"||e===p||e===E||$||e===_||e===F||e===g||Y||e===D||w||j||L||typeof e=="object"&&e!==null&&(e.$$typeof===P||e.$$typeof===h||e.$$typeof===M||e.$$typeof===T||e.$$typeof===y||e.$$typeof===B||e.getModuleId!==void 0))}function U(e,r,t){var a=e.displayName;if(a)return a;var l=r.displayName||r.name||"";return l!==""?t+"("+l+")":t}function Q(e){return e.displayName||"Context"}function k(e){if(e==null)return null;if(typeof e.tag=="number"&&n("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case p:return"Fragment";case C:return"Portal";case E:return"Profiler";case _:return"StrictMode";case F:return"Suspense";case g:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case T:var r=e;return Q(r)+".Consumer";case M:var t=e;return Q(t._context)+".Provider";case y:return U(e,e.render,"ForwardRef");case h:var a=e.displayName||null;return a!==null?a:k(e.type)||"Memo";case P:{var l=e,v=l._payload,i=l._init;try{return k(i(v))}catch{return null}}}return null}var A=Object.assign,J=0,me,Ee,ye,he,Re,_e,we;function Ce(){}Ce.__reactDisabledLog=!0;function Ke(){{if(J===0){me=console.log,Ee=console.info,ye=console.warn,he=console.error,Re=console.group,_e=console.groupCollapsed,we=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Ce,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}J++}}function Ne(){{if(J--,J===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:A({},e,{value:me}),info:A({},e,{value:Ee}),warn:A({},e,{value:ye}),error:A({},e,{value:he}),group:A({},e,{value:Re}),groupCollapsed:A({},e,{value:_e}),groupEnd:A({},e,{value:we})})}J<0&&n("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var se=u.ReactCurrentDispatcher,ue;function ee(e,r,t){{if(ue===void 0)try{throw Error()}catch(l){var a=l.stack.trim().match(/\n( *(at )?)/);ue=a&&a[1]||""}return`
18
+ `+ue+e}}var ce=!1,re;{var Ge=typeof WeakMap=="function"?WeakMap:Map;re=new Ge}function Te(e,r){if(!e||ce)return"";{var t=re.get(e);if(t!==void 0)return t}var a;ce=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var v;v=se.current,se.current=null,Ke();try{if(r){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(O){a=O}Reflect.construct(e,[],i)}else{try{i.call()}catch(O){a=O}e.call(i.prototype)}}else{try{throw Error()}catch(O){a=O}e()}}catch(O){if(O&&a&&typeof O.stack=="string"){for(var o=O.stack.split(`
19
+ `),S=a.stack.split(`
20
+ `),m=o.length-1,R=S.length-1;m>=1&&R>=0&&o[m]!==S[R];)R--;for(;m>=1&&R>=0;m--,R--)if(o[m]!==S[R]){if(m!==1||R!==1)do if(m--,R--,R<0||o[m]!==S[R]){var x=`
21
+ `+o[m].replace(" at new "," at ");return e.displayName&&x.includes("<anonymous>")&&(x=x.replace("<anonymous>",e.displayName)),typeof e=="function"&&re.set(e,x),x}while(m>=1&&R>=0);break}}}finally{ce=!1,se.current=v,Ne(),Error.prepareStackTrace=l}var q=e?e.displayName||e.name:"",W=q?ee(q):"";return typeof e=="function"&&re.set(e,W),W}function ze(e,r,t){return Te(e,!1)}function He(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function te(e,r,t){if(e==null)return"";if(typeof e=="function")return Te(e,He(e));if(typeof e=="string")return ee(e);switch(e){case F:return ee("Suspense");case g:return ee("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case y:return ze(e.render);case h:return te(e.type,r,t);case P:{var a=e,l=a._payload,v=a._init;try{return te(v(l),r,t)}catch{}}}return""}var K=Object.prototype.hasOwnProperty,Se={},Oe=u.ReactDebugCurrentFrame;function ne(e){if(e){var r=e._owner,t=te(e.type,e._source,r?r.type:null);Oe.setExtraStackFrame(t)}else Oe.setExtraStackFrame(null)}function Xe(e,r,t,a,l){{var v=Function.call.bind(K);for(var i in e)if(v(e,i)){var o=void 0;try{if(typeof e[i]!="function"){var S=Error((a||"React class")+": "+t+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw S.name="Invariant Violation",S}o=e[i](r,i,a,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(m){o=m}o&&!(o instanceof Error)&&(ne(l),n("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",a||"React class",t,i,typeof o),ne(null)),o instanceof Error&&!(o.message in Se)&&(Se[o.message]=!0,ne(l),n("Failed %s type: %s",t,o.message),ne(null))}}}var Qe=Array.isArray;function le(e){return Qe(e)}function er(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function rr(e){try{return Pe(e),!1}catch{return!0}}function Pe(e){return""+e}function je(e){if(rr(e))return n("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",er(e)),Pe(e)}var N=u.ReactCurrentOwner,tr={key:!0,ref:!0,__self:!0,__source:!0},ke,xe,fe;fe={};function nr(e){if(K.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function ar(e){if(K.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function or(e,r){if(typeof e.ref=="string"&&N.current&&r&&N.current.stateNode!==r){var t=k(N.current.type);fe[t]||(n('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',k(N.current.type),e.ref),fe[t]=!0)}}function ir(e,r){{var t=function(){ke||(ke=!0,n("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function sr(e,r){{var t=function(){xe||(xe=!0,n("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var ur=function(e,r,t,a,l,v,i){var o={$$typeof:b,type:e,key:r,ref:t,props:i,_owner:v};return o._store={},Object.defineProperty(o._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(o,"_self",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.defineProperty(o,"_source",{configurable:!1,enumerable:!1,writable:!1,value:l}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o};function cr(e,r,t,a,l){{var v,i={},o=null,S=null;t!==void 0&&(je(t),o=""+t),ar(r)&&(je(r.key),o=""+r.key),nr(r)&&(S=r.ref,or(r,l));for(v in r)K.call(r,v)&&!tr.hasOwnProperty(v)&&(i[v]=r[v]);if(e&&e.defaultProps){var m=e.defaultProps;for(v in m)i[v]===void 0&&(i[v]=m[v])}if(o||S){var R=typeof e=="function"?e.displayName||e.name||"Unknown":e;o&&ir(i,R),S&&sr(i,R)}return ur(e,o,S,l,a,N.current,i)}}var de=u.ReactCurrentOwner,Me=u.ReactDebugCurrentFrame;function V(e){if(e){var r=e._owner,t=te(e.type,e._source,r?r.type:null);Me.setExtraStackFrame(t)}else Me.setExtraStackFrame(null)}var ve;ve=!1;function pe(e){return typeof e=="object"&&e!==null&&e.$$typeof===b}function Fe(){{if(de.current){var e=k(de.current.type);if(e)return`
22
22
 
23
- Check the render method of \``+e+"`."}return""}}function vr(e){return""}var Ae={};function pr(e){{var r=De();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
23
+ Check the render method of \``+e+"`."}return""}}function lr(e){return""}var Ie={};function fr(e){{var r=Fe();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
24
24
 
25
- Check the top-level render call using <`+t+">.")}return r}}function $e(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=pr(r);if(Ae[t])return;Ae[t]=!0;var a="";e&&e._owner&&e._owner!==ve.current&&(a=" It was passed a child from "+I(e._owner.type)+"."),V(e),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,a),V(null)}}function Ue(e,r){{if(typeof e!="object")return;if(fe(e))for(var t=0;t<e.length;t++){var a=e[t];be(a)&&$e(a,r)}else if(be(e))e._store&&(e._store.validated=!0);else if(e){var p=l(e);if(typeof p=="function"&&p!==e.entries)for(var b=p.call(e),u;!(u=b.next()).done;)be(u.value)&&$e(u.value,r)}}}function br(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===R||r.$$typeof===x))t=r.propTypes;else return;if(t){var a=I(r);rr(t,e.props,"prop",a,e)}else if(r.PropTypes!==void 0&&!pe){pe=!0;var p=I(r);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",p||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function gr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var a=r[t];if(a!=="children"&&a!=="key"){V(e),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",a),V(null);break}}e.ref!==null&&(V(e),v("Invalid attribute `ref` supplied to `React.Fragment`."),V(null))}}var We={};function Le(e,r,t,a,p,b){{var u=ie(e);if(!u){var s="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(s+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var P=vr();P?s+=P:s+=De();var y;e===null?y="null":fe(e)?y="array":e!==void 0&&e.$$typeof===o?(y="<"+(I(e.type)||"Unknown")+" />",s=" Did you accidentally export a JSX literal instead of a component?"):y=typeof e,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",y,s)}var _=dr(e,r,t,p,b);if(_==null)return _;if(u){var M=r.children;if(M!==void 0)if(a)if(fe(M)){for(var q=0;q<M.length;q++)Ue(M[q],e);Object.freeze&&Object.freeze(M)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ue(M,e)}if(J.call(r,"key")){var L=I(e),j=Object.keys(r).filter(function(_r){return _r!=="key"}),ge=j.length>0?"{key: someKey, "+j.join(": ..., ")+": ...}":"{key: someKey}";if(!We[L+ge]){var Rr=j.length>0?"{"+j.join(": ..., ")+": ...}":"{}";v(`A props object containing a "key" prop is being spread into JSX:
25
+ Check the top-level render call using <`+t+">.")}return r}}function Ae(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=fr(r);if(Ie[t])return;Ie[t]=!0;var a="";e&&e._owner&&e._owner!==de.current&&(a=" It was passed a child from "+k(e._owner.type)+"."),V(e),n('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,a),V(null)}}function De(e,r){{if(typeof e!="object")return;if(le(e))for(var t=0;t<e.length;t++){var a=e[t];pe(a)&&Ae(a,r)}else if(pe(e))e._store&&(e._store.validated=!0);else if(e){var l=s(e);if(typeof l=="function"&&l!==e.entries)for(var v=l.call(e),i;!(i=v.next()).done;)pe(i.value)&&Ae(i.value,r)}}}function dr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===y||r.$$typeof===h))t=r.propTypes;else return;if(t){var a=k(r);Xe(t,e.props,"prop",a,e)}else if(r.PropTypes!==void 0&&!ve){ve=!0;var l=k(r);n("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",l||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&n("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function vr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var a=r[t];if(a!=="children"&&a!=="key"){V(e),n("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",a),V(null);break}}e.ref!==null&&(V(e),n("Invalid attribute `ref` supplied to `React.Fragment`."),V(null))}}var $e={};function We(e,r,t,a,l,v){{var i=X(e);if(!i){var o="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(o+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var S=lr();S?o+=S:o+=Fe();var m;e===null?m="null":le(e)?m="array":e!==void 0&&e.$$typeof===b?(m="<"+(k(e.type)||"Unknown")+" />",o=" Did you accidentally export a JSX literal instead of a component?"):m=typeof e,n("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",m,o)}var R=cr(e,r,t,l,v);if(R==null)return R;if(i){var x=r.children;if(x!==void 0)if(a)if(le(x)){for(var q=0;q<x.length;q++)De(x[q],e);Object.freeze&&Object.freeze(x)}else n("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else De(x,e)}if(K.call(r,"key")){var W=k(e),O=Object.keys(r).filter(function(yr){return yr!=="key"}),be=O.length>0?"{key: someKey, "+O.join(": ..., ")+": ...}":"{key: someKey}";if(!$e[W+be]){var Er=O.length>0?"{"+O.join(": ..., ")+": ...}":"{}";n(`A props object containing a "key" prop is being spread into JSX:
26
26
  let props = %s;
27
27
  <%s {...props} />
28
28
  React keys must be passed directly to JSX without using spread:
29
29
  let props = %s;
30
- <%s key={someKey} {...props} />`,ge,L,Rr,L),We[L+ge]=!0}}return e===c?gr(_):br(_),_}}function mr(e,r,t){return Le(e,r,t,!0)}function yr(e,r,t){return Le(e,r,t,!1)}var hr=yr,Er=mr;G.Fragment=c,G.jsx=hr,G.jsxs=Er}()),G}process.env.NODE_ENV==="production"?ye.exports=wr():ye.exports=Sr();var ae=ye.exports;const C=[];for(let n=0;n<256;++n)C.push((n+256).toString(16).slice(1));function Cr(n,o=0){return(C[n[o+0]]+C[n[o+1]]+C[n[o+2]]+C[n[o+3]]+"-"+C[n[o+4]]+C[n[o+5]]+"-"+C[n[o+6]]+C[n[o+7]]+"-"+C[n[o+8]]+C[n[o+9]]+"-"+C[n[o+10]]+C[n[o+11]]+C[n[o+12]]+C[n[o+13]]+C[n[o+14]]+C[n[o+15]]).toLowerCase()}let me;const Tr=new Uint8Array(16);function Or(){if(!me){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");me=crypto.getRandomValues.bind(crypto)}return me(Tr)}const Pr=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Ze={randomUUID:Pr};function xr(n,o,T){var h;if(Ze.randomUUID&&!o&&!n)return Ze.randomUUID();n=n||{};const c=n.random??((h=n.rng)==null?void 0:h.call(n))??Or();if(c.length<16)throw new Error("Random bytes length must be >= 16");return c[6]=c[6]&15|64,c[8]=c[8]&63|128,Cr(c)}const oe=d.createContext(null),Be=({children:n})=>{const[o,T]=d.useState({}),c=d.useRef({}),h=d.useRef({}),E=d.useRef({}),F=d.useCallback((i,g)=>{var l;return!!((l=E.current[i])!=null&&l.has(g))},[]),O=d.useCallback((i,g,l)=>{T(f=>({...f,[i]:{origin:g,frameRef:l}}))},[]),R=d.useCallback(i=>{T(g=>{const l={...g};return delete l[i],l}),delete E.current[i]},[]);d.useEffect(()=>{const i=(l=[],f)=>{l.forEach(v=>v(f))},g=l=>{var D,Y,$,z,X;if(!((D=l==null?void 0:l.data)!=null&&D.instanceId))return;const{instanceId:f,type:v}=l.data,w=c.current;if(v==="response"){const{callbackId:U,response:ie,error:se}=l.data,Z=h.current[U];Z&&(Z(ie,se),delete h.current[U]);return}if(v==="mark-registered"){const{requestType:U}=l.data;E.current[f]||(E.current[f]=new Set),E.current[f].add(U);return}i((Y=w[f])==null?void 0:Y[v],l.data),i(($=w["*"])==null?void 0:$[v],l.data),i((z=w[f])==null?void 0:z["*"],l.data),i((X=w["*"])==null?void 0:X["*"],l.data)};return window.addEventListener("message",g),()=>{window.removeEventListener("message",g)}},[o]);const S=d.useCallback((i,g,l)=>{var v,w;const f=o[i];if(!f){console.warn(`Origin not set for id: ${i}. Unable to send message.`);return}(w=(v=f==null?void 0:f.frameRef)==null?void 0:v.current)!=null&&w.contentWindow&&f.frameRef.current.contentWindow.postMessage({type:g,...l,instanceId:i},f.origin)},[o]),m=d.useCallback(async(i,g,l={})=>new Promise((f,v)=>{const w=xr(),D=(Y,$)=>{delete h.current[w],$?v($):f(Y)};h.current[w]=D,S(i,"request",{callbackId:w,requestType:g,data:l})}),[S]),x=d.useCallback((i,g)=>{S(i,"load-options",g)},[S]),k=d.useCallback((i,g)=>{S(i,"validate",g)},[S]),A=d.useMemo(()=>({registerFrame:O,unregisterFrame:R,sendMessage:S,sendRequest:m,loadOptions:x,validate:k,hasHandler:F,addListener:(i,g,l)=>(c.current[i]||(c.current[i]={}),c.current[i][g]||(c.current[i][g]=[]),c.current[i][g].push(l),()=>{c.current[i][g]=c.current[i][g].filter(f=>f!==l)})}),[O,R,S,m,x,k,F]);return ae.jsx(oe.Provider,{value:A,children:n})},ne={},Je=async n=>{try{const o=new URL(n).origin;if(ne[o]!==void 0)return ne[o];const c=await(await fetch(`${o}/mm-app-manifest.json`)).json();if(!c.version)throw new Error("Invalid manifest");return ne[o]=c,c}catch{}return ne[origin]=!1,!1},Ke=async n=>!!await Je(n),Ne=(n,o,T)=>{const c=d.useContext(oe);if(c===null)throw new Error("useEmbeddedEffect must be used within a MMEmbeddableZoneProvider");const h=d.useRef(T);d.useEffect(()=>{h.current=T},[T]),d.useEffect(()=>{if(!(!n||!o))return c.addListener(n,o,(...E)=>h.current(...E))},[c,n,o])};Be.propTypes={children:H.node.isRequired};const jr=Ye.default||Ye,kr=jr.iframe`
30
+ <%s key={someKey} {...props} />`,be,W,Er,W),$e[W+be]=!0}}return e===p?vr(R):dr(R),R}}function pr(e,r,t){return We(e,r,t,!0)}function br(e,r,t){return We(e,r,t,!1)}var gr=br,mr=pr;z.Fragment=p,z.jsx=gr,z.jsxs=mr}()),z}process.env.NODE_ENV==="production"?ge.exports=hr():ge.exports=Rr();var oe=ge.exports;const ie=c.createContext(null),Ve=({children:f})=>{const[b,C]=c.useState({}),p=c.useRef({}),_=c.useRef({}),E=c.useRef({}),M=c.useRef(0),T=c.useCallback(()=>(M.current+=1,`callback_${Date.now()}_${M.current}`),[]),y=c.useCallback((s,u)=>{var n;return!!((n=E.current[s])!=null&&n.has(u))},[]),F=c.useCallback((s,u,n)=>{C(d=>({...d,[s]:{origin:u,frameRef:n}}))},[]),g=c.useCallback(s=>{C(u=>{const n={...u};return delete n[s],n}),delete E.current[s]},[]);c.useEffect(()=>{const s=(n=[],d)=>{n.forEach(w=>w(d))},u=n=>{var L,Y,$,B,X;if(!((L=n==null?void 0:n.data)!=null&&L.instanceId))return;const{instanceId:d,type:w}=n.data,j=p.current;if(w==="response"){const{callbackId:U,response:Q,error:k}=n.data,A=_.current[U];A&&(A(Q,k),delete _.current[U]);return}if(w==="mark-registered"){const{requestType:U}=n.data;E.current[d]||(E.current[d]=new Set),E.current[d].add(U);return}s((Y=j[d])==null?void 0:Y[w],n.data),s(($=j["*"])==null?void 0:$[w],n.data),s((B=j[d])==null?void 0:B["*"],n.data),s((X=j["*"])==null?void 0:X["*"],n.data)};return window.addEventListener("message",u),()=>{window.removeEventListener("message",u)}},[b]);const h=c.useCallback((s,u,n)=>{var w,j;const d=b[s];if(!d){console.warn(`Origin not set for id: ${s}. Unable to send message.`);return}(j=(w=d==null?void 0:d.frameRef)==null?void 0:w.current)!=null&&j.contentWindow&&d.frameRef.current.contentWindow.postMessage({type:u,...n,instanceId:s},d.origin)},[b]),P=c.useCallback(async(s,u,n={})=>new Promise((d,w)=>{const j=T(),L=(Y,$)=>{delete _.current[j],$?w($):d(Y)};_.current[j]=L,h(s,"request",{callbackId:j,requestType:u,data:n})}),[h,T]),D=c.useCallback((s,u)=>{h(s,"load-options",u)},[h]),I=c.useCallback((s,u)=>{h(s,"validate",u)},[h]),Z=c.useMemo(()=>({registerFrame:F,unregisterFrame:g,sendMessage:h,sendRequest:P,loadOptions:D,validate:I,hasHandler:y,addListener:(s,u,n)=>(p.current[s]||(p.current[s]={}),p.current[s][u]||(p.current[s][u]=[]),p.current[s][u].push(n),()=>{p.current[s][u]=p.current[s][u].filter(d=>d!==n)})}),[F,g,h,P,D,I,y]);return oe.jsx(ie.Provider,{value:Z,children:f})},ae={},qe=async f=>{try{const b=new URL(f).origin;if(ae[b]!==void 0)return ae[b];const p=await(await fetch(`${b}/mm-app-manifest.json`)).json();if(!p.version)throw new Error("Invalid manifest");return ae[b]=p,p}catch{}return ae[origin]=!1,!1},Ze=async f=>!!await qe(f),Be=(f,b,C)=>{const p=c.useContext(ie);if(p===null)throw new Error("useEmbeddedEffect must be used within a MMEmbeddableZoneProvider");const _=c.useRef(C);c.useEffect(()=>{_.current=C},[C]),c.useEffect(()=>{if(!(!f||!b))return p.addListener(f,b,(...E)=>_.current(...E))},[p,f,b])};Ve.propTypes={children:H.node.isRequired};const _r=Le.default||Le,wr=_r.iframe`
31
31
  width: 100%;
32
32
  height: 100%;
33
33
  border: none;
34
- visibility: ${n=>n.$isReady?"visible":"hidden"};
35
- `,Ge=({id:n,src:o,path:T,onInit:c=()=>{},context:h={},params:E={},...F})=>{if("isConfiguring"in F)return console.error("isConfiguring must be passed via the params prop to MMEmbeddableZone"),null;if("colorMode"in h)return console.error("colorMode must be passed via the params prop to MMEmbeddableZone"),null;if("isFullScreen"in h)return console.error("isFullScreen must be passed via the params prop to MMEmbeddableZone"),null;const O=d.useRef(),[R,S]=d.useState(),[m,x]=d.useState(0),{registerFrame:k,unregisterFrame:A,sendMessage:i}=d.useContext(oe),[g,l]=d.useState(!0),[f,v]=d.useState();return d.useEffect(()=>{m&&i(n,"set-context",{context:{...h,colorMode:E.colorMode,isFullScreen:E.isFullScreen}})},[h,E.colorMode,E.isFullScreen,n,m]),d.useEffect(()=>{m&&(i(n,"set-params",{params:E}),i(n,"set-configuring",{isConfiguring:E.isConfiguring}))},[E,n,m]),d.useEffect(()=>{T!==void 0&&v(T)},[T]),d.useEffect(()=>{f===void 0||!m||i(n,"navigate",{path:f})},[f,m,n,i]),d.useEffect(()=>{if(!(!o||!n||!O))return(async()=>{const w=await Ke(o);if(l(w),w){const D=new URL(o);k(n,D.origin,O),c(),S(`${D.origin}/mm-embedded-interop?id=${n}&origin=${window.location.origin}`);return}})(),()=>{A(n)}},[o,n,k,O]),Ne(n,"ready",()=>x(w=>w+1)),g?ae.jsx(kr,{$isReady:m,ref:O,src:R,...F}):ae.jsx("div",{style:{height:"100%",display:"flex",flex:1,alignItems:"center",justifyContent:"center"},children:ae.jsx("div",{style:{textAlign:"center"},children:"Application must adhere to the MM App Manifest specification to be embedded."})})};Ge.propTypes={id:H.string,src:H.string.isRequired,path:H.string,onInit:H.func};exports.MMEmbeddableZone=Ge;exports.MMEmbeddableZoneContext=oe;exports.MMEmbeddableZoneProvider=Be;exports.getAppInfo=Je;exports.testIsEmbeddable=Ke;exports.useEmbeddedEffect=Ne;
34
+ visibility: ${f=>f.$isReady?"visible":"hidden"};
35
+ `,Je=({id:f,src:b,path:C,onInit:p=()=>{},context:_={},params:E={},...M})=>{if("isConfiguring"in M)return console.error("isConfiguring must be passed via the params prop to MMEmbeddableZone"),null;if("colorMode"in _)return console.error("colorMode must be passed via the params prop to MMEmbeddableZone"),null;if("isFullScreen"in _)return console.error("isFullScreen must be passed via the params prop to MMEmbeddableZone"),null;const T=c.useRef(),[y,F]=c.useState(),[g,h]=c.useState(0),{registerFrame:P,unregisterFrame:D,sendMessage:I}=c.useContext(ie),[Z,s]=c.useState(!0),[u,n]=c.useState();return c.useEffect(()=>{g&&I(f,"set-context",{context:{..._,colorMode:E.colorMode,isFullScreen:E.isFullScreen}})},[_,E.colorMode,E.isFullScreen,f,g]),c.useEffect(()=>{g&&(I(f,"set-params",{params:E}),I(f,"set-configuring",{isConfiguring:E.isConfiguring}))},[E,f,g]),c.useEffect(()=>{C!==void 0&&n(C||"/")},[C]),c.useEffect(()=>{u===void 0||!g||I(f,"navigate",{path:u})},[u,g,f,I]),c.useEffect(()=>{if(!(!b||!f||!T))return(async()=>{const d=await Ze(b);if(s(d),d){const w=new URL(b);P(f,w.origin,T),p(),F(`${w.origin}/mm-embedded-interop?id=${f}&origin=${window.location.origin}`);return}})(),()=>{D(f)}},[b,f,P,T]),Be(f,"ready",()=>h(d=>d+1)),Z?oe.jsx(wr,{$isReady:g,ref:T,src:y,...M}):oe.jsx("div",{style:{height:"100%",display:"flex",flex:1,alignItems:"center",justifyContent:"center"},children:oe.jsx("div",{style:{textAlign:"center"},children:"Application must adhere to the MM App Manifest specification to be embedded."})})};Je.propTypes={id:H.string,src:H.string.isRequired,path:H.string,onInit:H.func};exports.MMEmbeddableZone=Je;exports.MMEmbeddableZoneContext=ie;exports.MMEmbeddableZoneProvider=Ve;exports.getAppInfo=qe;exports.testIsEmbeddable=Ze;exports.useEmbeddedEffect=Be;