UNPKG

iobroker.javascript

Version:
37 lines (36 loc) 18.3 kB
import{g as Je}from"./_commonjsHelpers-Cpj98o6Y.js";import{a as dt,i as mt}from"./iobroker_javascript__mf_v__runtimeInit__mf_v__-CBQgOKij.js";import{i as c}from"./iobroker_javascript__loadShare__react__loadShare__-BiJPUKBK.js";import{ah as We,ai as ht,aj as Xe,ak as Ne,al as yt,am as St,an as pt,ao as gt,j as b,ap as Ct,aq as bt,ar as vt,u as _t,as as xt,T as N,b as $t,ac as Mt,h as Et}from"./createSvgIcon-BQT-7-GS.js";const{loadShare:Tt}=mt,{initPromise:wt}=dt,Pt=wt.then(e=>Tt("react-dom",{customShareInfo:{shareConfig:{singleton:!0,strictVersion:!1,requiredVersion:"*"}}})),jt=await Pt.then(e=>e());var kt=jt;const bo=Je(kt);var Be={exports:{}},f={};/** @license React v16.13.1 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var g=typeof Symbol=="function"&&Symbol.for,he=g?Symbol.for("react.element"):60103,ye=g?Symbol.for("react.portal"):60106,J=g?Symbol.for("react.fragment"):60107,W=g?Symbol.for("react.strict_mode"):60108,X=g?Symbol.for("react.profiler"):60114,B=g?Symbol.for("react.provider"):60109,Q=g?Symbol.for("react.context"):60110,Se=g?Symbol.for("react.async_mode"):60111,Z=g?Symbol.for("react.concurrent_mode"):60111,ee=g?Symbol.for("react.forward_ref"):60112,te=g?Symbol.for("react.suspense"):60113,Ot=g?Symbol.for("react.suspense_list"):60120,oe=g?Symbol.for("react.memo"):60115,re=g?Symbol.for("react.lazy"):60116,At=g?Symbol.for("react.block"):60121,It=g?Symbol.for("react.fundamental"):60117,Lt=g?Symbol.for("react.responder"):60118,Dt=g?Symbol.for("react.scope"):60119;function M(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case he:switch(e=e.type,e){case Se:case Z:case J:case X:case W:case te:return e;default:switch(e=e&&e.$$typeof,e){case Q:case ee:case re:case oe:case B:return e;default:return t}}case ye:return t}}}function Qe(e){return M(e)===Z}f.AsyncMode=Se;f.ConcurrentMode=Z;f.ContextConsumer=Q;f.ContextProvider=B;f.Element=he;f.ForwardRef=ee;f.Fragment=J;f.Lazy=re;f.Memo=oe;f.Portal=ye;f.Profiler=X;f.StrictMode=W;f.Suspense=te;f.isAsyncMode=function(e){return Qe(e)||M(e)===Se};f.isConcurrentMode=Qe;f.isContextConsumer=function(e){return M(e)===Q};f.isContextProvider=function(e){return M(e)===B};f.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===he};f.isForwardRef=function(e){return M(e)===ee};f.isFragment=function(e){return M(e)===J};f.isLazy=function(e){return M(e)===re};f.isMemo=function(e){return M(e)===oe};f.isPortal=function(e){return M(e)===ye};f.isProfiler=function(e){return M(e)===X};f.isStrictMode=function(e){return M(e)===W};f.isSuspense=function(e){return M(e)===te};f.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===J||e===Z||e===X||e===W||e===te||e===Ot||typeof e=="object"&&e!==null&&(e.$$typeof===re||e.$$typeof===oe||e.$$typeof===B||e.$$typeof===Q||e.$$typeof===ee||e.$$typeof===It||e.$$typeof===Lt||e.$$typeof===Dt||e.$$typeof===At)};f.typeOf=M;Be.exports=f;var Rt=Be.exports,pe=Rt,Vt={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Nt={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Ft={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Ze={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},ge={};ge[pe.ForwardRef]=Ft;ge[pe.Memo]=Ze;function Fe(e){return pe.isMemo(e)?Ze:ge[e.$$typeof]||Vt}var Kt=Object.defineProperty,qt=Object.getOwnPropertyNames,Ke=Object.getOwnPropertySymbols,Gt=Object.getOwnPropertyDescriptor,zt=Object.getPrototypeOf,qe=Object.prototype;function et(e,t,o){if(typeof t!="string"){if(qe){var r=zt(t);r&&r!==qe&&et(e,r,o)}var i=qt(t);Ke&&(i=i.concat(Ke(t)));for(var s=Fe(e),n=Fe(t),d=0;d<i.length;++d){var a=i[d];if(!Nt[a]&&!(o&&o[a])&&!(n&&n[a])&&!(s&&s[a])){var x=Gt(t,a);try{Kt(e,a,x)}catch{}}}}return e}var Ht=et;const vo=Je(Ht);var Ge=function(t,o){var r=arguments;if(o==null||!St.call(o,"css"))return c.createElement.apply(void 0,r);var i=r.length,s=new Array(i);s[0]=pt,s[1]=gt(t,o);for(var n=2;n<i;n++)s[n]=r[n];return c.createElement.apply(null,s)};(function(e){var t;t||(t=e.JSX||(e.JSX={}))})(Ge||(Ge={}));var Ut=ht(function(e,t){var o=e.styles,r=We([o],void 0,c.useContext(Xe)),i=c.useRef();return Ne(function(){var s=t.key+"-global",n=new t.sheet.constructor({key:s,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),d=!1,a=document.querySelector('style[data-emotion="'+s+" "+r.name+'"]');return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),a!==null&&(d=!0,a.setAttribute("data-emotion",s),n.hydrate([a])),i.current=[n,d],function(){n.flush()}},[t]),Ne(function(){var s=i.current,n=s[0],d=s[1];if(d){s[1]=!1;return}if(r.next!==void 0&&yt(t,r.next,!0),n.tags.length){var a=n.tags[n.tags.length-1].nextElementSibling;n.before=a,n.flush()}t.insert("",r,n,!1)},[t,r.name]),null});function Yt(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return We(t)}function _o(){var e=Yt.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}const fe=new Map,Jt=(e,t)=>{const o=bt(e);return o.sheet=new t({key:o.key,nonce:o.sheet.nonce,container:o.sheet.container,speedy:o.sheet.isSpeedy,prepend:o.sheet.prepend,insertionPoint:o.sheet.insertionPoint}),o};let A;if(typeof document=="object"&&(A=document.querySelector('[name="emotion-insertion-point"]'),!A)){A=document.createElement("meta"),A.setAttribute("name","emotion-insertion-point"),A.setAttribute("content","");const e=document.querySelector("head");e&&e.prepend(A)}function Wt(e,t){if(e||t){class o extends vt{insert(s,n){return this.key&&this.key.endsWith("global")&&(this.before=A),super.insert(s,n)}}const r=Jt({key:"css",insertionPoint:e?A:void 0},o);if(t){const i=r.insert;r.insert=(...s)=>(s[1].styles.startsWith("@layer")||(s[1].styles=`@layer mui {${s[1].styles}}`),i(...s))}return r}}function xo(e){const{injectFirst:t,enableCssLayer:o,children:r}=e,i=c.useMemo(()=>{const s=`${t}-${o}`;if(fe.has(s))return fe.get(s);const n=Wt(t,o);return fe.set(s,n),n},[t,o]);return i?b.jsx(Ct,{value:i,children:r}):r}function Xt(e){return e==null||Object.keys(e).length===0}function Bt(e){const{styles:t,defaultTheme:o={}}=e,r=typeof t=="function"?i=>t(Xt(i)?o:i):t;return b.jsx(Ut,{styles:r})}const Qt=typeof window<"u"?c.useLayoutEffect:c.useEffect,tt=c.createContext(null);function Ce(){return c.useContext(tt)}const Zt=typeof Symbol=="function"&&Symbol.for,eo=Zt?Symbol.for("mui.nested"):"__THEME_NESTED__";function to(e,t){return typeof t=="function"?t(e):{...e,...t}}function oo(e){const{children:t,theme:o}=e,r=Ce(),i=c.useMemo(()=>{const s=r===null?{...o}:to(r,o);return s!=null&&(s[eo]=r!==null),s},[o,r]);return b.jsx(tt.Provider,{value:i,children:t})}const ot=c.createContext();function ro({value:e,...t}){return b.jsx(ot.Provider,{value:e??!0,...t})}const $o=()=>c.useContext(ot)??!1,ze={};function He(e,t,o,r=!1){return c.useMemo(()=>{const i=e&&t[e]||t;if(typeof o=="function"){const s=o(i),n=e?{...t,[e]:s}:s;return r?()=>n:n}return e?{...t,[e]:o}:{...t,...o}},[e,t,o,r])}function rt(e){const{children:t,theme:o,themeId:r}=e,i=_t(ze),s=Ce()||ze,n=He(r,i,o),d=He(r,s,o,!0),a=(r?n[r]:n).direction==="rtl";return b.jsx(oo,{theme:d,children:b.jsx(Xe.Provider,{value:n,children:b.jsx(ro,{value:a,children:b.jsx(xt,{value:r?n[r].components:n.components,children:t})})})})}const be="mode",ve="color-scheme",no="data-color-scheme";function so(e){const{defaultMode:t="system",defaultLightColorScheme:o="light",defaultDarkColorScheme:r="dark",modeStorageKey:i=be,colorSchemeStorageKey:s=ve,attribute:n=no,colorSchemeNode:d="document.documentElement",nonce:a}=e||{};let x="",C=n;if(n==="class"&&(C=".%s"),n==="data"&&(C="[data-%s]"),C.startsWith(".")){const S=C.substring(1);x+=`${d}.classList.remove('${S}'.replace('%s', light), '${S}'.replace('%s', dark)); ${d}.classList.add('${S}'.replace('%s', colorScheme));`}const P=C.match(/\[([^\]]+)\]/);if(P){const[S,h]=P[1].split("=");h||(x+=`${d}.removeAttribute('${S}'.replace('%s', light)); ${d}.removeAttribute('${S}'.replace('%s', dark));`),x+=` ${d}.setAttribute('${S}'.replace('%s', colorScheme), ${h?`${h}.replace('%s', colorScheme)`:'""'});`}else x+=`${d}.setAttribute('${C}', colorScheme);`;return b.jsx("script",{suppressHydrationWarning:!0,nonce:typeof window>"u"?a:"",dangerouslySetInnerHTML:{__html:`(function() { try { let colorScheme = ''; const mode = localStorage.getItem('${i}') || '${t}'; const dark = localStorage.getItem('${s}-dark') || '${r}'; const light = localStorage.getItem('${s}-light') || '${o}'; if (mode === 'system') { // handle system mode const mql = window.matchMedia('(prefers-color-scheme: dark)'); if (mql.matches) { colorScheme = dark } else { colorScheme = light } } if (mode === 'light') { colorScheme = light; } if (mode === 'dark') { colorScheme = dark; } if (colorScheme) { ${x} } } catch(e){}})();`}},"mui-color-scheme-init")}function co(){}const io=({key:e,storageWindow:t})=>(!t&&typeof window<"u"&&(t=window),{get(o){if(typeof window>"u")return;if(!t)return o;let r;try{r=t.localStorage.getItem(e)}catch{}return r||o},set:o=>{if(t)try{t.localStorage.setItem(e,o)}catch{}},subscribe:o=>{if(!t)return co;const r=i=>{const s=i.newValue;i.key===e&&o(s)};return t.addEventListener("storage",r),()=>{t.removeEventListener("storage",r)}}});function de(){}function Ue(e){if(typeof window<"u"&&typeof window.matchMedia=="function"&&e==="system")return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function nt(e,t){if(e.mode==="light"||e.mode==="system"&&e.systemMode==="light")return t("light");if(e.mode==="dark"||e.mode==="system"&&e.systemMode==="dark")return t("dark")}function ao(e){return nt(e,t=>{if(t==="light")return e.lightColorScheme;if(t==="dark")return e.darkColorScheme})}function lo(e){const{defaultMode:t="light",defaultLightColorScheme:o,defaultDarkColorScheme:r,supportedColorSchemes:i=[],modeStorageKey:s=be,colorSchemeStorageKey:n=ve,storageWindow:d=typeof window>"u"?void 0:window,storageManager:a=io,noSsr:x=!1}=e,C=i.join(","),P=i.length>1,S=c.useMemo(()=>a==null?void 0:a({key:s,storageWindow:d}),[a,s,d]),h=c.useMemo(()=>a==null?void 0:a({key:`${n}-light`,storageWindow:d}),[a,n,d]),p=c.useMemo(()=>a==null?void 0:a({key:`${n}-dark`,storageWindow:d}),[a,n,d]),[k,D]=c.useState(()=>{const l=(S==null?void 0:S.get(t))||t,u=(h==null?void 0:h.get(o))||o,m=(p==null?void 0:p.get(r))||r;return{mode:l,systemMode:Ue(l),lightColorScheme:u,darkColorScheme:m}}),[I,ne]=c.useState(x||!P);c.useEffect(()=>{ne(!0)},[]);const F=ao(k),K=c.useCallback(l=>{D(u=>{if(l===u.mode)return u;const m=l??t;return S==null||S.set(m),{...u,mode:m,systemMode:Ue(m)}})},[S,t]),R=c.useCallback(l=>{l?typeof l=="string"?l&&!C.includes(l)?console.error(`\`${l}\` does not exist in \`theme.colorSchemes\`.`):D(u=>{const m={...u};return nt(u,y=>{y==="light"&&(h==null||h.set(l),m.lightColorScheme=l),y==="dark"&&(p==null||p.set(l),m.darkColorScheme=l)}),m}):D(u=>{const m={...u},y=l.light===null?o:l.light,L=l.dark===null?r:l.dark;return y&&(C.includes(y)?(m.lightColorScheme=y,h==null||h.set(y)):console.error(`\`${y}\` does not exist in \`theme.colorSchemes\`.`)),L&&(C.includes(L)?(m.darkColorScheme=L,p==null||p.set(L)):console.error(`\`${L}\` does not exist in \`theme.colorSchemes\`.`)),m}):D(u=>(h==null||h.set(o),p==null||p.set(r),{...u,lightColorScheme:o,darkColorScheme:r}))},[C,h,p,o,r]),q=c.useCallback(l=>{k.mode==="system"&&D(u=>{const m=l!=null&&l.matches?"dark":"light";return u.systemMode===m?u:{...u,systemMode:m}})},[k.mode]),U=c.useRef(q);return U.current=q,c.useEffect(()=>{if(typeof window.matchMedia!="function"||!P)return;const l=(...m)=>U.current(...m),u=window.matchMedia("(prefers-color-scheme: dark)");return u.addListener(l),l(u),()=>{u.removeListener(l)}},[P]),c.useEffect(()=>{if(P){const l=(S==null?void 0:S.subscribe(y=>{(!y||["light","dark","system"].includes(y))&&K(y||t)}))||de,u=(h==null?void 0:h.subscribe(y=>{(!y||C.match(y))&&R({light:y})}))||de,m=(p==null?void 0:p.subscribe(y=>{(!y||C.match(y))&&R({dark:y})}))||de;return()=>{l(),u(),m()}}},[R,K,C,t,d,P,S,h,p]),{...k,mode:I?k.mode:void 0,systemMode:I?k.systemMode:void 0,colorScheme:I?F:void 0,setMode:K,setColorScheme:R}}const uo="*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function fo(e){const{themeId:t,theme:o={},modeStorageKey:r=be,colorSchemeStorageKey:i=ve,disableTransitionOnChange:s=!1,defaultColorScheme:n,resolveTheme:d}=e,a={allColorSchemes:[],colorScheme:void 0,darkColorScheme:void 0,lightColorScheme:void 0,mode:void 0,setColorScheme:()=>{},setMode:()=>{},systemMode:void 0},x=c.createContext(void 0),C=()=>c.useContext(x)||a,P={},S={};function h(I){var Le,De,Re,Ve;const{children:ne,theme:F,modeStorageKey:K=r,colorSchemeStorageKey:R=i,disableTransitionOnChange:q=s,storageManager:U,storageWindow:l=typeof window>"u"?void 0:window,documentNode:u=typeof document>"u"?void 0:document,colorSchemeNode:m=typeof document>"u"?void 0:document.documentElement,disableNestedContext:y=!1,disableStyleSheetGeneration:L=!1,defaultMode:ct="system",noSsr:it}=I,se=c.useRef(!1),ce=Ce(),ie=c.useContext(x),ae=!!ie&&!y,_e=c.useMemo(()=>F||(typeof o=="function"?o():o),[F]),xe=_e[t],E=xe||_e,{colorSchemes:O=P,components:$e=S,cssVarPrefix:le}=E,Me=Object.keys(O).filter(v=>!!O[v]).join(","),V=c.useMemo(()=>Me.split(","),[Me]),Ee=typeof n=="string"?n:n.light,Te=typeof n=="string"?n:n.dark,at=O[Ee]&&O[Te]?ct:((De=(Le=O[E.defaultColorScheme])==null?void 0:Le.palette)==null?void 0:De.mode)||((Re=E.palette)==null?void 0:Re.mode),{mode:lt,setMode:we,systemMode:Pe,lightColorScheme:je,darkColorScheme:ke,colorScheme:ut,setColorScheme:Oe}=lo({supportedColorSchemes:V,defaultLightColorScheme:Ee,defaultDarkColorScheme:Te,modeStorageKey:K,colorSchemeStorageKey:R,defaultMode:at,storageManager:U,storageWindow:l,noSsr:it});let ue=lt,T=ut;ae&&(ue=ie.mode,T=ie.colorScheme);const G=c.useMemo(()=>{var H;const v=T||E.defaultColorScheme,_=((H=E.generateThemeVars)==null?void 0:H.call(E))||E.vars,$={...E,components:$e,colorSchemes:O,cssVarPrefix:le,vars:_};if(typeof $.generateSpacing=="function"&&($.spacing=$.generateSpacing()),v){const w=O[v];w&&typeof w=="object"&&Object.keys(w).forEach(j=>{w[j]&&typeof w[j]=="object"?$[j]={...$[j],...w[j]}:$[j]=w[j]})}return d?d($):$},[E,T,$e,O,le]),z=E.colorSchemeSelector;Qt(()=>{if(T&&m&&z&&z!=="media"){const v=z;let _=z;if(v==="class"&&(_=".%s"),v==="data"&&(_="[data-%s]"),v!=null&&v.startsWith("data-")&&!v.includes("%s")&&(_=`[${v}="%s"]`),_.startsWith("."))m.classList.remove(...V.map($=>_.substring(1).replace("%s",$))),m.classList.add(_.substring(1).replace("%s",T));else{const $=_.replace("%s",T).match(/\[([^\]]+)\]/);if($){const[H,w]=$[1].split("=");w||V.forEach(j=>{m.removeAttribute(H.replace(T,j))}),m.setAttribute(H,w?w.replace(/"|'/g,""):"")}else m.setAttribute(_,T)}}},[T,z,m,V]),c.useEffect(()=>{let v;if(q&&se.current&&u){const _=u.createElement("style");_.appendChild(u.createTextNode(uo)),u.head.appendChild(_),window.getComputedStyle(u.body),v=setTimeout(()=>{u.head.removeChild(_)},1)}return()=>{clearTimeout(v)}},[T,q,u]),c.useEffect(()=>(se.current=!0,()=>{se.current=!1}),[]);const ft=c.useMemo(()=>({allColorSchemes:V,colorScheme:T,darkColorScheme:ke,lightColorScheme:je,mode:ue,setColorScheme:Oe,setMode:we,systemMode:Pe}),[V,T,ke,je,ue,Oe,we,Pe,G.colorSchemeSelector]);let Ae=!0;(L||E.cssVariables===!1||ae&&(ce==null?void 0:ce.cssVarPrefix)===le)&&(Ae=!1);const Ie=b.jsxs(c.Fragment,{children:[b.jsx(rt,{themeId:xe?t:void 0,theme:G,children:ne}),Ae&&b.jsx(Bt,{styles:((Ve=G.generateStyleSheets)==null?void 0:Ve.call(G))||[]})]});return ae?Ie:b.jsx(x.Provider,{value:ft,children:Ie})}const p=typeof n=="string"?n:n.light,k=typeof n=="string"?n:n.dark;return{CssVarsProvider:h,useColorScheme:C,getInitColorSchemeScript:I=>so({colorSchemeStorageKey:i,defaultLightColorScheme:p,defaultDarkColorScheme:k,modeStorageKey:r,...I})}}function mo({theme:e,...t}){const o=N in e?e[N]:void 0;return b.jsx(rt,{...t,themeId:o?N:void 0,theme:o||e})}const Y={colorSchemeStorageKey:"mui-color-scheme",defaultLightColorScheme:"light",defaultDarkColorScheme:"dark",modeStorageKey:"mui-mode"},{CssVarsProvider:st,useColorScheme:Mo,getInitColorSchemeScript:ho}=fo({themeId:N,theme:()=>$t({cssVariables:!0}),colorSchemeStorageKey:Y.colorSchemeStorageKey,modeStorageKey:Y.modeStorageKey,defaultColorScheme:{light:Y.defaultLightColorScheme,dark:Y.defaultDarkColorScheme},resolveTheme:e=>{const t={...e,typography:Mt(e.palette,e.typography)};return t.unstable_sx=function(r){return Et({sx:r,theme:this})},t}});function Eo(e){return b.jsx(st,{...e})}let Ye=!1;const To=e=>(Ye||(console.warn(["MUI: The getInitColorSchemeScript function has been deprecated.","","You should use `import InitColorSchemeScript from '@mui/material/InitColorSchemeScript'`","and replace the function call with `<InitColorSchemeScript />` instead."].join(` `)),Ye=!0),ho(e)),yo=st;function wo({theme:e,...t}){const o=c.useMemo(()=>{if(typeof e=="function")return e;const r=N in e?e[N]:e;return"colorSchemes"in r?null:"vars"in r?e:{...e,vars:null}},[e]);return o?b.jsx(mo,{theme:o,...t}):b.jsx(yo,{theme:e,...t})}const Po={50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",A100:"#ffff8d",A200:"#ffff00",A400:"#ffea00",A700:"#ffd600"};function jo(e,t){if(e==null)return{};var o={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;o[r]=e[r]}return o}function me(e,t){return me=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,r){return o.__proto__=r,o},me(e,t)}function ko(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,me(e,t)}export{yo as C,Eo as E,Bt as G,bo as R,xo as S,wo as T,ko as _,jo as a,$o as b,Yt as c,Mo as d,To as g,kt as i,_o as k,vo as m,Qt as u,Po as y};