aiware-js 2.22.0 → 2.25.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.
Files changed (57) hide show
  1. package/index.esm.css +390 -90
  2. package/index.esm.js +1 -1
  3. package/js-core.esm.js +10 -10
  4. package/js-core.esm12.js +1 -1
  5. package/js-core.esm13.js +1 -1
  6. package/js-core.esm14.js +1 -1
  7. package/js-core.esm15.js +1 -1
  8. package/js-core.esm16.js +1 -1
  9. package/js-core.esm17.js +1 -1
  10. package/js-core.esm18.js +1 -230
  11. package/js-core.esm19.js +1 -78
  12. package/js-core.esm20.js +230 -1
  13. package/js-core.esm21.js +78 -1
  14. package/js-core.esm22.js +1 -1
  15. package/js-core.esm23.js +1 -1
  16. package/js-core.esm24.js +1 -1
  17. package/js-core.esm25.js +1 -1
  18. package/js-core.esm26.js +1 -1
  19. package/js-core.esm27.js +1 -1
  20. package/js-core.esm28.js +1 -1
  21. package/js-core.esm29.js +1 -1
  22. package/js-core.esm30.js +1 -14
  23. package/js-core.esm31.js +1 -12
  24. package/js-core.esm32.js +7 -47
  25. package/js-core.esm33.js +12 -1
  26. package/js-core.esm34.js +54 -1
  27. package/js-core.esm35.js +1 -108
  28. package/js-core.esm36.js +1 -1
  29. package/js-core.esm37.js +92 -198
  30. package/js-core.esm38.js +1 -37
  31. package/js-core.esm39.js +214 -1
  32. package/js-core.esm4.js +1 -1
  33. package/js-core.esm40.js +1 -1
  34. package/js-core.esm41.js +1 -1
  35. package/js-core.esm42.js +1 -1
  36. package/js-core.esm43.js +37 -1
  37. package/js-core.esm44.js +1 -31
  38. package/js-core.esm45.js +1 -32
  39. package/js-core.esm46.js +1 -53
  40. package/js-core.esm47.js +1 -1
  41. package/js-core.esm48.js +26 -115
  42. package/js-core.esm49.js +28 -83
  43. package/js-core.esm5.js +2 -2
  44. package/js-core.esm50.js +85 -1
  45. package/js-core.esm51.js +1 -0
  46. package/js-core.esm52.js +132 -0
  47. package/js-core.esm53.js +87 -0
  48. package/js-core.esm54.js +1 -0
  49. package/js-core.esm55.js +15 -0
  50. package/js-core.esm56.js +10 -0
  51. package/js-core.esm7.js +4 -4
  52. package/js-core.umd.css +300 -0
  53. package/js-core.umd.js +210 -143
  54. package/locales/en.json +1 -1
  55. package/locales/es.json +1 -1
  56. package/locales/fr.json +1 -1
  57. package/package.json +4 -2
