andoncloud-workplaces-status-widget 1.2.9 → 1.2.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- var e=require("react"),t=require("andoncloud-dashboard-toolkit"),n=require("andoncloud-widget-base"),r=require("react-i18next"),i=require("@mui/material"),s=require("andoncloud-sdk");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=/*#__PURE__*/a(e);function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(null,arguments)}var l="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;function c(e){var t=e.prototype.toJSON;"function"==typeof t||function(){if(!Boolean(0))throw new Error("Unexpected invariant triggered.")}(),e.prototype.inspect=t,l&&(e.prototype[l]=t)}function d(e){return null!=e&&"string"==typeof e.kind}function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function f(e){return m(e,[])}function m(e,t){switch(h(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return null===e?"null":function(e,t){if(-1!==t.indexOf(e))return"[Circular]";var n=[].concat(t,[e]),r=function(e){var t=e[String(l)];return"function"==typeof t?t:"function"==typeof e.inspect?e.inspect:void 0}(e);if(void 0!==r){var i=r.call(e);if(i!==e)return"string"==typeof i?i:m(i,n)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";for(var n=Math.min(10,e.length),r=e.length-n,i=[],s=0;s<n;++s)i.push(m(e[s],t));return 1===r?i.push("... 1 more item"):r>1&&i.push("... ".concat(r," more items")),"["+i.join(", ")+"]"}(e,n);return function(e,t){var n=Object.keys(e);return 0===n.length?"{}":t.length>2?"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){var n=e.constructor.name;if("string"==typeof n&&""!==n)return n}return t}(e)+"]":"{ "+n.map(function(n){return n+": "+m(e[n],t)}).join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}c(/*#__PURE__*/function(){function e(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}return e.prototype.toJSON=function(){return{start:this.start,end:this.end}},e}()),c(/*#__PURE__*/function(){function e(e,t,n,r,i,s,a){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=a,this.prev=s,this.next=null}return e.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}());var p={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},y=Object.freeze({});function v(e,t,n){var r=e[t];if(r){if(!n&&"function"==typeof r)return r;var i=n?r.leave:r.enter;if("function"==typeof i)return i}else{var s=n?e.leave:e.enter;if(s){if("function"==typeof s)return s;var a=s[t];if("function"==typeof a)return a}}}var g={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return w(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var t=e.operation,n=e.name,r=x("(",w(e.variableDefinitions,", "),")"),i=w(e.directives," "),s=e.selectionSet;return n||i||r||"query"!==t?w([t,w([n,r]),i,s]," "):s},VariableDefinition:function(e){var t=e.directives;return e.variable+": "+e.type+x(" = ",e.defaultValue)+x(" ",w(t," "))},SelectionSet:function(e){return b(e.selections)},Field:function(e){var t=e.name,n=e.arguments,r=e.directives,i=e.selectionSet,s=x("",e.alias,": ")+t,a=s+x("(",w(n,", "),")");return a.length>80&&(a=s+x("(\n",k(w(n,"\n")),"\n)")),w([a,w(r," "),i]," ")},Argument:function(e){return e.name+": "+e.value},FragmentSpread:function(e){return"..."+e.name+x(" ",w(e.directives," "))},InlineFragment:function(e){var t=e.directives,n=e.selectionSet;return w(["...",x("on ",e.typeCondition),w(t," "),n]," ")},FragmentDefinition:function(e){var t=e.typeCondition,n=e.variableDefinitions,r=e.directives,i=e.selectionSet;return"fragment ".concat(e.name).concat(x("(",w(n,", "),")")," ")+"on ".concat(t," ").concat(x("",w(r," ")," "))+i},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var n=e.value;return e.block?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=-1===e.indexOf("\n"),i=!r||'"'===e[e.length-1]||"\\"===e[e.length-1]||n,s="";return!i||r&&(" "===e[0]||"\t"===e[0])||(s+="\n"+t),s+=t?e.replace(/\n/g,"\n"+t):e,i&&(s+="\n"),'"""'+s.replace(/"""/g,'\\"""')+'"""'}(n,"description"===t?"":" "):JSON.stringify(n)},BooleanValue:function(e){return e.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+w(e.values,", ")+"]"},ObjectValue:function(e){return"{"+w(e.fields,", ")+"}"},ObjectField:function(e){return e.name+": "+e.value},Directive:function(e){return"@"+e.name+x("(",w(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:_(function(e){var t=e.operationTypes;return w(["schema",w(e.directives," "),b(t)]," ")}),OperationTypeDefinition:function(e){return e.operation+": "+e.type},ScalarTypeDefinition:_(function(e){return w(["scalar",e.name,w(e.directives," ")]," ")}),ObjectTypeDefinition:_(function(e){var t=e.directives,n=e.fields;return w(["type",e.name,x("implements ",w(e.interfaces," & ")),w(t," "),b(n)]," ")}),FieldDefinition:_(function(e){var t=e.arguments,n=e.type,r=e.directives;return e.name+(D(t)?x("(\n",k(w(t,"\n")),"\n)"):x("(",w(t,", "),")"))+": "+n+x(" ",w(r," "))}),InputValueDefinition:_(function(e){var t=e.directives;return w([e.name+": "+e.type,x("= ",e.defaultValue),w(t," ")]," ")}),InterfaceTypeDefinition:_(function(e){var t=e.directives,n=e.fields;return w(["interface",e.name,x("implements ",w(e.interfaces," & ")),w(t," "),b(n)]," ")}),UnionTypeDefinition:_(function(e){var t=e.types;return w(["union",e.name,w(e.directives," "),t&&0!==t.length?"= "+w(t," | "):""]," ")}),EnumTypeDefinition:_(function(e){var t=e.values;return w(["enum",e.name,w(e.directives," "),b(t)]," ")}),EnumValueDefinition:_(function(e){return w([e.name,w(e.directives," ")]," ")}),InputObjectTypeDefinition:_(function(e){var t=e.fields;return w(["input",e.name,w(e.directives," "),b(t)]," ")}),DirectiveDefinition:_(function(e){var t=e.arguments,n=e.repeatable,r=e.locations;return"directive @"+e.name+(D(t)?x("(\n",k(w(t,"\n")),"\n)"):x("(",w(t,", "),")"))+(n?" repeatable":"")+" on "+w(r," | ")}),SchemaExtension:function(e){var t=e.operationTypes;return w(["extend schema",w(e.directives," "),b(t)]," ")},ScalarTypeExtension:function(e){return w(["extend scalar",e.name,w(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.directives,n=e.fields;return w(["extend type",e.name,x("implements ",w(e.interfaces," & ")),w(t," "),b(n)]," ")},InterfaceTypeExtension:function(e){var t=e.directives,n=e.fields;return w(["extend interface",e.name,x("implements ",w(e.interfaces," & ")),w(t," "),b(n)]," ")},UnionTypeExtension:function(e){var t=e.types;return w(["extend union",e.name,w(e.directives," "),t&&0!==t.length?"= "+w(t," | "):""]," ")},EnumTypeExtension:function(e){var t=e.values;return w(["extend enum",e.name,w(e.directives," "),b(t)]," ")},InputObjectTypeExtension:function(e){var t=e.fields;return w(["extend input",e.name,w(e.directives," "),b(t)]," ")}};function _(e){return function(t){return w([t.description,e(t)],"\n")}}function w(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(t=null==e?void 0:e.filter(function(e){return e}).join(n))&&void 0!==t?t:""}function b(e){return x("{\n",k(w(e,"\n")),"\n}")}function x(e,t){return null!=t&&""!==t?e+t+(arguments.length>2&&void 0!==arguments[2]?arguments[2]:""):""}function k(e){return x(" ",e.replace(/\n/g,"\n "))}function S(e){return-1!==e.indexOf("\n")}function D(e){return null!=e&&e.some(S)}var O={en:{translation:{Green:"Green",Yellow:"Yellow",Red:"Red",Gray:"Gray",Statuses:"Statuses",Workplaces:"Workplaces","Select and arange the order":"Select and arange the order",AlternativeOrder:"Order",Order:"Order"}},pl:{translation:{Green:"Zielony",Yellow:"Żółty",Red:"Czerwony",Gray:"Szary",Statuses:"Statusy",Workplaces:"Stanowiska","Select and arange the order":"Wybierz i ustaw kolejność",AlternativeOrder:"Zlecenie",Order:"Zamówienie"}}},T="1.2.9",M=function(e){var t=e.index;return o.default.createElement(i.Box,{role:"tabpanel",hidden:e.value!==t,id:"tabpanel-"+t,sx:{mt:2}},e.children)},Y=function(n){var a,u=n.data,l=n.formProps,c=e.useState(0),d=c[0],h=c[1],f=r.useTranslation().t,m=e.useMemo(function(){return[{label:f("Green"),value:"green"},{label:f("Yellow"),value:"yellow"},{label:f("Red"),value:"red"},{label:f("Gray"),value:"gray"}]},[f]);return o.default.createElement(i.Box,{mb:2},o.default.createElement(i.Tabs,{value:d,onChange:function(e,t){return h(t)},centered:!0,sx:{borderBottom:"1px solid rgba(255,255,255,0.1)",".MuiTab-root":{color:"rgba(255,255,255,0.5)","&.Mui-selected":{color:"white"}}}},o.default.createElement(i.Tab,{label:f("Statuses")}),o.default.createElement(i.Tab,{label:f("Workplaces")})),o.default.createElement(M,{value:d,index:0},o.default.createElement(t.SortableSelect,{placeholder:f("Select and arange the order")+"...",options:m,selected:l.values.statusColors||[],onChange:function(e){return l.setFieldValue("statusColors",[].concat(e))}})),o.default.createElement(M,{value:d,index:1},o.default.createElement(i.List,{sx:{color:"white",maxHeight:"500px",overflowY:"scroll"}},null==(a=u.workplaces)?void 0:a.map(function(e){return o.default.createElement(i.ListItem,{key:e.id},o.default.createElement(i.ListItemButton,{role:void 0,onClick:function(){var t,n;-1!==(n=l.values.workplacesIds||[]).indexOf(t=e.id)?l.setFieldValue("workplacesIds",n.filter(function(e){return e!==t})):l.setFieldValue("workplacesIds",[].concat(n,[t]))},dense:!0},o.default.createElement(i.ListItemIcon,null,o.default.createElement(s.Checkbox,{checked:-1!==(l.values.workplacesIds||[]).indexOf(e.id)})),o.default.createElement(i.ListItemText,{id:e.id,primary:e.name})))}))))};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var F,E,C=(F=function(e,t){e.exports=function(){var t,n;function r(){return t.apply(null,arguments)}function i(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function s(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function a(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function o(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(a(e,t))return!1;return!0}function u(e){return void 0===e}function l(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function c(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function d(e,t){var n,r=[],i=e.length;for(n=0;n<i;++n)r.push(t(e[n],n));return r}function h(e,t){for(var n in t)a(t,n)&&(e[n]=t[n]);return a(t,"toString")&&(e.toString=t.toString),a(t,"valueOf")&&(e.valueOf=t.valueOf),e}function f(e,t,n,r){return Nt(e,t,n,r,!0).utc()}function m(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function p(e){var t=null,r=!1,i=e._d&&!isNaN(e._d.getTime());return i&&(t=m(e),r=n.call(t.parsedDateParts,function(e){return null!=e}),i=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&r),e._strict&&(i=i&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour)),null!=Object.isFrozen&&Object.isFrozen(e)?i:(e._isValid=i,e._isValid)}function y(e){var t=f(NaN);return null!=e?h(m(t),e):m(t).userInvalidated=!0,t}n=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),r=n.length>>>0;for(t=0;t<r;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var v=r.momentProperties=[],g=!1;function _(e,t){var n,r,i,s=v.length;if(u(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),u(t._i)||(e._i=t._i),u(t._f)||(e._f=t._f),u(t._l)||(e._l=t._l),u(t._strict)||(e._strict=t._strict),u(t._tzm)||(e._tzm=t._tzm),u(t._isUTC)||(e._isUTC=t._isUTC),u(t._offset)||(e._offset=t._offset),u(t._pf)||(e._pf=m(t)),u(t._locale)||(e._locale=t._locale),s>0)for(n=0;n<s;n++)u(i=t[r=v[n]])||(e[r]=i);return e}function w(e){_(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===g&&(g=!0,r.updateOffset(this),g=!1)}function b(e){return e instanceof w||null!=e&&null!=e._isAMomentObject}function x(e){!1===r.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function k(e,t){var n=!0;return h(function(){if(null!=r.deprecationHandler&&r.deprecationHandler(null,e),n){var i,s,o,u=[],l=arguments.length;for(s=0;s<l;s++){if(i="","object"==typeof arguments[s]){for(o in i+="\n["+s+"] ",arguments[0])a(arguments[0],o)&&(i+=o+": "+arguments[0][o]+", ");i=i.slice(0,-2)}else i=arguments[s];u.push(i)}x(e+"\nArguments: "+Array.prototype.slice.call(u).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)},t)}var S,D={};function O(e,t){null!=r.deprecationHandler&&r.deprecationHandler(e,t),D[e]||(x(t),D[e]=!0)}function T(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function M(e,t){var n,r=h({},e);for(n in t)a(t,n)&&(s(e[n])&&s(t[n])?(r[n]={},h(r[n],e[n]),h(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)a(e,n)&&!a(t,n)&&s(e[n])&&(r[n]=h({},r[n]));return r}function Y(e){null!=e&&this.set(e)}function F(e,t,n){var r=""+Math.abs(e);return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,t-r.length)).toString().substr(1)+r}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null,S=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)a(e,t)&&n.push(t);return n};var E=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,C=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,N={},A={};function j(e,t,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),e&&(A[e]=i),t&&(A[t[0]]=function(){return F(i.apply(this,arguments),t[1],t[2])}),n&&(A[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function P(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function $(e,t){return e.isValid()?(t=V(t,e.localeData()),N[t]=N[t]||function(e){var t,n,r=e.match(E);for(t=0,n=r.length;t<n;t++)r[t]=A[r[t]]?A[r[t]]:P(r[t]);return function(t){var i,s="";for(i=0;i<n;i++)s+=T(r[i])?r[i].call(t,e):r[i];return s}}(t),N[t](e)):e.localeData().invalidDate()}function V(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(C.lastIndex=0;n>=0&&C.test(e);)e=e.replace(C,r),C.lastIndex=0,n-=1;return e}var R={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function W(e){return"string"==typeof e?R[e]||R[e.toLowerCase()]:void 0}function U(e){var t,n,r={};for(n in e)a(e,n)&&(t=W(n))&&(r[t]=e[n]);return r}var I,L={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1},H=/\d/,G=/\d\d/,z=/\d{3}/,Z=/\d{4}/,q=/[+-]?\d{6}/,B=/\d\d?/,J=/\d\d\d\d?/,Q=/\d\d\d\d\d\d?/,K=/\d{1,3}/,X=/\d{1,4}/,ee=/[+-]?\d{1,6}/,te=/\d+/,ne=/[+-]?\d+/,re=/Z|[+-]\d\d:?\d\d/gi,ie=/Z|[+-]\d\d(?::?\d\d)?/gi,se=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ae=/^[1-9]\d?/,oe=/^([1-9]\d|\d)/;function ue(e,t,n){I[e]=T(t)?t:function(e,r){return e&&n?n:t}}function le(e,t){return a(I,e)?I[e](t._strict,t._locale):new RegExp(ce(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,i){return t||n||r||i})))}function ce(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function de(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function he(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=de(t)),n}I={};var fe={};function me(e,t){var n,r,i=t;for("string"==typeof e&&(e=[e]),l(t)&&(i=function(e,n){n[t]=he(e)}),r=e.length,n=0;n<r;n++)fe[e[n]]=i}function pe(e,t){me(e,function(e,n,r,i){r._w=r._w||{},t(e,r._w,r,i)})}function ye(e,t,n){null!=t&&a(fe,e)&&fe[e](t,n._a,n,e)}function ve(e){return e%4==0&&e%100!=0||e%400==0}var ge=0,_e=1,we=2,be=3,xe=4,ke=5,Se=6,De=7,Oe=8;function Te(e){return ve(e)?366:365}j("Y",0,0,function(){var e=this.year();return e<=9999?F(e,4):"+"+e}),j(0,["YY",2],0,function(){return this.year()%100}),j(0,["YYYY",4],0,"year"),j(0,["YYYYY",5],0,"year"),j(0,["YYYYYY",6,!0],0,"year"),ue("Y",ne),ue("YY",B,G),ue("YYYY",X,Z),ue("YYYYY",ee,q),ue("YYYYYY",ee,q),me(["YYYYY","YYYYYY"],ge),me("YYYY",function(e,t){t[ge]=2===e.length?r.parseTwoDigitYear(e):he(e)}),me("YY",function(e,t){t[ge]=r.parseTwoDigitYear(e)}),me("Y",function(e,t){t[ge]=parseInt(e,10)}),r.parseTwoDigitYear=function(e){return he(e)+(he(e)>68?1900:2e3)};var Me,Ye=Fe("FullYear",!0);function Fe(e,t){return function(n){return null!=n?(Ce(this,e,n),r.updateOffset(this,t),this):Ee(this,e)}}function Ee(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function Ce(e,t,n){var r,i,s,a,o;if(e.isValid()&&!isNaN(n)){switch(r=e._d,i=e._isUTC,t){case"Milliseconds":return void(i?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(i?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(i?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(i?r.setUTCHours(n):r.setHours(n));case"Date":return void(i?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}s=n,a=e.month(),o=29!==(o=e.date())||1!==a||ve(s)?o:28,i?r.setUTCFullYear(s,a,o):r.setFullYear(s,a,o)}}function Ne(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=(t%12+12)%12;return e+=(t-n)/12,1===n?ve(e)?29:28:31-n%7%2}Me=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},j("M",["MM",2],"Mo",function(){return this.month()+1}),j("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),j("MMMM",0,0,function(e){return this.localeData().months(this,e)}),ue("M",B,ae),ue("MM",B,G),ue("MMM",function(e,t){return t.monthsShortRegex(e)}),ue("MMMM",function(e,t){return t.monthsRegex(e)}),me(["M","MM"],function(e,t){t[_e]=he(e)-1}),me(["MMM","MMMM"],function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);null!=i?t[_e]=i:m(n).invalidMonth=e});var Ae="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),je="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Pe=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,$e=se,Ve=se;function Re(e,t,n){var r,i,s,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)s=f([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(s,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=Me.call(this._shortMonthsParse,a))?i:null:-1!==(i=Me.call(this._longMonthsParse,a))?i:null:"MMM"===t?-1!==(i=Me.call(this._shortMonthsParse,a))||-1!==(i=Me.call(this._longMonthsParse,a))?i:null:-1!==(i=Me.call(this._longMonthsParse,a))||-1!==(i=Me.call(this._shortMonthsParse,a))?i:null}function We(e,t){if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=he(t);else if(!l(t=e.localeData().monthsParse(t)))return e;var n=t,r=e.date();return r=r<29?r:Math.min(r,Ne(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function Ue(e){return null!=e?(We(this,e),r.updateOffset(this,!0),this):Ee(this,"Month")}function Ie(){function e(e,t){return t.length-e.length}var t,n,r,i,s=[],a=[],o=[];for(t=0;t<12;t++)n=f([2e3,t]),r=ce(this.monthsShort(n,"")),i=ce(this.months(n,"")),s.push(r),a.push(i),o.push(i),o.push(r);s.sort(e),a.sort(e),o.sort(e),this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Le(e,t,n,r,i,s,a){var o;return e<100&&e>=0?(o=new Date(e+400,t,n,r,i,s,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,r,i,s,a),o}function He(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Ge(e,t,n){var r=7+t-n;return-(7+He(e,0,r).getUTCDay()-t)%7+r-1}function ze(e,t,n,r,i){var s,a,o=1+7*(t-1)+(7+n-r)%7+Ge(e,r,i);return o<=0?a=Te(s=e-1)+o:o>Te(e)?(s=e+1,a=o-Te(e)):(s=e,a=o),{year:s,dayOfYear:a}}function Ze(e,t,n){var r,i,s=Ge(e.year(),t,n),a=Math.floor((e.dayOfYear()-s-1)/7)+1;return a<1?r=a+qe(i=e.year()-1,t,n):a>qe(e.year(),t,n)?(r=a-qe(e.year(),t,n),i=e.year()+1):(i=e.year(),r=a),{week:r,year:i}}function qe(e,t,n){var r=Ge(e,t,n),i=Ge(e+1,t,n);return(Te(e)-r+i)/7}function Be(e,t){return e.slice(t,7).concat(e.slice(0,t))}j("w",["ww",2],"wo","week"),j("W",["WW",2],"Wo","isoWeek"),ue("w",B,ae),ue("ww",B,G),ue("W",B,ae),ue("WW",B,G),pe(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=he(e)}),j("d",0,"do","day"),j("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),j("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),j("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),j("e",0,0,"weekday"),j("E",0,0,"isoWeekday"),ue("d",B),ue("e",B),ue("E",B),ue("dd",function(e,t){return t.weekdaysMinRegex(e)}),ue("ddd",function(e,t){return t.weekdaysShortRegex(e)}),ue("dddd",function(e,t){return t.weekdaysRegex(e)}),pe(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);null!=i?t.d=i:m(n).invalidWeekday=e}),pe(["d","e","E"],function(e,t,n,r){t[r]=he(e)});var Je="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Qe="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ke="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Xe=se,et=se,tt=se;function nt(e,t,n){var r,i,s,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)s=f([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(s,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=Me.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=Me.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=Me.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=Me.call(this._weekdaysParse,a))||-1!==(i=Me.call(this._shortWeekdaysParse,a))||-1!==(i=Me.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=Me.call(this._shortWeekdaysParse,a))||-1!==(i=Me.call(this._weekdaysParse,a))||-1!==(i=Me.call(this._minWeekdaysParse,a))?i:null:-1!==(i=Me.call(this._minWeekdaysParse,a))||-1!==(i=Me.call(this._weekdaysParse,a))||-1!==(i=Me.call(this._shortWeekdaysParse,a))?i:null}function rt(){function e(e,t){return t.length-e.length}var t,n,r,i,s,a=[],o=[],u=[],l=[];for(t=0;t<7;t++)n=f([2e3,1]).day(t),r=ce(this.weekdaysMin(n,"")),i=ce(this.weekdaysShort(n,"")),s=ce(this.weekdays(n,"")),a.push(r),o.push(i),u.push(s),l.push(r),l.push(i),l.push(s);a.sort(e),o.sort(e),u.sort(e),l.sort(e),this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function it(){return this.hours()%12||12}function st(e,t){j(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function at(e,t){return t._meridiemParse}j("H",["HH",2],0,"hour"),j("h",["hh",2],0,it),j("k",["kk",2],0,function(){return this.hours()||24}),j("hmm",0,0,function(){return""+it.apply(this)+F(this.minutes(),2)}),j("hmmss",0,0,function(){return""+it.apply(this)+F(this.minutes(),2)+F(this.seconds(),2)}),j("Hmm",0,0,function(){return""+this.hours()+F(this.minutes(),2)}),j("Hmmss",0,0,function(){return""+this.hours()+F(this.minutes(),2)+F(this.seconds(),2)}),st("a",!0),st("A",!1),ue("a",at),ue("A",at),ue("H",B,oe),ue("h",B,ae),ue("k",B,ae),ue("HH",B,G),ue("hh",B,G),ue("kk",B,G),ue("hmm",J),ue("hmmss",Q),ue("Hmm",J),ue("Hmmss",Q),me(["H","HH"],be),me(["k","kk"],function(e,t,n){var r=he(e);t[be]=24===r?0:r}),me(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),me(["h","hh"],function(e,t,n){t[be]=he(e),m(n).bigHour=!0}),me("hmm",function(e,t,n){var r=e.length-2;t[be]=he(e.substr(0,r)),t[xe]=he(e.substr(r)),m(n).bigHour=!0}),me("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[be]=he(e.substr(0,r)),t[xe]=he(e.substr(r,2)),t[ke]=he(e.substr(i)),m(n).bigHour=!0}),me("Hmm",function(e,t,n){var r=e.length-2;t[be]=he(e.substr(0,r)),t[xe]=he(e.substr(r))}),me("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[be]=he(e.substr(0,r)),t[xe]=he(e.substr(r,2)),t[ke]=he(e.substr(i))});var ot,ut=Fe("Hours",!0),lt={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Ae,monthsShort:je,week:{dow:0,doy:6},weekdays:Je,weekdaysMin:Ke,weekdaysShort:Qe,meridiemParse:/[ap]\.?m?\.?/i},ct={},dt={};function ht(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function ft(e){return e?e.toLowerCase().replace("_","-"):e}function mt(t){var n=null;if(void 0===ct[t]&&e&&e.exports&&function(e){return!(!e||!e.match("^[^/\\\\]*$"))}(t))try{n=ot._abbr,function(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets option of @rollup/plugin-commonjs appropriately for this require call to behave properly.')}("./locale/"+t),pt(n)}catch(e){ct[t]=null}return ct[t]}function pt(e,t){var n;return e&&((n=u(t)?vt(e):yt(e,t))?ot=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),ot._abbr}function yt(e,t){if(null!==t){var n,r=lt;if(t.abbr=e,null!=ct[e])O("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=ct[e]._config;else if(null!=t.parentLocale)if(null!=ct[t.parentLocale])r=ct[t.parentLocale]._config;else{if(null==(n=mt(t.parentLocale)))return dt[t.parentLocale]||(dt[t.parentLocale]=[]),dt[t.parentLocale].push({name:e,config:t}),null;r=n._config}return ct[e]=new Y(M(r,t)),dt[e]&&dt[e].forEach(function(e){yt(e.name,e.config)}),pt(e),ct[e]}return delete ct[e],null}function vt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return ot;if(!i(e)){if(t=mt(e))return t;e=[e]}return function(e){for(var t,n,r,i,s=0;s<e.length;){for(t=(i=ft(e[s]).split("-")).length,n=(n=ft(e[s+1]))?n.split("-"):null;t>0;){if(r=mt(i.slice(0,t).join("-")))return r;if(n&&n.length>=t&&ht(i,n)>=t-1)break;t--}s++}return ot}(e)}function gt(e){var t,n=e._a;return n&&-2===m(e).overflow&&(t=n[_e]<0||n[_e]>11?_e:n[we]<1||n[we]>Ne(n[ge],n[_e])?we:n[be]<0||n[be]>24||24===n[be]&&(0!==n[xe]||0!==n[ke]||0!==n[Se])?be:n[xe]<0||n[xe]>59?xe:n[ke]<0||n[ke]>59?ke:n[Se]<0||n[Se]>999?Se:-1,m(e)._overflowDayOfYear&&(t<ge||t>we)&&(t=we),m(e)._overflowWeeks&&-1===t&&(t=De),m(e)._overflowWeekday&&-1===t&&(t=Oe),m(e).overflow=t),e}var _t=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,bt=/Z|[+-]\d\d(?::?\d\d)?/,xt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],kt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],St=/^\/?Date\((-?\d+)/i,Dt=/^(?:(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{4}))$/,Ot={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Tt(e){var t,n,r,i,s,a,o=e._i,u=_t.exec(o)||wt.exec(o),l=xt.length,c=kt.length;if(u){for(m(e).iso=!0,t=0,n=l;t<n;t++)if(xt[t][1].exec(u[1])){i=xt[t][0],r=!1!==xt[t][2];break}if(null==i)return void(e._isValid=!1);if(u[3]){for(t=0,n=c;t<n;t++)if(kt[t][1].exec(u[3])){s=(u[2]||" ")+kt[t][0];break}if(null==s)return void(e._isValid=!1)}if(!r&&null!=s)return void(e._isValid=!1);if(u[4]){if(!bt.exec(u[4]))return void(e._isValid=!1);a="Z"}e._f=i+(s||"")+(a||""),Et(e)}else e._isValid=!1}function Mt(e){var t,n,r,i,s,a,o,u,l,c=Dt.exec(e._i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(c){if(n=c[3],r=c[2],i=c[5],s=c[6],a=c[7],o=[(u=c[4],l=parseInt(u,10),l<=49?2e3+l:l<=999?1900+l:l),je.indexOf(n),parseInt(r,10),parseInt(i,10),parseInt(s,10)],a&&o.push(parseInt(a,10)),!function(e,t,n){return!e||Qe.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(m(n).weekdayMismatch=!0,n._isValid=!1,!1)}(c[1],t=o,e))return;e._a=t,e._tzm=function(e,t,n){if(e)return Ot[e];if(t)return 0;var r=parseInt(n,10),i=r%100;return(r-i)/100*60+i}(c[8],c[9],c[10]),e._d=He.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),m(e).rfc2822=!0}else e._isValid=!1}function Yt(e,t,n){return null!=e?e:null!=t?t:n}function Ft(e){var t,n,i,s,a,o=[];if(!e._d){for(i=function(e){var t=new Date(r.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[we]&&null==e._a[_e]&&function(e){var t,n,r,i,s,a,o,u,l;null!=(t=e._w).GG||null!=t.W||null!=t.E?(s=1,a=4,n=Yt(t.GG,e._a[ge],Ze(At(),1,4).year),r=Yt(t.W,1),((i=Yt(t.E,1))<1||i>7)&&(u=!0)):(s=e._locale._week.dow,a=e._locale._week.doy,l=Ze(At(),s,a),n=Yt(t.gg,e._a[ge],l.year),r=Yt(t.w,l.week),null!=t.d?((i=t.d)<0||i>6)&&(u=!0):null!=t.e?(i=t.e+s,(t.e<0||t.e>6)&&(u=!0)):i=s),r<1||r>qe(n,s,a)?m(e)._overflowWeeks=!0:null!=u?m(e)._overflowWeekday=!0:(o=ze(n,r,i,s,a),e._a[ge]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(a=Yt(e._a[ge],i[ge]),(e._dayOfYear>Te(a)||0===e._dayOfYear)&&(m(e)._overflowDayOfYear=!0),n=He(a,0,e._dayOfYear),e._a[_e]=n.getUTCMonth(),e._a[we]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=o[t]=i[t];for(;t<7;t++)e._a[t]=o[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[be]&&0===e._a[xe]&&0===e._a[ke]&&0===e._a[Se]&&(e._nextDay=!0,e._a[be]=0),e._d=(e._useUTC?He:Le).apply(null,o),s=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[be]=24),e._w&&void 0!==e._w.d&&e._w.d!==s&&(m(e).weekdayMismatch=!0)}}function Et(e){if(e._f!==r.ISO_8601)if(e._f!==r.RFC_2822){e._a=[],m(e).empty=!0;var t,n,i,s,a,o,u,l=""+e._i,c=l.length,d=0;for(u=(i=V(e._f,e._locale).match(E)||[]).length,t=0;t<u;t++)(n=(l.match(le(s=i[t],e))||[])[0])&&((a=l.substr(0,l.indexOf(n))).length>0&&m(e).unusedInput.push(a),l=l.slice(l.indexOf(n)+n.length),d+=n.length),A[s]?(n?m(e).empty=!1:m(e).unusedTokens.push(s),ye(s,n,e)):e._strict&&!n&&m(e).unusedTokens.push(s);m(e).charsLeftOver=c-d,l.length>0&&m(e).unusedInput.push(l),e._a[be]<=12&&!0===m(e).bigHour&&e._a[be]>0&&(m(e).bigHour=void 0),m(e).parsedDateParts=e._a.slice(0),m(e).meridiem=e._meridiem,e._a[be]=function(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}(e._locale,e._a[be],e._meridiem),null!==(o=m(e).era)&&(e._a[ge]=e._locale.erasConvertYear(o,e._a[ge])),Ft(e),gt(e)}else Mt(e);else Tt(e)}function Ct(e){var t=e._i,n=e._f;return e._locale=e._locale||vt(e._l),null===t||void 0===n&&""===t?y({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),b(t)?new w(gt(t)):(c(t)?e._d=t:i(n)?function(e){var t,n,r,i,s,a,o=!1,u=e._f.length;if(0===u)return m(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;i<u;i++)s=0,a=!1,t=_({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],Et(t),p(t)&&(a=!0),s+=m(t).charsLeftOver,s+=10*m(t).unusedTokens.length,m(t).score=s,o?s<r&&(r=s,n=t):(null==r||s<r||a)&&(r=s,n=t,a&&(o=!0));h(e,n||t)}(e):n?Et(e):function(e){var t=e._i;u(t)?e._d=new Date(r.now()):c(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=St.exec(e._i);null===t?(Tt(e),!1===e._isValid&&(delete e._isValid,Mt(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:r.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):i(t)?(e._a=d(t.slice(0),function(e){return parseInt(e,10)}),Ft(e)):s(t)?function(e){if(!e._d){var t=U(e._i);e._a=d([t.year,t.month,void 0===t.day?t.date:t.day,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),Ft(e)}}(e):l(t)?e._d=new Date(t):r.createFromInputFallback(e)}(e),p(e)||(e._d=null),e))}function Nt(e,t,n,r,a){var u,l={};return!0!==t&&!1!==t||(r=t,t=void 0),!0!==n&&!1!==n||(r=n,n=void 0),(s(e)&&o(e)||i(e)&&0===e.length)&&(e=void 0),l._isAMomentObject=!0,l._useUTC=l._isUTC=a,l._l=n,l._i=e,l._f=t,l._strict=r,(u=new w(gt(Ct(l))))._nextDay&&(u.add(1,"d"),u._nextDay=void 0),u}function At(e,t,n,r){return Nt(e,t,n,r,!1)}r.createFromInputFallback=k("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),r.ISO_8601=function(){},r.RFC_2822=function(){};var jt=k("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=At.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:y()}),Pt=k("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=At.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:y()});function $t(e,t){var n,r;if(1===t.length&&i(t[0])&&(t=t[0]),!t.length)return At();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}var Vt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Rt(e){var t=U(e),n=t.year||0,r=t.quarter||0,i=t.month||0,s=t.week||t.isoWeek||0,o=t.day||0,u=t.hour||0,l=t.minute||0,c=t.second||0,d=t.millisecond||0;this._isValid=function(e){var t,n,r=!1,i=Vt.length;for(t in e)if(a(e,t)&&(-1===Me.call(Vt,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<i;++n)if(e[Vt[n]]){if(r)return!1;parseFloat(e[Vt[n]])!==he(e[Vt[n]])&&(r=!0)}return!0}(t),this._milliseconds=+d+1e3*c+6e4*l+1e3*u*60*60,this._days=+o+7*s,this._months=+i+3*r+12*n,this._data={},this._locale=vt(),this._bubble()}function Wt(e){return e instanceof Rt}function Ut(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function It(e,t){j(e,0,0,function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+F(~~(e/60),2)+t+F(~~e%60,2)})}It("Z",":"),It("ZZ",""),ue("Z",ie),ue("ZZ",ie),me(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Ht(ie,e)});var Lt=/([\+\-]|\d\d)/gi;function Ht(e,t){var n,r,i=(t||"").match(e);return null===i?null:0===(r=60*(n=((i[i.length-1]||[])+"").match(Lt)||["-",0,0])[1]+he(n[2]))?0:"+"===n[0]?r:-r}function Gt(e,t){var n,i;return t._isUTC?(n=t.clone(),i=(b(e)||c(e)?e.valueOf():At(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+i),r.updateOffset(n,!1),n):At(e).local()}function zt(e){return-Math.round(e._d.getTimezoneOffset())}function Zt(){return!!this.isValid()&&this._isUTC&&0===this._offset}r.updateOffset=function(){};var qt=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Bt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Jt(e,t){var n,r,i,s,o,u,c=e,d=null;return Wt(e)?c={ms:e._milliseconds,d:e._days,M:e._months}:l(e)||!isNaN(+e)?(c={},t?c[t]=+e:c.milliseconds=+e):(d=qt.exec(e))?(n="-"===d[1]?-1:1,c={y:0,d:he(d[we])*n,h:he(d[be])*n,m:he(d[xe])*n,s:he(d[ke])*n,ms:he(Ut(1e3*d[Se]))*n}):(d=Bt.exec(e))?c={y:Qt(d[2],n="-"===d[1]?-1:1),M:Qt(d[3],n),w:Qt(d[4],n),d:Qt(d[5],n),h:Qt(d[6],n),m:Qt(d[7],n),s:Qt(d[8],n)}:null==c?c={}:"object"==typeof c&&("from"in c||"to"in c)&&(s=At(c.from),o=At(c.to),i=s.isValid()&&o.isValid()?(o=Gt(o,s),s.isBefore(o)?u=Kt(s,o):((u=Kt(o,s)).milliseconds=-u.milliseconds,u.months=-u.months),u):{milliseconds:0,months:0},(c={}).ms=i.milliseconds,c.M=i.months),r=new Rt(c),Wt(e)&&a(e,"_locale")&&(r._locale=e._locale),Wt(e)&&a(e,"_isValid")&&(r._isValid=e._isValid),r}function Qt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Kt(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Xt(e,t){return function(n,r){var i;return null===r||isNaN(+r)||(O(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=r,r=i),en(this,Jt(n,r),e),this}}function en(e,t,n,i){var s=t._milliseconds,a=Ut(t._days),o=Ut(t._months);e.isValid()&&(i=null==i||i,o&&We(e,Ee(e,"Month")+o*n),a&&Ce(e,"Date",Ee(e,"Date")+a*n),s&&e._d.setTime(e._d.valueOf()+s*n),i&&r.updateOffset(e,a||o))}Jt.fn=Rt.prototype,Jt.invalid=function(){return Jt(NaN)};var tn=Xt(1,"add"),nn=Xt(-1,"subtract");function rn(e){return"string"==typeof e||e instanceof String}function sn(e,t){if(e.date()<t.date())return-sn(t,e);var n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,"months");return-(n+(t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r)))||0}function an(e){var t;return void 0===e?this._locale._abbr:(null!=(t=vt(e))&&(this._locale=t),this)}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var on=k("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function un(){return this._locale}var ln=1e3,cn=6e4,dn=36e5,hn=126227808e5;function fn(e,t){return(e%t+t)%t}function mn(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-hn:new Date(e,t,n).valueOf()}function pn(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-hn:Date.UTC(e,t,n)}function yn(e,t){return t.erasAbbrRegex(e)}function vn(){var e,t,n,r,i,s=[],a=[],o=[],u=[],l=this.eras();for(e=0,t=l.length;e<t;++e)n=ce(l[e].name),r=ce(l[e].abbr),i=ce(l[e].narrow),a.push(n),s.push(r),o.push(i),u.push(n),u.push(r),u.push(i);this._erasRegex=new RegExp("^("+u.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+a.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+s.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+o.join("|")+")","i")}function gn(e,t){j(0,[e,e.length],0,t)}function _n(e,t,n,r,i){var s;return null==e?Ze(this,r,i).year:(t>(s=qe(e,r,i))&&(t=s),wn.call(this,e,t,n,r,i))}function wn(e,t,n,r,i){var s=ze(e,t,n,r,i),a=He(s.year,0,s.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}j("N",0,0,"eraAbbr"),j("NN",0,0,"eraAbbr"),j("NNN",0,0,"eraAbbr"),j("NNNN",0,0,"eraName"),j("NNNNN",0,0,"eraNarrow"),j("y",["y",1],"yo","eraYear"),j("y",["yy",2],0,"eraYear"),j("y",["yyy",3],0,"eraYear"),j("y",["yyyy",4],0,"eraYear"),ue("N",yn),ue("NN",yn),ue("NNN",yn),ue("NNNN",function(e,t){return t.erasNameRegex(e)}),ue("NNNNN",function(e,t){return t.erasNarrowRegex(e)}),me(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?m(n).era=i:m(n).invalidEra=e}),ue("y",te),ue("yy",te),ue("yyy",te),ue("yyyy",te),ue("yo",function(e,t){return t._eraYearOrdinalRegex||te}),me(["y","yy","yyy","yyyy"],ge),me(["yo"],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),t[ge]=n._locale.eraYearOrdinalParse?n._locale.eraYearOrdinalParse(e,i):parseInt(e,10)}),j(0,["gg",2],0,function(){return this.weekYear()%100}),j(0,["GG",2],0,function(){return this.isoWeekYear()%100}),gn("gggg","weekYear"),gn("ggggg","weekYear"),gn("GGGG","isoWeekYear"),gn("GGGGG","isoWeekYear"),ue("G",ne),ue("g",ne),ue("GG",B,G),ue("gg",B,G),ue("GGGG",X,Z),ue("gggg",X,Z),ue("GGGGG",ee,q),ue("ggggg",ee,q),pe(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=he(e)}),pe(["gg","GG"],function(e,t,n,i){t[i]=r.parseTwoDigitYear(e)}),j("Q",0,"Qo","quarter"),ue("Q",H),me("Q",function(e,t){t[_e]=3*(he(e)-1)}),j("D",["DD",2],"Do","date"),ue("D",B,ae),ue("DD",B,G),ue("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),me(["D","DD"],we),me("Do",function(e,t){t[we]=he(e.match(B)[0])});var bn=Fe("Date",!0);j("DDD",["DDDD",3],"DDDo","dayOfYear"),ue("DDD",K),ue("DDDD",z),me(["DDD","DDDD"],function(e,t,n){n._dayOfYear=he(e)}),j("m",["mm",2],0,"minute"),ue("m",B,oe),ue("mm",B,G),me(["m","mm"],xe);var xn=Fe("Minutes",!1);j("s",["ss",2],0,"second"),ue("s",B,oe),ue("ss",B,G),me(["s","ss"],ke);var kn,Sn,Dn=Fe("Seconds",!1);for(j("S",0,0,function(){return~~(this.millisecond()/100)}),j(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),j(0,["SSS",3],0,"millisecond"),j(0,["SSSS",4],0,function(){return 10*this.millisecond()}),j(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),j(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),j(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),j(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),j(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),ue("S",K,H),ue("SS",K,G),ue("SSS",K,z),kn="SSSS";kn.length<=9;kn+="S")ue(kn,te);function On(e,t){t[Se]=he(1e3*("0."+e))}for(kn="S";kn.length<=9;kn+="S")me(kn,On);Sn=Fe("Milliseconds",!1),j("z",0,0,"zoneAbbr"),j("zz",0,0,"zoneName");var Tn=w.prototype;function Mn(e){return e}Tn.add=tn,Tn.calendar=function(e,t){var n;1===arguments.length&&(arguments[0]?b(n=arguments[0])||c(n)||rn(n)||l(n)||function(e){var t=i(e),n=!1;return t&&(n=0===e.filter(function(t){return!l(t)&&rn(e)}).length),t&&n}(n)||function(e){var t,n=s(e)&&!o(e),r=!1,i=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],u=i.length;for(t=0;t<u;t+=1)r=r||a(e,i[t]);return n&&r}(n)||null==n?(e=arguments[0],t=void 0):function(e){var t,n=s(e)&&!o(e),r=!1,i=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<i.length;t+=1)r=r||a(e,i[t]);return n&&r}(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var u=e||At(),d=Gt(u,this).startOf("day"),h=r.calendarFormat(this,d)||"sameElse",f=t&&(T(t[h])?t[h].call(this,u):t[h]);return this.format(f||this.localeData().calendar(h,this,At(u)))},Tn.clone=function(){return new w(this)},Tn.diff=function(e,t,n){var r,i,s;if(!this.isValid())return NaN;if(!(r=Gt(e,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),t=W(t)){case"year":s=sn(this,r)/12;break;case"month":s=sn(this,r);break;case"quarter":s=sn(this,r)/3;break;case"second":s=(this-r)/1e3;break;case"minute":s=(this-r)/6e4;break;case"hour":s=(this-r)/36e5;break;case"day":s=(this-r-i)/864e5;break;case"week":s=(this-r-i)/6048e5;break;default:s=this-r}return n?s:de(s)},Tn.endOf=function(e){var t,n;if(void 0===(e=W(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?pn:mn,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=dn-fn(t+(this._isUTC?0:this.utcOffset()*cn),dn)-1;break;case"minute":t=this._d.valueOf(),t+=cn-fn(t,cn)-1;break;case"second":t=this._d.valueOf(),t+=ln-fn(t,ln)-1}return this._d.setTime(t),r.updateOffset(this,!0),this},Tn.format=function(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=$(this,e);return this.localeData().postformat(t)},Tn.from=function(e,t){return this.isValid()&&(b(e)&&e.isValid()||At(e).isValid())?Jt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},Tn.fromNow=function(e){return this.from(At(),e)},Tn.to=function(e,t){return this.isValid()&&(b(e)&&e.isValid()||At(e).isValid())?Jt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},Tn.toNow=function(e){return this.to(At(),e)},Tn.get=function(e){return T(this[e=W(e)])?this[e]():this},Tn.invalidAt=function(){return m(this).overflow},Tn.isAfter=function(e,t){var n=b(e)?e:At(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=W(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},Tn.isBefore=function(e,t){var n=b(e)?e:At(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=W(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},Tn.isBetween=function(e,t,n,r){var i=b(e)?e:At(e),s=b(t)?t:At(t);return!!(this.isValid()&&i.isValid()&&s.isValid())&&("("===(r=r||"()")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===r[1]?this.isBefore(s,n):!this.isAfter(s,n))},Tn.isSame=function(e,t){var n,r=b(e)?e:At(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=W(t)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},Tn.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},Tn.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},Tn.isValid=function(){return p(this)},Tn.lang=on,Tn.locale=an,Tn.localeData=un,Tn.max=Pt,Tn.min=jt,Tn.parsingFlags=function(){return h({},m(this))},Tn.set=function(e,t){if("object"==typeof e){var n,r=function(e){var t,n=[];for(t in e)a(e,t)&&n.push({unit:t,priority:L[t]});return n.sort(function(e,t){return e.priority-t.priority}),n}(e=U(e)),i=r.length;for(n=0;n<i;n++)this[r[n].unit](e[r[n].unit])}else if(T(this[e=W(e)]))return this[e](t);return this},Tn.startOf=function(e){var t,n;if(void 0===(e=W(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?pn:mn,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=fn(t+(this._isUTC?0:this.utcOffset()*cn),dn);break;case"minute":t=this._d.valueOf(),t-=fn(t,cn);break;case"second":t=this._d.valueOf(),t-=fn(t,ln)}return this._d.setTime(t),r.updateOffset(this,!0),this},Tn.subtract=nn,Tn.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},Tn.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},Tn.toDate=function(){return new Date(this.valueOf())},Tn.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?$(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):T(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",$(n,"Z")):$(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},Tn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n="moment",r="";return this.isLocal()||(n=0===this.utcOffset()?"moment.utc":"moment.parseZone",r="Z"),e="["+n+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+r+'[")]')},"undefined"!=typeof Symbol&&null!=Symbol.for&&(Tn[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),Tn.toJSON=function(){return this.isValid()?this.toISOString():null},Tn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},Tn.unix=function(){return Math.floor(this.valueOf()/1e3)},Tn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},Tn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},Tn.eraName=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].name;if(r[e].until<=n&&n<=r[e].since)return r[e].name}return""},Tn.eraNarrow=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].narrow;if(r[e].until<=n&&n<=r[e].since)return r[e].narrow}return""},Tn.eraAbbr=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].abbr;if(r[e].until<=n&&n<=r[e].since)return r[e].abbr}return""},Tn.eraYear=function(){var e,t,n,i,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e)if(n=s[e].since<=s[e].until?1:-1,i=this.clone().startOf("day").valueOf(),s[e].since<=i&&i<=s[e].until||s[e].until<=i&&i<=s[e].since)return(this.year()-r(s[e].since).year())*n+s[e].offset;return this.year()},Tn.year=Ye,Tn.isLeapYear=function(){return ve(this.year())},Tn.weekYear=function(e){return _n.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)},Tn.isoWeekYear=function(e){return _n.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},Tn.quarter=Tn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},Tn.month=Ue,Tn.daysInMonth=function(){return Ne(this.year(),this.month())},Tn.week=Tn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},Tn.isoWeek=Tn.isoWeeks=function(e){var t=Ze(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},Tn.weeksInYear=function(){var e=this.localeData()._week;return qe(this.year(),e.dow,e.doy)},Tn.weeksInWeekYear=function(){var e=this.localeData()._week;return qe(this.weekYear(),e.dow,e.doy)},Tn.isoWeeksInYear=function(){return qe(this.year(),1,4)},Tn.isoWeeksInISOWeekYear=function(){return qe(this.isoWeekYear(),1,4)},Tn.date=bn,Tn.day=Tn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=Ee(this,"Day");return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},Tn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},Tn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},Tn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},Tn.hour=Tn.hours=ut,Tn.minute=Tn.minutes=xn,Tn.second=Tn.seconds=Dn,Tn.millisecond=Tn.milliseconds=Sn,Tn.utcOffset=function(e,t,n){var i,s=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Ht(ie,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(i=zt(this)),this._offset=e,this._isUTC=!0,null!=i&&this.add(i,"m"),s!==e&&(!t||this._changeInProgress?en(this,Jt(e-s,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?s:zt(this)},Tn.utc=function(e){return this.utcOffset(0,e)},Tn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(zt(this),"m")),this},Tn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Ht(re,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},Tn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?At(e).utcOffset():0,(this.utcOffset()-e)%60==0)},Tn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},Tn.isLocal=function(){return!!this.isValid()&&!this._isUTC},Tn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},Tn.isUtc=Zt,Tn.isUTC=Zt,Tn.zoneAbbr=function(){return this._isUTC?"UTC":""},Tn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},Tn.dates=k("dates accessor is deprecated. Use date instead.",bn),Tn.months=k("months accessor is deprecated. Use month instead",Ue),Tn.years=k("years accessor is deprecated. Use year instead",Ye),Tn.zone=k("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),Tn.isDSTShifted=k("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!u(this._isDSTShifted))return this._isDSTShifted;var e,t={};return _(t,this),(t=Ct(t))._a?(e=t._isUTC?f(t._a):At(t._a),this._isDSTShifted=this.isValid()&&function(e,t){var n,r=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),s=0;for(n=0;n<r;n++)he(e[n])!==he(t[n])&&s++;return s+i}(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted});var Yn=Y.prototype;function Fn(e,t,n,r){var i=vt(),s=f().set(r,t);return i[n](s,e)}function En(e,t,n){if(l(e)&&(t=e,e=void 0),e=e||"",null!=t)return Fn(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=Fn(e,r,n,"month");return i}function Cn(e,t,n,r){"boolean"==typeof e?(l(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,l(t)&&(n=t,t=void 0),t=t||"");var i,s=vt(),a=e?s._week.dow:0,o=[];if(null!=n)return Fn(t,(n+a)%7,r,"day");for(i=0;i<7;i++)o[i]=Fn(t,(i+a)%7,r,"day");return o}Yn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return T(r)?r.call(t,n):r},Yn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(E).map(function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e}).join(""),this._longDateFormat[e])},Yn.invalidDate=function(){return this._invalidDate},Yn.ordinal=function(e){return this._ordinal.replace("%d",e)},Yn.preparse=Mn,Yn.postformat=Mn,Yn.relativeTime=function(e,t,n,r){var i=this._relativeTime[n];return T(i)?i(e,t,n,r):i.replace(/%d/i,e)},Yn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return T(n)?n(t):n.replace(/%s/i,t)},Yn.set=function(e){var t,n;for(n in e)a(e,n)&&(T(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},Yn.eras=function(e,t){var n,i,s,a=this._eras||vt("en")._eras;for(n=0,i=a.length;n<i;++n)switch("string"==typeof a[n].since&&(s=r(a[n].since).startOf("day"),a[n].since=s.valueOf()),typeof a[n].until){case"undefined":a[n].until=Infinity;break;case"string":s=r(a[n].until).startOf("day").valueOf(),a[n].until=s.valueOf()}return a},Yn.erasParse=function(e,t,n){var r,i,s,a,o,u=this.eras();for(e=e.toUpperCase(),r=0,i=u.length;r<i;++r)if(s=u[r].name.toUpperCase(),a=u[r].abbr.toUpperCase(),o=u[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(a===e)return u[r];break;case"NNNN":if(s===e)return u[r];break;case"NNNNN":if(o===e)return u[r]}else if([s,a,o].indexOf(e)>=0)return u[r]},Yn.erasConvertYear=function(e,t){var n=e.since<=e.until?1:-1;return void 0===t?r(e.since).year():r(e.since).year()+(t-e.offset)*n},Yn.erasAbbrRegex=function(e){return a(this,"_erasAbbrRegex")||vn.call(this),e?this._erasAbbrRegex:this._erasRegex},Yn.erasNameRegex=function(e){return a(this,"_erasNameRegex")||vn.call(this),e?this._erasNameRegex:this._erasRegex},Yn.erasNarrowRegex=function(e){return a(this,"_erasNarrowRegex")||vn.call(this),e?this._erasNarrowRegex:this._erasRegex},Yn.months=function(e,t){return e?i(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Pe).test(t)?"format":"standalone"][e.month()]:i(this._months)?this._months:this._months.standalone},Yn.monthsShort=function(e,t){return e?i(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Pe.test(t)?"format":"standalone"][e.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},Yn.monthsParse=function(e,t,n){var r,i,s;if(this._monthsParseExact)return Re.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=f([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(s="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(s.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},Yn.monthsRegex=function(e){return this._monthsParseExact?(a(this,"_monthsRegex")||Ie.call(this),e?this._monthsStrictRegex:this._monthsRegex):(a(this,"_monthsRegex")||(this._monthsRegex=Ve),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},Yn.monthsShortRegex=function(e){return this._monthsParseExact?(a(this,"_monthsRegex")||Ie.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(a(this,"_monthsShortRegex")||(this._monthsShortRegex=$e),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},Yn.week=function(e){return Ze(e,this._week.dow,this._week.doy).week},Yn.firstDayOfYear=function(){return this._week.doy},Yn.firstDayOfWeek=function(){return this._week.dow},Yn.weekdays=function(e,t){var n=i(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Be(n,this._week.dow):e?n[e.day()]:n},Yn.weekdaysMin=function(e){return!0===e?Be(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},Yn.weekdaysShort=function(e){return!0===e?Be(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},Yn.weekdaysParse=function(e,t,n){var r,i,s;if(this._weekdaysParseExact)return nt.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=f([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(s="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(s.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},Yn.weekdaysRegex=function(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||rt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(a(this,"_weekdaysRegex")||(this._weekdaysRegex=Xe),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},Yn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||rt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(a(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=et),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},Yn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||rt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(a(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=tt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},Yn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},Yn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},pt("en",{eras:[{since:"0001-01-01",until:Infinity,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-Infinity,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===he(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),r.lang=k("moment.lang is deprecated. Use moment.locale instead.",pt),r.langData=k("moment.langData is deprecated. Use moment.localeData instead.",vt);var Nn=Math.abs;function An(e,t,n,r){var i=Jt(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function jn(e){return e<0?Math.floor(e):Math.ceil(e)}function Pn(e){return 4800*e/146097}function $n(e){return 146097*e/4800}function Vn(e){return function(){return this.as(e)}}var Rn=Vn("ms"),Wn=Vn("s"),Un=Vn("m"),In=Vn("h"),Ln=Vn("d"),Hn=Vn("w"),Gn=Vn("M"),zn=Vn("Q"),Zn=Vn("y"),qn=Rn;function Bn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Jn=Bn("milliseconds"),Qn=Bn("seconds"),Kn=Bn("minutes"),Xn=Bn("hours"),er=Bn("days"),tr=Bn("months"),nr=Bn("years"),rr=Math.round,ir={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function sr(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}var ar=Math.abs;function or(e){return(e>0)-(e<0)||+e}function ur(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,i,s,a,o,u=ar(this._milliseconds)/1e3,l=ar(this._days),c=ar(this._months),d=this.asSeconds();return d?(e=de(u/60),t=de(e/60),u%=60,e%=60,n=de(c/12),c%=12,r=u?u.toFixed(3).replace(/\.?0+$/,""):"",i=d<0?"-":"",s=or(this._months)!==or(d)?"-":"",a=or(this._days)!==or(d)?"-":"",o=or(this._milliseconds)!==or(d)?"-":"",i+"P"+(n?s+n+"Y":"")+(c?s+c+"M":"")+(l?a+l+"D":"")+(t||e||u?"T":"")+(t?o+t+"H":"")+(e?o+e+"M":"")+(u?o+r+"S":"")):"P0D"}var lr=Rt.prototype;return lr.isValid=function(){return this._isValid},lr.abs=function(){var e=this._data;return this._milliseconds=Nn(this._milliseconds),this._days=Nn(this._days),this._months=Nn(this._months),e.milliseconds=Nn(e.milliseconds),e.seconds=Nn(e.seconds),e.minutes=Nn(e.minutes),e.hours=Nn(e.hours),e.months=Nn(e.months),e.years=Nn(e.years),this},lr.add=function(e,t){return An(this,e,t,1)},lr.subtract=function(e,t){return An(this,e,t,-1)},lr.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=W(e))||"quarter"===e||"year"===e)switch(n=this._months+Pn(t=this._days+r/864e5),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round($n(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},lr.asMilliseconds=Rn,lr.asSeconds=Wn,lr.asMinutes=Un,lr.asHours=In,lr.asDays=Ln,lr.asWeeks=Hn,lr.asMonths=Gn,lr.asQuarters=zn,lr.asYears=Zn,lr.valueOf=qn,lr._bubble=function(){var e,t,n,r,i,s=this._milliseconds,a=this._days,o=this._months,u=this._data;return s>=0&&a>=0&&o>=0||s<=0&&a<=0&&o<=0||(s+=864e5*jn($n(o)+a),a=0,o=0),u.milliseconds=s%1e3,e=de(s/1e3),u.seconds=e%60,t=de(e/60),u.minutes=t%60,n=de(t/60),u.hours=n%24,a+=de(n/24),o+=i=de(Pn(a)),a-=jn($n(i)),r=de(o/12),o%=12,u.days=a,u.months=o,u.years=r,this},lr.clone=function(){return Jt(this)},lr.get=function(e){return e=W(e),this.isValid()?this[e+"s"]():NaN},lr.milliseconds=Jn,lr.seconds=Qn,lr.minutes=Kn,lr.hours=Xn,lr.days=er,lr.weeks=function(){return de(this.days()/7)},lr.months=tr,lr.years=nr,lr.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,i=!1,s=ir;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(i=e),"object"==typeof t&&(s=Object.assign({},ir,t),null!=t.s&&null==t.ss&&(s.ss=t.s-1)),r=function(e,t,n,r){var i=Jt(e).abs(),s=rr(i.as("s")),a=rr(i.as("m")),o=rr(i.as("h")),u=rr(i.as("d")),l=rr(i.as("M")),c=rr(i.as("w")),d=rr(i.as("y")),h=s<=n.ss&&["s",s]||s<n.s&&["ss",s]||a<=1&&["m"]||a<n.m&&["mm",a]||o<=1&&["h"]||o<n.h&&["hh",o]||u<=1&&["d"]||u<n.d&&["dd",u];return null!=n.w&&(h=h||c<=1&&["w"]||c<n.w&&["ww",c]),(h=h||l<=1&&["M"]||l<n.M&&["MM",l]||d<=1&&["y"]||["yy",d])[2]=t,h[3]=+e>0,h[4]=r,sr.apply(null,h)}(this,!i,s,n=this.localeData()),i&&(r=n.pastFuture(+this,r)),n.postformat(r)},lr.toISOString=ur,lr.toString=ur,lr.toJSON=ur,lr.locale=an,lr.localeData=un,lr.toIsoString=k("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ur),lr.lang=on,j("X",0,0,"unix"),j("x",0,0,"valueOf"),ue("x",ne),ue("X",/[+-]?\d+(\.\d{1,3})?/),me("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e))}),me("x",function(e,t,n){n._d=new Date(he(e))}),r.version="2.30.1",t=At,r.fn=Tn,r.min=function(){return $t("isBefore",[].slice.call(arguments,0))},r.max=function(){return $t("isAfter",[].slice.call(arguments,0))},r.now=function(){return Date.now?Date.now():+new Date},r.utc=f,r.unix=function(e){return At(1e3*e)},r.months=function(e,t){return En(e,t,"months")},r.isDate=c,r.locale=pt,r.invalid=y,r.duration=Jt,r.isMoment=b,r.weekdays=function(e,t,n){return Cn(e,t,n,"weekdays")},r.parseZone=function(){return At.apply(null,arguments).parseZone()},r.localeData=vt,r.isDuration=Wt,r.monthsShort=function(e,t){return En(e,t,"monthsShort")},r.weekdaysMin=function(e,t,n){return Cn(e,t,n,"weekdaysMin")},r.defineLocale=yt,r.updateLocale=function(e,t){if(null!=t){var n,r,i=lt;null!=ct[e]&&null!=ct[e].parentLocale?ct[e].set(M(ct[e]._config,t)):(null!=(r=mt(e))&&(i=r._config),t=M(i,t),null==r&&(t.abbr=e),(n=new Y(t)).parentLocale=ct[e],ct[e]=n),pt(e)}else null!=ct[e]&&(null!=ct[e].parentLocale?(ct[e]=ct[e].parentLocale,e===pt()&&pt(e)):null!=ct[e]&&delete ct[e]);return ct[e]},r.locales=function(){return S(ct)},r.weekdaysShort=function(e,t,n){return Cn(e,t,n,"weekdaysShort")},r.normalizeUnits=W,r.relativeTimeRounding=function(e){return void 0===e?rr:"function"==typeof e&&(rr=e,!0)},r.relativeTimeThreshold=function(e,t){return void 0!==ir[e]&&(void 0===t?ir[e]:(ir[e]=t,"s"===e&&(ir.ss=t-1),!0))},r.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},r.prototype=Tn,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r}()},F(E={exports:{}}),E.exports),N=function(e){return e.finishedAt&&e.startedAt?Math.abs(C(e.startedAt).diff(C(e.finishedAt),"seconds")):Math.abs(C().diff(C(e.startedAt),"seconds"))},A=function(n){var i,s=n.companyConfig,a=n.workplace,l=n.statusChange,c=e.useState({id:"last_status_change_"+a.id,workplaceId:a.id,metricId:"last_status_change",type:t.MetricTypeEnum.Kpi,statusColor:(null==l?void 0:l.reason.statusColor)||t.AndonLightColor.Gray,textValue:l?N(l).toString():"0",unit:t.MetricUnitEnum.Duration,active:!0}),d=c[0],h=c[1],f=r.useTranslation().t,m=null==s?void 0:s.workplacesConfigs.find(function(e){return e.workplaceId===a.id}),p=f(null!=m&&m.orderConfig.alternativeName?"AlternativeOrder":"Order"),y=null==l||null==(i=l.order)?void 0:i.number;return e.useEffect(function(){var e;return l&&(h(function(e){return u({},e,{statusColor:l.reason.statusColor,textValue:N(l).toString()})}),l.finishedAt||(e=setInterval(function(){h(function(e){return u({},e,{statusColor:l.reason.statusColor,textValue:N(l).toString()})})},1e4))),function(){e&&clearInterval(e)}},[l]),o.default.createElement(t.MetricCard,{title:a.name,metricLabel:(null==l?void 0:l.reason.name)||"",metricValue:d,extraValue:p+": "+(y||"-"),animateBackgroundColor:null==l?void 0:l.reason.temporary,rounded:!0})},j=function(t){var n=t.data,r=t.settings,s=e.useState([]),a=s[0],u=s[1];return e.useEffect(function(){var e=(null==r?void 0:r.workplacesIds)||[],t=(null==r?void 0:r.statusColors)||[],i=function(e){return((null==n?void 0:n.statusChanges)||[]).filter(function(t){return t.workplaceId===e.id}).sort(function(e,t){return new Date(e.startedAt).getTime()-new Date(t.startedAt).getTime()}).pop()};u((n.workplaces||[]).filter(function(t){return!e.length||-1!==e.indexOf(t.id)}).map(function(e){return{workplace:e,statusChange:i(e)}}).filter(function(e){var n;return!t.length||-1!==t.indexOf((null==(n=e.statusChange)?void 0:n.reason.statusColor)||"")}).sort(function(e,n){var r,i,s=null==(r=e.statusChange)?void 0:r.reason.statusColor,a=null==(i=n.statusChange)?void 0:i.reason.statusColor;return s&&a?t.indexOf(s)-t.indexOf(a):s?-1:1}))},[n,r]),o.default.createElement(i.List,{sx:{display:"flex",height:"100%","&:last-child":{marginRight:"10px"}}},a.slice(0,6).map(function(e){var t=e.workplace;return o.default.createElement(i.ListItem,{key:t.id,sx:{minWidth:"15.5vw",marginLeft:"10px",padding:0}},o.default.createElement(A,{companyConfig:n.companyConfig,workplace:t,statusChange:e.statusChange}))}))};function P(e){this._maxSize=e,this.clear()}P.prototype.clear=function(){this._size=0,this._values=Object.create(null)},P.prototype.get=function(e){return this._values[e]},P.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var $=/[^.^\]^[]+|(?=\[\]|\.\.)/g,V=/^\d+$/,R=/^\d/,W=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,U=/^\s*(['"]?)(.*?)(\1)\s*$/,I=new P(512),L=new P(512),H=new P(512),G={Cache:P,split:Z,normalizePath:z,setter:function(e){var t=z(e);return L.get(e)||L.set(e,function(e,n){for(var r=0,i=t.length,s=e;r<i-1;){var a=t[r];if("__proto__"===a||"constructor"===a||"prototype"===a)return e;s=s[t[r++]]}s[t[r]]=n})},getter:function(e,t){var n=z(e);return H.get(e)||H.set(e,function(e){for(var r=0,i=n.length;r<i;){if(null==e&&t)return;e=e[n[r++]]}return e})},join:function(e){return e.reduce(function(e,t){return e+(q(t)||V.test(t)?"["+t+"]":(e?".":"")+t)},"")},forEach:function(e,t,n){!function(e,t,n){var r,i,s,a,o=e.length;for(i=0;i<o;i++)(r=e[i])&&(B(r)&&(r='"'+r+'"'),s=!(a=q(r))&&/^\d+$/.test(r),t.call(n,r,a,s,i,e))}(Array.isArray(e)?e:Z(e),t,n)}};function z(e){return I.get(e)||I.set(e,Z(e).map(function(e){return e.replace(U,"$2")}))}function Z(e){return e.match($)||[""]}function q(e){return"string"==typeof e&&e&&-1!==["'",'"'].indexOf(e.charAt(0))}function B(e){return!q(e)&&(function(e){return e.match(R)&&!e.match(V)}(e)||function(e){return W.test(e)}(e))}const J=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,Q=e=>e.match(J)||[];var K=e=>Q(e).reduce((e,t)=>`${e}${e?t[0].toUpperCase()+t.slice(1).toLowerCase():t.toLowerCase()}`,""),X=e=>(e=>Q(e).join("_").toLowerCase())(e),ee=function(e){return te(function(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var i=e[n];t.add(i[0]),t.add(i[1])}return Array.from(t)}(e),e)};function te(e,t){var n=e.length,r=new Array(n),i={},s=n,a=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var i=e[n];t.has(i[0])||t.set(i[0],new Set),t.has(i[1])||t.set(i[1],new Set),t.get(i[0]).add(i[1])}return t}(t),o=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}(e);for(t.forEach(function(e){if(!o.has(e[0])||!o.has(e[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});s--;)i[s]||u(e[s],s,new Set);return r;function u(e,t,s){if(s.has(e)){var l;try{l=", node was:"+JSON.stringify(e)}catch(e){l=""}throw new Error("Cyclic dependency"+l)}if(!o.has(e))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(e));if(!i[t]){i[t]=!0;var c=a.get(e)||new Set;if(t=(c=Array.from(c)).length){s.add(e);do{var d=c[--t];u(d,o.get(d),s)}while(t);s.delete(e)}r[--n]=e}}}ee.array=te;const ne=Object.prototype.toString,re=Error.prototype.toString,ie=RegExp.prototype.toString,se="undefined"!=typeof Symbol?Symbol.prototype.toString:()=>"",ae=/^Symbol\((.*)\)(.*)$/;function oe(e,t=!1){if(null==e||!0===e||!1===e)return""+e;const n=typeof e;if("number"===n)return function(e){return e!=+e?"NaN":0===e&&1/e<0?"-0":""+e}(e);if("string"===n)return t?`"${e}"`:e;if("function"===n)return"[Function "+(e.name||"anonymous")+"]";if("symbol"===n)return se.call(e).replace(ae,"Symbol($1)");const r=ne.call(e).slice(8,-1);return"Date"===r?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===r||e instanceof Error?"["+re.call(e)+"]":"RegExp"===r?ie.call(e):null}function ue(e,t){let n=oe(e,t);return null!==n?n:JSON.stringify(e,function(e,n){let r=oe(this[e],t);return null!==r?r:n},2)}function le(e){return null==e?[]:[].concat(e)}let ce,de,he,fe=/\$\{\s*(\w+)\s*\}/g;ce=Symbol.toStringTag;class me{constructor(e,t,n,r){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[ce]="Error",this.name="ValidationError",this.value=t,this.path=n,this.type=r,this.errors=[],this.inner=[],le(e).forEach(e=>{pe.isError(e)?(this.errors.push(...e.errors),this.inner.push(...e.inner.length?e.inner:[e])):this.errors.push(e)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}de=Symbol.hasInstance,he=Symbol.toStringTag;class pe extends Error{static formatError(e,t){return t=Object.assign({},t,{path:t.label||t.path||"this",originalPath:t.path}),"string"==typeof e?e.replace(fe,(e,n)=>ue(t[n])):"function"==typeof e?e(t):e}static isError(e){return e&&"ValidationError"===e.name}constructor(e,t,n,r,i){const s=new me(e,t,n,r);if(i)return s;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[he]="Error",this.name=s.name,this.message=s.message,this.type=s.type,this.value=s.value,this.path=s.path,this.errors=s.errors,this.inner=s.inner,Error.captureStackTrace&&Error.captureStackTrace(this,pe)}static[de](e){return me[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let ye={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const i=null!=r&&r!==n?` (cast from the value \`${ue(r,!0)}\`).`:".";return"mixed"!==t?`${e} must be a \`${t}\` type, but the final value was: \`${ue(n,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${ue(n,!0)}\``+i}},ve={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},ge={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},_e={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},we={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},be={notType:e=>{const{path:t,value:n,spec:r}=e,i=r.types.length;if(Array.isArray(n)){if(n.length<i)return`${t} tuple value has too few items, expected a length of ${i} but got ${n.length} for value: \`${ue(n,!0)}\``;if(n.length>i)return`${t} tuple value has too many items, expected a length of ${i} but got ${n.length} for value: \`${ue(n,!0)}\``}return pe.formatError(ye.notType,e)}};var xe=Object.assign(Object.create(null),{mixed:ye,string:ve,number:{min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},date:ge,object:_e,array:we,boolean:{isValue:"${path} field must be ${value}"},tuple:be});const ke=e=>e&&e.__isYupSchema__;class Se{static fromOptions(e,t){if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:r,otherwise:i}=t,s="function"==typeof n?n:(...e)=>e.every(e=>e===n);return new Se(e,(e,t)=>{var n;let a=s(...e)?r:i;return null!=(n=null==a?void 0:a(t))?n:t})}constructor(e,t){this.fn=void 0,this.refs=e,this.refs=e,this.fn=t}resolve(e,t){let n=this.refs.map(e=>e.getValue(null==t?void 0:t.value,null==t?void 0:t.parent,null==t?void 0:t.context)),r=this.fn(n,e,t);if(void 0===r||r===e)return e;if(!ke(r))throw new TypeError("conditions must return a schema object");return r.resolve(t)}}class De{constructor(e,t={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,"string"!=typeof e)throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),""===e)throw new TypeError("ref must be a non-empty string");this.isContext="$"===this.key[0],this.isValue="."===this.key[0],this.isSibling=!this.isContext&&!this.isValue,this.path=this.key.slice((this.isContext?"$":this.isValue?".":"").length),this.getter=this.path&&G.getter(this.path,!0),this.map=t.map}getValue(e,t,n){let r=this.isContext?n:this.isValue?e:t;return this.getter&&(r=this.getter(r||{})),this.map&&(r=this.map(r)),r}cast(e,t){return this.getValue(e,null==t?void 0:t.parent,null==t?void 0:t.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}De.prototype.__isYupRef=!0;const Oe=e=>null==e;function Te(e){function t({value:t,path:n="",options:r,originalValue:i,schema:s},a,o){const{name:u,test:l,params:c,message:d,skipAbsent:h}=e;let{parent:f,context:m,abortEarly:p=s.spec.abortEarly,disableStackTrace:y=s.spec.disableStackTrace}=r;const v={value:t,parent:f,context:m};function g(e={}){const r=Me(Object.assign({value:t,originalValue:i,label:s.spec.label,path:e.path||n,spec:s.spec,disableStackTrace:e.disableStackTrace||y},c,e.params),v),a=new pe(pe.formatError(e.message||d,r),t,r.path,e.type||u,r.disableStackTrace);return a.params=r,a}const _=p?a:o;let w={path:n,parent:f,type:u,from:r.from,createError:g,resolve:e=>Ye(e,v),options:r,originalValue:i,schema:s};const b=e=>{pe.isError(e)?_(e):e?o(null):_(g())},x=e=>{pe.isError(e)?_(e):a(e)};if(h&&Oe(t))return b(!0);let k;try{var S;if(k=l.call(w,t,w),"function"==typeof(null==(S=k)?void 0:S.then)){if(r.sync)throw new Error(`Validation test of type: "${w.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(k).then(b,x)}}catch(e){return void x(e)}b(k)}return t.OPTIONS=e,t}function Me(e,t){if(!e)return e;for(const n of Object.keys(e))e[n]=Ye(e[n],t);return e}function Ye(e,t){return De.isRef(e)?e.getValue(t.value,t.parent,t.context):e}function Fe(e,t,n,r=n){let i,s,a;return t?(G.forEach(t,(o,u,l)=>{let c=u?o.slice(1,o.length-1):o,d="tuple"===(e=e.resolve({context:r,parent:i,value:n})).type,h=l?parseInt(c,10):0;if(e.innerType||d){if(d&&!l)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${a}" must contain an index to the tuple element, e.g. "${a}[0]"`);if(n&&h>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${o}, in the path: ${t}. because there is no value at that index. `);i=n,n=n&&n[h],e=d?e.spec.types[h]:e.innerType}if(!l){if(!e.fields||!e.fields[c])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${a} which is a type: "${e.type}")`);i=n,n=n&&n[c],e=e.fields[c]}s=c,a=u?"["+o+"]":"."+o}),{schema:e,parent:i,parentPath:s}):{parent:i,parentPath:t,schema:e}}class Ee extends Set{describe(){const e=[];for(const t of this.values())e.push(De.isRef(t)?t.describe():t);return e}resolveAll(e){let t=[];for(const n of this.values())t.push(e(n));return t}clone(){return new Ee(this.values())}merge(e,t){const n=this.clone();return e.forEach(e=>n.add(e)),t.forEach(e=>n.delete(e)),n}}function Ce(e,t=new Map){if(ke(e)||!e||"object"!=typeof e)return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r<e.length;r++)n[r]=Ce(e[r],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[r,i]of e.entries())n.set(r,Ce(i,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(Ce(r,t))}else{if(!(e instanceof Object))throw Error(`Unable to clone ${e}`);n={},t.set(e,n);for(const[r,i]of Object.entries(e))n[r]=Ce(i,t)}return n}function Ne(e){if(null==e||!e.length)return;const t=[];let n="",r=!1,i=!1;for(let s=0;s<e.length;s++){const a=e[s];"["!==a||i?"]"!==a||i?'"'!==a?"."!==a||r||i?n+=a:n&&(t.push(n),n=""):i=!i:(n&&(/^\d+$/.test(n)?t.push(n):t.push(n.replace(/^"|"$/g,"")),n=""),r=!1):(n&&(t.push(...n.split(".").filter(Boolean)),n=""),r=!0)}return n&&t.push(...n.split(".").filter(Boolean)),t}function Ae(e,t){var n;if((null==(n=e.inner)||!n.length)&&e.errors.length)return function(e,t){const n=t?`${t}.${e.path}`:e.path;return e.errors.map(e=>({message:e,path:Ne(n)}))}(e,t);const r=t?`${t}.${e.path}`:e.path;return e.inner.flatMap(e=>Ae(e,r))}class je{constructor(e){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new Ee,this._blacklist=new Ee,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(ye.notType)}),this.type=e.type,this._typeCheck=e.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},null==e?void 0:e.spec),this.withMutation(e=>{e.nonNullable()})}get _type(){return this.type}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const t=Object.create(Object.getPrototypeOf(this));return t.type=this.type,t._typeCheck=this._typeCheck,t._whitelist=this._whitelist.clone(),t._blacklist=this._blacklist.clone(),t.internalTests=Object.assign({},this.internalTests),t.exclusiveTests=Object.assign({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=Ce(Object.assign({},this.spec,e)),t}label(e){let t=this.clone();return t.spec.label=e,t}meta(...e){if(0===e.length)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}withMutation(e){let t=this._mutate;this._mutate=!0;let n=e(this);return this._mutate=t,n}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&"mixed"!==this.type)throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let t=this,n=e.clone();const r=Object.assign({},t.spec,n.spec);return n.spec=r,n.internalTests=Object.assign({},t.internalTests,n.internalTests),n._whitelist=t._whitelist.merge(e._whitelist,e._blacklist),n._blacklist=t._blacklist.merge(e._blacklist,e._whitelist),n.tests=t.tests,n.exclusiveTests=t.exclusiveTests,n.withMutation(t=>{e.tests.forEach(e=>{t.test(e.OPTIONS)})}),n.transforms=[...t.transforms,...n.transforms],n}isType(e){return null==e?!(!this.spec.nullable||null!==e)||!(!this.spec.optional||void 0!==e):this._typeCheck(e)}resolve(e){let t=this;if(t.conditions.length){let n=t.conditions;t=t.clone(),t.conditions=[],t=n.reduce((t,n)=>n.resolve(t,e),t),t=t.resolve(e)}return t}resolveOptions(e){var t,n,r,i;return Object.assign({},e,{from:e.from||[],strict:null!=(t=e.strict)?t:this.spec.strict,abortEarly:null!=(n=e.abortEarly)?n:this.spec.abortEarly,recursive:null!=(r=e.recursive)?r:this.spec.recursive,disableStackTrace:null!=(i=e.disableStackTrace)?i:this.spec.disableStackTrace})}cast(e,t={}){let n=this.resolve(Object.assign({value:e},t)),r="ignore-optionality"===t.assert,i=n._cast(e,t);if(!1!==t.assert&&!n.isType(i)){if(r&&Oe(i))return i;let s=ue(e),a=ue(i);throw new TypeError(`The value of ${t.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}". \n\nattempted value: ${s} \n`+(a!==s?`result of cast: ${a}`:""))}return i}_cast(e,t){let n=void 0===e?e:this.transforms.reduce((t,n)=>n.call(this,t,e,this),e);return void 0===n&&(n=this.getDefault(t)),n}_validate(e,t={},n,r){let{path:i,originalValue:s=e,strict:a=this.spec.strict}=t,o=e;a||(o=this._cast(o,Object.assign({assert:!1},t)));let u=[];for(let e of Object.values(this.internalTests))e&&u.push(e);this.runTests({path:i,value:o,originalValue:s,options:t,tests:u},n,e=>{if(e.length)return r(e,o);this.runTests({path:i,value:o,originalValue:s,options:t,tests:this.tests},n,r)})}runTests(e,t,n){let r=!1,{tests:i,value:s,originalValue:a,path:o,options:u}=e,l=e=>{r||(r=!0,t(e,s))},c=e=>{r||(r=!0,n(e,s))},d=i.length,h=[];if(!d)return c([]);let f={value:s,originalValue:a,path:o,options:u,schema:this};for(let e=0;e<i.length;e++)(0,i[e])(f,l,function(e){e&&(Array.isArray(e)?h.push(...e):h.push(e)),--d<=0&&c(h)})}asNestedTest({key:e,index:t,parent:n,parentPath:r,originalParent:i,options:s}){const a=null!=e?e:t;if(null==a)throw TypeError("Must include `key` or `index` for nested validations");const o="number"==typeof a;let u=n[a];const l=Object.assign({},s,{strict:!0,parent:n,value:u,originalValue:i[a],key:void 0,[o?"index":"key"]:a,path:o||a.includes(".")?`${r||""}[${o?a:`"${a}"`}]`:(r?`${r}.`:"")+e});return(e,t,n)=>this.resolve(l)._validate(u,l,t,n)}validate(e,t){var n;let r=this.resolve(Object.assign({},t,{value:e})),i=null!=(n=null==t?void 0:t.disableStackTrace)?n:r.spec.disableStackTrace;return new Promise((n,s)=>r._validate(e,t,(e,t)=>{pe.isError(e)&&(e.value=t),s(e)},(e,t)=>{e.length?s(new pe(e,t,void 0,void 0,i)):n(t)}))}validateSync(e,t){var n;let r,i=this.resolve(Object.assign({},t,{value:e})),s=null!=(n=null==t?void 0:t.disableStackTrace)?n:i.spec.disableStackTrace;return i._validate(e,Object.assign({},t,{sync:!0}),(e,t)=>{throw pe.isError(e)&&(e.value=t),e},(t,n)=>{if(t.length)throw new pe(t,e,void 0,void 0,s);r=n}),r}isValid(e,t){return this.validate(e,t).then(()=>!0,e=>{if(pe.isError(e))return!1;throw e})}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(e){if(pe.isError(e))return!1;throw e}}_getDefault(e){let t=this.spec.default;return null==t?t:"function"==typeof t?t.call(this,e):Ce(t)}getDefault(e){return this.resolve(e||{})._getDefault(e)}default(e){return 0===arguments.length?this._getDefault():this.clone({default:e})}strict(e=!0){return this.clone({strict:e})}nullability(e,t){const n=this.clone({nullable:e});return n.internalTests.nullable=Te({message:t,name:"nullable",test(e){return null!==e||this.schema.spec.nullable}}),n}optionality(e,t){const n=this.clone({optional:e});return n.internalTests.optionality=Te({message:t,name:"optionality",test(e){return void 0!==e||this.schema.spec.optional}}),n}optional(){return this.optionality(!0)}defined(e=ye.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=ye.notNull){return this.nullability(!1,e)}required(e=ye.required){return this.clone().withMutation(t=>t.nonNullable(e).defined(e))}notRequired(){return this.clone().withMutation(e=>e.nullable().optional())}transform(e){let t=this.clone();return t.transforms.push(e),t}test(...e){let t;if(t=1===e.length?"function"==typeof e[0]?{test:e[0]}:e[0]:2===e.length?{name:e[0],test:e[1]}:{name:e[0],message:e[1],test:e[2]},void 0===t.message&&(t.message=ye.default),"function"!=typeof t.test)throw new TypeError("`test` is a required parameters");let n=this.clone(),r=Te(t),i=t.exclusive||t.name&&!0===n.exclusiveTests[t.name];if(t.exclusive&&!t.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(n.exclusiveTests[t.name]=!!t.exclusive),n.tests=n.tests.filter(e=>{if(e.OPTIONS.name===t.name){if(i)return!1;if(e.OPTIONS.test===r.OPTIONS.test)return!1}return!0}),n.tests.push(r),n}when(e,t){Array.isArray(e)||"string"==typeof e||(t=e,e=".");let n=this.clone(),r=le(e).map(e=>new De(e));return r.forEach(e=>{e.isSibling&&n.deps.push(e.key)}),n.conditions.push("function"==typeof t?new Se(r,t):Se.fromOptions(r,t)),n}typeError(e){let t=this.clone();return t.internalTests.typeError=Te({message:e,name:"typeError",skipAbsent:!0,test(e){return!!this.schema._typeCheck(e)||this.createError({params:{type:this.schema.type}})}}),t}oneOf(e,t=ye.oneOf){let n=this.clone();return e.forEach(e=>{n._whitelist.add(e),n._blacklist.delete(e)}),n.internalTests.whiteList=Te({message:t,name:"oneOf",skipAbsent:!0,test(e){let t=this.schema._whitelist,n=t.resolveAll(this.resolve);return!!n.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:n}})}}),n}notOneOf(e,t=ye.notOneOf){let n=this.clone();return e.forEach(e=>{n._blacklist.add(e),n._whitelist.delete(e)}),n.internalTests.blacklist=Te({message:t,name:"notOneOf",test(e){let t=this.schema._blacklist,n=t.resolveAll(this.resolve);return!n.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:n}})}}),n}strip(e=!0){let t=this.clone();return t.spec.strip=e,t}describe(e){const t=(e?this.resolve(e):this).clone(),{label:n,meta:r,optional:i,nullable:s}=t.spec,a={meta:r,label:n,optional:i,nullable:s,default:t.getDefault(e),type:t.type,oneOf:t._whitelist.describe(),notOneOf:t._blacklist.describe(),tests:t.tests.filter((e,t,n)=>n.findIndex(t=>t.OPTIONS.name===e.OPTIONS.name)===t).map(t=>{const n=t.OPTIONS.params&&e?Me(Object.assign({},t.OPTIONS.params),e):t.OPTIONS.params;return{name:t.OPTIONS.name,params:n}})};return a}get"~standard"(){const e=this;return{version:1,vendor:"yup",async validate(t){try{return{value:await e.validate(t,{abortEarly:!1})}}catch(e){if(e instanceof pe)return{issues:Ae(e)};throw e}}}}}je.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])je.prototype[`${e}At`]=function(t,n,r={}){const{parent:i,parentPath:s,schema:a}=Fe(this,t,n,r.context);return a[e](i&&i[s],Object.assign({},r,{parent:i,path:t}))};for(const e of["equals","is"])je.prototype[e]=je.prototype.oneOf;for(const e of["not","nope"])je.prototype[e]=je.prototype.notOneOf;const Pe=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function $e(e){var t,n;const r=Pe.exec(e);return r?{year:Ve(r[1]),month:Ve(r[2],1)-1,day:Ve(r[3],1),hour:Ve(r[4]),minute:Ve(r[5]),second:Ve(r[6]),millisecond:r[7]?Ve(r[7].substring(0,3)):0,precision:null!=(t=null==(n=r[7])?void 0:n.length)?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:Ve(r[10]),minuteOffset:Ve(r[11])}:null}function Ve(e,t=0){return Number(e)||t}let Re=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,We=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,Ue=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Ie=new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"),Le=e=>Oe(e)||e===e.trim(),He={}.toString();function Ge(){return new ze}class ze extends je{constructor(){super({type:"string",check:e=>(e instanceof String&&(e=e.valueOf()),"string"==typeof e)}),this.withMutation(()=>{this.transform((e,t,n)=>{if(!n.spec.coerce||n.isType(e))return e;if(Array.isArray(e))return e;const r=null!=e&&e.toString?e.toString():e;return r===He?e:r})})}required(e){return super.required(e).withMutation(t=>t.test({message:e||ye.required,name:"required",skipAbsent:!0,test:e=>!!e.length}))}notRequired(){return super.notRequired().withMutation(e=>(e.tests=e.tests.filter(e=>"required"!==e.OPTIONS.name),e))}length(e,t=ve.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(t){return t.length===this.resolve(e)}})}min(e,t=ve.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t.length>=this.resolve(e)}})}max(e,t=ve.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}matches(e,t){let n,r,i=!1;return t&&("object"==typeof t?({excludeEmptyString:i=!1,message:n,name:r}=t):n=t),this.test({name:r||"matches",message:n||ve.matches,params:{regex:e},skipAbsent:!0,test:t=>""===t&&i||-1!==t.search(e)})}email(e=ve.email){return this.matches(Re,{name:"email",message:e,excludeEmptyString:!0})}url(e=ve.url){return this.matches(We,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=ve.uuid){return this.matches(Ue,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let t,n,r="";return e&&("object"==typeof e?({message:r="",allowOffset:t=!1,precision:n}=e):r=e),this.matches(Ie,{name:"datetime",message:r||ve.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||ve.datetime_offset,params:{allowOffset:t},skipAbsent:!0,test:e=>{if(!e||t)return!0;const n=$e(e);return!!n&&!!n.z}}).test({name:"datetime_precision",message:r||ve.datetime_precision,params:{precision:n},skipAbsent:!0,test:e=>{if(!e||null==n)return!0;const t=$e(e);return!!t&&t.precision===n}})}ensure(){return this.default("").transform(e=>null===e?"":e)}trim(e=ve.trim){return this.transform(e=>null!=e?e.trim():e).test({message:e,name:"trim",test:Le})}lowercase(e=ve.lowercase){return this.transform(e=>Oe(e)?e:e.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>Oe(e)||e===e.toLowerCase()})}uppercase(e=ve.uppercase){return this.transform(e=>Oe(e)?e:e.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>Oe(e)||e===e.toUpperCase()})}}Ge.prototype=ze.prototype;let Ze=new Date("");class qe extends je{constructor(){super({type:"date",check:e=>"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e.getTime())}),this.withMutation(()=>{this.transform((e,t,n)=>!n.spec.coerce||n.isType(e)||null===e?e:(e=function(e){const t=$e(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(void 0===t.z&&void 0===t.plusMinus)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return"Z"!==t.z&&void 0!==t.plusMinus&&(n=60*t.hourOffset+t.minuteOffset,"+"===t.plusMinus&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}(e),isNaN(e)?qe.INVALID_DATE:new Date(e)))})}prepareParam(e,t){let n;if(De.isRef(e))n=e;else{let r=this.cast(e);if(!this._typeCheck(r))throw new TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);n=r}return n}min(e,t=ge.min){let n=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(e){return e>=this.resolve(n)}})}max(e,t=ge.max){let n=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(e){return e<=this.resolve(n)}})}}function Be(e,t){let n=Infinity;return e.some((e,r)=>{var i;if(null!=(i=t.path)&&i.includes(e))return n=r,!0}),n}function Je(e){return(t,n)=>Be(e,t)-Be(e,n)}qe.INVALID_DATE=Ze;const Qe=(e,t,n)=>{if("string"!=typeof e)return e;let r=e;try{r=JSON.parse(e)}catch(e){}return n.isType(r)?r:e};function Ke(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=Ke(r);return e.setFields(t)}if("array"===e.type){const t=e.optional();return t.innerType&&(t.innerType=Ke(t.innerType)),t}return"tuple"===e.type?e.optional().clone({types:e.spec.types.map(Ke)}):"optional"in e?e.optional():e}let Xe=e=>"[object Object]"===Object.prototype.toString.call(e);function et(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(e=>-1===n.indexOf(e))}const tt=Je([]);function nt(e){return new rt(e)}class rt extends je{constructor(e){super({type:"object",check:e=>Xe(e)||"function"==typeof e}),this.fields=Object.create(null),this._sortErrors=tt,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{e&&this.shape(e)})}_cast(e,t={}){var n;let r=super._cast(e,t);if(void 0===r)return this.getDefault(t);if(!this._typeCheck(r))return r;let i=this.fields,s=null!=(n=t.stripUnknown)?n:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(r).filter(e=>!this._nodes.includes(e))),o={},u=Object.assign({},t,{parent:o,__validating:t.__validating||!1}),l=!1;for(const e of a){let n=i[e],a=e in r;if(n){let i,s=r[e];u.path=(t.path?`${t.path}.`:"")+e,n=n.resolve({value:s,context:t.context,parent:o});let a=n instanceof je?n.spec:void 0,c=null==a?void 0:a.strict;if(null!=a&&a.strip){l=l||e in r;continue}i=t.__validating&&c?r[e]:n.cast(r[e],u),void 0!==i&&(o[e]=i)}else a&&!s&&(o[e]=r[e]);a===e in o&&o[e]===r[e]||(l=!0)}return l?o:r}_validate(e,t={},n,r){let{from:i=[],originalValue:s=e,recursive:a=this.spec.recursive}=t;t.from=[{schema:this,value:s},...i],t.__validating=!0,t.originalValue=s,super._validate(e,t,n,(e,i)=>{if(!a||!Xe(i))return void r(e,i);s=s||i;let o=[];for(let e of this._nodes){let n=this.fields[e];n&&!De.isRef(n)&&o.push(n.asNestedTest({options:t,key:e,parent:i,parentPath:t.path,originalParent:s}))}this.runTests({tests:o,value:i,originalValue:s,options:t},n,t=>{r(t.sort(this._sortErrors).concat(e),i)})})}clone(e){const t=super.clone(e);return t.fields=Object.assign({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(e){let t=super.concat(e),n=t.fields;for(let[e,t]of Object.entries(this.fields)){const r=n[e];n[e]=void 0===r?t:r}return t.withMutation(t=>t.setFields(n,[...this._excludedEdges,...e._excludedEdges]))}_getDefault(e){if("default"in this.spec)return super._getDefault(e);if(!this._nodes.length)return;let t={};return this._nodes.forEach(n=>{var r;const i=this.fields[n];let s=e;null!=(r=s)&&r.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[n]})),t[n]=i&&"getDefault"in i?i.getDefault(s):void 0}),t}setFields(e,t){let n=this.clone();return n.fields=e,n._nodes=function(e,t=[]){let n=[],r=new Set,i=new Set(t.map(([e,t])=>`${e}-${t}`));function s(e,t){let s=G.split(e)[0];r.add(s),i.has(`${t}-${s}`)||n.push([t,s])}for(const t of Object.keys(e)){let n=e[t];r.add(t),De.isRef(n)&&n.isSibling?s(n.path,t):ke(n)&&"deps"in n&&n.deps.forEach(e=>s(e,t))}return ee.array(Array.from(r),n).reverse()}(e,t),n._sortErrors=Je(Object.keys(e)),t&&(n._excludedEdges=t),n}shape(e,t=[]){return this.clone().withMutation(n=>{let r=n._excludedEdges;return t.length&&(Array.isArray(t[0])||(t=[t]),r=[...n._excludedEdges,...t]),n.setFields(Object.assign(n.fields,e),r)})}partial(){const e={};for(const[t,n]of Object.entries(this.fields))e[t]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(e)}deepPartial(){return Ke(this)}pick(e){const t={};for(const n of e)this.fields[n]&&(t[n]=this.fields[n]);return this.setFields(t,this._excludedEdges.filter(([t,n])=>e.includes(t)&&e.includes(n)))}omit(e){const t=[];for(const n of Object.keys(this.fields))e.includes(n)||t.push(n);return this.pick(t)}from(e,t,n){let r=G.getter(e,!0);return this.transform(i=>{if(!i)return i;let s=i;return((e,t)=>{const n=[...G.normalizePath(t)];if(1===n.length)return n[0]in e;let r=n.pop(),i=G.getter(G.join(n),!0)(e);return!(!i||!(r in i))})(i,e)&&(s=Object.assign({},i),n||delete s[e],s[t]=r(i)),s})}json(){return this.transform(Qe)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||_e.exact,test(e){if(null==e)return!0;const t=et(this.schema,e);return 0===t.length||this.createError({params:{properties:t.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,t=_e.noUnknown){"boolean"!=typeof e&&(t=e,e=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:t,test(t){if(null==t)return!0;const n=et(this.schema,t);return!e||0===n.length||this.createError({params:{unknown:n.join(", ")}})}});return n.spec.noUnknown=e,n}unknown(e=!0,t=_e.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform(t=>{if(!t)return t;const n={};for(const r of Object.keys(t))n[e(r)]=t[r];return n})}camelCase(){return this.transformKeys(K)}snakeCase(){return this.transformKeys(X)}constantCase(){return this.transformKeys(e=>X(e).toUpperCase())}describe(e){const t=(e?this.resolve(e):this).clone(),n=super.describe(e);n.fields={};for(const[i,s]of Object.entries(t.fields)){var r;let t=e;null!=(r=t)&&r.value&&(t=Object.assign({},t,{parent:t.value,value:t.value[i]})),n.fields[i]=s.describe(t)}return n}}function it(e){return new st(e)}nt.prototype=rt.prototype;class st extends je{constructor(e){super({type:"array",spec:{types:e},check:e=>Array.isArray(e)}),this.innerType=void 0,this.innerType=e}_cast(e,t){const n=super._cast(e,t);if(!this._typeCheck(n)||!this.innerType)return n;let r=!1;const i=n.map((e,n)=>{const i=this.innerType.cast(e,Object.assign({},t,{path:`${t.path||""}[${n}]`}));return i!==e&&(r=!0),i});return r?i:n}_validate(e,t={},n,r){var i;let s=this.innerType,a=null!=(i=t.recursive)?i:this.spec.recursive;super._validate(e,t,n,(i,o)=>{var u;if(!a||!s||!this._typeCheck(o))return void r(i,o);let l=new Array(o.length);for(let n=0;n<o.length;n++){var c;l[n]=s.asNestedTest({options:t,index:n,parent:o,parentPath:t.path,originalParent:null!=(c=t.originalValue)?c:e})}this.runTests({value:o,tests:l,originalValue:null!=(u=t.originalValue)?u:e,options:t},n,e=>r(e.concat(i),o))})}clone(e){const t=super.clone(e);return t.innerType=this.innerType,t}json(){return this.transform(Qe)}concat(e){let t=super.concat(e);return t.innerType=this.innerType,e.innerType&&(t.innerType=t.innerType?t.innerType.concat(e.innerType):e.innerType),t}of(e){let t=this.clone();if(!ke(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+ue(e));return t.innerType=e,t.spec=Object.assign({},t.spec,{types:e}),t}length(e,t=we.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(t){return t.length===this.resolve(e)}})}min(e,t){return this.test({message:t=t||we.min,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t.length>=this.resolve(e)}})}max(e,t){return this.test({message:t=t||we.max,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}ensure(){return this.default(()=>[]).transform((e,t)=>this._typeCheck(e)?e:null==t?[]:[].concat(t))}compact(e){let t=e?(t,n,r)=>!e(t,n,r):e=>!!e;return this.transform(e=>null!=e?e.filter(t):e)}describe(e){const t=(e?this.resolve(e):this).clone(),n=super.describe(e);if(t.innerType){var r;let i=e;null!=(r=i)&&r.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[0]})),n.innerType=t.innerType.describe(i)}return n}}it.prototype=st.prototype;var at=function(e){var t;return t={mixed:{required:e("This field is required")}},Object.keys(t).forEach(e=>{Object.keys(t[e]).forEach(n=>{xe[e][n]=t[e][n]})}),{initialValues:{statusColors:[],workplacesIds:[]},validationSchema:nt({statusColors:it().of(Ge()).required(),workplacesIds:it().of(Ge()).required()})}},ot=["url","wsUrl","lang","data"];exports.Widget=function(r){var i=r.url,s=r.wsUrl,a=r.lang,l=r.data,c=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(r,ot),h=t.useGqlClients({url:i,wsUrl:s,lang:a}),m=h.graphqlSdk,_=h.gqlWsClient,w=e.useState(!1),b=w[0],x=w[1],k=e.useState(l),S=k[0],D=k[1];return e.useEffect(function(){!S&&m&&(m.companyConfig().then(function(e){var t=e.companyConfig;return D(function(e){return u({},e||{},{companyConfig:t})})}).catch(function(){}),m.listWorkplaces().then(function(e){var t=e.workplaces;return D(function(e){return u({},e||{},{workplaces:t})})}).catch(function(){}),m.listStatusChanges().then(function(e){var t=e.statusChanges;return D(function(e){return u({},e||{},{statusChanges:t})})}).catch(function(){})),null!=S&&S.workplaces&&_&&!b&&S.workplaces.forEach(function(e){var n=e.id;_.subscribe(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p,r=void 0,i=Array.isArray(e),s=[e],a=-1,o=[],u=void 0,l=void 0,c=void 0,h=[],m=[],g=e;do{var _=++a===s.length,w=_&&0!==o.length;if(_){if(l=0===m.length?void 0:h[h.length-1],u=c,c=m.pop(),w){if(i)u=u.slice();else{for(var b={},x=0,k=Object.keys(u);x<k.length;x++){var S=k[x];b[S]=u[S]}u=b}for(var D=0,O=0;O<o.length;O++){var T=o[O][0],M=o[O][1];i&&(T-=D),i&&null===M?(u.splice(T,1),D++):u[T]=M}}a=r.index,s=r.keys,o=r.edits,i=r.inArray,r=r.prev}else{if(l=c?i?a:s[a]:void 0,null==(u=c?c[l]:g))continue;c&&h.push(l)}var Y,F=void 0;if(!Array.isArray(u)){if(!d(u))throw new Error("Invalid AST Node: ".concat(f(u),"."));var E=v(t,u.kind,_);if(E){if((F=E.call(t,u,l,c,h,m))===y)break;if(!1===F){if(!_){h.pop();continue}}else if(void 0!==F&&(o.push([l,F]),!_)){if(!d(F)){h.pop();continue}u=F}}}void 0===F&&w&&o.push([l,u]),_?h.pop():(r={inArray:i,index:a,keys:s,edits:o,prev:r},s=(i=Array.isArray(u))?u:null!==(Y=n[u.kind])&&void 0!==Y?Y:[],a=-1,o=[],c&&m.push(c),c=u)}while(void 0!==r);return 0!==o.length&&(g=o[o.length-1][1]),g}(t.WorkplaceEventDocument,{leave:g}),{id:n},function(e){var n=e.event,r=e.subject;if(n===t.WorkplaceEvent.StatusChangeCreated){var i=r;D(function(e){return u({},e||{},{statusChanges:[i].concat(e.statusChanges)})})}else if(n===t.WorkplaceEvent.StatusChangeUpdated){var s=r;D(function(e){var t=e.statusChanges.map(function(e){return e.id===s.id?s:e});return u({},e||{},{statusChanges:t})})}}),x(!0)})},[l,m,_,b,S]),o.default.createElement(n.BaseWidget,u({lang:a,locales:O,data:S,gqlClients:{graphqlSdk:m,gqlWsClient:_},WidgetView:j,getSettingsFormProps:at,SettingsFormContent:Y,version:T,"data-testid":"workplaces-status-widget"},c))},exports.getDisplayName=function(e){switch(e){case"en":return"Workplaces statuses";case"pl":return"Statusy stanowisk";default:return"workplaces-status-widget"}},exports.permissions=[],exports.version=T;
1
+ var e=require("react"),t=require("andoncloud-dashboard-toolkit"),n=require("andoncloud-widget-base"),r=require("react-i18next"),i=require("@mui/material"),s=require("andoncloud-sdk");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=/*#__PURE__*/a(e);function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(null,arguments)}var l="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;function c(e){var t=e.prototype.toJSON;"function"==typeof t||function(){if(!Boolean(0))throw new Error("Unexpected invariant triggered.")}(),e.prototype.inspect=t,l&&(e.prototype[l]=t)}function d(e){return null!=e&&"string"==typeof e.kind}function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function f(e){return m(e,[])}function m(e,t){switch(h(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return null===e?"null":function(e,t){if(-1!==t.indexOf(e))return"[Circular]";var n=[].concat(t,[e]),r=function(e){var t=e[String(l)];return"function"==typeof t?t:"function"==typeof e.inspect?e.inspect:void 0}(e);if(void 0!==r){var i=r.call(e);if(i!==e)return"string"==typeof i?i:m(i,n)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";for(var n=Math.min(10,e.length),r=e.length-n,i=[],s=0;s<n;++s)i.push(m(e[s],t));return 1===r?i.push("... 1 more item"):r>1&&i.push("... ".concat(r," more items")),"["+i.join(", ")+"]"}(e,n);return function(e,t){var n=Object.keys(e);return 0===n.length?"{}":t.length>2?"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){var n=e.constructor.name;if("string"==typeof n&&""!==n)return n}return t}(e)+"]":"{ "+n.map(function(n){return n+": "+m(e[n],t)}).join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}c(/*#__PURE__*/function(){function e(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}return e.prototype.toJSON=function(){return{start:this.start,end:this.end}},e}()),c(/*#__PURE__*/function(){function e(e,t,n,r,i,s,a){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=a,this.prev=s,this.next=null}return e.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}());var p={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},y=Object.freeze({});function v(e,t,n){var r=e[t];if(r){if(!n&&"function"==typeof r)return r;var i=n?r.leave:r.enter;if("function"==typeof i)return i}else{var s=n?e.leave:e.enter;if(s){if("function"==typeof s)return s;var a=s[t];if("function"==typeof a)return a}}}var g={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return w(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var t=e.operation,n=e.name,r=x("(",w(e.variableDefinitions,", "),")"),i=w(e.directives," "),s=e.selectionSet;return n||i||r||"query"!==t?w([t,w([n,r]),i,s]," "):s},VariableDefinition:function(e){var t=e.directives;return e.variable+": "+e.type+x(" = ",e.defaultValue)+x(" ",w(t," "))},SelectionSet:function(e){return b(e.selections)},Field:function(e){var t=e.name,n=e.arguments,r=e.directives,i=e.selectionSet,s=x("",e.alias,": ")+t,a=s+x("(",w(n,", "),")");return a.length>80&&(a=s+x("(\n",k(w(n,"\n")),"\n)")),w([a,w(r," "),i]," ")},Argument:function(e){return e.name+": "+e.value},FragmentSpread:function(e){return"..."+e.name+x(" ",w(e.directives," "))},InlineFragment:function(e){var t=e.directives,n=e.selectionSet;return w(["...",x("on ",e.typeCondition),w(t," "),n]," ")},FragmentDefinition:function(e){var t=e.typeCondition,n=e.variableDefinitions,r=e.directives,i=e.selectionSet;return"fragment ".concat(e.name).concat(x("(",w(n,", "),")")," ")+"on ".concat(t," ").concat(x("",w(r," ")," "))+i},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var n=e.value;return e.block?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=-1===e.indexOf("\n"),i=!r||'"'===e[e.length-1]||"\\"===e[e.length-1]||n,s="";return!i||r&&(" "===e[0]||"\t"===e[0])||(s+="\n"+t),s+=t?e.replace(/\n/g,"\n"+t):e,i&&(s+="\n"),'"""'+s.replace(/"""/g,'\\"""')+'"""'}(n,"description"===t?"":" "):JSON.stringify(n)},BooleanValue:function(e){return e.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+w(e.values,", ")+"]"},ObjectValue:function(e){return"{"+w(e.fields,", ")+"}"},ObjectField:function(e){return e.name+": "+e.value},Directive:function(e){return"@"+e.name+x("(",w(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:_(function(e){var t=e.operationTypes;return w(["schema",w(e.directives," "),b(t)]," ")}),OperationTypeDefinition:function(e){return e.operation+": "+e.type},ScalarTypeDefinition:_(function(e){return w(["scalar",e.name,w(e.directives," ")]," ")}),ObjectTypeDefinition:_(function(e){var t=e.directives,n=e.fields;return w(["type",e.name,x("implements ",w(e.interfaces," & ")),w(t," "),b(n)]," ")}),FieldDefinition:_(function(e){var t=e.arguments,n=e.type,r=e.directives;return e.name+(D(t)?x("(\n",k(w(t,"\n")),"\n)"):x("(",w(t,", "),")"))+": "+n+x(" ",w(r," "))}),InputValueDefinition:_(function(e){var t=e.directives;return w([e.name+": "+e.type,x("= ",e.defaultValue),w(t," ")]," ")}),InterfaceTypeDefinition:_(function(e){var t=e.directives,n=e.fields;return w(["interface",e.name,x("implements ",w(e.interfaces," & ")),w(t," "),b(n)]," ")}),UnionTypeDefinition:_(function(e){var t=e.types;return w(["union",e.name,w(e.directives," "),t&&0!==t.length?"= "+w(t," | "):""]," ")}),EnumTypeDefinition:_(function(e){var t=e.values;return w(["enum",e.name,w(e.directives," "),b(t)]," ")}),EnumValueDefinition:_(function(e){return w([e.name,w(e.directives," ")]," ")}),InputObjectTypeDefinition:_(function(e){var t=e.fields;return w(["input",e.name,w(e.directives," "),b(t)]," ")}),DirectiveDefinition:_(function(e){var t=e.arguments,n=e.repeatable,r=e.locations;return"directive @"+e.name+(D(t)?x("(\n",k(w(t,"\n")),"\n)"):x("(",w(t,", "),")"))+(n?" repeatable":"")+" on "+w(r," | ")}),SchemaExtension:function(e){var t=e.operationTypes;return w(["extend schema",w(e.directives," "),b(t)]," ")},ScalarTypeExtension:function(e){return w(["extend scalar",e.name,w(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.directives,n=e.fields;return w(["extend type",e.name,x("implements ",w(e.interfaces," & ")),w(t," "),b(n)]," ")},InterfaceTypeExtension:function(e){var t=e.directives,n=e.fields;return w(["extend interface",e.name,x("implements ",w(e.interfaces," & ")),w(t," "),b(n)]," ")},UnionTypeExtension:function(e){var t=e.types;return w(["extend union",e.name,w(e.directives," "),t&&0!==t.length?"= "+w(t," | "):""]," ")},EnumTypeExtension:function(e){var t=e.values;return w(["extend enum",e.name,w(e.directives," "),b(t)]," ")},InputObjectTypeExtension:function(e){var t=e.fields;return w(["extend input",e.name,w(e.directives," "),b(t)]," ")}};function _(e){return function(t){return w([t.description,e(t)],"\n")}}function w(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(t=null==e?void 0:e.filter(function(e){return e}).join(n))&&void 0!==t?t:""}function b(e){return x("{\n",k(w(e,"\n")),"\n}")}function x(e,t){return null!=t&&""!==t?e+t+(arguments.length>2&&void 0!==arguments[2]?arguments[2]:""):""}function k(e){return x(" ",e.replace(/\n/g,"\n "))}function S(e){return-1!==e.indexOf("\n")}function D(e){return null!=e&&e.some(S)}var O={en:{translation:{Green:"Green",Yellow:"Yellow",Red:"Red",Gray:"Gray",Statuses:"Statuses",Workplaces:"Workplaces","Select and arange the order":"Select and arange the order",AlternativeOrder:"Order",Order:"Order"}},pl:{translation:{Green:"Zielony",Yellow:"Żółty",Red:"Czerwony",Gray:"Szary",Statuses:"Statusy",Workplaces:"Stanowiska","Select and arange the order":"Wybierz i ustaw kolejność",AlternativeOrder:"Zlecenie",Order:"Zamówienie"}}},T="1.2.11",M=function(e){var t=e.index;return o.default.createElement(i.Box,{role:"tabpanel",hidden:e.value!==t,id:"tabpanel-"+t,sx:{mt:2}},e.children)},Y=function(n){var a,u=n.data,l=n.formProps,c=e.useState(0),d=c[0],h=c[1],f=r.useTranslation().t,m=e.useMemo(function(){return[{label:f("Green"),value:"green"},{label:f("Yellow"),value:"yellow"},{label:f("Red"),value:"red"},{label:f("Gray"),value:"gray"}]},[f]);return o.default.createElement(i.Box,{mb:2},o.default.createElement(i.Tabs,{value:d,onChange:function(e,t){return h(t)},centered:!0,sx:{borderBottom:"1px solid rgba(255,255,255,0.1)",".MuiTab-root":{color:"rgba(255,255,255,0.5)","&.Mui-selected":{color:"white"}}}},o.default.createElement(i.Tab,{label:f("Statuses")}),o.default.createElement(i.Tab,{label:f("Workplaces")})),o.default.createElement(M,{value:d,index:0},o.default.createElement(t.SortableSelect,{placeholder:f("Select and arange the order")+"...",options:m,selected:l.values.statusColors||[],onChange:function(e){return l.setFieldValue("statusColors",[].concat(e))}})),o.default.createElement(M,{value:d,index:1},o.default.createElement(i.List,{sx:{color:"white",maxHeight:"500px",overflowY:"scroll"}},null==(a=u.workplaces)?void 0:a.map(function(e){return o.default.createElement(i.ListItem,{key:e.id},o.default.createElement(i.ListItemButton,{role:void 0,onClick:function(){var t,n;-1!==(n=l.values.workplacesIds||[]).indexOf(t=e.id)?l.setFieldValue("workplacesIds",n.filter(function(e){return e!==t})):l.setFieldValue("workplacesIds",[].concat(n,[t]))},dense:!0},o.default.createElement(i.ListItemIcon,null,o.default.createElement(s.Checkbox,{checked:-1!==(l.values.workplacesIds||[]).indexOf(e.id)})),o.default.createElement(i.ListItemText,{id:e.id,primary:e.name})))}))))};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var F,E,C=(F=function(e,t){e.exports=function(){var t,n;function r(){return t.apply(null,arguments)}function i(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function s(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function a(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function o(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(a(e,t))return!1;return!0}function u(e){return void 0===e}function l(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function c(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function d(e,t){var n,r=[],i=e.length;for(n=0;n<i;++n)r.push(t(e[n],n));return r}function h(e,t){for(var n in t)a(t,n)&&(e[n]=t[n]);return a(t,"toString")&&(e.toString=t.toString),a(t,"valueOf")&&(e.valueOf=t.valueOf),e}function f(e,t,n,r){return Nt(e,t,n,r,!0).utc()}function m(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function p(e){var t=null,r=!1,i=e._d&&!isNaN(e._d.getTime());return i&&(t=m(e),r=n.call(t.parsedDateParts,function(e){return null!=e}),i=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&r),e._strict&&(i=i&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour)),null!=Object.isFrozen&&Object.isFrozen(e)?i:(e._isValid=i,e._isValid)}function y(e){var t=f(NaN);return null!=e?h(m(t),e):m(t).userInvalidated=!0,t}n=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),r=n.length>>>0;for(t=0;t<r;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var v=r.momentProperties=[],g=!1;function _(e,t){var n,r,i,s=v.length;if(u(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),u(t._i)||(e._i=t._i),u(t._f)||(e._f=t._f),u(t._l)||(e._l=t._l),u(t._strict)||(e._strict=t._strict),u(t._tzm)||(e._tzm=t._tzm),u(t._isUTC)||(e._isUTC=t._isUTC),u(t._offset)||(e._offset=t._offset),u(t._pf)||(e._pf=m(t)),u(t._locale)||(e._locale=t._locale),s>0)for(n=0;n<s;n++)u(i=t[r=v[n]])||(e[r]=i);return e}function w(e){_(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===g&&(g=!0,r.updateOffset(this),g=!1)}function b(e){return e instanceof w||null!=e&&null!=e._isAMomentObject}function x(e){!1===r.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function k(e,t){var n=!0;return h(function(){if(null!=r.deprecationHandler&&r.deprecationHandler(null,e),n){var i,s,o,u=[],l=arguments.length;for(s=0;s<l;s++){if(i="","object"==typeof arguments[s]){for(o in i+="\n["+s+"] ",arguments[0])a(arguments[0],o)&&(i+=o+": "+arguments[0][o]+", ");i=i.slice(0,-2)}else i=arguments[s];u.push(i)}x(e+"\nArguments: "+Array.prototype.slice.call(u).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)},t)}var S,D={};function O(e,t){null!=r.deprecationHandler&&r.deprecationHandler(e,t),D[e]||(x(t),D[e]=!0)}function T(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function M(e,t){var n,r=h({},e);for(n in t)a(t,n)&&(s(e[n])&&s(t[n])?(r[n]={},h(r[n],e[n]),h(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)a(e,n)&&!a(t,n)&&s(e[n])&&(r[n]=h({},r[n]));return r}function Y(e){null!=e&&this.set(e)}function F(e,t,n){var r=""+Math.abs(e);return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,t-r.length)).toString().substr(1)+r}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null,S=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)a(e,t)&&n.push(t);return n};var E=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,C=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,N={},A={};function j(e,t,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),e&&(A[e]=i),t&&(A[t[0]]=function(){return F(i.apply(this,arguments),t[1],t[2])}),n&&(A[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function P(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function $(e,t){return e.isValid()?(t=V(t,e.localeData()),N[t]=N[t]||function(e){var t,n,r=e.match(E);for(t=0,n=r.length;t<n;t++)r[t]=A[r[t]]?A[r[t]]:P(r[t]);return function(t){var i,s="";for(i=0;i<n;i++)s+=T(r[i])?r[i].call(t,e):r[i];return s}}(t),N[t](e)):e.localeData().invalidDate()}function V(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(C.lastIndex=0;n>=0&&C.test(e);)e=e.replace(C,r),C.lastIndex=0,n-=1;return e}var R={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function W(e){return"string"==typeof e?R[e]||R[e.toLowerCase()]:void 0}function U(e){var t,n,r={};for(n in e)a(e,n)&&(t=W(n))&&(r[t]=e[n]);return r}var I,L={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1},H=/\d/,G=/\d\d/,z=/\d{3}/,Z=/\d{4}/,q=/[+-]?\d{6}/,B=/\d\d?/,J=/\d\d\d\d?/,Q=/\d\d\d\d\d\d?/,K=/\d{1,3}/,X=/\d{1,4}/,ee=/[+-]?\d{1,6}/,te=/\d+/,ne=/[+-]?\d+/,re=/Z|[+-]\d\d:?\d\d/gi,ie=/Z|[+-]\d\d(?::?\d\d)?/gi,se=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ae=/^[1-9]\d?/,oe=/^([1-9]\d|\d)/;function ue(e,t,n){I[e]=T(t)?t:function(e,r){return e&&n?n:t}}function le(e,t){return a(I,e)?I[e](t._strict,t._locale):new RegExp(ce(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,i){return t||n||r||i})))}function ce(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function de(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function he(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=de(t)),n}I={};var fe={};function me(e,t){var n,r,i=t;for("string"==typeof e&&(e=[e]),l(t)&&(i=function(e,n){n[t]=he(e)}),r=e.length,n=0;n<r;n++)fe[e[n]]=i}function pe(e,t){me(e,function(e,n,r,i){r._w=r._w||{},t(e,r._w,r,i)})}function ye(e,t,n){null!=t&&a(fe,e)&&fe[e](t,n._a,n,e)}function ve(e){return e%4==0&&e%100!=0||e%400==0}var ge=0,_e=1,we=2,be=3,xe=4,ke=5,Se=6,De=7,Oe=8;function Te(e){return ve(e)?366:365}j("Y",0,0,function(){var e=this.year();return e<=9999?F(e,4):"+"+e}),j(0,["YY",2],0,function(){return this.year()%100}),j(0,["YYYY",4],0,"year"),j(0,["YYYYY",5],0,"year"),j(0,["YYYYYY",6,!0],0,"year"),ue("Y",ne),ue("YY",B,G),ue("YYYY",X,Z),ue("YYYYY",ee,q),ue("YYYYYY",ee,q),me(["YYYYY","YYYYYY"],ge),me("YYYY",function(e,t){t[ge]=2===e.length?r.parseTwoDigitYear(e):he(e)}),me("YY",function(e,t){t[ge]=r.parseTwoDigitYear(e)}),me("Y",function(e,t){t[ge]=parseInt(e,10)}),r.parseTwoDigitYear=function(e){return he(e)+(he(e)>68?1900:2e3)};var Me,Ye=Fe("FullYear",!0);function Fe(e,t){return function(n){return null!=n?(Ce(this,e,n),r.updateOffset(this,t),this):Ee(this,e)}}function Ee(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function Ce(e,t,n){var r,i,s,a,o;if(e.isValid()&&!isNaN(n)){switch(r=e._d,i=e._isUTC,t){case"Milliseconds":return void(i?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(i?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(i?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(i?r.setUTCHours(n):r.setHours(n));case"Date":return void(i?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}s=n,a=e.month(),o=29!==(o=e.date())||1!==a||ve(s)?o:28,i?r.setUTCFullYear(s,a,o):r.setFullYear(s,a,o)}}function Ne(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=(t%12+12)%12;return e+=(t-n)/12,1===n?ve(e)?29:28:31-n%7%2}Me=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},j("M",["MM",2],"Mo",function(){return this.month()+1}),j("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),j("MMMM",0,0,function(e){return this.localeData().months(this,e)}),ue("M",B,ae),ue("MM",B,G),ue("MMM",function(e,t){return t.monthsShortRegex(e)}),ue("MMMM",function(e,t){return t.monthsRegex(e)}),me(["M","MM"],function(e,t){t[_e]=he(e)-1}),me(["MMM","MMMM"],function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);null!=i?t[_e]=i:m(n).invalidMonth=e});var Ae="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),je="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Pe=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,$e=se,Ve=se;function Re(e,t,n){var r,i,s,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)s=f([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(s,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=Me.call(this._shortMonthsParse,a))?i:null:-1!==(i=Me.call(this._longMonthsParse,a))?i:null:"MMM"===t?-1!==(i=Me.call(this._shortMonthsParse,a))||-1!==(i=Me.call(this._longMonthsParse,a))?i:null:-1!==(i=Me.call(this._longMonthsParse,a))||-1!==(i=Me.call(this._shortMonthsParse,a))?i:null}function We(e,t){if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=he(t);else if(!l(t=e.localeData().monthsParse(t)))return e;var n=t,r=e.date();return r=r<29?r:Math.min(r,Ne(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function Ue(e){return null!=e?(We(this,e),r.updateOffset(this,!0),this):Ee(this,"Month")}function Ie(){function e(e,t){return t.length-e.length}var t,n,r,i,s=[],a=[],o=[];for(t=0;t<12;t++)n=f([2e3,t]),r=ce(this.monthsShort(n,"")),i=ce(this.months(n,"")),s.push(r),a.push(i),o.push(i),o.push(r);s.sort(e),a.sort(e),o.sort(e),this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Le(e,t,n,r,i,s,a){var o;return e<100&&e>=0?(o=new Date(e+400,t,n,r,i,s,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,r,i,s,a),o}function He(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Ge(e,t,n){var r=7+t-n;return-(7+He(e,0,r).getUTCDay()-t)%7+r-1}function ze(e,t,n,r,i){var s,a,o=1+7*(t-1)+(7+n-r)%7+Ge(e,r,i);return o<=0?a=Te(s=e-1)+o:o>Te(e)?(s=e+1,a=o-Te(e)):(s=e,a=o),{year:s,dayOfYear:a}}function Ze(e,t,n){var r,i,s=Ge(e.year(),t,n),a=Math.floor((e.dayOfYear()-s-1)/7)+1;return a<1?r=a+qe(i=e.year()-1,t,n):a>qe(e.year(),t,n)?(r=a-qe(e.year(),t,n),i=e.year()+1):(i=e.year(),r=a),{week:r,year:i}}function qe(e,t,n){var r=Ge(e,t,n),i=Ge(e+1,t,n);return(Te(e)-r+i)/7}function Be(e,t){return e.slice(t,7).concat(e.slice(0,t))}j("w",["ww",2],"wo","week"),j("W",["WW",2],"Wo","isoWeek"),ue("w",B,ae),ue("ww",B,G),ue("W",B,ae),ue("WW",B,G),pe(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=he(e)}),j("d",0,"do","day"),j("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),j("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),j("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),j("e",0,0,"weekday"),j("E",0,0,"isoWeekday"),ue("d",B),ue("e",B),ue("E",B),ue("dd",function(e,t){return t.weekdaysMinRegex(e)}),ue("ddd",function(e,t){return t.weekdaysShortRegex(e)}),ue("dddd",function(e,t){return t.weekdaysRegex(e)}),pe(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);null!=i?t.d=i:m(n).invalidWeekday=e}),pe(["d","e","E"],function(e,t,n,r){t[r]=he(e)});var Je="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Qe="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ke="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Xe=se,et=se,tt=se;function nt(e,t,n){var r,i,s,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)s=f([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(s,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=Me.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=Me.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=Me.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=Me.call(this._weekdaysParse,a))||-1!==(i=Me.call(this._shortWeekdaysParse,a))||-1!==(i=Me.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=Me.call(this._shortWeekdaysParse,a))||-1!==(i=Me.call(this._weekdaysParse,a))||-1!==(i=Me.call(this._minWeekdaysParse,a))?i:null:-1!==(i=Me.call(this._minWeekdaysParse,a))||-1!==(i=Me.call(this._weekdaysParse,a))||-1!==(i=Me.call(this._shortWeekdaysParse,a))?i:null}function rt(){function e(e,t){return t.length-e.length}var t,n,r,i,s,a=[],o=[],u=[],l=[];for(t=0;t<7;t++)n=f([2e3,1]).day(t),r=ce(this.weekdaysMin(n,"")),i=ce(this.weekdaysShort(n,"")),s=ce(this.weekdays(n,"")),a.push(r),o.push(i),u.push(s),l.push(r),l.push(i),l.push(s);a.sort(e),o.sort(e),u.sort(e),l.sort(e),this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function it(){return this.hours()%12||12}function st(e,t){j(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function at(e,t){return t._meridiemParse}j("H",["HH",2],0,"hour"),j("h",["hh",2],0,it),j("k",["kk",2],0,function(){return this.hours()||24}),j("hmm",0,0,function(){return""+it.apply(this)+F(this.minutes(),2)}),j("hmmss",0,0,function(){return""+it.apply(this)+F(this.minutes(),2)+F(this.seconds(),2)}),j("Hmm",0,0,function(){return""+this.hours()+F(this.minutes(),2)}),j("Hmmss",0,0,function(){return""+this.hours()+F(this.minutes(),2)+F(this.seconds(),2)}),st("a",!0),st("A",!1),ue("a",at),ue("A",at),ue("H",B,oe),ue("h",B,ae),ue("k",B,ae),ue("HH",B,G),ue("hh",B,G),ue("kk",B,G),ue("hmm",J),ue("hmmss",Q),ue("Hmm",J),ue("Hmmss",Q),me(["H","HH"],be),me(["k","kk"],function(e,t,n){var r=he(e);t[be]=24===r?0:r}),me(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),me(["h","hh"],function(e,t,n){t[be]=he(e),m(n).bigHour=!0}),me("hmm",function(e,t,n){var r=e.length-2;t[be]=he(e.substr(0,r)),t[xe]=he(e.substr(r)),m(n).bigHour=!0}),me("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[be]=he(e.substr(0,r)),t[xe]=he(e.substr(r,2)),t[ke]=he(e.substr(i)),m(n).bigHour=!0}),me("Hmm",function(e,t,n){var r=e.length-2;t[be]=he(e.substr(0,r)),t[xe]=he(e.substr(r))}),me("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[be]=he(e.substr(0,r)),t[xe]=he(e.substr(r,2)),t[ke]=he(e.substr(i))});var ot,ut=Fe("Hours",!0),lt={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Ae,monthsShort:je,week:{dow:0,doy:6},weekdays:Je,weekdaysMin:Ke,weekdaysShort:Qe,meridiemParse:/[ap]\.?m?\.?/i},ct={},dt={};function ht(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function ft(e){return e?e.toLowerCase().replace("_","-"):e}function mt(t){var n=null;if(void 0===ct[t]&&e&&e.exports&&function(e){return!(!e||!e.match("^[^/\\\\]*$"))}(t))try{n=ot._abbr,function(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets option of @rollup/plugin-commonjs appropriately for this require call to behave properly.')}("./locale/"+t),pt(n)}catch(e){ct[t]=null}return ct[t]}function pt(e,t){var n;return e&&((n=u(t)?vt(e):yt(e,t))?ot=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),ot._abbr}function yt(e,t){if(null!==t){var n,r=lt;if(t.abbr=e,null!=ct[e])O("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=ct[e]._config;else if(null!=t.parentLocale)if(null!=ct[t.parentLocale])r=ct[t.parentLocale]._config;else{if(null==(n=mt(t.parentLocale)))return dt[t.parentLocale]||(dt[t.parentLocale]=[]),dt[t.parentLocale].push({name:e,config:t}),null;r=n._config}return ct[e]=new Y(M(r,t)),dt[e]&&dt[e].forEach(function(e){yt(e.name,e.config)}),pt(e),ct[e]}return delete ct[e],null}function vt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return ot;if(!i(e)){if(t=mt(e))return t;e=[e]}return function(e){for(var t,n,r,i,s=0;s<e.length;){for(t=(i=ft(e[s]).split("-")).length,n=(n=ft(e[s+1]))?n.split("-"):null;t>0;){if(r=mt(i.slice(0,t).join("-")))return r;if(n&&n.length>=t&&ht(i,n)>=t-1)break;t--}s++}return ot}(e)}function gt(e){var t,n=e._a;return n&&-2===m(e).overflow&&(t=n[_e]<0||n[_e]>11?_e:n[we]<1||n[we]>Ne(n[ge],n[_e])?we:n[be]<0||n[be]>24||24===n[be]&&(0!==n[xe]||0!==n[ke]||0!==n[Se])?be:n[xe]<0||n[xe]>59?xe:n[ke]<0||n[ke]>59?ke:n[Se]<0||n[Se]>999?Se:-1,m(e)._overflowDayOfYear&&(t<ge||t>we)&&(t=we),m(e)._overflowWeeks&&-1===t&&(t=De),m(e)._overflowWeekday&&-1===t&&(t=Oe),m(e).overflow=t),e}var _t=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,bt=/Z|[+-]\d\d(?::?\d\d)?/,xt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],kt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],St=/^\/?Date\((-?\d+)/i,Dt=/^(?:(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{4}))$/,Ot={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Tt(e){var t,n,r,i,s,a,o=e._i,u=_t.exec(o)||wt.exec(o),l=xt.length,c=kt.length;if(u){for(m(e).iso=!0,t=0,n=l;t<n;t++)if(xt[t][1].exec(u[1])){i=xt[t][0],r=!1!==xt[t][2];break}if(null==i)return void(e._isValid=!1);if(u[3]){for(t=0,n=c;t<n;t++)if(kt[t][1].exec(u[3])){s=(u[2]||" ")+kt[t][0];break}if(null==s)return void(e._isValid=!1)}if(!r&&null!=s)return void(e._isValid=!1);if(u[4]){if(!bt.exec(u[4]))return void(e._isValid=!1);a="Z"}e._f=i+(s||"")+(a||""),Et(e)}else e._isValid=!1}function Mt(e){var t,n,r,i,s,a,o,u,l,c=Dt.exec(e._i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(c){if(n=c[3],r=c[2],i=c[5],s=c[6],a=c[7],o=[(u=c[4],l=parseInt(u,10),l<=49?2e3+l:l<=999?1900+l:l),je.indexOf(n),parseInt(r,10),parseInt(i,10),parseInt(s,10)],a&&o.push(parseInt(a,10)),!function(e,t,n){return!e||Qe.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(m(n).weekdayMismatch=!0,n._isValid=!1,!1)}(c[1],t=o,e))return;e._a=t,e._tzm=function(e,t,n){if(e)return Ot[e];if(t)return 0;var r=parseInt(n,10),i=r%100;return(r-i)/100*60+i}(c[8],c[9],c[10]),e._d=He.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),m(e).rfc2822=!0}else e._isValid=!1}function Yt(e,t,n){return null!=e?e:null!=t?t:n}function Ft(e){var t,n,i,s,a,o=[];if(!e._d){for(i=function(e){var t=new Date(r.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[we]&&null==e._a[_e]&&function(e){var t,n,r,i,s,a,o,u,l;null!=(t=e._w).GG||null!=t.W||null!=t.E?(s=1,a=4,n=Yt(t.GG,e._a[ge],Ze(At(),1,4).year),r=Yt(t.W,1),((i=Yt(t.E,1))<1||i>7)&&(u=!0)):(s=e._locale._week.dow,a=e._locale._week.doy,l=Ze(At(),s,a),n=Yt(t.gg,e._a[ge],l.year),r=Yt(t.w,l.week),null!=t.d?((i=t.d)<0||i>6)&&(u=!0):null!=t.e?(i=t.e+s,(t.e<0||t.e>6)&&(u=!0)):i=s),r<1||r>qe(n,s,a)?m(e)._overflowWeeks=!0:null!=u?m(e)._overflowWeekday=!0:(o=ze(n,r,i,s,a),e._a[ge]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(a=Yt(e._a[ge],i[ge]),(e._dayOfYear>Te(a)||0===e._dayOfYear)&&(m(e)._overflowDayOfYear=!0),n=He(a,0,e._dayOfYear),e._a[_e]=n.getUTCMonth(),e._a[we]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=o[t]=i[t];for(;t<7;t++)e._a[t]=o[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[be]&&0===e._a[xe]&&0===e._a[ke]&&0===e._a[Se]&&(e._nextDay=!0,e._a[be]=0),e._d=(e._useUTC?He:Le).apply(null,o),s=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[be]=24),e._w&&void 0!==e._w.d&&e._w.d!==s&&(m(e).weekdayMismatch=!0)}}function Et(e){if(e._f!==r.ISO_8601)if(e._f!==r.RFC_2822){e._a=[],m(e).empty=!0;var t,n,i,s,a,o,u,l=""+e._i,c=l.length,d=0;for(u=(i=V(e._f,e._locale).match(E)||[]).length,t=0;t<u;t++)(n=(l.match(le(s=i[t],e))||[])[0])&&((a=l.substr(0,l.indexOf(n))).length>0&&m(e).unusedInput.push(a),l=l.slice(l.indexOf(n)+n.length),d+=n.length),A[s]?(n?m(e).empty=!1:m(e).unusedTokens.push(s),ye(s,n,e)):e._strict&&!n&&m(e).unusedTokens.push(s);m(e).charsLeftOver=c-d,l.length>0&&m(e).unusedInput.push(l),e._a[be]<=12&&!0===m(e).bigHour&&e._a[be]>0&&(m(e).bigHour=void 0),m(e).parsedDateParts=e._a.slice(0),m(e).meridiem=e._meridiem,e._a[be]=function(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}(e._locale,e._a[be],e._meridiem),null!==(o=m(e).era)&&(e._a[ge]=e._locale.erasConvertYear(o,e._a[ge])),Ft(e),gt(e)}else Mt(e);else Tt(e)}function Ct(e){var t=e._i,n=e._f;return e._locale=e._locale||vt(e._l),null===t||void 0===n&&""===t?y({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),b(t)?new w(gt(t)):(c(t)?e._d=t:i(n)?function(e){var t,n,r,i,s,a,o=!1,u=e._f.length;if(0===u)return m(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;i<u;i++)s=0,a=!1,t=_({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],Et(t),p(t)&&(a=!0),s+=m(t).charsLeftOver,s+=10*m(t).unusedTokens.length,m(t).score=s,o?s<r&&(r=s,n=t):(null==r||s<r||a)&&(r=s,n=t,a&&(o=!0));h(e,n||t)}(e):n?Et(e):function(e){var t=e._i;u(t)?e._d=new Date(r.now()):c(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=St.exec(e._i);null===t?(Tt(e),!1===e._isValid&&(delete e._isValid,Mt(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:r.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):i(t)?(e._a=d(t.slice(0),function(e){return parseInt(e,10)}),Ft(e)):s(t)?function(e){if(!e._d){var t=U(e._i);e._a=d([t.year,t.month,void 0===t.day?t.date:t.day,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),Ft(e)}}(e):l(t)?e._d=new Date(t):r.createFromInputFallback(e)}(e),p(e)||(e._d=null),e))}function Nt(e,t,n,r,a){var u,l={};return!0!==t&&!1!==t||(r=t,t=void 0),!0!==n&&!1!==n||(r=n,n=void 0),(s(e)&&o(e)||i(e)&&0===e.length)&&(e=void 0),l._isAMomentObject=!0,l._useUTC=l._isUTC=a,l._l=n,l._i=e,l._f=t,l._strict=r,(u=new w(gt(Ct(l))))._nextDay&&(u.add(1,"d"),u._nextDay=void 0),u}function At(e,t,n,r){return Nt(e,t,n,r,!1)}r.createFromInputFallback=k("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),r.ISO_8601=function(){},r.RFC_2822=function(){};var jt=k("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=At.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:y()}),Pt=k("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=At.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:y()});function $t(e,t){var n,r;if(1===t.length&&i(t[0])&&(t=t[0]),!t.length)return At();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}var Vt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Rt(e){var t=U(e),n=t.year||0,r=t.quarter||0,i=t.month||0,s=t.week||t.isoWeek||0,o=t.day||0,u=t.hour||0,l=t.minute||0,c=t.second||0,d=t.millisecond||0;this._isValid=function(e){var t,n,r=!1,i=Vt.length;for(t in e)if(a(e,t)&&(-1===Me.call(Vt,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<i;++n)if(e[Vt[n]]){if(r)return!1;parseFloat(e[Vt[n]])!==he(e[Vt[n]])&&(r=!0)}return!0}(t),this._milliseconds=+d+1e3*c+6e4*l+1e3*u*60*60,this._days=+o+7*s,this._months=+i+3*r+12*n,this._data={},this._locale=vt(),this._bubble()}function Wt(e){return e instanceof Rt}function Ut(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function It(e,t){j(e,0,0,function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+F(~~(e/60),2)+t+F(~~e%60,2)})}It("Z",":"),It("ZZ",""),ue("Z",ie),ue("ZZ",ie),me(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Ht(ie,e)});var Lt=/([\+\-]|\d\d)/gi;function Ht(e,t){var n,r,i=(t||"").match(e);return null===i?null:0===(r=60*(n=((i[i.length-1]||[])+"").match(Lt)||["-",0,0])[1]+he(n[2]))?0:"+"===n[0]?r:-r}function Gt(e,t){var n,i;return t._isUTC?(n=t.clone(),i=(b(e)||c(e)?e.valueOf():At(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+i),r.updateOffset(n,!1),n):At(e).local()}function zt(e){return-Math.round(e._d.getTimezoneOffset())}function Zt(){return!!this.isValid()&&this._isUTC&&0===this._offset}r.updateOffset=function(){};var qt=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Bt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Jt(e,t){var n,r,i,s,o,u,c=e,d=null;return Wt(e)?c={ms:e._milliseconds,d:e._days,M:e._months}:l(e)||!isNaN(+e)?(c={},t?c[t]=+e:c.milliseconds=+e):(d=qt.exec(e))?(n="-"===d[1]?-1:1,c={y:0,d:he(d[we])*n,h:he(d[be])*n,m:he(d[xe])*n,s:he(d[ke])*n,ms:he(Ut(1e3*d[Se]))*n}):(d=Bt.exec(e))?c={y:Qt(d[2],n="-"===d[1]?-1:1),M:Qt(d[3],n),w:Qt(d[4],n),d:Qt(d[5],n),h:Qt(d[6],n),m:Qt(d[7],n),s:Qt(d[8],n)}:null==c?c={}:"object"==typeof c&&("from"in c||"to"in c)&&(s=At(c.from),o=At(c.to),i=s.isValid()&&o.isValid()?(o=Gt(o,s),s.isBefore(o)?u=Kt(s,o):((u=Kt(o,s)).milliseconds=-u.milliseconds,u.months=-u.months),u):{milliseconds:0,months:0},(c={}).ms=i.milliseconds,c.M=i.months),r=new Rt(c),Wt(e)&&a(e,"_locale")&&(r._locale=e._locale),Wt(e)&&a(e,"_isValid")&&(r._isValid=e._isValid),r}function Qt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Kt(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Xt(e,t){return function(n,r){var i;return null===r||isNaN(+r)||(O(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=r,r=i),en(this,Jt(n,r),e),this}}function en(e,t,n,i){var s=t._milliseconds,a=Ut(t._days),o=Ut(t._months);e.isValid()&&(i=null==i||i,o&&We(e,Ee(e,"Month")+o*n),a&&Ce(e,"Date",Ee(e,"Date")+a*n),s&&e._d.setTime(e._d.valueOf()+s*n),i&&r.updateOffset(e,a||o))}Jt.fn=Rt.prototype,Jt.invalid=function(){return Jt(NaN)};var tn=Xt(1,"add"),nn=Xt(-1,"subtract");function rn(e){return"string"==typeof e||e instanceof String}function sn(e,t){if(e.date()<t.date())return-sn(t,e);var n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,"months");return-(n+(t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r)))||0}function an(e){var t;return void 0===e?this._locale._abbr:(null!=(t=vt(e))&&(this._locale=t),this)}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var on=k("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function un(){return this._locale}var ln=1e3,cn=6e4,dn=36e5,hn=126227808e5;function fn(e,t){return(e%t+t)%t}function mn(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-hn:new Date(e,t,n).valueOf()}function pn(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-hn:Date.UTC(e,t,n)}function yn(e,t){return t.erasAbbrRegex(e)}function vn(){var e,t,n,r,i,s=[],a=[],o=[],u=[],l=this.eras();for(e=0,t=l.length;e<t;++e)n=ce(l[e].name),r=ce(l[e].abbr),i=ce(l[e].narrow),a.push(n),s.push(r),o.push(i),u.push(n),u.push(r),u.push(i);this._erasRegex=new RegExp("^("+u.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+a.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+s.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+o.join("|")+")","i")}function gn(e,t){j(0,[e,e.length],0,t)}function _n(e,t,n,r,i){var s;return null==e?Ze(this,r,i).year:(t>(s=qe(e,r,i))&&(t=s),wn.call(this,e,t,n,r,i))}function wn(e,t,n,r,i){var s=ze(e,t,n,r,i),a=He(s.year,0,s.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}j("N",0,0,"eraAbbr"),j("NN",0,0,"eraAbbr"),j("NNN",0,0,"eraAbbr"),j("NNNN",0,0,"eraName"),j("NNNNN",0,0,"eraNarrow"),j("y",["y",1],"yo","eraYear"),j("y",["yy",2],0,"eraYear"),j("y",["yyy",3],0,"eraYear"),j("y",["yyyy",4],0,"eraYear"),ue("N",yn),ue("NN",yn),ue("NNN",yn),ue("NNNN",function(e,t){return t.erasNameRegex(e)}),ue("NNNNN",function(e,t){return t.erasNarrowRegex(e)}),me(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?m(n).era=i:m(n).invalidEra=e}),ue("y",te),ue("yy",te),ue("yyy",te),ue("yyyy",te),ue("yo",function(e,t){return t._eraYearOrdinalRegex||te}),me(["y","yy","yyy","yyyy"],ge),me(["yo"],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),t[ge]=n._locale.eraYearOrdinalParse?n._locale.eraYearOrdinalParse(e,i):parseInt(e,10)}),j(0,["gg",2],0,function(){return this.weekYear()%100}),j(0,["GG",2],0,function(){return this.isoWeekYear()%100}),gn("gggg","weekYear"),gn("ggggg","weekYear"),gn("GGGG","isoWeekYear"),gn("GGGGG","isoWeekYear"),ue("G",ne),ue("g",ne),ue("GG",B,G),ue("gg",B,G),ue("GGGG",X,Z),ue("gggg",X,Z),ue("GGGGG",ee,q),ue("ggggg",ee,q),pe(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=he(e)}),pe(["gg","GG"],function(e,t,n,i){t[i]=r.parseTwoDigitYear(e)}),j("Q",0,"Qo","quarter"),ue("Q",H),me("Q",function(e,t){t[_e]=3*(he(e)-1)}),j("D",["DD",2],"Do","date"),ue("D",B,ae),ue("DD",B,G),ue("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),me(["D","DD"],we),me("Do",function(e,t){t[we]=he(e.match(B)[0])});var bn=Fe("Date",!0);j("DDD",["DDDD",3],"DDDo","dayOfYear"),ue("DDD",K),ue("DDDD",z),me(["DDD","DDDD"],function(e,t,n){n._dayOfYear=he(e)}),j("m",["mm",2],0,"minute"),ue("m",B,oe),ue("mm",B,G),me(["m","mm"],xe);var xn=Fe("Minutes",!1);j("s",["ss",2],0,"second"),ue("s",B,oe),ue("ss",B,G),me(["s","ss"],ke);var kn,Sn,Dn=Fe("Seconds",!1);for(j("S",0,0,function(){return~~(this.millisecond()/100)}),j(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),j(0,["SSS",3],0,"millisecond"),j(0,["SSSS",4],0,function(){return 10*this.millisecond()}),j(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),j(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),j(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),j(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),j(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),ue("S",K,H),ue("SS",K,G),ue("SSS",K,z),kn="SSSS";kn.length<=9;kn+="S")ue(kn,te);function On(e,t){t[Se]=he(1e3*("0."+e))}for(kn="S";kn.length<=9;kn+="S")me(kn,On);Sn=Fe("Milliseconds",!1),j("z",0,0,"zoneAbbr"),j("zz",0,0,"zoneName");var Tn=w.prototype;function Mn(e){return e}Tn.add=tn,Tn.calendar=function(e,t){var n;1===arguments.length&&(arguments[0]?b(n=arguments[0])||c(n)||rn(n)||l(n)||function(e){var t=i(e),n=!1;return t&&(n=0===e.filter(function(t){return!l(t)&&rn(e)}).length),t&&n}(n)||function(e){var t,n=s(e)&&!o(e),r=!1,i=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],u=i.length;for(t=0;t<u;t+=1)r=r||a(e,i[t]);return n&&r}(n)||null==n?(e=arguments[0],t=void 0):function(e){var t,n=s(e)&&!o(e),r=!1,i=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<i.length;t+=1)r=r||a(e,i[t]);return n&&r}(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var u=e||At(),d=Gt(u,this).startOf("day"),h=r.calendarFormat(this,d)||"sameElse",f=t&&(T(t[h])?t[h].call(this,u):t[h]);return this.format(f||this.localeData().calendar(h,this,At(u)))},Tn.clone=function(){return new w(this)},Tn.diff=function(e,t,n){var r,i,s;if(!this.isValid())return NaN;if(!(r=Gt(e,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),t=W(t)){case"year":s=sn(this,r)/12;break;case"month":s=sn(this,r);break;case"quarter":s=sn(this,r)/3;break;case"second":s=(this-r)/1e3;break;case"minute":s=(this-r)/6e4;break;case"hour":s=(this-r)/36e5;break;case"day":s=(this-r-i)/864e5;break;case"week":s=(this-r-i)/6048e5;break;default:s=this-r}return n?s:de(s)},Tn.endOf=function(e){var t,n;if(void 0===(e=W(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?pn:mn,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=dn-fn(t+(this._isUTC?0:this.utcOffset()*cn),dn)-1;break;case"minute":t=this._d.valueOf(),t+=cn-fn(t,cn)-1;break;case"second":t=this._d.valueOf(),t+=ln-fn(t,ln)-1}return this._d.setTime(t),r.updateOffset(this,!0),this},Tn.format=function(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=$(this,e);return this.localeData().postformat(t)},Tn.from=function(e,t){return this.isValid()&&(b(e)&&e.isValid()||At(e).isValid())?Jt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},Tn.fromNow=function(e){return this.from(At(),e)},Tn.to=function(e,t){return this.isValid()&&(b(e)&&e.isValid()||At(e).isValid())?Jt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},Tn.toNow=function(e){return this.to(At(),e)},Tn.get=function(e){return T(this[e=W(e)])?this[e]():this},Tn.invalidAt=function(){return m(this).overflow},Tn.isAfter=function(e,t){var n=b(e)?e:At(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=W(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},Tn.isBefore=function(e,t){var n=b(e)?e:At(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=W(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},Tn.isBetween=function(e,t,n,r){var i=b(e)?e:At(e),s=b(t)?t:At(t);return!!(this.isValid()&&i.isValid()&&s.isValid())&&("("===(r=r||"()")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===r[1]?this.isBefore(s,n):!this.isAfter(s,n))},Tn.isSame=function(e,t){var n,r=b(e)?e:At(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=W(t)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},Tn.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},Tn.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},Tn.isValid=function(){return p(this)},Tn.lang=on,Tn.locale=an,Tn.localeData=un,Tn.max=Pt,Tn.min=jt,Tn.parsingFlags=function(){return h({},m(this))},Tn.set=function(e,t){if("object"==typeof e){var n,r=function(e){var t,n=[];for(t in e)a(e,t)&&n.push({unit:t,priority:L[t]});return n.sort(function(e,t){return e.priority-t.priority}),n}(e=U(e)),i=r.length;for(n=0;n<i;n++)this[r[n].unit](e[r[n].unit])}else if(T(this[e=W(e)]))return this[e](t);return this},Tn.startOf=function(e){var t,n;if(void 0===(e=W(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?pn:mn,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=fn(t+(this._isUTC?0:this.utcOffset()*cn),dn);break;case"minute":t=this._d.valueOf(),t-=fn(t,cn);break;case"second":t=this._d.valueOf(),t-=fn(t,ln)}return this._d.setTime(t),r.updateOffset(this,!0),this},Tn.subtract=nn,Tn.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},Tn.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},Tn.toDate=function(){return new Date(this.valueOf())},Tn.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?$(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):T(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",$(n,"Z")):$(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},Tn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n="moment",r="";return this.isLocal()||(n=0===this.utcOffset()?"moment.utc":"moment.parseZone",r="Z"),e="["+n+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+r+'[")]')},"undefined"!=typeof Symbol&&null!=Symbol.for&&(Tn[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),Tn.toJSON=function(){return this.isValid()?this.toISOString():null},Tn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},Tn.unix=function(){return Math.floor(this.valueOf()/1e3)},Tn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},Tn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},Tn.eraName=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].name;if(r[e].until<=n&&n<=r[e].since)return r[e].name}return""},Tn.eraNarrow=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].narrow;if(r[e].until<=n&&n<=r[e].since)return r[e].narrow}return""},Tn.eraAbbr=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].abbr;if(r[e].until<=n&&n<=r[e].since)return r[e].abbr}return""},Tn.eraYear=function(){var e,t,n,i,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e)if(n=s[e].since<=s[e].until?1:-1,i=this.clone().startOf("day").valueOf(),s[e].since<=i&&i<=s[e].until||s[e].until<=i&&i<=s[e].since)return(this.year()-r(s[e].since).year())*n+s[e].offset;return this.year()},Tn.year=Ye,Tn.isLeapYear=function(){return ve(this.year())},Tn.weekYear=function(e){return _n.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)},Tn.isoWeekYear=function(e){return _n.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},Tn.quarter=Tn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},Tn.month=Ue,Tn.daysInMonth=function(){return Ne(this.year(),this.month())},Tn.week=Tn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},Tn.isoWeek=Tn.isoWeeks=function(e){var t=Ze(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},Tn.weeksInYear=function(){var e=this.localeData()._week;return qe(this.year(),e.dow,e.doy)},Tn.weeksInWeekYear=function(){var e=this.localeData()._week;return qe(this.weekYear(),e.dow,e.doy)},Tn.isoWeeksInYear=function(){return qe(this.year(),1,4)},Tn.isoWeeksInISOWeekYear=function(){return qe(this.isoWeekYear(),1,4)},Tn.date=bn,Tn.day=Tn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=Ee(this,"Day");return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},Tn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},Tn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},Tn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},Tn.hour=Tn.hours=ut,Tn.minute=Tn.minutes=xn,Tn.second=Tn.seconds=Dn,Tn.millisecond=Tn.milliseconds=Sn,Tn.utcOffset=function(e,t,n){var i,s=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Ht(ie,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(i=zt(this)),this._offset=e,this._isUTC=!0,null!=i&&this.add(i,"m"),s!==e&&(!t||this._changeInProgress?en(this,Jt(e-s,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?s:zt(this)},Tn.utc=function(e){return this.utcOffset(0,e)},Tn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(zt(this),"m")),this},Tn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Ht(re,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},Tn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?At(e).utcOffset():0,(this.utcOffset()-e)%60==0)},Tn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},Tn.isLocal=function(){return!!this.isValid()&&!this._isUTC},Tn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},Tn.isUtc=Zt,Tn.isUTC=Zt,Tn.zoneAbbr=function(){return this._isUTC?"UTC":""},Tn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},Tn.dates=k("dates accessor is deprecated. Use date instead.",bn),Tn.months=k("months accessor is deprecated. Use month instead",Ue),Tn.years=k("years accessor is deprecated. Use year instead",Ye),Tn.zone=k("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),Tn.isDSTShifted=k("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!u(this._isDSTShifted))return this._isDSTShifted;var e,t={};return _(t,this),(t=Ct(t))._a?(e=t._isUTC?f(t._a):At(t._a),this._isDSTShifted=this.isValid()&&function(e,t){var n,r=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),s=0;for(n=0;n<r;n++)he(e[n])!==he(t[n])&&s++;return s+i}(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted});var Yn=Y.prototype;function Fn(e,t,n,r){var i=vt(),s=f().set(r,t);return i[n](s,e)}function En(e,t,n){if(l(e)&&(t=e,e=void 0),e=e||"",null!=t)return Fn(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=Fn(e,r,n,"month");return i}function Cn(e,t,n,r){"boolean"==typeof e?(l(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,l(t)&&(n=t,t=void 0),t=t||"");var i,s=vt(),a=e?s._week.dow:0,o=[];if(null!=n)return Fn(t,(n+a)%7,r,"day");for(i=0;i<7;i++)o[i]=Fn(t,(i+a)%7,r,"day");return o}Yn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return T(r)?r.call(t,n):r},Yn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(E).map(function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e}).join(""),this._longDateFormat[e])},Yn.invalidDate=function(){return this._invalidDate},Yn.ordinal=function(e){return this._ordinal.replace("%d",e)},Yn.preparse=Mn,Yn.postformat=Mn,Yn.relativeTime=function(e,t,n,r){var i=this._relativeTime[n];return T(i)?i(e,t,n,r):i.replace(/%d/i,e)},Yn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return T(n)?n(t):n.replace(/%s/i,t)},Yn.set=function(e){var t,n;for(n in e)a(e,n)&&(T(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},Yn.eras=function(e,t){var n,i,s,a=this._eras||vt("en")._eras;for(n=0,i=a.length;n<i;++n)switch("string"==typeof a[n].since&&(s=r(a[n].since).startOf("day"),a[n].since=s.valueOf()),typeof a[n].until){case"undefined":a[n].until=Infinity;break;case"string":s=r(a[n].until).startOf("day").valueOf(),a[n].until=s.valueOf()}return a},Yn.erasParse=function(e,t,n){var r,i,s,a,o,u=this.eras();for(e=e.toUpperCase(),r=0,i=u.length;r<i;++r)if(s=u[r].name.toUpperCase(),a=u[r].abbr.toUpperCase(),o=u[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(a===e)return u[r];break;case"NNNN":if(s===e)return u[r];break;case"NNNNN":if(o===e)return u[r]}else if([s,a,o].indexOf(e)>=0)return u[r]},Yn.erasConvertYear=function(e,t){var n=e.since<=e.until?1:-1;return void 0===t?r(e.since).year():r(e.since).year()+(t-e.offset)*n},Yn.erasAbbrRegex=function(e){return a(this,"_erasAbbrRegex")||vn.call(this),e?this._erasAbbrRegex:this._erasRegex},Yn.erasNameRegex=function(e){return a(this,"_erasNameRegex")||vn.call(this),e?this._erasNameRegex:this._erasRegex},Yn.erasNarrowRegex=function(e){return a(this,"_erasNarrowRegex")||vn.call(this),e?this._erasNarrowRegex:this._erasRegex},Yn.months=function(e,t){return e?i(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Pe).test(t)?"format":"standalone"][e.month()]:i(this._months)?this._months:this._months.standalone},Yn.monthsShort=function(e,t){return e?i(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Pe.test(t)?"format":"standalone"][e.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},Yn.monthsParse=function(e,t,n){var r,i,s;if(this._monthsParseExact)return Re.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=f([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(s="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(s.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},Yn.monthsRegex=function(e){return this._monthsParseExact?(a(this,"_monthsRegex")||Ie.call(this),e?this._monthsStrictRegex:this._monthsRegex):(a(this,"_monthsRegex")||(this._monthsRegex=Ve),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},Yn.monthsShortRegex=function(e){return this._monthsParseExact?(a(this,"_monthsRegex")||Ie.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(a(this,"_monthsShortRegex")||(this._monthsShortRegex=$e),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},Yn.week=function(e){return Ze(e,this._week.dow,this._week.doy).week},Yn.firstDayOfYear=function(){return this._week.doy},Yn.firstDayOfWeek=function(){return this._week.dow},Yn.weekdays=function(e,t){var n=i(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Be(n,this._week.dow):e?n[e.day()]:n},Yn.weekdaysMin=function(e){return!0===e?Be(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},Yn.weekdaysShort=function(e){return!0===e?Be(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},Yn.weekdaysParse=function(e,t,n){var r,i,s;if(this._weekdaysParseExact)return nt.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=f([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(s="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(s.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},Yn.weekdaysRegex=function(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||rt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(a(this,"_weekdaysRegex")||(this._weekdaysRegex=Xe),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},Yn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||rt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(a(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=et),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},Yn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||rt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(a(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=tt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},Yn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},Yn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},pt("en",{eras:[{since:"0001-01-01",until:Infinity,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-Infinity,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===he(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),r.lang=k("moment.lang is deprecated. Use moment.locale instead.",pt),r.langData=k("moment.langData is deprecated. Use moment.localeData instead.",vt);var Nn=Math.abs;function An(e,t,n,r){var i=Jt(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function jn(e){return e<0?Math.floor(e):Math.ceil(e)}function Pn(e){return 4800*e/146097}function $n(e){return 146097*e/4800}function Vn(e){return function(){return this.as(e)}}var Rn=Vn("ms"),Wn=Vn("s"),Un=Vn("m"),In=Vn("h"),Ln=Vn("d"),Hn=Vn("w"),Gn=Vn("M"),zn=Vn("Q"),Zn=Vn("y"),qn=Rn;function Bn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Jn=Bn("milliseconds"),Qn=Bn("seconds"),Kn=Bn("minutes"),Xn=Bn("hours"),er=Bn("days"),tr=Bn("months"),nr=Bn("years"),rr=Math.round,ir={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function sr(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}var ar=Math.abs;function or(e){return(e>0)-(e<0)||+e}function ur(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,i,s,a,o,u=ar(this._milliseconds)/1e3,l=ar(this._days),c=ar(this._months),d=this.asSeconds();return d?(e=de(u/60),t=de(e/60),u%=60,e%=60,n=de(c/12),c%=12,r=u?u.toFixed(3).replace(/\.?0+$/,""):"",i=d<0?"-":"",s=or(this._months)!==or(d)?"-":"",a=or(this._days)!==or(d)?"-":"",o=or(this._milliseconds)!==or(d)?"-":"",i+"P"+(n?s+n+"Y":"")+(c?s+c+"M":"")+(l?a+l+"D":"")+(t||e||u?"T":"")+(t?o+t+"H":"")+(e?o+e+"M":"")+(u?o+r+"S":"")):"P0D"}var lr=Rt.prototype;return lr.isValid=function(){return this._isValid},lr.abs=function(){var e=this._data;return this._milliseconds=Nn(this._milliseconds),this._days=Nn(this._days),this._months=Nn(this._months),e.milliseconds=Nn(e.milliseconds),e.seconds=Nn(e.seconds),e.minutes=Nn(e.minutes),e.hours=Nn(e.hours),e.months=Nn(e.months),e.years=Nn(e.years),this},lr.add=function(e,t){return An(this,e,t,1)},lr.subtract=function(e,t){return An(this,e,t,-1)},lr.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=W(e))||"quarter"===e||"year"===e)switch(n=this._months+Pn(t=this._days+r/864e5),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round($n(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},lr.asMilliseconds=Rn,lr.asSeconds=Wn,lr.asMinutes=Un,lr.asHours=In,lr.asDays=Ln,lr.asWeeks=Hn,lr.asMonths=Gn,lr.asQuarters=zn,lr.asYears=Zn,lr.valueOf=qn,lr._bubble=function(){var e,t,n,r,i,s=this._milliseconds,a=this._days,o=this._months,u=this._data;return s>=0&&a>=0&&o>=0||s<=0&&a<=0&&o<=0||(s+=864e5*jn($n(o)+a),a=0,o=0),u.milliseconds=s%1e3,e=de(s/1e3),u.seconds=e%60,t=de(e/60),u.minutes=t%60,n=de(t/60),u.hours=n%24,a+=de(n/24),o+=i=de(Pn(a)),a-=jn($n(i)),r=de(o/12),o%=12,u.days=a,u.months=o,u.years=r,this},lr.clone=function(){return Jt(this)},lr.get=function(e){return e=W(e),this.isValid()?this[e+"s"]():NaN},lr.milliseconds=Jn,lr.seconds=Qn,lr.minutes=Kn,lr.hours=Xn,lr.days=er,lr.weeks=function(){return de(this.days()/7)},lr.months=tr,lr.years=nr,lr.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,i=!1,s=ir;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(i=e),"object"==typeof t&&(s=Object.assign({},ir,t),null!=t.s&&null==t.ss&&(s.ss=t.s-1)),r=function(e,t,n,r){var i=Jt(e).abs(),s=rr(i.as("s")),a=rr(i.as("m")),o=rr(i.as("h")),u=rr(i.as("d")),l=rr(i.as("M")),c=rr(i.as("w")),d=rr(i.as("y")),h=s<=n.ss&&["s",s]||s<n.s&&["ss",s]||a<=1&&["m"]||a<n.m&&["mm",a]||o<=1&&["h"]||o<n.h&&["hh",o]||u<=1&&["d"]||u<n.d&&["dd",u];return null!=n.w&&(h=h||c<=1&&["w"]||c<n.w&&["ww",c]),(h=h||l<=1&&["M"]||l<n.M&&["MM",l]||d<=1&&["y"]||["yy",d])[2]=t,h[3]=+e>0,h[4]=r,sr.apply(null,h)}(this,!i,s,n=this.localeData()),i&&(r=n.pastFuture(+this,r)),n.postformat(r)},lr.toISOString=ur,lr.toString=ur,lr.toJSON=ur,lr.locale=an,lr.localeData=un,lr.toIsoString=k("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ur),lr.lang=on,j("X",0,0,"unix"),j("x",0,0,"valueOf"),ue("x",ne),ue("X",/[+-]?\d+(\.\d{1,3})?/),me("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e))}),me("x",function(e,t,n){n._d=new Date(he(e))}),r.version="2.30.1",t=At,r.fn=Tn,r.min=function(){return $t("isBefore",[].slice.call(arguments,0))},r.max=function(){return $t("isAfter",[].slice.call(arguments,0))},r.now=function(){return Date.now?Date.now():+new Date},r.utc=f,r.unix=function(e){return At(1e3*e)},r.months=function(e,t){return En(e,t,"months")},r.isDate=c,r.locale=pt,r.invalid=y,r.duration=Jt,r.isMoment=b,r.weekdays=function(e,t,n){return Cn(e,t,n,"weekdays")},r.parseZone=function(){return At.apply(null,arguments).parseZone()},r.localeData=vt,r.isDuration=Wt,r.monthsShort=function(e,t){return En(e,t,"monthsShort")},r.weekdaysMin=function(e,t,n){return Cn(e,t,n,"weekdaysMin")},r.defineLocale=yt,r.updateLocale=function(e,t){if(null!=t){var n,r,i=lt;null!=ct[e]&&null!=ct[e].parentLocale?ct[e].set(M(ct[e]._config,t)):(null!=(r=mt(e))&&(i=r._config),t=M(i,t),null==r&&(t.abbr=e),(n=new Y(t)).parentLocale=ct[e],ct[e]=n),pt(e)}else null!=ct[e]&&(null!=ct[e].parentLocale?(ct[e]=ct[e].parentLocale,e===pt()&&pt(e)):null!=ct[e]&&delete ct[e]);return ct[e]},r.locales=function(){return S(ct)},r.weekdaysShort=function(e,t,n){return Cn(e,t,n,"weekdaysShort")},r.normalizeUnits=W,r.relativeTimeRounding=function(e){return void 0===e?rr:"function"==typeof e&&(rr=e,!0)},r.relativeTimeThreshold=function(e,t){return void 0!==ir[e]&&(void 0===t?ir[e]:(ir[e]=t,"s"===e&&(ir.ss=t-1),!0))},r.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},r.prototype=Tn,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r}()},F(E={exports:{}}),E.exports),N=function(e){return e.finishedAt&&e.startedAt?Math.abs(C(e.startedAt).diff(C(e.finishedAt),"seconds")):Math.abs(C().diff(C(e.startedAt),"seconds"))},A=function(n){var i,s=n.companyConfig,a=n.workplace,l=n.statusChange,c=e.useState({id:"last_status_change_"+a.id,workplaceId:a.id,metricId:"last_status_change",type:t.MetricTypeEnum.Kpi,statusColor:(null==l?void 0:l.reason.statusColor)||t.AndonLightColor.Gray,textValue:l?N(l).toString():"0",unit:t.MetricUnitEnum.Duration,active:!0}),d=c[0],h=c[1],f=r.useTranslation().t,m=null==s?void 0:s.workplacesConfigs.find(function(e){return e.workplaceId===a.id}),p=f(null!=m&&m.orderConfig.alternativeName?"AlternativeOrder":"Order"),y=null==l||null==(i=l.order)?void 0:i.number;return e.useEffect(function(){var e;return l&&(h(function(e){return u({},e,{statusColor:l.reason.statusColor,textValue:N(l).toString()})}),l.finishedAt||(e=setInterval(function(){h(function(e){return u({},e,{statusColor:l.reason.statusColor,textValue:N(l).toString()})})},1e4))),function(){e&&clearInterval(e)}},[l]),o.default.createElement(t.MetricCard,{title:a.name,metricLabel:(null==l?void 0:l.reason.name)||"",metricValue:d,extraValue:p+": "+(y||"-"),animateBackgroundColor:null==l?void 0:l.reason.temporary,rounded:!0})},j=function(t){var n=t.data,r=t.settings,s=e.useState([]),a=s[0],u=s[1];return e.useEffect(function(){var e=(null==r?void 0:r.workplacesIds)||[],t=(null==r?void 0:r.statusColors)||[],i=function(e){return((null==n?void 0:n.statusChanges)||[]).filter(function(t){return t.workplaceId===e.id}).sort(function(e,t){return new Date(e.startedAt).getTime()-new Date(t.startedAt).getTime()}).pop()};u((n.workplaces||[]).filter(function(t){return!e.length||-1!==e.indexOf(t.id)}).map(function(e){return{workplace:e,statusChange:i(e)}}).filter(function(e){var n;return!t.length||-1!==t.indexOf((null==(n=e.statusChange)?void 0:n.reason.statusColor)||"")}).sort(function(e,n){var r,i,s=null==(r=e.statusChange)?void 0:r.reason.statusColor,a=null==(i=n.statusChange)?void 0:i.reason.statusColor;return s&&a?t.indexOf(s)-t.indexOf(a):s?-1:1}))},[n,r]),o.default.createElement(i.List,{sx:{display:"flex",height:"100%","&:last-child":{marginRight:"10px"}}},a.slice(0,6).map(function(e){var t=e.workplace;return o.default.createElement(i.ListItem,{key:t.id,sx:{minWidth:"15.5vw",marginLeft:"10px",padding:0}},o.default.createElement(A,{companyConfig:n.companyConfig,workplace:t,statusChange:e.statusChange}))}))};function P(e){this._maxSize=e,this.clear()}P.prototype.clear=function(){this._size=0,this._values=Object.create(null)},P.prototype.get=function(e){return this._values[e]},P.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var $=/[^.^\]^[]+|(?=\[\]|\.\.)/g,V=/^\d+$/,R=/^\d/,W=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,U=/^\s*(['"]?)(.*?)(\1)\s*$/,I=new P(512),L=new P(512),H=new P(512),G={Cache:P,split:Z,normalizePath:z,setter:function(e){var t=z(e);return L.get(e)||L.set(e,function(e,n){for(var r=0,i=t.length,s=e;r<i-1;){var a=t[r];if("__proto__"===a||"constructor"===a||"prototype"===a)return e;s=s[t[r++]]}s[t[r]]=n})},getter:function(e,t){var n=z(e);return H.get(e)||H.set(e,function(e){for(var r=0,i=n.length;r<i;){if(null==e&&t)return;e=e[n[r++]]}return e})},join:function(e){return e.reduce(function(e,t){return e+(q(t)||V.test(t)?"["+t+"]":(e?".":"")+t)},"")},forEach:function(e,t,n){!function(e,t,n){var r,i,s,a,o=e.length;for(i=0;i<o;i++)(r=e[i])&&(B(r)&&(r='"'+r+'"'),s=!(a=q(r))&&/^\d+$/.test(r),t.call(n,r,a,s,i,e))}(Array.isArray(e)?e:Z(e),t,n)}};function z(e){return I.get(e)||I.set(e,Z(e).map(function(e){return e.replace(U,"$2")}))}function Z(e){return e.match($)||[""]}function q(e){return"string"==typeof e&&e&&-1!==["'",'"'].indexOf(e.charAt(0))}function B(e){return!q(e)&&(function(e){return e.match(R)&&!e.match(V)}(e)||function(e){return W.test(e)}(e))}const J=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,Q=e=>e.match(J)||[];var K=e=>Q(e).reduce((e,t)=>`${e}${e?t[0].toUpperCase()+t.slice(1).toLowerCase():t.toLowerCase()}`,""),X=e=>(e=>Q(e).join("_").toLowerCase())(e),ee=function(e){return te(function(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var i=e[n];t.add(i[0]),t.add(i[1])}return Array.from(t)}(e),e)};function te(e,t){var n=e.length,r=new Array(n),i={},s=n,a=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var i=e[n];t.has(i[0])||t.set(i[0],new Set),t.has(i[1])||t.set(i[1],new Set),t.get(i[0]).add(i[1])}return t}(t),o=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}(e);for(t.forEach(function(e){if(!o.has(e[0])||!o.has(e[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});s--;)i[s]||u(e[s],s,new Set);return r;function u(e,t,s){if(s.has(e)){var l;try{l=", node was:"+JSON.stringify(e)}catch(e){l=""}throw new Error("Cyclic dependency"+l)}if(!o.has(e))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(e));if(!i[t]){i[t]=!0;var c=a.get(e)||new Set;if(t=(c=Array.from(c)).length){s.add(e);do{var d=c[--t];u(d,o.get(d),s)}while(t);s.delete(e)}r[--n]=e}}}ee.array=te;const ne=Object.prototype.toString,re=Error.prototype.toString,ie=RegExp.prototype.toString,se="undefined"!=typeof Symbol?Symbol.prototype.toString:()=>"",ae=/^Symbol\((.*)\)(.*)$/;function oe(e,t=!1){if(null==e||!0===e||!1===e)return""+e;const n=typeof e;if("number"===n)return function(e){return e!=+e?"NaN":0===e&&1/e<0?"-0":""+e}(e);if("string"===n)return t?`"${e}"`:e;if("function"===n)return"[Function "+(e.name||"anonymous")+"]";if("symbol"===n)return se.call(e).replace(ae,"Symbol($1)");const r=ne.call(e).slice(8,-1);return"Date"===r?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===r||e instanceof Error?"["+re.call(e)+"]":"RegExp"===r?ie.call(e):null}function ue(e,t){let n=oe(e,t);return null!==n?n:JSON.stringify(e,function(e,n){let r=oe(this[e],t);return null!==r?r:n},2)}function le(e){return null==e?[]:[].concat(e)}let ce,de,he,fe=/\$\{\s*(\w+)\s*\}/g;ce=Symbol.toStringTag;class me{constructor(e,t,n,r){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[ce]="Error",this.name="ValidationError",this.value=t,this.path=n,this.type=r,this.errors=[],this.inner=[],le(e).forEach(e=>{pe.isError(e)?(this.errors.push(...e.errors),this.inner.push(...e.inner.length?e.inner:[e])):this.errors.push(e)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}de=Symbol.hasInstance,he=Symbol.toStringTag;class pe extends Error{static formatError(e,t){return t=Object.assign({},t,{path:t.label||t.path||"this",originalPath:t.path}),"string"==typeof e?e.replace(fe,(e,n)=>ue(t[n])):"function"==typeof e?e(t):e}static isError(e){return e&&"ValidationError"===e.name}constructor(e,t,n,r,i){const s=new me(e,t,n,r);if(i)return s;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[he]="Error",this.name=s.name,this.message=s.message,this.type=s.type,this.value=s.value,this.path=s.path,this.errors=s.errors,this.inner=s.inner,Error.captureStackTrace&&Error.captureStackTrace(this,pe)}static[de](e){return me[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let ye={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const i=null!=r&&r!==n?` (cast from the value \`${ue(r,!0)}\`).`:".";return"mixed"!==t?`${e} must be a \`${t}\` type, but the final value was: \`${ue(n,!0)}\``+i:`${e} must match the configured type. The validated value was: \`${ue(n,!0)}\``+i}},ve={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},ge={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},_e={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},we={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},be={notType:e=>{const{path:t,value:n,spec:r}=e,i=r.types.length;if(Array.isArray(n)){if(n.length<i)return`${t} tuple value has too few items, expected a length of ${i} but got ${n.length} for value: \`${ue(n,!0)}\``;if(n.length>i)return`${t} tuple value has too many items, expected a length of ${i} but got ${n.length} for value: \`${ue(n,!0)}\``}return pe.formatError(ye.notType,e)}};var xe=Object.assign(Object.create(null),{mixed:ye,string:ve,number:{min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},date:ge,object:_e,array:we,boolean:{isValue:"${path} field must be ${value}"},tuple:be});const ke=e=>e&&e.__isYupSchema__;class Se{static fromOptions(e,t){if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:r,otherwise:i}=t,s="function"==typeof n?n:(...e)=>e.every(e=>e===n);return new Se(e,(e,t)=>{var n;let a=s(...e)?r:i;return null!=(n=null==a?void 0:a(t))?n:t})}constructor(e,t){this.fn=void 0,this.refs=e,this.refs=e,this.fn=t}resolve(e,t){let n=this.refs.map(e=>e.getValue(null==t?void 0:t.value,null==t?void 0:t.parent,null==t?void 0:t.context)),r=this.fn(n,e,t);if(void 0===r||r===e)return e;if(!ke(r))throw new TypeError("conditions must return a schema object");return r.resolve(t)}}class De{constructor(e,t={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,"string"!=typeof e)throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),""===e)throw new TypeError("ref must be a non-empty string");this.isContext="$"===this.key[0],this.isValue="."===this.key[0],this.isSibling=!this.isContext&&!this.isValue,this.path=this.key.slice((this.isContext?"$":this.isValue?".":"").length),this.getter=this.path&&G.getter(this.path,!0),this.map=t.map}getValue(e,t,n){let r=this.isContext?n:this.isValue?e:t;return this.getter&&(r=this.getter(r||{})),this.map&&(r=this.map(r)),r}cast(e,t){return this.getValue(e,null==t?void 0:t.parent,null==t?void 0:t.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}De.prototype.__isYupRef=!0;const Oe=e=>null==e;function Te(e){function t({value:t,path:n="",options:r,originalValue:i,schema:s},a,o){const{name:u,test:l,params:c,message:d,skipAbsent:h}=e;let{parent:f,context:m,abortEarly:p=s.spec.abortEarly,disableStackTrace:y=s.spec.disableStackTrace}=r;const v={value:t,parent:f,context:m};function g(e={}){const r=Me(Object.assign({value:t,originalValue:i,label:s.spec.label,path:e.path||n,spec:s.spec,disableStackTrace:e.disableStackTrace||y},c,e.params),v),a=new pe(pe.formatError(e.message||d,r),t,r.path,e.type||u,r.disableStackTrace);return a.params=r,a}const _=p?a:o;let w={path:n,parent:f,type:u,from:r.from,createError:g,resolve:e=>Ye(e,v),options:r,originalValue:i,schema:s};const b=e=>{pe.isError(e)?_(e):e?o(null):_(g())},x=e=>{pe.isError(e)?_(e):a(e)};if(h&&Oe(t))return b(!0);let k;try{var S;if(k=l.call(w,t,w),"function"==typeof(null==(S=k)?void 0:S.then)){if(r.sync)throw new Error(`Validation test of type: "${w.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(k).then(b,x)}}catch(e){return void x(e)}b(k)}return t.OPTIONS=e,t}function Me(e,t){if(!e)return e;for(const n of Object.keys(e))e[n]=Ye(e[n],t);return e}function Ye(e,t){return De.isRef(e)?e.getValue(t.value,t.parent,t.context):e}function Fe(e,t,n,r=n){let i,s,a;return t?(G.forEach(t,(o,u,l)=>{let c=u?o.slice(1,o.length-1):o,d="tuple"===(e=e.resolve({context:r,parent:i,value:n})).type,h=l?parseInt(c,10):0;if(e.innerType||d){if(d&&!l)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${a}" must contain an index to the tuple element, e.g. "${a}[0]"`);if(n&&h>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${o}, in the path: ${t}. because there is no value at that index. `);i=n,n=n&&n[h],e=d?e.spec.types[h]:e.innerType}if(!l){if(!e.fields||!e.fields[c])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${a} which is a type: "${e.type}")`);i=n,n=n&&n[c],e=e.fields[c]}s=c,a=u?"["+o+"]":"."+o}),{schema:e,parent:i,parentPath:s}):{parent:i,parentPath:t,schema:e}}class Ee extends Set{describe(){const e=[];for(const t of this.values())e.push(De.isRef(t)?t.describe():t);return e}resolveAll(e){let t=[];for(const n of this.values())t.push(e(n));return t}clone(){return new Ee(this.values())}merge(e,t){const n=this.clone();return e.forEach(e=>n.add(e)),t.forEach(e=>n.delete(e)),n}}function Ce(e,t=new Map){if(ke(e)||!e||"object"!=typeof e)return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r<e.length;r++)n[r]=Ce(e[r],t)}else if(e instanceof Map){n=new Map,t.set(e,n);for(const[r,i]of e.entries())n.set(r,Ce(i,t))}else if(e instanceof Set){n=new Set,t.set(e,n);for(const r of e)n.add(Ce(r,t))}else{if(!(e instanceof Object))throw Error(`Unable to clone ${e}`);n={},t.set(e,n);for(const[r,i]of Object.entries(e))n[r]=Ce(i,t)}return n}function Ne(e){if(null==e||!e.length)return;const t=[];let n="",r=!1,i=!1;for(let s=0;s<e.length;s++){const a=e[s];"["!==a||i?"]"!==a||i?'"'!==a?"."!==a||r||i?n+=a:n&&(t.push(n),n=""):i=!i:(n&&(/^\d+$/.test(n)?t.push(n):t.push(n.replace(/^"|"$/g,"")),n=""),r=!1):(n&&(t.push(...n.split(".").filter(Boolean)),n=""),r=!0)}return n&&t.push(...n.split(".").filter(Boolean)),t}function Ae(e,t){var n;if((null==(n=e.inner)||!n.length)&&e.errors.length)return function(e,t){const n=t?`${t}.${e.path}`:e.path;return e.errors.map(e=>({message:e,path:Ne(n)}))}(e,t);const r=t?`${t}.${e.path}`:e.path;return e.inner.flatMap(e=>Ae(e,r))}class je{constructor(e){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new Ee,this._blacklist=new Ee,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(ye.notType)}),this.type=e.type,this._typeCheck=e.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},null==e?void 0:e.spec),this.withMutation(e=>{e.nonNullable()})}get _type(){return this.type}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const t=Object.create(Object.getPrototypeOf(this));return t.type=this.type,t._typeCheck=this._typeCheck,t._whitelist=this._whitelist.clone(),t._blacklist=this._blacklist.clone(),t.internalTests=Object.assign({},this.internalTests),t.exclusiveTests=Object.assign({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=Ce(Object.assign({},this.spec,e)),t}label(e){let t=this.clone();return t.spec.label=e,t}meta(...e){if(0===e.length)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}withMutation(e){let t=this._mutate;this._mutate=!0;let n=e(this);return this._mutate=t,n}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&"mixed"!==this.type)throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let t=this,n=e.clone();const r=Object.assign({},t.spec,n.spec);return n.spec=r,n.internalTests=Object.assign({},t.internalTests,n.internalTests),n._whitelist=t._whitelist.merge(e._whitelist,e._blacklist),n._blacklist=t._blacklist.merge(e._blacklist,e._whitelist),n.tests=t.tests,n.exclusiveTests=t.exclusiveTests,n.withMutation(t=>{e.tests.forEach(e=>{t.test(e.OPTIONS)})}),n.transforms=[...t.transforms,...n.transforms],n}isType(e){return null==e?!(!this.spec.nullable||null!==e)||!(!this.spec.optional||void 0!==e):this._typeCheck(e)}resolve(e){let t=this;if(t.conditions.length){let n=t.conditions;t=t.clone(),t.conditions=[],t=n.reduce((t,n)=>n.resolve(t,e),t),t=t.resolve(e)}return t}resolveOptions(e){var t,n,r,i;return Object.assign({},e,{from:e.from||[],strict:null!=(t=e.strict)?t:this.spec.strict,abortEarly:null!=(n=e.abortEarly)?n:this.spec.abortEarly,recursive:null!=(r=e.recursive)?r:this.spec.recursive,disableStackTrace:null!=(i=e.disableStackTrace)?i:this.spec.disableStackTrace})}cast(e,t={}){let n=this.resolve(Object.assign({},t,{value:e})),r="ignore-optionality"===t.assert,i=n._cast(e,t);if(!1!==t.assert&&!n.isType(i)){if(r&&Oe(i))return i;let s=ue(e),a=ue(i);throw new TypeError(`The value of ${t.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}". \n\nattempted value: ${s} \n`+(a!==s?`result of cast: ${a}`:""))}return i}_cast(e,t){let n=void 0===e?e:this.transforms.reduce((n,r)=>r.call(this,n,e,this,t),e);return void 0===n&&(n=this.getDefault(t)),n}_validate(e,t={},n,r){let{path:i,originalValue:s=e,strict:a=this.spec.strict}=t,o=e;a||(o=this._cast(o,Object.assign({assert:!1},t)));let u=[];for(let e of Object.values(this.internalTests))e&&u.push(e);this.runTests({path:i,value:o,originalValue:s,options:t,tests:u},n,e=>{if(e.length)return r(e,o);this.runTests({path:i,value:o,originalValue:s,options:t,tests:this.tests},n,r)})}runTests(e,t,n){let r=!1,{tests:i,value:s,originalValue:a,path:o,options:u}=e,l=e=>{r||(r=!0,t(e,s))},c=e=>{r||(r=!0,n(e,s))},d=i.length,h=[];if(!d)return c([]);let f={value:s,originalValue:a,path:o,options:u,schema:this};for(let e=0;e<i.length;e++)(0,i[e])(f,l,function(e){e&&(Array.isArray(e)?h.push(...e):h.push(e)),--d<=0&&c(h)})}asNestedTest({key:e,index:t,parent:n,parentPath:r,originalParent:i,options:s}){const a=null!=e?e:t;if(null==a)throw TypeError("Must include `key` or `index` for nested validations");const o="number"==typeof a;let u=n[a];const l=Object.assign({},s,{strict:!0,parent:n,value:u,originalValue:i[a],key:void 0,[o?"index":"key"]:a,path:o||a.includes(".")?`${r||""}[${o?a:`"${a}"`}]`:(r?`${r}.`:"")+e});return(e,t,n)=>this.resolve(l)._validate(u,l,t,n)}validate(e,t){var n;let r=this.resolve(Object.assign({},t,{value:e})),i=null!=(n=null==t?void 0:t.disableStackTrace)?n:r.spec.disableStackTrace;return new Promise((n,s)=>r._validate(e,t,(e,t)=>{pe.isError(e)&&(e.value=t),s(e)},(e,t)=>{e.length?s(new pe(e,t,void 0,void 0,i)):n(t)}))}validateSync(e,t){var n;let r,i=this.resolve(Object.assign({},t,{value:e})),s=null!=(n=null==t?void 0:t.disableStackTrace)?n:i.spec.disableStackTrace;return i._validate(e,Object.assign({},t,{sync:!0}),(e,t)=>{throw pe.isError(e)&&(e.value=t),e},(t,n)=>{if(t.length)throw new pe(t,e,void 0,void 0,s);r=n}),r}isValid(e,t){return this.validate(e,t).then(()=>!0,e=>{if(pe.isError(e))return!1;throw e})}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(e){if(pe.isError(e))return!1;throw e}}_getDefault(e){let t=this.spec.default;return null==t?t:"function"==typeof t?t.call(this,e):Ce(t)}getDefault(e){return this.resolve(e||{})._getDefault(e)}default(e){return 0===arguments.length?this._getDefault():this.clone({default:e})}strict(e=!0){return this.clone({strict:e})}nullability(e,t){const n=this.clone({nullable:e});return n.internalTests.nullable=Te({message:t,name:"nullable",test(e){return null!==e||this.schema.spec.nullable}}),n}optionality(e,t){const n=this.clone({optional:e});return n.internalTests.optionality=Te({message:t,name:"optionality",test(e){return void 0!==e||this.schema.spec.optional}}),n}optional(){return this.optionality(!0)}defined(e=ye.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=ye.notNull){return this.nullability(!1,e)}required(e=ye.required){return this.clone().withMutation(t=>t.nonNullable(e).defined(e))}notRequired(){return this.clone().withMutation(e=>e.nullable().optional())}transform(e){let t=this.clone();return t.transforms.push(e),t}test(...e){let t;if(t=1===e.length?"function"==typeof e[0]?{test:e[0]}:e[0]:2===e.length?{name:e[0],test:e[1]}:{name:e[0],message:e[1],test:e[2]},void 0===t.message&&(t.message=ye.default),"function"!=typeof t.test)throw new TypeError("`test` is a required parameters");let n=this.clone(),r=Te(t),i=t.exclusive||t.name&&!0===n.exclusiveTests[t.name];if(t.exclusive&&!t.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(n.exclusiveTests[t.name]=!!t.exclusive),n.tests=n.tests.filter(e=>{if(e.OPTIONS.name===t.name){if(i)return!1;if(e.OPTIONS.test===r.OPTIONS.test)return!1}return!0}),n.tests.push(r),n}when(e,t){Array.isArray(e)||"string"==typeof e||(t=e,e=".");let n=this.clone(),r=le(e).map(e=>new De(e));return r.forEach(e=>{e.isSibling&&n.deps.push(e.key)}),n.conditions.push("function"==typeof t?new Se(r,t):Se.fromOptions(r,t)),n}typeError(e){let t=this.clone();return t.internalTests.typeError=Te({message:e,name:"typeError",skipAbsent:!0,test(e){return!!this.schema._typeCheck(e)||this.createError({params:{type:this.schema.type}})}}),t}oneOf(e,t=ye.oneOf){let n=this.clone();return e.forEach(e=>{n._whitelist.add(e),n._blacklist.delete(e)}),n.internalTests.whiteList=Te({message:t,name:"oneOf",skipAbsent:!0,test(e){let t=this.schema._whitelist,n=t.resolveAll(this.resolve);return!!n.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:n}})}}),n}notOneOf(e,t=ye.notOneOf){let n=this.clone();return e.forEach(e=>{n._blacklist.add(e),n._whitelist.delete(e)}),n.internalTests.blacklist=Te({message:t,name:"notOneOf",test(e){let t=this.schema._blacklist,n=t.resolveAll(this.resolve);return!n.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:n}})}}),n}strip(e=!0){let t=this.clone();return t.spec.strip=e,t}describe(e){const t=(e?this.resolve(e):this).clone(),{label:n,meta:r,optional:i,nullable:s}=t.spec,a={meta:r,label:n,optional:i,nullable:s,default:t.getDefault(e),type:t.type,oneOf:t._whitelist.describe(),notOneOf:t._blacklist.describe(),tests:t.tests.filter((e,t,n)=>n.findIndex(t=>t.OPTIONS.name===e.OPTIONS.name)===t).map(t=>{const n=t.OPTIONS.params&&e?Me(Object.assign({},t.OPTIONS.params),e):t.OPTIONS.params;return{name:t.OPTIONS.name,params:n}})};return a}get"~standard"(){const e=this;return{version:1,vendor:"yup",async validate(t){try{return{value:await e.validate(t,{abortEarly:!1})}}catch(e){if(e instanceof pe)return{issues:Ae(e)};throw e}}}}}je.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])je.prototype[`${e}At`]=function(t,n,r={}){const{parent:i,parentPath:s,schema:a}=Fe(this,t,n,r.context);return a[e](i&&i[s],Object.assign({},r,{parent:i,path:t}))};for(const e of["equals","is"])je.prototype[e]=je.prototype.oneOf;for(const e of["not","nope"])je.prototype[e]=je.prototype.notOneOf;const Pe=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function $e(e){var t,n;const r=Pe.exec(e);return r?{year:Ve(r[1]),month:Ve(r[2],1)-1,day:Ve(r[3],1),hour:Ve(r[4]),minute:Ve(r[5]),second:Ve(r[6]),millisecond:r[7]?Ve(r[7].substring(0,3)):0,precision:null!=(t=null==(n=r[7])?void 0:n.length)?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:Ve(r[10]),minuteOffset:Ve(r[11])}:null}function Ve(e,t=0){return Number(e)||t}let Re=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,We=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,Ue=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Ie=new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"),Le=e=>Oe(e)||e===e.trim(),He={}.toString();function Ge(){return new ze}class ze extends je{constructor(){super({type:"string",check:e=>(e instanceof String&&(e=e.valueOf()),"string"==typeof e)}),this.withMutation(()=>{this.transform((e,t)=>{if(!this.spec.coerce||this.isType(e))return e;if(Array.isArray(e))return e;const n=null!=e&&e.toString?e.toString():e;return n===He?e:n})})}required(e){return super.required(e).withMutation(t=>t.test({message:e||ye.required,name:"required",skipAbsent:!0,test:e=>!!e.length}))}notRequired(){return super.notRequired().withMutation(e=>(e.tests=e.tests.filter(e=>"required"!==e.OPTIONS.name),e))}length(e,t=ve.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(t){return t.length===this.resolve(e)}})}min(e,t=ve.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t.length>=this.resolve(e)}})}max(e,t=ve.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}matches(e,t){let n,r,i=!1;return t&&("object"==typeof t?({excludeEmptyString:i=!1,message:n,name:r}=t):n=t),this.test({name:r||"matches",message:n||ve.matches,params:{regex:e},skipAbsent:!0,test:t=>""===t&&i||-1!==t.search(e)})}email(e=ve.email){return this.matches(Re,{name:"email",message:e,excludeEmptyString:!0})}url(e=ve.url){return this.matches(We,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=ve.uuid){return this.matches(Ue,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let t,n,r="";return e&&("object"==typeof e?({message:r="",allowOffset:t=!1,precision:n}=e):r=e),this.matches(Ie,{name:"datetime",message:r||ve.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||ve.datetime_offset,params:{allowOffset:t},skipAbsent:!0,test:e=>{if(!e||t)return!0;const n=$e(e);return!!n&&!!n.z}}).test({name:"datetime_precision",message:r||ve.datetime_precision,params:{precision:n},skipAbsent:!0,test:e=>{if(!e||null==n)return!0;const t=$e(e);return!!t&&t.precision===n}})}ensure(){return this.default("").transform(e=>null===e?"":e)}trim(e=ve.trim){return this.transform(e=>null!=e?e.trim():e).test({message:e,name:"trim",test:Le})}lowercase(e=ve.lowercase){return this.transform(e=>Oe(e)?e:e.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>Oe(e)||e===e.toLowerCase()})}uppercase(e=ve.uppercase){return this.transform(e=>Oe(e)?e:e.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>Oe(e)||e===e.toUpperCase()})}}Ge.prototype=ze.prototype;let Ze=new Date("");class qe extends je{constructor(){super({type:"date",check:e=>"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e.getTime())}),this.withMutation(()=>{this.transform((e,t)=>!this.spec.coerce||this.isType(e)||null===e?e:(e=function(e){const t=$e(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(void 0===t.z&&void 0===t.plusMinus)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return"Z"!==t.z&&void 0!==t.plusMinus&&(n=60*t.hourOffset+t.minuteOffset,"+"===t.plusMinus&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}(e),isNaN(e)?qe.INVALID_DATE:new Date(e)))})}prepareParam(e,t){let n;if(De.isRef(e))n=e;else{let r=this.cast(e);if(!this._typeCheck(r))throw new TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);n=r}return n}min(e,t=ge.min){let n=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(e){return e>=this.resolve(n)}})}max(e,t=ge.max){let n=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(e){return e<=this.resolve(n)}})}}function Be(e,t){let n=Infinity;return e.some((e,r)=>{var i;if(null!=(i=t.path)&&i.includes(e))return n=r,!0}),n}function Je(e){return(t,n)=>Be(e,t)-Be(e,n)}qe.INVALID_DATE=Ze;const Qe=(e,t,n)=>{if("string"!=typeof e)return e;let r=e;try{r=JSON.parse(e)}catch(e){}return n.isType(r)?r:e};function Ke(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=Ke(r);return e.setFields(t)}if("array"===e.type){const t=e.optional();return t.innerType&&(t.innerType=Ke(t.innerType)),t}return"tuple"===e.type?e.optional().clone({types:e.spec.types.map(Ke)}):"optional"in e?e.optional():e}let Xe=e=>"[object Object]"===Object.prototype.toString.call(e);function et(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(e=>-1===n.indexOf(e))}const tt=Je([]);function nt(e){return new rt(e)}class rt extends je{constructor(e){super({type:"object",check:e=>Xe(e)||"function"==typeof e}),this.fields=Object.create(null),this._sortErrors=tt,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{e&&this.shape(e)})}_cast(e,t={}){var n;let r=super._cast(e,t);if(void 0===r)return this.getDefault(t);if(!this._typeCheck(r))return r;let i=this.fields,s=null!=(n=t.stripUnknown)?n:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(r).filter(e=>!this._nodes.includes(e))),o={},u=Object.assign({},t,{parent:o,__validating:t.__validating||!1}),l=!1;for(const e of a){let n=i[e],a=e in r,c=r[e];if(n){let i;u.path=(t.path?`${t.path}.`:"")+e,n=n.resolve({value:c,context:t.context,parent:o});let s=n instanceof je?n.spec:void 0,a=null==s?void 0:s.strict;if(null!=s&&s.strip){l=l||e in r;continue}i=t.__validating&&a?c:n.cast(c,u),void 0!==i&&(o[e]=i)}else a&&!s&&(o[e]=c);a===e in o&&o[e]===c||(l=!0)}return l?o:r}_validate(e,t={},n,r){let{from:i=[],originalValue:s=e,recursive:a=this.spec.recursive}=t;t.from=[{schema:this,value:s},...i],t.__validating=!0,t.originalValue=s,super._validate(e,t,n,(e,i)=>{if(!a||!Xe(i))return void r(e,i);s=s||i;let o=[];for(let e of this._nodes){let n=this.fields[e];n&&!De.isRef(n)&&o.push(n.asNestedTest({options:t,key:e,parent:i,parentPath:t.path,originalParent:s}))}this.runTests({tests:o,value:i,originalValue:s,options:t},n,t=>{r(t.sort(this._sortErrors).concat(e),i)})})}clone(e){const t=super.clone(e);return t.fields=Object.assign({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(e){let t=super.concat(e),n=t.fields;for(let[e,t]of Object.entries(this.fields)){const r=n[e];n[e]=void 0===r?t:r}return t.withMutation(t=>t.setFields(n,[...this._excludedEdges,...e._excludedEdges]))}_getDefault(e){if("default"in this.spec)return super._getDefault(e);if(!this._nodes.length)return;let t={};return this._nodes.forEach(n=>{var r;const i=this.fields[n];let s=e;null!=(r=s)&&r.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[n]})),t[n]=i&&"getDefault"in i?i.getDefault(s):void 0}),t}setFields(e,t){let n=this.clone();return n.fields=e,n._nodes=function(e,t=[]){let n=[],r=new Set,i=new Set(t.map(([e,t])=>`${e}-${t}`));function s(e,t){let s=G.split(e)[0];r.add(s),i.has(`${t}-${s}`)||n.push([t,s])}for(const t of Object.keys(e)){let n=e[t];r.add(t),De.isRef(n)&&n.isSibling?s(n.path,t):ke(n)&&"deps"in n&&n.deps.forEach(e=>s(e,t))}return ee.array(Array.from(r),n).reverse()}(e,t),n._sortErrors=Je(Object.keys(e)),t&&(n._excludedEdges=t),n}shape(e,t=[]){return this.clone().withMutation(n=>{let r=n._excludedEdges;return t.length&&(Array.isArray(t[0])||(t=[t]),r=[...n._excludedEdges,...t]),n.setFields(Object.assign(n.fields,e),r)})}partial(){const e={};for(const[t,n]of Object.entries(this.fields))e[t]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(e)}deepPartial(){return Ke(this)}pick(e){const t={};for(const n of e)this.fields[n]&&(t[n]=this.fields[n]);return this.setFields(t,this._excludedEdges.filter(([t,n])=>e.includes(t)&&e.includes(n)))}omit(e){const t=[];for(const n of Object.keys(this.fields))e.includes(n)||t.push(n);return this.pick(t)}from(e,t,n){let r=G.getter(e,!0);return this.transform(i=>{if(!i)return i;let s=i;return((e,t)=>{const n=[...G.normalizePath(t)];if(1===n.length)return n[0]in e;let r=n.pop(),i=G.getter(G.join(n),!0)(e);return!(!i||!(r in i))})(i,e)&&(s=Object.assign({},i),n||delete s[e],s[t]=r(i)),s})}json(){return this.transform(Qe)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||_e.exact,test(e){if(null==e)return!0;const t=et(this.schema,e);return 0===t.length||this.createError({params:{properties:t.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,t=_e.noUnknown){"boolean"!=typeof e&&(t=e,e=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:t,test(t){if(null==t)return!0;const n=et(this.schema,t);return!e||0===n.length||this.createError({params:{unknown:n.join(", ")}})}});return n.spec.noUnknown=e,n}unknown(e=!0,t=_e.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform(t=>{if(!t)return t;const n={};for(const r of Object.keys(t))n[e(r)]=t[r];return n})}camelCase(){return this.transformKeys(K)}snakeCase(){return this.transformKeys(X)}constantCase(){return this.transformKeys(e=>X(e).toUpperCase())}describe(e){const t=(e?this.resolve(e):this).clone(),n=super.describe(e);n.fields={};for(const[i,s]of Object.entries(t.fields)){var r;let t=e;null!=(r=t)&&r.value&&(t=Object.assign({},t,{parent:t.value,value:t.value[i]})),n.fields[i]=s.describe(t)}return n}}function it(e){return new st(e)}nt.prototype=rt.prototype;class st extends je{constructor(e){super({type:"array",spec:{types:e},check:e=>Array.isArray(e)}),this.innerType=void 0,this.innerType=e}_cast(e,t){const n=super._cast(e,t);if(!this._typeCheck(n)||!this.innerType)return n;let r=!1;const i=n.map((e,i)=>{const s=this.innerType.cast(e,Object.assign({},t,{path:`${t.path||""}[${i}]`,parent:n,originalValue:e,value:e,index:i}));return s!==e&&(r=!0),s});return r?i:n}_validate(e,t={},n,r){var i;let s=this.innerType,a=null!=(i=t.recursive)?i:this.spec.recursive;super._validate(e,t,n,(i,o)=>{var u;if(!a||!s||!this._typeCheck(o))return void r(i,o);let l=new Array(o.length);for(let n=0;n<o.length;n++){var c;l[n]=s.asNestedTest({options:t,index:n,parent:o,parentPath:t.path,originalParent:null!=(c=t.originalValue)?c:e})}this.runTests({value:o,tests:l,originalValue:null!=(u=t.originalValue)?u:e,options:t},n,e=>r(e.concat(i),o))})}clone(e){const t=super.clone(e);return t.innerType=this.innerType,t}json(){return this.transform(Qe)}concat(e){let t=super.concat(e);return t.innerType=this.innerType,e.innerType&&(t.innerType=t.innerType?t.innerType.concat(e.innerType):e.innerType),t}of(e){let t=this.clone();if(!ke(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+ue(e));return t.innerType=e,t.spec=Object.assign({},t.spec,{types:e}),t}length(e,t=we.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(t){return t.length===this.resolve(e)}})}min(e,t){return this.test({message:t=t||we.min,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t.length>=this.resolve(e)}})}max(e,t){return this.test({message:t=t||we.max,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}ensure(){return this.default(()=>[]).transform((e,t)=>this._typeCheck(e)?e:null==t?[]:[].concat(t))}compact(e){let t=e?(t,n,r)=>!e(t,n,r):e=>!!e;return this.transform(e=>null!=e?e.filter(t):e)}describe(e){const t=(e?this.resolve(e):this).clone(),n=super.describe(e);if(t.innerType){var r;let i=e;null!=(r=i)&&r.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[0]})),n.innerType=t.innerType.describe(i)}return n}}it.prototype=st.prototype;var at=function(e){var t;return t={mixed:{required:e("This field is required")}},Object.keys(t).forEach(e=>{Object.keys(t[e]).forEach(n=>{xe[e][n]=t[e][n]})}),{initialValues:{statusColors:[],workplacesIds:[]},validationSchema:nt({statusColors:it().of(Ge()).required(),workplacesIds:it().of(Ge()).required()})}},ot=["url","wsUrl","lang","data"];exports.Widget=function(r){var i=r.url,s=r.wsUrl,a=r.lang,l=r.data,c=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(r,ot),h=t.useGqlClients({url:i,wsUrl:s,lang:a}),m=h.graphqlSdk,_=h.gqlWsClient,w=e.useState(!1),b=w[0],x=w[1],k=e.useState(l),S=k[0],D=k[1];return e.useEffect(function(){!S&&m&&(m.companyConfig().then(function(e){var t=e.companyConfig;return D(function(e){return u({},e||{},{companyConfig:t})})}).catch(function(){}),m.listWorkplaces().then(function(e){var t=e.workplaces;return D(function(e){return u({},e||{},{workplaces:t})})}).catch(function(){}),m.listStatusChanges({filter:{period:t.Period.CurrentShift}}).then(function(e){var t=e.statusChanges;return D(function(e){return u({},e||{},{statusChanges:t})})}).catch(function(){})),null!=S&&S.workplaces&&_&&!b&&S.workplaces.forEach(function(e){var n=e.id;_.subscribe(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p,r=void 0,i=Array.isArray(e),s=[e],a=-1,o=[],u=void 0,l=void 0,c=void 0,h=[],m=[],g=e;do{var _=++a===s.length,w=_&&0!==o.length;if(_){if(l=0===m.length?void 0:h[h.length-1],u=c,c=m.pop(),w){if(i)u=u.slice();else{for(var b={},x=0,k=Object.keys(u);x<k.length;x++){var S=k[x];b[S]=u[S]}u=b}for(var D=0,O=0;O<o.length;O++){var T=o[O][0],M=o[O][1];i&&(T-=D),i&&null===M?(u.splice(T,1),D++):u[T]=M}}a=r.index,s=r.keys,o=r.edits,i=r.inArray,r=r.prev}else{if(l=c?i?a:s[a]:void 0,null==(u=c?c[l]:g))continue;c&&h.push(l)}var Y,F=void 0;if(!Array.isArray(u)){if(!d(u))throw new Error("Invalid AST Node: ".concat(f(u),"."));var E=v(t,u.kind,_);if(E){if((F=E.call(t,u,l,c,h,m))===y)break;if(!1===F){if(!_){h.pop();continue}}else if(void 0!==F&&(o.push([l,F]),!_)){if(!d(F)){h.pop();continue}u=F}}}void 0===F&&w&&o.push([l,u]),_?h.pop():(r={inArray:i,index:a,keys:s,edits:o,prev:r},s=(i=Array.isArray(u))?u:null!==(Y=n[u.kind])&&void 0!==Y?Y:[],a=-1,o=[],c&&m.push(c),c=u)}while(void 0!==r);return 0!==o.length&&(g=o[o.length-1][1]),g}(t.WorkplaceEventDocument,{leave:g}),{id:n},function(e){var n=e.event,r=e.subject;if(n===t.WorkplaceEvent.StatusChangeCreated){var i=r;D(function(e){return u({},e||{},{statusChanges:[i].concat(e.statusChanges)})})}else if(n===t.WorkplaceEvent.StatusChangeUpdated){var s=r;D(function(e){var t=e.statusChanges.map(function(e){return e.id===s.id?s:e});return u({},e||{},{statusChanges:t})})}else n===t.WorkplaceEvent.CurrentShiftChanged&&m&&m.listStatusChanges({filter:{period:t.Period.CurrentShift}}).then(function(e){var t=e.statusChanges;return D(function(e){return u({},e||{},{statusChanges:t})})}).catch(function(){})}),x(!0)})},[l,m,_,b,S]),o.default.createElement(n.BaseWidget,u({lang:a,locales:O,data:S,gqlClients:{graphqlSdk:m,gqlWsClient:_},WidgetView:j,getSettingsFormProps:at,SettingsFormContent:Y,version:T,"data-testid":"workplaces-status-widget"},c))},exports.extraPermissions=[],exports.getDisplayName=function(e){switch(e){case"en":return"Workplaces statuses";case"pl":return"Statusy stanowisk";default:return"workplaces-status-widget"}},exports.requiredFeatures=["feature.workplaces-status-widget"],exports.version=T;
2
2
  //# sourceMappingURL=index.js.map