iobroker.javascript 10.0.0 → 10.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -6
- package/admin/assets/AiChatPanel-C4kuqP2U.js +237 -0
- package/admin/assets/AiDiffView-zJTEnv05.js +1 -0
- package/admin/assets/BlocklyEditor-BB77aFJI.js +84 -0
- package/admin/assets/ContextWrapper-C2yvd2Tn.css +1 -0
- package/admin/assets/ContextWrapper-W2H0z6zD.js +136 -0
- package/admin/assets/Debugger-DCMWjeGm.js +15 -0
- package/admin/assets/Error-CBC2oZzb.js +1 -0
- package/admin/assets/Import-B-F9IhZ-.js +1 -0
- package/admin/assets/RulesEditor-ByjgEaVo.js +1 -0
- package/admin/assets/RulesEditor-k-DMHotH.css +1 -0
- package/admin/assets/{ScriptEditor-BGIuoNei.js → ScriptEditor-CMYUt5S4.js} +2 -2
- package/admin/assets/{ScriptEditorVanillaMonaco-DyMQtoTQ.js → ScriptEditorVanillaMonaco-v12-gORS.js} +3 -3
- package/admin/assets/Send-CChqR5Oy.js +1 -0
- package/admin/assets/_virtual_mf-localSharedImportMap___mfe_internal__iobroker_javascript__mf_owner__1-7EPUlgCk.js +1 -0
- package/admin/assets/_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-DuplUOZN.js +1243 -0
- package/admin/assets/{_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-BBAXJaqI.js → _virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-JkwfVf8d.js} +1 -1
- package/admin/assets/{aiCodeLensProvider-hyAmut0e.js → aiCodeLensProvider-BGvIu6hH.js} +1 -1
- package/admin/assets/blockly-C4zJerWL.js +1047 -0
- package/admin/assets/blocks_action-CvnOHXwt.js +1 -0
- package/admin/assets/blocks_convert-BZlKcd02.js +3 -0
- package/admin/assets/blocks_logic-B33Pypxr.js +1 -0
- package/admin/assets/blocks_number-k2IjE7OH.js +1 -0
- package/admin/assets/blocks_object-B64vSfel.js +1 -0
- package/admin/assets/blocks_procedures-BpvNI5dO.js +3 -0
- package/admin/assets/blocks_sendto-pwZchfe0.js +5 -0
- package/admin/assets/blocks_switch-DViYCmQd.js +2 -0
- package/admin/assets/blocks_system-BZZcGqTJ.js +1 -0
- package/admin/assets/blocks_text-BOvtHN2r.js +1 -0
- package/admin/assets/blocks_time-BH2F-ylT.js +1 -0
- package/admin/assets/blocks_timeout-C3BoW4XJ.js +1 -0
- package/admin/assets/blocks_trigger-gwXvuAHV.js +2 -0
- package/admin/assets/blocks_words-D8PL_nSE.js +1 -0
- package/admin/assets/{cronHoverProvider-pKJkSevo.js → cronHoverProvider-DjY3jLvQ.js} +1 -1
- package/admin/assets/dist-D6o4h8Pd.js +4 -0
- package/admin/assets/field_cron-BMQWPb61.js +1 -0
- package/admin/assets/field_oid-BGIMv9gw.js +1 -0
- package/admin/assets/field_script-CdzYBCe6.js +1 -0
- package/admin/assets/helpers-Crmcgphg.js +1 -0
- package/admin/assets/hostInit-DBlZi_Kt.js +1 -0
- package/admin/assets/index-BvPVHv3P.js +192 -0
- package/admin/assets/{inlineChatWidget-ZaisTOLh.js → inlineChatWidget-SDoyVtOR.js} +2 -2
- package/admin/assets/{inlineDiffController-hTwHHqcc.js → inlineDiffController-CnHE3Rwd.js} +2 -2
- package/admin/assets/javascript-DVIhlTDr.js +218 -0
- package/admin/assets/{mf-entry-bootstrap-0-d6052b31.js → mf-entry-bootstrap-0-a03ecebd.js} +6 -2
- package/admin/assets/{mjs-DWqivHEk.js → mjs-Bh7xFIpd.js} +2 -2
- package/admin/assets/{stateHoverProvider-C7DawIs-.js → stateHoverProvider-D0iXo6YF.js} +3 -3
- package/admin/assets/{virtualExposes-Ed0lGq7k.js → virtualExposes-DgGB-18P.js} +1 -1
- package/admin/assets/virtual_mf-REMOTE_ENTRY_ID___mfe_internal__iobroker_javascript__remoteEntry_js-DYEYnOkt.js +1 -0
- package/admin/assets/virtual_mf-exposes___mfe_internal__iobroker_javascript__remoteEntry_js-ChiJXsfH.js +1 -0
- package/admin/custom/assets/Components-CuFt9lAY.js +1 -0
- package/admin/custom/assets/_virtual_mf-localSharedImportMap___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1-DljJyQQg.js +1 -0
- package/admin/custom/assets/_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1__loadShare___mf_0_emotion_mf_1_react__loadShare__.js-D0M1SjIE.js +1 -0
- package/admin/custom/assets/{_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1__loadShare___mf_0_emotion_mf_1_styled__loadShare__.js-CGb5Cofy.js → _virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1__loadShare___mf_0_emotion_mf_1_styled__loadShare__.js-BD2OkSge.js} +1 -1
- package/admin/custom/assets/{_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-BVCIAgbo.js → _virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-pM642JFd.js} +91 -91
- package/admin/custom/assets/{_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1__loadShare___mf_0_iobroker_mf_1_json_mf_2_config__loadShare__.js-BkB0anQX.js → _virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1__loadShare___mf_0_iobroker_mf_1_json_mf_2_config__loadShare__.js-BLelmJ7Y.js} +74 -74
- package/admin/custom/assets/{_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-BotqDuw-.js → _virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-BGiB1l5e.js} +1 -1
- package/admin/custom/assets/{_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1__prebuild__date_mf_2_fns__prebuild__-Cb5TR7FB.js → _virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1__prebuild__date_mf_2_fns__prebuild__-D5hqXJXI.js} +1 -1
- package/admin/custom/assets/hostInit-0DGPuZTB.js +1 -0
- package/admin/custom/assets/{index-uEKAoVT7.js → index-DcFI5r-g.js} +1 -1
- package/admin/custom/assets/{lib-Yj8cfN0A.js → lib-BlUjuGH7.js} +1 -1
- package/admin/custom/assets/{mf-entry-bootstrap-0-77793feb.js → mf-entry-bootstrap-0-efd847a6.js} +6 -2
- package/admin/custom/assets/{setYear-DJ9FbdkO.js → setYear-BaCcPbbI.js} +1 -1
- package/admin/custom/assets/virtualExposes-DGxNcyb6.js +1 -0
- package/admin/custom/assets/virtual_mf-REMOTE_ENTRY_ID___mfe_internal__ConfigCustomJavascriptSet__customComponents_js-DVNwFcUr.js +1 -0
- package/admin/custom/assets/virtual_mf-exposes___mfe_internal__ConfigCustomJavascriptSet__customComponents_js-DPck7zEs.js +2 -0
- package/admin/custom/customComponents.js +1 -1
- package/admin/google-blockly/VERSION +1 -0
- package/admin/google-blockly/media/drop.mp3 +0 -0
- package/admin/google-blockly/msg/js/de.js +332 -56
- package/admin/google-blockly/msg/js/en.js +319 -43
- package/admin/google-blockly/msg/js/es.js +319 -42
- package/admin/google-blockly/msg/js/fr.js +315 -39
- package/admin/google-blockly/msg/js/it.js +327 -51
- package/admin/google-blockly/msg/js/nl.js +376 -100
- package/admin/google-blockly/msg/js/pl.js +318 -42
- package/admin/google-blockly/msg/js/pt.js +318 -42
- package/admin/google-blockly/msg/js/ru.js +320 -44
- package/admin/google-blockly/msg/js/uk.js +326 -50
- package/admin/google-blockly/msg/js/zh-cn.js +322 -46
- package/admin/i18n/de.json +48 -26
- package/admin/i18n/en.json +47 -25
- package/admin/i18n/es.json +48 -18
- package/admin/i18n/fr.json +47 -17
- package/admin/i18n/it.json +47 -17
- package/admin/i18n/nl.json +47 -17
- package/admin/i18n/pl.json +48 -18
- package/admin/i18n/pt.json +47 -17
- package/admin/i18n/ru.json +47 -17
- package/admin/i18n/uk.json +47 -17
- package/admin/i18n/zh-cn.json +47 -17
- package/admin/jsonConfig.json +367 -0
- package/admin/mf-manifest.json +1 -1
- package/admin/mf-stats.json +1 -1
- package/admin/remoteEntry.js +1 -1
- package/admin/tab.html +12 -95
- package/build/lib/mirror.js +9 -0
- package/build/lib/mirror.js.map +1 -1
- package/build/lib/sandbox.js +35 -0
- package/build/lib/sandbox.js.map +1 -1
- package/build/lib/typescriptSettings.js +112 -2
- package/build/lib/typescriptSettings.js.map +1 -1
- package/build/lib/typescriptTools.js +168 -43
- package/build/lib/typescriptTools.js.map +1 -1
- package/build/main.js +10 -5
- package/build/main.js.map +1 -1
- package/build/types.d.ts +41 -0
- package/docs/en/javascript.md +16 -0
- package/docs/en/upgrade-guide.md +3 -0
- package/io-package.json +45 -15
- package/package.json +8 -3
- package/admin/assets/AiChatPanel-p0KAg6Cs.js +0 -237
- package/admin/assets/AiDiffView-BPTLnNx1.js +0 -1
- package/admin/assets/BlocklyEditor-CAjVMhYT.js +0 -81
- package/admin/assets/ContextWrapper-BVc8wTK_.css +0 -1
- package/admin/assets/ContextWrapper-D9CrnNKs.js +0 -127
- package/admin/assets/Debugger-SjROokFI.js +0 -15
- package/admin/assets/Error-DDfrxAt2.js +0 -1
- package/admin/assets/Import-DpTg1Jow.js +0 -1
- package/admin/assets/RulesEditor-BSRFWpEm.css +0 -1
- package/admin/assets/RulesEditor-D0hgrcBc.js +0 -1
- package/admin/assets/_virtual_mf-localSharedImportMap___mfe_internal__iobroker_javascript__mf_owner__1-DWJotR1B.js +0 -1
- package/admin/assets/_virtual_mf___mfe_internal__iobroker_javascript__mf_owner__1__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-CxICLr5Z.js +0 -1243
- package/admin/assets/dist-uw5orDgd.js +0 -4
- package/admin/assets/hostInit-BFg5u9hY.js +0 -1
- package/admin/assets/index-B1gICjdq.js +0 -192
- package/admin/assets/virtual_mf-REMOTE_ENTRY_ID___mfe_internal__iobroker_javascript__remoteEntry_js-BYs71IQF.js +0 -1
- package/admin/assets/virtual_mf-exposes___mfe_internal__iobroker_javascript__remoteEntry_js-DnnXQRkG.js +0 -1
- package/admin/custom/assets/Components-BrDyDHXh.js +0 -1
- package/admin/custom/assets/_virtual_mf-localSharedImportMap___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1-CyYJM2-v.js +0 -1
- package/admin/custom/assets/_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1__loadShare___mf_0_emotion_mf_1_react__loadShare__.js-BdzCssLn.js +0 -1
- package/admin/custom/assets/hostInit-DJx2uXXy.js +0 -1
- package/admin/custom/assets/virtualExposes-CxDjLoYu.js +0 -1
- package/admin/custom/assets/virtual_mf-REMOTE_ENTRY_ID___mfe_internal__ConfigCustomJavascriptSet__customComponents_js-BU-ugy_7.js +0 -1
- package/admin/custom/assets/virtual_mf-exposes-ssr___mfe_internal__ConfigCustomJavascriptSet__customComponents_js-BEfZbrf7.js +0 -2
- package/admin/custom/assets/virtual_mf-exposes___mfe_internal__ConfigCustomJavascriptSet__customComponents_js-CTeZ0Jpm.js +0 -2
- package/admin/google-blockly/blockly_compressed.js +0 -1679
- package/admin/google-blockly/blocks_compressed.js +0 -193
- package/admin/google-blockly/javascript_compressed.js +0 -264
- package/admin/google-blockly/msg/messages.js +0 -1630
- package/admin/google-blockly/own/blocks_action.js +0 -765
- package/admin/google-blockly/own/blocks_convert.js +0 -480
- package/admin/google-blockly/own/blocks_logic.js +0 -459
- package/admin/google-blockly/own/blocks_number.js +0 -30
- package/admin/google-blockly/own/blocks_object.js +0 -402
- package/admin/google-blockly/own/blocks_procedures.js +0 -688
- package/admin/google-blockly/own/blocks_sendto.js +0 -702
- package/admin/google-blockly/own/blocks_switch.js +0 -257
- package/admin/google-blockly/own/blocks_system.js +0 -1409
- package/admin/google-blockly/own/blocks_text.js +0 -104
- package/admin/google-blockly/own/blocks_time.js +0 -639
- package/admin/google-blockly/own/blocks_timeout.js +0 -551
- package/admin/google-blockly/own/blocks_trigger.js +0 -1791
- package/admin/google-blockly/own/blocks_words.js +0 -708
- package/admin/google-blockly/own/field_cron.js +0 -158
- package/admin/google-blockly/own/field_oid.js +0 -642
- package/admin/google-blockly/own/field_script.js +0 -159
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./lib-
|
|
2
|
-
import{a as e,r as t,s as n,t as r}from"./rolldown-runtime-BcKkbAw3.js";import{t as i}from"./vite-preload-helper-B7qeedMF.js";import{A as a,C as o,E as s,F as c,I as l,L as u,M as d,O as f,P as p,S as m,T as h,V as g,_,b as v,j as y,k as b,p as x,v as S,w as C,x as w,y as T}from"./_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1__loadShare___mf_0_emotion_mf_1_react__loadShare__.js-
|
|
3
|
-
`),n=t.filter(e=>!
|
|
4
|
-
`)}`:void 0}catch{return}}var
|
|
5
|
-
`)};function Kr(e,t,n,r,i,a){return r(Gr(e,t,n,i))}var qr=`[ Federation Runtime ]`,Jr=Lr(qr);function Yr(e,t,n,r,i){e||(n===void 0?Xr(t):Xr(t,n,r,void 0,i))}function Xr(e,t,n,r,i){if(t!==void 0)return Kr(e,t,n??{},e=>{throw Error(`${qr}: ${e}`)},r,i);let a=e;throw a instanceof Error?(a.message.startsWith(qr)||(a.message=`${qr}: ${a.message}`),a):Error(`${qr}: ${a}`)}function Zr(e){e instanceof Error&&(e.message.startsWith(qr)||(e.message=`${qr}: ${e.message}`)),Jr.warn(e)}function Qr(e,t){return e.findIndex(e=>e===t)===-1&&e.push(t),e}function $r(e){return`version`in e&&e.version?`${e.name}:${e.version}`:`entry`in e&&e.entry?`${e.name}:${e.entry}`:`${e.name}`}function ei(e){return e.entry!==void 0}function ti(e){return!e.entry.includes(`.json`)}function ni(e){return e&&typeof e==`object`}var ri=Object.prototype.toString;function ii(e){return ri.call(e)===`[object Object]`}function ai(e){return Array.isArray(e)?e:[e]}function oi(e){return`remoteEntry`in e?{url:e.remoteEntry,type:e.remoteEntryType,globalName:e.globalName}:{url:``,type:`global`,globalName:``}}var si=(e,t)=>{let n;return n=e.endsWith(`/`)?e.slice(0,-1):e,t.startsWith(`.`)&&(t=t.slice(1)),n+=t,n},ci=typeof globalThis==`object`?globalThis:window,li=(()=>{try{return document.defaultView}catch{return ci}})(),ui=li;function di(e,t,n){Object.defineProperty(e,t,{value:n,configurable:!1,writable:!0})}function fi(e,t){return Object.hasOwnProperty.call(e,t)}fi(ci,`__GLOBAL_LOADING_REMOTE_ENTRY__`)||di(ci,`__GLOBAL_LOADING_REMOTE_ENTRY__`,{});var pi=ci.__GLOBAL_LOADING_REMOTE_ENTRY__;function mi(e){fi(e,`__VMOK__`)&&!fi(e,`__FEDERATION__`)&&di(e,`__FEDERATION__`,e.__VMOK__),fi(e,`__FEDERATION__`)||(di(e,`__FEDERATION__`,{__GLOBAL_PLUGIN__:[],__INSTANCES__:[],moduleInfo:{},__SHARE__:{},__MANIFEST_LOADING__:{},__PRELOADED_MAP__:new Map}),di(e,`__VMOK__`,e.__FEDERATION__)),e.__FEDERATION__.__GLOBAL_PLUGIN__??=[],e.__FEDERATION__.__INSTANCES__??=[],e.__FEDERATION__.moduleInfo??={},e.__FEDERATION__.__SHARE__??={},e.__FEDERATION__.__MANIFEST_LOADING__??={},e.__FEDERATION__.__PRELOADED_MAP__??=new Map}mi(ci),mi(li);function hi(){ci.__FEDERATION__.__GLOBAL_PLUGIN__=[],ci.__FEDERATION__.__INSTANCES__=[],ci.__FEDERATION__.moduleInfo={},ci.__FEDERATION__.__SHARE__={},ci.__FEDERATION__.__MANIFEST_LOADING__={},Object.keys(pi).forEach(e=>{delete pi[e]})}function gi(e){ci.__FEDERATION__.__INSTANCES__.push(e)}function _i(){return ci.__FEDERATION__.__DEBUG_CONSTRUCTOR__}function vi(e,t=Sr()){t&&(ci.__FEDERATION__.__DEBUG_CONSTRUCTOR__=e,ci.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__=`2.8.1`)}function yi(e,t){if(typeof t==`string`){if(e[t])return{value:e[t],key:t};{let n=Object.keys(e);for(let r of n){let[n,i]=r.split(`:`),a=`${n}:${t}`,o=e[a];if(o)return{value:o,key:a}}return{value:void 0,key:t}}}Xr(`getInfoWithoutType: "key" must be a string, got ${typeof t} (${JSON.stringify(t)}).`)}var bi=()=>li.__FEDERATION__.moduleInfo,xi=(e,t)=>{let n=yi(t,$r(e)).value;if(n&&!n.version&&`version`in e&&e.version&&(n.version=e.version),n)return n;if(`version`in e&&e.version){let{version:t,...n}=e,r=$r(n),i=yi(li.__FEDERATION__.moduleInfo,r).value;if((i==null?void 0:i.version)===t)return i}},Si=e=>xi(e,li.__FEDERATION__.moduleInfo),Ci=(e,t)=>{let n=$r(e);return li.__FEDERATION__.moduleInfo[n]=t,li.__FEDERATION__.moduleInfo},wi=e=>(li.__FEDERATION__.moduleInfo={...li.__FEDERATION__.moduleInfo,...e},()=>{let t=Object.keys(e);for(let e of t)delete li.__FEDERATION__.moduleInfo[e]}),Ti=(e,t)=>{let n=t||`__FEDERATION_${e}:custom__`;return{remoteEntryKey:n,entryExports:ci[n]}},Ei=e=>{let{__GLOBAL_PLUGIN__:t}=li.__FEDERATION__;e.forEach(e=>{t.findIndex(t=>t.name===e.name)===-1?t.push(e):Zr(`The plugin ${e.name} has been registered.`)})},Di=()=>li.__FEDERATION__.__GLOBAL_PLUGIN__,Oi=e=>ci.__FEDERATION__.__PRELOADED_MAP__.get(e),ki=e=>ci.__FEDERATION__.__PRELOADED_MAP__.set(e,!0),Ai=`[0-9A-Za-z-]+`,ji=`(?:\\+(${Ai}(?:\\.${Ai})*))`,Mi=`0|[1-9]\\d*`,Ni=`[0-9]+`,Pi=`\\d*[a-zA-Z-][a-zA-Z0-9-]*`,Fi=`(?:${Ni}|${Pi})`,Ii=`(?:-?(${Fi}(?:\\.${Fi})*))`,Li=`(?:${Mi}|${Pi})`,Ri=`(?:-(${Li}(?:\\.${Li})*))`,zi=`${Mi}|x|X|\\*`,Bi=`[v=\\s]*(${zi})(?:\\.(${zi})(?:\\.(${zi})(?:${Ri})?${ji}?)?)?`,Vi=`^\\s*(${Bi})\\s+-\\s+(${Bi})\\s*$`,Hi=`[v=\\s]*${`(${Ni})\\.(${Ni})\\.(${Ni})`}${Ii}?${ji}?`,Ui=`((?:<|>)?=?)`,Wi=`(\\s*)${Ui}\\s*(${Hi}|${Bi})`,Gi=`(?:~>?)`,Ki=`(\\s*)${Gi}\\s+`,qi=`(?:\\^)`,Ji=`(\\s*)${qi}\\s+`,Yi=`(<|>)?=?\\s*\\*`,Xi=`^${qi}${Bi}$`,Zi=`v?${`(${Mi})\\.(${Mi})\\.(${Mi})`}${Ri}?${ji}?`,Qi=`^${Gi}${Bi}$`,$i=`^${Ui}\\s*${Bi}$`,ea=`^${Ui}\\s*(${Zi})$|^$`,ta=`^\\s*>=\\s*0.0.0\\s*$`;function na(e){return new RegExp(e)}function ra(e){return!e||e.toLowerCase()===`x`||e===`*`}function ia(...e){return t=>e.reduce((e,t)=>t(e),t)}function aa(e){return e.match(na(ea))}function oa(e,t,n,r){let i=`${e}.${t}.${n}`;return r?`${i}-${r}`:i}function sa(e){return e.replace(na(Vi),(e,t,n,r,i,a,o,s,c,l,u,d)=>(t=ra(n)?``:ra(r)?`>=${n}.0.0`:ra(i)?`>=${n}.${r}.0`:`>=${t}`,s=ra(c)?``:ra(l)?`<${Number(c)+1}.0.0-0`:ra(u)?`<${c}.${Number(l)+1}.0-0`:d?`<=${c}.${l}.${u}-${d}`:`<=${s}`,`${t} ${s}`.trim()))}function ca(e){return e.replace(na(Wi),`$1$2$3`)}function la(e){return e.replace(na(Ki),`$1~`)}function ua(e){return e.replace(na(Ji),`$1^`)}function da(e){return e.trim().split(/\s+/).map(e=>e.replace(na(Xi),(e,t,n,r,i)=>ra(t)?``:ra(n)?`>=${t}.0.0 <${Number(t)+1}.0.0-0`:ra(r)?t===`0`?`>=${t}.${n}.0 <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.0 <${Number(t)+1}.0.0-0`:i?t===`0`?n===`0`?`>=${t}.${n}.${r}-${i} <${t}.${n}.${Number(r)+1}-0`:`>=${t}.${n}.${r}-${i} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.${r}-${i} <${Number(t)+1}.0.0-0`:t===`0`?n===`0`?`>=${t}.${n}.${r} <${t}.${n}.${Number(r)+1}-0`:`>=${t}.${n}.${r} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.${r} <${Number(t)+1}.0.0-0`)).join(` `)}function fa(e){return e.trim().split(/\s+/).map(e=>e.replace(na(Qi),(e,t,n,r,i)=>ra(t)?``:ra(n)?`>=${t}.0.0 <${Number(t)+1}.0.0-0`:ra(r)?`>=${t}.${n}.0 <${t}.${Number(n)+1}.0-0`:i?`>=${t}.${n}.${r}-${i} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.${r} <${t}.${Number(n)+1}.0-0`)).join(` `)}function pa(e){return e.split(/\s+/).map(e=>e.trim().replace(na($i),(e,t,n,r,i,a)=>{let o=ra(n),s=o||ra(r),c=s||ra(i);return t===`=`&&c&&(t=``),a=``,o?t===`>`||t===`<`?`<0.0.0-0`:`*`:t&&c?(s&&(r=0),i=0,t===`>`?(t=`>=`,s?(n=Number(n)+1,r=0,i=0):(r=Number(r)+1,i=0)):t===`<=`&&(t=`<`,s?n=Number(n)+1:r=Number(r)+1),t===`<`&&(a=`-0`),`${t+n}.${r}.${i}${a}`):s?`>=${n}.0.0${a} <${Number(n)+1}.0.0-0`:c?`>=${n}.${r}.0${a} <${n}.${Number(r)+1}.0-0`:e})).join(` `)}function ma(e){return e.trim().replace(na(Yi),``)}function ha(e){return e.trim().replace(na(ta),``)}function ga(e,t){return e=Number(e)||e,t=Number(t)||t,e>t?1:e===t?0:-1}function _a(e,t){let{preRelease:n}=e,{preRelease:r}=t;if(n===void 0&&r)return 1;if(n&&r===void 0)return-1;if(n===void 0&&r===void 0)return 0;for(let e=0,t=n.length;e<=t;e++){let t=n[e],i=r[e];if(t!==i)return t===void 0&&i===void 0?0:t?i?ga(t,i):-1:1}return 0}function va(e,t){return ga(e.major,t.major)||ga(e.minor,t.minor)||ga(e.patch,t.patch)||_a(e,t)}function ya(e,t){return e.version===t.version}function ba(e,t){switch(e.operator){case``:case`=`:return ya(e,t);case`>`:return va(e,t)<0;case`>=`:return ya(e,t)||va(e,t)<0;case`<`:return va(e,t)>0;case`<=`:return ya(e,t)||va(e,t)>0;case void 0:return!0;default:return!1}}function xa(e){return ia(da,fa,pa,ma)(e)}function Sa(e){return ia(sa,ca,la,ua)(e.trim()).split(/\s+/).join(` `)}function Ca(e,t){if(!e)return!1;let n=aa(e);if(!n)return!1;let[,r,,i,a,o,s]=n,c={operator:r,version:oa(i,a,o,s),major:i,minor:a,patch:o,preRelease:s==null?void 0:s.split(`.`)},l=t.split(`||`);for(let e of l){let t=e.trim();if(!t||t===`*`||t===`x`)return!0;try{let e=Sa(t);if(!e.trim())return!0;let n=e.split(` `).map(e=>xa(e)).join(` `);if(!n.trim())return!0;let r=n.split(/\s+/).map(e=>ha(e)).filter(Boolean);if(r.length===0)continue;let i=!0;for(let e of r){let t=aa(e);if(!t){i=!1;break}let[,n,,r,a,o,s]=t;if(!ba({operator:n,version:oa(r,a,o,s),major:r,minor:a,patch:o,preRelease:s==null?void 0:s.split(`.`)},c)){i=!1;break}}if(i)return!0}catch(e){console.error(`[semver] Error processing range part "${t}":`,e);continue}}return!1}var wa=`default`,Ta=`global`;function Ea(e,t,n,r){var i,a;let o;return o=`get`in e?e.get:`lib`in e?()=>Promise.resolve(e.lib):()=>Promise.resolve(()=>{Xr(`Cannot get shared "${n}" from "${t}": neither "get" nor "lib" is provided in the share config.`)}),(i=e.shareConfig)!=null&&i.eager&&(a=e.treeShaking)!=null&&a.mode&&Xr(`Invalid shared config for "${n}" from "${t}": cannot use both "eager: true" and "treeShaking.mode" simultaneously. Choose one strategy.`),{deps:[],useIn:[],from:t,loading:null,...e,shareConfig:{requiredVersion:`^${e.version}`,singleton:!1,eager:!1,strictVersion:!1,...e.shareConfig},get:o,loaded:e!=null&&e.loaded||`lib`in e?!0:void 0,version:e.version??`0`,scope:Array.isArray(e.scope)?e.scope:[e.scope??`default`],strategy:(e.strategy??r)||`version-first`,treeShaking:e.treeShaking?{...e.treeShaking,mode:e.treeShaking.mode??`server-calc`,status:e.treeShaking.status??vr.UNKNOWN,useIn:[]}:void 0}}function Da(e,t){let n=t.shared||{},r=t.name,i=Object.keys(n).reduce((e,i)=>{let a=ai(n[i]);return e[i]=e[i]||[],a.forEach(n=>{e[i].push(Ea(n,r,i,t.shareStrategy))}),e},{}),a={...e.shared};return Object.keys(i).forEach(e=>{a[e]?i[e].forEach(t=>{a[e].find(e=>e.version===t.version)||a[e].push(t)}):a[e]=i[e]}),{allShareInfos:a,newShareInfos:i}}function Oa(e,t){if(!e)return!1;let{status:n,mode:r}=e;return n===vr.NO_USE?!1:n===vr.CALCULATED?!0:r===`runtime-infer`?!t||Na(e,t):!1}function ka(e,t){let n=e=>{if(!Number.isNaN(Number(e))){let t=e.split(`.`),n=e;for(let e=0;e<3-t.length;e++)n+=`.0`;return n}return e};return!!Ca(n(e),`<=${n(t)}`)}var Aa=(e,t)=>{let n=t||function(e,t){return ka(e,t)};return Object.keys(e).reduce((e,t)=>!e||n(e,t)||e===`0`?t:e,0)},ja=e=>!!e.loaded||typeof e.lib==`function`,Ma=e=>!!e.loading,Na=(e,t)=>{if(!e||!t)return!1;let{usedExports:n}=e;return n?!!t.every(e=>n.includes(e)):!1};function Pa(e,t,n,r){let i=e[t][n],a=``,o=Oa(r),s=function(e,t){return o?i[e].treeShaking?i[t].treeShaking?!ja(i[e].treeShaking)&&ka(e,t):!1:!0:!ja(i[e])&&ka(e,t)};if(o){if(a=Aa(e[t][n],s),a)return{version:a,useTreesShaking:o};o=!1}return{version:Aa(e[t][n],s),useTreesShaking:o}}var Fa=e=>ja(e)||Ma(e);function Ia(e,t,n,r){let i=e[t][n],a=``,o=Oa(r),s=function(e,t){if(o){if(!i[e].treeShaking)return!0;if(!i[t].treeShaking)return!1;if(Fa(i[t].treeShaking))return!Fa(i[e].treeShaking)||!!ka(e,t);if(Fa(i[e].treeShaking))return!1}return Fa(i[t])?!Fa(i[e])||!!ka(e,t):!Fa(i[e])&&ka(e,t)};if(o){if(a=Aa(e[t][n],s),a)return{version:a,useTreesShaking:o};o=!1}return{version:Aa(e[t][n],s),useTreesShaking:o}}function La(e){return e===`loaded-first`?Ia:Pa}function Ra(e,t,n,r){if(!e)return;let{shareConfig:i,scope:a=wa,strategy:o,treeShaking:s}=n,c=Array.isArray(a)?a:[a];for(let a of c)if(i&&e[a]&&e[a][t]){let{requiredVersion:c}=i,{version:l,useTreesShaking:u}=La(o)(e,a,t,s),d={shareScopeMap:e,scope:a,pkgName:t,version:l,GlobalFederation:ui.__FEDERATION__,shareInfo:n,resolver:()=>{let r=e[a][t][l];if(i.singleton){if(typeof c==`string`&&!Ca(l,c)){let e=`Version ${l} from ${l&&r.from} of shared singleton module ${t} does not satisfy the requirement of ${n.from} which needs ${c})`;i.strictVersion?Xr(e):Zr(e)}return{shared:r,useTreesShaking:u}}{if(c===!1||c===`*`||Ca(l,c))return{shared:r,useTreesShaking:u};let n=Oa(s);if(n){for(let[r,i]of Object.entries(e[a][t]))if(Oa(i.treeShaking,s==null?void 0:s.usedExports)&&Ca(r,c))return{shared:i,useTreesShaking:n}}for(let[n,r]of Object.entries(e[a][t]))if(Ca(n,c))return{shared:r,useTreesShaking:!1}}}};return(r.emit(d)||d).resolver()}}function za(){return ui.__FEDERATION__.__SHARE__}function Ba(e){let{pkgName:t,extraOptions:n,shareInfos:r}=e,i=(n==null?void 0:n.resolver)??(e=>{if(!e)return;let t={};return e.forEach(e=>{t[e.version]=e}),t[Aa(t,function(e,n){return!ja(t[e])&&ka(e,n)})]}),a=e=>typeof e==`object`&&!!e&&!Array.isArray(e),o=(...e)=>{let t={};for(let n of e)if(n)for(let[e,r]of Object.entries(n)){let n=t[e];a(n)&&a(r)?t[e]=o(n,r):r!==void 0&&(t[e]=r)}return t};return o(i(r[t]),n==null?void 0:n.customShareInfo)}var Va=(e,t)=>{e.useIn||=[],Qr(e.useIn,t)};function Ha(e,t){return t&&e.treeShaking?e.treeShaking:e}function Ua(e,t){return!t||t===`.`?e:`${e}/${t.replace(/^\.\//,``)}`}function Wa(e,t){for(let n of e){let e=t.startsWith(n.name),r=t.replace(n.name,``);if(e){if(r.startsWith(`/`)){let e=n.name;return r=`.${r}`,{pkgNameOrAlias:e,expose:r,remote:n}}if(r===``)return{pkgNameOrAlias:n.name,expose:`.`,remote:n}}let i=n.alias&&t.startsWith(n.alias),a=n.alias&&t.replace(n.alias,``);if(n.alias&&i){if(a&&a.startsWith(`/`)){let e=n.alias;return a=`.${a}`,{pkgNameOrAlias:e,expose:a,remote:n}}if(a===``)return{pkgNameOrAlias:n.alias,expose:`.`,remote:n}}}}function Ga(e,t){for(let n of e)if(t===n.name||n.alias&&t===n.alias)return n}var Ka=`RUNTIME-001`,qa=`RUNTIME-002`,Ja=`RUNTIME-003`,Ya=`RUNTIME-004`,Xa=`RUNTIME-005`,Za=`RUNTIME-006`,Qa=`RUNTIME-007`,$a=`RUNTIME-008`,eo=`RUNTIME-009`,to=`RUNTIME-010`,no=`RUNTIME-011`,ro=`RUNTIME-012`,io=`RUNTIME-013`,ao=`RUNTIME-014`,oo=`RUNTIME-015`,so=`TYPE-001`,co=`BUILD-001`,lo=`BUILD-002`,uo={[Ka]:`Failed to get remoteEntry exports.`,[qa]:`The remote entry interface does not contain "init"`,[Ja]:`Failed to get manifest.`,[Ya]:`Failed to locate remote.`,[Xa]:`Invalid loadShareSync function call from bundler runtime`,[Za]:`Invalid loadShareSync function call from runtime`,[Qa]:`Failed to get remote snapshot.`,[$a]:`Failed to load script resources.`,[eo]:`Please call createInstance first.`,[to]:`The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use "createInstance" api.`,[no]:`The remoteEntry URL is missing from the remote snapshot.`,[ro]:`The getter for the shared module is not a function. This may be caused by setting "shared.import: false" without the host providing the corresponding lib.`,[io]:`The manifest is not a valid Module Federation manifest.`,[ao]:`The remote does not expose the requested module.`,[oo]:`Remote container initialization failed.`},fo={[so]:`Failed to generate type declaration. Execute the below cmd to reproduce and fix the error.`},po={[co]:`Failed to find expose module.`,[lo]:`PublicPath is required in prod mode.`};({...uo,...fo,...po});var mo=`.then(callbacks[0]).catch(callbacks[1])`;function ho(e){return e===`esm`||e===`module`}async function go({entry:e,remoteEntryExports:t}){return new Promise((n,r)=>{try{t?n(t):typeof FEDERATION_ALLOW_NEW_FUNCTION<`u`?Function(`callbacks`,`import("${e}")${mo}`)([n,r]):i(()=>import(e).then(n),[],import.meta.url).catch(r)}catch(t){Xr(`Failed to load ESM entry from "${e}". ${t instanceof Error?t.message:String(t)}`)}})}async function _o({entry:e,remoteEntryExports:t}){return new Promise((n,r)=>{try{t?n(t):typeof __system_context__>`u`?System.import(e).then(n).catch(r):Function(`callbacks`,`System.import("${e}")${mo}`)([n,r])}catch(t){Xr(`Failed to load SystemJS entry from "${e}". ${t instanceof Error?t.message:String(t)}`)}})}function vo(e,t,n){let{remoteEntryKey:r,entryExports:i}=Ti(e,t);return i||Xr(Ka,uo,{remoteName:e,remoteEntryUrl:n,remoteEntryKey:r}),i}async function yo({name:e,globalName:t,entry:n,remoteInfo:r,loaderHook:i,getEntryUrl:a,resourceContext:o}){let{entryExports:s}=Ti(e,t);if(s)return s;let c=a?a(n):n;return Ur(c,{attrs:{},createScriptHook:(e,t)=>{let n=i.lifecycle.createScript.emit({url:e,attrs:t,remoteInfo:r,resourceContext:o?{...o,url:e}:void 0});if(n&&(n instanceof HTMLScriptElement||`script`in n||`timeout`in n))return n}}).then(()=>vo(e,t,n),t=>{let n=t instanceof Error?t.message:String(t);Xr($a,uo,{remoteName:e,resourceUrl:c},n)})}async function bo({remoteInfo:e,remoteEntryExports:t,loaderHook:n,getEntryUrl:r,resourceContext:i}){let{entry:a,entryGlobalName:o,name:s,type:c}=e;return ho(c)?go({entry:a,remoteEntryExports:t}):c===`system`?_o({entry:a,remoteEntryExports:t}):yo({entry:a,globalName:o,name:s,remoteInfo:e,loaderHook:n,getEntryUrl:r,resourceContext:i})}function xo(e){let{entry:t,name:n}=e;return wr(n,t)}async function So(e){let{origin:t,remoteEntryExports:n,remoteInfo:r,getEntryUrl:i,resourceContext:a,_inErrorHandling:o=!1}=e,s=xo(r);if(n)return n;if(!pi[s]){let e=t.remoteHandler.hooks.lifecycle.loadEntry,c=t.loaderHook;pi[s]=e.emit({origin:t,loaderHook:c,remoteInfo:r,remoteEntryExports:n}).then(e=>e||bo({remoteInfo:r,remoteEntryExports:n,loaderHook:c,getEntryUrl:i,resourceContext:a})).then(async e=>(await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,remoteEntryExports:e}),e)).catch(async e=>{let i=xo(r),a=e instanceof Error&&e.message.includes(`ScriptExecutionError`);if(e instanceof Error&&e.message.includes(`RUNTIME-008`)&&!a&&!o){let e=await t.loaderHook.lifecycle.loadEntryError.emit({getRemoteEntry:e=>So({...e,_inErrorHandling:!0}),origin:t,remoteInfo:r,remoteEntryExports:n,globalLoading:pi,uniqueKey:i});if(e)return await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,remoteEntryExports:e,recovered:!0}),e}throw await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,error:e}),e})}return pi[s]}function Co(e){return{...e,entry:`entry`in e?e.entry:``,type:e.type||`global`,entryGlobalName:e.entryGlobalName||e.name,shareScope:e.shareScope||`default`}}function wo(){return typeof FEDERATION_BUILD_IDENTIFIER<`u`?FEDERATION_BUILD_IDENTIFIER:``}function To(e,t){let n=Di(),r=[t.hooks,t.remoteHandler.hooks,t.sharedHandler.hooks,t.snapshotHandler.hooks,t.loaderHook,t.bridgeHook];return n.length>0&&n.forEach(t=>{e!=null&&e.find(e=>e.name!==t.name)&&e.push(t)}),e&&e.length>0&&e.forEach(e=>{r.forEach(n=>{n.applyPlugin(e,t)})}),e}function Eo(e){return{name:e.name,alias:e.alias,entry:`entry`in e?e.entry:void 0,version:`version`in e?e.version:void 0,type:e.type,entryGlobalName:e.entryGlobalName,shareScope:e.shareScope}}function Do(e){var t,n;let r={};for(let[t,n]of Object.entries(e.shared)){var i,a,o,s;let e=n[0];e&&(r[t]={version:e.version,singleton:(i=e.shareConfig)==null?void 0:i.singleton,requiredVersion:((a=e.shareConfig)==null?void 0:a.requiredVersion)===!1?!1:(o=e.shareConfig)==null?void 0:o.requiredVersion,eager:e.eager,strictVersion:(s=e.shareConfig)==null?void 0:s.strictVersion})}return{project:{name:e.name,mfRole:((t=e.remotes)==null?void 0:t.length)>0?`host`:`unknown`},mfConfig:{name:e.name,remotes:((n=e.remotes)==null?void 0:n.map(Eo))??[],shared:r}}}function Oo(e){return{resourceCategory:`sync`,share:!0,depsRemote:!0,...e}}function ko(e,t){return t.map(t=>{let n=Ga(e,t.nameOrAlias);return Yr(n,`Unable to preload ${t.nameOrAlias} as it is not included in ${!n&&Dr({remoteInfo:n,remotes:e})}`),{remote:n,preloadConfig:Oo(t)}})}function Ao(e){return e?e.map(e=>e===`.`?e:e.startsWith(`./`)?e.replace(`./`,``):e):[]}function jo(e){return e instanceof Error?e.message.includes(`timed out`)||e.name.includes(`Timeout`):!1}function Mo(e,t,n,r){return{url:t,status:n,resourceType:e.resourceType,initiator:e.initiator,id:e.id,error:r}}async function No(e,t,n,r){let i=e.moduleCache.get(n.name),a=n.entry;if(i!=null&&i.remoteEntryExports)return Mo(r,a,`cached`);try{if(!await So({origin:e,remoteInfo:n,remoteEntryExports:i==null?void 0:i.remoteEntryExports,resourceContext:{...r,url:a}}))throw Error(`Failed to load remoteEntry "${a}".`);return Mo(r,a,`success`)}catch(e){return Mo(r,a,jo(e)?`timeout`:`error`,e)}}function Po({host:e,remoteInfo:t,url:n,attrs:r,context:i,needDeleteLink:a}){return new Promise(o=>{let{link:s,needAttach:c}=Hr({url:n,cb:()=>{o(Mo(i,n,c?`success`:`cached`))},onErrorCallback:e=>{o(Mo(i,n,jo(e)?`timeout`:`error`,e))},attrs:r,createLinkHook:(n,r)=>{let a=e.loaderHook.lifecycle.createLink.emit({url:n,attrs:r,remoteInfo:t,resourceContext:{...i,url:n}});return a instanceof HTMLLinkElement,a},needDeleteLink:a});c&&document.head.appendChild(s)})}function Fo({host:e,remoteInfo:t,url:n,attrs:r,context:i}){return new Promise(a=>{let{script:o,needAttach:s}=Vr({url:n,cb:()=>{a(Mo(i,n,s?`success`:`cached`))},onErrorCallback:e=>{a(Mo(i,n,jo(e)?`timeout`:`error`,e))},attrs:r,createScriptHook:(n,r)=>{let a=e.loaderHook.lifecycle.createScript.emit({url:n,attrs:r,remoteInfo:t,resourceContext:{...i,url:n}});return a instanceof HTMLScriptElement,a},needDeleteScript:!0});s&&document.head.appendChild(o)})}function Io(e,t){return{...e,resourceType:t}}function Lo(e,t,n,r=!0,i={initiator:`preloadRemote`,id:e.name}){let{cssAssets:a,jsAssetsWithoutEntry:o,entryAssets:s}=n,c=[];if(t.options.inBrowser){if(s.forEach(n=>{let{moduleInfo:r}=n;c.push(No(t,e,r,Io(i,`remoteEntry`)))}),r){let n={rel:`preload`,as:`style`};a.forEach(r=>{c.push(Po({host:t,remoteInfo:e,url:r,attrs:n,context:Io(i,`css`)}))})}else{let n={rel:`stylesheet`,type:`text/css`};a.forEach(r=>{c.push(Po({host:t,remoteInfo:e,url:r,attrs:n,needDeleteLink:!1,context:Io(i,`css`)}))})}let n=Fo,l={fetchpriority:`high`,type:`text/javascript`};r?(n=Po,l={rel:`preload`,as:`script`}):ho(e.type)&&(n=Po,l={rel:`modulepreload`,fetchpriority:`high`}),o.forEach(r=>{c.push(n({host:t,remoteInfo:e,url:r,attrs:l,context:Io(i,`js`)}))})}return Promise.all(c)}var Ro={global:{Global:ui,nativeGlobal:li,resetFederationGlobalInfo:hi,setGlobalFederationInstance:gi,getGlobalFederationConstructor:_i,setGlobalFederationConstructor:vi,getInfoWithoutType:yi,getGlobalSnapshot:bi,getTargetSnapshotInfoByModuleInfo:xi,getGlobalSnapshotInfoByModuleInfo:Si,setGlobalSnapshotInfoByModuleInfo:Ci,addGlobalSnapshot:wi,getRemoteEntryExports:Ti,registerGlobalPlugins:Ei,getGlobalHostPlugins:Di,getPreloaded:Oi,setPreloaded:ki},share:{getRegisteredShare:Ra,getGlobalShareScope:za},utils:{matchRemoteWithNameAndExpose:Wa,preloadAssets:Lo,getRemoteInfo:Co}};function zo(e){if(!e||!(`modules`in e)||!Array.isArray(e.modules))return;let t=e.modules.map(e=>e.moduleName).filter(Boolean);return t.length?t.join(`,`):void 0}function Bo(e,t,n){let r=t,i=Array.isArray(e.shareScope)?e.shareScope:[e.shareScope];i.length||i.push(`default`),i.forEach(e=>{r[e]||(r[e]={})});let a={version:e.version||``,shareScopeKeys:Array.isArray(e.shareScope)?i:e.shareScope||`default`};return Object.defineProperty(a,"shareScopeMap",{value:r,enumerable:!1}),{remoteEntryInitOptions:a,shareScope:r[i[0]],initScope:n??[]}}var Vo=class{constructor({remoteInfo:e,host:t}){this.inited=!1,this.initing=!1,this.lib=void 0,this.remoteInfo=e,this.host=t}async getEntry(e){if(this.remoteEntryExports)return this.remoteEntryExports;let t=await So({origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports,resourceContext:{initiator:`loadRemote`,id:Ua(this.remoteInfo.name,e),resourceType:`remoteEntry`}});return Yr(t,`remoteEntryExports is undefined \n ${Dr(this.remoteInfo)}`),this.remoteEntryExports=t,this.remoteEntryExports}async init(e,t,n,r){let i=await this.getEntry(r);if(this.inited)return await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:i,cached:!0,origin:this.host}),i;if(this.initPromise){try{await this.initPromise,await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:i,cached:!0,origin:this.host})}catch(n){throw await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:i,error:n,cached:!0,origin:this.host}),n}return i}this.initing=!0,this.initPromise=(async()=>{await this.host.loaderHook.lifecycle.beforeInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,origin:this.host});let{remoteEntryInitOptions:r,shareScope:a,initScope:o}=Bo(this.remoteInfo,this.host.shareScopeMap,n),s=await this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:a,remoteEntryInitOptions:r,initScope:o,remoteInfo:this.remoteInfo,origin:this.host});(i==null?void 0:i.init)===void 0&&Xr(qa,uo,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName},void 0,Do(this.host.options));try{await i.init(s.shareScope,s.initScope,s.remoteEntryInitOptions)}catch(e){Xr(oo,uo,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName,shareScope:this.remoteInfo.shareScope},`${e}`,Do(this.host.options))}await this.host.hooks.lifecycle.initContainer.emit({...s,id:e,remoteSnapshot:t,remoteEntryExports:i}),this.inited=!0})();try{await this.initPromise,await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:i,origin:this.host})}catch(n){throw await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:i,error:n,origin:this.host}),n}finally{this.initing=!1,this.initPromise=void 0}return i}async get(e,t,n,r){let{loadFactory:i=!0}=n||{loadFactory:!0},a=await this.init(e,r,void 0,t);this.lib=a,await this.host.loaderHook.lifecycle.beforeGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:a,origin:this.host});let o;try{let n=await this.host.loaderHook.lifecycle.getModuleFactory.emit({remoteEntryExports:a,expose:t,moduleInfo:this.remoteInfo});o=typeof n==`function`?n:void 0,o||=await a.get(t),o||Xr(ao,uo,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,expose:t,requestId:e,availableExposes:zo(r)},void 0,Do(this.host.options)),await this.host.loaderHook.lifecycle.afterGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:a,moduleFactory:o,origin:this.host})}catch(n){throw await this.host.loaderHook.lifecycle.afterGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:a,error:n,origin:this.host}),n}let s=si(this.remoteInfo.name,t),c=this.wraperFactory(o,s);if(!i)return c;await this.host.loaderHook.lifecycle.beforeExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:i,origin:this.host});try{let n=await c();return await this.host.loaderHook.lifecycle.afterExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:i,exposeModule:n,origin:this.host}),n}catch(n){throw await this.host.loaderHook.lifecycle.afterExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:i,error:n,origin:this.host}),n}}wraperFactory(e,t){function n(e,t){e&&typeof e==`object`&&Object.isExtensible(e)&&!Object.getOwnPropertyDescriptor(e,Symbol.for(`mf_module_id`))&&Object.defineProperty(e,Symbol.for(`mf_module_id`),{value:t,enumerable:!1})}return()=>{let r=e();return r instanceof Promise?r.then(e=>(n(e,t),e)):(n(r,t),r)}}},Ho=class{constructor(e){this.registerPlugins={},this.lifecycle=e,this.lifecycleKeys=Object.keys(e)}applyPlugin(e,t){Yr(ii(e),`Plugin configuration is invalid.`);let n=e.name;if(Yr(n,`A name must be provided by the plugin.`),!this.registerPlugins[n]){var r;this.registerPlugins[n]=e,(r=e.apply)==null||r.call(e,t),Object.keys(this.lifecycle).forEach(t=>{let n=e[t];n&&this.lifecycle[t].on(n)})}}removePlugin(e){Yr(e,`A name is required.`);let t=this.registerPlugins[e];Yr(t,`The plugin "${e}" is not registered.`),Object.keys(t).forEach(e=>{e!==`name`&&this.lifecycle[e].remove(t[e])})}},Uo=class{constructor(e){this.type=``,this.listeners=new Set,e&&(this.type=e)}on(e){typeof e==`function`&&this.listeners.add(e)}once(e){let t=this;this.on(function n(...r){return t.remove(n),e.apply(null,r)})}emit(...e){let t;return this.listeners.size>0&&this.listeners.forEach(n=>{let r=n(...e);r!==void 0&&(t=r)}),t}remove(e){this.listeners.delete(e)}removeAll(){this.listeners.clear()}},Wo=class extends Uo{emit(...e){let t,n=Array.from(this.listeners);if(n.length>0){let r=0,i=t=>t===!1?!1:r<n.length?Promise.resolve(n[r++].apply(null,e)).then(n=>n===void 0||e.length===1&&n===e[0]?i(t):i(n)):t;t=i()}return Promise.resolve(t)}};function Go(e,t){if(!ni(t))return!1;if(e!==t){for(let n in e)if(!(n in t))return!1}return!0}var Ko=class extends Uo{constructor(e){super(),this.onerror=Xr,this.type=e}emit(e){ni(e)||Xr(`The data for the "${this.type}" hook should be an object.`);for(let t of this.listeners)try{let n=t(e);if(n===void 0)continue;if(Go(e,n))e=n;else{this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);break}}catch(e){Zr(e),this.onerror(e)}return e}},qo=class extends Uo{constructor(e){super(),this.onerror=Xr,this.type=e}emit(e){ni(e)||Xr(`The response data for the "${this.type}" hook must be an object.`);let t=Array.from(this.listeners);if(t.length>0){let n=0,r=t=>(Zr(t),this.onerror(t),e),i=a=>{if(a!==void 0&&Go(e,a))e=a;else if(a!==void 0)return this.onerror(`A plugin returned an incorrect value for the "${this.type}" type.`),e;if(n<t.length)try{return Promise.resolve(t[n++](e)).then(i,r)}catch(e){return r(e)}return e};return Promise.resolve(i(e))}return Promise.resolve(e)}},Jo=`Remote loading is disabled by experiments.optimization.disableRemote.`,Yo=class{constructor(){this.hooks=new Ho({})}formatAndRegisterRemote(){return[]}loadRemote(){throw Error(Jo)}preloadRemote(){throw Error(Jo)}registerRemotes(){throw Error(Jo)}getRemoteModuleAndOptions(){throw Error(Jo)}initRawContainer(){throw Error(Jo)}};function Xo(e,t){let n=oi(t);n.url||Xr(no,uo,{remoteName:e.name});let r=Tr(t,n.url);e.type=n.type,e.entryGlobalName=n.globalName,e.entry=r,e.version=t.version,e.buildVersion=t.buildVersion}function Zo(){return{name:`snapshot-plugin`,async afterResolve(e){let{remote:t,pkgNameOrAlias:n,expose:r,origin:i,remoteInfo:a,id:o}=e;if(!ei(t)||!ti(t)){let{remoteSnapshot:s,globalSnapshot:c}=await i.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:t,id:Ua(t.name,r)});Xo(a,s);let l={remote:t,preloadConfig:{nameOrAlias:n,exposes:[r],resourceCategory:`sync`,share:!1,depsRemote:!1}},u=await i.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:i,preloadOptions:l,remoteInfo:a,remote:t,remoteSnapshot:s,globalSnapshot:c});return u&&Lo(a,i,u,!1,{initiator:`loadRemote`,id:o}).catch(()=>void 0),{...e,remoteSnapshot:s}}return e}}}function Qo(e){let t=e.split(`:`);return t.length===1?{name:t[0],version:void 0}:t.length===2?{name:t[0],version:t[1]}:{name:t[1],version:t[2]}}function $o(e,t,n,r,i={},a){let{value:o}=yi(e,$r(t)),s=a||o;if(s&&!jr(s)&&(n(s,t,r),s.remotesInfo)){let t=Object.keys(s.remotesInfo);for(let r of t){if(i[r])continue;i[r]=!0;let t=Qo(r),a=s.remotesInfo[r];$o(e,{name:t.name,version:a.matchedVersion},n,!1,i,void 0)}}}var es=(e,t)=>document.querySelector(`${e}[${e===`link`?`href`:`src`}="${t}"]`);function ts(e,t,n,r,i){let a=[],o=[],s=[],c=new Set,l=new Set,{options:u}=e,{preloadConfig:d}=t,{depsRemote:f}=d;if($o(r,n,(t,n,r)=>{var i;let c;if(r)c=d;else if(Array.isArray(f)){let e=f.find(e=>e.nameOrAlias===n.name||e.nameOrAlias===n.alias);if(!e)return;c=Oo(e)}else if(f===!0)c=d;else return;let l=Tr(t,oi(t).url);l&&s.push({name:n.name,moduleInfo:{name:n.name,entry:l,type:`remoteEntryType`in t?t.remoteEntryType:`global`,entryGlobalName:`globalName`in t?t.globalName:n.name,shareScope:``,version:`version`in t?t.version:void 0},url:l});let u=`modules`in t?t.modules:[],p=Ao(c.exposes);p.length&&`modules`in t&&(u=t==null||(i=t.modules)==null?void 0:i.reduce((e,t)=>((p==null?void 0:p.indexOf(t.moduleName))!==-1&&e.push(t),e),[]));function m(e){let n=e.map(e=>Tr(t,e));return c.filter?n.filter(c.filter):n}if(u){let r=u.length;for(let i=0;i<r;i++){let r=u[i],s=`${n.name}/${r.moduleName}`;e.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({id:r.moduleName===`.`?n.name:s,name:n.name,remoteSnapshot:t,preloadConfig:c,remote:n,origin:e}),!Oi(s)&&(c.resourceCategory===`all`?(a.push(...m(r.assets.css.async)),a.push(...m(r.assets.css.sync)),o.push(...m(r.assets.js.async)),o.push(...m(r.assets.js.sync))):c.resourceCategory===`sync`&&(a.push(...m(r.assets.css.sync)),o.push(...m(r.assets.js.sync))),ki(s))}}},!0,{},i),i.shared&&i.shared.length>0){let t=(t,n)=>{let{shared:r}=Ra(e.shareScopeMap,n.sharedName,t,e.sharedHandler.hooks.lifecycle.resolveShare)||{};r&&typeof r.lib==`function`&&(n.assets.js.sync.forEach(e=>{c.add(e)}),n.assets.css.sync.forEach(e=>{l.add(e)}))};i.shared.forEach(e=>{var n;let r=(n=u.shared)==null?void 0:n[e.sharedName];if(!r)return;let i=e.version?r.find(t=>t.version===e.version):r;i&&ai(i).forEach(n=>{t(n,e)})})}let p=o.filter(e=>!c.has(e)&&!es(`script`,e));return{cssAssets:a.filter(e=>!l.has(e)&&!es(`link`,e)),jsAssetsWithoutEntry:p,entryAssets:s.filter(e=>!es(`script`,e.url))}}var ns=function(){return{name:`generate-preload-assets-plugin`,async generatePreloadAssets(e){let{origin:t,preloadOptions:n,remoteInfo:r,remote:i,globalSnapshot:a,remoteSnapshot:o}=e;return ei(i)&&ti(i)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:i.name,url:i.entry,moduleInfo:{name:r.name,entry:i.entry,type:r.type||`global`,entryGlobalName:``,shareScope:``}}]}:(Xo(r,o),ts(t,n,r,a,o))}}};function rs(e,t){let n=Si({name:t.name,version:t.options.version}),r=n&&`remotesInfo`in n&&n.remotesInfo&&yi(n.remotesInfo,e.name).value;return r&&r.matchedVersion?{hostGlobalSnapshot:n,globalSnapshot:bi(),remoteSnapshot:Si({name:e.name,version:r.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:bi(),remoteSnapshot:Si({name:e.name,version:`version`in e?e.version:void 0})}}var is=class{constructor(e){this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new Ho({beforeLoadRemoteSnapshot:new Wo(`beforeLoadRemoteSnapshot`),loadSnapshot:new qo(`loadGlobalSnapshot`),loadRemoteSnapshot:new qo(`loadRemoteSnapshot`),afterLoadSnapshot:new qo(`afterLoadSnapshot`)}),this.manifestLoading=ui.__FEDERATION__.__MANIFEST_LOADING__,this.HostInstance=e,this.loaderHook=e.loaderHook}async loadRemoteSnapshotInfo({moduleInfo:e,id:t,initiator:n=`loadRemote`}){let{options:r}=this.HostInstance;await this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({options:r,moduleInfo:e,origin:this.HostInstance});let i=Si({name:this.HostInstance.options.name,version:this.HostInstance.options.version});i||(i={version:this.HostInstance.options.version||``,remoteEntry:``,remotesInfo:{}},wi({[this.HostInstance.options.name]:i})),i&&`remotesInfo`in i&&!yi(i.remotesInfo,e.name).value&&(`version`in e||`entry`in e)&&(i.remotesInfo={...i==null?void 0:i.remotesInfo,[e.name]:{matchedVersion:`version`in e?e.version:e.entry}});let{hostGlobalSnapshot:a,remoteSnapshot:o,globalSnapshot:s}=this.getGlobalRemoteInfo(e),{remoteSnapshot:c,globalSnapshot:l}=await this.hooks.lifecycle.loadSnapshot.emit({options:r,moduleInfo:e,hostGlobalSnapshot:a,remoteSnapshot:o,globalSnapshot:s}),u,d;if(c)if(jr(c)){let r=c.remoteEntry,i=await this.loadManifestSnapshot(r,e,{},{initiator:n,id:t||e.name}),a=Ci({...e,entry:r},i);u=i,d=a}else{let{remoteSnapshot:t}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:c,from:`global`});u=t,d=l}else if(ei(e)){let r=await this.loadManifestSnapshot(e.entry,e,{},{initiator:n,id:t||e.name}),i=Ci(e,r);u=r,d=i}else Xr(Qa,uo,{remoteName:e.name,remoteVersion:e.version,hostName:this.HostInstance.options.name,globalSnapshot:JSON.stringify(l)},void 0,Do(this.HostInstance.options));return await this.hooks.lifecycle.afterLoadSnapshot.emit({id:t,host:this.HostInstance,options:r,moduleInfo:e,remoteSnapshot:u}),{remoteSnapshot:u,globalSnapshot:d}}getGlobalRemoteInfo(e){return rs(e,this.HostInstance)}async getManifestJson(e,t,n,r){return(async()=>{let n=Co(t),i=this.manifestCache.get(e);if(i)return i;try{let t=await this.loaderHook.lifecycle.fetch.emit(e,{},n,r?{...r,url:e,resourceType:`manifest`}:void 0);(!t||!(t instanceof Response))&&(t=await fetch(e,{})),i=await t.json()}catch(r){i=await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:r,from:`runtime`,lifecycle:`afterResolve`,remote:n,origin:this.HostInstance}),i||(delete this.manifestLoading[e],Xr(Ja,uo,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name},`${r}`,Do(this.HostInstance.options)))}let a=[!i.metaData&&`metaData`,!i.exposes&&`exposes`,!i.shared&&`shared`].filter(Boolean);return a.length>0&&await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:Error(`"${e}" is not a valid federation manifest for remote "${t.name}". Missing required fields: ${a.join(`, `)}.`),from:`runtime`,lifecycle:`afterResolve`,remote:n,origin:this.HostInstance}),a.length>0&&Xr(io,uo,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name,missingFields:a.join(`,`)},void 0,Do(this.HostInstance.options)),this.manifestCache.set(e,i),i})()}async loadManifestSnapshot(e,t,n,r){let i=async()=>{let i=await this.getManifestJson(e,t,n,r),a=Ar(i,{version:e}),{remoteSnapshot:o}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:t,manifestJson:i,remoteSnapshot:a,manifestUrl:e,from:`manifest`});return o};return this.manifestLoading[e]||(this.manifestLoading[e]=i().then(e=>e)),this.manifestLoading[e]}},as=class{constructor(){this.hooks=new Ho({})}},os=class{constructor(e){this.hooks=new Ho({beforeRegisterShare:new Ko(`beforeRegisterShare`),afterResolve:new qo(`afterResolve`),beforeLoadShare:new qo(`beforeLoadShare`),loadShare:new Wo,afterLoadShare:new Uo(`afterLoadShare`),errorLoadShare:new Uo(`errorLoadShare`),resolveShare:new Ko(`resolveShare`),initContainerShareScopeMap:new Ko(`initContainerShareScopeMap`)}),this.host=e,this.shareScopeMap={},this.initTokens={},this._setGlobalShareScopeMap(e.options)}emitAfterLoadShare({lifecycle:e,pkgName:t,shareInfo:n,selectedShared:r}){try{this.hooks.lifecycle.afterLoadShare.emit({pkgName:t,shareInfo:n,selectedShared:r,shared:this.host.options.shared,shareScopeMap:this.shareScopeMap,lifecycle:e,origin:this.host})}catch(e){Zr(e)}}emitErrorLoadShare({lifecycle:e,pkgName:t,shareInfo:n,error:r,recovered:i}){try{this.hooks.lifecycle.errorLoadShare.emit({pkgName:t,shareInfo:n,shared:this.host.options.shared,shareScopeMap:this.shareScopeMap,lifecycle:e,origin:this.host,error:r,recovered:i})}catch(e){Zr(e)}}registerShared(e,t){let{newShareInfos:n,allShareInfos:r}=Da(e,t);return Object.keys(n).forEach(e=>{n[e].forEach(n=>{n.scope.forEach(r=>{var i;this.hooks.lifecycle.beforeRegisterShare.emit({origin:this.host,pkgName:e,shared:n}),(i=this.shareScopeMap[r])!=null&&i[e]||this.setShared({pkgName:e,lib:n.lib,get:n.get,loaded:n.loaded||!!n.lib,shared:n,from:t.name})})})}),{newShareInfos:n,allShareInfos:r}}async loadShare(e,t){let{host:n}=this,r=Ba({pkgName:e,extraOptions:t,shareInfos:n.options.shared}),i=r;try{r!=null&&r.scope&&await Promise.all(r.scope.map(async e=>{await Promise.all(this.initializeSharing(e,{strategy:r.strategy}))})),i=(await this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:r,shared:n.options.shared,origin:n})).shareInfo,Yr(i,`Cannot find shared "${e}" in host "${n.options.name}". Ensure the shared config for "${e}" is declared in the federation plugin options and the host has been initialized before loading shares.`);let a=i,{shared:o,useTreesShaking:s}=Ra(this.shareScopeMap,e,i,this.hooks.lifecycle.resolveShare)||{};if(o){let t=Ha(o,s);if(t.lib)return Va(t,n.options.name),this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,selectedShared:o}),t.lib;if(t.loading&&!t.loaded){let r=await t.loading;return t.loaded=!0,t.lib||=r,Va(t,n.options.name),this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,selectedShared:o}),r}{let r=(async()=>{let e=await t.get();return Va(t,n.options.name),t.loaded=!0,t.lib=e,e})();this.setShared({pkgName:e,loaded:!1,shared:o,from:n.options.name,lib:null,loading:r,treeShaking:s?t:void 0});let i=await r;return this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,selectedShared:o}),i}}{if(t!=null&&t.customShareInfo)return this.emitErrorLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,recovered:!0}),!1;let r=Oa(a.treeShaking),i=Ha(a,r),o=(async()=>{let t=await i.get();i.lib=t,i.loaded=!0,Va(i,n.options.name);let{shared:r,useTreesShaking:o}=Ra(this.shareScopeMap,e,a,this.hooks.lifecycle.resolveShare)||{};if(r){let e=Ha(r,o);e.lib=t,e.loaded=!0,r.from=a.from}return t})();this.setShared({pkgName:e,loaded:!1,shared:a,from:n.options.name,lib:null,loading:o,treeShaking:r?i:void 0});let s=await o;return this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,selectedShared:a}),s}}catch(t){throw this.emitErrorLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:i,error:t}),t}}initializeSharing(e=wa,t){let{host:n}=this,r=t==null?void 0:t.from,i=t==null?void 0:t.strategy,a=t==null?void 0:t.initScope,o=[];if(r!==`build`){let{initTokens:t}=this;a||=[];let n=t[e];if(n||=t[e]={from:this.host.name},a.indexOf(n)>=0)return o;a.push(n)}let s=this.shareScopeMap,c=n.options.name;s[e]||(s[e]={});let l=s[e],u=(e,t)=>{var n;let{version:r,eager:i}=t;l[e]=l[e]||{};let a=l[e],o=a[r]&&Ha(a[r]),s=!!(o&&(`eager`in o&&o.eager||`shareConfig`in o&&(n=o.shareConfig)!=null&&n.eager));(!o||o.strategy!==`loaded-first`&&!o.loaded&&(!i==!s?c>a[r].from:i))&&(a[r]=t)},d=async e=>{let{module:t}=await n.remoteHandler.getRemoteModuleAndOptions({id:e}),r;try{r=await t.getEntry()}catch(i){if(r=await n.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:i,from:`runtime`,lifecycle:`beforeLoadShare`,remote:t.remoteInfo,origin:n}),!r)return}finally{r!=null&&r.init&&!t.initing&&(t.remoteEntryExports=r,await t.init(void 0,void 0,a))}};return Object.keys(n.options.shared).forEach(t=>{n.options.shared[t].forEach(n=>{n.scope.includes(e)&&u(t,n)})}),(n.options.shareStrategy===`version-first`||i===`version-first`)&&n.options.remotes.forEach(t=>{t.shareScope===e&&o.push(d(t.name))}),o}loadShareSync(e,t){let{host:n}=this,r=Ba({pkgName:e,extraOptions:t,shareInfos:n.options.shared});try{r!=null&&r.scope&&r.scope.forEach(e=>{this.initializeSharing(e,{strategy:r.strategy})});let{shared:i}=Ra(this.shareScopeMap,e,r,this.hooks.lifecycle.resolveShare)||{};if(i){if(typeof i.lib==`function`)return Va(i,n.options.name),i.loaded||(i.loaded=!0,i.from===n.options.name&&(r.loaded=!0)),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:r,selectedShared:i}),i.lib;if(typeof i.get==`function`){let t=i.get();if(!(t instanceof Promise))return Va(i,n.options.name),this.setShared({pkgName:e,loaded:!0,from:n.options.name,lib:t,shared:i}),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:r,selectedShared:i}),t}}if(r.lib)return r.loaded||=!0,this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:r,selectedShared:r}),r.lib;if(r.get){let i=r.get();return i instanceof Promise&&Xr((t==null?void 0:t.from)===`build`?Xa:Za,uo,{hostName:n.options.name,sharedPkgName:e},void 0,Do(n.options)),r.lib=i,this.setShared({pkgName:e,loaded:!0,from:n.options.name,lib:r.lib,shared:r}),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:r,selectedShared:r}),r.lib}Xr(Za,uo,{hostName:n.options.name,sharedPkgName:e},void 0,Do(n.options))}catch(t){throw this.emitErrorLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:r,error:t}),t}}initShareScopeMap(e,t,n={}){let{host:r}=this;this.shareScopeMap[e]=t,this.hooks.lifecycle.initContainerShareScopeMap.emit({shareScope:t,options:r.options,origin:r,scopeName:e,hostShareScopeMap:n.hostShareScopeMap})}setShared({pkgName:e,shared:t,from:n,lib:r,loading:i,loaded:a,get:o,treeShaking:s}){let{version:c,scope:l=`default`,...u}=t,d=Array.isArray(l)?l:[l],f=e=>{let t=(e,t,n)=>{n&&!e[t]&&(e[t]=n)},n=s?e.treeShaking:e;t(n,`loaded`,a),t(n,`loading`,i),t(n,`get`,o)};d.forEach(t=>{this.shareScopeMap[t]||(this.shareScopeMap[t]={}),this.shareScopeMap[t][e]||(this.shareScopeMap[t][e]={}),this.shareScopeMap[t][e][c]||(this.shareScopeMap[t][e][c]={version:c,scope:[t],...u,lib:r});let i=this.shareScopeMap[t][e][c];f(i),n&&i.from!==n&&(i.from=n)})}_setGlobalShareScopeMap(e){let t=za(),n=e.id||e.name;n&&!t[n]&&(t[n]=this.shareScopeMap)}},ss=class{constructor(){this.shareScopeMap={},this.hooks=new Ho({afterResolve:new qo(`afterResolve`)})}registerShared(){return{newShareInfos:{},allShareInfos:{}}}loadShare(){throw Error(`Shared dependency loading is disabled by experiments.optimization.disableShared.`)}loadShareSync(){throw Error(`Shared dependency loading is disabled by experiments.optimization.disableShared.`)}initializeSharing(){return[]}initShareScopeMap(e,t){this.shareScopeMap[e]=t}},cs=class{constructor(e){this.hooks=new Ho({beforeRegisterRemote:new Ko(`beforeRegisterRemote`),registerRemote:new Ko(`registerRemote`),beforeRequest:new qo(`beforeRequest`),afterMatchRemote:new Wo(`afterMatchRemote`),onLoad:new Wo(`onLoad`),afterLoadRemote:new Wo(`afterLoadRemote`),handlePreloadModule:new Uo(`handlePreloadModule`),errorLoadRemote:new Wo(`errorLoadRemote`),beforePreloadRemote:new Wo(`beforePreloadRemote`),generatePreloadAssets:new Wo(`generatePreloadAssets`),afterPreloadRemote:new Wo(`afterPreloadRemote`),loadEntry:new Wo}),this.host=e,this.idToRemoteMap={}}formatAndRegisterRemote(e,t){return(t.remotes||[]).reduce((e,t)=>(this.registerRemote(t,e,{force:!1}),e),e.remotes)}setIdToRemoteMap(e,t){let{remote:n,expose:r}=t,{name:i,alias:a}=n;if(this.idToRemoteMap[e]={name:n.name,expose:r},a&&e.startsWith(i)){let t=e.replace(i,a);this.idToRemoteMap[t]={name:n.name,expose:r};return}if(a&&e.startsWith(a)){let t=e.replace(a,i);this.idToRemoteMap[t]={name:n.name,expose:r}}}async loadRemote(e,t){let{host:n}=this,r=Wa(n.options.remotes,e),i=e,a=r==null?void 0:r.expose,o=r?Co(r.remote):void 0,s;try{let{loadFactory:r=!0}=t||{loadFactory:!0},{module:c,moduleOptions:l,remoteMatchInfo:u}=await this.getRemoteModuleAndOptions({id:e}),{pkgNameOrAlias:d,remote:f,expose:p,id:m,remoteSnapshot:h}=u;i=m,a=p,o=Co(f);let g=await c.get(m,p,t,h),_=await this.hooks.lifecycle.onLoad.emit({id:m,pkgNameOrAlias:d,expose:p,exposeModule:r?g:void 0,exposeModuleFactory:r?void 0:g,remote:f,options:l,moduleInstance:c,origin:n});return this.setIdToRemoteMap(e,u),s={id:i,expose:a,remote:o,options:t,origin:n},typeof _==`function`?_:g}catch(r){let{from:c=`runtime`}=t||{from:`runtime`},l;try{l=await this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:r,from:c,lifecycle:`onLoad`,expose:a,remote:o,origin:n})}catch(e){throw s={id:i,expose:a,remote:o,options:t,error:e,origin:n},e}if(!l)throw s={id:i,expose:a,remote:o,options:t,error:r,origin:n},r;return s={id:i,expose:a,remote:o,options:t,error:r,origin:n,recovered:!0},l}finally{s&&await this.hooks.lifecycle.afterLoadRemote.emit(s)}}async preloadRemote(e){let{host:t}=this,n=[];await this.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:e,options:t.options,origin:t});let r=ko(t.options.remotes,e),i=e=>{let{preloadConfig:t,remote:n}=e,r=t.exposes||[];return r.length?r.map(r=>({ops:{...e,preloadConfig:{...t,exposes:[r]}},id:Ua(n.name,r)})):[{ops:e,id:`${n.name}/*`}]},a;await Promise.all(r.flatMap(i).map(async e=>{let{ops:r,id:i}=e,{remote:a,preloadConfig:o}=r,s=Co(a);try{let{globalSnapshot:e,remoteSnapshot:c}=await t.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:a,id:i,initiator:`preloadRemote`}),l=await this.hooks.lifecycle.generatePreloadAssets.emit({origin:t,preloadOptions:r,remote:a,remoteInfo:s,globalSnapshot:e,remoteSnapshot:c});if(!l)return;let u=await Lo(s,t,l,!0,{initiator:`preloadRemote`,id:i});n.push({remote:a,remoteInfo:s,preloadConfig:o,id:i,results:u})}catch(e){n.push({remote:a,remoteInfo:s,preloadConfig:o,id:i,results:[{url:s.entry,status:`error`,resourceType:/\.json(?:$|[?#])/i.test(s.entry)?`manifest`:`remoteEntry`,initiator:`preloadRemote`,id:i,error:e}]})}}));let o=n.flatMap(e=>e.results.filter(e=>e.status===`error`||e.status===`timeout`));if(o.length>0&&(a=Error(`preloadRemote failed to load ${o.length} resource(s).`),Object.assign(a,{results:n,failedResults:o})),await this.hooks.lifecycle.afterPreloadRemote.emit({preloadOps:e,options:t.options,origin:t,results:n,error:a}),a)throw a}registerRemotes(e,t){let{host:n}=this;e.forEach(e=>{this.registerRemote(e,n.options.remotes,{force:t==null?void 0:t.force})})}initRawContainer(e,t,n){let{host:r}=this,i=new Vo({host:r,remoteInfo:Co({name:e,entry:t})});return i.remoteEntryExports=n,r.moduleCache.set(e,i),i}async getRemoteModuleAndOptions(e){let{host:t}=this,{id:n}=e,r;try{r=await this.hooks.lifecycle.beforeRequest.emit({id:n,options:t.options,origin:t})}catch(e){if(r=await this.hooks.lifecycle.errorLoadRemote.emit({id:n,options:t.options,origin:t,from:`runtime`,error:e,lifecycle:`beforeRequest`}),!r)throw e}let{id:i}=r,a=Wa(t.options.remotes,i);if(!a)try{Xr(Ya,uo,{hostName:t.options.name,requestId:i},void 0,Do(t.options))}catch(e){throw await this.hooks.lifecycle.afterMatchRemote.emit({id:i,options:t.options,error:e,origin:t}),e}let{remote:o}=a,s=Co(o);await this.hooks.lifecycle.afterMatchRemote.emit({id:i,...a,options:t.options,remoteInfo:s,origin:t});let c=await t.sharedHandler.hooks.lifecycle.afterResolve.emit({id:i,...a,options:t.options,origin:t,remoteInfo:s}),{remote:l,expose:u}=c;Yr(l&&u,`The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${i}.`);let d=t.moduleCache.get(l.name),f={host:t,remoteInfo:s};return d||(d=new Vo(f),t.moduleCache.set(l.name,d)),{module:d,moduleOptions:f,remoteMatchInfo:c}}registerRemote(e,t,n){let{host:r}=this,i=()=>{if(e.alias){let n=t.find(t=>{var n;return e.alias&&(t.name.startsWith(e.alias)||((n=t.alias)==null?void 0:n.startsWith(e.alias)))});Yr(!n,`The alias ${e.alias} of remote ${e.name} is not allowed to be the prefix of ${n&&n.name} name or alias`)}`entry`in e&&typeof window<`u`&&!e.entry.startsWith(`http`)&&(e.entry=new URL(e.entry,window.location.origin).href),e.shareScope||=wa,e.type||=Ta};this.hooks.lifecycle.beforeRegisterRemote.emit({remote:e,origin:r});let a=t.find(t=>t.name===e.name);if(!a)i(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:r});else{let o=[`The remote "${e.name}" is already registered.`,`Please note that overriding it may cause unexpected errors.`];n!=null&&n.force&&(this.removeRemote(a),i(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:r}),Er(o.join(` `)))}}removeRemote(e){try{let{host:n}=this,{name:r}=e,i=n.options.remotes.findIndex(e=>e.name===r);i!==-1&&n.options.remotes.splice(i,1);let a=yi(ci.__FEDERATION__.moduleInfo,$r(e)).key;delete ci.__FEDERATION__.moduleInfo[a],`entry`in e&&(n.snapshotHandler.manifestCache.delete(e.entry),delete ui.__FEDERATION__.__MANIFEST_LOADING__[e.entry]);let{hostGlobalSnapshot:o}=rs(e,n);if(o){let t=o&&`remotesInfo`in o&&o.remotesInfo&&yi(o.remotesInfo,e.name).key;t&&delete o.remotesInfo[t]}let s=n.moduleCache.get(e.name);if(s){var t;let r=s.remoteInfo,i=r.entryGlobalName;ci[i]&&((t=Object.getOwnPropertyDescriptor(ci,i))!=null&&t.configurable?delete ci[i]:ci[i]=void 0);let a=xo(s.remoteInfo);pi[a]&&delete pi[a];let o=r.buildVersion?wr(r.name,r.buildVersion):r.name,c=ci.__FEDERATION__.__INSTANCES__.findIndex(e=>r.buildVersion?e.options.id===o:e.name===o);if(c!==-1){let e=ci.__FEDERATION__.__INSTANCES__[c];o=e.options.id||o;let t=za(),n=!0,i=[];Object.keys(t).forEach(e=>{let a=t[e];a&&Object.keys(a).forEach(t=>{let o=a[t];o&&Object.keys(o).forEach(a=>{let s=o[a];s&&Object.keys(s).forEach(o=>{let c=s[o];c&&typeof c==`object`&&c.from===r.name&&(c.loaded||c.loading?(c.useIn=c.useIn.filter(e=>e!==r.name),c.useIn.length?n=!1:i.push([e,t,a,o])):i.push([e,t,a,o]))})})})}),n&&(e.shareScopeMap={},delete t[o]),i.forEach(([e,n,r,i])=>{var a;(a=t[e])==null||(a=a[n])==null||(a=a[r])==null||delete a[i]}),ci.__FEDERATION__.__INSTANCES__.splice(c,1)}n.moduleCache.delete(e.name)}}catch(e){Jr.error(`removeRemote failed: ${e instanceof Error?e.message:String(e)}`)}}},ls=typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN!=`boolean`||!FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN,us=typeof FEDERATION_OPTIMIZE_NO_REMOTE!=`boolean`||!FEDERATION_OPTIMIZE_NO_REMOTE,ds=typeof FEDERATION_OPTIMIZE_NO_SHARED!=`boolean`||!FEDERATION_OPTIMIZE_NO_SHARED,fs=class{constructor(e){this.hooks=new Ho({beforeInit:new Ko(`beforeInit`),init:new Uo,beforeInitContainer:new qo(`beforeInitContainer`),initContainer:new qo(`initContainer`)}),this.version=`2.8.1`,this.moduleCache=new Map,this.loaderHook=new Ho({getModuleInfo:new Uo,createScript:new Uo,createLink:new Uo,fetch:new Wo,loadEntryError:new Wo,afterLoadEntry:new Wo(`afterLoadEntry`),beforeInitRemote:new Wo(`beforeInitRemote`),afterInitRemote:new Wo(`afterInitRemote`),beforeGetExpose:new Wo(`beforeGetExpose`),afterGetExpose:new Wo(`afterGetExpose`),beforeExecuteFactory:new Wo(`beforeExecuteFactory`),afterExecuteFactory:new Wo(`afterExecuteFactory`),getModuleFactory:new Wo}),this.bridgeHook=new Ho({beforeBridgeRender:new Uo,afterBridgeRender:new Uo,beforeBridgeDestroy:new Uo,afterBridgeDestroy:new Uo});let t=us&&ls?[Zo(),ns()]:[],n={id:wo(),name:e.name,plugins:t,remotes:[],shared:{},inBrowser:!0};this.name=e.name,this.options=n,this.snapshotHandler=us?new is(this):new as,this.sharedHandler=ds?new os(this):new ss,this.remoteHandler=us?new cs(this):new Yo,this.shareScopeMap=this.sharedHandler.shareScopeMap,this.registerPlugins([...n.plugins,...e.plugins||[]]),this.options=this.formatOptions(n,e)}initOptions(e){e.name&&e.name!==this.options.name&&Xr(Gr(to,uo)),this.registerPlugins(e.plugins);let t=this.formatOptions(this.options,e);return this.options=t,t}async loadShare(e,t){return this.sharedHandler.loadShare(e,t)}loadShareSync(e,t){return this.sharedHandler.loadShareSync(e,t)}initializeSharing(e=wa,t){return this.sharedHandler.initializeSharing(e,t)}initRawContainer(e,t,n){return this.remoteHandler.initRawContainer(e,t,n)}async loadRemote(e,t){return this.remoteHandler.loadRemote(e,t)}async preloadRemote(e){return this.remoteHandler.preloadRemote(e)}initShareScopeMap(e,t,n={}){this.sharedHandler.initShareScopeMap(e,t,n)}formatOptions(e,t){let n=ds?Da(e,t).allShareInfos:{},{userOptions:r,options:i}=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:t,options:e,shareInfo:n}),a=this.remoteHandler.formatAndRegisterRemote(i,r),{allShareInfos:o}=this.sharedHandler.registerShared(i,r),s=[...i.plugins];r.plugins&&r.plugins.forEach(e=>{s.includes(e)||s.push(e)});let c={...e,...t,plugins:s,remotes:a,shared:o,id:r.id||e.id};return this.hooks.lifecycle.init.emit({origin:this,options:c}),c}registerPlugins(e){let t=To(e,this);this.options.plugins=this.options.plugins.reduce((e,t)=>(t&&e&&!e.find(e=>e.name===t.name)&&e.push(t),e),t||[])}registerRemotes(e,t){return this.remoteHandler.registerRemotes(e,t)}registerShared(e){this.sharedHandler.registerShared(this.options,{...this.options,shared:e})}},ps=Ro;function ms(){return typeof FEDERATION_BUILD_IDENTIFIER<`u`?FEDERATION_BUILD_IDENTIFIER:``}function hs(e,t){let n=ms();return ci.__FEDERATION__.__INSTANCES__.find(r=>!!(n&&r.options.id===n||r.options.name===e&&!r.options.version&&!t||r.options.name===e&&t&&r.options.version===t))}function gs(e){let t=new((_i())||fs)({id:`${e.name}@${e.version||Date.now()}`,...e});return gi(t),t}var _s=null;function vs(e){let t=hs(e.name,e.version),n={...e,id:e.id||``};return t?(t.initOptions(n),_s||=t,t):(_s=gs(n),_s)}function ys(...e){return Yr(_s,eo,uo),_s.loadRemote.apply(_s,e)}function bs(...e){return Yr(_s,eo,uo),_s.registerRemotes.apply(_s,e)}vi(fs);var xs=r(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):n.JSON5=r()})(e,(function(){function e(e,t){return t={exports:{}},e(t,t.exports),t.exports}var t=e(function(e){var t=e.exports=typeof window<`u`&&window.Math==Math?window:typeof self<`u`&&self.Math==Math?self:Function(`return this`)();typeof __g==`number`&&(__g=t)}),n=e(function(e){var t=e.exports={version:`2.6.5`};typeof __e==`number`&&(__e=t)});n.version;var r=function(e){return typeof e==`object`?e!==null:typeof e==`function`},i=function(e){if(!r(e))throw TypeError(e+` is not an object!`);return e},a=function(e){try{return!!e()}catch{return!0}},o=!a(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7}),s=t.document,c=r(s)&&r(s.createElement),l=function(e){return c?s.createElement(e):{}},u=!o&&!a(function(){return Object.defineProperty(l(`div`),"a",{get:function(){return 7}}).a!=7}),d=function(e,t){if(!r(e))return e;var n,i;if(t&&typeof(n=e.toString)==`function`&&!r(i=n.call(e))||typeof(n=e.valueOf)==`function`&&!r(i=n.call(e))||!t&&typeof(n=e.toString)==`function`&&!r(i=n.call(e)))return i;throw TypeError(`Can't convert object to primitive value`)},f=Object.defineProperty,p={f:o?Object.defineProperty:function(e,t,n){if(i(e),t=d(t,!0),i(n),u)try{return f(e,t,n)}catch{}if(`get`in n||`set`in n)throw TypeError(`Accessors not supported!`);return`value`in n&&(e[t]=n.value),e}},m=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},h=o?function(e,t,n){return p.f(e,t,m(1,n))}:function(e,t,n){return e[t]=n,e},g={}.hasOwnProperty,_=function(e,t){return g.call(e,t)},v=0,y=Math.random(),b=function(e){return`Symbol(${e===void 0?``:e})_${(++v+y).toString(36)}`},x=e(function(e){var r=`__core-js_shared__`,i=t[r]||(t[r]={});(e.exports=function(e,t){return i[e]||(i[e]=t===void 0?{}:t)})(`versions`,[]).push({version:n.version,mode:`global`,copyright:`© 2019 Denis Pushkarev (zloirock.ru)`})})(`native-function-to-string`,Function.toString),S=e(function(e){var r=b(`src`),i=`toString`,a=(``+x).split(i);n.inspectSource=function(e){return x.call(e)},(e.exports=function(e,n,i,o){var s=typeof i==`function`;s&&(_(i,`name`)||h(i,`name`,n)),e[n]!==i&&(s&&(_(i,r)||h(i,r,e[n]?``+e[n]:a.join(String(n)))),e===t?e[n]=i:o?e[n]?e[n]=i:h(e,n,i):(delete e[n],h(e,n,i)))})(Function.prototype,i,function(){return typeof this==`function`&&this[r]||x.call(this)})}),C=function(e){if(typeof e!=`function`)throw TypeError(e+` is not a function!`);return e},w=function(e,t,n){if(C(e),t===void 0)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}},T=`prototype`,E=function(e,r,i){var a=e&E.F,o=e&E.G,s=e&E.S,c=e&E.P,l=e&E.B,u=o?t:s?t[r]||(t[r]={}):(t[r]||{})[T],d=o?n:n[r]||(n[r]={}),f=d[T]||(d[T]={}),p,m,g,_;for(p in o&&(i=r),i)m=!a&&u&&u[p]!==void 0,g=(m?u:i)[p],_=l&&m?w(g,t):c&&typeof g==`function`?w(Function.call,g):g,u&&S(u,p,g,e&E.U),d[p]!=g&&h(d,p,_),c&&f[p]!=g&&(f[p]=g)};t.core=n,E.F=1,E.G=2,E.S=4,E.P=8,E.B=16,E.W=32,E.U=64,E.R=128;var D=E,O=Math.ceil,k=Math.floor,A=function(e){return isNaN(e=+e)?0:(e>0?k:O)(e)},j=function(e){if(e==null)throw TypeError(`Can't call method on `+e);return e},M=function(e){return function(t,n){var r=String(j(t)),i=A(n),a=r.length,o,s;return i<0||i>=a?e?``:void 0:(o=r.charCodeAt(i),o<55296||o>56319||i+1===a||(s=r.charCodeAt(i+1))<56320||s>57343?e?r.charAt(i):o:e?r.slice(i,i+2):(o-55296<<10)+(s-56320)+65536)}}(!1);D(D.P,`String`,{codePointAt:function(e){return M(this,e)}}),n.String.codePointAt;var N=Math.max,ee=Math.min,P=function(e,t){return e=A(e),e<0?N(e+t,0):ee(e,t)},F=String.fromCharCode,te=String.fromCodePoint;D(D.S+D.F*(!!te&&te.length!=1),`String`,{fromCodePoint:function(e){for(var t=arguments,n=[],r=arguments.length,i=0,a;r>i;){if(a=+t[i++],P(a,1114111)!==a)throw RangeError(a+` is not a valid code point`);n.push(a<65536?F(a):F(((a-=65536)>>10)+55296,a%1024+56320))}return n.join(``)}}),n.String.fromCodePoint;var I={Space_Separator:/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,ID_Start:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,ID_Continue:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},L={isSpaceSeparator:function(e){return typeof e==`string`&&I.Space_Separator.test(e)},isIdStartChar:function(e){return typeof e==`string`&&(e>=`a`&&e<=`z`||e>=`A`&&e<=`Z`||e===`$`||e===`_`||I.ID_Start.test(e))},isIdContinueChar:function(e){return typeof e==`string`&&(e>=`a`&&e<=`z`||e>=`A`&&e<=`Z`||e>=`0`&&e<=`9`||e===`$`||e===`_`||e===``||e===``||I.ID_Continue.test(e))},isDigit:function(e){return typeof e==`string`&&/[0-9]/.test(e)},isHexDigit:function(e){return typeof e==`string`&&/[0-9A-Fa-f]/.test(e)}},R,z,ne,re,ie,ae,B,oe,se,ce=function(e,t){R=String(e),z=`start`,ne=[],re=0,ie=1,ae=0,B=void 0,oe=void 0,se=void 0;do B=fe(),be[z]();while(B.type!==`eof`);return typeof t==`function`?le({"":se},``,t):se};function le(e,t,n){var r=e[t];if(typeof r==`object`&&r)if(Array.isArray(r))for(var i=0;i<r.length;i++){var a=String(i),o=le(r,a,n);o===void 0?delete r[a]:Object.defineProperty(r,a,{value:o,writable:!0,enumerable:!0,configurable:!0})}else for(var s in r){var c=le(r,s,n);c===void 0?delete r[s]:Object.defineProperty(r,s,{value:c,writable:!0,enumerable:!0,configurable:!0})}return n.call(e,t,r)}var V,H,ue,de,U;function fe(){for(V=`default`,H=``,ue=!1,de=1;;){U=pe();var e=me[V]();if(e)return e}}function pe(){if(R[re])return String.fromCodePoint(R.codePointAt(re))}function W(){var e=pe();return e===`
|
|
6
|
-
`?(ie
|
|
7
|
-
`:case`\r`:case`\u2028`:case`\u2029`:W();return;case`/`:W(),
|
|
8
|
-
`:case`\r`:case`\u2028`:case`\u2029`:W(),
|
|
9
|
-
`:case`\r`:throw Ce(W());case`\u2028`:case`\u2029`:
|
|
10
|
-
`;case`r`:return W(),`\r`;case`t`:return W(),` `;case`v`:return W(),`\v`;case`0`:if(W(),
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./lib-BlUjuGH7.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{a as e,r as t,s as n,t as r}from"./rolldown-runtime-BcKkbAw3.js";import{t as i}from"./vite-preload-helper-B7qeedMF.js";import{A as a,C as o,E as s,F as c,I as l,L as u,M as d,O as f,P as p,S as m,T as h,V as g,_,b as v,j as y,k as b,p as x,v as S,w as C,x as w,y as T}from"./_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1__loadShare___mf_0_emotion_mf_1_react__loadShare__.js-D0M1SjIE.js";import{$ as E,$n as D,$t as O,A as k,An as A,Ar as j,At as M,B as N,Bn as ee,Br as P,Bt as F,C as I,Cn as L,Cr as R,Ct as te,D as ne,Dn as z,Dr as B,Dt as re,E as ie,En as ae,Er as oe,Et as V,F as se,Fr as ce,Ft as H,G as U,Gn as le,Gt as ue,H as de,Hn as fe,Hr as pe,Ht as W,I as me,In as he,Ir as ge,It as _e,J as ve,Jn as ye,Jt as be,K as xe,Kn as Se,Kt as Ce,L as we,Ln as Te,Lr as G,Lt as Ee,M as De,Mn as Oe,Mr as ke,Mt as Ae,N as je,Nn as Me,Nr as Ne,Nt as Pe,O as Fe,On as Ie,Or as Le,Ot as Re,P as ze,Pn as Be,Pr as Ve,Pt as He,Q as Ue,Qn as We,Qt as Ge,R as Ke,Rn as qe,Rr as Je,Rt as Ye,S as Xe,Sn as Ze,Sr as Qe,St as $e,T as et,Tn as tt,Tr as nt,Tt as rt,U as it,Un as at,Ut as ot,V as st,Vn as ct,Vt as lt,W as ut,Wn as dt,Wt as ft,X as pt,Xn as mt,Xt as ht,Y as gt,Yn as _t,Yt as vt,Z as yt,Zn as bt,Zt as xt,_ as St,_n as Ct,_r as K,_t as wt,a as Tt,an as Et,ar as Dt,at as Ot,b as kt,bn as At,br as q,bt as jt,c as Mt,cn as Nt,cr as Pt,ct as Ft,d as It,dn as Lt,dr as Rt,dt as zt,en as Bt,er as Vt,et as Ht,f as Ut,fn as Wt,fr as Gt,ft as Kt,g as qt,gn as Jt,gr as Yt,gt as Xt,h as Zt,hn as Qt,hr as $t,ht as en,i as tn,in as nn,ir as rn,it as an,j as on,jn as sn,jr as cn,k as ln,kn as un,kr as dn,kt as fn,l as J,ln as pn,lr as mn,lt as hn,m as gn,mn as _n,mr as vn,mt as yn,n as bn,nn as xn,nr as Sn,nt as Cn,o as wn,on as Tn,or as En,ot as Dn,p as On,pn as kn,pr as An,pt as jn,q as Mn,qn as Nn,qt as Pn,r as Fn,rn as In,rr as Ln,rt as Rn,s as zn,sn as Bn,sr as Vn,st as Hn,t as Un,tn as Wn,tr as Gn,tt as Kn,u as qn,un as Jn,ur as Yn,ut as Xn,vn as Zn,vt as Qn,w as $n,wn as er,wr as Y,wt as tr,x as nr,xn as rr,xr as ir,xt as ar,y as or,yn as sr,yr as cr,yt as lr,z as ur,zn as dr,zt as fr}from"./_virtual_mf___mfe_internal__ConfigCustomJavascriptSet__mf_owner__1__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-pM642JFd.js";var pr=`FEDERATION_DEBUG`,mr={AT:`@`,HYPHEN:`-`,SLASH:`/`},hr={[mr.AT]:`scope_`,[mr.HYPHEN]:`_`,[mr.SLASH]:`__`};hr[mr.AT],mr.AT,hr[mr.HYPHEN],mr.HYPHEN,hr[mr.SLASH],mr.SLASH;var gr=function(e){return e[e.UNKNOWN=1]=`UNKNOWN`,e[e.CALCULATED=2]=`CALCULATED`,e[e.NO_USE=0]=`NO_USE`,e}({});function _r(){return!0}function vr(){var e;return typeof navigator<`u`&&((e=navigator)==null?void 0:e.product)===`ReactNative`}function yr(){try{if(_r()&&window.localStorage)return!!localStorage.getItem(pr)}catch{return!1}return!1}function br(){return typeof process<`u`&&{}.FEDERATION_DEBUG?!!{}.FEDERATION_DEBUG:typeof FEDERATION_DEBUG<`u`&&FEDERATION_DEBUG?!0:yr()}var xr=`[ Federation Runtime ]`,Sr=function(...e){return e.length?e.reduce((e,t)=>t?e?`${e}:${t}`:t:e,``):``};function Cr(e,t){if(`getPublicPath`in e){let n;return n=e.getPublicPath.startsWith(`function`)?Function(`return `+e.getPublicPath)()():Function(e.getPublicPath)(),`${n}${t}`}return`publicPath`in e?!_r()&&!vr()&&`ssrPublicPath`in e&&typeof e.ssrPublicPath==`string`?`${e.ssrPublicPath}${t}`:`${e.publicPath}${t}`:(console.warn(`Cannot get resource URL. If in debug mode, please ignore.`,e,t),``)}var wr=e=>{console.warn(`${xr}: ${e}`)};function Tr(e){try{return JSON.stringify(e,null,2)}catch{return``}}var Er=(e,t)=>{if(!e)return t;let n=(e=>{if(e===`.`)return``;if(e.startsWith(`./`))return e.replace(`./`,``);if(e.startsWith(`/`)){let t=e.slice(1);return t.endsWith(`/`)?t.slice(0,-1):t}return e})(e);return n?n.endsWith(`/`)?`${n}${t}`:`${n}/${t}`:t};function Dr(e){return e.replace(/#.*$/,``).replace(/\?.*$/,``).replace(/\/[^\/]+$/,`/`)}function Or(e,t={}){var n;let{remotes:r={},overrides:i={},version:a}=t,o,s=()=>`publicPath`in e.metaData?(e.metaData.publicPath===`auto`||e.metaData.publicPath===``)&&a?Dr(a):e.metaData.publicPath:e.metaData.getPublicPath,c=Object.keys(i),l={};Object.keys(r).length||(l=((n=e.remotes)==null?void 0:n.reduce((e,t)=>{let n,r=t.federationContainerName;return n=c.includes(r)?i[r]:`version`in t?t.version:t.entry,e[r]={matchedVersion:n},e},{}))||{}),Object.keys(r).forEach(e=>l[e]={matchedVersion:c.includes(e)?i[e]:r[e]});let{remoteEntry:{path:u,name:d,type:f},types:p={path:``,name:``,zip:``,api:``},buildInfo:{buildVersion:m},globalName:h,ssrRemoteEntry:g}=e.metaData,{exposes:_}=e,v={version:a||``,buildVersion:m,globalName:h,remoteEntry:Er(u,d),remoteEntryType:f,remoteTypes:Er(p.path,p.name),remoteTypesZip:p.zip||``,remoteTypesAPI:p.api||``,remotesInfo:l,shared:e==null?void 0:e.shared.map(e=>({assets:e.assets,sharedName:e.name,version:e.version,usedExports:e.referenceExports||[]})),modules:_==null?void 0:_.map(e=>({moduleName:e.name,modulePath:e.path,assets:e.assets}))};if(`publicPath`in e.metaData?(o={...v,publicPath:s()},typeof e.metaData.ssrPublicPath==`string`&&(o.ssrPublicPath=e.metaData.ssrPublicPath)):o={...v,getPublicPath:s()},g){let e=Er(g.path,g.name);o.ssrRemoteEntry=e,o.ssrRemoteEntryType=g.type||`commonjs-module`}return o}function kr(e){return!!(`remoteEntry`in e&&e.remoteEntry.includes(`.json`))}var Ar=`[ Module Federation ]`,jr=console,Mr=[`logger.ts`,`logger.js`,`captureStackTrace`,`Logger.emit`,`Logger.log`,`Logger.info`,`Logger.warn`,`Logger.error`,`Logger.debug`];function Nr(){try{let e=Error().stack;if(!e)return;let[,...t]=e.split(`
|
|
3
|
+
`),n=t.filter(e=>!Mr.some(t=>e.includes(t)));return n.length?`Stack trace:\n${n.slice(0,5).join(`
|
|
4
|
+
`)}`:void 0}catch{return}}var Pr=class{constructor(e,t=jr){this.prefix=e,this.delegate=t??jr}setPrefix(e){this.prefix=e}setDelegate(e){this.delegate=e??jr}emit(e,t){let n=this.delegate,r=br()?Nr():void 0,i=r?[...t,r]:t,a=(()=>{switch(e){case`log`:return[`log`,`info`];case`info`:return[`info`,`log`];case`warn`:return[`warn`,`info`,`log`];case`error`:return[`error`,`warn`,`log`];default:return[`debug`,`log`]}})();for(let e of a){let t=n[e];if(typeof t==`function`){t.call(n,this.prefix,...i);return}}for(let e of a){let t=jr[e];if(typeof t==`function`){t.call(jr,this.prefix,...i);return}}}log(...e){this.emit(`log`,e)}warn(...e){this.emit(`warn`,e)}error(...e){this.emit(`error`,e)}success(...e){this.emit(`info`,e)}info(...e){this.emit(`info`,e)}ready(...e){this.emit(`info`,e)}debug(...e){br()&&this.emit(`debug`,e)}};function Fr(e){return new Pr(e)}function Ir(e){let t=new Pr(e);return Object.defineProperty(t,"__mf_infrastructure_logger__",{value:!0,enumerable:!1,configurable:!1}),t}Fr(Ar),Ir(Ar);async function Lr(e,t){try{return await e()}catch(e){!t&&wr(e);return}}function Rr(e,t){let n=/^(https?:)?\/\//i;return e.replace(n,``).replace(/\/$/,``)===t.replace(n,``).replace(/\/$/,``)}function zr(e){let t=null,n=!0,r=2e4,i,a=document.getElementsByTagName(`script`);for(let r=0;r<a.length;r++){let i=a[r],o=i.getAttribute(`src`);if(o&&Rr(o,e.url)){t=i,n=!1;break}}if(!t){let n=e.attrs;t=document.createElement(`script`),t.type=(n==null?void 0:n.type)===`module`?`module`:`text/javascript`;let i;e.createScriptHook&&(i=e.createScriptHook(e.url,e.attrs),i instanceof HTMLScriptElement?t=i:typeof i==`object`&&(`script`in i&&i.script&&(t=i.script),`timeout`in i&&i.timeout&&(r=i.timeout))),t.src||(t.src=e.url),n&&!i&&Object.keys(n).forEach(e=>{t&&(e===`async`||e===`defer`?t[e]=n[e]:t.getAttribute(e)||t.setAttribute(e,n[e]))})}let o=null,s=typeof window<`u`?t=>{if(t.filename&&Rr(t.filename,e.url)){let n=Error(`ScriptExecutionError: Script "${e.url}" loaded but threw a runtime error during execution: ${t.message} (${t.filename}:${t.lineno}:${t.colno})`);n.name=`ScriptExecutionError`,o=n}}:null;s&&window.addEventListener(`error`,s);let c=async(n,r)=>{clearTimeout(i),s&&window.removeEventListener(`error`,s);let a=()=>{if((r==null?void 0:r.type)===`error`){let t=Error(r!=null&&r.isTimeout?`ScriptNetworkError: Script "${e.url}" timed out.`:`ScriptNetworkError: Failed to load script "${e.url}" - the script URL is unreachable or the server returned an error (network failure, 404, CORS, etc.)`);t.name=`ScriptNetworkError`,e!=null&&e.onErrorCallback&&(e==null||e.onErrorCallback(t))}else o?e!=null&&e.onErrorCallback&&(e==null||e.onErrorCallback(o)):e!=null&&e.cb&&(e==null||e.cb())};if(t&&(t.onerror=null,t.onload=null,Lr(()=>{let{needDeleteScript:n=!0}=e;n&&t!=null&&t.parentNode&&t.parentNode.removeChild(t)}),n&&typeof n==`function`)){let e=n(r);if(e instanceof Promise){let t=await e;return a(),t}return a(),e}a()};return t.onerror=c.bind(null,t.onerror),t.onload=c.bind(null,t.onload),i=setTimeout(()=>{c(null,{type:`error`,isTimeout:!0})},r),{script:t,needAttach:n}}function Br(e){let t=null,n=!0,r=2e4,i,a=document.getElementsByTagName(`link`);for(let r=0;r<a.length;r++){let i=a[r],o=i.getAttribute(`href`),s=i.getAttribute(`rel`);if(o&&Rr(o,e.url)&&s===e.attrs.rel){t=i,n=!1;break}}if(!t){t=document.createElement(`link`),t.setAttribute(`href`,e.url);let n,i=!0,a=e.attrs;e.createLinkHook&&(n=e.createLinkHook(e.url,a),n instanceof HTMLLinkElement?(t=n,i=!1):typeof n==`object`&&(`link`in n&&n.link&&(t=n.link,i=!1),`timeout`in n&&n.timeout&&(r=n.timeout))),a&&i&&Object.keys(a).forEach(e=>{t&&!t.getAttribute(e)&&t.setAttribute(e,a[e])})}if(!n)return Promise.resolve().then(()=>{e!=null&&e.cb&&(e==null||e.cb())}),{link:t,needAttach:n};let o=(n,r)=>{i&&clearTimeout(i);let a=()=>{if((r==null?void 0:r.type)===`error`){let t=Error(r!=null&&r.isTimeout?`LinkNetworkError: Link "${e.url}" timed out.`:`LinkNetworkError: Failed to load link "${e.url}" - the URL is unreachable or the server returned an error.`);t.name=`LinkNetworkError`,e!=null&&e.onErrorCallback&&(e==null||e.onErrorCallback(t))}else e!=null&&e.cb&&(e==null||e.cb())};if(t&&(t.onerror=null,t.onload=null,Lr(()=>{let{needDeleteLink:n=!0}=e;n&&t!=null&&t.parentNode&&t.parentNode.removeChild(t)}),n)){let e=n(r);return a(),e}a()};return t.onerror=o.bind(null,t.onerror),t.onload=o.bind(null,t.onload),i=setTimeout(()=>{o(null,{type:`error`,isTimeout:!0})},r),{link:t,needAttach:n}}function Vr(e,t){let{attrs:n={},createScriptHook:r}=t;return new Promise((t,i)=>{let{script:a,needAttach:o}=zr({url:e,cb:t,onErrorCallback:i,attrs:{fetchpriority:`high`,...n},createScriptHook:r,needDeleteScript:!0});o&&document.head.appendChild(a)})}var Hr=e=>`View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${e.split(`-`)[0].toLowerCase()}#${e.toLowerCase()}`,Ur=(e,t,n,r)=>{let i=[`${[t[e]]} #${e}`];return n&&i.push(`args: ${JSON.stringify(n)}`),i.push(Hr(e)),r&&i.push(`Original Error Message:\n ${r}`),i.join(`
|
|
5
|
+
`)};function Wr(e,t,n,r,i,a){return r(Ur(e,t,n,i))}var Gr=`[ Federation Runtime ]`,Kr=Fr(Gr);function qr(e,t,n,r,i){e||(n===void 0?Jr(t):Jr(t,n,r,void 0,i))}function Jr(e,t,n,r,i){if(t!==void 0)return Wr(e,t,n??{},e=>{throw Error(`${Gr}: ${e}`)},r,i);let a=e;throw a instanceof Error?(a.message.startsWith(Gr)||(a.message=`${Gr}: ${a.message}`),a):Error(`${Gr}: ${a}`)}function Yr(e){e instanceof Error&&(e.message.startsWith(Gr)||(e.message=`${Gr}: ${e.message}`)),Kr.warn(e)}function Xr(e,t){return e.findIndex(e=>e===t)===-1&&e.push(t),e}function Zr(e){return`version`in e&&e.version?`${e.name}:${e.version}`:`entry`in e&&e.entry?`${e.name}:${e.entry}`:`${e.name}`}function Qr(e){return e.entry!==void 0}function $r(e){return!e.entry.includes(`.json`)}function ei(e){return e&&typeof e==`object`}var ti=Object.prototype.toString;function ni(e){return ti.call(e)===`[object Object]`}function ri(e){return Array.isArray(e)?e:[e]}function ii(e){return`remoteEntry`in e?{url:e.remoteEntry,type:e.remoteEntryType,globalName:e.globalName}:{url:``,type:`global`,globalName:``}}var ai=(e,t)=>{let n;return n=e.endsWith(`/`)?e.slice(0,-1):e,t.startsWith(`.`)&&(t=t.slice(1)),n+=t,n},oi=typeof globalThis==`object`?globalThis:window,si=(()=>{try{return document.defaultView}catch{return oi}})(),ci=si;function li(e,t,n){Object.defineProperty(e,t,{value:n,configurable:!1,writable:!0})}function ui(e,t){return Object.hasOwnProperty.call(e,t)}ui(oi,`__GLOBAL_LOADING_REMOTE_ENTRY__`)||li(oi,`__GLOBAL_LOADING_REMOTE_ENTRY__`,{});var di=oi.__GLOBAL_LOADING_REMOTE_ENTRY__;function fi(e){ui(e,`__VMOK__`)&&!ui(e,`__FEDERATION__`)&&li(e,`__FEDERATION__`,e.__VMOK__),ui(e,`__FEDERATION__`)||(li(e,`__FEDERATION__`,{__GLOBAL_PLUGIN__:[],__INSTANCES__:[],moduleInfo:{},__SHARE__:{},__MANIFEST_LOADING__:{},__PRELOADED_MAP__:new Map}),li(e,`__VMOK__`,e.__FEDERATION__)),e.__FEDERATION__.__GLOBAL_PLUGIN__??=[],e.__FEDERATION__.__INSTANCES__??=[],e.__FEDERATION__.moduleInfo??={},e.__FEDERATION__.__SHARE__??={},e.__FEDERATION__.__MANIFEST_LOADING__??={},e.__FEDERATION__.__PRELOADED_MAP__??=new Map}fi(oi),fi(si);function pi(){oi.__FEDERATION__.__GLOBAL_PLUGIN__=[],oi.__FEDERATION__.__INSTANCES__=[],oi.__FEDERATION__.moduleInfo={},oi.__FEDERATION__.__SHARE__={},oi.__FEDERATION__.__MANIFEST_LOADING__={},Object.keys(di).forEach(e=>{delete di[e]})}function mi(e){oi.__FEDERATION__.__INSTANCES__.push(e)}function hi(){return oi.__FEDERATION__.__DEBUG_CONSTRUCTOR__}function gi(e,t=br()){t&&(oi.__FEDERATION__.__DEBUG_CONSTRUCTOR__=e,oi.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__=`2.8.2`)}function _i(e,t){if(typeof t==`string`){if(e[t])return{value:e[t],key:t};{let n=Object.keys(e);for(let r of n){let[n,i]=r.split(`:`),a=`${n}:${t}`,o=e[a];if(o)return{value:o,key:a}}return{value:void 0,key:t}}}Jr(`getInfoWithoutType: "key" must be a string, got ${typeof t} (${JSON.stringify(t)}).`)}var vi=()=>si.__FEDERATION__.moduleInfo,yi=(e,t)=>{let n=_i(t,Zr(e)).value;if(n&&!n.version&&`version`in e&&e.version&&(n.version=e.version),n)return n;if(`version`in e&&e.version){let{version:t,...n}=e,r=Zr(n),i=_i(si.__FEDERATION__.moduleInfo,r).value;if((i==null?void 0:i.version)===t)return i}},bi=e=>yi(e,si.__FEDERATION__.moduleInfo),xi=(e,t)=>{let n=Zr(e);return si.__FEDERATION__.moduleInfo[n]=t,si.__FEDERATION__.moduleInfo},Si=e=>(si.__FEDERATION__.moduleInfo={...si.__FEDERATION__.moduleInfo,...e},()=>{let t=Object.keys(e);for(let e of t)delete si.__FEDERATION__.moduleInfo[e]}),Ci=(e,t)=>{let n=t||`__FEDERATION_${e}:custom__`;return{remoteEntryKey:n,entryExports:oi[n]}},wi=e=>{let{__GLOBAL_PLUGIN__:t}=si.__FEDERATION__;e.forEach(e=>{t.findIndex(t=>t.name===e.name)===-1?t.push(e):Yr(`The plugin ${e.name} has been registered.`)})},Ti=()=>si.__FEDERATION__.__GLOBAL_PLUGIN__,Ei=e=>oi.__FEDERATION__.__PRELOADED_MAP__.get(e),Di=e=>oi.__FEDERATION__.__PRELOADED_MAP__.set(e,!0),Oi=`[0-9A-Za-z-]+`,ki=`(?:\\+(${Oi}(?:\\.${Oi})*))`,Ai=`0|[1-9]\\d*`,ji=`[0-9]+`,Mi=`\\d*[a-zA-Z-][a-zA-Z0-9-]*`,Ni=`(?:${ji}|${Mi})`,Pi=`(?:-?(${Ni}(?:\\.${Ni})*))`,Fi=`(?:${Ai}|${Mi})`,Ii=`(?:-(${Fi}(?:\\.${Fi})*))`,Li=`${Ai}|x|X|\\*`,Ri=`[v=\\s]*(${Li})(?:\\.(${Li})(?:\\.(${Li})(?:${Ii})?${ki}?)?)?`,zi=`^\\s*(${Ri})\\s+-\\s+(${Ri})\\s*$`,Bi=`[v=\\s]*${`(${ji})\\.(${ji})\\.(${ji})`}${Pi}?${ki}?`,Vi=`((?:<|>)?=?)`,Hi=`(\\s*)${Vi}\\s*(${Bi}|${Ri})`,Ui=`(?:~>?)`,Wi=`(\\s*)${Ui}\\s+`,Gi=`(?:\\^)`,Ki=`(\\s*)${Gi}\\s+`,qi=`(<|>)?=?\\s*\\*`,Ji=`^${Gi}${Ri}$`,Yi=`v?${`(${Ai})\\.(${Ai})\\.(${Ai})`}${Ii}?${ki}?`,Xi=`^${Ui}${Ri}$`,Zi=`^${Vi}\\s*${Ri}$`,Qi=`^${Vi}\\s*(${Yi})$|^$`,$i=`^\\s*>=\\s*0.0.0\\s*$`;function ea(e){return new RegExp(e)}function ta(e){return!e||e.toLowerCase()===`x`||e===`*`}function na(...e){return t=>e.reduce((e,t)=>t(e),t)}function ra(e){return e.match(ea(Qi))}function ia(e,t,n,r){let i=`${e}.${t}.${n}`;return r?`${i}-${r}`:i}function aa(e){return e.replace(ea(zi),(e,t,n,r,i,a,o,s,c,l,u,d)=>(t=ta(n)?``:ta(r)?`>=${n}.0.0`:ta(i)?`>=${n}.${r}.0`:`>=${t}`,s=ta(c)?``:ta(l)?`<${Number(c)+1}.0.0-0`:ta(u)?`<${c}.${Number(l)+1}.0-0`:d?`<=${c}.${l}.${u}-${d}`:`<=${s}`,`${t} ${s}`.trim()))}function oa(e){return e.replace(ea(Hi),`$1$2$3`)}function sa(e){return e.replace(ea(Wi),`$1~`)}function ca(e){return e.replace(ea(Ki),`$1^`)}function la(e){return e.trim().split(/\s+/).map(e=>e.replace(ea(Ji),(e,t,n,r,i)=>ta(t)?``:ta(n)?`>=${t}.0.0 <${Number(t)+1}.0.0-0`:ta(r)?t===`0`?`>=${t}.${n}.0 <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.0 <${Number(t)+1}.0.0-0`:i?t===`0`?n===`0`?`>=${t}.${n}.${r}-${i} <${t}.${n}.${Number(r)+1}-0`:`>=${t}.${n}.${r}-${i} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.${r}-${i} <${Number(t)+1}.0.0-0`:t===`0`?n===`0`?`>=${t}.${n}.${r} <${t}.${n}.${Number(r)+1}-0`:`>=${t}.${n}.${r} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.${r} <${Number(t)+1}.0.0-0`)).join(` `)}function ua(e){return e.trim().split(/\s+/).map(e=>e.replace(ea(Xi),(e,t,n,r,i)=>ta(t)?``:ta(n)?`>=${t}.0.0 <${Number(t)+1}.0.0-0`:ta(r)?`>=${t}.${n}.0 <${t}.${Number(n)+1}.0-0`:i?`>=${t}.${n}.${r}-${i} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.${r} <${t}.${Number(n)+1}.0-0`)).join(` `)}function da(e){return e.split(/\s+/).map(e=>e.trim().replace(ea(Zi),(e,t,n,r,i,a)=>{let o=ta(n),s=o||ta(r),c=s||ta(i);return t===`=`&&c&&(t=``),a=``,o?t===`>`||t===`<`?`<0.0.0-0`:`*`:t&&c?(s&&(r=0),i=0,t===`>`?(t=`>=`,s?(n=Number(n)+1,r=0,i=0):(r=Number(r)+1,i=0)):t===`<=`&&(t=`<`,s?n=Number(n)+1:r=Number(r)+1),t===`<`&&(a=`-0`),`${t+n}.${r}.${i}${a}`):s?`>=${n}.0.0${a} <${Number(n)+1}.0.0-0`:c?`>=${n}.${r}.0${a} <${n}.${Number(r)+1}.0-0`:e})).join(` `)}function fa(e){return e.trim().replace(ea(qi),``)}function pa(e){return e.trim().replace(ea($i),``)}function ma(e,t){return e=Number(e)||e,t=Number(t)||t,e>t?1:e===t?0:-1}function ha(e,t){let{preRelease:n}=e,{preRelease:r}=t;if(n===void 0&&r)return 1;if(n&&r===void 0)return-1;if(n===void 0&&r===void 0)return 0;for(let e=0,t=n.length;e<=t;e++){let t=n[e],i=r[e];if(t!==i)return t===void 0&&i===void 0?0:t?i?ma(t,i):-1:1}return 0}function ga(e,t){return ma(e.major,t.major)||ma(e.minor,t.minor)||ma(e.patch,t.patch)||ha(e,t)}function _a(e,t){return e.version===t.version}function va(e,t){switch(e.operator){case``:case`=`:return _a(e,t);case`>`:return ga(e,t)<0;case`>=`:return _a(e,t)||ga(e,t)<0;case`<`:return ga(e,t)>0;case`<=`:return _a(e,t)||ga(e,t)>0;case void 0:return!0;default:return!1}}function ya(e){return na(la,ua,da,fa)(e)}function ba(e){return na(aa,oa,sa,ca)(e.trim()).split(/\s+/).join(` `)}function xa(e,t){if(!e)return!1;let n=ra(e);if(!n)return!1;let[,r,,i,a,o,s]=n,c={operator:r,version:ia(i,a,o,s),major:i,minor:a,patch:o,preRelease:s==null?void 0:s.split(`.`)},l=t.split(`||`);for(let e of l){let t=e.trim();if(!t||t===`*`||t===`x`)return!0;try{let e=ba(t);if(!e.trim())return!0;let n=e.split(` `).map(e=>ya(e)).join(` `);if(!n.trim())return!0;let r=n.split(/\s+/).map(e=>pa(e)).filter(Boolean);if(r.length===0)continue;let i=!0;for(let e of r){let t=ra(e);if(!t){i=!1;break}let[,n,,r,a,o,s]=t;if(!va({operator:n,version:ia(r,a,o,s),major:r,minor:a,patch:o,preRelease:s==null?void 0:s.split(`.`)},c)){i=!1;break}}if(i)return!0}catch(e){console.error(`[semver] Error processing range part "${t}":`,e);continue}}return!1}var Sa=`default`,Ca=`global`;function wa(e,t,n,r){var i,a;let o;return o=`get`in e?e.get:`lib`in e?()=>Promise.resolve(e.lib):()=>Promise.resolve(()=>{Jr(`Cannot get shared "${n}" from "${t}": neither "get" nor "lib" is provided in the share config.`)}),(i=e.shareConfig)!=null&&i.eager&&(a=e.treeShaking)!=null&&a.mode&&Jr(`Invalid shared config for "${n}" from "${t}": cannot use both "eager: true" and "treeShaking.mode" simultaneously. Choose one strategy.`),{deps:[],useIn:[],from:t,loading:null,...e,shareConfig:{requiredVersion:`^${e.version}`,singleton:!1,eager:!1,strictVersion:!1,...e.shareConfig},get:o,loaded:e!=null&&e.loaded||`lib`in e?!0:void 0,version:e.version??`0`,scope:Array.isArray(e.scope)?e.scope:[e.scope??`default`],strategy:(e.strategy??r)||`version-first`,treeShaking:e.treeShaking?{...e.treeShaking,mode:e.treeShaking.mode??`server-calc`,status:e.treeShaking.status??gr.UNKNOWN,useIn:[]}:void 0}}function Ta(e,t){let n=t.shared||{},r=t.name,i=Object.keys(n).reduce((e,i)=>{let a=ri(n[i]);return e[i]=e[i]||[],a.forEach(n=>{e[i].push(wa(n,r,i,t.shareStrategy))}),e},{}),a={...e.shared};return Object.keys(i).forEach(e=>{a[e]?i[e].forEach(t=>{a[e].find(e=>e.version===t.version)||a[e].push(t)}):a[e]=i[e]}),{allShareInfos:a,newShareInfos:i}}function Ea(e,t){if(!e)return!1;let{status:n,mode:r}=e;return n===gr.NO_USE?!1:n===gr.CALCULATED?!0:r===`runtime-infer`?!t||ja(e,t):!1}function Da(e,t){let n=e=>{if(!Number.isNaN(Number(e))){let t=e.split(`.`),n=e;for(let e=0;e<3-t.length;e++)n+=`.0`;return n}return e};return!!xa(n(e),`<=${n(t)}`)}var Oa=(e,t)=>{let n=t||function(e,t){return Da(e,t)};return Object.keys(e).reduce((e,t)=>!e||n(e,t)||e===`0`?t:e,0)},ka=e=>!!e.loaded||typeof e.lib==`function`,Aa=e=>!!e.loading,ja=(e,t)=>{if(!e||!t)return!1;let{usedExports:n}=e;return n?!!t.every(e=>n.includes(e)):!1};function Ma(e,t,n,r){let i=e[t][n],a=``,o=Ea(r),s=function(e,t){return o?i[e].treeShaking?i[t].treeShaking?!ka(i[e].treeShaking)&&Da(e,t):!1:!0:!ka(i[e])&&Da(e,t)};if(o){if(a=Oa(e[t][n],s),a)return{version:a,useTreesShaking:o};o=!1}return{version:Oa(e[t][n],s),useTreesShaking:o}}var Na=e=>ka(e)||Aa(e);function Pa(e,t,n,r){let i=e[t][n],a=``,o=Ea(r),s=function(e,t){if(o){if(!i[e].treeShaking)return!0;if(!i[t].treeShaking)return!1;if(Na(i[t].treeShaking))return!Na(i[e].treeShaking)||!!Da(e,t);if(Na(i[e].treeShaking))return!1}return Na(i[t])?!Na(i[e])||!!Da(e,t):!Na(i[e])&&Da(e,t)};if(o){if(a=Oa(e[t][n],s),a)return{version:a,useTreesShaking:o};o=!1}return{version:Oa(e[t][n],s),useTreesShaking:o}}function Fa(e){return e===`loaded-first`?Pa:Ma}function Ia(e,t,n,r){if(!e)return;let{shareConfig:i,scope:a=Sa,strategy:o,treeShaking:s}=n,c=Array.isArray(a)?a:[a];for(let a of c)if(i&&e[a]&&e[a][t]){let{requiredVersion:c}=i,{version:l,useTreesShaking:u}=Fa(o)(e,a,t,s),d={shareScopeMap:e,scope:a,pkgName:t,version:l,GlobalFederation:ci.__FEDERATION__,shareInfo:n,resolver:()=>{let r=e[a][t][l];if(i.singleton){if(typeof c==`string`&&!xa(l,c)){let e=`Version ${l} from ${l&&r.from} of shared singleton module ${t} does not satisfy the requirement of ${n.from} which needs ${c})`;i.strictVersion?Jr(e):Yr(e)}return{shared:r,useTreesShaking:u}}{if(c===!1||c===`*`||xa(l,c))return{shared:r,useTreesShaking:u};let n=Ea(s);if(n){for(let[r,i]of Object.entries(e[a][t]))if(Ea(i.treeShaking,s==null?void 0:s.usedExports)&&xa(r,c))return{shared:i,useTreesShaking:n}}for(let[n,r]of Object.entries(e[a][t]))if(xa(n,c))return{shared:r,useTreesShaking:!1}}}};return(r.emit(d)||d).resolver()}}function La(){return ci.__FEDERATION__.__SHARE__}function Ra(e){let{pkgName:t,extraOptions:n,shareInfos:r}=e,i=(n==null?void 0:n.resolver)??(e=>{if(!e)return;let t={};return e.forEach(e=>{t[e.version]=e}),t[Oa(t,function(e,n){return!ka(t[e])&&Da(e,n)})]}),a=e=>typeof e==`object`&&!!e&&!Array.isArray(e),o=(...e)=>{let t={};for(let n of e)if(n)for(let[e,r]of Object.entries(n)){let n=t[e];a(n)&&a(r)?t[e]=o(n,r):r!==void 0&&(t[e]=r)}return t};return o(i(r[t]),n==null?void 0:n.customShareInfo)}var za=(e,t)=>{e.useIn||=[],Xr(e.useIn,t)};function Ba(e,t){return t&&e.treeShaking?e.treeShaking:e}function Va(e,t){return!t||t===`.`?e:`${e}/${t.replace(/^\.\//,``)}`}function Ha(e,t){for(let n of e){let e=t.startsWith(n.name),r=t.replace(n.name,``);if(e){if(r.startsWith(`/`)){let e=n.name;return r=`.${r}`,{pkgNameOrAlias:e,expose:r,remote:n}}if(r===``)return{pkgNameOrAlias:n.name,expose:`.`,remote:n}}let i=n.alias&&t.startsWith(n.alias),a=n.alias&&t.replace(n.alias,``);if(n.alias&&i){if(a&&a.startsWith(`/`)){let e=n.alias;return a=`.${a}`,{pkgNameOrAlias:e,expose:a,remote:n}}if(a===``)return{pkgNameOrAlias:n.alias,expose:`.`,remote:n}}}}function Ua(e,t){for(let n of e)if(t===n.name||n.alias&&t===n.alias)return n}var Wa=`RUNTIME-001`,Ga=`RUNTIME-002`,Ka=`RUNTIME-003`,qa=`RUNTIME-004`,Ja=`RUNTIME-005`,Ya=`RUNTIME-006`,Xa=`RUNTIME-007`,Za=`RUNTIME-008`,Qa=`RUNTIME-009`,$a=`RUNTIME-010`,eo=`RUNTIME-011`,to=`RUNTIME-012`,no=`RUNTIME-013`,ro=`RUNTIME-014`,io=`RUNTIME-015`,ao=`TYPE-001`,oo=`BUILD-001`,so=`BUILD-002`,co={[Wa]:`Failed to get remoteEntry exports.`,[Ga]:`The remote entry interface does not contain "init"`,[Ka]:`Failed to get manifest.`,[qa]:`Failed to locate remote.`,[Ja]:`Invalid loadShareSync function call from bundler runtime`,[Ya]:`Invalid loadShareSync function call from runtime`,[Xa]:`Failed to get remote snapshot.`,[Za]:`Failed to load script resources.`,[Qa]:`Please call createInstance first.`,[$a]:`The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use "createInstance" api.`,[eo]:`The remoteEntry URL is missing from the remote snapshot.`,[to]:`The getter for the shared module is not a function. This may be caused by setting "shared.import: false" without the host providing the corresponding lib.`,[no]:`The manifest is not a valid Module Federation manifest.`,[ro]:`The remote does not expose the requested module.`,[io]:`Remote container initialization failed.`},lo={[ao]:`Failed to generate type declaration. Execute the below cmd to reproduce and fix the error.`},uo={[oo]:`Failed to find expose module.`,[so]:`PublicPath is required in prod mode.`};({...co,...lo,...uo});var fo=`.then(callbacks[0]).catch(callbacks[1])`,po=[`Failed to fetch dynamically imported module`,`Importing a module script failed`,`error loading dynamically imported module`];function mo(e){return e instanceof TypeError&&po.some(t=>e.message.includes(t))}function ho(e){return e===`esm`||e===`module`}async function go({entry:e,remoteEntryExports:t,name:n,getEntryUrl:r}){return new Promise((a,o)=>{let s=e=>{if(mo(e)){let t=e instanceof Error?e.message:String(e);try{Jr(Za,co,{remoteName:n,resourceUrl:c},t)}catch(e){o(e);return}}o(e)},c=r?r(e):e;try{t?a(t):typeof FEDERATION_ALLOW_NEW_FUNCTION<`u`?Function(`callbacks`,`import("${c}")${fo}`)([a,s]):i(()=>import(c).then(a),[],import.meta.url).catch(s)}catch(e){Jr(`Failed to load ESM entry from "${c}". ${e instanceof Error?e.message:String(e)}`)}})}async function _o({entry:e,remoteEntryExports:t}){return new Promise((n,r)=>{try{t?n(t):typeof __system_context__>`u`?System.import(e).then(n).catch(r):Function(`callbacks`,`System.import("${e}")${fo}`)([n,r])}catch(t){Jr(`Failed to load SystemJS entry from "${e}". ${t instanceof Error?t.message:String(t)}`)}})}function vo(e,t,n){let{remoteEntryKey:r,entryExports:i}=Ci(e,t);return i||Jr(Wa,co,{remoteName:e,remoteEntryUrl:n,remoteEntryKey:r}),i}async function yo({name:e,globalName:t,entry:n,remoteInfo:r,loaderHook:i,getEntryUrl:a,resourceContext:o}){let{entryExports:s}=Ci(e,t);if(s)return s;let c=a?a(n):n;return Vr(c,{attrs:{},createScriptHook:(e,t)=>{let n=i.lifecycle.createScript.emit({url:e,attrs:t,remoteInfo:r,resourceContext:o?{...o,url:e}:void 0});if(n&&(n instanceof HTMLScriptElement||`script`in n||`timeout`in n))return n}}).then(()=>vo(e,t,n),t=>{let n=t instanceof Error?t.message:String(t);Jr(Za,co,{remoteName:e,resourceUrl:c},n)})}async function bo({remoteInfo:e,remoteEntryExports:t,loaderHook:n,getEntryUrl:r,resourceContext:i}){let{entry:a,entryGlobalName:o,name:s,type:c}=e;return ho(c)?go({entry:a,remoteEntryExports:t,name:s,getEntryUrl:r}):c===`system`?_o({entry:a,remoteEntryExports:t}):yo({entry:a,globalName:o,name:s,remoteInfo:e,loaderHook:n,getEntryUrl:r,resourceContext:i})}function xo(e){let{entry:t,name:n}=e;return Sr(n,t)}async function So(e){let{origin:t,remoteEntryExports:n,remoteInfo:r,getEntryUrl:i,resourceContext:a,_inErrorHandling:o=!1}=e,s=xo(r);if(n)return n;if(!di[s]){let e=t.remoteHandler.hooks.lifecycle.loadEntry,c=t.loaderHook;di[s]=e.emit({origin:t,loaderHook:c,remoteInfo:r,remoteEntryExports:n}).then(e=>e||bo({remoteInfo:r,remoteEntryExports:n,loaderHook:c,getEntryUrl:i,resourceContext:a})).then(async e=>(await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,remoteEntryExports:e}),e)).catch(async e=>{let i=xo(r),a=e instanceof Error&&e.message.includes(`ScriptExecutionError`);if(e instanceof Error&&e.message.includes(`RUNTIME-008`)&&!a&&!o){let e=await t.loaderHook.lifecycle.loadEntryError.emit({getRemoteEntry:e=>So({...e,_inErrorHandling:!0}),origin:t,remoteInfo:r,remoteEntryExports:n,globalLoading:di,uniqueKey:i});if(e)return await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,remoteEntryExports:e,recovered:!0}),e}throw await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,error:e}),e})}return di[s]}function Co(e){return{...e,entry:`entry`in e?e.entry:``,type:e.type||`global`,entryGlobalName:e.entryGlobalName||e.name,shareScope:e.shareScope||`default`}}function wo(){return typeof FEDERATION_BUILD_IDENTIFIER<`u`?FEDERATION_BUILD_IDENTIFIER:``}function To(e,t){let n=Ti(),r=[t.hooks,t.remoteHandler.hooks,t.sharedHandler.hooks,t.snapshotHandler.hooks,t.loaderHook,t.bridgeHook];return n.length>0&&n.forEach(t=>{e!=null&&e.find(e=>e.name!==t.name)&&e.push(t)}),e&&e.length>0&&e.forEach(e=>{r.forEach(n=>{n.applyPlugin(e,t)})}),e}function Eo(e){return{name:e.name,alias:e.alias,entry:`entry`in e?e.entry:void 0,version:`version`in e?e.version:void 0,type:e.type,entryGlobalName:e.entryGlobalName,shareScope:e.shareScope}}function Do(e){var t,n;let r={};for(let[t,n]of Object.entries(e.shared)){var i,a,o,s;let e=n[0];e&&(r[t]={version:e.version,singleton:(i=e.shareConfig)==null?void 0:i.singleton,requiredVersion:((a=e.shareConfig)==null?void 0:a.requiredVersion)===!1?!1:(o=e.shareConfig)==null?void 0:o.requiredVersion,eager:e.eager,strictVersion:(s=e.shareConfig)==null?void 0:s.strictVersion})}return{project:{name:e.name,mfRole:((t=e.remotes)==null?void 0:t.length)>0?`host`:`unknown`},mfConfig:{name:e.name,remotes:((n=e.remotes)==null?void 0:n.map(Eo))??[],shared:r}}}function Oo(e){return{resourceCategory:`sync`,share:!0,depsRemote:!0,...e}}function ko(e,t){return t.map(t=>{let n=Ua(e,t.nameOrAlias);return qr(n,`Unable to preload ${t.nameOrAlias} as it is not included in ${!n&&Tr({remoteInfo:n,remotes:e})}`),{remote:n,preloadConfig:Oo(t)}})}function Ao(e){return e?e.map(e=>e===`.`?e:e.startsWith(`./`)?e.replace(`./`,``):e):[]}function jo(e){return e instanceof Error?e.message.includes(`timed out`)||e.name.includes(`Timeout`):!1}function Mo(e,t,n,r){return{url:t,status:n,resourceType:e.resourceType,initiator:e.initiator,id:e.id,error:r}}async function No(e,t,n,r){let i=e.moduleCache.get(n.name),a=n.entry;if(i!=null&&i.remoteEntryExports)return Mo(r,a,`cached`);try{if(!await So({origin:e,remoteInfo:n,remoteEntryExports:i==null?void 0:i.remoteEntryExports,resourceContext:{...r,url:a}}))throw Error(`Failed to load remoteEntry "${a}".`);return Mo(r,a,`success`)}catch(e){return Mo(r,a,jo(e)?`timeout`:`error`,e)}}function Po({host:e,remoteInfo:t,url:n,attrs:r,context:i,needDeleteLink:a}){return new Promise(o=>{let{link:s,needAttach:c}=Br({url:n,cb:()=>{o(Mo(i,n,c?`success`:`cached`))},onErrorCallback:e=>{o(Mo(i,n,jo(e)?`timeout`:`error`,e))},attrs:r,createLinkHook:(n,r)=>{let a=e.loaderHook.lifecycle.createLink.emit({url:n,attrs:r,remoteInfo:t,resourceContext:{...i,url:n}});return a instanceof HTMLLinkElement,a},needDeleteLink:a});c&&document.head.appendChild(s)})}function Fo({host:e,remoteInfo:t,url:n,attrs:r,context:i}){return new Promise(a=>{let{script:o,needAttach:s}=zr({url:n,cb:()=>{a(Mo(i,n,s?`success`:`cached`))},onErrorCallback:e=>{a(Mo(i,n,jo(e)?`timeout`:`error`,e))},attrs:r,createScriptHook:(n,r)=>{let a=e.loaderHook.lifecycle.createScript.emit({url:n,attrs:r,remoteInfo:t,resourceContext:{...i,url:n}});return a instanceof HTMLScriptElement,a},needDeleteScript:!0});s&&document.head.appendChild(o)})}function Io(e,t){return{...e,resourceType:t}}function Lo(e,t,n,r=!0,i={initiator:`preloadRemote`,id:e.name}){let{cssAssets:a,jsAssetsWithoutEntry:o,entryAssets:s}=n,c=[];if(t.options.inBrowser){if(s.forEach(n=>{let{moduleInfo:r}=n;c.push(No(t,e,r,Io(i,`remoteEntry`)))}),r){let n={rel:`preload`,as:`style`};a.forEach(r=>{c.push(Po({host:t,remoteInfo:e,url:r,attrs:n,context:Io(i,`css`)}))})}else{let n={rel:`stylesheet`,type:`text/css`};a.forEach(r=>{c.push(Po({host:t,remoteInfo:e,url:r,attrs:n,needDeleteLink:!1,context:Io(i,`css`)}))})}let n=Fo,l={fetchpriority:`high`,type:`text/javascript`};r?(n=Po,l={rel:`preload`,as:`script`}):ho(e.type)&&(n=Po,l={rel:`modulepreload`,fetchpriority:`high`}),o.forEach(r=>{c.push(n({host:t,remoteInfo:e,url:r,attrs:l,context:Io(i,`js`)}))})}return Promise.all(c)}var Ro={global:{Global:ci,nativeGlobal:si,resetFederationGlobalInfo:pi,setGlobalFederationInstance:mi,getGlobalFederationConstructor:hi,setGlobalFederationConstructor:gi,getInfoWithoutType:_i,getGlobalSnapshot:vi,getTargetSnapshotInfoByModuleInfo:yi,getGlobalSnapshotInfoByModuleInfo:bi,setGlobalSnapshotInfoByModuleInfo:xi,addGlobalSnapshot:Si,getRemoteEntryExports:Ci,registerGlobalPlugins:wi,getGlobalHostPlugins:Ti,getPreloaded:Ei,setPreloaded:Di},share:{getRegisteredShare:Ia,getGlobalShareScope:La},utils:{matchRemoteWithNameAndExpose:Ha,preloadAssets:Lo,getRemoteInfo:Co}};function zo(e){if(!e||!(`modules`in e)||!Array.isArray(e.modules))return;let t=e.modules.map(e=>e.moduleName).filter(Boolean);return t.length?t.join(`,`):void 0}function Bo(e,t,n){let r=t,i=Array.isArray(e.shareScope)?e.shareScope:[e.shareScope];i.length||i.push(`default`),i.forEach(e=>{r[e]||(r[e]={})});let a={version:e.version||``,shareScopeKeys:Array.isArray(e.shareScope)?i:e.shareScope||`default`};return Object.defineProperty(a,"shareScopeMap",{value:r,enumerable:!1}),{remoteEntryInitOptions:a,shareScope:r[i[0]],initScope:n??[]}}var Vo=class{constructor({remoteInfo:e,host:t}){this.inited=!1,this.initing=!1,this.lib=void 0,this.remoteInfo=e,this.host=t}async getEntry(e){if(this.remoteEntryExports)return this.remoteEntryExports;let t=await So({origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports,resourceContext:{initiator:`loadRemote`,id:Va(this.remoteInfo.name,e),resourceType:`remoteEntry`}});return qr(t,`remoteEntryExports is undefined \n ${Tr(this.remoteInfo)}`),this.remoteEntryExports=t,this.remoteEntryExports}async init(e,t,n,r){let i=await this.getEntry(r);if(this.inited)return await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:i,cached:!0,origin:this.host}),i;if(this.initPromise){try{await this.initPromise,await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:i,cached:!0,origin:this.host})}catch(n){throw await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:i,error:n,cached:!0,origin:this.host}),n}return i}this.initing=!0,this.initPromise=(async()=>{await this.host.loaderHook.lifecycle.beforeInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,origin:this.host});let{remoteEntryInitOptions:r,shareScope:a,initScope:o}=Bo(this.remoteInfo,this.host.shareScopeMap,n),s=await this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:a,remoteEntryInitOptions:r,initScope:o,remoteInfo:this.remoteInfo,origin:this.host});(i==null?void 0:i.init)===void 0&&Jr(Ga,co,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName},void 0,Do(this.host.options));try{await i.init(s.shareScope,s.initScope,s.remoteEntryInitOptions)}catch(e){Jr(io,co,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName,shareScope:this.remoteInfo.shareScope},`${e}`,Do(this.host.options))}await this.host.hooks.lifecycle.initContainer.emit({...s,id:e,remoteSnapshot:t,remoteEntryExports:i}),this.inited=!0})();try{await this.initPromise,await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:i,origin:this.host})}catch(n){throw await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:i,error:n,origin:this.host}),n}finally{this.initing=!1,this.initPromise=void 0}return i}async get(e,t,n,r){let{loadFactory:i=!0}=n||{loadFactory:!0},a=await this.init(e,r,void 0,t);this.lib=a,await this.host.loaderHook.lifecycle.beforeGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:a,origin:this.host});let o;try{let n=await this.host.loaderHook.lifecycle.getModuleFactory.emit({remoteEntryExports:a,expose:t,moduleInfo:this.remoteInfo});o=typeof n==`function`?n:void 0,o||=await a.get(t),o||Jr(ro,co,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,expose:t,requestId:e,availableExposes:zo(r)},void 0,Do(this.host.options)),await this.host.loaderHook.lifecycle.afterGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:a,moduleFactory:o,origin:this.host})}catch(n){throw await this.host.loaderHook.lifecycle.afterGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:a,error:n,origin:this.host}),n}let s=ai(this.remoteInfo.name,t),c=this.wraperFactory(o,s);if(!i)return c;await this.host.loaderHook.lifecycle.beforeExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:i,origin:this.host});try{let n=await c();return await this.host.loaderHook.lifecycle.afterExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:i,exposeModule:n,origin:this.host}),n}catch(n){throw await this.host.loaderHook.lifecycle.afterExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:i,error:n,origin:this.host}),n}}wraperFactory(e,t){function n(e,t){e&&typeof e==`object`&&Object.isExtensible(e)&&!Object.getOwnPropertyDescriptor(e,Symbol.for(`mf_module_id`))&&Object.defineProperty(e,Symbol.for(`mf_module_id`),{value:t,enumerable:!1})}return()=>{let r=e();return r instanceof Promise?r.then(e=>(n(e,t),e)):(n(r,t),r)}}},Ho=class{constructor(e){this.registerPlugins={},this.lifecycle=e,this.lifecycleKeys=Object.keys(e)}applyPlugin(e,t){qr(ni(e),`Plugin configuration is invalid.`);let n=e.name;if(qr(n,`A name must be provided by the plugin.`),!this.registerPlugins[n]){var r;this.registerPlugins[n]=e,(r=e.apply)==null||r.call(e,t),Object.keys(this.lifecycle).forEach(t=>{let n=e[t];n&&this.lifecycle[t].on(n)})}}removePlugin(e){qr(e,`A name is required.`);let t=this.registerPlugins[e];qr(t,`The plugin "${e}" is not registered.`),Object.keys(t).forEach(e=>{e!==`name`&&this.lifecycle[e].remove(t[e])})}},Uo=class{constructor(e){this.type=``,this.listeners=new Set,e&&(this.type=e)}on(e){typeof e==`function`&&this.listeners.add(e)}once(e){let t=this;this.on(function n(...r){return t.remove(n),e.apply(null,r)})}emit(...e){let t;return this.listeners.size>0&&this.listeners.forEach(n=>{let r=n(...e);r!==void 0&&(t=r)}),t}remove(e){this.listeners.delete(e)}removeAll(){this.listeners.clear()}},Wo=class extends Uo{emit(...e){let t,n=Array.from(this.listeners);if(n.length>0){let r=0,i=t=>t===!1?!1:r<n.length?Promise.resolve(n[r++].apply(null,e)).then(n=>n===void 0||e.length===1&&n===e[0]?i(t):i(n)):t;t=i()}return Promise.resolve(t)}};function Go(e,t){if(!ei(t))return!1;if(e!==t){for(let n in e)if(!(n in t))return!1}return!0}var Ko=class extends Uo{constructor(e){super(),this.onerror=Jr,this.type=e}emit(e){ei(e)||Jr(`The data for the "${this.type}" hook should be an object.`);for(let t of this.listeners)try{let n=t(e);if(n===void 0)continue;if(Go(e,n))e=n;else{this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);break}}catch(e){Yr(e),this.onerror(e)}return e}},qo=class extends Uo{constructor(e){super(),this.onerror=Jr,this.type=e}emit(e){ei(e)||Jr(`The response data for the "${this.type}" hook must be an object.`);let t=Array.from(this.listeners);if(t.length>0){let n=0,r=t=>(Yr(t),this.onerror(t),e),i=a=>{if(a!==void 0&&Go(e,a))e=a;else if(a!==void 0)return this.onerror(`A plugin returned an incorrect value for the "${this.type}" type.`),e;if(n<t.length)try{return Promise.resolve(t[n++](e)).then(i,r)}catch(e){return r(e)}return e};return Promise.resolve(i(e))}return Promise.resolve(e)}},Jo=`Remote loading is disabled by experiments.optimization.disableRemote.`,Yo=class{constructor(){this.hooks=new Ho({})}formatAndRegisterRemote(){return[]}loadRemote(){throw Error(Jo)}preloadRemote(){throw Error(Jo)}registerRemotes(){throw Error(Jo)}getRemoteModuleAndOptions(){throw Error(Jo)}initRawContainer(){throw Error(Jo)}};function Xo(e,t){let n=ii(t);n.url||Jr(eo,co,{remoteName:e.name});let r=Cr(t,n.url);e.type=n.type,e.entryGlobalName=n.globalName,e.entry=r,e.version=t.version,e.buildVersion=t.buildVersion}function Zo(){return{name:`snapshot-plugin`,async afterResolve(e){let{remote:t,pkgNameOrAlias:n,expose:r,origin:i,remoteInfo:a,id:o}=e;if(!Qr(t)||!$r(t)){let{remoteSnapshot:s,globalSnapshot:c}=await i.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:t,id:Va(t.name,r)});Xo(a,s);let l={remote:t,preloadConfig:{nameOrAlias:n,exposes:[r],resourceCategory:`sync`,share:!1,depsRemote:!1}},u=await i.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:i,preloadOptions:l,remoteInfo:a,remote:t,remoteSnapshot:s,globalSnapshot:c});return u&&Lo(a,i,u,!1,{initiator:`loadRemote`,id:o}).catch(()=>void 0),{...e,remoteSnapshot:s}}return e}}}function Qo(e){let t=e.split(`:`);return t.length===1?{name:t[0],version:void 0}:t.length===2?{name:t[0],version:t[1]}:{name:t[1],version:t[2]}}function $o(e,t,n,r,i={},a){let{value:o}=_i(e,Zr(t)),s=a||o;if(s&&!kr(s)&&(n(s,t,r),s.remotesInfo)){let t=Object.keys(s.remotesInfo);for(let r of t){if(i[r])continue;i[r]=!0;let t=Qo(r),a=s.remotesInfo[r];$o(e,{name:t.name,version:a.matchedVersion},n,!1,i,void 0)}}}var es=(e,t)=>document.querySelector(`${e}[${e===`link`?`href`:`src`}="${t}"]`);function ts(e,t,n,r,i){let a=[],o=[],s=[],c=new Set,l=new Set,{options:u}=e,{preloadConfig:d}=t,{depsRemote:f}=d;if($o(r,n,(t,n,r)=>{var i;let c;if(r)c=d;else if(Array.isArray(f)){let e=f.find(e=>e.nameOrAlias===n.name||e.nameOrAlias===n.alias);if(!e)return;c=Oo(e)}else if(f===!0)c=d;else return;let l=Cr(t,ii(t).url);l&&s.push({name:n.name,moduleInfo:{name:n.name,entry:l,type:`remoteEntryType`in t?t.remoteEntryType:`global`,entryGlobalName:`globalName`in t?t.globalName:n.name,shareScope:``,version:`version`in t?t.version:void 0},url:l});let u=`modules`in t?t.modules:[],p=Ao(c.exposes);p.length&&`modules`in t&&(u=t==null||(i=t.modules)==null?void 0:i.reduce((e,t)=>((p==null?void 0:p.indexOf(t.moduleName))!==-1&&e.push(t),e),[]));function m(e){let n=e.map(e=>Cr(t,e));return c.filter?n.filter(c.filter):n}if(u){let r=u.length;for(let i=0;i<r;i++){let r=u[i],s=`${n.name}/${r.moduleName}`;e.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({id:r.moduleName===`.`?n.name:s,name:n.name,remoteSnapshot:t,preloadConfig:c,remote:n,origin:e}),!Ei(s)&&(c.resourceCategory===`all`?(a.push(...m(r.assets.css.async)),a.push(...m(r.assets.css.sync)),o.push(...m(r.assets.js.async)),o.push(...m(r.assets.js.sync))):c.resourceCategory===`sync`&&(a.push(...m(r.assets.css.sync)),o.push(...m(r.assets.js.sync))),Di(s))}}},!0,{},i),i.shared&&i.shared.length>0){let t=(t,n)=>{let{shared:r}=Ia(e.shareScopeMap,n.sharedName,t,e.sharedHandler.hooks.lifecycle.resolveShare)||{};r&&typeof r.lib==`function`&&(n.assets.js.sync.forEach(e=>{c.add(e)}),n.assets.css.sync.forEach(e=>{l.add(e)}))};i.shared.forEach(e=>{var n;let r=(n=u.shared)==null?void 0:n[e.sharedName];if(!r)return;let i=e.version?r.find(t=>t.version===e.version):r;i&&ri(i).forEach(n=>{t(n,e)})})}let p=o.filter(e=>!c.has(e)&&!es(`script`,e));return{cssAssets:a.filter(e=>!l.has(e)&&!es(`link`,e)),jsAssetsWithoutEntry:p,entryAssets:s.filter(e=>!es(`script`,e.url))}}var ns=function(){return{name:`generate-preload-assets-plugin`,async generatePreloadAssets(e){let{origin:t,preloadOptions:n,remoteInfo:r,remote:i,globalSnapshot:a,remoteSnapshot:o}=e;return Qr(i)&&$r(i)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:i.name,url:i.entry,moduleInfo:{name:r.name,entry:i.entry,type:r.type||`global`,entryGlobalName:``,shareScope:``}}]}:(Xo(r,o),ts(t,n,r,a,o))}}};function rs(e,t){let n=bi({name:t.name,version:t.options.version}),r=n&&`remotesInfo`in n&&n.remotesInfo&&_i(n.remotesInfo,e.name).value;return r&&r.matchedVersion?{hostGlobalSnapshot:n,globalSnapshot:vi(),remoteSnapshot:bi({name:e.name,version:r.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:vi(),remoteSnapshot:bi({name:e.name,version:`version`in e?e.version:void 0})}}var is=class{constructor(e){this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new Ho({beforeLoadRemoteSnapshot:new Wo(`beforeLoadRemoteSnapshot`),loadSnapshot:new qo(`loadGlobalSnapshot`),loadRemoteSnapshot:new qo(`loadRemoteSnapshot`),afterLoadSnapshot:new qo(`afterLoadSnapshot`)}),this.manifestLoading=ci.__FEDERATION__.__MANIFEST_LOADING__,this.HostInstance=e,this.loaderHook=e.loaderHook}async loadRemoteSnapshotInfo({moduleInfo:e,id:t,initiator:n=`loadRemote`}){let{options:r}=this.HostInstance;await this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({options:r,moduleInfo:e,origin:this.HostInstance});let i=bi({name:this.HostInstance.options.name,version:this.HostInstance.options.version});i||(i={version:this.HostInstance.options.version||``,remoteEntry:``,remotesInfo:{}},Si({[this.HostInstance.options.name]:i})),i&&`remotesInfo`in i&&!_i(i.remotesInfo,e.name).value&&(`version`in e||`entry`in e)&&(i.remotesInfo={...i==null?void 0:i.remotesInfo,[e.name]:{matchedVersion:`version`in e?e.version:e.entry}});let{hostGlobalSnapshot:a,remoteSnapshot:o,globalSnapshot:s}=this.getGlobalRemoteInfo(e),{remoteSnapshot:c,globalSnapshot:l}=await this.hooks.lifecycle.loadSnapshot.emit({options:r,moduleInfo:e,hostGlobalSnapshot:a,remoteSnapshot:o,globalSnapshot:s}),u,d;if(c)if(kr(c)){let r=c.remoteEntry,i=await this.loadManifestSnapshot(r,e,{},{initiator:n,id:t||e.name}),a=xi({...e,entry:r},i);u=i,d=a}else{let{remoteSnapshot:t}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:c,from:`global`});u=t,d=l}else if(Qr(e)){let r=await this.loadManifestSnapshot(e.entry,e,{},{initiator:n,id:t||e.name}),i=xi(e,r);u=r,d=i}else Jr(Xa,co,{remoteName:e.name,remoteVersion:e.version,hostName:this.HostInstance.options.name,globalSnapshot:JSON.stringify(l)},void 0,Do(this.HostInstance.options));return await this.hooks.lifecycle.afterLoadSnapshot.emit({id:t,host:this.HostInstance,options:r,moduleInfo:e,remoteSnapshot:u}),{remoteSnapshot:u,globalSnapshot:d}}getGlobalRemoteInfo(e){return rs(e,this.HostInstance)}async getManifestJson(e,t,n,r){return(async()=>{let n=Co(t),i=this.manifestCache.get(e);if(i)return i;try{let t=await this.loaderHook.lifecycle.fetch.emit(e,{},n,r?{...r,url:e,resourceType:`manifest`}:void 0);(!t||!(t instanceof Response))&&(t=await fetch(e,{})),i=await t.json()}catch(r){i=await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:r,from:`runtime`,lifecycle:`afterResolve`,remote:n,origin:this.HostInstance}),i||(delete this.manifestLoading[e],Jr(Ka,co,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name},`${r}`,Do(this.HostInstance.options)))}let a=[!i.metaData&&`metaData`,!i.exposes&&`exposes`,!i.shared&&`shared`].filter(Boolean);return a.length>0&&await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:Error(`"${e}" is not a valid federation manifest for remote "${t.name}". Missing required fields: ${a.join(`, `)}.`),from:`runtime`,lifecycle:`afterResolve`,remote:n,origin:this.HostInstance}),a.length>0&&Jr(no,co,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name,missingFields:a.join(`,`)},void 0,Do(this.HostInstance.options)),this.manifestCache.set(e,i),i})()}async loadManifestSnapshot(e,t,n,r){let i=async()=>{let i=await this.getManifestJson(e,t,n,r),a=Or(i,{version:e}),{remoteSnapshot:o}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:t,manifestJson:i,remoteSnapshot:a,manifestUrl:e,from:`manifest`});return o};return this.manifestLoading[e]||(this.manifestLoading[e]=i().then(e=>e)),this.manifestLoading[e]}},as=class{constructor(){this.hooks=new Ho({})}},os=class{constructor(e){this.hooks=new Ho({beforeRegisterShare:new Ko(`beforeRegisterShare`),afterResolve:new qo(`afterResolve`),beforeLoadShare:new qo(`beforeLoadShare`),loadShare:new Wo,afterLoadShare:new Uo(`afterLoadShare`),errorLoadShare:new Uo(`errorLoadShare`),resolveShare:new Ko(`resolveShare`),initContainerShareScopeMap:new Ko(`initContainerShareScopeMap`)}),this.host=e,this.shareScopeMap={},this.initTokens={},this._setGlobalShareScopeMap(e.options)}emitAfterLoadShare({lifecycle:e,pkgName:t,shareInfo:n,selectedShared:r}){try{this.hooks.lifecycle.afterLoadShare.emit({pkgName:t,shareInfo:n,selectedShared:r,shared:this.host.options.shared,shareScopeMap:this.shareScopeMap,lifecycle:e,origin:this.host})}catch(e){Yr(e)}}emitErrorLoadShare({lifecycle:e,pkgName:t,shareInfo:n,error:r,recovered:i}){try{this.hooks.lifecycle.errorLoadShare.emit({pkgName:t,shareInfo:n,shared:this.host.options.shared,shareScopeMap:this.shareScopeMap,lifecycle:e,origin:this.host,error:r,recovered:i})}catch(e){Yr(e)}}registerShared(e,t){let{newShareInfos:n,allShareInfos:r}=Ta(e,t);return Object.keys(n).forEach(e=>{n[e].forEach(n=>{n.scope.forEach(r=>{var i;this.hooks.lifecycle.beforeRegisterShare.emit({origin:this.host,pkgName:e,shared:n}),(i=this.shareScopeMap[r])!=null&&i[e]||this.setShared({pkgName:e,lib:n.lib,get:n.get,loaded:n.loaded||!!n.lib,shared:n,from:t.name})})})}),{newShareInfos:n,allShareInfos:r}}async loadShare(e,t){let{host:n}=this,r=Ra({pkgName:e,extraOptions:t,shareInfos:n.options.shared}),i=r;try{r!=null&&r.scope&&await Promise.all(r.scope.map(async e=>{await Promise.all(this.initializeSharing(e,{strategy:r.strategy}))})),i=(await this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:r,shared:n.options.shared,origin:n})).shareInfo,qr(i,`Cannot find shared "${e}" in host "${n.options.name}". Ensure the shared config for "${e}" is declared in the federation plugin options and the host has been initialized before loading shares.`);let a=i,{shared:o,useTreesShaking:s}=Ia(this.shareScopeMap,e,i,this.hooks.lifecycle.resolveShare)||{};if(o){let t=Ba(o,s);if(t.lib)return za(t,n.options.name),this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,selectedShared:o}),t.lib;if(t.loading&&!t.loaded){let r=await t.loading;return t.loaded=!0,t.lib||=r,za(t,n.options.name),this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,selectedShared:o}),r}{let r=(async()=>{let e=await t.get();return za(t,n.options.name),t.loaded=!0,t.lib=e,e})();this.setShared({pkgName:e,loaded:!1,shared:o,from:n.options.name,lib:null,loading:r,treeShaking:s?t:void 0});let i=await r;return this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,selectedShared:o}),i}}{if(t!=null&&t.customShareInfo)return this.emitErrorLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,recovered:!0}),!1;let r=Ea(a.treeShaking),i=Ba(a,r),o=(async()=>{let t=await i.get();i.lib=t,i.loaded=!0,za(i,n.options.name);let{shared:r,useTreesShaking:o}=Ia(this.shareScopeMap,e,a,this.hooks.lifecycle.resolveShare)||{};if(r){let e=Ba(r,o);e.lib=t,e.loaded=!0,r.from=a.from}return t})();this.setShared({pkgName:e,loaded:!1,shared:a,from:n.options.name,lib:null,loading:o,treeShaking:r?i:void 0});let s=await o;return this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,selectedShared:a}),s}}catch(t){throw this.emitErrorLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:i,error:t}),t}}initializeSharing(e=Sa,t){let{host:n}=this,r=t==null?void 0:t.from,i=t==null?void 0:t.strategy,a=t==null?void 0:t.initScope,o=[];if(r!==`build`){let{initTokens:t}=this;a||=[];let n=t[e];if(n||=t[e]={from:this.host.name},a.indexOf(n)>=0)return o;a.push(n)}let s=this.shareScopeMap,c=n.options.name;s[e]||(s[e]={});let l=s[e],u=(e,t)=>{var n;let{version:r,eager:i}=t;l[e]=l[e]||{};let a=l[e],o=a[r]&&Ba(a[r]),s=!!(o&&(`eager`in o&&o.eager||`shareConfig`in o&&(n=o.shareConfig)!=null&&n.eager));(!o||o.strategy!==`loaded-first`&&!o.loaded&&(!i==!s?c>a[r].from:i))&&(a[r]=t)},d=async e=>{let{module:t}=await n.remoteHandler.getRemoteModuleAndOptions({id:e}),r;try{r=await t.getEntry()}catch(i){if(r=await n.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:i,from:`runtime`,lifecycle:`beforeLoadShare`,remote:t.remoteInfo,origin:n}),!r)return}finally{r!=null&&r.init&&!t.initing&&(t.remoteEntryExports=r,await t.init(void 0,void 0,a))}};return Object.keys(n.options.shared).forEach(t=>{n.options.shared[t].forEach(n=>{n.scope.includes(e)&&u(t,n)})}),(n.options.shareStrategy===`version-first`||i===`version-first`)&&n.options.remotes.forEach(t=>{t.shareScope===e&&o.push(d(t.name))}),o}loadShareSync(e,t){let{host:n}=this,r=Ra({pkgName:e,extraOptions:t,shareInfos:n.options.shared});try{r!=null&&r.scope&&r.scope.forEach(e=>{this.initializeSharing(e,{strategy:r.strategy})});let{shared:i}=Ia(this.shareScopeMap,e,r,this.hooks.lifecycle.resolveShare)||{};if(i){if(typeof i.lib==`function`)return za(i,n.options.name),i.loaded||(i.loaded=!0,i.from===n.options.name&&(r.loaded=!0)),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:r,selectedShared:i}),i.lib;if(typeof i.get==`function`){let t=i.get();if(!(t instanceof Promise))return za(i,n.options.name),this.setShared({pkgName:e,loaded:!0,from:n.options.name,lib:t,shared:i}),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:r,selectedShared:i}),t}}if(r.lib)return r.loaded||=!0,this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:r,selectedShared:r}),r.lib;if(r.get){let i=r.get();return i instanceof Promise&&Jr((t==null?void 0:t.from)===`build`?Ja:Ya,co,{hostName:n.options.name,sharedPkgName:e},void 0,Do(n.options)),r.lib=i,this.setShared({pkgName:e,loaded:!0,from:n.options.name,lib:r.lib,shared:r}),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:r,selectedShared:r}),r.lib}Jr(Ya,co,{hostName:n.options.name,sharedPkgName:e},void 0,Do(n.options))}catch(t){throw this.emitErrorLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:r,error:t}),t}}initShareScopeMap(e,t,n={}){let{host:r}=this;this.shareScopeMap[e]=t,this.hooks.lifecycle.initContainerShareScopeMap.emit({shareScope:t,options:r.options,origin:r,scopeName:e,hostShareScopeMap:n.hostShareScopeMap})}setShared({pkgName:e,shared:t,from:n,lib:r,loading:i,loaded:a,get:o,treeShaking:s}){let{version:c,scope:l=`default`,...u}=t,d=Array.isArray(l)?l:[l],f=e=>{let t=(e,t,n)=>{n&&!e[t]&&(e[t]=n)},n=s?e.treeShaking:e;t(n,`loaded`,a),t(n,`loading`,i),t(n,`get`,o)};d.forEach(t=>{this.shareScopeMap[t]||(this.shareScopeMap[t]={}),this.shareScopeMap[t][e]||(this.shareScopeMap[t][e]={}),this.shareScopeMap[t][e][c]||(this.shareScopeMap[t][e][c]={version:c,scope:[t],...u,lib:r});let i=this.shareScopeMap[t][e][c];f(i),n&&i.from!==n&&(i.from=n)})}_setGlobalShareScopeMap(e){let t=La(),n=e.id||e.name;n&&!t[n]&&(t[n]=this.shareScopeMap)}},ss=class{constructor(){this.shareScopeMap={},this.hooks=new Ho({afterResolve:new qo(`afterResolve`)})}registerShared(){return{newShareInfos:{},allShareInfos:{}}}loadShare(){throw Error(`Shared dependency loading is disabled by experiments.optimization.disableShared.`)}loadShareSync(){throw Error(`Shared dependency loading is disabled by experiments.optimization.disableShared.`)}initializeSharing(){return[]}initShareScopeMap(e,t){this.shareScopeMap[e]=t}},cs=class{constructor(e){this.hooks=new Ho({beforeRegisterRemote:new Ko(`beforeRegisterRemote`),registerRemote:new Ko(`registerRemote`),beforeRequest:new qo(`beforeRequest`),afterMatchRemote:new Wo(`afterMatchRemote`),onLoad:new Wo(`onLoad`),afterLoadRemote:new Wo(`afterLoadRemote`),handlePreloadModule:new Uo(`handlePreloadModule`),errorLoadRemote:new Wo(`errorLoadRemote`),beforePreloadRemote:new Wo(`beforePreloadRemote`),generatePreloadAssets:new Wo(`generatePreloadAssets`),afterPreloadRemote:new Wo(`afterPreloadRemote`),loadEntry:new Wo}),this.host=e,this.idToRemoteMap={}}formatAndRegisterRemote(e,t){return(t.remotes||[]).reduce((e,t)=>(this.registerRemote(t,e,{force:!1}),e),e.remotes)}setIdToRemoteMap(e,t){let{remote:n,expose:r}=t,{name:i,alias:a}=n;if(this.idToRemoteMap[e]={name:n.name,expose:r},a&&e.startsWith(i)){let t=e.replace(i,a);this.idToRemoteMap[t]={name:n.name,expose:r};return}if(a&&e.startsWith(a)){let t=e.replace(a,i);this.idToRemoteMap[t]={name:n.name,expose:r}}}async loadRemote(e,t){let{host:n}=this,r=Ha(n.options.remotes,e),i=e,a=r==null?void 0:r.expose,o=r?Co(r.remote):void 0,s;try{let{loadFactory:r=!0}=t||{loadFactory:!0},{module:c,moduleOptions:l,remoteMatchInfo:u}=await this.getRemoteModuleAndOptions({id:e}),{pkgNameOrAlias:d,remote:f,expose:p,id:m,remoteSnapshot:h}=u;i=m,a=p,o=Co(f);let g=await c.get(m,p,t,h),_=await this.hooks.lifecycle.onLoad.emit({id:m,pkgNameOrAlias:d,expose:p,exposeModule:r?g:void 0,exposeModuleFactory:r?void 0:g,remote:f,options:l,moduleInstance:c,origin:n});return this.setIdToRemoteMap(e,u),s={id:i,expose:a,remote:o,options:t,origin:n},typeof _==`function`?_:g}catch(r){let{from:c=`runtime`}=t||{from:`runtime`},l;try{l=await this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:r,from:c,lifecycle:`onLoad`,expose:a,remote:o,origin:n})}catch(e){throw s={id:i,expose:a,remote:o,options:t,error:e,origin:n},e}if(!l)throw s={id:i,expose:a,remote:o,options:t,error:r,origin:n},r;return s={id:i,expose:a,remote:o,options:t,error:r,origin:n,recovered:!0},l}finally{s&&await this.hooks.lifecycle.afterLoadRemote.emit(s)}}async preloadRemote(e){let{host:t}=this,n=[];await this.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:e,options:t.options,origin:t});let r=ko(t.options.remotes,e),i=e=>{let{preloadConfig:t,remote:n}=e,r=t.exposes||[];return r.length?r.map(r=>({ops:{...e,preloadConfig:{...t,exposes:[r]}},id:Va(n.name,r)})):[{ops:e,id:`${n.name}/*`}]},a;await Promise.all(r.flatMap(i).map(async e=>{let{ops:r,id:i}=e,{remote:a,preloadConfig:o}=r,s=Co(a);try{let{globalSnapshot:e,remoteSnapshot:c}=await t.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:a,id:i,initiator:`preloadRemote`}),l=await this.hooks.lifecycle.generatePreloadAssets.emit({origin:t,preloadOptions:r,remote:a,remoteInfo:s,globalSnapshot:e,remoteSnapshot:c});if(!l)return;let u=await Lo(s,t,l,!0,{initiator:`preloadRemote`,id:i});n.push({remote:a,remoteInfo:s,preloadConfig:o,id:i,results:u})}catch(e){n.push({remote:a,remoteInfo:s,preloadConfig:o,id:i,results:[{url:s.entry,status:`error`,resourceType:/\.json(?:$|[?#])/i.test(s.entry)?`manifest`:`remoteEntry`,initiator:`preloadRemote`,id:i,error:e}]})}}));let o=n.flatMap(e=>e.results.filter(e=>e.status===`error`||e.status===`timeout`));if(o.length>0&&(a=Error(`preloadRemote failed to load ${o.length} resource(s).`),Object.assign(a,{results:n,failedResults:o})),await this.hooks.lifecycle.afterPreloadRemote.emit({preloadOps:e,options:t.options,origin:t,results:n,error:a}),a)throw a}registerRemotes(e,t){let{host:n}=this;e.forEach(e=>{this.registerRemote(e,n.options.remotes,{force:t==null?void 0:t.force})})}initRawContainer(e,t,n){let{host:r}=this,i=new Vo({host:r,remoteInfo:Co({name:e,entry:t})});return i.remoteEntryExports=n,r.moduleCache.set(e,i),i}async getRemoteModuleAndOptions(e){let{host:t}=this,{id:n}=e,r;try{r=await this.hooks.lifecycle.beforeRequest.emit({id:n,options:t.options,origin:t})}catch(e){if(r=await this.hooks.lifecycle.errorLoadRemote.emit({id:n,options:t.options,origin:t,from:`runtime`,error:e,lifecycle:`beforeRequest`}),!r)throw e}let{id:i}=r,a=Ha(t.options.remotes,i);if(!a)try{Jr(qa,co,{hostName:t.options.name,requestId:i},void 0,Do(t.options))}catch(e){throw await this.hooks.lifecycle.afterMatchRemote.emit({id:i,options:t.options,error:e,origin:t}),e}let{remote:o}=a,s=Co(o);await this.hooks.lifecycle.afterMatchRemote.emit({id:i,...a,options:t.options,remoteInfo:s,origin:t});let c=await t.sharedHandler.hooks.lifecycle.afterResolve.emit({id:i,...a,options:t.options,origin:t,remoteInfo:s}),{remote:l,expose:u}=c;qr(l&&u,`The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${i}.`);let d=t.moduleCache.get(l.name),f={host:t,remoteInfo:s};return d||(d=new Vo(f),t.moduleCache.set(l.name,d)),{module:d,moduleOptions:f,remoteMatchInfo:c}}registerRemote(e,t,n){let{host:r}=this,i=()=>{if(e.alias){let n=t.find(t=>{var n;return e.alias&&(t.name.startsWith(e.alias)||((n=t.alias)==null?void 0:n.startsWith(e.alias)))});qr(!n,`The alias ${e.alias} of remote ${e.name} is not allowed to be the prefix of ${n&&n.name} name or alias`)}`entry`in e&&typeof window<`u`&&!e.entry.startsWith(`http`)&&(e.entry=new URL(e.entry,window.location.origin).href),e.shareScope||=Sa,e.type||=Ca};this.hooks.lifecycle.beforeRegisterRemote.emit({remote:e,origin:r});let a=t.find(t=>t.name===e.name);if(!a)i(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:r});else{let o=[`The remote "${e.name}" is already registered.`,`Please note that overriding it may cause unexpected errors.`];n!=null&&n.force&&(this.removeRemote(a),i(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:r}),wr(o.join(` `)))}}removeRemote(e){try{let{host:n}=this,{name:r}=e,i=n.options.remotes.findIndex(e=>e.name===r);i!==-1&&n.options.remotes.splice(i,1);let a=_i(oi.__FEDERATION__.moduleInfo,Zr(e)).key;delete oi.__FEDERATION__.moduleInfo[a],`entry`in e&&(n.snapshotHandler.manifestCache.delete(e.entry),delete ci.__FEDERATION__.__MANIFEST_LOADING__[e.entry]);let{hostGlobalSnapshot:o}=rs(e,n);if(o){let t=o&&`remotesInfo`in o&&o.remotesInfo&&_i(o.remotesInfo,e.name).key;t&&delete o.remotesInfo[t]}let s=n.moduleCache.get(e.name);if(s){var t;let r=s.remoteInfo,i=r.entryGlobalName;oi[i]&&((t=Object.getOwnPropertyDescriptor(oi,i))!=null&&t.configurable?delete oi[i]:oi[i]=void 0);let a=xo(s.remoteInfo);di[a]&&delete di[a];let o=r.buildVersion?Sr(r.name,r.buildVersion):r.name,c=oi.__FEDERATION__.__INSTANCES__.findIndex(e=>r.buildVersion?e.options.id===o:e.name===o);if(c!==-1){let e=oi.__FEDERATION__.__INSTANCES__[c];o=e.options.id||o;let t=La(),n=!0,i=[];Object.keys(t).forEach(e=>{let a=t[e];a&&Object.keys(a).forEach(t=>{let o=a[t];o&&Object.keys(o).forEach(a=>{let s=o[a];s&&Object.keys(s).forEach(o=>{let c=s[o];c&&typeof c==`object`&&c.from===r.name&&(c.loaded||c.loading?(c.useIn=c.useIn.filter(e=>e!==r.name),c.useIn.length?n=!1:i.push([e,t,a,o])):i.push([e,t,a,o]))})})})}),n&&(e.shareScopeMap={},delete t[o]),i.forEach(([e,n,r,i])=>{var a;(a=t[e])==null||(a=a[n])==null||(a=a[r])==null||delete a[i]}),oi.__FEDERATION__.__INSTANCES__.splice(c,1)}n.moduleCache.delete(e.name)}}catch(e){Kr.error(`removeRemote failed: ${e instanceof Error?e.message:String(e)}`)}}},ls=typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN!=`boolean`||!FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN,us=typeof FEDERATION_OPTIMIZE_NO_REMOTE!=`boolean`||!FEDERATION_OPTIMIZE_NO_REMOTE,ds=typeof FEDERATION_OPTIMIZE_NO_SHARED!=`boolean`||!FEDERATION_OPTIMIZE_NO_SHARED,fs=class{constructor(e){this.hooks=new Ho({beforeInit:new Ko(`beforeInit`),init:new Uo,beforeInitContainer:new qo(`beforeInitContainer`),initContainer:new qo(`initContainer`)}),this.version=`2.8.2`,this.moduleCache=new Map,this.loaderHook=new Ho({getModuleInfo:new Uo,createScript:new Uo,createLink:new Uo,fetch:new Wo,loadEntryError:new Wo,afterLoadEntry:new Wo(`afterLoadEntry`),beforeInitRemote:new Wo(`beforeInitRemote`),afterInitRemote:new Wo(`afterInitRemote`),beforeGetExpose:new Wo(`beforeGetExpose`),afterGetExpose:new Wo(`afterGetExpose`),beforeExecuteFactory:new Wo(`beforeExecuteFactory`),afterExecuteFactory:new Wo(`afterExecuteFactory`),getModuleFactory:new Wo}),this.bridgeHook=new Ho({beforeBridgeRender:new Uo,afterBridgeRender:new Uo,beforeBridgeDestroy:new Uo,afterBridgeDestroy:new Uo});let t=us&&ls?[Zo(),ns()]:[],n={id:wo(),name:e.name,plugins:t,remotes:[],shared:{},inBrowser:!0};this.name=e.name,this.options=n,this.snapshotHandler=us?new is(this):new as,this.sharedHandler=ds?new os(this):new ss,this.remoteHandler=us?new cs(this):new Yo,this.shareScopeMap=this.sharedHandler.shareScopeMap,this.registerPlugins([...n.plugins,...e.plugins||[]]),this.options=this.formatOptions(n,e)}initOptions(e){e.name&&e.name!==this.options.name&&Jr(Ur($a,co)),this.registerPlugins(e.plugins);let t=this.formatOptions(this.options,e);return this.options=t,t}async loadShare(e,t){return this.sharedHandler.loadShare(e,t)}loadShareSync(e,t){return this.sharedHandler.loadShareSync(e,t)}initializeSharing(e=Sa,t){return this.sharedHandler.initializeSharing(e,t)}initRawContainer(e,t,n){return this.remoteHandler.initRawContainer(e,t,n)}async loadRemote(e,t){return this.remoteHandler.loadRemote(e,t)}async preloadRemote(e){return this.remoteHandler.preloadRemote(e)}initShareScopeMap(e,t,n={}){this.sharedHandler.initShareScopeMap(e,t,n)}formatOptions(e,t){let n=ds?Ta(e,t).allShareInfos:{},{userOptions:r,options:i}=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:t,options:e,shareInfo:n}),a=this.remoteHandler.formatAndRegisterRemote(i,r),{allShareInfos:o}=this.sharedHandler.registerShared(i,r),s=[...i.plugins];r.plugins&&r.plugins.forEach(e=>{s.includes(e)||s.push(e)});let c={...e,...t,plugins:s,remotes:a,shared:o,id:r.id||e.id};return this.hooks.lifecycle.init.emit({origin:this,options:c}),c}registerPlugins(e){let t=To(e,this);this.options.plugins=this.options.plugins.reduce((e,t)=>(t&&e&&!e.find(e=>e.name===t.name)&&e.push(t),e),t||[])}registerRemotes(e,t){return this.remoteHandler.registerRemotes(e,t)}registerShared(e){this.sharedHandler.registerShared(this.options,{...this.options,shared:e})}},ps=Ro;function ms(){return typeof FEDERATION_BUILD_IDENTIFIER<`u`?FEDERATION_BUILD_IDENTIFIER:``}function hs(e,t){let n=ms();return oi.__FEDERATION__.__INSTANCES__.find(r=>!!(n&&r.options.id===n||r.options.name===e&&!r.options.version&&!t||r.options.name===e&&t&&r.options.version===t))}function gs(e){let t=new((hi())||fs)({id:`${e.name}@${e.version||Date.now()}`,...e});return mi(t),t}var _s=null;function vs(e){let t=hs(e.name,e.version),n={...e,id:e.id||``};return t?(t.initOptions(n),_s||=t,t):(_s=gs(n),_s)}function ys(...e){return qr(_s,Qa,co),_s.loadRemote.apply(_s,e)}function bs(...e){return qr(_s,Qa,co),_s.registerRemotes.apply(_s,e)}gi(fs);var xs=r(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):n.JSON5=r()})(e,(function(){function e(e,t){return t={exports:{}},e(t,t.exports),t.exports}var t=e(function(e){var t=e.exports=typeof window<`u`&&window.Math==Math?window:typeof self<`u`&&self.Math==Math?self:Function(`return this`)();typeof __g==`number`&&(__g=t)}),n=e(function(e){var t=e.exports={version:`2.6.5`};typeof __e==`number`&&(__e=t)});n.version;var r=function(e){return typeof e==`object`?e!==null:typeof e==`function`},i=function(e){if(!r(e))throw TypeError(e+` is not an object!`);return e},a=function(e){try{return!!e()}catch{return!0}},o=!a(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7}),s=t.document,c=r(s)&&r(s.createElement),l=function(e){return c?s.createElement(e):{}},u=!o&&!a(function(){return Object.defineProperty(l(`div`),"a",{get:function(){return 7}}).a!=7}),d=function(e,t){if(!r(e))return e;var n,i;if(t&&typeof(n=e.toString)==`function`&&!r(i=n.call(e))||typeof(n=e.valueOf)==`function`&&!r(i=n.call(e))||!t&&typeof(n=e.toString)==`function`&&!r(i=n.call(e)))return i;throw TypeError(`Can't convert object to primitive value`)},f=Object.defineProperty,p={f:o?Object.defineProperty:function(e,t,n){if(i(e),t=d(t,!0),i(n),u)try{return f(e,t,n)}catch{}if(`get`in n||`set`in n)throw TypeError(`Accessors not supported!`);return`value`in n&&(e[t]=n.value),e}},m=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},h=o?function(e,t,n){return p.f(e,t,m(1,n))}:function(e,t,n){return e[t]=n,e},g={}.hasOwnProperty,_=function(e,t){return g.call(e,t)},v=0,y=Math.random(),b=function(e){return`Symbol(${e===void 0?``:e})_${(++v+y).toString(36)}`},x=e(function(e){var r=`__core-js_shared__`,i=t[r]||(t[r]={});(e.exports=function(e,t){return i[e]||(i[e]=t===void 0?{}:t)})(`versions`,[]).push({version:n.version,mode:`global`,copyright:`© 2019 Denis Pushkarev (zloirock.ru)`})})(`native-function-to-string`,Function.toString),S=e(function(e){var r=b(`src`),i=`toString`,a=(``+x).split(i);n.inspectSource=function(e){return x.call(e)},(e.exports=function(e,n,i,o){var s=typeof i==`function`;s&&(_(i,`name`)||h(i,`name`,n)),e[n]!==i&&(s&&(_(i,r)||h(i,r,e[n]?``+e[n]:a.join(String(n)))),e===t?e[n]=i:o?e[n]?e[n]=i:h(e,n,i):(delete e[n],h(e,n,i)))})(Function.prototype,i,function(){return typeof this==`function`&&this[r]||x.call(this)})}),C=function(e){if(typeof e!=`function`)throw TypeError(e+` is not a function!`);return e},w=function(e,t,n){if(C(e),t===void 0)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}},T=`prototype`,E=function(e,r,i){var a=e&E.F,o=e&E.G,s=e&E.S,c=e&E.P,l=e&E.B,u=o?t:s?t[r]||(t[r]={}):(t[r]||{})[T],d=o?n:n[r]||(n[r]={}),f=d[T]||(d[T]={}),p,m,g,_;for(p in o&&(i=r),i)m=!a&&u&&u[p]!==void 0,g=(m?u:i)[p],_=l&&m?w(g,t):c&&typeof g==`function`?w(Function.call,g):g,u&&S(u,p,g,e&E.U),d[p]!=g&&h(d,p,_),c&&f[p]!=g&&(f[p]=g)};t.core=n,E.F=1,E.G=2,E.S=4,E.P=8,E.B=16,E.W=32,E.U=64,E.R=128;var D=E,O=Math.ceil,k=Math.floor,A=function(e){return isNaN(e=+e)?0:(e>0?k:O)(e)},j=function(e){if(e==null)throw TypeError(`Can't call method on `+e);return e},M=function(e){return function(t,n){var r=String(j(t)),i=A(n),a=r.length,o,s;return i<0||i>=a?e?``:void 0:(o=r.charCodeAt(i),o<55296||o>56319||i+1===a||(s=r.charCodeAt(i+1))<56320||s>57343?e?r.charAt(i):o:e?r.slice(i,i+2):(o-55296<<10)+(s-56320)+65536)}}(!1);D(D.P,`String`,{codePointAt:function(e){return M(this,e)}}),n.String.codePointAt;var N=Math.max,ee=Math.min,P=function(e,t){return e=A(e),e<0?N(e+t,0):ee(e,t)},F=String.fromCharCode,I=String.fromCodePoint;D(D.S+D.F*(!!I&&I.length!=1),`String`,{fromCodePoint:function(e){for(var t=arguments,n=[],r=arguments.length,i=0,a;r>i;){if(a=+t[i++],P(a,1114111)!==a)throw RangeError(a+` is not a valid code point`);n.push(a<65536?F(a):F(((a-=65536)>>10)+55296,a%1024+56320))}return n.join(``)}}),n.String.fromCodePoint;var L={Space_Separator:/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,ID_Start:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,ID_Continue:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},R={isSpaceSeparator:function(e){return typeof e==`string`&&L.Space_Separator.test(e)},isIdStartChar:function(e){return typeof e==`string`&&(e>=`a`&&e<=`z`||e>=`A`&&e<=`Z`||e===`$`||e===`_`||L.ID_Start.test(e))},isIdContinueChar:function(e){return typeof e==`string`&&(e>=`a`&&e<=`z`||e>=`A`&&e<=`Z`||e>=`0`&&e<=`9`||e===`$`||e===`_`||e===``||e===``||L.ID_Continue.test(e))},isDigit:function(e){return typeof e==`string`&&/[0-9]/.test(e)},isHexDigit:function(e){return typeof e==`string`&&/[0-9A-Fa-f]/.test(e)}},te,ne,z,B,re,ie,ae,oe,V,se=function(e,t){te=String(e),ne=`start`,z=[],B=0,re=1,ie=0,ae=void 0,oe=void 0,V=void 0;do ae=fe(),be[ne]();while(ae.type!==`eof`);return typeof t==`function`?ce({"":V},``,t):V};function ce(e,t,n){var r=e[t];if(typeof r==`object`&&r)if(Array.isArray(r))for(var i=0;i<r.length;i++){var a=String(i),o=ce(r,a,n);o===void 0?delete r[a]:Object.defineProperty(r,a,{value:o,writable:!0,enumerable:!0,configurable:!0})}else for(var s in r){var c=ce(r,s,n);c===void 0?delete r[s]:Object.defineProperty(r,s,{value:c,writable:!0,enumerable:!0,configurable:!0})}return n.call(e,t,r)}var H,U,le,ue,de;function fe(){for(H=`default`,U=``,le=!1,ue=1;;){de=pe();var e=me[H]();if(e)return e}}function pe(){if(te[B])return String.fromCodePoint(te.codePointAt(B))}function W(){var e=pe();return e===`
|
|
6
|
+
`?(re++,ie=0):e?ie+=e.length:ie++,e&&(B+=e.length),e}var me={default:function(){switch(de){case` `:case`\v`:case`\f`:case` `:case`\xA0`:case``:case`
|
|
7
|
+
`:case`\r`:case`\u2028`:case`\u2029`:W();return;case`/`:W(),H=`comment`;return;case void 0:return W(),he(`eof`)}if(R.isSpaceSeparator(de)){W();return}return me[ne]()},comment:function(){switch(de){case`*`:W(),H=`multiLineComment`;return;case`/`:W(),H=`singleLineComment`;return}throw Ce(W())},multiLineComment:function(){switch(de){case`*`:W(),H=`multiLineCommentAsterisk`;return;case void 0:throw Ce(W())}W()},multiLineCommentAsterisk:function(){switch(de){case`*`:W();return;case`/`:W(),H=`default`;return;case void 0:throw Ce(W())}W(),H=`multiLineComment`},singleLineComment:function(){switch(de){case`
|
|
8
|
+
`:case`\r`:case`\u2028`:case`\u2029`:W(),H=`default`;return;case void 0:return W(),he(`eof`)}W()},value:function(){switch(de){case`{`:case`[`:return he(`punctuator`,W());case`n`:return W(),ge(`ull`),he(`null`,null);case`t`:return W(),ge(`rue`),he(`boolean`,!0);case`f`:return W(),ge(`alse`),he(`boolean`,!1);case`-`:case`+`:W()===`-`&&(ue=-1),H=`sign`;return;case`.`:U=W(),H=`decimalPointLeading`;return;case`0`:U=W(),H=`zero`;return;case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:U=W(),H=`decimalInteger`;return;case`I`:return W(),ge(`nfinity`),he(`numeric`,1/0);case`N`:return W(),ge(`aN`),he(`numeric`,NaN);case`"`:case`'`:le=W()===`"`,U=``,H=`string`;return}throw Ce(W())},identifierNameStartEscape:function(){if(de!==`u`)throw Ce(W());W();var e=ye();switch(e){case`$`:case`_`:break;default:if(!R.isIdStartChar(e))throw Te()}U+=e,H=`identifierName`},identifierName:function(){switch(de){case`$`:case`_`:case``:case``:U+=W();return;case`\\`:W(),H=`identifierNameEscape`;return}if(R.isIdContinueChar(de)){U+=W();return}return he(`identifier`,U)},identifierNameEscape:function(){if(de!==`u`)throw Ce(W());W();var e=ye();switch(e){case`$`:case`_`:case``:case``:break;default:if(!R.isIdContinueChar(e))throw Te()}U+=e,H=`identifierName`},sign:function(){switch(de){case`.`:U=W(),H=`decimalPointLeading`;return;case`0`:U=W(),H=`zero`;return;case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:U=W(),H=`decimalInteger`;return;case`I`:return W(),ge(`nfinity`),he(`numeric`,ue*(1/0));case`N`:return W(),ge(`aN`),he(`numeric`,NaN)}throw Ce(W())},zero:function(){switch(de){case`.`:U+=W(),H=`decimalPoint`;return;case`e`:case`E`:U+=W(),H=`decimalExponent`;return;case`x`:case`X`:U+=W(),H=`hexadecimal`;return}return he(`numeric`,ue*0)},decimalInteger:function(){switch(de){case`.`:U+=W(),H=`decimalPoint`;return;case`e`:case`E`:U+=W(),H=`decimalExponent`;return}if(R.isDigit(de)){U+=W();return}return he(`numeric`,ue*Number(U))},decimalPointLeading:function(){if(R.isDigit(de)){U+=W(),H=`decimalFraction`;return}throw Ce(W())},decimalPoint:function(){switch(de){case`e`:case`E`:U+=W(),H=`decimalExponent`;return}if(R.isDigit(de)){U+=W(),H=`decimalFraction`;return}return he(`numeric`,ue*Number(U))},decimalFraction:function(){switch(de){case`e`:case`E`:U+=W(),H=`decimalExponent`;return}if(R.isDigit(de)){U+=W();return}return he(`numeric`,ue*Number(U))},decimalExponent:function(){switch(de){case`+`:case`-`:U+=W(),H=`decimalExponentSign`;return}if(R.isDigit(de)){U+=W(),H=`decimalExponentInteger`;return}throw Ce(W())},decimalExponentSign:function(){if(R.isDigit(de)){U+=W(),H=`decimalExponentInteger`;return}throw Ce(W())},decimalExponentInteger:function(){if(R.isDigit(de)){U+=W();return}return he(`numeric`,ue*Number(U))},hexadecimal:function(){if(R.isHexDigit(de)){U+=W(),H=`hexadecimalInteger`;return}throw Ce(W())},hexadecimalInteger:function(){if(R.isHexDigit(de)){U+=W();return}return he(`numeric`,ue*Number(U))},string:function(){switch(de){case`\\`:W(),U+=_e();return;case`"`:if(le)return W(),he(`string`,U);U+=W();return;case`'`:if(!le)return W(),he(`string`,U);U+=W();return;case`
|
|
9
|
+
`:case`\r`:throw Ce(W());case`\u2028`:case`\u2029`:G(de);break;case void 0:throw Ce(W())}U+=W()},start:function(){switch(de){case`{`:case`[`:return he(`punctuator`,W())}H=`value`},beforePropertyName:function(){switch(de){case`$`:case`_`:U=W(),H=`identifierName`;return;case`\\`:W(),H=`identifierNameStartEscape`;return;case`}`:return he(`punctuator`,W());case`"`:case`'`:le=W()===`"`,H=`string`;return}if(R.isIdStartChar(de)){U+=W(),H=`identifierName`;return}throw Ce(W())},afterPropertyName:function(){if(de===`:`)return he(`punctuator`,W());throw Ce(W())},beforePropertyValue:function(){H=`value`},afterPropertyValue:function(){switch(de){case`,`:case`}`:return he(`punctuator`,W())}throw Ce(W())},beforeArrayValue:function(){if(de===`]`)return he(`punctuator`,W());H=`value`},afterArrayValue:function(){switch(de){case`,`:case`]`:return he(`punctuator`,W())}throw Ce(W())},end:function(){throw Ce(W())}};function he(e,t){return{type:e,value:t,line:re,column:ie}}function ge(e){for(var t=0,n=e;t<n.length;t+=1){var r=n[t];if(pe()!==r)throw Ce(W());W()}}function _e(){switch(pe()){case`b`:return W(),`\b`;case`f`:return W(),`\f`;case`n`:return W(),`
|
|
10
|
+
`;case`r`:return W(),`\r`;case`t`:return W(),` `;case`v`:return W(),`\v`;case`0`:if(W(),R.isDigit(pe()))throw Ce(W());return`\0`;case`x`:return W(),ve();case`u`:return W(),ye();case`
|
|
11
11
|
`:case`\u2028`:case`\u2029`:return W(),``;case`\r`:return W(),pe()===`
|
|
12
|
-
`&&W(),``;case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:throw Ce(W());case void 0:throw Ce(W())}return W()}function ve(){var e=``,t=pe();if(!
|
|
12
|
+
`&&W(),``;case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:throw Ce(W());case void 0:throw Ce(W())}return W()}function ve(){var e=``,t=pe();if(!R.isHexDigit(t)||(e+=W(),t=pe(),!R.isHexDigit(t)))throw Ce(W());return e+=W(),String.fromCodePoint(parseInt(e,16))}function ye(){for(var e=``,t=4;t-->0;){var n=pe();if(!R.isHexDigit(n))throw Ce(W());e+=W()}return String.fromCodePoint(parseInt(e,16))}var be={start:function(){if(ae.type===`eof`)throw we();xe()},beforePropertyName:function(){switch(ae.type){case`identifier`:case`string`:oe=ae.value,ne=`afterPropertyName`;return;case`punctuator`:Se();return;case`eof`:throw we()}},afterPropertyName:function(){if(ae.type===`eof`)throw we();ne=`beforePropertyValue`},beforePropertyValue:function(){if(ae.type===`eof`)throw we();xe()},beforeArrayValue:function(){if(ae.type===`eof`)throw we();if(ae.type===`punctuator`&&ae.value===`]`){Se();return}xe()},afterPropertyValue:function(){if(ae.type===`eof`)throw we();switch(ae.value){case`,`:ne=`beforePropertyName`;return;case`}`:Se()}},afterArrayValue:function(){if(ae.type===`eof`)throw we();switch(ae.value){case`,`:ne=`beforeArrayValue`;return;case`]`:Se()}},end:function(){}};function xe(){var e;switch(ae.type){case`punctuator`:switch(ae.value){case`{`:e={};break;case`[`:e=[]}break;case`null`:case`boolean`:case`numeric`:case`string`:e=ae.value}if(V===void 0)V=e;else{var t=z[z.length-1];Array.isArray(t)?t.push(e):Object.defineProperty(t,oe,{value:e,writable:!0,enumerable:!0,configurable:!0})}if(typeof e==`object`&&e)z.push(e),ne=Array.isArray(e)?`beforeArrayValue`:`beforePropertyName`;else{var n=z[z.length-1];ne=n==null?`end`:Array.isArray(n)?`afterArrayValue`:`afterPropertyValue`}}function Se(){z.pop();var e=z[z.length-1];ne=e==null?`end`:Array.isArray(e)?`afterArrayValue`:`afterPropertyValue`}function Ce(e){return De(e===void 0?`JSON5: invalid end of input at `+re+`:`+ie:`JSON5: invalid character '`+Ee(e)+`' at `+re+`:`+ie)}function we(){return De(`JSON5: invalid end of input at `+re+`:`+ie)}function Te(){return ie-=5,De(`JSON5: invalid identifier character at `+re+`:`+ie)}function G(e){console.warn(`JSON5: '`+Ee(e)+`' in strings is not valid ECMAScript; consider escaping`)}function Ee(e){var t={"'":`\\'`,'"':`\\"`,"\\":`\\\\`,"\b":`\\b`,"\f":`\\f`,"\n":`\\n`,"\r":`\\r`," ":`\\t`,"\v":`\\v`,"\0":`\\0`,"\u2028":`\\u2028`,"\u2029":`\\u2029`};if(t[e])return t[e];if(e<` `){var n=e.charCodeAt(0).toString(16);return`\\x`+(`00`+n).substring(n.length)}return e}function De(e){var t=SyntaxError(e);return t.lineNumber=re,t.columnNumber=ie,t}return{parse:se,stringify:function(e,t,n){var r=[],i=``,a,o,s=``,c;if(typeof t==`object`&&t&&!Array.isArray(t)&&(n=t.space,c=t.quote,t=t.replacer),typeof t==`function`)o=t;else if(Array.isArray(t)){a=[];for(var l=0,u=t;l<u.length;l+=1){var d=u[l],f=void 0;typeof d==`string`?f=d:(typeof d==`number`||d instanceof String||d instanceof Number)&&(f=String(d)),f!==void 0&&a.indexOf(f)<0&&a.push(f)}}return n instanceof Number?n=Number(n):n instanceof String&&(n=String(n)),typeof n==`number`?n>0&&(n=Math.min(10,Math.floor(n)),s=` `.substr(0,n)):typeof n==`string`&&(s=n.substr(0,10)),p(``,{"":e});function p(e,t){var n=t[e];switch(n!=null&&(typeof n.toJSON5==`function`?n=n.toJSON5(e):typeof n.toJSON==`function`&&(n=n.toJSON(e))),o&&(n=o.call(t,e,n)),n instanceof Number?n=Number(n):n instanceof String?n=String(n):n instanceof Boolean&&(n=n.valueOf()),n){case null:return`null`;case!0:return`true`;case!1:return`false`}if(typeof n==`string`)return m(n,!1);if(typeof n==`number`)return String(n);if(typeof n==`object`)return Array.isArray(n)?_(n):h(n)}function m(e){for(var t={"'":.1,'"':.2},n={"'":`\\'`,'"':`\\"`,"\\":`\\\\`,"\b":`\\b`,"\f":`\\f`,"\n":`\\n`,"\r":`\\r`," ":`\\t`,"\v":`\\v`,"\0":`\\0`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},r=``,i=0;i<e.length;i++){var a=e[i];switch(a){case`'`:case`"`:t[a]++,r+=a;continue;case`\0`:if(R.isDigit(e[i+1])){r+=`\\x00`;continue}}if(n[a]){r+=n[a];continue}if(a<` `){var o=a.charCodeAt(0).toString(16);r+=`\\x`+(`00`+o).substring(o.length);continue}r+=a}var s=c||Object.keys(t).reduce(function(e,n){return t[e]<t[n]?e:n});return r=r.replace(new RegExp(s,`g`),n[s]),s+r+s}function h(e){if(r.indexOf(e)>=0)throw TypeError(`Converting circular structure to JSON5`);r.push(e);var t=i;i+=s;for(var n=a||Object.keys(e),o=[],c=0,l=n;c<l.length;c+=1){var u=l[c],d=p(u,e);if(d!==void 0){var f=g(u)+`:`;s!==``&&(f+=` `),f+=d,o.push(f)}}var m;if(o.length===0)m=`{}`;else{var h;if(s===``)h=o.join(`,`),m=`{`+h+`}`;else{var _=`,
|
|
13
13
|
`+i;h=o.join(_),m=`{
|
|
14
14
|
`+i+h+`,
|
|
15
|
-
`+t+`}`}}return r.pop(),i=t,m}function g(e){if(e.length===0)return m(e,!0);var t=String.fromCodePoint(e.codePointAt(0));if(!
|
|
15
|
+
`+t+`}`}}return r.pop(),i=t,m}function g(e){if(e.length===0)return m(e,!0);var t=String.fromCodePoint(e.codePointAt(0));if(!R.isIdStartChar(t))return m(e,!0);for(var n=t.length;n<e.length;n++)if(!R.isIdContinueChar(String.fromCodePoint(e.codePointAt(n))))return m(e,!0);return e}function _(e){if(r.indexOf(e)>=0)throw TypeError(`Converting circular structure to JSON5`);r.push(e);var t=i;i+=s;for(var n=[],a=0;a<e.length;a++){var o=p(String(a),e);n.push(o===void 0?`null`:o)}var c;if(n.length===0)c=`[]`;else if(s===``)c=`[`+n.join(`,`)+`]`;else{var l=`,
|
|
16
16
|
`+i,u=n.join(l);c=`[
|
|
17
17
|
`+i+u+`,
|
|
18
|
-
`+t+`]`}return r.pop(),i=t,c}}}}))})),Ss=r(((e,t)=>{t.exports={}})),Cs=r(((t,n)=>{(function(e,r){typeof t==`object`?n.exports=t=r():typeof define==`function`&&define.amd?define([],r):e.CryptoJS=r()})(t,function(){var t=t||function(t,n){var r;if(typeof window<`u`&&window.crypto&&(r=window.crypto),typeof self<`u`&&self.crypto&&(r=self.crypto),typeof globalThis<`u`&&globalThis.crypto&&(r=globalThis.crypto),!r&&typeof window<`u`&&window.msCrypto&&(r=window.msCrypto),!r&&typeof global<`u`&&global.crypto&&(r=global.crypto),!r&&typeof e==`function`)try{r=Ss()}catch{}var i=function(){if(r){if(typeof r.getRandomValues==`function`)try{return r.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof r.randomBytes==`function`)try{return r.randomBytes(4).readInt32LE()}catch{}}throw Error(`Native crypto module could not be used to get secure random number.`)},a=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),o={},s=o.lib={},c=s.Base=function(){return{extend:function(e){var t=a(this);return e&&t.mixIn(e),(!t.hasOwnProperty(`init`)||this.init===t.init)&&(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty(`toString`)&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),l=s.WordArray=c.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=t==n?e.length*4:t},toString:function(e){return(e||d).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var a=0;a<i;a++){var o=n[a>>>2]>>>24-a%4*8&255;t[r+a>>>2]|=o<<24-(r+a)%4*8}else for(var s=0;s<i;s+=4)t[r+s>>>2]=n[s>>>2];return this.sigBytes+=i,this},clamp:function(){var e=this.words,n=this.sigBytes;e[n>>>2]&=4294967295<<32-n%4*8,e.length=t.ceil(n/4)},clone:function(){var e=c.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push(i());return new l.init(t,e)}}),u=o.enc={},d=u.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var a=t[i>>>2]>>>24-i%4*8&255;r.push((a>>>4).toString(16)),r.push((a&15).toString(16))}return r.join(``)},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new l.init(n,t/2)}},f=u.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var a=t[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(a))}return r.join(``)},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(e.charCodeAt(r)&255)<<24-r%4*8;return new l.init(n,t)}},p=u.Utf8={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch{throw Error(`Malformed UTF-8 data`)}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}},m=s.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new l.init,this._nDataBytes=0},_append:function(e){typeof e==`string`&&(e=p.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(e){var n,r=this._data,i=r.words,a=r.sigBytes,o=this.blockSize,s=a/(o*4);s=e?t.ceil(s):t.max((s|0)-this._minBufferSize,0);var c=s*o,u=t.min(c*4,a);if(c){for(var d=0;d<c;d+=o)this._doProcessBlock(i,d);n=i.splice(0,c),r.sigBytes-=u}return new l.init(n,u)},clone:function(){var e=c.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});s.Hasher=m.extend({cfg:c.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){m.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:512/32,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new h.HMAC.init(e,n).finalize(t)}}});var h=o.algo={};return o}(Math);return t})})),ws=r(((e,t)=>{(function(n,r){typeof e==`object`?t.exports=e=r(Cs()):typeof define==`function`&&define.amd?define([`./core`],r):r(n.CryptoJS)})(e,function(e){return(function(t){var n=e,r=n.lib,i=r.WordArray,a=r.Hasher,o=n.algo,s=[];(function(){for(var e=0;e<64;e++)s[e]=t.abs(t.sin(e+1))*4294967296|0})();var c=o.MD5=a.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360}var a=this._hash.words,o=e[t+0],c=e[t+1],p=e[t+2],m=e[t+3],h=e[t+4],g=e[t+5],_=e[t+6],v=e[t+7],y=e[t+8],b=e[t+9],x=e[t+10],S=e[t+11],C=e[t+12],w=e[t+13],T=e[t+14],E=e[t+15],D=a[0],O=a[1],k=a[2],A=a[3];D=l(D,O,k,A,o,7,s[0]),A=l(A,D,O,k,c,12,s[1]),k=l(k,A,D,O,p,17,s[2]),O=l(O,k,A,D,m,22,s[3]),D=l(D,O,k,A,h,7,s[4]),A=l(A,D,O,k,g,12,s[5]),k=l(k,A,D,O,_,17,s[6]),O=l(O,k,A,D,v,22,s[7]),D=l(D,O,k,A,y,7,s[8]),A=l(A,D,O,k,b,12,s[9]),k=l(k,A,D,O,x,17,s[10]),O=l(O,k,A,D,S,22,s[11]),D=l(D,O,k,A,C,7,s[12]),A=l(A,D,O,k,w,12,s[13]),k=l(k,A,D,O,T,17,s[14]),O=l(O,k,A,D,E,22,s[15]),D=u(D,O,k,A,c,5,s[16]),A=u(A,D,O,k,_,9,s[17]),k=u(k,A,D,O,S,14,s[18]),O=u(O,k,A,D,o,20,s[19]),D=u(D,O,k,A,g,5,s[20]),A=u(A,D,O,k,x,9,s[21]),k=u(k,A,D,O,E,14,s[22]),O=u(O,k,A,D,h,20,s[23]),D=u(D,O,k,A,b,5,s[24]),A=u(A,D,O,k,T,9,s[25]),k=u(k,A,D,O,m,14,s[26]),O=u(O,k,A,D,y,20,s[27]),D=u(D,O,k,A,w,5,s[28]),A=u(A,D,O,k,p,9,s[29]),k=u(k,A,D,O,v,14,s[30]),O=u(O,k,A,D,C,20,s[31]),D=d(D,O,k,A,g,4,s[32]),A=d(A,D,O,k,y,11,s[33]),k=d(k,A,D,O,S,16,s[34]),O=d(O,k,A,D,T,23,s[35]),D=d(D,O,k,A,c,4,s[36]),A=d(A,D,O,k,h,11,s[37]),k=d(k,A,D,O,v,16,s[38]),O=d(O,k,A,D,x,23,s[39]),D=d(D,O,k,A,w,4,s[40]),A=d(A,D,O,k,o,11,s[41]),k=d(k,A,D,O,m,16,s[42]),O=d(O,k,A,D,_,23,s[43]),D=d(D,O,k,A,b,4,s[44]),A=d(A,D,O,k,C,11,s[45]),k=d(k,A,D,O,E,16,s[46]),O=d(O,k,A,D,p,23,s[47]),D=f(D,O,k,A,o,6,s[48]),A=f(A,D,O,k,v,10,s[49]),k=f(k,A,D,O,T,15,s[50]),O=f(O,k,A,D,g,21,s[51]),D=f(D,O,k,A,C,6,s[52]),A=f(A,D,O,k,m,10,s[53]),k=f(k,A,D,O,x,15,s[54]),O=f(O,k,A,D,c,21,s[55]),D=f(D,O,k,A,y,6,s[56]),A=f(A,D,O,k,E,10,s[57]),k=f(k,A,D,O,_,15,s[58]),O=f(O,k,A,D,w,21,s[59]),D=f(D,O,k,A,h,6,s[60]),A=f(A,D,O,k,S,10,s[61]),k=f(k,A,D,O,p,15,s[62]),O=f(O,k,A,D,b,21,s[63]),a[0]=a[0]+D|0,a[1]=a[1]+O|0,a[2]=a[2]+k|0,a[3]=a[3]+A|0},_doFinalize:function(){var e=this._data,n=e.words,r=this._nDataBytes*8,i=e.sigBytes*8;n[i>>>5]|=128<<24-i%32;var a=t.floor(r/4294967296),o=r;n[(i+64>>>9<<4)+15]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360,n[(i+64>>>9<<4)+14]=(o<<8|o>>>24)&16711935|(o<<24|o>>>8)&4278255360,e.sigBytes=(n.length+1)*4,this._process();for(var s=this._hash,c=s.words,l=0;l<4;l++){var u=c[l];c[l]=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360}return s},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function l(e,t,n,r,i,a,o){var s=e+(t&n|~t&r)+i+o;return(s<<a|s>>>32-a)+t}function u(e,t,n,r,i,a,o){var s=e+(t&r|n&~r)+i+o;return(s<<a|s>>>32-a)+t}function d(e,t,n,r,i,a,o){var s=e+(t^n^r)+i+o;return(s<<a|s>>>32-a)+t}function f(e,t,n,r,i,a,o){var s=e+(n^(t|~r))+i+o;return(s<<a|s>>>32-a)+t}n.MD5=a._createHelper(c),n.HmacMD5=a._createHmacHelper(c)})(Math),e.MD5})}));dt();var Ts=n(xs()),Es=n(ws());g();var Ds=window.innerWidth<=600?12:void 0,Os={add:()=>_.createElement(Re,null),auth:()=>_.createElement(Yn,null),backlight:()=>_.createElement(E,null),book:()=>_.createElement(vn,null),delete:()=>_.createElement(we,null),dimmer:()=>_.createElement(cn,null),edit:()=>_.createElement(fr,null),error:()=>_.createElement(N,null),group:()=>_.createElement(yt,null),help:()=>_.createElement(Ue,null),identify:()=>_.createElement(ve,null),info:()=>_.createElement(Wt,null),light:()=>_.createElement(Vn,null),lines:()=>_.createElement(R,null),next:()=>_.createElement(hn,null),open:()=>_.createElement(Sn,null),pair:()=>_.createElement(sn,null),pause:()=>_.createElement(nn,null),play:()=>_.createElement(Tt,null),previous:()=>_.createElement(M,null),qrcode:()=>_.createElement(cr,null),refresh:()=>_.createElement($e,null),save:()=>_.createElement(ar,null),search:()=>_.createElement(nt,null),send:()=>_.createElement(se,null),settings:()=>_.createElement(ie,null),socket:()=>_.createElement(tr,null),stop:()=>_.createElement(dn,null),unpair:()=>_.createElement(kt,null),upload:()=>_.createElement(Xe,null),user:()=>_.createElement(Qt,null),warning:()=>_.createElement(ae,null),web:()=>_.createElement(dr,null)};function ks(e){return Object.prototype.toString.call(e)===`[object Object]`}var X=class e extends s{constructor(t){super(t),q(this,`defaultValue`,void 0),q(this,`isError`,void 0),q(this,`lang`,void 0),q(this,`defaultSendToDone`,void 0),q(this,`sendToTimeout`,void 0),q(this,`noPlaceRequired`,void 0),q(this,`reportedHidden`,!1),q(this,`calculateTimeout`,null),q(this,`AsyncFunction`,void 0),q(this,`onUpdate`,t=>{let n=e.getValue(t||this.props.data,this.props.attr)||``;this.state.value===n?this.forceUpdate():this.setState({value:n})}),q(this,`getObject`,async e=>{try{var t,n;return await((t=(n=this.props.oContext).getCachedObject)==null?void 0:t.call(n,e))||null}catch(e){return console.error(e),null}}),this.AsyncFunction=Object.getPrototypeOf(async function(){}).constructor,this.state={confirmDialog:!1,confirmNewValue:null,confirmAttr:null,confirmData:null,confirmCallback:null},this.isError={},this.lang=K.getLanguage(),t.schema&&(t.custom?t.schema.defaultFunc||(this.defaultValue=t.schema.default):t.schema.type!==`state`&&!t.schema.defaultFunc&&(this.defaultValue=t.schema.default))}async getCachedObject(e){return this.props.oContext.getCachedObject?this.props.oContext.getCachedObject(e):await this.props.oContext.socket.getObject(e)||null}async componentDidMount(){var t;if((t=this.props.schema)!=null&&t.defaultFunc&&(this.props.custom?this.defaultValue=await this.executeCustom(this.props.schema.defaultFunc,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData,`defaultFunc`):this.props.schema.type!==`state`&&(this.defaultValue=await this.execute(this.props.schema.defaultFunc,this.props.schema.default,this.props.data,this.props.arrayIndex,this.props.globalData,`defaultFunc`))),this.props.attr){var n,r;(n=(r=this.props.oContext).registerOnForceUpdate)==null||n.call(r,this.props.attr,this.onUpdate)}let i=[`select`,`autocomplete`,`autocompleteSendTo`];if(this.defaultValue!==void 0&&this.props.attr){let t=e.getValue(this.props.data,this.props.attr);(t===void 0||i.includes(this.props.schema.type)&&(t===``||t===null))&&setTimeout(()=>{this.props.attr&&(this.props.custom?this.props.onChange(this.props.attr,this.defaultValue,()=>setTimeout(()=>this.props.attr&&this.props.oContext.forceUpdate([this.props.attr],this.props.data),100)):(e.setValue(this.props.data,this.props.attr,this.defaultValue),this.props.onChange(this.props.data,void 0,()=>this.props.attr&&this.props.oContext.forceUpdate([this.props.attr],this.props.data))))},100)}else this.props.schema.defaultSendTo&&this.defaultSendTo().catch(e=>console.error(e))}async defaultSendTo(){if(this.props.alive&&this.props.schema.defaultSendTo){this.defaultSendToDone=!0;let t=this.props.schema.data;if(t===void 0&&this.props.schema.jsonData){let e=await this.getPatternAsync(this.props.schema.jsonData,null,!0);try{t=JSON.parse(e)}catch{console.error(`Cannot parse json data: ${e}`)}}else t={attr:this.props.attr,value:e.getValue(this.props.data,this.props.attr)};t===void 0&&(t=null);let n=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(n!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){let e=await this.props.oContext.socket.getState(`system.adapter.${n}.alive`);if(!(e!=null&&e.val)){window.alert(K.t(`jc_Instance %s is not alive`,n));return}}try{let r=await this.props.oContext.socket.sendTo(n,this.props.schema.defaultSendTo,t);r!=null&&this.props.attr&&(this.props.custom?this.props.onChange(this.props.attr,r,()=>this.props.attr&&this.props.oContext.forceUpdate([this.props.attr],this.props.data)):(e.setValue(this.props.data,this.props.attr,r),this.props.onChange(this.props.data,void 0,()=>this.props.attr&&this.props.oContext.forceUpdate([this.props.attr],this.props.data))))}catch(e){console.error(e)}}else this.defaultSendToDone=!1,this.props.schema.allowSaveWithError||this.onError(this.props.attr,K.t(`jc_Instance %s is not alive`,this.props.oContext.instance.toString()))}componentWillUnmount(){if(this.props.attr){var e,t;(e=(t=this.props.oContext).registerOnForceUpdate)==null||e.call(t,this.props.attr)}this.sendToTimeout&&=(clearTimeout(this.sendToTimeout),null),this.calculateTimeout&&=(clearTimeout(this.calculateTimeout),null)}static getValue(t,n){if(!n)return;if(typeof n==`string`)return e.getValue(t,n.split(`.`));if(n.length===1)return t[n[0]];let r=n.shift();if(typeof r==`string`&&typeof t[r]==`object`)return e.getValue(t[r],n)}static setValue(t,n,r){if(n){if(typeof n==`string`){e.setValue(t,n.split(`.`),r);return}if(n.length===1)r===null?delete t[n[0]]:t[n[0]]=r;else{let i=n.shift();if(typeof i!=`string`)return;(!t[i]||typeof t[i]==`object`)&&(t[i]=t[i]||{}),e.setValue(t[i],n,r)}}}getText(e,t){if(!e)return``;if(typeof e==`string`){let n=t?e:K.t(e);return n.includes("${")?this.getPattern(n,void 0,t):n}if(e&&typeof e==`object`){let n=e;return n.func?typeof n.func==`object`?this.getPattern(n.func[this.lang]||n.func.en||``,void 0,!0):this.getPattern(n.func,void 0,t):e[this.lang]||e.en||``}return e.toString()}async getTextAsync(e,t){if(!e)return``;if(typeof e==`string`){let n=t?e:K.t(e);return n.includes("${")?this.getPatternAsync(n,null,t):n}return ks(e)?e.func?typeof e.func==`object`?this.getPatternAsync(e.func[this.lang]||e.func.en||``,null,!0):this.getPatternAsync(e.func,null,t):e[this.lang]||e.en||``:e.toString()}renderDialogConfirm(){if(!this.state.confirmDialog)return null;let t=this.state.confirmData||this.props.schema.confirm;if(!t)return null;let n=null;return t.type===`warning`?n=_.createElement(ae,null):t.type===`error`?n=_.createElement(N,null):t.type===`info`&&(n=_.createElement(Wt,null)),_.createElement(Cn,{title:this.getText(t.title)||K.t(`jc_Please confirm`),text:this.getText(t.text),ok:this.getText(t.ok)||K.t(`jc_Ok`),cancel:this.getText(t.cancel)||K.t(`jc_Cancel`),icon:n||void 0,onClose:t=>this.setState({confirmDialog:!1},()=>{if(t){if(this.state.confirmCallback){let e=this.state.confirmCallback;this.setState({confirmCallback:null},()=>e(!0));return}let t=JSON.parse(JSON.stringify(this.props.data));this.state.confirmDepAttr&&e.setValue(t,this.state.confirmDepAttr,this.state.confirmDepNewValue),e.setValue(t,this.state.confirmAttr,this.state.confirmNewValue),this.setState({confirmDialog:!1,confirmDepAttr:null,confirmDepNewValue:null,confirmNewValue:null,confirmAttr:null,confirmData:null},()=>this.props.onChange(t))}else{let e=this.state.confirmCallback;this.setState({confirmDialog:!1,confirmDepAttr:null,confirmDepNewValue:null,confirmNewValue:null,confirmAttr:null,confirmData:null,confirmCallback:null},()=>{e&&e(!1)})}})})}getIcon(e){if(e||=this.props.schema.icon,!e)return null;let t=Os[e];return t?t():((e.endsWith(`.png`)||e.endsWith(`.svg`)||e.endsWith(`.jpg`))&&!e.startsWith(`http://`)&&!e.startsWith(`https://`)&&(e=`${this.props.oContext.imagePrefix}/adapter/${this.props.oContext.adapterName}/${e}`),_.createElement(Pt,{src:e,style:{width:22,height:22}}))}onChangeAsync(e,t){return new Promise(n=>{let r=this.onChange(e,t,n);r instanceof Promise&&r.catch(e=>console.error(`Cannot set value: ${e}`))})}async onChange(t,n,r){let i=JSON.parse(JSON.stringify(this.props.data));if(e.setValue(i,t,n),this.props.schema.confirm&&await this.execute(this.props.schema.confirm.condition,!1,i,this.props.arrayIndex,this.props.globalData,`confirm.condition`))return new Promise(e=>{this.setState({confirmDialog:!0,confirmNewValue:n,confirmAttr:t,confirmData:null},()=>{typeof r==`function`?r():e()})});if(this.props.schema.confirmDependsOn)for(let a=0;a<this.props.schema.confirmDependsOn.length;a++){let o=this.props.schema.confirmDependsOn[a];if(o.confirm){let a=e.getValue(i,o.attr);if(await this.execute(o.confirm.condition,!1,i,this.props.arrayIndex,this.props.globalData,`confirm.condition`))return new Promise(e=>{if(!o.confirm)throw Error(`Cannot set value: confirm is not defined for ${o.attr}`);this.setState({confirmDialog:!0,confirmNewValue:n,confirmAttr:t,confirmDepNewValue:a,confirmDepAttr:o.attr,confirmData:o.confirm},()=>{typeof r==`function`?r():e()})})}}let a=[];if(this.props.schema.onChangeDependsOn)for(let t=0;t<this.props.schema.onChangeDependsOn.length;t++){let n=this.props.schema.onChangeDependsOn[t];if(n.onChange){let t=e.getValue(i,n.attr),r;r=this.props.custom?await this.executeCustom(n.onChange.calculateFunc,i,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData,`onChange.calculateFunc`):await this.execute(n.onChange.calculateFunc,t,i,this.props.arrayIndex,this.props.globalData,`onChange.calculateFunc`),r!==t&&n.attr&&(e.setValue(i,n.attr,r),a.push(n.attr))}}if(this.props.schema.hiddenDependsOn)for(let e=0;e<this.props.schema.hiddenDependsOn.length;e++){let t=this.props.schema.hiddenDependsOn[e];t.hidden&&t.attr&&a.push(t.attr)}if(this.props.schema.labelDependsOn)for(let e=0;e<this.props.schema.labelDependsOn.length;e++){let t=this.props.schema.labelDependsOn[e];t.hidden&&t.attr&&a.push(t.attr)}if(this.props.schema.helpDependsOn)for(let e=0;e<this.props.schema.helpDependsOn.length;e++){let t=this.props.schema.helpDependsOn[e];t.hidden&&t.attr&&a.push(t.attr)}if(this.props.schema.onChange&&!this.props.schema.onChange.ignoreOwnChanges){let t=e.getValue(i,this.props.attr),n=this.props.custom?await this.executeCustom(this.props.schema.onChange.calculateFunc,i,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData,`onChange.calculateFunc`):await this.execute(this.props.schema.onChange.calculateFunc,t,i,this.props.arrayIndex,this.props.globalData,`onChange.calculateFunc`);n!==t&&e.setValue(i,this.props.attr,n)}return this.props.custom?(this.props.onChange(t,n,()=>r==null?void 0:r()),a!=null&&a.length&&a.forEach((t,n)=>setTimeout(()=>this.props.onChange(t,e.getValue(i,t)),n*50))):this.props.onChange(i,void 0,()=>{a.length&&this.props.oContext.forceUpdate(a,i),r==null||r()}),Promise.resolve()}static ensureAwaitGetObject(e){return e.replace(/(?<![\w$.])getObject\(/g,(t,n)=>{let r=e.slice(Math.max(0,n-10),n);return/await\s+$/.test(r)?t:`await ${t}`})}debugLog(e,t,n,r){var i,a;if(!((i=this.props.schema)!=null&&i.debug))return;let o=this.props.attr||((a=this.props.schema)==null?void 0:a.attr)||``,s=`%c[jsonConfig]%c ${o?`${o} → `:``}${e}`,c={function:t,result:n,data:r??this.props.data,arrayIndex:this.props.arrayIndex};n instanceof Error?console.error(s,`background:#b71c1c;color:#fff;border-radius:3px;padding:1px 4px`,`color:#e53935`,c):console.log(s,`background:#33691e;color:#fff;border-radius:3px;padding:1px 4px`,`color:#7cb342`,c)}async execute(t,n,r,i,a,o){let s;if(ks(t))s=t.func;else if(typeof t==`string`)s=t;else return t;if(!s)return n;s.includes(`getObject(`)&&(s=e.ensureAwaitGetObject(s));try{let e=await new this.AsyncFunction(`data`,`originalData`,`_system`,`_alive`,`_common`,`_socket`,`_instance`,`arrayIndex`,`globalData`,`_changed`,`_href`,`getObject`,s.includes(`return`)?s:`return ${s}`)(r||this.props.data||{},this.props.originalData,this.props.oContext.systemConfig,this.props.alive,this.props.common,this.props.oContext.socket,this.props.oContext.instance,i,a||{},this.props.changed,window.location.href,this.getObject);return this.debugLog(o||`JS function`,s,e,r),e}catch(e){return this.debugLog(o||`JS function`,s,e instanceof Error?e:Error(String(e)),r),console.error(`Cannot execute ${JSON.stringify(t)}: ${e}`),n}}async executeCustom(t,n,r,i,a,o,s){let c;if(ks(t))c=t.func;else if(typeof t==`string`)c=t;else return t;if(!c)return null;c.includes(`getObject(`)&&(c=e.ensureAwaitGetObject(c));try{let e=await new this.AsyncFunction(`data`,`originalData`,`_system`,`instanceObj`,`customObj`,`_socket`,`arrayIndex`,`globalData`,`_changed`,`_href`,`getObject`,c.includes(`return`)?c:`return ${c}`)(n||this.props.data,this.props.originalData,this.props.oContext.systemConfig,i||{},r||{},this.props.oContext.socket,a,o||{},this.props.changed,window.location.href,this.getObject);return this.debugLog(s||`JS function`,c,e,n),e}catch(e){return this.debugLog(s||`JS function`,c,e instanceof Error?e:Error(String(e)),n),console.error(`Cannot execute ${c}: ${e}`),null}}async calculate(e){let t,n,r,i;return this.props.custom?(t=e.validator?!await this.executeCustom(e.validator,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData,`validator`):!1,n=e.disabled===!0?!0:e.disabled?await this.executeCustom(e.disabled,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData,`disabled`):!1,r=e.hidden===!0?!0:e.hidden?await this.executeCustom(e.hidden,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData,`hidden`):!1,i=e.defaultFunc?await this.executeCustom(e.defaultFunc,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData,`defaultFunc`):e.default):(t=e.validator?!await this.execute(e.validator,!1,this.props.data,this.props.arrayIndex,this.props.globalData,`validator`):!1,n=e.disabled===!0?!0:e.disabled?await this.execute(e.disabled,!1,this.props.data,this.props.arrayIndex,this.props.globalData,`disabled`):!1,r=e.hidden===!0?!0:e.hidden?await this.execute(e.hidden,!1,this.props.data,this.props.arrayIndex,this.props.globalData,`hidden`):!1,i=e.defaultFunc?await this.execute(e.defaultFunc,e.default,this.props.data,this.props.arrayIndex,this.props.globalData,`defaultFunc`):e.default),{error:t,disabled:n,hidden:r,defaultValue:i}}onError(e,t){var n,r;e&&(t?this.isError[e]=t:delete this.isError[e]),(n=(r=this.props).onError)==null||n.call(r,e,t)}renderItem(e,t,n){return this.getText(this.props.schema.label)||this.getText(this.props.schema.text)}renderHelp(e,t,n){return t?_.createElement(`a`,{href:t,target:`_blank`,rel:`noreferrer`,style:{color:this.props.oContext.themeType===`dark`?`#a147ff`:`#5b238f`,textDecoration:`underline`}},this.getText(e,n)):(e=this.getText(e,n)||``,e&&(e.includes(`<a `)||e.includes(`<br`)||e.includes(`<b>`)||e.includes(`<i>`))?$t.renderTextWithA(e):e)}async renderHelpAsync(e,t,n){return t?_.createElement(`a`,{href:t,target:`_blank`,rel:`noreferrer`,style:{color:this.props.oContext.themeType===`dark`?`#a147ff`:`#5b238f`,textDecoration:`underline`}},await this.getTextAsync(e,n)):(e=await this.getTextAsync(e,n)||``,e&&(e.includes(`<a `)||e.includes(`<br`)||e.includes(`<b>`)||e.includes(`<i>`))?$t.renderTextWithA(e):e)}static escapeString(t,n){return typeof t==`string`?(t=t.replace(/`/g,"\\`"),t=t.replace(/\${([^}]+)}/g,(t,r)=>{if(r&&typeof r==`string`&&r.startsWith(`data.`)){let t=e.getValue(n,r.replace(/^data\./,``));if(typeof t==`string`&&(t.includes(`\\`)||t.includes(`"`)))return`\${${r}.replace(/\\\\/g, '\\\\\\\\').replace(/"/g, '\\\\"')}`}return t}),t):``}async getPatternAsync(t,n,r){if(n||=this.props.data,!t)return``;let i;typeof t==`object`?t.func?i=t.func:(console.log(`Object must be stringified: ${JSON.stringify(t)}`),i=JSON.stringify(t)):i=t,i.includes(`getObject(`)&&(i=e.ensureAwaitGetObject(i));try{if(this.props.custom){let t=await new this.AsyncFunction(`data`,`originalData`,`arrayIndex`,`globalData`,`_system`,`instanceObj`,`customObj`,`_socket`,`_changed`,`_href`,`getObject`,`return \`${e.escapeString(i,n)}\``)(n,this.props.originalData,this.props.arrayIndex,this.props.globalData,this.props.oContext.systemConfig,this.props.oContext.instanceObj,this.props.customObj,this.props.oContext.socket,this.props.changed,window.location.href,this.getObject);return r?t:K.t(t)}let t=await new this.AsyncFunction(`data`,`originalData`,`arrayIndex`,`globalData`,`_system`,`_alive`,`_common`,`_socket`,`_changed`,`_href`,`getObject`,`return \`${e.escapeString(i,n)}\``)(n,this.props.originalData,this.props.arrayIndex,this.props.globalData,this.props.oContext.systemConfig,this.props.alive,this.props.common,this.props.oContext.socket,this.props.changed,window.location.href,this.getObject);return r?t:K.t(t)}catch(e){return console.error(`Cannot execute ${i}: ${e}`),i}}getPattern(t,n,r){if(n||=this.props.data,!t)return``;let i;typeof t==`object`?t.func?i=t.func:(console.log(`Object must be stringified: ${JSON.stringify(t)}`),i=JSON.stringify(t)):i=t,i.includes(`getObject(`)&&console.warn(`It is not possible to use getObject function in text patterns: ${i}`);try{if(this.props.custom){let t=Function(`data`,`originalData`,`arrayIndex`,`globalData`,`_system`,`instanceObj`,`customObj`,`_socket`,`_changed`,`_href`,`return \`${e.escapeString(i,n)}\``)(n,this.props.originalData,this.props.arrayIndex,this.props.globalData,this.props.oContext.systemConfig,this.props.oContext.instanceObj,this.props.customObj,this.props.oContext.socket,this.props.changed,window.location.href,this.getObject);return r?t:K.t(t)}let t=Function(`data`,`originalData`,`arrayIndex`,`globalData`,`_system`,`_alive`,`_common`,`_socket`,`_changed`,`_href`,`return \`${e.escapeString(i,n)}\``)(n,this.props.originalData,this.props.arrayIndex,this.props.globalData,this.props.oContext.systemConfig,this.props.alive,this.props.common,this.props.oContext.socket,this.props.changed,window.location.href);return r?t:K.t(t)}catch(e){return console.error(`Cannot execute ${i}: ${e}`),i}}updateCalculatedValues(){this.calculateTimeout&&clearTimeout(this.calculateTimeout),this.calculateTimeout=setTimeout(async()=>{this.calculateTimeout=null;let e=this.props.schema;if(!e)return;let{error:t,disabled:n,hidden:r,defaultValue:i}=await this.calculate(e);(!this.state.calculatedValues||this.state.calculatedValues.error!==t||this.state.calculatedValues.disabled!==n||this.state.calculatedValues.hidden!==r||this.state.calculatedValues.defaultValue!==i)&&this.setState({calculatedValues:{error:t,disabled:n,hidden:r,defaultValue:i}})},50)}render(){let e=this.props.schema;if(!e||this.props.expertMode===!1&&e.expertMode||(this.props.alive&&this.defaultSendToDone===!1&&(this.sendToTimeout=setTimeout(async()=>{this.sendToTimeout=null,await this.defaultSendTo()},200)),this.updateCalculatedValues(),!this.state.calculatedValues))return null;if(this.state.calculatedValues.hidden){if(Object.keys(this.isError).length&&(setTimeout(e=>Object.keys(e).forEach(e=>this.props.onError(e)),100,JSON.parse(JSON.stringify(this.isError))),this.isError={}),e.hideOnlyControl){let t=_.createElement(Ct,{size:{xs:e.xs||Ds,sm:e.sm||void 0,md:e.md||void 0,lg:e.lg||void 0,xl:e.xl||void 0},style:{marginBottom:0,textAlign:`left`,...e.style,...this.props.oContext.themeType===`dark`?e.darkStyle:{}}});return e.newLine?_.createElement(_.Fragment,null,_.createElement(`div`,{style:{flexBasis:`100%`,height:0}}),t):t}return this.props.onHiddenChanged&&!this.reportedHidden&&(this.reportedHidden=!0,setTimeout(()=>{var e,t;return this.props.attr&&((e=(t=this.props).onHiddenChanged)==null?void 0:e.call(t,this.props.attr,!0))},10)),null}this.props.onHiddenChanged&&this.reportedHidden&&(this.reportedHidden=!1,setTimeout(()=>{var e,t;return this.props.attr&&((e=(t=this.props).onHiddenChanged)==null?void 0:e.call(t,this.props.attr,!1))},10)),e.validatorNoSaveOnError&&this.props.attr&&(this.state.calculatedValues.error&&!Object.keys(this.isError).length?(this.isError={[this.props.attr]:!e.validatorErrorText||K.t(e.validatorErrorText)},setTimeout(e=>Object.keys(e).forEach(t=>this.props.onError(t,e[t])),100,JSON.parse(JSON.stringify(this.isError)))):!this.state.calculatedValues.error&&Object.keys(this.isError).length&&(setTimeout(e=>Object.keys(e).forEach(e=>this.props.onError(e)),100,JSON.parse(JSON.stringify(this.isError))),this.isError={}));let t=this.renderItem(this.state.calculatedValues.error,this.state.calculatedValues.disabled||this.props.commandRunning||this.props.disabled||!1,this.state.calculatedValues.defaultValue);if(this.noPlaceRequired)return t;let n=_.createElement(Ct,{title:this.getText(e.tooltip),size:{xs:e.xs||12,sm:e.sm||void 0,md:e.md||void 0,lg:e.lg||void 0,xl:e.xl||void 0},style:{marginBottom:0,textAlign:`left`,width:e.type===`divider`||e.type===`header`?e.width||`100%`:void 0,...e.style,...this.props.oContext.themeType===`dark`?e.darkStyle:{}}},this.props.schema.defaultSendTo&&this.props.schema.button?_.createElement(Ct,{container:!0,style:{width:`100%`}},_.createElement(Ct,{sx:{flex:1}},t),_.createElement(Ct,null,_.createElement(Ge,{disabled:this.state.calculatedValues.disabled,variant:`outlined`,onClick:()=>this.defaultSendTo(),title:this.props.schema.buttonTooltip?this.getText(this.props.schema.buttonTooltip,this.props.schema.buttonTooltipNoTranslation):K.t(`jc_Request data by instance`)},this.getText(this.props.schema.button)))):t);return e.newLine?_.createElement(_.Fragment,null,_.createElement(`div`,{style:{flexBasis:`100%`,height:0}}),this.renderDialogConfirm(),n):this.state.confirmDialog?_.createElement(_.Fragment,null,this.renderDialogConfirm(),n):n}};q(X,`DIFFERENT_VALUE`,`__different__`),q(X,`DIFFERENT_LABEL`,`jc___different__`),q(X,`NONE_VALUE`,``),q(X,`NONE_LABEL`,`jc_none`),g();var As={fullWidth:{width:`100%`},accordionSummary:e=>({backgroundColor:e.palette.mode===`dark`?`rgba(255, 255, 255, 0.08)`:`rgba(0, 0, 0, 0.08)`}),accordionTitle:{},toolbar:e=>({backgroundColor:e.palette.mode===`dark`?`rgba(255, 255, 255, 0.08)`:`rgba(0, 0, 0, 0.08)`,borderRadius:`3px`}),tooltip:{pointerEvents:`none`}},js=class extends X{constructor(e){super(e),q(this,`typingTimer`,null),q(this,`onAccordionError`,e=>(t,n)=>{let r={...this.state.accordionErrors};r[e]||(r[e]={}),t&&(n?r[e][t]=n:(delete r[e][t],Object.keys(r[e]).length===0&&delete r[e])),this.setState({accordionErrors:r}),this.props.onError(t,n)}),q(this,`hasAccordionErrors`,e=>!!this.state.accordionErrors[e]&&Object.keys(this.state.accordionErrors[e]).length>0),q(this,`onDelete`,e=>()=>{let t=JSON.parse(JSON.stringify(this.state.value));t.splice(e,1),this.setState({value:t,iteration:this.state.iteration+1e4},()=>this.onChangeWrapper(t))}),q(this,`onClone`,e=>()=>{let t=JSON.parse(JSON.stringify(this.state.value)),n=JSON.parse(JSON.stringify(t[e]));if(typeof this.props.schema.clone==`string`&&typeof n[this.props.schema.clone]==`string`){let e=1,r=n[this.props.schema.clone],i=r.match(/(\d+)$/);for(i?(r=r.replace(i[0],``),e=parseInt(i[0],10)+1):r+=`_`;t.find(t=>t[this.props.schema.clone]===r+e.toString());)e++;n[this.props.schema.clone]=`${n[this.props.schema.clone]}_${e}`}t.splice(e,0,n),this.setState({value:t,activeIndex:-1,iteration:this.state.iteration+1e4},()=>this.onChangeWrapper(t))}),q(this,`onChangeWrapper`,e=>{this.typingTimer&&clearTimeout(this.typingTimer),this.typingTimer=setTimeout(e=>{if(this.typingTimer=null,this.props.attr){let t=this.onChange(this.props.attr,e);t instanceof Promise&&t.catch(e=>this.onError(e))}},300,e)}),q(this,`onAdd`,async()=>{let{schema:e}=this.props,t=JSON.parse(JSON.stringify(this.state.value)),n={};if(e.items)for(let r of e.items){let e;e=r.defaultFunc?this.props.custom?r.defaultFunc?await this.executeCustom(r.defaultFunc,this.props.data,this.props.customObj,this.props.oContext.instanceObj,t.length,this.props.data):this.props.schema.default:r.defaultFunc?await this.execute(r.defaultFunc,this.props.schema.default,this.props.data,t.length,this.props.data):this.props.schema.default:r.default??null,r.attr&&(n[r.attr]=e)}t.push(n),this.setState({value:t,activeIndex:t.length-1},()=>this.onChangeWrapper(t))}),q(this,`onExport`,()=>{let{value:e}=this.state,t=JSON.stringify(e,null,2),n=`data:application/json;charset=utf-8,${encodeURIComponent(t)}`,r=`config_section_${new Date().toISOString().slice(0,19).replace(/:/g,`-`)}.json`,i=document.createElement(`a`);i.setAttribute(`href`,n),i.setAttribute(`download`,r),i.click()}),q(this,`onImport`,e=>{let t=document.createElement(`input`);t.type=`file`,t.accept=`.json`,t.onchange=t=>{var n;let r=(n=t.target.files)==null?void 0:n[0];if(!r)return;let i=new FileReader;i.onload=t=>{try{var n;let r=JSON.parse((n=t.target)==null?void 0:n.result);if(!Array.isArray(r)){alert(K.t(`jc_Invalid JSON format. Expected an array.`));return}let i;i=e?r:[...this.state.value,...r],this.setState({value:i,activeIndex:-1},()=>this.onChangeWrapper(i))}catch{alert(K.t(`jc_Invalid JSON file.`))}},i.readAsText(r)},t.click()}),this.props.schema.items||=[]}async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr)||[];Array.isArray(e)||(e=[]),this.setState({value:e,activeIndex:-1,iteration:0,accordionErrors:{}})}componentWillUnmount(){this.typingTimer&&=(clearTimeout(this.typingTimer),null),super.componentWillUnmount()}itemAccordion(e,t){let{value:n}=this.state,{schema:r}=this.props,i={type:`panel`,items:r.items.reduce((e,t)=>(t.attr&&(e[t.attr]=t),e),{}),style:{marginLeft:`-8px`,marginTop:`10px`,marginBottom:`10px`}};return _.createElement(yk,{oContext:this.props.oContext,index:t+this.state.iteration,arrayIndex:t,changed:this.props.changed,expertMode:this.props.expertMode,globalData:this.props.data,common:this.props.common,alive:this.props.alive,themeName:this.props.themeName,data:e,custom:!0,schema:i,originalData:this.props.originalData,onChange:(e,r)=>{if(typeof e==`string`&&e){let i=JSON.parse(JSON.stringify(n));i[t][e]=r,this.setState({value:i},()=>this.onChangeWrapper(i))}},onError:this.onAccordionError(t),onHiddenChanged:this.props.onHiddenChanged,table:this.props.table,customComponents:this.props.customComponents})}onMoveUp(e){let t=JSON.parse(JSON.stringify(this.state.value)),n=t[e];t.splice(e,1),t.splice(e-1,0,n);let r=this.state.activeIndex-1;this.setState({value:t,activeIndex:r,iteration:this.state.iteration+1e4},()=>this.onChangeWrapper(t))}onMoveDown(e){let t=JSON.parse(JSON.stringify(this.state.value)),n=t[e];t.splice(e,1),t.splice(e+1,0,n);let r=this.state.activeIndex+1;this.setState({value:t,activeIndex:r,iteration:this.state.iteration+1e4},()=>this.onChangeWrapper(t))}renderItem(){let{schema:e}=this.props,{value:t}=this.state;return t?_.createElement(ln,null,e.label||!e.noDelete?_.createElement(Ce,{variant:`dense`},e.label?_.createElement(be,{variant:`h6`,id:`tableTitle`,component:`div`},this.getText(e.label)):null,e.noDelete?null:_.createElement(_.Fragment,null,_.createElement(Ln,{title:K.t(`jc_Export configuration section`)},_.createElement(ur,{size:`small`,color:`primary`,onClick:this.onExport},_.createElement(lt,null))),_.createElement(Ln,{title:K.t(`jc_Import and replace configuration section`)},_.createElement(ur,{size:`small`,color:`primary`,onClick:()=>this.onImport(!0)},_.createElement(ue,null))),_.createElement(Ln,{title:K.t(`jc_Import and add configuration section`)},_.createElement(ur,{size:`small`,color:`primary`,onClick:()=>this.onImport(!1)},_.createElement(k,null))),_.createElement(ur,{size:`small`,color:`primary`,onClick:this.onAdd},_.createElement(Re,null)))):null,t.map((n,r)=>_.createElement(Pe,{key:`${n}_${r}`,expanded:this.state.activeIndex===r,onChange:(e,t)=>this.setState({activeIndex:t?r:-1})},_.createElement(Zn,{expandIcon:_.createElement(ot,null),sx:$t.getStyle(this.props.oContext.theme,As.fullWidth,As.accordionSummary)},_.createElement(ht,{sx:{display:`flex`,alignItems:`center`,gap:1,width:`100%`}},e.titleAttr&&_.createElement(be,{style:As.accordionTitle},n[e.titleAttr]),this.hasAccordionErrors(r)&&_.createElement(N,{sx:{fontSize:20,color:`error.main`}}))),_.createElement(zn,{style:{...e.style,...this.props.oContext.themeType?e.darkStyle:void 0}},this.itemAccordion(t[r],r),_.createElement(Ce,{sx:As.toolbar},r?_.createElement(Ln,{title:K.t(`jc_Move up`),slotProps:{popper:{sx:As.tooltip}}},_.createElement(ur,{size:`small`,onClick:()=>this.onMoveUp(r)},_.createElement($n,null))):_.createElement(`div`,{style:As.buttonEmpty}),r<t.length-1?_.createElement(Ln,{title:K.t(`jc_Move down`),slotProps:{popper:{sx:As.tooltip}}},_.createElement(ur,{size:`small`,onClick:()=>this.onMoveDown(r)},_.createElement(An,null))):_.createElement(`div`,{style:As.buttonEmpty}),e.noDelete?null:_.createElement(Ln,{title:K.t(`jc_Delete current row`),slotProps:{popper:{sx:As.tooltip}}},_.createElement(ur,{size:`small`,onClick:this.onDelete(r)},_.createElement(we,null))),e.clone?_.createElement(Ln,{title:K.t(`jc_Clone current row`),slotProps:{popper:{sx:As.tooltip}}},_.createElement(ur,{size:`small`,onClick:this.onClone(r)},_.createElement(he,null))):null)))),!e.noDelete&&t.length>0?_.createElement(Ce,{variant:`dense`,sx:As.rootTool},_.createElement(ur,{size:`small`,color:`primary`,onClick:this.onAdd},_.createElement(Re,null))):null,e.help?_.createElement(en,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null):null}};g();var Ms={root:{width:`100%`},notAlive:{color:`#a30000`}},Ns=class extends X{constructor(...e){super(...e),q(this,`aliveId`,null),q(this,`checkTimeout`,null),q(this,`onAliveChanged`,(e,t)=>{e===this.aliveId&&this.state.alive!==!!(t!=null&&t.val)&&this.setState({alive:!!(t!=null&&t.val)})})}async componentDidMount(){await super.componentDidMount();let e=await this.getInstance();this.aliveId=`${e}.alive`;let t=await this.props.oContext.socket.getState(this.aliveId);this.setState({alive:!!(t!=null&&t.val),instance:e},async()=>{this.aliveId&&await this.props.oContext.socket.subscribeState(this.aliveId,this.onAliveChanged)})}componentWillUnmount(){this.checkTimeout&&=(clearTimeout(this.checkTimeout),null),this.aliveId&&this.props.oContext.socket.unsubscribeState(this.aliveId,this.onAliveChanged)}async getInstance(){let e=this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`;return e.includes("${")&&(e=await this.getPatternAsync(e,null,!0)),e&&!e.startsWith(`system.adapter.`)&&(e=`system.adapter.${e}`),e}checkIfInstanceChanged(){this.checkTimeout&&clearTimeout(this.checkTimeout),this.checkTimeout=setTimeout(async()=>{this.checkTimeout=null;let e=await this.getInstance();e!==this.state.instance&&(e?this.props.oContext.socket.getState(`${e}.alive`).then(t=>this.setState({alive:!!(t&&t.val),instance:e})):this.setState({alive:null,instance:e}))},200)}renderItem(){var e;if(this.checkIfInstanceChanged(),this.state.alive!==!1&&this.state.alive!==!0)return null;let t=(e=this.state.instance)==null?void 0:e.replace(/^system\.adapter\./,``);return _.createElement(`div`,{style:{...Ms.root,...this.state.alive?void 0:Ms.notAlive}},this.state.alive?this.props.schema.textAlive===void 0?K.t(`jc_Instance %s is alive`,t):this.props.schema.textAlive?K.t(this.props.schema.textAlive,t):``:this.props.schema.textNotAlive===void 0?K.t(`jc_Instance %s is not alive`,t):this.props.schema.textNotAlive?K.t(this.props.schema.textNotAlive,t):``)}};g();var Ps=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr),t=this.props.schema.options.map(e=>typeof e==`string`?{label:e,value:e}:JSON.parse(JSON.stringify(e)));if(this.props.onFilterLabelUpdate&&this.props.table&&this.props.attr){let e={};for(let n of t)n.value!==X.DIFFERENT_VALUE&&(e[n.value]=this.getText(n.label));this.props.onFilterLabelUpdate(this.props.attr,e)}Array.isArray(e)?(t.unshift({label:K.t(X.DIFFERENT_LABEL),value:X.DIFFERENT_VALUE}),this.setState({value:X.DIFFERENT_VALUE,selectOptions:t})):this.setState({value:e,selectOptions:t})}renderItem(e,t){if(!this.state.selectOptions)return null;let n,r=JSON.parse(JSON.stringify(this.state.selectOptions));return Array.isArray(this.state.value)||this.state.value===X.DIFFERENT_VALUE?([...this.state.value].filter(e=>!r.find(t=>typeof t==`object`?t.value===e:t===e)).forEach(e=>r.push({label:e.toString(),value:e})),n={label:K.t(X.DIFFERENT_LABEL),value:X.DIFFERENT_VALUE},r.unshift(n)):(n=this.state.value!==null&&this.state.value!==void 0&&r.find(e=>typeof e==`object`?e.value==this.state.value:e==this.state.value),this.state.value!==null&&this.state.value!==void 0&&!n&&this.props.schema.freeSolo&&(n={value:this.state.value,label:this.state.value},r.push(n)),n||=null),_.createElement(A,{fullWidth:!0,freeSolo:!!this.props.schema.freeSolo,value:n,options:r,isOptionEqualToValue:(e,t)=>e.value===(typeof t==`string`?t:t.value),filterOptions:(e,t)=>{let n=t.inputValue.toLowerCase(),r=e.filter(e=>t.inputValue===``||this.getText(e.label??``).toLowerCase().includes(n)||String(e.value??``).toLowerCase().includes(n));return this.props.schema.freeSolo&&t.inputValue!==``&&r.push({label:t.inputValue,value:t.inputValue}),r},onInputChange:e=>{if(!e||!this.props.schema.freeSolo)return;let t=e.target.value;t!==this.state.value&&this.setState({value:t},()=>this.props.attr&&this.onChange(this.props.attr,t))},onChange:(e,t)=>{let n=typeof t==`object`?t?t.value:``:t;n!==this.state.value&&this.setState({value:n},()=>this.props.attr&&this.onChange(this.props.attr,n))},getOptionLabel:e=>typeof e==`object`?this.getText((e==null?void 0:e.label)??``):``,renderInput:n=>_.createElement(ft,{variant:`standard`,...n,error:!!e,placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation),disabled:t})})}};g();var Fs=class extends X{constructor(...e){super(...e),q(this,`initialized`,!1),q(this,`localContext`,void 0)}async askInstance(){let e=X.getValue(this.props.data,this.props.attr),t=this.props.schema.options?this.props.schema.options.map(e=>typeof e==`string`?{label:e,value:e}:JSON.parse(JSON.stringify(e))):[];if(this.props.alive){let n=this.props.schema.data;if(n===void 0&&this.props.schema.jsonData){let e=await this.getPatternAsync(this.props.schema.jsonData,null,!0);try{typeof e==`string`&&(n=JSON.parse(e))}catch{console.error(`Cannot parse json data: ${JSON.stringify(n)}`)}}n===void 0&&(n=null),this.setState({loading:!0});let r=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(r!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){let e=await this.props.oContext.socket.getState(`system.adapter.${r}.alive`);if(!(e!=null&&e.val)){window.alert(K.t(`jc_Instance %s is not alive`,r));return}}this.props.oContext.socket.sendTo(r,this.props.schema.command||`send`,n).then(n=>{n&&Array.isArray(n)&&n.forEach(e=>t.push(typeof e==`string`?{label:e,value:e}:JSON.parse(JSON.stringify(e)))),this.reportFilterLabels(t),Array.isArray(e)?(t.unshift({label:K.t(X.DIFFERENT_LABEL),value:X.DIFFERENT_VALUE}),this.setState({value:X.DIFFERENT_VALUE,selectOptions:t,loading:!1})):this.setState({value:e,selectOptions:t,loading:!1})}).catch(e=>{console.error(`Error in autocompleteSendTo:`,e),this.setState({loading:!1})})}else Array.isArray(e)?(t.unshift({label:K.t(X.DIFFERENT_LABEL),value:X.DIFFERENT_VALUE}),this.reportFilterLabels(t),this.setState({value:X.DIFFERENT_VALUE,selectOptions:t})):(this.reportFilterLabels(t),this.setState({value:e,selectOptions:t}))}reportFilterLabels(e){if(this.props.onFilterLabelUpdate&&this.props.table&&this.props.attr){let t={};for(let n of e)n.value!==X.DIFFERENT_VALUE&&(t[n.value]=n.label);this.props.onFilterLabelUpdate(this.props.attr,t)}}getContext(){let e={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(t=>e[t]=X.getValue(this.props.data,t)),JSON.stringify(e)}renderItem(e,t){if(this.props.alive){let e=this.getContext();(e!==this.localContext||!this.initialized)&&(this.localContext=e,setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}let n,r=this.state.selectOptions?JSON.parse(JSON.stringify(this.state.selectOptions)):[];return Array.isArray(this.state.value)||this.state.value===X.DIFFERENT_LABEL?([...this.state.value].filter(e=>!r.find(t=>t.value===e)).forEach(e=>r.push({label:e.toString(),value:e})),n={label:K.t(X.DIFFERENT_LABEL),value:X.DIFFERENT_VALUE},r.unshift(n)):(n=this.state.value!==null&&this.state.value!==void 0&&r.find(e=>e.value==this.state.value),this.state.value!==null&&this.state.value!==void 0&&!n&&this.props.schema.freeSolo&&(n={value:this.state.value,label:this.state.value},r.push(n)),n||=null),r.length?_.createElement(A,{value:n,fullWidth:!0,freeSolo:!!this.props.schema.freeSolo,options:r,disabled:t,isOptionEqualToValue:(e,t)=>e.value===(typeof t==`string`?t:t.value),filterOptions:(e,t)=>{let n=t.inputValue.toLowerCase(),r=e.filter(e=>t.inputValue===``||String(e.label??``).toLowerCase().includes(n)||String(e.value??``).toLowerCase().includes(n));return this.props.schema.freeSolo&&t.inputValue!==``&&r.push({label:t.inputValue,value:t.inputValue}),r},getOptionLabel:e=>this.getText(typeof e==`object`?(e==null?void 0:e.label)??``:e),onInputChange:e=>{if(!e||!this.props.schema.freeSolo)return;let t=e.target.value;t!==this.state.value&&this.setState({value:t},()=>this.props.attr&&this.onChange(this.props.attr,t))},onChange:(e,t)=>{let n=typeof t==`object`?t?t.value:``:t;n!==this.state.value&&this.setState({value:n},()=>this.props.attr&&this.onChange(this.props.attr,n))},renderInput:n=>_.createElement(ft,{variant:`standard`,...n,error:!!e,placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation),disabled:t,slotProps:{input:{...n.slotProps.input,endAdornment:_.createElement(_.Fragment,null,this.state.loading?_.createElement(sr,{position:`end`},_.createElement(wn,{size:20})):null,t?null:n.slotProps.input.endAdornment)}}})}):_.createElement(ft,{variant:`standard`,fullWidth:!0,value:this.state.value??``,error:!!e,disabled:t,slotProps:{htmlInput:{maxLength:this.props.schema.maxLength||this.props.schema.max||void 0},input:{endAdornment:this.state.loading?_.createElement(sr,{position:`end`},_.createElement(wn,{size:20})):null}},onChange:e=>{let t=e.target.value;this.setState({value:t},()=>this.props.attr&&this.onChange(this.props.attr,(t||``).trim()))},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}};g();var Is={fullWidth:{width:`100%`},flex:{display:`flex`},button:{height:48,marginLeft:4,minWidth:48}},Ls=class extends X{async componentDidMount(){await super.componentDidMount();let{data:e,attr:t}=this.props,n=X.getValue(e,t)||``;this.setState({value:n,showDialog:!1})}renderItem(e,t){let{schema:n,attr:r}=this.props,{value:i,showDialog:a}=this.state;return _.createElement(Mn,{style:Is.fullWidth,variant:`standard`},n.label?_.createElement(Ze,{shrink:!0},this.getText(n.label)):null,_.createElement(`div`,{style:Is.flex},_.createElement(ft,{variant:`standard`,fullWidth:!0,value:i??``,error:!!e,disabled:t,placeholder:this.getText(n.placeholder),label:this.getText(n.label),helperText:this.renderHelp(n.help,n.helpLink,n.noTranslation),onChange:e=>{let t=e.target.value;this.setState({value:t},()=>this.onChange(r,t))}}),_.createElement(Ge,{color:`grey`,disabled:t,style:Is.button,size:`small`,variant:`outlined`,onClick:()=>this.setState({showDialog:!0})},`...`)),a?_.createElement(Rn,{title:K.t(`jc_Define schedule`),simple:n.simple,complex:n.complex,cron:i,onClose:()=>this.setState({showDialog:!1}),cancel:K.t(`jc_Cancel`),ok:K.t(`jc_Ok`),theme:this.props.oContext.theme,onOk:e=>this.setState({showDialog:!1,value:e},()=>this.onChange(r,e))}):null)}};g();var Rs=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr),t=(await this.props.oContext.socket.getCertificates()).filter(e=>{let t=this.props.attr.toLowerCase();return t.includes(e.type)||e.type===`public`&&t.includes(`cert`)||e.type===`private`&&(t.includes(`priv`)||t.includes(`key`))?!0:!!(e.type===`chained`&&(t.includes(`chain`)||t.includes(`ca`)))}).map(e=>({label:e.name,value:e.name}));t.unshift({label:K.t(X.NONE_LABEL),value:X.NONE_VALUE}),this.setState({value:e,selectOptions:t})}renderItem(e,t){var n,r;if(!this.state.selectOptions)return null;let i=(n=this.state.selectOptions)==null?void 0:n.find(e=>e.value===this.state.value);return _.createElement(Mn,{style:{width:`100%`},variant:`standard`},this.props.schema.label?_.createElement(Ze,{shrink:!0},this.getText(this.props.schema.label)):null,_.createElement(Be,{variant:`standard`,error:!!e,displayEmpty:!0,disabled:!!t,value:this.state.value,renderValue:()=>this.getText(i==null?void 0:i.label,this.props.schema.noTranslation!==!1),onChange:e=>this.setState({value:e.target.value},()=>this.onChange(this.props.attr,this.state.value))},(r=this.state.selectOptions)==null?void 0:r.map(e=>_.createElement(Ie,{key:e.value,value:e.value,style:e.value===X.NONE_VALUE?{opacity:.5}:{}},this.getText(e.label,this.props.schema.noTranslation!==!1)))),this.props.schema.help?_.createElement(en,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var zs={fullWidth:{width:`100%`},leWidth:{width:620,marginBottom:10},certWidth:{width:200,marginRight:10}},Bs=class extends X{async componentDidMount(){var e;await super.componentDidMount();let t=await this.props.oContext.socket.getCertificates(),n=[],r=[],i=[],a,o=await this.getCachedObject(`system.certificates`);a=o!=null&&(e=o.native)!=null&&e.collections?Object.keys(o.native.collections):null,t.forEach(e=>{e.type===`public`?n.push({label:e.name,value:e.name}):e.type===`private`?r.push({label:e.name,value:e.name}):e.type===`chained`?i.push({label:e.name,value:e.name}):(n.push({label:e.name,value:e.name}),r.push({label:e.name,value:e.name}),i.push({label:e.name,value:e.name}))}),n.unshift({label:K.t(X.NONE_LABEL),value:X.NONE_VALUE}),r.unshift({label:K.t(X.NONE_LABEL),value:X.NONE_VALUE}),i.unshift({label:K.t(X.NONE_LABEL),value:X.NONE_VALUE}),this.setState({certsPublicOptions:n,certsChainOptions:i,certsPrivateOptions:r,collectionsOptions:a})}renderItem(e,t){var n,r,i,a,o,s,c;if(!this.state.certsPublicOptions||!this.state.certsPrivateOptions||!this.state.certsChainOptions)return null;let l=(X.getValue(this.props.data,this.props.schema.leCollectionName||`leCollection`)||`false`).toString(),u=X.getValue(this.props.data,this.props.schema.certPublicName||`certPublic`),d=X.getValue(this.props.data,this.props.schema.certPrivateName||`certPrivate`),f=X.getValue(this.props.data,this.props.schema.certChainedName||`certChained`),p=(n=this.state.certsPublicOptions)==null?void 0:n.find(e=>e.value===u),m=(r=this.state.certsPrivateOptions)==null?void 0:r.find(e=>e.value===d),h=(i=this.state.certsChainOptions)==null?void 0:i.find(e=>e.value===f);return _.createElement(`div`,{style:zs.fullWidth},this.state.collectionsOptions?_.createElement(Mn,{style:zs.leWidth,variant:`standard`},_.createElement(Ze,{shrink:!0},`Let's encrypt`),_.createElement(Be,{variant:`standard`,error:!!e,displayEmpty:!0,disabled:!!t,value:l,onChange:e=>this.onChange(this.props.schema.leCollectionName||`leCollection`,e.target.value===`false`?!1:e.target.value===`true`||e.target.value)},_.createElement(Ie,{key:`_false`,value:`false`,style:{fontWeight:`bold`}},K.t(`jc_Do not use let's encrypt`)),_.createElement(Ie,{key:`_true`,value:`true`,style:{fontWeight:`bold`}},K.t(`jc_Use all available let's encrypt certificates`)),(a=this.state.collectionsOptions)==null?void 0:a.map(e=>_.createElement(Ie,{key:e,value:e},e)))):null,this.state.collectionsOptions?_.createElement(`br`,null):null,this.state.collectionsOptions&&l!==`false`?_.createElement(`div`,null,K.t(`jc_Fallback custom certificates`)):null,_.createElement(Mn,{style:zs.certWidth,variant:`standard`},_.createElement(Ze,{shrink:!0},K.t(`jc_Public certificate`)),_.createElement(Be,{variant:`standard`,error:!!e,displayEmpty:!0,disabled:!!t,value:u||``,renderValue:()=>this.getText(p==null?void 0:p.label,!0),onChange:e=>this.onChange(this.props.schema.certPublicName||`certPublic`,e.target.value)},(o=this.state.certsPublicOptions)==null?void 0:o.map((e,t)=>_.createElement(Ie,{key:`${e.value}_${t}`,value:e.value,style:e.value===X.NONE_VALUE?{opacity:.5}:{}},this.getText(e.label,!0))))),_.createElement(Mn,{style:zs.certWidth,variant:`standard`},_.createElement(Ze,{shrink:!0},K.t(`jc_Private certificate`)),_.createElement(Be,{variant:`standard`,error:!!e,displayEmpty:!0,disabled:!!t,value:d||``,renderValue:()=>this.getText(m==null?void 0:m.label,!0),onChange:e=>this.onChange(this.props.schema.certPrivateName||`certPrivate`,e.target.value)},(s=this.state.certsPrivateOptions)==null?void 0:s.map((e,t)=>_.createElement(Ie,{key:`${e.value}_${t}`,value:e.value,style:e.value===X.NONE_VALUE?{opacity:.5}:{}},this.getText(e.label,!0))))),_.createElement(Mn,{style:zs.certWidth,variant:`standard`},_.createElement(Ze,{shrink:!0},K.t(`jc_Chained certificate`)),_.createElement(Be,{variant:`standard`,error:!!e,displayEmpty:!0,disabled:!!t,value:f||``,renderValue:()=>this.getText(h==null?void 0:h.label,!0),onChange:e=>this.onChange(this.props.schema.certChainedName||`certChained`,e.target.value)},(c=this.state.certsChainOptions)==null?void 0:c.map((e,t)=>_.createElement(Ie,{key:`${e.value}_${t}`,value:e.value,style:e.value===X.NONE_VALUE?{opacity:.5}:{}},this.getText(e.label,!0))))))}};g();var Vs=class extends X{async componentDidMount(){var e;await super.componentDidMount();let t,n=await this.getCachedObject(`system.certificates`);t=n!=null&&(e=n.native)!=null&&e.collections?Object.keys(n.native.collections):[],this.setState({collectionsOptions:t})}renderItem(e,t){var n;if(!this.state.collectionsOptions)return null;let r=(X.getValue(this.props.data,this.props.schema.leCollectionName||`leCollection`)||`false`).toString();return _.createElement(Mn,{style:{width:`100%`},variant:`standard`},this.props.schema.label?_.createElement(Ze,{shrink:!0},this.getText(this.props.schema.label)):null,_.createElement(Be,{variant:`standard`,error:!!e,displayEmpty:!0,disabled:!!t,value:r,onChange:e=>this.onChange(this.props.schema.leCollectionName||`leCollection`,e.target.value===`false`?!1:e.target.value===`true`||e.target.value)},_.createElement(Ie,{key:`_false`,value:`false`,style:{fontWeight:`bold`}},K.t(`jc_Do not use let's encrypt`)),_.createElement(Ie,{key:`_true`,value:`true`,style:{fontWeight:`bold`}},K.t(`jc_Use all available let's encrypt certificates`)),(n=this.state.collectionsOptions)==null?void 0:n.map(e=>_.createElement(Ie,{key:e,value:e},e))),this.props.schema.help?_.createElement(en,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var Hs=class extends X{async componentDidMount(){await super.componentDidMount();let e=await this.props.oContext.socket.getCurrentInstance();this.setState({requesting:!0},async()=>{let t=await this.props.oContext.socket.sendTo(e,`checkDocker`,null);this.setState({requesting:!1,version:(t==null?void 0:t.version)||``,errorDocker:t?t.daemonRunning?``:K.t(`jc_Docker is not installed or not running`):K.t(`jc_No response from admin`)})})}renderItem(e,t){let n=X.getValue(this.props.data,this.props.attr);return this.state.requesting?_.createElement(wn,null):this.state.errorDocker&&!n?_.createElement(en,{style:{color:`orange`}},K.t(`jc_Docker is not available`),`:\xA0`,K.t(`jc_${this.state.errorDocker}`).replace(/^jc_/,``)):_.createElement(Mn,{style:{width:`100%`},variant:`standard`},_.createElement(bn,{onClick:e=>{if(e.preventDefault(),e.stopPropagation(),!t&&this.props.attr){let e=this.onChange(this.props.attr,!n);e instanceof Promise&&e.catch(e=>console.error(`Cannot set value: ${e}`))}},control:_.createElement(Ht,{checked:!!n,onChange:e=>{this.props.attr&&this.onChange(this.props.attr,e.target.checked)},disabled:t||!!this.state.errorDocker&&!n}),label:this.getText(this.props.schema.label)}),this.props.schema.hideVersion?null:_.createElement(en,null,this.state.errorDocker?this.state.errorDocker:this.state.version),this.props.schema.help?_.createElement(en,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var Us=`system.credentials.`,Ws=1,Gs=[`email`,`cloud`,`ai`,`aws`,`azure`,`custom`],Ks={email:`E-mail`,cloud:`Cloud`,ai:`AI`,aws:`AWS`,azure:`Azure`,custom:`Custom`},qs={login:[{name:`login`,type:`text`,required:!0,label:`Login`},{name:`password`,type:`password`,encrypted:!0,required:!0,label:`Password`}],key:[{name:`key`,type:`password`,encrypted:!0,required:!0,label:`Key`}],aws:[{name:`accessKeyId`,type:`text`,required:!0,label:`Access Key ID`},{name:`secretAccessKey`,type:`password`,encrypted:!0,required:!0,label:`Secret Access Key`},{name:`region`,type:`select`,required:!0,label:`Region`,options:[{value:`us-east-1`,label:`us-east-1 (US East, N. Virginia)`},{value:`us-east-2`,label:`us-east-2 (US East, Ohio)`},{value:`us-west-1`,label:`us-west-1 (US West, N. California)`},{value:`us-west-2`,label:`us-west-2 (US West, Oregon)`},{value:`ca-central-1`,label:`ca-central-1 (Canada Central)`},{value:`sa-east-1`,label:`sa-east-1 (South America, São Paulo)`},{value:`eu-west-1`,label:`eu-west-1 (Europe, Ireland)`},{value:`eu-west-2`,label:`eu-west-2 (Europe, London)`},{value:`eu-west-3`,label:`eu-west-3 (Europe, Paris)`},{value:`eu-central-1`,label:`eu-central-1 (Europe, Frankfurt)`},{value:`eu-central-2`,label:`eu-central-2 (Europe, Zurich)`},{value:`eu-north-1`,label:`eu-north-1 (Europe, Stockholm)`},{value:`eu-south-1`,label:`eu-south-1 (Europe, Milan)`},{value:`eu-south-2`,label:`eu-south-2 (Europe, Spain)`},{value:`ap-south-1`,label:`ap-south-1 (Asia Pacific, Mumbai)`},{value:`ap-northeast-1`,label:`ap-northeast-1 (Asia Pacific, Tokyo)`},{value:`ap-northeast-2`,label:`ap-northeast-2 (Asia Pacific, Seoul)`},{value:`ap-northeast-3`,label:`ap-northeast-3 (Asia Pacific, Osaka)`},{value:`ap-southeast-1`,label:`ap-southeast-1 (Asia Pacific, Singapore)`},{value:`ap-southeast-2`,label:`ap-southeast-2 (Asia Pacific, Sydney)`},{value:`me-central-1`,label:`me-central-1 (Middle East, UAE)`},{value:`me-south-1`,label:`me-south-1 (Middle East, Bahrain)`},{value:`af-south-1`,label:`af-south-1 (Africa, Cape Town)`}]}],azure:[{name:`subscriptionKey`,type:`password`,encrypted:!0,required:!0,label:`Subscription Key`},{name:`region`,type:`select`,required:!0,label:`Region`,options:[{value:`eastus`,label:`eastus (East US)`},{value:`eastus2`,label:`eastus2 (East US 2)`},{value:`centralus`,label:`centralus (Central US)`},{value:`northcentralus`,label:`northcentralus (North Central US)`},{value:`southcentralus`,label:`southcentralus (South Central US)`},{value:`westus`,label:`westus (West US)`},{value:`westus2`,label:`westus2 (West US 2)`},{value:`westus3`,label:`westus3 (West US 3)`},{value:`canadacentral`,label:`canadacentral (Canada Central)`},{value:`brazilsouth`,label:`brazilsouth (Brazil South)`},{value:`northeurope`,label:`northeurope (North Europe)`},{value:`westeurope`,label:`westeurope (West Europe)`},{value:`francecentral`,label:`francecentral (France Central)`},{value:`germanywestcentral`,label:`germanywestcentral (Germany West Central)`},{value:`norwayeast`,label:`norwayeast (Norway East)`},{value:`swedencentral`,label:`swedencentral (Sweden Central)`},{value:`switzerlandnorth`,label:`switzerlandnorth (Switzerland North)`},{value:`uksouth`,label:`uksouth (UK South)`},{value:`ukwest`,label:`ukwest (UK West)`},{value:`uaenorth`,label:`uaenorth (UAE North)`},{value:`southafricanorth`,label:`southafricanorth (South Africa North)`},{value:`centralindia`,label:`centralindia (Central India)`},{value:`eastasia`,label:`eastasia (East Asia)`},{value:`southeastasia`,label:`southeastasia (Southeast Asia)`},{value:`japaneast`,label:`japaneast (Japan East)`},{value:`koreacentral`,label:`koreacentral (Korea Central)`},{value:`australiaeast`,label:`australiaeast (Australia East)`}]}]},Js={anthropic:`M17.3041 3.541h-3.6718l6.696 16.918H24Zm-10.6082 0L0 20.459h3.7442l1.3693-3.5527h7.0052l1.3693 3.5527h3.7442L10.5363 3.541Zm-.3712 10.2232 2.2914-5.9456 2.2914 5.9456Z`,chatgpt:`M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.073zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.8956zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654 2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z`,gemini:`M11.04 19.32Q12 21.51 12 24q0-2.49.93-4.68.96-2.19 2.58-3.81t3.81-2.55Q21.51 12 24 12q-2.49 0-4.68-.93a12.3 12.3 0 0 1-3.81-2.58 12.3 12.3 0 0 1-2.58-3.81Q12 2.49 12 0q0 2.49-.96 4.68-.93 2.19-2.55 3.81a12.3 12.3 0 0 1-3.81 2.58Q2.49 12 0 12q2.49 0 4.68.96 2.19.93 3.81 2.55t2.55 3.81`,email:`M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4-8 5-8-5V6l8 5 8-5v2z`,login:`M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z`,key:`M21 10h-8.35A5.99 5.99 0 0 0 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6a5.99 5.99 0 0 0 5.65-4H13l2 2 2-2 2 2 4-4.04L21 10zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3z`,aws:`M6.763 10.036c0 .296.032.535.088.71.064.176.144.368.256.576.04.063.056.127.056.183 0 .08-.048.16-.152.24l-.503.335a.383.383 0 0 1-.208.072c-.08 0-.16-.04-.239-.112a2.47 2.47 0 0 1-.287-.375 6.18 6.18 0 0 1-.248-.471c-.622.734-1.405 1.101-2.347 1.101-.67 0-1.205-.191-1.596-.574-.391-.384-.59-.894-.59-1.533 0-.678.239-1.23.726-1.644.487-.415 1.133-.623 1.955-.623.272 0 .551.024.846.064.296.04.6.104.918.176v-.583c0-.607-.127-1.03-.375-1.277-.255-.248-.686-.367-1.3-.367-.28 0-.568.031-.863.103-.295.072-.583.16-.862.272a2.287 2.287 0 0 1-.28.104.488.488 0 0 1-.127.023c-.112 0-.168-.08-.168-.247v-.391c0-.128.016-.224.056-.28a.597.597 0 0 1 .224-.167c.279-.144.614-.264 1.005-.36a4.84 4.84 0 0 1 1.246-.151c.95 0 1.644.216 2.091.647.439.43.662 1.085.662 1.963v2.586zm-3.24 1.214c.263 0 .534-.048.822-.144.287-.096.543-.271.758-.51.128-.152.224-.32.272-.512.047-.191.08-.423.08-.694v-.335a6.66 6.66 0 0 0-.735-.136 6.02 6.02 0 0 0-.75-.048c-.535 0-.926.104-1.19.32-.263.215-.39.518-.39.917 0 .375.095.655.295.846.191.2.47.296.838.296zm6.41.862c-.144 0-.24-.024-.304-.08-.064-.048-.12-.16-.168-.311L7.586 5.55a1.398 1.398 0 0 1-.072-.32c0-.128.064-.2.191-.2h.783c.151 0 .255.025.31.08.065.048.113.16.16.312l1.342 5.284 1.245-5.284c.04-.16.088-.264.151-.312a.549.549 0 0 1 .32-.08h.638c.152 0 .256.025.32.08.063.048.12.16.151.312l1.261 5.348 1.381-5.348c.048-.16.104-.264.16-.312a.52.52 0 0 1 .311-.08h.743c.127 0 .2.065.2.2 0 .04-.009.08-.017.128a1.137 1.137 0 0 1-.056.2l-1.923 6.17c-.048.16-.104.263-.168.311a.51.51 0 0 1-.303.08h-.687c-.151 0-.255-.024-.32-.08-.063-.056-.119-.16-.15-.32l-1.238-5.148-1.23 5.14c-.04.16-.087.264-.15.32-.065.056-.177.08-.32.08zm10.256.215c-.415 0-.83-.048-1.229-.143-.399-.096-.71-.2-.918-.32-.128-.071-.215-.151-.247-.223a.563.563 0 0 1-.048-.224v-.407c0-.167.064-.247.183-.247.048 0 .096.008.144.024.048.016.12.048.2.08.271.12.566.215.878.279.319.064.63.096.95.096.502 0 .894-.088 1.165-.264a.86.86 0 0 0 .415-.758.777.777 0 0 0-.215-.559c-.144-.151-.416-.287-.807-.415l-1.157-.36c-.583-.183-1.014-.454-1.277-.813a1.902 1.902 0 0 1-.4-1.158c0-.335.073-.63.216-.886.144-.255.335-.479.575-.654.24-.184.51-.32.83-.415.32-.096.655-.136 1.006-.136.175 0 .359.008.535.032.183.024.35.056.518.088.16.04.312.08.455.127.144.048.256.096.336.144a.69.69 0 0 1 .24.2.43.43 0 0 1 .071.263v.375c0 .168-.064.256-.184.256a.83.83 0 0 1-.303-.096 3.652 3.652 0 0 0-1.532-.311c-.455 0-.815.071-1.062.223-.248.152-.375.383-.375.71 0 .224.08.416.24.567.159.152.454.304.877.44l1.134.358c.574.184.99.44 1.237.767.247.327.367.702.367 1.117 0 .343-.072.655-.207.926-.144.272-.336.511-.583.703-.248.2-.543.343-.886.447-.36.111-.734.167-1.142.167zM21.698 16.207c-2.626 1.94-6.442 2.969-9.722 2.969-4.598 0-8.74-1.7-11.87-4.526-.247-.223-.024-.527.272-.351 3.384 1.963 7.559 3.153 11.877 3.153 2.914 0 6.114-.607 9.06-1.852.439-.2.814.287.383.607zM22.792 14.961c-.336-.43-2.22-.207-3.074-.103-.255.032-.295-.192-.063-.36 1.5-1.053 3.967-.75 4.254-.399.287.36-.08 2.826-1.485 4.007-.215.184-.423.088-.327-.151.32-.79 1.03-2.57.695-2.994z`,azure:`M22.379 23.343a1.62 1.62 0 0 0 1.536-2.14v.002L17.35 1.76A1.62 1.62 0 0 0 15.816.657H8.184A1.62 1.62 0 0 0 6.65 1.76L.086 21.204a1.62 1.62 0 0 0 1.536 2.139h4.741a1.62 1.62 0 0 0 1.535-1.103l.977-2.892 4.947 3.675c.28.208.618.32.966.32m-3.084-12.531 3.624 10.739a.54.54 0 0 1-.51.713v-.001h-.03a.54.54 0 0 1-.322-.106l-9.287-6.9h4.853m6.313 7.006c.116-.326.13-.694.007-1.058L9.79 1.76a1.722 1.722 0 0 0-.007-.02h6.034a.54.54 0 0 1 .512.366l6.562 19.445a.54.54 0 0 1-.338.684`};function Ys(e,t){let n=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="${t}" d="${e}"/></svg>`;return`data:image/svg+xml;base64,${window.btoa(n)}`}var Xs={anthropic:Ys(Js.anthropic,`#d97757`),chatgpt:Ys(Js.chatgpt,`#74aa9c`),gemini:Ys(Js.gemini,`#8e75b2`),email:Ys(Js.email,`#2196f3`),login:Ys(Js.login,`#9e9e9e`),key:Ys(Js.key,`#ffc107`),aws:Ys(Js.aws,`#ff9900`),azure:Ys(Js.azure,`#0089d6`)},Zs={anthropic:{label:`Anthropic`,icon:Xs.anthropic,form:`key`,type:`ai`,name:`anthropic`},chatgpt:{label:`ChatGPT`,icon:Xs.chatgpt,form:`key`,type:`ai`,name:`chatgpt`},gemini:{label:`Google Gemini`,icon:Xs.gemini,form:`key`,type:`ai`,name:`gemini`},aws:{label:`AWS`,icon:Xs.aws,form:`aws`,type:`aws`,name:`aws`},azure:{label:`Azure`,icon:Xs.azure,form:`azure`,type:`azure`,name:`azure`},email:{label:`E-mail`,icon:Xs.email,form:`login`,type:`email`},login:{label:`Login & password`,icon:Xs.login,form:`login`,type:null},key:{label:`Key`,icon:Xs.key,form:`key`,type:null}};function Qs(e,t,n){return _.createElement(`span`,{style:{display:`flex`,alignItems:`center`,gap:8}},e!=null&&e.icon?_.createElement(Pt,{src:e.icon,style:{width:20,height:20}}):n?_.createElement(`span`,{style:{width:20,height:20,flexShrink:0}}):null,t)}var $s=class e extends X{async componentDidMount(){if(await super.componentDidMount(),!this.props.attr)throw Error(`Missing attribute attribute`);let e=X.getValue(this.props.data,this.props.attr),t=await this.readCredentials();this.setState({value:e,selectOptions:t})}async readCredentials(){let t=[];try{let n=await this.props.oContext.socket.getObjectViewSystem(`config`,Us,`${Us}香`);t=Object.values(n).filter(e=>{var t;return!!e&&(!this.props.schema.credentialType||((t=e.native)==null?void 0:t.type)===this.props.schema.credentialType)}).map(t=>{var n;return{label:e.getCredentialName(t),value:t._id,icon:typeof((n=t.common)==null?void 0:n.icon)==`string`?t.common.icon:void 0}}).sort((e,t)=>e.label.localeCompare(t.label))}catch(e){console.error(`Cannot read credentials: ${e}`)}return t.unshift({label:K.t(X.NONE_LABEL),value:X.NONE_VALUE}),t}static getCredentialName(e){var t;let n=(t=e.common)==null?void 0:t.name,r;return r=n&&typeof n==`object`?n[K.getLanguage()]||n.en||Object.values(n)[0]||``:n||``,r||e._id.substring(19)}templateKeys(){let e=this.props.schema.credentialType;return Object.keys(Zs).filter(t=>{let n=Zs[t];return!e||n.type===e||n.type===null})}selectTemplate(e){let t=Zs[e];this.setState({addTemplate:e,addName:t.name||``,addType:t.type||this.props.schema.credentialType||`custom`,addFields:{},addError:``})}openAddDialog(){let e=this.templateKeys()[0],t=Zs[e];this.setState({addOpen:!0,addTemplate:e,addName:t.name||``,addType:t.type||this.props.schema.credentialType||`custom`,addFields:{},addError:``,addSaving:!1})}async createCredential(){let e=Zs[this.state.addTemplate||``],t=(this.state.addName||``).trim().replace($t.FORBIDDEN_CHARS,`_`);if(!t){this.setState({addError:K.t(`jc_A unique name is required`)});return}let n=`${Us}${t}`;if((this.state.selectOptions||[]).find(e=>e.value===n)){this.setState({addError:K.t(`jc_A credential with this name already exists`)});return}let r=(e==null?void 0:e.form)||`login`,i=qs[r],a=this.state.addFields||{};if(i.some(e=>e.required&&!(a[e.name]||``).trim())){this.setState({addError:K.t(`jc_Please fill in all required fields`)});return}let o=(e==null?void 0:e.type)||this.props.schema.credentialType||this.state.addType||`custom`;this.setState({addSaving:!0,addError:``});try{let s=this.props.oContext.socket,c={type:o,form:r,version:Ws,encryptedFields:i.filter(e=>e.encrypted).map(e=>e.name)};for(let e of i){let t=a[e.name]||``;c[e.name]=e.encrypted&&t?await s.encrypt(t):t}let l={_id:n,type:`config`,common:{name:t,...e!=null&&e.icon?{icon:e.icon}:{}},native:c,acl:{object:1536,owner:`system.user.admin`,ownerGroup:`system.group.administrator`}};await s.setObject(n,l);let u=this.state.selectOptions||[],d=u.find(e=>e.value===X.NONE_VALUE),f=u.filter(e=>e.value!==X.NONE_VALUE);f.push({label:t,value:n,icon:e==null?void 0:e.icon}),f.sort((e,t)=>e.label.localeCompare(t.label));let p=d?[d,...f]:f;this.setState({addOpen:!1,addSaving:!1,selectOptions:p,value:n},()=>this.onChange(this.props.attr,n))}catch(e){this.setState({addSaving:!1,addError:K.t(`jc_Cannot create credential: %s`,e.toString())})}}renderAddDialog(){if(!this.state.addOpen)return null;let e=Zs[this.state.addTemplate||``],t=qs[(e==null?void 0:e.form)||`login`],n=`${Us}${(this.state.addName||``).trim().replace($t.FORBIDDEN_CHARS,`_`)}`,r=!this.props.schema.credentialType&&(e==null?void 0:e.type)===null;return _.createElement(Dt,{open:!0,maxWidth:`sm`,fullWidth:!0,onClose:()=>this.setState({addOpen:!1})},_.createElement(gn,null,K.t(`jc_Add credential`)),_.createElement(Un,{style:{display:`flex`,flexDirection:`column`,gap:12,paddingTop:8}},_.createElement(Mn,{fullWidth:!0,variant:`standard`},_.createElement(Ze,{shrink:!0},K.t(`jc_Template`)),_.createElement(Be,{variant:`standard`,value:this.state.addTemplate||``,onChange:e=>this.selectTemplate(e.target.value)},this.templateKeys().map(e=>_.createElement(Ie,{key:e,value:e},_.createElement(`span`,{style:{display:`flex`,alignItems:`center`,gap:8}},_.createElement(`img`,{src:Zs[e].icon,width:20,height:20,alt:``}),K.t(Zs[e].label)))))),r?_.createElement(Mn,{fullWidth:!0,variant:`standard`},_.createElement(Ze,{shrink:!0},K.t(`jc_Credential type`)),_.createElement(Be,{variant:`standard`,value:this.state.addType||`custom`,onChange:e=>this.setState({addType:e.target.value})},Gs.map(e=>_.createElement(Ie,{key:e,value:e},K.t(Ks[e]))))):null,_.createElement(ft,{variant:`standard`,fullWidth:!0,label:K.t(`jc_Name`),value:this.state.addName||``,error:!!this.state.addError,helperText:this.state.addName?n:``,slotProps:{inputLabel:{shrink:!0},htmlInput:{autoComplete:`off`}},onChange:e=>this.setState({addName:e.target.value,addError:``})}),t.map(e=>{var t;let n=((t=this.state.addFields)==null?void 0:t[e.name])||``;if(e.type===`select`){let t=e.options?[...e.options]:[];return n&&!t.find(e=>e.value===n)&&t.unshift({value:n}),_.createElement(ft,{key:e.name,select:!0,variant:`standard`,fullWidth:!0,required:e.required,label:K.t(e.label),value:n,slotProps:{inputLabel:{shrink:!0}},onChange:t=>this.setState({addFields:{...this.state.addFields||{},[e.name]:t.target.value},addError:``})},t.map(e=>_.createElement(Ie,{key:e.value,value:e.value},e.label||e.value)))}return _.createElement(ft,{key:e.name,variant:`standard`,fullWidth:!0,type:e.type===`password`?`password`:`text`,required:e.required,label:K.t(e.label),value:n,slotProps:{inputLabel:{shrink:!0},htmlInput:{autoComplete:e.type===`password`?`new-password`:`off`}},onChange:t=>this.setState({addFields:{...this.state.addFields||{},[e.name]:t.target.value},addError:``})})}),this.state.addError?_.createElement(er,{severity:`error`},this.state.addError):null),_.createElement(On,null,_.createElement(Ge,{variant:`contained`,color:`primary`,disabled:!!this.state.addSaving||!(this.state.addName||``).trim(),startIcon:_.createElement(Oe,null),onClick:()=>this.createCredential()},K.t(`jc_Create`)),_.createElement(Ge,{variant:`contained`,color:`grey`,disabled:!!this.state.addSaving,startIcon:_.createElement(je,null),onClick:()=>this.setState({addOpen:!1})},K.t(`jc_Cancel`))))}renderItem(e,t){var n,r;if(!this.state.selectOptions)return null;let i=(n=this.state.selectOptions)==null?void 0:n.find(e=>e.value===this.state.value),a=this.state.value&&this.state.value!==X.NONE_VALUE&&!i?this.state.value:null,o=this.state.selectOptions.some(e=>!!e.icon),s=!this.props.schema.disableCreation;return _.createElement(`div`,{style:{display:`flex`,alignItems:`flex-end`,gap:4,width:`100%`}},_.createElement(Mn,{style:{flex:1,minWidth:0},variant:`standard`},this.props.schema.label?_.createElement(Ze,{shrink:!0},this.getText(this.props.schema.label)):null,_.createElement(Be,{variant:`standard`,error:!!e||!!a,displayEmpty:!0,disabled:!!t,value:this.state.value||X.NONE_VALUE,renderValue:()=>a||Qs(i,this.getText(i==null?void 0:i.label,this.props.schema.noTranslation!==!1),o),onChange:e=>this.setState({value:e.target.value===X.NONE_VALUE?``:e.target.value},()=>this.onChange(this.props.attr,this.state.value))},(r=this.state.selectOptions)==null?void 0:r.map(e=>_.createElement(Ie,{key:e.value,value:e.value,style:e.value===X.NONE_VALUE?{opacity:.5}:{}},Qs(e,this.getText(e.label,this.props.schema.noTranslation!==!1),o)))),this.props.schema.help?_.createElement(en,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null),s?_.createElement(ur,{size:`small`,disabled:!!t,title:K.t(`jc_Add credential`),onClick:()=>this.openAddDialog()},_.createElement(Re,null)):null,this.renderAddDialog())}};g();var ec={fullWidth:{width:`100%`},icon:{width:24,height:24,marginRight:4},licLabel:{fontWeight:`bold`,minWidth:100,marginRight:10,textTransform:`capitalize`,display:`inline-block`},licValue:{fontWeight:`normal`},errorTitle:e=>({color:e.palette.mode===`dark`?`#e39191`:`#b62020`}),okTitle:e=>({color:e.palette.mode===`dark`?`#6fd56f`:`#007c00`}),errorText:e=>({color:e.palette.mode===`dark`?`#e39191`:`#b62020`,mb:`30px`})},tc=class e extends X{async componentDidMount(){await super.componentDidMount(),this.setState({_error:``,running:!1,showLicenseData:null,foundSuitableLicense:!1,licenseOfflineCheck:!1,result:null,allLicenses:null,askForUpdate:!1,showLinkToProfile:!1})}renderErrorDialog(){if(this.state._error&&!this.state.showLicenseData){let e=this.state._error;return this.state.allLicenses&&(e=[_.createElement(`div`,{key:`error`},e)],e.push(_.createElement(Ge,{key:`button`,variant:`contained`,onClick:()=>window.open(`https://iobroker.net/www/account/licenses`,`_blank`)},`iobroker.net`)),this.state.allLicenses.length?e.push(_.createElement(mr,{key:`table`},_.createElement(_e,{size:`small`},_.createElement(F,null,_.createElement(ct,null,_.createElement(Ye,null,K.t(`jc_Product`)),_.createElement(Ye,null,K.t(`jc_Version`)),_.createElement(Ye,null,`UUID`),_.createElement(Ye,null,K.t(`jc_ValidTill`)),_.createElement(Ye,null,K.t(`jc_Commercial`)),_.createElement(Ye,null,`ID`))),_.createElement(De,null,this.state.allLicenses.map(e=>_.createElement(ct,{key:e.id},_.createElement(Ye,{sx:e.validName?null:ec.errorText},e.license.product),_.createElement(Ye,{sx:e.validVersion?null:ec.errorText},e.license.version),_.createElement(Ye,{sx:e.validUuid?null:ec.errorText},e.license.uuid||`--`),_.createElement(Ye,{sx:e.validTill?null:ec.errorText},e.license.validTill&&e.license.validTill!==`0000-00-00 00:00:00`?new Date(e.license.validTill).toLocaleDateString():`--`),_.createElement(Ye,null,e.license.invoice===`free`?`-`:e.license.invoice===`MANUALLY_CREATED`?`✓`:e.license.invoice),_.createElement(Ye,null,e.id))))))):(e.push(_.createElement(`div`,{key:`text1`},K.t(`jc_No one license found in license manager`))),e.push(_.createElement(`div`,{key:`text2`},K.t(`jc_Please create license`))))),_.createElement(Dt,{open:!0,maxWidth:`xl`,fullWidth:this.props.fullWidth===void 0||this.props.fullWidth,onClick:()=>this.setState({_error:``,allLicenses:null})},_.createElement(gn,null,K.t(`jc_Error`)),_.createElement(Un,null,_.createElement(Ft,null,e)),_.createElement(On,null,_.createElement(Ge,{variant:`contained`,onClick:()=>this.setState({_error:``,allLicenses:null}),color:`primary`,autoFocus:!0,startIcon:_.createElement(Oe,null)},K.t(`jc_Ok`))))}return null}renderMessageDialog(){if(this.state.showLicenseData){let e=[],t=this.state.showLicenseData;return Object.keys(t).forEach(n=>{if(t[n]!==null&&t[n]!==void 0)if(typeof t[n]==`object`){let r=t[n];Object.keys(r).forEach(t=>{r[t]!==null&&r[t]!==void 0&&(typeof r[t]==`object`?e.push(_.createElement(`div`,{key:t},_.createElement(`div`,{style:ec.licLabel},t,`:`),JSON.stringify(r[t],null,2))):e.push(_.createElement(`div`,{key:t},_.createElement(`div`,{style:ec.licLabel},n,` -`,t,`:`),r[t].toString())))})}else e.push(_.createElement(`div`,{key:n},_.createElement(`div`,{style:ec.licLabel},n.replace(/_/g,` `),`:`),t[n].toString()))}),e.push(_.createElement(`div`,{key:`checked`},_.createElement(`div`,{style:ec.licLabel},K.t(`jc_Checked`),`:`),this.state.licenseOfflineCheck?K.t(`jc_locally`):K.t(`jc_via internet`))),_.createElement(Dt,{open:!0,onClose:()=>this.setState({showLicenseData:null})},_.createElement(gn,null,_.createElement(ht,{component:`span`,sx:this.state.result?ec.okTitle:ec.errorTitle},K.t(`jc_License %s`,this.state.result?`OK`:`INVALID`))),_.createElement(Un,null,this.state.showLinkToProfile?_.createElement(Ge,{variant:`contained`,onClick:()=>window.open(`https://iobroker.net/www/account/licenses`,`_blank`)},`https://iobroker.net`):null,this.state._error?_.createElement(ht,{component:`div`,sx:ec.errorText},this.state._error):null,e),_.createElement(On,null,_.createElement(Ge,{onClick:()=>this.setState({showLicenseData:null,_error:``}),color:`primary`,variant:`contained`},K.t(`jc_Close`))))}return null}static parseJwt(e){let t=e.split(`.`)[1].replace(/-/g,`+`).replace(/_/g,`/`),n=decodeURIComponent(atob(t).split(``).map(e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`).join(``));try{return JSON.parse(n)}catch{return null}}static isVersionValid(e,t,n,r){if(!t||!e)return!0;let[i]=e.split(`.`);return t.startsWith(`>=`)||t.startsWith(`<=`)?parseInt(t.substring(2,10)):t.startsWith(`>`)||t.startsWith(`<`)||t.startsWith(`=`)?parseInt(t.substring(1,10)):t.startsWith(`==`)?parseInt(t.substring(2,10)):t.startsWith(`===`)&&parseInt(t.substring(3,10)),!0}async findInLicenseManager(t){var n;let r=await this.getCachedObject(`system.licenses`),i=[];if(r!=null&&(n=r.native)!=null&&(n=n.licenses)!=null&&n.length){let n=null,s=Date.now(),c;if(this.props.schema.uuid){var a;let e=await this.getCachedObject(`system.meta.uuid`);c=e==null||(a=e.native)==null?void 0:a.uuid}let l;if(this.props.schema.version){var o;let e=await this.getCachedObject(`system.adapter.${t}`);l=e==null||(o=e.common)==null?void 0:o.version}if(r.native.licenses.forEach(r=>{let a=!r.validTill||r.validTill===`0000-00-00 00:00:00`||new Date(r.validTill).getTime()>s,o=(r.product||``).split(`.`),u=o[1]===t||t===`vis-2`&&o[1]===`vis`,d=!c||!r.uuid||r.uuid===c,f=e.isVersionValid(l,r.version,r.invoice,t);(!n||r.invoice!==`free`)&&a&&u&&d&&f&&(n=r),i.push({id:r.id,validName:u,validUuid:d,validVersion:f,validTill:a,license:r})}),n){let e=i.find(e=>e.id===(n==null?void 0:n.id));e&&(e.used=!0)}}return i}async checkLicense(t,n){let r;if(this.props.schema.uuid){var i;let e=await this.getCachedObject(`system.meta.uuid`);r=e==null||(i=e.native)==null?void 0:i.uuid}let a;if(this.props.schema.version){var o;let e=await this.getCachedObject(`system.adapter.${n}`);a=e==null||(o=e.common)==null?void 0:o.version}let s=new AbortController,c=setTimeout(()=>{c=null,s.abort()},5e3);try{let i=await window.fetch(`https://iobroker.net/api/v1/public/cert/`,{method:`POST`,body:JSON.stringify({json:t,uuid:r}),headers:{"Content-Type":`text/plain`},signal:s.signal});c&&clearTimeout(c);let o=await i.text(),l;try{l=JSON.parse(o)}catch{}if(l!=null&&l.error)try{let n=e.parseJwt(t),r=K.t(`jc_${(n==null?void 0:n.error)||l.error||`Unknown error`}`).replace(/^jc_/,``);return this.setState({_error:r,licenseOfflineCheck:!1,showLicenseData:n,result:!1,running:!1})}catch{return console.log(`Cannot parse license`),this.setState({_error:l.error,result:!1,running:!1})}{let i=null;try{i=e.parseJwt(t)}catch{}if(l){let t=l.validTill||l.valid_till;if(t&&t!==`0000-00-00 00:00:00`&&new Date(t).getTime()<Date.now())return this.setState({_error:K.t(`jc_License expired on %s`,new Date(t).toLocaleString()),licenseOfflineCheck:!1,showLicenseData:i,result:!1,running:!1});let o=(l.name||``).split(`.`);return o[1]===n||o[1]===`vis`&&n===`vis-2`?r&&!l.uuid&&n===`vis-2`?this.setState({_error:K.t(`jc_License must be converted`,l.uuid),showLinkToProfile:!0,licenseOfflineCheck:!1,showLicenseData:i,result:!1,running:!1}):r&&l.uuid&&l.uuid!==r?this.setState({_error:K.t(`jc_Serial number (UUID) "%s" in license is for other device.`,l.uuid),licenseOfflineCheck:!1,showLicenseData:i,result:!1,running:!1}):e.isVersionValid(a,l.version,l.invoice,n)?this.setState({licenseOfflineCheck:!1,showLicenseData:i,result:!0,running:!1}):this.setState({_error:K.t(`jc_License is for version %s, but required version is %s`,l.version,this.props.schema.version),licenseOfflineCheck:!1,showLicenseData:i,result:!1,running:!1}):this.setState({_error:K.t(`jc_License for other product "%s"`,l.name),licenseOfflineCheck:!1,showLicenseData:i,result:!1,running:!1})}throw Error(`jc_Invalid answer from server`)}}catch(i){var l;if((i==null||(l=i.response)==null?void 0:l.status)===404)return this.setState({_error:K.t(`jc_License does not exist`),result:!1,running:!1});try{let i=e.parseJwt(t),o=((i==null?void 0:i.name)||``).split(`.`);return i!=null&&i.valid_till&&i.valid_till!==`0000-00-00 00:00:00`&&new Date(i.valid_till).getTime()<Date.now()?this.setState({_error:K.t(`jc_License expired on %s`,new Date(i.valid_till).toLocaleString()),showLicenseData:i,licenseOfflineCheck:!0,running:!1,result:!1}):o[1]===n?r&&i!=null&&i.uuid&&i.uuid!==r?this.setState({_error:K.t(`jc_Serial number (UUID) "%s" in license is for other device.`,i==null?void 0:i.uuid),showLicenseData:i,licenseOfflineCheck:!0,result:!1,running:!1}):e.isVersionValid(a,i==null?void 0:i.version,i==null?void 0:i.invoice,n)?this.setState({running:!1,result:!0,licenseOfflineCheck:!0,showLicenseData:i}):this.setState({_error:K.t(`jc_License is for version %s, but required version is %s`,i==null?void 0:i.version,this.props.schema.version),licenseOfflineCheck:!0,showLicenseData:i,result:!1,running:!1}):this.setState({_error:K.t(`jc_License for other product "%s"`,i==null?void 0:i.name),licenseOfflineCheck:!0,showLicenseData:i,result:!1,running:!1})}catch{return this.setState({_error:K.t(`jc_Cannot decode license`),result:!1,licenseOfflineCheck:!0,running:!1})}}}renderAskForUpdate(){return this.state.askForUpdate?_.createElement(Cn,{text:K.t(`jc_License not found in license manager. Do you want to read licenses from iobroker.net?`),ok:K.t(`jc_Yes`),onClose:async e=>{if(e){this.setState({askForUpdate:!1});try{await this.props.oContext.socket.updateLicenses(``,``)}catch(e){window.alert(K.t(`jc_Cannot read licenses: %s`,e));return}await this._onClick(!0)}else this.setState({askForUpdate:!1,running:!1})}}):null}async _onClick(e){let t=this.props.oContext.adapterName===`vis-2`?`vis`:this.props.oContext.adapterName;this.setState({running:!0});let n,r;if(this.props.data.useLicenseManager){if(r=await this.findInLicenseManager(t),n=r.find(e=>e.used),n&&=n.license.json,!n&&!e){this.setState({askForUpdate:!0});return}}else n=this.props.data.license;n?await this.checkLicense(n,t):this.props.data.useLicenseManager?this.setState({_error:K.t(`jc_Suitable license not found in license manager`),result:!1,running:!1,allLicenses:r||null}):this.setState({_error:K.t(`jc_Please enter the license`),result:!1,running:!1})}renderItem(){return _.createElement(`div`,{style:ec.fullWidth},_.createElement(Ge,{variant:this.props.schema.variant||`outlined`,color:this.props.schema.color||`primary`,style:ec.fullWidth,disabled:!this.props.data.license&&!this.props.data.useLicenseManager||this.state.running,startIcon:_.createElement(se,null),onClick:()=>this._onClick()},this.state.running?_.createElement(wn,{size:20,style:{marginRight:8}}):null,this.getText(this.props.schema.label||`jc_Check license`,this.props.schema.noTranslation)),this.renderMessageDialog(),this.renderErrorDialog(),this.renderAskForUpdate())}};g();var nc=class extends X{renderItem(e,t){let n=X.getValue(this.props.data,this.props.attr),r=Array.isArray(n);return _.createElement(Mn,{style:{width:`100%`},variant:`standard`},_.createElement(bn,{onClick:e=>{if(e.preventDefault(),e.stopPropagation(),!t&&this.props.attr){let e=this.onChange(this.props.attr,!n);e instanceof Promise&&e.catch(e=>console.error(`Cannot set value: ${e}`))}},control:_.createElement(Ht,{indeterminate:r,checked:!!n,onChange:e=>{if(this.props.attr){let t;t=r?this.onChange(this.props.attr,!0):this.onChange(this.props.attr,e.target.checked),t instanceof Promise&&t.catch(e=>console.error(`Cannot set value: ${e}`))}},disabled:t||this.props.schema.readOnly}),label:this.getText(this.props.schema.label)}),_.createElement(en,{style:{color:`red`}},e?this.props.schema.validatorErrorText?K.t(this.props.schema.validatorErrorText):K.t(`jc_Error`):null),this.props.schema.help?_.createElement(en,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var rc={standard:jt,filled:Kt,outlined:pn},ic=e=>{let t=e.palette.mode===`light`,n=t?`rgba(0, 0, 0, 0.42)`:`rgba(255, 255, 255, 0.7)`;return{root:{},inputRoot:{display:`inline-flex`,flexWrap:`wrap`,flex:1,marginTop:0,minWidth:70,"&.mui-variant-outlined,&.mui-variant-filled":{boxSizing:`border-box`},"&.mui-variant-outlined":{paddingTop:`14px`},"&.mui-variant-filled":{paddingTop:`28px`}},input:{display:`inline-block`,textOverflow:`ellipsis`,overflow:`hidden`,whiteSpace:`nowrap`,appearance:`none`,WebkitTapHighlightColor:`rgba(0,0,0,0)`,float:`left`,flex:1},chipContainer:{display:`flex`,flexFlow:`row wrap`,alignItems:`center`,cursor:`text`,marginBottom:`-2px`,minHeight:40},outlined:{"& input":{height:16,paddingTop:`4px`,paddingBottom:`12px`,marginTop:`4px`,marginBottom:`4px`}},standard:{marginTop:`18px`},filled:{"& input":{height:22,marginBottom:`4px`,marginTop:`4px`,paddingTop:0},"$marginDense & input":{height:26}},labeled:{},label:{top:4,"&$outlined&:not($labelShrink)":{top:2,"$marginDense &":{top:5}},"&$filled&:not($labelShrink)":{top:15,"$marginDense &":{top:20}}},labelShrink:{top:0},helperText:{marginBottom:-20},focused:{},disabled:{},underline:{"&:after":{borderBottom:`2px solid ${e.palette.primary[t?`dark`:`light`]}`,left:0,bottom:0,content:`""`,position:`absolute`,right:0,transform:`scaleX(0)`,transition:e.transitions.create(`transform`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:`none`},"&$focused:after":{transform:`scaleX(1)`},"&$error:after":{borderBottomColor:e.palette.error.main,transform:`scaleX(1)`},"&:before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:`"\\00a0"`,position:`absolute`,right:0,transition:e.transitions.create(`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},"&:hover:not($disabled):not($focused):not($error):before":{borderBottom:`2px solid ${e.palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},"&$disabled:before":{borderBottomStyle:`dotted`}},error:{"&:after":{backgroundColor:e.palette.error.main,transform:`scaleX(1)`}},chip:{margin:`0 8px 8px 0`,float:`left`},marginDense:{}}},ac={BACKSPACE:8,DELETE:46,LEFT_ARROW:37,RIGHT_ARROW:39},oc=({value:e,isFocused:t,isDisabled:n,isReadOnly:r,handleClick:i,handleDelete:a,style:o},s)=>_.createElement(qn,{key:s,style:{...o,pointerEvents:n||r?`none`:void 0,backgroundColor:t?re[300]:void 0},onClick:i,onDelete:a,label:e}),sc=class extends _.Component{constructor(e){super(e),q(this,`labelRef`,void 0),q(this,`labelNode`,null),q(this,`input`,void 0),q(this,`newChipKeyCodes`,void 0),q(this,`newChipKeys`,void 0),q(this,`actualInput`,null),q(this,`inputBlurTimeout`,null),q(this,`_keyPressed`,!1),q(this,`_preventChipCreation`,!1),q(this,`styles`,{}),q(this,`styleTheme`,null),q(this,`focus`,()=>{var e;(e=this.actualInput)==null||e.focus(),this.state.focusedChip&&this.setState({focusedChip:null})}),q(this,`handleInputBlur`,e=>{this.props.onBlur&&this.props.onBlur(e),this.setState({isFocused:!1}),this.state.focusedChip&&this.setState({focusedChip:null});let t=e.target.value,n;switch(this.props.blurBehavior||`clear`){case`add-or-clear`:n={clearInputOnFail:!0};case`add`:if(this.props.delayBeforeAdd){let e=(this.props.value||this.state.chips).length;this.inputBlurTimeout=setTimeout(()=>{let r=(this.props.value||this.state.chips).length;e===r?this.handleAddChip(t,n):this.clearInput()},150)}else this.handleAddChip(t,n);break;case`clear`:this.clearInput()}}),q(this,`handleInputFocus`,e=>{var t,n;this.setState({isFocused:!0}),(t=(n=this.props).onFocus)==null||t.call(n,e)}),q(this,`handleKeyDown`,e=>{let{focusedChip:t}=this.state;if(this._keyPressed=!1,this._preventChipCreation=!1,this.props.onKeyDown&&(this.props.onKeyDown(e),e.isDefaultPrevented()))return;let n=this.props.value||this.state.chips;if(this.newChipKeyCodes.includes(e.keyCode)||this.newChipKeys.includes(e.key)){this.handleAddChip(e.target.value)!==!1&&e.preventDefault();return}switch(e.keyCode){case ac.BACKSPACE:e.target.value===``&&(t?(this.handleDeleteChip(n[t],t),t&&this.setState({focusedChip:t-1})):this.setState({focusedChip:n.length-1}));break;case ac.DELETE:e.target.value===``&&t&&(this.handleDeleteChip(n[t],t),t<=n.length-1&&this.setState({focusedChip:t}));break;case ac.LEFT_ARROW:t===null&&e.target.value===``&&n.length?this.setState({focusedChip:n.length-1}):t!==null&&t>0&&this.setState({focusedChip:t-1});break;case ac.RIGHT_ARROW:t!==null&&t<n.length-1?this.setState({focusedChip:t+1}):this.setState({focusedChip:null});break;default:this.setState({focusedChip:null})}}),q(this,`handleKeyUp`,e=>{!this._preventChipCreation&&(this.newChipKeyCodes.includes(e.keyCode)||this.newChipKeys.includes(e.key))&&this._keyPressed?this.clearInput():this.updateInput(e.target.value),this.props.onKeyUp&&this.props.onKeyUp(e)}),q(this,`handleUpdateInput`,e=>{(this.props.inputValue===null||this.props.inputValue===void 0)&&this.updateInput(e.target.value),this.props.onUpdateInput&&this.props.onUpdateInput(e)}),q(this,`setActualInputRef`,e=>{this.actualInput=e,this.props.inputRef&&this.props.inputRef(e)}),this.state={chips:e.defaultValue||[],focusedChip:null,inputValue:``,isFocused:!1,chipsUpdated:!1,prevPropsValue:[],variant:this.props.variant||`standard`},this.newChipKeyCodes=e.newChipKeyCodes||[13],this.newChipKeys=e.newChipKeys||[`Enter`],this.labelRef=_.createRef(),this.input=_.createRef()}componentDidMount(){this.state.variant===`outlined`&&(this.labelNode=this.labelRef.current,this.forceUpdate())}componentWillUnmount(){this.inputBlurTimeout&&clearTimeout(this.inputBlurTimeout)}static getDerivedStateFromProps(e,t){let n=null;return e.value&&e.value.length!==t.prevPropsValue.length&&(n={prevPropsValue:e.value},e.clearInputValueOnChange&&(n.inputValue=``)),e.clearInputValueOnChange&&e.value&&e.value.length!==t.prevPropsValue.length&&(n={prevPropsValue:e.value,inputValue:``}),e.disabled&&(n={...n,focusedChip:null}),!t.chipsUpdated&&e.defaultValue&&(n={...n,chips:e.defaultValue}),n}handleAddChip(e,t){if(this.props.onBeforeAdd&&!this.props.onBeforeAdd(e))return this._preventChipCreation=!0,t&&t.clearInputOnFail&&this.clearInput(),!1;this.clearInput();let n=this.props.value||this.state.chips;return e.trim().length?((this.props.allowDuplicates||!n.includes(e))&&(this.props.value&&this.props.onAdd?this.props.onAdd(e):this.updateChips([...this.state.chips,e])),!0):!1}handleDeleteChip(e,t){if(this.props.value)this.props.onDelete&&this.props.onDelete(e,t);else{let e=this.state.chips.slice();if(e.splice(t,1)){let n=this.state.focusedChip;this.state.focusedChip===t?n=null:this.state.focusedChip!==null&&this.state.focusedChip>t&&(n=this.state.focusedChip-1),this.updateChips(e,{focusedChip:n})}}}updateChips(e,t={}){this.setState({chips:e,chipsUpdated:!0,...t}),this.props.onChange&&this.props.onChange(e)}clearInput(){this.updateInput(``)}updateInput(e){this.setState({inputValue:e})}render(){let{alwaysShowPlaceholder:e,chipRenderer:t=oc,className:n,disabled:r,disableUnderline:i,error:a,FormHelperTextProps:o,fullWidth:s,fullWidthInput:c,helperText:l,id:u,InputProps:d={},InputLabelProps:f={},inputValue:p,label:m,placeholder:h,readOnly:g,required:v,rootRef:y,value:b,margin:x}=this.props,S=this.state.variant;this.styleTheme!==this.props.theme.palette.mode&&(this.styleTheme=this.props.theme.palette.mode,this.styles=$t.getStyle(this.props.theme,ic));let C=b||this.state.chips||[];Array.isArray(C)||(C=(C||``).toString().split(/[,\s]+/).map(e=>e.trim()));let w=p??this.state.inputValue,T=(this.props.value||w).length||w.length,E=typeof f.shrink==`boolean`?f.shrink:m!==null&&(T||this.state.isFocused||C.length),D=C.map((e,n)=>t({value:e,isDisabled:!!r,isReadOnly:!!g,isFocused:this.state.focusedChip===n,handleClick:()=>this.setState({focusedChip:n}),handleDelete:()=>this.handleDeleteChip(e,n),style:this.styles.chip},n.toString())),O={};S===`outlined`&&(O.notched=!!E,O.labelWidth=E&&this.labelNode&&this.labelNode.offsetWidth||0),S===`standard`?d.disableUnderline=!0:O.startAdornment=D;let k=rc[S];return _.createElement(Mn,{ref:y,fullWidth:s,className:n,sx:{...this.styles.root,...x===`dense`?this.styles.marginDense:{}},error:a,required:C.length>0?void 0:v,onClick:this.focus,disabled:r,variant:S,component:`div`,margin:x},m&&_.createElement(Ze,{htmlFor:u,sx:{"&.MuiInputLabel-root":this.styles.label,"&.MuiInputLabel-shrink":this.styles.labelShrink},shrink:!!E,focused:this.state.isFocused,variant:S,ref:this.labelRef,required:v,component:`label`,...f},m),_.createElement(ht,{component:`div`,id:`input-chip-container`,sx:{...this.styles[S],...this.styles.chipContainer,...this.state.isFocused?this.styles.focused:void 0,...!i&&S===`standard`?this.styles.underline:void 0,...r?this.styles.disabled:void 0,...m?this.styles.labeled:void 0,...a?this.styles.error:void 0}},S===`standard`&&D,_.createElement(k,{ref:this.input,className:`mui-variant-${this.styles[S]} ${m?`mui-chip-with-label`:`mui-chip-no-label`}`,sx:{"&.MuiInputBase-input":{...this.styles.input,...this.styles[S]},"&.MuiInputBase-root":{...this.styles.inputRoot}},id:u,value:w,onChange:this.handleUpdateInput,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onFocus:this.handleInputFocus,onBlur:this.handleInputBlur,inputRef:this.setActualInputRef,disabled:r,fullWidth:c,placeholder:!T&&(E||m==null)||e?h:void 0,readOnly:g,...d,...O})),l&&_.createElement(en,{...o,className:o==null?void 0:o.className,style:this.styles.helperText},l))}};g();var cc=class extends X{async componentDidMount(){await super.componentDidMount();let{data:e,attr:t}=this.props,n=X.getValue(e,t);if(this.props.schema.delimiter&&typeof n==`string`){let e=n.split(this.props.schema.delimiter).map(e=>e.trim()).filter(e=>e);this.setState({value:e})}else this.setState({value:n||[]})}renderItem(e,t){let{attr:n,schema:r}=this.props,{value:i}=this.state;return _.createElement(Mn,{fullWidth:!0,variant:`standard`},_.createElement(sc,{value:i,disabled:!!t,label:this.getText(r.label),error:!!e,onAdd:e=>{let t=JSON.parse(JSON.stringify(i));t.push(e),this.setState({value:t},()=>{if(n){let e;e=this.props.schema.delimiter?this.onChange(n,t.join(`${this.props.schema.delimiter} `)):this.onChange(n,t),e instanceof Promise&&e.catch(e=>console.error(e))}})},theme:this.props.oContext.theme,onDelete:(e,t)=>{let r=JSON.parse(JSON.stringify(i));r.splice(t,1),this.setState({value:r},()=>{if(n){let e;e=this.props.schema.delimiter?this.onChange(n,r.join(`${this.props.schema.delimiter} `)):this.onChange(n,r),e instanceof Promise&&e.catch(e=>console.error(e))}})}}),_.createElement(en,null,K.t(`jc_Press ENTER Key to add new item`)),this.props.schema.help?_.createElement(en,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var lc=class extends X{renderColorDialog(){return this.state.showColorDialog?_.createElement(Dt,{onClose:()=>this.setState({showColorDialog:!1}),open:this.state.showColorDialog},_.createElement(or,{color:this.state.colorDialogValue,onChange:e=>this.setState({colorDialogValue:e.hex},()=>this.props.attr&&this.onChange(this.props.attr,this.state.colorDialogValue))})):null}renderItem(e,t){let n=X.getValue(this.props.data,this.props.attr),r=$t.isUseBright(n);return _.createElement(_.Fragment,null,this.renderColorDialog(),_.createElement(ft,{variant:`standard`,disabled:!!t,style:{minWidth:100,width:`calc(100% - 8px)`},label:this.getText(this.props.schema.label),value:n||``,onClick:()=>!this.props.schema.readOnly&&this.setState({showColorDialog:!0,colorDialogValue:n||``}),onChange:e=>{let t=e.target.value,n=this.props.attr&&this.onChange(this.props.attr,t);n instanceof Promise&&n.catch(e=>console.error(`Cannot set value: ${e}`))},slotProps:{htmlInput:{style:{backgroundColor:n,color:r?`#FFF`:`#000`},readOnly:this.props.schema.readOnly||!1},input:{endAdornment:!this.props.schema.readOnly&&n&&!this.props.schema.noClearButton?_.createElement(ur,{tabIndex:-1,size:`small`,onClick:e=>{e.stopPropagation();let t=this.props.attr&&this.onChange(this.props.attr,``);t instanceof Promise&&t.catch(e=>console.error(`Cannot set value: ${e}`))}},_.createElement(je,null)):void 0},inputLabel:{shrink:!0}}}))}};g();var uc={width:{width:`calc(100% - 85px)`},width50:{width:120,marginRight:5}},dc=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);this.setState({value:e});let t={};this.props.schema.useSystemName&&(t.useSystem=!!X.getValue(this.props.data,this.props.schema.useSystemName)),this.props.schema.longitudeName&&this.props.schema.latitudeName?(t.longitude=X.getValue(this.props.data,this.props.schema.longitudeName),t.latitude=X.getValue(this.props.data,this.props.schema.latitudeName),!t.longitude&&!t.latitude&&this.props.schema.autoInit&&setTimeout(()=>this.getCoordinates(),300)):!X.getValue(this.props.data,this.props.attr)&&this.props.schema.autoInit&&setTimeout(()=>this.getCoordinates(),300),Object.keys(t).length&&setTimeout(()=>this.setState(t),50)}async getSystemCoordinates(){let e;try{e=this.props.oContext.socket.getCompactSystemConfig?await this.props.oContext.socket.getCompactSystemConfig():await this.getCachedObject(`system.config`)}catch(e){console.error(`Cannot get system configuration: ${e}`)}if(e!=null&&e.common&&(e.common.longitude||e.common.latitude))if(window.alert(K.t(`jc_Used system settings`)),this.props.schema.longitudeName&&this.props.schema.latitudeName)this.setState({longitude:e.common.longitude,latitude:e.common.latitude},async()=>{await this.onChange(this.props.schema.longitudeName,e.common.longitude),await this.onChange(this.props.schema.latitudeName,e.common.latitude)});else{let t=e.common.latitude+(this.props.schema.divider||`,`)+e.common.longitude;this.setState({value:t},()=>{let e=this.props.attr&&this.onChange(this.props.attr,t);e instanceof Promise&&e.catch(e=>console.error(`Cannot set value: ${e}`))})}else window.alert(K.t(`jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser`))}getCoordinates(){navigator.geolocation?navigator.geolocation.getCurrentPosition(async e=>{if(e!=null&&e.coords)if(this.props.schema.longitudeName&&this.props.schema.latitudeName)this.setState({longitude:e.coords.longitude,latitude:e.coords.latitude},async()=>{await this.onChange(this.props.schema.longitudeName,e.coords.longitude||``),await this.onChange(this.props.schema.latitudeName,e.coords.latitude||``)});else{let t=e.coords.latitude+(this.props.schema.divider||`,`)+e.coords.longitude;this.setState({value:t},()=>{let e=this.onChange(this.props.attr,t);e instanceof Promise&&e.catch(e=>console.error(`Cannot set value: ${e}`))})}else await this.getSystemCoordinates()},async e=>{console.error(`Cannot determine coordinates from browser: ${e.message}`),await this.getSystemCoordinates()}):this.getSystemCoordinates().catch(e=>{console.error(`Cannot determine coordinates: ${e}`)})}renderItem(e,t){return _.createElement(_.Fragment,null,this.props.schema.useSystemName?_.createElement(bn,{control:_.createElement(Ht,{checked:!!this.state.useSystem,onChange:e=>{let t=e.target.checked;t&&this.getSystemCoordinates().catch(e=>console.error(`Cannot determine coordinates: ${e}`)),this.setState({useSystem:t},()=>this.onChange(this.props.schema.useSystemName,t))}}),label:K.t(`jc_Use system settings for position`)}):null,this.props.schema.longitudeName&&this.props.schema.latitudeName?_.createElement(ft,{variant:`standard`,style:uc.width50,value:this.state.longitude??``,error:!!e,disabled:this.state.useSystem||!!t,onChange:e=>{let t=e.target.value;this.setState({longitude:t},()=>{let e=this.onChange(this.props.schema.longitudeName,(t||``).trim());e instanceof Promise&&e.catch(e=>console.error(`Cannot set value: ${e}`))})},label:K.t(`jc_Longitude`)}):null,this.props.schema.longitudeName&&this.props.schema.latitudeName?_.createElement(ft,{variant:`standard`,style:uc.width50,value:this.state.latitude??``,error:!!e,disabled:this.state.useSystem||!!t,onChange:e=>{let t=e.target.value;this.setState({latitude:t},()=>this.onChange(this.props.schema.latitudeName,(t||``).trim()))},label:K.t(`jc_Latitude`)}):null,!this.props.schema.longitudeName||!this.props.schema.latitudeName?_.createElement(ft,{variant:`standard`,style:uc.width,value:this.state.value??``,error:!!e,disabled:!!t,slotProps:{htmlInput:{maxLength:this.props.schema.maxLength||this.props.schema.max||void 0,readOnly:this.state.useSystem}},onChange:e=>{let t=e.target.value;this.setState({value:t},()=>this.onChange(this.props.attr,(t||``).trim()))},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)}):null,this.state.useSystem?null:_.createElement(zt,{size:`small`,onClick:()=>this.getCoordinates(),title:K.t(`jc_Take browser position`),style:{marginRight:4}},_.createElement(Gn,null)),this.state.useSystem?null:_.createElement(zt,{size:`small`,onClick:()=>this.getSystemCoordinates(),title:K.t(`jc_Take position from system settings`)},_.createElement(pt,null)))}};g();var fc=class extends _.Component{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error(`Custom component "${this.props.name}" from "${this.props.url||`unknown URL`}" crashed while rendering. It was probably built for an older admin version.`,e,t.componentStack)}componentDidUpdate(e){this.state.error&&(e.name!==this.props.name||e.url!==this.props.url)&&this.setState({error:null})}render(){return this.state.error?_.createElement(Xn,{type:`error`,iconPosition:`top`},_.createElement(`div`,null,_.createElement(`div`,{style:{fontWeight:`bold`}},K.t(`jc_Cannot display the custom component "%s"`,this.props.name)),_.createElement(`div`,null,K.t(`jc_It was probably built for an older admin version. Please update the adapter.`)),_.createElement(`div`,{style:{marginTop:8,fontStyle:`italic`,wordBreak:`break-word`}},this.state.error.message||String(this.state.error)))):_.createElement(_.Fragment,null,this.props.children)}},pc=`@iobroker/gui-components`,mc=`@iobroker/adapter-react-v5`,hc=5e3,gc=new Map;async function _c(e){let t=e.lastIndexOf(`/`),n=`${t===-1?e:e.substring(0,t)}/mf-manifest.json`,r=gc.get(n);return r||(r=(async()=>{let e=new AbortController,t=setTimeout(()=>e.abort(),hc);try{let t=await fetch(n,{signal:e.signal});return t.ok?await t.json():null}catch{return null}finally{clearTimeout(t)}})(),gc.set(n,r)),r}function vc(e){let t=e==null?void 0:e.shared;return Array.isArray(t)?t.some(e=>(e==null?void 0:e.name)===mc)?mc:t.some(e=>(e==null?void 0:e.name)===pc)?pc:null:null}async function yc(e,t){let n=vc(await _c(e));return n===mc?{compatible:!1,declared:1,tooNew:!1}:typeof t==`number`&&Number.isFinite(t)?{compatible:t===2,declared:t,tooNew:t>2}:n===pc?{compatible:!0,declared:2,tooNew:!1}:{compatible:!1,declared:1,tooNew:!1}}g(),vs({name:`iobroker_admin`,shared:{},remotes:[]});var bc=class e extends X{constructor(e){super(e),Object.assign(this.state,{Component:null,error:``,incompatible:null})}async componentDidMount(){if(!this.props.schema.url){console.error(`URL is empty. Cannot load custom component!`),this.setState({error:`URL is empty. Cannot load custom component!`});return}let t;t=this.props.schema.url.startsWith(`http:`)||this.props.schema.url.startsWith(`https:`)?this.props.schema.url:this.props.schema.url.startsWith(`./`)?`${window.location.protocol}//${window.location.host}${this.props.schema.url.replace(/^\./,``)}`:`${window.location.protocol}//${window.location.host}/adapter/${this.props.oContext.adapterName}/${this.props.schema.url}`;let[n,r,...i]=this.props.schema.name.split(`/`),a=i.join(`/`);if(!t){console.error(`Cannot find URL for custom component! Please define "url" as "custom/customComponents.js" in the schema`);return}if(!n||!r||!a){console.error(`Invalid format of "name"! Please define "name" as "ConfigCustomBackItUpSet/Components/AdapterExist" in the schema`);return}let o=await yc(t,this.props.schema.guiApi);if(!o.compatible){console.warn(`Custom component "${this.props.schema.name}" from "${t}" was not started: it targets GUI API generation ${o.declared}, but this admin provides generation 2.`),this.setState({incompatible:o});return}let s=e.runningLoads[`${t}!${r}`];if(!(s instanceof Promise)){let i;if(this.props.schema.i18n===!0){let e=t.lastIndexOf(`/`),n;n=e===-1?t:t.substring(0,e);let r=K.getLanguage(),a=`${n}/i18n/${r}.json`;i=fetch(a).then(e=>e.json()).then(e=>K.extendTranslations(e,r)).catch(e=>{if(r!==`en`){fetch(`${n}/i18n/en.json`).then(e=>e.json()).then(e=>K.extendTranslations(e,r)).catch(e=>console.log(`Cannot load i18n "${a}": ${e}`));return}console.log(`Cannot load i18n "${a}": ${e}`)})}else if(this.props.schema.i18n&&typeof this.props.schema.i18n==`object`)try{K.extendTranslations(this.props.schema.i18n)}catch(e){console.error(`Cannot import i18n: ${e}`)}try{console.log(t,n,r,a),bs([{name:n,entry:t,type:`module`}]),s=ys(`${n}/${r}`),i instanceof Promise&&(s=Promise.all([s,i]).then(e=>e[0])),e.runningLoads[`${t}!${r}`]=s}catch(e){console.error(e),this.setState({error:`Cannot import from ${this.props.schema.url}: ${e}`})}}try{var c;let e=(c=await s)==null?void 0:c.default;if(e!=null&&e[a])this.setState({Component:e[a]});else{let t=Object.keys(e||{});console.error(`URL is empty. Cannot load custom component!`),this.setState({error:`Component ${this.props.schema.name} not found in ${this.props.schema.url}. Found: ${t.join(`, `)}`})}}catch(e){console.error(e),this.setState({error:`Cannot import from ${this.props.schema.url}: ${e}`})}}renderIncompatible(e){return _.createElement(Xn,{type:`warning`,iconPosition:`top`},_.createElement(`div`,null,_.createElement(`div`,{style:{fontWeight:`bold`}},K.t(`jc_Custom component "%s" was not started`,this.props.schema.name)),_.createElement(`div`,null,e.tooNew?K.t(`jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.`,e.declared,2):K.t(`jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.`,e.declared,2))))}render(){let e=this.state.Component,t=this.props.schema||{},n=e?_.createElement(fc,{name:t.name,url:t.url},_.createElement(e,{...this.props,socket:this.props.oContext.socket,theme:this.props.oContext.theme,themeType:this.props.oContext.themeType,instance:this.props.oContext.instance,adapterName:this.props.oContext.adapterName,systemConfig:this.props.oContext.systemConfig,forceUpdate:this.props.oContext.forceUpdate})):this.state.incompatible?this.renderIncompatible(this.state.incompatible):this.state.error?_.createElement(`div`,null,this.state.error):_.createElement(I,null);return t.newLine?_.createElement(_.Fragment,null,_.createElement(`div`,{style:{flexBasis:`100%`,height:0}}),n):n}};q(bc,`runningLoads`,{});function xc(e,...t){let n=new URL(`https://mui.com/x/production-error`);return n.searchParams.set(`code`,e.toString()),t.forEach(e=>n.searchParams.append(`args[]`,e)),`MUI X error #${e}; visit ${n} for the full message.`}function Z(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Sc=e=>({components:{MuiLocalizationProvider:{defaultProps:{localeText:x({},e)}}}}),Cc={previousMonth:`Previous month`,nextMonth:`Next month`,openPreviousView:`Open previous view`,openNextView:`Open next view`,calendarViewSwitchingButtonAriaLabel:e=>e===`year`?`year view is open, switch to calendar view`:`calendar view is open, switch to year view`,start:`Start`,end:`End`,startDate:`Start date`,startTime:`Start time`,endDate:`End date`,endTime:`End time`,cancelButtonLabel:`Cancel`,clearButtonLabel:`Clear`,okButtonLabel:`OK`,todayButtonLabel:`Today`,nextStepButtonLabel:`Next`,datePickerToolbarTitle:`Select date`,dateTimePickerToolbarTitle:`Select date & time`,timePickerToolbarTitle:`Select time`,dateRangePickerToolbarTitle:`Select date range`,timeRangePickerToolbarTitle:`Select time range`,clockLabelText:(e,t)=>`Select ${e}. ${t?`Selected time is ${t}`:`No time selected`}`,hoursClockNumberText:e=>`${e} hours`,minutesClockNumberText:e=>`${e} minutes`,secondsClockNumberText:e=>`${e} seconds`,selectViewText:e=>`Select ${e}`,calendarWeekNumberHeaderLabel:`Week number`,calendarWeekNumberHeaderText:`#`,calendarWeekNumberAriaLabelText:e=>`Week ${e}`,calendarWeekNumberText:e=>`${e}`,openDatePickerDialogue:e=>e?`Choose date, selected date is ${e}`:`Choose date`,openTimePickerDialogue:e=>e?`Choose time, selected time is ${e}`:`Choose time`,openRangePickerDialogue:e=>e?`Choose range, selected range is ${e}`:`Choose range`,fieldClearLabel:`Clear`,timeTableLabel:`pick time`,dateTableLabel:`pick date`,fieldYearPlaceholder:e=>`Y`.repeat(e.digitAmount),fieldMonthPlaceholder:e=>e.contentType===`letter`?`MMMM`:`MM`,fieldDayPlaceholder:()=>`DD`,fieldWeekDayPlaceholder:e=>e.contentType===`letter`?`EEEE`:`EE`,fieldHoursPlaceholder:()=>`hh`,fieldMinutesPlaceholder:()=>`mm`,fieldSecondsPlaceholder:()=>`ss`,fieldMeridiemPlaceholder:()=>`aa`,year:`Year`,month:`Month`,day:`Day`,weekDay:`Week day`,hours:`Hours`,minutes:`Minutes`,seconds:`Seconds`,meridiem:`Meridiem`,empty:`Empty`},wc=Cc;Sc(Cc),g();var Tc=[`localeText`],Ec=v(null),Dc=function(e){let{localeText:t}=e,n=Z(e,Tc),{adapter:r,localeText:i}=b(Ec)??{adapter:void 0,localeText:void 0},{children:a,dateAdapter:o,dateFormats:s,dateLibInstance:c,adapterLocale:l,localeText:u}=Mt({props:n,name:`MuiLocalizationProvider`}),d=p(()=>x({},u,i,t),[u,i,t]),f=p(()=>{if(!o)return r||null;let e=new o({locale:l,formats:s,instance:c});if(!e.isMUIAdapter)throw Error(xc(143));return e},[o,l,s,c,r]),m=p(()=>f?{minDate:f.date(`1900-01-01T00:00:00.000`),maxDate:f.date(`2099-12-31T00:00:00.000`)}:null,[f]),h=p(()=>({adapter:f,defaultDates:m,localeText:d}),[m,f,d]);return Y(Ec.Provider,{value:h,children:a})};g();var Oc=()=>{let e=b(Ec);if(e===null)throw Error(xc(149));if(e.adapter===null)throw Error(xc(150));let t=p(()=>x({},wc,e.localeText),[e.localeText]);return p(()=>x({},e,{localeText:t}),[e,t])},kc=()=>Oc().adapter,Ac=()=>Oc().localeText,jc=[`disablePast`,`disableFuture`,`minDate`,`maxDate`,`shouldDisableDate`,`shouldDisableMonth`,`shouldDisableYear`],Mc=[`disablePast`,`disableFuture`,`minTime`,`maxTime`,`shouldDisableTime`,`minutesStep`,`ampm`,`disableIgnoringDatePartForTimeValidation`],Nc=[`minDateTime`,`maxDateTime`],Pc=[...jc,...Mc,...Nc],Fc=e=>Pc.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{});g();var Ic=[`value`,`defaultValue`,`referenceDate`,`format`,`formatDensity`,`onChange`,`timezone`,`onError`,`shouldRespectLeadingZeros`,`selectedSections`,`onSelectedSectionsChange`,`fieldRef`,`startFieldRef`,`endFieldRef`,`disabled`,`readOnly`,`dateSeparator`,`autoFocus`,`focused`],Lc=(e,t)=>p(()=>{let n=x({},e),r={},i=e=>{n.hasOwnProperty(e)&&(r[e]=n[e],delete n[e])};return Ic.forEach(i),t===`date`?jc.forEach(i):t===`time`?Mc.forEach(i):t===`date-time`&&(jc.forEach(i),Mc.forEach(i),Nc.forEach(i)),{forwardedProps:n,internalProps:r}},[e,t]),Rc=(e,t)=>e.length===t.length&&t.every(t=>e.includes(t)),zc=({openTo:e,defaultOpenTo:t,views:n,defaultViews:r})=>{let i=n??r,a;if(e!=null)a=e;else if(i.includes(t))a=t;else if(i.length>0)a=i[0];else throw Error(xc(153));return{views:i,openTo:a}},Bc=(e,t,n)=>{let r=t;return r=e.setHours(r,e.getHours(n)),r=e.setMinutes(r,e.getMinutes(n)),r=e.setSeconds(r,e.getSeconds(n)),r=e.setMilliseconds(r,e.getMilliseconds(n)),r},Vc=({date:e,disableFuture:t,disablePast:n,maxDate:r,minDate:i,isDateDisabled:a,adapter:o,timezone:s})=>{let c=Bc(o,o.date(void 0,s),e);n&&o.isBefore(i,c)&&(i=c),t&&o.isAfter(r,c)&&(r=c);let l=e,u=e;for(o.isBefore(e,i)&&(l=i,u=null),o.isAfter(e,r)&&(u&&=r,l=null);l||u;){if(l&&o.isAfter(l,r)&&(l=null),u&&o.isBefore(u,i)&&(u=null),l){if(!a(l))return l;l=o.addDays(l,1)}if(u){if(!a(u))return u;u=o.addDays(u,-1)}}return null},Hc=(e,t)=>e.isValid(t)?t:null,Uc=(e,t,n)=>t==null||!e.isValid(t)?n:t,Wc=(e,t,n)=>!e.isValid(t)&&t!=null&&!e.isValid(n)&&n!=null||e.isEqual(t,n),Gc=(e,t)=>{let n=[e.startOfYear(t)];for(;n.length<12;){let t=n[n.length-1];n.push(e.addMonths(t,1))}return n},Kc=(e,t,n)=>n===`date`?e.startOfDay(e.date(void 0,t)):e.date(void 0,t),qc=(e,t)=>{let n=e.setHours(e.date(),t===`am`?2:14);return e.format(n,`meridiem`)},Jc=[`year`,`month`,`day`],Yc=e=>Jc.includes(e),Xc=(e,{format:t,views:n},r)=>{if(t!=null)return t;let i=e.formats;return Rc(n,[`year`])?i.year:Rc(n,[`month`])?i.month:Rc(n,[`day`])?i.dayOfMonth:Rc(n,[`month`,`year`])?`${i.month} ${i.year}`:Rc(n,[`day`,`month`])?`${i.month} ${i.dayOfMonth}`:r?/en/.test(e.getCurrentLocaleCode())?i.normalDateWithWeekday:i.normalDate:i.keyboardDate},Zc=(e,t)=>{let n=e.startOfWeek(t);return[0,1,2,3,4,5,6].map(t=>e.addDays(n,t))},Qc=[`hours`,`minutes`,`seconds`],$c=[`hours`,`minutes`,`seconds`,`meridiem`],el=e=>Qc.includes(e),tl=e=>$c.includes(e),nl=(e,t)=>e?t.getHours(e)>=12?`pm`:`am`:null,rl=(e,t,n)=>n&&(e>=12?`pm`:`am`)!==t?t===`am`?e-12:e+12:e,il=(e,t,n,r)=>{let i=rl(r.getHours(e),t,n);return r.setHours(e,i)},al=(e,t)=>t.getHours(e)*3600+t.getMinutes(e)*60+t.getSeconds(e),ol=(e,t)=>(n,r)=>e?t.isAfter(n,r):al(n,t)>al(r,t),sl=(e,{format:t,views:n,ampm:r})=>{if(t!=null)return t;let i=e.formats;return Rc(n,[`hours`])?r?`${i.hours12h} ${i.meridiem}`:i.hours24h:Rc(n,[`minutes`])?i.minutes:Rc(n,[`seconds`])?i.seconds:Rc(n,[`minutes`,`seconds`])?`${i.minutes}:${i.seconds}`:Rc(n,[`hours`,`minutes`,`seconds`])?r?`${i.hours12h}:${i.minutes}:${i.seconds} ${i.meridiem}`:`${i.hours24h}:${i.minutes}:${i.seconds}`:r?`${i.hours12h}:${i.minutes} ${i.meridiem}`:`${i.hours24h}:${i.minutes}`},cl=(e,t)=>{let n=e.formatTokenMap[t];if(n==null)throw Error(xc(157,t));return typeof n==`string`?{type:n,contentType:n===`meridiem`?`letter`:`digit`,maxLength:void 0}:{type:n.sectionType,contentType:n.contentType,maxLength:n.maxLength}},ll=(e,t)=>{let n=[],r=e.date(void 0,`default`),i=e.startOfWeek(r),a=e.endOfWeek(r),o=i;for(;e.isBefore(o,a);)n.push(o),o=e.addDays(o,1);return n.map(n=>e.formatByString(n,t))},ul=(e,t,n,r)=>{switch(n){case`month`:return Gc(e,e.date(void 0,t)).map(t=>e.formatByString(t,r));case`weekDay`:return ll(e,r);case`meridiem`:{let n=e.date(void 0,t);return[e.startOfDay(n),e.endOfDay(n)].map(t=>e.formatByString(t,r))}default:return[]}},dl=`s`,fl=[`0`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],pl=e=>{let t=e.date(void 0);return e.formatByString(e.setSeconds(t,0),dl)===`0`?fl:Array.from({length:10}).map((n,r)=>e.formatByString(e.setSeconds(t,r),dl))},ml=(e,t)=>{if(t[0]===`0`)return e;let n=[],r=``;for(let i=0;i<e.length;i+=1){r+=e[i];let a=t.indexOf(r);a>-1&&(n.push(a.toString()),r=``)}return n.join(``)},hl=(e,t)=>t[0]===`0`?e:e.split(``).map(e=>t[Number(e)]).join(``),gl=(e,t)=>{let n=ml(e,t);return n!==` `&&!Number.isNaN(Number(n))},_l=(e,t)=>Number(e).toString().padStart(t,`0`),vl=(e,t,n,r,i)=>{if(i.type===`day`&&i.contentType===`digit-with-letter`){let r=e.setDate(n.longestMonth,t);return e.formatByString(r,i.format)}let a=t.toString();return i.hasLeadingZerosInInput&&(a=_l(a,i.maxLength)),hl(a,r)},yl=(e,t,n)=>{let r=e.value||e.placeholder,i=t===`non-input`?e.hasLeadingZerosInFormat:e.hasLeadingZerosInInput;return t===`non-input`&&e.hasLeadingZerosInInput&&!e.hasLeadingZerosInFormat&&(r=Number(ml(r,n)).toString()),[`input-rtl`,`input-ltr`].includes(t)&&e.contentType===`digit`&&!i&&r.length===1&&(r=`${r}\u200e`),t===`input-rtl`&&(r=`\u2068${r}\u2069`),r},bl=(e,t,n,r)=>e.formatByString(e.parse(t,n),r),xl=(e,t)=>e.formatByString(e.date(void 0,`system`),t).length===4,Sl=(e,t,n,r)=>{if(t!==`digit`)return!1;let i=e.date(void 0,`default`);switch(n){case`year`:return e.lib===`dayjs`&&r===`YY`||e.formatByString(e.setYear(i,1),r).startsWith(`0`);case`month`:return e.formatByString(e.startOfYear(i),r).length>1;case`day`:return e.formatByString(e.startOfMonth(i),r).length>1;case`weekDay`:return e.formatByString(e.startOfWeek(i),r).length>1;case`hours`:return e.formatByString(e.setHours(i,1),r).length>1;case`minutes`:return e.formatByString(e.setMinutes(i,1),r).length>1;case`seconds`:return e.formatByString(e.setSeconds(i,1),r).length>1;default:throw Error(xc(158))}},Cl=(e,t,n)=>{let r=t.some(e=>e.type===`day`),i=[],a=[];for(let e=0;e<t.length;e+=1){let o=t[e];r&&o.type===`weekDay`||(i.push(o.format),a.push(yl(o,`non-input`,n)))}let o=i.join(` `),s=a.join(` `);return e.parse(s,o)},wl=e=>e.map(e=>`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`).join(``),Tl=(e,t,n)=>{let r=e.date(void 0,n),i=e.endOfYear(r),a=e.endOfDay(r),{maxDaysInMonth:o,longestMonth:s}=Gc(e,r).reduce((t,n)=>{let r=e.getDaysInMonth(n);return r>t.maxDaysInMonth?{maxDaysInMonth:r,longestMonth:n}:t},{maxDaysInMonth:0,longestMonth:null});return{year:({format:t})=>({minimum:0,maximum:xl(e,t)?9999:99}),month:()=>({minimum:1,maximum:e.getMonth(i)+1}),day:({currentDate:t})=>({minimum:1,maximum:e.isValid(t)?e.getDaysInMonth(t):o,longestMonth:s}),weekDay:({format:t,contentType:n})=>{if(n===`digit`){let n=ll(e,t).map(Number);return{minimum:Math.min(...n),maximum:Math.max(...n)}}return{minimum:1,maximum:7}},hours:({format:n})=>{let i=e.getHours(a),o=Number(ml(e.formatByString(e.startOfDay(r),n),t)),s=Number(ml(e.formatByString(e.endOfDay(r),n),t));return s===i?o>i?{minimum:1,maximum:o}:{minimum:0,maximum:i}:o===0?{minimum:0,maximum:s}:{minimum:1,maximum:o}},minutes:()=>({minimum:0,maximum:e.getMinutes(a)}),seconds:()=>({minimum:0,maximum:e.getSeconds(a)}),meridiem:()=>({minimum:0,maximum:1}),empty:()=>({minimum:0,maximum:0})}},El=(e,t,n,r)=>{switch(t.type){case`year`:return e.setYear(r,e.getYear(n));case`month`:return e.setMonth(r,e.getMonth(n));case`weekDay`:{let r=e.formatByString(n,t.format);t.hasLeadingZerosInInput&&(r=_l(r,t.maxLength));let i=ll(e,t.format),a=i.indexOf(r),o=i.indexOf(t.value)-a;return e.addDays(n,o)}case`day`:return e.setDate(r,e.getDate(n));case`meridiem`:return il(r,e.getHours(n)<12?`am`:`pm`,!0,e);case`hours`:return e.setHours(r,e.getHours(n));case`minutes`:return e.setMinutes(r,e.getMinutes(n));case`seconds`:return e.setSeconds(r,e.getSeconds(n));default:return r}},Dl={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8,empty:9},Ol=(e,t,n,r,i)=>[...n].sort((e,t)=>Dl[e.type]-Dl[t.type]).reduce((n,r)=>!i||r.modified?El(e,r,t,n):n,r),kl=e=>{let t={};return e.forEach((n,r)=>{let i=r===0?null:r-1,a=r===e.length-1?null:r+1;t[r]={leftIndex:i,rightIndex:a}}),{neighbors:t,startIndex:0,endIndex:e.length-1}},Al=(e,t)=>{if(e==null)return null;if(e===`all`)return`all`;if(typeof e==`string`){let n=t.findIndex(t=>t.type===e);return n===-1?null:n}return e},jl=({adapter:e,format:t})=>{let n=10,r=t,i=e.expandFormat(t);for(;i!==r;)if(r=i,i=e.expandFormat(r),--n,n<0)throw Error(xc(154));return i},Ml=({adapter:e,expandedFormat:t})=>{let n=[],{start:r,end:i}=e.escapedCharacters,a=RegExp(`(\\${r}[^\\${i}]*\\${i})+`,`g`),o=null;for(;o=a.exec(t);)n.push({start:o.index,end:a.lastIndex-1});return n},Nl=(e,t,n,r)=>{switch(n.type){case`year`:return t.fieldYearPlaceholder({digitAmount:e.formatByString(e.date(void 0,`default`),r).length,format:r});case`month`:return t.fieldMonthPlaceholder({contentType:n.contentType,format:r});case`day`:return t.fieldDayPlaceholder({format:r});case`weekDay`:return t.fieldWeekDayPlaceholder({contentType:n.contentType,format:r});case`hours`:return t.fieldHoursPlaceholder({format:r});case`minutes`:return t.fieldMinutesPlaceholder({format:r});case`seconds`:return t.fieldSecondsPlaceholder({format:r});case`meridiem`:return t.fieldMeridiemPlaceholder({format:r});default:return r}},Pl=({adapter:e,date:t,shouldRespectLeadingZeros:n,localeText:r,localizedDigits:i,now:a,token:o,startSeparator:s})=>{if(o===``)throw Error(xc(155));let c=cl(e,o),l=Sl(e,c.contentType,c.type,o),u=n?l:c.contentType===`digit`,d=e.isValid(t),f=d?e.formatByString(t,o):``,p=null;if(u)if(l)p=f===``?e.formatByString(a,o).length:f.length;else{if(c.maxLength==null)throw Error(xc(156,o));p=c.maxLength,d&&(f=hl(_l(ml(f,i),p),i))}return x({},c,{format:o,maxLength:p,value:f,placeholder:Nl(e,r,c,o),hasLeadingZerosInFormat:l,hasLeadingZerosInInput:u,startSeparator:s,endSeparator:``,modified:!1})},Fl=e=>{let{adapter:t,expandedFormat:n,escapedParts:r}=e,i=t.date(void 0),a=[],o=``,s=Object.keys(t.formatTokenMap).sort((e,t)=>t.length-e.length),c=/^([a-zA-Z]+)/,l=RegExp(`^(${s.join(`|`)})*$`),u=RegExp(`^(${s.join(`|`)})`),d=e=>r.find(t=>t.start<=e&&t.end>=e),f=0;for(;f<n.length;){var p;let t=d(f),r=t!=null,s=(p=c.exec(n.slice(f)))==null?void 0:p[1];if(!r&&s!=null&&l.test(s)){let t=s;for(;t.length>0;){let n=u.exec(t)[1];t=t.slice(n.length),a.push(Pl(x({},e,{now:i,token:n,startSeparator:o}))),o=``}f+=s.length}else{let e=n[f];r&&(t==null?void 0:t.start)===f||(t==null?void 0:t.end)===f||(a.length===0?o+=e:(a[a.length-1].endSeparator+=e,a[a.length-1].isEndFormatSeparator=!0)),f+=1}}return a.length===0&&o.length>0&&a.push({type:`empty`,contentType:`letter`,maxLength:null,format:``,value:``,placeholder:``,hasLeadingZerosInFormat:!1,hasLeadingZerosInInput:!1,startSeparator:o,endSeparator:``,modified:!1}),a},Il=({isRtl:e,formatDensity:t,sections:n})=>n.map(n=>{let r=n=>{let r=n;return e&&r!==null&&r.includes(` `)&&(r=`\u2069${r}\u2066`),t===`spacious`&&[`/`,`.`,`-`].includes(r)&&(r=` ${r} `),r};return n.startSeparator=r(n.startSeparator),n.endSeparator=r(n.endSeparator),n}),Ll=e=>{let t=jl(e);e.isRtl&&(t=t.split(` `).reverse().join(` `));let n=Ml(x({},e,{expandedFormat:t})),r=Fl(x({},e,{expandedFormat:t,escapedParts:n}));return Il(x({},e,{sections:r}))};g();var Rl=v(null),zl=()=>{let e=b(Rl);if(e==null)throw Error(xc(151));return e};g();var Bl=()=>b(Rl);g();var Vl=(e={})=>{let t=Bl(),n=kc(),r=Ac(),i=p(()=>pl(n),[n]),{format:a=(t==null?void 0:t.fieldFormat)??n.formats.fullDate}=e;return p(()=>Ll({adapter:n,format:a,formatDensity:`dense`,isRtl:!1,shouldRespectLeadingZeros:!0,localeText:r,localizedDigits:i,date:null}).map(e=>`${e.startSeparator}${e.placeholder}${e.endSeparator}`).join(``),[n,r,i,a])};g();var Hl=v(()=>!0);function Ul(){return b(Hl)}g();var Wl=v(null);function Gl(){return b(Wl)}g();var Kl=v(null),ql=v({ownerState:{isPickerDisabled:!1,isPickerReadOnly:!1,isPickerValueEmpty:!1,isPickerOpen:!1,pickerVariant:`desktop`,pickerOrientation:`portrait`},rootRefObject:{current:null},labelId:void 0,dismissViews:()=>{},hasUIView:!0,getCurrentViewMode:()=>`UI`,triggerElement:null,viewContainerRole:null,defaultActionBarActions:[],onPopperExited:void 0});function Jl(e){let{contextValue:t,actionsContextValue:n,privateContextValue:r,fieldPrivateContextValue:i,isValidContextValue:a,localeText:o,children:s}=e;return Y(Rl.Provider,{value:t,children:Y(Kl.Provider,{value:n,children:Y(ql.Provider,{value:r,children:Y(Wl.Provider,{value:i,children:Y(Hl.Provider,{value:a,children:Y(Dc,{localeText:o,children:s})})})})})})}g();var Yl=()=>{let e=b(Kl);if(e==null)throw Error(xc(148));return e};g();var Xl=()=>Oc().defaultDates,Zl=e=>{let t=kc(),n=l(void 0);return n.current===void 0&&(n.current=t.date(void 0,e)),n.current};g();var Ql=wt(Y(`path`,{d:`M7 10l5 5 5-5z`}),`ArrowDropDown`),$l=wt(Y(`path`,{d:`M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z`}),`ArrowLeft`),eu=wt(Y(`path`,{d:`M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z`}),`ArrowRight`),tu=wt(Y(`path`,{d:`M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z`}),`Calendar`),nu=wt(P(y,{children:[Y(`path`,{d:`M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z`}),Y(`path`,{d:`M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z`})]}),`Clock`),ru=wt(Y(`path`,{d:`M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z`}),`DateRange`),iu=wt(P(y,{children:[Y(`path`,{d:`M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z`}),Y(`path`,{d:`M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z`})]}),`Time`),au=wt(Y(`path`,{d:`M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z`}),`Clear`);function ou(e){return Ve(`MuiPickersArrowSwitcher`,e)}Ne(`MuiPickersArrowSwitcher`,[`root`,`spacer`,`button`,`previousIconButton`,`nextIconButton`,`leftArrowIcon`,`rightArrowIcon`]),g();var su=()=>b(ql);g();var cu=[`children`,`className`,`slots`,`slotProps`,`isNextDisabled`,`isNextHidden`,`onGoToNext`,`nextLabel`,`isPreviousDisabled`,`isPreviousHidden`,`onGoToPrevious`,`previousLabel`,`labelId`,`classes`],lu=[`ownerState`],uu=[`ownerState`],du=J(`div`,{name:`MuiPickersArrowSwitcher`,slot:`Root`})({display:`flex`}),fu=J(`div`,{name:`MuiPickersArrowSwitcher`,slot:`Spacer`})(({theme:e})=>({width:e.spacing(3)})),pu=J(Qn,{name:`MuiPickersArrowSwitcher`,slot:`Button`})({variants:[{props:{isButtonHidden:!0},style:{visibility:`hidden`}}]}),mu=e=>Le({root:[`root`],spacer:[`spacer`],button:[`button`],previousIconButton:[`previousIconButton`],nextIconButton:[`nextIconButton`],leftArrowIcon:[`leftArrowIcon`],rightArrowIcon:[`rightArrowIcon`]},ou,e),hu=o(function(e,t){let n=j(),r=Mt({props:e,name:`MuiPickersArrowSwitcher`}),{children:i,className:a,slots:o,slotProps:s,isNextDisabled:c,isNextHidden:l,onGoToNext:u,nextLabel:d,isPreviousDisabled:f,isPreviousHidden:p,onGoToPrevious:m,previousLabel:h,labelId:g,classes:_}=r,v=Z(r,cu),{ownerState:y}=su(),b=mu(_),S={isDisabled:c,isHidden:l,goTo:u,label:d},C={isDisabled:f,isHidden:p,goTo:m,label:h},w=(o==null?void 0:o.previousIconButton)??pu,T=It({elementType:w,externalSlotProps:s==null?void 0:s.previousIconButton,additionalProps:{size:`medium`,title:C.label,"aria-label":C.label,disabled:C.isDisabled,edge:`end`,onClick:C.goTo},ownerState:x({},y,{isButtonHidden:C.isHidden??!1}),className:V(b.button,b.previousIconButton)}),E=(o==null?void 0:o.nextIconButton)??pu,D=It({elementType:E,externalSlotProps:s==null?void 0:s.nextIconButton,additionalProps:{size:`medium`,title:S.label,"aria-label":S.label,disabled:S.isDisabled,edge:`start`,onClick:S.goTo},ownerState:x({},y,{isButtonHidden:S.isHidden??!1}),className:V(b.button,b.nextIconButton)}),O=(o==null?void 0:o.leftArrowIcon)??$l,k=Z(It({elementType:O,externalSlotProps:s==null?void 0:s.leftArrowIcon,additionalProps:{fontSize:`inherit`},ownerState:y,className:b.leftArrowIcon}),lu),A=(o==null?void 0:o.rightArrowIcon)??eu,M=Z(It({elementType:A,externalSlotProps:s==null?void 0:s.rightArrowIcon,additionalProps:{fontSize:`inherit`},ownerState:y,className:b.rightArrowIcon}),uu);return P(du,x({ref:t,className:V(b.root,a),ownerState:y},v,{children:[Y(w,x({},T,{children:n?Y(A,x({},M)):Y(O,x({},k))})),i?Y(_n,{variant:`subtitle1`,component:`span`,id:g,children:i}):Y(fu,{className:b.spacer,ownerState:y}),Y(E,x({},D,{children:n?Y(O,x({},k)):Y(A,x({},M))}))]}))}),gu={hasNextStep:!1,hasSeveralSteps:!1,goToNextStep:()=>{},areViewsInSameStep:()=>!0};function _u(e){let{steps:t,isViewMatchingStep:n,onStepChange:r}=e;return e=>{if(t==null)return gu;let i=t.findIndex(t=>n(e.view,t)),a=i===-1||i===t.length-1?null:t[i+1];return{hasNextStep:a!=null,hasSeveralSteps:t.length>1,goToNextStep:()=>{a!=null&&r(x({},e,{step:a}))},areViewsInSameStep:(e,r)=>t.find(t=>n(e,t))===t.find(e=>n(r,e))}}}g();function vu({onChange:e,onViewChange:t,openTo:n,view:r,views:i,autoFocus:o,focusedView:s,onFocusedViewChange:c,getStepNavigation:u}){let d=l(n),f=l(i),p=l(i.includes(n)?n:i[0]),[m,h]=Zt({name:`useViews`,state:`view`,controlled:r,default:p.current}),g=l(o?m:null),[_,v]=Zt({name:`useViews`,state:`focusedView`,controlled:s,default:g.current}),y=u?u({setView:h,view:m,defaultView:p.current,views:i}):gu;a(()=>{(d.current&&d.current!==n||f.current&&f.current.some(e=>!i.includes(e)))&&(h(i.includes(n)?n:i[0]),f.current=i,d.current=n)},[n,h,m,i]);let b=i.indexOf(m),S=i[b-1]??null,C=i[b+1]??null,w=G((e,t)=>{v(t?e:t=>e===t?null:t),c==null||c(e,t)}),T=G(e=>{w(e,!0),e!==m&&(h(e),t&&t(e))}),E=G(()=>{C&&T(C)}),D=G((t,n,r)=>{let a=n===`finish`,o=r?i.indexOf(r)<i.length-1:!!C;e(t,a&&o?`partial`:n,r);let s=null;if(r!=null&&r!==m?s=r:a&&(s=m),s==null)return;let c=i[i.indexOf(s)+1];c==null||!y.areViewsInSameStep(s,c)||T(c)});return x({},y,{view:m,setView:T,focusedView:_,setFocusedView:w,nextView:C,previousView:S,defaultView:i.includes(n)?n:i[0],goToNextView:E,setValueAndGoToNextView:D})}g();function yu(e,{disableFuture:t,maxDate:n,timezone:r}){let i=kc();return p(()=>{let a=i.date(void 0,r),o=i.startOfMonth(t&&i.isBefore(a,n)?a:n);return!i.isAfter(o,e)},[t,n,e,i,r])}function bu(e,{disablePast:t,minDate:n,timezone:r}){let i=kc();return p(()=>{let a=i.date(void 0,r),o=i.startOfMonth(t&&i.isAfter(a,n)?a:n);return!i.isBefore(o,i.startOfMonth(e))},[t,n,e,i,r])}function xu(e,t,n,r){let i=kc(),a=p(()=>i.isValid(e)?e:null,[i,e]);return{meridiemMode:nl(a,i),handleMeridiemChange:f(e=>{n(a==null?null:il(a,e,!!t,i),r??`partial`)},[t,a,n,r,i])}}var Su=J(`div`,{slot:`internal`,shouldForwardProp:void 0})({overflow:`hidden`,width:320,maxHeight:336,display:`flex`,flexDirection:`column`,margin:`0 auto`});function Cu(e){return Ve(`MuiTimeClock`,e)}var wu=Ne(`MuiTimeClock`,[`root`,`arrowSwitcher`]),Tu={x:220/2,y:220/2},Eu={x:Tu.x,y:0},Du=Eu.x-Tu.x,Ou=Eu.y-Tu.y,ku=e=>180/Math.PI*e,Au=(e,t,n)=>{let r=t-Tu.x,i=n-Tu.y,a=ku(Math.atan2(Du,Ou)-Math.atan2(r,i));a=Math.round(a/e)*e,a%=360;let o=Math.floor(a/e)||0,s=r**2+i**2;return{value:o,distance:Math.sqrt(s)}},ju=(e,t,n=1)=>{let{value:r}=Au(n*6,e,t);return r=r*n%60,r},Mu=(e,t,n)=>{let{value:r,distance:i}=Au(30,e,t),a=r||12;return n?a%=12:i<220/2-36&&(a+=12,a%=24),a};function Nu(e){return Ve(`MuiClockPointer`,e)}var Pu=Ne(`MuiClockPointer`,[`root`,`thumb`]);g();var Fu=[`className`,`classes`,`isBetweenTwoClockValues`,`isInner`,`type`,`viewValue`],Iu=e=>Le({root:[`root`],thumb:[`thumb`]},Nu,e),Lu=J(`div`,{name:`MuiClockPointer`,slot:`Root`})(({theme:e})=>({width:2,backgroundColor:(e.vars||e).palette.primary.main,position:`absolute`,left:`calc(50% - 1px)`,bottom:`50%`,transformOrigin:`center bottom 0px`,variants:[{props:{isClockPointerAnimated:!0},style:{transition:e.transitions.create([`transform`,`height`])}}]})),Ru=J(`div`,{name:`MuiClockPointer`,slot:`Thumb`})(({theme:e})=>({width:4,height:4,backgroundColor:(e.vars||e).palette.primary.contrastText,borderRadius:`50%`,position:`absolute`,top:-21,left:`calc(50% - ${36/2}px)`,border:`${32/2}px solid ${(e.vars||e).palette.primary.main}`,boxSizing:`content-box`,variants:[{props:{isClockPointerBetweenTwoValues:!1},style:{backgroundColor:(e.vars||e).palette.primary.main}}]}));function zu(e){let t=Mt({props:e,name:`MuiClockPointer`}),{className:n,classes:r,isBetweenTwoClockValues:i,isInner:o,type:s,viewValue:c}=t,u=Z(t,Fu),d=l(s);a(()=>{d.current=s},[s]);let{ownerState:f}=su(),p=x({},f,{isClockPointerAnimated:d.current!==s,isClockPointerBetweenTwoValues:i}),m=Iu(r);return Y(Lu,x({style:(()=>{let e=360/(s===`hours`?12:60)*c;return s===`hours`&&c>12&&(e-=360),{height:Math.round((o?.26:.4)*220),transform:`rotateZ(${e}deg)`}})(),className:V(m.root,n),ownerState:p},u,{children:Y(Ru,{ownerState:p,className:m.thumb})}))}function Bu(e){return Ve(`MuiClock`,e)}var Vu=Ne(`MuiClock`,[`root`,`clock`,`wrapper`,`squareMask`,`pin`,`amButton`,`pmButton`,`meridiemText`,`selected`]);g();var Hu=(e,t)=>{let n={root:[`root`],clock:[`clock`],wrapper:[`wrapper`],squareMask:[`squareMask`],pin:[`pin`],amButton:[`amButton`,t.clockMeridiemMode===`am`&&`selected`],pmButton:[`pmButton`,t.clockMeridiemMode===`pm`&&`selected`],meridiemText:[`meridiemText`]};return Le(n,Bu,e)},Uu=J(`div`,{name:`MuiClock`,slot:`Root`})(({theme:e})=>({display:`flex`,justifyContent:`center`,alignItems:`center`,margin:e.spacing(2)})),Wu=J(`div`,{name:`MuiClock`,slot:`Clock`})({backgroundColor:`rgba(0,0,0,.07)`,borderRadius:`50%`,height:220,width:220,flexShrink:0,position:`relative`,pointerEvents:`none`}),Gu=J(`div`,{name:`MuiClock`,slot:`Wrapper`})({"&:focus":{outline:`none`}}),Ku=J(`div`,{name:`MuiClock`,slot:`SquareMask`})({width:`100%`,height:`100%`,position:`absolute`,pointerEvents:`auto`,outline:0,touchAction:`none`,userSelect:`none`,variants:[{props:{isClockDisabled:!1},style:{"@media (pointer: fine)":{cursor:`pointer`,borderRadius:`50%`},"&:active":{cursor:`move`}}}]}),qu=J(`div`,{name:`MuiClock`,slot:`Pin`})(({theme:e})=>({width:6,height:6,borderRadius:`50%`,backgroundColor:(e.vars||e).palette.primary.main,position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`})),Ju=(e,t)=>({zIndex:1,bottom:8,paddingLeft:4,paddingRight:4,width:36,variants:[{props:{clockMeridiemMode:t},style:{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:hover":{backgroundColor:(e.vars||e).palette.primary.light}}}]}),Yu=J(Qn,{name:`MuiClock`,slot:`AmButton`})(({theme:e})=>x({},Ju(e,`am`),{position:`absolute`,left:8})),Xu=J(Qn,{name:`MuiClock`,slot:`PmButton`})(({theme:e})=>x({},Ju(e,`pm`),{position:`absolute`,right:8})),Zu=J(_n,{name:`MuiClock`,slot:`MeridiemText`})({overflow:`hidden`,whiteSpace:`nowrap`,textOverflow:`ellipsis`});function Qu(e){let{ampm:t,ampmInClock:n,autoFocus:r,children:i,value:o,handleMeridiemChange:s,isTimeDisabled:c,meridiemMode:u,minutesStep:d=1,onChange:f,selectedId:p,type:m,viewValue:h,viewRange:[g,_],disabled:v=!1,readOnly:b,className:S,classes:C}=Mt({props:e,name:`MuiClock`}),w=kc(),T=Ac(),{ownerState:E}=su(),D=x({},E,{isClockDisabled:v,clockMeridiemMode:u}),O=l(!1),k=l(null),A=l(null),j=l(void 0),M=Hu(C,D),N=c(h,m),ee=!t&&m===`hours`&&(h<1||h>12),F=(e,t)=>{v||b||c(e,m)||f(e,t)},te=(e,n)=>{let r=A.current;if(!r)return;let i=r.getBoundingClientRect(),a=e.clientX-i.left,o=e.clientY-i.top,s=m===`seconds`||m===`minutes`?ju(a,o,d):Mu(a,o,!!t);F(s,n)},I=()=>{var e;O.current=!1,k.current=null,(e=j.current)==null||e.call(j)},L=G(e=>{e.pointerId===k.current&&(e.preventDefault(),te(e,`shallow`))}),R=G(e=>{e.pointerId===k.current&&(I(),te(e,`finish`))}),z=G(e=>{e.pointerId===k.current&&I()}),ne=e=>{if(e.button>0||e.isPrimary===!1||v||b)return;I(),O.current=!0,k.current=e.pointerId;let t=ir(A.current);t.addEventListener(`pointermove`,L),t.addEventListener(`pointerup`,R),t.addEventListener(`pointercancel`,z),j.current=()=>{t.removeEventListener(`pointermove`,L),t.removeEventListener(`pointerup`,R),t.removeEventListener(`pointercancel`,z),j.current=void 0},te(e.nativeEvent,`shallow`)},re=m!==`hours`&&h%5!=0,ie=m===`minutes`?d:1,ae=l(null);un(()=>{r&&ae.current.focus()},[r]),a(()=>()=>{var e;return(e=j.current)==null?void 0:e.call(j)},[]);let B=e=>Math.max(g,Math.min(_,e)),oe=e=>(e+(_+1))%(_+1);return P(Uu,{className:V(M.root,S),children:[P(Wu,{className:M.clock,children:[Y(Ku,{ref:A,onPointerDown:ne,ownerState:D,className:M.squareMask}),!N&&P(y,{children:[Y(qu,{className:M.pin}),o!=null&&Y(zu,{type:m,viewValue:h,isInner:ee,isBetweenTwoClockValues:re})]}),Y(Gu,{"aria-activedescendant":p,"aria-label":T.clockLabelText(m,o==null?null:w.format(o,t?`fullTime12h`:`fullTime24h`)),ref:ae,role:`listbox`,onKeyDown:e=>{if(!O.current)switch(e.key){case`Home`:F(g,`partial`),e.preventDefault();break;case`End`:F(_,`partial`),e.preventDefault();break;case`ArrowUp`:F(oe(h+ie),`partial`),e.preventDefault();break;case`ArrowDown`:F(oe(h-ie),`partial`),e.preventDefault();break;case`PageUp`:F(B(h+5),`partial`),e.preventDefault();break;case`PageDown`:F(B(h-5),`partial`),e.preventDefault();break;case`Enter`:case` `:F(h,`finish`),e.preventDefault()}},tabIndex:0,className:M.wrapper,children:i})]}),t&&n&&P(y,{children:[Y(Yu,{onClick:b?void 0:()=>s(`am`),disabled:v||u===null,ownerState:D,className:M.amButton,title:qc(w,`am`),children:Y(Zu,{variant:`caption`,className:M.meridiemText,children:qc(w,`am`)})}),Y(Xu,{disabled:v||u===null,onClick:b?void 0:()=>s(`pm`),ownerState:D,className:M.pmButton,title:qc(w,`pm`),children:Y(Zu,{variant:`caption`,className:M.meridiemText,children:qc(w,`pm`)})})]})]})}function $u(e){return Ve(`MuiClockNumber`,e)}var ed=Ne(`MuiClockNumber`,[`root`,`selected`,`disabled`]);g();var td=[`className`,`classes`,`disabled`,`index`,`inner`,`label`,`selected`],nd=(e,t)=>{let n={root:[`root`,t.isClockNumberSelected&&`selected`,t.isClockNumberDisabled&&`disabled`]};return Le(n,$u,e)},rd=J(`span`,{name:`MuiClockNumber`,slot:`Root`,overridesResolver:(e,t)=>[t.root,{[`&.${ed.disabled}`]:t.disabled},{[`&.${ed.selected}`]:t.selected}]})(({theme:e})=>({height:36,width:36,position:`absolute`,left:`calc((100% - 36px) / 2)`,display:`inline-flex`,justifyContent:`center`,alignItems:`center`,borderRadius:`50%`,color:(e.vars||e).palette.text.primary,fontFamily:e.typography.fontFamily,"&:focused":{backgroundColor:(e.vars||e).palette.background.paper},[`&.${ed.selected}`]:{color:(e.vars||e).palette.primary.contrastText},[`&.${ed.disabled}`]:{pointerEvents:`none`,color:(e.vars||e).palette.text.disabled},variants:[{props:{isClockNumberInInnerRing:!0},style:x({},e.typography.body2,{color:(e.vars||e).palette.text.secondary})}]}));function id(e){let t=Mt({props:e,name:`MuiClockNumber`}),{className:n,classes:r,disabled:i,index:a,inner:o,label:s,selected:c}=t,l=Z(t,td),{ownerState:u}=su(),d=x({},u,{isClockNumberInInnerRing:o,isClockNumberSelected:c,isClockNumberDisabled:i}),f=nd(r,d),p=a%12/12*Math.PI*2-Math.PI/2,m=182/2*(o?.65:1),h=Math.round(Math.cos(p)*m),g=Math.round(Math.sin(p)*m);return Y(rd,x({className:V(f.root,n),"aria-disabled":i?!0:void 0,"aria-selected":c?!0:void 0,role:`option`,style:{transform:`translate(${h}px, ${g+184/2}px`},ownerState:d},l,{children:s}))}g();var ad=({ampm:e,value:t,getClockNumberText:n,isDisabled:r,selectedId:i,adapter:a})=>{let o=t?a.getHours(t):null,s=[],c=+!!e,l=e?12:23,u=t=>o===null?!1:e?t===12?o===12||o===0:o===t||o-12===t:o===t;for(let t=c;t<=l;t+=1){let o=t.toString();t===0&&(o=`00`);let c=!e&&(t===0||t>12);o=a.formatNumber(o);let l=u(t);s.push(Y(id,{id:l?i:void 0,index:t,inner:c,selected:l,disabled:r(t),label:o,"aria-label":n(o)},t))}return s},od=({adapter:e,value:t,isDisabled:n,getClockNumberText:r,selectedId:i})=>{let a=e.formatNumber;return[[5,a(`05`)],[10,a(`10`)],[15,a(`15`)],[20,a(`20`)],[25,a(`25`)],[30,a(`30`)],[35,a(`35`)],[40,a(`40`)],[45,a(`45`)],[50,a(`50`)],[55,a(`55`)],[0,a(`00`)]].map(([e,a],o)=>{let s=e===t;return Y(id,{label:a,id:s?i:void 0,index:o+1,inner:!1,disabled:n(e),selected:s,"aria-label":r(a)},e)})};g();var sd=({name:e,timezone:t,value:n,defaultValue:r,referenceDate:i,onChange:a,valueManager:o})=>{let s=kc(),[c,l]=Zt({name:e,state:`value`,controlled:n,default:r??o.emptyValue}),u=p(()=>o.getTimezone(s,c),[s,o,c]),d=G(e=>u==null?e:o.setTimezone(s,u,e)),f=p(()=>t||u||(i?s.getTimezone(Array.isArray(i)?i[0]:i):`default`),[t,u,i,s]);return{value:p(()=>o.setTimezone(s,f,c),[o,s,f,c]),handleValueChange:G((e,...t)=>{let n=d(e);l(n),a==null||a(n,...t)}),timezone:f}},cd={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},ld=e=>Math.max(...e.map(e=>cd[e.type]??1)),ud=(e,t,n)=>{if(t===cd.year)return e.startOfYear(n);if(t===cd.month)return e.startOfMonth(n);if(t===cd.day)return e.startOfDay(n);let r=n;return t<cd.minutes&&(r=e.setMinutes(r,0)),t<cd.seconds&&(r=e.setSeconds(r,0)),t<cd.milliseconds&&(r=e.setMilliseconds(r,0)),r},dd=({props:e,adapter:t,granularity:n,timezone:r,getTodayDate:i})=>{let a=i?i():ud(t,n,Kc(t,r));e.minDate!=null&&t.isAfterDay(e.minDate,a)&&(a=ud(t,n,e.minDate)),e.maxDate!=null&&t.isBeforeDay(e.maxDate,a)&&(a=ud(t,n,e.maxDate));let o=ol(e.disableIgnoringDatePartForTimeValidation??!1,t);return e.minTime!=null&&o(e.minTime,a)&&(a=ud(t,n,e.disableIgnoringDatePartForTimeValidation?e.minTime:Bc(t,a,e.minTime))),e.maxTime!=null&&o(a,e.maxTime)&&(a=ud(t,n,e.disableIgnoringDatePartForTimeValidation?e.maxTime:Bc(t,a,e.maxTime))),a},fd=[`value`,`referenceDate`],pd={emptyValue:null,getTodayValue:Kc,getInitialReferenceValue:e=>{let{value:t,referenceDate:n}=e,r=Z(e,fd);return r.adapter.isValid(t)?t:n??dd(r)},cleanValue:Hc,areValuesEqual:Wc,isSameError:(e,t)=>e===t,hasError:e=>e!=null,defaultErrorState:null,getTimezone:(e,t)=>e.isValid(t)?e.getTimezone(t):null,setTimezone:(e,t,n)=>n==null?null:e.setTimezone(n,t)},md={updateReferenceValue:(e,t,n)=>e.isValid(t)?t:n,getSectionsFromValue:(e,t)=>t(e),getHiddenInputValueFromSections:wl,parseValueStr:(e,t,n)=>n(e.trim(),t),getDateFromSection:e=>e,getDateSectionsFromValue:e=>e,updateDateInValue:(e,t,n)=>n,clearDateSections:e=>e.map(e=>x({},e,{value:``}))};g();var hd=({value:e,referenceDate:t,adapter:n,props:r,timezone:i})=>{let a=p(()=>pd.getInitialReferenceValue({value:e,adapter:n,props:r,referenceDate:t,granularity:cd.day,timezone:i,getTodayDate:()=>Kc(n,i,`date`)}),[t,i]);return e??a};g();var gd=`ampm.ampmInClock.autoFocus.slots.slotProps.value.defaultValue.referenceDate.disableIgnoringDatePartForTimeValidation.maxTime.minTime.disableFuture.disablePast.minutesStep.shouldDisableTime.showViewSwitcher.onChange.view.views.openTo.onViewChange.focusedView.onFocusedViewChange.className.classes.disabled.readOnly.timezone`.split(`.`),_d=e=>Le({root:[`root`],arrowSwitcher:[`arrowSwitcher`]},Cu,e),vd=J(Su,{name:`MuiTimeClock`,slot:`Root`})({display:`flex`,flexDirection:`column`,position:`relative`}),yd=J(hu,{name:`MuiTimeClock`,slot:`ArrowSwitcher`})({position:`absolute`,right:12,top:15}),bd=[`hours`,`minutes`],xd=o(function(e,t){let n=kc(),r=Mt({props:e,name:`MuiTimeClock`}),{ampm:i=n.is12HourCycleInCurrentLocale(),ampmInClock:a=!1,autoFocus:o,slots:s,slotProps:c,value:l,defaultValue:u,referenceDate:d,disableIgnoringDatePartForTimeValidation:m=!1,maxTime:h,minTime:g,disableFuture:_,disablePast:v,minutesStep:y=1,shouldDisableTime:b,showViewSwitcher:S,onChange:C,view:w,views:T=bd,openTo:E,onViewChange:D,focusedView:O,onFocusedViewChange:k,className:A,classes:j,disabled:M,readOnly:N,timezone:ee}=r,F=Z(r,gd),{value:te,handleValueChange:I,timezone:L}=sd({name:`TimeClock`,timezone:ee,value:l,defaultValue:u,referenceDate:d,onChange:C,valueManager:pd}),R=hd({value:te,referenceDate:d,adapter:n,props:r,timezone:L}),z=Ac(),ne=Zl(L),re=mn(),{ownerState:ie}=su(),{view:ae,setView:B,previousView:oe,nextView:se,setValueAndGoToNextView:ce}=vu({view:w,views:T,openTo:E,onViewChange:D,onChange:I,focusedView:O,onFocusedViewChange:k}),{meridiemMode:le,handleMeridiemChange:H}=xu(R,i,ce),ue=f((e,t)=>{let r=ol(m,n),a=t===`hours`||t===`minutes`&&T.includes(`seconds`),o=({start:e,end:t})=>!(g&&r(g,t)||h&&r(e,h)||_&&r(e,ne)||v&&r(ne,a?t:e)),s=(e,r=1)=>{if(e%r!==0)return!1;if(b)switch(t){case`hours`:return!b(n.setHours(R,e),`hours`);case`minutes`:return!b(n.setMinutes(R,e),`minutes`);case`seconds`:return!b(n.setSeconds(R,e),`seconds`);default:return!1}return!0};switch(t){case`hours`:{let t=rl(e,le,i),r=n.setHours(R,t);return n.getHours(r)!==t||!o({start:n.setSeconds(n.setMinutes(r,0),0),end:n.setSeconds(n.setMinutes(r,59),59)})||!s(t)}case`minutes`:{let t=n.setMinutes(R,e);return!o({start:n.setSeconds(t,0),end:n.setSeconds(t,59)})||!s(e,y)}case`seconds`:{let t=n.setSeconds(R,e);return!o({start:t,end:t})||!s(e)}default:throw Error(`not supported`)}},[i,R,m,h,le,g,y,b,n,_,v,ne,T]),de=p(()=>{switch(ae){case`hours`:{let e=(e,t)=>{let r=rl(e,le,i);ce(n.setHours(R,r),t,`hours`)},t=n.getHours(R),r;return r=i?t>12?[12,23]:[0,11]:[0,23],{onChange:e,viewValue:t,children:ad({value:te,adapter:n,ampm:i,onChange:e,getClockNumberText:z.hoursClockNumberText,isDisabled:e=>M||ue(e,`hours`),selectedId:re}),viewRange:r}}case`minutes`:{let e=n.getMinutes(R),t=(e,t)=>{ce(n.setMinutes(R,e),t,`minutes`)};return{viewValue:e,onChange:t,children:od({adapter:n,value:e,onChange:t,getClockNumberText:z.minutesClockNumberText,isDisabled:e=>M||ue(e,`minutes`),selectedId:re}),viewRange:[0,59]}}case`seconds`:{let e=n.getSeconds(R),t=(e,t)=>{ce(n.setSeconds(R,e),t,`seconds`)};return{viewValue:e,onChange:t,children:od({adapter:n,value:e,onChange:t,getClockNumberText:z.secondsClockNumberText,isDisabled:e=>M||ue(e,`seconds`),selectedId:re}),viewRange:[0,59]}}default:throw Error(xc(147))}},[ae,n,te,i,z.hoursClockNumberText,z.minutesClockNumberText,z.secondsClockNumberText,le,ce,R,ue,re,M]),U=_d(j);return P(vd,x({ref:t,className:V(U.root,A),ownerState:ie},F,{children:[Y(Qu,x({autoFocus:o??!!O,ampmInClock:a&&T.includes(`hours`),value:te,type:ae,ampm:i,minutesStep:y,isTimeDisabled:ue,meridiemMode:le,handleMeridiemChange:H,selectedId:re,disabled:M,readOnly:N},de)),S&&Y(yd,{className:U.arrowSwitcher,slots:s,slotProps:c,onGoToPrevious:()=>B(oe),isPreviousDisabled:!oe,previousLabel:z.openPreviousView,onGoToNext:()=>B(se),isNextDisabled:!se,nextLabel:z.openNextView,ownerState:ie})]}))});function Sd(e){return Ve(`MuiDigitalClock`,e)}var Cd=Ne(`MuiDigitalClock`,[`root`,`list`,`item`]);function wd(e,t){return Array.isArray(t)?t.every(t=>e.indexOf(t)!==-1):e.indexOf(t)!==-1}var Td=e=>{setTimeout(e,0)},Ed=(e=document)=>{let t=e.activeElement;return t?t.shadowRoot?Ed(t.shadowRoot):t:null},Dd=e=>Ed(ir(e)),Od=e=>Array.from(e.children).indexOf(Dd(e)),kd=`@media (pointer: fine)`;function Ad(e){let t={};for(let n of Object.keys(e))(n.startsWith(`data-`)||n.startsWith(`aria-`))&&(t[n]=e[n]);return t}function jd(...e){return e.reduce((e,t)=>(Array.isArray(t)?e.push(...t):t!=null&&e.push(t),e),[])}g();var Md=`ampm.timeStep.autoFocus.slots.slotProps.value.defaultValue.referenceDate.disableIgnoringDatePartForTimeValidation.maxTime.minTime.disableFuture.disablePast.minutesStep.shouldDisableTime.onChange.view.openTo.onViewChange.focusedView.onFocusedViewChange.className.classes.disabled.readOnly.views.skipDisabled.timezone`.split(`.`),Nd=e=>Le({root:[`root`],list:[`list`],item:[`item`]},Sd,e),Pd=J(Su,{name:`MuiDigitalClock`,slot:`Root`})({overflowY:`auto`,width:`100%`,scrollbarWidth:`thin`,"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:`auto`},maxHeight:232,variants:[{props:{hasDigitalClockAlreadyBeenRendered:!0},style:{"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:`smooth`}}}]}),Fd=J(ut,{name:`MuiDigitalClock`,slot:`List`})({padding:0}),Id=J(it,{name:`MuiDigitalClock`,slot:`Item`,shouldForwardProp:e=>e!==`itemValue`&&e!==`formattedValue`})(({theme:e})=>({padding:`8px 16px`,margin:`2px 4px`,"&:first-of-type":{marginTop:4},"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.hoverOpacity)},"&.Mui-selected":{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:focus-visible, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}},"&.Mui-focusVisible":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.focusOpacity)}})),Ld=o(function(e,t){let n=kc(),r=l(null),i=oe(t,r),a=l(null),o=l(null),s=Mt({props:e,name:`MuiDigitalClock`}),{ampm:c=n.is12HourCycleInCurrentLocale(),timeStep:u=30,autoFocus:d,slots:m,slotProps:h,value:g,defaultValue:_,referenceDate:v,disableIgnoringDatePartForTimeValidation:y=!1,maxTime:b,minTime:S,disableFuture:C,disablePast:w,minutesStep:T=1,shouldDisableTime:E,onChange:D,view:O,openTo:k,onViewChange:A,focusedView:j,onFocusedViewChange:M,className:N,classes:ee,disabled:P,readOnly:F,views:te=[`hours`],skipDisabled:I=!1,timezone:L}=s,R=Z(s,Md),{value:z,handleValueChange:ne,timezone:re}=sd({name:`DigitalClock`,timezone:L,value:g,defaultValue:_,referenceDate:v,onChange:D,valueManager:pd}),ie=Ac(),ae=Zl(re),{ownerState:B}=su(),se=x({},B,{hasDigitalClockAlreadyBeenRendered:!!r.current}),ce=Nd(ee),le=(m==null?void 0:m.digitalClockItem)??Id,H=It({elementType:le,externalSlotProps:h==null?void 0:h.digitalClockItem,ownerState:se,className:ce.item}),ue=hd({value:z,referenceDate:v,adapter:n,props:s,timezone:re}),{setValueAndGoToNextView:de}=vu({view:O,views:te,openTo:k,onViewChange:A,onChange:G(e=>ne(e,`finish`,`hours`)),focusedView:j,onFocusedViewChange:M}),U=G(e=>{de(e,`finish`)});un(()=>{if(r.current===null)return;let e=r.current.querySelector(`[role="listbox"] [role="option"][tabindex="0"], [role="listbox"] [role="option"][aria-selected="true"]`);if(!e)return;let t=e.offsetTop;(d||j)&&e!==o.current&&(o.current=e,e.focus()),r.current.scrollTop=t-4});let fe=f(e=>{let t=ol(y,n);return!!(S&&t(S,e)||b&&t(e,b)||C&&t(e,ae)||w&&t(ae,e))||!(n.getMinutes(e)%T===0&&(!E||!E(e,`hours`)))},[y,n,S,b,C,ae,w,T,E]),pe=p(()=>{let e=[],t=n.startOfDay(ue);for(;n.isSameDay(ue,t);)e.push(t),t=n.addMinutes(t,u);return e},[ue,u,n]),W=pe.findIndex(e=>n.isEqual(e,ue));return Y(Pd,x({ref:i,className:V(ce.root,N),ownerState:se},R,{children:Y(Fd,{ref:a,role:`listbox`,"aria-label":ie.timePickerToolbarTitle,className:ce.list,onKeyDown:e=>{switch(e.key){case`PageUp`:{let t=Od(a.current)-5,n=a.current.children[Math.max(0,t)];n&&n.focus(),e.preventDefault();break}case`PageDown`:{let t=Od(a.current)+5,n=a.current.children,r=n[Math.min(n.length-1,t)];r&&r.focus(),e.preventDefault();break}}},children:pe.map((e,t)=>{let r=fe(e);if(I&&r)return null;let i=n.isEqual(e,z),a=n.format(e,c?`fullTime12h`:`fullTime24h`);return Y(le,x({onClick:()=>!F&&U(e),selected:i,disabled:P||r,disableRipple:F,role:`option`,"aria-disabled":F,"aria-selected":i,tabIndex:W===t||W===-1&&t===0?0:-1,itemValue:e,formattedValue:a},H,{children:a}),`${e.valueOf()}-${a}`)})})}))});function Rd(e){return Ve(`MuiMultiSectionDigitalClock`,e)}var zd=Ne(`MuiMultiSectionDigitalClock`,[`root`]);function Bd(e){return Ve(`MuiMultiSectionDigitalClockSection`,e)}var Vd=Ne(`MuiMultiSectionDigitalClockSection`,[`root`,`item`]);g();var Hd=[`autoFocus`,`onChange`,`className`,`classes`,`disabled`,`readOnly`,`items`,`active`,`slots`,`slotProps`,`skipDisabled`],Ud=e=>Le({root:[`root`],item:[`item`]},Bd,e),Wd=J(ut,{name:`MuiMultiSectionDigitalClockSection`,slot:`Root`})(({theme:e})=>({maxHeight:232,width:56,padding:0,overflow:`hidden`,scrollbarWidth:`thin`,"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:`auto`},"@media (pointer: fine)":{"&:hover":{overflowY:`auto`}},"@media (pointer: none), (pointer: coarse)":{overflowY:`auto`},"&:not(:first-of-type)":{borderLeft:`1px solid ${(e.vars||e).palette.divider}`},variants:[{props:{hasDigitalClockAlreadyBeenRendered:!0},style:{"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:`smooth`}}}]})),Gd=J(it,{name:`MuiMultiSectionDigitalClockSection`,slot:`Item`})(({theme:e})=>({padding:8,margin:`2px 4px`,width:48,justifyContent:`center`,"&:first-of-type":{marginTop:4},"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.hoverOpacity)},"&.Mui-selected":{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:focus-visible, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}},"&.Mui-focusVisible":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.focusOpacity)}})),Kd=o(function(e,t){let n=l(null),r=oe(t,n),i=l(null),o=l(!1),s=Mt({props:e,name:`MuiMultiSectionDigitalClockSection`}),{autoFocus:c,onChange:u,className:d,classes:f,disabled:p,readOnly:m,items:h,active:g,slots:_,slotProps:v,skipDisabled:y}=s,b=Z(s,Hd),{ownerState:S}=su(),C=x({},S,{hasDigitalClockAlreadyBeenRendered:!!n.current}),w=Ud(f),T=(_==null?void 0:_.digitalClockSectionItem)??Gd;un(()=>{if(n.current===null)return;let e=n.current.querySelector(`[role="option"][tabindex="0"], [role="option"][aria-selected="true"]`);if(!e)return;let t=document.activeElement,r=i.current===e,a=!!t&&n.current.contains(t),s=r&&o.current;if(g&&c&&(!r||s)&&(i.current==null||o.current||a)&&(i.current=e,o.current=!1,e.focus()),r)return;let l=e.offsetTop,u=e.offsetHeight,d=n.current.clientHeight,f=n.current.scrollHeight,p=l-d/2+u/2,m=f-d,h=Math.min(p,m);n.current.scrollTop=Math.max(0,h)});let E=G(e=>{let t=e.relatedTarget,r=t==null?void 0:t.parentElement,a=t==null?void 0:t.getAttribute(`role`),s=(r==null?void 0:r.nodeName)===`UL`&&r!==n.current||a===`gridcell`;o.current=s,i.current&&(r==null?void 0:r.nodeName)===`UL`&&r!==n.current&&(i.current=null)});a(()=>{g||(i.current=null)},[g]);let D=h.findIndex(e=>e.isFocused(e.value)),O=G(e=>{switch(e.key){case`Tab`:o.current=!0;break;case`PageUp`:{let t=Od(n.current)-5,r=n.current.children[Math.max(0,t)];r&&r.focus(),e.preventDefault();break}case`PageDown`:{let t=Od(n.current)+5,r=n.current.children,i=r[Math.min(r.length-1,t)];i&&i.focus(),e.preventDefault();break}}});return Y(Wd,x({ref:r,className:V(w.root,d),ownerState:C,role:`listbox`,onKeyDown:O,onBlur:E},b,{children:h.map((e,t)=>{var n;let r=(n=e.isDisabled)==null?void 0:n.call(e,e.value),i=p||r;if(y&&i)return null;let a=e.isSelected(e.value),o=D===t||D===-1&&t===0?0:-1;return Y(T,x({onClick:()=>!m&&u(e.value),selected:a,disabled:i,disableRipple:m,role:`option`,"aria-disabled":m||i||void 0,"aria-label":e.ariaLabel,"aria-selected":a,tabIndex:o,className:w.item},v==null?void 0:v.digitalClockSectionItem,{children:e.label}),e.label)})}))}),qd=({now:e,value:t,adapter:n,ampm:r,isDisabled:i,resolveAriaLabel:a,timeStep:o,valueOrReferenceDate:s})=>{let c=t?n.getHours(t):null,l=[],u=(e,t)=>{let n=t??c;return n===null?!1:r?e===12?n===12||n===0:n===e||n-12===e:n===e},d=e=>u(e,n.getHours(s)),f=n.setDate(n.setMonth(n.startOfDay(e),0),15),p=r?11:23;for(let e=0;e<=p;e+=o){let t=n.format(n.setHours(f,e),r?`hours12h`:`hours24h`),o=a(parseInt(t,10).toString());t=n.formatNumber(t),l.push({value:e,label:t,isSelected:u,isDisabled:i,isFocused:d,ariaLabel:o})}return l},Jd=({value:e,adapter:t,isDisabled:n,timeStep:r,resolveLabel:i,resolveAriaLabel:a,hasValue:o=!0})=>{let s=t=>e!==null&&o&&e===t,c=t=>e===t;return[...Array.from({length:Math.ceil(60/r)},(e,o)=>{let l=r*o;return{value:l,label:t.formatNumber(i(l)),isDisabled:n,isSelected:s,isFocused:c,ariaLabel:a(l.toString())}})]};g();var Yd=`ampm.timeSteps.autoFocus.slots.slotProps.value.defaultValue.referenceDate.disableIgnoringDatePartForTimeValidation.maxTime.minTime.disableFuture.disablePast.minutesStep.shouldDisableTime.onChange.view.views.openTo.onViewChange.focusedView.onFocusedViewChange.className.classes.disabled.readOnly.skipDisabled.timezone`.split(`.`),Xd=e=>Le({root:[`root`]},Rd,e),Zd=J(Su,{name:`MuiMultiSectionDigitalClock`,slot:`Root`})(({theme:e})=>({flexDirection:`row`,width:`100%`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`})),Qd=o(function(e,t){let n=kc(),r=j(),i=Mt({props:e,name:`MuiMultiSectionDigitalClock`}),{ampm:a=n.is12HourCycleInCurrentLocale(),timeSteps:o,autoFocus:s,slots:c,slotProps:l,value:u,defaultValue:d,referenceDate:m,disableIgnoringDatePartForTimeValidation:h=!1,maxTime:g,minTime:_,disableFuture:v,disablePast:y,minutesStep:b=1,shouldDisableTime:S,onChange:C,view:w,views:T=[`hours`,`minutes`],openTo:E,onViewChange:D,focusedView:O,onFocusedViewChange:k,className:A,classes:M,disabled:N,readOnly:ee,skipDisabled:P=!1,timezone:F}=i,te=Z(i,Yd),{value:I,handleValueChange:L,timezone:R}=sd({name:`MultiSectionDigitalClock`,timezone:F,value:u,defaultValue:d,referenceDate:m,onChange:C,valueManager:pd}),z=Ac(),ne=Zl(R),re=p(()=>x({hours:1,minutes:5,seconds:5},o),[o]),ie=hd({value:I,referenceDate:m,adapter:n,props:i,timezone:R}),ae=G((e,t,n)=>L(e,t,n)),B=p(()=>!a||!T.includes(`hours`)||T.includes(`meridiem`)?T:[...T,`meridiem`],[a,T]),{view:oe,setValueAndGoToNextView:se,focusedView:ce}=vu({view:w,views:B,openTo:E,onViewChange:D,onChange:ae,focusedView:O,onFocusedViewChange:k}),{meridiemMode:le,handleMeridiemChange:H}=xu(ie,a,G(e=>{se(e,`finish`,`meridiem`)}),`finish`),ue=f((e,t)=>{let r=ol(h,n),i=t===`hours`||t===`minutes`&&B.includes(`seconds`),o=({start:e,end:t})=>!(_&&r(_,t)||g&&r(e,g)||v&&r(e,ne)||y&&r(ne,i?t:e)),s=(e,r=1)=>{if(e%r!==0)return!1;if(S)switch(t){case`hours`:return!S(n.setHours(ie,e),`hours`);case`minutes`:return!S(n.setMinutes(ie,e),`minutes`);case`seconds`:return!S(n.setSeconds(ie,e),`seconds`);default:return!1}return!0};switch(t){case`hours`:{let t=rl(e,le,a),r=n.setHours(ie,t);return n.getHours(r)!==t||!o({start:n.setSeconds(n.setMinutes(r,0),0),end:n.setSeconds(n.setMinutes(r,59),59)})||!s(t)}case`minutes`:{let t=n.setMinutes(ie,e);return!o({start:n.setSeconds(t,0),end:n.setSeconds(t,59)})||!s(e,b)}case`seconds`:{let t=n.setSeconds(ie,e);return!o({start:t,end:t})||!s(e)}default:throw Error(`not supported`)}},[a,ie,h,g,le,_,b,S,n,v,y,ne,B]),de=f(e=>{switch(e){case`hours`:return{onChange:e=>{let t=rl(e,le,a);se(n.setHours(ie,t),`finish`,`hours`)},items:qd({now:ne,value:I,ampm:a,adapter:n,isDisabled:e=>ue(e,`hours`),timeStep:re.hours,resolveAriaLabel:z.hoursClockNumberText,valueOrReferenceDate:ie})};case`minutes`:return{onChange:e=>{se(n.setMinutes(ie,e),`finish`,`minutes`)},items:Jd({value:n.getMinutes(ie),adapter:n,isDisabled:e=>ue(e,`minutes`),resolveLabel:e=>n.format(n.setMinutes(ne,e),`minutes`),timeStep:re.minutes,hasValue:!!I,resolveAriaLabel:z.minutesClockNumberText})};case`seconds`:return{onChange:e=>{se(n.setSeconds(ie,e),`finish`,`seconds`)},items:Jd({value:n.getSeconds(ie),adapter:n,isDisabled:e=>ue(e,`seconds`),resolveLabel:e=>n.format(n.setSeconds(ne,e),`seconds`),timeStep:re.seconds,hasValue:!!I,resolveAriaLabel:z.secondsClockNumberText})};case`meridiem`:{let e=qc(n,`am`),t=qc(n,`pm`);return{onChange:H,items:[{value:`am`,label:e,isSelected:()=>!!I&&le===`am`,isFocused:()=>!!ie&&le===`am`,ariaLabel:e},{value:`pm`,label:t,isSelected:()=>!!I&&le===`pm`,isFocused:()=>!!ie&&le===`pm`,ariaLabel:t}]}}default:throw Error(xc(144,e))}},[ne,I,a,n,re.hours,re.minutes,re.seconds,z.hoursClockNumberText,z.minutesClockNumberText,z.secondsClockNumberText,le,se,ie,ue,H]),U=p(()=>{if(!r)return B;let e=B.filter(e=>e!==`meridiem`);return e.reverse(),B.includes(`meridiem`)&&e.push(`meridiem`),e},[r,B]),fe=p(()=>B.reduce((e,t)=>x({},e,{[t]:de(t)}),{}),[B,de]),{ownerState:pe}=su(),W=Xd(M);return Y(Zd,x({ref:t,className:V(W.root,A),ownerState:pe,role:`group`},te,{children:U.map(e=>Y(Kd,{items:fe[e].items,onChange:fe[e].onChange,active:oe===e,autoFocus:s||ce===e,disabled:N,readOnly:ee,slots:c,slotProps:l,skipDisabled:P,"aria-label":z.selectViewText(e)},e))}))});function $d(e){return Ve(`MuiPickerDay`,e)}var ef=Ne(`MuiPickerDay`,[`root`,`dayOutsideMonth`,`today`,`selected`,`disabled`,`fillerCell`]);g();function tf(e){let{disabled:t,selected:n,today:r,outsideCurrentMonth:i,day:a,disableHighlightToday:o,showDaysOutsideCurrentMonth:s}=e,c=kc(),{ownerState:l}=su();return p(()=>x({},l,{day:a,isDaySelected:n??!1,isDayDisabled:t??!1,isDayCurrent:r??!1,isDayOutsideMonth:i??!1,isDayStartOfWeek:c.isSameDay(a,c.startOfWeek(a)),isDayEndOfWeek:c.isSameDay(a,c.endOfWeek(a)),disableHighlightToday:o??!1,showDaysOutsideCurrentMonth:s??!1}),[c,l,a,n,t,r,i,o,s])}g();var nf=[`autoFocus`,`className`,`classes`,`hidden`,`isAnimating`,`onClick`,`onDaySelect`,`onFocus`,`onBlur`,`onKeyDown`,`onMouseDown`,`onMouseEnter`,`children`,`isFirstVisibleCell`,`isLastVisibleCell`,`day`,`selected`,`disabled`,`today`,`outsideCurrentMonth`,`disableHighlightToday`,`showDaysOutsideCurrentMonth`,`isVisuallySelected`,`isDayFillerCell`],rf=(e,t)=>{let{isDaySelected:n,disableHighlightToday:r,isDayCurrent:i,isDayDisabled:a,isDayOutsideMonth:o,isDayFillerCell:s}=e;return Le({root:[`root`,n&&!s&&`selected`,a&&`disabled`,!r&&i&&!n&&!s&&`today`,o&&`dayOutsideMonth`,s&&`fillerCell`]},$d,t)},af=J(Bt,{name:`MuiPickerDay`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disableHighlightToday&&n.isDayCurrent&&t.today,n.isDayOutsideMonth&&t.dayOutsideMonth,n.isDayFillerCell&&t.fillerCell]}})(({theme:e})=>x({"--PickerDay-horizontalMargin":`2px`,"--PickerDay-size":`36px`},e.typography.caption,{lineHeight:1,display:`flex`,width:`var(--PickerDay-size)`,height:`var(--PickerDay-size)`,borderRadius:`calc(var(--PickerDay-size) / 2)`,padding:0,backgroundColor:`transparent`,transition:e.transitions.create(`background-color`,{duration:e.transitions.duration.short}),color:(e.vars||e).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.hoverOpacity)}},"&:focus":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.focusOpacity)},marginLeft:`var(--PickerDay-horizontalMargin)`,marginRight:`var(--PickerDay-horizontalMargin)`,variants:[{props:{isDaySelected:!0},style:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightMedium,"&:focus, &:hover":{willChange:`background-color`,backgroundColor:(e.vars||e).palette.primary.dark},[`&.${ef.disabled}`]:{opacity:.6}}},{props:{isDayDisabled:!0},style:{color:(e.vars||e).palette.text.disabled}},{props:{isDayFillerCell:!0},style:{opacity:0,pointerEvents:`none`}},{props:{isDayOutsideMonth:!0},style:{color:(e.vars||e).palette.text.secondary}},{props:{isDayCurrent:!0,isDaySelected:!1},style:{outline:`1px solid ${(e.vars||e).palette.text.secondary}`,outlineOffset:-1}}]})),of=()=>{},sf=h(o(function(e,t){let n=Mt({props:e,name:`MuiPickerDay`}),r=kc(),{autoFocus:i=!1,className:a,classes:o,isAnimating:s,onClick:c,onDaySelect:u,onFocus:d=of,onBlur:f=of,onKeyDown:p=of,onMouseDown:m=of,onMouseEnter:h=of,children:g,day:_,selected:v,disabled:y,today:b,outsideCurrentMonth:S,disableHighlightToday:C,showDaysOutsideCurrentMonth:w,isDayFillerCell:T}=n,E=Z(n,nf),D=tf({day:_,selected:v,disabled:y,today:b,outsideCurrentMonth:S,disableHighlightToday:C,showDaysOutsideCurrentMonth:w}),O=x({},D,{isDayFillerCell:T??(S&&!w)}),k=rf(O,o),A=l(null),j=oe(A,t);return un(()=>{i&&!y&&!s&&!S&&A.current.focus()},[i,y,s,S]),O.isDayFillerCell?Y(af,{ref:j,role:E.role,ownerState:O,className:V(k.root,a),as:`div`}):Y(af,x({ref:j,centerRipple:!0,disabled:y,tabIndex:v?0:-1,onKeyDown:e=>p(e,_),onFocus:e=>d(e,_),onBlur:e=>f(e,_),onMouseEnter:e=>h(e,_),onClick:e=>{e.defaultMuiPrevented=!0,y||u(_),S&&e.currentTarget.focus(),c&&c(e)},onMouseDown:e=>{m(e),S&&e.preventDefault()}},E,{ownerState:O,className:V(k.root,a),children:g??r.format(_,`dayOfMonth`)}))})),cf=e=>e.saveQuery!=null,lf=({stateResponse:{localizedDigits:e,sectionsValueBoundaries:t,state:n,timezone:r,setCharacterQuery:i,setTempAndroidValueStr:a,updateSectionValue:o}})=>{let s=kc(),c=({keyPressed:e,sectionIndex:t},r,a)=>{let o=e.toLowerCase(),s=n.sections[t];if(n.characterQuery!=null&&(!a||a(n.characterQuery.value))&&n.characterQuery.sectionIndex===t){let e=`${n.characterQuery.value}${o}`,a=r(e,s);if(!cf(a))return i({sectionIndex:t,value:e,sectionType:s.type}),a}let c=r(o,s);return cf(c)&&!c.saveQuery?(i(null),null):(i({sectionIndex:t,value:o,sectionType:s.type}),cf(c)?null:c)},l=e=>{let t=(e,t,n)=>{let r=t.filter(e=>e.toLowerCase().startsWith(n));return r.length===0?{saveQuery:!1}:{sectionValue:r[0],shouldGoToNextSection:r.length===1}},n=(e,n,i,a)=>{let o=e=>ul(s,r,n.type,e);if(n.contentType===`letter`)return t(n.format,o(n.format),e);if(i&&a!=null&&cl(s,i).contentType===`letter`){let n=o(i),r=t(i,n,e);return cf(r)?{saveQuery:!1}:x({},r,{sectionValue:a(r.sectionValue,n)})}return{saveQuery:!1}};return c(e,(e,t)=>{switch(t.type){case`month`:return n(e,t,s.formats.month,e=>bl(s,e,s.formats.month,t.format));case`weekDay`:return n(e,t,s.formats.weekday,(e,t)=>t.indexOf(e).toString());case`meridiem`:return n(e,t);default:return{saveQuery:!1}}})},u=n=>{let r=({queryValue:n,skipIfBelowMinimum:r,section:i})=>{let a=ml(n,e),o=Number(a),c=t[i.type]({currentDate:null,format:i.format,contentType:i.contentType});if(o>c.maximum)return{saveQuery:!1};if(r&&o<c.minimum)return{saveQuery:!0};let l=o*10>c.maximum||a.length===c.maximum.toString().length;return{sectionValue:vl(s,o,c,e,i),shouldGoToNextSection:l}};return c(n,(e,t)=>{if(t.contentType===`digit`||t.contentType===`digit-with-letter`)return r({queryValue:e,skipIfBelowMinimum:!1,section:t});if(t.type===`month`){let n=Sl(s,`digit`,`month`,`MM`),i=r({queryValue:e,skipIfBelowMinimum:!0,section:{type:t.type,format:`MM`,hasLeadingZerosInFormat:n,hasLeadingZerosInInput:!0,contentType:`digit`,maxLength:2}});if(cf(i))return i;let a=bl(s,i.sectionValue,`MM`,t.format);return x({},i,{sectionValue:a})}if(t.type===`weekDay`){let n=r({queryValue:e,skipIfBelowMinimum:!0,section:t});if(cf(n))return n;let i=ll(s,t.format)[Number(n.sectionValue)-1];return x({},n,{sectionValue:i})}return{saveQuery:!1}},t=>gl(t,e))};return G(t=>{let r=n.sections[t.sectionIndex],i=gl(t.keyPressed,e)?u(x({},t,{keyPressed:hl(t.keyPressed,e)})):l(t);if(i==null){a(null);return}o({section:r,newSectionValue:i.sectionValue,shouldGoToNextSection:i.shouldGoToNextSection})})},uf=({props:e,value:t,timezone:n,adapter:r})=>{if(t===null)return null;let{shouldDisableDate:i,shouldDisableMonth:a,shouldDisableYear:o,disablePast:s,disableFuture:c,minDate:l,maxDate:u}=e,d=r.date(void 0,n);switch(!0){case!r.isValid(t):return`invalidDate`;case!!(i&&i(t)):return`shouldDisableDate`;case!!(a&&a(t)):return`shouldDisableMonth`;case!!(o&&o(t)):return`shouldDisableYear`;case!!(c&&r.isAfterDay(t,d)):return`disableFuture`;case!!(s&&r.isBeforeDay(t,d)):return`disablePast`;case!!(l&&r.isBeforeDay(t,l)):return`minDate`;case!!(u&&r.isAfterDay(t,u)):return`maxDate`;default:return null}};uf.valueManager=pd;var df=({adapter:e,value:t,timezone:n,props:r})=>{if(t===null)return null;let{minTime:i,maxTime:a,minutesStep:o,shouldDisableTime:s,disableIgnoringDatePartForTimeValidation:c=!1,disablePast:l,disableFuture:u}=r,d=e.date(void 0,n),f=ol(c,e);switch(!0){case!e.isValid(t):return`invalidDate`;case!!(i&&f(i,t)):return`minTime`;case!!(a&&f(t,a)):return`maxTime`;case!!(u&&e.isAfter(t,d)):return`disableFuture`;case!!(l&&e.isBefore(t,d)):return`disablePast`;case!!(s&&s(t,`hours`)):return`shouldDisableTime-hours`;case!!(s&&s(t,`minutes`)):return`shouldDisableTime-minutes`;case!!(s&&s(t,`seconds`)):return`shouldDisableTime-seconds`;case!!(o&&e.getMinutes(t)%o!==0):return`minutesStep`;default:return null}};df.valueManager=pd;var ff=({adapter:e,value:t,timezone:n,props:r})=>{let i=uf({adapter:e,value:t,timezone:n,props:r});return i===null?df({adapter:e,value:t,timezone:n,props:r}):i};ff.valueManager=pd,g();function pf(e){let{props:t,validator:n,value:r,timezone:i,onError:o}=e,s=kc(),c=l(n.valueManager.defaultErrorState),u=n({adapter:s,value:r,timezone:i,props:t}),d=n.valueManager.hasError(u);return a(()=>{o&&!n.valueManager.isSameError(u,c.current)&&o(u,r),c.current=u},[n,o,u,r]),{validationError:u,hasValidationError:d,getValidationErrorForNewValue:G(e=>n({adapter:s,value:e,timezone:i,props:t}))}}g();var mf=5e3,hf=e=>{var t;let n=kc(),r=Ac(),i=j(),{manager:{validator:o,valueType:s,internal_valueManager:c,internal_fieldValueManager:d},internalPropsWithDefaults:m,internalPropsWithDefaults:{value:h,defaultValue:g,referenceDate:_,onChange:v,format:y,formatDensity:b=`dense`,selectedSections:S,onSelectedSectionsChange:C,shouldRespectLeadingZeros:w=!1,timezone:T},forwardedProps:{error:E}}=e,{value:D,handleValueChange:O,timezone:k}=sd({name:`a field component`,timezone:T,value:h,defaultValue:g,referenceDate:_,onChange:v,valueManager:c}),A=l(D);a(()=>{A.current=D},[D]);let{hasValidationError:M}=pf({props:m,validator:o,timezone:k,value:D,onError:m.onError}),N=p(()=>pl(n),[n]),ee=p(()=>Tl(n,N,k),[n,N,k]),P=f(e=>d.getSectionsFromValue(e,e=>Ll({adapter:n,localeText:r,localizedDigits:N,format:y,date:e,formatDensity:b,shouldRespectLeadingZeros:w,isRtl:i})),[d,y,r,N,i,w,n,b]),[F,te]=u(()=>{let e=P(D),t={sections:e,lastExternalValue:D,lastSectionsDependencies:{format:y,isRtl:i,locale:n.locale},tempValueStrAndroid:null,characterQuery:null},r=ld(e),a=c.getInitialReferenceValue({referenceDate:_,value:D,adapter:n,props:m,granularity:r,timezone:k});return x({},t,{referenceValue:a})}),[I,L]=Zt({controlled:S,default:null,name:`useField`,state:`selectedSections`}),R=e=>{L(e),C==null||C(e)},z=p(()=>Al(I,F.sections),[I,F.sections]),ne=z===`all`?0:z,re=p(()=>kl(F.sections),[F.sections]),ie=p(()=>F.sections.every(e=>e.value===``),[F.sections]),ae=p(()=>{if(ne!=null)return!1;let e=F.sections.filter(e=>e.value!==``);return e.length>0&&F.sections.length-e.length>0},[F.sections,ne]),B=p(()=>E===void 0?M||ae:E,[M,ae,E]),oe=e=>{let t={validationError:o({adapter:n,value:e,timezone:k,props:m})};O(e,t)},se=(e,t)=>{let n=[...F.sections];return n[e]=x({},n[e],{value:t,modified:!0}),n},ce=l(null),le=qt(),V=e=>{ne!=null&&(ce.current={sectionIndex:ne,value:e},le.start(0,()=>{ce.current=null}))},H=()=>{c.areValuesEqual(n,D,c.emptyValue)?te(e=>x({},e,{sections:e.sections.map(e=>x({},e,{value:``})),tempValueStrAndroid:null,characterQuery:null})):(te(e=>x({},e,{characterQuery:null})),oe(c.emptyValue))},ue=()=>{if(ne==null)return;let e=F.sections[ne];e.value!==``&&(V(``),d.getDateFromSection(D,e)===null?te(e=>x({},e,{sections:se(ne,``),tempValueStrAndroid:null,characterQuery:null})):(te(e=>x({},e,{characterQuery:null})),oe(d.updateDateInValue(D,e,null))))},de=e=>{let t=d.parseValueStr(e,F.referenceValue,(e,t)=>{let a=n.parse(e,y);if(!n.isValid(a))return null;let o=Ll({adapter:n,localeText:r,localizedDigits:N,format:y,date:a,formatDensity:b,shouldRespectLeadingZeros:w,isRtl:i});return Ol(n,a,o,t,!1)});oe(t)},U=qt(),fe=({section:e,newSectionValue:t,shouldGoToNextSection:r})=>{le.clear(),U.clear();let i=d.getDateFromSection(D,e);r&&ne<F.sections.length-1&&R(ne+1);let a=se(ne,t),o=d.getDateSectionsFromValue(a,e),s=Cl(n,o,N);if(n.isValid(s)){let t=Ol(n,s,o,d.getDateFromSection(F.referenceValue,e),!0);return i??U.start(0,()=>{A.current===D&&te(t=>x({},t,{sections:d.clearDateSections(F.sections,e),tempValueStrAndroid:null}))}),oe(d.updateDateInValue(D,e,t))}return o.every(e=>e.value!==``)&&(i==null||n.isValid(i))?(V(t),oe(d.updateDateInValue(D,e,s))):(i!=null&&(V(t),oe(d.updateDateInValue(D,e,s))),te(e=>x({},e,{sections:a,tempValueStrAndroid:null})))},pe=e=>te(t=>x({},t,{tempValueStrAndroid:e})),W=G(e=>{te(t=>x({},t,{characterQuery:e}))});if(D!==F.lastExternalValue){let e=ce.current!=null&&!n.isValid(d.getDateFromSection(D,F.sections[ce.current.sectionIndex])),t;t=e?se(ce.current.sectionIndex,ce.current.value):P(D),te(r=>x({},r,{lastExternalValue:D,sections:t,sectionsDependencies:{format:y,isRtl:i,locale:n.locale},referenceValue:e?r.referenceValue:d.updateReferenceValue(n,D,r.referenceValue),tempValueStrAndroid:null}))}if(i!==F.lastSectionsDependencies.isRtl||y!==F.lastSectionsDependencies.format||n.locale!==F.lastSectionsDependencies.locale){let e=P(D);te(t=>x({},t,{lastSectionsDependencies:{format:y,isRtl:i,locale:n.locale},sections:e,tempValueStrAndroid:null,characterQuery:null}))}F.characterQuery!=null&&!B&&ne==null&&W(null),F.characterQuery!=null&&((t=F.sections[F.characterQuery.sectionIndex])==null?void 0:t.type)!==F.characterQuery.sectionType&&W(null),a(()=>{ce.current!=null&&(ce.current=null)});let me=qt();return a(()=>(F.characterQuery!=null&&me.start(mf,()=>W(null)),()=>{}),[F.characterQuery,W,me]),a(()=>{F.tempValueStrAndroid!=null&&ne!=null&&ue()},[F.sections]),{activeSectionIndex:ne,areAllSectionsEmpty:ie,error:B,localizedDigits:N,parsedSelectedSections:z,sectionOrder:re,sectionsValueBoundaries:ee,state:F,timezone:k,value:D,clearValue:H,clearActiveSection:ue,setCharacterQuery:W,setSelectedSections:R,setTempAndroidValueStr:pe,updateSectionValue:fe,updateValueFromValueStr:de,getSectionsFromValue:P}};g();function gf(e){let{manager:{internal_useApplyDefaultValuesToFieldInternalProps:t},internalProps:n,skipContextFieldRefAssignment:r}=e,i=Bl(),a=Gl(),o=oe(n.fieldRef,r?null:a==null?void 0:a.internalFieldRef,r?null:a==null?void 0:a.fieldRef),s=i==null?void 0:i.setValue,c=f((e,t)=>s==null?void 0:s(e,{validationError:t.validationError,shouldClose:!1}),[s]);return t(p(()=>a!=null&&i!=null?x({value:i.value,onChange:c,timezone:i.timezone,disabled:i.disabled,readOnly:i.readOnly,autoFocus:i.autoFocus&&!i.open,focused:i.open?!0:void 0,format:i.fieldFormat,formatDensity:a.formatDensity,selectedSections:a.selectedSections,onSelectedSectionsChange:a.onSelectedSectionsChange,fieldRef:o},n):n,[i,a,n,c,o]))}function _f(e){let{focused:t,domGetters:n,stateResponse:{parsedSelectedSections:r,state:i}}=e;if(!n.isReady())return;let a=ir(n.getRoot()).getSelection();if(!a)return;if(r==null){a.rangeCount>0&&a.getRangeAt(0).startContainer instanceof Node&&n.getRoot().contains(a.getRangeAt(0).startContainer)&&a.removeAllRanges(),t&&n.getRoot().blur();return}if(!n.getRoot().contains(Dd(n.getRoot())))return;let o=new window.Range,s;s=r===`all`?n.getRoot():i.sections[r].type===`empty`?n.getSectionContainer(r):n.getSectionContent(r),o.selectNodeContents(s),s.focus(),a.removeAllRanges(),a.addRange(o)}function vf(e){let{manager:{internal_fieldValueManager:t},focused:n,setFocused:r,domGetters:i,stateResponse:a,applyCharacterEditing:o,internalPropsWithDefaults:s,stateResponse:{parsedSelectedSections:c,sectionsValueBoundaries:l,sectionOrder:u,state:d,value:f,activeSectionIndex:p,localizedDigits:m,timezone:h,clearValue:g,clearActiveSection:_,setCharacterQuery:v,setSelectedSections:y,updateValueFromValueStr:b,updateSectionValue:x},internalPropsWithDefaults:{disabled:S=!1,readOnly:C=!1,minutesStep:w}}=e,T=kc(),E=G(e=>{var n;if(!S)switch(!0){case(e.ctrlKey||e.metaKey)&&(((n=e.key)==null?void 0:n.toUpperCase())===`A`||String.fromCharCode(e.keyCode)===`A`)&&!e.shiftKey&&!e.altKey:e.preventDefault(),y(`all`);break;case e.key===`ArrowRight`:if(e.preventDefault(),c==null)y(u.startIndex);else if(c===`all`)y(u.endIndex);else{let e=u.neighbors[c].rightIndex;e!==null&&y(e)}break;case e.key===`ArrowLeft`:if(e.preventDefault(),c==null)y(u.endIndex);else if(c===`all`)y(u.startIndex);else{let e=u.neighbors[c].leftIndex;e!==null&&y(e)}break;case e.key===`Delete`:if(e.preventDefault(),C)break;c==null||c===`all`?g():_();break;case[`ArrowUp`,`ArrowDown`,`Home`,`End`,`PageUp`,`PageDown`].includes(e.key):{if(e.preventDefault(),C||p==null)break;c===`all`&&y(p);let n=d.sections[p],r=xf(T,h,n,e.key,l,m,t.getDateFromSection(f,n),{minutesStep:w});x({section:n,newSectionValue:r,shouldGoToNextSection:!1});break}}}),D=qt(),O=G(()=>{if(!(S||!i.isReady())){if(c===`all`){r(!0),D.start(0,()=>{let e=document.getSelection();if(!e||e.rangeCount===0){y(u.startIndex);return}let t=e.getRangeAt(0).startOffset;if(t===0){y(u.startIndex);return}let n=0,r=0;for(;r<t&&n<d.sections.length;){let e=d.sections[n];n+=1,r+=`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`.length}y(n-1)});return}n||(r(!0),c??y(u.startIndex))}}),k=G(e=>{if(S||!i.isReady()||c===`all`||e.button!==0)return;let t=e.target,n=i.getRoot();if(!n.contains(t))return;let a=t.closest(`[data-sectionindex]`),o=a?Number(a.dataset.sectionindex):yf(n,e.clientX);o==null||!Number.isInteger(o)||(e.preventDefault(),r(!0),y(o))}),A=G(e=>{if(!i.isReady()||c!==`all`)return;let t=e.target.textContent??``;i.getRoot().innerHTML=d.sections.map(e=>`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`).join(``),_f({focused:n,domGetters:i,stateResponse:a}),t.length===0||t.charCodeAt(0)===10?(g(),y(`all`)):t.length>1?b(t):(c===`all`&&y(0),o({keyPressed:t,sectionIndex:0}))}),j=G(e=>{if(C||c!==`all`){e.preventDefault();return}let t=e.clipboardData.getData(`text`);e.preventDefault(),v(null),b(t)}),M=G(()=>{if(n||S||!i.isReady())return;let e=Dd(i.getRoot());r(!0),i.getSectionIndexFromDOMElement(e)??y(u.startIndex)});return{onKeyDown:E,onBlur:G(()=>{setTimeout(()=>{if(!i.isReady())return;let e=Dd(i.getRoot());i.getRoot().contains(e)||(r(!1),y(null))})}),onFocus:M,onClick:O,onMouseDown:k,onPaste:j,onInput:A,contentEditable:c===`all`,tabIndex:s.disabled||c===0?-1:0}}function yf(e,t){let n=e.querySelectorAll(`[role="spinbutton"]`);if(n.length===0)return null;let r=0,i=1/0;for(let e=0;e<n.length;e+=1){let a=n[e].getBoundingClientRect(),o=(a.left+a.right)/2,s=Math.abs(t-o);s<i&&(i=s,r=e)}return r}function bf(e){switch(e){case`ArrowUp`:return 1;case`ArrowDown`:return-1;case`PageUp`:return 5;case`PageDown`:return-5;default:return 0}}function xf(e,t,n,r,i,a,o,s){let c=bf(r),l=r===`Home`,u=r===`End`,d=n.value===``||l||u;return n.contentType===`digit`||n.contentType===`digit-with-letter`?(()=>{let r=i[n.type]({currentDate:o,format:n.format,contentType:n.contentType}),f=t=>vl(e,t,r,a,n),p=n.type===`minutes`&&s!=null&&s.minutesStep?s.minutesStep:1,m;if(d){if(n.type===`year`&&!u&&!l)return e.formatByString(e.date(void 0,t),n.format);m=c>0||l?r.minimum:r.maximum}else m=parseInt(ml(n.value,a),10)+c*p;return m%p!==0&&((c<0||l)&&(m+=p-(p+m)%p),(c>0||u)&&(m-=m%p)),m>r.maximum?f(r.minimum+(m-r.maximum-1)%(r.maximum-r.minimum+1)):m<r.minimum?f(r.maximum-(r.minimum-m-1)%(r.maximum-r.minimum+1)):f(m)})():(()=>{let r=ul(e,t,n.type,n.format);return r.length===0?n.value:d?c>0||l?r[0]:r[r.length-1]:r[((r.indexOf(n.value)+c)%r.length+r.length)%r.length]})()}g();function Sf(e){let{manager:{internal_fieldValueManager:t},stateResponse:{areAllSectionsEmpty:n,state:r,updateValueFromValueStr:i}}=e,a=G(e=>{i(e.target.value)});return{value:p(()=>n?``:t.getHiddenInputValueFromSections(r.sections),[n,r.sections,t]),onChange:a}}g();function Cf(e){let{stateResponse:{parsedSelectedSections:t,setSelectedSections:n},internalPropsWithDefaults:{disabled:r=!1}}=e,i=G(e=>{if(r||e.isDefaultPrevented())return;let i=Number(e.currentTarget.dataset.sectionindex);Number.isInteger(i)&&t!==i&&n(i)});return f(e=>({"data-sectionindex":e,onClick:i}),[i])}g();function wf(e){let t=kc(),n=Ac(),{focused:r,domGetters:i,stateResponse:a,applyCharacterEditing:o,manager:{internal_fieldValueManager:s},stateResponse:{parsedSelectedSections:c,sectionsValueBoundaries:l,state:u,value:d,localizedDigits:p,clearActiveSection:m,setCharacterQuery:h,setSelectedSections:g,updateSectionValue:_,updateValueFromValueStr:v},internalPropsWithDefaults:{disabled:y=!1,readOnly:b=!1}}=e,x=c===`all`,S=!x&&!y&&!b,C=G(e=>{if(!i.isReady())return;let t=u.sections[e];i.getSectionContent(e).innerHTML=t.value||t.placeholder,_f({focused:r,domGetters:i,stateResponse:a})}),w=G(e=>{if(!i.isReady())return;let t=e.target,n=t.textContent??``,r=i.getSectionIndexFromDOMElement(t),a=u.sections[r];if(b){C(r);return}if(n.length===0){if(a.value===``){C(r);return}let t=e.nativeEvent.inputType;if(t===`insertParagraph`||t===`insertLineBreak`){C(r);return}C(r),m();return}o({keyPressed:n,sectionIndex:r}),C(r)}),T=G(e=>{e.preventDefault()}),E=G(e=>{if(e.preventDefault(),b||y||typeof c!=`number`)return;let t=u.sections[c],n=e.clipboardData.getData(`text`),r=/^[a-zA-Z]+$/.test(n),i=/^[0-9]+$/.test(n),a=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(n);t.contentType===`letter`&&r||t.contentType===`digit`&&i||t.contentType===`digit-with-letter`&&a?(h(null),_({section:t,newSectionValue:n,shouldGoToNextSection:!0})):!r&&!i&&(h(null),v(n))}),D=G(e=>{e.preventDefault(),e.dataTransfer.dropEffect=`none`}),O=f(e=>()=>{y||g(e)},[y,g]);return f((e,r)=>{let i=l[e.type]({currentDate:s.getDateFromSection(d,e),contentType:e.contentType,format:e.format});return{onInput:w,onPaste:E,onMouseUp:T,onDragOver:D,onFocus:O(r),"aria-readonly":b,"aria-valuenow":Ef(e,t,p),"aria-valuemin":i.minimum,"aria-valuemax":i.maximum,"aria-valuetext":e.value?Tf(e,t,p):n.empty,"aria-label":n[e.type],"aria-disabled":y,tabIndex:!S||x||r>0?-1:0,contentEditable:!x&&!y&&!b,role:`spinbutton`,"data-range-position":e.dateName||void 0,spellCheck:!S&&void 0,autoCapitalize:S?`none`:void 0,autoCorrect:S?`off`:void 0,children:e.value||e.placeholder,inputMode:e.contentType===`letter`?`text`:`numeric`}},[l,x,y,b,S,n,t,p,w,E,T,D,O,s,d])}function Tf(e,t,n){if(e.value)switch(e.type){case`month`:{if(e.contentType===`digit`){let r=t.setMonth(t.date(),Number(ml(e.value,n))-1);return t.isValid(r)?t.format(r,`month`):``}let r=t.parse(e.value,e.format);return r&&t.isValid(r)?t.format(r,`month`):void 0}case`day`:if(e.contentType===`digit`){let r=t.setDate(t.startOfYear(t.date()),Number(ml(e.value,n)));return t.isValid(r)?t.format(r,`dayOfMonth`):``}return e.value;case`weekDay`:return;default:return}}function Ef(e,t,n){if(!e.value)return;let r=ml(e.value,n);switch(e.type){case`weekDay`:return e.contentType===`letter`?void 0:Number(r);case`meridiem`:{let n=t.parse(`01:00 ${e.value}`,`${t.formats.hours12h}:${t.formats.minutes} ${e.format}`);return n?+(t.getHours(n)>=12):void 0}case`day`:return e.contentType===`digit-with-letter`?parseInt(r,10):Number(r);case`month`:{if(e.contentType===`digit`)return Number(r);let n=t.parse(e.value,e.format);return n?t.getMonth(n)+1:void 0}default:return e.contentType===`letter`?void 0:Number(r)}}g();var Df=e=>{let{props:t,manager:n,skipContextFieldRefAssignment:r,manager:{valueType:i,internal_useOpenPickerButtonAriaLabel:o}}=e,{internalProps:s,forwardedProps:c}=Lc(t,i),f=gf({manager:n,internalProps:s,skipContextFieldRefAssignment:r}),{sectionListRef:m,onBlur:h,onClick:g,onMouseDown:_,onFocus:v,onInput:y,onPaste:b,onKeyDown:S,onClear:C,clearable:w}=c,{disabled:T=!1,readOnly:E=!1,autoFocus:D=!1,focused:O,fieldRef:k}=f,A=l(null),j=oe(m,A),M=p(()=>({isReady:()=>A.current!=null,getRoot:()=>A.current.getRoot(),getSectionContainer:e=>A.current.getSectionContainer(e),getSectionContent:e=>A.current.getSectionContent(e),getSectionIndexFromDOMElement:e=>A.current.getSectionIndexFromDOMElement(e)}),[A]),N=hf({manager:n,internalPropsWithDefaults:f,forwardedProps:c}),{areAllSectionsEmpty:ee,error:P,parsedSelectedSections:F,sectionOrder:te,state:I,value:L,clearValue:R,setSelectedSections:z}=N,ne=lf({stateResponse:N}),re=o(L),[ie,ae]=u(!1);function B(e=0){if(T||!A.current||Of(A)!=null)return;let t=Al(e,I.sections);ae(!0),A.current.getSectionContent(t).focus()}let se=vf({manager:n,internalPropsWithDefaults:f,stateResponse:N,applyCharacterEditing:ne,focused:ie,setFocused:ae,domGetters:M}),ce=Sf({manager:n,stateResponse:N}),le=Cf({stateResponse:N,internalPropsWithDefaults:f}),V=wf({manager:n,stateResponse:N,applyCharacterEditing:ne,internalPropsWithDefaults:f,domGetters:M,focused:ie}),H=G(e=>{S==null||S(e),se.onKeyDown(e)}),ue=G(e=>{se.onBlur(e);let t=e.relatedTarget;M.isReady()&&t instanceof Node&&M.getRoot().contains(t)||h==null||h(e)}),de=G(e=>{se.onFocus(e);let t=e.relatedTarget;M.isReady()&&t instanceof Node&&M.getRoot().contains(t)||v==null||v(e)}),U=G(e=>{e.isDefaultPrevented()||(g==null||g(e),se.onClick(e))}),fe=G(e=>{e.isDefaultPrevented()||(_==null||_(e),se.onMouseDown(e))}),pe=G(e=>{b==null||b(e),se.onPaste(e)}),W=G(e=>{y==null||y(e),se.onInput(e)}),me=G((e,...t)=>{e.preventDefault(),C==null||C(e,...t),R(),kf(A)?z(te.startIndex):B(0)}),he=p(()=>I.sections.map((e,t)=>{let n=V(e,t);return{container:le(t),content:n,before:{children:e.startSeparator},after:{children:e.endSeparator,"data-range-position":e.isEndFormatSeparator?n[`data-range-position`]:void 0}}}),[I.sections,le,V]);return a(()=>{if(A.current==null)throw Error(xc(249));D&&!T&&A.current.getSectionContent(te.startIndex).focus()},[]),un(()=>{if(!(!ie||!A.current)){if(F===`all`)A.current.getRoot().focus();else if(typeof F==`number`){let e=A.current.getSectionContent(F);e&&e.focus()}}},[F,ie]),un(()=>{_f({focused:ie,domGetters:M,stateResponse:N})}),d(k,()=>({getSections:()=>I.sections,getActiveSectionIndex:()=>Of(A),setSelectedSections:e=>{if(T||!A.current)return;let t=Al(e,I.sections);ae((t===`all`?0:t)!==null),z(e)},focusField:B,isFieldFocused:()=>kf(A),clearValue:R})),x({},c,se,{onBlur:ue,onClick:U,onMouseDown:fe,onFocus:de,onInput:W,onPaste:pe,onKeyDown:H,onClear:me},ce,{error:P,clearable:!!(w&&!ee&&!E&&!T),focused:O??ie,sectionListRef:j,elements:he,areAllSectionsEmpty:ee,disabled:T,readOnly:E,autoFocus:D,openPickerAriaLabel:re})};function Of(e){var t;let n=Dd((t=e.current)==null?void 0:t.getRoot());return!n||!e.current||!e.current.getRoot().contains(n)?null:e.current.getSectionIndexFromDOMElement(n)}function kf(e){var t;let n=Dd((t=e.current)==null?void 0:t.getRoot());return!!e.current&&e.current.getRoot().contains(n)}g();function Af(){return p(()=>({valueType:`date`,validator:uf,internal_valueManager:pd,internal_fieldValueManager:md,internal_useApplyDefaultValuesToFieldInternalProps:Mf,internal_useOpenPickerButtonAriaLabel:jf}),[])}function jf(e){let t=kc(),n=Ac();return p(()=>{let r=t.isValid(e)?t.format(e,`fullDate`):null;return n.openDatePickerDialogue(r)},[e,n,t])}function Mf(e){let t=kc(),n=Nf(e);return p(()=>x({},e,n,{format:e.format??t.formats.keyboardDate}),[e,n,t])}function Nf(e){let t=kc(),n=Xl();return p(()=>({disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,minDate:Uc(t,e.minDate,n.minDate),maxDate:Uc(t,e.maxDate,n.maxDate)}),[e.minDate,e.maxDate,e.disableFuture,e.disablePast,t,n])}g();function Pf(e={}){let{ampm:t}=e;return p(()=>({valueType:`time`,validator:df,internal_valueManager:pd,internal_fieldValueManager:md,internal_useApplyDefaultValuesToFieldInternalProps:If,internal_useOpenPickerButtonAriaLabel:Ff(t)}),[t])}function Ff(e){return function(t){let n=kc(),r=Ac();return p(()=>{let i=e??n.is12HourCycleInCurrentLocale()?`fullTime12h`:`fullTime24h`,a=n.isValid(t)?n.format(t,i):null;return r.openTimePickerDialogue(a)},[t,r,n])}}function If(e){let t=kc(),n=Lf(e),r=p(()=>e.ampm??t.is12HourCycleInCurrentLocale(),[e.ampm,t]);return p(()=>x({},e,n,{format:e.format??(r?t.formats.fullTime12h:t.formats.fullTime24h)}),[e,n,r,t])}function Lf(e){return p(()=>({disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1}),[e.disablePast,e.disableFuture])}g();function Rf(){return p(()=>({valueType:`date-time`,validator:ff,internal_valueManager:pd,internal_fieldValueManager:md,internal_useApplyDefaultValuesToFieldInternalProps:Bf,internal_useOpenPickerButtonAriaLabel:zf}),[])}function zf(e){let t=kc(),n=Ac();return p(()=>{let r=t.isValid(e)?t.format(e,`fullDate`):null;return n.openDatePickerDialogue(r)},[e,n,t])}function Bf(e){let t=kc(),n=Vf(e),r=p(()=>e.ampm??t.is12HourCycleInCurrentLocale(),[e.ampm,t]);return p(()=>x({},e,n,{format:e.format??(r?t.formats.keyboardDateTime12h:t.formats.keyboardDateTime24h)}),[e,n,r,t])}function Vf(e){let t=kc(),n=Xl();return p(()=>({disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,disableIgnoringDatePartForTimeValidation:!!e.minDateTime||!!e.maxDateTime||!!e.disableFuture||!!e.disablePast,minDate:Uc(t,e.minDateTime??e.minDate,n.minDate),maxDate:Uc(t,e.maxDateTime??e.maxDate,n.maxDate),minTime:e.minDateTime??e.minTime,maxTime:e.maxDateTime??e.maxTime}),[e.minDateTime,e.maxDateTime,e.minTime,e.maxTime,e.minDate,e.maxDate,e.disableFuture,e.disablePast,t,n])}var Hf=e=>Df({manager:Af(),props:e});g();function Uf(e){let{ownerState:t}=su(),n=j();return p(()=>x({},t,{isFieldDisabled:e.disabled??!1,isFieldReadOnly:e.readOnly??!1,isFieldRequired:e.required??!1,fieldDirection:n?`rtl`:`ltr`}),[t,e.disabled,e.readOnly,e.required,n])}function Wf(e){return Ve(`MuiPickersTextField`,e)}var Gf=Ne(`MuiPickersTextField`,[`root`,`focused`,`disabled`,`error`,`required`]);function Kf(e){return Ve(`MuiPickersInputBase`,e)}var qf=Ne(`MuiPickersInputBase`,[`root`,`focused`,`disabled`,`readOnly`,`error`,`notchedOutline`,`sectionsContainer`,`sectionContent`,`sectionBefore`,`sectionAfter`,`adornedStart`,`adornedEnd`,`input`,`inputSizeSmall`,`activeBar`]);function Jf(e){return Ve(`MuiPickersSectionList`,e)}var Yf=Ne(`MuiPickersSectionList`,[`root`,`section`,`sectionContent`]);g();var Xf=[`slots`,`slotProps`,`elements`,`sectionListRef`,`classes`],Zf=J(`div`,{name:`MuiPickersSectionList`,slot:`Root`})({direction:`ltr /*! @noflip */`,outline:`none`}),Qf=J(`span`,{name:`MuiPickersSectionList`,slot:`Section`})({}),$f=J(`span`,{name:`MuiPickersSectionList`,slot:`SectionSeparator`})({whiteSpace:`pre`}),ep=J(`span`,{name:`MuiPickersSectionList`,slot:`SectionContent`})({outline:`none`}),tp=e=>Le({root:[`root`],section:[`section`],sectionContent:[`sectionContent`]},Jf,e);function np(e){let{slots:t,slotProps:n,element:r,classes:i}=e,{ownerState:a}=su(),o=(t==null?void 0:t.section)??Qf,s=It({elementType:o,externalSlotProps:n==null?void 0:n.section,externalForwardedProps:r.container,className:i.section,ownerState:a}),c=(t==null?void 0:t.sectionContent)??ep,u=It({elementType:c,externalSlotProps:n==null?void 0:n.sectionContent,externalForwardedProps:r.content,additionalProps:{suppressContentEditableWarning:!0},className:i.sectionContent,ownerState:a}),d=(t==null?void 0:t.sectionSeparator)??$f,f=It({elementType:d,externalSlotProps:n==null?void 0:n.sectionSeparator,externalForwardedProps:r.before,ownerState:x({},a,{separatorPosition:`before`})}),p=It({elementType:d,externalSlotProps:n==null?void 0:n.sectionSeparator,externalForwardedProps:r.after,ownerState:x({},a,{separatorPosition:`after`})}),m=l(null),h=oe(u.ref,m);return P(o,x({},s,{children:[Y(d,x({},f)),Y(c,x({},u,{ref:h,onBlur:e=>{let t=e.relatedTarget,n=e.currentTarget.closest(`.${Yf.root}`);if(n&&t instanceof Node&&n.contains(t)){e.stopPropagation();return}}})),Y(d,x({},p))]}))}var rp=o(function(e,t){let n=Mt({props:e,name:`MuiPickersSectionList`}),{slots:r,slotProps:i,elements:a,sectionListRef:o,classes:s}=n,c=Z(n,Xf),u=tp(s),{ownerState:f}=su(),p=l(null),m=oe(t,p),h=e=>{if(!p.current)throw Error(xc(145,e));return p.current};d(o,()=>({getRoot(){return h(`getRoot`)},getSectionContainer(e){return h(`getSectionContainer`).querySelector(`.${Yf.section}[data-sectionindex="${e}"]`)},getSectionContent(e){return h(`getSectionContent`).querySelector(`.${Yf.section}[data-sectionindex="${e}"] .${Yf.sectionContent}`)},getSectionIndexFromDOMElement(e){let t=h(`getSectionIndexFromDOMElement`);if(e==null||!t.contains(e))return null;let n=null;return e.classList.contains(Yf.section)?n=e:e.classList.contains(Yf.sectionContent)&&(n=e.parentElement),n==null?null:Number(n.dataset.sectionindex)}}));let g=(r==null?void 0:r.root)??Zf,_=It({elementType:g,externalSlotProps:i==null?void 0:i.root,externalForwardedProps:c,additionalProps:{ref:m,suppressContentEditableWarning:!0},className:u.root,ownerState:f});return Y(g,x({},_,{children:_.contentEditable?a.map(({content:e,before:t,after:n})=>`${t.children}${e.children}${n.children}`).join(``):Y(y,{children:a.map((e,t)=>Y(np,{slots:r,slotProps:i,element:e,classes:u},t))})}))});g();var ip=v(null),ap=()=>{let e=b(ip);if(e==null)throw Error(xc(146));return e};g();var op=`elements.areAllSectionsEmpty.defaultValue.label.value.onChange.id.autoFocus.endAdornment.startAdornment.renderSuffix.slots.slotProps.contentEditable.tabIndex.onInput.onPaste.onKeyDown.fullWidth.name.readOnly.inputRef.sectionListRef.onFocus.onBlur.classes.ownerState`.split(`.`),sp=[`ref`];function cp(e,t){return n=>{let r=xn(e,n)??{};return x({},r,{className:V(t,r.className)})}}var lp=e=>Math.round(e*1e5)/1e5,up=J(`div`,{name:`MuiPickersInputBase`,slot:`Root`})(({theme:e})=>x({},e.typography.body1,{color:(e.vars||e).palette.text.primary,cursor:`text`,padding:0,display:`flex`,justifyContent:`flex-start`,alignItems:`center`,position:`relative`,boxSizing:`border-box`,letterSpacing:`${lp(.15/16)}em`,[`&.${qf.disabled}`]:{color:(e.vars||e).palette.action.disabled,cursor:`default`},variants:[{props:{isInputInFullWidth:!0},style:{width:`100%`}}]})),dp=J(Zf,{name:`MuiPickersInputBase`,slot:`SectionsContainer`})(({theme:e})=>({padding:`4px 0 5px`,fontFamily:e.typography.fontFamily,fontSize:`inherit`,lineHeight:`1.4375em`,flexGrow:1,outline:`none`,display:`flex`,flexWrap:`nowrap`,overflow:`hidden`,letterSpacing:`inherit`,width:`182px`,variants:[{props:{fieldDirection:`rtl`},style:{justifyContent:`end`}},{props:{inputSize:`small`},style:{paddingTop:1}},{props:{isFieldFocused:!1,isFieldValueEmpty:!0},style:e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:e.palette.mode===`light`?.42:.5}},{props:{isFieldFocused:!1,isFieldValueEmpty:!0,hasStartAdornment:!1,inputHasLabel:!0,isLabelShrunk:!1},style:{opacity:0}}]})),fp=J(Qf,{name:`MuiPickersInputBase`,slot:`Section`})(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:`inherit`,letterSpacing:`inherit`,lineHeight:`1.4375em`,display:`inline-block`,whiteSpace:`nowrap`})),pp=J(ep,{name:`MuiPickersInputBase`,slot:`SectionContent`,overridesResolver:(e,t)=>t.content})(({theme:e})=>({fontFamily:e.typography.fontFamily,lineHeight:`1.4375em`,letterSpacing:`inherit`,width:`fit-content`,outline:`none`,"@supports (-webkit-app-region: drag)":{[`.${qf.root}:not(:focus-within) &`]:{WebkitUserModify:`read-only`,userSelect:`none`}}})),mp=J($f,{name:`MuiPickersInputBase`,slot:`Separator`})(()=>({whiteSpace:`pre`,letterSpacing:`inherit`})),hp=J(`input`,{name:`MuiPickersInputBase`,slot:`Input`,overridesResolver:(e,t)=>t.hiddenInput})(x({},pe)),gp=J(`div`,{name:`MuiPickersInputBase`,slot:`ActiveBar`})(({theme:e,ownerState:t})=>({display:`none`,position:`absolute`,height:2,bottom:2,borderTopLeftRadius:2,borderTopRightRadius:2,transition:e.transitions.create([`width`,`left`],{duration:e.transitions.duration.shortest}),backgroundColor:(e.vars||e).palette.primary.main,'[data-active-range-position="start"] &, [data-active-range-position="end"] &':{display:`block`},'[data-active-range-position="start"] &':{left:t.sectionOffsets[0]},'[data-active-range-position="end"] &':{left:t.sectionOffsets[1]}})),_p=(e,t)=>{let{isFieldFocused:n,isFieldDisabled:r,isFieldReadOnly:i,hasFieldError:a,inputSize:o,isInputInFullWidth:s,inputColor:c,hasStartAdornment:l,hasEndAdornment:u}=t,d={root:[`root`,n&&!r&&`focused`,r&&`disabled`,i&&`readOnly`,a&&`error`,s&&`fullWidth`,`color${ge(c)}`,o===`small`&&`inputSizeSmall`,l&&`adornedStart`,u&&`adornedEnd`],notchedOutline:[`notchedOutline`],input:[`input`],sectionsContainer:[`sectionsContainer`],sectionContent:[`sectionContent`],sectionBefore:[`sectionBefore`],sectionAfter:[`sectionAfter`],activeBar:[`activeBar`]};return Le(d,Kf,e)};function vp(e,t,n,r){if(e.content[`data-range-position`]!==void 0){var i;let e=(i=t.current)==null?void 0:i.querySelectorAll(`[data-sectionindex="${n}"] [data-range-position="${r}"]`);if(e)return Array.from(e).reduce((e,t)=>e+t.offsetWidth,0)}return 0}function yp(e,t){var n,r,i;let a=0;if(((n=t.current)==null?void 0:n.getAttribute(`data-active-range-position`))===`end`)for(let n=e.length-1;n>=e.length/2;--n)a+=vp(e[n],t,n,`end`);else for(let n=0;n<e.length/2;n+=1)a+=vp(e[n],t,n,`start`);return{activeBarWidth:a,sectionOffsets:[((r=t.current)==null||(r=r.querySelector(`[data-sectionindex="0"]`))==null?void 0:r.offsetLeft)||0,((i=t.current)==null||(i=i.querySelector(`[data-sectionindex="${e.length/2}"]`))==null?void 0:i.offsetLeft)||0]}}var bp=o(function(e,t){let n=Mt({props:e,name:`MuiPickersInputBase`}),{elements:r,areAllSectionsEmpty:i,value:o,onChange:s,id:c,endAdornment:u,startAdornment:d,renderSuffix:f,slots:p,slotProps:m,contentEditable:h,tabIndex:g,onInput:_,onPaste:v,onKeyDown:y,name:b,readOnly:S,inputRef:C,sectionListRef:w,onFocus:T,onBlur:E,classes:D,ownerState:O}=n,k=Z(n,op),A=ap(),j=l(null),M=l(null),N=l([]),ee=oe(t,j),F=L();if(!F)throw Error(xc(152));let te=O??A,I=e=>{var t;(t=F.onFocus)==null||t.call(F,e),T==null||T(e)},R=e=>{I(e)},z=e=>{if(y==null||y(e),e.key===`Enter`&&!e.defaultMuiPrevented){var t,n;if((t=j.current)!=null&&t.dataset.multiInput)return;let r=(n=j.current)==null?void 0:n.closest(`form`),i=r==null?void 0:r.querySelector(`[type="submit"]`);if(!r||!i)return;e.preventDefault(),r.requestSubmit(i)}},ne=e=>{var t;(t=F.onBlur)==null||t.call(F,e),E==null||E(e)};a(()=>{F&&F.setAdornedStart(!!d)},[F,d]),a(()=>{F&&(i?F.onEmpty():F.onFilled())},[F,i]);let re=_p(D,te),ie=(p==null?void 0:p.root)||up,ae=It({elementType:ie,externalSlotProps:m==null?void 0:m.root,externalForwardedProps:k,additionalProps:{"aria-invalid":F.error,ref:ee},className:re.root,ownerState:te}),B=(p==null?void 0:p.input)||dp,se=(p==null?void 0:p.htmlInput)||hp,ce=It({elementType:se,externalSlotProps:m==null?void 0:m.htmlInput,ownerState:te}),{ref:le}=ce,V=Z(ce,sp),H=oe(le,C),ue=r.some(e=>e.content[`data-range-position`]!==void 0);return a(()=>{if(!ue||!te.isPickerOpen)return;let{activeBarWidth:e,sectionOffsets:t}=yp(r,j);N.current=[t[0],t[1]],M.current&&(M.current.style.width=`${e}px`)},[r,ue,te.isPickerOpen]),P(ie,x({},ae,{children:[d,Y(rp,{sectionListRef:w,elements:r,contentEditable:h,tabIndex:g,className:re.sectionsContainer,onFocus:I,onBlur:ne,onInput:_,onPaste:v,onKeyDown:z,slots:{root:B,section:fp,sectionContent:pp,sectionSeparator:mp},slotProps:{root:x({},m==null?void 0:m.input,{ownerState:te}),sectionContent:cp(m==null?void 0:m.sectionContent,qf.sectionContent),sectionSeparator:({separatorPosition:e})=>({className:e===`before`?qf.sectionBefore:qf.sectionAfter})}}),u,f?f(x({},F)):null,Y(se,x({name:b,className:re.input,value:o,onChange:s,id:c,"aria-hidden":`true`,tabIndex:-1,readOnly:S,required:F.required,disabled:F.disabled,onFocus:R},V,{ref:H})),ue&&Y(gp,{className:re.activeBar,ref:M,ownerState:{sectionOffsets:N.current}})]}))});function xp(e){return Ve(`MuiPickersOutlinedInput`,e)}var Sp=x({},qf,Ne(`MuiPickersOutlinedInput`,[`root`,`notchedOutline`,`input`]));g();var Cp=[`children`,`className`,`label`,`notched`,`shrink`],wp=J(`fieldset`,{name:`MuiPickersOutlinedInput`,slot:`NotchedOutline`})(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.23)`:`rgba(255, 255, 255, 0.23)`;return{textAlign:`left`,position:`absolute`,bottom:0,right:0,top:-5,left:0,margin:0,padding:`0 8px`,pointerEvents:`none`,borderRadius:`inherit`,borderStyle:`solid`,borderWidth:1,overflow:`hidden`,minWidth:`0%`,borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}}),Tp=J(`span`,{slot:`internal`,shouldForwardProp:void 0})(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:`inherit`})),Ep=J(`legend`,{slot:`internal`,shouldForwardProp:e=>Ae(e)&&e!==`notched`})(({theme:e})=>({float:`unset`,width:`auto`,overflow:`hidden`,variants:[{props:{inputHasLabel:!1},style:{padding:0,lineHeight:`11px`,transition:e.transitions.create(`width`,{duration:150,easing:e.transitions.easing.easeOut})}},{props:{inputHasLabel:!0},style:{display:`block`,padding:0,height:11,fontSize:`0.75em`,visibility:`hidden`,maxWidth:.01,transition:e.transitions.create(`max-width`,{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:`nowrap`,"& > span":{paddingLeft:5,paddingRight:5,display:`inline-block`,opacity:0,visibility:`visible`}}},{props:{inputHasLabel:!0,notched:!0},style:{maxWidth:`100%`,transition:e.transitions.create(`max-width`,{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]}));function Dp(e){let{className:t,label:n,notched:r}=e,i=Z(e,Cp),a=ap();return Y(wp,x({"aria-hidden":!0,className:t},i,{ownerState:a,children:Y(Ep,{ownerState:a,notched:r,children:n?Y(Tp,{children:n}):Y(Tp,{className:`notranslate`,children:``})})}))}g();var Op=[`label`,`autoFocus`,`ownerState`,`classes`,`notched`,`slots`,`slotProps`],kp=J(up,{name:`MuiPickersOutlinedInput`,slot:`Root`})(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.23)`:`rgba(255, 255, 255, 0.23)`;return{padding:`0 14px`,borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Sp.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Sp.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${Sp.focused} .${Sp.notchedOutline}`]:{borderStyle:`solid`,borderWidth:2},[`&.${Sp.error} .${Sp.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Sp.disabled}`]:{[`& .${Sp.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}},variants:Object.keys((e.vars??e).palette).filter(t=>{var n;return((n=(e.vars??e).palette[t])==null?void 0:n.main)??!1}).map(t=>({props:{inputColor:t},style:{[`&.${Sp.focused}:not(.${Sp.error}) .${Sp.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}}))}}),Ap=J(dp,{name:`MuiPickersOutlinedInput`,slot:`SectionsContainer`})({padding:`16.5px 0`,variants:[{props:{inputSize:`small`},style:{padding:`8.5px 0`}}]}),jp=e=>{let t=Le({root:[`root`],notchedOutline:[`notchedOutline`],input:[`input`]},xp,e);return x({},e,t)},Mp=o(function(e,t){let n=Mt({props:e,name:`MuiPickersOutlinedInput`}),{label:r,classes:i,notched:a,slots:o,slotProps:s}=n,c=Z(n,Op),l=L(),u=jp(i);return Y(bp,x({},c,{slots:x({root:kp,input:Ap},o),slotProps:s,renderSuffix:e=>{let t=a===void 0?!!(e.adornedStart||e.focused||e.filled):a;return Y(Dp,{shrink:t,notched:t,className:u.notchedOutline,label:r!=null&&r!==``&&l!=null&&l.required?P(y,{children:[r,` `,`*`]}):r})},label:r,classes:u,ref:t}))});Mp.muiName=`Input`;function Np(e){return Ve(`MuiPickersFilledInput`,e)}var Pp=x({},qf,Ne(`MuiPickersFilledInput`,[`root`,`underline`,`input`]));g();var Fp=[`label`,`autoFocus`,`disableUnderline`,`hiddenLabel`,`classes`,`slots`,`slotProps`],Ip=J(up,{name:`MuiPickersFilledInput`,slot:`Root`,shouldForwardProp:e=>Ae(e)&&e!==`disableUnderline`})(({theme:e})=>{let t=e.palette.mode===`light`,n=t?`rgba(0, 0, 0, 0.42)`:`rgba(255, 255, 255, 0.7)`,r=t?`rgba(0, 0, 0, 0.06)`:`rgba(255, 255, 255, 0.09)`,i=t?`rgba(0, 0, 0, 0.09)`:`rgba(255, 255, 255, 0.13)`,a=t?`rgba(0, 0, 0, 0.12)`:`rgba(255, 255, 255, 0.12)`;return{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(`background-color`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:i,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${Pp.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${Pp.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:a},variants:[...Object.keys((e.vars??e).palette).filter(t=>(e.vars??e).palette[t].main).map(t=>{var n;return{props:{inputColor:t,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(n=(e.vars||e).palette[t])==null?void 0:n.main}`}}}}),{props:{disableUnderline:!1},style:{"&::after":{left:0,bottom:0,content:`""`,position:`absolute`,right:0,transform:`scaleX(0)`,transition:e.transitions.create(`transform`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:`none`},[`&.${Pp.focused}:after`]:{transform:`scaleX(1) translateX(0)`},[`&.${Pp.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline):n}`,left:0,bottom:0,content:`"\\00a0"`,position:`absolute`,right:0,transition:e.transitions.create(`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},[`&:hover:not(.${Pp.disabled}, .${Pp.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${Pp.disabled}:before`]:{borderBottomStyle:`dotted`}}},{props:{hasStartAdornment:!0},style:{paddingLeft:12}},{props:{hasEndAdornment:!0},style:{paddingRight:12}}]}}),Lp=J(dp,{name:`MuiPickersFilledInput`,slot:`sectionsContainer`,shouldForwardProp:e=>Ae(e)&&e!==`hiddenLabel`})({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,variants:[{props:{inputSize:`small`},style:{paddingTop:21,paddingBottom:4}},{props:{hasStartAdornment:!0},style:{paddingLeft:0}},{props:{hasEndAdornment:!0},style:{paddingRight:0}},{props:{hiddenLabel:!0},style:{paddingTop:16,paddingBottom:17}},{props:{hiddenLabel:!0,inputSize:`small`},style:{paddingTop:8,paddingBottom:9}}]}),Rp=(e,t)=>{let{inputHasUnderline:n}=t,r=Le({root:[`root`,n&&`underline`],input:[`input`]},Np,e);return x({},e,r)},zp=o(function(e,t){let n=Mt({props:e,name:`MuiPickersFilledInput`}),{label:r,disableUnderline:i=!1,hiddenLabel:a=!1,classes:o,slots:s,slotProps:c}=n,l=Z(n,Fp),u=ap(),d=x({},u,{inputHasUnderline:!i}),f=Rp(o,d);return Y(bp,x({},l,{slots:x({root:Ip,input:Lp},s),slotProps:x({},c,{root:x({disableUnderline:i},c==null?void 0:c.root),input:x({hiddenLabel:a},c==null?void 0:c.input)}),label:r,classes:f,ref:t,ownerState:d}))});zp.muiName=`Input`;function Bp(e){return Ve(`MuiPickersFilledInput`,e)}var Vp=x({},qf,Ne(`MuiPickersInput`,[`root`,`underline`,`input`]));g();var Hp=[`label`,`autoFocus`,`disableUnderline`,`ownerState`,`classes`,`slots`,`slotProps`],Up=J(up,{name:`MuiPickersInput`,slot:`Root`,shouldForwardProp:e=>Ae(e)&&e!==`disableUnderline`})(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.42)`:`rgba(255, 255, 255, 0.7)`;return e.vars&&(t=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{"label + &":{marginTop:16},variants:[...Object.keys((e.vars??e).palette).filter(t=>(e.vars??e).palette[t].main).map(t=>({props:{inputColor:t,inputHasUnderline:!0},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t].main}`}}})),{props:{inputHasUnderline:!0},style:{"&::after":{background:`red`,left:0,bottom:0,content:`""`,position:`absolute`,right:0,transform:`scaleX(0)`,transition:e.transitions.create(`transform`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:`none`},[`&.${Vp.focused}:after`]:{transform:`scaleX(1) translateX(0)`},[`&.${Vp.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${t}`,left:0,bottom:0,content:`"\\00a0"`,position:`absolute`,right:0,transition:e.transitions.create(`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},[`&:hover:not(.${Vp.disabled}, .${Vp.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${t}`}},[`&.${Vp.disabled}:before`]:{borderBottomStyle:`dotted`}}}]}}),Wp=(e,t)=>{let{inputHasUnderline:n}=t,r=Le({root:[`root`,!n&&`underline`],input:[`input`]},Bp,e);return x({},e,r)},Gp=o(function(e,t){let n=Mt({props:e,name:`MuiPickersInput`}),{label:r,disableUnderline:i=!1,classes:a,slots:o,slotProps:s}=n,c=Z(n,Hp),l=ap(),u=x({},l,{inputHasUnderline:!i}),d=Wp(a,u);return Y(bp,x({},c,{slots:x({root:Up},o),slotProps:x({},s,{root:x({disableUnderline:i},s==null?void 0:s.root)}),ownerState:u,label:r,classes:d,ref:t}))});Gp.muiName=`Input`,g();var Kp=`onFocus.onBlur.className.classes.color.disabled.error.variant.required.hiddenLabel.inputRef.sectionListRef.elements.areAllSectionsEmpty.onClick.onMouseDown.onKeyDown.onKeyUp.onPaste.onInput.endAdornment.startAdornment.tabIndex.contentEditable.focused.value.onChange.fullWidth.id.name.helperText.label.slots.slotProps.data-active-range-position`.split(`.`),qp={standard:Gp,filled:zp,outlined:Mp},Jp=J(bt,{name:`MuiPickersTextField`,slot:`Root`})({maxWidth:`100%`}),Yp=(e,t)=>{let{isFieldFocused:n,isFieldDisabled:r,isFieldRequired:i}=t;return Le({root:[`root`,n&&!r&&`focused`,r&&`disabled`,i&&`required`]},Wf,e)},Xp=o(function(e,t){let n=Mt({props:e,name:`MuiPickersTextField`}),{onFocus:r,onBlur:i,className:a,classes:o,color:s=`primary`,disabled:c=!1,error:u=!1,variant:d=`outlined`,required:f=!1,hiddenLabel:m=!1,inputRef:h,sectionListRef:g,elements:_,areAllSectionsEmpty:v,onClick:y,onMouseDown:b,onKeyDown:S,onKeyUp:C,onPaste:w,onInput:T,endAdornment:E,startAdornment:D,tabIndex:O,contentEditable:k,focused:A,value:j,onChange:M,fullWidth:N,id:ee,name:F,helperText:te,label:I,slots:L,slotProps:R,"data-active-range-position":z}=n,ne=Z(n,Kp),re=l(null),ie=oe(t,re),ae=mn(ee),B=te&&ae?`${ae}-helper-text`:void 0,se=I&&ae?`${ae}-label`:void 0,ce=R==null?void 0:R.input,le=R==null?void 0:R.inputLabel,V=Uf({disabled:n.disabled,required:n.required,readOnly:ce==null?void 0:ce.readOnly}),H=p(()=>x({},V,{isFieldValueEmpty:v,isFieldFocused:A??!1,hasFieldError:u??!1,inputSize:n.size??`medium`,inputColor:s??`primary`,isInputInFullWidth:N??!1,hasStartAdornment:!!(D??(ce==null?void 0:ce.startAdornment)),hasEndAdornment:!!(E??(ce==null?void 0:ce.endAdornment)),inputHasLabel:!!I,isLabelShrunk:!!(le!=null&&le.shrink)}),[V,v,A,u,n.size,s,N,D,E,ce==null?void 0:ce.startAdornment,ce==null?void 0:ce.endAdornment,I,le==null?void 0:le.shrink]),ue=Yp(o,H),de=(L==null?void 0:L.input)??qp[d],U=(L==null?void 0:L.root)??Jp,fe=(L==null?void 0:L.inputLabel)??In,pe=(L==null?void 0:L.formHelperText)??mt,W={};d===`outlined`?(le&&le.shrink!==void 0&&(W.notched=le.shrink),W.label=I):d===`filled`&&(W.hiddenLabel=m);let me=It({elementType:U,externalSlotProps:R==null?void 0:R.root,externalForwardedProps:x({},ne,{className:a}),additionalProps:{ref:ie,focused:A,disabled:c,variant:d,error:u,color:s,fullWidth:N,required:f},className:ue.root,ownerState:H});return Y(ip.Provider,{value:H,children:P(U,x({},me,{children:[I!=null&&I!==``&&Y(fe,x({htmlFor:ae,id:se},le,{children:I})),Y(de,x({elements:_,areAllSectionsEmpty:v,onClick:y,onMouseDown:b,onKeyDown:S,onKeyUp:C,onInput:T,onPaste:w,onFocus:r,onBlur:i,endAdornment:E,startAdornment:D,tabIndex:O,contentEditable:k,value:j,onChange:M,id:ae,fullWidth:N,inputRef:h,sectionListRef:g,label:I,name:F,role:`group`,"aria-labelledby":se,"aria-describedby":B,"aria-live":B?`polite`:void 0,"data-active-range-position":z},W,ce,{slots:x({},ce==null?void 0:ce.slots,(L==null?void 0:L.htmlInput)!==void 0&&{htmlInput:L.htmlInput}),slotProps:x({},ce==null?void 0:ce.slotProps,(R==null?void 0:R.htmlInput)!==void 0&&{htmlInput:R.htmlInput})})),te&&Y(pe,x({id:B},R==null?void 0:R.formHelperText,{children:te}))]}))})});g();var Zp=[`readOnly`,`onClear`,`clearable`,`clearButtonPosition`,`openPickerButtonPosition`,`openPickerAriaLabel`,`InputProps`,`inputProps`,`InputLabelProps`,`FormHelperTextProps`],Qp=[`ownerState`],$p=[`ownerState`],em=[`ownerState`],tm=[`ownerState`],nm=[`InputProps`,`inputProps`,`InputLabelProps`,`FormHelperTextProps`],rm=e=>{var t;let n=e,{readOnly:r,onClear:i,clearable:a,clearButtonPosition:o,openPickerButtonPosition:s,openPickerAriaLabel:c,InputProps:l,inputProps:u,InputLabelProps:d,FormHelperTextProps:f}=n,p=Z(n,Zp);return{clearable:a,onClear:i,clearButtonPosition:o,openPickerButtonPosition:s,openPickerAriaLabel:c,textFieldProps:x({},p,{slotProps:x({},p==null?void 0:p.slotProps,{input:x({},p==null||(t=p.slotProps)==null?void 0:t.input,{readOnly:r})})})}},im=v({slots:{},slotProps:{},inputRef:void 0});function am(e){var t;let{fieldResponse:n,defaultOpenPickerIcon:r}=e,i=Ac(),a=Bl(),o=b(im),{textFieldProps:s,onClear:c,clearable:l,openPickerAriaLabel:u,clearButtonPosition:d=`end`,openPickerButtonPosition:f=`end`}=rm(n),p=Uf(s),m=G(e=>{e.preventDefault(),a==null||a.setOpen(!0)}),h=a?a.triggerStatus:`hidden`,g=l?d:null,_=h===`hidden`?null:f,v=o.slots.textField??Xp,y=o.slots.inputAdornment??ye,S=Z(It({elementType:y,externalSlotProps:o.slotProps.inputAdornment,additionalProps:{position:`start`},ownerState:x({},p,{position:`start`})}),Qp),C=Z(It({elementType:y,externalSlotProps:o.slotProps.inputAdornment,additionalProps:{position:`end`},ownerState:x({},p,{position:`end`})}),$p),w=o.slots.openPickerButton??Qn,T=Z(It({elementType:w,externalSlotProps:o.slotProps.openPickerButton,additionalProps:{disabled:h===`disabled`,onClick:m,"aria-label":u,"data-mui-picker-open-button":`true`,edge:s.variant!==`standard`&&_},ownerState:p}),em),E=o.slots.openPickerIcon??r,D=It({elementType:E,externalSlotProps:o.slotProps.openPickerIcon,ownerState:p}),O=o.slots.clearButton??Qn,k=Z(It({elementType:O,externalSlotProps:o.slotProps.clearButton,className:`clearButton`,additionalProps:{title:i.fieldClearLabel,tabIndex:-1,onClick:c,disabled:n.disabled||n.readOnly,edge:s.variant!==`standard`&&g!==_&&g},ownerState:p}),tm),A=o.slots.clearIcon??au,j=It({elementType:A,externalSlotProps:o.slotProps.clearIcon,additionalProps:{fontSize:`small`},ownerState:p});s.ref=oe(s.ref,a==null?void 0:a.rootRef);let M=(t=s.slotProps)==null?void 0:t.input,N={},ee=oe(M==null?void 0:M.ref,a==null?void 0:a.triggerRef);return a&&(N.ref=ee),!(M!=null&&M.startAdornment)&&(g===`start`||_===`start`)&&(N.startAdornment=P(y,x({},S,{children:[_===`start`&&Y(w,x({},T,{children:Y(E,x({},D))})),g===`start`&&Y(O,x({},k,{children:Y(A,x({},j))}))]}))),!(M!=null&&M.endAdornment)&&(g===`end`||_===`end`)&&(N.endAdornment=P(y,x({},C,{children:[g===`end`&&Y(O,x({},k,{children:Y(A,x({},j))})),_===`end`&&Y(w,x({},T,{children:Y(E,x({},D))}))]}))),!N.endAdornment&&!N.startAdornment&&o.slots.inputAdornment&&(N.endAdornment=Y(y,x({},C))),g!=null&&(s.sx=[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(s.sx)?s.sx:[s.sx]]),s.slotProps=x({},s.slotProps,{input:x({},M,N)}),Y(v,x({},s))}function om(e,t){return e?t?n=>x({},xn(t,n),xn(e,n)):e:t}function sm(e){let{ref:t,externalForwardedProps:n,slotProps:r}=e,i=b(im),a=Bl(),o=Uf(n),s=n??{},{InputProps:c,inputProps:l,InputLabelProps:u,FormHelperTextProps:d}=s,f=Z(s,nm),p=It({elementType:Xp,externalSlotProps:om(i.slotProps.textField,r==null?void 0:r.textField),externalForwardedProps:f,additionalProps:{ref:t,sx:a==null?void 0:a.rootSx,label:a==null?void 0:a.label,name:a==null?void 0:a.name,className:a==null?void 0:a.rootClassName,inputRef:i.inputRef},ownerState:o});if(a&&a.keepOpenDuringFieldFocus&&a.triggerStatus===`enabled`&&!a.open&&!a.readOnly&&!a.disabled){let e=p.onFocus,t=p.onMouseDown,n=e=>{var t;let n=e.nativeEvent??e,r=n==null||(t=n.composedPath)==null?void 0:t.call(n);if(Array.isArray(r)){for(let e of r)if(e&&e.getAttribute&&e.getAttribute(`data-mui-picker-open-button`)===`true`)return!0}let i=e.target;return i&&i.closest?!!i.closest(`[data-mui-picker-open-button="true"]`):!1};p.onFocus=t=>{e==null||e(t),!t.isDefaultPrevented()&&!n(t)&&a.setOpen(!0)},p.onMouseDown=e=>{t==null||t(e),!e.isDefaultPrevented()&&!n(e)&&a.setOpen(!0)}}return p}function cm(e){let{slots:t={},slotProps:n={},inputRef:r,children:i}=e,a=p(()=>({inputRef:r,slots:{openPickerButton:t.openPickerButton,openPickerIcon:t.openPickerIcon,textField:t.textField,inputAdornment:t.inputAdornment,clearIcon:t.clearIcon,clearButton:t.clearButton},slotProps:{openPickerButton:n.openPickerButton,openPickerIcon:n.openPickerIcon,textField:n.textField,inputAdornment:n.inputAdornment,clearIcon:n.clearIcon,clearButton:n.clearButton}}),[r,t.openPickerButton,t.openPickerIcon,t.textField,t.inputAdornment,t.clearIcon,t.clearButton,n.openPickerButton,n.openPickerIcon,n.textField,n.inputAdornment,n.clearIcon,n.clearButton]);return Y(im.Provider,{value:a,children:i})}g();var lm=[`slots`,`slotProps`],um=o(function(e,t){let n=Mt({props:e,name:`MuiDateField`}),{slots:r,slotProps:i}=n,a=Z(n,lm),o=Hf(sm({slotProps:i,ref:t,externalForwardedProps:a}));return Y(cm,{slots:r,slotProps:i,inputRef:a.inputRef,children:Y(am,{fieldResponse:o,defaultOpenPickerIcon:tu})})}),dm=e=>Df({manager:Pf(e),props:e});g();var fm=[`slots`,`slotProps`],pm=o(function(e,t){let n=Mt({props:e,name:`MuiTimeField`}),{slots:r,slotProps:i}=n,a=Z(n,fm),o=dm(sm({slotProps:i,ref:t,externalForwardedProps:a}));return Y(cm,{slots:r,slotProps:i,inputRef:a.inputRef,children:Y(am,{fieldResponse:o,defaultOpenPickerIcon:nu})})}),mm=e=>Df({manager:Rf(),props:e});g();var hm=[`slots`,`slotProps`],gm=o(function(e,t){let n=Mt({props:e,name:`MuiDateTimeField`}),{slots:r,slotProps:i}=n,a=Z(n,hm),o=mm(sm({slotProps:i,ref:t,externalForwardedProps:a}));return Y(cm,{slots:r,slotProps:i,inputRef:a.inputRef,children:Y(am,{fieldResponse:o,defaultOpenPickerIcon:tu})})});g();var _m=({shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:i,disableFuture:a,disablePast:o,timezone:s})=>{let c=kc();return f(l=>uf({adapter:c,value:l,timezone:s,props:{shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:i,disableFuture:a,disablePast:o}})!==null,[c,e,t,n,r,i,a,o,s])};g();var vm=(e,t)=>(n,r)=>{switch(r.type){case`setVisibleDate`:return x({},n,{slideDirection:r.direction,currentMonth:r.month,isMonthSwitchingAnimating:!t.isSameMonth(r.month,n.currentMonth)&&!e&&!r.skipAnimation,focusedDay:r.focusedDay});case`changeMonthTimezone`:{let e=r.newTimezone;if(t.getTimezone(n.currentMonth)===e)return n;let i=t.setTimezone(n.currentMonth,e);return t.getMonth(i)!==t.getMonth(n.currentMonth)&&(i=t.setMonth(i,t.getMonth(n.currentMonth))),x({},n,{currentMonth:i})}case`finishMonthSwitchingAnimation`:return x({},n,{isMonthSwitchingAnimating:!1});default:throw Error(`missing support`)}},ym=e=>{let{value:t,referenceDate:n,disableFuture:r,disablePast:i,maxDate:o,minDate:s,onMonthChange:u,onYearChange:d,reduceAnimations:m,shouldDisableDate:h,timezone:g,getCurrentMonthFromVisibleDate:_}=e,v=kc(),y=l(vm(!!m,v)).current,b=p(()=>pd.getInitialReferenceValue({value:t,adapter:v,timezone:g,props:e,referenceDate:n,granularity:cd.day}),[n,g]),[x,S]=c(y,{isMonthSwitchingAnimating:!1,focusedDay:b,currentMonth:v.setDate(b,1),slideDirection:`left`}),C=_m({shouldDisableDate:h,minDate:s,maxDate:o,disableFuture:r,disablePast:i,timezone:g});return a(()=>{S({type:`changeMonthTimezone`,newTimezone:v.getTimezone(b)})},[b,v]),{referenceDate:b,calendarState:x,setVisibleDate:G(({target:e,reason:t})=>{if(t===`cell-interaction`&&x.focusedDay!=null&&v.isSameDay(e,x.focusedDay))return;let n=t===`cell-interaction`,a,c;if(t===`cell-interaction`)a=_(e,x.currentMonth),c=e;else if(a=v.isSameMonth(e,x.currentMonth)?x.currentMonth:v.startOfMonth(e),c=e,C(c)){let t=v.startOfMonth(e),n=v.endOfMonth(e);c=Vc({adapter:v,date:c,minDate:v.isBefore(s,t)?t:s,maxDate:v.isAfter(o,n)?n:o,disablePast:i,disableFuture:r,isDateDisabled:C,timezone:g})}let l=!v.isSameMonth(x.currentMonth,a),f=!v.isSameYear(x.currentMonth,a);l&&(u==null||u(a)),f&&(d==null||d(v.startOfYear(a))),S({type:`setVisibleDate`,month:a,direction:v.isAfterDay(a,x.currentMonth)?`left`:`right`,focusedDay:x.focusedDay!=null&&c!=null&&v.isSameDay(c,x.focusedDay)?x.focusedDay:c,skipAnimation:n})}),isDateDisabled:C,onMonthSwitchingAnimationEnd:f(()=>{S({type:`finishMonthSwitchingAnimation`})},[])}};function bm(e,t){return bm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},bm(e,t)}function xm(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,bm(e,t)}function Sm(e,t){return e.classList?!!t&&e.classList.contains(t):(` `+(e.className.baseVal||e.className)+` `).indexOf(` `+t+` `)!==-1}function Cm(e,t){e.classList?e.classList.add(t):Sm(e,t)||(typeof e.className==`string`?e.className=e.className+` `+t:e.setAttribute(`class`,(e.className&&e.className.baseVal||``)+` `+t))}function wm(e,t){return e.replace(RegExp(`(^|\\s)`+t+`(?:\\s|$)`,`g`),`$1`).replace(/\s+/g,` `).replace(/^\s*|\s*$/g,``)}function Tm(e,t){e.classList?e.classList.remove(t):typeof e.className==`string`?e.className=wm(e.className,t):e.setAttribute(`class`,wm(e.className&&e.className.baseVal||``,t))}var Em={disabled:!1},Dm=function(e){return e.scrollTop};g();var Om=`unmounted`,km=`exited`,Am=`entering`,jm=`entered`,Mm=`exiting`,Nm=function(e){xm(t,e);function t(t,n){var r=e.call(this,t,n)||this,i=n,a=i&&!i.isMounting?t.enter:t.appear,o;return r.appearStatus=null,t.in?a?(o=km,r.appearStatus=Am):o=jm:o=t.unmountOnExit||t.mountOnEnter?Om:km,r.state={status:o},r.nextCallback=null,r}t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===`unmounted`?{status:km}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==`entering`&&n!==`entered`&&(t=Am):(n===`entering`||n===`entered`)&&(t=Mm)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e=this.props.timeout,t=n=r=e,n,r;return e!=null&&typeof e!=`number`&&(t=e.exit,n=e.enter,r=e.appear===void 0?n:e.appear),{exit:t,enter:n,appear:r}},n.updateStatus=function(e,t){if(e===void 0&&(e=!1),t!==null)if(this.cancelNextCallback(),t===`entering`){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:W.findDOMNode(this);n&&Dm(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===`exited`&&this.setState({status:Om})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[W.findDOMNode(this),r],a=i[0],o=i[1],s=this.getTimeouts(),c=r?s.appear:s.enter;if(!e&&!n||Em.disabled){this.safeSetState({status:jm},function(){t.props.onEntered(a)});return}this.props.onEnter(a,o),this.safeSetState({status:Am},function(){t.props.onEntering(a,o),t.onTransitionEnd(c,function(){t.safeSetState({status:jm},function(){t.props.onEntered(a,o)})})})},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:W.findDOMNode(this);if(!t||Em.disabled){this.safeSetState({status:km},function(){e.props.onExited(r)});return}this.props.onExit(r),this.safeSetState({status:Mm},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:km},function(){e.props.onExited(r)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:W.findDOMNode(this),r=e==null&&!this.props.addEndListener;if(!n||r){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=i[0],o=i[1];this.props.addEndListener(a,o)}e!=null&&setTimeout(this.nextCallback,e)},n.render=function(){var e=this.state.status;if(e===`unmounted`)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=Z(t,[`children`,`in`,`mountOnEnter`,`unmountOnExit`,`appear`,`enter`,`exit`,`timeout`,`addEndListener`,`onEnter`,`onEntering`,`onEntered`,`onExit`,`onExiting`,`onExited`,`nodeRef`]);return _.createElement(tn.Provider,{value:null},typeof n==`function`?n(e,r):_.cloneElement(_.Children.only(n),r))},t}(_.Component);Nm.contextType=tn,Nm.propTypes={};function Pm(){}Nm.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Pm,onEntering:Pm,onEntered:Pm,onExit:Pm,onExiting:Pm,onExited:Pm},Nm.UNMOUNTED=Om,Nm.EXITED=km,Nm.ENTERING=Am,Nm.ENTERED=jm,Nm.EXITING=Mm,g();var Fm=function(e,t){return e&&t&&t.split(` `).forEach(function(t){return Cm(e,t)})},Im=function(e,t){return e&&t&&t.split(` `).forEach(function(t){return Tm(e,t)})},Lm=function(e){xm(t,e);function t(){var t,n=[...arguments];return t=e.call.apply(e,[this].concat(n))||this,t.appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1];t.removeClasses(i,`exit`),t.addClass(i,a?`appear`:`enter`,`base`),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1]?`appear`:`enter`;t.addClass(i,a,`active`),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1]?`appear`:`enter`;t.removeClasses(i,a),t.addClass(i,a,`done`),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,`appear`),t.removeClasses(n,`enter`),t.addClass(n,`exit`,`base`),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,`exit`,`active`),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,`exit`),t.addClass(n,`exit`,`done`),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r=typeof n==`string`,i=r&&n?n+`-`:``,a=r?``+i+e:n[e];return{baseClassName:a,activeClassName:r?a+`-active`:n[e+`Active`],doneClassName:r?a+`-done`:n[e+`Done`]}},t}var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+`ClassName`],i=this.getClassNames(`enter`).doneClassName;t===`appear`&&n===`done`&&i&&(r+=` `+i),n===`active`&&e&&Dm(e),r&&(this.appliedClasses[t][n]=r,Fm(e,r))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,i=n.active,a=n.done;this.appliedClasses[t]={},r&&Im(e,r),i&&Im(e,i),a&&Im(e,a)},n.render=function(){var e=this.props;e.classNames;var t=Z(e,[`classNames`]);return _.createElement(Nm,x({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(_.Component);Lm.defaultProps={classNames:``},Lm.propTypes={};function Rm(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}g();function zm(e,t){var n=function(e){return t&&C(e)?t(e):e},r=Object.create(null);return e&&S.map(e,function(e){return e}).forEach(function(e){r[e.key]=n(e)}),r}function Bm(e,t){e||={},t||={};function n(n){return n in t?t[n]:e[n]}var r=Object.create(null),i=[];for(var a in e)a in t?i.length&&(r[a]=i,i=[]):i.push(a);var o,s={};for(var c in t){if(r[c])for(o=0;o<r[c].length;o++){var l=r[c][o];s[r[c][o]]=n(l)}s[c]=n(c)}for(o=0;o<i.length;o++)s[i[o]]=n(i[o]);return s}function Vm(e,t,n){return n[t]==null?e.props[t]:n[t]}function Hm(e,t){return zm(e.children,function(n){return T(n,{onExited:t.bind(null,n),in:!0,appear:Vm(n,`appear`,e),enter:Vm(n,`enter`,e),exit:Vm(n,`exit`,e)})})}function Um(e,t,n){var r=zm(e.children),i=Bm(t,r);return Object.keys(i).forEach(function(a){var o=i[a];if(C(o)){var s=a in t,c=a in r,l=t[a],u=C(l)&&!l.props.in;c&&(!s||u)?i[a]=T(o,{onExited:n.bind(null,o),in:!0,exit:Vm(o,`exit`,e),enter:Vm(o,`enter`,e)}):!c&&s&&!u?i[a]=T(o,{in:!1}):c&&s&&C(l)&&(i[a]=T(o,{onExited:n.bind(null,o),in:l.props.in,exit:Vm(o,`exit`,e),enter:Vm(o,`enter`,e)}))}}),i}g();var Wm=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},Gm={component:`div`,childFactory:function(e){return e}},Km=function(e){xm(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.state={contextValue:{isMounting:!0},handleExited:r.handleExited.bind(Rm(r)),firstRender:!0},r}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n=t.children,r=t.handleExited;return{children:t.firstRender?Hm(e,r):Um(e,n,r),firstRender:!1}},n.handleExited=function(e,t){var n=zm(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=x({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=Z(e,[`component`,`childFactory`]),i=this.state.contextValue,a=Wm(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,t===null?_.createElement(tn.Provider,{value:i},a):_.createElement(tn.Provider,{value:i},_.createElement(t,r,a))},t}(_.Component);Km.propTypes={},Km.defaultProps=Gm;var qm=e=>Ve(`MuiPickersFadeTransitionGroup`,e),Jm=Ne(`MuiPickersFadeTransitionGroup`,[`root`]);g();var Ym=[`children`],Xm=e=>Le({root:[`root`]},qm,e),Zm=J(Km,{name:`MuiPickersFadeTransitionGroup`,slot:`Root`})({display:`block`,position:`relative`});function Qm(e){let t=Mt({props:e,name:`MuiPickersFadeTransitionGroup`}),{className:n,reduceAnimations:r,transKey:i,classes:a}=t,{children:o}=t,s=Z(t,Ym),c=Xm(a),l=Qe();return r?o:Y(Zm,{className:V(c.root,n),ownerState:s,children:Y(Ot,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:l.transitions.duration.enteringScreen,enter:l.transitions.duration.enteringScreen,exit:0},children:o},i)})}var $m=e=>Ve(`MuiPickersSlideTransition`,e),eh=Ne(`MuiPickersSlideTransition`,[`root`,`slideEnter-left`,`slideEnter-right`,`slideEnterActive`,`slideExit`,`slideExitActiveLeft-left`,`slideExitActiveLeft-right`]);g();var th=[`children`,`className`,`reduceAnimations`,`slideDirection`,`transKey`,`classes`],nh=(e,t)=>{let{slideDirection:n}=t,r={root:[`root`],exit:[`slideExit`],enterActive:[`slideEnterActive`],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return Le(r,$m,e)},rh=[`slideEnter-left`,`slideEnter-right`,`slideEnterActive`,`slideExit`,`slideExitActiveLeft-left`,`slideExitActiveLeft-right`],ih=J(Km,{name:`MuiPickersSlideTransition`,slot:`Root`,overridesResolver:(e,t)=>rh.reduce((e,n)=>(e.push({[`.${eh[n]}`]:t[n]}),e),[t.root])})(({theme:e})=>{let t=e.transitions.create(`transform`,{duration:e.transitions.duration.complex,easing:`cubic-bezier(0.35, 0.8, 0.4, 1)`});return{display:`block`,position:`relative`,overflowX:`hidden`,"& > *":{position:`absolute`,top:0,right:0,left:0},[`& .${eh[`slideEnter-left`]}`]:{willChange:`transform`,transform:`translate(100%)`,zIndex:1},[`& .${eh[`slideEnter-right`]}`]:{willChange:`transform`,transform:`translate(-100%)`,zIndex:1},[`& .${eh.slideEnterActive}`]:{transform:`translate(0%)`,transition:t},[`& .${eh.slideExit}`]:{transform:`translate(0%)`},[`& .${eh[`slideExitActiveLeft-left`]}`]:{willChange:`transform`,transform:`translate(-100%)`,transition:t,zIndex:0},[`& .${eh[`slideExitActiveLeft-right`]}`]:{willChange:`transform`,transform:`translate(100%)`,transition:t,zIndex:0}}});function ah(e){let t=Mt({props:e,name:`MuiPickersSlideTransition`}),{children:n,className:r,reduceAnimations:i,slideDirection:a,transKey:o,classes:s}=t,c=Z(t,th),{ownerState:l}=su(),u=x({},l,{slideDirection:a}),d=nh(s,u),f=Qe();if(i)return Y(`div`,{className:V(d.root,r),children:n});let p={exit:d.exit,enterActive:d.enterActive,enter:d.enter,exitActive:d.exitActive};return Y(ih,{className:V(d.root,r),childFactory:e=>T(e,{classNames:p}),role:`none`,ownerState:u,children:Y(Lm,x({mountOnEnter:!0,unmountOnExit:!0,timeout:f.transitions.duration.complex,classNames:p},c,{children:n}),o)})}var oh=e=>Ve(`MuiDayCalendar`,e),sh=Ne(`MuiDayCalendar`,[`root`,`header`,`weekDayLabel`,`loadingContainer`,`slideTransition`,`monthContainer`,`weekContainer`,`weekNumberLabel`,`weekNumber`]);g();var ch=[`parentProps`,`day`,`focusedDay`,`selectedDays`,`isDateDisabled`,`currentMonthNumber`,`isViewFocused`],lh=[`ownerState`],uh=e=>Le({root:[`root`],header:[`header`],weekDayLabel:[`weekDayLabel`],loadingContainer:[`loadingContainer`],slideTransition:[`slideTransition`],monthContainer:[`monthContainer`],weekContainer:[`weekContainer`],weekNumberLabel:[`weekNumberLabel`],weekNumber:[`weekNumber`]},oh,e),dh=240,fh=J(`div`,{name:`MuiDayCalendar`,slot:`Root`})({}),ph=J(`div`,{name:`MuiDayCalendar`,slot:`Header`})({display:`flex`,justifyContent:`center`,alignItems:`center`}),mh=J(_n,{name:`MuiDayCalendar`,slot:`WeekDayLabel`})(({theme:e})=>({width:36,height:40,margin:`0 2px`,textAlign:`center`,display:`flex`,justifyContent:`center`,alignItems:`center`,color:(e.vars||e).palette.text.secondary})),hh=J(_n,{name:`MuiDayCalendar`,slot:`WeekNumberLabel`})(({theme:e})=>({width:36,height:40,margin:`0 2px`,textAlign:`center`,display:`flex`,justifyContent:`center`,alignItems:`center`,color:(e.vars||e).palette.text.disabled})),gh=J(_n,{name:`MuiDayCalendar`,slot:`WeekNumber`})(({theme:e})=>x({},e.typography.caption,{width:36,height:36,padding:0,margin:`0 2px`,color:(e.vars||e).palette.text.disabled,fontSize:`0.75rem`,alignItems:`center`,justifyContent:`center`,display:`inline-flex`})),_h=J(`div`,{name:`MuiDayCalendar`,slot:`LoadingContainer`})({display:`flex`,justifyContent:`center`,alignItems:`center`,minHeight:dh}),vh=J(ah,{name:`MuiDayCalendar`,slot:`SlideTransition`})({minHeight:dh}),yh=J(`div`,{name:`MuiDayCalendar`,slot:`MonthContainer`})({overflow:`hidden`}),bh=J(`div`,{name:`MuiDayCalendar`,slot:`WeekContainer`})({margin:`2px 0`,display:`flex`,justifyContent:`center`});function xh(e){let{parentProps:t,day:n,focusedDay:r,selectedDays:i,isDateDisabled:a,currentMonthNumber:o,isViewFocused:s}=e,c=Z(e,ch),{currentMonth:l,disabled:u,disableHighlightToday:d,isMonthSwitchingAnimating:f,showDaysOutsideCurrentMonth:m,slots:h,slotProps:g,timezone:_}=t,v=kc(),y=Zl(_),b=r!=null&&v.isSameDay(n,r),S=s&&b,C=i.some(e=>v.isSameDay(e,n)),w=v.isSameDay(n,y),T=p(()=>u||a(n),[u,a,n]),E=p(()=>v.getMonth(n)!==o,[v,n,o]),D=tf({day:n,selected:C,disabled:T,today:w,outsideCurrentMonth:E,disableHighlightToday:d,showDaysOutsideCurrentMonth:m}),O=(h==null?void 0:h.day)??sf,k=Z(It({elementType:O,externalSlotProps:g==null?void 0:g.day,additionalProps:x({disableHighlightToday:d,showDaysOutsideCurrentMonth:m,role:`gridcell`,isAnimating:f,"data-timestamp":v.toJsDate(n).valueOf()},c),ownerState:x({},D,{day:n,isDayDisabled:T,isDaySelected:C})}),lh),A=p(()=>{let e=v.startOfMonth(l);return m?v.isSameDay(n,v.startOfWeek(e)):v.isSameDay(n,e)},[l,n,m,v]),j=p(()=>{let e=v.endOfMonth(l);return m?v.isSameDay(n,v.endOfWeek(e)):v.isSameDay(n,e)},[l,n,m,v]);return Y(O,x({},k,{day:n,disabled:T,autoFocus:!E&&S,today:w,outsideCurrentMonth:E,isFirstVisibleCell:A,isLastVisibleCell:j,selected:C,tabIndex:b?0:-1,"aria-selected":C,"aria-current":w?`date`:void 0}))}function Sh(e){let t=Mt({props:e,name:`MuiDayCalendar`}),n=kc(),{onFocusedDayChange:r,className:i,classes:a,currentMonth:o,selectedDays:s,focusedDay:c,loading:l,onSelectedDaysChange:u,onMonthSwitchingAnimationEnd:d,readOnly:f,reduceAnimations:h,renderLoading:g=()=>Y(`span`,{children:`…`}),slideDirection:_,TransitionProps:v,disablePast:y,disableFuture:b,minDate:S,maxDate:C,shouldDisableDate:w,shouldDisableMonth:T,shouldDisableYear:E,dayOfWeekFormatter:D=e=>n.format(e,`weekdayShort`).charAt(0).toUpperCase(),hasFocus:O,onFocusedViewChange:k,gridLabelId:A,displayWeekNumber:M,fixedWeekNumber:N,timezone:ee}=t,F=Zl(ee),te=uh(a),I=j(),L=_m({shouldDisableDate:w,shouldDisableMonth:T,shouldDisableYear:E,minDate:S,maxDate:C,disablePast:y,disableFuture:b,timezone:ee}),R=Ac(),z=G(e=>{f||u(e)}),ne=e=>{L(e)||(r(e),k==null||k(!0))},re=G((e,t)=>{switch(e.key){case`ArrowUp`:ne(n.addDays(t,-7)),e.preventDefault();break;case`ArrowDown`:ne(n.addDays(t,7)),e.preventDefault();break;case`ArrowLeft`:{let r=n.addDays(t,I?1:-1),i=n.addMonths(t,I?1:-1),a=Vc({adapter:n,date:r,minDate:I?r:n.startOfMonth(i),maxDate:I?n.endOfMonth(i):r,isDateDisabled:L,timezone:ee});ne(a||r),e.preventDefault();break}case`ArrowRight`:{let r=n.addDays(t,I?-1:1),i=n.addMonths(t,I?-1:1),a=Vc({adapter:n,date:r,minDate:I?n.startOfMonth(i):r,maxDate:I?r:n.endOfMonth(i),isDateDisabled:L,timezone:ee});ne(a||r),e.preventDefault();break}case`Home`:ne(n.startOfWeek(t)),e.preventDefault();break;case`End`:ne(n.endOfWeek(t)),e.preventDefault();break;case`PageUp`:ne(n.addMonths(t,1)),e.preventDefault();break;case`PageDown`:ne(n.addMonths(t,-1)),e.preventDefault();break;case`Enter`:case` `:z(t),e.preventDefault()}}),ie=G((e,t)=>ne(t)),ae=G((e,t)=>{c!=null&&n.isSameDay(c,t)&&(k==null||k(!1))}),B=n.getMonth(o),oe=n.getYear(o),se=p(()=>s.filter(e=>!!e).map(e=>n.startOfDay(e)),[n,s]),ce=`${oe}-${B}`,le=p(()=>m(),[ce]),H=p(()=>{let e=n.getWeekArray(o),t=n.addMonths(o,1);for(;N&&e.length<N;){let r=n.getWeekArray(t),i=n.isSameDay(e[e.length-1][0],r[0][0]);r.slice(+!!i).forEach(t=>{e.length<N&&e.push(t)}),t=n.addMonths(t,1)}return e},[o,N,n]);return P(fh,{role:`grid`,"aria-labelledby":A,className:te.root,children:[P(ph,{role:`row`,className:te.header,children:[M&&Y(hh,{variant:`caption`,role:`columnheader`,"aria-label":R.calendarWeekNumberHeaderLabel,className:te.weekNumberLabel,children:R.calendarWeekNumberHeaderText}),Zc(n,F).map((e,t)=>Y(mh,{variant:`caption`,role:`columnheader`,"aria-label":n.format(e,`weekday`),className:te.weekDayLabel,children:D(e)},t.toString()))]}),l?Y(_h,{className:te.loadingContainer,children:g()}):Y(vh,x({transKey:ce,onExited:d,reduceAnimations:h,slideDirection:_,className:V(i,te.slideTransition)},v,{nodeRef:le,children:Y(yh,{ref:le,role:`rowgroup`,className:te.monthContainer,children:H.map((e,r)=>P(bh,{role:`row`,className:te.weekContainer,"aria-rowindex":r+1,children:[M&&Y(gh,{className:te.weekNumber,role:`rowheader`,"aria-label":R.calendarWeekNumberAriaLabelText(n.getWeekNumber(e[0])),children:R.calendarWeekNumberText(n.getWeekNumber(e[0]))}),e.map((e,n)=>Y(xh,{parentProps:t,day:e,selectedDays:se,isViewFocused:O,focusedDay:c,onKeyDown:re,onFocus:ie,onBlur:ae,onDaySelect:z,isDateDisabled:L,currentMonthNumber:B,"aria-colindex":n+1},e.toString()))]},`week-${e[0]}`))})}))]})}function Ch(e){return Ve(`MuiMonthCalendar`,e)}var wh=Ne(`MuiMonthCalendar`,[`root`,`button`,`disabled`,`selected`]);g();var Th=[`autoFocus`,`classes`,`disabled`,`selected`,`value`,`onClick`,`onKeyDown`,`onFocus`,`onBlur`,`slots`,`slotProps`],Eh=(e,t)=>{let n={button:[`button`,t.isMonthDisabled&&`disabled`,t.isMonthSelected&&`selected`]};return Le(n,Ch,e)},Dh=J(`button`,{name:`MuiMonthCalendar`,slot:`Button`,overridesResolver:(e,t)=>[t.button,{[`&.${wh.disabled}`]:t.disabled},{[`&.${wh.selected}`]:t.selected}]})(({theme:e})=>x({color:`unset`,backgroundColor:`transparent`,border:0,outline:0},e.typography.subtitle1,{height:36,width:72,borderRadius:18,cursor:`pointer`,"&:focus":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)},"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)},"&:disabled":{cursor:`auto`,pointerEvents:`none`},[`&.${wh.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${wh.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),Oh=h(function(e){let{autoFocus:t,classes:n,disabled:r,selected:i,value:a,onClick:o,onKeyDown:s,onFocus:c,onBlur:u,slots:d,slotProps:f}=e,p=Z(e,Th),m=l(null),{ownerState:h}=su(),g=x({},h,{isMonthDisabled:r,isMonthSelected:i}),_=Eh(n,g);un(()=>{if(t){var e;(e=m.current)==null||e.focus()}},[t]);let v=(d==null?void 0:d.monthButton)??Dh,y=It({elementType:v,externalSlotProps:f==null?void 0:f.monthButton,externalForwardedProps:p,additionalProps:{disabled:r,ref:m,type:`button`,role:`radio`,"aria-checked":i,onClick:e=>o(e,a),onKeyDown:e=>s(e,a),onFocus:e=>c(e,a),onBlur:e=>u(e,a)},ownerState:g,className:_.button});return Y(v,x({},y))});g();var kh=[`autoFocus`,`className`,`currentMonth`,`classes`,`value`,`defaultValue`,`referenceDate`,`disabled`,`disableFuture`,`disablePast`,`maxDate`,`minDate`,`onChange`,`shouldDisableMonth`,`readOnly`,`disableHighlightToday`,`onMonthFocus`,`hasFocus`,`onFocusedViewChange`,`monthsPerRow`,`timezone`,`gridLabelId`,`slots`,`slotProps`],Ah=e=>Le({root:[`root`]},Ch,e);function jh(e,t){let n=Mt({props:e,name:t}),r=Nf(n);return x({},n,r,{monthsPerRow:n.monthsPerRow??3})}var Mh=(e,t,n,r,i)=>!!(e===t&&r&&i.isSameYear(n,r)),Nh=J(`div`,{name:`MuiMonthCalendar`,slot:`Root`,shouldForwardProp:e=>Ae(e)&&e!==`monthsPerRow`})({display:`flex`,flexWrap:`wrap`,justifyContent:`space-evenly`,rowGap:16,padding:`8px 0`,width:320,boxSizing:`border-box`,variants:[{props:{monthsPerRow:3},style:{columnGap:24}},{props:{monthsPerRow:4},style:{columnGap:0}}]}),Ph=o(function(e,t){let n=jh(e,`MuiMonthCalendar`),{autoFocus:r,className:i,currentMonth:o,classes:s,value:c,defaultValue:l,referenceDate:d,disabled:m,disableFuture:h,disablePast:g,maxDate:_,minDate:v,onChange:y,shouldDisableMonth:b,readOnly:S,onMonthFocus:C,hasFocus:w,onFocusedViewChange:T,monthsPerRow:E,timezone:D,gridLabelId:O,slots:k,slotProps:A}=n,M=Z(n,kh),{value:N,handleValueChange:ee,timezone:P}=sd({name:`MonthCalendar`,timezone:D,value:c,defaultValue:l,referenceDate:d,onChange:y,valueManager:pd}),F=Zl(P),te=j(),I=kc(),{ownerState:L}=su(),R=p(()=>pd.getInitialReferenceValue({value:N,adapter:I,props:n,timezone:P,referenceDate:d,granularity:cd.month}),[]),z=Ah(s),ne=p(()=>I.getMonth(F),[I,F]),re=p(()=>N==null?null:I.getMonth(N),[N,I]),[ie,ae]=u(()=>re||I.getMonth(R)),[B,oe]=Zt({name:`MonthCalendar`,state:`hasFocus`,controlled:w,default:r??!1}),se=G(e=>{oe(e),T&&T(e)}),ce=f(e=>{let t=I.startOfMonth(g&&I.isAfter(F,v)?F:v),n=I.startOfMonth(h&&I.isBefore(F,_)?F:_),r=I.startOfMonth(e);return I.isBefore(r,t)||I.isAfter(r,n)?!0:b?b(r):!1},[h,g,_,v,F,b,I]),le=G((e,t)=>{if(S)return;let n=(N&&o&&!I.isSameYear(N,o)?I.setYear(N,I.getYear(o)):N)??o??R,r=I.setMonth(n,t);ee(r)}),H=G(e=>{ce(I.setMonth(N??o??R,e))||(ae(e),se(!0),C&&C(e))});a(()=>{ae(e=>re!==null&&e!==re?re:e)},[re]);let ue=G((e,t)=>{switch(e.key){case`ArrowUp`:H((12+t-3)%12),e.preventDefault();break;case`ArrowDown`:H((12+t+3)%12),e.preventDefault();break;case`ArrowLeft`:H((12+t+(te?1:-1))%12),e.preventDefault();break;case`ArrowRight`:H((12+t+(te?-1:1))%12),e.preventDefault();break;case`Enter`:case` `:le(e,t),e.preventDefault()}}),de=G((e,t)=>{H(t)}),U=G((e,t)=>{ie===t&&se(!1)});return Y(Nh,x({ref:t,className:V(z.root,i),ownerState:L,role:`radiogroup`,"aria-labelledby":O,monthsPerRow:E},M,{children:Gc(I,o??N??R).map(e=>{let t=I.getMonth(e),n=I.format(e,`monthShort`),r=I.format(e,`month`),i=Mh(t,re,e,N,I),a=m||ce(e);return Y(Oh,{selected:i,value:t,onClick:le,onKeyDown:ue,autoFocus:B&&t===ie,disabled:a,tabIndex:t===ie&&!a?0:-1,onFocus:de,onBlur:U,"aria-current":Mh(t,ne,e,F,I)?`date`:void 0,"aria-label":r,slots:k,slotProps:A,classes:s,children:n},n)})}))});function Fh(e){return Ve(`MuiYearCalendar`,e)}var Ih=Ne(`MuiYearCalendar`,[`root`,`button`,`disabled`,`selected`]);g();var Lh=[`autoFocus`,`classes`,`disabled`,`selected`,`value`,`onClick`,`onKeyDown`,`onFocus`,`onBlur`,`slots`,`slotProps`],Rh=(e,t)=>{let n={button:[`button`,t.isYearDisabled&&`disabled`,t.isYearSelected&&`selected`]};return Le(n,Fh,e)},zh=J(`button`,{name:`MuiYearCalendar`,slot:`Button`,overridesResolver:(e,t)=>[t.button,{[`&.${Ih.disabled}`]:t.disabled},{[`&.${Ih.selected}`]:t.selected}]})(({theme:e})=>x({color:`unset`,backgroundColor:`transparent`,border:0,outline:0},e.typography.subtitle1,{height:36,width:72,borderRadius:18,cursor:`pointer`,"&:focus":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.focusOpacity)},"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)},"&:disabled":{cursor:`auto`,pointerEvents:`none`},[`&.${Ih.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${Ih.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),Bh=h(function(e){let{autoFocus:t,classes:n,disabled:r,selected:i,value:a,onClick:o,onKeyDown:s,onFocus:c,onBlur:u,slots:d,slotProps:f}=e,p=Z(e,Lh),m=l(null),{ownerState:h}=su(),g=x({},h,{isYearDisabled:r,isYearSelected:i}),_=Rh(n,g);un(()=>{if(t){var e;(e=m.current)==null||e.focus()}},[t]);let v=(d==null?void 0:d.yearButton)??zh,y=It({elementType:v,externalSlotProps:f==null?void 0:f.yearButton,externalForwardedProps:p,additionalProps:{disabled:r,ref:m,type:`button`,role:`radio`,"aria-checked":i,onClick:e=>o(e,a),onKeyDown:e=>s(e,a),onFocus:e=>c(e,a),onBlur:e=>u(e,a)},ownerState:g,className:_.button});return Y(v,x({},y))});g();var Vh=[`autoFocus`,`className`,`classes`,`value`,`defaultValue`,`referenceDate`,`disabled`,`disableFuture`,`disablePast`,`maxDate`,`minDate`,`onChange`,`readOnly`,`shouldDisableYear`,`disableHighlightToday`,`onYearFocus`,`hasFocus`,`onFocusedViewChange`,`yearsOrder`,`yearsPerRow`,`timezone`,`gridLabelId`,`slots`,`slotProps`],Hh=e=>Le({root:[`root`]},Fh,e);function Uh(e,t){let n=Mt({props:e,name:t}),r=Nf(n);return x({},n,r,{yearsPerRow:n.yearsPerRow??3,yearsOrder:n.yearsOrder??`asc`})}var Wh=J(`div`,{name:`MuiYearCalendar`,slot:`Root`,shouldForwardProp:e=>Ae(e)&&e!==`yearsPerRow`})({display:`flex`,flexWrap:`wrap`,justifyContent:`space-evenly`,rowGap:12,padding:`6px 0`,overflowY:`auto`,height:`100%`,width:320,maxHeight:280,boxSizing:`border-box`,position:`relative`,variants:[{props:{yearsPerRow:3},style:{columnGap:24}},{props:{yearsPerRow:4},style:{columnGap:0,padding:`0 2px`}}]}),Gh=J(`div`,{name:`MuiYearCalendar`,slot:`ButtonFiller`})({height:36,width:72}),Kh=o(function(e,t){let n=Uh(e,`MuiYearCalendar`),{autoFocus:r,className:i,classes:o,value:s,defaultValue:c,referenceDate:d,disabled:m,disableFuture:h,disablePast:g,maxDate:_,minDate:v,onChange:y,readOnly:b,shouldDisableYear:S,onYearFocus:C,hasFocus:w,onFocusedViewChange:T,yearsOrder:E,yearsPerRow:D,timezone:O,gridLabelId:k,slots:A,slotProps:M}=n,N=Z(n,Vh),{value:ee,handleValueChange:F,timezone:te}=sd({name:`YearCalendar`,timezone:O,value:s,defaultValue:c,referenceDate:d,onChange:y,valueManager:pd}),I=Zl(te),L=j(),R=kc(),{ownerState:z}=su(),ne=p(()=>pd.getInitialReferenceValue({value:ee,adapter:R,props:n,timezone:te,referenceDate:d,granularity:cd.year}),[]),re=Hh(o),ie=p(()=>R.getYear(I),[R,I]),ae=p(()=>ee==null?null:R.getYear(ee),[ee,R]),[B,se]=u(()=>ae||R.getYear(ne)),[ce,le]=Zt({name:`YearCalendar`,state:`hasFocus`,controlled:w,default:r??!1}),H=G(e=>{le(e),T&&T(e)}),ue=f(e=>{if(g&&R.isBeforeYear(e,I)||h&&R.isAfterYear(e,I)||v&&R.isBeforeYear(e,v)||_&&R.isAfterYear(e,_))return!0;if(!S)return!1;let t=R.startOfYear(e);return S(t)},[h,g,_,v,I,S,R]),de=G((e,t)=>{if(b)return;let n=R.setYear(ee??ne,t);F(n)}),U=G(e=>{ue(R.setYear(ee??ne,e))||(se(e),H(!0),C==null||C(e))});a(()=>{se(e=>ae!==null&&e!==ae?ae:e)},[ae]);let fe=E===`desc`?D*-1:D*1,pe=L&&E===`asc`||!L&&E===`desc`?-1:1,W=G((e,t)=>{switch(e.key){case`ArrowUp`:U(t-fe),e.preventDefault();break;case`ArrowDown`:U(t+fe),e.preventDefault();break;case`ArrowLeft`:U(t-pe),e.preventDefault();break;case`ArrowRight`:U(t+pe),e.preventDefault();break;case`Enter`:case` `:de(e,t),e.preventDefault()}}),me=G((e,t)=>{U(t)}),he=G((e,t)=>{B===t&&H(!1)}),ge=l(null),_e=oe(t,ge);a(()=>{if(r||ge.current===null)return;let e=ge.current.querySelector(`[tabindex="0"]`);if(!e)return;let t=e.offsetHeight,n=e.offsetTop,i=ge.current.clientHeight,a=ge.current.scrollTop,o=n+t;t>i||n<a||(ge.current.scrollTop=o-i/2-t/2)},[r]);let ve=R.getYearRange([v,_]);E===`desc`&&ve.reverse();let ye=D-ve.length%D;return ye===D&&(ye=0),P(Wh,x({ref:_e,className:V(re.root,i),ownerState:z,role:`radiogroup`,"aria-labelledby":k,yearsPerRow:D},N,{children:[ve.map(e=>{let t=R.getYear(e),n=t===ae,r=m||ue(e);return Y(Bh,{selected:n,value:t,onClick:de,onKeyDown:W,autoFocus:ce&&t===B,disabled:r,tabIndex:t===B&&!r?0:-1,onFocus:me,onBlur:he,"aria-current":ie===t?`date`:void 0,slots:A,slotProps:M,classes:o,children:R.format(e,`year`)},R.format(e,`year`))}),Array.from({length:ye},(e,t)=>Y(Gh,{},t))]}))}),qh=e=>Ve(`MuiPickersCalendarHeader`,e),Jh=Ne(`MuiPickersCalendarHeader`,[`root`,`labelContainer`,`label`,`switchViewButton`,`switchViewIcon`]);g();var Yh=[`slots`,`slotProps`,`currentMonth`,`disabled`,`disableFuture`,`disablePast`,`maxDate`,`minDate`,`onMonthChange`,`onViewChange`,`view`,`reduceAnimations`,`views`,`labelId`,`className`,`classes`,`timezone`,`format`],Xh=[`ownerState`],Zh=e=>Le({root:[`root`],labelContainer:[`labelContainer`],label:[`label`],switchViewButton:[`switchViewButton`],switchViewIcon:[`switchViewIcon`]},qh,e),Qh=J(`div`,{name:`MuiPickersCalendarHeader`,slot:`Root`})({display:`flex`,alignItems:`center`,marginTop:12,marginBottom:4,paddingLeft:24,paddingRight:12,maxHeight:40,minHeight:40}),$h=J(`div`,{name:`MuiPickersCalendarHeader`,slot:`LabelContainer`})(({theme:e})=>x({display:`flex`,overflow:`hidden`,alignItems:`center`,cursor:`pointer`,marginRight:`auto`},e.typography.body1,{fontWeight:e.typography.fontWeightMedium})),eg=J(`div`,{name:`MuiPickersCalendarHeader`,slot:`Label`})({marginRight:6}),tg=J(Qn,{name:`MuiPickersCalendarHeader`,slot:`SwitchViewButton`})({marginRight:`auto`,variants:[{props:{view:`year`},style:{[`.${Jh.switchViewIcon}`]:{transform:`rotate(180deg)`}}}]}),ng=J(Ql,{name:`MuiPickersCalendarHeader`,slot:`SwitchViewIcon`})(({theme:e})=>({willChange:`transform`,transition:e.transitions.create(`transform`),transform:`rotate(0deg)`})),rg=o(function(e,t){let n=Ac(),r=kc(),i=Mt({props:e,name:`MuiPickersCalendarHeader`}),{slots:a,slotProps:o,currentMonth:s,disabled:c,disableFuture:l,disablePast:u,maxDate:d,minDate:f,onMonthChange:p,onViewChange:m,view:h,reduceAnimations:g,views:_,labelId:v,className:y,classes:b,timezone:S,format:C=`${r.formats.month} ${r.formats.year}`}=i,w=Z(i,Yh),{ownerState:T}=su(),E=Zh(b),D=(a==null?void 0:a.switchViewButton)??tg,O=It({elementType:D,externalSlotProps:o==null?void 0:o.switchViewButton,additionalProps:{size:`small`,"aria-label":n.calendarViewSwitchingButtonAriaLabel(h)},ownerState:x({},T,{view:h}),className:E.switchViewButton}),k=(a==null?void 0:a.switchViewIcon)??ng,A=Z(It({elementType:k,externalSlotProps:o==null?void 0:o.switchViewIcon,ownerState:T,className:E.switchViewIcon}),Xh),j=()=>p(r.addMonths(s,1)),M=()=>p(r.addMonths(s,-1)),N=yu(s,{disableFuture:l,maxDate:d,timezone:S}),ee=bu(s,{disablePast:u,minDate:f,timezone:S}),F=()=>{if(!(_.length===1||!m||c))if(_.length===2)m(_.find(e=>e!==h)||_[0]);else{let e=+(_.indexOf(h)===0);m(_[e])}};if(_.length===1&&_[0]===`year`)return null;let te=r.formatByString(s,C);return P(Qh,x({},w,{ownerState:T,className:V(E.root,y),ref:t,children:[P($h,{role:`none`,onClick:F,ownerState:T,"aria-live":`polite`,className:E.labelContainer,children:[Y(Qm,{reduceAnimations:g,transKey:te,children:Y(eg,{id:v,ownerState:T,className:E.label,children:te})}),_.length>1&&!c&&Y(D,x({},O,{children:Y(k,x({},A))}))]}),Y(Ot,{in:h===`day`,appear:!g,enter:!g,children:Y(hu,{slots:a,slotProps:o,onGoToPrevious:M,isPreviousDisabled:ee,previousLabel:n.previousMonth,onGoToNext:j,isNextDisabled:N,nextLabel:n.nextMonth})})]}))}),ig=`@media (prefers-reduced-motion: reduce)`,ag=typeof navigator<`u`&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),og=ag&&ag[1]?parseInt(ag[1],10):null,sg=ag&&ag[2]?parseInt(ag[2],10):null,cg=og&&og<10||sg&&sg<13||!1;function lg(e){let t=Te(ig,{defaultMatches:!1});return e??(t||cg)}var ug=e=>Ve(`MuiDateCalendar`,e),dg=Ne(`MuiDateCalendar`,[`root`,`viewTransitionContainer`]);g();var fg=`autoFocus.onViewChange.value.defaultValue.referenceDate.disableFuture.disablePast.onChange.onYearChange.onMonthChange.reduceAnimations.shouldDisableDate.shouldDisableMonth.shouldDisableYear.view.views.openTo.className.classes.disabled.readOnly.minDate.maxDate.disableHighlightToday.focusedView.onFocusedViewChange.showDaysOutsideCurrentMonth.fixedWeekNumber.dayOfWeekFormatter.slots.slotProps.loading.renderLoading.displayWeekNumber.yearsOrder.yearsPerRow.monthsPerRow.timezone`.split(`.`),pg=e=>Le({root:[`root`],viewTransitionContainer:[`viewTransitionContainer`]},ug,e);function mg(e,t){let n=Mt({props:e,name:t}),r=lg(n.reduceAnimations),i=Nf(n);return x({},n,i,{loading:n.loading??!1,openTo:n.openTo??`day`,views:n.views??[`year`,`day`],reduceAnimations:r,renderLoading:n.renderLoading??(()=>Y(`span`,{children:`…`}))})}var hg=J(Su,{name:`MuiDateCalendar`,slot:`Root`})({display:`flex`,flexDirection:`column`,height:336}),gg=J(Qm,{name:`MuiDateCalendar`,slot:`ViewTransitionContainer`})({}),_g=o(function(e,t){let n=kc(),{ownerState:r}=su(),i=mn(),o=mg(e,`MuiDateCalendar`),{autoFocus:s,onViewChange:c,value:u,defaultValue:d,referenceDate:f,disableFuture:m,disablePast:h,onChange:g,onMonthChange:_,reduceAnimations:v,shouldDisableDate:y,shouldDisableMonth:b,shouldDisableYear:S,view:C,views:w,openTo:T,className:E,classes:D,disabled:O,readOnly:k,minDate:A,maxDate:j,disableHighlightToday:M,focusedView:N,onFocusedViewChange:ee,showDaysOutsideCurrentMonth:F,fixedWeekNumber:te,dayOfWeekFormatter:I,slots:L,slotProps:R,loading:z,renderLoading:ne,displayWeekNumber:re,yearsOrder:ie,yearsPerRow:ae,monthsPerRow:B,timezone:oe}=o,se=Z(o,fg),{value:ce,handleValueChange:le,timezone:H}=sd({name:`DateCalendar`,timezone:oe,value:u,defaultValue:d,referenceDate:f,onChange:g,valueManager:pd}),{view:ue,setView:de,focusedView:U,setFocusedView:fe,goToNextView:pe,setValueAndGoToNextView:W}=vu({view:C,views:w,openTo:T,onChange:le,onViewChange:c,autoFocus:s,focusedView:N,onFocusedViewChange:ee}),{referenceDate:me,calendarState:he,setVisibleDate:ge,isDateDisabled:_e,onMonthSwitchingAnimationEnd:ve}=ym({value:ce,referenceDate:f,reduceAnimations:v,onMonthChange:_,minDate:A,maxDate:j,shouldDisableDate:y,disablePast:h,disableFuture:m,timezone:H,getCurrentMonthFromVisibleDate:(e,t)=>n.isSameMonth(e,t)?t:n.startOfMonth(e)}),ye=O&&ce||A,be=O&&ce||j,xe=`${i}-grid-label`,Se=U!==null,Ce=(L==null?void 0:L.calendarHeader)??rg,we=It({elementType:Ce,externalSlotProps:R==null?void 0:R.calendarHeader,additionalProps:{views:w,view:ue,currentMonth:he.currentMonth,onViewChange:de,onMonthChange:e=>ge({target:e,reason:`header-navigation`}),minDate:ye,maxDate:be,disabled:O,disablePast:h,disableFuture:m,reduceAnimations:v,timezone:H,labelId:xe},ownerState:r}),Te=G(e=>{let t=n.startOfMonth(e),r=n.endOfMonth(e),i=_e(e)?Vc({adapter:n,date:e,minDate:n.isBefore(A,t)?t:A,maxDate:n.isAfter(j,r)?r:j,disablePast:h,disableFuture:m,isDateDisabled:_e,timezone:H}):e;i?(W(i,`finish`),ge({target:i,reason:`cell-interaction`})):(pe(),ge({target:t,reason:`cell-interaction`}))}),Ee=G(e=>{let t=n.startOfYear(e),r=n.endOfYear(e),i=_e(e)?Vc({adapter:n,date:e,minDate:n.isBefore(A,t)?t:A,maxDate:n.isAfter(j,r)?r:j,disablePast:h,disableFuture:m,isDateDisabled:_e,timezone:H}):e;i?(W(i,`finish`),ge({target:i,reason:`cell-interaction`})):(pe(),ge({target:t,reason:`cell-interaction`}))}),De=G(e=>le(e&&Bc(n,e,ce??me),`finish`,ue));a(()=>{n.isValid(ce)&&ge({target:ce,reason:`controlled-value-change`})},[ce]);let Oe=pg(D),ke={disablePast:h,disableFuture:m,maxDate:j,minDate:A},Ae={disableHighlightToday:M,readOnly:k,disabled:O,timezone:H,gridLabelId:xe,slots:L,slotProps:R},je=l(ue);a(()=>{je.current!==ue&&(U===je.current&&fe(ue,!0),je.current=ue)},[U,fe,ue]);let Me=p(()=>[ce],[ce]);return P(hg,x({ref:t,className:V(Oe.root,E),ownerState:r},se,{children:[Y(Ce,x({},we,{slots:L,slotProps:R})),Y(gg,{reduceAnimations:v,className:Oe.viewTransitionContainer,transKey:ue,ownerState:r,children:P(`div`,{children:[ue===`year`&&Y(Kh,x({},ke,Ae,{value:ce,onChange:Ee,shouldDisableYear:S,hasFocus:Se,onFocusedViewChange:e=>fe(`year`,e),yearsOrder:ie,yearsPerRow:ae,referenceDate:me})),ue===`month`&&Y(Ph,x({},ke,Ae,{currentMonth:he.currentMonth,hasFocus:Se,className:E,value:ce,onChange:Te,shouldDisableMonth:b,onFocusedViewChange:e=>fe(`month`,e),monthsPerRow:B,referenceDate:me})),ue===`day`&&Y(Sh,x({},he,ke,Ae,{onMonthSwitchingAnimationEnd:ve,hasFocus:Se,onFocusedDayChange:e=>ge({target:e,reason:`cell-interaction`}),reduceAnimations:v,selectedDays:Me,onSelectedDaysChange:De,shouldDisableDate:y,shouldDisableMonth:b,shouldDisableYear:S,onFocusedViewChange:e=>fe(`day`,e),showDaysOutsideCurrentMonth:F,fixedWeekNumber:te,dayOfWeekFormatter:I,displayWeekNumber:re,loading:z,renderLoading:ne}))]})})]}))}),vg=e=>Ve(`MuiDayCalendarSkeleton`,e),yg=Ne(`MuiDayCalendarSkeleton`,[`root`,`week`,`daySkeleton`]);g();var bg=[`className`,`classes`],xg=e=>Le({root:[`root`],week:[`week`],daySkeleton:[`daySkeleton`]},vg,e),Sg=J(`div`,{name:`MuiDayCalendarSkeleton`,slot:`Root`})({alignSelf:`start`}),Cg=J(`div`,{name:`MuiDayCalendarSkeleton`,slot:`Week`})({margin:`2px 0`,display:`flex`,justifyContent:`center`}),wg=J(st,{name:`MuiDayCalendarSkeleton`,slot:`DaySkeleton`})({margin:`0 2px`,'&[data-day-in-month="0"]':{visibility:`hidden`}}),Tg=[[0,1,1,1,1,1,1],[1,1,1,1,1,1,1],[1,1,1,1,1,1,1],[1,1,1,1,1,1,1],[1,1,1,1,0,0,0]];function Eg(e){let t=Mt({props:e,name:`MuiDayCalendarSkeleton`}),{className:n,classes:r}=t,i=Z(t,bg),a=xg(r);return Y(Sg,x({className:V(a.root,n),ownerState:t},i,{children:Tg.map((e,t)=>Y(Cg,{className:a.week,children:e.map((e,t)=>Y(wg,{variant:`circular`,width:36,height:36,className:a.daySkeleton,"data-day-in-month":e},t))},t))}))}function Dg(e){return Ve(`MuiPickersToolbar`,e)}var Og=Ne(`MuiPickersToolbar`,[`root`,`title`,`content`]);g();function kg(){let{ownerState:e}=su(),t=j();return p(()=>x({},e,{toolbarDirection:t?`rtl`:`ltr`}),[e,t])}g();var Ag=[`children`,`className`,`classes`,`toolbarTitle`,`hidden`,`titleId`,`classes`,`landscapeDirection`],jg=e=>Le({root:[`root`],title:[`title`],content:[`content`]},Dg,e),Mg=J(`div`,{name:`MuiPickersToolbar`,slot:`Root`})(({theme:e})=>({display:`flex`,flexDirection:`column`,alignItems:`flex-start`,justifyContent:`space-between`,padding:e.spacing(2,3),variants:[{props:{pickerOrientation:`landscape`},style:{height:`auto`,maxWidth:160,padding:16,justifyContent:`flex-start`,flexWrap:`wrap`}}]})),Ng=J(`div`,{name:`MuiPickersToolbar`,slot:`Content`,shouldForwardProp:e=>Ae(e)&&e!==`landscapeDirection`})({display:`flex`,flexWrap:`wrap`,width:`100%`,flex:1,justifyContent:`space-between`,alignItems:`center`,flexDirection:`row`,variants:[{props:{pickerOrientation:`landscape`},style:{justifyContent:`flex-start`,alignItems:`flex-start`,flexDirection:`column`}},{props:{pickerOrientation:`landscape`,landscapeDirection:`row`},style:{flexDirection:`row`}}]}),Pg=o(function(e,t){let n=Mt({props:e,name:`MuiPickersToolbar`}),{children:r,className:i,classes:a,toolbarTitle:o,hidden:s,titleId:c,landscapeDirection:l}=n,u=Z(n,Ag),d=kg(),f=jg(a);return s?null:P(Mg,x({ref:t,className:V(f.root,i),ownerState:d},u,{children:[Y(_n,{variant:`overline`,id:c,className:f.title,sx:{color:`text.secondary`},children:o}),Y(Ng,{className:f.content,ownerState:d,landscapeDirection:l,children:r})]}))});function Fg(e){return Ve(`MuiDatePickerToolbar`,e)}var Ig=Ne(`MuiDatePickerToolbar`,[`root`,`title`]);g();var Lg=[`toolbarFormat`,`toolbarPlaceholder`,`className`,`classes`],Rg=e=>Le({root:[`root`],title:[`title`]},Fg,e),zg=J(Pg,{name:`MuiDatePickerToolbar`,slot:`Root`})({}),Bg=J(_n,{name:`MuiDatePickerToolbar`,slot:`Title`})({variants:[{props:{pickerOrientation:`landscape`},style:{margin:`auto 16px auto auto`}}]}),Vg=o(function(e,t){let n=Mt({props:e,name:`MuiDatePickerToolbar`}),{toolbarFormat:r,toolbarPlaceholder:i=`––`,className:a,classes:o}=n,s=Z(n,Lg),c=kc(),{value:l,views:u,orientation:d}=zl(),f=Ac(),m=kg(),h=Rg(o),g=p(()=>{if(!c.isValid(l))return i;let e=Xc(c,{format:r,views:u},!0);return c.formatByString(l,e)},[l,r,i,c,u]);return Y(zg,x({ref:t,toolbarTitle:f.datePickerToolbarTitle,className:V(h.root,a)},s,{children:Y(Bg,{variant:`h4`,align:d===`landscape`?`left`:`center`,ownerState:m,className:h.title,children:g})}))});g();function Hg(e,t){let n=Mt({props:e,name:t}),r=Nf(n),i=p(()=>{var e;return((e=n.localeText)==null?void 0:e.toolbarTitle)==null?n.localeText:x({},n.localeText,{datePickerToolbarTitle:n.localeText.toolbarTitle})},[n.localeText]);return x({},n,r,{localeText:i},zc({views:n.views,openTo:n.openTo,defaultViews:[`year`,`day`],defaultOpenTo:`day`}),{slots:x({toolbar:Vg},n.slots)})}var Ug=e=>e.type===`hidden`;function Wg(e){let{nodeName:t}=e;return!!([`BUTTON`,`DETAILS`,`EMBED`,`IFRAME`,`KEYGEN`,`LABEL`,`SELECT`,`TEXTAREA`].includes(t)||t===`A`&&e.hasAttribute(`href`)||e instanceof HTMLInputElement&&!Ug(e)||[`AUDIO`,`VIDEO`].includes(t)&&e.hasAttribute(`controls`)||[`IMG`,`OBJECT`].includes(t)&&e.hasAttribute(`usemap`)||e.hasAttribute(`tabindex`)&&e.tabIndex>-1)}function Gg(e){return Ve(`MuiPickerPopper`,e)}Ne(`MuiPickerPopper`,[`root`,`paper`]),g();var Kg=[`PaperComponent`,`ownerState`,`children`,`paperSlotProps`,`paperClasses`,`onPaperClick`,`onPaperTouchStart`],qg=e=>Le({root:[`root`],paper:[`paper`]},Gg,e),Jg=J(Wn,{name:`MuiPickerPopper`,slot:`Root`})(({theme:e})=>({zIndex:e.zIndex.modal})),Yg=J(Nn,{name:`MuiPickerPopper`,slot:`Paper`})({outline:0,transformOrigin:`top center`,variants:[{props:({popperPlacement:e})=>new Set([`top`,`top-start`,`top-end`]).has(e),style:{transformOrigin:`bottom center`}}]});function Xg(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}function Zg(e,t){let n=l(!1),r=l(!1),i=l(null),o=l(!1);a(()=>{if(!e)return;function t(){o.current=!0}return document.addEventListener(`mousedown`,t,!0),document.addEventListener(`touchstart`,t,!0),()=>{document.removeEventListener(`mousedown`,t,!0),document.removeEventListener(`touchstart`,t,!0),o.current=!1}},[e]);let s=G(e=>{if(!o.current){r.current=!1;return}let a=r.current;r.current=!1;let s=ir(i.current);if(!i.current||`clientX`in e&&Xg(e,s))return;if(n.current){n.current=!1;return}let c;c=e.composedPath?e.composedPath().indexOf(i.current)>-1:!s.documentElement.contains(e.target)||i.current.contains(e.target),!c&&!a&&t(e)}),c=e=>{e.defaultMuiPrevented||(r.current=!0)};return a(()=>{if(e){let e=ir(i.current),t=()=>{n.current=!0};return e.addEventListener(`touchstart`,s),e.addEventListener(`touchmove`,t),()=>{e.removeEventListener(`touchstart`,s),e.removeEventListener(`touchmove`,t)}}},[e,s]),a(()=>{if(e){let e=ir(i.current);return e.addEventListener(`click`,s),()=>{e.removeEventListener(`click`,s),r.current=!1}}},[e,s]),[i,c,c]}var Qg=o((e,t)=>{let{PaperComponent:n,ownerState:r,children:i,paperSlotProps:a,paperClasses:o,onPaperClick:s,onPaperTouchStart:c}=e,l=Z(e,Kg),u=It({elementType:n,externalSlotProps:a,additionalProps:{tabIndex:-1,elevation:8,ref:t},className:o,ownerState:r});return Y(n,x({},l,u,{onClick:e=>{var t;s(e),(t=u.onClick)==null||t.call(u,e)},onTouchStart:e=>{var t;c(e),(t=u.onTouchStart)==null||t.call(u,e)},ownerState:r,children:i}))}),$g=e=>{let t=e instanceof HTMLElement?e:null;return t?Wg(t):!1};function e_(e){let{children:t,placement:n=`bottom-start`,slots:r,slotProps:i,classes:o}=Mt({props:e,name:`MuiPickerPopper`}),{open:s,popupRef:c,reduceAnimations:u,keepOpenDuringFieldFocus:d}=zl(),{ownerState:f,rootRefObject:m}=su(),{dismissViews:h,getCurrentViewMode:g,onPopperExited:_,triggerElement:v,viewContainerRole:y}=su();a(()=>{function e(e){s&&e.key===`Escape`&&h()}return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[h,s]);let b=l(null);a(()=>{y!==`tooltip`&&g()!==`field`&&(s?b.current=Dd(m.current):b.current&&b.current instanceof HTMLElement&&setTimeout(()=>{b.current instanceof HTMLElement&&b.current.focus()}))},[s,y,g,m]);let S=qg(o),[C,w,T]=Zg(s,G(e=>{d&&v&&e&&`target`in e&&v.contains(e.target)||(y===`tooltip`?Td(()=>{var e,t;(e=m.current)!=null&&e.contains(Dd(m.current))||(t=c.current)!=null&&t.contains(Dd(c.current))||h()}):(e.composedPath().some($g)&&(b.current=null),h()))})),E=l(null),D=oe(E,c),O=oe(D,C),k=e=>{e.key===`Escape`&&(e.stopPropagation(),h())},A=(r==null?void 0:r.desktopTransition)??u?Ot:_t,j=(r==null?void 0:r.desktopTrapFocus)??Bn,M=(r==null?void 0:r.desktopPaper)??Yg,N=(r==null?void 0:r.popper)??Jg,ee=It({elementType:N,externalSlotProps:i==null?void 0:i.popper,additionalProps:{transition:!0,role:y??void 0,open:s,placement:n,anchorEl:v,onKeyDown:k},className:S.root,ownerState:f}),P=p(()=>x({},f,{popperPlacement:ee.placement}),[f,ee.placement]);return Y(N,x({},ee,{children:({TransitionProps:e})=>Y(j,x({open:s,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:y===`tooltip`},i==null?void 0:i.desktopTrapFocus,{children:Y(A,x({},e,i==null?void 0:i.desktopTransition,{onExited:t=>{var n,r,a;_==null||_(),i==null||(n=i.desktopTransition)==null||(r=n.onExited)==null||r.call(n,t),e==null||(a=e.onExited)==null||a.call(e)},children:Y(Qg,{PaperComponent:M,ownerState:P,ref:O,onPaperClick:w,onPaperTouchStart:T,paperClasses:S.paper,paperSlotProps:i==null?void 0:i.desktopPaper,children:t})}))}))}))}g();function t_(){return typeof window>`u`?`portrait`:window.screen&&window.screen.orientation&&window.screen.orientation.angle?Math.abs(window.screen.orientation.angle)===90?`landscape`:`portrait`:window.orientation&&Math.abs(Number(window.orientation))===90?`landscape`:`portrait`}function n_(e,t){let[n,r]=u(t_);return un(()=>{let e=()=>{r(t_())};return window.addEventListener(`orientationchange`,e),()=>{window.removeEventListener(`orientationchange`,e)}},[]),wd(e,[`hours`,`minutes`,`seconds`])?`portrait`:t??n}g();function r_(e){let{props:t,valueManager:n,validator:r}=e,{value:i,defaultValue:o,onChange:s,referenceDate:c,timezone:d,onAccept:f,closeOnSelect:m,open:h,onOpen:g,onClose:_}=t,{current:v}=l(o),{current:y}=l(i!==void 0),{current:b}=l(h!==void 0),S=kc(),{timezone:C,value:w,handleValueChange:T}=sd({name:`a picker component`,timezone:d,value:i,defaultValue:v,referenceDate:c,onChange:s,valueManager:n}),[E,D]=u(()=>({open:!1,lastExternalValue:w,clockShallowValue:void 0,lastCommittedValue:w,hasBeenModifiedSinceMount:!1})),{getValidationErrorForNewValue:O}=pf({props:t,validator:r,timezone:C,value:w,onError:t.onError}),k=G(e=>{let t=typeof e==`function`?e(E.open):e;b||D(e=>x({},e,{open:t})),t&&g&&g(),t||_==null||_()}),A=G((e,t)=>{let{changeImportance:r=`accept`,skipPublicationIfPristine:i=!1,validationError:a,shortcut:o,source:s,shouldClose:c=r===`accept`}=t??{},l,u;!i&&!y&&!E.hasBeenModifiedSinceMount?(l=!0,u=r===`accept`):(l=!n.areValuesEqual(S,e,w),u=r===`accept`&&!n.areValuesEqual(S,e,E.lastCommittedValue)),D(t=>x({},t,{clockShallowValue:l?void 0:t.clockShallowValue,lastCommittedValue:u?e:t.lastCommittedValue,hasBeenModifiedSinceMount:!0}));let d=null,p=()=>{if(!d){let t;t=s||(o?`view`:`unknown`),d={validationError:a??O(e),source:t},o&&(d.shortcut=o)}return d};l&&T(e,p()),u&&f&&f(e,p()),c&&k(!1)});w!==E.lastExternalValue&&D(e=>x({},e,{lastExternalValue:w,clockShallowValue:void 0,hasBeenModifiedSinceMount:!0}));let j=G((e,t=`partial`)=>{if(t===`shallow`){D(t=>x({},t,{clockShallowValue:e,hasBeenModifiedSinceMount:!0}));return}A(e,{changeImportance:t===`finish`&&m?`accept`:`set`,source:`view`})});return a(()=>{if(b){if(h===void 0)throw Error(xc(160));D(e=>x({},e,{open:h}))}},[b,h]),{timezone:C,state:E,setValue:A,setValueFromView:j,setOpen:k,value:w,viewValue:p(()=>n.cleanValue(S,E.clockShallowValue===void 0?w:E.clockShallowValue),[S,n,E.clockShallowValue,w])}}g();var i_=[`className`,`sx`],a_=({ref:e,props:t,valueManager:n,valueType:r,variant:i,validator:a,onPopperExited:o,autoFocusView:s,rendererInterceptor:c,localeText:d,viewContainerRole:f,getStepNavigation:m})=>{let{views:h,view:g,openTo:_,onViewChange:v,viewRenderers:y,reduceAnimations:b,orientation:S,disableOpenPicker:C,closeOnSelect:w,disabled:T,readOnly:E,formatDensity:D,selectedSections:O,onSelectedSectionsChange:k,format:A,label:j,autoFocus:M,name:N,keepOpenDuringFieldFocus:ee}=t,{className:P,sx:F}=t,te=Z(t,i_),I=mn(),L=kc(),R=lg(b),z=n_(h,S),{current:ne}=l(_??null),[re,ie]=u(null),ae=l(null),B=l(null),se=l(null),ce=oe(e,se),{timezone:le,state:V,setOpen:H,setValue:ue,setValueFromView:de,value:U,viewValue:fe}=r_({props:t,valueManager:n,validator:a}),{view:pe,setView:W,defaultView:me,focusedView:he,setFocusedView:ge,setValueAndGoToNextView:_e,goToNextStep:ve,hasNextStep:ye,hasSeveralSteps:be}=vu({view:g,views:h,openTo:_,onChange:de,onViewChange:v,autoFocus:s,getStepNavigation:m}),xe=G(()=>{var e;U===null&&(e=B.current)!=null&&e.clearValue&&B.current.clearValue(),ue(n.emptyValue,{source:`view`})}),Se=G(()=>ue(n.getTodayValue(L,le,r),{source:`view`})),Ce=G(()=>ue(U,{source:`view`})),we=G(()=>ue(V.lastCommittedValue,{skipPublicationIfPristine:!0,source:`view`})),Te=G(()=>{ue(U,{skipPublicationIfPristine:!0,source:`view`})}),{hasUIView:Ee,viewModeLookup:De,timeViewsCount:Oe}=p(()=>h.reduce((e,t)=>{let n=y[t]==null?`field`:`UI`;return e.viewModeLookup[t]=n,n===`UI`&&(e.hasUIView=!0,el(t)&&(e.timeViewsCount+=1)),e},{hasUIView:!1,viewModeLookup:{},timeViewsCount:0}),[y,h]),ke=De[pe],Ae=G(()=>ke),[je,Me]=u(ke===`UI`?pe:null);je!==pe&&De[pe]===`UI`&&Me(pe),un(()=>{ke===`field`&&V.open&&(H(!1),setTimeout(()=>{var e,t;B==null||(e=B.current)==null||e.setSelectedSections(pe),B==null||(t=B.current)==null||t.focusField(pe)}))},[pe]),un(()=>{if(!V.open)return;let e=pe;ke===`field`&&je!=null&&(e=je),e!==me&&De[e]===`UI`&&De[me]===`UI`&&(e=me),e!==pe&&W(e),ge(e,!0)},[V.open]);let Ne=p(()=>({isPickerValueEmpty:n.areValuesEqual(L,U,n.emptyValue),isPickerOpen:V.open,isPickerDisabled:t.disabled??!1,isPickerReadOnly:t.readOnly??!1,pickerOrientation:z,pickerVariant:i}),[L,n,U,V.open,z,i,t.disabled,t.readOnly]),Pe=p(()=>C||!Ee?`hidden`:T||E?`disabled`:`enabled`,[C,Ee,T,E]),Fe=G(ve),Ie=p(()=>w&&!be?[]:[`cancel`,`nextOrAccept`],[w,be]),Le=p(()=>({setValue:ue,setOpen:H,clearValue:xe,setValueToToday:Se,acceptValueChanges:Ce,cancelValueChanges:we,setView:W,goToNextStep:Fe}),[ue,H,xe,Se,Ce,we,W,Fe]);return{providerProps:{localeText:d,contextValue:p(()=>x({},Le,{value:U,timezone:le,open:V.open,views:h,view:je,initialView:ne,disabled:T??!1,readOnly:E??!1,autoFocus:M??!1,variant:i,orientation:z,popupRef:ae,reduceAnimations:R,triggerRef:ie,triggerStatus:Pe,keepOpenDuringFieldFocus:!!ee,hasNextStep:ye,fieldFormat:A??``,name:N,label:j,rootSx:F,rootRef:ce,rootClassName:P}),[Le,U,ce,i,z,R,T,E,A,P,N,j,F,Pe,ee,ye,le,V.open,je,h,ne,M]),privateContextValue:p(()=>({dismissViews:Te,ownerState:Ne,hasUIView:Ee,getCurrentViewMode:Ae,rootRefObject:se,labelId:I,triggerElement:re,viewContainerRole:f,defaultActionBarActions:Ie,onPopperExited:o}),[Te,Ne,Ee,Ae,I,re,f,Ie,o]),actionsContextValue:Le,fieldPrivateContextValue:p(()=>({formatDensity:D,selectedSections:O,onSelectedSectionsChange:k,internalFieldRef:B}),[D,O,k,B]),isValidContextValue:e=>{let r=a({adapter:L,value:e,timezone:le,props:t});return!n.hasError(r)}},renderCurrentView:()=>{if(je==null)return null;let e=y[je];if(e==null)return null;let t=x({},te,{views:h,timezone:le,value:fe,onChange:_e,view:je,onViewChange:W,showViewSwitcher:Oe>1,timeViewsCount:Oe},f===`tooltip`?{focusedView:null,onFocusedViewChange:()=>{}}:{focusedView:he,onFocusedViewChange:ge});return c?Y(c,{viewRenderers:y,popperView:je,rendererProps:t}):e(t)},ownerState:Ne}};function o_(e){return Ve(`MuiPickersLayout`,e)}var s_=Ne(`MuiPickersLayout`,[`root`,`landscape`,`contentWrapper`,`toolbar`,`actionBar`,`tabs`,`shortcuts`]);g();var c_=[`actions`],l_=J(Ut,{name:`MuiPickersLayout`,slot:`ActionBar`})({});function u_(e){let{actions:t}=e,n=Z(e,c_),r=Ac(),{clearValue:i,setValueToToday:a,acceptValueChanges:o,cancelValueChanges:s,goToNextStep:c,hasNextStep:l}=zl();if(t==null||t.length===0)return null;let u=t==null?void 0:t.map(e=>{switch(e){case`clear`:return Y(on,{onClick:i,children:r.clearButtonLabel},e);case`cancel`:return Y(on,{onClick:s,children:r.cancelButtonLabel},e);case`accept`:return Y(on,{onClick:o,children:r.okButtonLabel},e);case`today`:return Y(on,{onClick:a,children:r.todayButtonLabel},e);case`next`:return Y(on,{onClick:c,children:r.nextStepButtonLabel},e);case`nextOrAccept`:return l?Y(on,{onClick:c,children:r.nextStepButtonLabel},e):Y(on,{onClick:o,children:r.okButtonLabel},e);default:return null}});return Y(l_,x({},n,{children:u}))}var d_=h(u_),f_=[`items`,`changeImportance`],p_=[`getValue`],m_=J(Se,{name:`MuiPickersLayout`,slot:`Shortcuts`})({});function h_(e){let{items:t,changeImportance:n=`accept`}=e,r=Z(e,f_),{setValue:i}=Yl(),a=Ul();if(t==null||t.length===0)return null;let o=t.map(e=>{let{getValue:t}=e,r=Z(e,p_),o=t({isValid:a});return x({},r,{label:r.label,onClick:()=>{i(o,{changeImportance:n,shortcut:r,source:`view`})},disabled:!a(o)})});return Y(m_,x({dense:!0,sx:[{maxHeight:336,maxWidth:200,overflow:`auto`},...Array.isArray(r.sx)?r.sx:[r.sx]]},r,{children:o.map(e=>Y(de,{children:Y(kn,x({},e))},e.id??e.label))}))}g();var g_=[`ownerState`];function __(e){return e.view!==null}var v_=(e,t)=>{let{pickerOrientation:n}=t;return Le({root:[`root`,n===`landscape`&&`landscape`],contentWrapper:[`contentWrapper`],toolbar:[`toolbar`],actionBar:[`actionBar`],tabs:[`tabs`],landscape:[`landscape`],shortcuts:[`shortcuts`]},o_,e)},y_=e=>{let{ownerState:t,defaultActionBarActions:n}=su(),{view:r}=zl(),i=j(),{children:a,slots:o,slotProps:s,classes:c}=e,l=p(()=>x({},t,{layoutDirection:i?`rtl`:`ltr`,hasShortcuts:!1}),[t,i]),u=v_(c,l),d=(o==null?void 0:o.actionBar)??d_,f=Z(It({elementType:d,externalSlotProps:s==null?void 0:s.actionBar,additionalProps:{actions:n},className:u.actionBar,ownerState:l}),g_),m=Y(d,x({},f)),h=o==null?void 0:o.toolbar,g=It({elementType:h,externalSlotProps:s==null?void 0:s.toolbar,className:u.toolbar,ownerState:l}),_=__(g)&&h?Y(h,x({},g)):null,v=a,y=o==null?void 0:o.tabs,b=r&&y?Y(y,x({className:u.tabs},s==null?void 0:s.tabs)):null,S=(o==null?void 0:o.shortcuts)??h_,C=It({elementType:S,externalSlotProps:s==null?void 0:s.shortcuts,className:u.shortcuts,ownerState:l}),w=Array.isArray(C==null?void 0:C.items)&&C.items.length>0;return{toolbar:_,content:v,tabs:b,actionBar:m,shortcuts:r&&S?Y(S,x({},C)):null,ownerState:x({},l,{hasShortcuts:w})}};g();var b_=[`sx`,`className`,`classes`,`children`,`slots`,`slotProps`],x_=(e,t)=>{let{pickerOrientation:n}=t;return Le({root:[`root`,n===`landscape`&&`landscape`],contentWrapper:[`contentWrapper`]},o_,e)},S_=J(`div`,{name:`MuiPickersLayout`,slot:`Root`})({display:`grid`,gridAutoColumns:`max-content auto max-content`,gridAutoRows:`max-content auto max-content`,[`& .${s_.actionBar}`]:{gridColumn:`1 / 4`,gridRow:3},variants:[{props:{pickerOrientation:`landscape`,hasShortcuts:!1},style:{[`& .${s_.toolbar}`]:{gridColumn:1,gridRow:`1 / 3`}}},{props:{pickerOrientation:`landscape`,hasShortcuts:!0},style:{[`& .${s_.toolbar}`]:{gridColumn:`2 / 4`,gridRow:1,maxWidth:`max-content`},[`& .${s_.shortcuts}`]:{gridColumn:1,gridRow:2}}},{props:{pickerOrientation:`portrait`},style:{[`& .${s_.toolbar}`]:{gridColumn:`2 / 4`,gridRow:1},[`& .${s_.shortcuts}`]:{gridColumn:1,gridRow:`2 / 3`}}},{props:{hasShortcuts:!0,layoutDirection:`rtl`},style:{[`& .${s_.shortcuts}`]:{gridColumn:4}}}]}),C_=J(`div`,{name:`MuiPickersLayout`,slot:`ContentWrapper`})({gridColumn:`2 / 4`,gridRow:2,display:`flex`,flexDirection:`column`}),w_=o(function(e,t){let n=Mt({props:e,name:`MuiPickersLayout`}),{toolbar:r,content:i,tabs:a,actionBar:o,shortcuts:s,ownerState:c}=y_(n),{orientation:l,variant:u}=zl(),{sx:d,className:f,classes:p}=n,m=Z(n,b_),h=x_(p,c);return P(S_,x({ref:t,sx:d,className:V(h.root,f),ownerState:c},m,{children:[l===`landscape`?s:r,l===`landscape`?r:s,Y(C_,{className:h.contentWrapper,ownerState:c,children:u===`desktop`?P(y,{children:[i,a]}):P(y,{children:[a,i]})}),o]}))});function T_(e){let{steps:t}=e;return _u({steps:t,isViewMatchingStep:(e,t)=>t.views==null||t.views.includes(e),onStepChange:({step:e,defaultView:t,setView:n,view:r,views:i})=>{let a=e.views==null?t:e.views.find(e=>i.includes(e));a!==r&&n(a)}})}var E_=[`props`,`steps`],D_=[`ownerState`],O_=e=>{var t;let{props:n,steps:r}=e,i=Z(e,E_),{slots:a,slotProps:o,label:s,inputRef:c,localeText:l}=n,u=T_({steps:r}),{providerProps:d,renderCurrentView:f,ownerState:p}=a_(x({},i,{props:n,localeText:l,autoFocusView:!0,viewContainerRole:`dialog`,variant:`desktop`,getStepNavigation:u})),m=d.privateContextValue.labelId,h=(o==null||(t=o.toolbar)==null?void 0:t.hidden)??!1,g=a.field,_=Z(It({elementType:g,externalSlotProps:o==null?void 0:o.field,externalForwardedProps:Ad(n),additionalProps:x({},h&&{id:m}),ownerState:p}),D_),v=a.layout??w_,y=m;h&&(y=s?`${m}-label`:void 0);let b=x({},o,{toolbar:x({},o==null?void 0:o.toolbar,{titleId:m}),popper:x({"aria-labelledby":y},o==null?void 0:o.popper)});return{renderPicker:()=>P(Jl,x({},d,{children:[Y(g,x({},_,{slots:x({},a,_.slots),slotProps:x({},b,_.slotProps),inputRef:c})),Y(e_,{slots:a,slotProps:b,children:Y(v,x({},b==null?void 0:b.layout,{slots:a,slotProps:b,children:f()}))})]}))}},k_=({view:e,onViewChange:t,views:n,focusedView:r,onFocusedViewChange:i,value:a,defaultValue:o,referenceDate:s,onChange:c,className:l,classes:u,disableFuture:d,disablePast:f,minDate:p,maxDate:m,shouldDisableDate:h,shouldDisableMonth:g,shouldDisableYear:_,reduceAnimations:v,onMonthChange:y,monthsPerRow:b,onYearChange:x,yearsOrder:S,yearsPerRow:C,slots:w,slotProps:T,loading:E,renderLoading:D,disableHighlightToday:O,readOnly:k,disabled:A,showDaysOutsideCurrentMonth:j,dayOfWeekFormatter:M,sx:N,autoFocus:ee,fixedWeekNumber:P,displayWeekNumber:F,timezone:te})=>Y(_g,{view:e,onViewChange:t,views:n.filter(Yc),focusedView:r&&Yc(r)?r:null,onFocusedViewChange:i,value:a,defaultValue:o,referenceDate:s,onChange:c,className:l,classes:u,disableFuture:d,disablePast:f,minDate:p,maxDate:m,shouldDisableDate:h,shouldDisableMonth:g,shouldDisableYear:_,reduceAnimations:v,onMonthChange:y,monthsPerRow:b,onYearChange:x,yearsOrder:S,yearsPerRow:C,slots:w,slotProps:T,loading:E,renderLoading:D,disableHighlightToday:O,readOnly:k,disabled:A,showDaysOutsideCurrentMonth:j,dayOfWeekFormatter:M,sx:N,autoFocus:ee,fixedWeekNumber:P,displayWeekNumber:F,timezone:te});g();var A_=o(function(e,t){var n;let r=kc(),i=Hg(e,`MuiDesktopDatePicker`),a=x({day:k_,month:k_,year:k_},i.viewRenderers),{renderPicker:o}=O_({ref:t,props:x({},i,{closeOnSelect:i.closeOnSelect??!0,viewRenderers:a,format:Xc(r,i,!1),yearsPerRow:i.yearsPerRow??4,slots:x({field:um},i.slots),slotProps:x({},i.slotProps,{field:e=>{var t;return x({},xn((t=i.slotProps)==null?void 0:t.field,e),Fc(i))},toolbar:x({hidden:!0},(n=i.slotProps)==null?void 0:n.toolbar)})}),valueManager:pd,valueType:`date`,validator:uf,steps:null});return o()});g();var j_=J(Jn,{slot:`internal`})({[`& .${Tn.container}`]:{outline:0},[`& .${Tn.paper}`]:{outline:0,minWidth:320}}),M_=J(D,{slot:`internal`})({"&:first-of-type":{padding:0}});function N_(e){var t,n;let{children:r,slots:i,slotProps:a}=e,{open:o}=zl(),{dismissViews:s,onPopperExited:c}=su(),l=(i==null?void 0:i.dialog)??j_;return Y(l,x({open:o,onClose:()=>{s(),c==null||c()}},a==null?void 0:a.dialog,{PaperComponent:i==null?void 0:i.mobilePaper,slots:x({transition:(i==null?void 0:i.mobileTransition)??Ot},a==null||(t=a.dialog)==null?void 0:t.slots),slotProps:x({transition:a==null?void 0:a.mobileTransition,paper:a==null?void 0:a.mobilePaper},a==null||(n=a.dialog)==null?void 0:n.slotProps),children:Y(M_,{children:r})}))}var P_=[`props`,`steps`],F_=[`ownerState`],I_=e=>{var t;let{props:n,steps:r}=e,i=Z(e,P_),{slots:a,slotProps:o,label:s,inputRef:c,localeText:l}=n,u=T_({steps:r}),{providerProps:d,renderCurrentView:f,ownerState:p}=a_(x({},i,{props:n,localeText:l,autoFocusView:!0,viewContainerRole:`dialog`,variant:`mobile`,getStepNavigation:u})),m=d.privateContextValue.labelId,h=(o==null||(t=o.toolbar)==null?void 0:t.hidden)??!1,g=a.field,_=Z(It({elementType:g,externalSlotProps:o==null?void 0:o.field,externalForwardedProps:Ad(n),additionalProps:x({},h&&{id:m}),ownerState:p}),F_),v=a.layout??w_,y=m;h&&(y=s?`${m}-label`:void 0);let b=x({},o,{toolbar:x({},o==null?void 0:o.toolbar,{titleId:m}),mobilePaper:x({"aria-labelledby":y},o==null?void 0:o.mobilePaper)});return{renderPicker:()=>P(Jl,x({},d,{children:[Y(g,x({},_,{slots:x({},a,_.slots),slotProps:x({},b,_.slotProps),inputRef:c})),Y(N_,{slots:a,slotProps:b,children:Y(v,x({},b==null?void 0:b.layout,{slots:a,slotProps:b,children:f()}))})]}))}};g();var L_=o(function(e,t){var n;let r=kc(),i=Hg(e,`MuiMobileDatePicker`),a=x({day:k_,month:k_,year:k_},i.viewRenderers),{renderPicker:o}=I_({ref:t,props:x({},i,{viewRenderers:a,format:Xc(r,i,!1),slots:x({field:um},i.slots),slotProps:x({},i.slotProps,{field:e=>{var t;return x({},xn((t=i.slotProps)==null?void 0:t.field,e),Fc(i))},toolbar:x({hidden:!1},(n=i.slotProps)==null?void 0:n.toolbar)})}),valueManager:pd,valueType:`date`,validator:uf,steps:null});return o()});g();var R_=[`desktopModeMediaQuery`],z_=o(function(e,t){let n=Mt({props:e,name:`MuiDatePicker`}),{desktopModeMediaQuery:r=kd}=n,i=Z(n,R_);return Te(r,{defaultMatches:!0})?Y(A_,x({ref:t},i)):Y(L_,x({ref:t},i))}),B_=[`props`,`steps`],V_=J(w_,{slot:`internal`})(({theme:e})=>({overflow:`hidden`,minWidth:320,backgroundColor:(e.vars||e).palette.background.paper})),H_=e=>{let{props:t,steps:n}=e,r=Z(e,B_),{localeText:i,slots:a,slotProps:o,displayStaticWrapperAs:s,autoFocus:c}=t,l=T_({steps:n}),{providerProps:u,renderCurrentView:d}=a_(x({},r,{props:t,variant:s,autoFocusView:c??!1,viewContainerRole:null,localeText:i,getStepNavigation:l})),f=(a==null?void 0:a.layout)??V_;return{renderPicker:()=>{var e,n;return Y(Jl,x({},u,{children:Y(f,x({},Ad(t),o==null?void 0:o.layout,{slots:a,slotProps:o,sx:jd(u.contextValue.rootSx,o==null||(e=o.layout)==null?void 0:e.sx),className:V(u.contextValue.rootClassName,o==null||(n=o.layout)==null?void 0:n.className),ref:u.contextValue.rootRef,children:d()}))}))}}};g();var U_=o(function(e,t){var n;let r=Hg(e,`MuiStaticDatePicker`),i=r.displayStaticWrapperAs??`mobile`,a=x({day:k_,month:k_,year:k_},r.viewRenderers),{renderPicker:o}=H_({ref:t,props:x({},r,{viewRenderers:a,displayStaticWrapperAs:i,yearsPerRow:r.yearsPerRow??(i===`mobile`?3:4),slotProps:x({},r.slotProps,{toolbar:x({hidden:i===`desktop`},(n=r.slotProps)==null?void 0:n.toolbar)})}),valueManager:pd,valueType:`date`,validator:uf,steps:null});return o()});function W_(e){return Ve(`MuiPickersToolbarText`,e)}var G_=Ne(`MuiPickersToolbarText`,[`root`]);g();var K_=[`className`,`classes`,`selected`,`value`],q_=e=>Le({root:[`root`]},W_,e),J_=J(_n,{name:`MuiPickersToolbarText`,slot:`Root`})(({theme:e})=>({transition:e.transitions.create(`color`),color:(e.vars||e).palette.text.secondary,"&[data-selected]":{color:(e.vars||e).palette.text.primary}})),Y_=o(function(e,t){let n=Mt({props:e,name:`MuiPickersToolbarText`}),{className:r,classes:i,selected:a,value:o}=n,s=Z(n,K_),c=q_(i);return Y(J_,x({ref:t,className:V(c.root,r),component:`span`,ownerState:n},a&&{"data-selected":!0},s,{children:o}))});g();var X_=[`align`,`className`,`classes`,`selected`,`typographyClassName`,`value`,`variant`,`width`],Z_=e=>Le({root:[`root`]},Dg,e),Q_=J(on,{name:`MuiPickersToolbarButton`,slot:`Root`})({padding:0,minWidth:16,textTransform:`none`}),$_=o(function(e,t){let n=Mt({props:e,name:`MuiPickersToolbarButton`}),{align:r,className:i,classes:a,selected:o,typographyClassName:s,value:c,variant:l,width:u}=n,d=Z(n,X_),f=Z_(a);return Y(Q_,x({variant:`text`,ref:t,className:V(f.root,i),ownerState:n},u?{sx:{width:u}}:{},d,{children:Y(Y_,{align:r,className:s,variant:l,value:c,selected:o})}))});function ev(e){return Ve(`MuiTimePickerToolbar`,e)}var tv=Ne(`MuiTimePickerToolbar`,[`root`,`separator`,`hourMinuteLabel`,`hourMinuteLabelLandscape`,`hourMinuteLabelReverse`,`ampmSelection`,`ampmLandscape`,`ampmLabel`]),nv=[`ampm`,`ampmInClock`,`className`,`classes`],rv=(e,t)=>{let{pickerOrientation:n,toolbarDirection:r}=t;return Le({root:[`root`],separator:[`separator`],hourMinuteLabel:[`hourMinuteLabel`,n===`landscape`&&`hourMinuteLabelLandscape`,r===`rtl`&&`hourMinuteLabelReverse`],ampmSelection:[`ampmSelection`,n===`landscape`&&`ampmLandscape`],ampmLabel:[`ampmLabel`]},ev,e)},iv=J(Pg,{name:`MuiTimePickerToolbar`,slot:`Root`})({}),av=J(Y_,{name:`MuiTimePickerToolbar`,slot:`Separator`})({outline:0,margin:`0 4px 0 2px`,cursor:`default`}),ov=J(`div`,{name:`MuiTimePickerToolbar`,slot:`HourMinuteLabel`,overridesResolver:(e,t)=>[{[`&.${tv.hourMinuteLabelLandscape}`]:t.hourMinuteLabelLandscape,[`&.${tv.hourMinuteLabelReverse}`]:t.hourMinuteLabelReverse},t.hourMinuteLabel]})({display:`flex`,justifyContent:`flex-end`,alignItems:`flex-end`,variants:[{props:{toolbarDirection:`rtl`},style:{flexDirection:`row-reverse`}},{props:{pickerOrientation:`landscape`},style:{marginTop:`auto`}}]}),sv=J(`div`,{name:`MuiTimePickerToolbar`,slot:`AmPmSelection`,overridesResolver:(e,t)=>[{[`.${tv.ampmLabel}`]:t.ampmLabel},{[`&.${tv.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})({display:`flex`,flexDirection:`column`,marginRight:`auto`,marginLeft:12,[`& .${tv.ampmLabel}`]:{fontSize:17},variants:[{props:{pickerOrientation:`landscape`},style:{margin:`4px 0 auto`,flexDirection:`row`,justifyContent:`space-around`,flexBasis:`100%`}}]});function cv(e){let t=Mt({props:e,name:`MuiTimePickerToolbar`}),{ampm:n,ampmInClock:r,className:i,classes:a}=t,o=Z(t,nv),s=kc(),c=Ac(),l=kg(),u=rv(a,l),{value:d,setValue:f,disabled:p,readOnly:m,view:h,setView:g,views:_}=zl(),v=!!(n&&!r&&_.includes(`hours`)),{meridiemMode:y,handleMeridiemChange:b}=xu(d,n,e=>f(e,{changeImportance:`set`,source:`view`})),S=e=>s.isValid(d)?s.format(d,e):`--`,C=Y(av,{tabIndex:-1,value:`:`,variant:`h3`,selected:!1,className:u.separator});return P(iv,x({landscapeDirection:`row`,toolbarTitle:c.timePickerToolbarTitle,ownerState:l,className:V(u.root,i)},o,{children:[P(ov,{className:u.hourMinuteLabel,ownerState:l,children:[wd(_,`hours`)&&Y($_,{tabIndex:-1,variant:`h3`,onClick:()=>g(`hours`),selected:h===`hours`,value:S(n?`hours12h`:`hours24h`)}),wd(_,[`hours`,`minutes`])&&C,wd(_,`minutes`)&&Y($_,{tabIndex:-1,variant:`h3`,onClick:()=>g(`minutes`),selected:h===`minutes`,value:S(`minutes`)}),wd(_,[`minutes`,`seconds`])&&C,wd(_,`seconds`)&&Y($_,{variant:`h3`,onClick:()=>g(`seconds`),selected:h===`seconds`,value:S(`seconds`)})]}),v&&P(sv,{className:u.ampmSelection,ownerState:l,children:[Y($_,{disableRipple:!0,variant:`subtitle2`,selected:y===`am`,typographyClassName:u.ampmLabel,value:qc(s,`am`),onClick:m?void 0:()=>b(`am`),disabled:p}),Y($_,{disableRipple:!0,variant:`subtitle2`,selected:y===`pm`,typographyClassName:u.ampmLabel,value:qc(s,`pm`),onClick:m?void 0:()=>b(`pm`),disabled:p})]})]}))}g();function lv(e,t){var n;let r=kc(),i=Mt({props:e,name:t}),a=Lf(i),o=i.ampm??r.is12HourCycleInCurrentLocale(),s=p(()=>{var e;return((e=i.localeText)==null?void 0:e.toolbarTitle)==null?i.localeText:x({},i.localeText,{timePickerToolbarTitle:i.localeText.toolbarTitle})},[i.localeText]);return x({},i,a,{ampm:o,localeText:s},zc({views:i.views,openTo:i.openTo,defaultViews:[`hours`,`minutes`],defaultOpenTo:`hours`}),{slots:x({toolbar:cv},i.slots),slotProps:x({},i.slotProps,{toolbar:x({ampm:o,ampmInClock:i.ampmInClock},(n=i.slotProps)==null?void 0:n.toolbar)})})}var uv=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:i,value:a,defaultValue:o,referenceDate:s,onChange:c,className:l,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:h,minutesStep:g,ampm:_,ampmInClock:v,slots:y,slotProps:b,readOnly:x,disabled:S,sx:C,autoFocus:w,showViewSwitcher:T,disableIgnoringDatePartForTimeValidation:E,timezone:D})=>Y(xd,{view:e,onViewChange:t,focusedView:n&&el(n)?n:null,onFocusedViewChange:r,views:i.filter(el),value:a,defaultValue:o,referenceDate:s,onChange:c,className:l,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:h,minutesStep:g,ampm:_,ampmInClock:v,slots:y,slotProps:b,readOnly:x,disabled:S,sx:C,autoFocus:w,showViewSwitcher:T,disableIgnoringDatePartForTimeValidation:E,timezone:D}),dv=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:i,value:a,defaultValue:o,referenceDate:s,onChange:c,className:l,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:h,minutesStep:g,ampm:_,slots:v,slotProps:y,readOnly:b,disabled:x,sx:S,autoFocus:C,disableIgnoringDatePartForTimeValidation:w,timeSteps:T,skipDisabled:E,timezone:D})=>Y(Ld,{view:e,onViewChange:t,focusedView:n&&el(n)?n:null,onFocusedViewChange:r,views:i.filter(el),value:a,defaultValue:o,referenceDate:s,onChange:c,className:l,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:h,minutesStep:g,ampm:_,slots:v,slotProps:y,readOnly:b,disabled:x,sx:S,autoFocus:C,disableIgnoringDatePartForTimeValidation:w,timeStep:T==null?void 0:T.minutes,skipDisabled:E,timezone:D}),fv=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:i,value:a,defaultValue:o,referenceDate:s,onChange:c,className:l,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:h,minutesStep:g,ampm:_,slots:v,slotProps:y,readOnly:b,disabled:x,sx:S,autoFocus:C,disableIgnoringDatePartForTimeValidation:w,timeSteps:T,skipDisabled:E,timezone:D})=>Y(Qd,{view:e,onViewChange:t,focusedView:n&&tl(n)?n:null,onFocusedViewChange:r,views:i.filter(el),value:a,defaultValue:o,referenceDate:s,onChange:c,className:l,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:h,minutesStep:g,ampm:_,slots:v,slotProps:y,readOnly:b,disabled:x,sx:S,autoFocus:C,disableIgnoringDatePartForTimeValidation:w,timeSteps:T,skipDisabled:E,timezone:D}),pv=[`views`,`format`],mv=(e,t,n)=>{let{views:r,format:i}=t,a=Z(t,pv);if(i)return i;let o=[],s=[];if(r.forEach(e=>{el(e)?s.push(e):Yc(e)&&o.push(e)}),s.length===0)return Xc(e,x({views:o},a),!1);if(o.length===0)return sl(e,x({views:s},a));let c=sl(e,x({views:s},a));return`${n?e.formats.keyboardDate:Xc(e,x({views:o},a),!1)} ${c}`},hv=(e,t,n)=>n?t.filter(e=>!tl(e)||e===`hours`):e?[...t,`meridiem`]:t,gv=(e,t)=>1440/((e.hours??1)*(e.minutes??5))<=t;function _v({thresholdToRenderTimeInASingleColumn:e,ampm:t,timeSteps:n,views:r}){let i=e??24,a=x({hours:1,minutes:5,seconds:5},n),o=gv(a,i);return{thresholdToRenderTimeInASingleColumn:i,timeSteps:a,shouldRenderTimeInASingleColumn:o,views:hv(t,r,o)}}g();var vv=o(function(e,t){var n,r;let i=kc(),a=lv(e,`MuiDesktopTimePicker`),{shouldRenderTimeInASingleColumn:o,views:s,timeSteps:c}=_v(a),l=o?dv:fv,u=x({hours:l,minutes:l,seconds:l,meridiem:l},a.viewRenderers),d=a.ampmInClock??!0,f=((n=u.hours)==null?void 0:n.name)===fv.name?s:s.filter(e=>e!==`meridiem`),{renderPicker:p}=O_({ref:t,props:x({},a,{ampmInClock:d,timeSteps:c,viewRenderers:u,format:sl(i,a),views:o?[`hours`]:f,slots:x({field:pm},a.slots),slotProps:x({},a.slotProps,{field:e=>{var t;return x({},xn((t=a.slotProps)==null?void 0:t.field,e),Fc(a))},toolbar:x({hidden:!0,ampmInClock:d},(r=a.slotProps)==null?void 0:r.toolbar)})}),valueManager:pd,valueType:`time`,validator:df,steps:null});return p()});g();var yv=o(function(e,t){var n;let r=kc(),i=lv(e,`MuiMobileTimePicker`),a=x({hours:uv,minutes:uv,seconds:uv},i.viewRenderers),o=i.ampmInClock??!1,{renderPicker:s}=I_({ref:t,props:x({},i,{ampmInClock:o,viewRenderers:a,format:sl(r,i),slots:x({field:pm},i.slots),slotProps:x({},i.slotProps,{field:e=>{var t;return x({},xn((t=i.slotProps)==null?void 0:t.field,e),Fc(i))},toolbar:x({hidden:!1,ampmInClock:o},(n=i.slotProps)==null?void 0:n.toolbar)})}),valueManager:pd,valueType:`time`,validator:df,steps:null});return s()});g();var bv=[`desktopModeMediaQuery`],xv=o(function(e,t){let n=Mt({props:e,name:`MuiTimePicker`}),{desktopModeMediaQuery:r=kd}=n,i=Z(n,bv);return Te(r,{defaultMatches:!0})?Y(vv,x({ref:t},i)):Y(yv,x({ref:t},i))});g();var Sv=o(function(e,t){var n;let r=lv(e,`MuiStaticTimePicker`),i=r.displayStaticWrapperAs??`mobile`,a=r.ampmInClock??i===`desktop`,o=x({hours:uv,minutes:uv,seconds:uv},r.viewRenderers),{renderPicker:s}=H_({ref:t,props:x({},r,{viewRenderers:o,displayStaticWrapperAs:i,ampmInClock:a,slotProps:x({},r.slotProps,{toolbar:x({hidden:i===`desktop`,ampmInClock:a},(n=r.slotProps)==null?void 0:n.toolbar)})}),valueManager:pd,valueType:`time`,validator:df,steps:null});return s()});function Cv(e){return Ve(`MuiDateTimePickerTabs`,e)}var wv=Ne(`MuiDateTimePickerTabs`,[`root`]);g();var Tv=[`dateIcon`,`timeIcon`,`hidden`,`className`,`classes`,`sx`],Ev=e=>Yc(e)?`date`:`time`,Dv=e=>e===`date`?`day`:`hours`,Ov=e=>Le({root:[`root`]},Cv,e),kv=J(qe,{name:`MuiDateTimePickerTabs`,slot:`Root`})(({theme:e})=>({boxShadow:`0 -1px 0 0 inset ${(e.vars||e).palette.divider}`,"&:last-child":{boxShadow:`0 1px 0 0 inset ${(e.vars||e).palette.divider}`,[`& .${pr.indicator}`]:{bottom:`auto`,top:0}}})),Av=function(e){let t=Mt({props:e,name:`MuiDateTimePickerTabs`}),{dateIcon:n=Y(ru,{}),timeIcon:r=Y(iu,{}),hidden:i=typeof window>`u`||window.innerHeight<667,className:a,classes:o,sx:s}=t,c=Z(t,Tv),l=Ac(),{ownerState:u}=su(),{view:d,setView:f}=zl(),p=Ov(o);return i?null:P(kv,x({},c,{ownerState:u,variant:`fullWidth`,value:Ev(d),onChange:(e,t)=>{f(Dv(t))},className:V(a,p.root),sx:s,children:[Y(ee,{value:`date`,"aria-label":l.dateTableLabel,icon:Y(y,{children:n})}),Y(ee,{value:`time`,"aria-label":l.timeTableLabel,icon:Y(y,{children:r})})]}))};function jv(e){return Ve(`MuiDateTimePickerToolbar`,e)}var Mv=Ne(`MuiDateTimePickerToolbar`,[`root`,`dateContainer`,`timeContainer`,`timeDigitsContainer`,`separator`,`timeLabelReverse`,`ampmSelection`,`ampmLandscape`,`ampmLabel`]);g();var Nv=[`ampm`,`ampmInClock`,`toolbarFormat`,`toolbarPlaceholder`,`toolbarTitle`,`className`,`classes`],Pv=(e,t)=>{let{pickerOrientation:n,toolbarDirection:r}=t;return Le({root:[`root`],dateContainer:[`dateContainer`],timeContainer:[`timeContainer`,r===`rtl`&&`timeLabelReverse`],timeDigitsContainer:[`timeDigitsContainer`,r===`rtl`&&`timeLabelReverse`],separator:[`separator`],ampmSelection:[`ampmSelection`,n===`landscape`&&`ampmLandscape`],ampmLabel:[`ampmLabel`]},jv,e)},Fv=J(Pg,{name:`MuiDateTimePickerToolbar`,slot:`Root`,shouldForwardProp:e=>Ae(e)&&e!==`toolbarVariant`})(({theme:e})=>({paddingLeft:16,paddingRight:16,justifyContent:`space-around`,position:`relative`,variants:[{props:{toolbarVariant:`desktop`},style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,[`& .${Og.content} .${G_.root}[data-selected]`]:{color:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightBold}}},{props:{toolbarVariant:`desktop`,pickerOrientation:`landscape`},style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:{toolbarVariant:`desktop`,pickerOrientation:`portrait`},style:{paddingLeft:24,paddingRight:0}}]})),Iv=J(`div`,{name:`MuiDateTimePickerToolbar`,slot:`DateContainer`})({display:`flex`,flexDirection:`column`,alignItems:`flex-start`}),Lv=J(`div`,{name:`MuiDateTimePickerToolbar`,slot:`TimeContainer`,shouldForwardProp:e=>Ae(e)&&e!==`toolbarVariant`})({display:`flex`,flexDirection:`row`,variants:[{props:{toolbarDirection:`rtl`},style:{flexDirection:`row-reverse`}},{props:{toolbarVariant:`desktop`,pickerOrientation:`portrait`},style:{gap:9,marginRight:4,alignSelf:`flex-end`}},{props:({pickerOrientation:e,toolbarVariant:t})=>e===`landscape`&&t!==`desktop`,style:{flexDirection:`column`}},{props:({pickerOrientation:e,toolbarVariant:t,toolbarDirection:n})=>e===`landscape`&&t!==`desktop`&&n===`rtl`,style:{flexDirection:`column-reverse`}}]}),Rv=J(`div`,{name:`MuiDateTimePickerToolbar`,slot:`TimeDigitsContainer`,shouldForwardProp:e=>Ae(e)&&e!==`toolbarVariant`})({display:`flex`,variants:[{props:{toolbarDirection:`rtl`},style:{flexDirection:`row-reverse`}},{props:{toolbarVariant:`desktop`},style:{gap:1.5}}]}),zv=J(Y_,{name:`MuiDateTimePickerToolbar`,slot:`Separator`,shouldForwardProp:e=>Ae(e)&&e!==`toolbarVariant`})({margin:`0 4px 0 2px`,cursor:`default`,variants:[{props:{toolbarVariant:`desktop`},style:{margin:0}}]}),Bv=J(`div`,{name:`MuiDateTimePickerToolbar`,slot:`AmPmSelection`,overridesResolver:(e,t)=>[{[`.${Mv.ampmLabel}`]:t.ampmLabel},{[`&.${Mv.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})({display:`flex`,flexDirection:`column`,marginRight:`auto`,marginLeft:12,[`& .${Mv.ampmLabel}`]:{fontSize:17},variants:[{props:{pickerOrientation:`landscape`},style:{margin:`4px 0 auto`,flexDirection:`row`,justifyContent:`space-around`,width:`100%`}}]}),Vv=v(null);function Hv(e){let t=Mt({props:e,name:`MuiDateTimePickerToolbar`}),{ampm:n,ampmInClock:r,toolbarFormat:i,toolbarPlaceholder:a=`––`,toolbarTitle:o,className:s,classes:c}=t,l=Z(t,Nv),{value:u,setValue:d,disabled:f,readOnly:m,variant:h,orientation:g,view:_,setView:v,views:S}=zl(),C=Ac(),w=kg(),T=Pv(c,w),E=kc(),D=b(Vv),O=D?D.value:u,k=D?D.setValue:d,A=D?D.view:_,j=D?D.setView:v,{meridiemMode:M,handleMeridiemChange:N}=xu(O,n,e=>k(e,{changeImportance:`set`,source:`view`})),ee=D!=null&&D.forceDesktopVariant?`desktop`:h,F=ee===`desktop`,te=!!(n&&!r),I=o??C.dateTimePickerToolbarTitle,L=p(()=>E.isValid(O)?i?E.formatByString(O,i):E.format(O,`shortDate`):a,[O,i,a,E]),R=(e,t)=>E.isValid(O)?E.format(O,e):t;return P(Fv,x({className:V(T.root,s),toolbarTitle:I,toolbarVariant:ee},l,{ownerState:w,children:[P(Iv,{className:T.dateContainer,ownerState:w,children:[S.includes(`year`)&&Y($_,{tabIndex:-1,variant:`subtitle1`,onClick:()=>j(`year`),selected:A===`year`,value:R(`year`,`–`)}),S.includes(`day`)&&Y($_,{tabIndex:-1,variant:F?`h5`:`h4`,onClick:()=>j(`day`),selected:A===`day`,value:L})]}),P(Lv,{className:T.timeContainer,ownerState:w,toolbarVariant:ee,children:[P(Rv,{className:T.timeDigitsContainer,ownerState:w,toolbarVariant:ee,children:[S.includes(`hours`)&&P(y,{children:[Y($_,{variant:F?`h5`:`h3`,width:F&&g===`portrait`?48:void 0,onClick:()=>j(`hours`),selected:A===`hours`,value:R(n?`hours12h`:`hours24h`,`--`)}),Y(zv,{variant:F?`h5`:`h3`,value:`:`,className:T.separator,ownerState:w,toolbarVariant:ee}),Y($_,{variant:F?`h5`:`h3`,width:F&&g===`portrait`?48:void 0,onClick:()=>j(`minutes`),selected:A===`minutes`||!S.includes(`minutes`)&&A===`hours`,value:R(`minutes`,`--`),disabled:!S.includes(`minutes`)})]}),S.includes(`seconds`)&&P(y,{children:[Y(zv,{variant:F?`h5`:`h3`,value:`:`,className:T.separator,ownerState:w,toolbarVariant:ee}),Y($_,{variant:F?`h5`:`h3`,width:F&&g===`portrait`?48:void 0,onClick:()=>j(`seconds`),selected:A===`seconds`,value:R(`seconds`,`--`)})]})]}),te&&!F&&P(Bv,{className:T.ampmSelection,ownerState:w,children:[Y($_,{variant:`subtitle2`,selected:M===`am`,typographyClassName:T.ampmLabel,value:qc(E,`am`),onClick:m?void 0:()=>N(`am`),disabled:f}),Y($_,{variant:`subtitle2`,selected:M===`pm`,typographyClassName:T.ampmLabel,value:qc(E,`pm`),onClick:m?void 0:()=>N(`pm`),disabled:f})]}),n&&F&&Y($_,{variant:`h5`,onClick:()=>j(`meridiem`),selected:A===`meridiem`,value:O&&M?qc(E,M):`--`,width:48})]})]}))}g();function Uv(e,t){var n;let r=kc(),i=Mt({props:e,name:t}),a=Vf(i),o=i.ampm??r.is12HourCycleInCurrentLocale(),s=p(()=>{var e;return((e=i.localeText)==null?void 0:e.toolbarTitle)==null?i.localeText:x({},i.localeText,{dateTimePickerToolbarTitle:i.localeText.toolbarTitle})},[i.localeText]),{openTo:c,views:l}=zc({views:i.views,openTo:i.openTo,defaultViews:[`year`,`day`,`hours`,`minutes`],defaultOpenTo:`day`}),{shouldRenderTimeInASingleColumn:u,thresholdToRenderTimeInASingleColumn:d,views:f,timeSteps:m}=_v({thresholdToRenderTimeInASingleColumn:i.thresholdToRenderTimeInASingleColumn,ampm:o,timeSteps:i.timeSteps,views:l}),h=o?[...l,`meridiem`]:l;return x({},i,a,{timeSteps:m,openTo:c,shouldRenderTimeInASingleColumn:u,thresholdToRenderTimeInASingleColumn:d,views:f,viewsForFormatting:h,ampm:o,localeText:s,orientation:i.orientation??`portrait`,slots:x({toolbar:Hv,tabs:Av},i.slots),slotProps:x({},i.slotProps,{toolbar:x({ampm:o},(n=i.slotProps)==null?void 0:n.toolbar)})})}g();var Wv=o(function(e,t){var n;let{toolbar:r,tabs:i,content:a,actionBar:o,shortcuts:s,ownerState:c}=y_(e),{orientation:l}=zl(),{sx:u,className:d,classes:f}=e,p=o&&(((n=o.props.actions)==null?void 0:n.length)??0)>0;return P(S_,{ref:t,className:V(s_.root,f==null?void 0:f.root,d),sx:[{[`& .${s_.tabs}`]:{gridRow:4,gridColumn:`1 / 4`},[`& .${s_.actionBar}`]:{gridRow:5}},...Array.isArray(u)?u:[u]],ownerState:c,children:[l===`landscape`?s:r,l===`landscape`?r:s,P(C_,{className:V(s_.contentWrapper,f==null?void 0:f.contentWrapper),ownerState:c,sx:{display:`grid`},children:[a,i,p&&Y(We,{sx:{gridRow:3,gridColumn:`1 / 4`}})]}),o]})});g();var Gv=[`openTo`,`focusedView`,`timeViewsCount`],Kv=function(e){var t,n;let{viewRenderers:r,popperView:i,rendererProps:a}=e,{openTo:o,focusedView:s,timeViewsCount:c}=a,l=Z(a,Gv),u=x({},l,{autoFocus:!1,focusedView:null,sx:[{[`&.${zd.root}`]:{borderBottom:0},[`&.${zd.root}, .${Vd.root}, &.${Cd.root}`]:{maxHeight:336}}]}),d=tl(i),f=d?`day`:i,p=d?i:`hours`;return P(y,{children:[(t=r[f])==null?void 0:t.call(r,x({},a,{view:d?`day`:i,focusedView:s&&Yc(s)?s:null,views:a.views.filter(Yc),sx:[{gridColumn:1},...u.sx]})),c>0&&P(y,{children:[Y(We,{orientation:`vertical`,sx:{gridColumn:2}}),(n=r[p])==null?void 0:n.call(r,x({},u,{view:d?i:`hours`,focusedView:s&&tl(s)?s:null,openTo:tl(o)?o:`hours`,views:a.views.filter(tl),sx:[{gridColumn:3},...u.sx]}))]})]})},qv=o(function(e,t){var n,r,i;let a=kc(),o=Uv(e,`MuiDesktopDateTimePicker`),s=o.shouldRenderTimeInASingleColumn?dv:fv,c=x({day:k_,month:k_,year:k_,hours:s,minutes:s,seconds:s,meridiem:s},o.viewRenderers),l=o.ampmInClock??!0,u=((n=c.hours)==null?void 0:n.name)===fv.name?o.views:o.views.filter(e=>e!==`meridiem`),{renderPicker:d}=O_({ref:t,props:x({},o,{viewRenderers:c,format:mv(a,x({},o,{views:o.viewsForFormatting})),views:u,yearsPerRow:o.yearsPerRow??4,ampmInClock:l,slots:x({field:gm,layout:Wv},o.slots),slotProps:x({},o.slotProps,{field:e=>{var t;return x({},xn((t=o.slotProps)==null?void 0:t.field,e),Fc(o))},toolbar:x({hidden:!0,ampmInClock:l},(r=o.slotProps)==null?void 0:r.toolbar),tabs:x({hidden:!0},(i=o.slotProps)==null?void 0:i.tabs)})}),valueManager:pd,valueType:`date-time`,validator:ff,rendererInterceptor:Kv,steps:null});return d()});g();var Jv=[{views:Jc},{views:Qc}],Yv=o(function(e,t){var n,r,i,a,o;let s=kc(),c=Uv(e,`MuiMobileDateTimePicker`),l=c.shouldRenderTimeInASingleColumn?dv:fv,u=x({day:k_,month:k_,year:k_,hours:l,minutes:l,seconds:l,meridiem:l},c.viewRenderers),d=c.ampmInClock??!1,f=((n=u.hours)==null?void 0:n.name)===fv.name?c.views:c.views.filter(e=>e!==`meridiem`),{renderPicker:p}=I_({ref:t,props:x({},c,{viewRenderers:u,format:mv(s,x({},c,{views:c.viewsForFormatting})),views:f,ampmInClock:d,slots:x({field:gm},c.slots),slotProps:x({},c.slotProps,{field:e=>{var t;return x({},xn((t=c.slotProps)==null?void 0:t.field,e),Fc(c))},toolbar:x({hidden:!1,ampmInClock:d},(r=c.slotProps)==null?void 0:r.toolbar),tabs:x({hidden:!1},(i=c.slotProps)==null?void 0:i.tabs),layout:x({},(a=c.slotProps)==null?void 0:a.layout,{sx:jd([{[`& .${zd.root}`]:{width:320},[`& .${Vd.root}`]:{flex:1,maxHeight:335,[`.${Vd.item}`]:{width:`auto`}},[`& .${Cd.root}`]:{width:320,maxHeight:336,flex:1,[`.${Cd.item}`]:{justifyContent:`center`}}}],(o=c.slotProps)==null||(o=o.layout)==null?void 0:o.sx)})})}),valueManager:pd,valueType:`date-time`,validator:ff,steps:Jv});return p()});g();var Xv=[`desktopModeMediaQuery`],Zv=o(function(e,t){let n=Mt({props:e,name:`MuiDateTimePicker`}),{desktopModeMediaQuery:r=kd}=n,i=Z(n,Xv);return Te(r,{defaultMatches:!0})?Y(qv,x({ref:t},i)):Y(Yv,x({ref:t},i))});g();var Qv=[{views:Jc},{views:Qc}],$v=o(function(e,t){var n,r,i;let a=Uv(e,`MuiStaticDateTimePicker`),o=a.displayStaticWrapperAs??`mobile`,s=a.ampmInClock??o===`desktop`,c=a.shouldRenderTimeInASingleColumn?dv:fv,l=x({day:k_,month:k_,year:k_,hours:c,minutes:c,seconds:c,meridiem:c},a.viewRenderers),u=((n=l.hours)==null?void 0:n.name)===fv.name?a.views:a.views.filter(e=>e!==`meridiem`),{renderPicker:d}=H_({ref:t,props:x({},a,{viewRenderers:l,displayStaticWrapperAs:o,views:u,ampmInClock:s,yearsPerRow:a.yearsPerRow??(o===`mobile`?3:4),slotProps:x({},a.slotProps,{tabs:x({hidden:o===`desktop`},(r=a.slotProps)==null?void 0:r.tabs),toolbar:x({hidden:o===`desktop`,ampmInClock:s},(i=a.slotProps)==null?void 0:i.toolbar)}),sx:jd([{[`& .${zd.root}`]:{width:320},[`& .${Vd.root}`]:{flex:1,maxHeight:335,[`.${Vd.item}`]:{width:`auto`}},[`& .${Cd.root}`]:{width:320,maxHeight:336,flex:1,[`.${Cd.item}`]:{justifyContent:`center`}}}],a==null?void 0:a.sx)}),valueManager:pd,valueType:`date-time`,validator:ff,steps:Qv});return d()}),ey=t({ArrowDropDownIcon:()=>Ql,ArrowLeftIcon:()=>$l,ArrowRightIcon:()=>eu,CalendarIcon:()=>tu,ClearIcon:()=>au,ClockIcon:()=>nu,DEFAULT_DESKTOP_MODE_MEDIA_QUERY:()=>kd,DateCalendar:()=>_g,DateField:()=>um,DatePicker:()=>z_,DatePickerToolbar:()=>Vg,DateRangeIcon:()=>ru,DateTimeField:()=>gm,DateTimePicker:()=>Zv,DateTimePickerTabs:()=>Av,DateTimePickerToolbar:()=>Hv,DayCalendarSkeleton:()=>Eg,DesktopDatePicker:()=>A_,DesktopDateTimePicker:()=>qv,DesktopDateTimePickerLayout:()=>Wv,DesktopTimePicker:()=>vv,DigitalClock:()=>Ld,DigitalClockItem:()=>Id,LocalizationProvider:()=>Dc,MobileDatePicker:()=>L_,MobileDateTimePicker:()=>Yv,MobileTimePicker:()=>yv,MonthCalendar:()=>Ph,MultiSectionDigitalClock:()=>Qd,PickerDay:()=>sf,PickersActionBar:()=>d_,PickersCalendarHeader:()=>rg,PickersFilledInput:()=>zp,PickersInput:()=>Gp,PickersInputBase:()=>bp,PickersLayout:()=>w_,PickersLayoutContentWrapper:()=>C_,PickersLayoutRoot:()=>S_,PickersOutlinedInput:()=>Mp,PickersShortcuts:()=>h_,PickersTextField:()=>Xp,StaticDatePicker:()=>U_,StaticDateTimePicker:()=>$v,StaticTimePicker:()=>Sv,TimeClock:()=>xd,TimeField:()=>pm,TimeIcon:()=>iu,TimePicker:()=>xv,TimePickerToolbar:()=>cv,Unstable_PickersSectionList:()=>rp,Unstable_PickersSectionListRoot:()=>Zf,Unstable_PickersSectionListSection:()=>Qf,Unstable_PickersSectionListSectionContent:()=>ep,Unstable_PickersSectionListSectionSeparator:()=>$f,YearCalendar:()=>Kh,clockClasses:()=>Vu,clockNumberClasses:()=>ed,clockPointerClasses:()=>Pu,dateCalendarClasses:()=>dg,datePickerToolbarClasses:()=>Ig,dateTimePickerTabsClasses:()=>wv,dateTimePickerToolbarClasses:()=>Mv,dayCalendarClasses:()=>sh,dayCalendarSkeletonClasses:()=>yg,digitalClockClasses:()=>Cd,extractValidationProps:()=>Fc,getDateCalendarUtilityClass:()=>ug,getDayCalendarSkeletonUtilityClass:()=>vg,getDigitalClockUtilityClass:()=>Sd,getMonthCalendarUtilityClass:()=>Ch,getMultiSectionDigitalClockUtilityClass:()=>Rd,getPickerDayUtilityClass:()=>$d,getPickersFilledInputUtilityClass:()=>Np,getPickersInputBaseUtilityClass:()=>Kf,getPickersInputUtilityClass:()=>Bp,getPickersOutlinedInputUtilityClass:()=>xp,getPickersSectionListUtilityClass:()=>Jf,getPickersTextFieldUtilityClass:()=>Wf,getTimeClockUtilityClass:()=>Cu,getYearCalendarUtilityClass:()=>Fh,monthCalendarClasses:()=>wh,multiSectionDigitalClockClasses:()=>zd,multiSectionDigitalClockSectionClasses:()=>Vd,pickerDayClasses:()=>ef,pickersCalendarHeaderClasses:()=>Jh,pickersFadeTransitionGroupClasses:()=>Jm,pickersFilledInputClasses:()=>Pp,pickersInputBaseClasses:()=>qf,pickersInputClasses:()=>Vp,pickersLayoutClasses:()=>s_,pickersOutlinedInputClasses:()=>Sp,pickersSectionListClasses:()=>Yf,pickersSlideTransitionClasses:()=>eh,pickersTextFieldClasses:()=>Gf,renderDateViewCalendar:()=>k_,renderDigitalClockTimeView:()=>dv,renderMultiSectionDigitalClockTimeView:()=>fv,renderTimeViewClock:()=>uv,timeClockClasses:()=>wu,timePickerToolbarClasses:()=>tv,unstable_useDateField:()=>Hf,unstable_useDateTimeField:()=>mm,unstable_useTimeField:()=>dm,useDateManager:()=>Af,useDateTimeManager:()=>Rf,useIsValidValue:()=>Ul,useParsedFormat:()=>Vl,usePickerActionsContext:()=>Yl,usePickerAdapter:()=>kc,usePickerContext:()=>zl,usePickerLayout:()=>y_,usePickerTranslations:()=>Ac,useSplitFieldProps:()=>Lc,useTimeManager:()=>Pf,useValidation:()=>pf,validateDate:()=>uf,validateDateTime:()=>ff,validateTime:()=>df,yearCalendarClasses:()=>Ih}),ty=t({ArrowDropDownIcon:()=>Wb,ArrowLeftIcon:()=>Gb,ArrowRightIcon:()=>Kb,CalendarIcon:()=>qb,ClearIcon:()=>Zb,ClockIcon:()=>Jb,DEFAULT_DESKTOP_MODE_MEDIA_QUERY:()=>ny,DateCalendar:()=>Dy,DateField:()=>xy,DatePicker:()=>Hy,DatePickerToolbar:()=>Uy,DateRangeIcon:()=>Yb,DateTimeField:()=>Ty,DateTimePicker:()=>eb,DateTimePickerTabs:()=>tb,DateTimePickerToolbar:()=>rb,DayCalendarSkeleton:()=>zy,DesktopDatePicker:()=>Gy,DesktopDateTimePicker:()=>ab,DesktopDateTimePickerLayout:()=>ob,DesktopTimePicker:()=>Zy,DigitalClock:()=>ly,DigitalClockItem:()=>uy,LocalizationProvider:()=>_y,MobileDatePicker:()=>Ky,MobileDateTimePicker:()=>sb,MobileTimePicker:()=>Qy,MonthCalendar:()=>Ny,MultiSectionDigitalClock:()=>py,PickerDay:()=>vy,PickersActionBar:()=>vb,PickersCalendarHeader:()=>xb,PickersFilledInput:()=>Ob,PickersInput:()=>Tb,PickersInputBase:()=>Pb,PickersLayout:()=>pb,PickersLayoutContentWrapper:()=>hb,PickersLayoutRoot:()=>mb,PickersOutlinedInput:()=>jb,PickersShortcuts:()=>yb,PickersTextField:()=>Sb,StaticDatePicker:()=>qy,StaticDateTimePicker:()=>cb,StaticTimePicker:()=>$y,TimeClock:()=>ry,TimeField:()=>Cy,TimeIcon:()=>Xb,TimePicker:()=>Jy,TimePickerToolbar:()=>Yy,Unstable_PickersSectionList:()=>Lb,Unstable_PickersSectionListRoot:()=>Rb,Unstable_PickersSectionListSection:()=>zb,Unstable_PickersSectionListSectionContent:()=>Vb,Unstable_PickersSectionListSectionSeparator:()=>Bb,YearCalendar:()=>Iy,clockClasses:()=>iy,clockNumberClasses:()=>ay,clockPointerClasses:()=>cy,dateCalendarClasses:()=>ky,datePickerToolbarClasses:()=>Wy,dateTimePickerTabsClasses:()=>nb,dateTimePickerToolbarClasses:()=>ib,dayCalendarClasses:()=>Ay,dayCalendarSkeletonClasses:()=>By,default:()=>px,digitalClockClasses:()=>dy,extractValidationProps:()=>cx,getDateCalendarUtilityClass:()=>Oy,getDayCalendarSkeletonUtilityClass:()=>Vy,getDigitalClockUtilityClass:()=>fy,getMonthCalendarUtilityClass:()=>Fy,getMultiSectionDigitalClockUtilityClass:()=>gy,getPickerDayUtilityClass:()=>yy,getPickersFilledInputUtilityClass:()=>kb,getPickersInputBaseUtilityClass:()=>Ib,getPickersInputUtilityClass:()=>Eb,getPickersOutlinedInputUtilityClass:()=>Mb,getPickersSectionListUtilityClass:()=>Hb,getPickersTextFieldUtilityClass:()=>wb,getTimeClockUtilityClass:()=>sy,getYearCalendarUtilityClass:()=>Ry,monthCalendarClasses:()=>Py,multiSectionDigitalClockClasses:()=>hy,multiSectionDigitalClockSectionClasses:()=>my,pickerDayClasses:()=>by,pickersCalendarHeaderClasses:()=>bb,pickersFadeTransitionGroupClasses:()=>jy,pickersFilledInputClasses:()=>Ab,pickersInputBaseClasses:()=>Fb,pickersInputClasses:()=>Db,pickersLayoutClasses:()=>_b,pickersOutlinedInputClasses:()=>Nb,pickersSectionListClasses:()=>Ub,pickersSlideTransitionClasses:()=>My,pickersTextFieldClasses:()=>Cb,renderDateViewCalendar:()=>lb,renderDigitalClockTimeView:()=>db,renderMultiSectionDigitalClockTimeView:()=>fb,renderTimeViewClock:()=>ub,timeClockClasses:()=>oy,timePickerToolbarClasses:()=>Xy,unstable_useDateField:()=>Sy,unstable_useDateTimeField:()=>Ey,unstable_useTimeField:()=>wy,useDateManager:()=>ux,useDateTimeManager:()=>fx,useIsValidValue:()=>rx,useParsedFormat:()=>ex,usePickerActionsContext:()=>nx,usePickerAdapter:()=>ix,usePickerContext:()=>tx,usePickerLayout:()=>gb,usePickerTranslations:()=>Qb,useSplitFieldProps:()=>$b,useTimeManager:()=>dx,useValidation:()=>lx,validateDate:()=>ax,validateDateTime:()=>sx,validateTime:()=>ox,yearCalendarClasses:()=>Ly}),Q=ey,ny=Q.DEFAULT_DESKTOP_MODE_MEDIA_QUERY,ry=Q.TimeClock,iy=Q.clockClasses,ay=Q.clockNumberClasses,oy=Q.timeClockClasses,sy=Q.getTimeClockUtilityClass,cy=Q.clockPointerClasses,ly=Q.DigitalClock,uy=Q.DigitalClockItem,dy=Q.digitalClockClasses,fy=Q.getDigitalClockUtilityClass,py=Q.MultiSectionDigitalClock,my=Q.multiSectionDigitalClockSectionClasses,hy=Q.multiSectionDigitalClockClasses,gy=Q.getMultiSectionDigitalClockUtilityClass,_y=Q.LocalizationProvider,vy=Q.PickerDay,yy=Q.getPickerDayUtilityClass,by=Q.pickerDayClasses,xy=Q.DateField,Sy=Q.unstable_useDateField,Cy=Q.TimeField,wy=Q.unstable_useTimeField,Ty=Q.DateTimeField,Ey=Q.unstable_useDateTimeField,Dy=Q.DateCalendar,Oy=Q.getDateCalendarUtilityClass,ky=Q.dateCalendarClasses,Ay=Q.dayCalendarClasses,jy=Q.pickersFadeTransitionGroupClasses,My=Q.pickersSlideTransitionClasses,Ny=Q.MonthCalendar,Py=Q.monthCalendarClasses,Fy=Q.getMonthCalendarUtilityClass,Iy=Q.YearCalendar,Ly=Q.yearCalendarClasses,Ry=Q.getYearCalendarUtilityClass,zy=Q.DayCalendarSkeleton,By=Q.dayCalendarSkeletonClasses,Vy=Q.getDayCalendarSkeletonUtilityClass,Hy=Q.DatePicker,Uy=Q.DatePickerToolbar,Wy=Q.datePickerToolbarClasses,Gy=Q.DesktopDatePicker,Ky=Q.MobileDatePicker,qy=Q.StaticDatePicker,Jy=Q.TimePicker,Yy=Q.TimePickerToolbar,Xy=Q.timePickerToolbarClasses,Zy=Q.DesktopTimePicker,Qy=Q.MobileTimePicker,$y=Q.StaticTimePicker,eb=Q.DateTimePicker,tb=Q.DateTimePickerTabs,nb=Q.dateTimePickerTabsClasses,rb=Q.DateTimePickerToolbar,ib=Q.dateTimePickerToolbarClasses,ab=Q.DesktopDateTimePicker,ob=Q.DesktopDateTimePickerLayout,sb=Q.MobileDateTimePicker,cb=Q.StaticDateTimePicker,lb=Q.renderDateViewCalendar,ub=Q.renderTimeViewClock,db=Q.renderDigitalClockTimeView,fb=Q.renderMultiSectionDigitalClockTimeView,pb=Q.PickersLayout,mb=Q.PickersLayoutRoot,hb=Q.PickersLayoutContentWrapper,gb=Q.usePickerLayout,_b=Q.pickersLayoutClasses,vb=Q.PickersActionBar,yb=Q.PickersShortcuts,bb=Q.pickersCalendarHeaderClasses,xb=Q.PickersCalendarHeader,Sb=Q.PickersTextField,Cb=Q.pickersTextFieldClasses,wb=Q.getPickersTextFieldUtilityClass,Tb=Q.PickersInput,Eb=Q.getPickersInputUtilityClass,Db=Q.pickersInputClasses,Ob=Q.PickersFilledInput,kb=Q.getPickersFilledInputUtilityClass,Ab=Q.pickersFilledInputClasses,jb=Q.PickersOutlinedInput,Mb=Q.getPickersOutlinedInputUtilityClass,Nb=Q.pickersOutlinedInputClasses,Pb=Q.PickersInputBase,Fb=Q.pickersInputBaseClasses,Ib=Q.getPickersInputBaseUtilityClass,Lb=Q.Unstable_PickersSectionList,Rb=Q.Unstable_PickersSectionListRoot,zb=Q.Unstable_PickersSectionListSection,Bb=Q.Unstable_PickersSectionListSectionSeparator,Vb=Q.Unstable_PickersSectionListSectionContent,Hb=Q.getPickersSectionListUtilityClass,Ub=Q.pickersSectionListClasses,Wb=Q.ArrowDropDownIcon,Gb=Q.ArrowLeftIcon,Kb=Q.ArrowRightIcon,qb=Q.CalendarIcon,Jb=Q.ClockIcon,Yb=Q.DateRangeIcon,Xb=Q.TimeIcon,Zb=Q.ClearIcon,Qb=Q.usePickerTranslations,$b=Q.useSplitFieldProps,ex=Q.useParsedFormat,tx=Q.usePickerContext,nx=Q.usePickerActionsContext,rx=Q.useIsValidValue,ix=Q.usePickerAdapter,ax=Q.validateDate,ox=Q.validateTime,sx=Q.validateDateTime,cx=Q.extractValidationProps,lx=Q.useValidation,ux=Q.useDateManager,dx=Q.useTimeManager,fx=Q.useDateTimeManager,px=Reflect.get(ey,`default`)??ey,mx=`__mf_module_cache__`;globalThis[mx]||={share:{},remote:{}},globalThis[mx].share||={},globalThis[mx].remote||={};var hx=globalThis[mx];for(let e of Object.keys(hx.share))if(e.startsWith(`default:`)){let t=e.slice(8);hx.share[t]===void 0&&(hx.share[t]=hx.share[e])}else if(!e.includes(`:`)){let t=`default:`+e;hx.share[t]===void 0&&(hx.share[t]=hx.share[e])}var gx=(e,t)=>{let n=e[t.canonical];if(n!==void 0)return n;let r=t.aliases||[];for(let n of r){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let r=e[n];if(r!==void 0)return e[t.canonical]=r,r}},_x=Symbol.for(`module-federation.shared-cache-listeners`),vx=e=>{let t=e[_x];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,_x,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},yx=(e,t,n)=>{let r=vx(e);(r[t.canonical]||=new Set).add(n)},bx=Symbol.for(`module-federation.shared-cache-owners`),xx=e=>{let t=e[bx];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,bx,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},Sx=(e,t,n,r)=>{var i;e[t.canonical]=n;let a=t.aliases||[];for(let t of a)Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0});let o=e[bx];r===void 0?o&&delete o[t.canonical]:xx(e)[t.canonical]=r;let s=(i=e[_x])==null?void 0:i[t.canonical];if(s)for(let e of s)e(n);return n},Cx=e=>{let t=(()=>{let t=e;for(let e=0;e<5;e++){let e=t==null?void 0:t.default;if(!e||typeof e!=`object`)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})();return t&&Object.getPrototypeOf(t)===null?Object.assign({},t):t},wx=gx(hx.share,{canonical:`default:@mui/x-date-pickers`,aliases:[`@mui/x-date-pickers`]});wx===void 0&&(wx=Cx(ty),Sx(hx.share,{canonical:`default:@mui/x-date-pickers`,aliases:[`@mui/x-date-pickers`]},wx,`ConfigCustomJavascriptSet`));var Tx,Ex,Dx,Ox=e=>{e.DEFAULT_DESKTOP_MODE_MEDIA_QUERY,e.TimeClock,e.clockClasses,e.clockNumberClasses,e.timeClockClasses,e.getTimeClockUtilityClass,e.clockPointerClasses,e.DigitalClock,e.DigitalClockItem,e.digitalClockClasses,e.getDigitalClockUtilityClass,e.MultiSectionDigitalClock,e.multiSectionDigitalClockSectionClasses,e.multiSectionDigitalClockClasses,e.getMultiSectionDigitalClockUtilityClass,Tx=e.LocalizationProvider,e.PickerDay,e.getPickerDayUtilityClass,e.pickerDayClasses,e.DateField,e.unstable_useDateField,e.TimeField,e.unstable_useTimeField,e.DateTimeField,e.unstable_useDateTimeField,e.DateCalendar,e.getDateCalendarUtilityClass,e.dateCalendarClasses,e.dayCalendarClasses,e.pickersFadeTransitionGroupClasses,e.pickersSlideTransitionClasses,e.MonthCalendar,e.monthCalendarClasses,e.getMonthCalendarUtilityClass,e.YearCalendar,e.yearCalendarClasses,e.getYearCalendarUtilityClass,e.DayCalendarSkeleton,e.dayCalendarSkeletonClasses,e.getDayCalendarSkeletonUtilityClass,Ex=e.DatePicker,e.DatePickerToolbar,e.datePickerToolbarClasses,e.DesktopDatePicker,e.MobileDatePicker,e.StaticDatePicker,Dx=e.TimePicker,e.TimePickerToolbar,e.timePickerToolbarClasses,e.DesktopTimePicker,e.MobileTimePicker,e.StaticTimePicker,e.DateTimePicker,e.DateTimePickerTabs,e.dateTimePickerTabsClasses,e.DateTimePickerToolbar,e.dateTimePickerToolbarClasses,e.DesktopDateTimePicker,e.DesktopDateTimePickerLayout,e.MobileDateTimePicker,e.StaticDateTimePicker,e.renderDateViewCalendar,e.renderTimeViewClock,e.renderDigitalClockTimeView,e.renderMultiSectionDigitalClockTimeView,e.PickersLayout,e.PickersLayoutRoot,e.PickersLayoutContentWrapper,e.usePickerLayout,e.pickersLayoutClasses,e.PickersActionBar,e.PickersShortcuts,e.pickersCalendarHeaderClasses,e.PickersCalendarHeader,e.PickersTextField,e.pickersTextFieldClasses,e.getPickersTextFieldUtilityClass,e.PickersInput,e.getPickersInputUtilityClass,e.pickersInputClasses,e.PickersFilledInput,e.getPickersFilledInputUtilityClass,e.pickersFilledInputClasses,e.PickersOutlinedInput,e.getPickersOutlinedInputUtilityClass,e.pickersOutlinedInputClasses,e.PickersInputBase,e.pickersInputBaseClasses,e.getPickersInputBaseUtilityClass,e.Unstable_PickersSectionList,e.Unstable_PickersSectionListRoot,e.Unstable_PickersSectionListSection,e.Unstable_PickersSectionListSectionSeparator,e.Unstable_PickersSectionListSectionContent,e.getPickersSectionListUtilityClass,e.pickersSectionListClasses,e.ArrowDropDownIcon,e.ArrowLeftIcon,e.ArrowRightIcon,e.CalendarIcon,e.ClockIcon,e.DateRangeIcon,e.TimeIcon,e.ClearIcon,e.usePickerTranslations,e.useSplitFieldProps,e.useParsedFormat,e.usePickerContext,e.usePickerActionsContext,e.useIsValidValue,e.usePickerAdapter,e.validateDate,e.validateTime,e.validateDateTime,e.extractValidationProps,e.useValidation,e.useDateManager,e.useTimeManager,e.useDateTimeManager,(()=>{let t=e;for(let e=0;e<5;e++){let e=t==null?void 0:t.default;if(!e||typeof e!=`object`)return e??t;t=e}return t})()};yx(hx.share,{canonical:`default:@mui/x-date-pickers`,aliases:[`@mui/x-date-pickers`]},Ox),Ox(wx),g();var kx=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);if(e)try{let t=new Date(e);this.setState({value:t})}catch{}}renderItem(e,t){return _.createElement(Ex,{sx:t=>({width:`100%`,borderBottom:`1px solid ${e?`#F00`:t.palette.text.primary}`,"& fieldset":{display:`none`},"& input":{padding:`${t.spacing(1.5)} 0 4px 0`},"& .MuiInputAdornment-root":{marginLeft:0,marginTop:1},"& label":{transform:`translate(0px, -9px) scale(0.75)`}}),format:this.props.oContext.systemConfig.dateFormat.toLowerCase().replace(`mm`,`MM`),disabled:!!t,value:this.state.value||null,onChange:e=>this.setState({value:e},()=>{try{if(this.props.attr){let e=this.state.value.toISOString();this.onChange(this.props.attr,e).catch(e=>console.warn(`Error saving value for ${this.props.attr}:`,e))}}catch{}}),label:this.getText(this.props.schema.label)})}};g();var Ax=class extends X{renderItem(){if(!this.props.schema)return null;if(this.props.oContext.DeviceManager){let e=this.props.oContext.DeviceManager;return _.createElement(e,{uploadImagesToInstance:`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,title:this.getText(this.props.schema.label),socket:this.props.oContext.socket,selectedInstance:`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,themeName:this.props.themeName,theme:this.props.oContext.theme,themeType:this.props.oContext.themeType,isFloatComma:this.props.oContext.isFloatComma,dateFormat:this.props.oContext.dateFormat,smallCards:this.props.schema.smallCards})}return _.createElement(`div`,null,`DeviceManager not found`)}};g();var jx=n(lr(),1),Mx=typeof jx.default==`function`?jx.default:jx.default.default,Nx=`file-invalid-type`,Px=`file-too-large`,Fx=`file-too-small`,Ix=`too-many-files`;function Lx(e=``){let t=e.split(`,`);return{code:Nx,message:`File type must be ${t.length>1?`one of ${t.join(`, `)}`:t[0]}`}}var Rx=[`KB`,`MB`,`GB`,`TB`,`PB`];function zx(e){if(e<1024)return`${e} ${e===1?`byte`:`bytes`}`;let t=e/1024,n=0;for(;t>=1024&&n<Rx.length-1;)t/=1024,n++;return`${Number(t.toFixed(2))} ${Rx[n]}`}function Bx(e){return{code:Px,message:`File is larger than ${zx(e)}`}}function Vx(e){return{code:Fx,message:`File is smaller than ${zx(e)}`}}var Hx={code:Ix,message:`Too many files`};function Ux(e){return e.type===``&&typeof e.getAsFile==`function`}function Wx(e,t){let n=e.type===`application/x-moz-file`||Mx(e,t??``)||Ux(e);return[n,n?null:Lx(t)]}function Gx(e,t,n){if(Kx(e.size)){if(Kx(t)&&Kx(n)){if(e.size>n)return[!1,Bx(n)];if(e.size<t)return[!1,Vx(t)]}else if(Kx(t)&&e.size<t)return[!1,Vx(t)];else if(Kx(n)&&e.size>n)return[!1,Bx(n)]}return[!0,null]}function Kx(e){return e!=null}function qx(e){return e!=null&&typeof e.then==`function`}function Jx({files:e,accept:t,minSize:n,maxSize:r,multiple:i,maxFiles:a=0,validator:o}){return!i&&e.length>1||i&&a>=1&&e.length>a||e.some(e=>{let[i]=Wx(e,t),[a]=Gx(e,n,r);return!i||!a})?`reject`:o?`unknown`:`accept`}function Yx(e){return typeof e.isPropagationStopped==`function`?e.isPropagationStopped():e.cancelBubble!==void 0&&e.cancelBubble}function Xx(e){let t=e.dataTransfer??e.clipboardData;return t?Array.prototype.some.call(t.types,e=>e===`Files`||e===`application/x-moz-file`)||Array.prototype.some.call(t.items??[],Zx):!!e.target&&!!e.target.files}function Zx(e){return typeof e==`object`&&!!e&&e.kind===`file`}function Qx(e){e.preventDefault()}function $x(e){return e.indexOf(`MSIE`)!==-1||e.indexOf(`Trident/`)!==-1}function eS(e){return e.indexOf(`Edge/`)!==-1}function tS(e=window.navigator.userAgent){return $x(e)||eS(e)}function nS(...e){return(t,...n)=>e.some(e=>(!Yx(t)&&e&&e(t,...n),Yx(t)))}function rS(){return`showOpenFilePicker`in window}function iS(e){return Array.isArray(e)?e:typeof e==`string`?[e]:[]}function aS(e){if(Kx(e))return Array.isArray(e)?e.filter(e=>Kx(e)&&Kx(e.accept)):[{accept:e}]}function oS(e){let t=[],n=Object.keys(e);for(let n of Object.values(e))for(let e of iS(n))t.includes(e)||t.push(e);return t.length>0?t.join(`, `):n.length>0?n.join(`, `):`Files`}function sS(e){let t=aS(e);if(!Kx(t))return;let n={};for(let e of t)for(let[t,r]of Object.entries(e.accept)){let e=n[t]??(n[t]=[]);for(let t of iS(r))e.includes(t)||e.push(t)}return n}function cS(e){let t=aS(e);if(!Kx(t))return;let n=t.map(e=>{let t=Object.entries(e.accept).filter(([e,t])=>{let n=!0;return pS(e)||(console.warn(`Skipped "${e}" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.`),n=!1),(!(Array.isArray(t)||typeof t==`string`)||!iS(t).every(hS))&&(console.warn(`Skipped "${e}" because an invalid file extension was provided.`),n=!1),n}).reduce((e,[t,n])=>(e[t]=iS(n),e),{});return{description:Kx(e.description)&&e.description!==``?e.description:oS(t),accept:t}}).filter(e=>Object.keys(e.accept).length>0);return n.length>0?n:void 0}function lS(e,{omitWildcardMimeTypesWithExtensions:t=!1}={}){if(Kx(e))return Object.entries(e).reduce((e,[n,r])=>{let i=iS(r);return t&&mS(n)&&i.some(hS)?e.push(...i):e.push(n,...i),e},[]).filter(e=>pS(e)||hS(e)).join(`,`)}function uS(e){return e instanceof DOMException&&(e.name===`AbortError`||e.code===e.ABORT_ERR)}function dS(e){return e instanceof DOMException&&(e.name===`SecurityError`||e.code===e.SECURITY_ERR)}function fS(e){return e instanceof DOMException&&e.name===`NotAllowedError`}function pS(e){return e===`audio/*`||e===`video/*`||e===`image/*`||e===`text/*`||e===`application/*`||/\w+\/[-+.\w]+/g.test(e)}function mS(e){return e.endsWith(`/*`)}function hS(e){return/^.*\.[\w]+$/.test(e)}var gS=o(({children:e,...t},n)=>{let{open:r,...i}=vS(t);return d(n,()=>({open:r}),[r]),Y(Je,{children:e==null?void 0:e({...i,open:r})})});gS.displayName=`Dropzone`;var _S={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,isDragUnknown:!1,isDragGlobal:!1,isProcessing:!1,acceptedFiles:[],fileRejections:[]};function vS(e={}){let{accept:t,disabled:n=!1,getFilesFromEvent:r=At,maxSize:i=1/0,minSize:o=0,multiple:s=!0,maxFiles:u=0,onDragEnter:d,onDragLeave:m,onDragOver:h,onDrop:g,onDropAccepted:_,onDropRejected:v,onFileDialogCancel:y,onFileDialogOpen:b,useFsAccessApi:x=!1,autoFocus:S=!1,preventDropOnDocument:C=!0,noClick:w=!1,noKeyboard:T=!1,noDrag:E=!1,noDragEventsBubbling:D=!1,noPaste:O=!1,onError:k,validator:A,getErrorMessage:j}=e,M=p(()=>sS(t),[t]),N=p(()=>lS(M),[M]),ee=p(()=>lS(M,{omitWildcardMimeTypesWithExtensions:!0}),[M]),P=p(()=>cS(t),[t]),F=p(()=>typeof b==`function`?b:bS,[b]),te=p(()=>typeof y==`function`?y:bS,[y]),I=l(null),L=l(null),[R,z]=c(yS,_S),{isFocused:ne,isFileDialogActive:re}=R,ie=l(re);ie.current=re;let ae=l(null),B=f(()=>{var e;(e=ae.current)==null||e.abort();let t=new AbortController;return ae.current=t,z({type:`setProcessing`,isProcessing:!0}),t.signal},[]),oe=f(e=>{e.aborted||z({type:`setProcessing`,isProcessing:!1})},[]),se=l(typeof window<`u`&&window.isSecureContext&&x&&rS()),ce=()=>{!se.current&&re&&setTimeout(()=>{if(L.current){let{files:e}=L.current;e!=null&&e.length||(z({type:`closeDialog`}),te())}},300)};a(()=>(window.addEventListener(`focus`,ce,!1),()=>{window.removeEventListener(`focus`,ce,!1)}),[L,re,te,se]);let le=l([]),V=l([]),H=e=>{I.current&&e.target&&I.current.contains(e.target)&&e.defaultPrevented||(e.preventDefault(),le.current=[])};a(()=>(C&&(document.addEventListener(`dragover`,Qx,!1),document.addEventListener(`drop`,H,!1)),()=>{C&&(document.removeEventListener(`dragover`,Qx),document.removeEventListener(`drop`,H))}),[I,C]),a(()=>{let e=e=>{e.target&&(V.current=[...V.current,e.target]),Xx(e)&&z({isDragGlobal:!0,type:`setDragGlobal`})},t=e=>{V.current=V.current.filter(t=>t!==e.target&&t!==null),!(V.current.length>0)&&z({isDragGlobal:!1,type:`setDragGlobal`})},n=()=>{V.current=[],z({isDragGlobal:!1,type:`setDragGlobal`})},r=()=>{V.current=[],z({isDragGlobal:!1,type:`setDragGlobal`})};return document.addEventListener(`dragenter`,e,!1),document.addEventListener(`dragleave`,t,!1),document.addEventListener(`dragend`,n,!1),document.addEventListener(`drop`,r,!1),()=>{document.removeEventListener(`dragenter`,e),document.removeEventListener(`dragleave`,t),document.removeEventListener(`dragend`,n),document.removeEventListener(`drop`,r)}},[I]),a(()=>(!n&&S&&I.current&&I.current.focus(),()=>{}),[I,S,n]);let ue=f(e=>{k?k(e):console.error(e)},[k]),de=f(e=>{var t;e.preventDefault(),(t=e.persist)==null||t.call(e),we(e),!ie.current&&(le.current=[...le.current,e.target],Xx(e)&&Promise.resolve(r(e)).then(t=>{if(Yx(e)&&!D)return;let n=t.length>0?Jx({files:t,accept:N,minSize:o,maxSize:i,multiple:s,maxFiles:u,validator:A}):null;z({isDragAccept:n===`accept`,isDragReject:n===`reject`,isDragUnknown:n===`unknown`,isDragActive:!0,type:`setDraggedFiles`}),d&&d(e)}).catch(e=>ue(e)))},[r,d,ue,D,N,o,i,s,u,A]),U=f(e=>{var t;if(e.preventDefault(),(t=e.persist)==null||t.call(e),we(e),ie.current)return!1;let n=Xx(e);if(n&&e.dataTransfer)try{e.dataTransfer.dropEffect=`copy`}catch{}return n&&h&&h(e),!1},[h,D]),fe=f(e=>{var t;e.preventDefault(),(t=e.persist)==null||t.call(e),we(e);let n=le.current.filter(e=>{var t;return(t=I.current)==null?void 0:t.contains(e)}),r=n.indexOf(e.target);r!==-1&&n.splice(r,1),le.current=n,!(n.length>0)&&(z({type:`setDraggedFiles`,isDragActive:!1,isDragAccept:!1,isDragReject:!1,isDragUnknown:!1}),Xx(e)&&m&&m(e))},[I,m,D]),pe=f(async(e,t,n)=>{let r=(e,t)=>j?{...e,message:j(e,t)}:e,a=e=>{let n=[],i=[];e.forEach(({file:e,accepted:t,acceptError:a,sizeMatch:o,sizeError:s,customErrors:c})=>{if(t&&o&&!c)n.push(e);else{let t=[a,s];c&&(t=t.concat(c)),i.push({file:e,errors:t.filter(e=>e!=null).map(t=>r(t,e))})}});let a=s?u>=1?u:1/0:1;n.length>a&&n.splice(a).forEach(e=>{i.push({file:e,errors:[r(Hx,e)]})}),z({acceptedFiles:n,fileRejections:i,type:`setFiles`}),g&&g(n,i,t),i.length>0&&v&&v(i,t),n.length>0&&_&&_(n,t)},c=e.map(e=>{let[t,n]=Wx(e,ee),[r,a]=Gx(e,o,i);return{file:e,accepted:t,acceptError:n,sizeMatch:r,sizeError:a,customErrors:A?A(e):null}});if(!c.some(({customErrors:e})=>qx(e))){a(c);return}let l;try{l=await Promise.all(c.map(async({customErrors:e,...t})=>({...t,customErrors:await e})))}catch(e){n.aborted||(oe(n),ue(e));return}n.aborted||a(l)},[z,s,ee,o,i,u,g,_,v,A,j,ue,oe]),W=f(e=>{var t;if(e.preventDefault(),(t=e.persist)==null||t.call(e),we(e),le.current=[],!(ie.current&&e.dataTransfer)&&(z({type:`reset`}),Xx(e))){let t=B();Promise.resolve(r(e)).then(n=>{if(!t.aborted){if(Yx(e)&&!D){oe(t);return}return pe(n,e,t)}}).catch(e=>{t.aborted||(oe(t),ue(e))})}},[r,pe,ue,D,B,oe]),me=f(e=>{var t;if(!Xx(e))return;e.preventDefault(),(t=e.persist)==null||t.call(e),we(e);let n=B();Promise.resolve(r(e)).then(t=>{if(!n.aborted){if(Yx(e)&&!D){oe(n);return}return pe(t,e,n)}}).catch(e=>{n.aborted||(oe(n),ue(e))})},[r,pe,ue,D,B,oe]),he=f(()=>{if(se.current){z({type:`openDialog`}),F();let e={multiple:s,types:P},t;window.showOpenFilePicker(e).then(e=>(t=B(),r(e))).then(e=>{if(z({type:`closeDialog`}),!t.aborted)return pe(e,null,t)}).catch(e=>{t&&oe(t),uS(e)?(te(e),z({type:`closeDialog`})):dS(e)||fS(e)?(se.current=!1,L.current?(L.current.value=``,L.current.click()):ue(Error(`Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided.`))):ue(e)});return}L.current&&(z({type:`openDialog`}),F(),L.current.value=``,L.current.click())},[z,F,te,x,pe,ue,P,s,B,oe]),ge=f(e=>{var t;(t=I.current)!=null&&t.isEqualNode(e.target)&&(e.key===` `||e.key===`Enter`||e.keyCode===32||e.keyCode===13)&&(e.preventDefault(),he())},[I,he]),_e=f(()=>{z({type:`focus`})},[]),ve=f(()=>{z({type:`blur`})},[]),ye=f(()=>{w||(tS()?setTimeout(he,0):he())},[w,he]),be=e=>n?null:e,xe=e=>T?null:be(e),Se=e=>E?null:be(e),Ce=e=>O?null:be(e),we=e=>{D&&e.stopPropagation()},Te=p(()=>({refKey:e=`ref`,role:t,onKeyDown:r,onFocus:i,onBlur:a,onClick:o,onDragEnter:s,onDragOver:c,onDragLeave:l,onDrop:u,onPaste:d,...f}={})=>({onKeyDown:xe(nS(r,ge)),onFocus:xe(nS(i,_e)),onBlur:xe(nS(a,ve)),onClick:be(nS(o,ye)),onDragEnter:Se(nS(s,de)),onDragOver:Se(nS(c,U)),onDragLeave:Se(nS(l,fe)),onDrop:Se(nS(u,W)),onPaste:Ce(nS(d,me)),role:typeof t==`string`&&t!==``?t:`presentation`,[e]:I,...!n&&!T?{tabIndex:0}:{},...n?{"aria-disabled":!0}:{},...f}),[I,ge,_e,ve,ye,de,U,fe,W,me,T,E,O,n]),Ee=f(e=>{e.stopPropagation()},[]),De=p(()=>({refKey:e=`ref`,onChange:t,onClick:n,...r}={})=>({accept:ee,multiple:s,type:`file`,"aria-label":`file upload`,style:{border:0,display:`block`,height:0,margin:0,opacity:0,overflow:`hidden`,padding:0,width:0},onChange:be(nS(t,W)),onClick:be(nS(n,Ee)),tabIndex:-1,[e]:L,...r}),[L,t,s,W,n]);return{...R,isFocused:ne&&!n,getRootProps:Te,getInputProps:De,rootRef:I,inputRef:L,open:be(he)}}function yS(e,t){switch(t.type){case`focus`:return{...e,isFocused:!0};case`blur`:return{...e,isFocused:!1};case`openDialog`:return{..._S,isFileDialogActive:!0};case`closeDialog`:return{...e,isFileDialogActive:!1};case`setDraggedFiles`:return{...e,isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject,isDragUnknown:t.isDragUnknown};case`setProcessing`:return{...e,isProcessing:t.isProcessing};case`setFiles`:return{...e,acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isProcessing:!1,isDragReject:!1,isDragUnknown:!1};case`setDragGlobal`:return{...e,isDragGlobal:t.isDragGlobal};case`reset`:return{..._S};default:return e}}function bS(){}g();var xS={fullWidth:{width:`100%`},fullWidthOneButton:{width:`calc(100% - 42px)`},fullWidthTwoButtons:{width:`calc(100% - 84px)`},fullWidthThreeButtons:{width:`calc(100% - 126x)`},dropZone:{width:`100%`,height:`100%`,position:`absolute`},dropZoneEmpty:{},image:{objectFit:`contain`,margin:`auto`,display:`flex`,width:`100%`,height:`100%`},uploadDiv:{position:`relative`,width:`100%`},uploadDivDragging:{opacity:1,background:`rgba(128,255,128,0.1)`},uploadCenterDiv:{margin:5,border:`3px dashed grey`,borderRadius:5,width:`100%`,height:`100%`,position:`absolute`,display:`flex`},uploadCenterIcon:{paddingTop:10,width:48,height:48},uploadCenterText:{fontSize:16},uploadCenterTextAndIcon:{textAlign:`center`,position:`absolute`,top:0,bottom:0,left:0,right:0,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`},disabledOpacity:{opacity:.3,cursor:`default`},error:{border:`2px solid red`},deleteButton:{},selectedImage:{height:40,width:40,display:`inline-block`,marginRight:8}},SS=[`jpg`,`jpeg`,`svg`,`png`,`webp`,`gif`,`apng`,`avif`,`webp`],CS=[`mp3`,`ogg`,`wav`,`aac`],wS=[`avi`,`mp4`,`mov`],TS=[`txt`,`log`,`html`,`htm`],ES=[`json`,`js`,`ts`],DS=class e extends X{constructor(e){super(e),q(this,`dropzoneRef`,void 0),q(this,`imagePrefix`,void 0),q(this,`objectID`,void 0),q(this,`path`,void 0),q(this,`onFolderChanged`,(e,t)=>{this.path&&t.startsWith(this.path)&&this.updateFiles().catch(e=>console.error(`Cannot update files: ${e}`))}),this.state={...this.state,deleteFile:``},this.dropzoneRef=_.createRef(),this.imagePrefix=this.props.oContext.imagePrefix??`./files`}async componentDidMount(){await super.componentDidMount(),this.objectID=(this.props.schema.objectID||`0_userdata.0`).replace(`%INSTANCE%`,(this.props.oContext.instance||0).toString()),this.path=this.props.schema.upload||``,this.path&&(this.path===`/`?this.path=``:this.path.endsWith(`/`)||(this.path=`${this.path}/`)),this.updateFiles().then(()=>{let e=X.getValue(this.props.data,this.props.attr);this.setState({value:e}),this.props.oContext.socket.subscribeFiles(this.objectID,`${this.path}/*`,this.onFolderChanged).catch(e=>console.error(`Cannot subscribe: ${e}`))})}componentWillUnmount(){this.props.oContext.socket.subscribeFiles(this.objectID,`${this.path}/*`,this.onFolderChanged).catch(e=>console.error(`Cannot subscribe: ${e}`)),super.componentWillUnmount()}async updateFiles(){let e=await this.readFiles(this.props.schema.pattern);await new Promise(t=>this.setState({files:e},t))}async readFolder(e,t,n){try{let i=await this.props.oContext.socket.readDir(this.objectID,e.replace(/^\//,``));for(let a=0;a<i.length;a++){let o=i[a];if(o.isDir)await this.readFolder(`${e+o.file}/`,t,n);else{let i=!1;if(i=n===`*.*`&&o.file.includes(`.`)||!n||n===`*`||n===`.*`&&o.file.startsWith(`.`)?!0:RegExp(`^${n.replace(/\./g,`\\.`).replace(/\*/g,`.*`)}$`).test(o.file),i){var r;t.push({name:e+o.file,size:(r=o.stats)!=null&&r.size?$t.formatBytes(o.stats.size):`--`})}}}}catch(t){console.error(`Cannot read "${e}": ${t}`)}return t}async readFiles(e){let t=[];e||=this.props.schema.pattern,e||=`**/*.*`;let n,r=e.lastIndexOf(`/`);if(n=r===-1?e:e.substring(r+1),e.startsWith(`**`))await this.readFolder(`/`,t,n);else{let r=e.lastIndexOf(`/`);if(r===-1)await this.readFolder(`/`,t,n);else{let i=e.substring(0,r+1);await this.readFolder(i,t,n)}}return t}onDrop(e){let t=e[0],n=new FileReader,r=this.props.schema.maxSize||2097152;n.onabort=()=>console.log(`file reading was aborted`),n.onerror=()=>console.log(`file reading has failed`),n.onload=()=>{if(t.size>r){window.alert(K.t(`jc_File is too big. Max %sk allowed. Try use SVG.`,Math.round(r/1024)));return}let e=n.result;if(e===null){console.error(`Cannot read file ${t.name}`);return}this.props.oContext.socket.writeFile64(this.objectID,this.path+t.name,e).then(()=>this.updateFiles()).then(()=>this.setState({value:this.path+t.name},()=>this.onChange(this.props.attr,this.path+t.name))).catch(e=>window.alert(`Cannot upload file: ${e}`))},n.readAsArrayBuffer(t)}renderDeleteDialog(){return this.state.deleteFile?_.createElement(Cn,{title:K.t(`jc_Are you sure?`),text:K.t(`jc_File will be deleted`),ok:K.t(`jc_Delete`),cancel:K.t(`jc_Cancel`),onClose:e=>{let t=this.state.deleteFile;this.setState({deleteFile:``},()=>{e&&this.props.oContext.socket.deleteFile(this.objectID,t).then(()=>this.updateFiles()).catch(e=>window.alert(`Cannot delete file: ${e}`))})}}):null}static base64ToArrayBuffer(e){let t=window.atob(e),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.charCodeAt(e);return r.buffer}loadFile(){return this.props.oContext.socket.readFile(this.objectID,this.state.value,!0)}play(){this.loadFile().then(t=>{if(typeof AudioContext<`u`){let n=new AudioContext,r=e.base64ToArrayBuffer(t.file);n.decodeAudioData(r,e=>{let t=n.createBufferSource();t.buffer=e,t.connect(n.destination),t.start(0)},e=>window.alert(`Cannot play: ${e.message}`))}})}getFileIcon(e){return e!=null&&e.extension?SS.includes(e.extension)?_.createElement(`div`,{style:{...xS.selectedImage,backgroundImage:`url(${this.imagePrefix}/${this.objectID}/${e.value})`,backgroundSize:`contain`,backgroundRepeat:`no-repeat`}}):CS.includes(e.extension)?_.createElement(Jt,null):TS.includes(e.extension)?_.createElement(Vt,null):wS.includes(e.extension)?_.createElement(te,null):ES.includes(e.extension)?_.createElement(ce,null):null:null}renderItem(e,t){if(!this.state.files)return null;let n=[];this.props.schema.withFolder||this.state.files.forEach(e=>{let t=e.name.lastIndexOf(`/`);if(t===-1)n.includes(`/`)||n.push(`/`);else{let r=e.name.substring(0,t+1);n.includes(r)||n.push(r)}});let r=this.state.files.map(e=>({value:e.name,label:!this.props.schema.withFolder&&n.length===1?`${e.name.substring(n[0].length)}`:`${e.name}${this.props.schema.noSize?``:`(${e.size})`}`,extension:e.name.toLowerCase().split(`.`).pop()}));this.props.schema.noNone||r.unshift({label:K.t(`jc_none`),value:``});let i=r.find(e=>e.value===this.state.value),a=0;this.props.schema.upload&&a++,this.props.schema.refresh&&a++;let o=this.state.value&&(this.state.value.endsWith(`.mp3`)||this.state.value.endsWith(`.ogg`)||this.state.value.endsWith(`.wav`));o&&a++;let s=_.createElement(`div`,{style:xS.fullWidth},_.createElement(Mn,{variant:`standard`,style:{width:`calc(100% - ${a*42}px)`}},this.props.schema.label?_.createElement(Ze,null,this.getText(this.props.schema.label)):null,_.createElement(Be,{variant:`standard`,error:!!e,disabled:!!t,value:this.state.value||`_`,renderValue:()=>_.createElement(_.Fragment,null,this.getFileIcon(i),_.createElement(`span`,null,(i==null?void 0:i.label)||``)),onChange:e=>{this.setState({value:e.target.value===`_`?``:e.target.value},()=>this.onChange(this.props.attr,this.state.value))}},r.map(e=>_.createElement(Ie,{key:e.value,value:e.value},_.createElement(rr,null,this.getFileIcon(e)),_.createElement(tt,null,e.label),this.props.schema.delete&&e.value?_.createElement(ur,{style:xS.deleteButton,size:`small`,onClick:t=>{t.stopPropagation(),this.setState({deleteFile:e.value})}},_.createElement(we,null)):null))),this.props.schema.help?_.createElement(en,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null),this.props.schema.refresh&&_.createElement(ur,{onClick:()=>this.updateFiles()},_.createElement($e,null)),this.props.schema.upload&&_.createElement(ur,{onClick:()=>{var e;return(e=this.dropzoneRef.current)==null?void 0:e.open()}},_.createElement(Xe,null)),o&&_.createElement(ur,{style:{color:`#00FF00`},onClick:()=>this.play()},_.createElement(Tt,null)));if(!this.props.schema.upload)return _.createElement(_.Fragment,null,s,this.renderDeleteDialog());let c={"*/*":[]};if(this.props.schema.fileTypes===`image`?c={"image/*":[`.png`,`.jpg`,`.svg`,`.gif`,`.apng`,`.avif`,`.webp`]}:this.props.schema.fileTypes===`audio`?c={"audio/*":[`.mp3`,`.ogg`,`.wav`,`.mp4`]}:this.props.schema.fileTypes===`text`&&(c={"text/plain":[`.txt`]}),this.props.schema.pattern){let e=(this.props.schema.pattern.split(`/`).pop()||``).toLowerCase().replace(/.*\./,``);c=e===`png`||e===`jpg`||e===`svg`||e===`gif`||e===`apng`||e===`avif`||e===`webp`?{"image/*":[`.png`,`.jpg`,`.svg`,`.gif`,`.apng`,`.avif`,`.webp`]}:e===`mp3`||e===`ogg`||e===`wav`?{"audio/*":[`.mp3`,`.ogg`,`.wav`,`.mp4`]}:e===`ics`?{"text/calendar":[`.ics`]}:e===`txt`?{"text/plain":[`.txt`]}:e===`pem`?{"text/plain":[`.pem`]}:{"*/*":[`.${e}`]}}return _.createElement(gS,{ref:this.dropzoneRef,multiple:!1,accept:c,noKeyboard:!0,noClick:!0,maxSize:this.props.schema.maxSize||2097152,onDragEnter:()=>{this.setState({uploadFile:`dragging`})},onDragLeave:()=>this.setState({uploadFile:!0}),onDrop:(e,t)=>{if(this.setState({uploadFile:!1}),e.length)this.onDrop(e);else{var n;window.alert((t==null||(n=t[0])==null||(n=n.errors)==null||(n=n[0])==null?void 0:n.message)||K.t(`jc_Cannot upload`))}}},({getRootProps:e,getInputProps:n})=>_.createElement(`div`,{style:{...xS.uploadDiv,...this.state.uploadFile===`dragging`?xS.uploadDivDragging:void 0,...t?xS.disabledOpacity:void 0},...e()},_.createElement(`input`,{...n()}),this.state.uploadFile===`dragging`?_.createElement(`div`,{style:{...xS.uploadCenterDiv,...this.state.uploadError?xS.error:void 0}},_.createElement(`div`,{style:xS.uploadCenterTextAndIcon},_.createElement(Xe,{style:xS.uploadCenterIcon}),_.createElement(`div`,{style:xS.uploadCenterText},this.state.uploadFile===`dragging`?K.t(`jc_Drop file here`):K.t(`jc_Place your files here or click here to open the browse dialog`)))):null,s,this.renderDeleteDialog()))}};g();var OS={fullWidth:{width:`100%`},fullWidthOneButton:{width:`calc(100% - 69px)`,marginRight:4},fullWidthIcon:{width:`calc(100% - 119px)`,marginRight:4},selectedImage:{height:40,width:40,display:`inline-block`,marginRight:8}},kS=[`jpg`,`jpeg`,`svg`,`png`,`webp`,`gif`,`apng`,`avif`,`webp`],AS=[`mp3`,`ogg`,`wav`,`aac`],jS=[`avi`,`mp4`,`mov`],MS=[`txt`,`log`,`html`,`htm`],NS=[`json`,`js`,`ts`],PS=class extends X{constructor(...e){super(...e),q(this,`imagePrefix`,`../..`)}async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);this.imagePrefix=this.props.oContext.imagePrefix??`./files`,this.setState({value:e??``})}static getDerivedStateFromProps(e,t){let n=X.getValue(e.data,e.attr);return n==null||n.toString().trim()!==(t.value||``).toString().trim()?{value:n??``}:null}loadFile(){let e=this.state.value.indexOf(`/`);if(e!==-1){let t=this.state.value.substring(0,e),n=this.state.value.substring(e+1);return this.props.oContext.socket.readFile(t,n,!0)}return Promise.resolve(null)}play(){this.loadFile().then(e=>{if(typeof AudioContext<`u`&&e!=null&&e.file){let t=new AudioContext,n=DS.base64ToArrayBuffer(e.file);t.decodeAudioData(n,e=>{let n=t.createBufferSource();n.buffer=e,n.connect(t.destination),n.start(0)},e=>window.alert(`Cannot play: ${e.message}`))}})}getIcon(){let e=this.state.value.split(`.`).pop().toLowerCase();return kS.includes(e)?_.createElement(`div`,{style:{...OS.selectedImage,backgroundImage:`url(${this.imagePrefix}/${this.state.value})`,backgroundSize:`contain`,backgroundRepeat:`no-repeat`}}):AS.includes(e)?_.createElement(ur,{style:{color:`#00FF00`},onClick:()=>this.play()},_.createElement(Tt,null)):MS.includes(e)?_.createElement(Vt,null):jS.includes(e)?_.createElement(te,null):NS.includes(e)?_.createElement(ce,null):null}renderFileBrowser(){return this.state.showFileBrowser?_.createElement(Hn,{imagePrefix:this.props.oContext.imagePrefix,socket:this.props.oContext.socket,selected:this.state.value,onClose:()=>this.setState({showFileBrowser:!1}),onOk:e=>{let t=Array.isArray(e)?e[0]:e;this.setState({value:t},()=>this.props.attr&&this.onChange(this.props.attr,this.props.schema.trim===!1?t:(t||``).trim()))},selectOnlyFolders:this.props.schema.selectOnlyFolders,allowUpload:this.props.schema.allowUpload,allowDownload:this.props.schema.allowDownload,allowCreateFolder:this.props.schema.allowCreateFolder,allowView:this.props.schema.allowView,showToolbar:this.props.schema.showToolbar,limitPath:this.props.schema.limitPath,theme:this.props.oContext.theme}):null}renderItem(e,t){let n=this.getIcon();return _.createElement(`div`,{style:OS.fullWidth},n,_.createElement(ft,{variant:`standard`,style:n?OS.fullWidthIcon:OS.fullWidthOneButton,value:this.state.value??``,error:!!e,disabled:!!t,slotProps:{htmlInput:{maxLength:this.props.schema.maxLength||this.props.schema.max||void 0,readOnly:!!this.props.schema.disableEdit}},onChange:e=>{let t=e.target.value;this.setState({value:t},()=>this.props.attr&&this.onChange(this.props.attr,this.props.schema.trim===!1?t:(t||``).trim()))},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)}),_.createElement(Ge,{disabled:t,variant:`outlined`,onClick:()=>this.setState({showFileBrowser:!0})},`...`),this.renderFileBrowser())}};g();var FS=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);this.props.oContext.socket.getEnums(`functions`).then(t=>{let n=Object.keys(t).map(e=>({value:this.props.schema.short?e.replace(`enum.functions.`,``):e,label:this.getText(t[e].common.name),obj:t[e]}));this.props.schema.allowDeactivate!==!1&&n.unshift({label:K.t(X.NONE_LABEL),value:X.NONE_VALUE}),this.setState({value:e,selectOptions:n})})}renderItem(e,t){if(!this.state.selectOptions)return null;let n=this.state.selectOptions.find(e=>e.value===this.state.value);return _.createElement(Mn,{variant:`standard`,fullWidth:!0},this.props.schema.label?_.createElement(Ze,null,this.getText(this.props.schema.label)):null,_.createElement(Be,{variant:`standard`,error:!!e,disabled:!!t,value:this.state.value||`_`,renderValue:()=>n?n.obj?_.createElement(jn,{value:n.obj,themeType:this.props.oContext.themeType,lang:K.getLanguage()}):n.label:``,onChange:e=>{this.setState({value:e.target.value===`_`?``:e.target.value},()=>this.props.attr&&this.onChange(this.props.attr,this.state.value))}},this.state.selectOptions.map(e=>_.createElement(Ie,{key:e.value,value:e.value,style:e.value===X.DIFFERENT_VALUE?{opacity:.5}:{}},e.obj?_.createElement(jn,{value:e.obj,themeType:this.props.oContext.themeType,lang:K.getLanguage()}):e.label))),this.props.schema.help?_.createElement(en,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var IS=class extends X{constructor(...e){super(...e),q(this,`iframeRef`,_.createRef()),q(this,`observer`,null)}async componentDidMount(){await super.componentDidMount(),this.props.schema.reloadOnShow&&(this.observer=new IntersectionObserver(([e])=>{if(e.isIntersecting&&this.state.isVisible===!1&&this.iframeRef.current){let e=this.iframeRef.current.src;this.iframeRef.current.src=``,setTimeout(()=>{this.iframeRef.current&&(this.iframeRef.current.src=e)},0)}this.setState({isVisible:e.isIntersecting})}),this.iframeRef.current&&this.observer.observe(this.iframeRef.current))}componentWillUnmount(){var e,t;(e=super.componentWillUnmount)==null||e.call(this),(t=this.observer)==null||t.disconnect()}renderItem(e,t){let n=this.props.schema.url||X.getValue(this.props.data,this.props.attr);return _.createElement(`div`,{style:{position:`relative`,width:`100%`,height:`100%`}},_.createElement(`iframe`,{style:{width:`100%`,height:`100%`,borderWidth:this.props.schema.frameBorder??0,...this.props.schema.innerStyle,border:e?`1px solid red`:void 0},ref:this.iframeRef,src:n,allowFullScreen:this.props.schema.allowFullscreen??!1,sandbox:this.props.schema.sandbox,loading:this.props.schema.lazyLoad??`lazy`}),t&&_.createElement(`div`,{style:{position:`absolute`,top:0,left:0,width:`100%`,height:`100%`,backgroundColor:`rgba(255, 255, 255, 0.3)`,cursor:`not-allowed`,zIndex:1}}))}};g();var LS=class extends X{constructor(...e){super(...e),q(this,`initialized`,!1),q(this,`localContext`,void 0),q(this,`iframeRef`,_.createRef()),q(this,`observer`,null)}async componentDidMount(){await super.componentDidMount(),this.askInstance().catch(e=>console.error(e)),this.props.schema.reloadOnShow&&(this.observer=new IntersectionObserver(([e])=>{if(e.isIntersecting&&this.state.isVisible===!1&&this.iframeRef.current){let e=this.iframeRef.current.src;this.iframeRef.current.src=``,setTimeout(()=>{this.iframeRef.current&&(this.iframeRef.current.src=e)},0)}this.setState({isVisible:e.isIntersecting})}),this.iframeRef.current&&this.observer.observe(this.iframeRef.current))}async askInstance(){if(this.props.alive){let e=this.props.schema.data;if(e===void 0&&this.props.schema.jsonData){let t=await this.getPatternAsync(this.props.schema.jsonData,null,!0);if(t)try{e=JSON.parse(t)}catch{console.error(`Cannot parse json data: ${JSON.stringify(e)}`)}}e??=null;let t=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(t!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){let e=await this.props.oContext.socket.getState(`system.adapter.${t}.alive`);if(!(e!=null&&e.val)){window.alert(K.t(`jc_Instance %s is not alive`,t));return}}this.props.oContext.socket.sendTo(t,this.props.schema.command||`send`,e).then(e=>this.setState({url:e||``}))}}getContext(){let e={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(t=>e[t]=X.getValue(this.props.data,t)),JSON.stringify(e)}renderItem(e,t){if(this.props.alive){let e=this.getContext();(e!==this.localContext||!this.initialized)&&(this.localContext=e,setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}return this.state.url?_.createElement(`div`,{style:{position:`relative`,width:`100%`,height:`100%`}},_.createElement(`iframe`,{style:{width:`100%`,height:`100%`,borderWidth:this.props.schema.frameBorder??0,...this.props.schema.innerStyle,border:e?`1px solid red`:void 0},ref:this.iframeRef,src:this.state.url,allowFullScreen:this.props.schema.allowFullscreen??!1,sandbox:this.props.schema.sandbox,loading:this.props.schema.lazyLoad??`lazy`}),t&&_.createElement(`div`,{style:{position:`absolute`,top:0,left:0,width:`100%`,height:`100%`,backgroundColor:`rgba(255, 255, 255, 0.3)`,cursor:`not-allowed`,zIndex:1}})):null}};g();var RS=class extends X{async componentDidMount(){var e;await super.componentDidMount(),(e=this.props.common)!=null&&e.host&&this.props.oContext.socket.getHostByIp(this.props.common.host).then(e=>{this.props.schema.listenOnAllPorts||(e=e.filter(e=>e.address!==`0.0.0.0`&&e.address!==`::`)),this.props.schema.onlyIp4?e=e.filter(e=>e.family===`ipv4`):this.props.schema.onlyIp6&&(e=e.filter(e=>e.family===`ipv6`)),this.props.schema.noInternal&&(e=e.filter(e=>!e.internal)),e.forEach(e=>{e.address===`0.0.0.0`?e.name=`[IPv4] 0.0.0.0 - ${K.t(`jc_Listen on all IPs`)}`:e.address===`::`&&(e.name=`[IPv6] :: - ${K.t(`jc_Listen on all IPs`)}`)}),this.setState({ips:e})}).catch(e=>console.error(e))}renderItem(e,t){var n,r;let i=X.getValue(this.props.data,this.props.attr),a=(n=this.state.ips)==null?void 0:n.find(e=>e.address===i);return _.createElement(Mn,{fullWidth:!0,variant:`standard`},this.state.ips&&this.props.schema.label?_.createElement(Ze,null,this.getText(this.props.schema.label)):null,this.state.ips?_.createElement(Be,{variant:`standard`,error:!!e,disabled:!!t,value:i,renderValue:e=>(a==null?void 0:a.name)||e,onChange:e=>this.props.attr&&this.onChange(this.props.attr,e.target.value)},(r=this.state.ips)==null?void 0:r.map((e,t)=>_.createElement(Ie,{key:t,value:e.address},e.name))):_.createElement(ft,{fullWidth:!0,variant:`standard`,error:!!e,disabled:!!t,value:i,onChange:e=>this.props.attr&&this.onChange(this.props.attr,e.target.value),label:this.getText(this.props.schema.label)}),this.props.schema.help?_.createElement(en,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var zS=class extends X{constructor(...e){super(...e),q(this,`initialized`,!1),q(this,`localContext`,void 0)}async componentDidMount(){await super.componentDidMount(),this.props.schema.sendFirstByClick||this.askInstance().catch(e=>console.error(e))}async askInstance(){if(this.props.alive){let e=this.props.schema.data;if(e===void 0&&this.props.schema.jsonData){let t=await this.getPatternAsync(this.props.schema.jsonData,null,!0);if(t)try{e=JSON.parse(t)}catch{console.error(`Cannot parse json data: ${JSON.stringify(e)}`)}}e??=null;let t=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(t!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){let e=await this.props.oContext.socket.getState(`system.adapter.${t}.alive`);if(!(e!=null&&e.val)){window.alert(K.t(`jc_Instance %s is not alive`,t));return}}this.setState({loading:!0},()=>this.props.oContext.socket.sendTo(t,this.props.schema.command||`send`,e).then(e=>this.setState({image:e||``})))}}getContext(){let e={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(t=>e[t]=X.getValue(this.props.data,t)),JSON.stringify(e)}renderItem(){if(this.props.alive){let e=this.getContext();(e!==this.localContext||!this.initialized)&&(this.localContext=e,(!this.props.schema.sendFirstByClick||this.state.image!==void 0)&&setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}return!this.state.image&&this.props.schema.sendFirstByClick?_.createElement(`div`,{style:{width:this.props.schema.width||`100%`,height:this.props.schema.height,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:this.state.loading?`default`:`pointer`},onClick:()=>!this.state.loading&&this.askInstance()},this.state.loading?_.createElement(wn,null):typeof this.props.schema.sendFirstByClick==`boolean`?K.t(`jc_Click to show`):this.getText(this.props.schema.sendFirstByClick,this.props.schema.noTranslation)):this.state.image===void 0?null:_.createElement(Pt,{title:this.getText(this.props.schema.tooltip),src:this.state.image,style:{width:this.props.schema.width||`100%`,height:this.props.schema.height}})}};g();var BS=class extends X{constructor(e){super(e),q(this,`index`,void 0),this.index=Date.now()}async componentDidMount(){if(await super.componentDidMount(),this.props.schema.base64){let e=X.getValue(this.props.data,this.props.attr);this.setState({value:e})}else this.props.attr&&this.props.oContext.socket.fileExists(`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,this.props.attr).then(e=>e&&this.loadImage())}_getUrl(e){e&&(this.index=Date.now());let t=`files/${this.props.oContext.adapterName}.${this.props.oContext.instance}/${this.props.attr}?t=${this.index}`;return window.location.port===`3000`&&(t=`${window.location.protocol}//${window.location.hostname}:8081/${t}`),t}loadImage(){fetch(this._getUrl()).then(e=>e.blob()).then(e=>{let t=new FileReader;t.onload=()=>{this.setState({value:t.result})},t.readAsDataURL(e)}).catch(e=>console.error(e))}renderItem(e,t){return _.createElement(Mn,{fullWidth:!0,variant:`standard`},this.props.schema.label?_.createElement(Ze,{shrink:!0},this.getText(this.props.schema.label)):null,_.createElement(yn,{error:!!e,disabled:t,accept:this.props.schema.accept,crop:this.props.schema.crop,maxSize:this.props.schema.maxSize||262144,icon:this.state.value||void 0,removeIconFunc:()=>this.setState({value:null},()=>{if(this.props.attr)if(this.props.schema.base64){let e=this.onChange(this.props.attr,this.state.value);e instanceof Promise&&e.catch(e=>console.error(`Cannot set value: ${e}`))}else this.props.oContext.socket.deleteFile(`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,this.props.attr).catch(e=>console.error(e))}),onChange:e=>this.setState({value:e},()=>{if(this.props.attr){if(this.props.schema.base64){let e=this.onChange(this.props.attr,this.state.value);e instanceof Promise&&e.catch(e=>console.error(`Cannot set value: ${e}`))}else e.startsWith(`data`)&&(e=e.split(`,`)[1]);this.props.oContext.socket.writeFile64(`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,this.props.attr,e).catch(e=>console.error(e))}})}),this.props.schema.help?_.createElement(en,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var VS=class extends X{renderItem(){return _.createElement(Xn,{type:this.props.schema.boxType||`info`,closeable:this.props.schema.closeable===void 0||this.props.schema.closeable,storeId:this.props.schema.closed===void 0?`${!!this.props.oContext.adapterName} ${this.props.attr}`:void 0,closed:this.props.schema.closed,style:{width:`100%`,...this.props.schema.style}},this.props.schema.title?_.createElement(ht,{component:`div`,sx:{fontWeight:`bold`,fontSize:`larger`}},this.getText(this.props.schema.title)):null,this.getText(this.props.schema.text))}};g();var HS={icon:{width:20,height:20,marginRight:4}},US=class extends X{constructor(...e){super(...e),q(this,`onInstancesUpdate`,(e,t)=>{var n;if(!e.match(/^system\.adapter\.[-_a-z\d]+\.\d+$/))return;let r=this.props.schema.long?e:this.props.schema.short?e.split(`.`).pop():e.replace(/^system\.adapter\./,``),i=((n=this.state.selectOptions)==null?void 0:n.findIndex(e=>e.value===r))??-1;if(t){if(this.props.schema.adapter===`_dataSources`&&(!t.common||!t.common.getHistory))return;if(i===-1){let e=JSON.parse(JSON.stringify(this.state.selectOptions)),n=typeof t.common.name==`object`?t.common.name[K.getLanguage()]||t.common.name.en:t.common.name;e.push({value:this.props.schema.long?t._id:this.props.schema.short?t._id.split(`.`).pop()||``:t._id.replace(/^system\.adapter\./,``),label:`${n} [${t._id.replace(/^system\.adapter\./,``)}]`,icon:`${this.props.oContext.imagePrefix}/adapter/${n}/${t.common.icon}`}),e.sort((e,t)=>e.label>t.label?1:e.label<t.label?-1:0),this.setState({selectOptions:e})}}else if(i!==-1){let e=JSON.parse(JSON.stringify(this.state.selectOptions)),t={};this.state.value===e[i].value&&(t.value=X.NONE_VALUE),e.splice(i,1),t.selectOptions=e,this.setState(t)}})}async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr),t=this.props.schema.adapter;t===`_dataSources`&&(t=void 0),this.props.oContext.socket.getAdapterInstances(t,!0).then(async n=>{this.props.schema.adapter===`_dataSources`?n=n.filter(e=>{var t;return e==null||(t=e.common)==null?void 0:t.getHistory}):this.props.schema.adapter?n=n.filter(e=>e==null?void 0:e._id.startsWith(`system.adapter.${this.props.schema.adapter}.`)):this.props.schema.adapters&&Array.isArray(this.props.schema.adapters)&&(n=n.filter(e=>{var t,n;return(t=this.props.schema.adapters)==null?void 0:t.includes(e==null||(n=e.common)==null?void 0:n.name)})),this.props.schema.onlyEnabled&&(n=n.filter(e=>{var t;return e==null||(t=e.common)==null?void 0:t.enabled}));let r=n.map(e=>({value:this.props.schema.long?e._id:this.props.schema.short?e._id.split(`.`).pop()||``:e._id.replace(/^system\.adapter\./,``),label:`${e.common.name} [${e._id.replace(/^system\.adapter\./,``)}]`,icon:`${this.props.oContext.imagePrefix}/adapter/${e.common.name}/${e.common.icon}`}));r.sort((e,t)=>e.value>t.value?1:e.value<t.value?-1:0),this.props.schema.allowDeactivate!==!1&&r.unshift({label:K.t(X.NONE_LABEL),value:X.NONE_VALUE}),this.props.schema.all&&r.unshift({label:K.t(`sch_all`),value:`*`}),this.setState({value:e||``,selectOptions:r}),await this.props.oContext.socket.subscribeObject(`system.adapter.${t?`${t}.`:``}*`,this.onInstancesUpdate)}).catch(e=>console.error(`Cannot get instances: ${e}`))}componentWillUnmount(){this.props.oContext.socket.unsubscribeObject(`system.adapter.*`,this.onInstancesUpdate).then(()=>{}),super.componentWillUnmount()}renderItem(e,t){var n;if(!this.state.selectOptions)return null;let r=(n=this.state.selectOptions)==null?void 0:n.find(e=>e.value===this.state.value);return _.createElement(Mn,{fullWidth:!0,key:this.props.attr,variant:`standard`},this.props.schema.label?_.createElement(Ze,{shrink:!0},this.getText(this.props.schema.label)):null,_.createElement(Be,{variant:`standard`,error:!!e,displayEmpty:!0,disabled:!!t,value:this.state.value,renderValue:()=>_.createElement(`span`,{style:{display:`flex`}},r!=null&&r.icon?_.createElement(Pt,{src:`./${r.icon}`,style:HS.icon}):null,this.getText(r==null?void 0:r.label,!0)),onChange:e=>this.setState({value:e.target.value},()=>this.props.attr&&this.onChange(this.props.attr,this.state.value))},this.state.selectOptions.map(e=>_.createElement(Ie,{key:e.value,value:e.value,style:e.value===X.NONE_VALUE?{opacity:.5}:{}},e.icon?_.createElement(Pt,{src:`./${e.icon}`,style:HS.icon}):null,this.getText(e.label,!0)))),this.props.schema.help?_.createElement(en,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var WS={address:{fontSize:`smaller`,opacity:.5,marginLeft:8}},GS=class extends X{async componentDidMount(){var e;if(await super.componentDidMount(),(e=this.props.common)!=null&&e.host)try{var t,n,r;let e=await((t=(n=this.props.oContext).getCachedObject)==null?void 0:t.call(n,`system.host.${this.props.common.host}`)),i=[];if(e!=null&&(r=e.native)!=null&&(r=r.hardware)!=null&&r.networkInterfaces){let t=e.native.hardware.networkInterfaces;Object.keys(t).forEach(e=>{var n,r,a,o;if(this.props.schema.ignoreInternal&&!((n=t[e])!=null&&n.find(e=>!e.internal))||this.props.schema.ignoreLoopback&&(r=t[e])!=null&&r.find(e=>e.address===`127.0.0.1`||e.address===`::1`))return;let s=(a=t[e])==null?void 0:a.find(e=>e.family===`IPv4`);s||=(o=t[e])==null?void 0:o.find(e=>e.family===`IPv6`),i.push({value:e,address:(s==null?void 0:s.address)||``})})}this.setState({interfaces:i})}catch(e){window.alert(`Cannot read interfaces: ${e}`)}}renderItem(e,t){var n,r,i;let a=X.getValue(this.props.data,this.props.attr),o=(n=this.state.interfaces)==null?void 0:n.find(e=>e.value===a);return _.createElement(Mn,{fullWidth:!0,variant:`standard`},(r=this.state.interfaces)!=null&&r.length&&this.props.schema.label?_.createElement(Ze,null,this.getText(this.props.schema.label)):null,(i=this.state.interfaces)!=null&&i.length?_.createElement(Be,{variant:`standard`,error:!!e,disabled:!!t,value:a,renderValue:e=>o?_.createElement(`span`,null,o.value,_.createElement(`span`,{style:WS.address},o.address)):e,onChange:e=>this.props.attr&&this.onChange(this.props.attr,e.target.value)},this.state.interfaces.map((e,t)=>_.createElement(Ie,{key:t,value:e.value},_.createElement(`span`,null,e.value,_.createElement(`span`,{style:WS.address},e.address))))):_.createElement(ft,{fullWidth:!0,variant:`standard`,error:!!e,disabled:!!t,value:a,onChange:e=>this.props.attr&&this.onChange(this.props.attr,e.target.value),label:this.getText(this.props.schema.label)}),this.props.schema.help?_.createElement(en,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var KS={modalDialog:{minWidth:400,maxWidth:800},overflowHidden:{display:`flex`,overflow:`hidden`},titleIcon:{marginRight:5},content:{fontSize:16},languageButton:{position:`absolute`,right:8,top:8},languageButtonActive:{color:`primary.main`}},qS=({toggleTranslation:e,noTranslation:t,title:n,fullWidth:r,help:i,maxWidth:o,progress:s,applyDisabled:c,applyButton:l,onClose:d,children:f,titleButtonApply:p,titleButtonClose:m,onApply:h,textInput:g,defaultValue:v,overflowHidden:y})=>{let[b,x]=u(v);a(()=>{x(v)},[v]);let S=xt(),C=vt(S.breakpoints.down(`md`));return _.createElement(Dt,{open:!0,maxWidth:C?!1:o||`md`,fullWidth:!!r,fullScreen:C,onClose:d,sx:{"& .MuiPaper-root":C?{}:KS.modalDialog}},n&&_.createElement(gn,null,n,K.getLanguage()!==`en`&&e?_.createElement(ur,{size:`large`,style:{...KS.languageButton,...t?KS.languageButtonActive:{}},onClick:()=>e(),title:K.t(`jc_Disable/Enable translation`)},_.createElement(En,null)):null),_.createElement(Un,{sx:{...y?KS.overflowHidden:{},...KS.content},style:{paddingTop:8}},g&&_.createElement(ft,{autoComplete:`off`,fullWidth:!0,autoFocus:!0,variant:`outlined`,size:`medium`,multiline:!0,value:b,onChange:e=>x(e.target.value)}),f,i?_.createElement(`div`,null,i):null),_.createElement(On,null,l!==!1&&_.createElement(Ge,{startIcon:_.createElement(Oe,null),disabled:s||c&&v===b,onClick:()=>h==null?void 0:h(g&&b||``),variant:`contained`,color:`primary`},K.t(p||`jc_Ok`)),_.createElement(Ge,{color:`grey`,onClick:()=>d&&d(),disabled:s,variant:`contained`,startIcon:_.createElement(je,null)},K.t(m||`jc_Cancel`))))},JS=n(r(((e,t)=>{(function(){var e=`ace`,t=(function(){return this})();if(!t&&typeof window<`u`&&(t=window),!e&&typeof requirejs<`u`)return;var n=function(e,t,r){if(typeof e!=`string`){n.original?n.original.apply(this,arguments):(console.error(`dropping module because define wasn't a string.`),console.trace());return}arguments.length==2&&(r=t),n.modules[e]||(n.payloads[e]=r,n.modules[e]=null)};n.modules={},n.payloads={};var r=function(e,t,n){if(typeof t==`string`){var r=o(e,t);if(r!=null)return n&&n(),r}else if(Object.prototype.toString.call(t)===`[object Array]`){for(var a=[],s=0,c=t.length;s<c;++s){var l=o(e,t[s]);if(l==null&&i.original)return;a.push(l)}return n&&n.apply(null,a)||!0}},i=function(e,t){var n=r(``,e,t);return n==null&&i.original?i.original.apply(this,arguments):n},a=function(e,t){if(t.indexOf(`!`)!==-1){var n=t.split(`!`);return a(e,n[0])+`!`+a(e,n[1])}if(t.charAt(0)==`.`)for(t=e.split(`/`).slice(0,-1).join(`/`)+`/`+t;t.indexOf(`.`)!==-1&&r!=t;){var r=t;t=t.replace(/\/\.\//,`/`).replace(/[^\/]+\/\.\.\//,``)}return t},o=function(e,t){t=a(e,t);var i=n.modules[t];if(!i){if(i=n.payloads[t],typeof i==`function`){var o={},s={id:t,uri:``,exports:o,packaged:!0};o=i(function(e,n){return r(t,e,n)},o,s)||s.exports,n.modules[t]=o,delete n.payloads[t]}i=n.modules[t]=o||i}return i};function s(e){var r=t;e&&(t[e]||(t[e]={}),r=t[e]),(!r.define||!r.define.packaged)&&(n.original=r.define,r.define=n,r.define.packaged=!0),(!r.require||!r.require.packaged)&&(i.original=r.require,r.require=i,r.require.packaged=!0)}s(e)})(),ace.define(`ace/lib/es6-shim`,[`require`,`exports`,`module`],function(e,t,n){function r(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||r(String.prototype,`startsWith`,function(e,t){return t||=0,this.lastIndexOf(e,t)===t}),String.prototype.endsWith||r(String.prototype,`endsWith`,function(e,t){var n=this;(t===void 0||t>n.length)&&(t=n.length),t-=e.length;var r=n.indexOf(e,t);return r!==-1&&r===t}),String.prototype.repeat||r(String.prototype,`repeat`,function(e){for(var t=``,n=this;e>0;)e&1&&(t+=n),(e>>=1)&&(n+=n);return t}),String.prototype.includes||r(String.prototype,`includes`,function(e,t){return this.indexOf(e,t)!=-1}),Object.assign||(Object.assign=function(e){if(e==null)throw TypeError(`Cannot convert undefined or null to object`);for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];r!=null&&Object.keys(r).forEach(function(e){t[e]=r[e]})}return t}),Object.values||(Object.values=function(e){return Object.keys(e).map(function(t){return e[t]})}),Array.prototype.find||r(Array.prototype,`find`,function(e){for(var t=this.length,n=arguments[1],r=0;r<t;r++){var i=this[r];if(e.call(n,i,r,this))return i}}),Array.prototype.findIndex||r(Array.prototype,`findIndex`,function(e){for(var t=this.length,n=arguments[1],r=0;r<t;r++){var i=this[r];if(e.call(n,i,r,this))return r}}),Array.prototype.includes||r(Array.prototype,`includes`,function(e,t){return this.indexOf(e,t)!=-1}),Array.prototype.fill||r(Array.prototype,`fill`,function(e){for(var t=this,n=t.length>>>0,r=arguments[1]>>0,i=r<0?Math.max(n+r,0):Math.min(r,n),a=arguments[2],o=a===void 0?n:a>>0,s=o<0?Math.max(n+o,0):Math.min(o,n);i<s;)t[i]=e,i++;return t}),Array.of||r(Array,`of`,function(){return Array.prototype.slice.call(arguments)})}),ace.define(`ace/lib/fixoldbrowsers`,[`require`,`exports`,`module`,`ace/lib/es6-shim`],function(e,t,n){e("./es6-shim")}),ace.define(`ace/lib/deep_copy`,[`require`,`exports`,`module`],function(e,t,n){t.deepCopy=function e(t){if(typeof t!=`object`||!t)return t;var n;if(Array.isArray(t)){n=[];for(var r=0;r<t.length;r++)n[r]=e(t[r]);return n}if(Object.prototype.toString.call(t)!==`[object Object]`)return t;for(var r in n={},t)n[r]=e(t[r]);return n}}),ace.define(`ace/lib/lang`,[`require`,`exports`,`module`,`ace/lib/deep_copy`],function(e,t,n){t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split(``).reverse().join(``)},t.stringRepeat=function(e,t){for(var n=``;t>0;)t&1&&(n+=e),(t>>=1)&&(e+=e);return n};var r=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(r,``)},t.stringTrimRight=function(e){return e.replace(i,``)},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){for(var t=[],n=0,r=e.length;n<r;n++)e[n]&&typeof e[n]==`object`?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=e("./deep_copy").deepCopy,t.arrayToMap=function(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,`\\$1`)},t.escapeHTML=function(e){return(``+e).replace(/&/g,`&`).replace(/"/g,`"`).replace(/'/g,`'`).replace(/</g,`<`)},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,function(e){n.push({offset:arguments[arguments.length-2],length:e.length})}),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},r=function(e){return r.cancel(),t=setTimeout(n,e||0),r};return r.schedule=r,r.call=function(){return this.cancel(),e(),r},r.cancel=function(){return clearTimeout(t),t=null,r},r.isPending=function(){return t},r},t.delayedCall=function(e,t){var n=null,r=function(){n=null,e()},i=function(e){n??=setTimeout(r,e||t)};return i.delay=function(e){n&&clearTimeout(n),n=setTimeout(r,e||t)},i.schedule=i,i.call=function(){this.cancel(),e()},i.cancel=function(){n&&clearTimeout(n),n=null},i.isPending=function(){return n},i},t.sleep=function(e){return new Promise(function(t){setTimeout(t,e)})},t.supportsLookbehind=function(){return!0},t.skipEmptyMatch=function(e,t,n){return n&&e.codePointAt(t)>65535?2:1}}),ace.define(`ace/lib/useragent`,[`require`,`exports`,`module`],function(e,t,n){t.OS={LINUX:`LINUX`,MAC:`MAC`,WINDOWS:`WINDOWS`},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS};var r=typeof navigator==`object`?navigator:{},i=(/mac|win|linux/i.exec(r.platform)||[`other`])[0].toLowerCase(),a=r.userAgent||``,o=r.appName||``;t.isWin=i==`win`,t.isMac=i==`mac`,t.isLinux=i==`linux`,t.isIE=o==`Microsoft Internet Explorer`||o.indexOf(`MSAppHost`)>=0?parseFloat((a.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((a.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=a.match(/ Gecko\/\d+/),t.isOpera=typeof opera==`object`&&Object.prototype.toString.call(window.opera)==`[object Opera]`,t.isWebKit=parseFloat(a.split(`WebKit/`)[1])||void 0,t.isChrome=parseFloat(a.split(` Chrome/`)[1])||void 0,t.isSafari=parseFloat(a.split(` Safari/`)[1])&&!t.isChrome||void 0,t.isEdge=parseFloat(a.split(` Edge/`)[1])||void 0,t.isAIR=a.indexOf(`AdobeAIR`)>=0,t.isAndroid=a.indexOf(`Android`)>=0,t.isChromeOS=a.indexOf(` CrOS `)>=0,t.isIOS=/iPad|iPhone|iPod/.test(a)&&!window.MSStream,t.isIOS&&(t.isMac=!0),t.isMobile=t.isIOS||t.isAndroid}),ace.define(`ace/lib/dom`,[`require`,`exports`,`module`,`ace/lib/useragent`],function(e,t,n){var r=e("./useragent"),i=`http://www.w3.org/1999/xhtml`;t.buildDom=function e(t,n,r){if(typeof t==`string`&&t){var i=document.createTextNode(t);return n&&n.appendChild(i),i}if(!Array.isArray(t))return t&&t.appendChild&&n&&n.appendChild(t),t;if(typeof t[0]!=`string`||!t[0]){for(var a=[],o=0;o<t.length;o++){var s=e(t[o],n,r);s&&a.push(s)}return a}var c=document.createElement(t[0]),l=t[1],u=1;l&&typeof l==`object`&&!Array.isArray(l)&&(u=2);for(var o=u;o<t.length;o++)e(t[o],c,r);return u==2&&Object.keys(l).forEach(function(e){var t=l[e];e===`class`?c.className=Array.isArray(t)?t.join(` `):t:typeof t==`function`||e==`value`||e[0]==`$`?c[e]=t:e===`ref`?r&&(r[t]=c):e===`style`?typeof t==`string`&&(c.style.cssText=t):t!=null&&c.setAttribute(e,t)}),n&&n.appendChild(c),c},t.getDocumentHead=function(e){return e||=document,e.head||e.getElementsByTagName(`head`)[0]||e.documentElement},t.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||i,e):document.createElement(e)},t.removeChildren=function(e){e.innerHTML=``},t.createTextNode=function(e,t){return(t?t.ownerDocument:document).createTextNode(e)},t.createFragment=function(e){return(e?e.ownerDocument:document).createDocumentFragment()},t.hasCssClass=function(e,t){return(e.className+``).split(/\s+/g).indexOf(t)!==-1},t.addCssClass=function(e,n){t.hasCssClass(e,n)||(e.className+=` `+n)},t.removeCssClass=function(e,t){for(var n=e.className.split(/\s+/g);;){var r=n.indexOf(t);if(r==-1)break;n.splice(r,1)}e.className=n.join(` `)},t.toggleCssClass=function(e,t){for(var n=e.className.split(/\s+/g),r=!0;;){var i=n.indexOf(t);if(i==-1)break;r=!1,n.splice(i,1)}return r&&n.push(t),e.className=n.join(` `),r},t.setCssClass=function(e,n,r){r?t.addCssClass(e,n):t.removeCssClass(e,n)},t.hasCssString=function(e,t){var n=0,r;if(t||=document,r=t.querySelectorAll(`style`)){for(;n<r.length;)if(r[n++].id===e)return!0}},t.removeElementById=function(e,t){t||=document,t.getElementById(e)&&t.getElementById(e).remove()};var a,o=[];t.useStrictCSP=function(e){a=e,e==0?s():o||=[]};function s(){var e=o;o=null,e&&e.forEach(function(e){c(e[0],e[1])})}function c(e,n,r){if(!(typeof document>`u`)){if(o){if(r)s();else if(r===!1)return o.push([e,n])}if(!a){var i=r;!r||!r.getRootNode?i=document:(i=r.getRootNode(),(!i||i==r)&&(i=document));var c=i.ownerDocument||i;if(n&&t.hasCssString(n,i))return null;n&&(e+=`
|
|
18
|
+
`+t+`]`}return r.pop(),i=t,c}}}}))})),Ss=r(((e,t)=>{t.exports={}})),Cs=r(((t,n)=>{(function(e,r){typeof t==`object`?n.exports=t=r():typeof define==`function`&&define.amd?define([],r):e.CryptoJS=r()})(t,function(){var t=t||function(t,n){var r;if(typeof window<`u`&&window.crypto&&(r=window.crypto),typeof self<`u`&&self.crypto&&(r=self.crypto),typeof globalThis<`u`&&globalThis.crypto&&(r=globalThis.crypto),!r&&typeof window<`u`&&window.msCrypto&&(r=window.msCrypto),!r&&typeof global<`u`&&global.crypto&&(r=global.crypto),!r&&typeof e==`function`)try{r=Ss()}catch{}var i=function(){if(r){if(typeof r.getRandomValues==`function`)try{return r.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof r.randomBytes==`function`)try{return r.randomBytes(4).readInt32LE()}catch{}}throw Error(`Native crypto module could not be used to get secure random number.`)},a=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),o={},s=o.lib={},c=s.Base=function(){return{extend:function(e){var t=a(this);return e&&t.mixIn(e),(!t.hasOwnProperty(`init`)||this.init===t.init)&&(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty(`toString`)&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),l=s.WordArray=c.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=t==n?e.length*4:t},toString:function(e){return(e||d).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var a=0;a<i;a++){var o=n[a>>>2]>>>24-a%4*8&255;t[r+a>>>2]|=o<<24-(r+a)%4*8}else for(var s=0;s<i;s+=4)t[r+s>>>2]=n[s>>>2];return this.sigBytes+=i,this},clamp:function(){var e=this.words,n=this.sigBytes;e[n>>>2]&=4294967295<<32-n%4*8,e.length=t.ceil(n/4)},clone:function(){var e=c.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push(i());return new l.init(t,e)}}),u=o.enc={},d=u.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var a=t[i>>>2]>>>24-i%4*8&255;r.push((a>>>4).toString(16)),r.push((a&15).toString(16))}return r.join(``)},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new l.init(n,t/2)}},f=u.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var a=t[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(a))}return r.join(``)},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(e.charCodeAt(r)&255)<<24-r%4*8;return new l.init(n,t)}},p=u.Utf8={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch{throw Error(`Malformed UTF-8 data`)}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}},m=s.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new l.init,this._nDataBytes=0},_append:function(e){typeof e==`string`&&(e=p.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(e){var n,r=this._data,i=r.words,a=r.sigBytes,o=this.blockSize,s=a/(o*4);s=e?t.ceil(s):t.max((s|0)-this._minBufferSize,0);var c=s*o,u=t.min(c*4,a);if(c){for(var d=0;d<c;d+=o)this._doProcessBlock(i,d);n=i.splice(0,c),r.sigBytes-=u}return new l.init(n,u)},clone:function(){var e=c.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});s.Hasher=m.extend({cfg:c.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){m.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:512/32,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new h.HMAC.init(e,n).finalize(t)}}});var h=o.algo={};return o}(Math);return t})})),ws=r(((e,t)=>{(function(n,r){typeof e==`object`?t.exports=e=r(Cs()):typeof define==`function`&&define.amd?define([`./core`],r):r(n.CryptoJS)})(e,function(e){return(function(t){var n=e,r=n.lib,i=r.WordArray,a=r.Hasher,o=n.algo,s=[];(function(){for(var e=0;e<64;e++)s[e]=t.abs(t.sin(e+1))*4294967296|0})();var c=o.MD5=a.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360}var a=this._hash.words,o=e[t+0],c=e[t+1],p=e[t+2],m=e[t+3],h=e[t+4],g=e[t+5],_=e[t+6],v=e[t+7],y=e[t+8],b=e[t+9],x=e[t+10],S=e[t+11],C=e[t+12],w=e[t+13],T=e[t+14],E=e[t+15],D=a[0],O=a[1],k=a[2],A=a[3];D=l(D,O,k,A,o,7,s[0]),A=l(A,D,O,k,c,12,s[1]),k=l(k,A,D,O,p,17,s[2]),O=l(O,k,A,D,m,22,s[3]),D=l(D,O,k,A,h,7,s[4]),A=l(A,D,O,k,g,12,s[5]),k=l(k,A,D,O,_,17,s[6]),O=l(O,k,A,D,v,22,s[7]),D=l(D,O,k,A,y,7,s[8]),A=l(A,D,O,k,b,12,s[9]),k=l(k,A,D,O,x,17,s[10]),O=l(O,k,A,D,S,22,s[11]),D=l(D,O,k,A,C,7,s[12]),A=l(A,D,O,k,w,12,s[13]),k=l(k,A,D,O,T,17,s[14]),O=l(O,k,A,D,E,22,s[15]),D=u(D,O,k,A,c,5,s[16]),A=u(A,D,O,k,_,9,s[17]),k=u(k,A,D,O,S,14,s[18]),O=u(O,k,A,D,o,20,s[19]),D=u(D,O,k,A,g,5,s[20]),A=u(A,D,O,k,x,9,s[21]),k=u(k,A,D,O,E,14,s[22]),O=u(O,k,A,D,h,20,s[23]),D=u(D,O,k,A,b,5,s[24]),A=u(A,D,O,k,T,9,s[25]),k=u(k,A,D,O,m,14,s[26]),O=u(O,k,A,D,y,20,s[27]),D=u(D,O,k,A,w,5,s[28]),A=u(A,D,O,k,p,9,s[29]),k=u(k,A,D,O,v,14,s[30]),O=u(O,k,A,D,C,20,s[31]),D=d(D,O,k,A,g,4,s[32]),A=d(A,D,O,k,y,11,s[33]),k=d(k,A,D,O,S,16,s[34]),O=d(O,k,A,D,T,23,s[35]),D=d(D,O,k,A,c,4,s[36]),A=d(A,D,O,k,h,11,s[37]),k=d(k,A,D,O,v,16,s[38]),O=d(O,k,A,D,x,23,s[39]),D=d(D,O,k,A,w,4,s[40]),A=d(A,D,O,k,o,11,s[41]),k=d(k,A,D,O,m,16,s[42]),O=d(O,k,A,D,_,23,s[43]),D=d(D,O,k,A,b,4,s[44]),A=d(A,D,O,k,C,11,s[45]),k=d(k,A,D,O,E,16,s[46]),O=d(O,k,A,D,p,23,s[47]),D=f(D,O,k,A,o,6,s[48]),A=f(A,D,O,k,v,10,s[49]),k=f(k,A,D,O,T,15,s[50]),O=f(O,k,A,D,g,21,s[51]),D=f(D,O,k,A,C,6,s[52]),A=f(A,D,O,k,m,10,s[53]),k=f(k,A,D,O,x,15,s[54]),O=f(O,k,A,D,c,21,s[55]),D=f(D,O,k,A,y,6,s[56]),A=f(A,D,O,k,E,10,s[57]),k=f(k,A,D,O,_,15,s[58]),O=f(O,k,A,D,w,21,s[59]),D=f(D,O,k,A,h,6,s[60]),A=f(A,D,O,k,S,10,s[61]),k=f(k,A,D,O,p,15,s[62]),O=f(O,k,A,D,b,21,s[63]),a[0]=a[0]+D|0,a[1]=a[1]+O|0,a[2]=a[2]+k|0,a[3]=a[3]+A|0},_doFinalize:function(){var e=this._data,n=e.words,r=this._nDataBytes*8,i=e.sigBytes*8;n[i>>>5]|=128<<24-i%32;var a=t.floor(r/4294967296),o=r;n[(i+64>>>9<<4)+15]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360,n[(i+64>>>9<<4)+14]=(o<<8|o>>>24)&16711935|(o<<24|o>>>8)&4278255360,e.sigBytes=(n.length+1)*4,this._process();for(var s=this._hash,c=s.words,l=0;l<4;l++){var u=c[l];c[l]=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360}return s},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function l(e,t,n,r,i,a,o){var s=e+(t&n|~t&r)+i+o;return(s<<a|s>>>32-a)+t}function u(e,t,n,r,i,a,o){var s=e+(t&r|n&~r)+i+o;return(s<<a|s>>>32-a)+t}function d(e,t,n,r,i,a,o){var s=e+(t^n^r)+i+o;return(s<<a|s>>>32-a)+t}function f(e,t,n,r,i,a,o){var s=e+(n^(t|~r))+i+o;return(s<<a|s>>>32-a)+t}n.MD5=a._createHelper(c),n.HmacMD5=a._createHmacHelper(c)})(Math),e.MD5})}));pe();var Ts=n(xs()),Es=n(ws());g();var Ds=window.innerWidth<=600?12:void 0,Os={add:()=>_.createElement(re,null),auth:()=>_.createElement(Ht,null),backlight:()=>_.createElement(Ue,null),book:()=>_.createElement(Ft,null),delete:()=>_.createElement(me,null),dimmer:()=>_.createElement(k,null),edit:()=>_.createElement(Ke,null),error:()=>_.createElement(ur,null),group:()=>_.createElement(pt,null),help:()=>_.createElement(yt,null),identify:()=>_.createElement(Mn,null),info:()=>_.createElement(E,null),light:()=>_.createElement(Cn,null),lines:()=>_.createElement($e,null),next:()=>_.createElement(Re,null),open:()=>_.createElement(jn,null),pair:()=>_.createElement(Rn,null),pause:()=>_.createElement(yn,null),play:()=>_.createElement(Xt,null),previous:()=>_.createElement(fn,null),qrcode:()=>_.createElement(jt,null),refresh:()=>_.createElement(ar,null),save:()=>_.createElement(te,null),search:()=>_.createElement(tr,null),send:()=>_.createElement(rt,null),settings:()=>_.createElement(V,null),socket:()=>_.createElement(wt,null),stop:()=>_.createElement(M,null),unpair:()=>_.createElement(an,null),upload:()=>_.createElement(nr,null),user:()=>_.createElement(en,null),warning:()=>_.createElement(et,null),web:()=>_.createElement(Qn,null)};function ks(e){return Object.prototype.toString.call(e)===`[object Object]`}var X=class e extends s{constructor(t){super(t),K(this,`defaultValue`,void 0),K(this,`isError`,void 0),K(this,`lang`,void 0),K(this,`defaultSendToDone`,void 0),K(this,`sendToTimeout`,void 0),K(this,`noPlaceRequired`,void 0),K(this,`reportedHidden`,!1),K(this,`calculateTimeout`,null),K(this,`AsyncFunction`,void 0),K(this,`onUpdate`,t=>{let n=e.getValue(t||this.props.data,this.props.attr)||``;this.state.value===n?this.forceUpdate():this.setState({value:n})}),K(this,`getObject`,async e=>{try{var t,n;return await((t=(n=this.props.oContext).getCachedObject)==null?void 0:t.call(n,e))||null}catch(e){return console.error(e),null}}),this.AsyncFunction=Object.getPrototypeOf(async function(){}).constructor,this.state={confirmDialog:!1,confirmNewValue:null,confirmAttr:null,confirmData:null,confirmCallback:null},this.isError={},this.lang=J.getLanguage(),t.schema&&(t.custom?t.schema.defaultFunc||(this.defaultValue=t.schema.default):t.schema.type!==`state`&&!t.schema.defaultFunc&&(this.defaultValue=t.schema.default))}async getCachedObject(e){return this.props.oContext.getCachedObject?this.props.oContext.getCachedObject(e):await this.props.oContext.socket.getObject(e)||null}async componentDidMount(){var t;if((t=this.props.schema)!=null&&t.defaultFunc&&(this.props.custom?this.defaultValue=await this.executeCustom(this.props.schema.defaultFunc,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData,`defaultFunc`):this.props.schema.type!==`state`&&(this.defaultValue=await this.execute(this.props.schema.defaultFunc,this.props.schema.default,this.props.data,this.props.arrayIndex,this.props.globalData,`defaultFunc`))),this.props.attr){var n,r;(n=(r=this.props.oContext).registerOnForceUpdate)==null||n.call(r,this.props.attr,this.onUpdate)}let i=[`select`,`autocomplete`,`autocompleteSendTo`];if(this.defaultValue!==void 0&&this.props.attr){let t=e.getValue(this.props.data,this.props.attr);(t===void 0||i.includes(this.props.schema.type)&&(t===``||t===null))&&setTimeout(()=>{this.props.attr&&(this.props.custom?this.props.onChange(this.props.attr,this.defaultValue,()=>setTimeout(()=>this.props.attr&&this.props.oContext.forceUpdate([this.props.attr],this.props.data),100)):(e.setValue(this.props.data,this.props.attr,this.defaultValue),this.props.onChange(this.props.data,void 0,()=>this.props.attr&&this.props.oContext.forceUpdate([this.props.attr],this.props.data))))},100)}else this.props.schema.defaultSendTo&&this.defaultSendTo().catch(e=>console.error(e))}async defaultSendTo(){if(this.props.alive&&this.props.schema.defaultSendTo){this.defaultSendToDone=!0;let t=this.props.schema.data;if(t===void 0&&this.props.schema.jsonData){let e=await this.getPatternAsync(this.props.schema.jsonData,null,!0);try{t=JSON.parse(e)}catch{console.error(`Cannot parse json data: ${e}`)}}else t={attr:this.props.attr,value:e.getValue(this.props.data,this.props.attr)};t===void 0&&(t=null);let n=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(n!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){let e=await this.props.oContext.socket.getState(`system.adapter.${n}.alive`);if(!(e!=null&&e.val)){window.alert(J.t(`jc_Instance %s is not alive`,n));return}}try{let r=await this.props.oContext.socket.sendTo(n,this.props.schema.defaultSendTo,t);r!=null&&this.props.attr&&(this.props.custom?this.props.onChange(this.props.attr,r,()=>this.props.attr&&this.props.oContext.forceUpdate([this.props.attr],this.props.data)):(e.setValue(this.props.data,this.props.attr,r),this.props.onChange(this.props.data,void 0,()=>this.props.attr&&this.props.oContext.forceUpdate([this.props.attr],this.props.data))))}catch(e){console.error(e)}}else this.defaultSendToDone=!1,this.props.schema.allowSaveWithError||this.onError(this.props.attr,J.t(`jc_Instance %s is not alive`,this.props.oContext.instance.toString()))}componentWillUnmount(){if(this.props.attr){var e,t;(e=(t=this.props.oContext).registerOnForceUpdate)==null||e.call(t,this.props.attr)}this.sendToTimeout&&=(clearTimeout(this.sendToTimeout),null),this.calculateTimeout&&=(clearTimeout(this.calculateTimeout),null)}static getValue(t,n){if(!n)return;if(typeof n==`string`)return e.getValue(t,n.split(`.`));if(n.length===1)return t[n[0]];let r=n.shift();if(typeof r==`string`&&typeof t[r]==`object`)return e.getValue(t[r],n)}static setValue(t,n,r){if(n){if(typeof n==`string`){e.setValue(t,n.split(`.`),r);return}if(n.length===1)r===null?delete t[n[0]]:t[n[0]]=r;else{let i=n.shift();if(typeof i!=`string`)return;(!t[i]||typeof t[i]==`object`)&&(t[i]=t[i]||{}),e.setValue(t[i],n,r)}}}getText(e,t){if(!e)return``;if(typeof e==`string`){let n=t?e:J.t(e);return n.includes("${")?this.getPattern(n,void 0,t):n}if(e&&typeof e==`object`){let n=e;return n.func?typeof n.func==`object`?this.getPattern(n.func[this.lang]||n.func.en||``,void 0,!0):this.getPattern(n.func,void 0,t):e[this.lang]||e.en||``}return e.toString()}async getTextAsync(e,t){if(!e)return``;if(typeof e==`string`){let n=t?e:J.t(e);return n.includes("${")?this.getPatternAsync(n,null,t):n}return ks(e)?e.func?typeof e.func==`object`?this.getPatternAsync(e.func[this.lang]||e.func.en||``,null,!0):this.getPatternAsync(e.func,null,t):e[this.lang]||e.en||``:e.toString()}renderDialogConfirm(){if(!this.state.confirmDialog)return null;let t=this.state.confirmData||this.props.schema.confirm;if(!t)return null;let n=null;return t.type===`warning`?n=_.createElement(et,null):t.type===`error`?n=_.createElement(ur,null):t.type===`info`&&(n=_.createElement(E,null)),_.createElement(bn,{title:this.getText(t.title)||J.t(`jc_Please confirm`),text:this.getText(t.text),ok:this.getText(t.ok)||J.t(`jc_Ok`),cancel:this.getText(t.cancel)||J.t(`jc_Cancel`),icon:n||void 0,onClose:t=>this.setState({confirmDialog:!1},()=>{if(t){if(this.state.confirmCallback){let e=this.state.confirmCallback;this.setState({confirmCallback:null},()=>e(!0));return}let t=JSON.parse(JSON.stringify(this.props.data));this.state.confirmDepAttr&&e.setValue(t,this.state.confirmDepAttr,this.state.confirmDepNewValue),e.setValue(t,this.state.confirmAttr,this.state.confirmNewValue),this.setState({confirmDialog:!1,confirmDepAttr:null,confirmDepNewValue:null,confirmNewValue:null,confirmAttr:null,confirmData:null},()=>this.props.onChange(t))}else{let e=this.state.confirmCallback;this.setState({confirmDialog:!1,confirmDepAttr:null,confirmDepNewValue:null,confirmNewValue:null,confirmAttr:null,confirmData:null,confirmCallback:null},()=>{e&&e(!1)})}})})}getIcon(e){if(e||=this.props.schema.icon,!e)return null;let t=Os[e];return t?t():((e.endsWith(`.png`)||e.endsWith(`.svg`)||e.endsWith(`.jpg`))&&!e.startsWith(`http://`)&&!e.startsWith(`https://`)&&(e=`${this.props.oContext.imagePrefix}/adapter/${this.props.oContext.adapterName}/${e}`),_.createElement(Mt,{src:e,style:{width:22,height:22}}))}onChangeAsync(e,t){return new Promise(n=>{let r=this.onChange(e,t,n);r instanceof Promise&&r.catch(e=>console.error(`Cannot set value: ${e}`))})}async onChange(t,n,r){let i=JSON.parse(JSON.stringify(this.props.data));if(e.setValue(i,t,n),this.props.schema.confirm&&await this.execute(this.props.schema.confirm.condition,!1,i,this.props.arrayIndex,this.props.globalData,`confirm.condition`))return new Promise(e=>{this.setState({confirmDialog:!0,confirmNewValue:n,confirmAttr:t,confirmData:null},()=>{typeof r==`function`?r():e()})});if(this.props.schema.confirmDependsOn)for(let a=0;a<this.props.schema.confirmDependsOn.length;a++){let o=this.props.schema.confirmDependsOn[a];if(o.confirm){let a=e.getValue(i,o.attr);if(await this.execute(o.confirm.condition,!1,i,this.props.arrayIndex,this.props.globalData,`confirm.condition`))return new Promise(e=>{if(!o.confirm)throw Error(`Cannot set value: confirm is not defined for ${o.attr}`);this.setState({confirmDialog:!0,confirmNewValue:n,confirmAttr:t,confirmDepNewValue:a,confirmDepAttr:o.attr,confirmData:o.confirm},()=>{typeof r==`function`?r():e()})})}}let a=[];if(this.props.schema.onChangeDependsOn)for(let t=0;t<this.props.schema.onChangeDependsOn.length;t++){let n=this.props.schema.onChangeDependsOn[t];if(n.onChange){let t=e.getValue(i,n.attr),r;r=this.props.custom?await this.executeCustom(n.onChange.calculateFunc,i,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData,`onChange.calculateFunc`):await this.execute(n.onChange.calculateFunc,t,i,this.props.arrayIndex,this.props.globalData,`onChange.calculateFunc`),r!==t&&n.attr&&(e.setValue(i,n.attr,r),a.push(n.attr))}}if(this.props.schema.hiddenDependsOn)for(let e=0;e<this.props.schema.hiddenDependsOn.length;e++){let t=this.props.schema.hiddenDependsOn[e];t.hidden&&t.attr&&a.push(t.attr)}if(this.props.schema.labelDependsOn)for(let e=0;e<this.props.schema.labelDependsOn.length;e++){let t=this.props.schema.labelDependsOn[e];t.hidden&&t.attr&&a.push(t.attr)}if(this.props.schema.helpDependsOn)for(let e=0;e<this.props.schema.helpDependsOn.length;e++){let t=this.props.schema.helpDependsOn[e];t.hidden&&t.attr&&a.push(t.attr)}if(this.props.schema.onChange&&!this.props.schema.onChange.ignoreOwnChanges){let t=e.getValue(i,this.props.attr),n=this.props.custom?await this.executeCustom(this.props.schema.onChange.calculateFunc,i,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData,`onChange.calculateFunc`):await this.execute(this.props.schema.onChange.calculateFunc,t,i,this.props.arrayIndex,this.props.globalData,`onChange.calculateFunc`);n!==t&&e.setValue(i,this.props.attr,n)}return this.props.custom?(this.props.onChange(t,n,()=>r==null?void 0:r()),a!=null&&a.length&&a.forEach((t,n)=>setTimeout(()=>this.props.onChange(t,e.getValue(i,t)),n*50))):this.props.onChange(i,void 0,()=>{a.length&&this.props.oContext.forceUpdate(a,i),r==null||r()}),Promise.resolve()}static ensureAwaitGetObject(e){return e.replace(/(?<![\w$.])getObject\(/g,(t,n)=>{let r=e.slice(Math.max(0,n-10),n);return/await\s+$/.test(r)?t:`await ${t}`})}debugLog(e,t,n,r){var i,a;if(!((i=this.props.schema)!=null&&i.debug))return;let o=this.props.attr||((a=this.props.schema)==null?void 0:a.attr)||``,s=`%c[jsonConfig]%c ${o?`${o} → `:``}${e}`,c={function:t,result:n,data:r??this.props.data,arrayIndex:this.props.arrayIndex};n instanceof Error?console.error(s,`background:#b71c1c;color:#fff;border-radius:3px;padding:1px 4px`,`color:#e53935`,c):console.log(s,`background:#33691e;color:#fff;border-radius:3px;padding:1px 4px`,`color:#7cb342`,c)}async execute(t,n,r,i,a,o){let s;if(ks(t))s=t.func;else if(typeof t==`string`)s=t;else return t;if(!s)return n;s.includes(`getObject(`)&&(s=e.ensureAwaitGetObject(s));try{let e=await new this.AsyncFunction(`data`,`originalData`,`_system`,`_alive`,`_common`,`_socket`,`_instance`,`arrayIndex`,`globalData`,`_changed`,`_href`,`getObject`,s.includes(`return`)?s:`return ${s}`)(r||this.props.data||{},this.props.originalData,this.props.oContext.systemConfig,this.props.alive,this.props.common,this.props.oContext.socket,this.props.oContext.instance,i,a||{},this.props.changed,window.location.href,this.getObject);return this.debugLog(o||`JS function`,s,e,r),e}catch(e){return this.debugLog(o||`JS function`,s,e instanceof Error?e:Error(String(e)),r),console.error(`Cannot execute ${JSON.stringify(t)}: ${e}`),n}}async executeCustom(t,n,r,i,a,o,s){let c;if(ks(t))c=t.func;else if(typeof t==`string`)c=t;else return t;if(!c)return null;c.includes(`getObject(`)&&(c=e.ensureAwaitGetObject(c));try{let e=await new this.AsyncFunction(`data`,`originalData`,`_system`,`instanceObj`,`customObj`,`_socket`,`arrayIndex`,`globalData`,`_changed`,`_href`,`getObject`,c.includes(`return`)?c:`return ${c}`)(n||this.props.data,this.props.originalData,this.props.oContext.systemConfig,i||{},r||{},this.props.oContext.socket,a,o||{},this.props.changed,window.location.href,this.getObject);return this.debugLog(s||`JS function`,c,e,n),e}catch(e){return this.debugLog(s||`JS function`,c,e instanceof Error?e:Error(String(e)),n),console.error(`Cannot execute ${c}: ${e}`),null}}async calculate(e){let t,n,r,i;return this.props.custom?(t=e.validator?!await this.executeCustom(e.validator,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData,`validator`):!1,n=e.disabled===!0?!0:e.disabled?await this.executeCustom(e.disabled,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData,`disabled`):!1,r=e.hidden===!0?!0:e.hidden?await this.executeCustom(e.hidden,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData,`hidden`):!1,i=e.defaultFunc?await this.executeCustom(e.defaultFunc,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData,`defaultFunc`):e.default):(t=e.validator?!await this.execute(e.validator,!1,this.props.data,this.props.arrayIndex,this.props.globalData,`validator`):!1,n=e.disabled===!0?!0:e.disabled?await this.execute(e.disabled,!1,this.props.data,this.props.arrayIndex,this.props.globalData,`disabled`):!1,r=e.hidden===!0?!0:e.hidden?await this.execute(e.hidden,!1,this.props.data,this.props.arrayIndex,this.props.globalData,`hidden`):!1,i=e.defaultFunc?await this.execute(e.defaultFunc,e.default,this.props.data,this.props.arrayIndex,this.props.globalData,`defaultFunc`):e.default),{error:t,disabled:n,hidden:r,defaultValue:i}}onError(e,t){var n,r;e&&(t?this.isError[e]=t:delete this.isError[e]),(n=(r=this.props).onError)==null||n.call(r,e,t)}renderItem(e,t,n){return this.getText(this.props.schema.label)||this.getText(this.props.schema.text)}renderHelp(e,t,n){return t?_.createElement(`a`,{href:t,target:`_blank`,rel:`noreferrer`,style:{color:this.props.oContext.themeType===`dark`?`#a147ff`:`#5b238f`,textDecoration:`underline`}},this.getText(e,n)):(e=this.getText(e,n)||``,e&&(e.includes(`<a `)||e.includes(`<br`)||e.includes(`<b>`)||e.includes(`<i>`))?Zt.renderTextWithA(e):e)}async renderHelpAsync(e,t,n){return t?_.createElement(`a`,{href:t,target:`_blank`,rel:`noreferrer`,style:{color:this.props.oContext.themeType===`dark`?`#a147ff`:`#5b238f`,textDecoration:`underline`}},await this.getTextAsync(e,n)):(e=await this.getTextAsync(e,n)||``,e&&(e.includes(`<a `)||e.includes(`<br`)||e.includes(`<b>`)||e.includes(`<i>`))?Zt.renderTextWithA(e):e)}static escapeString(t,n){return typeof t==`string`?(t=t.replace(/`/g,"\\`"),t=t.replace(/\${([^}]+)}/g,(t,r)=>{if(r&&typeof r==`string`&&r.startsWith(`data.`)){let t=e.getValue(n,r.replace(/^data\./,``));if(typeof t==`string`&&(t.includes(`\\`)||t.includes(`"`)))return`\${${r}.replace(/\\\\/g, '\\\\\\\\').replace(/"/g, '\\\\"')}`}return t}),t):``}async getPatternAsync(t,n,r){if(n||=this.props.data,!t)return``;let i;typeof t==`object`?t.func?i=t.func:(console.log(`Object must be stringified: ${JSON.stringify(t)}`),i=JSON.stringify(t)):i=t,i.includes(`getObject(`)&&(i=e.ensureAwaitGetObject(i));try{if(this.props.custom){let t=await new this.AsyncFunction(`data`,`originalData`,`arrayIndex`,`globalData`,`_system`,`instanceObj`,`customObj`,`_socket`,`_changed`,`_href`,`getObject`,`return \`${e.escapeString(i,n)}\``)(n,this.props.originalData,this.props.arrayIndex,this.props.globalData,this.props.oContext.systemConfig,this.props.oContext.instanceObj,this.props.customObj,this.props.oContext.socket,this.props.changed,window.location.href,this.getObject);return r?t:J.t(t)}let t=await new this.AsyncFunction(`data`,`originalData`,`arrayIndex`,`globalData`,`_system`,`_alive`,`_common`,`_socket`,`_changed`,`_href`,`getObject`,`return \`${e.escapeString(i,n)}\``)(n,this.props.originalData,this.props.arrayIndex,this.props.globalData,this.props.oContext.systemConfig,this.props.alive,this.props.common,this.props.oContext.socket,this.props.changed,window.location.href,this.getObject);return r?t:J.t(t)}catch(e){return console.error(`Cannot execute ${i}: ${e}`),i}}getPattern(t,n,r){if(n||=this.props.data,!t)return``;let i;typeof t==`object`?t.func?i=t.func:(console.log(`Object must be stringified: ${JSON.stringify(t)}`),i=JSON.stringify(t)):i=t,i.includes(`getObject(`)&&console.warn(`It is not possible to use getObject function in text patterns: ${i}`);try{if(this.props.custom){let t=Function(`data`,`originalData`,`arrayIndex`,`globalData`,`_system`,`instanceObj`,`customObj`,`_socket`,`_changed`,`_href`,`return \`${e.escapeString(i,n)}\``)(n,this.props.originalData,this.props.arrayIndex,this.props.globalData,this.props.oContext.systemConfig,this.props.oContext.instanceObj,this.props.customObj,this.props.oContext.socket,this.props.changed,window.location.href,this.getObject);return r?t:J.t(t)}let t=Function(`data`,`originalData`,`arrayIndex`,`globalData`,`_system`,`_alive`,`_common`,`_socket`,`_changed`,`_href`,`return \`${e.escapeString(i,n)}\``)(n,this.props.originalData,this.props.arrayIndex,this.props.globalData,this.props.oContext.systemConfig,this.props.alive,this.props.common,this.props.oContext.socket,this.props.changed,window.location.href);return r?t:J.t(t)}catch(e){return console.error(`Cannot execute ${i}: ${e}`),i}}updateCalculatedValues(){this.calculateTimeout&&clearTimeout(this.calculateTimeout),this.calculateTimeout=setTimeout(async()=>{this.calculateTimeout=null;let e=this.props.schema;if(!e)return;let{error:t,disabled:n,hidden:r,defaultValue:i}=await this.calculate(e);(!this.state.calculatedValues||this.state.calculatedValues.error!==t||this.state.calculatedValues.disabled!==n||this.state.calculatedValues.hidden!==r||this.state.calculatedValues.defaultValue!==i)&&this.setState({calculatedValues:{error:t,disabled:n,hidden:r,defaultValue:i}})},50)}render(){let e=this.props.schema;if(!e||this.props.expertMode===!1&&e.expertMode||(this.props.alive&&this.defaultSendToDone===!1&&(this.sendToTimeout=setTimeout(async()=>{this.sendToTimeout=null,await this.defaultSendTo()},200)),this.updateCalculatedValues(),!this.state.calculatedValues))return null;if(this.state.calculatedValues.hidden){if(Object.keys(this.isError).length&&(setTimeout(e=>Object.keys(e).forEach(e=>this.props.onError(e)),100,JSON.parse(JSON.stringify(this.isError))),this.isError={}),e.hideOnlyControl){let t=_.createElement(Jt,{size:{xs:e.xs||Ds,sm:e.sm||void 0,md:e.md||void 0,lg:e.lg||void 0,xl:e.xl||void 0},style:{marginBottom:0,textAlign:`left`,...e.style,...this.props.oContext.themeType===`dark`?e.darkStyle:{}}});return e.newLine?_.createElement(_.Fragment,null,_.createElement(`div`,{style:{flexBasis:`100%`,height:0}}),t):t}return this.props.onHiddenChanged&&!this.reportedHidden&&(this.reportedHidden=!0,setTimeout(()=>{var e,t;return this.props.attr&&((e=(t=this.props).onHiddenChanged)==null?void 0:e.call(t,this.props.attr,!0))},10)),null}this.props.onHiddenChanged&&this.reportedHidden&&(this.reportedHidden=!1,setTimeout(()=>{var e,t;return this.props.attr&&((e=(t=this.props).onHiddenChanged)==null?void 0:e.call(t,this.props.attr,!1))},10)),e.validatorNoSaveOnError&&this.props.attr&&(this.state.calculatedValues.error&&!Object.keys(this.isError).length?(this.isError={[this.props.attr]:!e.validatorErrorText||J.t(e.validatorErrorText)},setTimeout(e=>Object.keys(e).forEach(t=>this.props.onError(t,e[t])),100,JSON.parse(JSON.stringify(this.isError)))):!this.state.calculatedValues.error&&Object.keys(this.isError).length&&(setTimeout(e=>Object.keys(e).forEach(e=>this.props.onError(e)),100,JSON.parse(JSON.stringify(this.isError))),this.isError={}));let t=this.renderItem(this.state.calculatedValues.error,this.state.calculatedValues.disabled||this.props.commandRunning||this.props.disabled||!1,this.state.calculatedValues.defaultValue);if(this.noPlaceRequired)return t;let n=_.createElement(Jt,{title:this.getText(e.tooltip),size:{xs:e.xs||12,sm:e.sm||void 0,md:e.md||void 0,lg:e.lg||void 0,xl:e.xl||void 0},style:{marginBottom:0,textAlign:`left`,width:e.type===`divider`||e.type===`header`?e.width||`100%`:void 0,...e.style,...this.props.oContext.themeType===`dark`?e.darkStyle:{}}},this.props.schema.defaultSendTo&&this.props.schema.button?_.createElement(Jt,{container:!0,style:{width:`100%`}},_.createElement(Jt,{sx:{flex:1}},t),_.createElement(Jt,null,_.createElement(xt,{disabled:this.state.calculatedValues.disabled,variant:`outlined`,onClick:()=>this.defaultSendTo(),title:this.props.schema.buttonTooltip?this.getText(this.props.schema.buttonTooltip,this.props.schema.buttonTooltipNoTranslation):J.t(`jc_Request data by instance`)},this.getText(this.props.schema.button)))):t);return e.newLine?_.createElement(_.Fragment,null,_.createElement(`div`,{style:{flexBasis:`100%`,height:0}}),this.renderDialogConfirm(),n):this.state.confirmDialog?_.createElement(_.Fragment,null,this.renderDialogConfirm(),n):n}};K(X,`DIFFERENT_VALUE`,`__different__`),K(X,`DIFFERENT_LABEL`,`jc___different__`),K(X,`NONE_VALUE`,``),K(X,`NONE_LABEL`,`jc_none`),g();var As={fullWidth:{width:`100%`},accordionSummary:e=>({backgroundColor:e.palette.mode===`dark`?`rgba(255, 255, 255, 0.08)`:`rgba(0, 0, 0, 0.08)`}),accordionTitle:{},toolbar:e=>({backgroundColor:e.palette.mode===`dark`?`rgba(255, 255, 255, 0.08)`:`rgba(0, 0, 0, 0.08)`,borderRadius:`3px`}),tooltip:{pointerEvents:`none`}},js=class extends X{constructor(e){super(e),K(this,`typingTimer`,null),K(this,`onAccordionError`,e=>(t,n)=>{let r={...this.state.accordionErrors};r[e]||(r[e]={}),t&&(n?r[e][t]=n:(delete r[e][t],Object.keys(r[e]).length===0&&delete r[e])),this.setState({accordionErrors:r}),this.props.onError(t,n)}),K(this,`hasAccordionErrors`,e=>!!this.state.accordionErrors[e]&&Object.keys(this.state.accordionErrors[e]).length>0),K(this,`onDelete`,e=>()=>{let t=JSON.parse(JSON.stringify(this.state.value));t.splice(e,1),this.setState({value:t,iteration:this.state.iteration+1e4},()=>this.onChangeWrapper(t))}),K(this,`onClone`,e=>()=>{let t=JSON.parse(JSON.stringify(this.state.value)),n=JSON.parse(JSON.stringify(t[e]));if(typeof this.props.schema.clone==`string`&&typeof n[this.props.schema.clone]==`string`){let e=1,r=n[this.props.schema.clone],i=r.match(/(\d+)$/);for(i?(r=r.replace(i[0],``),e=parseInt(i[0],10)+1):r+=`_`;t.find(t=>t[this.props.schema.clone]===r+e.toString());)e++;n[this.props.schema.clone]=`${n[this.props.schema.clone]}_${e}`}t.splice(e,0,n),this.setState({value:t,activeIndex:-1,iteration:this.state.iteration+1e4},()=>this.onChangeWrapper(t))}),K(this,`onChangeWrapper`,e=>{this.typingTimer&&clearTimeout(this.typingTimer),this.typingTimer=setTimeout(e=>{if(this.typingTimer=null,this.props.attr){let t=this.onChange(this.props.attr,e);t instanceof Promise&&t.catch(e=>this.onError(e))}},300,e)}),K(this,`onAdd`,async()=>{let{schema:e}=this.props,t=JSON.parse(JSON.stringify(this.state.value)),n={};if(e.items)for(let r of e.items){let e;e=r.defaultFunc?this.props.custom?r.defaultFunc?await this.executeCustom(r.defaultFunc,this.props.data,this.props.customObj,this.props.oContext.instanceObj,t.length,this.props.data):this.props.schema.default:r.defaultFunc?await this.execute(r.defaultFunc,this.props.schema.default,this.props.data,t.length,this.props.data):this.props.schema.default:r.default??null,r.attr&&(n[r.attr]=e)}t.push(n),this.setState({value:t,activeIndex:t.length-1},()=>this.onChangeWrapper(t))}),K(this,`onExport`,()=>{let{value:e}=this.state,t=JSON.stringify(e,null,2),n=`data:application/json;charset=utf-8,${encodeURIComponent(t)}`,r=`config_section_${new Date().toISOString().slice(0,19).replace(/:/g,`-`)}.json`,i=document.createElement(`a`);i.setAttribute(`href`,n),i.setAttribute(`download`,r),i.click()}),K(this,`onImport`,e=>{let t=document.createElement(`input`);t.type=`file`,t.accept=`.json`,t.onchange=t=>{var n;let r=(n=t.target.files)==null?void 0:n[0];if(!r)return;let i=new FileReader;i.onload=t=>{try{var n;let r=JSON.parse((n=t.target)==null?void 0:n.result);if(!Array.isArray(r)){alert(J.t(`jc_Invalid JSON format. Expected an array.`));return}let i;i=e?r:[...this.state.value,...r],this.setState({value:i,activeIndex:-1},()=>this.onChangeWrapper(i))}catch{alert(J.t(`jc_Invalid JSON file.`))}},i.readAsText(r)},t.click()}),this.props.schema.items||=[]}async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr)||[];Array.isArray(e)||(e=[]),this.setState({value:e,activeIndex:-1,iteration:0,accordionErrors:{}})}componentWillUnmount(){this.typingTimer&&=(clearTimeout(this.typingTimer),null),super.componentWillUnmount()}itemAccordion(e,t){let{value:n}=this.state,{schema:r}=this.props,i={type:`panel`,items:r.items.reduce((e,t)=>(t.attr&&(e[t.attr]=t),e),{}),style:{marginLeft:`-8px`,marginTop:`10px`,marginBottom:`10px`}};return _.createElement(kO,{oContext:this.props.oContext,index:t+this.state.iteration,arrayIndex:t,changed:this.props.changed,expertMode:this.props.expertMode,globalData:this.props.data,common:this.props.common,alive:this.props.alive,themeName:this.props.themeName,data:e,custom:!0,schema:i,originalData:this.props.originalData,onChange:(e,r)=>{if(typeof e==`string`&&e){let i=JSON.parse(JSON.stringify(n));i[t][e]=r,this.setState({value:i},()=>this.onChangeWrapper(i))}},onError:this.onAccordionError(t),onHiddenChanged:this.props.onHiddenChanged,table:this.props.table,customComponents:this.props.customComponents})}onMoveUp(e){let t=JSON.parse(JSON.stringify(this.state.value)),n=t[e];t.splice(e,1),t.splice(e-1,0,n);let r=this.state.activeIndex-1;this.setState({value:t,activeIndex:r,iteration:this.state.iteration+1e4},()=>this.onChangeWrapper(t))}onMoveDown(e){let t=JSON.parse(JSON.stringify(this.state.value)),n=t[e];t.splice(e,1),t.splice(e+1,0,n);let r=this.state.activeIndex+1;this.setState({value:t,activeIndex:r,iteration:this.state.iteration+1e4},()=>this.onChangeWrapper(t))}renderItem(){let{schema:e}=this.props,{value:t}=this.state;return t?_.createElement(A,null,e.label||!e.noDelete?_.createElement(ue,{variant:`dense`},e.label?_.createElement(Pn,{variant:`h6`,id:`tableTitle`,component:`div`},this.getText(e.label)):null,e.noDelete?null:_.createElement(_.Fragment,null,_.createElement(Ce,{title:J.t(`jc_Export configuration section`)},_.createElement(Zn,{size:`small`,color:`primary`,onClick:this.onExport},_.createElement(it,null))),_.createElement(Ce,{title:J.t(`jc_Import and replace configuration section`)},_.createElement(Zn,{size:`small`,color:`primary`,onClick:()=>this.onImport(!0)},_.createElement(ut,null))),_.createElement(Ce,{title:J.t(`jc_Import and add configuration section`)},_.createElement(Zn,{size:`small`,color:`primary`,onClick:()=>this.onImport(!1)},_.createElement(ln,null))),_.createElement(Zn,{size:`small`,color:`primary`,onClick:this.onAdd},_.createElement(re,null)))):null,t.map((n,r)=>_.createElement(Ae,{key:`${n}_${r}`,expanded:this.state.activeIndex===r,onChange:(e,t)=>this.setState({activeIndex:t?r:-1})},_.createElement(pn,{expandIcon:_.createElement(N,null),sx:Zt.getStyle(this.props.oContext.theme,As.fullWidth,As.accordionSummary)},_.createElement(vt,{sx:{display:`flex`,alignItems:`center`,gap:1,width:`100%`}},e.titleAttr&&_.createElement(Pn,{style:As.accordionTitle},n[e.titleAttr]),this.hasAccordionErrors(r)&&_.createElement(ur,{sx:{fontSize:20,color:`error.main`}}))),_.createElement(xn,{style:{...e.style,...this.props.oContext.themeType?e.darkStyle:void 0}},this.itemAccordion(t[r],r),_.createElement(ue,{sx:As.toolbar},r?_.createElement(Ce,{title:J.t(`jc_Move up`),slotProps:{popper:{sx:As.tooltip}}},_.createElement(Zn,{size:`small`,onClick:()=>this.onMoveUp(r)},_.createElement(hn,null))):_.createElement(`div`,{style:As.buttonEmpty}),r<t.length-1?_.createElement(Ce,{title:J.t(`jc_Move down`),slotProps:{popper:{sx:As.tooltip}}},_.createElement(Zn,{size:`small`,onClick:()=>this.onMoveDown(r)},_.createElement(Ot,null))):_.createElement(`div`,{style:As.buttonEmpty}),e.noDelete?null:_.createElement(Ce,{title:J.t(`jc_Delete current row`),slotProps:{popper:{sx:As.tooltip}}},_.createElement(Zn,{size:`small`,onClick:this.onDelete(r)},_.createElement(me,null))),e.clone?_.createElement(Ce,{title:J.t(`jc_Clone current row`),slotProps:{popper:{sx:As.tooltip}}},_.createElement(Zn,{size:`small`,onClick:this.onClone(r)},_.createElement(se,null))):null)))),!e.noDelete&&t.length>0?_.createElement(ue,{variant:`dense`,sx:As.rootTool},_.createElement(Zn,{size:`small`,color:`primary`,onClick:this.onAdd},_.createElement(re,null))):null,e.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null):null}};g();var Ms={root:{width:`100%`},notAlive:{color:`#a30000`}},Ns=class extends X{constructor(...e){super(...e),K(this,`aliveId`,null),K(this,`checkTimeout`,null),K(this,`onAliveChanged`,(e,t)=>{e===this.aliveId&&this.state.alive!==!!(t!=null&&t.val)&&this.setState({alive:!!(t!=null&&t.val)})})}async componentDidMount(){await super.componentDidMount();let e=await this.getInstance();this.aliveId=`${e}.alive`;let t=await this.props.oContext.socket.getState(this.aliveId);this.setState({alive:!!(t!=null&&t.val),instance:e},async()=>{this.aliveId&&await this.props.oContext.socket.subscribeState(this.aliveId,this.onAliveChanged)})}componentWillUnmount(){this.checkTimeout&&=(clearTimeout(this.checkTimeout),null),this.aliveId&&this.props.oContext.socket.unsubscribeState(this.aliveId,this.onAliveChanged)}async getInstance(){let e=this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`;return e.includes("${")&&(e=await this.getPatternAsync(e,null,!0)),e&&!e.startsWith(`system.adapter.`)&&(e=`system.adapter.${e}`),e}checkIfInstanceChanged(){this.checkTimeout&&clearTimeout(this.checkTimeout),this.checkTimeout=setTimeout(async()=>{this.checkTimeout=null;let e=await this.getInstance();e!==this.state.instance&&(e?this.props.oContext.socket.getState(`${e}.alive`).then(t=>this.setState({alive:!!(t&&t.val),instance:e})):this.setState({alive:null,instance:e}))},200)}renderItem(){var e;if(this.checkIfInstanceChanged(),this.state.alive!==!1&&this.state.alive!==!0)return null;let t=(e=this.state.instance)==null?void 0:e.replace(/^system\.adapter\./,``);return _.createElement(`div`,{style:{...Ms.root,...this.state.alive?void 0:Ms.notAlive}},this.state.alive?this.props.schema.textAlive===void 0?J.t(`jc_Instance %s is alive`,t):this.props.schema.textAlive?J.t(this.props.schema.textAlive,t):``:this.props.schema.textNotAlive===void 0?J.t(`jc_Instance %s is not alive`,t):this.props.schema.textNotAlive?J.t(this.props.schema.textNotAlive,t):``)}};g();var Ps=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr),t=this.props.schema.options.map(e=>typeof e==`string`?{label:e,value:e}:JSON.parse(JSON.stringify(e)));if(this.props.onFilterLabelUpdate&&this.props.table&&this.props.attr){let e={};for(let n of t)n.value!==X.DIFFERENT_VALUE&&(e[n.value]=this.getText(n.label));this.props.onFilterLabelUpdate(this.props.attr,e)}Array.isArray(e)?(t.unshift({label:J.t(X.DIFFERENT_LABEL),value:X.DIFFERENT_VALUE}),this.setState({value:X.DIFFERENT_VALUE,selectOptions:t})):this.setState({value:e,selectOptions:t})}renderItem(e,t){if(!this.state.selectOptions)return null;let n,r=JSON.parse(JSON.stringify(this.state.selectOptions));return Array.isArray(this.state.value)||this.state.value===X.DIFFERENT_VALUE?([...this.state.value].filter(e=>!r.find(t=>typeof t==`object`?t.value===e:t===e)).forEach(e=>r.push({label:e.toString(),value:e})),n={label:J.t(X.DIFFERENT_LABEL),value:X.DIFFERENT_VALUE},r.unshift(n)):(n=this.state.value!==null&&this.state.value!==void 0&&r.find(e=>typeof e==`object`?e.value==this.state.value:e==this.state.value),this.state.value!==null&&this.state.value!==void 0&&!n&&this.props.schema.freeSolo&&(n={value:this.state.value,label:this.state.value},r.push(n)),n||=null),_.createElement(un,{fullWidth:!0,freeSolo:!!this.props.schema.freeSolo,value:n,options:r,isOptionEqualToValue:(e,t)=>e.value===(typeof t==`string`?t:t.value),filterOptions:(e,t)=>{let n=t.inputValue.toLowerCase(),r=e.filter(e=>t.inputValue===``||this.getText(e.label??``).toLowerCase().includes(n)||String(e.value??``).toLowerCase().includes(n));return this.props.schema.freeSolo&&t.inputValue!==``&&r.push({label:t.inputValue,value:t.inputValue}),r},onInputChange:e=>{if(!e||!this.props.schema.freeSolo)return;let t=e.target.value;t!==this.state.value&&this.setState({value:t},()=>this.props.attr&&this.onChange(this.props.attr,t))},onChange:(e,t)=>{let n=typeof t==`object`?t?t.value:``:t;n!==this.state.value&&this.setState({value:n},()=>this.props.attr&&this.onChange(this.props.attr,n))},getOptionLabel:e=>typeof e==`object`?this.getText((e==null?void 0:e.label)??``):``,renderInput:n=>_.createElement(ot,{variant:`standard`,...n,error:!!e,placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation),disabled:t})})}};g();var Fs=class extends X{constructor(...e){super(...e),K(this,`initialized`,!1),K(this,`localContext`,void 0)}async askInstance(){let e=X.getValue(this.props.data,this.props.attr),t=this.props.schema.options?this.props.schema.options.map(e=>typeof e==`string`?{label:e,value:e}:JSON.parse(JSON.stringify(e))):[];if(this.props.alive){let n=this.props.schema.data;if(n===void 0&&this.props.schema.jsonData){let e=await this.getPatternAsync(this.props.schema.jsonData,null,!0);try{typeof e==`string`&&(n=JSON.parse(e))}catch{console.error(`Cannot parse json data: ${JSON.stringify(n)}`)}}n===void 0&&(n=null),this.setState({loading:!0});let r=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(r!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){let e=await this.props.oContext.socket.getState(`system.adapter.${r}.alive`);if(!(e!=null&&e.val)){window.alert(J.t(`jc_Instance %s is not alive`,r));return}}this.props.oContext.socket.sendTo(r,this.props.schema.command||`send`,n).then(n=>{n&&Array.isArray(n)&&n.forEach(e=>t.push(typeof e==`string`?{label:e,value:e}:JSON.parse(JSON.stringify(e)))),this.reportFilterLabels(t),Array.isArray(e)?(t.unshift({label:J.t(X.DIFFERENT_LABEL),value:X.DIFFERENT_VALUE}),this.setState({value:X.DIFFERENT_VALUE,selectOptions:t,loading:!1})):this.setState({value:e,selectOptions:t,loading:!1})}).catch(e=>{console.error(`Error in autocompleteSendTo:`,e),this.setState({loading:!1})})}else Array.isArray(e)?(t.unshift({label:J.t(X.DIFFERENT_LABEL),value:X.DIFFERENT_VALUE}),this.reportFilterLabels(t),this.setState({value:X.DIFFERENT_VALUE,selectOptions:t})):(this.reportFilterLabels(t),this.setState({value:e,selectOptions:t}))}reportFilterLabels(e){if(this.props.onFilterLabelUpdate&&this.props.table&&this.props.attr){let t={};for(let n of e)n.value!==X.DIFFERENT_VALUE&&(t[n.value]=n.label);this.props.onFilterLabelUpdate(this.props.attr,t)}}getContext(){let e={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(t=>e[t]=X.getValue(this.props.data,t)),JSON.stringify(e)}renderItem(e,t){if(this.props.alive){let e=this.getContext();(e!==this.localContext||!this.initialized)&&(this.localContext=e,setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}let n,r=this.state.selectOptions?JSON.parse(JSON.stringify(this.state.selectOptions)):[];return Array.isArray(this.state.value)||this.state.value===X.DIFFERENT_LABEL?([...this.state.value].filter(e=>!r.find(t=>t.value===e)).forEach(e=>r.push({label:e.toString(),value:e})),n={label:J.t(X.DIFFERENT_LABEL),value:X.DIFFERENT_VALUE},r.unshift(n)):(n=this.state.value!==null&&this.state.value!==void 0&&r.find(e=>e.value==this.state.value),this.state.value!==null&&this.state.value!==void 0&&!n&&this.props.schema.freeSolo&&(n={value:this.state.value,label:this.state.value},r.push(n)),n||=null),r.length?_.createElement(un,{value:n,fullWidth:!0,freeSolo:!!this.props.schema.freeSolo,options:r,disabled:t,isOptionEqualToValue:(e,t)=>e.value===(typeof t==`string`?t:t.value),filterOptions:(e,t)=>{let n=t.inputValue.toLowerCase(),r=e.filter(e=>t.inputValue===``||String(e.label??``).toLowerCase().includes(n)||String(e.value??``).toLowerCase().includes(n));return this.props.schema.freeSolo&&t.inputValue!==``&&r.push({label:t.inputValue,value:t.inputValue}),r},getOptionLabel:e=>this.getText(typeof e==`object`?(e==null?void 0:e.label)??``:e),onInputChange:e=>{if(!e||!this.props.schema.freeSolo)return;let t=e.target.value;t!==this.state.value&&this.setState({value:t},()=>this.props.attr&&this.onChange(this.props.attr,t))},onChange:(e,t)=>{let n=typeof t==`object`?t?t.value:``:t;n!==this.state.value&&this.setState({value:n},()=>this.props.attr&&this.onChange(this.props.attr,n))},renderInput:n=>_.createElement(ot,{variant:`standard`,...n,error:!!e,placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation),disabled:t,slotProps:{...n.slotProps,input:{...n.slotProps.input,endAdornment:_.createElement(_.Fragment,null,this.state.loading?_.createElement(At,{position:`end`},_.createElement(Wn,{size:20})):null,t?null:n.slotProps.input.endAdornment)}}})}):_.createElement(ot,{variant:`standard`,fullWidth:!0,value:this.state.value??``,error:!!e,disabled:t,slotProps:{htmlInput:{maxLength:this.props.schema.maxLength||this.props.schema.max||void 0},input:{endAdornment:this.state.loading?_.createElement(At,{position:`end`},_.createElement(Wn,{size:20})):null}},onChange:e=>{let t=e.target.value;this.setState({value:t},()=>this.props.attr&&this.onChange(this.props.attr,(t||``).trim()))},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}};g();var Is={fullWidth:{width:`100%`},flex:{display:`flex`},button:{height:48,marginLeft:4,minWidth:48}},Ls=class extends X{async componentDidMount(){await super.componentDidMount();let{data:e,attr:t}=this.props,n=X.getValue(e,t)||``;this.setState({value:n,showDialog:!1})}renderItem(e,t){let{schema:n,attr:r}=this.props,{value:i,showDialog:a}=this.state;return _.createElement(Wt,{style:Is.fullWidth,variant:`standard`},n.label?_.createElement(rr,{shrink:!0},this.getText(n.label)):null,_.createElement(`div`,{style:Is.flex},_.createElement(ot,{variant:`standard`,fullWidth:!0,value:i??``,error:!!e,disabled:t,placeholder:this.getText(n.placeholder),label:this.getText(n.label),helperText:this.renderHelp(n.help,n.helpLink,n.noTranslation),onChange:e=>{let t=e.target.value;this.setState({value:t},()=>this.onChange(r,t))}}),_.createElement(xt,{color:`grey`,disabled:t,style:Is.button,size:`small`,variant:`outlined`,onClick:()=>this.setState({showDialog:!0})},`...`)),a?_.createElement(Fn,{title:J.t(`jc_Define schedule`),simple:n.simple,complex:n.complex,cron:i,onClose:()=>this.setState({showDialog:!1}),cancel:J.t(`jc_Cancel`),ok:J.t(`jc_Ok`),theme:this.props.oContext.theme,onOk:e=>this.setState({showDialog:!1,value:e},()=>this.onChange(r,e))}):null)}};g();var Rs=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr),t=(await this.props.oContext.socket.getCertificates()).filter(e=>{let t=this.props.attr.toLowerCase();return t.includes(e.type)||e.type===`public`&&t.includes(`cert`)||e.type===`private`&&(t.includes(`priv`)||t.includes(`key`))?!0:!!(e.type===`chained`&&(t.includes(`chain`)||t.includes(`ca`)))}).map(e=>({label:e.name,value:e.name}));t.unshift({label:J.t(X.NONE_LABEL),value:X.NONE_VALUE}),this.setState({value:e,selectOptions:t})}renderItem(e,t){var n,r;if(!this.state.selectOptions)return null;let i=(n=this.state.selectOptions)==null?void 0:n.find(e=>e.value===this.state.value);return _.createElement(Wt,{style:{width:`100%`},variant:`standard`},this.props.schema.label?_.createElement(rr,{shrink:!0},this.getText(this.props.schema.label)):null,_.createElement(Me,{variant:`standard`,error:!!e,displayEmpty:!0,disabled:!!t,value:this.state.value,renderValue:()=>this.getText(i==null?void 0:i.label,this.props.schema.noTranslation!==!1),onChange:e=>this.setState({value:e.target.value},()=>this.onChange(this.props.attr,this.state.value))},(r=this.state.selectOptions)==null?void 0:r.map(e=>_.createElement(z,{key:e.value,value:e.value,style:e.value===X.NONE_VALUE?{opacity:.5}:{}},this.getText(e.label,this.props.schema.noTranslation!==!1)))),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var zs={fullWidth:{width:`100%`},leWidth:{width:620,marginBottom:10},certWidth:{width:200,marginRight:10}},Bs=class extends X{async componentDidMount(){var e;await super.componentDidMount();let t=await this.props.oContext.socket.getCertificates(),n=[],r=[],i=[],a,o=await this.getCachedObject(`system.certificates`);a=o!=null&&(e=o.native)!=null&&e.collections?Object.keys(o.native.collections):null,t.forEach(e=>{e.type===`public`?n.push({label:e.name,value:e.name}):e.type===`private`?r.push({label:e.name,value:e.name}):e.type===`chained`?i.push({label:e.name,value:e.name}):(n.push({label:e.name,value:e.name}),r.push({label:e.name,value:e.name}),i.push({label:e.name,value:e.name}))}),n.unshift({label:J.t(X.NONE_LABEL),value:X.NONE_VALUE}),r.unshift({label:J.t(X.NONE_LABEL),value:X.NONE_VALUE}),i.unshift({label:J.t(X.NONE_LABEL),value:X.NONE_VALUE}),this.setState({certsPublicOptions:n,certsChainOptions:i,certsPrivateOptions:r,collectionsOptions:a})}renderItem(e,t){var n,r,i,a,o,s,c;if(!this.state.certsPublicOptions||!this.state.certsPrivateOptions||!this.state.certsChainOptions)return null;let l=(X.getValue(this.props.data,this.props.schema.leCollectionName||`leCollection`)||`false`).toString(),u=X.getValue(this.props.data,this.props.schema.certPublicName||`certPublic`),d=X.getValue(this.props.data,this.props.schema.certPrivateName||`certPrivate`),f=X.getValue(this.props.data,this.props.schema.certChainedName||`certChained`),p=(n=this.state.certsPublicOptions)==null?void 0:n.find(e=>e.value===u),m=(r=this.state.certsPrivateOptions)==null?void 0:r.find(e=>e.value===d),h=(i=this.state.certsChainOptions)==null?void 0:i.find(e=>e.value===f);return _.createElement(`div`,{style:zs.fullWidth},this.state.collectionsOptions?_.createElement(Wt,{style:zs.leWidth,variant:`standard`},_.createElement(rr,{shrink:!0},`Let's encrypt`),_.createElement(Me,{variant:`standard`,error:!!e,displayEmpty:!0,disabled:!!t,value:l,onChange:e=>this.onChange(this.props.schema.leCollectionName||`leCollection`,e.target.value===`false`?!1:e.target.value===`true`||e.target.value)},_.createElement(z,{key:`_false`,value:`false`,style:{fontWeight:`bold`}},J.t(`jc_Do not use let's encrypt`)),_.createElement(z,{key:`_true`,value:`true`,style:{fontWeight:`bold`}},J.t(`jc_Use all available let's encrypt certificates`)),(a=this.state.collectionsOptions)==null?void 0:a.map(e=>_.createElement(z,{key:e,value:e},e)))):null,this.state.collectionsOptions?_.createElement(`br`,null):null,this.state.collectionsOptions&&l!==`false`?_.createElement(`div`,null,J.t(`jc_Fallback custom certificates`)):null,_.createElement(Wt,{style:zs.certWidth,variant:`standard`},_.createElement(rr,{shrink:!0},J.t(`jc_Public certificate`)),_.createElement(Me,{variant:`standard`,error:!!e,displayEmpty:!0,disabled:!!t,value:u||``,renderValue:()=>this.getText(p==null?void 0:p.label,!0),onChange:e=>this.onChange(this.props.schema.certPublicName||`certPublic`,e.target.value)},(o=this.state.certsPublicOptions)==null?void 0:o.map((e,t)=>_.createElement(z,{key:`${e.value}_${t}`,value:e.value,style:e.value===X.NONE_VALUE?{opacity:.5}:{}},this.getText(e.label,!0))))),_.createElement(Wt,{style:zs.certWidth,variant:`standard`},_.createElement(rr,{shrink:!0},J.t(`jc_Private certificate`)),_.createElement(Me,{variant:`standard`,error:!!e,displayEmpty:!0,disabled:!!t,value:d||``,renderValue:()=>this.getText(m==null?void 0:m.label,!0),onChange:e=>this.onChange(this.props.schema.certPrivateName||`certPrivate`,e.target.value)},(s=this.state.certsPrivateOptions)==null?void 0:s.map((e,t)=>_.createElement(z,{key:`${e.value}_${t}`,value:e.value,style:e.value===X.NONE_VALUE?{opacity:.5}:{}},this.getText(e.label,!0))))),_.createElement(Wt,{style:zs.certWidth,variant:`standard`},_.createElement(rr,{shrink:!0},J.t(`jc_Chained certificate`)),_.createElement(Me,{variant:`standard`,error:!!e,displayEmpty:!0,disabled:!!t,value:f||``,renderValue:()=>this.getText(h==null?void 0:h.label,!0),onChange:e=>this.onChange(this.props.schema.certChainedName||`certChained`,e.target.value)},(c=this.state.certsChainOptions)==null?void 0:c.map((e,t)=>_.createElement(z,{key:`${e.value}_${t}`,value:e.value,style:e.value===X.NONE_VALUE?{opacity:.5}:{}},this.getText(e.label,!0))))))}};g();var Vs=class extends X{async componentDidMount(){var e;await super.componentDidMount();let t,n=await this.getCachedObject(`system.certificates`);t=n!=null&&(e=n.native)!=null&&e.collections?Object.keys(n.native.collections):[],this.setState({collectionsOptions:t})}renderItem(e,t){var n;if(!this.state.collectionsOptions)return null;let r=(X.getValue(this.props.data,this.props.schema.leCollectionName||`leCollection`)||`false`).toString();return _.createElement(Wt,{style:{width:`100%`},variant:`standard`},this.props.schema.label?_.createElement(rr,{shrink:!0},this.getText(this.props.schema.label)):null,_.createElement(Me,{variant:`standard`,error:!!e,displayEmpty:!0,disabled:!!t,value:r,onChange:e=>this.onChange(this.props.schema.leCollectionName||`leCollection`,e.target.value===`false`?!1:e.target.value===`true`||e.target.value)},_.createElement(z,{key:`_false`,value:`false`,style:{fontWeight:`bold`}},J.t(`jc_Do not use let's encrypt`)),_.createElement(z,{key:`_true`,value:`true`,style:{fontWeight:`bold`}},J.t(`jc_Use all available let's encrypt certificates`)),(n=this.state.collectionsOptions)==null?void 0:n.map(e=>_.createElement(z,{key:e,value:e},e))),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var Hs=class extends X{async componentDidMount(){await super.componentDidMount();let e=await this.props.oContext.socket.getCurrentInstance();this.setState({requesting:!0},async()=>{let t=await this.props.oContext.socket.sendTo(e,`checkDocker`,null);this.setState({requesting:!1,version:(t==null?void 0:t.version)||``,errorDocker:t?t.daemonRunning?``:J.t(`jc_Docker is not installed or not running`):J.t(`jc_No response from admin`)})})}renderItem(e,t){let n=X.getValue(this.props.data,this.props.attr);return this.state.requesting?_.createElement(Wn,null):this.state.errorDocker&&!n?_.createElement(_n,{style:{color:`orange`}},J.t(`jc_Docker is not available`),`:\xA0`,J.t(`jc_${this.state.errorDocker}`).replace(/^jc_/,``)):_.createElement(Wt,{style:{width:`100%`},variant:`standard`},_.createElement(kn,{onClick:e=>{if(e.preventDefault(),e.stopPropagation(),!t&&this.props.attr){let e=this.onChange(this.props.attr,!n);e instanceof Promise&&e.catch(e=>console.error(`Cannot set value: ${e}`))}},control:_.createElement(O,{checked:!!n,onChange:e=>{this.props.attr&&this.onChange(this.props.attr,e.target.checked)},disabled:t||!!this.state.errorDocker&&!n}),label:this.getText(this.props.schema.label)}),this.props.schema.hideVersion?null:_.createElement(_n,null,this.state.errorDocker?this.state.errorDocker:this.state.version),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var Us=`system.credentials.`,Ws=1,Gs=[`email`,`cloud`,`ai`,`aws`,`azure`,`custom`],Ks={email:`E-mail`,cloud:`Cloud`,ai:`AI`,aws:`AWS`,azure:`Azure`,custom:`Custom`},qs={login:[{name:`login`,type:`text`,required:!0,label:`Login`},{name:`password`,type:`password`,encrypted:!0,required:!0,label:`Password`}],key:[{name:`key`,type:`password`,encrypted:!0,required:!0,label:`Key`}],aws:[{name:`accessKeyId`,type:`text`,required:!0,label:`Access Key ID`},{name:`secretAccessKey`,type:`password`,encrypted:!0,required:!0,label:`Secret Access Key`},{name:`region`,type:`select`,required:!0,label:`Region`,options:[{value:`us-east-1`,label:`us-east-1 (US East, N. Virginia)`},{value:`us-east-2`,label:`us-east-2 (US East, Ohio)`},{value:`us-west-1`,label:`us-west-1 (US West, N. California)`},{value:`us-west-2`,label:`us-west-2 (US West, Oregon)`},{value:`ca-central-1`,label:`ca-central-1 (Canada Central)`},{value:`sa-east-1`,label:`sa-east-1 (South America, São Paulo)`},{value:`eu-west-1`,label:`eu-west-1 (Europe, Ireland)`},{value:`eu-west-2`,label:`eu-west-2 (Europe, London)`},{value:`eu-west-3`,label:`eu-west-3 (Europe, Paris)`},{value:`eu-central-1`,label:`eu-central-1 (Europe, Frankfurt)`},{value:`eu-central-2`,label:`eu-central-2 (Europe, Zurich)`},{value:`eu-north-1`,label:`eu-north-1 (Europe, Stockholm)`},{value:`eu-south-1`,label:`eu-south-1 (Europe, Milan)`},{value:`eu-south-2`,label:`eu-south-2 (Europe, Spain)`},{value:`ap-south-1`,label:`ap-south-1 (Asia Pacific, Mumbai)`},{value:`ap-northeast-1`,label:`ap-northeast-1 (Asia Pacific, Tokyo)`},{value:`ap-northeast-2`,label:`ap-northeast-2 (Asia Pacific, Seoul)`},{value:`ap-northeast-3`,label:`ap-northeast-3 (Asia Pacific, Osaka)`},{value:`ap-southeast-1`,label:`ap-southeast-1 (Asia Pacific, Singapore)`},{value:`ap-southeast-2`,label:`ap-southeast-2 (Asia Pacific, Sydney)`},{value:`me-central-1`,label:`me-central-1 (Middle East, UAE)`},{value:`me-south-1`,label:`me-south-1 (Middle East, Bahrain)`},{value:`af-south-1`,label:`af-south-1 (Africa, Cape Town)`}]}],azure:[{name:`subscriptionKey`,type:`password`,encrypted:!0,required:!0,label:`Subscription Key`},{name:`region`,type:`select`,required:!0,label:`Region`,options:[{value:`eastus`,label:`eastus (East US)`},{value:`eastus2`,label:`eastus2 (East US 2)`},{value:`centralus`,label:`centralus (Central US)`},{value:`northcentralus`,label:`northcentralus (North Central US)`},{value:`southcentralus`,label:`southcentralus (South Central US)`},{value:`westus`,label:`westus (West US)`},{value:`westus2`,label:`westus2 (West US 2)`},{value:`westus3`,label:`westus3 (West US 3)`},{value:`canadacentral`,label:`canadacentral (Canada Central)`},{value:`brazilsouth`,label:`brazilsouth (Brazil South)`},{value:`northeurope`,label:`northeurope (North Europe)`},{value:`westeurope`,label:`westeurope (West Europe)`},{value:`francecentral`,label:`francecentral (France Central)`},{value:`germanywestcentral`,label:`germanywestcentral (Germany West Central)`},{value:`norwayeast`,label:`norwayeast (Norway East)`},{value:`swedencentral`,label:`swedencentral (Sweden Central)`},{value:`switzerlandnorth`,label:`switzerlandnorth (Switzerland North)`},{value:`uksouth`,label:`uksouth (UK South)`},{value:`ukwest`,label:`ukwest (UK West)`},{value:`uaenorth`,label:`uaenorth (UAE North)`},{value:`southafricanorth`,label:`southafricanorth (South Africa North)`},{value:`centralindia`,label:`centralindia (Central India)`},{value:`eastasia`,label:`eastasia (East Asia)`},{value:`southeastasia`,label:`southeastasia (Southeast Asia)`},{value:`japaneast`,label:`japaneast (Japan East)`},{value:`koreacentral`,label:`koreacentral (Korea Central)`},{value:`australiaeast`,label:`australiaeast (Australia East)`}]}]},Js={anthropic:`M17.3041 3.541h-3.6718l6.696 16.918H24Zm-10.6082 0L0 20.459h3.7442l1.3693-3.5527h7.0052l1.3693 3.5527h3.7442L10.5363 3.541Zm-.3712 10.2232 2.2914-5.9456 2.2914 5.9456Z`,chatgpt:`M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.073zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.8956zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654 2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z`,gemini:`M11.04 19.32Q12 21.51 12 24q0-2.49.93-4.68.96-2.19 2.58-3.81t3.81-2.55Q21.51 12 24 12q-2.49 0-4.68-.93a12.3 12.3 0 0 1-3.81-2.58 12.3 12.3 0 0 1-2.58-3.81Q12 2.49 12 0q0 2.49-.96 4.68-.93 2.19-2.55 3.81a12.3 12.3 0 0 1-3.81 2.58Q2.49 12 0 12q2.49 0 4.68.96 2.19.93 3.81 2.55t2.55 3.81`,email:`M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4-8 5-8-5V6l8 5 8-5v2z`,login:`M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z`,key:`M21 10h-8.35A5.99 5.99 0 0 0 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6a5.99 5.99 0 0 0 5.65-4H13l2 2 2-2 2 2 4-4.04L21 10zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3z`,aws:`M6.763 10.036c0 .296.032.535.088.71.064.176.144.368.256.576.04.063.056.127.056.183 0 .08-.048.16-.152.24l-.503.335a.383.383 0 0 1-.208.072c-.08 0-.16-.04-.239-.112a2.47 2.47 0 0 1-.287-.375 6.18 6.18 0 0 1-.248-.471c-.622.734-1.405 1.101-2.347 1.101-.67 0-1.205-.191-1.596-.574-.391-.384-.59-.894-.59-1.533 0-.678.239-1.23.726-1.644.487-.415 1.133-.623 1.955-.623.272 0 .551.024.846.064.296.04.6.104.918.176v-.583c0-.607-.127-1.03-.375-1.277-.255-.248-.686-.367-1.3-.367-.28 0-.568.031-.863.103-.295.072-.583.16-.862.272a2.287 2.287 0 0 1-.28.104.488.488 0 0 1-.127.023c-.112 0-.168-.08-.168-.247v-.391c0-.128.016-.224.056-.28a.597.597 0 0 1 .224-.167c.279-.144.614-.264 1.005-.36a4.84 4.84 0 0 1 1.246-.151c.95 0 1.644.216 2.091.647.439.43.662 1.085.662 1.963v2.586zm-3.24 1.214c.263 0 .534-.048.822-.144.287-.096.543-.271.758-.51.128-.152.224-.32.272-.512.047-.191.08-.423.08-.694v-.335a6.66 6.66 0 0 0-.735-.136 6.02 6.02 0 0 0-.75-.048c-.535 0-.926.104-1.19.32-.263.215-.39.518-.39.917 0 .375.095.655.295.846.191.2.47.296.838.296zm6.41.862c-.144 0-.24-.024-.304-.08-.064-.048-.12-.16-.168-.311L7.586 5.55a1.398 1.398 0 0 1-.072-.32c0-.128.064-.2.191-.2h.783c.151 0 .255.025.31.08.065.048.113.16.16.312l1.342 5.284 1.245-5.284c.04-.16.088-.264.151-.312a.549.549 0 0 1 .32-.08h.638c.152 0 .256.025.32.08.063.048.12.16.151.312l1.261 5.348 1.381-5.348c.048-.16.104-.264.16-.312a.52.52 0 0 1 .311-.08h.743c.127 0 .2.065.2.2 0 .04-.009.08-.017.128a1.137 1.137 0 0 1-.056.2l-1.923 6.17c-.048.16-.104.263-.168.311a.51.51 0 0 1-.303.08h-.687c-.151 0-.255-.024-.32-.08-.063-.056-.119-.16-.15-.32l-1.238-5.148-1.23 5.14c-.04.16-.087.264-.15.32-.065.056-.177.08-.32.08zm10.256.215c-.415 0-.83-.048-1.229-.143-.399-.096-.71-.2-.918-.32-.128-.071-.215-.151-.247-.223a.563.563 0 0 1-.048-.224v-.407c0-.167.064-.247.183-.247.048 0 .096.008.144.024.048.016.12.048.2.08.271.12.566.215.878.279.319.064.63.096.95.096.502 0 .894-.088 1.165-.264a.86.86 0 0 0 .415-.758.777.777 0 0 0-.215-.559c-.144-.151-.416-.287-.807-.415l-1.157-.36c-.583-.183-1.014-.454-1.277-.813a1.902 1.902 0 0 1-.4-1.158c0-.335.073-.63.216-.886.144-.255.335-.479.575-.654.24-.184.51-.32.83-.415.32-.096.655-.136 1.006-.136.175 0 .359.008.535.032.183.024.35.056.518.088.16.04.312.08.455.127.144.048.256.096.336.144a.69.69 0 0 1 .24.2.43.43 0 0 1 .071.263v.375c0 .168-.064.256-.184.256a.83.83 0 0 1-.303-.096 3.652 3.652 0 0 0-1.532-.311c-.455 0-.815.071-1.062.223-.248.152-.375.383-.375.71 0 .224.08.416.24.567.159.152.454.304.877.44l1.134.358c.574.184.99.44 1.237.767.247.327.367.702.367 1.117 0 .343-.072.655-.207.926-.144.272-.336.511-.583.703-.248.2-.543.343-.886.447-.36.111-.734.167-1.142.167zM21.698 16.207c-2.626 1.94-6.442 2.969-9.722 2.969-4.598 0-8.74-1.7-11.87-4.526-.247-.223-.024-.527.272-.351 3.384 1.963 7.559 3.153 11.877 3.153 2.914 0 6.114-.607 9.06-1.852.439-.2.814.287.383.607zM22.792 14.961c-.336-.43-2.22-.207-3.074-.103-.255.032-.295-.192-.063-.36 1.5-1.053 3.967-.75 4.254-.399.287.36-.08 2.826-1.485 4.007-.215.184-.423.088-.327-.151.32-.79 1.03-2.57.695-2.994z`,azure:`M22.379 23.343a1.62 1.62 0 0 0 1.536-2.14v.002L17.35 1.76A1.62 1.62 0 0 0 15.816.657H8.184A1.62 1.62 0 0 0 6.65 1.76L.086 21.204a1.62 1.62 0 0 0 1.536 2.139h4.741a1.62 1.62 0 0 0 1.535-1.103l.977-2.892 4.947 3.675c.28.208.618.32.966.32m-3.084-12.531 3.624 10.739a.54.54 0 0 1-.51.713v-.001h-.03a.54.54 0 0 1-.322-.106l-9.287-6.9h4.853m6.313 7.006c.116-.326.13-.694.007-1.058L9.79 1.76a1.722 1.722 0 0 0-.007-.02h6.034a.54.54 0 0 1 .512.366l6.562 19.445a.54.54 0 0 1-.338.684`};function Ys(e,t){let n=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="${t}" d="${e}"/></svg>`;return`data:image/svg+xml;base64,${window.btoa(n)}`}var Xs={anthropic:Ys(Js.anthropic,`#d97757`),chatgpt:Ys(Js.chatgpt,`#74aa9c`),gemini:Ys(Js.gemini,`#8e75b2`),email:Ys(Js.email,`#2196f3`),login:Ys(Js.login,`#9e9e9e`),key:Ys(Js.key,`#ffc107`),aws:Ys(Js.aws,`#ff9900`),azure:Ys(Js.azure,`#0089d6`)},Zs={anthropic:{label:`Anthropic`,icon:Xs.anthropic,form:`key`,type:`ai`,name:`anthropic`},chatgpt:{label:`ChatGPT`,icon:Xs.chatgpt,form:`key`,type:`ai`,name:`chatgpt`},gemini:{label:`Google Gemini`,icon:Xs.gemini,form:`key`,type:`ai`,name:`gemini`},aws:{label:`AWS`,icon:Xs.aws,form:`aws`,type:`aws`,name:`aws`},azure:{label:`Azure`,icon:Xs.azure,form:`azure`,type:`azure`,name:`azure`},email:{label:`E-mail`,icon:Xs.email,form:`login`,type:`email`},login:{label:`Login & password`,icon:Xs.login,form:`login`,type:null},key:{label:`Key`,icon:Xs.key,form:`key`,type:null}};function Qs(e,t,n){return _.createElement(`span`,{style:{display:`flex`,alignItems:`center`,gap:8}},e!=null&&e.icon?_.createElement(Mt,{src:e.icon,style:{width:20,height:20}}):n?_.createElement(`span`,{style:{width:20,height:20,flexShrink:0}}):null,t)}var $s=class e extends X{async componentDidMount(){if(await super.componentDidMount(),!this.props.attr)throw Error(`Missing attribute attribute`);let e=X.getValue(this.props.data,this.props.attr),t=await this.readCredentials();this.setState({value:e,selectOptions:t})}async readCredentials(){let t=[];try{let n=await this.props.oContext.socket.getObjectViewSystem(`config`,Us,`${Us}香`);t=Object.values(n).filter(e=>{var t;return!!e&&(!this.props.schema.credentialType||((t=e.native)==null?void 0:t.type)===this.props.schema.credentialType)}).map(t=>{var n;return{label:e.getCredentialName(t),value:t._id,icon:typeof((n=t.common)==null?void 0:n.icon)==`string`?t.common.icon:void 0}}).sort((e,t)=>e.label.localeCompare(t.label))}catch(e){console.error(`Cannot read credentials: ${e}`)}return t.unshift({label:J.t(X.NONE_LABEL),value:X.NONE_VALUE}),t}static getCredentialName(e){var t;let n=(t=e.common)==null?void 0:t.name,r;return r=n&&typeof n==`object`?n[J.getLanguage()]||n.en||Object.values(n)[0]||``:n||``,r||e._id.substring(19)}templateKeys(){let e=this.props.schema.credentialType;return Object.keys(Zs).filter(t=>{let n=Zs[t];return!e||n.type===e||n.type===null})}selectTemplate(e){let t=Zs[e];this.setState({addTemplate:e,addName:t.name||``,addType:t.type||this.props.schema.credentialType||`custom`,addFields:{},addError:``})}openAddDialog(){let e=this.templateKeys()[0],t=Zs[e];this.setState({addOpen:!0,addTemplate:e,addName:t.name||``,addType:t.type||this.props.schema.credentialType||`custom`,addFields:{},addError:``,addSaving:!1})}async createCredential(){let e=Zs[this.state.addTemplate||``],t=(this.state.addName||``).trim().replace(Zt.FORBIDDEN_CHARS,`_`);if(!t){this.setState({addError:J.t(`jc_A unique name is required`)});return}let n=`${Us}${t}`;if((this.state.selectOptions||[]).find(e=>e.value===n)){this.setState({addError:J.t(`jc_A credential with this name already exists`)});return}let r=(e==null?void 0:e.form)||`login`,i=qs[r],a=this.state.addFields||{};if(i.some(e=>e.required&&!(a[e.name]||``).trim())){this.setState({addError:J.t(`jc_Please fill in all required fields`)});return}let o=(e==null?void 0:e.type)||this.props.schema.credentialType||this.state.addType||`custom`;this.setState({addSaving:!0,addError:``});try{let s=this.props.oContext.socket,c={type:o,form:r,version:Ws,encryptedFields:i.filter(e=>e.encrypted).map(e=>e.name)};for(let e of i){let t=a[e.name]||``;c[e.name]=e.encrypted&&t?await s.encrypt(t):t}let l={_id:n,type:`config`,common:{name:t,...e!=null&&e.icon?{icon:e.icon}:{}},native:c,acl:{object:1536,owner:`system.user.admin`,ownerGroup:`system.group.administrator`}};await s.setObject(n,l);let u=this.state.selectOptions||[],d=u.find(e=>e.value===X.NONE_VALUE),f=u.filter(e=>e.value!==X.NONE_VALUE);f.push({label:t,value:n,icon:e==null?void 0:e.icon}),f.sort((e,t)=>e.label.localeCompare(t.label));let p=d?[d,...f]:f;this.setState({addOpen:!1,addSaving:!1,selectOptions:p,value:n},()=>this.onChange(this.props.attr,n))}catch(e){this.setState({addSaving:!1,addError:J.t(`jc_Cannot create credential: %s`,e.toString())})}}renderAddDialog(){if(!this.state.addOpen)return null;let e=Zs[this.state.addTemplate||``],t=qs[(e==null?void 0:e.form)||`login`],n=`${Us}${(this.state.addName||``).trim().replace(Zt.FORBIDDEN_CHARS,`_`)}`,r=!this.props.schema.credentialType&&(e==null?void 0:e.type)===null;return _.createElement(nn,{open:!0,maxWidth:`sm`,fullWidth:!0,onClose:()=>this.setState({addOpen:!1})},_.createElement(Nt,null,J.t(`jc_Add credential`)),_.createElement(Tn,{style:{display:`flex`,flexDirection:`column`,gap:12,paddingTop:8}},_.createElement(Wt,{fullWidth:!0,variant:`standard`},_.createElement(rr,{shrink:!0},J.t(`jc_Template`)),_.createElement(Me,{variant:`standard`,value:this.state.addTemplate||``,onChange:e=>this.selectTemplate(e.target.value)},this.templateKeys().map(e=>_.createElement(z,{key:e,value:e},_.createElement(`span`,{style:{display:`flex`,alignItems:`center`,gap:8}},_.createElement(`img`,{src:Zs[e].icon,width:20,height:20,alt:``}),J.t(Zs[e].label)))))),r?_.createElement(Wt,{fullWidth:!0,variant:`standard`},_.createElement(rr,{shrink:!0},J.t(`jc_Credential type`)),_.createElement(Me,{variant:`standard`,value:this.state.addType||`custom`,onChange:e=>this.setState({addType:e.target.value})},Gs.map(e=>_.createElement(z,{key:e,value:e},J.t(Ks[e]))))):null,_.createElement(ot,{variant:`standard`,fullWidth:!0,label:J.t(`jc_Name`),value:this.state.addName||``,error:!!this.state.addError,helperText:this.state.addName?n:``,slotProps:{inputLabel:{shrink:!0},htmlInput:{autoComplete:`off`}},onChange:e=>this.setState({addName:e.target.value,addError:``})}),t.map(e=>{var t;let n=((t=this.state.addFields)==null?void 0:t[e.name])||``;if(e.type===`select`){let t=e.options?[...e.options]:[];return n&&!t.find(e=>e.value===n)&&t.unshift({value:n}),_.createElement(ot,{key:e.name,select:!0,variant:`standard`,fullWidth:!0,required:e.required,label:J.t(e.label),value:n,slotProps:{inputLabel:{shrink:!0}},onChange:t=>this.setState({addFields:{...this.state.addFields||{},[e.name]:t.target.value},addError:``})},t.map(e=>_.createElement(z,{key:e.value,value:e.value},e.label||e.value)))}return _.createElement(ot,{key:e.name,variant:`standard`,fullWidth:!0,type:e.type===`password`?`password`:`text`,required:e.required,label:J.t(e.label),value:n,slotProps:{inputLabel:{shrink:!0},htmlInput:{autoComplete:e.type===`password`?`new-password`:`off`}},onChange:t=>this.setState({addFields:{...this.state.addFields||{},[e.name]:t.target.value},addError:``})})}),this.state.addError?_.createElement(Ct,{severity:`error`},this.state.addError):null),_.createElement(Et,null,_.createElement(xt,{variant:`contained`,color:`primary`,disabled:!!this.state.addSaving||!(this.state.addName||``).trim(),startIcon:_.createElement(on,null),onClick:()=>this.createCredential()},J.t(`jc_Create`)),_.createElement(xt,{variant:`contained`,color:`grey`,disabled:!!this.state.addSaving,startIcon:_.createElement(De,null),onClick:()=>this.setState({addOpen:!1})},J.t(`jc_Cancel`))))}renderItem(e,t){var n,r;if(!this.state.selectOptions)return null;let i=(n=this.state.selectOptions)==null?void 0:n.find(e=>e.value===this.state.value),a=this.state.value&&this.state.value!==X.NONE_VALUE&&!i?this.state.value:null,o=this.state.selectOptions.some(e=>!!e.icon),s=!this.props.schema.disableCreation;return _.createElement(`div`,{style:{display:`flex`,alignItems:`flex-end`,gap:4,width:`100%`}},_.createElement(Wt,{style:{flex:1,minWidth:0},variant:`standard`},this.props.schema.label?_.createElement(rr,{shrink:!0},this.getText(this.props.schema.label)):null,_.createElement(Me,{variant:`standard`,error:!!e||!!a,displayEmpty:!0,disabled:!!t,value:this.state.value||X.NONE_VALUE,renderValue:()=>a||Qs(i,this.getText(i==null?void 0:i.label,this.props.schema.noTranslation!==!1),o),onChange:e=>this.setState({value:e.target.value===X.NONE_VALUE?``:e.target.value},()=>this.onChange(this.props.attr,this.state.value))},(r=this.state.selectOptions)==null?void 0:r.map(e=>_.createElement(z,{key:e.value,value:e.value,style:e.value===X.NONE_VALUE?{opacity:.5}:{}},Qs(e,this.getText(e.label,this.props.schema.noTranslation!==!1),o)))),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null),s?_.createElement(Zn,{size:`small`,disabled:!!t,title:J.t(`jc_Add credential`),onClick:()=>this.openAddDialog()},_.createElement(re,null)):null,this.renderAddDialog())}};g();var ec={fullWidth:{width:`100%`},icon:{width:24,height:24,marginRight:4},licLabel:{fontWeight:`bold`,minWidth:100,marginRight:10,textTransform:`capitalize`,display:`inline-block`},licValue:{fontWeight:`normal`},errorTitle:e=>({color:e.palette.mode===`dark`?`#e39191`:`#b62020`}),okTitle:e=>({color:e.palette.mode===`dark`?`#6fd56f`:`#007c00`}),errorText:e=>({color:e.palette.mode===`dark`?`#e39191`:`#b62020`,mb:`30px`})},tc=class e extends X{async componentDidMount(){await super.componentDidMount(),this.setState({_error:``,running:!1,showLicenseData:null,foundSuitableLicense:!1,licenseOfflineCheck:!1,result:null,allLicenses:null,askForUpdate:!1,showLinkToProfile:!1})}renderErrorDialog(){if(this.state._error&&!this.state.showLicenseData){let e=this.state._error;return this.state.allLicenses&&(e=[_.createElement(`div`,{key:`error`},e)],e.push(_.createElement(xt,{key:`button`,variant:`contained`,onClick:()=>window.open(`https://iobroker.net/www/account/licenses`,`_blank`)},`iobroker.net`)),this.state.allLicenses.length?e.push(_.createElement(Ye,{key:`table`},_.createElement(H,{size:`small`},_.createElement(fr,null,_.createElement(F,null,_.createElement(Ee,null,J.t(`jc_Product`)),_.createElement(Ee,null,J.t(`jc_Version`)),_.createElement(Ee,null,`UUID`),_.createElement(Ee,null,J.t(`jc_ValidTill`)),_.createElement(Ee,null,J.t(`jc_Commercial`)),_.createElement(Ee,null,`ID`))),_.createElement(_e,null,this.state.allLicenses.map(e=>_.createElement(F,{key:e.id},_.createElement(Ee,{sx:e.validName?null:ec.errorText},e.license.product),_.createElement(Ee,{sx:e.validVersion?null:ec.errorText},e.license.version),_.createElement(Ee,{sx:e.validUuid?null:ec.errorText},e.license.uuid||`--`),_.createElement(Ee,{sx:e.validTill?null:ec.errorText},e.license.validTill&&e.license.validTill!==`0000-00-00 00:00:00`?new Date(e.license.validTill).toLocaleDateString():`--`),_.createElement(Ee,null,e.license.invoice===`free`?`-`:e.license.invoice===`MANUALLY_CREATED`?`✓`:e.license.invoice),_.createElement(Ee,null,e.id))))))):(e.push(_.createElement(`div`,{key:`text1`},J.t(`jc_No one license found in license manager`))),e.push(_.createElement(`div`,{key:`text2`},J.t(`jc_Please create license`))))),_.createElement(nn,{open:!0,maxWidth:`xl`,fullWidth:this.props.fullWidth===void 0||this.props.fullWidth,onClick:()=>this.setState({_error:``,allLicenses:null})},_.createElement(Nt,null,J.t(`jc_Error`)),_.createElement(Tn,null,_.createElement(Bn,null,e)),_.createElement(Et,null,_.createElement(xt,{variant:`contained`,onClick:()=>this.setState({_error:``,allLicenses:null}),color:`primary`,autoFocus:!0,startIcon:_.createElement(on,null)},J.t(`jc_Ok`))))}return null}renderMessageDialog(){if(this.state.showLicenseData){let e=[],t=this.state.showLicenseData;return Object.keys(t).forEach(n=>{if(t[n]!==null&&t[n]!==void 0)if(typeof t[n]==`object`){let r=t[n];Object.keys(r).forEach(t=>{r[t]!==null&&r[t]!==void 0&&(typeof r[t]==`object`?e.push(_.createElement(`div`,{key:t},_.createElement(`div`,{style:ec.licLabel},t,`:`),JSON.stringify(r[t],null,2))):e.push(_.createElement(`div`,{key:t},_.createElement(`div`,{style:ec.licLabel},n,` -`,t,`:`),r[t].toString())))})}else e.push(_.createElement(`div`,{key:n},_.createElement(`div`,{style:ec.licLabel},n.replace(/_/g,` `),`:`),t[n].toString()))}),e.push(_.createElement(`div`,{key:`checked`},_.createElement(`div`,{style:ec.licLabel},J.t(`jc_Checked`),`:`),this.state.licenseOfflineCheck?J.t(`jc_locally`):J.t(`jc_via internet`))),_.createElement(nn,{open:!0,onClose:()=>this.setState({showLicenseData:null})},_.createElement(Nt,null,_.createElement(vt,{component:`span`,sx:this.state.result?ec.okTitle:ec.errorTitle},J.t(`jc_License %s`,this.state.result?`OK`:`INVALID`))),_.createElement(Tn,null,this.state.showLinkToProfile?_.createElement(xt,{variant:`contained`,onClick:()=>window.open(`https://iobroker.net/www/account/licenses`,`_blank`)},`https://iobroker.net`):null,this.state._error?_.createElement(vt,{component:`div`,sx:ec.errorText},this.state._error):null,e),_.createElement(Et,null,_.createElement(xt,{onClick:()=>this.setState({showLicenseData:null,_error:``}),color:`primary`,variant:`contained`},J.t(`jc_Close`))))}return null}static parseJwt(e){let t=e.split(`.`)[1].replace(/-/g,`+`).replace(/_/g,`/`),n=decodeURIComponent(atob(t).split(``).map(e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`).join(``));try{return JSON.parse(n)}catch{return null}}static isVersionValid(e,t,n,r){if(!t||!e)return!0;let[i]=e.split(`.`);return t.startsWith(`>=`)||t.startsWith(`<=`)?parseInt(t.substring(2,10)):t.startsWith(`>`)||t.startsWith(`<`)||t.startsWith(`=`)?parseInt(t.substring(1,10)):t.startsWith(`==`)?parseInt(t.substring(2,10)):t.startsWith(`===`)&&parseInt(t.substring(3,10)),!0}async findInLicenseManager(t){var n;let r=await this.getCachedObject(`system.licenses`),i=[];if(r!=null&&(n=r.native)!=null&&(n=n.licenses)!=null&&n.length){let n=null,s=Date.now(),c;if(this.props.schema.uuid){var a;let e=await this.getCachedObject(`system.meta.uuid`);c=e==null||(a=e.native)==null?void 0:a.uuid}let l;if(this.props.schema.version){var o;let e=await this.getCachedObject(`system.adapter.${t}`);l=e==null||(o=e.common)==null?void 0:o.version}if(r.native.licenses.forEach(r=>{let a=!r.validTill||r.validTill===`0000-00-00 00:00:00`||new Date(r.validTill).getTime()>s,o=(r.product||``).split(`.`),u=o[1]===t||t===`vis-2`&&o[1]===`vis`,d=!c||!r.uuid||r.uuid===c,f=e.isVersionValid(l,r.version,r.invoice,t);(!n||r.invoice!==`free`)&&a&&u&&d&&f&&(n=r),i.push({id:r.id,validName:u,validUuid:d,validVersion:f,validTill:a,license:r})}),n){let e=i.find(e=>e.id===(n==null?void 0:n.id));e&&(e.used=!0)}}return i}async checkLicense(t,n){let r;if(this.props.schema.uuid){var i;let e=await this.getCachedObject(`system.meta.uuid`);r=e==null||(i=e.native)==null?void 0:i.uuid}let a;if(this.props.schema.version){var o;let e=await this.getCachedObject(`system.adapter.${n}`);a=e==null||(o=e.common)==null?void 0:o.version}let s=new AbortController,c=setTimeout(()=>{c=null,s.abort()},5e3);try{let i=await window.fetch(`https://iobroker.net/api/v1/public/cert/`,{method:`POST`,body:JSON.stringify({json:t,uuid:r}),headers:{"Content-Type":`text/plain`},signal:s.signal});c&&clearTimeout(c);let o=await i.text(),l;try{l=JSON.parse(o)}catch{}if(l!=null&&l.error)try{let n=e.parseJwt(t),r=J.t(`jc_${(n==null?void 0:n.error)||l.error||`Unknown error`}`).replace(/^jc_/,``);return this.setState({_error:r,licenseOfflineCheck:!1,showLicenseData:n,result:!1,running:!1})}catch{return console.log(`Cannot parse license`),this.setState({_error:l.error,result:!1,running:!1})}{let i=null;try{i=e.parseJwt(t)}catch{}if(l){let t=l.validTill||l.valid_till;if(t&&t!==`0000-00-00 00:00:00`&&new Date(t).getTime()<Date.now())return this.setState({_error:J.t(`jc_License expired on %s`,new Date(t).toLocaleString()),licenseOfflineCheck:!1,showLicenseData:i,result:!1,running:!1});let o=(l.name||``).split(`.`);return o[1]===n||o[1]===`vis`&&n===`vis-2`?r&&!l.uuid&&n===`vis-2`?this.setState({_error:J.t(`jc_License must be converted`,l.uuid),showLinkToProfile:!0,licenseOfflineCheck:!1,showLicenseData:i,result:!1,running:!1}):r&&l.uuid&&l.uuid!==r?this.setState({_error:J.t(`jc_Serial number (UUID) "%s" in license is for other device.`,l.uuid),licenseOfflineCheck:!1,showLicenseData:i,result:!1,running:!1}):e.isVersionValid(a,l.version,l.invoice,n)?this.setState({licenseOfflineCheck:!1,showLicenseData:i,result:!0,running:!1}):this.setState({_error:J.t(`jc_License is for version %s, but required version is %s`,l.version,this.props.schema.version),licenseOfflineCheck:!1,showLicenseData:i,result:!1,running:!1}):this.setState({_error:J.t(`jc_License for other product "%s"`,l.name),licenseOfflineCheck:!1,showLicenseData:i,result:!1,running:!1})}throw Error(`jc_Invalid answer from server`)}}catch(i){var l;if((i==null||(l=i.response)==null?void 0:l.status)===404)return this.setState({_error:J.t(`jc_License does not exist`),result:!1,running:!1});try{let i=e.parseJwt(t),o=((i==null?void 0:i.name)||``).split(`.`);return i!=null&&i.valid_till&&i.valid_till!==`0000-00-00 00:00:00`&&new Date(i.valid_till).getTime()<Date.now()?this.setState({_error:J.t(`jc_License expired on %s`,new Date(i.valid_till).toLocaleString()),showLicenseData:i,licenseOfflineCheck:!0,running:!1,result:!1}):o[1]===n?r&&i!=null&&i.uuid&&i.uuid!==r?this.setState({_error:J.t(`jc_Serial number (UUID) "%s" in license is for other device.`,i==null?void 0:i.uuid),showLicenseData:i,licenseOfflineCheck:!0,result:!1,running:!1}):e.isVersionValid(a,i==null?void 0:i.version,i==null?void 0:i.invoice,n)?this.setState({running:!1,result:!0,licenseOfflineCheck:!0,showLicenseData:i}):this.setState({_error:J.t(`jc_License is for version %s, but required version is %s`,i==null?void 0:i.version,this.props.schema.version),licenseOfflineCheck:!0,showLicenseData:i,result:!1,running:!1}):this.setState({_error:J.t(`jc_License for other product "%s"`,i==null?void 0:i.name),licenseOfflineCheck:!0,showLicenseData:i,result:!1,running:!1})}catch{return this.setState({_error:J.t(`jc_Cannot decode license`),result:!1,licenseOfflineCheck:!0,running:!1})}}}renderAskForUpdate(){return this.state.askForUpdate?_.createElement(bn,{text:J.t(`jc_License not found in license manager. Do you want to read licenses from iobroker.net?`),ok:J.t(`jc_Yes`),onClose:async e=>{if(e){this.setState({askForUpdate:!1});try{await this.props.oContext.socket.updateLicenses(``,``)}catch(e){window.alert(J.t(`jc_Cannot read licenses: %s`,e));return}await this._onClick(!0)}else this.setState({askForUpdate:!1,running:!1})}}):null}async _onClick(e){let t=this.props.oContext.adapterName===`vis-2`?`vis`:this.props.oContext.adapterName;this.setState({running:!0});let n,r;if(this.props.data.useLicenseManager){if(r=await this.findInLicenseManager(t),n=r.find(e=>e.used),n&&=n.license.json,!n&&!e){this.setState({askForUpdate:!0});return}}else n=this.props.data.license;n?await this.checkLicense(n,t):this.props.data.useLicenseManager?this.setState({_error:J.t(`jc_Suitable license not found in license manager`),result:!1,running:!1,allLicenses:r||null}):this.setState({_error:J.t(`jc_Please enter the license`),result:!1,running:!1})}renderItem(){return _.createElement(`div`,{style:ec.fullWidth},_.createElement(xt,{variant:this.props.schema.variant||`outlined`,color:this.props.schema.color||`primary`,style:ec.fullWidth,disabled:!this.props.data.license&&!this.props.data.useLicenseManager||this.state.running,startIcon:_.createElement(rt,null),onClick:()=>this._onClick()},this.state.running?_.createElement(Wn,{size:20,style:{marginRight:8}}):null,this.getText(this.props.schema.label||`jc_Check license`,this.props.schema.noTranslation)),this.renderMessageDialog(),this.renderErrorDialog(),this.renderAskForUpdate())}};g();var nc=class extends X{renderItem(e,t){let n=X.getValue(this.props.data,this.props.attr),r=Array.isArray(n);return _.createElement(Wt,{style:{width:`100%`},variant:`standard`},_.createElement(kn,{onClick:e=>{if(e.preventDefault(),e.stopPropagation(),!t&&this.props.attr){let e=this.onChange(this.props.attr,!n);e instanceof Promise&&e.catch(e=>console.error(`Cannot set value: ${e}`))}},control:_.createElement(O,{indeterminate:r,checked:!!n,onChange:e=>{if(this.props.attr){let t;t=r?this.onChange(this.props.attr,!0):this.onChange(this.props.attr,e.target.checked),t instanceof Promise&&t.catch(e=>console.error(`Cannot set value: ${e}`))}},disabled:t||this.props.schema.readOnly}),label:this.getText(this.props.schema.label)}),_.createElement(_n,{style:{color:`red`}},e?this.props.schema.validatorErrorText?J.t(this.props.schema.validatorErrorText):J.t(`jc_Error`):null),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var rc={standard:sr,filled:Lt,outlined:Ie},ic=e=>{let t=e.palette.mode===`light`,n=t?`rgba(0, 0, 0, 0.42)`:`rgba(255, 255, 255, 0.7)`;return{inputRoot:{display:`inline-flex`,flexWrap:`wrap`,flex:1,marginTop:0,minWidth:70,"&.mui-variant-outlined,&.mui-variant-filled":{boxSizing:`border-box`},"&.mui-variant-outlined":{paddingTop:`14px`},"&.mui-variant-filled":{paddingTop:`28px`}},input:{display:`inline-block`,textOverflow:`ellipsis`,overflow:`hidden`,whiteSpace:`nowrap`,appearance:`none`,WebkitTapHighlightColor:`rgba(0,0,0,0)`,float:`left`,flex:1},chipContainer:{display:`flex`,flexFlow:`row wrap`,alignItems:`center`,cursor:`text`,marginBottom:`-2px`,minHeight:40},outlined:{"& input":{height:16,paddingTop:`4px`,paddingBottom:`12px`,marginTop:`4px`,marginBottom:`4px`}},standard:{marginTop:`18px`},filled:{"& input":{height:22,marginBottom:`4px`,marginTop:`4px`,paddingTop:0},"$marginDense & input":{height:26}},labeled:{},label:{top:4,"&$outlined&:not($labelShrink)":{top:2,"$marginDense &":{top:5}},"&$filled&:not($labelShrink)":{top:15,"$marginDense &":{top:20}}},labelShrink:{top:0},helperText:{marginBottom:-20},focused:{},disabled:{},underline:{"&:after":{borderBottom:`2px solid ${e.palette.primary[t?`dark`:`light`]}`,left:0,bottom:0,content:`""`,position:`absolute`,right:0,transform:`scaleX(0)`,transition:e.transitions.create(`transform`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:`none`},"&$focused:after":{transform:`scaleX(1)`},"&$error:after":{borderBottomColor:e.palette.error.main,transform:`scaleX(1)`},"&:before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:`"\\00a0"`,position:`absolute`,right:0,transition:e.transitions.create(`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},"&:hover:not($disabled):not($focused):not($error):before":{borderBottom:`2px solid ${e.palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},"&$disabled:before":{borderBottomStyle:`dotted`}},error:{"&:after":{backgroundColor:e.palette.error.main,transform:`scaleX(1)`}},chip:{margin:`0 8px 8px 0`,float:`left`}}},ac={BACKSPACE:8,DELETE:46,LEFT_ARROW:37,RIGHT_ARROW:39},oc=({value:e,isFocused:t,isDisabled:n,isReadOnly:r,handleClick:i,handleDelete:a,style:o},s)=>_.createElement(Bt,{key:s,style:{...o,pointerEvents:n||r?`none`:void 0,backgroundColor:t?oe[300]:void 0},onClick:i,onDelete:a,label:e}),sc=class extends _.Component{constructor(e){super(e),K(this,`labelRef`,void 0),K(this,`labelNode`,null),K(this,`input`,void 0),K(this,`newChipKeyCodes`,void 0),K(this,`newChipKeys`,void 0),K(this,`actualInput`,null),K(this,`inputBlurTimeout`,null),K(this,`_keyPressed`,!1),K(this,`_preventChipCreation`,!1),K(this,`styles`,{}),K(this,`styleTheme`,null),K(this,`focus`,()=>{var e;(e=this.actualInput)==null||e.focus(),this.state.focusedChip&&this.setState({focusedChip:null})}),K(this,`handleInputBlur`,e=>{this.props.onBlur&&this.props.onBlur(e),this.setState({isFocused:!1}),this.state.focusedChip&&this.setState({focusedChip:null});let t=e.target.value,n;switch(this.props.blurBehavior||`clear`){case`add-or-clear`:n={clearInputOnFail:!0};case`add`:if(this.props.delayBeforeAdd){let e=(this.props.value||this.state.chips).length;this.inputBlurTimeout=setTimeout(()=>{let r=(this.props.value||this.state.chips).length;e===r?this.handleAddChip(t,n):this.clearInput()},150)}else this.handleAddChip(t,n);break;case`clear`:this.clearInput()}}),K(this,`handleInputFocus`,e=>{var t,n;this.setState({isFocused:!0}),(t=(n=this.props).onFocus)==null||t.call(n,e)}),K(this,`handleKeyDown`,e=>{let{focusedChip:t}=this.state;if(this._keyPressed=!1,this._preventChipCreation=!1,this.props.onKeyDown&&(this.props.onKeyDown(e),e.isDefaultPrevented()))return;let n=this.props.value||this.state.chips;if(this.newChipKeyCodes.includes(e.keyCode)||this.newChipKeys.includes(e.key)){this.handleAddChip(e.target.value)!==!1&&e.preventDefault();return}switch(e.keyCode){case ac.BACKSPACE:e.target.value===``&&(t?(this.handleDeleteChip(n[t],t),t&&this.setState({focusedChip:t-1})):this.setState({focusedChip:n.length-1}));break;case ac.DELETE:e.target.value===``&&t&&(this.handleDeleteChip(n[t],t),t<=n.length-1&&this.setState({focusedChip:t}));break;case ac.LEFT_ARROW:t===null&&e.target.value===``&&n.length?this.setState({focusedChip:n.length-1}):t!==null&&t>0&&this.setState({focusedChip:t-1});break;case ac.RIGHT_ARROW:t!==null&&t<n.length-1?this.setState({focusedChip:t+1}):this.setState({focusedChip:null});break;default:this.setState({focusedChip:null})}}),K(this,`handleKeyUp`,e=>{!this._preventChipCreation&&(this.newChipKeyCodes.includes(e.keyCode)||this.newChipKeys.includes(e.key))&&this._keyPressed?this.clearInput():this.updateInput(e.target.value),this.props.onKeyUp&&this.props.onKeyUp(e)}),K(this,`handleUpdateInput`,e=>{(this.props.inputValue===null||this.props.inputValue===void 0)&&this.updateInput(e.target.value),this.props.onUpdateInput&&this.props.onUpdateInput(e)}),K(this,`setActualInputRef`,e=>{this.actualInput=e,this.props.inputRef&&this.props.inputRef(e)}),this.state={chips:e.defaultValue||[],focusedChip:null,inputValue:``,isFocused:!1,chipsUpdated:!1,prevPropsValue:[],variant:this.props.variant||`standard`},this.newChipKeyCodes=e.newChipKeyCodes||[13],this.newChipKeys=e.newChipKeys||[`Enter`],this.labelRef=_.createRef(),this.input=_.createRef()}componentDidMount(){this.state.variant===`outlined`&&(this.labelNode=this.labelRef.current,this.forceUpdate())}componentWillUnmount(){this.inputBlurTimeout&&clearTimeout(this.inputBlurTimeout)}static getDerivedStateFromProps(e,t){let n=null;return e.value&&e.value.length!==t.prevPropsValue.length&&(n={prevPropsValue:e.value},e.clearInputValueOnChange&&(n.inputValue=``)),e.clearInputValueOnChange&&e.value&&e.value.length!==t.prevPropsValue.length&&(n={prevPropsValue:e.value,inputValue:``}),e.disabled&&(n={...n,focusedChip:null}),!t.chipsUpdated&&e.defaultValue&&(n={...n,chips:e.defaultValue}),n}handleAddChip(e,t){if(this.props.onBeforeAdd&&!this.props.onBeforeAdd(e))return this._preventChipCreation=!0,t&&t.clearInputOnFail&&this.clearInput(),!1;this.clearInput();let n=this.props.value||this.state.chips;return e.trim().length?((this.props.allowDuplicates||!n.includes(e))&&(this.props.value&&this.props.onAdd?this.props.onAdd(e):this.updateChips([...this.state.chips,e])),!0):!1}handleDeleteChip(e,t){if(this.props.value)this.props.onDelete&&this.props.onDelete(e,t);else{let e=this.state.chips.slice();if(e.splice(t,1)){let n=this.state.focusedChip;this.state.focusedChip===t?n=null:this.state.focusedChip!==null&&this.state.focusedChip>t&&(n=this.state.focusedChip-1),this.updateChips(e,{focusedChip:n})}}}updateChips(e,t={}){this.setState({chips:e,chipsUpdated:!0,...t}),this.props.onChange&&this.props.onChange(e)}clearInput(){this.updateInput(``)}updateInput(e){this.setState({inputValue:e})}render(){let{alwaysShowPlaceholder:e,chipRenderer:t=oc,className:n,disabled:r,disableUnderline:i,error:a,FormHelperTextProps:o,fullWidth:s,fullWidthInput:c,helperText:l,id:u,InputProps:d={},InputLabelProps:f={},inputValue:p,label:m,placeholder:h,readOnly:g,required:v,rootRef:y,value:b,margin:x}=this.props,S=this.state.variant;this.styleTheme!==this.props.theme.palette.mode&&(this.styleTheme=this.props.theme.palette.mode,this.styles=Zt.getStyle(this.props.theme,ic));let C=b||this.state.chips||[];Array.isArray(C)||(C=(C||``).toString().split(/[,\s]+/).map(e=>e.trim()));let w=p??this.state.inputValue,T=(this.props.value||w).length||w.length,E=typeof f.shrink==`boolean`?f.shrink:m!==null&&(T||this.state.isFocused||C.length),D=C.map((e,n)=>t({value:e,isDisabled:!!r,isReadOnly:!!g,isFocused:this.state.focusedChip===n,handleClick:()=>this.setState({focusedChip:n}),handleDelete:()=>this.handleDeleteChip(e,n),style:this.styles.chip},n.toString())),O={};S===`outlined`&&(O.notched=!!E,O.labelWidth=E&&this.labelNode&&this.labelNode.offsetWidth||0),S===`standard`?d.disableUnderline=!0:O.startAdornment=D;let k=rc[S];return _.createElement(Wt,{ref:y,fullWidth:s,className:n,error:a,required:C.length>0?void 0:v,onClick:this.focus,disabled:r,variant:S,component:`div`,margin:x},m&&_.createElement(rr,{htmlFor:u,sx:{"&.MuiInputLabel-root":this.styles.label,"&.MuiInputLabel-shrink":this.styles.labelShrink},shrink:!!E,focused:this.state.isFocused,variant:S,ref:this.labelRef,required:v,component:`label`,...f},m),_.createElement(vt,{component:`div`,id:`input-chip-container`,sx:{...this.styles[S],...this.styles.chipContainer,...this.state.isFocused?this.styles.focused:void 0,...!i&&S===`standard`?this.styles.underline:void 0,...r?this.styles.disabled:void 0,...m?this.styles.labeled:void 0,...a?this.styles.error:void 0}},S===`standard`&&D,_.createElement(k,{ref:this.input,className:`mui-variant-${this.styles[S]} ${m?`mui-chip-with-label`:`mui-chip-no-label`}`,sx:{"&.MuiInputBase-input":{...this.styles.input,...this.styles[S]},"&.MuiInputBase-root":{...this.styles.inputRoot}},id:u,value:w,onChange:this.handleUpdateInput,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onFocus:this.handleInputFocus,onBlur:this.handleInputBlur,inputRef:this.setActualInputRef,disabled:r,fullWidth:c,placeholder:!T&&(E||m==null)||e?h:void 0,readOnly:g,...d,...O})),l&&_.createElement(_n,{...o,className:o==null?void 0:o.className,style:this.styles.helperText},l))}};g();var cc=class extends X{async componentDidMount(){await super.componentDidMount();let{data:e,attr:t}=this.props,n=X.getValue(e,t);if(this.props.schema.delimiter&&typeof n==`string`){let e=n.split(this.props.schema.delimiter).map(e=>e.trim()).filter(e=>e);this.setState({value:e})}else this.setState({value:n||[]})}renderItem(e,t){let{attr:n,schema:r}=this.props,{value:i}=this.state;return _.createElement(Wt,{fullWidth:!0,variant:`standard`},_.createElement(sc,{value:i,disabled:!!t,label:this.getText(r.label),error:!!e,onAdd:e=>{let t=JSON.parse(JSON.stringify(i));t.push(e),this.setState({value:t},()=>{if(n){let e;e=this.props.schema.delimiter?this.onChange(n,t.join(`${this.props.schema.delimiter} `)):this.onChange(n,t),e instanceof Promise&&e.catch(e=>console.error(e))}})},theme:this.props.oContext.theme,onDelete:(e,t)=>{let r=JSON.parse(JSON.stringify(i));r.splice(t,1),this.setState({value:r},()=>{if(n){let e;e=this.props.schema.delimiter?this.onChange(n,r.join(`${this.props.schema.delimiter} `)):this.onChange(n,r),e instanceof Promise&&e.catch(e=>console.error(e))}})}}),_.createElement(_n,null,J.t(`jc_Press ENTER Key to add new item`)),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var lc=class extends X{renderColorDialog(){return this.state.showColorDialog?_.createElement(nn,{onClose:()=>this.setState({showColorDialog:!1}),open:this.state.showColorDialog},_.createElement(kt,{color:this.state.colorDialogValue,onChange:e=>this.setState({colorDialogValue:e.hex},()=>this.props.attr&&this.onChange(this.props.attr,this.state.colorDialogValue))})):null}renderItem(e,t){let n=X.getValue(this.props.data,this.props.attr),r=Zt.isUseBright(n);return _.createElement(_.Fragment,null,this.renderColorDialog(),_.createElement(ot,{variant:`standard`,disabled:!!t,style:{minWidth:100,width:`calc(100% - 8px)`},label:this.getText(this.props.schema.label),value:n||``,onClick:()=>!this.props.schema.readOnly&&this.setState({showColorDialog:!0,colorDialogValue:n||``}),onChange:e=>{let t=e.target.value,n=this.props.attr&&this.onChange(this.props.attr,t);n instanceof Promise&&n.catch(e=>console.error(`Cannot set value: ${e}`))},slotProps:{htmlInput:{style:{backgroundColor:n,color:r?`#FFF`:`#000`},readOnly:this.props.schema.readOnly||!1},input:{endAdornment:!this.props.schema.readOnly&&n&&!this.props.schema.noClearButton?_.createElement(Zn,{tabIndex:-1,size:`small`,onClick:e=>{e.stopPropagation();let t=this.props.attr&&this.onChange(this.props.attr,``);t instanceof Promise&&t.catch(e=>console.error(`Cannot set value: ${e}`))}},_.createElement(De,null)):void 0},inputLabel:{shrink:!0}}}))}};g();var uc={width:{width:`calc(100% - 85px)`},width50:{width:120,marginRight:5}},dc=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);this.setState({value:e});let t={};this.props.schema.useSystemName&&(t.useSystem=!!X.getValue(this.props.data,this.props.schema.useSystemName)),this.props.schema.longitudeName&&this.props.schema.latitudeName?(t.longitude=X.getValue(this.props.data,this.props.schema.longitudeName),t.latitude=X.getValue(this.props.data,this.props.schema.latitudeName),!t.longitude&&!t.latitude&&this.props.schema.autoInit&&setTimeout(()=>this.getCoordinates(),300)):!X.getValue(this.props.data,this.props.attr)&&this.props.schema.autoInit&&setTimeout(()=>this.getCoordinates(),300),Object.keys(t).length&&setTimeout(()=>this.setState(t),50)}async getSystemCoordinates(){let e;try{e=this.props.oContext.socket.getCompactSystemConfig?await this.props.oContext.socket.getCompactSystemConfig():await this.getCachedObject(`system.config`)}catch(e){console.error(`Cannot get system configuration: ${e}`)}if(e!=null&&e.common&&(e.common.longitude||e.common.latitude))if(window.alert(J.t(`jc_Used system settings`)),this.props.schema.longitudeName&&this.props.schema.latitudeName)this.setState({longitude:e.common.longitude,latitude:e.common.latitude},async()=>{await this.onChange(this.props.schema.longitudeName,e.common.longitude),await this.onChange(this.props.schema.latitudeName,e.common.latitude)});else{let t=e.common.latitude+(this.props.schema.divider||`,`)+e.common.longitude;this.setState({value:t},()=>{let e=this.props.attr&&this.onChange(this.props.attr,t);e instanceof Promise&&e.catch(e=>console.error(`Cannot set value: ${e}`))})}else window.alert(J.t(`jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser`))}getCoordinates(){navigator.geolocation?navigator.geolocation.getCurrentPosition(async e=>{if(e!=null&&e.coords)if(this.props.schema.longitudeName&&this.props.schema.latitudeName)this.setState({longitude:e.coords.longitude,latitude:e.coords.latitude},async()=>{await this.onChange(this.props.schema.longitudeName,e.coords.longitude||``),await this.onChange(this.props.schema.latitudeName,e.coords.latitude||``)});else{let t=e.coords.latitude+(this.props.schema.divider||`,`)+e.coords.longitude;this.setState({value:t},()=>{let e=this.onChange(this.props.attr,t);e instanceof Promise&&e.catch(e=>console.error(`Cannot set value: ${e}`))})}else await this.getSystemCoordinates()},async e=>{console.error(`Cannot determine coordinates from browser: ${e.message}`),await this.getSystemCoordinates()}):this.getSystemCoordinates().catch(e=>{console.error(`Cannot determine coordinates: ${e}`)})}renderItem(e,t){return _.createElement(_.Fragment,null,this.props.schema.useSystemName?_.createElement(kn,{control:_.createElement(O,{checked:!!this.state.useSystem,onChange:e=>{let t=e.target.checked;t&&this.getSystemCoordinates().catch(e=>console.error(`Cannot determine coordinates: ${e}`)),this.setState({useSystem:t},()=>this.onChange(this.props.schema.useSystemName,t))}}),label:J.t(`jc_Use system settings for position`)}):null,this.props.schema.longitudeName&&this.props.schema.latitudeName?_.createElement(ot,{variant:`standard`,style:uc.width50,value:this.state.longitude??``,error:!!e,disabled:this.state.useSystem||!!t,onChange:e=>{let t=e.target.value;this.setState({longitude:t},()=>{let e=this.onChange(this.props.schema.longitudeName,(t||``).trim());e instanceof Promise&&e.catch(e=>console.error(`Cannot set value: ${e}`))})},label:J.t(`jc_Longitude`)}):null,this.props.schema.longitudeName&&this.props.schema.latitudeName?_.createElement(ot,{variant:`standard`,style:uc.width50,value:this.state.latitude??``,error:!!e,disabled:this.state.useSystem||!!t,onChange:e=>{let t=e.target.value;this.setState({latitude:t},()=>this.onChange(this.props.schema.latitudeName,(t||``).trim()))},label:J.t(`jc_Latitude`)}):null,!this.props.schema.longitudeName||!this.props.schema.latitudeName?_.createElement(ot,{variant:`standard`,style:uc.width,value:this.state.value??``,error:!!e,disabled:!!t,slotProps:{htmlInput:{maxLength:this.props.schema.maxLength||this.props.schema.max||void 0,readOnly:this.state.useSystem}},onChange:e=>{let t=e.target.value;this.setState({value:t},()=>this.onChange(this.props.attr,(t||``).trim()))},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)}):null,this.state.useSystem?null:_.createElement(Jn,{size:`small`,onClick:()=>this.getCoordinates(),title:J.t(`jc_Take browser position`),style:{marginRight:4}},_.createElement(Dn,null)),this.state.useSystem?null:_.createElement(Jn,{size:`small`,onClick:()=>this.getSystemCoordinates(),title:J.t(`jc_Take position from system settings`)},_.createElement(gt,null)))}};g();var fc=class extends _.Component{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error(`Custom component "${this.props.name}" from "${this.props.url||`unknown URL`}" crashed while rendering. It was probably built for an older admin version.`,e,t.componentStack)}componentDidUpdate(e){this.state.error&&(e.name!==this.props.name||e.url!==this.props.url)&&this.setState({error:null})}render(){return this.state.error?_.createElement(qn,{type:`error`,iconPosition:`top`},_.createElement(`div`,null,_.createElement(`div`,{style:{fontWeight:`bold`}},J.t(`jc_Cannot display the custom component "%s"`,this.props.name)),_.createElement(`div`,null,J.t(`jc_It was probably built for an older admin version. Please update the adapter.`)),_.createElement(`div`,{style:{marginTop:8,fontStyle:`italic`,wordBreak:`break-word`}},this.state.error.message||String(this.state.error)))):_.createElement(_.Fragment,null,this.props.children)}},pc=`@iobroker/gui-components`,mc=`@iobroker/adapter-react-v5`,hc=5e3,gc=new Map;async function _c(e){let t=e.lastIndexOf(`/`),n=`${t===-1?e:e.substring(0,t)}/mf-manifest.json`,r=gc.get(n);return r||(r=(async()=>{let e=new AbortController,t=setTimeout(()=>e.abort(),hc);try{let t=await fetch(n,{signal:e.signal});return t.ok?await t.json():null}catch{return null}finally{clearTimeout(t)}})(),gc.set(n,r)),r}function vc(e){let t=e==null?void 0:e.shared;return Array.isArray(t)?t.some(e=>(e==null?void 0:e.name)===mc)?mc:t.some(e=>(e==null?void 0:e.name)===pc)?pc:null:null}async function yc(e,t){let n=vc(await _c(e));return n===mc?{compatible:!1,declared:1,tooNew:!1}:typeof t==`number`&&Number.isFinite(t)?{compatible:t===2,declared:t,tooNew:t>2}:n===pc?{compatible:!0,declared:2,tooNew:!1}:{compatible:!1,declared:1,tooNew:!1}}g(),vs({name:`iobroker_admin`,shared:{},remotes:[]});var bc=class e extends X{constructor(e){super(e),Object.assign(this.state,{Component:null,error:``,incompatible:null})}async componentDidMount(){if(!this.props.schema.url){console.error(`URL is empty. Cannot load custom component!`),this.setState({error:`URL is empty. Cannot load custom component!`});return}let t;t=this.props.schema.url.startsWith(`http:`)||this.props.schema.url.startsWith(`https:`)?this.props.schema.url:this.props.schema.url.startsWith(`./`)?`${window.location.protocol}//${window.location.host}${this.props.schema.url.replace(/^\./,``)}`:`${window.location.protocol}//${window.location.host}/adapter/${this.props.oContext.adapterName}/${this.props.schema.url}`;let[n,r,...i]=this.props.schema.name.split(`/`),a=i.join(`/`);if(!t){console.error(`Cannot find URL for custom component! Please define "url" as "custom/customComponents.js" in the schema`);return}if(!n||!r||!a){console.error(`Invalid format of "name"! Please define "name" as "ConfigCustomBackItUpSet/Components/AdapterExist" in the schema`);return}let o=await yc(t,this.props.schema.guiApi);if(!o.compatible){console.warn(`Custom component "${this.props.schema.name}" from "${t}" was not started: it targets GUI API generation ${o.declared}, but this admin provides generation 2.`),this.setState({incompatible:o});return}let s=e.runningLoads[`${t}!${r}`];if(!(s instanceof Promise)){let i;if(this.props.schema.i18n===!0){let e=t.lastIndexOf(`/`),n;n=e===-1?t:t.substring(0,e);let r=J.getLanguage(),a=`${n}/i18n/${r}.json`;i=fetch(a).then(e=>e.json()).then(e=>J.extendTranslations(e,r)).catch(e=>{if(r!==`en`){fetch(`${n}/i18n/en.json`).then(e=>e.json()).then(e=>J.extendTranslations(e,r)).catch(e=>console.log(`Cannot load i18n "${a}": ${e}`));return}console.log(`Cannot load i18n "${a}": ${e}`)})}else if(this.props.schema.i18n&&typeof this.props.schema.i18n==`object`)try{J.extendTranslations(this.props.schema.i18n)}catch(e){console.error(`Cannot import i18n: ${e}`)}try{console.log(t,n,r,a),bs([{name:n,entry:t,type:`module`}]),s=ys(`${n}/${r}`),i instanceof Promise&&(s=Promise.all([s,i]).then(e=>e[0])),e.runningLoads[`${t}!${r}`]=s}catch(e){console.error(e),this.setState({error:`Cannot import from ${this.props.schema.url}: ${e}`})}}try{var c;let e=(c=await s)==null?void 0:c.default;if(e!=null&&e[a])this.setState({Component:e[a]});else{let t=Object.keys(e||{});console.error(`URL is empty. Cannot load custom component!`),this.setState({error:`Component ${this.props.schema.name} not found in ${this.props.schema.url}. Found: ${t.join(`, `)}`})}}catch(e){console.error(e),this.setState({error:`Cannot import from ${this.props.schema.url}: ${e}`})}}renderIncompatible(e){return _.createElement(qn,{type:`warning`,iconPosition:`top`},_.createElement(`div`,null,_.createElement(`div`,{style:{fontWeight:`bold`}},J.t(`jc_Custom component "%s" was not started`,this.props.schema.name)),_.createElement(`div`,null,e.tooNew?J.t(`jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.`,e.declared,2):J.t(`jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.`,e.declared,2))))}render(){let e=this.state.Component,t=this.props.schema||{},n=e?_.createElement(fc,{name:t.name,url:t.url},_.createElement(e,{...this.props,socket:this.props.oContext.socket,theme:this.props.oContext.theme,themeType:this.props.oContext.themeType,instance:this.props.oContext.instance,adapterName:this.props.oContext.adapterName,systemConfig:this.props.oContext.systemConfig,forceUpdate:this.props.oContext.forceUpdate})):this.state.incompatible?this.renderIncompatible(this.state.incompatible):this.state.error?_.createElement(`div`,null,this.state.error):_.createElement(Ze,null);return t.newLine?_.createElement(_.Fragment,null,_.createElement(`div`,{style:{flexBasis:`100%`,height:0}}),n):n}};K(bc,`runningLoads`,{});function xc(e,...t){let n=new URL(`https://mui.com/x/production-error`);return n.searchParams.set(`code`,e.toString()),t.forEach(e=>n.searchParams.append(`args[]`,e)),`MUI X error #${e}; visit ${n} for the full message.`}function Z(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Sc=e=>({components:{MuiLocalizationProvider:{defaultProps:{localeText:x({},e)}}}}),Cc={previousMonth:`Previous month`,nextMonth:`Next month`,openPreviousView:`Open previous view`,openNextView:`Open next view`,calendarViewSwitchingButtonAriaLabel:e=>e===`year`?`year view is open, switch to calendar view`:`calendar view is open, switch to year view`,start:`Start`,end:`End`,startDate:`Start date`,startTime:`Start time`,endDate:`End date`,endTime:`End time`,cancelButtonLabel:`Cancel`,clearButtonLabel:`Clear`,okButtonLabel:`OK`,todayButtonLabel:`Today`,nextStepButtonLabel:`Next`,datePickerToolbarTitle:`Select date`,dateTimePickerToolbarTitle:`Select date & time`,timePickerToolbarTitle:`Select time`,dateRangePickerToolbarTitle:`Select date range`,timeRangePickerToolbarTitle:`Select time range`,clockLabelText:(e,t)=>`Select ${e}. ${t?`Selected time is ${t}`:`No time selected`}`,hoursClockNumberText:e=>`${e} hours`,minutesClockNumberText:e=>`${e} minutes`,secondsClockNumberText:e=>`${e} seconds`,selectViewText:e=>`Select ${e}`,calendarWeekNumberHeaderLabel:`Week number`,calendarWeekNumberHeaderText:`#`,calendarWeekNumberAriaLabelText:e=>`Week ${e}`,calendarWeekNumberText:e=>`${e}`,openDatePickerDialogue:e=>e?`Choose date, selected date is ${e}`:`Choose date`,openTimePickerDialogue:e=>e?`Choose time, selected time is ${e}`:`Choose time`,openRangePickerDialogue:e=>e?`Choose range, selected range is ${e}`:`Choose range`,fieldClearLabel:`Clear`,timeTableLabel:`pick time`,dateTableLabel:`pick date`,fieldYearPlaceholder:e=>`Y`.repeat(e.digitAmount),fieldMonthPlaceholder:e=>e.contentType===`letter`?`MMMM`:`MM`,fieldDayPlaceholder:()=>`DD`,fieldWeekDayPlaceholder:e=>e.contentType===`letter`?`EEEE`:`EE`,fieldHoursPlaceholder:()=>`hh`,fieldMinutesPlaceholder:()=>`mm`,fieldSecondsPlaceholder:()=>`ss`,fieldMeridiemPlaceholder:()=>`aa`,year:`Year`,month:`Month`,day:`Day`,weekDay:`Week day`,hours:`Hours`,minutes:`Minutes`,seconds:`Seconds`,meridiem:`Meridiem`,empty:`Empty`},wc=Cc;Sc(Cc),g();var Tc=[`localeText`],Ec=v(null),Dc=function(e){let{localeText:t}=e,n=Z(e,Tc),{adapter:r,localeText:i}=b(Ec)??{adapter:void 0,localeText:void 0},{children:a,dateAdapter:o,dateFormats:s,dateLibInstance:c,adapterLocale:l,localeText:u}=cr({props:n,name:`MuiLocalizationProvider`}),d=p(()=>x({},u,i,t),[u,i,t]),f=p(()=>{if(!o)return r||null;let e=new o({locale:l,formats:s,instance:c});if(!e.isMUIAdapter)throw Error(xc(143));return e},[o,l,s,c,r]),m=p(()=>f?{minDate:f.date(`1900-01-01T00:00:00.000`),maxDate:f.date(`2099-12-31T00:00:00.000`)}:null,[f]),h=p(()=>({adapter:f,defaultDates:m,localeText:d}),[m,f,d]);return G(Ec.Provider,{value:h,children:a})};g();var Oc=()=>{let e=b(Ec);if(e===null)throw Error(xc(149));if(e.adapter===null)throw Error(xc(150));let t=p(()=>x({},wc,e.localeText),[e.localeText]);return p(()=>x({},e,{localeText:t}),[e,t])},kc=()=>Oc().adapter,Ac=()=>Oc().localeText,jc=[`disablePast`,`disableFuture`,`minDate`,`maxDate`,`shouldDisableDate`,`shouldDisableMonth`,`shouldDisableYear`],Mc=[`disablePast`,`disableFuture`,`minTime`,`maxTime`,`shouldDisableTime`,`minutesStep`,`ampm`,`disableIgnoringDatePartForTimeValidation`],Nc=[`minDateTime`,`maxDateTime`],Pc=[...jc,...Mc,...Nc],Fc=e=>Pc.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{});g();var Ic=[`value`,`defaultValue`,`referenceDate`,`format`,`formatDensity`,`onChange`,`timezone`,`onError`,`shouldRespectLeadingZeros`,`selectedSections`,`onSelectedSectionsChange`,`fieldRef`,`startFieldRef`,`endFieldRef`,`disabled`,`readOnly`,`dateSeparator`,`autoFocus`,`focused`],Lc=(e,t)=>p(()=>{let n=x({},e),r={},i=e=>{n.hasOwnProperty(e)&&(r[e]=n[e],delete n[e])};return Ic.forEach(i),t===`date`?jc.forEach(i):t===`time`?Mc.forEach(i):t===`date-time`&&(jc.forEach(i),Mc.forEach(i),Nc.forEach(i)),{forwardedProps:n,internalProps:r}},[e,t]),Rc=(e,t)=>e.length===t.length&&t.every(t=>e.includes(t)),zc=({openTo:e,defaultOpenTo:t,views:n,defaultViews:r})=>{let i=n??r,a;if(e!=null)a=e;else if(i.includes(t))a=t;else if(i.length>0)a=i[0];else throw Error(xc(153));return{views:i,openTo:a}},Bc=(e,t,n)=>{let r=t;return r=e.setHours(r,e.getHours(n)),r=e.setMinutes(r,e.getMinutes(n)),r=e.setSeconds(r,e.getSeconds(n)),r=e.setMilliseconds(r,e.getMilliseconds(n)),r},Vc=({date:e,disableFuture:t,disablePast:n,maxDate:r,minDate:i,isDateDisabled:a,adapter:o,timezone:s})=>{let c=Bc(o,o.date(void 0,s),e);n&&o.isBefore(i,c)&&(i=c),t&&o.isAfter(r,c)&&(r=c);let l=e,u=e;for(o.isBefore(e,i)&&(l=i,u=null),o.isAfter(e,r)&&(u&&=r,l=null);l||u;){if(l&&o.isAfter(l,r)&&(l=null),u&&o.isBefore(u,i)&&(u=null),l){if(!a(l))return l;l=o.addDays(l,1)}if(u){if(!a(u))return u;u=o.addDays(u,-1)}}return null},Hc=(e,t)=>e.isValid(t)?t:null,Uc=(e,t,n)=>t==null||!e.isValid(t)?n:t,Wc=(e,t,n)=>!e.isValid(t)&&t!=null&&!e.isValid(n)&&n!=null||e.isEqual(t,n),Gc=(e,t)=>{let n=[e.startOfYear(t)];for(;n.length<12;){let t=n[n.length-1];n.push(e.addMonths(t,1))}return n},Kc=(e,t,n)=>n===`date`?e.startOfDay(e.date(void 0,t)):e.date(void 0,t),qc=(e,t)=>{let n=e.setHours(e.date(),t===`am`?2:14);return e.format(n,`meridiem`)},Jc=[`year`,`month`,`day`],Yc=e=>Jc.includes(e),Xc=(e,{format:t,views:n},r)=>{if(t!=null)return t;let i=e.formats;return Rc(n,[`year`])?i.year:Rc(n,[`month`])?i.month:Rc(n,[`day`])?i.dayOfMonth:Rc(n,[`month`,`year`])?`${i.month} ${i.year}`:Rc(n,[`day`,`month`])?`${i.month} ${i.dayOfMonth}`:r?/en/.test(e.getCurrentLocaleCode())?i.normalDateWithWeekday:i.normalDate:i.keyboardDate},Zc=(e,t)=>{let n=e.startOfWeek(t);return[0,1,2,3,4,5,6].map(t=>e.addDays(n,t))},Qc=[`hours`,`minutes`,`seconds`],$c=[`hours`,`minutes`,`seconds`,`meridiem`],el=e=>Qc.includes(e),tl=e=>$c.includes(e),nl=(e,t)=>e?t.getHours(e)>=12?`pm`:`am`:null,rl=(e,t,n)=>n&&(e>=12?`pm`:`am`)!==t?t===`am`?e-12:e+12:e,il=(e,t,n,r)=>{let i=rl(r.getHours(e),t,n);return r.setHours(e,i)},al=(e,t)=>t.getHours(e)*3600+t.getMinutes(e)*60+t.getSeconds(e),ol=(e,t)=>(n,r)=>e?t.isAfter(n,r):al(n,t)>al(r,t),sl=(e,{format:t,views:n,ampm:r})=>{if(t!=null)return t;let i=e.formats;return Rc(n,[`hours`])?r?`${i.hours12h} ${i.meridiem}`:i.hours24h:Rc(n,[`minutes`])?i.minutes:Rc(n,[`seconds`])?i.seconds:Rc(n,[`minutes`,`seconds`])?`${i.minutes}:${i.seconds}`:Rc(n,[`hours`,`minutes`,`seconds`])?r?`${i.hours12h}:${i.minutes}:${i.seconds} ${i.meridiem}`:`${i.hours24h}:${i.minutes}:${i.seconds}`:r?`${i.hours12h}:${i.minutes} ${i.meridiem}`:`${i.hours24h}:${i.minutes}`},cl=(e,t)=>{let n=e.formatTokenMap[t];if(n==null)throw Error(xc(157,t));return typeof n==`string`?{type:n,contentType:n===`meridiem`?`letter`:`digit`,maxLength:void 0}:{type:n.sectionType,contentType:n.contentType,maxLength:n.maxLength}},ll=(e,t)=>{let n=[],r=e.date(void 0,`default`),i=e.startOfWeek(r),a=e.endOfWeek(r),o=i;for(;e.isBefore(o,a);)n.push(o),o=e.addDays(o,1);return n.map(n=>e.formatByString(n,t))},ul=(e,t,n,r)=>{switch(n){case`month`:return Gc(e,e.date(void 0,t)).map(t=>e.formatByString(t,r));case`weekDay`:return ll(e,r);case`meridiem`:{let n=e.date(void 0,t);return[e.startOfDay(n),e.endOfDay(n)].map(t=>e.formatByString(t,r))}default:return[]}},dl=`s`,fl=[`0`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],pl=e=>{let t=e.date(void 0);return e.formatByString(e.setSeconds(t,0),dl)===`0`?fl:Array.from({length:10}).map((n,r)=>e.formatByString(e.setSeconds(t,r),dl))},ml=(e,t)=>{if(t[0]===`0`)return e;let n=[],r=``;for(let i=0;i<e.length;i+=1){r+=e[i];let a=t.indexOf(r);a>-1&&(n.push(a.toString()),r=``)}return n.join(``)},hl=(e,t)=>t[0]===`0`?e:e.split(``).map(e=>t[Number(e)]).join(``),gl=(e,t)=>{let n=ml(e,t);return n!==` `&&!Number.isNaN(Number(n))},_l=(e,t)=>Number(e).toString().padStart(t,`0`),vl=(e,t,n,r,i)=>{if(i.type===`day`&&i.contentType===`digit-with-letter`){let r=e.setDate(n.longestMonth,t);return e.formatByString(r,i.format)}let a=t.toString();return i.hasLeadingZerosInInput&&(a=_l(a,i.maxLength)),hl(a,r)},yl=(e,t,n)=>{let r=e.value||e.placeholder,i=t===`non-input`?e.hasLeadingZerosInFormat:e.hasLeadingZerosInInput;return t===`non-input`&&e.hasLeadingZerosInInput&&!e.hasLeadingZerosInFormat&&(r=Number(ml(r,n)).toString()),[`input-rtl`,`input-ltr`].includes(t)&&e.contentType===`digit`&&!i&&r.length===1&&(r=`${r}\u200e`),t===`input-rtl`&&(r=`\u2068${r}\u2069`),r},bl=(e,t,n,r)=>e.formatByString(e.parse(t,n),r),xl=(e,t)=>e.formatByString(e.date(void 0,`system`),t).length===4,Sl=(e,t,n,r)=>{if(t!==`digit`)return!1;let i=e.date(void 0,`default`);switch(n){case`year`:return e.lib===`dayjs`&&r===`YY`||e.formatByString(e.setYear(i,1),r).startsWith(`0`);case`month`:return e.formatByString(e.startOfYear(i),r).length>1;case`day`:return e.formatByString(e.startOfMonth(i),r).length>1;case`weekDay`:return e.formatByString(e.startOfWeek(i),r).length>1;case`hours`:return e.formatByString(e.setHours(i,1),r).length>1;case`minutes`:return e.formatByString(e.setMinutes(i,1),r).length>1;case`seconds`:return e.formatByString(e.setSeconds(i,1),r).length>1;default:throw Error(xc(158))}},Cl=(e,t,n)=>{let r=t.some(e=>e.type===`day`),i=[],a=[];for(let e=0;e<t.length;e+=1){let o=t[e];r&&o.type===`weekDay`||(i.push(o.format),a.push(yl(o,`non-input`,n)))}let o=i.join(` `),s=a.join(` `);return e.parse(s,o)},wl=e=>e.map(e=>`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`).join(``),Tl=(e,t,n)=>{let r=e.date(void 0,n),i=e.endOfYear(r),a=e.endOfDay(r),{maxDaysInMonth:o,longestMonth:s}=Gc(e,r).reduce((t,n)=>{let r=e.getDaysInMonth(n);return r>t.maxDaysInMonth?{maxDaysInMonth:r,longestMonth:n}:t},{maxDaysInMonth:0,longestMonth:null});return{year:({format:t})=>({minimum:0,maximum:xl(e,t)?9999:99}),month:()=>({minimum:1,maximum:e.getMonth(i)+1}),day:({currentDate:t})=>({minimum:1,maximum:e.isValid(t)?e.getDaysInMonth(t):o,longestMonth:s}),weekDay:({format:t,contentType:n})=>{if(n===`digit`){let n=ll(e,t).map(Number);return{minimum:Math.min(...n),maximum:Math.max(...n)}}return{minimum:1,maximum:7}},hours:({format:n})=>{let i=e.getHours(a),o=Number(ml(e.formatByString(e.startOfDay(r),n),t)),s=Number(ml(e.formatByString(e.endOfDay(r),n),t));return s===i?o>i?{minimum:1,maximum:o}:{minimum:0,maximum:i}:o===0?{minimum:0,maximum:s}:{minimum:1,maximum:o}},minutes:()=>({minimum:0,maximum:e.getMinutes(a)}),seconds:()=>({minimum:0,maximum:e.getSeconds(a)}),meridiem:()=>({minimum:0,maximum:1}),empty:()=>({minimum:0,maximum:0})}},El=(e,t,n,r)=>{switch(t.type){case`year`:return e.setYear(r,e.getYear(n));case`month`:return e.setMonth(r,e.getMonth(n));case`weekDay`:{let r=e.formatByString(n,t.format);t.hasLeadingZerosInInput&&(r=_l(r,t.maxLength));let i=ll(e,t.format),a=i.indexOf(r),o=i.indexOf(t.value)-a;return e.addDays(n,o)}case`day`:return e.setDate(r,e.getDate(n));case`meridiem`:return il(r,e.getHours(n)<12?`am`:`pm`,!0,e);case`hours`:return e.setHours(r,e.getHours(n));case`minutes`:return e.setMinutes(r,e.getMinutes(n));case`seconds`:return e.setSeconds(r,e.getSeconds(n));default:return r}},Dl={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8,empty:9},Ol=(e,t,n,r,i)=>[...n].sort((e,t)=>Dl[e.type]-Dl[t.type]).reduce((n,r)=>!i||r.modified?El(e,r,t,n):n,r),kl=e=>{let t={};return e.forEach((n,r)=>{let i=r===0?null:r-1,a=r===e.length-1?null:r+1;t[r]={leftIndex:i,rightIndex:a}}),{neighbors:t,startIndex:0,endIndex:e.length-1}},Al=(e,t)=>{if(e==null)return null;if(e===`all`)return`all`;if(typeof e==`string`){let n=t.findIndex(t=>t.type===e);return n===-1?null:n}return e},jl=({adapter:e,format:t})=>{let n=10,r=t,i=e.expandFormat(t);for(;i!==r;)if(r=i,i=e.expandFormat(r),--n,n<0)throw Error(xc(154));return i},Ml=({adapter:e,expandedFormat:t})=>{let n=[],{start:r,end:i}=e.escapedCharacters,a=RegExp(`(\\${r}[^\\${i}]*\\${i})+`,`g`),o=null;for(;o=a.exec(t);)n.push({start:o.index,end:a.lastIndex-1});return n},Nl=(e,t,n,r)=>{switch(n.type){case`year`:return t.fieldYearPlaceholder({digitAmount:e.formatByString(e.date(void 0,`default`),r).length,format:r});case`month`:return t.fieldMonthPlaceholder({contentType:n.contentType,format:r});case`day`:return t.fieldDayPlaceholder({format:r});case`weekDay`:return t.fieldWeekDayPlaceholder({contentType:n.contentType,format:r});case`hours`:return t.fieldHoursPlaceholder({format:r});case`minutes`:return t.fieldMinutesPlaceholder({format:r});case`seconds`:return t.fieldSecondsPlaceholder({format:r});case`meridiem`:return t.fieldMeridiemPlaceholder({format:r});default:return r}},Pl=({adapter:e,date:t,shouldRespectLeadingZeros:n,localeText:r,localizedDigits:i,now:a,token:o,startSeparator:s})=>{if(o===``)throw Error(xc(155));let c=cl(e,o),l=Sl(e,c.contentType,c.type,o),u=n?l:c.contentType===`digit`,d=e.isValid(t),f=d?e.formatByString(t,o):``,p=null;if(u)if(l)p=f===``?e.formatByString(a,o).length:f.length;else{if(c.maxLength==null)throw Error(xc(156,o));p=c.maxLength,d&&(f=hl(_l(ml(f,i),p),i))}return x({},c,{format:o,maxLength:p,value:f,placeholder:Nl(e,r,c,o),hasLeadingZerosInFormat:l,hasLeadingZerosInInput:u,startSeparator:s,endSeparator:``,modified:!1})},Fl=e=>{let{adapter:t,expandedFormat:n,escapedParts:r}=e,i=t.date(void 0),a=[],o=``,s=Object.keys(t.formatTokenMap).sort((e,t)=>t.length-e.length),c=/^([a-zA-Z]+)/,l=RegExp(`^(${s.join(`|`)})*$`),u=RegExp(`^(${s.join(`|`)})`),d=e=>r.find(t=>t.start<=e&&t.end>=e),f=0;for(;f<n.length;){var p;let t=d(f),r=t!=null,s=(p=c.exec(n.slice(f)))==null?void 0:p[1];if(!r&&s!=null&&l.test(s)){let t=s;for(;t.length>0;){let n=u.exec(t)[1];t=t.slice(n.length),a.push(Pl(x({},e,{now:i,token:n,startSeparator:o}))),o=``}f+=s.length}else{let e=n[f];r&&(t==null?void 0:t.start)===f||(t==null?void 0:t.end)===f||(a.length===0?o+=e:(a[a.length-1].endSeparator+=e,a[a.length-1].isEndFormatSeparator=!0)),f+=1}}return a.length===0&&o.length>0&&a.push({type:`empty`,contentType:`letter`,maxLength:null,format:``,value:``,placeholder:``,hasLeadingZerosInFormat:!1,hasLeadingZerosInInput:!1,startSeparator:o,endSeparator:``,modified:!1}),a},Il=({isRtl:e,formatDensity:t,sections:n})=>n.map(n=>{let r=n=>{let r=n;return e&&r!==null&&r.includes(` `)&&(r=`\u2069${r}\u2066`),t===`spacious`&&[`/`,`.`,`-`].includes(r)&&(r=` ${r} `),r};return n.startSeparator=r(n.startSeparator),n.endSeparator=r(n.endSeparator),n}),Ll=e=>{let t=jl(e);e.isRtl&&(t=t.split(` `).reverse().join(` `));let n=Ml(x({},e,{expandedFormat:t})),r=Fl(x({},e,{expandedFormat:t,escapedParts:n}));return Il(x({},e,{sections:r}))};g();var Rl=v(null),zl=()=>{let e=b(Rl);if(e==null)throw Error(xc(151));return e};g();var Bl=()=>b(Rl);g();var Vl=(e={})=>{let t=Bl(),n=kc(),r=Ac(),i=p(()=>pl(n),[n]),{format:a=(t==null?void 0:t.fieldFormat)??n.formats.fullDate}=e;return p(()=>Ll({adapter:n,format:a,formatDensity:`dense`,isRtl:!1,shouldRespectLeadingZeros:!0,localeText:r,localizedDigits:i,date:null}).map(e=>`${e.startSeparator}${e.placeholder}${e.endSeparator}`).join(``),[n,r,i,a])};g();var Hl=v(()=>!0);function Ul(){return b(Hl)}g();var Wl=v(null);function Gl(){return b(Wl)}g();var Kl=v(null),ql=v({ownerState:{isPickerDisabled:!1,isPickerReadOnly:!1,isPickerValueEmpty:!1,isPickerOpen:!1,pickerVariant:`desktop`,pickerOrientation:`portrait`},rootRefObject:{current:null},labelId:void 0,dismissViews:()=>{},hasUIView:!0,getCurrentViewMode:()=>`UI`,triggerElement:null,viewContainerRole:null,defaultActionBarActions:[],onPopperExited:void 0});function Jl(e){let{contextValue:t,actionsContextValue:n,privateContextValue:r,fieldPrivateContextValue:i,isValidContextValue:a,localeText:o,children:s}=e;return G(Rl.Provider,{value:t,children:G(Kl.Provider,{value:n,children:G(ql.Provider,{value:r,children:G(Wl.Provider,{value:i,children:G(Hl.Provider,{value:a,children:G(Dc,{localeText:o,children:s})})})})})})}g();var Yl=()=>{let e=b(Kl);if(e==null)throw Error(xc(148));return e};g();var Xl=()=>Oc().defaultDates,Zl=e=>{let t=kc(),n=l(void 0);return n.current===void 0&&(n.current=t.date(void 0,e)),n.current};g();var Ql=Yt(G(`path`,{d:`M7 10l5 5 5-5z`}),`ArrowDropDown`),$l=Yt(G(`path`,{d:`M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z`}),`ArrowLeft`),eu=Yt(G(`path`,{d:`M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z`}),`ArrowRight`),tu=Yt(G(`path`,{d:`M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z`}),`Calendar`),nu=Yt(Je(y,{children:[G(`path`,{d:`M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z`}),G(`path`,{d:`M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z`})]}),`Clock`),ru=Yt(G(`path`,{d:`M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z`}),`DateRange`),iu=Yt(Je(y,{children:[G(`path`,{d:`M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z`}),G(`path`,{d:`M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z`})]}),`Time`),au=Yt(G(`path`,{d:`M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z`}),`Clear`);function ou(e){return Ne(`MuiPickersArrowSwitcher`,e)}ke(`MuiPickersArrowSwitcher`,[`root`,`spacer`,`button`,`previousIconButton`,`nextIconButton`,`leftArrowIcon`,`rightArrowIcon`]),g();var su=()=>b(ql);g();var cu=[`children`,`className`,`slots`,`slotProps`,`isNextDisabled`,`isNextHidden`,`onGoToNext`,`nextLabel`,`isPreviousDisabled`,`isPreviousHidden`,`onGoToPrevious`,`previousLabel`,`labelId`,`classes`],lu=[`ownerState`],uu=[`ownerState`],du=q(`div`,{name:`MuiPickersArrowSwitcher`,slot:`Root`})({display:`flex`}),fu=q(`div`,{name:`MuiPickersArrowSwitcher`,slot:`Spacer`})(({theme:e})=>({width:e.spacing(3)})),pu=q(mn,{name:`MuiPickersArrowSwitcher`,slot:`Button`})({variants:[{props:{isButtonHidden:!0},style:{visibility:`hidden`}}]}),mu=e=>B({root:[`root`],spacer:[`spacer`],button:[`button`],previousIconButton:[`previousIconButton`],nextIconButton:[`nextIconButton`],leftArrowIcon:[`leftArrowIcon`],rightArrowIcon:[`rightArrowIcon`]},ou,e),hu=o(function(e,t){let n=dn(),r=cr({props:e,name:`MuiPickersArrowSwitcher`}),{children:i,className:a,slots:o,slotProps:s,isNextDisabled:c,isNextHidden:l,onGoToNext:u,nextLabel:d,isPreviousDisabled:f,isPreviousHidden:p,onGoToPrevious:m,previousLabel:h,labelId:g,classes:_}=r,v=Z(r,cu),{ownerState:y}=su(),b=mu(_),S={isDisabled:c,isHidden:l,goTo:u,label:d},C={isDisabled:f,isHidden:p,goTo:m,label:h},w=(o==null?void 0:o.previousIconButton)??pu,T=Vn({elementType:w,externalSlotProps:s==null?void 0:s.previousIconButton,additionalProps:{size:`medium`,title:C.label,"aria-label":C.label,disabled:C.isDisabled,edge:`end`,onClick:C.goTo},ownerState:x({},y,{isButtonHidden:C.isHidden??!1}),className:Ve(b.button,b.previousIconButton)}),E=(o==null?void 0:o.nextIconButton)??pu,D=Vn({elementType:E,externalSlotProps:s==null?void 0:s.nextIconButton,additionalProps:{size:`medium`,title:S.label,"aria-label":S.label,disabled:S.isDisabled,edge:`start`,onClick:S.goTo},ownerState:x({},y,{isButtonHidden:S.isHidden??!1}),className:Ve(b.button,b.nextIconButton)}),O=(o==null?void 0:o.leftArrowIcon)??$l,k=Z(Vn({elementType:O,externalSlotProps:s==null?void 0:s.leftArrowIcon,additionalProps:{fontSize:`inherit`},ownerState:y,className:b.leftArrowIcon}),lu),A=(o==null?void 0:o.rightArrowIcon)??eu,j=Z(Vn({elementType:A,externalSlotProps:s==null?void 0:s.rightArrowIcon,additionalProps:{fontSize:`inherit`},ownerState:y,className:b.rightArrowIcon}),uu);return Je(du,x({ref:t,className:Ve(b.root,a),ownerState:y},v,{children:[G(w,x({},T,{children:n?G(A,x({},j)):G(O,x({},k))})),i?G(Pt,{variant:`subtitle1`,component:`span`,id:g,children:i}):G(fu,{className:b.spacer,ownerState:y}),G(E,x({},D,{children:n?G(O,x({},k)):G(A,x({},j))}))]}))}),gu={hasNextStep:!1,hasSeveralSteps:!1,goToNextStep:()=>{},areViewsInSameStep:()=>!0};function _u(e){let{steps:t,isViewMatchingStep:n,onStepChange:r}=e;return e=>{if(t==null)return gu;let i=t.findIndex(t=>n(e.view,t)),a=i===-1||i===t.length-1?null:t[i+1];return{hasNextStep:a!=null,hasSeveralSteps:t.length>1,goToNextStep:()=>{a!=null&&r(x({},e,{step:a}))},areViewsInSameStep:(e,r)=>t.find(t=>n(e,t))===t.find(e=>n(r,e))}}}g();function vu({onChange:e,onViewChange:t,openTo:n,view:r,views:i,autoFocus:o,focusedView:s,onFocusedViewChange:c,getStepNavigation:u}){let d=l(n),f=l(i),p=l(i.includes(n)?n:i[0]),[m,h]=$t({name:`useViews`,state:`view`,controlled:r,default:p.current}),g=l(o?m:null),[_,v]=$t({name:`useViews`,state:`focusedView`,controlled:s,default:g.current}),y=u?u({setView:h,view:m,defaultView:p.current,views:i}):gu;a(()=>{(d.current&&d.current!==n||f.current&&f.current.some(e=>!i.includes(e)))&&(h(i.includes(n)?n:i[0]),f.current=i,d.current=n)},[n,h,m,i]);let b=i.indexOf(m),S=i[b-1]??null,C=i[b+1]??null,w=Y((e,t)=>{v(t?e:t=>e===t?null:t),c==null||c(e,t)}),T=Y(e=>{w(e,!0),e!==m&&(h(e),t&&t(e))}),E=Y(()=>{C&&T(C)}),D=Y((t,n,r)=>{let a=n===`finish`,o=r?i.indexOf(r)<i.length-1:!!C;e(t,a&&o?`partial`:n,r);let s=null;if(r!=null&&r!==m?s=r:a&&(s=m),s==null)return;let c=i[i.indexOf(s)+1];c==null||!y.areViewsInSameStep(s,c)||T(c)});return x({},y,{view:m,setView:T,focusedView:_,setFocusedView:w,nextView:C,previousView:S,defaultView:i.includes(n)?n:i[0],goToNextView:E,setValueAndGoToNextView:D})}g();function yu(e,{disableFuture:t,maxDate:n,timezone:r}){let i=kc();return p(()=>{let a=i.date(void 0,r),o=i.startOfMonth(t&&i.isBefore(a,n)?a:n);return!i.isAfter(o,e)},[t,n,e,i,r])}function bu(e,{disablePast:t,minDate:n,timezone:r}){let i=kc();return p(()=>{let a=i.date(void 0,r),o=i.startOfMonth(t&&i.isAfter(a,n)?a:n);return!i.isBefore(o,i.startOfMonth(e))},[t,n,e,i,r])}function xu(e,t,n,r){let i=kc(),a=p(()=>i.isValid(e)?e:null,[i,e]);return{meridiemMode:nl(a,i),handleMeridiemChange:f(e=>{n(a==null?null:il(a,e,!!t,i),r??`partial`)},[t,a,n,r,i])}}var Su=q(`div`,{slot:`internal`,shouldForwardProp:void 0})({overflow:`hidden`,width:320,maxHeight:336,display:`flex`,flexDirection:`column`,margin:`0 auto`});function Cu(e){return Ne(`MuiTimeClock`,e)}var wu=ke(`MuiTimeClock`,[`root`,`arrowSwitcher`]),Tu={x:220/2,y:220/2},Eu={x:Tu.x,y:0},Du=Eu.x-Tu.x,Ou=Eu.y-Tu.y,ku=e=>180/Math.PI*e,Au=(e,t,n)=>{let r=t-Tu.x,i=n-Tu.y,a=ku(Math.atan2(Du,Ou)-Math.atan2(r,i));a=Math.round(a/e)*e,a%=360;let o=Math.floor(a/e)||0,s=r**2+i**2;return{value:o,distance:Math.sqrt(s)}},ju=(e,t,n=1)=>{let{value:r}=Au(n*6,e,t);return r=r*n%60,r},Mu=(e,t,n)=>{let{value:r,distance:i}=Au(30,e,t),a=r||12;return n?a%=12:i<220/2-36&&(a+=12,a%=24),a};function Nu(e){return Ne(`MuiClockPointer`,e)}var Pu=ke(`MuiClockPointer`,[`root`,`thumb`]);g();var Fu=[`className`,`classes`,`isBetweenTwoClockValues`,`isInner`,`type`,`viewValue`],Iu=e=>B({root:[`root`],thumb:[`thumb`]},Nu,e),Lu=q(`div`,{name:`MuiClockPointer`,slot:`Root`})(({theme:e})=>({width:2,backgroundColor:(e.vars||e).palette.primary.main,position:`absolute`,left:`calc(50% - 1px)`,bottom:`50%`,transformOrigin:`center bottom 0px`,variants:[{props:{isClockPointerAnimated:!0},style:{transition:e.transitions.create([`transform`,`height`])}}]})),Ru=q(`div`,{name:`MuiClockPointer`,slot:`Thumb`})(({theme:e})=>({width:4,height:4,backgroundColor:(e.vars||e).palette.primary.contrastText,borderRadius:`50%`,position:`absolute`,top:-21,left:`calc(50% - ${36/2}px)`,border:`${32/2}px solid ${(e.vars||e).palette.primary.main}`,boxSizing:`content-box`,variants:[{props:{isClockPointerBetweenTwoValues:!1},style:{backgroundColor:(e.vars||e).palette.primary.main}}]}));function zu(e){let t=cr({props:e,name:`MuiClockPointer`}),{className:n,classes:r,isBetweenTwoClockValues:i,isInner:o,type:s,viewValue:c}=t,u=Z(t,Fu),d=l(s);a(()=>{d.current=s},[s]);let{ownerState:f}=su(),p=x({},f,{isClockPointerAnimated:d.current!==s,isClockPointerBetweenTwoValues:i}),m=Iu(r);return G(Lu,x({style:(()=>{let e=360/(s===`hours`?12:60)*c;return s===`hours`&&c>12&&(e-=360),{height:Math.round((o?.26:.4)*220),transform:`rotateZ(${e}deg)`}})(),className:Ve(m.root,n),ownerState:p},u,{children:G(Ru,{ownerState:p,className:m.thumb})}))}function Bu(e){return Ne(`MuiClock`,e)}var Vu=ke(`MuiClock`,[`root`,`clock`,`wrapper`,`squareMask`,`pin`,`amButton`,`pmButton`,`meridiemText`,`selected`]);g();var Hu=(e,t)=>{let n={root:[`root`],clock:[`clock`],wrapper:[`wrapper`],squareMask:[`squareMask`],pin:[`pin`],amButton:[`amButton`,t.clockMeridiemMode===`am`&&`selected`],pmButton:[`pmButton`,t.clockMeridiemMode===`pm`&&`selected`],meridiemText:[`meridiemText`]};return B(n,Bu,e)},Uu=q(`div`,{name:`MuiClock`,slot:`Root`})(({theme:e})=>({display:`flex`,justifyContent:`center`,alignItems:`center`,margin:e.spacing(2)})),Wu=q(`div`,{name:`MuiClock`,slot:`Clock`})({backgroundColor:`rgba(0,0,0,.07)`,borderRadius:`50%`,height:220,width:220,flexShrink:0,position:`relative`,pointerEvents:`none`}),Gu=q(`div`,{name:`MuiClock`,slot:`Wrapper`})({"&:focus":{outline:`none`}}),Ku=q(`div`,{name:`MuiClock`,slot:`SquareMask`})({width:`100%`,height:`100%`,position:`absolute`,pointerEvents:`auto`,outline:0,touchAction:`none`,userSelect:`none`,variants:[{props:{isClockDisabled:!1},style:{"@media (pointer: fine)":{cursor:`pointer`,borderRadius:`50%`},"&:active":{cursor:`move`}}}]}),qu=q(`div`,{name:`MuiClock`,slot:`Pin`})(({theme:e})=>({width:6,height:6,borderRadius:`50%`,backgroundColor:(e.vars||e).palette.primary.main,position:`absolute`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`})),Ju=(e,t)=>({zIndex:1,bottom:8,paddingLeft:4,paddingRight:4,width:36,variants:[{props:{clockMeridiemMode:t},style:{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:hover":{backgroundColor:(e.vars||e).palette.primary.light}}}]}),Yu=q(mn,{name:`MuiClock`,slot:`AmButton`})(({theme:e})=>x({},Ju(e,`am`),{position:`absolute`,left:8})),Xu=q(mn,{name:`MuiClock`,slot:`PmButton`})(({theme:e})=>x({},Ju(e,`pm`),{position:`absolute`,right:8})),Zu=q(Pt,{name:`MuiClock`,slot:`MeridiemText`})({overflow:`hidden`,whiteSpace:`nowrap`,textOverflow:`ellipsis`});function Qu(e){let{ampm:t,ampmInClock:n,autoFocus:r,children:i,value:o,handleMeridiemChange:s,isTimeDisabled:c,meridiemMode:u,minutesStep:d=1,onChange:f,selectedId:p,type:m,viewValue:h,viewRange:[g,_],disabled:v=!1,readOnly:b,className:S,classes:C}=cr({props:e,name:`MuiClock`}),w=kc(),T=Ac(),{ownerState:E}=su(),D=x({},E,{isClockDisabled:v,clockMeridiemMode:u}),O=l(!1),k=l(null),A=l(null),M=l(void 0),N=Hu(C,D),ee=c(h,m),P=!t&&m===`hours`&&(h<1||h>12),F=(e,t)=>{v||b||c(e,m)||f(e,t)},I=(e,n)=>{let r=A.current;if(!r)return;let i=r.getBoundingClientRect(),a=e.clientX-i.left,o=e.clientY-i.top,s=m===`seconds`||m===`minutes`?ju(a,o,d):Mu(a,o,!!t);F(s,n)},L=()=>{var e;O.current=!1,k.current=null,(e=M.current)==null||e.call(M)},te=Y(e=>{e.pointerId===k.current&&(e.preventDefault(),I(e,`shallow`))}),ne=Y(e=>{e.pointerId===k.current&&(L(),I(e,`finish`))}),z=Y(e=>{e.pointerId===k.current&&L()}),B=e=>{if(e.button>0||e.isPrimary===!1||v||b)return;L(),O.current=!0,k.current=e.pointerId;let t=R(A.current);t.addEventListener(`pointermove`,te),t.addEventListener(`pointerup`,ne),t.addEventListener(`pointercancel`,z),M.current=()=>{t.removeEventListener(`pointermove`,te),t.removeEventListener(`pointerup`,ne),t.removeEventListener(`pointercancel`,z),M.current=void 0},I(e.nativeEvent,`shallow`)},re=m!==`hours`&&h%5!=0,ie=m===`minutes`?d:1,ae=l(null);j(()=>{r&&ae.current.focus()},[r]),a(()=>()=>{var e;return(e=M.current)==null?void 0:e.call(M)},[]);let oe=e=>Math.max(g,Math.min(_,e)),V=e=>(e+(_+1))%(_+1);return Je(Uu,{className:Ve(N.root,S),children:[Je(Wu,{className:N.clock,children:[G(Ku,{ref:A,onPointerDown:B,ownerState:D,className:N.squareMask}),!ee&&Je(y,{children:[G(qu,{className:N.pin}),o!=null&&G(zu,{type:m,viewValue:h,isInner:P,isBetweenTwoClockValues:re})]}),G(Gu,{"aria-activedescendant":p,"aria-label":T.clockLabelText(m,o==null?null:w.format(o,t?`fullTime12h`:`fullTime24h`)),ref:ae,role:`listbox`,onKeyDown:e=>{if(!O.current)switch(e.key){case`Home`:F(g,`partial`),e.preventDefault();break;case`End`:F(_,`partial`),e.preventDefault();break;case`ArrowUp`:F(V(h+ie),`partial`),e.preventDefault();break;case`ArrowDown`:F(V(h-ie),`partial`),e.preventDefault();break;case`PageUp`:F(oe(h+5),`partial`),e.preventDefault();break;case`PageDown`:F(oe(h-5),`partial`),e.preventDefault();break;case`Enter`:case` `:F(h,`finish`),e.preventDefault()}},tabIndex:0,className:N.wrapper,children:i})]}),t&&n&&Je(y,{children:[G(Yu,{onClick:b?void 0:()=>s(`am`),disabled:v||u===null,ownerState:D,className:N.amButton,title:qc(w,`am`),children:G(Zu,{variant:`caption`,className:N.meridiemText,children:qc(w,`am`)})}),G(Xu,{disabled:v||u===null,onClick:b?void 0:()=>s(`pm`),ownerState:D,className:N.pmButton,title:qc(w,`pm`),children:G(Zu,{variant:`caption`,className:N.meridiemText,children:qc(w,`pm`)})})]})]})}function $u(e){return Ne(`MuiClockNumber`,e)}var ed=ke(`MuiClockNumber`,[`root`,`selected`,`disabled`]);g();var td=[`className`,`classes`,`disabled`,`index`,`inner`,`label`,`selected`],nd=(e,t)=>{let n={root:[`root`,t.isClockNumberSelected&&`selected`,t.isClockNumberDisabled&&`disabled`]};return B(n,$u,e)},rd=q(`span`,{name:`MuiClockNumber`,slot:`Root`,overridesResolver:(e,t)=>[t.root,{[`&.${ed.disabled}`]:t.disabled},{[`&.${ed.selected}`]:t.selected}]})(({theme:e})=>({height:36,width:36,position:`absolute`,left:`calc((100% - 36px) / 2)`,display:`inline-flex`,justifyContent:`center`,alignItems:`center`,borderRadius:`50%`,color:(e.vars||e).palette.text.primary,fontFamily:e.typography.fontFamily,"&:focused":{backgroundColor:(e.vars||e).palette.background.paper},[`&.${ed.selected}`]:{color:(e.vars||e).palette.primary.contrastText},[`&.${ed.disabled}`]:{pointerEvents:`none`,color:(e.vars||e).palette.text.disabled},variants:[{props:{isClockNumberInInnerRing:!0},style:x({},e.typography.body2,{color:(e.vars||e).palette.text.secondary})}]}));function id(e){let t=cr({props:e,name:`MuiClockNumber`}),{className:n,classes:r,disabled:i,index:a,inner:o,label:s,selected:c}=t,l=Z(t,td),{ownerState:u}=su(),d=x({},u,{isClockNumberInInnerRing:o,isClockNumberSelected:c,isClockNumberDisabled:i}),f=nd(r,d),p=a%12/12*Math.PI*2-Math.PI/2,m=182/2*(o?.65:1),h=Math.round(Math.cos(p)*m),g=Math.round(Math.sin(p)*m);return G(rd,x({className:Ve(f.root,n),"aria-disabled":i?!0:void 0,"aria-selected":c?!0:void 0,role:`option`,style:{transform:`translate(${h}px, ${g+184/2}px`},ownerState:d},l,{children:s}))}g();var ad=({ampm:e,value:t,getClockNumberText:n,isDisabled:r,selectedId:i,adapter:a})=>{let o=t?a.getHours(t):null,s=[],c=+!!e,l=e?12:23,u=t=>o===null?!1:e?t===12?o===12||o===0:o===t||o-12===t:o===t;for(let t=c;t<=l;t+=1){let o=t.toString();t===0&&(o=`00`);let c=!e&&(t===0||t>12);o=a.formatNumber(o);let l=u(t);s.push(G(id,{id:l?i:void 0,index:t,inner:c,selected:l,disabled:r(t),label:o,"aria-label":n(o)},t))}return s},od=({adapter:e,value:t,isDisabled:n,getClockNumberText:r,selectedId:i})=>{let a=e.formatNumber;return[[5,a(`05`)],[10,a(`10`)],[15,a(`15`)],[20,a(`20`)],[25,a(`25`)],[30,a(`30`)],[35,a(`35`)],[40,a(`40`)],[45,a(`45`)],[50,a(`50`)],[55,a(`55`)],[0,a(`00`)]].map(([e,a],o)=>{let s=e===t;return G(id,{label:a,id:s?i:void 0,index:o+1,inner:!1,disabled:n(e),selected:s,"aria-label":r(a)},e)})};g();var sd=({name:e,timezone:t,value:n,defaultValue:r,referenceDate:i,onChange:a,valueManager:o})=>{let s=kc(),[c,l]=$t({name:e,state:`value`,controlled:n,default:r??o.emptyValue}),u=p(()=>o.getTimezone(s,c),[s,o,c]),d=Y(e=>u==null?e:o.setTimezone(s,u,e)),f=p(()=>t||u||(i?s.getTimezone(Array.isArray(i)?i[0]:i):`default`),[t,u,i,s]);return{value:p(()=>o.setTimezone(s,f,c),[o,s,f,c]),handleValueChange:Y((e,...t)=>{let n=d(e);l(n),a==null||a(n,...t)}),timezone:f}},cd={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},ld=e=>Math.max(...e.map(e=>cd[e.type]??1)),ud=(e,t,n)=>{if(t===cd.year)return e.startOfYear(n);if(t===cd.month)return e.startOfMonth(n);if(t===cd.day)return e.startOfDay(n);let r=n;return t<cd.minutes&&(r=e.setMinutes(r,0)),t<cd.seconds&&(r=e.setSeconds(r,0)),t<cd.milliseconds&&(r=e.setMilliseconds(r,0)),r},dd=({props:e,adapter:t,granularity:n,timezone:r,getTodayDate:i})=>{let a=i?i():ud(t,n,Kc(t,r));e.minDate!=null&&t.isAfterDay(e.minDate,a)&&(a=ud(t,n,e.minDate)),e.maxDate!=null&&t.isBeforeDay(e.maxDate,a)&&(a=ud(t,n,e.maxDate));let o=ol(e.disableIgnoringDatePartForTimeValidation??!1,t);return e.minTime!=null&&o(e.minTime,a)&&(a=ud(t,n,e.disableIgnoringDatePartForTimeValidation?e.minTime:Bc(t,a,e.minTime))),e.maxTime!=null&&o(a,e.maxTime)&&(a=ud(t,n,e.disableIgnoringDatePartForTimeValidation?e.maxTime:Bc(t,a,e.maxTime))),a},fd=[`value`,`referenceDate`],pd={emptyValue:null,getTodayValue:Kc,getInitialReferenceValue:e=>{let{value:t,referenceDate:n}=e,r=Z(e,fd);return r.adapter.isValid(t)?t:n??dd(r)},cleanValue:Hc,areValuesEqual:Wc,isSameError:(e,t)=>e===t,hasError:e=>e!=null,defaultErrorState:null,getTimezone:(e,t)=>e.isValid(t)?e.getTimezone(t):null,setTimezone:(e,t,n)=>n==null?null:e.setTimezone(n,t)},md={updateReferenceValue:(e,t,n)=>e.isValid(t)?t:n,getSectionsFromValue:(e,t)=>t(e),getHiddenInputValueFromSections:wl,parseValueStr:(e,t,n)=>n(e.trim(),t),getDateFromSection:e=>e,getDateSectionsFromValue:e=>e,updateDateInValue:(e,t,n)=>n,clearDateSections:e=>e.map(e=>x({},e,{value:``}))};g();var hd=({value:e,referenceDate:t,adapter:n,props:r,timezone:i})=>{let a=p(()=>pd.getInitialReferenceValue({value:e,adapter:n,props:r,referenceDate:t,granularity:cd.day,timezone:i,getTodayDate:()=>Kc(n,i,`date`)}),[t,i]);return e??a};g();var gd=`ampm.ampmInClock.autoFocus.slots.slotProps.value.defaultValue.referenceDate.disableIgnoringDatePartForTimeValidation.maxTime.minTime.disableFuture.disablePast.minutesStep.shouldDisableTime.showViewSwitcher.onChange.view.views.openTo.onViewChange.focusedView.onFocusedViewChange.className.classes.disabled.readOnly.timezone`.split(`.`),_d=e=>B({root:[`root`],arrowSwitcher:[`arrowSwitcher`]},Cu,e),vd=q(Su,{name:`MuiTimeClock`,slot:`Root`})({display:`flex`,flexDirection:`column`,position:`relative`}),yd=q(hu,{name:`MuiTimeClock`,slot:`ArrowSwitcher`})({position:`absolute`,right:12,top:15}),bd=[`hours`,`minutes`],xd=o(function(e,t){let n=kc(),r=cr({props:e,name:`MuiTimeClock`}),{ampm:i=n.is12HourCycleInCurrentLocale(),ampmInClock:a=!1,autoFocus:o,slots:s,slotProps:c,value:l,defaultValue:u,referenceDate:d,disableIgnoringDatePartForTimeValidation:m=!1,maxTime:h,minTime:g,disableFuture:_,disablePast:v,minutesStep:y=1,shouldDisableTime:b,showViewSwitcher:S,onChange:C,view:w,views:T=bd,openTo:E,onViewChange:D,focusedView:O,onFocusedViewChange:k,className:A,classes:j,disabled:M,readOnly:N,timezone:ee}=r,P=Z(r,gd),{value:F,handleValueChange:I,timezone:L}=sd({name:`TimeClock`,timezone:ee,value:l,defaultValue:u,referenceDate:d,onChange:C,valueManager:pd}),R=hd({value:F,referenceDate:d,adapter:n,props:r,timezone:L}),te=Ac(),ne=Zl(L),z=Le(),{ownerState:B}=su(),{view:re,setView:ie,previousView:ae,nextView:oe,setValueAndGoToNextView:V}=vu({view:w,views:T,openTo:E,onViewChange:D,onChange:I,focusedView:O,onFocusedViewChange:k}),{meridiemMode:se,handleMeridiemChange:ce}=xu(R,i,V),H=f((e,t)=>{let r=ol(m,n),a=t===`hours`||t===`minutes`&&T.includes(`seconds`),o=({start:e,end:t})=>!(g&&r(g,t)||h&&r(e,h)||_&&r(e,ne)||v&&r(ne,a?t:e)),s=(e,r=1)=>{if(e%r!==0)return!1;if(b)switch(t){case`hours`:return!b(n.setHours(R,e),`hours`);case`minutes`:return!b(n.setMinutes(R,e),`minutes`);case`seconds`:return!b(n.setSeconds(R,e),`seconds`);default:return!1}return!0};switch(t){case`hours`:{let t=rl(e,se,i),r=n.setHours(R,t);return n.getHours(r)!==t||!o({start:n.setSeconds(n.setMinutes(r,0),0),end:n.setSeconds(n.setMinutes(r,59),59)})||!s(t)}case`minutes`:{let t=n.setMinutes(R,e);return!o({start:n.setSeconds(t,0),end:n.setSeconds(t,59)})||!s(e,y)}case`seconds`:{let t=n.setSeconds(R,e);return!o({start:t,end:t})||!s(e)}default:throw Error(`not supported`)}},[i,R,m,h,se,g,y,b,n,_,v,ne,T]),U=p(()=>{switch(re){case`hours`:{let e=(e,t)=>{let r=rl(e,se,i);V(n.setHours(R,r),t,`hours`)},t=n.getHours(R),r;return r=i?t>12?[12,23]:[0,11]:[0,23],{onChange:e,viewValue:t,children:ad({value:F,adapter:n,ampm:i,onChange:e,getClockNumberText:te.hoursClockNumberText,isDisabled:e=>M||H(e,`hours`),selectedId:z}),viewRange:r}}case`minutes`:{let e=n.getMinutes(R),t=(e,t)=>{V(n.setMinutes(R,e),t,`minutes`)};return{viewValue:e,onChange:t,children:od({adapter:n,value:e,onChange:t,getClockNumberText:te.minutesClockNumberText,isDisabled:e=>M||H(e,`minutes`),selectedId:z}),viewRange:[0,59]}}case`seconds`:{let e=n.getSeconds(R),t=(e,t)=>{V(n.setSeconds(R,e),t,`seconds`)};return{viewValue:e,onChange:t,children:od({adapter:n,value:e,onChange:t,getClockNumberText:te.secondsClockNumberText,isDisabled:e=>M||H(e,`seconds`),selectedId:z}),viewRange:[0,59]}}default:throw Error(xc(147))}},[re,n,F,i,te.hoursClockNumberText,te.minutesClockNumberText,te.secondsClockNumberText,se,V,R,H,z,M]),le=_d(j);return Je(vd,x({ref:t,className:Ve(le.root,A),ownerState:B},P,{children:[G(Qu,x({autoFocus:o??!!O,ampmInClock:a&&T.includes(`hours`),value:F,type:re,ampm:i,minutesStep:y,isTimeDisabled:H,meridiemMode:se,handleMeridiemChange:ce,selectedId:z,disabled:M,readOnly:N},U)),S&&G(yd,{className:le.arrowSwitcher,slots:s,slotProps:c,onGoToPrevious:()=>ie(ae),isPreviousDisabled:!ae,previousLabel:te.openPreviousView,onGoToNext:()=>ie(oe),isNextDisabled:!oe,nextLabel:te.openNextView,ownerState:B})]}))});function Sd(e){return Ne(`MuiDigitalClock`,e)}var Cd=ke(`MuiDigitalClock`,[`root`,`list`,`item`]);function wd(e,t){return Array.isArray(t)?t.every(t=>e.indexOf(t)!==-1):e.indexOf(t)!==-1}var Td=e=>{setTimeout(e,0)},Ed=(e=document)=>{let t=e.activeElement;return t?t.shadowRoot?Ed(t.shadowRoot):t:null},Dd=e=>Ed(R(e)),Od=e=>Array.from(e.children).indexOf(Dd(e)),kd=`@media (pointer: fine)`;function Ad(e){let t={};for(let n of Object.keys(e))(n.startsWith(`data-`)||n.startsWith(`aria-`))&&(t[n]=e[n]);return t}function jd(...e){return e.reduce((e,t)=>(Array.isArray(t)?e.push(...t):t!=null&&e.push(t),e),[])}g();var Md=`ampm.timeStep.autoFocus.slots.slotProps.value.defaultValue.referenceDate.disableIgnoringDatePartForTimeValidation.maxTime.minTime.disableFuture.disablePast.minutesStep.shouldDisableTime.onChange.view.openTo.onViewChange.focusedView.onFocusedViewChange.className.classes.disabled.readOnly.views.skipDisabled.timezone`.split(`.`),Nd=e=>B({root:[`root`],list:[`list`],item:[`item`]},Sd,e),Pd=q(Su,{name:`MuiDigitalClock`,slot:`Root`})({overflowY:`auto`,width:`100%`,scrollbarWidth:`thin`,"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:`auto`},maxHeight:232,variants:[{props:{hasDigitalClockAlreadyBeenRendered:!0},style:{"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:`smooth`}}}]}),Fd=q(at,{name:`MuiDigitalClock`,slot:`List`})({padding:0}),Id=q(fe,{name:`MuiDigitalClock`,slot:`Item`,shouldForwardProp:e=>e!==`itemValue`&&e!==`formattedValue`})(({theme:e})=>({padding:`8px 16px`,margin:`2px 4px`,"&:first-of-type":{marginTop:4},"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.hoverOpacity)},"&.Mui-selected":{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:focus-visible, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}},"&.Mui-focusVisible":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.focusOpacity)}})),Ld=o(function(e,t){let n=kc(),r=l(null),i=nt(t,r),a=l(null),o=l(null),s=cr({props:e,name:`MuiDigitalClock`}),{ampm:c=n.is12HourCycleInCurrentLocale(),timeStep:u=30,autoFocus:d,slots:m,slotProps:h,value:g,defaultValue:_,referenceDate:v,disableIgnoringDatePartForTimeValidation:y=!1,maxTime:b,minTime:S,disableFuture:C,disablePast:w,minutesStep:T=1,shouldDisableTime:E,onChange:D,view:O,openTo:k,onViewChange:A,focusedView:M,onFocusedViewChange:N,className:ee,classes:P,disabled:F,readOnly:I,views:L=[`hours`],skipDisabled:R=!1,timezone:te}=s,ne=Z(s,Md),{value:z,handleValueChange:B,timezone:re}=sd({name:`DigitalClock`,timezone:te,value:g,defaultValue:_,referenceDate:v,onChange:D,valueManager:pd}),ie=Ac(),ae=Zl(re),{ownerState:oe}=su(),V=x({},oe,{hasDigitalClockAlreadyBeenRendered:!!r.current}),se=Nd(P),ce=(m==null?void 0:m.digitalClockItem)??Id,H=Vn({elementType:ce,externalSlotProps:h==null?void 0:h.digitalClockItem,ownerState:V,className:se.item}),U=hd({value:z,referenceDate:v,adapter:n,props:s,timezone:re}),{setValueAndGoToNextView:le}=vu({view:O,views:L,openTo:k,onViewChange:A,onChange:Y(e=>B(e,`finish`,`hours`)),focusedView:M,onFocusedViewChange:N}),ue=Y(e=>{le(e,`finish`)});j(()=>{if(r.current===null)return;let e=r.current.querySelector(`[role="listbox"] [role="option"][tabindex="0"], [role="listbox"] [role="option"][aria-selected="true"]`);if(!e)return;let t=e.offsetTop;(d||M)&&e!==o.current&&(o.current=e,e.focus()),r.current.scrollTop=t-4});let de=f(e=>{let t=ol(y,n);return!!(S&&t(S,e)||b&&t(e,b)||C&&t(e,ae)||w&&t(ae,e))||!(n.getMinutes(e)%T===0&&(!E||!E(e,`hours`)))},[y,n,S,b,C,ae,w,T,E]),fe=p(()=>{let e=[],t=n.startOfDay(U);for(;n.isSameDay(U,t);)e.push(t),t=n.addMinutes(t,u);return e},[U,u,n]),pe=fe.findIndex(e=>n.isEqual(e,U));return G(Pd,x({ref:i,className:Ve(se.root,ee),ownerState:V},ne,{children:G(Fd,{ref:a,role:`listbox`,"aria-label":ie.timePickerToolbarTitle,className:se.list,onKeyDown:e=>{switch(e.key){case`PageUp`:{let t=Od(a.current)-5,n=a.current.children[Math.max(0,t)];n&&n.focus(),e.preventDefault();break}case`PageDown`:{let t=Od(a.current)+5,n=a.current.children,r=n[Math.min(n.length-1,t)];r&&r.focus(),e.preventDefault();break}}},children:fe.map((e,t)=>{let r=de(e);if(R&&r)return null;let i=n.isEqual(e,z),a=n.format(e,c?`fullTime12h`:`fullTime24h`);return G(ce,x({onClick:()=>!I&&ue(e),selected:i,disabled:F||r,disableRipple:I,role:`option`,"aria-disabled":I,"aria-selected":i,tabIndex:pe===t||pe===-1&&t===0?0:-1,itemValue:e,formattedValue:a},H,{children:a}),`${e.valueOf()}-${a}`)})})}))});function Rd(e){return Ne(`MuiMultiSectionDigitalClock`,e)}var zd=ke(`MuiMultiSectionDigitalClock`,[`root`]);function Bd(e){return Ne(`MuiMultiSectionDigitalClockSection`,e)}var Vd=ke(`MuiMultiSectionDigitalClockSection`,[`root`,`item`]);g();var Hd=[`autoFocus`,`onChange`,`className`,`classes`,`disabled`,`readOnly`,`items`,`active`,`slots`,`slotProps`,`skipDisabled`],Ud=e=>B({root:[`root`],item:[`item`]},Bd,e),Wd=q(at,{name:`MuiMultiSectionDigitalClockSection`,slot:`Root`})(({theme:e})=>({maxHeight:232,width:56,padding:0,overflow:`hidden`,scrollbarWidth:`thin`,"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:`auto`},"@media (pointer: fine)":{"&:hover":{overflowY:`auto`}},"@media (pointer: none), (pointer: coarse)":{overflowY:`auto`},"&:not(:first-of-type)":{borderLeft:`1px solid ${(e.vars||e).palette.divider}`},variants:[{props:{hasDigitalClockAlreadyBeenRendered:!0},style:{"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:`smooth`}}}]})),Gd=q(fe,{name:`MuiMultiSectionDigitalClockSection`,slot:`Item`})(({theme:e})=>({padding:8,margin:`2px 4px`,width:48,justifyContent:`center`,"&:first-of-type":{marginTop:4},"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.hoverOpacity)},"&.Mui-selected":{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:focus-visible, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}},"&.Mui-focusVisible":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.focusOpacity)}})),Kd=o(function(e,t){let n=l(null),r=nt(t,n),i=l(null),o=l(!1),s=cr({props:e,name:`MuiMultiSectionDigitalClockSection`}),{autoFocus:c,onChange:u,className:d,classes:f,disabled:p,readOnly:m,items:h,active:g,slots:_,slotProps:v,skipDisabled:y}=s,b=Z(s,Hd),{ownerState:S}=su(),C=x({},S,{hasDigitalClockAlreadyBeenRendered:!!n.current}),w=Ud(f),T=(_==null?void 0:_.digitalClockSectionItem)??Gd;j(()=>{if(n.current===null)return;let e=n.current.querySelector(`[role="option"][tabindex="0"], [role="option"][aria-selected="true"]`);if(!e)return;let t=document.activeElement,r=i.current===e,a=!!t&&n.current.contains(t),s=r&&o.current;if(g&&c&&(!r||s)&&(i.current==null||o.current||a)&&(i.current=e,o.current=!1,e.focus()),r)return;let l=e.offsetTop,u=e.offsetHeight,d=n.current.clientHeight,f=n.current.scrollHeight,p=l-d/2+u/2,m=f-d,h=Math.min(p,m);n.current.scrollTop=Math.max(0,h)});let E=Y(e=>{let t=e.relatedTarget,r=t==null?void 0:t.parentElement,a=t==null?void 0:t.getAttribute(`role`),s=(r==null?void 0:r.nodeName)===`UL`&&r!==n.current||a===`gridcell`;o.current=s,i.current&&(r==null?void 0:r.nodeName)===`UL`&&r!==n.current&&(i.current=null)});a(()=>{g||(i.current=null)},[g]);let D=h.findIndex(e=>e.isFocused(e.value)),O=Y(e=>{switch(e.key){case`Tab`:o.current=!0;break;case`PageUp`:{let t=Od(n.current)-5,r=n.current.children[Math.max(0,t)];r&&r.focus(),e.preventDefault();break}case`PageDown`:{let t=Od(n.current)+5,r=n.current.children,i=r[Math.min(r.length-1,t)];i&&i.focus(),e.preventDefault();break}}});return G(Wd,x({ref:r,className:Ve(w.root,d),ownerState:C,role:`listbox`,onKeyDown:O,onBlur:E},b,{children:h.map((e,t)=>{var n;let r=(n=e.isDisabled)==null?void 0:n.call(e,e.value),i=p||r;if(y&&i)return null;let a=e.isSelected(e.value),o=D===t||D===-1&&t===0?0:-1;return G(T,x({onClick:()=>!m&&u(e.value),selected:a,disabled:i,disableRipple:m,role:`option`,"aria-disabled":m||i||void 0,"aria-label":e.ariaLabel,"aria-selected":a,tabIndex:o,className:w.item},v==null?void 0:v.digitalClockSectionItem,{children:e.label}),e.label)})}))}),qd=({now:e,value:t,adapter:n,ampm:r,isDisabled:i,resolveAriaLabel:a,timeStep:o,valueOrReferenceDate:s})=>{let c=t?n.getHours(t):null,l=[],u=(e,t)=>{let n=t??c;return n===null?!1:r?e===12?n===12||n===0:n===e||n-12===e:n===e},d=e=>u(e,n.getHours(s)),f=n.setDate(n.setMonth(n.startOfDay(e),0),15),p=r?11:23;for(let e=0;e<=p;e+=o){let t=n.format(n.setHours(f,e),r?`hours12h`:`hours24h`),o=a(parseInt(t,10).toString());t=n.formatNumber(t),l.push({value:e,label:t,isSelected:u,isDisabled:i,isFocused:d,ariaLabel:o})}return l},Jd=({value:e,adapter:t,isDisabled:n,timeStep:r,resolveLabel:i,resolveAriaLabel:a,hasValue:o=!0})=>{let s=t=>e!==null&&o&&e===t,c=t=>e===t;return[...Array.from({length:Math.ceil(60/r)},(e,o)=>{let l=r*o;return{value:l,label:t.formatNumber(i(l)),isDisabled:n,isSelected:s,isFocused:c,ariaLabel:a(l.toString())}})]};g();var Yd=`ampm.timeSteps.autoFocus.slots.slotProps.value.defaultValue.referenceDate.disableIgnoringDatePartForTimeValidation.maxTime.minTime.disableFuture.disablePast.minutesStep.shouldDisableTime.onChange.view.views.openTo.onViewChange.focusedView.onFocusedViewChange.className.classes.disabled.readOnly.skipDisabled.timezone`.split(`.`),Xd=e=>B({root:[`root`]},Rd,e),Zd=q(Su,{name:`MuiMultiSectionDigitalClock`,slot:`Root`})(({theme:e})=>({flexDirection:`row`,width:`100%`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`})),Qd=o(function(e,t){let n=kc(),r=dn(),i=cr({props:e,name:`MuiMultiSectionDigitalClock`}),{ampm:a=n.is12HourCycleInCurrentLocale(),timeSteps:o,autoFocus:s,slots:c,slotProps:l,value:u,defaultValue:d,referenceDate:m,disableIgnoringDatePartForTimeValidation:h=!1,maxTime:g,minTime:_,disableFuture:v,disablePast:y,minutesStep:b=1,shouldDisableTime:S,onChange:C,view:w,views:T=[`hours`,`minutes`],openTo:E,onViewChange:D,focusedView:O,onFocusedViewChange:k,className:A,classes:j,disabled:M,readOnly:N,skipDisabled:ee=!1,timezone:P}=i,F=Z(i,Yd),{value:I,handleValueChange:L,timezone:R}=sd({name:`MultiSectionDigitalClock`,timezone:P,value:u,defaultValue:d,referenceDate:m,onChange:C,valueManager:pd}),te=Ac(),ne=Zl(R),z=p(()=>x({hours:1,minutes:5,seconds:5},o),[o]),B=hd({value:I,referenceDate:m,adapter:n,props:i,timezone:R}),re=Y((e,t,n)=>L(e,t,n)),ie=p(()=>!a||!T.includes(`hours`)||T.includes(`meridiem`)?T:[...T,`meridiem`],[a,T]),{view:ae,setValueAndGoToNextView:oe,focusedView:V}=vu({view:w,views:ie,openTo:E,onViewChange:D,onChange:re,focusedView:O,onFocusedViewChange:k}),{meridiemMode:se,handleMeridiemChange:ce}=xu(B,a,Y(e=>{oe(e,`finish`,`meridiem`)}),`finish`),H=f((e,t)=>{let r=ol(h,n),i=t===`hours`||t===`minutes`&&ie.includes(`seconds`),o=({start:e,end:t})=>!(_&&r(_,t)||g&&r(e,g)||v&&r(e,ne)||y&&r(ne,i?t:e)),s=(e,r=1)=>{if(e%r!==0)return!1;if(S)switch(t){case`hours`:return!S(n.setHours(B,e),`hours`);case`minutes`:return!S(n.setMinutes(B,e),`minutes`);case`seconds`:return!S(n.setSeconds(B,e),`seconds`);default:return!1}return!0};switch(t){case`hours`:{let t=rl(e,se,a),r=n.setHours(B,t);return n.getHours(r)!==t||!o({start:n.setSeconds(n.setMinutes(r,0),0),end:n.setSeconds(n.setMinutes(r,59),59)})||!s(t)}case`minutes`:{let t=n.setMinutes(B,e);return!o({start:n.setSeconds(t,0),end:n.setSeconds(t,59)})||!s(e,b)}case`seconds`:{let t=n.setSeconds(B,e);return!o({start:t,end:t})||!s(e)}default:throw Error(`not supported`)}},[a,B,h,g,se,_,b,S,n,v,y,ne,ie]),U=f(e=>{switch(e){case`hours`:return{onChange:e=>{let t=rl(e,se,a);oe(n.setHours(B,t),`finish`,`hours`)},items:qd({now:ne,value:I,ampm:a,adapter:n,isDisabled:e=>H(e,`hours`),timeStep:z.hours,resolveAriaLabel:te.hoursClockNumberText,valueOrReferenceDate:B})};case`minutes`:return{onChange:e=>{oe(n.setMinutes(B,e),`finish`,`minutes`)},items:Jd({value:n.getMinutes(B),adapter:n,isDisabled:e=>H(e,`minutes`),resolveLabel:e=>n.format(n.setMinutes(ne,e),`minutes`),timeStep:z.minutes,hasValue:!!I,resolveAriaLabel:te.minutesClockNumberText})};case`seconds`:return{onChange:e=>{oe(n.setSeconds(B,e),`finish`,`seconds`)},items:Jd({value:n.getSeconds(B),adapter:n,isDisabled:e=>H(e,`seconds`),resolveLabel:e=>n.format(n.setSeconds(ne,e),`seconds`),timeStep:z.seconds,hasValue:!!I,resolveAriaLabel:te.secondsClockNumberText})};case`meridiem`:{let e=qc(n,`am`),t=qc(n,`pm`);return{onChange:ce,items:[{value:`am`,label:e,isSelected:()=>!!I&&se===`am`,isFocused:()=>!!B&&se===`am`,ariaLabel:e},{value:`pm`,label:t,isSelected:()=>!!I&&se===`pm`,isFocused:()=>!!B&&se===`pm`,ariaLabel:t}]}}default:throw Error(xc(144,e))}},[ne,I,a,n,z.hours,z.minutes,z.seconds,te.hoursClockNumberText,te.minutesClockNumberText,te.secondsClockNumberText,se,oe,B,H,ce]),le=p(()=>{if(!r)return ie;let e=ie.filter(e=>e!==`meridiem`);return e.reverse(),ie.includes(`meridiem`)&&e.push(`meridiem`),e},[r,ie]),ue=p(()=>ie.reduce((e,t)=>x({},e,{[t]:U(t)}),{}),[ie,U]),{ownerState:de}=su(),fe=Xd(j);return G(Zd,x({ref:t,className:Ve(fe.root,A),ownerState:de,role:`group`},F,{children:le.map(e=>G(Kd,{items:ue[e].items,onChange:ue[e].onChange,active:ae===e,autoFocus:s||V===e,disabled:M,readOnly:N,slots:c,slotProps:l,skipDisabled:ee,"aria-label":te.selectViewText(e)},e))}))});function $d(e){return Ne(`MuiPickerDay`,e)}var ef=ke(`MuiPickerDay`,[`root`,`dayOutsideMonth`,`today`,`selected`,`disabled`,`fillerCell`]);g();function tf(e){let{disabled:t,selected:n,today:r,outsideCurrentMonth:i,day:a,disableHighlightToday:o,showDaysOutsideCurrentMonth:s}=e,c=kc(),{ownerState:l}=su();return p(()=>x({},l,{day:a,isDaySelected:n??!1,isDayDisabled:t??!1,isDayCurrent:r??!1,isDayOutsideMonth:i??!1,isDayStartOfWeek:c.isSameDay(a,c.startOfWeek(a)),isDayEndOfWeek:c.isSameDay(a,c.endOfWeek(a)),disableHighlightToday:o??!1,showDaysOutsideCurrentMonth:s??!1}),[c,l,a,n,t,r,i,o,s])}g();var nf=[`autoFocus`,`className`,`classes`,`hidden`,`isAnimating`,`onClick`,`onDaySelect`,`onFocus`,`onBlur`,`onKeyDown`,`onMouseDown`,`onMouseEnter`,`children`,`isFirstVisibleCell`,`isLastVisibleCell`,`day`,`selected`,`disabled`,`today`,`outsideCurrentMonth`,`disableHighlightToday`,`showDaysOutsideCurrentMonth`,`isVisuallySelected`,`isDayFillerCell`],rf=(e,t)=>{let{isDaySelected:n,disableHighlightToday:r,isDayCurrent:i,isDayDisabled:a,isDayOutsideMonth:o,isDayFillerCell:s}=e;return B({root:[`root`,n&&!s&&`selected`,a&&`disabled`,!r&&i&&!n&&!s&&`today`,o&&`dayOutsideMonth`,s&&`fillerCell`]},$d,t)},af=q(Yn,{name:`MuiPickerDay`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disableHighlightToday&&n.isDayCurrent&&t.today,n.isDayOutsideMonth&&t.dayOutsideMonth,n.isDayFillerCell&&t.fillerCell]}})(({theme:e})=>x({"--PickerDay-horizontalMargin":`2px`,"--PickerDay-size":`36px`},e.typography.caption,{lineHeight:1,display:`flex`,width:`var(--PickerDay-size)`,height:`var(--PickerDay-size)`,borderRadius:`calc(var(--PickerDay-size) / 2)`,padding:0,backgroundColor:`transparent`,transition:e.transitions.create(`background-color`,{duration:e.transitions.duration.short}),color:(e.vars||e).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.hoverOpacity)}},"&:focus":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.focusOpacity)},marginLeft:`var(--PickerDay-horizontalMargin)`,marginRight:`var(--PickerDay-horizontalMargin)`,variants:[{props:{isDaySelected:!0},style:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightMedium,"&:focus, &:hover":{willChange:`background-color`,backgroundColor:(e.vars||e).palette.primary.dark},[`&.${ef.disabled}`]:{opacity:.6}}},{props:{isDayDisabled:!0},style:{color:(e.vars||e).palette.text.disabled}},{props:{isDayFillerCell:!0},style:{opacity:0,pointerEvents:`none`}},{props:{isDayOutsideMonth:!0},style:{color:(e.vars||e).palette.text.secondary}},{props:{isDayCurrent:!0,isDaySelected:!1},style:{outline:`1px solid ${(e.vars||e).palette.text.secondary}`,outlineOffset:-1}}]})),of=()=>{},sf=h(o(function(e,t){let n=cr({props:e,name:`MuiPickerDay`}),r=kc(),{autoFocus:i=!1,className:a,classes:o,isAnimating:s,onClick:c,onDaySelect:u,onFocus:d=of,onBlur:f=of,onKeyDown:p=of,onMouseDown:m=of,onMouseEnter:h=of,children:g,day:_,selected:v,disabled:y,today:b,outsideCurrentMonth:S,disableHighlightToday:C,showDaysOutsideCurrentMonth:w,isDayFillerCell:T}=n,E=Z(n,nf),D=tf({day:_,selected:v,disabled:y,today:b,outsideCurrentMonth:S,disableHighlightToday:C,showDaysOutsideCurrentMonth:w}),O=x({},D,{isDayFillerCell:T??(S&&!w)}),k=rf(O,o),A=l(null),M=nt(A,t);return j(()=>{i&&!y&&!s&&!S&&A.current.focus()},[i,y,s,S]),O.isDayFillerCell?G(af,{ref:M,role:E.role,ownerState:O,className:Ve(k.root,a),as:`div`}):G(af,x({ref:M,centerRipple:!0,disabled:y,tabIndex:v?0:-1,onKeyDown:e=>p(e,_),onFocus:e=>d(e,_),onBlur:e=>f(e,_),onMouseEnter:e=>h(e,_),onClick:e=>{e.defaultMuiPrevented=!0,y||u(_),S&&e.currentTarget.focus(),c&&c(e)},onMouseDown:e=>{m(e),S&&e.preventDefault()}},E,{ownerState:O,className:Ve(k.root,a),children:g??r.format(_,`dayOfMonth`)}))})),cf=e=>e.saveQuery!=null,lf=({stateResponse:{localizedDigits:e,sectionsValueBoundaries:t,state:n,timezone:r,setCharacterQuery:i,setTempAndroidValueStr:a,updateSectionValue:o}})=>{let s=kc(),c=({keyPressed:e,sectionIndex:t},r,a)=>{let o=e.toLowerCase(),s=n.sections[t];if(n.characterQuery!=null&&(!a||a(n.characterQuery.value))&&n.characterQuery.sectionIndex===t){let e=`${n.characterQuery.value}${o}`,a=r(e,s);if(!cf(a))return i({sectionIndex:t,value:e,sectionType:s.type}),a}let c=r(o,s);return cf(c)&&!c.saveQuery?(i(null),null):(i({sectionIndex:t,value:o,sectionType:s.type}),cf(c)?null:c)},l=e=>{let t=(e,t,n)=>{let r=t.filter(e=>e.toLowerCase().startsWith(n));return r.length===0?{saveQuery:!1}:{sectionValue:r[0],shouldGoToNextSection:r.length===1}},n=(e,n,i,a)=>{let o=e=>ul(s,r,n.type,e);if(n.contentType===`letter`)return t(n.format,o(n.format),e);if(i&&a!=null&&cl(s,i).contentType===`letter`){let n=o(i),r=t(i,n,e);return cf(r)?{saveQuery:!1}:x({},r,{sectionValue:a(r.sectionValue,n)})}return{saveQuery:!1}};return c(e,(e,t)=>{switch(t.type){case`month`:return n(e,t,s.formats.month,e=>bl(s,e,s.formats.month,t.format));case`weekDay`:return n(e,t,s.formats.weekday,(e,t)=>t.indexOf(e).toString());case`meridiem`:return n(e,t);default:return{saveQuery:!1}}})},u=n=>{let r=({queryValue:n,skipIfBelowMinimum:r,section:i})=>{let a=ml(n,e),o=Number(a),c=t[i.type]({currentDate:null,format:i.format,contentType:i.contentType});if(o>c.maximum)return{saveQuery:!1};if(r&&o<c.minimum)return{saveQuery:!0};let l=o*10>c.maximum||a.length===c.maximum.toString().length;return{sectionValue:vl(s,o,c,e,i),shouldGoToNextSection:l}};return c(n,(e,t)=>{if(t.contentType===`digit`||t.contentType===`digit-with-letter`)return r({queryValue:e,skipIfBelowMinimum:!1,section:t});if(t.type===`month`){let n=Sl(s,`digit`,`month`,`MM`),i=r({queryValue:e,skipIfBelowMinimum:!0,section:{type:t.type,format:`MM`,hasLeadingZerosInFormat:n,hasLeadingZerosInInput:!0,contentType:`digit`,maxLength:2}});if(cf(i))return i;let a=bl(s,i.sectionValue,`MM`,t.format);return x({},i,{sectionValue:a})}if(t.type===`weekDay`){let n=r({queryValue:e,skipIfBelowMinimum:!0,section:t});if(cf(n))return n;let i=ll(s,t.format)[Number(n.sectionValue)-1];return x({},n,{sectionValue:i})}return{saveQuery:!1}},t=>gl(t,e))};return Y(t=>{let r=n.sections[t.sectionIndex],i=gl(t.keyPressed,e)?u(x({},t,{keyPressed:hl(t.keyPressed,e)})):l(t);if(i==null){a(null);return}o({section:r,newSectionValue:i.sectionValue,shouldGoToNextSection:i.shouldGoToNextSection})})},uf=({props:e,value:t,timezone:n,adapter:r})=>{if(t===null)return null;let{shouldDisableDate:i,shouldDisableMonth:a,shouldDisableYear:o,disablePast:s,disableFuture:c,minDate:l,maxDate:u}=e,d=r.date(void 0,n);switch(!0){case!r.isValid(t):return`invalidDate`;case!!(i&&i(t)):return`shouldDisableDate`;case!!(a&&a(t)):return`shouldDisableMonth`;case!!(o&&o(t)):return`shouldDisableYear`;case!!(c&&r.isAfterDay(t,d)):return`disableFuture`;case!!(s&&r.isBeforeDay(t,d)):return`disablePast`;case!!(l&&r.isBeforeDay(t,l)):return`minDate`;case!!(u&&r.isAfterDay(t,u)):return`maxDate`;default:return null}};uf.valueManager=pd;var df=({adapter:e,value:t,timezone:n,props:r})=>{if(t===null)return null;let{minTime:i,maxTime:a,minutesStep:o,shouldDisableTime:s,disableIgnoringDatePartForTimeValidation:c=!1,disablePast:l,disableFuture:u}=r,d=e.date(void 0,n),f=ol(c,e);switch(!0){case!e.isValid(t):return`invalidDate`;case!!(i&&f(i,t)):return`minTime`;case!!(a&&f(t,a)):return`maxTime`;case!!(u&&e.isAfter(t,d)):return`disableFuture`;case!!(l&&e.isBefore(t,d)):return`disablePast`;case!!(s&&s(t,`hours`)):return`shouldDisableTime-hours`;case!!(s&&s(t,`minutes`)):return`shouldDisableTime-minutes`;case!!(s&&s(t,`seconds`)):return`shouldDisableTime-seconds`;case!!(o&&e.getMinutes(t)%o!==0):return`minutesStep`;default:return null}};df.valueManager=pd;var ff=({adapter:e,value:t,timezone:n,props:r})=>{let i=uf({adapter:e,value:t,timezone:n,props:r});return i===null?df({adapter:e,value:t,timezone:n,props:r}):i};ff.valueManager=pd,g();function pf(e){let{props:t,validator:n,value:r,timezone:i,onError:o}=e,s=kc(),c=l(n.valueManager.defaultErrorState),u=n({adapter:s,value:r,timezone:i,props:t}),d=n.valueManager.hasError(u);return a(()=>{o&&!n.valueManager.isSameError(u,c.current)&&o(u,r),c.current=u},[n,o,u,r]),{validationError:u,hasValidationError:d,getValidationErrorForNewValue:Y(e=>n({adapter:s,value:e,timezone:i,props:t}))}}g();var mf=5e3,hf=e=>{var t;let n=kc(),r=Ac(),i=dn(),{manager:{validator:o,valueType:s,internal_valueManager:c,internal_fieldValueManager:d},internalPropsWithDefaults:m,internalPropsWithDefaults:{value:h,defaultValue:g,referenceDate:_,onChange:v,format:y,formatDensity:b=`dense`,selectedSections:S,onSelectedSectionsChange:C,shouldRespectLeadingZeros:w=!1,timezone:T},forwardedProps:{error:E}}=e,{value:D,handleValueChange:O,timezone:k}=sd({name:`a field component`,timezone:T,value:h,defaultValue:g,referenceDate:_,onChange:v,valueManager:c}),A=l(D);a(()=>{A.current=D},[D]);let{hasValidationError:j}=pf({props:m,validator:o,timezone:k,value:D,onError:m.onError}),M=p(()=>pl(n),[n]),N=p(()=>Tl(n,M,k),[n,M,k]),ee=f(e=>d.getSectionsFromValue(e,e=>Ll({adapter:n,localeText:r,localizedDigits:M,format:y,date:e,formatDensity:b,shouldRespectLeadingZeros:w,isRtl:i})),[d,y,r,M,i,w,n,b]),[P,F]=u(()=>{let e=ee(D),t={sections:e,lastExternalValue:D,lastSectionsDependencies:{format:y,isRtl:i,locale:n.locale},tempValueStrAndroid:null,characterQuery:null},r=ld(e),a=c.getInitialReferenceValue({referenceDate:_,value:D,adapter:n,props:m,granularity:r,timezone:k});return x({},t,{referenceValue:a})}),[I,L]=$t({controlled:S,default:null,name:`useField`,state:`selectedSections`}),R=e=>{L(e),C==null||C(e)},te=p(()=>Al(I,P.sections),[I,P.sections]),ne=te===`all`?0:te,z=p(()=>kl(P.sections),[P.sections]),B=p(()=>P.sections.every(e=>e.value===``),[P.sections]),re=p(()=>{if(ne!=null)return!1;let e=P.sections.filter(e=>e.value!==``);return e.length>0&&P.sections.length-e.length>0},[P.sections,ne]),ie=p(()=>E===void 0?j||re:E,[j,re,E]),ae=e=>{let t={validationError:o({adapter:n,value:e,timezone:k,props:m})};O(e,t)},oe=(e,t)=>{let n=[...P.sections];return n[e]=x({},n[e],{value:t,modified:!0}),n},V=l(null),se=Rt(),ce=e=>{ne!=null&&(V.current={sectionIndex:ne,value:e},se.start(0,()=>{V.current=null}))},H=()=>{c.areValuesEqual(n,D,c.emptyValue)?F(e=>x({},e,{sections:e.sections.map(e=>x({},e,{value:``})),tempValueStrAndroid:null,characterQuery:null})):(F(e=>x({},e,{characterQuery:null})),ae(c.emptyValue))},U=()=>{if(ne==null)return;let e=P.sections[ne];e.value!==``&&(ce(``),d.getDateFromSection(D,e)===null?F(e=>x({},e,{sections:oe(ne,``),tempValueStrAndroid:null,characterQuery:null})):(F(e=>x({},e,{characterQuery:null})),ae(d.updateDateInValue(D,e,null))))},le=e=>{let t=d.parseValueStr(e,P.referenceValue,(e,t)=>{let a=n.parse(e,y);if(!n.isValid(a))return null;let o=Ll({adapter:n,localeText:r,localizedDigits:M,format:y,date:a,formatDensity:b,shouldRespectLeadingZeros:w,isRtl:i});return Ol(n,a,o,t,!1)});ae(t)},ue=Rt(),de=({section:e,newSectionValue:t,shouldGoToNextSection:r})=>{se.clear(),ue.clear();let i=d.getDateFromSection(D,e);r&&ne<P.sections.length-1&&R(ne+1);let a=oe(ne,t),o=d.getDateSectionsFromValue(a,e),s=Cl(n,o,M);if(n.isValid(s)){let t=Ol(n,s,o,d.getDateFromSection(P.referenceValue,e),!0);return i??ue.start(0,()=>{A.current===D&&F(t=>x({},t,{sections:d.clearDateSections(P.sections,e),tempValueStrAndroid:null}))}),ae(d.updateDateInValue(D,e,t))}return o.every(e=>e.value!==``)&&(i==null||n.isValid(i))?(ce(t),ae(d.updateDateInValue(D,e,s))):(i!=null&&(ce(t),ae(d.updateDateInValue(D,e,s))),F(e=>x({},e,{sections:a,tempValueStrAndroid:null})))},fe=e=>F(t=>x({},t,{tempValueStrAndroid:e})),pe=Y(e=>{F(t=>x({},t,{characterQuery:e}))});if(D!==P.lastExternalValue){let e=V.current!=null&&!n.isValid(d.getDateFromSection(D,P.sections[V.current.sectionIndex])),t;t=e?oe(V.current.sectionIndex,V.current.value):ee(D),F(r=>x({},r,{lastExternalValue:D,sections:t,sectionsDependencies:{format:y,isRtl:i,locale:n.locale},referenceValue:e?r.referenceValue:d.updateReferenceValue(n,D,r.referenceValue),tempValueStrAndroid:null}))}if(i!==P.lastSectionsDependencies.isRtl||y!==P.lastSectionsDependencies.format||n.locale!==P.lastSectionsDependencies.locale){let e=ee(D);F(t=>x({},t,{lastSectionsDependencies:{format:y,isRtl:i,locale:n.locale},sections:e,tempValueStrAndroid:null,characterQuery:null}))}P.characterQuery!=null&&!ie&&ne==null&&pe(null),P.characterQuery!=null&&((t=P.sections[P.characterQuery.sectionIndex])==null?void 0:t.type)!==P.characterQuery.sectionType&&pe(null),a(()=>{V.current!=null&&(V.current=null)});let W=Rt();return a(()=>(P.characterQuery!=null&&W.start(mf,()=>pe(null)),()=>{}),[P.characterQuery,pe,W]),a(()=>{P.tempValueStrAndroid!=null&&ne!=null&&U()},[P.sections]),{activeSectionIndex:ne,areAllSectionsEmpty:B,error:ie,localizedDigits:M,parsedSelectedSections:te,sectionOrder:z,sectionsValueBoundaries:N,state:P,timezone:k,value:D,clearValue:H,clearActiveSection:U,setCharacterQuery:pe,setSelectedSections:R,setTempAndroidValueStr:fe,updateSectionValue:de,updateValueFromValueStr:le,getSectionsFromValue:ee}};g();function gf(e){let{manager:{internal_useApplyDefaultValuesToFieldInternalProps:t},internalProps:n,skipContextFieldRefAssignment:r}=e,i=Bl(),a=Gl(),o=nt(n.fieldRef,r?null:a==null?void 0:a.internalFieldRef,r?null:a==null?void 0:a.fieldRef),s=i==null?void 0:i.setValue,c=f((e,t)=>s==null?void 0:s(e,{validationError:t.validationError,shouldClose:!1}),[s]);return t(p(()=>a!=null&&i!=null?x({value:i.value,onChange:c,timezone:i.timezone,disabled:i.disabled,readOnly:i.readOnly,autoFocus:i.autoFocus&&!i.open,focused:i.open?!0:void 0,format:i.fieldFormat,formatDensity:a.formatDensity,selectedSections:a.selectedSections,onSelectedSectionsChange:a.onSelectedSectionsChange,fieldRef:o},n):n,[i,a,n,c,o]))}function _f(e){let{focused:t,domGetters:n,stateResponse:{parsedSelectedSections:r,state:i}}=e;if(!n.isReady())return;let a=R(n.getRoot()).getSelection();if(!a)return;if(r==null){a.rangeCount>0&&a.getRangeAt(0).startContainer instanceof Node&&n.getRoot().contains(a.getRangeAt(0).startContainer)&&a.removeAllRanges(),t&&n.getRoot().blur();return}if(!n.getRoot().contains(Dd(n.getRoot())))return;let o=new window.Range,s;s=r===`all`?n.getRoot():i.sections[r].type===`empty`?n.getSectionContainer(r):n.getSectionContent(r),o.selectNodeContents(s),s.focus(),a.removeAllRanges(),a.addRange(o)}function vf(e){let{manager:{internal_fieldValueManager:t},focused:n,setFocused:r,domGetters:i,stateResponse:a,applyCharacterEditing:o,internalPropsWithDefaults:s,stateResponse:{parsedSelectedSections:c,sectionsValueBoundaries:l,sectionOrder:u,state:d,value:f,activeSectionIndex:p,localizedDigits:m,timezone:h,clearValue:g,clearActiveSection:_,setCharacterQuery:v,setSelectedSections:y,updateValueFromValueStr:b,updateSectionValue:x},internalPropsWithDefaults:{disabled:S=!1,readOnly:C=!1,minutesStep:w}}=e,T=kc(),E=Y(e=>{var n;if(!S)switch(!0){case(e.ctrlKey||e.metaKey)&&(((n=e.key)==null?void 0:n.toUpperCase())===`A`||String.fromCharCode(e.keyCode)===`A`)&&!e.shiftKey&&!e.altKey:e.preventDefault(),y(`all`);break;case e.key===`ArrowRight`:if(e.preventDefault(),c==null)y(u.startIndex);else if(c===`all`)y(u.endIndex);else{let e=u.neighbors[c].rightIndex;e!==null&&y(e)}break;case e.key===`ArrowLeft`:if(e.preventDefault(),c==null)y(u.endIndex);else if(c===`all`)y(u.startIndex);else{let e=u.neighbors[c].leftIndex;e!==null&&y(e)}break;case e.key===`Delete`:if(e.preventDefault(),C)break;c==null||c===`all`?g():_();break;case[`ArrowUp`,`ArrowDown`,`Home`,`End`,`PageUp`,`PageDown`].includes(e.key):{if(e.preventDefault(),C||p==null)break;c===`all`&&y(p);let n=d.sections[p],r=xf(T,h,n,e.key,l,m,t.getDateFromSection(f,n),{minutesStep:w});x({section:n,newSectionValue:r,shouldGoToNextSection:!1});break}}}),D=Rt(),O=Y(()=>{if(!(S||!i.isReady())){if(c===`all`){r(!0),D.start(0,()=>{let e=document.getSelection();if(!e||e.rangeCount===0){y(u.startIndex);return}let t=e.getRangeAt(0).startOffset;if(t===0){y(u.startIndex);return}let n=0,r=0;for(;r<t&&n<d.sections.length;){let e=d.sections[n];n+=1,r+=`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`.length}y(n-1)});return}n||(r(!0),c??y(u.startIndex))}}),k=Y(e=>{if(S||!i.isReady()||c===`all`||e.button!==0)return;let t=e.target,n=i.getRoot();if(!n.contains(t))return;let a=t.closest(`[data-sectionindex]`),o=a?Number(a.dataset.sectionindex):yf(n,e.clientX);o==null||!Number.isInteger(o)||(e.preventDefault(),r(!0),y(o))}),A=Y(e=>{if(!i.isReady()||c!==`all`)return;let t=e.target.textContent??``;i.getRoot().innerHTML=d.sections.map(e=>`${e.startSeparator}${e.value||e.placeholder}${e.endSeparator}`).join(``),_f({focused:n,domGetters:i,stateResponse:a}),t.length===0||t.charCodeAt(0)===10?(g(),y(`all`)):t.length>1?b(t):(c===`all`&&y(0),o({keyPressed:t,sectionIndex:0}))}),j=Y(e=>{if(C||c!==`all`){e.preventDefault();return}let t=e.clipboardData.getData(`text`);e.preventDefault(),v(null),b(t)}),M=Y(()=>{if(n||S||!i.isReady())return;let e=Dd(i.getRoot());r(!0),i.getSectionIndexFromDOMElement(e)??y(u.startIndex)});return{onKeyDown:E,onBlur:Y(()=>{setTimeout(()=>{if(!i.isReady())return;let e=Dd(i.getRoot());i.getRoot().contains(e)||(r(!1),y(null))})}),onFocus:M,onClick:O,onMouseDown:k,onPaste:j,onInput:A,contentEditable:c===`all`,tabIndex:s.disabled||c===0?-1:0}}function yf(e,t){let n=e.querySelectorAll(`[role="spinbutton"]`);if(n.length===0)return null;let r=0,i=1/0;for(let e=0;e<n.length;e+=1){let a=n[e].getBoundingClientRect(),o=(a.left+a.right)/2,s=Math.abs(t-o);s<i&&(i=s,r=e)}return r}function bf(e){switch(e){case`ArrowUp`:return 1;case`ArrowDown`:return-1;case`PageUp`:return 5;case`PageDown`:return-5;default:return 0}}function xf(e,t,n,r,i,a,o,s){let c=bf(r),l=r===`Home`,u=r===`End`,d=n.value===``||l||u;return n.contentType===`digit`||n.contentType===`digit-with-letter`?(()=>{let r=i[n.type]({currentDate:o,format:n.format,contentType:n.contentType}),f=t=>vl(e,t,r,a,n),p=n.type===`minutes`&&s!=null&&s.minutesStep?s.minutesStep:1,m;if(d){if(n.type===`year`&&!u&&!l)return e.formatByString(e.date(void 0,t),n.format);m=c>0||l?r.minimum:r.maximum}else m=parseInt(ml(n.value,a),10)+c*p;return m%p!==0&&((c<0||l)&&(m+=p-(p+m)%p),(c>0||u)&&(m-=m%p)),m>r.maximum?f(r.minimum+(m-r.maximum-1)%(r.maximum-r.minimum+1)):m<r.minimum?f(r.maximum-(r.minimum-m-1)%(r.maximum-r.minimum+1)):f(m)})():(()=>{let r=ul(e,t,n.type,n.format);return r.length===0?n.value:d?c>0||l?r[0]:r[r.length-1]:r[((r.indexOf(n.value)+c)%r.length+r.length)%r.length]})()}g();function Sf(e){let{manager:{internal_fieldValueManager:t},stateResponse:{areAllSectionsEmpty:n,state:r,updateValueFromValueStr:i}}=e,a=Y(e=>{i(e.target.value)});return{value:p(()=>n?``:t.getHiddenInputValueFromSections(r.sections),[n,r.sections,t]),onChange:a}}g();function Cf(e){let{stateResponse:{parsedSelectedSections:t,setSelectedSections:n},internalPropsWithDefaults:{disabled:r=!1}}=e,i=Y(e=>{if(r||e.isDefaultPrevented())return;let i=Number(e.currentTarget.dataset.sectionindex);Number.isInteger(i)&&t!==i&&n(i)});return f(e=>({"data-sectionindex":e,onClick:i}),[i])}g();function wf(e){let t=kc(),n=Ac(),{focused:r,domGetters:i,stateResponse:a,applyCharacterEditing:o,manager:{internal_fieldValueManager:s},stateResponse:{parsedSelectedSections:c,sectionsValueBoundaries:l,state:u,value:d,localizedDigits:p,clearActiveSection:m,setCharacterQuery:h,setSelectedSections:g,updateSectionValue:_,updateValueFromValueStr:v},internalPropsWithDefaults:{disabled:y=!1,readOnly:b=!1}}=e,x=c===`all`,S=!x&&!y&&!b,C=Y(e=>{if(!i.isReady())return;let t=u.sections[e];i.getSectionContent(e).innerHTML=t.value||t.placeholder,_f({focused:r,domGetters:i,stateResponse:a})}),w=Y(e=>{if(!i.isReady())return;let t=e.target,n=t.textContent??``,r=i.getSectionIndexFromDOMElement(t),a=u.sections[r];if(b){C(r);return}if(n.length===0){if(a.value===``){C(r);return}let t=e.nativeEvent.inputType;if(t===`insertParagraph`||t===`insertLineBreak`){C(r);return}C(r),m();return}o({keyPressed:n,sectionIndex:r}),C(r)}),T=Y(e=>{e.preventDefault()}),E=Y(e=>{if(e.preventDefault(),b||y||typeof c!=`number`)return;let t=u.sections[c],n=e.clipboardData.getData(`text`),r=/^[a-zA-Z]+$/.test(n),i=/^[0-9]+$/.test(n),a=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(n);t.contentType===`letter`&&r||t.contentType===`digit`&&i||t.contentType===`digit-with-letter`&&a?(h(null),_({section:t,newSectionValue:n,shouldGoToNextSection:!0})):!r&&!i&&(h(null),v(n))}),D=Y(e=>{e.preventDefault(),e.dataTransfer.dropEffect=`none`}),O=f(e=>()=>{y||g(e)},[y,g]);return f((e,r)=>{let i=l[e.type]({currentDate:s.getDateFromSection(d,e),contentType:e.contentType,format:e.format});return{onInput:w,onPaste:E,onMouseUp:T,onDragOver:D,onFocus:O(r),"aria-readonly":b,"aria-valuenow":Ef(e,t,p),"aria-valuemin":i.minimum,"aria-valuemax":i.maximum,"aria-valuetext":e.value?Tf(e,t,p):n.empty,"aria-label":n[e.type],"aria-disabled":y,tabIndex:!S||x||r>0?-1:0,contentEditable:!x&&!y&&!b,role:`spinbutton`,"data-range-position":e.dateName||void 0,spellCheck:!S&&void 0,autoCapitalize:S?`none`:void 0,autoCorrect:S?`off`:void 0,children:e.value||e.placeholder,inputMode:e.contentType===`letter`?`text`:`numeric`}},[l,x,y,b,S,n,t,p,w,E,T,D,O,s,d])}function Tf(e,t,n){if(e.value)switch(e.type){case`month`:{if(e.contentType===`digit`){let r=t.setMonth(t.date(),Number(ml(e.value,n))-1);return t.isValid(r)?t.format(r,`month`):``}let r=t.parse(e.value,e.format);return r&&t.isValid(r)?t.format(r,`month`):void 0}case`day`:if(e.contentType===`digit`){let r=t.setDate(t.startOfYear(t.date()),Number(ml(e.value,n)));return t.isValid(r)?t.format(r,`dayOfMonth`):``}return e.value;case`weekDay`:return;default:return}}function Ef(e,t,n){if(!e.value)return;let r=ml(e.value,n);switch(e.type){case`weekDay`:return e.contentType===`letter`?void 0:Number(r);case`meridiem`:{let n=t.parse(`01:00 ${e.value}`,`${t.formats.hours12h}:${t.formats.minutes} ${e.format}`);return n?+(t.getHours(n)>=12):void 0}case`day`:return e.contentType===`digit-with-letter`?parseInt(r,10):Number(r);case`month`:{if(e.contentType===`digit`)return Number(r);let n=t.parse(e.value,e.format);return n?t.getMonth(n)+1:void 0}default:return e.contentType===`letter`?void 0:Number(r)}}g();var Df=e=>{let{props:t,manager:n,skipContextFieldRefAssignment:r,manager:{valueType:i,internal_useOpenPickerButtonAriaLabel:o}}=e,{internalProps:s,forwardedProps:c}=Lc(t,i),f=gf({manager:n,internalProps:s,skipContextFieldRefAssignment:r}),{sectionListRef:m,onBlur:h,onClick:g,onMouseDown:_,onFocus:v,onInput:y,onPaste:b,onKeyDown:S,onClear:C,clearable:w}=c,{disabled:T=!1,readOnly:E=!1,autoFocus:D=!1,focused:O,fieldRef:k}=f,A=l(null),M=nt(m,A),N=p(()=>({isReady:()=>A.current!=null,getRoot:()=>A.current.getRoot(),getSectionContainer:e=>A.current.getSectionContainer(e),getSectionContent:e=>A.current.getSectionContent(e),getSectionIndexFromDOMElement:e=>A.current.getSectionIndexFromDOMElement(e)}),[A]),ee=hf({manager:n,internalPropsWithDefaults:f,forwardedProps:c}),{areAllSectionsEmpty:P,error:F,parsedSelectedSections:I,sectionOrder:L,state:R,value:te,clearValue:ne,setSelectedSections:z}=ee,B=lf({stateResponse:ee}),re=o(te),[ie,ae]=u(!1);function oe(e=0){if(T||!A.current||Of(A)!=null)return;let t=Al(e,R.sections);ae(!0),A.current.getSectionContent(t).focus()}let V=vf({manager:n,internalPropsWithDefaults:f,stateResponse:ee,applyCharacterEditing:B,focused:ie,setFocused:ae,domGetters:N}),se=Sf({manager:n,stateResponse:ee}),ce=Cf({stateResponse:ee,internalPropsWithDefaults:f}),H=wf({manager:n,stateResponse:ee,applyCharacterEditing:B,internalPropsWithDefaults:f,domGetters:N,focused:ie}),U=Y(e=>{S==null||S(e),V.onKeyDown(e)}),le=Y(e=>{V.onBlur(e);let t=e.relatedTarget;N.isReady()&&t instanceof Node&&N.getRoot().contains(t)||h==null||h(e)}),ue=Y(e=>{V.onFocus(e);let t=e.relatedTarget;N.isReady()&&t instanceof Node&&N.getRoot().contains(t)||v==null||v(e)}),de=Y(e=>{e.isDefaultPrevented()||(g==null||g(e),V.onClick(e))}),fe=Y(e=>{e.isDefaultPrevented()||(_==null||_(e),V.onMouseDown(e))}),pe=Y(e=>{b==null||b(e),V.onPaste(e)}),W=Y(e=>{y==null||y(e),V.onInput(e)}),me=Y((e,...t)=>{e.preventDefault(),C==null||C(e,...t),ne(),kf(A)?z(L.startIndex):oe(0)}),he=p(()=>R.sections.map((e,t)=>{let n=H(e,t);return{container:ce(t),content:n,before:{children:e.startSeparator},after:{children:e.endSeparator,"data-range-position":e.isEndFormatSeparator?n[`data-range-position`]:void 0}}}),[R.sections,ce,H]);return a(()=>{if(A.current==null)throw Error(xc(249));D&&!T&&A.current.getSectionContent(L.startIndex).focus()},[]),j(()=>{if(!(!ie||!A.current)){if(I===`all`)A.current.getRoot().focus();else if(typeof I==`number`){let e=A.current.getSectionContent(I);e&&e.focus()}}},[I,ie]),j(()=>{_f({focused:ie,domGetters:N,stateResponse:ee})}),d(k,()=>({getSections:()=>R.sections,getActiveSectionIndex:()=>Of(A),setSelectedSections:e=>{if(T||!A.current)return;let t=Al(e,R.sections);ae((t===`all`?0:t)!==null),z(e)},focusField:oe,isFieldFocused:()=>kf(A),clearValue:ne})),x({},c,V,{onBlur:le,onClick:de,onMouseDown:fe,onFocus:ue,onInput:W,onPaste:pe,onKeyDown:U,onClear:me},se,{error:F,clearable:!!(w&&!P&&!E&&!T),focused:O??ie,sectionListRef:M,elements:he,areAllSectionsEmpty:P,disabled:T,readOnly:E,autoFocus:D,openPickerAriaLabel:re})};function Of(e){var t;let n=Dd((t=e.current)==null?void 0:t.getRoot());return!n||!e.current||!e.current.getRoot().contains(n)?null:e.current.getSectionIndexFromDOMElement(n)}function kf(e){var t;let n=Dd((t=e.current)==null?void 0:t.getRoot());return!!e.current&&e.current.getRoot().contains(n)}g();function Af(){return p(()=>({valueType:`date`,validator:uf,internal_valueManager:pd,internal_fieldValueManager:md,internal_useApplyDefaultValuesToFieldInternalProps:Mf,internal_useOpenPickerButtonAriaLabel:jf}),[])}function jf(e){let t=kc(),n=Ac();return p(()=>{let r=t.isValid(e)?t.format(e,`fullDate`):null;return n.openDatePickerDialogue(r)},[e,n,t])}function Mf(e){let t=kc(),n=Nf(e);return p(()=>x({},e,n,{format:e.format??t.formats.keyboardDate}),[e,n,t])}function Nf(e){let t=kc(),n=Xl();return p(()=>({disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,minDate:Uc(t,e.minDate,n.minDate),maxDate:Uc(t,e.maxDate,n.maxDate)}),[e.minDate,e.maxDate,e.disableFuture,e.disablePast,t,n])}g();function Pf(e={}){let{ampm:t}=e;return p(()=>({valueType:`time`,validator:df,internal_valueManager:pd,internal_fieldValueManager:md,internal_useApplyDefaultValuesToFieldInternalProps:If,internal_useOpenPickerButtonAriaLabel:Ff(t)}),[t])}function Ff(e){return function(t){let n=kc(),r=Ac();return p(()=>{let i=e??n.is12HourCycleInCurrentLocale()?`fullTime12h`:`fullTime24h`,a=n.isValid(t)?n.format(t,i):null;return r.openTimePickerDialogue(a)},[t,r,n])}}function If(e){let t=kc(),n=Lf(e),r=p(()=>e.ampm??t.is12HourCycleInCurrentLocale(),[e.ampm,t]);return p(()=>x({},e,n,{format:e.format??(r?t.formats.fullTime12h:t.formats.fullTime24h)}),[e,n,r,t])}function Lf(e){return p(()=>({disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1}),[e.disablePast,e.disableFuture])}g();function Rf(){return p(()=>({valueType:`date-time`,validator:ff,internal_valueManager:pd,internal_fieldValueManager:md,internal_useApplyDefaultValuesToFieldInternalProps:Bf,internal_useOpenPickerButtonAriaLabel:zf}),[])}function zf(e){let t=kc(),n=Ac();return p(()=>{let r=t.isValid(e)?t.format(e,`fullDate`):null;return n.openDatePickerDialogue(r)},[e,n,t])}function Bf(e){let t=kc(),n=Vf(e),r=p(()=>e.ampm??t.is12HourCycleInCurrentLocale(),[e.ampm,t]);return p(()=>x({},e,n,{format:e.format??(r?t.formats.keyboardDateTime12h:t.formats.keyboardDateTime24h)}),[e,n,r,t])}function Vf(e){let t=kc(),n=Xl();return p(()=>({disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,disableIgnoringDatePartForTimeValidation:!!e.minDateTime||!!e.maxDateTime||!!e.disableFuture||!!e.disablePast,minDate:Uc(t,e.minDateTime??e.minDate,n.minDate),maxDate:Uc(t,e.maxDateTime??e.maxDate,n.maxDate),minTime:e.minDateTime??e.minTime,maxTime:e.maxDateTime??e.maxTime}),[e.minDateTime,e.maxDateTime,e.minTime,e.maxTime,e.minDate,e.maxDate,e.disableFuture,e.disablePast,t,n])}var Hf=e=>Df({manager:Af(),props:e});g();function Uf(e){let{ownerState:t}=su(),n=dn();return p(()=>x({},t,{isFieldDisabled:e.disabled??!1,isFieldReadOnly:e.readOnly??!1,isFieldRequired:e.required??!1,fieldDirection:n?`rtl`:`ltr`}),[t,e.disabled,e.readOnly,e.required,n])}function Wf(e){return Ne(`MuiPickersTextField`,e)}var Gf=ke(`MuiPickersTextField`,[`root`,`focused`,`disabled`,`error`,`required`]);function Kf(e){return Ne(`MuiPickersInputBase`,e)}var qf=ke(`MuiPickersInputBase`,[`root`,`focused`,`disabled`,`readOnly`,`error`,`notchedOutline`,`sectionsContainer`,`sectionContent`,`sectionBefore`,`sectionAfter`,`adornedStart`,`adornedEnd`,`input`,`inputSizeSmall`,`activeBar`]);function Jf(e){return Ne(`MuiPickersSectionList`,e)}var Yf=ke(`MuiPickersSectionList`,[`root`,`section`,`sectionContent`]);g();var Xf=[`slots`,`slotProps`,`elements`,`sectionListRef`,`classes`],Zf=q(`div`,{name:`MuiPickersSectionList`,slot:`Root`})({direction:`ltr /*! @noflip */`,outline:`none`}),Qf=q(`span`,{name:`MuiPickersSectionList`,slot:`Section`})({}),$f=q(`span`,{name:`MuiPickersSectionList`,slot:`SectionSeparator`})({whiteSpace:`pre`}),ep=q(`span`,{name:`MuiPickersSectionList`,slot:`SectionContent`})({outline:`none`}),tp=e=>B({root:[`root`],section:[`section`],sectionContent:[`sectionContent`]},Jf,e);function np(e){let{slots:t,slotProps:n,element:r,classes:i}=e,{ownerState:a}=su(),o=(t==null?void 0:t.section)??Qf,s=Vn({elementType:o,externalSlotProps:n==null?void 0:n.section,externalForwardedProps:r.container,className:i.section,ownerState:a}),c=(t==null?void 0:t.sectionContent)??ep,u=Vn({elementType:c,externalSlotProps:n==null?void 0:n.sectionContent,externalForwardedProps:r.content,additionalProps:{suppressContentEditableWarning:!0},className:i.sectionContent,ownerState:a}),d=(t==null?void 0:t.sectionSeparator)??$f,f=Vn({elementType:d,externalSlotProps:n==null?void 0:n.sectionSeparator,externalForwardedProps:r.before,ownerState:x({},a,{separatorPosition:`before`})}),p=Vn({elementType:d,externalSlotProps:n==null?void 0:n.sectionSeparator,externalForwardedProps:r.after,ownerState:x({},a,{separatorPosition:`after`})}),m=l(null),h=nt(u.ref,m);return Je(o,x({},s,{children:[G(d,x({},f)),G(c,x({},u,{ref:h,onBlur:e=>{let t=e.relatedTarget,n=e.currentTarget.closest(`.${Yf.root}`);if(n&&t instanceof Node&&n.contains(t)){e.stopPropagation();return}}})),G(d,x({},p))]}))}var rp=o(function(e,t){let n=cr({props:e,name:`MuiPickersSectionList`}),{slots:r,slotProps:i,elements:a,sectionListRef:o,classes:s}=n,c=Z(n,Xf),u=tp(s),{ownerState:f}=su(),p=l(null),m=nt(t,p),h=e=>{if(!p.current)throw Error(xc(145,e));return p.current};d(o,()=>({getRoot(){return h(`getRoot`)},getSectionContainer(e){return h(`getSectionContainer`).querySelector(`.${Yf.section}[data-sectionindex="${e}"]`)},getSectionContent(e){return h(`getSectionContent`).querySelector(`.${Yf.section}[data-sectionindex="${e}"] .${Yf.sectionContent}`)},getSectionIndexFromDOMElement(e){let t=h(`getSectionIndexFromDOMElement`);if(e==null||!t.contains(e))return null;let n=null;return e.classList.contains(Yf.section)?n=e:e.classList.contains(Yf.sectionContent)&&(n=e.parentElement),n==null?null:Number(n.dataset.sectionindex)}}));let g=(r==null?void 0:r.root)??Zf,_=Vn({elementType:g,externalSlotProps:i==null?void 0:i.root,externalForwardedProps:c,additionalProps:{ref:m,suppressContentEditableWarning:!0},className:u.root,ownerState:f});return G(g,x({},_,{children:_.contentEditable?a.map(({content:e,before:t,after:n})=>`${t.children}${e.children}${n.children}`).join(``):G(y,{children:a.map((e,t)=>G(np,{slots:r,slotProps:i,element:e,classes:u},t))})}))});g();var ip=v(null),ap=()=>{let e=b(ip);if(e==null)throw Error(xc(146));return e};g();var op=`elements.areAllSectionsEmpty.defaultValue.label.value.onChange.id.autoFocus.endAdornment.startAdornment.renderSuffix.slots.slotProps.contentEditable.tabIndex.onInput.onPaste.onKeyDown.fullWidth.name.readOnly.inputRef.sectionListRef.onFocus.onBlur.classes.ownerState`.split(`.`),sp=[`ref`];function cp(e,t){return n=>{let r=An(e,n)??{};return x({},r,{className:Ve(t,r.className)})}}var lp=e=>Math.round(e*1e5)/1e5,up=q(`div`,{name:`MuiPickersInputBase`,slot:`Root`})(({theme:e})=>x({},e.typography.body1,{color:(e.vars||e).palette.text.primary,cursor:`text`,padding:0,display:`flex`,justifyContent:`flex-start`,alignItems:`center`,position:`relative`,boxSizing:`border-box`,letterSpacing:`${lp(.15/16)}em`,[`&.${qf.disabled}`]:{color:(e.vars||e).palette.action.disabled,cursor:`default`},variants:[{props:{isInputInFullWidth:!0},style:{width:`100%`}}]})),dp=q(Zf,{name:`MuiPickersInputBase`,slot:`SectionsContainer`})(({theme:e})=>({padding:`4px 0 5px`,fontFamily:e.typography.fontFamily,fontSize:`inherit`,lineHeight:`1.4375em`,flexGrow:1,outline:`none`,display:`flex`,flexWrap:`nowrap`,overflow:`hidden`,letterSpacing:`inherit`,width:`182px`,variants:[{props:{fieldDirection:`rtl`},style:{justifyContent:`end`}},{props:{inputSize:`small`},style:{paddingTop:1}},{props:{isFieldFocused:!1,isFieldValueEmpty:!0},style:e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:e.palette.mode===`light`?.42:.5}},{props:{isFieldFocused:!1,isFieldValueEmpty:!0,hasStartAdornment:!1,inputHasLabel:!0,isLabelShrunk:!1},style:{opacity:0}}]})),fp=q(Qf,{name:`MuiPickersInputBase`,slot:`Section`})(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:`inherit`,letterSpacing:`inherit`,lineHeight:`1.4375em`,display:`inline-block`,whiteSpace:`nowrap`})),pp=q(ep,{name:`MuiPickersInputBase`,slot:`SectionContent`,overridesResolver:(e,t)=>t.content})(({theme:e})=>({fontFamily:e.typography.fontFamily,lineHeight:`1.4375em`,letterSpacing:`inherit`,width:`fit-content`,outline:`none`,"@supports (-webkit-app-region: drag)":{[`.${qf.root}:not(:focus-within) &`]:{WebkitUserModify:`read-only`,userSelect:`none`}}})),mp=q($f,{name:`MuiPickersInputBase`,slot:`Separator`})(()=>({whiteSpace:`pre`,letterSpacing:`inherit`})),hp=q(`input`,{name:`MuiPickersInputBase`,slot:`Input`,overridesResolver:(e,t)=>t.hiddenInput})(x({},ct)),gp=q(`div`,{name:`MuiPickersInputBase`,slot:`ActiveBar`})(({theme:e,ownerState:t})=>({display:`none`,position:`absolute`,height:2,bottom:2,borderTopLeftRadius:2,borderTopRightRadius:2,transition:e.transitions.create([`width`,`left`],{duration:e.transitions.duration.shortest}),backgroundColor:(e.vars||e).palette.primary.main,'[data-active-range-position="start"] &, [data-active-range-position="end"] &':{display:`block`},'[data-active-range-position="start"] &':{left:t.sectionOffsets[0]},'[data-active-range-position="end"] &':{left:t.sectionOffsets[1]}})),_p=(e,t)=>{let{isFieldFocused:n,isFieldDisabled:r,isFieldReadOnly:i,hasFieldError:a,inputSize:o,isInputInFullWidth:s,inputColor:c,hasStartAdornment:l,hasEndAdornment:u}=t,d={root:[`root`,n&&!r&&`focused`,r&&`disabled`,i&&`readOnly`,a&&`error`,s&&`fullWidth`,`color${ce(c)}`,o===`small`&&`inputSizeSmall`,l&&`adornedStart`,u&&`adornedEnd`],notchedOutline:[`notchedOutline`],input:[`input`],sectionsContainer:[`sectionsContainer`],sectionContent:[`sectionContent`],sectionBefore:[`sectionBefore`],sectionAfter:[`sectionAfter`],activeBar:[`activeBar`]};return B(d,Kf,e)};function vp(e,t,n,r){if(e.content[`data-range-position`]!==void 0){var i;let e=(i=t.current)==null?void 0:i.querySelectorAll(`[data-sectionindex="${n}"] [data-range-position="${r}"]`);if(e)return Array.from(e).reduce((e,t)=>e+t.offsetWidth,0)}return 0}function yp(e,t){var n,r,i;let a=0;if(((n=t.current)==null?void 0:n.getAttribute(`data-active-range-position`))===`end`)for(let n=e.length-1;n>=e.length/2;--n)a+=vp(e[n],t,n,`end`);else for(let n=0;n<e.length/2;n+=1)a+=vp(e[n],t,n,`start`);return{activeBarWidth:a,sectionOffsets:[((r=t.current)==null||(r=r.querySelector(`[data-sectionindex="0"]`))==null?void 0:r.offsetLeft)||0,((i=t.current)==null||(i=i.querySelector(`[data-sectionindex="${e.length/2}"]`))==null?void 0:i.offsetLeft)||0]}}var bp=o(function(e,t){let n=cr({props:e,name:`MuiPickersInputBase`}),{elements:r,areAllSectionsEmpty:i,value:o,onChange:s,id:c,endAdornment:u,startAdornment:d,renderSuffix:f,slots:p,slotProps:m,contentEditable:h,tabIndex:g,onInput:_,onPaste:v,onKeyDown:y,name:b,readOnly:S,inputRef:C,sectionListRef:w,onFocus:T,onBlur:E,classes:D,ownerState:O}=n,k=Z(n,op),A=ap(),j=l(null),M=l(null),N=l([]),ee=nt(t,j),P=Qe();if(!P)throw Error(xc(152));let F=O??A,I=e=>{var t;(t=P.onFocus)==null||t.call(P,e),T==null||T(e)},L=e=>{I(e)},R=e=>{if(y==null||y(e),e.key===`Enter`&&!e.defaultMuiPrevented){var t,n;if((t=j.current)!=null&&t.dataset.multiInput)return;let r=(n=j.current)==null?void 0:n.closest(`form`),i=r==null?void 0:r.querySelector(`[type="submit"]`);if(!r||!i)return;e.preventDefault(),r.requestSubmit(i)}},te=e=>{var t;(t=P.onBlur)==null||t.call(P,e),E==null||E(e)};a(()=>{P&&P.setAdornedStart(!!d)},[P,d]),a(()=>{P&&(i?P.onEmpty():P.onFilled())},[P,i]);let ne=_p(D,F),z=(p==null?void 0:p.root)||up,B=Vn({elementType:z,externalSlotProps:m==null?void 0:m.root,externalForwardedProps:k,additionalProps:{"aria-invalid":P.error,ref:ee},className:ne.root,ownerState:F}),re=(p==null?void 0:p.input)||dp,ie=(p==null?void 0:p.htmlInput)||hp,ae=Vn({elementType:ie,externalSlotProps:m==null?void 0:m.htmlInput,ownerState:F}),{ref:oe}=ae,V=Z(ae,sp),se=nt(oe,C),ce=r.some(e=>e.content[`data-range-position`]!==void 0);return a(()=>{if(!ce||!F.isPickerOpen)return;let{activeBarWidth:e,sectionOffsets:t}=yp(r,j);N.current=[t[0],t[1]],M.current&&(M.current.style.width=`${e}px`)},[r,ce,F.isPickerOpen]),Je(z,x({},B,{children:[d,G(rp,{sectionListRef:w,elements:r,contentEditable:h,tabIndex:g,className:ne.sectionsContainer,onFocus:I,onBlur:te,onInput:_,onPaste:v,onKeyDown:R,slots:{root:re,section:fp,sectionContent:pp,sectionSeparator:mp},slotProps:{root:x({},m==null?void 0:m.input,{ownerState:F}),sectionContent:cp(m==null?void 0:m.sectionContent,qf.sectionContent),sectionSeparator:({separatorPosition:e})=>({className:e===`before`?qf.sectionBefore:qf.sectionAfter})}}),u,f?f(x({},P)):null,G(ie,x({name:b,className:ne.input,value:o,onChange:s,id:c,"aria-hidden":`true`,tabIndex:-1,readOnly:S,required:P.required,disabled:P.disabled,onFocus:L},V,{ref:se})),ce&&G(gp,{className:ne.activeBar,ref:M,ownerState:{sectionOffsets:N.current}})]}))});function xp(e){return Ne(`MuiPickersOutlinedInput`,e)}var Sp=x({},qf,ke(`MuiPickersOutlinedInput`,[`root`,`notchedOutline`,`input`]));g();var Cp=[`children`,`className`,`label`,`notched`,`shrink`],wp=q(`fieldset`,{name:`MuiPickersOutlinedInput`,slot:`NotchedOutline`})(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.23)`:`rgba(255, 255, 255, 0.23)`;return{textAlign:`left`,position:`absolute`,bottom:0,right:0,top:-5,left:0,margin:0,padding:`0 8px`,pointerEvents:`none`,borderRadius:`inherit`,borderStyle:`solid`,borderWidth:1,overflow:`hidden`,minWidth:`0%`,borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}}),Tp=q(`span`,{slot:`internal`,shouldForwardProp:void 0})(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:`inherit`})),Ep=q(`legend`,{slot:`internal`,shouldForwardProp:e=>cn(e)&&e!==`notched`})(({theme:e})=>({float:`unset`,width:`auto`,overflow:`hidden`,variants:[{props:{inputHasLabel:!1},style:{padding:0,lineHeight:`11px`,transition:e.transitions.create(`width`,{duration:150,easing:e.transitions.easing.easeOut})}},{props:{inputHasLabel:!0},style:{display:`block`,padding:0,height:11,fontSize:`0.75em`,visibility:`hidden`,maxWidth:.01,transition:e.transitions.create(`max-width`,{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:`nowrap`,"& > span":{paddingLeft:5,paddingRight:5,display:`inline-block`,opacity:0,visibility:`visible`}}},{props:{inputHasLabel:!0,notched:!0},style:{maxWidth:`100%`,transition:e.transitions.create(`max-width`,{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]}));function Dp(e){let{className:t,label:n,notched:r}=e,i=Z(e,Cp),a=ap();return G(wp,x({"aria-hidden":!0,className:t},i,{ownerState:a,children:G(Ep,{ownerState:a,notched:r,children:n?G(Tp,{children:n}):G(Tp,{className:`notranslate`,children:``})})}))}g();var Op=[`label`,`autoFocus`,`ownerState`,`classes`,`notched`,`slots`,`slotProps`],kp=q(up,{name:`MuiPickersOutlinedInput`,slot:`Root`})(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.23)`:`rgba(255, 255, 255, 0.23)`;return{padding:`0 14px`,borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Sp.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Sp.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${Sp.focused} .${Sp.notchedOutline}`]:{borderStyle:`solid`,borderWidth:2},[`&.${Sp.error} .${Sp.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Sp.disabled}`]:{[`& .${Sp.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}},variants:Object.keys((e.vars??e).palette).filter(t=>{var n;return((n=(e.vars??e).palette[t])==null?void 0:n.main)??!1}).map(t=>({props:{inputColor:t},style:{[`&.${Sp.focused}:not(.${Sp.error}) .${Sp.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}}))}}),Ap=q(dp,{name:`MuiPickersOutlinedInput`,slot:`SectionsContainer`})({padding:`16.5px 0`,variants:[{props:{inputSize:`small`},style:{padding:`8.5px 0`}}]}),jp=e=>{let t=B({root:[`root`],notchedOutline:[`notchedOutline`],input:[`input`]},xp,e);return x({},e,t)},Mp=o(function(e,t){let n=cr({props:e,name:`MuiPickersOutlinedInput`}),{label:r,classes:i,notched:a,slots:o,slotProps:s}=n,c=Z(n,Op),l=Qe(),u=jp(i);return G(bp,x({},c,{slots:x({root:kp,input:Ap},o),slotProps:s,renderSuffix:e=>{let t=a===void 0?!!(e.adornedStart||e.focused||e.filled):a;return G(Dp,{shrink:t,notched:t,className:u.notchedOutline,label:r!=null&&r!==``&&l!=null&&l.required?Je(y,{children:[r,` `,`*`]}):r})},label:r,classes:u,ref:t}))});Mp.muiName=`Input`;function Np(e){return Ne(`MuiPickersFilledInput`,e)}var Pp=x({},qf,ke(`MuiPickersFilledInput`,[`root`,`underline`,`input`]));g();var Fp=[`label`,`autoFocus`,`disableUnderline`,`hiddenLabel`,`classes`,`slots`,`slotProps`],Ip=q(up,{name:`MuiPickersFilledInput`,slot:`Root`,shouldForwardProp:e=>cn(e)&&e!==`disableUnderline`})(({theme:e})=>{let t=e.palette.mode===`light`,n=t?`rgba(0, 0, 0, 0.42)`:`rgba(255, 255, 255, 0.7)`,r=t?`rgba(0, 0, 0, 0.06)`:`rgba(255, 255, 255, 0.09)`,i=t?`rgba(0, 0, 0, 0.09)`:`rgba(255, 255, 255, 0.13)`,a=t?`rgba(0, 0, 0, 0.12)`:`rgba(255, 255, 255, 0.12)`;return{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(`background-color`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:i,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${Pp.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${Pp.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:a},variants:[...Object.keys((e.vars??e).palette).filter(t=>(e.vars??e).palette[t].main).map(t=>{var n;return{props:{inputColor:t,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(n=(e.vars||e).palette[t])==null?void 0:n.main}`}}}}),{props:{disableUnderline:!1},style:{"&::after":{left:0,bottom:0,content:`""`,position:`absolute`,right:0,transform:`scaleX(0)`,transition:e.transitions.create(`transform`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:`none`},[`&.${Pp.focused}:after`]:{transform:`scaleX(1) translateX(0)`},[`&.${Pp.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline):n}`,left:0,bottom:0,content:`"\\00a0"`,position:`absolute`,right:0,transition:e.transitions.create(`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},[`&:hover:not(.${Pp.disabled}, .${Pp.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${Pp.disabled}:before`]:{borderBottomStyle:`dotted`}}},{props:{hasStartAdornment:!0},style:{paddingLeft:12}},{props:{hasEndAdornment:!0},style:{paddingRight:12}}]}}),Lp=q(dp,{name:`MuiPickersFilledInput`,slot:`sectionsContainer`,shouldForwardProp:e=>cn(e)&&e!==`hiddenLabel`})({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,variants:[{props:{inputSize:`small`},style:{paddingTop:21,paddingBottom:4}},{props:{hasStartAdornment:!0},style:{paddingLeft:0}},{props:{hasEndAdornment:!0},style:{paddingRight:0}},{props:{hiddenLabel:!0},style:{paddingTop:16,paddingBottom:17}},{props:{hiddenLabel:!0,inputSize:`small`},style:{paddingTop:8,paddingBottom:9}}]}),Rp=(e,t)=>{let{inputHasUnderline:n}=t,r=B({root:[`root`,n&&`underline`],input:[`input`]},Np,e);return x({},e,r)},zp=o(function(e,t){let n=cr({props:e,name:`MuiPickersFilledInput`}),{label:r,disableUnderline:i=!1,hiddenLabel:a=!1,classes:o,slots:s,slotProps:c}=n,l=Z(n,Fp),u=ap(),d=x({},u,{inputHasUnderline:!i}),f=Rp(o,d);return G(bp,x({},l,{slots:x({root:Ip,input:Lp},s),slotProps:x({},c,{root:x({disableUnderline:i},c==null?void 0:c.root),input:x({hiddenLabel:a},c==null?void 0:c.input)}),label:r,classes:f,ref:t,ownerState:d}))});zp.muiName=`Input`;function Bp(e){return Ne(`MuiPickersFilledInput`,e)}var Vp=x({},qf,ke(`MuiPickersInput`,[`root`,`underline`,`input`]));g();var Hp=[`label`,`autoFocus`,`disableUnderline`,`ownerState`,`classes`,`slots`,`slotProps`],Up=q(up,{name:`MuiPickersInput`,slot:`Root`,shouldForwardProp:e=>cn(e)&&e!==`disableUnderline`})(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.42)`:`rgba(255, 255, 255, 0.7)`;return e.vars&&(t=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{"label + &":{marginTop:16},variants:[...Object.keys((e.vars??e).palette).filter(t=>(e.vars??e).palette[t].main).map(t=>({props:{inputColor:t,inputHasUnderline:!0},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t].main}`}}})),{props:{inputHasUnderline:!0},style:{"&::after":{background:`red`,left:0,bottom:0,content:`""`,position:`absolute`,right:0,transform:`scaleX(0)`,transition:e.transitions.create(`transform`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:`none`},[`&.${Vp.focused}:after`]:{transform:`scaleX(1) translateX(0)`},[`&.${Vp.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${t}`,left:0,bottom:0,content:`"\\00a0"`,position:`absolute`,right:0,transition:e.transitions.create(`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},[`&:hover:not(.${Vp.disabled}, .${Vp.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${t}`}},[`&.${Vp.disabled}:before`]:{borderBottomStyle:`dotted`}}}]}}),Wp=(e,t)=>{let{inputHasUnderline:n}=t,r=B({root:[`root`,!n&&`underline`],input:[`input`]},Bp,e);return x({},e,r)},Gp=o(function(e,t){let n=cr({props:e,name:`MuiPickersInput`}),{label:r,disableUnderline:i=!1,classes:a,slots:o,slotProps:s}=n,c=Z(n,Hp),l=ap(),u=x({},l,{inputHasUnderline:!i}),d=Wp(a,u);return G(bp,x({},c,{slots:x({root:Up},o),slotProps:x({},s,{root:x({disableUnderline:i},s==null?void 0:s.root)}),ownerState:u,label:r,classes:d,ref:t}))});Gp.muiName=`Input`,g();var Kp=`onFocus.onBlur.className.classes.color.disabled.error.variant.required.hiddenLabel.inputRef.sectionListRef.elements.areAllSectionsEmpty.onClick.onMouseDown.onKeyDown.onKeyUp.onPaste.onInput.endAdornment.startAdornment.tabIndex.contentEditable.focused.value.onChange.fullWidth.id.name.helperText.label.slots.slotProps.data-active-range-position`.split(`.`),qp={standard:Gp,filled:zp,outlined:Mp},Jp=q(mt,{name:`MuiPickersTextField`,slot:`Root`})({maxWidth:`100%`}),Yp=(e,t)=>{let{isFieldFocused:n,isFieldDisabled:r,isFieldRequired:i}=t;return B({root:[`root`,n&&!r&&`focused`,r&&`disabled`,i&&`required`]},Wf,e)},Xp=o(function(e,t){let n=cr({props:e,name:`MuiPickersTextField`}),{onFocus:r,onBlur:i,className:a,classes:o,color:s=`primary`,disabled:c=!1,error:u=!1,variant:d=`outlined`,required:f=!1,hiddenLabel:m=!1,inputRef:h,sectionListRef:g,elements:_,areAllSectionsEmpty:v,onClick:y,onMouseDown:b,onKeyDown:S,onKeyUp:C,onPaste:w,onInput:T,endAdornment:E,startAdornment:D,tabIndex:O,contentEditable:k,focused:A,value:j,onChange:M,fullWidth:N,id:ee,name:P,helperText:F,label:I,slots:L,slotProps:R,"data-active-range-position":te}=n,ne=Z(n,Kp),z=l(null),B=nt(t,z),re=Le(ee),ie=F&&re?`${re}-helper-text`:void 0,ae=I&&re?`${re}-label`:void 0,oe=R==null?void 0:R.input,V=R==null?void 0:R.inputLabel,se=Uf({disabled:n.disabled,required:n.required,readOnly:oe==null?void 0:oe.readOnly}),ce=p(()=>x({},se,{isFieldValueEmpty:v,isFieldFocused:A??!1,hasFieldError:u??!1,inputSize:n.size??`medium`,inputColor:s??`primary`,isInputInFullWidth:N??!1,hasStartAdornment:!!(D??(oe==null?void 0:oe.startAdornment)),hasEndAdornment:!!(E??(oe==null?void 0:oe.endAdornment)),inputHasLabel:!!I,isLabelShrunk:!!(V!=null&&V.shrink)}),[se,v,A,u,n.size,s,N,D,E,oe==null?void 0:oe.startAdornment,oe==null?void 0:oe.endAdornment,I,V==null?void 0:V.shrink]),H=Yp(o,ce),U=(L==null?void 0:L.input)??qp[d],le=(L==null?void 0:L.root)??Jp,ue=(L==null?void 0:L.inputLabel)??Se,de=(L==null?void 0:L.formHelperText)??_t,fe={};d===`outlined`?(V&&V.shrink!==void 0&&(fe.notched=V.shrink),fe.label=I):d===`filled`&&(fe.hiddenLabel=m);let pe=Vn({elementType:le,externalSlotProps:R==null?void 0:R.root,externalForwardedProps:x({},ne,{className:a}),additionalProps:{ref:B,focused:A,disabled:c,variant:d,error:u,color:s,fullWidth:N,required:f},className:H.root,ownerState:ce});return G(ip.Provider,{value:ce,children:Je(le,x({},pe,{children:[I!=null&&I!==``&&G(ue,x({htmlFor:re,id:ae},V,{children:I})),G(U,x({elements:_,areAllSectionsEmpty:v,onClick:y,onMouseDown:b,onKeyDown:S,onKeyUp:C,onInput:T,onPaste:w,onFocus:r,onBlur:i,endAdornment:E,startAdornment:D,tabIndex:O,contentEditable:k,value:j,onChange:M,id:re,fullWidth:N,inputRef:h,sectionListRef:g,label:I,name:P,role:`group`,"aria-labelledby":ae,"aria-describedby":ie,"aria-live":ie?`polite`:void 0,"data-active-range-position":te},fe,oe,{slots:x({},oe==null?void 0:oe.slots,(L==null?void 0:L.htmlInput)!==void 0&&{htmlInput:L.htmlInput}),slotProps:x({},oe==null?void 0:oe.slotProps,(R==null?void 0:R.htmlInput)!==void 0&&{htmlInput:R.htmlInput})})),F&&G(de,x({id:ie},R==null?void 0:R.formHelperText,{children:F}))]}))})});g();var Zp=[`readOnly`,`onClear`,`clearable`,`clearButtonPosition`,`openPickerButtonPosition`,`openPickerAriaLabel`,`InputProps`,`inputProps`,`InputLabelProps`,`FormHelperTextProps`],Qp=[`ownerState`],$p=[`ownerState`],em=[`ownerState`],tm=[`ownerState`],nm=[`InputProps`,`inputProps`,`InputLabelProps`,`FormHelperTextProps`],rm=e=>{var t;let n=e,{readOnly:r,onClear:i,clearable:a,clearButtonPosition:o,openPickerButtonPosition:s,openPickerAriaLabel:c,InputProps:l,inputProps:u,InputLabelProps:d,FormHelperTextProps:f}=n,p=Z(n,Zp);return{clearable:a,onClear:i,clearButtonPosition:o,openPickerButtonPosition:s,openPickerAriaLabel:c,textFieldProps:x({},p,{slotProps:x({},p==null?void 0:p.slotProps,{input:x({},p==null||(t=p.slotProps)==null?void 0:t.input,{readOnly:r})})})}},im=v({slots:{},slotProps:{},inputRef:void 0});function am(e){var t;let{fieldResponse:n,defaultOpenPickerIcon:r}=e,i=Ac(),a=Bl(),o=b(im),{textFieldProps:s,onClear:c,clearable:l,openPickerAriaLabel:u,clearButtonPosition:d=`end`,openPickerButtonPosition:f=`end`}=rm(n),p=Uf(s),m=Y(e=>{e.preventDefault(),a==null||a.setOpen(!0)}),h=a?a.triggerStatus:`hidden`,g=l?d:null,_=h===`hidden`?null:f,v=o.slots.textField??Xp,y=o.slots.inputAdornment??Nn,S=Z(Vn({elementType:y,externalSlotProps:o.slotProps.inputAdornment,additionalProps:{position:`start`},ownerState:x({},p,{position:`start`})}),Qp),C=Z(Vn({elementType:y,externalSlotProps:o.slotProps.inputAdornment,additionalProps:{position:`end`},ownerState:x({},p,{position:`end`})}),$p),w=o.slots.openPickerButton??mn,T=Z(Vn({elementType:w,externalSlotProps:o.slotProps.openPickerButton,additionalProps:{disabled:h===`disabled`,onClick:m,"aria-label":u,"data-mui-picker-open-button":`true`,edge:s.variant!==`standard`&&_},ownerState:p}),em),E=o.slots.openPickerIcon??r,D=Vn({elementType:E,externalSlotProps:o.slotProps.openPickerIcon,ownerState:p}),O=o.slots.clearButton??mn,k=Z(Vn({elementType:O,externalSlotProps:o.slotProps.clearButton,className:`clearButton`,additionalProps:{title:i.fieldClearLabel,tabIndex:-1,onClick:c,disabled:n.disabled||n.readOnly,edge:s.variant!==`standard`&&g!==_&&g},ownerState:p}),tm),A=o.slots.clearIcon??au,j=Vn({elementType:A,externalSlotProps:o.slotProps.clearIcon,additionalProps:{fontSize:`small`},ownerState:p});s.ref=nt(s.ref,a==null?void 0:a.rootRef);let M=(t=s.slotProps)==null?void 0:t.input,N={},ee=nt(M==null?void 0:M.ref,a==null?void 0:a.triggerRef);return a&&(N.ref=ee),!(M!=null&&M.startAdornment)&&(g===`start`||_===`start`)&&(N.startAdornment=Je(y,x({},S,{children:[_===`start`&&G(w,x({},T,{children:G(E,x({},D))})),g===`start`&&G(O,x({},k,{children:G(A,x({},j))}))]}))),!(M!=null&&M.endAdornment)&&(g===`end`||_===`end`)&&(N.endAdornment=Je(y,x({},C,{children:[g===`end`&&G(O,x({},k,{children:G(A,x({},j))})),_===`end`&&G(w,x({},T,{children:G(E,x({},D))}))]}))),!N.endAdornment&&!N.startAdornment&&o.slots.inputAdornment&&(N.endAdornment=G(y,x({},C))),g!=null&&(s.sx=[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(s.sx)?s.sx:[s.sx]]),s.slotProps=x({},s.slotProps,{input:x({},M,N)}),G(v,x({},s))}function om(e,t){return e?t?n=>x({},An(t,n),An(e,n)):e:t}function sm(e){let{ref:t,externalForwardedProps:n,slotProps:r}=e,i=b(im),a=Bl(),o=Uf(n),s=n??{},{InputProps:c,inputProps:l,InputLabelProps:u,FormHelperTextProps:d}=s,f=Z(s,nm),p=Vn({elementType:Xp,externalSlotProps:om(i.slotProps.textField,r==null?void 0:r.textField),externalForwardedProps:f,additionalProps:{ref:t,sx:a==null?void 0:a.rootSx,label:a==null?void 0:a.label,name:a==null?void 0:a.name,className:a==null?void 0:a.rootClassName,inputRef:i.inputRef},ownerState:o});if(a&&a.keepOpenDuringFieldFocus&&a.triggerStatus===`enabled`&&!a.open&&!a.readOnly&&!a.disabled){let e=p.onFocus,t=p.onMouseDown,n=e=>{var t;let n=e.nativeEvent??e,r=n==null||(t=n.composedPath)==null?void 0:t.call(n);if(Array.isArray(r)){for(let e of r)if(e&&e.getAttribute&&e.getAttribute(`data-mui-picker-open-button`)===`true`)return!0}let i=e.target;return i&&i.closest?!!i.closest(`[data-mui-picker-open-button="true"]`):!1};p.onFocus=t=>{e==null||e(t),!t.isDefaultPrevented()&&!n(t)&&a.setOpen(!0)},p.onMouseDown=e=>{t==null||t(e),!e.isDefaultPrevented()&&!n(e)&&a.setOpen(!0)}}return p}function cm(e){let{slots:t={},slotProps:n={},inputRef:r,children:i}=e,a=p(()=>({inputRef:r,slots:{openPickerButton:t.openPickerButton,openPickerIcon:t.openPickerIcon,textField:t.textField,inputAdornment:t.inputAdornment,clearIcon:t.clearIcon,clearButton:t.clearButton},slotProps:{openPickerButton:n.openPickerButton,openPickerIcon:n.openPickerIcon,textField:n.textField,inputAdornment:n.inputAdornment,clearIcon:n.clearIcon,clearButton:n.clearButton}}),[r,t.openPickerButton,t.openPickerIcon,t.textField,t.inputAdornment,t.clearIcon,t.clearButton,n.openPickerButton,n.openPickerIcon,n.textField,n.inputAdornment,n.clearIcon,n.clearButton]);return G(im.Provider,{value:a,children:i})}g();var lm=[`slots`,`slotProps`],um=o(function(e,t){let n=cr({props:e,name:`MuiDateField`}),{slots:r,slotProps:i}=n,a=Z(n,lm),o=Hf(sm({slotProps:i,ref:t,externalForwardedProps:a}));return G(cm,{slots:r,slotProps:i,inputRef:a.inputRef,children:G(am,{fieldResponse:o,defaultOpenPickerIcon:tu})})}),dm=e=>Df({manager:Pf(e),props:e});g();var fm=[`slots`,`slotProps`],pm=o(function(e,t){let n=cr({props:e,name:`MuiTimeField`}),{slots:r,slotProps:i}=n,a=Z(n,fm),o=dm(sm({slotProps:i,ref:t,externalForwardedProps:a}));return G(cm,{slots:r,slotProps:i,inputRef:a.inputRef,children:G(am,{fieldResponse:o,defaultOpenPickerIcon:nu})})}),mm=e=>Df({manager:Rf(),props:e});g();var hm=[`slots`,`slotProps`],gm=o(function(e,t){let n=cr({props:e,name:`MuiDateTimeField`}),{slots:r,slotProps:i}=n,a=Z(n,hm),o=mm(sm({slotProps:i,ref:t,externalForwardedProps:a}));return G(cm,{slots:r,slotProps:i,inputRef:a.inputRef,children:G(am,{fieldResponse:o,defaultOpenPickerIcon:tu})})});g();var _m=({shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:i,disableFuture:a,disablePast:o,timezone:s})=>{let c=kc();return f(l=>uf({adapter:c,value:l,timezone:s,props:{shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:i,disableFuture:a,disablePast:o}})!==null,[c,e,t,n,r,i,a,o,s])};g();var vm=(e,t)=>(n,r)=>{switch(r.type){case`setVisibleDate`:return x({},n,{slideDirection:r.direction,currentMonth:r.month,isMonthSwitchingAnimating:!t.isSameMonth(r.month,n.currentMonth)&&!e&&!r.skipAnimation,focusedDay:r.focusedDay});case`changeMonthTimezone`:{let e=r.newTimezone;if(t.getTimezone(n.currentMonth)===e)return n;let i=t.setTimezone(n.currentMonth,e);return t.getMonth(i)!==t.getMonth(n.currentMonth)&&(i=t.setMonth(i,t.getMonth(n.currentMonth))),x({},n,{currentMonth:i})}case`finishMonthSwitchingAnimation`:return x({},n,{isMonthSwitchingAnimating:!1});default:throw Error(`missing support`)}},ym=e=>{let{value:t,referenceDate:n,disableFuture:r,disablePast:i,maxDate:o,minDate:s,onMonthChange:u,onYearChange:d,reduceAnimations:m,shouldDisableDate:h,timezone:g,getCurrentMonthFromVisibleDate:_}=e,v=kc(),y=l(vm(!!m,v)).current,b=p(()=>pd.getInitialReferenceValue({value:t,adapter:v,timezone:g,props:e,referenceDate:n,granularity:cd.day}),[n,g]),[x,S]=c(y,{isMonthSwitchingAnimating:!1,focusedDay:b,currentMonth:v.setDate(b,1),slideDirection:`left`}),C=_m({shouldDisableDate:h,minDate:s,maxDate:o,disableFuture:r,disablePast:i,timezone:g});return a(()=>{S({type:`changeMonthTimezone`,newTimezone:v.getTimezone(b)})},[b,v]),{referenceDate:b,calendarState:x,setVisibleDate:Y(({target:e,reason:t})=>{if(t===`cell-interaction`&&x.focusedDay!=null&&v.isSameDay(e,x.focusedDay))return;let n=t===`cell-interaction`,a,c;if(t===`cell-interaction`)a=_(e,x.currentMonth),c=e;else if(a=v.isSameMonth(e,x.currentMonth)?x.currentMonth:v.startOfMonth(e),c=e,C(c)){let t=v.startOfMonth(e),n=v.endOfMonth(e);c=Vc({adapter:v,date:c,minDate:v.isBefore(s,t)?t:s,maxDate:v.isAfter(o,n)?n:o,disablePast:i,disableFuture:r,isDateDisabled:C,timezone:g})}let l=!v.isSameMonth(x.currentMonth,a),f=!v.isSameYear(x.currentMonth,a);l&&(u==null||u(a)),f&&(d==null||d(v.startOfYear(a))),S({type:`setVisibleDate`,month:a,direction:v.isAfterDay(a,x.currentMonth)?`left`:`right`,focusedDay:x.focusedDay!=null&&c!=null&&v.isSameDay(c,x.focusedDay)?x.focusedDay:c,skipAnimation:n})}),isDateDisabled:C,onMonthSwitchingAnimationEnd:f(()=>{S({type:`finishMonthSwitchingAnimation`})},[])}};function bm(e,t){return bm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},bm(e,t)}function xm(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,bm(e,t)}function Sm(e,t){return e.classList?!!t&&e.classList.contains(t):(` `+(e.className.baseVal||e.className)+` `).indexOf(` `+t+` `)!==-1}function Cm(e,t){e.classList?e.classList.add(t):Sm(e,t)||(typeof e.className==`string`?e.className=e.className+` `+t:e.setAttribute(`class`,(e.className&&e.className.baseVal||``)+` `+t))}function wm(e,t){return e.replace(RegExp(`(^|\\s)`+t+`(?:\\s|$)`,`g`),`$1`).replace(/\s+/g,` `).replace(/^\s*|\s*$/g,``)}function Tm(e,t){e.classList?e.classList.remove(t):typeof e.className==`string`?e.className=wm(e.className,t):e.setAttribute(`class`,wm(e.className&&e.className.baseVal||``,t))}var Em={disabled:!1},Dm=function(e){return e.scrollTop};g();var Om=`unmounted`,km=`exited`,Am=`entering`,jm=`entered`,Mm=`exiting`,Nm=function(e){xm(t,e);function t(t,n){var r=e.call(this,t,n)||this,i=n,a=i&&!i.isMounting?t.enter:t.appear,o;return r.appearStatus=null,t.in?a?(o=km,r.appearStatus=Am):o=jm:o=t.unmountOnExit||t.mountOnEnter?Om:km,r.state={status:o},r.nextCallback=null,r}t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===`unmounted`?{status:km}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==`entering`&&n!==`entered`&&(t=Am):(n===`entering`||n===`entered`)&&(t=Mm)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e=this.props.timeout,t=n=r=e,n,r;return e!=null&&typeof e!=`number`&&(t=e.exit,n=e.enter,r=e.appear===void 0?n:e.appear),{exit:t,enter:n,appear:r}},n.updateStatus=function(e,t){if(e===void 0&&(e=!1),t!==null)if(this.cancelNextCallback(),t===`entering`){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:P.findDOMNode(this);n&&Dm(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===`exited`&&this.setState({status:Om})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[P.findDOMNode(this),r],a=i[0],o=i[1],s=this.getTimeouts(),c=r?s.appear:s.enter;if(!e&&!n||Em.disabled){this.safeSetState({status:jm},function(){t.props.onEntered(a)});return}this.props.onEnter(a,o),this.safeSetState({status:Am},function(){t.props.onEntering(a,o),t.onTransitionEnd(c,function(){t.safeSetState({status:jm},function(){t.props.onEntered(a,o)})})})},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:P.findDOMNode(this);if(!t||Em.disabled){this.safeSetState({status:km},function(){e.props.onExited(r)});return}this.props.onExit(r),this.safeSetState({status:Mm},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:km},function(){e.props.onExited(r)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:P.findDOMNode(this),r=e==null&&!this.props.addEndListener;if(!n||r){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=i[0],o=i[1];this.props.addEndListener(a,o)}e!=null&&setTimeout(this.nextCallback,e)},n.render=function(){var e=this.state.status;if(e===`unmounted`)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=Z(t,[`children`,`in`,`mountOnEnter`,`unmountOnExit`,`appear`,`enter`,`exit`,`timeout`,`addEndListener`,`onEnter`,`onEntering`,`onEntered`,`onExit`,`onExiting`,`onExited`,`nodeRef`]);return _.createElement(vn.Provider,{value:null},typeof n==`function`?n(e,r):_.cloneElement(_.Children.only(n),r))},t}(_.Component);Nm.contextType=vn,Nm.propTypes={};function Pm(){}Nm.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Pm,onEntering:Pm,onEntered:Pm,onExit:Pm,onExiting:Pm,onExited:Pm},Nm.UNMOUNTED=Om,Nm.EXITED=km,Nm.ENTERING=Am,Nm.ENTERED=jm,Nm.EXITING=Mm,g();var Fm=function(e,t){return e&&t&&t.split(` `).forEach(function(t){return Cm(e,t)})},Im=function(e,t){return e&&t&&t.split(` `).forEach(function(t){return Tm(e,t)})},Lm=function(e){xm(t,e);function t(){var t,n=[...arguments];return t=e.call.apply(e,[this].concat(n))||this,t.appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1];t.removeClasses(i,`exit`),t.addClass(i,a?`appear`:`enter`,`base`),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1]?`appear`:`enter`;t.addClass(i,a,`active`),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1]?`appear`:`enter`;t.removeClasses(i,a),t.addClass(i,a,`done`),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,`appear`),t.removeClasses(n,`enter`),t.addClass(n,`exit`,`base`),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,`exit`,`active`),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,`exit`),t.addClass(n,`exit`,`done`),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r=typeof n==`string`,i=r&&n?n+`-`:``,a=r?``+i+e:n[e];return{baseClassName:a,activeClassName:r?a+`-active`:n[e+`Active`],doneClassName:r?a+`-done`:n[e+`Done`]}},t}var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+`ClassName`],i=this.getClassNames(`enter`).doneClassName;t===`appear`&&n===`done`&&i&&(r+=` `+i),n===`active`&&e&&Dm(e),r&&(this.appliedClasses[t][n]=r,Fm(e,r))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,i=n.active,a=n.done;this.appliedClasses[t]={},r&&Im(e,r),i&&Im(e,i),a&&Im(e,a)},n.render=function(){var e=this.props;e.classNames;var t=Z(e,[`classNames`]);return _.createElement(Nm,x({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(_.Component);Lm.defaultProps={classNames:``},Lm.propTypes={};function Rm(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}g();function zm(e,t){var n=function(e){return t&&C(e)?t(e):e},r=Object.create(null);return e&&S.map(e,function(e){return e}).forEach(function(e){r[e.key]=n(e)}),r}function Bm(e,t){e||={},t||={};function n(n){return n in t?t[n]:e[n]}var r=Object.create(null),i=[];for(var a in e)a in t?i.length&&(r[a]=i,i=[]):i.push(a);var o,s={};for(var c in t){if(r[c])for(o=0;o<r[c].length;o++){var l=r[c][o];s[r[c][o]]=n(l)}s[c]=n(c)}for(o=0;o<i.length;o++)s[i[o]]=n(i[o]);return s}function Vm(e,t,n){return n[t]==null?e.props[t]:n[t]}function Hm(e,t){return zm(e.children,function(n){return T(n,{onExited:t.bind(null,n),in:!0,appear:Vm(n,`appear`,e),enter:Vm(n,`enter`,e),exit:Vm(n,`exit`,e)})})}function Um(e,t,n){var r=zm(e.children),i=Bm(t,r);return Object.keys(i).forEach(function(a){var o=i[a];if(C(o)){var s=a in t,c=a in r,l=t[a],u=C(l)&&!l.props.in;c&&(!s||u)?i[a]=T(o,{onExited:n.bind(null,o),in:!0,exit:Vm(o,`exit`,e),enter:Vm(o,`enter`,e)}):!c&&s&&!u?i[a]=T(o,{in:!1}):c&&s&&C(l)&&(i[a]=T(o,{onExited:n.bind(null,o),in:l.props.in,exit:Vm(o,`exit`,e),enter:Vm(o,`enter`,e)}))}}),i}g();var Wm=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},Gm={component:`div`,childFactory:function(e){return e}},Km=function(e){xm(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.state={contextValue:{isMounting:!0},handleExited:r.handleExited.bind(Rm(r)),firstRender:!0},r}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n=t.children,r=t.handleExited;return{children:t.firstRender?Hm(e,r):Um(e,n,r),firstRender:!1}},n.handleExited=function(e,t){var n=zm(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=x({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=Z(e,[`component`,`childFactory`]),i=this.state.contextValue,a=Wm(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,t===null?_.createElement(vn.Provider,{value:i},a):_.createElement(vn.Provider,{value:i},_.createElement(t,r,a))},t}(_.Component);Km.propTypes={},Km.defaultProps=Gm;var qm=e=>Ne(`MuiPickersFadeTransitionGroup`,e),Jm=ke(`MuiPickersFadeTransitionGroup`,[`root`]);g();var Ym=[`children`],Xm=e=>B({root:[`root`]},qm,e),Zm=q(Km,{name:`MuiPickersFadeTransitionGroup`,slot:`Root`})({display:`block`,position:`relative`});function Qm(e){let t=cr({props:e,name:`MuiPickersFadeTransitionGroup`}),{className:n,reduceAnimations:r,transKey:i,classes:a}=t,{children:o}=t,s=Z(t,Ym),c=Xm(a),l=ir();return r?o:G(Zm,{className:Ve(c.root,n),ownerState:s,children:G(rn,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:l.transitions.duration.enteringScreen,enter:l.transitions.duration.enteringScreen,exit:0},children:o},i)})}var $m=e=>Ne(`MuiPickersSlideTransition`,e),eh=ke(`MuiPickersSlideTransition`,[`root`,`slideEnter-left`,`slideEnter-right`,`slideEnterActive`,`slideExit`,`slideExitActiveLeft-left`,`slideExitActiveLeft-right`]);g();var th=[`children`,`className`,`reduceAnimations`,`slideDirection`,`transKey`,`classes`],nh=(e,t)=>{let{slideDirection:n}=t,r={root:[`root`],exit:[`slideExit`],enterActive:[`slideEnterActive`],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return B(r,$m,e)},rh=[`slideEnter-left`,`slideEnter-right`,`slideEnterActive`,`slideExit`,`slideExitActiveLeft-left`,`slideExitActiveLeft-right`],ih=q(Km,{name:`MuiPickersSlideTransition`,slot:`Root`,overridesResolver:(e,t)=>rh.reduce((e,n)=>(e.push({[`.${eh[n]}`]:t[n]}),e),[t.root])})(({theme:e})=>{let t=e.transitions.create(`transform`,{duration:e.transitions.duration.complex,easing:`cubic-bezier(0.35, 0.8, 0.4, 1)`});return{display:`block`,position:`relative`,overflowX:`hidden`,"& > *":{position:`absolute`,top:0,right:0,left:0},[`& .${eh[`slideEnter-left`]}`]:{willChange:`transform`,transform:`translate(100%)`,zIndex:1},[`& .${eh[`slideEnter-right`]}`]:{willChange:`transform`,transform:`translate(-100%)`,zIndex:1},[`& .${eh.slideEnterActive}`]:{transform:`translate(0%)`,transition:t},[`& .${eh.slideExit}`]:{transform:`translate(0%)`},[`& .${eh[`slideExitActiveLeft-left`]}`]:{willChange:`transform`,transform:`translate(-100%)`,transition:t,zIndex:0},[`& .${eh[`slideExitActiveLeft-right`]}`]:{willChange:`transform`,transform:`translate(100%)`,transition:t,zIndex:0}}});function ah(e){let t=cr({props:e,name:`MuiPickersSlideTransition`}),{children:n,className:r,reduceAnimations:i,slideDirection:a,transKey:o,classes:s}=t,c=Z(t,th),{ownerState:l}=su(),u=x({},l,{slideDirection:a}),d=nh(s,u),f=ir();if(i)return G(`div`,{className:Ve(d.root,r),children:n});let p={exit:d.exit,enterActive:d.enterActive,enter:d.enter,exitActive:d.exitActive};return G(ih,{className:Ve(d.root,r),childFactory:e=>T(e,{classNames:p}),role:`none`,ownerState:u,children:G(Lm,x({mountOnEnter:!0,unmountOnExit:!0,timeout:f.transitions.duration.complex,classNames:p},c,{children:n}),o)})}var oh=e=>Ne(`MuiDayCalendar`,e),sh=ke(`MuiDayCalendar`,[`root`,`header`,`weekDayLabel`,`loadingContainer`,`slideTransition`,`monthContainer`,`weekContainer`,`weekNumberLabel`,`weekNumber`]);g();var ch=[`parentProps`,`day`,`focusedDay`,`selectedDays`,`isDateDisabled`,`currentMonthNumber`,`isViewFocused`],lh=[`ownerState`],uh=e=>B({root:[`root`],header:[`header`],weekDayLabel:[`weekDayLabel`],loadingContainer:[`loadingContainer`],slideTransition:[`slideTransition`],monthContainer:[`monthContainer`],weekContainer:[`weekContainer`],weekNumberLabel:[`weekNumberLabel`],weekNumber:[`weekNumber`]},oh,e),dh=240,fh=q(`div`,{name:`MuiDayCalendar`,slot:`Root`})({}),ph=q(`div`,{name:`MuiDayCalendar`,slot:`Header`})({display:`flex`,justifyContent:`center`,alignItems:`center`}),mh=q(Pt,{name:`MuiDayCalendar`,slot:`WeekDayLabel`})(({theme:e})=>({width:36,height:40,margin:`0 2px`,textAlign:`center`,display:`flex`,justifyContent:`center`,alignItems:`center`,color:(e.vars||e).palette.text.secondary})),hh=q(Pt,{name:`MuiDayCalendar`,slot:`WeekNumberLabel`})(({theme:e})=>({width:36,height:40,margin:`0 2px`,textAlign:`center`,display:`flex`,justifyContent:`center`,alignItems:`center`,color:(e.vars||e).palette.text.disabled})),gh=q(Pt,{name:`MuiDayCalendar`,slot:`WeekNumber`})(({theme:e})=>x({},e.typography.caption,{width:36,height:36,padding:0,margin:`0 2px`,color:(e.vars||e).palette.text.disabled,fontSize:`0.75rem`,alignItems:`center`,justifyContent:`center`,display:`inline-flex`})),_h=q(`div`,{name:`MuiDayCalendar`,slot:`LoadingContainer`})({display:`flex`,justifyContent:`center`,alignItems:`center`,minHeight:dh}),vh=q(ah,{name:`MuiDayCalendar`,slot:`SlideTransition`})({minHeight:dh}),yh=q(`div`,{name:`MuiDayCalendar`,slot:`MonthContainer`})({overflow:`hidden`}),bh=q(`div`,{name:`MuiDayCalendar`,slot:`WeekContainer`})({margin:`2px 0`,display:`flex`,justifyContent:`center`});function xh(e){let{parentProps:t,day:n,focusedDay:r,selectedDays:i,isDateDisabled:a,currentMonthNumber:o,isViewFocused:s}=e,c=Z(e,ch),{currentMonth:l,disabled:u,disableHighlightToday:d,isMonthSwitchingAnimating:f,showDaysOutsideCurrentMonth:m,slots:h,slotProps:g,timezone:_}=t,v=kc(),y=Zl(_),b=r!=null&&v.isSameDay(n,r),S=s&&b,C=i.some(e=>v.isSameDay(e,n)),w=v.isSameDay(n,y),T=p(()=>u||a(n),[u,a,n]),E=p(()=>v.getMonth(n)!==o,[v,n,o]),D=tf({day:n,selected:C,disabled:T,today:w,outsideCurrentMonth:E,disableHighlightToday:d,showDaysOutsideCurrentMonth:m}),O=(h==null?void 0:h.day)??sf,k=Z(Vn({elementType:O,externalSlotProps:g==null?void 0:g.day,additionalProps:x({disableHighlightToday:d,showDaysOutsideCurrentMonth:m,role:`gridcell`,isAnimating:f,"data-timestamp":v.toJsDate(n).valueOf()},c),ownerState:x({},D,{day:n,isDayDisabled:T,isDaySelected:C})}),lh),A=p(()=>{let e=v.startOfMonth(l);return m?v.isSameDay(n,v.startOfWeek(e)):v.isSameDay(n,e)},[l,n,m,v]),j=p(()=>{let e=v.endOfMonth(l);return m?v.isSameDay(n,v.endOfWeek(e)):v.isSameDay(n,e)},[l,n,m,v]);return G(O,x({},k,{day:n,disabled:T,autoFocus:!E&&S,today:w,outsideCurrentMonth:E,isFirstVisibleCell:A,isLastVisibleCell:j,selected:C,tabIndex:b?0:-1,"aria-selected":C,"aria-current":w?`date`:void 0}))}function Sh(e){let t=cr({props:e,name:`MuiDayCalendar`}),n=kc(),{onFocusedDayChange:r,className:i,classes:a,currentMonth:o,selectedDays:s,focusedDay:c,loading:l,onSelectedDaysChange:u,onMonthSwitchingAnimationEnd:d,readOnly:f,reduceAnimations:h,renderLoading:g=()=>G(`span`,{children:`…`}),slideDirection:_,TransitionProps:v,disablePast:y,disableFuture:b,minDate:S,maxDate:C,shouldDisableDate:w,shouldDisableMonth:T,shouldDisableYear:E,dayOfWeekFormatter:D=e=>n.format(e,`weekdayShort`).charAt(0).toUpperCase(),hasFocus:O,onFocusedViewChange:k,gridLabelId:A,displayWeekNumber:j,fixedWeekNumber:M,timezone:N}=t,ee=Zl(N),P=uh(a),F=dn(),I=_m({shouldDisableDate:w,shouldDisableMonth:T,shouldDisableYear:E,minDate:S,maxDate:C,disablePast:y,disableFuture:b,timezone:N}),L=Ac(),R=Y(e=>{f||u(e)}),te=e=>{I(e)||(r(e),k==null||k(!0))},ne=Y((e,t)=>{switch(e.key){case`ArrowUp`:te(n.addDays(t,-7)),e.preventDefault();break;case`ArrowDown`:te(n.addDays(t,7)),e.preventDefault();break;case`ArrowLeft`:{let r=n.addDays(t,F?1:-1),i=n.addMonths(t,F?1:-1),a=Vc({adapter:n,date:r,minDate:F?r:n.startOfMonth(i),maxDate:F?n.endOfMonth(i):r,isDateDisabled:I,timezone:N});te(a||r),e.preventDefault();break}case`ArrowRight`:{let r=n.addDays(t,F?-1:1),i=n.addMonths(t,F?-1:1),a=Vc({adapter:n,date:r,minDate:F?n.startOfMonth(i):r,maxDate:F?r:n.endOfMonth(i),isDateDisabled:I,timezone:N});te(a||r),e.preventDefault();break}case`Home`:te(n.startOfWeek(t)),e.preventDefault();break;case`End`:te(n.endOfWeek(t)),e.preventDefault();break;case`PageUp`:te(n.addMonths(t,1)),e.preventDefault();break;case`PageDown`:te(n.addMonths(t,-1)),e.preventDefault();break;case`Enter`:case` `:R(t),e.preventDefault()}}),z=Y((e,t)=>te(t)),B=Y((e,t)=>{c!=null&&n.isSameDay(c,t)&&(k==null||k(!1))}),re=n.getMonth(o),ie=n.getYear(o),ae=p(()=>s.filter(e=>!!e).map(e=>n.startOfDay(e)),[n,s]),oe=`${ie}-${re}`,V=p(()=>m(),[oe]),se=p(()=>{let e=n.getWeekArray(o),t=n.addMonths(o,1);for(;M&&e.length<M;){let r=n.getWeekArray(t),i=n.isSameDay(e[e.length-1][0],r[0][0]);r.slice(+!!i).forEach(t=>{e.length<M&&e.push(t)}),t=n.addMonths(t,1)}return e},[o,M,n]);return Je(fh,{role:`grid`,"aria-labelledby":A,className:P.root,children:[Je(ph,{role:`row`,className:P.header,children:[j&&G(hh,{variant:`caption`,role:`columnheader`,"aria-label":L.calendarWeekNumberHeaderLabel,className:P.weekNumberLabel,children:L.calendarWeekNumberHeaderText}),Zc(n,ee).map((e,t)=>G(mh,{variant:`caption`,role:`columnheader`,"aria-label":n.format(e,`weekday`),className:P.weekDayLabel,children:D(e)},t.toString()))]}),l?G(_h,{className:P.loadingContainer,children:g()}):G(vh,x({transKey:oe,onExited:d,reduceAnimations:h,slideDirection:_,className:Ve(i,P.slideTransition)},v,{nodeRef:V,children:G(yh,{ref:V,role:`rowgroup`,className:P.monthContainer,children:se.map((e,r)=>Je(bh,{role:`row`,className:P.weekContainer,"aria-rowindex":r+1,children:[j&&G(gh,{className:P.weekNumber,role:`rowheader`,"aria-label":L.calendarWeekNumberAriaLabelText(n.getWeekNumber(e[0])),children:L.calendarWeekNumberText(n.getWeekNumber(e[0]))}),e.map((e,n)=>G(xh,{parentProps:t,day:e,selectedDays:ae,isViewFocused:O,focusedDay:c,onKeyDown:ne,onFocus:z,onBlur:B,onDaySelect:R,isDateDisabled:I,currentMonthNumber:re,"aria-colindex":n+1},e.toString()))]},`week-${e[0]}`))})}))]})}function Ch(e){return Ne(`MuiMonthCalendar`,e)}var wh=ke(`MuiMonthCalendar`,[`root`,`button`,`disabled`,`selected`]);g();var Th=[`autoFocus`,`classes`,`disabled`,`selected`,`value`,`onClick`,`onKeyDown`,`onFocus`,`onBlur`,`slots`,`slotProps`],Eh=(e,t)=>{let n={button:[`button`,t.isMonthDisabled&&`disabled`,t.isMonthSelected&&`selected`]};return B(n,Ch,e)},Dh=q(`button`,{name:`MuiMonthCalendar`,slot:`Button`,overridesResolver:(e,t)=>[t.button,{[`&.${wh.disabled}`]:t.disabled},{[`&.${wh.selected}`]:t.selected}]})(({theme:e})=>x({color:`unset`,backgroundColor:`transparent`,border:0,outline:0},e.typography.subtitle1,{height:36,width:72,borderRadius:18,cursor:`pointer`,"&:focus":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)},"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)},"&:disabled":{cursor:`auto`,pointerEvents:`none`},[`&.${wh.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${wh.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),Oh=h(function(e){let{autoFocus:t,classes:n,disabled:r,selected:i,value:a,onClick:o,onKeyDown:s,onFocus:c,onBlur:u,slots:d,slotProps:f}=e,p=Z(e,Th),m=l(null),{ownerState:h}=su(),g=x({},h,{isMonthDisabled:r,isMonthSelected:i}),_=Eh(n,g);j(()=>{if(t){var e;(e=m.current)==null||e.focus()}},[t]);let v=(d==null?void 0:d.monthButton)??Dh,y=Vn({elementType:v,externalSlotProps:f==null?void 0:f.monthButton,externalForwardedProps:p,additionalProps:{disabled:r,ref:m,type:`button`,role:`radio`,"aria-checked":i,onClick:e=>o(e,a),onKeyDown:e=>s(e,a),onFocus:e=>c(e,a),onBlur:e=>u(e,a)},ownerState:g,className:_.button});return G(v,x({},y))});g();var kh=[`autoFocus`,`className`,`currentMonth`,`classes`,`value`,`defaultValue`,`referenceDate`,`disabled`,`disableFuture`,`disablePast`,`maxDate`,`minDate`,`onChange`,`shouldDisableMonth`,`readOnly`,`disableHighlightToday`,`onMonthFocus`,`hasFocus`,`onFocusedViewChange`,`monthsPerRow`,`timezone`,`gridLabelId`,`slots`,`slotProps`],Ah=e=>B({root:[`root`]},Ch,e);function jh(e,t){let n=cr({props:e,name:t}),r=Nf(n);return x({},n,r,{monthsPerRow:n.monthsPerRow??3})}var Mh=(e,t,n,r,i)=>!!(e===t&&r&&i.isSameYear(n,r)),Nh=q(`div`,{name:`MuiMonthCalendar`,slot:`Root`,shouldForwardProp:e=>cn(e)&&e!==`monthsPerRow`})({display:`flex`,flexWrap:`wrap`,justifyContent:`space-evenly`,rowGap:16,padding:`8px 0`,width:320,boxSizing:`border-box`,variants:[{props:{monthsPerRow:3},style:{columnGap:24}},{props:{monthsPerRow:4},style:{columnGap:0}}]}),Ph=o(function(e,t){let n=jh(e,`MuiMonthCalendar`),{autoFocus:r,className:i,currentMonth:o,classes:s,value:c,defaultValue:l,referenceDate:d,disabled:m,disableFuture:h,disablePast:g,maxDate:_,minDate:v,onChange:y,shouldDisableMonth:b,readOnly:S,onMonthFocus:C,hasFocus:w,onFocusedViewChange:T,monthsPerRow:E,timezone:D,gridLabelId:O,slots:k,slotProps:A}=n,j=Z(n,kh),{value:M,handleValueChange:N,timezone:ee}=sd({name:`MonthCalendar`,timezone:D,value:c,defaultValue:l,referenceDate:d,onChange:y,valueManager:pd}),P=Zl(ee),F=dn(),I=kc(),{ownerState:L}=su(),R=p(()=>pd.getInitialReferenceValue({value:M,adapter:I,props:n,timezone:ee,referenceDate:d,granularity:cd.month}),[]),te=Ah(s),ne=p(()=>I.getMonth(P),[I,P]),z=p(()=>M==null?null:I.getMonth(M),[M,I]),[B,re]=u(()=>z||I.getMonth(R)),[ie,ae]=$t({name:`MonthCalendar`,state:`hasFocus`,controlled:w,default:r??!1}),oe=Y(e=>{ae(e),T&&T(e)}),V=f(e=>{let t=I.startOfMonth(g&&I.isAfter(P,v)?P:v),n=I.startOfMonth(h&&I.isBefore(P,_)?P:_),r=I.startOfMonth(e);return I.isBefore(r,t)||I.isAfter(r,n)?!0:b?b(r):!1},[h,g,_,v,P,b,I]),se=Y((e,t)=>{if(S)return;let n=(M&&o&&!I.isSameYear(M,o)?I.setYear(M,I.getYear(o)):M)??o??R,r=I.setMonth(n,t);N(r)}),ce=Y(e=>{V(I.setMonth(M??o??R,e))||(re(e),oe(!0),C&&C(e))});a(()=>{re(e=>z!==null&&e!==z?z:e)},[z]);let H=Y((e,t)=>{switch(e.key){case`ArrowUp`:ce((12+t-3)%12),e.preventDefault();break;case`ArrowDown`:ce((12+t+3)%12),e.preventDefault();break;case`ArrowLeft`:ce((12+t+(F?1:-1))%12),e.preventDefault();break;case`ArrowRight`:ce((12+t+(F?-1:1))%12),e.preventDefault();break;case`Enter`:case` `:se(e,t),e.preventDefault()}}),U=Y((e,t)=>{ce(t)}),le=Y((e,t)=>{B===t&&oe(!1)});return G(Nh,x({ref:t,className:Ve(te.root,i),ownerState:L,role:`radiogroup`,"aria-labelledby":O,monthsPerRow:E},j,{children:Gc(I,o??M??R).map(e=>{let t=I.getMonth(e),n=I.format(e,`monthShort`),r=I.format(e,`month`),i=Mh(t,z,e,M,I),a=m||V(e);return G(Oh,{selected:i,value:t,onClick:se,onKeyDown:H,autoFocus:ie&&t===B,disabled:a,tabIndex:t===B&&!a?0:-1,onFocus:U,onBlur:le,"aria-current":Mh(t,ne,e,P,I)?`date`:void 0,"aria-label":r,slots:k,slotProps:A,classes:s,children:n},n)})}))});function Fh(e){return Ne(`MuiYearCalendar`,e)}var Ih=ke(`MuiYearCalendar`,[`root`,`button`,`disabled`,`selected`]);g();var Lh=[`autoFocus`,`classes`,`disabled`,`selected`,`value`,`onClick`,`onKeyDown`,`onFocus`,`onBlur`,`slots`,`slotProps`],Rh=(e,t)=>{let n={button:[`button`,t.isYearDisabled&&`disabled`,t.isYearSelected&&`selected`]};return B(n,Fh,e)},zh=q(`button`,{name:`MuiYearCalendar`,slot:`Button`,overridesResolver:(e,t)=>[t.button,{[`&.${Ih.disabled}`]:t.disabled},{[`&.${Ih.selected}`]:t.selected}]})(({theme:e})=>x({color:`unset`,backgroundColor:`transparent`,border:0,outline:0},e.typography.subtitle1,{height:36,width:72,borderRadius:18,cursor:`pointer`,"&:focus":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.focusOpacity)},"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity)},"&:disabled":{cursor:`auto`,pointerEvents:`none`},[`&.${Ih.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${Ih.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),Bh=h(function(e){let{autoFocus:t,classes:n,disabled:r,selected:i,value:a,onClick:o,onKeyDown:s,onFocus:c,onBlur:u,slots:d,slotProps:f}=e,p=Z(e,Lh),m=l(null),{ownerState:h}=su(),g=x({},h,{isYearDisabled:r,isYearSelected:i}),_=Rh(n,g);j(()=>{if(t){var e;(e=m.current)==null||e.focus()}},[t]);let v=(d==null?void 0:d.yearButton)??zh,y=Vn({elementType:v,externalSlotProps:f==null?void 0:f.yearButton,externalForwardedProps:p,additionalProps:{disabled:r,ref:m,type:`button`,role:`radio`,"aria-checked":i,onClick:e=>o(e,a),onKeyDown:e=>s(e,a),onFocus:e=>c(e,a),onBlur:e=>u(e,a)},ownerState:g,className:_.button});return G(v,x({},y))});g();var Vh=[`autoFocus`,`className`,`classes`,`value`,`defaultValue`,`referenceDate`,`disabled`,`disableFuture`,`disablePast`,`maxDate`,`minDate`,`onChange`,`readOnly`,`shouldDisableYear`,`disableHighlightToday`,`onYearFocus`,`hasFocus`,`onFocusedViewChange`,`yearsOrder`,`yearsPerRow`,`timezone`,`gridLabelId`,`slots`,`slotProps`],Hh=e=>B({root:[`root`]},Fh,e);function Uh(e,t){let n=cr({props:e,name:t}),r=Nf(n);return x({},n,r,{yearsPerRow:n.yearsPerRow??3,yearsOrder:n.yearsOrder??`asc`})}var Wh=q(`div`,{name:`MuiYearCalendar`,slot:`Root`,shouldForwardProp:e=>cn(e)&&e!==`yearsPerRow`})({display:`flex`,flexWrap:`wrap`,justifyContent:`space-evenly`,rowGap:12,padding:`6px 0`,overflowY:`auto`,height:`100%`,width:320,maxHeight:280,boxSizing:`border-box`,position:`relative`,variants:[{props:{yearsPerRow:3},style:{columnGap:24}},{props:{yearsPerRow:4},style:{columnGap:0,padding:`0 2px`}}]}),Gh=q(`div`,{name:`MuiYearCalendar`,slot:`ButtonFiller`})({height:36,width:72}),Kh=o(function(e,t){let n=Uh(e,`MuiYearCalendar`),{autoFocus:r,className:i,classes:o,value:s,defaultValue:c,referenceDate:d,disabled:m,disableFuture:h,disablePast:g,maxDate:_,minDate:v,onChange:y,readOnly:b,shouldDisableYear:S,onYearFocus:C,hasFocus:w,onFocusedViewChange:T,yearsOrder:E,yearsPerRow:D,timezone:O,gridLabelId:k,slots:A,slotProps:j}=n,M=Z(n,Vh),{value:N,handleValueChange:ee,timezone:P}=sd({name:`YearCalendar`,timezone:O,value:s,defaultValue:c,referenceDate:d,onChange:y,valueManager:pd}),F=Zl(P),I=dn(),L=kc(),{ownerState:R}=su(),te=p(()=>pd.getInitialReferenceValue({value:N,adapter:L,props:n,timezone:P,referenceDate:d,granularity:cd.year}),[]),ne=Hh(o),z=p(()=>L.getYear(F),[L,F]),B=p(()=>N==null?null:L.getYear(N),[N,L]),[re,ie]=u(()=>B||L.getYear(te)),[ae,oe]=$t({name:`YearCalendar`,state:`hasFocus`,controlled:w,default:r??!1}),V=Y(e=>{oe(e),T&&T(e)}),se=f(e=>{if(g&&L.isBeforeYear(e,F)||h&&L.isAfterYear(e,F)||v&&L.isBeforeYear(e,v)||_&&L.isAfterYear(e,_))return!0;if(!S)return!1;let t=L.startOfYear(e);return S(t)},[h,g,_,v,F,S,L]),ce=Y((e,t)=>{if(b)return;let n=L.setYear(N??te,t);ee(n)}),H=Y(e=>{se(L.setYear(N??te,e))||(ie(e),V(!0),C==null||C(e))});a(()=>{ie(e=>B!==null&&e!==B?B:e)},[B]);let U=E===`desc`?D*-1:D*1,le=I&&E===`asc`||!I&&E===`desc`?-1:1,ue=Y((e,t)=>{switch(e.key){case`ArrowUp`:H(t-U),e.preventDefault();break;case`ArrowDown`:H(t+U),e.preventDefault();break;case`ArrowLeft`:H(t-le),e.preventDefault();break;case`ArrowRight`:H(t+le),e.preventDefault();break;case`Enter`:case` `:ce(e,t),e.preventDefault()}}),de=Y((e,t)=>{H(t)}),fe=Y((e,t)=>{re===t&&V(!1)}),pe=l(null),W=nt(t,pe);a(()=>{if(r||pe.current===null)return;let e=pe.current.querySelector(`[tabindex="0"]`);if(!e)return;let t=e.offsetHeight,n=e.offsetTop,i=pe.current.clientHeight,a=pe.current.scrollTop,o=n+t;t>i||n<a||(pe.current.scrollTop=o-i/2-t/2)},[r]);let me=L.getYearRange([v,_]);E===`desc`&&me.reverse();let he=D-me.length%D;return he===D&&(he=0),Je(Wh,x({ref:W,className:Ve(ne.root,i),ownerState:R,role:`radiogroup`,"aria-labelledby":k,yearsPerRow:D},M,{children:[me.map(e=>{let t=L.getYear(e),n=t===B,r=m||se(e);return G(Bh,{selected:n,value:t,onClick:ce,onKeyDown:ue,autoFocus:ae&&t===re,disabled:r,tabIndex:t===re&&!r?0:-1,onFocus:de,onBlur:fe,"aria-current":z===t?`date`:void 0,slots:A,slotProps:j,classes:o,children:L.format(e,`year`)},L.format(e,`year`))}),Array.from({length:he},(e,t)=>G(Gh,{},t))]}))}),qh=e=>Ne(`MuiPickersCalendarHeader`,e),Jh=ke(`MuiPickersCalendarHeader`,[`root`,`labelContainer`,`label`,`switchViewButton`,`switchViewIcon`]);g();var Yh=[`slots`,`slotProps`,`currentMonth`,`disabled`,`disableFuture`,`disablePast`,`maxDate`,`minDate`,`onMonthChange`,`onViewChange`,`view`,`reduceAnimations`,`views`,`labelId`,`className`,`classes`,`timezone`,`format`],Xh=[`ownerState`],Zh=e=>B({root:[`root`],labelContainer:[`labelContainer`],label:[`label`],switchViewButton:[`switchViewButton`],switchViewIcon:[`switchViewIcon`]},qh,e),Qh=q(`div`,{name:`MuiPickersCalendarHeader`,slot:`Root`})({display:`flex`,alignItems:`center`,marginTop:12,marginBottom:4,paddingLeft:24,paddingRight:12,maxHeight:40,minHeight:40}),$h=q(`div`,{name:`MuiPickersCalendarHeader`,slot:`LabelContainer`})(({theme:e})=>x({display:`flex`,overflow:`hidden`,alignItems:`center`,cursor:`pointer`,marginRight:`auto`},e.typography.body1,{fontWeight:e.typography.fontWeightMedium})),eg=q(`div`,{name:`MuiPickersCalendarHeader`,slot:`Label`})({marginRight:6}),tg=q(mn,{name:`MuiPickersCalendarHeader`,slot:`SwitchViewButton`})({marginRight:`auto`,variants:[{props:{view:`year`},style:{[`.${Jh.switchViewIcon}`]:{transform:`rotate(180deg)`}}}]}),ng=q(Ql,{name:`MuiPickersCalendarHeader`,slot:`SwitchViewIcon`})(({theme:e})=>({willChange:`transform`,transition:e.transitions.create(`transform`),transform:`rotate(0deg)`})),rg=o(function(e,t){let n=Ac(),r=kc(),i=cr({props:e,name:`MuiPickersCalendarHeader`}),{slots:a,slotProps:o,currentMonth:s,disabled:c,disableFuture:l,disablePast:u,maxDate:d,minDate:f,onMonthChange:p,onViewChange:m,view:h,reduceAnimations:g,views:_,labelId:v,className:y,classes:b,timezone:S,format:C=`${r.formats.month} ${r.formats.year}`}=i,w=Z(i,Yh),{ownerState:T}=su(),E=Zh(b),D=(a==null?void 0:a.switchViewButton)??tg,O=Vn({elementType:D,externalSlotProps:o==null?void 0:o.switchViewButton,additionalProps:{size:`small`,"aria-label":n.calendarViewSwitchingButtonAriaLabel(h)},ownerState:x({},T,{view:h}),className:E.switchViewButton}),k=(a==null?void 0:a.switchViewIcon)??ng,A=Z(Vn({elementType:k,externalSlotProps:o==null?void 0:o.switchViewIcon,ownerState:T,className:E.switchViewIcon}),Xh),j=()=>p(r.addMonths(s,1)),M=()=>p(r.addMonths(s,-1)),N=yu(s,{disableFuture:l,maxDate:d,timezone:S}),ee=bu(s,{disablePast:u,minDate:f,timezone:S}),P=()=>{if(!(_.length===1||!m||c))if(_.length===2)m(_.find(e=>e!==h)||_[0]);else{let e=+(_.indexOf(h)===0);m(_[e])}};if(_.length===1&&_[0]===`year`)return null;let F=r.formatByString(s,C);return Je(Qh,x({},w,{ownerState:T,className:Ve(E.root,y),ref:t,children:[Je($h,{role:`none`,onClick:P,ownerState:T,"aria-live":`polite`,className:E.labelContainer,children:[G(Qm,{reduceAnimations:g,transKey:F,children:G(eg,{id:v,ownerState:T,className:E.label,children:F})}),_.length>1&&!c&&G(D,x({},O,{children:G(k,x({},A))}))]}),G(rn,{in:h===`day`,appear:!g,enter:!g,children:G(hu,{slots:a,slotProps:o,onGoToPrevious:M,isPreviousDisabled:ee,previousLabel:n.previousMonth,onGoToNext:j,isNextDisabled:N,nextLabel:n.nextMonth})})]}))}),ig=`@media (prefers-reduced-motion: reduce)`,ag=typeof navigator<`u`&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),og=ag&&ag[1]?parseInt(ag[1],10):null,sg=ag&&ag[2]?parseInt(ag[2],10):null,cg=og&&og<10||sg&&sg<13||!1;function lg(e){let t=he(ig,{defaultMatches:!1});return e??(t||cg)}var ug=e=>Ne(`MuiDateCalendar`,e),dg=ke(`MuiDateCalendar`,[`root`,`viewTransitionContainer`]);g();var fg=`autoFocus.onViewChange.value.defaultValue.referenceDate.disableFuture.disablePast.onChange.onYearChange.onMonthChange.reduceAnimations.shouldDisableDate.shouldDisableMonth.shouldDisableYear.view.views.openTo.className.classes.disabled.readOnly.minDate.maxDate.disableHighlightToday.focusedView.onFocusedViewChange.showDaysOutsideCurrentMonth.fixedWeekNumber.dayOfWeekFormatter.slots.slotProps.loading.renderLoading.displayWeekNumber.yearsOrder.yearsPerRow.monthsPerRow.timezone`.split(`.`),pg=e=>B({root:[`root`],viewTransitionContainer:[`viewTransitionContainer`]},ug,e);function mg(e,t){let n=cr({props:e,name:t}),r=lg(n.reduceAnimations),i=Nf(n);return x({},n,i,{loading:n.loading??!1,openTo:n.openTo??`day`,views:n.views??[`year`,`day`],reduceAnimations:r,renderLoading:n.renderLoading??(()=>G(`span`,{children:`…`}))})}var hg=q(Su,{name:`MuiDateCalendar`,slot:`Root`})({display:`flex`,flexDirection:`column`,height:336}),gg=q(Qm,{name:`MuiDateCalendar`,slot:`ViewTransitionContainer`})({}),_g=o(function(e,t){let n=kc(),{ownerState:r}=su(),i=Le(),o=mg(e,`MuiDateCalendar`),{autoFocus:s,onViewChange:c,value:u,defaultValue:d,referenceDate:f,disableFuture:m,disablePast:h,onChange:g,onMonthChange:_,reduceAnimations:v,shouldDisableDate:y,shouldDisableMonth:b,shouldDisableYear:S,view:C,views:w,openTo:T,className:E,classes:D,disabled:O,readOnly:k,minDate:A,maxDate:j,disableHighlightToday:M,focusedView:N,onFocusedViewChange:ee,showDaysOutsideCurrentMonth:P,fixedWeekNumber:F,dayOfWeekFormatter:I,slots:L,slotProps:R,loading:te,renderLoading:ne,displayWeekNumber:z,yearsOrder:B,yearsPerRow:re,monthsPerRow:ie,timezone:ae}=o,oe=Z(o,fg),{value:V,handleValueChange:se,timezone:ce}=sd({name:`DateCalendar`,timezone:ae,value:u,defaultValue:d,referenceDate:f,onChange:g,valueManager:pd}),{view:H,setView:U,focusedView:le,setFocusedView:ue,goToNextView:de,setValueAndGoToNextView:fe}=vu({view:C,views:w,openTo:T,onChange:se,onViewChange:c,autoFocus:s,focusedView:N,onFocusedViewChange:ee}),{referenceDate:pe,calendarState:W,setVisibleDate:me,isDateDisabled:he,onMonthSwitchingAnimationEnd:ge}=ym({value:V,referenceDate:f,reduceAnimations:v,onMonthChange:_,minDate:A,maxDate:j,shouldDisableDate:y,disablePast:h,disableFuture:m,timezone:ce,getCurrentMonthFromVisibleDate:(e,t)=>n.isSameMonth(e,t)?t:n.startOfMonth(e)}),_e=O&&V||A,ve=O&&V||j,ye=`${i}-grid-label`,be=le!==null,xe=(L==null?void 0:L.calendarHeader)??rg,Se=Vn({elementType:xe,externalSlotProps:R==null?void 0:R.calendarHeader,additionalProps:{views:w,view:H,currentMonth:W.currentMonth,onViewChange:U,onMonthChange:e=>me({target:e,reason:`header-navigation`}),minDate:_e,maxDate:ve,disabled:O,disablePast:h,disableFuture:m,reduceAnimations:v,timezone:ce,labelId:ye},ownerState:r}),Ce=Y(e=>{let t=n.startOfMonth(e),r=n.endOfMonth(e),i=he(e)?Vc({adapter:n,date:e,minDate:n.isBefore(A,t)?t:A,maxDate:n.isAfter(j,r)?r:j,disablePast:h,disableFuture:m,isDateDisabled:he,timezone:ce}):e;i?(fe(i,`finish`),me({target:i,reason:`cell-interaction`})):(de(),me({target:t,reason:`cell-interaction`}))}),we=Y(e=>{let t=n.startOfYear(e),r=n.endOfYear(e),i=he(e)?Vc({adapter:n,date:e,minDate:n.isBefore(A,t)?t:A,maxDate:n.isAfter(j,r)?r:j,disablePast:h,disableFuture:m,isDateDisabled:he,timezone:ce}):e;i?(fe(i,`finish`),me({target:i,reason:`cell-interaction`})):(de(),me({target:t,reason:`cell-interaction`}))}),Te=Y(e=>se(e&&Bc(n,e,V??pe),`finish`,H));a(()=>{n.isValid(V)&&me({target:V,reason:`controlled-value-change`})},[V]);let Ee=pg(D),De={disablePast:h,disableFuture:m,maxDate:j,minDate:A},Oe={disableHighlightToday:M,readOnly:k,disabled:O,timezone:ce,gridLabelId:ye,slots:L,slotProps:R},ke=l(H);a(()=>{ke.current!==H&&(le===ke.current&&ue(H,!0),ke.current=H)},[le,ue,H]);let Ae=p(()=>[V],[V]);return Je(hg,x({ref:t,className:Ve(Ee.root,E),ownerState:r},oe,{children:[G(xe,x({},Se,{slots:L,slotProps:R})),G(gg,{reduceAnimations:v,className:Ee.viewTransitionContainer,transKey:H,ownerState:r,children:Je(`div`,{children:[H===`year`&&G(Kh,x({},De,Oe,{value:V,onChange:we,shouldDisableYear:S,hasFocus:be,onFocusedViewChange:e=>ue(`year`,e),yearsOrder:B,yearsPerRow:re,referenceDate:pe})),H===`month`&&G(Ph,x({},De,Oe,{currentMonth:W.currentMonth,hasFocus:be,className:E,value:V,onChange:Ce,shouldDisableMonth:b,onFocusedViewChange:e=>ue(`month`,e),monthsPerRow:ie,referenceDate:pe})),H===`day`&&G(Sh,x({},W,De,Oe,{onMonthSwitchingAnimationEnd:ge,hasFocus:be,onFocusedDayChange:e=>me({target:e,reason:`cell-interaction`}),reduceAnimations:v,selectedDays:Ae,onSelectedDaysChange:Te,shouldDisableDate:y,shouldDisableMonth:b,shouldDisableYear:S,onFocusedViewChange:e=>ue(`day`,e),showDaysOutsideCurrentMonth:P,fixedWeekNumber:F,dayOfWeekFormatter:I,displayWeekNumber:z,loading:te,renderLoading:ne}))]})})]}))}),vg=e=>Ne(`MuiDayCalendarSkeleton`,e),yg=ke(`MuiDayCalendarSkeleton`,[`root`,`week`,`daySkeleton`]);g();var bg=[`className`,`classes`],xg=e=>B({root:[`root`],week:[`week`],daySkeleton:[`daySkeleton`]},vg,e),Sg=q(`div`,{name:`MuiDayCalendarSkeleton`,slot:`Root`})({alignSelf:`start`}),Cg=q(`div`,{name:`MuiDayCalendarSkeleton`,slot:`Week`})({margin:`2px 0`,display:`flex`,justifyContent:`center`}),wg=q(ee,{name:`MuiDayCalendarSkeleton`,slot:`DaySkeleton`})({margin:`0 2px`,'&[data-day-in-month="0"]':{visibility:`hidden`}}),Tg=[[0,1,1,1,1,1,1],[1,1,1,1,1,1,1],[1,1,1,1,1,1,1],[1,1,1,1,1,1,1],[1,1,1,1,0,0,0]];function Eg(e){let t=cr({props:e,name:`MuiDayCalendarSkeleton`}),{className:n,classes:r}=t,i=Z(t,bg),a=xg(r);return G(Sg,x({className:Ve(a.root,n),ownerState:t},i,{children:Tg.map((e,t)=>G(Cg,{className:a.week,children:e.map((e,t)=>G(wg,{variant:`circular`,width:36,height:36,className:a.daySkeleton,"data-day-in-month":e},t))},t))}))}function Dg(e){return Ne(`MuiPickersToolbar`,e)}var Og=ke(`MuiPickersToolbar`,[`root`,`title`,`content`]);g();function kg(){let{ownerState:e}=su(),t=dn();return p(()=>x({},e,{toolbarDirection:t?`rtl`:`ltr`}),[e,t])}g();var Ag=[`children`,`className`,`classes`,`toolbarTitle`,`hidden`,`titleId`,`classes`,`landscapeDirection`],jg=e=>B({root:[`root`],title:[`title`],content:[`content`]},Dg,e),Mg=q(`div`,{name:`MuiPickersToolbar`,slot:`Root`})(({theme:e})=>({display:`flex`,flexDirection:`column`,alignItems:`flex-start`,justifyContent:`space-between`,padding:e.spacing(2,3),variants:[{props:{pickerOrientation:`landscape`},style:{height:`auto`,maxWidth:160,padding:16,justifyContent:`flex-start`,flexWrap:`wrap`}}]})),Ng=q(`div`,{name:`MuiPickersToolbar`,slot:`Content`,shouldForwardProp:e=>cn(e)&&e!==`landscapeDirection`})({display:`flex`,flexWrap:`wrap`,width:`100%`,flex:1,justifyContent:`space-between`,alignItems:`center`,flexDirection:`row`,variants:[{props:{pickerOrientation:`landscape`},style:{justifyContent:`flex-start`,alignItems:`flex-start`,flexDirection:`column`}},{props:{pickerOrientation:`landscape`,landscapeDirection:`row`},style:{flexDirection:`row`}}]}),Pg=o(function(e,t){let n=cr({props:e,name:`MuiPickersToolbar`}),{children:r,className:i,classes:a,toolbarTitle:o,hidden:s,titleId:c,landscapeDirection:l}=n,u=Z(n,Ag),d=kg(),f=jg(a);return s?null:Je(Mg,x({ref:t,className:Ve(f.root,i),ownerState:d},u,{children:[G(Pt,{variant:`overline`,id:c,className:f.title,sx:{color:`text.secondary`},children:o}),G(Ng,{className:f.content,ownerState:d,landscapeDirection:l,children:r})]}))});function Fg(e){return Ne(`MuiDatePickerToolbar`,e)}var Ig=ke(`MuiDatePickerToolbar`,[`root`,`title`]);g();var Lg=[`toolbarFormat`,`toolbarPlaceholder`,`className`,`classes`],Rg=e=>B({root:[`root`],title:[`title`]},Fg,e),zg=q(Pg,{name:`MuiDatePickerToolbar`,slot:`Root`})({}),Bg=q(Pt,{name:`MuiDatePickerToolbar`,slot:`Title`})({variants:[{props:{pickerOrientation:`landscape`},style:{margin:`auto 16px auto auto`}}]}),Vg=o(function(e,t){let n=cr({props:e,name:`MuiDatePickerToolbar`}),{toolbarFormat:r,toolbarPlaceholder:i=`––`,className:a,classes:o}=n,s=Z(n,Lg),c=kc(),{value:l,views:u,orientation:d}=zl(),f=Ac(),m=kg(),h=Rg(o),g=p(()=>{if(!c.isValid(l))return i;let e=Xc(c,{format:r,views:u},!0);return c.formatByString(l,e)},[l,r,i,c,u]);return G(zg,x({ref:t,toolbarTitle:f.datePickerToolbarTitle,className:Ve(h.root,a)},s,{children:G(Bg,{variant:`h4`,align:d===`landscape`?`left`:`center`,ownerState:m,className:h.title,children:g})}))});g();function Hg(e,t){let n=cr({props:e,name:t}),r=Nf(n),i=p(()=>{var e;return((e=n.localeText)==null?void 0:e.toolbarTitle)==null?n.localeText:x({},n.localeText,{datePickerToolbarTitle:n.localeText.toolbarTitle})},[n.localeText]);return x({},n,r,{localeText:i},zc({views:n.views,openTo:n.openTo,defaultViews:[`year`,`day`],defaultOpenTo:`day`}),{slots:x({toolbar:Vg},n.slots)})}var Ug=e=>e.type===`hidden`;function Wg(e){let{nodeName:t}=e;return!!([`BUTTON`,`DETAILS`,`EMBED`,`IFRAME`,`KEYGEN`,`LABEL`,`SELECT`,`TEXTAREA`].includes(t)||t===`A`&&e.hasAttribute(`href`)||e instanceof HTMLInputElement&&!Ug(e)||[`AUDIO`,`VIDEO`].includes(t)&&e.hasAttribute(`controls`)||[`IMG`,`OBJECT`].includes(t)&&e.hasAttribute(`usemap`)||e.hasAttribute(`tabindex`)&&e.tabIndex>-1)}function Gg(e){return Ne(`MuiPickerPopper`,e)}ke(`MuiPickerPopper`,[`root`,`paper`]),g();var Kg=[`PaperComponent`,`ownerState`,`children`,`paperSlotProps`,`paperClasses`,`onPaperClick`,`onPaperTouchStart`],qg=e=>B({root:[`root`],paper:[`paper`]},Gg,e),Jg=q(En,{name:`MuiPickerPopper`,slot:`Root`})(({theme:e})=>({zIndex:e.zIndex.modal})),Yg=q(Gt,{name:`MuiPickerPopper`,slot:`Paper`})({outline:0,transformOrigin:`top center`,variants:[{props:({popperPlacement:e})=>new Set([`top`,`top-start`,`top-end`]).has(e),style:{transformOrigin:`bottom center`}}]});function Xg(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}function Zg(e,t){let n=l(!1),r=l(!1),i=l(null),o=l(!1);a(()=>{if(!e)return;function t(){o.current=!0}return document.addEventListener(`mousedown`,t,!0),document.addEventListener(`touchstart`,t,!0),()=>{document.removeEventListener(`mousedown`,t,!0),document.removeEventListener(`touchstart`,t,!0),o.current=!1}},[e]);let s=Y(e=>{if(!o.current){r.current=!1;return}let a=r.current;r.current=!1;let s=R(i.current);if(!i.current||`clientX`in e&&Xg(e,s))return;if(n.current){n.current=!1;return}let c;c=e.composedPath?e.composedPath().indexOf(i.current)>-1:!s.documentElement.contains(e.target)||i.current.contains(e.target),!c&&!a&&t(e)}),c=e=>{e.defaultMuiPrevented||(r.current=!0)};return a(()=>{if(e){let e=R(i.current),t=()=>{n.current=!0};return e.addEventListener(`touchstart`,s),e.addEventListener(`touchmove`,t),()=>{e.removeEventListener(`touchstart`,s),e.removeEventListener(`touchmove`,t)}}},[e,s]),a(()=>{if(e){let e=R(i.current);return e.addEventListener(`click`,s),()=>{e.removeEventListener(`click`,s),r.current=!1}}},[e,s]),[i,c,c]}var Qg=o((e,t)=>{let{PaperComponent:n,ownerState:r,children:i,paperSlotProps:a,paperClasses:o,onPaperClick:s,onPaperTouchStart:c}=e,l=Z(e,Kg),u=Vn({elementType:n,externalSlotProps:a,additionalProps:{tabIndex:-1,elevation:8,ref:t},className:o,ownerState:r});return G(n,x({},l,u,{onClick:e=>{var t;s(e),(t=u.onClick)==null||t.call(u,e)},onTouchStart:e=>{var t;c(e),(t=u.onTouchStart)==null||t.call(u,e)},ownerState:r,children:i}))}),$g=e=>{let t=e instanceof HTMLElement?e:null;return t?Wg(t):!1};function e_(e){let{children:t,placement:n=`bottom-start`,slots:r,slotProps:i,classes:o}=cr({props:e,name:`MuiPickerPopper`}),{open:s,popupRef:c,reduceAnimations:u,keepOpenDuringFieldFocus:d}=zl(),{ownerState:f,rootRefObject:m}=su(),{dismissViews:h,getCurrentViewMode:g,onPopperExited:_,triggerElement:v,viewContainerRole:y}=su();a(()=>{function e(e){s&&e.key===`Escape`&&h()}return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[h,s]);let b=l(null);a(()=>{y!==`tooltip`&&g()!==`field`&&(s?b.current=Dd(m.current):b.current&&b.current instanceof HTMLElement&&setTimeout(()=>{b.current instanceof HTMLElement&&b.current.focus()}))},[s,y,g,m]);let S=qg(o),[C,w,T]=Zg(s,Y(e=>{d&&v&&e&&`target`in e&&v.contains(e.target)||(y===`tooltip`?Td(()=>{var e,t;(e=m.current)!=null&&e.contains(Dd(m.current))||(t=c.current)!=null&&t.contains(Dd(c.current))||h()}):(e.composedPath().some($g)&&(b.current=null),h()))})),E=l(null),D=nt(E,c),O=nt(D,C),k=e=>{e.key===`Escape`&&(e.stopPropagation(),h())},A=(r==null?void 0:r.desktopTransition)??u?rn:ye,j=(r==null?void 0:r.desktopTrapFocus)??Sn,M=(r==null?void 0:r.desktopPaper)??Yg,N=(r==null?void 0:r.popper)??Jg,ee=Vn({elementType:N,externalSlotProps:i==null?void 0:i.popper,additionalProps:{transition:!0,role:y??void 0,open:s,placement:n,anchorEl:v,onKeyDown:k},className:S.root,ownerState:f}),P=p(()=>x({},f,{popperPlacement:ee.placement}),[f,ee.placement]);return G(N,x({},ee,{children:({TransitionProps:e})=>G(j,x({open:s,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:y===`tooltip`},i==null?void 0:i.desktopTrapFocus,{children:G(A,x({},e,i==null?void 0:i.desktopTransition,{onExited:t=>{var n,r,a;_==null||_(),i==null||(n=i.desktopTransition)==null||(r=n.onExited)==null||r.call(n,t),e==null||(a=e.onExited)==null||a.call(e)},children:G(Qg,{PaperComponent:M,ownerState:P,ref:O,onPaperClick:w,onPaperTouchStart:T,paperClasses:S.paper,paperSlotProps:i==null?void 0:i.desktopPaper,children:t})}))}))}))}g();function t_(){return typeof window>`u`?`portrait`:window.screen&&window.screen.orientation&&window.screen.orientation.angle?Math.abs(window.screen.orientation.angle)===90?`landscape`:`portrait`:window.orientation&&Math.abs(Number(window.orientation))===90?`landscape`:`portrait`}function n_(e,t){let[n,r]=u(t_);return j(()=>{let e=()=>{r(t_())};return window.addEventListener(`orientationchange`,e),()=>{window.removeEventListener(`orientationchange`,e)}},[]),wd(e,[`hours`,`minutes`,`seconds`])?`portrait`:t??n}g();function r_(e){let{props:t,valueManager:n,validator:r}=e,{value:i,defaultValue:o,onChange:s,referenceDate:c,timezone:d,onAccept:f,closeOnSelect:m,open:h,onOpen:g,onClose:_}=t,{current:v}=l(o),{current:y}=l(i!==void 0),{current:b}=l(h!==void 0),S=kc(),{timezone:C,value:w,handleValueChange:T}=sd({name:`a picker component`,timezone:d,value:i,defaultValue:v,referenceDate:c,onChange:s,valueManager:n}),[E,D]=u(()=>({open:!1,lastExternalValue:w,clockShallowValue:void 0,lastCommittedValue:w,hasBeenModifiedSinceMount:!1})),{getValidationErrorForNewValue:O}=pf({props:t,validator:r,timezone:C,value:w,onError:t.onError}),k=Y(e=>{let t=typeof e==`function`?e(E.open):e;b||D(e=>x({},e,{open:t})),t&&g&&g(),t||_==null||_()}),A=Y((e,t)=>{let{changeImportance:r=`accept`,skipPublicationIfPristine:i=!1,validationError:a,shortcut:o,source:s,shouldClose:c=r===`accept`}=t??{},l,u;!i&&!y&&!E.hasBeenModifiedSinceMount?(l=!0,u=r===`accept`):(l=!n.areValuesEqual(S,e,w),u=r===`accept`&&!n.areValuesEqual(S,e,E.lastCommittedValue)),D(t=>x({},t,{clockShallowValue:l?void 0:t.clockShallowValue,lastCommittedValue:u?e:t.lastCommittedValue,hasBeenModifiedSinceMount:!0}));let d=null,p=()=>{if(!d){let t;t=s||(o?`view`:`unknown`),d={validationError:a??O(e),source:t},o&&(d.shortcut=o)}return d};l&&T(e,p()),u&&f&&f(e,p()),c&&k(!1)});w!==E.lastExternalValue&&D(e=>x({},e,{lastExternalValue:w,clockShallowValue:void 0,hasBeenModifiedSinceMount:!0}));let j=Y((e,t=`partial`)=>{if(t===`shallow`){D(t=>x({},t,{clockShallowValue:e,hasBeenModifiedSinceMount:!0}));return}A(e,{changeImportance:t===`finish`&&m?`accept`:`set`,source:`view`})});return a(()=>{if(b){if(h===void 0)throw Error(xc(160));D(e=>x({},e,{open:h}))}},[b,h]),{timezone:C,state:E,setValue:A,setValueFromView:j,setOpen:k,value:w,viewValue:p(()=>n.cleanValue(S,E.clockShallowValue===void 0?w:E.clockShallowValue),[S,n,E.clockShallowValue,w])}}g();var i_=[`className`,`sx`],a_=({ref:e,props:t,valueManager:n,valueType:r,variant:i,validator:a,onPopperExited:o,autoFocusView:s,rendererInterceptor:c,localeText:d,viewContainerRole:f,getStepNavigation:m})=>{let{views:h,view:g,openTo:_,onViewChange:v,viewRenderers:y,reduceAnimations:b,orientation:S,disableOpenPicker:C,closeOnSelect:w,disabled:T,readOnly:E,formatDensity:D,selectedSections:O,onSelectedSectionsChange:k,format:A,label:M,autoFocus:N,name:ee,keepOpenDuringFieldFocus:P}=t,{className:F,sx:I}=t,L=Z(t,i_),R=Le(),te=kc(),ne=lg(b),z=n_(h,S),{current:B}=l(_??null),[re,ie]=u(null),ae=l(null),oe=l(null),V=l(null),se=nt(e,V),{timezone:ce,state:H,setOpen:U,setValue:le,setValueFromView:ue,value:de,viewValue:fe}=r_({props:t,valueManager:n,validator:a}),{view:pe,setView:W,defaultView:me,focusedView:he,setFocusedView:ge,setValueAndGoToNextView:_e,goToNextStep:ve,hasNextStep:ye,hasSeveralSteps:be}=vu({view:g,views:h,openTo:_,onChange:ue,onViewChange:v,autoFocus:s,getStepNavigation:m}),xe=Y(()=>{var e;de===null&&(e=oe.current)!=null&&e.clearValue&&oe.current.clearValue(),le(n.emptyValue,{source:`view`})}),Se=Y(()=>le(n.getTodayValue(te,ce,r),{source:`view`})),Ce=Y(()=>le(de,{source:`view`})),we=Y(()=>le(H.lastCommittedValue,{skipPublicationIfPristine:!0,source:`view`})),Te=Y(()=>{le(de,{skipPublicationIfPristine:!0,source:`view`})}),{hasUIView:Ee,viewModeLookup:De,timeViewsCount:Oe}=p(()=>h.reduce((e,t)=>{let n=y[t]==null?`field`:`UI`;return e.viewModeLookup[t]=n,n===`UI`&&(e.hasUIView=!0,el(t)&&(e.timeViewsCount+=1)),e},{hasUIView:!1,viewModeLookup:{},timeViewsCount:0}),[y,h]),ke=De[pe],Ae=Y(()=>ke),[je,Me]=u(ke===`UI`?pe:null);je!==pe&&De[pe]===`UI`&&Me(pe),j(()=>{ke===`field`&&H.open&&(U(!1),setTimeout(()=>{var e,t;oe==null||(e=oe.current)==null||e.setSelectedSections(pe),oe==null||(t=oe.current)==null||t.focusField(pe)}))},[pe]),j(()=>{if(!H.open)return;let e=pe;ke===`field`&&je!=null&&(e=je),e!==me&&De[e]===`UI`&&De[me]===`UI`&&(e=me),e!==pe&&W(e),ge(e,!0)},[H.open]);let Ne=p(()=>({isPickerValueEmpty:n.areValuesEqual(te,de,n.emptyValue),isPickerOpen:H.open,isPickerDisabled:t.disabled??!1,isPickerReadOnly:t.readOnly??!1,pickerOrientation:z,pickerVariant:i}),[te,n,de,H.open,z,i,t.disabled,t.readOnly]),Pe=p(()=>C||!Ee?`hidden`:T||E?`disabled`:`enabled`,[C,Ee,T,E]),Fe=Y(ve),Ie=p(()=>w&&!be?[]:[`cancel`,`nextOrAccept`],[w,be]),Re=p(()=>({setValue:le,setOpen:U,clearValue:xe,setValueToToday:Se,acceptValueChanges:Ce,cancelValueChanges:we,setView:W,goToNextStep:Fe}),[le,U,xe,Se,Ce,we,W,Fe]);return{providerProps:{localeText:d,contextValue:p(()=>x({},Re,{value:de,timezone:ce,open:H.open,views:h,view:je,initialView:B,disabled:T??!1,readOnly:E??!1,autoFocus:N??!1,variant:i,orientation:z,popupRef:ae,reduceAnimations:ne,triggerRef:ie,triggerStatus:Pe,keepOpenDuringFieldFocus:!!P,hasNextStep:ye,fieldFormat:A??``,name:ee,label:M,rootSx:I,rootRef:se,rootClassName:F}),[Re,de,se,i,z,ne,T,E,A,F,ee,M,I,Pe,P,ye,ce,H.open,je,h,B,N]),privateContextValue:p(()=>({dismissViews:Te,ownerState:Ne,hasUIView:Ee,getCurrentViewMode:Ae,rootRefObject:V,labelId:R,triggerElement:re,viewContainerRole:f,defaultActionBarActions:Ie,onPopperExited:o}),[Te,Ne,Ee,Ae,R,re,f,Ie,o]),actionsContextValue:Re,fieldPrivateContextValue:p(()=>({formatDensity:D,selectedSections:O,onSelectedSectionsChange:k,internalFieldRef:oe}),[D,O,k,oe]),isValidContextValue:e=>{let r=a({adapter:te,value:e,timezone:ce,props:t});return!n.hasError(r)}},renderCurrentView:()=>{if(je==null)return null;let e=y[je];if(e==null)return null;let t=x({},L,{views:h,timezone:ce,value:fe,onChange:_e,view:je,onViewChange:W,showViewSwitcher:Oe>1,timeViewsCount:Oe},f===`tooltip`?{focusedView:null,onFocusedViewChange:()=>{}}:{focusedView:he,onFocusedViewChange:ge});return c?G(c,{viewRenderers:y,popperView:je,rendererProps:t}):e(t)},ownerState:Ne}};function o_(e){return Ne(`MuiPickersLayout`,e)}var s_=ke(`MuiPickersLayout`,[`root`,`landscape`,`contentWrapper`,`toolbar`,`actionBar`,`tabs`,`shortcuts`]);g();var c_=[`actions`],l_=q(D,{name:`MuiPickersLayout`,slot:`ActionBar`})({});function u_(e){let{actions:t}=e,n=Z(e,c_),r=Ac(),{clearValue:i,setValueToToday:a,acceptValueChanges:o,cancelValueChanges:s,goToNextStep:c,hasNextStep:l}=zl();if(t==null||t.length===0)return null;let u=t==null?void 0:t.map(e=>{switch(e){case`clear`:return G(Ln,{onClick:i,children:r.clearButtonLabel},e);case`cancel`:return G(Ln,{onClick:s,children:r.cancelButtonLabel},e);case`accept`:return G(Ln,{onClick:o,children:r.okButtonLabel},e);case`today`:return G(Ln,{onClick:a,children:r.todayButtonLabel},e);case`next`:return G(Ln,{onClick:c,children:r.nextStepButtonLabel},e);case`nextOrAccept`:return l?G(Ln,{onClick:c,children:r.nextStepButtonLabel},e):G(Ln,{onClick:o,children:r.okButtonLabel},e);default:return null}});return G(l_,x({},n,{children:u}))}var d_=h(u_),f_=[`items`,`changeImportance`],p_=[`getValue`],m_=q(le,{name:`MuiPickersLayout`,slot:`Shortcuts`})({});function h_(e){let{items:t,changeImportance:n=`accept`}=e,r=Z(e,f_),{setValue:i}=Yl(),a=Ul();if(t==null||t.length===0)return null;let o=t.map(e=>{let{getValue:t}=e,r=Z(e,p_),o=t({isValid:a});return x({},r,{label:r.label,onClick:()=>{i(o,{changeImportance:n,shortcut:r,source:`view`})},disabled:!a(o)})});return G(m_,x({dense:!0,sx:[{maxHeight:336,maxWidth:200,overflow:`auto`},...Array.isArray(r.sx)?r.sx:[r.sx]]},r,{children:o.map(e=>G(dt,{children:G(Dt,x({},e))},e.id??e.label))}))}g();var g_=[`ownerState`];function __(e){return e.view!==null}var v_=(e,t)=>{let{pickerOrientation:n}=t;return B({root:[`root`,n===`landscape`&&`landscape`],contentWrapper:[`contentWrapper`],toolbar:[`toolbar`],actionBar:[`actionBar`],tabs:[`tabs`],landscape:[`landscape`],shortcuts:[`shortcuts`]},o_,e)},y_=e=>{let{ownerState:t,defaultActionBarActions:n}=su(),{view:r}=zl(),i=dn(),{children:a,slots:o,slotProps:s,classes:c}=e,l=p(()=>x({},t,{layoutDirection:i?`rtl`:`ltr`,hasShortcuts:!1}),[t,i]),u=v_(c,l),d=(o==null?void 0:o.actionBar)??d_,f=Z(Vn({elementType:d,externalSlotProps:s==null?void 0:s.actionBar,additionalProps:{actions:n},className:u.actionBar,ownerState:l}),g_),m=G(d,x({},f)),h=o==null?void 0:o.toolbar,g=Vn({elementType:h,externalSlotProps:s==null?void 0:s.toolbar,className:u.toolbar,ownerState:l}),_=__(g)&&h?G(h,x({},g)):null,v=a,y=o==null?void 0:o.tabs,b=r&&y?G(y,x({className:u.tabs},s==null?void 0:s.tabs)):null,S=(o==null?void 0:o.shortcuts)??h_,C=Vn({elementType:S,externalSlotProps:s==null?void 0:s.shortcuts,className:u.shortcuts,ownerState:l}),w=Array.isArray(C==null?void 0:C.items)&&C.items.length>0;return{toolbar:_,content:v,tabs:b,actionBar:m,shortcuts:r&&S?G(S,x({},C)):null,ownerState:x({},l,{hasShortcuts:w})}};g();var b_=[`sx`,`className`,`classes`,`children`,`slots`,`slotProps`],x_=(e,t)=>{let{pickerOrientation:n}=t;return B({root:[`root`,n===`landscape`&&`landscape`],contentWrapper:[`contentWrapper`]},o_,e)},S_=q(`div`,{name:`MuiPickersLayout`,slot:`Root`})({display:`grid`,gridAutoColumns:`max-content auto max-content`,gridAutoRows:`max-content auto max-content`,[`& .${s_.actionBar}`]:{gridColumn:`1 / 4`,gridRow:3},variants:[{props:{pickerOrientation:`landscape`,hasShortcuts:!1},style:{[`& .${s_.toolbar}`]:{gridColumn:1,gridRow:`1 / 3`}}},{props:{pickerOrientation:`landscape`,hasShortcuts:!0},style:{[`& .${s_.toolbar}`]:{gridColumn:`2 / 4`,gridRow:1,maxWidth:`max-content`},[`& .${s_.shortcuts}`]:{gridColumn:1,gridRow:2}}},{props:{pickerOrientation:`portrait`},style:{[`& .${s_.toolbar}`]:{gridColumn:`2 / 4`,gridRow:1},[`& .${s_.shortcuts}`]:{gridColumn:1,gridRow:`2 / 3`}}},{props:{hasShortcuts:!0,layoutDirection:`rtl`},style:{[`& .${s_.shortcuts}`]:{gridColumn:4}}}]}),C_=q(`div`,{name:`MuiPickersLayout`,slot:`ContentWrapper`})({gridColumn:`2 / 4`,gridRow:2,display:`flex`,flexDirection:`column`}),w_=o(function(e,t){let n=cr({props:e,name:`MuiPickersLayout`}),{toolbar:r,content:i,tabs:a,actionBar:o,shortcuts:s,ownerState:c}=y_(n),{orientation:l,variant:u}=zl(),{sx:d,className:f,classes:p}=n,m=Z(n,b_),h=x_(p,c);return Je(S_,x({ref:t,sx:d,className:Ve(h.root,f),ownerState:c},m,{children:[l===`landscape`?s:r,l===`landscape`?r:s,G(C_,{className:h.contentWrapper,ownerState:c,children:u===`desktop`?Je(y,{children:[i,a]}):Je(y,{children:[a,i]})}),o]}))});function T_(e){let{steps:t}=e;return _u({steps:t,isViewMatchingStep:(e,t)=>t.views==null||t.views.includes(e),onStepChange:({step:e,defaultView:t,setView:n,view:r,views:i})=>{let a=e.views==null?t:e.views.find(e=>i.includes(e));a!==r&&n(a)}})}var E_=[`props`,`steps`],D_=[`ownerState`],O_=e=>{var t;let{props:n,steps:r}=e,i=Z(e,E_),{slots:a,slotProps:o,label:s,inputRef:c,localeText:l}=n,u=T_({steps:r}),{providerProps:d,renderCurrentView:f,ownerState:p}=a_(x({},i,{props:n,localeText:l,autoFocusView:!0,viewContainerRole:`dialog`,variant:`desktop`,getStepNavigation:u})),m=d.privateContextValue.labelId,h=(o==null||(t=o.toolbar)==null?void 0:t.hidden)??!1,g=a.field,_=Z(Vn({elementType:g,externalSlotProps:o==null?void 0:o.field,externalForwardedProps:Ad(n),additionalProps:x({},h&&{id:m}),ownerState:p}),D_),v=a.layout??w_,y=m;h&&(y=s?`${m}-label`:void 0);let b=x({},o,{toolbar:x({},o==null?void 0:o.toolbar,{titleId:m}),popper:x({"aria-labelledby":y},o==null?void 0:o.popper)});return{renderPicker:()=>Je(Jl,x({},d,{children:[G(g,x({},_,{slots:x({},a,_.slots),slotProps:x({},b,_.slotProps),inputRef:c})),G(e_,{slots:a,slotProps:b,children:G(v,x({},b==null?void 0:b.layout,{slots:a,slotProps:b,children:f()}))})]}))}},k_=({view:e,onViewChange:t,views:n,focusedView:r,onFocusedViewChange:i,value:a,defaultValue:o,referenceDate:s,onChange:c,className:l,classes:u,disableFuture:d,disablePast:f,minDate:p,maxDate:m,shouldDisableDate:h,shouldDisableMonth:g,shouldDisableYear:_,reduceAnimations:v,onMonthChange:y,monthsPerRow:b,onYearChange:x,yearsOrder:S,yearsPerRow:C,slots:w,slotProps:T,loading:E,renderLoading:D,disableHighlightToday:O,readOnly:k,disabled:A,showDaysOutsideCurrentMonth:j,dayOfWeekFormatter:M,sx:N,autoFocus:ee,fixedWeekNumber:P,displayWeekNumber:F,timezone:I})=>G(_g,{view:e,onViewChange:t,views:n.filter(Yc),focusedView:r&&Yc(r)?r:null,onFocusedViewChange:i,value:a,defaultValue:o,referenceDate:s,onChange:c,className:l,classes:u,disableFuture:d,disablePast:f,minDate:p,maxDate:m,shouldDisableDate:h,shouldDisableMonth:g,shouldDisableYear:_,reduceAnimations:v,onMonthChange:y,monthsPerRow:b,onYearChange:x,yearsOrder:S,yearsPerRow:C,slots:w,slotProps:T,loading:E,renderLoading:D,disableHighlightToday:O,readOnly:k,disabled:A,showDaysOutsideCurrentMonth:j,dayOfWeekFormatter:M,sx:N,autoFocus:ee,fixedWeekNumber:P,displayWeekNumber:F,timezone:I});g();var A_=o(function(e,t){var n;let r=kc(),i=Hg(e,`MuiDesktopDatePicker`),a=x({day:k_,month:k_,year:k_},i.viewRenderers),{renderPicker:o}=O_({ref:t,props:x({},i,{closeOnSelect:i.closeOnSelect??!0,viewRenderers:a,format:Xc(r,i,!1),yearsPerRow:i.yearsPerRow??4,slots:x({field:um},i.slots),slotProps:x({},i.slotProps,{field:e=>{var t;return x({},An((t=i.slotProps)==null?void 0:t.field,e),Fc(i))},toolbar:x({hidden:!0},(n=i.slotProps)==null?void 0:n.toolbar)})}),valueManager:pd,valueType:`date`,validator:uf,steps:null});return o()});g();var j_=q(Vt,{slot:`internal`})({[`& .${Gn.container}`]:{outline:0},[`& .${Gn.paper}`]:{outline:0,minWidth:320}}),M_=q(We,{slot:`internal`})({"&:first-of-type":{padding:0}});function N_(e){var t,n;let{children:r,slots:i,slotProps:a}=e,{open:o}=zl(),{dismissViews:s,onPopperExited:c}=su(),l=(i==null?void 0:i.dialog)??j_;return G(l,x({open:o,onClose:()=>{s(),c==null||c()}},a==null?void 0:a.dialog,{PaperComponent:i==null?void 0:i.mobilePaper,slots:x({transition:(i==null?void 0:i.mobileTransition)??rn},a==null||(t=a.dialog)==null?void 0:t.slots),slotProps:x({transition:a==null?void 0:a.mobileTransition,paper:a==null?void 0:a.mobilePaper},a==null||(n=a.dialog)==null?void 0:n.slotProps),children:G(M_,{children:r})}))}var P_=[`props`,`steps`],F_=[`ownerState`],I_=e=>{var t;let{props:n,steps:r}=e,i=Z(e,P_),{slots:a,slotProps:o,label:s,inputRef:c,localeText:l}=n,u=T_({steps:r}),{providerProps:d,renderCurrentView:f,ownerState:p}=a_(x({},i,{props:n,localeText:l,autoFocusView:!0,viewContainerRole:`dialog`,variant:`mobile`,getStepNavigation:u})),m=d.privateContextValue.labelId,h=(o==null||(t=o.toolbar)==null?void 0:t.hidden)??!1,g=a.field,_=Z(Vn({elementType:g,externalSlotProps:o==null?void 0:o.field,externalForwardedProps:Ad(n),additionalProps:x({},h&&{id:m}),ownerState:p}),F_),v=a.layout??w_,y=m;h&&(y=s?`${m}-label`:void 0);let b=x({},o,{toolbar:x({},o==null?void 0:o.toolbar,{titleId:m}),mobilePaper:x({"aria-labelledby":y},o==null?void 0:o.mobilePaper)});return{renderPicker:()=>Je(Jl,x({},d,{children:[G(g,x({},_,{slots:x({},a,_.slots),slotProps:x({},b,_.slotProps),inputRef:c})),G(N_,{slots:a,slotProps:b,children:G(v,x({},b==null?void 0:b.layout,{slots:a,slotProps:b,children:f()}))})]}))}};g();var L_=o(function(e,t){var n;let r=kc(),i=Hg(e,`MuiMobileDatePicker`),a=x({day:k_,month:k_,year:k_},i.viewRenderers),{renderPicker:o}=I_({ref:t,props:x({},i,{viewRenderers:a,format:Xc(r,i,!1),slots:x({field:um},i.slots),slotProps:x({},i.slotProps,{field:e=>{var t;return x({},An((t=i.slotProps)==null?void 0:t.field,e),Fc(i))},toolbar:x({hidden:!1},(n=i.slotProps)==null?void 0:n.toolbar)})}),valueManager:pd,valueType:`date`,validator:uf,steps:null});return o()});g();var R_=[`desktopModeMediaQuery`],z_=o(function(e,t){let n=cr({props:e,name:`MuiDatePicker`}),{desktopModeMediaQuery:r=kd}=n,i=Z(n,R_);return he(r,{defaultMatches:!0})?G(A_,x({ref:t},i)):G(L_,x({ref:t},i))}),B_=[`props`,`steps`],V_=q(w_,{slot:`internal`})(({theme:e})=>({overflow:`hidden`,minWidth:320,backgroundColor:(e.vars||e).palette.background.paper})),H_=e=>{let{props:t,steps:n}=e,r=Z(e,B_),{localeText:i,slots:a,slotProps:o,displayStaticWrapperAs:s,autoFocus:c}=t,l=T_({steps:n}),{providerProps:u,renderCurrentView:d}=a_(x({},r,{props:t,variant:s,autoFocusView:c??!1,viewContainerRole:null,localeText:i,getStepNavigation:l})),f=(a==null?void 0:a.layout)??V_;return{renderPicker:()=>{var e,n;return G(Jl,x({},u,{children:G(f,x({},Ad(t),o==null?void 0:o.layout,{slots:a,slotProps:o,sx:jd(u.contextValue.rootSx,o==null||(e=o.layout)==null?void 0:e.sx),className:Ve(u.contextValue.rootClassName,o==null||(n=o.layout)==null?void 0:n.className),ref:u.contextValue.rootRef,children:d()}))}))}}};g();var U_=o(function(e,t){var n;let r=Hg(e,`MuiStaticDatePicker`),i=r.displayStaticWrapperAs??`mobile`,a=x({day:k_,month:k_,year:k_},r.viewRenderers),{renderPicker:o}=H_({ref:t,props:x({},r,{viewRenderers:a,displayStaticWrapperAs:i,yearsPerRow:r.yearsPerRow??(i===`mobile`?3:4),slotProps:x({},r.slotProps,{toolbar:x({hidden:i===`desktop`},(n=r.slotProps)==null?void 0:n.toolbar)})}),valueManager:pd,valueType:`date`,validator:uf,steps:null});return o()});function W_(e){return Ne(`MuiPickersToolbarText`,e)}var G_=ke(`MuiPickersToolbarText`,[`root`]);g();var K_=[`className`,`classes`,`selected`,`value`],q_=e=>B({root:[`root`]},W_,e),J_=q(Pt,{name:`MuiPickersToolbarText`,slot:`Root`})(({theme:e})=>({transition:e.transitions.create(`color`),color:(e.vars||e).palette.text.secondary,"&[data-selected]":{color:(e.vars||e).palette.text.primary}})),Y_=o(function(e,t){let n=cr({props:e,name:`MuiPickersToolbarText`}),{className:r,classes:i,selected:a,value:o}=n,s=Z(n,K_),c=q_(i);return G(J_,x({ref:t,className:Ve(c.root,r),component:`span`,ownerState:n},a&&{"data-selected":!0},s,{children:o}))});g();var X_=[`align`,`className`,`classes`,`selected`,`typographyClassName`,`value`,`variant`,`width`],Z_=e=>B({root:[`root`]},Dg,e),Q_=q(Ln,{name:`MuiPickersToolbarButton`,slot:`Root`})({padding:0,minWidth:16,textTransform:`none`}),$_=o(function(e,t){let n=cr({props:e,name:`MuiPickersToolbarButton`}),{align:r,className:i,classes:a,selected:o,typographyClassName:s,value:c,variant:l,width:u}=n,d=Z(n,X_),f=Z_(a);return G(Q_,x({variant:`text`,ref:t,className:Ve(f.root,i),ownerState:n},u?{sx:{width:u}}:{},d,{children:G(Y_,{align:r,className:s,variant:l,value:c,selected:o})}))});function ev(e){return Ne(`MuiTimePickerToolbar`,e)}var tv=ke(`MuiTimePickerToolbar`,[`root`,`separator`,`hourMinuteLabel`,`hourMinuteLabelLandscape`,`hourMinuteLabelReverse`,`ampmSelection`,`ampmLandscape`,`ampmLabel`]),nv=[`ampm`,`ampmInClock`,`className`,`classes`],rv=(e,t)=>{let{pickerOrientation:n,toolbarDirection:r}=t;return B({root:[`root`],separator:[`separator`],hourMinuteLabel:[`hourMinuteLabel`,n===`landscape`&&`hourMinuteLabelLandscape`,r===`rtl`&&`hourMinuteLabelReverse`],ampmSelection:[`ampmSelection`,n===`landscape`&&`ampmLandscape`],ampmLabel:[`ampmLabel`]},ev,e)},iv=q(Pg,{name:`MuiTimePickerToolbar`,slot:`Root`})({}),av=q(Y_,{name:`MuiTimePickerToolbar`,slot:`Separator`})({outline:0,margin:`0 4px 0 2px`,cursor:`default`}),ov=q(`div`,{name:`MuiTimePickerToolbar`,slot:`HourMinuteLabel`,overridesResolver:(e,t)=>[{[`&.${tv.hourMinuteLabelLandscape}`]:t.hourMinuteLabelLandscape,[`&.${tv.hourMinuteLabelReverse}`]:t.hourMinuteLabelReverse},t.hourMinuteLabel]})({display:`flex`,justifyContent:`flex-end`,alignItems:`flex-end`,variants:[{props:{toolbarDirection:`rtl`},style:{flexDirection:`row-reverse`}},{props:{pickerOrientation:`landscape`},style:{marginTop:`auto`}}]}),sv=q(`div`,{name:`MuiTimePickerToolbar`,slot:`AmPmSelection`,overridesResolver:(e,t)=>[{[`.${tv.ampmLabel}`]:t.ampmLabel},{[`&.${tv.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})({display:`flex`,flexDirection:`column`,marginRight:`auto`,marginLeft:12,[`& .${tv.ampmLabel}`]:{fontSize:17},variants:[{props:{pickerOrientation:`landscape`},style:{margin:`4px 0 auto`,flexDirection:`row`,justifyContent:`space-around`,flexBasis:`100%`}}]});function cv(e){let t=cr({props:e,name:`MuiTimePickerToolbar`}),{ampm:n,ampmInClock:r,className:i,classes:a}=t,o=Z(t,nv),s=kc(),c=Ac(),l=kg(),u=rv(a,l),{value:d,setValue:f,disabled:p,readOnly:m,view:h,setView:g,views:_}=zl(),v=!!(n&&!r&&_.includes(`hours`)),{meridiemMode:y,handleMeridiemChange:b}=xu(d,n,e=>f(e,{changeImportance:`set`,source:`view`})),S=e=>s.isValid(d)?s.format(d,e):`--`,C=G(av,{tabIndex:-1,value:`:`,variant:`h3`,selected:!1,className:u.separator});return Je(iv,x({landscapeDirection:`row`,toolbarTitle:c.timePickerToolbarTitle,ownerState:l,className:Ve(u.root,i)},o,{children:[Je(ov,{className:u.hourMinuteLabel,ownerState:l,children:[wd(_,`hours`)&&G($_,{tabIndex:-1,variant:`h3`,onClick:()=>g(`hours`),selected:h===`hours`,value:S(n?`hours12h`:`hours24h`)}),wd(_,[`hours`,`minutes`])&&C,wd(_,`minutes`)&&G($_,{tabIndex:-1,variant:`h3`,onClick:()=>g(`minutes`),selected:h===`minutes`,value:S(`minutes`)}),wd(_,[`minutes`,`seconds`])&&C,wd(_,`seconds`)&&G($_,{variant:`h3`,onClick:()=>g(`seconds`),selected:h===`seconds`,value:S(`seconds`)})]}),v&&Je(sv,{className:u.ampmSelection,ownerState:l,children:[G($_,{disableRipple:!0,variant:`subtitle2`,selected:y===`am`,typographyClassName:u.ampmLabel,value:qc(s,`am`),onClick:m?void 0:()=>b(`am`),disabled:p}),G($_,{disableRipple:!0,variant:`subtitle2`,selected:y===`pm`,typographyClassName:u.ampmLabel,value:qc(s,`pm`),onClick:m?void 0:()=>b(`pm`),disabled:p})]})]}))}g();function lv(e,t){var n;let r=kc(),i=cr({props:e,name:t}),a=Lf(i),o=i.ampm??r.is12HourCycleInCurrentLocale(),s=p(()=>{var e;return((e=i.localeText)==null?void 0:e.toolbarTitle)==null?i.localeText:x({},i.localeText,{timePickerToolbarTitle:i.localeText.toolbarTitle})},[i.localeText]);return x({},i,a,{ampm:o,localeText:s},zc({views:i.views,openTo:i.openTo,defaultViews:[`hours`,`minutes`],defaultOpenTo:`hours`}),{slots:x({toolbar:cv},i.slots),slotProps:x({},i.slotProps,{toolbar:x({ampm:o,ampmInClock:i.ampmInClock},(n=i.slotProps)==null?void 0:n.toolbar)})})}var uv=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:i,value:a,defaultValue:o,referenceDate:s,onChange:c,className:l,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:h,minutesStep:g,ampm:_,ampmInClock:v,slots:y,slotProps:b,readOnly:x,disabled:S,sx:C,autoFocus:w,showViewSwitcher:T,disableIgnoringDatePartForTimeValidation:E,timezone:D})=>G(xd,{view:e,onViewChange:t,focusedView:n&&el(n)?n:null,onFocusedViewChange:r,views:i.filter(el),value:a,defaultValue:o,referenceDate:s,onChange:c,className:l,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:h,minutesStep:g,ampm:_,ampmInClock:v,slots:y,slotProps:b,readOnly:x,disabled:S,sx:C,autoFocus:w,showViewSwitcher:T,disableIgnoringDatePartForTimeValidation:E,timezone:D}),dv=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:i,value:a,defaultValue:o,referenceDate:s,onChange:c,className:l,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:h,minutesStep:g,ampm:_,slots:v,slotProps:y,readOnly:b,disabled:x,sx:S,autoFocus:C,disableIgnoringDatePartForTimeValidation:w,timeSteps:T,skipDisabled:E,timezone:D})=>G(Ld,{view:e,onViewChange:t,focusedView:n&&el(n)?n:null,onFocusedViewChange:r,views:i.filter(el),value:a,defaultValue:o,referenceDate:s,onChange:c,className:l,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:h,minutesStep:g,ampm:_,slots:v,slotProps:y,readOnly:b,disabled:x,sx:S,autoFocus:C,disableIgnoringDatePartForTimeValidation:w,timeStep:T==null?void 0:T.minutes,skipDisabled:E,timezone:D}),fv=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:i,value:a,defaultValue:o,referenceDate:s,onChange:c,className:l,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:h,minutesStep:g,ampm:_,slots:v,slotProps:y,readOnly:b,disabled:x,sx:S,autoFocus:C,disableIgnoringDatePartForTimeValidation:w,timeSteps:T,skipDisabled:E,timezone:D})=>G(Qd,{view:e,onViewChange:t,focusedView:n&&tl(n)?n:null,onFocusedViewChange:r,views:i.filter(el),value:a,defaultValue:o,referenceDate:s,onChange:c,className:l,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:h,minutesStep:g,ampm:_,slots:v,slotProps:y,readOnly:b,disabled:x,sx:S,autoFocus:C,disableIgnoringDatePartForTimeValidation:w,timeSteps:T,skipDisabled:E,timezone:D}),pv=[`views`,`format`],mv=(e,t,n)=>{let{views:r,format:i}=t,a=Z(t,pv);if(i)return i;let o=[],s=[];if(r.forEach(e=>{el(e)?s.push(e):Yc(e)&&o.push(e)}),s.length===0)return Xc(e,x({views:o},a),!1);if(o.length===0)return sl(e,x({views:s},a));let c=sl(e,x({views:s},a));return`${n?e.formats.keyboardDate:Xc(e,x({views:o},a),!1)} ${c}`},hv=(e,t,n)=>n?t.filter(e=>!tl(e)||e===`hours`):e?[...t,`meridiem`]:t,gv=(e,t)=>1440/((e.hours??1)*(e.minutes??5))<=t;function _v({thresholdToRenderTimeInASingleColumn:e,ampm:t,timeSteps:n,views:r}){let i=e??24,a=x({hours:1,minutes:5,seconds:5},n),o=gv(a,i);return{thresholdToRenderTimeInASingleColumn:i,timeSteps:a,shouldRenderTimeInASingleColumn:o,views:hv(t,r,o)}}g();var vv=o(function(e,t){var n,r;let i=kc(),a=lv(e,`MuiDesktopTimePicker`),{shouldRenderTimeInASingleColumn:o,views:s,timeSteps:c}=_v(a),l=o?dv:fv,u=x({hours:l,minutes:l,seconds:l,meridiem:l},a.viewRenderers),d=a.ampmInClock??!0,f=((n=u.hours)==null?void 0:n.name)===fv.name?s:s.filter(e=>e!==`meridiem`),{renderPicker:p}=O_({ref:t,props:x({},a,{ampmInClock:d,timeSteps:c,viewRenderers:u,format:sl(i,a),views:o?[`hours`]:f,slots:x({field:pm},a.slots),slotProps:x({},a.slotProps,{field:e=>{var t;return x({},An((t=a.slotProps)==null?void 0:t.field,e),Fc(a))},toolbar:x({hidden:!0,ampmInClock:d},(r=a.slotProps)==null?void 0:r.toolbar)})}),valueManager:pd,valueType:`time`,validator:df,steps:null});return p()});g();var yv=o(function(e,t){var n;let r=kc(),i=lv(e,`MuiMobileTimePicker`),a=x({hours:uv,minutes:uv,seconds:uv},i.viewRenderers),o=i.ampmInClock??!1,{renderPicker:s}=I_({ref:t,props:x({},i,{ampmInClock:o,viewRenderers:a,format:sl(r,i),slots:x({field:pm},i.slots),slotProps:x({},i.slotProps,{field:e=>{var t;return x({},An((t=i.slotProps)==null?void 0:t.field,e),Fc(i))},toolbar:x({hidden:!1,ampmInClock:o},(n=i.slotProps)==null?void 0:n.toolbar)})}),valueManager:pd,valueType:`time`,validator:df,steps:null});return s()});g();var bv=[`desktopModeMediaQuery`],xv=o(function(e,t){let n=cr({props:e,name:`MuiTimePicker`}),{desktopModeMediaQuery:r=kd}=n,i=Z(n,bv);return he(r,{defaultMatches:!0})?G(vv,x({ref:t},i)):G(yv,x({ref:t},i))});g();var Sv=o(function(e,t){var n;let r=lv(e,`MuiStaticTimePicker`),i=r.displayStaticWrapperAs??`mobile`,a=r.ampmInClock??i===`desktop`,o=x({hours:uv,minutes:uv,seconds:uv},r.viewRenderers),{renderPicker:s}=H_({ref:t,props:x({},r,{viewRenderers:o,displayStaticWrapperAs:i,ampmInClock:a,slotProps:x({},r.slotProps,{toolbar:x({hidden:i===`desktop`,ampmInClock:a},(n=r.slotProps)==null?void 0:n.toolbar)})}),valueManager:pd,valueType:`time`,validator:df,steps:null});return s()});function Cv(e){return Ne(`MuiDateTimePickerTabs`,e)}var wv=ke(`MuiDateTimePickerTabs`,[`root`]);g();var Tv=[`dateIcon`,`timeIcon`,`hidden`,`className`,`classes`,`sx`],Ev=e=>Yc(e)?`date`:`time`,Dv=e=>e===`date`?`day`:`hours`,Ov=e=>B({root:[`root`]},Cv,e),kv=q(Te,{name:`MuiDateTimePickerTabs`,slot:`Root`})(({theme:e})=>({boxShadow:`0 -1px 0 0 inset ${(e.vars||e).palette.divider}`,"&:last-child":{boxShadow:`0 1px 0 0 inset ${(e.vars||e).palette.divider}`,[`& .${qe.indicator}`]:{bottom:`auto`,top:0}}})),Av=function(e){let t=cr({props:e,name:`MuiDateTimePickerTabs`}),{dateIcon:n=G(ru,{}),timeIcon:r=G(iu,{}),hidden:i=typeof window>`u`||window.innerHeight<667,className:a,classes:o,sx:s}=t,c=Z(t,Tv),l=Ac(),{ownerState:u}=su(),{view:d,setView:f}=zl(),p=Ov(o);return i?null:Je(kv,x({},c,{ownerState:u,variant:`fullWidth`,value:Ev(d),onChange:(e,t)=>{f(Dv(t))},className:Ve(a,p.root),sx:s,children:[G(dr,{value:`date`,"aria-label":l.dateTableLabel,icon:G(y,{children:n})}),G(dr,{value:`time`,"aria-label":l.timeTableLabel,icon:G(y,{children:r})})]}))};function jv(e){return Ne(`MuiDateTimePickerToolbar`,e)}var Mv=ke(`MuiDateTimePickerToolbar`,[`root`,`dateContainer`,`timeContainer`,`timeDigitsContainer`,`separator`,`timeLabelReverse`,`ampmSelection`,`ampmLandscape`,`ampmLabel`]);g();var Nv=[`ampm`,`ampmInClock`,`toolbarFormat`,`toolbarPlaceholder`,`toolbarTitle`,`className`,`classes`],Pv=(e,t)=>{let{pickerOrientation:n,toolbarDirection:r}=t;return B({root:[`root`],dateContainer:[`dateContainer`],timeContainer:[`timeContainer`,r===`rtl`&&`timeLabelReverse`],timeDigitsContainer:[`timeDigitsContainer`,r===`rtl`&&`timeLabelReverse`],separator:[`separator`],ampmSelection:[`ampmSelection`,n===`landscape`&&`ampmLandscape`],ampmLabel:[`ampmLabel`]},jv,e)},Fv=q(Pg,{name:`MuiDateTimePickerToolbar`,slot:`Root`,shouldForwardProp:e=>cn(e)&&e!==`toolbarVariant`})(({theme:e})=>({paddingLeft:16,paddingRight:16,justifyContent:`space-around`,position:`relative`,variants:[{props:{toolbarVariant:`desktop`},style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,[`& .${Og.content} .${G_.root}[data-selected]`]:{color:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightBold}}},{props:{toolbarVariant:`desktop`,pickerOrientation:`landscape`},style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:{toolbarVariant:`desktop`,pickerOrientation:`portrait`},style:{paddingLeft:24,paddingRight:0}}]})),Iv=q(`div`,{name:`MuiDateTimePickerToolbar`,slot:`DateContainer`})({display:`flex`,flexDirection:`column`,alignItems:`flex-start`}),Lv=q(`div`,{name:`MuiDateTimePickerToolbar`,slot:`TimeContainer`,shouldForwardProp:e=>cn(e)&&e!==`toolbarVariant`})({display:`flex`,flexDirection:`row`,variants:[{props:{toolbarDirection:`rtl`},style:{flexDirection:`row-reverse`}},{props:{toolbarVariant:`desktop`,pickerOrientation:`portrait`},style:{gap:9,marginRight:4,alignSelf:`flex-end`}},{props:({pickerOrientation:e,toolbarVariant:t})=>e===`landscape`&&t!==`desktop`,style:{flexDirection:`column`}},{props:({pickerOrientation:e,toolbarVariant:t,toolbarDirection:n})=>e===`landscape`&&t!==`desktop`&&n===`rtl`,style:{flexDirection:`column-reverse`}}]}),Rv=q(`div`,{name:`MuiDateTimePickerToolbar`,slot:`TimeDigitsContainer`,shouldForwardProp:e=>cn(e)&&e!==`toolbarVariant`})({display:`flex`,variants:[{props:{toolbarDirection:`rtl`},style:{flexDirection:`row-reverse`}},{props:{toolbarVariant:`desktop`},style:{gap:1.5}}]}),zv=q(Y_,{name:`MuiDateTimePickerToolbar`,slot:`Separator`,shouldForwardProp:e=>cn(e)&&e!==`toolbarVariant`})({margin:`0 4px 0 2px`,cursor:`default`,variants:[{props:{toolbarVariant:`desktop`},style:{margin:0}}]}),Bv=q(`div`,{name:`MuiDateTimePickerToolbar`,slot:`AmPmSelection`,overridesResolver:(e,t)=>[{[`.${Mv.ampmLabel}`]:t.ampmLabel},{[`&.${Mv.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})({display:`flex`,flexDirection:`column`,marginRight:`auto`,marginLeft:12,[`& .${Mv.ampmLabel}`]:{fontSize:17},variants:[{props:{pickerOrientation:`landscape`},style:{margin:`4px 0 auto`,flexDirection:`row`,justifyContent:`space-around`,width:`100%`}}]}),Vv=v(null);function Hv(e){let t=cr({props:e,name:`MuiDateTimePickerToolbar`}),{ampm:n,ampmInClock:r,toolbarFormat:i,toolbarPlaceholder:a=`––`,toolbarTitle:o,className:s,classes:c}=t,l=Z(t,Nv),{value:u,setValue:d,disabled:f,readOnly:m,variant:h,orientation:g,view:_,setView:v,views:S}=zl(),C=Ac(),w=kg(),T=Pv(c,w),E=kc(),D=b(Vv),O=D?D.value:u,k=D?D.setValue:d,A=D?D.view:_,j=D?D.setView:v,{meridiemMode:M,handleMeridiemChange:N}=xu(O,n,e=>k(e,{changeImportance:`set`,source:`view`})),ee=D!=null&&D.forceDesktopVariant?`desktop`:h,P=ee===`desktop`,F=!!(n&&!r),I=o??C.dateTimePickerToolbarTitle,L=p(()=>E.isValid(O)?i?E.formatByString(O,i):E.format(O,`shortDate`):a,[O,i,a,E]),R=(e,t)=>E.isValid(O)?E.format(O,e):t;return Je(Fv,x({className:Ve(T.root,s),toolbarTitle:I,toolbarVariant:ee},l,{ownerState:w,children:[Je(Iv,{className:T.dateContainer,ownerState:w,children:[S.includes(`year`)&&G($_,{tabIndex:-1,variant:`subtitle1`,onClick:()=>j(`year`),selected:A===`year`,value:R(`year`,`–`)}),S.includes(`day`)&&G($_,{tabIndex:-1,variant:P?`h5`:`h4`,onClick:()=>j(`day`),selected:A===`day`,value:L})]}),Je(Lv,{className:T.timeContainer,ownerState:w,toolbarVariant:ee,children:[Je(Rv,{className:T.timeDigitsContainer,ownerState:w,toolbarVariant:ee,children:[S.includes(`hours`)&&Je(y,{children:[G($_,{variant:P?`h5`:`h3`,width:P&&g===`portrait`?48:void 0,onClick:()=>j(`hours`),selected:A===`hours`,value:R(n?`hours12h`:`hours24h`,`--`)}),G(zv,{variant:P?`h5`:`h3`,value:`:`,className:T.separator,ownerState:w,toolbarVariant:ee}),G($_,{variant:P?`h5`:`h3`,width:P&&g===`portrait`?48:void 0,onClick:()=>j(`minutes`),selected:A===`minutes`||!S.includes(`minutes`)&&A===`hours`,value:R(`minutes`,`--`),disabled:!S.includes(`minutes`)})]}),S.includes(`seconds`)&&Je(y,{children:[G(zv,{variant:P?`h5`:`h3`,value:`:`,className:T.separator,ownerState:w,toolbarVariant:ee}),G($_,{variant:P?`h5`:`h3`,width:P&&g===`portrait`?48:void 0,onClick:()=>j(`seconds`),selected:A===`seconds`,value:R(`seconds`,`--`)})]})]}),F&&!P&&Je(Bv,{className:T.ampmSelection,ownerState:w,children:[G($_,{variant:`subtitle2`,selected:M===`am`,typographyClassName:T.ampmLabel,value:qc(E,`am`),onClick:m?void 0:()=>N(`am`),disabled:f}),G($_,{variant:`subtitle2`,selected:M===`pm`,typographyClassName:T.ampmLabel,value:qc(E,`pm`),onClick:m?void 0:()=>N(`pm`),disabled:f})]}),n&&P&&G($_,{variant:`h5`,onClick:()=>j(`meridiem`),selected:A===`meridiem`,value:O&&M?qc(E,M):`--`,width:48})]})]}))}g();function Uv(e,t){var n;let r=kc(),i=cr({props:e,name:t}),a=Vf(i),o=i.ampm??r.is12HourCycleInCurrentLocale(),s=p(()=>{var e;return((e=i.localeText)==null?void 0:e.toolbarTitle)==null?i.localeText:x({},i.localeText,{dateTimePickerToolbarTitle:i.localeText.toolbarTitle})},[i.localeText]),{openTo:c,views:l}=zc({views:i.views,openTo:i.openTo,defaultViews:[`year`,`day`,`hours`,`minutes`],defaultOpenTo:`day`}),{shouldRenderTimeInASingleColumn:u,thresholdToRenderTimeInASingleColumn:d,views:f,timeSteps:m}=_v({thresholdToRenderTimeInASingleColumn:i.thresholdToRenderTimeInASingleColumn,ampm:o,timeSteps:i.timeSteps,views:l}),h=o?[...l,`meridiem`]:l;return x({},i,a,{timeSteps:m,openTo:c,shouldRenderTimeInASingleColumn:u,thresholdToRenderTimeInASingleColumn:d,views:f,viewsForFormatting:h,ampm:o,localeText:s,orientation:i.orientation??`portrait`,slots:x({toolbar:Hv,tabs:Av},i.slots),slotProps:x({},i.slotProps,{toolbar:x({ampm:o},(n=i.slotProps)==null?void 0:n.toolbar)})})}g();var Wv=o(function(e,t){var n;let{toolbar:r,tabs:i,content:a,actionBar:o,shortcuts:s,ownerState:c}=y_(e),{orientation:l}=zl(),{sx:u,className:d,classes:f}=e,p=o&&(((n=o.props.actions)==null?void 0:n.length)??0)>0;return Je(S_,{ref:t,className:Ve(s_.root,f==null?void 0:f.root,d),sx:[{[`& .${s_.tabs}`]:{gridRow:4,gridColumn:`1 / 4`},[`& .${s_.actionBar}`]:{gridRow:5}},...Array.isArray(u)?u:[u]],ownerState:c,children:[l===`landscape`?s:r,l===`landscape`?r:s,Je(C_,{className:Ve(s_.contentWrapper,f==null?void 0:f.contentWrapper),ownerState:c,sx:{display:`grid`},children:[a,i,p&&G(bt,{sx:{gridRow:3,gridColumn:`1 / 4`}})]}),o]})});g();var Gv=[`openTo`,`focusedView`,`timeViewsCount`],Kv=function(e){var t,n;let{viewRenderers:r,popperView:i,rendererProps:a}=e,{openTo:o,focusedView:s,timeViewsCount:c}=a,l=Z(a,Gv),u=x({},l,{autoFocus:!1,focusedView:null,sx:[{[`&.${zd.root}`]:{borderBottom:0},[`&.${zd.root}, .${Vd.root}, &.${Cd.root}`]:{maxHeight:336}}]}),d=tl(i),f=d?`day`:i,p=d?i:`hours`;return Je(y,{children:[(t=r[f])==null?void 0:t.call(r,x({},a,{view:d?`day`:i,focusedView:s&&Yc(s)?s:null,views:a.views.filter(Yc),sx:[{gridColumn:1},...u.sx]})),c>0&&Je(y,{children:[G(bt,{orientation:`vertical`,sx:{gridColumn:2}}),(n=r[p])==null?void 0:n.call(r,x({},u,{view:d?i:`hours`,focusedView:s&&tl(s)?s:null,openTo:tl(o)?o:`hours`,views:a.views.filter(tl),sx:[{gridColumn:3},...u.sx]}))]})]})},qv=o(function(e,t){var n,r,i;let a=kc(),o=Uv(e,`MuiDesktopDateTimePicker`),s=o.shouldRenderTimeInASingleColumn?dv:fv,c=x({day:k_,month:k_,year:k_,hours:s,minutes:s,seconds:s,meridiem:s},o.viewRenderers),l=o.ampmInClock??!0,u=((n=c.hours)==null?void 0:n.name)===fv.name?o.views:o.views.filter(e=>e!==`meridiem`),{renderPicker:d}=O_({ref:t,props:x({},o,{viewRenderers:c,format:mv(a,x({},o,{views:o.viewsForFormatting})),views:u,yearsPerRow:o.yearsPerRow??4,ampmInClock:l,slots:x({field:gm,layout:Wv},o.slots),slotProps:x({},o.slotProps,{field:e=>{var t;return x({},An((t=o.slotProps)==null?void 0:t.field,e),Fc(o))},toolbar:x({hidden:!0,ampmInClock:l},(r=o.slotProps)==null?void 0:r.toolbar),tabs:x({hidden:!0},(i=o.slotProps)==null?void 0:i.tabs)})}),valueManager:pd,valueType:`date-time`,validator:ff,rendererInterceptor:Kv,steps:null});return d()});g();var Jv=[{views:Jc},{views:Qc}],Yv=o(function(e,t){var n,r,i,a,o;let s=kc(),c=Uv(e,`MuiMobileDateTimePicker`),l=c.shouldRenderTimeInASingleColumn?dv:fv,u=x({day:k_,month:k_,year:k_,hours:l,minutes:l,seconds:l,meridiem:l},c.viewRenderers),d=c.ampmInClock??!1,f=((n=u.hours)==null?void 0:n.name)===fv.name?c.views:c.views.filter(e=>e!==`meridiem`),{renderPicker:p}=I_({ref:t,props:x({},c,{viewRenderers:u,format:mv(s,x({},c,{views:c.viewsForFormatting})),views:f,ampmInClock:d,slots:x({field:gm},c.slots),slotProps:x({},c.slotProps,{field:e=>{var t;return x({},An((t=c.slotProps)==null?void 0:t.field,e),Fc(c))},toolbar:x({hidden:!1,ampmInClock:d},(r=c.slotProps)==null?void 0:r.toolbar),tabs:x({hidden:!1},(i=c.slotProps)==null?void 0:i.tabs),layout:x({},(a=c.slotProps)==null?void 0:a.layout,{sx:jd([{[`& .${zd.root}`]:{width:320},[`& .${Vd.root}`]:{flex:1,maxHeight:335,[`.${Vd.item}`]:{width:`auto`}},[`& .${Cd.root}`]:{width:320,maxHeight:336,flex:1,[`.${Cd.item}`]:{justifyContent:`center`}}}],(o=c.slotProps)==null||(o=o.layout)==null?void 0:o.sx)})})}),valueManager:pd,valueType:`date-time`,validator:ff,steps:Jv});return p()});g();var Xv=[`desktopModeMediaQuery`],Zv=o(function(e,t){let n=cr({props:e,name:`MuiDateTimePicker`}),{desktopModeMediaQuery:r=kd}=n,i=Z(n,Xv);return he(r,{defaultMatches:!0})?G(qv,x({ref:t},i)):G(Yv,x({ref:t},i))});g();var Qv=[{views:Jc},{views:Qc}],$v=o(function(e,t){var n,r,i;let a=Uv(e,`MuiStaticDateTimePicker`),o=a.displayStaticWrapperAs??`mobile`,s=a.ampmInClock??o===`desktop`,c=a.shouldRenderTimeInASingleColumn?dv:fv,l=x({day:k_,month:k_,year:k_,hours:c,minutes:c,seconds:c,meridiem:c},a.viewRenderers),u=((n=l.hours)==null?void 0:n.name)===fv.name?a.views:a.views.filter(e=>e!==`meridiem`),{renderPicker:d}=H_({ref:t,props:x({},a,{viewRenderers:l,displayStaticWrapperAs:o,views:u,ampmInClock:s,yearsPerRow:a.yearsPerRow??(o===`mobile`?3:4),slotProps:x({},a.slotProps,{tabs:x({hidden:o===`desktop`},(r=a.slotProps)==null?void 0:r.tabs),toolbar:x({hidden:o===`desktop`,ampmInClock:s},(i=a.slotProps)==null?void 0:i.toolbar)}),sx:jd([{[`& .${zd.root}`]:{width:320},[`& .${Vd.root}`]:{flex:1,maxHeight:335,[`.${Vd.item}`]:{width:`auto`}},[`& .${Cd.root}`]:{width:320,maxHeight:336,flex:1,[`.${Cd.item}`]:{justifyContent:`center`}}}],a==null?void 0:a.sx)}),valueManager:pd,valueType:`date-time`,validator:ff,steps:Qv});return d()}),ey=t({ArrowDropDownIcon:()=>Ql,ArrowLeftIcon:()=>$l,ArrowRightIcon:()=>eu,CalendarIcon:()=>tu,ClearIcon:()=>au,ClockIcon:()=>nu,DEFAULT_DESKTOP_MODE_MEDIA_QUERY:()=>kd,DateCalendar:()=>_g,DateField:()=>um,DatePicker:()=>z_,DatePickerToolbar:()=>Vg,DateRangeIcon:()=>ru,DateTimeField:()=>gm,DateTimePicker:()=>Zv,DateTimePickerTabs:()=>Av,DateTimePickerToolbar:()=>Hv,DayCalendarSkeleton:()=>Eg,DesktopDatePicker:()=>A_,DesktopDateTimePicker:()=>qv,DesktopDateTimePickerLayout:()=>Wv,DesktopTimePicker:()=>vv,DigitalClock:()=>Ld,DigitalClockItem:()=>Id,LocalizationProvider:()=>Dc,MobileDatePicker:()=>L_,MobileDateTimePicker:()=>Yv,MobileTimePicker:()=>yv,MonthCalendar:()=>Ph,MultiSectionDigitalClock:()=>Qd,PickerDay:()=>sf,PickersActionBar:()=>d_,PickersCalendarHeader:()=>rg,PickersFilledInput:()=>zp,PickersInput:()=>Gp,PickersInputBase:()=>bp,PickersLayout:()=>w_,PickersLayoutContentWrapper:()=>C_,PickersLayoutRoot:()=>S_,PickersOutlinedInput:()=>Mp,PickersShortcuts:()=>h_,PickersTextField:()=>Xp,StaticDatePicker:()=>U_,StaticDateTimePicker:()=>$v,StaticTimePicker:()=>Sv,TimeClock:()=>xd,TimeField:()=>pm,TimeIcon:()=>iu,TimePicker:()=>xv,TimePickerToolbar:()=>cv,Unstable_PickersSectionList:()=>rp,Unstable_PickersSectionListRoot:()=>Zf,Unstable_PickersSectionListSection:()=>Qf,Unstable_PickersSectionListSectionContent:()=>ep,Unstable_PickersSectionListSectionSeparator:()=>$f,YearCalendar:()=>Kh,clockClasses:()=>Vu,clockNumberClasses:()=>ed,clockPointerClasses:()=>Pu,dateCalendarClasses:()=>dg,datePickerToolbarClasses:()=>Ig,dateTimePickerTabsClasses:()=>wv,dateTimePickerToolbarClasses:()=>Mv,dayCalendarClasses:()=>sh,dayCalendarSkeletonClasses:()=>yg,digitalClockClasses:()=>Cd,extractValidationProps:()=>Fc,getDateCalendarUtilityClass:()=>ug,getDayCalendarSkeletonUtilityClass:()=>vg,getDigitalClockUtilityClass:()=>Sd,getMonthCalendarUtilityClass:()=>Ch,getMultiSectionDigitalClockUtilityClass:()=>Rd,getPickerDayUtilityClass:()=>$d,getPickersFilledInputUtilityClass:()=>Np,getPickersInputBaseUtilityClass:()=>Kf,getPickersInputUtilityClass:()=>Bp,getPickersOutlinedInputUtilityClass:()=>xp,getPickersSectionListUtilityClass:()=>Jf,getPickersTextFieldUtilityClass:()=>Wf,getTimeClockUtilityClass:()=>Cu,getYearCalendarUtilityClass:()=>Fh,monthCalendarClasses:()=>wh,multiSectionDigitalClockClasses:()=>zd,multiSectionDigitalClockSectionClasses:()=>Vd,pickerDayClasses:()=>ef,pickersCalendarHeaderClasses:()=>Jh,pickersFadeTransitionGroupClasses:()=>Jm,pickersFilledInputClasses:()=>Pp,pickersInputBaseClasses:()=>qf,pickersInputClasses:()=>Vp,pickersLayoutClasses:()=>s_,pickersOutlinedInputClasses:()=>Sp,pickersSectionListClasses:()=>Yf,pickersSlideTransitionClasses:()=>eh,pickersTextFieldClasses:()=>Gf,renderDateViewCalendar:()=>k_,renderDigitalClockTimeView:()=>dv,renderMultiSectionDigitalClockTimeView:()=>fv,renderTimeViewClock:()=>uv,timeClockClasses:()=>wu,timePickerToolbarClasses:()=>tv,unstable_useDateField:()=>Hf,unstable_useDateTimeField:()=>mm,unstable_useTimeField:()=>dm,useDateManager:()=>Af,useDateTimeManager:()=>Rf,useIsValidValue:()=>Ul,useParsedFormat:()=>Vl,usePickerActionsContext:()=>Yl,usePickerAdapter:()=>kc,usePickerContext:()=>zl,usePickerLayout:()=>y_,usePickerTranslations:()=>Ac,useSplitFieldProps:()=>Lc,useTimeManager:()=>Pf,useValidation:()=>pf,validateDate:()=>uf,validateDateTime:()=>ff,validateTime:()=>df,yearCalendarClasses:()=>Ih}),ty=t({ArrowDropDownIcon:()=>Wb,ArrowLeftIcon:()=>Gb,ArrowRightIcon:()=>Kb,CalendarIcon:()=>qb,ClearIcon:()=>Zb,ClockIcon:()=>Jb,DEFAULT_DESKTOP_MODE_MEDIA_QUERY:()=>ny,DateCalendar:()=>Dy,DateField:()=>xy,DatePicker:()=>Hy,DatePickerToolbar:()=>Uy,DateRangeIcon:()=>Yb,DateTimeField:()=>Ty,DateTimePicker:()=>eb,DateTimePickerTabs:()=>tb,DateTimePickerToolbar:()=>rb,DayCalendarSkeleton:()=>zy,DesktopDatePicker:()=>Gy,DesktopDateTimePicker:()=>ab,DesktopDateTimePickerLayout:()=>ob,DesktopTimePicker:()=>Zy,DigitalClock:()=>ly,DigitalClockItem:()=>uy,LocalizationProvider:()=>_y,MobileDatePicker:()=>Ky,MobileDateTimePicker:()=>sb,MobileTimePicker:()=>Qy,MonthCalendar:()=>Ny,MultiSectionDigitalClock:()=>py,PickerDay:()=>vy,PickersActionBar:()=>vb,PickersCalendarHeader:()=>xb,PickersFilledInput:()=>Ob,PickersInput:()=>Tb,PickersInputBase:()=>Pb,PickersLayout:()=>pb,PickersLayoutContentWrapper:()=>hb,PickersLayoutRoot:()=>mb,PickersOutlinedInput:()=>jb,PickersShortcuts:()=>yb,PickersTextField:()=>Sb,StaticDatePicker:()=>qy,StaticDateTimePicker:()=>cb,StaticTimePicker:()=>$y,TimeClock:()=>ry,TimeField:()=>Cy,TimeIcon:()=>Xb,TimePicker:()=>Jy,TimePickerToolbar:()=>Yy,Unstable_PickersSectionList:()=>Lb,Unstable_PickersSectionListRoot:()=>Rb,Unstable_PickersSectionListSection:()=>zb,Unstable_PickersSectionListSectionContent:()=>Vb,Unstable_PickersSectionListSectionSeparator:()=>Bb,YearCalendar:()=>Iy,clockClasses:()=>iy,clockNumberClasses:()=>ay,clockPointerClasses:()=>cy,dateCalendarClasses:()=>ky,datePickerToolbarClasses:()=>Wy,dateTimePickerTabsClasses:()=>nb,dateTimePickerToolbarClasses:()=>ib,dayCalendarClasses:()=>Ay,dayCalendarSkeletonClasses:()=>By,default:()=>px,digitalClockClasses:()=>dy,extractValidationProps:()=>cx,getDateCalendarUtilityClass:()=>Oy,getDayCalendarSkeletonUtilityClass:()=>Vy,getDigitalClockUtilityClass:()=>fy,getMonthCalendarUtilityClass:()=>Fy,getMultiSectionDigitalClockUtilityClass:()=>gy,getPickerDayUtilityClass:()=>yy,getPickersFilledInputUtilityClass:()=>kb,getPickersInputBaseUtilityClass:()=>Ib,getPickersInputUtilityClass:()=>Eb,getPickersOutlinedInputUtilityClass:()=>Mb,getPickersSectionListUtilityClass:()=>Hb,getPickersTextFieldUtilityClass:()=>wb,getTimeClockUtilityClass:()=>sy,getYearCalendarUtilityClass:()=>Ry,monthCalendarClasses:()=>Py,multiSectionDigitalClockClasses:()=>hy,multiSectionDigitalClockSectionClasses:()=>my,pickerDayClasses:()=>by,pickersCalendarHeaderClasses:()=>bb,pickersFadeTransitionGroupClasses:()=>jy,pickersFilledInputClasses:()=>Ab,pickersInputBaseClasses:()=>Fb,pickersInputClasses:()=>Db,pickersLayoutClasses:()=>_b,pickersOutlinedInputClasses:()=>Nb,pickersSectionListClasses:()=>Ub,pickersSlideTransitionClasses:()=>My,pickersTextFieldClasses:()=>Cb,renderDateViewCalendar:()=>lb,renderDigitalClockTimeView:()=>db,renderMultiSectionDigitalClockTimeView:()=>fb,renderTimeViewClock:()=>ub,timeClockClasses:()=>oy,timePickerToolbarClasses:()=>Xy,unstable_useDateField:()=>Sy,unstable_useDateTimeField:()=>Ey,unstable_useTimeField:()=>wy,useDateManager:()=>ux,useDateTimeManager:()=>fx,useIsValidValue:()=>rx,useParsedFormat:()=>ex,usePickerActionsContext:()=>nx,usePickerAdapter:()=>ix,usePickerContext:()=>tx,usePickerLayout:()=>gb,usePickerTranslations:()=>Qb,useSplitFieldProps:()=>$b,useTimeManager:()=>dx,useValidation:()=>lx,validateDate:()=>ax,validateDateTime:()=>sx,validateTime:()=>ox,yearCalendarClasses:()=>Ly}),Q=ey,ny=Q.DEFAULT_DESKTOP_MODE_MEDIA_QUERY,ry=Q.TimeClock,iy=Q.clockClasses,ay=Q.clockNumberClasses,oy=Q.timeClockClasses,sy=Q.getTimeClockUtilityClass,cy=Q.clockPointerClasses,ly=Q.DigitalClock,uy=Q.DigitalClockItem,dy=Q.digitalClockClasses,fy=Q.getDigitalClockUtilityClass,py=Q.MultiSectionDigitalClock,my=Q.multiSectionDigitalClockSectionClasses,hy=Q.multiSectionDigitalClockClasses,gy=Q.getMultiSectionDigitalClockUtilityClass,_y=Q.LocalizationProvider,vy=Q.PickerDay,yy=Q.getPickerDayUtilityClass,by=Q.pickerDayClasses,xy=Q.DateField,Sy=Q.unstable_useDateField,Cy=Q.TimeField,wy=Q.unstable_useTimeField,Ty=Q.DateTimeField,Ey=Q.unstable_useDateTimeField,Dy=Q.DateCalendar,Oy=Q.getDateCalendarUtilityClass,ky=Q.dateCalendarClasses,Ay=Q.dayCalendarClasses,jy=Q.pickersFadeTransitionGroupClasses,My=Q.pickersSlideTransitionClasses,Ny=Q.MonthCalendar,Py=Q.monthCalendarClasses,Fy=Q.getMonthCalendarUtilityClass,Iy=Q.YearCalendar,Ly=Q.yearCalendarClasses,Ry=Q.getYearCalendarUtilityClass,zy=Q.DayCalendarSkeleton,By=Q.dayCalendarSkeletonClasses,Vy=Q.getDayCalendarSkeletonUtilityClass,Hy=Q.DatePicker,Uy=Q.DatePickerToolbar,Wy=Q.datePickerToolbarClasses,Gy=Q.DesktopDatePicker,Ky=Q.MobileDatePicker,qy=Q.StaticDatePicker,Jy=Q.TimePicker,Yy=Q.TimePickerToolbar,Xy=Q.timePickerToolbarClasses,Zy=Q.DesktopTimePicker,Qy=Q.MobileTimePicker,$y=Q.StaticTimePicker,eb=Q.DateTimePicker,tb=Q.DateTimePickerTabs,nb=Q.dateTimePickerTabsClasses,rb=Q.DateTimePickerToolbar,ib=Q.dateTimePickerToolbarClasses,ab=Q.DesktopDateTimePicker,ob=Q.DesktopDateTimePickerLayout,sb=Q.MobileDateTimePicker,cb=Q.StaticDateTimePicker,lb=Q.renderDateViewCalendar,ub=Q.renderTimeViewClock,db=Q.renderDigitalClockTimeView,fb=Q.renderMultiSectionDigitalClockTimeView,pb=Q.PickersLayout,mb=Q.PickersLayoutRoot,hb=Q.PickersLayoutContentWrapper,gb=Q.usePickerLayout,_b=Q.pickersLayoutClasses,vb=Q.PickersActionBar,yb=Q.PickersShortcuts,bb=Q.pickersCalendarHeaderClasses,xb=Q.PickersCalendarHeader,Sb=Q.PickersTextField,Cb=Q.pickersTextFieldClasses,wb=Q.getPickersTextFieldUtilityClass,Tb=Q.PickersInput,Eb=Q.getPickersInputUtilityClass,Db=Q.pickersInputClasses,Ob=Q.PickersFilledInput,kb=Q.getPickersFilledInputUtilityClass,Ab=Q.pickersFilledInputClasses,jb=Q.PickersOutlinedInput,Mb=Q.getPickersOutlinedInputUtilityClass,Nb=Q.pickersOutlinedInputClasses,Pb=Q.PickersInputBase,Fb=Q.pickersInputBaseClasses,Ib=Q.getPickersInputBaseUtilityClass,Lb=Q.Unstable_PickersSectionList,Rb=Q.Unstable_PickersSectionListRoot,zb=Q.Unstable_PickersSectionListSection,Bb=Q.Unstable_PickersSectionListSectionSeparator,Vb=Q.Unstable_PickersSectionListSectionContent,Hb=Q.getPickersSectionListUtilityClass,Ub=Q.pickersSectionListClasses,Wb=Q.ArrowDropDownIcon,Gb=Q.ArrowLeftIcon,Kb=Q.ArrowRightIcon,qb=Q.CalendarIcon,Jb=Q.ClockIcon,Yb=Q.DateRangeIcon,Xb=Q.TimeIcon,Zb=Q.ClearIcon,Qb=Q.usePickerTranslations,$b=Q.useSplitFieldProps,ex=Q.useParsedFormat,tx=Q.usePickerContext,nx=Q.usePickerActionsContext,rx=Q.useIsValidValue,ix=Q.usePickerAdapter,ax=Q.validateDate,ox=Q.validateTime,sx=Q.validateDateTime,cx=Q.extractValidationProps,lx=Q.useValidation,ux=Q.useDateManager,dx=Q.useTimeManager,fx=Q.useDateTimeManager,px=Reflect.get(ey,`default`)??ey,mx=`__mf_module_cache__`;globalThis[mx]||={share:{},remote:{}},globalThis[mx].share||={},globalThis[mx].remote||={};var hx=globalThis[mx];for(let e of Object.keys(hx.share))if(e.startsWith(`default:`)){let t=e.slice(8);hx.share[t]===void 0&&(hx.share[t]=hx.share[e])}else if(!e.includes(`:`)){let t=`default:`+e;hx.share[t]===void 0&&(hx.share[t]=hx.share[e])}var gx=(e,t)=>{let n=e[t.canonical];if(n!==void 0)return n;let r=t.aliases||[];for(let n of r){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let r=e[n];if(r!==void 0)return e[t.canonical]=r,r}},_x=Symbol.for(`module-federation.shared-cache-listeners`),vx=e=>{let t=e[_x];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,_x,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},yx=(e,t,n)=>{let r=vx(e);(r[t.canonical]||=new Set).add(n)},bx=Symbol.for(`module-federation.shared-cache-owners`),xx=e=>{let t=e[bx];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,bx,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},Sx=(e,t,n,r)=>{var i;e[t.canonical]=n;let a=t.aliases||[];for(let t of a)Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0});let o=e[bx];r===void 0?o&&delete o[t.canonical]:xx(e)[t.canonical]=r;let s=(i=e[_x])==null?void 0:i[t.canonical];if(s)for(let e of s)e(n);return n},Cx=e=>{let t=(()=>{let t=e;for(let e=0;e<5;e++){let e=t==null?void 0:t.default;if(!e||typeof e!=`object`)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})();return t&&Object.getPrototypeOf(t)===null?Object.assign({},t):t},wx=gx(hx.share,{canonical:`default:@mui/x-date-pickers`,aliases:[`@mui/x-date-pickers`]});wx===void 0&&(wx=Cx(ty),Sx(hx.share,{canonical:`default:@mui/x-date-pickers`,aliases:[`@mui/x-date-pickers`]},wx,`ConfigCustomJavascriptSet`));var Tx,Ex,Dx,Ox=e=>{e.DEFAULT_DESKTOP_MODE_MEDIA_QUERY,e.TimeClock,e.clockClasses,e.clockNumberClasses,e.timeClockClasses,e.getTimeClockUtilityClass,e.clockPointerClasses,e.DigitalClock,e.DigitalClockItem,e.digitalClockClasses,e.getDigitalClockUtilityClass,e.MultiSectionDigitalClock,e.multiSectionDigitalClockSectionClasses,e.multiSectionDigitalClockClasses,e.getMultiSectionDigitalClockUtilityClass,Tx=e.LocalizationProvider,e.PickerDay,e.getPickerDayUtilityClass,e.pickerDayClasses,e.DateField,e.unstable_useDateField,e.TimeField,e.unstable_useTimeField,e.DateTimeField,e.unstable_useDateTimeField,e.DateCalendar,e.getDateCalendarUtilityClass,e.dateCalendarClasses,e.dayCalendarClasses,e.pickersFadeTransitionGroupClasses,e.pickersSlideTransitionClasses,e.MonthCalendar,e.monthCalendarClasses,e.getMonthCalendarUtilityClass,e.YearCalendar,e.yearCalendarClasses,e.getYearCalendarUtilityClass,e.DayCalendarSkeleton,e.dayCalendarSkeletonClasses,e.getDayCalendarSkeletonUtilityClass,Ex=e.DatePicker,e.DatePickerToolbar,e.datePickerToolbarClasses,e.DesktopDatePicker,e.MobileDatePicker,e.StaticDatePicker,Dx=e.TimePicker,e.TimePickerToolbar,e.timePickerToolbarClasses,e.DesktopTimePicker,e.MobileTimePicker,e.StaticTimePicker,e.DateTimePicker,e.DateTimePickerTabs,e.dateTimePickerTabsClasses,e.DateTimePickerToolbar,e.dateTimePickerToolbarClasses,e.DesktopDateTimePicker,e.DesktopDateTimePickerLayout,e.MobileDateTimePicker,e.StaticDateTimePicker,e.renderDateViewCalendar,e.renderTimeViewClock,e.renderDigitalClockTimeView,e.renderMultiSectionDigitalClockTimeView,e.PickersLayout,e.PickersLayoutRoot,e.PickersLayoutContentWrapper,e.usePickerLayout,e.pickersLayoutClasses,e.PickersActionBar,e.PickersShortcuts,e.pickersCalendarHeaderClasses,e.PickersCalendarHeader,e.PickersTextField,e.pickersTextFieldClasses,e.getPickersTextFieldUtilityClass,e.PickersInput,e.getPickersInputUtilityClass,e.pickersInputClasses,e.PickersFilledInput,e.getPickersFilledInputUtilityClass,e.pickersFilledInputClasses,e.PickersOutlinedInput,e.getPickersOutlinedInputUtilityClass,e.pickersOutlinedInputClasses,e.PickersInputBase,e.pickersInputBaseClasses,e.getPickersInputBaseUtilityClass,e.Unstable_PickersSectionList,e.Unstable_PickersSectionListRoot,e.Unstable_PickersSectionListSection,e.Unstable_PickersSectionListSectionSeparator,e.Unstable_PickersSectionListSectionContent,e.getPickersSectionListUtilityClass,e.pickersSectionListClasses,e.ArrowDropDownIcon,e.ArrowLeftIcon,e.ArrowRightIcon,e.CalendarIcon,e.ClockIcon,e.DateRangeIcon,e.TimeIcon,e.ClearIcon,e.usePickerTranslations,e.useSplitFieldProps,e.useParsedFormat,e.usePickerContext,e.usePickerActionsContext,e.useIsValidValue,e.usePickerAdapter,e.validateDate,e.validateTime,e.validateDateTime,e.extractValidationProps,e.useValidation,e.useDateManager,e.useTimeManager,e.useDateTimeManager,(()=>{let t=e;for(let e=0;e<5;e++){let e=t==null?void 0:t.default;if(!e||typeof e!=`object`)return e??t;t=e}return t})()};yx(hx.share,{canonical:`default:@mui/x-date-pickers`,aliases:[`@mui/x-date-pickers`]},Ox),Ox(wx),g();var kx=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);if(e)try{let t=new Date(e);this.setState({value:t})}catch{}}renderItem(e,t){return _.createElement(Ex,{sx:t=>({width:`100%`,borderBottom:`1px solid ${e?`#F00`:t.palette.text.primary}`,"& fieldset":{display:`none`},"& input":{padding:`${t.spacing(1.5)} 0 4px 0`},"& .MuiInputAdornment-root":{marginLeft:0,marginTop:1},"& label":{transform:`translate(0px, -9px) scale(0.75)`}}),format:this.props.oContext.systemConfig.dateFormat.toLowerCase().replace(`mm`,`MM`),disabled:!!t,value:this.state.value||null,onChange:e=>this.setState({value:e},()=>{try{if(this.props.attr){let e=this.state.value.toISOString();this.onChange(this.props.attr,e).catch(e=>console.warn(`Error saving value for ${this.props.attr}:`,e))}}catch{}}),label:this.getText(this.props.schema.label)})}};g();var Ax=class extends X{renderItem(){if(!this.props.schema)return null;if(this.props.oContext.DeviceManager){let e=this.props.oContext.DeviceManager;return _.createElement(e,{uploadImagesToInstance:`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,title:this.getText(this.props.schema.label),socket:this.props.oContext.socket,selectedInstance:`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,themeName:this.props.themeName,theme:this.props.oContext.theme,themeType:this.props.oContext.themeType,isFloatComma:this.props.oContext.isFloatComma,dateFormat:this.props.oContext.dateFormat,smallCards:this.props.schema.smallCards})}return _.createElement(`div`,null,`DeviceManager not found`)}};g();var jx={fullWidth:{width:`100%`},fullWidthOneButton:{width:`calc(100% - 42px)`},fullWidthTwoButtons:{width:`calc(100% - 84px)`},fullWidthThreeButtons:{width:`calc(100% - 126x)`},dropZone:{width:`100%`,height:`100%`,position:`absolute`},dropZoneEmpty:{},image:{objectFit:`contain`,margin:`auto`,display:`flex`,width:`100%`,height:`100%`},uploadDiv:{position:`relative`,width:`100%`},uploadDivDragging:{opacity:1,background:`rgba(128,255,128,0.1)`},uploadCenterDiv:{margin:5,border:`3px dashed grey`,borderRadius:5,width:`100%`,height:`100%`,position:`absolute`,display:`flex`},uploadCenterIcon:{paddingTop:10,width:48,height:48},uploadCenterText:{fontSize:16},uploadCenterTextAndIcon:{textAlign:`center`,position:`absolute`,top:0,bottom:0,left:0,right:0,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`},disabledOpacity:{opacity:.3,cursor:`default`},error:{border:`2px solid red`},deleteButton:{},selectedImage:{height:40,width:40,display:`inline-block`,marginRight:8}},Mx=[`jpg`,`jpeg`,`svg`,`png`,`webp`,`gif`,`apng`,`avif`,`webp`],Nx=[`mp3`,`ogg`,`wav`,`aac`],Px=[`avi`,`mp4`,`mov`],Fx=[`txt`,`log`,`html`,`htm`],Ix=[`json`,`js`,`ts`],Lx=class e extends X{constructor(e){super(e),K(this,`dropzoneRef`,void 0),K(this,`imagePrefix`,void 0),K(this,`objectID`,void 0),K(this,`path`,void 0),K(this,`onFolderChanged`,(e,t)=>{this.path&&t.startsWith(this.path)&&this.updateFiles().catch(e=>console.error(`Cannot update files: ${e}`))}),this.state={...this.state,deleteFile:``},this.dropzoneRef=_.createRef(),this.imagePrefix=this.props.oContext.imagePrefix??`./files`}async componentDidMount(){await super.componentDidMount(),this.objectID=(this.props.schema.objectID||`0_userdata.0`).replace(`%INSTANCE%`,(this.props.oContext.instance||0).toString()),this.path=this.props.schema.upload||``,this.path&&(this.path===`/`?this.path=``:this.path.endsWith(`/`)||(this.path=`${this.path}/`)),this.updateFiles().then(()=>{let e=X.getValue(this.props.data,this.props.attr);this.setState({value:e}),this.props.oContext.socket.subscribeFiles(this.objectID,`${this.path}/*`,this.onFolderChanged).catch(e=>console.error(`Cannot subscribe: ${e}`))})}componentWillUnmount(){this.props.oContext.socket.subscribeFiles(this.objectID,`${this.path}/*`,this.onFolderChanged).catch(e=>console.error(`Cannot subscribe: ${e}`)),super.componentWillUnmount()}async updateFiles(){let e=await this.readFiles(this.props.schema.pattern);await new Promise(t=>this.setState({files:e},t))}async readFolder(e,t,n){try{let i=await this.props.oContext.socket.readDir(this.objectID,e.replace(/^\//,``));for(let a=0;a<i.length;a++){let o=i[a];if(o.isDir)await this.readFolder(`${e+o.file}/`,t,n);else{let i=!1;if(i=n===`*.*`&&o.file.includes(`.`)||!n||n===`*`||n===`.*`&&o.file.startsWith(`.`)?!0:RegExp(`^${n.replace(/\./g,`\\.`).replace(/\*/g,`.*`)}$`).test(o.file),i){var r;t.push({name:e+o.file,size:(r=o.stats)!=null&&r.size?Zt.formatBytes(o.stats.size):`--`})}}}}catch(t){console.error(`Cannot read "${e}": ${t}`)}return t}async readFiles(e){let t=[];e||=this.props.schema.pattern,e||=`**/*.*`;let n,r=e.lastIndexOf(`/`);if(n=r===-1?e:e.substring(r+1),e.startsWith(`**`))await this.readFolder(`/`,t,n);else{let r=e.lastIndexOf(`/`);if(r===-1)await this.readFolder(`/`,t,n);else{let i=e.substring(0,r+1);await this.readFolder(i,t,n)}}return t}onDrop(e){let t=e[0],n=new FileReader,r=this.props.schema.maxSize||2097152;n.onabort=()=>console.log(`file reading was aborted`),n.onerror=()=>console.log(`file reading has failed`),n.onload=()=>{if(t.size>r){window.alert(J.t(`jc_File is too big. Max %sk allowed. Try use SVG.`,Math.round(r/1024)));return}let e=n.result;if(e===null){console.error(`Cannot read file ${t.name}`);return}this.props.oContext.socket.writeFile64(this.objectID,this.path+t.name,e).then(()=>this.updateFiles()).then(()=>this.setState({value:this.path+t.name},()=>this.onChange(this.props.attr,this.path+t.name))).catch(e=>window.alert(`Cannot upload file: ${e}`))},n.readAsArrayBuffer(t)}renderDeleteDialog(){return this.state.deleteFile?_.createElement(bn,{title:J.t(`jc_Are you sure?`),text:J.t(`jc_File will be deleted`),ok:J.t(`jc_Delete`),cancel:J.t(`jc_Cancel`),onClose:e=>{let t=this.state.deleteFile;this.setState({deleteFile:``},()=>{e&&this.props.oContext.socket.deleteFile(this.objectID,t).then(()=>this.updateFiles()).catch(e=>window.alert(`Cannot delete file: ${e}`))})}}):null}static base64ToArrayBuffer(e){let t=window.atob(e),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.charCodeAt(e);return r.buffer}loadFile(){return this.props.oContext.socket.readFile(this.objectID,this.state.value,!0)}play(){this.loadFile().then(t=>{if(typeof AudioContext<`u`){let n=new AudioContext,r=e.base64ToArrayBuffer(t.file);n.decodeAudioData(r,e=>{let t=n.createBufferSource();t.buffer=e,t.connect(n.destination),t.start(0)},e=>window.alert(`Cannot play: ${e.message}`))}})}getFileIcon(e){return e!=null&&e.extension?Mx.includes(e.extension)?_.createElement(`div`,{style:{...jx.selectedImage,backgroundImage:`url(${this.imagePrefix}/${this.objectID}/${e.value})`,backgroundSize:`contain`,backgroundRepeat:`no-repeat`}}):Nx.includes(e.extension)?_.createElement(zt,null):Fx.includes(e.extension)?_.createElement(Xn,null):Px.includes(e.extension)?_.createElement(Xe,null):Ix.includes(e.extension)?_.createElement(ze,null):null:null}renderItem(e,t){if(!this.state.files)return null;let n=[];this.props.schema.withFolder||this.state.files.forEach(e=>{let t=e.name.lastIndexOf(`/`);if(t===-1)n.includes(`/`)||n.push(`/`);else{let r=e.name.substring(0,t+1);n.includes(r)||n.push(r)}});let r=this.state.files.map(e=>({value:e.name,label:!this.props.schema.withFolder&&n.length===1?`${e.name.substring(n[0].length)}`:`${e.name}${this.props.schema.noSize?``:`(${e.size})`}`,extension:e.name.toLowerCase().split(`.`).pop()}));this.props.schema.noNone||r.unshift({label:J.t(`jc_none`),value:``});let i=r.find(e=>e.value===this.state.value),a=0;this.props.schema.upload&&a++,this.props.schema.refresh&&a++;let o=this.state.value&&(this.state.value.endsWith(`.mp3`)||this.state.value.endsWith(`.ogg`)||this.state.value.endsWith(`.wav`));o&&a++;let s=_.createElement(`div`,{style:jx.fullWidth},_.createElement(Wt,{variant:`standard`,style:{width:`calc(100% - ${a*42}px)`}},this.props.schema.label?_.createElement(rr,null,this.getText(this.props.schema.label)):null,_.createElement(Me,{variant:`standard`,error:!!e,disabled:!!t,value:this.state.value||`_`,renderValue:()=>_.createElement(_.Fragment,null,this.getFileIcon(i),_.createElement(`span`,null,(i==null?void 0:i.label)||``)),onChange:e=>{this.setState({value:e.target.value===`_`?``:e.target.value},()=>this.onChange(this.props.attr,this.state.value))}},r.map(e=>_.createElement(z,{key:e.value,value:e.value},_.createElement(L,null,this.getFileIcon(e)),_.createElement(er,null,e.label),this.props.schema.delete&&e.value?_.createElement(Zn,{style:jx.deleteButton,size:`small`,onClick:t=>{t.stopPropagation(),this.setState({deleteFile:e.value})}},_.createElement(me,null)):null))),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null),this.props.schema.refresh&&_.createElement(Zn,{onClick:()=>this.updateFiles()},_.createElement(ar,null)),this.props.schema.upload&&_.createElement(Zn,{onClick:()=>{var e;return(e=this.dropzoneRef.current)==null?void 0:e.open()}},_.createElement(nr,null)),o&&_.createElement(Zn,{style:{color:`#00FF00`},onClick:()=>this.play()},_.createElement(Xt,null)));if(!this.props.schema.upload)return _.createElement(_.Fragment,null,s,this.renderDeleteDialog());let c={"*/*":[]};if(this.props.schema.fileTypes===`image`?c={"image/*":[`.png`,`.jpg`,`.svg`,`.gif`,`.apng`,`.avif`,`.webp`]}:this.props.schema.fileTypes===`audio`?c={"audio/*":[`.mp3`,`.ogg`,`.wav`,`.mp4`]}:this.props.schema.fileTypes===`text`&&(c={"text/plain":[`.txt`]}),this.props.schema.pattern){let e=(this.props.schema.pattern.split(`/`).pop()||``).toLowerCase().replace(/.*\./,``);c=e===`png`||e===`jpg`||e===`svg`||e===`gif`||e===`apng`||e===`avif`||e===`webp`?{"image/*":[`.png`,`.jpg`,`.svg`,`.gif`,`.apng`,`.avif`,`.webp`]}:e===`mp3`||e===`ogg`||e===`wav`?{"audio/*":[`.mp3`,`.ogg`,`.wav`,`.mp4`]}:e===`ics`?{"text/calendar":[`.ics`]}:e===`txt`?{"text/plain":[`.txt`]}:e===`pem`?{"text/plain":[`.pem`]}:{"*/*":[`.${e}`]}}return _.createElement(or,{ref:this.dropzoneRef,multiple:!1,accept:c,noKeyboard:!0,noClick:!0,maxSize:this.props.schema.maxSize||2097152,onDragEnter:()=>{this.setState({uploadFile:`dragging`})},onDragLeave:()=>this.setState({uploadFile:!0}),onDrop:(e,t)=>{if(this.setState({uploadFile:!1}),e.length)this.onDrop(e);else{var n;window.alert((t==null||(n=t[0])==null||(n=n.errors)==null||(n=n[0])==null?void 0:n.message)||J.t(`jc_Cannot upload`))}}},({getRootProps:e,getInputProps:n})=>_.createElement(`div`,{style:{...jx.uploadDiv,...this.state.uploadFile===`dragging`?jx.uploadDivDragging:void 0,...t?jx.disabledOpacity:void 0},...e()},_.createElement(`input`,{...n()}),this.state.uploadFile===`dragging`?_.createElement(`div`,{style:{...jx.uploadCenterDiv,...this.state.uploadError?jx.error:void 0}},_.createElement(`div`,{style:jx.uploadCenterTextAndIcon},_.createElement(nr,{style:jx.uploadCenterIcon}),_.createElement(`div`,{style:jx.uploadCenterText},this.state.uploadFile===`dragging`?J.t(`jc_Drop file here`):J.t(`jc_Place your files here or click here to open the browse dialog`)))):null,s,this.renderDeleteDialog()))}};g();var Rx={fullWidth:{width:`100%`},fullWidthOneButton:{width:`calc(100% - 69px)`,marginRight:4},fullWidthIcon:{width:`calc(100% - 119px)`,marginRight:4},selectedImage:{height:40,width:40,display:`inline-block`,marginRight:8}},zx=[`jpg`,`jpeg`,`svg`,`png`,`webp`,`gif`,`apng`,`avif`,`webp`],Bx=[`mp3`,`ogg`,`wav`,`aac`],Vx=[`avi`,`mp4`,`mov`],Hx=[`txt`,`log`,`html`,`htm`],Ux=[`json`,`js`,`ts`],Wx=class extends X{constructor(...e){super(...e),K(this,`imagePrefix`,`../..`)}async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);this.imagePrefix=this.props.oContext.imagePrefix??`./files`,this.setState({value:e??``})}static getDerivedStateFromProps(e,t){let n=X.getValue(e.data,e.attr);return n==null||n.toString().trim()!==(t.value||``).toString().trim()?{value:n??``}:null}loadFile(){let e=this.state.value.indexOf(`/`);if(e!==-1){let t=this.state.value.substring(0,e),n=this.state.value.substring(e+1);return this.props.oContext.socket.readFile(t,n,!0)}return Promise.resolve(null)}play(){this.loadFile().then(e=>{if(typeof AudioContext<`u`&&e!=null&&e.file){let t=new AudioContext,n=Lx.base64ToArrayBuffer(e.file);t.decodeAudioData(n,e=>{let n=t.createBufferSource();n.buffer=e,n.connect(t.destination),n.start(0)},e=>window.alert(`Cannot play: ${e.message}`))}})}getIcon(){let e=this.state.value.split(`.`).pop().toLowerCase();return zx.includes(e)?_.createElement(`div`,{style:{...Rx.selectedImage,backgroundImage:`url(${this.imagePrefix}/${this.state.value})`,backgroundSize:`contain`,backgroundRepeat:`no-repeat`}}):Bx.includes(e)?_.createElement(Zn,{style:{color:`#00FF00`},onClick:()=>this.play()},_.createElement(Xt,null)):Hx.includes(e)?_.createElement(Xn,null):Vx.includes(e)?_.createElement(Xe,null):Ux.includes(e)?_.createElement(ze,null):null}renderFileBrowser(){return this.state.showFileBrowser?_.createElement(zn,{imagePrefix:this.props.oContext.imagePrefix,socket:this.props.oContext.socket,selected:this.state.value,onClose:()=>this.setState({showFileBrowser:!1}),onOk:e=>{let t=Array.isArray(e)?e[0]:e;this.setState({value:t},()=>this.props.attr&&this.onChange(this.props.attr,this.props.schema.trim===!1?t:(t||``).trim()))},selectOnlyFolders:this.props.schema.selectOnlyFolders,allowUpload:this.props.schema.allowUpload,allowDownload:this.props.schema.allowDownload,allowCreateFolder:this.props.schema.allowCreateFolder,allowView:this.props.schema.allowView,showToolbar:this.props.schema.showToolbar,limitPath:this.props.schema.limitPath,theme:this.props.oContext.theme}):null}renderItem(e,t){let n=this.getIcon();return _.createElement(`div`,{style:Rx.fullWidth},n,_.createElement(ot,{variant:`standard`,style:n?Rx.fullWidthIcon:Rx.fullWidthOneButton,value:this.state.value??``,error:!!e,disabled:!!t,slotProps:{htmlInput:{maxLength:this.props.schema.maxLength||this.props.schema.max||void 0,readOnly:!!this.props.schema.disableEdit}},onChange:e=>{let t=e.target.value;this.setState({value:t},()=>this.props.attr&&this.onChange(this.props.attr,this.props.schema.trim===!1?t:(t||``).trim()))},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)}),_.createElement(xt,{disabled:t,variant:`outlined`,onClick:()=>this.setState({showFileBrowser:!0})},`...`),this.renderFileBrowser())}};g();var Gx=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);this.props.oContext.socket.getEnums(`functions`).then(t=>{let n=Object.keys(t).map(e=>({value:this.props.schema.short?e.replace(`enum.functions.`,``):e,label:this.getText(t[e].common.name),obj:t[e]}));this.props.schema.allowDeactivate!==!1&&n.unshift({label:J.t(X.NONE_LABEL),value:X.NONE_VALUE}),this.setState({value:e,selectOptions:n})})}renderItem(e,t){if(!this.state.selectOptions)return null;let n=this.state.selectOptions.find(e=>e.value===this.state.value);return _.createElement(Wt,{variant:`standard`,fullWidth:!0},this.props.schema.label?_.createElement(rr,null,this.getText(this.props.schema.label)):null,_.createElement(Me,{variant:`standard`,error:!!e,disabled:!!t,value:this.state.value||`_`,renderValue:()=>n?n.obj?_.createElement(On,{value:n.obj,themeType:this.props.oContext.themeType,lang:J.getLanguage()}):n.label:``,onChange:e=>{this.setState({value:e.target.value===`_`?``:e.target.value},()=>this.props.attr&&this.onChange(this.props.attr,this.state.value))}},this.state.selectOptions.map(e=>_.createElement(z,{key:e.value,value:e.value,style:e.value===X.DIFFERENT_VALUE?{opacity:.5}:{}},e.obj?_.createElement(On,{value:e.obj,themeType:this.props.oContext.themeType,lang:J.getLanguage()}):e.label))),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var Kx=class extends X{constructor(...e){super(...e),K(this,`iframeRef`,_.createRef()),K(this,`observer`,null)}async componentDidMount(){await super.componentDidMount(),this.props.schema.reloadOnShow&&(this.observer=new IntersectionObserver(([e])=>{if(e.isIntersecting&&this.state.isVisible===!1&&this.iframeRef.current){let e=this.iframeRef.current.src;this.iframeRef.current.src=``,setTimeout(()=>{this.iframeRef.current&&(this.iframeRef.current.src=e)},0)}this.setState({isVisible:e.isIntersecting})}),this.iframeRef.current&&this.observer.observe(this.iframeRef.current))}componentWillUnmount(){var e,t;(e=super.componentWillUnmount)==null||e.call(this),(t=this.observer)==null||t.disconnect()}renderItem(e,t){let n=this.props.schema.url||X.getValue(this.props.data,this.props.attr);return _.createElement(`div`,{style:{position:`relative`,width:`100%`,height:`100%`}},_.createElement(`iframe`,{style:{width:`100%`,height:`100%`,borderWidth:this.props.schema.frameBorder??0,...this.props.schema.innerStyle,border:e?`1px solid red`:void 0},ref:this.iframeRef,src:n,allowFullScreen:this.props.schema.allowFullscreen??!1,sandbox:this.props.schema.sandbox,loading:this.props.schema.lazyLoad??`lazy`}),t&&_.createElement(`div`,{style:{position:`absolute`,top:0,left:0,width:`100%`,height:`100%`,backgroundColor:`rgba(255, 255, 255, 0.3)`,cursor:`not-allowed`,zIndex:1}}))}};g();var qx=class extends X{constructor(...e){super(...e),K(this,`initialized`,!1),K(this,`localContext`,void 0),K(this,`iframeRef`,_.createRef()),K(this,`observer`,null)}async componentDidMount(){await super.componentDidMount(),this.askInstance().catch(e=>console.error(e)),this.props.schema.reloadOnShow&&(this.observer=new IntersectionObserver(([e])=>{if(e.isIntersecting&&this.state.isVisible===!1&&this.iframeRef.current){let e=this.iframeRef.current.src;this.iframeRef.current.src=``,setTimeout(()=>{this.iframeRef.current&&(this.iframeRef.current.src=e)},0)}this.setState({isVisible:e.isIntersecting})}),this.iframeRef.current&&this.observer.observe(this.iframeRef.current))}async askInstance(){if(this.props.alive){let e=this.props.schema.data;if(e===void 0&&this.props.schema.jsonData){let t=await this.getPatternAsync(this.props.schema.jsonData,null,!0);if(t)try{e=JSON.parse(t)}catch{console.error(`Cannot parse json data: ${JSON.stringify(e)}`)}}e??=null;let t=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(t!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){let e=await this.props.oContext.socket.getState(`system.adapter.${t}.alive`);if(!(e!=null&&e.val)){window.alert(J.t(`jc_Instance %s is not alive`,t));return}}this.props.oContext.socket.sendTo(t,this.props.schema.command||`send`,e).then(e=>this.setState({url:e||``}))}}getContext(){let e={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(t=>e[t]=X.getValue(this.props.data,t)),JSON.stringify(e)}renderItem(e,t){if(this.props.alive){let e=this.getContext();(e!==this.localContext||!this.initialized)&&(this.localContext=e,setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}return this.state.url?_.createElement(`div`,{style:{position:`relative`,width:`100%`,height:`100%`}},_.createElement(`iframe`,{style:{width:`100%`,height:`100%`,borderWidth:this.props.schema.frameBorder??0,...this.props.schema.innerStyle,border:e?`1px solid red`:void 0},ref:this.iframeRef,src:this.state.url,allowFullScreen:this.props.schema.allowFullscreen??!1,sandbox:this.props.schema.sandbox,loading:this.props.schema.lazyLoad??`lazy`}),t&&_.createElement(`div`,{style:{position:`absolute`,top:0,left:0,width:`100%`,height:`100%`,backgroundColor:`rgba(255, 255, 255, 0.3)`,cursor:`not-allowed`,zIndex:1}})):null}};g();var Jx=class extends X{async componentDidMount(){var e;await super.componentDidMount(),(e=this.props.common)!=null&&e.host&&this.props.oContext.socket.getHostByIp(this.props.common.host).then(e=>{this.props.schema.listenOnAllPorts||(e=e.filter(e=>e.address!==`0.0.0.0`&&e.address!==`::`)),this.props.schema.onlyIp4?e=e.filter(e=>e.family===`ipv4`):this.props.schema.onlyIp6&&(e=e.filter(e=>e.family===`ipv6`)),this.props.schema.noInternal&&(e=e.filter(e=>!e.internal)),e.forEach(e=>{e.address===`0.0.0.0`?e.name=`[IPv4] 0.0.0.0 - ${J.t(`jc_Listen on all IPs`)}`:e.address===`::`&&(e.name=`[IPv6] :: - ${J.t(`jc_Listen on all IPs`)}`)}),this.setState({ips:e})}).catch(e=>console.error(e))}renderItem(e,t){var n,r;let i=X.getValue(this.props.data,this.props.attr),a=(n=this.state.ips)==null?void 0:n.find(e=>e.address===i);return _.createElement(Wt,{fullWidth:!0,variant:`standard`},this.state.ips&&this.props.schema.label?_.createElement(rr,null,this.getText(this.props.schema.label)):null,this.state.ips?_.createElement(Me,{variant:`standard`,error:!!e,disabled:!!t,value:i,renderValue:e=>(a==null?void 0:a.name)||e,onChange:e=>this.props.attr&&this.onChange(this.props.attr,e.target.value)},(r=this.state.ips)==null?void 0:r.map((e,t)=>_.createElement(z,{key:t,value:e.address},e.name))):_.createElement(ot,{fullWidth:!0,variant:`standard`,error:!!e,disabled:!!t,value:i,onChange:e=>this.props.attr&&this.onChange(this.props.attr,e.target.value),label:this.getText(this.props.schema.label)}),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var Yx=class extends X{constructor(...e){super(...e),K(this,`initialized`,!1),K(this,`localContext`,void 0)}async componentDidMount(){await super.componentDidMount(),this.props.schema.sendFirstByClick||this.askInstance().catch(e=>console.error(e))}async askInstance(){if(this.props.alive){let e=this.props.schema.data;if(e===void 0&&this.props.schema.jsonData){let t=await this.getPatternAsync(this.props.schema.jsonData,null,!0);if(t)try{e=JSON.parse(t)}catch{console.error(`Cannot parse json data: ${JSON.stringify(e)}`)}}e??=null;let t=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(t!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){let e=await this.props.oContext.socket.getState(`system.adapter.${t}.alive`);if(!(e!=null&&e.val)){window.alert(J.t(`jc_Instance %s is not alive`,t));return}}this.setState({loading:!0},()=>this.props.oContext.socket.sendTo(t,this.props.schema.command||`send`,e).then(e=>this.setState({image:e||``})))}}getContext(){let e={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(t=>e[t]=X.getValue(this.props.data,t)),JSON.stringify(e)}renderItem(){if(this.props.alive){let e=this.getContext();(e!==this.localContext||!this.initialized)&&(this.localContext=e,(!this.props.schema.sendFirstByClick||this.state.image!==void 0)&&setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}return!this.state.image&&this.props.schema.sendFirstByClick?_.createElement(`div`,{style:{width:this.props.schema.width||`100%`,height:this.props.schema.height,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:this.state.loading?`default`:`pointer`},onClick:()=>!this.state.loading&&this.askInstance()},this.state.loading?_.createElement(Wn,null):typeof this.props.schema.sendFirstByClick==`boolean`?J.t(`jc_Click to show`):this.getText(this.props.schema.sendFirstByClick,this.props.schema.noTranslation)):this.state.image===void 0?null:_.createElement(Mt,{title:this.getText(this.props.schema.tooltip),src:this.state.image,style:{width:this.props.schema.width||`100%`,height:this.props.schema.height}})}};g();var Xx=class extends X{constructor(e){super(e),K(this,`index`,void 0),this.index=Date.now()}async componentDidMount(){if(await super.componentDidMount(),this.props.schema.base64){let e=X.getValue(this.props.data,this.props.attr);this.setState({value:e})}else this.props.attr&&this.props.oContext.socket.fileExists(`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,this.props.attr).then(e=>e&&this.loadImage())}_getUrl(e){e&&(this.index=Date.now());let t=`files/${this.props.oContext.adapterName}.${this.props.oContext.instance}/${this.props.attr}?t=${this.index}`;return window.location.port===`3000`&&(t=`${window.location.protocol}//${window.location.hostname}:8081/${t}`),t}loadImage(){fetch(this._getUrl()).then(e=>e.blob()).then(e=>{let t=new FileReader;t.onload=()=>{this.setState({value:t.result})},t.readAsDataURL(e)}).catch(e=>console.error(e))}renderItem(e,t){return _.createElement(Wt,{fullWidth:!0,variant:`standard`},this.props.schema.label?_.createElement(rr,{shrink:!0},this.getText(this.props.schema.label)):null,_.createElement(gn,{error:!!e,disabled:t,accept:this.props.schema.accept,crop:this.props.schema.crop,maxSize:this.props.schema.maxSize||262144,icon:this.state.value||void 0,removeIconFunc:()=>this.setState({value:null},()=>{if(this.props.attr)if(this.props.schema.base64){let e=this.onChange(this.props.attr,this.state.value);e instanceof Promise&&e.catch(e=>console.error(`Cannot set value: ${e}`))}else this.props.oContext.socket.deleteFile(`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,this.props.attr).catch(e=>console.error(e))}),onChange:e=>this.setState({value:e},()=>{if(this.props.attr){if(this.props.schema.base64){let e=this.onChange(this.props.attr,this.state.value);e instanceof Promise&&e.catch(e=>console.error(`Cannot set value: ${e}`))}else e.startsWith(`data`)&&(e=e.split(`,`)[1]);this.props.oContext.socket.writeFile64(`${this.props.oContext.adapterName}.${this.props.oContext.instance}`,this.props.attr,e).catch(e=>console.error(e))}})}),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var Zx=class extends X{renderItem(){return _.createElement(qn,{type:this.props.schema.boxType||`info`,closeable:this.props.schema.closeable===void 0||this.props.schema.closeable,storeId:this.props.schema.closed===void 0?`${!!this.props.oContext.adapterName} ${this.props.attr}`:void 0,closed:this.props.schema.closed,style:{width:`100%`,...this.props.schema.style}},this.props.schema.title?_.createElement(vt,{component:`div`,sx:{fontWeight:`bold`,fontSize:`larger`}},this.getText(this.props.schema.title)):null,this.getText(this.props.schema.text))}};g();var Qx={icon:{width:20,height:20,marginRight:4}},$x=class extends X{constructor(...e){super(...e),K(this,`onInstancesUpdate`,(e,t)=>{var n;if(!e.match(/^system\.adapter\.[-_a-z\d]+\.\d+$/))return;let r=this.props.schema.long?e:this.props.schema.short?e.split(`.`).pop():e.replace(/^system\.adapter\./,``),i=((n=this.state.selectOptions)==null?void 0:n.findIndex(e=>e.value===r))??-1;if(t){if(this.props.schema.adapter===`_dataSources`&&(!t.common||!t.common.getHistory))return;if(i===-1){let e=JSON.parse(JSON.stringify(this.state.selectOptions)),n=typeof t.common.name==`object`?t.common.name[J.getLanguage()]||t.common.name.en:t.common.name;e.push({value:this.props.schema.long?t._id:this.props.schema.short?t._id.split(`.`).pop()||``:t._id.replace(/^system\.adapter\./,``),label:`${n} [${t._id.replace(/^system\.adapter\./,``)}]`,icon:`${this.props.oContext.imagePrefix}/adapter/${n}/${t.common.icon}`}),e.sort((e,t)=>e.label>t.label?1:e.label<t.label?-1:0),this.setState({selectOptions:e})}}else if(i!==-1){let e=JSON.parse(JSON.stringify(this.state.selectOptions)),t={};this.state.value===e[i].value&&(t.value=X.NONE_VALUE),e.splice(i,1),t.selectOptions=e,this.setState(t)}})}async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr),t=this.props.schema.adapter;t===`_dataSources`&&(t=void 0),this.props.oContext.socket.getAdapterInstances(t,!0).then(async n=>{this.props.schema.adapter===`_dataSources`?n=n.filter(e=>{var t;return e==null||(t=e.common)==null?void 0:t.getHistory}):this.props.schema.adapter?n=n.filter(e=>e==null?void 0:e._id.startsWith(`system.adapter.${this.props.schema.adapter}.`)):this.props.schema.adapters&&Array.isArray(this.props.schema.adapters)&&(n=n.filter(e=>{var t,n;return(t=this.props.schema.adapters)==null?void 0:t.includes(e==null||(n=e.common)==null?void 0:n.name)})),this.props.schema.onlyEnabled&&(n=n.filter(e=>{var t;return e==null||(t=e.common)==null?void 0:t.enabled}));let r=n.map(e=>({value:this.props.schema.long?e._id:this.props.schema.short?e._id.split(`.`).pop()||``:e._id.replace(/^system\.adapter\./,``),label:`${e.common.name} [${e._id.replace(/^system\.adapter\./,``)}]`,icon:`${this.props.oContext.imagePrefix}/adapter/${e.common.name}/${e.common.icon}`}));r.sort((e,t)=>e.value>t.value?1:e.value<t.value?-1:0),this.props.schema.allowDeactivate!==!1&&r.unshift({label:J.t(X.NONE_LABEL),value:X.NONE_VALUE}),this.props.schema.all&&r.unshift({label:J.t(`sch_all`),value:`*`}),this.setState({value:e||``,selectOptions:r}),await this.props.oContext.socket.subscribeObject(`system.adapter.${t?`${t}.`:``}*`,this.onInstancesUpdate)}).catch(e=>console.error(`Cannot get instances: ${e}`))}componentWillUnmount(){this.props.oContext.socket.unsubscribeObject(`system.adapter.*`,this.onInstancesUpdate).then(()=>{}),super.componentWillUnmount()}renderItem(e,t){var n;if(!this.state.selectOptions)return null;let r=(n=this.state.selectOptions)==null?void 0:n.find(e=>e.value===this.state.value);return _.createElement(Wt,{fullWidth:!0,key:this.props.attr,variant:`standard`},this.props.schema.label?_.createElement(rr,{shrink:!0},this.getText(this.props.schema.label)):null,_.createElement(Me,{variant:`standard`,error:!!e,displayEmpty:!0,disabled:!!t,value:this.state.value,renderValue:()=>_.createElement(`span`,{style:{display:`flex`}},r!=null&&r.icon?_.createElement(Mt,{src:`./${r.icon}`,style:Qx.icon}):null,this.getText(r==null?void 0:r.label,!0)),onChange:e=>this.setState({value:e.target.value},()=>this.props.attr&&this.onChange(this.props.attr,this.state.value))},this.state.selectOptions.map(e=>_.createElement(z,{key:e.value,value:e.value,style:e.value===X.NONE_VALUE?{opacity:.5}:{}},e.icon?_.createElement(Mt,{src:`./${e.icon}`,style:Qx.icon}):null,this.getText(e.label,!0)))),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var eS={address:{fontSize:`smaller`,opacity:.5,marginLeft:8}},tS=class extends X{async componentDidMount(){var e;if(await super.componentDidMount(),(e=this.props.common)!=null&&e.host)try{var t,n,r;let e=await((t=(n=this.props.oContext).getCachedObject)==null?void 0:t.call(n,`system.host.${this.props.common.host}`)),i=[];if(e!=null&&(r=e.native)!=null&&(r=r.hardware)!=null&&r.networkInterfaces){let t=e.native.hardware.networkInterfaces;Object.keys(t).forEach(e=>{var n,r,a,o;if(this.props.schema.ignoreInternal&&!((n=t[e])!=null&&n.find(e=>!e.internal))||this.props.schema.ignoreLoopback&&(r=t[e])!=null&&r.find(e=>e.address===`127.0.0.1`||e.address===`::1`))return;let s=(a=t[e])==null?void 0:a.find(e=>e.family===`IPv4`);s||=(o=t[e])==null?void 0:o.find(e=>e.family===`IPv6`),i.push({value:e,address:(s==null?void 0:s.address)||``})})}this.setState({interfaces:i})}catch(e){window.alert(`Cannot read interfaces: ${e}`)}}renderItem(e,t){var n,r,i;let a=X.getValue(this.props.data,this.props.attr),o=(n=this.state.interfaces)==null?void 0:n.find(e=>e.value===a);return _.createElement(Wt,{fullWidth:!0,variant:`standard`},(r=this.state.interfaces)!=null&&r.length&&this.props.schema.label?_.createElement(rr,null,this.getText(this.props.schema.label)):null,(i=this.state.interfaces)!=null&&i.length?_.createElement(Me,{variant:`standard`,error:!!e,disabled:!!t,value:a,renderValue:e=>o?_.createElement(`span`,null,o.value,_.createElement(`span`,{style:eS.address},o.address)):e,onChange:e=>this.props.attr&&this.onChange(this.props.attr,e.target.value)},this.state.interfaces.map((e,t)=>_.createElement(z,{key:t,value:e.value},_.createElement(`span`,null,e.value,_.createElement(`span`,{style:eS.address},e.address))))):_.createElement(ot,{fullWidth:!0,variant:`standard`,error:!!e,disabled:!!t,value:a,onChange:e=>this.props.attr&&this.onChange(this.props.attr,e.target.value),label:this.getText(this.props.schema.label)}),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var nS={modalDialog:{minWidth:400,maxWidth:800},overflowHidden:{display:`flex`,overflow:`hidden`},titleIcon:{marginRight:5},content:{fontSize:16},languageButton:{position:`absolute`,right:8,top:8},languageButtonActive:{color:`primary.main`}},rS=({toggleTranslation:e,noTranslation:t,title:n,fullWidth:r,help:i,maxWidth:o,progress:s,applyDisabled:c,applyButton:l,onClose:d,children:f,titleButtonApply:p,titleButtonClose:m,onApply:h,textInput:g,defaultValue:v,overflowHidden:y})=>{let[b,x]=u(v);a(()=>{x(v)},[v]);let S=ht(),C=be(S.breakpoints.down(`md`));return _.createElement(nn,{open:!0,maxWidth:C?!1:o||`md`,fullWidth:!!r,fullScreen:C,onClose:d,sx:{"& .MuiPaper-root":C?{}:nS.modalDialog}},n&&_.createElement(Nt,null,n,J.getLanguage()!==`en`&&e?_.createElement(Zn,{size:`large`,style:{...nS.languageButton,...t?nS.languageButtonActive:{}},onClick:()=>e(),title:J.t(`jc_Disable/Enable translation`)},_.createElement(Kn,null)):null),_.createElement(Tn,{sx:{...y?nS.overflowHidden:{},...nS.content},style:{paddingTop:8}},g&&_.createElement(ot,{autoComplete:`off`,fullWidth:!0,autoFocus:!0,variant:`outlined`,size:`medium`,multiline:!0,value:b,onChange:e=>x(e.target.value)}),f,i?_.createElement(`div`,null,i):null),_.createElement(Et,null,l!==!1&&_.createElement(xt,{startIcon:_.createElement(on,null),disabled:s||c&&v===b,onClick:()=>h==null?void 0:h(g&&b||``),variant:`contained`,color:`primary`},J.t(p||`jc_Ok`)),_.createElement(xt,{color:`grey`,onClick:()=>d&&d(),disabled:s,variant:`contained`,startIcon:_.createElement(De,null)},J.t(m||`jc_Cancel`))))},iS=n(r(((e,t)=>{(function(){var e=`ace`,t=(function(){return this})();if(!t&&typeof window<`u`&&(t=window),!e&&typeof requirejs<`u`)return;var n=function(e,t,r){if(typeof e!=`string`){n.original?n.original.apply(this,arguments):(console.error(`dropping module because define wasn't a string.`),console.trace());return}arguments.length==2&&(r=t),n.modules[e]||(n.payloads[e]=r,n.modules[e]=null)};n.modules={},n.payloads={};var r=function(e,t,n){if(typeof t==`string`){var r=o(e,t);if(r!=null)return n&&n(),r}else if(Object.prototype.toString.call(t)===`[object Array]`){for(var a=[],s=0,c=t.length;s<c;++s){var l=o(e,t[s]);if(l==null&&i.original)return;a.push(l)}return n&&n.apply(null,a)||!0}},i=function(e,t){var n=r(``,e,t);return n==null&&i.original?i.original.apply(this,arguments):n},a=function(e,t){if(t.indexOf(`!`)!==-1){var n=t.split(`!`);return a(e,n[0])+`!`+a(e,n[1])}if(t.charAt(0)==`.`)for(t=e.split(`/`).slice(0,-1).join(`/`)+`/`+t;t.indexOf(`.`)!==-1&&r!=t;){var r=t;t=t.replace(/\/\.\//,`/`).replace(/[^\/]+\/\.\.\//,``)}return t},o=function(e,t){t=a(e,t);var i=n.modules[t];if(!i){if(i=n.payloads[t],typeof i==`function`){var o={},s={id:t,uri:``,exports:o,packaged:!0};o=i(function(e,n){return r(t,e,n)},o,s)||s.exports,n.modules[t]=o,delete n.payloads[t]}i=n.modules[t]=o||i}return i};function s(e){var r=t;e&&(t[e]||(t[e]={}),r=t[e]),(!r.define||!r.define.packaged)&&(n.original=r.define,r.define=n,r.define.packaged=!0),(!r.require||!r.require.packaged)&&(i.original=r.require,r.require=i,r.require.packaged=!0)}s(e)})(),ace.define(`ace/lib/es6-shim`,[`require`,`exports`,`module`],function(e,t,n){function r(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||r(String.prototype,`startsWith`,function(e,t){return t||=0,this.lastIndexOf(e,t)===t}),String.prototype.endsWith||r(String.prototype,`endsWith`,function(e,t){var n=this;(t===void 0||t>n.length)&&(t=n.length),t-=e.length;var r=n.indexOf(e,t);return r!==-1&&r===t}),String.prototype.repeat||r(String.prototype,`repeat`,function(e){for(var t=``,n=this;e>0;)e&1&&(t+=n),(e>>=1)&&(n+=n);return t}),String.prototype.includes||r(String.prototype,`includes`,function(e,t){return this.indexOf(e,t)!=-1}),Object.assign||(Object.assign=function(e){if(e==null)throw TypeError(`Cannot convert undefined or null to object`);for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];r!=null&&Object.keys(r).forEach(function(e){t[e]=r[e]})}return t}),Object.values||(Object.values=function(e){return Object.keys(e).map(function(t){return e[t]})}),Array.prototype.find||r(Array.prototype,`find`,function(e){for(var t=this.length,n=arguments[1],r=0;r<t;r++){var i=this[r];if(e.call(n,i,r,this))return i}}),Array.prototype.findIndex||r(Array.prototype,`findIndex`,function(e){for(var t=this.length,n=arguments[1],r=0;r<t;r++){var i=this[r];if(e.call(n,i,r,this))return r}}),Array.prototype.includes||r(Array.prototype,`includes`,function(e,t){return this.indexOf(e,t)!=-1}),Array.prototype.fill||r(Array.prototype,`fill`,function(e){for(var t=this,n=t.length>>>0,r=arguments[1]>>0,i=r<0?Math.max(n+r,0):Math.min(r,n),a=arguments[2],o=a===void 0?n:a>>0,s=o<0?Math.max(n+o,0):Math.min(o,n);i<s;)t[i]=e,i++;return t}),Array.of||r(Array,`of`,function(){return Array.prototype.slice.call(arguments)})}),ace.define(`ace/lib/fixoldbrowsers`,[`require`,`exports`,`module`,`ace/lib/es6-shim`],function(e,t,n){e("./es6-shim")}),ace.define(`ace/lib/deep_copy`,[`require`,`exports`,`module`],function(e,t,n){t.deepCopy=function e(t){if(typeof t!=`object`||!t)return t;var n;if(Array.isArray(t)){n=[];for(var r=0;r<t.length;r++)n[r]=e(t[r]);return n}if(Object.prototype.toString.call(t)!==`[object Object]`)return t;for(var r in n={},t)n[r]=e(t[r]);return n}}),ace.define(`ace/lib/lang`,[`require`,`exports`,`module`,`ace/lib/deep_copy`],function(e,t,n){t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split(``).reverse().join(``)},t.stringRepeat=function(e,t){for(var n=``;t>0;)t&1&&(n+=e),(t>>=1)&&(e+=e);return n};var r=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(r,``)},t.stringTrimRight=function(e){return e.replace(i,``)},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){for(var t=[],n=0,r=e.length;n<r;n++)e[n]&&typeof e[n]==`object`?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=e("./deep_copy").deepCopy,t.arrayToMap=function(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,`\\$1`)},t.escapeHTML=function(e){return(``+e).replace(/&/g,`&`).replace(/"/g,`"`).replace(/'/g,`'`).replace(/</g,`<`)},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,function(e){n.push({offset:arguments[arguments.length-2],length:e.length})}),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},r=function(e){return r.cancel(),t=setTimeout(n,e||0),r};return r.schedule=r,r.call=function(){return this.cancel(),e(),r},r.cancel=function(){return clearTimeout(t),t=null,r},r.isPending=function(){return t},r},t.delayedCall=function(e,t){var n=null,r=function(){n=null,e()},i=function(e){n??=setTimeout(r,e||t)};return i.delay=function(e){n&&clearTimeout(n),n=setTimeout(r,e||t)},i.schedule=i,i.call=function(){this.cancel(),e()},i.cancel=function(){n&&clearTimeout(n),n=null},i.isPending=function(){return n},i},t.sleep=function(e){return new Promise(function(t){setTimeout(t,e)})},t.supportsLookbehind=function(){return!0},t.skipEmptyMatch=function(e,t,n){return n&&e.codePointAt(t)>65535?2:1}}),ace.define(`ace/lib/useragent`,[`require`,`exports`,`module`],function(e,t,n){t.OS={LINUX:`LINUX`,MAC:`MAC`,WINDOWS:`WINDOWS`},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS};var r=typeof navigator==`object`?navigator:{},i=(/mac|win|linux/i.exec(r.platform)||[`other`])[0].toLowerCase(),a=r.userAgent||``,o=r.appName||``;t.isWin=i==`win`,t.isMac=i==`mac`,t.isLinux=i==`linux`,t.isIE=o==`Microsoft Internet Explorer`||o.indexOf(`MSAppHost`)>=0?parseFloat((a.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((a.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=a.match(/ Gecko\/\d+/),t.isOpera=typeof opera==`object`&&Object.prototype.toString.call(window.opera)==`[object Opera]`,t.isWebKit=parseFloat(a.split(`WebKit/`)[1])||void 0,t.isChrome=parseFloat(a.split(` Chrome/`)[1])||void 0,t.isSafari=parseFloat(a.split(` Safari/`)[1])&&!t.isChrome||void 0,t.isEdge=parseFloat(a.split(` Edge/`)[1])||void 0,t.isAIR=a.indexOf(`AdobeAIR`)>=0,t.isAndroid=a.indexOf(`Android`)>=0,t.isChromeOS=a.indexOf(` CrOS `)>=0,t.isIOS=/iPad|iPhone|iPod/.test(a)&&!window.MSStream,t.isIOS&&(t.isMac=!0),t.isMobile=t.isIOS||t.isAndroid}),ace.define(`ace/lib/dom`,[`require`,`exports`,`module`,`ace/lib/useragent`],function(e,t,n){var r=e("./useragent"),i=`http://www.w3.org/1999/xhtml`;t.buildDom=function e(t,n,r){if(typeof t==`string`&&t){var i=document.createTextNode(t);return n&&n.appendChild(i),i}if(!Array.isArray(t))return t&&t.appendChild&&n&&n.appendChild(t),t;if(typeof t[0]!=`string`||!t[0]){for(var a=[],o=0;o<t.length;o++){var s=e(t[o],n,r);s&&a.push(s)}return a}var c=document.createElement(t[0]),l=t[1],u=1;l&&typeof l==`object`&&!Array.isArray(l)&&(u=2);for(var o=u;o<t.length;o++)e(t[o],c,r);return u==2&&Object.keys(l).forEach(function(e){var t=l[e];e===`class`?c.className=Array.isArray(t)?t.join(` `):t:typeof t==`function`||e==`value`||e[0]==`$`?c[e]=t:e===`ref`?r&&(r[t]=c):e===`style`?typeof t==`string`&&(c.style.cssText=t):t!=null&&c.setAttribute(e,t)}),n&&n.appendChild(c),c},t.getDocumentHead=function(e){return e||=document,e.head||e.getElementsByTagName(`head`)[0]||e.documentElement},t.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||i,e):document.createElement(e)},t.removeChildren=function(e){e.innerHTML=``},t.createTextNode=function(e,t){return(t?t.ownerDocument:document).createTextNode(e)},t.createFragment=function(e){return(e?e.ownerDocument:document).createDocumentFragment()},t.hasCssClass=function(e,t){return(e.className+``).split(/\s+/g).indexOf(t)!==-1},t.addCssClass=function(e,n){t.hasCssClass(e,n)||(e.className+=` `+n)},t.removeCssClass=function(e,t){for(var n=e.className.split(/\s+/g);;){var r=n.indexOf(t);if(r==-1)break;n.splice(r,1)}e.className=n.join(` `)},t.toggleCssClass=function(e,t){for(var n=e.className.split(/\s+/g),r=!0;;){var i=n.indexOf(t);if(i==-1)break;r=!1,n.splice(i,1)}return r&&n.push(t),e.className=n.join(` `),r},t.setCssClass=function(e,n,r){r?t.addCssClass(e,n):t.removeCssClass(e,n)},t.hasCssString=function(e,t){var n=0,r;if(t||=document,r=t.querySelectorAll(`style`)){for(;n<r.length;)if(r[n++].id===e)return!0}},t.removeElementById=function(e,t){t||=document,t.getElementById(e)&&t.getElementById(e).remove()};var a,o=[];t.useStrictCSP=function(e){a=e,e==0?s():o||=[]};function s(){var e=o;o=null,e&&e.forEach(function(e){c(e[0],e[1])})}function c(e,n,r){if(!(typeof document>`u`)){if(o){if(r)s();else if(r===!1)return o.push([e,n])}if(!a){var i=r;!r||!r.getRootNode?i=document:(i=r.getRootNode(),(!i||i==r)&&(i=document));var c=i.ownerDocument||i;if(n&&t.hasCssString(n,i))return null;n&&(e+=`
|
|
19
19
|
/*# sourceURL=ace/css/`+n+` */`);var l=t.createElement(`style`);l.appendChild(c.createTextNode(e)),n&&(l.id=n),i==c&&(i=t.getDocumentHead(c)),i.insertBefore(l,i.firstChild)}}}if(t.importCssString=c,t.importCssStylsheet=function(e,n){t.buildDom([`link`,{rel:`stylesheet`,href:e}],t.getDocumentHead(n))},t.$fixPositionBug=function(e){var t=e.getBoundingClientRect();if(e.style.left){var n=parseFloat(e.style.left),r=+t.left;Math.abs(n-r)>1&&(e.style.left=2*n-r+`px`)}if(e.style.right){var n=parseFloat(e.style.right),r=window.innerWidth-t.right;Math.abs(n-r)>1&&(e.style.right=2*n-r+`px`)}if(e.style.top){var n=parseFloat(e.style.top),r=+t.top;Math.abs(n-r)>1&&(e.style.top=2*n-r+`px`)}if(e.style.bottom){var n=parseFloat(e.style.bottom),r=window.innerHeight-t.bottom;Math.abs(n-r)>1&&(e.style.bottom=2*n-r+`px`)}},t.scrollbarWidth=function(e){var n=t.createElement(`ace_inner`);n.style.width=`100%`,n.style.minWidth=`0px`,n.style.height=`200px`,n.style.display=`block`;var r=t.createElement(`ace_outer`),i=r.style;i.position=`absolute`,i.left=`-10000px`,i.overflow=`hidden`,i.width=`200px`,i.minWidth=`0px`,i.height=`150px`,i.display=`block`,r.appendChild(n);var a=e&&e.documentElement||document&&document.documentElement;if(!a)return 0;a.appendChild(r);var o=n.offsetWidth;i.overflow=`scroll`;var s=n.offsetWidth;return o===s&&(s=r.clientWidth),a.removeChild(r),o-s},t.computedStyle=function(e,t){return window.getComputedStyle(e,``)||{}},t.setStyle=function(e,t,n){e[t]!==n&&(e[t]=n)},t.HAS_CSS_ANIMATION=!1,t.HAS_CSS_TRANSFORMS=!1,t.HI_DPI=!r.isWin||typeof window<`u`&&window.devicePixelRatio>=1.5,r.isChromeOS&&(t.HI_DPI=!1),typeof document<`u`){var l=document.createElement(`div`);t.HI_DPI&&l.style.transform!==void 0&&(t.HAS_CSS_TRANSFORMS=!0),!r.isEdge&&l.style.animationName!==void 0&&(t.HAS_CSS_ANIMATION=!0),l=null}t.translate=t.HAS_CSS_TRANSFORMS?function(e,t,n){e.style.transform=`translate(`+Math.round(t)+`px, `+Math.round(n)+`px)`}:function(e,t,n){e.style.top=Math.round(n)+`px`,e.style.left=Math.round(t)+`px`}}),ace.define(`ace/lib/net`,[`require`,`exports`,`module`,`ace/lib/dom`],function(e,t,n){var r=e("./dom");t.get=function(e,t){var n=new XMLHttpRequest;n.open(`GET`,e,!0),n.onreadystatechange=function(){n.readyState===4&&t(n.responseText)},n.send(null)},t.loadScript=function(e,t){var n=r.getDocumentHead(),i=document.createElement(`script`);i.src=e,n.appendChild(i),i.onload=i.onreadystatechange=function(e,n){(n||!i.readyState||i.readyState==`loaded`||i.readyState==`complete`)&&(i=i.onload=i.onreadystatechange=null,n||t())}},t.qualifyURL=function(e){var t=document.createElement(`a`);return t.href=e,t.href}}),ace.define(`ace/lib/oop`,[`require`,`exports`,`module`],function(e,t,n){t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}}),ace.define(`ace/lib/event_emitter`,[`require`,`exports`,`module`],function(e,t,n){var r={},i=function(){this.propagationStopped=!0},a=function(){this.defaultPrevented=!0};r._emit=r._dispatchEvent=function(e,t){this._eventRegistry||={},this._defaultHandlers||={};var n=this._eventRegistry[e]||[],r=this._defaultHandlers[e];if(!(!n.length&&!r)){(typeof t!=`object`||!t)&&(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=i),t.preventDefault||(t.preventDefault=a),n=n.slice();for(var o=0;o<n.length&&(n[o](t,this),!t.propagationStopped);o++);if(r&&!t.defaultPrevented)return r(t,this)}},r._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(n){n=n.slice();for(var r=0;r<n.length;r++)n[r](t,this)}},r.once=function(e,t){var n=this;if(this.on(e,function r(){n.off(e,r),t.apply(null,arguments)}),!t)return new Promise(function(e){t=e})},r.setDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n||=this._defaultHandlers={_disabled_:{}},n[e]){var r=n[e],i=n._disabled_[e];i||(n._disabled_[e]=i=[]),i.push(r);var a=i.indexOf(t);a!=-1&&i.splice(a,1)}n[e]=t},r.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n){var r=n._disabled_[e];if(n[e]==t)r&&this.setDefaultHandler(e,r.pop());else if(r){var i=r.indexOf(t);i!=-1&&r.splice(i,1)}}},r.on=r.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[e];return r||=this._eventRegistry[e]=[],r.indexOf(t)==-1&&r[n?`unshift`:`push`](t),t},r.off=r.removeListener=r.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(n){var r=n.indexOf(t);r!==-1&&n.splice(r,1)}},r.removeAllListeners=function(e){e||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[e]=void 0),this._defaultHandlers&&(this._defaultHandlers[e]=void 0)},t.EventEmitter=r}),ace.define(`ace/lib/report_error`,[`require`,`exports`,`module`],function(e,t,n){t.reportError=function(e,t){var n=Error(e);n.data=t,typeof console==`object`&&console.error&&console.error(n),setTimeout(function(){throw n})}}),ace.define(`ace/lib/default_english_messages`,[`require`,`exports`,`module`],function(e,t,n){t.defaultEnglishMessages={"autocomplete.popup.aria-roledescription":`Autocomplete suggestions`,"autocomplete.popup.aria-label":`Autocomplete suggestions`,"autocomplete.popup.item.aria-roledescription":`item`,"autocomplete.loading":`Loading...`,"editor.scroller.aria-roledescription":`editor`,"editor.scroller.aria-label":`Editor content, press Enter to start editing, press Escape to exit`,"editor.gutter.aria-roledescription":`editor gutter`,"editor.gutter.aria-label":`Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit`,"error-marker.good-state":`Looks good!`,"prompt.recently-used":`Recently used`,"prompt.other-commands":`Other commands`,"prompt.no-matching-commands":`No matching commands`,"search-box.find.placeholder":`Search for`,"search-box.find-all.text":`All`,"search-box.replace.placeholder":`Replace with`,"search-box.replace-next.text":`Replace`,"search-box.replace-all.text":`All`,"search-box.toggle-replace.title":`Toggle Replace mode`,"search-box.toggle-regexp.title":`RegExp Search`,"search-box.toggle-case.title":`CaseSensitive Search`,"search-box.toggle-whole-word.title":`Whole Word Search`,"search-box.toggle-in-selection.title":`Search In Selection`,"search-box.search-counter":`$0 of $1`,"text-input.aria-roledescription":`editor`,"text-input.aria-label":`Cursor at row $0`,"gutter.code-folding.range.aria-label":`Toggle code folding, rows $0 through $1`,"gutter.code-folding.closed.aria-label":`Toggle code folding, rows $0 through $1`,"gutter.code-folding.open.aria-label":`Toggle code folding, row $0`,"gutter.code-folding.closed.title":`Unfold code`,"gutter.code-folding.open.title":`Fold code`,"gutter.annotation.aria-label.error":`Error, read annotations row $0`,"gutter.annotation.aria-label.warning":`Warning, read annotations row $0`,"gutter.annotation.aria-label.info":`Info, read annotations row $0`,"inline-fold.closed.title":`Unfold code`,"gutter-tooltip.aria-label.error.singular":`error`,"gutter-tooltip.aria-label.error.plural":`errors`,"gutter-tooltip.aria-label.warning.singular":`warning`,"gutter-tooltip.aria-label.warning.plural":`warnings`,"gutter-tooltip.aria-label.info.singular":`information message`,"gutter-tooltip.aria-label.info.plural":`information messages`,"gutter.annotation.aria-label.security":`Security finding, read annotations row $0`,"gutter.annotation.aria-label.hint":`Suggestion, read annotations row $0`,"gutter-tooltip.aria-label.security.singular":`security finding`,"gutter-tooltip.aria-label.security.plural":`security findings`,"gutter-tooltip.aria-label.hint.singular":`suggestion`,"gutter-tooltip.aria-label.hint.plural":`suggestions`,"editor.tooltip.disable-editing":`Editing is disabled`}}),ace.define(`ace/lib/app_config`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/lib/event_emitter`,`ace/lib/report_error`,`ace/lib/default_english_messages`],function(e,t,n){"no use strict";var r=e("./oop"),i=e("./event_emitter").EventEmitter,a=e("./report_error").reportError,o=e("./default_english_messages").defaultEnglishMessages,s={setOptions:function(e){Object.keys(e).forEach(function(t){this.setOption(t,e[t])},this)},getOptions:function(e){var t={};if(e)Array.isArray(e)||(e=Object.keys(e));else{var n=this.$options;e=Object.keys(n).filter(function(e){return!n[e].hidden})}return e.forEach(function(e){t[e]=this.getOption(e)},this),t},setOption:function(e,t){if(this[`$`+e]!==t){var n=this.$options[e];if(!n)return c(`misspelled option "`+e+`"`);if(n.forwardTo)return this[n.forwardTo]&&this[n.forwardTo].setOption(e,t);n.handlesSet||(this[`$`+e]=t),n&&n.set&&n.set.call(this,t)}},getOption:function(e){var t=this.$options[e];return t?t.forwardTo?this[t.forwardTo]&&this[t.forwardTo].getOption(e):t&&t.get?t.get.call(this):this[`$`+e]:c(`misspelled option "`+e+`"`)}};function c(e){typeof console<`u`&&console.warn&&console.warn.apply(console,arguments)}var l,u,d=function(){function e(){this.$defaultOptions={},l=o,u=`dollarSigns`}return e.prototype.defineOptions=function(e,t,n){return e.$options||(this.$defaultOptions[t]=e.$options={}),Object.keys(n).forEach(function(t){var r=n[t];typeof r==`string`&&(r={forwardTo:r}),r.name||(r.name=t),e.$options[r.name]=r,`initialValue`in r&&(e[`$`+r.name]=r.initialValue)}),r.implement(e,s),this},e.prototype.resetOptions=function(e){Object.keys(e.$options).forEach(function(t){var n=e.$options[t];`value`in n&&e.setOption(t,n.value)})},e.prototype.setDefaultValue=function(e,t,n){if(!e){for(e in this.$defaultOptions)if(this.$defaultOptions[e][t])break;if(!this.$defaultOptions[e][t])return!1}var r=this.$defaultOptions[e]||(this.$defaultOptions[e]={});r[t]&&(r.forwardTo?this.setDefaultValue(r.forwardTo,t,n):r[t].value=n)},e.prototype.setDefaultValues=function(e,t){Object.keys(t).forEach(function(n){this.setDefaultValue(e,n,t[n])},this)},e.prototype.setMessages=function(e,t){l=e,t&&t.placeholders&&(u=t.placeholders)},e.prototype.nls=function(e,t,n){l[e]||(c(`No message found for the key '`+e+`' in messages with id `+l.$id+`, trying to find a translation for the default string '`+t+`'.`),l[t]||c(`No message found for the default string '`+t+`' in the provided messages. Falling back to the default English message.`));var r=l[e]||l[t]||t;return n&&(u===`dollarSigns`&&(r=r.replace(/\$(\$|[\d]+)/g,function(e,t){return t==`$`?`$`:n[t]})),u===`curlyBrackets`&&(r=r.replace(/\{([^\}]+)\}/g,function(e,t){return n[t]}))),r},e}();d.prototype.warn=c,d.prototype.reportError=a,r.implement(d.prototype,i),t.AppConfig=d}),ace.define(`ace/theme/textmate-css`,[`require`,`exports`,`module`],function(e,t,n){n.exports=`.ace-tm .ace_gutter {
|
|
20
20
|
background: #f0f0f0;
|
|
21
21
|
color: #333;
|
|
@@ -993,16 +993,16 @@ import{a as e,r as t,s as n,t as r}from"./rolldown-runtime-BcKkbAw3.js";import{t
|
|
|
993
993
|
border-left-color: transparent!important;
|
|
994
994
|
top: -5px;
|
|
995
995
|
}
|
|
996
|
-
`,`error_marker.css`,!1)}),ace.define(`ace/ace`,[`require`,`exports`,`module`,`ace/lib/dom`,`ace/range`,`ace/editor`,`ace/edit_session`,`ace/undomanager`,`ace/virtual_renderer`,`ace/worker/worker_client`,`ace/keyboard/hash_handler`,`ace/placeholder`,`ace/multi_select`,`ace/mode/folding/fold_mode`,`ace/theme/textmate`,`ace/ext/error_marker`,`ace/config`,`ace/loader_build`],function(e,t,n){e("./loader_build")(t);var r=e("./lib/dom"),i=e("./range").Range,a=e("./editor").Editor,o=e("./edit_session").EditSession,s=e("./undomanager").UndoManager,c=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.edit=function(e,n){if(typeof e==`string`){var i=e;if(e=document.getElementById(i),!e)throw Error(`ace.edit can't find div #`+i)}if(e&&e.env&&e.env.editor instanceof a)return e.env.editor;var o=``;if(e&&/input|textarea/i.test(e.tagName)){var s=e;o=s.value,e=r.createElement(`pre`),s.parentNode.replaceChild(e,s)}else e&&(o=e.textContent,e.innerHTML=``);var l=t.createEditSession(o),u=new a(new c(e),l,n),d={document:l,editor:u,onResize:u.resize.bind(u,null)};return s&&(d.textarea=s),u.on(`destroy`,function(){d.editor.container.env=null}),u.container.env=u.env=d,u},t.createEditSession=function(e,t){var n=new o(e,t);return n.setUndoManager(new s),n},t.Range=i,t.Editor=a,t.EditSession=o,t.UndoManager=s,t.VirtualRenderer=c,t.version=t.config.version}),(function(){ace.require([`ace/ace`],function(n){n&&(n.config.init(!0),n.define=ace.define);var r=(function(){return this})();for(var i in!r&&typeof window<`u`&&(r=window),!r&&typeof self<`u`&&(r=self),r.ace||(r.ace=n),n)n.hasOwnProperty(i)&&(r.ace[i]=n[i]);r.ace.default=r.ace,typeof t==`object`&&typeof e==`object`&&t&&(t.exports=r.ace)})})()}))(),1),YS=[`minLines`,`maxLines`,`readOnly`,`highlightActiveLine`,`tabSize`,`enableBasicAutocompletion`,`enableLiveAutocompletion`,`enableSnippets`],XS=[`onChange`,`onFocus`,`onInput`,`onBlur`,`onCopy`,`onPaste`,`onSelectionChange`,`onCursorChange`,`onScroll`,`handleOptions`,`updateRef`],ZS=()=>{if(typeof window<`u`&&window.ace){let e=window.ace;return e.acequire=e.require||e.acequire,e}return JS.default},QS=(e,t)=>{let n=null;return function(){let r=this,i=arguments;clearTimeout(n),n=setTimeout(()=>{e.apply(r,i)},t)}},{getOwnPropertyNames:$S,getOwnPropertySymbols:eC}=Object,{hasOwnProperty:tC}=Object.prototype;function nC(e,t){return function(n,r,i){return e(n,r,i)&&t(n,r,i)}}function rC(e){return function(t,n,r){if(!t||!n||typeof t!=`object`||typeof n!=`object`)return e(t,n,r);let{cache:i}=r,a=i.get(t),o=i.get(n);if(a&&o)return a===n&&o===t;i.set(t,n),i.set(n,t);let s=e(t,n,r);return i.delete(t),i.delete(n),s}}function iC(e){return e==null?void 0:e[Symbol.toStringTag]}function aC(e){return $S(e).concat(eC(e))}var oC=Object.hasOwn||((e,t)=>tC.call(e,t));function sC(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var cC=`__v`,lC=`__o`,uC=`_owner`,{getOwnPropertyDescriptor:dC,keys:fC}=Object;function pC(e,t){return e.byteLength===t.byteLength&&EC(new Uint8Array(e),new Uint8Array(t))}function mC(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-->0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function hC(e,t){return e.byteLength===t.byteLength&&EC(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function gC(e,t){return sC(e.getTime(),t.getTime())}function _C(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function vC(e,t){return e===t}function yC(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let i=Array(r),a=e.entries(),o,s,c=0;for(;(o=a.next())&&!o.done;){let r=t.entries(),a=!1,l=0;for(;(s=r.next())&&!s.done;){if(i[l]){l++;continue}let r=o.value,u=s.value;if(n.equals(r[0],u[0],c,l,e,t,n)&&n.equals(r[1],u[1],r[0],u[0],e,t,n)){a=i[l]=!0;break}l++}if(!a)return!1;c++}return!0}var bC=sC;function xC(e,t,n){let r=fC(e),i=r.length;if(fC(t).length!==i)return!1;for(;i-->0;)if(!OC(e,t,n,r[i]))return!1;return!0}function SC(e,t,n){let r=aC(e),i=r.length;if(aC(t).length!==i)return!1;let a,o,s;for(;i-->0;)if(a=r[i],!OC(e,t,n,a)||(o=dC(e,a),s=dC(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function CC(e,t){return sC(e.valueOf(),t.valueOf())}function wC(e,t){return e.source===t.source&&e.flags===t.flags}function TC(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let i=Array(r),a=e.values(),o,s;for(;(o=a.next())&&!o.done;){let r=t.values(),a=!1,c=0;for(;(s=r.next())&&!s.done;){if(!i[c]&&n.equals(o.value,s.value,o.value,s.value,e,t,n)){a=i[c]=!0;break}c++}if(!a)return!1}return!0}function EC(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-->0;)if(e[n]!==t[n])return!1;return!0}function DC(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function OC(e,t,n,r){return(r===uC||r===lC||r===cC)&&(e.$$typeof||t.$$typeof)?!0:oC(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var kC=`[object ArrayBuffer]`,AC=`[object Arguments]`,jC=`[object Boolean]`,MC=`[object DataView]`,NC=`[object Date]`,PC=`[object Error]`,FC=`[object Map]`,IC=`[object Number]`,LC=`[object Object]`,RC=`[object RegExp]`,zC=`[object Set]`,BC=`[object String]`,VC={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},HC=`[object URL]`,UC=Object.prototype.toString;function WC({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:s,areObjectsEqual:c,arePrimitiveWrappersEqual:l,areRegExpsEqual:u,areSetsEqual:d,areTypedArraysEqual:f,areUrlsEqual:p,unknownTagComparators:m}){return function(h,g,_){if(h===g)return!0;if(h==null||g==null)return!1;let v=typeof h;if(v!==typeof g)return!1;if(v!==`object`)return v===`number`?s(h,g,_):v===`function`&&a(h,g,_);let y=h.constructor;if(y!==g.constructor)return!1;if(y===Object)return c(h,g,_);if(Array.isArray(h))return t(h,g,_);if(y===Date)return r(h,g,_);if(y===RegExp)return u(h,g,_);if(y===Map)return o(h,g,_);if(y===Set)return d(h,g,_);let b=UC.call(h);if(b===NC)return r(h,g,_);if(b===RC)return u(h,g,_);if(b===FC)return o(h,g,_);if(b===zC)return d(h,g,_);if(b===LC)return typeof h.then!=`function`&&typeof g.then!=`function`&&c(h,g,_);if(b===HC)return p(h,g,_);if(b===PC)return i(h,g,_);if(b===AC)return c(h,g,_);if(VC[b])return f(h,g,_);if(b===kC)return e(h,g,_);if(b===MC)return n(h,g,_);if(b===jC||b===IC||b===BC)return l(h,g,_);if(m){let e=m[b];if(!e){let t=iC(h);t&&(e=m[t])}if(e)return e(h,g,_)}return!1}}function GC({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:pC,areArraysEqual:n?SC:mC,areDataViewsEqual:hC,areDatesEqual:gC,areErrorsEqual:_C,areFunctionsEqual:vC,areMapsEqual:n?nC(yC,SC):yC,areNumbersEqual:bC,areObjectsEqual:n?SC:xC,arePrimitiveWrappersEqual:CC,areRegExpsEqual:wC,areSetsEqual:n?nC(TC,SC):TC,areTypedArraysEqual:n?nC(EC,SC):EC,areUrlsEqual:DC,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){let e=rC(r.areArraysEqual),t=rC(r.areMapsEqual),n=rC(r.areObjectsEqual),i=rC(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:e,areMapsEqual:t,areObjectsEqual:n,areSetsEqual:i})}return r}function KC(e){return function(t,n,r,i,a,o,s){return e(t,n,s)}}function qC({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(a,o){let{cache:s=e?new WeakMap:void 0,meta:c}=n();return t(a,o,{cache:s,equals:r,meta:c,strict:i})};if(e)return function(e,n){return t(e,n,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};let a={cache:void 0,equals:r,meta:void 0,strict:i};return function(e,n){return t(e,n,a)}}var JC=YC();YC({strict:!0}),YC({circular:!0}),YC({circular:!0,strict:!0}),YC({createInternalComparator:()=>sC}),YC({strict:!0,createInternalComparator:()=>sC}),YC({circular:!0,createInternalComparator:()=>sC}),YC({circular:!0,createInternalComparator:()=>sC,strict:!0});function YC(e={}){let{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,a=WC(GC(e));return qC({circular:t,comparator:a,createState:r,equals:n?n(a):KC(a),strict:i})}var $=n(Ee(),1);g();var XC=ZS(),ZC=class extends s{constructor(e){super(e),XS.forEach(e=>{this[e]=this[e].bind(this)}),this.debounce=QS}isInShadow(e){let t=e&&e.parentNode;for(;t;){if(t.toString()===`[object ShadowRoot]`)return!0;t=t.parentNode}return!1}componentDidMount(){let{className:e,onBeforeLoad:t,onValidate:n,mode:r,focus:i,theme:a,fontSize:o,lineHeight:s,value:c,defaultValue:l,showGutter:u,wrapEnabled:d,showPrintMargin:f,scrollMargin:p=[0,0,0,0],keyboardHandler:m,onLoad:h,commands:g,annotations:_,markers:v,placeholder:y}=this.props;this.editor=XC.edit(this.refEditor),t&&t(XC);let b=Object.keys(this.props.editorProps);for(let e=0;e<b.length;e++)this.editor[b[e]]=this.props.editorProps[b[e]];this.props.debounceChangePeriod&&(this.onChange=this.debounce(this.onChange,this.props.debounceChangePeriod)),this.editor.renderer.setScrollMargin(p[0],p[1],p[2],p[3]),this.isInShadow(this.refEditor)&&this.editor.renderer.attachToShadowRoot(),this.editor.getSession().setMode(typeof r==`string`?`ace/mode/${r}`:r),a&&a!==``&&this.editor.setTheme(`ace/theme/${a}`),this.editor.setFontSize(typeof o==`number`?`${o}px`:o),s&&(this.editor.container.style.lineHeight=typeof s==`number`?`${s}px`:`${s}`,this.editor.renderer.updateFontSize()),this.editor.getSession().setValue(l||c||``),this.props.navigateToFileEnd&&this.editor.navigateFileEnd(),this.editor.renderer.setShowGutter(u),this.editor.getSession().setUseWrapMode(d),this.editor.setShowPrintMargin(f),this.editor.on(`focus`,this.onFocus),this.editor.on(`blur`,this.onBlur),this.editor.on(`copy`,this.onCopy),this.editor.on(`paste`,this.onPaste),this.editor.on(`change`,this.onChange),this.editor.on(`input`,this.onInput),y&&this.updatePlaceholder(),this.editor.getSession().selection.on(`changeSelection`,this.onSelectionChange),this.editor.getSession().selection.on(`changeCursor`,this.onCursorChange),n&&this.editor.getSession().on(`changeAnnotation`,()=>{let e=this.editor.getSession().getAnnotations();this.props.onValidate(e)}),this.editor.session.on(`changeScrollTop`,this.onScroll),this.editor.getSession().setAnnotations(_||[]),v&&v.length>0&&this.handleMarkers(v);let x=this.editor.$options;YS.forEach(e=>{x.hasOwnProperty(e)?this.editor.setOption(e,this.props[e]):this.props[e]&&console.warn(`ReactAce: editor option ${e} was activated but not found. Did you need to import a related tool or did you possibly mispell the option?`)}),this.handleOptions(this.props),Array.isArray(g)&&g.forEach(e=>{typeof e.exec==`string`?this.editor.commands.bindKey(e.bindKey,e.exec):this.editor.commands.addCommand(e)}),m&&this.editor.setKeyboardHandler(`ace/keyboard/`+m),e&&(this.refEditor.className+=` `+e),h&&h(this.editor),this.editor.resize(),i&&this.editor.focus()}componentDidUpdate(e){let t=e,n=this.props;for(let e=0;e<YS.length;e++){let r=YS[e];n[r]!==t[r]&&this.editor.setOption(r,n[r])}if(n.className!==t.className){let e=this.refEditor.className.trim().split(` `);t.className.trim().split(` `).forEach(t=>{let n=e.indexOf(t);e.splice(n,1)}),this.refEditor.className=` `+n.className+` `+e.join(` `)}let r=this.editor&&n.value!=null&&this.editor.getValue()!==n.value;if(r){this.silent=!0;let e=this.editor.session.selection.toJSON();this.editor.setValue(n.value,n.cursorStart),this.editor.session.selection.fromJSON(e),this.silent=!1}n.placeholder!==t.placeholder&&this.updatePlaceholder(),n.mode!==t.mode&&this.editor.getSession().setMode(typeof n.mode==`string`?`ace/mode/${n.mode}`:n.mode),n.theme!==t.theme&&this.editor.setTheme(`ace/theme/`+n.theme),n.keyboardHandler!==t.keyboardHandler&&(n.keyboardHandler?this.editor.setKeyboardHandler(`ace/keyboard/`+n.keyboardHandler):this.editor.setKeyboardHandler(null)),n.fontSize!==t.fontSize&&this.editor.setFontSize(typeof n.fontSize==`number`?`${n.fontSize}px`:n.fontSize),n.lineHeight!==t.lineHeight&&(this.editor.container.style.lineHeight=typeof n.lineHeight==`number`?`${n.lineHeight}px`:n.lineHeight,this.editor.renderer.updateFontSize()),n.wrapEnabled!==t.wrapEnabled&&this.editor.getSession().setUseWrapMode(n.wrapEnabled),n.showPrintMargin!==t.showPrintMargin&&this.editor.setShowPrintMargin(n.showPrintMargin),n.showGutter!==t.showGutter&&this.editor.renderer.setShowGutter(n.showGutter),JC(n.setOptions,t.setOptions)||this.handleOptions(n),(r||!JC(n.annotations,t.annotations))&&this.editor.getSession().setAnnotations(n.annotations||[]);let i=t.markers||[],a=n.markers||[];JC(i,a)||this.handleMarkers(a),JC(n.scrollMargin,t.scrollMargin)||this.handleScrollMargins(n.scrollMargin),(e.height!==this.props.height||e.width!==this.props.width)&&this.editor.resize(),this.props.focus&&!e.focus&&this.editor.focus()}handleScrollMargins(e=[0,0,0,0]){this.editor.renderer.setScrollMargin(e[0],e[1],e[2],e[3])}componentWillUnmount(){this.editor&&=(this.editor.destroy(),null)}onChange(e){if(this.editor&&this.props.onChange&&!this.silent){let t=this.editor.getValue();this.props.onChange(t,e)}}onSelectionChange(e){if(this.props.onSelectionChange){let t=this.editor.getSelection();this.props.onSelectionChange(t,e)}}onCursorChange(e){if(this.props.onCursorChange){let t=this.editor.getSelection();this.props.onCursorChange(t,e)}}onInput(e){this.props.onInput&&this.props.onInput(e),this.props.placeholder&&this.updatePlaceholder()}onFocus(e){this.props.onFocus&&this.props.onFocus(e,this.editor)}onBlur(e){this.props.onBlur&&this.props.onBlur(e,this.editor)}onCopy({text:e}){this.props.onCopy&&this.props.onCopy(e)}onPaste({text:e}){this.props.onPaste&&this.props.onPaste(e)}onScroll(){this.props.onScroll&&this.props.onScroll(this.editor)}handleOptions(e){let t=Object.keys(e.setOptions);for(let n=0;n<t.length;n++)this.editor.setOption(t[n],e.setOptions[t[n]])}handleMarkers(e){let t=this.editor.getSession().getMarkers(!0);for(let e in t)t.hasOwnProperty(e)&&this.editor.getSession().removeMarker(t[e].id);t=this.editor.getSession().getMarkers(!1);for(let e in t)t.hasOwnProperty(e)&&t[e].clazz!==`ace_active-line`&&t[e].clazz!==`ace_selected-word`&&this.editor.getSession().removeMarker(t[e].id);e.forEach(({startRow:e,startCol:t,endRow:n,endCol:r,className:i,type:a,inFront:o=!1})=>{let s=new JS.Range(e,t,n,r);this.editor.getSession().addMarker(s,i,a,o)})}updatePlaceholder(){let e=this.editor,{placeholder:t}=this.props,n=!e.session.getValue().length,r=e.renderer.placeholderNode;!n&&r?(e.renderer.scroller.removeChild(e.renderer.placeholderNode),e.renderer.placeholderNode=null):n&&!r?(r=e.renderer.placeholderNode=document.createElement(`div`),r.textContent=t||``,r.className=`ace_comment ace_placeholder`,r.style.padding=`0 9px`,r.style.position=`absolute`,r.style.zIndex=`3`,e.renderer.scroller.appendChild(r)):n&&r&&(r.textContent=t)}updateRef(e){this.refEditor=e}render(){let{name:e,width:t,height:n,style:r}=this.props,i={width:t,height:n,...r};return w(`div`,{ref:this.updateRef,id:e,style:i})}};ZC.propTypes={mode:$.default.oneOfType([$.default.string,$.default.object]),focus:$.default.bool,theme:$.default.string,name:$.default.string,className:$.default.string,height:$.default.string,width:$.default.string,fontSize:$.default.oneOfType([$.default.number,$.default.string]),lineHeight:$.default.oneOfType([$.default.number,$.default.string]),showGutter:$.default.bool,onChange:$.default.func,onCopy:$.default.func,onPaste:$.default.func,onFocus:$.default.func,onInput:$.default.func,onBlur:$.default.func,onScroll:$.default.func,value:$.default.string,defaultValue:$.default.string,onLoad:$.default.func,onSelectionChange:$.default.func,onCursorChange:$.default.func,onBeforeLoad:$.default.func,onValidate:$.default.func,minLines:$.default.number,maxLines:$.default.number,readOnly:$.default.bool,highlightActiveLine:$.default.bool,tabSize:$.default.number,showPrintMargin:$.default.bool,cursorStart:$.default.number,debounceChangePeriod:$.default.number,editorProps:$.default.object,setOptions:$.default.object,style:$.default.object,scrollMargin:$.default.array,annotations:$.default.array,markers:$.default.array,keyboardHandler:$.default.string,wrapEnabled:$.default.bool,enableSnippets:$.default.bool,enableBasicAutocompletion:$.default.oneOfType([$.default.bool,$.default.array]),enableLiveAutocompletion:$.default.oneOfType([$.default.bool,$.default.array]),navigateToFileEnd:$.default.bool,commands:$.default.array,placeholder:$.default.string},ZC.defaultProps={name:`ace-editor`,focus:!1,mode:``,theme:``,height:`500px`,width:`500px`,fontSize:12,enableSnippets:!1,showGutter:!0,onChange:null,onPaste:null,onLoad:null,onScroll:null,minLines:null,maxLines:null,readOnly:!1,highlightActiveLine:!0,showPrintMargin:!0,tabSize:4,cursorStart:1,editorProps:{},style:{},scrollMargin:[0,0,0,0],setOptions:{},wrapEnabled:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,placeholder:null,navigateToFileEnd:!0};var QC=r(((e,t)=>{ace.define(`ace/split`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/lib/lang`,`ace/lib/event_emitter`,`ace/editor`,`ace/virtual_renderer`,`ace/edit_session`],function(e,t,n){var r=e("./lib/oop");e("./lib/lang");var i=e("./lib/event_emitter").EventEmitter,a=e("./editor").Editor,o=e("./virtual_renderer").VirtualRenderer,s=e("./edit_session").EditSession,c=function(e,t,n){this.BELOW=1,this.BESIDE=0,this.$container=e,this.$theme=t,this.$splits=0,this.$editorCSS=``,this.$editors=[],this.$orientation=this.BESIDE,this.setSplits(n||1),this.$cEditor=this.$editors[0],this.on(`focus`,function(e){this.$cEditor=e}.bind(this))};(function(){r.implement(this,i),this.$createEditor=function(){var e=document.createElement(`div`);e.className=this.$editorCSS,e.style.cssText=`position: absolute; top:0px; bottom:0px`,this.$container.appendChild(e);var t=new a(new o(e,this.$theme));return t.on(`focus`,function(){this._emit(`focus`,t)}.bind(this)),this.$editors.push(t),t.setFontSize(this.$fontSize),t},this.setSplits=function(e){var t;if(e<1)throw`The number of splits have to be > 0!`;if(e!=this.$splits){if(e>this.$splits){for(;this.$splits<this.$editors.length&&this.$splits<e;)t=this.$editors[this.$splits],this.$container.appendChild(t.container),t.setFontSize(this.$fontSize),this.$splits++;for(;this.$splits<e;)this.$createEditor(),this.$splits++}else for(;this.$splits>e;)t=this.$editors[this.$splits-1],this.$container.removeChild(t.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(e){return this.$editors[e]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(e){this.$editors.forEach(function(t){t.setTheme(e)})},this.setKeyboardHandler=function(e){this.$editors.forEach(function(t){t.setKeyboardHandler(e)})},this.forEach=function(e,t){this.$editors.forEach(e,t)},this.$fontSize=``,this.setFontSize=function(e){this.$fontSize=e,this.forEach(function(t){t.setFontSize(e)})},this.$cloneSession=function(e){var t=new s(e.getDocument(),e.getMode()),n=e.getUndoManager();return t.setUndoManager(n),t.setTabSize(e.getTabSize()),t.setUseSoftTabs(e.getUseSoftTabs()),t.setOverwrite(e.getOverwrite()),t.setBreakpoints(e.getBreakpoints()),t.setUseWrapMode(e.getUseWrapMode()),t.setUseWorker(e.getUseWorker()),t.setWrapLimitRange(e.$wrapLimitRange.min,e.$wrapLimitRange.max),t.$foldData=e.$cloneFoldData(),t},this.setSession=function(e,t){var n=t==null?this.$cEditor:this.$editors[t];return this.$editors.some(function(t){return t.session===e})&&(e=this.$cloneSession(e)),n.setSession(e),e},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(e){this.$orientation!=e&&(this.$orientation=e,this.resize())},this.resize=function(){var e=this.$container.clientWidth,t=this.$container.clientHeight,n;if(this.$orientation==this.BESIDE)for(var r=e/this.$splits,i=0;i<this.$splits;i++)n=this.$editors[i],n.container.style.width=r+`px`,n.container.style.top=`0px`,n.container.style.left=i*r+`px`,n.container.style.height=t+`px`,n.resize();else for(var a=t/this.$splits,i=0;i<this.$splits;i++)n=this.$editors[i],n.container.style.width=e+`px`,n.container.style.top=i*a+`px`,n.container.style.left=`0px`,n.container.style.height=a+`px`,n.resize()}}).call(c.prototype),t.Split=c}),ace.define(`ace/ext/split`,[`require`,`exports`,`module`,`ace/ext/split`,`ace/split`],function(e,t,n){n.exports=e("../split")}),(function(){ace.require([`ace/ext/split`],function(n){typeof t==`object`&&typeof e==`object`&&t&&(t.exports=n)})})()}));g();var $C=n(QC(),1),ew=ZS(),{Split:tw}=$C.default,nw=class extends s{constructor(e){super(e),XS.forEach(e=>{this[e]=this[e].bind(this)}),this.debounce=QS}isInShadow(e){let t=e&&e.parentNode;for(;t;){if(t.toString()===`[object ShadowRoot]`)return!0;t=t.parentNode}return!1}componentDidMount(){let{className:e,onBeforeLoad:t,mode:n,focus:r,theme:i,fontSize:a,value:o,defaultValue:s,cursorStart:c,showGutter:l,wrapEnabled:u,showPrintMargin:d,scrollMargin:f=[0,0,0,0],keyboardHandler:p,onLoad:m,commands:h,annotations:g,markers:_,splits:v}=this.props;this.editor=ew.edit(this.refEditor),this.isInShadow(this.refEditor)&&this.editor.renderer.attachToShadowRoot(),this.editor.setTheme(`ace/theme/${i}`),t&&t(ew);let y=Object.keys(this.props.editorProps),b=new tw(this.editor.container,`ace/theme/${i}`,v);this.editor.env.split=b,this.splitEditor=b.getEditor(0),this.split=b,this.editor.setShowPrintMargin(!1),this.editor.renderer.setShowGutter(!1);let x=this.splitEditor.$options;this.props.debounceChangePeriod&&(this.onChange=this.debounce(this.onChange,this.props.debounceChangePeriod)),b.forEach((e,t)=>{for(let t=0;t<y.length;t++)e[y[t]]=this.props.editorProps[y[t]];let r=s==null?void 0:s[t],m=(o==null?void 0:o[t])??``;e.session.setUndoManager(new ew.UndoManager),e.setTheme(`ace/theme/${i}`),e.renderer.setScrollMargin(f[0],f[1],f[2],f[3]),e.getSession().setMode(`ace/mode/${n}`),e.setFontSize(a),e.renderer.setShowGutter(l),e.getSession().setUseWrapMode(u),e.setShowPrintMargin(d),e.on(`focus`,e=>this.onFocus(e,t)),e.on(`blur`,this.onBlur),e.on(`input`,this.onInput),e.on(`copy`,this.onCopy),e.on(`paste`,this.onPaste),e.on(`change`,this.onChange),e.getSession().selection.on(`changeSelection`,this.onSelectionChange),e.getSession().selection.on(`changeCursor`,this.onCursorChange),e.session.on(`changeScrollTop`,this.onScroll),e.setValue(r===void 0?m:r,c);let v=(g==null?void 0:g[t])??[],b=(_==null?void 0:_[t])??[];e.getSession().setAnnotations(v),b&&b.length>0&&this.handleMarkers(b,e);for(let t=0;t<YS.length;t++){let n=YS[t];x.hasOwnProperty(n)?e.setOption(n,this.props[n]):this.props[n]&&console.warn(`ReactAce: editor option ${n} was activated but not found. Did you need to import a related tool or did you possibly misspell the option?`)}this.handleOptions(this.props,e),Array.isArray(h)&&h.forEach(t=>{typeof t.exec==`string`?e.commands.bindKey(t.bindKey,t.exec):e.commands.addCommand(t)}),p&&e.setKeyboardHandler(`ace/keyboard/`+p)}),e&&(this.refEditor.className+=` `+e),r&&this.splitEditor.focus();let S=this.editor.env.split;S.setOrientation(this.props.orientation===`below`?S.BELOW:S.BESIDE),S.resize(!0),m&&m(S)}componentDidUpdate(e){let t=e,n=this.props,r=this.editor.env.split;if(n.splits!==t.splits&&r.setSplits(n.splits),n.orientation!==t.orientation&&r.setOrientation(n.orientation===`below`?r.BELOW:r.BESIDE),r.forEach((e,r)=>{var i,a,o,s,c;n.mode!==t.mode&&e.getSession().setMode(`ace/mode/`+n.mode),n.keyboardHandler!==t.keyboardHandler&&(n.keyboardHandler?e.setKeyboardHandler(`ace/keyboard/`+n.keyboardHandler):e.setKeyboardHandler(null)),n.fontSize!==t.fontSize&&e.setFontSize(n.fontSize),n.wrapEnabled!==t.wrapEnabled&&e.getSession().setUseWrapMode(n.wrapEnabled),n.showPrintMargin!==t.showPrintMargin&&e.setShowPrintMargin(n.showPrintMargin),n.showGutter!==t.showGutter&&e.renderer.setShowGutter(n.showGutter);for(let r=0;r<YS.length;r++){let i=YS[r];n[i]!==t[i]&&e.setOption(i,n[i])}JC(n.setOptions,t.setOptions)||this.handleOptions(n,e);let l=((i=n.value)==null?void 0:i[r])??``;if(e.getValue()!==l){this.silent=!0;let t=e.session.selection.toJSON();e.setValue(l,n.cursorStart),e.session.selection.fromJSON(t),this.silent=!1}let u=((a=n.annotations)==null?void 0:a[r])??[];JC(u,((o=t.annotations)==null?void 0:o[r])??[])||e.getSession().setAnnotations(u);let d=((s=n.markers)==null?void 0:s[r])??[];!JC(d,((c=t.markers)==null?void 0:c[r])??[])&&Array.isArray(d)&&this.handleMarkers(d,e)}),n.className!==t.className){let e=this.refEditor.className.trim().split(` `);t.className.trim().split(` `).forEach(t=>{let n=e.indexOf(t);e.splice(n,1)}),this.refEditor.className=` `+n.className+` `+e.join(` `)}n.theme!==t.theme&&r.setTheme(`ace/theme/`+n.theme),n.focus&&!t.focus&&this.splitEditor.focus(),(n.height!==this.props.height||n.width!==this.props.width)&&this.editor.resize()}componentWillUnmount(){this.editor.destroy(),this.editor=null}onChange(e){if(this.props.onChange&&!this.silent){let t=[];this.editor.env.split.forEach(e=>{t.push(e.getValue())}),this.props.onChange(t,e)}}onSelectionChange(e){if(this.props.onSelectionChange){let t=[];this.editor.env.split.forEach(e=>{t.push(e.getSelection())}),this.props.onSelectionChange(t,e)}}onCursorChange(e){if(this.props.onCursorChange){let t=[];this.editor.env.split.forEach(e=>{t.push(e.getSelection())}),this.props.onCursorChange(t,e)}}onFocus(e,t){this.props.onFocus&&this.props.onFocus(e,t)}onInput(e){this.props.onInput&&this.props.onInput(e)}onBlur(e){this.props.onBlur&&this.props.onBlur(e)}onCopy(e){this.props.onCopy&&this.props.onCopy(e)}onPaste(e){this.props.onPaste&&this.props.onPaste(e)}onScroll(){this.props.onScroll&&this.props.onScroll(this.editor)}handleOptions(e,t){let n=Object.keys(e.setOptions);for(let r=0;r<n.length;r++)t.setOption(n[r],e.setOptions[n[r]])}handleMarkers(e,t){let n=t.getSession().getMarkers(!0);for(let e in n)n.hasOwnProperty(e)&&t.getSession().removeMarker(n[e].id);n=t.getSession().getMarkers(!1);for(let e in n)n.hasOwnProperty(e)&&t.getSession().removeMarker(n[e].id);e.forEach(({startRow:e,startCol:n,endRow:r,endCol:i,className:a,type:o,inFront:s=!1})=>{let c=new JS.Range(e,n,r,i);t.getSession().addMarker(c,a,o,s)})}updateRef(e){this.refEditor=e}render(){let{name:e,width:t,height:n,style:r}=this.props,i={width:t,height:n,...r};return w(`div`,{ref:this.updateRef,id:e,style:i})}};nw.propTypes={className:$.default.string,debounceChangePeriod:$.default.number,defaultValue:$.default.arrayOf($.default.string),focus:$.default.bool,fontSize:$.default.oneOfType([$.default.number,$.default.string]),height:$.default.string,mode:$.default.string,name:$.default.string,onBlur:$.default.func,onChange:$.default.func,onCopy:$.default.func,onFocus:$.default.func,onInput:$.default.func,onLoad:$.default.func,onPaste:$.default.func,onScroll:$.default.func,orientation:$.default.string,showGutter:$.default.bool,splits:$.default.number,theme:$.default.string,value:$.default.arrayOf($.default.string),width:$.default.string,onSelectionChange:$.default.func,onCursorChange:$.default.func,onBeforeLoad:$.default.func,minLines:$.default.number,maxLines:$.default.number,readOnly:$.default.bool,highlightActiveLine:$.default.bool,tabSize:$.default.number,showPrintMargin:$.default.bool,cursorStart:$.default.number,editorProps:$.default.object,setOptions:$.default.object,style:$.default.object,scrollMargin:$.default.array,annotations:$.default.array,markers:$.default.array,keyboardHandler:$.default.string,wrapEnabled:$.default.bool,enableBasicAutocompletion:$.default.oneOfType([$.default.bool,$.default.array]),enableLiveAutocompletion:$.default.oneOfType([$.default.bool,$.default.array]),commands:$.default.array},nw.defaultProps={name:`ace-editor`,focus:!1,orientation:`beside`,splits:2,mode:``,theme:``,height:`500px`,width:`500px`,value:[],fontSize:12,showGutter:!0,onChange:null,onPaste:null,onLoad:null,onScroll:null,minLines:null,maxLines:null,readOnly:!1,highlightActiveLine:!0,showPrintMargin:!0,tabSize:4,cursorStart:1,editorProps:{},style:{},scrollMargin:[0,0,0,0],setOptions:{},wrapEnabled:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1};var rw=r(((e,t)=>{var n=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},r=-1,i=1,a=0;n.Diff=function(e,t){return[e,t]},n.prototype.diff_main=function(e,t,r,i){i===void 0&&(i=this.Diff_Timeout<=0?Number.MAX_VALUE:new Date().getTime()+this.Diff_Timeout*1e3);var o=i;if(e==null||t==null)throw Error(`Null input. (diff_main)`);if(e==t)return e?[new n.Diff(a,e)]:[];r===void 0&&(r=!0);var s=r,c=this.diff_commonPrefix(e,t),l=e.substring(0,c);e=e.substring(c),t=t.substring(c),c=this.diff_commonSuffix(e,t);var u=e.substring(e.length-c);e=e.substring(0,e.length-c),t=t.substring(0,t.length-c);var d=this.diff_compute_(e,t,s,o);return l&&d.unshift(new n.Diff(a,l)),u&&d.push(new n.Diff(a,u)),this.diff_cleanupMerge(d),d},n.prototype.diff_compute_=function(e,t,o,s){var c;if(!e)return[new n.Diff(i,t)];if(!t)return[new n.Diff(r,e)];var l=e.length>t.length?e:t,u=e.length>t.length?t:e,d=l.indexOf(u);if(d!=-1)return c=[new n.Diff(i,l.substring(0,d)),new n.Diff(a,u),new n.Diff(i,l.substring(d+u.length))],e.length>t.length&&(c[0][0]=c[2][0]=r),c;if(u.length==1)return[new n.Diff(r,e),new n.Diff(i,t)];var f=this.diff_halfMatch_(e,t);if(f){var p=f[0],m=f[1],h=f[2],g=f[3],_=f[4],v=this.diff_main(p,h,o,s),y=this.diff_main(m,g,o,s);return v.concat([new n.Diff(a,_)],y)}return o&&e.length>100&&t.length>100?this.diff_lineMode_(e,t,s):this.diff_bisect_(e,t,s)},n.prototype.diff_lineMode_=function(e,t,o){var s=this.diff_linesToChars_(e,t);e=s.chars1,t=s.chars2;var c=s.lineArray,l=this.diff_main(e,t,!1,o);this.diff_charsToLines_(l,c),this.diff_cleanupSemantic(l),l.push(new n.Diff(a,``));for(var u=0,d=0,f=0,p=``,m=``;u<l.length;){switch(l[u][0]){case i:f++,m+=l[u][1];break;case r:d++,p+=l[u][1];break;case a:if(d>=1&&f>=1){l.splice(u-d-f,d+f),u=u-d-f;for(var h=this.diff_main(p,m,!1,o),g=h.length-1;g>=0;g--)l.splice(u,0,h[g]);u+=h.length}f=0,d=0,p=``,m=``}u++}return l.pop(),l},n.prototype.diff_bisect_=function(e,t,a){for(var o=e.length,s=t.length,c=Math.ceil((o+s)/2),l=c,u=2*c,d=Array(u),f=Array(u),p=0;p<u;p++)d[p]=-1,f[p]=-1;d[l+1]=0,f[l+1]=0;for(var m=o-s,h=m%2!=0,g=0,_=0,v=0,y=0,b=0;b<c&&!(new Date().getTime()>a);b++){for(var x=-b+g;x<=b-_;x+=2){for(var S=l+x,C=x==-b||x!=b&&d[S-1]<d[S+1]?d[S+1]:d[S-1]+1,w=C-x;C<o&&w<s&&e.charAt(C)==t.charAt(w);)C++,w++;if(d[S]=C,C>o)_+=2;else if(w>s)g+=2;else if(h){var T=l+m-x;if(T>=0&&T<u&&f[T]!=-1){var E=o-f[T];if(C>=E)return this.diff_bisectSplit_(e,t,C,w,a)}}}for(var D=-b+v;D<=b-y;D+=2){for(var T=l+D,E=D==-b||D!=b&&f[T-1]<f[T+1]?f[T+1]:f[T-1]+1,O=E-D;E<o&&O<s&&e.charAt(o-E-1)==t.charAt(s-O-1);)E++,O++;if(f[T]=E,E>o)y+=2;else if(O>s)v+=2;else if(!h){var S=l+m-D;if(S>=0&&S<u&&d[S]!=-1){var C=d[S],w=l+C-S;if(E=o-E,C>=E)return this.diff_bisectSplit_(e,t,C,w,a)}}}}return[new n.Diff(r,e),new n.Diff(i,t)]},n.prototype.diff_bisectSplit_=function(e,t,n,r,i){var a=e.substring(0,n),o=t.substring(0,r),s=e.substring(n),c=t.substring(r),l=this.diff_main(a,o,!1,i),u=this.diff_main(s,c,!1,i);return l.concat(u)},n.prototype.diff_linesToChars_=function(e,t){var n=[],r={};n[0]=``;function i(e){for(var t=``,i=0,o=-1,s=n.length;o<e.length-1;){o=e.indexOf(`
|
|
996
|
+
`,`error_marker.css`,!1)}),ace.define(`ace/ace`,[`require`,`exports`,`module`,`ace/lib/dom`,`ace/range`,`ace/editor`,`ace/edit_session`,`ace/undomanager`,`ace/virtual_renderer`,`ace/worker/worker_client`,`ace/keyboard/hash_handler`,`ace/placeholder`,`ace/multi_select`,`ace/mode/folding/fold_mode`,`ace/theme/textmate`,`ace/ext/error_marker`,`ace/config`,`ace/loader_build`],function(e,t,n){e("./loader_build")(t);var r=e("./lib/dom"),i=e("./range").Range,a=e("./editor").Editor,o=e("./edit_session").EditSession,s=e("./undomanager").UndoManager,c=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.edit=function(e,n){if(typeof e==`string`){var i=e;if(e=document.getElementById(i),!e)throw Error(`ace.edit can't find div #`+i)}if(e&&e.env&&e.env.editor instanceof a)return e.env.editor;var o=``;if(e&&/input|textarea/i.test(e.tagName)){var s=e;o=s.value,e=r.createElement(`pre`),s.parentNode.replaceChild(e,s)}else e&&(o=e.textContent,e.innerHTML=``);var l=t.createEditSession(o),u=new a(new c(e),l,n),d={document:l,editor:u,onResize:u.resize.bind(u,null)};return s&&(d.textarea=s),u.on(`destroy`,function(){d.editor.container.env=null}),u.container.env=u.env=d,u},t.createEditSession=function(e,t){var n=new o(e,t);return n.setUndoManager(new s),n},t.Range=i,t.Editor=a,t.EditSession=o,t.UndoManager=s,t.VirtualRenderer=c,t.version=t.config.version}),(function(){ace.require([`ace/ace`],function(n){n&&(n.config.init(!0),n.define=ace.define);var r=(function(){return this})();for(var i in!r&&typeof window<`u`&&(r=window),!r&&typeof self<`u`&&(r=self),r.ace||(r.ace=n),n)n.hasOwnProperty(i)&&(r.ace[i]=n[i]);r.ace.default=r.ace,typeof t==`object`&&typeof e==`object`&&t&&(t.exports=r.ace)})})()}))(),1),aS=[`minLines`,`maxLines`,`readOnly`,`highlightActiveLine`,`tabSize`,`enableBasicAutocompletion`,`enableLiveAutocompletion`,`enableSnippets`],oS=[`onChange`,`onFocus`,`onInput`,`onBlur`,`onCopy`,`onPaste`,`onSelectionChange`,`onCursorChange`,`onScroll`,`handleOptions`,`updateRef`],sS=()=>{if(typeof window<`u`&&window.ace){let e=window.ace;return e.acequire=e.require||e.acequire,e}return iS.default},cS=(e,t)=>{let n=null;return function(){let r=this,i=arguments;clearTimeout(n),n=setTimeout(()=>{e.apply(r,i)},t)}},{getOwnPropertyNames:lS,getOwnPropertySymbols:uS}=Object,{hasOwnProperty:dS}=Object.prototype;function fS(e,t){return function(n,r,i){return e(n,r,i)&&t(n,r,i)}}function pS(e){return function(t,n,r){if(!t||!n||typeof t!=`object`||typeof n!=`object`)return e(t,n,r);let{cache:i}=r,a=i.get(t),o=i.get(n);if(a&&o)return a===n&&o===t;i.set(t,n),i.set(n,t);let s=e(t,n,r);return i.delete(t),i.delete(n),s}}function mS(e){return e==null?void 0:e[Symbol.toStringTag]}function hS(e){return lS(e).concat(uS(e))}var gS=Object.hasOwn||((e,t)=>dS.call(e,t));function _S(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var vS=`__v`,yS=`__o`,bS=`_owner`,{getOwnPropertyDescriptor:xS,keys:SS}=Object;function CS(e,t){return e.byteLength===t.byteLength&&IS(new Uint8Array(e),new Uint8Array(t))}function wS(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-->0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function TS(e,t){return e.byteLength===t.byteLength&&IS(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function ES(e,t){return _S(e.getTime(),t.getTime())}function DS(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function OS(e,t){return e===t}function kS(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let i=Array(r),a=e.entries(),o,s,c=0;for(;(o=a.next())&&!o.done;){let r=t.entries(),a=!1,l=0;for(;(s=r.next())&&!s.done;){if(i[l]){l++;continue}let r=o.value,u=s.value;if(n.equals(r[0],u[0],c,l,e,t,n)&&n.equals(r[1],u[1],r[0],u[0],e,t,n)){a=i[l]=!0;break}l++}if(!a)return!1;c++}return!0}var AS=_S;function jS(e,t,n){let r=SS(e),i=r.length;if(SS(t).length!==i)return!1;for(;i-->0;)if(!RS(e,t,n,r[i]))return!1;return!0}function MS(e,t,n){let r=hS(e),i=r.length;if(hS(t).length!==i)return!1;let a,o,s;for(;i-->0;)if(a=r[i],!RS(e,t,n,a)||(o=xS(e,a),s=xS(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function NS(e,t){return _S(e.valueOf(),t.valueOf())}function PS(e,t){return e.source===t.source&&e.flags===t.flags}function FS(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let i=Array(r),a=e.values(),o,s;for(;(o=a.next())&&!o.done;){let r=t.values(),a=!1,c=0;for(;(s=r.next())&&!s.done;){if(!i[c]&&n.equals(o.value,s.value,o.value,s.value,e,t,n)){a=i[c]=!0;break}c++}if(!a)return!1}return!0}function IS(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-->0;)if(e[n]!==t[n])return!1;return!0}function LS(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function RS(e,t,n,r){return(r===bS||r===yS||r===vS)&&(e.$$typeof||t.$$typeof)?!0:gS(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var zS=`[object ArrayBuffer]`,BS=`[object Arguments]`,VS=`[object Boolean]`,HS=`[object DataView]`,US=`[object Date]`,WS=`[object Error]`,GS=`[object Map]`,KS=`[object Number]`,qS=`[object Object]`,JS=`[object RegExp]`,YS=`[object Set]`,XS=`[object String]`,ZS={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},QS=`[object URL]`,$S=Object.prototype.toString;function eC({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:s,areObjectsEqual:c,arePrimitiveWrappersEqual:l,areRegExpsEqual:u,areSetsEqual:d,areTypedArraysEqual:f,areUrlsEqual:p,unknownTagComparators:m}){return function(h,g,_){if(h===g)return!0;if(h==null||g==null)return!1;let v=typeof h;if(v!==typeof g)return!1;if(v!==`object`)return v===`number`?s(h,g,_):v===`function`&&a(h,g,_);let y=h.constructor;if(y!==g.constructor)return!1;if(y===Object)return c(h,g,_);if(Array.isArray(h))return t(h,g,_);if(y===Date)return r(h,g,_);if(y===RegExp)return u(h,g,_);if(y===Map)return o(h,g,_);if(y===Set)return d(h,g,_);let b=$S.call(h);if(b===US)return r(h,g,_);if(b===JS)return u(h,g,_);if(b===GS)return o(h,g,_);if(b===YS)return d(h,g,_);if(b===qS)return typeof h.then!=`function`&&typeof g.then!=`function`&&c(h,g,_);if(b===QS)return p(h,g,_);if(b===WS)return i(h,g,_);if(b===BS)return c(h,g,_);if(ZS[b])return f(h,g,_);if(b===zS)return e(h,g,_);if(b===HS)return n(h,g,_);if(b===VS||b===KS||b===XS)return l(h,g,_);if(m){let e=m[b];if(!e){let t=mS(h);t&&(e=m[t])}if(e)return e(h,g,_)}return!1}}function tC({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:CS,areArraysEqual:n?MS:wS,areDataViewsEqual:TS,areDatesEqual:ES,areErrorsEqual:DS,areFunctionsEqual:OS,areMapsEqual:n?fS(kS,MS):kS,areNumbersEqual:AS,areObjectsEqual:n?MS:jS,arePrimitiveWrappersEqual:NS,areRegExpsEqual:PS,areSetsEqual:n?fS(FS,MS):FS,areTypedArraysEqual:n?fS(IS,MS):IS,areUrlsEqual:LS,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){let e=pS(r.areArraysEqual),t=pS(r.areMapsEqual),n=pS(r.areObjectsEqual),i=pS(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:e,areMapsEqual:t,areObjectsEqual:n,areSetsEqual:i})}return r}function nC(e){return function(t,n,r,i,a,o,s){return e(t,n,s)}}function rC({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(a,o){let{cache:s=e?new WeakMap:void 0,meta:c}=n();return t(a,o,{cache:s,equals:r,meta:c,strict:i})};if(e)return function(e,n){return t(e,n,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};let a={cache:void 0,equals:r,meta:void 0,strict:i};return function(e,n){return t(e,n,a)}}var iC=aC();aC({strict:!0}),aC({circular:!0}),aC({circular:!0,strict:!0}),aC({createInternalComparator:()=>_S}),aC({strict:!0,createInternalComparator:()=>_S}),aC({circular:!0,createInternalComparator:()=>_S}),aC({circular:!0,createInternalComparator:()=>_S,strict:!0});function aC(e={}){let{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,a=eC(tC(e));return rC({circular:t,comparator:a,createState:r,equals:n?n(a):nC(a),strict:i})}var $=n(ge(),1);g();var oC=sS(),sC=class extends s{constructor(e){super(e),oS.forEach(e=>{this[e]=this[e].bind(this)}),this.debounce=cS}isInShadow(e){let t=e&&e.parentNode;for(;t;){if(t.toString()===`[object ShadowRoot]`)return!0;t=t.parentNode}return!1}componentDidMount(){let{className:e,onBeforeLoad:t,onValidate:n,mode:r,focus:i,theme:a,fontSize:o,lineHeight:s,value:c,defaultValue:l,showGutter:u,wrapEnabled:d,showPrintMargin:f,scrollMargin:p=[0,0,0,0],keyboardHandler:m,onLoad:h,commands:g,annotations:_,markers:v,placeholder:y}=this.props;this.editor=oC.edit(this.refEditor),t&&t(oC);let b=Object.keys(this.props.editorProps);for(let e=0;e<b.length;e++)this.editor[b[e]]=this.props.editorProps[b[e]];this.props.debounceChangePeriod&&(this.onChange=this.debounce(this.onChange,this.props.debounceChangePeriod)),this.editor.renderer.setScrollMargin(p[0],p[1],p[2],p[3]),this.isInShadow(this.refEditor)&&this.editor.renderer.attachToShadowRoot(),this.editor.getSession().setMode(typeof r==`string`?`ace/mode/${r}`:r),a&&a!==``&&this.editor.setTheme(`ace/theme/${a}`),this.editor.setFontSize(typeof o==`number`?`${o}px`:o),s&&(this.editor.container.style.lineHeight=typeof s==`number`?`${s}px`:`${s}`,this.editor.renderer.updateFontSize()),this.editor.getSession().setValue(l||c||``),this.props.navigateToFileEnd&&this.editor.navigateFileEnd(),this.editor.renderer.setShowGutter(u),this.editor.getSession().setUseWrapMode(d),this.editor.setShowPrintMargin(f),this.editor.on(`focus`,this.onFocus),this.editor.on(`blur`,this.onBlur),this.editor.on(`copy`,this.onCopy),this.editor.on(`paste`,this.onPaste),this.editor.on(`change`,this.onChange),this.editor.on(`input`,this.onInput),y&&this.updatePlaceholder(),this.editor.getSession().selection.on(`changeSelection`,this.onSelectionChange),this.editor.getSession().selection.on(`changeCursor`,this.onCursorChange),n&&this.editor.getSession().on(`changeAnnotation`,()=>{let e=this.editor.getSession().getAnnotations();this.props.onValidate(e)}),this.editor.session.on(`changeScrollTop`,this.onScroll),this.editor.getSession().setAnnotations(_||[]),v&&v.length>0&&this.handleMarkers(v);let x=this.editor.$options;aS.forEach(e=>{x.hasOwnProperty(e)?this.editor.setOption(e,this.props[e]):this.props[e]&&console.warn(`ReactAce: editor option ${e} was activated but not found. Did you need to import a related tool or did you possibly mispell the option?`)}),this.handleOptions(this.props),Array.isArray(g)&&g.forEach(e=>{typeof e.exec==`string`?this.editor.commands.bindKey(e.bindKey,e.exec):this.editor.commands.addCommand(e)}),m&&this.editor.setKeyboardHandler(`ace/keyboard/`+m),e&&(this.refEditor.className+=` `+e),h&&h(this.editor),this.editor.resize(),i&&this.editor.focus()}componentDidUpdate(e){let t=e,n=this.props;for(let e=0;e<aS.length;e++){let r=aS[e];n[r]!==t[r]&&this.editor.setOption(r,n[r])}if(n.className!==t.className){let e=this.refEditor.className.trim().split(` `);t.className.trim().split(` `).forEach(t=>{let n=e.indexOf(t);e.splice(n,1)}),this.refEditor.className=` `+n.className+` `+e.join(` `)}let r=this.editor&&n.value!=null&&this.editor.getValue()!==n.value;if(r){this.silent=!0;let e=this.editor.session.selection.toJSON();this.editor.setValue(n.value,n.cursorStart),this.editor.session.selection.fromJSON(e),this.silent=!1}n.placeholder!==t.placeholder&&this.updatePlaceholder(),n.mode!==t.mode&&this.editor.getSession().setMode(typeof n.mode==`string`?`ace/mode/${n.mode}`:n.mode),n.theme!==t.theme&&this.editor.setTheme(`ace/theme/`+n.theme),n.keyboardHandler!==t.keyboardHandler&&(n.keyboardHandler?this.editor.setKeyboardHandler(`ace/keyboard/`+n.keyboardHandler):this.editor.setKeyboardHandler(null)),n.fontSize!==t.fontSize&&this.editor.setFontSize(typeof n.fontSize==`number`?`${n.fontSize}px`:n.fontSize),n.lineHeight!==t.lineHeight&&(this.editor.container.style.lineHeight=typeof n.lineHeight==`number`?`${n.lineHeight}px`:n.lineHeight,this.editor.renderer.updateFontSize()),n.wrapEnabled!==t.wrapEnabled&&this.editor.getSession().setUseWrapMode(n.wrapEnabled),n.showPrintMargin!==t.showPrintMargin&&this.editor.setShowPrintMargin(n.showPrintMargin),n.showGutter!==t.showGutter&&this.editor.renderer.setShowGutter(n.showGutter),iC(n.setOptions,t.setOptions)||this.handleOptions(n),(r||!iC(n.annotations,t.annotations))&&this.editor.getSession().setAnnotations(n.annotations||[]);let i=t.markers||[],a=n.markers||[];iC(i,a)||this.handleMarkers(a),iC(n.scrollMargin,t.scrollMargin)||this.handleScrollMargins(n.scrollMargin),(e.height!==this.props.height||e.width!==this.props.width)&&this.editor.resize(),this.props.focus&&!e.focus&&this.editor.focus()}handleScrollMargins(e=[0,0,0,0]){this.editor.renderer.setScrollMargin(e[0],e[1],e[2],e[3])}componentWillUnmount(){this.editor&&=(this.editor.destroy(),null)}onChange(e){if(this.editor&&this.props.onChange&&!this.silent){let t=this.editor.getValue();this.props.onChange(t,e)}}onSelectionChange(e){if(this.props.onSelectionChange){let t=this.editor.getSelection();this.props.onSelectionChange(t,e)}}onCursorChange(e){if(this.props.onCursorChange){let t=this.editor.getSelection();this.props.onCursorChange(t,e)}}onInput(e){this.props.onInput&&this.props.onInput(e),this.props.placeholder&&this.updatePlaceholder()}onFocus(e){this.props.onFocus&&this.props.onFocus(e,this.editor)}onBlur(e){this.props.onBlur&&this.props.onBlur(e,this.editor)}onCopy({text:e}){this.props.onCopy&&this.props.onCopy(e)}onPaste({text:e}){this.props.onPaste&&this.props.onPaste(e)}onScroll(){this.props.onScroll&&this.props.onScroll(this.editor)}handleOptions(e){let t=Object.keys(e.setOptions);for(let n=0;n<t.length;n++)this.editor.setOption(t[n],e.setOptions[t[n]])}handleMarkers(e){let t=this.editor.getSession().getMarkers(!0);for(let e in t)t.hasOwnProperty(e)&&this.editor.getSession().removeMarker(t[e].id);t=this.editor.getSession().getMarkers(!1);for(let e in t)t.hasOwnProperty(e)&&t[e].clazz!==`ace_active-line`&&t[e].clazz!==`ace_selected-word`&&this.editor.getSession().removeMarker(t[e].id);e.forEach(({startRow:e,startCol:t,endRow:n,endCol:r,className:i,type:a,inFront:o=!1})=>{let s=new iS.Range(e,t,n,r);this.editor.getSession().addMarker(s,i,a,o)})}updatePlaceholder(){let e=this.editor,{placeholder:t}=this.props,n=!e.session.getValue().length,r=e.renderer.placeholderNode;!n&&r?(e.renderer.scroller.removeChild(e.renderer.placeholderNode),e.renderer.placeholderNode=null):n&&!r?(r=e.renderer.placeholderNode=document.createElement(`div`),r.textContent=t||``,r.className=`ace_comment ace_placeholder`,r.style.padding=`0 9px`,r.style.position=`absolute`,r.style.zIndex=`3`,e.renderer.scroller.appendChild(r)):n&&r&&(r.textContent=t)}updateRef(e){this.refEditor=e}render(){let{name:e,width:t,height:n,style:r}=this.props,i={width:t,height:n,...r};return w(`div`,{ref:this.updateRef,id:e,style:i})}};sC.propTypes={mode:$.default.oneOfType([$.default.string,$.default.object]),focus:$.default.bool,theme:$.default.string,name:$.default.string,className:$.default.string,height:$.default.string,width:$.default.string,fontSize:$.default.oneOfType([$.default.number,$.default.string]),lineHeight:$.default.oneOfType([$.default.number,$.default.string]),showGutter:$.default.bool,onChange:$.default.func,onCopy:$.default.func,onPaste:$.default.func,onFocus:$.default.func,onInput:$.default.func,onBlur:$.default.func,onScroll:$.default.func,value:$.default.string,defaultValue:$.default.string,onLoad:$.default.func,onSelectionChange:$.default.func,onCursorChange:$.default.func,onBeforeLoad:$.default.func,onValidate:$.default.func,minLines:$.default.number,maxLines:$.default.number,readOnly:$.default.bool,highlightActiveLine:$.default.bool,tabSize:$.default.number,showPrintMargin:$.default.bool,cursorStart:$.default.number,debounceChangePeriod:$.default.number,editorProps:$.default.object,setOptions:$.default.object,style:$.default.object,scrollMargin:$.default.array,annotations:$.default.array,markers:$.default.array,keyboardHandler:$.default.string,wrapEnabled:$.default.bool,enableSnippets:$.default.bool,enableBasicAutocompletion:$.default.oneOfType([$.default.bool,$.default.array]),enableLiveAutocompletion:$.default.oneOfType([$.default.bool,$.default.array]),navigateToFileEnd:$.default.bool,commands:$.default.array,placeholder:$.default.string},sC.defaultProps={name:`ace-editor`,focus:!1,mode:``,theme:``,height:`500px`,width:`500px`,fontSize:12,enableSnippets:!1,showGutter:!0,onChange:null,onPaste:null,onLoad:null,onScroll:null,minLines:null,maxLines:null,readOnly:!1,highlightActiveLine:!0,showPrintMargin:!0,tabSize:4,cursorStart:1,editorProps:{},style:{},scrollMargin:[0,0,0,0],setOptions:{},wrapEnabled:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,placeholder:null,navigateToFileEnd:!0};var cC=r(((e,t)=>{ace.define(`ace/split`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/lib/lang`,`ace/lib/event_emitter`,`ace/editor`,`ace/virtual_renderer`,`ace/edit_session`],function(e,t,n){var r=e("./lib/oop");e("./lib/lang");var i=e("./lib/event_emitter").EventEmitter,a=e("./editor").Editor,o=e("./virtual_renderer").VirtualRenderer,s=e("./edit_session").EditSession,c=function(e,t,n){this.BELOW=1,this.BESIDE=0,this.$container=e,this.$theme=t,this.$splits=0,this.$editorCSS=``,this.$editors=[],this.$orientation=this.BESIDE,this.setSplits(n||1),this.$cEditor=this.$editors[0],this.on(`focus`,function(e){this.$cEditor=e}.bind(this))};(function(){r.implement(this,i),this.$createEditor=function(){var e=document.createElement(`div`);e.className=this.$editorCSS,e.style.cssText=`position: absolute; top:0px; bottom:0px`,this.$container.appendChild(e);var t=new a(new o(e,this.$theme));return t.on(`focus`,function(){this._emit(`focus`,t)}.bind(this)),this.$editors.push(t),t.setFontSize(this.$fontSize),t},this.setSplits=function(e){var t;if(e<1)throw`The number of splits have to be > 0!`;if(e!=this.$splits){if(e>this.$splits){for(;this.$splits<this.$editors.length&&this.$splits<e;)t=this.$editors[this.$splits],this.$container.appendChild(t.container),t.setFontSize(this.$fontSize),this.$splits++;for(;this.$splits<e;)this.$createEditor(),this.$splits++}else for(;this.$splits>e;)t=this.$editors[this.$splits-1],this.$container.removeChild(t.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(e){return this.$editors[e]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(e){this.$editors.forEach(function(t){t.setTheme(e)})},this.setKeyboardHandler=function(e){this.$editors.forEach(function(t){t.setKeyboardHandler(e)})},this.forEach=function(e,t){this.$editors.forEach(e,t)},this.$fontSize=``,this.setFontSize=function(e){this.$fontSize=e,this.forEach(function(t){t.setFontSize(e)})},this.$cloneSession=function(e){var t=new s(e.getDocument(),e.getMode()),n=e.getUndoManager();return t.setUndoManager(n),t.setTabSize(e.getTabSize()),t.setUseSoftTabs(e.getUseSoftTabs()),t.setOverwrite(e.getOverwrite()),t.setBreakpoints(e.getBreakpoints()),t.setUseWrapMode(e.getUseWrapMode()),t.setUseWorker(e.getUseWorker()),t.setWrapLimitRange(e.$wrapLimitRange.min,e.$wrapLimitRange.max),t.$foldData=e.$cloneFoldData(),t},this.setSession=function(e,t){var n=t==null?this.$cEditor:this.$editors[t];return this.$editors.some(function(t){return t.session===e})&&(e=this.$cloneSession(e)),n.setSession(e),e},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(e){this.$orientation!=e&&(this.$orientation=e,this.resize())},this.resize=function(){var e=this.$container.clientWidth,t=this.$container.clientHeight,n;if(this.$orientation==this.BESIDE)for(var r=e/this.$splits,i=0;i<this.$splits;i++)n=this.$editors[i],n.container.style.width=r+`px`,n.container.style.top=`0px`,n.container.style.left=i*r+`px`,n.container.style.height=t+`px`,n.resize();else for(var a=t/this.$splits,i=0;i<this.$splits;i++)n=this.$editors[i],n.container.style.width=e+`px`,n.container.style.top=i*a+`px`,n.container.style.left=`0px`,n.container.style.height=a+`px`,n.resize()}}).call(c.prototype),t.Split=c}),ace.define(`ace/ext/split`,[`require`,`exports`,`module`,`ace/ext/split`,`ace/split`],function(e,t,n){n.exports=e("../split")}),(function(){ace.require([`ace/ext/split`],function(n){typeof t==`object`&&typeof e==`object`&&t&&(t.exports=n)})})()}));g();var lC=n(cC(),1),uC=sS(),{Split:dC}=lC.default,fC=class extends s{constructor(e){super(e),oS.forEach(e=>{this[e]=this[e].bind(this)}),this.debounce=cS}isInShadow(e){let t=e&&e.parentNode;for(;t;){if(t.toString()===`[object ShadowRoot]`)return!0;t=t.parentNode}return!1}componentDidMount(){let{className:e,onBeforeLoad:t,mode:n,focus:r,theme:i,fontSize:a,value:o,defaultValue:s,cursorStart:c,showGutter:l,wrapEnabled:u,showPrintMargin:d,scrollMargin:f=[0,0,0,0],keyboardHandler:p,onLoad:m,commands:h,annotations:g,markers:_,splits:v}=this.props;this.editor=uC.edit(this.refEditor),this.isInShadow(this.refEditor)&&this.editor.renderer.attachToShadowRoot(),this.editor.setTheme(`ace/theme/${i}`),t&&t(uC);let y=Object.keys(this.props.editorProps),b=new dC(this.editor.container,`ace/theme/${i}`,v);this.editor.env.split=b,this.splitEditor=b.getEditor(0),this.split=b,this.editor.setShowPrintMargin(!1),this.editor.renderer.setShowGutter(!1);let x=this.splitEditor.$options;this.props.debounceChangePeriod&&(this.onChange=this.debounce(this.onChange,this.props.debounceChangePeriod)),b.forEach((e,t)=>{for(let t=0;t<y.length;t++)e[y[t]]=this.props.editorProps[y[t]];let r=s==null?void 0:s[t],m=(o==null?void 0:o[t])??``;e.session.setUndoManager(new uC.UndoManager),e.setTheme(`ace/theme/${i}`),e.renderer.setScrollMargin(f[0],f[1],f[2],f[3]),e.getSession().setMode(`ace/mode/${n}`),e.setFontSize(a),e.renderer.setShowGutter(l),e.getSession().setUseWrapMode(u),e.setShowPrintMargin(d),e.on(`focus`,e=>this.onFocus(e,t)),e.on(`blur`,this.onBlur),e.on(`input`,this.onInput),e.on(`copy`,this.onCopy),e.on(`paste`,this.onPaste),e.on(`change`,this.onChange),e.getSession().selection.on(`changeSelection`,this.onSelectionChange),e.getSession().selection.on(`changeCursor`,this.onCursorChange),e.session.on(`changeScrollTop`,this.onScroll),e.setValue(r===void 0?m:r,c);let v=(g==null?void 0:g[t])??[],b=(_==null?void 0:_[t])??[];e.getSession().setAnnotations(v),b&&b.length>0&&this.handleMarkers(b,e);for(let t=0;t<aS.length;t++){let n=aS[t];x.hasOwnProperty(n)?e.setOption(n,this.props[n]):this.props[n]&&console.warn(`ReactAce: editor option ${n} was activated but not found. Did you need to import a related tool or did you possibly misspell the option?`)}this.handleOptions(this.props,e),Array.isArray(h)&&h.forEach(t=>{typeof t.exec==`string`?e.commands.bindKey(t.bindKey,t.exec):e.commands.addCommand(t)}),p&&e.setKeyboardHandler(`ace/keyboard/`+p)}),e&&(this.refEditor.className+=` `+e),r&&this.splitEditor.focus();let S=this.editor.env.split;S.setOrientation(this.props.orientation===`below`?S.BELOW:S.BESIDE),S.resize(!0),m&&m(S)}componentDidUpdate(e){let t=e,n=this.props,r=this.editor.env.split;if(n.splits!==t.splits&&r.setSplits(n.splits),n.orientation!==t.orientation&&r.setOrientation(n.orientation===`below`?r.BELOW:r.BESIDE),r.forEach((e,r)=>{var i,a,o,s,c;n.mode!==t.mode&&e.getSession().setMode(`ace/mode/`+n.mode),n.keyboardHandler!==t.keyboardHandler&&(n.keyboardHandler?e.setKeyboardHandler(`ace/keyboard/`+n.keyboardHandler):e.setKeyboardHandler(null)),n.fontSize!==t.fontSize&&e.setFontSize(n.fontSize),n.wrapEnabled!==t.wrapEnabled&&e.getSession().setUseWrapMode(n.wrapEnabled),n.showPrintMargin!==t.showPrintMargin&&e.setShowPrintMargin(n.showPrintMargin),n.showGutter!==t.showGutter&&e.renderer.setShowGutter(n.showGutter);for(let r=0;r<aS.length;r++){let i=aS[r];n[i]!==t[i]&&e.setOption(i,n[i])}iC(n.setOptions,t.setOptions)||this.handleOptions(n,e);let l=((i=n.value)==null?void 0:i[r])??``;if(e.getValue()!==l){this.silent=!0;let t=e.session.selection.toJSON();e.setValue(l,n.cursorStart),e.session.selection.fromJSON(t),this.silent=!1}let u=((a=n.annotations)==null?void 0:a[r])??[];iC(u,((o=t.annotations)==null?void 0:o[r])??[])||e.getSession().setAnnotations(u);let d=((s=n.markers)==null?void 0:s[r])??[];!iC(d,((c=t.markers)==null?void 0:c[r])??[])&&Array.isArray(d)&&this.handleMarkers(d,e)}),n.className!==t.className){let e=this.refEditor.className.trim().split(` `);t.className.trim().split(` `).forEach(t=>{let n=e.indexOf(t);e.splice(n,1)}),this.refEditor.className=` `+n.className+` `+e.join(` `)}n.theme!==t.theme&&r.setTheme(`ace/theme/`+n.theme),n.focus&&!t.focus&&this.splitEditor.focus(),(n.height!==this.props.height||n.width!==this.props.width)&&this.editor.resize()}componentWillUnmount(){this.editor.destroy(),this.editor=null}onChange(e){if(this.props.onChange&&!this.silent){let t=[];this.editor.env.split.forEach(e=>{t.push(e.getValue())}),this.props.onChange(t,e)}}onSelectionChange(e){if(this.props.onSelectionChange){let t=[];this.editor.env.split.forEach(e=>{t.push(e.getSelection())}),this.props.onSelectionChange(t,e)}}onCursorChange(e){if(this.props.onCursorChange){let t=[];this.editor.env.split.forEach(e=>{t.push(e.getSelection())}),this.props.onCursorChange(t,e)}}onFocus(e,t){this.props.onFocus&&this.props.onFocus(e,t)}onInput(e){this.props.onInput&&this.props.onInput(e)}onBlur(e){this.props.onBlur&&this.props.onBlur(e)}onCopy(e){this.props.onCopy&&this.props.onCopy(e)}onPaste(e){this.props.onPaste&&this.props.onPaste(e)}onScroll(){this.props.onScroll&&this.props.onScroll(this.editor)}handleOptions(e,t){let n=Object.keys(e.setOptions);for(let r=0;r<n.length;r++)t.setOption(n[r],e.setOptions[n[r]])}handleMarkers(e,t){let n=t.getSession().getMarkers(!0);for(let e in n)n.hasOwnProperty(e)&&t.getSession().removeMarker(n[e].id);n=t.getSession().getMarkers(!1);for(let e in n)n.hasOwnProperty(e)&&t.getSession().removeMarker(n[e].id);e.forEach(({startRow:e,startCol:n,endRow:r,endCol:i,className:a,type:o,inFront:s=!1})=>{let c=new iS.Range(e,n,r,i);t.getSession().addMarker(c,a,o,s)})}updateRef(e){this.refEditor=e}render(){let{name:e,width:t,height:n,style:r}=this.props,i={width:t,height:n,...r};return w(`div`,{ref:this.updateRef,id:e,style:i})}};fC.propTypes={className:$.default.string,debounceChangePeriod:$.default.number,defaultValue:$.default.arrayOf($.default.string),focus:$.default.bool,fontSize:$.default.oneOfType([$.default.number,$.default.string]),height:$.default.string,mode:$.default.string,name:$.default.string,onBlur:$.default.func,onChange:$.default.func,onCopy:$.default.func,onFocus:$.default.func,onInput:$.default.func,onLoad:$.default.func,onPaste:$.default.func,onScroll:$.default.func,orientation:$.default.string,showGutter:$.default.bool,splits:$.default.number,theme:$.default.string,value:$.default.arrayOf($.default.string),width:$.default.string,onSelectionChange:$.default.func,onCursorChange:$.default.func,onBeforeLoad:$.default.func,minLines:$.default.number,maxLines:$.default.number,readOnly:$.default.bool,highlightActiveLine:$.default.bool,tabSize:$.default.number,showPrintMargin:$.default.bool,cursorStart:$.default.number,editorProps:$.default.object,setOptions:$.default.object,style:$.default.object,scrollMargin:$.default.array,annotations:$.default.array,markers:$.default.array,keyboardHandler:$.default.string,wrapEnabled:$.default.bool,enableBasicAutocompletion:$.default.oneOfType([$.default.bool,$.default.array]),enableLiveAutocompletion:$.default.oneOfType([$.default.bool,$.default.array]),commands:$.default.array},fC.defaultProps={name:`ace-editor`,focus:!1,orientation:`beside`,splits:2,mode:``,theme:``,height:`500px`,width:`500px`,value:[],fontSize:12,showGutter:!0,onChange:null,onPaste:null,onLoad:null,onScroll:null,minLines:null,maxLines:null,readOnly:!1,highlightActiveLine:!0,showPrintMargin:!0,tabSize:4,cursorStart:1,editorProps:{},style:{},scrollMargin:[0,0,0,0],setOptions:{},wrapEnabled:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1};var pC=r(((e,t)=>{var n=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},r=-1,i=1,a=0;n.Diff=function(e,t){return[e,t]},n.prototype.diff_main=function(e,t,r,i){i===void 0&&(i=this.Diff_Timeout<=0?Number.MAX_VALUE:new Date().getTime()+this.Diff_Timeout*1e3);var o=i;if(e==null||t==null)throw Error(`Null input. (diff_main)`);if(e==t)return e?[new n.Diff(a,e)]:[];r===void 0&&(r=!0);var s=r,c=this.diff_commonPrefix(e,t),l=e.substring(0,c);e=e.substring(c),t=t.substring(c),c=this.diff_commonSuffix(e,t);var u=e.substring(e.length-c);e=e.substring(0,e.length-c),t=t.substring(0,t.length-c);var d=this.diff_compute_(e,t,s,o);return l&&d.unshift(new n.Diff(a,l)),u&&d.push(new n.Diff(a,u)),this.diff_cleanupMerge(d),d},n.prototype.diff_compute_=function(e,t,o,s){var c;if(!e)return[new n.Diff(i,t)];if(!t)return[new n.Diff(r,e)];var l=e.length>t.length?e:t,u=e.length>t.length?t:e,d=l.indexOf(u);if(d!=-1)return c=[new n.Diff(i,l.substring(0,d)),new n.Diff(a,u),new n.Diff(i,l.substring(d+u.length))],e.length>t.length&&(c[0][0]=c[2][0]=r),c;if(u.length==1)return[new n.Diff(r,e),new n.Diff(i,t)];var f=this.diff_halfMatch_(e,t);if(f){var p=f[0],m=f[1],h=f[2],g=f[3],_=f[4],v=this.diff_main(p,h,o,s),y=this.diff_main(m,g,o,s);return v.concat([new n.Diff(a,_)],y)}return o&&e.length>100&&t.length>100?this.diff_lineMode_(e,t,s):this.diff_bisect_(e,t,s)},n.prototype.diff_lineMode_=function(e,t,o){var s=this.diff_linesToChars_(e,t);e=s.chars1,t=s.chars2;var c=s.lineArray,l=this.diff_main(e,t,!1,o);this.diff_charsToLines_(l,c),this.diff_cleanupSemantic(l),l.push(new n.Diff(a,``));for(var u=0,d=0,f=0,p=``,m=``;u<l.length;){switch(l[u][0]){case i:f++,m+=l[u][1];break;case r:d++,p+=l[u][1];break;case a:if(d>=1&&f>=1){l.splice(u-d-f,d+f),u=u-d-f;for(var h=this.diff_main(p,m,!1,o),g=h.length-1;g>=0;g--)l.splice(u,0,h[g]);u+=h.length}f=0,d=0,p=``,m=``}u++}return l.pop(),l},n.prototype.diff_bisect_=function(e,t,a){for(var o=e.length,s=t.length,c=Math.ceil((o+s)/2),l=c,u=2*c,d=Array(u),f=Array(u),p=0;p<u;p++)d[p]=-1,f[p]=-1;d[l+1]=0,f[l+1]=0;for(var m=o-s,h=m%2!=0,g=0,_=0,v=0,y=0,b=0;b<c&&!(new Date().getTime()>a);b++){for(var x=-b+g;x<=b-_;x+=2){for(var S=l+x,C=x==-b||x!=b&&d[S-1]<d[S+1]?d[S+1]:d[S-1]+1,w=C-x;C<o&&w<s&&e.charAt(C)==t.charAt(w);)C++,w++;if(d[S]=C,C>o)_+=2;else if(w>s)g+=2;else if(h){var T=l+m-x;if(T>=0&&T<u&&f[T]!=-1){var E=o-f[T];if(C>=E)return this.diff_bisectSplit_(e,t,C,w,a)}}}for(var D=-b+v;D<=b-y;D+=2){for(var T=l+D,E=D==-b||D!=b&&f[T-1]<f[T+1]?f[T+1]:f[T-1]+1,O=E-D;E<o&&O<s&&e.charAt(o-E-1)==t.charAt(s-O-1);)E++,O++;if(f[T]=E,E>o)y+=2;else if(O>s)v+=2;else if(!h){var S=l+m-D;if(S>=0&&S<u&&d[S]!=-1){var C=d[S],w=l+C-S;if(E=o-E,C>=E)return this.diff_bisectSplit_(e,t,C,w,a)}}}}return[new n.Diff(r,e),new n.Diff(i,t)]},n.prototype.diff_bisectSplit_=function(e,t,n,r,i){var a=e.substring(0,n),o=t.substring(0,r),s=e.substring(n),c=t.substring(r),l=this.diff_main(a,o,!1,i),u=this.diff_main(s,c,!1,i);return l.concat(u)},n.prototype.diff_linesToChars_=function(e,t){var n=[],r={};n[0]=``;function i(e){for(var t=``,i=0,o=-1,s=n.length;o<e.length-1;){o=e.indexOf(`
|
|
997
997
|
`,i),o==-1&&(o=e.length-1);var c=e.substring(i,o+1);(r.hasOwnProperty?r.hasOwnProperty(c):r[c]!==void 0)?t+=String.fromCharCode(r[c]):(s==a&&(c=e.substring(i),o=e.length),t+=String.fromCharCode(s),r[c]=s,n[s++]=c),i=o+1}return t}var a=4e4,o=i(e);return a=65535,{chars1:o,chars2:i(t),lineArray:n}},n.prototype.diff_charsToLines_=function(e,t){for(var n=0;n<e.length;n++){for(var r=e[n][1],i=[],a=0;a<r.length;a++)i[a]=t[r.charCodeAt(a)];e[n][1]=i.join(``)}},n.prototype.diff_commonPrefix=function(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,a=0;n<i;)e.substring(a,i)==t.substring(a,i)?(n=i,a=n):r=i,i=Math.floor((r-n)/2+n);return i},n.prototype.diff_commonSuffix=function(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,a=0;n<i;)e.substring(e.length-i,e.length-a)==t.substring(t.length-i,t.length-a)?(n=i,a=n):r=i,i=Math.floor((r-n)/2+n);return i},n.prototype.diff_commonOverlap_=function(e,t){var n=e.length,r=t.length;if(n==0||r==0)return 0;n>r?e=e.substring(n-r):n<r&&(t=t.substring(0,n));var i=Math.min(n,r);if(e==t)return i;for(var a=0,o=1;;){var s=e.substring(i-o),c=t.indexOf(s);if(c==-1)return a;o+=c,(c==0||e.substring(i-o)==t.substring(0,o))&&(a=o,o++)}},n.prototype.diff_halfMatch_=function(e,t){if(this.Diff_Timeout<=0)return null;var n=e.length>t.length?e:t,r=e.length>t.length?t:e;if(n.length<4||r.length*2<n.length)return null;var i=this;function a(e,t,n){for(var r=e.substring(n,n+Math.floor(e.length/4)),a=-1,o=``,s,c,l,u;(a=t.indexOf(r,a+1))!=-1;){var d=i.diff_commonPrefix(e.substring(n),t.substring(a)),f=i.diff_commonSuffix(e.substring(0,n),t.substring(0,a));o.length<f+d&&(o=t.substring(a-f,a)+t.substring(a,a+d),s=e.substring(0,n-f),c=e.substring(n+d),l=t.substring(0,a-f),u=t.substring(a+d))}return o.length*2>=e.length?[s,c,l,u,o]:null}var o=a(n,r,Math.ceil(n.length/4)),s=a(n,r,Math.ceil(n.length/2)),c;if(!o&&!s)return null;c=s?o&&o[4].length>s[4].length?o:s:o;var l,u,d,f;e.length>t.length?(l=c[0],u=c[1],d=c[2],f=c[3]):(d=c[0],f=c[1],l=c[2],u=c[3]);var p=c[4];return[l,u,d,f,p]},n.prototype.diff_cleanupSemantic=function(e){for(var t=!1,o=[],s=0,c=null,l=0,u=0,d=0,f=0,p=0;l<e.length;)e[l][0]==a?(o[s++]=l,u=f,d=p,f=0,p=0,c=e[l][1]):(e[l][0]==i?f+=e[l][1].length:p+=e[l][1].length,c&&c.length<=Math.max(u,d)&&c.length<=Math.max(f,p)&&(e.splice(o[s-1],0,new n.Diff(r,c)),e[o[s-1]+1][0]=i,s--,s--,l=s>0?o[s-1]:-1,u=0,d=0,f=0,p=0,c=null,t=!0)),l++;for(t&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),l=1;l<e.length;){if(e[l-1][0]==r&&e[l][0]==i){var m=e[l-1][1],h=e[l][1],g=this.diff_commonOverlap_(m,h),_=this.diff_commonOverlap_(h,m);g>=_?(g>=m.length/2||g>=h.length/2)&&(e.splice(l,0,new n.Diff(a,h.substring(0,g))),e[l-1][1]=m.substring(0,m.length-g),e[l+1][1]=h.substring(g),l++):(_>=m.length/2||_>=h.length/2)&&(e.splice(l,0,new n.Diff(a,m.substring(0,_))),e[l-1][0]=i,e[l-1][1]=h.substring(0,h.length-_),e[l+1][0]=r,e[l+1][1]=m.substring(_),l++),l++}l++}},n.prototype.diff_cleanupSemanticLossless=function(e){function t(e,t){if(!e||!t)return 6;var r=e.charAt(e.length-1),i=t.charAt(0),a=r.match(n.nonAlphaNumericRegex_),o=i.match(n.nonAlphaNumericRegex_),s=a&&r.match(n.whitespaceRegex_),c=o&&i.match(n.whitespaceRegex_),l=s&&r.match(n.linebreakRegex_),u=c&&i.match(n.linebreakRegex_),d=l&&e.match(n.blanklineEndRegex_),f=u&&t.match(n.blanklineStartRegex_);return d||f?5:l||u?4:a&&!s&&c?3:s||c?2:a||o?1:0}for(var r=1;r<e.length-1;){if(e[r-1][0]==a&&e[r+1][0]==a){var i=e[r-1][1],o=e[r][1],s=e[r+1][1],c=this.diff_commonSuffix(i,o);if(c){var l=o.substring(o.length-c);i=i.substring(0,i.length-c),o=l+o.substring(0,o.length-c),s=l+s}for(var u=i,d=o,f=s,p=t(i,o)+t(o,s);o.charAt(0)===s.charAt(0);){i+=o.charAt(0),o=o.substring(1)+s.charAt(0),s=s.substring(1);var m=t(i,o)+t(o,s);m>=p&&(p=m,u=i,d=o,f=s)}e[r-1][1]!=u&&(u?e[r-1][1]=u:(e.splice(r-1,1),r--),e[r][1]=d,f?e[r+1][1]=f:(e.splice(r+1,1),r--))}r++}},n.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,n.whitespaceRegex_=/\s/,n.linebreakRegex_=/[\r\n]/,n.blanklineEndRegex_=/\n\r?\n$/,n.blanklineStartRegex_=/^\r?\n\r?\n/,n.prototype.diff_cleanupEfficiency=function(e){for(var t=!1,o=[],s=0,c=null,l=0,u=!1,d=!1,f=!1,p=!1;l<e.length;)e[l][0]==a?(e[l][1].length<this.Diff_EditCost&&(f||p)?(o[s++]=l,u=f,d=p,c=e[l][1]):(s=0,c=null),f=p=!1):(e[l][0]==r?p=!0:f=!0,c&&(u&&d&&f&&p||c.length<this.Diff_EditCost/2&&u+d+f+p==3)&&(e.splice(o[s-1],0,new n.Diff(r,c)),e[o[s-1]+1][0]=i,s--,c=null,u&&d?(f=p=!0,s=0):(s--,l=s>0?o[s-1]:-1,f=p=!1),t=!0)),l++;t&&this.diff_cleanupMerge(e)},n.prototype.diff_cleanupMerge=function(e){e.push(new n.Diff(a,``));for(var t=0,o=0,s=0,c=``,l=``,u;t<e.length;)switch(e[t][0]){case i:s++,l+=e[t][1],t++;break;case r:o++,c+=e[t][1],t++;break;case a:o+s>1?(o!==0&&s!==0&&(u=this.diff_commonPrefix(l,c),u!==0&&(t-o-s>0&&e[t-o-s-1][0]==a?e[t-o-s-1][1]+=l.substring(0,u):(e.splice(0,0,new n.Diff(a,l.substring(0,u))),t++),l=l.substring(u),c=c.substring(u)),u=this.diff_commonSuffix(l,c),u!==0&&(e[t][1]=l.substring(l.length-u)+e[t][1],l=l.substring(0,l.length-u),c=c.substring(0,c.length-u))),t-=o+s,e.splice(t,o+s),c.length&&(e.splice(t,0,new n.Diff(r,c)),t++),l.length&&(e.splice(t,0,new n.Diff(i,l)),t++),t++):t!==0&&e[t-1][0]==a?(e[t-1][1]+=e[t][1],e.splice(t,1)):t++,s=0,o=0,c=``,l=``}e[e.length-1][1]===``&&e.pop();var d=!1;for(t=1;t<e.length-1;)e[t-1][0]==a&&e[t+1][0]==a&&(e[t][1].substring(e[t][1].length-e[t-1][1].length)==e[t-1][1]?(e[t][1]=e[t-1][1]+e[t][1].substring(0,e[t][1].length-e[t-1][1].length),e[t+1][1]=e[t-1][1]+e[t+1][1],e.splice(t-1,1),d=!0):e[t][1].substring(0,e[t+1][1].length)==e[t+1][1]&&(e[t-1][1]+=e[t+1][1],e[t][1]=e[t][1].substring(e[t+1][1].length)+e[t+1][1],e.splice(t+1,1),d=!0)),t++;d&&this.diff_cleanupMerge(e)},n.prototype.diff_xIndex=function(e,t){var n=0,a=0,o=0,s=0,c;for(c=0;c<e.length&&(e[c][0]!==i&&(n+=e[c][1].length),e[c][0]!==r&&(a+=e[c][1].length),!(n>t));c++)o=n,s=a;return e.length!=c&&e[c][0]===r?s:s+(t-o)},n.prototype.diff_prettyHtml=function(e){for(var t=[],n=/&/g,o=/</g,s=/>/g,c=/\n/g,l=0;l<e.length;l++){var u=e[l][0],d=e[l][1].replace(n,`&`).replace(o,`<`).replace(s,`>`).replace(c,`¶<br>`);switch(u){case i:t[l]=`<ins style="background:#e6ffe6;">`+d+`</ins>`;break;case r:t[l]=`<del style="background:#ffe6e6;">`+d+`</del>`;break;case a:t[l]=`<span>`+d+`</span>`}}return t.join(``)},n.prototype.diff_text1=function(e){for(var t=[],n=0;n<e.length;n++)e[n][0]!==i&&(t[n]=e[n][1]);return t.join(``)},n.prototype.diff_text2=function(e){for(var t=[],n=0;n<e.length;n++)e[n][0]!==r&&(t[n]=e[n][1]);return t.join(``)},n.prototype.diff_levenshtein=function(e){for(var t=0,n=0,o=0,s=0;s<e.length;s++){var c=e[s][0],l=e[s][1];switch(c){case i:n+=l.length;break;case r:o+=l.length;break;case a:t+=Math.max(n,o),n=0,o=0}}return t+=Math.max(n,o),t},n.prototype.diff_toDelta=function(e){for(var t=[],n=0;n<e.length;n++)switch(e[n][0]){case i:t[n]=`+`+encodeURI(e[n][1]);break;case r:t[n]=`-`+e[n][1].length;break;case a:t[n]=`=`+e[n][1].length}return t.join(` `).replace(/%20/g,` `)},n.prototype.diff_fromDelta=function(e,t){for(var o=[],s=0,c=0,l=t.split(/\t/g),u=0;u<l.length;u++){var d=l[u].substring(1);switch(l[u].charAt(0)){case`+`:try{o[s++]=new n.Diff(i,decodeURI(d))}catch{throw Error(`Illegal escape in diff_fromDelta: `+d)}break;case`-`:case`=`:var f=parseInt(d,10);if(isNaN(f)||f<0)throw Error(`Invalid number in diff_fromDelta: `+d);var p=e.substring(c,c+=f);l[u].charAt(0)==`=`?o[s++]=new n.Diff(a,p):o[s++]=new n.Diff(r,p);break;default:if(l[u])throw Error(`Invalid diff operation in diff_fromDelta: `+l[u])}}if(c!=e.length)throw Error(`Delta length (`+c+`) does not equal source text length (`+e.length+`).`);return o},n.prototype.match_main=function(e,t,n){if(e==null||t==null||n==null)throw Error(`Null input. (match_main)`);return n=Math.max(0,Math.min(n,e.length)),e==t?0:e.length?e.substring(n,n+t.length)==t?n:this.match_bitap_(e,t,n):-1},n.prototype.match_bitap_=function(e,t,n){if(t.length>this.Match_MaxBits)throw Error(`Pattern too long for this browser.`);var r=this.match_alphabet_(t),i=this;function a(e,r){var a=e/t.length,o=Math.abs(n-r);return i.Match_Distance?a+o/i.Match_Distance:o?1:a}var o=this.Match_Threshold,s=e.indexOf(t,n);s!=-1&&(o=Math.min(a(0,s),o),s=e.lastIndexOf(t,n+t.length),s!=-1&&(o=Math.min(a(0,s),o)));var c=1<<t.length-1;s=-1;for(var l,u,d=t.length+e.length,f,p=0;p<t.length;p++){for(l=0,u=d;l<u;)a(p,n+u)<=o?l=u:d=u,u=Math.floor((d-l)/2+l);d=u;var m=Math.max(1,n-u+1),h=Math.min(n+u,e.length)+t.length,g=Array(h+2);g[h+1]=(1<<p)-1;for(var _=h;_>=m;_--){var v=r[e.charAt(_-1)];if(p===0?g[_]=(g[_+1]<<1|1)&v:g[_]=(g[_+1]<<1|1)&v|(f[_+1]|f[_])<<1|1|f[_+1],g[_]&c){var y=a(p,_-1);if(y<=o)if(o=y,s=_-1,s>n)m=Math.max(1,2*n-s);else break}}if(a(p+1,n)>o)break;f=g}return s},n.prototype.match_alphabet_=function(e){for(var t={},n=0;n<e.length;n++)t[e.charAt(n)]=0;for(var n=0;n<e.length;n++)t[e.charAt(n)]|=1<<e.length-n-1;return t},n.prototype.patch_addContext_=function(e,t){if(t.length!=0){if(e.start2===null)throw Error(`patch not initialized`);for(var r=t.substring(e.start2,e.start2+e.length1),i=0;t.indexOf(r)!=t.lastIndexOf(r)&&r.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)i+=this.Patch_Margin,r=t.substring(e.start2-i,e.start2+e.length1+i);i+=this.Patch_Margin;var o=t.substring(e.start2-i,e.start2);o&&e.diffs.unshift(new n.Diff(a,o));var s=t.substring(e.start2+e.length1,e.start2+e.length1+i);s&&e.diffs.push(new n.Diff(a,s)),e.start1-=o.length,e.start2-=o.length,e.length1+=o.length+s.length,e.length2+=o.length+s.length}},n.prototype.patch_make=function(e,t,o){var s,c;if(typeof e==`string`&&typeof t==`string`&&o===void 0)s=e,c=this.diff_main(s,t,!0),c.length>2&&(this.diff_cleanupSemantic(c),this.diff_cleanupEfficiency(c));else if(e&&typeof e==`object`&&t===void 0&&o===void 0)c=e,s=this.diff_text1(c);else if(typeof e==`string`&&t&&typeof t==`object`&&o===void 0)s=e,c=t;else if(typeof e==`string`&&typeof t==`string`&&o&&typeof o==`object`)s=e,c=o;else throw Error(`Unknown call format to patch_make.`);if(c.length===0)return[];for(var l=[],u=new n.patch_obj,d=0,f=0,p=0,m=s,h=s,g=0;g<c.length;g++){var _=c[g][0],v=c[g][1];switch(!d&&_!==a&&(u.start1=f,u.start2=p),_){case i:u.diffs[d++]=c[g],u.length2+=v.length,h=h.substring(0,p)+v+h.substring(p);break;case r:u.length1+=v.length,u.diffs[d++]=c[g],h=h.substring(0,p)+h.substring(p+v.length);break;case a:v.length<=2*this.Patch_Margin&&d&&c.length!=g+1?(u.diffs[d++]=c[g],u.length1+=v.length,u.length2+=v.length):v.length>=2*this.Patch_Margin&&d&&(this.patch_addContext_(u,m),l.push(u),u=new n.patch_obj,d=0,m=h,f=p)}_!==i&&(f+=v.length),_!==r&&(p+=v.length)}return d&&(this.patch_addContext_(u,m),l.push(u)),l},n.prototype.patch_deepCopy=function(e){for(var t=[],r=0;r<e.length;r++){var i=e[r],a=new n.patch_obj;a.diffs=[];for(var o=0;o<i.diffs.length;o++)a.diffs[o]=new n.Diff(i.diffs[o][0],i.diffs[o][1]);a.start1=i.start1,a.start2=i.start2,a.length1=i.length1,a.length2=i.length2,t[r]=a}return t},n.prototype.patch_apply=function(e,t){if(e.length==0)return[t,[]];e=this.patch_deepCopy(e);var n=this.patch_addPadding(e);t=n+t+n,this.patch_splitMax(e);for(var o=0,s=[],c=0;c<e.length;c++){var l=e[c].start2+o,u=this.diff_text1(e[c].diffs),d,f=-1;if(u.length>this.Match_MaxBits?(d=this.match_main(t,u.substring(0,this.Match_MaxBits),l),d!=-1&&(f=this.match_main(t,u.substring(u.length-this.Match_MaxBits),l+u.length-this.Match_MaxBits),(f==-1||d>=f)&&(d=-1))):d=this.match_main(t,u,l),d==-1)s[c]=!1,o-=e[c].length2-e[c].length1;else{s[c]=!0,o=d-l;var p=f==-1?t.substring(d,d+u.length):t.substring(d,f+this.Match_MaxBits);if(u==p)t=t.substring(0,d)+this.diff_text2(e[c].diffs)+t.substring(d+u.length);else{var m=this.diff_main(u,p,!1);if(u.length>this.Match_MaxBits&&this.diff_levenshtein(m)/u.length>this.Patch_DeleteThreshold)s[c]=!1;else{this.diff_cleanupSemanticLossless(m);for(var h=0,g,_=0;_<e[c].diffs.length;_++){var v=e[c].diffs[_];v[0]!==a&&(g=this.diff_xIndex(m,h)),v[0]===i?t=t.substring(0,d+g)+v[1]+t.substring(d+g):v[0]===r&&(t=t.substring(0,d+g)+t.substring(d+this.diff_xIndex(m,h+v[1].length))),v[0]!==r&&(h+=v[1].length)}}}}}return t=t.substring(n.length,t.length-n.length),[t,s]},n.prototype.patch_addPadding=function(e){for(var t=this.Patch_Margin,r=``,i=1;i<=t;i++)r+=String.fromCharCode(i);for(var i=0;i<e.length;i++)e[i].start1+=t,e[i].start2+=t;var o=e[0],s=o.diffs;if(s.length==0||s[0][0]!=a)s.unshift(new n.Diff(a,r)),o.start1-=t,o.start2-=t,o.length1+=t,o.length2+=t;else if(t>s[0][1].length){var c=t-s[0][1].length;s[0][1]=r.substring(s[0][1].length)+s[0][1],o.start1-=c,o.start2-=c,o.length1+=c,o.length2+=c}if(o=e[e.length-1],s=o.diffs,s.length==0||s[s.length-1][0]!=a)s.push(new n.Diff(a,r)),o.length1+=t,o.length2+=t;else if(t>s[s.length-1][1].length){var c=t-s[s.length-1][1].length;s[s.length-1][1]+=r.substring(0,c),o.length1+=c,o.length2+=c}return r},n.prototype.patch_splitMax=function(e){for(var t=this.Match_MaxBits,o=0;o<e.length;o++)if(!(e[o].length1<=t)){var s=e[o];e.splice(o--,1);for(var c=s.start1,l=s.start2,u=``;s.diffs.length!==0;){var d=new n.patch_obj,f=!0;for(d.start1=c-u.length,d.start2=l-u.length,u!==``&&(d.length1=d.length2=u.length,d.diffs.push(new n.Diff(a,u)));s.diffs.length!==0&&d.length1<t-this.Patch_Margin;){var p=s.diffs[0][0],m=s.diffs[0][1];p===i?(d.length2+=m.length,l+=m.length,d.diffs.push(s.diffs.shift()),f=!1):p===r&&d.diffs.length==1&&d.diffs[0][0]==a&&m.length>2*t?(d.length1+=m.length,c+=m.length,f=!1,d.diffs.push(new n.Diff(p,m)),s.diffs.shift()):(m=m.substring(0,t-d.length1-this.Patch_Margin),d.length1+=m.length,c+=m.length,p===a?(d.length2+=m.length,l+=m.length):f=!1,d.diffs.push(new n.Diff(p,m)),m==s.diffs[0][1]?s.diffs.shift():s.diffs[0][1]=s.diffs[0][1].substring(m.length))}u=this.diff_text2(d.diffs),u=u.substring(u.length-this.Patch_Margin);var h=this.diff_text1(s.diffs).substring(0,this.Patch_Margin);h!==``&&(d.length1+=h.length,d.length2+=h.length,d.diffs.length!==0&&d.diffs[d.diffs.length-1][0]===a?d.diffs[d.diffs.length-1][1]+=h:d.diffs.push(new n.Diff(a,h))),f||e.splice(++o,0,d)}}},n.prototype.patch_toText=function(e){for(var t=[],n=0;n<e.length;n++)t[n]=e[n];return t.join(``)},n.prototype.patch_fromText=function(e){var t=[];if(!e)return t;for(var o=e.split(`
|
|
998
998
|
`),s=0,c=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;s<o.length;){var l=o[s].match(c);if(!l)throw Error(`Invalid patch string: `+o[s]);var u=new n.patch_obj;for(t.push(u),u.start1=parseInt(l[1],10),l[2]===``?(u.start1--,u.length1=1):l[2]==`0`?u.length1=0:(u.start1--,u.length1=parseInt(l[2],10)),u.start2=parseInt(l[3],10),l[4]===``?(u.start2--,u.length2=1):l[4]==`0`?u.length2=0:(u.start2--,u.length2=parseInt(l[4],10)),s++;s<o.length;){var d=o[s].charAt(0);try{var f=decodeURI(o[s].substring(1))}catch{throw Error(`Illegal escape in patch_fromText: `+f)}if(d==`-`)u.diffs.push(new n.Diff(r,f));else if(d==`+`)u.diffs.push(new n.Diff(i,f));else if(d==` `)u.diffs.push(new n.Diff(a,f));else if(d==`@`)break;else if(d!==``)throw Error(`Invalid patch mode "`+d+`" in: `+f);s++}}return t},n.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0},n.patch_obj.prototype.toString=function(){for(var e=this.length1===0?this.start1+`,0`:this.length1==1?this.start1+1:this.start1+1+`,`+this.length1,t=this.length2===0?this.start2+`,0`:this.length2==1?this.start2+1:this.start2+1+`,`+this.length2,n=[`@@ -`+e+` +`+t+` @@
|
|
999
999
|
`],o,s=0;s<this.diffs.length;s++){switch(this.diffs[s][0]){case i:o=`+`;break;case r:o=`-`;break;case a:o=` `}n[s+1]=o+encodeURI(this.diffs[s][1])+`
|
|
1000
|
-
`}return n.join(``).replace(/%20/g,` `)},t.exports=n,t.exports.diff_match_patch=n,t.exports.DIFF_DELETE=r,t.exports.DIFF_INSERT=i,t.exports.DIFF_EQUAL=a}));g();var
|
|
1000
|
+
`}return n.join(``).replace(/%20/g,` `)},t.exports=n,t.exports.diff_match_patch=n,t.exports.DIFF_DELETE=r,t.exports.DIFF_INSERT=i,t.exports.DIFF_EQUAL=a}));g();var mC=n(pC(),1),hC=class extends s{constructor(e){super(e),this.state={value:this.props.value},this.onChange=this.onChange.bind(this),this.diff=this.diff.bind(this)}componentDidUpdate(){let{value:e}=this.props;e!==this.state.value&&this.setState({value:e})}onChange(e){this.setState({value:e}),this.props.onChange&&this.props.onChange(e)}diff(){let e=new mC.default,t=this.state.value[0],n=this.state.value[1];if(t.length===0&&n.length===0)return[];let r=e.diff_main(t,n);e.diff_cleanupSemantic(r);let i=this.generateDiffedLines(r);return this.setCodeMarkers(i)}generateDiffedLines(e){let t={DIFF_EQUAL:0,DIFF_DELETE:-1,DIFF_INSERT:1},n={left:[],right:[]},r={left:1,right:1};return e.forEach(e=>{let i=e[0],a=e[1],o=a.split(`
|
|
1001
1001
|
`).length-1;if(a.length===0)return;let s=a[0],c=a[a.length-1],l=0;switch(i){case t.DIFF_EQUAL:r.left+=o,r.right+=o;break;case t.DIFF_DELETE:s===`
|
|
1002
1002
|
`&&(r.left++,o--),l=o,l===0&&n.right.push({startLine:r.right,endLine:r.right}),c===`
|
|
1003
1003
|
`&&--l,n.left.push({startLine:r.left,endLine:r.left+l}),r.left+=o;break;case t.DIFF_INSERT:s===`
|
|
1004
1004
|
`&&(r.right++,o--),l=o,l===0&&n.left.push({startLine:r.left,endLine:r.left}),c===`
|
|
1005
|
-
`&&--l,n.right.push({startLine:r.right,endLine:r.right+l}),r.right+=o;break;default:throw Error(`Diff type was not defined.`)}}),n}setCodeMarkers(e={left:[],right:[]}){let t=[],n={left:[],right:[]};for(let t=0;t<e.left.length;t++){let r={startRow:e.left[t].startLine-1,endRow:e.left[t].endLine,type:`text`,className:`codeMarker`};n.left.push(r)}for(let t=0;t<e.right.length;t++){let r={startRow:e.right[t].startLine-1,endRow:e.right[t].endLine,type:`text`,className:`codeMarker`};n.right.push(r)}return t[0]=n.left,t[1]=n.right,t}render(){let e=this.diff();return w(nw,{name:this.props.name,className:this.props.className,focus:this.props.focus,orientation:this.props.orientation,splits:this.props.splits,mode:this.props.mode,theme:this.props.theme,height:this.props.height,width:this.props.width,fontSize:this.props.fontSize,showGutter:this.props.showGutter,onChange:this.onChange,onPaste:this.props.onPaste,onLoad:this.props.onLoad,onScroll:this.props.onScroll,minLines:this.props.minLines,maxLines:this.props.maxLines,readOnly:this.props.readOnly,highlightActiveLine:this.props.highlightActiveLine,showPrintMargin:this.props.showPrintMargin,tabSize:this.props.tabSize,cursorStart:this.props.cursorStart,editorProps:this.props.editorProps,style:this.props.style,scrollMargin:this.props.scrollMargin,setOptions:this.props.setOptions,wrapEnabled:this.props.wrapEnabled,enableBasicAutocompletion:this.props.enableBasicAutocompletion,enableLiveAutocompletion:this.props.enableLiveAutocompletion,value:this.state.value,markers:e})}};aw.propTypes={cursorStart:$.default.number,editorProps:$.default.object,enableBasicAutocompletion:$.default.bool,enableLiveAutocompletion:$.default.bool,focus:$.default.bool,fontSize:$.default.number,height:$.default.string,highlightActiveLine:$.default.bool,maxLines:$.default.number,minLines:$.default.number,mode:$.default.string,name:$.default.string,className:$.default.string,onLoad:$.default.func,onPaste:$.default.func,onScroll:$.default.func,onChange:$.default.func,orientation:$.default.string,readOnly:$.default.bool,scrollMargin:$.default.array,setOptions:$.default.object,showGutter:$.default.bool,showPrintMargin:$.default.bool,splits:$.default.number,style:$.default.object,tabSize:$.default.number,theme:$.default.string,value:$.default.array,width:$.default.string,wrapEnabled:$.default.bool},aw.defaultProps={cursorStart:1,editorProps:{},enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,focus:!1,fontSize:12,height:`500px`,highlightActiveLine:!0,maxLines:null,minLines:null,mode:``,name:`ace-editor`,onLoad:null,onScroll:null,onPaste:null,onChange:null,orientation:`beside`,readOnly:!1,scrollMargin:[0,0,0,0],setOptions:{},showGutter:!0,showPrintMargin:!0,splits:2,style:{},tabSize:4,theme:`github`,value:[``,``],width:`500px`,wrapEnabled:!0};var ow=ZC,sw=r(((e,t)=>{ace.define(`ace/mode/json_highlight_rules`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/mode/text_highlight_rules`],function(e,t,n){var r=e(`../lib/oop`),i=e(`./text_highlight_rules`).TextHighlightRules,a=function(){this.$rules={start:[{token:`variable`,regex:`["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)`},{token:`string`,regex:`"`,next:`string`},{token:`constant.numeric`,regex:`0[xX][0-9a-fA-F]+\\b`},{token:`constant.numeric`,regex:`[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b`},{token:`constant.language.boolean`,regex:`(?:true|false)\\b`},{token:`text`,regex:`['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']`},{token:`comment`,regex:`\\/\\/.*$`},{token:`comment.start`,regex:`\\/\\*`,next:`comment`},{token:`paren.lparen`,regex:`[[({]`},{token:`paren.rparen`,regex:`[\\])}]`},{token:`punctuation.operator`,regex:/[,]/},{token:`text`,regex:`\\s+`}],string:[{token:`constant.language.escape`,regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:`string`,regex:`"|$`,next:`start`},{defaultToken:`string`}],comment:[{token:`comment.end`,regex:`\\*\\/`,next:`start`},{defaultToken:`comment`}]}};r.inherits(a,i),t.JsonHighlightRules=a}),ace.define(`ace/mode/matching_brace_outdent`,[`require`,`exports`,`module`,`ace/range`],function(e,t,n){var r=e(`../range`).Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t).match(/^(\s*\})/);if(!n)return 0;var i=n[1].length,a=e.findMatchingBracket({row:t,column:i});if(!a||a.row==t)return 0;var o=this.$getIndent(e.getLine(a.row));e.replace(new r(t,0,t,i-1),o)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define(`ace/mode/folding/cstyle`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/range`,`ace/mode/folding/fold_mode`],function(e,t,n){var r=e(`../../lib/oop`),i=e(`../../range`).Range,a=e(`./fold_mode`).FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,`|`+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,`|`+e.end)))};r.inherits(o,a),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return``;var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?`start`:i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var a=i.match(this.foldingStartMarker);if(a){var o=a.index;if(a[1])return this.openingBracketBlock(e,a[1],n,o);var s=e.getCommentFoldRange(n,o+a[0].length,1);return s&&!s.isMultiLine()&&(r?s=this.getSectionRange(e,n):t!=`all`&&(s=null)),s}if(t!==`markbegin`){var a=i.match(this.foldingStopMarker);if(a){var o=a.index+a[0].length;return a[1]?this.closingBracketBlock(e,a[1],n,o):e.getCommentFoldRange(n,o,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),a=t,o=n.length;t+=1;for(var s=t,c=e.getLength();++t<c;){n=e.getLine(t);var l=n.search(/\S/);if(l!==-1){if(r>l)break;var u=this.getFoldWidgetRange(e,`all`,t);if(u){if(u.start.row<=a)break;if(u.isMultiLine())t=u.end.row;else if(r==l)break}s=t}}return new i(a,o,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),a=e.getLength(),o=n,s=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,c=1;++n<a;){t=e.getLine(n);var l=s.exec(t);if(l&&(l[1]?c--:c++,!c))break}var u=n;if(u>o)return new i(o,r,u,t.length)}}.call(o.prototype)}),ace.define(`ace/mode/json`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/mode/text`,`ace/mode/json_highlight_rules`,`ace/mode/matching_brace_outdent`,`ace/mode/folding/cstyle`,`ace/worker/worker_client`],function(e,t,n){var r=e(`../lib/oop`),i=e(`./text`).Mode,a=e(`./json_highlight_rules`).JsonHighlightRules,o=e(`./matching_brace_outdent`).MatchingBraceOutdent,s=e(`./folding/cstyle`).FoldMode,c=e(`../worker/worker_client`).WorkerClient,l=function(){this.HighlightRules=a,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new s};r.inherits(l,i),function(){this.lineCommentStart=`//`,this.blockComment={start:`/*`,end:`*/`},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t);return e==`start`&&t.match(/^.*[\{\(\[]\s*$/)&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new c([`ace`],`ace/mode/json_worker`,`JsonWorker`);return t.attachToDocument(e.getDocument()),t.on(`annotate`,function(t){e.setAnnotations(t.data)}),t.on(`terminate`,function(){e.clearAnnotations()}),t},this.$id=`ace/mode/json`}.call(l.prototype),t.Mode=l}),(function(){ace.require([`ace/mode/json`],function(n){typeof t==`object`&&typeof e==`object`&&t&&(t.exports=n)})})()})),cw=r(((e,t)=>{ace.define(`ace/mode/json_highlight_rules`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/mode/text_highlight_rules`],function(e,t,n){var r=e(`../lib/oop`),i=e(`./text_highlight_rules`).TextHighlightRules,a=function(){this.$rules={start:[{token:`variable`,regex:`["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)`},{token:`string`,regex:`"`,next:`string`},{token:`constant.numeric`,regex:`0[xX][0-9a-fA-F]+\\b`},{token:`constant.numeric`,regex:`[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b`},{token:`constant.language.boolean`,regex:`(?:true|false)\\b`},{token:`text`,regex:`['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']`},{token:`comment`,regex:`\\/\\/.*$`},{token:`comment.start`,regex:`\\/\\*`,next:`comment`},{token:`paren.lparen`,regex:`[[({]`},{token:`paren.rparen`,regex:`[\\])}]`},{token:`punctuation.operator`,regex:/[,]/},{token:`text`,regex:`\\s+`}],string:[{token:`constant.language.escape`,regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:`string`,regex:`"|$`,next:`start`},{defaultToken:`string`}],comment:[{token:`comment.end`,regex:`\\*\\/`,next:`start`},{defaultToken:`comment`}]}};r.inherits(a,i),t.JsonHighlightRules=a}),ace.define(`ace/mode/json5_highlight_rules`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/mode/json_highlight_rules`],function(e,t,n){var r=e(`../lib/oop`),i=e(`./json_highlight_rules`).JsonHighlightRules,a=function(){i.call(this);var e=[{token:`variable`,regex:/[a-zA-Z$_\u00a1-\uffff][\w$\u00a1-\uffff]*\s*(?=:)/},{token:`variable`,regex:/['](?:(?:\\.)|(?:[^'\\]))*?[']\s*(?=:)/},{token:`constant.language.boolean`,regex:/(?:null)\b/},{token:`string`,regex:/'/,next:[{token:`constant.language.escape`,regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\/bfnrt]|$)/,consumeLineEnd:!0},{token:`string`,regex:/'|$/,next:`start`},{defaultToken:`string`}]},{token:`string`,regex:/"(?![^"]*":)/,next:[{token:`constant.language.escape`,regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\/bfnrt]|$)/,consumeLineEnd:!0},{token:`string`,regex:/"|$/,next:`start`},{defaultToken:`string`}]},{token:`constant.numeric`,regex:/[+-]?(?:Infinity|NaN)\b/}];for(var t in this.$rules)this.$rules[t].unshift.apply(this.$rules[t],e);this.normalizeRules()};r.inherits(a,i),t.Json5HighlightRules=a}),ace.define(`ace/mode/matching_brace_outdent`,[`require`,`exports`,`module`,`ace/range`],function(e,t,n){var r=e(`../range`).Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t).match(/^(\s*\})/);if(!n)return 0;var i=n[1].length,a=e.findMatchingBracket({row:t,column:i});if(!a||a.row==t)return 0;var o=this.$getIndent(e.getLine(a.row));e.replace(new r(t,0,t,i-1),o)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define(`ace/mode/folding/cstyle`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/range`,`ace/mode/folding/fold_mode`],function(e,t,n){var r=e(`../../lib/oop`),i=e(`../../range`).Range,a=e(`./fold_mode`).FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,`|`+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,`|`+e.end)))};r.inherits(o,a),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return``;var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?`start`:i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var a=i.match(this.foldingStartMarker);if(a){var o=a.index;if(a[1])return this.openingBracketBlock(e,a[1],n,o);var s=e.getCommentFoldRange(n,o+a[0].length,1);return s&&!s.isMultiLine()&&(r?s=this.getSectionRange(e,n):t!=`all`&&(s=null)),s}if(t!==`markbegin`){var a=i.match(this.foldingStopMarker);if(a){var o=a.index+a[0].length;return a[1]?this.closingBracketBlock(e,a[1],n,o):e.getCommentFoldRange(n,o,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),a=t,o=n.length;t+=1;for(var s=t,c=e.getLength();++t<c;){n=e.getLine(t);var l=n.search(/\S/);if(l!==-1){if(r>l)break;var u=this.getFoldWidgetRange(e,`all`,t);if(u){if(u.start.row<=a)break;if(u.isMultiLine())t=u.end.row;else if(r==l)break}s=t}}return new i(a,o,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),a=e.getLength(),o=n,s=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,c=1;++n<a;){t=e.getLine(n);var l=s.exec(t);if(l&&(l[1]?c--:c++,!c))break}var u=n;if(u>o)return new i(o,r,u,t.length)}}.call(o.prototype)}),ace.define(`ace/mode/json5`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/mode/text`,`ace/mode/json5_highlight_rules`,`ace/mode/matching_brace_outdent`,`ace/mode/folding/cstyle`],function(e,t,n){var r=e(`../lib/oop`),i=e(`./text`).Mode,a=e(`./json5_highlight_rules`).Json5HighlightRules,o=e(`./matching_brace_outdent`).MatchingBraceOutdent,s=e(`./folding/cstyle`).FoldMode,c=function(){this.HighlightRules=a,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new s};r.inherits(c,i),function(){this.lineCommentStart=`//`,this.blockComment={start:`/*`,end:`*/`},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id=`ace/mode/json5`}.call(c.prototype),t.Mode=c}),(function(){ace.require([`ace/mode/json5`],function(n){typeof t==`object`&&typeof e==`object`&&t&&(t.exports=n)})})()})),lw=r(((e,t)=>{ace.define(`ace/mode/yaml_highlight_rules`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/mode/text_highlight_rules`],function(e,t,n){var r=e(`../lib/oop`),i=e(`./text_highlight_rules`).TextHighlightRules,a=function(){this.$rules={start:[{token:`comment`,regex:`#.*$`},{token:`list.markup`,regex:/^(?:-{3}|\.{3})\s*(?=#|$)/},{token:`list.markup`,regex:/^\s*[\-?](?:$|\s)/},{token:`constant`,regex:`!![\\w//]+`},{token:`constant.language`,regex:`[&\\*][a-zA-Z0-9-_]+`},{token:[`meta.tag`,`keyword`],regex:/^(\s*\w[^\s:]*?)(:(?=\s|$))/},{token:[`meta.tag`,`keyword`],regex:/(\w[^\s:]*?)(\s*:(?=\s|$))/},{token:`keyword.operator`,regex:`<<\\w*:\\w*`},{token:`keyword.operator`,regex:`-\\s*(?=[{])`},{token:`string`,regex:`["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]`},{token:`string`,regex:/[|>][-+\d]*(?:$|\s+(?:$|#))/,onMatch:function(e,t,n,r){r=r.replace(/ #.*/,``);var i=/^ *((:\s*)?-(\s*[^|>])?)?/.exec(r)[0].replace(/\S\s*$/,``).length,a=parseInt(/\d+[\s+-]*$/.exec(r));return a?(i+=a-1,this.next=`mlString`):this.next=`mlStringPre`,n.length?(n[0]=this.next,n[1]=i):(n.push(this.next),n.push(i)),this.token},next:`mlString`},{token:`string`,regex:`['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']`},{token:`constant.numeric`,regex:/(\b|[+\-\.])[\d_]+(?:(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)(?=[^\d-\w]|$)$/},{token:`constant.numeric`,regex:/[+\-]?\.inf\b|NaN\b|0x[\dA-Fa-f_]+|0b[10_]+/},{token:`constant.language.boolean`,regex:`\\b(?:true|false|TRUE|FALSE|True|False|yes|no)\\b`},{token:`paren.lparen`,regex:`[[({]`},{token:`paren.rparen`,regex:`[\\])}]`},{token:`text`,regex:/[^\s,:\[\]\{\}]+/}],mlStringPre:[{token:`indent`,regex:/^ *$/},{token:`indent`,regex:/^ */,onMatch:function(e,t,n){return n[1]>=e.length?(this.next=`start`,n.shift(),n.shift()):(n[1]=e.length-1,this.next=n[0]=`mlString`),this.token},next:`mlString`},{defaultToken:`string`}],mlString:[{token:`indent`,regex:/^ *$/},{token:`indent`,regex:/^ */,onMatch:function(e,t,n){return n[1]>=e.length?(this.next=`start`,n.splice(0)):this.next=`mlString`,this.token},next:`mlString`},{token:`string`,regex:`.+`}]},this.normalizeRules()};r.inherits(a,i),t.YamlHighlightRules=a}),ace.define(`ace/mode/matching_brace_outdent`,[`require`,`exports`,`module`,`ace/range`],function(e,t,n){var r=e(`../range`).Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t).match(/^(\s*\})/);if(!n)return 0;var i=n[1].length,a=e.findMatchingBracket({row:t,column:i});if(!a||a.row==t)return 0;var o=this.$getIndent(e.getLine(a.row));e.replace(new r(t,0,t,i-1),o)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define(`ace/mode/folding/coffee`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/mode/folding/fold_mode`,`ace/range`],function(e,t,n){var r=e(`../../lib/oop`),i=e(`./fold_mode`).FoldMode,a=e(`../../range`).Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.commentBlock=function(e,t){var n=/\S/,r=e.getLine(t),i=r.search(n);if(i!=-1&&r[i]==`#`){for(var o=r.length,s=e.getLength(),c=t,l=t;++t<s;){r=e.getLine(t);var u=r.search(n);if(u!=-1){if(r[u]!=`#`)break;l=t}}if(l>c){var d=e.getLine(l).length;return new a(c,o,l,d)}}},this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r||(r=this.commentBlock(e,n),r))return r},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),a=e.getLine(n+1),o=e.getLine(n-1),s=o.search(/\S/),c=a.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=s!=-1&&s<c?`start`:``,``;if(s==-1){if(i==c&&r[i]==`#`&&a[i]==`#`)return e.foldWidgets[n-1]=``,e.foldWidgets[n+1]=``,`start`}else if(s==i&&r[i]==`#`&&o[i]==`#`&&e.getLine(n-2).search(/\S/)==-1)return e.foldWidgets[n-1]=`start`,e.foldWidgets[n+1]=``,``;return s!=-1&&s<i?e.foldWidgets[n-1]=`start`:e.foldWidgets[n-1]=``,i<c?`start`:``}}.call(o.prototype)}),ace.define(`ace/mode/folding/yaml`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/mode/folding/coffee`,`ace/range`],function(e,t,n){var r=e(`../../lib/oop`),i=e(`./coffee`).FoldMode,a=e(`../../range`).Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=/\S/,i=e.getLine(n),o=i.search(r),s=i[o]===`#`,c=i[o]===`-`;if(o!=-1){var l=i.length,u=e.getLength(),d=n,f=n;if(s){var p=this.commentBlock(e,n);if(p)return p}else if(c){var p=this.indentationBlock(e,n);if(p)return p}else for(;++n<u;){var i=e.getLine(n),m=i.search(r);if(m!=-1){if(m<=o&&i[o]!==`-`){var h=e.getTokenAt(n,0);if(!h||h.type!==`string`)break}f=n}}if(f>d){var g=e.getLine(f).length;return new a(d,l,f,g)}}},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),a=e.getLine(n+1),o=e.getLine(n-1),s=o.search(/\S/),c=a.search(/\S/),l=r[i]===`-`;if(i==-1)return e.foldWidgets[n-1]=s!=-1&&s<c?`start`:``,``;if(s==-1){if(i==c&&r[i]==`#`&&a[i]==`#`)return e.foldWidgets[n-1]=``,e.foldWidgets[n+1]=``,`start`}else if(s==i&&r[i]==`#`&&o[i]==`#`&&e.getLine(n-2).search(/\S/)==-1)return e.foldWidgets[n-1]=`start`,e.foldWidgets[n+1]=``,``;return s!=-1&&s<i||s!=-1&&s==i&&l?e.foldWidgets[n-1]=`start`:e.foldWidgets[n-1]=``,i<c?`start`:``}}.call(o.prototype)}),ace.define(`ace/mode/yaml`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/mode/text`,`ace/mode/yaml_highlight_rules`,`ace/mode/matching_brace_outdent`,`ace/mode/folding/yaml`,`ace/worker/worker_client`],function(e,t,n){var r=e(`../lib/oop`),i=e(`./text`).Mode,a=e(`./yaml_highlight_rules`).YamlHighlightRules,o=e(`./matching_brace_outdent`).MatchingBraceOutdent,s=e(`./folding/yaml`).FoldMode,c=e(`../worker/worker_client`).WorkerClient,l=function(){this.HighlightRules=a,this.$outdent=new o,this.foldingRules=new s,this.$behaviour=this.$defaultBehaviour};r.inherits(l,i),function(){this.lineCommentStart=[`#`],this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t);return e==`start`&&t.match(/^.*[\{\(\[]\s*$/)&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new c([`ace`],`ace/mode/yaml_worker`,`YamlWorker`);return t.attachToDocument(e.getDocument()),t.on(`annotate`,function(t){e.setAnnotations(t.data)}),t.on(`terminate`,function(){e.clearAnnotations()}),t},this.$id=`ace/mode/yaml`}.call(l.prototype),t.Mode=l}),(function(){ace.require([`ace/mode/yaml`],function(n){typeof t==`object`&&typeof e==`object`&&t&&(t.exports=n)})})()})),uw=r(((e,t)=>{ace.define(`ace/theme/clouds_midnight-css`,[`require`,`exports`,`module`],function(e,t,n){n.exports=`.ace-clouds-midnight .ace_gutter {
|
|
1005
|
+
`&&--l,n.right.push({startLine:r.right,endLine:r.right+l}),r.right+=o;break;default:throw Error(`Diff type was not defined.`)}}),n}setCodeMarkers(e={left:[],right:[]}){let t=[],n={left:[],right:[]};for(let t=0;t<e.left.length;t++){let r={startRow:e.left[t].startLine-1,endRow:e.left[t].endLine,type:`text`,className:`codeMarker`};n.left.push(r)}for(let t=0;t<e.right.length;t++){let r={startRow:e.right[t].startLine-1,endRow:e.right[t].endLine,type:`text`,className:`codeMarker`};n.right.push(r)}return t[0]=n.left,t[1]=n.right,t}render(){let e=this.diff();return w(fC,{name:this.props.name,className:this.props.className,focus:this.props.focus,orientation:this.props.orientation,splits:this.props.splits,mode:this.props.mode,theme:this.props.theme,height:this.props.height,width:this.props.width,fontSize:this.props.fontSize,showGutter:this.props.showGutter,onChange:this.onChange,onPaste:this.props.onPaste,onLoad:this.props.onLoad,onScroll:this.props.onScroll,minLines:this.props.minLines,maxLines:this.props.maxLines,readOnly:this.props.readOnly,highlightActiveLine:this.props.highlightActiveLine,showPrintMargin:this.props.showPrintMargin,tabSize:this.props.tabSize,cursorStart:this.props.cursorStart,editorProps:this.props.editorProps,style:this.props.style,scrollMargin:this.props.scrollMargin,setOptions:this.props.setOptions,wrapEnabled:this.props.wrapEnabled,enableBasicAutocompletion:this.props.enableBasicAutocompletion,enableLiveAutocompletion:this.props.enableLiveAutocompletion,value:this.state.value,markers:e})}};hC.propTypes={cursorStart:$.default.number,editorProps:$.default.object,enableBasicAutocompletion:$.default.bool,enableLiveAutocompletion:$.default.bool,focus:$.default.bool,fontSize:$.default.number,height:$.default.string,highlightActiveLine:$.default.bool,maxLines:$.default.number,minLines:$.default.number,mode:$.default.string,name:$.default.string,className:$.default.string,onLoad:$.default.func,onPaste:$.default.func,onScroll:$.default.func,onChange:$.default.func,orientation:$.default.string,readOnly:$.default.bool,scrollMargin:$.default.array,setOptions:$.default.object,showGutter:$.default.bool,showPrintMargin:$.default.bool,splits:$.default.number,style:$.default.object,tabSize:$.default.number,theme:$.default.string,value:$.default.array,width:$.default.string,wrapEnabled:$.default.bool},hC.defaultProps={cursorStart:1,editorProps:{},enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,focus:!1,fontSize:12,height:`500px`,highlightActiveLine:!0,maxLines:null,minLines:null,mode:``,name:`ace-editor`,onLoad:null,onScroll:null,onPaste:null,onChange:null,orientation:`beside`,readOnly:!1,scrollMargin:[0,0,0,0],setOptions:{},showGutter:!0,showPrintMargin:!0,splits:2,style:{},tabSize:4,theme:`github`,value:[``,``],width:`500px`,wrapEnabled:!0};var gC=sC,_C=r(((e,t)=>{ace.define(`ace/mode/json_highlight_rules`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/mode/text_highlight_rules`],function(e,t,n){var r=e(`../lib/oop`),i=e(`./text_highlight_rules`).TextHighlightRules,a=function(){this.$rules={start:[{token:`variable`,regex:`["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)`},{token:`string`,regex:`"`,next:`string`},{token:`constant.numeric`,regex:`0[xX][0-9a-fA-F]+\\b`},{token:`constant.numeric`,regex:`[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b`},{token:`constant.language.boolean`,regex:`(?:true|false)\\b`},{token:`text`,regex:`['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']`},{token:`comment`,regex:`\\/\\/.*$`},{token:`comment.start`,regex:`\\/\\*`,next:`comment`},{token:`paren.lparen`,regex:`[[({]`},{token:`paren.rparen`,regex:`[\\])}]`},{token:`punctuation.operator`,regex:/[,]/},{token:`text`,regex:`\\s+`}],string:[{token:`constant.language.escape`,regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:`string`,regex:`"|$`,next:`start`},{defaultToken:`string`}],comment:[{token:`comment.end`,regex:`\\*\\/`,next:`start`},{defaultToken:`comment`}]}};r.inherits(a,i),t.JsonHighlightRules=a}),ace.define(`ace/mode/matching_brace_outdent`,[`require`,`exports`,`module`,`ace/range`],function(e,t,n){var r=e(`../range`).Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t).match(/^(\s*\})/);if(!n)return 0;var i=n[1].length,a=e.findMatchingBracket({row:t,column:i});if(!a||a.row==t)return 0;var o=this.$getIndent(e.getLine(a.row));e.replace(new r(t,0,t,i-1),o)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define(`ace/mode/folding/cstyle`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/range`,`ace/mode/folding/fold_mode`],function(e,t,n){var r=e(`../../lib/oop`),i=e(`../../range`).Range,a=e(`./fold_mode`).FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,`|`+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,`|`+e.end)))};r.inherits(o,a),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return``;var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?`start`:i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var a=i.match(this.foldingStartMarker);if(a){var o=a.index;if(a[1])return this.openingBracketBlock(e,a[1],n,o);var s=e.getCommentFoldRange(n,o+a[0].length,1);return s&&!s.isMultiLine()&&(r?s=this.getSectionRange(e,n):t!=`all`&&(s=null)),s}if(t!==`markbegin`){var a=i.match(this.foldingStopMarker);if(a){var o=a.index+a[0].length;return a[1]?this.closingBracketBlock(e,a[1],n,o):e.getCommentFoldRange(n,o,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),a=t,o=n.length;t+=1;for(var s=t,c=e.getLength();++t<c;){n=e.getLine(t);var l=n.search(/\S/);if(l!==-1){if(r>l)break;var u=this.getFoldWidgetRange(e,`all`,t);if(u){if(u.start.row<=a)break;if(u.isMultiLine())t=u.end.row;else if(r==l)break}s=t}}return new i(a,o,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),a=e.getLength(),o=n,s=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,c=1;++n<a;){t=e.getLine(n);var l=s.exec(t);if(l&&(l[1]?c--:c++,!c))break}var u=n;if(u>o)return new i(o,r,u,t.length)}}.call(o.prototype)}),ace.define(`ace/mode/json`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/mode/text`,`ace/mode/json_highlight_rules`,`ace/mode/matching_brace_outdent`,`ace/mode/folding/cstyle`,`ace/worker/worker_client`],function(e,t,n){var r=e(`../lib/oop`),i=e(`./text`).Mode,a=e(`./json_highlight_rules`).JsonHighlightRules,o=e(`./matching_brace_outdent`).MatchingBraceOutdent,s=e(`./folding/cstyle`).FoldMode,c=e(`../worker/worker_client`).WorkerClient,l=function(){this.HighlightRules=a,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new s};r.inherits(l,i),function(){this.lineCommentStart=`//`,this.blockComment={start:`/*`,end:`*/`},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t);return e==`start`&&t.match(/^.*[\{\(\[]\s*$/)&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new c([`ace`],`ace/mode/json_worker`,`JsonWorker`);return t.attachToDocument(e.getDocument()),t.on(`annotate`,function(t){e.setAnnotations(t.data)}),t.on(`terminate`,function(){e.clearAnnotations()}),t},this.$id=`ace/mode/json`}.call(l.prototype),t.Mode=l}),(function(){ace.require([`ace/mode/json`],function(n){typeof t==`object`&&typeof e==`object`&&t&&(t.exports=n)})})()})),vC=r(((e,t)=>{ace.define(`ace/mode/json_highlight_rules`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/mode/text_highlight_rules`],function(e,t,n){var r=e(`../lib/oop`),i=e(`./text_highlight_rules`).TextHighlightRules,a=function(){this.$rules={start:[{token:`variable`,regex:`["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)`},{token:`string`,regex:`"`,next:`string`},{token:`constant.numeric`,regex:`0[xX][0-9a-fA-F]+\\b`},{token:`constant.numeric`,regex:`[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b`},{token:`constant.language.boolean`,regex:`(?:true|false)\\b`},{token:`text`,regex:`['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']`},{token:`comment`,regex:`\\/\\/.*$`},{token:`comment.start`,regex:`\\/\\*`,next:`comment`},{token:`paren.lparen`,regex:`[[({]`},{token:`paren.rparen`,regex:`[\\])}]`},{token:`punctuation.operator`,regex:/[,]/},{token:`text`,regex:`\\s+`}],string:[{token:`constant.language.escape`,regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:`string`,regex:`"|$`,next:`start`},{defaultToken:`string`}],comment:[{token:`comment.end`,regex:`\\*\\/`,next:`start`},{defaultToken:`comment`}]}};r.inherits(a,i),t.JsonHighlightRules=a}),ace.define(`ace/mode/json5_highlight_rules`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/mode/json_highlight_rules`],function(e,t,n){var r=e(`../lib/oop`),i=e(`./json_highlight_rules`).JsonHighlightRules,a=function(){i.call(this);var e=[{token:`variable`,regex:/[a-zA-Z$_\u00a1-\uffff][\w$\u00a1-\uffff]*\s*(?=:)/},{token:`variable`,regex:/['](?:(?:\\.)|(?:[^'\\]))*?[']\s*(?=:)/},{token:`constant.language.boolean`,regex:/(?:null)\b/},{token:`string`,regex:/'/,next:[{token:`constant.language.escape`,regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\/bfnrt]|$)/,consumeLineEnd:!0},{token:`string`,regex:/'|$/,next:`start`},{defaultToken:`string`}]},{token:`string`,regex:/"(?![^"]*":)/,next:[{token:`constant.language.escape`,regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\/bfnrt]|$)/,consumeLineEnd:!0},{token:`string`,regex:/"|$/,next:`start`},{defaultToken:`string`}]},{token:`constant.numeric`,regex:/[+-]?(?:Infinity|NaN)\b/}];for(var t in this.$rules)this.$rules[t].unshift.apply(this.$rules[t],e);this.normalizeRules()};r.inherits(a,i),t.Json5HighlightRules=a}),ace.define(`ace/mode/matching_brace_outdent`,[`require`,`exports`,`module`,`ace/range`],function(e,t,n){var r=e(`../range`).Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t).match(/^(\s*\})/);if(!n)return 0;var i=n[1].length,a=e.findMatchingBracket({row:t,column:i});if(!a||a.row==t)return 0;var o=this.$getIndent(e.getLine(a.row));e.replace(new r(t,0,t,i-1),o)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define(`ace/mode/folding/cstyle`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/range`,`ace/mode/folding/fold_mode`],function(e,t,n){var r=e(`../../lib/oop`),i=e(`../../range`).Range,a=e(`./fold_mode`).FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,`|`+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,`|`+e.end)))};r.inherits(o,a),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return``;var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?`start`:i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var a=i.match(this.foldingStartMarker);if(a){var o=a.index;if(a[1])return this.openingBracketBlock(e,a[1],n,o);var s=e.getCommentFoldRange(n,o+a[0].length,1);return s&&!s.isMultiLine()&&(r?s=this.getSectionRange(e,n):t!=`all`&&(s=null)),s}if(t!==`markbegin`){var a=i.match(this.foldingStopMarker);if(a){var o=a.index+a[0].length;return a[1]?this.closingBracketBlock(e,a[1],n,o):e.getCommentFoldRange(n,o,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),a=t,o=n.length;t+=1;for(var s=t,c=e.getLength();++t<c;){n=e.getLine(t);var l=n.search(/\S/);if(l!==-1){if(r>l)break;var u=this.getFoldWidgetRange(e,`all`,t);if(u){if(u.start.row<=a)break;if(u.isMultiLine())t=u.end.row;else if(r==l)break}s=t}}return new i(a,o,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),a=e.getLength(),o=n,s=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,c=1;++n<a;){t=e.getLine(n);var l=s.exec(t);if(l&&(l[1]?c--:c++,!c))break}var u=n;if(u>o)return new i(o,r,u,t.length)}}.call(o.prototype)}),ace.define(`ace/mode/json5`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/mode/text`,`ace/mode/json5_highlight_rules`,`ace/mode/matching_brace_outdent`,`ace/mode/folding/cstyle`],function(e,t,n){var r=e(`../lib/oop`),i=e(`./text`).Mode,a=e(`./json5_highlight_rules`).Json5HighlightRules,o=e(`./matching_brace_outdent`).MatchingBraceOutdent,s=e(`./folding/cstyle`).FoldMode,c=function(){this.HighlightRules=a,this.$outdent=new o,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new s};r.inherits(c,i),function(){this.lineCommentStart=`//`,this.blockComment={start:`/*`,end:`*/`},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id=`ace/mode/json5`}.call(c.prototype),t.Mode=c}),(function(){ace.require([`ace/mode/json5`],function(n){typeof t==`object`&&typeof e==`object`&&t&&(t.exports=n)})})()})),yC=r(((e,t)=>{ace.define(`ace/mode/yaml_highlight_rules`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/mode/text_highlight_rules`],function(e,t,n){var r=e(`../lib/oop`),i=e(`./text_highlight_rules`).TextHighlightRules,a=function(){this.$rules={start:[{token:`comment`,regex:`#.*$`},{token:`list.markup`,regex:/^(?:-{3}|\.{3})\s*(?=#|$)/},{token:`list.markup`,regex:/^\s*[\-?](?:$|\s)/},{token:`constant`,regex:`!![\\w//]+`},{token:`constant.language`,regex:`[&\\*][a-zA-Z0-9-_]+`},{token:[`meta.tag`,`keyword`],regex:/^(\s*\w[^\s:]*?)(:(?=\s|$))/},{token:[`meta.tag`,`keyword`],regex:/(\w[^\s:]*?)(\s*:(?=\s|$))/},{token:`keyword.operator`,regex:`<<\\w*:\\w*`},{token:`keyword.operator`,regex:`-\\s*(?=[{])`},{token:`string`,regex:`["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]`},{token:`string`,regex:/[|>][-+\d]*(?:$|\s+(?:$|#))/,onMatch:function(e,t,n,r){r=r.replace(/ #.*/,``);var i=/^ *((:\s*)?-(\s*[^|>])?)?/.exec(r)[0].replace(/\S\s*$/,``).length,a=parseInt(/\d+[\s+-]*$/.exec(r));return a?(i+=a-1,this.next=`mlString`):this.next=`mlStringPre`,n.length?(n[0]=this.next,n[1]=i):(n.push(this.next),n.push(i)),this.token},next:`mlString`},{token:`string`,regex:`['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']`},{token:`constant.numeric`,regex:/(\b|[+\-\.])[\d_]+(?:(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)(?=[^\d-\w]|$)$/},{token:`constant.numeric`,regex:/[+\-]?\.inf\b|NaN\b|0x[\dA-Fa-f_]+|0b[10_]+/},{token:`constant.language.boolean`,regex:`\\b(?:true|false|TRUE|FALSE|True|False|yes|no)\\b`},{token:`paren.lparen`,regex:`[[({]`},{token:`paren.rparen`,regex:`[\\])}]`},{token:`text`,regex:/[^\s,:\[\]\{\}]+/}],mlStringPre:[{token:`indent`,regex:/^ *$/},{token:`indent`,regex:/^ */,onMatch:function(e,t,n){return n[1]>=e.length?(this.next=`start`,n.shift(),n.shift()):(n[1]=e.length-1,this.next=n[0]=`mlString`),this.token},next:`mlString`},{defaultToken:`string`}],mlString:[{token:`indent`,regex:/^ *$/},{token:`indent`,regex:/^ */,onMatch:function(e,t,n){return n[1]>=e.length?(this.next=`start`,n.splice(0)):this.next=`mlString`,this.token},next:`mlString`},{token:`string`,regex:`.+`}]},this.normalizeRules()};r.inherits(a,i),t.YamlHighlightRules=a}),ace.define(`ace/mode/matching_brace_outdent`,[`require`,`exports`,`module`,`ace/range`],function(e,t,n){var r=e(`../range`).Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t).match(/^(\s*\})/);if(!n)return 0;var i=n[1].length,a=e.findMatchingBracket({row:t,column:i});if(!a||a.row==t)return 0;var o=this.$getIndent(e.getLine(a.row));e.replace(new r(t,0,t,i-1),o)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define(`ace/mode/folding/coffee`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/mode/folding/fold_mode`,`ace/range`],function(e,t,n){var r=e(`../../lib/oop`),i=e(`./fold_mode`).FoldMode,a=e(`../../range`).Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.commentBlock=function(e,t){var n=/\S/,r=e.getLine(t),i=r.search(n);if(i!=-1&&r[i]==`#`){for(var o=r.length,s=e.getLength(),c=t,l=t;++t<s;){r=e.getLine(t);var u=r.search(n);if(u!=-1){if(r[u]!=`#`)break;l=t}}if(l>c){var d=e.getLine(l).length;return new a(c,o,l,d)}}},this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r||(r=this.commentBlock(e,n),r))return r},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),a=e.getLine(n+1),o=e.getLine(n-1),s=o.search(/\S/),c=a.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=s!=-1&&s<c?`start`:``,``;if(s==-1){if(i==c&&r[i]==`#`&&a[i]==`#`)return e.foldWidgets[n-1]=``,e.foldWidgets[n+1]=``,`start`}else if(s==i&&r[i]==`#`&&o[i]==`#`&&e.getLine(n-2).search(/\S/)==-1)return e.foldWidgets[n-1]=`start`,e.foldWidgets[n+1]=``,``;return s!=-1&&s<i?e.foldWidgets[n-1]=`start`:e.foldWidgets[n-1]=``,i<c?`start`:``}}.call(o.prototype)}),ace.define(`ace/mode/folding/yaml`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/mode/folding/coffee`,`ace/range`],function(e,t,n){var r=e(`../../lib/oop`),i=e(`./coffee`).FoldMode,a=e(`../../range`).Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=/\S/,i=e.getLine(n),o=i.search(r),s=i[o]===`#`,c=i[o]===`-`;if(o!=-1){var l=i.length,u=e.getLength(),d=n,f=n;if(s){var p=this.commentBlock(e,n);if(p)return p}else if(c){var p=this.indentationBlock(e,n);if(p)return p}else for(;++n<u;){var i=e.getLine(n),m=i.search(r);if(m!=-1){if(m<=o&&i[o]!==`-`){var h=e.getTokenAt(n,0);if(!h||h.type!==`string`)break}f=n}}if(f>d){var g=e.getLine(f).length;return new a(d,l,f,g)}}},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),a=e.getLine(n+1),o=e.getLine(n-1),s=o.search(/\S/),c=a.search(/\S/),l=r[i]===`-`;if(i==-1)return e.foldWidgets[n-1]=s!=-1&&s<c?`start`:``,``;if(s==-1){if(i==c&&r[i]==`#`&&a[i]==`#`)return e.foldWidgets[n-1]=``,e.foldWidgets[n+1]=``,`start`}else if(s==i&&r[i]==`#`&&o[i]==`#`&&e.getLine(n-2).search(/\S/)==-1)return e.foldWidgets[n-1]=`start`,e.foldWidgets[n+1]=``,``;return s!=-1&&s<i||s!=-1&&s==i&&l?e.foldWidgets[n-1]=`start`:e.foldWidgets[n-1]=``,i<c?`start`:``}}.call(o.prototype)}),ace.define(`ace/mode/yaml`,[`require`,`exports`,`module`,`ace/lib/oop`,`ace/mode/text`,`ace/mode/yaml_highlight_rules`,`ace/mode/matching_brace_outdent`,`ace/mode/folding/yaml`,`ace/worker/worker_client`],function(e,t,n){var r=e(`../lib/oop`),i=e(`./text`).Mode,a=e(`./yaml_highlight_rules`).YamlHighlightRules,o=e(`./matching_brace_outdent`).MatchingBraceOutdent,s=e(`./folding/yaml`).FoldMode,c=e(`../worker/worker_client`).WorkerClient,l=function(){this.HighlightRules=a,this.$outdent=new o,this.foldingRules=new s,this.$behaviour=this.$defaultBehaviour};r.inherits(l,i),function(){this.lineCommentStart=[`#`],this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t);return e==`start`&&t.match(/^.*[\{\(\[]\s*$/)&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new c([`ace`],`ace/mode/yaml_worker`,`YamlWorker`);return t.attachToDocument(e.getDocument()),t.on(`annotate`,function(t){e.setAnnotations(t.data)}),t.on(`terminate`,function(){e.clearAnnotations()}),t},this.$id=`ace/mode/yaml`}.call(l.prototype),t.Mode=l}),(function(){ace.require([`ace/mode/yaml`],function(n){typeof t==`object`&&typeof e==`object`&&t&&(t.exports=n)})})()})),bC=r(((e,t)=>{ace.define(`ace/theme/clouds_midnight-css`,[`require`,`exports`,`module`],function(e,t,n){n.exports=`.ace-clouds-midnight .ace_gutter {
|
|
1006
1006
|
background: #232323;
|
|
1007
1007
|
color: #929292
|
|
1008
1008
|
}
|
|
@@ -1118,7 +1118,7 @@ import{a as e,r as t,s as n,t as r}from"./rolldown-runtime-BcKkbAw3.js";import{t
|
|
|
1118
1118
|
.ace-clouds-midnight .ace_indent-guide-active {
|
|
1119
1119
|
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;
|
|
1120
1120
|
}
|
|
1121
|
-
`}),ace.define(`ace/theme/clouds_midnight`,[`require`,`exports`,`module`,`ace/theme/clouds_midnight-css`,`ace/lib/dom`],function(e,t,n){t.isDark=!0,t.cssClass=`ace-clouds-midnight`,t.cssText=e(`./clouds_midnight-css`),e(`../lib/dom`).importCssString(t.cssText,t.cssClass,!1)}),(function(){ace.require([`ace/theme/clouds_midnight`],function(n){typeof t==`object`&&typeof e==`object`&&t&&(t.exports=n)})})()})),
|
|
1121
|
+
`}),ace.define(`ace/theme/clouds_midnight`,[`require`,`exports`,`module`,`ace/theme/clouds_midnight-css`,`ace/lib/dom`],function(e,t,n){t.isDark=!0,t.cssClass=`ace-clouds-midnight`,t.cssText=e(`./clouds_midnight-css`),e(`../lib/dom`).importCssString(t.cssText,t.cssClass,!1)}),(function(){ace.require([`ace/theme/clouds_midnight`],function(n){typeof t==`object`&&typeof e==`object`&&t&&(t.exports=n)})})()})),xC=r(((e,t)=>{ace.define(`ace/theme/chrome-css`,[`require`,`exports`,`module`],function(e,t,n){n.exports=`.ace-chrome .ace_gutter {
|
|
1122
1122
|
background: #ebebeb;
|
|
1123
1123
|
color: #333;
|
|
1124
1124
|
overflow : hidden;
|
|
@@ -1276,7 +1276,7 @@ import{a as e,r as t,s as n,t as r}from"./rolldown-runtime-BcKkbAw3.js";import{t
|
|
|
1276
1276
|
.ace-chrome .ace_indent-guide-active {
|
|
1277
1277
|
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;
|
|
1278
1278
|
}
|
|
1279
|
-
`}),ace.define(`ace/theme/chrome`,[`require`,`exports`,`module`,`ace/theme/chrome-css`,`ace/lib/dom`],function(e,t,n){t.isDark=!1,t.cssClass=`ace-chrome`,t.cssText=e(`./chrome-css`),e(`../lib/dom`).importCssString(t.cssText,t.cssClass,!1)}),(function(){ace.require([`ace/theme/chrome`],function(n){typeof t==`object`&&typeof e==`object`&&t&&(t.exports=n)})})()})),
|
|
1279
|
+
`}),ace.define(`ace/theme/chrome`,[`require`,`exports`,`module`,`ace/theme/chrome-css`,`ace/lib/dom`],function(e,t,n){t.isDark=!1,t.cssClass=`ace-chrome`,t.cssText=e(`./chrome-css`),e(`../lib/dom`).importCssString(t.cssText,t.cssClass,!1)}),(function(){ace.require([`ace/theme/chrome`],function(n){typeof t==`object`&&typeof e==`object`&&t&&(t.exports=n)})})()})),SC=r(((e,t)=>{ace.define(`ace/snippets`,[`require`,`exports`,`module`,`ace/lib/dom`,`ace/lib/oop`,`ace/lib/event_emitter`,`ace/lib/lang`,`ace/range`,`ace/range_list`,`ace/keyboard/hash_handler`,`ace/tokenizer`,`ace/clipboard`,`ace/editor`],function(e,t,n){function r(e){var t=new Date().toLocaleString(`en-us`,e);return t.length==1?`0`+t:t}var i=e(`./lib/dom`),a=e(`./lib/oop`),o=e(`./lib/event_emitter`).EventEmitter,s=e(`./lib/lang`),c=e(`./range`).Range,l=e(`./range_list`).RangeList,u=e(`./keyboard/hash_handler`).HashHandler,d=e(`./tokenizer`).Tokenizer,f=e(`./clipboard`),p={CURRENT_WORD:function(e){return e.session.getTextRange(e.session.getWordRange())},SELECTION:function(e,t,n){var r=e.session.getTextRange();return n?r.replace(/\n\r?([ \t]*\S)/g,`
|
|
1280
1280
|
`+n+`$1`):r},CURRENT_LINE:function(e){return e.session.getLine(e.getCursorPosition().row)},PREV_LINE:function(e){return e.session.getLine(e.getCursorPosition().row-1)},LINE_INDEX:function(e){return e.getCursorPosition().row},LINE_NUMBER:function(e){return e.getCursorPosition().row+1},SOFT_TABS:function(e){return e.session.getUseSoftTabs()?`YES`:`NO`},TAB_SIZE:function(e){return e.session.getTabSize()},CLIPBOARD:function(e){return f.getText&&f.getText()},FILENAME:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0]},FILENAME_BASE:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0].replace(/\.[^.]*$/,``)},DIRECTORY:function(e){return this.FILEPATH(e).replace(/[^/\\]*$/,``)},FILEPATH:function(e){return`/not implemented.txt`},WORKSPACE_NAME:function(){return`Unknown`},FULLNAME:function(){return`Unknown`},BLOCK_COMMENT_START:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.start||``},BLOCK_COMMENT_END:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.end||``},LINE_COMMENT:function(e){return(e.session.$mode||{}).lineCommentStart||``},CURRENT_YEAR:r.bind(null,{year:`numeric`}),CURRENT_YEAR_SHORT:r.bind(null,{year:`2-digit`}),CURRENT_MONTH:r.bind(null,{month:`numeric`}),CURRENT_MONTH_NAME:r.bind(null,{month:`long`}),CURRENT_MONTH_NAME_SHORT:r.bind(null,{month:`short`}),CURRENT_DATE:r.bind(null,{day:`2-digit`}),CURRENT_DAY_NAME:r.bind(null,{weekday:`long`}),CURRENT_DAY_NAME_SHORT:r.bind(null,{weekday:`short`}),CURRENT_HOUR:r.bind(null,{hour:`2-digit`,hour12:!1}),CURRENT_MINUTE:r.bind(null,{minute:`2-digit`}),CURRENT_SECOND:r.bind(null,{second:`2-digit`})};p.SELECTED_TEXT=p.SELECTION;var m=function(){function e(){this.snippetMap={},this.snippetNameMap={},this.variables=p}return e.prototype.getTokenizer=function(){return e.$tokenizer||this.createTokenizer()},e.prototype.createTokenizer=function(){function t(e){return e=e.substr(1),/^\d+$/.test(e)?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function n(e){return`(?:[^\\\\`+e+`]|\\\\.)`}var r={regex:`/(`+n(`/`)+`+)/`,onMatch:function(e,t,n){var r=n[0];return r.fmtString=!0,r.guard=e.slice(1,-1),r.flag=``,``},next:`formatString`};return e.$tokenizer=new d({start:[{regex:/\\./,onMatch:function(e,t,n){var r=e[1];return(r==`}`&&n.length||"`$\\".indexOf(r)!=-1)&&(e=r),[e]}},{regex:/}/,onMatch:function(e,t,n){return[n.length?n.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:t},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(e,n,r){var i=t(e.substr(1));return r.unshift(i[0]),i},next:`snippetVar`},{regex:/\n/,token:`newline`,merge:!1}],snippetVar:[{regex:`\\|`+n(`\\|`)+`*\\|`,onMatch:function(e,t,n){var r=e.slice(1,-1).replace(/\\[,|\\]|,/g,function(e){return e.length==2?e[1]:`\0`}).split(`\0`).map(function(e){return{value:e}});return n[0].choices=r,[r[0]]},next:`start`},r,{regex:`([^:}\\\\]|\\\\.)*:?`,token:``,next:`start`}],formatString:[{regex:/:/,onMatch:function(e,t,n){return n.length&&n[0].expectElse?(n[0].expectElse=!1,n[0].ifEnd={elseEnd:n[0]},[n[0].ifEnd]):`:`}},{regex:/\\./,onMatch:function(e,t,n){var r=e[1];return r==`}`&&n.length?e=r:"`$\\".indexOf(r)==-1?r==`n`?e=`
|
|
1281
1281
|
`:r==`t`?e=` `:`ulULE`.indexOf(r)!=-1&&(e={changeCase:r,local:r>`a`}):e=r,[e]}},{regex:`/\\w*}`,onMatch:function(e,t,n){var r=n.shift();return r&&(r.flag=e.slice(1,-1)),this.next=r&&r.tabstopId?`start`:``,[r||e]},next:`start`},{regex:/\$(?:\d+|\w+)/,onMatch:function(e,t,n){return[{text:e.slice(1)}]}},{regex:/\${\w+/,onMatch:function(e,t,n){var r={text:e.slice(2)};return n.unshift(r),[r]},next:`formatStringVar`},{regex:/\n/,token:`newline`,merge:!1},{regex:/}/,onMatch:function(e,t,n){var r=n.shift();return this.next=r&&r.tabstopId?`start`:``,[r||e]},next:`start`}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(e,t,n){var r=n[0];return r.formatFunction=e.slice(2,-1),[n.shift()]},next:`formatString`},r,{regex:/:[\?\-+]?/,onMatch:function(e,t,n){e[1]==`+`&&(n[0].ifEnd=n[0]),e[1]==`?`&&(n[0].expectElse=!0)},next:`formatString`},{regex:`([^:}\\\\]|\\\\.)*:?`,token:``,next:`formatString`}]}),e.$tokenizer},e.prototype.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map(function(e){return e.value||e})},e.prototype.getVariableValue=function(e,t,n){if(/^\d+$/.test(t))return(this.variables.__||{})[t]||``;if(/^[A-Z]\d+$/.test(t))return(this.variables[t[0]+`__`]||{})[t.substr(1)]||``;if(t=t.replace(/^TM_/,``),!this.variables.hasOwnProperty(t))return``;var r=this.variables[t];return typeof r==`function`&&(r=this.variables[t](e,t,n)),r??``},e.prototype.tmStrFormat=function(e,t,n){if(!t.fmt)return e;var r=t.flag||``,i=t.guard;i=new RegExp(i,r.replace(/[^gim]/g,``));var a=typeof t.fmt==`string`?this.tokenizeTmSnippet(t.fmt,`formatString`):t.fmt,o=this;return e.replace(i,function(){var e=o.variables.__;o.variables.__=[].slice.call(arguments);for(var t=o.resolveVariables(a,n),r=`E`,i=0;i<t.length;i++){var s=t[i];if(typeof s==`object`)if(t[i]=``,s.changeCase&&s.local){var c=t[i+1];c&&typeof c==`string`&&(s.changeCase==`u`?t[i]=c[0].toUpperCase():t[i]=c[0].toLowerCase(),t[i+1]=c.substr(1))}else s.changeCase&&(r=s.changeCase);else r==`U`?t[i]=s.toUpperCase():r==`L`&&(t[i]=s.toLowerCase())}return o.variables.__=e,t.join(``)})},e.prototype.tmFormatFunction=function(e,t,n){return t.formatFunction==`upcase`?e.toUpperCase():t.formatFunction==`downcase`?e.toLowerCase():e},e.prototype.resolveVariables=function(e,t){function n(t){var n=e.indexOf(t,o+1);n!=-1&&(o=n)}for(var r=[],i=``,a=!0,o=0;o<e.length;o++){var s=e[o];if(typeof s==`string`){r.push(s),s==`
|
|
1282
1282
|
`?(a=!0,i=``):a&&=(i=/^\t*/.exec(s)[0],/\S/.test(s));continue}if(s){if(a=!1,s.fmtString){var c=e.indexOf(s,o+1);c==-1&&(c=e.length),s.fmt=e.slice(o+1,c),o=c}if(s.text){var l=this.getVariableValue(t,s.text,i)+``;s.fmtString&&(l=this.tmStrFormat(l,s,t)),s.formatFunction&&(l=this.tmFormatFunction(l,s,t)),l&&!s.ifEnd?(r.push(l),n(s)):!l&&s.ifEnd&&n(s.ifEnd)}else s.elseEnd?n(s.elseEnd):s.tabstopId==null?s.changeCase!=null&&r.push(s):r.push(s)}}return r},e.prototype.getDisplayTextForSnippet=function(e,t){return h.call(this,e,t).text},e.prototype.insertSnippetForSelection=function(e,t,n){n===void 0&&(n={});var r=h.call(this,e,t,n),i=e.getSelectionRange(),a=e.session.replace(i,r.text),o=new g(e),s=e.inVirtualSelectionMode&&e.selection.index;o.addTabstops(r.tabstops,i.start,a,s)},e.prototype.insertSnippet=function(e,t,n){n===void 0&&(n={});var r=this;if(e.inVirtualSelectionMode)return r.insertSnippetForSelection(e,t,n);e.forEachSelection(function(){r.insertSnippetForSelection(e,t,n)},null,{keepOrder:!0}),e.tabstopManager&&e.tabstopManager.tabNext()},e.prototype.$getScope=function(e){var t=e.session.$mode.$id||``;if(t=t.split(`/`).pop(),t===`html`||t===`php`){t===`php`&&!e.session.$mode.inlinePhp&&(t=`html`);var n=e.getCursorPosition(),r=e.session.getState(n.row);typeof r==`object`&&(r=r[0]),r.substring&&(r.substring(0,3)==`js-`?t=`javascript`:r.substring(0,4)==`css-`?t=`css`:r.substring(0,4)==`php-`&&(t=`php`))}return t},e.prototype.getActiveScopes=function(e){var t=this.$getScope(e),n=[t],r=this.snippetMap;return r[t]&&r[t].includeScopes&&n.push.apply(n,r[t].includeScopes),n.push(`_`),n},e.prototype.expandWithTab=function(e,t){var n=this,r=e.forEachSelection(function(){return n.expandSnippetForSelection(e,t)},null,{keepOrder:!0});return r&&e.tabstopManager&&e.tabstopManager.tabNext(),r},e.prototype.expandSnippetForSelection=function(e,t){var n=e.getCursorPosition(),r=e.session.getLine(n.row),i=r.substring(0,n.column),a=r.substr(n.column),o=this.snippetMap,s;return this.getActiveScopes(e).some(function(e){var t=o[e];return t&&(s=this.findMatchingSnippet(t,i,a)),!!s},this),s?t&&t.dryRun?!0:(e.session.doc.removeInLine(n.row,n.column-s.replaceBefore.length,n.column+s.replaceAfter.length),this.variables.M__=s.matchBefore,this.variables.T__=s.matchAfter,this.insertSnippetForSelection(e,s.content),this.variables.M__=this.variables.T__=null,!0):!1},e.prototype.findMatchingSnippet=function(e,t,n){for(var r=e.length;r--;){var i=e[r];if(!(i.startRe&&!i.startRe.test(t))&&!(i.endRe&&!i.endRe.test(n))&&!(!i.startRe&&!i.endRe))return i.matchBefore=i.startRe?i.startRe.exec(t):[``],i.matchAfter=i.endRe?i.endRe.exec(n):[``],i.replaceBefore=i.triggerRe?i.triggerRe.exec(t)[0]:``,i.replaceAfter=i.endTriggerRe?i.endTriggerRe.exec(n)[0]:``,i}},e.prototype.register=function(e,t){function n(e){return e&&!/^\^?\(.*\)\$?$|^\\b$/.test(e)&&(e=`(?:`+e+`)`),e||``}function r(e,t,r){return e=n(e),t=n(t),r?(e=t+e,e&&e[e.length-1]!=`$`&&(e+=`$`)):(e+=t,e&&e[0]!=`^`&&(e=`^`+e)),new RegExp(e)}function i(e){e.scope||=t||`_`,t=e.scope,a[t]||(a[t]=[],o[t]={});var n=o[t];if(e.name){var i=n[e.name];i&&c.unregister(i),n[e.name]=e}a[t].push(e),e.prefix&&(e.tabTrigger=e.prefix),!e.content&&e.body&&(e.content=Array.isArray(e.body)?e.body.join(`
|
|
@@ -1382,60 +1382,60 @@ import{a as e,r as t,s as n,t as r}from"./rolldown-runtime-BcKkbAw3.js";import{t
|
|
|
1382
1382
|
animation: none;
|
|
1383
1383
|
}
|
|
1384
1384
|
}
|
|
1385
|
-
`,`autocompletion.css`,!1),t.AcePopup=g,t.$singleLineEditor=h,t.getAriaId=d}),ace.define(`ace/autocomplete/inline_screenreader`,[`require`,`exports`,`module`],function(e,t,n){t.AceInlineScreenReader=function(){function e(e){this.editor=e,this.screenReaderDiv=document.createElement(`div`),this.screenReaderDiv.classList.add(`ace_screenreader-only`),this.editor.container.appendChild(this.screenReaderDiv)}return e.prototype.setScreenReaderContent=function(e){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on(`afterRender`,function(){var e=this.popup.getRow(),t=this.popup.renderer.$textLayer,n=t.element.childNodes[e-t.config.firstRow];if(n){for(var r=`doc-tooltip `,i=0;i<this._lines.length;i++)r+=`ace-inline-screenreader-line-${i} `;n.setAttribute(`aria-describedby`,r)}}.bind(this)));this.screenReaderDiv.firstChild;)this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);this._lines=e.split(/\r\n|\r|\n/);var t=this.createCodeBlock();this.screenReaderDiv.appendChild(t)},e.prototype.destroy=function(){this.screenReaderDiv.remove()},e.prototype.createCodeBlock=function(){var e=document.createElement(`pre`);e.setAttribute(`id`,`ace-inline-screenreader`);for(var t=0;t<this._lines.length;t++){var n=document.createElement(`code`);n.setAttribute(`id`,`ace-inline-screenreader-line-${t}`);var r=document.createTextNode(this._lines[t]);n.appendChild(r),e.appendChild(n)}return e},e}()}),ace.define(`ace/autocomplete/inline`,[`require`,`exports`,`module`,`ace/snippets`,`ace/autocomplete/inline_screenreader`],function(e,t,n){var r=e(`../snippets`).snippetManager,i=e(`./inline_screenreader`).AceInlineScreenReader;t.AceInline=function(){function e(){this.editor=null}return e.prototype.show=function(e,t,n){if(n||=``,e&&this.editor&&this.editor!==e&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!e||!t)return!1;this.inlineScreenReader||=new i(e);var a=t.snippet?r.getDisplayTextForSnippet(e,t.snippet):t.value;return t.hideInlinePreview||!a||!a.startsWith(n)?!1:(this.editor=e,this.inlineScreenReader.setScreenReaderContent(a),a=a.slice(n.length),a===``?e.removeGhostText():e.setGhostText(a),!0)},e.prototype.isOpen=function(){return this.editor?!!this.editor.renderer.$ghostText:!1},e.prototype.hide=function(){return this.editor?(this.editor.removeGhostText(),!0):!1},e.prototype.destroy=function(){this.hide(),this.editor=null,this.inlineScreenReader&&=(this.inlineScreenReader.destroy(),null)},e}()}),ace.define(`ace/autocomplete/util`,[`require`,`exports`,`module`],function(e,t,n){t.parForEach=function(e,t,n){var r=0,i=e.length;i===0&&n();for(var a=0;a<i;a++)t(e[a],function(e,t){r++,r===i&&n(e,t)})};var r=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;t.retrievePrecedingIdentifier=function(e,t,n){n||=r;for(var i=[],a=t-1;a>=0&&n.test(e[a]);a--)i.push(e[a]);return i.reverse().join(``)},t.retrieveFollowingIdentifier=function(e,t,n){n||=r;for(var i=[],a=t;a<e.length&&n.test(e[a]);a++)i.push(e[a]);return i},t.getCompletionPrefix=function(e){var t=e.getCursorPosition(),n=e.session.getLine(t.row),r;return e.completers.forEach(function(e){e.identifierRegexps&&e.identifierRegexps.forEach(function(e){!r&&e&&(r=this.retrievePrecedingIdentifier(n,t.column,e))}.bind(this))}.bind(this)),r||this.retrievePrecedingIdentifier(n,t.column)},t.triggerAutocomplete=function(e,t){var t=t??e.session.getPrecedingCharacter();return e.completers.some(function(e){if(e.triggerCharacters&&Array.isArray(e.triggerCharacters))return e.triggerCharacters.includes(t)})}}),ace.define(`ace/autocomplete`,[`require`,`exports`,`module`,`ace/keyboard/hash_handler`,`ace/autocomplete/popup`,`ace/autocomplete/inline`,`ace/autocomplete/popup`,`ace/autocomplete/util`,`ace/lib/lang`,`ace/lib/dom`,`ace/snippets`,`ace/config`,`ace/lib/event`,`ace/lib/scroll`],function(e,t,n){var r=e(`./keyboard/hash_handler`).HashHandler,i=e(`./autocomplete/popup`).AcePopup,a=e(`./autocomplete/inline`).AceInline,o=e(`./autocomplete/popup`).getAriaId,s=e(`./autocomplete/util`),c=e(`./lib/lang`),l=e(`./lib/dom`),u=e(`./snippets`).snippetManager,d=e(`./config`),f=e(`./lib/event`),p=e(`./lib/scroll`).preventParentScroll,m=function(e,t){t.completer&&t.completer.destroy()},h=function(){function e(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new r,this.keyboardHandler.bindKeys(this.commands),this.parentNode=null,this.setSelectOnHover=!1,this.hasSeen=new Set,this.showLoadingState=!1,this.stickySelectionDelay=500,this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.onLayoutChange=this.onLayoutChange.bind(this),this.changeTimer=c.delayedCall(function(){this.updateCompletions(!0)}.bind(this)),this.tooltipTimer=c.delayedCall(this.updateDocTooltip.bind(this),50),this.popupTimer=c.delayedCall(this.$updatePopupPosition.bind(this),50),this.stickySelectionTimer=c.delayedCall(function(){this.stickySelection=!0}.bind(this),this.stickySelectionDelay),this.$firstOpenTimer=c.delayedCall(function(){var t=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!t||this.editor.completers.length===0||(this.completions=new _(e.completionsForLoading),this.openPopup(this.editor,t.prefix,!1),this.popup.renderer.setStyle(`ace_loading`,!0))}.bind(this),this.stickySelectionDelay)}return Object.defineProperty(e,"completionsForLoading",{get:function(){return[{caption:d.nls(`autocomplete.loading`,`Loading...`),value:``}]},enumerable:!1,configurable:!0}),e.prototype.$init=function(){return this.popup=new i(this.parentNode||document.body||document.documentElement),this.popup.on(`click`,function(e){this.insertMatch(),e.stop()}.bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on(`show`,this.$onPopupShow.bind(this)),this.popup.on(`hide`,this.$onHidePopup.bind(this)),this.popup.on(`select`,this.$onPopupChange.bind(this)),f.addListener(this.popup.container,`mouseout`,this.mouseOutListener.bind(this)),this.popup.on(`changeHoverMarker`,this.tooltipTimer.bind(null,null)),this.popup.renderer.on(`afterRender`,this.$onPopupRender.bind(this)),this.popup},e.prototype.$initInline=function(){if(!(!this.inlineEnabled||this.inlineRenderer))return this.inlineRenderer=new a,this.inlineRenderer},e.prototype.getPopup=function(){return this.popup||this.$init()},e.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip(),this.stickySelectionTimer.cancel(),this.popupTimer.cancel(),this.stickySelection=!1},e.prototype.$seen=function(e){!this.hasSeen.has(e)&&e&&e.completer&&e.completer.onSeen&&typeof e.completer.onSeen==`function`&&(e.completer.onSeen(this.editor,e),this.hasSeen.add(e))},e.prototype.$onPopupChange=function(e){if(this.inlineRenderer&&this.inlineEnabled){var t=e?null:this.popup.getData(this.popup.getRow());if(this.$updateGhostText(t),this.popup.isMouseOver&&this.setSelectOnHover){this.tooltipTimer.call(null,null);return}this.popupTimer.schedule(),this.tooltipTimer.schedule()}else this.popupTimer.call(null,null),this.tooltipTimer.call(null,null)},e.prototype.$updateGhostText=function(e){var t=this.base.row,n=this.base.column,r=this.editor.getCursorPosition().column,i=this.editor.session.getLine(t).slice(n,r);this.inlineRenderer.show(this.editor,e,i)?this.$seen(e):this.inlineRenderer.hide()},e.prototype.$onPopupRender=function(){var e=this.inlineRenderer&&this.inlineEnabled;if(this.completions&&this.completions.filtered&&this.completions.filtered.length>0)for(var t=this.popup.getFirstVisibleRow();t<=this.popup.getLastVisibleRow();t++){var n=this.popup.getData(t);n&&(!e||n.hideInlinePreview)&&this.$seen(n)}},e.prototype.$onPopupShow=function(e){this.$onPopupChange(e),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},e.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener(`resize`,this.onLayoutChange,{passive:!0}),window.addEventListener(`wheel`,this.mousewheelListener);for(var e=this.editor.container.parentNode,t=[];e;)t.push(e),e.addEventListener(`scroll`,this.onLayoutChange,{passive:!0}),e=e.parentNode;this.$elements=t}},e.prototype.unObserveLayoutChanges=function(){var e=this;window.removeEventListener(`resize`,this.onLayoutChange,{passive:!0}),window.removeEventListener(`wheel`,this.mousewheelListener),this.$elements&&this.$elements.forEach(function(t){t.removeEventListener(`scroll`,e.onLayoutChange,{passive:!0})}),this.$elements=null},e.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},e.prototype.$updatePopupPosition=function(){var e=this.editor,t=e.renderer,n=t.layerConfig.lineHeight,r=t.$cursorLayer.getPixelPosition(this.base,!0);r.left-=this.popup.getTextLeftOffset();var i=e.container.getBoundingClientRect();r.top+=i.top-t.layerConfig.offset,r.left+=i.left-e.renderer.scrollLeft,r.left+=t.gutterWidth;var a={top:r.top,left:r.left};t.$ghostText&&t.$ghostTextWidget&&this.base.row===t.$ghostText.position.row&&(a.top+=t.$ghostTextWidget.el.offsetHeight);var o=e.container.getBoundingClientRect().bottom-n,s=o<a.top?{top:o,left:a.left}:a;this.popup.tryShow(s,n,`bottom`)||this.popup.tryShow(r,n,`top`)||this.popup.show(r,n)},e.prototype.openPopup=function(e,t,n){this.$firstOpenTimer.cancel(),this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover);var r=this.popup.getRow(),i=this.popup.data[r];this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:o(this.popup.getRow()),inline:this.inlineEnabled}),e.keyBinding.addKeyboardHandler(this.keyboardHandler);var a;this.stickySelection&&(a=this.popup.data.indexOf(i)),(!a||a===-1)&&(a=0),this.popup.setRow(this.autoSelect?a:-1),a===r&&i!==this.completions.filtered[a]&&this.$onPopupChange();var s=this.inlineRenderer&&this.inlineEnabled;if(a===r&&s){var c=this.popup.getData(this.popup.getRow());this.$updateGhostText(c)}n||(this.popup.setTheme(e.getTheme()),this.popup.setFontSize(e.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},e.prototype.detach=function(){this.editor&&(this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off(`changeSelection`,this.changeListener),this.editor.off(`blur`,this.blurListener),this.editor.off(`mousedown`,this.mousedownListener),this.editor.off(`mousewheel`,this.mousewheelListener)),this.$firstOpenTimer.cancel(),this.changeTimer.cancel(),this.hideDocTooltip(),this.completionProvider&&this.completionProvider.detach(),this.popup&&this.popup.isOpen&&this.popup.hide(),this.popup&&this.popup.renderer&&this.popup.renderer.off(`afterRender`,this.$onPopupRender),this.base&&this.base.detach(),this.activated=!1,this.completionProvider=this.completions=this.base=null,this.unObserveLayoutChanges()},e.prototype.changeListener=function(e){var t=this.editor.selection.lead;(t.row!=this.base.row||t.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},e.prototype.blurListener=function(e){var t=document.activeElement,n=this.editor.textInput.getElement(),r=e.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(e.relatedTarget),i=this.popup&&this.popup.container;t!=n&&t.parentNode!=i&&!r&&t!=this.tooltipNode&&e.relatedTarget!=n&&this.detach()},e.prototype.mousedownListener=function(e){this.detach()},e.prototype.mousewheelListener=function(e){this.popup&&!this.popup.isMouseOver&&this.detach()},e.prototype.mouseOutListener=function(e){this.popup.isOpen&&this.$updatePopupPosition()},e.prototype.goTo=function(e){this.popup.goTo(e)},e.prototype.insertMatch=function(e,t){if(e||=this.popup.getData(this.popup.getRow()),!e)return!1;if(e.value===``)return this.detach();var n=this.completions,r=this.getCompletionProvider().insertMatch(this.editor,e,n.filterText,t);return this.completions==n&&this.detach(),r},e.prototype.showPopup=function(e,t){this.editor&&this.detach(),this.activated=!0,this.editor=e,e.completer!=this&&(e.completer&&e.completer.detach(),e.completer=this),e.on(`changeSelection`,this.changeListener),e.on(`blur`,this.blurListener),e.on(`mousedown`,this.mousedownListener),e.on(`mousewheel`,this.mousewheelListener),this.updateCompletions(!1,t)},e.prototype.getCompletionProvider=function(e){return this.completionProvider||=new g(e),this.completionProvider},e.prototype.gatherCompletions=function(e,t){return this.getCompletionProvider().gatherCompletions(e,t)},e.prototype.updateCompletions=function(t,n){if(t&&this.base&&this.completions){var r=this.editor.getCursorPosition(),i=this.editor.session.getTextRange({start:this.base,end:r});if(i==this.completions.filterText)return;if(this.completions.setFilter(i),!this.completions.filtered.length||this.completions.filtered.length==1&&this.completions.filtered[0].value==i&&!this.completions.filtered[0].snippet)return this.detach();this.openPopup(this.editor,i,t);return}if(n&&n.matches){var r=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(r.row,r.column),this.base.$insertRight=!0,this.completions=new _(n.matches),this.getCompletionProvider().completions=this.completions,this.openPopup(this.editor,``,t)}var a=this.editor.getSession(),r=this.editor.getCursorPosition(),i=s.getCompletionPrefix(this.editor);this.base=a.doc.createAnchor(r.row,r.column-i.length),this.base.$insertRight=!0;var o={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:i,pos:r}).provideCompletions(this.editor,o,function(n,r,i){var a=r.filtered,o=s.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),i){if(!a.length){var c=!this.autoShown&&this.emptyMessage;if(typeof c==`function`&&(c=this.emptyMessage(o)),c){var l=[{caption:c,value:``}];this.completions=new _(l),this.openPopup(this.editor,o,t),this.popup.renderer.setStyle(`ace_loading`,!1),this.popup.renderer.setStyle(`ace_empty-message`,!0);return}return this.detach()}if(a.length==1&&a[0].value==o&&!a[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&a.length==1)return this.insertMatch(a[0])}this.completions=!i&&this.showLoadingState?new _(e.completionsForLoading.concat(a),r.filterText):r,this.openPopup(this.editor,o,t),this.popup.renderer.setStyle(`ace_empty-message`,!1),this.popup.renderer.setStyle(`ace_loading`,!i)}.bind(this)),this.showLoadingState&&!this.autoShown&&(!this.popup||!this.popup.isOpen)&&this.$firstOpenTimer.delay(this.stickySelectionDelay/2)},e.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},e.prototype.updateDocTooltip=function(){var e=this.popup,t=this.completions&&this.completions.filtered,n=t&&(t[e.getHoveredRow()]||t[e.getRow()]),r=null;if(!n||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var i=this.editor.completers.length,a=0;a<i;a++){var o=this.editor.completers[a];if(o.getDocTooltip&&n.completerId===o.id){r=o.getDocTooltip(n);break}}if(!r&&typeof n!=`string`&&(r=n),typeof r==`string`&&(r={docText:r}),!r||!r.docHTML&&!r.docText)return this.hideDocTooltip();this.showDocTooltip(r)},e.prototype.showDocTooltip=function(e){this.tooltipNode||(this.tooltipNode=l.createElement(`div`),this.tooltipNode.style.margin=`0`,this.tooltipNode.style.pointerEvents=`auto`,this.tooltipNode.style.overscrollBehavior=`contain`,this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this),this.tooltipNode.id=`doc-tooltip`,this.tooltipNode.setAttribute(`role`,`tooltip`),this.tooltipNode.addEventListener(`wheel`,p));var t=this.editor.renderer.theme;this.tooltipNode.className=`ace_tooltip ace_doc-tooltip `+(t.isDark?`ace_dark `:``)+(t.cssClass||``);var n=this.tooltipNode;e.docHTML?n.innerHTML=e.docHTML:e.docText&&(n.textContent=e.docText),n.parentNode||this.popup.container.appendChild(this.tooltipNode);var r=this.popup,i=r.container.getBoundingClientRect(),a=400,o=300,s=r.renderer.scrollBar.width||10,c=i.left,u=window.innerWidth-i.right-s,d=r.isTopdown?window.innerHeight-s-i.bottom:i.top,f=[Math.min(u/a,1),Math.min(c/a,1),Math.min(d/o,1)*.9],m=Math.max.apply(Math,f),h=n.style;h.display=`block`,m==f[0]||f[0]>=1?(h.left=i.right+1+`px`,h.right=``,h.maxWidth=a*m+`px`,h.top=i.top+`px`,h.bottom=``,h.maxHeight=Math.min(window.innerHeight-s-i.top,o)+`px`):m==f[1]||f[1]>=1?(h.right=window.innerWidth-i.left+`px`,h.left=``,h.maxWidth=a*m+`px`,h.top=i.top+`px`,h.bottom=``,h.maxHeight=Math.min(window.innerHeight-s-i.top,o)+`px`):m==f[2]&&(h.left=i.left+`px`,h.right=``,h.maxWidth=Math.min(a,window.innerWidth-i.left)+`px`,r.isTopdown?(h.top=i.bottom+`px`,h.bottom=``,h.maxHeight=Math.min(window.innerHeight-s-i.bottom,o)+`px`):(h.top=``,h.bottom=window.innerHeight-i.top+`px`,h.maxHeight=Math.min(i.top,o)+`px`)),l.$fixPositionBug(n)},e.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),this.tooltipNode){var e=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==e&&this.editor.focus(),this.tooltipNode=null,e.parentNode&&e.parentNode.removeChild(e)}},e.prototype.onTooltipClick=function(e){for(var t=e.target;t&&t!=this.tooltipNode;){if(t.nodeName==`A`&&t.href){t.rel=`noreferrer`,t.target=`_blank`;break}t=t.parentNode}},e.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var e=this.popup.container;e&&e.parentNode&&e.parentNode.removeChild(e)}this.editor&&this.editor.completer==this&&(this.editor.off(`destroy`,m),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},e.for=function(t){return t.completer instanceof e?t.completer:(t.completer&&=(t.completer.destroy(),null),d.get(`sharedPopups`)?(e.$sharedInstance||=new e,t.completer=e.$sharedInstance):(t.completer=new e,t.once(`destroy`,m)),t.completer)},e}();h.prototype.commands={Up:function(e){e.completer.goTo(`up`)},Down:function(e){e.completer.goTo(`down`)},"Ctrl-Up|Ctrl-Home":function(e){e.completer.goTo(`start`)},"Ctrl-Down|Ctrl-End":function(e){e.completer.goTo(`end`)},Esc:function(e){e.completer.detach()},Return:function(e){return e.completer.insertMatch()},"Shift-Return":function(e){e.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(e){var t=e.completer.insertMatch();if(t||e.tabstopManager)return t;e.completer.goTo(`down`)},Backspace:function(e){e.execCommand(`backspace`),!s.getCompletionPrefix(e)&&e.completer&&e.completer.detach()},PageUp:function(e){e.completer.popup.gotoPageUp()},PageDown:function(e){e.completer.popup.gotoPageDown()}},h.startCommand={name:`startAutocomplete`,exec:function(e,t){var n=h.for(e);n.autoInsert=!1,n.autoSelect=!0,n.autoShown=!1,n.showPopup(e,t),n.cancelContextMenu()},bindKey:`Ctrl-Space|Ctrl-Shift-Space|Alt-Space`};var g=function(){function e(e){this.initialPosition=e,this.active=!0}return e.prototype.insertByIndex=function(e,t,n){return!this.completions||!this.completions.filtered?!1:this.insertMatch(e,this.completions.filtered[t],n)},e.prototype.insertMatch=function(e,t,n){if(!t)return!1;if(e.startOperation({command:{name:`insertMatch`}}),t.completer&&t.completer.insertMatch)t.completer.insertMatch(e,t);else{if(!this.completions)return!1;var r=this.completions.filterText.length,i=0;if(t.range&&t.range.start.row===t.range.end.row&&(r-=this.initialPosition.prefix.length,r+=this.initialPosition.pos.column-t.range.start.column,i+=t.range.end.column-this.initialPosition.pos.column),r||i)for(var a=e.selection.getAllRanges?e.selection.getAllRanges():[e.getSelectionRange()],o=0,s;s=a[o];o++)s.start.column-=r,s.end.column+=i,e.session.remove(s);t.snippet?u.insertSnippet(e,t.snippet):this.$insertString(e,t),t.completer&&t.completer.onInsert&&typeof t.completer.onInsert==`function`&&t.completer.onInsert(e,t),t.command&&t.command===`startAutocomplete`&&e.execCommand(t.command)}return e.endOperation(),!0},e.prototype.$insertString=function(e,t){var n=t.value||t;e.execCommand(`insertstring`,n)},e.prototype.gatherCompletions=function(e,t){var n=e.getSession(),r=e.getCursorPosition(),i=s.getCompletionPrefix(e),a=[];this.completers=e.completers;var o=e.completers.length;return e.completers.forEach(function(c,l){c.getCompletions(e,n,r,i,function(n,r){c.hideInlinePreview&&(r=r.map(function(e){return Object.assign(e,{hideInlinePreview:c.hideInlinePreview})})),!n&&r&&(a=a.concat(r)),t(null,{prefix:s.getCompletionPrefix(e),matches:a,finished:--o===0})})}),!0},e.prototype.provideCompletions=function(e,t,n){var r=function(e){var r=e.prefix,i=e.matches;this.completions=new _(i),t.exactMatch&&(this.completions.exactMatch=!0),t.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(r),(e.finished||this.completions.filtered.length)&&n(null,this.completions,e.finished)}.bind(this),i=!0,a=null;if(this.gatherCompletions(e,function(e,t){if(this.active&&(e&&(n(e,[],!0),this.detach()),t.prefix.indexOf(t.prefix)===0)){if(i){a=t;return}r(t)}}.bind(this)),i=!1,a){var o=a;a=null,r(o)}},e.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach(function(e){typeof e.cancel==`function`&&e.cancel()})},e}(),_=function(){function e(e,t){this.all=e,this.filtered=e,this.filterText=t||``,this.exactMatch=!1,this.ignoreCaption=!1}return e.prototype.setFilter=function(e){if(e.length>this.filterText&&e.lastIndexOf(this.filterText,0)===0)var t=this.filtered;else var t=this.all;this.filterText=e,t=this.filterCompletions(t,this.filterText),t=t.sort(function(e,t){return t.exactMatch-e.exactMatch||t.$score-e.$score||(e.caption||e.value).localeCompare(t.caption||t.value)});var n=null;t=t.filter(function(e){var t=e.snippet||e.caption||e.value;return t!==n&&(n=t,!0)}),this.filtered=t},e.prototype.filterCompletions=function(e,t){var n=[],r=t.toUpperCase(),i=t.toLowerCase();e:for(var a=0,o;o=e[a];a++){if(o.skipFilter){o.$score=o.score,n.push(o);continue}var s=!this.ignoreCaption&&o.caption||o.value||o.snippet;if(s){var c=-1,l=0,u=0,d,f;if(this.exactMatch){if(t!==s.substr(0,t.length))continue e}else{var p=s.toLowerCase().indexOf(i);if(p>-1)u=p;else for(var m=0;m<t.length;m++){var h=s.indexOf(i[m],c+1),g=s.indexOf(r[m],c+1);if(d=h>=0&&(g<0||h<g)?h:g,d<0)continue e;f=d-c-1,f>0&&(c===-1&&(u+=10),u+=f,l|=1<<m),c=d}}o.matchMask=l,o.exactMatch=+!u,o.$score=(o.score||0)-u,n.push(o)}}return n},e}();t.Autocomplete=h,t.CompletionProvider=g,t.FilteredList=_}),ace.define(`ace/marker_group`,[`require`,`exports`,`module`],function(e,t,n){var r=function(){function e(e,t){t&&(this.markerType=t.markerType),this.markers=[],this.session=e,e.addDynamicMarker(this)}return e.prototype.getMarkerAtPosition=function(e){return this.markers.find(function(t){return t.range.contains(e.row,e.column)})},e.prototype.markersComparator=function(e,t){return e.range.start.row-t.range.start.row},e.prototype.setMarkers=function(e){this.markers=e.sort(this.markersComparator).slice(0,this.MAX_MARKERS),this.session._signal(`changeBackMarker`)},e.prototype.update=function(e,t,n,r){if(!(!this.markers||!this.markers.length))for(var i=r.firstRow,a=r.lastRow,o,s=0,c=0,l=0;l<this.markers.length;l++){var u=this.markers[l];if(!(u.range.end.row<i)&&!(u.range.start.row>a)&&(u.range.start.row===c?s++:(c=u.range.start.row,s=0),!(s>200))){var d=u.range.clipRows(i,a);if(d.start.row!==d.end.row||d.start.column!==d.end.column){var f=d.toScreenRange(n);if(f.isEmpty()){o=n.getNextFoldLine(d.end.row,o),o&&o.end.row>d.end.row&&(i=o.end.row);continue}this.markerType===`fullLine`?t.drawFullLineMarker(e,f,u.className,r):f.isMultiLine()?this.markerType===`line`?t.drawMultiLineMarker(e,f,u.className,r):t.drawTextMarker(e,f,u.className,r):t.drawSingleLineMarker(e,f,u.className+` ace_br15`,r)}}}},e}();r.prototype.MAX_MARKERS=1e4,t.MarkerGroup=r}),ace.define(`ace/autocomplete/text_completer`,[`require`,`exports`,`module`,`ace/range`],function(e,t,n){function r(e,t){return e.getTextRange(a.fromPoints({row:0,column:0},t)).split(o).length-1}function i(e,t){var n=r(e,t),i=e.getValue().split(o),a=Object.create(null),s=i[n];return i.forEach(function(e,t){if(!(!e||e===s)){var r=Math.abs(n-t),o=i.length-r;a[e]=a[e]?Math.max(o,a[e]):o}}),a}var a=e(`../range`).Range,o=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;t.id=`textCompleter`,t.getCompletions=function(e,t,n,r,a){var o=i(t,n);a(null,Object.keys(o).map(function(e){return{caption:e,value:e,score:o[e],meta:`local`}}))}}),ace.define(`ace/ext/language_tools`,[`require`,`exports`,`module`,`ace/snippets`,`ace/autocomplete`,`ace/config`,`ace/lib/lang`,`ace/autocomplete/util`,`ace/marker_group`,`ace/autocomplete/text_completer`,`ace/editor`,`ace/config`],function(e,t,n){var r=e(`../snippets`).snippetManager,i=e(`../autocomplete`).Autocomplete,a=e(`../config`),o=e(`../lib/lang`),s=e(`../autocomplete/util`),c=e(`../marker_group`).MarkerGroup,l=e(`../autocomplete/text_completer`),u={getCompletions:function(e,t,n,r,i){if(t.$mode.completer)return t.$mode.completer.getCompletions(e,t,n,r,i);var a=e.session.getState(n.row),o=t.$mode.getCompletions(a,t,n,r);o=o.map(function(e){return e.completerId=u.id,e}),i(null,o)},id:`keywordCompleter`},d=function(e){var t={};return e.replace(/\${(\d+)(:(.*?))?}/g,function(e,n,r,i){return t[n]=i||``}).replace(/\$(\d+?)/g,function(e,n){return t[n]})},f={getCompletions:function(e,t,n,i,a){var o=[],s=t.getTokenAt(n.row,n.column);s&&s.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?o.push(`html-tag`):o=r.getActiveScopes(e);var c=r.snippetMap,l=[];o.forEach(function(e){for(var t=c[e]||[],n=t.length;n--;){var r=t[n],i=r.name||r.tabTrigger;i&&l.push({caption:i,snippet:r.content,meta:r.tabTrigger&&!r.name?r.tabTrigger+`⇥ `:`snippet`,completerId:f.id})}},this),a(null,l)},getDocTooltip:function(e){e.snippet&&!e.docHTML&&(e.docHTML=[`<b>`,o.escapeHTML(e.caption),`</b>`,`<hr></hr>`,o.escapeHTML(d(e.snippet))].join(``))},id:`snippetCompleter`},p=[f,l,u];t.setCompleters=function(e){p.length=0,e&&p.push.apply(p,e)},t.addCompleter=function(e){p.push(e)},t.textCompleter=l,t.keyWordCompleter=u,t.snippetCompleter=f;var m={name:`expandSnippet`,exec:function(e){return r.expandWithTab(e)},bindKey:`Tab`},h=function(e,t){g(t.session.$mode)},g=function(e){typeof e==`string`&&(e=a.$modes[e]),e&&(r.files||={},_(e.$id,e.snippetFileId),e.modes&&e.modes.forEach(g))},_=function(e,t){!t||!e||r.files[e]||(r.files[e]={},a.loadModule(t,function(t){t&&(r.files[e]=t,!t.snippets&&t.snippetText&&(t.snippets=r.parseSnippetFile(t.snippetText)),r.register(t.snippets||[],t.scope),t.includeScopes&&(r.snippetMap[t.scope].includeScopes=t.includeScopes,t.includeScopes.forEach(function(e){g(`ace/mode/`+e)})))}))},v=function(e){var t=e.editor,n=t.completer&&t.completer.activated;if(e.command.name===`backspace`)n&&!s.getCompletionPrefix(t)&&t.completer.detach();else if(e.command.name===`insertstring`&&!n){y=e;var r=e.editor.$liveAutocompletionDelay;r?b.delay(r):x(e)}},y,b=o.delayedCall(function(){x(y)},0),x=function(e){var t=e.editor,n=s.getCompletionPrefix(t),r=e.args,a=s.triggerAutocomplete(t,r);if(n&&n.length>=t.$liveAutocompletionThreshold||a){var o=i.for(t);o.autoShown=!0,o.showPopup(t)}},S=e(`../editor`).Editor;e(`../config`).defineOptions(S.prototype,`editor`,{enableBasicAutocompletion:{set:function(e){e?(i.for(this),this.completers||=Array.isArray(e)?e:p,this.commands.addCommand(i.startCommand)):this.commands.removeCommand(i.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers||=Array.isArray(e)?e:p,this.commands.on(`afterExec`,v)):this.commands.off(`afterExec`,v)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(e){e?(this.commands.addCommand(m),this.on(`changeMode`,h),h(null,this)):(this.commands.removeCommand(m),this.off(`changeMode`,h))},value:!1}}),t.MarkerGroup=c}),(function(){ace.require([`ace/ext/language_tools`],function(n){typeof t==`object`&&typeof e==`object`&&t&&(t.exports=n)})})()}));g(),sw(),cw(),lw(),uw(),dw(),fw();var pw={jsonError:{border:`1px solid red`,minHeight:200},jsonNoError:{border:`1px solid #00000000`,minHeight:200}};function mw(e){return _.createElement(ow,{style:e.error===!0?pw.jsonError:e.error===!1?pw.jsonNoError:void 0,mode:e.mode||`json`,width:`100%`,height:`100%`,showPrintMargin:e.editValueMode,showGutter:e.editValueMode,highlightActiveLine:e.editValueMode,defaultValue:e.defaultValue,theme:e.themeType===`dark`?`clouds_midnight`:`chrome`,value:e.value,readOnly:!e.onChange,onChange:t=>{var n;return(n=e.onChange)==null?void 0:n.call(e,t)},name:e.name||`UNIQUE_ID_OF_DIV1`,fontSize:e.fontSize||14,setOptions:{enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,enableSnippets:!0,showLineNumbers:e.editValueMode,tabSize:e.editValueMode?2:void 0},editorProps:{$blockScrolling:!0}})}g();var hw={fullWidth:{width:`100%`},flex:{display:`flex`},button:{height:48,minWidth:48},wrapper:{width:`calc(100vw - 40px)`,height:`calc(100vh - 188px)`}},gw=class extends X{async componentDidMount(){await super.componentDidMount();let{data:e,attr:t}=this.props,n=X.getValue(e,t)||`{}`;this.setState({value:n,initialized:!0,jsonError:this.validateJson(n)})}validateJson(e){let t=!1;if(this.props.schema.validateJson!==!1&&(e||!this.props.schema.allowEmpty))try{this.props.schema.json5?Ts.default.parse(e):JSON.parse(e)}catch(e){console.log(`Error in JSON`,e),t=!0}return t}renderItem(e,t){if(!this.state.initialized)return null;let{schema:n,data:r,attr:i}=this.props,{value:a,showSelectId:o}=this.state,s=n.readOnly===!0||t;return _.createElement(Mn,{fullWidth:!0,variant:`standard`},_.createElement(`div`,{style:hw.flex},_.createElement(Ge,{color:`grey`,style:hw.button,size:`small`,variant:`outlined`,onClick:()=>this.setState({showSelectId:!0})},K.t(`jc_JSON editor`))),o?_.createElement(qS,{title:this.getText(n.label),overflowHidden:!0,applyDisabled:this.state.jsonError&&this.props.schema.doNotApplyWithError||s,onClose:()=>{s?this.setState({showSelectId:!1}):this.setState({showSelectId:!1,value:X.getValue(r,i)||{}})},onApply:s?void 0:()=>this.setState({showSelectId:!1},()=>i&&this.onChange(i,a))},_.createElement(`div`,{style:{...hw.wrapper,border:this.state.jsonError?`2px solid red`:`2px solid transparent`}},_.createElement(mw,{mode:this.props.schema.json5?`json5`:`json`,value:typeof a==`object`?JSON.stringify(a):a,onChange:s?void 0:e=>this.setState({value:e,jsonError:this.validateJson(e)}),name:`ConfigJsonEditor`,themeType:this.props.oContext.themeType}))):null,n.help||this.state.jsonError?_.createElement(en,null,this.state.jsonError?K.t(`jc_Invalid JSON`):this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var _w=[{value:`en`,label:`English`},{value:`de`,label:`Deutsch`},{value:`ru`,label:`русский`},{value:`pt`,label:`Portugues`},{value:`nl`,label:`Nederlands`},{value:`fr`,label:`français`},{value:`it`,label:`Italiano`},{value:`es`,label:`Espanol`},{value:`pl`,label:`Polski`},{value:`uk`,label:`Український`},{value:`zh-cn`,label:`简体中文`}],vw=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr),t=[..._w];this.props.schema.system?t.unshift({value:``,label:K.t(`jc_System language`)}):t.unshift({value:``,label:K.t(`jc_none`)}),this.setState({value:this.props.schema.system?e||``:e||K.getLanguage(),selectOptions:t})}renderItem(e,t){var n,r;if(!this.state.selectOptions)return null;let i=(n=this.state.selectOptions)==null?void 0:n.find(e=>e.value===this.state.value||!e.value&&!this.state.value);return _.createElement(Mn,{fullWidth:!0,variant:`standard`},this.props.schema.label?_.createElement(Ze,null,this.getText(this.props.schema.label)):null,_.createElement(Be,{variant:`standard`,error:!!e,disabled:t,value:this.state.value||`_`,renderValue:()=>this.getText(i==null?void 0:i.label,this.props.schema.noTranslation),onChange:e=>{let{value:t}=e.target;t===`_`&&(t=``),this.setState({value:t},()=>{if(this.props.attr){let e=this.onChange(this.props.attr,t);e instanceof Promise&&e.catch(e=>console.error(e))}if(this.props.schema.changeGuiLanguage)if(t){var e,n;if(t===K.getLanguage())return;K.setLanguage(t),(e=(n=this.props.oContext).changeLanguage)==null||e.call(n)}else this.props.oContext.socket.getSystemConfig().then(e=>{if(e.common.language!==K.getLanguage()&&e.common.language){var t,n;K.setLanguage(e.common.language),(t=(n=this.props.oContext).changeLanguage)==null||t.call(n)}}).catch(e=>console.error(`Cannot read system config: ${e}`))})}},(r=this.state.selectOptions)==null?void 0:r.map(e=>_.createElement(Ie,{key:e.value,value:e.value},e.label))),this.props.schema.help?_.createElement(en,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var yw=class extends X{constructor(e){super(e),q(this,`scrollRef`,void 0),this.scrollRef=_.createRef()}scrolledDown(){return this.scrollRef.current?this.scrollRef.current.offsetHeight+this.scrollRef.current.scrollTop>=this.scrollRef.current.scrollHeight:!1}async componentDidMount(){await super.componentDidMount(),X.getValue(this.props.data,this.props.attr)||(this.props.schema.licenseUrl?(this.setState({showLicenseDialog:!0,loading:!0,scrolledDown:!1}),fetch(this.props.schema.licenseUrl).then(e=>e.text()).then(e=>this.setState({license:e,loading:!1})).catch(e=>this.setState({license:e.toString(),loading:!1,error:!0,scrolledDown:!1}))):this.setState({showLicenseDialog:!0,scrolledDown:!1}),setTimeout(()=>{this.scrollRef.current&&(this.scrolledDown()?this.setState({scrolledDown:!0}):this.scrollRef.current.addEventListener(`scroll`,()=>{!this.state.scrolledDown&&this.scrolledDown()&&this.setState({scrolledDown:!0})}))},1e3))}renderItem(e,t){return this.state.showLicenseDialog?_.createElement(Dt,{maxWidth:`lg`,open:!0,onClose:(e,t)=>{t!==`escapeKeyDown`&&t!==`backdropClick`&&this.setState({showLicenseDialog:!1})}},_.createElement(gn,null,this.props.schema.title?K.t(this.props.schema.title):K.t(`jc_License agreement`)),_.createElement(Un,null,this.props.schema.licenseUrl?_.createElement(_.Fragment,null,this.state.loading?_.createElement(I,null):null,_.createElement(`pre`,{ref:this.scrollRef,style:{width:`100%`,height:`100%`,overflowY:`auto`,fontSize:14}},this.state.license)):null,!this.props.schema.licenseUrl&&this.props.schema.texts?_.createElement(`div`,{ref:this.scrollRef,style:{width:`100%`,height:`100%`,overflowY:`auto`,fontSize:14}},this.props.schema.texts.map((e,t)=>this.props.schema.noTranslation?_.createElement(`p`,{key:t},e):_.createElement(`p`,{key:t},K.t(e)))):null),_.createElement(On,null,this.props.schema.checkBox?_.createElement(bn,{control:_.createElement(Ht,{disabled:t,checked:!!this.state.licenseChecked,onClick:()=>this.setState({licenseChecked:!this.state.licenseChecked})}),label:K.t(this.props.schema.checkBox)}):null,_.createElement(Ge,{disabled:t||this.state.loading||this.state.error||this.props.schema.checkBox&&!this.state.licenseChecked||!this.state.scrolledDown,onClick:()=>{if(this.setState({showLicenseDialog:!1}),this.props.attr){let e=this.onChange(this.props.attr,!0);e instanceof Promise&&e.catch(e=>console.error(`Cannot set value: ${e}`))}},color:`primary`,variant:`contained`,startIcon:_.createElement(Oe,null)},this.props.schema.agreeText?K.t(this.props.schema.agreeText):K.t(`jc_Accept license`)),_.createElement(Ge,{onClick:()=>{this.setState({showLicenseDialog:!1}),setTimeout(()=>this.setState({showLicenseDialog:!0}),2e3)},color:`grey`,variant:`contained`,startIcon:_.createElement(je,null)},K.t(`jc_Close`)))):null}};g();var bw={indeterminate:{opacity:.5},control:{flexDirection:`row`,width:`100%`}},xw=class extends X{constructor(...e){super(...e),q(this,`updateTimeout`,void 0)}async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);if(e??=``,Array.isArray(e)&&this.props.oContext.multiEdit){e=X.DIFFERENT_VALUE,this.setState({_value:e,oldValue:e});return}this.setState({_value:e.toString(),oldValue:e.toString()})}static getDerivedStateFromProps(e,t){if(e.schema.min!==void 0&&e.schema.min<0||e.schema.max!==void 0&&e.schema.max<0)return null;let n=X.getValue(e.data,e.attr);return e.oContext.multiEdit&&t._value===X.DIFFERENT_VALUE?{_value:X.DIFFERENT_VALUE}:n==null||t.oldValue===null||t.oldValue===void 0||n.toString()!==parseFloat(t._value).toString()&&n.toString()!==t.oldValue.toString()?{_value:n}:null}checkValue(e){if(e==null||(e=e.toString().trim().replace(`,`,`.`),e===`-`))return null;let t=e===``?0:parseFloat(e);return e!==``&&Number.isNaN(t)?`jc_Not a number`:e!==``&&window.isFinite(t)?this.props.schema.min!==void 0&&t<this.props.schema.min?`jc_Too small`:this.props.schema.max!==void 0&&t>this.props.schema.max?`jc_Too big`:e===``||e===`-`||Number.isNaN(t)?`jc_Not a number`:null:`jc_Not a number`}renderItem(e,t){var n;let r=Array.isArray(this.state._value)||this.state._value===X.DIFFERENT_VALUE;if(this.state.oldValue!==null&&this.state.oldValue!==void 0?(this.updateTimeout&&clearTimeout(this.updateTimeout),this.updateTimeout=setTimeout(()=>{this.updateTimeout=void 0,this.setState({oldValue:null})},30)):this.updateTimeout&&=(clearTimeout(this.updateTimeout),void 0),r){let n=X.getValue(this.props.data,this.props.attr),r=(n==null?void 0:n.filter(e=>e||e===0).map(e=>({label:e.toString(),value:e})))||[];return r.unshift({label:K.t(X.DIFFERENT_LABEL),value:X.DIFFERENT_VALUE}),_.createElement(A,{style:bw.indeterminate,fullWidth:!0,freeSolo:!0,value:r[0],getOptionSelected:(e,t)=>e.label===t.label,onChange:(e,t)=>{if(this.props.attr){let e=this.onChange(this.props.attr,t==null?void 0:t.value,()=>{this.setState({_value:t==null?void 0:t.value,oldValue:this.state._value})});e instanceof Promise&&e.catch(e=>console.error(e))}},options:r,getOptionLabel:e=>e.label,renderInput:n=>_.createElement(ft,{...n,label:this.getText(this.props.schema.label),variant:`standard`,slotProps:{htmlInput:{...n.slotProps.htmlInput,readOnly:this.props.schema.readOnly||!1},input:{endAdornment:this.props.schema.unit?this.getText(this.props.schema.unit,this.props.schema.noTranslation):void 0}},error:!!e,placeholder:this.getText(this.props.schema.placeholder),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation),disabled:!!t})})}!e&&this.state._value!==null&&this.state._value!==void 0&&this.state._value&&(e=this.checkValue(this.state._value),e&&=K.t(e));let i=parseFloat(((n=this.state._value)==null?void 0:n.toString().replace(`,`,`.`))||``);return _.createElement(Mn,{variant:`standard`,style:bw.control},_.createElement(ft,{sx:{"& .up-down":{display:`none`},"&:hover .up-down":{display:`block`}},variant:`standard`,type:Number.isNaN(i)?`text`:this.props.schema.min!==void 0&&this.props.schema.min>=0?`number`:`text`,fullWidth:!0,slotProps:{htmlInput:{min:this.props.schema.min,max:this.props.schema.max,step:this.props.schema.step,readOnly:this.props.schema.readOnly||!1},input:{endAdornment:this.props.schema.unit?this.getText(this.props.schema.unit,this.props.schema.noTranslation):null}},value:this.state._value??``,error:!!e,disabled:!!t,onChange:e=>{let t=e.target.value,n=this.checkValue(t);n?this.onError(this.props.attr,K.t(n)):this.onError(this.props.attr),this.setState({_value:t,oldValue:this.state._value},()=>{let e=parseFloat(t.toString().replace(`,`,`.`));Number.isNaN(e)?this.onChange(this.props.attr,t.toString().replace(`,`,`.`)):this.onChange(this.props.attr,e)})},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:e&&typeof e==`string`?e:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)}))}};g();var Sw=class extends X{constructor(e){super(e),q(this,`authWindow`,void 0),q(this,`oid`,void 0),q(this,`url`,void 0),q(this,`onTokensUpdated`,(e,t)=>{if(t!=null&&t.val){let e=JSON.parse(t.val);if(new Date(e.access_token_expires_on).getTime()>Date.now()){this.state.accessTokens!==t.val&&this.setState({accessTokens:t.val});return}}this.setState({accessTokens:``})}),q(this,`onMessage`,e=>{if(e.origin===`https://oauth2.iobroker.in`&&(typeof e.data==`string`&&e.data.startsWith(`${this.props.schema.identifier}-authentication:`)||typeof e.message==`string`&&e.message.startsWith(`${this.props.schema.identifier}-authentication:`))){let i=(e.data||e.message).split(`:`);if(i[1]===`success`){var t;this.setState({accessTokens:i[2],success:!0,pressed:!1},()=>this.saveToken(this.state.accessTokens)),(t=this.authWindow)==null||t.postMessage(`close`,e.origin),this.authWindow=null}else{var n,r;(n=(r=this.props).onError)==null||n.call(r,i[2])}}}),this.state={...this.state,accessTokens:``,success:!1,blocked:!1,running:!1,pressed:!1,clientId:``,clientSecret:``,accessTokenError:``},this.url=`https://oauth2.iobroker.in/${e.schema.identifier}?redirect=true`,e.schema.scope&&(this.url+=`&scope=${encodeURIComponent(e.schema.scope)}`),this.oid=`${this.props.oContext.adapterName}.${this.props.oContext.instance}.${this.props.schema.saveTokenIn||`oauth2Tokens`}`}async componentDidMount(){await super.componentDidMount(),window.addEventListener?window.addEventListener(`message`,this.onMessage,!1):window.attachEvent(`onmessage`,this.onMessage,!1),await this.props.oContext.socket.subscribeState(this.oid,this.onTokensUpdated);let e;this.props.schema.ownClientId&&(e={clientId:X.getValue(this.props.data,this.props.schema.ownClientId)}),this.props.schema.ownClientId&&(e||={},e.clientSecret=X.getValue(this.props.data,this.props.schema.ownClientSecret));let t=await this.props.oContext.socket.getState(this.oid);if(t){let n=JSON.parse(t.val);new Date(n.access_token_expires_on).getTime()>Date.now()&&(e||={},e.accessTokens=t.val)}e&&this.setState(e)}componentWillUnmount(){super.componentWillUnmount(),window.removeEventListener?window.removeEventListener(`message`,this.onMessage,!1):window.detachEvent(`onmessage`,this.onMessage,!1),this.props.oContext.socket.unsubscribeState(this.oid,this.onTokensUpdated)}saveToken(e){try{e&&!e.startsWith(`{`)&&(e=atob(e));let t=JSON.parse(e);t.access_token&&t.refresh_token&&t.expires_in&&(t.access_token_expires_on||=new Date(Date.now()+t.expires_in*1e3).toISOString(),this.props.schema.ownClientId&&(t.client_id=X.getValue(this.props.data,this.props.schema.ownClientId)),this.props.oContext.socket.setState(this.oid,JSON.stringify(t),!0).catch(e=>console.log(`Error occurred: ${e.toString()}`)))}catch(e){console.warn(e)}}onOpenUrl(){this.authWindow=window.open(this.url+(this.props.schema.ownClientId?`&client_id=${encodeURIComponent(this.state.clientId)}&client_secret=${encodeURIComponent(this.state.clientSecret)}`:``),this.props.schema.identifier),!this.authWindow||this.authWindow.closed||this.authWindow.closed===void 0?this.setState({blocked:!0}):this.setState({pressed:!0})}renderItem(e,t){let n=``;if(this.state.accessTokens)try{let e=JSON.parse(this.state.accessTokens);n=new Date(e.access_token_expires_on).toLocaleString()}catch{}let r;r=this.state.accessTokens?this.props.schema.refreshLabel?this.getText(this.props.schema.refreshLabel):K.t(`jc_Renew %s access`,this.props.schema.identifier[0].toUpperCase()+this.props.schema.identifier.slice(1)):this.props.schema.label?this.getText(this.props.schema.label):K.t(`jc_Get %s access`,this.props.schema.identifier[0].toUpperCase()+this.props.schema.identifier.slice(1));let i=this.getIcon();return _.createElement(`div`,{style:{width:`100%`,margin:`0 0 1rem 0`}},this.props.schema.ownClientId?_.createElement(ft,{value:this.state.clientId,onChange:e=>{let t=e.target.value;this.setState({clientId:t},()=>this.onChange(this.props.schema.ownClientId,t))},style:{marginBottom:8},variant:`standard`,fullWidth:!0,error:!this.state.clientId,disabled:!!t,label:K.t(`jc_OAuth Client ID`),slotProps:{input:{endAdornment:this.state.clientId?_.createElement(ur,{size:`small`,tabIndex:-1,onClick:()=>this.setState({clientId:``},()=>this.onChange(this.props.schema.ownClientId,``))},_.createElement(je,null)):null}}}):null,this.props.schema.ownClientSecret?_.createElement(ft,{value:this.state.clientSecret,onChange:e=>{let t=e.target.value;this.setState({clientSecret:t},()=>this.onChange(this.props.schema.ownClientSecret,t))},style:{marginBottom:8},variant:`standard`,fullWidth:!0,error:!this.state.clientSecret,disabled:!!t,label:K.t(`jc_OAuth Client secret`),slotProps:{input:{endAdornment:this.state.clientSecret?_.createElement(ur,{size:`small`,tabIndex:-1,onClick:()=>this.setState({clientSecret:``},()=>this.onChange(this.props.schema.ownClientSecret,``))},_.createElement(je,null)):null}}}):null,_.createElement(Ge,{disabled:this.state.running||!!(this.props.schema.ownClientSecret&&!this.state.clientSecret)||!!(this.props.schema.ownClientId&&!this.state.clientId),endIcon:i||_.createElement(ze,null),variant:`contained`,onClick:()=>this.onOpenUrl()},r),this.state.blocked?_.createElement(`div`,{style:{color:`red`,fontSize:16,marginTop:20}},K.t(`jc_Please allow popups in your browser for this page!`)):null,this.state.accessTokens?_.createElement(`div`,{style:{color:`green`,fontSize:16,marginTop:20}},this.props.alive?K.t(`jc_Successfully authorized. Token valid till %s and will be automatically renewed.`,n):K.t(`jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.`,n)):null,this.state.pressed?_.createElement(_.Fragment,null,_.createElement(`div`,{style:{width:`100%`,margin:`1rem 0 1rem 0`}},_.createElement(`span`,{style:{marginRight:4}},`${K.t(`jc_If the button above does not work, you can authorize manually this app by visiting this url`)}`,`:`),_.createElement(`br`,null),_.createElement(`a`,{target:this.props.schema.identifier,href:this.url,rel:`noreferrer`},this.url)),_.createElement(ft,{value:this.state.accessTokens,label:K.t(`jc_Enter the code from that page here`),variant:`standard`,error:!!this.state.accessTokenError,helperText:this.state.accessTokenError||``,onChange:e=>{let t=e.target.value;try{t!=null&&t.trim()&&!t.trim().startsWith(`{`)&&(t=atob(t.trim()))}catch{this.setState({accessTokenError:`Invalid access token. Cannot decode from base64`})}if(t!=null&&t.startsWith(`{`))try{let e=JSON.parse(t);e.access_token&&(e.access_token_expires_on=new Date(Date.now()+(e.expires_in-10)*1e3).toISOString(),this.setState({accessTokens:JSON.stringify(e),accessTokenError:``},()=>this.saveToken(this.state.accessTokens)))}catch{this.setState({accessTokens:t,accessTokenError:`Invalid access token. Cannot parse JSON`})}else t&&this.setState({accessTokens:t,accessTokenError:`Invalid access token. Not JSON`})},fullWidth:!0})):null)}};g();var Cw={flex:{display:`flex`},button:{maxHeight:48,marginLeft:4,minWidth:48}},ww=class extends X{constructor(...e){super(...e),q(this,`fillOnSelect`,[]),q(this,`onObjectChanged`,async(e,t)=>{if(await this.onChange(e,t),this.fillOnSelect.length)try{let e=t&&await this.getCachedObject(t);if(e){for(let t of this.fillOnSelect)if(t.overwrite||!X.getValue(this.props.data,t.attr)){let n=X.getValue(e,t.pathInObject);typeof n==`object`&&(n=this.getText(n,!0)),await this.onChange(t.attr,n)}}}catch(e){console.error(e.toString())}})}async componentDidMount(){await super.componentDidMount();let{data:e,attr:t}=this.props,n=X.getValue(e,t)||``;if(this.props.schema.fillOnSelect){let e=this.props.schema.fillOnSelect.split(`,`).map(e=>e.trim());for(let t of e){let e=t.split(`=>`);if(e.length===2){let t={pathInObject:e[0],attr:e[1]};(t.attr.includes(`(X)`)||t.attr.includes(`(x)`))&&(t.overwrite=!0,t.attr=t.attr.replace(/\(X\)|\(x\)/g,``)),this.fillOnSelect.push(t)}else console.error(`Invalid format for fillOnSelect: ${this.props.schema.fillOnSelect}`)}}this.setState({value:n,initialized:!0})}renderItem(e,t){if(!this.state.initialized)return null;let n=this.props.oContext.socket,{schema:r,attr:i}=this.props,{value:a,showSelectId:o}=this.state;return _.createElement(Mn,{fullWidth:!0,variant:`standard`},r.label?_.createElement(Ze,{shrink:!0},this.getText(r.label)):null,_.createElement(`div`,{style:Cw.flex},_.createElement(ft,{variant:`standard`,fullWidth:!0,value:a,error:!!e,disabled:t,placeholder:this.getText(r.placeholder),label:this.getText(r.label),helperText:this.renderHelp(r.help,r.helpLink,r.noTranslation),onChange:e=>{let t=Array.isArray(e.target.value)?e.target.value[0]:e.target.value;this.setState({value:t},()=>i&&void this.onObjectChanged(i,t))}}),_.createElement(Ge,{color:`grey`,disabled:t,style:Cw.button,size:`small`,variant:`outlined`,onClick:()=>this.setState({showSelectId:!0})},`...`)),o?_.createElement(Dn,{imagePrefix:this.props.oContext.imagePrefix??`../..`,dialogName:`admin.${this.props.oContext.adapterName}`,filterFunc:r.filterFunc,themeType:this.props.oContext.themeType,theme:this.props.oContext.theme,types:r.types?Array.isArray(r.types)?r.types:[r.types]:void 0,customFilter:r.customFilter,filters:r.filters,socket:n,selected:a,root:r.root,onClose:()=>this.setState({showSelectId:!1}),onOk:e=>{let t=Array.isArray(e)?e[0]:e;this.setState({showSelectId:!1,value:t},()=>i&&void this.onObjectChanged(i,t))}}):null)}};g();var Tw={fullWidth:{width:`100%`,display:`inline-block`},halfWidth1:{width:`calc(50% - 5px)`,display:`inline-block`,marginRight:8},halfWidth2:{width:`calc(50% - 5px)`,display:`inline-block`}},Ew=`____ppp____`,Dw=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);this.setState({_repeat:e?Ew:``,_visible:!1,value:e?Ew:``,_notEqual:!1})}onChangePassword(e,t){e===void 0&&(e=this.state.value),t===void 0&&(t=this.state._repeat);let n=!!this.props.schema.repeat&&t!==e;this.setState({value:e,_repeat:t,_notEqual:n},()=>{if(n)this.onError(this.props.attr,K.t(`jc_Passwords are not equal!`));else{this.onError(this.props.attr);let t=this.onChange(this.props.attr,e);t instanceof Promise&&t.catch(e=>this.onError(this.props.attr,e))}})}renderItem(e,t){if(this.state._notEqual===void 0)return null;let n=_.createElement(ft,{variant:`standard`,fullWidth:!0,type:this.state._visible&&this.state.value!==Ew?`text`:`password`,value:this.state.value,error:!!e||this.state._notEqual,disabled:!!t,onChange:e=>this.onChangePassword(e.target.value),label:this.getText(this.props.schema.label),slotProps:{input:{autoComplete:`new-password`,endAdornment:this.state.value&&this.state.value!==Ew&&this.props.schema.visible&&!t&&!this.props.schema.readOnly?_.createElement(sr,{position:`end`},_.createElement(ur,{size:`large`,tabIndex:-1,onClick:e=>{e.preventDefault(),e.stopPropagation(),this.setState({_visible:!this.state._visible})},edge:`end`},this.state._visible?_.createElement(et,null):_.createElement(nr,null))):void 0},htmlInput:{autoComplete:`new-password`,form:{autoComplete:`off`},maxLength:this.props.schema.maxLength||this.props.schema.max||void 0,readOnly:this.props.schema.readOnly||!1}},helperText:this.state._notEqual?K.t(`jc_Passwords are not equal!`):this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)});if(this.props.schema.repeat&&!this.props.schema.readOnly){let r=this.state._visible?null:_.createElement(ft,{variant:`standard`,fullWidth:!0,type:`password`,value:this.state._repeat,error:!!e||this.state._notEqual,disabled:!!t,onChange:e=>this.onChangePassword(void 0,e.target.value),label:`${this.getText(this.props.schema.label)} (${K.t(`jc_repeat`)})`,slotProps:{input:{autoComplete:`new-password`},htmlInput:{autoComplete:`new-password`,form:{autoComplete:`off`},maxLength:this.props.schema.maxLength||this.props.schema.max||void 0}},helperText:this.state._notEqual?K.t(`jc_Passwords are not equal!`):this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)});return _.createElement(`div`,{style:Tw.fullWidth},_.createElement(`div`,{style:Tw.halfWidth1},n),_.createElement(`div`,{style:Tw.halfWidth2},r))}return n}};g();var Ow=class extends X{constructor(...e){super(...e),q(this,`checkTimeout`,null)}async componentDidMount(){await super.componentDidMount();let e=await this.getPatternAsync(this.props.schema.pattern,null,!0)??``;this.setState({pattern:e})}componentWillUnmount(){this.checkTimeout&&=(clearTimeout(this.checkTimeout),null),super.componentWillUnmount()}checkIfInstanceChanged(){this.checkTimeout&&clearTimeout(this.checkTimeout),this.checkTimeout=setTimeout(async()=>{this.checkTimeout=null;let e=await this.getPatternAsync(this.props.schema.pattern,null,!0)??``;e!==this.state.pattern&&this.setState({pattern:e})},200)}renderItem(e,t){return this.checkIfInstanceChanged(),_.createElement(ft,{variant:`standard`,fullWidth:!0,disabled:!!t,slotProps:{input:{endAdornment:this.props.schema.copyToClipboard?_.createElement(ur,{tabIndex:-1,size:`small`,onClick:async()=>{$t.copyToClipboard(await this.getPatternAsync(this.props.schema.pattern,null,this.props.schema.noTranslation)),window.alert(K.t(`jc_Copied`))}},_.createElement(St,null)):void 0}},value:this.state.pattern||``,label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}};g();var kw={warning:{"& .Mui-error":{color:`orange`}}},Aw=class extends X{constructor(...e){super(...e),q(this,`updateTimeout`,void 0)}async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);e??=``,this.setState({_value:e.toString(),oldValue:e.toString()});let t=await this.props.oContext.socket.getAdapterInstances(),n=`system.adapter.${this.props.oContext.adapterName}.${this.props.oContext.instance}`,r=await this.getCachedObject(n),i=r==null?void 0:r.common.host,a=[];t.forEach(e=>{var t,r;if(!e||e._id===n||e.common.host!==i||!((t=e.native)!=null&&t.bind))return;if(e!=null&&e.native&&e.native.secure&&e.native.leEnabled&&e.native.leUpdate){let t=parseInt(e.native.leCheckPort||e.native.lePort,10);if(t){var o;a.push({name:`${e._id.replace(`system.adapter.`,``)} (LE)`,port:t,v6bind:e.native.bind.includes(`:`)?e.native.bind:e.native.v6bind,bind:e.native.bind,enabled:!!((o=e.common)!=null&&o.enabled)})}}let s=parseInt(e==null||(r=e.native)==null?void 0:r.port,10);if(s){var c;a.push({name:e._id.replace(`system.adapter.`,``),bind:e.native.bind,v6bind:e.native.bind.includes(`:`)?e.native.bind:e.native.v6bind,port:s,enabled:!!((c=e.common)!=null&&c.enabled)})}}),this.setState({ports:a})}static getDerivedStateFromProps(e,t){let n=X.getValue(e.data,e.attr);return n==null||t.oldValue===null||t.oldValue===void 0||n.toString()!==parseInt(t._value,10).toString()&&n.toString()!==t.oldValue.toString()?{_value:n}:null}checkValue(e){if(e==null)return null;let t=this.props.schema.min??20,n=this.props.schema.max||65535;e=e.toString().trim();let r=e===``?0:parseInt(e,10);return e!==``&&Number.isNaN(r)?`jc_Not a number`:e!==``&&window.isFinite(Number(e))?r<t?`jc_Too small`:r>n?`jc_Too big`:e===``||e===`-`||Number.isNaN(r)?`jc_Not a number`:null:`jc_Not a number`}renderItem(e,t){this.state.oldValue!==null&&this.state.oldValue!==void 0?(this.updateTimeout&&clearTimeout(this.updateTimeout),this.updateTimeout=setTimeout(()=>{this.updateTimeout=void 0,this.setState({oldValue:null})},30)):this.updateTimeout&&=(clearTimeout(this.updateTimeout),void 0);let n=this.props.schema.min??20,r=this.props.schema.max||65535,i;if(this.state.ports){let t=parseInt(this.state._value,10);if(t){let n=this.props.data.bind,r=this.state.ports.filter(e=>{if(e.port!==t)return!1;let r=e.bind,i=e.v6bind;return!n||!r||n===`0.0.0.0`||r===`0.0.0.0`||n===`::`||i===`::`||n===r||n===i}),a=r.findIndex(e=>e.port===t&&e.enabled);if(a!==-1){let n=this.state.ports.find(e=>e.port===t&&e.enabled&&r.some(t=>t.name===e.name&&t.bind===e.bind));e=K.t(`jc_Port is already used by %s`,(n==null?void 0:n.name)||r[a].name)}else if(a=r.findIndex(e=>e.port===t&&!e.enabled),a!==-1){i=!0;let n=this.state.ports.find(e=>e.port===t&&!e.enabled&&r.some(t=>t.name===e.name&&t.bind===e.bind));e=K.t(`jc_Port could be used by %s`,(n==null?void 0:n.name)||r[a].name)}}}return!e&&this.state._value!==null&&this.state._value!==void 0&&(e=this.checkValue(this.state._value),typeof e==`string`&&(e=K.t(e))),_.createElement(ft,{variant:`standard`,type:`number`,fullWidth:!0,slotProps:{htmlInput:{min:n,max:r,readOnly:this.props.schema.readOnly||!1}},value:this.state._value??``,error:!!e,disabled:!!t,sx:i?kw.warning:void 0,onChange:e=>{let t=Number(e.target.value.toString().replace(/[^0-9]/g,``)).toString(),n=this.checkValue(t);n?this.onError(this.props.attr,K.t(n)):this.onError(this.props.attr),this.setState({_value:t,oldValue:this.state._value},()=>{if(t.trim()===parseInt(t,10).toString()){let e=this.onChange(this.props.attr,parseInt(t,10)||0);e instanceof Promise&&e.catch(e=>{console.error(`Cannot set value for ${this.props.attr}: ${e}`)})}})},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:e&&typeof e==`string`?e:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}};g();var jw=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);this.props.oContext.socket.getEnums(`rooms`).then(t=>{let n=Object.keys(t).map(e=>({value:this.props.schema.short?e.replace(`enum.rooms.`,``):e,label:this.getText(t[e].common.name),obj:t[e]}));this.props.schema.allowDeactivate!==!1&&n.unshift({label:K.t(X.NONE_LABEL),value:X.NONE_VALUE}),this.setState({value:e,selectOptions:n})}).catch(e=>console.error(`Cannot get enums: ${e}`))}renderItem(e,t){if(!this.state.selectOptions)return null;let n=this.state.selectOptions.find(e=>e.value===this.state.value);return _.createElement(Mn,{variant:`standard`,fullWidth:!0},this.props.schema.label?_.createElement(Ze,null,this.getText(this.props.schema.label)):null,_.createElement(Be,{variant:`standard`,error:!!e,disabled:!!t,value:this.state.value||`_`,renderValue:()=>n?n.obj?_.createElement(jn,{value:n.obj,themeType:this.props.oContext.themeType,lang:K.getLanguage()}):n.label:``,onChange:e=>{this.setState({value:e.target.value===`_`?``:e.target.value},()=>this.onChange(this.props.attr,this.state.value))}},this.state.selectOptions.map(e=>_.createElement(Ie,{key:e.value,value:e.value,style:e.value===X.DIFFERENT_VALUE?{opacity:.5}:{}},e.obj?_.createElement(jn,{value:e.obj,themeType:this.props.oContext.themeType,lang:K.getLanguage()}):e.label))),this.props.schema.help?_.createElement(en,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var Mw={fullWidth:{width:`100%`},noMargin:{"&>div":{marginTop:0}},icon:{width:20,height:20,marginRight:4}},Nw=class extends X{constructor(...e){super(...e),q(this,`initialValue`,``)}async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);this.props.schema.multiple&&(typeof e==`string`?e=[e]:e??=[]);let t=[];for(let e of this.props.schema.options||[]){let n=e;if(Array.isArray(n.items)){let r={label:this.getText(e.label,this.props.schema.noTranslation),value:e.value,group:!0,color:e.color,description:this.getText(e.description)};r.hiddenValue=await this.isHidden(r),t.push(r);for(let e of n.items){let n={label:this.getText(e.label,this.props.schema.noTranslation||e.noTranslation),value:e.value,hidden:e.hidden,color:e.color,description:this.getText(e.description),icon:e.icon};n.hiddenValue=await this.isHidden(n),t.push(n)}}else{let n={label:this.getText(e.label,this.props.schema.noTranslation||e.noTranslation),value:e.value,hidden:e.hidden,color:e.color,description:this.getText(e.description),icon:e.icon};n.hiddenValue=await this.isHidden(n),t.push(n)}}if(this.props.onFilterLabelUpdate&&this.props.table&&this.props.attr){let e={};for(let n of t)!n.group&&n.value!==X.DIFFERENT_VALUE&&(e[n.value.toString()]=n.label);this.props.onFilterLabelUpdate(this.props.attr,e)}Array.isArray(e)&&!this.props.schema.multiple?(this.initialValue=[...e],t.unshift({label:K.t(X.DIFFERENT_LABEL),value:X.DIFFERENT_VALUE}),this.setState({value:X.DIFFERENT_VALUE,selectOptions:t})):this.setState({value:e,selectOptions:t})}_getValue(){let e=this.state.value===null||this.state.value===void 0?X.getValue(this.props.data,this.props.attr):this.state.value;return this.props.schema.multiple&&(typeof e==`string`?e=[e]:e??=[]),e}async isHidden(e){return e.hidden?this.props.custom?!!await this.executeCustom(e.hidden,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData):!!await this.execute(e.hidden,this.props.schema.default,this.props.data,this.props.arrayIndex,this.props.globalData):!1}renderRadio(e,t){var n;let r=(n=this.state.selectOptions)==null?void 0:n.filter(e=>!e.hiddenValue&&!e.group),i=this._getValue();return _.createElement(Mn,{fullWidth:!0,error:!!e,disabled:!!t,id:`jsonSelect_${this.props.attr}_${this.props.index||this.props.index===0?this.props.index:``}`},this.props.schema.label?_.createElement(Xt,null,this.getText(this.props.schema.label)):null,_.createElement(Me,{row:!!this.props.schema.horizontal,value:i==null?``:i.toString(),onChange:e=>{let t=r==null?void 0:r.find(t=>t.value.toString()===e.target.value),n=t?t.value:e.target.value;this.setState({value:n},()=>{let e=this.onChange(this.props.attr,n);e instanceof Promise&&e.catch(e=>console.error(e))})}},r==null?void 0:r.map((e,t)=>_.createElement(bn,{key:t,value:e.value.toString(),control:_.createElement(ke,null),title:e.description||``,label:_.createElement(`span`,{style:{display:`flex`,alignItems:`center`}},e.icon?_.createElement(Pt,{src:e.icon,style:Mw.icon}):null,_.createElement(be,{component:`span`,style:{color:e.color}},e.label)),style:e.value===X.DIFFERENT_VALUE?{opacity:.5}:{}}))),this.props.schema.help?_.createElement(en,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}renderItem(e,t){if(!this.state.selectOptions)return null;if(this.props.schema.format===`radio`)return this.renderRadio(e,t);let n=this.state.selectOptions.filter(e=>!e.hiddenValue),r=this._getValue(),i=this.props.schema.multiple?null:n.find(e=>e.value==r);return _.createElement(Mn,{variant:`standard`,fullWidth:!0,sx:this.props.table===void 0?void 0:Mw.noMargin,id:`jsonSelect_${this.props.attr}_${this.props.index||this.props.index===0?this.props.index:``}`},this.props.schema.label?_.createElement(Ze,null,this.getText(this.props.schema.label)):null,_.createElement(Be,{variant:`standard`,error:!!e,multiple:this.props.schema.multiple,disabled:!!t,value:r||`_`,renderValue:e=>this.props.schema.multiple?_.createElement(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:.5}},e.map(e=>{let t=n.find(t=>t.value===e);if(t||this.props.schema.showAllValues!==!1){let n=(t==null?void 0:t.label)||e;return _.createElement(qn,{key:e,label:n})}return null})):i!=null&&i.color?_.createElement(`span`,{style:{display:`flex`,alignItems:`center`}},i.icon?_.createElement(Pt,{src:i.icon,style:Mw.icon}):null,_.createElement(`span`,null,_.createElement(`div`,{style:{color:i.color}},i.label??e),i.description?_.createElement(`div`,{style:{opacity:.7,fontStyle:`italic`,fontSize:`smaller`}},i.description):null)):(i==null?void 0:i.label)===void 0?i!=null&&i.icon?_.createElement(`span`,{style:{display:`flex`,alignItems:`center`}},_.createElement(Pt,{src:i.icon,style:Mw.icon}),e):e:_.createElement(`span`,{style:{display:`flex`,alignItems:`center`}},i.icon?_.createElement(Pt,{src:i.icon,style:Mw.icon}):null,_.createElement(`span`,null,_.createElement(`div`,null,i.label),i.description?_.createElement(`div`,{style:{opacity:.7,fontStyle:`italic`,fontSize:`smaller`}},i.description):null)),onChange:e=>{this.setState({value:e.target.value===`_`?``:e.target.value},()=>{let e;e=this.state.value===X.DIFFERENT_VALUE?this.onChange(this.props.attr,this.initialValue):this.onChange(this.props.attr,this.state.value),e instanceof Promise&&e.catch(e=>console.error(e))})}},n.map((e,t)=>e.group?_.createElement(B,{key:t,style:{color:e.color}},_.createElement(`div`,null,e.label),e.description?_.createElement(`div`,{style:{opacity:.7,fontStyle:`italic`,fontSize:`smaller`}},e.description):null):_.createElement(Ie,{key:t,value:e.value,style:e.value===X.DIFFERENT_VALUE?{opacity:.5}:{}},this.props.schema.multiple?_.createElement(Ht,{checked:r.includes(e.value),onClick:()=>{let t=JSON.parse(JSON.stringify(this._getValue())),n=r.indexOf(e.value);n===-1?(t.push(e.value),t.sort()):t.splice(n,1),this.setState({value:t},()=>this.onChange(this.props.attr,t))}}):null,e.icon?_.createElement(Pt,{src:e.icon,style:Mw.icon}):null,_.createElement(tt,{primary:e.label,secondary:e.description,slotProps:{secondary:{style:{fontSize:`smaller`,fontStyle:`italic`,opacity:.7}}},style:{color:e.color}})))),this.props.schema.help?_.createElement(en,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var Pw={menuPaper:{maxHeight:800}},Fw=class extends X{constructor(...e){super(...e),q(this,`initialized`,!1),q(this,`localContext`,void 0)}async askInstance(){if(this.props.alive){let e=this.props.schema.data;if(e===void 0&&this.props.schema.jsonData){let t=await this.getPatternAsync(this.props.schema.jsonData,null,!0);try{e=JSON.parse(t)}catch{console.error(`Cannot parse json data: ${t}`)}}e??=null,this.setState({running:!0},async()=>{let t=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(t!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){let e=await this.props.oContext.socket.getState(`system.adapter.${t}.alive`);if(!(e!=null&&e.val)){window.alert(K.t(`jc_Instance %s is not alive`,t));return}}try{let n=await this.props.oContext.socket.sendTo(t,this.props.schema.command||`send`,e);this.reportFilterLabels(n);for(let e of n)e.hiddenValue=await this.isHidden(e);this.setState({list:n,running:!1})}catch(e){console.error(`Cannot send command: ${e}`)}})}else{let e=X.getValue(this.props.data,this.props.attr);this.setState({value:e,running:!1})}}reportFilterLabels(e){if(this.props.onFilterLabelUpdate&&this.props.table&&Array.isArray(e)&&this.props.attr){let t={};for(let n of e)n.value!==X.DIFFERENT_VALUE&&(t[n.value]=n.label);this.props.onFilterLabelUpdate(this.props.attr,t)}}getContext(){let e={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(t=>e[t]=X.getValue(this.props.data,t)),JSON.stringify(e)}_getValue(){let e=this.state.value==null?X.getValue(this.props.data,this.props.attr):this.state.value;return this.props.schema.multiple&&(typeof e==`string`?e=[e]:e??=[]),e}async isHidden(e){return e.hidden?this.props.custom?!!await this.executeCustom(e.hidden,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData):!!await this.execute(e.hidden,this.props.schema.default,this.props.data,this.props.arrayIndex,this.props.globalData):!1}renderItem(e,t){var n;if(this.props.alive){let e=this.getContext();(e!==this.localContext||!this.initialized)&&(this.localContext=e,setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}let r=this._getValue();if(!this.props.alive||!this.state.running&&!Array.isArray(this.state.list))return this.props.schema.multiple||this.props.schema.manual===!1?K.t(`jc_Cannot retrieve options, as instance is offline`):_.createElement(ft,{variant:`standard`,fullWidth:!0,value:r,error:!!e,disabled:!!t,onChange:e=>{let t=e.target.value;this.setState({value:t},()=>this.onChange(this.props.attr,(t||``).trim()))},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation),slotProps:{input:{endAdornment:this.state.value&&!this.props.schema.noClearButton?_.createElement(sr,{position:`end`},_.createElement(ur,{tabIndex:-1,size:`small`,onClick:()=>this.setState({value:``},()=>this.onChange(this.props.attr,``))},_.createElement(je,null))):null}}});if(this.state.running)return _.createElement(wn,{size:`24`});let i=(n=this.state.list)==null?void 0:n.filter(e=>!e.hiddenValue),a=i==null?void 0:i.find(e=>e.value===r);return _.createElement(Mn,{variant:`standard`,fullWidth:!0},this.props.schema.label?_.createElement(Ze,null,this.getText(this.props.schema.label)):null,_.createElement(Be,{variant:`standard`,error:!!e,multiple:this.props.schema.multiple,disabled:!!t,sx:this.props.schema.multiple?{"&.MuiSelect-paper":Pw.menuPaper}:void 0,value:r||``,renderValue:e=>this.props.schema.multiple?_.createElement(ht,{sx:{display:`flex`,flexWrap:`wrap`,gap:.5}},e.map(e=>{let t=i==null?void 0:i.find(t=>t.value===e);if(t||this.props.schema.showAllValues!==!1){let n=(t==null?void 0:t.label)||e;return _.createElement(qn,{key:e,label:n})}return null})):this.getText((a==null?void 0:a.label)||e,this.props.schema.noTranslation),onChange:e=>{let t=this.onChange(this.props.attr,e.target.value);t instanceof Promise&&t.catch(e=>console.error(`Cannot set value: ${e}`))}},i==null?void 0:i.map((e,t)=>e.group?_.createElement(B,{key:t},_.createElement(`div`,null,this.getText(e.label,this.props.schema.noTranslation)),e.description?_.createElement(`div`,{style:{opacity:.7,fontStyle:`italic`,fontSize:`smaller`}},this.getText(e.description)):null):_.createElement(Ie,{key:t,value:e.value},this.props.schema.multiple?_.createElement(Ht,{checked:r==null?void 0:r.includes(e.value.toString()),onClick:()=>{let t=JSON.parse(JSON.stringify(this._getValue())),n=r==null?void 0:r.indexOf(e.value.toString());n===-1?(t.push(e.value),t.sort()):t.splice(n,1),this.setState({value:t},()=>this.onChange(this.props.attr,t))}}):null,_.createElement(tt,{primary:this.getText(e.label),secondary:this.getText(e.description),slotProps:{secondary:{style:{fontSize:`smaller`,fontStyle:`italic`,opacity:.7}}}})))),this.props.schema.help?_.createElement(en,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var Iw={fullWidth:{width:`100%`}};function Lw(e){return e.split(`.`).reduce((e,t)=>(e<<8)+parseInt(t,10),0)>>>0}function Rw(e,t){var n;let r=e==null||(n=e.native)==null||(n=n.hardware)==null?void 0:n.networkInterfaces;if(!r)return null;let i;return Object.keys(r).forEach(e=>r[e].forEach(e=>{e.internal||t.includes(`:`)&&e.family!==`IPv6`||t.includes(`.`)&&!t.match(/[^.\d]/)&&e.family!==`IPv4`||(e.family===`IPv4`&&!e.address.startsWith(`172`)&&(t===`127.0.0.0`||t===`localhost`||t.match(/[^.\d]/))?i=e.address:i||=(e.family===`IPv4`&&t.includes(`.`)&&(Lw(t)&Lw(e.netmask),Lw(e.address)&Lw(e.netmask)),e.address))})),i||Object.keys(r).forEach(e=>r[e].forEach(e=>{e.internal||t.includes(`:`)&&e.family!==`IPv6`||t.includes(`.`)&&!t.match(/[^.\d]/)&&e.family!==`IPv4`||(e.family===`IPv6`&&(t===`127.0.0.0`||t===`localhost`||t.match(/[^.\d]/))?i=e.address:i||=(e.family===`IPv4`&&t.includes(`.`)&&(Lw(t)&Lw(e.netmask),Lw(e.address)&Lw(e.netmask)),e.address))})),i||Object.keys(r).forEach(e=>{r[e].forEach(e=>{e.internal||t.includes(`:`)&&e.family!==`IPv6`||t.includes(`.`)&&!t.match(/[^.\d]/)&&e.family!==`IPv4`||(i=(t===`127.0.0.0`||t===`localhost`||t.match(/[^.\d]/),e.address))})}),i||Object.keys(r).forEach(e=>{r[e].forEach(e=>{e.internal||(i=e.address)})}),i||null}var zw=class extends X{async componentDidMount(){await super.componentDidMount();let e=window.location.hostname;if(this.props.schema.openUrl){let n=await this.props.oContext.socket.getCurrentInstance(),r=await this.getCachedObject(`system.adapter.${n}`);if(r){var t;let n=await this.getCachedObject(`system.host.${r==null||(t=r.common)==null?void 0:t.host}`);if(n){let t=Rw(n,window.location.hostname);if(t)e=`${t}:${window.location.port}`;else{console.warn(`Cannot find suitable IP in host ${r.common.host} for ${r._id}`);return}}}}await new Promise(t=>{this.setState({_error:``,_message:``,hostname:e},t)}),this.props.schema.onLoaded&&this._onClick().catch(e=>console.error(e))}renderErrorDialog(){return this.state._error?_.createElement(rn,{text:this.state._error,onClose:()=>this.setState({_error:``})}):null}renderMessageDialog(){return this.state._message?_.createElement(Et,{text:this.state._message,onClose:()=>this.setState({_message:``})}):null}renderCopyDialog(){return this.state._copyDialog?_.createElement(qS,{title:this.getText(this.state._copyDialog.title||K.t(`jc_Result`)),overflowHidden:!0,onClose:()=>{this.setState({_copyDialog:null})},onApply:()=>{Yt(this.state._copyDialog.text),window.alert(K.t(`jc_Copied`)),this.setState({_copyDialog:null})},titleButtonApply:K.t(`jc_Copy content`)},_.createElement(`div`,{style:{width:`calc(100vw - 40px)`,height:`calc(100vh - 188px)`}},_.createElement(mw,{mode:this.state._copyDialog.type,value:this.state._copyDialog.text,name:`CopyDialog`,themeType:this.props.oContext.themeType}))):null}async _onClick(){this.props.oContext.onCommandRunning(!0),this.setState({running:!0});let e=`${window.location.protocol}//${window.location.host}${window.location.pathname.replace(/\/index\.html$/,``)}`,t=`${window.location.protocol}//${this.state.hostname.split(`:`).length>3?`[${this.state.hostname}]`:this.state.hostname}${window.location.pathname.replace(/\/index\.html$/,``)}`,n=this.props.schema.data;if(n===void 0&&this.props.schema.jsonData){let r=await this.getPatternAsync(this.props.schema.jsonData,{_origin:e,_originIp:t,...this.props.data},!0);try{n=JSON.parse(r)}catch{console.error(`Cannot parse json data: ${r}`)}}n??=null,this.props.schema.openUrl&&!n&&(n={_origin:e,_originIp:t});let r;this.props.schema.timeout&&(r=setTimeout(()=>{this.props.oContext.onCommandRunning(!1),this.setState({_error:K.t(`jc_Request timed out`),running:!1})},parseInt(this.props.schema.timeout,10)||1e4));let i=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(i!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){let e=await this.props.oContext.socket.getState(`system.adapter.${i}.alive`);if(!(e!=null&&e.val)){window.alert(K.t(`jc_Instance %s is not alive`,i));return}}this.props.oContext.socket.sendTo(i,this.props.schema.command||`send`,n).then(async e=>{if(r&&=(clearTimeout(r),void 0),e!=null&&e.error){var t;if((t=this.props.schema.error)!=null&&t[e.error]){var n;let t=this.getText(this.props.schema.error[e.error]);(n=e.args)==null||n.forEach(e=>t=t.replace(`%s`,e)),this.setState({_error:t})}else this.setState({_error:e.error?typeof e.error==`string`?K.t(e.error):JSON.stringify(e.error):K.t(`jc_Error`)})}else{var i;if(e!=null&&e.command){var a,o;(a=(o=this.props.oContext).onBackEndCommand)==null||a.call(o,e.command);return}if(e!=null&&e.reloadBrowser&&this.props.schema.reloadBrowser)window.location.reload();else if(e!=null&&e.openUrl&&this.props.schema.openUrl)window.open(e.openUrl,e.window||this.props.schema.window||`_blank`);else if(e!=null&&e.result&&(i=this.props.schema.result)!=null&&i[e.result]){var s;let t=this.getText(this.props.schema.result[e.result]);(s=e.args)==null||s.forEach(e=>t=t.replace(`%s`,e)),window.alert(t)}if(e!=null&&e.native&&this.props.schema.useNative){for(let[t,n]of Object.entries(e.native))await this.onChangeAsync(t,n);setTimeout(()=>this.props.oContext.forceUpdate(Object.keys(e.native),this.props.data),300)}else e!=null&&e.result?window.alert(typeof e.result==`object`?JSON.stringify(e.result):e.result):e!=null&&e.copyDialog?this.setState({_copyDialog:e.copyDialog}):window.alert(K.t(`jc_Ok`));e!=null&&e.saveConfig&&this.props.onChange(void 0,null,void 0,!0)}}).catch(e=>{this.props.schema.error&&this.props.schema.error[e.toString()]?this.setState({_error:this.getText(this.props.schema.error[e.toString()])}):this.setState({_error:K.t(e.toString())||K.t(`jc_Error`)})}).then(()=>{this.props.oContext.onCommandRunning(!1),this.setState({running:!1})})}renderDialogConfirm(){if(!this.state.confirmDialog)return null;let e=this.state.confirmData||this.props.schema.confirm;if(!e)throw Error(`Confirm dialog requested but no confirm data provided`);let t=null;return e.type===`warning`?t=_.createElement(ae,null):e.type===`error`?t=_.createElement(N,null):e.type===`info`&&(t=_.createElement(Wt,null)),_.createElement(Cn,{title:this.getText(e.title)||K.t(`jc_Please confirm`),text:this.getText(e.text),ok:this.getText(e.ok)||K.t(`jc_Ok`),cancel:this.getText(e.cancel)||K.t(`jc_Cancel`),icon:t||void 0,onClose:e=>this.setState({confirmDialog:!1},()=>e&&this._onClick())})}renderItem(e,t){let n=this.getIcon();return _.createElement(`div`,{style:Iw.fullWidth},_.createElement(Ge,{variant:this.props.schema.variant||void 0,color:this.props.schema.color||`grey`,style:{...Iw.fullWidth,...this.props.schema.controlStyle||void 0},disabled:t||!this.props.alive,startIcon:n,title:this.props.alive?this.getText(this.props.schema.title)||``:K.t(`jc_Instance %s is not alive`,this.props.oContext.instance.toString()),onClick:()=>{this.props.schema.confirm?this.setState({confirmDialog:!0}):this._onClick().catch(e=>console.error(e))}},this.props.schema.showProcess&&this.state.running?_.createElement(wn,{size:20,style:{marginRight:8}}):null,this.getText(this.props.schema.label,this.props.schema.noTranslation)),this.renderErrorDialog(),this.renderMessageDialog(),this.renderCopyDialog())}};g();var Bw={fullWidth:{width:`100%`}},Vw=class extends X{async _onClick(){let e=this.props.schema.val;if(typeof e==`string`&&e.includes("${")){var t,n;e=await this.getPatternAsync(e,null,!0);let r=await this.getCachedObject(this.props.schema.id);(r==null||(t=r.common)==null?void 0:t.type)===`number`?e=parseFloat(e):(r==null||(n=r.common)==null?void 0:n.type)===`boolean`&&(e=e===`true`||e===!0||e===`1`||e===1)}let r=(this.props.schema.id||``).replace(/%INSTANCE%/g,(this.props.oContext.instance||0).toString());try{await this.props.oContext.socket.setState(r,{val:e,ack:!!this.props.schema.ack}),this.props.schema.okText&&window.alert(this.getText(this.props.schema.okText))}catch(e){this.props.schema.error&&this.props.schema.error[e.toString()]?window.alert(this.getText(this.props.schema.error[e.toString()])):window.alert(K.t(e.toString())||K.t(`jc_Error`))}}renderDialogConfirm(){if(!this.state.confirmDialog)return null;let e=this.state.confirmData||this.props.schema.confirm;if(!e)return null;let t;return e.type===`warning`?t=_.createElement(ae,null):e.type===`error`?t=_.createElement(N,null):e.type===`info`&&(t=_.createElement(Wt,null)),_.createElement(Cn,{title:this.getText(e.title)||K.t(`jc_Please confirm`),text:this.getText(e.text),ok:this.getText(e.ok)||K.t(`jc_Ok`),cancel:this.getText(e.cancel)||K.t(`jc_Cancel`),icon:t,onClose:e=>this.setState({confirmDialog:!1},()=>e&&this._onClick())})}renderItem(e,t){let n=this.getIcon();return _.createElement(Ge,{variant:this.props.schema.variant||void 0,color:this.props.schema.color||`grey`,style:Bw.fullWidth,disabled:t,onClick:async()=>{this.props.schema.confirm?this.setState({confirmDialog:!0}):await this._onClick()},startIcon:n||void 0},this.getText(this.props.schema.label,this.props.schema.noTranslation))}};g();var Hw={fullWidth:{width:`100%`},slider:{marginLeft:10,marginRight:10,width:`calc(100% - 20px)`}},Uw=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);this.setState({_value:e})}static getDerivedStateFromProps(e,t){if(e.schema.min!==void 0&&e.schema.min<0||e.schema.max!==void 0&&e.schema.max<0)return null;let n=X.getValue(e.data,e.attr);return n==null||n.toString()!==parseFloat(t._value).toString()?{_value:n}:null}renderItem(e,t){let n=this.props.schema.min||0,r=this.props.schema.max||100,i=this.props.schema.unit?this.getText(this.props.schema.unit,this.props.schema.noTranslation):``,a=[{value:n,label:n+i},{value:r,label:r+i}];return _.createElement(ht,{style:Hw.fullWidth},this.props.schema.label?_.createElement(be,{gutterBottom:!0},this.getText(this.props.schema.label)):null,_.createElement(le,{style:Hw.slider,value:this.state._value,getAriaValueText:e=>e+i,step:this.props.schema.step||(r-n)/100,valueLabelDisplay:`auto`,marks:a,min:n,max:r,disabled:!!t,onChange:e=>{let t=e.target.value;this.setState({_value:t},()=>this.onChange(this.props.attr,t))}}),this.props.schema.help?_.createElement(be,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();function Ww(e,t){return e===`edit`||e===`rename`?_.createElement(fr,{style:t}):e===`delete`?_.createElement(we,{style:t}):e===`refresh`?_.createElement($e,{style:t}):e===`newDevice`||e===`new`||e===`add`?_.createElement(Re,{style:t}):e===`discover`||e===`search`?_.createElement(nt,{style:t}):e===`unpairDevice`||e===`unpair`?_.createElement(kt,{style:t}):e===`pairDevice`||e===`pair`?_.createElement(sn,{style:t}):e===`identify`?_.createElement(Pn,{style:t}):e===`play`?_.createElement(Tt,{style:t}):e===`stop`?_.createElement(dn,{style:t}):e===`pause`?_.createElement(nn,{style:t}):e===`forward`||e===`next`?_.createElement(fe,{style:t}):e===`rewind`||e===`previous`?_.createElement(rt,{style:t}):e===`lamp`||e===`light`?_.createElement(Vn,{style:t}):e===`backlight`?_.createElement(gt,{style:t}):e===`dimmer`?_.createElement(z,{style:t}):e===`socket`?_.createElement(tr,{style:t}):e===`settings`?_.createElement(ie,{style:t}):e===`users`||e===`group`?_.createElement(yt,{style:t}):e===`user`?_.createElement(Qt,{style:t}):e===`qrcode`?_.createElement(cr,{style:t}):e===`connection`?_.createElement(Fe,{style:t}):e===`no-connection`?_.createElement(fn,{style:t}):e===`visible`?_.createElement(nr,{style:t}):null}g();function Gw(e,t){return typeof t==`string`?{"@keyframes newStateAnimationOnceColor":{"0%":{color:t},"100%":{color:e.palette.mode===`dark`?`#fff`:`#000`}},animation:`newStateAnimationOnceColor 2s ease-in-out`}:{"@keyframes newStateAnimationOnce":{"0%":{color:`#00f900`},"80%":{color:e.palette.mode===`dark`?`#518851`:`#008000`},"100%":{color:e.palette.mode===`dark`?`#fff`:`#000`}},animation:`newStateAnimationOnce 2s ease-in-out`}}var Kw=class extends X{constructor(...e){super(...e),q(this,`controlTimeout`,null),q(this,`delayedUpdate`,{timer:null,value:null}),q(this,`onStateChanged`,(e,t)=>{let n=t?t.val:null;this.state.controlType===`button`||this.state.controlType===`switch`?(n=!!n,this.state.stateValue!==n&&this.setState({stateValue:n})):n!==null&&(this.state.controlType===`slider`||this.state.controlType===`number`)?(n=parseFloat(n),console.log(`${Date.now()} Received new value: ${n}`),n===this.state.stateValue?this.delayedUpdate.timer&&(clearTimeout(this.delayedUpdate.timer),this.delayedUpdate.timer=null):(this.delayedUpdate.timer&&(clearTimeout(this.delayedUpdate.timer),this.delayedUpdate.timer=null),this.delayedUpdate.value=n,this.delayedUpdate.timer=setTimeout(()=>{this.setState({stateValue:this.delayedUpdate.value})},500))):(this.state.stateValue===null||this.state.stateValue===void 0?null:this.state.stateValue.toString())!==(n==null?null:n.toString())&&this.setState({stateValue:n})})}async getObjectID(){let e=(this.props.schema.oid||``).toString();return e.includes("${")&&(e=await this.getPatternAsync(e,null,!0)),this.props.schema.foreign?e:`${this.props.schema.system?`system.adapter.`:``}${this.props.oContext.adapterName}.${this.props.oContext.instance||0}.${e}`}async componentDidMount(){var e;await super.componentDidMount();let t=await this.getObjectID(),n=await this.getCachedObject(t);if(n!=null&&(e=n.common)!=null&&e.states&&!this.props.schema.options){var r;if(Array.isArray(n==null||(r=n.common)==null?void 0:r.states)){let e={};n.common.states.forEach((t,n)=>{e[n.toString()]=t}),n.common.states=e}Object.keys(n.common.states).length||(n.common.states=void 0)}let i=this.props.schema.control||this.detectType(n);try{let e=await this.props.oContext.socket.getState(t);this.setState({stateValue:e?e.val:null,controlType:i,obj:n,objId:t},async()=>{let e=await this.getObjectID();await this.props.oContext.socket.subscribeState(e,this.onStateChanged)})}catch(e){console.error(`Cannot get state ${t}: ${e}`),this.setState({controlType:i,obj:n,objId:t})}}componentWillUnmount(){super.componentWillUnmount(),this.state.objId&&this.props.oContext.socket.unsubscribeState(this.state.objId,this.onStateChanged),this.delayedUpdate.timer&&(clearTimeout(this.delayedUpdate.timer),this.delayedUpdate.timer=null),this.controlTimeout&&(clearTimeout(this.controlTimeout),this.controlTimeout=null,this.state.objId&&this.props.oContext.socket.setState(this.state.objId,this.state.stateValue??null,!1).catch(e=>console.error(`Cannot control value: ${e.toString()}`)))}detectType(e){if(e||={},e.common||={},e.common.type===`boolean`){if(this.props.schema.controlled!==!1){if(e.common.read===!1||this.props.schema.controlled===!0)return`button`;if(e.common.write||this.props.schema.controlled===!0)return`switch`}return`text`}return e.common.type===`number`&&this.props.schema.controlled!==!1?e.common.write||this.props.schema.controlled===!0?e.common.states||this.props.schema.options?`select`:e.common.max===void 0?`input`:`slider`:`text`:e.common.write&&this.props.schema.controlled!==!1?e.common.states||this.props.schema.options?`select`:`input`:`text`}getNormalizedStates(){var e;let t;return this.props.schema.options?t=this.props.schema.options.map(e=>typeof e==`string`?{value:e,label:this.getText(e,this.props.schema.noTranslation)}:{value:e.value,label:this.getText(e.label,this.props.schema.noTranslation),color:e.color}):(e=this.state.obj)!=null&&e.common.states?(t=[],Object.keys(this.state.obj.common.states).forEach(e=>{t.push({value:e,label:this.getText(this.state.obj.common.states[e],this.props.schema.noTranslation)})})):t=[],t}renderItem(e,t){var n;if(!this.state.obj)return null;let r;if(this.state.controlType===`select`||!this.state.controlType&&(this.state.obj.common.type===`number`||this.state.obj.common.type===`string`)&&this.state.obj.common.write!==!1&&(this.props.schema.options||this.state.obj.common.states)){let e=this.getNormalizedStates(),n=e.find(e=>e.value===this.state.stateValue);r=_.createElement(Mn,{fullWidth:!0},_.createElement(Ze,null,this.getText(this.props.schema.label)),_.createElement(Be,{value:this.state.stateValue??``,disabled:!!this.props.schema.readOnly||t,onChange:e=>{this.setState({stateValue:e.target.value},()=>{var e;let t=this.state.stateValue;((e=this.state.obj)==null?void 0:e.common.type)===`number`&&(t=parseFloat(t.toString().replace(`,`,`.`))),this.state.objId&&this.props.oContext.socket.setState(this.state.objId,t,!1)})},renderValue:e=>n!=null&&n.color?_.createElement(`div`,{style:{color:n.color}},n.label):e},e.map(e=>_.createElement(Ie,{key:(e.value??``).toString(),value:e.value,style:{color:e.color}},`$`,e.label))))}else if(this.state.controlType===`button`||!this.state.controlType&&this.state.obj.common.type===`boolean`&&(this.state.obj.common.write&&this.state.obj.common.read===!1||(n=this.state.obj.common.role)!=null&&n.includes(`button`))){let e=null;this.props.schema.falseImage&&(e=Ww(this.props.schema.falseImage));let n=this.getText(this.props.schema.falseText||this.props.schema.label,this.props.schema.noTranslation);r=!n&&e?_.createElement(ur,{style:this.props.schema.falseTextStyle,disabled:!!this.props.schema.readOnly,onClick:async()=>{this.props.schema.confirm?this.setState({confirmDialog:!0,confirmCallback:async e=>{e&&this.state.objId&&await this.props.oContext.socket.setState(this.state.objId,this.props.schema.buttonValue===void 0||this.props.schema.buttonValue,!1)}}):this.state.objId&&await this.props.oContext.socket.setState(this.state.objId,this.props.schema.buttonValue===void 0||this.props.schema.buttonValue,!1)}},e):_.createElement(Ge,{variant:this.props.schema.variant||`contained`,startIcon:e,style:this.props.schema.falseTextStyle,disabled:t||!!this.props.schema.readOnly,onClick:async()=>{this.props.schema.confirm?this.setState({confirmDialog:!0,confirmCallback:async e=>{e&&this.state.objId&&await this.props.oContext.socket.setState(this.state.objId,this.props.schema.buttonValue===void 0||this.props.schema.buttonValue,!1)}}):this.state.objId&&await this.props.oContext.socket.setState(this.state.objId,this.props.schema.buttonValue===void 0||this.props.schema.buttonValue,!1)}},n||(this.state.objId||``).split(`.`).pop())}else if(this.state.controlType===`input`||!this.state.controlType&&this.state.obj.common.write&&this.state.obj.common.type===`string`)r=_.createElement(`div`,{style:{width:`100%`,display:`flex`,flexDirection:`row`,gap:8,alignItems:`baseline`}},_.createElement(ft,{style:{flex:1},value:this.state.stateValue,variant:`standard`,disabled:!!this.props.schema.readOnly||t,slotProps:{input:{endAdornment:this.getText(this.props.schema.unit,this.props.schema.noTranslation)||this.state.obj.common.unit||void 0},htmlInput:{readOnly:!!this.props.schema.readOnly}},onKeyUp:e=>{this.props.schema.setOnEnterKey&&e.key===`Enter`&&this.state.objId&&this.props.oContext.socket.setState(this.state.objId,this.state.stateValue??null,!1)},onChange:e=>{this.setState({stateValue:e.target.value},()=>{this.props.schema.setOnEnterKey||this.props.schema.showEnterButton||(this.controlTimeout&&clearTimeout(this.controlTimeout),this.controlTimeout=setTimeout(async()=>{var e;this.controlTimeout=null;let t=this.state.stateValue;((e=this.state.obj)==null?void 0:e.common.type)===`number`&&(t=parseFloat(t.toString().replace(`,`,`.`))),this.state.objId&&await this.props.oContext.socket.setState(this.state.objId,t,!1)},this.props.schema.controlDelay||0))})},label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)}),this.props.schema.showEnterButton&&!this.props.schema.readOnly&&_.createElement(Ge,{variant:`outlined`,disabled:t,onClick:()=>{this.state.objId&&this.props.oContext.socket.setState(this.state.objId,this.state.stateValue??null,!1)}},this.getText(typeof this.props.schema.showEnterButton==`string`?this.props.schema.showEnterButton:`Set`)));else{var i,a,o,s;let e;this.props.schema.size===`normal`?e=16:this.props.schema.size===`large`?e=20:typeof this.props.schema.size==`number`&&(e=this.props.schema.size);let n=this.getText(this.props.schema.label,this.props.schema.noTranslation),c={display:`flex`,alignItems:`center`,fontSize:e||`1rem`,gap:8};this.props.schema.narrow||(c.width=`100%`,c.justifyContent=`space-between`),n.trim()&&!n.trim().endsWith(`:`)&&this.props.schema.addColon&&(n=`${n.trim()}:`);let l;this.props.schema.blinkOnUpdate&&(l=Gw(this.props.oContext.theme,this.props.schema.blinkOnUpdate));let u;this.props.schema.labelIcon&&(u=_.createElement(Pt,{src:this.props.schema.labelIcon,style:{marginRight:4}}));let d;if(n&&u?d=_.createElement(`div`,{style:{whiteSpace:`nowrap`}},u,n):n?d=_.createElement(`div`,{style:{whiteSpace:`nowrap`}},n):u&&(d=u),this.state.controlType===`switch`||!this.state.controlType&&this.state.obj.common.type===`boolean`&&(this.state.obj.common.write&&this.state.obj.common.read!==!1||(i=this.state.obj.common.role)!=null&&i.includes(`switch`))){let e=null,n=this.getText(this.props.schema.falseText,this.props.schema.noTranslation);this.props.schema.falseImage&&(e=Ww(this.props.schema.falseImage,n?{marginLeft:8}:void 0));let i=null,a=this.getText(this.props.schema.trueText,this.props.schema.noTranslation);this.props.schema.trueImage&&(i=Ww(this.props.schema.trueImage,a?{marginRight:8}:void 0)),r=_.createElement(He,{checked:!!this.state.stateValue,disabled:!!this.props.schema.readOnly||t,onChange:async()=>{this.props.schema.confirm?this.setState({confirmDialog:!0,confirmCallback:async e=>{e&&this.state.objId&&await this.props.oContext.socket.setState(this.state.objId,!this.state.stateValue,!1)}}):this.state.objId&&await this.props.oContext.socket.setState(this.state.objId,!this.state.stateValue,!1)}}),(n||e||a||i)&&(r=_.createElement(`div`,{style:{display:`flex`,alignItems:`center`,fontSize:14}},_.createElement(`span`,{style:this.props.schema.falseTextStyle},n,e),r,_.createElement(`span`,{style:this.props.schema.trueTextStyle},i,a))),d&&(r=_.createElement(`div`,{style:c},d,r))}else if(this.state.controlType===`slider`||!this.state.controlType&&this.state.obj.common.type===`number`&&(this.state.obj.common.write&&(this.state.obj.common.max!==void 0||this.state.obj.common.unit===`%`)||(a=this.state.obj.common.role)!=null&&a.includes(`slider`)||(o=this.state.obj.common.role)!=null&&o.includes(`dimmer`)||(s=this.state.obj.common.role)!=null&&s.includes(`blind`))){let e=null,n=this.getText(this.props.schema.falseText,this.props.schema.noTranslation);this.props.schema.falseImage&&(e=Ww(this.props.schema.falseImage,n?{marginLeft:8}:void 0));let i=null,a=this.getText(this.props.schema.trueText,this.props.schema.noTranslation);this.props.schema.trueImage&&(i=Ww(this.props.schema.trueImage,a?{marginRight:8}:void 0));let o=this.props.schema.min??(this.state.obj.common.min||0),s=this.props.schema.max??this.state.obj.common.max??100,l=this.props.schema.step??(this.state.obj.common.step||1);r=_.createElement(le,{style:{width:`100%`,flexGrow:1},min:o,max:s,disabled:!!this.props.schema.readOnly||t,step:l,value:this.state.stateValue,valueLabelDisplay:`auto`,valueLabelFormat:e=>{var t;let n=this.props.schema.digits===void 0?e.toString():e.toFixed(this.props.schema.digits);return this.props.oContext.isFloatComma&&(n=n.replace(`.`,`,`)),`${n}${this.getText(this.props.schema.unit,this.props.schema.noTranslation)||((t=this.state.obj)==null?void 0:t.common.unit)||``}`},onChange:(e,t)=>{Array.isArray(t)&&(t=t[0]),this.setState({stateValue:t},()=>{this.controlTimeout&&clearTimeout(this.controlTimeout),this.controlTimeout=setTimeout(async()=>{console.log(`${Date.now()} Send new value: ${this.state.stateValue}`),this.controlTimeout=null,this.state.objId&&await this.props.oContext.socket.setState(this.state.objId,this.state.stateValue??null,!1)},this.props.schema.controlDelay||0)})}}),(n||e||a||i)&&(r=_.createElement(`div`,{style:{display:`flex`,width:`100%`,flexGrow:1,alignItems:`center`}},_.createElement(`span`,{style:{marginRight:16,...this.props.schema.falseTextStyle}},n,e),r,_.createElement(`span`,{style:{marginLeft:16,...this.props.schema.trueTextStyle}},i,a))),d&&(r=_.createElement(`div`,{style:c},d,r))}else if(this.state.obj.common.type===`number`&&this.state.obj.common.write&&!this.state.controlType){let e=this.props.schema.min??this.state.obj.common.min??void 0,n=this.props.schema.max??this.state.obj.common.max??void 0,i=this.props.schema.step??this.state.obj.common.step??void 0;r=_.createElement(ft,{variant:`standard`,style:{width:`100%`},value:this.state.stateValue,type:`number`,disabled:!!this.props.schema.readOnly||t,slotProps:{htmlInput:{min:e,max:n,step:i,readOnly:!!this.props.schema.readOnly},input:{endAdornment:this.getText(this.props.schema.unit,this.props.schema.noTranslation)||this.state.obj.common.unit||void 0}},onChange:e=>{this.setState({stateValue:e.target.value},()=>{this.controlTimeout&&clearTimeout(this.controlTimeout),this.controlTimeout=setTimeout(async()=>{if(this.controlTimeout=null,this.state.objId){let e=parseFloat(this.state.stateValue);await this.props.oContext.socket.setState(this.state.objId,e,!1)}},this.props.schema.controlDelay||0)})},label:this.getText(this.props.schema.label,this.props.schema.noTranslation),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}else if(this.state.obj.common.type===`boolean`){let e=null,t,n;this.state.stateValue?(t=this.getText(this.props.schema.trueText,this.props.schema.noTranslation),this.props.schema.trueImage&&(e=Ww(this.props.schema.falseImage,t?{marginRight:8}:void 0)),n=this.props.schema.trueTextStyle):(t=this.getText(this.props.schema.falseText,this.props.schema.noTranslation),this.props.schema.falseImage&&(e=Ww(this.props.schema.falseImage,t?{marginLeft:8}:void 0)),n=this.props.schema.falseTextStyle),n=Object.assign(c,n),r=_.createElement(`div`,{style:n},d,_.createElement(ht,{style:{display:`flex`,alignItems:`center`,gap:8},sx:l,key:this.props.schema.blinkOnUpdate?t:void 0},e,t||(this.state.stateValue?K.t(`jc_true`):K.t(`jc_false`))))}else{let e=this.getText(this.props.schema.unit,this.props.schema.noTranslation)||this.state.obj.common.unit,t=this.state.stateValue;if(t!=null&&(this.props.schema.options||this.state.obj.common.states)){let e=this.getNormalizedStates().find(e=>e.value.toString()===t.toString());e&&(t=e.label)}let n,i;this.state.controlType===`html`?(i=(t??``).toString(),n=_.createElement(`span`,{dangerouslySetInnerHTML:{__html:t}})):this.state.stateValue===null?(n=`null`,i=n):this.state.stateValue===void 0?(n=`undefined`,i=n):(this.props.schema.digits!==void 0&&typeof t==`number`?(n=t.toFixed(this.props.schema.digits),this.props.oContext.isFloatComma&&(n=n.replace(`.`,`,`))):n=(t??``).toString(),i=n),r=_.createElement(`div`,{style:c},d,_.createElement(`div`,{style:{display:`flex`,alignItems:`baseline`,gap:4}},_.createElement(ht,{sx:l,key:this.props.schema.blinkOnUpdate?i:void 0},n),e?_.createElement(`span`,{style:{opacity:.7,fontSize:`smaller`}},e):null))}}return r}};g();var qw={fullWidth:e=>({width:`100%`,backgroundColor:e.palette.mode===`dark`?`#FFF`:`#000`,borderStyle:`hidden`}),primary:e=>({backgroundColor:e.palette.primary.main}),secondary:e=>({backgroundColor:e.palette.secondary.main})},Jw=class extends X{renderItem(){return _.createElement(ht,{component:`hr`,sx:$t.getStyle(this.props.oContext.theme,qw.fullWidth,this.props.schema.color===`primary`?qw.primary:this.props.schema.color===`secondary`?qw.secondary:{backgroundColor:this.props.schema.color||(this.props.oContext.themeType===`dark`?`#333`:`#ddd`)},{height:this.props.schema.color?this.props.schema.height||2:this.props.schema.height||1})})}};g();var Yw={header:e=>({width:`100%`,background:e.palette.primary.main,color:e.palette.primary.contrastText,padding:`4px !important`,borderRadius:`3px`,marginBlockEnd:0,marginBlockStart:0})},Xw=class extends X{renderItem(){let e=`h5`;switch((this.props.schema.size||5).toString()){case`1`:e=`h1`;break;case`2`:e=`h2`;break;case`3`:e=`h3`;break;case`4`:e=`h4`;break;default:e=`h5`}return _.createElement(ht,{component:e,sx:Yw.header},this.getText(this.props.schema.label||this.props.schema.text,this.props.schema.noTranslation))}};g();var Zw=class extends X{getSrc(){let e=this.props.schema.src;return e&&!e.startsWith(`.`)&&!e.startsWith(`http`)&&!e.startsWith(`adapter/${this.props.oContext.adapterName}/`)&&!e.startsWith(`./adapter/${this.props.oContext.adapterName}/`)&&(e=`${this.props.oContext.imagePrefix}/adapter/${this.props.oContext.adapterName}/${e}`),e}renderItem(){let{schema:e}=this.props,t=this.getSrc();if(e.showInDialog){let n=e.showInDialogSmallSize||100,r=e.showInDialogButtonLabel?this.getText(e.showInDialogButtonLabel):``;return _.createElement(_.Fragment,null,_.createElement(Ln,{title:K.t(`jc_Click to see in full size`)},_.createElement(`img`,{src:t,style:{cursor:`pointer`,width:`auto`,height:n,objectFit:`contain`},alt:``,onClick:()=>this.setState({showDialog:!0})})),` `,r?_.createElement(Ge,{variant:`outlined`,color:`grey`,onClick:()=>this.setState({showDialog:!0})},r):null,this.state.showDialog?_.createElement(Dt,{open:!0,onClose:()=>this.setState({showDialog:!1}),maxWidth:`lg`},_.createElement(Un,null,_.createElement(Pt,{src:t,style:{width:`100%`,height:`100%`,objectFit:`contain`}})),_.createElement(On,null,_.createElement(Ge,{variant:`contained`,onClick:()=>this.setState({showDialog:!1}),color:`primary`},K.t(`jc_Close`)))):null)}return _.createElement(`img`,{src:t,style:{cursor:e.href?`pointer`:void 0,width:`100%`,height:`100%`},onClick:e.href?()=>e.href&&window.open(e.href,`_blank`):void 0,alt:``})}};g();function Qw(e,t,n){return typeof n==`string`?{"@keyframes newValueAnimationOnceColor":{"0%":{color:t?`${n} !important`:n},"100%":{color:e.palette.mode===`dark`?t?`#fff !important`:`#fff`:t?`#000 !important`:`#000`}},animation:`newValueAnimationOnceColor 2s ease-in-out`}:{"@keyframes newValueAnimationOnce":{"0%":{color:t?`#00f900 !important`:`#00f900`},"80%":{color:e.palette.mode===`dark`?t?`#518851 !important`:`#518851`:t?`#008000 !important`:`#008000`},"100%":{color:e.palette.mode===`dark`?t?`#fff !important`:`#fff`:t?`#000 !important`:`#000`}},animation:`newValueAnimationOnce 2s ease-in-out`}}function $w(e,t){return typeof t==`string`?{"@keyframes blinkAnimationColor":{"0%":{color:t},"100%":{color:e.palette.mode===`dark`?`#fff`:`#000`}},animation:`blinkAnimationColor 2s ease-in-out infinite`}:{"@keyframes blinkAnimation":{"0%":{color:`#00f900`},"80%":{color:e.palette.mode===`dark`?`#518851`:`#008000`},"100%":{color:e.palette.mode===`dark`?`#fff`:`#000`}},animation:`blinkAnimation 2s ease-in-out infinite`}}var eT={label:{fontWeight:`bold`,whiteSpace:`nowrap`},valueImage:{maxHeight:`100%`},valueAndUnit:{display:`flex`,gap:4,alignItems:`baseline`},value:{},unit:{fontSize:`smaller`,opacity:.7}},tT=class extends X{renderItem(e){let t=this.getText(this.props.schema.text||this.props.schema.label,this.props.schema.noTranslation);this.props.schema.addColon&&typeof t==`string`&&!t.trim().endsWith(`:`)&&(t=`${t.trim()}:`),t&&(t.includes(`<a `)||t.includes(`<br`)||t.includes(`<b>`)||t.includes(`<i>`))&&(t=$t.renderTextWithA(t));let n;this.props.schema.size===`normal`?n=16:this.props.schema.size===`large`?n=20:typeof this.props.schema.size==`number`&&(n=this.props.schema.size);let r={width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,position:`relative`,fontSize:n};this.props.schema.narrow?r.gap=8:r.justifyContent=`space-between`;let i,a;this.props.schema.data&&typeof this.props.schema.data==`object`&&this.props.schema.data.en?a=this.getText(this.props.schema.data):typeof this.props.schema.data==`object`||this.props.schema.data===void 0||this.props.schema.data===null?a=JSON.stringify(this.props.schema.data):typeof this.props.schema.data==`number`?(a=this.props.schema.data.toString(),this.props.oContext.isFloatComma&&(a=a.replace(`.`,`,`))):a=this.props.schema.data.toString();let o=!1;if(this.props.schema.booleanAsCheckbox&&typeof this.props.schema.data==`boolean`)i=_.createElement(Ht,{checked:this.props.schema.data,disabled:!0,size:this.props.schema.size===`small`?`small`:this.props.schema.size===`large`?`large`:void 0});else if(a.startsWith(`data:image/`))i=_.createElement(`div`,{style:{...eT.value,...eT.valueImage,...this.props.schema.styleValue||void 0}},_.createElement(Pt,{src:a}));else{let e={...eT.value,...this.props.schema.styleValue||void 0};this.props.schema.html?i=_.createElement(`div`,{style:e,dangerouslySetInnerHTML:{__html:a}}):Array.isArray(this.props.schema.data)?(o=!0,i=_.createElement(`div`,{style:e},this.props.schema.data.map((e,t)=>_.createElement(`div`,{key:t},typeof e==`object`||e==null?JSON.stringify(e):e)))):a.includes(`
|
|
1386
|
-
`)?(o=!0,i=_.createElement(`div`,{style:e},$t.renderTextWithA(a))):i=_.createElement(`div`,{style:e},a)}if(this.props.schema.blinkOnUpdate&&this.props.schema.blink){let e=Qw(this.props.oContext.theme,!0,this.props.schema.blinkOnUpdate),t=$w(this.props.oContext.theme,this.props.schema.blink);i=_.createElement(ht,{key:a,sx:{...e,...t}},i)}else if(this.props.schema.blinkOnUpdate){let e=Qw(this.props.oContext.theme,!1,this.props.schema.blinkOnUpdate);i=_.createElement(ht,{key:a,sx:e},i)}else if(this.props.schema.blink){let e=$w(this.props.oContext.theme,this.props.schema.blink);i=_.createElement(ht,{sx:e},i)}this.props.schema.unit&&(i=_.createElement(`div`,{style:eT.valueAndUnit},i,_.createElement(`div`,{style:{...eT.unit,...this.props.schema.styleUnit||void 0}},this.getText(this.props.schema.unit,this.props.schema.noTranslation))));let s;this.props.schema.labelIcon&&(s=_.createElement(Pt,{src:this.props.schema.labelIcon,style:{marginRight:4}}));let c;this.props.schema.copyToClipboard&&(c=_.createElement(he,{className:`staticCopyButton`,style:{position:`absolute`,top:`calc(50% - 12px)`,right:0,cursor:`pointer`},onClick:()=>{$t.copyToClipboard(a),window.alert(K.t(`jc_Copied`))}}));let l={"& .staticCopyButton":{display:`none`},"& .staticCopyButton:action":{transform:`scale(0.9)`},"&:hover .staticCopyButton":{display:`block`}};return this.props.schema.highlight&&(l[`&:hover`]={backgroundColor:this.props.oContext.themeType===`dark`?`#51515180`:`#b8b8b880`}),o&&(r.alignItems=`top`),_.createElement(ht,{component:`div`,style:r,sx:l},_.createElement(`div`,{style:{...eT.label,...this.props.schema.styleLabel||void 0}},s,t),i,c)}};g();var nT={fullWidth:{height:`100%`,width:`100%`},link:e=>({textDecoration:`underline`,color:e.palette.mode===`dark`?`#4dabf5`:`#254e72`,cursor:`pointer`})};function rT(e,t,n){let r,i=``;e?e.toString().startsWith(`#`)||e.toString().startsWith(`/`)?(r=t||`_self`,i=e):e.startsWith(`http://`)||e.startsWith(`https://`)?(r=t||`_blank`,i=e):(i=`#tab-instances/config/${n}/${e}`,r=t||`_self`):(i=`#tab-instances/config/${n}`,r=t||`_self`),r===`_self`?setTimeout(e=>{e.startsWith(`#`)?window.location.hash=e:e.startsWith(`/`)?i=`${window.location.protocol}//${window.location.host}${i}`:(e.startsWith(`http://`)||e.startsWith(`https://`))&&(window.location.href=e)},100,i):(i.startsWith(`#`)?i=`${window.location.protocol}//${window.location.host}${window.location.pathname}${i}`:i.startsWith(`/`)&&(i=`${window.location.protocol}//${window.location.host}${i}`),window.open(i,r))}var iT=class extends X{renderItem(e,t){if(this.props.schema.button){let e=this.getIcon();return _.createElement(Ge,{variant:this.props.schema.variant||void 0,color:this.props.schema.color||`grey`,style:{...nT.fullWidth,...this.props.schema.controlStyle||void 0},disabled:t,startIcon:e,onClick:this.props.schema.href?()=>{let e=this.props.schema.href?this.getText(this.props.schema.href,!0):null;e&&(this.props.oContext.onBackEndCommand?this.props.oContext.onBackEndCommand({command:`link`,url:e,target:this.props.schema.target,close:this.props.schema.close}):rT(e,this.props.schema.target,`${this.props.oContext.adapterName}.${this.props.oContext.instance}`))}:void 0},this.getText(this.props.schema.text||this.props.schema.label,this.props.schema.noTranslation))}let n=this.getText(this.props.schema.text||this.props.schema.label,this.props.schema.noTranslation);if(this.props.schema.format===`html`)n=_.createElement(`div`,{dangerouslySetInnerHTML:{__html:n}});else if(this.props.schema.format===`json`)try{let e=typeof n==`string`?JSON.parse(n):n;n=_.createElement(`pre`,{style:{whiteSpace:`pre-wrap`,wordBreak:`break-word`,margin:0}},JSON.stringify(e,null,2))}catch{}else n&&(n.includes(`<a `)||n.includes(`<br`)||n.includes(`<b>`)||n.includes(`<i>`))&&(n=$t.renderTextWithA(n));return _.createElement(ht,{component:`span`,style:{...this.props.schema.controlStyle||void 0},sx:this.props.schema.href?nT.link:void 0,onClick:this.props.schema.href?()=>{let e=this.props.schema.href?this.getText(this.props.schema.href,!0):null;e&&(this.props.oContext.onBackEndCommand?this.props.oContext.onBackEndCommand({command:`link`,url:e,target:this.props.schema.target||`_blank`,close:this.props.schema.close}):rT(e,this.props.schema.target||`_blank`,`${this.props.oContext.adapterName}.${this.props.oContext.instance}`))}:void 0},n)}};g();var aT=1048576,oT={fullWidth:{width:`100%`},root:{width:`100%`},paper:{width:`100%`,marginBottom:16,backgroundColor:`rgba(255, 255, 255, 0.1)`},headerText:{width:`100%`},table:{minWidth:750},visuallyHidden:{border:0,clip:`rect(0 0 0 0)`,height:1,margin:-1,overflow:`hidden`,padding:0,position:`absolute`,top:20,width:1},label:{display:`flex`,justifyContent:`space-between`},title:{flex:`1 1 100%`},rootTool:{paddingLeft:16,paddingRight:8},silver:{opacity:.2},flex:{display:`flex`,alignItems:`baseline`},filteredOut:{padding:10,display:`flex`,textAlign:`center`},buttonEmpty:{width:34,display:`inline-block`},buttonCell:{whiteSpace:`nowrap`},dropZone:{width:`100%`,height:100,position:`relative`},dropZoneEmpty:{},uploadDiv:{position:`relative`,width:`100%`,minHeight:300,opacity:.9,marginTop:30,cursor:`pointer`,outline:`none`},uploadDivDragging:{opacity:1,background:`rgba(128,255,128,0.1)`},image:{objectFit:`contain`,margin:`auto`,display:`flex`,width:`100%`,height:`100%`},uploadCenterDiv:{margin:5,border:`3px dashed grey`,borderRadius:5,width:`calc(100% - 10px)`,height:`calc(100% - 10px)`,minHeight:300,position:`relative`,display:`flex`},uploadCenterIcon:{paddingTop:10,width:48,height:48},uploadCenterText:{fontSize:16},uploadCenterTextAndIcon:{textAlign:`center`,position:`absolute`,top:0,bottom:0,left:0,right:0,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`},buttonRemoveWrapper:{position:`absolute`,zIndex:222,right:0},error:{border:`2px solid red`,boxSizing:`border-box`},tooltip:{pointerEvents:`none`},cardHeader:e=>({color:e.palette.mode===`light`?e.palette.secondary.main:e.palette.text.primary,height:`100%`,fontWeight:`bold`,fontSize:20,fontStyle:`italic`,padding:`4px 16px`,backgroundColor:e.palette.primary.main,display:`flex`,justifyContent:`space-between`})};function sT(e,t,n){t||=`key`;let r=[];return Object.keys(e).forEach(i=>{let a={};a[t]=i,n?(a[n]=e[i],r.push(a)):r.push(Object.assign(a,e[i]))}),r}function cT(e,t,n){t||=`key`;let r={};return e.forEach(e=>{let i=e[t]??``;delete e[t],n?r[i]=e[n]:r[i]=e}),r}function lT(e,t){let n=``;for(let r=0;r<t.length;r++)n+=String.fromCharCode(e[r%e.length].charCodeAt(0)^t.charCodeAt(r));return n}function uT(e,t){let n=``;for(let r=0;r<t.length;r++)n+=String.fromCharCode(e[r%e.length].charCodeAt(0)^t.charCodeAt(r));return n}var dT=class e extends X{constructor(t){super(t),q(this,`filterRefs`,void 0),q(this,`typingTimer`,null),q(this,`resizeTimeout`,null),q(this,`secret`,`Zgfr56gFe87jJOM`),q(this,`refDiv`,void 0),q(this,`listOfHiddenElements`,[]),q(this,`refreshBecauseOfHiddenElements`,null),q(this,`onTableRowError`,e=>(t,n)=>{let r={...this.state.tableErrors};r[e]||={},t&&(n?r[e][t]=n:(delete r[e][t],Object.keys(r[e]).length===0&&delete r[e])),this.setState({tableErrors:r}),this.props.onError(t,n)}),q(this,`handleRequestSort`,(e,t=!1)=>{let{order:n,orderBy:r}=this.state,i=t?n:r===e&&n===`asc`?`desc`:`asc`,a=this.stableSort(i,e);JSON.stringify(a)!==JSON.stringify(this.state.value)&&this.setState({value:a,order:i,orderBy:e,iteration:this.state.iteration+1e4},()=>this.applyFilter(!1,a))}),q(this,`stableSort`,(t,n)=>{let{value:r}=this.state,i=e.getComparator(t,n),a=r.map((e,t)=>({el:e,index:t}));return a.sort((e,t)=>{let n=i(e.el,t.el);return n===0?e.index-t.index:n}),a.map(e=>e.el)}),q(this,`onDelete`,e=>()=>{let t=JSON.parse(JSON.stringify(this.state.value));t.splice(e,1);let n={...this.state.tableErrors};n[e]&&(Object.keys(n[e]).forEach(e=>{this.props.onError(e,void 0)}),delete n[e]);let r={};Object.keys(n).forEach(t=>{let i=parseInt(t,10);i>e?r[i-1]=n[i]:r[i]=n[i]}),this.setState({value:t,iteration:this.state.iteration+1e4,tableErrors:r},()=>this.applyFilter(!1,void 0,()=>this.onChangeWrapper(t)))}),q(this,`onClone`,e=>()=>{let t=JSON.parse(JSON.stringify(this.state.value)),n=JSON.parse(JSON.stringify(t[e]));if(typeof this.props.schema.clone==`string`&&typeof n[this.props.schema.clone]==`string`){let e=1,r=n[this.props.schema.clone],i=r.match(/(\d+)$/);for(i?(r=r.replace(i[0],``),e=parseInt(i[0],10)+1):r+=`_`;t.find(t=>t[this.props.schema.clone]===r+e.toString());)e++;n[this.props.schema.clone]=`${n[this.props.schema.clone]}_${e}`}t.splice(e,0,n),this.setState({value:t,iteration:this.state.iteration+1e4},()=>this.applyFilter(!1,void 0,()=>this.onChangeWrapper(t)))}),q(this,`onChangeWrapper`,(e,t)=>{this.typingTimer&&clearTimeout(this.typingTimer),this.typingTimer=setTimeout((e,t)=>{this.typingTimer=null;let n;if(this.props.schema.encryptedAttributes){let t=JSON.parse(JSON.stringify(e));if(t.forEach(e=>{this.props.schema.encryptedAttributes.forEach(t=>{e[t]&&(e[t]=lT(this.secret,e[t]))})}),this.props.schema.objKeyName){let e=cT(t,this.props.schema.objKeyName,this.props.schema.objValueName);n=this.onChange(this.props.attr,e)}else n=this.onChange(this.props.attr,t)}else if(this.props.schema.objKeyName){let t=cT(JSON.parse(JSON.stringify(e)),this.props.schema.objKeyName,this.props.schema.objValueName);n=this.onChange(this.props.attr,t)}else n=this.onChange(this.props.attr,e);n instanceof Promise&&n.catch(e=>console.error(`Cannot save: ${e}`)),t&&(this.applyFilter(!1,e),this.handleRequestSort(this.state.orderBy,!0))},300,e,t)}),q(this,`onAdd`,async()=>{let{schema:e}=this.props,t=JSON.parse(JSON.stringify(this.state.value)),n={};if(e.items)for(let r of e.items){let e;e=r.defaultFunc?this.props.custom?r.defaultFunc?await this.executeCustom(r.defaultFunc,this.props.data,this.props.customObj,this.props.oContext.instanceObj,t.length,this.props.data):this.props.schema.default:r.defaultFunc?await this.execute(r.defaultFunc,this.props.schema.default,this.props.data,t.length,this.props.data):this.props.schema.default:r.default??null,r.attr&&(n[r.attr]=e)}t.push(n),this.setState({value:t},()=>this.applyFilter(!1,void 0,()=>this.onChangeWrapper(t)))}),q(this,`applyFilter`,(t,n,r)=>{n||=this.state.value;let i=n.map((e,t)=>t);if(Object.keys(this.filterRefs).forEach(r=>{let a=e.getFilterValue(this.filterRefs[r]);if(!t&&a){var o;a=a.toLowerCase();let e=(o=this.state.filterLabelMap)==null?void 0:o[r];i=i==null?void 0:i.filter(t=>{if(!n[t]||n[t][r]==null)return!1;if(n[t][r].toString().toLowerCase().includes(a))return!0;if(e){let i=e[n[t][r]];if(i!=null&&i.toLowerCase().includes(a))return!0}return!1})}else this.filterRefs[r].current&&e.setFilterValue(this.filterRefs[r],``)}),i&&i.length===n.length&&(i=null),i==null&&this.state.visibleValue===null){r==null||r();return}JSON.stringify(i)===JSON.stringify(this.state.visibleValue)?r&&r():this.setState({visibleValue:i},()=>r&&r())}),this.filterRefs={},this.props.schema.items||=[],this.props.schema.items.forEach(e=>{e.filter&&e.attr&&(this.filterRefs[e.attr]=m())}),this.refDiv=_.createRef()}async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr)||[],t;if(t=this.props.schema.objKeyName?sT(e,this.props.schema.objKeyName,this.props.schema.objValueName):e,Array.isArray(t)||(t=[]),this.props.schema.encryptedAttributes){var n;let t;try{t=this.props.oContext.socket.getCompactSystemConfig?await this.props.oContext.socket.getCompactSystemConfig():await this.getCachedObject(`system.config`)}catch(e){console.error(`Cannot get system configuration: ${e}`)}this.secret=(t==null||(n=t.native)==null?void 0:n.secret)||this.secret,e.forEach(e=>{var t;(t=this.props.schema.encryptedAttributes)==null||t.forEach(t=>{e[t]||=uT(this.secret,e[t])})})}let r=window.localStorage.getItem(`table.collapsed.${this.props.oContext.instance}.${this.props.attr}`),i=[];if(r)try{i=JSON.parse(r)}catch{}this.setState({value:t,visibleValue:null,orderBy:``,order:`asc`,iteration:0,filterOn:[],width:0,tableErrors:{},collapsed:i,filterLabelMap:{}},()=>this.validateUniqueProps())}componentWillUnmount(){this.typingTimer&&=(clearTimeout(this.typingTimer),null),this.resizeTimeout&&=(clearTimeout(this.resizeTimeout),null),this.refreshBecauseOfHiddenElements&&=(clearTimeout(this.refreshBecauseOfHiddenElements),null),super.componentWillUnmount()}itemTable(e,t,n,r){var i;let{schema:a}=this.props,o=(i=a.items)==null?void 0:i.find(t=>t.attr===e);if(!o)return null;let s={items:{[e]:o}};return _.createElement(yk,{oContext:this.props.oContext,alive:this.props.alive,arrayIndex:n,changed:this.props.changed,common:this.props.common,expertMode:this.props.expertMode,custom:!0,data:t,globalData:this.props.data,index:n+this.state.iteration,onChange:(e,t)=>{let r=JSON.parse(JSON.stringify(this.state.value));r[n][e]=t,this.setState({value:r},()=>{this.validateUniqueProps(),this.onChangeWrapper(r,!0)})},onError:this.onTableRowError(n),originalData:this.props.originalData,schema:s,table:!0,themeName:this.props.themeName,onFilterLabelUpdate:(e,t)=>{let n=this.state.filterLabelMap[e],r={...n,...t};JSON.stringify(n)!==JSON.stringify(r)&&this.setState(t=>({filterLabelMap:{...t.filterLabelMap,[e]:r}}))},customComponents:this.props.customComponents,onHiddenChanged:r?(e,t)=>{if(t)this.listOfHiddenElements[n]||=[],this.listOfHiddenElements[n].includes(e)||(this.listOfHiddenElements[n].push(e),this.refreshBecauseOfHiddenElements&&clearTimeout(this.refreshBecauseOfHiddenElements),this.refreshBecauseOfHiddenElements=setTimeout(()=>{this.forceUpdate()},100));else if(this.listOfHiddenElements[n]){let t=this.listOfHiddenElements[n].indexOf(e);t!==-1&&(this.listOfHiddenElements[n].splice(t,1),this.refreshBecauseOfHiddenElements&&clearTimeout(this.refreshBecauseOfHiddenElements),this.refreshBecauseOfHiddenElements=setTimeout(()=>{this.forceUpdate()},100))}}:void 0})}validateUniqueProps(){if(!this.props.schema.uniqueColumns)return;let e=null,t=null;for(let n of this.props.schema.uniqueColumns){let r=[];this.state.value.find(i=>{let a=i[n];return r.includes(a)?(e||(e=n,t=a),this.onError(n,`is not unique`),!0):(r.push(a),!1)})||this.onError(n)}e?this.setState({errorMessage:K.t(`jc_Non-allowed duplicate entry "%s" in column "%s"`,t,e)}):this.setState({errorMessage:``})}static descendingComparator(e,t,n){return t[n]<e[n]?-1:+(t[n]>e[n])}static getComparator(t,n){return t===`desc`?(t,r)=>e.descendingComparator(t,r,n):(t,r)=>-e.descendingComparator(t,r,n)}static getFilterValue(e){var t;return e==null||(t=e.current)==null||(t=t.children[0])==null||(t=t.children[0])==null?void 0:t.value}static setFilterValue(e,t){e.current&&(e.current.children[0].children[0].value=t)}renderShowHideFilter(t){return!t.filter||!t.attr?null:_.createElement(ur,{title:K.t(`jc_Show/hide filter input`),size:`small`,onClick:()=>{let n=[...this.state.filterOn];if(t.attr){let r=this.state.filterOn.indexOf(t.attr);r===-1?n.push(t.attr):n.splice(r,1),this.setState({filterOn:n},()=>{r&&e.getFilterValue(this.filterRefs[t.attr])&&(e.setFilterValue(this.filterRefs[t.attr],``),this.applyFilter())})}}},this.state.filterOn.includes(t.attr)?_.createElement(Fn,null):_.createElement(xe,null))}renderImportExportButtons(e){return _.createElement(_.Fragment,null,!e.noDelete&&e.import?_.createElement(Ln,{title:K.t(`jc_Import data from %s file`,`CSV`),slotProps:{popper:{sx:oT.tooltip}}},_.createElement(ur,{size:`small`,onClick:()=>this.setState({showImportDialog:!0})},_.createElement(Xe,null))):null,e.export?_.createElement(Ln,{title:K.t(`jc_Export data to %s file`,`CSV`),slotProps:{popper:{sx:oT.tooltip}}},_.createElement(ur,{size:`small`,onClick:()=>this.onExport()},_.createElement(Ke,null))):null,e.noDelete?null:_.createElement(ur,{disabled:!0,size:`small`},_.createElement(we,null)))}renderAddButton(e){return _.createElement(Ln,{title:e?K.t(`jc_Cannot add items with set filter`):K.t(`jc_Add row`),slotProps:{popper:{sx:oT.tooltip}}},_.createElement(`span`,null,_.createElement(ur,{size:`small`,color:`primary`,disabled:!!e&&!this.props.schema.allowAddByFilter,onClick:this.onAdd},_.createElement(Re,null))))}enhancedTableHead(e,t){var n;let{schema:r}=this.props,{order:i,orderBy:a}=this.state;return _.createElement(F,null,_.createElement(ct,null,(n=r.items)==null?void 0:n.map((e,n)=>this.renderOneFilter({schema:r,style:{width:e.width},showAddButton:!n&&!r.noDelete,headCell:e,order:i,orderBy:a,index:n,doAnyFilterSet:t})),!r.noDelete&&_.createElement(Ye,{style:{paddingLeft:20,paddingRight:20,width:e,textAlign:`right`},padding:`checkbox`},this.renderImportExportButtons(r))))}onExport(){var e;let{schema:t}=this.props,{value:n}=this.state,r=(e=t.items)==null?void 0:e.map(e=>e.attr),i=r?[r.join(`;`)]:[];n.forEach(e=>{var n;let r=[];(n=t.items)==null||n.forEach(t=>{t.attr&&(e[t.attr]&&typeof e[t.attr]==`string`&&e[t.attr].includes(`;`)?r.push(`"${e[t.attr]}"`):r.push(e[t.attr]??``))}),i.push(r.join(`;`))});let a=document.createElement(`a`);a.setAttribute(`href`,`data:text/csv;charset=utf-8,${encodeURIComponent(i.join(`
|
|
1385
|
+
`,`autocompletion.css`,!1),t.AcePopup=g,t.$singleLineEditor=h,t.getAriaId=d}),ace.define(`ace/autocomplete/inline_screenreader`,[`require`,`exports`,`module`],function(e,t,n){t.AceInlineScreenReader=function(){function e(e){this.editor=e,this.screenReaderDiv=document.createElement(`div`),this.screenReaderDiv.classList.add(`ace_screenreader-only`),this.editor.container.appendChild(this.screenReaderDiv)}return e.prototype.setScreenReaderContent=function(e){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on(`afterRender`,function(){var e=this.popup.getRow(),t=this.popup.renderer.$textLayer,n=t.element.childNodes[e-t.config.firstRow];if(n){for(var r=`doc-tooltip `,i=0;i<this._lines.length;i++)r+=`ace-inline-screenreader-line-${i} `;n.setAttribute(`aria-describedby`,r)}}.bind(this)));this.screenReaderDiv.firstChild;)this.screenReaderDiv.removeChild(this.screenReaderDiv.firstChild);this._lines=e.split(/\r\n|\r|\n/);var t=this.createCodeBlock();this.screenReaderDiv.appendChild(t)},e.prototype.destroy=function(){this.screenReaderDiv.remove()},e.prototype.createCodeBlock=function(){var e=document.createElement(`pre`);e.setAttribute(`id`,`ace-inline-screenreader`);for(var t=0;t<this._lines.length;t++){var n=document.createElement(`code`);n.setAttribute(`id`,`ace-inline-screenreader-line-${t}`);var r=document.createTextNode(this._lines[t]);n.appendChild(r),e.appendChild(n)}return e},e}()}),ace.define(`ace/autocomplete/inline`,[`require`,`exports`,`module`,`ace/snippets`,`ace/autocomplete/inline_screenreader`],function(e,t,n){var r=e(`../snippets`).snippetManager,i=e(`./inline_screenreader`).AceInlineScreenReader;t.AceInline=function(){function e(){this.editor=null}return e.prototype.show=function(e,t,n){if(n||=``,e&&this.editor&&this.editor!==e&&(this.hide(),this.editor=null,this.inlineScreenReader=null),!e||!t)return!1;this.inlineScreenReader||=new i(e);var a=t.snippet?r.getDisplayTextForSnippet(e,t.snippet):t.value;return t.hideInlinePreview||!a||!a.startsWith(n)?!1:(this.editor=e,this.inlineScreenReader.setScreenReaderContent(a),a=a.slice(n.length),a===``?e.removeGhostText():e.setGhostText(a),!0)},e.prototype.isOpen=function(){return this.editor?!!this.editor.renderer.$ghostText:!1},e.prototype.hide=function(){return this.editor?(this.editor.removeGhostText(),!0):!1},e.prototype.destroy=function(){this.hide(),this.editor=null,this.inlineScreenReader&&=(this.inlineScreenReader.destroy(),null)},e}()}),ace.define(`ace/autocomplete/util`,[`require`,`exports`,`module`],function(e,t,n){t.parForEach=function(e,t,n){var r=0,i=e.length;i===0&&n();for(var a=0;a<i;a++)t(e[a],function(e,t){r++,r===i&&n(e,t)})};var r=/[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;t.retrievePrecedingIdentifier=function(e,t,n){n||=r;for(var i=[],a=t-1;a>=0&&n.test(e[a]);a--)i.push(e[a]);return i.reverse().join(``)},t.retrieveFollowingIdentifier=function(e,t,n){n||=r;for(var i=[],a=t;a<e.length&&n.test(e[a]);a++)i.push(e[a]);return i},t.getCompletionPrefix=function(e){var t=e.getCursorPosition(),n=e.session.getLine(t.row),r;return e.completers.forEach(function(e){e.identifierRegexps&&e.identifierRegexps.forEach(function(e){!r&&e&&(r=this.retrievePrecedingIdentifier(n,t.column,e))}.bind(this))}.bind(this)),r||this.retrievePrecedingIdentifier(n,t.column)},t.triggerAutocomplete=function(e,t){var t=t??e.session.getPrecedingCharacter();return e.completers.some(function(e){if(e.triggerCharacters&&Array.isArray(e.triggerCharacters))return e.triggerCharacters.includes(t)})}}),ace.define(`ace/autocomplete`,[`require`,`exports`,`module`,`ace/keyboard/hash_handler`,`ace/autocomplete/popup`,`ace/autocomplete/inline`,`ace/autocomplete/popup`,`ace/autocomplete/util`,`ace/lib/lang`,`ace/lib/dom`,`ace/snippets`,`ace/config`,`ace/lib/event`,`ace/lib/scroll`],function(e,t,n){var r=e(`./keyboard/hash_handler`).HashHandler,i=e(`./autocomplete/popup`).AcePopup,a=e(`./autocomplete/inline`).AceInline,o=e(`./autocomplete/popup`).getAriaId,s=e(`./autocomplete/util`),c=e(`./lib/lang`),l=e(`./lib/dom`),u=e(`./snippets`).snippetManager,d=e(`./config`),f=e(`./lib/event`),p=e(`./lib/scroll`).preventParentScroll,m=function(e,t){t.completer&&t.completer.destroy()},h=function(){function e(){this.autoInsert=!1,this.autoSelect=!0,this.autoShown=!1,this.exactMatch=!1,this.inlineEnabled=!1,this.keyboardHandler=new r,this.keyboardHandler.bindKeys(this.commands),this.parentNode=null,this.setSelectOnHover=!1,this.hasSeen=new Set,this.showLoadingState=!1,this.stickySelectionDelay=500,this.blurListener=this.blurListener.bind(this),this.changeListener=this.changeListener.bind(this),this.mousedownListener=this.mousedownListener.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this),this.onLayoutChange=this.onLayoutChange.bind(this),this.changeTimer=c.delayedCall(function(){this.updateCompletions(!0)}.bind(this)),this.tooltipTimer=c.delayedCall(this.updateDocTooltip.bind(this),50),this.popupTimer=c.delayedCall(this.$updatePopupPosition.bind(this),50),this.stickySelectionTimer=c.delayedCall(function(){this.stickySelection=!0}.bind(this),this.stickySelectionDelay),this.$firstOpenTimer=c.delayedCall(function(){var t=this.completionProvider&&this.completionProvider.initialPosition;this.autoShown||this.popup&&this.popup.isOpen||!t||this.editor.completers.length===0||(this.completions=new _(e.completionsForLoading),this.openPopup(this.editor,t.prefix,!1),this.popup.renderer.setStyle(`ace_loading`,!0))}.bind(this),this.stickySelectionDelay)}return Object.defineProperty(e,"completionsForLoading",{get:function(){return[{caption:d.nls(`autocomplete.loading`,`Loading...`),value:``}]},enumerable:!1,configurable:!0}),e.prototype.$init=function(){return this.popup=new i(this.parentNode||document.body||document.documentElement),this.popup.on(`click`,function(e){this.insertMatch(),e.stop()}.bind(this)),this.popup.focus=this.editor.focus.bind(this.editor),this.popup.on(`show`,this.$onPopupShow.bind(this)),this.popup.on(`hide`,this.$onHidePopup.bind(this)),this.popup.on(`select`,this.$onPopupChange.bind(this)),f.addListener(this.popup.container,`mouseout`,this.mouseOutListener.bind(this)),this.popup.on(`changeHoverMarker`,this.tooltipTimer.bind(null,null)),this.popup.renderer.on(`afterRender`,this.$onPopupRender.bind(this)),this.popup},e.prototype.$initInline=function(){if(!(!this.inlineEnabled||this.inlineRenderer))return this.inlineRenderer=new a,this.inlineRenderer},e.prototype.getPopup=function(){return this.popup||this.$init()},e.prototype.$onHidePopup=function(){this.inlineRenderer&&this.inlineRenderer.hide(),this.hideDocTooltip(),this.stickySelectionTimer.cancel(),this.popupTimer.cancel(),this.stickySelection=!1},e.prototype.$seen=function(e){!this.hasSeen.has(e)&&e&&e.completer&&e.completer.onSeen&&typeof e.completer.onSeen==`function`&&(e.completer.onSeen(this.editor,e),this.hasSeen.add(e))},e.prototype.$onPopupChange=function(e){if(this.inlineRenderer&&this.inlineEnabled){var t=e?null:this.popup.getData(this.popup.getRow());if(this.$updateGhostText(t),this.popup.isMouseOver&&this.setSelectOnHover){this.tooltipTimer.call(null,null);return}this.popupTimer.schedule(),this.tooltipTimer.schedule()}else this.popupTimer.call(null,null),this.tooltipTimer.call(null,null)},e.prototype.$updateGhostText=function(e){var t=this.base.row,n=this.base.column,r=this.editor.getCursorPosition().column,i=this.editor.session.getLine(t).slice(n,r);this.inlineRenderer.show(this.editor,e,i)?this.$seen(e):this.inlineRenderer.hide()},e.prototype.$onPopupRender=function(){var e=this.inlineRenderer&&this.inlineEnabled;if(this.completions&&this.completions.filtered&&this.completions.filtered.length>0)for(var t=this.popup.getFirstVisibleRow();t<=this.popup.getLastVisibleRow();t++){var n=this.popup.getData(t);n&&(!e||n.hideInlinePreview)&&this.$seen(n)}},e.prototype.$onPopupShow=function(e){this.$onPopupChange(e),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},e.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener(`resize`,this.onLayoutChange,{passive:!0}),window.addEventListener(`wheel`,this.mousewheelListener);for(var e=this.editor.container.parentNode,t=[];e;)t.push(e),e.addEventListener(`scroll`,this.onLayoutChange,{passive:!0}),e=e.parentNode;this.$elements=t}},e.prototype.unObserveLayoutChanges=function(){var e=this;window.removeEventListener(`resize`,this.onLayoutChange,{passive:!0}),window.removeEventListener(`wheel`,this.mousewheelListener),this.$elements&&this.$elements.forEach(function(t){t.removeEventListener(`scroll`,e.onLayoutChange,{passive:!0})}),this.$elements=null},e.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},e.prototype.$updatePopupPosition=function(){var e=this.editor,t=e.renderer,n=t.layerConfig.lineHeight,r=t.$cursorLayer.getPixelPosition(this.base,!0);r.left-=this.popup.getTextLeftOffset();var i=e.container.getBoundingClientRect();r.top+=i.top-t.layerConfig.offset,r.left+=i.left-e.renderer.scrollLeft,r.left+=t.gutterWidth;var a={top:r.top,left:r.left};t.$ghostText&&t.$ghostTextWidget&&this.base.row===t.$ghostText.position.row&&(a.top+=t.$ghostTextWidget.el.offsetHeight);var o=e.container.getBoundingClientRect().bottom-n,s=o<a.top?{top:o,left:a.left}:a;this.popup.tryShow(s,n,`bottom`)||this.popup.tryShow(r,n,`top`)||this.popup.show(r,n)},e.prototype.openPopup=function(e,t,n){this.$firstOpenTimer.cancel(),this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover);var r=this.popup.getRow(),i=this.popup.data[r];this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:o(this.popup.getRow()),inline:this.inlineEnabled}),e.keyBinding.addKeyboardHandler(this.keyboardHandler);var a;this.stickySelection&&(a=this.popup.data.indexOf(i)),(!a||a===-1)&&(a=0),this.popup.setRow(this.autoSelect?a:-1),a===r&&i!==this.completions.filtered[a]&&this.$onPopupChange();var s=this.inlineRenderer&&this.inlineEnabled;if(a===r&&s){var c=this.popup.getData(this.popup.getRow());this.$updateGhostText(c)}n||(this.popup.setTheme(e.getTheme()),this.popup.setFontSize(e.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},e.prototype.detach=function(){this.editor&&(this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off(`changeSelection`,this.changeListener),this.editor.off(`blur`,this.blurListener),this.editor.off(`mousedown`,this.mousedownListener),this.editor.off(`mousewheel`,this.mousewheelListener)),this.$firstOpenTimer.cancel(),this.changeTimer.cancel(),this.hideDocTooltip(),this.completionProvider&&this.completionProvider.detach(),this.popup&&this.popup.isOpen&&this.popup.hide(),this.popup&&this.popup.renderer&&this.popup.renderer.off(`afterRender`,this.$onPopupRender),this.base&&this.base.detach(),this.activated=!1,this.completionProvider=this.completions=this.base=null,this.unObserveLayoutChanges()},e.prototype.changeListener=function(e){var t=this.editor.selection.lead;(t.row!=this.base.row||t.column<this.base.column)&&this.detach(),this.activated?this.changeTimer.schedule():this.detach()},e.prototype.blurListener=function(e){var t=document.activeElement,n=this.editor.textInput.getElement(),r=e.relatedTarget&&this.tooltipNode&&this.tooltipNode.contains(e.relatedTarget),i=this.popup&&this.popup.container;t!=n&&t.parentNode!=i&&!r&&t!=this.tooltipNode&&e.relatedTarget!=n&&this.detach()},e.prototype.mousedownListener=function(e){this.detach()},e.prototype.mousewheelListener=function(e){this.popup&&!this.popup.isMouseOver&&this.detach()},e.prototype.mouseOutListener=function(e){this.popup.isOpen&&this.$updatePopupPosition()},e.prototype.goTo=function(e){this.popup.goTo(e)},e.prototype.insertMatch=function(e,t){if(e||=this.popup.getData(this.popup.getRow()),!e)return!1;if(e.value===``)return this.detach();var n=this.completions,r=this.getCompletionProvider().insertMatch(this.editor,e,n.filterText,t);return this.completions==n&&this.detach(),r},e.prototype.showPopup=function(e,t){this.editor&&this.detach(),this.activated=!0,this.editor=e,e.completer!=this&&(e.completer&&e.completer.detach(),e.completer=this),e.on(`changeSelection`,this.changeListener),e.on(`blur`,this.blurListener),e.on(`mousedown`,this.mousedownListener),e.on(`mousewheel`,this.mousewheelListener),this.updateCompletions(!1,t)},e.prototype.getCompletionProvider=function(e){return this.completionProvider||=new g(e),this.completionProvider},e.prototype.gatherCompletions=function(e,t){return this.getCompletionProvider().gatherCompletions(e,t)},e.prototype.updateCompletions=function(t,n){if(t&&this.base&&this.completions){var r=this.editor.getCursorPosition(),i=this.editor.session.getTextRange({start:this.base,end:r});if(i==this.completions.filterText)return;if(this.completions.setFilter(i),!this.completions.filtered.length||this.completions.filtered.length==1&&this.completions.filtered[0].value==i&&!this.completions.filtered[0].snippet)return this.detach();this.openPopup(this.editor,i,t);return}if(n&&n.matches){var r=this.editor.getSelectionRange().start;return this.base=this.editor.session.doc.createAnchor(r.row,r.column),this.base.$insertRight=!0,this.completions=new _(n.matches),this.getCompletionProvider().completions=this.completions,this.openPopup(this.editor,``,t)}var a=this.editor.getSession(),r=this.editor.getCursorPosition(),i=s.getCompletionPrefix(this.editor);this.base=a.doc.createAnchor(r.row,r.column-i.length),this.base.$insertRight=!0;var o={exactMatch:this.exactMatch,ignoreCaption:this.ignoreCaption};this.getCompletionProvider({prefix:i,pos:r}).provideCompletions(this.editor,o,function(n,r,i){var a=r.filtered,o=s.getCompletionPrefix(this.editor);if(this.$firstOpenTimer.cancel(),i){if(!a.length){var c=!this.autoShown&&this.emptyMessage;if(typeof c==`function`&&(c=this.emptyMessage(o)),c){var l=[{caption:c,value:``}];this.completions=new _(l),this.openPopup(this.editor,o,t),this.popup.renderer.setStyle(`ace_loading`,!1),this.popup.renderer.setStyle(`ace_empty-message`,!0);return}return this.detach()}if(a.length==1&&a[0].value==o&&!a[0].snippet)return this.detach();if(this.autoInsert&&!this.autoShown&&a.length==1)return this.insertMatch(a[0])}this.completions=!i&&this.showLoadingState?new _(e.completionsForLoading.concat(a),r.filterText):r,this.openPopup(this.editor,o,t),this.popup.renderer.setStyle(`ace_empty-message`,!1),this.popup.renderer.setStyle(`ace_loading`,!i)}.bind(this)),this.showLoadingState&&!this.autoShown&&(!this.popup||!this.popup.isOpen)&&this.$firstOpenTimer.delay(this.stickySelectionDelay/2)},e.prototype.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},e.prototype.updateDocTooltip=function(){var e=this.popup,t=this.completions&&this.completions.filtered,n=t&&(t[e.getHoveredRow()]||t[e.getRow()]),r=null;if(!n||!this.editor||!this.popup.isOpen)return this.hideDocTooltip();for(var i=this.editor.completers.length,a=0;a<i;a++){var o=this.editor.completers[a];if(o.getDocTooltip&&n.completerId===o.id){r=o.getDocTooltip(n);break}}if(!r&&typeof n!=`string`&&(r=n),typeof r==`string`&&(r={docText:r}),!r||!r.docHTML&&!r.docText)return this.hideDocTooltip();this.showDocTooltip(r)},e.prototype.showDocTooltip=function(e){this.tooltipNode||(this.tooltipNode=l.createElement(`div`),this.tooltipNode.style.margin=`0`,this.tooltipNode.style.pointerEvents=`auto`,this.tooltipNode.style.overscrollBehavior=`contain`,this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this),this.tooltipNode.onclick=this.onTooltipClick.bind(this),this.tooltipNode.id=`doc-tooltip`,this.tooltipNode.setAttribute(`role`,`tooltip`),this.tooltipNode.addEventListener(`wheel`,p));var t=this.editor.renderer.theme;this.tooltipNode.className=`ace_tooltip ace_doc-tooltip `+(t.isDark?`ace_dark `:``)+(t.cssClass||``);var n=this.tooltipNode;e.docHTML?n.innerHTML=e.docHTML:e.docText&&(n.textContent=e.docText),n.parentNode||this.popup.container.appendChild(this.tooltipNode);var r=this.popup,i=r.container.getBoundingClientRect(),a=400,o=300,s=r.renderer.scrollBar.width||10,c=i.left,u=window.innerWidth-i.right-s,d=r.isTopdown?window.innerHeight-s-i.bottom:i.top,f=[Math.min(u/a,1),Math.min(c/a,1),Math.min(d/o,1)*.9],m=Math.max.apply(Math,f),h=n.style;h.display=`block`,m==f[0]||f[0]>=1?(h.left=i.right+1+`px`,h.right=``,h.maxWidth=a*m+`px`,h.top=i.top+`px`,h.bottom=``,h.maxHeight=Math.min(window.innerHeight-s-i.top,o)+`px`):m==f[1]||f[1]>=1?(h.right=window.innerWidth-i.left+`px`,h.left=``,h.maxWidth=a*m+`px`,h.top=i.top+`px`,h.bottom=``,h.maxHeight=Math.min(window.innerHeight-s-i.top,o)+`px`):m==f[2]&&(h.left=i.left+`px`,h.right=``,h.maxWidth=Math.min(a,window.innerWidth-i.left)+`px`,r.isTopdown?(h.top=i.bottom+`px`,h.bottom=``,h.maxHeight=Math.min(window.innerHeight-s-i.bottom,o)+`px`):(h.top=``,h.bottom=window.innerHeight-i.top+`px`,h.maxHeight=Math.min(i.top,o)+`px`)),l.$fixPositionBug(n)},e.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),this.tooltipNode){var e=this.tooltipNode;!this.editor.isFocused()&&document.activeElement==e&&this.editor.focus(),this.tooltipNode=null,e.parentNode&&e.parentNode.removeChild(e)}},e.prototype.onTooltipClick=function(e){for(var t=e.target;t&&t!=this.tooltipNode;){if(t.nodeName==`A`&&t.href){t.rel=`noreferrer`,t.target=`_blank`;break}t=t.parentNode}},e.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var e=this.popup.container;e&&e.parentNode&&e.parentNode.removeChild(e)}this.editor&&this.editor.completer==this&&(this.editor.off(`destroy`,m),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},e.for=function(t){return t.completer instanceof e?t.completer:(t.completer&&=(t.completer.destroy(),null),d.get(`sharedPopups`)?(e.$sharedInstance||=new e,t.completer=e.$sharedInstance):(t.completer=new e,t.once(`destroy`,m)),t.completer)},e}();h.prototype.commands={Up:function(e){e.completer.goTo(`up`)},Down:function(e){e.completer.goTo(`down`)},"Ctrl-Up|Ctrl-Home":function(e){e.completer.goTo(`start`)},"Ctrl-Down|Ctrl-End":function(e){e.completer.goTo(`end`)},Esc:function(e){e.completer.detach()},Return:function(e){return e.completer.insertMatch()},"Shift-Return":function(e){e.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(e){var t=e.completer.insertMatch();if(t||e.tabstopManager)return t;e.completer.goTo(`down`)},Backspace:function(e){e.execCommand(`backspace`),!s.getCompletionPrefix(e)&&e.completer&&e.completer.detach()},PageUp:function(e){e.completer.popup.gotoPageUp()},PageDown:function(e){e.completer.popup.gotoPageDown()}},h.startCommand={name:`startAutocomplete`,exec:function(e,t){var n=h.for(e);n.autoInsert=!1,n.autoSelect=!0,n.autoShown=!1,n.showPopup(e,t),n.cancelContextMenu()},bindKey:`Ctrl-Space|Ctrl-Shift-Space|Alt-Space`};var g=function(){function e(e){this.initialPosition=e,this.active=!0}return e.prototype.insertByIndex=function(e,t,n){return!this.completions||!this.completions.filtered?!1:this.insertMatch(e,this.completions.filtered[t],n)},e.prototype.insertMatch=function(e,t,n){if(!t)return!1;if(e.startOperation({command:{name:`insertMatch`}}),t.completer&&t.completer.insertMatch)t.completer.insertMatch(e,t);else{if(!this.completions)return!1;var r=this.completions.filterText.length,i=0;if(t.range&&t.range.start.row===t.range.end.row&&(r-=this.initialPosition.prefix.length,r+=this.initialPosition.pos.column-t.range.start.column,i+=t.range.end.column-this.initialPosition.pos.column),r||i)for(var a=e.selection.getAllRanges?e.selection.getAllRanges():[e.getSelectionRange()],o=0,s;s=a[o];o++)s.start.column-=r,s.end.column+=i,e.session.remove(s);t.snippet?u.insertSnippet(e,t.snippet):this.$insertString(e,t),t.completer&&t.completer.onInsert&&typeof t.completer.onInsert==`function`&&t.completer.onInsert(e,t),t.command&&t.command===`startAutocomplete`&&e.execCommand(t.command)}return e.endOperation(),!0},e.prototype.$insertString=function(e,t){var n=t.value||t;e.execCommand(`insertstring`,n)},e.prototype.gatherCompletions=function(e,t){var n=e.getSession(),r=e.getCursorPosition(),i=s.getCompletionPrefix(e),a=[];this.completers=e.completers;var o=e.completers.length;return e.completers.forEach(function(c,l){c.getCompletions(e,n,r,i,function(n,r){c.hideInlinePreview&&(r=r.map(function(e){return Object.assign(e,{hideInlinePreview:c.hideInlinePreview})})),!n&&r&&(a=a.concat(r)),t(null,{prefix:s.getCompletionPrefix(e),matches:a,finished:--o===0})})}),!0},e.prototype.provideCompletions=function(e,t,n){var r=function(e){var r=e.prefix,i=e.matches;this.completions=new _(i),t.exactMatch&&(this.completions.exactMatch=!0),t.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(r),(e.finished||this.completions.filtered.length)&&n(null,this.completions,e.finished)}.bind(this),i=!0,a=null;if(this.gatherCompletions(e,function(e,t){if(this.active&&(e&&(n(e,[],!0),this.detach()),t.prefix.indexOf(t.prefix)===0)){if(i){a=t;return}r(t)}}.bind(this)),i=!1,a){var o=a;a=null,r(o)}},e.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach(function(e){typeof e.cancel==`function`&&e.cancel()})},e}(),_=function(){function e(e,t){this.all=e,this.filtered=e,this.filterText=t||``,this.exactMatch=!1,this.ignoreCaption=!1}return e.prototype.setFilter=function(e){if(e.length>this.filterText&&e.lastIndexOf(this.filterText,0)===0)var t=this.filtered;else var t=this.all;this.filterText=e,t=this.filterCompletions(t,this.filterText),t=t.sort(function(e,t){return t.exactMatch-e.exactMatch||t.$score-e.$score||(e.caption||e.value).localeCompare(t.caption||t.value)});var n=null;t=t.filter(function(e){var t=e.snippet||e.caption||e.value;return t!==n&&(n=t,!0)}),this.filtered=t},e.prototype.filterCompletions=function(e,t){var n=[],r=t.toUpperCase(),i=t.toLowerCase();e:for(var a=0,o;o=e[a];a++){if(o.skipFilter){o.$score=o.score,n.push(o);continue}var s=!this.ignoreCaption&&o.caption||o.value||o.snippet;if(s){var c=-1,l=0,u=0,d,f;if(this.exactMatch){if(t!==s.substr(0,t.length))continue e}else{var p=s.toLowerCase().indexOf(i);if(p>-1)u=p;else for(var m=0;m<t.length;m++){var h=s.indexOf(i[m],c+1),g=s.indexOf(r[m],c+1);if(d=h>=0&&(g<0||h<g)?h:g,d<0)continue e;f=d-c-1,f>0&&(c===-1&&(u+=10),u+=f,l|=1<<m),c=d}}o.matchMask=l,o.exactMatch=+!u,o.$score=(o.score||0)-u,n.push(o)}}return n},e}();t.Autocomplete=h,t.CompletionProvider=g,t.FilteredList=_}),ace.define(`ace/marker_group`,[`require`,`exports`,`module`],function(e,t,n){var r=function(){function e(e,t){t&&(this.markerType=t.markerType),this.markers=[],this.session=e,e.addDynamicMarker(this)}return e.prototype.getMarkerAtPosition=function(e){return this.markers.find(function(t){return t.range.contains(e.row,e.column)})},e.prototype.markersComparator=function(e,t){return e.range.start.row-t.range.start.row},e.prototype.setMarkers=function(e){this.markers=e.sort(this.markersComparator).slice(0,this.MAX_MARKERS),this.session._signal(`changeBackMarker`)},e.prototype.update=function(e,t,n,r){if(!(!this.markers||!this.markers.length))for(var i=r.firstRow,a=r.lastRow,o,s=0,c=0,l=0;l<this.markers.length;l++){var u=this.markers[l];if(!(u.range.end.row<i)&&!(u.range.start.row>a)&&(u.range.start.row===c?s++:(c=u.range.start.row,s=0),!(s>200))){var d=u.range.clipRows(i,a);if(d.start.row!==d.end.row||d.start.column!==d.end.column){var f=d.toScreenRange(n);if(f.isEmpty()){o=n.getNextFoldLine(d.end.row,o),o&&o.end.row>d.end.row&&(i=o.end.row);continue}this.markerType===`fullLine`?t.drawFullLineMarker(e,f,u.className,r):f.isMultiLine()?this.markerType===`line`?t.drawMultiLineMarker(e,f,u.className,r):t.drawTextMarker(e,f,u.className,r):t.drawSingleLineMarker(e,f,u.className+` ace_br15`,r)}}}},e}();r.prototype.MAX_MARKERS=1e4,t.MarkerGroup=r}),ace.define(`ace/autocomplete/text_completer`,[`require`,`exports`,`module`,`ace/range`],function(e,t,n){function r(e,t){return e.getTextRange(a.fromPoints({row:0,column:0},t)).split(o).length-1}function i(e,t){var n=r(e,t),i=e.getValue().split(o),a=Object.create(null),s=i[n];return i.forEach(function(e,t){if(!(!e||e===s)){var r=Math.abs(n-t),o=i.length-r;a[e]=a[e]?Math.max(o,a[e]):o}}),a}var a=e(`../range`).Range,o=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;t.id=`textCompleter`,t.getCompletions=function(e,t,n,r,a){var o=i(t,n);a(null,Object.keys(o).map(function(e){return{caption:e,value:e,score:o[e],meta:`local`}}))}}),ace.define(`ace/ext/language_tools`,[`require`,`exports`,`module`,`ace/snippets`,`ace/autocomplete`,`ace/config`,`ace/lib/lang`,`ace/autocomplete/util`,`ace/marker_group`,`ace/autocomplete/text_completer`,`ace/editor`,`ace/config`],function(e,t,n){var r=e(`../snippets`).snippetManager,i=e(`../autocomplete`).Autocomplete,a=e(`../config`),o=e(`../lib/lang`),s=e(`../autocomplete/util`),c=e(`../marker_group`).MarkerGroup,l=e(`../autocomplete/text_completer`),u={getCompletions:function(e,t,n,r,i){if(t.$mode.completer)return t.$mode.completer.getCompletions(e,t,n,r,i);var a=e.session.getState(n.row),o=t.$mode.getCompletions(a,t,n,r);o=o.map(function(e){return e.completerId=u.id,e}),i(null,o)},id:`keywordCompleter`},d=function(e){var t={};return e.replace(/\${(\d+)(:(.*?))?}/g,function(e,n,r,i){return t[n]=i||``}).replace(/\$(\d+?)/g,function(e,n){return t[n]})},f={getCompletions:function(e,t,n,i,a){var o=[],s=t.getTokenAt(n.row,n.column);s&&s.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?o.push(`html-tag`):o=r.getActiveScopes(e);var c=r.snippetMap,l=[];o.forEach(function(e){for(var t=c[e]||[],n=t.length;n--;){var r=t[n],i=r.name||r.tabTrigger;i&&l.push({caption:i,snippet:r.content,meta:r.tabTrigger&&!r.name?r.tabTrigger+`⇥ `:`snippet`,completerId:f.id})}},this),a(null,l)},getDocTooltip:function(e){e.snippet&&!e.docHTML&&(e.docHTML=[`<b>`,o.escapeHTML(e.caption),`</b>`,`<hr></hr>`,o.escapeHTML(d(e.snippet))].join(``))},id:`snippetCompleter`},p=[f,l,u];t.setCompleters=function(e){p.length=0,e&&p.push.apply(p,e)},t.addCompleter=function(e){p.push(e)},t.textCompleter=l,t.keyWordCompleter=u,t.snippetCompleter=f;var m={name:`expandSnippet`,exec:function(e){return r.expandWithTab(e)},bindKey:`Tab`},h=function(e,t){g(t.session.$mode)},g=function(e){typeof e==`string`&&(e=a.$modes[e]),e&&(r.files||={},_(e.$id,e.snippetFileId),e.modes&&e.modes.forEach(g))},_=function(e,t){!t||!e||r.files[e]||(r.files[e]={},a.loadModule(t,function(t){t&&(r.files[e]=t,!t.snippets&&t.snippetText&&(t.snippets=r.parseSnippetFile(t.snippetText)),r.register(t.snippets||[],t.scope),t.includeScopes&&(r.snippetMap[t.scope].includeScopes=t.includeScopes,t.includeScopes.forEach(function(e){g(`ace/mode/`+e)})))}))},v=function(e){var t=e.editor,n=t.completer&&t.completer.activated;if(e.command.name===`backspace`)n&&!s.getCompletionPrefix(t)&&t.completer.detach();else if(e.command.name===`insertstring`&&!n){y=e;var r=e.editor.$liveAutocompletionDelay;r?b.delay(r):x(e)}},y,b=o.delayedCall(function(){x(y)},0),x=function(e){var t=e.editor,n=s.getCompletionPrefix(t),r=e.args,a=s.triggerAutocomplete(t,r);if(n&&n.length>=t.$liveAutocompletionThreshold||a){var o=i.for(t);o.autoShown=!0,o.showPopup(t)}},S=e(`../editor`).Editor;e(`../config`).defineOptions(S.prototype,`editor`,{enableBasicAutocompletion:{set:function(e){e?(i.for(this),this.completers||=Array.isArray(e)?e:p,this.commands.addCommand(i.startCommand)):this.commands.removeCommand(i.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers||=Array.isArray(e)?e:p,this.commands.on(`afterExec`,v)):this.commands.off(`afterExec`,v)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(e){e?(this.commands.addCommand(m),this.on(`changeMode`,h),h(null,this)):(this.commands.removeCommand(m),this.off(`changeMode`,h))},value:!1}}),t.MarkerGroup=c}),(function(){ace.require([`ace/ext/language_tools`],function(n){typeof t==`object`&&typeof e==`object`&&t&&(t.exports=n)})})()}));g(),_C(),vC(),yC(),bC(),xC(),SC();var CC={jsonError:{border:`1px solid red`,minHeight:200},jsonNoError:{border:`1px solid #00000000`,minHeight:200}};function wC(e){return _.createElement(gC,{style:e.error===!0?CC.jsonError:e.error===!1?CC.jsonNoError:void 0,mode:e.mode||`json`,width:`100%`,height:`100%`,showPrintMargin:e.editValueMode,showGutter:e.editValueMode,highlightActiveLine:e.editValueMode,defaultValue:e.defaultValue,theme:e.themeType===`dark`?`clouds_midnight`:`chrome`,value:e.value,readOnly:!e.onChange,onChange:t=>{var n;return(n=e.onChange)==null?void 0:n.call(e,t)},name:e.name||`UNIQUE_ID_OF_DIV1`,fontSize:e.fontSize||14,setOptions:{enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,enableSnippets:!0,showLineNumbers:e.editValueMode,tabSize:e.editValueMode?2:void 0},editorProps:{$blockScrolling:!0}})}g();var TC={fullWidth:{width:`100%`},flex:{display:`flex`},button:{height:48,minWidth:48},wrapper:{width:`calc(100vw - 40px)`,height:`calc(100vh - 188px)`}},EC=class extends X{async componentDidMount(){await super.componentDidMount();let{data:e,attr:t}=this.props,n=X.getValue(e,t)||`{}`;this.setState({value:n,initialized:!0,jsonError:this.validateJson(n)})}validateJson(e){let t=!1;if(this.props.schema.validateJson!==!1&&(e||!this.props.schema.allowEmpty))try{this.props.schema.json5?Ts.default.parse(e):JSON.parse(e)}catch(e){console.log(`Error in JSON`,e),t=!0}return t}renderItem(e,t){if(!this.state.initialized)return null;let{schema:n,data:r,attr:i}=this.props,{value:a,showSelectId:o}=this.state,s=n.readOnly===!0||t;return _.createElement(Wt,{fullWidth:!0,variant:`standard`},_.createElement(`div`,{style:TC.flex},_.createElement(xt,{color:`grey`,style:TC.button,size:`small`,variant:`outlined`,onClick:()=>this.setState({showSelectId:!0})},J.t(`jc_JSON editor`))),o?_.createElement(rS,{title:this.getText(n.label),overflowHidden:!0,applyDisabled:this.state.jsonError&&this.props.schema.doNotApplyWithError||s,onClose:()=>{s?this.setState({showSelectId:!1}):this.setState({showSelectId:!1,value:X.getValue(r,i)||{}})},onApply:s?void 0:()=>this.setState({showSelectId:!1},()=>i&&this.onChange(i,a))},_.createElement(`div`,{style:{...TC.wrapper,border:this.state.jsonError?`2px solid red`:`2px solid transparent`}},_.createElement(wC,{mode:this.props.schema.json5?`json5`:`json`,value:typeof a==`object`?JSON.stringify(a):a,onChange:s?void 0:e=>this.setState({value:e,jsonError:this.validateJson(e)}),name:`ConfigJsonEditor`,themeType:this.props.oContext.themeType}))):null,n.help||this.state.jsonError?_.createElement(_n,null,this.state.jsonError?J.t(`jc_Invalid JSON`):this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var DC=[{value:`en`,label:`English`},{value:`de`,label:`Deutsch`},{value:`ru`,label:`русский`},{value:`pt`,label:`Portugues`},{value:`nl`,label:`Nederlands`},{value:`fr`,label:`français`},{value:`it`,label:`Italiano`},{value:`es`,label:`Espanol`},{value:`pl`,label:`Polski`},{value:`uk`,label:`Український`},{value:`zh-cn`,label:`简体中文`}],OC=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr),t=[...DC];this.props.schema.system?t.unshift({value:``,label:J.t(`jc_System language`)}):t.unshift({value:``,label:J.t(`jc_none`)}),this.setState({value:this.props.schema.system?e||``:e||J.getLanguage(),selectOptions:t})}renderItem(e,t){var n,r;if(!this.state.selectOptions)return null;let i=(n=this.state.selectOptions)==null?void 0:n.find(e=>e.value===this.state.value||!e.value&&!this.state.value);return _.createElement(Wt,{fullWidth:!0,variant:`standard`},this.props.schema.label?_.createElement(rr,null,this.getText(this.props.schema.label)):null,_.createElement(Me,{variant:`standard`,error:!!e,disabled:t,value:this.state.value||`_`,renderValue:()=>this.getText(i==null?void 0:i.label,this.props.schema.noTranslation),onChange:e=>{let{value:t}=e.target;t===`_`&&(t=``),this.setState({value:t},()=>{if(this.props.attr){let e=this.onChange(this.props.attr,t);e instanceof Promise&&e.catch(e=>console.error(e))}if(this.props.schema.changeGuiLanguage)if(t){var e,n;if(t===J.getLanguage())return;J.setLanguage(t),(e=(n=this.props.oContext).changeLanguage)==null||e.call(n)}else this.props.oContext.socket.getSystemConfig().then(e=>{if(e.common.language!==J.getLanguage()&&e.common.language){var t,n;J.setLanguage(e.common.language),(t=(n=this.props.oContext).changeLanguage)==null||t.call(n)}}).catch(e=>console.error(`Cannot read system config: ${e}`))})}},(r=this.state.selectOptions)==null?void 0:r.map(e=>_.createElement(z,{key:e.value,value:e.value},e.label))),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var kC=class extends X{constructor(e){super(e),K(this,`scrollRef`,void 0),this.scrollRef=_.createRef()}scrolledDown(){return this.scrollRef.current?this.scrollRef.current.offsetHeight+this.scrollRef.current.scrollTop>=this.scrollRef.current.scrollHeight:!1}async componentDidMount(){await super.componentDidMount(),X.getValue(this.props.data,this.props.attr)||(this.props.schema.licenseUrl?(this.setState({showLicenseDialog:!0,loading:!0,scrolledDown:!1}),fetch(this.props.schema.licenseUrl).then(e=>e.text()).then(e=>this.setState({license:e,loading:!1})).catch(e=>this.setState({license:e.toString(),loading:!1,error:!0,scrolledDown:!1}))):this.setState({showLicenseDialog:!0,scrolledDown:!1}),setTimeout(()=>{this.scrollRef.current&&(this.scrolledDown()?this.setState({scrolledDown:!0}):this.scrollRef.current.addEventListener(`scroll`,()=>{!this.state.scrolledDown&&this.scrolledDown()&&this.setState({scrolledDown:!0})}))},1e3))}renderItem(e,t){return this.state.showLicenseDialog?_.createElement(nn,{maxWidth:`lg`,open:!0,onClose:(e,t)=>{t!==`escapeKeyDown`&&t!==`backdropClick`&&this.setState({showLicenseDialog:!1})}},_.createElement(Nt,null,this.props.schema.title?J.t(this.props.schema.title):J.t(`jc_License agreement`)),_.createElement(Tn,null,this.props.schema.licenseUrl?_.createElement(_.Fragment,null,this.state.loading?_.createElement(Ze,null):null,_.createElement(`pre`,{ref:this.scrollRef,style:{width:`100%`,height:`100%`,overflowY:`auto`,fontSize:14}},this.state.license)):null,!this.props.schema.licenseUrl&&this.props.schema.texts?_.createElement(`div`,{ref:this.scrollRef,style:{width:`100%`,height:`100%`,overflowY:`auto`,fontSize:14}},this.props.schema.texts.map((e,t)=>this.props.schema.noTranslation?_.createElement(`p`,{key:t},e):_.createElement(`p`,{key:t},J.t(e)))):null),_.createElement(Et,null,this.props.schema.checkBox?_.createElement(kn,{control:_.createElement(O,{disabled:t,checked:!!this.state.licenseChecked,onClick:()=>this.setState({licenseChecked:!this.state.licenseChecked})}),label:J.t(this.props.schema.checkBox)}):null,_.createElement(xt,{disabled:t||this.state.loading||this.state.error||this.props.schema.checkBox&&!this.state.licenseChecked||!this.state.scrolledDown,onClick:()=>{if(this.setState({showLicenseDialog:!1}),this.props.attr){let e=this.onChange(this.props.attr,!0);e instanceof Promise&&e.catch(e=>console.error(`Cannot set value: ${e}`))}},color:`primary`,variant:`contained`,startIcon:_.createElement(on,null)},this.props.schema.agreeText?J.t(this.props.schema.agreeText):J.t(`jc_Accept license`)),_.createElement(xt,{onClick:()=>{this.setState({showLicenseDialog:!1}),setTimeout(()=>this.setState({showLicenseDialog:!0}),2e3)},color:`grey`,variant:`contained`,startIcon:_.createElement(De,null)},J.t(`jc_Close`)))):null}};g();var AC={indeterminate:{opacity:.5},control:{flexDirection:`row`,width:`100%`}},jC=class extends X{constructor(...e){super(...e),K(this,`updateTimeout`,void 0)}async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);if(e??=``,Array.isArray(e)&&this.props.oContext.multiEdit){e=X.DIFFERENT_VALUE,this.setState({_value:e,oldValue:e});return}this.setState({_value:e.toString(),oldValue:e.toString()})}static getDerivedStateFromProps(e,t){if(e.schema.min!==void 0&&e.schema.min<0||e.schema.max!==void 0&&e.schema.max<0)return null;let n=X.getValue(e.data,e.attr);return e.oContext.multiEdit&&t._value===X.DIFFERENT_VALUE?{_value:X.DIFFERENT_VALUE}:n==null||t.oldValue===null||t.oldValue===void 0||n.toString()!==parseFloat(t._value).toString()&&n.toString()!==t.oldValue.toString()?{_value:n}:null}checkValue(e){if(e==null||(e=e.toString().trim().replace(`,`,`.`),e===`-`))return null;let t=e===``?0:parseFloat(e);return e!==``&&Number.isNaN(t)?`jc_Not a number`:e!==``&&window.isFinite(t)?this.props.schema.min!==void 0&&t<this.props.schema.min?`jc_Too small`:this.props.schema.max!==void 0&&t>this.props.schema.max?`jc_Too big`:e===``||e===`-`||Number.isNaN(t)?`jc_Not a number`:null:`jc_Not a number`}renderItem(e,t){var n;let r=Array.isArray(this.state._value)||this.state._value===X.DIFFERENT_VALUE;if(this.state.oldValue!==null&&this.state.oldValue!==void 0?(this.updateTimeout&&clearTimeout(this.updateTimeout),this.updateTimeout=setTimeout(()=>{this.updateTimeout=void 0,this.setState({oldValue:null})},30)):this.updateTimeout&&=(clearTimeout(this.updateTimeout),void 0),r){let n=X.getValue(this.props.data,this.props.attr),r=(n==null?void 0:n.filter(e=>e||e===0).map(e=>({label:e.toString(),value:e})))||[];return r.unshift({label:J.t(X.DIFFERENT_LABEL),value:X.DIFFERENT_VALUE}),_.createElement(un,{style:AC.indeterminate,fullWidth:!0,freeSolo:!0,value:r[0],getOptionSelected:(e,t)=>e.label===t.label,onChange:(e,t)=>{if(this.props.attr){let e=this.onChange(this.props.attr,t==null?void 0:t.value,()=>{this.setState({_value:t==null?void 0:t.value,oldValue:this.state._value})});e instanceof Promise&&e.catch(e=>console.error(e))}},options:r,getOptionLabel:e=>e.label,renderInput:n=>_.createElement(ot,{...n,label:this.getText(this.props.schema.label),variant:`standard`,slotProps:{...n.slotProps,htmlInput:{...n.slotProps.htmlInput,readOnly:this.props.schema.readOnly||!1},input:{...n.slotProps.input,endAdornment:this.props.schema.unit?_.createElement(_.Fragment,null,this.getText(this.props.schema.unit,this.props.schema.noTranslation),n.slotProps.input.endAdornment):n.slotProps.input.endAdornment}},error:!!e,placeholder:this.getText(this.props.schema.placeholder),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation),disabled:!!t})})}!e&&this.state._value!==null&&this.state._value!==void 0&&this.state._value&&(e=this.checkValue(this.state._value),e&&=J.t(e));let i=parseFloat(((n=this.state._value)==null?void 0:n.toString().replace(`,`,`.`))||``);return _.createElement(Wt,{variant:`standard`,style:AC.control},_.createElement(ot,{sx:{"& .up-down":{display:`none`},"&:hover .up-down":{display:`block`}},variant:`standard`,type:Number.isNaN(i)?`text`:this.props.schema.min!==void 0&&this.props.schema.min>=0?`number`:`text`,fullWidth:!0,slotProps:{htmlInput:{min:this.props.schema.min,max:this.props.schema.max,step:this.props.schema.step,readOnly:this.props.schema.readOnly||!1},input:{endAdornment:this.props.schema.unit?this.getText(this.props.schema.unit,this.props.schema.noTranslation):null}},value:this.state._value??``,error:!!e,disabled:!!t,onChange:e=>{let t=e.target.value,n=this.checkValue(t);n?this.onError(this.props.attr,J.t(n)):this.onError(this.props.attr),this.setState({_value:t,oldValue:this.state._value},()=>{let e=parseFloat(t.toString().replace(`,`,`.`));Number.isNaN(e)?this.onChange(this.props.attr,t.toString().replace(`,`,`.`)):this.onChange(this.props.attr,e)})},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:e&&typeof e==`string`?e:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)}))}};g();var MC=class extends X{constructor(e){super(e),K(this,`authWindow`,void 0),K(this,`oid`,void 0),K(this,`url`,void 0),K(this,`onTokensUpdated`,(e,t)=>{if(t!=null&&t.val){let e=JSON.parse(t.val);if(new Date(e.access_token_expires_on).getTime()>Date.now()){this.state.accessTokens!==t.val&&this.setState({accessTokens:t.val});return}}this.setState({accessTokens:``})}),K(this,`onMessage`,e=>{if(e.origin===`https://oauth2.iobroker.in`&&(typeof e.data==`string`&&e.data.startsWith(`${this.props.schema.identifier}-authentication:`)||typeof e.message==`string`&&e.message.startsWith(`${this.props.schema.identifier}-authentication:`))){let i=(e.data||e.message).split(`:`);if(i[1]===`success`){var t;this.setState({accessTokens:i[2],success:!0,pressed:!1},()=>this.saveToken(this.state.accessTokens)),(t=this.authWindow)==null||t.postMessage(`close`,e.origin),this.authWindow=null}else{var n,r;(n=(r=this.props).onError)==null||n.call(r,i[2])}}}),this.state={...this.state,accessTokens:``,success:!1,blocked:!1,running:!1,pressed:!1,clientId:``,clientSecret:``,accessTokenError:``},this.url=`https://oauth2.iobroker.in/${e.schema.identifier}?redirect=true`,e.schema.scope&&(this.url+=`&scope=${encodeURIComponent(e.schema.scope)}`),this.oid=`${this.props.oContext.adapterName}.${this.props.oContext.instance}.${this.props.schema.saveTokenIn||`oauth2Tokens`}`}async componentDidMount(){await super.componentDidMount(),window.addEventListener?window.addEventListener(`message`,this.onMessage,!1):window.attachEvent(`onmessage`,this.onMessage,!1),await this.props.oContext.socket.subscribeState(this.oid,this.onTokensUpdated);let e;this.props.schema.ownClientId&&(e={clientId:X.getValue(this.props.data,this.props.schema.ownClientId)}),this.props.schema.ownClientId&&(e||={},e.clientSecret=X.getValue(this.props.data,this.props.schema.ownClientSecret));let t=await this.props.oContext.socket.getState(this.oid);if(t){let n=JSON.parse(t.val);new Date(n.access_token_expires_on).getTime()>Date.now()&&(e||={},e.accessTokens=t.val)}e&&this.setState(e)}componentWillUnmount(){super.componentWillUnmount(),window.removeEventListener?window.removeEventListener(`message`,this.onMessage,!1):window.detachEvent(`onmessage`,this.onMessage,!1),this.props.oContext.socket.unsubscribeState(this.oid,this.onTokensUpdated)}saveToken(e){try{e&&!e.startsWith(`{`)&&(e=atob(e));let t=JSON.parse(e);t.access_token&&t.refresh_token&&t.expires_in&&(t.access_token_expires_on||=new Date(Date.now()+t.expires_in*1e3).toISOString(),this.props.schema.ownClientId&&(t.client_id=X.getValue(this.props.data,this.props.schema.ownClientId)),this.props.oContext.socket.setState(this.oid,JSON.stringify(t),!0).catch(e=>console.log(`Error occurred: ${e.toString()}`)))}catch(e){console.warn(e)}}onOpenUrl(){this.authWindow=window.open(this.url+(this.props.schema.ownClientId?`&client_id=${encodeURIComponent(this.state.clientId)}&client_secret=${encodeURIComponent(this.state.clientSecret)}`:``),this.props.schema.identifier),!this.authWindow||this.authWindow.closed||this.authWindow.closed===void 0?this.setState({blocked:!0}):this.setState({pressed:!0})}renderItem(e,t){let n=``;if(this.state.accessTokens)try{let e=JSON.parse(this.state.accessTokens);n=new Date(e.access_token_expires_on).toLocaleString()}catch{}let r;r=this.state.accessTokens?this.props.schema.refreshLabel?this.getText(this.props.schema.refreshLabel):J.t(`jc_Renew %s access`,this.props.schema.identifier[0].toUpperCase()+this.props.schema.identifier.slice(1)):this.props.schema.label?this.getText(this.props.schema.label):J.t(`jc_Get %s access`,this.props.schema.identifier[0].toUpperCase()+this.props.schema.identifier.slice(1));let i=this.getIcon();return _.createElement(`div`,{style:{width:`100%`,margin:`0 0 1rem 0`}},this.props.schema.ownClientId?_.createElement(ot,{value:this.state.clientId,onChange:e=>{let t=e.target.value;this.setState({clientId:t},()=>this.onChange(this.props.schema.ownClientId,t))},style:{marginBottom:8},variant:`standard`,fullWidth:!0,error:!this.state.clientId,disabled:!!t,label:J.t(`jc_OAuth Client ID`),slotProps:{input:{endAdornment:this.state.clientId?_.createElement(Zn,{size:`small`,tabIndex:-1,onClick:()=>this.setState({clientId:``},()=>this.onChange(this.props.schema.ownClientId,``))},_.createElement(De,null)):null}}}):null,this.props.schema.ownClientSecret?_.createElement(ot,{value:this.state.clientSecret,onChange:e=>{let t=e.target.value;this.setState({clientSecret:t},()=>this.onChange(this.props.schema.ownClientSecret,t))},style:{marginBottom:8},variant:`standard`,fullWidth:!0,error:!this.state.clientSecret,disabled:!!t,label:J.t(`jc_OAuth Client secret`),slotProps:{input:{endAdornment:this.state.clientSecret?_.createElement(Zn,{size:`small`,tabIndex:-1,onClick:()=>this.setState({clientSecret:``},()=>this.onChange(this.props.schema.ownClientSecret,``))},_.createElement(De,null)):null}}}):null,_.createElement(xt,{disabled:this.state.running||!!(this.props.schema.ownClientSecret&&!this.state.clientSecret)||!!(this.props.schema.ownClientId&&!this.state.clientId),endIcon:i||_.createElement(je,null),variant:`contained`,onClick:()=>this.onOpenUrl()},r),this.state.blocked?_.createElement(`div`,{style:{color:`red`,fontSize:16,marginTop:20}},J.t(`jc_Please allow popups in your browser for this page!`)):null,this.state.accessTokens?_.createElement(`div`,{style:{color:`green`,fontSize:16,marginTop:20}},this.props.alive?J.t(`jc_Successfully authorized. Token valid till %s and will be automatically renewed.`,n):J.t(`jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.`,n)):null,this.state.pressed?_.createElement(_.Fragment,null,_.createElement(`div`,{style:{width:`100%`,margin:`1rem 0 1rem 0`}},_.createElement(`span`,{style:{marginRight:4}},`${J.t(`jc_If the button above does not work, you can authorize manually this app by visiting this url`)}`,`:`),_.createElement(`br`,null),_.createElement(`a`,{target:this.props.schema.identifier,href:this.url,rel:`noreferrer`},this.url)),_.createElement(ot,{value:this.state.accessTokens,label:J.t(`jc_Enter the code from that page here`),variant:`standard`,error:!!this.state.accessTokenError,helperText:this.state.accessTokenError||``,onChange:e=>{let t=e.target.value;try{t!=null&&t.trim()&&!t.trim().startsWith(`{`)&&(t=atob(t.trim()))}catch{this.setState({accessTokenError:`Invalid access token. Cannot decode from base64`})}if(t!=null&&t.startsWith(`{`))try{let e=JSON.parse(t);e.access_token&&(e.access_token_expires_on=new Date(Date.now()+(e.expires_in-10)*1e3).toISOString(),this.setState({accessTokens:JSON.stringify(e),accessTokenError:``},()=>this.saveToken(this.state.accessTokens)))}catch{this.setState({accessTokens:t,accessTokenError:`Invalid access token. Cannot parse JSON`})}else t&&this.setState({accessTokens:t,accessTokenError:`Invalid access token. Not JSON`})},fullWidth:!0})):null)}};g();var NC={flex:{display:`flex`},button:{maxHeight:48,marginLeft:4,minWidth:48}},PC=class extends X{constructor(...e){super(...e),K(this,`fillOnSelect`,[]),K(this,`onObjectChanged`,async(e,t)=>{if(await this.onChange(e,t),this.fillOnSelect.length)try{let e=t&&await this.getCachedObject(t);if(e){for(let t of this.fillOnSelect)if(t.overwrite||!X.getValue(this.props.data,t.attr)){let n=X.getValue(e,t.pathInObject);typeof n==`object`&&(n=this.getText(n,!0)),await this.onChange(t.attr,n)}}}catch(e){console.error(e.toString())}})}async componentDidMount(){await super.componentDidMount();let{data:e,attr:t}=this.props,n=X.getValue(e,t)||``;if(this.props.schema.fillOnSelect){let e=this.props.schema.fillOnSelect.split(`,`).map(e=>e.trim());for(let t of e){let e=t.split(`=>`);if(e.length===2){let t={pathInObject:e[0],attr:e[1]};(t.attr.includes(`(X)`)||t.attr.includes(`(x)`))&&(t.overwrite=!0,t.attr=t.attr.replace(/\(X\)|\(x\)/g,``)),this.fillOnSelect.push(t)}else console.error(`Invalid format for fillOnSelect: ${this.props.schema.fillOnSelect}`)}}this.setState({value:n,initialized:!0})}renderItem(e,t){if(!this.state.initialized)return null;let n=this.props.oContext.socket,{schema:r,attr:i}=this.props,{value:a,showSelectId:o}=this.state;return _.createElement(Wt,{fullWidth:!0,variant:`standard`},r.label?_.createElement(rr,{shrink:!0},this.getText(r.label)):null,_.createElement(`div`,{style:NC.flex},_.createElement(ot,{variant:`standard`,fullWidth:!0,value:a,error:!!e,disabled:t,placeholder:this.getText(r.placeholder),label:this.getText(r.label),helperText:this.renderHelp(r.help,r.helpLink,r.noTranslation),onChange:e=>{let t=Array.isArray(e.target.value)?e.target.value[0]:e.target.value;this.setState({value:t},()=>i&&void this.onObjectChanged(i,t))}}),_.createElement(xt,{color:`grey`,disabled:t,style:NC.button,size:`small`,variant:`outlined`,onClick:()=>this.setState({showSelectId:!0})},`...`)),o?_.createElement(wn,{imagePrefix:this.props.oContext.imagePrefix??`../..`,dialogName:`admin.${this.props.oContext.adapterName}`,filterFunc:r.filterFunc,themeType:this.props.oContext.themeType,theme:this.props.oContext.theme,types:r.types?Array.isArray(r.types)?r.types:[r.types]:void 0,customFilter:r.customFilter,filters:r.filters,socket:n,selected:a,root:r.root,onClose:()=>this.setState({showSelectId:!1}),onOk:e=>{let t=Array.isArray(e)?e[0]:e;this.setState({showSelectId:!1,value:t},()=>i&&void this.onObjectChanged(i,t))}}):null)}};g();var FC={fullWidth:{width:`100%`,display:`inline-block`},halfWidth1:{width:`calc(50% - 5px)`,display:`inline-block`,marginRight:8},halfWidth2:{width:`calc(50% - 5px)`,display:`inline-block`}},IC=`____ppp____`,LC=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);this.setState({_repeat:e?IC:``,_visible:!1,value:e?IC:``,_notEqual:!1})}onChangePassword(e,t){e===void 0&&(e=this.state.value),t===void 0&&(t=this.state._repeat);let n=!!this.props.schema.repeat&&t!==e;this.setState({value:e,_repeat:t,_notEqual:n},()=>{if(n)this.onError(this.props.attr,J.t(`jc_Passwords are not equal!`));else{this.onError(this.props.attr);let t=this.onChange(this.props.attr,e);t instanceof Promise&&t.catch(e=>this.onError(this.props.attr,e))}})}renderItem(e,t){if(this.state._notEqual===void 0)return null;let n=_.createElement(ot,{variant:`standard`,fullWidth:!0,type:this.state._visible&&this.state.value!==IC?`text`:`password`,value:this.state.value,error:!!e||this.state._notEqual,disabled:!!t,onChange:e=>this.onChangePassword(e.target.value),label:this.getText(this.props.schema.label),slotProps:{input:{autoComplete:`new-password`,endAdornment:this.state.value&&this.state.value!==IC&&this.props.schema.visible&&!t&&!this.props.schema.readOnly?_.createElement(At,{position:`end`},_.createElement(Zn,{size:`large`,tabIndex:-1,onClick:e=>{e.preventDefault(),e.stopPropagation(),this.setState({_visible:!this.state._visible})},edge:`end`},this.state._visible?_.createElement($n,null):_.createElement(I,null))):void 0},htmlInput:{autoComplete:`new-password`,form:{autoComplete:`off`},maxLength:this.props.schema.maxLength||this.props.schema.max||void 0,readOnly:this.props.schema.readOnly||!1}},helperText:this.state._notEqual?J.t(`jc_Passwords are not equal!`):this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)});if(this.props.schema.repeat&&!this.props.schema.readOnly){let r=this.state._visible?null:_.createElement(ot,{variant:`standard`,fullWidth:!0,type:`password`,value:this.state._repeat,error:!!e||this.state._notEqual,disabled:!!t,onChange:e=>this.onChangePassword(void 0,e.target.value),label:`${this.getText(this.props.schema.label)} (${J.t(`jc_repeat`)})`,slotProps:{input:{autoComplete:`new-password`},htmlInput:{autoComplete:`new-password`,form:{autoComplete:`off`},maxLength:this.props.schema.maxLength||this.props.schema.max||void 0}},helperText:this.state._notEqual?J.t(`jc_Passwords are not equal!`):this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)});return _.createElement(`div`,{style:FC.fullWidth},_.createElement(`div`,{style:FC.halfWidth1},n),_.createElement(`div`,{style:FC.halfWidth2},r))}return n}};g();var RC=class extends X{constructor(...e){super(...e),K(this,`checkTimeout`,null)}async componentDidMount(){await super.componentDidMount();let e=await this.getPatternAsync(this.props.schema.pattern,null,!0)??``;this.setState({pattern:e})}componentWillUnmount(){this.checkTimeout&&=(clearTimeout(this.checkTimeout),null),super.componentWillUnmount()}checkIfInstanceChanged(){this.checkTimeout&&clearTimeout(this.checkTimeout),this.checkTimeout=setTimeout(async()=>{this.checkTimeout=null;let e=await this.getPatternAsync(this.props.schema.pattern,null,!0)??``;e!==this.state.pattern&&this.setState({pattern:e})},200)}renderItem(e,t){return this.checkIfInstanceChanged(),_.createElement(ot,{variant:`standard`,fullWidth:!0,disabled:!!t,slotProps:{input:{endAdornment:this.props.schema.copyToClipboard?_.createElement(Zn,{tabIndex:-1,size:`small`,onClick:async()=>{Zt.copyToClipboard(await this.getPatternAsync(this.props.schema.pattern,null,this.props.schema.noTranslation)),window.alert(J.t(`jc_Copied`))}},_.createElement(St,null)):void 0}},value:this.state.pattern||``,label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}};g();var zC={warning:{"& .Mui-error":{color:`orange`}}},BC=class extends X{constructor(...e){super(...e),K(this,`updateTimeout`,void 0)}async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);e??=``,this.setState({_value:e.toString(),oldValue:e.toString()});let t=await this.props.oContext.socket.getAdapterInstances(),n=`system.adapter.${this.props.oContext.adapterName}.${this.props.oContext.instance}`,r=await this.getCachedObject(n),i=r==null?void 0:r.common.host,a=[];t.forEach(e=>{var t,r;if(!e||e._id===n||e.common.host!==i||!((t=e.native)!=null&&t.bind))return;if(e!=null&&e.native&&e.native.secure&&e.native.leEnabled&&e.native.leUpdate){let t=parseInt(e.native.leCheckPort||e.native.lePort,10);if(t){var o;a.push({name:`${e._id.replace(`system.adapter.`,``)} (LE)`,port:t,v6bind:e.native.bind.includes(`:`)?e.native.bind:e.native.v6bind,bind:e.native.bind,enabled:!!((o=e.common)!=null&&o.enabled)})}}let s=parseInt(e==null||(r=e.native)==null?void 0:r.port,10);if(s){var c;a.push({name:e._id.replace(`system.adapter.`,``),bind:e.native.bind,v6bind:e.native.bind.includes(`:`)?e.native.bind:e.native.v6bind,port:s,enabled:!!((c=e.common)!=null&&c.enabled)})}}),this.setState({ports:a})}static getDerivedStateFromProps(e,t){let n=X.getValue(e.data,e.attr);return n==null||t.oldValue===null||t.oldValue===void 0||n.toString()!==parseInt(t._value,10).toString()&&n.toString()!==t.oldValue.toString()?{_value:n}:null}checkValue(e){if(e==null)return null;let t=this.props.schema.min??20,n=this.props.schema.max||65535;e=e.toString().trim();let r=e===``?0:parseInt(e,10);return e!==``&&Number.isNaN(r)?`jc_Not a number`:e!==``&&window.isFinite(Number(e))?r<t?`jc_Too small`:r>n?`jc_Too big`:e===``||e===`-`||Number.isNaN(r)?`jc_Not a number`:null:`jc_Not a number`}renderItem(e,t){this.state.oldValue!==null&&this.state.oldValue!==void 0?(this.updateTimeout&&clearTimeout(this.updateTimeout),this.updateTimeout=setTimeout(()=>{this.updateTimeout=void 0,this.setState({oldValue:null})},30)):this.updateTimeout&&=(clearTimeout(this.updateTimeout),void 0);let n=this.props.schema.min??20,r=this.props.schema.max||65535,i;if(this.state.ports){let t=parseInt(this.state._value,10);if(t){let n=this.props.data.bind,r=this.state.ports.filter(e=>{if(e.port!==t)return!1;let r=e.bind,i=e.v6bind;return!n||!r||n===`0.0.0.0`||r===`0.0.0.0`||n===`::`||i===`::`||n===r||n===i}),a=r.findIndex(e=>e.port===t&&e.enabled);if(a!==-1){let n=this.state.ports.find(e=>e.port===t&&e.enabled&&r.some(t=>t.name===e.name&&t.bind===e.bind));e=J.t(`jc_Port is already used by %s`,(n==null?void 0:n.name)||r[a].name)}else if(a=r.findIndex(e=>e.port===t&&!e.enabled),a!==-1){i=!0;let n=this.state.ports.find(e=>e.port===t&&!e.enabled&&r.some(t=>t.name===e.name&&t.bind===e.bind));e=J.t(`jc_Port could be used by %s`,(n==null?void 0:n.name)||r[a].name)}}}return!e&&this.state._value!==null&&this.state._value!==void 0&&(e=this.checkValue(this.state._value),typeof e==`string`&&(e=J.t(e))),_.createElement(ot,{variant:`standard`,type:`number`,fullWidth:!0,slotProps:{htmlInput:{min:n,max:r,readOnly:this.props.schema.readOnly||!1}},value:this.state._value??``,error:!!e,disabled:!!t,sx:i?zC.warning:void 0,onChange:e=>{let t=Number(e.target.value.toString().replace(/[^0-9]/g,``)).toString(),n=this.checkValue(t);n?this.onError(this.props.attr,J.t(n)):this.onError(this.props.attr),this.setState({_value:t,oldValue:this.state._value},()=>{if(t.trim()===parseInt(t,10).toString()){let e=this.onChange(this.props.attr,parseInt(t,10)||0);e instanceof Promise&&e.catch(e=>{console.error(`Cannot set value for ${this.props.attr}: ${e}`)})}})},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:e&&typeof e==`string`?e:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}};g();var VC=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);this.props.oContext.socket.getEnums(`rooms`).then(t=>{let n=Object.keys(t).map(e=>({value:this.props.schema.short?e.replace(`enum.rooms.`,``):e,label:this.getText(t[e].common.name),obj:t[e]}));this.props.schema.allowDeactivate!==!1&&n.unshift({label:J.t(X.NONE_LABEL),value:X.NONE_VALUE}),this.setState({value:e,selectOptions:n})}).catch(e=>console.error(`Cannot get enums: ${e}`))}renderItem(e,t){if(!this.state.selectOptions)return null;let n=this.state.selectOptions.find(e=>e.value===this.state.value);return _.createElement(Wt,{variant:`standard`,fullWidth:!0},this.props.schema.label?_.createElement(rr,null,this.getText(this.props.schema.label)):null,_.createElement(Me,{variant:`standard`,error:!!e,disabled:!!t,value:this.state.value||`_`,renderValue:()=>n?n.obj?_.createElement(On,{value:n.obj,themeType:this.props.oContext.themeType,lang:J.getLanguage()}):n.label:``,onChange:e=>{this.setState({value:e.target.value===`_`?``:e.target.value},()=>this.onChange(this.props.attr,this.state.value))}},this.state.selectOptions.map(e=>_.createElement(z,{key:e.value,value:e.value,style:e.value===X.DIFFERENT_VALUE?{opacity:.5}:{}},e.obj?_.createElement(On,{value:e.obj,themeType:this.props.oContext.themeType,lang:J.getLanguage()}):e.label))),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var HC={fullWidth:{width:`100%`},noMargin:{"&>div":{marginTop:0}},icon:{width:20,height:20,marginRight:4}},UC=class extends X{constructor(...e){super(...e),K(this,`initialValue`,``)}async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);this.props.schema.multiple&&(typeof e==`string`?e=[e]:e??=[]);let t=[];for(let e of this.props.schema.options||[]){let n=e;if(Array.isArray(n.items)){t.push({label:this.getText(e.label,this.props.schema.noTranslation),value:e.value,group:!0,hidden:n.hidden,color:e.color,description:this.getText(e.description)});for(let e of n.items)t.push({label:this.getText(e.label,this.props.schema.noTranslation||e.noTranslation),value:e.value,inGroup:!0,hidden:e.hidden,color:e.color,description:this.getText(e.description),icon:e.icon})}else t.push({label:this.getText(e.label,this.props.schema.noTranslation||e.noTranslation),value:e.value,hidden:e.hidden,color:e.color,description:this.getText(e.description),icon:e.icon})}if(this.props.onFilterLabelUpdate&&this.props.table&&this.props.attr){let e={};for(let n of t)!n.group&&n.value!==X.DIFFERENT_VALUE&&(e[n.value.toString()]=n.label);this.props.onFilterLabelUpdate(this.props.attr,e)}let n=Array.isArray(e)&&!this.props.schema.multiple;n&&(this.initialValue=[...e],t.unshift({label:J.t(X.DIFFERENT_LABEL),value:X.DIFFERENT_VALUE})),await this.evaluateHidden(t),n?this.setState({value:X.DIFFERENT_VALUE,selectOptions:t}):this.setState({value:e,selectOptions:t})}async evaluateHidden(e){let t=!1,n=!1;for(let r of e){let e=await this.isHidden(r);r.group?n=e:r.inGroup?e||=n:n=!1,r.hiddenValue!==e&&(r.hiddenValue=e,t=!0)}return t}async componentDidUpdate(e){if(e.data===this.props.data||!this.state.selectOptions||!this.state.selectOptions.some(e=>typeof e.hidden==`string`))return;let t=this.state.selectOptions.map(e=>({...e}));await this.evaluateHidden(t)&&this.setState({selectOptions:t})}_getValue(){let e=this.state.value===null||this.state.value===void 0?X.getValue(this.props.data,this.props.attr):this.state.value;return this.props.schema.multiple&&(typeof e==`string`?e=[e]:e??=[]),e}async isHidden(e){return e.hidden?this.props.custom?!!await this.executeCustom(e.hidden,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData):!!await this.execute(e.hidden,this.props.schema.default,this.props.data,this.props.arrayIndex,this.props.globalData):!1}renderRadio(e,t){var n;let r=(n=this.state.selectOptions)==null?void 0:n.filter(e=>!e.hiddenValue&&!e.group),i=this._getValue();return _.createElement(Wt,{fullWidth:!0,error:!!e,disabled:!!t,id:`jsonSelect_${this.props.attr}_${this.props.index||this.props.index===0?this.props.index:``}`},this.props.schema.label?_.createElement(Qt,null,this.getText(this.props.schema.label)):null,_.createElement(Oe,{row:!!this.props.schema.horizontal,value:i==null?``:i.toString(),onChange:e=>{let t=r==null?void 0:r.find(t=>t.value.toString()===e.target.value),n=t?t.value:e.target.value;this.setState({value:n},()=>{let e=this.onChange(this.props.attr,n);e instanceof Promise&&e.catch(e=>console.error(e))})}},r==null?void 0:r.map((e,t)=>_.createElement(kn,{key:t,value:e.value.toString(),control:_.createElement(sn,null),title:e.description||``,label:_.createElement(`span`,{style:{display:`flex`,alignItems:`center`}},e.icon?_.createElement(Mt,{src:e.icon,style:HC.icon}):null,_.createElement(Pn,{component:`span`,style:{color:e.color}},e.label)),style:e.value===X.DIFFERENT_VALUE?{opacity:.5}:{}}))),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}renderItem(e,t){if(!this.state.selectOptions)return null;if(this.props.schema.format===`radio`)return this.renderRadio(e,t);let n=this.state.selectOptions.filter(e=>!e.hiddenValue),r=this._getValue(),i=this.props.schema.multiple?null:n.find(e=>e.value==r);return _.createElement(Wt,{variant:`standard`,fullWidth:!0,sx:this.props.table===void 0?void 0:HC.noMargin,id:`jsonSelect_${this.props.attr}_${this.props.index||this.props.index===0?this.props.index:``}`},this.props.schema.label?_.createElement(rr,null,this.getText(this.props.schema.label)):null,_.createElement(Me,{variant:`standard`,error:!!e,multiple:this.props.schema.multiple,disabled:!!t,value:r||`_`,renderValue:e=>this.props.schema.multiple?_.createElement(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:.5}},e.map(e=>{let t=n.find(t=>t.value===e);if(t||this.props.schema.showAllValues!==!1){let n=(t==null?void 0:t.label)||e;return _.createElement(Bt,{key:e,label:n})}return null})):i!=null&&i.color?_.createElement(`span`,{style:{display:`flex`,alignItems:`center`}},i.icon?_.createElement(Mt,{src:i.icon,style:HC.icon}):null,_.createElement(`span`,null,_.createElement(`div`,{style:{color:i.color}},i.label??e),i.description?_.createElement(`div`,{style:{opacity:.7,fontStyle:`italic`,fontSize:`smaller`}},i.description):null)):(i==null?void 0:i.label)===void 0?i!=null&&i.icon?_.createElement(`span`,{style:{display:`flex`,alignItems:`center`}},_.createElement(Mt,{src:i.icon,style:HC.icon}),e):e:_.createElement(`span`,{style:{display:`flex`,alignItems:`center`}},i.icon?_.createElement(Mt,{src:i.icon,style:HC.icon}):null,_.createElement(`span`,null,_.createElement(`div`,null,i.label),i.description?_.createElement(`div`,{style:{opacity:.7,fontStyle:`italic`,fontSize:`smaller`}},i.description):null)),onChange:e=>{this.setState({value:e.target.value===`_`?``:e.target.value},()=>{let e;e=this.state.value===X.DIFFERENT_VALUE?this.onChange(this.props.attr,this.initialValue):this.onChange(this.props.attr,this.state.value),e instanceof Promise&&e.catch(e=>console.error(e))})}},n.map((e,t)=>e.group?_.createElement(tt,{key:t,style:{color:e.color}},_.createElement(`div`,null,e.label),e.description?_.createElement(`div`,{style:{opacity:.7,fontStyle:`italic`,fontSize:`smaller`}},e.description):null):_.createElement(z,{key:t,value:e.value,style:e.value===X.DIFFERENT_VALUE?{opacity:.5}:{}},this.props.schema.multiple?_.createElement(O,{checked:r.includes(e.value),onClick:()=>{let t=JSON.parse(JSON.stringify(this._getValue())),n=r.indexOf(e.value);n===-1?(t.push(e.value),t.sort()):t.splice(n,1),this.setState({value:t},()=>this.onChange(this.props.attr,t))}}):null,e.icon?_.createElement(Mt,{src:e.icon,style:HC.icon}):null,_.createElement(er,{primary:e.label,secondary:e.description,slotProps:{secondary:{style:{fontSize:`smaller`,fontStyle:`italic`,opacity:.7}}},style:{color:e.color}})))),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var WC={menuPaper:{maxHeight:800}},GC=class extends X{constructor(...e){super(...e),K(this,`initialized`,!1),K(this,`localContext`,void 0)}async askInstance(){if(this.props.alive){let e=this.props.schema.data;if(e===void 0&&this.props.schema.jsonData){let t=await this.getPatternAsync(this.props.schema.jsonData,null,!0);try{e=JSON.parse(t)}catch{console.error(`Cannot parse json data: ${t}`)}}e??=null,this.setState({running:!0},async()=>{let t=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(t!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){let e=await this.props.oContext.socket.getState(`system.adapter.${t}.alive`);if(!(e!=null&&e.val)){window.alert(J.t(`jc_Instance %s is not alive`,t));return}}try{let n=await this.props.oContext.socket.sendTo(t,this.props.schema.command||`send`,e);this.reportFilterLabels(n);for(let e of n)e.hiddenValue=await this.isHidden(e);this.setState({list:n,running:!1})}catch(e){console.error(`Cannot send command: ${e}`)}})}else{let e=X.getValue(this.props.data,this.props.attr);this.setState({value:e,running:!1})}}reportFilterLabels(e){if(this.props.onFilterLabelUpdate&&this.props.table&&Array.isArray(e)&&this.props.attr){let t={};for(let n of e)n.value!==X.DIFFERENT_VALUE&&(t[n.value]=n.label);this.props.onFilterLabelUpdate(this.props.attr,t)}}getContext(){let e={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(t=>e[t]=X.getValue(this.props.data,t)),JSON.stringify(e)}_getValue(){let e=this.state.value==null?X.getValue(this.props.data,this.props.attr):this.state.value;return this.props.schema.multiple&&(typeof e==`string`?e=[e]:e??=[]),e}async isHidden(e){return e.hidden?this.props.custom?!!await this.executeCustom(e.hidden,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.arrayIndex,this.props.globalData):!!await this.execute(e.hidden,this.props.schema.default,this.props.data,this.props.arrayIndex,this.props.globalData):!1}renderItem(e,t){var n;if(this.props.alive){let e=this.getContext();(e!==this.localContext||!this.initialized)&&(this.localContext=e,setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}let r=this._getValue();if(!this.props.alive||!this.state.running&&!Array.isArray(this.state.list))return this.props.schema.multiple||this.props.schema.manual===!1?J.t(`jc_Cannot retrieve options, as instance is offline`):_.createElement(ot,{variant:`standard`,fullWidth:!0,value:r,error:!!e,disabled:!!t,onChange:e=>{let t=e.target.value;this.setState({value:t},()=>this.onChange(this.props.attr,(t||``).trim()))},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation),slotProps:{input:{endAdornment:this.state.value&&!this.props.schema.noClearButton?_.createElement(At,{position:`end`},_.createElement(Zn,{tabIndex:-1,size:`small`,onClick:()=>this.setState({value:``},()=>this.onChange(this.props.attr,``))},_.createElement(De,null))):null}}});if(this.state.running)return _.createElement(Wn,{size:`24`});let i=(n=this.state.list)==null?void 0:n.filter(e=>!e.hiddenValue),a=i==null?void 0:i.find(e=>e.value===r);return _.createElement(Wt,{variant:`standard`,fullWidth:!0},this.props.schema.label?_.createElement(rr,null,this.getText(this.props.schema.label)):null,_.createElement(Me,{variant:`standard`,error:!!e,multiple:this.props.schema.multiple,disabled:!!t,sx:this.props.schema.multiple?{"&.MuiSelect-paper":WC.menuPaper}:void 0,value:r||``,renderValue:e=>this.props.schema.multiple?_.createElement(vt,{sx:{display:`flex`,flexWrap:`wrap`,gap:.5}},e.map(e=>{let t=i==null?void 0:i.find(t=>t.value===e);if(t||this.props.schema.showAllValues!==!1){let n=(t==null?void 0:t.label)||e;return _.createElement(Bt,{key:e,label:n})}return null})):this.getText((a==null?void 0:a.label)||e,this.props.schema.noTranslation),onChange:e=>{let t=this.onChange(this.props.attr,e.target.value);t instanceof Promise&&t.catch(e=>console.error(`Cannot set value: ${e}`))}},i==null?void 0:i.map((e,t)=>e.group?_.createElement(tt,{key:t},_.createElement(`div`,null,this.getText(e.label,this.props.schema.noTranslation)),e.description?_.createElement(`div`,{style:{opacity:.7,fontStyle:`italic`,fontSize:`smaller`}},this.getText(e.description)):null):_.createElement(z,{key:t,value:e.value},this.props.schema.multiple?_.createElement(O,{checked:r==null?void 0:r.includes(e.value.toString()),onClick:()=>{let t=JSON.parse(JSON.stringify(this._getValue())),n=r==null?void 0:r.indexOf(e.value.toString());n===-1?(t.push(e.value),t.sort()):t.splice(n,1),this.setState({value:t},()=>this.onChange(this.props.attr,t))}}):null,_.createElement(er,{primary:this.getText(e.label),secondary:this.getText(e.description),slotProps:{secondary:{style:{fontSize:`smaller`,fontStyle:`italic`,opacity:.7}}}})))),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var KC={fullWidth:{width:`100%`}};function qC(e){return e.split(`.`).reduce((e,t)=>(e<<8)+parseInt(t,10),0)>>>0}function JC(e,t){var n;let r=e==null||(n=e.native)==null||(n=n.hardware)==null?void 0:n.networkInterfaces;if(!r)return null;let i;return Object.keys(r).forEach(e=>r[e].forEach(e=>{e.internal||t.includes(`:`)&&e.family!==`IPv6`||t.includes(`.`)&&!t.match(/[^.\d]/)&&e.family!==`IPv4`||(e.family===`IPv4`&&!e.address.startsWith(`172`)&&(t===`127.0.0.0`||t===`localhost`||t.match(/[^.\d]/))?i=e.address:i||=(e.family===`IPv4`&&t.includes(`.`)&&(qC(t)&qC(e.netmask),qC(e.address)&qC(e.netmask)),e.address))})),i||Object.keys(r).forEach(e=>r[e].forEach(e=>{e.internal||t.includes(`:`)&&e.family!==`IPv6`||t.includes(`.`)&&!t.match(/[^.\d]/)&&e.family!==`IPv4`||(e.family===`IPv6`&&(t===`127.0.0.0`||t===`localhost`||t.match(/[^.\d]/))?i=e.address:i||=(e.family===`IPv4`&&t.includes(`.`)&&(qC(t)&qC(e.netmask),qC(e.address)&qC(e.netmask)),e.address))})),i||Object.keys(r).forEach(e=>{r[e].forEach(e=>{e.internal||t.includes(`:`)&&e.family!==`IPv6`||t.includes(`.`)&&!t.match(/[^.\d]/)&&e.family!==`IPv4`||(i=(t===`127.0.0.0`||t===`localhost`||t.match(/[^.\d]/),e.address))})}),i||Object.keys(r).forEach(e=>{r[e].forEach(e=>{e.internal||(i=e.address)})}),i||null}var YC=class extends X{async componentDidMount(){await super.componentDidMount();let e=window.location.hostname;if(this.props.schema.openUrl){let n=await this.props.oContext.socket.getCurrentInstance(),r=await this.getCachedObject(`system.adapter.${n}`);if(r){var t;let n=await this.getCachedObject(`system.host.${r==null||(t=r.common)==null?void 0:t.host}`);if(n){let t=JC(n,window.location.hostname);if(t)e=`${t}:${window.location.port}`;else{console.warn(`Cannot find suitable IP in host ${r.common.host} for ${r._id}`);return}}}}await new Promise(t=>{this.setState({_error:``,_message:``,hostname:e},t)}),this.props.schema.onLoaded&&this._onClick().catch(e=>console.error(e))}renderErrorDialog(){return this.state._error?_.createElement(tn,{text:this.state._error,onClose:()=>this.setState({_error:``})}):null}renderMessageDialog(){return this.state._message?_.createElement(Tt,{text:this.state._message,onClose:()=>this.setState({_message:``})}):null}renderCopyDialog(){return this.state._copyDialog?_.createElement(rS,{title:this.getText(this.state._copyDialog.title||J.t(`jc_Result`)),overflowHidden:!0,onClose:()=>{this.setState({_copyDialog:null})},onApply:()=>{qt(this.state._copyDialog.text),window.alert(J.t(`jc_Copied`)),this.setState({_copyDialog:null})},titleButtonApply:J.t(`jc_Copy content`)},_.createElement(`div`,{style:{width:`calc(100vw - 40px)`,height:`calc(100vh - 188px)`}},_.createElement(wC,{mode:this.state._copyDialog.type,value:this.state._copyDialog.text,name:`CopyDialog`,themeType:this.props.oContext.themeType}))):null}async _onClick(){this.props.oContext.onCommandRunning(!0),this.setState({running:!0});let e=`${window.location.protocol}//${window.location.host}${window.location.pathname.replace(/\/index\.html$/,``)}`,t=`${window.location.protocol}//${this.state.hostname.split(`:`).length>3?`[${this.state.hostname}]`:this.state.hostname}${window.location.pathname.replace(/\/index\.html$/,``)}`,n=this.props.schema.data;if(n===void 0&&this.props.schema.jsonData){let r=await this.getPatternAsync(this.props.schema.jsonData,{_origin:e,_originIp:t,...this.props.data},!0);try{n=JSON.parse(r)}catch{console.error(`Cannot parse json data: ${r}`)}}n??=null,this.props.schema.openUrl&&!n&&(n={_origin:e,_originIp:t});let r;this.props.schema.timeout&&(r=setTimeout(()=>{this.props.oContext.onCommandRunning(!1),this.setState({_error:J.t(`jc_Request timed out`),running:!1})},parseInt(this.props.schema.timeout,10)||1e4));let i=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(i!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){let e=await this.props.oContext.socket.getState(`system.adapter.${i}.alive`);if(!(e!=null&&e.val)){window.alert(J.t(`jc_Instance %s is not alive`,i));return}}this.props.oContext.socket.sendTo(i,this.props.schema.command||`send`,n).then(async e=>{if(r&&=(clearTimeout(r),void 0),e!=null&&e.error){var t;if((t=this.props.schema.error)!=null&&t[e.error]){var n;let t=this.getText(this.props.schema.error[e.error]);(n=e.args)==null||n.forEach(e=>t=t.replace(`%s`,e)),this.setState({_error:t})}else this.setState({_error:e.error?typeof e.error==`string`?J.t(e.error):JSON.stringify(e.error):J.t(`jc_Error`)})}else{var i;if(e!=null&&e.command){var a,o;(a=(o=this.props.oContext).onBackEndCommand)==null||a.call(o,e.command);return}if(e!=null&&e.reloadBrowser&&this.props.schema.reloadBrowser)window.location.reload();else if(e!=null&&e.openUrl&&this.props.schema.openUrl)window.open(e.openUrl,e.window||this.props.schema.window||`_blank`);else if(e!=null&&e.result&&(i=this.props.schema.result)!=null&&i[e.result]){var s;let t=this.getText(this.props.schema.result[e.result]);(s=e.args)==null||s.forEach(e=>t=t.replace(`%s`,e)),window.alert(t)}if(e!=null&&e.native&&this.props.schema.useNative){for(let[t,n]of Object.entries(e.native))await this.onChangeAsync(t,n);setTimeout(()=>this.props.oContext.forceUpdate(Object.keys(e.native),this.props.data),300)}else e!=null&&e.result?window.alert(typeof e.result==`object`?JSON.stringify(e.result):e.result):e!=null&&e.copyDialog?this.setState({_copyDialog:e.copyDialog}):window.alert(J.t(`jc_Ok`));e!=null&&e.saveConfig&&this.props.onChange(void 0,null,void 0,!0)}}).catch(e=>{this.props.schema.error&&this.props.schema.error[e.toString()]?this.setState({_error:this.getText(this.props.schema.error[e.toString()])}):this.setState({_error:J.t(e.toString())||J.t(`jc_Error`)})}).then(()=>{this.props.oContext.onCommandRunning(!1),this.setState({running:!1})})}renderDialogConfirm(){if(!this.state.confirmDialog)return null;let e=this.state.confirmData||this.props.schema.confirm;if(!e)throw Error(`Confirm dialog requested but no confirm data provided`);let t=null;return e.type===`warning`?t=_.createElement(et,null):e.type===`error`?t=_.createElement(ur,null):e.type===`info`&&(t=_.createElement(E,null)),_.createElement(bn,{title:this.getText(e.title)||J.t(`jc_Please confirm`),text:this.getText(e.text),ok:this.getText(e.ok)||J.t(`jc_Ok`),cancel:this.getText(e.cancel)||J.t(`jc_Cancel`),icon:t||void 0,onClose:e=>this.setState({confirmDialog:!1},()=>e&&this._onClick())})}renderItem(e,t){let n=this.getIcon();return _.createElement(`div`,{style:KC.fullWidth},_.createElement(xt,{variant:this.props.schema.variant||void 0,color:this.props.schema.color||`grey`,style:{...KC.fullWidth,...this.props.schema.controlStyle||void 0},disabled:t||!this.props.alive,startIcon:n,title:this.props.alive?this.getText(this.props.schema.title)||``:J.t(`jc_Instance %s is not alive`,this.props.oContext.instance.toString()),onClick:()=>{this.props.schema.confirm?this.setState({confirmDialog:!0}):this._onClick().catch(e=>console.error(e))}},this.props.schema.showProcess&&this.state.running?_.createElement(Wn,{size:20,style:{marginRight:8}}):null,this.getText(this.props.schema.label,this.props.schema.noTranslation)),this.renderErrorDialog(),this.renderMessageDialog(),this.renderCopyDialog())}};g();var XC={fullWidth:{width:`100%`}},ZC=class extends X{async _onClick(){let e=this.props.schema.val;if(typeof e==`string`&&e.includes("${")){var t,n;e=await this.getPatternAsync(e,null,!0);let r=await this.getCachedObject(this.props.schema.id);(r==null||(t=r.common)==null?void 0:t.type)===`number`?e=parseFloat(e):(r==null||(n=r.common)==null?void 0:n.type)===`boolean`&&(e=e===`true`||e===!0||e===`1`||e===1)}let r=(this.props.schema.id||``).replace(/%INSTANCE%/g,(this.props.oContext.instance||0).toString());try{await this.props.oContext.socket.setState(r,{val:e,ack:!!this.props.schema.ack}),this.props.schema.okText&&window.alert(this.getText(this.props.schema.okText))}catch(e){this.props.schema.error&&this.props.schema.error[e.toString()]?window.alert(this.getText(this.props.schema.error[e.toString()])):window.alert(J.t(e.toString())||J.t(`jc_Error`))}}renderDialogConfirm(){if(!this.state.confirmDialog)return null;let e=this.state.confirmData||this.props.schema.confirm;if(!e)return null;let t;return e.type===`warning`?t=_.createElement(et,null):e.type===`error`?t=_.createElement(ur,null):e.type===`info`&&(t=_.createElement(E,null)),_.createElement(bn,{title:this.getText(e.title)||J.t(`jc_Please confirm`),text:this.getText(e.text),ok:this.getText(e.ok)||J.t(`jc_Ok`),cancel:this.getText(e.cancel)||J.t(`jc_Cancel`),icon:t,onClose:e=>this.setState({confirmDialog:!1},()=>e&&this._onClick())})}renderItem(e,t){let n=this.getIcon();return _.createElement(xt,{variant:this.props.schema.variant||void 0,color:this.props.schema.color||`grey`,style:XC.fullWidth,disabled:t,onClick:async()=>{this.props.schema.confirm?this.setState({confirmDialog:!0}):await this._onClick()},startIcon:n||void 0},this.getText(this.props.schema.label,this.props.schema.noTranslation))}};g();var QC={fullWidth:{width:`100%`},slider:{marginLeft:10,marginRight:10,width:`calc(100% - 20px)`}},$C=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);this.setState({_value:e})}static getDerivedStateFromProps(e,t){if(e.schema.min!==void 0&&e.schema.min<0||e.schema.max!==void 0&&e.schema.max<0)return null;let n=X.getValue(e.data,e.attr);return n==null||n.toString()!==parseFloat(t._value).toString()?{_value:n}:null}renderItem(e,t){let n=this.props.schema.min||0,r=this.props.schema.max||100,i=this.props.schema.unit?this.getText(this.props.schema.unit,this.props.schema.noTranslation):``,a=[{value:n,label:n+i},{value:r,label:r+i}];return _.createElement(vt,{style:QC.fullWidth},this.props.schema.label?_.createElement(Pn,{gutterBottom:!0},this.getText(this.props.schema.label)):null,_.createElement(Be,{style:QC.slider,value:this.state._value,getAriaValueText:e=>e+i,step:this.props.schema.step||(r-n)/100,valueLabelDisplay:`auto`,marks:a,min:n,max:r,disabled:!!t,onChange:e=>{let t=e.target.value;this.setState({_value:t},()=>this.onChange(this.props.attr,t))}}),this.props.schema.help?_.createElement(Pn,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();function ew(e,t){return e===`edit`||e===`rename`?_.createElement(Ke,{style:t}):e===`delete`?_.createElement(me,{style:t}):e===`refresh`?_.createElement(ar,{style:t}):e===`newDevice`||e===`new`||e===`add`?_.createElement(re,{style:t}):e===`discover`||e===`search`?_.createElement(tr,{style:t}):e===`unpairDevice`||e===`unpair`?_.createElement(an,{style:t}):e===`pairDevice`||e===`pair`?_.createElement(Rn,{style:t}):e===`identify`?_.createElement(Kt,{style:t}):e===`play`?_.createElement(Xt,{style:t}):e===`stop`?_.createElement(M,{style:t}):e===`pause`?_.createElement(yn,{style:t}):e===`forward`||e===`next`?_.createElement(st,{style:t}):e===`rewind`||e===`previous`?_.createElement(de,{style:t}):e===`lamp`||e===`light`?_.createElement(Cn,{style:t}):e===`backlight`?_.createElement(ve,{style:t}):e===`dimmer`?_.createElement(ie,{style:t}):e===`socket`?_.createElement(wt,{style:t}):e===`settings`?_.createElement(V,{style:t}):e===`users`||e===`group`?_.createElement(pt,{style:t}):e===`user`?_.createElement(en,{style:t}):e===`qrcode`?_.createElement(jt,{style:t}):e===`connection`?_.createElement(ne,{style:t}):e===`no-connection`?_.createElement(Fe,{style:t}):e===`visible`?_.createElement(I,{style:t}):null}g();function tw(e,t){return typeof t==`string`?{"@keyframes newStateAnimationOnceColor":{"0%":{color:t},"100%":{color:e.palette.mode===`dark`?`#fff`:`#000`}},animation:`newStateAnimationOnceColor 2s ease-in-out`}:{"@keyframes newStateAnimationOnce":{"0%":{color:`#00f900`},"80%":{color:e.palette.mode===`dark`?`#518851`:`#008000`},"100%":{color:e.palette.mode===`dark`?`#fff`:`#000`}},animation:`newStateAnimationOnce 2s ease-in-out`}}var nw=class extends X{constructor(...e){super(...e),K(this,`controlTimeout`,null),K(this,`delayedUpdate`,{timer:null,value:null}),K(this,`onStateChanged`,(e,t)=>{let n=t?t.val:null;this.state.controlType===`button`||this.state.controlType===`switch`?(n=!!n,this.state.stateValue!==n&&this.setState({stateValue:n})):n!==null&&(this.state.controlType===`slider`||this.state.controlType===`number`)?(n=parseFloat(n),console.log(`${Date.now()} Received new value: ${n}`),n===this.state.stateValue?this.delayedUpdate.timer&&(clearTimeout(this.delayedUpdate.timer),this.delayedUpdate.timer=null):(this.delayedUpdate.timer&&(clearTimeout(this.delayedUpdate.timer),this.delayedUpdate.timer=null),this.delayedUpdate.value=n,this.delayedUpdate.timer=setTimeout(()=>{this.setState({stateValue:this.delayedUpdate.value})},500))):(this.state.stateValue===null||this.state.stateValue===void 0?null:this.state.stateValue.toString())!==(n==null?null:n.toString())&&this.setState({stateValue:n})})}async getObjectID(){let e=(this.props.schema.oid||``).toString();return e.includes("${")&&(e=await this.getPatternAsync(e,null,!0)),this.props.schema.foreign?e:`${this.props.schema.system?`system.adapter.`:``}${this.props.oContext.adapterName}.${this.props.oContext.instance||0}.${e}`}async componentDidMount(){var e;await super.componentDidMount();let t=await this.getObjectID(),n=await this.getCachedObject(t);if(n!=null&&(e=n.common)!=null&&e.states&&!this.props.schema.options){var r;if(Array.isArray(n==null||(r=n.common)==null?void 0:r.states)){let e={};n.common.states.forEach((t,n)=>{e[n.toString()]=t}),n.common.states=e}Object.keys(n.common.states).length||(n.common.states=void 0)}let i=this.props.schema.control||this.detectType(n);try{let e=await this.props.oContext.socket.getState(t);this.setState({stateValue:e?e.val:null,controlType:i,obj:n,objId:t},async()=>{let e=await this.getObjectID();await this.props.oContext.socket.subscribeState(e,this.onStateChanged)})}catch(e){console.error(`Cannot get state ${t}: ${e}`),this.setState({controlType:i,obj:n,objId:t})}}componentWillUnmount(){super.componentWillUnmount(),this.state.objId&&this.props.oContext.socket.unsubscribeState(this.state.objId,this.onStateChanged),this.delayedUpdate.timer&&(clearTimeout(this.delayedUpdate.timer),this.delayedUpdate.timer=null),this.controlTimeout&&(clearTimeout(this.controlTimeout),this.controlTimeout=null,this.state.objId&&this.props.oContext.socket.setState(this.state.objId,this.state.stateValue??null,!1).catch(e=>console.error(`Cannot control value: ${e.toString()}`)))}detectType(e){if(e||={},e.common||={},e.common.type===`boolean`){if(this.props.schema.controlled!==!1){if(e.common.read===!1||this.props.schema.controlled===!0)return`button`;if(e.common.write||this.props.schema.controlled===!0)return`switch`}return`text`}return e.common.type===`number`&&this.props.schema.controlled!==!1?e.common.write||this.props.schema.controlled===!0?e.common.states||this.props.schema.options?`select`:e.common.max===void 0?`input`:`slider`:`text`:e.common.write&&this.props.schema.controlled!==!1?e.common.states||this.props.schema.options?`select`:`input`:`text`}getNormalizedStates(){var e;let t;return this.props.schema.options?t=this.props.schema.options.map(e=>typeof e==`string`?{value:e,label:this.getText(e,this.props.schema.noTranslation)}:{value:e.value,label:this.getText(e.label,this.props.schema.noTranslation),color:e.color}):(e=this.state.obj)!=null&&e.common.states?(t=[],Object.keys(this.state.obj.common.states).forEach(e=>{t.push({value:e,label:this.getText(this.state.obj.common.states[e],this.props.schema.noTranslation)})})):t=[],t}renderItem(e,t){var n;if(!this.state.obj)return null;let r;if(this.state.controlType===`select`||!this.state.controlType&&(this.state.obj.common.type===`number`||this.state.obj.common.type===`string`)&&this.state.obj.common.write!==!1&&(this.props.schema.options||this.state.obj.common.states)){let e=this.getNormalizedStates(),n=e.find(e=>e.value===this.state.stateValue);r=_.createElement(Wt,{fullWidth:!0},_.createElement(rr,null,this.getText(this.props.schema.label)),_.createElement(Me,{value:this.state.stateValue??``,disabled:!!this.props.schema.readOnly||t,onChange:e=>{this.setState({stateValue:e.target.value},()=>{var e;let t=this.state.stateValue;((e=this.state.obj)==null?void 0:e.common.type)===`number`&&(t=parseFloat(t.toString().replace(`,`,`.`))),this.state.objId&&this.props.oContext.socket.setState(this.state.objId,t,!1)})},renderValue:e=>n!=null&&n.color?_.createElement(`div`,{style:{color:n.color}},n.label):e},e.map(e=>_.createElement(z,{key:(e.value??``).toString(),value:e.value,style:{color:e.color}},`$`,e.label))))}else if(this.state.controlType===`button`||!this.state.controlType&&this.state.obj.common.type===`boolean`&&(this.state.obj.common.write&&this.state.obj.common.read===!1||(n=this.state.obj.common.role)!=null&&n.includes(`button`))){let e=null;this.props.schema.falseImage&&(e=ew(this.props.schema.falseImage));let n=this.getText(this.props.schema.falseText||this.props.schema.label,this.props.schema.noTranslation);r=!n&&e?_.createElement(Zn,{style:this.props.schema.falseTextStyle,disabled:!!this.props.schema.readOnly,onClick:async()=>{this.props.schema.confirm?this.setState({confirmDialog:!0,confirmCallback:async e=>{e&&this.state.objId&&await this.props.oContext.socket.setState(this.state.objId,this.props.schema.buttonValue===void 0||this.props.schema.buttonValue,!1)}}):this.state.objId&&await this.props.oContext.socket.setState(this.state.objId,this.props.schema.buttonValue===void 0||this.props.schema.buttonValue,!1)}},e):_.createElement(xt,{variant:this.props.schema.variant||`contained`,startIcon:e,style:this.props.schema.falseTextStyle,disabled:t||!!this.props.schema.readOnly,onClick:async()=>{this.props.schema.confirm?this.setState({confirmDialog:!0,confirmCallback:async e=>{e&&this.state.objId&&await this.props.oContext.socket.setState(this.state.objId,this.props.schema.buttonValue===void 0||this.props.schema.buttonValue,!1)}}):this.state.objId&&await this.props.oContext.socket.setState(this.state.objId,this.props.schema.buttonValue===void 0||this.props.schema.buttonValue,!1)}},n||(this.state.objId||``).split(`.`).pop())}else if(this.state.controlType===`input`||!this.state.controlType&&this.state.obj.common.write&&this.state.obj.common.type===`string`)r=_.createElement(`div`,{style:{width:`100%`,display:`flex`,flexDirection:`row`,gap:8,alignItems:`baseline`}},_.createElement(ot,{style:{flex:1},value:this.state.stateValue,variant:`standard`,disabled:!!this.props.schema.readOnly||t,slotProps:{input:{endAdornment:this.getText(this.props.schema.unit,this.props.schema.noTranslation)||this.state.obj.common.unit||void 0},htmlInput:{readOnly:!!this.props.schema.readOnly}},onKeyUp:e=>{this.props.schema.setOnEnterKey&&e.key===`Enter`&&this.state.objId&&this.props.oContext.socket.setState(this.state.objId,this.state.stateValue??null,!1)},onChange:e=>{this.setState({stateValue:e.target.value},()=>{this.props.schema.setOnEnterKey||this.props.schema.showEnterButton||(this.controlTimeout&&clearTimeout(this.controlTimeout),this.controlTimeout=setTimeout(async()=>{var e;this.controlTimeout=null;let t=this.state.stateValue;((e=this.state.obj)==null?void 0:e.common.type)===`number`&&(t=parseFloat(t.toString().replace(`,`,`.`))),this.state.objId&&await this.props.oContext.socket.setState(this.state.objId,t,!1)},this.props.schema.controlDelay||0))})},label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)}),this.props.schema.showEnterButton&&!this.props.schema.readOnly&&_.createElement(xt,{variant:`outlined`,disabled:t,onClick:()=>{this.state.objId&&this.props.oContext.socket.setState(this.state.objId,this.state.stateValue??null,!1)}},this.getText(typeof this.props.schema.showEnterButton==`string`?this.props.schema.showEnterButton:`Set`)));else{var i,a,o,s;let e;this.props.schema.size===`normal`?e=16:this.props.schema.size===`large`?e=20:typeof this.props.schema.size==`number`&&(e=this.props.schema.size);let n=this.getText(this.props.schema.label,this.props.schema.noTranslation),c={display:`flex`,alignItems:`center`,fontSize:e||`1rem`,gap:8};this.props.schema.narrow||(c.width=`100%`,c.justifyContent=`space-between`),n.trim()&&!n.trim().endsWith(`:`)&&this.props.schema.addColon&&(n=`${n.trim()}:`);let l;this.props.schema.blinkOnUpdate&&(l=tw(this.props.oContext.theme,this.props.schema.blinkOnUpdate));let u;this.props.schema.labelIcon&&(u=_.createElement(Mt,{src:this.props.schema.labelIcon,style:{marginRight:4}}));let d;if(n&&u?d=_.createElement(`div`,{style:{whiteSpace:`nowrap`}},u,n):n?d=_.createElement(`div`,{style:{whiteSpace:`nowrap`}},n):u&&(d=u),this.state.controlType===`switch`||!this.state.controlType&&this.state.obj.common.type===`boolean`&&(this.state.obj.common.write&&this.state.obj.common.read!==!1||(i=this.state.obj.common.role)!=null&&i.includes(`switch`))){let e=null,n=this.getText(this.props.schema.falseText,this.props.schema.noTranslation);this.props.schema.falseImage&&(e=ew(this.props.schema.falseImage,n?{marginLeft:8}:void 0));let i=null,a=this.getText(this.props.schema.trueText,this.props.schema.noTranslation);this.props.schema.trueImage&&(i=ew(this.props.schema.trueImage,a?{marginRight:8}:void 0)),r=_.createElement(Pe,{checked:!!this.state.stateValue,disabled:!!this.props.schema.readOnly||t,onChange:async()=>{this.props.schema.confirm?this.setState({confirmDialog:!0,confirmCallback:async e=>{e&&this.state.objId&&await this.props.oContext.socket.setState(this.state.objId,!this.state.stateValue,!1)}}):this.state.objId&&await this.props.oContext.socket.setState(this.state.objId,!this.state.stateValue,!1)}}),(n||e||a||i)&&(r=_.createElement(`div`,{style:{display:`flex`,alignItems:`center`,fontSize:14}},_.createElement(`span`,{style:this.props.schema.falseTextStyle},n,e),r,_.createElement(`span`,{style:this.props.schema.trueTextStyle},i,a))),d&&(r=_.createElement(`div`,{style:c},d,r))}else if(this.state.controlType===`slider`||!this.state.controlType&&this.state.obj.common.type===`number`&&(this.state.obj.common.write&&(this.state.obj.common.max!==void 0||this.state.obj.common.unit===`%`)||(a=this.state.obj.common.role)!=null&&a.includes(`slider`)||(o=this.state.obj.common.role)!=null&&o.includes(`dimmer`)||(s=this.state.obj.common.role)!=null&&s.includes(`blind`))){let e=null,n=this.getText(this.props.schema.falseText,this.props.schema.noTranslation);this.props.schema.falseImage&&(e=ew(this.props.schema.falseImage,n?{marginLeft:8}:void 0));let i=null,a=this.getText(this.props.schema.trueText,this.props.schema.noTranslation);this.props.schema.trueImage&&(i=ew(this.props.schema.trueImage,a?{marginRight:8}:void 0));let o=this.props.schema.min??(this.state.obj.common.min||0),s=this.props.schema.max??this.state.obj.common.max??100,l=this.props.schema.step??(this.state.obj.common.step||1);r=_.createElement(Be,{style:{width:`100%`,flexGrow:1},min:o,max:s,disabled:!!this.props.schema.readOnly||t,step:l,value:this.state.stateValue,valueLabelDisplay:`auto`,valueLabelFormat:e=>{var t;let n=this.props.schema.digits===void 0?e.toString():e.toFixed(this.props.schema.digits);return this.props.oContext.isFloatComma&&(n=n.replace(`.`,`,`)),`${n}${this.getText(this.props.schema.unit,this.props.schema.noTranslation)||((t=this.state.obj)==null?void 0:t.common.unit)||``}`},onChange:(e,t)=>{Array.isArray(t)&&(t=t[0]),this.setState({stateValue:t},()=>{this.controlTimeout&&clearTimeout(this.controlTimeout),this.controlTimeout=setTimeout(async()=>{console.log(`${Date.now()} Send new value: ${this.state.stateValue}`),this.controlTimeout=null,this.state.objId&&await this.props.oContext.socket.setState(this.state.objId,this.state.stateValue??null,!1)},this.props.schema.controlDelay||0)})}}),(n||e||a||i)&&(r=_.createElement(`div`,{style:{display:`flex`,width:`100%`,flexGrow:1,alignItems:`center`}},_.createElement(`span`,{style:{marginRight:16,...this.props.schema.falseTextStyle}},n,e),r,_.createElement(`span`,{style:{marginLeft:16,...this.props.schema.trueTextStyle}},i,a))),d&&(r=_.createElement(`div`,{style:c},d,r))}else if(this.state.obj.common.type===`number`&&this.state.obj.common.write&&!this.state.controlType){let e=this.props.schema.min??this.state.obj.common.min??void 0,n=this.props.schema.max??this.state.obj.common.max??void 0,i=this.props.schema.step??this.state.obj.common.step??void 0;r=_.createElement(ot,{variant:`standard`,style:{width:`100%`},value:this.state.stateValue,type:`number`,disabled:!!this.props.schema.readOnly||t,slotProps:{htmlInput:{min:e,max:n,step:i,readOnly:!!this.props.schema.readOnly},input:{endAdornment:this.getText(this.props.schema.unit,this.props.schema.noTranslation)||this.state.obj.common.unit||void 0}},onChange:e=>{this.setState({stateValue:e.target.value},()=>{this.controlTimeout&&clearTimeout(this.controlTimeout),this.controlTimeout=setTimeout(async()=>{if(this.controlTimeout=null,this.state.objId){let e=parseFloat(this.state.stateValue);await this.props.oContext.socket.setState(this.state.objId,e,!1)}},this.props.schema.controlDelay||0)})},label:this.getText(this.props.schema.label,this.props.schema.noTranslation),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}else if(this.state.obj.common.type===`boolean`){let e=null,t,n;this.state.stateValue?(t=this.getText(this.props.schema.trueText,this.props.schema.noTranslation),this.props.schema.trueImage&&(e=ew(this.props.schema.falseImage,t?{marginRight:8}:void 0)),n=this.props.schema.trueTextStyle):(t=this.getText(this.props.schema.falseText,this.props.schema.noTranslation),this.props.schema.falseImage&&(e=ew(this.props.schema.falseImage,t?{marginLeft:8}:void 0)),n=this.props.schema.falseTextStyle),n=Object.assign(c,n),r=_.createElement(`div`,{style:n},d,_.createElement(vt,{style:{display:`flex`,alignItems:`center`,gap:8},sx:l,key:this.props.schema.blinkOnUpdate?t:void 0},e,t||(this.state.stateValue?J.t(`jc_true`):J.t(`jc_false`))))}else{let e=this.getText(this.props.schema.unit,this.props.schema.noTranslation)||this.state.obj.common.unit,t=this.state.stateValue;if(t!=null&&(this.props.schema.options||this.state.obj.common.states)){let e=this.getNormalizedStates().find(e=>e.value.toString()===t.toString());e&&(t=e.label)}let n,i;this.state.controlType===`html`?(i=(t??``).toString(),n=_.createElement(`span`,{dangerouslySetInnerHTML:{__html:t}})):this.state.stateValue===null?(n=`null`,i=n):this.state.stateValue===void 0?(n=`undefined`,i=n):(this.props.schema.digits!==void 0&&typeof t==`number`?(n=t.toFixed(this.props.schema.digits),this.props.oContext.isFloatComma&&(n=n.replace(`.`,`,`))):n=(t??``).toString(),i=n),r=_.createElement(`div`,{style:c},d,_.createElement(`div`,{style:{display:`flex`,alignItems:`baseline`,gap:4}},_.createElement(vt,{sx:l,key:this.props.schema.blinkOnUpdate?i:void 0},n),e?_.createElement(`span`,{style:{opacity:.7,fontSize:`smaller`}},e):null))}}return r}};g();var rw={fullWidth:e=>({width:`100%`,backgroundColor:e.palette.mode===`dark`?`#FFF`:`#000`,borderStyle:`hidden`}),primary:e=>({backgroundColor:e.palette.primary.main}),secondary:e=>({backgroundColor:e.palette.secondary.main})},iw=class extends X{renderItem(){return _.createElement(vt,{component:`hr`,sx:Zt.getStyle(this.props.oContext.theme,rw.fullWidth,this.props.schema.color===`primary`?rw.primary:this.props.schema.color===`secondary`?rw.secondary:{backgroundColor:this.props.schema.color||(this.props.oContext.themeType===`dark`?`#333`:`#ddd`)},{height:this.props.schema.color?this.props.schema.height||2:this.props.schema.height||1})})}};g();var aw={header:e=>({width:`100%`,background:e.palette.primary.main,color:e.palette.primary.contrastText,padding:`4px !important`,borderRadius:`3px`,marginBlockEnd:0,marginBlockStart:0})},ow=class extends X{renderItem(){let e=`h5`;switch((this.props.schema.size||5).toString()){case`1`:e=`h1`;break;case`2`:e=`h2`;break;case`3`:e=`h3`;break;case`4`:e=`h4`;break;default:e=`h5`}return _.createElement(vt,{component:e,sx:aw.header},this.getText(this.props.schema.label||this.props.schema.text,this.props.schema.noTranslation))}};g();var sw=class extends X{getSrc(){let e=this.props.schema.src;return e&&!e.startsWith(`.`)&&!e.startsWith(`http`)&&!e.startsWith(`adapter/${this.props.oContext.adapterName}/`)&&!e.startsWith(`./adapter/${this.props.oContext.adapterName}/`)&&(e=`${this.props.oContext.imagePrefix}/adapter/${this.props.oContext.adapterName}/${e}`),e}renderItem(){let{schema:e}=this.props,t=this.getSrc();if(e.showInDialog){let n=e.showInDialogSmallSize||100,r=e.showInDialogButtonLabel?this.getText(e.showInDialogButtonLabel):``;return _.createElement(_.Fragment,null,_.createElement(Ce,{title:J.t(`jc_Click to see in full size`)},_.createElement(`img`,{src:t,style:{cursor:`pointer`,width:`auto`,height:n,objectFit:`contain`},alt:``,onClick:()=>this.setState({showDialog:!0})})),` `,r?_.createElement(xt,{variant:`outlined`,color:`grey`,onClick:()=>this.setState({showDialog:!0})},r):null,this.state.showDialog?_.createElement(nn,{open:!0,onClose:()=>this.setState({showDialog:!1}),maxWidth:`lg`},_.createElement(Tn,null,_.createElement(Mt,{src:t,style:{width:`100%`,height:`100%`,objectFit:`contain`}})),_.createElement(Et,null,_.createElement(xt,{variant:`contained`,onClick:()=>this.setState({showDialog:!1}),color:`primary`},J.t(`jc_Close`)))):null)}return _.createElement(`img`,{src:t,style:{cursor:e.href?`pointer`:void 0,width:`100%`,height:`100%`},onClick:e.href?()=>e.href&&window.open(e.href,`_blank`):void 0,alt:``})}};g();function cw(e,t,n){return typeof n==`string`?{"@keyframes newValueAnimationOnceColor":{"0%":{color:t?`${n} !important`:n},"100%":{color:e.palette.mode===`dark`?t?`#fff !important`:`#fff`:t?`#000 !important`:`#000`}},animation:`newValueAnimationOnceColor 2s ease-in-out`}:{"@keyframes newValueAnimationOnce":{"0%":{color:t?`#00f900 !important`:`#00f900`},"80%":{color:e.palette.mode===`dark`?t?`#518851 !important`:`#518851`:t?`#008000 !important`:`#008000`},"100%":{color:e.palette.mode===`dark`?t?`#fff !important`:`#fff`:t?`#000 !important`:`#000`}},animation:`newValueAnimationOnce 2s ease-in-out`}}function lw(e,t){return typeof t==`string`?{"@keyframes blinkAnimationColor":{"0%":{color:t},"100%":{color:e.palette.mode===`dark`?`#fff`:`#000`}},animation:`blinkAnimationColor 2s ease-in-out infinite`}:{"@keyframes blinkAnimation":{"0%":{color:`#00f900`},"80%":{color:e.palette.mode===`dark`?`#518851`:`#008000`},"100%":{color:e.palette.mode===`dark`?`#fff`:`#000`}},animation:`blinkAnimation 2s ease-in-out infinite`}}var uw={label:{fontWeight:`bold`,whiteSpace:`nowrap`},valueImage:{maxHeight:`100%`},valueAndUnit:{display:`flex`,gap:4,alignItems:`baseline`},value:{},unit:{fontSize:`smaller`,opacity:.7}},dw=class extends X{renderItem(e){let t=this.getText(this.props.schema.text||this.props.schema.label,this.props.schema.noTranslation);this.props.schema.addColon&&typeof t==`string`&&!t.trim().endsWith(`:`)&&(t=`${t.trim()}:`),t&&(t.includes(`<a `)||t.includes(`<br`)||t.includes(`<b>`)||t.includes(`<i>`))&&(t=Zt.renderTextWithA(t));let n;this.props.schema.size===`normal`?n=16:this.props.schema.size===`large`?n=20:typeof this.props.schema.size==`number`&&(n=this.props.schema.size);let r={width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,position:`relative`,fontSize:n};this.props.schema.narrow?r.gap=8:r.justifyContent=`space-between`;let i,a;this.props.schema.data&&typeof this.props.schema.data==`object`&&this.props.schema.data.en?a=this.getText(this.props.schema.data):typeof this.props.schema.data==`object`||this.props.schema.data===void 0||this.props.schema.data===null?a=JSON.stringify(this.props.schema.data):typeof this.props.schema.data==`number`?(a=this.props.schema.data.toString(),this.props.oContext.isFloatComma&&(a=a.replace(`.`,`,`))):a=this.props.schema.data.toString();let o=!1;if(this.props.schema.booleanAsCheckbox&&typeof this.props.schema.data==`boolean`)i=_.createElement(O,{checked:this.props.schema.data,disabled:!0,size:this.props.schema.size===`small`?`small`:this.props.schema.size===`large`?`large`:void 0});else if(a.startsWith(`data:image/`))i=_.createElement(`div`,{style:{...uw.value,...uw.valueImage,...this.props.schema.styleValue||void 0}},_.createElement(Mt,{src:a}));else{let e={...uw.value,...this.props.schema.styleValue||void 0};this.props.schema.html?i=_.createElement(`div`,{style:e,dangerouslySetInnerHTML:{__html:a}}):Array.isArray(this.props.schema.data)?(o=!0,i=_.createElement(`div`,{style:e},this.props.schema.data.map((e,t)=>_.createElement(`div`,{key:t},typeof e==`object`||e==null?JSON.stringify(e):e)))):a.includes(`
|
|
1386
|
+
`)?(o=!0,i=_.createElement(`div`,{style:e},Zt.renderTextWithA(a))):i=_.createElement(`div`,{style:e},a)}if(this.props.schema.blinkOnUpdate&&this.props.schema.blink){let e=cw(this.props.oContext.theme,!0,this.props.schema.blinkOnUpdate),t=lw(this.props.oContext.theme,this.props.schema.blink);i=_.createElement(vt,{key:a,sx:{...e,...t}},i)}else if(this.props.schema.blinkOnUpdate){let e=cw(this.props.oContext.theme,!1,this.props.schema.blinkOnUpdate);i=_.createElement(vt,{key:a,sx:e},i)}else if(this.props.schema.blink){let e=lw(this.props.oContext.theme,this.props.schema.blink);i=_.createElement(vt,{sx:e},i)}this.props.schema.unit&&(i=_.createElement(`div`,{style:uw.valueAndUnit},i,_.createElement(`div`,{style:{...uw.unit,...this.props.schema.styleUnit||void 0}},this.getText(this.props.schema.unit,this.props.schema.noTranslation))));let s;this.props.schema.labelIcon&&(s=_.createElement(Mt,{src:this.props.schema.labelIcon,style:{marginRight:4}}));let c;this.props.schema.copyToClipboard&&(c=_.createElement(se,{className:`staticCopyButton`,style:{position:`absolute`,top:`calc(50% - 12px)`,right:0,cursor:`pointer`},onClick:()=>{Zt.copyToClipboard(a),window.alert(J.t(`jc_Copied`))}}));let l={"& .staticCopyButton":{display:`none`},"& .staticCopyButton:action":{transform:`scale(0.9)`},"&:hover .staticCopyButton":{display:`block`}};return this.props.schema.highlight&&(l[`&:hover`]={backgroundColor:this.props.oContext.themeType===`dark`?`#51515180`:`#b8b8b880`}),o&&(r.alignItems=`top`),_.createElement(vt,{component:`div`,style:r,sx:l},_.createElement(`div`,{style:{...uw.label,...this.props.schema.styleLabel||void 0}},s,t),i,c)}};g();var fw={fullWidth:{height:`100%`,width:`100%`},link:e=>({textDecoration:`underline`,color:e.palette.mode===`dark`?`#4dabf5`:`#254e72`,cursor:`pointer`})};function pw(e,t,n){let r,i=``;e?e.toString().startsWith(`#`)||e.toString().startsWith(`/`)?(r=t||`_self`,i=e):e.startsWith(`http://`)||e.startsWith(`https://`)?(r=t||`_blank`,i=e):(i=`#tab-instances/config/${n}/${e}`,r=t||`_self`):(i=`#tab-instances/config/${n}`,r=t||`_self`),r===`_self`?setTimeout(e=>{e.startsWith(`#`)?window.location.hash=e:e.startsWith(`/`)?i=`${window.location.protocol}//${window.location.host}${i}`:(e.startsWith(`http://`)||e.startsWith(`https://`))&&(window.location.href=e)},100,i):(i.startsWith(`#`)?i=`${window.location.protocol}//${window.location.host}${window.location.pathname}${i}`:i.startsWith(`/`)&&(i=`${window.location.protocol}//${window.location.host}${i}`),window.open(i,r))}var mw=class extends X{renderItem(e,t){if(this.props.schema.button){let e=this.getIcon();return _.createElement(xt,{variant:this.props.schema.variant||void 0,color:this.props.schema.color||`grey`,style:{...fw.fullWidth,...this.props.schema.controlStyle||void 0},disabled:t,startIcon:e,onClick:this.props.schema.href?()=>{let e=this.props.schema.href?this.getText(this.props.schema.href,!0):null;e&&(this.props.oContext.onBackEndCommand?this.props.oContext.onBackEndCommand({command:`link`,url:e,target:this.props.schema.target,close:this.props.schema.close}):pw(e,this.props.schema.target,`${this.props.oContext.adapterName}.${this.props.oContext.instance}`))}:void 0},this.getText(this.props.schema.text||this.props.schema.label,this.props.schema.noTranslation))}let n=this.getText(this.props.schema.text||this.props.schema.label,this.props.schema.noTranslation);if(this.props.schema.format===`html`)n=_.createElement(`div`,{dangerouslySetInnerHTML:{__html:n}});else if(this.props.schema.format===`json`)try{let e=typeof n==`string`?JSON.parse(n):n;n=_.createElement(`pre`,{style:{whiteSpace:`pre-wrap`,wordBreak:`break-word`,margin:0}},JSON.stringify(e,null,2))}catch{}else n&&(n.includes(`<a `)||n.includes(`<br`)||n.includes(`<b>`)||n.includes(`<i>`))&&(n=Zt.renderTextWithA(n));return _.createElement(vt,{component:`span`,style:{...this.props.schema.controlStyle||void 0},sx:this.props.schema.href?fw.link:void 0,onClick:this.props.schema.href?()=>{let e=this.props.schema.href?this.getText(this.props.schema.href,!0):null;e&&(this.props.oContext.onBackEndCommand?this.props.oContext.onBackEndCommand({command:`link`,url:e,target:this.props.schema.target||`_blank`,close:this.props.schema.close}):pw(e,this.props.schema.target||`_blank`,`${this.props.oContext.adapterName}.${this.props.oContext.instance}`))}:void 0},n)}};g();var hw=1048576,gw={fullWidth:{width:`100%`},root:{width:`100%`},paper:{width:`100%`,marginBottom:16,backgroundColor:`rgba(255, 255, 255, 0.1)`},headerText:{width:`100%`},table:{minWidth:750},visuallyHidden:{border:0,clip:`rect(0 0 0 0)`,height:1,margin:-1,overflow:`hidden`,padding:0,position:`absolute`,top:20,width:1},label:{display:`flex`,justifyContent:`space-between`},title:{flex:`1 1 100%`},rootTool:{paddingLeft:16,paddingRight:8},silver:{opacity:.2},flex:{display:`flex`,alignItems:`baseline`},filteredOut:{padding:10,display:`flex`,textAlign:`center`},buttonEmpty:{width:34,display:`inline-block`},buttonCell:{whiteSpace:`nowrap`},dropZone:{width:`100%`,height:100,position:`relative`},dropZoneEmpty:{},uploadDiv:{position:`relative`,width:`100%`,minHeight:300,opacity:.9,marginTop:30,cursor:`pointer`,outline:`none`},uploadDivDragging:{opacity:1,background:`rgba(128,255,128,0.1)`},image:{objectFit:`contain`,margin:`auto`,display:`flex`,width:`100%`,height:`100%`},uploadCenterDiv:{margin:5,border:`3px dashed grey`,borderRadius:5,width:`calc(100% - 10px)`,height:`calc(100% - 10px)`,minHeight:300,position:`relative`,display:`flex`},uploadCenterIcon:{paddingTop:10,width:48,height:48},uploadCenterText:{fontSize:16},uploadCenterTextAndIcon:{textAlign:`center`,position:`absolute`,top:0,bottom:0,left:0,right:0,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`},buttonRemoveWrapper:{position:`absolute`,zIndex:222,right:0},error:{border:`2px solid red`,boxSizing:`border-box`},tooltip:{pointerEvents:`none`},cardHeader:e=>({color:e.palette.mode===`light`?e.palette.secondary.main:e.palette.text.primary,height:`100%`,fontWeight:`bold`,fontSize:20,fontStyle:`italic`,padding:`4px 16px`,backgroundColor:e.palette.primary.main,display:`flex`,justifyContent:`space-between`})};function _w(e,t,n){t||=`key`;let r=[];return Object.keys(e).forEach(i=>{let a={};a[t]=i,n?(a[n]=e[i],r.push(a)):r.push(Object.assign(a,e[i]))}),r}function vw(e,t,n){t||=`key`;let r={};return e.forEach(e=>{let i=e[t]??``;delete e[t],n?r[i]=e[n]:r[i]=e}),r}function yw(e,t){let n=``;for(let r=0;r<t.length;r++)n+=String.fromCharCode(e[r%e.length].charCodeAt(0)^t.charCodeAt(r));return n}function bw(e,t){let n=``;for(let r=0;r<t.length;r++)n+=String.fromCharCode(e[r%e.length].charCodeAt(0)^t.charCodeAt(r));return n}var xw=class e extends X{constructor(t){super(t),K(this,`filterRefs`,void 0),K(this,`typingTimer`,null),K(this,`resizeTimeout`,null),K(this,`secret`,`Zgfr56gFe87jJOM`),K(this,`refDiv`,void 0),K(this,`listOfHiddenElements`,[]),K(this,`refreshBecauseOfHiddenElements`,null),K(this,`onTableRowError`,e=>(t,n)=>{let r={...this.state.tableErrors};r[e]||={},t&&(n?r[e][t]=n:(delete r[e][t],Object.keys(r[e]).length===0&&delete r[e])),this.setState({tableErrors:r}),this.props.onError(t,n)}),K(this,`handleRequestSort`,(e,t=!1)=>{let{order:n,orderBy:r}=this.state,i=t?n:r===e&&n===`asc`?`desc`:`asc`,a=this.stableSort(i,e);JSON.stringify(a)!==JSON.stringify(this.state.value)&&this.setState({value:a,order:i,orderBy:e,iteration:this.state.iteration+1e4},()=>this.applyFilter(!1,a))}),K(this,`stableSort`,(t,n)=>{let{value:r}=this.state,i=e.getComparator(t,n),a=r.map((e,t)=>({el:e,index:t}));return a.sort((e,t)=>{let n=i(e.el,t.el);return n===0?e.index-t.index:n}),a.map(e=>e.el)}),K(this,`onDelete`,e=>()=>{let t=JSON.parse(JSON.stringify(this.state.value));t.splice(e,1);let n={...this.state.tableErrors};n[e]&&(Object.keys(n[e]).forEach(e=>{this.props.onError(e,void 0)}),delete n[e]);let r={};Object.keys(n).forEach(t=>{let i=parseInt(t,10);i>e?r[i-1]=n[i]:r[i]=n[i]}),this.setState({value:t,iteration:this.state.iteration+1e4,tableErrors:r},()=>this.applyFilter(!1,void 0,()=>this.onChangeWrapper(t)))}),K(this,`onClone`,e=>()=>{let t=JSON.parse(JSON.stringify(this.state.value)),n=JSON.parse(JSON.stringify(t[e]));if(typeof this.props.schema.clone==`string`&&typeof n[this.props.schema.clone]==`string`){let e=1,r=n[this.props.schema.clone],i=r.match(/(\d+)$/);for(i?(r=r.replace(i[0],``),e=parseInt(i[0],10)+1):r+=`_`;t.find(t=>t[this.props.schema.clone]===r+e.toString());)e++;n[this.props.schema.clone]=`${n[this.props.schema.clone]}_${e}`}t.splice(e,0,n),this.setState({value:t,iteration:this.state.iteration+1e4},()=>this.applyFilter(!1,void 0,()=>this.onChangeWrapper(t)))}),K(this,`onChangeWrapper`,(e,t)=>{this.typingTimer&&clearTimeout(this.typingTimer),this.typingTimer=setTimeout((e,t)=>{this.typingTimer=null;let n;if(this.props.schema.encryptedAttributes){let t=JSON.parse(JSON.stringify(e));if(t.forEach(e=>{this.props.schema.encryptedAttributes.forEach(t=>{e[t]&&(e[t]=yw(this.secret,e[t]))})}),this.props.schema.objKeyName){let e=vw(t,this.props.schema.objKeyName,this.props.schema.objValueName);n=this.onChange(this.props.attr,e)}else n=this.onChange(this.props.attr,t)}else if(this.props.schema.objKeyName){let t=vw(JSON.parse(JSON.stringify(e)),this.props.schema.objKeyName,this.props.schema.objValueName);n=this.onChange(this.props.attr,t)}else n=this.onChange(this.props.attr,e);n instanceof Promise&&n.catch(e=>console.error(`Cannot save: ${e}`)),t&&(this.applyFilter(!1,e),this.handleRequestSort(this.state.orderBy,!0))},300,e,t)}),K(this,`onAdd`,async()=>{let{schema:e}=this.props,t=JSON.parse(JSON.stringify(this.state.value)),n={};if(e.items)for(let r of e.items){let e;e=r.defaultFunc?this.props.custom?r.defaultFunc?await this.executeCustom(r.defaultFunc,this.props.data,this.props.customObj,this.props.oContext.instanceObj,t.length,this.props.data):this.props.schema.default:r.defaultFunc?await this.execute(r.defaultFunc,this.props.schema.default,this.props.data,t.length,this.props.data):this.props.schema.default:r.default??null,r.attr&&(n[r.attr]=e)}t.push(n),this.setState({value:t},()=>this.applyFilter(!1,void 0,()=>this.onChangeWrapper(t)))}),K(this,`applyFilter`,(t,n,r)=>{n||=this.state.value;let i=n.map((e,t)=>t);if(Object.keys(this.filterRefs).forEach(r=>{let a=e.getFilterValue(this.filterRefs[r]);if(!t&&a){var o;a=a.toLowerCase();let e=(o=this.state.filterLabelMap)==null?void 0:o[r];i=i==null?void 0:i.filter(t=>{if(!n[t]||n[t][r]==null)return!1;if(n[t][r].toString().toLowerCase().includes(a))return!0;if(e){let i=e[n[t][r]];if(i!=null&&i.toLowerCase().includes(a))return!0}return!1})}else this.filterRefs[r].current&&e.setFilterValue(this.filterRefs[r],``)}),i&&i.length===n.length&&(i=null),i==null&&this.state.visibleValue===null){r==null||r();return}JSON.stringify(i)===JSON.stringify(this.state.visibleValue)?r&&r():this.setState({visibleValue:i},()=>r&&r())}),this.filterRefs={},this.props.schema.items||=[],this.props.schema.items.forEach(e=>{e.filter&&e.attr&&(this.filterRefs[e.attr]=m())}),this.refDiv=_.createRef()}async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr)||[],t;if(t=this.props.schema.objKeyName?_w(e,this.props.schema.objKeyName,this.props.schema.objValueName):e,Array.isArray(t)||(t=[]),this.props.schema.encryptedAttributes){var n;let t;try{t=this.props.oContext.socket.getCompactSystemConfig?await this.props.oContext.socket.getCompactSystemConfig():await this.getCachedObject(`system.config`)}catch(e){console.error(`Cannot get system configuration: ${e}`)}this.secret=(t==null||(n=t.native)==null?void 0:n.secret)||this.secret,e.forEach(e=>{var t;(t=this.props.schema.encryptedAttributes)==null||t.forEach(t=>{e[t]||=bw(this.secret,e[t])})})}let r=window.localStorage.getItem(`table.collapsed.${this.props.oContext.instance}.${this.props.attr}`),i=[];if(r)try{i=JSON.parse(r)}catch{}this.setState({value:t,visibleValue:null,orderBy:``,order:`asc`,iteration:0,filterOn:[],width:0,tableErrors:{},collapsed:i,filterLabelMap:{}},()=>this.validateUniqueProps())}componentWillUnmount(){this.typingTimer&&=(clearTimeout(this.typingTimer),null),this.resizeTimeout&&=(clearTimeout(this.resizeTimeout),null),this.refreshBecauseOfHiddenElements&&=(clearTimeout(this.refreshBecauseOfHiddenElements),null),super.componentWillUnmount()}itemTable(e,t,n,r){var i;let{schema:a}=this.props,o=(i=a.items)==null?void 0:i.find(t=>t.attr===e);if(!o)return null;let s={items:{[e]:o}};return _.createElement(kO,{oContext:this.props.oContext,alive:this.props.alive,arrayIndex:n,changed:this.props.changed,common:this.props.common,expertMode:this.props.expertMode,custom:!0,data:t,globalData:this.props.data,index:n+this.state.iteration,onChange:(e,t)=>{let r=JSON.parse(JSON.stringify(this.state.value));r[n][e]=t,this.setState({value:r},()=>{this.validateUniqueProps(),this.onChangeWrapper(r,!0)})},onError:this.onTableRowError(n),originalData:this.props.originalData,schema:s,table:!0,themeName:this.props.themeName,onFilterLabelUpdate:(e,t)=>{let n=this.state.filterLabelMap[e],r={...n,...t};JSON.stringify(n)!==JSON.stringify(r)&&this.setState(t=>({filterLabelMap:{...t.filterLabelMap,[e]:r}}))},customComponents:this.props.customComponents,onHiddenChanged:r?(e,t)=>{if(t)this.listOfHiddenElements[n]||=[],this.listOfHiddenElements[n].includes(e)||(this.listOfHiddenElements[n].push(e),this.refreshBecauseOfHiddenElements&&clearTimeout(this.refreshBecauseOfHiddenElements),this.refreshBecauseOfHiddenElements=setTimeout(()=>{this.forceUpdate()},100));else if(this.listOfHiddenElements[n]){let t=this.listOfHiddenElements[n].indexOf(e);t!==-1&&(this.listOfHiddenElements[n].splice(t,1),this.refreshBecauseOfHiddenElements&&clearTimeout(this.refreshBecauseOfHiddenElements),this.refreshBecauseOfHiddenElements=setTimeout(()=>{this.forceUpdate()},100))}}:void 0})}validateUniqueProps(){if(!this.props.schema.uniqueColumns)return;let e=null,t=null;for(let n of this.props.schema.uniqueColumns){let r=[];this.state.value.find(i=>{let a=i[n];return r.includes(a)?(e||(e=n,t=a),this.onError(n,`is not unique`),!0):(r.push(a),!1)})||this.onError(n)}e?this.setState({errorMessage:J.t(`jc_Non-allowed duplicate entry "%s" in column "%s"`,t,e)}):this.setState({errorMessage:``})}static descendingComparator(e,t,n){return t[n]<e[n]?-1:+(t[n]>e[n])}static getComparator(t,n){return t===`desc`?(t,r)=>e.descendingComparator(t,r,n):(t,r)=>-e.descendingComparator(t,r,n)}static getFilterValue(e){var t;return e==null||(t=e.current)==null||(t=t.children[0])==null||(t=t.children[0])==null?void 0:t.value}static setFilterValue(e,t){e.current&&(e.current.children[0].children[0].value=t)}renderShowHideFilter(t){return!t.filter||!t.attr?null:_.createElement(Zn,{title:J.t(`jc_Show/hide filter input`),size:`small`,onClick:()=>{let n=[...this.state.filterOn];if(t.attr){let r=this.state.filterOn.indexOf(t.attr);r===-1?n.push(t.attr):n.splice(r,1),this.setState({filterOn:n},()=>{r&&e.getFilterValue(this.filterRefs[t.attr])&&(e.setFilterValue(this.filterRefs[t.attr],``),this.applyFilter())})}}},this.state.filterOn.includes(t.attr)?_.createElement(xe,null):_.createElement(U,null))}renderImportExportButtons(e){return _.createElement(_.Fragment,null,!e.noDelete&&e.import?_.createElement(Ce,{title:J.t(`jc_Import data from %s file`,`CSV`),slotProps:{popper:{sx:gw.tooltip}}},_.createElement(Zn,{size:`small`,onClick:()=>this.setState({showImportDialog:!0})},_.createElement(nr,null))):null,e.export?_.createElement(Ce,{title:J.t(`jc_Export data to %s file`,`CSV`),slotProps:{popper:{sx:gw.tooltip}}},_.createElement(Zn,{size:`small`,onClick:()=>this.onExport()},_.createElement(we,null))):null,e.noDelete?null:_.createElement(Zn,{disabled:!0,size:`small`},_.createElement(me,null)))}renderAddButton(e){return _.createElement(Ce,{title:e?J.t(`jc_Cannot add items with set filter`):J.t(`jc_Add row`),slotProps:{popper:{sx:gw.tooltip}}},_.createElement(`span`,null,_.createElement(Zn,{size:`small`,color:`primary`,disabled:!!e&&!this.props.schema.allowAddByFilter,onClick:this.onAdd},_.createElement(re,null))))}enhancedTableHead(e,t){var n;let{schema:r}=this.props,{order:i,orderBy:a}=this.state;return _.createElement(fr,null,_.createElement(F,null,(n=r.items)==null?void 0:n.map((e,n)=>this.renderOneFilter({schema:r,style:{width:e.width},showAddButton:!n&&!r.noDelete,headCell:e,order:i,orderBy:a,index:n,doAnyFilterSet:t})),!r.noDelete&&_.createElement(Ee,{style:{paddingLeft:20,paddingRight:20,width:e,textAlign:`right`},padding:`checkbox`},this.renderImportExportButtons(r))))}onExport(){var e;let{schema:t}=this.props,{value:n}=this.state,r=(e=t.items)==null?void 0:e.map(e=>e.attr),i=r?[r.join(`;`)]:[];n.forEach(e=>{var n;let r=[];(n=t.items)==null||n.forEach(t=>{t.attr&&(e[t.attr]&&typeof e[t.attr]==`string`&&e[t.attr].includes(`;`)?r.push(`"${e[t.attr]}"`):r.push(e[t.attr]??``))}),i.push(r.join(`;`))});let a=document.createElement(`a`);a.setAttribute(`href`,`data:text/csv;charset=utf-8,${encodeURIComponent(i.join(`
|
|
1387
1387
|
`))}`);let o=new Date;a.setAttribute(`download`,`${o.getFullYear()}_${(o.getMonth()+1).toString().padStart(2,`0`)}_${o.getDate().toString().padStart(2,`0`)}_${this.props.oContext.adapterName}.${this.props.oContext.instance}_${this.props.attr}.csv`),a.style.display=`none`,document.body.appendChild(a),a.click(),document.body.removeChild(a)}onImport(e){let t=e.split(`
|
|
1388
|
-
`).map(e=>e.replace(`\r`,``).trim()),{schema:n}=this.props,r=((t==null?void 0:t.shift())||``).split(`;`).filter(e=>{var t;return e&&((t=n.items)==null?void 0:t.find(t=>t.attr===e))}),i=[];if(t.forEach(e=>{let t=e.split(`;`),n={};for(let e=0;e<t.length;e++){let i=t[e];if(i.startsWith(`"`)){for(i=i.substring(1);e<t.length&&!i.endsWith(`"`);)i+=`;${t[++e]}`;i=i.substring(0,i.length-1)}let o=i;if(i===`true`)o=!0;else if(i===`false`)o=!1;else if(window.isFinite(i)){var a;let t=(a=this.props.schema.items)==null?void 0:a.find(t=>t.attr===r[e]);o=t&&t.type===`number`?parseFloat(i):i}else o=i;n[r[e]]=o}i.push(n)}),i.length){var a;(a=this.state.value)!=null&&a.length?this.setState({showTypeOfImportDialog:i,showImportDialog:!1}):this.setState({value:i,showImportDialog:!1})}else window.alert(`jc_No data found in file`)}isAnyFilterSet(){return!!Object.keys(this.filterRefs).find(t=>e.getFilterValue(this.filterRefs[t]))}onMoveUp(e){let t=JSON.parse(JSON.stringify(this.state.value)),n=t[e];t.splice(e,1),t.splice(e-1,0,n),this.setState({value:t,iteration:this.state.iteration+1e4},()=>this.applyFilter(!1,void 0,()=>this.onChangeWrapper(t)))}onMoveDown(e){let t=JSON.parse(JSON.stringify(this.state.value)),n=t[e];t.splice(e,1),t.splice(e+1,0,n),this.setState({value:t,iteration:this.state.iteration+1e4},()=>this.applyFilter(!1,void 0,()=>this.onChangeWrapper(t)))}onDrop(e){let t=e[0],n=new FileReader;n.onabort=()=>console.log(`file reading was aborted`),n.onerror=()=>console.log(`file reading has failed`),n.onload=()=>{if(t.size>aT){window.alert(K.t(`jc_File is too big. Max %sk allowed. Try use SVG.`,Math.round(aT/1024)));return}let e=new Uint8Array(n.result).reduce((e,t)=>e+String.fromCharCode(t),``);this.onImport(e)},n.readAsArrayBuffer(t)}showTypeOfImportDialog(){return this.state.showTypeOfImportDialog?_.createElement(Dt,{open:!0,onClose:()=>this.setState({showTypeOfImportDialog:!1}),maxWidth:`md`},_.createElement(gn,null,K.t(`jc_Append or replace?`)),_.createElement(Un,null,K.t(`jc_Append %s entries or replace existing?`,this.state.showTypeOfImportDialog.length)),_.createElement(On,null,_.createElement(Ge,{variant:`contained`,color:`primary`,autoFocus:!0,onClick:()=>{let e=JSON.parse(JSON.stringify(this.state.value));this.state.showTypeOfImportDialog.forEach(t=>e.push(t)),this.setState({value:e,iteration:this.state.iteration+1e4,showTypeOfImportDialog:!1},()=>this.applyFilter(!1,void 0,()=>this.onChangeWrapper(e)))}},K.t(`jc_Append`)),_.createElement(Ge,{variant:`contained`,color:`secondary`,autoFocus:!0,onClick:()=>{let e=this.state.showTypeOfImportDialog;this.setState({value:e,iteration:this.state.iteration+1e4,showTypeOfImportDialog:!1},()=>this.applyFilter(!1,void 0,()=>this.onChangeWrapper(e)))}},K.t(`jc_Replace`)))):null}showImportDialog(){return this.state.showImportDialog?_.createElement(Dt,{open:!0,onClose:()=>this.setState({showImportDialog:!1}),sx:{"& .MuiDialog-paper":{minHeight:500}},maxWidth:`md`,fullWidth:!0},_.createElement(gn,null,K.t(`jc_Import from %s`,`CSV`)),_.createElement(Un,null,_.createElement(gS,{multiple:!1,accept:{"text/csv":[`.csv`]},maxSize:aT,onDragEnter:()=>this.setState({uploadFile:`dragging`}),onDragLeave:()=>this.setState({uploadFile:!0}),onDrop:(e,t)=>{if(this.setState({uploadFile:!1}),e.length)this.onDrop(e);else{var n;window.alert((t==null||(n=t[0])==null||(n=n.errors)==null||(n=n[0])==null?void 0:n.message)||K.t(`jc_Cannot upload`))}}},({getRootProps:e,getInputProps:t})=>_.createElement(`div`,{style:{...oT.uploadDiv,...this.state.uploadFile===`dragging`?oT.uploadDivDragging:void 0,...oT.dropZone,...this.state.icon?void 0:oT.dropZoneEmpty},...e()},_.createElement(`input`,{...t()}),_.createElement(`div`,{style:oT.uploadCenterDiv},_.createElement(`div`,{style:oT.uploadCenterTextAndIcon},_.createElement(Xe,{style:oT.uploadCenterIcon}),_.createElement(`div`,{style:oT.uploadCenterText},this.state.uploadFile===`dragging`?K.t(`jc_Drop file here`):K.t(`jc_Place your files here or click here to open the browse dialog`))))))),_.createElement(On,null,_.createElement(Ge,{variant:`contained`,onClick:()=>this.setState({showImportDialog:!1}),color:`primary`,startIcon:_.createElement(je,null)},K.t(`jc_Cancel`)))):null}renderOneFilter(t){return _.createElement(Ye,{key:`${t.headCell.attr}_${t.index}`,style:t.style,align:`left`,sortDirection:t.orderBy===t.headCell.attr&&t.order},_.createElement(`div`,{style:{...oT.flex,...t.schema.showFirstAddOnTop?{flexDirection:`column`}:void 0}},t.showAddButton?this.renderAddButton(t.doAnyFilterSet):null,t.headCell.sort&&_.createElement(me,{active:!0,style:t.orderBy===t.headCell.attr?void 0:oT.silver,direction:t.orderBy===t.headCell.attr?t.order:`asc`,onClick:()=>t.headCell.attr&&this.handleRequestSort(t.headCell.attr)}),t.headCell.filter&&t.headCell.attr&&this.state.filterOn.includes(t.headCell.attr)?_.createElement(ft,{variant:`standard`,ref:this.filterRefs[t.headCell.attr],onChange:()=>this.applyFilter(),title:K.t(`jc_You can filter entries by entering here some text`),slotProps:{input:{endAdornment:e.getFilterValue(this.filterRefs[t.headCell.attr])&&_.createElement(sr,{position:`end`},_.createElement(ur,{size:`small`,tabIndex:-1,onClick:()=>{e.setFilterValue(this.filterRefs[t.headCell.attr],``),this.applyFilter()}},_.createElement(je,null)))}},fullWidth:!0,placeholder:this.getText(t.headCell.title)}):_.createElement(`span`,{style:oT.headerText},this.getText(t.headCell.title)),this.renderShowHideFilter(t.headCell)))}enhancedFilterCard(){var e;let{schema:t}=this.props,{order:n,orderBy:r}=this.state,i;this.props.schema.compact&&(i={paddingTop:1,paddingBottom:1});let a=!t.noDelete&&t.import||t.export;if(a||(e=t.items)!=null&&e.find(e=>e.sort||e.filter)){var o;return _.createElement(Ct,{size:{xs:t.xs||12,sm:t.sm||void 0,md:t.md||void 0,lg:t.lg||void 0,xl:t.xl||void 0}},_.createElement(O,null,_.createElement(ln,{style:oT.paper},_.createElement(Pe,{style:oT.paper},_.createElement(Zn,{expandIcon:_.createElement(ot,null)},_.createElement(be,null,K.t(`jc_Filter and Data Actions`))),_.createElement(zn,null,_.createElement(_e,null,_.createElement(De,null,((o=t.items)==null?void 0:o.find(e=>e.sort||e.filter))&&t.items.map((e,a)=>_.createElement(ct,{key:`${e.attr}_${a}`},this.renderOneFilter({schema:t,style:i,showAddButton:!1,headCell:e,order:n,orderBy:r,index:a,doAnyFilterSet:!1}))),a?_.createElement(ct,null,_.createElement(Ye,{align:`left`,style:i},_.createElement(`span`,{style:oT.headerText},K.t(`jc_Actions`))),_.createElement(Ye,{style:i},this.renderImportExportButtons(t))):null)))))))}return null}enhancedBottomCard(){var e;let{schema:t}=this.props,n;this.props.schema.compact&&(n={paddingTop:1,paddingBottom:1});let r=this.isAnyFilterSet();return _.createElement(Ct,{size:{xs:t.xs||12,sm:t.sm||void 0,md:t.md||void 0,lg:t.lg||void 0,xl:t.xl||void 0}},_.createElement(O,null,_.createElement(ln,{style:oT.paper},_.createElement(_e,null,_.createElement(De,null,_.createElement(ct,null,_.createElement(Ye,{colSpan:(((e=t.items)==null?void 0:e.length)||0)+1,style:n},this.renderAddButton(r))))))))}renderCards(){let{schema:e}=this.props,{visibleValue:t}=this.state,n;this.props.schema.compact&&(n={paddingTop:1,paddingBottom:1});let r={padding:0,borderBottom:`none`};t||=this.state.value.map((e,t)=>t);let i=this.isAnyFilterSet();return _.createElement(Ct,{container:!0},this.showImportDialog(),this.showTypeOfImportDialog(),this.enhancedFilterCard(),t.map((a,o)=>{var s,c,l;return _.createElement(Ct,{key:`${a}_${o}`,size:{xs:e.xs||12,sm:e.sm||void 0,md:e.md||void 0,lg:e.lg||void 0,xl:e.xl||void 0}},_.createElement(O,{sx:this.state.tableErrors[a]?{outline:`1px solid red`}:void 0},_.createElement(ln,{style:oT.paper},this.props.schema.titleAttribute?_.createElement(ht,{sx:oT.cardHeader},_.createElement(`div`,null,this.state.value[a][this.props.schema.titleAttribute]),_.createElement(`div`,null,!i&&!this.state.orderBy?_.createElement(Ln,{title:K.t(`jc_Move up`),slotProps:{popper:{sx:oT.tooltip}}},_.createElement(`span`,null,_.createElement(ur,{size:`small`,onClick:()=>this.onMoveUp(a),disabled:o===0},_.createElement($n,null)))):null,!i&&!this.state.orderBy?_.createElement(Ln,{title:K.t(`jc_Move down`),slotProps:{popper:{sx:oT.tooltip}}},_.createElement(`span`,null,_.createElement(ur,{size:`small`,onClick:()=>this.onMoveDown(a),disabled:o===t.length-1},_.createElement(An,null)))):null,_.createElement(Ln,{title:K.t(`jc_Delete current row`),slotProps:{popper:{sx:oT.tooltip}}},_.createElement(ur,{size:`small`,onClick:this.onDelete(a)},_.createElement(we,null))),this.props.schema.clone?_.createElement(Ln,{title:K.t(`jc_Clone current row`),slotProps:{popper:{sx:oT.tooltip}}},_.createElement(ur,{size:`small`,onClick:this.onClone(a)},_.createElement(he,null))):null,_.createElement(Ln,{title:K.t(`jc_Expand/Collapse card`),slotProps:{popper:{sx:oT.tooltip}}},_.createElement(ur,{size:`small`,onClick:()=>{let e=[...this.state.collapsed],t=e.indexOf(a);t===-1?e.push(a):e.splice(t,1),window.localStorage.setItem(`table.collapsed.${this.props.oContext.instance}.${this.props.attr}`,JSON.stringify(e)),this.setState({collapsed:e})}},_.createElement(ot,{style:{rotate:(s=this.state.collapsed)!=null&&s.includes(a)?`0deg`:`180deg`,transition:`0.3s`,transitionProperty:`rotate`}}))))):null,_.createElement(an,{in:!((c=this.state.collapsed)!=null&&c.includes(a)),timeout:`auto`,unmountOnExit:!0},_.createElement(_e,null,_.createElement(De,null,(l=e.items)==null?void 0:l.map(e=>{var t;let i=e.attr&&((t=this.listOfHiddenElements)==null||(t=t[a])==null?void 0:t.includes(e.attr));return _.createElement(ct,{key:`${e.attr}_${a}`},_.createElement(Ye,{align:`left`,style:i?r:n},i?null:_.createElement(`span`,{style:oT.headerText},this.getText(e.title))),_.createElement(Ye,{align:`left`,style:i?r:n},e.attr&&this.itemTable(e.attr,this.state.value[a],a,!0)))}),!this.props.schema.titleAttribute&&!e.noDelete&&_.createElement(ct,null,_.createElement(Ye,{align:`left`,style:n},_.createElement(`span`,{style:oT.headerText},this.getText(`Actions`))),_.createElement(Ye,{align:`left`,style:n},!i&&!this.state.orderBy?_.createElement(Ln,{title:K.t(`jc_Move up`),slotProps:{popper:{sx:oT.tooltip}}},_.createElement(`span`,null,_.createElement(ur,{size:`small`,onClick:()=>this.onMoveUp(a),disabled:o===0},_.createElement($n,null)))):null,!i&&!this.state.orderBy?_.createElement(Ln,{title:K.t(`jc_Move down`),slotProps:{popper:{sx:oT.tooltip}}},_.createElement(`span`,null,_.createElement(ur,{size:`small`,onClick:()=>this.onMoveDown(a),disabled:o===t.length-1},_.createElement(An,null)))):null,_.createElement(Ln,{title:K.t(`jc_Delete current row`),slotProps:{popper:{sx:oT.tooltip}}},_.createElement(ur,{size:`small`,onClick:this.onDelete(a)},_.createElement(we,null))),this.props.schema.clone?_.createElement(Ln,{title:K.t(`jc_Clone current row`),slotProps:{popper:{sx:oT.tooltip}}},_.createElement(ur,{size:`small`,onClick:this.onClone(a)},_.createElement(he,null))):null))))))))}),this.enhancedBottomCard())}renderTable(){var e;let{schema:t}=this.props,{visibleValue:n}=this.state;n||=this.state.value.map((e,t)=>t);let r=this.isAnyFilterSet(),i;return this.props.schema.compact&&(i={paddingTop:1,paddingBottom:1}),_.createElement(ln,{style:oT.paper},this.showImportDialog(),this.showTypeOfImportDialog(),t.label?_.createElement(`div`,{style:oT.label},_.createElement(Ce,{variant:`dense`,style:oT.rootTool},_.createElement(be,{style:oT.title,variant:`h6`,id:`tableTitle`,component:`div`},this.getText(t.label)))):null,_.createElement(mr,null,_.createElement(_e,{style:oT.table,size:`small`},this.enhancedTableHead(!r&&!this.state.orderBy?120:64,r),_.createElement(De,null,n.map((e,a)=>{var o;return _.createElement(ct,{hover:!0,key:`${e}_${a}`,sx:this.state.tableErrors[e]?{outline:`1px solid red`}:void 0},(o=t.items)==null?void 0:o.map(t=>_.createElement(Ye,{key:`${t.attr}_${e}`,align:`left`,style:i},t.attr&&this.itemTable(t.attr,this.state.value[e],e,!1))),!t.noDelete&&_.createElement(Ye,{align:`left`,style:{...i,...oT.buttonCell}},!r&&!this.state.orderBy?a?_.createElement(Ln,{title:K.t(`jc_Move up`),slotProps:{popper:{sx:oT.tooltip}}},_.createElement(ur,{size:`small`,onClick:()=>this.onMoveUp(e)},_.createElement($n,null))):_.createElement(`div`,{style:oT.buttonEmpty}):null,!r&&!this.state.orderBy?a<n.length-1?_.createElement(Ln,{title:K.t(`jc_Move down`),slotProps:{popper:{sx:oT.tooltip}}},_.createElement(ur,{size:`small`,onClick:()=>this.onMoveDown(e)},_.createElement(An,null))):_.createElement(`div`,{style:oT.buttonEmpty}):null,_.createElement(Ln,{title:K.t(`jc_Delete current row`),slotProps:{popper:{sx:oT.tooltip}}},_.createElement(ur,{size:`small`,onClick:this.onDelete(e)},_.createElement(we,null))),this.props.schema.clone?_.createElement(Ln,{title:K.t(`jc_Clone current row`),slotProps:{popper:{sx:oT.tooltip}}},_.createElement(ur,{size:`small`,onClick:this.onClone(e)},_.createElement(he,null))):null))}),!t.noDelete&&n.length>=(t.showSecondAddAt||5)?_.createElement(ct,null,_.createElement(Ye,{colSpan:(((e=t.items)==null?void 0:e.length)||0)+1,style:{...i}},this.renderAddButton(r))):null)),!n.length&&this.state.value.length?_.createElement(`div`,{style:oT.filteredOut},_.createElement(be,{style:oT.title,variant:`h6`,id:`tableTitle`,component:`div`},K.t(`jc_All items are filtered out`),_.createElement(ur,{size:`small`,onClick:()=>this.applyFilter(!0)},_.createElement(je,null)))):null),t.help?_.createElement(en,{style:{paddingLeft:16}},this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null,this.state.errorMessage?_.createElement(`div`,{style:{display:`flex`,padding:`5px`}},_.createElement(ae,{color:`error`}),_.createElement(`span`,{style:{color:`red`,alignSelf:`center`}},this.state.errorMessage)):null)}componentDidUpdate(){var e;(e=this.refDiv.current)!=null&&e.clientWidth&&this.refDiv.current.clientWidth!==this.state.width&&(this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{var e;this.resizeTimeout=null,(e=this.refDiv.current)!=null&&e.clientWidth&&this.setState({width:this.refDiv.current.clientWidth})},50))}getCurrentBreakpoint(){return this.state.width?this.state.width<600?`xs`:this.state.width<900?`sm`:this.state.width<1200?`md`:this.state.width<1536?`lg`:`xl`:`md`}renderItem(){let{schema:e}=this.props;if(!this.state.value||!Array.isArray(this.state.value))return null;let t=this.getCurrentBreakpoint(),n=null;return n=t&&(e.useCardFor||[`xs`]).includes(t)?this.renderCards():this.renderTable(),_.createElement(`div`,{ref:this.refDiv,style:{width:`100%`}},n)}};g();var fT={indeterminate:{opacity:.5},label:{width:`100%`,fontSize:14,marginBottom:2},helper:{width:`100%`,fontSize:12},error:{width:`100%`,fontSize:12,color:`#FF0000`}},pT=class extends X{constructor(...e){super(...e),q(this,`updateTimeout`,null)}async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);if(Array.isArray(e)&&this.props.oContext.multiEdit){e=X.DIFFERENT_VALUE,this.setState({value:e,oldValue:e,jsonError:!1});return}this.setState({value:e,oldValue:e,jsonError:this.validateJson(e)})}validateJson(e){let t=!1;if(this.props.schema.validateJson&&(e||!this.props.schema.allowEmpty))try{JSON.parse(e)}catch(e){console.log(`Error in JSON`,e),t=!0}return t}static getDerivedStateFromProps(e,t){if(e.oContext.multiEdit&&t.value===X.DIFFERENT_VALUE)return{value:X.DIFFERENT_VALUE};let n=X.getValue(e.data,e.attr);return n!=null&&(n=n.toString()),n==null||n!==t.value&&n!==t.oldValue?{value:n}:null}renderItem(e,t){let n=Array.isArray(this.state.value)||this.state.value===X.DIFFERENT_VALUE;if(this.props.schema.time){let n=``;return typeof this.state.value==`number`?n=this.state.value&&this.state.value<9466596e5?new Date(this.state.value*1e3).toLocaleString():new Date(this.state.value).toLocaleString():typeof this.state.value==`string`&&(n=new Date(this.state.value).toLocaleString()),_.createElement(ft,{variant:`standard`,fullWidth:!0,value:n,error:!!e||!!this.state.jsonError,disabled:!!t,slotProps:{htmlInput:{readOnly:!0}},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}if(this.state.oldValue==null?this.updateTimeout&&=(clearTimeout(this.updateTimeout),null):(this.updateTimeout&&clearTimeout(this.updateTimeout),this.updateTimeout=setTimeout(()=>{this.updateTimeout=null,this.setState({oldValue:void 0})},30)),n){let n=X.getValue(this.props.data,this.props.attr),r=(n==null?void 0:n.filter(e=>e||e===0).map(e=>({label:e.toString()||``,value:e})))||[];return r.unshift({label:K.t(X.DIFFERENT_LABEL),value:X.DIFFERENT_VALUE}),_.createElement(A,{style:fT.indeterminate,fullWidth:!0,value:r[0],onChange:(e,t)=>{let n=t?t.value:``,r=this.onChange(this.props.attr,n,()=>{this.setState({value:n,oldValue:n,jsonError:this.validateJson(t)})});r instanceof Promise&&r.catch(e=>console.error(`Cannot set value: ${e}`))},options:r,getOptionLabel:e=>e.label,renderInput:n=>_.createElement(ft,{variant:`standard`,...n,error:!!e,placeholder:this.getText(this.props.schema.placeholder),slotProps:{htmlInput:{...n.slotProps.htmlInput,maxLength:this.props.schema.maxLength||this.props.schema.max||void 0,readOnly:this.props.schema.readOnly||!1}},label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation),disabled:!!t})})}let r,i;if((this.props.schema.readOnly||t)&&this.props.schema.copyToClipboard?((this.props.schema.minRows||0)>1&&(i={position:`absolute`,right:3,top:20,zIndex:1e3}),r=_.createElement(ur,{tabIndex:-1,style:i,size:`small`,onClick:()=>{$t.copyToClipboard(this.state.value),window.alert(K.t(`jc_Copied`))}},_.createElement(St,null))):!this.props.schema.readOnly&&!t&&this.state.value&&!this.props.schema.noClearButton&&((this.props.schema.minRows||0)>1&&(i={position:`absolute`,right:3,top:20,zIndex:1e3}),r=_.createElement(ur,{style:i,size:`small`,tabIndex:-1,onClick:()=>this.setState({value:``,oldValue:this.state.value},()=>this.onChange(this.props.attr,``))},_.createElement(je,null)),(this.props.schema.minRows||0)<=1&&(r=_.createElement(sr,{position:`end`},r))),(this.props.schema.minRows||0)>1){let n=this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation);return _.createElement(`div`,{style:{width:`100%`,position:`relative`}},this.props.schema.label?_.createElement(`div`,{style:fT.label},this.getText(this.props.schema.label)):null,_.createElement(U,{style:{width:`100%`,resize:`vertical`,backgroundColor:this.props.oContext.themeType===`dark`?`#363636`:`#cccccc`,color:this.props.oContext.themeType===`dark`?`#fff`:`#111`},minRows:this.props.schema.minRows,maxRows:this.props.schema.maxRows,value:this.state.value??``,disabled:!!t,readOnly:this.props.schema.readOnly||!1,onChange:e=>{let t=e.target.value;this.setState({value:t,oldValue:this.state.value,jsonError:this.validateJson(t)},()=>this.onChange(this.props.attr,t||``))},placeholder:this.getText(this.props.schema.placeholder)}),n||e||this.state.jsonError?_.createElement(`div`,{style:e?fT.error:fT.helper},e||(this.state.jsonError?K.t(`jc_Invalid JSON`):n)):null)}return _.createElement(ft,{variant:`standard`,fullWidth:!0,value:this.state.value??``,error:!!e||!!this.state.jsonError,disabled:!!t,slotProps:{htmlInput:{maxLength:this.props.schema.maxLength||this.props.schema.max||void 0,readOnly:this.props.schema.readOnly||!1},input:{endAdornment:r}},onChange:e=>{let t=e.target.value;this.setState({value:t,oldValue:this.state.value,jsonError:this.validateJson(t)},()=>this.onChange(this.props.attr,t))},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.state.jsonError?K.t(`jc_Invalid JSON`):this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}};g();var mT={fullWidth:{width:`100%`}},hT=class extends X{constructor(...e){super(...e),q(this,`initialized`,!1),q(this,`localContext`,void 0)}async askInstance(){if(this.props.alive){let e=this.props.schema.data;if(e===void 0&&this.props.schema.jsonData){let t=await this.getPatternAsync(this.props.schema.jsonData,null,!0);try{e=JSON.parse(t)}catch{console.error(`Cannot parse json data: ${t}`)}}e??=null;let t=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(t!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){let e=await this.props.oContext.socket.getState(`system.adapter.${t}.alive`);if(!(e!=null&&e.val)){window.alert(K.t(`jc_Instance %s is not alive`,t));return}}this.props.oContext.socket.sendTo(t,this.props.schema.command||`send`,e).then(e=>{if(typeof e==`object`){let t=e;this.setState({text:t.text||``,style:t.style,icon:t.icon,iconStyle:t.iconStyle})}else typeof e==`string`&&this.setState({text:e||``})}).catch(e=>console.error(`Cannot send command: ${e}`))}}getLocalContext(){let e={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(t=>e[t]=X.getValue(this.props.data,t)),JSON.stringify(e)}renderItem(){if(this.props.alive){let e=this.getLocalContext();(e!==this.localContext||!this.initialized)&&(this.localContext=e,setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}if(this.state.text===void 0)return null;let e=null;return this.state.icon&&(e=Ww(this.state.icon,{marginRight:this.state.text?8:void 0,...this.state.iconStyle||void 0}),e||=_.createElement(Pt,{src:this.state.icon,style:{marginRight:this.state.text?8:void 0,...this.state.iconStyle||void 0}})),this.props.schema.container===`text`?_.createElement(ft,{variant:`standard`,fullWidth:!0,slotProps:{input:{endAdornment:this.props.schema.copyToClipboard?_.createElement(ur,{tabIndex:-1,size:`small`,onClick:()=>{$t.copyToClipboard(this.state.text||``),window.alert(K.t(`jc_Copied`))}},_.createElement(St,null)):void 0}},value:this.state.text,label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)}):_.createElement(`div`,{style:{...mT.fullWidth,...this.state.style||void 0}},e,this.props.schema.container===`html`?_.createElement(`span`,{dangerouslySetInnerHTML:{__html:this.state.text||``}}):this.state.text)}};g();var gT=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);this.setState({value:e})}renderItem(e,t){let n=this.props.schema.returnFormat!==`HH:mm:ss`,r=new Date(Date.parse(`Thu, 01 Jan 1970 ${this.state.value||`00:00:00`}`));return _.createElement(Dx,{sx:e=>({width:`100%`,borderBottom:`1px solid ${e.palette.text.primary}`,"& fieldset":{display:`none`},"& input":{padding:`${e.spacing(1.5)} 0 4px 0`},"& .MuiInputAdornment-root":{marginLeft:0,marginTop:1},"& label":{transform:`translate(0px, -9px) scale(0.75)`}}),ampm:this.props.oContext.systemConfig.dateFormat.includes(`/`),timeSteps:this.props.schema.timeSteps||this.props.schema.timesteps||{hours:1,minutes:5,seconds:5},format:this.props.schema.format||`HH:mm:ss`,disabled:!!t,value:r,onChange:e=>{let t;t=e instanceof Date?e.toTimeString().split(` `)[0]:``,n&&t&&(t=t.split(`:`).slice(0,2).join(`:`)),this.setState({value:t},()=>this.onChange(this.props.attr,this.state.value))},views:this.props.schema.views||[`hours`,`minutes`,`seconds`],label:this.getText(this.props.schema.label)})}};g();function _T(e,t){let n;return n=t&&e.substring(0,t.length)===t?e.substring(t.length+1):e,n=n.replace(/\./g,`/`).replace(/_/g,` `),n}var vT=class extends X{async componentDidMount(){var e;await super.componentDidMount();let t=X.getValue(this.props.data,this.props.attr);if(!t&&(e=this.props.customObj)!=null&&e._id){let e=_T(this.props.customObj._id,`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);this.setState({value:e})}else this.setState({value:t||``})}renderItem(e,t){return _.createElement(ft,{variant:`standard`,fullWidth:!0,slotProps:{htmlInput:{maxLength:this.props.schema.maxLength||this.props.schema.max||void 0}},value:this.state.value,error:!!e,disabled:t,placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation),onChange:e=>{let t=e.target.value;this.setState({value:t},()=>this.onChange(this.props.attr,t))}})}};g();var yT=class extends X{async componentDidMount(){var e;await super.componentDidMount();let t=await this.getCachedObject(`system.meta.uuid`);this.setState({uuid:(t==null||(e=t.native)==null?void 0:e.uuid)||`unknown`})}renderItem(e,t){return _.createElement(ft,{variant:`standard`,fullWidth:!0,error:!!e,disabled:!!t,slotProps:{htmlInput:{readOnly:!0},input:{endAdornment:_.createElement(ur,{tabIndex:-1,onClick:()=>{$t.copyToClipboard(this.state.uuid||``),window.alert(K.t(`jc_Copied %s`,this.state.uuid))}},_.createElement(he,null))}},value:this.state.uuid||``,label:this.getText(this.props.schema.label)||K.t(`jc_Serial number (UUID)`),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}};g();var bT={icon:{width:16,height:16,marginRight:8}},xT=class extends X{async componentDidMount(){await super.componentDidMount(),this.props.oContext.socket.getUsers().then(e=>{let t={},n=K.getLanguage();this.props.schema.short?e.forEach(e=>{var r,i;return t[e._id]={color:(r=e.common)==null?void 0:r.color,icon:(i=e.common)==null?void 0:i.icon,name:$t.getObjectNameFromObj(e,n)}}):e.forEach(e=>{var r,i;return t[e._id.replace(/^system\.user\./,``)]={color:(r=e.common)==null?void 0:r.color,icon:(i=e.common)==null?void 0:i.icon,name:$t.getObjectNameFromObj(e,n)}}),this.setState({users:t})}).catch(e=>console.error(`Cannot get users: ${e}`))}renderItem(e,t){var n,r;let i=X.getValue(this.props.data,this.props.attr);return _.createElement(Mn,{variant:`standard`,fullWidth:!0},this.state.users&&this.props.schema.label?_.createElement(Ze,null,this.getText(this.props.schema.label)):null,this.state.users?_.createElement(Be,{variant:`standard`,error:!!e,disabled:!!t,value:i,renderValue:e=>{var t,n,r;return _.createElement(`span`,null,this.state.users&&(t=this.state.users[e])!=null&&t.icon?_.createElement(Pt,{src:this.state.users&&((n=this.state.users[e])==null?void 0:n.icon),style:bT.icon}):null,this.state.users&&((r=this.state.users[e])==null?void 0:r.name)||e||``)},style:{color:this.state.users&&((n=this.state.users[i])==null?void 0:n.color)||void 0,backgroundColor:$t.getInvertedColor((r=this.state.users)==null||(r=r[i])==null?void 0:r.color,this.props.oContext.themeType)},onChange:e=>this.onChange(this.props.attr,e.target.value)},this.state.users&&Object.keys(this.state.users).map(e=>_.createElement(Ie,{style:{color:this.state.users[e].color||void 0,backgroundColor:$t.getInvertedColor(this.state.users[e].color,this.props.oContext.themeType)},key:e,value:e},this.state.users[e].icon?_.createElement(Pt,{src:this.state.users[e].icon,style:bT.icon}):null,this.state.users[e].name))):_.createElement(ft,{variant:`standard`,error:!!e,disabled:!!t,value:i,onChange:e=>this.props.attr&&this.onChange(this.props.attr,e.target.value),label:this.getText(this.props.schema.label)}),this.props.schema.help?_.createElement(en,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}},ST=Symbol.for(`yaml.alias`),CT=Symbol.for(`yaml.document`),wT=Symbol.for(`yaml.map`),TT=Symbol.for(`yaml.pair`),ET=Symbol.for(`yaml.scalar`),DT=Symbol.for(`yaml.seq`),OT=Symbol.for(`yaml.node.type`),kT=e=>!!e&&typeof e==`object`&&e[OT]===ST,AT=e=>!!e&&typeof e==`object`&&e[OT]===CT,jT=e=>!!e&&typeof e==`object`&&e[OT]===wT,MT=e=>!!e&&typeof e==`object`&&e[OT]===TT,NT=e=>!!e&&typeof e==`object`&&e[OT]===ET,PT=e=>!!e&&typeof e==`object`&&e[OT]===DT;function FT(e){if(e&&typeof e==`object`)switch(e[OT]){case wT:case DT:return!0}return!1}function IT(e){if(e&&typeof e==`object`)switch(e[OT]){case ST:case wT:case ET:case DT:return!0}return!1}var LT=e=>(NT(e)||FT(e))&&!!e.anchor,RT=Symbol(`break visit`),zT=Symbol(`skip children`),BT=Symbol(`remove node`);function VT(e,t){let n=UT(t);AT(e)?HT(null,e.contents,n,Object.freeze([e]))===BT&&(e.contents=null):HT(null,e,n,Object.freeze([]))}VT.BREAK=RT,VT.SKIP=zT,VT.REMOVE=BT;function HT(e,t,n,r){let i=WT(e,t,n,r);if(IT(i)||MT(i))return GT(e,r,i),HT(e,i,n,r);if(typeof i!=`symbol`){if(FT(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=HT(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===RT)return RT;else i===BT&&(t.items.splice(e,1),--e)}}else if(MT(t)){r=Object.freeze(r.concat(t));let e=HT(`key`,t.key,n,r);if(e===RT)return RT;e===BT&&(t.key=null);let i=HT(`value`,t.value,n,r);if(i===RT)return RT;i===BT&&(t.value=null)}}return i}function UT(e){return typeof e==`object`&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function WT(e,t,n,r){var i,a,o,s,c;if(typeof n==`function`)return n(e,t,r);if(jT(t))return(i=n.Map)==null?void 0:i.call(n,e,t,r);if(PT(t))return(a=n.Seq)==null?void 0:a.call(n,e,t,r);if(MT(t))return(o=n.Pair)==null?void 0:o.call(n,e,t,r);if(NT(t))return(s=n.Scalar)==null?void 0:s.call(n,e,t,r);if(kT(t))return(c=n.Alias)==null?void 0:c.call(n,e,t,r)}function GT(e,t,n){let r=t[t.length-1];if(FT(r))r.items[e]=n;else if(MT(r))e===`key`?r.key=n:r.value=n;else if(AT(r))r.contents=n;else{let e=kT(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}var KT={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},qT=e=>e.replace(/[!,[\]{}]/g,e=>KT[e]),JT=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case`1.1`:this.atNextDocument=!0;break;case`1.2`:this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:`1.2`},this.tags=Object.assign({},e.defaultTags)}return t}add(t,n){this.atNextDocument&&=(this.yaml={explicit:e.defaultYaml.explicit,version:`1.1`},this.tags=Object.assign({},e.defaultTags),!1);let r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case`%TAG`:{if(r.length!==2&&(n(0,`%TAG directive should contain exactly two parts`),r.length<2))return!1;let[e,t]=r;return this.tags[e]=t,!0}case`%YAML`:{if(this.yaml.explicit=!0,r.length!==1)return n(0,`%YAML directive should contain exactly one part`),!1;let[e]=r;if(e===`1.1`||e===`1.2`)return this.yaml.version=e,!0;{let t=/^\d+\.\d+$/.test(e);return n(6,`Unsupported YAML version ${e}`,t),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e===`!`)return`!`;if(e[0]!==`!`)return t(`Not a valid tag: ${e}`),null;if(e[1]===`<`){let n=e.slice(2,-1);return n===`!`||n===`!!`?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==`>`&&t(`Verbatim tags must end with a >`),n)}let[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let i=this.tags[n];if(i)try{return i+decodeURIComponent(r)}catch(e){return t(String(e)),null}return n===`!`?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+qT(e.substring(n.length));return e[0]===`!`?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||`1.2`}`]:[],n=Object.entries(this.tags),r;if(e&&n.length>0&&IT(e.contents)){let t={};VT(e.contents,(e,n)=>{IT(n)&&n.tag&&(t[n.tag]=!0)}),r=Object.keys(t)}else r=[];for(let[i,a]of n)(i!==`!!`||a!==`tag:yaml.org,2002:`)&&(!e||r.some(e=>e.startsWith(a)))&&t.push(`%TAG ${i} ${a}`);return t.join(`
|
|
1389
|
-
`)}};
|
|
1390
|
-
`)?
|
|
1388
|
+
`).map(e=>e.replace(`\r`,``).trim()),{schema:n}=this.props,r=((t==null?void 0:t.shift())||``).split(`;`).filter(e=>{var t;return e&&((t=n.items)==null?void 0:t.find(t=>t.attr===e))}),i=[];if(t.forEach(e=>{let t=e.split(`;`),n={};for(let e=0;e<t.length;e++){let i=t[e];if(i.startsWith(`"`)){for(i=i.substring(1);e<t.length&&!i.endsWith(`"`);)i+=`;${t[++e]}`;i=i.substring(0,i.length-1)}let o=i;if(i===`true`)o=!0;else if(i===`false`)o=!1;else if(window.isFinite(i)){var a;let t=(a=this.props.schema.items)==null?void 0:a.find(t=>t.attr===r[e]);o=t&&t.type===`number`?parseFloat(i):i}else o=i;n[r[e]]=o}i.push(n)}),i.length){var a;(a=this.state.value)!=null&&a.length?this.setState({showTypeOfImportDialog:i,showImportDialog:!1}):this.setState({value:i,showImportDialog:!1})}else window.alert(`jc_No data found in file`)}isAnyFilterSet(){return!!Object.keys(this.filterRefs).find(t=>e.getFilterValue(this.filterRefs[t]))}onMoveUp(e){let t=JSON.parse(JSON.stringify(this.state.value)),n=t[e];t.splice(e,1),t.splice(e-1,0,n),this.setState({value:t,iteration:this.state.iteration+1e4},()=>this.applyFilter(!1,void 0,()=>this.onChangeWrapper(t)))}onMoveDown(e){let t=JSON.parse(JSON.stringify(this.state.value)),n=t[e];t.splice(e,1),t.splice(e+1,0,n),this.setState({value:t,iteration:this.state.iteration+1e4},()=>this.applyFilter(!1,void 0,()=>this.onChangeWrapper(t)))}onDrop(e){let t=e[0],n=new FileReader;n.onabort=()=>console.log(`file reading was aborted`),n.onerror=()=>console.log(`file reading has failed`),n.onload=()=>{if(t.size>hw){window.alert(J.t(`jc_File is too big. Max %sk allowed. Try use SVG.`,Math.round(hw/1024)));return}let e=new Uint8Array(n.result).reduce((e,t)=>e+String.fromCharCode(t),``);this.onImport(e)},n.readAsArrayBuffer(t)}showTypeOfImportDialog(){return this.state.showTypeOfImportDialog?_.createElement(nn,{open:!0,onClose:()=>this.setState({showTypeOfImportDialog:!1}),maxWidth:`md`},_.createElement(Nt,null,J.t(`jc_Append or replace?`)),_.createElement(Tn,null,J.t(`jc_Append %s entries or replace existing?`,this.state.showTypeOfImportDialog.length)),_.createElement(Et,null,_.createElement(xt,{variant:`contained`,color:`primary`,autoFocus:!0,onClick:()=>{let e=JSON.parse(JSON.stringify(this.state.value));this.state.showTypeOfImportDialog.forEach(t=>e.push(t)),this.setState({value:e,iteration:this.state.iteration+1e4,showTypeOfImportDialog:!1},()=>this.applyFilter(!1,void 0,()=>this.onChangeWrapper(e)))}},J.t(`jc_Append`)),_.createElement(xt,{variant:`contained`,color:`secondary`,autoFocus:!0,onClick:()=>{let e=this.state.showTypeOfImportDialog;this.setState({value:e,iteration:this.state.iteration+1e4,showTypeOfImportDialog:!1},()=>this.applyFilter(!1,void 0,()=>this.onChangeWrapper(e)))}},J.t(`jc_Replace`)))):null}showImportDialog(){return this.state.showImportDialog?_.createElement(nn,{open:!0,onClose:()=>this.setState({showImportDialog:!1}),sx:{"& .MuiDialog-paper":{minHeight:500}},maxWidth:`md`,fullWidth:!0},_.createElement(Nt,null,J.t(`jc_Import from %s`,`CSV`)),_.createElement(Tn,null,_.createElement(or,{multiple:!1,accept:{"text/csv":[`.csv`]},maxSize:hw,onDragEnter:()=>this.setState({uploadFile:`dragging`}),onDragLeave:()=>this.setState({uploadFile:!0}),onDrop:(e,t)=>{if(this.setState({uploadFile:!1}),e.length)this.onDrop(e);else{var n;window.alert((t==null||(n=t[0])==null||(n=n.errors)==null||(n=n[0])==null?void 0:n.message)||J.t(`jc_Cannot upload`))}}},({getRootProps:e,getInputProps:t})=>_.createElement(`div`,{style:{...gw.uploadDiv,...this.state.uploadFile===`dragging`?gw.uploadDivDragging:void 0,...gw.dropZone,...this.state.icon?void 0:gw.dropZoneEmpty},...e()},_.createElement(`input`,{...t()}),_.createElement(`div`,{style:gw.uploadCenterDiv},_.createElement(`div`,{style:gw.uploadCenterTextAndIcon},_.createElement(nr,{style:gw.uploadCenterIcon}),_.createElement(`div`,{style:gw.uploadCenterText},this.state.uploadFile===`dragging`?J.t(`jc_Drop file here`):J.t(`jc_Place your files here or click here to open the browse dialog`))))))),_.createElement(Et,null,_.createElement(xt,{variant:`contained`,onClick:()=>this.setState({showImportDialog:!1}),color:`primary`,startIcon:_.createElement(De,null)},J.t(`jc_Cancel`)))):null}renderOneFilter(t){return _.createElement(Ee,{key:`${t.headCell.attr}_${t.index}`,style:t.style,align:`left`,sortDirection:t.orderBy===t.headCell.attr&&t.order},_.createElement(`div`,{style:{...gw.flex,...t.schema.showFirstAddOnTop?{flexDirection:`column`}:void 0}},t.showAddButton?this.renderAddButton(t.doAnyFilterSet):null,t.headCell.sort&&_.createElement(lt,{active:!0,style:t.orderBy===t.headCell.attr?void 0:gw.silver,direction:t.orderBy===t.headCell.attr?t.order:`asc`,onClick:()=>t.headCell.attr&&this.handleRequestSort(t.headCell.attr)}),t.headCell.filter&&t.headCell.attr&&this.state.filterOn.includes(t.headCell.attr)?_.createElement(ot,{variant:`standard`,ref:this.filterRefs[t.headCell.attr],onChange:()=>this.applyFilter(),title:J.t(`jc_You can filter entries by entering here some text`),slotProps:{input:{endAdornment:e.getFilterValue(this.filterRefs[t.headCell.attr])&&_.createElement(At,{position:`end`},_.createElement(Zn,{size:`small`,tabIndex:-1,onClick:()=>{e.setFilterValue(this.filterRefs[t.headCell.attr],``),this.applyFilter()}},_.createElement(De,null)))}},fullWidth:!0,placeholder:this.getText(t.headCell.title)}):_.createElement(`span`,{style:gw.headerText},this.getText(t.headCell.title)),this.renderShowHideFilter(t.headCell)))}enhancedFilterCard(){var e;let{schema:t}=this.props,{order:n,orderBy:r}=this.state,i;this.props.schema.compact&&(i={paddingTop:1,paddingBottom:1});let a=!t.noDelete&&t.import||t.export;if(a||(e=t.items)!=null&&e.find(e=>e.sort||e.filter)){var o;return _.createElement(Jt,{size:{xs:t.xs||12,sm:t.sm||void 0,md:t.md||void 0,lg:t.lg||void 0,xl:t.xl||void 0}},_.createElement(Ge,null,_.createElement(A,{style:gw.paper},_.createElement(Ae,{style:gw.paper},_.createElement(pn,{expandIcon:_.createElement(N,null)},_.createElement(Pn,null,J.t(`jc_Filter and Data Actions`))),_.createElement(xn,null,_.createElement(H,null,_.createElement(_e,null,((o=t.items)==null?void 0:o.find(e=>e.sort||e.filter))&&t.items.map((e,a)=>_.createElement(F,{key:`${e.attr}_${a}`},this.renderOneFilter({schema:t,style:i,showAddButton:!1,headCell:e,order:n,orderBy:r,index:a,doAnyFilterSet:!1}))),a?_.createElement(F,null,_.createElement(Ee,{align:`left`,style:i},_.createElement(`span`,{style:gw.headerText},J.t(`jc_Actions`))),_.createElement(Ee,{style:i},this.renderImportExportButtons(t))):null)))))))}return null}enhancedBottomCard(){var e;let{schema:t}=this.props,n;this.props.schema.compact&&(n={paddingTop:1,paddingBottom:1});let r=this.isAnyFilterSet();return _.createElement(Jt,{size:{xs:t.xs||12,sm:t.sm||void 0,md:t.md||void 0,lg:t.lg||void 0,xl:t.xl||void 0}},_.createElement(Ge,null,_.createElement(A,{style:gw.paper},_.createElement(H,null,_.createElement(_e,null,_.createElement(F,null,_.createElement(Ee,{colSpan:(((e=t.items)==null?void 0:e.length)||0)+1,style:n},this.renderAddButton(r))))))))}renderCards(){let{schema:e}=this.props,{visibleValue:t}=this.state,n;this.props.schema.compact&&(n={paddingTop:1,paddingBottom:1});let r={padding:0,borderBottom:`none`};t||=this.state.value.map((e,t)=>t);let i=this.isAnyFilterSet();return _.createElement(Jt,{container:!0},this.showImportDialog(),this.showTypeOfImportDialog(),this.enhancedFilterCard(),t.map((a,o)=>{var s,c,l;return _.createElement(Jt,{key:`${a}_${o}`,size:{xs:e.xs||12,sm:e.sm||void 0,md:e.md||void 0,lg:e.lg||void 0,xl:e.xl||void 0}},_.createElement(Ge,{sx:this.state.tableErrors[a]?{outline:`1px solid red`}:void 0},_.createElement(A,{style:gw.paper},this.props.schema.titleAttribute?_.createElement(vt,{sx:gw.cardHeader},_.createElement(`div`,null,this.state.value[a][this.props.schema.titleAttribute]),_.createElement(`div`,null,!i&&!this.state.orderBy?_.createElement(Ce,{title:J.t(`jc_Move up`),slotProps:{popper:{sx:gw.tooltip}}},_.createElement(`span`,null,_.createElement(Zn,{size:`small`,onClick:()=>this.onMoveUp(a),disabled:o===0},_.createElement(hn,null)))):null,!i&&!this.state.orderBy?_.createElement(Ce,{title:J.t(`jc_Move down`),slotProps:{popper:{sx:gw.tooltip}}},_.createElement(`span`,null,_.createElement(Zn,{size:`small`,onClick:()=>this.onMoveDown(a),disabled:o===t.length-1},_.createElement(Ot,null)))):null,_.createElement(Ce,{title:J.t(`jc_Delete current row`),slotProps:{popper:{sx:gw.tooltip}}},_.createElement(Zn,{size:`small`,onClick:this.onDelete(a)},_.createElement(me,null))),this.props.schema.clone?_.createElement(Ce,{title:J.t(`jc_Clone current row`),slotProps:{popper:{sx:gw.tooltip}}},_.createElement(Zn,{size:`small`,onClick:this.onClone(a)},_.createElement(se,null))):null,_.createElement(Ce,{title:J.t(`jc_Expand/Collapse card`),slotProps:{popper:{sx:gw.tooltip}}},_.createElement(Zn,{size:`small`,onClick:()=>{let e=[...this.state.collapsed],t=e.indexOf(a);t===-1?e.push(a):e.splice(t,1),window.localStorage.setItem(`table.collapsed.${this.props.oContext.instance}.${this.props.attr}`,JSON.stringify(e)),this.setState({collapsed:e})}},_.createElement(N,{style:{rotate:(s=this.state.collapsed)!=null&&s.includes(a)?`0deg`:`180deg`,transition:`0.3s`,transitionProperty:`rotate`}}))))):null,_.createElement(In,{in:!((c=this.state.collapsed)!=null&&c.includes(a)),timeout:`auto`,unmountOnExit:!0},_.createElement(H,null,_.createElement(_e,null,(l=e.items)==null?void 0:l.map(e=>{var t;let i=e.attr&&((t=this.listOfHiddenElements)==null||(t=t[a])==null?void 0:t.includes(e.attr));return _.createElement(F,{key:`${e.attr}_${a}`},_.createElement(Ee,{align:`left`,style:i?r:n},i?null:_.createElement(`span`,{style:gw.headerText},this.getText(e.title))),_.createElement(Ee,{align:`left`,style:i?r:n},e.attr&&this.itemTable(e.attr,this.state.value[a],a,!0)))}),!this.props.schema.titleAttribute&&!e.noDelete&&_.createElement(F,null,_.createElement(Ee,{align:`left`,style:n},_.createElement(`span`,{style:gw.headerText},this.getText(`Actions`))),_.createElement(Ee,{align:`left`,style:n},!i&&!this.state.orderBy?_.createElement(Ce,{title:J.t(`jc_Move up`),slotProps:{popper:{sx:gw.tooltip}}},_.createElement(`span`,null,_.createElement(Zn,{size:`small`,onClick:()=>this.onMoveUp(a),disabled:o===0},_.createElement(hn,null)))):null,!i&&!this.state.orderBy?_.createElement(Ce,{title:J.t(`jc_Move down`),slotProps:{popper:{sx:gw.tooltip}}},_.createElement(`span`,null,_.createElement(Zn,{size:`small`,onClick:()=>this.onMoveDown(a),disabled:o===t.length-1},_.createElement(Ot,null)))):null,_.createElement(Ce,{title:J.t(`jc_Delete current row`),slotProps:{popper:{sx:gw.tooltip}}},_.createElement(Zn,{size:`small`,onClick:this.onDelete(a)},_.createElement(me,null))),this.props.schema.clone?_.createElement(Ce,{title:J.t(`jc_Clone current row`),slotProps:{popper:{sx:gw.tooltip}}},_.createElement(Zn,{size:`small`,onClick:this.onClone(a)},_.createElement(se,null))):null))))))))}),this.enhancedBottomCard())}renderTable(){var e;let{schema:t}=this.props,{visibleValue:n}=this.state;n||=this.state.value.map((e,t)=>t);let r=this.isAnyFilterSet(),i;return this.props.schema.compact&&(i={paddingTop:1,paddingBottom:1}),_.createElement(A,{style:gw.paper},this.showImportDialog(),this.showTypeOfImportDialog(),t.label?_.createElement(`div`,{style:gw.label},_.createElement(ue,{variant:`dense`,style:gw.rootTool},_.createElement(Pn,{style:gw.title,variant:`h6`,id:`tableTitle`,component:`div`},this.getText(t.label)))):null,_.createElement(Ye,null,_.createElement(H,{style:gw.table,size:`small`},this.enhancedTableHead(!r&&!this.state.orderBy?120:64,r),_.createElement(_e,null,n.map((e,a)=>{var o;return _.createElement(F,{hover:!0,key:`${e}_${a}`,sx:this.state.tableErrors[e]?{outline:`1px solid red`}:void 0},(o=t.items)==null?void 0:o.map(t=>_.createElement(Ee,{key:`${t.attr}_${e}`,align:`left`,style:i},t.attr&&this.itemTable(t.attr,this.state.value[e],e,!1))),!t.noDelete&&_.createElement(Ee,{align:`left`,style:{...i,...gw.buttonCell}},!r&&!this.state.orderBy?a?_.createElement(Ce,{title:J.t(`jc_Move up`),slotProps:{popper:{sx:gw.tooltip}}},_.createElement(Zn,{size:`small`,onClick:()=>this.onMoveUp(e)},_.createElement(hn,null))):_.createElement(`div`,{style:gw.buttonEmpty}):null,!r&&!this.state.orderBy?a<n.length-1?_.createElement(Ce,{title:J.t(`jc_Move down`),slotProps:{popper:{sx:gw.tooltip}}},_.createElement(Zn,{size:`small`,onClick:()=>this.onMoveDown(e)},_.createElement(Ot,null))):_.createElement(`div`,{style:gw.buttonEmpty}):null,_.createElement(Ce,{title:J.t(`jc_Delete current row`),slotProps:{popper:{sx:gw.tooltip}}},_.createElement(Zn,{size:`small`,onClick:this.onDelete(e)},_.createElement(me,null))),this.props.schema.clone?_.createElement(Ce,{title:J.t(`jc_Clone current row`),slotProps:{popper:{sx:gw.tooltip}}},_.createElement(Zn,{size:`small`,onClick:this.onClone(e)},_.createElement(se,null))):null))}),!t.noDelete&&n.length>=(t.showSecondAddAt||5)?_.createElement(F,null,_.createElement(Ee,{colSpan:(((e=t.items)==null?void 0:e.length)||0)+1,style:{...i}},this.renderAddButton(r))):null)),!n.length&&this.state.value.length?_.createElement(`div`,{style:gw.filteredOut},_.createElement(Pn,{style:gw.title,variant:`h6`,id:`tableTitle`,component:`div`},J.t(`jc_All items are filtered out`),_.createElement(Zn,{size:`small`,onClick:()=>this.applyFilter(!0)},_.createElement(De,null)))):null),t.help?_.createElement(_n,{style:{paddingLeft:16}},this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null,this.state.errorMessage?_.createElement(`div`,{style:{display:`flex`,padding:`5px`}},_.createElement(et,{color:`error`}),_.createElement(`span`,{style:{color:`red`,alignSelf:`center`}},this.state.errorMessage)):null)}componentDidUpdate(){var e;(e=this.refDiv.current)!=null&&e.clientWidth&&this.refDiv.current.clientWidth!==this.state.width&&(this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{var e;this.resizeTimeout=null,(e=this.refDiv.current)!=null&&e.clientWidth&&this.setState({width:this.refDiv.current.clientWidth})},50))}getCurrentBreakpoint(){return this.state.width?this.state.width<600?`xs`:this.state.width<900?`sm`:this.state.width<1200?`md`:this.state.width<1536?`lg`:`xl`:`md`}renderItem(){let{schema:e}=this.props;if(!this.state.value||!Array.isArray(this.state.value))return null;let t=this.getCurrentBreakpoint(),n=null;return n=t&&(e.useCardFor||[`xs`]).includes(t)?this.renderCards():this.renderTable(),_.createElement(`div`,{ref:this.refDiv,style:{width:`100%`}},n)}};g();var Sw={indeterminate:{opacity:.5},label:{width:`100%`,fontSize:14,marginBottom:2},helper:{width:`100%`,fontSize:12},error:{width:`100%`,fontSize:12,color:`#FF0000`}},Cw=class extends X{constructor(...e){super(...e),K(this,`updateTimeout`,null)}async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);if(Array.isArray(e)&&this.props.oContext.multiEdit){e=X.DIFFERENT_VALUE,this.setState({value:e,oldValue:e,jsonError:!1});return}this.setState({value:e,oldValue:e,jsonError:this.validateJson(e)})}validateJson(e){let t=!1;if(this.props.schema.validateJson&&(e||!this.props.schema.allowEmpty))try{JSON.parse(e)}catch(e){console.log(`Error in JSON`,e),t=!0}return t}static getDerivedStateFromProps(e,t){if(e.oContext.multiEdit&&t.value===X.DIFFERENT_VALUE)return{value:X.DIFFERENT_VALUE};let n=X.getValue(e.data,e.attr);return n!=null&&(n=n.toString()),n==null||n!==t.value&&n!==t.oldValue?{value:n}:null}renderItem(e,t){let n=Array.isArray(this.state.value)||this.state.value===X.DIFFERENT_VALUE;if(this.props.schema.time){let n=``;return typeof this.state.value==`number`?n=this.state.value&&this.state.value<9466596e5?new Date(this.state.value*1e3).toLocaleString():new Date(this.state.value).toLocaleString():typeof this.state.value==`string`&&(n=new Date(this.state.value).toLocaleString()),_.createElement(ot,{variant:`standard`,fullWidth:!0,value:n,error:!!e||!!this.state.jsonError,disabled:!!t,slotProps:{htmlInput:{readOnly:!0}},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}if(this.state.oldValue==null?this.updateTimeout&&=(clearTimeout(this.updateTimeout),null):(this.updateTimeout&&clearTimeout(this.updateTimeout),this.updateTimeout=setTimeout(()=>{this.updateTimeout=null,this.setState({oldValue:void 0})},30)),n){let n=X.getValue(this.props.data,this.props.attr),r=(n==null?void 0:n.filter(e=>e||e===0).map(e=>({label:e.toString()||``,value:e})))||[];return r.unshift({label:J.t(X.DIFFERENT_LABEL),value:X.DIFFERENT_VALUE}),_.createElement(un,{style:Sw.indeterminate,fullWidth:!0,value:r[0],onChange:(e,t)=>{let n=t?t.value:``,r=this.onChange(this.props.attr,n,()=>{this.setState({value:n,oldValue:n,jsonError:this.validateJson(t)})});r instanceof Promise&&r.catch(e=>console.error(`Cannot set value: ${e}`))},options:r,getOptionLabel:e=>e.label,renderInput:n=>_.createElement(ot,{variant:`standard`,...n,error:!!e,placeholder:this.getText(this.props.schema.placeholder),slotProps:{...n.slotProps,htmlInput:{...n.slotProps.htmlInput,maxLength:this.props.schema.maxLength||this.props.schema.max||void 0,readOnly:this.props.schema.readOnly||!1}},label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation),disabled:!!t})})}let r,i;if((this.props.schema.readOnly||t)&&this.props.schema.copyToClipboard?((this.props.schema.minRows||0)>1&&(i={position:`absolute`,right:3,top:20,zIndex:1e3}),r=_.createElement(Zn,{tabIndex:-1,style:i,size:`small`,onClick:()=>{Zt.copyToClipboard(this.state.value),window.alert(J.t(`jc_Copied`))}},_.createElement(St,null))):!this.props.schema.readOnly&&!t&&this.state.value&&!this.props.schema.noClearButton&&((this.props.schema.minRows||0)>1&&(i={position:`absolute`,right:3,top:20,zIndex:1e3}),r=_.createElement(Zn,{style:i,size:`small`,tabIndex:-1,onClick:()=>this.setState({value:``,oldValue:this.state.value},()=>this.onChange(this.props.attr,``))},_.createElement(De,null)),(this.props.schema.minRows||0)<=1&&(r=_.createElement(At,{position:`end`},r))),(this.props.schema.minRows||0)>1){let n=this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation);return _.createElement(`div`,{style:{width:`100%`,position:`relative`}},this.props.schema.label?_.createElement(`div`,{style:Sw.label},this.getText(this.props.schema.label)):null,_.createElement(ft,{style:{width:`100%`,resize:`vertical`,backgroundColor:this.props.oContext.themeType===`dark`?`#363636`:`#cccccc`,color:this.props.oContext.themeType===`dark`?`#fff`:`#111`},minRows:this.props.schema.minRows,maxRows:this.props.schema.maxRows,value:this.state.value??``,disabled:!!t,readOnly:this.props.schema.readOnly||!1,onChange:e=>{let t=e.target.value;this.setState({value:t,oldValue:this.state.value,jsonError:this.validateJson(t)},()=>this.onChange(this.props.attr,t||``))},placeholder:this.getText(this.props.schema.placeholder)}),n||e||this.state.jsonError?_.createElement(`div`,{style:e?Sw.error:Sw.helper},e||(this.state.jsonError?J.t(`jc_Invalid JSON`):n)):null)}return _.createElement(ot,{variant:`standard`,fullWidth:!0,value:this.state.value??``,error:!!e||!!this.state.jsonError,disabled:!!t,slotProps:{htmlInput:{maxLength:this.props.schema.maxLength||this.props.schema.max||void 0,readOnly:this.props.schema.readOnly||!1},input:{endAdornment:r}},onChange:e=>{let t=e.target.value;this.setState({value:t,oldValue:this.state.value,jsonError:this.validateJson(t)},()=>this.onChange(this.props.attr,t))},placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.state.jsonError?J.t(`jc_Invalid JSON`):this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}};g();var ww={fullWidth:{width:`100%`}},Tw=class extends X{constructor(...e){super(...e),K(this,`initialized`,!1),K(this,`localContext`,void 0)}async askInstance(){if(this.props.alive){let e=this.props.schema.data;if(e===void 0&&this.props.schema.jsonData){let t=await this.getPatternAsync(this.props.schema.jsonData,null,!0);try{e=JSON.parse(t)}catch{console.error(`Cannot parse json data: ${t}`)}}e??=null;let t=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(t!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){let e=await this.props.oContext.socket.getState(`system.adapter.${t}.alive`);if(!(e!=null&&e.val)){window.alert(J.t(`jc_Instance %s is not alive`,t));return}}this.props.oContext.socket.sendTo(t,this.props.schema.command||`send`,e).then(e=>{if(typeof e==`object`){let t=e;this.setState({text:t.text||``,style:t.style,icon:t.icon,iconStyle:t.iconStyle})}else typeof e==`string`&&this.setState({text:e||``})}).catch(e=>console.error(`Cannot send command: ${e}`))}}getLocalContext(){let e={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(t=>e[t]=X.getValue(this.props.data,t)),JSON.stringify(e)}renderItem(){if(this.props.alive){let e=this.getLocalContext();(e!==this.localContext||!this.initialized)&&(this.localContext=e,setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}if(this.state.text===void 0)return null;let e=null;return this.state.icon&&(e=ew(this.state.icon,{marginRight:this.state.text?8:void 0,...this.state.iconStyle||void 0}),e||=_.createElement(Mt,{src:this.state.icon,style:{marginRight:this.state.text?8:void 0,...this.state.iconStyle||void 0}})),this.props.schema.container===`text`?_.createElement(ot,{variant:`standard`,fullWidth:!0,slotProps:{input:{endAdornment:this.props.schema.copyToClipboard?_.createElement(Zn,{tabIndex:-1,size:`small`,onClick:()=>{Zt.copyToClipboard(this.state.text||``),window.alert(J.t(`jc_Copied`))}},_.createElement(St,null)):void 0}},value:this.state.text,label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)}):_.createElement(`div`,{style:{...ww.fullWidth,...this.state.style||void 0}},e,this.props.schema.container===`html`?_.createElement(`span`,{dangerouslySetInnerHTML:{__html:this.state.text||``}}):this.state.text)}};g();var Ew=class extends X{async componentDidMount(){await super.componentDidMount();let e=X.getValue(this.props.data,this.props.attr);this.setState({value:e})}renderItem(e,t){let n=this.props.schema.returnFormat!==`HH:mm:ss`,r=new Date(Date.parse(`Thu, 01 Jan 1970 ${this.state.value||`00:00:00`}`));return _.createElement(Dx,{sx:e=>({width:`100%`,borderBottom:`1px solid ${e.palette.text.primary}`,"& fieldset":{display:`none`},"& input":{padding:`${e.spacing(1.5)} 0 4px 0`},"& .MuiInputAdornment-root":{marginLeft:0,marginTop:1},"& label":{transform:`translate(0px, -9px) scale(0.75)`}}),ampm:this.props.oContext.systemConfig.dateFormat.includes(`/`),timeSteps:this.props.schema.timeSteps||this.props.schema.timesteps||{hours:1,minutes:5,seconds:5},format:this.props.schema.format||`HH:mm:ss`,disabled:!!t,value:r,onChange:e=>{let t;t=e instanceof Date?e.toTimeString().split(` `)[0]:``,n&&t&&(t=t.split(`:`).slice(0,2).join(`:`)),this.setState({value:t},()=>this.onChange(this.props.attr,this.state.value))},views:this.props.schema.views||[`hours`,`minutes`,`seconds`],label:this.getText(this.props.schema.label)})}};g();function Dw(e,t){let n;return n=t&&e.substring(0,t.length)===t?e.substring(t.length+1):e,n=n.replace(/\./g,`/`).replace(/_/g,` `),n}var Ow=class extends X{async componentDidMount(){var e;await super.componentDidMount();let t=X.getValue(this.props.data,this.props.attr);if(!t&&(e=this.props.customObj)!=null&&e._id){let e=Dw(this.props.customObj._id,`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);this.setState({value:e})}else this.setState({value:t||``})}renderItem(e,t){return _.createElement(ot,{variant:`standard`,fullWidth:!0,slotProps:{htmlInput:{maxLength:this.props.schema.maxLength||this.props.schema.max||void 0}},value:this.state.value,error:!!e,disabled:t,placeholder:this.getText(this.props.schema.placeholder),label:this.getText(this.props.schema.label),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation),onChange:e=>{let t=e.target.value;this.setState({value:t},()=>this.onChange(this.props.attr,t))}})}};g();var kw=class extends X{async componentDidMount(){var e;await super.componentDidMount();let t=await this.getCachedObject(`system.meta.uuid`);this.setState({uuid:(t==null||(e=t.native)==null?void 0:e.uuid)||`unknown`})}renderItem(e,t){return _.createElement(ot,{variant:`standard`,fullWidth:!0,error:!!e,disabled:!!t,slotProps:{htmlInput:{readOnly:!0},input:{endAdornment:_.createElement(Zn,{tabIndex:-1,onClick:()=>{Zt.copyToClipboard(this.state.uuid||``),window.alert(J.t(`jc_Copied %s`,this.state.uuid))}},_.createElement(se,null))}},value:this.state.uuid||``,label:this.getText(this.props.schema.label)||J.t(`jc_Serial number (UUID)`),helperText:this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)})}};g();var Aw={icon:{width:16,height:16,marginRight:8}},jw=class extends X{async componentDidMount(){await super.componentDidMount(),this.props.oContext.socket.getUsers().then(e=>{let t={},n=J.getLanguage();this.props.schema.short?e.forEach(e=>{var r,i;return t[e._id]={color:(r=e.common)==null?void 0:r.color,icon:(i=e.common)==null?void 0:i.icon,name:Zt.getObjectNameFromObj(e,n)}}):e.forEach(e=>{var r,i;return t[e._id.replace(/^system\.user\./,``)]={color:(r=e.common)==null?void 0:r.color,icon:(i=e.common)==null?void 0:i.icon,name:Zt.getObjectNameFromObj(e,n)}}),this.setState({users:t})}).catch(e=>console.error(`Cannot get users: ${e}`))}renderItem(e,t){var n,r;let i=X.getValue(this.props.data,this.props.attr);return _.createElement(Wt,{variant:`standard`,fullWidth:!0},this.state.users&&this.props.schema.label?_.createElement(rr,null,this.getText(this.props.schema.label)):null,this.state.users?_.createElement(Me,{variant:`standard`,error:!!e,disabled:!!t,value:i,renderValue:e=>{var t,n,r;return _.createElement(`span`,null,this.state.users&&(t=this.state.users[e])!=null&&t.icon?_.createElement(Mt,{src:this.state.users&&((n=this.state.users[e])==null?void 0:n.icon),style:Aw.icon}):null,this.state.users&&((r=this.state.users[e])==null?void 0:r.name)||e||``)},style:{color:this.state.users&&((n=this.state.users[i])==null?void 0:n.color)||void 0,backgroundColor:Zt.getInvertedColor((r=this.state.users)==null||(r=r[i])==null?void 0:r.color,this.props.oContext.themeType)},onChange:e=>this.onChange(this.props.attr,e.target.value)},this.state.users&&Object.keys(this.state.users).map(e=>_.createElement(z,{style:{color:this.state.users[e].color||void 0,backgroundColor:Zt.getInvertedColor(this.state.users[e].color,this.props.oContext.themeType)},key:e,value:e},this.state.users[e].icon?_.createElement(Mt,{src:this.state.users[e].icon,style:Aw.icon}):null,this.state.users[e].name))):_.createElement(ot,{variant:`standard`,error:!!e,disabled:!!t,value:i,onChange:e=>this.props.attr&&this.onChange(this.props.attr,e.target.value),label:this.getText(this.props.schema.label)}),this.props.schema.help?_.createElement(_n,null,this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}},Mw=Symbol.for(`yaml.alias`),Nw=Symbol.for(`yaml.document`),Pw=Symbol.for(`yaml.map`),Fw=Symbol.for(`yaml.pair`),Iw=Symbol.for(`yaml.scalar`),Lw=Symbol.for(`yaml.seq`),Rw=Symbol.for(`yaml.node.type`),zw=e=>!!e&&typeof e==`object`&&e[Rw]===Mw,Bw=e=>!!e&&typeof e==`object`&&e[Rw]===Nw,Vw=e=>!!e&&typeof e==`object`&&e[Rw]===Pw,Hw=e=>!!e&&typeof e==`object`&&e[Rw]===Fw,Uw=e=>!!e&&typeof e==`object`&&e[Rw]===Iw,Ww=e=>!!e&&typeof e==`object`&&e[Rw]===Lw;function Gw(e){if(e&&typeof e==`object`)switch(e[Rw]){case Pw:case Lw:return!0}return!1}function Kw(e){if(e&&typeof e==`object`)switch(e[Rw]){case Mw:case Pw:case Iw:case Lw:return!0}return!1}var qw=e=>(Uw(e)||Gw(e))&&!!e.anchor,Jw=Symbol(`break visit`),Yw=Symbol(`skip children`),Xw=Symbol(`remove node`);function Zw(e,t){let n=$w(t);Bw(e)?Qw(null,e.contents,n,Object.freeze([e]))===Xw&&(e.contents=null):Qw(null,e,n,Object.freeze([]))}Zw.BREAK=Jw,Zw.SKIP=Yw,Zw.REMOVE=Xw;function Qw(e,t,n,r){let i=eT(e,t,n,r);if(Kw(i)||Hw(i))return tT(e,r,i),Qw(e,i,n,r);if(typeof i!=`symbol`){if(Gw(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=Qw(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===Jw)return Jw;else i===Xw&&(t.items.splice(e,1),--e)}}else if(Hw(t)){r=Object.freeze(r.concat(t));let e=Qw(`key`,t.key,n,r);if(e===Jw)return Jw;e===Xw&&(t.key=null);let i=Qw(`value`,t.value,n,r);if(i===Jw)return Jw;i===Xw&&(t.value=null)}}return i}function $w(e){return typeof e==`object`&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function eT(e,t,n,r){var i,a,o,s,c;if(typeof n==`function`)return n(e,t,r);if(Vw(t))return(i=n.Map)==null?void 0:i.call(n,e,t,r);if(Ww(t))return(a=n.Seq)==null?void 0:a.call(n,e,t,r);if(Hw(t))return(o=n.Pair)==null?void 0:o.call(n,e,t,r);if(Uw(t))return(s=n.Scalar)==null?void 0:s.call(n,e,t,r);if(zw(t))return(c=n.Alias)==null?void 0:c.call(n,e,t,r)}function tT(e,t,n){let r=t[t.length-1];if(Gw(r))r.items[e]=n;else if(Hw(r))e===`key`?r.key=n:r.value=n;else if(Bw(r))r.contents=n;else{let e=zw(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}var nT={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},rT=e=>e.replace(/[!,[\]{}]/g,e=>nT[e]),iT=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case`1.1`:this.atNextDocument=!0;break;case`1.2`:this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:`1.2`},this.tags=Object.assign({},e.defaultTags)}return t}add(t,n){this.atNextDocument&&=(this.yaml={explicit:e.defaultYaml.explicit,version:`1.1`},this.tags=Object.assign({},e.defaultTags),!1);let r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case`%TAG`:{if(r.length!==2&&(n(0,`%TAG directive should contain exactly two parts`),r.length<2))return!1;let[e,t]=r;return this.tags[e]=t,!0}case`%YAML`:{if(this.yaml.explicit=!0,r.length!==1)return n(0,`%YAML directive should contain exactly one part`),!1;let[e]=r;if(e===`1.1`||e===`1.2`)return this.yaml.version=e,!0;{let t=/^\d+\.\d+$/.test(e);return n(6,`Unsupported YAML version ${e}`,t),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e===`!`)return`!`;if(e[0]!==`!`)return t(`Not a valid tag: ${e}`),null;if(e[1]===`<`){let n=e.slice(2,-1);return n===`!`||n===`!!`?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==`>`&&t(`Verbatim tags must end with a >`),n)}let[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let i=this.tags[n];if(i)try{return i+decodeURIComponent(r)}catch(e){return t(String(e)),null}return n===`!`?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+rT(e.substring(n.length));return e[0]===`!`?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||`1.2`}`]:[],n=Object.entries(this.tags),r;if(e&&n.length>0&&Kw(e.contents)){let t={};Zw(e.contents,(e,n)=>{Kw(n)&&n.tag&&(t[n.tag]=!0)}),r=Object.keys(t)}else r=[];for(let[i,a]of n)(i!==`!!`||a!==`tag:yaml.org,2002:`)&&(!e||r.some(e=>e.startsWith(a)))&&t.push(`%TAG ${i} ${a}`);return t.join(`
|
|
1389
|
+
`)}};iT.defaultYaml={explicit:!1,version:`1.2`},iT.defaultTags={"!!":`tag:yaml.org,2002:`};function aT(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw Error(t)}return!0}function oT(e){let t=new Set;return Zw(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function sT(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function cT(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=oT(e);let a=sT(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t==`object`&&t.anchor&&(Uw(t.node)||Gw(t.node)))t.node.anchor=t.anchor;else{let t=Error(`Failed to resolve repeated object (this should not happen)`);throw t.source=e,t}}},sourceObjects:r}}function lT(e,t,n,r){if(r&&typeof r==`object`)if(Array.isArray(r))for(let t=0,n=r.length;t<n;++t){let n=r[t],i=lT(e,r,String(t),n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}else if(r instanceof Map)for(let t of Array.from(r.keys())){let n=r.get(t),i=lT(e,r,t,n);i===void 0?r.delete(t):i!==n&&r.set(t,i)}else if(r instanceof Set)for(let t of Array.from(r)){let n=lT(e,r,t,t);n===void 0?r.delete(t):n!==t&&(r.delete(t),r.add(n))}else for(let[t,n]of Object.entries(r)){let i=lT(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}return e.call(t,n,r)}function uT(e,t,n){if(Array.isArray(e))return e.map((e,t)=>uT(e,String(t),n));if(e&&typeof e.toJSON==`function`){if(!n||!qw(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=e=>{r.res=e,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e==`bigint`&&!(n!=null&&n.keep)?Number(e):e}var dT=class{constructor(e){Object.defineProperty(this,Rw,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:r,reviver:i}={}){if(!Bw(e))throw TypeError(`A document argument is required`);let a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n==`number`?n:100},o=uT(this,``,a);if(typeof r==`function`)for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i==`function`?lT(i,{"":o},``,o):o}},fT=class extends dT{constructor(e){super(Mw),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error(`Alias nodes cannot have tags`)}})}resolve(e,t){if((t==null?void 0:t.maxAliasCount)===0)throw ReferenceError(`Alias resolution is disabled`);let n;t!=null&&t.aliasResolveCache?n=t.aliasResolveCache:(n=[],Zw(e,{Node:(e,t)=>{(zw(t)||qw(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n));let r;for(let e of n){if(e===this)break;e.anchor===this.source&&(r=e)}return r}toJSON(e,t){if(!t)return{source:this.source};let{anchors:n,doc:r,maxAliasCount:i}=t,a=this.resolve(r,t);if(!a){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(e)}let o=n.get(a);if(o||=(uT(a,null,t),n.get(a)),(o==null?void 0:o.res)===void 0)throw ReferenceError(`This should not happen: Alias anchor was not resolved?`);if(i>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=pT(r,a,n)),o.count*o.aliasCount>i))throw ReferenceError(`Excessive alias count indicates a resource exhaustion attack`);return o.res}toString(e,t,n){let r=`*${this.source}`;if(e){if(aT(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(e)}if(e.implicitKey)return`${r} `}return r}};function pT(e,t,n){if(zw(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(Gw(t)){let r=0;for(let i of t.items){let t=pT(e,i,n);t>r&&(r=t)}return r}if(Hw(t)){let r=pT(e,t.key,n),i=pT(e,t.value,n);return Math.max(r,i)}return 1}var mT=e=>!e||typeof e!=`function`&&typeof e!=`object`,hT=class extends dT{constructor(e){super(Iw),this.value=e}toJSON(e,t){return t!=null&&t.keep?this.value:uT(this.value,e,t)}toString(){return String(this.value)}};hT.BLOCK_FOLDED=`BLOCK_FOLDED`,hT.BLOCK_LITERAL=`BLOCK_LITERAL`,hT.PLAIN=`PLAIN`,hT.QUOTE_DOUBLE=`QUOTE_DOUBLE`,hT.QUOTE_SINGLE=`QUOTE_SINGLE`;var gT=`tag:yaml.org,2002:`;function _T(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error(`Tag ${t} not found`);return r}return n.find(t=>{var n;return((n=t.identify)==null?void 0:n.call(t,e))&&!t.format})}function vT(e,t,n){var r;if(Bw(e)&&(e=e.contents),Kw(e))return e;if(Hw(e)){var i,a;let t=(i=(a=n.schema[Pw]).createNode)==null?void 0:i.call(a,n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<`u`&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:o,onAnchor:s,onTagObj:c,schema:l,sourceObjects:u}=n,d;if(o&&e&&typeof e==`object`){if(d=u.get(e),d)return d.anchor??(d.anchor=s(e)),new fT(d.anchor);d={anchor:null,node:null},u.set(e,d)}t!=null&&t.startsWith(`!!`)&&(t=gT+t.slice(2));let f=_T(e,t,l.tags);if(!f){if(e&&typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`){let t=new hT(e);return d&&(d.node=t),t}f=e instanceof Map?l[Pw]:Symbol.iterator in Object(e)?l[Lw]:l[Pw]}c&&(c(f),delete n.onTagObj);let p=f!=null&&f.createNode?f.createNode(n.schema,e,n):typeof(f==null||(r=f.nodeClass)==null?void 0:r.from)==`function`?f.nodeClass.from(n.schema,e,n):new hT(e);return t?p.tag=t:f.default||(p.tag=f.tag),d&&(d.node=p),p}function yT(e,t,n){let r=n;for(let e=t.length-1;e>=0;--e){let n=t[e];if(typeof n==`number`&&Number.isInteger(n)&&n>=0){let e=[];e[n]=r,r=e}else r=new Map([[n,r]])}return vT(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error(`This should not happen, please report a bug.`)},schema:e,sourceObjects:new Map})}var bT=e=>e==null||typeof e==`object`&&!!e[Symbol.iterator]().next().done,xT=class extends dT{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>Kw(t)||Hw(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(bT(e))this.add(t);else{let[n,...r]=e,i=this.get(n,!0);if(Gw(i))i.addIn(r,t);else if(i===void 0&&this.schema)this.set(n,yT(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let r=this.get(t,!0);if(Gw(r))return r.deleteIn(n);throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...r]=e,i=this.get(n,!0);return r.length===0?!t&&Uw(i)?i.value:i:Gw(i)?i.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!Hw(t))return!1;let n=t.value;return n==null||e&&Uw(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let r=this.get(t,!0);return Gw(r)?r.hasIn(n):!1}setIn(e,t){let[n,...r]=e;if(r.length===0)this.set(n,t);else{let e=this.get(n,!0);if(Gw(e))e.setIn(r,t);else if(e===void 0&&this.schema)this.set(n,yT(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}},ST=e=>e.replace(/^(?!$)(?: $)?/gm,`#`);function CT(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var wT=(e,t,n)=>e.endsWith(`
|
|
1390
|
+
`)?CT(n,t):n.includes(`
|
|
1391
1391
|
`)?`
|
|
1392
|
-
`+
|
|
1393
|
-
`)n===`block`&&(h=
|
|
1392
|
+
`+CT(n,t):(e.endsWith(` `)?``:` `)+n,TT=`flow`,ET=`block`,DT=`quoted`;function OT(e,t,n=`flow`,{indentAtStart:r,lineWidth:i=80,minContentWidth:a=20,onFold:o,onOverflow:s}={}){if(!i||i<0)return e;i<a&&(a=0);let c=Math.max(1+a,1+i-t.length);if(e.length<=c)return e;let l=[],u={},d=i-t.length;typeof r==`number`&&(r>i-Math.max(2,a)?l.push(0):d=i-r);let f,p,m=!1,h=-1,g=-1,_=-1;n===`block`&&(h=kT(e,h,t.length),h!==-1&&(d=h+c));for(let r;r=e[h+=1];){if(n===`quoted`&&r===`\\`){switch(g=h,e[h+1]){case`x`:h+=3;break;case`u`:h+=5;break;case`U`:h+=9;break;default:h+=1}_=h}if(r===`
|
|
1393
|
+
`)n===`block`&&(h=kT(e,h,t.length)),d=h+t.length+c,f=void 0;else{if(r===` `&&p&&p!==` `&&p!==`
|
|
1394
1394
|
`&&p!==` `){let t=e[h+1];t&&t!==` `&&t!==`
|
|
1395
|
-
`&&t!==` `&&(f=h)}if(h>=d)if(f)l.push(f),d=f+c,f=void 0;else if(n===`quoted`){for(;p===` `||p===` `;)p=r,r=e[h+=1],m=!0;let t=h>_+1?h-2:g-1;if(u[t])return e;l.push(t),u[t]=!0,d=t+c,f=void 0}else m=!0}p=r}if(m&&s&&s(),l.length===0)return e;o&&o();let v=e.slice(0,l[0]);for(let r=0;r<l.length;++r){let i=l[r],a=l[r+1]||e.length;i===0?v=`\n${t}${e.slice(0,a)}`:(n===`quoted`&&u[i]&&(v+=`${e[i]}\\`),v+=`\n${t}${e.slice(i+1,a)}`)}return v}function
|
|
1396
|
-
`);r=t,i=t+1,a=e[i]}return r}var
|
|
1397
|
-
`){if(t-n>r)return!0;if(n=t+1,i-n<=r)return!1}return!0}function
|
|
1395
|
+
`&&t!==` `&&(f=h)}if(h>=d)if(f)l.push(f),d=f+c,f=void 0;else if(n===`quoted`){for(;p===` `||p===` `;)p=r,r=e[h+=1],m=!0;let t=h>_+1?h-2:g-1;if(u[t])return e;l.push(t),u[t]=!0,d=t+c,f=void 0}else m=!0}p=r}if(m&&s&&s(),l.length===0)return e;o&&o();let v=e.slice(0,l[0]);for(let r=0;r<l.length;++r){let i=l[r],a=l[r+1]||e.length;i===0?v=`\n${t}${e.slice(0,a)}`:(n===`quoted`&&u[i]&&(v+=`${e[i]}\\`),v+=`\n${t}${e.slice(i+1,a)}`)}return v}function kT(e,t,n){let r=t,i=t+1,a=e[i];for(;a===` `||a===` `;)if(t<i+n)a=e[++t];else{do a=e[++t];while(a&&a!==`
|
|
1396
|
+
`);r=t,i=t+1,a=e[i]}return r}var AT=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),jT=e=>/^(%|---|\.\.\.)/m.test(e);function MT(e,t,n){if(!t||t<0)return!1;let r=t-n,i=e.length;if(i<=r)return!1;for(let t=0,n=0;t<i;++t)if(e[t]===`
|
|
1397
|
+
`){if(t-n>r)return!0;if(n=t+1,i-n<=r)return!1}return!0}function NT(e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(jT(e)?` `:``),o=``,s=0;for(let e=0,t=n[e];t;t=n[++e])if(t===` `&&n[e+1]===`\\`&&n[e+2]===`n`&&(o+=n.slice(s,e)+`\\ `,e+=1,s=e,t=`\\`),t===`\\`)switch(n[e+1]){case`u`:{o+=n.slice(s,e);let t=n.substr(e+2,4);switch(t){case`0000`:o+=`\\0`;break;case`0007`:o+=`\\a`;break;case`000b`:o+=`\\v`;break;case`001b`:o+=`\\e`;break;case`0085`:o+=`\\N`;break;case`00a0`:o+=`\\_`;break;case`2028`:o+=`\\L`;break;case`2029`:o+=`\\P`;break;default:t.substr(0,2)===`00`?o+=`\\x`+t.substr(2):o+=n.substr(e,6)}e+=5,s=e+1}break;case`n`:if(r||n[e+2]===`"`||n.length<i)e+=1;else{for(o+=n.slice(s,e)+`
|
|
1398
1398
|
|
|
1399
1399
|
`;n[e+2]===`\\`&&n[e+3]===`n`&&n[e+4]!==`"`;)o+=`
|
|
1400
|
-
`,e+=2;o+=a,n[e+2]===` `&&(o+=`\\`),e+=1,s=e+1}break;default:e+=1}return o=s?o+n.slice(s):n,r?o:
|
|
1401
|
-
`)||/[ \t]\n|\n[ \t]/.test(e))return
|
|
1400
|
+
`,e+=2;o+=a,n[e+2]===` `&&(o+=`\\`),e+=1,s=e+1}break;default:e+=1}return o=s?o+n.slice(s):n,r?o:OT(o,a,DT,AT(t,!1))}function PT(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
|
|
1401
|
+
`)||/[ \t]\n|\n[ \t]/.test(e))return NT(e,t);let n=t.indent||(jT(e)?` `:``),r=`'`+e.replace(/'/g,`''`).replace(/\n+/g,`$&\n${n}`)+`'`;return t.implicitKey?r:OT(r,n,TT,AT(t,!1))}function FT(e,t){let{singleQuote:n}=t.options,r;if(n===!1)r=NT;else{let t=e.includes(`"`),i=e.includes(`'`);r=t&&!i?PT:i&&!t?NT:n?PT:NT}return r(e,t)}var IT;try{IT=RegExp(`(^|(?<!
|
|
1402
1402
|
))
|
|
1403
1403
|
+(?!
|
|
1404
|
-
|$)`,`g`)}catch{
|
|
1404
|
+
|$)`,`g`)}catch{IT=/\n+(?!\n|$)/g}function LT({comment:e,type:t,value:n},r,i,a){let{blockQuote:o,commentString:s,lineWidth:c}=r.options;if(!o||/\n[\t ]+$/.test(n))return FT(n,r);let l=r.indent||(r.forceBlockIndent||jT(n)?` `:``),u=o===`literal`?!0:o===`folded`||t===hT.BLOCK_FOLDED?!1:t===hT.BLOCK_LITERAL||!MT(n,c,l.length);if(!n)return u?`|
|
|
1405
1405
|
`:`>
|
|
1406
1406
|
`;let d,f;for(f=n.length;f>0;--f){let e=n[f-1];if(e!==`
|
|
1407
1407
|
`&&e!==` `&&e!==` `)break}let p=n.substring(f),m=p.indexOf(`
|
|
1408
1408
|
`);m===-1?d=`-`:n===p||m!==p.length-1?(d=`+`,a&&a()):d=``,p&&=(n=n.slice(0,-p.length),p[p.length-1]===`
|
|
1409
|
-
`&&(p=p.slice(0,-1)),p.replace(
|
|
1409
|
+
`&&(p=p.slice(0,-1)),p.replace(IT,`$&${l}`));let h=!1,g,_=-1;for(g=0;g<n.length;++g){let e=n[g];if(e===` `)h=!0;else if(e===`
|
|
1410
1410
|
`)_=g;else break}let v=n.substring(0,_<g?_+1:g);v&&=(n=n.substring(v.length),v.replace(/\n+/g,`$&${l}`));let y=(h?l?`2`:`1`:``)+d;if(e&&(y+=` `+s(e.replace(/ ?[\r\n]+/g,` `)),i&&i()),!u){let e=n.replace(/\n+/g,`
|
|
1411
|
-
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\n+/g,`$&${l}`),i=!1,a=
|
|
1412
|
-
`)||u&&/[[\]{},]/.test(a))return
|
|
1413
|
-
`)?
|
|
1414
|
-
`))return
|
|
1415
|
-
`:``,v){let e=l(v);S+=`\n${
|
|
1411
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\n+/g,`$&${l}`),i=!1,a=AT(r,!0);o!==`folded`&&t!==hT.BLOCK_FOLDED&&(a.onOverflow=()=>{i=!0});let s=OT(`${v}${e}${p}`,l,ET,a);if(!i)return`>${y}\n${l}${s}`}return n=n.replace(/\n+/g,`$&${l}`),`|${y}\n${l}${v}${n}${p}`}function RT(e,t,n,r){let{type:i,value:a}=e,{actualString:o,implicitKey:s,indent:c,indentStep:l,inFlow:u}=t;if(s&&a.includes(`
|
|
1412
|
+
`)||u&&/[[\]{},]/.test(a))return FT(a,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return s||u||!a.includes(`
|
|
1413
|
+
`)?FT(a,t):LT(e,t,n,r);if(!s&&!u&&i!==hT.PLAIN&&a.includes(`
|
|
1414
|
+
`))return LT(e,t,n,r);if(jT(a)){if(c===``)return t.forceBlockIndent=!0,LT(e,t,n,r);if(s&&c===l)return FT(a,t)}let d=a.replace(/\n+/g,`$&\n${c}`);if(o){let e=e=>{var t;return e.default&&e.tag!==`tag:yaml.org,2002:str`&&((t=e.test)==null?void 0:t.test(d))},{compat:n,tags:r}=t.doc.schema;if(r.some(e)||n!=null&&n.some(e))return FT(a,t)}return s?d:OT(d,c,TT,AT(t,!1))}function zT(e,t,n,r){let{implicitKey:i,inFlow:a}=t,o=typeof e.value==`string`?e:Object.assign({},e,{value:String(e.value)}),{type:s}=e;s!==hT.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(s=hT.QUOTE_DOUBLE);let c=e=>{switch(e){case hT.BLOCK_FOLDED:case hT.BLOCK_LITERAL:return i||a?FT(o.value,t):LT(o,t,n,r);case hT.QUOTE_DOUBLE:return NT(o.value,t);case hT.QUOTE_SINGLE:return PT(o.value,t);case hT.PLAIN:return RT(o,t,n,r);default:return null}},l=c(s);if(l===null){let{defaultKeyType:e,defaultStringType:n}=t.options,r=i&&e||n;if(l=c(r),l===null)throw Error(`Unsupported default string type ${r}`)}return l}function BT(e,t){let n=Object.assign({blockQuote:!0,commentString:ST,defaultKeyType:null,defaultStringType:`PLAIN`,directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:`false`,flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:`null`,simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:`true`,verifyAliasOrder:!0},e.schema.toStringOptions,t),r;switch(n.collectionStyle){case`block`:r=!1;break;case`flow`:r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?` `:``,indent:``,indentStep:typeof n.indent==`number`?` `.repeat(n.indent):` `,inFlow:r,options:n}}function VT(e,t){if(t.tag){let n=e.filter(e=>e.tag===t.tag);if(n.length>0)return n.find(e=>e.format===t.format)??n[0]}let n,r;if(Uw(t)){r=t.value;let i=e.filter(e=>{var t;return(t=e.identify)==null?void 0:t.call(e,r)});if(i.length>1){let e=i.filter(e=>e.test);e.length>0&&(i=e)}n=i.find(e=>e.format===t.format)??i.find(e=>!e.format)}else r=t,n=e.find(e=>e.nodeClass&&r instanceof e.nodeClass);if(!n){var i;let e=(r==null||(i=r.constructor)==null?void 0:i.name)??(r===null?`null`:typeof r);throw Error(`Tag not resolved for ${e} value`)}return n}function HT(e,t,{anchors:n,doc:r}){if(!r.directives)return``;let i=[],a=(Uw(e)||Gw(e))&&e.anchor;a&&aT(a)&&(n.add(a),i.push(`&${a}`));let o=e.tag??(t.default?null:t.tag);return o&&i.push(r.directives.tagString(o)),i.join(` `)}function UT(e,t,n,r){if(Hw(e))return e.toString(t,n,r);if(zw(e)){var i;if(t.doc.directives)return e.toString(t);if((i=t.resolvedAliases)!=null&&i.has(e))throw TypeError(`Cannot stringify circular structure without alias nodes`);t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let a,o=Kw(e)?e:t.doc.createNode(e,{onTagObj:e=>a=e});a??=VT(t.doc.schema.tags,o);let s=HT(o,a,t);s.length>0&&(t.indentAtStart=(t.indentAtStart??0)+s.length+1);let c=typeof a.stringify==`function`?a.stringify(o,t,n,r):Uw(o)?zT(o,t,n,r):o.toString(t,n,r);return s?Uw(o)||c[0]===`{`||c[0]===`[`?`${s} ${c}`:`${s}\n${t.indent}${c}`:c}function WT({key:e,value:t},n,r,i){let{allNullValues:a,doc:o,indent:s,indentStep:c,options:{commentString:l,indentSeq:u,simpleKeys:d}}=n,f=Kw(e)&&e.comment||null;if(d){if(f)throw Error(`With simple keys, key nodes cannot have comments`);if(Gw(e)||!Kw(e)&&typeof e==`object`)throw Error(`With simple keys, collection cannot be used as a key value`)}let p=!d&&(!e||f&&t==null&&!n.inFlow||Gw(e)||(Uw(e)?e.type===hT.BLOCK_FOLDED||e.type===hT.BLOCK_LITERAL:typeof e==`object`));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(d||!a),indent:s+c});let m=!1,h=!1,g=UT(e,n,()=>m=!0,()=>h=!0);if(!p&&!n.inFlow&&g.length>1024){if(d)throw Error(`With simple keys, single line scalar must not span more than 1024 characters`);p=!0}if(n.inFlow){if(a||t==null)return m&&r&&r(),g===``?`?`:p?`? ${g}`:g}else if(a&&!d||t==null&&p)return g=`? ${g}`,f&&!m?g+=wT(g,n.indent,l(f)):h&&i&&i(),g;m&&(f=null),p?(f&&(g+=wT(g,n.indent,l(f))),g=`? ${g}\n${s}:`):(g=`${g}:`,f&&(g+=wT(g,n.indent,l(f))));let _,v,y;Kw(t)?(_=!!t.spaceBefore,v=t.commentBefore,y=t.comment):(_=!1,v=null,y=null,t&&typeof t==`object`&&(t=o.createNode(t))),n.implicitKey=!1,!p&&!f&&Uw(t)&&(n.indentAtStart=g.length+1),h=!1,!u&&c.length>=2&&!n.inFlow&&!p&&Ww(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let b=!1,x=UT(t,n,()=>b=!0,()=>h=!0),S=` `;if(f||_||v){if(S=_?`
|
|
1415
|
+
`:``,v){let e=l(v);S+=`\n${CT(e,n.indent)}`}x===``&&!n.inFlow?S===`
|
|
1416
1416
|
`&&y&&(S=`
|
|
1417
1417
|
|
|
1418
|
-
`):S+=`\n${n.indent}`}else if(!p&&
|
|
1418
|
+
`):S+=`\n${n.indent}`}else if(!p&&Gw(t)){let e=x[0],r=x.indexOf(`
|
|
1419
1419
|
`),i=r!==-1,a=n.inFlow??t.flow??t.items.length===0;if(i||!a){let t=!1;if(i&&(e===`&`||e===`!`)){let n=x.indexOf(` `);e===`&`&&n!==-1&&n<r&&x[n+1]===`!`&&(n=x.indexOf(` `,n+1)),(n===-1||r<n)&&(t=!0)}t||(S=`\n${n.indent}`)}}else(x===``||x[0]===`
|
|
1420
|
-
`)&&(S=``);return g+=S+x,n.inFlow?b&&r&&r():y&&!b?g+=
|
|
1420
|
+
`)&&(S=``);return g+=S+x,n.inFlow?b&&r&&r():y&&!b?g+=wT(g,n.indent,l(y)):h&&i&&i(),g}function GT(e,t){(e===`debug`||e===`warn`)&&console.warn(t)}var KT=`<<`,qT={identify:e=>e===KT||typeof e==`symbol`&&e.description===KT,default:`key`,tag:`tag:yaml.org,2002:merge`,test:/^<<$/,resolve:()=>Object.assign(new hT(Symbol(KT)),{addToJSMap:YT}),stringify:()=>KT},JT=(e,t)=>(qT.identify(t)||Uw(t)&&(!t.type||t.type===hT.PLAIN)&&qT.identify(t.value))&&(e==null?void 0:e.doc.schema.tags.some(e=>e.tag===qT.tag&&e.default));function YT(e,t,n){let r=ZT(e,n);if(Ww(r))for(let n of r.items)XT(e,t,n);else if(Array.isArray(r))for(let n of r)XT(e,t,n);else XT(e,t,r)}function XT(e,t,n){let r=ZT(e,n);if(!Vw(r))throw Error(`Merge sources must be maps or map aliases`);let i=r.toJSON(null,e,Map);for(let[e,n]of i)t instanceof Map?t.has(e)||t.set(e,n):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0});return t}function ZT(e,t){return e&&zw(t)?t.resolve(e.doc,e):t}function QT(e,t,{key:n,value:r}){if(Kw(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(JT(e,n))YT(e,t,r);else{let i=uT(n,``,e);if(t instanceof Map)t.set(i,uT(r,i,e));else if(t instanceof Set)t.add(i);else{let a=$T(n,i,e),o=uT(r,a,e);a in t?Object.defineProperty(t,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[a]=o}}return t}function $T(e,t,n){if(t===null)return``;if(typeof t!=`object`)return String(t);if(Kw(e)&&n!=null&&n.doc){let t=BT(n.doc,{});t.anchors=new Set;for(let e of n.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;let r=e.toString(t);if(!n.mapKeyWarned){let e=JSON.stringify(r);e.length>40&&(e=e.substring(0,36)+`..."`),GT(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return r}return JSON.stringify(t)}function eE(e,t,n){return new tE(vT(e,void 0,n),vT(t,void 0,n))}var tE=class e{constructor(e,t=null){Object.defineProperty(this,Rw,{value:Fw}),this.key=e,this.value=t}clone(t){let{key:n,value:r}=this;return Kw(n)&&(n=n.clone(t)),Kw(r)&&(r=r.clone(t)),new e(n,r)}toJSON(e,t){return QT(t,t!=null&&t.mapAsMap?new Map:{},this)}toString(e,t,n){return e!=null&&e.doc?WT(this,e,t,n):JSON.stringify(this)}};function nE(e,t,n){return(t.inFlow??e.flow?iE:rE)(e,t,n)}function rE({comment:e,items:t},n,{blockItemPrefix:r,flowChars:i,itemIndent:a,onChompKeep:o,onComment:s}){let{indent:c,options:{commentString:l}}=n,u=Object.assign({},n,{indent:a,type:null}),d=!1,f=[];for(let e=0;e<t.length;++e){let i=t[e],o=null;if(Kw(i))!d&&i.spaceBefore&&f.push(``),aE(n,f,i.commentBefore,d),i.comment&&(o=i.comment);else if(Hw(i)){let e=Kw(i.key)?i.key:null;e&&(!d&&e.spaceBefore&&f.push(``),aE(n,f,e.commentBefore,d))}d=!1;let s=UT(i,u,()=>o=null,()=>d=!0);o&&(s+=wT(s,a,l(o))),d&&o&&(d=!1),f.push(r+s)}let p;if(f.length===0)p=i.start+i.end;else{p=f[0];for(let e=1;e<f.length;++e){let t=f[e];p+=t?`\n${c}${t}`:`
|
|
1421
1421
|
`}}return e?(p+=`
|
|
1422
|
-
`+
|
|
1423
|
-
`),n<e.length-1?o+=`,`:t.options.trailingComma&&(t.options.lineWidth>0&&(l||=d.reduce((e,t)=>e+t.length+2,2)+(o.length+2)>t.options.lineWidth),l&&(o+=`,`)),a&&(o+=
|
|
1424
|
-
`;return`${e}\n${i}${p}`}return`${f}${o}${d.join(` `)}${o}${p}`}function
|
|
1425
|
-
`:` `)}return
|
|
1426
|
-
`)?(r.push(`...`),r.push(
|
|
1422
|
+
`+CT(l(e),c),s&&s()):d&&o&&o(),p}function iE({items:e},t,{flowChars:n,itemIndent:r}){let{indent:i,indentStep:a,flowCollectionPadding:o,options:{commentString:s}}=t;r+=a;let c=Object.assign({},t,{indent:r,inFlow:!0,type:null}),l=!1,u=0,d=[];for(let n=0;n<e.length;++n){let i=e[n],a=null;if(Kw(i))i.spaceBefore&&d.push(``),aE(t,d,i.commentBefore,!1),i.comment&&(a=i.comment);else if(Hw(i)){let e=Kw(i.key)?i.key:null;e&&(e.spaceBefore&&d.push(``),aE(t,d,e.commentBefore,!1),e.comment&&(l=!0));let n=Kw(i.value)?i.value:null;n?(n.comment&&(a=n.comment),n.commentBefore&&(l=!0)):i.value==null&&e!=null&&e.comment&&(a=e.comment)}a&&(l=!0);let o=UT(i,c,()=>a=null);l||=d.length>u||o.includes(`
|
|
1423
|
+
`),n<e.length-1?o+=`,`:t.options.trailingComma&&(t.options.lineWidth>0&&(l||=d.reduce((e,t)=>e+t.length+2,2)+(o.length+2)>t.options.lineWidth),l&&(o+=`,`)),a&&(o+=wT(o,r,s(a))),d.push(o),u=d.length}let{start:f,end:p}=n;if(d.length===0)return f+p;if(!l){let e=d.reduce((e,t)=>e+t.length+2,2);l=t.options.lineWidth>0&&e>t.options.lineWidth}if(l){let e=f;for(let t of d)e+=t?`\n${a}${i}${t}`:`
|
|
1424
|
+
`;return`${e}\n${i}${p}`}return`${f}${o}${d.join(` `)}${o}${p}`}function aE({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,``)),r){let i=CT(t(r),e);n.push(i.trimStart())}}function oE(e,t){let n=Uw(t)?t.value:t;for(let r of e)if(Hw(r)&&(r.key===t||r.key===n||Uw(r.key)&&r.key.value===n))return r}var sE=class extends xT{static get tagName(){return`tag:yaml.org,2002:map`}constructor(e){super(Pw,e),this.items=[]}static from(e,t,n){let{keepUndefined:r,replacer:i}=n,a=new this(e),o=(e,o)=>{if(typeof i==`function`)o=i.call(t,e,o);else if(Array.isArray(i)&&!i.includes(e))return;(o!==void 0||r)&&a.items.push(eE(e,o,n))};if(t instanceof Map)for(let[e,n]of t)o(e,n);else if(t&&typeof t==`object`)for(let e of Object.keys(t))o(e,t[e]);return typeof e.sortMapEntries==`function`&&a.items.sort(e.sortMapEntries),a}add(e,t){var n;let r;r=Hw(e)?e:!e||typeof e!=`object`||!(`key`in e)?new tE(e,e==null?void 0:e.value):new tE(e.key,e.value);let i=oE(this.items,r.key),a=(n=this.schema)==null?void 0:n.sortMapEntries;if(i){if(!t)throw Error(`Key ${r.key} already set`);Uw(i.value)&&mT(r.value)?i.value.value=r.value:i.value=r.value}else if(a){let e=this.items.findIndex(e=>a(r,e)<0);e===-1?this.items.push(r):this.items.splice(e,0,r)}else this.items.push(r)}delete(e){let t=oE(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=oE(this.items,e),r=n==null?void 0:n.value;return(!t&&Uw(r)?r.value:r)??void 0}has(e){return!!oE(this.items,e)}set(e,t){this.add(new tE(e,t),!0)}toJSON(e,t,n){let r=n?new n:t!=null&&t.mapAsMap?new Map:{};t!=null&&t.onCreate&&t.onCreate(r);for(let e of this.items)QT(t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!Hw(e))throw Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),nE(this,e,{blockItemPrefix:``,flowChars:{start:`{`,end:`}`},itemIndent:e.indent||``,onChompKeep:n,onComment:t})}},cE={collection:`map`,default:!0,nodeClass:sE,tag:`tag:yaml.org,2002:map`,resolve(e,t){return Vw(e)||t(`Expected a mapping for this tag`),e},createNode:(e,t,n)=>sE.from(e,t,n)},lE=class extends xT{static get tagName(){return`tag:yaml.org,2002:seq`}constructor(e){super(Lw,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=uE(e);return typeof t==`number`&&this.items.splice(t,1).length>0}get(e,t){let n=uE(e);if(typeof n!=`number`)return;let r=this.items[n];return!t&&Uw(r)?r.value:r}has(e){let t=uE(e);return typeof t==`number`&&t<this.items.length}set(e,t){let n=uE(e);if(typeof n!=`number`)throw Error(`Expected a valid index, not ${e}.`);let r=this.items[n];Uw(r)&&mT(t)?r.value=t:this.items[n]=t}toJSON(e,t){let n=[];t!=null&&t.onCreate&&t.onCreate(n);let r=0;for(let e of this.items)n.push(uT(e,String(r++),t));return n}toString(e,t,n){return e?nE(this,e,{blockItemPrefix:`- `,flowChars:{start:`[`,end:`]`},itemIndent:(e.indent||``)+` `,onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let a of t){if(typeof r==`function`){let n=t instanceof Set?a:String(e++);a=r.call(t,n,a)}i.items.push(vT(a,void 0,n))}}return i}};function uE(e){let t=Uw(e)?e.value:e;return t&&typeof t==`string`&&(t=Number(t)),typeof t==`number`&&Number.isInteger(t)&&t>=0?t:null}var dE={collection:`seq`,default:!0,nodeClass:lE,tag:`tag:yaml.org,2002:seq`,resolve(e,t){return Ww(e)||t(`Expected a sequence for this tag`),e},createNode:(e,t,n)=>lE.from(e,t,n)},fE={identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:e=>e,stringify(e,t,n,r){return t=Object.assign({actualString:!0},t),zT(e,t,n,r)}},pE={identify:e=>e==null,createNode:()=>new hT(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new hT(null),stringify:({source:e},t)=>typeof e==`string`&&pE.test.test(e)?e:t.options.nullStr},mE={identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new hT(e[0]===`t`||e[0]===`T`),stringify({source:e,value:t},n){return e&&mE.test.test(e)&&t===(e[0]===`t`||e[0]===`T`)?e:t?n.options.trueStr:n.options.falseStr}};function hE({format:e,minFractionDigits:t,tag:n,value:r}){if(typeof r==`bigint`)return String(r);let i=typeof r==`number`?r:Number(r);if(!isFinite(i))return isNaN(i)?`.nan`:i<0?`-.inf`:`.inf`;let a=Object.is(r,-0)?`-0`:JSON.stringify(r);if(!e&&t&&(!n||n===`tag:yaml.org,2002:float`)&&/^-?\d/.test(a)&&!a.includes(`e`)){let e=a.indexOf(`.`);e<0&&(e=a.length,a+=`.`);let n=t-(a.length-e-1);for(;n-->0;)a+=`0`}return a}var gE={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()===`nan`?NaN:e[0]===`-`?-1/0:1/0,stringify:hE},_E={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`EXP`,test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():hE(e)}},vE={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){let t=new hT(parseFloat(e)),n=e.indexOf(`.`);return n!==-1&&e[e.length-1]===`0`&&(t.minFractionDigits=e.length-n-1),t},stringify:hE},yE=e=>typeof e==`bigint`||Number.isInteger(e),bE=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function xE(e,t,n){let{value:r}=e;return yE(r)&&r>=0?n+r.toString(t):hE(e)}var SE={identify:e=>yE(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^0o[0-7]+$/,resolve:(e,t,n)=>bE(e,2,8,n),stringify:e=>xE(e,8,`0o`)},CE={identify:yE,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>bE(e,0,10,n),stringify:hE},wE={identify:e=>yE(e)&&e>=0,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>bE(e,2,16,n),stringify:e=>xE(e,16,`0x`)},TE=[cE,dE,fE,pE,mE,SE,CE,wE,gE,_E,vE];function EE(e){return typeof e==`bigint`||Number.isInteger(e)}var DE=({value:e})=>JSON.stringify(e),OE=[{identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:e=>e,stringify:DE},{identify:e=>e==null,createNode:()=>new hT(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^null$/,resolve:()=>null,stringify:DE},{identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^true$|^false$/,resolve:e=>e===`true`,stringify:DE},{identify:EE,default:!0,tag:`tag:yaml.org,2002:int`,test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>EE(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:DE}],kE=[cE,dE].concat(OE,{default:!0,tag:``,test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}}),AE={identify:e=>e instanceof Uint8Array,default:!1,tag:`tag:yaml.org,2002:binary`,resolve(e,t){if(typeof atob==`function`){let t=atob(e.replace(/[\n\r]/g,``)),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}return t(`This environment does not support reading binary tags; either Buffer or atob is required`),e},stringify({comment:e,type:t,value:n},r,i,a){if(!n)return``;let o=n,s;if(typeof btoa==`function`){let e=``;for(let t=0;t<o.length;++t)e+=String.fromCharCode(o[t]);s=btoa(e)}else throw Error(`This environment does not support writing binary tags; either Buffer or btoa is required`);if(t??=hT.BLOCK_LITERAL,t!==hT.QUOTE_DOUBLE){let e=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),n=Math.ceil(s.length/e),i=Array(n);for(let t=0,r=0;t<n;++t,r+=e)i[t]=s.substr(r,e);s=i.join(t===hT.BLOCK_LITERAL?`
|
|
1425
|
+
`:` `)}return zT({comment:e,type:t,value:s},r,i,a)}};function jE(e,t){if(Ww(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!Hw(r)){if(Vw(r)){r.items.length>1&&t(`Each pair must have its own sequence indicator`);let e=r.items[0]||new tE(new hT(null));if(r.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${r.commentBefore}\n${e.key.commentBefore}`:r.commentBefore),r.comment){let t=e.value??e.key;t.comment=t.comment?`${r.comment}\n${t.comment}`:r.comment}r=e}e.items[n]=Hw(r)?r:new tE(r)}}else t(`Expected a sequence for this tag`);return e}function ME(e,t,n){let{replacer:r}=n,i=new lE(e);i.tag=`tag:yaml.org,2002:pairs`;let a=0;if(t&&Symbol.iterator in Object(t))for(let e of t){typeof r==`function`&&(e=r.call(t,String(a++),e));let o,s;if(Array.isArray(e))if(e.length===2)o=e[0],s=e[1];else throw TypeError(`Expected [key, value] tuple: ${e}`);else if(e&&e instanceof Object){let t=Object.keys(e);if(t.length===1)o=t[0],s=e[o];else throw TypeError(`Expected tuple with one key, not ${t.length} keys`)}else o=e;i.items.push(eE(o,s,n))}return i}var NE={collection:`seq`,default:!1,tag:`tag:yaml.org,2002:pairs`,resolve:jE,createNode:ME},PE=class e extends lE{constructor(){super(),this.add=sE.prototype.add.bind(this),this.delete=sE.prototype.delete.bind(this),this.get=sE.prototype.get.bind(this),this.has=sE.prototype.has.bind(this),this.set=sE.prototype.set.bind(this),this.tag=e.tag}toJSON(e,t){if(!t)return super.toJSON(e);let n=new Map;t!=null&&t.onCreate&&t.onCreate(n);for(let e of this.items){let r,i;if(Hw(e)?(r=uT(e.key,``,t),i=uT(e.value,r,t)):r=uT(e,``,t),n.has(r))throw Error(`Ordered maps must not include duplicate keys`);n.set(r,i)}return n}static from(e,t,n){let r=ME(e,t,n),i=new this;return i.items=r.items,i}};PE.tag=`tag:yaml.org,2002:omap`;var FE={collection:`seq`,identify:e=>e instanceof Map,nodeClass:PE,default:!1,tag:`tag:yaml.org,2002:omap`,resolve(e,t){let n=jE(e,t),r=[];for(let{key:e}of n.items)Uw(e)&&(r.includes(e.value)?t(`Ordered maps must not include duplicate keys: ${e.value}`):r.push(e.value));return Object.assign(new PE,n)},createNode:(e,t,n)=>PE.from(e,t,n)};function IE({value:e,source:t},n){return t&&(e?LE:RE).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}var LE={identify:e=>e===!0,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new hT(!0),stringify:IE},RE={identify:e=>e===!1,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new hT(!1),stringify:IE},zE={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()===`nan`?NaN:e[0]===`-`?-1/0:1/0,stringify:hE},BE={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`EXP`,test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,``)),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():hE(e)}},VE={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){let t=new hT(parseFloat(e.replace(/_/g,``))),n=e.indexOf(`.`);if(n!==-1){let r=e.substring(n+1).replace(/_/g,``);r[r.length-1]===`0`&&(t.minFractionDigits=r.length)}return t},stringify:hE},HE=e=>typeof e==`bigint`||Number.isInteger(e);function UE(e,t,n,{intAsBigInt:r}){let i=e[0];if((i===`-`||i===`+`)&&(t+=1),e=e.substring(t).replace(/_/g,``),r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}let t=BigInt(e);return i===`-`?BigInt(-1)*t:t}let a=parseInt(e,n);return i===`-`?-1*a:a}function WE(e,t,n){let{value:r}=e;if(HE(r)){let e=r.toString(t);return r<0?`-`+n+e.substr(1):n+e}return hE(e)}var GE={identify:HE,default:!0,tag:`tag:yaml.org,2002:int`,format:`BIN`,test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>UE(e,2,2,n),stringify:e=>WE(e,2,`0b`)},KE={identify:HE,default:!0,tag:`tag:yaml.org,2002:int`,format:`OCT`,test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>UE(e,1,8,n),stringify:e=>WE(e,8,`0`)},qE={identify:HE,default:!0,tag:`tag:yaml.org,2002:int`,test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>UE(e,0,10,n),stringify:hE},JE={identify:HE,default:!0,tag:`tag:yaml.org,2002:int`,format:`HEX`,test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>UE(e,2,16,n),stringify:e=>WE(e,16,`0x`)},YE=class e extends sE{constructor(t){super(t),this.tag=e.tag}add(e){let t;t=Hw(e)?e:e&&typeof e==`object`&&`key`in e&&`value`in e&&e.value===null?new tE(e.key,null):new tE(e,null),oE(this.items,t.key)||this.items.push(t)}get(e,t){let n=oE(this.items,e);return!t&&Hw(n)?Uw(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!=`boolean`)throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let n=oE(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new tE(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw Error(`Set items must all have null values`)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t)typeof r==`function`&&(e=r.call(t,e,e)),i.items.push(eE(e,null,n));return i}};YE.tag=`tag:yaml.org,2002:set`;var XE={collection:`map`,identify:e=>e instanceof Set,nodeClass:YE,default:!1,tag:`tag:yaml.org,2002:set`,createNode:(e,t,n)=>YE.from(e,t,n),resolve(e,t){if(Vw(e)){if(e.hasAllNullValues(!0))return Object.assign(new YE,e);t(`Set items must all have null values`)}else t(`Expected a mapping for this tag`);return e}};function ZE(e,t){let n=e[0],r=n===`-`||n===`+`?e.substring(1):e,i=e=>t?BigInt(e):Number(e),a=r.replace(/_/g,``).split(`:`).reduce((e,t)=>e*i(60)+i(t),i(0));return n===`-`?i(-1)*a:a}function QE(e){let{value:t}=e,n=e=>e;if(typeof t==`bigint`)n=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return hE(e);let r=``;t<0&&(r=`-`,t*=n(-1));let i=n(60),a=[t%i];return t<60?a.unshift(0):(t=(t-a[0])/i,a.unshift(t%i),t>=60&&(t=(t-a[0])/i,a.unshift(t))),r+a.map(e=>String(e).padStart(2,`0`)).join(`:`).replace(/000000\d*$/,``)}var $E={identify:e=>typeof e==`bigint`||Number.isInteger(e),default:!0,tag:`tag:yaml.org,2002:int`,format:`TIME`,test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>ZE(e,n),stringify:QE},eD={identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,format:`TIME`,test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>ZE(e,!1),stringify:QE},tD={identify:e=>e instanceof Date,default:!0,tag:`tag:yaml.org,2002:timestamp`,test:RegExp(`^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$`),resolve(e){let t=e.match(tD.test);if(!t)throw Error(`!!timestamp expects a date, starting with yyyy-mm-dd`);let[,n,r,i,a,o,s]=t.map(Number),c=t[7]?Number((t[7]+`00`).substr(1,3)):0,l=Date.UTC(n,r-1,i,a||0,o||0,s||0,c),u=t[8];if(u&&u!==`Z`){let e=ZE(u,!1);Math.abs(e)<30&&(e*=60),l-=6e4*e}return new Date(l)},stringify:({value:e})=>(e==null?void 0:e.toISOString().replace(/(T00:00:00)?\.000Z$/,``))??``},nD=[cE,dE,fE,pE,LE,RE,GE,KE,qE,JE,zE,BE,VE,AE,qT,FE,NE,XE,$E,eD,tD],rD=new Map([[`core`,TE],[`failsafe`,[cE,dE,fE]],[`json`,kE],[`yaml11`,nD],[`yaml-1.1`,nD]]),iD={binary:AE,bool:mE,float:vE,floatExp:_E,floatNaN:gE,floatTime:eD,int:CE,intHex:wE,intOct:SE,intTime:$E,map:cE,merge:qT,null:pE,omap:FE,pairs:NE,seq:dE,set:XE,timestamp:tD},aD={"tag:yaml.org,2002:binary":AE,"tag:yaml.org,2002:merge":qT,"tag:yaml.org,2002:omap":FE,"tag:yaml.org,2002:pairs":NE,"tag:yaml.org,2002:set":XE,"tag:yaml.org,2002:timestamp":tD};function oD(e,t,n){let r=rD.get(t);if(r&&!e)return n&&!r.includes(qT)?r.concat(qT):r.slice();let i=r;if(!i)if(Array.isArray(e))i=[];else{let e=Array.from(rD.keys()).filter(e=>e!==`yaml11`).map(e=>JSON.stringify(e)).join(`, `);throw Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}if(Array.isArray(e))for(let t of e)i=i.concat(t);else typeof e==`function`&&(i=e(i.slice()));return n&&(i=i.concat(qT)),i.reduce((e,t)=>{let n=typeof t==`string`?iD[t]:t;if(!n){let e=JSON.stringify(t),n=Object.keys(iD).map(e=>JSON.stringify(e)).join(`, `);throw Error(`Unknown custom tag ${e}; use one of ${n}`)}return e.includes(n)||e.push(n),e},[])}var sD=(e,t)=>e.key<t.key?-1:+(e.key>t.key),cD=class e{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:r,schema:i,sortMapEntries:a,toStringDefaults:o}){this.compat=Array.isArray(e)?oD(e,`compat`):e?oD(null,e):null,this.name=typeof i==`string`&&i||`core`,this.knownTags=r?aD:{},this.tags=oD(t,this.name,n),this.toStringOptions=o??null,Object.defineProperty(this,Pw,{value:cE}),Object.defineProperty(this,Iw,{value:fE}),Object.defineProperty(this,Lw,{value:dE}),this.sortMapEntries=typeof a==`function`?a:a===!0?sD:null}clone(){let t=Object.create(e.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};function lD(e,t){var n;let r=[],i=t.directives===!0;if(t.directives!==!1&&e.directives){let t=e.directives.toString(e);t?(r.push(t),i=!0):e.directives.docStart&&(i=!0)}i&&r.push(`---`);let a=BT(e,t),{commentString:o}=a.options;if(e.commentBefore){r.length!==1&&r.unshift(``);let t=o(e.commentBefore);r.unshift(CT(t,``))}let s=!1,c=null;if(e.contents){if(Kw(e.contents)){if(e.contents.spaceBefore&&i&&r.push(``),e.contents.commentBefore){let t=o(e.contents.commentBefore);r.push(CT(t,``))}a.forceBlockIndent=!!e.comment,c=e.contents.comment}let t=c?void 0:()=>s=!0,n=UT(e.contents,a,()=>c=null,t);c&&(n+=wT(n,``,o(c))),(n[0]===`|`||n[0]===`>`)&&r[r.length-1]===`---`?r[r.length-1]=`--- ${n}`:r.push(n)}else r.push(UT(e.contents,a));if((n=e.directives)!=null&&n.docEnd)if(e.comment){let t=o(e.comment);t.includes(`
|
|
1426
|
+
`)?(r.push(`...`),r.push(CT(t,``))):r.push(`... ${t}`)}else r.push(`...`);else{let t=e.comment;t&&s&&(t=t.replace(/^\n+/,``)),t&&((!s||c)&&r[r.length-1]!==``&&r.push(``),r.push(CT(o(t),``)))}return r.join(`
|
|
1427
1427
|
`)+`
|
|
1428
|
-
`}var
|
|
1429
|
-
`),o=n+o}if(/[^ ]/.test(o)){let e=1,t=n.linePos[1];(t==null?void 0:t.line)===r&&t.col>i&&(e=Math.max(1,Math.min(t.col-i,80-a)));let s=` `.repeat(a)+`^`.repeat(e);n.message+=`:\n\n${o}\n${s}\n`}};function
|
|
1430
|
-
`))return!0;if(e.end){for(let t of e.end)if(t.type===`newline`)return!0}return!1;case`flow-collection`:for(let t of e.items){for(let e of t.start)if(e.type===`newline`)return!0;if(t.sep){for(let e of t.sep)if(e.type===`newline`)return!0}if(
|
|
1431
|
-
`+m.comment:o.comment=m.comment);continue}(m.newlineAfterProp||
|
|
1432
|
-
`+v.comment:_.comment=v.comment);let e=new
|
|
1433
|
-
`+g.comment:c.comment=g.comment),u=g.end;continue}!o&&n.options.strict&&
|
|
1434
|
-
`+e:t.comment=e,g.comment=g.comment.substring(e.length+1)}}if(!o&&!m&&!g.found){let r=h?e(n,h,g,i):t(n,g.end,m,null,g,i);c.items.push(r),u=r.range[2],
|
|
1435
|
-
`+v.comment:_.comment=v.comment);let b=new
|
|
1436
|
-
`+e.comment:c.comment=e.comment),c.range=[r.offset,h,e.offset]}else c.range=[r.offset,h,h];return c}function
|
|
1428
|
+
`}var uD=class e{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Rw,{value:Nw});let r=null;typeof t==`function`||Array.isArray(t)?r=t:n===void 0&&t&&(n=t,t=void 0);let i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:`warn`,prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:`1.2`},n);this.options=i;let{version:a}=i;n!=null&&n._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new iT({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,r,n)}clone(){let t=Object.create(e.prototype,{[Rw]:{value:Nw}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=Kw(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(e){dD(this.contents)&&this.contents.add(e)}addIn(e,t){dD(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=oT(this);e.anchor=!t||n.has(t)?sT(t||`a`,n):t}return new fT(e.anchor)}createNode(e,t,n){let r;if(typeof t==`function`)e=t.call({"":e},``,e),r=t;else if(Array.isArray(t)){let e=t.filter(e=>typeof e==`number`||e instanceof String||e instanceof Number).map(String);e.length>0&&(t=t.concat(e)),r=t}else n===void 0&&t&&(n=t,t=void 0);let{aliasDuplicateObjects:i,anchorPrefix:a,flow:o,keepUndefined:s,onTagObj:c,tag:l}=n??{},{onAnchor:u,setAnchors:d,sourceObjects:f}=cT(this,a||`a`),p={aliasDuplicateObjects:i??!0,keepUndefined:s??!1,onAnchor:u,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:f},m=vT(e,l,p);return o&&Gw(m)&&(m.flow=!0),d(),m}createPair(e,t,n={}){return new tE(this.createNode(e,null,n),this.createNode(t,null,n))}delete(e){return dD(this.contents)?this.contents.delete(e):!1}deleteIn(e){return bT(e)?this.contents!=null&&(this.contents=null,!0):dD(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return Gw(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return bT(e)?!t&&Uw(this.contents)?this.contents.value:this.contents:Gw(this.contents)?this.contents.getIn(e,t):void 0}has(e){return Gw(this.contents)?this.contents.has(e):!1}hasIn(e){return bT(e)?this.contents!==void 0:Gw(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=yT(this.schema,[e],t):dD(this.contents)&&this.contents.set(e,t)}setIn(e,t){bT(e)?this.contents=t:this.contents==null?this.contents=yT(this.schema,Array.from(e),t):dD(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e==`number`&&(e=String(e));let n;switch(e){case`1.1`:this.directives?this.directives.yaml.version=`1.1`:this.directives=new iT({version:`1.1`}),n={resolveKnownTags:!1,schema:`yaml-1.1`};break;case`1.2`:case`next`:this.directives?this.directives.yaml.version=e:this.directives=new iT({version:e}),n={resolveKnownTags:!0,schema:`core`};break;case null:this.directives&&delete this.directives,n=null;break;default:{let t=JSON.stringify(e);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new cD(Object.assign(n,t));else throw Error(`With a null YAML version, the { schema: Schema } option is required`)}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:a}={}){let o={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r==`number`?r:100},s=uT(this.contents,t??``,o);if(typeof i==`function`)for(let{count:e,res:t}of o.anchors.values())i(t,e);return typeof a==`function`?lT(a,{"":s},``,s):s}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw Error(`Document with errors cannot be stringified`);if(`indent`in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw Error(`"indent" option must be a positive integer, not ${t}`)}return lD(this,e)}};function dD(e){if(Gw(e))return!0;throw Error(`Expected a YAML collection as document contents`)}var fD=class extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}},pD=class extends fD{constructor(e,t,n){super(`YAMLParseError`,e,t,n)}},mD=class extends fD{constructor(e,t,n){super(`YAMLWarning`,e,t,n)}},hD=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(e=>t.linePos(e));let{line:r,col:i}=n.linePos[0];n.message+=` at line ${r}, column ${i}`;let a=i-1,o=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\n\r]+$/,``);if(a>=60&&o.length>80){let e=Math.min(a-39,o.length-79);o=`…`+o.substring(e),a-=e-1}if(o.length>80&&(o=o.substring(0,79)+`…`),r>1&&/^ *$/.test(o.substring(0,a))){let n=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);n.length>80&&(n=n.substring(0,79)+`…
|
|
1429
|
+
`),o=n+o}if(/[^ ]/.test(o)){let e=1,t=n.linePos[1];(t==null?void 0:t.line)===r&&t.col>i&&(e=Math.max(1,Math.min(t.col-i,80-a)));let s=` `.repeat(a)+`^`.repeat(e);n.message+=`:\n\n${o}\n${s}\n`}};function gD(e,{flow:t,indicator:n,next:r,offset:i,onError:a,parentIndent:o,startOnNewline:s}){let c=!1,l=s,u=s,d=``,f=``,p=!1,m=!1,h=null,g=null,_=null,v=null,y=null,b=null,x=null;for(let i of e)switch(m&&=(i.type!==`space`&&i.type!==`newline`&&i.type!==`comma`&&a(i.offset,`MISSING_CHAR`,`Tags and anchors must be separated from the next token by white space`),!1),h&&=(l&&i.type!==`comment`&&i.type!==`newline`&&a(h,`TAB_AS_INDENT`,`Tabs are not allowed as indentation`),null),i.type){case`space`:!t&&(n!==`doc-start`||(r==null?void 0:r.type)!==`flow-collection`)&&i.source.includes(` `)&&(h=i),u=!0;break;case`comment`:{u||a(i,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`);let e=i.source.substring(1)||` `;d?d+=f+e:d=e,f=``,l=!1;break}case`newline`:l?d?d+=i.source:(!b||n!==`seq-item-ind`)&&(c=!0):f+=i.source,l=!0,p=!0,(g||_)&&(v=i),u=!0;break;case`anchor`:g&&a(i,`MULTIPLE_ANCHORS`,`A node can have at most one anchor`),i.source.endsWith(`:`)&&a(i.offset+i.source.length-1,`BAD_ALIAS`,`Anchor ending in : is ambiguous`,!0),g=i,x??=i.offset,l=!1,u=!1,m=!0;break;case`tag`:_&&a(i,`MULTIPLE_TAGS`,`A node can have at most one tag`),_=i,x??=i.offset,l=!1,u=!1,m=!0;break;case n:(g||_)&&a(i,`BAD_PROP_ORDER`,`Anchors and tags must be after the ${i.source} indicator`),b&&a(i,`UNEXPECTED_TOKEN`,`Unexpected ${i.source} in ${t??`collection`}`),b=i,l=n===`seq-item-ind`||n===`explicit-key-ind`,u=!1;break;case`comma`:if(t){y&&a(i,`UNEXPECTED_TOKEN`,`Unexpected , in ${t}`),y=i,l=!1,u=!1;break}default:a(i,`UNEXPECTED_TOKEN`,`Unexpected ${i.type} token`),l=!1,u=!1}let S=e[e.length-1],C=S?S.offset+S.source.length:i;return m&&r&&r.type!==`space`&&r.type!==`newline`&&r.type!==`comma`&&(r.type!==`scalar`||r.source!==``)&&a(r.offset,`MISSING_CHAR`,`Tags and anchors must be separated from the next token by white space`),h&&(l&&h.indent<=o||(r==null?void 0:r.type)===`block-map`||(r==null?void 0:r.type)===`block-seq`)&&a(h,`TAB_AS_INDENT`,`Tabs are not allowed as indentation`),{comma:y,found:b,spaceBefore:c,comment:d,hasNewline:p,anchor:g,tag:_,newlineAfterProp:v,end:C,start:x??C}}function _D(e){if(!e)return null;switch(e.type){case`alias`:case`scalar`:case`double-quoted-scalar`:case`single-quoted-scalar`:if(e.source.includes(`
|
|
1430
|
+
`))return!0;if(e.end){for(let t of e.end)if(t.type===`newline`)return!0}return!1;case`flow-collection`:for(let t of e.items){for(let e of t.start)if(e.type===`newline`)return!0;if(t.sep){for(let e of t.sep)if(e.type===`newline`)return!0}if(_D(t.key)||_D(t.value))return!0}return!1;default:return!0}}function vD(e,t,n){if((t==null?void 0:t.type)===`flow-collection`){let r=t.end[0];r.indent===e&&(r.source===`]`||r.source===`}`)&&_D(t)&&n(r,`BAD_INDENT`,`Flow end indicator should be more indented than parent`,!0)}}function yD(e,t,n){let{uniqueKeys:r}=e.options;if(r===!1)return!1;let i=typeof r==`function`?r:(e,t)=>e===t||Uw(e)&&Uw(t)&&e.value===t.value;return t.some(e=>i(e.key,n))}var bD=`All mapping items must start at the same column`;function xD({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a==null?void 0:a.nodeClass)??sE)(n.schema);n.atRoot&&=!1;let s=r.offset,c=null;for(let a of r.items){var l;let{start:u,key:d,sep:f,value:p}=a,m=gD(u,{indicator:`explicit-key-ind`,next:d??(f==null?void 0:f[0]),offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0}),h=!m.found;if(h){if(d&&(d.type===`block-seq`?i(s,`BLOCK_AS_IMPLICIT_KEY`,`A block sequence may not be used as an implicit map key`):`indent`in d&&d.indent!==r.indent&&i(s,`BAD_INDENT`,bD)),!m.anchor&&!m.tag&&!f){c=m.end,m.comment&&(o.comment?o.comment+=`
|
|
1431
|
+
`+m.comment:o.comment=m.comment);continue}(m.newlineAfterProp||_D(d))&&i(d??u[u.length-1],`MULTILINE_IMPLICIT_KEY`,`Implicit keys need to be on a single line`)}else((l=m.found)==null?void 0:l.indent)!==r.indent&&i(s,`BAD_INDENT`,bD);n.atKey=!0;let g=m.end,_=d?e(n,d,m,i):t(n,g,u,null,m,i);n.schema.compat&&vD(r.indent,d,i),n.atKey=!1,yD(n,o.items,_)&&i(g,`DUPLICATE_KEY`,`Map keys must be unique`);let v=gD(f??[],{indicator:`map-value-ind`,next:p,offset:_.range[2],onError:i,parentIndent:r.indent,startOnNewline:!d||d.type===`block-scalar`});if(s=v.end,v.found){h&&((p==null?void 0:p.type)===`block-map`&&!v.hasNewline&&i(s,`BLOCK_AS_IMPLICIT_KEY`,`Nested mappings are not allowed in compact mappings`),n.options.strict&&m.start<v.found.offset-1024&&i(_.range,`KEY_OVER_1024_CHARS`,`The : indicator must be at most 1024 chars after the start of an implicit block mapping key`));let c=p?e(n,p,v,i):t(n,s,f,null,v,i);n.schema.compat&&vD(r.indent,p,i),s=c.range[2];let l=new tE(_,c);n.options.keepSourceTokens&&(l.srcToken=a),o.items.push(l)}else{h&&i(_.range,`MISSING_CHAR`,`Implicit map keys need to be followed by map values`),v.comment&&(_.comment?_.comment+=`
|
|
1432
|
+
`+v.comment:_.comment=v.comment);let e=new tE(_);n.options.keepSourceTokens&&(e.srcToken=a),o.items.push(e)}}return c&&c<s&&i(c,`IMPOSSIBLE`,`Map comment with trailing content`),o.range=[r.offset,s,c??s],o}function SD({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a==null?void 0:a.nodeClass)??lE)(n.schema);n.atRoot&&=!1,n.atKey&&=!1;let s=r.offset,c=null;for(let{start:a,value:l}of r.items){let u=gD(a,{indicator:`seq-item-ind`,next:l,offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0});if(!u.found)if(u.anchor||u.tag||l)(l==null?void 0:l.type)===`block-seq`?i(u.end,`BAD_INDENT`,`All sequence items must start at the same column`):i(s,`MISSING_CHAR`,`Sequence item without - indicator`);else{c=u.end,u.comment&&(o.comment=u.comment);continue}let d=l?e(n,l,u,i):t(n,u.end,a,null,u,i);n.schema.compat&&vD(r.indent,l,i),s=d.range[2],o.items.push(d)}return o.range=[r.offset,s,c??s],o}function CD(e,t,n,r){let i=``;if(e){let a=!1,o=``;for(let s of e){let{source:e,type:c}=s;switch(c){case`space`:a=!0;break;case`comment`:{n&&!a&&r(s,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`);let t=e.substring(1)||` `;i?i+=o+t:i=t,o=``;break}case`newline`:i&&(o+=e),a=!0;break;default:r(s,`UNEXPECTED_TOKEN`,`Unexpected ${c} at node end`)}t+=e.length}}return{comment:i,offset:t}}var wD=`Block collections are not allowed within flow collections`,TD=e=>e&&(e.type===`block-map`||e.type===`block-seq`);function ED({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=r.start.source===`{`,s=o?`flow map`:`flow sequence`,c=new((a==null?void 0:a.nodeClass)??(o?sE:lE))(n.schema);c.flow=!0;let l=n.atRoot;l&&(n.atRoot=!1),n.atKey&&=!1;let u=r.offset+r.start.source.length;for(let a=0;a<r.items.length;++a){let l=r.items[a],{start:f,key:p,sep:m,value:h}=l,g=gD(f,{flow:s,indicator:`explicit-key-ind`,next:p??(m==null?void 0:m[0]),offset:u,onError:i,parentIndent:r.indent,startOnNewline:!1});if(!g.found){if(!g.anchor&&!g.tag&&!m&&!h){a===0&&g.comma?i(g.comma,`UNEXPECTED_TOKEN`,`Unexpected , in ${s}`):a<r.items.length-1&&i(g.start,`UNEXPECTED_TOKEN`,`Unexpected empty item in ${s}`),g.comment&&(c.comment?c.comment+=`
|
|
1433
|
+
`+g.comment:c.comment=g.comment),u=g.end;continue}!o&&n.options.strict&&_D(p)&&i(p,`MULTILINE_IMPLICIT_KEY`,`Implicit keys of flow sequence pairs need to be on a single line`)}if(a===0)g.comma&&i(g.comma,`UNEXPECTED_TOKEN`,`Unexpected , in ${s}`);else if(g.comma||i(g.start,`MISSING_CHAR`,`Missing , between ${s} items`),g.comment){let e=``;loop:for(let t of f)switch(t.type){case`comma`:case`space`:break;case`comment`:e=t.source.substring(1);break loop;default:break loop}if(e){let t=c.items[c.items.length-1];Hw(t)&&(t=t.value??t.key),t.comment?t.comment+=`
|
|
1434
|
+
`+e:t.comment=e,g.comment=g.comment.substring(e.length+1)}}if(!o&&!m&&!g.found){let r=h?e(n,h,g,i):t(n,g.end,m,null,g,i);c.items.push(r),u=r.range[2],TD(h)&&i(r.range,`BLOCK_IN_FLOW`,wD)}else{n.atKey=!0;let a=g.end,_=p?e(n,p,g,i):t(n,a,f,null,g,i);TD(p)&&i(_.range,`BLOCK_IN_FLOW`,wD),n.atKey=!1;let v=gD(m??[],{flow:s,indicator:`map-value-ind`,next:h,offset:_.range[2],onError:i,parentIndent:r.indent,startOnNewline:!1});if(v.found){if(!o&&!g.found&&n.options.strict){if(m)for(let e of m){if(e===v.found)break;if(e.type===`newline`){i(e,`MULTILINE_IMPLICIT_KEY`,`Implicit keys of flow sequence pairs need to be on a single line`);break}}g.start<v.found.offset-1024&&i(v.found,`KEY_OVER_1024_CHARS`,`The : indicator must be at most 1024 chars after the start of an implicit flow sequence key`)}}else if(h){var d;`source`in h&&((d=h.source)==null?void 0:d[0])===`:`?i(h,`MISSING_CHAR`,`Missing space after : in ${s}`):i(v.start,`MISSING_CHAR`,`Missing , or : between ${s} items`)}let y=h?e(n,h,v,i):v.found?t(n,v.end,m,null,v,i):null;y?TD(h)&&i(y.range,`BLOCK_IN_FLOW`,wD):v.comment&&(_.comment?_.comment+=`
|
|
1435
|
+
`+v.comment:_.comment=v.comment);let b=new tE(_,y);if(n.options.keepSourceTokens&&(b.srcToken=l),o){let e=c;yD(n,e.items,_)&&i(a,`DUPLICATE_KEY`,`Map keys must be unique`),e.items.push(b)}else{let e=new sE(n.schema);e.flow=!0,e.items.push(b);let t=(y??_).range;e.range=[_.range[0],t[1],t[2]],c.items.push(e)}u=y?y.range[2]:v.end}}let f=o?`}`:`]`,[p,...m]=r.end,h=u;if((p==null?void 0:p.source)===f)h=p.offset+p.source.length;else{let e=s[0].toUpperCase()+s.substring(1),t=l?`${e} must end with a ${f}`:`${e} in block collection must be sufficiently indented and end with a ${f}`;i(u,l?`MISSING_CHAR`:`BAD_INDENT`,t),p&&p.source.length!==1&&m.unshift(p)}if(m.length>0){let e=CD(m,h,n.options.strict,i);e.comment&&(c.comment?c.comment+=`
|
|
1436
|
+
`+e.comment:c.comment=e.comment),c.range=[r.offset,h,e.offset]}else c.range=[r.offset,h,h];return c}function DD(e,t,n,r,i,a){let o=n.type===`block-map`?xD(e,t,n,r,a):n.type===`block-seq`?SD(e,t,n,r,a):ED(e,t,n,r,a),s=o.constructor;return i===`!`||i===s.tagName?(o.tag=s.tagName,o):(i&&(o.tag=i),o)}function OD(e,t,n,r,i){var a;let o=r.tag,s=o?t.directives.tagName(o.source,e=>i(o,`TAG_RESOLVE_FAILED`,e)):null;if(n.type===`block-seq`){let{anchor:e,newlineAfterProp:t}=r,n=e&&o?e.offset>o.offset?e:o:e??o;n&&(!t||t.offset<n.offset)&&i(n,`MISSING_CHAR`,`Missing newline after block sequence props`)}let c=n.type===`block-map`?`map`:n.type===`block-seq`?`seq`:n.start.source===`{`?`map`:`seq`;if(!o||!s||s===`!`||s===sE.tagName&&c===`map`||s===lE.tagName&&c===`seq`)return DD(e,t,n,i,s);let l=t.schema.tags.find(e=>e.tag===s&&e.collection===c);if(!l){let r=t.schema.knownTags[s];if((r==null?void 0:r.collection)===c)t.schema.tags.push(Object.assign({},r,{default:!1})),l=r;else return r?i(o,`BAD_COLLECTION_TYPE`,`${r.tag} used for ${c} collection, but expects ${r.collection??`scalar`}`,!0):i(o,`TAG_RESOLVE_FAILED`,`Unresolved tag: ${s}`,!0),DD(e,t,n,i,s)}let u=DD(e,t,n,i,s,l),d=((a=l.resolve)==null?void 0:a.call(l,u,e=>i(o,`TAG_RESOLVE_FAILED`,e),t.options))??u,f=Kw(d)?d:new hT(d);return f.range=u.range,f.tag=s,l!=null&&l.format&&(f.format=l.format),f}function kD(e,t,n){let r=t.offset,i=AD(t,e.options.strict,n);if(!i)return{value:``,type:null,comment:``,range:[r,r,r]};let a=i.mode===`>`?hT.BLOCK_FOLDED:hT.BLOCK_LITERAL,o=t.source?jD(t.source):[],s=o.length;for(let e=o.length-1;e>=0;--e){let t=o[e][1];if(t===``||t===`\r`)s=e;else break}if(s===0){let e=i.chomp===`+`&&o.length>0?`
|
|
1437
1437
|
`.repeat(Math.max(1,o.length-1)):``,n=r+i.length;return t.source&&(n+=t.source.length),{value:e,type:a,comment:i.comment,range:[r,n,n]}}let c=t.indent+i.indent,l=t.offset+i.length,u=0;for(let t=0;t<s;++t){let[r,a]=o[t];if(a===``||a===`\r`)i.indent===0&&r.length>c&&(c=r.length);else{r.length<c&&n(l+r.length,`MISSING_CHAR`,`Block scalars with more-indented leading empty lines must use an explicit indentation indicator`),i.indent===0&&(c=r.length),u=t,c===0&&!e.atRoot&&n(l,`BAD_INDENT`,`Block scalar values in collections must be indented`);break}l+=r.length+a.length+1}for(let e=o.length-1;e>=s;--e)o[e][0].length>c&&(s=e+1);let d=``,f=``,p=!1;for(let e=0;e<u;++e)d+=o[e][0].slice(c)+`
|
|
1438
|
-
`;for(let e=u;e<s;++e){let[t,r]=o[e];l+=t.length+r.length+1;let s=r[r.length-1]===`\r`;if(s&&(r=r.slice(0,-1)),r&&t.length<c){let e=`Block scalar lines must not be less indented than their ${i.indent?`explicit indentation indicator`:`first line`}`;n(l-r.length-(s?2:1),`BAD_INDENT`,e),t=``}a===
|
|
1438
|
+
`;for(let e=u;e<s;++e){let[t,r]=o[e];l+=t.length+r.length+1;let s=r[r.length-1]===`\r`;if(s&&(r=r.slice(0,-1)),r&&t.length<c){let e=`Block scalar lines must not be less indented than their ${i.indent?`explicit indentation indicator`:`first line`}`;n(l-r.length-(s?2:1),`BAD_INDENT`,e),t=``}a===hT.BLOCK_LITERAL?(d+=f+t.slice(c)+r,f=`
|
|
1439
1439
|
`):t.length>c||r[0]===` `?(f===` `?f=`
|
|
1440
1440
|
`:!p&&f===`
|
|
1441
1441
|
`&&(f=`
|
|
@@ -1448,47 +1448,47 @@ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\
|
|
|
1448
1448
|
`+o[e][0].slice(c);d[d.length-1]!==`
|
|
1449
1449
|
`&&(d+=`
|
|
1450
1450
|
`);break;default:d+=`
|
|
1451
|
-
`}let m=r+i.length+t.source.length;return{value:d,type:a,comment:i.comment,range:[r,m,m]}}function
|
|
1451
|
+
`}let m=r+i.length+t.source.length;return{value:d,type:a,comment:i.comment,range:[r,m,m]}}function AD({offset:e,props:t},n,r){if(t[0].type!==`block-scalar-header`)return r(t[0],`IMPOSSIBLE`,`Block scalar header not found`),null;let{source:i}=t[0],a=i[0],o=0,s=``,c=-1;for(let t=1;t<i.length;++t){let n=i[t];if(!s&&(n===`-`||n===`+`))s=n;else{let r=Number(n);!o&&r?o=r:c===-1&&(c=e+t)}}c!==-1&&r(c,`UNEXPECTED_TOKEN`,`Block scalar header includes extra characters: ${i}`);let l=!1,u=``,d=i.length;for(let e=1;e<t.length;++e){let i=t[e];switch(i.type){case`space`:l=!0;case`newline`:d+=i.source.length;break;case`comment`:n&&!l&&r(i,`MISSING_CHAR`,`Comments must be separated from other tokens by white space characters`),d+=i.source.length,u=i.source.substring(1);break;case`error`:r(i,`UNEXPECTED_TOKEN`,i.message),d+=i.source.length;break;default:{r(i,`UNEXPECTED_TOKEN`,`Unexpected token in block scalar header: ${i.type}`);let e=i.source;e&&typeof e==`string`&&(d+=e.length)}}}return{mode:a,indent:o,chomp:s,comment:u,length:d}}function jD(e){let t=e.split(/\n( *)/),n=t[0],r=n.match(/^( *)/),i=[r!=null&&r[1]?[r[1],n.slice(r[1].length)]:[``,n]];for(let e=1;e<t.length;e+=2)i.push([t[e],t[e+1]]);return i}function MD(e,t,n){let{offset:r,type:i,source:a,end:o}=e,s,c,l=(e,t,i)=>n(r+e,t,i);switch(i){case`scalar`:s=hT.PLAIN,c=ND(a,l);break;case`single-quoted-scalar`:s=hT.QUOTE_SINGLE,c=PD(a,l);break;case`double-quoted-scalar`:s=hT.QUOTE_DOUBLE,c=ID(a,l);break;default:return n(e,`UNEXPECTED_TOKEN`,`Expected a flow scalar value, but found: ${i}`),{value:``,type:null,comment:``,range:[r,r+a.length,r+a.length]}}let u=r+a.length,d=CD(o,u,t,n);return{value:c,type:s,comment:d.comment,range:[r,u,d.offset]}}function ND(e,t){let n=``;switch(e[0]){case` `:n=`a tab character`;break;case`,`:n=`flow indicator character ,`;break;case`%`:n=`directive indicator character %`;break;case`|`:case`>`:n=`block scalar indicator ${e[0]}`;break;case`@`:case"`":n=`reserved character ${e[0]}`}return n&&t(0,`BAD_SCALAR_START`,`Plain value cannot start with ${n}`),FD(e)}function PD(e,t){return(e[e.length-1]!==`'`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing 'quote`),FD(e.slice(1,-1)).replace(/''/g,`'`)}function FD(e){let t,n;try{t=RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
1452
1452
|
`,`sy`),n=RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
1453
1453
|
`,`sy`)}catch{t=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=t.exec(e);if(!r)return e;let i=r[1],a=` `,o=t.lastIndex;for(n.lastIndex=o;r=n.exec(e);)r[1]===``?a===`
|
|
1454
1454
|
`?i+=a:a=`
|
|
1455
|
-
`:(i+=a+r[1],a=` `),o=n.lastIndex;let s=/[ \t]*(.*)/sy;return s.lastIndex=o,r=s.exec(e),i+a+((r==null?void 0:r[1])??``)}function
|
|
1455
|
+
`:(i+=a+r[1],a=` `),o=n.lastIndex;let s=/[ \t]*(.*)/sy;return s.lastIndex=o,r=s.exec(e),i+a+((r==null?void 0:r[1])??``)}function ID(e,t){let n=``;for(let r=1;r<e.length-1;++r){let i=e[r];if(i!==`\r`||e[r+1]!==`
|
|
1456
1456
|
`)if(i===`
|
|
1457
|
-
`){let{fold:t,offset:i}=
|
|
1457
|
+
`){let{fold:t,offset:i}=LD(e,r);n+=t,r=i}else if(i===`\\`){let i=e[++r],a=RD[i];if(a)n+=a;else if(i===`
|
|
1458
1458
|
`)for(i=e[r+1];i===` `||i===` `;)i=e[++r+1];else if(i===`\r`&&e[r+1]===`
|
|
1459
|
-
`)for(i=e[++r+1];i===` `||i===` `;)i=e[++r+1];else if(i===`x`||i===`u`||i===`U`){let a=i===`x`?2:i===`u`?4:8;n+=
|
|
1459
|
+
`)for(i=e[++r+1];i===` `||i===` `;)i=e[++r+1];else if(i===`x`||i===`u`||i===`U`){let a=i===`x`?2:i===`u`?4:8;n+=zD(e,r+1,a,t),r+=a}else{let i=e.substr(r-1,2);t(r-1,`BAD_DQ_ESCAPE`,`Invalid escape sequence ${i}`),n+=i}}else if(i===` `||i===` `){let t=r,a=e[r+1];for(;a===` `||a===` `;)a=e[++r+1];a!==`
|
|
1460
1460
|
`&&(a!==`\r`||e[r+2]!==`
|
|
1461
|
-
`)&&(n+=r>t?e.slice(t,r+1):i)}else n+=i}return(e[e.length-1]!==`"`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing "quote`),n}function
|
|
1461
|
+
`)&&(n+=r>t?e.slice(t,r+1):i)}else n+=i}return(e[e.length-1]!==`"`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing "quote`),n}function LD(e,t){let n=``,r=e[t+1];for(;(r===` `||r===` `||r===`
|
|
1462
1462
|
`||r===`\r`)&&(r!==`\r`||e[t+2]===`
|
|
1463
1463
|
`);)r===`
|
|
1464
1464
|
`&&(n+=`
|
|
1465
|
-
`),t+=1,r=e[t+1];return n||=` `,{fold:n,offset:t}}var
|
|
1466
|
-
`,r:`\r`,t:` `,v:`\v`,N:`
`,_:`\xA0`,L:`\u2028`,P:`\u2029`," ":` `,'"':`"`,"/":`/`,"\\":`\\`," ":` `};function
|
|
1465
|
+
`),t+=1,r=e[t+1];return n||=` `,{fold:n,offset:t}}var RD={0:`\0`,a:`\x07`,b:`\b`,e:`\x1B`,f:`\f`,n:`
|
|
1466
|
+
`,r:`\r`,t:` `,v:`\v`,N:`
`,_:`\xA0`,L:`\u2028`,P:`\u2029`," ":` `,'"':`"`,"/":`/`,"\\":`\\`," ":` `};function zD(e,t,n,r){let i=e.substr(t,n),a=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;try{return String.fromCodePoint(a)}catch{let i=e.substr(t-2,n+2);return r(t-2,`BAD_DQ_ESCAPE`,`Invalid escape sequence ${i}`),i}}function BD(e,t,n,r){let{value:i,type:a,comment:o,range:s}=t.type===`block-scalar`?kD(e,t,r):MD(t,e.options.strict,r),c=n?e.directives.tagName(n.source,e=>r(n,`TAG_RESOLVE_FAILED`,e)):null,l;l=e.options.stringKeys&&e.atKey?e.schema[Iw]:c?VD(e.schema,i,c,n,r):t.type===`scalar`?HD(e,i,t,r):e.schema[Iw];let u;try{let a=l.resolve(i,e=>r(n??t,`TAG_RESOLVE_FAILED`,e),e.options);u=Uw(a)?a:new hT(a)}catch(e){let a=e instanceof Error?e.message:String(e);r(n??t,`TAG_RESOLVE_FAILED`,a),u=new hT(i)}return u.range=s,u.source=i,a&&(u.type=a),c&&(u.tag=c),l.format&&(u.format=l.format),o&&(u.comment=o),u}function VD(e,t,n,r,i){var a;if(n===`!`)return e[Iw];let o=[];for(let t of e.tags)if(!t.collection&&t.tag===n)if(t.default&&t.test)o.push(t);else return t;for(let e of o)if((a=e.test)!=null&&a.test(t))return e;let s=e.knownTags[n];return s&&!s.collection?(e.tags.push(Object.assign({},s,{default:!1,test:void 0})),s):(i(r,`TAG_RESOLVE_FAILED`,`Unresolved tag: ${n}`,n!==`tag:yaml.org,2002:str`),e[Iw])}function HD({atKey:e,directives:t,schema:n},r,i,a){let o=n.tags.find(t=>{var n;return(t.default===!0||e&&t.default===`key`)&&((n=t.test)==null?void 0:n.test(r))})||n[Iw];if(n.compat){let e=n.compat.find(e=>{var t;return e.default&&((t=e.test)==null?void 0:t.test(r))})??n[Iw];o.tag!==e.tag&&a(i,`TAG_RESOLVE_FAILED`,`Value may be parsed as either ${t.tagString(o.tag)} or ${t.tagString(e.tag)}`,!0)}return o}function UD(e,t,n){if(t){n??=t.length;for(let r=n-1;r>=0;--r){let n=t[r];switch(n.type){case`space`:case`comment`:case`newline`:e-=n.source.length;continue}for(n=t[++r];(n==null?void 0:n.type)===`space`;)e+=n.source.length,n=t[++r];break}}return e}var WD={composeNode:GD,composeEmptyNode:KD};function GD(e,t,n,r){let i=e.atKey,{spaceBefore:a,comment:o,anchor:s,tag:c}=n,l,u=!0;switch(t.type){case`alias`:l=qD(e,t,r),(s||c)&&r(t,`ALIAS_PROPS`,`An alias node must not specify any properties`);break;case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:case`block-scalar`:l=BD(e,t,c,r),s&&(l.anchor=s.source.substring(1));break;case`block-map`:case`block-seq`:case`flow-collection`:try{l=OD(WD,e,t,n,r),s&&(l.anchor=s.source.substring(1))}catch(e){r(t,`RESOURCE_EXHAUSTION`,e instanceof Error?e.message:String(e))}break;default:r(t,`UNEXPECTED_TOKEN`,t.type===`error`?t.message:`Unsupported token (type: ${t.type})`),u=!1}return l??=KD(e,t.offset,void 0,null,n,r),s&&l.anchor===``&&r(s,`BAD_ALIAS`,`Anchor cannot be an empty string`),i&&e.options.stringKeys&&(!Uw(l)||typeof l.value!=`string`||l.tag&&l.tag!==`tag:yaml.org,2002:str`)&&r(c??t,`NON_STRING_KEY`,`With stringKeys, all keys must be strings`),a&&(l.spaceBefore=!0),o&&(t.type===`scalar`&&t.source===``?l.comment=o:l.commentBefore=o),e.options.keepSourceTokens&&u&&(l.srcToken=t),l}function KD(e,t,n,r,{spaceBefore:i,comment:a,anchor:o,tag:s,end:c},l){let u=BD(e,{type:`scalar`,offset:UD(t,n,r),indent:-1,source:``},s,l);return o&&(u.anchor=o.source.substring(1),u.anchor===``&&l(o,`BAD_ALIAS`,`Anchor cannot be an empty string`)),i&&(u.spaceBefore=!0),a&&(u.comment=a,u.range[2]=c),u}function qD({options:e},{offset:t,source:n,end:r},i){let a=new fT(n.substring(1));a.source===``&&i(t,`BAD_ALIAS`,`Alias cannot be an empty string`),a.source.endsWith(`:`)&&i(t+n.length-1,`BAD_ALIAS`,`Alias ending in : is ambiguous`,!0);let o=t+n.length,s=CD(r,o,e.strict,i);return a.range=[t,o,s.offset],s.comment&&(a.comment=s.comment),a}function JD(e,t,{offset:n,start:r,value:i,end:a},o){let s=new uD(void 0,Object.assign({_directives:t},e)),c={atKey:!1,atRoot:!0,directives:s.directives,options:s.options,schema:s.schema},l=gD(r,{indicator:`doc-start`,next:i??(a==null?void 0:a[0]),offset:n,onError:o,parentIndent:0,startOnNewline:!0});l.found&&(s.directives.docStart=!0,i&&(i.type===`block-map`||i.type===`block-seq`)&&!l.hasNewline&&o(l.end,`MISSING_CHAR`,`Block collection cannot start on same line with directives-end marker`)),s.contents=i?GD(c,i,l,o):KD(c,l.end,r,null,l,o);let u=s.contents.range[2],d=CD(a,u,!1,o);return d.comment&&(s.comment=d.comment),s.range=[n,u,d.offset],s}function YD(e){if(typeof e==`number`)return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];let{offset:t,source:n}=e;return[t,t+(typeof n==`string`?n.length:1)]}function XD(e){let t=``,n=!1,r=!1;for(let a=0;a<e.length;++a){let o=e[a];switch(o[0]){case`#`:t+=(t===``?``:r?`
|
|
1467
1467
|
|
|
1468
1468
|
`:`
|
|
1469
|
-
`)+(o.substring(1)||` `),n=!0,r=!1;break;case`%`:var i;((i=e[a+1])==null?void 0:i[0])!==`#`&&(a+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}var
|
|
1469
|
+
`)+(o.substring(1)||` `),n=!0,r=!1;break;case`%`:var i;((i=e[a+1])==null?void 0:i[0])!==`#`&&(a+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}var ZD=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,r)=>{let i=YD(e);r?this.warnings.push(new mD(i,t,n)):this.errors.push(new pD(i,t,n))},this.directives=new iT({version:e.version||`1.2`}),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:r}=XD(this.prelude);if(n){let i=e.contents;if(t)e.comment=e.comment?`${e.comment}\n${n}`:n;else if(r||e.directives.docStart||!i)e.commentBefore=n;else if(Gw(i)&&!i.flow&&i.items.length>0){let e=i.items[0];Hw(e)&&(e=e.key);let t=e.commentBefore;e.commentBefore=t?`${n}\n${t}`:n}else{let e=i.commentBefore;i.commentBefore=e?`${n}\n${e}`:n}}if(t){for(let t=0;t<this.errors.length;++t)e.errors.push(this.errors[t]);for(let t=0;t<this.warnings.length;++t)e.warnings.push(this.warnings[t])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:XD(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(let t of e)yield*this.next(t);yield*this.end(t,n)}*next(e){switch(e.type){case`directive`:this.directives.add(e.source,(t,n,r)=>{let i=YD(e);i[0]+=t,this.onError(i,`BAD_DIRECTIVE`,n,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case`document`:{let t=JD(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,`MISSING_CHAR`,`Missing directives-end/doc-start indicator line`),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case`byte-order-mark`:case`space`:break;case`comment`:case`newline`:this.prelude.push(e.source);break;case`error`:{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new pD(YD(e),`UNEXPECTED_TOKEN`,t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case`doc-end`:{if(!this.doc){this.errors.push(new pD(YD(e),`UNEXPECTED_TOKEN`,`Unexpected doc-end without preceding document`));break}this.doc.directives.docEnd=!0;let t=CD(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let e=this.doc.comment;this.doc.comment=e?`${e}\n${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new pD(YD(e),`UNEXPECTED_TOKEN`,`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let e=new uD(void 0,Object.assign({_directives:this.directives},this.options));this.atDirectives&&this.onError(t,`MISSING_CHAR`,`Missing directives-end indicator line`),e.range=[0,t,t],this.decorate(e,!1),yield e}}},QD=Symbol(`break visit`),$D=Symbol(`skip children`),eO=Symbol(`remove item`);function tO(e,t){`type`in e&&e.type===`document`&&(e={start:e.start,value:e.value}),nO(Object.freeze([]),e,t)}tO.BREAK=QD,tO.SKIP=$D,tO.REMOVE=eO,tO.itemAtPath=(e,t)=>{let n=e;for(let[e,r]of t){let t=n==null?void 0:n[e];if(t&&`items`in t)n=t.items[r];else return}return n},tO.parentCollection=(e,t)=>{let n=tO.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],i=n==null?void 0:n[r];if(i&&`items`in i)return i;throw Error(`Parent collection not found`)};function nO(e,t,n){let r=n(t,e);if(typeof r==`symbol`)return r;for(let i of[`key`,`value`]){let a=t[i];if(a&&`items`in a){for(let t=0;t<a.items.length;++t){let r=nO(Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r==`number`)t=r-1;else if(r===QD)return QD;else r===eO&&(a.items.splice(t,1),--t)}typeof r==`function`&&i===`key`&&(r=r(t,e))}}return typeof r==`function`?r(t,e):r}function rO(e){switch(e){case``:return`byte-order-mark`;case``:return`doc-mode`;case``:return`flow-error-end`;case``:return`scalar`;case`---`:return`doc-start`;case`...`:return`doc-end`;case``:case`
|
|
1470
1470
|
`:case`\r
|
|
1471
|
-
`:return`newline`;case`-`:return`seq-item-ind`;case`?`:return`explicit-key-ind`;case`:`:return`map-value-ind`;case`{`:return`flow-map-start`;case`}`:return`flow-map-end`;case`[`:return`flow-seq-start`;case`]`:return`flow-seq-end`;case`,`:return`comma`}switch(e[0]){case` `:case` `:return`space`;case`#`:return`comment`;case`%`:return`directive-line`;case`*`:return`alias`;case`&`:return`anchor`;case`!`:return`tag`;case`'`:return`single-quoted-scalar`;case`"`:return`double-quoted-scalar`;case`|`:case`>`:return`block-scalar-header`}return null}function
|
|
1472
|
-
`:case`\r`:case` `:return!0;default:return!1}}var
|
|
1473
|
-
\r `)
|
|
1471
|
+
`:return`newline`;case`-`:return`seq-item-ind`;case`?`:return`explicit-key-ind`;case`:`:return`map-value-ind`;case`{`:return`flow-map-start`;case`}`:return`flow-map-end`;case`[`:return`flow-seq-start`;case`]`:return`flow-seq-end`;case`,`:return`comma`}switch(e[0]){case` `:case` `:return`space`;case`#`:return`comment`;case`%`:return`directive-line`;case`*`:return`alias`;case`&`:return`anchor`;case`!`:return`tag`;case`'`:return`single-quoted-scalar`;case`"`:return`double-quoted-scalar`;case`|`:case`>`:return`block-scalar-header`}return null}function iO(e){switch(e){case void 0:case` `:case`
|
|
1472
|
+
`:case`\r`:case` `:return!0;default:return!1}}var aO=new Set(`0123456789ABCDEFabcdef`),oO=new Set(`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()`),sO=new Set(`,[]{}`),cO=new Set(` ,[]{}
|
|
1473
|
+
\r `),lO=e=>!e||cO.has(e),uO=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer=``,this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if(typeof e!=`string`)throw TypeError(`source is not a string`);this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let n=this.next??`stream`;for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===` `||t===` `;)t=this.buffer[++e];return!t||t===`#`||t===`
|
|
1474
1474
|
`||t===`\r`&&this.buffer[e+1]===`
|
|
1475
1475
|
`}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let n=0;for(;t===` `;)t=this.buffer[++n+e];if(t===`\r`){let t=this.buffer[n+e+1];if(t===`
|
|
1476
1476
|
`||!t&&!this.atEnd)return e+n+1}return t===`
|
|
1477
|
-
`||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t===`-`||t===`.`){let t=this.buffer.substr(e,3);if((t===`---`||t===`...`)&&
|
|
1478
|
-
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]===`\r`&&--e,this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case`stream`:return yield*this.parseStream();case`line-start`:return yield*this.parseLineStart();case`block-start`:return yield*this.parseBlockStart();case`doc`:return yield*this.parseDocument();case`flow`:return yield*this.parseFlowCollection();case`quoted-scalar`:return yield*this.parseQuotedScalar();case`block-scalar`:return yield*this.parseBlockScalar();case`plain-scalar`:return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext(`stream`);if(e[0]===``&&(yield*this.pushCount(1),e=e.substring(1)),e[0]===`%`){let t=e.length,n=e.indexOf(`#`);for(;n!==-1;){let r=e[n-1];if(r===` `||r===` `){t=n-1;break}n=e.indexOf(`#`,n+1)}for(;;){let n=e[t-1];if(n===` `||n===` `)--t;else break}let r=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-r),this.pushNewline(),`stream`}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),`stream`}return yield``,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext(`line-start`);if(e===`-`||e===`.`){if(!this.atEnd&&!this.hasChars(4))return this.setNext(`line-start`);let e=this.peek(3);if((e===`---`||e===`...`)&&
|
|
1477
|
+
`||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t===`-`||t===`.`){let t=this.buffer.substr(e,3);if((t===`---`||t===`...`)&&iO(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!=`number`||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
|
|
1478
|
+
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]===`\r`&&--e,this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case`stream`:return yield*this.parseStream();case`line-start`:return yield*this.parseLineStart();case`block-start`:return yield*this.parseBlockStart();case`doc`:return yield*this.parseDocument();case`flow`:return yield*this.parseFlowCollection();case`quoted-scalar`:return yield*this.parseQuotedScalar();case`block-scalar`:return yield*this.parseBlockScalar();case`plain-scalar`:return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext(`stream`);if(e[0]===``&&(yield*this.pushCount(1),e=e.substring(1)),e[0]===`%`){let t=e.length,n=e.indexOf(`#`);for(;n!==-1;){let r=e[n-1];if(r===` `||r===` `){t=n-1;break}n=e.indexOf(`#`,n+1)}for(;;){let n=e[t-1];if(n===` `||n===` `)--t;else break}let r=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-r),this.pushNewline(),`stream`}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),`stream`}return yield``,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext(`line-start`);if(e===`-`||e===`.`){if(!this.atEnd&&!this.hasChars(4))return this.setNext(`line-start`);let e=this.peek(3);if((e===`---`||e===`...`)&&iO(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,e===`---`?`doc`:`stream`}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!iO(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext(`block-start`);if((e===`-`||e===`?`||e===`:`)&&iO(t)){let e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,`block-start`}return`doc`}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext(`doc`);let t=yield*this.pushIndicators();switch(e[t]){case`#`:yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case`{`:case`[`:return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,`flow`;case`}`:case`]`:return yield*this.pushCount(1),`doc`;case`*`:return yield*this.pushUntil(lO),`doc`;case`"`:case`'`:return yield*this.parseQuotedScalar();case`|`:case`>`:return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,n=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let r=this.getLine();if(r===null)return this.setNext(`flow`);if((n!==-1&&n<this.indentNext&&r[0]!==`#`||n===0&&(r.startsWith(`---`)||r.startsWith(`...`))&&iO(r[3]))&&(n!==this.indentNext-1||this.flowLevel!==1||r[0]!==`]`&&r[0]!==`}`))return this.flowLevel=0,yield``,yield*this.parseLineStart();let i=0;for(;r[i]===`,`;)i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(i+=yield*this.pushIndicators(),r[i]){case void 0:return`flow`;case`#`:return yield*this.pushCount(r.length-i),`flow`;case`{`:case`[`:return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,`flow`;case`}`:case`]`:return yield*this.pushCount(1),this.flowKey=!0,--this.flowLevel,this.flowLevel?`flow`:`doc`;case`*`:return yield*this.pushUntil(lO),`flow`;case`"`:case`'`:return this.flowKey=!0,yield*this.parseQuotedScalar();case`:`:{let e=this.charAt(1);if(this.flowKey||iO(e)||e===`,`)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),`flow`}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if(e===`'`)for(;t!==-1&&this.buffer[t+1]===`'`;)t=this.buffer.indexOf(`'`,t+2);else for(;t!==-1;){let e=0;for(;this.buffer[t-1-e]===`\\`;)e+=1;if(e%2==0)break;t=this.buffer.indexOf(`"`,t+1)}let n=this.buffer.substring(0,t),r=n.indexOf(`
|
|
1479
1479
|
`,this.pos);if(r!==-1){for(;r!==-1;){let e=this.continueScalar(r+1);if(e===-1)break;r=n.indexOf(`
|
|
1480
|
-
`,e)}r!==-1&&(t=r-(n[r-1]===`\r`?2:1))}if(t===-1){if(!this.atEnd)return this.setNext(`quoted-scalar`);t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?`flow`:`doc`}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if(t===`+`)this.blockScalarKeep=!0;else if(t>`0`&&t<=`9`)this.blockScalarIndent=Number(t)-1;else if(t!==`-`)break}return yield*this.pushUntil(e=>
|
|
1480
|
+
`,e)}r!==-1&&(t=r-(n[r-1]===`\r`?2:1))}if(t===-1){if(!this.atEnd)return this.setNext(`quoted-scalar`);t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?`flow`:`doc`}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if(t===`+`)this.blockScalarKeep=!0;else if(t>`0`&&t<=`9`)this.blockScalarIndent=Number(t)-1;else if(t!==`-`)break}return yield*this.pushUntil(e=>iO(e)||e===`#`)}*parseBlockScalar(){let e=this.pos-1,t=0,n;loop:for(let r=this.pos;n=this.buffer[r];++r)switch(n){case` `:t+=1;break;case`
|
|
1481
1481
|
`:e=r,t=0;break;case`\r`:{let e=this.buffer[r+1];if(!e&&!this.atEnd)return this.setNext(`block-scalar`);if(e===`
|
|
1482
1482
|
`)break}default:break loop}if(!n&&!this.atEnd)return this.setNext(`block-scalar`);if(t>=this.indentNext){this.indentNext=this.blockScalarIndent===-1?t:this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let t=this.continueScalar(e+1);if(t===-1)break;e=this.buffer.indexOf(`
|
|
1483
1483
|
`,t)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext(`block-scalar`);e=this.buffer.length}}let r=e+1;for(n=this.buffer[r];n===` `;)n=this.buffer[++r];if(n===` `){for(;n===` `||n===` `||n===`\r`||n===`
|
|
1484
1484
|
`;)n=this.buffer[++r];e=r-1}else if(!this.blockScalarKeep)do{let n=e-1,r=this.buffer[n];r===`\r`&&(r=this.buffer[--n]);let i=n;for(;r===` `;)r=this.buffer[--n];if(r===`
|
|
1485
|
-
`&&n>=this.pos&&n+1+t>i)e=n;else break}while(!0);return yield``,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,n=this.pos-1,r;for(;r=this.buffer[++n];)if(r===`:`){let r=this.buffer[n+1];if(
|
|
1485
|
+
`&&n>=this.pos&&n+1+t>i)e=n;else break}while(!0);return yield``,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,n=this.pos-1,r;for(;r=this.buffer[++n];)if(r===`:`){let r=this.buffer[n+1];if(iO(r)||e&&sO.has(r))break;t=n}else if(iO(r)){let i=this.buffer[n+1];if(r===`\r`&&(i===`
|
|
1486
1486
|
`?(n+=1,r=`
|
|
1487
|
-
`,i=this.buffer[n+1]):t=n),i===`#`||e&&
|
|
1488
|
-
`){let e=this.continueScalar(n+1);if(e===-1)break;n=Math.max(n,e-2)}}else{if(e&&
|
|
1487
|
+
`,i=this.buffer[n+1]):t=n),i===`#`||e&&sO.has(i))break;if(r===`
|
|
1488
|
+
`){let e=this.continueScalar(n+1);if(e===-1)break;n=Math.max(n,e-2)}}else{if(e&&sO.has(r))break;t=n}return!r&&!this.atEnd?this.setNext(`plain-scalar`):(yield``,yield*this.pushToIndex(t+1,!0),e?`flow`:`doc`)}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield``),0)}*pushIndicators(){let e=0;loop:for(;;){switch(this.charAt(0)){case`!`:e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue loop;case`&`:e+=yield*this.pushUntil(lO),e+=yield*this.pushSpaces(!0);continue loop;case`-`:case`?`:case`:`:{let t=this.flowLevel>0,n=this.charAt(1);if(iO(n)||t&&sO.has(n)){t?this.flowKey&&=!1:this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue loop}}}break loop}return e}*pushTag(){if(this.charAt(1)===`<`){let e=this.pos+2,t=this.buffer[e];for(;!iO(t)&&t!==`>`;)t=this.buffer[++e];return yield*this.pushToIndex(t===`>`?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(oO.has(t))t=this.buffer[++e];else if(t===`%`&&aO.has(this.buffer[e+1])&&aO.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
|
|
1489
1489
|
`?yield*this.pushCount(1):e===`\r`&&this.charAt(1)===`
|
|
1490
|
-
`?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,n;do n=this.buffer[++t];while(n===` `||e&&n===` `);let r=t-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=t),r}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}},
|
|
1490
|
+
`?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,n;do n=this.buffer[++t];while(n===` `||e&&n===` `);let r=t-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=t),r}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}},dO=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){let r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let r=this.lineStarts[t-1];return{line:t,col:e-r+1}}}};function fO(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function pO(e){for(let t=0;t<e.length;++t)switch(e[t].type){case`space`:case`comment`:case`newline`:break;default:return t}return-1}function mO(e){switch(e==null?void 0:e.type){case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:case`flow-collection`:return!0;default:return!1}}function hO(e){switch(e.type){case`document`:return e.start;case`block-map`:{let t=e.items[e.items.length-1];return t.sep??t.start}case`block-seq`:return e.items[e.items.length-1].start;default:return[]}}function gO(e){var t;if(e.length===0)return[];let n=e.length;loop:for(;--n>=0;)switch(e[n].type){case`doc-start`:case`explicit-key-ind`:case`map-value-ind`:case`seq-item-ind`:case`newline`:break loop}for(;((t=e[++n])==null?void 0:t.type)===`space`;);return e.splice(n,e.length)}function _O(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let n=0;n<t.length;++n)e.push(t[n])}function vO(e){if(e.start.type===`flow-seq-start`)for(let t of e.items)t.sep&&!t.value&&!fO(t.start,`explicit-key-ind`)&&!fO(t.sep,`map-value-ind`)&&(t.key&&(t.value=t.key),delete t.key,mO(t.value)?t.value.end?_O(t.value.end,t.sep):t.value.end=t.sep:_O(t.start,t.sep),delete t.sep)}var yO=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source=``,this.type=``,this.lexer=new uO,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=rO(e);if(!t){let t=`Not a YAML token: ${e}`;yield*this.pop({type:`error`,offset:this.offset,message:t,source:e}),this.offset+=e.length}else if(t===`scalar`)this.atNewLine=!1,this.atScalar=!0,this.type=`scalar`;else{switch(this.type=t,yield*this.step(),t){case`newline`:this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case`space`:this.atNewLine&&e[0]===` `&&(this.indent+=e.length);break;case`explicit-key-ind`:case`map-value-ind`:case`seq-item-ind`:this.atNewLine&&(this.indent+=e.length);break;case`doc-mode`:case`flow-error-end`:return;default:this.atNewLine=!1}this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type===`doc-end`&&(e==null?void 0:e.type)!==`doc-end`){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:`doc-end`,offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case`document`:return yield*this.document(e);case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:return yield*this.scalar(e);case`block-scalar`:return yield*this.blockScalar(e);case`block-map`:return yield*this.blockMap(e);case`block-seq`:return yield*this.blockSequence(e);case`flow-collection`:return yield*this.flowCollection(e);case`doc-end`:return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(!t)yield{type:`error`,offset:this.offset,source:``,message:`Tried to pop an empty stack`};else if(this.stack.length===0)yield t;else{let e=this.peek(1);switch(t.type===`block-scalar`?t.indent=`indent`in e?e.indent:0:t.type===`flow-collection`&&e.type===`document`&&(t.indent=0),t.type===`flow-collection`&&vO(t),e.type){case`document`:e.value=t;break;case`block-scalar`:e.props.push(t);break;case`block-map`:{let n=e.items[e.items.length-1];if(n.value){e.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}if(n.sep)n.value=t;else{Object.assign(n,{key:t,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case`block-seq`:{let n=e.items[e.items.length-1];n.value?e.items.push({start:[],value:t}):n.value=t;break}case`flow-collection`:{let n=e.items[e.items.length-1];!n||n.value?e.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((e.type===`document`||e.type===`block-map`||e.type===`block-seq`)&&(t.type===`block-map`||t.type===`block-seq`)){let n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&pO(n.start)===-1&&(t.indent===0||n.start.every(e=>e.type!==`comment`||e.indent<t.indent))&&(e.type===`document`?e.end=n.start:e.items.push({start:n.start}),t.items.splice(-1,1))}}}*stream(){switch(this.type){case`directive-line`:yield{type:`directive`,offset:this.offset,source:this.source};return;case`byte-order-mark`:case`space`:case`comment`:case`newline`:yield this.sourceToken;return;case`doc-mode`:case`doc-start`:{let e={type:`document`,offset:this.offset,start:[]};this.type===`doc-start`&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:`error`,offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case`doc-start`:pO(e.start)===-1?e.start.push(this.sourceToken):(yield*this.pop(),yield*this.step());return;case`anchor`:case`tag`:case`space`:case`comment`:case`newline`:e.start.push(this.sourceToken);return}let t=this.startBlockValue(e);t?this.stack.push(t):yield{type:`error`,offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type===`map-value-ind`){let t=gO(hO(this.peek(2))),n;e.end?(n=e.end,n.push(this.sourceToken),delete e.end):n=[this.sourceToken];let r={type:`block-map`,offset:e.offset,indent:e.indent,items:[{start:t,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=r}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case`space`:case`comment`:case`newline`:e.props.push(this.sourceToken);return;case`scalar`:if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let e=this.source.indexOf(`
|
|
1491
1491
|
`)+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf(`
|
|
1492
|
-
`,e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case`newline`:if(this.onKeyLine=!1,t.value){let n=`end`in t.value?t.value.end:void 0,r=Array.isArray(n)?n[n.length-1]:void 0;(r==null?void 0:r.type)===`comment`?n==null||n.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`space`:case`comment`:if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){var n;let r=e.items[e.items.length-2],i=r==null||(n=r.value)==null?void 0:n.end;if(Array.isArray(i)){
|
|
1492
|
+
`,e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case`newline`:if(this.onKeyLine=!1,t.value){let n=`end`in t.value?t.value.end:void 0,r=Array.isArray(n)?n[n.length-1]:void 0;(r==null?void 0:r.type)===`comment`?n==null||n.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`space`:case`comment`:if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){var n;let r=e.items[e.items.length-2],i=r==null||(n=r.value)==null?void 0:n.end;if(Array.isArray(i)){_O(i,t.start),i.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,r=n&&(t.sep||t.explicitKey)&&this.type!==`seq-item-ind`,i=[];if(r&&t.sep&&!t.value){let n=[];for(let r=0;r<t.sep.length;++r){let i=t.sep[r];switch(i.type){case`newline`:n.push(r);break;case`space`:break;case`comment`:i.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(i=t.sep.splice(n[1]))}switch(this.type){case`anchor`:case`tag`:r||t.value?(i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`explicit-key-ind`:!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):r||t.value?(i.push(this.sourceToken),e.items.push({start:i,explicitKey:!0})):this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case`map-value-ind`:if(t.explicitKey)if(!t.sep)if(fO(t.start,`newline`))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=gO(t.start);this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}else if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(fO(t.sep,`map-value-ind`))this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(mO(t.key)&&!fO(t.sep,`newline`)){let e=gO(t.start),n=t.key,r=t.sep;r.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:e,key:n,sep:r}]})}else i.length>0?t.sep=t.sep.concat(i,this.sourceToken):t.sep.push(this.sourceToken);else t.sep?t.value||r?e.items.push({start:i,key:null,sep:[this.sourceToken]}):fO(t.sep,`map-value-ind`)?this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:{let n=this.flowScalar(this.type);r||t.value?(e.items.push({start:i,key:n,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(n):(Object.assign(t,{key:n,sep:[]}),this.onKeyLine=!0);return}default:{let r=this.startBlockValue(e);if(r){if(r.type===`block-seq`){if(!t.explicitKey&&t.sep&&!fO(t.sep,`newline`)){yield*this.pop({type:`error`,offset:this.offset,message:`Unexpected block-seq-ind on same line with key`,source:this.source});return}}else n&&e.items.push({start:i});this.stack.push(r);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case`newline`:if(t.value){let n=`end`in t.value?t.value.end:void 0,r=Array.isArray(n)?n[n.length-1]:void 0;(r==null?void 0:r.type)===`comment`?n==null||n.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case`space`:case`comment`:if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){var n;let r=e.items[e.items.length-2],i=r==null||(n=r.value)==null?void 0:n.end;if(Array.isArray(i)){_O(i,t.start),i.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case`anchor`:case`tag`:if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case`seq-item-ind`:if(this.indent!==e.indent)break;t.value||fO(t.start,`seq-item-ind`)?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let t=this.startBlockValue(e);if(t){this.stack.push(t);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type===`flow-error-end`){let e;do yield*this.pop(),e=this.peek(1);while((e==null?void 0:e.type)===`flow-collection`)}else if(e.end.length===0){switch(this.type){case`comma`:case`explicit-key-ind`:!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case`map-value-ind`:!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case`space`:case`comment`:case`newline`:case`anchor`:case`tag`:!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:{let n=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]});return}case`flow-map-end`:case`flow-seq-end`:e.end.push(this.sourceToken);return}let n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{let t=this.peek(2);if(t.type===`block-map`&&(this.type===`map-value-ind`&&t.indent===e.indent||this.type===`newline`&&!t.items[t.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type===`map-value-ind`&&t.type!==`flow-collection`){let n=gO(hO(t));vO(e);let r=e.end.splice(1,e.end.length);r.push(this.sourceToken);let i={type:`block-map`,offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=i}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf(`
|
|
1493
1493
|
`)+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf(`
|
|
1494
|
-
`,e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:return this.flowScalar(this.type);case`block-scalar-header`:return{type:`block-scalar`,offset:this.offset,indent:this.indent,props:[this.sourceToken],source:``};case`flow-map-start`:case`flow-seq-start`:return{type:`flow-collection`,offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case`seq-item-ind`:return{type:`block-seq`,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case`explicit-key-ind`:{this.onKeyLine=!0;let t=ok(ak(e));return t.push(this.sourceToken),{type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case`map-value-ind`:{this.onKeyLine=!0;let t=ok(ak(e));return{type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!==`comment`||this.indent<=t?!1:e.every(e=>e.type===`newline`||e.type===`space`)}*documentEnd(e){this.type!==`doc-mode`&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type===`newline`&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case`comma`:case`doc-start`:case`doc-end`:case`flow-seq-end`:case`flow-map-end`:case`map-value-ind`:yield*this.pop(),yield*this.step();break;case`newline`:this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type===`newline`&&(yield*this.pop())}}};function uk(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new tk||null,prettyErrors:t}}function dk(e,t={}){let{lineCounter:n,prettyErrors:r}=uk(t),i=new lk(n==null?void 0:n.addNewLine),a=new VO(t),o=null;for(let t of a.compose(i.parse(e),!0,e.length))if(!o)o=t;else if(o.options.logLevel!==`silent`){o.errors.push(new rO(t.range.slice(0,2),`MULTIPLE_DOCS`,`Source contains multiple documents; please use YAML.parseAllDocuments()`));break}return r&&n&&(o.errors.forEach(aO(e,n)),o.warnings.forEach(aO(e,n))),o}function fk(e,t,n){let r;typeof t==`function`?r=t:n===void 0&&t&&typeof t==`object`&&(n=t);let i=dk(e,n);if(!i)return null;if(i.warnings.forEach(e=>FE(i.options.logLevel,e)),i.errors.length>0){if(i.options.logLevel!==`silent`)throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:r},n))}g();var pk={fullWidth:{width:`100%`},flex:{display:`flex`},button:{height:48,minWidth:48},wrapper:{width:`calc(100vw - 40px)`,height:`calc(100vh - 188px)`}},mk=class extends X{async componentDidMount(){await super.componentDidMount();let{data:e,attr:t}=this.props,n=X.getValue(e,t)||``;this.setState({value:n,initialized:!0,yamlError:this.validateYaml(n)})}validateYaml(e){let t=!1;if(this.props.schema.validateYaml!==!1&&typeof e==`string`&&(e||!this.props.schema.allowEmpty))try{fk(e)}catch(e){console.log(`Error in YAML`,e),t=!0}return t}renderItem(e,t){if(!this.state.initialized)return null;let{schema:n,data:r,attr:i}=this.props,{value:a,showSelectId:o}=this.state,s=n.readOnly===!0||t;return _.createElement(Mn,{fullWidth:!0,variant:`standard`},_.createElement(`div`,{style:pk.flex},_.createElement(Ge,{color:`grey`,style:pk.button,size:`small`,variant:`outlined`,onClick:()=>this.setState({showSelectId:!0})},K.t(`jc_YAML editor`))),o?_.createElement(qS,{title:this.getText(n.label),overflowHidden:!0,applyDisabled:this.state.yamlError&&this.props.schema.doNotApplyWithError||s,onClose:()=>{s?this.setState({showSelectId:!1}):this.setState({showSelectId:!1,value:X.getValue(r,i)||``})},onApply:s?void 0:()=>this.setState({showSelectId:!1},()=>i&&this.onChange(i,a))},_.createElement(`div`,{style:{...pk.wrapper,border:this.state.yamlError?`2px solid red`:`2px solid transparent`}},_.createElement(mw,{mode:`yaml`,value:typeof a==`object`?JSON.stringify(a):a,onChange:s?void 0:e=>this.setState({value:e,yamlError:this.validateYaml(e)}),name:`ConfigYamlEditor`,themeType:this.props.oContext.themeType}))):null,n.help||this.state.yamlError?_.createElement(en,null,this.state.yamlError?K.t(`jc_Invalid YAML`):this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var hk=class extends X{async componentDidMount(){await super.componentDidMount();let e=await i(()=>import(`./lib-Yj8cfN0A.js`),__vite__mapDeps([0]),import.meta.url);this.setState({QRCode:e.default})}renderItem(){let e=this.state.QRCode;if(!e)return null;let t=Math.max(32,Math.round((this.props.schema.size||256)*.15));return _.createElement(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,backgroundColor:this.props.schema.bgColor||`white`,padding:t,width:`100%`,height:`100%`,boxSizing:`border-box`}},_.createElement(e,{title:this.getText(this.props.schema.tooltip),value:this.props.schema.data,size:this.props.schema.size,fgColor:this.props.schema.fgColor,bgColor:this.props.schema.bgColor,level:this.props.schema.level}))}};g();var gk=class extends X{constructor(...e){super(...e),q(this,`initialized`,!1),q(this,`localContext`,void 0)}async componentDidMount(){await super.componentDidMount();let e=await i(()=>import(`./lib-Yj8cfN0A.js`),__vite__mapDeps([0]),import.meta.url);this.setState({QRCode:e.default}),this.props.schema.sendFirstByClick||await this.askInstance()}async askInstance(){if(this.props.alive){let e=this.props.schema.data;if(e===void 0&&this.props.schema.jsonData){let t=await this.getPatternAsync(this.props.schema.jsonData,null,!0);if(t)try{e=JSON.parse(t)}catch{console.error(`Cannot parse json data: ${JSON.stringify(e)}`)}}e??=null;let t=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(t!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){let e=await this.props.oContext.socket.getState(`system.adapter.${t}.alive`);if(!(e!=null&&e.val)){window.alert(K.t(`jc_Instance %s is not alive`,t));return}}this.setState({loading:!0},()=>this.props.oContext.socket.sendTo(t,this.props.schema.command||`send`,e).then(e=>this.setState({qrData:e||``,loading:!1})))}}getContext(){let e={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(t=>e[t]=X.getValue(this.props.data,t)),JSON.stringify(e)}renderItem(){if(this.props.alive){let e=this.getContext();(e!==this.localContext||!this.initialized)&&(this.localContext=e,(!this.props.schema.sendFirstByClick||this.state.qrData!==void 0)&&setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}if(!this.state.qrData&&this.props.schema.sendFirstByClick)return this.props.alive?_.createElement(`div`,{style:{width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:this.state.loading?`default`:`pointer`},onClick:()=>!this.state.loading&&this.askInstance()},this.state.loading?_.createElement(wn,null):typeof this.props.schema.sendFirstByClick==`boolean`?K.t(`jc_Click to show`):this.getText(this.props.schema.sendFirstByClick,this.props.schema.noTranslation)):_.createElement(`div`,{style:{width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:this.state.loading?`default`:`pointer`},onClick:()=>!this.state.loading&&this.askInstance()},K.t(`jc_Instance %s is not alive`,this.props.oContext.instance.toString()));let e=this.state.QRCode;if(!e||this.state.qrData===void 0)return null;let t=Math.max(32,Math.round((this.props.schema.size||256)*.15));return _.createElement(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,backgroundColor:this.props.schema.bgColor||`white`,padding:t,width:`100%`,height:`100%`,boxSizing:`border-box`}},_.createElement(e,{title:this.getText(this.props.schema.tooltip),value:this.state.qrData,size:this.props.schema.size,fgColor:this.props.schema.fgColor,bgColor:this.props.schema.bgColor,level:this.props.schema.level}))}};g();var _k={accordion:js,alive:Ns,autocomplete:Ps,autocompleteSendTo:Fs,certCollection:Vs,certificate:Rs,certificates:Bs,checkbox:nc,checkDocker:Hs,checkLicense:tc,chip:cc,chips:cc,color:lc,coordinates:dc,credential:$s,cron:Ls,custom:bc,datePicker:kx,deviceManager:Ax,divider:Jw,file:PS,fileSelector:DS,func:FS,header:Xw,iframe:IS,iframeSendTo:LS,image:BS,imageSendTo:zS,infoBox:VS,instance:US,interface:GS,ip:RS,jsonEditor:gw,language:vw,license:yw,number:xw,oauth2:Sw,objectId:ww,password:Dw,pattern:Ow,port:Aw,qrCode:hk,qrCodeSendTo:gk,room:jw,select:Nw,selectSendTo:Fw,sendto:zw,sendTo:zw,setState:Vw,slider:Uw,state:Kw,staticImage:Zw,staticInfo:tT,staticLink:iT,staticText:iT,table:dT,text:pT,textSendTo:hT,timePicker:gT,topic:vT,uuid:yT,user:xT,yamlEditor:mk},vk={fullWidth:{width:`100%`},paper:{margin:1,width:`auto !important`,overflowY:`auto`,paddingBottom:1},paperWithIcons:{height:`calc(100vh - 259px) !important`},paperWithoutIcons:{height:`calc(100vh - 235px) !important`},padding:{padding:`10px`},heading:{},primary:e=>({backgroundColor:e.palette.primary.main,color:e.palette.mode===`dark`?`inherit`:`#FFF`}),secondary:e=>({backgroundColor:e.palette.secondary.main})},yk=class e extends X{async componentDidMount(){var e;await super.componentDidMount(),(e=this.props.schema)!=null&&e.collapsable&&this.setState({expanded:(window._localStorage||window.localStorage).getItem(`${this.props.oContext.adapterName}.${this.props.attr}`)===`true`})}renderItems(t,n){return t?Object.keys(t).map(r=>{if(this.props.oContext.multiEdit&&t[r].noMultiEdit)return null;let i=t[r].type||`panel`,a,o=`Use this.props.oContext.socket!`;if(i===`custom`)t[r].url?a=bc:this.props.oContext.customs&&this.props.oContext.customs[t[r].component]?a=this.props.oContext.customs[t[r].component]:(console.error(`Cannot find custom component: ${t[r].component}`),a=X),o=this.props.oContext.socket;else if(i===`component`){var s;let e=t[r].subType;if(e&&(s=this.props.customComponents)!=null&&s[e])a=this.props.customComponents[e];else return _.createElement(`div`,{key:`${r}_${this.props.index??``}`},`Component ${e} not provided`)}else a=i===`panel`?e:_k[i]||X;return _.createElement(a,{socket:o,globalData:this.props.globalData,oContext:this.props.oContext,key:`${r}_${this.props.index??``}`,index:this.props.index,changed:this.props.changed,arrayIndex:this.props.arrayIndex,expertMode:this.props.expertMode,commandRunning:this.props.commandRunning,style:vk.panel,common:this.props.common,alive:this.props.alive,themeName:this.props.themeName,data:this.props.data,originalData:this.props.originalData,onError:this.props.onError,onHiddenChanged:this.props.onHiddenChanged,onFilterLabelUpdate:this.props.onFilterLabelUpdate,onChange:this.props.onChange,disabled:n,customObj:this.props.customObj,custom:this.props.custom,schema:t[r],attr:r,table:this.props.table,customComponents:this.props.customComponents})}):null}render(){let e=this.props.schema;if(!e||(this.updateCalculatedValues(),!this.state.calculatedValues))return null;let t=this.props.schema.items,n=this.props.schema.style||{};if(this.state.calculatedValues.hidden){if(e.hideOnlyControl){let t=_.createElement(Ct,{size:{xs:e.xs||void 0,sm:e.sm||void 0,md:e.md||void 0,lg:e.lg||void 0,xl:e.xl||void 0},sx:$t.getStyle(this.props.oContext.theme,{marginBottom:0,textAlign:`left`},n,this.props.oContext.themeType===`dark`?e.darkStyle:void 0)});return e.newLine?_.createElement(_.Fragment,null,_.createElement(`div`,{style:{flexBasis:`100%`,height:0}}),t):t}return null}if(this.props.table)return this.renderItems(t,this.state.calculatedValues.disabled);if(this.props.custom)return _.createElement(Ct,{key:`${this.props.attr}_${this.props.index}`,container:!0,style:vk.fullWidth,columnSpacing:2,rowSpacing:1,sx:n},this.renderItems(t,this.state.calculatedValues.disabled));let r;if(e.collapsable)r=_.createElement(Pe,{key:`${this.props.attr}_${this.props.index}`,style:vk.fullWidth,expanded:!!this.state.expanded,onChange:()=>{(window._localStorage||window.localStorage).setItem(`${this.props.oContext.adapterName}.${this.props.attr}`,this.state.expanded?`false`:`true`),this.setState({expanded:!this.state.expanded})}},_.createElement(Zn,{expandIcon:_.createElement(ot,null),sx:$t.getStyle(this.props.oContext.theme,n,this.props.oContext.themeType&&e.darkStyle,e.color===`primary`?vk.primary:e.color===`secondary`&&vk.secondary,{width:`100%`})},_.createElement(be,{style:vk.heading},this.getText(e.label))),_.createElement(zn,null,_.createElement(Ct,{container:!0,columnSpacing:2,rowSpacing:1,sx:{...n,width:`100%`,padding:`10px`}},this.renderItems(t,this.state.calculatedValues.disabled))));else{let e=$t.getStyle(this.props.oContext.theme,this.props.style,n,{width:`100%`},this.props.isParentTab&&vk.paper,this.props.isParentTab&&(this.props.withoutSaveButtons?this.props.withIcons?{height:`calc(100% - 88px) !important`}:{height:`calc(100% - 64px) !important`}:this.props.withIcons?vk.paperWithIcons:vk.paperWithoutIcons));r=_.createElement(ht,{component:`div`,key:`${this.props.attr}_${this.props.index}`,className:this.props.className,sx:e},_.createElement(Ct,{container:!0,columnSpacing:2,rowSpacing:1,sx:$t.getStyle(this.props.oContext.theme,{width:`100%`},this.props.isParentTab&&vk.padding,this.props.schema.innerStyle)},this.renderItems(t,this.state.calculatedValues.disabled)))}if(!this.props.isParentTab){let t=_.createElement(Ct,{title:this.getText(e.tooltip),size:{xs:e.xs||void 0,sm:e.sm||void 0,md:e.md||void 0,lg:e.lg||void 0,xl:e.xl||void 0},sx:{marginBottom:0,textAlign:`left`,...n}},r);return e.newLine?_.createElement(_.Fragment,null,_.createElement(`div`,{style:{flexBasis:`100%`,height:0}}),t):t}return r}};g();var bk={tabs:{height:`100%`,width:`100%`},panel:{width:`100%`,display:`block`},panelWithIcons:{height:`calc(100% - 72px)`},panelWithoutIcons:{height:`calc(100% - 48px)`}},xk=class e extends X{constructor(t){super(t),q(this,`resizeObserver`,null),q(this,`resizeRaf`,null),q(this,`calculateTimeoutTable`,null),q(this,`pinTimeout`,null),q(this,`refDiv`,void 0),q(this,`onTabError`,(e,t)=>{let n=this.state.tab;if(!n&&e){this.props.onError(e,t);return}let r={...this.state.tabErrors};n&&(r[n]||={}),n&&e&&(t?r[n][e]=t:(delete r[n][e],Object.keys(r[n]).length===0&&delete r[n])),this.setState({tabErrors:r}),this.props.onError(e,t)}),q(this,`hasTabErrors`,e=>!!this.state.tabErrors[e]&&Object.keys(this.state.tabErrors[e]).length>0),q(this,`measureWidth`,()=>{var t;let n=(t=this.refDiv.current)==null?void 0:t.clientWidth;if(!n)return;let r=this.state.useMenu;!r&&n<e.MENU_WIDTH?r=!0:r&&n>e.MENU_WIDTH+e.MENU_HYSTERESIS&&(r=!1),r!==this.state.useMenu&&this.setState({useMenu:r})}),q(this,`onHashTabsChanged`,()=>{let e=(window.location.hash||``).replace(/^#/,``).split(`/`);if(e.length>3&&e[1]===`config`){let t=e[3],n=parseInt(t,10),r;n.toString()===t?n>=0&&n<Object.keys(this.props.schema.items).length&&(r=Object.keys(this.props.schema.items)[n]):Object.keys(this.props.schema.items).includes(t)&&(r=t),r!==void 0&&r!==this.state.tab&&((window._localStorage||window.localStorage).setItem(`${this.props.dialogName||`App`}.${this.props.oContext.adapterName}`,r),this.pinWidthForTransition(),this.setState({tab:r}))}});let n;if(this.props.root){let e=(window.location.hash||``).replace(/^#/,``).split(`/`);if(e.length>=3&&e[1]===`config`){let t=e[3],r=parseInt(t,10);t&&r.toString()===t?r>=0&&r<Object.keys(this.props.schema.items).length&&(n=Object.keys(this.props.schema.items)[r]):t&&Object.keys(this.props.schema.items).includes(t)&&(n=t),window.addEventListener(`hashchange`,this.onHashTabsChanged,!1)}}n===void 0&&(n=(window._localStorage||window.localStorage).getItem(`${this.props.dialogName||`App`}.${this.props.oContext.adapterName}`)||Object.keys(this.props.schema.items)[0],Object.keys(this.props.schema.items).includes(n)||(n=Object.keys(this.props.schema.items)[0])),this.refDiv=_.createRef(),Object.assign(this.state,{tab:n,useMenu:!1,openMenu:null,tabErrors:{}})}async componentDidMount(){await super.componentDidMount(),this.measureWidth(),this.refDiv.current&&typeof ResizeObserver<`u`&&(this.resizeObserver=new ResizeObserver(()=>{this.resizeRaf===null&&(this.resizeRaf=window.requestAnimationFrame(()=>{this.resizeRaf=null,this.measureWidth()}))}),this.resizeObserver.observe(this.refDiv.current))}componentWillUnmount(){this.resizeRaf!==null&&(window.cancelAnimationFrame(this.resizeRaf),this.resizeRaf=null),this.resizeObserver&&=(this.resizeObserver.disconnect(),null),this.calculateTimeoutTable&&=(clearTimeout(this.calculateTimeoutTable),null),this.pinTimeout&&=(clearTimeout(this.pinTimeout),null),window.removeEventListener(`hashchange`,this.onHashTabsChanged,!1),super.componentWillUnmount()}pinWidthForTransition(){var e;let t=(e=this.refDiv.current)==null?void 0:e.clientWidth;t&&(this.pinTimeout&&clearTimeout(this.pinTimeout),this.state.contentMinWidth!==t&&this.setState({contentMinWidth:t}),this.pinTimeout=setTimeout(()=>{this.pinTimeout=null,this.setState({contentMinWidth:void 0})},500))}onMenuChange(e){(window._localStorage||window.localStorage).setItem(`${this.props.dialogName||`App`}.${this.props.oContext.adapterName}`,e),this.pinWidthForTransition(),this.setState({tab:e},()=>{if(this.props.root){let e=(window.location.hash||``).split(`/`);e.length>=3&&e[1]===`config`&&(e[3]=this.state.tab||``,window.location.hash=e.join(`/`))}})}updateCalculatedValuesForTable(){this.calculateTimeoutTable&&clearTimeout(this.calculateTimeoutTable),this.calculateTimeoutTable=setTimeout(async()=>{this.calculateTimeoutTable=null;let e=this.props.schema.items,t={};for(let n in e){let r;if(e[n].expertMode&&!this.props.expertMode){t[n]={hidden:!0,disabled:!1};continue}if(this.props.custom){let i=!!await this.executeCustom(e[n].hidden,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.index,this.props.globalData);if(i){t[n]={hidden:!0,disabled:!1};continue}r=!!await this.executeCustom(e[n].disabled,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.index,this.props.globalData),t[n]={hidden:i,disabled:r}}else{if(await this.execute(e[n].hidden,!1,this.props.data,this.props.index,this.props.globalData)){t[n]={hidden:!0,disabled:!1};continue}r=!!await this.execute(e[n].disabled,!1,this.props.data,this.props.index,this.props.globalData),t[n]={hidden:!1,disabled:r}}}JSON.stringify(t)!==JSON.stringify(this.state.calculatedValuesTable)&&this.setState({calculatedValuesTable:t})},50)}render(){let e=this.props.schema.items,t=!1;if(this.updateCalculatedValuesForTable(),!this.state.calculatedValuesTable)return null;let n=[];Object.keys(e).filter(e=>{var t;return!((t=this.state.calculatedValuesTable)!=null&&(t=t[e])!=null&&t.hidden)}).map(r=>{var i;let a=this.getIcon(e[r].icon);t||=!!a,n.push({icon:a,disabled:!!((i=this.state.calculatedValuesTable)!=null&&(i=i[r])!=null&&i.disabled),label:this.getText(e[r].label),name:r})}),n.find(e=>e.name===this.state.tab)||setTimeout(()=>this.setState({tab:n[0].name}),50);let r;return r=this.state.useMenu&&n.length>2?_.createElement(Ce,{style:{top:2,backgroundColor:this.props.oContext.themeType===`dark`?`#222`:`#DDD`},variant:`dense`},_.createElement(ur,{onClick:e=>this.setState({openMenu:e.currentTarget})},_.createElement(Lt,null)),this.state.openMenu?_.createElement(ne,{open:!0,anchorEl:this.state.openMenu,onClose:()=>this.setState({openMenu:null})},n.map(e=>{let n=this.hasTabErrors(e.name);return _.createElement(Ie,{disabled:e.disabled,key:e.name,onClick:()=>{this.setState({openMenu:null},()=>this.onMenuChange(e.name))},selected:e.name===this.state.tab,sx:n?{color:`error.main`}:void 0},t?_.createElement(rr,null,e.icon):null,_.createElement(ht,{sx:{display:`flex`,alignItems:`center`,gap:.5,width:`100%`}},e.label,n&&_.createElement(N,{sx:{fontSize:16,color:`error.main`}})))})):null):_.createElement(at,{variant:`scrollable`,scrollButtons:`auto`,style:this.props.schema.tabsStyle,value:this.state.tab,onChange:(e,t)=>this.onMenuChange(t)},n.map(e=>{let t=this.hasTabErrors(e.name),n=t?_.createElement(ht,{sx:{display:`flex`,alignItems:`center`,gap:.5}},e.label,_.createElement(N,{sx:{fontSize:16,color:`error.main`}})):e.label;return _.createElement(H,{id:e.name,wrapped:!0,disabled:e.disabled,key:e.name,value:e.name,iconPosition:this.props.schema.iconPosition||`start`,icon:e.icon||void 0,label:n,sx:t?{"& .MuiTab-wrapper":{color:`error.main`}}:void 0})})),this.state.tab?_.createElement(`div`,{style:this.state.contentMinWidth===void 0?bk.tabs:{...bk.tabs,minWidth:this.state.contentMinWidth},ref:this.refDiv},r,_.createElement(yk,{oContext:this.props.oContext,withoutSaveButtons:this.props.withoutSaveButtons,isParentTab:!0,changed:this.props.changed,key:this.state.tab,expertMode:this.props.expertMode,index:1001,arrayIndex:this.props.arrayIndex,globalData:this.props.globalData,commandRunning:this.props.commandRunning,style:{...bk.panel,...t?bk.panelWithIcons:bk.panelWithoutIcons},common:this.props.common,alive:this.props.alive,themeName:this.props.themeName,data:this.props.data,originalData:this.props.originalData,onChange:this.props.onChange,onError:this.onTabError,customObj:this.props.customObj,custom:this.props.custom,schema:e[this.state.tab],table:this.props.table,withIcons:t,customComponents:this.props.customComponents})):null}};q(xk,`MENU_WIDTH`,600),q(xk,`MENU_HYSTERESIS`,40),g(),K.extendTranslations({en:{"jc_A credential with this name already exists":`A credential with this name already exists`,"jc_A unique name is required":`A unique name is required`,"jc_Accept license":`Accept license`,jc_Actions:`Actions`,"jc_Add credential":`Add credential`,"jc_Add row":`Add row`,"jc_All items are filtered out":`All items are filtered out`,jc_Append:`Append`,"jc_Append %s entries or replace existing?":`Append %s entries or replace existing?`,"jc_Append or replace?":`Append or replace?`,"jc_Are you sure?":`Are you sure?`,jc_Cancel:`Cancel`,"jc_Cannot add items with set filter":`Cannot add items with set filter`,"jc_Cannot create credential: %s":`Cannot create credential: %s`,"jc_Cannot decode license":`Cannot decode license`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`Cannot determine position: System settings are empty and GPS detection is disabled in browser`,'jc_Cannot display the custom component "%s"':`Cannot display the custom component "%s"`,"jc_Cannot read licenses: %s":`Cannot read licenses: %s`,"jc_Cannot retrieve options, as instance is offline":`Cannot retrieve options, as instance is offline`,"jc_Cannot save configuration because of error in configuration":`Cannot save configuration because of error in configuration`,"jc_Cannot upload":`Cannot upload`,"jc_Chained certificate":`Chained certificate`,jc_Checked:`Checked`,"jc_Click to see in full size":`Click to see in full size`,"jc_Click to show":`Click to show`,"jc_Clone current row":`Clone current row`,jc_Close:`Close`,jc_Commercial:`Commercial`,jc_Copied:`Copied`,"jc_Copied %s":`Copied "%s"`,"jc_Copy content":`Copy content`,jc_Create:`Create`,"jc_Credential type":`Credential type`,'jc_Custom component "%s" was not started':`Custom component "%s" was not started`,"jc_Define schedule":`Define schedule`,jc_Delete:`Delete`,"jc_Delete current row":`Delete current row`,"jc_Disable/Enable translation":`Disable/Enable translation`,jc_Discard:`Discard`,"jc_Do not use let's encrypt":`Do not use let's encrypt`,"jc_Docker is not available":`Docker is not available`,"jc_Docker is not installed or not running":`Docker is not installed or not running`,"jc_Drop file here":`Drop file here`,"jc_Enter the code from that page here":`Enter the code from that page here`,jc_Error:`Error`,"jc_Expand/Collapse card":`Expand/Collapse card`,"jc_Export configuration section":`Export configuration section`,"jc_Export data to %s file":`Export data to %s file`,"jc_Export setting to JSON file":`Export setting to JSON file`,"jc_Fallback custom certificates":`Fallback custom certificates`,"jc_File is too big. Max %sk allowed. Try use SVG.":`File is too big. Max %sk allowed. Try use SVG.`,"jc_File will be deleted":`File will be deleted`,"jc_Filter and Data Actions":`Filter and Data Actions`,"jc_Get %s access":`Get %s access`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`If the button above does not work, you can authorize manually this app by visiting this url`,"jc_Import and add configuration section":`Import and add configuration section`,"jc_Import and replace configuration section":`Import and replace configuration section`,"jc_Import data from %s file":`Import data from %s file`,"jc_Import from %s":`Import from %s`,"jc_Import settings from JSON file":`Import settings from JSON file`,"jc_Instance %s is alive":`Instance %s is alive`,"jc_Instance %s is not alive":`Instance %s is not alive`,"jc_Invalid JSON":`Invalid JSON`,"jc_Invalid JSON file.":`Invalid JSON file.`,"jc_Invalid JSON format. Expected an array.":`Invalid JSON format. Expected an array.`,"jc_Invalid YAML":`Invalid YAML`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.`,"jc_It was probably built for an older admin version. Please update the adapter.":`It was probably built for an older admin version. Please update the adapter.`,"jc_JSON editor":`JSON editor`,jc_Latitude:`Latitude`,"jc_License %s":`License %s`,"jc_License agreement":`License agreement`,"jc_License does not exist":`License does not exist`,"jc_License expired on %s":`License expired on %s`,'jc_License for other product "%s"':`License for other product "%s"`,"jc_License is for version %s, but required version is %s":`License is for version %s, but required version is %s`,"jc_License must be converted":`License must be converted to newer version. You can do it in your iobroker.net profile.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`License not found in the license manager. Do you want to update licenses from iobroker.net?`,"jc_Listen on all IPs":`Listen on all IPs`,jc_Longitude:`Longitude`,"jc_Move down":`Move down`,"jc_Move up":`Move up`,jc_Name:`Name`,"jc_No one license found in license manager":`No one license found in license manager`,"jc_No response from admin":`No response from admin`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Non-allowed duplicate entry "%s" in column "%s"`,"jc_OAuth Client ID":`OAuth Client ID`,"jc_OAuth Client secret":`OAuth Client secret`,jc_Ok:`Ok`,"jc_Passwords are not equal!":`Passwords are not equal!`,"jc_Place your files here or click here to open the browse dialog":`Place your files here or click here to open the browse dialog`,"jc_Please allow popups in your browser for this page!":`Please allow popups in your browser for this page!`,"jc_Please confirm":`Please confirm`,"jc_Please create license":`Please create license`,"jc_Please enter the license":`Please enter the license`,"jc_Please fill in all required fields":`Please fill in all required fields`,"jc_Port could be used by %s":`Port could be used by %s`,"jc_Port is already used by %s":`Port is already used by %s`,"jc_Press ENTER Key to add new item":`Press ENTER Key to add new item`,"jc_Private certificate":`Private certificate`,jc_Product:`Product`,"jc_Public certificate":`Public certificate`,"jc_Renew %s access":`Renew %s access`,jc_Replace:`Replace`,"jc_Request data by instance":`Request data by instance`,"jc_Request timed out":`Request timed out`,jc_Result:`Result`,jc_Save:`Save`,"jc_Save configuration?":`Save configuration?`,"jc_Serial number (UUID)":`Serial number (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`Serial number (UUID) "%s" in license is for other device.`,"jc_Show/hide filter input":`Show/hide filter input`,"jc_Some data are not stored. Discard?":`Some data are not stored. Discard?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Successfully authorized. Token valid till %s and will be automatically renewed.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Successfully authorized. Token valid till %s but it can expire as the instance is not running.`,"jc_Suitable license not found in license manager":`Suitable license not found in license manager`,"jc_System language":`System language`,"jc_Take browser position":`Take position from browser`,"jc_Take position from system settings":`Take position from system settings`,jc_Template:`Template`,"jc_Use all available let's encrypt certificates":`Use all available let's encrypt certificates`,"jc_Use system settings for position":`Use system settings for position`,"jc_Used system settings":`Used system settings`,jc_ValidTill:`Valid till`,jc_Version:`Version`,"jc_YAML editor":`YAML editor`,jc_Yes:`Yes`,"jc_You can filter entries by entering here some text":`You can filter entries by entering here some text`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Failed to open JSON File`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Failed to parse JSON file`,jc___different__:`different`,jc_false:`FALSE`,jc_locally:`locally`,jc_none:`none`,jc_repeat:`repeat`,jc_true:`TRUE`,"jc_via internet":`via internet`,sch_all:`all`},de:{"jc_A credential with this name already exists":`Es existiert bereits eine Berechtigung mit diesem Namen.`,"jc_A unique name is required":`Ein eindeutiger Name ist erforderlich.`,"jc_Accept license":`Lizenz akzeptieren`,jc_Actions:`Aktionen`,"jc_Add credential":`Anmeldeinformationen hinzufügen`,"jc_Add row":`Zeile hinzufügen`,"jc_All items are filtered out":`Alle Elemente sind herausgefiltert`,jc_Append:`Anhängen`,"jc_Append %s entries or replace existing?":`%s Einträge anhängen oder vorhandene ersetzen?`,"jc_Append or replace?":`Anhängen oder ersetzen?`,"jc_Are you sure?":`Bist du sicher?`,jc_Cancel:`Abbrechen`,"jc_Cannot add items with set filter":`Elemente mit festgelegtem Filter können nicht hinzugefügt werden`,"jc_Cannot create credential: %s":`Anmeldeinformationen konnten nicht erstellt werden: %s`,"jc_Cannot decode license":`Lizenz kann nicht entschlüsselt werden`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`Position kann nicht bestimmt werden: Die Systemeinstellungen sind leer und die GPS-Erkennung ist im Browser deaktiviert`,'jc_Cannot display the custom component "%s"':`Die benutzerdefinierte Komponente "%s" kann nicht angezeigt werden`,"jc_Cannot read licenses: %s":`Lizenzen können nicht gelesen werden: %s`,"jc_Cannot retrieve options, as instance is offline":`Optionen können nicht abgerufen werden, da die Instanz offline ist`,"jc_Cannot save configuration because of error in configuration":`Die Konfiguration konnte aufgrund eines Fehlers nicht gespeichert werden.`,"jc_Cannot upload":`Kann nicht hochladen`,"jc_Chained certificate":`Chained Zertifikat`,jc_Checked:`Geprüft`,"jc_Click to see in full size":`Klicken Sie hier, um die Vollbildansicht zu öffnen.`,"jc_Click to show":`Zum Anzeigen klicken`,"jc_Clone current row":`Aktuelle Zeile klonen`,jc_Close:`Schließen`,jc_Commercial:`Kommerziell`,jc_Copied:`Kopiert`,"jc_Copied %s":`"%s" kopiert`,"jc_Copy content":`Inhalte kopieren`,jc_Create:`Erstellen`,"jc_Credential type":`Anmeldeinformationstyp`,'jc_Custom component "%s" was not started':`Die benutzerdefinierte Komponente "%s" wurde nicht gestartet`,"jc_Define schedule":`Zeitplan definieren`,jc_Delete:`Löschen`,"jc_Delete current row":`Aktuelle Zeile löschen`,"jc_Disable/Enable translation":`Übersetzung deaktivieren/aktivieren`,jc_Discard:`Verwerfen`,"jc_Do not use let's encrypt":`Let's encrypt nicht verwenden`,"jc_Docker is not available":`Docker ist nicht verfügbar`,"jc_Docker is not installed or not running":`Docker ist nicht installiert oder läuft nicht`,"jc_Drop file here":`Datei hier ablegen`,"jc_Enter the code from that page here":`Geben Sie den Code von dieser Seite hier ein`,jc_Error:`Fehler`,"jc_Expand/Collapse card":`Karte ein-/ausklappen`,"jc_Export configuration section":`Konfigurationsabschnitt exportieren`,"jc_Export data to %s file":`Daten in %s-Datei exportieren`,"jc_Export setting to JSON file":`Einstellungen in eine JSON-Datei exportieren`,"jc_Fallback custom certificates":`Benutzerdefinierte Fallback-Zertifikate`,"jc_File is too big. Max %sk allowed. Try use SVG.":`Datei ist zu groß. Max %sk erlaubt. Versuchen Sie, SVG zu verwenden.`,"jc_File will be deleted":`Die Datei wird gelöscht`,"jc_Filter and Data Actions":`Filter- und Datenaktionen`,"jc_Get %s access":`%s Zugriff erhalten`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`Wenn die Schaltfläche oben nicht funktioniert, können Sie diese App manuell autorisieren, indem Sie diese URL besuchen`,"jc_Import and add configuration section":`Konfigurationsabschnitt importieren und hinzufügen`,"jc_Import and replace configuration section":`Konfigurationsabschnitt importieren und ersetzen`,"jc_Import data from %s file":`Daten aus %s-Datei importieren`,"jc_Import from %s":`Von %s importieren`,"jc_Import settings from JSON file":`Einstellungen aus einer JSON-Datei importieren`,"jc_Instance %s is alive":`Instanz %s ist aktiv`,"jc_Instance %s is not alive":`Instanz %s ist nicht aktiv`,"jc_Invalid JSON":`Ungültiges JSON`,"jc_Invalid JSON file.":`Ungültige JSON-Datei.`,"jc_Invalid JSON format. Expected an array.":`Ungültiges JSON-Format. Array erwartet.`,"jc_Invalid YAML":`Ungültiges YAML`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`Sie benötigt GUI-API-Generation %s, dieser Admin stellt aber Generation %s bereit. Bitte den Admin aktualisieren.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`Sie wurde für GUI-API-Generation %s erstellt, dieser Admin stellt aber Generation %s bereit. Bitte den Adapter aktualisieren.`,"jc_It was probably built for an older admin version. Please update the adapter.":`Sie wurde vermutlich für eine ältere Admin-Version erstellt. Bitte den Adapter aktualisieren.`,"jc_JSON editor":`JSON-Editor`,jc_Latitude:`Breite`,"jc_License %s":`Lizenz %s`,"jc_License agreement":`Lizenzvereinbarung`,"jc_License does not exist":`Lizenz existiert nicht`,"jc_License expired on %s":`Lizenz am %s abgelaufen`,'jc_License for other product "%s"':`Lizenz für anderes Produkt „%s“`,"jc_License is for version %s, but required version is %s":`Die Lizenz gilt für Version %s, benötigt wird jedoch Version %s.`,"jc_License must be converted":`Die Lizenz muss auf eine neuere Version konvertiert werden. Sie können dies in Ihrem iobroker.net-Profil tun.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`Lizenz im Lizenzmanager nicht gefunden. Möchten Sie Lizenzen von iobroker.net aktualisieren?`,"jc_Listen on all IPs":`Zugriff von allen IPs zulassen`,jc_Longitude:`Längengrad`,"jc_Move down":`Nach unten`,"jc_Move up":`Nach oben`,jc_Name:`Name`,"jc_No one license found in license manager":`Im Lizenzmanager wurde keine Lizenz gefunden`,"jc_No response from admin":`Keine Antwort vom Administrator`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Nicht zulässiger doppelter Eintrag "%s" in Spalte "%s"`,"jc_OAuth Client ID":`OAuth-Client-ID`,"jc_OAuth Client secret":`OAuth-Client-Secret`,jc_Ok:`OK`,"jc_Passwords are not equal!":`Passwörter sind nicht gleich!`,"jc_Place your files here or click here to open the browse dialog":`Die Dateien hier platzieren oder hier klicken, um den Suchdialog zu öffnen`,"jc_Please allow popups in your browser for this page!":`Bitte lassen Sie Popups für diese Seite in Ihrem Browser zu!`,"jc_Please confirm":`Bitte bestätigen`,"jc_Please create license":`Bitte erstellen Sie eine Lizenz`,"jc_Please enter the license":`Bitte die Lizenz eingeben`,"jc_Please fill in all required fields":`Bitte füllen Sie alle Pflichtfelder aus.`,"jc_Port could be used by %s":`Port könnte von %s verwendet werden`,"jc_Port is already used by %s":`Port wird bereits von %s verwendet`,"jc_Press ENTER Key to add new item":`Die Eingabetaste drücken, um ein neues Element hinzuzufügen`,"jc_Private certificate":`Privates Zertifikat`,jc_Product:`Produkt`,"jc_Public certificate":`Öffentliches Zertifikat`,"jc_Renew %s access":`%s Zugriff erneuern`,jc_Replace:`Ersetzen`,"jc_Request data by instance":`Daten pro Instanz anfordern`,"jc_Request timed out":`Zeitüberschreitung der Anforderung`,jc_Result:`Ergebnis`,jc_Save:`Speichern`,"jc_Save configuration?":`Konfiguration speichern?`,"jc_Serial number (UUID)":`Seriennummer (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`Seriennummer (UUID) „%s“ in der Lizenz gilt für ein anderes Gerät.`,"jc_Show/hide filter input":`Filtereingabe ein-/ausblenden`,"jc_Some data are not stored. Discard?":`Einige Daten werden nicht gespeichert. Verwerfen?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Erfolgreich autorisiert. Token gültig bis %s und wird automatisch erneuert.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Erfolgreich autorisiert. Token gültig bis %s, kann aber ablaufen, da die Instanz nicht ausgeführt wird.`,"jc_Suitable license not found in license manager":`Passende Lizenz im Lizenzmanager nicht gefunden`,"jc_System language":`Systemsprache`,"jc_Take browser position":`Position vom Browser einnehmen`,"jc_Take position from system settings":`Position aus den Systemeinstellungen übernehmen`,jc_Template:`Vorlage`,"jc_Use all available let's encrypt certificates":`Alle verfügbaren Zertifikate von Let's encrypt benutzen`,"jc_Use system settings for position":`Systemeinstellungen für die Position verwenden`,"jc_Used system settings":`Systemeinstellungen`,jc_ValidTill:`Gültig bis`,jc_Version:`Ausführung`,"jc_YAML editor":`YAML-Editor`,jc_Yes:`Ja`,"jc_You can filter entries by entering here some text":`Sie können Einträge filtern, indem Sie hier Text eingeben`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Fehler beim Öffnen der JSON-Datei`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Fehler beim Parsen der JSON-Datei`,jc___different__:`unterschiedlich`,jc_false:`FALSCH`,jc_locally:`örtlich`,jc_none:`kein`,jc_repeat:`wiederholen`,jc_true:`WAHR`,"jc_via internet":`übers Internet`,sch_all:`alle`},ru:{"jc_A credential with this name already exists":`Учетные данные с таким именем уже существуют.`,"jc_A unique name is required":`Требуется уникальное имя.`,"jc_Accept license":`Принять лицензию`,jc_Actions:`Действия`,"jc_Add credential":`Добавить учетные данные`,"jc_Add row":`Добавить ряд`,"jc_All items are filtered out":`Все элементы отфильтрованы`,jc_Append:`Добавить`,"jc_Append %s entries or replace existing?":`Добавить записи %s или заменить существующие?`,"jc_Append or replace?":`Дополнить или заменить?`,"jc_Are you sure?":`Вы уверены?`,jc_Cancel:`Отмена`,"jc_Cannot add items with set filter":`Невозможно добавить элементы с установленным фильтром`,"jc_Cannot create credential: %s":`Не удалось создать учетные данные: %s`,"jc_Cannot decode license":`Не могу декодировать лицензию`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`Невозможно определить местоположение: системные настройки пусты, а обнаружение GPS отключено в браузере.`,'jc_Cannot display the custom component "%s"':`Не удается отобразить пользовательский компонент "%s"`,"jc_Cannot read licenses: %s":`Невозможно прочитать лицензии: %s`,"jc_Cannot retrieve options, as instance is offline":`Невозможно получить параметры, так как экземпляр находится в автономном режиме.`,"jc_Cannot save configuration because of error in configuration":`Невозможно сохранить конфигурацию из-за ошибки в конфигурации.`,"jc_Cannot upload":`Невозможно загрузить`,"jc_Chained certificate":`Chained сертификат`,jc_Checked:`Проверено`,"jc_Click to see in full size":`Нажмите, чтобы посмотреть в полном размере`,"jc_Click to show":`Нажмите, чтобы показать`,"jc_Clone current row":`Клонировать текущую строку`,jc_Close:`Закрыть`,jc_Commercial:`Коммерческая`,jc_Copied:`скопировано`,"jc_Copied %s":`Скопировано "%s"`,"jc_Copy content":`Копировать содержимое`,jc_Create:`Создать`,"jc_Credential type":`Тип учетных данных`,'jc_Custom component "%s" was not started':`Пользовательский компонент "%s" не был запущен.`,"jc_Define schedule":`Задать расписание`,jc_Delete:`Удалить`,"jc_Delete current row":`Удалить текущую строку`,"jc_Disable/Enable translation":`Включить/отключить перевод`,jc_Discard:`Отказаться`,"jc_Do not use let's encrypt":`Не использовать Let’s Encrypt`,"jc_Docker is not available":`Докер недоступен`,"jc_Docker is not installed or not running":`Docker не установлен или не запущен`,"jc_Drop file here":`Перетащите файл сюда`,"jc_Enter the code from that page here":`Введите код с этой страницы здесь`,jc_Error:`Ошибка`,"jc_Expand/Collapse card":`Развернуть/Свернуть карточку`,"jc_Export configuration section":`Раздел конфигурации экспорта`,"jc_Export data to %s file":`Экспорт данных в файл %s`,"jc_Export setting to JSON file":`Экспорт настроек в JSON-файл`,"jc_Fallback custom certificates":`Резервные пользовательские сертификаты`,"jc_File is too big. Max %sk allowed. Try use SVG.":`Файл слишком большой. Разрешено максимальное количество %sk. Попробуйте использовать SVG.`,"jc_File will be deleted":`Файл будет удалён`,"jc_Filter and Data Actions":`Фильтрация и действия с данными`,"jc_Get %s access":`Получить %s доступ`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`Если кнопка выше не работает, вы можете вручную авторизовать это приложение, перейдя по этой ссылке.`,"jc_Import and add configuration section":`Импорт и добавление раздела конфигурации`,"jc_Import and replace configuration section":`Импорт и замена раздела конфигурации`,"jc_Import data from %s file":`Импорт данных из файла %s`,"jc_Import from %s":`Импорт из %s`,"jc_Import settings from JSON file":`Импорт настроек из JSON-файла`,"jc_Instance %s is alive":`Экземпляр %s работает`,"jc_Instance %s is not alive":`Экземпляр %s не работает`,"jc_Invalid JSON":`Неверный JSON`,"jc_Invalid JSON file.":`Неверный файл JSON.`,"jc_Invalid JSON format. Expected an array.":`Недопустимый формат JSON. Ожидается массив.`,"jc_Invalid YAML":`Недопустимый YAML-файл`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`Для этого требуется генерация API графического интерфейса пользователя %s, но администратор предоставляет генерацию %s. Пожалуйста, обновите администратора.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`Он был создан для генерации API графического интерфейса пользователя %s, но этот администратор предоставляет генерацию %s. Пожалуйста, обновите адаптер.`,"jc_It was probably built for an older admin version. Please update the adapter.":`Вероятно, он был создан для более старой версии административной панели. Пожалуйста, обновите адаптер.`,"jc_JSON editor":`Редактор JSON`,jc_Latitude:`Широта`,"jc_License %s":`Лицензия %s`,"jc_License agreement":`Лицензионное соглашение`,"jc_License does not exist":`Лицензия не существует`,"jc_License expired on %s":`Срок действия лицензии истек %s`,'jc_License for other product "%s"':`Лицензия на другой продукт "%s"`,"jc_License is for version %s, but required version is %s":`Лицензия распространяется на версию %s, но требуемая версия — %s.`,"jc_License must be converted":`Лицензия должна быть преобразована в более новую версию. Вы можете сделать это в своем профиле на iobroker.net.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`Лицензия не найдена в диспетчере лицензий. Вы хотите обновить лицензии от iobroker.net?`,"jc_Listen on all IPs":`Слушать на всех IP`,jc_Longitude:`Долгота`,"jc_Move down":`Вниз`,"jc_Move up":`Вверх`,jc_Name:`Имя`,"jc_No one license found in license manager":`В менеджере лицензий не найдена ни одна лицензия`,"jc_No response from admin":`Нет ответа от администратора`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Недопустимая повторяющаяся запись "%s" в столбце "%s"`,"jc_OAuth Client ID":`Идентификатор клиента OAuth`,"jc_OAuth Client secret":`Секрет клиента OAuth`,jc_Ok:`Ok`,"jc_Passwords are not equal!":`Пароли не равны!`,"jc_Place your files here or click here to open the browse dialog":`Поместите свои файлы сюда или щелкните здесь, чтобы открыть диалоговое окно выбора`,"jc_Please allow popups in your browser for this page!":`Пожалуйста, разрешите всплывающие окна в вашем браузере для этой страницы!`,"jc_Please confirm":`Пожалуйста подтвердите`,"jc_Please create license":`Пожалуйста, создайте лицензию`,"jc_Please enter the license":`Пожалуйста, введите лицензию`,"jc_Please fill in all required fields":`Пожалуйста, заполните все обязательные поля.`,"jc_Port could be used by %s":`Порт может использоваться %s`,"jc_Port is already used by %s":`Порт уже используется %s`,"jc_Press ENTER Key to add new item":`Нажмите клавишу ENTER, чтобы добавить новый элемент.`,"jc_Private certificate":`Частный сертификат`,jc_Product:`Продукт`,"jc_Public certificate":`Публичный сертификат`,"jc_Renew %s access":`Продлить доступ %s`,jc_Replace:`Заменять`,"jc_Request data by instance":`Запрос данных по экземпляру`,"jc_Request timed out":`Истекло время запроса`,jc_Result:`Результат`,jc_Save:`Сохранить`,"jc_Save configuration?":`Сохранить конфигурацию?`,"jc_Serial number (UUID)":`Серийный номер (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`Серийный номер (UUID) «%s» в лицензии предназначен для другого устройства.`,"jc_Show/hide filter input":`Показать/скрыть ввод фильтра`,"jc_Some data are not stored. Discard?":`Некоторые данные не сохранились. Отказаться?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Авторизация выполнена успешно. Токен действителен до %s и будет автоматически продлен.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Авторизация выполнена успешно. Токен действителен до %s, но его срок действия может истечь, так как экземпляр не запущен.`,"jc_Suitable license not found in license manager":`Подходящая лицензия не найдена в менеджере лицензий`,"jc_System language":`Язык системы`,"jc_Take browser position":`Взять позицию из браузера`,"jc_Take position from system settings":`Занять позицию из системных настроек`,jc_Template:`Шаблон`,"jc_Use all available let's encrypt certificates":`Использовать все доступные сертификаты Let’s encrypt`,"jc_Use system settings for position":`Использовать системные настройки для позиции`,"jc_Used system settings":`Системные настройки`,jc_ValidTill:`Годен до`,jc_Version:`Версия`,"jc_YAML editor":`Редактор YAML`,jc_Yes:`Да`,"jc_You can filter entries by entering here some text":`Вы можете отфильтровать записи, введя здесь текст`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Не удалось открыть JSON-файл`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Не удалось разобрать JSON-файл`,jc___different__:`разное`,jc_false:`ЛОЖЬ`,jc_locally:`локально`,jc_none:`ничего`,jc_repeat:`повтор`,jc_true:`истинный`,"jc_via internet":`через интернет`,sch_all:`все`},pt:{"jc_A credential with this name already exists":`Já existe uma credencial com este nome.`,"jc_A unique name is required":`É necessário um nome único.`,"jc_Accept license":`Aceitar licença`,jc_Actions:`Ações`,"jc_Add credential":`Adicionar credencial`,"jc_Add row":`Adicionar linha`,"jc_All items are filtered out":`Todos os itens são filtrados`,jc_Append:`Acrescentar`,"jc_Append %s entries or replace existing?":`Acrescentar %s entradas ou substituir as existentes?`,"jc_Append or replace?":`Acrescentar ou substituir?`,"jc_Are you sure?":`Você tem certeza?`,jc_Cancel:`Cancelar`,"jc_Cannot add items with set filter":`Não é possível adicionar itens com filtro definido`,"jc_Cannot create credential: %s":`Não foi possível criar a credencial: %s`,"jc_Cannot decode license":`Não é possível decodificar a licença`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`Não é possível determinar a posição: as configurações do sistema estão vazias e a detecção de GPS está desativada no navegador`,'jc_Cannot display the custom component "%s"':`Não é possível exibir o componente personalizado "%s"`,"jc_Cannot read licenses: %s":`Não é possível ler licenças: %s`,"jc_Cannot retrieve options, as instance is offline":`Não é possível recuperar opções, pois a instância está off-line`,"jc_Cannot save configuration because of error in configuration":`Não foi possível salvar a configuração devido a um erro na configuração.`,"jc_Cannot upload":`Não é possível fazer upload`,"jc_Chained certificate":`certificado encadeado`,jc_Checked:`Verificado`,"jc_Click to see in full size":`Clique para ver em tamanho real.`,"jc_Click to show":`Clique para mostrar`,"jc_Clone current row":`Clonar linha atual`,jc_Close:`Perto`,jc_Commercial:`Comercial`,jc_Copied:`Copiado`,"jc_Copied %s":`"%s" copiado`,"jc_Copy content":`Copiar conteúdo`,jc_Create:`Crio`,"jc_Credential type":`Tipo de credencial`,'jc_Custom component "%s" was not started':`O componente personalizado "%s" não foi iniciado.`,"jc_Define schedule":`Definir cronograma`,jc_Delete:`Excluir`,"jc_Delete current row":`Excluir linha atual`,"jc_Disable/Enable translation":`Desativar/Ativar tradução`,jc_Discard:`Descartar`,"jc_Do not use let's encrypt":`Não use vamos criptografar`,"jc_Docker is not available":`O Docker não está disponível`,"jc_Docker is not installed or not running":`O Docker não está instalado ou não está em execução`,"jc_Drop file here":`Solte o arquivo aqui`,"jc_Enter the code from that page here":`Digite o código dessa página aqui`,jc_Error:`Erro`,"jc_Expand/Collapse card":`Expandir/Recolher cartão`,"jc_Export configuration section":`Seção de configuração de exportação`,"jc_Export data to %s file":`Exportar dados para o arquivo %s`,"jc_Export setting to JSON file":`Exportar configurações para arquivo JSON`,"jc_Fallback custom certificates":`Certificados personalizados alternativos`,"jc_File is too big. Max %sk allowed. Try use SVG.":`O arquivo é muito grande. Max %sk permitido. Tente usar SVG.`,"jc_File will be deleted":`O arquivo será excluído.`,"jc_Filter and Data Actions":`Ações de filtro e dados`,"jc_Get %s access":`Obtenha acesso %s`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`Se o botão acima não funcionar, você pode autorizar manualmente este aplicativo visitando esta url`,"jc_Import and add configuration section":`Seção de importação e adição de configuração`,"jc_Import and replace configuration section":`Seção de configuração de importação e substituição`,"jc_Import data from %s file":`Importar dados do arquivo %s`,"jc_Import from %s":`Importar de %s`,"jc_Import settings from JSON file":`Importar configurações de um arquivo JSON`,"jc_Instance %s is alive":`O %s da instância está ativo`,"jc_Instance %s is not alive":`O %s da instância não está ativo`,"jc_Invalid JSON":`JSON inválido`,"jc_Invalid JSON file.":`Arquivo JSON inválido.`,"jc_Invalid JSON format. Expected an array.":`Formato JSON inválido. Esperava-se uma matriz.`,"jc_Invalid YAML":`YAML inválido`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`É necessário gerar %s da API da GUI, mas este painel de administração já fornece a geração %s. Por favor, atualize o painel de administração.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`Foi desenvolvido para geração de API GUI %s, mas este painel de administração fornece geração %s. Por favor, atualize o adaptador.`,"jc_It was probably built for an older admin version. Please update the adapter.":`Provavelmente foi desenvolvido para uma versão administrativa mais antiga. Por favor, atualize o adaptador.`,"jc_JSON editor":`Editor JSON`,jc_Latitude:`Latitude`,"jc_License %s":`Licença %s`,"jc_License agreement":`Contrato de licença`,"jc_License does not exist":`A licença não existe`,"jc_License expired on %s":`A licença expirou em %s`,'jc_License for other product "%s"':`Licença para outro produto "%s"`,"jc_License is for version %s, but required version is %s":`A licença é para a versão %s, mas a versão necessária é %s.`,"jc_License must be converted":`A licença deve ser convertida para uma versão mais recente. Você pode fazê-lo em seu perfil iobroker.net.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`Licença não encontrada no gerenciador de licenças. Deseja atualizar as licenças do iobroker.net?`,"jc_Listen on all IPs":`Ouça em todos os IPs`,jc_Longitude:`Longitude`,"jc_Move down":`Mover para baixo`,"jc_Move up":`Subir`,jc_Name:`Nome`,"jc_No one license found in license manager":`Nenhuma licença encontrada no gerenciador de licenças`,"jc_No response from admin":`Nenhuma resposta do administrador`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Entrada duplicada não permitida "%s" na coluna "%s"`,"jc_OAuth Client ID":`ID do cliente OAuth`,"jc_OAuth Client secret":`Segredo do cliente OAuth`,jc_Ok:`Está bem`,"jc_Passwords are not equal!":`As senhas não são iguais!`,"jc_Place your files here or click here to open the browse dialog":`Coloque seus arquivos aqui ou clique aqui para abrir a janela de navegação`,"jc_Please allow popups in your browser for this page!":`Por favor, permita pop-ups no seu navegador para esta página!`,"jc_Please confirm":`Por favor confirme`,"jc_Please create license":`Crie uma licença`,"jc_Please enter the license":`Por favor, insira a licença`,"jc_Please fill in all required fields":`Por favor, preencha todos os campos obrigatórios.`,"jc_Port could be used by %s":`A porta pode ser usada por %s`,"jc_Port is already used by %s":`A porta já está sendo usada por %s`,"jc_Press ENTER Key to add new item":`Pressione a tecla ENTER para adicionar um novo item`,"jc_Private certificate":`certificado privado`,jc_Product:`produtos`,"jc_Public certificate":`certificado público`,"jc_Renew %s access":`Renovar acesso %s`,jc_Replace:`Substituir`,"jc_Request data by instance":`Solicitar dados por instância`,"jc_Request timed out":`Solicitação expirou`,jc_Result:`Resultado`,jc_Save:`Salve `,"jc_Save configuration?":`Salvar configuração?`,"jc_Serial number (UUID)":`Número de série (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`O número de série (UUID) "%s" na licença é para outro dispositivo.`,"jc_Show/hide filter input":`Mostrar/ocultar entrada de filtro`,"jc_Some data are not stored. Discard?":`Alguns dados não são armazenados. Descartar?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Autorizado com sucesso. Token válido até %s e será renovado automaticamente.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Autorizado com sucesso. Token válido até %s, mas pode expirar, pois a instância não está em execução.`,"jc_Suitable license not found in license manager":`Licença adequada não encontrada no gerenciador de licenças`,"jc_System language":`Idioma do sistema`,"jc_Take browser position":`Tomar posição do navegador`,"jc_Take position from system settings":`Tomar posição a partir das configurações do sistema`,jc_Template:`Modelo`,"jc_Use all available let's encrypt certificates":`Use todos os certificados disponíveis vamos criptografar`,"jc_Use system settings for position":`Use as configurações do sistema para a posição`,"jc_Used system settings":`Configurações do sistema usadas`,jc_ValidTill:`Válida até`,jc_Version:`Versão`,"jc_YAML editor":`Editor YAML`,jc_Yes:`Sim`,"jc_You can filter entries by entering here some text":`Você pode filtrar as entradas digitando aqui algum texto`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Falha ao abrir o arquivo JSON`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Falha ao analisar o arquivo JSON`,jc___different__:`diferente`,jc_false:`FALSO`,jc_locally:`localmente`,jc_none:`Nenhum`,jc_repeat:`repetir`,jc_true:`verdadeiro`,"jc_via internet":`via internet`,sch_all:`tudo`},nl:{"jc_A credential with this name already exists":`Er bestaat al een legitimatiebewijs met deze naam.`,"jc_A unique name is required":`Een unieke naam is vereist.`,"jc_Accept license":`Accepteer licentie`,jc_Actions:`Acties`,"jc_Add credential":`Voeg inloggegevens toe`,"jc_Add row":`Voeg een rij toe`,"jc_All items are filtered out":`Alle items zijn uitgefilterd`,jc_Append:`toevoegen`,"jc_Append %s entries or replace existing?":`%s ingangen toevoegen of bestaande vervangen?`,"jc_Append or replace?":`Toevoegen of vervangen?`,"jc_Are you sure?":`Weet je het zeker?`,jc_Cancel:`Annuleer`,"jc_Cannot add items with set filter":`Kan geen items toevoegen met ingestelde filter`,"jc_Cannot create credential: %s":`Kan geen inloggegevens aanmaken: %s`,"jc_Cannot decode license":`Kan licentie niet decoderen`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`Kan positie niet bepalen: systeeminstellingen zijn leeg en GPS-detectie is uitgeschakeld in browser`,'jc_Cannot display the custom component "%s"':`Kan het aangepaste component "%s" niet weergeven.`,"jc_Cannot read licenses: %s":`Kan licenties niet lezen: %s`,"jc_Cannot retrieve options, as instance is offline":`Kan opties niet ophalen, omdat instantie offline is`,"jc_Cannot save configuration because of error in configuration":`Configuratie kan niet worden opgeslagen vanwege een configuratiefout.`,"jc_Cannot upload":`Kan niet uploaden`,"jc_Chained certificate":`Geketend certificaat`,jc_Checked:`Gecontroleerd`,"jc_Click to see in full size":`Klik om de afbeelding op volledige grootte te bekijken.`,"jc_Click to show":`Klik om te tonen`,"jc_Clone current row":`Kloon de huidige rij`,jc_Close:`Dichtbij`,jc_Commercial:`Reclame`,jc_Copied:`Gekopieerd`,"jc_Copied %s":`"%s" gekopieerd`,"jc_Copy content":`Inhoud kopiëren`,jc_Create:`Creëer`,"jc_Credential type":`Referentietype`,'jc_Custom component "%s" was not started':`Aangepaste component "%s" is niet gestart.`,"jc_Define schedule":`Definieer schema`,jc_Delete:`Verwijderen`,"jc_Delete current row":`Huidige rij verwijderen`,"jc_Disable/Enable translation":`Vertaling uitschakelen/inschakelen`,jc_Discard:`Weggooien`,"jc_Do not use let's encrypt":`Gebruik geen let's encrypt`,"jc_Docker is not available":`Docker is niet beschikbaar`,"jc_Docker is not installed or not running":`Docker is niet geïnstalleerd of draait niet`,"jc_Drop file here":`Zet het bestand hier neer`,"jc_Enter the code from that page here":`Voer hier de code van die pagina in`,jc_Error:`Fout`,"jc_Expand/Collapse card":`Kaart uit-/inklappen`,"jc_Export configuration section":`Sectie Exportconfiguratie`,"jc_Export data to %s file":`Exporteer gegevens naar %s bestand`,"jc_Export setting to JSON file":`Exporteer instellingen naar een JSON-bestand.`,"jc_Fallback custom certificates":`Fallback aangepaste certificaten`,"jc_File is too big. Max %sk allowed. Try use SVG.":`Bestand is te groot. Max. %sk toegestaan. Probeer SVG te gebruiken.`,"jc_File will be deleted":`Het bestand wordt verwijderd.`,"jc_Filter and Data Actions":`Filter- en gegevensacties`,"jc_Get %s access":`Krijg %s toegang`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`Als de bovenstaande knop niet werkt, kunt u deze app handmatig autoriseren door deze url te bezoeken`,"jc_Import and add configuration section":`Configuratiesectie importeren en toevoegen`,"jc_Import and replace configuration section":`Configuratiesectie importeren en vervangen`,"jc_Import data from %s file":`Importeer gegevens uit %s bestand`,"jc_Import from %s":`Importeren uit %s`,"jc_Import settings from JSON file":`Instellingen importeren vanuit een JSON-bestand`,"jc_Instance %s is alive":`Instantie %s leeft`,"jc_Instance %s is not alive":`Instantie %s is niet actief`,"jc_Invalid JSON":`Ongeldige JSON`,"jc_Invalid JSON file.":`Ongeldig JSON-bestand.`,"jc_Invalid JSON format. Expected an array.":`Ongeldige JSON-indeling. Er werd een array verwacht.`,"jc_Invalid YAML":`Ongeldige YAML`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`Het vereist GUI API-generatie %s, maar deze beheerder levert generatie %s. Graag de beheerder bijwerken.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`Het is gebouwd voor GUI API-generatie %s, maar deze beheerder levert generatie %s. Update de adapter.`,"jc_It was probably built for an older admin version. Please update the adapter.":`Het is waarschijnlijk ontwikkeld voor een oudere beheerdersversie. Update de adapter.`,"jc_JSON editor":`JSON-editor`,jc_Latitude:`Breedtegraad`,"jc_License %s":`Licentie %s`,"jc_License agreement":`Licentieovereenkomst`,"jc_License does not exist":`Licentie bestaat niet`,"jc_License expired on %s":`Licentie verlopen op %s`,'jc_License for other product "%s"':`Licentie voor ander product "%s"`,"jc_License is for version %s, but required version is %s":`De licentie is voor versie %s, maar de vereiste versie is %s.`,"jc_License must be converted":`Licentie moet worden omgezet naar nieuwere versie. U kunt dit doen in uw iobroker.net-profiel.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`Licentie niet gevonden in licentiebeheer. Wilt u licenties van iobroker.net bijwerken?`,"jc_Listen on all IPs":`Luister op alle IP's`,jc_Longitude:`Lengtegraad`,"jc_Move down":`Naar beneden verplaatsen`,"jc_Move up":`Omhoog gaan`,jc_Name:`Naam`,"jc_No one license found in license manager":`Geen enkele licentie gevonden in licentiebeheer`,"jc_No response from admin":`Geen reactie van de beheerder`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Niet-toegestane dubbele invoer "%s" in kolom "%s"`,"jc_OAuth Client ID":`OAuth-client-ID`,"jc_OAuth Client secret":`OAuth-clientgeheim`,jc_Ok:`OK`,"jc_Passwords are not equal!":`Wachtwoorden zijn niet gelijk!`,"jc_Place your files here or click here to open the browse dialog":`Plaats uw bestanden hier of klik hier om het bladervenster te openen`,"jc_Please allow popups in your browser for this page!":`Sta pop-ups toe in uw browser voor deze pagina!`,"jc_Please confirm":`Bevestig alstublieft`,"jc_Please create license":`Maak een licentie aan`,"jc_Please enter the license":`Voer de licentie in`,"jc_Please fill in all required fields":`Vul alle verplichte velden in.`,"jc_Port could be used by %s":`Poort kan worden gebruikt door %s`,"jc_Port is already used by %s":`Poort wordt al gebruikt door %s`,"jc_Press ENTER Key to add new item":`Druk op de ENTER-toets om een nieuw item toe te voegen`,"jc_Private certificate":`Privé certificaat`,jc_Product:`Product`,"jc_Public certificate":`Openbaar certificaat`,"jc_Renew %s access":`%s toegang verlengen`,jc_Replace:`Vervangen`,"jc_Request data by instance":`Gegevens opvragen per instantie`,"jc_Request timed out":`Verzoek verlopen`,jc_Result:`Resultaat`,jc_Save:`Sparen`,"jc_Save configuration?":`Configuratie opslaan?`,"jc_Serial number (UUID)":`Serienummer (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`Serienummer (UUID) "%s" in licentie is voor ander apparaat.`,"jc_Show/hide filter input":`Filterinvoer weergeven/verbergen`,"jc_Some data are not stored. Discard?":`Sommige gegevens worden niet opgeslagen. Weggooien?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Succesvol geautoriseerd. Token geldig tot %s en wordt automatisch verlengd.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Succesvol geautoriseerd. Token geldig tot %s, maar kan verlopen omdat de instantie niet actief is.`,"jc_Suitable license not found in license manager":`Geschikte licentie niet gevonden in licentiebeheer`,"jc_System language":`Systeemtaal`,"jc_Take browser position":`Positie innemen vanuit de browser`,"jc_Take position from system settings":`Neem positie over van systeeminstellingen`,jc_Template:`Sjabloon`,"jc_Use all available let's encrypt certificates":`Gebruik alle beschikbare Let's Encrypt-certificaten`,"jc_Use system settings for position":`Gebruik systeeminstellingen voor positie`,"jc_Used system settings":`Gebruikte systeeminstellingen`,jc_ValidTill:`Geldig tot`,jc_Version:`Versie`,"jc_YAML editor":`YAML-editor`,jc_Yes:`Ja`,"jc_You can filter entries by entering here some text":`U kunt items filteren door hier wat tekst in te voeren`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Het openen van het JSON-bestand is mislukt.`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Het parseren van het JSON-bestand is mislukt.`,jc___different__:`verschillend`,jc_false:`ONWAAR`,jc_locally:`plaatselijk`,jc_none:`geen`,jc_repeat:`herhalen`,jc_true:`WAAR`,"jc_via internet":`via internet`,sch_all:`allemaal`},fr:{"jc_A credential with this name already exists":`Un certificat portant ce nom existe déjà.`,"jc_A unique name is required":`Un nom unique est requis.`,"jc_Accept license":`Accepter la licence`,jc_Actions:`Actes`,"jc_Add credential":`Ajouter un identifiant`,"jc_Add row":`Ajouter une rangée`,"jc_All items are filtered out":`Tous les éléments sont filtrés`,jc_Append:`Ajouter`,"jc_Append %s entries or replace existing?":`Ajouter %s entrées ou remplacer l'existant\xA0?`,"jc_Append or replace?":`Ajouter ou remplacer\xA0?`,"jc_Are you sure?":`Êtes-vous sûr?`,jc_Cancel:`Annuler`,"jc_Cannot add items with set filter":`Impossible d'ajouter des éléments avec le filtre défini`,"jc_Cannot create credential: %s":`Impossible de créer les informations d'identification\xA0: %s`,"jc_Cannot decode license":`Impossible de décoder la licence`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`Impossible de déterminer la position\xA0: les paramètres système sont vides et la détection GPS est désactivée dans le navigateur`,'jc_Cannot display the custom component "%s"':`Impossible d'afficher le composant personnalisé « %s »`,"jc_Cannot read licenses: %s":`Impossible de lire les licences\xA0: %s`,"jc_Cannot retrieve options, as instance is offline":`Impossible de récupérer les options, car l'instance est hors ligne`,"jc_Cannot save configuration because of error in configuration":`Impossible d'enregistrer la configuration en raison d'une erreur de configuration.`,"jc_Cannot upload":`Impossible de télécharger`,"jc_Chained certificate":`Certificat chaîné`,jc_Checked:`Vérifié`,"jc_Click to see in full size":`Cliquez pour afficher en taille réelle`,"jc_Click to show":`Cliquez pour afficher`,"jc_Clone current row":`Cloner la ligne actuelle`,jc_Close:`Fermer`,jc_Commercial:`Commercial`,jc_Copied:`Copié`,"jc_Copied %s":`"%s" copié`,"jc_Copy content":`Copier le contenu`,jc_Create:`Créer`,"jc_Credential type":`Type de justificatif d'identité`,'jc_Custom component "%s" was not started':`Le composant personnalisé « %s » n'a pas été démarré.`,"jc_Define schedule":`Définir le calendrier`,jc_Delete:`Supprimer`,"jc_Delete current row":`Supprimer la ligne actuelle`,"jc_Disable/Enable translation":`Activer/Désactiver la traduction`,jc_Discard:`Jeter`,"jc_Do not use let's encrypt":`Ne pas utiliser let's encrypt`,"jc_Docker is not available":`Docker n'est pas disponible`,"jc_Docker is not installed or not running":`Docker n'est pas installé ou n'est pas en cours d'exécution`,"jc_Drop file here":`Déposer le fichier ici`,"jc_Enter the code from that page here":`Entrez le code de cette page ici`,jc_Error:`Erreur`,"jc_Expand/Collapse card":`Carte Développer/Réduire`,"jc_Export configuration section":`Exporter la section de configuration`,"jc_Export data to %s file":`Exporter les données vers le fichier %s`,"jc_Export setting to JSON file":`Paramètres d'exportation vers un fichier JSON`,"jc_Fallback custom certificates":`Certificats personnalisés de secours`,"jc_File is too big. Max %sk allowed. Try use SVG.":`Le fichier est trop volumineux. Max %sk autorisé. Essayez d'utiliser SVG.`,"jc_File will be deleted":`Le fichier sera supprimé`,"jc_Filter and Data Actions":`Actions sur les filtres et les données`,"jc_Get %s access":`Obtenir l'accès %s`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`Si le bouton ci-dessus ne fonctionne pas, vous pouvez autoriser manuellement cette application en visitant cette URL`,"jc_Import and add configuration section":`Importer et ajouter la section de configuration`,"jc_Import and replace configuration section":`Importer et remplacer la section de configuration`,"jc_Import data from %s file":`Importer des données à partir du fichier %s`,"jc_Import from %s":`Importer depuis %s`,"jc_Import settings from JSON file":`Importer les paramètres à partir d'un fichier JSON`,"jc_Instance %s is alive":`L'instance %s est active`,"jc_Instance %s is not alive":`L'instance %s n'est pas active`,"jc_Invalid JSON":`JSON invalide`,"jc_Invalid JSON file.":`Fichier JSON invalide.`,"jc_Invalid JSON format. Expected an array.":`Format JSON invalide. Tableau attendu.`,"jc_Invalid YAML":`YAML invalide`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`Cela nécessite la génération de l'API GUI %s, mais cet administrateur fournit la génération %s. Veuillez mettre à jour l'administrateur.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`Il a été conçu pour la génération d'API GUI %s, mais cet administrateur fournit la génération %s. Veuillez mettre à jour l'adaptateur.`,"jc_It was probably built for an older admin version. Please update the adapter.":`Il a probablement été conçu pour une version d'administration plus ancienne. Veuillez mettre à jour l'adaptateur.`,"jc_JSON editor":`Éditeur JSON`,jc_Latitude:`Latitude`,"jc_License %s":`Licence %s`,"jc_License agreement":`Accord de licence`,"jc_License does not exist":`La licence n'existe pas`,"jc_License expired on %s":`Licence expirée le %s`,'jc_License for other product "%s"':`Licence pour un autre produit "%s"`,"jc_License is for version %s, but required version is %s":`La licence concerne la version %s, mais la version requise est %s`,"jc_License must be converted":`La licence doit être convertie en une version plus récente. Vous pouvez le faire dans votre profil iobroker.net.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`Licence introuvable dans le gestionnaire de licences. Voulez-vous mettre à jour les licences depuis iobroker.net\xA0?`,"jc_Listen on all IPs":`Écoutez sur toutes les adresses IP`,jc_Longitude:`Longitude`,"jc_Move down":`Descendre`,"jc_Move up":`Déplacer vers le haut`,jc_Name:`Nom`,"jc_No one license found in license manager":`Aucune licence trouvée dans le gestionnaire de licences`,"jc_No response from admin":`Aucune réponse de l'administrateur`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Entrée en double non autorisée « %s » dans la colonne « %s »`,"jc_OAuth Client ID":`ID client OAuth`,"jc_OAuth Client secret":`Secret client OAuth`,jc_Ok:`D'accord`,"jc_Passwords are not equal!":`Les mots de passe ne sont pas égaux !`,"jc_Place your files here or click here to open the browse dialog":`Placez vos fichiers ici ou cliquez ici pour ouvrir la boîte de dialogue de navigation`,"jc_Please allow popups in your browser for this page!":`Veuillez autoriser les popups dans votre navigateur pour cette page\xA0!`,"jc_Please confirm":`Veuillez confirmer`,"jc_Please create license":`Veuillez créer une licence`,"jc_Please enter the license":`Veuillez entrer la licence`,"jc_Please fill in all required fields":`Veuillez remplir tous les champs obligatoires.`,"jc_Port could be used by %s":`Le port pourrait être utilisé par %s`,"jc_Port is already used by %s":`Le port est déjà utilisé par %s`,"jc_Press ENTER Key to add new item":`Appuyez sur la touche ENTRÉE pour ajouter un nouvel élément`,"jc_Private certificate":`Certificat privé`,jc_Product:`Produit`,"jc_Public certificate":`Certificat public`,"jc_Renew %s access":`Renouveler l'accès %s`,jc_Replace:`Remplacer`,"jc_Request data by instance":`Demander des données par instance`,"jc_Request timed out":`La demande a expiré`,jc_Result:`Résultat`,jc_Save:`sauver`,"jc_Save configuration?":`Enregistrer la configuration\xA0?`,"jc_Serial number (UUID)":`Numéro de série (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`Le numéro de série (UUID) "%s" dans la licence est pour un autre appareil.`,"jc_Show/hide filter input":`Afficher/masquer l'entrée de filtre`,"jc_Some data are not stored. Discard?":`Certaines données ne sont pas stockées. Jeter?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Autorisation réussie. Jeton valide jusqu'au %s et sera automatiquement renouvelé.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Autorisation réussie. Jeton valide jusqu'à %s, mais il peut expirer car l'instance n'est pas en cours d'exécution.`,"jc_Suitable license not found in license manager":`Licence appropriée introuvable dans le gestionnaire de licences`,"jc_System language":`Langue du système`,"jc_Take browser position":`Prendre position depuis le navigateur`,"jc_Take position from system settings":`Prendre position à partir des paramètres système`,jc_Template:`Modèle`,"jc_Use all available let's encrypt certificates":`Utilisez tous les certificats let's encrypt disponibles`,"jc_Use system settings for position":`Utiliser les paramètres système pour la position`,"jc_Used system settings":`Paramètres système utilisés`,jc_ValidTill:`Valable jusqu'au`,jc_Version:`Version`,"jc_YAML editor":`Éditeur YAML`,jc_Yes:`Oui`,"jc_You can filter entries by entering here some text":`Vous pouvez filtrer les entrées en saisissant ici du texte`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Impossible d'ouvrir le fichier JSON`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Échec de l'analyse du fichier JSON`,jc___different__:`différent`,jc_false:`FAUX`,jc_locally:`localement`,jc_none:`rien`,jc_repeat:`répéter`,jc_true:`VRAI`,"jc_via internet":`par Internet`,sch_all:`tout`},it:{"jc_A credential with this name already exists":`Esiste già una credenziale con questo nome`,"jc_A unique name is required":`È richiesto un nome univoco`,"jc_Accept license":`Accetta licenza`,jc_Actions:`Azioni`,"jc_Add credential":`Aggiungi credenziali`,"jc_Add row":`Aggiungi riga`,"jc_All items are filtered out":`Tutti gli elementi vengono filtrati`,jc_Append:`Aggiungere`,"jc_Append %s entries or replace existing?":`Aggiungi %s voci o sostituisci quelle esistenti?`,"jc_Append or replace?":`Aggiungere o sostituire?`,"jc_Are you sure?":`Sei sicuro?`,jc_Cancel:`Annulla`,"jc_Cannot add items with set filter":`Impossibile aggiungere elementi con il filtro impostato`,"jc_Cannot create credential: %s":`Impossibile creare le credenziali: %s`,"jc_Cannot decode license":`Impossibile decodificare la licenza`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`Impossibile determinare la posizione: le impostazioni di sistema sono vuote e il rilevamento GPS è disabilitato nel browser`,'jc_Cannot display the custom component "%s"':`Impossibile visualizzare il componente personalizzato "%s"`,"jc_Cannot read licenses: %s":`Impossibile leggere le licenze: %s`,"jc_Cannot retrieve options, as instance is offline":`Impossibile recuperare le opzioni, poiché l'istanza è offline`,"jc_Cannot save configuration because of error in configuration":`Impossibile salvare la configurazione a causa di un errore nella configurazione`,"jc_Cannot upload":`Impossibile caricare`,"jc_Chained certificate":`Certificato incatenato`,jc_Checked:`Controllato`,"jc_Click to see in full size":`Clicca per visualizzare l'immagine a dimensioni intere`,"jc_Click to show":`Clicca per mostrare`,"jc_Clone current row":`Clona riga corrente`,jc_Close:`Vicino`,jc_Commercial:`Commerciale`,jc_Copied:`Copiato`,"jc_Copied %s":`"%s" copiato`,"jc_Copy content":`Copia contenuto`,jc_Create:`Creare`,"jc_Credential type":`Tipo di credenziale`,'jc_Custom component "%s" was not started':`Il componente personalizzato "%s" non è stato avviato`,"jc_Define schedule":`Definisci programma`,jc_Delete:`Elimina`,"jc_Delete current row":`Elimina la riga corrente`,"jc_Disable/Enable translation":`Disabilita/Abilita la traduzione`,jc_Discard:`Scartare`,"jc_Do not use let's encrypt":`Non utilizzare crittografiamo`,"jc_Docker is not available":`Docker non è disponibile`,"jc_Docker is not installed or not running":`Docker non è installato o non è in esecuzione`,"jc_Drop file here":`Trascina il file qui`,"jc_Enter the code from that page here":`Inserisci qui il codice da quella pagina`,jc_Error:`Errore`,"jc_Expand/Collapse card":`Espandi/Comprimi scheda`,"jc_Export configuration section":`Sezione di configurazione dell'esportazione`,"jc_Export data to %s file":`Esporta i dati nel file %s`,"jc_Export setting to JSON file":`Esporta le impostazioni in un file JSON`,"jc_Fallback custom certificates":`Certificati personalizzati di fallback`,"jc_File is too big. Max %sk allowed. Try use SVG.":`Il file è troppo grande. Max %sk consentito. Prova a usare SVG.`,"jc_File will be deleted":`Il file verrà eliminato`,"jc_Filter and Data Actions":`Azioni sui filtri e sui dati`,"jc_Get %s access":`Ottieni l'accesso %s`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`Se il pulsante sopra non funziona, puoi autorizzare manualmente questa app visitando questo URL`,"jc_Import and add configuration section":`Importa e aggiungi la sezione di configurazione`,"jc_Import and replace configuration section":`Importa e sostituisci la sezione di configurazione`,"jc_Import data from %s file":`Importa i dati dal file %s`,"jc_Import from %s":`Importa da %s`,"jc_Import settings from JSON file":`Importa le impostazioni dal file JSON`,"jc_Instance %s is alive":`Il %s dell'istanza è vivo`,"jc_Instance %s is not alive":`Il TESTO dell'istanza non è vivo`,"jc_Invalid JSON":`JSON non valido`,"jc_Invalid JSON file.":`File JSON non valido.`,"jc_Invalid JSON format. Expected an array.":`Formato JSON non valido. È previsto un array.`,"jc_Invalid YAML":`YAML non valido`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`Richiede la generazione dell'API GUI %s, ma questo amministratore fornisce la generazione %s. Si prega di aggiornare l'amministratore.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`È stato creato per la generazione dell'API GUI %s, ma questo amministratore fornisce la generazione %s. Si prega di aggiornare l'adattatore.`,"jc_It was probably built for an older admin version. Please update the adapter.":`Probabilmente è stato creato per una versione di amministrazione precedente. Si prega di aggiornare l'adattatore.`,"jc_JSON editor":`Editor JSON`,jc_Latitude:`Latitudine`,"jc_License %s":`Licenza %s`,"jc_License agreement":`Contratto di licenza`,"jc_License does not exist":`La licenza non esiste`,"jc_License expired on %s":`Licenza scaduta il %s`,'jc_License for other product "%s"':`Licenza per altro prodotto "%s"`,"jc_License is for version %s, but required version is %s":`La licenza è per la versione %s, ma la versione richiesta è %s`,"jc_License must be converted":`La licenza deve essere convertita in una versione più recente. Puoi farlo nel tuo profilo iobroker.net.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`Licenza non trovata nel gestore delle licenze. Vuoi aggiornare le licenze da iobroker.net?`,"jc_Listen on all IPs":`Ascolta su tutti gli IP`,jc_Longitude:`Longitudine`,"jc_Move down":`Abbassati`,"jc_Move up":`Andare avanti`,jc_Name:`Nome`,"jc_No one license found in license manager":`Nessuna licenza trovata nel gestore delle licenze`,"jc_No response from admin":`Nessuna risposta dall'amministratore`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Voce duplicata non consentita "%s" nella colonna "%s"`,"jc_OAuth Client ID":`ID client OAuth`,"jc_OAuth Client secret":`Segreto del client OAuth`,jc_Ok:`Ok`,"jc_Passwords are not equal!":`Le password non sono uguali!`,"jc_Place your files here or click here to open the browse dialog":`Posiziona i file qui o fai clic qui per aprire la finestra di dialogo Sfoglia`,"jc_Please allow popups in your browser for this page!":`Si prega di abilitare i popup nel browser per questa pagina!`,"jc_Please confirm":`Si prega di confermare`,"jc_Please create license":`Si prega di creare la licenza`,"jc_Please enter the license":`Inserisci la licenza`,"jc_Please fill in all required fields":`Si prega di compilare tutti i campi obbligatori.`,"jc_Port could be used by %s":`La porta potrebbe essere utilizzata da %s`,"jc_Port is already used by %s":`La porta è già utilizzata da %s`,"jc_Press ENTER Key to add new item":`Premere il tasto INVIO per aggiungere un nuovo elemento`,"jc_Private certificate":`Certificato privato`,jc_Product:`Prodotto`,"jc_Public certificate":`Certificato pubblico`,"jc_Renew %s access":`Rinnova l'accesso %s`,jc_Replace:`Sostituire`,"jc_Request data by instance":`Richiedi dati per istanza`,"jc_Request timed out":`Tempo scaduto per la richiesta`,jc_Result:`Risultato`,jc_Save:`Salva`,"jc_Save configuration?":`Salvare la configurazione?`,"jc_Serial number (UUID)":`Numero di serie (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`Il numero di serie (UUID) "%s" nella licenza è per un altro dispositivo.`,"jc_Show/hide filter input":`Mostra/nascondi input filtro`,"jc_Some data are not stored. Discard?":`Alcuni dati non vengono memorizzati. Scartare?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Autorizzazione completata. Il token è valido fino al %s e verrà rinnovato automaticamente.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Autorizzazione completata. Il token è valido fino al %s, ma potrebbe scadere perché l'istanza non è in esecuzione.`,"jc_Suitable license not found in license manager":`Licenza adatta non trovata nel gestore delle licenze`,"jc_System language":`Linguaggio di sistema`,"jc_Take browser position":`Prendi posizione dal browser`,"jc_Take position from system settings":`Prendi posizione dalle impostazioni di sistema`,jc_Template:`Modello`,"jc_Use all available let's encrypt certificates":`Usa tutti i certificati Let's Encrypt disponibili`,"jc_Use system settings for position":`Usa le impostazioni di sistema per la posizione`,"jc_Used system settings":`Impostazioni di sistema utilizzate`,jc_ValidTill:`Valido fino a`,jc_Version:`Versione`,"jc_YAML editor":`Editor YAML`,jc_Yes:`SÌ`,"jc_You can filter entries by entering here some text":`Puoi filtrare le voci inserendo qui del testo`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Impossibile aprire il file JSON`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Impossibile analizzare il file JSON`,jc___different__:`diverso`,jc_false:`FALSO`,jc_locally:`localmente`,jc_none:`nessuna`,jc_repeat:`ripetere`,jc_true:`VERO`,"jc_via internet":`attraverso internet`,sch_all:`tutti`},es:{"jc_A credential with this name already exists":`Ya existe una credencial con ese nombre.`,"jc_A unique name is required":`Se requiere un nombre único.`,"jc_Accept license":`Aceptar licencia`,jc_Actions:`Comportamiento`,"jc_Add credential":`Agregar credencial`,"jc_Add row":`Añadir fila`,"jc_All items are filtered out":`Todos los elementos se filtran`,jc_Append:`Adjuntar`,"jc_Append %s entries or replace existing?":`¿Agregar %s entradas o reemplazar las existentes?`,"jc_Append or replace?":`¿Agregar o reemplazar?`,"jc_Are you sure?":`¿Estás seguro?`,jc_Cancel:`Cancelar`,"jc_Cannot add items with set filter":`No se pueden agregar elementos con el filtro establecido`,"jc_Cannot create credential: %s":`No se puede crear la credencial: %s`,"jc_Cannot decode license":`No se puede decodificar la licencia`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`No se puede determinar la posición: la configuración del sistema está vacía y la detección de GPS está deshabilitada en el navegador`,'jc_Cannot display the custom component "%s"':`No se puede mostrar el componente personalizado "%s"`,"jc_Cannot read licenses: %s":`No se pueden leer licencias: %s`,"jc_Cannot retrieve options, as instance is offline":`No se pueden recuperar las opciones, ya que la instancia está fuera de línea`,"jc_Cannot save configuration because of error in configuration":`No se puede guardar la configuración debido a un error en la configuración.`,"jc_Cannot upload":`no se puede cargar`,"jc_Chained certificate":`certificado encadenado`,jc_Checked:`Comprobado`,"jc_Click to see in full size":`Haz clic para ver en tamaño completo.`,"jc_Click to show":`Haga clic para mostrar`,"jc_Clone current row":`Clonar fila actual`,jc_Close:`Cerca`,jc_Commercial:`Comercial`,jc_Copied:`Copiado`,"jc_Copied %s":`Copiado "%s"`,"jc_Copy content":`Copiar contenido`,jc_Create:`Crear`,"jc_Credential type":`Tipo de credencial`,'jc_Custom component "%s" was not started':`El componente personalizado "%s" no se inició.`,"jc_Define schedule":`Definir horario`,jc_Delete:`Eliminar`,"jc_Delete current row":`Eliminar fila actual`,"jc_Disable/Enable translation":`Desactivar/Activar traducción`,jc_Discard:`Desechar`,"jc_Do not use let's encrypt":`No use vamos a cifrar`,"jc_Docker is not available":`Docker no está disponible`,"jc_Docker is not installed or not running":`Docker no está instalado o no se está ejecutando`,"jc_Drop file here":`Suelta el archivo aquí`,"jc_Enter the code from that page here":`Introduzca el código de esa página aquí`,jc_Error:`Error`,"jc_Expand/Collapse card":`Expandir/Contraer tarjeta`,"jc_Export configuration section":`Exportar sección de configuración`,"jc_Export data to %s file":`Exportar datos al archivo %s`,"jc_Export setting to JSON file":`Exportar configuración a un archivo JSON`,"jc_Fallback custom certificates":`Certificados personalizados alternativos`,"jc_File is too big. Max %sk allowed. Try use SVG.":`El archivo es demasiado grande. Máximo de %sk permitido. Intenta usar SVG.`,"jc_File will be deleted":`El archivo será eliminado`,"jc_Filter and Data Actions":`Acciones de filtrado y datos`,"jc_Get %s access":`Obtener %s acceso`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`Si el botón de arriba no funciona, puedes autorizar manualmente esta aplicación visitando esta URL`,"jc_Import and add configuration section":`Importar y agregar sección de configuración`,"jc_Import and replace configuration section":`Importar y reemplazar sección de configuración`,"jc_Import data from %s file":`Importar datos del archivo %s`,"jc_Import from %s":`Importar desde %s`,"jc_Import settings from JSON file":`Importar configuración desde un archivo JSON`,"jc_Instance %s is alive":`Instancia %s está vivo`,"jc_Instance %s is not alive":`Instancia %s no está vivo`,"jc_Invalid JSON":`JSON no válido`,"jc_Invalid JSON file.":`Archivo JSON inválido.`,"jc_Invalid JSON format. Expected an array.":`Formato JSON inválido. Se esperaba un array.`,"jc_Invalid YAML":`YAML no válido`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`Requiere la generación de la API de la GUI %s, pero este administrador proporciona la generación %s. Por favor, actualice el administrador.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`Fue diseñado para la generación de API GUI %s, pero este administrador proporciona la generación %s. Por favor, actualice el adaptador.`,"jc_It was probably built for an older admin version. Please update the adapter.":`Probablemente se diseñó para una versión de administración anterior. Por favor, actualice el adaptador.`,"jc_JSON editor":`editor JSON`,jc_Latitude:`Latitud`,"jc_License %s":`Licencia %s`,"jc_License agreement":`Acuerdo de licencia`,"jc_License does not exist":`La licencia no existe`,"jc_License expired on %s":`La licencia venció el %s`,'jc_License for other product "%s"':`Licencia para otro producto "%s"`,"jc_License is for version %s, but required version is %s":`La licencia es para la versión %s, pero la versión requerida es %s.`,"jc_License must be converted":`La licencia debe convertirse a una versión más reciente. Puedes hacerlo en tu perfil de iobroker.net.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`Licencia no encontrada en el administrador de licencias. ¿Quieres actualizar las licencias de iobroker.net?`,"jc_Listen on all IPs":`Escuche en todas las IP`,jc_Longitude:`Longitud`,"jc_Move down":`Mover hacia abajo`,"jc_Move up":`Ascender`,jc_Name:`Nombre`,"jc_No one license found in license manager":`No se encontró ninguna licencia en el administrador de licencias`,"jc_No response from admin":`No hay respuesta del administrador`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Entrada duplicada no permitida "%s" en la columna "%s"`,"jc_OAuth Client ID":`ID de cliente OAuth`,"jc_OAuth Client secret":`Secreto de cliente OAuth`,jc_Ok:`Okay`,"jc_Passwords are not equal!":`¡Las contraseñas no son iguales!`,"jc_Place your files here or click here to open the browse dialog":`Coloque sus archivos aquí o haga clic aquí para abrir el cuadro de diálogo de exploración`,"jc_Please allow popups in your browser for this page!":`¡Permita ventanas emergentes en su navegador para esta página!`,"jc_Please confirm":`Por favor confirmar`,"jc_Please create license":`Por favor cree una licencia`,"jc_Please enter the license":`Por favor ingrese la licencia`,"jc_Please fill in all required fields":`Por favor, rellene todos los campos obligatorios.`,"jc_Port could be used by %s":`El puerto podría ser utilizado por %s`,"jc_Port is already used by %s":`El puerto ya está en uso por %s`,"jc_Press ENTER Key to add new item":`Presione la tecla ENTER para agregar un nuevo elemento`,"jc_Private certificate":`certificado privado`,jc_Product:`Producto`,"jc_Public certificate":`Certificado público`,"jc_Renew %s access":`Renovar el acceso a %s`,jc_Replace:`Reemplazar`,"jc_Request data by instance":`Solicitar datos por instancia`,"jc_Request timed out":`Tiempo de espera agotado`,jc_Result:`Resultado`,jc_Save:`Salvar`,"jc_Save configuration?":`¿Guardar configuración?`,"jc_Serial number (UUID)":`Número de serie (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`El número de serie (UUID) "%s" en la licencia es para otro dispositivo.`,"jc_Show/hide filter input":`Mostrar/ocultar entrada de filtro`,"jc_Some data are not stored. Discard?":`Algunos datos no se almacenan. ¿Desechar?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Autorizado correctamente. El token es válido hasta el %s y se renovará automáticamente.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Autorizado correctamente. El token es válido hasta %s, pero puede caducar porque la instancia no está en ejecución.`,"jc_Suitable license not found in license manager":`Licencia adecuada no encontrada en el administrador de licencias`,"jc_System language":`Lenguaje del sistema`,"jc_Take browser position":`Tomar posición desde el navegador`,"jc_Take position from system settings":`Tomar posición desde la configuración del sistema`,jc_Template:`Plantilla`,"jc_Use all available let's encrypt certificates":`Utilice todos los certificados let's encrypt disponibles`,"jc_Use system settings for position":`Usar la configuración del sistema para la posición`,"jc_Used system settings":`Configuraciones del sistema usadas`,jc_ValidTill:`Válida hasta`,jc_Version:`Versión`,"jc_YAML editor":`Editor YAML`,jc_Yes:`Sí`,"jc_You can filter entries by entering here some text":`Puede filtrar las entradas ingresando aquí algún texto`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Error al abrir el archivo JSON`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Error al analizar el archivo JSON`,jc___different__:`diferente`,jc_false:`FALSO`,jc_locally:`en la zona`,jc_none:`ninguno`,jc_repeat:`repetir`,jc_true:`VERDADERO`,"jc_via internet":`vía Internet`,sch_all:`todas`},pl:{"jc_A credential with this name already exists":`Poświadczenie o tej nazwie już istnieje`,"jc_A unique name is required":`Wymagana jest unikalna nazwa`,"jc_Accept license":`Zaakceptuj licencję`,jc_Actions:`Akcje`,"jc_Add credential":`Dodaj poświadczenie`,"jc_Add row":`Dodaj wiersz`,"jc_All items are filtered out":`Wszystkie pozycje są odfiltrowane`,jc_Append:`Dodać`,"jc_Append %s entries or replace existing?":`Dołączyć wpisy %s czy zastąpić istniejące?`,"jc_Append or replace?":`Dołączyć czy zastąpić?`,"jc_Are you sure?":`Jesteś pewny?`,jc_Cancel:`Anuluj`,"jc_Cannot add items with set filter":`Nie można dodać elementów z ustawionym filtrem`,"jc_Cannot create credential: %s":`Nie można utworzyć poświadczeń: %s`,"jc_Cannot decode license":`Nie można zdekodować licencji`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`Nie można określić pozycji: ustawienia systemu są puste, a wykrywanie GPS jest wyłączone w przeglądarce`,'jc_Cannot display the custom component "%s"':`Nie można wyświetlić niestandardowego komponentu „%s”`,"jc_Cannot read licenses: %s":`Nie można odczytać licencji: %s`,"jc_Cannot retrieve options, as instance is offline":`Nie można pobrać opcji, ponieważ instancja jest w trybie offline`,"jc_Cannot save configuration because of error in configuration":`Nie można zapisać konfiguracji z powodu błędu w konfiguracji`,"jc_Cannot upload":`Nie można przesłać`,"jc_Chained certificate":`Certyfikat łańcuchowy`,jc_Checked:`Sprawdzony`,"jc_Click to see in full size":`Kliknij, aby zobaczyć w pełnym rozmiarze`,"jc_Click to show":`Kliknij, aby pokazać`,"jc_Clone current row":`Sklonuj bieżący wiersz`,jc_Close:`Blisko`,jc_Commercial:`Handlowy`,jc_Copied:`Skopiowano`,"jc_Copied %s":`Skopiowano "%s"`,"jc_Copy content":`Kopiuj zawartość`,jc_Create:`Stwórz`,"jc_Credential type":`Typ poświadczenia`,'jc_Custom component "%s" was not started':`Komponent niestandardowy „%s” nie został uruchomiony`,"jc_Define schedule":`Zdefiniuj harmonogram`,jc_Delete:`Usunąć`,"jc_Delete current row":`Usuń bieżący wiersz`,"jc_Disable/Enable translation":`Wyłącz/Włącz tłumaczenie`,jc_Discard:`Wyrzucać`,"jc_Do not use let's encrypt":`Nie używaj zaszyfrujmy`,"jc_Docker is not available":`Docker nie jest dostępny`,"jc_Docker is not installed or not running":`Docker nie jest zainstalowany lub nie działa`,"jc_Drop file here":`Upuść plik tutaj`,"jc_Enter the code from that page here":`Wpisz kod z tej strony tutaj`,jc_Error:`Błąd`,"jc_Expand/Collapse card":`Rozwiń/Zwiń kartę`,"jc_Export configuration section":`Sekcja konfiguracji eksportu`,"jc_Export data to %s file":`Eksportuj dane do pliku %s`,"jc_Export setting to JSON file":`Eksportuj ustawienia do pliku JSON`,"jc_Fallback custom certificates":`Niestandardowe certyfikaty zastępcze`,"jc_File is too big. Max %sk allowed. Try use SVG.":`Plik jest za duży. Maksymalna dozwolona liczba %sk. Spróbuj użyć SVG.`,"jc_File will be deleted":`Plik zostanie usunięty`,"jc_Filter and Data Actions":`Akcje filtrów i danych`,"jc_Get %s access":`Uzyskaj dostęp %s`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`Jeśli przycisk powyżej nie działa, możesz autoryzować tę aplikację ręcznie, odwiedzając ten adres URL`,"jc_Import and add configuration section":`Importuj i dodaj sekcję konfiguracji`,"jc_Import and replace configuration section":`Importuj i zastąp sekcję konfiguracji`,"jc_Import data from %s file":`Importuj dane z pliku %s`,"jc_Import from %s":`Importuj z %s`,"jc_Import settings from JSON file":`Importuj ustawienia z pliku JSON`,"jc_Instance %s is alive":`Instancja %s jest aktywna`,"jc_Instance %s is not alive":`Instancja TEKST nie jest aktywna`,"jc_Invalid JSON":`Nieprawidłowy JSON`,"jc_Invalid JSON file.":`Nieprawidłowy plik JSON.`,"jc_Invalid JSON format. Expected an array.":`Nieprawidłowy format JSON. Oczekiwano tablicy.`,"jc_Invalid YAML":`Nieprawidłowy plik YAML`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`Wymaga generacji interfejsu API GUI %s, ale ten administrator zapewnia generację %s. Zaktualizuj administratora.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`Został stworzony do generowania interfejsu API GUI %s, ale ten administrator zapewnia generowanie %s. Proszę zaktualizować adapter.`,"jc_It was probably built for an older admin version. Please update the adapter.":`Prawdopodobnie został stworzony dla starszej wersji administratora. Proszę zaktualizować adapter.`,"jc_JSON editor":`Edytor JSON`,jc_Latitude:`Szerokość`,"jc_License %s":`Licencja %s`,"jc_License agreement":`Umowa licencyjna`,"jc_License does not exist":`Licencja nie istnieje`,"jc_License expired on %s":`Licencja wygasła w dniu %s`,'jc_License for other product "%s"':`Licencja na inny produkt „%s”`,"jc_License is for version %s, but required version is %s":`Licencja jest przeznaczona dla wersji %s, ale wymagana jest wersja %s`,"jc_License must be converted":`Licencja musi zostać przekonwertowana na nowszą wersję. Możesz to zrobić w swoim profilu iobroker.net.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`Nie znaleziono licencji w menedżerze licencji. Chcesz zaktualizować licencje z iobroker.net?`,"jc_Listen on all IPs":`Słuchaj na wszystkich adresach IP`,jc_Longitude:`Długość geograficzna`,"jc_Move down":`Padnij`,"jc_Move up":`Podnieść`,jc_Name:`Nazwa`,"jc_No one license found in license manager":`Nie znaleziono licencji w menedżerze licencji`,"jc_No response from admin":`Brak odpowiedzi od administratora`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Niedozwolony duplikat wpisu „%s” w kolumnie „%s”`,"jc_OAuth Client ID":`Identyfikator klienta OAuth`,"jc_OAuth Client secret":`Tajny klucz klienta OAuth`,jc_Ok:`Dobrze`,"jc_Passwords are not equal!":`Hasła nie są równe!`,"jc_Place your files here or click here to open the browse dialog":`Umieść swoje pliki tutaj lub kliknij tutaj, aby otworzyć okno dialogowe przeglądania`,"jc_Please allow popups in your browser for this page!":`Proszę zezwolić na wyświetlanie wyskakujących okienek w przeglądarce dla tej strony!`,"jc_Please confirm":`Proszę potwierdzić`,"jc_Please create license":`Utwórz licencję`,"jc_Please enter the license":`Proszę wprowadzić licencję`,"jc_Please fill in all required fields":`Proszę wypełnić wszystkie wymagane pola`,"jc_Port could be used by %s":`Port może być używany przez %s`,"jc_Port is already used by %s":`Port jest już używany przez %s`,"jc_Press ENTER Key to add new item":`Naciśnij klawisz ENTER, aby dodać nowy element`,"jc_Private certificate":`Prywatny certyfikat`,jc_Product:`Produkt`,"jc_Public certificate":`Certyfikat publiczny`,"jc_Renew %s access":`Odnów dostęp %s`,jc_Replace:`Zastępować`,"jc_Request data by instance":`Żądanie danych według instancji`,"jc_Request timed out":`Upłynął limit czasu żądania`,jc_Result:`Wynik`,jc_Save:`Zapisać`,"jc_Save configuration?":`Zapisać konfigurację?`,"jc_Serial number (UUID)":`Numer seryjny (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`Numer seryjny (UUID) „%s” w licencji dotyczy innego urządzenia.`,"jc_Show/hide filter input":`Pokaż/ukryj wejście filtra`,"jc_Some data are not stored. Discard?":`Niektóre dane nie są przechowywane. Wyrzucać?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Pomyślnie autoryzowano. Token ważny do %s i zostanie automatycznie odnowiony.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Pomyślnie autoryzowano. Token ważny do %s, ale może wygasnąć, ponieważ instancja nie jest uruchomiona.`,"jc_Suitable license not found in license manager":`Nie znaleziono odpowiedniej licencji w menedżerze licencji`,"jc_System language":`Język systemu`,"jc_Take browser position":`Zajmij pozycję z przeglądarki`,"jc_Take position from system settings":`Zajmij pozycję z ustawień systemowych`,jc_Template:`Szablon`,"jc_Use all available let's encrypt certificates":`Użyj wszystkich dostępnych certyfikatów Let's Encrypt`,"jc_Use system settings for position":`Użyj ustawień systemowych dla pozycji`,"jc_Used system settings":`Używane ustawienia systemowe`,jc_ValidTill:`Obowiązuje do`,jc_Version:`Wersja`,"jc_YAML editor":`Edytor YAML`,jc_Yes:`Tak`,"jc_You can filter entries by entering here some text":`Możesz filtrować wpisy, wpisując tutaj jakiś tekst`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Nie udało się otworzyć pliku JSON`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Nie udało się przeanalizować pliku JSON`,jc___different__:`różne`,jc_false:`FAŁSZ`,jc_locally:`lokalnie`,jc_none:`Żaden`,jc_repeat:`powtarzać`,jc_true:`PRAWDA`,"jc_via internet":`przez internet`,sch_all:`wszystko`},uk:{"jc_A credential with this name already exists":`Облікові дані з таким ім'ям вже існують`,"jc_A unique name is required":`Потрібне унікальне ім'я`,"jc_Accept license":`Прийняти ліцензію`,jc_Actions:`Дії`,"jc_Add credential":`Додати облікові дані`,"jc_Add row":`Додати рядок`,"jc_All items are filtered out":`Усі елементи відфільтровано`,jc_Append:`Додайте`,"jc_Append %s entries or replace existing?":`Додати %s записів чи замінити наявні?`,"jc_Append or replace?":`Додати чи замінити?`,"jc_Are you sure?":`Ти впевнений?`,jc_Cancel:`Скасувати`,"jc_Cannot add items with set filter":`Неможливо додати елементи зі встановленим фільтром`,"jc_Cannot create credential: %s":`Не вдається створити облікові дані: %s`,"jc_Cannot decode license":`Неможливо розшифрувати ліцензію`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`Неможливо визначити положення: системні налаштування порожні, а визначення GPS вимкнено в браузері`,'jc_Cannot display the custom component "%s"':`Не вдається відобразити користувацький компонент "%s"`,"jc_Cannot read licenses: %s":`Неможливо прочитати ліцензії: %s`,"jc_Cannot retrieve options, as instance is offline":`Неможливо отримати параметри, оскільки екземпляр офлайн`,"jc_Cannot save configuration because of error in configuration":`Не вдалося зберегти конфігурацію через помилку в конфігурації`,"jc_Cannot upload":`Неможливо завантажити`,"jc_Chained certificate":`Прикутий сертифікат`,jc_Checked:`Перевірено`,"jc_Click to see in full size":`Натисніть, щоб побачити в повному розмірі`,"jc_Click to show":`Натисніть, щоб показати`,"jc_Clone current row":`Клонувати поточний рядок`,jc_Close:`Закрити`,jc_Commercial:`Комерційний`,jc_Copied:`Скопійовано`,"jc_Copied %s":`Скопійовано "%s"`,"jc_Copy content":`Скопіюйте вміст`,jc_Create:`Створити`,"jc_Credential type":`Тип облікових даних`,'jc_Custom component "%s" was not started':`Користувацький компонент "%s" не запущено`,"jc_Define schedule":`Визначити розклад`,jc_Delete:`Видалити`,"jc_Delete current row":`Видалити поточний рядок`,"jc_Disable/Enable translation":`Вимкнути/Увімкнути переклад`,jc_Discard:`Відкинути`,"jc_Do not use let's encrypt":`Не використовуйте let's encrypt`,"jc_Docker is not available":`Докер недоступний`,"jc_Docker is not installed or not running":`Docker не встановлено або не працює`,"jc_Drop file here":`Перетягніть файл сюди`,"jc_Enter the code from that page here":`Введіть тут код з цієї сторінки`,jc_Error:`Помилка`,"jc_Expand/Collapse card":`Розгорнути/Згорнути картку`,"jc_Export configuration section":`Розділ конфігурації експорту`,"jc_Export data to %s file":`Експортувати дані у файл %s`,"jc_Export setting to JSON file":`Експорт налаштувань у файл JSON`,"jc_Fallback custom certificates":`Запасні спеціальні сертифікати`,"jc_File is too big. Max %sk allowed. Try use SVG.":`Файл завеликий. Максимально дозволено %sk. Спробуйте використовувати SVG.`,"jc_File will be deleted":`Файл буде видалено`,"jc_Filter and Data Actions":`Фільтр і дії з даними`,"jc_Get %s access":`Отримайте доступ %s`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`Якщо кнопка вище не працює, ви можете авторизувати цю програму вручну, перейшовши за цим посиланням`,"jc_Import and add configuration section":`Розділ імпорту та додавання конфігурації`,"jc_Import and replace configuration section":`Розділ імпорту та заміни конфігурації`,"jc_Import data from %s file":`Імпортувати дані з файлу %s`,"jc_Import from %s":`Імпортувати з %s`,"jc_Import settings from JSON file":`Імпорт налаштувань з JSON-файлу`,"jc_Instance %s is alive":`Примірник %s живий`,"jc_Instance %s is not alive":`Примірник %s не живий`,"jc_Invalid JSON":`Недійсний JSON`,"jc_Invalid JSON file.":`Недійсний JSON-файл.`,"jc_Invalid JSON format. Expected an array.":`Недійсний формат JSON. Очікується масив.`,"jc_Invalid YAML":`Недійсний YAML`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`Потрібна генерація API графічного інтерфейсу %s, але цей адміністратор надає генерацію %s. Будь ласка, оновіть адміністраторську версію.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`Його було створено для покоління GUI API %s, але цей адміністратор надає покоління %s. Будь ласка, оновіть адаптер.`,"jc_It was probably built for an older admin version. Please update the adapter.":`Ймовірно, його було створено для старішої версії адміністратора. Будь ласка, оновіть адаптер.`,"jc_JSON editor":`Редактор JSON`,jc_Latitude:`Широта`,"jc_License %s":`Ліцензія %s`,"jc_License agreement":`Ліцензійна угода`,"jc_License does not exist":`Ліцензії не існує`,"jc_License expired on %s":`Термін дії ліцензії закінчився %s`,'jc_License for other product "%s"':`Ліцензія на інший продукт "%s"`,"jc_License is for version %s, but required version is %s":`Ліцензія для версії %s, але потрібна версія %s`,"jc_License must be converted":`Ліцензію необхідно конвертувати до новішої версії. Ви можете зробити це у своєму профілі на iobroker.net.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`Ліцензія не знайдена в менеджері ліцензій. Хочете оновити ліцензії з iobroker.net?`,"jc_Listen on all IPs":`Прослуховування на всіх IP`,jc_Longitude:`Довгота`,"jc_Move down":`Рухатися вниз`,"jc_Move up":`Рухатися вгору`,jc_Name:`Ім'я`,"jc_No one license found in license manager":`У менеджері ліцензій не знайдено жодної ліцензії`,"jc_No response from admin":`Немає відповіді від адміністратора`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Недозволений дублікат запису "%s" у стовпці "%s"`,"jc_OAuth Client ID":`Ідентифікатор клієнта OAuth`,"jc_OAuth Client secret":`Секрет клієнта OAuth`,jc_Ok:`В порядку`,"jc_Passwords are not equal!":`Паролі не бувають рівними!`,"jc_Place your files here or click here to open the browse dialog":`Розмістіть свої файли тут або натисніть тут, щоб відкрити діалогове вікно перегляду`,"jc_Please allow popups in your browser for this page!":`Будь ласка, дозвольте спливаючі вікна у вашому браузері для цієї сторінки!`,"jc_Please confirm":`Будь-ласка підтвердіть`,"jc_Please create license":`Будь ласка, створіть ліцензію`,"jc_Please enter the license":`Будь ласка, введіть ліцензію`,"jc_Please fill in all required fields":`Будь ласка, заповніть усі обов'язкові поля`,"jc_Port could be used by %s":`Порт може використовуватися %s`,"jc_Port is already used by %s":`Порт уже використовується %s`,"jc_Press ENTER Key to add new item":`Натисніть клавішу ENTER, щоб додати новий елемент`,"jc_Private certificate":`Приватний сертифікат`,jc_Product:`Продукт`,"jc_Public certificate":`Публічний сертифікат`,"jc_Renew %s access":`Поновити доступ %s`,jc_Replace:`Замінити`,"jc_Request data by instance":`Запит даних за екземпляром`,"jc_Request timed out":`Час запиту вичерпано`,jc_Result:`Результат`,jc_Save:`зберегти`,"jc_Save configuration?":`Зберегти конфігурацію?`,"jc_Serial number (UUID)":`Серійний номер (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`Серійний номер (UUID) "%s" у ліцензії призначений для іншого пристрою.`,"jc_Show/hide filter input":`Показати/сховати введення фільтра`,"jc_Some data are not stored. Discard?":`Деякі дані не зберігаються. Відкинути?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Авторизацію успішно пройшло. Токен дійсний до %s та буде автоматично поновлено.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Авторизацію успішно виконано. Токен дійсний до %s, але його термін дії може закінчитися, оскільки екземпляр не запущено.`,"jc_Suitable license not found in license manager":`Відповідна ліцензія не знайдена в менеджері ліцензій`,"jc_System language":`Системна мова`,"jc_Take browser position":`Займіть позицію з браузера`,"jc_Take position from system settings":`Займіть позицію в налаштуваннях системи`,jc_Template:`Шаблон`,"jc_Use all available let's encrypt certificates":`Використовуйте всі доступні сертифікати let's encrypt`,"jc_Use system settings for position":`Використовуйте системні налаштування для позиції`,"jc_Used system settings":`Використані системні налаштування`,jc_ValidTill:`Дійсний до`,jc_Version:`Версія`,"jc_YAML editor":`Редактор YAML`,jc_Yes:`Так`,"jc_You can filter entries by entering here some text":`Ви можете фільтрувати записи, ввівши тут певний текст`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Не вдалося відкрити JSON-файл`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Не вдалося проаналізувати JSON-файл`,jc___different__:`інший`,jc_false:`НЕПРАВДА`,jc_locally:`локально`,jc_none:`немає`,jc_repeat:`повторити`,jc_true:`ПРАВДА`,"jc_via internet":`через інтернет`,sch_all:`все`},"zh-cn":{"jc_A credential with this name already exists":`已存在同名凭证`,"jc_A unique name is required":`需要一个唯一的名称。`,"jc_Accept license":`接受许可`,jc_Actions:`操作`,"jc_Add credential":`添加凭据`,"jc_Add row":`添加行`,"jc_All items are filtered out":`所有项目都被过滤掉`,jc_Append:`附加`,"jc_Append %s entries or replace existing?":`追加 %s 条目还是替换现有条目?`,"jc_Append or replace?":`追加还是替换?`,"jc_Are you sure?":`你确定吗?`,jc_Cancel:`取消`,"jc_Cannot add items with set filter":`无法使用设置过滤器添加项目`,"jc_Cannot create credential: %s":`无法创建凭证:%s`,"jc_Cannot decode license":`无法解码许可证`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`无法确定位置:系统设置为空且浏览器中禁用了 GPS 检测`,'jc_Cannot display the custom component "%s"':`无法显示自定义组件“%s”`,"jc_Cannot read licenses: %s":`无法读取许可证:%s`,"jc_Cannot retrieve options, as instance is offline":`无法检索选项,因为实例处于脱机状态`,"jc_Cannot save configuration because of error in configuration":`由于配置错误,无法保存配置。`,"jc_Cannot upload":`无法上传`,"jc_Chained certificate":`链式证书`,jc_Checked:`勾选`,"jc_Click to see in full size":`点击查看完整尺寸`,"jc_Click to show":`点击显示`,"jc_Clone current row":`克隆当前行`,jc_Close:`关`,jc_Commercial:`商业的`,jc_Copied:`复制的`,"jc_Copied %s":`复制的"%s"`,"jc_Copy content":`复制内容`,jc_Create:`创建`,"jc_Credential type":`凭证类型`,'jc_Custom component "%s" was not started':`自定义组件“%s”未启动`,"jc_Define schedule":`定义时间表`,jc_Delete:`删除`,"jc_Delete current row":`删除当前行`,"jc_Disable/Enable translation":`禁用/启用翻译`,jc_Discard:`丢弃`,"jc_Do not use let's encrypt":`不要使用让我们加密`,"jc_Docker is not available":`Docker 不可用`,"jc_Docker is not installed or not running":`Docker 未安装或未运行`,"jc_Drop file here":`将档案放在这里`,"jc_Enter the code from that page here":`在此处输入该页面的代码`,jc_Error:`错误`,"jc_Expand/Collapse card":`展开/折叠卡`,"jc_Export configuration section":`导出配置部分`,"jc_Export data to %s file":`将数据导出到 %s 文件`,"jc_Export setting to JSON file":`将设置导出到 JSON 文件`,"jc_Fallback custom certificates":`后备自定义证书`,"jc_File is too big. Max %sk allowed. Try use SVG.":`文件太大。允许的最大字节%s数。尝试使用 SVG。`,"jc_File will be deleted":`文件将被删除`,"jc_Filter and Data Actions":`过滤和数据操作`,"jc_Get %s access":`获取 %s 访问权限`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`如果上面的按钮不起作用,您可以通过访问此网址手动授权此应用`,"jc_Import and add configuration section":`导入并添加配置部分`,"jc_Import and replace configuration section":`导入和替换配置部分`,"jc_Import data from %s file":`从 %s 文件导入数据`,"jc_Import from %s":`从 %s 导入`,"jc_Import settings from JSON file":`从 JSON 文件导入设置`,"jc_Instance %s is alive":`实例 %s 是活动的`,"jc_Instance %s is not alive":`实例 %s 不存在`,"jc_Invalid JSON":`JSON 无效`,"jc_Invalid JSON file.":`无效的JSON文件。`,"jc_Invalid JSON format. Expected an array.":`JSON格式无效。应为数组。`,"jc_Invalid YAML":`无效的 YAML`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`它需要生成 GUI API,但此管理员提供的是生成功能。请更新管理员。`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`它原本是为 GUI API 生成 %s 而设计的,但此管理员提供了生成 %s 的功能。请更新适配器。`,"jc_It was probably built for an older admin version. Please update the adapter.":`这可能是为旧版管理后台构建的。请更新适配器。`,"jc_JSON editor":`JSON 编辑器`,jc_Latitude:`纬度`,"jc_License %s":`许可证 %s`,"jc_License agreement":`许可协议`,"jc_License does not exist":`许可证不存在`,"jc_License expired on %s":`许可证已于 %s 过期`,'jc_License for other product "%s"':`其他产品“%s”的许可证`,"jc_License is for version %s, but required version is %s":`许可证适用于版本 %s,但所需版本为 %s。`,"jc_License must be converted":`许可证必须转换为更新版本。您可以在 iobroker.net 个人资料中执行此操作。`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`在许可证管理器中找不到许可证。您要从 iobroker.net 更新许可证吗?`,"jc_Listen on all IPs":`监听所有IP`,jc_Longitude:`经度`,"jc_Move down":`下移`,"jc_Move up":`提升`,jc_Name:`姓名`,"jc_No one license found in license manager":`许可证管理器中未找到任何许可证`,"jc_No response from admin":`管理员没有回应`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`列“%s”中存在不允许的重复条目“%s”。`,"jc_OAuth Client ID":`OAuth客户端ID`,"jc_OAuth Client secret":`OAuth 客户端密钥`,jc_Ok:`好`,"jc_Passwords are not equal!":`密码不相等!`,"jc_Place your files here or click here to open the browse dialog":`将文件放在此处或单击此处打开浏览对话框`,"jc_Please allow popups in your browser for this page!":`请允许浏览器弹出此页面!`,"jc_Please confirm":`请确认`,"jc_Please create license":`请创建许可证`,"jc_Please enter the license":`请输入许可证`,"jc_Please fill in all required fields":`请填写所有必填字段`,"jc_Port could be used by %s":`%s 可以使用端口`,"jc_Port is already used by %s":`端口已被 %s 使用`,"jc_Press ENTER Key to add new item":`按 ENTER 键添加新项目`,"jc_Private certificate":`私有证书`,jc_Product:`产品`,"jc_Public certificate":`公共证书`,"jc_Renew %s access":`续订 %s 访问权限`,jc_Replace:`代替`,"jc_Request data by instance":`按实例请求数据`,"jc_Request timed out":`请求超时`,jc_Result:`结果`,jc_Save:`保存`,"jc_Save configuration?":`保存配置?`,"jc_Serial number (UUID)":`序列号 (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`许可证中的序列号 (UUID)“%s”用于其他设备。`,"jc_Show/hide filter input":`显示/隐藏过滤器输入`,"jc_Some data are not stored. Discard?":`部分数据未存储。丢弃?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`授权成功。令牌有效期至 %s,并将自动续订。`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`授权成功。令牌有效期至 %s,但由于实例未运行,令牌可能会过期。`,"jc_Suitable license not found in license manager":`在许可证管理器中找不到合适的许可证`,"jc_System language":`系统语言`,"jc_Take browser position":`从浏览器获取位置`,"jc_Take position from system settings":`从系统设置中获取位置`,jc_Template:`模板`,"jc_Use all available let's encrypt certificates":`使用所有可用的让我们加密证书`,"jc_Use system settings for position":`使用系统设置定位`,"jc_Used system settings":`使用的系统设置`,jc_ValidTill:`有效期至`,jc_Version:`版本`,"jc_YAML editor":`YAML 编辑器`,jc_Yes:`是的`,"jc_You can filter entries by entering here some text":`您可以通过在此处输入一些文本来过滤条目`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] 打开 JSON 文件失败`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] 解析 JSON 文件失败`,jc___different__:`不同的`,jc_false:`错误的`,jc_locally:`本地`,jc_none:`没有任何`,jc_repeat:`重复`,jc_true:`真的`,"jc_via internet":`通过互联网`,sch_all:`全选`}});var Sk={root:{width:`100%`,height:`100%`}},Ck=class extends s{constructor(e){super(e),q(this,`forceUpdateHandlers`,void 0),q(this,`errorTimeout`,null),q(this,`errorCached`,null),q(this,`oContext`,void 0),q(this,`cachedObjects`,{}),q(this,`onCommandRunning`,e=>this.setState({commandRunning:e})),q(this,`onAlive`,(e,t)=>{!!(t!=null&&t.val)!==this.state.alive&&this.setState({alive:!!(t!=null&&t.val)})}),q(this,`onChange`,(e,t,n,r)=>{if(this.props.onValueChange)this.props.onValueChange(e,t,!!r),n==null||n();else if(e&&this.props.onChange){let t={changed:JSON.stringify(e)!==this.state.originalData};this.setState(t,()=>{var i,a;(i=(a=this.props).onChange)==null||i.call(a,e,!!t.changed,!!r),n==null||n()})}else if(r){var i,a;(i=(a=this.props).onChange)==null||i.call(a,null,void 0,r)}}),q(this,`onError`,(e,t)=>{this.errorCached=this.errorCached||JSON.parse(JSON.stringify(this.state.errors));let n=this.errorCached;n&&e&&(t?n[e]=t:delete n[e]),this.errorTimeout&&=(clearTimeout(this.errorTimeout),null),JSON.stringify(n)===JSON.stringify(this.state.errors)?this.errorCached=null:this.errorTimeout=setTimeout(()=>this.setState({errors:this.errorCached||{}},()=>{this.errorTimeout=null,this.errorCached=null,this.props.onError(!!Object.keys(this.state.errors).length)}),50)}),q(this,`getCachedObject`,async e=>{if(this.cachedObjects[e]!==void 0)return this.cachedObjects[e];try{this.cachedObjects[e]=await this.props.socket.getObject(e)??null}catch(t){console.error(t),this.cachedObjects[e]=null}return this.cachedObjects[e]}),q(this,`changeLanguage`,()=>{this.forceUpdate()}),q(this,`forceAttrUpdate`,(e,t)=>{Array.isArray(e)?e.forEach(e=>this.forceUpdateHandlers[e]&&this.forceUpdateHandlers[e](t)):this.forceUpdateHandlers[e]&&this.forceUpdateHandlers[e](t)}),q(this,`registerOnForceUpdate`,(e,t)=>{t?this.forceUpdateHandlers[e]=t:this.forceUpdateHandlers[e]&&delete this.forceUpdateHandlers[e]}),this.state={originalData:JSON.stringify(this.props.data),changed:!1,errors:{},updateData:this.props.updateData||0,systemConfig:null,alive:!1,commandRunning:!1,schema:JSON.parse(JSON.stringify(this.props.schema))},this.forceUpdateHandlers={},this.buildDependencies(this.state.schema),this.readData().catch(e=>console.error(`Cannot read data: ${e}`))}static getDerivedStateFromProps(e,t){return e.updateData===t.updateData?null:{updateData:e.updateData,originalData:JSON.stringify(e.data),schema:JSON.parse(JSON.stringify(e.schema))}}static async loadI18n(e,t,n){if(t===!0||t&&typeof t==`string`){let r=K.getLanguage(),i=typeof t==`string`?t:`i18n`,a=await e.fileExists(`${n}.admin`,`${i}/${r}.json`),o;if(a?o=`${i}/${r}.json`:(a=await e.fileExists(`${n}.admin`,`${i}/${r}/translations.json`),a?o=`${i}/${r}/translations.json`:r!==`en`&&(a=await e.fileExists(`${n}.admin`,`${i}/en.json`),a?o=`${i}/en.json`:(a=await e.fileExists(`${n}.admin`,`${i}/en/translations.json`),a&&(o=`${i}/en/translations.json`)))),o){let t=await e.readFile(`${n}.admin`,o),i;i=t.file===void 0?t:t.file;try{let e=JSON.parse(i);K.extendTranslations(e,r)}catch(e){return console.error(`Cannot parse language file "${n}.admin/${o}: ${e}`),``}return o}return console.warn(`Cannot find i18n for ${n} / ${o}`),``}return t&&typeof t==`object`&&K.extendTranslations(t),``}async readData(){let e;try{e=this.props.socket.getCompactSystemConfig?await this.props.socket.getCompactSystemConfig():await this.getCachedObject(`system.config`)||void 0;let t=await this.props.socket.getState(`system.adapter.${this.props.adapterName}.${this.props.instance}.alive`);this.setState({systemConfig:(e==null?void 0:e.common)||{},alive:!!(t!=null&&t.val)},()=>{this.updateContext(!0),this.props.custom||this.props.socket.subscribeState(`system.adapter.${this.props.adapterName}.${this.props.instance}.alive`,this.onAlive)})}catch(e){console.error(`Cannot read system config: ${e}`)}}flatten(e,t){return t||={},e.items&&Object.keys(e.items).forEach(n=>{t[n]=e.items[n],this.flatten(e.items[n],t)}),t}buildDependencies(e){let t=this.flatten(e);Object.keys(t).forEach(e=>{var n,r,i,a,o;if((n=t[e].confirm)!=null&&n.alsoDependsOn){var s;(s=t[e].confirm)==null||s.alsoDependsOn.forEach(n=>{if(!t[n])console.error(`[JsonConfigComponent] Attribute ${n} does not exist!`),n.startsWith(`data.`)&&console.warn(`[JsonConfigComponent] please use "${n.replace(/^data\./,``)}" instead of "${n}"`);else{t[n].confirmDependsOn=t[n].confirmDependsOn||[];let r={...t[e],attr:e};r.confirm&&(r.confirm.cancel=`Undo`),t[n].confirmDependsOn.push(r)}})}if((r=t[e].onChange)!=null&&r.alsoDependsOn){var c;(c=t[e].onChange)==null||c.alsoDependsOn.forEach(n=>{if(!t[n])console.error(`[JsonConfigComponent] Attribute ${n} does not exist!`),n.startsWith(`data.`)&&console.warn(`[JsonConfigComponent] please use "${n.replace(/^data\./,``)}" instead of "${n}"`);else{t[n].onChangeDependsOn=t[n].onChangeDependsOn||[];let r={...t[e],attr:e};t[n].onChangeDependsOn.push(r)}})}if((i=t[e].hidden)!=null&&i.alsoDependsOn){var l;(l=t[e].hidden)==null||l.alsoDependsOn.forEach(n=>{if(!t[n])console.error(`[JsonConfigComponent] Attribute ${n} does not exist!`),n.startsWith(`data.`)&&console.warn(`[JsonConfigComponent] please use "${n.replace(/^data\./,``)}" instead of "${n}"`);else{t[n].hiddenDependsOn=t[n].hiddenDependsOn||[];let r={...t[e],attr:e};t[n].hiddenDependsOn.push(r)}})}if((a=t[e].label)!=null&&a.alsoDependsOn){var u;(u=t[e].label)==null||u.alsoDependsOn.forEach(n=>{if(!t[n])console.error(`[JsonConfigComponent] Attribute ${n} does not exist!`),n.startsWith(`data.`)&&console.warn(`[JsonConfigComponent] please use "${n.replace(/^data\./,``)}" instead of "${n}"`);else{t[n].labelDependsOn=t[n].labelDependsOn||[];let r={...t[e],attr:e};t[n].labelDependsOn.push(r)}})}if((o=t[e].help)!=null&&o.alsoDependsOn){var d;(d=t[e].help)==null||d.alsoDependsOn.forEach(n=>{if(!t[n])console.error(`[JsonConfigComponent] Attribute ${n} does not exist!`),n.startsWith(`data.`)&&console.warn(`[JsonConfigComponent] please use "${n.replace(/^data\./,``)}" instead of "${n}"`);else{t[n].helpDependsOn=t[n].helpDependsOn||[];let r={...t[e],attr:e};t[n].helpDependsOn.push(r)}})}})}updateContext(e){this.oContext={DeviceManager:this.props.DeviceManager,adapterName:this.props.adapterName,changeLanguage:this.changeLanguage,common:this.props.common,customs:this.props.customs,dateFormat:this.props.dateFormat,embedded:this.props.embedded,forceUpdate:this.forceAttrUpdate,imagePrefix:this.props.imagePrefix,instance:this.props.instance,instanceObj:this.props.instanceObj,isFloatComma:this.props.isFloatComma,multiEdit:this.props.multiEdit,onBackEndCommand:this.props.onBackEndCommand,onCommandRunning:this.onCommandRunning,onValueChange:this.props.onValueChange,registerOnForceUpdate:this.registerOnForceUpdate,socket:this.props.socket,systemConfig:this.state.systemConfig,theme:this.props.theme,themeType:this.props.themeType,_themeName:this.props.themeName,updateData:this.state.updateData,getCachedObject:this.getCachedObject},e&&this.forceUpdate()}renderItem(e){return this.oContext?e.type===`tabs`?_.createElement(xk,{withoutSaveButtons:this.props.withoutSaveButtons,oContext:this.oContext,alive:this.state.alive,changed:this.state.changed,commandRunning:this.state.commandRunning,common:this.props.common,custom:this.props.custom,customObj:this.props.customObj,data:this.props.data,onChange:this.onChange,onError:(e,t)=>this.onError(e,t),originalData:JSON.parse(this.state.originalData),root:!0,schema:e,expertMode:this.props.expertMode,themeName:this.props.themeName,customComponents:this.props.customComponents}):e.type===`panel`||!e.type?_.createElement(yk,{withoutSaveButtons:this.props.withoutSaveButtons,oContext:this.oContext,alive:this.state.alive,changed:this.state.changed,commandRunning:this.state.commandRunning,common:this.props.common,custom:this.props.custom,customObj:this.props.customObj,data:this.props.data,expertMode:this.props.expertMode,index:1e3,isParentTab:!this.props.embedded&&!this.props.withoutSaveButtons,onChange:this.onChange,onError:(e,t)=>this.onError(e,t),originalData:JSON.parse(this.state.originalData),root:!0,schema:e,themeName:this.props.themeName,customComponents:this.props.customComponents}):(console.error(`Unknown item type in root: ${JSON.stringify(e)}`),null):null}render(){return!this.state.systemConfig||!this.oContext?_.createElement(I,null):(this.oContext._themeName!==this.props.themeName&&(this.oContext._themeName=this.props.themeName,setTimeout(()=>this.updateContext(!0),0)),_.createElement(`div`,{style:{...!this.props.embedded||this.props.withoutSaveButtons?Sk.root:void 0,...this.props.style,...this.state.schema.style}},this.renderItem(this.state.schema)))}};g();var wk={root:{width:`100%`,height:`100%`,overflow:`hidden`,position:`relative`},scroll:{height:`calc(100% - 48px)`,overflowY:`auto`},exportImportButtons:{position:`absolute`,top:5,right:0,zIndex:3},button:{marginRight:`5px`},tooltip:{pointerEvents:`none`}};function Tk(e,t){let n=``;for(let r=0;r<t.length;r++)n+=String.fromCharCode(e[r%e.length].charCodeAt(0)^t.charCodeAt(r));return n}function Ek(e,t){let n=``;for(let r=0;r<t.length;r++)n+=String.fromCharCode(e[r%e.length].charCodeAt(0)^t.charCodeAt(r));return n}function Dk(e,t){if(typeof t!=`string`)return t;if(!t.startsWith(`$/aes-192-cbc:`)||!/^[0-9a-f]{48}$/.test(e))return Tk(e,t);let n=t.split(`:`,3),r=window.CryptoJS.enc.Hex.parse(e),i=window.CryptoJS.enc.Hex.parse(n[1]),a=window.CryptoJS.lib.CipherParams.create({ciphertext:window.CryptoJS.enc.Hex.parse(n[2])}),o=window.CryptoJS.AES.decrypt(a,r,{iv:i});return window.CryptoJS.enc.Utf8.stringify(o)}function Ok(e,t,n){if(typeof t!=`string`)return t;if(!/^[0-9a-f]{48}$/.test(e))return Ek(e,t);let r;r=n?window.CryptoJS.enc.Hex.parse(n):window.CryptoJS.lib.WordArray.random(128/8);let i=window.CryptoJS.enc.Hex.parse(e),a=window.CryptoJS.AES.encrypt(t,i,{iv:r}).ciphertext;return`$/aes-192-cbc:${window.CryptoJS.enc.Hex.stringify(r)}:${a}`}function kk(e,t){var n;return!t||!document.getElementById(t)?new Promise(n=>{let r=document.createElement(`script`);r.setAttribute(`id`,t),r.onload=n,r.src=e,document.getElementsByTagName(`head`)[0].appendChild(r)}):(n=document.getElementById(t))==null?void 0:n.onload}var Ak=class extends Rt{constructor(e){super(e),q(this,`fileSubscribed`,[]),q(this,`fileLangSubscribed`,``),q(this,`secret`,void 0),q(this,`handleFileSelect`,e=>{let t=e.target.files[0];if(t){let e=new FileReader;e.onload=e=>{if(!e.target)return;let t=e.target.result;try{let e=JSON.parse(t);this.setState({data:e,changed:JSON.stringify(e)!==JSON.stringify(this.state.originalData)})}catch{window.alert(K.t(`jc_[JsonConfig] Failed to parse JSON file`))}},e.readAsText(t)}else window.alert(K.t(`jc_[JsonConfig] Failed to open JSON File`))}),q(this,`onFileChange`,async(e,t,n)=>{if(e===`${this.props.adapterName}.admin`&&n){if(t===this.fileLangSubscribed)try{var r;await Ck.loadI18n(this.props.socket,(r=this.state.schema)==null?void 0:r.i18n,this.props.adapterName),this.setState({hash:`${this.state.hash}1`})}catch{}else if(this.fileSubscribed.includes(t))try{let e=await this.getConfigFile(this.fileSubscribed[0]);this.setState({schema:e||void 0,hash:(0,Es.default)(JSON.stringify(e)).toString()})}catch{}}}),this.state={updateData:0,changed:!1,confirmDialog:!1,theme:Kn(e.themeName),saveConfigDialog:!1,hash:`_`},this.secret=e.secret||``,this.getInstanceObject().then(e=>this.getConfigFile().then(t=>Ck.loadI18n(this.props.socket,t==null?void 0:t.i18n,this.props.adapterName).then(n=>{n&&(this.fileLangSubscribed||(this.fileLangSubscribed=n,this.props.socket.subscribeFiles(`${this.props.adapterName}.admin`,this.fileLangSubscribed,this.onFileChange))),e?this.setState({schema:t||void 0,data:e.native,common:e.common,hash:(0,Es.default)(JSON.stringify(t)).toString()}):window.alert(`Instance system.adapter.${this.props.adapterName}.${this.props.instance} not found!`)})))}componentWillUnmount(){super.componentWillUnmount(),this.fileSubscribed.length&&(this.props.socket.unsubscribeFiles(`${this.props.adapterName}.admin`,this.fileSubscribed,this.onFileChange),this.fileSubscribed=[]),this.fileLangSubscribed&&=(this.props.socket.unsubscribeFiles(`${this.props.adapterName}.admin`,this.fileLangSubscribed,this.onFileChange),``)}getExportImportButtons(){return _.createElement(`div`,{style:wk.exportImportButtons},_.createElement(Ln,{title:this.props.t(`jc_Import settings from JSON file`),slotProps:{popper:{sx:wk.tooltip}}},_.createElement(zt,{size:`small`,sx:{"&.MuiFab-root":wk.button},onClick:()=>{let e=document.createElement(`input`);e.setAttribute(`type`,`file`),e.setAttribute(`id`,`files`),e.setAttribute(`opacity`,0),e.addEventListener(`change`,e=>this.handleFileSelect(e),!1),e.click()}},_.createElement(Nt,null))),_.createElement(Ln,{title:this.props.t(`jc_Export setting to JSON file`),slotProps:{popper:{sx:wk.tooltip}}},_.createElement(zt,{size:`small`,sx:{"&.MuiFab-root":wk.button},onClick:()=>{this.state.data&&$t.generateFile(`${this.props.adapterName}.${this.props.instance}.json`,this.state.data)}},_.createElement(Nt,{style:{transform:`rotate(180deg)`}}))))}async getInstanceObject(){try{let t=await this.props.socket.getObject(`system.adapter.${this.props.adapterName}.${this.props.instance}`);if(Array.isArray(t==null?void 0:t.encryptedNative)){var e;if(!this.secret){let e=await this.props.socket.getSystemConfig();await kk(`../../lib/js/crypto-js/crypto-js.js`,`crypto-js`),this.secret=e.native.secret}return(e=t.encryptedNative)==null||e.forEach(e=>{t.native[e]&&(t.native[e]=Dk(this.secret,t.native[e]))}),t}return t||null}catch(e){window.alert(`[JsonConfig] Cannot read instance object: ${e}`)}return null}renderDialogConfirm(){return this.state.confirmDialog?_.createElement(Cn,{title:K.t(`jc_Please confirm`),text:K.t(`jc_Some data are not stored. Discard?`),ok:K.t(`jc_Discard`),cancel:K.t(`jc_Cancel`),onClose:e=>this.setState({confirmDialog:!1},()=>e&&Rt.doNavigate(null))}):null}async scanForInclude(e,t){if(typeof e[`#include`]==`string`){let n=await this._getConfigFile(e[`#include`],[...t]);return delete e[`#include`],n&&(e={...e,...n}),e}let n=Object.keys(e);for(let r=0;r<n.length;r++)e[n[r]]&&typeof e[n[r]]==`object`&&(e[n[r]]=await this.scanForInclude(e[n[r]],t));return e}async getConfigFile(e){return this._getConfigFile(e)}async _getConfigFile(e,t){if(e||=`jsonConfig.json5`,t||=[],t.includes(e))return window.alert(`[JsonConfig] Circular reference in file: ${e} => ${t.join(` => `)}`),null;t.push(e);try{await this.props.socket.fileExists(`${this.props.adapterName}.admin`,e)||(e=`jsonConfig.json`);let n=await this.props.socket.readFile(`${this.props.adapterName}.admin`,e),r=``,i=``;if(n.file!==void 0&&(i=n.file),typeof i==`string`)r=i;else if(i.type===`Buffer`){let e=``,t=new Uint8Array(i.data),n=t.byteLength;for(let r=0;r<n;r++)e+=String.fromCharCode(t[r]);r=e}this.fileSubscribed.includes(e)||(this.fileSubscribed.push(e),await this.props.socket.subscribeFiles(`${this.props.adapterName}.admin`,e,this.onFileChange));try{return await this.scanForInclude(Ts.default.parse(r),t)}catch(e){window.alert(`[JsonConfig] Cannot parse json5 config!`),console.log(e)}}catch(t){this.state.schema||window.alert(`[JsonConfig] Cannot read file "${e}: ${t}`)}return null}renderSaveConfigDialog(){return this.state.saveConfigDialog?_.createElement(Cn,{title:K.t(`jc_Please confirm`),text:K.t(`jc_Save configuration?`),ok:K.t(`jc_Save`),cancel:K.t(`jc_Cancel`),onClose:e=>this.setState({saveConfigDialog:!1},()=>e&&this.onSave(!0))}):null}findAttr(e,t){if(t||=this.state.schema,t!=null&&t.items){if(e in t.items)return t.items[e];for(let n of Object.values(t.items)){let t=this.findAttr(e,n);if(t)return t}}return null}postProcessing(e,t,n){if(n||=this.state.schema,!e){console.error(`Data is empty in postProcessing: ${t}, ${JSON.stringify(n)}`);return}let r=e[t];if(n.items)if(n.type===`table`){let e=r;if(!Array.isArray(e))return;for(let t of e)if(n.items)for(let e of n.items)e.attr&&this.postProcessing(t,e.attr,e)}else for(let[t,r]of Object.entries(n.items)){if(r.type===`panel`||r.type===`tabs`||r.type===`accordion`)return;this.postProcessing(e,t,r)}else if(t&&typeof r==`string`)if(n.type===`text`)n.trim!==!1&&(e[t]=r.trim());else if(n.type===`ip`)e[t]=r.trim();else if(n.type===`number`){let i=parseFloat(r.toString().replace(`,`,`.`));e[t]=n.min!==void 0&&i<n.min?n.min:n.max!==void 0&&i>n.max?n.max:i}else if(n.type===`port`){let i=parseInt(r.toString(),10);n.min!==void 0&&i<n.min?e[t]=n.min:n.max!==void 0&&i>n.max&&(e[t]=n.max),e[t]=e[t]!==0&&i<20?20:i>65535?65535:i}else n.type===`checkbox`&&(e[t]=e[t]===!0||e[t]===`true`||e[t]===`on`||e[t]===1||e[t]===`1`)}async onSave(e,t){if(e){let e=await this.getInstanceObject();if(!e){console.error(`Something went wrong: may be no connection?`),window.alert(`Something went wrong: may be no connection?`);return}if(!this.state.data||!this.state.schema)return;let n={};for(let t of Object.keys(this.state.data)){let r=this.findAttr(t);(!r||!r.doNotSave||r.type===`state`)&&!t.startsWith(`_`)?X.setValue(e.native,t,this.state.data[t]):(X.setValue(e.native,t,null),n[t]=this.state.data[t])}try{let t=JSON.parse(JSON.stringify(e));if(Array.isArray(t.encryptedNative)){await kk(`../../lib/js/crypto-js/crypto-js.js`,`crypto-js`);for(let e of t.encryptedNative)t.native[e]&&(t.native[e]=Ok(this.secret,t.native[e]))}await this.props.socket.setObject(t._id,t)}catch(e){window.alert(`[JsonConfig] Cannot set object: ${e}`)}let r={...e.native,...n};console.log(r),this.setState({changed:!1,data:r,updateData:this.state.updateData+1,originalData:r},()=>t&&Rt.doNavigate(null))}else this.state.changed?this.setState({confirmDialog:!0}):Rt.doNavigate(null)}componentDidUpdate(e,t){t.changed!==this.state.changed&&this.props.configStored(!this.state.changed)}async componentDidMount(){let e=`${window.location.protocol}//${window.location.host}${window.location.pathname}validate_config/${this.props.adapterName}`;console.log(`fetch ${e}`),await fetch(e)}render(){return!this.state.data||!this.state.schema?_.createElement(I,null):_.createElement(`div`,{style:wk.root},this.renderDialogConfirm(),this.getExportImportButtons(),this.renderSaveConfigDialog(),_.createElement(Ck,{key:this.state.hash,style:wk.scroll,socket:this.props.socket,themeName:this.props.themeName,themeType:this.props.themeType,adapterName:this.props.adapterName,instance:this.props.instance,isFloatComma:this.props.isFloatComma,dateFormat:this.props.dateFormat,schema:this.state.schema,common:this.state.common,expertMode:this.props.expertMode,data:this.state.data,updateData:this.state.updateData,onError:e=>this.setState({error:e}),onChange:(e,t,n)=>{n&&this.state.error&&(window.alert(K.t(`jc_Cannot save configuration because of error in configuration`)),n=!1),n&&!this.state.changed&&!t&&(n=!1),e?this.setState({data:e,changed:!!t,saveConfigDialog:n}):n!==void 0&&this.setState({saveConfigDialog:n})},DeviceManager:this.props.DeviceManager,theme:this.state.theme,customComponents:this.props.customComponents,imagePrefix:`.`}),_.createElement(Gt,{isIFrame:!1,dense:!0,paddingLeft:0,newReact:!0,theme:this.state.theme,noTextOnButtons:this.props.width===`xs`||this.props.width===`sm`||this.props.width===`md`,changed:!!(this.state.error||this.state.changed),error:!!this.state.error,onSave:e=>this.onSave(!0,e),onClose:()=>this.onSave(!1)}))}},jk=t({ConfigGeneric:()=>X,ConfigPanel:()=>yk,GUI_API_GENERATION:()=>2,JsonConfig:()=>Ak,JsonConfigComponent:()=>Ck,checkGuiApiCompatibility:()=>yc}),Mk=t({ConfigGeneric:()=>zk,ConfigPanel:()=>Rk,GUI_API_GENERATION:()=>Pk,JsonConfig:()=>Ik,JsonConfigComponent:()=>Lk,checkGuiApiCompatibility:()=>Fk,default:()=>Bk}),Nk=jk,Pk=Nk.GUI_API_GENERATION,Fk=Nk.checkGuiApiCompatibility,Ik=Nk.JsonConfig,Lk=Nk.JsonConfigComponent,Rk=Nk.ConfigPanel,zk=Nk.ConfigGeneric,Bk=Reflect.get(jk,`default`)??jk,Vk=`__mf_module_cache__`;globalThis[Vk]||={share:{},remote:{}},globalThis[Vk].share||={},globalThis[Vk].remote||={};var Hk=globalThis[Vk];for(let e of Object.keys(Hk.share))if(e.startsWith(`default:`)){let t=e.slice(8);Hk.share[t]===void 0&&(Hk.share[t]=Hk.share[e])}else if(!e.includes(`:`)){let t=`default:`+e;Hk.share[t]===void 0&&(Hk.share[t]=Hk.share[e])}var Uk=(e,t)=>{let n=e[t.canonical];if(n!==void 0)return n;let r=t.aliases||[];for(let n of r){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let r=e[n];if(r!==void 0)return e[t.canonical]=r,r}},Wk=Symbol.for(`module-federation.shared-cache-listeners`),Gk=e=>{let t=e[Wk];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,Wk,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},Kk=(e,t,n)=>{let r=Gk(e);(r[t.canonical]||=new Set).add(n)},qk=Symbol.for(`module-federation.shared-cache-owners`),Jk=e=>{let t=e[qk];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,qk,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},Yk=(e,t,n,r)=>{var i;e[t.canonical]=n;let a=t.aliases||[];for(let t of a)Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0});let o=e[qk];r===void 0?o&&delete o[t.canonical]:Jk(e)[t.canonical]=r;let s=(i=e[Wk])==null?void 0:i[t.canonical];if(s)for(let e of s)e(n);return n},Xk=e=>{let t=(()=>{let t=e;for(let e=0;e<5;e++){let e=t==null?void 0:t.default;if(!e||typeof e!=`object`)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})();return t&&Object.getPrototypeOf(t)===null?Object.assign({},t):t},Zk=Uk(Hk.share,{canonical:`default:@iobroker/json-config`,aliases:[`@iobroker/json-config`]});Zk===void 0&&(Zk=Xk(Mk),Yk(Hk.share,{canonical:`default:@iobroker/json-config`,aliases:[`@iobroker/json-config`]},Zk,`ConfigCustomJavascriptSet`));var Qk,$k=e=>{e.GUI_API_GENERATION,e.checkGuiApiCompatibility,e.JsonConfig,e.JsonConfigComponent,e.ConfigPanel,Qk=e.ConfigGeneric,(()=>{let t=e;for(let e=0;e<5;e++){let e=t==null?void 0:t.default;if(!e||typeof e!=`object`)return e??t;t=e}return t})()};Kk(Hk.share,{canonical:`default:@iobroker/json-config`,aliases:[`@iobroker/json-config`]},$k),$k(Zk);export{ty as a,ps as c,Dx as i,Mk as n,vs as o,Tx as r,hs as s,Qk as t};
|
|
1494
|
+
`,e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:return this.flowScalar(this.type);case`block-scalar-header`:return{type:`block-scalar`,offset:this.offset,indent:this.indent,props:[this.sourceToken],source:``};case`flow-map-start`:case`flow-seq-start`:return{type:`flow-collection`,offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case`seq-item-ind`:return{type:`block-seq`,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case`explicit-key-ind`:{this.onKeyLine=!0;let t=gO(hO(e));return t.push(this.sourceToken),{type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case`map-value-ind`:{this.onKeyLine=!0;let t=gO(hO(e));return{type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!==`comment`||this.indent<=t?!1:e.every(e=>e.type===`newline`||e.type===`space`)}*documentEnd(e){this.type!==`doc-mode`&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type===`newline`&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case`comma`:case`doc-start`:case`doc-end`:case`flow-seq-end`:case`flow-map-end`:case`map-value-ind`:yield*this.pop(),yield*this.step();break;case`newline`:this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type===`newline`&&(yield*this.pop())}}};function bO(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new dO||null,prettyErrors:t}}function xO(e,t={}){let{lineCounter:n,prettyErrors:r}=bO(t),i=new yO(n==null?void 0:n.addNewLine),a=new ZD(t),o=null;for(let t of a.compose(i.parse(e),!0,e.length))if(!o)o=t;else if(o.options.logLevel!==`silent`){o.errors.push(new pD(t.range.slice(0,2),`MULTIPLE_DOCS`,`Source contains multiple documents; please use YAML.parseAllDocuments()`));break}return r&&n&&(o.errors.forEach(hD(e,n)),o.warnings.forEach(hD(e,n))),o}function SO(e,t,n){let r;typeof t==`function`?r=t:n===void 0&&t&&typeof t==`object`&&(n=t);let i=xO(e,n);if(!i)return null;if(i.warnings.forEach(e=>GT(i.options.logLevel,e)),i.errors.length>0){if(i.options.logLevel!==`silent`)throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:r},n))}g();var CO={fullWidth:{width:`100%`},flex:{display:`flex`},button:{height:48,minWidth:48},wrapper:{width:`calc(100vw - 40px)`,height:`calc(100vh - 188px)`}},wO=class extends X{async componentDidMount(){await super.componentDidMount();let{data:e,attr:t}=this.props,n=X.getValue(e,t)||``;this.setState({value:n,initialized:!0,yamlError:this.validateYaml(n)})}validateYaml(e){let t=!1;if(this.props.schema.validateYaml!==!1&&typeof e==`string`&&(e||!this.props.schema.allowEmpty))try{SO(e)}catch(e){console.log(`Error in YAML`,e),t=!0}return t}renderItem(e,t){if(!this.state.initialized)return null;let{schema:n,data:r,attr:i}=this.props,{value:a,showSelectId:o}=this.state,s=n.readOnly===!0||t;return _.createElement(Wt,{fullWidth:!0,variant:`standard`},_.createElement(`div`,{style:CO.flex},_.createElement(xt,{color:`grey`,style:CO.button,size:`small`,variant:`outlined`,onClick:()=>this.setState({showSelectId:!0})},J.t(`jc_YAML editor`))),o?_.createElement(rS,{title:this.getText(n.label),overflowHidden:!0,applyDisabled:this.state.yamlError&&this.props.schema.doNotApplyWithError||s,onClose:()=>{s?this.setState({showSelectId:!1}):this.setState({showSelectId:!1,value:X.getValue(r,i)||``})},onApply:s?void 0:()=>this.setState({showSelectId:!1},()=>i&&this.onChange(i,a))},_.createElement(`div`,{style:{...CO.wrapper,border:this.state.yamlError?`2px solid red`:`2px solid transparent`}},_.createElement(wC,{mode:`yaml`,value:typeof a==`object`?JSON.stringify(a):a,onChange:s?void 0:e=>this.setState({value:e,yamlError:this.validateYaml(e)}),name:`ConfigYamlEditor`,themeType:this.props.oContext.themeType}))):null,n.help||this.state.yamlError?_.createElement(_n,null,this.state.yamlError?J.t(`jc_Invalid YAML`):this.renderHelp(this.props.schema.help,this.props.schema.helpLink,this.props.schema.noTranslation)):null)}};g();var TO=class extends X{async componentDidMount(){await super.componentDidMount();let e=await i(()=>import(`./lib-BlUjuGH7.js`),__vite__mapDeps([0]),import.meta.url);this.setState({QRCode:e.default})}renderItem(){let e=this.state.QRCode;if(!e)return null;let t=Math.max(32,Math.round((this.props.schema.size||256)*.15));return _.createElement(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,backgroundColor:this.props.schema.bgColor||`white`,padding:t,width:`100%`,height:`100%`,boxSizing:`border-box`}},_.createElement(e,{title:this.getText(this.props.schema.tooltip),value:this.props.schema.data,size:this.props.schema.size,fgColor:this.props.schema.fgColor,bgColor:this.props.schema.bgColor,level:this.props.schema.level}))}};g();var EO=class extends X{constructor(...e){super(...e),K(this,`initialized`,!1),K(this,`localContext`,void 0)}async componentDidMount(){await super.componentDidMount();let e=await i(()=>import(`./lib-BlUjuGH7.js`),__vite__mapDeps([0]),import.meta.url);this.setState({QRCode:e.default}),this.props.schema.sendFirstByClick||await this.askInstance()}async askInstance(){if(this.props.alive){let e=this.props.schema.data;if(e===void 0&&this.props.schema.jsonData){let t=await this.getPatternAsync(this.props.schema.jsonData,null,!0);if(t)try{e=JSON.parse(t)}catch{console.error(`Cannot parse json data: ${JSON.stringify(e)}`)}}e??=null;let t=await this.getPatternAsync(this.props.schema.instance||`${this.props.oContext.adapterName}.${this.props.oContext.instance}`);if(t!==`${this.props.oContext.adapterName}.${this.props.oContext.instance}`){let e=await this.props.oContext.socket.getState(`system.adapter.${t}.alive`);if(!(e!=null&&e.val)){window.alert(J.t(`jc_Instance %s is not alive`,t));return}}this.setState({loading:!0},()=>this.props.oContext.socket.sendTo(t,this.props.schema.command||`send`,e).then(e=>this.setState({qrData:e||``,loading:!1})))}}getContext(){let e={};return Array.isArray(this.props.schema.alsoDependsOn)&&this.props.schema.alsoDependsOn.forEach(t=>e[t]=X.getValue(this.props.data,t)),JSON.stringify(e)}renderItem(){if(this.props.alive){let e=this.getContext();(e!==this.localContext||!this.initialized)&&(this.localContext=e,(!this.props.schema.sendFirstByClick||this.state.qrData!==void 0)&&setTimeout(()=>this.askInstance(),this.initialized?300:50),this.initialized=!0)}if(!this.state.qrData&&this.props.schema.sendFirstByClick)return this.props.alive?_.createElement(`div`,{style:{width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:this.state.loading?`default`:`pointer`},onClick:()=>!this.state.loading&&this.askInstance()},this.state.loading?_.createElement(Wn,null):typeof this.props.schema.sendFirstByClick==`boolean`?J.t(`jc_Click to show`):this.getText(this.props.schema.sendFirstByClick,this.props.schema.noTranslation)):_.createElement(`div`,{style:{width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:this.state.loading?`default`:`pointer`},onClick:()=>!this.state.loading&&this.askInstance()},J.t(`jc_Instance %s is not alive`,this.props.oContext.instance.toString()));let e=this.state.QRCode;if(!e||this.state.qrData===void 0)return null;let t=Math.max(32,Math.round((this.props.schema.size||256)*.15));return _.createElement(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,backgroundColor:this.props.schema.bgColor||`white`,padding:t,width:`100%`,height:`100%`,boxSizing:`border-box`}},_.createElement(e,{title:this.getText(this.props.schema.tooltip),value:this.state.qrData,size:this.props.schema.size,fgColor:this.props.schema.fgColor,bgColor:this.props.schema.bgColor,level:this.props.schema.level}))}};g();var DO={accordion:js,alive:Ns,autocomplete:Ps,autocompleteSendTo:Fs,certCollection:Vs,certificate:Rs,certificates:Bs,checkbox:nc,checkDocker:Hs,checkLicense:tc,chip:cc,chips:cc,color:lc,coordinates:dc,credential:$s,cron:Ls,custom:bc,datePicker:kx,deviceManager:Ax,divider:iw,file:Wx,fileSelector:Lx,func:Gx,header:ow,iframe:Kx,iframeSendTo:qx,image:Xx,imageSendTo:Yx,infoBox:Zx,instance:$x,interface:tS,ip:Jx,jsonEditor:EC,language:OC,license:kC,number:jC,oauth2:MC,objectId:PC,password:LC,pattern:RC,port:BC,qrCode:TO,qrCodeSendTo:EO,room:VC,select:UC,selectSendTo:GC,sendto:YC,sendTo:YC,setState:ZC,slider:$C,state:nw,staticImage:sw,staticInfo:dw,staticLink:mw,staticText:mw,table:xw,text:Cw,textSendTo:Tw,timePicker:Ew,topic:Ow,uuid:kw,user:jw,yamlEditor:wO},OO={fullWidth:{width:`100%`},paper:{margin:1,width:`auto !important`,overflowY:`auto`,paddingBottom:1},paperWithIcons:{height:`calc(100vh - 259px) !important`},paperWithoutIcons:{height:`calc(100vh - 235px) !important`},padding:{padding:`10px`},heading:{},primary:e=>({backgroundColor:e.palette.primary.main,color:e.palette.mode===`dark`?`inherit`:`#FFF`}),secondary:e=>({backgroundColor:e.palette.secondary.main})},kO=class e extends X{async componentDidMount(){var e;await super.componentDidMount(),(e=this.props.schema)!=null&&e.collapsable&&this.setState({expanded:(window._localStorage||window.localStorage).getItem(`${this.props.oContext.adapterName}.${this.props.attr}`)===`true`})}renderItems(t,n){return t?Object.keys(t).map(r=>{if(this.props.oContext.multiEdit&&t[r].noMultiEdit)return null;let i=t[r].type||`panel`,a,o=`Use this.props.oContext.socket!`;if(i===`custom`)t[r].url?a=bc:this.props.oContext.customs&&this.props.oContext.customs[t[r].component]?a=this.props.oContext.customs[t[r].component]:(console.error(`Cannot find custom component: ${t[r].component}`),a=X),o=this.props.oContext.socket;else if(i===`component`){var s;let e=t[r].subType;if(e&&(s=this.props.customComponents)!=null&&s[e])a=this.props.customComponents[e];else return _.createElement(`div`,{key:`${r}_${this.props.index??``}`},`Component ${e} not provided`)}else a=i===`panel`?e:DO[i]||X;return _.createElement(a,{socket:o,globalData:this.props.globalData,oContext:this.props.oContext,key:`${r}_${this.props.index??``}`,index:this.props.index,changed:this.props.changed,arrayIndex:this.props.arrayIndex,expertMode:this.props.expertMode,commandRunning:this.props.commandRunning,style:OO.panel,common:this.props.common,alive:this.props.alive,themeName:this.props.themeName,data:this.props.data,originalData:this.props.originalData,onError:this.props.onError,onHiddenChanged:this.props.onHiddenChanged,onFilterLabelUpdate:this.props.onFilterLabelUpdate,onChange:this.props.onChange,disabled:n,customObj:this.props.customObj,custom:this.props.custom,schema:t[r],attr:r,table:this.props.table,customComponents:this.props.customComponents})}):null}render(){let e=this.props.schema;if(!e||(this.updateCalculatedValues(),!this.state.calculatedValues))return null;let t=this.props.schema.items,n=this.props.schema.style||{};if(this.state.calculatedValues.hidden){if(e.hideOnlyControl){let t=_.createElement(Jt,{size:{xs:e.xs||void 0,sm:e.sm||void 0,md:e.md||void 0,lg:e.lg||void 0,xl:e.xl||void 0},sx:Zt.getStyle(this.props.oContext.theme,{marginBottom:0,textAlign:`left`},n,this.props.oContext.themeType===`dark`?e.darkStyle:void 0)});return e.newLine?_.createElement(_.Fragment,null,_.createElement(`div`,{style:{flexBasis:`100%`,height:0}}),t):t}return null}if(this.props.table)return this.renderItems(t,this.state.calculatedValues.disabled);if(this.props.custom)return _.createElement(Jt,{key:`${this.props.attr}_${this.props.index}`,container:!0,style:OO.fullWidth,columnSpacing:2,rowSpacing:1,sx:n},this.renderItems(t,this.state.calculatedValues.disabled));let r;if(e.collapsable)r=_.createElement(Ae,{key:`${this.props.attr}_${this.props.index}`,style:OO.fullWidth,expanded:!!this.state.expanded,onChange:()=>{(window._localStorage||window.localStorage).setItem(`${this.props.oContext.adapterName}.${this.props.attr}`,this.state.expanded?`false`:`true`),this.setState({expanded:!this.state.expanded})}},_.createElement(pn,{expandIcon:_.createElement(N,null),sx:Zt.getStyle(this.props.oContext.theme,n,this.props.oContext.themeType&&e.darkStyle,e.color===`primary`?OO.primary:e.color===`secondary`&&OO.secondary,{width:`100%`})},_.createElement(Pn,{style:OO.heading},this.getText(e.label))),_.createElement(xn,null,_.createElement(Jt,{container:!0,columnSpacing:2,rowSpacing:1,sx:{...n,width:`100%`,padding:`10px`}},this.renderItems(t,this.state.calculatedValues.disabled))));else{let e=Zt.getStyle(this.props.oContext.theme,this.props.style,n,{width:`100%`},this.props.isParentTab&&OO.paper,this.props.isParentTab&&(this.props.withoutSaveButtons?this.props.withIcons?{height:`calc(100% - 88px) !important`}:{height:`calc(100% - 64px) !important`}:this.props.withIcons?OO.paperWithIcons:OO.paperWithoutIcons));r=_.createElement(vt,{component:`div`,key:`${this.props.attr}_${this.props.index}`,className:this.props.className,sx:e},_.createElement(Jt,{container:!0,columnSpacing:2,rowSpacing:1,sx:Zt.getStyle(this.props.oContext.theme,{width:`100%`},this.props.isParentTab&&OO.padding,this.props.schema.innerStyle)},this.renderItems(t,this.state.calculatedValues.disabled)))}if(!this.props.isParentTab){let t=_.createElement(Jt,{title:this.getText(e.tooltip),size:{xs:e.xs||void 0,sm:e.sm||void 0,md:e.md||void 0,lg:e.lg||void 0,xl:e.xl||void 0},sx:{marginBottom:0,textAlign:`left`,...n}},r);return e.newLine?_.createElement(_.Fragment,null,_.createElement(`div`,{style:{flexBasis:`100%`,height:0}}),t):t}return r}};g();var AO={tabs:{height:`100%`,width:`100%`},panel:{width:`100%`,display:`block`},panelWithIcons:{height:`calc(100% - 72px)`},panelWithoutIcons:{height:`calc(100% - 48px)`}},jO=class e extends X{constructor(t){super(t),K(this,`resizeObserver`,null),K(this,`resizeRaf`,null),K(this,`calculateTimeoutTable`,null),K(this,`pinTimeout`,null),K(this,`refDiv`,void 0),K(this,`onTabError`,(e,t)=>{let n=this.state.tab;if(!n&&e){this.props.onError(e,t);return}let r={...this.state.tabErrors};n&&(r[n]||={}),n&&e&&(t?r[n][e]=t:(delete r[n][e],Object.keys(r[n]).length===0&&delete r[n])),this.setState({tabErrors:r}),this.props.onError(e,t)}),K(this,`hasTabErrors`,e=>!!this.state.tabErrors[e]&&Object.keys(this.state.tabErrors[e]).length>0),K(this,`measureWidth`,()=>{var t;let n=(t=this.refDiv.current)==null?void 0:t.clientWidth;if(!n)return;let r=this.state.useMenu;!r&&n<e.MENU_WIDTH?r=!0:r&&n>e.MENU_WIDTH+e.MENU_HYSTERESIS&&(r=!1),r!==this.state.useMenu&&this.setState({useMenu:r})}),K(this,`onHashTabsChanged`,()=>{let e=(window.location.hash||``).replace(/^#/,``).split(`/`);if(e.length>3&&e[1]===`config`){let t=e[3],n=parseInt(t,10),r;n.toString()===t?n>=0&&n<Object.keys(this.props.schema.items).length&&(r=Object.keys(this.props.schema.items)[n]):Object.keys(this.props.schema.items).includes(t)&&(r=t),r!==void 0&&r!==this.state.tab&&((window._localStorage||window.localStorage).setItem(`${this.props.dialogName||`App`}.${this.props.oContext.adapterName}`,r),this.pinWidthForTransition(),this.setState({tab:r}))}});let n;if(this.props.root){let e=(window.location.hash||``).replace(/^#/,``).split(`/`);if(e.length>=3&&e[1]===`config`){let t=e[3],r=parseInt(t,10);t&&r.toString()===t?r>=0&&r<Object.keys(this.props.schema.items).length&&(n=Object.keys(this.props.schema.items)[r]):t&&Object.keys(this.props.schema.items).includes(t)&&(n=t),window.addEventListener(`hashchange`,this.onHashTabsChanged,!1)}}n===void 0&&(n=(window._localStorage||window.localStorage).getItem(`${this.props.dialogName||`App`}.${this.props.oContext.adapterName}`)||Object.keys(this.props.schema.items)[0],Object.keys(this.props.schema.items).includes(n)||(n=Object.keys(this.props.schema.items)[0])),this.refDiv=_.createRef(),Object.assign(this.state,{tab:n,useMenu:!1,openMenu:null,tabErrors:{}})}async componentDidMount(){await super.componentDidMount(),this.measureWidth(),this.refDiv.current&&typeof ResizeObserver<`u`&&(this.resizeObserver=new ResizeObserver(()=>{this.resizeRaf===null&&(this.resizeRaf=window.requestAnimationFrame(()=>{this.resizeRaf=null,this.measureWidth()}))}),this.resizeObserver.observe(this.refDiv.current))}componentWillUnmount(){this.resizeRaf!==null&&(window.cancelAnimationFrame(this.resizeRaf),this.resizeRaf=null),this.resizeObserver&&=(this.resizeObserver.disconnect(),null),this.calculateTimeoutTable&&=(clearTimeout(this.calculateTimeoutTable),null),this.pinTimeout&&=(clearTimeout(this.pinTimeout),null),window.removeEventListener(`hashchange`,this.onHashTabsChanged,!1),super.componentWillUnmount()}pinWidthForTransition(){var e;let t=(e=this.refDiv.current)==null?void 0:e.clientWidth;t&&(this.pinTimeout&&clearTimeout(this.pinTimeout),this.state.contentMinWidth!==t&&this.setState({contentMinWidth:t}),this.pinTimeout=setTimeout(()=>{this.pinTimeout=null,this.setState({contentMinWidth:void 0})},500))}onMenuChange(e){(window._localStorage||window.localStorage).setItem(`${this.props.dialogName||`App`}.${this.props.oContext.adapterName}`,e),this.pinWidthForTransition(),this.setState({tab:e},()=>{if(this.props.root){let e=(window.location.hash||``).split(`/`);e.length>=3&&e[1]===`config`&&(e[3]=this.state.tab||``,window.location.hash=e.join(`/`))}})}updateCalculatedValuesForTable(){this.calculateTimeoutTable&&clearTimeout(this.calculateTimeoutTable),this.calculateTimeoutTable=setTimeout(async()=>{this.calculateTimeoutTable=null;let e=this.props.schema.items,t={};for(let n in e){let r;if(e[n].expertMode&&!this.props.expertMode){t[n]={hidden:!0,disabled:!1};continue}if(this.props.custom){let i=!!await this.executeCustom(e[n].hidden,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.index,this.props.globalData);if(i){t[n]={hidden:!0,disabled:!1};continue}r=!!await this.executeCustom(e[n].disabled,this.props.data,this.props.customObj,this.props.oContext.instanceObj,this.props.index,this.props.globalData),t[n]={hidden:i,disabled:r}}else{if(await this.execute(e[n].hidden,!1,this.props.data,this.props.index,this.props.globalData)){t[n]={hidden:!0,disabled:!1};continue}r=!!await this.execute(e[n].disabled,!1,this.props.data,this.props.index,this.props.globalData),t[n]={hidden:!1,disabled:r}}}JSON.stringify(t)!==JSON.stringify(this.state.calculatedValuesTable)&&this.setState({calculatedValuesTable:t})},50)}render(){let e=this.props.schema.items,t=!1;if(this.updateCalculatedValuesForTable(),!this.state.calculatedValuesTable)return null;let n=[];Object.keys(e).filter(e=>{var t;return!((t=this.state.calculatedValuesTable)!=null&&(t=t[e])!=null&&t.hidden)}).map(r=>{var i;let a=this.getIcon(e[r].icon);t||=!!a,n.push({icon:a,disabled:!!((i=this.state.calculatedValuesTable)!=null&&(i=i[r])!=null&&i.disabled),label:this.getText(e[r].label),name:r})}),n.find(e=>e.name===this.state.tab)||setTimeout(()=>this.setState({tab:n[0].name}),50);let r;return r=this.state.useMenu&&n.length>2?_.createElement(ue,{style:{top:2,backgroundColor:this.props.oContext.themeType===`dark`?`#222`:`#DDD`},variant:`dense`},_.createElement(Zn,{onClick:e=>this.setState({openMenu:e.currentTarget})},_.createElement(Hn,null)),this.state.openMenu?_.createElement(ae,{open:!0,anchorEl:this.state.openMenu,onClose:()=>this.setState({openMenu:null})},n.map(e=>{let n=this.hasTabErrors(e.name);return _.createElement(z,{disabled:e.disabled,key:e.name,onClick:()=>{this.setState({openMenu:null},()=>this.onMenuChange(e.name))},selected:e.name===this.state.tab,sx:n?{color:`error.main`}:void 0},t?_.createElement(L,null,e.icon):null,_.createElement(vt,{sx:{display:`flex`,alignItems:`center`,gap:.5,width:`100%`}},e.label,n&&_.createElement(ur,{sx:{fontSize:16,color:`error.main`}})))})):null):_.createElement(W,{variant:`scrollable`,scrollButtons:`auto`,style:this.props.schema.tabsStyle,value:this.state.tab,onChange:(e,t)=>this.onMenuChange(t)},n.map(e=>{let t=this.hasTabErrors(e.name),n=t?_.createElement(vt,{sx:{display:`flex`,alignItems:`center`,gap:.5}},e.label,_.createElement(ur,{sx:{fontSize:16,color:`error.main`}})):e.label;return _.createElement(He,{id:e.name,wrapped:!0,disabled:e.disabled,key:e.name,value:e.name,iconPosition:this.props.schema.iconPosition||`start`,icon:e.icon||void 0,label:n,sx:t?{"& .MuiTab-wrapper":{color:`error.main`}}:void 0})})),this.state.tab?_.createElement(`div`,{style:this.state.contentMinWidth===void 0?AO.tabs:{...AO.tabs,minWidth:this.state.contentMinWidth},ref:this.refDiv},r,_.createElement(kO,{oContext:this.props.oContext,withoutSaveButtons:this.props.withoutSaveButtons,isParentTab:!0,changed:this.props.changed,key:this.state.tab,expertMode:this.props.expertMode,index:1001,arrayIndex:this.props.arrayIndex,globalData:this.props.globalData,commandRunning:this.props.commandRunning,style:{...AO.panel,...t?AO.panelWithIcons:AO.panelWithoutIcons},common:this.props.common,alive:this.props.alive,themeName:this.props.themeName,data:this.props.data,originalData:this.props.originalData,onChange:this.props.onChange,onError:this.onTabError,customObj:this.props.customObj,custom:this.props.custom,schema:e[this.state.tab],table:this.props.table,withIcons:t,customComponents:this.props.customComponents})):null}};K(jO,`MENU_WIDTH`,600),K(jO,`MENU_HYSTERESIS`,40),g(),J.extendTranslations({en:{"jc_A credential with this name already exists":`A credential with this name already exists`,"jc_A unique name is required":`A unique name is required`,"jc_Accept license":`Accept license`,jc_Actions:`Actions`,"jc_Add credential":`Add credential`,"jc_Add row":`Add row`,"jc_All items are filtered out":`All items are filtered out`,jc_Append:`Append`,"jc_Append %s entries or replace existing?":`Append %s entries or replace existing?`,"jc_Append or replace?":`Append or replace?`,"jc_Are you sure?":`Are you sure?`,jc_Cancel:`Cancel`,"jc_Cannot add items with set filter":`Cannot add items with set filter`,"jc_Cannot create credential: %s":`Cannot create credential: %s`,"jc_Cannot decode license":`Cannot decode license`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`Cannot determine position: System settings are empty and GPS detection is disabled in browser`,'jc_Cannot display the custom component "%s"':`Cannot display the custom component "%s"`,"jc_Cannot read licenses: %s":`Cannot read licenses: %s`,"jc_Cannot retrieve options, as instance is offline":`Cannot retrieve options, as instance is offline`,"jc_Cannot save configuration because of error in configuration":`Cannot save configuration because of error in configuration`,"jc_Cannot upload":`Cannot upload`,"jc_Chained certificate":`Chained certificate`,jc_Checked:`Checked`,"jc_Click to see in full size":`Click to see in full size`,"jc_Click to show":`Click to show`,"jc_Clone current row":`Clone current row`,jc_Close:`Close`,jc_Commercial:`Commercial`,jc_Copied:`Copied`,"jc_Copied %s":`Copied "%s"`,"jc_Copy content":`Copy content`,jc_Create:`Create`,"jc_Credential type":`Credential type`,'jc_Custom component "%s" was not started':`Custom component "%s" was not started`,"jc_Define schedule":`Define schedule`,jc_Delete:`Delete`,"jc_Delete current row":`Delete current row`,"jc_Disable/Enable translation":`Disable/Enable translation`,jc_Discard:`Discard`,"jc_Do not use let's encrypt":`Do not use let's encrypt`,"jc_Docker is not available":`Docker is not available`,"jc_Docker is not installed or not running":`Docker is not installed or not running`,"jc_Drop file here":`Drop file here`,"jc_Enter the code from that page here":`Enter the code from that page here`,jc_Error:`Error`,"jc_Expand/Collapse card":`Expand/Collapse card`,"jc_Export configuration section":`Export configuration section`,"jc_Export data to %s file":`Export data to %s file`,"jc_Export setting to JSON file":`Export setting to JSON file`,"jc_Fallback custom certificates":`Fallback custom certificates`,"jc_File is too big. Max %sk allowed. Try use SVG.":`File is too big. Max %sk allowed. Try use SVG.`,"jc_File will be deleted":`File will be deleted`,"jc_Filter and Data Actions":`Filter and Data Actions`,"jc_Get %s access":`Get %s access`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`If the button above does not work, you can authorize manually this app by visiting this url`,"jc_Import and add configuration section":`Import and add configuration section`,"jc_Import and replace configuration section":`Import and replace configuration section`,"jc_Import data from %s file":`Import data from %s file`,"jc_Import from %s":`Import from %s`,"jc_Import settings from JSON file":`Import settings from JSON file`,"jc_Instance %s is alive":`Instance %s is alive`,"jc_Instance %s is not alive":`Instance %s is not alive`,"jc_Invalid JSON":`Invalid JSON`,"jc_Invalid JSON file.":`Invalid JSON file.`,"jc_Invalid JSON format. Expected an array.":`Invalid JSON format. Expected an array.`,"jc_Invalid YAML":`Invalid YAML`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.`,"jc_It was probably built for an older admin version. Please update the adapter.":`It was probably built for an older admin version. Please update the adapter.`,"jc_JSON editor":`JSON editor`,jc_Latitude:`Latitude`,"jc_License %s":`License %s`,"jc_License agreement":`License agreement`,"jc_License does not exist":`License does not exist`,"jc_License expired on %s":`License expired on %s`,'jc_License for other product "%s"':`License for other product "%s"`,"jc_License is for version %s, but required version is %s":`License is for version %s, but required version is %s`,"jc_License must be converted":`License must be converted to newer version. You can do it in your iobroker.net profile.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`License not found in the license manager. Do you want to update licenses from iobroker.net?`,"jc_Listen on all IPs":`Listen on all IPs`,jc_Longitude:`Longitude`,"jc_Move down":`Move down`,"jc_Move up":`Move up`,jc_Name:`Name`,"jc_No one license found in license manager":`No one license found in license manager`,"jc_No response from admin":`No response from admin`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Non-allowed duplicate entry "%s" in column "%s"`,"jc_OAuth Client ID":`OAuth Client ID`,"jc_OAuth Client secret":`OAuth Client secret`,jc_Ok:`Ok`,"jc_Passwords are not equal!":`Passwords are not equal!`,"jc_Place your files here or click here to open the browse dialog":`Place your files here or click here to open the browse dialog`,"jc_Please allow popups in your browser for this page!":`Please allow popups in your browser for this page!`,"jc_Please confirm":`Please confirm`,"jc_Please create license":`Please create license`,"jc_Please enter the license":`Please enter the license`,"jc_Please fill in all required fields":`Please fill in all required fields`,"jc_Port could be used by %s":`Port could be used by %s`,"jc_Port is already used by %s":`Port is already used by %s`,"jc_Press ENTER Key to add new item":`Press ENTER Key to add new item`,"jc_Private certificate":`Private certificate`,jc_Product:`Product`,"jc_Public certificate":`Public certificate`,"jc_Renew %s access":`Renew %s access`,jc_Replace:`Replace`,"jc_Request data by instance":`Request data by instance`,"jc_Request timed out":`Request timed out`,jc_Result:`Result`,jc_Save:`Save`,"jc_Save configuration?":`Save configuration?`,"jc_Serial number (UUID)":`Serial number (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`Serial number (UUID) "%s" in license is for other device.`,"jc_Show/hide filter input":`Show/hide filter input`,"jc_Some data are not stored. Discard?":`Some data are not stored. Discard?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Successfully authorized. Token valid till %s and will be automatically renewed.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Successfully authorized. Token valid till %s but it can expire as the instance is not running.`,"jc_Suitable license not found in license manager":`Suitable license not found in license manager`,"jc_System language":`System language`,"jc_Take browser position":`Take position from browser`,"jc_Take position from system settings":`Take position from system settings`,jc_Template:`Template`,"jc_Use all available let's encrypt certificates":`Use all available let's encrypt certificates`,"jc_Use system settings for position":`Use system settings for position`,"jc_Used system settings":`Used system settings`,jc_ValidTill:`Valid till`,jc_Version:`Version`,"jc_YAML editor":`YAML editor`,jc_Yes:`Yes`,"jc_You can filter entries by entering here some text":`You can filter entries by entering here some text`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Failed to open JSON File`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Failed to parse JSON file`,jc___different__:`different`,jc_false:`FALSE`,jc_locally:`locally`,jc_none:`none`,jc_repeat:`repeat`,jc_true:`TRUE`,"jc_via internet":`via internet`,sch_all:`all`},de:{"jc_A credential with this name already exists":`Es existiert bereits eine Berechtigung mit diesem Namen.`,"jc_A unique name is required":`Ein eindeutiger Name ist erforderlich.`,"jc_Accept license":`Lizenz akzeptieren`,jc_Actions:`Aktionen`,"jc_Add credential":`Anmeldeinformationen hinzufügen`,"jc_Add row":`Zeile hinzufügen`,"jc_All items are filtered out":`Alle Elemente sind herausgefiltert`,jc_Append:`Anhängen`,"jc_Append %s entries or replace existing?":`%s Einträge anhängen oder vorhandene ersetzen?`,"jc_Append or replace?":`Anhängen oder ersetzen?`,"jc_Are you sure?":`Bist du sicher?`,jc_Cancel:`Abbrechen`,"jc_Cannot add items with set filter":`Elemente mit festgelegtem Filter können nicht hinzugefügt werden`,"jc_Cannot create credential: %s":`Anmeldeinformationen konnten nicht erstellt werden: %s`,"jc_Cannot decode license":`Lizenz kann nicht entschlüsselt werden`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`Position kann nicht bestimmt werden: Die Systemeinstellungen sind leer und die GPS-Erkennung ist im Browser deaktiviert`,'jc_Cannot display the custom component "%s"':`Die benutzerdefinierte Komponente "%s" kann nicht angezeigt werden`,"jc_Cannot read licenses: %s":`Lizenzen können nicht gelesen werden: %s`,"jc_Cannot retrieve options, as instance is offline":`Optionen können nicht abgerufen werden, da die Instanz offline ist`,"jc_Cannot save configuration because of error in configuration":`Die Konfiguration konnte aufgrund eines Fehlers nicht gespeichert werden.`,"jc_Cannot upload":`Kann nicht hochladen`,"jc_Chained certificate":`Chained Zertifikat`,jc_Checked:`Geprüft`,"jc_Click to see in full size":`Klicken Sie hier, um die Vollbildansicht zu öffnen.`,"jc_Click to show":`Zum Anzeigen klicken`,"jc_Clone current row":`Aktuelle Zeile klonen`,jc_Close:`Schließen`,jc_Commercial:`Kommerziell`,jc_Copied:`Kopiert`,"jc_Copied %s":`"%s" kopiert`,"jc_Copy content":`Inhalte kopieren`,jc_Create:`Erstellen`,"jc_Credential type":`Anmeldeinformationstyp`,'jc_Custom component "%s" was not started':`Die benutzerdefinierte Komponente "%s" wurde nicht gestartet`,"jc_Define schedule":`Zeitplan definieren`,jc_Delete:`Löschen`,"jc_Delete current row":`Aktuelle Zeile löschen`,"jc_Disable/Enable translation":`Übersetzung deaktivieren/aktivieren`,jc_Discard:`Verwerfen`,"jc_Do not use let's encrypt":`Let's encrypt nicht verwenden`,"jc_Docker is not available":`Docker ist nicht verfügbar`,"jc_Docker is not installed or not running":`Docker ist nicht installiert oder läuft nicht`,"jc_Drop file here":`Datei hier ablegen`,"jc_Enter the code from that page here":`Geben Sie den Code von dieser Seite hier ein`,jc_Error:`Fehler`,"jc_Expand/Collapse card":`Karte ein-/ausklappen`,"jc_Export configuration section":`Konfigurationsabschnitt exportieren`,"jc_Export data to %s file":`Daten in %s-Datei exportieren`,"jc_Export setting to JSON file":`Einstellungen in eine JSON-Datei exportieren`,"jc_Fallback custom certificates":`Benutzerdefinierte Fallback-Zertifikate`,"jc_File is too big. Max %sk allowed. Try use SVG.":`Datei ist zu groß. Max %sk erlaubt. Versuchen Sie, SVG zu verwenden.`,"jc_File will be deleted":`Die Datei wird gelöscht`,"jc_Filter and Data Actions":`Filter- und Datenaktionen`,"jc_Get %s access":`%s Zugriff erhalten`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`Wenn die Schaltfläche oben nicht funktioniert, können Sie diese App manuell autorisieren, indem Sie diese URL besuchen`,"jc_Import and add configuration section":`Konfigurationsabschnitt importieren und hinzufügen`,"jc_Import and replace configuration section":`Konfigurationsabschnitt importieren und ersetzen`,"jc_Import data from %s file":`Daten aus %s-Datei importieren`,"jc_Import from %s":`Von %s importieren`,"jc_Import settings from JSON file":`Einstellungen aus einer JSON-Datei importieren`,"jc_Instance %s is alive":`Instanz %s ist aktiv`,"jc_Instance %s is not alive":`Instanz %s ist nicht aktiv`,"jc_Invalid JSON":`Ungültiges JSON`,"jc_Invalid JSON file.":`Ungültige JSON-Datei.`,"jc_Invalid JSON format. Expected an array.":`Ungültiges JSON-Format. Array erwartet.`,"jc_Invalid YAML":`Ungültiges YAML`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`Sie benötigt GUI-API-Generation %s, dieser Admin stellt aber Generation %s bereit. Bitte den Admin aktualisieren.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`Sie wurde für GUI-API-Generation %s erstellt, dieser Admin stellt aber Generation %s bereit. Bitte den Adapter aktualisieren.`,"jc_It was probably built for an older admin version. Please update the adapter.":`Sie wurde vermutlich für eine ältere Admin-Version erstellt. Bitte den Adapter aktualisieren.`,"jc_JSON editor":`JSON-Editor`,jc_Latitude:`Breite`,"jc_License %s":`Lizenz %s`,"jc_License agreement":`Lizenzvereinbarung`,"jc_License does not exist":`Lizenz existiert nicht`,"jc_License expired on %s":`Lizenz am %s abgelaufen`,'jc_License for other product "%s"':`Lizenz für anderes Produkt „%s“`,"jc_License is for version %s, but required version is %s":`Die Lizenz gilt für Version %s, benötigt wird jedoch Version %s.`,"jc_License must be converted":`Die Lizenz muss auf eine neuere Version konvertiert werden. Sie können dies in Ihrem iobroker.net-Profil tun.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`Lizenz im Lizenzmanager nicht gefunden. Möchten Sie Lizenzen von iobroker.net aktualisieren?`,"jc_Listen on all IPs":`Zugriff von allen IPs zulassen`,jc_Longitude:`Längengrad`,"jc_Move down":`Nach unten`,"jc_Move up":`Nach oben`,jc_Name:`Name`,"jc_No one license found in license manager":`Im Lizenzmanager wurde keine Lizenz gefunden`,"jc_No response from admin":`Keine Antwort vom Administrator`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Nicht zulässiger doppelter Eintrag "%s" in Spalte "%s"`,"jc_OAuth Client ID":`OAuth-Client-ID`,"jc_OAuth Client secret":`OAuth-Client-Secret`,jc_Ok:`OK`,"jc_Passwords are not equal!":`Passwörter sind nicht gleich!`,"jc_Place your files here or click here to open the browse dialog":`Die Dateien hier platzieren oder hier klicken, um den Suchdialog zu öffnen`,"jc_Please allow popups in your browser for this page!":`Bitte lassen Sie Popups für diese Seite in Ihrem Browser zu!`,"jc_Please confirm":`Bitte bestätigen`,"jc_Please create license":`Bitte erstellen Sie eine Lizenz`,"jc_Please enter the license":`Bitte die Lizenz eingeben`,"jc_Please fill in all required fields":`Bitte füllen Sie alle Pflichtfelder aus.`,"jc_Port could be used by %s":`Port könnte von %s verwendet werden`,"jc_Port is already used by %s":`Port wird bereits von %s verwendet`,"jc_Press ENTER Key to add new item":`Die Eingabetaste drücken, um ein neues Element hinzuzufügen`,"jc_Private certificate":`Privates Zertifikat`,jc_Product:`Produkt`,"jc_Public certificate":`Öffentliches Zertifikat`,"jc_Renew %s access":`%s Zugriff erneuern`,jc_Replace:`Ersetzen`,"jc_Request data by instance":`Daten pro Instanz anfordern`,"jc_Request timed out":`Zeitüberschreitung der Anforderung`,jc_Result:`Ergebnis`,jc_Save:`Speichern`,"jc_Save configuration?":`Konfiguration speichern?`,"jc_Serial number (UUID)":`Seriennummer (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`Seriennummer (UUID) „%s“ in der Lizenz gilt für ein anderes Gerät.`,"jc_Show/hide filter input":`Filtereingabe ein-/ausblenden`,"jc_Some data are not stored. Discard?":`Einige Daten werden nicht gespeichert. Verwerfen?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Erfolgreich autorisiert. Token gültig bis %s und wird automatisch erneuert.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Erfolgreich autorisiert. Token gültig bis %s, kann aber ablaufen, da die Instanz nicht ausgeführt wird.`,"jc_Suitable license not found in license manager":`Passende Lizenz im Lizenzmanager nicht gefunden`,"jc_System language":`Systemsprache`,"jc_Take browser position":`Position vom Browser einnehmen`,"jc_Take position from system settings":`Position aus den Systemeinstellungen übernehmen`,jc_Template:`Vorlage`,"jc_Use all available let's encrypt certificates":`Alle verfügbaren Zertifikate von Let's encrypt benutzen`,"jc_Use system settings for position":`Systemeinstellungen für die Position verwenden`,"jc_Used system settings":`Systemeinstellungen`,jc_ValidTill:`Gültig bis`,jc_Version:`Ausführung`,"jc_YAML editor":`YAML-Editor`,jc_Yes:`Ja`,"jc_You can filter entries by entering here some text":`Sie können Einträge filtern, indem Sie hier Text eingeben`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Fehler beim Öffnen der JSON-Datei`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Fehler beim Parsen der JSON-Datei`,jc___different__:`unterschiedlich`,jc_false:`FALSCH`,jc_locally:`örtlich`,jc_none:`kein`,jc_repeat:`wiederholen`,jc_true:`WAHR`,"jc_via internet":`übers Internet`,sch_all:`alle`},ru:{"jc_A credential with this name already exists":`Учетные данные с таким именем уже существуют.`,"jc_A unique name is required":`Требуется уникальное имя.`,"jc_Accept license":`Принять лицензию`,jc_Actions:`Действия`,"jc_Add credential":`Добавить учетные данные`,"jc_Add row":`Добавить ряд`,"jc_All items are filtered out":`Все элементы отфильтрованы`,jc_Append:`Добавить`,"jc_Append %s entries or replace existing?":`Добавить записи %s или заменить существующие?`,"jc_Append or replace?":`Дополнить или заменить?`,"jc_Are you sure?":`Вы уверены?`,jc_Cancel:`Отмена`,"jc_Cannot add items with set filter":`Невозможно добавить элементы с установленным фильтром`,"jc_Cannot create credential: %s":`Не удалось создать учетные данные: %s`,"jc_Cannot decode license":`Не могу декодировать лицензию`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`Невозможно определить местоположение: системные настройки пусты, а обнаружение GPS отключено в браузере.`,'jc_Cannot display the custom component "%s"':`Не удается отобразить пользовательский компонент "%s"`,"jc_Cannot read licenses: %s":`Невозможно прочитать лицензии: %s`,"jc_Cannot retrieve options, as instance is offline":`Невозможно получить параметры, так как экземпляр находится в автономном режиме.`,"jc_Cannot save configuration because of error in configuration":`Невозможно сохранить конфигурацию из-за ошибки в конфигурации.`,"jc_Cannot upload":`Невозможно загрузить`,"jc_Chained certificate":`Chained сертификат`,jc_Checked:`Проверено`,"jc_Click to see in full size":`Нажмите, чтобы посмотреть в полном размере`,"jc_Click to show":`Нажмите, чтобы показать`,"jc_Clone current row":`Клонировать текущую строку`,jc_Close:`Закрыть`,jc_Commercial:`Коммерческая`,jc_Copied:`скопировано`,"jc_Copied %s":`Скопировано "%s"`,"jc_Copy content":`Копировать содержимое`,jc_Create:`Создать`,"jc_Credential type":`Тип учетных данных`,'jc_Custom component "%s" was not started':`Пользовательский компонент "%s" не был запущен.`,"jc_Define schedule":`Задать расписание`,jc_Delete:`Удалить`,"jc_Delete current row":`Удалить текущую строку`,"jc_Disable/Enable translation":`Включить/отключить перевод`,jc_Discard:`Отказаться`,"jc_Do not use let's encrypt":`Не использовать Let’s Encrypt`,"jc_Docker is not available":`Докер недоступен`,"jc_Docker is not installed or not running":`Docker не установлен или не запущен`,"jc_Drop file here":`Перетащите файл сюда`,"jc_Enter the code from that page here":`Введите код с этой страницы здесь`,jc_Error:`Ошибка`,"jc_Expand/Collapse card":`Развернуть/Свернуть карточку`,"jc_Export configuration section":`Раздел конфигурации экспорта`,"jc_Export data to %s file":`Экспорт данных в файл %s`,"jc_Export setting to JSON file":`Экспорт настроек в JSON-файл`,"jc_Fallback custom certificates":`Резервные пользовательские сертификаты`,"jc_File is too big. Max %sk allowed. Try use SVG.":`Файл слишком большой. Разрешено максимальное количество %sk. Попробуйте использовать SVG.`,"jc_File will be deleted":`Файл будет удалён`,"jc_Filter and Data Actions":`Фильтрация и действия с данными`,"jc_Get %s access":`Получить %s доступ`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`Если кнопка выше не работает, вы можете вручную авторизовать это приложение, перейдя по этой ссылке.`,"jc_Import and add configuration section":`Импорт и добавление раздела конфигурации`,"jc_Import and replace configuration section":`Импорт и замена раздела конфигурации`,"jc_Import data from %s file":`Импорт данных из файла %s`,"jc_Import from %s":`Импорт из %s`,"jc_Import settings from JSON file":`Импорт настроек из JSON-файла`,"jc_Instance %s is alive":`Экземпляр %s работает`,"jc_Instance %s is not alive":`Экземпляр %s не работает`,"jc_Invalid JSON":`Неверный JSON`,"jc_Invalid JSON file.":`Неверный файл JSON.`,"jc_Invalid JSON format. Expected an array.":`Недопустимый формат JSON. Ожидается массив.`,"jc_Invalid YAML":`Недопустимый YAML-файл`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`Для этого требуется генерация API графического интерфейса пользователя %s, но администратор предоставляет генерацию %s. Пожалуйста, обновите администратора.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`Он был создан для генерации API графического интерфейса пользователя %s, но этот администратор предоставляет генерацию %s. Пожалуйста, обновите адаптер.`,"jc_It was probably built for an older admin version. Please update the adapter.":`Вероятно, он был создан для более старой версии административной панели. Пожалуйста, обновите адаптер.`,"jc_JSON editor":`Редактор JSON`,jc_Latitude:`Широта`,"jc_License %s":`Лицензия %s`,"jc_License agreement":`Лицензионное соглашение`,"jc_License does not exist":`Лицензия не существует`,"jc_License expired on %s":`Срок действия лицензии истек %s`,'jc_License for other product "%s"':`Лицензия на другой продукт "%s"`,"jc_License is for version %s, but required version is %s":`Лицензия распространяется на версию %s, но требуемая версия — %s.`,"jc_License must be converted":`Лицензия должна быть преобразована в более новую версию. Вы можете сделать это в своем профиле на iobroker.net.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`Лицензия не найдена в диспетчере лицензий. Вы хотите обновить лицензии от iobroker.net?`,"jc_Listen on all IPs":`Слушать на всех IP`,jc_Longitude:`Долгота`,"jc_Move down":`Вниз`,"jc_Move up":`Вверх`,jc_Name:`Имя`,"jc_No one license found in license manager":`В менеджере лицензий не найдена ни одна лицензия`,"jc_No response from admin":`Нет ответа от администратора`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Недопустимая повторяющаяся запись "%s" в столбце "%s"`,"jc_OAuth Client ID":`Идентификатор клиента OAuth`,"jc_OAuth Client secret":`Секрет клиента OAuth`,jc_Ok:`Ok`,"jc_Passwords are not equal!":`Пароли не равны!`,"jc_Place your files here or click here to open the browse dialog":`Поместите свои файлы сюда или щелкните здесь, чтобы открыть диалоговое окно выбора`,"jc_Please allow popups in your browser for this page!":`Пожалуйста, разрешите всплывающие окна в вашем браузере для этой страницы!`,"jc_Please confirm":`Пожалуйста подтвердите`,"jc_Please create license":`Пожалуйста, создайте лицензию`,"jc_Please enter the license":`Пожалуйста, введите лицензию`,"jc_Please fill in all required fields":`Пожалуйста, заполните все обязательные поля.`,"jc_Port could be used by %s":`Порт может использоваться %s`,"jc_Port is already used by %s":`Порт уже используется %s`,"jc_Press ENTER Key to add new item":`Нажмите клавишу ENTER, чтобы добавить новый элемент.`,"jc_Private certificate":`Частный сертификат`,jc_Product:`Продукт`,"jc_Public certificate":`Публичный сертификат`,"jc_Renew %s access":`Продлить доступ %s`,jc_Replace:`Заменять`,"jc_Request data by instance":`Запрос данных по экземпляру`,"jc_Request timed out":`Истекло время запроса`,jc_Result:`Результат`,jc_Save:`Сохранить`,"jc_Save configuration?":`Сохранить конфигурацию?`,"jc_Serial number (UUID)":`Серийный номер (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`Серийный номер (UUID) «%s» в лицензии предназначен для другого устройства.`,"jc_Show/hide filter input":`Показать/скрыть ввод фильтра`,"jc_Some data are not stored. Discard?":`Некоторые данные не сохранились. Отказаться?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Авторизация выполнена успешно. Токен действителен до %s и будет автоматически продлен.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Авторизация выполнена успешно. Токен действителен до %s, но его срок действия может истечь, так как экземпляр не запущен.`,"jc_Suitable license not found in license manager":`Подходящая лицензия не найдена в менеджере лицензий`,"jc_System language":`Язык системы`,"jc_Take browser position":`Взять позицию из браузера`,"jc_Take position from system settings":`Занять позицию из системных настроек`,jc_Template:`Шаблон`,"jc_Use all available let's encrypt certificates":`Использовать все доступные сертификаты Let’s encrypt`,"jc_Use system settings for position":`Использовать системные настройки для позиции`,"jc_Used system settings":`Системные настройки`,jc_ValidTill:`Годен до`,jc_Version:`Версия`,"jc_YAML editor":`Редактор YAML`,jc_Yes:`Да`,"jc_You can filter entries by entering here some text":`Вы можете отфильтровать записи, введя здесь текст`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Не удалось открыть JSON-файл`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Не удалось разобрать JSON-файл`,jc___different__:`разное`,jc_false:`ЛОЖЬ`,jc_locally:`локально`,jc_none:`ничего`,jc_repeat:`повтор`,jc_true:`истинный`,"jc_via internet":`через интернет`,sch_all:`все`},pt:{"jc_A credential with this name already exists":`Já existe uma credencial com este nome.`,"jc_A unique name is required":`É necessário um nome único.`,"jc_Accept license":`Aceitar licença`,jc_Actions:`Ações`,"jc_Add credential":`Adicionar credencial`,"jc_Add row":`Adicionar linha`,"jc_All items are filtered out":`Todos os itens são filtrados`,jc_Append:`Acrescentar`,"jc_Append %s entries or replace existing?":`Acrescentar %s entradas ou substituir as existentes?`,"jc_Append or replace?":`Acrescentar ou substituir?`,"jc_Are you sure?":`Você tem certeza?`,jc_Cancel:`Cancelar`,"jc_Cannot add items with set filter":`Não é possível adicionar itens com filtro definido`,"jc_Cannot create credential: %s":`Não foi possível criar a credencial: %s`,"jc_Cannot decode license":`Não é possível decodificar a licença`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`Não é possível determinar a posição: as configurações do sistema estão vazias e a detecção de GPS está desativada no navegador`,'jc_Cannot display the custom component "%s"':`Não é possível exibir o componente personalizado "%s"`,"jc_Cannot read licenses: %s":`Não é possível ler licenças: %s`,"jc_Cannot retrieve options, as instance is offline":`Não é possível recuperar opções, pois a instância está off-line`,"jc_Cannot save configuration because of error in configuration":`Não foi possível salvar a configuração devido a um erro na configuração.`,"jc_Cannot upload":`Não é possível fazer upload`,"jc_Chained certificate":`certificado encadeado`,jc_Checked:`Verificado`,"jc_Click to see in full size":`Clique para ver em tamanho real.`,"jc_Click to show":`Clique para mostrar`,"jc_Clone current row":`Clonar linha atual`,jc_Close:`Perto`,jc_Commercial:`Comercial`,jc_Copied:`Copiado`,"jc_Copied %s":`"%s" copiado`,"jc_Copy content":`Copiar conteúdo`,jc_Create:`Crio`,"jc_Credential type":`Tipo de credencial`,'jc_Custom component "%s" was not started':`O componente personalizado "%s" não foi iniciado.`,"jc_Define schedule":`Definir cronograma`,jc_Delete:`Excluir`,"jc_Delete current row":`Excluir linha atual`,"jc_Disable/Enable translation":`Desativar/Ativar tradução`,jc_Discard:`Descartar`,"jc_Do not use let's encrypt":`Não use vamos criptografar`,"jc_Docker is not available":`O Docker não está disponível`,"jc_Docker is not installed or not running":`O Docker não está instalado ou não está em execução`,"jc_Drop file here":`Solte o arquivo aqui`,"jc_Enter the code from that page here":`Digite o código dessa página aqui`,jc_Error:`Erro`,"jc_Expand/Collapse card":`Expandir/Recolher cartão`,"jc_Export configuration section":`Seção de configuração de exportação`,"jc_Export data to %s file":`Exportar dados para o arquivo %s`,"jc_Export setting to JSON file":`Exportar configurações para arquivo JSON`,"jc_Fallback custom certificates":`Certificados personalizados alternativos`,"jc_File is too big. Max %sk allowed. Try use SVG.":`O arquivo é muito grande. Max %sk permitido. Tente usar SVG.`,"jc_File will be deleted":`O arquivo será excluído.`,"jc_Filter and Data Actions":`Ações de filtro e dados`,"jc_Get %s access":`Obtenha acesso %s`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`Se o botão acima não funcionar, você pode autorizar manualmente este aplicativo visitando esta url`,"jc_Import and add configuration section":`Seção de importação e adição de configuração`,"jc_Import and replace configuration section":`Seção de configuração de importação e substituição`,"jc_Import data from %s file":`Importar dados do arquivo %s`,"jc_Import from %s":`Importar de %s`,"jc_Import settings from JSON file":`Importar configurações de um arquivo JSON`,"jc_Instance %s is alive":`O %s da instância está ativo`,"jc_Instance %s is not alive":`O %s da instância não está ativo`,"jc_Invalid JSON":`JSON inválido`,"jc_Invalid JSON file.":`Arquivo JSON inválido.`,"jc_Invalid JSON format. Expected an array.":`Formato JSON inválido. Esperava-se uma matriz.`,"jc_Invalid YAML":`YAML inválido`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`É necessário gerar %s da API da GUI, mas este painel de administração já fornece a geração %s. Por favor, atualize o painel de administração.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`Foi desenvolvido para geração de API GUI %s, mas este painel de administração fornece geração %s. Por favor, atualize o adaptador.`,"jc_It was probably built for an older admin version. Please update the adapter.":`Provavelmente foi desenvolvido para uma versão administrativa mais antiga. Por favor, atualize o adaptador.`,"jc_JSON editor":`Editor JSON`,jc_Latitude:`Latitude`,"jc_License %s":`Licença %s`,"jc_License agreement":`Contrato de licença`,"jc_License does not exist":`A licença não existe`,"jc_License expired on %s":`A licença expirou em %s`,'jc_License for other product "%s"':`Licença para outro produto "%s"`,"jc_License is for version %s, but required version is %s":`A licença é para a versão %s, mas a versão necessária é %s.`,"jc_License must be converted":`A licença deve ser convertida para uma versão mais recente. Você pode fazê-lo em seu perfil iobroker.net.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`Licença não encontrada no gerenciador de licenças. Deseja atualizar as licenças do iobroker.net?`,"jc_Listen on all IPs":`Ouça em todos os IPs`,jc_Longitude:`Longitude`,"jc_Move down":`Mover para baixo`,"jc_Move up":`Subir`,jc_Name:`Nome`,"jc_No one license found in license manager":`Nenhuma licença encontrada no gerenciador de licenças`,"jc_No response from admin":`Nenhuma resposta do administrador`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Entrada duplicada não permitida "%s" na coluna "%s"`,"jc_OAuth Client ID":`ID do cliente OAuth`,"jc_OAuth Client secret":`Segredo do cliente OAuth`,jc_Ok:`Está bem`,"jc_Passwords are not equal!":`As senhas não são iguais!`,"jc_Place your files here or click here to open the browse dialog":`Coloque seus arquivos aqui ou clique aqui para abrir a janela de navegação`,"jc_Please allow popups in your browser for this page!":`Por favor, permita pop-ups no seu navegador para esta página!`,"jc_Please confirm":`Por favor confirme`,"jc_Please create license":`Crie uma licença`,"jc_Please enter the license":`Por favor, insira a licença`,"jc_Please fill in all required fields":`Por favor, preencha todos os campos obrigatórios.`,"jc_Port could be used by %s":`A porta pode ser usada por %s`,"jc_Port is already used by %s":`A porta já está sendo usada por %s`,"jc_Press ENTER Key to add new item":`Pressione a tecla ENTER para adicionar um novo item`,"jc_Private certificate":`certificado privado`,jc_Product:`produtos`,"jc_Public certificate":`certificado público`,"jc_Renew %s access":`Renovar acesso %s`,jc_Replace:`Substituir`,"jc_Request data by instance":`Solicitar dados por instância`,"jc_Request timed out":`Solicitação expirou`,jc_Result:`Resultado`,jc_Save:`Salve `,"jc_Save configuration?":`Salvar configuração?`,"jc_Serial number (UUID)":`Número de série (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`O número de série (UUID) "%s" na licença é para outro dispositivo.`,"jc_Show/hide filter input":`Mostrar/ocultar entrada de filtro`,"jc_Some data are not stored. Discard?":`Alguns dados não são armazenados. Descartar?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Autorizado com sucesso. Token válido até %s e será renovado automaticamente.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Autorizado com sucesso. Token válido até %s, mas pode expirar, pois a instância não está em execução.`,"jc_Suitable license not found in license manager":`Licença adequada não encontrada no gerenciador de licenças`,"jc_System language":`Idioma do sistema`,"jc_Take browser position":`Tomar posição do navegador`,"jc_Take position from system settings":`Tomar posição a partir das configurações do sistema`,jc_Template:`Modelo`,"jc_Use all available let's encrypt certificates":`Use todos os certificados disponíveis vamos criptografar`,"jc_Use system settings for position":`Use as configurações do sistema para a posição`,"jc_Used system settings":`Configurações do sistema usadas`,jc_ValidTill:`Válida até`,jc_Version:`Versão`,"jc_YAML editor":`Editor YAML`,jc_Yes:`Sim`,"jc_You can filter entries by entering here some text":`Você pode filtrar as entradas digitando aqui algum texto`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Falha ao abrir o arquivo JSON`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Falha ao analisar o arquivo JSON`,jc___different__:`diferente`,jc_false:`FALSO`,jc_locally:`localmente`,jc_none:`Nenhum`,jc_repeat:`repetir`,jc_true:`verdadeiro`,"jc_via internet":`via internet`,sch_all:`tudo`},nl:{"jc_A credential with this name already exists":`Er bestaat al een legitimatiebewijs met deze naam.`,"jc_A unique name is required":`Een unieke naam is vereist.`,"jc_Accept license":`Accepteer licentie`,jc_Actions:`Acties`,"jc_Add credential":`Voeg inloggegevens toe`,"jc_Add row":`Voeg een rij toe`,"jc_All items are filtered out":`Alle items zijn uitgefilterd`,jc_Append:`toevoegen`,"jc_Append %s entries or replace existing?":`%s ingangen toevoegen of bestaande vervangen?`,"jc_Append or replace?":`Toevoegen of vervangen?`,"jc_Are you sure?":`Weet je het zeker?`,jc_Cancel:`Annuleer`,"jc_Cannot add items with set filter":`Kan geen items toevoegen met ingestelde filter`,"jc_Cannot create credential: %s":`Kan geen inloggegevens aanmaken: %s`,"jc_Cannot decode license":`Kan licentie niet decoderen`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`Kan positie niet bepalen: systeeminstellingen zijn leeg en GPS-detectie is uitgeschakeld in browser`,'jc_Cannot display the custom component "%s"':`Kan het aangepaste component "%s" niet weergeven.`,"jc_Cannot read licenses: %s":`Kan licenties niet lezen: %s`,"jc_Cannot retrieve options, as instance is offline":`Kan opties niet ophalen, omdat instantie offline is`,"jc_Cannot save configuration because of error in configuration":`Configuratie kan niet worden opgeslagen vanwege een configuratiefout.`,"jc_Cannot upload":`Kan niet uploaden`,"jc_Chained certificate":`Geketend certificaat`,jc_Checked:`Gecontroleerd`,"jc_Click to see in full size":`Klik om de afbeelding op volledige grootte te bekijken.`,"jc_Click to show":`Klik om te tonen`,"jc_Clone current row":`Kloon de huidige rij`,jc_Close:`Dichtbij`,jc_Commercial:`Reclame`,jc_Copied:`Gekopieerd`,"jc_Copied %s":`"%s" gekopieerd`,"jc_Copy content":`Inhoud kopiëren`,jc_Create:`Creëer`,"jc_Credential type":`Referentietype`,'jc_Custom component "%s" was not started':`Aangepaste component "%s" is niet gestart.`,"jc_Define schedule":`Definieer schema`,jc_Delete:`Verwijderen`,"jc_Delete current row":`Huidige rij verwijderen`,"jc_Disable/Enable translation":`Vertaling uitschakelen/inschakelen`,jc_Discard:`Weggooien`,"jc_Do not use let's encrypt":`Gebruik geen let's encrypt`,"jc_Docker is not available":`Docker is niet beschikbaar`,"jc_Docker is not installed or not running":`Docker is niet geïnstalleerd of draait niet`,"jc_Drop file here":`Zet het bestand hier neer`,"jc_Enter the code from that page here":`Voer hier de code van die pagina in`,jc_Error:`Fout`,"jc_Expand/Collapse card":`Kaart uit-/inklappen`,"jc_Export configuration section":`Sectie Exportconfiguratie`,"jc_Export data to %s file":`Exporteer gegevens naar %s bestand`,"jc_Export setting to JSON file":`Exporteer instellingen naar een JSON-bestand.`,"jc_Fallback custom certificates":`Fallback aangepaste certificaten`,"jc_File is too big. Max %sk allowed. Try use SVG.":`Bestand is te groot. Max. %sk toegestaan. Probeer SVG te gebruiken.`,"jc_File will be deleted":`Het bestand wordt verwijderd.`,"jc_Filter and Data Actions":`Filter- en gegevensacties`,"jc_Get %s access":`Krijg %s toegang`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`Als de bovenstaande knop niet werkt, kunt u deze app handmatig autoriseren door deze url te bezoeken`,"jc_Import and add configuration section":`Configuratiesectie importeren en toevoegen`,"jc_Import and replace configuration section":`Configuratiesectie importeren en vervangen`,"jc_Import data from %s file":`Importeer gegevens uit %s bestand`,"jc_Import from %s":`Importeren uit %s`,"jc_Import settings from JSON file":`Instellingen importeren vanuit een JSON-bestand`,"jc_Instance %s is alive":`Instantie %s leeft`,"jc_Instance %s is not alive":`Instantie %s is niet actief`,"jc_Invalid JSON":`Ongeldige JSON`,"jc_Invalid JSON file.":`Ongeldig JSON-bestand.`,"jc_Invalid JSON format. Expected an array.":`Ongeldige JSON-indeling. Er werd een array verwacht.`,"jc_Invalid YAML":`Ongeldige YAML`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`Het vereist GUI API-generatie %s, maar deze beheerder levert generatie %s. Graag de beheerder bijwerken.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`Het is gebouwd voor GUI API-generatie %s, maar deze beheerder levert generatie %s. Update de adapter.`,"jc_It was probably built for an older admin version. Please update the adapter.":`Het is waarschijnlijk ontwikkeld voor een oudere beheerdersversie. Update de adapter.`,"jc_JSON editor":`JSON-editor`,jc_Latitude:`Breedtegraad`,"jc_License %s":`Licentie %s`,"jc_License agreement":`Licentieovereenkomst`,"jc_License does not exist":`Licentie bestaat niet`,"jc_License expired on %s":`Licentie verlopen op %s`,'jc_License for other product "%s"':`Licentie voor ander product "%s"`,"jc_License is for version %s, but required version is %s":`De licentie is voor versie %s, maar de vereiste versie is %s.`,"jc_License must be converted":`Licentie moet worden omgezet naar nieuwere versie. U kunt dit doen in uw iobroker.net-profiel.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`Licentie niet gevonden in licentiebeheer. Wilt u licenties van iobroker.net bijwerken?`,"jc_Listen on all IPs":`Luister op alle IP's`,jc_Longitude:`Lengtegraad`,"jc_Move down":`Naar beneden verplaatsen`,"jc_Move up":`Omhoog gaan`,jc_Name:`Naam`,"jc_No one license found in license manager":`Geen enkele licentie gevonden in licentiebeheer`,"jc_No response from admin":`Geen reactie van de beheerder`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Niet-toegestane dubbele invoer "%s" in kolom "%s"`,"jc_OAuth Client ID":`OAuth-client-ID`,"jc_OAuth Client secret":`OAuth-clientgeheim`,jc_Ok:`OK`,"jc_Passwords are not equal!":`Wachtwoorden zijn niet gelijk!`,"jc_Place your files here or click here to open the browse dialog":`Plaats uw bestanden hier of klik hier om het bladervenster te openen`,"jc_Please allow popups in your browser for this page!":`Sta pop-ups toe in uw browser voor deze pagina!`,"jc_Please confirm":`Bevestig alstublieft`,"jc_Please create license":`Maak een licentie aan`,"jc_Please enter the license":`Voer de licentie in`,"jc_Please fill in all required fields":`Vul alle verplichte velden in.`,"jc_Port could be used by %s":`Poort kan worden gebruikt door %s`,"jc_Port is already used by %s":`Poort wordt al gebruikt door %s`,"jc_Press ENTER Key to add new item":`Druk op de ENTER-toets om een nieuw item toe te voegen`,"jc_Private certificate":`Privé certificaat`,jc_Product:`Product`,"jc_Public certificate":`Openbaar certificaat`,"jc_Renew %s access":`%s toegang verlengen`,jc_Replace:`Vervangen`,"jc_Request data by instance":`Gegevens opvragen per instantie`,"jc_Request timed out":`Verzoek verlopen`,jc_Result:`Resultaat`,jc_Save:`Sparen`,"jc_Save configuration?":`Configuratie opslaan?`,"jc_Serial number (UUID)":`Serienummer (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`Serienummer (UUID) "%s" in licentie is voor ander apparaat.`,"jc_Show/hide filter input":`Filterinvoer weergeven/verbergen`,"jc_Some data are not stored. Discard?":`Sommige gegevens worden niet opgeslagen. Weggooien?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Succesvol geautoriseerd. Token geldig tot %s en wordt automatisch verlengd.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Succesvol geautoriseerd. Token geldig tot %s, maar kan verlopen omdat de instantie niet actief is.`,"jc_Suitable license not found in license manager":`Geschikte licentie niet gevonden in licentiebeheer`,"jc_System language":`Systeemtaal`,"jc_Take browser position":`Positie innemen vanuit de browser`,"jc_Take position from system settings":`Neem positie over van systeeminstellingen`,jc_Template:`Sjabloon`,"jc_Use all available let's encrypt certificates":`Gebruik alle beschikbare Let's Encrypt-certificaten`,"jc_Use system settings for position":`Gebruik systeeminstellingen voor positie`,"jc_Used system settings":`Gebruikte systeeminstellingen`,jc_ValidTill:`Geldig tot`,jc_Version:`Versie`,"jc_YAML editor":`YAML-editor`,jc_Yes:`Ja`,"jc_You can filter entries by entering here some text":`U kunt items filteren door hier wat tekst in te voeren`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Het openen van het JSON-bestand is mislukt.`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Het parseren van het JSON-bestand is mislukt.`,jc___different__:`verschillend`,jc_false:`ONWAAR`,jc_locally:`plaatselijk`,jc_none:`geen`,jc_repeat:`herhalen`,jc_true:`WAAR`,"jc_via internet":`via internet`,sch_all:`allemaal`},fr:{"jc_A credential with this name already exists":`Un certificat portant ce nom existe déjà.`,"jc_A unique name is required":`Un nom unique est requis.`,"jc_Accept license":`Accepter la licence`,jc_Actions:`Actes`,"jc_Add credential":`Ajouter un identifiant`,"jc_Add row":`Ajouter une rangée`,"jc_All items are filtered out":`Tous les éléments sont filtrés`,jc_Append:`Ajouter`,"jc_Append %s entries or replace existing?":`Ajouter %s entrées ou remplacer l'existant\xA0?`,"jc_Append or replace?":`Ajouter ou remplacer\xA0?`,"jc_Are you sure?":`Êtes-vous sûr?`,jc_Cancel:`Annuler`,"jc_Cannot add items with set filter":`Impossible d'ajouter des éléments avec le filtre défini`,"jc_Cannot create credential: %s":`Impossible de créer les informations d'identification\xA0: %s`,"jc_Cannot decode license":`Impossible de décoder la licence`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`Impossible de déterminer la position\xA0: les paramètres système sont vides et la détection GPS est désactivée dans le navigateur`,'jc_Cannot display the custom component "%s"':`Impossible d'afficher le composant personnalisé « %s »`,"jc_Cannot read licenses: %s":`Impossible de lire les licences\xA0: %s`,"jc_Cannot retrieve options, as instance is offline":`Impossible de récupérer les options, car l'instance est hors ligne`,"jc_Cannot save configuration because of error in configuration":`Impossible d'enregistrer la configuration en raison d'une erreur de configuration.`,"jc_Cannot upload":`Impossible de télécharger`,"jc_Chained certificate":`Certificat chaîné`,jc_Checked:`Vérifié`,"jc_Click to see in full size":`Cliquez pour afficher en taille réelle`,"jc_Click to show":`Cliquez pour afficher`,"jc_Clone current row":`Cloner la ligne actuelle`,jc_Close:`Fermer`,jc_Commercial:`Commercial`,jc_Copied:`Copié`,"jc_Copied %s":`"%s" copié`,"jc_Copy content":`Copier le contenu`,jc_Create:`Créer`,"jc_Credential type":`Type de justificatif d'identité`,'jc_Custom component "%s" was not started':`Le composant personnalisé « %s » n'a pas été démarré.`,"jc_Define schedule":`Définir le calendrier`,jc_Delete:`Supprimer`,"jc_Delete current row":`Supprimer la ligne actuelle`,"jc_Disable/Enable translation":`Activer/Désactiver la traduction`,jc_Discard:`Jeter`,"jc_Do not use let's encrypt":`Ne pas utiliser let's encrypt`,"jc_Docker is not available":`Docker n'est pas disponible`,"jc_Docker is not installed or not running":`Docker n'est pas installé ou n'est pas en cours d'exécution`,"jc_Drop file here":`Déposer le fichier ici`,"jc_Enter the code from that page here":`Entrez le code de cette page ici`,jc_Error:`Erreur`,"jc_Expand/Collapse card":`Carte Développer/Réduire`,"jc_Export configuration section":`Exporter la section de configuration`,"jc_Export data to %s file":`Exporter les données vers le fichier %s`,"jc_Export setting to JSON file":`Paramètres d'exportation vers un fichier JSON`,"jc_Fallback custom certificates":`Certificats personnalisés de secours`,"jc_File is too big. Max %sk allowed. Try use SVG.":`Le fichier est trop volumineux. Max %sk autorisé. Essayez d'utiliser SVG.`,"jc_File will be deleted":`Le fichier sera supprimé`,"jc_Filter and Data Actions":`Actions sur les filtres et les données`,"jc_Get %s access":`Obtenir l'accès %s`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`Si le bouton ci-dessus ne fonctionne pas, vous pouvez autoriser manuellement cette application en visitant cette URL`,"jc_Import and add configuration section":`Importer et ajouter la section de configuration`,"jc_Import and replace configuration section":`Importer et remplacer la section de configuration`,"jc_Import data from %s file":`Importer des données à partir du fichier %s`,"jc_Import from %s":`Importer depuis %s`,"jc_Import settings from JSON file":`Importer les paramètres à partir d'un fichier JSON`,"jc_Instance %s is alive":`L'instance %s est active`,"jc_Instance %s is not alive":`L'instance %s n'est pas active`,"jc_Invalid JSON":`JSON invalide`,"jc_Invalid JSON file.":`Fichier JSON invalide.`,"jc_Invalid JSON format. Expected an array.":`Format JSON invalide. Tableau attendu.`,"jc_Invalid YAML":`YAML invalide`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`Cela nécessite la génération de l'API GUI %s, mais cet administrateur fournit la génération %s. Veuillez mettre à jour l'administrateur.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`Il a été conçu pour la génération d'API GUI %s, mais cet administrateur fournit la génération %s. Veuillez mettre à jour l'adaptateur.`,"jc_It was probably built for an older admin version. Please update the adapter.":`Il a probablement été conçu pour une version d'administration plus ancienne. Veuillez mettre à jour l'adaptateur.`,"jc_JSON editor":`Éditeur JSON`,jc_Latitude:`Latitude`,"jc_License %s":`Licence %s`,"jc_License agreement":`Accord de licence`,"jc_License does not exist":`La licence n'existe pas`,"jc_License expired on %s":`Licence expirée le %s`,'jc_License for other product "%s"':`Licence pour un autre produit "%s"`,"jc_License is for version %s, but required version is %s":`La licence concerne la version %s, mais la version requise est %s`,"jc_License must be converted":`La licence doit être convertie en une version plus récente. Vous pouvez le faire dans votre profil iobroker.net.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`Licence introuvable dans le gestionnaire de licences. Voulez-vous mettre à jour les licences depuis iobroker.net\xA0?`,"jc_Listen on all IPs":`Écoutez sur toutes les adresses IP`,jc_Longitude:`Longitude`,"jc_Move down":`Descendre`,"jc_Move up":`Déplacer vers le haut`,jc_Name:`Nom`,"jc_No one license found in license manager":`Aucune licence trouvée dans le gestionnaire de licences`,"jc_No response from admin":`Aucune réponse de l'administrateur`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Entrée en double non autorisée « %s » dans la colonne « %s »`,"jc_OAuth Client ID":`ID client OAuth`,"jc_OAuth Client secret":`Secret client OAuth`,jc_Ok:`D'accord`,"jc_Passwords are not equal!":`Les mots de passe ne sont pas égaux !`,"jc_Place your files here or click here to open the browse dialog":`Placez vos fichiers ici ou cliquez ici pour ouvrir la boîte de dialogue de navigation`,"jc_Please allow popups in your browser for this page!":`Veuillez autoriser les popups dans votre navigateur pour cette page\xA0!`,"jc_Please confirm":`Veuillez confirmer`,"jc_Please create license":`Veuillez créer une licence`,"jc_Please enter the license":`Veuillez entrer la licence`,"jc_Please fill in all required fields":`Veuillez remplir tous les champs obligatoires.`,"jc_Port could be used by %s":`Le port pourrait être utilisé par %s`,"jc_Port is already used by %s":`Le port est déjà utilisé par %s`,"jc_Press ENTER Key to add new item":`Appuyez sur la touche ENTRÉE pour ajouter un nouvel élément`,"jc_Private certificate":`Certificat privé`,jc_Product:`Produit`,"jc_Public certificate":`Certificat public`,"jc_Renew %s access":`Renouveler l'accès %s`,jc_Replace:`Remplacer`,"jc_Request data by instance":`Demander des données par instance`,"jc_Request timed out":`La demande a expiré`,jc_Result:`Résultat`,jc_Save:`sauver`,"jc_Save configuration?":`Enregistrer la configuration\xA0?`,"jc_Serial number (UUID)":`Numéro de série (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`Le numéro de série (UUID) "%s" dans la licence est pour un autre appareil.`,"jc_Show/hide filter input":`Afficher/masquer l'entrée de filtre`,"jc_Some data are not stored. Discard?":`Certaines données ne sont pas stockées. Jeter?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Autorisation réussie. Jeton valide jusqu'au %s et sera automatiquement renouvelé.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Autorisation réussie. Jeton valide jusqu'à %s, mais il peut expirer car l'instance n'est pas en cours d'exécution.`,"jc_Suitable license not found in license manager":`Licence appropriée introuvable dans le gestionnaire de licences`,"jc_System language":`Langue du système`,"jc_Take browser position":`Prendre position depuis le navigateur`,"jc_Take position from system settings":`Prendre position à partir des paramètres système`,jc_Template:`Modèle`,"jc_Use all available let's encrypt certificates":`Utilisez tous les certificats let's encrypt disponibles`,"jc_Use system settings for position":`Utiliser les paramètres système pour la position`,"jc_Used system settings":`Paramètres système utilisés`,jc_ValidTill:`Valable jusqu'au`,jc_Version:`Version`,"jc_YAML editor":`Éditeur YAML`,jc_Yes:`Oui`,"jc_You can filter entries by entering here some text":`Vous pouvez filtrer les entrées en saisissant ici du texte`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Impossible d'ouvrir le fichier JSON`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Échec de l'analyse du fichier JSON`,jc___different__:`différent`,jc_false:`FAUX`,jc_locally:`localement`,jc_none:`rien`,jc_repeat:`répéter`,jc_true:`VRAI`,"jc_via internet":`par Internet`,sch_all:`tout`},it:{"jc_A credential with this name already exists":`Esiste già una credenziale con questo nome`,"jc_A unique name is required":`È richiesto un nome univoco`,"jc_Accept license":`Accetta licenza`,jc_Actions:`Azioni`,"jc_Add credential":`Aggiungi credenziali`,"jc_Add row":`Aggiungi riga`,"jc_All items are filtered out":`Tutti gli elementi vengono filtrati`,jc_Append:`Aggiungere`,"jc_Append %s entries or replace existing?":`Aggiungi %s voci o sostituisci quelle esistenti?`,"jc_Append or replace?":`Aggiungere o sostituire?`,"jc_Are you sure?":`Sei sicuro?`,jc_Cancel:`Annulla`,"jc_Cannot add items with set filter":`Impossibile aggiungere elementi con il filtro impostato`,"jc_Cannot create credential: %s":`Impossibile creare le credenziali: %s`,"jc_Cannot decode license":`Impossibile decodificare la licenza`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`Impossibile determinare la posizione: le impostazioni di sistema sono vuote e il rilevamento GPS è disabilitato nel browser`,'jc_Cannot display the custom component "%s"':`Impossibile visualizzare il componente personalizzato "%s"`,"jc_Cannot read licenses: %s":`Impossibile leggere le licenze: %s`,"jc_Cannot retrieve options, as instance is offline":`Impossibile recuperare le opzioni, poiché l'istanza è offline`,"jc_Cannot save configuration because of error in configuration":`Impossibile salvare la configurazione a causa di un errore nella configurazione`,"jc_Cannot upload":`Impossibile caricare`,"jc_Chained certificate":`Certificato incatenato`,jc_Checked:`Controllato`,"jc_Click to see in full size":`Clicca per visualizzare l'immagine a dimensioni intere`,"jc_Click to show":`Clicca per mostrare`,"jc_Clone current row":`Clona riga corrente`,jc_Close:`Vicino`,jc_Commercial:`Commerciale`,jc_Copied:`Copiato`,"jc_Copied %s":`"%s" copiato`,"jc_Copy content":`Copia contenuto`,jc_Create:`Creare`,"jc_Credential type":`Tipo di credenziale`,'jc_Custom component "%s" was not started':`Il componente personalizzato "%s" non è stato avviato`,"jc_Define schedule":`Definisci programma`,jc_Delete:`Elimina`,"jc_Delete current row":`Elimina la riga corrente`,"jc_Disable/Enable translation":`Disabilita/Abilita la traduzione`,jc_Discard:`Scartare`,"jc_Do not use let's encrypt":`Non utilizzare crittografiamo`,"jc_Docker is not available":`Docker non è disponibile`,"jc_Docker is not installed or not running":`Docker non è installato o non è in esecuzione`,"jc_Drop file here":`Trascina il file qui`,"jc_Enter the code from that page here":`Inserisci qui il codice da quella pagina`,jc_Error:`Errore`,"jc_Expand/Collapse card":`Espandi/Comprimi scheda`,"jc_Export configuration section":`Sezione di configurazione dell'esportazione`,"jc_Export data to %s file":`Esporta i dati nel file %s`,"jc_Export setting to JSON file":`Esporta le impostazioni in un file JSON`,"jc_Fallback custom certificates":`Certificati personalizzati di fallback`,"jc_File is too big. Max %sk allowed. Try use SVG.":`Il file è troppo grande. Max %sk consentito. Prova a usare SVG.`,"jc_File will be deleted":`Il file verrà eliminato`,"jc_Filter and Data Actions":`Azioni sui filtri e sui dati`,"jc_Get %s access":`Ottieni l'accesso %s`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`Se il pulsante sopra non funziona, puoi autorizzare manualmente questa app visitando questo URL`,"jc_Import and add configuration section":`Importa e aggiungi la sezione di configurazione`,"jc_Import and replace configuration section":`Importa e sostituisci la sezione di configurazione`,"jc_Import data from %s file":`Importa i dati dal file %s`,"jc_Import from %s":`Importa da %s`,"jc_Import settings from JSON file":`Importa le impostazioni dal file JSON`,"jc_Instance %s is alive":`Il %s dell'istanza è vivo`,"jc_Instance %s is not alive":`Il TESTO dell'istanza non è vivo`,"jc_Invalid JSON":`JSON non valido`,"jc_Invalid JSON file.":`File JSON non valido.`,"jc_Invalid JSON format. Expected an array.":`Formato JSON non valido. È previsto un array.`,"jc_Invalid YAML":`YAML non valido`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`Richiede la generazione dell'API GUI %s, ma questo amministratore fornisce la generazione %s. Si prega di aggiornare l'amministratore.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`È stato creato per la generazione dell'API GUI %s, ma questo amministratore fornisce la generazione %s. Si prega di aggiornare l'adattatore.`,"jc_It was probably built for an older admin version. Please update the adapter.":`Probabilmente è stato creato per una versione di amministrazione precedente. Si prega di aggiornare l'adattatore.`,"jc_JSON editor":`Editor JSON`,jc_Latitude:`Latitudine`,"jc_License %s":`Licenza %s`,"jc_License agreement":`Contratto di licenza`,"jc_License does not exist":`La licenza non esiste`,"jc_License expired on %s":`Licenza scaduta il %s`,'jc_License for other product "%s"':`Licenza per altro prodotto "%s"`,"jc_License is for version %s, but required version is %s":`La licenza è per la versione %s, ma la versione richiesta è %s`,"jc_License must be converted":`La licenza deve essere convertita in una versione più recente. Puoi farlo nel tuo profilo iobroker.net.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`Licenza non trovata nel gestore delle licenze. Vuoi aggiornare le licenze da iobroker.net?`,"jc_Listen on all IPs":`Ascolta su tutti gli IP`,jc_Longitude:`Longitudine`,"jc_Move down":`Abbassati`,"jc_Move up":`Andare avanti`,jc_Name:`Nome`,"jc_No one license found in license manager":`Nessuna licenza trovata nel gestore delle licenze`,"jc_No response from admin":`Nessuna risposta dall'amministratore`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Voce duplicata non consentita "%s" nella colonna "%s"`,"jc_OAuth Client ID":`ID client OAuth`,"jc_OAuth Client secret":`Segreto del client OAuth`,jc_Ok:`Ok`,"jc_Passwords are not equal!":`Le password non sono uguali!`,"jc_Place your files here or click here to open the browse dialog":`Posiziona i file qui o fai clic qui per aprire la finestra di dialogo Sfoglia`,"jc_Please allow popups in your browser for this page!":`Si prega di abilitare i popup nel browser per questa pagina!`,"jc_Please confirm":`Si prega di confermare`,"jc_Please create license":`Si prega di creare la licenza`,"jc_Please enter the license":`Inserisci la licenza`,"jc_Please fill in all required fields":`Si prega di compilare tutti i campi obbligatori.`,"jc_Port could be used by %s":`La porta potrebbe essere utilizzata da %s`,"jc_Port is already used by %s":`La porta è già utilizzata da %s`,"jc_Press ENTER Key to add new item":`Premere il tasto INVIO per aggiungere un nuovo elemento`,"jc_Private certificate":`Certificato privato`,jc_Product:`Prodotto`,"jc_Public certificate":`Certificato pubblico`,"jc_Renew %s access":`Rinnova l'accesso %s`,jc_Replace:`Sostituire`,"jc_Request data by instance":`Richiedi dati per istanza`,"jc_Request timed out":`Tempo scaduto per la richiesta`,jc_Result:`Risultato`,jc_Save:`Salva`,"jc_Save configuration?":`Salvare la configurazione?`,"jc_Serial number (UUID)":`Numero di serie (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`Il numero di serie (UUID) "%s" nella licenza è per un altro dispositivo.`,"jc_Show/hide filter input":`Mostra/nascondi input filtro`,"jc_Some data are not stored. Discard?":`Alcuni dati non vengono memorizzati. Scartare?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Autorizzazione completata. Il token è valido fino al %s e verrà rinnovato automaticamente.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Autorizzazione completata. Il token è valido fino al %s, ma potrebbe scadere perché l'istanza non è in esecuzione.`,"jc_Suitable license not found in license manager":`Licenza adatta non trovata nel gestore delle licenze`,"jc_System language":`Linguaggio di sistema`,"jc_Take browser position":`Prendi posizione dal browser`,"jc_Take position from system settings":`Prendi posizione dalle impostazioni di sistema`,jc_Template:`Modello`,"jc_Use all available let's encrypt certificates":`Usa tutti i certificati Let's Encrypt disponibili`,"jc_Use system settings for position":`Usa le impostazioni di sistema per la posizione`,"jc_Used system settings":`Impostazioni di sistema utilizzate`,jc_ValidTill:`Valido fino a`,jc_Version:`Versione`,"jc_YAML editor":`Editor YAML`,jc_Yes:`SÌ`,"jc_You can filter entries by entering here some text":`Puoi filtrare le voci inserendo qui del testo`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Impossibile aprire il file JSON`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Impossibile analizzare il file JSON`,jc___different__:`diverso`,jc_false:`FALSO`,jc_locally:`localmente`,jc_none:`nessuna`,jc_repeat:`ripetere`,jc_true:`VERO`,"jc_via internet":`attraverso internet`,sch_all:`tutti`},es:{"jc_A credential with this name already exists":`Ya existe una credencial con ese nombre.`,"jc_A unique name is required":`Se requiere un nombre único.`,"jc_Accept license":`Aceptar licencia`,jc_Actions:`Comportamiento`,"jc_Add credential":`Agregar credencial`,"jc_Add row":`Añadir fila`,"jc_All items are filtered out":`Todos los elementos se filtran`,jc_Append:`Adjuntar`,"jc_Append %s entries or replace existing?":`¿Agregar %s entradas o reemplazar las existentes?`,"jc_Append or replace?":`¿Agregar o reemplazar?`,"jc_Are you sure?":`¿Estás seguro?`,jc_Cancel:`Cancelar`,"jc_Cannot add items with set filter":`No se pueden agregar elementos con el filtro establecido`,"jc_Cannot create credential: %s":`No se puede crear la credencial: %s`,"jc_Cannot decode license":`No se puede decodificar la licencia`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`No se puede determinar la posición: la configuración del sistema está vacía y la detección de GPS está deshabilitada en el navegador`,'jc_Cannot display the custom component "%s"':`No se puede mostrar el componente personalizado "%s"`,"jc_Cannot read licenses: %s":`No se pueden leer licencias: %s`,"jc_Cannot retrieve options, as instance is offline":`No se pueden recuperar las opciones, ya que la instancia está fuera de línea`,"jc_Cannot save configuration because of error in configuration":`No se puede guardar la configuración debido a un error en la configuración.`,"jc_Cannot upload":`no se puede cargar`,"jc_Chained certificate":`certificado encadenado`,jc_Checked:`Comprobado`,"jc_Click to see in full size":`Haz clic para ver en tamaño completo.`,"jc_Click to show":`Haga clic para mostrar`,"jc_Clone current row":`Clonar fila actual`,jc_Close:`Cerca`,jc_Commercial:`Comercial`,jc_Copied:`Copiado`,"jc_Copied %s":`Copiado "%s"`,"jc_Copy content":`Copiar contenido`,jc_Create:`Crear`,"jc_Credential type":`Tipo de credencial`,'jc_Custom component "%s" was not started':`El componente personalizado "%s" no se inició.`,"jc_Define schedule":`Definir horario`,jc_Delete:`Eliminar`,"jc_Delete current row":`Eliminar fila actual`,"jc_Disable/Enable translation":`Desactivar/Activar traducción`,jc_Discard:`Desechar`,"jc_Do not use let's encrypt":`No use vamos a cifrar`,"jc_Docker is not available":`Docker no está disponible`,"jc_Docker is not installed or not running":`Docker no está instalado o no se está ejecutando`,"jc_Drop file here":`Suelta el archivo aquí`,"jc_Enter the code from that page here":`Introduzca el código de esa página aquí`,jc_Error:`Error`,"jc_Expand/Collapse card":`Expandir/Contraer tarjeta`,"jc_Export configuration section":`Exportar sección de configuración`,"jc_Export data to %s file":`Exportar datos al archivo %s`,"jc_Export setting to JSON file":`Exportar configuración a un archivo JSON`,"jc_Fallback custom certificates":`Certificados personalizados alternativos`,"jc_File is too big. Max %sk allowed. Try use SVG.":`El archivo es demasiado grande. Máximo de %sk permitido. Intenta usar SVG.`,"jc_File will be deleted":`El archivo será eliminado`,"jc_Filter and Data Actions":`Acciones de filtrado y datos`,"jc_Get %s access":`Obtener %s acceso`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`Si el botón de arriba no funciona, puedes autorizar manualmente esta aplicación visitando esta URL`,"jc_Import and add configuration section":`Importar y agregar sección de configuración`,"jc_Import and replace configuration section":`Importar y reemplazar sección de configuración`,"jc_Import data from %s file":`Importar datos del archivo %s`,"jc_Import from %s":`Importar desde %s`,"jc_Import settings from JSON file":`Importar configuración desde un archivo JSON`,"jc_Instance %s is alive":`Instancia %s está vivo`,"jc_Instance %s is not alive":`Instancia %s no está vivo`,"jc_Invalid JSON":`JSON no válido`,"jc_Invalid JSON file.":`Archivo JSON inválido.`,"jc_Invalid JSON format. Expected an array.":`Formato JSON inválido. Se esperaba un array.`,"jc_Invalid YAML":`YAML no válido`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`Requiere la generación de la API de la GUI %s, pero este administrador proporciona la generación %s. Por favor, actualice el administrador.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`Fue diseñado para la generación de API GUI %s, pero este administrador proporciona la generación %s. Por favor, actualice el adaptador.`,"jc_It was probably built for an older admin version. Please update the adapter.":`Probablemente se diseñó para una versión de administración anterior. Por favor, actualice el adaptador.`,"jc_JSON editor":`editor JSON`,jc_Latitude:`Latitud`,"jc_License %s":`Licencia %s`,"jc_License agreement":`Acuerdo de licencia`,"jc_License does not exist":`La licencia no existe`,"jc_License expired on %s":`La licencia venció el %s`,'jc_License for other product "%s"':`Licencia para otro producto "%s"`,"jc_License is for version %s, but required version is %s":`La licencia es para la versión %s, pero la versión requerida es %s.`,"jc_License must be converted":`La licencia debe convertirse a una versión más reciente. Puedes hacerlo en tu perfil de iobroker.net.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`Licencia no encontrada en el administrador de licencias. ¿Quieres actualizar las licencias de iobroker.net?`,"jc_Listen on all IPs":`Escuche en todas las IP`,jc_Longitude:`Longitud`,"jc_Move down":`Mover hacia abajo`,"jc_Move up":`Ascender`,jc_Name:`Nombre`,"jc_No one license found in license manager":`No se encontró ninguna licencia en el administrador de licencias`,"jc_No response from admin":`No hay respuesta del administrador`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Entrada duplicada no permitida "%s" en la columna "%s"`,"jc_OAuth Client ID":`ID de cliente OAuth`,"jc_OAuth Client secret":`Secreto de cliente OAuth`,jc_Ok:`Okay`,"jc_Passwords are not equal!":`¡Las contraseñas no son iguales!`,"jc_Place your files here or click here to open the browse dialog":`Coloque sus archivos aquí o haga clic aquí para abrir el cuadro de diálogo de exploración`,"jc_Please allow popups in your browser for this page!":`¡Permita ventanas emergentes en su navegador para esta página!`,"jc_Please confirm":`Por favor confirmar`,"jc_Please create license":`Por favor cree una licencia`,"jc_Please enter the license":`Por favor ingrese la licencia`,"jc_Please fill in all required fields":`Por favor, rellene todos los campos obligatorios.`,"jc_Port could be used by %s":`El puerto podría ser utilizado por %s`,"jc_Port is already used by %s":`El puerto ya está en uso por %s`,"jc_Press ENTER Key to add new item":`Presione la tecla ENTER para agregar un nuevo elemento`,"jc_Private certificate":`certificado privado`,jc_Product:`Producto`,"jc_Public certificate":`Certificado público`,"jc_Renew %s access":`Renovar el acceso a %s`,jc_Replace:`Reemplazar`,"jc_Request data by instance":`Solicitar datos por instancia`,"jc_Request timed out":`Tiempo de espera agotado`,jc_Result:`Resultado`,jc_Save:`Salvar`,"jc_Save configuration?":`¿Guardar configuración?`,"jc_Serial number (UUID)":`Número de serie (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`El número de serie (UUID) "%s" en la licencia es para otro dispositivo.`,"jc_Show/hide filter input":`Mostrar/ocultar entrada de filtro`,"jc_Some data are not stored. Discard?":`Algunos datos no se almacenan. ¿Desechar?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Autorizado correctamente. El token es válido hasta el %s y se renovará automáticamente.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Autorizado correctamente. El token es válido hasta %s, pero puede caducar porque la instancia no está en ejecución.`,"jc_Suitable license not found in license manager":`Licencia adecuada no encontrada en el administrador de licencias`,"jc_System language":`Lenguaje del sistema`,"jc_Take browser position":`Tomar posición desde el navegador`,"jc_Take position from system settings":`Tomar posición desde la configuración del sistema`,jc_Template:`Plantilla`,"jc_Use all available let's encrypt certificates":`Utilice todos los certificados let's encrypt disponibles`,"jc_Use system settings for position":`Usar la configuración del sistema para la posición`,"jc_Used system settings":`Configuraciones del sistema usadas`,jc_ValidTill:`Válida hasta`,jc_Version:`Versión`,"jc_YAML editor":`Editor YAML`,jc_Yes:`Sí`,"jc_You can filter entries by entering here some text":`Puede filtrar las entradas ingresando aquí algún texto`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Error al abrir el archivo JSON`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Error al analizar el archivo JSON`,jc___different__:`diferente`,jc_false:`FALSO`,jc_locally:`en la zona`,jc_none:`ninguno`,jc_repeat:`repetir`,jc_true:`VERDADERO`,"jc_via internet":`vía Internet`,sch_all:`todas`},pl:{"jc_A credential with this name already exists":`Poświadczenie o tej nazwie już istnieje`,"jc_A unique name is required":`Wymagana jest unikalna nazwa`,"jc_Accept license":`Zaakceptuj licencję`,jc_Actions:`Akcje`,"jc_Add credential":`Dodaj poświadczenie`,"jc_Add row":`Dodaj wiersz`,"jc_All items are filtered out":`Wszystkie pozycje są odfiltrowane`,jc_Append:`Dodać`,"jc_Append %s entries or replace existing?":`Dołączyć wpisy %s czy zastąpić istniejące?`,"jc_Append or replace?":`Dołączyć czy zastąpić?`,"jc_Are you sure?":`Jesteś pewny?`,jc_Cancel:`Anuluj`,"jc_Cannot add items with set filter":`Nie można dodać elementów z ustawionym filtrem`,"jc_Cannot create credential: %s":`Nie można utworzyć poświadczeń: %s`,"jc_Cannot decode license":`Nie można zdekodować licencji`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`Nie można określić pozycji: ustawienia systemu są puste, a wykrywanie GPS jest wyłączone w przeglądarce`,'jc_Cannot display the custom component "%s"':`Nie można wyświetlić niestandardowego komponentu „%s”`,"jc_Cannot read licenses: %s":`Nie można odczytać licencji: %s`,"jc_Cannot retrieve options, as instance is offline":`Nie można pobrać opcji, ponieważ instancja jest w trybie offline`,"jc_Cannot save configuration because of error in configuration":`Nie można zapisać konfiguracji z powodu błędu w konfiguracji`,"jc_Cannot upload":`Nie można przesłać`,"jc_Chained certificate":`Certyfikat łańcuchowy`,jc_Checked:`Sprawdzony`,"jc_Click to see in full size":`Kliknij, aby zobaczyć w pełnym rozmiarze`,"jc_Click to show":`Kliknij, aby pokazać`,"jc_Clone current row":`Sklonuj bieżący wiersz`,jc_Close:`Blisko`,jc_Commercial:`Handlowy`,jc_Copied:`Skopiowano`,"jc_Copied %s":`Skopiowano "%s"`,"jc_Copy content":`Kopiuj zawartość`,jc_Create:`Stwórz`,"jc_Credential type":`Typ poświadczenia`,'jc_Custom component "%s" was not started':`Komponent niestandardowy „%s” nie został uruchomiony`,"jc_Define schedule":`Zdefiniuj harmonogram`,jc_Delete:`Usunąć`,"jc_Delete current row":`Usuń bieżący wiersz`,"jc_Disable/Enable translation":`Wyłącz/Włącz tłumaczenie`,jc_Discard:`Wyrzucać`,"jc_Do not use let's encrypt":`Nie używaj zaszyfrujmy`,"jc_Docker is not available":`Docker nie jest dostępny`,"jc_Docker is not installed or not running":`Docker nie jest zainstalowany lub nie działa`,"jc_Drop file here":`Upuść plik tutaj`,"jc_Enter the code from that page here":`Wpisz kod z tej strony tutaj`,jc_Error:`Błąd`,"jc_Expand/Collapse card":`Rozwiń/Zwiń kartę`,"jc_Export configuration section":`Sekcja konfiguracji eksportu`,"jc_Export data to %s file":`Eksportuj dane do pliku %s`,"jc_Export setting to JSON file":`Eksportuj ustawienia do pliku JSON`,"jc_Fallback custom certificates":`Niestandardowe certyfikaty zastępcze`,"jc_File is too big. Max %sk allowed. Try use SVG.":`Plik jest za duży. Maksymalna dozwolona liczba %sk. Spróbuj użyć SVG.`,"jc_File will be deleted":`Plik zostanie usunięty`,"jc_Filter and Data Actions":`Akcje filtrów i danych`,"jc_Get %s access":`Uzyskaj dostęp %s`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`Jeśli przycisk powyżej nie działa, możesz autoryzować tę aplikację ręcznie, odwiedzając ten adres URL`,"jc_Import and add configuration section":`Importuj i dodaj sekcję konfiguracji`,"jc_Import and replace configuration section":`Importuj i zastąp sekcję konfiguracji`,"jc_Import data from %s file":`Importuj dane z pliku %s`,"jc_Import from %s":`Importuj z %s`,"jc_Import settings from JSON file":`Importuj ustawienia z pliku JSON`,"jc_Instance %s is alive":`Instancja %s jest aktywna`,"jc_Instance %s is not alive":`Instancja TEKST nie jest aktywna`,"jc_Invalid JSON":`Nieprawidłowy JSON`,"jc_Invalid JSON file.":`Nieprawidłowy plik JSON.`,"jc_Invalid JSON format. Expected an array.":`Nieprawidłowy format JSON. Oczekiwano tablicy.`,"jc_Invalid YAML":`Nieprawidłowy plik YAML`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`Wymaga generacji interfejsu API GUI %s, ale ten administrator zapewnia generację %s. Zaktualizuj administratora.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`Został stworzony do generowania interfejsu API GUI %s, ale ten administrator zapewnia generowanie %s. Proszę zaktualizować adapter.`,"jc_It was probably built for an older admin version. Please update the adapter.":`Prawdopodobnie został stworzony dla starszej wersji administratora. Proszę zaktualizować adapter.`,"jc_JSON editor":`Edytor JSON`,jc_Latitude:`Szerokość`,"jc_License %s":`Licencja %s`,"jc_License agreement":`Umowa licencyjna`,"jc_License does not exist":`Licencja nie istnieje`,"jc_License expired on %s":`Licencja wygasła w dniu %s`,'jc_License for other product "%s"':`Licencja na inny produkt „%s”`,"jc_License is for version %s, but required version is %s":`Licencja jest przeznaczona dla wersji %s, ale wymagana jest wersja %s`,"jc_License must be converted":`Licencja musi zostać przekonwertowana na nowszą wersję. Możesz to zrobić w swoim profilu iobroker.net.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`Nie znaleziono licencji w menedżerze licencji. Chcesz zaktualizować licencje z iobroker.net?`,"jc_Listen on all IPs":`Słuchaj na wszystkich adresach IP`,jc_Longitude:`Długość geograficzna`,"jc_Move down":`Padnij`,"jc_Move up":`Podnieść`,jc_Name:`Nazwa`,"jc_No one license found in license manager":`Nie znaleziono licencji w menedżerze licencji`,"jc_No response from admin":`Brak odpowiedzi od administratora`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Niedozwolony duplikat wpisu „%s” w kolumnie „%s”`,"jc_OAuth Client ID":`Identyfikator klienta OAuth`,"jc_OAuth Client secret":`Tajny klucz klienta OAuth`,jc_Ok:`Dobrze`,"jc_Passwords are not equal!":`Hasła nie są równe!`,"jc_Place your files here or click here to open the browse dialog":`Umieść swoje pliki tutaj lub kliknij tutaj, aby otworzyć okno dialogowe przeglądania`,"jc_Please allow popups in your browser for this page!":`Proszę zezwolić na wyświetlanie wyskakujących okienek w przeglądarce dla tej strony!`,"jc_Please confirm":`Proszę potwierdzić`,"jc_Please create license":`Utwórz licencję`,"jc_Please enter the license":`Proszę wprowadzić licencję`,"jc_Please fill in all required fields":`Proszę wypełnić wszystkie wymagane pola`,"jc_Port could be used by %s":`Port może być używany przez %s`,"jc_Port is already used by %s":`Port jest już używany przez %s`,"jc_Press ENTER Key to add new item":`Naciśnij klawisz ENTER, aby dodać nowy element`,"jc_Private certificate":`Prywatny certyfikat`,jc_Product:`Produkt`,"jc_Public certificate":`Certyfikat publiczny`,"jc_Renew %s access":`Odnów dostęp %s`,jc_Replace:`Zastępować`,"jc_Request data by instance":`Żądanie danych według instancji`,"jc_Request timed out":`Upłynął limit czasu żądania`,jc_Result:`Wynik`,jc_Save:`Zapisać`,"jc_Save configuration?":`Zapisać konfigurację?`,"jc_Serial number (UUID)":`Numer seryjny (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`Numer seryjny (UUID) „%s” w licencji dotyczy innego urządzenia.`,"jc_Show/hide filter input":`Pokaż/ukryj wejście filtra`,"jc_Some data are not stored. Discard?":`Niektóre dane nie są przechowywane. Wyrzucać?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Pomyślnie autoryzowano. Token ważny do %s i zostanie automatycznie odnowiony.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Pomyślnie autoryzowano. Token ważny do %s, ale może wygasnąć, ponieważ instancja nie jest uruchomiona.`,"jc_Suitable license not found in license manager":`Nie znaleziono odpowiedniej licencji w menedżerze licencji`,"jc_System language":`Język systemu`,"jc_Take browser position":`Zajmij pozycję z przeglądarki`,"jc_Take position from system settings":`Zajmij pozycję z ustawień systemowych`,jc_Template:`Szablon`,"jc_Use all available let's encrypt certificates":`Użyj wszystkich dostępnych certyfikatów Let's Encrypt`,"jc_Use system settings for position":`Użyj ustawień systemowych dla pozycji`,"jc_Used system settings":`Używane ustawienia systemowe`,jc_ValidTill:`Obowiązuje do`,jc_Version:`Wersja`,"jc_YAML editor":`Edytor YAML`,jc_Yes:`Tak`,"jc_You can filter entries by entering here some text":`Możesz filtrować wpisy, wpisując tutaj jakiś tekst`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Nie udało się otworzyć pliku JSON`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Nie udało się przeanalizować pliku JSON`,jc___different__:`różne`,jc_false:`FAŁSZ`,jc_locally:`lokalnie`,jc_none:`Żaden`,jc_repeat:`powtarzać`,jc_true:`PRAWDA`,"jc_via internet":`przez internet`,sch_all:`wszystko`},uk:{"jc_A credential with this name already exists":`Облікові дані з таким ім'ям вже існують`,"jc_A unique name is required":`Потрібне унікальне ім'я`,"jc_Accept license":`Прийняти ліцензію`,jc_Actions:`Дії`,"jc_Add credential":`Додати облікові дані`,"jc_Add row":`Додати рядок`,"jc_All items are filtered out":`Усі елементи відфільтровано`,jc_Append:`Додайте`,"jc_Append %s entries or replace existing?":`Додати %s записів чи замінити наявні?`,"jc_Append or replace?":`Додати чи замінити?`,"jc_Are you sure?":`Ти впевнений?`,jc_Cancel:`Скасувати`,"jc_Cannot add items with set filter":`Неможливо додати елементи зі встановленим фільтром`,"jc_Cannot create credential: %s":`Не вдається створити облікові дані: %s`,"jc_Cannot decode license":`Неможливо розшифрувати ліцензію`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`Неможливо визначити положення: системні налаштування порожні, а визначення GPS вимкнено в браузері`,'jc_Cannot display the custom component "%s"':`Не вдається відобразити користувацький компонент "%s"`,"jc_Cannot read licenses: %s":`Неможливо прочитати ліцензії: %s`,"jc_Cannot retrieve options, as instance is offline":`Неможливо отримати параметри, оскільки екземпляр офлайн`,"jc_Cannot save configuration because of error in configuration":`Не вдалося зберегти конфігурацію через помилку в конфігурації`,"jc_Cannot upload":`Неможливо завантажити`,"jc_Chained certificate":`Прикутий сертифікат`,jc_Checked:`Перевірено`,"jc_Click to see in full size":`Натисніть, щоб побачити в повному розмірі`,"jc_Click to show":`Натисніть, щоб показати`,"jc_Clone current row":`Клонувати поточний рядок`,jc_Close:`Закрити`,jc_Commercial:`Комерційний`,jc_Copied:`Скопійовано`,"jc_Copied %s":`Скопійовано "%s"`,"jc_Copy content":`Скопіюйте вміст`,jc_Create:`Створити`,"jc_Credential type":`Тип облікових даних`,'jc_Custom component "%s" was not started':`Користувацький компонент "%s" не запущено`,"jc_Define schedule":`Визначити розклад`,jc_Delete:`Видалити`,"jc_Delete current row":`Видалити поточний рядок`,"jc_Disable/Enable translation":`Вимкнути/Увімкнути переклад`,jc_Discard:`Відкинути`,"jc_Do not use let's encrypt":`Не використовуйте let's encrypt`,"jc_Docker is not available":`Докер недоступний`,"jc_Docker is not installed or not running":`Docker не встановлено або не працює`,"jc_Drop file here":`Перетягніть файл сюди`,"jc_Enter the code from that page here":`Введіть тут код з цієї сторінки`,jc_Error:`Помилка`,"jc_Expand/Collapse card":`Розгорнути/Згорнути картку`,"jc_Export configuration section":`Розділ конфігурації експорту`,"jc_Export data to %s file":`Експортувати дані у файл %s`,"jc_Export setting to JSON file":`Експорт налаштувань у файл JSON`,"jc_Fallback custom certificates":`Запасні спеціальні сертифікати`,"jc_File is too big. Max %sk allowed. Try use SVG.":`Файл завеликий. Максимально дозволено %sk. Спробуйте використовувати SVG.`,"jc_File will be deleted":`Файл буде видалено`,"jc_Filter and Data Actions":`Фільтр і дії з даними`,"jc_Get %s access":`Отримайте доступ %s`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`Якщо кнопка вище не працює, ви можете авторизувати цю програму вручну, перейшовши за цим посиланням`,"jc_Import and add configuration section":`Розділ імпорту та додавання конфігурації`,"jc_Import and replace configuration section":`Розділ імпорту та заміни конфігурації`,"jc_Import data from %s file":`Імпортувати дані з файлу %s`,"jc_Import from %s":`Імпортувати з %s`,"jc_Import settings from JSON file":`Імпорт налаштувань з JSON-файлу`,"jc_Instance %s is alive":`Примірник %s живий`,"jc_Instance %s is not alive":`Примірник %s не живий`,"jc_Invalid JSON":`Недійсний JSON`,"jc_Invalid JSON file.":`Недійсний JSON-файл.`,"jc_Invalid JSON format. Expected an array.":`Недійсний формат JSON. Очікується масив.`,"jc_Invalid YAML":`Недійсний YAML`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`Потрібна генерація API графічного інтерфейсу %s, але цей адміністратор надає генерацію %s. Будь ласка, оновіть адміністраторську версію.`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`Його було створено для покоління GUI API %s, але цей адміністратор надає покоління %s. Будь ласка, оновіть адаптер.`,"jc_It was probably built for an older admin version. Please update the adapter.":`Ймовірно, його було створено для старішої версії адміністратора. Будь ласка, оновіть адаптер.`,"jc_JSON editor":`Редактор JSON`,jc_Latitude:`Широта`,"jc_License %s":`Ліцензія %s`,"jc_License agreement":`Ліцензійна угода`,"jc_License does not exist":`Ліцензії не існує`,"jc_License expired on %s":`Термін дії ліцензії закінчився %s`,'jc_License for other product "%s"':`Ліцензія на інший продукт "%s"`,"jc_License is for version %s, but required version is %s":`Ліцензія для версії %s, але потрібна версія %s`,"jc_License must be converted":`Ліцензію необхідно конвертувати до новішої версії. Ви можете зробити це у своєму профілі на iobroker.net.`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`Ліцензія не знайдена в менеджері ліцензій. Хочете оновити ліцензії з iobroker.net?`,"jc_Listen on all IPs":`Прослуховування на всіх IP`,jc_Longitude:`Довгота`,"jc_Move down":`Рухатися вниз`,"jc_Move up":`Рухатися вгору`,jc_Name:`Ім'я`,"jc_No one license found in license manager":`У менеджері ліцензій не знайдено жодної ліцензії`,"jc_No response from admin":`Немає відповіді від адміністратора`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`Недозволений дублікат запису "%s" у стовпці "%s"`,"jc_OAuth Client ID":`Ідентифікатор клієнта OAuth`,"jc_OAuth Client secret":`Секрет клієнта OAuth`,jc_Ok:`В порядку`,"jc_Passwords are not equal!":`Паролі не бувають рівними!`,"jc_Place your files here or click here to open the browse dialog":`Розмістіть свої файли тут або натисніть тут, щоб відкрити діалогове вікно перегляду`,"jc_Please allow popups in your browser for this page!":`Будь ласка, дозвольте спливаючі вікна у вашому браузері для цієї сторінки!`,"jc_Please confirm":`Будь-ласка підтвердіть`,"jc_Please create license":`Будь ласка, створіть ліцензію`,"jc_Please enter the license":`Будь ласка, введіть ліцензію`,"jc_Please fill in all required fields":`Будь ласка, заповніть усі обов'язкові поля`,"jc_Port could be used by %s":`Порт може використовуватися %s`,"jc_Port is already used by %s":`Порт уже використовується %s`,"jc_Press ENTER Key to add new item":`Натисніть клавішу ENTER, щоб додати новий елемент`,"jc_Private certificate":`Приватний сертифікат`,jc_Product:`Продукт`,"jc_Public certificate":`Публічний сертифікат`,"jc_Renew %s access":`Поновити доступ %s`,jc_Replace:`Замінити`,"jc_Request data by instance":`Запит даних за екземпляром`,"jc_Request timed out":`Час запиту вичерпано`,jc_Result:`Результат`,jc_Save:`зберегти`,"jc_Save configuration?":`Зберегти конфігурацію?`,"jc_Serial number (UUID)":`Серійний номер (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`Серійний номер (UUID) "%s" у ліцензії призначений для іншого пристрою.`,"jc_Show/hide filter input":`Показати/сховати введення фільтра`,"jc_Some data are not stored. Discard?":`Деякі дані не зберігаються. Відкинути?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`Авторизацію успішно пройшло. Токен дійсний до %s та буде автоматично поновлено.`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`Авторизацію успішно виконано. Токен дійсний до %s, але його термін дії може закінчитися, оскільки екземпляр не запущено.`,"jc_Suitable license not found in license manager":`Відповідна ліцензія не знайдена в менеджері ліцензій`,"jc_System language":`Системна мова`,"jc_Take browser position":`Займіть позицію з браузера`,"jc_Take position from system settings":`Займіть позицію в налаштуваннях системи`,jc_Template:`Шаблон`,"jc_Use all available let's encrypt certificates":`Використовуйте всі доступні сертифікати let's encrypt`,"jc_Use system settings for position":`Використовуйте системні налаштування для позиції`,"jc_Used system settings":`Використані системні налаштування`,jc_ValidTill:`Дійсний до`,jc_Version:`Версія`,"jc_YAML editor":`Редактор YAML`,jc_Yes:`Так`,"jc_You can filter entries by entering here some text":`Ви можете фільтрувати записи, ввівши тут певний текст`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] Не вдалося відкрити JSON-файл`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] Не вдалося проаналізувати JSON-файл`,jc___different__:`інший`,jc_false:`НЕПРАВДА`,jc_locally:`локально`,jc_none:`немає`,jc_repeat:`повторити`,jc_true:`ПРАВДА`,"jc_via internet":`через інтернет`,sch_all:`все`},"zh-cn":{"jc_A credential with this name already exists":`已存在同名凭证`,"jc_A unique name is required":`需要一个唯一的名称。`,"jc_Accept license":`接受许可`,jc_Actions:`操作`,"jc_Add credential":`添加凭据`,"jc_Add row":`添加行`,"jc_All items are filtered out":`所有项目都被过滤掉`,jc_Append:`附加`,"jc_Append %s entries or replace existing?":`追加 %s 条目还是替换现有条目?`,"jc_Append or replace?":`追加还是替换?`,"jc_Are you sure?":`你确定吗?`,jc_Cancel:`取消`,"jc_Cannot add items with set filter":`无法使用设置过滤器添加项目`,"jc_Cannot create credential: %s":`无法创建凭证:%s`,"jc_Cannot decode license":`无法解码许可证`,"jc_Cannot determine position: System settings are empty and GPS detection is disabled in browser":`无法确定位置:系统设置为空且浏览器中禁用了 GPS 检测`,'jc_Cannot display the custom component "%s"':`无法显示自定义组件“%s”`,"jc_Cannot read licenses: %s":`无法读取许可证:%s`,"jc_Cannot retrieve options, as instance is offline":`无法检索选项,因为实例处于脱机状态`,"jc_Cannot save configuration because of error in configuration":`由于配置错误,无法保存配置。`,"jc_Cannot upload":`无法上传`,"jc_Chained certificate":`链式证书`,jc_Checked:`勾选`,"jc_Click to see in full size":`点击查看完整尺寸`,"jc_Click to show":`点击显示`,"jc_Clone current row":`克隆当前行`,jc_Close:`关`,jc_Commercial:`商业的`,jc_Copied:`复制的`,"jc_Copied %s":`复制的"%s"`,"jc_Copy content":`复制内容`,jc_Create:`创建`,"jc_Credential type":`凭证类型`,'jc_Custom component "%s" was not started':`自定义组件“%s”未启动`,"jc_Define schedule":`定义时间表`,jc_Delete:`删除`,"jc_Delete current row":`删除当前行`,"jc_Disable/Enable translation":`禁用/启用翻译`,jc_Discard:`丢弃`,"jc_Do not use let's encrypt":`不要使用让我们加密`,"jc_Docker is not available":`Docker 不可用`,"jc_Docker is not installed or not running":`Docker 未安装或未运行`,"jc_Drop file here":`将档案放在这里`,"jc_Enter the code from that page here":`在此处输入该页面的代码`,jc_Error:`错误`,"jc_Expand/Collapse card":`展开/折叠卡`,"jc_Export configuration section":`导出配置部分`,"jc_Export data to %s file":`将数据导出到 %s 文件`,"jc_Export setting to JSON file":`将设置导出到 JSON 文件`,"jc_Fallback custom certificates":`后备自定义证书`,"jc_File is too big. Max %sk allowed. Try use SVG.":`文件太大。允许的最大字节%s数。尝试使用 SVG。`,"jc_File will be deleted":`文件将被删除`,"jc_Filter and Data Actions":`过滤和数据操作`,"jc_Get %s access":`获取 %s 访问权限`,"jc_If the button above does not work, you can authorize manually this app by visiting this url":`如果上面的按钮不起作用,您可以通过访问此网址手动授权此应用`,"jc_Import and add configuration section":`导入并添加配置部分`,"jc_Import and replace configuration section":`导入和替换配置部分`,"jc_Import data from %s file":`从 %s 文件导入数据`,"jc_Import from %s":`从 %s 导入`,"jc_Import settings from JSON file":`从 JSON 文件导入设置`,"jc_Instance %s is alive":`实例 %s 是活动的`,"jc_Instance %s is not alive":`实例 %s 不存在`,"jc_Invalid JSON":`JSON 无效`,"jc_Invalid JSON file.":`无效的JSON文件。`,"jc_Invalid JSON format. Expected an array.":`JSON格式无效。应为数组。`,"jc_Invalid YAML":`无效的 YAML`,"jc_It requires GUI API generation %s, but this admin provides generation %s. Please update the admin.":`它需要生成 GUI API,但此管理员提供的是生成功能。请更新管理员。`,"jc_It was built for GUI API generation %s, but this admin provides generation %s. Please update the adapter.":`它原本是为 GUI API 生成 %s 而设计的,但此管理员提供了生成 %s 的功能。请更新适配器。`,"jc_It was probably built for an older admin version. Please update the adapter.":`这可能是为旧版管理后台构建的。请更新适配器。`,"jc_JSON editor":`JSON 编辑器`,jc_Latitude:`纬度`,"jc_License %s":`许可证 %s`,"jc_License agreement":`许可协议`,"jc_License does not exist":`许可证不存在`,"jc_License expired on %s":`许可证已于 %s 过期`,'jc_License for other product "%s"':`其他产品“%s”的许可证`,"jc_License is for version %s, but required version is %s":`许可证适用于版本 %s,但所需版本为 %s。`,"jc_License must be converted":`许可证必须转换为更新版本。您可以在 iobroker.net 个人资料中执行此操作。`,"jc_License not found in license manager. Do you want to read licenses from iobroker.net?":`在许可证管理器中找不到许可证。您要从 iobroker.net 更新许可证吗?`,"jc_Listen on all IPs":`监听所有IP`,jc_Longitude:`经度`,"jc_Move down":`下移`,"jc_Move up":`提升`,jc_Name:`姓名`,"jc_No one license found in license manager":`许可证管理器中未找到任何许可证`,"jc_No response from admin":`管理员没有回应`,'jc_Non-allowed duplicate entry "%s" in column "%s"':`列“%s”中存在不允许的重复条目“%s”。`,"jc_OAuth Client ID":`OAuth客户端ID`,"jc_OAuth Client secret":`OAuth 客户端密钥`,jc_Ok:`好`,"jc_Passwords are not equal!":`密码不相等!`,"jc_Place your files here or click here to open the browse dialog":`将文件放在此处或单击此处打开浏览对话框`,"jc_Please allow popups in your browser for this page!":`请允许浏览器弹出此页面!`,"jc_Please confirm":`请确认`,"jc_Please create license":`请创建许可证`,"jc_Please enter the license":`请输入许可证`,"jc_Please fill in all required fields":`请填写所有必填字段`,"jc_Port could be used by %s":`%s 可以使用端口`,"jc_Port is already used by %s":`端口已被 %s 使用`,"jc_Press ENTER Key to add new item":`按 ENTER 键添加新项目`,"jc_Private certificate":`私有证书`,jc_Product:`产品`,"jc_Public certificate":`公共证书`,"jc_Renew %s access":`续订 %s 访问权限`,jc_Replace:`代替`,"jc_Request data by instance":`按实例请求数据`,"jc_Request timed out":`请求超时`,jc_Result:`结果`,jc_Save:`保存`,"jc_Save configuration?":`保存配置?`,"jc_Serial number (UUID)":`序列号 (UUID)`,'jc_Serial number (UUID) "%s" in license is for other device.':`许可证中的序列号 (UUID)“%s”用于其他设备。`,"jc_Show/hide filter input":`显示/隐藏过滤器输入`,"jc_Some data are not stored. Discard?":`部分数据未存储。丢弃?`,"jc_Successfully authorized. Token valid till %s and will be automatically renewed.":`授权成功。令牌有效期至 %s,并将自动续订。`,"jc_Successfully authorized. Token valid till %s but it can expire as the instance is not running.":`授权成功。令牌有效期至 %s,但由于实例未运行,令牌可能会过期。`,"jc_Suitable license not found in license manager":`在许可证管理器中找不到合适的许可证`,"jc_System language":`系统语言`,"jc_Take browser position":`从浏览器获取位置`,"jc_Take position from system settings":`从系统设置中获取位置`,jc_Template:`模板`,"jc_Use all available let's encrypt certificates":`使用所有可用的让我们加密证书`,"jc_Use system settings for position":`使用系统设置定位`,"jc_Used system settings":`使用的系统设置`,jc_ValidTill:`有效期至`,jc_Version:`版本`,"jc_YAML editor":`YAML 编辑器`,jc_Yes:`是的`,"jc_You can filter entries by entering here some text":`您可以通过在此处输入一些文本来过滤条目`,"jc_[JsonConfig] Failed to open JSON File":`[JsonConfig] 打开 JSON 文件失败`,"jc_[JsonConfig] Failed to parse JSON file":`[JsonConfig] 解析 JSON 文件失败`,jc___different__:`不同的`,jc_false:`错误的`,jc_locally:`本地`,jc_none:`没有任何`,jc_repeat:`重复`,jc_true:`真的`,"jc_via internet":`通过互联网`,sch_all:`全选`}});var MO={root:{width:`100%`,height:`100%`}},NO=class extends s{constructor(e){super(e),K(this,`forceUpdateHandlers`,void 0),K(this,`errorTimeout`,null),K(this,`errorCached`,null),K(this,`oContext`,void 0),K(this,`cachedObjects`,{}),K(this,`onCommandRunning`,e=>this.setState({commandRunning:e})),K(this,`onAlive`,(e,t)=>{!!(t!=null&&t.val)!==this.state.alive&&this.setState({alive:!!(t!=null&&t.val)})}),K(this,`onChange`,(e,t,n,r)=>{if(this.props.onValueChange)this.props.onValueChange(e,t,!!r),n==null||n();else if(e&&this.props.onChange){let t={changed:JSON.stringify(e)!==this.state.originalData};this.setState(t,()=>{var i,a;(i=(a=this.props).onChange)==null||i.call(a,e,!!t.changed,!!r),n==null||n()})}else if(r){var i,a;(i=(a=this.props).onChange)==null||i.call(a,null,void 0,r)}}),K(this,`onError`,(e,t)=>{this.errorCached=this.errorCached||JSON.parse(JSON.stringify(this.state.errors));let n=this.errorCached;n&&e&&(t?n[e]=t:delete n[e]),this.errorTimeout&&=(clearTimeout(this.errorTimeout),null),JSON.stringify(n)===JSON.stringify(this.state.errors)?this.errorCached=null:this.errorTimeout=setTimeout(()=>this.setState({errors:this.errorCached||{}},()=>{this.errorTimeout=null,this.errorCached=null,this.props.onError(!!Object.keys(this.state.errors).length)}),50)}),K(this,`getCachedObject`,async e=>{if(this.cachedObjects[e]!==void 0)return this.cachedObjects[e];try{this.cachedObjects[e]=await this.props.socket.getObject(e)??null}catch(t){console.error(t),this.cachedObjects[e]=null}return this.cachedObjects[e]}),K(this,`changeLanguage`,()=>{this.forceUpdate()}),K(this,`forceAttrUpdate`,(e,t)=>{Array.isArray(e)?e.forEach(e=>this.forceUpdateHandlers[e]&&this.forceUpdateHandlers[e](t)):this.forceUpdateHandlers[e]&&this.forceUpdateHandlers[e](t)}),K(this,`registerOnForceUpdate`,(e,t)=>{t?this.forceUpdateHandlers[e]=t:this.forceUpdateHandlers[e]&&delete this.forceUpdateHandlers[e]}),this.state={originalData:JSON.stringify(this.props.data),changed:!1,errors:{},updateData:this.props.updateData||0,systemConfig:null,alive:!1,commandRunning:!1,schema:JSON.parse(JSON.stringify(this.props.schema))},this.forceUpdateHandlers={},this.buildDependencies(this.state.schema),this.readData().catch(e=>console.error(`Cannot read data: ${e}`))}static getDerivedStateFromProps(e,t){return e.updateData===t.updateData?null:{updateData:e.updateData,originalData:JSON.stringify(e.data),schema:JSON.parse(JSON.stringify(e.schema))}}static async loadI18n(e,t,n){if(t===!0||t&&typeof t==`string`){let r=J.getLanguage(),i=typeof t==`string`?t:`i18n`,a=await e.fileExists(`${n}.admin`,`${i}/${r}.json`),o;if(a?o=`${i}/${r}.json`:(a=await e.fileExists(`${n}.admin`,`${i}/${r}/translations.json`),a?o=`${i}/${r}/translations.json`:r!==`en`&&(a=await e.fileExists(`${n}.admin`,`${i}/en.json`),a?o=`${i}/en.json`:(a=await e.fileExists(`${n}.admin`,`${i}/en/translations.json`),a&&(o=`${i}/en/translations.json`)))),o){let t=await e.readFile(`${n}.admin`,o),i;i=t.file===void 0?t:t.file;try{let e=JSON.parse(i);J.extendTranslations(e,r)}catch(e){return console.error(`Cannot parse language file "${n}.admin/${o}: ${e}`),``}return o}return console.warn(`Cannot find i18n for ${n} / ${o}`),``}return t&&typeof t==`object`&&J.extendTranslations(t),``}async readData(){let e;try{e=this.props.socket.getCompactSystemConfig?await this.props.socket.getCompactSystemConfig():await this.getCachedObject(`system.config`)||void 0;let t=await this.props.socket.getState(`system.adapter.${this.props.adapterName}.${this.props.instance}.alive`);this.setState({systemConfig:(e==null?void 0:e.common)||{},alive:!!(t!=null&&t.val)},()=>{this.updateContext(!0),this.props.custom||this.props.socket.subscribeState(`system.adapter.${this.props.adapterName}.${this.props.instance}.alive`,this.onAlive)})}catch(e){console.error(`Cannot read system config: ${e}`)}}flatten(e,t){return t||={},e.items&&Object.keys(e.items).forEach(n=>{t[n]=e.items[n],this.flatten(e.items[n],t)}),t}buildDependencies(e){let t=this.flatten(e);Object.keys(t).forEach(e=>{var n,r,i,a,o;if((n=t[e].confirm)!=null&&n.alsoDependsOn){var s;(s=t[e].confirm)==null||s.alsoDependsOn.forEach(n=>{if(!t[n])console.error(`[JsonConfigComponent] Attribute ${n} does not exist!`),n.startsWith(`data.`)&&console.warn(`[JsonConfigComponent] please use "${n.replace(/^data\./,``)}" instead of "${n}"`);else{t[n].confirmDependsOn=t[n].confirmDependsOn||[];let r={...t[e],attr:e};r.confirm&&(r.confirm.cancel=`Undo`),t[n].confirmDependsOn.push(r)}})}if((r=t[e].onChange)!=null&&r.alsoDependsOn){var c;(c=t[e].onChange)==null||c.alsoDependsOn.forEach(n=>{if(!t[n])console.error(`[JsonConfigComponent] Attribute ${n} does not exist!`),n.startsWith(`data.`)&&console.warn(`[JsonConfigComponent] please use "${n.replace(/^data\./,``)}" instead of "${n}"`);else{t[n].onChangeDependsOn=t[n].onChangeDependsOn||[];let r={...t[e],attr:e};t[n].onChangeDependsOn.push(r)}})}if((i=t[e].hidden)!=null&&i.alsoDependsOn){var l;(l=t[e].hidden)==null||l.alsoDependsOn.forEach(n=>{if(!t[n])console.error(`[JsonConfigComponent] Attribute ${n} does not exist!`),n.startsWith(`data.`)&&console.warn(`[JsonConfigComponent] please use "${n.replace(/^data\./,``)}" instead of "${n}"`);else{t[n].hiddenDependsOn=t[n].hiddenDependsOn||[];let r={...t[e],attr:e};t[n].hiddenDependsOn.push(r)}})}if((a=t[e].label)!=null&&a.alsoDependsOn){var u;(u=t[e].label)==null||u.alsoDependsOn.forEach(n=>{if(!t[n])console.error(`[JsonConfigComponent] Attribute ${n} does not exist!`),n.startsWith(`data.`)&&console.warn(`[JsonConfigComponent] please use "${n.replace(/^data\./,``)}" instead of "${n}"`);else{t[n].labelDependsOn=t[n].labelDependsOn||[];let r={...t[e],attr:e};t[n].labelDependsOn.push(r)}})}if((o=t[e].help)!=null&&o.alsoDependsOn){var d;(d=t[e].help)==null||d.alsoDependsOn.forEach(n=>{if(!t[n])console.error(`[JsonConfigComponent] Attribute ${n} does not exist!`),n.startsWith(`data.`)&&console.warn(`[JsonConfigComponent] please use "${n.replace(/^data\./,``)}" instead of "${n}"`);else{t[n].helpDependsOn=t[n].helpDependsOn||[];let r={...t[e],attr:e};t[n].helpDependsOn.push(r)}})}})}updateContext(e){this.oContext={DeviceManager:this.props.DeviceManager,adapterName:this.props.adapterName,changeLanguage:this.changeLanguage,common:this.props.common,customs:this.props.customs,dateFormat:this.props.dateFormat,embedded:this.props.embedded,forceUpdate:this.forceAttrUpdate,imagePrefix:this.props.imagePrefix,instance:this.props.instance,instanceObj:this.props.instanceObj,isFloatComma:this.props.isFloatComma,multiEdit:this.props.multiEdit,onBackEndCommand:this.props.onBackEndCommand,onCommandRunning:this.onCommandRunning,onValueChange:this.props.onValueChange,registerOnForceUpdate:this.registerOnForceUpdate,socket:this.props.socket,systemConfig:this.state.systemConfig,theme:this.props.theme,themeType:this.props.themeType,_themeName:this.props.themeName,updateData:this.state.updateData,getCachedObject:this.getCachedObject},e&&this.forceUpdate()}renderItem(e){return this.oContext?e.type===`tabs`?_.createElement(jO,{withoutSaveButtons:this.props.withoutSaveButtons,oContext:this.oContext,alive:this.state.alive,changed:this.state.changed,commandRunning:this.state.commandRunning,common:this.props.common,custom:this.props.custom,customObj:this.props.customObj,data:this.props.data,onChange:this.onChange,onError:(e,t)=>this.onError(e,t),originalData:JSON.parse(this.state.originalData),root:!0,schema:e,expertMode:this.props.expertMode,themeName:this.props.themeName,customComponents:this.props.customComponents}):e.type===`panel`||!e.type?_.createElement(kO,{withoutSaveButtons:this.props.withoutSaveButtons,oContext:this.oContext,alive:this.state.alive,changed:this.state.changed,commandRunning:this.state.commandRunning,common:this.props.common,custom:this.props.custom,customObj:this.props.customObj,data:this.props.data,expertMode:this.props.expertMode,index:1e3,isParentTab:!this.props.embedded&&!this.props.withoutSaveButtons,onChange:this.onChange,onError:(e,t)=>this.onError(e,t),originalData:JSON.parse(this.state.originalData),root:!0,schema:e,themeName:this.props.themeName,customComponents:this.props.customComponents}):(console.error(`Unknown item type in root: ${JSON.stringify(e)}`),null):null}render(){return!this.state.systemConfig||!this.oContext?_.createElement(Ze,null):(this.oContext._themeName!==this.props.themeName&&(this.oContext._themeName=this.props.themeName,setTimeout(()=>this.updateContext(!0),0)),_.createElement(`div`,{style:{...!this.props.embedded||this.props.withoutSaveButtons?MO.root:void 0,...this.props.style,...this.state.schema.style}},this.renderItem(this.state.schema)))}};g();var PO={root:{width:`100%`,height:`100%`,overflow:`hidden`,position:`relative`},scroll:{height:`calc(100% - 48px)`,overflowY:`auto`},exportImportButtons:{position:`absolute`,top:5,right:0,zIndex:3},button:{marginRight:`5px`},tooltip:{pointerEvents:`none`}};function FO(e,t){let n=``;for(let r=0;r<t.length;r++)n+=String.fromCharCode(e[r%e.length].charCodeAt(0)^t.charCodeAt(r));return n}function IO(e,t){let n=``;for(let r=0;r<t.length;r++)n+=String.fromCharCode(e[r%e.length].charCodeAt(0)^t.charCodeAt(r));return n}function LO(e,t){if(typeof t!=`string`)return t;if(!t.startsWith(`$/aes-192-cbc:`)||!/^[0-9a-f]{48}$/.test(e))return FO(e,t);let n=t.split(`:`,3),r=window.CryptoJS.enc.Hex.parse(e),i=window.CryptoJS.enc.Hex.parse(n[1]),a=window.CryptoJS.lib.CipherParams.create({ciphertext:window.CryptoJS.enc.Hex.parse(n[2])}),o=window.CryptoJS.AES.decrypt(a,r,{iv:i});return window.CryptoJS.enc.Utf8.stringify(o)}function RO(e,t,n){if(typeof t!=`string`)return t;if(!/^[0-9a-f]{48}$/.test(e))return IO(e,t);let r;r=n?window.CryptoJS.enc.Hex.parse(n):window.CryptoJS.lib.WordArray.random(128/8);let i=window.CryptoJS.enc.Hex.parse(e),a=window.CryptoJS.AES.encrypt(t,i,{iv:r}).ciphertext;return`$/aes-192-cbc:${window.CryptoJS.enc.Hex.stringify(r)}:${a}`}function zO(e,t){var n;return!t||!document.getElementById(t)?new Promise(n=>{let r=document.createElement(`script`);r.setAttribute(`id`,t),r.onload=n,r.src=e,document.getElementsByTagName(`head`)[0].appendChild(r)}):(n=document.getElementById(t))==null?void 0:n.onload}var BO=class extends It{constructor(e){super(e),K(this,`fileSubscribed`,[]),K(this,`fileLangSubscribed`,``),K(this,`secret`,void 0),K(this,`handleFileSelect`,e=>{let t=e.target.files[0];if(t){let e=new FileReader;e.onload=e=>{if(!e.target)return;let t=e.target.result;try{let e=JSON.parse(t);this.setState({data:e,changed:JSON.stringify(e)!==JSON.stringify(this.state.originalData)})}catch{window.alert(J.t(`jc_[JsonConfig] Failed to parse JSON file`))}},e.readAsText(t)}else window.alert(J.t(`jc_[JsonConfig] Failed to open JSON File`))}),K(this,`onFileChange`,async(e,t,n)=>{if(e===`${this.props.adapterName}.admin`&&n){if(t===this.fileLangSubscribed)try{var r;await NO.loadI18n(this.props.socket,(r=this.state.schema)==null?void 0:r.i18n,this.props.adapterName),this.setState({hash:`${this.state.hash}1`})}catch{}else if(this.fileSubscribed.includes(t))try{let e=await this.getConfigFile(this.fileSubscribed[0]);this.setState({schema:e||void 0,hash:(0,Es.default)(JSON.stringify(e)).toString()})}catch{}}}),this.state={updateData:0,changed:!1,confirmDialog:!1,theme:Un(e.themeName),saveConfigDialog:!1,hash:`_`},this.secret=e.secret||``,this.getInstanceObject().then(e=>this.getConfigFile().then(t=>NO.loadI18n(this.props.socket,t==null?void 0:t.i18n,this.props.adapterName).then(n=>{n&&(this.fileLangSubscribed||(this.fileLangSubscribed=n,this.props.socket.subscribeFiles(`${this.props.adapterName}.admin`,this.fileLangSubscribed,this.onFileChange))),e?this.setState({schema:t||void 0,data:e.native,common:e.common,hash:(0,Es.default)(JSON.stringify(t)).toString()}):window.alert(`Instance system.adapter.${this.props.adapterName}.${this.props.instance} not found!`)})))}componentWillUnmount(){super.componentWillUnmount(),this.fileSubscribed.length&&(this.props.socket.unsubscribeFiles(`${this.props.adapterName}.admin`,this.fileSubscribed,this.onFileChange),this.fileSubscribed=[]),this.fileLangSubscribed&&=(this.props.socket.unsubscribeFiles(`${this.props.adapterName}.admin`,this.fileLangSubscribed,this.onFileChange),``)}getExportImportButtons(){return _.createElement(`div`,{style:PO.exportImportButtons},_.createElement(Ce,{title:this.props.t(`jc_Import settings from JSON file`),slotProps:{popper:{sx:PO.tooltip}}},_.createElement(Jn,{size:`small`,sx:{"&.MuiFab-root":PO.button},onClick:()=>{let e=document.createElement(`input`);e.setAttribute(`type`,`file`),e.setAttribute(`id`,`files`),e.setAttribute(`opacity`,0),e.addEventListener(`change`,e=>this.handleFileSelect(e),!1),e.click()}},_.createElement(lr,null))),_.createElement(Ce,{title:this.props.t(`jc_Export setting to JSON file`),slotProps:{popper:{sx:PO.tooltip}}},_.createElement(Jn,{size:`small`,sx:{"&.MuiFab-root":PO.button},onClick:()=>{this.state.data&&Zt.generateFile(`${this.props.adapterName}.${this.props.instance}.json`,this.state.data)}},_.createElement(lr,{style:{transform:`rotate(180deg)`}}))))}async getInstanceObject(){try{let t=await this.props.socket.getObject(`system.adapter.${this.props.adapterName}.${this.props.instance}`);if(Array.isArray(t==null?void 0:t.encryptedNative)){var e;if(!this.secret){let e=await this.props.socket.getSystemConfig();await zO(`../../lib/js/crypto-js/crypto-js.js`,`crypto-js`),this.secret=e.native.secret}return(e=t.encryptedNative)==null||e.forEach(e=>{t.native[e]&&(t.native[e]=LO(this.secret,t.native[e]))}),t}return t||null}catch(e){window.alert(`[JsonConfig] Cannot read instance object: ${e}`)}return null}renderDialogConfirm(){return this.state.confirmDialog?_.createElement(bn,{title:J.t(`jc_Please confirm`),text:J.t(`jc_Some data are not stored. Discard?`),ok:J.t(`jc_Discard`),cancel:J.t(`jc_Cancel`),onClose:e=>this.setState({confirmDialog:!1},()=>e&&It.doNavigate(null))}):null}async scanForInclude(e,t){if(typeof e[`#include`]==`string`){let n=await this._getConfigFile(e[`#include`],[...t]);return delete e[`#include`],n&&(e={...e,...n}),e}let n=Object.keys(e);for(let r=0;r<n.length;r++)e[n[r]]&&typeof e[n[r]]==`object`&&(e[n[r]]=await this.scanForInclude(e[n[r]],t));return e}async getConfigFile(e){return this._getConfigFile(e)}async _getConfigFile(e,t){if(e||=`jsonConfig.json5`,t||=[],t.includes(e))return window.alert(`[JsonConfig] Circular reference in file: ${e} => ${t.join(` => `)}`),null;t.push(e);try{await this.props.socket.fileExists(`${this.props.adapterName}.admin`,e)||(e=`jsonConfig.json`);let n=await this.props.socket.readFile(`${this.props.adapterName}.admin`,e),r=``,i=``;if(n.file!==void 0&&(i=n.file),typeof i==`string`)r=i;else if(i.type===`Buffer`){let e=``,t=new Uint8Array(i.data),n=t.byteLength;for(let r=0;r<n;r++)e+=String.fromCharCode(t[r]);r=e}this.fileSubscribed.includes(e)||(this.fileSubscribed.push(e),await this.props.socket.subscribeFiles(`${this.props.adapterName}.admin`,e,this.onFileChange));try{return await this.scanForInclude(Ts.default.parse(r),t)}catch(e){window.alert(`[JsonConfig] Cannot parse json5 config!`),console.log(e)}}catch(t){this.state.schema||window.alert(`[JsonConfig] Cannot read file "${e}: ${t}`)}return null}renderSaveConfigDialog(){return this.state.saveConfigDialog?_.createElement(bn,{title:J.t(`jc_Please confirm`),text:J.t(`jc_Save configuration?`),ok:J.t(`jc_Save`),cancel:J.t(`jc_Cancel`),onClose:e=>this.setState({saveConfigDialog:!1},()=>e&&this.onSave(!0))}):null}findAttr(e,t){if(t||=this.state.schema,t!=null&&t.items){if(e in t.items)return t.items[e];for(let n of Object.values(t.items)){let t=this.findAttr(e,n);if(t)return t}}return null}postProcessing(e,t,n){if(n||=this.state.schema,!e){console.error(`Data is empty in postProcessing: ${t}, ${JSON.stringify(n)}`);return}let r=e[t];if(n.items)if(n.type===`table`){let e=r;if(!Array.isArray(e))return;for(let t of e)if(n.items)for(let e of n.items)e.attr&&this.postProcessing(t,e.attr,e)}else for(let[t,r]of Object.entries(n.items)){if(r.type===`panel`||r.type===`tabs`||r.type===`accordion`)return;this.postProcessing(e,t,r)}else if(t&&typeof r==`string`)if(n.type===`text`)n.trim!==!1&&(e[t]=r.trim());else if(n.type===`ip`)e[t]=r.trim();else if(n.type===`number`){let i=parseFloat(r.toString().replace(`,`,`.`));e[t]=n.min!==void 0&&i<n.min?n.min:n.max!==void 0&&i>n.max?n.max:i}else if(n.type===`port`){let i=parseInt(r.toString(),10);n.min!==void 0&&i<n.min?e[t]=n.min:n.max!==void 0&&i>n.max&&(e[t]=n.max),e[t]=e[t]!==0&&i<20?20:i>65535?65535:i}else n.type===`checkbox`&&(e[t]=e[t]===!0||e[t]===`true`||e[t]===`on`||e[t]===1||e[t]===`1`)}async onSave(e,t){if(e){let e=await this.getInstanceObject();if(!e){console.error(`Something went wrong: may be no connection?`),window.alert(`Something went wrong: may be no connection?`);return}if(!this.state.data||!this.state.schema)return;let n={};for(let t of Object.keys(this.state.data)){let r=this.findAttr(t);(!r||!r.doNotSave||r.type===`state`)&&!t.startsWith(`_`)?X.setValue(e.native,t,this.state.data[t]):(X.setValue(e.native,t,null),n[t]=this.state.data[t])}try{let t=JSON.parse(JSON.stringify(e));if(Array.isArray(t.encryptedNative)){await zO(`../../lib/js/crypto-js/crypto-js.js`,`crypto-js`);for(let e of t.encryptedNative)t.native[e]&&(t.native[e]=RO(this.secret,t.native[e]))}await this.props.socket.setObject(t._id,t)}catch(e){window.alert(`[JsonConfig] Cannot set object: ${e}`)}let r={...e.native,...n};console.log(r),this.setState({changed:!1,data:r,updateData:this.state.updateData+1,originalData:r},()=>t&&It.doNavigate(null))}else this.state.changed?this.setState({confirmDialog:!0}):It.doNavigate(null)}componentDidUpdate(e,t){t.changed!==this.state.changed&&this.props.configStored(!this.state.changed)}async componentDidMount(){let e=`${window.location.protocol}//${window.location.host}${window.location.pathname}validate_config/${this.props.adapterName}`;console.log(`fetch ${e}`),await fetch(e)}render(){return!this.state.data||!this.state.schema?_.createElement(Ze,null):_.createElement(`div`,{style:PO.root},this.renderDialogConfirm(),this.getExportImportButtons(),this.renderSaveConfigDialog(),_.createElement(NO,{key:this.state.hash,style:PO.scroll,socket:this.props.socket,themeName:this.props.themeName,themeType:this.props.themeType,adapterName:this.props.adapterName,instance:this.props.instance,isFloatComma:this.props.isFloatComma,dateFormat:this.props.dateFormat,schema:this.state.schema,common:this.state.common,expertMode:this.props.expertMode,data:this.state.data,updateData:this.state.updateData,onError:e=>this.setState({error:e}),onChange:(e,t,n)=>{n&&this.state.error&&(window.alert(J.t(`jc_Cannot save configuration because of error in configuration`)),n=!1),n&&!this.state.changed&&!t&&(n=!1),e?this.setState({data:e,changed:!!t,saveConfigDialog:n}):n!==void 0&&this.setState({saveConfigDialog:n})},DeviceManager:this.props.DeviceManager,theme:this.state.theme,customComponents:this.props.customComponents,imagePrefix:`.`}),_.createElement(Ut,{isIFrame:!1,dense:!0,paddingLeft:0,newReact:!0,theme:this.state.theme,noTextOnButtons:this.props.width===`xs`||this.props.width===`sm`||this.props.width===`md`,changed:!!(this.state.error||this.state.changed),error:!!this.state.error,onSave:e=>this.onSave(!0,e),onClose:()=>this.onSave(!1)}))}},VO=t({ConfigGeneric:()=>X,ConfigPanel:()=>kO,GUI_API_GENERATION:()=>2,JsonConfig:()=>BO,JsonConfigComponent:()=>NO,checkGuiApiCompatibility:()=>yc}),HO=t({ConfigGeneric:()=>YO,ConfigPanel:()=>JO,GUI_API_GENERATION:()=>WO,JsonConfig:()=>KO,JsonConfigComponent:()=>qO,checkGuiApiCompatibility:()=>GO,default:()=>XO}),UO=VO,WO=UO.GUI_API_GENERATION,GO=UO.checkGuiApiCompatibility,KO=UO.JsonConfig,qO=UO.JsonConfigComponent,JO=UO.ConfigPanel,YO=UO.ConfigGeneric,XO=Reflect.get(VO,`default`)??VO,ZO=`__mf_module_cache__`;globalThis[ZO]||={share:{},remote:{}},globalThis[ZO].share||={},globalThis[ZO].remote||={};var QO=globalThis[ZO];for(let e of Object.keys(QO.share))if(e.startsWith(`default:`)){let t=e.slice(8);QO.share[t]===void 0&&(QO.share[t]=QO.share[e])}else if(!e.includes(`:`)){let t=`default:`+e;QO.share[t]===void 0&&(QO.share[t]=QO.share[e])}var $O=(e,t)=>{let n=e[t.canonical];if(n!==void 0)return n;let r=t.aliases||[];for(let n of r){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let r=e[n];if(r!==void 0)return e[t.canonical]=r,r}},ek=Symbol.for(`module-federation.shared-cache-listeners`),tk=e=>{let t=e[ek];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,ek,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},nk=(e,t,n)=>{let r=tk(e);(r[t.canonical]||=new Set).add(n)},rk=Symbol.for(`module-federation.shared-cache-owners`),ik=e=>{let t=e[rk];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,rk,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},ak=(e,t,n,r)=>{var i;e[t.canonical]=n;let a=t.aliases||[];for(let t of a)Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0});let o=e[rk];r===void 0?o&&delete o[t.canonical]:ik(e)[t.canonical]=r;let s=(i=e[ek])==null?void 0:i[t.canonical];if(s)for(let e of s)e(n);return n},ok=e=>{let t=(()=>{let t=e;for(let e=0;e<5;e++){let e=t==null?void 0:t.default;if(!e||typeof e!=`object`)break;let n=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})();return t&&Object.getPrototypeOf(t)===null?Object.assign({},t):t},sk=$O(QO.share,{canonical:`default:@iobroker/json-config`,aliases:[`@iobroker/json-config`]});sk===void 0&&(sk=ok(HO),ak(QO.share,{canonical:`default:@iobroker/json-config`,aliases:[`@iobroker/json-config`]},sk,`ConfigCustomJavascriptSet`));var ck,lk=e=>{e.GUI_API_GENERATION,e.checkGuiApiCompatibility,e.JsonConfig,e.JsonConfigComponent,e.ConfigPanel,ck=e.ConfigGeneric,(()=>{let t=e;for(let e=0;e<5;e++){let e=t==null?void 0:t.default;if(!e||typeof e!=`object`)return e??t;t=e}return t})()};nk(QO.share,{canonical:`default:@iobroker/json-config`,aliases:[`@iobroker/json-config`]},lk),lk(sk);export{ty as a,ps as c,Dx as i,HO as n,vs as o,Tx as r,hs as s,ck as t};
|