package/js-core.esm46.js CHANGED
@@ -1,53 +1 @@
1
- import{bc as createSvgIcon,j as jsxRuntime,H as createSlice,cd as createSelector,O as rootApiSelector,R as graphEndpointSelector,Q as sessionTokenSelector,cc as combineReducers,F as FormattedMessage,m as makeStyles,B as Box,T as Typography,eE as injectIntl,k as useSelector,i as useDispatch,r as react,ae as Skeleton,a7 as Divider,fN as ErrorState,a8 as Tooltip,a9 as IconButton,bU as Hide,fX as ConfirmationModal,cf as AIWareThemeProvider,K as lib,A as AIWareIntlProvider,bw as CacheProvider,bx as muiCache,a2 as all,fM as selectIsUserAdmin,dh as useIntl,bi as React,cx as CustomTabs,w as TextField,cm as InputAdornment,cl as default_1,ck as TabPanel,ez as userSelector,at as Button,fb as betaFeaturesSelector,G as Grid,g5 as NoApps,eb as hidePanel,aY as default_1$1,Z as List,d4 as takeEvery$1,cy as useBackupImg,cz as img$1u,p as lodash,S as Switch,fP as NullState,bM as Avatar,fL as selectOrgId,$ as ListItem,eJ as ListItemAvatar,a1 as ListItemText,cg as Stack,g6 as green,fS as Lock,eO as ListItemSecondaryAction,cq as mountPanel,ai as select,ah as put,ak as call$g,M as preferredLanguageSelector,bV as showMessage,bW as MessageSeverity,aV as Select,aW as MenuItem,b4 as AIWareFormatMessage,cB as baseGraphQLApiWithError}from"./js-core.esm.js";import{C as Container}from"./js-core.esm21.js";import{A as Autocomplete}from"./js-core.esm20.js";import{C as Chip$1}from"./js-core.esm26.js";var match$1,version,store,wmget,wmhas,wmset,set$1,get,has,STATE,activeXDocument,IteratorPrototype$2,PrototypeOfArrayIteratorPrototype,arrayIterator,Add=createSvgIcon(jsxRuntime.exports.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add"),commonjsGlobal=(!function(){var e={};try{if(process)return process.env=Object.assign({},process.env),Object.assign(process.env,e)}catch(e){}globalThis.process={env:e}}(),"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{}),check=function(e){return e&&e.Math==Math&&e},global$k=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof commonjsGlobal&&commonjsGlobal)||function(){return this}()||Function("return this")(),objectGetOwnPropertyDescriptor={},fails$h=function(e){try{return!!e()}catch(e){return!0}},fails$g=fails$h,descriptors=!fails$h(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),fails$f=fails$h,functionBindNative=!fails$h(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),NATIVE_BIND$3=functionBindNative,call$f=Function.prototype.call,functionCall=NATIVE_BIND$3?call$f.bind(call$f):function(){return call$f.apply(call$f,arguments)},objectPropertyIsEnumerable={},$propertyIsEnumerable={}.propertyIsEnumerable,getOwnPropertyDescriptor$2=Object.getOwnPropertyDescriptor,NASHORN_BUG=getOwnPropertyDescriptor$2&&!$propertyIsEnumerable.call({1:2},1),createPropertyDescriptor$4=(objectPropertyIsEnumerable.f=NASHORN_BUG?function(e){e=getOwnPropertyDescriptor$2(this,e);return!!e&&e.enumerable}:$propertyIsEnumerable,function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}),NATIVE_BIND$2=functionBindNative,FunctionPrototype$2=Function.prototype,bind$5=FunctionPrototype$2.bind,call$e=FunctionPrototype$2.call,uncurryThis$i=NATIVE_BIND$2&&bind$5.bind(call$e,call$e),functionUncurryThis=NATIVE_BIND$2?function(e){return e&&uncurryThis$i(e)}:function(e){return e&&function(){return call$e.apply(e,arguments)}},uncurryThis$h=functionUncurryThis,toString$6=uncurryThis$h({}.toString),stringSlice$1=uncurryThis$h("".slice),classofRaw$1=function(e){return stringSlice$1(toString$6(e),8,-1)},uncurryThis$g=functionUncurryThis,fails$e=fails$h,classof$6=classofRaw$1,$Object$4=Object,split=functionUncurryThis("".split),indexedObject=fails$e(function(){return!$Object$4("z").propertyIsEnumerable(0)})?function(e){return"String"==classof$6(e)?split(e,""):$Object$4(e)}:$Object$4,$TypeError$e=TypeError,requireObjectCoercible$4=function(e){if(null==e)throw $TypeError$e("Can't call method on "+e);return e},IndexedObject$2=indexedObject,requireObjectCoercible$3=requireObjectCoercible$4,toIndexedObject$5=function(e){return IndexedObject$2(requireObjectCoercible$3(e))},isCallable$l=function(e){return"function"==typeof e},isCallable$k=isCallable$l,isObject$8=function(e){return"object"==typeof e?null!==e:isCallable$k(e)},global$j=global$k,isCallable$j=isCallable$l,aFunction=function(e){return isCallable$j(e)?e:void 0},getBuiltIn$8=function(e,t){return arguments.length<2?aFunction(global$j[e]):global$j[e]&&global$j[e][t]},uncurryThis$f=functionUncurryThis,objectIsPrototypeOf=functionUncurryThis({}.isPrototypeOf),getBuiltIn$7=getBuiltIn$8,engineUserAgent=getBuiltIn$8("navigator","userAgent")||"",global$i=global$k,userAgent$5=engineUserAgent,process$4=global$i.process,Deno$1=global$i.Deno,versions=process$4&&process$4.versions||Deno$1&&Deno$1.version,v8=versions&&versions.v8,engineV8Version=version=!(version=v8?0<(match$1=v8.split("."))[0]&&match$1[0]<4?1:+(match$1[0]+match$1[1]):version)&&userAgent$5&&(!(match$1=userAgent$5.match(/Edge\/(\d+)/))||74<=match$1[1])&&(match$1=userAgent$5.match(/Chrome\/(\d+)/))?+match$1[1]:version,V8_VERSION$1=engineV8Version,fails$d=fails$h,nativeSymbol=!!Object.getOwnPropertySymbols&&!fails$d(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&V8_VERSION$1&&V8_VERSION$1<41}),NATIVE_SYMBOL$2=nativeSymbol,useSymbolAsUid=nativeSymbol&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,getBuiltIn$6=getBuiltIn$8,isCallable$i=isCallable$l,isPrototypeOf$4=objectIsPrototypeOf,USE_SYMBOL_AS_UID$1=useSymbolAsUid,$Object$3=Object,isSymbol$2=useSymbolAsUid?function(e){return"symbol"==typeof e}:function(e){var t=getBuiltIn$6("Symbol");return isCallable$i(t)&&isPrototypeOf$4(t.prototype,$Object$3(e))},$String$3=String,tryToString$5=function(e){try{return $String$3(e)}catch(e){return"Object"}},isCallable$h=isCallable$l,tryToString$4=tryToString$5,$TypeError$d=TypeError,aCallable$9=function(e){if(isCallable$h(e))return e;throw $TypeError$d(tryToString$4(e)+" is not a function")},aCallable$8=aCallable$9,getMethod$3=function(e,t){e=e[t];return null==e?void 0:aCallable$8(e)},call$d=functionCall,isCallable$g=isCallable$l,isObject$7=isObject$8,$TypeError$c=TypeError,ordinaryToPrimitive$1=function(e,t){var n,r;if("string"===t&&isCallable$g(n=e.toString)&&!isObject$7(r=call$d(n,e)))return r;if(isCallable$g(n=e.valueOf)&&!isObject$7(r=call$d(n,e)))return r;if("string"!==t&&isCallable$g(n=e.toString)&&!isObject$7(r=call$d(n,e)))return r;throw $TypeError$c("Can't convert object to primitive value")},shared$3={exports:{}},global$h=global$k,defineProperty$6=Object.defineProperty,defineGlobalProperty$3=function(t,n){try{defineProperty$6(global$h,t,{value:n,configurable:!0,writable:!0})}catch(e){global$h[t]=n}return n},global$g=global$k,defineGlobalProperty$2=defineGlobalProperty$3,SHARED="__core-js_shared__",store$3=global$k[SHARED]||defineGlobalProperty$2(SHARED,{}),sharedStore=store$3,store$2=sharedStore,requireObjectCoercible$2=((shared$3.exports=function(e,t){return store$2[e]||(store$2[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.24.1",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.24.1/LICENSE",source:"https://github.com/zloirock/core-js"}),requireObjectCoercible$4),$Object$2=Object,toObject$5=function(e){return $Object$2(requireObjectCoercible$2(e))},uncurryThis$e=functionUncurryThis,toObject$4=toObject$5,hasOwnProperty$1=functionUncurryThis({}.hasOwnProperty),hasOwnProperty_1=Object.hasOwn||function(e,t){return hasOwnProperty$1(toObject$4(e),t)},uncurryThis$d=functionUncurryThis,id=0,postfix=Math.random(),toString$5=uncurryThis$d(1..toString),uid$2=function(e){return"Symbol("+(void 0===e?"":e)+")_"+toString$5(++id+postfix,36)},global$f=global$k,shared$2=shared$3.exports,hasOwn$b=hasOwnProperty_1,uid$1=uid$2,NATIVE_SYMBOL$1=nativeSymbol,USE_SYMBOL_AS_UID=useSymbolAsUid,WellKnownSymbolsStore=shared$2("wks"),Symbol$1=global$f.Symbol,symbolFor=Symbol$1&&Symbol$1.for,createWellKnownSymbol=USE_SYMBOL_AS_UID?Symbol$1:Symbol$1&&Symbol$1.withoutSetter||uid$1,wellKnownSymbol$g=function(e){var t;return hasOwn$b(WellKnownSymbolsStore,e)&&(NATIVE_SYMBOL$1||"string"==typeof WellKnownSymbolsStore[e])||(t="Symbol."+e,NATIVE_SYMBOL$1&&hasOwn$b(Symbol$1,e)?WellKnownSymbolsStore[e]=Symbol$1[e]:WellKnownSymbolsStore[e]=(USE_SYMBOL_AS_UID&&symbolFor?symbolFor:createWellKnownSymbol)(t)),WellKnownSymbolsStore[e]},call$c=functionCall,isObject$6=isObject$8,isSymbol$1=isSymbol$2,getMethod$2=getMethod$3,ordinaryToPrimitive=ordinaryToPrimitive$1,wellKnownSymbol$f=wellKnownSymbol$g,$TypeError$b=TypeError,TO_PRIMITIVE=wellKnownSymbol$g("toPrimitive"),toPrimitive$1=function(e,t){if(!isObject$6(e)||isSymbol$1(e))return e;var n=getMethod$2(e,TO_PRIMITIVE);if(n){if(n=call$c(n,e,t=void 0===t?"default":t),!isObject$6(n)||isSymbol$1(n))return n;throw $TypeError$b("Can't convert object to primitive value")}return ordinaryToPrimitive(e,t=void 0===t?"number":t)},toPrimitive=toPrimitive$1,isSymbol=isSymbol$2,toPropertyKey$3=function(e){e=toPrimitive(e,"string");return isSymbol(e)?e:e+""},global$e=global$k,isObject$5=isObject$8,document$3=global$k.document,EXISTS$1=isObject$5(document$3)&&isObject$5(document$3.createElement),documentCreateElement$2=function(e){return EXISTS$1?document$3.createElement(e):{}},DESCRIPTORS$b=descriptors,fails$c=fails$h,createElement$1=documentCreateElement$2,ie8DomDefine=!descriptors&&!fails$h(function(){return 7!=Object.defineProperty(createElement$1("div"),"a",{get:function(){return 7}}).a}),DESCRIPTORS$a=descriptors,call$b=functionCall,propertyIsEnumerableModule$1=objectPropertyIsEnumerable,createPropertyDescriptor$3=createPropertyDescriptor$4,toIndexedObject$4=toIndexedObject$5,toPropertyKey$2=toPropertyKey$3,hasOwn$a=hasOwnProperty_1,IE8_DOM_DEFINE$1=ie8DomDefine,$getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,objectDefineProperty=(objectGetOwnPropertyDescriptor.f=DESCRIPTORS$a?$getOwnPropertyDescriptor$1:function(e,t){if(e=toIndexedObject$4(e),t=toPropertyKey$2(t),IE8_DOM_DEFINE$1)try{return $getOwnPropertyDescriptor$1(e,t)}catch(e){}if(hasOwn$a(e,t))return createPropertyDescriptor$3(!call$b(propertyIsEnumerableModule$1.f,e,t),e[t])},{}),DESCRIPTORS$9=descriptors,fails$b=fails$h,v8PrototypeDefineBug=descriptors&&fails$h(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),isObject$4=isObject$8,$String$2=String,$TypeError$a=TypeError,anObject$c=function(e){if(isObject$4(e))return e;throw $TypeError$a($String$2(e)+" is not an object")},DESCRIPTORS$8=descriptors,IE8_DOM_DEFINE=ie8DomDefine,V8_PROTOTYPE_DEFINE_BUG$1=v8PrototypeDefineBug,anObject$b=anObject$c,toPropertyKey$1=toPropertyKey$3,$TypeError$9=TypeError,$defineProperty=Object.defineProperty,$getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,ENUMERABLE="enumerable",CONFIGURABLE$1="configurable",WRITABLE="writable",DESCRIPTORS$7=(objectDefineProperty.f=DESCRIPTORS$8?V8_PROTOTYPE_DEFINE_BUG$1?function(e,t,n){var r;return anObject$b(e),t=toPropertyKey$1(t),anObject$b(n),"function"==typeof e&&"prototype"===t&&"value"in n&&WRITABLE in n&&!n[WRITABLE]&&((r=$getOwnPropertyDescriptor(e,t))&&r[WRITABLE]&&(e[t]=n.value,n={configurable:(CONFIGURABLE$1 in n?n:r)[CONFIGURABLE$1],enumerable:(ENUMERABLE in n?n:r)[ENUMERABLE],writable:!1})),$defineProperty(e,t,n)}:$defineProperty:function(e,t,n){if(anObject$b(e),t=toPropertyKey$1(t),anObject$b(n),IE8_DOM_DEFINE)try{return $defineProperty(e,t,n)}catch(e){}if("get"in n||"set"in n)throw $TypeError$9("Accessors not supported");return"value"in n&&(e[t]=n.value),e},descriptors),definePropertyModule$5=objectDefineProperty,createPropertyDescriptor$2=createPropertyDescriptor$4,createNonEnumerableProperty$4=DESCRIPTORS$7?function(e,t,n){return definePropertyModule$5.f(e,t,createPropertyDescriptor$2(1,n))}:function(e,t,n){return e[t]=n,e},makeBuiltIn$2={exports:{}},DESCRIPTORS$6=descriptors,hasOwn$9=hasOwnProperty_1,FunctionPrototype$1=Function.prototype,getDescriptor=DESCRIPTORS$6&&Object.getOwnPropertyDescriptor,EXISTS=hasOwn$9(FunctionPrototype$1,"name"),PROPER=EXISTS&&"something"===function(){}.name,CONFIGURABLE=EXISTS&&(!DESCRIPTORS$6||getDescriptor(FunctionPrototype$1,"name").configurable),functionName={EXISTS:EXISTS,PROPER:PROPER,CONFIGURABLE:CONFIGURABLE},uncurryThis$c=functionUncurryThis,isCallable$f=isCallable$l,store$1=sharedStore,functionToString=functionUncurryThis(Function.toString),inspectSource$4=(isCallable$f(store$1.inspectSource)||(store$1.inspectSource=function(e){return functionToString(e)}),store$1.inspectSource),global$d=global$k,isCallable$e=isCallable$l,inspectSource$3=inspectSource$4,WeakMap$1=global$k.WeakMap,nativeWeakMap=isCallable$e(WeakMap$1)&&/native code/.test(inspectSource$3(WeakMap$1)),shared$1=shared$3.exports,uid=uid$2,keys=shared$1("keys"),sharedKey$3=function(e){return keys[e]||(keys[e]=uid(e))},hiddenKeys$4={},NATIVE_WEAK_MAP=nativeWeakMap,global$c=global$k,uncurryThis$b=functionUncurryThis,isObject$3=isObject$8,createNonEnumerableProperty$3=createNonEnumerableProperty$4,hasOwn$8=hasOwnProperty_1,shared=sharedStore,sharedKey$2=sharedKey$3,hiddenKeys$3=hiddenKeys$4,OBJECT_ALREADY_INITIALIZED="Object already initialized",TypeError$2=global$c.TypeError,WeakMap=global$c.WeakMap,enforce=function(e){return has(e)?get(e):set$1(e,{})},getterFor=function(t){return function(e){if(isObject$3(e)&&(e=get(e)).type===t)return e;throw TypeError$2("Incompatible receiver, "+t+" required")}},internalState=(has=NATIVE_WEAK_MAP||shared.state?(store=shared.state||(shared.state=new WeakMap),wmget=uncurryThis$b(store.get),wmhas=uncurryThis$b(store.has),wmset=uncurryThis$b(store.set),set$1=function(e,t){if(wmhas(store,e))throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);return t.facade=e,wmset(store,e,t),t},get=function(e){return wmget(store,e)||{}},function(e){return wmhas(store,e)}):(STATE=sharedKey$2("state"),hiddenKeys$3[STATE]=!0,set$1=function(e,t){if(hasOwn$8(e,STATE))throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);return t.facade=e,createNonEnumerableProperty$3(e,STATE,t),t},get=function(e){return hasOwn$8(e,STATE)?e[STATE]:{}},function(e){return hasOwn$8(e,STATE)}),{set:set$1,get:get,has:has,enforce:enforce,getterFor:getterFor}),fails$a=fails$h,isCallable$d=isCallable$l,hasOwn$7=hasOwnProperty_1,DESCRIPTORS$5=descriptors,CONFIGURABLE_FUNCTION_NAME$1=functionName.CONFIGURABLE,inspectSource$2=inspectSource$4,InternalStateModule$2=internalState,enforceInternalState=InternalStateModule$2.enforce,getInternalState$1=InternalStateModule$2.get,defineProperty$5=Object.defineProperty,CONFIGURABLE_LENGTH=DESCRIPTORS$5&&!fails$a(function(){return 8!==defineProperty$5(function(){},"length",{value:8}).length}),TEMPLATE=String(String).split("String"),makeBuiltIn$1=makeBuiltIn$2.exports=function(e,t,n){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!hasOwn$7(e,"name")||CONFIGURABLE_FUNCTION_NAME$1&&e.name!==t)&&(DESCRIPTORS$5?defineProperty$5(e,"name",{value:t,configurable:!0}):e.name=t),CONFIGURABLE_LENGTH&&n&&hasOwn$7(n,"arity")&&e.length!==n.arity&&defineProperty$5(e,"length",{value:n.arity});try{n&&hasOwn$7(n,"constructor")&&n.constructor?DESCRIPTORS$5&&defineProperty$5(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}n=enforceInternalState(e);return hasOwn$7(n,"source")||(n.source=TEMPLATE.join("string"==typeof t?t:"")),e},isCallable$c=(Function.prototype.toString=makeBuiltIn$1(function(){return isCallable$d(this)&&getInternalState$1(this).source||inspectSource$2(this)},"toString"),isCallable$l),definePropertyModule$4=objectDefineProperty,makeBuiltIn=makeBuiltIn$2.exports,defineGlobalProperty$1=defineGlobalProperty$3,defineBuiltIn$6=function(e,t,n,r){var i=(r=r||{}).enumerable,a=void 0!==r.name?r.name:t;if(isCallable$c(n)&&makeBuiltIn(n,a,r),r.global)i?e[t]=n:defineGlobalProperty$1(t,n);else{try{r.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=n:definePropertyModule$4.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},objectGetOwnPropertyNames={},ceil=Math.ceil,floor$1=Math.floor,mathTrunc=Math.trunc||function(e){e=+e;return(0<e?floor$1:ceil)(e)},trunc=mathTrunc,toIntegerOrInfinity$2=function(e){e=+e;return e!=e||0==e?0:trunc(e)},toIntegerOrInfinity$1=toIntegerOrInfinity$2,max$1=Math.max,min$1=Math.min,toAbsoluteIndex$2=function(e,t){e=toIntegerOrInfinity$1(e);return e<0?max$1(e+t,0):min$1(e,t)},toIntegerOrInfinity=toIntegerOrInfinity$2,min=Math.min,toLength$1=function(e){return 0<e?min(toIntegerOrInfinity(e),9007199254740991):0},toLength=toLength$1,lengthOfArrayLike$5=function(e){return toLength(e.length)},toIndexedObject$3=toIndexedObject$5,toAbsoluteIndex$1=toAbsoluteIndex$2,lengthOfArrayLike$4=lengthOfArrayLike$5,createMethod$2=function(s){return function(e,t,n){var r,i=toIndexedObject$3(e),a=lengthOfArrayLike$4(i),o=toAbsoluteIndex$1(n,a);if(s&&t!=t){for(;o<a;)if((r=i[o++])!=r)return!0}else for(;o<a;o++)if((s||o in i)&&i[o]===t)return s||o||0;return!s&&-1}},arrayIncludes={includes:createMethod$2(!0),indexOf:createMethod$2(!1)},uncurryThis$a=functionUncurryThis,hasOwn$6=hasOwnProperty_1,toIndexedObject$2=toIndexedObject$5,indexOf=arrayIncludes.indexOf,hiddenKeys$2=hiddenKeys$4,push$1=uncurryThis$a([].push),objectKeysInternal=function(e,t){var n,r=toIndexedObject$2(e),i=0,a=[];for(n in r)!hasOwn$6(hiddenKeys$2,n)&&hasOwn$6(r,n)&&push$1(a,n);for(;t.length>i;)!hasOwn$6(r,n=t[i++])||~indexOf(a,n)||push$1(a,n);return a},enumBugKeys$3=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],internalObjectKeys$1=objectKeysInternal,enumBugKeys$2=enumBugKeys$3,hiddenKeys$1=enumBugKeys$3.concat("length","prototype"),objectGetOwnPropertySymbols=(objectGetOwnPropertyNames.f=Object.getOwnPropertyNames||function(e){return internalObjectKeys$1(e,hiddenKeys$1)},{}),getBuiltIn$5=(objectGetOwnPropertySymbols.f=Object.getOwnPropertySymbols,getBuiltIn$8),uncurryThis$9=functionUncurryThis,getOwnPropertyNamesModule=objectGetOwnPropertyNames,getOwnPropertySymbolsModule$1=objectGetOwnPropertySymbols,anObject$a=anObject$c,concat$1=functionUncurryThis([].concat),ownKeys$1=getBuiltIn$5("Reflect","ownKeys")||function(e){var t=getOwnPropertyNamesModule.f(anObject$a(e)),n=getOwnPropertySymbolsModule$1.f;return n?concat$1(t,n(e)):t},hasOwn$5=hasOwnProperty_1,ownKeys=ownKeys$1,getOwnPropertyDescriptorModule=objectGetOwnPropertyDescriptor,definePropertyModule$3=objectDefineProperty,copyConstructorProperties$2=function(e,t,n){for(var r=ownKeys(t),i=definePropertyModule$3.f,a=getOwnPropertyDescriptorModule.f,o=0;o<r.length;o++){var s=r[o];hasOwn$5(e,s)||n&&hasOwn$5(n,s)||i(e,s,a(t,s))}},fails$9=fails$h,isCallable$b=isCallable$l,replacement=/#|\.prototype\./,isForced$2=function(e,t){e=data[normalize(e)];return e==POLYFILL||e!=NATIVE&&(isCallable$b(t)?fails$9(t):!!t)},normalize=isForced$2.normalize=function(e){return String(e).replace(replacement,".").toLowerCase()},data=isForced$2.data={},NATIVE=isForced$2.NATIVE="N",POLYFILL=isForced$2.POLYFILL="P",isForced_1=isForced$2,global$b=global$k,getOwnPropertyDescriptor$1=objectGetOwnPropertyDescriptor.f,createNonEnumerableProperty$2=createNonEnumerableProperty$4,defineBuiltIn$5=defineBuiltIn$6,defineGlobalProperty=defineGlobalProperty$3,copyConstructorProperties$1=copyConstructorProperties$2,isForced$1=isForced_1,_export=function(e,t){var n,r,i,a=e.target,o=e.global,s=e.stat,l=o?global$b:s?global$b[a]||defineGlobalProperty(a,{}):(global$b[a]||{}).prototype;if(l)for(n in t){if(r=t[n],i=e.dontCallGetSet?(i=getOwnPropertyDescriptor$1(l,n))&&i.value:l[n],!isForced$1(o?n:a+(s?".":"#")+n,e.forced)&&void 0!==i){if(typeof r==typeof i)continue;copyConstructorProperties$1(r,i)}(e.sham||i&&i.sham)&&createNonEnumerableProperty$2(r,"sham",!0),defineBuiltIn$5(l,n,r,e)}},internalObjectKeys=objectKeysInternal,enumBugKeys$1=enumBugKeys$3,objectKeys$2=Object.keys||function(e){return internalObjectKeys(e,enumBugKeys$1)},DESCRIPTORS$4=descriptors,uncurryThis$8=functionUncurryThis,call$a=functionCall,fails$8=fails$h,objectKeys$1=objectKeys$2,getOwnPropertySymbolsModule=objectGetOwnPropertySymbols,propertyIsEnumerableModule=objectPropertyIsEnumerable,toObject$3=toObject$5,IndexedObject$1=indexedObject,$assign=Object.assign,defineProperty$4=Object.defineProperty,concat=uncurryThis$8([].concat),objectAssign=!$assign||fails$8(function(){if(DESCRIPTORS$4&&1!==$assign({b:1},$assign(defineProperty$4({},"a",{enumerable:!0,get:function(){defineProperty$4(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=$assign({},e)[n]||objectKeys$1($assign({},t)).join("")!=r})?function(e,t){for(var n=toObject$3(e),r=arguments.length,i=1,a=getOwnPropertySymbolsModule.f,o=propertyIsEnumerableModule.f;i<r;)for(var s,l=IndexedObject$1(arguments[i++]),c=a?concat(objectKeys$1(l),a(l)):objectKeys$1(l),u=c.length,d=0;d<u;)s=c[d++],DESCRIPTORS$4&&!call$a(o,l,s)||(n[s]=l[s]);return n}:$assign,$$c=_export,assign=objectAssign,objectDefineProperties=(_export({target:"Object",stat:!0,arity:2,forced:Object.assign!==assign},{assign:assign}),{}),DESCRIPTORS$3=descriptors,V8_PROTOTYPE_DEFINE_BUG=v8PrototypeDefineBug,definePropertyModule$2=objectDefineProperty,anObject$9=anObject$c,toIndexedObject$1=toIndexedObject$5,objectKeys=objectKeys$2,getBuiltIn$4=(objectDefineProperties.f=DESCRIPTORS$3&&!V8_PROTOTYPE_DEFINE_BUG?Object.defineProperties:function(e,t){anObject$9(e);for(var n,r=toIndexedObject$1(t),i=objectKeys(t),a=i.length,o=0;o<a;)definePropertyModule$2.f(e,n=i[o++],r[n]);return e},getBuiltIn$8),html$2=getBuiltIn$8("document","documentElement"),anObject$8=anObject$c,definePropertiesModule=objectDefineProperties,enumBugKeys=enumBugKeys$3,hiddenKeys=hiddenKeys$4,html$1=html$2,documentCreateElement$1=documentCreateElement$2,sharedKey$1=sharedKey$3,GT=">",LT="<",PROTOTYPE="prototype",SCRIPT="script",IE_PROTO$1=sharedKey$3("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(e){return LT+SCRIPT+GT+e+LT+"/"+SCRIPT+GT},NullProtoObjectViaActiveX=function(e){e.write(scriptTag("")),e.close();var t=e.parentWindow.Object;return e=null,t},NullProtoObjectViaIFrame=function(){var e=documentCreateElement$1("iframe"),t="java"+SCRIPT+":";return e.style.display="none",html$1.appendChild(e),e.src=String(t),(t=e.contentWindow.document).open(),t.write(scriptTag("document.F=Object")),t.close(),t.F},NullProtoObject=function(){try{activeXDocument=new ActiveXObject("htmlfile")}catch(e){}NullProtoObject="undefined"==typeof document||document.domain&&activeXDocument?NullProtoObjectViaActiveX(activeXDocument):NullProtoObjectViaIFrame();for(var e=enumBugKeys.length;e--;)delete NullProtoObject[PROTOTYPE][enumBugKeys[e]];return NullProtoObject()},objectCreate=(hiddenKeys[IE_PROTO$1]=!0,Object.create||function(e,t){var n;return null!==e?(EmptyConstructor[PROTOTYPE]=anObject$8(e),n=new EmptyConstructor,EmptyConstructor[PROTOTYPE]=null,n[IE_PROTO$1]=e):n=NullProtoObject(),void 0===t?n:definePropertiesModule.f(n,t)}),wellKnownSymbol$e=wellKnownSymbol$g,create$1=objectCreate,defineProperty$3=objectDefineProperty.f,UNSCOPABLES=wellKnownSymbol$e("unscopables"),ArrayPrototype$1=Array.prototype,addToUnscopables$1=(null==ArrayPrototype$1[UNSCOPABLES]&&defineProperty$3(ArrayPrototype$1,UNSCOPABLES,{configurable:!0,value:create$1(null)}),function(e){ArrayPrototype$1[UNSCOPABLES][e]=!0}),iterators={},fails$7=fails$h,correctPrototypeGetter=!fails$h(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),hasOwn$4=hasOwnProperty_1,isCallable$a=isCallable$l,toObject$2=toObject$5,sharedKey=sharedKey$3,CORRECT_PROTOTYPE_GETTER=correctPrototypeGetter,IE_PROTO=sharedKey$3("IE_PROTO"),$Object$1=Object,ObjectPrototype=$Object$1.prototype,objectGetPrototypeOf=CORRECT_PROTOTYPE_GETTER?$Object$1.getPrototypeOf:function(e){e=toObject$2(e);if(hasOwn$4(e,IE_PROTO))return e[IE_PROTO];var t=e.constructor;return isCallable$a(t)&&e instanceof t?t.prototype:e instanceof $Object$1?ObjectPrototype:null},fails$6=fails$h,isCallable$9=isCallable$l,getPrototypeOf$1=objectGetPrototypeOf,defineBuiltIn$4=defineBuiltIn$6,wellKnownSymbol$d=wellKnownSymbol$g,ITERATOR$5=wellKnownSymbol$g("iterator"),BUGGY_SAFARI_ITERATORS$1=!1,NEW_ITERATOR_PROTOTYPE=([].keys&&("next"in(arrayIterator=[].keys())?(PrototypeOfArrayIteratorPrototype=getPrototypeOf$1(getPrototypeOf$1(arrayIterator)))!==Object.prototype&&(IteratorPrototype$2=PrototypeOfArrayIteratorPrototype):BUGGY_SAFARI_ITERATORS$1=!0),null==IteratorPrototype$2||fails$6(function(){var e={};return IteratorPrototype$2[ITERATOR$5].call(e)!==e})),iteratorsCore=(isCallable$9((IteratorPrototype$2=NEW_ITERATOR_PROTOTYPE?{}:IteratorPrototype$2)[ITERATOR$5])||defineBuiltIn$4(IteratorPrototype$2,ITERATOR$5,function(){return this}),{IteratorPrototype:IteratorPrototype$2,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS$1}),defineProperty$2=objectDefineProperty.f,hasOwn$3=hasOwnProperty_1,wellKnownSymbol$c=wellKnownSymbol$g,TO_STRING_TAG$3=wellKnownSymbol$g("toStringTag"),setToStringTag$3=function(e,t,n){(e=e&&!n?e.prototype:e)&&!hasOwn$3(e,TO_STRING_TAG$3)&&defineProperty$2(e,TO_STRING_TAG$3,{configurable:!0,value:t})},IteratorPrototype$1=iteratorsCore.IteratorPrototype,create=objectCreate,createPropertyDescriptor$1=createPropertyDescriptor$4,setToStringTag$2=setToStringTag$3,Iterators$4=iterators,returnThis$1=function(){return this},createIteratorConstructor$1=function(e,t,n,r){t+=" Iterator";return e.prototype=create(IteratorPrototype$1,{next:createPropertyDescriptor$1(+!r,n)}),setToStringTag$2(e,t,!1),Iterators$4[t]=returnThis$1,e},isCallable$8=isCallable$l,$String$1=String,$TypeError$8=TypeError,aPossiblePrototype$1=function(e){if("object"==typeof e||isCallable$8(e))return e;throw $TypeError$8("Can't set "+$String$1(e)+" as a prototype")},uncurryThis$7=functionUncurryThis,anObject$7=anObject$c,aPossiblePrototype=aPossiblePrototype$1,objectSetPrototypeOf=Object.setPrototypeOf||("__proto__"in{}?function(){var n,r=!1,e={};try{(n=uncurryThis$7(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(e,[]),r=e instanceof Array}catch(e){}return function(e,t){return anObject$7(e),aPossiblePrototype(t),r?n(e,t):e.__proto__=t,e}}():void 0),$$b=_export,call$9=functionCall,FunctionName=functionName,isCallable$7=isCallable$l,createIteratorConstructor=createIteratorConstructor$1,getPrototypeOf=objectGetPrototypeOf,setPrototypeOf$1=objectSetPrototypeOf,setToStringTag$1=setToStringTag$3,createNonEnumerableProperty$1=createNonEnumerableProperty$4,defineBuiltIn$3=defineBuiltIn$6,wellKnownSymbol$b=wellKnownSymbol$g,Iterators$3=iterators,IteratorsCore=iteratorsCore,PROPER_FUNCTION_NAME$2=FunctionName.PROPER,CONFIGURABLE_FUNCTION_NAME=FunctionName.CONFIGURABLE,IteratorPrototype=IteratorsCore.IteratorPrototype,BUGGY_SAFARI_ITERATORS=IteratorsCore.BUGGY_SAFARI_ITERATORS,ITERATOR$4=wellKnownSymbol$b("iterator"),KEYS="keys",VALUES="values",ENTRIES="entries",returnThis=function(){return this},defineIterator$1=function(e,t,n,r,i,a,o){createIteratorConstructor(n,t,r);function s(e){if(e===i&&f)return f;if(!BUGGY_SAFARI_ITERATORS&&e in d)return d[e];switch(e){case KEYS:case VALUES:case ENTRIES:return function(){return new n(this,e)}}return function(){return new n(this)}}var l,c,r=t+" Iterator",u=!1,d=e.prototype,p=d[ITERATOR$4]||d["@@iterator"]||i&&d[i],f=!BUGGY_SAFARI_ITERATORS&&p||s(i),m="Array"==t&&d.entries||p;if(m&&(m=getPrototypeOf(m.call(new e)))!==Object.prototype&&m.next&&(getPrototypeOf(m)!==IteratorPrototype&&(setPrototypeOf$1?setPrototypeOf$1(m,IteratorPrototype):isCallable$7(m[ITERATOR$4])||defineBuiltIn$3(m,ITERATOR$4,returnThis)),setToStringTag$1(m,r,!0)),PROPER_FUNCTION_NAME$2&&i==VALUES&&p&&p.name!==VALUES&&(CONFIGURABLE_FUNCTION_NAME?createNonEnumerableProperty$1(d,"name",VALUES):(u=!0,f=function(){return call$9(p,this)})),i)if(l={values:s(VALUES),keys:a?f:s(KEYS),entries:s(ENTRIES)},o)for(c in l)!BUGGY_SAFARI_ITERATORS&&!u&&c in d||defineBuiltIn$3(d,c,l[c]);else $$b({target:t,proto:!0,forced:BUGGY_SAFARI_ITERATORS||u},l);return d[ITERATOR$4]!==f&&defineBuiltIn$3(d,ITERATOR$4,f,{name:i}),Iterators$3[t]=f,l},toIndexedObject=toIndexedObject$5,addToUnscopables=addToUnscopables$1,Iterators$2=iterators,InternalStateModule$1=internalState,defineProperty$1=objectDefineProperty.f,defineIterator=defineIterator$1,DESCRIPTORS$2=descriptors,ARRAY_ITERATOR="Array Iterator",setInternalState$1=InternalStateModule$1.set,getInternalState=InternalStateModule$1.getterFor(ARRAY_ITERATOR),es_array_iterator=defineIterator(Array,"Array",function(e,t){setInternalState$1(this,{type:ARRAY_ITERATOR,target:toIndexedObject(e),index:0,kind:t})},function(){var e=getInternalState(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?{value:e.target=void 0,done:!0}:"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}},"values"),values=Iterators$2.Arguments=Iterators$2.Array;if(addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries"),DESCRIPTORS$2&&"values"!==values.name)try{defineProperty$1(values,"name",{value:"values"})}catch(e){}var COLLECTION_NAME,domIterables={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},documentCreateElement=documentCreateElement$2,classList=documentCreateElement$2("span").classList,DOMTokenListPrototype$1=classList&&classList.constructor&&classList.constructor.prototype,domTokenListPrototype=DOMTokenListPrototype$1===Object.prototype?void 0:DOMTokenListPrototype$1,global$a=global$k,DOMIterables=domIterables,DOMTokenListPrototype=domTokenListPrototype,ArrayIteratorMethods=es_array_iterator,createNonEnumerableProperty=createNonEnumerableProperty$4,wellKnownSymbol$a=wellKnownSymbol$g,ITERATOR$3=wellKnownSymbol$a("iterator"),TO_STRING_TAG$2=wellKnownSymbol$a("toStringTag"),ArrayValues=ArrayIteratorMethods.values,handlePrototype=function(t,e){if(t){if(t[ITERATOR$3]!==ArrayValues)try{createNonEnumerableProperty(t,ITERATOR$3,ArrayValues)}catch(e){t[ITERATOR$3]=ArrayValues}if(t[TO_STRING_TAG$2]||createNonEnumerableProperty(t,TO_STRING_TAG$2,e),DOMIterables[e])for(var n in ArrayIteratorMethods)if(t[n]!==ArrayIteratorMethods[n])try{createNonEnumerableProperty(t,n,ArrayIteratorMethods[n])}catch(e){t[n]=ArrayIteratorMethods[n]}}};for(COLLECTION_NAME in DOMIterables)handlePrototype(global$a[COLLECTION_NAME]&&global$a[COLLECTION_NAME].prototype,COLLECTION_NAME);handlePrototype(DOMTokenListPrototype,"DOMTokenList");var EmptyStringDescriptionStore,SymbolWrapper,NATIVE_SYMBOL,symbolToString,symbolValueOf,regexp,replace$1,stringSlice,EApplicationStatus,EConfigTypes,isObject$2=isObject$8,classof$5=classofRaw$1,wellKnownSymbol$9=wellKnownSymbol$g,MATCH$1=wellKnownSymbol$g("match"),isRegexp=function(e){var t;return isObject$2(e)&&(void 0!==(t=e[MATCH$1])?!!t:"RegExp"==classof$5(e))},isRegExp=isRegexp,$TypeError$7=TypeError,notARegexp=function(e){if(isRegExp(e))throw $TypeError$7("The method doesn't accept regular expressions");return e},wellKnownSymbol$8=wellKnownSymbol$g,TO_STRING_TAG$1=wellKnownSymbol$g("toStringTag"),test$1={},toStringTagSupport=(test$1[TO_STRING_TAG$1]="z","[object z]"===String(test$1)),TO_STRING_TAG_SUPPORT=toStringTagSupport,isCallable$6=isCallable$l,classofRaw=classofRaw$1,wellKnownSymbol$7=wellKnownSymbol$g,TO_STRING_TAG=wellKnownSymbol$g("toStringTag"),$Object=Object,CORRECT_ARGUMENTS="Arguments"==classofRaw(function(){return arguments}()),tryGet=function(e,t){try{return e[t]}catch(e){}},classof$4=TO_STRING_TAG_SUPPORT?classofRaw:function(e){var t;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(t=tryGet(e=$Object(e),TO_STRING_TAG))?t:CORRECT_ARGUMENTS?classofRaw(e):"Object"==(t=classofRaw(e))&&isCallable$6(e.callee)?"Arguments":t},classof$3=classof$4,$String=String,toString$4=function(e){if("Symbol"===classof$3(e))throw TypeError("Cannot convert a Symbol value to a string");return $String(e)},wellKnownSymbol$6=wellKnownSymbol$g,MATCH=wellKnownSymbol$g("match"),correctIsRegexpLogic=function(t){var n=/./;try{"/./"[t](n)}catch(e){try{return n[MATCH]=!1,"/./"[t](n)}catch(e){}}return!1},$$a=_export,uncurryThis$6=functionUncurryThis,notARegExp=notARegexp,requireObjectCoercible$1=requireObjectCoercible$4,toString$3=toString$4,correctIsRegExpLogic=correctIsRegexpLogic,stringIndexOf=functionUncurryThis("".indexOf),$$9=($$a({target:"String",proto:!0,forced:!correctIsRegExpLogic("includes")},{includes:function(e){return!!~stringIndexOf(toString$3(requireObjectCoercible$1(this)),toString$3(notARegExp(e)),1<arguments.length?arguments[1]:void 0)}}),_export),DESCRIPTORS$1=descriptors,global$9=global$k,uncurryThis$5=functionUncurryThis,hasOwn$2=hasOwnProperty_1,isCallable$5=isCallable$l,isPrototypeOf$3=objectIsPrototypeOf,toString$2=toString$4,defineProperty=objectDefineProperty.f,copyConstructorProperties=copyConstructorProperties$2,NativeSymbol=global$9.Symbol,SymbolPrototype=NativeSymbol&&NativeSymbol.prototype,anObject$6=(!DESCRIPTORS$1||!isCallable$5(NativeSymbol)||"description"in SymbolPrototype&&void 0===NativeSymbol().description||(EmptyStringDescriptionStore={},copyConstructorProperties(SymbolWrapper=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:toString$2(arguments[0]),t=isPrototypeOf$3(SymbolPrototype,this)?new NativeSymbol(e):void 0===e?NativeSymbol():NativeSymbol(e);return""===e&&(EmptyStringDescriptionStore[t]=!0),t},NativeSymbol),(SymbolWrapper.prototype=SymbolPrototype).constructor=SymbolWrapper,NATIVE_SYMBOL="Symbol(test)"==String(NativeSymbol("test")),symbolToString=uncurryThis$5(SymbolPrototype.toString),symbolValueOf=uncurryThis$5(SymbolPrototype.valueOf),regexp=/^Symbol\((.*)\)[^)]+$/,replace$1=uncurryThis$5("".replace),stringSlice=uncurryThis$5("".slice),defineProperty(SymbolPrototype,"description",{configurable:!0,get:function(){var e=symbolValueOf(this),t=symbolToString(e);if(hasOwn$2(EmptyStringDescriptionStore,e))return"";e=NATIVE_SYMBOL?stringSlice(t,7,-1):replace$1(t,regexp,"$1");return""===e?void 0:e}}),$$9({global:!0,constructor:!0,forced:!0},{Symbol:SymbolWrapper})),anObject$c),regexpFlags=function(){var e=anObject$6(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},call$8=functionCall,hasOwn$1=hasOwnProperty_1,isPrototypeOf$2=objectIsPrototypeOf,regExpFlags=regexpFlags,RegExpPrototype$1=RegExp.prototype,regexpGetFlags=function(e){var t=e.flags;return void 0!==t||"flags"in RegExpPrototype$1||hasOwn$1(e,"flags")||!isPrototypeOf$2(RegExpPrototype$1,e)?t:call$8(regExpFlags,e)},PROPER_FUNCTION_NAME$1=functionName.PROPER,defineBuiltIn$2=defineBuiltIn$6,anObject$5=anObject$c,$toString=toString$4,fails$5=fails$h,getRegExpFlags=regexpGetFlags,TO_STRING="toString",RegExpPrototype=RegExp.prototype,n$ToString=RegExpPrototype[TO_STRING],NOT_GENERIC=fails$5(function(){return"/a/b"!=n$ToString.call({source:"a",flags:"b"})}),INCORRECT_NAME=PROPER_FUNCTION_NAME$1&&n$ToString.name!=TO_STRING;(NOT_GENERIC||INCORRECT_NAME)&&defineBuiltIn$2(RegExp.prototype,TO_STRING,function(){var e=anObject$5(this);return"/"+$toString(e.source)+"/"+$toString(getRegExpFlags(e))},{unsafe:!0});const ApplicationListItem=({app:e,onOpenApplicationDetailPanel:t,showInstalledChip:n=!1,isAppInstalled:r})=>{const{name:i,description:a,iconUrl:o,id:s,ownerOrganizationId:l}=e,c=useSelector(selectOrgId);var e=c&&l&&l.toString()===c.toString(),u={height:"18px",borderRadius:"30px",mb:1},d={fontWeight:"800",fontSize:"9px",lineHeight:"12px",textTransform:"uppercase"};return jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsxs(ListItem,Object.assign({alignItems:"center",sx:{minHeight:"134px",p:4}},{children:[jsxRuntime.exports.jsx(ListItemAvatar,Object.assign({sx:{alignSelf:"flex-start"}},{children:jsxRuntime.exports.jsx(Avatar,Object.assign({src:o,alt:i},{children:jsxRuntime.exports.jsx(Avatar,{children:i[0]})}))})),jsxRuntime.exports.jsx(ListItemText,{sx:{display:"inline",maxWidth:"390px",alignSelf:"flex-start",m:0},primary:jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",sx:{color:"#2A323C",fontWeight:"400"}},{children:i})),jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row",spacing:1},{children:[n&&r&&r(s)&&jsxRuntime.exports.jsx(Chip$1,{label:jsxRuntime.exports.jsx(Typography,Object.assign({sx:Object.assign({color:green[700]},d)},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"admin-center-applications-installed-badge-123132",defaultMessage:"Installed",description:"installed application badge"})})),color:"success",size:"small",sx:Object.assign({background:"rgba(27, 94, 32, 0.2)",width:"70px"},u)}),e&&jsxRuntime.exports.jsx(Chip$1,{icon:jsxRuntime.exports.jsx(Lock,{style:{height:"12px",width:"12px"}}),label:jsxRuntime.exports.jsx(Typography,Object.assign({sx:Object.assign({color:"#4F5863"},d)},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"admin-center-applications-org-owned-badge-123112",defaultMessage:"org owned",description:"org owned application badge"})})),variant:"outlined",size:"small",sx:Object.assign({width:"90px"},u)})]}))]}),secondary:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",sx:{mt:1}},{children:a}))}),jsxRuntime.exports.jsx(ListItemSecondaryAction,{children:jsxRuntime.exports.jsx(Button,Object.assign({onClick:t,variant:"outlined",color:"primary","data-testid":"admin-center-application-details-panel-open-button","data-appid":s},{children:"View Details"}))})]})),jsxRuntime.exports.jsx(Divider,{})]})},LoaderSkeletonItem=()=>jsxRuntime.exports.jsxs(ListItem,Object.assign({alignItems:"center",sx:{height:"134px"}},{children:[jsxRuntime.exports.jsx(ListItemAvatar,{children:jsxRuntime.exports.jsx(Skeleton,{variant:"circular",width:40,height:40})}),jsxRuntime.exports.jsx(ListItemText,{children:jsxRuntime.exports.jsx(Skeleton,{variant:"text",width:150,height:30})}),jsxRuntime.exports.jsx(ListItemSecondaryAction,{children:jsxRuntime.exports.jsx(Skeleton,{variant:"rectangular",width:87,height:35})})]})),LoaderSkeleton=()=>jsxRuntime.exports.jsxs(List,{children:[jsxRuntime.exports.jsx(LoaderSkeletonItem,{}),jsxRuntime.exports.jsx(Divider,{}),jsxRuntime.exports.jsx(LoaderSkeletonItem,{}),jsxRuntime.exports.jsx(Divider,{}),jsxRuntime.exports.jsx(LoaderSkeletonItem,{}),jsxRuntime.exports.jsx(Divider,{})]}),ApplicationList=({apps:e,uiStatus:t,onRetry:n,showInstalledChip:r=!1,isAppInstalled:i})=>{const a=useDispatch();return"loading"===t?jsxRuntime.exports.jsx(LoaderSkeleton,{}):"failure"===t?jsxRuntime.exports.jsx(ErrorState,{onRetry:n,errorMessage:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.error-message",defaultMessage:"Something went wrong while loading applications.",description:"admin center applications error state"})}):jsxRuntime.exports.jsx(List,Object.assign({sx:{maxHeight:"95%",overflowY:"auto"}},{children:e.map(e=>jsxRuntime.exports.jsx(ApplicationListItem,{app:e,onOpenApplicationDetailPanel:(e=>()=>{a(mountPanel({panelId:"APPLICATION_DETAILS_PANEL",microFrontend:{name:"APPLICATION_DETAILS_PANEL",config:{applicationId:e.id,initValue:e}},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,size:"large",zIndex:1002,parentPanelId:"ADMIN_CENTER_BROWSE",dimmed:0,dimmedStatus:"dimParent",borderBottom:!0,disableHide:!0}}))})(e),showInstalledChip:r,isAppInstalled:i}))}))},SLICE_NAME$1="adminCenterApplication",namespace$2=(!function(e){e.active="active",e.draft="draft",e.deleted="deleted",e.pending="pending",e.rejected="rejected",e.approved="approved",e.disabled="disabled"}(EApplicationStatus=EApplicationStatus||{}),!function(e){e.string="String",e.json="JSON",e.boolean="Boolean"}(EConfigTypes=EConfigTypes||{}),"adminCenterApplications"),initialState$2={allApplications:[],installedApplications:[],allAppStatus:"idle",installedAppStatus:"idle"},adminCenterApplicationSlice=createSlice({name:SLICE_NAME$1+"/"+namespace$2,initialState:initialState$2,reducers:{fetchAllApplicationsStart(e){e.allAppStatus="loading"},fetchAllApplicationsSuccess(e,t){e.allAppStatus="success",e.allApplications=t.payload},fetchAllApplicationsFailure(e){e.allAppStatus="failure"},fetchInstalledApplicationsStart(e){e.installedAppStatus="loading"},fetchInstalledApplicationsSuccess(e,t){e.installedAppStatus="success",e.installedApplications=t.payload},fetchInstalledApplicationsFailure(e){e.installedAppStatus="failure"}}}),actions$2=adminCenterApplicationSlice.actions;var Status,adminCenterApplications_state=adminCenterApplicationSlice.reducer;const selectInstalledApps=e=>{return null==(e=null==(e=null==e?void 0:e[SLICE_NAME$1])?void 0:e[namespace$2])?void 0:e.installedApplications},selectAllApps=e=>{return null==(e=null==(e=null==e?void 0:e[SLICE_NAME$1])?void 0:e[namespace$2])?void 0:e.allApplications},selectAllAppsUiStatus=e=>{return null==(e=null==(e=null==e?void 0:e[SLICE_NAME$1])?void 0:e[namespace$2])?void 0:e.allAppStatus},selectInstalledAppsUiStatus=e=>{return null==(e=null==(e=null==e?void 0:e[SLICE_NAME$1])?void 0:e[namespace$2])?void 0:e.installedAppStatus},selectApiConfigs=createSelector([rootApiSelector,graphEndpointSelector,sessionTokenSelector],(e,t,n)=>({apiRoot:e,graphQLEndpoint:t,token:n}));function __rest(e,t){var n={};for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]]);return n}function __awaiter(e,o,s,l){return new(s=s||Promise)(function(n,t){function r(e){try{a(l.next(e))}catch(e){t(e)}}function i(e){try{a(l.throw(e))}catch(e){t(e)}}function a(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(r,i)}a((l=l.apply(e,o||[])).next())})}const SLICE_NAME="applications",NO_ROLE=(!function(e){e.idle="idle",e.loading="loading",e.success="success",e.failure="failure"}(Status=Status||{}),"NO_ROLE"),AVATAR_COLORS=["#f94144ff","#f3722cff","#f8961eff","#f9844aff","#f9c74fff","#90be6dff","#43aa8bff","#4d908eff","#577590ff","#277da1ff"],formattedName$1=e=>{var t;return""+(null==(t=null==(t=e.firstName)?void 0:t.charAt(0))?void 0:t.toUpperCase())+(null==(e=null==(t=e.lastName)?void 0:t.charAt(0))?void 0:e.toUpperCase())},getApplicationRole=(t="",e)=>{e=e.find(e=>e.appName===t);return(null==e?void 0:e.id)||NO_ROLE};let usedColors=[];const getAvatarColor=()=>{var e=Math.floor(Math.random()*AVATAR_COLORS.length);return usedColors.includes(e)?getAvatarColor():((usedColors=usedColors.length>=AVATAR_COLORS.length/2?[]:usedColors).push(e),AVATAR_COLORS[e])},createUpdateUser=e=>({id:e.id,roleIds:e.roles.map(e=>e.id)}),deepCopyUsers=e=>e.map(e=>Object.assign(Object.assign({},e),{roles:[...e.roles]})),roleIsInList=(e,t)=>!!e.find(e=>e.id===t.id),isAdminRole=e=>e.name.toLowerCase().includes("admin"),namespace$1="applicationDetail",initialState$1={status:"idle",application:{},ownerOrganization:{name:""},allRoles:[],appRoles:[],initApplicationUsers:[],applicationUsers:[],modifiedUsers:[],userSearchResults:[],usersStatus:"idle",userSearchTerm:"",saveUsersEnabled:!1},applicationDetailSlice=createSlice({name:SLICE_NAME+"/"+namespace$1,initialState:initialState$1,reducers:{setInitialApplicationValue(e,t){var n=t.payload,r=n["ownerOrganization"],n=__rest(n,["ownerOrganization"]);e.initValue=t.payload,e.application=n,e.ownerOrganization=r,e.status=Status.success},fetchApplicationStart(e,t){var n,{applicationId:t,initValue:r}=t.payload;e.applicationId=t,r?(t=r["ownerOrganization"],n=__rest(r,["ownerOrganization"]),e.initValue=r,e.application=n,e.ownerOrganization=t,e.status=Status.success):e.status=Status.loading},fetchApplicationSuccess(e,t){var{application:t,organization:n}=t.payload;e.application=t,e.ownerOrganization=n,e.status=Status.success},fetchApplicationError(e){e.status=Status.failure},setStatus(e,t){e.status=t.payload},installAppStart(e,t){e.status=Status.loading},installAppSuccess(e,t){e.status=Status.success,e.application=t.payload},installAppFailure(e){e.status=Status.failure},initApplicationUsers(e,t){e.usersStatus=Status.loading},initApplicationUsersSuccess(e,t){e.applicationId=t.payload.applicationId,e.applicationKey=t.payload.applicationKey,t.payload.skipLoad&&(e.usersStatus=Status.success)},initApplicationUsersFailure(e){e.usersStatus=Status.failure},fetchApplicationUsersStart(e){e.usersStatus=Status.loading},fetchApplicationUsersSuccess(t,e){t.usersStatus=Status.success,t.initApplicationUsers=e.payload.filter(e=>e.roles.find(e=>e.appName===t.applicationKey)).map(e=>Object.assign(Object.assign({},e),{avatarColor:getAvatarColor()})),t.applicationUsers=deepCopyUsers(t.initApplicationUsers)},fetchApplicationUsersFailure(e){e.usersStatus=Status.failure},fetchApplicationRolesStart(e){e.usersStatus=Status.loading},fetchApplicationRolesSuccess(t,e){t.allRoles=e.payload,t.appRoles=t.allRoles.filter(e=>e.appName===t.applicationKey)},fetchApplicationRolesFailure(e){e.usersStatus=Status.failure},searchApplicationUsersStart(e,t){e.usersStatus=Status.loading,e.userSearchTerm=t.payload},searchApplicationUsersSuccess(e,t){e.usersStatus=Status.success,e.userSearchResults=t.payload},searchApplicationUsersFailure(e){e.usersStatus=Status.failure},selectUser(e,t){e.applicationUsers=[...e.applicationUsers,t.payload],e.userSearchResults=[]},updateApplicationUserRole(t,e){const{userId:n,roleId:r}=e.payload;var e=t.applicationUsers.findIndex(e=>e.id===n),i=t.modifiedUsers.findIndex(e=>e.id===n),a=t.appRoles.find(e=>e.id===r);const o=t.applicationUsers[e].roles.filter(e=>e.appName!==t.applicationKey);a&&o.push(a),t.applicationUsers[e]=Object.assign(Object.assign({},t.applicationUsers[e]),{roles:o}),-1===i?t.modifiedUsers=[...t.modifiedUsers,createUpdateUser(t.applicationUsers[e])]:t.modifiedUsers[i]=createUpdateUser(t.applicationUsers[e])},removeApplicationUserRoleStart(e,t){},removeApplicationUserRoleSuccess(t,n){var e=t.applicationUsers.findIndex(e=>e.id===n.payload),r=t.modifiedUsers.findIndex(e=>e.id===n.payload),i=t.applicationUsers[e].roles.filter(e=>e.appName!==t.applicationKey);t.applicationUsers[e]=Object.assign(Object.assign({},t.applicationUsers[e]),{roles:i}),-1===r?t.modifiedUsers=[...t.modifiedUsers,createUpdateUser(t.applicationUsers[e])]:t.modifiedUsers[r]=createUpdateUser(t.applicationUsers[e])},saveApplicationUsersStart(e){e.usersStatus=Status.loading},saveApplicationUsersSuccess(e){e.usersStatus=Status.success,e.modifiedUsers=[]},saveApplicationUsersFailure(e){e.usersStatus=Status.failure},cancelApplicationUserChanges(e){e.applicationUsers=deepCopyUsers(e.initApplicationUsers),e.modifiedUsers=[]}}}),actions$1=applicationDetailSlice.actions;var applicationDetailsPanelReducer=applicationDetailSlice.reducer;const namespace=SLICE_NAME$1,initialState={[namespace$2]:initialState$2,[namespace$1]:initialState$1},actions={[namespace$2]:actions$2,[namespace$1]:actions$1},rootReducer=combineReducers({[namespace$2]:adminCenterApplications_state,[namespace$1]:applicationDetailsPanelReducer});var location,defer,channel,port,tryToString$3=tryToString$5,$TypeError$6=TypeError,deletePropertyOrThrow$1=function(e,t){if(!delete e[t])throw $TypeError$6("Cannot delete property "+tryToString$3(t)+" of "+tryToString$3(e))},toPropertyKey=toPropertyKey$3,definePropertyModule$1=objectDefineProperty,createPropertyDescriptor=createPropertyDescriptor$4,createProperty$1=function(e,t,n){t=toPropertyKey(t);t in e?definePropertyModule$1.f(e,t,createPropertyDescriptor(0,n)):e[t]=n},toAbsoluteIndex=toAbsoluteIndex$2,lengthOfArrayLike$3=lengthOfArrayLike$5,createProperty=createProperty$1,$Array=Array,max=Math.max,arraySliceSimple=function(e,t,n){for(var r=lengthOfArrayLike$3(e),i=toAbsoluteIndex(t,r),a=toAbsoluteIndex(void 0===n?r:n,r),o=$Array(max(a-i,0)),s=0;i<a;i++,s++)createProperty(o,s,e[i]);return o.length=s,o},arraySlice$2=arraySliceSimple,floor=Math.floor,mergeSort=function(e,t){var n=e.length,r=floor(n/2);return n<8?insertionSort(e,t):merge(e,mergeSort(arraySlice$2(e,0,r),t),mergeSort(arraySlice$2(e,r),t),t)},insertionSort=function(e,t){for(var n,r,i=e.length,a=1;a<i;){for(n=e[r=a];r&&0<t(e[r-1],n);)e[r]=e[--r];r!==a++&&(e[r]=n)}return e},merge=function(e,t,n,r){for(var i=t.length,a=n.length,o=0,s=0;o<i||s<a;)e[o+s]=o<i&&s<a?r(t[o],n[s])<=0?t[o++]:n[s++]:o<i?t[o++]:n[s++];return e},arraySort=mergeSort,fails$4=fails$h,arrayMethodIsStrict$2=function(e,t){var n=[][e];return!!n&&fails$4(function(){n.call(null,t||function(){return 1},1)})},userAgent$4=engineUserAgent,firefox=engineUserAgent.match(/firefox\/(\d+)/i),engineFfVersion=!!firefox&&+firefox[1],UA=engineUserAgent,engineIsIeOrEdge=/MSIE|Trident/.test(UA),userAgent$3=engineUserAgent,webkit=engineUserAgent.match(/AppleWebKit\/(\d+)\./),engineWebkitVersion=!!webkit&&+webkit[1],$$8=_export,uncurryThis$4=functionUncurryThis,aCallable$7=aCallable$9,toObject$1=toObject$5,lengthOfArrayLike$2=lengthOfArrayLike$5,deletePropertyOrThrow=deletePropertyOrThrow$1,toString$1=toString$4,fails$3=fails$h,internalSort=arraySort,arrayMethodIsStrict$1=arrayMethodIsStrict$2,FF=engineFfVersion,IE_OR_EDGE=engineIsIeOrEdge,V8=engineV8Version,WEBKIT=engineWebkitVersion,test=[],un$Sort=uncurryThis$4(test.sort),push=uncurryThis$4(test.push),FAILS_ON_UNDEFINED=fails$3(function(){test.sort(void 0)}),FAILS_ON_NULL=fails$3(function(){test.sort(null)}),STRICT_METHOD$1=arrayMethodIsStrict$1("sort"),STABLE_SORT=!fails$3(function(){if(V8)return V8<70;if(!(FF&&3<FF)){if(IE_OR_EDGE)return!0;if(WEBKIT)return WEBKIT<603;for(var e,t,n,r="",i=65;i<76;i++){switch(e=String.fromCharCode(i),i){case 66:case 69:case 70:case 72:t=3;break;case 68:case 71:t=4;break;default:t=2}for(n=0;n<47;n++)test.push({k:e+n,v:t})}for(test.sort(function(e,t){return t.v-e.v}),n=0;n<test.length;n++)e=test[n].k.charAt(0),r.charAt(r.length-1)!==e&&(r+=e);return"DGBEFHACIJK"!==r}}),FORCED=FAILS_ON_UNDEFINED||!FAILS_ON_NULL||!STRICT_METHOD$1||!STABLE_SORT,getSortCompare=function(n){return function(e,t){return void 0===t?-1:void 0===e?1:void 0!==n?+n(e,t)||0:toString$1(e)>toString$1(t)?1:-1}},classof$2=($$8({target:"Array",proto:!0,forced:FORCED},{sort:function(e){void 0!==e&&aCallable$7(e);var t=toObject$1(this);if(STABLE_SORT)return void 0===e?un$Sort(t):un$Sort(t,e);for(var n,r=[],i=lengthOfArrayLike$2(t),a=0;a<i;a++)a in t&&push(r,t[a]);for(internalSort(r,getSortCompare(e)),n=r.length,a=0;a<n;)t[a]=r[a++];for(;a<i;)deletePropertyOrThrow(t,a++);return t}}),classofRaw$1),global$8=global$k,engineIsNode="process"==classofRaw$1(global$k.process),getBuiltIn$3=getBuiltIn$8,definePropertyModule=objectDefineProperty,wellKnownSymbol$5=wellKnownSymbol$g,DESCRIPTORS=descriptors,SPECIES$2=wellKnownSymbol$g("species"),setSpecies$1=function(e){var e=getBuiltIn$3(e),t=definePropertyModule.f;DESCRIPTORS&&e&&!e[SPECIES$2]&&t(e,SPECIES$2,{configurable:!0,get:function(){return this}})},isPrototypeOf$1=objectIsPrototypeOf,$TypeError$5=TypeError,anInstance$1=function(e,t){if(isPrototypeOf$1(t,e))return e;throw $TypeError$5("Incorrect invocation")},uncurryThis$3=functionUncurryThis,fails$2=fails$h,isCallable$4=isCallable$l,classof$1=classof$4,getBuiltIn$2=getBuiltIn$8,inspectSource$1=inspectSource$4,noop=function(){},empty=[],construct=getBuiltIn$8("Reflect","construct"),constructorRegExp=/^\s*(?:class|function)\b/,exec=uncurryThis$3(constructorRegExp.exec),INCORRECT_TO_STRING=!constructorRegExp.exec(noop),isConstructorModern=function(e){if(!isCallable$4(e))return!1;try{return construct(noop,empty,e),!0}catch(e){return!1}},isConstructorLegacy=function(e){if(!isCallable$4(e))return!1;switch(classof$1(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return INCORRECT_TO_STRING||!!exec(constructorRegExp,inspectSource$1(e))}catch(e){return!0}},isConstructor$1=(isConstructorLegacy.sham=!0,!construct||fails$2(function(){var e;return isConstructorModern(isConstructorModern.call)||!isConstructorModern(Object)||!isConstructorModern(function(){e=!0})||e})?isConstructorLegacy:isConstructorModern),isConstructor=isConstructor$1,tryToString$2=tryToString$5,$TypeError$4=TypeError,aConstructor$1=function(e){if(isConstructor(e))return e;throw $TypeError$4(tryToString$2(e)+" is not a constructor")},anObject$4=anObject$c,aConstructor=aConstructor$1,wellKnownSymbol$4=wellKnownSymbol$g,SPECIES$1=wellKnownSymbol$g("species"),speciesConstructor$1=function(e,t){var e=anObject$4(e).constructor;return void 0===e||null==(e=anObject$4(e)[SPECIES$1])?t:aConstructor(e)},NATIVE_BIND$1=functionBindNative,FunctionPrototype=Function.prototype,apply$1=FunctionPrototype.apply,call$7=FunctionPrototype.call,functionApply="object"==typeof Reflect&&Reflect.apply||(NATIVE_BIND$1?call$7.bind(apply$1):function(){return call$7.apply(apply$1,arguments)}),uncurryThis$2=functionUncurryThis,aCallable$6=aCallable$9,NATIVE_BIND=functionBindNative,bind$4=functionUncurryThis(functionUncurryThis.bind),functionBindContext=function(e,t){return aCallable$6(e),void 0===t?e:NATIVE_BIND?bind$4(e,t):function(){return e.apply(t,arguments)}},uncurryThis$1=functionUncurryThis,arraySlice$1=functionUncurryThis([].slice),$TypeError$3=TypeError,validateArgumentsLength$1=function(e,t){if(e<t)throw $TypeError$3("Not enough arguments");return e},userAgent$2=engineUserAgent,engineIsIos=/(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2),global$7=global$k,apply=functionApply,bind$3=functionBindContext,isCallable$3=isCallable$l,hasOwn=hasOwnProperty_1,fails$1=fails$h,html=html$2,arraySlice=arraySlice$1,createElement=documentCreateElement$2,validateArgumentsLength=validateArgumentsLength$1,IS_IOS$1=engineIsIos,IS_NODE$4=engineIsNode,set=global$7.setImmediate,clear=global$7.clearImmediate,process$3=global$7.process,Dispatch=global$7.Dispatch,Function$1=global$7.Function,MessageChannel=global$7.MessageChannel,String$1=global$7.String,counter=0,queue$1={},ONREADYSTATECHANGE="onreadystatechange";try{location=global$7.location}catch(e){}var flush,head,last,notify$1,toggle,node,promise,then,Internal,OwnPromiseCapability,PromiseWrapper,nativeThen,run=function(e){var t;hasOwn(queue$1,e)&&(t=queue$1[e],delete queue$1[e],t())},runner=function(e){return function(){run(e)}},listener=function(e){run(e.data)},post=function(e){global$7.postMessage(String$1(e),location.protocol+"//"+location.host)},task$1=(set&&clear||(set=function(e){validateArgumentsLength(arguments.length,1);var t=isCallable$3(e)?e:Function$1(e),n=arraySlice(arguments,1);return queue$1[++counter]=function(){apply(t,void 0,n)},defer(counter),counter},clear=function(e){delete queue$1[e]},IS_NODE$4?defer=function(e){process$3.nextTick(runner(e))}:Dispatch&&Dispatch.now?defer=function(e){Dispatch.now(runner(e))}:MessageChannel&&!IS_IOS$1?(port=(channel=new MessageChannel).port2,channel.port1.onmessage=listener,defer=bind$3(port.postMessage,port)):global$7.addEventListener&&isCallable$3(global$7.postMessage)&&!global$7.importScripts&&location&&"file:"!==location.protocol&&!fails$1(post)?(defer=post,global$7.addEventListener("message",listener,!1)):defer=ONREADYSTATECHANGE in createElement("script")?function(e){html.appendChild(createElement("script"))[ONREADYSTATECHANGE]=function(){html.removeChild(this),run(e)}}:function(e){setTimeout(runner(e),0)}),{set:set,clear:clear}),userAgent$1=engineUserAgent,global$6=global$k,engineIsIosPebble=/ipad|iphone|ipod/i.test(userAgent$1)&&void 0!==global$6.Pebble,userAgent=engineUserAgent,engineIsWebosWebkit=/web0s(?!.*chrome)/i.test(userAgent),global$5=global$k,bind$2=functionBindContext,getOwnPropertyDescriptor=objectGetOwnPropertyDescriptor.f,macrotask=task$1.set,IS_IOS=engineIsIos,IS_IOS_PEBBLE=engineIsIosPebble,IS_WEBOS_WEBKIT=engineIsWebosWebkit,IS_NODE$3=engineIsNode,MutationObserver=global$5.MutationObserver||global$5.WebKitMutationObserver,document$2=global$5.document,process$2=global$5.process,Promise$1=global$5.Promise,queueMicrotaskDescriptor=getOwnPropertyDescriptor(global$5,"queueMicrotask"),queueMicrotask=queueMicrotaskDescriptor&&queueMicrotaskDescriptor.value,microtask$1=(queueMicrotask||(flush=function(){var e,t;for(IS_NODE$3&&(e=process$2.domain)&&e.exit();head;){t=head.fn,head=head.next;try{t()}catch(e){throw head?notify$1():last=void 0,e}}last=void 0,e&&e.enter()},notify$1=IS_IOS||IS_NODE$3||IS_WEBOS_WEBKIT||!MutationObserver||!document$2?!IS_IOS_PEBBLE&&Promise$1&&Promise$1.resolve?((promise=Promise$1.resolve(void 0)).constructor=Promise$1,then=bind$2(promise.then,promise),function(){then(flush)}):IS_NODE$3?function(){process$2.nextTick(flush)}:(macrotask=bind$2(macrotask,global$5),function(){macrotask(flush)}):(toggle=!0,node=document$2.createTextNode(""),new MutationObserver(flush).observe(node,{characterData:!0}),function(){node.data=toggle=!toggle})),queueMicrotask||function(e){e={fn:e,next:void 0};last&&(last.next=e),head||(head=e,notify$1()),last=e}),global$4=global$k,hostReportErrors$1=function(e,t){var n=global$4.console;n&&n.error&&(1==arguments.length?n.error(e):n.error(e,t))},perform$3=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},Queue$1=function(){this.head=null,this.tail=null},queue=(Queue$1.prototype={add:function(e){e={item:e,next:null};this.head?this.tail.next=e:this.head=e,this.tail=e},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}},Queue$1),global$3=global$k,promiseNativeConstructor=global$k.Promise,engineIsDeno="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,IS_DENO$1=engineIsDeno,IS_NODE$2=engineIsNode,engineIsBrowser=!engineIsDeno&&!engineIsNode&&"object"==typeof window&&"object"==typeof document,global$2=global$k,NativePromiseConstructor$3=promiseNativeConstructor,isCallable$2=isCallable$l,isForced=isForced_1,inspectSource=inspectSource$4,wellKnownSymbol$3=wellKnownSymbol$g,IS_BROWSER=engineIsBrowser,IS_DENO=engineIsDeno,V8_VERSION=engineV8Version,SPECIES=(NativePromiseConstructor$3&&NativePromiseConstructor$3.prototype,wellKnownSymbol$3("species")),SUBCLASSING=!1,NATIVE_PROMISE_REJECTION_EVENT$1=isCallable$2(global$2.PromiseRejectionEvent),FORCED_PROMISE_CONSTRUCTOR$5=isForced("Promise",function(){var e=inspectSource(NativePromiseConstructor$3),t=e!==String(NativePromiseConstructor$3);if(!t&&66===V8_VERSION)return!0;if(!V8_VERSION||V8_VERSION<51||!/native code/.test(e)){function n(e){e(function(){},function(){})}e=new NativePromiseConstructor$3(function(e){e(1)});if((e.constructor={})[SPECIES]=n,!(SUBCLASSING=e.then(function(){})instanceof n))return!0}return!t&&(IS_BROWSER||IS_DENO)&&!NATIVE_PROMISE_REJECTION_EVENT$1}),promiseConstructorDetection={CONSTRUCTOR:FORCED_PROMISE_CONSTRUCTOR$5,REJECTION_EVENT:NATIVE_PROMISE_REJECTION_EVENT$1,SUBCLASSING:SUBCLASSING},newPromiseCapability$2={},aCallable$5=aCallable$9,PromiseCapability=function(e){var n,r;this.promise=new e(function(e,t){if(void 0!==n||void 0!==r)throw TypeError("Bad Promise constructor");n=e,r=t}),this.resolve=aCallable$5(n),this.reject=aCallable$5(r)},$$7=(newPromiseCapability$2.f=function(e){return new PromiseCapability(e)},_export),IS_NODE$1=engineIsNode,global$1=global$k,call$6=functionCall,defineBuiltIn$1=defineBuiltIn$6,setPrototypeOf=objectSetPrototypeOf,setToStringTag=setToStringTag$3,setSpecies=setSpecies$1,aCallable$4=aCallable$9,isCallable$1=isCallable$l,isObject$1=isObject$8,anInstance=anInstance$1,speciesConstructor=speciesConstructor$1,task=task$1.set,microtask=microtask$1,hostReportErrors=hostReportErrors$1,perform$2=perform$3,Queue=queue,InternalStateModule=internalState,NativePromiseConstructor$2=promiseNativeConstructor,PromiseConstructorDetection=promiseConstructorDetection,newPromiseCapabilityModule$3=newPromiseCapability$2,PROMISE="Promise",FORCED_PROMISE_CONSTRUCTOR$4=PromiseConstructorDetection.CONSTRUCTOR,NATIVE_PROMISE_REJECTION_EVENT=PromiseConstructorDetection.REJECTION_EVENT,NATIVE_PROMISE_SUBCLASSING=PromiseConstructorDetection.SUBCLASSING,getInternalPromiseState=InternalStateModule.getterFor(PROMISE),setInternalState=InternalStateModule.set,NativePromisePrototype$1=NativePromiseConstructor$2&&NativePromiseConstructor$2.prototype,PromiseConstructor=NativePromiseConstructor$2,PromisePrototype=NativePromisePrototype$1,TypeError$1=global$1.TypeError,document$1=global$1.document,process$1=global$1.process,newPromiseCapability$1=newPromiseCapabilityModule$3.f,newGenericPromiseCapability=newPromiseCapability$1,DISPATCH_EVENT=!!(document$1&&document$1.createEvent&&global$1.dispatchEvent),UNHANDLED_REJECTION="unhandledrejection",REJECTION_HANDLED="rejectionhandled",PENDING=0,FULFILLED=1,REJECTED=2,HANDLED=1,UNHANDLED=2,isThenable=function(e){var t;return!(!isObject$1(e)||!isCallable$1(t=e.then))&&t},callReaction=function(e,t){var n,r,i,a=t.value,o=t.state==FULFILLED,s=o?e.ok:e.fail,l=e.resolve,c=e.reject,u=e.domain;try{s?(o||(t.rejection===UNHANDLED&&onHandleUnhandled(t),t.rejection=HANDLED),!0===s?n=a:(u&&u.enter(),n=s(a),u&&(u.exit(),i=!0)),n===e.promise?c(TypeError$1("Promise-chain cycle")):(r=isThenable(n))?call$6(r,n,l,c):l(n)):c(a)}catch(e){u&&!i&&u.exit(),c(e)}},notify=function(n,r){n.notified||(n.notified=!0,microtask(function(){for(var e,t=n.reactions;e=t.get();)callReaction(e,n);n.notified=!1,r&&!n.rejection&&onUnhandled(n)}))},dispatchEvent=function(e,t,n){var r;DISPATCH_EVENT?((r=document$1.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),global$1.dispatchEvent(r)):r={promise:t,reason:n},!NATIVE_PROMISE_REJECTION_EVENT&&(t=global$1["on"+e])?t(r):e===UNHANDLED_REJECTION&&hostReportErrors("Unhandled promise rejection",n)},onUnhandled=function(r){call$6(task,global$1,function(){var e=r.facade,t=r.value,n=isUnhandled(r);if(n&&(n=perform$2(function(){IS_NODE$1?process$1.emit("unhandledRejection",t,e):dispatchEvent(UNHANDLED_REJECTION,e,t)}),r.rejection=IS_NODE$1||isUnhandled(r)?UNHANDLED:HANDLED,n.error))throw n.value})},isUnhandled=function(e){return e.rejection!==HANDLED&&!e.parent},onHandleUnhandled=function(t){call$6(task,global$1,function(){var e=t.facade;IS_NODE$1?process$1.emit("rejectionHandled",e):dispatchEvent(REJECTION_HANDLED,e,t.value)})},bind$1=function(t,n,r){return function(e){t(n,e,r)}},internalReject=function(e,t,n){e.done||(e.done=!0,(e=n?n:e).value=t,e.state=REJECTED,notify(e,!0))},internalResolve=function(n,e,t){if(!n.done){n.done=!0,t&&(n=t);try{if(n.facade===e)throw TypeError$1("Promise can't be resolved itself");var r=isThenable(e);r?microtask(function(){var t={done:!1};try{call$6(r,e,bind$1(internalResolve,t,n),bind$1(internalReject,t,n))}catch(e){internalReject(t,e,n)}}):(n.value=e,n.state=FULFILLED,notify(n,!1))}catch(e){internalReject({done:!1},e,n)}}};if(FORCED_PROMISE_CONSTRUCTOR$4&&(PromisePrototype=(PromiseConstructor=function(e){anInstance(this,PromisePrototype),aCallable$4(e),call$6(Internal,this);var t=getInternalPromiseState(this);try{e(bind$1(internalResolve,t),bind$1(internalReject,t))}catch(e){internalReject(t,e)}}).prototype,(Internal=function(e){setInternalState(this,{type:PROMISE,done:!1,notified:!1,parent:!1,reactions:new Queue,rejection:!1,state:PENDING,value:void 0})}).prototype=defineBuiltIn$1(PromisePrototype,"then",function(e,t){var n=getInternalPromiseState(this),r=newPromiseCapability$1(speciesConstructor(this,PromiseConstructor));return n.parent=!0,r.ok=!isCallable$1(e)||e,r.fail=isCallable$1(t)&&t,r.domain=IS_NODE$1?process$1.domain:void 0,n.state==PENDING?n.reactions.add(r):microtask(function(){callReaction(r,n)}),r.promise}),OwnPromiseCapability=function(){var e=new Internal,t=getInternalPromiseState(e);this.promise=e,this.resolve=bind$1(internalResolve,t),this.reject=bind$1(internalReject,t)},newPromiseCapabilityModule$3.f=newPromiseCapability$1=function(e){return e===PromiseConstructor||e===PromiseWrapper?new OwnPromiseCapability(e):newGenericPromiseCapability(e)},isCallable$1(NativePromiseConstructor$2)&&NativePromisePrototype$1!==Object.prototype)){nativeThen=NativePromisePrototype$1.then,NATIVE_PROMISE_SUBCLASSING||defineBuiltIn$1(NativePromisePrototype$1,"then",function(e,t){var n=this;return new PromiseConstructor(function(e,t){call$6(nativeThen,n,e,t)}).then(e,t)},{unsafe:!0});try{delete NativePromisePrototype$1.constructor}catch(e){}setPrototypeOf&&setPrototypeOf(NativePromisePrototype$1,PromisePrototype)}$$7({global:!0,constructor:!0,wrap:!0,forced:FORCED_PROMISE_CONSTRUCTOR$4},{Promise:PromiseConstructor}),setToStringTag(PromiseConstructor,PROMISE,!1),setSpecies(PROMISE);var wellKnownSymbol$2=wellKnownSymbol$g,Iterators$1=iterators,ITERATOR$2=wellKnownSymbol$g("iterator"),ArrayPrototype=Array.prototype,isArrayIteratorMethod$1=function(e){return void 0!==e&&(Iterators$1.Array===e||ArrayPrototype[ITERATOR$2]===e)},classof=classof$4,getMethod$1=getMethod$3,Iterators=iterators,wellKnownSymbol$1=wellKnownSymbol$g,ITERATOR$1=wellKnownSymbol$g("iterator"),getIteratorMethod$2=function(e){if(null!=e)return getMethod$1(e,ITERATOR$1)||getMethod$1(e,"@@iterator")||Iterators[classof(e)]},call$5=functionCall,aCallable$3=aCallable$9,anObject$3=anObject$c,tryToString$1=tryToString$5,getIteratorMethod$1=getIteratorMethod$2,$TypeError$2=TypeError,getIterator$1=function(e,t){var n=arguments.length<2?getIteratorMethod$1(e):t;if(aCallable$3(n))return anObject$3(call$5(n,e));throw $TypeError$2(tryToString$1(e)+" is not iterable")},call$4=functionCall,anObject$2=anObject$c,getMethod=getMethod$3,iteratorClose$1=function(e,t,n){var r,i;anObject$2(e);try{if(!(r=getMethod(e,"return"))){if("throw"===t)throw n;return n}r=call$4(r,e)}catch(e){i=!0,r=e}if("throw"===t)throw n;if(i)throw r;return anObject$2(r),n},bind=functionBindContext,call$3=functionCall,anObject$1=anObject$c,tryToString=tryToString$5,isArrayIteratorMethod=isArrayIteratorMethod$1,lengthOfArrayLike$1=lengthOfArrayLike$5,isPrototypeOf=objectIsPrototypeOf,getIterator=getIterator$1,getIteratorMethod=getIteratorMethod$2,iteratorClose=iteratorClose$1,$TypeError$1=TypeError,Result=function(e,t){this.stopped=e,this.result=t},ResultPrototype=Result.prototype,iterate$2=function(e,t,n){function r(e){return a&&iteratorClose(a,"normal",e),new Result(!0,e)}function i(e){return p?(anObject$1(e),h?g(e[0],e[1],r):g(e[0],e[1])):h?g(e,r):g(e)}var a,o,s,l,c,u,d=n&&n.that,p=!(!n||!n.AS_ENTRIES),f=!(!n||!n.IS_RECORD),m=!(!n||!n.IS_ITERATOR),h=!(!n||!n.INTERRUPTED),g=bind(t,d);if(f)a=e.iterator;else if(m)a=e;else{if(!(n=getIteratorMethod(e)))throw $TypeError$1(tryToString(e)+" is not iterable");if(isArrayIteratorMethod(n)){for(o=0,s=lengthOfArrayLike$1(e);o<s;o++)if((l=i(e[o]))&&isPrototypeOf(ResultPrototype,l))return l;return new Result(!1)}a=getIterator(e,n)}for(c=(f?e:a).next;!(u=call$3(c,a)).done;){try{l=i(u.value)}catch(e){iteratorClose(a,"throw",e)}if("object"==typeof l&&l&&isPrototypeOf(ResultPrototype,l))return l}return new Result(!1)},wellKnownSymbol=wellKnownSymbol$g,ITERATOR=wellKnownSymbol$g("iterator"),SAFE_CLOSING=!1;try{var called=0,iteratorWithReturn={next:function(){return{done:!!called++}},return:function(){SAFE_CLOSING=!0}};iteratorWithReturn[ITERATOR]=function(){return this},Array.from(iteratorWithReturn,function(){throw 2})}catch(e){}var method,checkCorrectnessOfIteration$1=function(e,t){if(!t&&!SAFE_CLOSING)return!1;var n=!1;try{var r={};r[ITERATOR]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},NativePromiseConstructor$1=promiseNativeConstructor,checkCorrectnessOfIteration=checkCorrectnessOfIteration$1,FORCED_PROMISE_CONSTRUCTOR$3=promiseConstructorDetection.CONSTRUCTOR,promiseStaticsIncorrectIteration=FORCED_PROMISE_CONSTRUCTOR$3||!checkCorrectnessOfIteration(function(e){NativePromiseConstructor$1.all(e).then(void 0,function(){})}),$$6=_export,call$2=functionCall,aCallable$2=aCallable$9,newPromiseCapabilityModule$2=newPromiseCapability$2,perform$1=perform$3,iterate$1=iterate$2,PROMISE_STATICS_INCORRECT_ITERATION$1=promiseStaticsIncorrectIteration,$$5=(_export({target:"Promise",stat:!0,forced:promiseStaticsIncorrectIteration},{all:function(e){var s=this,t=newPromiseCapabilityModule$2.f(s),l=t.resolve,c=t.reject,n=perform$1(function(){var r=aCallable$2(s.resolve),i=[],a=0,o=1;iterate$1(e,function(e){var t=a++,n=!1;o++,call$2(r,s,e).then(function(e){n||(n=!0,i[t]=e,--o||l(i))},c)}),--o||l(i)});return n.error&&c(n.value),t.promise}}),_export),FORCED_PROMISE_CONSTRUCTOR$2=promiseConstructorDetection.CONSTRUCTOR,NativePromiseConstructor=promiseNativeConstructor,getBuiltIn$1=getBuiltIn$8,isCallable=isCallable$l,defineBuiltIn=defineBuiltIn$6,NativePromisePrototype=NativePromiseConstructor&&NativePromiseConstructor.prototype,$$4=($$5({target:"Promise",proto:!0,forced:FORCED_PROMISE_CONSTRUCTOR$2,real:!0},{catch:function(e){return this.then(void 0,e)}}),isCallable(NativePromiseConstructor)&&(method=getBuiltIn$1("Promise").prototype.catch,NativePromisePrototype.catch!==method&&defineBuiltIn(NativePromisePrototype,"catch",method,{unsafe:!0})),_export),call$1=functionCall,aCallable$1=aCallable$9,newPromiseCapabilityModule$1=newPromiseCapability$2,perform=perform$3,iterate=iterate$2,PROMISE_STATICS_INCORRECT_ITERATION=promiseStaticsIncorrectIteration,$$3=(_export({target:"Promise",stat:!0,forced:promiseStaticsIncorrectIteration},{race:function(e){var n=this,r=newPromiseCapabilityModule$1.f(n),i=r.reject,t=perform(function(){var t=aCallable$1(n.resolve);iterate(e,function(e){call$1(t,n,e).then(r.resolve,i)})});return t.error&&i(t.value),r.promise}}),_export),call=functionCall,newPromiseCapabilityModule=newPromiseCapability$2,FORCED_PROMISE_CONSTRUCTOR$1=promiseConstructorDetection.CONSTRUCTOR,anObject=($$3({target:"Promise",stat:!0,forced:FORCED_PROMISE_CONSTRUCTOR$1},{reject:function(e){var t=newPromiseCapabilityModule.f(this);return call(t.reject,void 0,e),t.promise}}),anObject$c),isObject=isObject$8,newPromiseCapability=newPromiseCapability$2,promiseResolve$1=function(e,t){if(anObject(e),isObject(t)&&t.constructor===e)return t;e=newPromiseCapability.f(e);return(0,e.resolve)(t),e.promise},$$2=_export,getBuiltIn=getBuiltIn$8,FORCED_PROMISE_CONSTRUCTOR=promiseConstructorDetection.CONSTRUCTOR,promiseResolve=promiseResolve$1;function fetchOrgsApplications(n,r){return __awaiter(this,void 0,void 0,function*(){var e="fetchOrgsApplications",t="applications";return(yield baseGraphQLApiWithError(Object.assign({query:`
2
- query ${e} ${`($owned: Boolean $limit: Int${n?" $status: ApplicationStatus":""})`}{
3
- ${t} ${`(owned: $owned limit: $limit${n?" status: $status":""})`} {
4
- records {
5
- id
6
- name
7
- key
8
- description
9
- iconUrl
10
- isPublic
11
- ownerOrganizationId
12
- status
13
- }
14
- }
15
- }
16
- `,variables:{owned:!1,limit:100,status:n||void 0},operationName:e},r)))[t]})}getBuiltIn("Promise"),$$2({target:"Promise",stat:!0,forced:FORCED_PROMISE_CONSTRUCTOR},{resolve:function(e){return promiseResolve(this,e)}});const fetchAllApplications=(n,r)=>__awaiter(void 0,void 0,void 0,function*(){try{const e=yield fetch(n+"/v1/admin/applications?allActive=true&limit=99999&offset=0",{method:"GET",headers:Object.assign({"Content-Type":"application/json"},r&&{Authorization:"Bearer "+r}),credentials:"include"}),t=yield e.json();return t.records=t.results.map(e=>Object.assign({name:e.applicationName,iconUrl:e.applicationIconUrl,id:e.applicationId,isPublic:e.public,description:e.applicationDescription},e)),t}catch(e){throw console.error(e),new Error("Something went wrong while loading apps")}});function*fetchInstalledAppsSaga(){try{const e=yield fetchOrgsApplications("active",yield select(selectApiConfigs));e.records=e.records.sort((e,t)=>e.name.localeCompare(t.name)),yield put(actions.adminCenterApplications.fetchInstalledApplicationsSuccess(e.records))}catch(e){yield put(actions.adminCenterApplications.fetchInstalledApplicationsFailure()),console.log(e)}}function*fetchAllAppsSaga(){try{var e=yield select(selectApiConfigs),t=yield fetchAllApplications(e.apiRoot,e.token);yield put(actions.adminCenterApplications.fetchAllApplicationsSuccess(t.records))}catch(e){yield put(actions.adminCenterApplications.fetchAllApplicationsFailure()),console.log(e)}}function*getInstalledAppsWatcher(){yield takeEvery$1(actions.adminCenterApplications.fetchInstalledApplicationsStart.type,fetchInstalledAppsSaga)}function*getAllAppsWatcher(){yield takeEvery$1(actions.adminCenterApplications.fetchAllApplicationsStart.type,fetchAllAppsSaga)}function*rootSaga(){yield all([getInstalledAppsWatcher(),getAllAppsWatcher()])}var aCallable=aCallable$9,toObject=toObject$5,IndexedObject=indexedObject,lengthOfArrayLike=lengthOfArrayLike$5,$TypeError=TypeError,createMethod$1=function(c){return function(e,t,n,r){aCallable(t);var i=toObject(e),a=IndexedObject(i),o=lengthOfArrayLike(i),s=c?o-1:0,l=c?-1:1;if(n<2)for(;;){if(s in a){r=a[s],s+=l;break}if(s+=l,c?s<0:o<=s)throw $TypeError("Reduce of empty array with no initial value")}for(;c?0<=s:s<o;s+=l)s in a&&(r=t(r,a[s],s,i));return r}},arrayReduce={left:createMethod$1(!1),right:createMethod$1(!0)},$$1=_export,$reduce=arrayReduce.left,arrayMethodIsStrict=arrayMethodIsStrict$2,CHROME_VERSION=engineV8Version,IS_NODE=engineIsNode,STRICT_METHOD=arrayMethodIsStrict$2("reduce"),CHROME_BUG=!IS_NODE&&79<CHROME_VERSION&&CHROME_VERSION<83;$$1({target:"Array",proto:!0,forced:!STRICT_METHOD||CHROME_BUG},{reduce:function(e){var t=arguments.length;return $reduce(this,e,t,1<t?arguments[1]:void 0)}});const selectStatus=e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e.status},selectApplication=e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e.application},selectApplicationKey=e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e.applicationKey},selectOwnerOrganization=e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e.ownerOrganization},selectApplicationRoles=e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e.appRoles},selectApplicationUsers=e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e.applicationUsers},selectModifiedUsers=e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e.modifiedUsers},selectUsersStatus=e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e.usersStatus},selectUserSearchResults=e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e.userSearchResults},selectAllUsers=createSelector([selectApplicationUsers],e=>[...e].sort((e,t)=>{e=e.lastName+" "+e.firstName,t=t.lastName+" "+t.firstName;return e<t?-1:t<e?1:0})),selectUserIds=createSelector([selectAllUsers],e=>e.map(e=>e.id)),selectUser=t=>createSelector([selectApplicationUsers],e=>e.find(e=>e.id===t)),appDetailsResponseFields=`records {
17
- id
18
- name
19
- key
20
- description
21
- status
22
- iconUrl
23
- isPublic
24
- applicationConfig {
25
- records {
26
- configKey
27
- configType
28
- description
29
- value
30
- valueJSON
31
- configLevel
32
- required
33
- secured
34
- }
35
- }
36
- entityTags {
37
- tagKey
38
- tagValue
39
- }
40
- ownerOrganizationId
41
- }`;function getApplicationById(i,a){return __awaiter(this,void 0,void 0,function*(){var e="getApplicationById",t="applications",n={id:a},r=`
42
- query ${e} ($id: ID!){
43
- ${t} (owned: false, id: $id) {
44
- ${appDetailsResponseFields}
45
- }
46
- }
47
- `;try{return(yield baseGraphQLApiWithError(Object.assign({query:r,operationName:e,variables:n},i)))[t]}catch(e){throw console.log(e),new Error("Something went wrong while loading app details")}})}function getOrganizationName(n,r){return __awaiter(this,void 0,void 0,function*(){var e="getOrganizationName",t={id:r};try{return yield baseGraphQLApiWithError(Object.assign({query:"\n query getOrganizationName ($id: ID!){\n organization (id: $id) {\n id\n name\n }\n }\n ",operationName:e,variables:t},n))}catch(e){console.log(e)}})}function installApp(n,r){return __awaiter(this,void 0,void 0,function*(){var e="installApp",t=`
48
- query ${e} ($orgId: ID! $appId: ID! $configs: [ApplicationConfigInput!]) {
49
- applicationAddToOrg (orgId: $orgId appId: $appId configs: $configs) {
50
- ${appDetailsResponseFields}
51
- }
52
- }
53
- `;try{return yield baseGraphQLApiWithError(Object.assign({query:t,operationName:e,variables:r},n))}catch(e){console.log(e)}})}function fetchOrgAppUsers(t,n){return __awaiter(this,void 0,void 0,function*(){var e="fetchOrgAppUsers";return(yield baseGraphQLApiWithError(Object.assign({query:"\n query fetchOrgAppUsers($ids: [ID]) {\n users(\n organizationIds: $ids\n status: active\n limit: 5000\n ) {\n records {\n id\n firstName\n lastName\n email\n imageUrl\n roles {\n appName\n id\n name\n }\n createdDateTime\n }\n }\n }\n ",operationName:e,variables:{ids:[n]}},t))).users})}function fetchOrgAppsAndRoles(n,r){return __awaiter(this,void 0,void 0,function*(){var e="fetchOrgAppsAndRoles",t="organization";return(yield baseGraphQLApiWithError(Object.assign({query:"\n query fetchOrgAppsAndRoles($id: ID!){\n organization(id: $id){\n roles(isAppEventRole: false) {\n id\n name\n appName\n description\n }\n }\n }\n ",operationName:e,variables:{id:r}},n)))[t].roles})}function searchOrgUserName(t,n){return __awaiter(this,void 0,void 0,function*(){var e="orgUser";return(yield baseGraphQLApiWithError(Object.assign({query:"\n query orgUser ($name: String){\n users (name: $name status: active) {\n records{\n id\n firstName\n lastName\n email\n imageUrl\n roles {\n appName\n id\n name\n }\n }\n }\n }\n ",operationName:e,variables:{name:n}},t))).users})}function updateApplicationUsers(n,r){return __awaiter(this,void 0,void 0,function*(){var e="updateApplicationUsers",t="updateUser";return(yield baseGraphQLApiWithError(Object.assign({query:"\n mutation updateApplicationUsers ($input: UpdateUser ){\n updateUser (input: $input){\n id\n firstName\n lastName\n email\n imageUrl\n roles {\n appName\n id\n name\n }\n }\n }\n ",operationName:e,variables:{input:r}},n)))[t]})}function*fetchOwnerOrganization(e,t){let n={};try{var r=(yield call$g(getOrganizationName,e,t))["organization"];n=r}catch(e){n={id:t,name:" "},console.log(e)}return n}function*fetchApplicationDetailsSaga(e){try{var t=yield select(selectApiConfigs),[n]=(yield call$g(getApplicationById,t,e.payload.applicationId)).records,r=yield call$g(fetchOwnerOrganization,t,n.ownerOrganizationId);yield put(actions$1.fetchApplicationSuccess({application:n,organization:r}))}catch(e){yield put(actions$1.fetchApplicationError()),console.log(e)}}function*installAppSaga(e){try{var t=yield select(selectApiConfigs),[n]=(yield call$g(installApp,t,e.payload)).records;yield put(actions$1.installAppSuccess(n))}catch(e){yield put(actions$1.installAppFailure()),console.log(e)}}function*initApplicationUsersSaga(e){(yield select(selectApplicationKey))!==e.payload.applicationKey?(yield put(actions$1.fetchApplicationRolesStart()),yield put(actions$1.fetchApplicationUsersStart()),yield put(actions$1.initApplicationUsersSuccess(e.payload))):yield put(actions$1.initApplicationUsersSuccess(Object.assign(Object.assign({},e.payload),{skipLoad:!0})))}function*fetchApplicationUsersSaga(){var e,t;try{var n=yield select(selectApiConfigs),r=yield select(userSelector),i=yield call$g(fetchOrgAppUsers,n,(null==(t=null==(e=null==r?void 0:r.organization)?void 0:e.organizationId)?void 0:t.toString())||"");yield put(actions$1.fetchApplicationUsersSuccess(i.records))}catch(e){yield put(actions$1.fetchApplicationUsersFailure()),console.log(e)}}function*fetchApplicationRolesSaga(){var e,t;try{var n=yield select(selectApiConfigs),r=yield select(userSelector),i=yield call$g(fetchOrgAppsAndRoles,n,(null==(t=null==(e=null==r?void 0:r.organization)?void 0:e.organizationId)?void 0:t.toString())||"");yield put(actions$1.fetchApplicationRolesSuccess(i))}catch(e){yield put(actions$1.fetchApplicationRolesFailure()),console.log(e)}}function*searchUsersSaga(e){try{var t=yield select(selectApiConfigs),n=yield call$g(searchOrgUserName,t,e.payload);yield put(actions$1.searchApplicationUsersSuccess(n.records))}catch(e){yield put(actions$1.searchApplicationUsersFailure()),console.log(e)}}function*saveApplicationUsersSaga(){var e=yield select(preferredLanguageSelector);const t=AIWareFormatMessage(e);try{const n=yield select(selectApiConfigs),r=yield select(selectModifiedUsers);yield all(r.map(e=>call$g(updateApplicationUsers,n,e))),yield put(actions$1.saveApplicationUsersSuccess()),yield put(actions$1.fetchApplicationUsersStart()),yield put(showMessage({content:t({id:"os-admin-center-applications.applications-detail-panel.save-success",defaultMessage:[{type:0,value:"App user changes saved successfully"}]}),severity:MessageSeverity.Success}))}catch(e){yield put(actions$1.saveApplicationUsersFailure()),console.log(e)}}function*removeApplicationUserRoleSaga(t){var e=yield select(preferredLanguageSelector);const n=AIWareFormatMessage(e),r=yield select(selectApplicationUsers),i=yield select(selectApplicationRoles),a=r.find(e=>e.id===t.payload);(null===a||void 0===a?void 0:a.roles.reduce((e,t)=>{var n;return roleIsInList(i,t)&&isAdminRole(t)?(n=r.filter(e=>roleIsInList(e.roles,t)),e&&1<n.length):e},!0))?yield put(actions$1.removeApplicationUserRoleSuccess(t.payload)):yield put(showMessage({content:n({id:"os-admin-center-applications.applications-detail-panel.cannot-remove-role-message",defaultMessage:[{type:0,value:"You cannot remove the last application admin from the application"}]}),severity:MessageSeverity.Error}))}function*getApplicationDetailsWatcher(){yield takeEvery$1(actions$1.fetchApplicationStart.type,fetchApplicationDetailsSaga)}function*installAppWatcher(){yield takeEvery$1(actions$1.installAppStart.type,installAppSaga)}function*initApplicationUsersWatcher(){yield takeEvery$1(actions$1.initApplicationUsers.type,initApplicationUsersSaga)}function*fetchApplicationUsersWatcher(){yield takeEvery$1(actions$1.fetchApplicationUsersStart.type,fetchApplicationUsersSaga)}function*fetchApplicationRolesWatcher(){yield takeEvery$1(actions$1.fetchApplicationRolesStart.type,fetchApplicationRolesSaga)}function*searchUsersWatcher(){yield takeEvery$1(actions$1.searchApplicationUsersStart.type,searchUsersSaga)}function*saveApplicationUsersWatcher(){yield takeEvery$1(actions$1.saveApplicationUsersStart.type,saveApplicationUsersSaga)}function*removeApplicationUserRoleWatcher(){yield takeEvery$1(actions$1.removeApplicationUserRoleStart.type,removeApplicationUserRoleSaga)}function*applicationDetailsPanelRootSaga(){yield all([getApplicationDetailsWatcher(),installAppWatcher(),initApplicationUsersWatcher(),fetchApplicationUsersWatcher(),fetchApplicationRolesWatcher(),searchUsersWatcher(),saveApplicationUsersWatcher(),removeApplicationUserRoleWatcher()])}function getAdminCenterApplicationsModule(){return{id:SLICE_NAME$1,reducerMap:{[SLICE_NAME$1]:rootReducer},sagas:[rootSaga],initialActions:[]}}function getApplicationDetailsPanelModule(){return{id:SLICE_NAME,reducerMap:{[SLICE_NAME]:applicationDetailsPanelReducer},sagas:[applicationDetailsPanelRootSaga],initialActions:[]}}const tabsList$1=[{label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.lpZXMd",defaultMessage:"All Applications",description:"Admin center all applications label"}),disabled:!1,id:"All Applications"},{label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.lpZXMy",defaultMessage:"Installed Applications",description:"Admin center installed applications label"}),disabled:!1,id:"Installed Applications"}],ApplicationsTable=()=>{const[r,t]=react.exports.useState(0),[i,a]=react.exports.useState(["",""]),[e,o]=react.exports.useState([]),[n,s]=react.exports.useState([]),l=useSelector(selectIsUserAdmin),c=useSelector(selectInstalledApps),u=useSelector(selectAllApps);var d=useSelector(selectInstalledAppsUiStatus),p=useSelector(selectAllAppsUiStatus);const f=useDispatch(),m=useIntl();var h=m.formatMessage({id:"os-admin-center-panel.applications.search.label",defaultMessage:[{type:0,value:"Search App Name"}]});react.exports.useEffect(()=>{o(u)},[u]),react.exports.useEffect(()=>{s(c)},[c]),react.exports.useEffect(()=>{f(actions.adminCenterApplications.fetchInstalledApplicationsStart()),l&&f(actions.adminCenterApplications.fetchAllApplicationsStart())},[f]);return jsxRuntime.exports.jsxs(React.Fragment,{children:[jsxRuntime.exports.jsxs(Box,Object.assign({sx:{borderBottom:"1px solid #e8e8e8",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"}},{children:[jsxRuntime.exports.jsx(Box,Object.assign({sx:{"& .Sdk-MuiTab-root.Mui-selected":{color:"text.primary",fontWeight:600},width:l?"350px":"180px"}},{children:jsxRuntime.exports.jsx(CustomTabs,{selectedId:r,onChangeTab:e=>{t(e)},tabsList:l?tabsList$1:[tabsList$1[1]]})})),jsxRuntime.exports.jsx(Box,Object.assign({sx:{width:"190px",mr:6}},{children:jsxRuntime.exports.jsx(TextField,{sx:{"& fieldset":{borderRadius:"20px"},"& .Sdk-MuiInputBase-root":{height:"30px"}},size:"small",fullWidth:!0,id:"outlined-basic","data-testid":"admin-center-applications-search-app-name-input",variant:"outlined",value:i[r],onChange:e=>{const t=e.target.value,n=i;if(n[r]=t,a(n),!l)return e=c.filter(e=>e.name.toLowerCase().includes(t.toLowerCase())),void s(e);0===r?(e=u.filter(e=>e.name.toLowerCase().includes(i[0].toLowerCase())),o(e)):(e=c.filter(e=>e.name.toLowerCase().includes(i[1].toLowerCase())),s(e))},placeholder:h,InputProps:{startAdornment:jsxRuntime.exports.jsx(InputAdornment,Object.assign({position:"start"},{children:jsxRuntime.exports.jsx(default_1,{})}))}})}))]})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:r,index:0},{children:l?jsxRuntime.exports.jsx(ApplicationList,{apps:e,uiStatus:p,onRetry:()=>f(actions.adminCenterApplications.fetchAllApplicationsStart()),showInstalledChip:!0,isAppInstalled:t=>-1!==n.findIndex(e=>e.id===t)}):jsxRuntime.exports.jsx(ApplicationList,{apps:n,uiStatus:d,onRetry:()=>f(actions.adminCenterApplications.fetchInstalledApplicationsStart())})})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:r,index:1},{children:jsxRuntime.exports.jsx(ApplicationList,{apps:n,uiStatus:d,onRetry:()=>f(actions.adminCenterApplications.fetchInstalledApplicationsStart())})}))]})},useStyles$2=makeStyles()(e=>({root:{display:"flex",flexDirection:"column",height:"100%"},header:{display:"flex",justifyContent:"space-between",padding:e.spacing(4),borderBottom:"0.5px solid "+e.palette.divider},tableWrapper:{overflow:"hidden"},toolbar:{alignItems:"baseline","& button svg":{marginRight:"5px"},display:"flex",justifyContent:"center"}}));function ApplicationsTab({}){var e=useStyles$2()["classes"];return jsxRuntime.exports.jsxs("section",Object.assign({className:e.root},{children:[jsxRuntime.exports.jsx("header",Object.assign({className:e.header},{children:jsxRuntime.exports.jsxs(Box,Object.assign({sx:{mr:15}},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h5","data-testid":"org-applications.header"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-panel.applications.table.header",defaultMessage:"Applications",description:"Application Header"})})),jsxRuntime.exports.jsx(Typography,Object.assign({sx:{mt:1},variant:"subtitle1","data-testid":"org-applications.description"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-panel.applications.table.description",defaultMessage:"Browse and manage the applications that are enabled for this Organization and its users.",description:"Applications Tab Description"})}))]}))})),jsxRuntime.exports.jsx("div",Object.assign({className:e.tableWrapper},{children:jsxRuntime.exports.jsx(ApplicationsTable,{})}))]}))}const useStyles$1=makeStyles()((e,{isEmpty:t})=>({panelRoot:{width:"100%"},panelLoading:{height:300},panelContainer:{display:"flex",flexDirection:"column",width:"100%",padding:e.spacing(2)},panelHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",paddingLeft:e.spacing(1),marginBottom:e.spacing(1),"&.with-secondary-title":{alignItems:"flex-start"}},panelHeaderLine:{minHeight:"16px"},panelContent:{width:"100%"},panelBody:{display:"flex",flexGrow:1},divider:{marginBottom:e.spacing(2)},engineHeader:{minHeight:"120px"},headerInfo:{paddingLeft:e.spacing(4),flexGrow:1},headerOwner:{color:"#0c53b0",minHeight:"16px"},detailInfo:{paddingTop:e.spacing(3)},detailInfoBody:{paddingLeft:e.spacing(4),paddingTop:e.spacing(3)},detailOverview:{paddingTop:e.spacing(6),paddingBottom:e.spacing(6),minHeight:"120px"},sectionTitle:{paddingBottom:e.spacing(3)},textContent:{fontStyle:"normal",fontWeight:400,fontSize:14,lineHeight:20},titleInline:{fontWeight:600,marginRight:e.spacing(1)},contentRow:{paddingBottom:e.spacing(3)},engineDescription:{paddingTop:e.spacing(2),paddingBottom:e.spacing(2)},engineVersion:{paddingLeft:e.spacing(3)},mainLayout:{paddingTop:e.spacing(2)},tabPanels:{width:"100%"},detailHeaderContainer:{paddingLeft:e.spacing(3),paddingTop:e.spacing(2),alignItems:"center"},taskTabPanels:{marginTop:e.spacing(2),paddingLeft:e.spacing(2),paddingRight:e.spacing(2),width:"100%",maxHeight:"160px",maxWidth:"660px",overflow:"auto",background:"#F4F4F4",border:"1px solid #D5DFE9","box-sizing":"border-box","border-radius":"4px"},metricsList:{paddingTop:e.spacing(6)},taskFitlerContainer:{marginTop:e.spacing(4),marginBottom:e.spacing(2),height:"40px",lineHeight:"40px",display:"flex","flex-wrap":"wrap","flex-direction":"row","justify-content":"flex-end"},taskFitlerItem:{marginRight:e.spacing(2)},tabsContainer:{"& .Sdk-Mui-selected":{color:"black"},"& .Sdk-MuiTabs-indicator":{backgroundColor:"#000"}},tabsParent:{padding:e.spacing(0,3,0,3),"& div":{borderBottom:"none"},"& div button":{fontFamily:"Nunito",fontWeight:400,flex:"0 1 auto !important",minWidth:"unset"}},configName:{marginBottom:"4px"},configDescription:{marginBottom:"9px"},configContainer:{paddingLeft:"21px",marginBottom:"21px"},configDivider:{marginTop:"21px"},configInput:{"& input":{borderColor:"#E1E6ED",paddingTop:"18px",paddingBottom:"18px",minWidth:"320px"}},requiredLabel:{color:"#9CA8B4",marginLeft:"6px"},helperText:{paddingLeft:"15px",fontSize:"12px",fontWeight:"bold"},noConfigs:{textAlign:"center",marginTop:"30px","& svg":{width:"160px",height:"160px",marginBottom:"20px"}},uninstallBtn:{marginTop:t?"40px":"0",padding:"8px 15px"},actionButtons:{"& button":{padding:"8px 15px",lineHeight:"20px"},display:"flex",justifyContent:"right"},appSettingsContainer:{display:"flex",justifyContent:"space-between",flexDirection:"column",height:"calc(100vh - 55px - 250px)"},overviewButton:{alignSelf:"center"},appUsersList:{display:"flex",flexDirection:"column",height:"calc(100vh - 55px - 240px)",alignItems:"stretch"},listContainer:{display:"flex",flexDirection:"column",flexGrow:1,padding:e.spacing(0,3,0,3),overflowY:"auto"},btnContainer:{alignItems:"end",display:"flex",justifyContent:"flex-end",marginTop:"12px",marginBottom:"30px",marginRight:"20px"}})),useStyles=makeStyles()(e=>({root:{borderRadius:"50%",border:"2px solid #D5DFE9",display:"flex",justifyContent:"center",alignItems:"center",overflow:"hidden"},small:{width:e.spacing(6),height:e.spacing(6)},medium:{width:e.spacing(9),height:e.spacing(9)},large:{width:e.spacing(12),height:e.spacing(12)},xlarge:{width:e.spacing(16),height:e.spacing(16)},logo:{maxWidth:"100%",maxHeight:"100%"},veritoneLogo:{maxWidth:"75%",maxHeight:"75%"}})),Logo=({size:e="xlarge",path:t="",altText:n})=>{var r=useStyles()["classes"],[t,i]=useBackupImg(t,img$1u);return jsxRuntime.exports.jsx("div",Object.assign({className:r.root+" "+r[e]},{children:jsxRuntime.exports.jsx("img",{className:r.logo+" "+(t===img$1u&&r.veritoneLogo),src:t,alt:n,onError:i})}))},getSignedUriPath=n=>{const e=["iconUrl"].map(e=>e);return e.reduce((e,t)=>n[t]||e,void 0)},DetailHeader=({installationConfig:t})=>{const n=useSelector(selectApplication),e=useSelector(selectInstalledApps);var r=e.some(e=>e.id===(null===n||void 0===n?void 0:n.id)),i=useSelector(selectOwnerOrganization);const a=(useSelector(userSelector)||{})["organization"];var o=useStyles$1({})["classes"],s=null==(s=n.entityTags)?void 0:s.map(e=>e.tagKey).join(", "),l=getSignedUriPath(n);const c=useDispatch();return jsxRuntime.exports.jsxs(Box,Object.assign({display:"flex",flexDirection:"row",className:o.detailHeaderContainer,"data-testid":"application-details-header"},{children:[jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(Logo,{path:l,altText:n.name+" Logo"})}),jsxRuntime.exports.jsxs("div",Object.assign({className:o.headerInfo},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h1","data-testid":"application-details-header-name"},{children:n.name})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption",className:o.headerOwner,"data-testid":"application-details-header-owner"},{children:null==i?void 0:i.name})),jsxRuntime.exports.jsx(Box,Object.assign({display:"flex",flexDirection:"row",className:o.panelHeaderLine},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:s}))}))]})),jsxRuntime.exports.jsx("div",{children:!r&&jsxRuntime.exports.jsx(Button,Object.assign({color:"primary",variant:"contained",onClick:()=>{var e;c(actions$1.installAppStart({appId:n.id,orgId:(null==(e=null===a||void 0===a?void 0:a.organizationId)?void 0:e.toString())||"",configs:t||[]}))}},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"admin-center.applications.install-btn",defaultMessage:"Install App",description:"Install App button label"})}))})]}))},InfoItem=({dataTest:e,title:t,value:n})=>jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:6},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption","data-testid":`application-details-panel-detail-info-${e}-caption`},{children:t})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h5","data-testid":"application-details-panel-detail-info-"+e},{children:n}))]})),BasicInfo=()=>{var e=useSelector(selectApplication),t=useStyles$1({})["classes"];return jsxRuntime.exports.jsxs(Box,Object.assign({"data-test":"application-details-panel-basic-info-content"},{children:[jsxRuntime.exports.jsxs(Box,Object.assign({className:t.detailOverview,"data-testid":"application-details-panel-overview"},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h3",className:t.sectionTitle},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.application-detail-panel-overview-title",defaultMessage:"Overview",description:"title of the Overview section on the application details panel"})})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h5"},{children:e.description}))]})),jsxRuntime.exports.jsx(Divider,{}),jsxRuntime.exports.jsxs(Box,Object.assign({className:t.detailInfo,"data-testid":"application-details-panel-basic-info-details"},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h3",className:t.sectionTitle},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.application-detail-panel-basic-info-details-title",defaultMessage:"Information",description:"The title of the Information section in the application details panel basic info"})})),jsxRuntime.exports.jsxs(Grid,Object.assign({container:!0,spacing:4,className:t.detailInfoBody},{children:[jsxRuntime.exports.jsx(InfoItem,{dataTest:"name",title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.application-detail-panel-info-name-title",defaultMessage:"Name",description:"The title of the name field in the application details panel basic info"}),value:e.name}),jsxRuntime.exports.jsx(InfoItem,{dataTest:"app-id",title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.application-detail-panel-info-app-id-title",defaultMessage:"App ID",description:"The title of the app id field in the application details panel basic info"}),value:e.id}),jsxRuntime.exports.jsx(InfoItem,{dataTest:"tags",title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.application-detail-panel-info-tags-title",defaultMessage:"Tags",description:"The title of the tags field in the application details panel basic info"}),value:null==(t=e.entityTags)?void 0:t.map(e=>e.tagKey).join(", ")})]}))]}))]}))},formattedMessages=e=>({fieldIsRequired:e.formatMessage({id:"admin-center-applcations.application-details-panel.settings-tab.required-field-error",defaultMessage:[{type:0,value:"This field is required"}]})}),SettingsTab=({intl:e,setInstallationConfig:t})=>{const n=formattedMessages(e)["fieldIsRequired"],r=useSelector(selectApplication),[i,a]=react.exports.useState([]),[o,s]=react.exports.useState([]),[l,c]=react.exports.useState(!1),u=useStyles$1({isEmpty:0===i.length})["classes"];e=useSelector(betaFeaturesSelector);react.exports.useEffect(()=>{var e;r&&null!=(e=null===r||void 0===r?void 0:r.applicationConfig)&&e.records&&(a(null==(e=null===r||void 0===r?void 0:r.applicationConfig)?void 0:e.records),l||(c(!0),s(null==(e=null===r||void 0===r?void 0:r.applicationConfig)?void 0:e.records)))},[r]);const d=t=>{var e;return null==(e=i.find(e=>e.configKey===t))?void 0:e.value},p=(n,t)=>{const r=i.findIndex(e=>e.configKey===t);-1!==r&&a(e=>{const t=[...e];e=Object.assign(Object.assign({},t[r]),{value:n});return t[r]=e,t})};const f=e=>e.required&&!d(e.configKey);return jsxRuntime.exports.jsxs(Box,Object.assign({"data-testid":"application-details-panel.app-settings.container",className:u.appSettingsContainer},{children:[jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsxs(Box,Object.assign({className:u.detailOverview,"data-test":"application-details-panel-overview"},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h3",className:u.sectionTitle},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.application-detail-panel-app-settings-title",defaultMessage:"App Settings",description:"title of the App Settings section on the application details panel"})})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h5"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.application-detail-panel-basic-info-details-title",defaultMessage:"Set your Organization settings that will be applied to all users of this application.",description:"App settings description text"})}))]})),jsxRuntime.exports.jsxs(Box,Object.assign({"data-test":"application-details-panel-app-settings-details"},{children:[i.length?i.map(e=>jsxRuntime.exports.jsxs("div",Object.assign({className:u.configContainer,"data-testid":"application-config-container"},{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({container:!0},{children:[jsxRuntime.exports.jsx(Grid,Object.assign({item:!0},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h3",className:u.configName},{children:e.configKey}))})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h3",className:u.requiredLabel},{children:e.required?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:["(",jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.application-detail-panel-app-settings.required-label",defaultMessage:"Required",description:"Required label for the app config"}),")"]}):null}))}))]})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",className:u.configDescription},{children:e.description})),(t=>{switch(t.configType){case EConfigTypes.string:return jsxRuntime.exports.jsx(TextField,{value:d(t.configKey),onChange:e=>p(e.target.value,t.configKey),disabled:t.secured,className:u.configInput,error:f(t),label:f(t)?n:void 0});case EConfigTypes.json:return;case EConfigTypes.boolean:return jsxRuntime.exports.jsx(Switch,{checked:d(t.configKey),disabled:t.secured,onChange:e=>p(e.target.checked,t.configKey)});default:return null}})(e),jsxRuntime.exports.jsx(Divider,{className:u.configDivider})]}),e.configKey)):jsxRuntime.exports.jsxs("div",Object.assign({className:u.noConfigs},{children:[jsxRuntime.exports.jsx(NoApps,{fontSize:"large"}),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",className:u.helperText},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"admin-center-applications.application-details.no-configs",defaultMessage:"This app does not have any configs.",description:"No Applciation configs"})}))]})),jsxRuntime.exports.jsx("div",{children:e&&jsxRuntime.exports.jsx(Button,Object.assign({variant:"outlined",className:u.uninstallBtn,"data-testid":"admin-center-applications-details-uninstall-btn"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"admin-center-applications.application-details.uninstall-btn",defaultMessage:"Uninstall Application",description:"Uninstall Application button label"})}))})]}))]}),jsxRuntime.exports.jsxs("div",Object.assign({className:u.actionButtons},{children:[jsxRuntime.exports.jsx(Button,Object.assign({variant:"text",sx:{color:"black",marginRight:"15px",fontWeight:400},onClick:()=>a(o),"data-testid":"admin-center-applications-details-cancel-button"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"admin-center-applications.application-details.cancel-btn",defaultMessage:"Cancel",description:"Cancel button label"})})),jsxRuntime.exports.jsx(Button,Object.assign({variant:"contained",disabled:lodash.exports.isEqual(o,i)||!!i.find(e=>e.required&&!e.value&&"boolean"!=typeof e.value),onClick:()=>{t(i),s(i)},"data-testid":"admin-center-applications-details-save-button"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"admin-center-applications.application-details.save-btn",defaultMessage:"Save",description:"Save button label"})}))]}))]}))};var AppSettings=injectIntl(SettingsTab),luxon={};function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function _construct(e,t,n){return(_construct=_isNativeReflectConstruct()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);t=new(Function.bind.apply(e,r));return n&&_setPrototypeOf(t,n.prototype),t}).apply(null,arguments)}function _isNativeFunction(e){return-1!==Function.toString.call(e).indexOf("[native code]")}function _wrapNativeSuper(e){var n="function"==typeof Map?new Map:void 0;return(_wrapNativeSuper=function(e){if(null===e||!_isNativeFunction(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return _construct(e,arguments,_getPrototypeOf(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(t,e)})(e)}function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};for(var n,r={},i=Object.keys(e),a=0;a<i.length;a++)n=i[a],0<=t.indexOf(n)||(r[n]=e[n]);return r}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _createForOfIteratorHelperLoose(e){var t=0;if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator])return(t=e[Symbol.iterator]()).next.bind(t);if(Array.isArray(e)||(e=_unsupportedIterableToArray(e)))return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}Object.defineProperty(luxon,"__esModule",{value:!0});var LuxonError=function(e){function t(){return e.apply(this,arguments)||this}return _inheritsLoose(t,e),t}(_wrapNativeSuper(Error)),InvalidDateTimeError=function(t){function e(e){return t.call(this,"Invalid DateTime: "+e.toMessage())||this}return _inheritsLoose(e,t),e}(LuxonError),InvalidIntervalError=function(t){function e(e){return t.call(this,"Invalid Interval: "+e.toMessage())||this}return _inheritsLoose(e,t),e}(LuxonError),InvalidDurationError=function(t){function e(e){return t.call(this,"Invalid Duration: "+e.toMessage())||this}return _inheritsLoose(e,t),e}(LuxonError),ConflictingSpecificationError=function(e){function t(){return e.apply(this,arguments)||this}return _inheritsLoose(t,e),t}(LuxonError),InvalidUnitError=function(t){function e(e){return t.call(this,"Invalid unit "+e)||this}return _inheritsLoose(e,t),e}(LuxonError),InvalidArgumentError=function(e){function t(){return e.apply(this,arguments)||this}return _inheritsLoose(t,e),t}(LuxonError),ZoneIsAbstractError=function(e){function t(){return e.call(this,"Zone is an abstract class")||this}return _inheritsLoose(t,e),t}(LuxonError),n="numeric",s="short",l="long",DATE_SHORT={year:n,month:n,day:n},DATE_MED={year:n,month:s,day:n},DATE_MED_WITH_WEEKDAY={year:n,month:s,day:n,weekday:s},DATE_FULL={year:n,month:l,day:n},DATE_HUGE={year:n,month:l,day:n,weekday:l},TIME_SIMPLE={hour:n,minute:n},TIME_WITH_SECONDS={hour:n,minute:n,second:n},TIME_WITH_SHORT_OFFSET={hour:n,minute:n,second:n,timeZoneName:s},TIME_WITH_LONG_OFFSET={hour:n,minute:n,second:n,timeZoneName:l},TIME_24_SIMPLE={hour:n,minute:n,hour12:!1},TIME_24_WITH_SECONDS={hour:n,minute:n,second:n,hour12:!1},TIME_24_WITH_SHORT_OFFSET={hour:n,minute:n,second:n,hour12:!1,timeZoneName:s},TIME_24_WITH_LONG_OFFSET={hour:n,minute:n,second:n,hour12:!1,timeZoneName:l},DATETIME_SHORT={year:n,month:n,day:n,hour:n,minute:n},DATETIME_SHORT_WITH_SECONDS={year:n,month:n,day:n,hour:n,minute:n,second:n},DATETIME_MED={year:n,month:s,day:n,hour:n,minute:n},DATETIME_MED_WITH_SECONDS={year:n,month:s,day:n,hour:n,minute:n,second:n},DATETIME_MED_WITH_WEEKDAY={year:n,month:s,day:n,weekday:s,hour:n,minute:n},DATETIME_FULL={year:n,month:l,day:n,hour:n,minute:n,timeZoneName:s},DATETIME_FULL_WITH_SECONDS={year:n,month:l,day:n,hour:n,minute:n,second:n,timeZoneName:s},DATETIME_HUGE={year:n,month:l,day:n,weekday:l,hour:n,minute:n,timeZoneName:l},DATETIME_HUGE_WITH_SECONDS={year:n,month:l,day:n,weekday:l,hour:n,minute:n,second:n,timeZoneName:l};function isUndefined(e){return void 0===e}function isNumber(e){return"number"==typeof e}function isInteger(e){return"number"==typeof e&&e%1==0}function isString(e){return"string"==typeof e}function isDate(e){return"[object Date]"===Object.prototype.toString.call(e)}function hasIntl(){try{return"undefined"!=typeof Intl&&Intl.DateTimeFormat}catch(e){return!1}}function hasFormatToParts(){return!isUndefined(Intl.DateTimeFormat.prototype.formatToParts)}function hasRelative(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function maybeArray(e){return Array.isArray(e)?e:[e]}function bestBy(e,n,r){if(0!==e.length)return e.reduce(function(e,t){t=[n(t),t];return e&&r(e[0],t[0])===e[0]?e:t},null)[1]}function pick(n,e){return e.reduce(function(e,t){return e[t]=n[t],e},{})}function hasOwnProperty(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function integerBetween(e,t,n){return isInteger(e)&&t<=e&&e<=n}function floorMod(e,t){return e-t*Math.floor(e/t)}function padStart(e,t){void 0===t&&(t=2);var n=e<0?"-":"",e=n?-1*e:e,t=e.toString().length<t?("0".repeat(t)+e).slice(-t):e.toString();return n+t}function parseInteger(e){if(!isUndefined(e)&&null!==e&&""!==e)return parseInt(e,10)}function parseMillis(e){if(!isUndefined(e)&&null!==e&&""!==e)return e=1e3*parseFloat("0."+e),Math.floor(e)}function roundTo(e,t,n){void 0===n&&(n=!1);t=Math.pow(10,t);return(n?Math.trunc:Math.round)(e*t)/t}function isLeapYear(e){return e%4==0&&(e%100!=0||e%400==0)}function daysInYear(e){return isLeapYear(e)?366:365}function daysInMonth(e,t){var n=floorMod(t-1,12)+1;return 2===n?isLeapYear(e+(t-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function objToLocalTS(e){var t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&0<=e.year&&(t=new Date(t)).setUTCFullYear(t.getUTCFullYear()-1900),+t}function weeksInWeekYear(e){var t=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7,e=e-1,e=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7;return 4==t||3==e?53:52}function untruncateYear(e){return 99<e?e:60<e?1900+e:2e3+e}function parseZoneInfo(e,t,n,r){void 0===r&&(r=null);var i,e=new Date(e),a={hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"},r=(r&&(a.timeZone=r),Object.assign({timeZoneName:t},a)),t=hasIntl();return t&&hasFormatToParts()?(i=new Intl.DateTimeFormat(n,r).formatToParts(e).find(function(e){return"timezonename"===e.type.toLowerCase()}))?i.value:null:t?(i=new Intl.DateTimeFormat(n,a).format(e),new Intl.DateTimeFormat(n,r).format(e).substring(i.length).replace(/^[, \u200e]+/,"")):null}function signedOffset(e,t){e=parseInt(e,10),Number.isNaN(e)&&(e=0),t=parseInt(t,10)||0;return 60*e+(e<0||Object.is(e,-0)?-t:t)}function asNumber(e){var t=Number(e);if("boolean"==typeof e||""===e||Number.isNaN(t))throw new InvalidArgumentError("Invalid unit value "+e);return t}function normalizeObject(e,t,n){var r,i,a={};for(r in e)!hasOwnProperty(e,r)||0<=n.indexOf(r)||null!=(i=e[r])&&(a[t(r)]=asNumber(i));return a}function formatOffset(e,t){var n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),i=0<=e?"+":"-";switch(t){case"short":return i+padStart(n,2)+":"+padStart(r,2);case"narrow":return i+n+(0<r?":"+r:"");case"techie":return i+padStart(n,2)+padStart(r,2);default:throw new RangeError("Value format "+t+" is out of range for property format")}}function timeObject(e){return pick(e,["hour","minute","second","millisecond"])}var ianaRegex=/[A-Za-z_+-]{1,256}(:?\/[A-Za-z_+-]{1,256}(\/[A-Za-z_+-]{1,256})?)?/;function stringify(e){return JSON.stringify(e,Object.keys(e).sort())}var monthsLong=["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],monthsNarrow=["J","F","M","A","M","J","J","A","S","O","N","D"];function months(e){switch(e){case"narrow":return[].concat(monthsNarrow);case"short":return[].concat(monthsShort);case"long":return[].concat(monthsLong);case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var weekdaysLong=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],weekdaysShort=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],weekdaysNarrow=["M","T","W","T","F","S","S"];function weekdays(e){switch(e){case"narrow":return[].concat(weekdaysNarrow);case"short":return[].concat(weekdaysShort);case"long":return[].concat(weekdaysLong);case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var meridiems=["AM","PM"],erasLong=["Before Christ","Anno Domini"],erasShort=["BC","AD"],erasNarrow=["B","A"];function eras(e){switch(e){case"narrow":return[].concat(erasNarrow);case"short":return[].concat(erasShort);case"long":return[].concat(erasLong);default:return null}}function meridiemForDateTime(e){return meridiems[e.hour<12?0:1]}function weekdayForDateTime(e,t){return weekdays(t)[e.weekday-1]}function monthForDateTime(e,t){return months(t)[e.month-1]}function eraForDateTime(e,t){return eras(t)[e.year<0?0:1]}function formatRelativeTime(e,t,n,r){void 0===n&&(n="always"),void 0===r&&(r=!1);var i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},a=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&a){var o="days"===e;switch(t){case 1:return o?"tomorrow":"next "+i[e][0];case-1:return o?"yesterday":"last "+i[e][0];case 0:return o?"today":"this "+i[e][0]}}var n=Object.is(t,-0)||t<0,a=Math.abs(t),t=1===a,s=i[e],r=r?!t&&s[2]||s[1]:t?i[e][0]:e;return n?a+" "+r+" ago":"in "+a+" "+r}function formatString(e){var t="EEEE, LLLL d, yyyy, h:mm a";switch(stringify(pick(e,["weekday","era","year","month","day","hour","minute","second","timeZoneName","hour12"]))){case stringify(DATE_SHORT):return"M/d/yyyy";case stringify(DATE_MED):return"LLL d, yyyy";case stringify(DATE_MED_WITH_WEEKDAY):return"EEE, LLL d, yyyy";case stringify(DATE_FULL):return"LLLL d, yyyy";case stringify(DATE_HUGE):return"EEEE, LLLL d, yyyy";case stringify(TIME_SIMPLE):return"h:mm a";case stringify(TIME_WITH_SECONDS):return"h:mm:ss a";case stringify(TIME_WITH_SHORT_OFFSET):case stringify(TIME_WITH_LONG_OFFSET):return"h:mm a";case stringify(TIME_24_SIMPLE):return"HH:mm";case stringify(TIME_24_WITH_SECONDS):return"HH:mm:ss";case stringify(TIME_24_WITH_SHORT_OFFSET):case stringify(TIME_24_WITH_LONG_OFFSET):return"HH:mm";case stringify(DATETIME_SHORT):return"M/d/yyyy, h:mm a";case stringify(DATETIME_MED):return"LLL d, yyyy, h:mm a";case stringify(DATETIME_FULL):return"LLLL d, yyyy, h:mm a";case stringify(DATETIME_HUGE):return t;case stringify(DATETIME_SHORT_WITH_SECONDS):return"M/d/yyyy, h:mm:ss a";case stringify(DATETIME_MED_WITH_SECONDS):return"LLL d, yyyy, h:mm:ss a";case stringify(DATETIME_MED_WITH_WEEKDAY):return"EEE, d LLL yyyy, h:mm a";case stringify(DATETIME_FULL_WITH_SECONDS):return"LLLL d, yyyy, h:mm:ss a";case stringify(DATETIME_HUGE_WITH_SECONDS):return"EEEE, LLLL d, yyyy, h:mm:ss a";default:return t}}function stringifyTokens(e,t){for(var n="",r=_createForOfIteratorHelperLoose(e);!(i=r()).done;){var i=i.value;i.literal?n+=i.val:n+=t(i.val)}return n}var _macroTokenToFormatOpts={D:DATE_SHORT,DD:DATE_MED,DDD:DATE_FULL,DDDD:DATE_HUGE,t:TIME_SIMPLE,tt:TIME_WITH_SECONDS,ttt:TIME_WITH_SHORT_OFFSET,tttt:TIME_WITH_LONG_OFFSET,T:TIME_24_SIMPLE,TT:TIME_24_WITH_SECONDS,TTT:TIME_24_WITH_SHORT_OFFSET,TTTT:TIME_24_WITH_LONG_OFFSET,f:DATETIME_SHORT,ff:DATETIME_MED,fff:DATETIME_FULL,ffff:DATETIME_HUGE,F:DATETIME_SHORT_WITH_SECONDS,FF:DATETIME_MED_WITH_SECONDS,FFF:DATETIME_FULL_WITH_SECONDS,FFFF:DATETIME_HUGE_WITH_SECONDS},Formatter=function(){function p(e,t){this.opts=t,this.loc=e,this.systemLoc=null}p.create=function(e,t){return new p(e,t=void 0===t?{}:t)},p.parseFormat=function(e){for(var t=null,n="",r=!1,i=[],a=0;a<e.length;a++){var o=e.charAt(a);"'"===o?(0<n.length&&i.push({literal:r,val:n}),t=null,n="",r=!r):r||o===t?n+=o:(0<n.length&&i.push({literal:!1,val:n}),t=n=o)}return 0<n.length&&i.push({literal:r,val:n}),i},p.macroTokenToFormatOpts=function(e){return _macroTokenToFormatOpts[e]};var e=p.prototype;return e.formatWithSystemDefault=function(e,t){return null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,Object.assign({},this.opts,t)).format()},e.formatDateTime=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).format()},e.formatDateTimeParts=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).formatToParts()},e.resolvedOptions=function(e,t){return void 0===t&&(t={}),this.loc.dtFormatter(e,Object.assign({},this.opts,t)).resolvedOptions()},e.num=function(e,t){if(void 0===t&&(t=0),this.opts.forceSimple)return padStart(e,t);var n=Object.assign({},this.opts);return 0<t&&(n.padTo=t),this.loc.numberFormatter(n).format(e)},e.formatDateTimeFromString=function(n,e){var r=this,i="en"===this.loc.listingMode(),t=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar&&hasFormatToParts(),a=function(e,t){return r.loc.extract(n,e,t)},o=function(e){return n.isOffsetFixed&&0===n.offset&&e.allowZ?"Z":n.isValid?n.zone.formatOffset(n.ts,e.format):""},s=function(){return i?meridiemForDateTime(n):a({hour:"numeric",hour12:!0},"dayperiod")},l=function(e,t){return i?monthForDateTime(n,e):a(t?{month:e}:{month:e,day:"numeric"},"month")},c=function(e,t){return i?weekdayForDateTime(n,e):a(t?{weekday:e}:{weekday:e,month:"long",day:"numeric"},"weekday")},u=function(e){var t=p.macroTokenToFormatOpts(e);return t?r.formatWithSystemDefault(n,t):e},d=function(e){return i?eraForDateTime(n,e):a({era:e},"era")};return stringifyTokens(p.parseFormat(e),function(e){switch(e){case"S":return r.num(n.millisecond);case"u":case"SSS":return r.num(n.millisecond,3);case"s":return r.num(n.second);case"ss":return r.num(n.second,2);case"m":return r.num(n.minute);case"mm":return r.num(n.minute,2);case"h":return r.num(n.hour%12==0?12:n.hour%12);case"hh":return r.num(n.hour%12==0?12:n.hour%12,2);case"H":return r.num(n.hour);case"HH":return r.num(n.hour,2);case"Z":return o({format:"narrow",allowZ:r.opts.allowZ});case"ZZ":return o({format:"short",allowZ:r.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:r.opts.allowZ});case"ZZZZ":return n.zone.offsetName(n.ts,{format:"short",locale:r.loc.locale});case"ZZZZZ":return n.zone.offsetName(n.ts,{format:"long",locale:r.loc.locale});case"z":return n.zoneName;case"a":return s();case"d":return t?a({day:"numeric"},"day"):r.num(n.day);case"dd":return t?a({day:"2-digit"},"day"):r.num(n.day,2);case"c":return r.num(n.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return r.num(n.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return t?a({month:"numeric",day:"numeric"},"month"):r.num(n.month);case"LL":return t?a({month:"2-digit",day:"numeric"},"month"):r.num(n.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return t?a({month:"numeric"},"month"):r.num(n.month);case"MM":return t?a({month:"2-digit"},"month"):r.num(n.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return t?a({year:"numeric"},"year"):r.num(n.year);case"yy":return t?a({year:"2-digit"},"year"):r.num(n.year.toString().slice(-2),2);case"yyyy":return t?a({year:"numeric"},"year"):r.num(n.year,4);case"yyyyyy":return t?a({year:"numeric"},"year"):r.num(n.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return r.num(n.weekYear.toString().slice(-2),2);case"kkkk":return r.num(n.weekYear,4);case"W":return r.num(n.weekNumber);case"WW":return r.num(n.weekNumber,2);case"o":return r.num(n.ordinal);case"ooo":return r.num(n.ordinal,3);case"q":return r.num(n.quarter);case"qq":return r.num(n.quarter,2);case"X":return r.num(Math.floor(n.ts/1e3));case"x":return r.num(n.ts);default:return u(e)}})},e.formatDurationFromString=function(e,t){var n,r=this,i=function(e){switch(e[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"M":return"month";case"y":return"year";default:return null}},t=p.parseFormat(t),a=t.reduce(function(e,t){var n=t.literal,t=t.val;return n?e:e.concat(t)},[]),e=e.shiftTo.apply(e,a.map(i).filter(function(e){return e}));return stringifyTokens(t,(n=e,function(e){var t=i(e);return t?r.num(n.get(t),e.length):e}))},p}(),Invalid=function(){function e(e,t){this.reason=e,this.explanation=t}return e.prototype.toMessage=function(){return this.explanation?this.reason+": "+this.explanation:this.reason},e}(),Zone=function(){function e(){}var t=e.prototype;return t.offsetName=function(e,t){throw new ZoneIsAbstractError},t.formatOffset=function(e,t){throw new ZoneIsAbstractError},t.offset=function(e){throw new ZoneIsAbstractError},t.equals=function(e){throw new ZoneIsAbstractError},_createClass(e,[{key:"type",get:function(){throw new ZoneIsAbstractError}},{key:"name",get:function(){throw new ZoneIsAbstractError}},{key:"universal",get:function(){throw new ZoneIsAbstractError}},{key:"isValid",get:function(){throw new ZoneIsAbstractError}}]),e}(),singleton=null,LocalZone=function(e){function t(){return e.apply(this,arguments)||this}_inheritsLoose(t,e);var n=t.prototype;return n.offsetName=function(e,t){return parseZoneInfo(e,t.format,t.locale)},n.formatOffset=function(e,t){return formatOffset(this.offset(e),t)},n.offset=function(e){return-new Date(e).getTimezoneOffset()},n.equals=function(e){return"local"===e.type},_createClass(t,[{key:"type",get:function(){return"local"}},{key:"name",get:function(){return hasIntl()?(new Intl.DateTimeFormat).resolvedOptions().timeZone:"local"}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!0}}],[{key:"instance",get:function(){return singleton=null===singleton?new t:singleton}}]),t}(Zone),matchingRegex=RegExp("^"+ianaRegex.source+"$"),dtfCache={};function makeDTF(e){return dtfCache[e]||(dtfCache[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),dtfCache[e]}var typeToPos={year:0,month:1,day:2,hour:3,minute:4,second:5};function hackyOffset(e,t){var e=e.format(t).replace(/\u200E/g,""),t=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(e),e=t[1],n=t[2];return[t[3],e,n,t[4],t[5],t[6]]}function partsOffset(e,t){for(var n=e.formatToParts(t),r=[],i=0;i<n.length;i++){var a=n[i],o=a.type,a=a.value,o=typeToPos[o];isUndefined(o)||(r[o]=parseInt(a,10))}return r}var ianaZoneCache={},IANAZone=function(n){function r(e){var t=n.call(this)||this;return t.zoneName=e,t.valid=r.isValidZone(e),t}_inheritsLoose(r,n),r.create=function(e){return ianaZoneCache[e]||(ianaZoneCache[e]=new r(e)),ianaZoneCache[e]},r.resetCache=function(){ianaZoneCache={},dtfCache={}},r.isValidSpecifier=function(e){return!(!e||!e.match(matchingRegex))},r.isValidZone=function(e){try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}},r.parseGMTOffset=function(e){if(e){e=e.match(/^Etc\/GMT(0|[+-]\d{1,2})$/i);if(e)return-60*parseInt(e[1])}return null};var e=r.prototype;return e.offsetName=function(e,t){return parseZoneInfo(e,t.format,t.locale,this.name)},e.formatOffset=function(e,t){return formatOffset(this.offset(e),t)},e.offset=function(e){e=new Date(e);if(isNaN(e))return NaN;var t=makeDTF(this.name),t=(t.formatToParts?partsOffset:hackyOffset)(t,e),n=t[0],r=t[1],i=t[2],a=t[3],e=+e,o=e%1e3;return(objToLocalTS({year:n,month:r,day:i,hour:24===a?0:a,minute:t[4],second:t[5],millisecond:0})-(e-=0<=o?o:1e3+o))/6e4},e.equals=function(e){return"iana"===e.type&&e.name===this.name},_createClass(r,[{key:"type",get:function(){return"iana"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return this.valid}}]),r}(Zone),singleton$1=null,FixedOffsetZone=function(n){function t(e){var t=n.call(this)||this;return t.fixed=e,t}_inheritsLoose(t,n),t.instance=function(e){return 0===e?t.utcInstance:new t(e)},t.parseSpecifier=function(e){if(e){e=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(e)return new t(signedOffset(e[1],e[2]))}return null},_createClass(t,null,[{key:"utcInstance",get:function(){return singleton$1=null===singleton$1?new t(0):singleton$1}}]);var e=t.prototype;return e.offsetName=function(){return this.name},e.formatOffset=function(e,t){return formatOffset(this.fixed,t)},e.offset=function(){return this.fixed},e.equals=function(e){return"fixed"===e.type&&e.fixed===this.fixed},_createClass(t,[{key:"type",get:function(){return"fixed"}},{key:"name",get:function(){return 0===this.fixed?"UTC":"UTC"+formatOffset(this.fixed,"narrow")}},{key:"universal",get:function(){return!0}},{key:"isValid",get:function(){return!0}}]),t}(Zone),InvalidZone=function(n){function e(e){var t=n.call(this)||this;return t.zoneName=e,t}_inheritsLoose(e,n);var t=e.prototype;return t.offsetName=function(){return null},t.formatOffset=function(){return""},t.offset=function(){return NaN},t.equals=function(){return!1},_createClass(e,[{key:"type",get:function(){return"invalid"}},{key:"name",get:function(){return this.zoneName}},{key:"universal",get:function(){return!1}},{key:"isValid",get:function(){return!1}}]),e}(Zone);function normalizeZone(e,t){var n;return isUndefined(e)||null===e?t:e instanceof Zone?e:isString(e)?"local"===(n=e.toLowerCase())?t:"utc"===n||"gmt"===n?FixedOffsetZone.utcInstance:null!=(t=IANAZone.parseGMTOffset(e))?FixedOffsetZone.instance(t):IANAZone.isValidSpecifier(n)?IANAZone.create(e):FixedOffsetZone.parseSpecifier(n)||new InvalidZone(e):isNumber(e)?FixedOffsetZone.instance(e):"object"==typeof e&&e.offset&&"number"==typeof e.offset?e:new InvalidZone(e)}var now=function(){return Date.now()},defaultZone=null,defaultLocale=null,defaultNumberingSystem=null,defaultOutputCalendar=null,throwOnInvalid=!1,Settings=function(){function e(){}return e.resetCaches=function(){Locale.resetCache(),IANAZone.resetCache()},_createClass(e,null,[{key:"now",get:function(){return now},set:function(e){now=e}},{key:"defaultZoneName",get:function(){return e.defaultZone.name},set:function(e){defaultZone=e?normalizeZone(e):null}},{key:"defaultZone",get:function(){return defaultZone||LocalZone.instance}},{key:"defaultLocale",get:function(){return defaultLocale},set:function(e){defaultLocale=e}},{key:"defaultNumberingSystem",get:function(){return defaultNumberingSystem},set:function(e){defaultNumberingSystem=e}},{key:"defaultOutputCalendar",get:function(){return defaultOutputCalendar},set:function(e){defaultOutputCalendar=e}},{key:"throwOnInvalid",get:function(){return throwOnInvalid},set:function(e){throwOnInvalid=e}}]),e}(),intlDTCache={};function getCachedDTF(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),r=intlDTCache[n];return r||(r=new Intl.DateTimeFormat(e,t),intlDTCache[n]=r),r}var intlNumCache={};function getCachedINF(e,t){void 0===t&&(t={});var n=JSON.stringify([e,t]),r=intlNumCache[n];return r||(r=new Intl.NumberFormat(e,t),intlNumCache[n]=r),r}var intlRelCache={};function getCachedRTF(e,t){var n=t=void 0===t?{}:t,n=(n.base,_objectWithoutPropertiesLoose(n,["base"])),n=JSON.stringify([e,n]),r=intlRelCache[n];return r||(r=new Intl.RelativeTimeFormat(e,t),intlRelCache[n]=r),r}var sysLocaleCache=null;function systemLocale(){var e;return sysLocaleCache=sysLocaleCache||(hasIntl()?(e=(new Intl.DateTimeFormat).resolvedOptions().locale)&&"und"!==e?e:"en-US":"en-US")}function parseLocaleString(e){var t=e.indexOf("-u-");if(-1===t)return[e];var n,t=e.substring(0,t);try{n=getCachedDTF(e).resolvedOptions()}catch(e){n=getCachedDTF(t).resolvedOptions()}e=n;return[t,e.numberingSystem,e.calendar]}function intlConfigString(e,t,n){return hasIntl()?((n||t)&&(e+="-u",n&&(e+="-ca-"+n),t&&(e+="-nu-"+t)),e):[]}function mapMonths(e){for(var t=[],n=1;n<=12;n++){var r=DateTime.utc(2016,n,1);t.push(e(r))}return t}function mapWeekdays(e){for(var t=[],n=1;n<=7;n++){var r=DateTime.utc(2016,11,13+n);t.push(e(r))}return t}function listStuff(e,t,n,r,i){e=e.listingMode(n);return"error"===e?null:("en"===e?r:i)(t)}function supportsFastNumbers(e){return(!e.numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||hasIntl()&&"latn"===new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem)}var PolyNumberFormatter=function(){function e(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1,!t&&hasIntl()&&(t={useGrouping:!1},0<n.padTo&&(t.minimumIntegerDigits=n.padTo),this.inf=getCachedINF(e,t))}return e.prototype.format=function(e){var t;return this.inf?(t=this.floor?Math.floor(e):e,this.inf.format(t)):padStart(this.floor?Math.floor(e):roundTo(e,3),this.padTo)},e}(),PolyDateFormatter=function(){function e(e,t,n){var r,i,a;this.opts=n,this.hasIntl=hasIntl(),e.zone.universal&&this.hasIntl?(i=e.offset/60*-1,a=IANAZone.isValidZone(i=0<=i?"Etc/GMT+"+i:"Etc/GMT"+i),0!==e.offset&&a?(r=i,this.dt=e):(r="UTC",n.timeZoneName?this.dt=e:this.dt=0===e.offset?e:DateTime.fromMillis(e.ts+60*e.offset*1e3))):"local"===e.zone.type?this.dt=e:r=(this.dt=e).zone.name,this.hasIntl&&(a=Object.assign({},this.opts),r&&(a.timeZone=r),this.dtf=getCachedDTF(t,a))}var t=e.prototype;return t.format=function(){var e,t;return this.hasIntl?this.dtf.format(this.dt.toJSDate()):(e=formatString(this.opts),t=Locale.create("en-US"),Formatter.create(t).formatDateTimeFromString(this.dt,e))},t.formatToParts=function(){return this.hasIntl&&hasFormatToParts()?this.dtf.formatToParts(this.dt.toJSDate()):[]},t.resolvedOptions=function(){return this.hasIntl?this.dtf.resolvedOptions():{locale:"en-US",numberingSystem:"latn",outputCalendar:"gregory"}},e}(),PolyRelFormatter=function(){function e(e,t,n){this.opts=Object.assign({style:"long"},n),!t&&hasRelative()&&(this.rtf=getCachedRTF(e,n))}var t=e.prototype;return t.format=function(e,t){return this.rtf?this.rtf.format(e,t):formatRelativeTime(t,e,this.opts.numeric,"long"!==this.opts.style)},t.formatToParts=function(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]},e}(),Locale=function(){function i(e,t,n,r){var e=parseLocaleString(e),i=e[0],a=e[1],e=e[2];this.locale=i,this.numberingSystem=t||a||null,this.outputCalendar=n||e||null,this.intl=intlConfigString(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=r,this.fastNumbersCached=null}i.fromOpts=function(e){return i.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)},i.create=function(e,t,n,r){void 0===r&&(r=!1);e=e||Settings.defaultLocale;return new i(e||(r?"en-US":systemLocale()),t||Settings.defaultNumberingSystem,n||Settings.defaultOutputCalendar,e)},i.resetCache=function(){sysLocaleCache=null,intlDTCache={},intlNumCache={},intlRelCache={}},i.fromObject=function(e){var e=void 0===e?{}:e,t=e.locale,n=e.numberingSystem,e=e.outputCalendar;return i.create(t,n,e)};var e=i.prototype;return e.listingMode=function(e){void 0===e&&(e=!0);var t=hasIntl()&&hasFormatToParts(),n=this.isEnglish(),r=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return t||n&&r||e?!t||n&&r?"en":"intl":"error"},e.clone=function(e){return e&&0!==Object.getOwnPropertyNames(e).length?i.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,e.defaultToEN||!1):this},e.redefaultToEN=function(e){return void 0===e&&(e={}),this.clone(Object.assign({},e,{defaultToEN:!0}))},e.redefaultToSystem=function(e){return void 0===e&&(e={}),this.clone(Object.assign({},e,{defaultToEN:!1}))},e.months=function(n,r,e){var i=this;return void 0===r&&(r=!1),listStuff(this,n,e=void 0===e?!0:e,months,function(){var t=r?{month:n,day:"numeric"}:{month:n},e=r?"format":"standalone";return i.monthsCache[e][n]||(i.monthsCache[e][n]=mapMonths(function(e){return i.extract(e,t,"month")})),i.monthsCache[e][n]})},e.weekdays=function(n,r,e){var i=this;return void 0===r&&(r=!1),listStuff(this,n,e=void 0===e?!0:e,weekdays,function(){var t=r?{weekday:n,year:"numeric",month:"long",day:"numeric"}:{weekday:n},e=r?"format":"standalone";return i.weekdaysCache[e][n]||(i.weekdaysCache[e][n]=mapWeekdays(function(e){return i.extract(e,t,"weekday")})),i.weekdaysCache[e][n]})},e.meridiems=function(e){var n=this;return listStuff(this,void 0,e=void 0===e?!0:e,function(){return meridiems},function(){var t;return n.meridiemCache||(t={hour:"numeric",hour12:!0},n.meridiemCache=[DateTime.utc(2016,11,13,9),DateTime.utc(2016,11,13,19)].map(function(e){return n.extract(e,t,"dayperiod")})),n.meridiemCache})},e.eras=function(e,t){var n=this;return listStuff(this,e,t=void 0===t?!0:t,eras,function(){var t={era:e};return n.eraCache[e]||(n.eraCache[e]=[DateTime.utc(-40,1,1),DateTime.utc(2017,1,1)].map(function(e){return n.extract(e,t,"era")})),n.eraCache[e]})},e.extract=function(e,t,n){e=this.dtFormatter(e,t).formatToParts().find(function(e){return e.type.toLowerCase()===n});return e?e.value:null},e.numberFormatter=function(e){return new PolyNumberFormatter(this.intl,(e=void 0===e?{}:e).forceSimple||this.fastNumbers,e)},e.dtFormatter=function(e,t){return new PolyDateFormatter(e,this.intl,t=void 0===t?{}:t)},e.relFormatter=function(e){return void 0===e&&(e={}),new PolyRelFormatter(this.intl,this.isEnglish(),e)},e.isEnglish=function(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||hasIntl()&&new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")},e.equals=function(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar},_createClass(i,[{key:"fastNumbers",get:function(){return null==this.fastNumbersCached&&(this.fastNumbersCached=supportsFastNumbers(this)),this.fastNumbersCached}}]),i}();function combineRegexes(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.reduce(function(e,t){return e+t.source},"");return RegExp("^"+r+"$")}function combineExtractors(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(a){return t.reduce(function(e,t){var n=e[0],r=e[1],e=e[2],t=t(a,e),e=t[0],i=t[1],t=t[2];return[Object.assign(n,e),r||i,t]},[{},null,1]).slice(0,2)}}function parse(e){if(null==e)return[null,null];for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var i=0,a=n;i<a.length;i++){var o=a[i],s=o[0],o=o[1],s=s.exec(e);if(s)return o(s)}return[null,null]}function simpleParse(){for(var e=arguments.length,i=new Array(e),t=0;t<e;t++)i[t]=arguments[t];return function(e,t){for(var n={},r=0;r<i.length;r++)n[i[r]]=parseInteger(e[t+r]);return[n,null,t+r]}}var offsetRegex=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,isoTimeBaseRegex=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,isoTimeRegex=RegExp(""+isoTimeBaseRegex.source+offsetRegex.source+"?"),isoTimeExtensionRegex=RegExp("(?:T"+isoTimeRegex.source+")?"),isoYmdRegex=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,isoWeekRegex=/(\d{4})-?W(\d\d)(?:-?(\d))?/,isoOrdinalRegex=/(\d{4})-?(\d{3})/,extractISOWeekData=simpleParse("weekYear","weekNumber","weekDay"),extractISOOrdinalData=simpleParse("year","ordinal"),sqlYmdRegex=/(\d{4})-(\d\d)-(\d\d)/,sqlTimeRegex=RegExp(isoTimeBaseRegex.source+" ?(?:"+offsetRegex.source+"|("+ianaRegex.source+"))?"),sqlTimeExtensionRegex=RegExp("(?: "+sqlTimeRegex.source+")?");function int(e,t,n){e=e[t];return isUndefined(e)?n:parseInteger(e)}function extractISOYmd(e,t){return[{year:int(e,t),month:int(e,t+1,1),day:int(e,t+2,1)},null,t+3]}function extractISOTime(e,t){return[{hours:int(e,t,0),minutes:int(e,t+1,0),seconds:int(e,t+2,0),milliseconds:parseMillis(e[t+3])},null,t+4]}function extractISOOffset(e,t){var n=!e[t]&&!e[t+1],e=signedOffset(e[t+1],e[t+2]);return[{},n?null:FixedOffsetZone.instance(e),t+3]}function extractIANAZone(e,t){return[{},e[t]?IANAZone.create(e[t]):null,t+1]}var isoTimeOnly=RegExp("^T?"+isoTimeBaseRegex.source+"$"),isoDuration=/^-?P(?:(?:(-?\d{1,9})Y)?(?:(-?\d{1,9})M)?(?:(-?\d{1,9})W)?(?:(-?\d{1,9})D)?(?:T(?:(-?\d{1,9})H)?(?:(-?\d{1,9})M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,9}))?S)?)?)$/;function extractISODuration(e){function t(e,t){return void 0===t&&(t=!1),void 0!==e&&(t||e&&u)?-e:e}var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],e=e[8],u="-"===n[0],n=c&&"-"===c[0];return[{years:t(parseInteger(r)),months:t(parseInteger(i)),weeks:t(parseInteger(a)),days:t(parseInteger(o)),hours:t(parseInteger(s)),minutes:t(parseInteger(l)),seconds:t(parseInteger(c),"-0"===c),milliseconds:t(parseMillis(e),n)}]}var obsOffsets={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function fromStrings(e,t,n,r,i,a,o){t={year:2===t.length?untruncateYear(parseInteger(t)):parseInteger(t),month:monthsShort.indexOf(n)+1,day:parseInteger(r),hour:parseInteger(i),minute:parseInteger(a)};return o&&(t.second=parseInteger(o)),e&&(t.weekday=3<e.length?weekdaysLong.indexOf(e)+1:weekdaysShort.indexOf(e)+1),t}var rfc2822=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function extractRFC2822(e){var t=e[1],n=e[2],r=e[3],i=e[4],a=e[5],o=e[6],s=e[7],l=e[8],c=e[9],u=e[10],e=e[11],t=fromStrings(t,i,r,n,a,o,s),i=l?obsOffsets[l]:c?0:signedOffset(u,e);return[t,new FixedOffsetZone(i)]}function preprocessRFC2822(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}var rfc1123=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,rfc850=/^(Monday|Tuesday|Wedsday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,ascii=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function extractRFC1123Or850(e){var t=e[1],n=e[2],r=e[3];return[fromStrings(t,e[4],r,n,e[5],e[6],e[7]),FixedOffsetZone.utcInstance]}function extractASCII(e){var t=e[1],n=e[2],r=e[3],i=e[4],a=e[5],o=e[6];return[fromStrings(t,e[7],n,r,i,a,o),FixedOffsetZone.utcInstance]}var isoYmdWithTimeExtensionRegex=combineRegexes(isoYmdRegex,isoTimeExtensionRegex),isoWeekWithTimeExtensionRegex=combineRegexes(isoWeekRegex,isoTimeExtensionRegex),isoOrdinalWithTimeExtensionRegex=combineRegexes(isoOrdinalRegex,isoTimeExtensionRegex),isoTimeCombinedRegex=combineRegexes(isoTimeRegex),extractISOYmdTimeAndOffset=combineExtractors(extractISOYmd,extractISOTime,extractISOOffset),extractISOWeekTimeAndOffset=combineExtractors(extractISOWeekData,extractISOTime,extractISOOffset),extractISOOrdinalDateAndTime=combineExtractors(extractISOOrdinalData,extractISOTime,extractISOOffset),extractISOTimeAndOffset=combineExtractors(extractISOTime,extractISOOffset);function parseISODate(e){return parse(e,[isoYmdWithTimeExtensionRegex,extractISOYmdTimeAndOffset],[isoWeekWithTimeExtensionRegex,extractISOWeekTimeAndOffset],[isoOrdinalWithTimeExtensionRegex,extractISOOrdinalDateAndTime],[isoTimeCombinedRegex,extractISOTimeAndOffset])}function parseRFC2822Date(e){return parse(preprocessRFC2822(e),[rfc2822,extractRFC2822])}function parseHTTPDate(e){return parse(e,[rfc1123,extractRFC1123Or850],[rfc850,extractRFC1123Or850],[ascii,extractASCII])}function parseISODuration(e){return parse(e,[isoDuration,extractISODuration])}var extractISOTimeOnly=combineExtractors(extractISOTime);function parseISOTimeOnly(e){return parse(e,[isoTimeOnly,extractISOTimeOnly])}var sqlYmdWithTimeExtensionRegex=combineRegexes(sqlYmdRegex,sqlTimeExtensionRegex),sqlTimeCombinedRegex=combineRegexes(sqlTimeRegex),extractISOYmdTimeOffsetAndIANAZone=combineExtractors(extractISOYmd,extractISOTime,extractISOOffset,extractIANAZone),extractISOTimeOffsetAndIANAZone=combineExtractors(extractISOTime,extractISOOffset,extractIANAZone);function parseSQL(e){return parse(e,[sqlYmdWithTimeExtensionRegex,extractISOYmdTimeOffsetAndIANAZone],[sqlTimeCombinedRegex,extractISOTimeOffsetAndIANAZone])}var INVALID="Invalid Duration",lowOrderMatrix={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},casualMatrix=Object.assign({years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6}},lowOrderMatrix),daysInYearAccurate=365.2425,daysInMonthAccurate=30.436875,accurateMatrix=Object.assign({years:{quarters:4,months:12,weeks:daysInYearAccurate/7,days:daysInYearAccurate,hours:24*daysInYearAccurate,minutes:24*daysInYearAccurate*60,seconds:24*daysInYearAccurate*60*60,milliseconds:24*daysInYearAccurate*60*60*1e3},quarters:{months:3,weeks:daysInYearAccurate/28,days:daysInYearAccurate/4,hours:24*daysInYearAccurate/4,minutes:24*daysInYearAccurate*60/4,seconds:24*daysInYearAccurate*60*60/4,milliseconds:24*daysInYearAccurate*60*60*1e3/4},months:{weeks:daysInMonthAccurate/7,days:daysInMonthAccurate,hours:24*daysInMonthAccurate,minutes:24*daysInMonthAccurate*60,seconds:24*daysInMonthAccurate*60*60,milliseconds:24*daysInMonthAccurate*60*60*1e3}},lowOrderMatrix),orderedUnits=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],reverseUnits=orderedUnits.slice(0).reverse();function clone(e,t,n){n={values:(n=void 0===n?!1:n)?t.values:Object.assign({},e.values,t.values||{}),loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy};return new Duration(n)}function antiTrunc(e){return e<0?Math.floor(e):Math.ceil(e)}function convert(e,t,n,r,i){var e=e[i][n],a=t[n]/e,a=!(Math.sign(a)===Math.sign(r[i]))&&0!==r[i]&&Math.abs(a)<=1?antiTrunc(a):Math.trunc(a);r[i]+=a,t[n]-=a*e}function normalizeValues(n,r){reverseUnits.reduce(function(e,t){return isUndefined(r[t])?e:(e&&convert(n,r,e,r,t),t)},null)}var Duration=function(){function m(e){var t="longterm"===e.conversionAccuracy||!1;this.values=e.values,this.loc=e.loc||Locale.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?accurateMatrix:casualMatrix,this.isLuxonDuration=!0}m.fromMillis=function(e,t){return m.fromObject(Object.assign({milliseconds:e},t))},m.fromObject=function(e){if(null==e||"object"!=typeof e)throw new InvalidArgumentError("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new m({values:normalizeObject(e,m.normalizeUnit,["locale","numberingSystem","conversionAccuracy","zone"]),loc:Locale.fromObject(e),conversionAccuracy:e.conversionAccuracy})},m.fromISO=function(e,t){var n=parseISODuration(e)[0];return n?(n=Object.assign(n,t),m.fromObject(n)):m.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},m.fromISOTime=function(e,t){var n=parseISOTimeOnly(e)[0];return n?(n=Object.assign(n,t),m.fromObject(n)):m.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},m.invalid=function(e,t){if(void 0===t&&(t=null),!e)throw new InvalidArgumentError("need to specify a reason the Duration is invalid");e=e instanceof Invalid?e:new Invalid(e,t);if(Settings.throwOnInvalid)throw new InvalidDurationError(e);return new m({invalid:e})},m.normalizeUnit=function(e){var t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(t)return t;throw new InvalidUnitError(e)},m.isDuration=function(e){return e&&e.isLuxonDuration||!1};var e=m.prototype;return e.toFormat=function(e,t){void 0===t&&(t={});t=Object.assign({},t,{floor:!1!==t.round&&!1!==t.floor});return this.isValid?Formatter.create(this.loc,t).formatDurationFromString(this,e):INVALID},e.toObject=function(e){if(void 0===e&&(e={}),!this.isValid)return{};var t=Object.assign({},this.values);return e.includeConfig&&(t.conversionAccuracy=this.conversionAccuracy,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t},e.toISO=function(){if(!this.isValid)return null;var e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=roundTo(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e},e.toISOTime=function(e){if(void 0===e&&(e={}),!this.isValid)return null;var t=this.toMillis();if(t<0||864e5<=t)return null;e=Object.assign({suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended"},e);var t=this.shiftTo("hours","minutes","seconds","milliseconds"),n="basic"===e.format?"hhmm":"hh:mm",t=(e.suppressSeconds&&0===t.seconds&&0===t.milliseconds||(n+="basic"===e.format?"ss":":ss",e.suppressMilliseconds&&0===t.milliseconds||(n+=".SSS")),t.toFormat(n));return t=e.includePrefix?"T"+t:t},e.toJSON=function(){return this.toISO()},e.toString=function(){return this.toISO()},e.toMillis=function(){return this.as("milliseconds")},e.valueOf=function(){return this.toMillis()},e.plus=function(e){if(!this.isValid)return this;for(var t=friendlyDuration(e),n={},r=_createForOfIteratorHelperLoose(orderedUnits);!(i=r()).done;){var i=i.value;(hasOwnProperty(t.values,i)||hasOwnProperty(this.values,i))&&(n[i]=t.get(i)+this.get(i))}return clone(this,{values:n},!0)},e.minus=function(e){if(!this.isValid)return this;e=friendlyDuration(e);return this.plus(e.negate())},e.mapUnits=function(e){if(!this.isValid)return this;for(var t={},n=0,r=Object.keys(this.values);n<r.length;n++){var i=r[n];t[i]=asNumber(e(this.values[i],i))}return clone(this,{values:t},!0)},e.get=function(e){return this[m.normalizeUnit(e)]},e.set=function(e){return this.isValid?clone(this,{values:Object.assign(this.values,normalizeObject(e,m.normalizeUnit,[]))}):this},e.reconfigure=function(e){var e=void 0===e?{}:e,t=e.locale,n=e.numberingSystem,e=e.conversionAccuracy,t={loc:this.loc.clone({locale:t,numberingSystem:n})};return e&&(t.conversionAccuracy=e),clone(this,t)},e.as=function(e){return this.isValid?this.shiftTo(e).get(e):NaN},e.normalize=function(){if(!this.isValid)return this;var e=this.toObject();return normalizeValues(this.matrix,e),clone(this,{values:e},!0)},e.shiftTo=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!this.isValid)return this;if(0===t.length)return this;for(var r,t=t.map(function(e){return m.normalizeUnit(e)}),i={},a={},o=this.toObject(),s=_createForOfIteratorHelperLoose(orderedUnits);!(f=s()).done;){var l=f.value;if(0<=t.indexOf(l)){var c,u=l,d=0;for(c in a)d+=this.matrix[c][l]*a[c],a[c]=0;isNumber(o[l])&&(d+=o[l]);var p,f=Math.trunc(d);for(p in i[l]=f,a[l]=d-f,o)orderedUnits.indexOf(p)>orderedUnits.indexOf(l)&&convert(this.matrix,o,p,i,l)}else isNumber(o[l])&&(a[l]=o[l])}for(r in a)0!==a[r]&&(i[u]+=r===u?a[r]:a[r]/this.matrix[u][r]);return clone(this,{values:i},!0).normalize()},e.negate=function(){if(!this.isValid)return this;for(var e={},t=0,n=Object.keys(this.values);t<n.length;t++){var r=n[t];e[r]=-this.values[r]}return clone(this,{values:e},!0)},e.equals=function(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;for(var t,n=_createForOfIteratorHelperLoose(orderedUnits);!(r=n()).done;){var r=r.value;if(t=this.values[r],r=e.values[r],!(void 0===t||0===t?void 0===r||0===r:t===r))return!1}return!0},_createClass(m,[{key:"locale",get:function(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function(){return this.isValid?this.loc.numberingSystem:null}},{key:"years",get:function(){return this.isValid?this.values.years||0:NaN}},{key:"quarters",get:function(){return this.isValid?this.values.quarters||0:NaN}},{key:"months",get:function(){return this.isValid?this.values.months||0:NaN}},{key:"weeks",get:function(){return this.isValid?this.values.weeks||0:NaN}},{key:"days",get:function(){return this.isValid?this.values.days||0:NaN}},{key:"hours",get:function(){return this.isValid?this.values.hours||0:NaN}},{key:"minutes",get:function(){return this.isValid?this.values.minutes||0:NaN}},{key:"seconds",get:function(){return this.isValid?this.values.seconds||0:NaN}},{key:"milliseconds",get:function(){return this.isValid?this.values.milliseconds||0:NaN}},{key:"isValid",get:function(){return null===this.invalid}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}}]),m}();function friendlyDuration(e){if(isNumber(e))return Duration.fromMillis(e);if(Duration.isDuration(e))return e;if("object"==typeof e)return Duration.fromObject(e);throw new InvalidArgumentError("Unknown duration argument "+e+" of type "+typeof e)}var INVALID$1="Invalid Interval";function validateStartEnd(e,t){return e&&e.isValid?t&&t.isValid?t<e?Interval.invalid("end before start","The end of an interval must be after its start, but you had start="+e.toISO()+" and end="+t.toISO()):null:Interval.invalid("missing or invalid end"):Interval.invalid("missing or invalid start")}var Interval=function(){function c(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}c.invalid=function(e,t){if(void 0===t&&(t=null),!e)throw new InvalidArgumentError("need to specify a reason the Interval is invalid");e=e instanceof Invalid?e:new Invalid(e,t);if(Settings.throwOnInvalid)throw new InvalidIntervalError(e);return new c({invalid:e})},c.fromDateTimes=function(e,t){var e=friendlyDateTime(e),t=friendlyDateTime(t),n=validateStartEnd(e,t);return null==n?new c({start:e,end:t}):n},c.after=function(e,t){t=friendlyDuration(t),e=friendlyDateTime(e);return c.fromDateTimes(e,e.plus(t))},c.before=function(e,t){t=friendlyDuration(t),e=friendlyDateTime(e);return c.fromDateTimes(e.minus(t),e)},c.fromISO=function(e,t){var n,r,i,a=(e||"").split("/",2),o=a[0],s=a[1];if(o&&s){try{l=(n=DateTime.fromISO(o,t)).isValid}catch(s){l=!1}try{i=(r=DateTime.fromISO(s,t)).isValid}catch(s){i=!1}if(l&&i)return c.fromDateTimes(n,r);if(l){a=Duration.fromISO(s,t);if(a.isValid)return c.after(n,a)}else if(i){var l=Duration.fromISO(o,t);if(l.isValid)return c.before(r,l)}}return c.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},c.isInterval=function(e){return e&&e.isLuxonInterval||!1};var e=c.prototype;return e.length=function(e){return void 0===e&&(e="milliseconds"),this.isValid?this.toDuration.apply(this,[e]).get(e):NaN},e.count=function(e){if(!this.isValid)return NaN;var t=this.start.startOf(e=void 0===e?"milliseconds":e),n=this.end.startOf(e);return Math.floor(n.diff(t,e).get(e))+1},e.hasSame=function(e){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,e))},e.isEmpty=function(){return this.s.valueOf()===this.e.valueOf()},e.isAfter=function(e){return!!this.isValid&&this.s>e},e.isBefore=function(e){return!!this.isValid&&this.e<=e},e.contains=function(e){return!!this.isValid&&(this.s<=e&&this.e>e)},e.set=function(e){var e=void 0===e?{}:e,t=e.start,e=e.end;return this.isValid?c.fromDateTimes(t||this.s,e||this.e):this},e.splitAt=function(){var t=this;if(!this.isValid)return[];for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];for(var i=n.map(friendlyDateTime).filter(function(e){return t.contains(e)}).sort(),a=[],o=this.s,s=0;o<this.e;){var l=i[s]||this.e,l=+l>+this.e?this.e:l;a.push(c.fromDateTimes(o,l)),o=l,s+=1}return a},e.splitBy=function(e){var t=friendlyDuration(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];for(var n=this.s,r=1,i=[];n<this.e;){var a=this.start.plus(t.mapUnits(function(e){return e*r})),a=+a>+this.e?this.e:a;i.push(c.fromDateTimes(n,a)),n=a,r+=1}return i},e.divideEqually=function(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]},e.overlaps=function(e){return this.e>e.s&&this.s<e.e},e.abutsStart=function(e){return!!this.isValid&&+this.e==+e.s},e.abutsEnd=function(e){return!!this.isValid&&+e.e==+this.s},e.engulfs=function(e){return!!this.isValid&&(this.s<=e.s&&this.e>=e.e)},e.equals=function(e){return!(!this.isValid||!e.isValid)&&(this.s.equals(e.s)&&this.e.equals(e.e))},e.intersection=function(e){if(!this.isValid)return this;var t=(this.s>e.s?this:e).s,e=(this.e<e.e?this:e).e;return e<=t?null:c.fromDateTimes(t,e)},e.union=function(e){if(!this.isValid)return this;var t=(this.s<e.s?this:e).s,e=(this.e>e.e?this:e).e;return c.fromDateTimes(t,e)},c.merge=function(e){var e=e.sort(function(e,t){return e.s-t.s}).reduce(function(e,t){var n=e[0],e=e[1];return e?e.overlaps(t)||e.abutsStart(t)?[n,e.union(t)]:[n.concat([e]),t]:[n,t]},[[],null]),t=e[0],e=e[1];return e&&t.push(e),t},c.xor=function(e){for(var t,n=null,r=0,i=[],e=e.map(function(e){return[{time:e.s,type:"s"},{time:e.e,type:"e"}]}),a=_createForOfIteratorHelperLoose((t=Array.prototype).concat.apply(t,e).sort(function(e,t){return e.time-t.time}));!(o=a()).done;)var o=o.value,n=1===(r+="s"===o.type?1:-1)?o.time:(n&&+n!=+o.time&&i.push(c.fromDateTimes(n,o.time)),null);return c.merge(i)},e.difference=function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return c.xor([this].concat(n)).map(function(e){return t.intersection(e)}).filter(function(e){return e&&!e.isEmpty()})},e.toString=function(){return this.isValid?"["+this.s.toISO()+" – "+this.e.toISO()+")":INVALID$1},e.toISO=function(e){return this.isValid?this.s.toISO(e)+"/"+this.e.toISO(e):INVALID$1},e.toISODate=function(){return this.isValid?this.s.toISODate()+"/"+this.e.toISODate():INVALID$1},e.toISOTime=function(e){return this.isValid?this.s.toISOTime(e)+"/"+this.e.toISOTime(e):INVALID$1},e.toFormat=function(e,t){t=(void 0===t?{}:t).separator,t=void 0===t?" – ":t;return this.isValid?""+this.s.toFormat(e)+t+this.e.toFormat(e):INVALID$1},e.toDuration=function(e,t){return this.isValid?this.e.diff(this.s,e,t):Duration.invalid(this.invalidReason)},e.mapEndpoints=function(e){return c.fromDateTimes(e(this.s),e(this.e))},_createClass(c,[{key:"start",get:function(){return this.isValid?this.s:null}},{key:"end",get:function(){return this.isValid?this.e:null}},{key:"isValid",get:function(){return null===this.invalidReason}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}}]),c}(),Info=function(){function e(){}return e.hasDST=function(e){void 0===e&&(e=Settings.defaultZone);var t=DateTime.now().setZone(e).set({month:12});return!e.universal&&t.offset!==t.set({month:6}).offset},e.isValidIANAZone=function(e){return IANAZone.isValidSpecifier(e)&&IANAZone.isValidZone(e)},e.normalizeZone=function(e){return normalizeZone(e,Settings.defaultZone)},e.months=function(e,t){void 0===e&&(e="long");var t=void 0===t?{}:t,n=t.locale,r=t.numberingSystem,i=t.locObj,i=void 0===i?null:i,t=t.outputCalendar;return(i||Locale.create(void 0===n?null:n,void 0===r?null:r,void 0===t?"gregory":t)).months(e)},e.monthsFormat=function(e,t){void 0===e&&(e="long");var t=void 0===t?{}:t,n=t.locale,r=t.numberingSystem,i=t.locObj,i=void 0===i?null:i,t=t.outputCalendar;return(i||Locale.create(void 0===n?null:n,void 0===r?null:r,void 0===t?"gregory":t)).months(e,!0)},e.weekdays=function(e,t){void 0===e&&(e="long");var t=void 0===t?{}:t,n=t.locale,r=t.numberingSystem,t=t.locObj;return((void 0===t?null:t)||Locale.create(void 0===n?null:n,void 0===r?null:r,null)).weekdays(e)},e.weekdaysFormat=function(e,t){void 0===e&&(e="long");var t=void 0===t?{}:t,n=t.locale,r=t.numberingSystem,t=t.locObj;return((void 0===t?null:t)||Locale.create(void 0===n?null:n,void 0===r?null:r,null)).weekdays(e,!0)},e.meridiems=function(e){e=(void 0===e?{}:e).locale;return Locale.create(void 0===e?null:e).meridiems()},e.eras=function(e,t){void 0===e&&(e="short");t=(void 0===t?{}:t).locale;return Locale.create(void 0===t?null:t,null,"gregory").eras(e)},e.features=function(){var e=!1,t=!1,n=!1,r=!1;if(hasIntl()){e=!0,t=hasFormatToParts(),r=hasRelative();try{n="America/New_York"===new Intl.DateTimeFormat("en",{timeZone:"America/New_York"}).resolvedOptions().timeZone}catch(e){n=!1}}return{intl:e,intlTokens:t,zones:n,relative:r}},e}();function dayDiff(e,t){function n(e){return e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf()}t=n(t)-n(e);return Math.floor(Duration.fromMillis(t).as("days"))}function highOrderDiffs(e,t,n){for(var r={},i=0,a=[["years",function(e,t){return t.year-e.year}],["quarters",function(e,t){return t.quarter-e.quarter}],["months",function(e,t){return t.month-e.month+12*(t.year-e.year)}],["weeks",function(e,t){e=dayDiff(e,t);return(e-e%7)/7}],["days",dayDiff]];i<a.length;i++){var o,s,l,c=a[i],u=c[0],c=c[1];0<=n.indexOf(u)&&(o=u,c=c(e,t),t<(l=e.plus(((s={})[u]=c,s)))?(e=e.plus(((s={})[u]=c-1,s)),--c):e=l,r[u]=c)}return[e,r,l,o]}function _diff(e,t,n,r){var e=highOrderDiffs(e,t,n),i=e[0],a=e[1],o=e[2],e=e[3],s=t-i,n=n.filter(function(e){return 0<=["hours","minutes","seconds","milliseconds"].indexOf(e)}),t=(0===n.length&&(o=o<t?i.plus(((t={})[e]=1,t)):o)!==i&&(a[e]=(a[e]||0)+s/(o-i)),Duration.fromObject(Object.assign(a,r)));return 0<n.length?(e=Duration.fromMillis(s,r)).shiftTo.apply(e,n).plus(t):t}var numberingSystems={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},numberingSystemsUTF16={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},hanidecChars=numberingSystems.hanidec.replace(/[\[|\]]/g,"").split("");function parseDigits(e){var t=parseInt(e,10);if(isNaN(t)){for(var t="",n=0;n<e.length;n++){var r=e.charCodeAt(n);if(-1!==e[n].search(numberingSystems.hanidec))t+=hanidecChars.indexOf(e[n]);else for(var i in numberingSystemsUTF16){var i=numberingSystemsUTF16[i],a=i[0],i=i[1];a<=r&&r<=i&&(t+=r-a)}}return parseInt(t,10)}return t}function digitRegex(e,t){e=e.numberingSystem;return void 0===t&&(t=""),new RegExp(""+numberingSystems[e||"latn"]+t)}var MISSING_FTP="missing Intl.DateTimeFormat.formatToParts support";function intUnit(e,t){return void 0===t&&(t=function(e){return e}),{regex:e,deser:function(e){e=e[0];return t(parseDigits(e))}}}var NBSP=String.fromCharCode(160),spaceOrNBSP="( |"+NBSP+")",spaceOrNBSPRegExp=new RegExp(spaceOrNBSP,"g");function fixListRegex(e){return e.replace(/\./g,"\\.?").replace(spaceOrNBSPRegExp,spaceOrNBSP)}function stripInsensitivities(e){return e.replace(/\./g,"").replace(spaceOrNBSPRegExp," ").toLowerCase()}function oneOf(n,r){return null===n?null:{regex:RegExp(n.map(fixListRegex).join("|")),deser:function(e){var t=e[0];return n.findIndex(function(e){return stripInsensitivities(t)===stripInsensitivities(e)})+r}}}function offset(e,t){return{regex:e,deser:function(e){return signedOffset(e[1],e[2])},groups:t}}function simple(e){return{regex:e,deser:function(e){return e[0]}}}function escapeToken(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function unitForToken(t,n){function r(e){return{regex:RegExp(escapeToken(e.val)),deser:function(e){return e[0]},literal:!0}}var i=digitRegex(n),a=digitRegex(n,"{2}"),o=digitRegex(n,"{3}"),s=digitRegex(n,"{4}"),l=digitRegex(n,"{6}"),c=digitRegex(n,"{1,2}"),u=digitRegex(n,"{1,3}"),d=digitRegex(n,"{1,6}"),p=digitRegex(n,"{1,9}"),f=digitRegex(n,"{2,4}"),m=digitRegex(n,"{4,6}"),e=function(e){if(t.literal)return r(e);switch(e.val){case"G":return oneOf(n.eras("short",!1),0);case"GG":return oneOf(n.eras("long",!1),0);case"y":return intUnit(d);case"yy":return intUnit(f,untruncateYear);case"yyyy":return intUnit(s);case"yyyyy":return intUnit(m);case"yyyyyy":return intUnit(l);case"M":return intUnit(c);case"MM":return intUnit(a);case"MMM":return oneOf(n.months("short",!0,!1),1);case"MMMM":return oneOf(n.months("long",!0,!1),1);case"L":return intUnit(c);case"LL":return intUnit(a);case"LLL":return oneOf(n.months("short",!1,!1),1);case"LLLL":return oneOf(n.months("long",!1,!1),1);case"d":return intUnit(c);case"dd":return intUnit(a);case"o":return intUnit(u);case"ooo":return intUnit(o);case"HH":return intUnit(a);case"H":return intUnit(c);case"hh":return intUnit(a);case"h":return intUnit(c);case"mm":return intUnit(a);case"m":case"q":return intUnit(c);case"qq":return intUnit(a);case"s":return intUnit(c);case"ss":return intUnit(a);case"S":return intUnit(u);case"SSS":return intUnit(o);case"u":return simple(p);case"a":return oneOf(n.meridiems(),0);case"kkkk":return intUnit(s);case"kk":return intUnit(f,untruncateYear);case"W":return intUnit(c);case"WW":return intUnit(a);case"E":case"c":return intUnit(i);case"EEE":return oneOf(n.weekdays("short",!1,!1),1);case"EEEE":return oneOf(n.weekdays("long",!1,!1),1);case"ccc":return oneOf(n.weekdays("short",!0,!1),1);case"cccc":return oneOf(n.weekdays("long",!0,!1),1);case"Z":case"ZZ":return offset(new RegExp("([+-]"+c.source+")(?::("+a.source+"))?"),2);case"ZZZ":return offset(new RegExp("([+-]"+c.source+")("+a.source+")?"),2);case"z":return simple(/[a-z_+-/]{1,256}?/i);default:return r(e)}}(t)||{invalidReason:MISSING_FTP};return e.token=t,e}var partTypeStyleToTokenVal={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};function tokenForPart(e,t,n){var r=e.type,e=e.value;if("literal"===r)return{literal:!0,val:e};e=n[r],n=partTypeStyleToTokenVal[r];return(n="object"==typeof n?n[e]:n)?{literal:!1,val:n}:void 0}function buildRegex(e){return["^"+e.map(function(e){return e.regex}).reduce(function(e,t){return e+"("+t.source+")"},"")+"$",e]}function match(e,t,n){var r=e.match(t);if(r){var i,a,o,s={},l=1;for(i in n)hasOwnProperty(n,i)&&(o=(a=n[i]).groups?a.groups+1:1,!a.literal&&a.token&&(s[a.token.val[0]]=a.deser(r.slice(l,l+o))),l+=o);return[r,s]}return[r,{}]}function dateTimeFromMatches(r){var e=isUndefined(r.Z)?isUndefined(r.z)?null:IANAZone.create(r.z):new FixedOffsetZone(r.Z);return isUndefined(r.q)||(r.M=3*(r.q-1)+1),isUndefined(r.h)||(r.h<12&&1===r.a?r.h+=12:12===r.h&&0===r.a&&(r.h=0)),0===r.G&&r.y&&(r.y=-r.y),isUndefined(r.u)||(r.S=parseMillis(r.u)),[Object.keys(r).reduce(function(e,t){var n=function(e){switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}}(t);return n&&(e[n]=r[t]),e},{}),e]}var dummyDateTimeCache=null;function getDummyDateTime(){return dummyDateTimeCache=dummyDateTimeCache||DateTime.fromMillis(1555555555555)}function maybeExpandMacroToken(e,t){if(e.literal)return e;var n=Formatter.macroTokenToFormatOpts(e.val);if(!n)return e;var r=Formatter.create(t,n).formatDateTimeParts(getDummyDateTime()).map(function(e){return tokenForPart(e,t,n)});return r.includes(void 0)?e:r}function expandMacroTokens(e,t){var n;return(n=Array.prototype).concat.apply(n,e.map(function(e){return maybeExpandMacroToken(e,t)}))}function explainFromTokens(t,e,n){var n=expandMacroTokens(Formatter.parseFormat(n),t),r=n.map(function(e){return unitForToken(e,t)}),i=r.find(function(e){return e.invalidReason});if(i)return{input:e,tokens:n,invalidReason:i.invalidReason};var i=buildRegex(r),r=i[0],i=i[1],r=RegExp(r,"i"),i=match(e,r,i),a=i[0],i=i[1],o=i?dateTimeFromMatches(i):[null,null],s=o[0],o=o[1];if(hasOwnProperty(i,"a")&&hasOwnProperty(i,"H"))throw new ConflictingSpecificationError("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:n,regex:r,rawMatches:a,matches:i,result:s,zone:o}}function parseFromTokens(e,t,n){e=explainFromTokens(e,t,n);return[e.result,e.zone,e.invalidReason]}var nonLeapLadder=[0,31,59,90,120,151,181,212,243,273,304,334],leapLadder=[0,31,60,91,121,152,182,213,244,274,305,335];function unitOutOfRange(e,t){return new Invalid("unit out of range","you specified "+t+" (of type "+typeof t+") as a "+e+", which is invalid")}function dayOfWeek(e,t,n){e=new Date(Date.UTC(e,t-1,n)).getUTCDay();return 0===e?7:e}function computeOrdinal(e,t,n){return n+(isLeapYear(e)?leapLadder:nonLeapLadder)[t-1]}function uncomputeOrdinal(e,t){var e=isLeapYear(e)?leapLadder:nonLeapLadder,n=e.findIndex(function(e){return e<t});return{month:n+1,day:t-e[n]}}function gregorianToWeek(e){var t,n=e.year,r=e.month,i=e.day,a=computeOrdinal(n,r,i),r=dayOfWeek(n,r,i),i=Math.floor((a-r+10)/7);return i<1?i=weeksInWeekYear(t=n-1):i>weeksInWeekYear(n)?(t=n+1,i=1):t=n,Object.assign({weekYear:t,weekNumber:i,weekday:r},timeObject(e))}function weekToGregorian(e){var t,n=e.weekYear,r=e.weekNumber,i=e.weekday,a=dayOfWeek(n,1,4),o=daysInYear(n),r=7*r+i-a-3,i=(r<1?r+=daysInYear(t=n-1):o<r?(t=n+1,r-=daysInYear(n)):t=n,uncomputeOrdinal(t,r)),a=i.month,o=i.day;return Object.assign({year:t,month:a,day:o},timeObject(e))}function gregorianToOrdinal(e){var t=e.year,n=computeOrdinal(t,e.month,e.day);return Object.assign({year:t,ordinal:n},timeObject(e))}function ordinalToGregorian(e){var t=e.year,n=uncomputeOrdinal(t,e.ordinal),r=n.month,n=n.day;return Object.assign({year:t,month:r,day:n},timeObject(e))}function hasInvalidWeekData(e){var t=isInteger(e.weekYear),n=integerBetween(e.weekNumber,1,weeksInWeekYear(e.weekYear)),r=integerBetween(e.weekday,1,7);return t?n?!r&&unitOutOfRange("weekday",e.weekday):unitOutOfRange("week",e.week):unitOutOfRange("weekYear",e.weekYear)}function hasInvalidOrdinalData(e){var t=isInteger(e.year),n=integerBetween(e.ordinal,1,daysInYear(e.year));return t?!n&&unitOutOfRange("ordinal",e.ordinal):unitOutOfRange("year",e.year)}function hasInvalidGregorianData(e){var t=isInteger(e.year),n=integerBetween(e.month,1,12),r=integerBetween(e.day,1,daysInMonth(e.year,e.month));return t?n?!r&&unitOutOfRange("day",e.day):unitOutOfRange("month",e.month):unitOutOfRange("year",e.year)}function hasInvalidTimeData(e){var t=e.hour,n=e.minute,r=e.second,e=e.millisecond,i=integerBetween(t,0,23)||24===t&&0===n&&0===r&&0===e,a=integerBetween(n,0,59),o=integerBetween(r,0,59),s=integerBetween(e,0,999);return i?a?o?!s&&unitOutOfRange("millisecond",e):unitOutOfRange("second",r):unitOutOfRange("minute",n):unitOutOfRange("hour",t)}var INVALID$2="Invalid DateTime",MAX_DATE=864e13;function unsupportedZone(e){return new Invalid("unsupported zone",'the zone "'+e.name+'" is not supported')}function possiblyCachedWeekData(e){return null===e.weekData&&(e.weekData=gregorianToWeek(e.c)),e.weekData}function clone$1(e,t){e={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new DateTime(Object.assign({},e,t,{old:e}))}function fixOffset(e,t,n){var r=e-60*t*1e3,i=n.offset(r);if(t===i)return[r,t];n=n.offset(r-=60*(i-t)*1e3);return i===n?[r,i]:[e-60*Math.min(i,n)*1e3,Math.max(i,n)]}function tsToObj(e,t){e+=60*t*1e3;t=new Date(e);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds()}}function objToTS(e,t,n){return fixOffset(objToLocalTS(e),t,n)}function adjustTime(e,t){var n=e.o,r=e.c.year+Math.trunc(t.years),i=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),r=Object.assign({},e.c,{year:r,month:i,day:Math.min(e.c.day,daysInMonth(r,i))+Math.trunc(t.days)+7*Math.trunc(t.weeks)}),i=Duration.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),t=fixOffset(objToLocalTS(r),n,e.zone),r=t[0],n=t[1];return 0!==i&&(n=e.zone.offset(r+=i)),{ts:r,o:n}}function parseDataToDateTime(e,t,n,r,i){var a=n.setZone,o=n.zone;return e&&0!==Object.keys(e).length?(e=DateTime.fromObject(Object.assign(e,n,{zone:t||o,setZone:void 0})),a?e:e.setZone(o)):DateTime.invalid(new Invalid("unparsable",'the input "'+i+"\" can't be parsed as "+r))}function toTechFormat(e,t,n){return void 0===n&&(n=!0),e.isValid?Formatter.create(Locale.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function toTechTimeFormat(e,t){var n=t.suppressSeconds,r=t.suppressMilliseconds,i=t.includeOffset,a=t.includePrefix,a=void 0!==a&&a,o=t.includeZone,o=void 0!==o&&o,s=t.spaceZone,t=t.format,t=void 0===t?"extended":t,l="basic"===t?"HHmm":"HH:mm",n=(void 0!==n&&n&&0===e.second&&0===e.millisecond||(l+="basic"===t?"ss":":ss",void 0!==r&&r&&0===e.millisecond||(l+=".SSS")),(o||i)&&(void 0!==s&&s)&&(l+=" "),o?l+="z":i&&(l+="basic"===t?"ZZZ":"ZZ"),toTechFormat(e,l));return n=a?"T"+n:n}var defaultUnitValues={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},defaultWeekUnitValues={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},defaultOrdinalUnitValues={ordinal:1,hour:0,minute:0,second:0,millisecond:0},orderedUnits$1=["year","month","day","hour","minute","second","millisecond"],orderedWeekUnits=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],orderedOrdinalUnits=["year","ordinal","hour","minute","second","millisecond"];function normalizeUnit(e){var t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(t)return t;throw new InvalidUnitError(e)}function quickDT(e,t){for(var n=_createForOfIteratorHelperLoose(orderedUnits$1);!(r=n()).done;){var r=r.value;isUndefined(e[r])&&(e[r]=defaultUnitValues[r])}var i=hasInvalidGregorianData(e)||hasInvalidTimeData(e);if(i)return DateTime.invalid(i);var i=Settings.now(),i=objToTS(e,t.offset(i),t),a=i[0],i=i[1];return new DateTime({ts:a,zone:t,o:i})}function diffRelative(t,n,r){function e(e,t){return e=roundTo(e,a||r.calendary?0:2,!0),n.loc.clone(r).relFormatter(r).format(e,t)}function i(e){return r.calendary?n.hasSame(t,e)?0:n.startOf(e).diff(t.startOf(e),e).get(e):n.diff(t,e).get(e)}var a=!!isUndefined(r.round)||r.round;if(r.unit)return e(i(r.unit),r.unit);for(var o=_createForOfIteratorHelperLoose(r.units);!(s=o()).done;){var s=s.value,l=i(s);if(1<=Math.abs(l))return e(l,s)}return e(n<t?-0:0,r.units[r.units.length-1])}var DateTime=function(){function g(e){var t,n=e.zone||Settings.defaultZone,r=e.invalid||(Number.isNaN(e.ts)?new Invalid("invalid input"):null)||(n.isValid?null:unsupportedZone(n)),i=(this.ts=isUndefined(e.ts)?Settings.now():e.ts,null),a=null;r||(a=e.old&&e.old.ts===this.ts&&e.old.zone.equals(n)?(i=(t=[e.old.c,e.old.o])[0],t[1]):(t=n.offset(this.ts),i=tsToObj(this.ts,t),i=(r=Number.isNaN(i.year)?new Invalid("invalid input"):null)?null:i,r?null:t)),this._zone=n,this.loc=e.loc||Locale.create(),this.invalid=r,this.weekData=null,this.c=i,this.o=a,this.isLuxonDateTime=!0}g.now=function(){return new g({})},g.local=function(e,t,n,r,i,a,o){return isUndefined(e)?g.now():quickDT({year:e,month:t,day:n,hour:r,minute:i,second:a,millisecond:o},Settings.defaultZone)},g.utc=function(e,t,n,r,i,a,o){return isUndefined(e)?new g({ts:Settings.now(),zone:FixedOffsetZone.utcInstance}):quickDT({year:e,month:t,day:n,hour:r,minute:i,second:a,millisecond:o},FixedOffsetZone.utcInstance)},g.fromJSDate=function(e,t){void 0===t&&(t={});e=isDate(e)?e.valueOf():NaN;if(Number.isNaN(e))return g.invalid("invalid input");var n=normalizeZone(t.zone,Settings.defaultZone);return n.isValid?new g({ts:e,zone:n,loc:Locale.fromObject(t)}):g.invalid(unsupportedZone(n))},g.fromMillis=function(e,t){if(void 0===t&&(t={}),isNumber(e))return e<-MAX_DATE||MAX_DATE<e?g.invalid("Timestamp out of range"):new g({ts:e,zone:normalizeZone(t.zone,Settings.defaultZone),loc:Locale.fromObject(t)});throw new InvalidArgumentError("fromMillis requires a numerical input, but received a "+typeof e+" with value "+e)},g.fromSeconds=function(e,t){if(void 0===t&&(t={}),isNumber(e))return new g({ts:1e3*e,zone:normalizeZone(t.zone,Settings.defaultZone),loc:Locale.fromObject(t)});throw new InvalidArgumentError("fromSeconds requires a numerical input")},g.fromObject=function(e){var t=normalizeZone(e.zone,Settings.defaultZone);if(!t.isValid)return g.invalid(unsupportedZone(t));var n=Settings.now(),r=t.offset(n),i=normalizeObject(e,normalizeUnit,["zone","locale","outputCalendar","numberingSystem"]),a=!isUndefined(i.ordinal),o=!isUndefined(i.year),s=!isUndefined(i.month)||!isUndefined(i.day),o=o||s,l=i.weekYear||i.weekNumber,c=Locale.fromObject(e);if((o||a)&&l)throw new ConflictingSpecificationError("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(s&&a)throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day");for(var u,s=l||i.weekday&&!o,d=tsToObj(n,r),p=(s?(h=orderedWeekUnits,u=defaultWeekUnitValues,d=gregorianToWeek(d)):a?(h=orderedOrdinalUnits,u=defaultOrdinalUnitValues,d=gregorianToOrdinal(d)):(h=orderedUnits$1,u=defaultUnitValues),!1),f=_createForOfIteratorHelperLoose(h);!(m=f()).done;){var m=m.value;isUndefined(i[m])?i[m]=(p?u:d)[m]:p=!0}l=(s?hasInvalidWeekData:a?hasInvalidOrdinalData:hasInvalidGregorianData)(i)||hasInvalidTimeData(i);if(l)return g.invalid(l);var n=objToTS(s?weekToGregorian(i):a?ordinalToGregorian(i):i,r,t),h=new g({ts:n[0],zone:t,o:n[1],loc:c});return i.weekday&&o&&e.weekday!==h.weekday?g.invalid("mismatched weekday","you can't specify both a weekday of "+i.weekday+" and a date of "+h.toISO()):h},g.fromISO=function(e,t){void 0===t&&(t={});var n=parseISODate(e);return parseDataToDateTime(n[0],n[1],t,"ISO 8601",e)},g.fromRFC2822=function(e,t){void 0===t&&(t={});var n=parseRFC2822Date(e);return parseDataToDateTime(n[0],n[1],t,"RFC 2822",e)},g.fromHTTP=function(e,t){void 0===t&&(t={});e=parseHTTPDate(e);return parseDataToDateTime(e[0],e[1],t,"HTTP",t)},g.fromFormat=function(e,t,n){if(void 0===n&&(n={}),isUndefined(e)||isUndefined(t))throw new InvalidArgumentError("fromFormat requires an input string and a format");var r=n,i=r.locale,r=r.numberingSystem,i=parseFromTokens(Locale.fromOpts({locale:void 0===i?null:i,numberingSystem:void 0===r?null:r,defaultToEN:!0}),e,t),r=i[0],a=i[1],i=i[2];return i?g.invalid(i):parseDataToDateTime(r,a,n,"format "+t,e)},g.fromString=function(e,t,n){return g.fromFormat(e,t,n=void 0===n?{}:n)},g.fromSQL=function(e,t){void 0===t&&(t={});var n=parseSQL(e);return parseDataToDateTime(n[0],n[1],t,"SQL",e)},g.invalid=function(e,t){if(void 0===t&&(t=null),!e)throw new InvalidArgumentError("need to specify a reason the DateTime is invalid");e=e instanceof Invalid?e:new Invalid(e,t);if(Settings.throwOnInvalid)throw new InvalidDateTimeError(e);return new g({invalid:e})},g.isDateTime=function(e){return e&&e.isLuxonDateTime||!1};var e=g.prototype;return e.get=function(e){return this[e]},e.resolvedLocaleOpts=function(e){e=Formatter.create(this.loc.clone(e=void 0===e?{}:e),e).resolvedOptions(this);return{locale:e.locale,numberingSystem:e.numberingSystem,outputCalendar:e.calendar}},e.toUTC=function(e,t){return void 0===t&&(t={}),this.setZone(FixedOffsetZone.instance(e=void 0===e?0:e),t)},e.toLocal=function(){return this.setZone(Settings.defaultZone)},e.setZone=function(e,t){var n,t=void 0===t?{}:t,r=t.keepLocalTime,r=void 0!==r&&r,t=t.keepCalendarTime,t=void 0!==t&&t;return(e=normalizeZone(e,Settings.defaultZone)).equals(this.zone)?this:e.isValid?(n=this.ts,(r||t)&&(r=e.offset(this.ts),n=objToTS(this.toObject(),r,e)[0]),clone$1(this,{ts:n,zone:e})):g.invalid(unsupportedZone(e))},e.reconfigure=function(e){var e=void 0===e?{}:e,t=e.locale,n=e.numberingSystem,e=e.outputCalendar,t=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:e});return clone$1(this,{loc:t})},e.setLocale=function(e){return this.reconfigure({locale:e})},e.set=function(e){if(!this.isValid)return this;var t,e=normalizeObject(e,normalizeUnit,[]),n=!isUndefined(e.weekYear)||!isUndefined(e.weekNumber)||!isUndefined(e.weekday),r=!isUndefined(e.ordinal),i=!isUndefined(e.year),a=!isUndefined(e.month)||!isUndefined(e.day),o=e.weekYear||e.weekNumber;if((i||a||r)&&o)throw new ConflictingSpecificationError("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(a&&r)throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day");n?t=weekToGregorian(Object.assign(gregorianToWeek(this.c),e)):isUndefined(e.ordinal)?(t=Object.assign(this.toObject(),e),isUndefined(e.day)&&(t.day=Math.min(daysInMonth(t.year,t.month),t.day))):t=ordinalToGregorian(Object.assign(gregorianToOrdinal(this.c),e));i=objToTS(t,this.o,this.zone);return clone$1(this,{ts:i[0],o:i[1]})},e.plus=function(e){return this.isValid?clone$1(this,adjustTime(this,friendlyDuration(e))):this},e.minus=function(e){return this.isValid?clone$1(this,adjustTime(this,friendlyDuration(e).negate())):this},e.startOf=function(e){if(!this.isValid)return this;var t={},e=Duration.normalizeUnit(e);switch(e){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0}return"weeks"===e&&(t.weekday=1),"quarters"===e&&(e=Math.ceil(this.month/3),t.month=3*(e-1)+1),this.set(t)},e.endOf=function(e){var t;return this.isValid?this.plus(((t={})[e]=1,t)).startOf(e).minus(1):this},e.toFormat=function(e,t){return void 0===t&&(t={}),this.isValid?Formatter.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):INVALID$2},e.toLocaleString=function(e){return void 0===e&&(e=DATE_SHORT),this.isValid?Formatter.create(this.loc.clone(e),e).formatDateTime(this):INVALID$2},e.toLocaleParts=function(e){return void 0===e&&(e={}),this.isValid?Formatter.create(this.loc.clone(e),e).formatDateTimeParts(this):[]},e.toISO=function(e){return void 0===e&&(e={}),this.isValid?this.toISODate(e)+"T"+this.toISOTime(e):null},e.toISODate=function(e){e=(void 0===e?{}:e).format,e="basic"===(void 0===e?"extended":e)?"yyyyMMdd":"yyyy-MM-dd";return toTechFormat(this,e=9999<this.year?"+"+e:e)},e.toISOWeekDate=function(){return toTechFormat(this,"kkkk-'W'WW-c")},e.toISOTime=function(e){var e=void 0===e?{}:e,t=e.suppressMilliseconds,n=e.suppressSeconds,r=e.includeOffset,i=e.includePrefix,e=e.format;return toTechTimeFormat(this,{suppressSeconds:void 0!==n&&n,suppressMilliseconds:void 0!==t&&t,includeOffset:void 0===r||r,includePrefix:void 0!==i&&i,format:void 0===e?"extended":e})},e.toRFC2822=function(){return toTechFormat(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)},e.toHTTP=function(){return toTechFormat(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")},e.toSQLDate=function(){return toTechFormat(this,"yyyy-MM-dd")},e.toSQLTime=function(e){var e=void 0===e?{}:e,t=e.includeOffset,e=e.includeZone;return toTechTimeFormat(this,{includeOffset:void 0===t||t,includeZone:void 0!==e&&e,spaceZone:!0})},e.toSQL=function(e){return void 0===e&&(e={}),this.isValid?this.toSQLDate()+" "+this.toSQLTime(e):null},e.toString=function(){return this.isValid?this.toISO():INVALID$2},e.valueOf=function(){return this.toMillis()},e.toMillis=function(){return this.isValid?this.ts:NaN},e.toSeconds=function(){return this.isValid?this.ts/1e3:NaN},e.toJSON=function(){return this.toISO()},e.toBSON=function(){return this.toJSDate()},e.toObject=function(e){if(void 0===e&&(e={}),!this.isValid)return{};var t=Object.assign({},this.c);return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t},e.toJSDate=function(){return new Date(this.isValid?this.ts:NaN)},e.diff=function(e,t,n){if(void 0===t&&(t="milliseconds"),void 0===n&&(n={}),!this.isValid||!e.isValid)return Duration.invalid(this.invalid||e.invalid,"created by diffing an invalid DateTime");var n=Object.assign({locale:this.locale,numberingSystem:this.numberingSystem},n),t=maybeArray(t).map(Duration.normalizeUnit),r=e.valueOf()>this.valueOf(),e=_diff(r?this:e,r?e:this,t,n);return r?e.negate():e},e.diffNow=function(e,t){return void 0===e&&(e="milliseconds"),void 0===t&&(t={}),this.diff(g.now(),e,t)},e.until=function(e){return this.isValid?Interval.fromDateTimes(this,e):this},e.hasSame=function(e,t){if(!this.isValid)return!1;var n=e.valueOf(),e=this.setZone(e.zone,{keepLocalTime:!0});return e.startOf(t)<=n&&n<=e.endOf(t)},e.equals=function(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)},e.toRelative=function(e){if(!this.isValid)return null;var t=(e=void 0===e?{}:e).base||g.fromObject({zone:this.zone}),n=e.padding?this<t?-e.padding:e.padding:0,r=["years","months","days","hours","minutes","seconds"],i=e.unit;return Array.isArray(e.unit)&&(r=e.unit,i=void 0),diffRelative(t,this.plus(n),Object.assign(e,{numeric:"always",units:r,unit:i}))},e.toRelativeCalendar=function(e){return void 0===e&&(e={}),this.isValid?diffRelative(e.base||g.fromObject({zone:this.zone}),this,Object.assign(e,{numeric:"auto",units:["years","months","days"],calendary:!0})):null},g.min=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.every(g.isDateTime))return bestBy(t,function(e){return e.valueOf()},Math.min);throw new InvalidArgumentError("min requires all arguments be DateTimes")},g.max=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.every(g.isDateTime))return bestBy(t,function(e){return e.valueOf()},Math.max);throw new InvalidArgumentError("max requires all arguments be DateTimes")},g.fromFormatExplain=function(e,t,n){var n=n=void 0===n?{}:n,r=n.locale,n=n.numberingSystem;return explainFromTokens(Locale.fromOpts({locale:void 0===r?null:r,numberingSystem:void 0===n?null:n,defaultToEN:!0}),e,t)},g.fromStringExplain=function(e,t,n){return g.fromFormatExplain(e,t,n=void 0===n?{}:n)},_createClass(g,[{key:"isValid",get:function(){return null===this.invalid}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}},{key:"locale",get:function(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function(){return this.isValid?this.loc.numberingSystem:null}},{key:"outputCalendar",get:function(){return this.isValid?this.loc.outputCalendar:null}},{key:"zone",get:function(){return this._zone}},{key:"zoneName",get:function(){return this.isValid?this.zone.name:null}},{key:"year",get:function(){return this.isValid?this.c.year:NaN}},{key:"quarter",get:function(){return this.isValid?Math.ceil(this.c.month/3):NaN}},{key:"month",get:function(){return this.isValid?this.c.month:NaN}},{key:"day",get:function(){return this.isValid?this.c.day:NaN}},{key:"hour",get:function(){return this.isValid?this.c.hour:NaN}},{key:"minute",get:function(){return this.isValid?this.c.minute:NaN}},{key:"second",get:function(){return this.isValid?this.c.second:NaN}},{key:"millisecond",get:function(){return this.isValid?this.c.millisecond:NaN}},{key:"weekYear",get:function(){return this.isValid?possiblyCachedWeekData(this).weekYear:NaN}},{key:"weekNumber",get:function(){return this.isValid?possiblyCachedWeekData(this).weekNumber:NaN}},{key:"weekday",get:function(){return this.isValid?possiblyCachedWeekData(this).weekday:NaN}},{key:"ordinal",get:function(){return this.isValid?gregorianToOrdinal(this.c).ordinal:NaN}},{key:"monthShort",get:function(){return this.isValid?Info.months("short",{locObj:this.loc})[this.month-1]:null}},{key:"monthLong",get:function(){return this.isValid?Info.months("long",{locObj:this.loc})[this.month-1]:null}},{key:"weekdayShort",get:function(){return this.isValid?Info.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}},{key:"weekdayLong",get:function(){return this.isValid?Info.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}},{key:"offset",get:function(){return this.isValid?+this.o:NaN}},{key:"offsetNameShort",get:function(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}},{key:"offsetNameLong",get:function(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}},{key:"isOffsetFixed",get:function(){return this.isValid?this.zone.universal:null}},{key:"isInDST",get:function(){return!this.isOffsetFixed&&(this.offset>this.set({month:1}).offset||this.offset>this.set({month:5}).offset)}},{key:"isInLeapYear",get:function(){return isLeapYear(this.year)}},{key:"daysInMonth",get:function(){return daysInMonth(this.year,this.month)}},{key:"daysInYear",get:function(){return this.isValid?daysInYear(this.year):NaN}},{key:"weeksInWeekYear",get:function(){return this.isValid?weeksInWeekYear(this.weekYear):NaN}}],[{key:"DATE_SHORT",get:function(){return DATE_SHORT}},{key:"DATE_MED",get:function(){return DATE_MED}},{key:"DATE_MED_WITH_WEEKDAY",get:function(){return DATE_MED_WITH_WEEKDAY}},{key:"DATE_FULL",get:function(){return DATE_FULL}},{key:"DATE_HUGE",get:function(){return DATE_HUGE}},{key:"TIME_SIMPLE",get:function(){return TIME_SIMPLE}},{key:"TIME_WITH_SECONDS",get:function(){return TIME_WITH_SECONDS}},{key:"TIME_WITH_SHORT_OFFSET",get:function(){return TIME_WITH_SHORT_OFFSET}},{key:"TIME_WITH_LONG_OFFSET",get:function(){return TIME_WITH_LONG_OFFSET}},{key:"TIME_24_SIMPLE",get:function(){return TIME_24_SIMPLE}},{key:"TIME_24_WITH_SECONDS",get:function(){return TIME_24_WITH_SECONDS}},{key:"TIME_24_WITH_SHORT_OFFSET",get:function(){return TIME_24_WITH_SHORT_OFFSET}},{key:"TIME_24_WITH_LONG_OFFSET",get:function(){return TIME_24_WITH_LONG_OFFSET}},{key:"DATETIME_SHORT",get:function(){return DATETIME_SHORT}},{key:"DATETIME_SHORT_WITH_SECONDS",get:function(){return DATETIME_SHORT_WITH_SECONDS}},{key:"DATETIME_MED",get:function(){return DATETIME_MED}},{key:"DATETIME_MED_WITH_SECONDS",get:function(){return DATETIME_MED_WITH_SECONDS}},{key:"DATETIME_MED_WITH_WEEKDAY",get:function(){return DATETIME_MED_WITH_WEEKDAY}},{key:"DATETIME_FULL",get:function(){return DATETIME_FULL}},{key:"DATETIME_FULL_WITH_SECONDS",get:function(){return DATETIME_FULL_WITH_SECONDS}},{key:"DATETIME_HUGE",get:function(){return DATETIME_HUGE}},{key:"DATETIME_HUGE_WITH_SECONDS",get:function(){return DATETIME_HUGE_WITH_SECONDS}}]),g}();function friendlyDateTime(e){if(DateTime.isDateTime(e))return e;if(e&&e.valueOf&&isNumber(e.valueOf()))return DateTime.fromJSDate(e);if(e&&"object"==typeof e)return DateTime.fromObject(e);throw new InvalidArgumentError("Unknown datetime argument: "+e+", of type "+typeof e)}var VERSION="1.28.0",DateTime_1=luxon.DateTime=DateTime;luxon.Duration=Duration,luxon.FixedOffsetZone=FixedOffsetZone,luxon.IANAZone=IANAZone,luxon.Info=Info,luxon.Interval=Interval,luxon.InvalidZone=InvalidZone,luxon.LocalZone=LocalZone,luxon.Settings=Settings,luxon.VERSION=VERSION,luxon.Zone=Zone;const styles$2=makeStyles()(e=>({container:{},listContainer:{display:"flex",flexDirection:"column"},divider:{width:"100%"},userContainer:{display:"flex",cursor:"pointer"},clickDisabled:{cursor:"not-allowed"},defaultOrgBadge:{borderRadius:"2px",height:"16px",backgroundColor:"#F4F4F4",border:"0.5px solid #9CA8B4",color:"#5C6269",marginLeft:e.spacing(2.8),padding:e.spacing(.2,2),"& >span":{padding:0}},userName:{display:"inline-block",fontSize:"16px!important",fontWeight:"600!important",lineHeight:"20px"},userSubtitle:{fontSize:"14px!important",fontWeight:400,lineHeight:"20px"},userBottomTitle:{fontSize:"12px!important",fontWeight:400,lineHeight:"16px"},textContainer:{display:"flex","& > .Sdk-MuiListItemText-root":{display:"flex",flexDirection:"column",justifyContent:"center"}},actionContainer:{display:"flex",flexDirection:"row",fontSize:"14px",fontWeight:400},userAvatar:{border:"2px solid #FFFFFF",height:"35px",width:"35px",marginRight:"14px"},roleSelect:{color:"black",fontWeight:400,fontSize:"12px",width:"140px",maxHeight:"36px",paddingTop:"1px",transform:"translateY(1px)",marginRight:"14px","& fieldset":{border:"1px solid #D5DFE9"}},actionButton:{fontSize:"12px",fontWeight:400}})),UserListItem$1=({id:t,lastItem:e})=>{const n=useSelector(selectUser(t)),r=useSelector(selectApplicationRoles),i=useSelector(selectApplicationKey);var a=react.exports.useRef(getApplicationRole(i,n.roles));const[o,s]=react.exports.useState(getApplicationRole(i,n.roles)),l=useDispatch();var c=styles$2()["classes"];react.exports.useEffect(()=>{var e=getApplicationRole(i,n.roles);s(e)},[i,n]);return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs(ListItem,Object.assign({className:c.container,disableGutters:!0,"data-testid":"os-admin-center-application-details-panel-user-list-item","data-userid":t},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:c.userContainer},{children:[jsxRuntime.exports.jsx(ListItemAvatar,Object.assign({sx:{pt:1.5}},{children:n.imageUrl?jsxRuntime.exports.jsx(Avatar,{alt:n.firstName,src:n.imageUrl,className:c.userAvatar,sx:{cursor:"pointer"}}):jsxRuntime.exports.jsx(Avatar,Object.assign({className:c.userAvatar,sx:{cursor:"pointer",backgroundColor:n.avatarColor}},{children:formattedName$1(n)}))})),jsxRuntime.exports.jsx("span",Object.assign({className:c.textContainer},{children:jsxRuntime.exports.jsx(ListItemText,{primary:jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"body1",className:c.userName,"data-testid":"os-admin-center-applications-panel-users-list-item-name."+t},{children:[n.firstName," ",n.lastName]})),secondary:jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"subtitle2",className:c.userSubtitle},{children:n.email}))}),jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"subtitle2",className:c.userBottomTitle},{children:["Added ",DateTime_1.fromISO(n.createdDateTime).toLocaleString(DateTime_1.DATE_SHORT)]}))})]})})}))]})),jsxRuntime.exports.jsx(ListItemSecondaryAction,{children:jsxRuntime.exports.jsxs("div",Object.assign({className:c.actionContainer},{children:[jsxRuntime.exports.jsxs(Select,Object.assign({value:o,onChange:e=>{e=e.target.value;s(e),l(actions$1.updateApplicationUserRole({userId:t,roleId:e}))},className:c.roleSelect,"data-testid":"os-admin-center-applications-panel-users-role-input."+t},{children:[(a.current===NO_ROLE||o===NO_ROLE)&&jsxRuntime.exports.jsx(MenuItem,Object.assign({value:NO_ROLE,"data-testid":`os-admin-center-applications-panel-user-role-item.${t}.NO_ROLE`},{children:"No Role"}),NO_ROLE),r.map(e=>jsxRuntime.exports.jsx(MenuItem,Object.assign({value:e.id,"data-testid":`os-admin-center-applications-panel-user-role-item.${t}.`+e.id},{children:e.name}),e.id))]})),jsxRuntime.exports.jsx(Button,Object.assign({variant:"outlined",color:"inherit",className:c.actionButton,onClick:()=>{l(actions$1.removeApplicationUserRoleStart(t))},"data-testid":"os-admin-center-applications-panel-users-remove-access-btn"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.application-detail-panel.users-revoke-access-btn",defaultMessage:"Remove Access",description:"the button for removing a user's access from an application on the application detail panel"})}))]}))})]})),!e&&jsxRuntime.exports.jsx(Divider,{className:c.divider})]})},UsersList=({onAddUsers:e,onSave:t})=>{const n=useSelector(selectUserIds);var r=useSelector(selectModifiedUsers),i=useStyles$1({})["classes"];return jsxRuntime.exports.jsxs(Box,Object.assign({"data-testid":"admin-center-application-details-users-list",className:i.appUsersList},{children:[jsxRuntime.exports.jsxs(Box,Object.assign({className:i.detailOverview,sx:{display:"flex",flexDirection:"row",justifyContent:"space-between"},"data-testid":"admin-center-application-details-users-list-overview"},{children:[jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h3",className:i.sectionTitle},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.application-detail-panel.users-overview-title",defaultMessage:"App Users",description:"title of the App Users section on the application details panel"})})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h5"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.application-detail-panel.users-overview-description",defaultMessage:"View a list of all users of this Org that have access to this Application.",description:"description of the App Users section on the application details panel"})}))]}),jsxRuntime.exports.jsx("div",Object.assign({className:i.overviewButton},{children:jsxRuntime.exports.jsxs(Button,Object.assign({variant:"outlined",color:"primary",onClick:e,"data-testid":"admin-center-application-details-users-add-user-btn"},{children:[jsxRuntime.exports.jsx(Add,{fontSize:"small",sx:{mr:1}}),"Add Users"]}))}))]})),jsxRuntime.exports.jsx(Box,Object.assign({className:i.listContainer},{children:jsxRuntime.exports.jsx(List,{children:n.map((e,t)=>jsxRuntime.exports.jsx(UserListItem$1,{id:e,lastItem:t===n.length-1}))})})),jsxRuntime.exports.jsx(Box,Object.assign({className:i.btnContainer},{children:jsxRuntime.exports.jsx(Button,Object.assign({color:"primary",variant:"contained",disabled:0===r.length,onClick:t,"data-testid":"admin-center-application-details-users-save-btn"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"admin-center-applications.application-detail.app-users.save-button",defaultMessage:"Save",description:"the save button on the admin center applications add users panel"})}))}))]}))},AppUsers=({isPanelFullScreen:e=!1})=>{const t=useSelector(selectApplication);var n=useSelector(selectApplicationUsers),r=useSelector(selectUsersStatus);const i=useDispatch();react.exports.useEffect(()=>{null!==t&&void 0!==t&&t.id&&null!==t&&void 0!==t&&t.key&&i(actions$1.initApplicationUsers({applicationId:t.id,applicationKey:t.key}))},[i,t]);var a=()=>{i(mountPanel({panelId:"ADD_APPLICATION_USERS_PANEL",microFrontend:{name:"ADD_APPLICATION_USERS_PANEL",config:{applicationId:t.id,applicationKey:t.key}},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:e?0:55,marginStart:e?0:80,size:"large",zIndex:e?1011:1002,parentPanelId:"ADMIN_CENTER_BROWSE",dimmed:0,dimmedStatus:"dimParent",borderBottom:!0}}))};return"loading"===r&&jsxRuntime.exports.jsx(LoaderSkeleton,{})||"failure"===r&&jsxRuntime.exports.jsx(ErrorState,{onRetry:()=>{null!==t&&void 0!==t&&t.id&&null!==t&&void 0!==t&&t.key&&i(actions$1.initApplicationUsers({applicationId:t.id,applicationKey:t.key}))},errorMessage:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.app-users.error-message",defaultMessage:"Something went wrong while loading your users.",description:"admin center application users error state"})})||"success"===r&&0===n.length&&jsxRuntime.exports.jsxs(Box,Object.assign({display:"flex",alignItems:"center",flexDirection:"column"},{children:[jsxRuntime.exports.jsx(NullState,{header:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-app-users.null-state-header",defaultMessage:"No Application Users",description:"admin center no app users header"}),description:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-app-users.null-state-description",defaultMessage:"This application has no current users, get started by clicking Add Users below.",description:"admin center group no groups description"})}),jsxRuntime.exports.jsxs(Button,Object.assign({variant:"outlined",sx:{m:"20px auto",p:"5px 10px"},onClick:a},{children:[jsxRuntime.exports.jsx(Add,{fontSize:"small",sx:{mr:1}}),jsxRuntime.exports.jsx(Box,Object.assign({sx:{pt:"2px"}},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-app-users.add-user-button",defaultMessage:"Add Users",description:"Text of the label add users button"})}))]}))]}))||jsxRuntime.exports.jsx(UsersList,{onAddUsers:a,onSave:()=>{i(actions$1.saveApplicationUsersStart())}})},tabsList=[{label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.application-detail-basic-info",defaultMessage:"Basic Info",description:"the title of the Basic Info tab on the application details panel"}),disabled:!1,id:"application-details-tab-label-basic-info"}],settingsTab={label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.application-detail.app-settings",defaultMessage:"App Settings",description:"the title of the App Settings tab on the application details panel"}),disabled:!1,id:"application-details-tab-label-app-settings"},appUsersTab={label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.application-detail.app-users",defaultMessage:"App Users",description:"the title of the App Users tab on the application details panel"}),disabled:!1,id:"application-details-tab-label-app-users"},MainLayout=({setInstallationConfig:e})=>{const t=useSelector(selectApplication),n=useSelector(betaFeaturesSelector),[r,i]=react.exports.useState(0);var a=useStyles$1({})["classes"];const[o,s]=react.exports.useState(tabsList),[l,c]=react.exports.useState(!1);const u=()=>(null===t||void 0===t?void 0:t.status)!==EApplicationStatus.active;return react.exports.useEffect(()=>{u()||l||(c(!0),n?s([...o,appUsersTab,settingsTab]):s([...o,settingsTab]))},[t]),jsxRuntime.exports.jsxs(Box,Object.assign({className:a.mainLayout},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:a.tabsContainer,"data-testid":"application-details-panel-tabs-list"},{children:jsxRuntime.exports.jsx("div",Object.assign({className:a.tabsParent},{children:jsxRuntime.exports.jsx(CustomTabs,{selectedId:r,onChangeTab:e=>{i(e)},tabsList:o})}))})),jsxRuntime.exports.jsx(Divider,{className:a.divider}),jsxRuntime.exports.jsxs(Box,Object.assign({className:a.tabPanels},{children:[jsxRuntime.exports.jsx(TabPanel,Object.assign({value:r,index:0},{children:jsxRuntime.exports.jsx(BasicInfo,{})})),n&&jsxRuntime.exports.jsx(TabPanel,Object.assign({value:r,index:1},{children:jsxRuntime.exports.jsx(AppUsers,{})})),!u()&&jsxRuntime.exports.jsx(TabPanel,Object.assign({value:r,index:n?2:1},{children:jsxRuntime.exports.jsx(AppSettings,{setInstallationConfig:e})}))]}))]}))},Content=({applicationId:e,initValue:t})=>{var n=useSelector(selectStatus);const r=useDispatch();var i=useStyles$1({})["classes"],[a,o]=(react.exports.useEffect(()=>{e?r(actions$1.fetchApplicationStart({applicationId:e,initValue:t})):t&&r(actions$1.setInitialApplicationValue(t))},[r,e,t]),react.exports.useState([]));return n===Status.loading&&jsxRuntime.exports.jsxs(Container,Object.assign({className:i.panelLoading},{children:[jsxRuntime.exports.jsx(Skeleton,{variant:"rectangular",animation:"wave",width:400,height:200}),jsxRuntime.exports.jsx(Divider,{sx:{my:2}}),jsxRuntime.exports.jsx(Skeleton,{variant:"rectangular",animation:"wave",width:960,height:300})]}))||n===Status.success&&jsxRuntime.exports.jsxs(Container,Object.assign({className:i.panelContent},{children:[jsxRuntime.exports.jsx(DetailHeader,{installationConfig:a}),jsxRuntime.exports.jsx(MainLayout,{setInstallationConfig:o})]}))||n===Status.failure&&jsxRuntime.exports.jsx(Container,{children:jsxRuntime.exports.jsx(ErrorState,{onRetry:()=>{r(actions$1.fetchApplicationStart({applicationId:e,initValue:t}))},errorMessage:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.application-details-panel-error-message",defaultMessage:"Something went wrong while loading your application details.",description:"error message shown when the application details panel encounters a load error"})})})||jsxRuntime.exports.jsx(Container,{children:"Please wait..."})},PanelContainer$1=({children:e})=>{const t="APPLICATION_DETAILS_PANEL",n=useSelector(selectModifiedUsers),[r,i]=react.exports.useState(!1),a=useDispatch();var o=useStyles$1({})["classes"];return jsxRuntime.exports.jsx("div",Object.assign({className:o.panelRoot,"data-testid":"application-details-panel"},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:o.panelContainer},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:o.panelHeader},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({"data-testid":"application-details-panel-title",variant:"h1"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.detail-panel-title",defaultMessage:"Application Details",description:"The title of the Application Details panel"})})),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.detail-panel-close",defaultMessage:"Close Panel",description:"The title of the Application Details panel close button"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:()=>{0<n.length?i(!0):(a(actions$1.cancelApplicationUserChanges()),a(hidePanel(t)))},"aria-labelledby":"group-details-close-panel","data-testid":"group-details-close-panel",size:"large"},{children:jsxRuntime.exports.jsx(Hide,{})}))}))]})),jsxRuntime.exports.jsx("div",Object.assign({className:o.panelBody},{children:e})),jsxRuntime.exports.jsx(ConfirmationModal,{showConfirmationModal:r,closeConfirmationModal:()=>{i(!1)},onClosePanel:()=>{a(actions$1.cancelApplicationUserChanges()),a(hidePanel(t)),i(!1)}})]}))}))},ApplicationDetailsPanel=({applicationId:e,initValue:t})=>jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(lib.DynamicModuleLoader,Object.assign({modules:[getApplicationDetailsPanelModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsx(PanelContainer$1,{children:jsxRuntime.exports.jsx(Content,{applicationId:e,initValue:t})})}))})}))}),styles$1=makeStyles()(e=>({root:{display:"flex",flexDirection:"column",height:"calc(100vh - 55px - 10px)",alignItems:"stretch"},addUsers:{padding:e.spacing(0,6)},titleDescription:{color:"#5C6269",fontWeight:400,maxWidth:"463px",marginTop:e.spacing(1)},usersTitle:{fontWeight:400,color:"#2A323C",padding:e.spacing(4,0,1)},addUsersSubTitle:{color:"#5C6269",fontWeight:400},panelContent:{display:"flex",flexDirection:"column",flexGrow:1,padding:e.spacing(0,3,0,3),overflowY:"auto"},btnContainer:{alignItems:"end",display:"flex",justifyContent:"flex-end",marginTop:"12px",marginBottom:"30px",marginRight:"20px"},buttons:{marginRight:"10px"},headerActionContainer:{alignItems:"center",display:"flex",flexGrow:1,height:"100%",justifyContent:"flex-end"},header:{alignItems:"center",display:"flex",justifyContent:"space-between",padding:e.spacing(0,0,0,6)},headerTitle:{color:"#2A323C"},autocomplete:{"& .Sdk-MuiAutocomplete-tag":{fontWeight:500,background:"#FFFFFF",boxShadow:"0px 1px 1px rgba(0, 0, 0, 0.06), 0px 2px 6px rgba(0, 0, 0, 0.15)",height:"30px",border:"none"},"& .Sdk-MuiChip-deleteIcon":{fill:"#555F7C",width:"15px",height:"15px"}},renderMember:{display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:"12px"},renderAvatar:{height:"20px",width:"20px",marginRight:"5px",fontSize:"10px"},memberInfoContainer:{display:"flex",justifyContent:"space-between",padding:"10px",marginBottom:"13px",height:"30px !important"},member:{display:"flex"},memberAvatar:{border:"2px solid #FFFFFF",height:"35px",width:"35px",marginRight:"14px"},groupMembersName:{width:"100%",height:"52px",margin:"20px auto"},currentMember:{display:"flex",alignItems:"center",color:e.palette.text.disabled,paddingRight:e.spacing(2),lineHeight:"20px"},listContainer:{display:"flex",flexDirection:"column"}}));var whitespaces$2="\t\n\v\f\r                 \u2028\u2029\ufeff",uncurryThis=functionUncurryThis,requireObjectCoercible=requireObjectCoercible$4,toString=toString$4,whitespaces$1=whitespaces$2,replace=functionUncurryThis("".replace),whitespace="["+whitespaces$1+"]",ltrim=RegExp("^"+whitespace+whitespace+"*"),rtrim=RegExp(whitespace+whitespace+"*$"),createMethod=function(t){return function(e){e=toString(requireObjectCoercible(e));return 1&t&&(e=replace(e,ltrim,"")),e=2&t?replace(e,rtrim,""):e}},stringTrim={start:createMethod(1),end:createMethod(2),trim:createMethod(3)},PROPER_FUNCTION_NAME=functionName.PROPER,fails=fails$h,whitespaces=whitespaces$2,non="​…᠎",stringTrimForced=function(e){return fails(function(){return!!whitespaces[e]()||non[e]()!==non||PROPER_FUNCTION_NAME&&whitespaces[e].name!==e})},$=_export,$trim=stringTrim.trim,forcedStringTrimMethod=stringTrimForced;$({target:"String",proto:!0,forced:stringTrimForced("trim")},{trim:function(){return $trim(this)}});const isSelectReason=(e,t)=>"selectOption"===e,formattedName=e=>{var t;return""+(null==(t=null==(t=e.firstName)?void 0:t.charAt(0))?void 0:t.toUpperCase())+(null==(e=null==(t=e.lastName)?void 0:t.charAt(0))?void 0:e.toUpperCase())},UserSearch=()=>{var[e]=react.exports.useState(null);const[t,n]=react.exports.useState(!1),r=styles$1()["classes"],i=useIntl(),a=useDispatch(),o=useSelector(selectAllUsers);var s=useSelector(selectUserSearchResults),l=useSelector(selectUsersStatus);const c=t=>!!o.find(e=>e.id===t),u=i.formatMessage({id:"os-admin-center-applications.add-users.add-users-placeholder",defaultMessage:[{type:0,value:"Search for people in this Organization"}]});const d=lodash.exports.debounce(e=>{e=e.target.value.trim();3<=e.length&&a(actions$1.searchApplicationUsersStart(e))},300);return jsxRuntime.exports.jsx(Autocomplete,{value:e,freeSolo:!0,clearOnBlur:!0,open:t,onOpen:()=>{n(!0)},onClose:()=>{n(!1)},openOnFocus:!0,loading:"loading"===l,loadingText:"success"===l?jsxRuntime.exports.jsx(Skeleton,{variant:"rectangular",height:35,"data-testid":"applications-add-user-autocomplete-skeleton-loading"}):jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2","data-testid":"applications-add-user-autocomplete-no-records-were-found"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.add-user.autocomplete-no-records-were-found-message",defaultMessage:"No records were found",description:"No records were found message"})})),id:"tags-outlined",options:s,getOptionLabel:e=>e.firstName+" "+e.lastName,onChange:(e,t,n)=>{isSelectReason(n)&&a(actions$1.selectUser(t))},limitTags:0,renderTags:e=>e.map(()=>null),renderOption:(e,t)=>null!=t&&t.email?react.exports.createElement("li",Object.assign({},e,{onClick:c(t.id)?()=>{}:e.onClick,key:t.email,className:r.memberInfoContainer,style:{cursor:c(t.id)?"default":"pointer"},"data-testid":"applications-add-user-lookup-option."+t.id}),jsxRuntime.exports.jsxs(Box,Object.assign({className:r.member},{children:[t.imageUrl?jsxRuntime.exports.jsx(Avatar,{alt:t.firstName,src:t.imageUrl,className:r.memberAvatar,sx:{cursor:"pointer"}}):jsxRuntime.exports.jsx(Avatar,Object.assign({className:r.memberAvatar},{children:formattedName(t)})),jsxRuntime.exports.jsxs(Box,{children:[jsxRuntime.exports.jsx(Typography,Object.assign({sx:{cursor:c(t.id)?"default":"pointer"},variant:"h3","data-testid":"applications-add-user-suggestion-name"},{children:t.firstName+" "+t.lastName})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2","data-testid":"applications-add-user-suggestion-email"},{children:t.email}))]})]})),c(null==t?void 0:t.id)&&jsxRuntime.exports.jsx(Typography,Object.assign({className:r.currentMember,variant:"subtitle2","data-testid":"applications-add-user-lookup-current-user"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.add-user.current-user-label",defaultMessage:"Current User",description:"current user label for application"})}))):jsxRuntime.exports.jsx("li",{children:"No users found"}),renderInput:e=>jsxRuntime.exports.jsx(TextField,Object.assign({},e,{id:"application-users-description","data-testid":"admin-center-applications-add-user-description",InputLabelProps:{shrink:!0},inputProps:Object.assign(Object.assign({},e.inputProps),{value:t?e.inputProps.value:"",onKeyDown:e=>{"Enter"===e.key&&e.stopPropagation()}}),placeholder:u,className:r.groupMembersName,onChange:d})),className:r.autocomplete})},styles=makeStyles()(e=>({container:{},listContainer:{display:"flex",flexDirection:"column"},divider:{width:"100%"},userContainer:{display:"flex",cursor:"pointer"},clickDisabled:{cursor:"not-allowed"},defaultOrgBadge:{borderRadius:"2px",height:"16px",backgroundColor:"#F4F4F4",border:"0.5px solid #9CA8B4",color:"#5C6269",marginLeft:e.spacing(2.8),padding:e.spacing(.2,2),"& >span":{padding:0}},userName:{display:"inline-block",fontSize:"16px!important",fontWeight:"600!important",lineHeight:"20px"},userSubtitle:{fontSize:"14px!important",fontWeight:400,lineHeight:"20px"},textContainer:{display:"flex","& > .Sdk-MuiListItemText-root":{display:"flex",flexDirection:"column",justifyContent:"center"}},actionContainer:{display:"flex",flexDirection:"column"},userAvatar:{border:"2px solid #FFFFFF",height:"35px",width:"35px",marginRight:"14px"},roleSelect:{color:"black",fontWeight:400,fontSize:"12px",width:"140px",maxHeight:"36px",paddingTop:"1px",transform:"translateY(1px)",marginRight:"14px","& fieldset":{border:"1px solid #D5DFE9"}}})),UserListItem=({id:t,lastItem:e})=>{var n=useSelector(selectUser(t));const r=useSelector(selectApplicationRoles);var i=useSelector(selectApplicationKey),a=react.exports.useRef(getApplicationRole(i,n.roles));const o=react.exports.useRef(),[s,l]=react.exports.useState(getApplicationRole(i,n.roles)),c=useDispatch();i=styles().classes;react.exports.useEffect(()=>{var e;s===NO_ROLE&&null!=(e=o.current)&&e.scrollIntoView()},[s]);return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs(ListItem,Object.assign({className:i.container,disableGutters:!0,"data-testid":"os-admin-center-application-add-users-list-item","data-userid":t},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:i.userContainer,ref:e=>{e&&(o.current=e)}},{children:[jsxRuntime.exports.jsx(ListItemAvatar,Object.assign({sx:{pt:1.5}},{children:n.imageUrl?jsxRuntime.exports.jsx(Avatar,{alt:n.firstName,src:n.imageUrl,className:i.userAvatar,sx:{cursor:"pointer"}}):jsxRuntime.exports.jsx(Avatar,Object.assign({className:i.userAvatar,sx:{cursor:"pointer",backgroundColor:n.avatarColor}},{children:formattedName$1(n)}))})),jsxRuntime.exports.jsx("span",Object.assign({className:i.textContainer},{children:jsxRuntime.exports.jsx(ListItemText,{primary:jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"body1",className:i.userName,"data-testid":"os-admin-center-application-add-users-list-item-name."+t},{children:[n.firstName," ",n.lastName]})),secondary:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"subtitle2",className:i.userSubtitle},{children:n.email}))})}))]})),jsxRuntime.exports.jsx(ListItemSecondaryAction,{children:jsxRuntime.exports.jsx("div",Object.assign({className:i.actionContainer},{children:jsxRuntime.exports.jsxs(Select,Object.assign({value:s,onChange:e=>{e=e.target.value;l(e),c(actions$1.updateApplicationUserRole({userId:t,roleId:e}))},className:i.roleSelect,"data-testid":"os-admin-center-application-add-users-role-input."+t},{children:[a.current===NO_ROLE&&jsxRuntime.exports.jsx(MenuItem,Object.assign({value:NO_ROLE,"data-testid":`os-admin-center-application-add-users-role-item.${t}.NO_ROLE`},{children:"No Role"}),NO_ROLE),r.map(e=>jsxRuntime.exports.jsx(MenuItem,Object.assign({value:e.id,"data-testid":`os-admin-center-application-add-users-role-item.${t}.`+e.id},{children:e.name}),e.id))]}))}))})]})),!e&&jsxRuntime.exports.jsx(Divider,{className:i.divider})]})},UserList=()=>{const n=useSelector(selectUserIds);var e=styles$1()["classes"];return jsxRuntime.exports.jsx("div",Object.assign({className:e.listContainer,"data-testid":"os-admin-center-applications-add-user-list"},{children:jsxRuntime.exports.jsx(List,{children:n.map((e,t)=>jsxRuntime.exports.jsx(UserListItem,{id:e,lastItem:t===n.length-1},e))})}))},PANEL_ID="ADD_APPLICATION_USERS_PANEL",PanelContent=({applicationId:e,applicationKey:t})=>{const n=useDispatch();return react.exports.useEffect(()=>{n(actions$1.initApplicationUsers({applicationId:e,applicationKey:t}))},[n,e,t]),jsxRuntime.exports.jsxs(Container,{children:[jsxRuntime.exports.jsx(UserSearch,{}),jsxRuntime.exports.jsx(UserList,{})]})},PanelContainer=({children:e})=>{const[t,n]=react.exports.useState(!1);var r=styles$1()["classes"];const i=useSelector(selectModifiedUsers),a=useDispatch();const o=()=>{a(actions$1.cancelApplicationUserChanges()),a(hidePanel(PANEL_ID))};return jsxRuntime.exports.jsxs(Container,Object.assign({className:r.root,"data-testid":"os-admin-center-applications-add-user-panel"},{children:[jsxRuntime.exports.jsxs("header",Object.assign({className:r.header},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h1",className:r.headerTitle},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"admin-center-applications.add-user-panel.title",defaultMessage:"Add Users",description:"title of the Add Users panel"})})),jsxRuntime.exports.jsx("div",Object.assign({className:r.headerActionContainer},{children:jsxRuntime.exports.jsx(Tooltip,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage,{id:"admin-center-applications.add-user-panel.close",defaultMessage:"Close Panel",description:"tooltip message on the add user panel for the close panel button"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({size:"large",onClick:o},{children:jsxRuntime.exports.jsx(default_1$1,{})}))}))}))]})),jsxRuntime.exports.jsx("div",Object.assign({className:r.addUsers},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2",className:r.titleDescription},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"admin-center-applications.add-user-panel.subtitle",defaultMessage:"Add Users to this Application by giving them an application role.",description:"the subtitle of the add users panel"})}))})),jsxRuntime.exports.jsx("div",Object.assign({className:r.panelContent},{children:e})),jsxRuntime.exports.jsxs("div",Object.assign({className:r.btnContainer},{children:[jsxRuntime.exports.jsx(Button,Object.assign({color:"inherit",onClick:()=>{i.length?n(!0):o()},className:r.buttons,"data-testid":"os-admin-center-application-add-users-cancel-btn"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"admin-center-applications.add-user.cancel-button",defaultMessage:"Cancel",description:"the cancel button on the admin center applications add users panel"})})),jsxRuntime.exports.jsx(Button,Object.assign({color:"primary",variant:"contained",disabled:0===i.length,onClick:()=>{a(actions$1.saveApplicationUsersStart()),a(hidePanel(PANEL_ID))},"data-testid":"os-admin-center-application-add-users-save-btn"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"admin-center-applications.add-user.save-button",defaultMessage:"Save",description:"the save button on the admin center applications add users panel"})})),jsxRuntime.exports.jsx(ConfirmationModal,{showConfirmationModal:t,closeConfirmationModal:()=>{n(!1)},onClosePanel:()=>{n(!1),o()}})]}))]}))},AddUsersPanel=({applicationId:e,applicationKey:t})=>jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(lib.DynamicModuleLoader,Object.assign({modules:[getApplicationDetailsPanelModule()]},{children:jsxRuntime.exports.jsx(PanelContainer,{children:jsxRuntime.exports.jsx(PanelContent,{applicationId:e,applicationKey:t})})}))})});export{AddUsersPanel,ApplicationDetailsPanel,ApplicationsTab,Content,PanelContainer$1 as PanelContainer,actions,getAdminCenterApplicationsModule,getApplicationDetailsPanelModule,initialState,namespace,rootReducer};
1
+ import{z as createSvgIcon,C as interopRequireDefault,j as jsxRuntime}from"./js-core.esm.js";var Delete={},_interopRequireDefault=interopRequireDefault.exports,default_1=(Object.defineProperty(Delete,"__esModule",{value:!0}),Delete.default=void 0),_createSvgIcon=_interopRequireDefault(createSvgIcon),_jsxRuntime=jsxRuntime.exports,_default=(0,_createSvgIcon.default)((0,_jsxRuntime.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete"),default_1=Delete.default=_default;export{default_1 as d};