/*!
 * IPM Sistemas (C) - Atende.net (C) - 2024
 * https://www.ipm.com.br/
 * Direitos Reservados
 * ESTE CÓDIGO FONTE E QUALQUER DOCUMENTAÇÃO QUE O ACOMPANHE SÃO PROTEGIDOS PELA LEI DE DIREITOS AUTORAIS INTERNACIONAIS
 * E NÃO PODE SER REVENDIDO OU REDISTRIBUÍDO. A REPRODUÇÃO OU DISTRIBUIÇÃO NÃO AUTORIZADA ESTÁ SUJEITA A PENALIDADES CIVIS E PENAIS.
 */

/*<editor-fold desc="js_componentes.js">*//*
 {ipm "async": false, "bundle": "componentes", "priority": 999}
 IPM Sistemas (C) - Atende.net (C) - 2022
 https://www.ipm.com.br/
 Direitos Reservados
 ESTE CÓDIGO FONTE E QUALQUER DOCUMENTAÇÃO QUE O ACOMPANHE SÃO PROTEGIDOS PELA LEI DE DIREITOS AUTORAIS INTERNACIONAIS
 E NÃO PODE SER REVENDIDO OU REDISTRIBUÍDO. A REPRODUÇÃO OU DISTRIBUIÇÃO NÃO AUTORIZADA ESTÁ SUJEITA A PENALIDADES CIVIS E PENAIS.
*/
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(a){return a.raw=a};$jscomp.createTemplateTagFirstArgWithRaw=function(a,b){a.raw=b;return a};$jscomp.arrayIteratorImpl=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};$jscomp.arrayIterator=function(a){return{next:$jscomp.arrayIteratorImpl(a)}};$jscomp.makeIterator=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):$jscomp.arrayIterator(a)};
$jscomp.arrayFromIterator=function(a){for(var b,c=[];!(b=a.next()).done;)c.push(b.value);return c};$jscomp.arrayFromIterable=function(a){return a instanceof Array?a:$jscomp.arrayFromIterator($jscomp.makeIterator(a))};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;
$jscomp.objectCreate=$jscomp.ASSUME_ES5||"function"==typeof Object.create?Object.create:function(a){var b=function(){};b.prototype=a;return new b};$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};
$jscomp.getGlobal=function(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};
$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(a,b){var c=$jscomp.propertyToPolyfillSymbol[b];if(null==c)return a[b];c=a[c];return void 0!==c?c:a[b]};$jscomp.polyfill=function(a,b,c,d){b&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(a,b,c,d):$jscomp.polyfillUnisolated(a,b,c,d))};
$jscomp.polyfillUnisolated=function(a,b,c,d){c=$jscomp.global;a=a.split(".");for(d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))return;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&$jscomp.defineProperty(c,a,{configurable:!0,writable:!0,value:b})};
$jscomp.polyfillIsolated=function(a,b,c,d){var e=a.split(".");a=1===e.length;d=e[0];d=!a&&d in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var f=0;f<e.length-1;f++){var g=e[f];if(!(g in d))return;d=d[g]}e=e[e.length-1];c=$jscomp.IS_SYMBOL_NATIVE&&"es6"===c?d[e]:null;b=b(c);null!=b&&(a?$jscomp.defineProperty($jscomp.polyfills,e,{configurable:!0,writable:!0,value:b}):b!==c&&(void 0===$jscomp.propertyToPolyfillSymbol[e]&&($jscomp.propertyToPolyfillSymbol[e]=$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(e):
$jscomp.POLYFILL_PREFIX+e),e=$jscomp.propertyToPolyfillSymbol[e],$jscomp.defineProperty(d,e,{configurable:!0,writable:!0,value:b})))};
$jscomp.getConstructImplementation=function(){function a(){function c(){}new c;Reflect.construct(c,[],function(){});return new c instanceof c}if($jscomp.TRUST_ES6_POLYFILLS&&"undefined"!=typeof Reflect&&Reflect.construct){if(a())return Reflect.construct;var b=Reflect.construct;return function(c,d,e){c=b(c,d);e&&Reflect.setPrototypeOf(c,e.prototype);return c}}return function(c,d,e){void 0===e&&(e=c);e=$jscomp.objectCreate(e.prototype||Object.prototype);return Function.prototype.apply.call(c,e,d)||
e}};$jscomp.construct={valueOf:$jscomp.getConstructImplementation}.valueOf();$jscomp.underscoreProtoCanBeSet=function(){var a={a:!0},b={};try{return b.__proto__=a,b.a}catch(c){}return!1};$jscomp.setPrototypeOf=$jscomp.TRUST_ES6_POLYFILLS&&"function"==typeof Object.setPrototypeOf?Object.setPrototypeOf:$jscomp.underscoreProtoCanBeSet()?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null;
$jscomp.inherits=function(a,b){a.prototype=$jscomp.objectCreate(b.prototype);a.prototype.constructor=a;if($jscomp.setPrototypeOf){var c=$jscomp.setPrototypeOf;c(a,b)}else for(c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.superClass_=b.prototype};
var ComponenteTela=function(){this.obj;this.parent;this.instanceComponente=this;this.nome=this.objectData=this.aOnAppendTo=this.aOnAfterAppend=null;this.visualizacao=this.obrigatorio=!1;this.instanceComponenteForm=this;this.disparaEventosVisualizacao=!1;this.eventosJavascript=null;this.tipoComponente="componente";this.onAppendTo=function(a){null==this.aOnAppendTo&&(this.aOnAppendTo=[]);this.aOnAppendTo.push(a)};this.onAfterAppend=function(a){null==this.aOnAfterAppend&&(this.aOnAfterAppend=[]);this.aOnAfterAppend.push(a)};
this.isModoVisualizacao=function(){return this.getVisualizacao()&&(isInstanceOf(this,[ComponenteForm])||ComponenteTela.isTipo(this,[ComponenteTela.CAMPO_TEXTO,ComponenteTela.BOTAO,ComponenteTela.BOTAO_ACAO,ComponenteTela.BOTAO_AUTH_GOOGLE,ComponenteTela.BOTAO_PICKER_GOOGLE_DRIVE,ComponenteTela.COLOR_PICKER,ComponenteTela.CARD]))};this.appendTo=function(a){this.isModoVisualizacao()&&this.appendVisualizacao();a=$(a);if(null!=this.aOnAppendTo)for(var b=0;b<this.aOnAppendTo.length;b++)this.aOnAppendTo[b].apply(this.obj.get(0),
[this]);a.append(this.getObjAppend());if(null!=this.aOnAfterAppend)for(b=0;b<this.aOnAfterAppend.length;b++)this.aOnAfterAppend[b].apply(this.obj.get(0),[this]);this.__limpaOnAfterAppend&&(this.aOnAfterAppend=this.aOnAppendTo=null);return this.obj};this.prependTo=function(a){a=$(a);if(null!=this.aOnAppendTo)for(var b=0;b<this.aOnAppendTo.length;b++)this.aOnAppendTo[b].apply(this.obj.get(0),[this]);a.prepend(this.obj);if(null!=this.aOnAfterAppend)for(b=0;b<this.aOnAfterAppend.length;b++)this.aOnAfterAppend[b].apply(this.obj.get(0),
[this]);this.__limpaOnAfterAppend&&(this.aOnAfterAppend=this.aOnAppendTo=null);return this.obj};this.setLimpaOnAfterAppend=function(a){this.__limpaOnAfterAppend=a};this.onActivateJanela=function(){};this.criaObjeto=function(a){this.obj=$(document.createElement(a));this.obj.data("instance",this);this.obj[0].myInstance=this;a="__estrutura_componente_base";ControleBaseSistema.isLayoutV3()&&(a+=" "+this.getClasseTipoComponenteTela());this.addClass(a)};this.getClasseTipoComponenteTela=function(){return"componente-tela-"+
this.tipoComponente.replace(/_/g,"-")};this.cE=function(a,b){return b?document.createElementNS(b,a):document.createElement(a)};this.get=function(){return this.obj};this.isVisible=function(){return this.getObj().is(":visible")};this.setClass=function(a){this.addClass(a)};this.addClass=function(a){this.getObjAppend().addClass(a);return this};this.hasClass=function(a){return this.getObjAppend().hasClass(a)};this.toggleClass=function(a,b){is_und(b)&&(b=!this.hasClass(a));this.getObjAppend().toggleClass(a,
b);return this};this.replaceClass=function(a,b){this.removeClass(a).addClass(b);return this};this.removeClass=function(a){this.getObjAppend().removeClass(a);return this};this.setAtributo=function(a,b){this.obj.attr(a,b);this.obj.prop(a,b);return this.obj};this.setAtributos=function(a){for(var b in a)this.setAtributo(b,a[b]);return this};this.attr=function(a,b){if($.isArray(a))for(var c in a)this.attr(c,a[c]);else this.obj.attr(a,b),this.obj.prop(a,b);return this};this.getAtributo=function(a){switch(a){case "value":case "checked":return this.obj.prop(a);
default:return defaultVal(this.obj.attr(a),this.obj.prop(a))}};this.removeAtributo=function(a){this.obj.removeAttr(a);this.obj.removeProp(a);return this.obj};this.css=function(){this.getAlvoEstilo().css.apply(this.getAlvoEstilo(),arguments);return this};this.getAlvoEstilo=function(){return this.getObjAppend()};this.setCss=function(){return this.css.apply(this,arguments)};this.setStyle=function(){return this.css.apply(this,arguments)};this.hide=function(){ControleBaseSistema.isLayoutV3()?(this.getObjAppend().hide(),
this.useSlot().parent().hide()):this.getObjAppend().hide();return this};this.useSlot=function(){var a=this.getObjectData("slot-componente");a&&a.length||(a=this.getObjAppend().closest(".slot-componente"),a.children().is(this.getObjAppend())||a.children().children().is(this.getObjAppend())||(a=null));return $(a)};this.show=function(){ControleBaseSistema.isLayoutV3()?(this.getObjAppend().show(),this.useSlot().parent().show()):this.getObjAppend().show();return this};this.getObj=function(){return this.obj};
this.getObjAppend=function(){return this.obj};this.getComponenteLabel=function(){return this.componenteLabel};this.getJanela=function(){return Janela.getJanelFromObj(this.getObj())};this.findComponente=function(a){return this.nome==a?this:!1};this.getNome=function(){return this.nome};this.setIniHidden=function(a){a?this.hide():this.show()};this.onClick=function(a){this.obj.on("click",a)};this.setObjectData=function(a,b){this.objectData||(this.objectData={});this.objectData[a]=b};this.getObjectData=
function(a){this.objectData||(this.objectData={});return a?this.objectData[a]:this.objectData};this.setParent=function(a){this.parent=a};this.getParent=function(){return this.parent};this.getParentRoot=function(){for(var a=this,b=this;b;)(b=a.getParent())&&(a=b);return a};this.appendToFrame=function(a,b,c){this.codigoRotina=b;this.codigoAcao=c;a=$("#"+a);a.is(".janela_ipm")&&(a[0].options.tela=this);this.appendTo(a)};this.appendToJanela=function(a,b,c){this.codigoRotina=a;this.codigoAcao=b;var d=
getIdConteudoJanela(a,b,c);0>=$("#"+d).length&&(d=getIdConteudoJanelaGadget(a,b,c));this.appendTo(document.getElementById(d));d=$("#"+getIdJanela(a,b,c));0>=d.length&&(d=$("#"+getIdJanelaGadget(a,b,c)));0<d.length&&d[0].options&&(d[0].options.tela=this)};this.carregaFromJson=function(a){var b=this;a.nome&&this.setNome(a.nome);this.loadToModel=a.loadToModel;this.loadToModelAlteracao=a.loadToModelAlteracao;a.iniHidden&&this.setIniHidden(a.iniHidden);a.className&&this.addClass(a.className);a.atributos&&
Object.keys(a.atributos).length&&Object.keys(a.atributos).forEach(function(c){b.attr(c,a.atributos[c])});a.eventosJavascript&&Object.keys(a.eventosJavascript).length&&Object.keys(a.eventosJavascript).forEach(function(c){a.eventosJavascript[c].forEach(function(d){try{eval(d)}catch(e){__bDesenvolvimento&&IPMBarker.bark(IPMBarker.FATAL,"Comportamento não suportado para o componente. Entre em contato com a Estrutura")}})});a.style&&Object.keys(a.style).length&&Object.keys(a.style).forEach(function(c){b.setStyle(c,
a.style[c])})};this.getJsonFormat=function(){var a={};a.nome=this.getNome();a.obrigatorio=this.getObrigatorio();a.visualizacao=this.getVisualizacao();a.disparaEventosVisualizacao=this.getDisparaEventosVisualizacao();a.eventosJavascript=this.eventosJavascript;a.tipoComponente=this.tipoComponente;return a};this.setTitle=function(a){this.setAtributo("title",a);return this};this.setReadOnly=function(a){!1===a?this.getVisualizacao()||this.removeAtributo("readOnly"):this.setAtributo("readOnly","readOnly")};
this.adicionaControleFocus=function(){this.onFocus(ControleNavegacao.defineAlvoFoco)};this.setTabIndex=function(a){this.setAtributo("tabindex",a)};this.setIgnoreTab=function(a){a?this.obj.attr("tabindex",-1):this.obj.attr("tabindex",0)};this.setAutoFocus=function(a){a=defaultVal(a,!0);this.setAtributo("auto-focus",a)};this.getReadOnly=function(){var a=this.getAtributo("readOnly");return"string"==typeof a&&"readonly"==a.toLowerCase()||1==a};this.setObrigatorio=function(a){this.obrigatorio="undefined"==
typeof a||null==a?!1:a;this.obj.removeClass("campo_invalido")};this.getObrigatorio=function(){return this.obrigatorio};this.setSize=function(a){a=a||20;isNaN(a)?this.setAtributo("size",20):this.setAtributo("size",a);this.setWidth(a)};this.setWidth=function(a){isNaN(a)?this.setCss("width",a):(this.width=ComponenteForm.getWidthComponente(a),this.setCss("width",ComponenteForm.getWidthComponente(a)+"rem"))};this.setMax=function(a){this.max=a;this.setAtributo("maxLength","undefined"==typeof a||null==a?
20:a)};this.getMax=function(){return this.getAtributo("maxLength")};this.setDisabled=function(a){if(!this.getVisualizacao()||a)this.campoDesabilitado=a;ControleNavegacao.acessibilidade?(a?(this.setAtributo("readonly","readonly"),this.setAtributo("aria-disabled","true")):(this.removeAtributo("aria-disabled"),this.getVisualizacao()||this.removeAtributo("readonly")),this.obj.data("disabled",a?"disabled":!1)):a?this.getDisparaEventosVisualizacao()?this.setAtributo("readonly","readonly"):this.setAtributo("disabled",
"disabled"):this.getVisualizacao()||(this.removeAtributo("disabled"),this.removeAtributo("readonly"))};this.getDisabled=function(){return this.getAtributo("data-numero-bloqueio")?!0:ControleNavegacao.acessibilidade?this.getAtributo("aria-disabled"):this.obj.data("disabled")||this.getAtributo("disabled")};this.setType=function(a){this.setAtributo("type",a)};this.setNome=function(a){this.nome=a=a||"";this.setAtributo("name",a)};this.setValue=function(a,b){a=defaultVal(a,"");if("file"!=this.getAtributo("type")&&
"file_draggable"!=this.getAtributo("type")){var c=this.getAtributo("value");this instanceof CampoLista&&(c=this.getAtributo("lastValue"));this.setAtributo("value",a);b&&this.setValorDefault(a);c!=a&&this.getObj().trigger("change")}};this.setValorDefault=function(a){this.setAtributo("defaultValue",a)};this.getValorDefault=function(){return this.getAtributo("defaultValue")};this.getValue=function(){return this.obj.val()};this.focusNext=function(){return forceFocusNextObjeto(this.obj.get(0))};this.on=
function(a,b){this.obj.on(a,b);return this};this.off=function(a,b){this.obj&&this.obj.off&&this.obj.off(a,b);return this};this.trataListenerGrid=function(a,b){if(window.__bDesenvolvimento)this.obj.on(a,b),!this.obj[0]||this.obj[0].captureGrid&&this.obj[0].captureGrid[a]||(this.obj[0].captureGrid||(this.obj[0].captureGrid={}),this.obj[0].captureGrid[a]=!0);else{var c=this;this.obj.on(a,function(){this.getAttribute("grid")&&c.trataAtributoListenerGrid(this);b.apply(this,arguments)})}};this.trataAtributoListenerGrid=
function(a){var b=getLinhaGrid(a);a=getIndexGrid(b);if(b=b.get(0).oGrid)b.indice=a};this.onBlur=function(a){this.trataListenerGrid("blur",a)};this.onChange=function(a){this.trataListenerGrid("change",a)};this.onFocus=function(a){this.trataListenerGrid("focus",a)};this.onFocusOut=function(a){this.trataListenerGrid("focusout",a)};this.focus=function(a){ControleBaseSistema.isLayoutV3()?ControleNavegacao.focaElemento(this.getObj(),a):focusCampo(this.obj.get(0),a);return this};this.onKeyDown=function(a){this.obj.on("keydown",
a)};this.onKeyUp=function(a){this.obj.on("keyup",a)};this.onKeyPress=function(a){this.obj.on("keypress",a)};this.onInput=function(a){this.obj.on("input",a)};this.onPaste=function(a){var b=this;this.obj.on("paste",function(c){var d=window.clipboardData&&window.clipboardData.getData("Text")?window.clipboardData.getData("Text"):c.originalEvent.clipboardData.getData("text/plain");em_branco(d)||a.call(b,d,c)||c.preventDefault()});this.obj.on("drop",function(c){if(c.originalEvent.dataTransfer||c.originalEvent.dataTransfer.getData("Text")){var d=
c.originalEvent.dataTransfer.getData("Text");a.call(b,d,c)||c.preventDefault()}else return c.preventDefault(),!1})};this.onPressF=function(a,b){var c=this.obj.get(0);this.onKeyUp(function(d){if(d.keyCode==111+a)return b.apply(c,[d])})};this.onEnter=function(a){var b=this.obj.get(0);this.onKeyDown(function(c){c=c||window.event;if(13==c.keyCode)return a.apply(b,[c]),c.preventDefault(),c.stopPropagation(),!1});this.obj.get(0).onEnter=a};this.callEnter=function(){this.obj.get(0).onEnter.apply(null,[])};
this.onOver=function(a,b){this.onMouseOver(a);this.onMouseOut(b)};this.onMouseOver=function(a){this.obj.on("mouseover",a)};this.onMouseOut=function(a){this.obj.on("mouseout",a)};this.onMouseMove=function(a){this.obj.on("mousemove",a)};this.limpa=function(){var a=this.obj.attr("defaultValue");this.setValue(a);ControleBaseSistema&&ControleBaseSistema.layoutSistemaNovo&&this.atualizaEstadoCampoInvalido&&this.atualizaEstadoCampoInvalido()};this.setAtributosIniciais=function(a,b,c,d,e){this.setNome(a);
this.setObrigatorio(b);this.setSize(c);this.setMax(d);this.setValue(e,!0)};this.getValorVisualizacao=function(){return this.getValue()};this.aplicaEstiloEspecificoVisualizacao=function(){Modernizr.chromeos&&this.setClass("campo_leitura_chromeos")};this.removeEstiloEspecificoVisualizacao=function(){Modernizr.chromeos&&this.removeClass("campo_leitura_chromeos")};this.appendVisualizacao=function(a){this.setReadOnly(!0);this.getDisparaEventosVisualizacao()||this.off();this.setClass("campo_leitura campo_visualizacao inativo");
this.aplicaEstiloEspecificoVisualizacao()};this.setVisualizacao=function(a){this.visualizacao=a};this.getVisualizacao=function(){return this.visualizacao};this.setValor=function(a){return this.setValue(a)};this.getValor=function(){return this.getValue()};this.setClassCampoInvalido=function(a,b){this.valorCampoInvalido=a;b||(a?(this.obj.addClass("campo_invalido"),this.obj.attr("aria-description","Valor do Campo Inválido")):(this.obj.removeClass("campo_invalido"),this.obj.attr("aria-description","")))};
this.valida=function(){return!0};this.setDisparaEventosVisualizacao=function(a){this.disparaEventosVisualizacao=a};this.getDisparaEventosVisualizacao=function(){return this.disparaEventosVisualizacao};this.cloneComponente=function(a,b){a?a=clonaComponentePrototipo(this):(a=new ComponenteTela,a.obj=b?$(b):$(this.obj[0].cloneNode()));a.carregaFromJson(this.getJsonFormat());return a};Object.defineProperties(this,{codigoRotina:{get:function(){for(var a=this;a.parent&&!a._codigoRotina;)a=a.parent;return a._codigoRotina},
set:function(a){this._codigoRotina=a}},codigoAcao:{get:function(){for(var a=this;a.parent&&!a._codigoAcao;)a=a.parent;return a._codigoAcao},set:function(a){this._codigoAcao=a}}})};ComponenteTela.TIPOS_EVENTOS_DISPARADOS={focus:"onFocus",blur:"onBlur",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseover:"onMouseOver",input:"onInput",keypress:"onKeyPress",keyup:"onKeyUp",keydown:"onKeyDown",focusout:"onFocusOut",change:"onChange",paste:"onPaste",drop:"onPaste",click:"onClick"};
ComponenteTela.FIELDSET="fieldset";ComponenteTela.COLLAPSE_CONTENT="collapse_content";ComponenteTela.CONSULTA="consulta";ComponenteTela.TELA_TAB="tela_tab";ComponenteTela.TELA_WIZARD="tela_wizard";ComponenteTela.TELA_PADRAO="tela_padrao";ComponenteTela.GRID_DADOS="grid_dados";ComponenteTela.IMAGEM="imagem";ComponenteTela.CARD="card";ComponenteTela.CARD_HTML="card_html";ComponenteTela.SEPARADOR="separador";ComponenteTela.SPLITTER="splitter";ComponenteTela.COLOR_PICKER="color_picker";
ComponenteTela.CAMPO_TEXTO="campo_texto";ComponenteTela.BOTAO="botao";ComponenteTela.BOTAO_ACAO="botao_acao";ComponenteTela.BOTAO_ESTRUTURA="botao_estrutura";ComponenteTela.BOTAO_ICONE_SISTEMA="botao_icone_sistema";ComponenteTela.BOTAO_AUTH_GOOGLE="botao_auth_google";ComponenteTela.BOTAO_PICKER_GOOGLE_DRIVE="botao_picker_google_drive";ComponenteTela.MAPA_IPM_MAPAS="mapa_ipm_mapas";ComponenteTela.MENU_DRAWER="menu_drawer";
ComponenteTela.COMPONENTES=[ComponenteTela.FIELDSET,ComponenteTela.TELA_PADRAO,ComponenteTela.TELA_TAB,ComponenteTela.TELA_WIZARD,ComponenteTela.COLLAPSE_CONTENT,ComponenteTela.IMAGEM,ComponenteTela.CONSULTA,ComponenteTela.CARD,ComponenteTela.CARD_HTML,ComponenteTela.SEPARADOR,ComponenteTela.SPLITTER,ComponenteTela.GRID_DADOS,ComponenteTela.COLOR_PICKER,ComponenteTela.MENU_DRAWER,ComponenteTela.MAPA_IPM_MAPAS,ComponenteTela.BOTAO,ComponenteTela.BOTAO_ACAO,ComponenteTela.BOTAO_ESTRUTURA,ComponenteTela.BOTAO_ICONE_SISTEMA,
ComponenteTela.BOTAO_AUTH_GOOGLE,ComponenteTela.BOTAO_PICKER_GOOGLE_DRIVE,ComponenteTela.CAMPO_TEXTO];ComponenteTela.isTipo=function(a,b){return a instanceof ComponenteTela?b.includes(a.tipoComponente):(IPMBarker.bark(IPMBarker.AVISO,"O componente não herda de ComponenteTela."),!1)};var CompositeBase=function(){ComponenteTela.apply(this,arguments)};$jscomp.inherits(CompositeBase,ComponenteTela);var Componente=function(){CompositeBase.apply(this,arguments)};$jscomp.inherits(Componente,CompositeBase);
Componente.getInstanceFromDom=function(a){a instanceof jQuery&&(a=a.get(0));return a.myInstance?a.myInstance:null};
Componente.loadComportamento=function(a,b){document.comportamentos||(document.comportamentos={});var c=a+"_"+b;(!0!==document.comportamentos[c]||window.__bForceLoadComportamento)&&loadAjax({rotina:1,acao:1,tipo:"html",async:!1,processo:"loadComportamento",chave:{sistema:a,view:b},completo:function(d){try{var e=$("<div>").css("display","none").appendTo(document.body).append(d);executaProximoLoopAguardando(function(){e.detach()});document.comportamentos[c]=!0}catch(f){document.comportamentos[c]=!1}}})};
Componente.loadComportamentos=function(a){jQuery.each(a,function(){Componente.loadComportamento(this[0],this[1])})};var ComponenteForm=function(){Componente.apply(this,arguments)};$jscomp.inherits(ComponenteForm,Componente);ComponenteForm.getWidthComponente=function(a){var b=9;1==a&&(b+=5);2==a&&(b+=1.5);return a*b/ControleTamanhoFonte.TAMANHO_FONTE_NORMAL};
ComponenteForm.getTamanhoFromWidth=function(a){var b=9;1.4>=a?(a=1.4,b=ControleTamanhoFonte.TAMANHO_FONTE_NORMAL/10*(b+5)):2.1>=a&&(a=2.1,b=ControleTamanhoFonte.TAMANHO_FONTE_NORMAL/10*(b+1.5));return a/(b/ControleTamanhoFonte.TAMANHO_FONTE_NORMAL)};;/*</editor-fold desc="js_componentes.js">*/
/*<editor-fold desc="js_tui-time-picker.min.js">*/
/*!
 * TOAST UI Time Picker
 * @version 2.1.4
 * @author NHN FE Development Lab <dl_javascript@nhn.com>
 * @license MIT
 */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.TimePicker=e():(t.tui=t.tui||{},t.tui.TimePicker=e())}(window,(function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)i.d(n,s,function(e){return t[e]}.bind(null,s));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="dist",i(i.s=20)}([function(t,e,i){"use strict";var n=i(3);t.exports=function(t,e,i){var s,r;if(i=i||0,!n(e))return-1;if(Array.prototype.indexOf)return Array.prototype.indexOf.call(e,t,i);for(r=e.length,s=i;i>=0&&s<r;s+=1)if(e[s]===t)return s;return-1}},function(t,e,i){"use strict";t.exports=function(t,e,i){var n=0,s=t.length;for(i=i||null;n<s&&!1!==e.call(i,t[n],n,t);n+=1);}},function(t,e,i){"use strict";t.exports=function(t,e){var i,n,s,r,o=Object.prototype.hasOwnProperty;for(s=1,r=arguments.length;s<r;s+=1)for(n in i=arguments[s])o.call(i,n)&&(t[n]=i[n]);return t}},function(t,e,i){"use strict";t.exports=function(t){return t instanceof Array}},function(t,e,i){"use strict";var n=i(3),s=i(1),r=i(16);t.exports=function(t,e,i){n(t)?s(t,e,i):r(t,e,i)}},function(t,e,i){"use strict";t.exports=function(t){return void 0===t}},function(t,e,i){"use strict";t.exports=function(t){return"string"==typeof t||t instanceof String}},function(t,e,i){"use strict";var n=i(0),s=i(4),r=i(3),o=i(6),u=i(2),a=/{{\s?|\s?}}/g,c=/^[a-zA-Z0-9_@]+\[[a-zA-Z0-9_@"']+\]$/,h=/\[\s?|\s?\]/,l=/^[a-zA-Z_]+\.[a-zA-Z_]+$/,m=/\./,p=/^["']\w+["']$/,f=/"|'/g,d=/^-?\d+\.?\d*$/,v={if:function(t,e,i){var n=function(t,e){var i=[t],n=[],r=0,o=0;return s(e,(function(t,s){0===t.indexOf("if")?r+=1:"/if"===t?r-=1:r||0!==t.indexOf("elseif")&&"else"!==t||(i.push("else"===t?["true"]:t.split(" ").slice(1)),n.push(e.slice(o,s)),o=s+1)})),n.push(e.slice(o)),{exps:i,sourcesInsideIf:n}}(t,e),r=!1,o="";return s(n.exps,(function(t,e){return(r=b(t,i))&&(o=y(n.sourcesInsideIf[e],i)),!r})),o},each:function(t,e,i){var n=b(t,i),o=r(n)?"@index":"@key",a={},c="";return s(n,(function(t,n){a[o]=n,a["@this"]=t,u(i,a),c+=y(e.slice(),i)})),c},with:function(t,e,i){var s=n("as",t),r=t[s+1],o=b(t.slice(0,s),i),a={};return a[r]=o,y(e,u(i,a))||""}},_=3==="a".split(/a/).length?function(t,e){return t.split(e)}:function(t,e){var i,n,s=[],r=0;for(e.global||(e=new RegExp(e,"g")),i=e.exec(t);null!==i;)n=i.index,s.push(t.slice(r,n)),r=n+i[0].length,i=e.exec(t);return s.push(t.slice(r)),s};function g(t,e){var i,n=e[t];return"true"===t?n=!0:"false"===t?n=!1:p.test(t)?n=t.replace(f,""):c.test(t)?n=g((i=t.split(h))[0],e)[g(i[1],e)]:l.test(t)?n=g((i=t.split(m))[0],e)[i[1]]:d.test(t)&&(n=parseFloat(t)),n}function x(t,e,i){for(var n,s,r,u,a=v[t],c=1,h=2,l=e[h];c&&o(l);)0===l.indexOf(t)?c+=1:0===l.indexOf("/"+t)&&(c-=1,n=h),l=e[h+=2];if(c)throw Error(t+" needs {{/"+t+"}} expression.");return e[0]=a(e[0].split(" ").slice(1),(s=0,r=n,(u=e.splice(s+1,r-s)).pop(),u),i),e}function b(t,e){var i=g(t[0],e);return i instanceof Function?function(t,e,i){var n=[];return s(e,(function(t){n.push(g(t,i))})),t.apply(null,n)}(i,t.slice(1),e):i}function y(t,e){for(var i,n,s,r=1,u=t[r];o(u);)n=(i=u.split(" "))[0],v[n]?(s=x(n,t.splice(r,t.length-r),e),t=t.concat(s)):t[r]=b(i,e),u=t[r+=2];return t.join("")}t.exports=function(t,e){return y(_(t,a),e)}},function(t,e,i){"use strict";var n=i(2),s=i(23),r=i(6),o=i(25),u=i(3),a=i(26),c=i(4),h=/\s+/g;function l(){this.events=null,this.contexts=null}l.mixin=function(t){n(t.prototype,l.prototype)},l.prototype._getHandlerItem=function(t,e){var i={handler:t};return e&&(i.context=e),i},l.prototype._safeEvent=function(t){var e,i=this.events;return i||(i=this.events={}),t&&((e=i[t])||(e=[],i[t]=e),i=e),i},l.prototype._safeContext=function(){var t=this.contexts;return t||(t=this.contexts=[]),t},l.prototype._indexOfContext=function(t){for(var e=this._safeContext(),i=0;e[i];){if(t===e[i][0])return i;i+=1}return-1},l.prototype._memorizeContext=function(t){var e,i;s(t)&&(e=this._safeContext(),(i=this._indexOfContext(t))>-1?e[i][1]+=1:e.push([t,1]))},l.prototype._forgetContext=function(t){var e,i;s(t)&&(e=this._safeContext(),(i=this._indexOfContext(t))>-1&&(e[i][1]-=1,e[i][1]<=0&&e.splice(i,1)))},l.prototype._bindEvent=function(t,e,i){var n=this._safeEvent(t);this._memorizeContext(i),n.push(this._getHandlerItem(e,i))},l.prototype.on=function(t,e,i){var n=this;r(t)?(t=t.split(h),c(t,(function(t){n._bindEvent(t,e,i)}))):o(t)&&(i=e,c(t,(function(t,e){n.on(e,t,i)})))},l.prototype.once=function(t,e,i){var n=this;if(o(t))return i=e,void c(t,(function(t,e){n.once(e,t,i)}));this.on(t,(function s(){e.apply(i,arguments),n.off(t,s,i)}),i)},l.prototype._spliceMatches=function(t,e){var i,n=0;if(u(t))for(i=t.length;n<i;n+=1)!0===e(t[n])&&(t.splice(n,1),i-=1,n-=1)},l.prototype._matchHandler=function(t){var e=this;return function(i){var n=t===i.handler;return n&&e._forgetContext(i.context),n}},l.prototype._matchContext=function(t){var e=this;return function(i){var n=t===i.context;return n&&e._forgetContext(i.context),n}},l.prototype._matchHandlerAndContext=function(t,e){var i=this;return function(n){var s=t===n.handler,r=e===n.context,o=s&&r;return o&&i._forgetContext(n.context),o}},l.prototype._offByEventName=function(t,e){var i=this,n=a(e),s=i._matchHandler(e);t=t.split(h),c(t,(function(t){var e=i._safeEvent(t);n?i._spliceMatches(e,s):(c(e,(function(t){i._forgetContext(t.context)})),i.events[t]=[])}))},l.prototype._offByHandler=function(t){var e=this,i=this._matchHandler(t);c(this._safeEvent(),(function(t){e._spliceMatches(t,i)}))},l.prototype._offByObject=function(t,e){var i,n=this;this._indexOfContext(t)<0?c(t,(function(t,e){n.off(e,t)})):r(e)?(i=this._matchContext(t),n._spliceMatches(this._safeEvent(e),i)):a(e)?(i=this._matchHandlerAndContext(e,t),c(this._safeEvent(),(function(t){n._spliceMatches(t,i)}))):(i=this._matchContext(t),c(this._safeEvent(),(function(t){n._spliceMatches(t,i)})))},l.prototype.off=function(t,e){r(t)?this._offByEventName(t,e):arguments.length?a(t)?this._offByHandler(t):o(t)&&this._offByObject(t,e):(this.events={},this.contexts=[])},l.prototype.fire=function(t){this.invoke.apply(this,arguments)},l.prototype.invoke=function(t){var e,i,n,s;if(!this.hasListener(t))return!0;for(e=this._safeEvent(t),i=Array.prototype.slice.call(arguments,1),n=0;e[n];){if(!1===(s=e[n]).handler.apply(s.context,i))return!1;n+=1}return!0},l.prototype.hasListener=function(t){return this.getListenerLength(t)>0},l.prototype.getListenerLength=function(t){return this._safeEvent(t).length},t.exports=l},function(t,e,i){"use strict";var n=i(27),s=i(2);t.exports=function(t,e){var i;return e||(e=t,t=null),i=e.init||function(){},t&&n(i,t),e.hasOwnProperty("static")&&(s(i,e.static),delete e.static),s(i.prototype,e),i}},function(t,e,i){"use strict";var n=i(6),s=i(4),r=i(17);function o(t,e,i,n){function o(e){i.call(n||t,e||window.event)}"addEventListener"in t?t.addEventListener(e,o):"attachEvent"in t&&t.attachEvent("on"+e,o),function(t,e,i,n){var o=r(t,e),u=!1;s(o,(function(t){return t.handler!==i||(u=!0,!1)})),u||o.push({handler:i,wrappedHandler:n})}(t,e,i,o)}t.exports=function(t,e,i,r){n(e)?s(e.split(/\s+/g),(function(e){o(t,e,i,r)})):s(e,(function(e,n){o(t,n,e,i)}))}},function(t,e,i){"use strict";var n=i(6),s=i(4),r=i(17);function o(t,e,i){var n,o=r(t,e);i?(s(o,(function(s,r){return i!==s.handler||(u(t,e,s.wrappedHandler),n=r,!1)})),o.splice(n,1)):(s(o,(function(i){u(t,e,i.wrappedHandler)})),o.splice(0,o.length))}function u(t,e,i){"removeEventListener"in t?t.removeEventListener(e,i):"detachEvent"in t&&t.detachEvent("on"+e,i)}t.exports=function(t,e,i){n(e)?s(e.split(/\s+/g),(function(e){o(t,e,i)})):s(e,(function(e,i){o(t,i,e)}))}},function(t,e,i){"use strict";var n=i(30);t.exports=function(t,e){var i=t.parentNode;if(n(t,e))return t;for(;i&&i!==document;){if(n(i,e))return i;i=i.parentNode}return null}},function(t,e,i){"use strict";t.exports=function(t){t&&t.parentNode&&t.parentNode.removeChild(t)}},function(t,e,i){"use strict";t.exports=function(t){return"object"==typeof HTMLElement?t&&(t instanceof HTMLElement||!!t.nodeType):!(!t||!t.nodeType)}},function(t,e,i){"use strict";var n=i(0),s=i(1),r=i(35),o=0,u={getUniqueId:function(){return o+=1},formatTime:function(t,e){return t=String(t),n(e,["hh","mm"])>=0&&1===t.length?"0"+t:t},getMeridiemHour:function(t){return 0===(t%=12)&&(t=12),t},getRangeArr:function(t,e,i){var n,s=[];if(i=i||1,t>e)for(n=e;n>=t;n-=i)s.push(n);else for(n=t;n<=e;n+=i)s.push(n);return s},fill:function(t,e,i,n){var s,r=n||[],o=Math.min(r.length-1,e);for(s=t;s<=o;s+=1)r[s]=i;for(s=o;s<=e;s+=1)r.push(i);return r},getTarget:function(t){return t.target||t.srcElement},sendHostName:function(){r("time-picker","UA-129987462-1")},getDisabledMinuteArr:function(t,e){var i=this.fill(0,Math.floor(60/e)-2,!1);return s(t,function(t){var n=Math.ceil(t.begin/e),s=Math.floor(t.end/e);i=this.fill(n,s,!0,i)}.bind(this)),i},setDisabled:function(t,e){t.disabled=e}};t.exports=u},function(t,e,i){"use strict";t.exports=function(t,e,i){var n;for(n in i=i||null,t)if(t.hasOwnProperty(n)&&!1===e.call(i,t[n],n,t))break}},function(t,e,i){"use strict";t.exports=function(t,e){var i,n=t._feEventKey;return n||(n=t._feEventKey={}),(i=n[e])||(i=n[e]=[]),i}},function(t,e,i){"use strict";var n=i(5);t.exports=function(t){return t&&t.className?n(t.className.baseVal)?t.className:t.className.baseVal:""}},function(t,e,i){"use strict";var n=i(3),s=i(5);t.exports=function(t,e){e=(e=n(e)?e.join(" "):e).replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),s(t.className.baseVal)?t.className=e:t.className.baseVal=e}},function(t,e,i){"use strict";i(21),t.exports=i(22)},function(t,e,i){},function(t,e,i){"use strict";var n=i(0),s=i(1),r=i(8),o=i(9),u=i(2),a=i(10),c=i(11),h=i(29),l=i(12),m=i(13),p=i(32),f=i(14),d=i(33),v=i(34),_=i(38),g=i(15),x=i(40),b=i(41),y=i(42),I=o({static:{localeTexts:x},init:function(t,e){e=function(t){return u({language:"en",initialHour:0,initialMinute:0,showMeridiem:!0,inputType:"selectbox",hourStep:1,minuteStep:1,meridiemPosition:"right",format:"h:m",disabledHours:[],disabledMinutes:{},usageStatistics:!0},t)}(e),this.id=g.getUniqueId(),this.container=f(t)?t:document.querySelector(t),this.element=null,this.meridiemElement=null,this.amEl=null,this.pmEl=null,this.showMeridiem=e.showMeridiem,this.meridiemPosition=e.meridiemPosition,this.hourInput=null,this.minuteInput=null,this.hour=e.initialHour,this.minute=e.initialMinute,this.hourStep=e.hourStep,this.minuteStep=e.minuteStep,this.disabledHours=e.disabledHours,this.disabledMinutes=e.disabledMinutes,this.inputType=e.inputType,this.localeText=x[e.language],this.format=this.getValidTimeFormat(e.format),this.render(),this.setEvents(),e.usageStatistics&&g.sendHostName()},setEvents:function(){this.hourInput.on("change",this.onChangeTimeInput,this),this.minuteInput.on("change",this.onChangeTimeInput,this),this.showMeridiem&&("selectbox"===this.inputType?a(this.meridiemElement.querySelector("select"),"change",this.onChangeMeridiem,this):"spinbox"===this.inputType&&a(this.meridiemElement,"click",this.onChangeMeridiem,this))},removeEvents:function(){this.off(),this.hourInput.destroy(),this.minuteInput.destroy(),this.showMeridiem&&("selectbox"===this.inputType?c(this.meridiemElement.querySelector("select"),"change",this.onChangeMeridiem,this):"spinbox"===this.inputType&&c(this.meridiemElement,"click",this.onChangeMeridiem,this))},render:function(){var t={showMeridiem:this.showMeridiem,isSpinbox:"spinbox"===this.inputType};this.showMeridiem&&u(t,{meridiemElement:this.makeMeridiemHTML()}),this.element&&m(this.element),this.container.innerHTML=b(t),this.element=this.container.firstChild,this.renderTimeInputs(),this.showMeridiem&&this.setMeridiemElement()},setMeridiemElement:function(){"left"===this.meridiemPosition&&h(this.element,"tui-has-left"),this.meridiemElement=this.element.querySelector(".tui-timepicker-meridiem"),this.amEl=this.meridiemElement.querySelector('[value="AM"]'),this.pmEl=this.meridiemElement.querySelector('[value="PM"]'),this.syncToMeridiemElements()},makeMeridiemHTML:function(){var t=this.localeText;return y({am:t.am,pm:t.pm,radioId:this.id,isSpinbox:"spinbox"===this.inputType})},renderTimeInputs:function(){var t=this.hour,e=this.showMeridiem,i=this.element.querySelector(".tui-timepicker-hour"),n=this.element.querySelector(".tui-timepicker-minute"),s="selectbox"===this.inputType.toLowerCase()?_:v,r=this.format.split(":"),o=this.getHourItems();e&&(t=g.getMeridiemHour(t)),this.hourInput=new s(i,{initialValue:t,items:o,format:r[0],disabledItems:this.makeDisabledStatItems(o)}),this.minuteInput=new s(n,{initialValue:this.minute,items:this.getMinuteItems(),format:r[1]})},makeDisabledStatItems:function(t){var e=[],i=this.disabledHours.slice();return this.showMeridiem&&(i=this.meridiemableTime(i)),s(t,(function(t){e.push(n(t,i)>=0)})),e},meridiemableTime:function(t){var e=0,i=0,n=11,r=[];return this.hour>=12&&(e=12,i=12,n=23),s(t,(function(t){t>=i&&t<=n&&r.push(t-e==0?12:t-e)})),r},getValidTimeFormat:function(t){return t.match(/^[h]{1,2}:[m]{1,2}$/i)?t.toLowerCase():"h:m"},syncToMeridiemElements:function(){var t=this.hour>=12?this.pmEl:this.amEl,e=t===this.pmEl?this.amEl:this.pmEl;t.setAttribute("selected",!0),t.setAttribute("checked",!0),h(t,"tui-timepicker-meridiem-checked"),e.removeAttribute("selected"),e.removeAttribute("checked"),p(e,"tui-timepicker-meridiem-checked")},syncToInputs:function(){var t=this.hour,e=this.minute;this.showMeridiem&&(t=g.getMeridiemHour(t)),this.hourInput.setValue(t),this.minuteInput.setValue(e)},onChangeMeridiem:function(t){var e=this.hour,i=g.getTarget(t);i.value&&l(i,".tui-timepicker-meridiem")&&(e=this.to24Hour("PM"===i.value,e),this.setTime(e,this.minute),this.setDisabledHours(),this.setDisabledMinutes(e))},onChangeTimeInput:function(){var t=this.hourInput.getValue(),e=this.minuteInput.getValue(),i=this.hour>=12;this.showMeridiem&&(t=this.to24Hour(i,t)),this.setTime(t,e),this.setDisabledMinutes(t)},to24Hour:function(t,e){return e%=12,t&&(e+=12),e},setDisabledHours:function(){var t=this.getHourItems(),e=this.makeDisabledStatItems(t);this.hourInput.setDisabledItems(e)},setDisabledMinutes:function(t){var e;e=this.disabledMinutes[t]||[],this.minuteInput.setDisabledItems(e)},getHourItems:function(){var t=this.hourStep;return this.showMeridiem?g.getRangeArr(1,12,t):g.getRangeArr(0,23,t)},getMinuteItems:function(){return g.getRangeArr(0,59,this.minuteStep)},validItems:function(t,e){return!(!d(t)||!d(e))&&(this.showMeridiem&&(t=g.getMeridiemHour(t)),n(t,this.getHourItems())>-1&&n(e,this.getMinuteItems())>-1)},setHourStep:function(t){this.hourStep=t,this.hourInput.fire("changeItems",this.getHourItems())},getHourStep:function(){return this.hourStep},setMinuteStep:function(t){this.minuteStep=t,this.minuteInput.fire("changeItems",this.getMinuteItems())},getMinuteStep:function(){return this.minuteStep},show:function(){p(this.element,"tui-hidden")},hide:function(){h(this.element,"tui-hidden")},setHour:function(t){return this.setTime(t,this.minute)},setMinute:function(t){return this.setTime(this.hour,t)},setTime:function(t,e){this.validItems(t,e)&&(this.hour=t,this.minute=e,this.syncToInputs(),this.showMeridiem&&this.syncToMeridiemElements(),this.fire("change",{hour:this.hour,minute:this.minute}))},setRange:function(t,e){var i,n,s=t.hour,r=t.minute;this.isValidRange(t,e)&&(e&&(i=e.hour,n=e.minute),this.setRangeHour(s,i),this.setRangeMinute(s,r,i,n),this.applyRange(s,r,i))},setRangeHour:function(t,e){var i=g.getRangeArr(0,t-1);e&&(i=i.concat(g.getRangeArr(e+1,23))),this.disabledHours=i.slice()},setRangeMinute:function(t,e,i,n){var s=[];if(t||e){if(s.push({begin:0,end:e}),i&&n){if(s.push({begin:n,end:59}),t===i)return void(this.disabledMinutes[t]=g.getDisabledMinuteArr(s,this.minuteStep).slice());this.disabledMinutes[i]=g.getDisabledMinuteArr([s[1]],this.minuteStep).slice()}this.disabledMinutes[t]=g.getDisabledMinuteArr([s[0]],this.minuteStep).slice()}},applyRange:function(t,e,i){var n=t,s=Math.ceil(e/this.minuteStep)*this.minuteStep;this.isLaterThanSetTime(t,e)&&(1!==this.hourStep&&t%this.hourStep!=1&&(n=t+t%this.hourStep+1,s=0),this.setTime(n,s)),this.setDisabledHours(),this.showMeridiem&&(this.syncToMeridiemElements(),g.setDisabled(this.amEl,t>=12),g.setDisabled(this.pmEl,i<12))},resetMinuteRange:function(){var t;for(this.disabledMinutes={},t=0;t<=23;t+=1)this.setDisabledMinutes(this.hour)},isValidRange:function(t,e){var i,n,s=t.hour,r=t.minute;return!!this.isValidTime(s,r)&&(!e||(i=e.hour,n=e.minute,this.isValidTime(i,n)&&this.compareTimes(t,e)>0))},isValidTime:function(t,e){return t>=0&&t<=23&&e>=0&&e<=59},isLaterThanSetTime:function(t,e){return t>this.hour||t===this.hour&&e>this.minute},compareTimes:function(t,e){var i=new Date(0),n=new Date(0);return i.setHours(t.hour,t.minute),n.setHours(e.hour,e.minute),n.getTime()-i.getTime()},getHour:function(){return this.hour},getMinute:function(){return this.minute},changeLanguage:function(t){this.localeText=x[t],this.render()},destroy:function(){this.removeEvents(),m(this.element),this.container=this.showMeridiem=this.hourInput=this.minuteInput=this.hour=this.minute=this.inputType=this.element=this.meridiemElement=this.amEl=this.pmEl=null}});r.mixin(I),t.exports=I},function(t,e,i){"use strict";var n=i(5),s=i(24);t.exports=function(t){return!n(t)&&!s(t)}},function(t,e,i){"use strict";t.exports=function(t){return null===t}},function(t,e,i){"use strict";t.exports=function(t){return t===Object(t)}},function(t,e,i){"use strict";t.exports=function(t){return t instanceof Function}},function(t,e,i){"use strict";var n=i(28);t.exports=function(t,e){var i=n(e.prototype);i.constructor=t,t.prototype=i}},function(t,e,i){"use strict";t.exports=function(t){function e(){}return e.prototype=t,new e}},function(t,e,i){"use strict";var n=i(4),s=i(0),r=i(18),o=i(19);t.exports=function(t){var e,i=Array.prototype.slice.call(arguments,1),u=t.classList,a=[];u?n(i,(function(e){t.classList.add(e)})):((e=r(t))&&(i=[].concat(e.split(/\s+/),i)),n(i,(function(t){s(t,a)<0&&a.push(t)})),o(t,a))}},function(t,e,i){"use strict";var n=i(0),s=i(31),r=Element.prototype,o=r.matches||r.webkitMatchesSelector||r.mozMatchesSelector||r.msMatchesSelector||function(t){var e=this.document||this.ownerDocument;return n(this,s(e.querySelectorAll(t)))>-1};t.exports=function(t,e){return o.call(t,e)}},function(t,e,i){"use strict";var n=i(1);t.exports=function(t){var e;try{e=Array.prototype.slice.call(t)}catch(i){e=[],n(t,(function(t){e.push(t)}))}return e}},function(t,e,i){"use strict";var n=i(1),s=i(0),r=i(18),o=i(19);t.exports=function(t){var e,i,u=Array.prototype.slice.call(arguments,1),a=t.classList;a?n(u,(function(t){a.remove(t)})):(e=r(t).split(/\s+/),i=[],n(e,(function(t){s(t,u)<0&&i.push(t)})),o(t,i))}},function(t,e,i){"use strict";t.exports=function(t){return"number"==typeof t||t instanceof Number}},function(t,e,i){"use strict";var n=i(0),s=i(1),r=i(8),o=i(9),u=i(2),a=i(10),c=i(11),h=i(12),l=i(13),m=i(14),p=i(15),f=i(37),d=o({init:function(t,e){e=u({items:[]},e),this._container=m(t)?t:document.querySelector(t),this._element=null,this._inputElement=null,this._items=e.items,this._disabledItems=e.disabledItems||[],this._selectedIndex=Math.max(0,n(e.initialValue,this._items)),this._format=e.format,this._render(),this._setEvents()},_render:function(){var t,e=n(this.getValue(),this._items);this._disabledItems[e]&&(this._selectedIndex=this._findEnabledIndex()),t={maxLength:this._getMaxLength(),initialValue:this.getValue(),format:this._format,formatTime:p.formatTime},this._container.innerHTML=f(t),this._element=this._container.firstChild,this._inputElement=this._element.querySelector("input")},_findEnabledIndex:function(){return n(!1,this._disabledItems)},_getMaxLength:function(){var t=[];return s(this._items,(function(e){t.push(String(e).length)})),Math.max.apply(null,t)},setDisabledItems:function(t){this._disabledItems=t,this._changeToInputValue()},_setEvents:function(){a(this._container,"click",this._onClickHandler,this),a(this._inputElement,"keydown",this._onKeydownInputElement,this),a(this._inputElement,"change",this._onChangeHandler,this),this.on("changeItems",(function(t){this._items=t,this._render()}),this)},_removeEvents:function(){this.off(),c(this._container,"click",this._onClickHandler,this),c(this._inputElement,"keydown",this._onKeydownInputElement,this),c(this._inputElement,"change",this._onChangeHandler,this)},_onClickHandler:function(t){var e=p.getTarget(t);h(e,".tui-timepicker-btn-down")?this._setNextValue(!0):h(e,".tui-timepicker-btn-up")&&this._setNextValue(!1)},_setNextValue:function(t){var e=this._selectedIndex;e=t?e?e-1:this._items.length-1:e<this._items.length-1?e+1:0,this._disabledItems[e]?(this._selectedIndex=e,this._setNextValue(t)):this.setValue(this._items[e])},_onKeydownInputElement:function(t){var e,i=t.which||t.keyCode;if(h(p.getTarget(t),"input")){switch(i){case 38:e=!1;break;case 40:e=!0;break;default:return}this._setNextValue(e)}},_onChangeHandler:function(t){h(p.getTarget(t),"input")&&this._changeToInputValue()},_changeToInputValue:function(){var t=Number(this._inputElement.value),e=n(t,this._items);if(this._disabledItems[e])e=this._findEnabledIndex(),t=this._items[e];else if(e===this._selectedIndex)return;-1===e?this.setValue(this._items[this._selectedIndex]):(this._selectedIndex=e,this.fire("change",{value:t}))},setValue:function(t){this._inputElement.value=p.formatTime(t,this._format),this._changeToInputValue()},getValue:function(){return this._items[this._selectedIndex]},destroy:function(){this._removeEvents(),l(this._element),this._container=this._element=this._inputElement=this._items=this._selectedIndex=null}});r.mixin(d),t.exports=d},function(t,e,i){"use strict";var n=i(5),s=i(36);t.exports=function(t,e){var i=location.hostname,r="TOAST UI "+t+" for "+i+": Statistics",o=window.localStorage.getItem(r);(n(window.tui)||!1!==window.tui.usageStatistics)&&(o&&!function(t){return(new Date).getTime()-t>6048e5}(o)||(window.localStorage.setItem(r,(new Date).getTime()),setTimeout((function(){"interactive"!==document.readyState&&"complete"!==document.readyState||s("https://www.google-analytics.com/collect",{v:1,t:"event",tid:e,cid:i,dp:i,dh:t,el:t,ec:"use"})}),1e3)))}},function(t,e,i){"use strict";var n=i(16);t.exports=function(t,e){var i=document.createElement("img"),s="";return n(e,(function(t,e){s+="&"+e+"="+t})),s=s.substring(1),i.src=t+"?"+s,i.style.display="none",document.body.appendChild(i),document.body.removeChild(i),i}},function(t,e,i){"use strict";var n=i(7);t.exports=function(t){return n('<div class="tui-timepicker-btn-area">  <input type="text" class="tui-timepicker-spinbox-input"        maxlength="{{maxLength}}"        size="{{maxLength}}"        value="{{formatTime initialValue format}}"        aria-label="TimePicker spinbox value">  <button type="button" class="tui-timepicker-btn tui-timepicker-btn-up">    <span class="tui-ico-t-btn">Increase</span>  </button>  <button type="button" class="tui-timepicker-btn tui-timepicker-btn-down">    <span class="tui-ico-t-btn">Decrease</span>  </button></div>',t)}},function(t,e,i){"use strict";var n=i(0),s=i(8),r=i(9),o=i(2),u=i(10),a=i(11),c=i(12),h=i(13),l=i(14),m=i(15),p=i(39),f=r({init:function(t,e){e=o({items:[]},e),this._container=l(t)?t:document.querySelector(t),this._items=e.items||[],this._disabledItems=e.disabledItems||[],this._selectedIndex=Math.max(0,n(e.initialValue,this._items)),this._format=e.format,this._element=null,this._render(),this._setEvents()},_render:function(){var t;this._changeEnabledIndex(),t={items:this._items,format:this._format,initialValue:this.getValue(),disabledItems:this._disabledItems,formatTime:m.formatTime,equals:function(t,e){return t===e}},this._element&&this._removeElement(),this._container.innerHTML=p(t),this._element=this._container.firstChild,u(this._element,"change",this._onChangeHandler,this)},_changeEnabledIndex:function(){var t=n(this.getValue(),this._items);this._disabledItems[t]&&(this._selectedIndex=n(!1,this._disabledItems))},setDisabledItems:function(t){this._disabledItems=t,this._render()},_setEvents:function(){this.on("changeItems",(function(t){this._items=t,this._render()}),this)},_removeEvents:function(){this.off()},_removeElement:function(){a(this._element,"change",this._onChangeHandler,this),h(this._element)},_onChangeHandler:function(t){c(m.getTarget(t),"select")&&this._setNewValue()},_setNewValue:function(){var t=Number(this._element.value);this._selectedIndex=n(t,this._items),this.fire("change",{value:t})},getValue:function(){return this._items[this._selectedIndex]},setValue:function(t){var e=n(t,this._items);e>-1&&e!==this._selectedIndex&&(this._selectedIndex=e,this._element.value=t,this._setNewValue())},destroy:function(){this._removeEvents(),this._removeElement(),this._container=this._items=this._selectedIndex=this._element=null}});s.mixin(f),t.exports=f},function(t,e,i){"use strict";var n=i(7);t.exports=function(t){return n('<select class="tui-timepicker-select" aria-label="Time">  {{each items}}    {{if equals initialValue @this}}      <option value="{{@this}}" selected {{if disabledItems[@index]}}disabled{{/if}}>{{formatTime @this format}}</option>    {{else}}      <option value="{{@this}}" {{if disabledItems[@index]}}disabled{{/if}}>{{formatTime @this format}}</option>    {{/if}}  {{/each}}</select>',t)}},function(t,e,i){"use strict";t.exports={en:{am:"AM",pm:"PM"},ko:{am:"ì˜¤ì „",pm:"ì˜¤í›„"}}},function(t,e,i){"use strict";var n=i(7);t.exports=function(t){return n('<div class="tui-timepicker">  <div class="tui-timepicker-body">    <div class="tui-timepicker-row">      {{if isSpinbox}}        <div class="tui-timepicker-column tui-timepicker-spinbox tui-timepicker-hour"></div>        <span class="tui-timepicker-column tui-timepicker-colon"><span class="tui-ico-colon">:</span></span>        <div class="tui-timepicker-column tui-timepicker-spinbox tui-timepicker-minute"></div>        {{if showMeridiem}}          {{meridiemElement}}        {{/if}}      {{else}}        <div class="tui-timepicker-column tui-timepicker-selectbox tui-timepicker-hour"></div>        <span class="tui-timepicker-column tui-timepicker-colon"><span class="tui-ico-colon">:</span></span>        <div class="tui-timepicker-column tui-timepicker-selectbox tui-timepicker-minute"></div>        {{if showMeridiem}}          {{meridiemElement}}        {{/if}}      {{/if}}    </div>  </div></div>',t)}},function(t,e,i){"use strict";var n=i(7);t.exports=function(t){return n('{{if isSpinbox}}  <div class="tui-timepicker-column tui-timepicker-checkbox tui-timepicker-meridiem">    <div class="tui-timepicker-check-area">      <ul class="tui-timepicker-check-lst">        <li class="tui-timepicker-check">          <div class="tui-timepicker-radio">            <input type="radio"                  name="optionsRadios-{{radioId}}"                  value="AM"                  class="tui-timepicker-radio-am"                  id="tui-timepicker-radio-am-{{radioId}}">            <label for="tui-timepicker-radio-am-{{radioId}}" class="tui-timepicker-radio-label">              <span class="tui-timepicker-input-radio"></span>{{am}}            </label>          </div>        </li>        <li class="tui-timepicker-check">          <div class="tui-timepicker-radio">            <input type="radio"                  name="optionsRadios-{{radioId}}"                  value="PM"                  class="tui-timepicker-radio-pm"                  id="tui-timepicker-radio-pm-{{radioId}}">            <label for="tui-timepicker-radio-pm-{{radioId}}" class="tui-timepicker-radio-label">              <span class="tui-timepicker-input-radio"></span>{{pm}}            </label>          </div>        </li>      </ul>    </div>  </div>{{else}}  <div class="tui-timepicker-column tui-timepicker-selectbox tui-is-add-picker tui-timepicker-meridiem">    <select class="tui-timepicker-select" aria-label="AM/PM">      <option value="AM">{{am}}</option>      <option value="PM">{{pm}}</option>    </select>  </div>{{/if}}',t)}}])}));;/*</editor-fold desc="js_tui-time-picker.min.js">*/
/*<editor-fold desc="js_tui-date-picker.min.js">*/
/*!
 * TOAST UI Date Picker
 * @version 4.3.1
 * @author NHN. FE Development Lab <dl_javascript@nhn.com>
 * @license MIT
 */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("tui-time-picker")):"function"==typeof define&&define.amd?define(["tui-time-picker"],e):"object"==typeof exports?exports.DatePicker=e(require("tui-time-picker")):(t.tui=t.tui||{},t.tui.DatePicker=e(t.tui.TimePicker))}(window,(function(t){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="dist",n(n.s=34)}([function(t,e,n){"use strict";var i=n(35),r=n(7);t.exports=function(t,e){var n;return e||(e=t,t=null),n=e.init||function(){},t&&i(n,t),e.hasOwnProperty("static")&&(r(n,e.static),delete e.static),r(n.prototype,e),n}},function(t,e,n){"use strict";t.exports={TYPE_DATE:"date",TYPE_MONTH:"month",TYPE_YEAR:"year",TYPE_HOUR:"hour",TYPE_MINUTE:"minute",TYPE_MERIDIEM:"meridiem",MIN_DATE:new Date(1900,0,1),MAX_DATE:new Date(2999,11,31),DEFAULT_LANGUAGE_TYPE:"en",CLASS_NAME_SELECTED:"tui-is-selected",CLASS_NAME_PREV_MONTH_BTN:"tui-calendar-btn-prev-month",CLASS_NAME_PREV_YEAR_BTN:"tui-calendar-btn-prev-year",CLASS_NAME_NEXT_YEAR_BTN:"tui-calendar-btn-next-year",CLASS_NAME_NEXT_MONTH_BTN:"tui-calendar-btn-next-month",CLASS_NAME_TITLE_TODAY:"tui-calendar-title-today",DEFAULT_WEEK_START_DAY:"Sun",WEEK_START_DAY_MAP:{sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6}}},function(t,e,n){"use strict";t.exports=function(t,e,n){var i=0,r=t.length;for(n=n||null;i<r&&!1!==e.call(n,t[i],i,t);i+=1);}},function(t,e,n){"use strict";var i=n(6);t.exports=function(t,e,n){var r,s;if(n=n||0,!i(e))return-1;if(Array.prototype.indexOf)return Array.prototype.indexOf.call(e,t,n);for(s=e.length,r=n;n>=0&&r<s;r+=1)if(e[r]===t)return r;return-1}},function(t,e,n){"use strict";var i=n(2),r=n(46),s=n(47),a=0,o={getTarget:function(t){return t.target||t.srcElement},getElement:function(t){return r(t)?t:document.querySelector(t)},getSelector:function(t){var e="";return t.id?e="#"+t.id:t.className&&(e="."+t.className.split(" ")[0]),e},generateId:function(){return a+=1},filter:function(t,e){var n=[];return i(t,(function(t){e(t)&&n.push(t)})),n},sendHostName:function(){s("date-picker","UA-129987462-1")}};t.exports=o},function(t,e,n){"use strict";var i=n(28),r=n(15),s=n(1),a=s.TYPE_DATE,o=s.TYPE_MONTH,c=s.TYPE_YEAR,u={getWeeksCount:function(t,e){var n=u.getFirstDay(t,e),i=u.getLastDayInMonth(t,e);return Math.ceil((n+i)/7)},isValidDate:function(t){return i(t)&&!isNaN(t.getTime())},getFirstDay:function(t,e){return new Date(t,e-1,1).getDay()},getFirstDayTimestamp:function(t,e){return new Date(t,e,1).getTime()},getLastDayInMonth:function(t,e){return new Date(t,e,0).getDate()},prependLeadingZero:function(t){var e="";return t<10&&(e="0"),e+t},getMeridiemHour:function(t){return 0===(t%=12)&&(t=12),t},getSafeNumber:function(t,e){if(isNaN(e)||!r(e))throw Error("The defaultNumber must be a valid number.");return isNaN(t)?e:Number(t)},getDateOfWeek:function(t,e,n,i){var r=new Date(t,e-1).getDay();return new Date(t,e-1,7*n-(r-i-1))},getRangeArr:function(t,e){var n,i=[];if(t>e)for(n=e;n>=t;n-=1)i.push(n);else for(n=t;n<=e;n+=1)i.push(n);return i},cloneWithStartOf:function(t,e){switch(e=e||a,(t=new Date(t)).setHours(0,0,0,0),e){case a:break;case o:t.setDate(1);break;case c:t.setMonth(0,1);break;default:throw Error("Unsupported type: "+e)}return t},cloneWithEndOf:function(t,e){switch(e=e||a,(t=new Date(t)).setHours(23,59,59,999),e){case a:break;case o:t.setMonth(t.getMonth()+1,0);break;case c:t.setMonth(11,31);break;default:throw Error("Unsupported type: "+e)}return t},compare:function(t,e,n){var i,r;return u.isValidDate(t)&&u.isValidDate(e)?(n?(i=u.cloneWithStartOf(t,n).getTime(),r=u.cloneWithStartOf(e,n).getTime()):(i=t.getTime(),r=e.getTime()),i>r?1:i===r?0:-1):NaN},isSame:function(t,e,n){return 0===u.compare(t,e,n)},inRange:function(t,e,n,i){return u.compare(t,n,i)<1&&u.compare(e,n,i)>-1}};t.exports=u},function(t,e,n){"use strict";t.exports=function(t){return t instanceof Array}},function(t,e,n){"use strict";t.exports=function(t,e){var n,i,r,s,a=Object.prototype.hasOwnProperty;for(r=1,s=arguments.length;r<s;r+=1)for(i in n=arguments[r])a.call(n,i)&&(t[i]=n[i]);return t}},function(t,e,n){"use strict";var i=n(7),r=n(37),s=n(13),a=n(22),o=n(6),c=n(39),u=n(9),h=/\s+/g;function l(){this.events=null,this.contexts=null}l.mixin=function(t){i(t.prototype,l.prototype)},l.prototype._getHandlerItem=function(t,e){var n={handler:t};return e&&(n.context=e),n},l.prototype._safeEvent=function(t){var e,n=this.events;return n||(n=this.events={}),t&&((e=n[t])||(e=[],n[t]=e),n=e),n},l.prototype._safeContext=function(){var t=this.contexts;return t||(t=this.contexts=[]),t},l.prototype._indexOfContext=function(t){for(var e=this._safeContext(),n=0;e[n];){if(t===e[n][0])return n;n+=1}return-1},l.prototype._memorizeContext=function(t){var e,n;r(t)&&(e=this._safeContext(),(n=this._indexOfContext(t))>-1?e[n][1]+=1:e.push([t,1]))},l.prototype._forgetContext=function(t){var e,n;r(t)&&(e=this._safeContext(),(n=this._indexOfContext(t))>-1&&(e[n][1]-=1,e[n][1]<=0&&e.splice(n,1)))},l.prototype._bindEvent=function(t,e,n){var i=this._safeEvent(t);this._memorizeContext(n),i.push(this._getHandlerItem(e,n))},l.prototype.on=function(t,e,n){var i=this;s(t)?(t=t.split(h),u(t,(function(t){i._bindEvent(t,e,n)}))):a(t)&&(n=e,u(t,(function(t,e){i.on(e,t,n)})))},l.prototype.once=function(t,e,n){var i=this;if(a(t))return n=e,void u(t,(function(t,e){i.once(e,t,n)}));this.on(t,(function r(){e.apply(n,arguments),i.off(t,r,n)}),n)},l.prototype._spliceMatches=function(t,e){var n,i=0;if(o(t))for(n=t.length;i<n;i+=1)!0===e(t[i])&&(t.splice(i,1),n-=1,i-=1)},l.prototype._matchHandler=function(t){var e=this;return function(n){var i=t===n.handler;return i&&e._forgetContext(n.context),i}},l.prototype._matchContext=function(t){var e=this;return function(n){var i=t===n.context;return i&&e._forgetContext(n.context),i}},l.prototype._matchHandlerAndContext=function(t,e){var n=this;return function(i){var r=t===i.handler,s=e===i.context,a=r&&s;return a&&n._forgetContext(i.context),a}},l.prototype._offByEventName=function(t,e){var n=this,i=c(e),r=n._matchHandler(e);t=t.split(h),u(t,(function(t){var e=n._safeEvent(t);i?n._spliceMatches(e,r):(u(e,(function(t){n._forgetContext(t.context)})),n.events[t]=[])}))},l.prototype._offByHandler=function(t){var e=this,n=this._matchHandler(t);u(this._safeEvent(),(function(t){e._spliceMatches(t,n)}))},l.prototype._offByObject=function(t,e){var n,i=this;this._indexOfContext(t)<0?u(t,(function(t,e){i.off(e,t)})):s(e)?(n=this._matchContext(t),i._spliceMatches(this._safeEvent(e),n)):c(e)?(n=this._matchHandlerAndContext(e,t),u(this._safeEvent(),(function(t){i._spliceMatches(t,n)}))):(n=this._matchContext(t),u(this._safeEvent(),(function(t){i._spliceMatches(t,n)})))},l.prototype.off=function(t,e){s(t)?this._offByEventName(t,e):arguments.length?c(t)?this._offByHandler(t):a(t)&&this._offByObject(t,e):(this.events={},this.contexts=[])},l.prototype.fire=function(t){this.invoke.apply(this,arguments)},l.prototype.invoke=function(t){var e,n,i,r;if(!this.hasListener(t))return!0;for(e=this._safeEvent(t),n=Array.prototype.slice.call(arguments,1),i=0;e[i];){if(!1===(r=e[i]).handler.apply(r.context,n))return!1;i+=1}return!0},l.prototype.hasListener=function(t){return this.getListenerLength(t)>0},l.prototype.getListenerLength=function(t){return this._safeEvent(t).length},t.exports=l},function(t,e,n){"use strict";var i=n(6),r=n(2),s=n(23);t.exports=function(t,e,n){i(t)?r(t,e,n):s(t,e,n)}},function(t,e,n){"use strict";t.exports={en:{titles:{DD:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],D:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],MMM:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],MMMM:["January","February","March","April","May","June","July","August","September","October","November","December"]},titleFormat:"MMMM yyyy",todayFormat:"To\\d\\ay: DD, MMMM d, yyyy",time:"Time",date:"Date"},ko:{titles:{DD:["\uc77c\uc694\uc77c","\uc6d4\uc694\uc77c","\ud654\uc694\uc77c","\uc218\uc694\uc77c","\ubaa9\uc694\uc77c","\uae08\uc694\uc77c","\ud1a0\uc694\uc77c"],D:["\uc77c","\uc6d4","\ud654","\uc218","\ubaa9","\uae08","\ud1a0"],MMM:["1\uc6d4","2\uc6d4","3\uc6d4","4\uc6d4","5\uc6d4","6\uc6d4","7\uc6d4","8\uc6d4","9\uc6d4","10\uc6d4","11\uc6d4","12\uc6d4"],MMMM:["1\uc6d4","2\uc6d4","3\uc6d4","4\uc6d4","5\uc6d4","6\uc6d4","7\uc6d4","8\uc6d4","9\uc6d4","10\uc6d4","11\uc6d4","12\uc6d4"]},titleFormat:"yyyy.MM",todayFormat:"\uc624\ub298: yyyy.MM.dd (D)",date:"\ub0a0\uc9dc",time:"\uc2dc\uac04"}}},function(t,e,n){"use strict";var i=n(3),r=n(9),s=n(6),a=n(13),o=n(7),c=/{{\s?|\s?}}/g,u=/^[a-zA-Z0-9_@]+\[[a-zA-Z0-9_@"']+\]$/,h=/\[\s?|\s?\]/,l=/^[a-zA-Z_]+\.[a-zA-Z_]+$/,d=/\./,p=/^["']\w+["']$/,_=/"|'/g,f=/^-?\d+\.?\d*$/,m=2,g={if:function(t,e,n){var i=function(t,e){var n=[t],i=[],s=0,a=0;return r(e,(function(t,r){0===t.indexOf("if")?s+=1:"/if"===t?s-=1:s||0!==t.indexOf("elseif")&&"else"!==t||(n.push("else"===t?["true"]:t.split(" ").slice(1)),i.push(e.slice(a,r)),a=r+1)})),i.push(e.slice(a)),{exps:n,sourcesInsideIf:i}}(t,e),s=!1,a="";return r(i.exps,(function(t,e){return(s=E(t,n))&&(a=D(i.sourcesInsideIf[e],n)),!s})),a},each:function(t,e,n){var i=E(t,n),a=s(i)?"@index":"@key",c={},u="";return r(i,(function(t,i){c[a]=i,c["@this"]=t,o(n,c),u+=D(e.slice(),n)})),u},with:function(t,e,n){var r=i("as",t),s=t[r+1],a=E(t.slice(0,r),n),c={};return c[s]=a,D(e,o(n,c))||""}},y=3==="a".split(/a/).length?function(t,e){return t.split(e)}:function(t,e){var n,i,r=[],s=0;for(e.global||(e=new RegExp(e,"g")),n=e.exec(t);null!==n;)i=n.index,r.push(t.slice(s,i)),s=i+n[0].length,n=e.exec(t);return r.push(t.slice(s)),r};function v(t,e){var n,i=e[t];return"true"===t?i=!0:"false"===t?i=!1:p.test(t)?i=t.replace(_,""):u.test(t)?i=v((n=t.split(h))[0],e)[v(n[1],e)]:l.test(t)?i=v((n=t.split(d))[0],e)[n[1]]:f.test(t)&&(i=parseFloat(t)),i}function T(t,e,n){for(var i,r,s,o,c=g[t],u=1,h=0+m,l=e[h];u&&a(l);)0===l.indexOf(t)?u+=1:0===l.indexOf("/"+t)&&(u-=1,i=h),l=e[h+=m];if(u)throw Error(t+" needs {{/"+t+"}} expression.");return e[0]=c(e[0].split(" ").slice(1),(r=0,s=i,(o=e.splice(r+1,s-r)).pop(),o),n),e}function E(t,e){var n=v(t[0],e);return n instanceof Function?function(t,e,n){var i=[];return r(e,(function(t){i.push(v(t,n))})),t.apply(null,i)}(n,t.slice(1),e):n}function D(t,e){for(var n,i,r,s=1,o=t[s];a(o);)i=(n=o.split(" "))[0],g[i]?(r=T(i,t.splice(s,t.length-s),e),t=t.concat(r)):t[s]=E(n,e),o=t[s+=m];return t.join("")}t.exports=function(t,e){return D(y(t,c),e)}},function(t,e,n){"use strict";t.exports=function(t){return void 0===t}},function(t,e,n){"use strict";t.exports=function(t){return"string"==typeof t||t instanceof String}},function(t,e,n){"use strict";t.exports=function(t){t&&t.parentNode&&t.parentNode.removeChild(t)}},function(t,e,n){"use strict";t.exports=function(t){return"number"==typeof t||t instanceof Number}},function(t,e,n){"use strict";var i=n(9),r=n(3),s=n(17),a=n(24);t.exports=function(t){var e,n=Array.prototype.slice.call(arguments,1),o=t.classList,c=[];o?i(n,(function(e){t.classList.add(e)})):((e=s(t))&&(n=[].concat(e.split(/\s+/),n)),i(n,(function(t){r(t,c)<0&&c.push(t)})),a(t,c))}},function(t,e,n){"use strict";var i=n(12);t.exports=function(t){return t&&t.className?i(t.className.baseVal)?t.className:t.className.baseVal:""}},function(t,e,n){"use strict";var i=n(2),r=n(3),s=n(17),a=n(24);t.exports=function(t){var e,n,o=Array.prototype.slice.call(arguments,1),c=t.classList;c?i(o,(function(t){c.remove(t)})):(e=s(t).split(/\s+/),n=[],i(e,(function(t){r(t,o)<0&&n.push(t)})),a(t,n))}},function(t,e,n){"use strict";var i=n(31),r=n(33),s={_isMobile:/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile|WPDesktop/i.test(navigator.userAgent),_getEventType:function(t){return this._isMobile&&("mousedown"===t?t="touchstart":"click"===t&&(t="touchend")),t},on:function(t,e,n,r){i(t,this._getEventType(e),n,r)},off:function(t,e,n){r(t,this._getEventType(e),n)}};t.exports=s},function(t,e,n){"use strict";var i=n(0),r=n(14),s=n(10),a=n(1).DEFAULT_LANGUAGE_TYPE,o=i({init:function(t){t=t||a,this._element=null,this._localeText=s[t],this._type="base"},_makeContext:function(){c(this.getType(),"_makeContext")},render:function(){c(this.getType(),"render")},getDateElements:function(){c(this.getType(),"getDateElements")},getType:function(){return this._type},changeLanguage:function(t){this._localeText=s[t]},remove:function(){this._element&&r(this._element),this._element=null}});function c(t,e){throw new Error(t+' layer does not have the "'+e+'" method.')}t.exports=o},function(t,e,n){"use strict";var i=n(3),r=n(2),s=n(0),a=n(8),o=n(16),c=n(25),u=n(26),h=n(27),l=n(18),d=n(14),p=n(7),_=n(6),f=n(28),m=n(15),g=n(22),y=n(43),v=n(29),T=n(56),E=n(1),D=n(10),k=n(5),w=n(4),x=n(19),M=n(58),b=n(59),S=E.DEFAULT_WEEK_START_DAY,A=E.DEFAULT_LANGUAGE_TYPE,C=E.TYPE_DATE,P=E.TYPE_MONTH,N=E.TYPE_YEAR,O=E.CLASS_NAME_NEXT_YEAR_BTN,L=E.CLASS_NAME_NEXT_MONTH_BTN,R=E.CLASS_NAME_PREV_YEAR_BTN,F=E.CLASS_NAME_PREV_MONTH_BTN,Y=E.CLASS_NAME_SELECTED,H=E.CLASS_NAME_TITLE_TODAY,I=s({static:{localeTexts:D},init:function(t,e){e=function(t){if((t=p({language:A,calendar:{},input:{element:null,format:null},timePicker:null,date:null,showAlways:!1,type:C,selectableRanges:null,openers:[],autoClose:!0,usageStatistics:!0,weekStartDay:S},t)).selectableRanges=t.selectableRanges||[[E.MIN_DATE,E.MAX_DATE]],!g(t.calendar))throw new Error("Calendar option must be an object");if(!g(t.input))throw new Error("Input option must be an object");if(!_(t.selectableRanges))throw new Error("Selectable-ranges must be a 2d-array");return t.localeText=D[t.language],t.calendar.language=t.language,t.calendar.type=t.type,t.timePicker=t.timePicker||t.timepicker,t}(e),this._language=e.language,this._container=w.getElement(t),this._container.innerHTML=M(p(e,{isTab:e.timePicker&&"tab"===e.timePicker.layoutType})),this._element=this._container.firstChild,this._calendar=new v(this._element.querySelector(".tui-calendar-container"),p(e.calendar,{usageStatistics:e.usageStatistics,weekStartDay:e.weekStartDay})),this._timePicker=null,this._datepickerInput=null,this._date=null,this._rangeModel=null,this._openers=[],this._isEnabled=!0,this._id="tui-datepicker-"+w.generateId(),this._type=e.type,this.showAlways=e.showAlways,this.autoClose=e.autoClose,this._initializeDatePicker(e)},_initializeDatePicker:function(t){this.setRanges(t.selectableRanges),this._setEvents(),this._initTimePicker(t.timePicker,t.usageStatistics),this.setInput(t.input.element),this.setDateFormat(t.input.format),this.setDate(t.date),r(t.openers,this.addOpener,this),this.showAlways||this._hide(),this.getType()===C&&o(this._element.querySelector(".tui-datepicker-body"),"tui-datepicker-type-date")},_setEvents:function(){x.on(this._element,"click",this._onClickHandler,this),this._calendar.on("draw",this._onDrawCalendar,this)},_removeEvents:function(){x.off(this._element,"click",this._onClickHandler,this),this._calendar.off()},_setDocumentEvents:function(){x.on(document,"mousedown",this._onMousedownDocument,this)},_removeDocumentEvents:function(){x.off(document,"mousedown",this._onMousedownDocument)},_setOpenerEvents:function(t){x.on(t,"click",this.toggle,this)},_removeOpenerEvents:function(t){x.off(t,"click",this.toggle)},_initTimePicker:function(t,e){var n;t&&(n=t.layoutType||"",g(t)?t.usageStatistics=e:t={usageStatistics:e},this._timePicker=new y(this._element.querySelector(".tui-timepicker-container"),t),"tab"===n.toLowerCase()&&this._timePicker.hide(),this._timePicker.on("change",(function(t){var e;this._date&&(e=new Date(this._date),this.setDate(e.setHours(t.hour,t.minute)))}),this))},_changePicker:function(t){var e=c(t,".tui-datepicker-selector-button");!!e.querySelector(".tui-ico-date")?(this._calendar.show(),this._timePicker.hide()):(this._calendar.hide(),this._timePicker.show()),l(this._element.querySelector(".tui-is-checked"),"tui-is-checked"),o(e,"tui-is-checked")},_isOpener:function(t){var e=w.getElement(t);return i(e,this._openers)>-1},_setTodayClassName:function(t){this.getCalendarType()===C&&(Number(u(t,"timestamp"))===(new Date).setHours(0,0,0,0)?o(t,"tui-calendar-today"):l(t,"tui-calendar-today"))},_setSelectableClassName:function(t){var e=new Date(Number(u(t,"timestamp")));this._isSelectableOnCalendar(e)?(o(t,"tui-is-selectable"),l(t,"tui-is-blocked")):(l(t,"tui-is-selectable"),o(t,"tui-is-blocked"))},_setSelectedClassName:function(t){var e=new Date(Number(u(t,"timestamp")));this._isSelectedOnCalendar(e)?o(t,Y):l(t,Y)},_isSelectableOnCalendar:function(t){var e=this.getCalendarType(),n=k.cloneWithStartOf(t,e).getTime(),i=k.cloneWithEndOf(t,e).getTime();return this._rangeModel.hasOverlap(n,i)},_isSelectedOnCalendar:function(t){var e=this.getDate(),n=this.getCalendarType();return e&&k.isSame(e,t,n)},_show:function(){l(this._element,"tui-hidden")},_hide:function(){o(this._element,"tui-hidden")},_syncToInput:function(){this._date&&this._datepickerInput.setDate(this._date)},_syncFromInput:function(t){var e,n=!1;try{e=this._datepickerInput.getDate(),this.isSelectable(e)?(this._timePicker&&this._timePicker.setTime(e.getHours(),e.getMinutes()),this.setDate(e)):n=!0}catch(t){this.fire("error",{type:"ParsingError",message:t.message}),n=!0}finally{n&&(t?this._syncToInput():this.setNull())}},_onMousedownDocument:function(t){var e=w.getTarget(t),n=w.getSelector(e),r=!!n&&this._element.querySelector(n),s=this._datepickerInput.is(e),a=i(e,this._openers)>-1;!(this.showAlways||s||r||a)&&this.close()},_onClickHandler:function(t){var e=w.getTarget(t);c(e,".tui-is-selectable")?(t.preventDefault(),this._updateDate(e)):c(e,"."+H)?(t.preventDefault(),this._updateDateToToday()):c(e,".tui-calendar-title")?this.drawUpperCalendar(this._date):c(e,".tui-datepicker-selector-button")&&this._changePicker(e)},_updateDateToToday:function(){this.setDate(Date.now()),this.close()},_updateDate:function(t){var e=Number(u(t,"timestamp")),n=new Date(e),i=this._timePicker,r=this._date;this.getCalendarType()!==this.getType()?this.drawLowerCalendar(n):(i?n.setHours(i.getHour(),i.getMinute()):r&&n.setHours(r.getHours(),r.getMinutes()),this.setDate(n),!this.showAlways&&this.autoClose&&this.close())},_onDrawCalendar:function(t){r(t.dateElements,(function(t){this._setTodayClassName(t),this._setSelectableClassName(t),this._setSelectedClassName(t)}),this),this._setDisplayHeadButtons(),this.fire("draw",t)},_setDisplayHeadButtons:function(){var t,e,n,i,r=this._calendar.getNextYearDate(),s=this._calendar.getPrevYearDate(),a=this._rangeModel.getMaximumValue(),o=this._rangeModel.getMinimumValue(),c=this._element.querySelector("."+O),u=this._element.querySelector("."+R);this.getCalendarType()===C?(t=k.cloneWithStartOf(this._calendar.getNextDate(),P),e=k.cloneWithEndOf(this._calendar.getPrevDate(),P),n=this._element.querySelector("."+L),i=this._element.querySelector("."+F),this._setDisplay(n,t.getTime()<=a),this._setDisplay(i,e.getTime()>=o),s.setDate(1),r.setDate(1)):(s.setMonth(12,0),r.setMonth(0,1)),this._setDisplay(c,r.getTime()<=a),this._setDisplay(u,s.getTime()>=o)},_setDisplay:function(t,e){t&&(e?l(t,"tui-hidden"):o(t,"tui-hidden"))},_onChangeInput:function(){this._syncFromInput(!0)},_isChanged:function(t){var e=this.getDate();return!e||t.getTime()!==e.getTime()},_refreshFromRanges:function(){this.isSelectable(this._date)?this._calendar.draw():this.setNull()},getCalendarType:function(){return this._calendar.getType()},getType:function(){return this._type},isSelectable:function(t){var e,n,i=this.getType();return!!k.isValidDate(t)&&(e=k.cloneWithStartOf(t,i).getTime(),n=k.cloneWithEndOf(t,i).getTime(),this._rangeModel.hasOverlap(e,n))},isSelected:function(t){return k.isValidDate(t)&&k.isSame(this._date,t,this.getType())},setRanges:function(t){var e=[];r(t,(function(t){var n=new Date(t[0]).getTime(),i=new Date(t[1]).getTime();e.push([n,i])})),this._rangeModel=new T(e),this._refreshFromRanges()},setType:function(t){this._type=t},addRange:function(t,e){t=new Date(t).getTime(),e=new Date(e).getTime(),this._rangeModel.add(t,e),this._refreshFromRanges()},removeRange:function(t,e,n){t=new Date(t),e=new Date(e),n&&(t=k.cloneWithStartOf(t,n),e=k.cloneWithEndOf(e,n)),this._rangeModel.exclude(t.getTime(),e.getTime()),this._refreshFromRanges()},addOpener:function(t){t=w.getElement(t),this._isOpener(t)||(this._openers.push(t),this._setOpenerEvents(t))},removeOpener:function(t){var e;t=w.getElement(t),(e=i(t,this._openers))>-1&&(this._removeOpenerEvents(t),this._openers.splice(e,1))},removeAllOpeners:function(){r(this._openers,(function(t){this._removeOpenerEvents(t)}),this),this._openers=[]},open:function(){!this.isOpened()&&this._isEnabled&&(this._calendar.draw({date:this._date,type:this._type}),this._show(),this.showAlways||this._setDocumentEvents(),this.fire("open"))},drawUpperCalendar:function(t){var e=this.getCalendarType();e===C?this._calendar.draw({date:t,type:P}):e===P&&this._calendar.draw({date:t,type:N})},drawLowerCalendar:function(t){var e=this.getCalendarType();e===this.getType()||(e===P?this._calendar.draw({date:t,type:C}):e===N&&this._calendar.draw({date:t,type:P}))},close:function(){this.isOpened()&&(this._removeDocumentEvents(),this._hide(),this.fire("close"))},toggle:function(){this.isOpened()?this.close():this.open()},getDate:function(){return this._date?new Date(this._date):null},setDate:function(t){var e,n;null!==t?(e=m(t)||f(t),n=new Date(t),e&&this._isChanged(n)&&this.isSelectable(n)&&(n=new Date(t),this._date=n,this._calendar.draw({date:n}),this._timePicker&&this._timePicker.setTime(n.getHours(),n.getMinutes()),this._syncToInput(),this.fire("change"))):this.setNull()},setNull:function(){var t=this._calendar.getDate(),e=null!==this._date;this._date=null,this._datepickerInput&&this._datepickerInput.clearText(),this._timePicker&&this._timePicker.setTime(0,0),this.isSelectable(t)?this._calendar.draw():this._calendar.draw({date:new Date(this._rangeModel.getMinimumValue())}),e&&this.fire("change")},setDateFormat:function(t){this._datepickerInput.setFormat(t),this._syncToInput()},isOpened:function(){return!h(this._element,"tui-hidden")},getTimePicker:function(){return this._timePicker},getCalendar:function(){return this._calendar},getLocaleText:function(){return D[this._language]||D[A]},setInput:function(t,e){var n,i=this._datepickerInput,r=this.getLocaleText();e=e||{},i&&(n=i.getFormat(),i.destroy()),this._datepickerInput=new b(t,{format:e.format||n,id:this._id,localeText:r}),this._datepickerInput.on({change:this._onChangeInput,click:this.open},this),e.syncFromInput?this._syncFromInput():this._syncToInput()},enable:function(){this._isEnabled||(this._isEnabled=!0,this._datepickerInput.enable(),r(this._openers,(function(t){t.removeAttribute("disabled"),this._setOpenerEvents(t)}),this))},disable:function(){this._isEnabled&&(this._isEnabled=!1,this.close(),this._datepickerInput.disable(),r(this._openers,(function(t){t.setAttribute("disabled",!0),this._removeOpenerEvents(t)}),this))},isDisabled:function(){return!this._isEnabled},addCssClass:function(t){o(this._element,t)},removeCssClass:function(t){l(this._element,t)},getDateElements:function(){return this._calendar.getDateElements()},findOverlappedRange:function(t,e){var n=new Date(t).getTime(),i=new Date(e).getTime(),r=this._rangeModel.findOverlappedRange(n,i);return[new Date(r[0]),new Date(r[1])]},changeLanguage:function(t){this._language=t,this._calendar.changeLanguage(this._language),this._datepickerInput.changeLocaleTitles(this.getLocaleText().titles),this.setDateFormat(this._datepickerInput.getFormat()),this._timePicker&&this._timePicker.changeLanguage(this._language)},destroy:function(){this._removeDocumentEvents(),this._calendar.destroy(),this._timePicker&&this._timePicker.destroy(),this._datepickerInput&&this._datepickerInput.destroy(),this._removeEvents(),d(this._element),this.removeAllOpeners(),this._calendar=this._timePicker=this._datepickerInput=this._container=this._element=this._date=this._rangeModel=this._openers=this._isEnabled=this._id=null}});a.mixin(I),t.exports=I},function(t,e,n){"use strict";t.exports=function(t){return t===Object(t)}},function(t,e,n){"use strict";t.exports=function(t,e,n){var i;for(i in n=n||null,t)if(t.hasOwnProperty(i)&&!1===e.call(n,t[i],i,t))break}},function(t,e,n){"use strict";var i=n(6),r=n(12);t.exports=function(t,e){e=(e=i(e)?e.join(" "):e).replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),r(t.className.baseVal)?t.className=e:t.className.baseVal=e}},function(t,e,n){"use strict";var i=n(40);t.exports=function(t,e){var n=t.parentNode;if(i(t,e))return t;for(;n&&n!==document;){if(i(n,e))return n;n=n.parentNode}return null}},function(t,e,n){"use strict";var i=n(42);t.exports=function(t,e){return t.dataset?t.dataset[e]:t.getAttribute("data-"+i(e))}},function(t,e,n){"use strict";var i=n(3),r=n(17);t.exports=function(t,e){var n;return t.classList?t.classList.contains(e):(n=r(t).split(/\s+/),i(e,n)>-1)}},function(t,e,n){"use strict";t.exports=function(t){return t instanceof Date}},function(t,e,n){"use strict";var i=n(0),r=n(8),s=n(16),a=n(27),o=n(18),c=n(14),u=n(7),h=n(44),l=n(49),d=n(10),p=n(1),_=n(5),f=n(4),m=p.DEFAULT_WEEK_START_DAY,g=p.DEFAULT_LANGUAGE_TYPE,y=p.TYPE_DATE,v=p.TYPE_MONTH,T=p.TYPE_YEAR,E=p.CLASS_NAME_PREV_MONTH_BTN,D=p.CLASS_NAME_PREV_YEAR_BTN,k=p.CLASS_NAME_NEXT_YEAR_BTN,w=p.CLASS_NAME_NEXT_MONTH_BTN,x=i({static:{localeTexts:d},init:function(t,e){e=u({language:g,showToday:!0,showJumpButtons:!1,date:new Date,type:y,usageStatistics:!0,weekStartDay:m},e),this._container=f.getElement(t),this._container.innerHTML='<div class="tui-calendar">    <div class="tui-calendar-header"></div>    <div class="tui-calendar-body"></div></div>',this._element=this._container.firstChild,this._date=null,this._type=null,this._header=null,this._body=null,this._initHeader(e),this._initBody(e),this.draw({date:e.date,type:e.type}),e.usageStatistics&&f.sendHostName()},_initHeader:function(t){var e=this._element.querySelector(".tui-calendar-header");this._header=new h(e,t),this._header.on("click",(function(t){var e=f.getTarget(t);a(e,E)?this.drawPrev():a(e,D)?this._onClickPrevYear():a(e,w)?this.drawNext():a(e,k)&&this._onClickNextYear()}),this)},_initBody:function(t){var e=this._element.querySelector(".tui-calendar-body");this._body=new l(e,t)},_onClickPrevYear:function(){this.getType()===y?this.draw({date:this._getRelativeDate(-12)}):this.drawPrev()},_onClickNextYear:function(){this.getType()===y?this.draw({date:this._getRelativeDate(12)}):this.drawNext()},_isValidType:function(t){return t===y||t===v||t===T},_shouldUpdate:function(t,e){var n=this._date;if(!_.isValidDate(t))throw new Error("Invalid date");if(!this._isValidType(e))throw new Error("Invalid layer type");return!n||n.getFullYear()!==t.getFullYear()||n.getMonth()!==t.getMonth()||this.getType()!==e},_render:function(){var t=this._date,e=this.getType();switch(this._header.render(t,e),this._body.render(t,e),o(this._element,"tui-calendar-month","tui-calendar-year"),e){case v:s(this._element,"tui-calendar-month");break;case T:s(this._element,"tui-calendar-year")}},_getRelativeDate:function(t){var e=this._date;return new Date(e.getFullYear(),e.getMonth()+t)},draw:function(t){var e,n;e=(t=t||{}).date||this._date,n=(t.type||this.getType()).toLowerCase(),this._shouldUpdate(e,n)&&(this._date=e,this._type=n,this._render()),this.fire("draw",{date:this._date,type:n,dateElements:this._body.getDateElements()})},show:function(){o(this._element,"tui-hidden")},hide:function(){s(this._element,"tui-hidden")},drawNext:function(){this.draw({date:this.getNextDate()})},drawPrev:function(){this.draw({date:this.getPrevDate()})},getNextDate:function(){return this.getType()===y?this._getRelativeDate(1):this.getNextYearDate()},getPrevDate:function(){return this.getType()===y?this._getRelativeDate(-1):this.getPrevYearDate()},getNextYearDate:function(){switch(this.getType()){case y:case v:return this._getRelativeDate(12);case T:return this._getRelativeDate(108);default:throw new Error("Unknown layer type")}},getPrevYearDate:function(){switch(this.getType()){case y:case v:return this._getRelativeDate(-12);case T:return this._getRelativeDate(-108);default:throw new Error("Unknown layer type")}},changeLanguage:function(t){this._header.changeLanguage(t),this._body.changeLanguage(t),this._render()},getDate:function(){return new Date(this._date)},getType:function(){return this._type},getDateElements:function(){return this._body.getDateElements()},addCssClass:function(t){s(this._element,t)},removeCssClass:function(t){o(this._element,t)},destroy:function(){this._header.destroy(),this._body.destroy(),c(this._element),this._type=this._date=this._container=this._element=this._header=this._body=null}});r.mixin(x),t.exports=x},function(t,e,n){"use strict";var i=n(3),r=n(2),s=n(0),a=n(4),o=n(5),c=n(1),u=n(10),h=/\\?(yyyy|yy|mmmm|mmm|mm|m|dd|d|hh|h|a)/gi,l={yyyy:{expression:"(\\d{4}|\\d{2})",type:c.TYPE_YEAR},yy:{expression:"(\\d{4}|\\d{2})",type:c.TYPE_YEAR},y:{expression:"(\\d{4}|\\d{2})",type:c.TYPE_YEAR},M:{expression:"(1[012]|0[1-9]|[1-9])",type:c.TYPE_MONTH},MM:{expression:"(1[012]|0[1-9]|[1-9])",type:c.TYPE_MONTH},MMM:{expression:"(1[012]|0[1-9]|[1-9])",type:c.TYPE_MONTH},MMMM:{expression:"(1[012]|0[1-9]|[1-9])",type:c.TYPE_MONTH},mmm:{expression:"(1[012]|0[1-9]|[1-9])",type:c.TYPE_MONTH},mmmm:{expression:"(1[012]|0[1-9]|[1-9])",type:c.TYPE_MONTH},dd:{expression:"([12]\\d{1}|3[01]|0[1-9]|[1-9])",type:c.TYPE_DATE},d:{expression:"([12]\\d{1}|3[01]|0[1-9]|[1-9])",type:c.TYPE_DATE},D:{expression:"([12]\\d{1}|3[01]|0[1-9]|[1-9])",type:c.TYPE_DATE},DD:{expression:"([12]\\d{1}|3[01]|0[1-9]|[1-9])",type:c.TYPE_DATE},h:{expression:"(d{1}|0\\d{1}|1\\d{1}|2[0123])",type:c.TYPE_HOUR},hh:{expression:"(d{1}|[01]\\d{1}|2[0123])",type:c.TYPE_HOUR},H:{expression:"(d{1}|0\\d{1}|1\\d{1}|2[0123])",type:c.TYPE_HOUR},HH:{expression:"(d{1}|[01]\\d{1}|2[0123])",type:c.TYPE_HOUR},m:{expression:"(d{1}|[012345]\\d{1})",type:c.TYPE_MINUTE},mm:{expression:"(d{1}|[012345]\\d{1})",type:c.TYPE_MINUTE},a:{expression:"([ap]m)",type:c.TYPE_MERIDIEM},A:{expression:"([ap]m)",type:c.TYPE_MERIDIEM}},d=s({init:function(t,e){this._rawStr=t,this._keyOrder=null,this._regExp=null,this._titles=e||u.en.titles,this._parseFormat()},_parseFormat:function(){var t="^",e=this._rawStr.match(h),n=[];e=a.filter(e,(function(t){return"\\"!==t[0]})),r(e,(function(e,i){/m/i.test(e)||(e=e.toLowerCase()),t+=l[e].expression+"[\\D\\s]*",n[i]=l[e].type})),t+="$",this._keyOrder=n,this._regExp=new RegExp(t,"gi")},parse:function(t){var e,n={year:0,month:1,date:1,hour:0,minute:0},i=!1,s=!1;if(this._regExp.lastIndex=0,!(e=this._regExp.exec(t)))throw Error('DateTimeFormatter: Not matched - "'+t+'"');return r(this._keyOrder,(function(t,r){var a=e[r+1];if(t===c.TYPE_MERIDIEM&&/[ap]m/i.test(a))i=!0,s=/pm/i.test(a);else{if(0!==(a=Number(a))&&!a)throw Error("DateTimeFormatter: Unknown value - "+e[r+1]);t===c.TYPE_YEAR&&a<100&&(a+=2e3),n[t]=a}})),i&&(s=s||n.hour>12,n.hour%=12,s&&(n.hour+=12)),new Date(n.year,n.month-1,n.date,n.hour,n.minute)},getRawString:function(){return this._rawStr},format:function(t){var e,n=t.getFullYear(),r=t.getMonth()+1,s=t.getDate(),a=t.getDay(),u=t.getHours(),l=t.getMinutes(),d="a";return i(c.TYPE_MERIDIEM,this._keyOrder)>-1&&(d=u>=12?"pm":"am",u=o.getMeridiemHour(u)),e={yyyy:n,yy:String(n).substr(2,2),M:r,MM:o.prependLeadingZero(r),MMM:this._titles.MMM[r-1],MMMM:this._titles.MMMM[r-1],d:s,dd:o.prependLeadingZero(s),D:this._titles.D[a],DD:this._titles.DD[a],hh:o.prependLeadingZero(u),h:u,mm:o.prependLeadingZero(l),m:l,A:d.toUpperCase(),a:d},this._rawStr.replace(h,(function(t){return"\\"===t[0]?t.substr(1):e[t]||e[t.toLowerCase()]||""}))}});t.exports=d},function(t,e,n){"use strict";var i=n(13),r=n(9),s=n(32);function a(t,e,n,i){function a(e){n.call(i||t,e||window.event)}"addEventListener"in t?t.addEventListener(e,a):"attachEvent"in t&&t.attachEvent("on"+e,a),function(t,e,n,i){var a=s(t,e),o=!1;r(a,(function(t){return t.handler!==n||(o=!0,!1)})),o||a.push({handler:n,wrappedHandler:i})}(t,e,n,a)}t.exports=function(t,e,n,s){i(e)?r(e.split(/\s+/g),(function(e){a(t,e,n,s)})):r(e,(function(e,i){a(t,i,e,n)}))}},function(t,e,n){"use strict";var i="_feEventKey";t.exports=function(t,e){var n,r=t[i];return r||(r=t[i]={}),(n=r[e])||(n=r[e]=[]),n}},function(t,e,n){"use strict";var i=n(13),r=n(9),s=n(32);function a(t,e,n){var i,a=s(t,e);n?(r(a,(function(r,s){return n!==r.handler||(o(t,e,r.wrappedHandler),i=s,!1)})),a.splice(i,1)):(r(a,(function(n){o(t,e,n.wrappedHandler)})),a.splice(0,a.length))}function o(t,e,n){"removeEventListener"in t?t.removeEventListener(e,n):"detachEvent"in t&&t.detachEvent("on"+e,n)}t.exports=function(t,e,n){i(e)?r(e.split(/\s+/g),(function(e){a(t,e,n)})):r(e,(function(e,n){a(t,n,e)}))}},function(t,e,n){"use strict";var i=n(21),r=n(60),s=n(29);n(61),i.createCalendar=function(t,e){return new s(t,e)},i.createRangePicker=function(t){return new r(t)},t.exports=i},function(t,e,n){"use strict";var i=n(36);t.exports=function(t,e){var n=i(e.prototype);n.constructor=t,t.prototype=n}},function(t,e,n){"use strict";t.exports=function(t){function e(){}return e.prototype=t,new e}},function(t,e,n){"use strict";var i=n(12),r=n(38);t.exports=function(t){return!i(t)&&!r(t)}},function(t,e,n){"use strict";t.exports=function(t){return null===t}},function(t,e,n){"use strict";t.exports=function(t){return t instanceof Function}},function(t,e,n){"use strict";var i=n(3),r=n(41),s=Element.prototype,a=s.matches||s.webkitMatchesSelector||s.mozMatchesSelector||s.msMatchesSelector||function(t){var e=this.document||this.ownerDocument;return i(this,r(e.querySelectorAll(t)))>-1};t.exports=function(t,e){return a.call(t,e)}},function(t,e,n){"use strict";var i=n(2);t.exports=function(t){var e;try{e=Array.prototype.slice.call(t)}catch(n){e=[],i(t,(function(t){e.push(t)}))}return e}},function(t,e,n){"use strict";t.exports=function(t){return t.replace(/([A-Z])/g,(function(t){return"-"+t.toLowerCase()}))}},function(e,n){e.exports=t},function(t,e,n){"use strict";var i=n(0),r=n(8),s=n(25),a=n(14),o=n(10),c=n(45),u=n(30),h=n(1),l=n(4),d=n(19),p=h.TYPE_DATE,_=h.TYPE_MONTH,f=h.TYPE_YEAR,m=i({init:function(t,e){this._container=l.getElement(t),this._innerElement=null,this._infoElement=null,this._showToday=e.showToday,this._showJumpButtons=e.showJumpButtons,this._yearMonthTitleFormatter=null,this._yearTitleFormatter=null,this._todayFormatter=null,this._setFormatters(o[e.language]),this._setEvents(e)},_setFormatters:function(t){this._yearMonthTitleFormatter=new u(t.titleFormat,t.titles),this._yearTitleFormatter=new u("yyyy",t.titles),this._todayFormatter=new u(t.todayFormat,t.titles)},_setEvents:function(){d.on(this._container,"click",this._onClickHandler,this)},_removeEvents:function(){this.off(),d.off(this._container,"click",this._onClickHandler)},_onClickHandler:function(t){var e=l.getTarget(t);s(e,".tui-calendar-btn")&&this.fire("click",t)},_getTitleClass:function(t){switch(t){case p:return"tui-calendar-title-month";case _:return"tui-calendar-title-year";case f:return"tui-calendar-title-year-to-year";default:return""}},_getTitleText:function(t,e){var n,i,r;switch(e){case p:return this._yearMonthTitleFormatter.format(t);case _:return this._yearTitleFormatter.format(t);case f:return n=t.getFullYear(),i=new Date(n-4,0,1),r=new Date(n+4,0,1),this._yearTitleFormatter.format(i)+" - "+this._yearTitleFormatter.format(r);default:return""}},changeLanguage:function(t){this._setFormatters(o[t])},render:function(t,e){var n={showToday:this._showToday,showJumpButtons:this._showJumpButtons,todayText:this._todayFormatter.format(new Date),isDateCalendar:e===p,titleClass:this._getTitleClass(e),title:this._getTitleText(t,e)};this._container.innerHTML=c(n).replace(/^\s+|\s+$/g,""),this._innerElement=this._container.querySelector(".tui-calendar-header-inner"),n.showToday&&(this._infoElement=this._container.querySelector(".tui-calendar-header-info"))},destroy:function(){this._removeEvents(),a(this._innerElement),a(this._infoElement),this._container=this._showToday=this._showJumpButtons=this._yearMonthTitleFormatter=this._yearTitleFormatter=this._todayFormatter=this._innerElement=this._infoElement=null}});r.mixin(m),t.exports=m},function(t,e,n){"use strict";var i=n(11);t.exports=function(t){return i('{{if isDateCalendar}}  {{if showJumpButtons}}    <div class="tui-calendar-header-inner tui-calendar-has-btns">      <button class="tui-calendar-btn tui-calendar-btn-prev-year">Prev year</button>      <button class="tui-calendar-btn tui-calendar-btn-prev-month">Prev month</button>      <em class="tui-calendar-title {{titleClass}}">{{title}}</em>      <button class="tui-calendar-btn tui-calendar-btn-next-month">Next month</button>      <button class="tui-calendar-btn tui-calendar-btn-next-year">Next year</button>    </div>  {{else}}    <div class="tui-calendar-header-inner">      <button class="tui-calendar-btn tui-calendar-btn-prev-month">Prev month</button>      <em class="tui-calendar-title {{titleClass}}">{{title}}</em>      <button class="tui-calendar-btn tui-calendar-btn-next-month">Next month</button>    </div>  {{/if}}{{else}}  <div class="tui-calendar-header-inner">    <button class="tui-calendar-btn tui-calendar-btn-prev-year">Prev year</button>    <em class="tui-calendar-title {{titleClass}}">{{title}}</em>    <button class="tui-calendar-btn tui-calendar-btn-next-year">Next year</button>  </div>{{/if}}{{if showToday}}  <div class="tui-calendar-header-info">    <p class="tui-calendar-title-today">{{todayText}}</p>  </div>{{/if}}',t)}},function(t,e,n){"use strict";t.exports=function(t){return"object"==typeof HTMLElement?t&&(t instanceof HTMLElement||!!t.nodeType):!(!t||!t.nodeType)}},function(t,e,n){"use strict";var i=n(12),r=n(48),s=6048e5;t.exports=function(t,e){var n=location.hostname,a="TOAST UI "+t+" for "+n+": Statistics",o=window.localStorage.getItem(a);(i(window.tui)||!1!==window.tui.usageStatistics)&&(o&&!function(t){return(new Date).getTime()-t>s}(o)||(window.localStorage.setItem(a,(new Date).getTime()),setTimeout((function(){"interactive"!==document.readyState&&"complete"!==document.readyState||r("https://www.google-analytics.com/collect",{v:1,t:"event",tid:e,cid:n,dp:n,dh:t,el:t,ec:"use"})}),1e3)))}},function(t,e,n){"use strict";var i=n(23);t.exports=function(t,e){var n=document.createElement("img"),r="";return i(e,(function(t,e){r+="&"+e+"="+t})),r=r.substring(1),n.src=t+"?"+r,n.style.display="none",document.body.appendChild(n),document.body.removeChild(n),n}},function(t,e,n){"use strict";var i=n(2),r=n(0),s=n(50),a=n(52),o=n(54),c=n(1),u=c.TYPE_DATE,h=c.TYPE_MONTH,l=c.TYPE_YEAR,d=r({init:function(t,e){var n=e.language,i=e.weekStartDay;this._container=t,this._dateLayer=new s(n,i),this._monthLayer=new a(n),this._yearLayer=new o(n),this._currentLayer=this._dateLayer},_getLayer:function(t){switch(t){case u:return this._dateLayer;case h:return this._monthLayer;case l:return this._yearLayer;default:return this._currentLayer}},_eachLayer:function(t){i([this._dateLayer,this._monthLayer,this._yearLayer],t)},changeLanguage:function(t){this._eachLayer((function(e){e.changeLanguage(t)}))},render:function(t,e){var n=this._getLayer(e);this._currentLayer.remove(),n.render(t,this._container),this._currentLayer=n},getDateElements:function(){return this._currentLayer.getDateElements()},destroy:function(){this._eachLayer((function(t){t.remove()})),this._container=this._currentLayer=this._dateLayer=this._monthLayer=this._yearLayer=null}});t.exports=d},function(t,e,n){"use strict";var i=n(0),r=n(5),s=n(51),a=n(20),o=n(1).TYPE_DATE,c=n(1).WEEK_START_DAY_MAP,u=7,h=i(a,{init:function(t,e){a.call(this,t),this.weekStartDay=c[String(e).toLowerCase()]||0},_type:o,_makeContext:function(t){var e,n,i,r,s=this._localeText.titles.D;if(e=(t=t||new Date).getFullYear(),n=t.getMonth()+1,this.weekStartDay){for(i=s.slice(),r=0;r<this.weekStartDay;r+=1)i.push(i.shift());s=i}return{Sun:s[0],Mon:s[1],Tue:s[2],Wed:s[3],Thu:s[4],Fri:s[5],Sat:s[6],year:e,month:n,weeks:this._getWeeks(e,n)}},_getWeeks:function(t,e){for(var n,i,s,a,o,c=0,h=6,l=[];c<h;){for(i=[],s=this.weekStartDay;s<u+this.weekStartDay;s+=1)i.push(r.getDateOfWeek(t,e,c,s));n=this._getWeek(t,e,i),!this.weekStartDay||(a=c,o=n[0].dayInMonth,a||1===o||o>u)||(l.push(this._getFirstWeek(t,e)),h-=1),l.push(n),c+=1}return l},_getWeek:function(t,e,n){for(var i,r,s=new Date(t,e-1,1),a=new Date(t,e,0),o=[],c=0,u=n.length;c<u;c+=1)r="tui-calendar-date",(i=n[c])<s&&(r+=" tui-calendar-prev-month"),i>a&&(r+=" tui-calendar-next-month"),0===i.getDay()?r+=" tui-calendar-sun":6===i.getDay()&&(r+=" tui-calendar-sat"),o.push({dayInMonth:i.getDate(),className:r,timestamp:i.getTime()});return o},render:function(t,e){var n=this._makeContext(t);e.innerHTML=s(n),this._element=e.firstChild},getDateElements:function(){return this._element.querySelectorAll(".tui-calendar-date")},_getFirstWeek:function(t,e){var n,i=[];for(n=this.weekStartDay;n<u+this.weekStartDay;n+=1)i.push(r.getDateOfWeek(t,e,-1,n));return this._getWeek(t,e,i)}});t.exports=h},function(t,e,n){"use strict";var i=n(11);t.exports=function(t){return i('<table class="tui-calendar-body-inner" cellspacing="0" cellpadding="0">  <caption><span>Dates</span></caption>  <thead class="tui-calendar-body-header">    <tr>      <th class="tui-sun" scope="col">{{Sun}}</th>      <th scope="col">{{Mon}}</th>      <th scope="col">{{Tue}}</th>      <th scope="col">{{Wed}}</th>      <th scope="col">{{Thu}}</th>      <th scope="col">{{Fri}}</th>      <th class="tui-sat" scope="col">{{Sat}}</th>    </tr>  </thead>  <tbody>    {{each weeks}}    <tr class="tui-calendar-week">      {{each @this}}      <td class="{{@this["className"]}}" data-timestamp="{{@this["timestamp"]}}">{{@this["dayInMonth"]}}</td>      {{/each}}    </tr>    {{/each}}  </tbody></table>',t)}},function(t,e,n){"use strict";var i=n(0),r=n(53),s=n(20),a=n(1).TYPE_MONTH,o=n(5),c=i(s,{init:function(t){s.call(this,t)},_type:a,_makeContext:function(t){var e=this._localeText.titles.MMM;return{year:t.getFullYear(),Jan:e[0],Feb:e[1],Mar:e[2],Apr:e[3],May:e[4],Jun:e[5],Jul:e[6],Aug:e[7],Sep:e[8],Oct:e[9],Nov:e[10],Dec:e[11],getFirstDayTimestamp:o.getFirstDayTimestamp}},render:function(t,e){var n=this._makeContext(t);e.innerHTML=r(n),this._element=e.firstChild},getDateElements:function(){return this._element.querySelectorAll(".tui-calendar-month")}});t.exports=c},function(t,e,n){"use strict";var i=n(11);t.exports=function(t){return i('<table class="tui-calendar-body-inner">  <caption><span>Months</span></caption>  <tbody>    <tr class="tui-calendar-month-group">      <td class="tui-calendar-month" data-timestamp={{getFirstDayTimestamp year 0}}>{{Jan}}</td>      <td class="tui-calendar-month" data-timestamp={{getFirstDayTimestamp year 1}}>{{Feb}}</td>      <td class="tui-calendar-month" data-timestamp={{getFirstDayTimestamp year 2}}>{{Mar}}</td>      <td class="tui-calendar-month" data-timestamp={{getFirstDayTimestamp year 3}}>{{Apr}}</td>    </tr>    <tr class="tui-calendar-month-group">      <td class="tui-calendar-month" data-timestamp={{getFirstDayTimestamp year 4}}>{{May}}</td>      <td class="tui-calendar-month" data-timestamp={{getFirstDayTimestamp year 5}}>{{Jun}}</td>      <td class="tui-calendar-month" data-timestamp={{getFirstDayTimestamp year 6}}>{{Jul}}</td>      <td class="tui-calendar-month" data-timestamp={{getFirstDayTimestamp year 7}}>{{Aug}}</td>    </tr>    <tr class="tui-calendar-month-group">      <td class="tui-calendar-month" data-timestamp={{getFirstDayTimestamp year 8}}>{{Sep}}</td>      <td class="tui-calendar-month" data-timestamp={{getFirstDayTimestamp year 9}}>{{Oct}}</td>      <td class="tui-calendar-month" data-timestamp={{getFirstDayTimestamp year 10}}>{{Nov}}</td>      <td class="tui-calendar-month" data-timestamp={{getFirstDayTimestamp year 11}}>{{Dec}}</td>    </tr>  </tbody></table>',t)}},function(t,e,n){"use strict";var i=n(0),r=n(55),s=n(20),a=n(1).TYPE_YEAR,o=n(5),c=i(s,{init:function(t){s.call(this,t)},_type:a,_makeContext:function(t){var e=t.getFullYear();return{yearGroups:[o.getRangeArr(e-4,e-2),o.getRangeArr(e-1,e+1),o.getRangeArr(e+2,e+4)],getFirstDayTimestamp:o.getFirstDayTimestamp}},render:function(t,e){var n=this._makeContext(t);e.innerHTML=r(n),this._element=e.firstChild},getDateElements:function(){return this._element.querySelectorAll(".tui-calendar-year")}});t.exports=c},function(t,e,n){"use strict";var i=n(11);t.exports=function(t){return i('<table class="tui-calendar-body-inner">  <caption><span>Years</span></caption>  <tbody>    {{each yearGroups}}    <tr class="tui-calendar-year-group">      {{each @this}}      <td class="tui-calendar-year" data-timestamp={{getFirstDayTimestamp @this 0}}>        {{@this}}      </td>      {{/each}}    </tr>    {{/each}}  </tbody></table>',t)}},function(t,e,n){"use strict";var i=n(2),r=n(0),s=n(15),a=n(57),o=n(4),c=r({init:function(t){t=t||[],this._ranges=[],i(t,(function(t){this.add(t[0],t[1])}),this)},contains:function(t,e){for(var n=0,i=this._ranges.length;n<i;n+=1)if(this._ranges[n].contains(t,e))return!0;return!1},hasOverlap:function(t,e){for(var n=0,i=this._ranges.length;n<i;n+=1)if(this._ranges[n].isOverlapped(t,e))return!0;return!1},add:function(t,e){for(var n,i=!1,r=0,s=this._ranges.length;r<s;r+=1){if(i=(n=this._ranges[r]).isOverlapped(t,e)){n.merge(t,e);break}if(t<n.start)break}i||this._ranges.splice(r,0,new a(t,e))},getMinimumValue:function(){return this._ranges[0].start},getMaximumValue:function(){var t=this._ranges.length;return this._ranges[t-1].end},exclude:function(t,e){s(e)||(e=t),i(this._ranges,(function(n){var i;n.isOverlapped(t,e)&&(i=n.end,n.exclude(t,e),e+1<=i&&this.add(e+1,i))}),this),this._ranges=o.filter(this._ranges,(function(t){return!t.isEmpty()}))},findOverlappedRange:function(t,e){for(var n,i=0,r=this._ranges.length;i<r;i+=1)if((n=this._ranges[i]).isOverlapped(t,e))return[n.start,n.end];return null}});t.exports=c},function(t,e,n){"use strict";var i=n(0),r=n(15),s=i({init:function(t,e){this.setRange(t,e)},setRange:function(t,e){r(e)||(e=t),this.start=Math.min(t,e),this.end=Math.max(t,e)},merge:function(t,e){r(t)&&r(e)&&this.isOverlapped(t,e)&&(this.start=Math.min(t,this.start),this.end=Math.max(e,this.end))},isEmpty:function(){return!r(this.start)||!r(this.end)},setEmpty:function(){this.start=this.end=null},contains:function(t,e){return r(e)||(e=t),this.start<=t&&e<=this.end},isOverlapped:function(t,e){return r(e)||(e=t),this.start<=e&&this.end>=t},exclude:function(t,e){t<=this.start&&e>=this.end?this.setEmpty():this.contains(t)?this.setRange(this.start,t-1):this.contains(e)&&this.setRange(e+1,this.end)}});t.exports=s},function(t,e,n){"use strict";var i=n(11);t.exports=function(t){return i('<div class="tui-datepicker">  {{if timePicker}}    {{if isTab}}      <div class="tui-datepicker-selector">        <button type="button" class="tui-datepicker-selector-button tui-is-checked" aria-label="selected">          <span class="tui-ico-date"></span>{{localeText["date"]}}        </button>        <button type="button" class="tui-datepicker-selector-button">          <span class="tui-ico-time"></span>{{localeText["time"]}}        </button>      </div>      <div class="tui-datepicker-body">        <div class="tui-calendar-container"></div>        <div class="tui-timepicker-container"></div>      </div>    {{else}}      <div class="tui-datepicker-body">        <div class="tui-calendar-container"></div>      </div>      <div class="tui-datepicker-footer">        <div class="tui-timepicker-container"></div>      </div>    {{/if}}  {{else}}    <div class="tui-datepicker-body">      <div class="tui-calendar-container"></div>    </div>  {{/if}}</div>',t)}},function(t,e,n){"use strict";var i=n(0),r=n(8),s=n(31),a=n(33),o=n(30),c=n(19),u=n(4),h=i({init:function(t,e){e.format=e.format||"yyyy-MM-dd",this._input=u.getElement(t),this._id=e.id,this._titles=e.localeText.titles,this._formatter=new o(e.format,this._titles),this._setEvents()},changeLocaleTitles:function(t){this._titles=t},_setEvents:function(){this._input&&(s(this._input,"change",this._onChangeHandler,this),c.on(this._input,"click",this._onClickHandler,this))},_removeEvents:function(){this.off(),this._input&&(a(this._input,"change",this._onChangeHandler),c.off(this._input,"click",this._onClickHandler))},_onChangeHandler:function(){this.fire("change")},_onClickHandler:function(){this.fire("click")},is:function(t){return this._input===t},enable:function(){this._input&&this._input.removeAttribute("disabled")},disable:function(){this._input&&this._input.setAttribute("disabled",!0)},getFormat:function(){return this._formatter.getRawString()},setFormat:function(t){t&&(this._formatter=new o(t,this._titles))},clearText:function(){this._input&&(this._input.value="")},setDate:function(t){this._input&&(this._input.value=this._formatter.format(t))},getDate:function(){var t="";return this._input&&(t=this._input.value),this._formatter.parse(t)},destroy:function(){this._removeEvents(),this._input=this._id=this._formatter=null}});r.mixin(h),t.exports=h},function(t,e,n){"use strict";var i=n(2),r=n(0),s=n(8),a=n(16),o=n(26),c=n(18),u=n(7),h=n(21),l=n(5),d=n(1),p=n(4),_=d.CLASS_NAME_SELECTED,f=r({init:function(t){var e,n;if(e=(t=t||{}).startpicker,n=t.endpicker,!e)throw new Error('The "startpicker" option is required.');if(!n)throw new Error('The "endpicker" option is required.');this._startpicker=null,this._endpicker=null,this._isRangeSet=!1,this._preEndPickerDate=(new Date).getDate(),this._initializePickers(t),this._syncRangesToEndpicker()},_initializePickers:function(t){var e=p.getElement(t.startpicker.container),n=p.getElement(t.endpicker.container),i=p.getElement(t.startpicker.input),r=p.getElement(t.endpicker.input),s=u({},t,{input:{element:i,format:t.format},date:t.startpicker.date,weekStartDay:t.startpicker.weekStartDay}),a=u({},t,{input:{element:r,format:t.format},date:t.endpicker.date,weekStartDay:t.endpicker.weekStartDay});this._startpicker=new h(e,s),this._startpicker.addCssClass("tui-rangepicker"),this._startpicker.on("change",this._onChangeStartpicker,this),this._startpicker.on("draw",this._onDrawPicker,this),this._endpicker=new h(n,a),this._endpicker.addCssClass("tui-rangepicker"),this._endpicker.on("change",this._onChangeEndpicker,this),this._endpicker.on("draw",this._onDrawPicker,this)},_onDrawPicker:function(t){var e=t.type,n=this._startpicker.getDate(),r=this._endpicker.getDate();n&&(r||(r=new Date(NaN)),i(t.dateElements,(function(t){var i=new Date(Number(o(t,"timestamp"))),s=l.inRange(n,r,i,e),a=l.isSame(n,i,e)||l.isSame(r,i,e);this._setRangeClass(t,s),this._setSelectedClass(t,a)}),this))},_setRangeClass:function(t,e){e?a(t,"tui-is-selected-range"):c(t,"tui-is-selected-range")},_setSelectedClass:function(t,e){e?a(t,_):c(t,_)},_syncRangesToEndpicker:function(){var t,e=this._startpicker.getDate();e?(t=this._startpicker.findOverlappedRange(l.cloneWithStartOf(e).getTime(),l.cloneWithEndOf(e).getTime()),this._endpicker.enable(),this._endpicker.setRanges([[e.getTime(),t[1].getTime()]]),this._setTimeRangeOnEndPicker()):(this._endpicker.setNull(),this._endpicker.disable())},_onChangeStartpicker:function(){this._syncRangesToEndpicker(),this.fire("change:start")},_onChangeEndpicker:function(){var t,e=this._endpicker.getDate();e?(t=e.getDate(),this._preEndPickerDate!==t&&this._setTimeRangeOnEndPicker(),this._preEndPickerDate=t):this._preEndPickerDate=null,this.fire("change:end")},_setTimeRangeOnEndPicker:function(){var t,e,n=this._endpicker._timePicker;n&&(t=this._endpicker.getDate()||this._startpicker.getDate(),e=this._getTimeRangeFromStartPicker(),t&&e[t.getDate()]?(n.setRange(e[t.getDate()]),this._isRangeSet=!0):this._isRangeSet&&(n.setRange({hour:0,minute:0}),n.resetMinuteRange(),this._isRangeSet=!1))},_getTimeRangeFromStartPicker:function(){var t=this._startpicker.getDate(),e={};return e[t.getDate()]={hour:t.getHours(),minute:t.getMinutes()},e},getStartpicker:function(){return this._startpicker},getEndpicker:function(){return this._endpicker},setStartDate:function(t){this._startpicker.setDate(t)},getStartDate:function(){return this._startpicker.getDate()},getEndDate:function(){return this._endpicker.getDate()},setEndDate:function(t){this._endpicker.setDate(t)},setRanges:function(t){this._startpicker.setRanges(t),this._syncRangesToEndpicker()},addRange:function(t,e){this._startpicker.addRange(t,e),this._syncRangesToEndpicker()},removeRange:function(t,e,n){this._startpicker.removeRange(t,e,n),this._syncRangesToEndpicker()},changeLanguage:function(t){this._startpicker.changeLanguage(t),this._endpicker.changeLanguage(t)},destroy:function(){this.off(),this._startpicker.destroy(),this._endpicker.destroy(),this._startpicker=this._endpicker=null}});s.mixin(f),t.exports=f},function(t,e,n){}])}));;/*</editor-fold desc="js_tui-date-picker.min.js">*/
/*<editor-fold desc="js_tui_calendar.min.js">*/
/*!
 * TOAST UI Calendar 2nd Edition
 * @version 2.1.3 | Tue Oct 17 2023
 * @author NHN Cloud FE Development Lab <dl_javascript@nhn.com>
 * @license MIT
 */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("tui-date-picker")):"function"==typeof define&&define.amd?define(["tui-date-picker"],t):"object"==typeof exports?exports.tui=t(require("tui-date-picker")):(e.tui=e.tui||{},e.tui.Calendar=t(e.tui.DatePicker))}(this,(function(e){return function(){var t={7111:function(e,t,n){var r=n(6733),o=n(9821),i=TypeError;e.exports=function(e){if(r(e))return e;throw i(o(e)+" is not a function")}},8505:function(e,t,n){var r=n(6733),o=String,i=TypeError;e.exports=function(e){if("object"==typeof e||r(e))return e;throw i("Can't set "+o(e)+" as a prototype")}},9736:function(e,t,n){var r=n(95),o=n(2391),i=n(1787).f,a=r("unscopables"),l=Array.prototype;null==l[a]&&i(l,a,{configurable:!0,value:o(null)}),e.exports=function(e){l[a][e]=!0}},6637:function(e,t,n){"use strict";var r=n(966).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},1176:function(e,t,n){var r=n(5052),o=String,i=TypeError;e.exports=function(e){if(r(e))return e;throw i(o(e)+" is not an object")}},9540:function(e,t,n){var r=n(905),o=n(3231),i=n(9646),a=function(e){return function(t,n,a){var l,c=r(t),s=i(c),u=o(a,s);if(e&&n!=n){for(;s>u;)if((l=c[u++])!=l)return!0}else for(;s>u;u++)if((e||u in c)&&c[u]===n)return e||u||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},7079:function(e,t,n){var r=n(5968),o=r({}.toString),i=r("".slice);e.exports=function(e){return i(o(e),8,-1)}},1589:function(e,t,n){var r=n(1601),o=n(6733),i=n(7079),a=n(95)("toStringTag"),l=Object,c="Arguments"==i(function(){return arguments}());e.exports=r?i:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=l(e),a))?n:c?i(t):"Object"==(r=i(t))&&o(t.callee)?"Arguments":r}},1590:function(e,t,n){var r=n(5968),o=Error,i=r("".replace),a=String(o("zxcasd").stack),l=/\n\s*at [^:]*:[^\n]*/,c=l.test(a);e.exports=function(e,t){if(c&&"string"==typeof e&&!o.prepareStackTrace)for(;t--;)e=i(e,l,"");return e}},7081:function(e,t,n){var r=n(8270),o=n(4826),i=n(7933),a=n(1787);e.exports=function(e,t,n){for(var l=o(t),c=a.f,s=i.f,u=0;u<l.length;u++){var d=l[u];r(e,d)||n&&r(n,d)||c(e,d,s(t,d))}}},7528:function(e,t,n){var r=n(4229);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},3723:function(e,t,n){"use strict";var r=n(693).IteratorPrototype,o=n(2391),i=n(5358),a=n(4555),l=n(5495),c=function(){return this};e.exports=function(e,t,n,s){var u=t+" Iterator";return e.prototype=o(r,{next:i(+!s,n)}),a(e,u,!1,!0),l[u]=c,e}},5762:function(e,t,n){var r=n(7400),o=n(1787),i=n(5358);e.exports=r?function(e,t,n){return o.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},5358:function(e){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},4768:function(e,t,n){var r=n(6733),o=n(1787),i=n(6039),a=n(8400);e.exports=function(e,t,n,l){l||(l={});var c=l.enumerable,s=void 0!==l.name?l.name:t;if(r(n)&&i(n,s,l),l.global)c?e[t]=n:a(t,n);else{try{l.unsafe?e[t]&&(c=!0):delete e[t]}catch(e){}c?e[t]=n:o.f(e,t,{value:n,enumerable:!1,configurable:!l.nonConfigurable,writable:!l.nonWritable})}return e}},8400:function(e,t,n){var r=n(9859),o=Object.defineProperty;e.exports=function(e,t){try{o(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}},7675:function(e,t,n){"use strict";var r=n(3103),o=n(266),i=n(4231),a=n(1805),l=n(6733),c=n(3723),s=n(7567),u=n(6540),d=n(4555),f=n(5762),p=n(4768),h=n(95),m=n(5495),g=n(693),v=a.PROPER,y=a.CONFIGURABLE,w=g.IteratorPrototype,_=g.BUGGY_SAFARI_ITERATORS,b=h("iterator"),x="keys",D="values",k="entries",S=function(){return this};e.exports=function(e,t,n,a,h,g,C){c(n,t,a);var E,I,M,T=function(e){if(e===h&&R)return R;if(!_&&e in P)return P[e];switch(e){case x:case D:case k:return function(){return new n(this,e)}}return function(){return new n(this)}},N=t+" Iterator",O=!1,P=e.prototype,A=P[b]||P["@@iterator"]||h&&P[h],R=!_&&A||T(h),L="Array"==t&&P.entries||A;if(L&&(E=s(L.call(new e)))!==Object.prototype&&E.next&&(i||s(E)===w||(u?u(E,w):l(E[b])||p(E,b,S)),d(E,N,!0,!0),i&&(m[N]=S)),v&&h==D&&A&&A.name!==D&&(!i&&y?f(P,"name",D):(O=!0,R=function(){return o(A,this)})),h)if(I={values:T(D),keys:g?R:T(x),entries:T(k)},C)for(M in I)(_||O||!(M in P))&&p(P,M,I[M]);else r({target:t,proto:!0,forced:_||O},I);return i&&!C||P[b]===R||p(P,b,R,{name:h}),m[t]=R,I}},7400:function(e,t,n){var r=n(4229);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},2635:function(e,t,n){var r=n(9859),o=n(5052),i=r.document,a=o(i)&&o(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},5694:function(e){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},8865:function(e,t,n){var r=n(2635)("span").classList,o=r&&r.constructor&&r.constructor.prototype;e.exports=o===Object.prototype?void 0:o},598:function(e,t,n){var r=n(1333);e.exports=r("navigator","userAgent")||""},6358:function(e,t,n){var r,o,i=n(9859),a=n(598),l=i.process,c=i.Deno,s=l&&l.versions||c&&c.version,u=s&&s.v8;u&&(o=(r=u.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(o=+r[1]),e.exports=o},3837:function(e){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},373:function(e,t,n){var r=n(4229),o=n(5358);e.exports=!r((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",o(1,7)),7!==e.stack)}))},3103:function(e,t,n){var r=n(9859),o=n(7933).f,i=n(5762),a=n(4768),l=n(8400),c=n(7081),s=n(6541);e.exports=function(e,t){var n,u,d,f,p,h=e.target,m=e.global,g=e.stat;if(n=m?r:g?r[h]||l(h,{}):(r[h]||{}).prototype)for(u in t){if(f=t[u],d=e.dontCallGetSet?(p=o(n,u))&&p.value:n[u],!s(m?u:h+(g?".":"#")+u,e.forced)&&void 0!==d){if(typeof f==typeof d)continue;c(f,d)}(e.sham||d&&d.sham)&&i(f,"sham",!0),a(n,u,f,e)}}},4229:function(e){e.exports=function(e){try{return!!e()}catch(e){return!0}}},4954:function(e,t,n){"use strict";n(7950);var r=n(5968),o=n(4768),i=n(3466),a=n(4229),l=n(95),c=n(5762),s=l("species"),u=RegExp.prototype;e.exports=function(e,t,n,d){var f=l(e),p=!a((function(){var t={};return t[f]=function(){return 7},7!=""[e](t)})),h=p&&!a((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[s]=function(){return n},n.flags="",n[f]=/./[f]),n.exec=function(){return t=!0,null},n[f](""),!t}));if(!p||!h||n){var m=r(/./[f]),g=t(f,""[e],(function(e,t,n,o,a){var l=r(e),c=t.exec;return c===i||c===u.exec?p&&!a?{done:!0,value:m(t,n,o)}:{done:!0,value:l(n,t,o)}:{done:!1}}));o(String.prototype,e,g[0]),o(u,f,g[1])}d&&c(u[f],"sham",!0)}},3171:function(e,t,n){var r=n(7188),o=Function.prototype,i=o.apply,a=o.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?a.bind(i):function(){return a.apply(i,arguments)})},7188:function(e,t,n){var r=n(4229);e.exports=!r((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},266:function(e,t,n){var r=n(7188),o=Function.prototype.call;e.exports=r?o.bind(o):function(){return o.apply(o,arguments)}},1805:function(e,t,n){var r=n(7400),o=n(8270),i=Function.prototype,a=r&&Object.getOwnPropertyDescriptor,l=o(i,"name"),c=l&&"something"===function(){}.name,s=l&&(!r||r&&a(i,"name").configurable);e.exports={EXISTS:l,PROPER:c,CONFIGURABLE:s}},5968:function(e,t,n){var r=n(7188),o=Function.prototype,i=o.bind,a=o.call,l=r&&i.bind(a,a);e.exports=r?function(e){return e&&l(e)}:function(e){return e&&function(){return a.apply(e,arguments)}}},1333:function(e,t,n){var r=n(9859),o=n(6733),i=function(e){return o(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?i(r[e]):r[e]&&r[e][t]}},5300:function(e,t,n){var r=n(7111);e.exports=function(e,t){var n=e[t];return null==n?void 0:r(n)}},17:function(e,t,n){var r=n(5968),o=n(2991),i=Math.floor,a=r("".charAt),l=r("".replace),c=r("".slice),s=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,u=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,n,r,d,f){var p=n+e.length,h=r.length,m=u;return void 0!==d&&(d=o(d),m=s),l(f,m,(function(o,l){var s;switch(a(l,0)){case"$":return"$";case"&":return e;case"`":return c(t,0,n);case"'":return c(t,p);case"<":s=d[c(l,1,-1)];break;default:var u=+l;if(0===u)return o;if(u>h){var f=i(u/10);return 0===f?o:f<=h?void 0===r[f-1]?a(l,1):r[f-1]+a(l,1):o}s=r[u-1]}return void 0===s?"":s}))}},9859:function(e,t,n){var r=function(e){return e&&e.Math==Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},8270:function(e,t,n){var r=n(5968),o=n(2991),i=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return i(o(e),t)}},5977:function(e){e.exports={}},3777:function(e,t,n){var r=n(1333);e.exports=r("document","documentElement")},4394:function(e,t,n){var r=n(7400),o=n(4229),i=n(2635);e.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},9337:function(e,t,n){var r=n(5968),o=n(4229),i=n(7079),a=Object,l=r("".split);e.exports=o((function(){return!a("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?l(e,""):a(e)}:a},835:function(e,t,n){var r=n(6733),o=n(5052),i=n(6540);e.exports=function(e,t,n){var a,l;return i&&r(a=t.constructor)&&a!==n&&o(l=a.prototype)&&l!==n.prototype&&i(e,l),e}},8511:function(e,t,n){var r=n(5968),o=n(6733),i=n(5353),a=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(e){return a(e)}),e.exports=i.inspectSource},9679:function(e,t,n){var r=n(5052),o=n(5762);e.exports=function(e,t){r(t)&&"cause"in t&&o(e,"cause",t.cause)}},6407:function(e,t,n){var r,o,i,a=n(8694),l=n(9859),c=n(5968),s=n(5052),u=n(5762),d=n(8270),f=n(5353),p=n(4399),h=n(5977),m="Object already initialized",g=l.TypeError,v=l.WeakMap;if(a||f.state){var y=f.state||(f.state=new v),w=c(y.get),_=c(y.has),b=c(y.set);r=function(e,t){if(_(y,e))throw new g(m);return t.facade=e,b(y,e,t),t},o=function(e){return w(y,e)||{}},i=function(e){return _(y,e)}}else{var x=p("state");h[x]=!0,r=function(e,t){if(d(e,x))throw new g(m);return t.facade=e,u(e,x,t),t},o=function(e){return d(e,x)?e[x]:{}},i=function(e){return d(e,x)}}e.exports={set:r,get:o,has:i,enforce:function(e){return i(e)?o(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!s(t)||(n=o(t)).type!==e)throw g("Incompatible receiver, "+e+" required");return n}}}},6733:function(e){e.exports=function(e){return"function"==typeof e}},6541:function(e,t,n){var r=n(4229),o=n(6733),i=/#|\.prototype\./,a=function(e,t){var n=c[l(e)];return n==u||n!=s&&(o(t)?r(t):!!t)},l=a.normalize=function(e){return String(e).replace(i,".").toLowerCase()},c=a.data={},s=a.NATIVE="N",u=a.POLYFILL="P";e.exports=a},5052:function(e,t,n){var r=n(6733);e.exports=function(e){return"object"==typeof e?null!==e:r(e)}},4231:function(e){e.exports=!1},9395:function(e,t,n){var r=n(1333),o=n(6733),i=n(1321),a=n(6969),l=Object;e.exports=a?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return o(t)&&i(t.prototype,l(e))}},693:function(e,t,n){"use strict";var r,o,i,a=n(4229),l=n(6733),c=n(2391),s=n(7567),u=n(4768),d=n(95),f=n(4231),p=d("iterator"),h=!1;[].keys&&("next"in(i=[].keys())?(o=s(s(i)))!==Object.prototype&&(r=o):h=!0),null==r||a((function(){var e={};return r[p].call(e)!==e}))?r={}:f&&(r=c(r)),l(r[p])||u(r,p,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:h}},5495:function(e){e.exports={}},9646:function(e,t,n){var r=n(4237);e.exports=function(e){return r(e.length)}},6039:function(e,t,n){var r=n(4229),o=n(6733),i=n(8270),a=n(7400),l=n(1805).CONFIGURABLE,c=n(8511),s=n(6407),u=s.enforce,d=s.get,f=Object.defineProperty,p=a&&!r((function(){return 8!==f((function(){}),"length",{value:8}).length})),h=String(String).split("String"),m=e.exports=function(e,t,n){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!i(e,"name")||l&&e.name!==t)&&(a?f(e,"name",{value:t,configurable:!0}):e.name=t),p&&n&&i(n,"arity")&&e.length!==n.arity&&f(e,"length",{value:n.arity});try{n&&i(n,"constructor")&&n.constructor?a&&f(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=u(e);return i(r,"source")||(r.source=h.join("string"==typeof t?t:"")),e};Function.prototype.toString=m((function(){return o(this)&&d(this).source||c(this)}),"toString")},917:function(e){var t=Math.ceil,n=Math.floor;e.exports=Math.trunc||function(e){var r=+e;return(r>0?n:t)(r)}},3839:function(e,t,n){var r=n(6358),o=n(4229);e.exports=!!Object.getOwnPropertySymbols&&!o((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},8694:function(e,t,n){var r=n(9859),o=n(6733),i=n(8511),a=r.WeakMap;e.exports=o(a)&&/native code/.test(i(a))},635:function(e,t,n){var r=n(3326);e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:r(e)}},2391:function(e,t,n){var r,o=n(1176),i=n(219),a=n(3837),l=n(5977),c=n(3777),s=n(2635),u=n(4399),d=u("IE_PROTO"),f=function(){},p=function(e){return"<script>"+e+"</"+"script>"},h=function(e){e.write(p("")),e.close();var t=e.parentWindow.Object;return e=null,t},m=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}var e,t;m="undefined"!=typeof document?document.domain&&r?h(r):((t=s("iframe")).style.display="none",c.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(p("document.F=Object")),e.close(),e.F):h(r);for(var n=a.length;n--;)delete m.prototype[a[n]];return m()};l[d]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(f.prototype=o(e),n=new f,f.prototype=null,n[d]=e):n=m(),void 0===t?n:i.f(n,t)}},219:function(e,t,n){var r=n(7400),o=n(7137),i=n(1787),a=n(1176),l=n(905),c=n(5632);t.f=r&&!o?Object.defineProperties:function(e,t){a(e);for(var n,r=l(t),o=c(t),s=o.length,u=0;s>u;)i.f(e,n=o[u++],r[n]);return e}},1787:function(e,t,n){var r=n(7400),o=n(4394),i=n(7137),a=n(1176),l=n(9310),c=TypeError,s=Object.defineProperty,u=Object.getOwnPropertyDescriptor,d="enumerable",f="configurable",p="writable";t.f=r?i?function(e,t,n){if(a(e),t=l(t),a(n),"function"==typeof e&&"prototype"===t&&"value"in n&&p in n&&!n.writable){var r=u(e,t);r&&r.writable&&(e[t]=n.value,n={configurable:f in n?n.configurable:r.configurable,enumerable:d in n?n.enumerable:r.enumerable,writable:!1})}return s(e,t,n)}:s:function(e,t,n){if(a(e),t=l(t),a(n),o)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw c("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},7933:function(e,t,n){var r=n(7400),o=n(266),i=n(9195),a=n(5358),l=n(905),c=n(9310),s=n(8270),u=n(4394),d=Object.getOwnPropertyDescriptor;t.f=r?d:function(e,t){if(e=l(e),t=c(t),u)try{return d(e,t)}catch(e){}if(s(e,t))return a(!o(i.f,e,t),e[t])}},8151:function(e,t,n){var r=n(140),o=n(3837).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},894:function(e,t){t.f=Object.getOwnPropertySymbols},7567:function(e,t,n){var r=n(8270),o=n(6733),i=n(2991),a=n(4399),l=n(7528),c=a("IE_PROTO"),s=Object,u=s.prototype;e.exports=l?s.getPrototypeOf:function(e){var t=i(e);if(r(t,c))return t[c];var n=t.constructor;return o(n)&&t instanceof n?n.prototype:t instanceof s?u:null}},1321:function(e,t,n){var r=n(5968);e.exports=r({}.isPrototypeOf)},140:function(e,t,n){var r=n(5968),o=n(8270),i=n(905),a=n(9540).indexOf,l=n(5977),c=r([].push);e.exports=function(e,t){var n,r=i(e),s=0,u=[];for(n in r)!o(l,n)&&o(r,n)&&c(u,n);for(;t.length>s;)o(r,n=t[s++])&&(~a(u,n)||c(u,n));return u}},5632:function(e,t,n){var r=n(140),o=n(3837);e.exports=Object.keys||function(e){return r(e,o)}},9195:function(e,t){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);t.f=o?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},6540:function(e,t,n){var r=n(5968),o=n(1176),i=n(8505);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=r(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return o(n),i(r),t?e(n,r):n.__proto__=r,n}}():void 0)},2914:function(e,t,n){var r=n(266),o=n(6733),i=n(5052),a=TypeError;e.exports=function(e,t){var n,l;if("string"===t&&o(n=e.toString)&&!i(l=r(n,e)))return l;if(o(n=e.valueOf)&&!i(l=r(n,e)))return l;if("string"!==t&&o(n=e.toString)&&!i(l=r(n,e)))return l;throw a("Can't convert object to primitive value")}},4826:function(e,t,n){var r=n(1333),o=n(5968),i=n(8151),a=n(894),l=n(1176),c=o([].concat);e.exports=r("Reflect","ownKeys")||function(e){var t=i.f(l(e)),n=a.f;return n?c(t,n(e)):t}},6060:function(e,t,n){var r=n(1787).f;e.exports=function(e,t,n){n in e||r(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})}},8115:function(e,t,n){var r=n(266),o=n(1176),i=n(6733),a=n(7079),l=n(3466),c=TypeError;e.exports=function(e,t){var n=e.exec;if(i(n)){var s=r(n,e,t);return null!==s&&o(s),s}if("RegExp"===a(e))return r(l,e,t);throw c("RegExp#exec called on incompatible receiver")}},3466:function(e,t,n){"use strict";var r,o,i=n(266),a=n(5968),l=n(3326),c=n(895),s=n(5650),u=n(3036),d=n(2391),f=n(6407).get,p=n(2926),h=n(461),m=u("native-string-replace",String.prototype.replace),g=RegExp.prototype.exec,v=g,y=a("".charAt),w=a("".indexOf),_=a("".replace),b=a("".slice),x=(o=/b*/g,i(g,r=/a/,"a"),i(g,o,"a"),0!==r.lastIndex||0!==o.lastIndex),D=s.BROKEN_CARET,k=void 0!==/()??/.exec("")[1];(x||k||D||p||h)&&(v=function(e){var t,n,r,o,a,s,u,p=this,h=f(p),S=l(e),C=h.raw;if(C)return C.lastIndex=p.lastIndex,t=i(v,C,S),p.lastIndex=C.lastIndex,t;var E=h.groups,I=D&&p.sticky,M=i(c,p),T=p.source,N=0,O=S;if(I&&(M=_(M,"y",""),-1===w(M,"g")&&(M+="g"),O=b(S,p.lastIndex),p.lastIndex>0&&(!p.multiline||p.multiline&&"\n"!==y(S,p.lastIndex-1))&&(T="(?: "+T+")",O=" "+O,N++),n=new RegExp("^(?:"+T+")",M)),k&&(n=new RegExp("^"+T+"$(?!\\s)",M)),x&&(r=p.lastIndex),o=i(g,I?n:p,O),I?o?(o.input=b(o.input,N),o[0]=b(o[0],N),o.index=p.lastIndex,p.lastIndex+=o[0].length):p.lastIndex=0:x&&o&&(p.lastIndex=p.global?o.index+o[0].length:r),k&&o&&o.length>1&&i(m,o[0],n,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(o[a]=void 0)})),o&&E)for(o.groups=s=d(null),a=0;a<E.length;a++)s[(u=E[a])[0]]=o[u[1]];return o}),e.exports=v},895:function(e,t,n){"use strict";var r=n(1176);e.exports=function(){var e=r(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t}},5650:function(e,t,n){var r=n(4229),o=n(9859).RegExp,i=r((function(){var e=o("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),a=i||r((function(){return!o("a","y").sticky})),l=i||r((function(){var e=o("^r","gy");return e.lastIndex=2,null!=e.exec("str")}));e.exports={BROKEN_CARET:l,MISSED_STICKY:a,UNSUPPORTED_Y:i}},2926:function(e,t,n){var r=n(4229),o=n(9859).RegExp;e.exports=r((function(){var e=o(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)}))},461:function(e,t,n){var r=n(4229),o=n(9859).RegExp;e.exports=r((function(){var e=o("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}))},8885:function(e){var t=TypeError;e.exports=function(e){if(null==e)throw t("Can't call method on "+e);return e}},4555:function(e,t,n){var r=n(1787).f,o=n(8270),i=n(95)("toStringTag");e.exports=function(e,t,n){e&&!n&&(e=e.prototype),e&&!o(e,i)&&r(e,i,{configurable:!0,value:t})}},4399:function(e,t,n){var r=n(3036),o=n(1441),i=r("keys");e.exports=function(e){return i[e]||(i[e]=o(e))}},5353:function(e,t,n){var r=n(9859),o=n(8400),i="__core-js_shared__",a=r[i]||o(i,{});e.exports=a},3036:function(e,t,n){var r=n(4231),o=n(5353);(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.23.5",mode:r?"pure":"global",copyright:"Â© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.23.5/LICENSE",source:"https://github.com/zloirock/core-js"})},966:function(e,t,n){var r=n(5968),o=n(3329),i=n(3326),a=n(8885),l=r("".charAt),c=r("".charCodeAt),s=r("".slice),u=function(e){return function(t,n){var r,u,d=i(a(t)),f=o(n),p=d.length;return f<0||f>=p?e?"":void 0:(r=c(d,f))<55296||r>56319||f+1===p||(u=c(d,f+1))<56320||u>57343?e?l(d,f):r:e?s(d,f,f+2):u-56320+(r-55296<<10)+65536}};e.exports={codeAt:u(!1),charAt:u(!0)}},3231:function(e,t,n){var r=n(3329),o=Math.max,i=Math.min;e.exports=function(e,t){var n=r(e);return n<0?o(n+t,0):i(n,t)}},905:function(e,t,n){var r=n(9337),o=n(8885);e.exports=function(e){return r(o(e))}},3329:function(e,t,n){var r=n(917);e.exports=function(e){var t=+e;return t!=t||0===t?0:r(t)}},4237:function(e,t,n){var r=n(3329),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},2991:function(e,t,n){var r=n(8885),o=Object;e.exports=function(e){return o(r(e))}},2066:function(e,t,n){var r=n(266),o=n(5052),i=n(9395),a=n(5300),l=n(2914),c=n(95),s=TypeError,u=c("toPrimitive");e.exports=function(e,t){if(!o(e)||i(e))return e;var n,c=a(e,u);if(c){if(void 0===t&&(t="default"),n=r(c,e,t),!o(n)||i(n))return n;throw s("Can't convert object to primitive value")}return void 0===t&&(t="number"),l(e,t)}},9310:function(e,t,n){var r=n(2066),o=n(9395);e.exports=function(e){var t=r(e,"string");return o(t)?t:t+""}},1601:function(e,t,n){var r={};r[n(95)("toStringTag")]="z",e.exports="[object z]"===String(r)},3326:function(e,t,n){var r=n(1589),o=String;e.exports=function(e){if("Symbol"===r(e))throw TypeError("Cannot convert a Symbol value to a string");return o(e)}},9821:function(e){var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},1441:function(e,t,n){var r=n(5968),o=0,i=Math.random(),a=r(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++o+i,36)}},6969:function(e,t,n){var r=n(3839);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},7137:function(e,t,n){var r=n(7400),o=n(4229);e.exports=r&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},95:function(e,t,n){var r=n(9859),o=n(3036),i=n(8270),a=n(1441),l=n(3839),c=n(6969),s=o("wks"),u=r.Symbol,d=u&&u.for,f=c?u:u&&u.withoutSetter||a;e.exports=function(e){if(!i(s,e)||!l&&"string"!=typeof s[e]){var t="Symbol."+e;l&&i(u,e)?s[e]=u[e]:s[e]=c&&d?d(t):f(t)}return s[e]}},3949:function(e,t,n){"use strict";var r=n(1333),o=n(8270),i=n(5762),a=n(1321),l=n(6540),c=n(7081),s=n(6060),u=n(835),d=n(635),f=n(9679),p=n(1590),h=n(373),m=n(7400),g=n(4231);e.exports=function(e,t,n,v){var y="stackTraceLimit",w=v?2:1,_=e.split("."),b=_[_.length-1],x=r.apply(null,_);if(x){var D=x.prototype;if(!g&&o(D,"cause")&&delete D.cause,!n)return x;var k=r("Error"),S=t((function(e,t){var n=d(v?t:e,void 0),r=v?new x(e):new x;return void 0!==n&&i(r,"message",n),h&&i(r,"stack",p(r.stack,2)),this&&a(D,this)&&u(r,this,S),arguments.length>w&&f(r,arguments[w]),r}));if(S.prototype=D,"Error"!==b?l?l(S,k):c(S,k,{name:!0}):m&&y in x&&(s(S,x,y),s(S,x,"prepareStackTrace")),c(S,x),!g)try{D.name!==b&&i(D,"name",b),D.constructor=S}catch(e){}return S}}},9529:function(e,t,n){"use strict";var r=n(3103),o=n(9540).includes,i=n(4229),a=n(9736);r({target:"Array",proto:!0,forced:i((function(){return!Array(1).includes()}))},{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),a("includes")},5735:function(e,t,n){"use strict";var r=n(905),o=n(9736),i=n(5495),a=n(6407),l=n(1787).f,c=n(7675),s=n(4231),u=n(7400),d="Array Iterator",f=a.set,p=a.getterFor(d);e.exports=c(Array,"Array",(function(e,t){f(this,{type:d,target:r(e),index:0,kind:t})}),(function(){var e=p(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values");var h=i.Arguments=i.Array;if(o("keys"),o("values"),o("entries"),!s&&u&&"values"!==h.name)try{l(h,"name",{value:"values"})}catch(e){}},3985:function(e,t,n){n(9736)("flatMap")},7694:function(e,t,n){n(9736)("flat")},1372:function(e,t,n){var r=n(3103),o=n(9859),i=n(3171),a=n(3949),l="WebAssembly",c=o.WebAssembly,s=7!==Error("e",{cause:7}).cause,u=function(e,t){var n={};n[e]=a(e,t,s),r({global:!0,constructor:!0,arity:1,forced:s},n)},d=function(e,t){if(c&&c[e]){var n={};n[e]=a("WebAssembly."+e,t,s),r({target:l,stat:!0,constructor:!0,arity:1,forced:s},n)}};u("Error",(function(e){return function(t){return i(e,this,arguments)}})),u("EvalError",(function(e){return function(t){return i(e,this,arguments)}})),u("RangeError",(function(e){return function(t){return i(e,this,arguments)}})),u("ReferenceError",(function(e){return function(t){return i(e,this,arguments)}})),u("SyntaxError",(function(e){return function(t){return i(e,this,arguments)}})),u("TypeError",(function(e){return function(t){return i(e,this,arguments)}})),u("URIError",(function(e){return function(t){return i(e,this,arguments)}})),d("CompileError",(function(e){return function(t){return i(e,this,arguments)}})),d("LinkError",(function(e){return function(t){return i(e,this,arguments)}})),d("RuntimeError",(function(e){return function(t){return i(e,this,arguments)}}))},7950:function(e,t,n){"use strict";var r=n(3103),o=n(3466);r({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},5940:function(e,t,n){"use strict";var r=n(3171),o=n(266),i=n(5968),a=n(4954),l=n(4229),c=n(1176),s=n(6733),u=n(3329),d=n(4237),f=n(3326),p=n(8885),h=n(6637),m=n(5300),g=n(17),v=n(8115),y=n(95)("replace"),w=Math.max,_=Math.min,b=i([].concat),x=i([].push),D=i("".indexOf),k=i("".slice),S="$0"==="a".replace(/./,"$0"),C=!!/./[y]&&""===/./[y]("a","$0");a("replace",(function(e,t,n){var i=C?"$":"$0";return[function(e,n){var r=p(this),i=null==e?void 0:m(e,y);return i?o(i,e,r,n):o(t,f(r),e,n)},function(e,o){var a=c(this),l=f(e);if("string"==typeof o&&-1===D(o,i)&&-1===D(o,"$<")){var p=n(t,a,l,o);if(p.done)return p.value}var m=s(o);m||(o=f(o));var y=a.global;if(y){var S=a.unicode;a.lastIndex=0}for(var C=[];;){var E=v(a,l);if(null===E)break;if(x(C,E),!y)break;""===f(E[0])&&(a.lastIndex=h(l,d(a.lastIndex),S))}for(var I,M="",T=0,N=0;N<C.length;N++){for(var O=f((E=C[N])[0]),P=w(_(u(E.index),l.length),0),A=[],R=1;R<E.length;R++)x(A,void 0===(I=E[R])?I:String(I));var L=E.groups;if(m){var H=b([O],A,P,l);void 0!==L&&x(H,L);var F=f(r(o,void 0,H))}else F=g(O,l,P,A,L,o);P>=T&&(M+=k(l,T,P)+F,T=P+O.length)}return M+k(l,T)}]}),!!l((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!S||C)},6886:function(e,t,n){var r=n(9859),o=n(5694),i=n(8865),a=n(5735),l=n(5762),c=n(95),s=c("iterator"),u=c("toStringTag"),d=a.values,f=function(e,t){if(e){if(e[s]!==d)try{l(e,s,d)}catch(t){e[s]=d}if(e[u]||l(e,u,t),o[t])for(var n in a)if(e[n]!==a[n])try{l(e,n,a[n])}catch(t){e[n]=a[n]}}};for(var p in o)f(r[p]&&r[p].prototype,p);f(i,"DOMTokenList")},5368:function(e){
/*! @license DOMPurify 2.3.8 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.8/LICENSE */
e.exports=function(){"use strict";function e(t){return e="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},e(t)}function t(e,n){return t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(e,n)}function n(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function r(e,o,i){return r=n()?Reflect.construct:function(e,n,r){var o=[null];o.push.apply(o,n);var i=new(Function.bind.apply(e,o));return r&&t(i,r.prototype),i},r.apply(null,arguments)}function o(e){return i(e)||a(e)||l(e)||s()}function i(e){if(Array.isArray(e))return c(e)}function a(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function l(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u=Object.hasOwnProperty,d=Object.setPrototypeOf,f=Object.isFrozen,p=Object.getPrototypeOf,h=Object.getOwnPropertyDescriptor,m=Object.freeze,g=Object.seal,v=Object.create,y="undefined"!=typeof Reflect&&Reflect,w=y.apply,_=y.construct;w||(w=function(e,t,n){return e.apply(t,n)}),m||(m=function(e){return e}),g||(g=function(e){return e}),_||(_=function(e,t){return r(e,o(t))});var b=N(Array.prototype.forEach),x=N(Array.prototype.pop),D=N(Array.prototype.push),k=N(String.prototype.toLowerCase),S=N(String.prototype.match),C=N(String.prototype.replace),E=N(String.prototype.indexOf),I=N(String.prototype.trim),M=N(RegExp.prototype.test),T=O(TypeError);function N(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return w(e,t,r)}}function O(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _(e,n)}}function P(e,t){d&&d(e,null);for(var n=t.length;n--;){var r=t[n];if("string"==typeof r){var o=k(r);o!==r&&(f(t)||(t[n]=o),r=o)}e[r]=!0}return e}function A(e){var t,n=v(null);for(t in e)w(u,e,[t])&&(n[t]=e[t]);return n}function R(e,t){for(;null!==e;){var n=h(e,t);if(n){if(n.get)return N(n.get);if("function"==typeof n.value)return N(n.value)}e=p(e)}function r(e){return console.warn("fallback value for",e),null}return r}var L=m(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),H=m(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),F=m(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),z=m(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),W=m(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),B=m(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),j=m(["#text"]),G=m(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),U=m(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Y=m(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),V=m(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),$=g(/\{\{[\w\W]*|[\w\W]*\}\}/gm),X=g(/<%[\w\W]*|[\w\W]*%>/gm),q=g(/^data-[\-\w.\u00B7-\uFFFF]/),K=g(/^aria-[\-\w]+$/),Z=g(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),J=g(/^(?:\w+script|data):/i),Q=g(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ee=g(/^html$/i),te=function(){return"undefined"==typeof window?null:window},ne=function(t,n){if("object"!==e(t)||"function"!=typeof t.createPolicy)return null;var r=null,o="data-tt-policy-suffix";n.currentScript&&n.currentScript.hasAttribute(o)&&(r=n.currentScript.getAttribute(o));var i="dompurify"+(r?"#"+r:"");try{return t.createPolicy(i,{createHTML:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+i+" could not be created."),null}};function re(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:te(),n=function(e){return re(e)};if(n.version="2.3.8",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;var r=t.document,i=t.document,a=t.DocumentFragment,l=t.HTMLTemplateElement,c=t.Node,s=t.Element,u=t.NodeFilter,d=t.NamedNodeMap,f=void 0===d?t.NamedNodeMap||t.MozNamedAttrMap:d,p=t.HTMLFormElement,h=t.DOMParser,g=t.trustedTypes,v=s.prototype,y=R(v,"cloneNode"),w=R(v,"nextSibling"),_=R(v,"childNodes"),N=R(v,"parentNode");if("function"==typeof l){var O=i.createElement("template");O.content&&O.content.ownerDocument&&(i=O.content.ownerDocument)}var oe=ne(g,r),ie=oe?oe.createHTML(""):"",ae=i,le=ae.implementation,ce=ae.createNodeIterator,se=ae.createDocumentFragment,ue=ae.getElementsByTagName,de=r.importNode,fe={};try{fe=A(i).documentMode?i.documentMode:{}}catch(e){}var pe={};n.isSupported="function"==typeof N&&le&&void 0!==le.createHTMLDocument&&9!==fe;var he,me,ge=$,ve=X,ye=q,we=K,_e=J,be=Q,xe=Z,De=null,ke=P({},[].concat(o(L),o(H),o(F),o(W),o(j))),Se=null,Ce=P({},[].concat(o(G),o(U),o(Y),o(V))),Ee=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ie=null,Me=null,Te=!0,Ne=!0,Oe=!1,Pe=!1,Ae=!1,Re=!1,Le=!1,He=!1,Fe=!1,ze=!1,We=!0,Be=!0,je=!1,Ge={},Ue=null,Ye=P({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ve=null,$e=P({},["audio","video","img","source","image","track"]),Xe=null,qe=P({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ke="http://www.w3.org/1998/Math/MathML",Ze="http://www.w3.org/2000/svg",Je="http://www.w3.org/1999/xhtml",Qe=Je,et=!1,tt=["application/xhtml+xml","text/html"],nt="text/html",rt=null,ot=i.createElement("form"),it=function(e){return e instanceof RegExp||e instanceof Function},at=function(t){rt&&rt===t||(t&&"object"===e(t)||(t={}),t=A(t),De="ALLOWED_TAGS"in t?P({},t.ALLOWED_TAGS):ke,Se="ALLOWED_ATTR"in t?P({},t.ALLOWED_ATTR):Ce,Xe="ADD_URI_SAFE_ATTR"in t?P(A(qe),t.ADD_URI_SAFE_ATTR):qe,Ve="ADD_DATA_URI_TAGS"in t?P(A($e),t.ADD_DATA_URI_TAGS):$e,Ue="FORBID_CONTENTS"in t?P({},t.FORBID_CONTENTS):Ye,Ie="FORBID_TAGS"in t?P({},t.FORBID_TAGS):{},Me="FORBID_ATTR"in t?P({},t.FORBID_ATTR):{},Ge="USE_PROFILES"in t&&t.USE_PROFILES,Te=!1!==t.ALLOW_ARIA_ATTR,Ne=!1!==t.ALLOW_DATA_ATTR,Oe=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Pe=t.SAFE_FOR_TEMPLATES||!1,Ae=t.WHOLE_DOCUMENT||!1,He=t.RETURN_DOM||!1,Fe=t.RETURN_DOM_FRAGMENT||!1,ze=t.RETURN_TRUSTED_TYPE||!1,Le=t.FORCE_BODY||!1,We=!1!==t.SANITIZE_DOM,Be=!1!==t.KEEP_CONTENT,je=t.IN_PLACE||!1,xe=t.ALLOWED_URI_REGEXP||xe,Qe=t.NAMESPACE||Je,t.CUSTOM_ELEMENT_HANDLING&&it(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ee.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&it(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ee.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ee.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),he=he=-1===tt.indexOf(t.PARSER_MEDIA_TYPE)?nt:t.PARSER_MEDIA_TYPE,me="application/xhtml+xml"===he?function(e){return e}:k,Pe&&(Ne=!1),Fe&&(He=!0),Ge&&(De=P({},o(j)),Se=[],!0===Ge.html&&(P(De,L),P(Se,G)),!0===Ge.svg&&(P(De,H),P(Se,U),P(Se,V)),!0===Ge.svgFilters&&(P(De,F),P(Se,U),P(Se,V)),!0===Ge.mathMl&&(P(De,W),P(Se,Y),P(Se,V))),t.ADD_TAGS&&(De===ke&&(De=A(De)),P(De,t.ADD_TAGS)),t.ADD_ATTR&&(Se===Ce&&(Se=A(Se)),P(Se,t.ADD_ATTR)),t.ADD_URI_SAFE_ATTR&&P(Xe,t.ADD_URI_SAFE_ATTR),t.FORBID_CONTENTS&&(Ue===Ye&&(Ue=A(Ue)),P(Ue,t.FORBID_CONTENTS)),Be&&(De["#text"]=!0),Ae&&P(De,["html","head","body"]),De.table&&(P(De,["tbody"]),delete Ie.tbody),m&&m(t),rt=t)},lt=P({},["mi","mo","mn","ms","mtext"]),ct=P({},["foreignobject","desc","title","annotation-xml"]),st=P({},["title","style","font","a","script"]),ut=P({},H);P(ut,F),P(ut,z);var dt=P({},W);P(dt,B);var ft=function(e){var t=N(e);t&&t.tagName||(t={namespaceURI:Je,tagName:"template"});var n=k(e.tagName),r=k(t.tagName);return e.namespaceURI===Ze?t.namespaceURI===Je?"svg"===n:t.namespaceURI===Ke?"svg"===n&&("annotation-xml"===r||lt[r]):Boolean(ut[n]):e.namespaceURI===Ke?t.namespaceURI===Je?"math"===n:t.namespaceURI===Ze?"math"===n&&ct[r]:Boolean(dt[n]):e.namespaceURI===Je&&!(t.namespaceURI===Ze&&!ct[r])&&!(t.namespaceURI===Ke&&!lt[r])&&!dt[n]&&(st[n]||!ut[n])},pt=function(e){D(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=ie}catch(t){e.remove()}}},ht=function(e,t){try{D(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){D(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!Se[e])if(He||Fe)try{pt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},mt=function(e){var t,n;if(Le)e="<remove></remove>"+e;else{var r=S(e,/^[\r\n\t ]+/);n=r&&r[0]}"application/xhtml+xml"===he&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var o=oe?oe.createHTML(e):e;if(Qe===Je)try{t=(new h).parseFromString(o,he)}catch(e){}if(!t||!t.documentElement){t=le.createDocument(Qe,"template",null);try{t.documentElement.innerHTML=et?"":o}catch(e){}}var a=t.body||t.documentElement;return e&&n&&a.insertBefore(i.createTextNode(n),a.childNodes[0]||null),Qe===Je?ue.call(t,Ae?"html":"body")[0]:Ae?t.documentElement:a},gt=function(e){return ce.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null,!1)},vt=function(e){return e instanceof p&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof f)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore)},yt=function(t){return"object"===e(c)?t instanceof c:t&&"object"===e(t)&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},wt=function(e,t,r){pe[e]&&b(pe[e],(function(e){e.call(n,t,r,rt)}))},_t=function(e){var t;if(wt("beforeSanitizeElements",e,null),vt(e))return pt(e),!0;if(M(/[\u0080-\uFFFF]/,e.nodeName))return pt(e),!0;var r=me(e.nodeName);if(wt("uponSanitizeElement",e,{tagName:r,allowedTags:De}),e.hasChildNodes()&&!yt(e.firstElementChild)&&(!yt(e.content)||!yt(e.content.firstElementChild))&&M(/<[/\w]/g,e.innerHTML)&&M(/<[/\w]/g,e.textContent))return pt(e),!0;if("select"===r&&M(/<template/i,e.innerHTML))return pt(e),!0;if(!De[r]||Ie[r]){if(!Ie[r]&&xt(r)){if(Ee.tagNameCheck instanceof RegExp&&M(Ee.tagNameCheck,r))return!1;if(Ee.tagNameCheck instanceof Function&&Ee.tagNameCheck(r))return!1}if(Be&&!Ue[r]){var o=N(e)||e.parentNode,i=_(e)||e.childNodes;if(i&&o)for(var a=i.length-1;a>=0;--a)o.insertBefore(y(i[a],!0),w(e))}return pt(e),!0}return e instanceof s&&!ft(e)?(pt(e),!0):"noscript"!==r&&"noembed"!==r||!M(/<\/no(script|embed)/i,e.innerHTML)?(Pe&&3===e.nodeType&&(t=e.textContent,t=C(t,ge," "),t=C(t,ve," "),e.textContent!==t&&(D(n.removed,{element:e.cloneNode()}),e.textContent=t)),wt("afterSanitizeElements",e,null),!1):(pt(e),!0)},bt=function(e,t,n){if(We&&("id"===t||"name"===t)&&(n in i||n in ot))return!1;if(Ne&&!Me[t]&&M(ye,t));else if(Te&&M(we,t));else if(!Se[t]||Me[t]){if(!(xt(e)&&(Ee.tagNameCheck instanceof RegExp&&M(Ee.tagNameCheck,e)||Ee.tagNameCheck instanceof Function&&Ee.tagNameCheck(e))&&(Ee.attributeNameCheck instanceof RegExp&&M(Ee.attributeNameCheck,t)||Ee.attributeNameCheck instanceof Function&&Ee.attributeNameCheck(t))||"is"===t&&Ee.allowCustomizedBuiltInElements&&(Ee.tagNameCheck instanceof RegExp&&M(Ee.tagNameCheck,n)||Ee.tagNameCheck instanceof Function&&Ee.tagNameCheck(n))))return!1}else if(Xe[t]);else if(M(xe,C(n,be,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==E(n,"data:")||!Ve[e])if(Oe&&!M(_e,C(n,be,"")));else if(n)return!1;return!0},xt=function(e){return e.indexOf("-")>0},Dt=function(e){var t,r,o,i;wt("beforeSanitizeAttributes",e,null);var a=e.attributes;if(a){var l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Se};for(i=a.length;i--;){var c=t=a[i],s=c.name,u=c.namespaceURI;if(r="value"===s?t.value:I(t.value),o=me(s),l.attrName=o,l.attrValue=r,l.keepAttr=!0,l.forceKeepAttr=void 0,wt("uponSanitizeAttribute",e,l),r=l.attrValue,!l.forceKeepAttr&&(ht(s,e),l.keepAttr))if(M(/\/>/i,r))ht(s,e);else{Pe&&(r=C(r,ge," "),r=C(r,ve," "));var d=me(e.nodeName);if(bt(d,o,r))try{u?e.setAttributeNS(u,s,r):e.setAttribute(s,r),x(n.removed)}catch(e){}}}wt("afterSanitizeAttributes",e,null)}},kt=function e(t){var n,r=gt(t);for(wt("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)wt("uponSanitizeShadowNode",n,null),_t(n)||(n.content instanceof a&&e(n.content),Dt(n));wt("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(o,i){var l,s,u,d,f;if((et=!o)&&(o="\x3c!--\x3e"),"string"!=typeof o&&!yt(o)){if("function"!=typeof o.toString)throw T("toString is not a function");if("string"!=typeof(o=o.toString()))throw T("dirty is not a string, aborting")}if(!n.isSupported){if("object"===e(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof o)return t.toStaticHTML(o);if(yt(o))return t.toStaticHTML(o.outerHTML)}return o}if(Re||at(i),n.removed=[],"string"==typeof o&&(je=!1),je){if(o.nodeName){var p=me(o.nodeName);if(!De[p]||Ie[p])throw T("root node is forbidden and cannot be sanitized in-place")}}else if(o instanceof c)1===(s=(l=mt("\x3c!----\x3e")).ownerDocument.importNode(o,!0)).nodeType&&"BODY"===s.nodeName||"HTML"===s.nodeName?l=s:l.appendChild(s);else{if(!He&&!Pe&&!Ae&&-1===o.indexOf("<"))return oe&&ze?oe.createHTML(o):o;if(!(l=mt(o)))return He?null:ze?ie:""}l&&Le&&pt(l.firstChild);for(var h=gt(je?o:l);u=h.nextNode();)3===u.nodeType&&u===d||_t(u)||(u.content instanceof a&&kt(u.content),Dt(u),d=u);if(d=null,je)return o;if(He){if(Fe)for(f=se.call(l.ownerDocument);l.firstChild;)f.appendChild(l.firstChild);else f=l;return Se.shadowroot&&(f=de.call(r,f,!0)),f}var m=Ae?l.outerHTML:l.innerHTML;return Ae&&De["!doctype"]&&l.ownerDocument&&l.ownerDocument.doctype&&l.ownerDocument.doctype.name&&M(ee,l.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+l.ownerDocument.doctype.name+">\n"+m),Pe&&(m=C(m,ge," "),m=C(m,ve," ")),oe&&ze?oe.createHTML(m):m},n.setConfig=function(e){at(e),Re=!0},n.clearConfig=function(){rt=null,Re=!1},n.isValidAttribute=function(e,t,n){rt||at({});var r=me(e),o=me(t);return bt(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&(pe[e]=pe[e]||[],D(pe[e],t))},n.removeHook=function(e){if(pe[e])return x(pe[e])},n.removeHooks=function(e){pe[e]&&(pe[e]=[])},n.removeAllHooks=function(){pe={}},n}return re()}()},4304:function(e,t,n){e.exports=window.DOMPurify||(window.DOMPurify=n(5368).default||n(5368))},7386:function(e,t,n){"use strict";var r=n(3929);e.exports=function(e,t,n){var o,i=[];for(r(t)&&(t=e||0,e=0),t*=o=(n=n||1)<0?-1:1;e*o<t;e+=n)i.push(e);return i}},1690:function(e,t,n){"use strict";var r=n(7322),o=n(893),i=n(6956);e.exports=function(e,t,n){r(e)?o(e,t,n):i(e,t,n)}},893:function(e){"use strict";e.exports=function(e,t,n){var r=0,o=e.length;for(n=n||null;r<o&&!1!==t.call(n,e[r],r,e);r+=1);}},6956:function(e){"use strict";e.exports=function(e,t,n){var r;for(r in n=n||null,e)if(e.hasOwnProperty(r)&&!1===t.call(n,e[r],r,e))break}},2278:function(e,t,n){"use strict";var r=n(7969),o=n(7065),i=n(758),a=n(5758),l=n(7322),c=n(4294),s=n(1690),u=/\s+/g;function d(){this.events=null,this.contexts=null}d.mixin=function(e){r(e.prototype,d.prototype)},d.prototype._getHandlerItem=function(e,t){var n={handler:e};return t&&(n.context=t),n},d.prototype._safeEvent=function(e){var t,n=this.events;return n||(n=this.events={}),e&&((t=n[e])||(t=[],n[e]=t),n=t),n},d.prototype._safeContext=function(){var e=this.contexts;return e||(e=this.contexts=[]),e},d.prototype._indexOfContext=function(e){for(var t=this._safeContext(),n=0;t[n];){if(e===t[n][0])return n;n+=1}return-1},d.prototype._memorizeContext=function(e){var t,n;o(e)&&(t=this._safeContext(),(n=this._indexOfContext(e))>-1?t[n][1]+=1:t.push([e,1]))},d.prototype._forgetContext=function(e){var t,n;o(e)&&(t=this._safeContext(),(n=this._indexOfContext(e))>-1&&(t[n][1]-=1,t[n][1]<=0&&t.splice(n,1)))},d.prototype._bindEvent=function(e,t,n){var r=this._safeEvent(e);this._memorizeContext(n),r.push(this._getHandlerItem(t,n))},d.prototype.on=function(e,t,n){var r=this;i(e)?(e=e.split(u),s(e,(function(e){r._bindEvent(e,t,n)}))):a(e)&&(n=t,s(e,(function(e,t){r.on(t,e,n)})))},d.prototype.once=function(e,t,n){var r=this;if(a(e))return n=t,void s(e,(function(e,t){r.once(t,e,n)}));this.on(e,(function o(){t.apply(n,arguments),r.off(e,o,n)}),n)},d.prototype._spliceMatches=function(e,t){var n,r=0;if(l(e))for(n=e.length;r<n;r+=1)!0===t(e[r])&&(e.splice(r,1),n-=1,r-=1)},d.prototype._matchHandler=function(e){var t=this;return function(n){var r=e===n.handler;return r&&t._forgetContext(n.context),r}},d.prototype._matchContext=function(e){var t=this;return function(n){var r=e===n.context;return r&&t._forgetContext(n.context),r}},d.prototype._matchHandlerAndContext=function(e,t){var n=this;return function(r){var o=e===r.handler,i=t===r.context,a=o&&i;return a&&n._forgetContext(r.context),a}},d.prototype._offByEventName=function(e,t){var n=this,r=c(t),o=n._matchHandler(t);e=e.split(u),s(e,(function(e){var t=n._safeEvent(e);r?n._spliceMatches(t,o):(s(t,(function(e){n._forgetContext(e.context)})),n.events[e]=[])}))},d.prototype._offByHandler=function(e){var t=this,n=this._matchHandler(e);s(this._safeEvent(),(function(e){t._spliceMatches(e,n)}))},d.prototype._offByObject=function(e,t){var n,r=this;this._indexOfContext(e)<0?s(e,(function(e,t){r.off(t,e)})):i(t)?(n=this._matchContext(e),r._spliceMatches(this._safeEvent(t),n)):c(t)?(n=this._matchHandlerAndContext(t,e),s(this._safeEvent(),(function(e){r._spliceMatches(e,n)}))):(n=this._matchContext(e),s(this._safeEvent(),(function(e){r._spliceMatches(e,n)})))},d.prototype.off=function(e,t){i(e)?this._offByEventName(e,t):arguments.length?c(e)?this._offByHandler(e):a(e)&&this._offByObject(e,t):(this.events={},this.contexts=[])},d.prototype.fire=function(e){this.invoke.apply(this,arguments)},d.prototype.invoke=function(e){var t,n,r,o;if(!this.hasListener(e))return!0;for(t=this._safeEvent(e),n=Array.prototype.slice.call(arguments,1),r=0;t[r];){if(!1===(o=t[r]).handler.apply(o.context,n))return!1;r+=1}return!0},d.prototype.hasListener=function(e){return this.getListenerLength(e)>0},d.prototype.getListenerLength=function(e){return this._safeEvent(e).length},e.exports=d},7969:function(e){"use strict";e.exports=function(e,t){var n,r,o,i,a=Object.prototype.hasOwnProperty;for(o=1,i=arguments.length;o<i;o+=1)for(r in n=arguments[o])a.call(n,r)&&(e[r]=n[r]);return e}},4254:function(e,t,n){"use strict";var r=n(6956);e.exports=function(e,t){var n=document.createElement("img"),o="";return r(t,(function(e,t){o+="&"+t+"="+e})),o=o.substring(1),n.src=e+"?"+o,n.style.display="none",document.body.appendChild(n),document.body.removeChild(n),n}},1391:function(e,t,n){"use strict";var r=n(3929),o=n(4254);e.exports=function(e,t){var n=location.hostname,i="TOAST UI "+e+" for "+n+": Statistics",a=window.localStorage.getItem(i);(r(window.tui)||!1!==window.tui.usageStatistics)&&(a&&!function(e){return(new Date).getTime()-e>6048e5}(a)||(window.localStorage.setItem(i,(new Date).getTime()),setTimeout((function(){"interactive"!==document.readyState&&"complete"!==document.readyState||o("https://www.google-analytics.com/collect",{v:1,t:"event",tid:t,cid:n,dp:n,dh:e,el:e,ec:"use"})}),1e3)))}},7322:function(e){"use strict";e.exports=function(e){return e instanceof Array}},1326:function(e){"use strict";e.exports=function(e){return"boolean"==typeof e||e instanceof Boolean}},7065:function(e,t,n){"use strict";var r=n(3929),o=n(2934);e.exports=function(e){return!r(e)&&!o(e)}},4294:function(e){"use strict";e.exports=function(e){return e instanceof Function}},2934:function(e){"use strict";e.exports=function(e){return null===e}},321:function(e){"use strict";e.exports=function(e){return"number"==typeof e||e instanceof Number}},5758:function(e){"use strict";e.exports=function(e){return e===Object(e)}},758:function(e){"use strict";e.exports=function(e){return"string"==typeof e||e instanceof String}},3929:function(e){"use strict";e.exports=function(e){return void 0===e}},4268:function(t){"use strict";t.exports=e}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e].call(i.exports,i,i.exports,r),i.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var o={};return function(){"use strict";r.d(o,{default:function(){return Hs}});var e,t,n,i,a,l,c={},s=[],u=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function d(e,t){for(var n in t)e[n]=t[n];return e}function f(e){var t=e.parentNode;t&&t.removeChild(e)}function p(t,n,r){var o,i,a,l={};for(a in n)"key"==a?o=n[a]:"ref"==a?i=n[a]:l[a]=n[a];if(arguments.length>2&&(l.children=arguments.length>3?e.call(arguments,2):r),"function"==typeof t&&null!=t.defaultProps)for(a in t.defaultProps)void 0===l[a]&&(l[a]=t.defaultProps[a]);return h(t,l,o,i,null)}function h(e,r,o,i,a){var l={type:e,props:r,key:o,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==a?++n:a};return null==a&&null!=t.vnode&&t.vnode(l),l}function m(e){return e.children}function g(e,t){this.props=e,this.context=t}function v(e,t){if(null==t)return e.__?v(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?v(e):null}function y(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return y(e)}}function w(e){(!e.__d&&(e.__d=!0)&&i.push(e)&&!_.__r++||a!==t.debounceRendering)&&((a=t.debounceRendering)||setTimeout)(_)}function _(){for(var e;_.__r=i.length;)e=i.sort((function(e,t){return e.__v.__b-t.__v.__b})),i=[],e.some((function(e){var t,n,r,o,i,a;e.__d&&(i=(o=(t=e).__v).__e,(a=t.__P)&&(n=[],(r=d({},o)).__v=o.__v+1,M(a,o,r,t.__n,void 0!==a.ownerSVGElement,null!=o.__h?[i]:null,n,null==i?v(o):i,o.__h),T(n,o),o.__e!=i&&y(o)))}))}function b(e,t,n,r,o,i,a,l,u,d){var f,p,g,y,w,_,b,D=r&&r.__k||s,S=D.length;for(n.__k=[],f=0;f<t.length;f++)if(null!=(y=n.__k[f]=null==(y=t[f])||"boolean"==typeof y?null:"string"==typeof y||"number"==typeof y||"bigint"==typeof y?h(null,y,null,null,y):Array.isArray(y)?h(m,{children:y},null,null,null):y.__b>0?h(y.type,y.props,y.key,null,y.__v):y)){if(y.__=n,y.__b=n.__b+1,null===(g=D[f])||g&&y.key==g.key&&y.type===g.type)D[f]=void 0;else for(p=0;p<S;p++){if((g=D[p])&&y.key==g.key&&y.type===g.type){D[p]=void 0;break}g=null}M(e,y,g=g||c,o,i,a,l,u,d),w=y.__e,(p=y.ref)&&g.ref!=p&&(b||(b=[]),g.ref&&b.push(g.ref,null,y),b.push(p,y.__c||w,y)),null!=w?(null==_&&(_=w),"function"==typeof y.type&&y.__k===g.__k?y.__d=u=x(y,u,e):u=k(e,y,g,D,w,u),"function"==typeof n.type&&(n.__d=u)):u&&g.__e==u&&u.parentNode!=e&&(u=v(g))}for(n.__e=_,f=S;f--;)null!=D[f]&&("function"==typeof n.type&&null!=D[f].__e&&D[f].__e==n.__d&&(n.__d=v(r,f+1)),P(D[f],D[f]));if(b)for(f=0;f<b.length;f++)O(b[f],b[++f],b[++f])}function x(e,t,n){for(var r,o=e.__k,i=0;o&&i<o.length;i++)(r=o[i])&&(r.__=e,t="function"==typeof r.type?x(r,t,n):k(n,r,r,o,r.__e,t));return t}function D(e,t){return t=t||[],null==e||"boolean"==typeof e||(Array.isArray(e)?e.some((function(e){D(e,t)})):t.push(e)),t}function k(e,t,n,r,o,i){var a,l,c;if(void 0!==t.__d)a=t.__d,t.__d=void 0;else if(null==n||o!=i||null==o.parentNode)e:if(null==i||i.parentNode!==e)e.appendChild(o),a=null;else{for(l=i,c=0;(l=l.nextSibling)&&c<r.length;c+=2)if(l==o)break e;e.insertBefore(o,i),a=i}return void 0!==a?a:o.nextSibling}function S(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]=null==n?"":"number"!=typeof n||u.test(t)?n:n+"px"}function C(e,t,n,r,o){var i;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||S(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||S(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])i=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r||e.addEventListener(t,i?I:E,i):e.removeEventListener(t,i?I:E,i);else if("dangerouslySetInnerHTML"!==t){if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null!=n&&(!1!==n||"a"===t[0]&&"r"===t[1])?e.setAttribute(t,n):e.removeAttribute(t))}}function E(e){this.l[e.type+!1](t.event?t.event(e):e)}function I(e){this.l[e.type+!0](t.event?t.event(e):e)}function M(e,n,r,o,i,a,l,c,s){var u,f,p,h,v,y,w,_,x,D,k,S,C,E=n.type;if(void 0!==n.constructor)return null;null!=r.__h&&(s=r.__h,c=n.__e=r.__e,n.__h=null,a=[c]),(u=t.__b)&&u(n);try{e:if("function"==typeof E){if(_=n.props,x=(u=E.contextType)&&o[u.__c],D=u?x?x.props.value:u.__:o,r.__c?w=(f=n.__c=r.__c).__=f.__E:("prototype"in E&&E.prototype.render?n.__c=f=new E(_,D):(n.__c=f=new g(_,D),f.constructor=E,f.render=A),x&&x.sub(f),f.props=_,f.state||(f.state={}),f.context=D,f.__n=o,p=f.__d=!0,f.__h=[]),null==f.__s&&(f.__s=f.state),null!=E.getDerivedStateFromProps&&(f.__s==f.state&&(f.__s=d({},f.__s)),d(f.__s,E.getDerivedStateFromProps(_,f.__s))),h=f.props,v=f.state,p)null==E.getDerivedStateFromProps&&null!=f.componentWillMount&&f.componentWillMount(),null!=f.componentDidMount&&f.__h.push(f.componentDidMount);else{if(null==E.getDerivedStateFromProps&&_!==h&&null!=f.componentWillReceiveProps&&f.componentWillReceiveProps(_,D),!f.__e&&null!=f.shouldComponentUpdate&&!1===f.shouldComponentUpdate(_,f.__s,D)||n.__v===r.__v){f.props=_,f.state=f.__s,n.__v!==r.__v&&(f.__d=!1),f.__v=n,n.__e=r.__e,n.__k=r.__k,n.__k.forEach((function(e){e&&(e.__=n)})),f.__h.length&&l.push(f);break e}null!=f.componentWillUpdate&&f.componentWillUpdate(_,f.__s,D),null!=f.componentDidUpdate&&f.__h.push((function(){f.componentDidUpdate(h,v,y)}))}if(f.context=D,f.props=_,f.__v=n,f.__P=e,k=t.__r,S=0,"prototype"in E&&E.prototype.render)f.state=f.__s,f.__d=!1,k&&k(n),u=f.render(f.props,f.state,f.context);else do{f.__d=!1,k&&k(n),u=f.render(f.props,f.state,f.context),f.state=f.__s}while(f.__d&&++S<25);f.state=f.__s,null!=f.getChildContext&&(o=d(d({},o),f.getChildContext())),p||null==f.getSnapshotBeforeUpdate||(y=f.getSnapshotBeforeUpdate(h,v)),C=null!=u&&u.type===m&&null==u.key?u.props.children:u,b(e,Array.isArray(C)?C:[C],n,r,o,i,a,l,c,s),f.base=n.__e,n.__h=null,f.__h.length&&l.push(f),w&&(f.__E=f.__=null),f.__e=!1}else null==a&&n.__v===r.__v?(n.__k=r.__k,n.__e=r.__e):n.__e=N(r.__e,n,r,o,i,a,l,s);(u=t.diffed)&&u(n)}catch(e){n.__v=null,(s||null!=a)&&(n.__e=c,n.__h=!!s,a[a.indexOf(c)]=null),t.__e(e,n,r)}}function T(e,n){t.__c&&t.__c(n,e),e.some((function(n){try{e=n.__h,n.__h=[],e.some((function(e){e.call(n)}))}catch(e){t.__e(e,n.__v)}}))}function N(t,n,r,o,i,a,l,s){var u,d,p,h=r.props,m=n.props,g=n.type,y=0;if("svg"===g&&(i=!0),null!=a)for(;y<a.length;y++)if((u=a[y])&&"setAttribute"in u==!!g&&(g?u.localName===g:3===u.nodeType)){t=u,a[y]=null;break}if(null==t){if(null===g)return document.createTextNode(m);t=i?document.createElementNS("http://www.w3.org/2000/svg",g):document.createElement(g,m.is&&m),a=null,s=!1}if(null===g)h===m||s&&t.data===m||(t.data=m);else{if(a=a&&e.call(t.childNodes),d=(h=r.props||c).dangerouslySetInnerHTML,p=m.dangerouslySetInnerHTML,!s){if(null!=a)for(h={},y=0;y<t.attributes.length;y++)h[t.attributes[y].name]=t.attributes[y].value;(p||d)&&(p&&(d&&p.__html==d.__html||p.__html===t.innerHTML)||(t.innerHTML=p&&p.__html||""))}if(function(e,t,n,r,o){var i;for(i in n)"children"===i||"key"===i||i in t||C(e,i,null,n[i],r);for(i in t)o&&"function"!=typeof t[i]||"children"===i||"key"===i||"value"===i||"checked"===i||n[i]===t[i]||C(e,i,t[i],n[i],r)}(t,m,h,i,s),p)n.__k=[];else if(y=n.props.children,b(t,Array.isArray(y)?y:[y],n,r,o,i&&"foreignObject"!==g,a,l,a?a[0]:r.__k&&v(r,0),s),null!=a)for(y=a.length;y--;)null!=a[y]&&f(a[y]);s||("value"in m&&void 0!==(y=m.value)&&(y!==t.value||"progress"===g&&!y||"option"===g&&y!==h.value)&&C(t,"value",y,h.value,!1),"checked"in m&&void 0!==(y=m.checked)&&y!==t.checked&&C(t,"checked",y,h.checked,!1))}return t}function O(e,n,r){try{"function"==typeof e?e(n):e.current=n}catch(e){t.__e(e,r)}}function P(e,n,r){var o,i;if(t.unmount&&t.unmount(e),(o=e.ref)&&(o.current&&o.current!==e.__e||O(o,null,n)),null!=(o=e.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(e){t.__e(e,n)}o.base=o.__P=null}if(o=e.__k)for(i=0;i<o.length;i++)o[i]&&P(o[i],n,"function"!=typeof e.type);r||null==e.__e||f(e.__e),e.__e=e.__d=void 0}function A(e,t,n){return this.constructor(e,n)}function R(n,r,o){var i,a,l;t.__&&t.__(n,r),a=(i="function"==typeof o)?null:o&&o.__k||r.__k,l=[],M(r,n=(!i&&o||r).__k=p(m,null,[n]),a||c,c,void 0!==r.ownerSVGElement,!i&&o?[o]:a?null:r.firstChild?e.call(r.childNodes):null,l,!i&&o?o:a?a.__e:r.firstChild,i),T(l,n)}function L(t,n,r){var o,i,a,l=d({},t.props);for(a in n)"key"==a?o=n[a]:"ref"==a?i=n[a]:l[a]=n[a];return arguments.length>2&&(l.children=arguments.length>3?e.call(arguments,2):r),h(t.type,l,o||t.key,i||t.ref,null)}function H(e,t){var n={__c:t="__cC"+l++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(w)},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}e=s.slice,t={__e:function(e,t,n,r){for(var o,i,a;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(e)),a=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),a=o.__d),a)return o.__E=o}catch(t){e=t}throw e}},n=0,g.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=d({},this.state),"function"==typeof e&&(e=e(d({},n),this.props)),e&&d(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),w(this))},g.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),w(this))},g.prototype.render=m,i=[],_.__r=0,l=0;var F,z,W,B,j=0,G=[],U=[],Y=t.__b,V=t.__r,$=t.diffed,X=t.__c,q=t.unmount;function K(e,n){t.__h&&t.__h(z,e,j||n),j=0;var r=z.__H||(z.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:U}),r.__[e]}function Z(e){return j=1,J(ue,e)}function J(e,t,n){var r=K(F++,2);return r.t=e,r.__c||(r.__=[n?n(t):ue(void 0,t),function(e){var t=r.t(r.__[0],e);r.__[0]!==t&&(r.__=[t,r.__[1]],r.__c.setState({}))}],r.__c=z),r.__}function Q(e,n){var r=K(F++,3);!t.__s&&se(r.__H,n)&&(r.__=e,r.u=n,z.__H.__h.push(r))}function ee(e,n){var r=K(F++,4);!t.__s&&se(r.__H,n)&&(r.__=e,r.u=n,z.__h.push(r))}function te(e){return j=5,ne((function(){return{current:e}}),[])}function ne(e,t){var n=K(F++,7);return se(n.__H,t)?(n.__V=e(),n.u=t,n.__h=e,n.__V):n.__}function re(e,t){return j=8,ne((function(){return e}),t)}function oe(e){var t=z.context[e.__c],n=K(F++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(z)),t.props.value):e.__}function ie(){for(var e;e=G.shift();)if(e.__P)try{e.__H.__h.forEach(le),e.__H.__h.forEach(ce),e.__H.__h=[]}catch(n){e.__H.__h=[],t.__e(n,e.__v)}}t.__b=function(e){z=null,Y&&Y(e)},t.__r=function(e){V&&V(e),F=0;var t=(z=e.__c).__H;t&&(W===z?(t.__h=[],z.__h=[],t.__.forEach((function(e){e.__V=U,e.u=void 0}))):(t.__h.forEach(le),t.__h.forEach(ce),t.__h=[])),W=z},t.diffed=function(e){$&&$(e);var n=e.__c;n&&n.__H&&(n.__H.__h.length&&(1!==G.push(n)&&B===t.requestAnimationFrame||((B=t.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(r),ae&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);ae&&(t=requestAnimationFrame(n))})(ie)),n.__H.__.forEach((function(e){e.u&&(e.__H=e.u),e.__V!==U&&(e.__=e.__V),e.u=void 0,e.__V=U}))),W=z=null},t.__c=function(e,n){n.some((function(e){try{e.__h.forEach(le),e.__h=e.__h.filter((function(e){return!e.__||ce(e)}))}catch(r){n.some((function(e){e.__h&&(e.__h=[])})),n=[],t.__e(r,e.__v)}})),X&&X(e,n)},t.unmount=function(e){q&&q(e);var n,r=e.__c;r&&r.__H&&(r.__H.__.forEach((function(e){try{le(e)}catch(e){n=e}})),n&&t.__e(n,r.__v))};var ae="function"==typeof requestAnimationFrame;function le(e){var t=z,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),z=t}function ce(e){var t=z;e.__c=e.__(),z=t}function se(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function ue(e,t){return"function"==typeof t?t(e):t}r(6886),r(9529);function de(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map((function(e){return"'"+e+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function fe(e){return!!e&&!!e[Je]}function pe(e){return!!e&&(function(e){if(!e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===Qe}(e)||Array.isArray(e)||!!e[Ze]||!!e.constructor[Ze]||_e(e)||be(e))}function he(e,t,n){void 0===n&&(n=!1),0===me(e)?(n?Object.keys:et)(e).forEach((function(r){n&&"symbol"==typeof r||t(r,e[r],e)})):e.forEach((function(n,r){return t(r,n,e)}))}function me(e){var t=e[Je];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:_e(e)?2:be(e)?3:0}function ge(e,t){return 2===me(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function ve(e,t){return 2===me(e)?e.get(t):e[t]}function ye(e,t,n){var r=me(e);2===r?e.set(t,n):3===r?(e.delete(t),e.add(n)):e[t]=n}function we(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function _e(e){return $e&&e instanceof Map}function be(e){return Xe&&e instanceof Set}function xe(e){return e.o||e.t}function De(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=tt(e);delete t[Je];for(var n=et(t),r=0;r<n.length;r++){var o=n[r],i=t[o];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[o]})}return Object.create(Object.getPrototypeOf(e),t)}function ke(e,t){return void 0===t&&(t=!1),Ce(e)||fe(e)||!pe(e)||(me(e)>1&&(e.set=e.add=e.clear=e.delete=Se),Object.freeze(e),t&&he(e,(function(e,t){return ke(t,!0)}),!0)),e}function Se(){de(2)}function Ce(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function Ee(e){var t=nt[e];return t||de(18,e),t}function Ie(){return Ye}function Me(e,t){t&&(Ee("Patches"),e.u=[],e.s=[],e.v=t)}function Te(e){Ne(e),e.p.forEach(Pe),e.p=null}function Ne(e){e===Ye&&(Ye=e.l)}function Oe(e){return Ye={p:[],l:Ye,h:e,m:!0,_:0}}function Pe(e){var t=e[Je];0===t.i||1===t.i?t.j():t.O=!0}function Ae(e,t){t._=t.p.length;var n=t.p[0],r=void 0!==e&&e!==n;return t.h.g||Ee("ES5").S(t,e,r),r?(n[Je].P&&(Te(t),de(4)),pe(e)&&(e=Re(t,e),t.l||He(t,e)),t.u&&Ee("Patches").M(n[Je].t,e,t.u,t.s)):e=Re(t,n,[]),Te(t),t.u&&t.v(t.u,t.s),e!==Ke?e:void 0}function Re(e,t,n){if(Ce(t))return t;var r=t[Je];if(!r)return he(t,(function(o,i){return Le(e,r,t,o,i,n)}),!0),t;if(r.A!==e)return t;if(!r.P)return He(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=4===r.i||5===r.i?r.o=De(r.k):r.o;he(3===r.i?new Set(o):o,(function(t,i){return Le(e,r,o,t,i,n)})),He(e,o,!1),n&&e.u&&Ee("Patches").R(r,n,e.u,e.s)}return r.o}function Le(e,t,n,r,o,i){if(fe(o)){var a=Re(e,o,i&&t&&3!==t.i&&!ge(t.D,r)?i.concat(r):void 0);if(ye(n,r,a),!fe(a))return;e.m=!1}if(pe(o)&&!Ce(o)){if(!e.h.F&&e._<1)return;Re(e,o),t&&t.A.l||He(e,o)}}function He(e,t,n){void 0===n&&(n=!1),e.h.F&&e.m&&ke(t,n)}function Fe(e,t){var n=e[Je];return(n?xe(n):e)[t]}function ze(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function We(e){e.P||(e.P=!0,e.l&&We(e.l))}function Be(e){e.o||(e.o=De(e.t))}function je(e,t,n){var r=_e(t)?Ee("MapSet").N(t,n):be(t)?Ee("MapSet").T(t,n):e.g?function(e,t){var n=Array.isArray(e),r={i:n?1:0,A:t?t.A:Ie(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},o=r,i=rt;n&&(o=[r],i=ot);var a=Proxy.revocable(o,i),l=a.revoke,c=a.proxy;return r.k=c,r.j=l,c}(t,n):Ee("ES5").J(t,n);return(n?n.A:Ie()).p.push(r),r}function Ge(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return De(e)}var Ue,Ye,Ve="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),$e="undefined"!=typeof Map,Xe="undefined"!=typeof Set,qe="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,Ke=Ve?Symbol.for("immer-nothing"):((Ue={})["immer-nothing"]=!0,Ue),Ze=Ve?Symbol.for("immer-draftable"):"__$immer_draftable",Je=Ve?Symbol.for("immer-state"):"__$immer_state",Qe=("undefined"!=typeof Symbol&&Symbol.iterator,""+Object.prototype.constructor),et="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,tt=Object.getOwnPropertyDescriptors||function(e){var t={};return et(e).forEach((function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)})),t},nt={},rt={get:function(e,t){if(t===Je)return e;var n=xe(e);if(!ge(n,t))return function(e,t,n){var r,o=ze(t,n);return o?"value"in o?o.value:null===(r=o.get)||void 0===r?void 0:r.call(e.k):void 0}(e,n,t);var r=n[t];return e.I||!pe(r)?r:r===Fe(e.t,t)?(Be(e),e.o[t]=je(e.A.h,r,e)):r},has:function(e,t){return t in xe(e)},ownKeys:function(e){return Reflect.ownKeys(xe(e))},set:function(e,t,n){var r=ze(xe(e),t);if(null==r?void 0:r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=Fe(xe(e),t),i=null==o?void 0:o[Je];if(i&&i.t===n)return e.o[t]=n,e.D[t]=!1,!0;if(we(n,o)&&(void 0!==n||ge(e.t,t)))return!0;Be(e),We(e)}return e.o[t]===n&&"number"!=typeof n&&(void 0!==n||t in e.o)||(e.o[t]=n,e.D[t]=!0,!0)},deleteProperty:function(e,t){return void 0!==Fe(e.t,t)||t in e.t?(e.D[t]=!1,Be(e),We(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=xe(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty:function(){de(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){de(12)}},ot={};he(rt,(function(e,t){ot[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),ot.deleteProperty=function(e,t){return ot.set.call(this,e,t,void 0)},ot.set=function(e,t,n){return rt.set.call(this,e[0],t,n,e[0])};var it=function(){function e(e){var t=this;this.g=qe,this.F=!0,this.produce=function(e,n,r){if("function"==typeof e&&"function"!=typeof n){var o=n;n=e;var i=t;return function(e){var t=this;void 0===e&&(e=o);for(var r=arguments.length,a=Array(r>1?r-1:0),l=1;l<r;l++)a[l-1]=arguments[l];return i.produce(e,(function(e){var r;return(r=n).call.apply(r,[t,e].concat(a))}))}}var a;if("function"!=typeof n&&de(6),void 0!==r&&"function"!=typeof r&&de(7),pe(e)){var l=Oe(t),c=je(t,e,void 0),s=!0;try{a=n(c),s=!1}finally{s?Te(l):Ne(l)}return"undefined"!=typeof Promise&&a instanceof Promise?a.then((function(e){return Me(l,r),Ae(e,l)}),(function(e){throw Te(l),e})):(Me(l,r),Ae(a,l))}if(!e||"object"!=typeof e){if(void 0===(a=n(e))&&(a=e),a===Ke&&(a=void 0),t.F&&ke(a,!0),r){var u=[],d=[];Ee("Patches").M(e,a,u,d),r(u,d)}return a}de(21,e)},this.produceWithPatches=function(e,n){if("function"==typeof e)return function(n){for(var r=arguments.length,o=Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return t.produceWithPatches(n,(function(t){return e.apply(void 0,[t].concat(o))}))};var r,o,i=t.produce(e,n,(function(e,t){r=e,o=t}));return"undefined"!=typeof Promise&&i instanceof Promise?i.then((function(e){return[e,r,o]})):[i,r,o]},"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze)}var t=e.prototype;return t.createDraft=function(e){pe(e)||de(8),fe(e)&&(e=function(e){return fe(e)||de(22,e),function e(t){if(!pe(t))return t;var n,r=t[Je],o=me(t);if(r){if(!r.P&&(r.i<4||!Ee("ES5").K(r)))return r.t;r.I=!0,n=Ge(t,o),r.I=!1}else n=Ge(t,o);return he(n,(function(t,o){r&&ve(r.t,t)===o||ye(n,t,e(o))})),3===o?new Set(n):n}(e)}(e));var t=Oe(this),n=je(this,e,void 0);return n[Je].C=!0,Ne(t),n},t.finishDraft=function(e,t){var n=(e&&e[Je]).A;return Me(n,t),Ae(void 0,n)},t.setAutoFreeze=function(e){this.F=e},t.setUseProxies=function(e){e&&!qe&&de(20),this.g=e},t.applyPatches=function(e,t){var n;for(n=t.length-1;n>=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));var o=Ee("Patches").$;return fe(e)?o(e,t):this.produce(e,(function(e){return o(e,t)}))},e}(),at=new it,lt=at.produce,ct=(at.produceWithPatches.bind(at),at.setAutoFreeze.bind(at),at.setUseProxies.bind(at),at.applyPatches.bind(at),at.createDraft.bind(at),at.finishDraft.bind(at),lt),st=(r(5940),r(7386)),ut=r.n(st);const dt="0",ft=24,pt=72,ht={color:"#000",backgroundColor:"#a1b56c",dragBackgroundColor:"#a1b56c",borderColor:"#000"};var mt=r(758),gt=r.n(mt);const vt="toastui-calendar-";function yt(){const e=[];for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((t=>{t&&(gt()(t)?e.push(t):Object.keys(t).forEach((n=>{t[n]&&e.push(n)})))})),e.map((e=>"".concat(vt).concat(e))).join(" ")}function wt(e){return"".concat(e,"%")}function _t(e){return"".concat(e,"px")}function bt(e){const t=e.match(/(\d+)%/),n=e.match(/(-?)\s?(\d+)px/);return{percent:t?parseInt(t[1],10):0,px:n?parseInt("".concat(n[1]).concat(n[2]),10):0}}function xt(e,t){const n=e.model.getColors();return Object.keys(ht).reduce(((e,r)=>{var o,i;const a=r;return e[a]=null!==(o=null!==(i=n[a])&&void 0!==i?i:t[a])&&void 0!==o?o:ht[a],e}),{})}r(1372);const Dt=/^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[01]|0[1-9]|[12][0-9])T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])(\.)?([0-9]+)?([+-]\d\d(?::?\d\d)?|\s*Z)?$/;function kt(){throw new Error("This operation is not supported.")}function St(e){const t=function(e){const t=Dt.exec(e);if(t){const[,e,n,r,o,i,a,,l,c]=t;return{y:Number(e),M:Number(n)-1,d:Number(r),h:Number(o),m:Number(i),s:Number(a),ms:Number(l)||0,zoneInfo:c}}return null}(e);if(t&&!t.zoneInfo){const{y:e,M:n,d:r,h:o,m:i,s:a,ms:l}=t;return new Date(e,n,r,o,i,a,l)}return null}class Ct{constructor(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const[r]=t;r instanceof Date?this.d=new Date(r.getTime()):gt()(r)&&1===t.length&&(this.d=St(r)),this.d||(this.d=new Date(...t))}setTimezoneOffset(){kt()}setTimezoneName(){kt()}clone(){return new Ct(this.d)}toDate(){return new Date(this.d.getTime())}toString(){return this.d.toString()}}["getTime","getTimezoneOffset","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","getMilliseconds","getDay"].forEach((e=>{Ct.prototype[e]=function(){return this.d[e](...arguments)}})),["setTime","setFullYear","setMonth","setDate","setHours","setMinutes","setSeconds","setMilliseconds"].forEach((e=>{Ct.prototype[e]=function(){return this.d[e](...arguments)}}));class Et extends Ct{clone(){return new Et(this.d)}getTimezoneOffset(){return 0}}["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds","Day"].forEach((e=>{const t="get".concat(e);Et.prototype[t]=function(){return this.d["getUTC".concat(e)](...arguments)}})),["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"].forEach((e=>{const t="set".concat(e);Et.prototype[t]=function(){return this.d["setUTC".concat(e)](...arguments)}}));const It="@toast-ui/calendar: ";class Mt extends Error{constructor(e){super("".concat(It).concat("Invalid IANA Timezone Name"," - ").concat(e)),this.name="InvalidTimezoneNameError"}}class Tt extends Error{constructor(e){super("".concat(It).concat("Invalid DateTime Format"," - ").concat(e)),this.name="InvalidDateTimeFormatError"}}class Nt extends Error{constructor(e){super("".concat(It).concat("Invalid View Type"," - ").concat(e)),this.name="InvalidViewTypeError"}}const Ot=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];console.warn("".concat(It).concat(e),...n)};var Pt=r(3929),At=r.n(Pt),Rt=r(1326),Lt=r.n(Rt),Ht=r(321),Ft=r.n(Ht),zt=r(5758),Wt=r.n(zt);function Bt(e){return At()(e)||null===e}function jt(e){return!Bt(e)}function Gt(e){return"function"==typeof e}let Ut=Ct;function Yt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Ut(...t)}function Vt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new nn;if(!Kt())return Ot("Intl.DateTimeFormat is not fully supported. So It will return the local timezone offset only.\nYou can use a polyfill to fix this issue."),-t.toDate().getTimezoneOffset();Zt(e);const n=Qt(t,e),r=en(n);return Math.round((r.getTime()-t.getTime())/60/1e3)}function $t(e,t){t&&Zt(t);const n=new nn(e.getFullYear(),0,1),r=new nn(e.getFullYear(),6,1);return t?Math.max(-Vt(t,n),-Vt(t,r))!==-Vt(t,e):Math.max(n.getTimezoneOffset(),r.getTimezoneOffset())!==e.toDate().getTimezoneOffset()}const Xt={},qt={};function Kt(){var e,t,n;return Gt(null===(e=Intl)||void 0===e||null===(t=e.DateTimeFormat)||void 0===t||null===(n=t.prototype)||void 0===n?void 0:n.formatToParts)}function Zt(e){if(qt[e])return!0;try{return Intl.DateTimeFormat("en-US",{timeZone:e}),qt[e]=!0,!0}catch{throw new Mt(e)}}const Jt={year:0,month:1,day:2,hour:3,minute:4,second:5};function Qt(e,t){const n=function(e){if(Xt[e])return Xt[e];const t=new Intl.DateTimeFormat("en-US",{timeZone:e,hourCycle:"h23",hour12:!1,year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"});return Xt[e]=t,t}(t);return n.formatToParts(e.toDate()).reduce(((e,t)=>{const n=Jt[t.type];return jt(n)&&(e[n]=parseInt(t.value,10)),e}),[])}function en(e){const[t,n,r,o,i,a]=e,l=n-1;return new Date(Date.UTC(t,l,r,o%24,i,a))}function tn(e){return(-(new Date).getTimezoneOffset()-e)*bn}class nn{constructor(){var e,t,n;n=null,(t="tzOffset")in(e=this)?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n;for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];o[0]instanceof nn?this.d=Yt(o[0].getTime()):this.d=Yt(...o)}toString(){return this.d.toString()}addFullYear(e){return this.setFullYear(this.getFullYear()+e),this}addMonth(e){return this.setMonth(this.getMonth()+e),this}addDate(e){return this.setDate(this.getDate()+e),this}addHours(e){return this.setHours(this.getHours()+e),this}addMinutes(e){return this.setMinutes(this.getMinutes()+e),this}addSeconds(e){return this.setSeconds(this.getSeconds()+e),this}addMilliseconds(e){return this.setMilliseconds(this.getMilliseconds()+e),this}setWithRaw(e,t,n,r,o,i,a){return this.setFullYear(e,t,n),this.setHours(r,o,i,a),this}toDate(){return this.d.toDate()}valueOf(){return this.getTime()}getTimezoneOffset(){var e;return null!==(e=this.tzOffset)&&void 0!==e?e:this.d.getTimezoneOffset()}getTime(){return this.d.getTime()}getFullYear(){return this.d.getFullYear()}getMonth(){return this.d.getMonth()}getDate(){return this.d.getDate()}getHours(){return this.d.getHours()}getMinutes(){return this.d.getMinutes()}getSeconds(){return this.d.getSeconds()}getMilliseconds(){return this.d.getMilliseconds()}getDay(){return this.d.getDay()}setTime(e){return this.d.setTime(e)}setFullYear(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getMonth(),n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.getDate();return this.d.setFullYear(e,t,n)}setMonth(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getDate();return this.d.setMonth(e,t)}setDate(e){return this.d.setDate(e)}setHours(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getMinutes(),n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.getSeconds(),r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.getMilliseconds();return this.d.setHours(e,t,n,r)}setMinutes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getSeconds(),n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.getMilliseconds();return this.d.setMinutes(e,t,n)}setSeconds(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getMilliseconds();return this.d.setSeconds(e,t)}setMilliseconds(e){return this.d.setMilliseconds(e)}tz(e){if("Local"===e)return new nn(this.getTime());const t=gt()(e)?Vt(e,this):e,n=new nn(this.getTime()-tn(t));return n.tzOffset=t,n}local(e){if(jt(e)){const t=gt()(e)?Vt(e,this):e;return new nn(this.getTime()+tn(t))}return new nn(this.getTime()+(jt(this.tzOffset)?tn(this.tzOffset):0))}}function rn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Wt()(t)?(Object.keys(t).forEach((n=>{const r=n,o=n;Array.isArray(t[o])||!Wt()(e[r])||!Wt()(t[o])||t[o]instanceof nn?e[r]=t[o]:e[r]=rn(e[r],t[o])})),e):e}function on(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const an=["top","left","width","height","exceedLeft","exceedRight","croppedStart","croppedEnd","goingDurationHeight","modelDurationHeight","comingDurationHeight","duplicateEvents","duplicateEventIndex","duplicateStarts","duplicateEnds","duplicateLeft","duplicateWidth","collapse","isMain"];class ln{constructor(e){on(this,"top",0),on(this,"left",0),on(this,"width",0),on(this,"height",0),on(this,"exceedLeft",!1),on(this,"exceedRight",!1),on(this,"croppedStart",!1),on(this,"croppedEnd",!1),on(this,"goingDurationHeight",0),on(this,"modelDurationHeight",100),on(this,"comingDurationHeight",0),on(this,"duplicateEvents",[]),on(this,"duplicateEventIndex",-1),on(this,"duplicateLeft",""),on(this,"duplicateWidth",""),on(this,"collapse",!1),on(this,"isMain",!1),this.model=e}getUIProps(){return function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.reduce(((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t)),{})}(this,...an)}setUIProps(e){Object.assign(this,e)}getStarts(){return this.renderStarts?this.renderStarts:this.model.getStarts()}getEnds(){return this.renderEnds?this.renderEnds:this.model.getEnds()}cid(){return this.model.cid()}valueOf(){return this.model}duration(){return this.model.duration()}collidesWith(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=[];[this,e].forEach((e=>{e instanceof ln&&e.duplicateEvents.length>0?n.push({start:e.duplicateStarts,end:e.duplicateEnds,goingDuration:0,comingDuration:0}):n.push({start:e.getStarts(),end:e.getEnds(),goingDuration:e.valueOf().goingDuration,comingDuration:e.valueOf().comingDuration})}));const[r,o]=n;return Yn({start:r.start.getTime(),end:r.end.getTime(),targetStart:o.start.getTime(),targetEnd:o.end.getTime(),goingDuration:r.goingDuration,comingDuration:r.comingDuration,targetGoingDuration:o.goingDuration,targetComingDuration:o.comingDuration,usingTravelTime:t})}clone(){const e=this.getUIProps(),t=new ln(this.model);return t.setUIProps(e),this.renderStarts&&(t.renderStarts=new nn(this.renderStarts)),this.renderEnds&&(t.renderEnds=new nn(this.renderEnds)),t}}var cn={event:{asc:function(e,t){const n=e instanceof ln?e.model:e,r=t instanceof ln?t.model:t,o=function(e,t){return e!==t?e?-1:1:0}(n.isAllday||n.hasMultiDates,r.isAllday||r.hasMultiDates);if(o)return o;const i=Mn(e.getStarts(),t.getStarts());if(i)return i;const a=e.duration(),l=t.duration();return a<l?1:a>l?-1:n.cid()-r.cid()}},num:{asc:function(e,t){return Number(e)-Number(t)}}};function sn(e){return e[0]}function un(e){return e[e.length-1]}function dn(e,t){for(let n=e.length-1;n>=0;n-=1)if(t(e[n]))return n;return-1}function fn(e,t){return e>0?Array.from({length:e},(()=>Array.isArray(t)?t.slice():t)):[]}let pn;!function(e){e[e.SUN=0]="SUN",e[e.MON=1]="MON",e[e.TUE=2]="TUE",e[e.WED=3]="WED",e[e.THU=4]="THU",e[e.FRI=5]="FRI",e[e.SAT=6]="SAT"}(pn||(pn={}));const hn=/^(\d{4}[-|/]*\d{2}[-|/]*\d{2})\s?(\d{2}:\d{2}:\d{2})?$/,mn={},gn=[24,60,60,1e3];function vn(e,t){let n="",r=0;if(String(e).length>t)return String(e);for(;r<t-1;r+=1)n+="0";return(n+e).slice(-1*t)}function yn(e){let t=e.getHours();return 0===t&&(t=12),t>12&&(t%=12),t}const wn={YYYYMMDD:e=>[e.getFullYear(),vn(e.getMonth()+1,2),vn(e.getDate(),2)].join(""),YYYY:e=>String(e.getFullYear()),MM:e=>vn(e.getMonth()+1,2),DD:e=>vn(e.getDate(),2),"HH:mm":function(e){const t=e.getHours(),n=e.getMinutes();return"".concat(vn(t,2),":").concat(vn(n,2))},"hh:mm":function(e){const t=yn(e),n=e.getMinutes();return"".concat(vn(t,2),":").concat(vn(n,2))},hh(e){const t=yn(e);return String(t)},tt:e=>e.getHours()<12?"am":"pm"},_n=864e5,bn=6e4,xn=20*bn;function Dn(e){const t=Number(e[0].startTime.split(":",1)),n=Number(e[e.length-1].endTime.split(":",1)),r=e.length/(n-t),o=60/r;return{STEPS:r,STEP_MINUTES:o,MS_PER_STEP_MINUTES:60*o*1e3}}function kn(e,t){let n=t;return Object.entries(wn).forEach((t=>{let[r,o]=t;n=n.replace(r,o(e))})),n}function Sn(e,t){const n=mn,r=e+t;if(n[r])return n[r];const o=function(e,t,n){const r={date:0,hour:1,minute:2,second:3};return!(e in r)||isNaN(t)?0:[t].concat(gn.slice(r[e])).reduce(n)}(e,t,((e,t)=>e*t));return o?(n[r]=o,n[r]):0}function Cn(e){const t=e?new nn(e):new nn;return t.setHours(0,0,0,0),t}function En(e,t,n){const r=e.getTime(),o=t.getTime(),i=new nn(e),a=[];let l=r;for(;l<=o&&o>=i.getTime();)a.push(new nn(i)),l+=n,i.addMilliseconds(n);return a}function In(e){return new nn(e)}function Mn(e,t){const n=e.getTime(),r=t.getTime();return n<r?-1:n>r?1:0}function Tn(e,t){return function(e,t){return function(e,t){return e.getFullYear()===t.getFullYear()}(e,t)&&e.getMonth()===t.getMonth()}(e,t)&&e.getDate()===t.getDate()}function Nn(e,t){return 1===Mn(e,t)?e:t}function On(e,t){return-1===Mn(e,t)?e:t}function Pn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;const n=e.match(hn);let r,o,i;if(!n)throw new Tt(e);if(e.length>8){r=~e.indexOf("/")?"/":"-";const t=n.splice(1);o=t[0].split(r),i=t[1]?t[1].split(":"):[0,0,0]}else{const[e]=n;o=[e.substr(0,4),e.substr(4,2),e.substr(6,2)],i=[0,0,0]}return(new nn).setWithRaw(Number(o[0]),Number(o[1])+t,Number(o[2]),Number(i[0]),Number(i[1]),Number(i[2]),0)}function An(e){const t=e?new nn(e):new nn;return t.setHours(23,59,59,999),t}function Rn(e){return e===pn.SUN||e===pn.SAT}function Ln(e){return e===pn.SUN}function Hn(e){return e===pn.SAT}function Fn(e){const t=new nn(e);return t.setDate(1),t.setHours(0,0,0,0),t}function zn(e,t,n,r){const o=100/e,i=e>5?100/(e-1):o;let a=0;const l=ut()(n,7).concat(ut()(e)).slice(0,7);t=!r&&t;const c=l.map((n=>{let r=t?i:o;e>5&&t&&Rn(n)&&(r=i/2);const l={width:r,left:a};return a+=r,l})),{length:s}=c,u=fn(s,fn(s,0));return c.forEach(((e,t)=>{let{width:n}=e;for(let e=0;e<=t;e+=1)for(let r=t;r<s;r+=1)u[e][r]+=n})),u[0][s-1]=100,{rowStyleInfo:c,cellWidthMap:u.map((e=>e.map(wt)))}}function Wn(e,t){const n=In(e);return n.setMilliseconds(e.getMilliseconds()+t),n}function Bn(e,t){const n=In(e);return n.setMinutes(e.getMinutes()+t),n}function jn(e,t){const n=In(e);return n.setHours(...t.split(":").map(Number)),n}function Gn(e,t){const n=In(e);return n.setDate(e.getDate()+t),n}function Un(e,t){const n=new nn(e.getFullYear(),e.getMonth(),e.getDate()).getTime(),r=new nn(t.getFullYear(),t.getMonth(),t.getDate()).getTime();return Math.round((n-r)/_n)}function Yn(e){let{start:t,end:n,targetStart:r,targetEnd:o,goingDuration:i,comingDuration:a,targetGoingDuration:l,targetComingDuration:c,usingTravelTime:s}=e;return Math.abs(n-t)<xn&&(n+=xn),Math.abs(n-t)<xn&&(n+=xn),s&&(t-=Sn("minute",i),n+=Sn("minute",a),r-=Sn("minute",l),o+=Sn("minute",c)),function(e,t,n,r){return n>e&&n<t||r>e&&r<t||n<=e&&r>=t}(t,n,r,o)}const Vn=function(){const e=function(){let e=0;return{next:()=>(e+=1,e)}}();return()=>e.next()}();function $n(e){return e.__fe_id||(e.__fe_id=Vn()),e.__fe_id}function Xn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class qn{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Xn(this,"id",""),Xn(this,"calendarId",""),Xn(this,"title",""),Xn(this,"body",""),Xn(this,"isAllday",!1),Xn(this,"start",new nn),Xn(this,"end",new nn),Xn(this,"goingDuration",0),Xn(this,"comingDuration",0),Xn(this,"location",""),Xn(this,"attendees",[]),Xn(this,"category","time"),Xn(this,"dueDateClass",""),Xn(this,"recurrenceRule",""),Xn(this,"state","Busy"),Xn(this,"isVisible",!0),Xn(this,"isPending",!1),Xn(this,"isFocused",!1),Xn(this,"isReadOnly",!1),Xn(this,"isPrivate",!1),Xn(this,"customStyle",{}),Xn(this,"raw",null),Xn(this,"hasMultiDates",!1),$n(this),this.init(e)}init(){let{id:e="",calendarId:t="",title:n="",body:r="",isAllday:o=!1,start:i=new nn,end:a=new nn,goingDuration:l=0,comingDuration:c=0,location:s="",attendees:u=[],category:d="time",dueDateClass:f="",recurrenceRule:p="",state:h="Busy",isVisible:m=!0,isPending:g=!1,isFocused:v=!1,isReadOnly:y=!1,isPrivate:w=!1,color:_,backgroundColor:b,dragBackgroundColor:x,borderColor:D,customStyle:k={},raw:S=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.id=e,this.calendarId=t,this.title=n,this.body=r,this.isAllday="allday"===d||o,this.goingDuration=l,this.comingDuration=c,this.location=s,this.attendees=u,this.category=d,this.dueDateClass=f,this.recurrenceRule=p,this.state=h,this.isVisible=m,this.isPending=g,this.isFocused=v,this.isReadOnly=y,this.isPrivate=w,this.color=_,this.backgroundColor=b,this.dragBackgroundColor=x,this.borderColor=D,this.customStyle=k,this.raw=S,this.isAllday?this.setAlldayPeriod(i,a):this.setTimePeriod(i,a),"milestone"!==d&&"task"!==d||(this.start=new nn(this.end))}setAlldayPeriod(e,t){let n,r;n=gt()(e)?Pn(e.substring(0,10)):new nn(e||Date.now()),r=gt()(t)?Pn(t.substring(0,10)):new nn(t||this.start),this.start=n,this.start.setHours(0,0,0),this.end=r||new nn(this.start),this.end.setHours(23,59,59)}setTimePeriod(e,t){this.start=new nn(e||Date.now()),this.end=new nn(t||this.start),t||this.end.setMinutes(this.end.getMinutes()+30),this.hasMultiDates=this.end.getTime()-this.start.getTime()>_n}getStarts(){return this.start}getEnds(){return this.end}cid(){return $n(this)}equals(e){return this.id===e.id&&(this.title===e.title&&(this.body===e.body&&(this.isAllday===e.isAllday&&(0===Mn(this.getStarts(),e.getStarts())&&(0===Mn(this.getEnds(),e.getEnds())&&(this.color===e.color&&(this.backgroundColor===e.backgroundColor&&(this.dragBackgroundColor===e.dragBackgroundColor&&this.borderColor===e.borderColor))))))))}duration(){const e=Number(this.getStarts()),t=Number(this.getEnds());let n;return n=this.isAllday?Number(An(t))-Number(Cn(e)):t-e,n}valueOf(){return this}collidesWith(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e=e instanceof ln?e.model:e,Yn({start:Number(this.getStarts()),end:Number(this.getEnds()),targetStart:Number(e.getStarts()),targetEnd:Number(e.getEnds()),goingDuration:this.goingDuration,comingDuration:this.comingDuration,targetGoingDuration:e.goingDuration,targetComingDuration:e.comingDuration,usingTravelTime:t})}toEventObject(){return{id:this.id,calendarId:this.calendarId,__cid:this.cid(),title:this.title,body:this.body,isAllday:this.isAllday,start:this.start,end:this.end,goingDuration:this.goingDuration,comingDuration:this.comingDuration,location:this.location,attendees:this.attendees,category:this.category,dueDateClass:this.dueDateClass,recurrenceRule:this.recurrenceRule,state:this.state,isVisible:this.isVisible,isPending:this.isPending,isFocused:this.isFocused,isReadOnly:this.isReadOnly,isPrivate:this.isPrivate,color:this.color,backgroundColor:this.backgroundColor,dragBackgroundColor:this.dragBackgroundColor,borderColor:this.borderColor,customStyle:this.customStyle,raw:this.raw}}getColors(){return{color:this.color,backgroundColor:this.backgroundColor,dragBackgroundColor:this.dragBackgroundColor,borderColor:this.borderColor}}}function Kn(e){let{model:t}=e;const{category:n,isAllday:r,hasMultiDates:o}=t;return"time"===n&&!r&&!o}Xn(qn,"schema",{required:["title"],dateRange:["start","end"]});class Zn{constructor(e){var t,n,r;t=this,n="internalMap",r=new Map,n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,Gt(e)&&(this.getItemID=e)}static and(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const{length:r}=t;return e=>{for(let n=0;n<r;n+=1)if(!t[n].call(null,e))return!1;return!0}}static or(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const{length:r}=t;return r?e=>{let n=t[0].call(null,e);for(let o=1;o<r;o+=1)n=n||t[o].call(null,e);return n}:()=>!1}getItemID(e){var t;return null!==(t=null==e?void 0:e._id)&&void 0!==t?t:""}getFirstItem(){return this.internalMap.values().next().value}add(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.forEach((e=>{const t=this.getItemID(e);this.internalMap.set(t,e)})),this}remove(){const e=[];for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((t=>{const n=gt()(t)||Ft()(t)?t:this.getItemID(t);this.internalMap.has(n)&&(e.push(this.internalMap.get(n)),this.internalMap.delete(n))})),1===e.length?e[0]:e}has(e){const t=gt()(e)||Ft()(e)?e:this.getItemID(e);return this.internalMap.has(t)}get(e){var t;const n=gt()(e)||Ft()(e)?e:this.getItemID(e);return null!==(t=this.internalMap.get(n))&&void 0!==t?t:null}doWhenHas(e,t){const n=this.internalMap.get(e);Bt(n)||t(n)}filter(e){const t=new Zn;return this.hasOwnProperty("getItemID")&&(t.getItemID=this.getItemID),this.internalMap.forEach((n=>{!0===e(n)&&t.add(n)})),t}groupBy(e){const t={};return this.internalMap.forEach((n=>{var r,o;let i=Gt(e)?e(n):n[e];Gt(i)&&(i=i.call(n)),null!==(o=t[r=i])&&void 0!==o||(t[r]=new Zn(this.getItemID)),t[i].add(n)})),t}find(e){let t=null;const n=this.internalMap.values();let r=n.next();for(;!1===r.done;){if(e(r.value)){t=r.value;break}r=n.next()}return t}sort(e){return this.toArray().sort(e)}each(e){const t=this.internalMap.entries();let n=t.next();for(;!1===n.done;){const[r,o]=n.value;if(!1===e(o,r))break;n=t.next()}}clear(){this.internalMap.clear()}toArray(){return Array.from(this.internalMap.values())}get size(){return this.internalMap.size}}function Jn(){const e=new Zn((e=>e.cid()));return arguments.length&&e.add(...arguments),e}function Qn(e,t){return En(Cn(e),An(t),_n)}function er(e){const{model:t}=e;return(n=t).isAllday||"time"===n.category&&Number(n.end)-Number(n.start)>_n?"allday":t.category;var n}function tr(e,t){Qn(t.getStarts(),t.getEnds()).forEach((n=>{const r=kn(n,"YYYYMMDD");(e[r]=e[r]||[]).push(t.cid())}))}function nr(e,t){const n=t.cid();Object.values(e).forEach((e=>{const t=e.indexOf(n);~t&&e.splice(t,1)}))}function rr(e,t){return function(e,t){return e.events.add(t),tr(e.idsOfDay,t),t}(e,new qn(t))}function or(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{calendar:{calendars:e,events:Jn(),idsOfDay:{}}}}function ir(e){return{createEvents:t=>e(ct((e=>{!function(e){(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).map((t=>rr(e,t)))}(e.calendar,t)}))),updateEvent:t=>{let{event:n,eventData:r}=t;return e(ct((e=>{!function(e,t,n,r){const{idsOfDay:o}=e,i=e.events.find((e=>function(e,t,n){return e.id===t&&e.calendarId===n}(e,t,n)));!!i&&(i.init({...i,...r}),nr(o,i),tr(o,i))}(e.calendar,n.id,n.calendarId,r)})))},deleteEvent:t=>e(ct((e=>{!function(e,t){nr(e.idsOfDay,t),e.events.remove(t)}(e.calendar,t)}))),clearEvents:()=>e(ct((e=>{var t;(t=e.calendar).idsOfDay={},t.events.clear()}))),setCalendars:t=>e(ct((e=>{e.calendar.calendars=t}))),setCalendarColor:(t,n)=>e(ct((e=>{const r=e.calendar.calendars.map((e=>e.id===t?{...e,...n}:e)),o=Jn(...e.calendar.events.toArray().map((e=>{var r,o,i,a;e.calendarId===t&&(e.color=null!==(r=n.color)&&void 0!==r?r:e.color,e.backgroundColor=null!==(o=n.backgroundColor)&&void 0!==o?o:e.backgroundColor,e.borderColor=null!==(i=n.borderColor)&&void 0!==i?i:e.borderColor,e.dragBackgroundColor=null!==(a=n.dragBackgroundColor)&&void 0!==a?a:e.dragBackgroundColor);return e})));e.calendar.calendars=r,e.calendar.events=o}))),setCalendarVisibility:(t,n)=>e(ct((e=>{const r=e.calendar.events.toArray();e.calendar.events=Jn(...r.map((e=>(t.includes(e.calendarId)&&(e.isVisible=n),e))))})))}}let ar;function lr(){return{dnd:{draggingItemType:null,draggingState:ar.IDLE,initX:null,initY:null,x:null,y:null,draggingEventUIModel:null}}}function cr(e){return{initDrag:t=>{e(ct((e=>{e.dnd={...e.dnd,...t,draggingState:ar.INIT}})))},setDragging:t=>{e(ct((e=>{e.dnd={...e.dnd,...t,draggingState:ar.DRAGGING}})))},cancelDrag:()=>{e(ct((e=>{e.dnd=lr().dnd,e.dnd.draggingState=ar.CANCELED})))},reset:()=>{e(ct((e=>{e.dnd=lr().dnd})))},setDraggingEventUIModel:t=>{e(ct((e=>{var n;e.dnd.draggingEventUIModel=null!==(n=null==t?void 0:t.clone())&&void 0!==n?n:null})))}}}function sr(e){return{setGridSelection:(t,n)=>{e(ct((e=>{e.gridSelection[t]=n})))},addGridSelection:(t,n)=>{e(ct((e=>{"dayGridMonth"===t&&n&&(e.gridSelection.accumulated[t]=[...e.gridSelection.accumulated[t],n],e.gridSelection.dayGridMonth=null)})))},clearAll:()=>e(ct((e=>{e.gridSelection={dayGridMonth:null,dayGridWeek:null,timeGrid:null,accumulated:{dayGridMonth:[]}}})))}}!function(e){e[e.IDLE=0]="IDLE",e[e.INIT=1]="INIT",e[e.DRAGGING=2]="DRAGGING",e[e.CANCELED=3]="CANCELED"}(ar||(ar={}));const ur=3;function dr(e,t,n){return Object.keys(e).reduce(((n,r)=>r===t?n:n-e[r].height-ur),n)}function fr(e){return{setLastPanelType:t=>{e(ct((e=>{e.weekViewLayout.lastPanelType=t,t&&(e.weekViewLayout.dayGridRows[t].height=dr(e.weekViewLayout.dayGridRows,t,e.layout))})))},updateLayoutHeight:t=>e(ct((e=>{const{lastPanelType:n}=e.weekViewLayout;e.layout=t,n&&(e.weekViewLayout.dayGridRows[n].height=dr(e.weekViewLayout.dayGridRows,n,t))}))),updateDayGridRowHeight:t=>{let{rowName:n,height:r}=t;return e(ct((e=>{const{lastPanelType:t}=e.weekViewLayout;e.weekViewLayout.dayGridRows[n]={height:r},t&&(e.weekViewLayout.dayGridRows[t].height=dr(e.weekViewLayout.dayGridRows,t,e.layout))})))},updateDayGridRowHeightByDiff:t=>{let{rowName:n,diff:r}=t;return e(ct((e=>{var t,o,i;const{lastPanelType:a}=e.weekViewLayout,l=null!==(t=null===(o=e.weekViewLayout.dayGridRows)||void 0===o||null===(i=o[n])||void 0===i?void 0:i.height)&&void 0!==t?t:pt;e.weekViewLayout.dayGridRows[n]={height:l+r},a&&(e.weekViewLayout.dayGridRows[a].height=dr(e.weekViewLayout.dayGridRows,a,e.layout))})))},setSelectedDuplicateEventCid:t=>e(ct((e=>{e.weekViewLayout.selectedDuplicateEventCid=null!=t?t:-1})))}}function pr(e){return e.charAt(0).toUpperCase()+e.slice(1)}const hr=["sun","mon","tue","wed","thu","fri","sat"],mr=e=>hr[e];function gr(e,t){return e.map((e=>{const n=e.getDay(),r=t.length>0?t[n]:pr(mr(n));return{date:e.getDate(),day:e.getDay(),dayName:r,isToday:!0,renderDate:"date",dateInstance:e}}))}function vr(e){if(!e)return!1;const t={getDuplicateEvents:(e,t)=>t.filter((t=>t.title===e.title&&0===Mn(t.start,e.start)&&0===Mn(t.end,e.end))).sort(((e,t)=>e.calendarId>t.calendarId?1:-1)),getMainEvent:e=>un(e)};return Lt()(e)?t:{...t,...e}}function yr(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t={startDayOfWeek:pn.SUN,dayNames:[],narrowWeekend:!1,workweek:!1,showNowIndicator:!0,showTimezoneCollapseButton:!1,timezonesCollapsed:!1,hourStart:0,hourEnd:24,eventView:!0,taskView:!0,collapseDuplicateEvents:!1,timeStep:[0,30],...e};return t.collapseDuplicateEvents=vr(t.collapseDuplicateEvents),t}function wr(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{zones:[],...e}}function _r(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t={dayNames:[],visibleWeeksCount:0,workweek:!1,narrowWeekend:!1,startDayOfWeek:pn.SUN,isAlways6Weeks:!0,visibleEventCount:6,...e};return 0===t.dayNames.length&&(t.dayNames=hr.slice()),t}function br(e){return Lt()(e)?{enableDblClick:e,enableClick:e}:{enableDblClick:!0,enableClick:!0,...e}}const xr=e=>!!e.isVisible;function Dr(){var e,t,n,r,o,i;let a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{options:{defaultView:null!==(e=a.defaultView)&&void 0!==e?e:"week",useFormPopup:null!==(t=a.useFormPopup)&&void 0!==t&&t,useDetailPopup:null!==(n=a.useDetailPopup)&&void 0!==n&&n,isReadOnly:null!==(r=a.isReadOnly)&&void 0!==r&&r,week:yr(a.week),month:_r(a.month),gridSelection:br(a.gridSelection),usageStatistics:null===(o=a.usageStatistics)||void 0===o||o,eventFilter:null!==(i=a.eventFilter)&&void 0!==i?i:xr,timezone:wr(a.timezone)}}}function kr(e){return{setOptions:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e(ct((e=>{var n;t.gridSelection&&(t.gridSelection=br(t.gridSelection)),null!==(n=t.week)&&void 0!==n&&n.collapseDuplicateEvents&&(t.week.collapseDuplicateEvents=vr(t.week.collapseDuplicateEvents)),rn(e.options,t)})))}}}let Sr;function Cr(e){return{showSeeMorePopup:t=>e(ct((e=>{e.popup[Sr.SeeMore]=t,e.popup[Sr.Form]=null,e.popup[Sr.Detail]=null}))),showFormPopup:t=>e(ct((e=>{e.popup[Sr.Form]=t,e.popup[Sr.SeeMore]=null,e.popup[Sr.Detail]=null}))),showDetailPopup:(t,n)=>e(ct((e=>{e.popup[Sr.Detail]=t,e.popup[Sr.Form]=null,n||(e.popup[Sr.SeeMore]=null)}))),hideSeeMorePopup:()=>e(ct((e=>{e.popup[Sr.SeeMore]=null}))),hideFormPopup:()=>e(ct((e=>{e.popup[Sr.Form]=null}))),hideDetailPopup:()=>e(ct((e=>{e.popup[Sr.Detail]=null}))),hideAllPopup:()=>e(ct((e=>{e.popup[Sr.SeeMore]=null,e.popup[Sr.Form]=null,e.popup[Sr.Detail]=null})))}}!function(e){e.SeeMore="seeMore",e.Form="form",e.Detail="detail"}(Sr||(Sr={}));const Er=()=>{},Ir=/^auto$|^$|%/;function Mr(e,t){let n=e.style[t];if((!n||"auto"===n)&&document.defaultView){const r=document.defaultView.getComputedStyle(e,null);n=r?r[t]:null}return"auto"===n?null:n}function Tr(e){return gt()(e)?Ir.test(e):null===e}function Nr(e){const t=Mr(e,"width"),n=Mr(e,"height");if((Tr(t)||Tr(n))&&e.getBoundingClientRect){const{width:t,height:n}=e.getBoundingClientRect();return{width:t||e.offsetWidth,height:n||e.offsetHeight}}return{width:parseFloat(null!=t?t:"0"),height:parseFloat(null!=n?n:"0")}}const Or=("undefined"==typeof Element?Er:Element).prototype;Or.matches||Or.webkitMatchesSelector||Or.msMatchesSelector;function Pr(e){return e.replace(/<([^>]+)>/gi,"")}const Ar=60,Rr={milestone:e=>p(m,null,p("span",{className:yt("icon","ic-milestone")}),p("span",{style:{backgroundColor:e.backgroundColor}},Pr(e.title))),milestoneTitle:()=>p("span",{className:yt("left-content")},"Milestone"),task:e=>"#".concat(e.title),taskTitle:()=>p("span",{className:yt("left-content")},"Task"),alldayTitle:()=>p("span",{className:yt("left-content")},"All Day"),allday:e=>Pr(e.title),time(e){const{start:t,title:n}=e;return t?p("span",null,p("strong",null,kn(t,"HH:mm")),"Â ",p("span",null,Pr(n))):Pr(n)},goingDuration(e){const{goingDuration:t}=e,n=Math.floor(t/Ar),r=t%Ar;return"GoingTime ".concat(vn(n,2),":").concat(vn(r,2))},comingDuration(e){const{comingDuration:t}=e,n=Math.floor(t/Ar),r=t%Ar;return"ComingTime ".concat(vn(n,2),":").concat(vn(r,2))},monthMoreTitleDate(e){const{date:t,day:n}=e,r=yt("more-title-date"),o=yt("more-title-day"),i=pr(mr(n));return p(m,null,p("span",{className:r},t),p("span",{className:o},i))},monthMoreClose:()=>"",monthGridHeader(e){const t=parseInt(e.date.split("-")[2],10);return p("span",{className:yt("weekday-grid-date",{"weekday-grid-date-decorator":e.isToday})},t)},monthGridHeaderExceed:e=>p("span",{className:yt("weekday-grid-more-events")},e," more"),monthGridFooter:e=>"",monthGridFooterExceed:e=>"",monthDayName:e=>e.label,weekDayName(e){const t=yt("day-name__date"),n=yt("day-name__name");return p(m,null,p("span",{className:t},e.date),"Â Â ",p("span",{className:n},e.dayName))},weekGridFooterExceed:e=>"+".concat(e),collapseBtnTitle:()=>p("span",{className:yt("collapse-btn-icon")}),timezoneDisplayLabel(e){let{displayLabel:t,timezoneOffset:n}=e;if(Bt(t)&&jt(n)){const e=n<0?"-":"+",t=Math.abs(n/Ar),r=Math.abs(n%Ar);return"GMT".concat(e).concat(vn(t,2),":").concat(vn(r,2))}return t},timegridDisplayPrimaryTime(e){const{time:t}=e;return kn(t,"hh tt")},timegridDisplayTime(e){const{time:t}=e;return kn(t,"HH:mm")},timegridNowIndicatorLabel(e){const{time:t,format:n="HH:mm"}=e;return kn(t,n)},popupIsAllday:()=>"All day",popupStateFree:()=>"Free",popupStateBusy:()=>"Busy",titlePlaceholder:()=>"Subject",locationPlaceholder:()=>"Location",startDatePlaceholder:()=>"Start date",endDatePlaceholder:()=>"End date",popupSave:()=>"Save",popupUpdate:()=>"Update",popupEdit:()=>"Edit",popupDelete:()=>"Delete",popupDetailTitle(e){let{title:t}=e;return t},popupDetailDate(e){let{isAllday:t,start:n,end:r}=e;const o="YYYY.MM.DD",i="hh:mm tt",a="".concat(o," ").concat(i),l=kn(n,t?o:i),c=Tn(n,r)?i:a;return t?"".concat(l).concat(Tn(n,r)?"":" - ".concat(kn(r,o))):"".concat(kn(n,a)," - ").concat(kn(r,c))},popupDetailLocation(e){let{location:t}=e;return t},popupDetailAttendees(e){let{attendees:t=[]}=e;return t.join(", ")},popupDetailState(e){let{state:t}=e;return t||"Busy"},popupDetailRecurrenceRule(e){let{recurrenceRule:t}=e;return t},popupDetailBody(e){let{body:t}=e;return t}};function Lr(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{template:{...Rr,...e}}}function Hr(e){return{setTemplate:t=>e(ct((e=>{e.template={...e.template,...t}})))}}function Fr(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"week";const t=new nn;return t.setHours(0,0,0,0),{view:{currentView:e,renderDate:t}}}function zr(e){return{changeView:t=>e(ct((e=>{e.view.currentView=t}))),setRenderDate:t=>e(ct((e=>{e.view.renderDate=Cn(t)})))}}const Wr=At()(window)||!window.navigator?Q:ee;function Br(){const e=H(null);return{StoreProvider:function(t){let{children:n,store:r}=t;return p(e.Provider,{value:r,children:n})},useStore:function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object.is;const r=oe(e);if(Bt(r))throw new Error("StoreProvider is not found");const[,o]=J((e=>e+1),0),i=r.getState(),a=te(i),l=te(t),c=te(n),s=te(!1),u=te();let d;At()(u.current)&&(u.current=t(i));let f=!1;const p=a.current!==i||l.current!==t||c.current!==n||s.current;p&&(d=t(i),f=!n(u.current,d)),Wr((()=>{f&&(u.current=d),a.current=i,l.current=t,c.current=n,s.current=!1}));const h=te(i);return Wr((()=>{const e=()=>{try{const e=r.getState(),t=l.current(e);!c.current(u.current,t)&&(a.current=e,u.current=d,o())}catch(e){console.error("[toastui-calendar] failed to update state",null==e?void 0:e.message),s.current=!0,o()}},t=r.subscribe(e);return r.getState()!==h.current&&e(),t}),[]),f?d:u.current},useInternalStore:()=>{const t=oe(e);if(Bt(t))throw new Error("StoreProvider is not found");return ne((()=>t),[t])}}}function jr(e){let t;const n=new Set,r=e=>{const r=e(t);if(r!==t){const e=t;t={...t,...r},n.forEach((n=>n(t,e)))}},o=()=>t,i={setState:r,getState:o,subscribe:(e,r,o)=>{let i=e;if(r){let n=r(t);const a=null!=o?o:Object.is;i=()=>{const o=r(t);if(!a(n,o)){const t=n;n=o,e(n,t)}}}return n.add(i),()=>n.delete(i)},clearListeners:()=>n.clear()};return t=e(r,o,i),i}const Gr=e=>t=>({...Dr(e),...Lr(e.template),popup:{[Sr.SeeMore]:null,[Sr.Form]:null,[Sr.Detail]:null},layout:500,weekViewLayout:{lastPanelType:null,dayGridRows:{},selectedDuplicateEventCid:-1},...or(e.calendars),...Fr(e.defaultView),...lr(),gridSelection:{dayGridMonth:null,dayGridWeek:null,timeGrid:null,accumulated:{dayGridMonth:[]}},dispatch:{options:kr(t),popup:Cr(t),weekViewLayout:fr(t),calendar:ir(t),view:zr(t),dnd:cr(t),gridSelection:sr(t),template:Hr(t)}}),{StoreProvider:Ur,useStore:Yr,useInternalStore:Vr}=Br();function $r(e){return Yr(re((t=>e?t.dispatch[e]:t.dispatch),[e]))}function Xr(e){return t=>t[e]}Xr("popup");const qr=Xr("calendar"),Kr=Xr("weekViewLayout"),Zr=Xr("template"),Jr=Xr("view"),Qr=Xr("options"),eo=Xr("dnd");var to=r(4304),no=r.n(to);const ro="data-target-temp";function oo(e){var t;let{template:n,param:r,as:o="div"}=e;const i=Yr(Zr)[n];if(Bt(i))return null;const a=i(r);return gt()(a)?p(o,{className:yt("template-".concat(n)),dangerouslySetInnerHTML:{__html:(l=a,no().sanitize(l))}}):L(a,{className:"".concat(null!==(t=a.props.className)&&void 0!==t?t:""," ").concat(yt("template-".concat(n)))});var l}const io=H(null),ao=io.Provider,lo=()=>{const e=oe(io);if(!e)throw new Error("useEventBus must be used within a EventBusProvider");return e},co=e=>{var t,n,r,o,i;return null!==(t=null===(n=e.options)||void 0===n||null===(r=n.timezone)||void 0===r||null===(o=r.zones)||void 0===o||null===(i=o[0])||void 0===i?void 0:i.timezoneName)&&void 0!==t?t:"Local"},so=e=>{var t,n;return null===(t=e.options)||void 0===t||null===(n=t.timezone)||void 0===n?void 0:n.customOffsetCalculator},uo=e=>{var t;return null!==(t=e.options.timezone.zones)&&void 0!==t?t:[]};function fo(){const e=Yr(so),t=jt(e);return re((function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new nn;return r.tz(t?e(n,r.getTime()):n)}),[e,t])}function po(){const e=Yr(co),t=fo(),n=re((()=>t(e)),[e,t]);return[e,n]}function ho(e){let{dayName:t,style:n,type:r,theme:o}=e;const i=lo(),[,a]=po(),l=a(),{day:c}=t,s="week"===r?function(e){let{dayName:t,theme:n,today:r}=e;const{day:o,dateInstance:i}=t,a=Tn(r,i),l=!a&&i<r;return Ln(o)?n.common.holiday.color:l?null===(c=n.week)||void 0===c?void 0:c.pastDay.color:Hn(o)?n.common.saturday.color:a?null===(s=n.week)||void 0===s?void 0:s.today.color:n.common.dayName.color;var c,s}({dayName:t,theme:o,today:l}):function(e){let{dayName:t,theme:n}=e;const{day:r}=t;return Ln(r)?n.common.holiday.color:Hn(r)?n.common.saturday.color:n.common.dayName.color}({dayName:t,theme:o}),u="".concat(r,"DayName");return p("div",{className:yt("day-name-item",r),style:n},p("span",{className:yt({["holiday-".concat(mr(c))]:Rn(c)}),style:{color:s},onClick:()=>{(function(e,t){return"week"===e})(r)&&i.fire("clickDayName",{date:kn(t.dateInstance,"YYYY-MM-DD")})},"data-testid":"dayName-".concat(r,"-").concat(mr(c))},p(oo,{template:u,param:t})))}const mo=Xr("common"),go=(Xr("week"),Xr("month")),vo=e=>e.week.dayGridLeft,yo=e=>e.week.timeGridLeft,wo=e=>e.month.moreView,_o=e=>e.month.gridCell,bo={border:"1px solid #e5e5e5",backgroundColor:"white",holiday:{color:"#ff4040"},saturday:{color:"#333"},dayName:{color:"#333"},today:{color:"#fff"},gridSelection:{backgroundColor:"rgba(81, 92, 230, 0.05)",border:"1px solid #515ce6"}},xo={dayName:{borderLeft:"none",borderTop:"1px solid #e5e5e5",borderBottom:"1px solid #e5e5e5",backgroundColor:"inherit"},weekend:{backgroundColor:"inherit"},today:{color:"inherit",backgroundColor:"rgba(81, 92, 230, 0.05)"},pastDay:{color:"#bbb"},panelResizer:{border:"1px solid #e5e5e5"},dayGrid:{borderRight:"1px solid #e5e5e5",backgroundColor:"inherit"},dayGridLeft:{borderRight:"1px solid #e5e5e5",backgroundColor:"inherit",width:"72px"},timeGrid:{borderRight:"1px solid #e5e5e5"},timeGridLeft:{backgroundColor:"inherit",borderRight:"1px solid #e5e5e5",width:"72px"},timeGridLeftAdditionalTimezone:{backgroundColor:"white"},timeGridHalfHourLine:{borderBottom:"none"},timeGridHourLine:{borderBottom:"1px solid #e5e5e5"},nowIndicatorLabel:{color:"#515ce6"},nowIndicatorPast:{border:"1px dashed #515ce6"},nowIndicatorBullet:{backgroundColor:"#515ce6"},nowIndicatorToday:{border:"1px solid #515ce6"},nowIndicatorFuture:{border:"none"},pastTime:{color:"#bbb"},futureTime:{color:"#333"},gridSelection:{color:"#515ce6"}},Do={dayName:{borderLeft:"none",backgroundColor:"inherit"},holidayExceptThisMonth:{color:"rgba(255, 64, 64, 0.4)"},dayExceptThisMonth:{color:"rgba(51, 51, 51, 0.4)"},weekend:{backgroundColor:"inherit"},moreView:{border:"1px solid #d5d5d5",boxShadow:"0 2px 6px 0 rgba(0, 0, 0, 0.1)",backgroundColor:"white",width:null,height:null},gridCell:{headerHeight:31,footerHeight:null},moreViewTitle:{backgroundColor:"inherit"}};function ko(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{common:rn(bo,e)}}function So(e){return{setTheme:t=>{e(ct((e=>{e.common=rn(e.common,t.common),e.week=rn(e.week,t.week),e.month=rn(e.month,t.month)})))},setCommonTheme:t=>{e(ct((e=>{e.common=rn(e.common,t)})))},setWeekTheme:t=>{e(ct((e=>{e.week=rn(e.week,t)})))},setMonthTheme:t=>{e(ct((e=>{e.month=rn(e.month,t)})))}}}function Co(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{month:rn(Do,e)}}function Eo(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{week:rn(xo,e)}}const Io=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t=>({...ko(null==e?void 0:e.common),...Eo(null==e?void 0:e.week),...Co(null==e?void 0:e.month),dispatch:{...So(t)}})},{StoreProvider:Mo,useInternalStore:To,useStore:No}=Br();function Oo(){return No(go)}function Po(e){return{common:{saturday:e.common.saturday,holiday:e.common.holiday,today:e.common.today,dayName:e.common.dayName},week:{pastDay:e.week.pastDay,today:e.week.today,dayName:e.week.dayName}}}function Ao(e){return{common:{saturday:e.common.saturday,holiday:e.common.holiday,today:e.common.today,dayName:e.common.dayName},month:{dayName:e.month.dayName}}}function Ro(e){var t,n;let{dayNames:r,marginLeft:o=dt,rowStyleInfo:i,type:a="month"}=e;const l=No("month"===a?Ao:Po),{backgroundColor:c="white",borderLeft:s=null,...u}=null!==(t=null===(n=l[a])||void 0===n?void 0:n.dayName)&&void 0!==t?t:{},{borderTop:d=null,borderBottom:f=null}=u;return p("div",{"data-testid":"grid-header-".concat(a),className:yt("day-names",a),style:{backgroundColor:c,borderTop:d,borderBottom:f}},p("div",{className:yt("day-name-container"),style:{marginLeft:o}},r.map(((e,t)=>p(ho,{type:a,key:"dayNames-".concat(e.day),dayName:e,style:{width:wt(i[t].width),left:wt(i[t].left),borderLeft:s},theme:l})))))}r(3985);let Lo;function Ho(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=[];let r;return e.length?(n[0]=[e[0].cid()],e.slice(1).forEach(((o,i)=>{r=e.slice(0,i+1).reverse();const a=r.find((e=>o.collidesWith(e,t)));a?n.slice().reverse().some((e=>!!~e.indexOf(a.cid())&&(e.push(o.cid()),!0))):n.push([o.cid()])})),n):n}function Fo(e,t){let{length:n}=e;for(;n>0;)if(n-=1,!At()(e[n][t]))return n;return-1}function zo(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=[];return t.forEach((t=>{const o=[[]];t.forEach((t=>{const r=e.get(t);let i,a,l=0,c=!1;for(;!c;)a=Fo(o,l),-1===a?(o[0].push(r),c=!0):r.collidesWith(o[a][l],n)||(i=a+1,At()(o[i])&&(o[i]=[]),o[i][l]=r,c=!0),l+=1})),r.push(o)})),r}function Wo(e,t){return n=>{const r=n.getStarts();return!(n.getEnds()<e||r>t)}}function Bo(e,t,n,r){const o=En(e,t,_n).map((e=>kn(e,"YYYYMMDD")));n.forEach((e=>{e.forEach((e=>{e.forEach(((e,t)=>{if(!e)return;const n=kn(e.getStarts(),"YYYYMMDD"),i=En(Cn(e.getStarts()),An(e.getEnds()),_n).length;e.top=t,e.left=o.indexOf(n),e.width=i,null==r||r(e)}))}))}))}function jo(e,t,n){return n.getStarts()<e&&(n.exceedLeft=!0,n.renderStarts=new nn(e)),n.getEnds()>t&&(n.exceedRight=!0,n.renderEnds=new nn(t)),n}function Go(e,t,n){return n instanceof Zn?(n.each((n=>(jo(e,t,n),!0))),null):jo(e,t,n)}function Uo(e){const t=new Zn((e=>e.cid()));return e.each((function(e){t.add(new ln(e))})),t}function Yo(e){let{model:t}=e;return t.isAllday||t.hasMultiDates}function Vo(e){return!Yo(e)}function $o(e){e.top=e.top||0,e.top+=1}function Xo(e,t){const n=t.filter(Yo),r=t.filter(Vo).sort(cn.event.asc),o={};r.forEach((t=>{const r=kn(t.getStarts(),"YYYYMMDD");let i=o[r];At()(i)&&(i=o[r]=function(e,t,n){const r=[];return e[t].forEach((e=>{n.doWhenHas(e,(e=>{r.push(e.top)}))})),r.length>0?Math.max(...r):0}(e,r,n)),o[r]=t.top=i+1}))}function qo(e,t){const{start:n,end:r,andFilters:o=[],alldayFirstMode:i=!1}=t,{events:a,idsOfDay:l}=e,c=Zn.and(...[Wo(n,r)].concat(o)),s=Uo(a.filter(c));!function(e){e.each((e=>{const{model:t}=e,n=t.getStarts(),r=t.getEnds();t.hasMultiDates=!Tn(n,r),!t.isAllday&&t.hasMultiDates&&(e.renderStarts=Cn(n),e.renderEnds=An(r))}))}(s),function(e,t,n){n.each((n=>{(n.model.isAllday||n.model.hasMultiDates)&&Go(Cn(e),An(t),n)}))}(n,r,s);const u=s.sort(cn.event.asc),d=zo(s,Ho(u,false),false);return Bo(n,r,d,$o),i?Xo(l,s):function(e,t){const n=t.filter(Yo),r=t.filter(Vo).sort(cn.event.asc),o={};r.forEach((t=>{const r=kn(t.getStarts(),"YYYYMMDD");let i=o[r];if(At()(i)&&(i=o[r]=[],e[r].forEach((e=>{n.doWhenHas(e,(e=>{i.push(e.top)}))}))),i.indexOf(t.top)>=0){const e=Math.max(...i)+1;for(let n=1;n<=e&&(t.top=n,!(i.indexOf(t.top)<0));n+=1);}i.push(t.top)}))}(l,s),d}function Ko(e,t){return 0===e&&24===t?e=>e.sort(cn.event.asc):n=>{return n.filter((r=e,o=t,e=>{const t=e.getStarts(),n=e.getEnds(),i=t.getTime(),a=n.getTime(),l=t.getFullYear(),c=t.getMonth(),s=t.getDate(),u=new nn(l,c,s).setHours(r),d=new nn(l,c,s).setHours(o);return i>=u&&i<d||a>u&&a<=d||i<u&&a>u||a>d&&i<d})).sort(cn.event.asc);var r,o}}function Zo(e,t){const{start:n,end:r,uiModelTimeColl:o,hourStart:i,hourEnd:a}=t,l=function(e,t,n,r){const o={};return Qn(t,n).forEach((t=>{const n=kn(t,"YYYYMMDD"),i=e[n],a=o[n]=new Zn((e=>e.cid()));i&&i.length&&i.forEach((e=>{r.doWhenHas(e,(e=>{a.add(e)}))}))}),{}),o}(e,n,r,o),c={},s=Ko(i,a);return Object.entries(l).forEach((e=>{let[t,n]=e;const r=zo(n,Ho(s(n),true),true);c[t]=r})),c}function Jo(e,t,n){if(!n||!n.size)return[];!function(e){e.each((e=>{const{model:t}=e;t.hasMultiDates=!0,e.renderStarts=Cn(t.getStarts()),e.renderEnds=An(t.getEnds())}))}(n),Go(e,t,n);const r=n.sort(cn.event.asc),o=zo(n,Ho(r,true),true);return Bo(e,t,o),o}function Qo(e,t,n){const r=Math.max(e,...t);return Math.min(r,...n)}function ei(e,t,n){return t*n/e}function ti(e,t,n){return t<=e&&e<=n}!function(e){e.header="header",e.footer="footer"}(Lo||(Lo={}));const ni=22;function ri(e,t){e.forEach((e=>{e.forEach((e=>{e.forEach(((e,n)=>{t(e,n)}))}))}))}function oi(e,t){return n=>{let{top:r}=n;return e>=r*t}}function ii(e,t,n){return e.filter(function(e,t){return n=>{let{top:r}=n;return e<r*t}}(t,n)).length}function ai(e,t,n){const r=(e=>e.filter((e=>Rn(e.getDay()))).length)(e),o=e.length,i=r===o,a=n/(t&&!i?2*o-r:o),l=e.map((e=>{const n=e.getDay();return!t||i||Rn(n)?a:2*a})),c=l.reduce(((e,t,n)=>n?[...e,e[n-1]+l[n-1]]:[0]),[]);return{widthList:l,leftList:c}}function li(e,t,n){return e.reduce(((e,r,o)=>t<=o&&o<=n?e+r:e),0)}function ci(e,t){return t.findIndex((t=>e>=Cn(t)&&e<=An(t)))}const si=(e,t,n,r)=>{const{widthList:o}=ai(n,r,100);let i=0,a=n.length-1;return n.forEach(((n,r)=>{n<=e&&(i=r),n<=t&&(a=r)})),{width:li(o,i,a),left:i?li(o,0,i-1):0}};function ui(e,t,n){const{idsOfDay:r}=t,o=qo(t,{start:e[0],end:An(e[e.length-1])}),i=[];ri(o,(t=>{const r=t.model.cid();i[r]=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=e.getStarts(),o=e.getEnds(),{width:i,left:a}=si(r,o,t,n);return e.width=i,e.left=a,e}(t,e,n)}));const a=Object.keys(r).reduce(((e,t)=>{const n=r[t];return e[t]=n.map((e=>i[e])).filter((e=>!!e)),e}),{});return{uiModels:Object.values(i),gridDateEventModelMap:a}}const di=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return ri(e,(e=>{const r=e.getStarts(),o=e.getEnds(),{width:i,left:a}=si(r,o,t,n);e.width=i,e.left=a,e.top+=1})),fi(e)};function fi(e){return e.flatMap((e=>e.flatMap((e=>(e=>e.filter((e=>!!e)))(e)))))}const pi=(e,t,n)=>{let{narrowWeekend:r,hourStart:o,hourEnd:i,weekStartDate:a,weekEndDate:l}=n;const c=function(e,t){var n,r;const{start:o,end:i,panels:a,andFilters:l=[],options:c}=t,{events:s,idsOfDay:u}=e,d=null!==(n=null==c?void 0:c.hourStart)&&void 0!==n?n:0,f=null!==(r=null==c?void 0:c.hourEnd)&&void 0!==r?r:24,p=Zn.and(...[Wo(o,i)].concat(l)),h=Uo(s.filter(p)).groupBy(er);return a.reduce(((e,t)=>{const{name:n,type:r}=t;return Bt(h[n])?e:{...e,[n]:"daygrid"===r?Jo(o,i,h[n]):Zo(u,{start:o,end:i,uiModelTimeColl:h[n],hourStart:d,hourEnd:f})}}),{milestone:[],task:[],allday:[],time:{}})}(t,{start:a,end:l,panels:[{name:"milestone",type:"daygrid",show:!0},{name:"task",type:"daygrid",show:!0},{name:"allday",type:"daygrid",show:!0},{name:"time",type:"timegrid",show:!0}],andFilters:[],options:{hourStart:o,hourEnd:i}});return Object.keys(c).reduce(((t,n)=>{const o=c[n];return{...t,[n]:Array.isArray(o)?di(o,e,r):(i=o,Array.from(new Set(Object.values(i).reduce(((e,t)=>e.concat(...fi(t))),[]))))};var i}),{milestone:[],allday:[],task:[],time:[]})};function hi(e,t){let{workweek:n=!1,visibleWeeksCount:r=0,startDayOfWeek:o=0,isAlways6Weeks:i=!0}=t;const a=new nn(e),l=r>0,c=l?a:Fn(a),s=function(e,t){const n=In(e);return n.setDate(e.getDate()-t),n}(c,c.getDay()-o+(c.getDay()<o?7:0)),u=s.getDay(),d=function(e){const t=Fn(e);return t.setMonth(t.getMonth()+1),t.setDate(t.getDate()-1),t.setHours(23,59,59,999),t}(a).getDate(),f=Un(s,c),p=d+Math.abs(f);let h=6;return l?h=r:!1===i&&(h=Math.ceil(p/7)),ut()(0,h).map((e=>ut()(0,7).reduce(((t,r)=>{const o=7*e+r;if(!n||n&&!Rn((o+u)%7)){const e=Gn(s,o);t.push(e)}return t}),[])))}function mi(e,t){let{startDayOfWeek:n=pn.SUN,workweek:r}=t;const o=Cn(e),i=o.getDay()-n;return(i>=0?ut()(-i,7-i):ut()(-7-i,-i)).reduce(((e,t)=>{const n=Gn(o,t);return r&&Rn(n.getDay())||e.push(n),e}),[])}function gi(e,t){var n;const r=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=e.length,r=n>5&&t,o=r?100/(n-1):100/n;return e.map((e=>{const t=r&&Rn(e.getDay())?o/2:o;return{date:e,width:t}})).reduce(((e,t,n)=>{const r=e[n-1];return e.push({...t,left:0===n?0:r.left+r.width}),e}),[])}(e,null!==(n=t.narrowWeekend)&&void 0!==n&&n),{timeStep:o}=t,i=(t.hourEnd-t.hourStart)*o.length,a=100/i;let l=0;return{columns:r,rows:ut()(i).map(((e,n)=>{l=l===o.length?0:l;const r=t.hourStart+Math.floor(e/o.length),i="".concat(r,":").concat(0!==o[l]?o[l]:"00").padStart(5,"0"),c=(l===o.length-1?"".concat(r+1,":00"):"".concat(r,":").concat(o[l+1])).padStart(5,"0");return l+=1,{top:a*n,height:a,startTime:i,endTime:c}}))}}function vi(e){let{rowsCount:t,columnsCount:n,container:r,narrowWeekend:o=!1,startDayOfWeek:i=pn.SUN}=e;if(Bt(r))return()=>null;const a=ut()(i,i+n).map((e=>e%7)),l=o?a.filter((e=>Rn(e))).length:0;return function(e){const{left:i,top:c,width:s,height:u}=r.getBoundingClientRect(),[d,f]=function(e,t){let{clientX:n,clientY:r}=e,{left:o,top:i,clientLeft:a,clientTop:l}=t;return[n-o-a,r-i-l]}(e,{left:i,top:c,clientLeft:r.clientLeft,clientTop:r.clientTop});if(d<0||f<0||d>s||f>u)return null;const p=o?s/(n-l+1):s/n,h=a.map((e=>o&&Rn(e)?p/2:p)),m=[];h.forEach(((e,t)=>{0===t?m.push(0):m.push(m[t-1]+h[t-1])}));return{columnIndex:dn(m,(e=>d>=e)),rowIndex:(g=t,v=u,y=f,Qo(Math.floor(ei(v,g,y)),[0],[g-1]))};var g,v,y}}function yi(e){return e.common.gridSelection}function wi(e){let{type:t,gridSelectionData:n,weekDates:r,narrowWeekend:o}=e;const{backgroundColor:i,border:a}=No(yi),{startCellIndex:l,endCellIndex:c}=n,{left:s,width:u}=((e,t,n,r)=>{const{widthList:o}=ai(n,r,100);return{left:e?li(o,0,e-1):0,width:li(o,null!=e?e:0,t<0?n.length-1:t)}})(Math.min(l,c),Math.max(l,c),r,o),d={left:wt(s),width:wt(u),height:wt(100),backgroundColor:i,border:a};return u>0?p("div",{className:yt(t,"grid-selection"),style:d}):null}function _i(e,t,n){return{startColumnIndex:n?t.columnIndex:e.columnIndex,startRowIndex:n?t.rowIndex:e.rowIndex,endColumnIndex:n?e.columnIndex:t.columnIndex,endRowIndex:n?e.rowIndex:t.rowIndex}}const bi={sortSelection:(e,t)=>_i(e,t,e.columnIndex>t.columnIndex||e.columnIndex===t.columnIndex&&e.rowIndex>t.rowIndex),getDateFromCollection:(e,t)=>{const n=e;return[jn(n.columns[t.startColumnIndex].date,n.rows[t.startRowIndex].startTime),jn(n.columns[t.endColumnIndex].date,n.rows[t.endRowIndex].endTime)]},calculateSelection:function(e,t,n){if(Bt(e))return null;const{startColumnIndex:r,endColumnIndex:o,endRowIndex:i,startRowIndex:a}=e;if(!ti(t,r,o))return null;const l={startRowIndex:a,endRowIndex:i,isSelectingMultipleColumns:r!==o,isStartingColumn:t===r};return r<t&&t<o?(l.startRowIndex=0,l.endRowIndex=n):r!==o&&(r===t?l.endRowIndex=n:o===t&&(l.startRowIndex=0)),l}};const xi={sortSelection:(e,t)=>_i(e,t,e.rowIndex>t.rowIndex||e.rowIndex===t.rowIndex&&e.columnIndex>t.columnIndex),getDateFromCollection:(e,t)=>{const n=e;return[n[t.startRowIndex][t.startColumnIndex],n[t.endRowIndex][t.endColumnIndex]]},calculateSelection:function(e,t,n){if(!(jt(e)&&jt(t)&&jt(n)))return null;const{startRowIndex:r,startColumnIndex:o,endRowIndex:i,endColumnIndex:a}=e;if(!ti(t,Math.min(r,i),Math.max(r,i)))return null;let l=o,c=a;return r<t&&(l=0),i>t&&(c=n-1),{startCellIndex:l,endCellIndex:c}}};const Di={sortSelection:(e,t)=>_i(e,t,e.columnIndex>t.columnIndex),getDateFromCollection:(e,t)=>{const n=e;return[n[t.startColumnIndex],n[t.endColumnIndex]]},calculateSelection:function(e){return jt(e)?{startCellIndex:e.startColumnIndex,endCellIndex:e.endColumnIndex}:null}};function ki(e){return Di.calculateSelection(e.gridSelection.dayGridWeek)}function Si(e){let{weekDates:t,narrowWeekend:n}=e;const r=Yr(ki);return Bt(r)?null:p(wi,{type:"allday",gridSelectionData:r,weekDates:t,narrowWeekend:n})}function Ci(e,t){for(var n in t)e[n]=t[n];return e}function Ei(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function Ii(e){this.props=e}function Mi(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:Ei(this.props,e)}function r(t){return this.shouldComponentUpdate=n,p(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Ii.prototype=new g).isPureReactComponent=!0,Ii.prototype.shouldComponentUpdate=function(e,t){return Ei(this.props,e)||Ei(this.state,t)};var Ti=t.__b;t.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Ti&&Ti(e)};var Ni="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Oi(e){function t(t){var n=Ci({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=Ni,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Pi=t.__e;t.__e=function(e,t,n,r){if(e.then)for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t);Pi(e,t,n,r)};var Ai=t.unmount;function Ri(){this.__u=0,this.t=null,this.__b=null}function Li(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Hi(){this.u=null,this.o=null}t.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),Ai&&Ai(e)},(Ri.prototype=new g).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var o=Li(r.__v),i=!1,a=function(){i||(i=!0,n.__R=null,o?o(l):l())};n.__R=a;var l=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=function e(t,n,r){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return e(t,n,r)})),t.__c&&t.__c.__P===n&&(t.__e&&r.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=r)),t}(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},c=!0===t.__h;r.__u++||c||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(a,a)},Ri.prototype.componentWillUnmount=function(){this.t=[]},Ri.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function e(t,n,r){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),t.__c.__H=null),null!=(t=Ci({},t)).__c&&(t.__c.__P===r&&(t.__c.__P=n),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return e(t,n,r)}))),t}(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&p(m,null,e.fallback);return o&&(o.__h=null),[p(m,null,t.__a?null:e.children),o]};var Fi=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function zi(e){return this.getChildContext=function(){return e.context},e.children}function Wi(e){var t=this,n=e.i;t.componentWillUnmount=function(){R(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),e.__v?(t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(e){this.childNodes.push(e),t.i.appendChild(e)},insertBefore:function(e,n){this.childNodes.push(e),t.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.i.removeChild(e)}}),R(p(zi,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Bi(e,t){var n=p(Wi,{__v:e,i:t});return n.containerInfo=t,n}(Hi.prototype=new g).__a=function(e){var t=this,n=Li(t.__v),r=t.o.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),Fi(t,e,r)):o()};n?n(i):i()}},Hi.prototype.render=function(e){this.u=null,this.o=new Map;var t=D(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},Hi.prototype.componentDidUpdate=Hi.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){Fi(e,n,t)}))};var ji="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Gi=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|shape|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Ui="undefined"!=typeof document,Yi=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};g.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(g.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var Vi=t.event;function $i(){}function Xi(){return this.cancelBubble}function qi(){return this.defaultPrevented}t.event=function(e){return Vi&&(e=Vi(e)),e.persist=$i,e.isPropagationStopped=Xi,e.isDefaultPrevented=qi,e.nativeEvent=e};var Ki={configurable:!0,get:function(){return this.class}},Zi=t.vnode;t.vnode=function(e){var t=e.type,n=e.props,r=n;if("string"==typeof t){var o=-1===t.indexOf("-");for(var i in r={},n){var a=n[i];Ui&&"children"===i&&"noscript"===t||"value"===i&&"defaultValue"in n&&null==a||("defaultValue"===i&&"value"in n&&null==n.value?i="value":"download"===i&&!0===a?a="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+t)&&!Yi(n.type)?i="oninput":/^onfocus$/i.test(i)?i="onfocusin":/^onblur$/i.test(i)?i="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(i)?i=i.toLowerCase():o&&Gi.test(i)?i=i.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===a&&(a=void 0),/^oninput$/i.test(i)&&(i=i.toLowerCase(),r[i]&&(i="oninputCapture")),r[i]=a)}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=D(n.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==t&&null!=r.defaultValue&&(r.value=D(n.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r,n.class!=n.className&&(Ki.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",Ki))}e.$$typeof=ji,Zi&&Zi(e)};var Ji=t.__r;t.__r=function(e){Ji&&Ji(e),e.__c};function Qi(e){return!!e.__k&&(R(null,e),!0)}function ea(e){let{index:t,exceedCount:n,isClicked:r,onClickExceedCount:o}=e;const i={display:r?"none":""};return n&&!r?p("span",{className:yt("weekday-exceed-in-week"),onClick:()=>o(t),style:i},p(oo,{template:"weekGridFooterExceed",param:n})):null}function ta(e){let{isClicked:t,isClickedIndex:n,onClickCollapseButton:r}=e;return t&&n?p("span",{className:yt("weekday-exceed-in-week"),onClick:r},p(oo,{template:"collapseBtnTitle"})):null}function na(e){let{width:t,left:n,index:r,exceedCount:o,isClicked:i,onClickExceedCount:a,isClickedIndex:l,onClickCollapseButton:c,isLastCell:s}=e;const{borderRight:u,backgroundColor:d}=No(re((e=>e.week.dayGrid),[])),f={width:t,left:n,borderRight:s?"none":u,backgroundColor:d};return p("div",{className:yt("panel-grid"),style:f},p(ea,{index:r,exceedCount:o,isClicked:i,onClickExceedCount:a}),p(ta,{isClickedIndex:l,isClicked:i,onClickCollapseButton:c}))}const ra=Mi((function(e){let{uiModels:t,weekDates:n,narrowWeekend:r,height:o,clickedIndex:i,isClickedCount:a,onClickExceedCount:l,onClickCollapseButton:c}=e;const{widthList:s,leftList:u}=ai(n,r,100),d=n.length-1;return p(m,null,n.map(((e,n)=>{const r=wt(s[n]),f=wt(u[n]);var h;const m=ii(t.filter((h=e,e=>{const t=Cn(e.getStarts()),n=Cn(e.getEnds());return t<=h&&h<=n})),o,ni+2),g=n===i,v=n===d;return p(na,{key:"panel-grid-".concat(e.getDate()),width:r,left:f,index:n,exceedCount:m,isClicked:a,onClickExceedCount:l,isClickedIndex:g,onClickCollapseButton:c,isLastCell:v})})))}));r(7694);function oa(e){let{onMouseDown:t}=e;return p("span",{className:"".concat(yt("weekday-resize-handle")," ").concat(yt("handle-y")),onMouseDown:t,"data-testid":"horizontal-event-resize-icon"},p("i",{className:"".concat(yt("icon")," ").concat(yt("ic-handle-y"))}))}const ia=H(null),aa=ia.Provider,la=()=>{const e=oe(ia);if(At()(e))throw new Error("LayoutContainerProvider is not found");return e},ca="panelResizer",sa=(e,t)=>"event/".concat(e,"/resize/").concat(t),ua=(e,t)=>"event/".concat(e,"/move/").concat(t),da=e=>"gridSelection/".concat(e);function fa(e){return Yr(re((t=>t.calendar.calendars.find((t=>t.id===e))),[e]))}function pa(e){var t;const n=fa(null!==(t=null==e?void 0:e.calendarId)&&void 0!==t?t:null);return ne((()=>({color:null==n?void 0:n.color,borderColor:null==n?void 0:n.borderColor,backgroundColor:null==n?void 0:n.backgroundColor,dragBackgroundColor:null==n?void 0:n.dragBackgroundColor})),[n])}let ha;!function(e){e.ESCAPE="Escape"}(ha||(ha={}));const ma={[ha.ESCAPE]:27};function ga(e,t){const n=Vr(),r=te(e),o=te(t);Q((()=>{r.current=e,o.current=t}),[e,t]),Q((()=>n.subscribe((e=>o.current(e)),(e=>r.current(e)))),[e,n])}function va(e,t){return e.key?e.key===t:e.keyCode===ma[t]}function ya(e){return 0===e}function wa(e,t,n,r){return Math.abs(e-n)>=3||Math.abs(t-r)>=3}function _a(e){let{onInit:t,onDragStart:n,onDrag:r,onMouseUp:o,onPressESCKey:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{initDrag:a,setDragging:l,cancelDrag:c,reset:s}=$r("dnd"),u=Vr(),d=te(u.getState().dnd);ga(eo,(e=>{d.current=e}));const[f,p]=Z(!1),h=te(null),m=te(null),g=te(null),v=re((n=>{ya(n.button)&&(n.currentTarget&&(n.currentTarget.ondragstart=function(){return!1}),n.preventDefault(),p(!0),a({draggingItemType:e,initX:n.clientX,initY:n.clientY}),null==t||t(n,d.current))}),[t,e,a]),y=re((t=>{const{initX:o,initY:i,draggingState:a,draggingItemType:c}=d.current;if(c!==e)return p(!1),void s();if(!jt(o)||!jt(i)||wa(o,i,t.clientX,t.clientY)){if(a<=ar.INIT)return l({x:t.clientX,y:t.clientY}),void(null==n||n(t,d.current));l({x:t.clientX,y:t.clientY}),null==r||r(t,d.current)}}),[e,r,n,l,s]),w=re((e=>{e.stopPropagation(),f&&(null==o||o(e,d.current),p(!1),s())}),[f,o,s]),_=re((e=>{va(e,ha.ESCAPE)&&(p(!1),c(),null==i||i(e,d.current))}),[i,c]);return Q((()=>{h.current=y,m.current=w,g.current=_}),[_,y,w]),Q((()=>{const e=e=>{var t;return null===(t=h.current)||void 0===t?void 0:t.call(h,e)},t=e=>{var t;return null===(t=m.current)||void 0===t?void 0:t.call(m,e)},n=e=>{var t;return null===(t=g.current)||void 0===t?void 0:t.call(g,e)};return f?(document.addEventListener("mousemove",e),document.addEventListener("mouseup",t),document.addEventListener("keydown",n),()=>{document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",t),document.removeEventListener("keydown",n)}):Er}),[f,s]),v}function ba(e,t){return e?t:void 0}function xa(e){return{vertical:e?5:2,horizontal:8}}function Da(e,t){const n=e?0:"2px",r=t?0:"2px";return"".concat(n," ").concat(r," ").concat(r," ").concat(n)}function ka(e){let{model:t}=e;const n=t.calendarId?"".concat(t.calendarId,"-"):"",r=t.id?"".concat(t.id,"-"):"";return"".concat(n).concat(r).concat(t.title)}const Sa={eventBody:yt("weekday-event"),eventTitle:yt("weekday-event-title"),eventDot:yt("weekday-event-dot"),moveEvent:yt("dragging--move-event"),resizeEvent:yt("dragging--resize-horizontal-event")};function Ca(e){let{flat:t=!1,uiModel:n,eventHeight:r,headerHeight:o,resizingWidth:i=null,movingLeft:a=null}=e;const{currentView:l}=Yr(Jr),{useDetailPopup:c,isReadOnly:s}=Yr(Qr),{setDraggingEventUIModel:u}=$r("dnd"),{showDetailPopup:d}=$r("popup"),f=la(),h=lo(),m=pa(n.model),[g,v]=Z(!1),y=te(null),{isReadOnly:w,id:_,calendarId:b}=n.model,x=jt(i)||jt(a),D=!s&&!w&&!x,k=e=>{u(n),null==f||f.classList.add(e)},S=e=>{v(!1),null==f||f.classList.remove(e)};ga(eo,(e=>{let{draggingEventUIModel:t,draggingState:r}=e;r!==ar.DRAGGING||(null==t?void 0:t.cid())!==n.cid()||x?v(!1):v(!0)})),Q((()=>{x||h.fire("afterRenderEvent",n.model.toEventObject())}),[]);const C=_a(sa("dayGrid","".concat(n.cid())),{onDragStart:()=>k(Sa.resizeEvent),onMouseUp:()=>S(Sa.resizeEvent),onPressESCKey:()=>S(Sa.resizeEvent)}),E=_a(ua("dayGrid","".concat(n.cid())),{onDragStart:()=>{D&&k(Sa.moveEvent)},onMouseUp:(e,r)=>{let{draggingState:o}=r;S(Sa.moveEvent);const i=o<=ar.INIT;i&&c&&y.current&&d({event:n.model,eventRect:y.current.getBoundingClientRect()},t),i&&h.fire("clickEvent",{event:n.model.toEventObject(),nativeEvent:e})},onPressESCKey:()=>S(Sa.moveEvent)}),I=!g&&"month"===l&&"time"===n.model.category&&Tn(n.model.start,n.model.end),M=!D||t||g||n.exceedRight,T=function(e){let{flat:t,uiModel:n,resizingWidth:r,movingLeft:o,eventHeight:i,headerHeight:a}=e;const{top:l,left:c,width:s,model:u}=n,d=xa(t),f=t?{}:{width:r||wt(s),left:wt(null!=o?o:c),top:(l-1)*(i+d.vertical)+a,position:"absolute"};return Object.assign(f,u.customStyle)}({uiModel:n,eventHeight:r,headerHeight:o,flat:t,movingLeft:a,resizingWidth:i}),N=function(e){let{uiModel:t,flat:n,eventHeight:r,isDraggingTarget:o,calendarColor:i}=e;const{exceedLeft:a,exceedRight:l}=t,{color:c,backgroundColor:s,dragBackgroundColor:u,borderColor:d}=xt(t,i),f={color:c,backgroundColor:o?u:s,borderLeft:a?"none":"3px solid ".concat(d),borderRadius:Da(a,l),overflow:"hidden",height:r,lineHeight:_t(r),opacity:o?.5:1},p=xa(n);return n?{marginTop:p.vertical,...f}:{marginLeft:a?0:p.horizontal,marginRight:l?0:p.horizontal,...f}}({uiModel:n,flat:t,eventHeight:r,isDraggingTarget:g,calendarColor:m});return p("div",{className:yt("weekday-event-block",{"weekday-exceed-left":n.exceedLeft,"weekday-exceed-right":n.exceedRight}),style:T,"data-testid":ba(D,ka(n)),"data-calendar-id":b,"data-event-id":_,ref:y},p("div",{className:Sa.eventBody,style:{...N,backgroundColor:I?null:N.backgroundColor,borderLeft:I?null:N.borderLeft},onMouseDown:e=>{e.stopPropagation(),E(e)}},I?p("span",{className:Sa.eventDot,style:{backgroundColor:N.backgroundColor}}):null,p("span",{className:Sa.eventTitle},p(oo,{template:n.model.category,param:n.model})),M?null:p(oa,{onMouseDown:e=>{e.stopPropagation(),D&&C(e)}})))}function Ea(e,t){const n=te(e);Q((()=>{n.current=e}),[e]),Q((()=>{t&&n.current()}),[t])}function Ia(e){const[t,n]=Z(null);ga(eo,(t=>{if(jt(t.x)&&jt(t.y)){const r=e({clientX:t.x,clientY:t.y});r&&n(r)}}));return[t,re((()=>n(null)),[])]}function Ma(e,t){const[n,r]=Z(!1),[o,i]=Z(!1),[a,l]=Z(null);ga(eo,(n=>{let{draggingItemType:o,draggingEventUIModel:c,draggingState:s}=n;const u=((e,t,n)=>{return Bt(e)?null:(r=e,new RegExp("^event/".concat(t,"/").concat(n,"/\\d+$")).test(r)?un(e.split("/")):null);var r})(o,e,t),d=Number(u)===(null==c?void 0:c.cid()),f=s===ar.IDLE,p=s===ar.CANCELED;Bt(a)&&d&&l(c),jt(a)&&(f||p)&&(r(!0),i(p))}));return{isDraggingEnd:n,isDraggingCanceled:o,draggingEvent:a,clearDraggingEvent:()=>{l(null),r(!1),i(!1)}}}function Ta(e){let{rowStyleInfo:t,gridPositionFinder:n}=e;const{movingEvent:r,movingLeft:o}=function(e){let{rowStyleInfo:t,gridPositionFinder:n}=e;const r=lo(),{isDraggingEnd:o,isDraggingCanceled:i,draggingEvent:a,clearDraggingEvent:l}=Ma("dayGrid","move"),c=te(null),[s,u]=Ia(n),{columnIndex:d}=null!=s?s:{},f=ne((()=>Bt(a)?null:t.findIndex((e=>{let{left:t}=e;return t===a.left}))),[t,a]),p=ne((()=>{if(Bt(d)||Bt(c.current)||Bt(f))return null;const e=f+d-c.current;return e<0?-t[-e].left:t[e].left}),[d,t,f]);return Q((()=>{Bt(c.current)&&jt(d)&&(c.current=d)}),[d]),Ea((()=>{if(!i&&jt(a)&&jt(d)&&jt(p)&&d!==c.current&&jt(c.current)){const e=d-c.current,t=new nn(a.model.getStarts()),n=new nn(a.model.getEnds());t.addDate(e),n.addDate(e),r.fire("beforeUpdateEvent",{event:a.model.toEventObject(),changes:{start:t,end:n}})}l(),u(),c.current=null}),o),ne((()=>({movingEvent:a,movingLeft:p})),[p,a])}({rowStyleInfo:t,gridPositionFinder:n});return Bt(r)?null:p(Ca,{uiModel:r,eventHeight:ni,headerHeight:0,movingLeft:o})}function Na(e){let{weekDates:t,gridColWidthMap:n,gridPositionFinder:r}=e;const o=lo(),{isDraggingEnd:i,isDraggingCanceled:a,draggingEvent:l,clearDraggingEvent:c}=Ma("dayGrid","resize"),[s,u]=Ia(r),{columnIndex:d}=null!=s?s:{},f=ne((()=>{return l?(n=t,{start:ci((e=l).getStarts(),n),end:ci(e.getEnds(),n)}):{start:-1,end:-1};var e,n}),[t,l]),p=ne((()=>f.start>-1&&jt(d)?n[f.start][d]:null),[d,n,f.start]);return Ea((()=>{if(!a&&jt(l)&&jt(d)&&f.start<=d&&f.end!==d){const e=t[d];o.fire("beforeUpdateEvent",{event:l.model.toEventObject(),changes:{end:e}})}u(),c()}),i),ne((()=>({resizingEvent:l,resizingWidth:p})),[p,l])}function Oa(e){let{weekDates:t,gridColWidthMap:n,gridPositionFinder:r}=e;const{resizingEvent:o,resizingWidth:i}=Na({weekDates:t,gridColWidthMap:n,gridPositionFinder:r});return Bt(o)?null:p(Ca,{uiModel:o,eventHeight:ni,headerHeight:0,resizingWidth:i})}function Pa(){const[e,t]=Z(null);return[e,re((e=>{e&&t(e)}),[])]}function Aa(e,t){const[n,r]=Z(0),[o,i]=Z(!1),{updateDayGridRowHeight:a}=$r("weekViewLayout");return{clickedIndex:n,isClickedCount:o,onClickExceedCount:re((n=>{i(!0),r(n),a({rowName:t,height:(e+1)*ni})}),[t,e,a]),onClickCollapseButton:re((()=>{i(!1),a({rowName:t,height:pt})}),[t,a])}}function Ra(e){let{onClick:t,onDblClick:n,delay:r=300}=e;const o=te(Er),i=e=>{o.current=e},a=()=>{o.current()};Q((()=>a),[]);return[e=>{a(),function(e,t,n){let r;const o=i=>{if(r||(r=i),i-r>=t)return e(),void n(Er);const a=requestAnimationFrame(o);n((()=>cancelAnimationFrame(a)))},i=requestAnimationFrame(o);n((()=>cancelAnimationFrame(i)))}(t.bind(null,e),r,i)},e=>{a(),n(e)}]}const La={dayGridMonth:"month",dayGridWeek:"allday",timeGrid:"time"};function Ha(e){let{type:t,selectionSorter:n,dateGetter:r,dateCollection:o,gridPositionFinder:i}=e;const{useFormPopup:a,gridSelection:l}=Yr(Qr),{enableDblClick:c,enableClick:s}=l,{setGridSelection:u,addGridSelection:d,clearAll:f}=$r("gridSelection"),{hideAllPopup:p,showFormPopup:h}=$r("popup"),m=lo(),g=la(),[v,y]=Z(null),[w,_]=Z(null),b=te(!1),x=te(null);ga(re((e=>e.gridSelection[t]),[t]),(e=>{x.current=e})),ga(eo,(e=>{let{draggingState:t,draggingItemType:n}=e;b.current=n===D&&t>=ar.INIT}));const D=da(t),k=e=>{const r=i(e);jt(w)&&jt(r)&&u(t,n(w,r))},[S,C]=Ra({onClick:e=>{s&&E(e,!0)},onDblClick:e=>{c&&E(e,!0)},delay:250}),E=(e,n)=>{if(n&&k(e),jt(x.current)){var i;const[n,l]=function(e,t){return e<t?[e,t]:[t,e]}(...r(o,x.current));if(a&&jt(v)){const r={top:(e.clientY+v.y)/2,left:(e.clientX+v.x)/2};h({isCreationPopup:!0,title:"",location:"",start:n,end:l,isAllday:"timeGrid"!==t,isPrivate:!1,popupArrowPointPosition:r,close:f})}const c=".".concat(yt(La[t]),".").concat(yt("grid-selection")),s=Array.from(null!==(i=null==g?void 0:g.querySelectorAll(c))&&void 0!==i?i:[]);m.fire("selectDateTime",{start:n.toDate(),end:l.toDate(),isAllday:"timeGrid"!==t,nativeEvent:e,gridSelectionElements:s})}},I=re((()=>{y(null),_(null),u(t,null)}),[u,t]),M=_a(D,{onInit:e=>{a&&(y({x:e.clientX,y:e.clientY}),p());const n=i(e);jt(n)&&_(n),a||d(t,x.current)},onDragStart:e=>{k(e)},onDrag:e=>{b.current&&k(e)},onMouseUp:(e,t)=>{let{draggingState:n}=t;e.stopPropagation();const r=n<=ar.INIT;r?(e=>{const t=e.detail<=1;(s||c&&!t)&&(s?t?S(e):C(e):E(e,!0))})(e):E(e,r)},onPressESCKey:I});return Q((()=>I),[I]),M}function Fa(e){let{events:t,weekDates:n,height:r=pt,options:o={},rowStyleInfo:i,gridColWidthMap:a}=e;const{isReadOnly:l}=Yr(Qr),c=No(vo),[s,u]=Pa(),{narrowWeekend:d=!1,startDayOfWeek:f=pn.SUN}=o,h=ne((()=>Math.max(0,...t.map((e=>{let{top:t}=e;return t})))),[t]),g=ne((()=>vi({container:s,rowsCount:1,columnsCount:n.length,narrowWeekend:d,startDayOfWeek:f})),[s,n.length,d,f]),{clickedIndex:v,isClickedCount:y,onClickExceedCount:w,onClickCollapseButton:_}=Aa(h,"allday"),b=ne((()=>t.filter(oi(r,ni+2)).map((e=>p(Ca,{key:"allday-DayEvent-".concat(e.cid()),uiModel:e,eventHeight:ni,headerHeight:0})))),[t,r]),x=Ha({type:"dayGridWeek",gridPositionFinder:g,dateCollection:n,selectionSorter:Di.sortSelection,dateGetter:Di.getDateFromCollection});return p(m,null,p("div",{className:yt("panel-title"),style:c},p(oo,{template:"alldayTitle",param:"alldayTitle"})),p("div",{className:yt("allday-panel"),ref:u,onMouseDown:e=>{const t=e.target;!l&&t.classList.contains(yt("panel-grid"))&&x(e)}},p("div",{className:yt("panel-grid-wrapper")},p(ra,{uiModels:t,weekDates:n,narrowWeekend:d,height:r,clickedIndex:v,isClickedCount:y,onClickExceedCount:w,onClickCollapseButton:_})),p("div",{className:yt("panel-allday-events")},b),p(Oa,{weekDates:n,gridPositionFinder:g,gridColWidthMap:a}),p(Ta,{rowStyleInfo:i,gridPositionFinder:g}),p(Si,{weekDates:n,narrowWeekend:d})))}function za(e){let{events:t,weekDates:n,category:r,height:o=pt,options:i={}}=e;const a=No(vo),l=ne((()=>Math.max(0,...t.map((e=>{let{top:t}=e;return t})))),[t]),{narrowWeekend:c=!1}=i,s="".concat(r,"Title"),{clickedIndex:u,isClickedCount:d,onClickExceedCount:f,onClickCollapseButton:h}=Aa(l,r),g=ne((()=>t.filter(oi(o,ni+2)).map((e=>p(Ca,{key:"".concat(r,"-DayEvent-").concat(e.cid()),uiModel:e,eventHeight:ni,headerHeight:0})))),[r,t,o]);return p(m,null,p("div",{className:yt("panel-title"),style:a},p(oo,{template:s,param:r})),p("div",{className:yt("allday-panel")},p("div",{className:yt("panel-grid-wrapper")},p(ra,{uiModels:t,weekDates:n,narrowWeekend:c,height:o,clickedIndex:u,isClickedCount:d,onClickExceedCount:f,onClickCollapseButton:h})),p("div",{className:yt("panel-".concat(r,"-events"))},g)))}const Wa={detailItem:yt("detail-item"),detailItemIndent:yt("detail-item","detail-item-indent"),detailItemSeparate:yt("detail-item","detail-item-separate"),sectionDetail:yt("popup-section","section-detail"),content:yt("content"),locationIcon:yt("icon","ic-location-b"),repeatIcon:yt("icon","ic-repeat-b"),userIcon:yt("icon","ic-user-b"),stateIcon:yt("icon","ic-state-b"),calendarDotIcon:yt("icon","calendar-dot")};function Ba(e){var t,n;let{event:r}=e;const{location:o,recurrenceRule:i,attendees:a,state:l,calendarId:c,body:s}=r,u=fa(c);return p("div",{className:Wa.sectionDetail},o&&p("div",{className:Wa.detailItem},p("span",{className:Wa.locationIcon}),p("span",{className:Wa.content},p(oo,{template:"popupDetailLocation",param:r,as:"span"}))),i&&p("div",{className:Wa.detailItem},p("span",{className:Wa.repeatIcon}),p("span",{className:Wa.content},p(oo,{template:"popupDetailRecurrenceRule",param:r,as:"span"}))),a&&p("div",{className:Wa.detailItemIndent},p("span",{className:Wa.userIcon}),p("span",{className:Wa.content},p(oo,{template:"popupDetailAttendees",param:r,as:"span"}))),l&&p("div",{className:Wa.detailItem},p("span",{className:Wa.stateIcon}),p("span",{className:Wa.content},p(oo,{template:"popupDetailState",param:r,as:"span"}))),u&&p("div",{className:Wa.detailItem},p("span",{className:Wa.calendarDotIcon,style:{backgroundColor:null!==(t=null==u?void 0:u.backgroundColor)&&void 0!==t?t:""}}),p("span",{className:Wa.content},null!==(n=null==u?void 0:u.name)&&void 0!==n?n:"")),s&&p("div",{className:Wa.detailItemSeparate},p("span",{className:Wa.content},p(oo,{template:"popupDetailBody",param:r,as:"span"}))))}const ja={sectionHeader:yt("popup-section","section-header"),content:yt("content"),eventTitle:yt("event-title")};function Ga(e){let{event:t}=e;return p("div",{className:ja.sectionHeader},p("div",{className:ja.eventTitle},p(oo,{template:"popupDetailTitle",param:t,as:"span"})),p("div",{className:ja.content},p(oo,{template:"popupDetailDate",param:t,as:"span"})))}const Ua=yt("see-more-popup-slot"),Ya=yt("event-form-popup-slot"),Va=yt("event-detail-popup-slot"),$a=["isPrivate","isAllday","isPending","isFocused","isVisible","isReadOnly"];let Xa,qa;!function(e){e.right="right",e.left="left"}(Xa||(Xa={})),function(e){e.top="top",e.bottom="bottom"}(qa||(qa={}));const Ka=H(null);function Za(e){let{children:t}=e;const[n,r]=Pa(),[o,i]=Pa(),[a,l]=Pa(),[c,s]=Pa(),u={container:n,seeMorePopupSlot:o,formPopupSlot:a,detailPopupSlot:c};return p(Ka.Provider,{value:u},t,p("div",{ref:r,className:yt("floating-layer")},p("div",{ref:i,className:Ua}),p("div",{ref:l,className:Ya}),p("div",{ref:s,className:Va})))}const Ja=e=>{var t;const n=oe(Ka);if(At()(n))throw new Error("FloatingLayerProvider is not found");return null!==(t=null==n?void 0:n[e])&&void 0!==t?t:null};function Qa(e,t,n){return e+n.height>t.top+t.height}function el(e,t,n){return e+n.width>t.left+t.width}const tl=e=>e.popup[Sr.Form],nl=e=>e.popup[Sr.Detail],rl=e=>e.popup[Sr.SeeMore],ol={popupContainer:yt("popup-container"),detailContainer:yt("detail-container"),topLine:yt("popup-top-line"),border:yt("popup-arrow-border"),fill:yt("popup-arrow-fill"),sectionButton:yt("popup-section","section-button"),content:yt("content"),editIcon:yt("icon","ic-edit"),deleteIcon:yt("icon","ic-delete"),editButton:yt("edit-button"),deleteButton:yt("delete-button"),verticalLine:yt("vertical-line")};function il(){const{useFormPopup:e}=Yr(Qr),t=Yr(nl),{event:n,eventRect:r}=null!=t?t:{},{showFormPopup:o,hideDetailPopup:i}=$r("popup"),a=pa(n),l=la(),c=Ja("detailPopupSlot"),s=lo(),u=te(null),[d,f]=Z({}),[h,m]=Z(0),[g,v]=Z(Xa.left),y=ne((()=>yt("popup-arrow",{right:g===Xa.right,left:g===Xa.left})),[g]);if(ee((()=>{if(u.current&&r&&l){const e=l.getBoundingClientRect(),t=u.current.getBoundingClientRect(),[n,o]=function(e,t,n){let r=e.top+e.height/2-n.height/2,o=e.left+e.width;return Qa(r,t,n)&&(r=t.top+t.height-n.height),el(o,t,n)&&(o=e.left-n.width),[Math.max(r,t.top)+window.scrollY,Math.max(o,t.left)+window.scrollX]}(r,e,t),{top:i,direction:a}=function(e,t,n){return{top:e.top+e.height/2+window.scrollY,direction:e.left+e.width+n.width>t.left+t.width?Xa.right:Xa.left}}(r,e,t);f({top:n,left:o}),m(i-n-8),v(a)}}),[r,l]),Bt(n)||Bt(r)||Bt(c))return null;const{title:w="",isAllday:_=!1,start:b=new nn,end:x=new nn,location:D,state:k,isReadOnly:S,isPrivate:C}=n,E={top:r.top+r.height/2,left:r.left+r.width/2};return Bi(p("div",{role:"dialog",className:ol.popupContainer,ref:u,style:d},p("div",{className:ol.detailContainer},p(Ga,{event:n}),p(Ba,{event:n}),!S&&p("div",{className:ol.sectionButton},p("button",{type:"button",className:ol.editButton,onClick:()=>{e?o({isCreationPopup:!1,event:n,title:w,location:D,start:b,end:x,isAllday:_,isPrivate:C,eventState:k,popupArrowPointPosition:E}):s.fire("beforeUpdateEvent",{event:n.toEventObject(),changes:{}})}},p("span",{className:ol.editIcon}),p("span",{className:ol.content},p(oo,{template:"popupEdit",as:"span"}))),p("div",{className:ol.verticalLine}),p("button",{type:"button",className:ol.deleteButton,onClick:()=>{s.fire("beforeDeleteEvent",n.toEventObject()),i()}},p("span",{className:ol.deleteIcon}),p("span",{className:ol.content},p(oo,{template:"popupDelete",as:"span"}))))),p("div",{className:ol.topLine,style:{backgroundColor:a.backgroundColor}}),p("div",{className:y},p("div",{className:ol.border,style:{top:h}},p("div",{className:ol.fill})))),c)}const al={dropdownMenu:yt("dropdown-menu"),dropdownMenuItem:yt("dropdown-menu-item"),dotIcon:yt("icon","dot"),content:yt("content")};function ll(e){let{index:t,name:n,backgroundColor:r,onClick:o}=e;return p("li",{className:al.dropdownMenuItem,onClick:e=>o(e,t)},p("span",{className:al.dotIcon,style:{backgroundColor:r}}),p("span",{className:al.content},n))}function cl(e){let{calendars:t,setOpened:n,onChangeIndex:r}=e;const o=(e,t)=>{e.stopPropagation(),n(!1),r(t)};return p("ul",{className:al.dropdownMenu},t.map(((e,t)=>{let{name:n,backgroundColor:r="000"}=e;return p(ll,{key:"dropdown-".concat(n,"-").concat(t),index:t,name:n,backgroundColor:r,onClick:o})})))}function sl(e){let{children:t,classNames:n=[],onClick:r=Er}=e;return p("div",{className:yt("popup-section",...n),onClick:r},t)}function ul(){const[e,t]=Z(!1);return{isOpened:e,setOpened:t,toggleDropdown:()=>t((e=>!e))}}let dl;!function(e){e.init="init",e.setCalendarId="setCalendarId",e.setTitle="setTitle",e.setLocation="setLocation",e.setPrivate="setPrivate",e.setAllday="setAllday",e.setState="setState",e.reset="reset"}(dl||(dl={}));const fl={title:"",location:"",isAllday:!1,isPrivate:!1,state:"Busy"};function pl(e,t){switch(t.type){case dl.init:return{...fl,...t.event};case dl.setCalendarId:return{...e,calendarId:t.calendarId};case dl.setTitle:return{...e,title:t.title};case dl.setLocation:return{...e,location:t.location};case dl.setPrivate:return{...e,isPrivate:t.isPrivate};case dl.setAllday:return{...e,isAllday:t.isAllday};case dl.setState:return{...e,state:t.state};case dl.reset:return{...e,...fl};default:return e}}const hl={popupSection:["dropdown-section","calendar-section"],popupSectionItem:yt("popup-section-item","popup-button"),dotIcon:yt("icon","dot"),content:yt("content","event-calendar")};function ml(e){let{calendars:t,selectedCalendarId:n,formStateDispatch:r}=e;const{isOpened:o,setOpened:i,toggleDropdown:a}=ul(),l=t.find((e=>e.id===n)),{backgroundColor:c="",name:s=""}=null!=l?l:{};return p(sl,{onClick:a,classNames:hl.popupSection},p("button",{type:"button",className:hl.popupSectionItem},p("span",{className:hl.dotIcon,style:{backgroundColor:c}}),p("span",{className:hl.content},s),p("span",{className:yt("icon","ic-dropdown-arrow",{open:o})})),o&&p(cl,{calendars:t,setOpened:i,onChangeIndex:e=>r({type:dl.setCalendarId,calendarId:t[e].id})}))}const gl={closeButton:yt("popup-button","popup-close"),closeIcon:yt("icon","ic-close")};function vl(e){let{type:t,close:n}=e;const{hideAllPopup:r}=$r("popup");return p("button",{type:"button",className:gl.closeButton,onClick:()=>{r(),Gt(n)&&n()}},"moreEvents"===t?p(oo,{template:"monthMoreClose"}):p("i",{className:gl.closeIcon}))}const yl={confirmButton:yt("popup-button","popup-confirm")};function wl(e){let{children:t}=e;return p("button",{type:"submit",className:yl.confirmButton},p("span",null,t))}var _l=r(4268),bl=r.n(_l);function xl(e){let{template:t,model:n,defaultValue:r=""}=e;const o=Yr(Zr)[t];if(Bt(o))return r;let i=o(n);return gt()(i)||(i=r),i}const Dl={datePickerContainer:yt("datepicker-container"),datePicker:yt("popup-section-item","popup-date-picker"),allday:yt("popup-section-item","popup-section-allday"),dateIcon:yt("icon","ic-date"),dateDash:yt("popup-date-dash"),content:yt("content")},kl=Oi((function(e,t){let{start:n,end:r,isAllday:o=!1,formStateDispatch:i}=e;const{usageStatistics:a}=Yr(Qr),l=te(null),c=te(null),s=te(null),u=te(null),d=xl({template:"startDatePlaceholder",defaultValue:"Start Date"}),f=xl({template:"endDatePlaceholder",defaultValue:"End Date"});return Q((()=>{if(l.current&&c.current&&s.current&&u.current){const e=new nn(n),i=new nn(r);o&&(e.setHours(12,0,0),i.setHours(13,0,0)),t.current=bl().createRangePicker({startpicker:{date:e.toDate(),input:c.current,container:l.current},endpicker:{date:i.toDate(),input:u.current,container:s.current},format:o?"yyyy-MM-dd":"yyyy-MM-dd HH:mm",timePicker:!o&&{showMeridiem:!1,usageStatistics:a},usageStatistics:a})}}),[n,r,o,a,t]),p(sl,null,p("div",{className:Dl.datePicker},p("span",{className:Dl.dateIcon}),p("input",{name:"start",className:Dl.content,placeholder:d,ref:c}),p("div",{className:Dl.datePickerContainer,ref:l})),p("span",{className:Dl.dateDash},"-"),p("div",{className:Dl.datePicker},p("span",{className:Dl.dateIcon}),p("input",{name:"end",className:Dl.content,placeholder:f,ref:u}),p("div",{className:Dl.datePickerContainer,ref:s})),p("div",{className:Dl.allday,onClick:()=>i({type:dl.setAllday,isAllday:!o})},p("span",{className:yt("icon",{"ic-checkbox-normal":!o,"ic-checkbox-checked":o})}),p("span",{className:Dl.content},p(oo,{template:"popupIsAllday"})),p("input",{name:"isAllday",type:"checkbox",className:yt("hidden-input"),value:o?"true":"false",checked:o})))})),Sl=["Busy","Free"],Cl={popupSectionItem:yt("popup-section-item","dropdown-menu-item"),dropdownMenu:yt("dropdown-menu"),icon:yt("icon"),content:yt("content")};function El(e){let{setOpened:t,setEventState:n}=e;return p("ul",{className:Cl.dropdownMenu},Sl.map((e=>p("li",{key:e,className:Cl.popupSectionItem,onClick:r=>((e,r)=>{e.stopPropagation(),t(!1),n(r)})(r,e)},p("span",{className:Cl.icon}),p("span",{className:Cl.content},p(oo,"Busy"===e?{template:"popupStateBusy"}:{template:"popupStateFree"}))))))}const Il={popupSection:["dropdown-section","state-section"],popupSectionItem:yt("popup-section-item","popup-button"),stateIcon:yt("icon","ic-state"),arrowIcon:yt("icon","ic-dropdown-arrow"),content:yt("content","event-state")};function Ml(e){let{eventState:t="Busy",formStateDispatch:n}=e;const{isOpened:r,setOpened:o,toggleDropdown:i}=ul();return p(sl,{onClick:i,classNames:Il.popupSection},p("button",{type:"button",className:Il.popupSectionItem},p("span",{className:Il.stateIcon}),p("span",{className:Il.content},p(oo,"Busy"===t?{template:"popupStateBusy"}:{template:"popupStateFree"})),p("span",{className:Il.arrowIcon})),r&&p(El,{setOpened:o,setEventState:e=>n({type:dl.setState,state:e})}))}const Tl={popupSectionItem:yt("popup-section-item","popup-section-location"),locationIcon:yt("icon","ic-location"),content:yt("content")};function Nl(e){let{location:t,formStateDispatch:n}=e;const r=xl({template:"locationPlaceholder",defaultValue:"Location"});return p(sl,null,p("div",{className:Tl.popupSectionItem},p("span",{className:Tl.locationIcon}),p("input",{name:"location",className:Tl.content,placeholder:r,value:t,onChange:e=>{n({type:dl.setLocation,location:e.currentTarget.value})}})))}const Ol={popupSectionItem:yt("popup-section-item","popup-section-title"),privateButton:yt("popup-section-item","popup-section-private","popup-button"),titleIcon:yt("icon","ic-title"),content:yt("content")};function Pl(e){let{title:t,isPrivate:n=!1,formStateDispatch:r}=e;const o=xl({template:"titlePlaceholder",defaultValue:"Subject"});return p(sl,null,p("div",{className:Ol.popupSectionItem},p("span",{className:Ol.titleIcon}),p("input",{name:"title",className:Ol.content,placeholder:o,value:t,onChange:e=>{r({type:dl.setTitle,title:e.currentTarget.value})},required:!0})),p("button",{type:"button",className:Ol.privateButton,onClick:()=>r({type:dl.setPrivate,isPrivate:!n})},p("span",{className:yt("icon",{"ic-private":n,"ic-public":!n})}),p("input",{name:"isPrivate",type:"checkbox",className:yt("hidden-input"),value:n?"true":"false",checked:n})))}const Al={popupContainer:yt("popup-container"),formContainer:yt("form-container"),popupArrowBorder:yt("popup-arrow-border"),popupArrowFill:yt("popup-arrow-fill")};function Rl(){var e;const{calendars:t}=Yr(qr),{hideAllPopup:n}=$r("popup"),r=Yr(tl),{start:o,end:i,popupArrowPointPosition:a,close:l,isCreationPopup:c,event:s}=null!=r?r:{},u=lo(),d=Ja("formPopupSlot"),[f,h]=J(pl,{calendarId:null===(e=t[0])||void 0===e?void 0:e.id,...fl});const m=te(null),g=te(null),[v,y]=Z({}),[w,_]=Z(0),[b,x]=Z(qa.bottom),D=la(),k=ne((()=>yt("popup-arrow",{top:b===qa.top,bottom:b===qa.bottom})),[b]);if(ee((()=>{if(g.current&&a&&D){const e=D.getBoundingClientRect(),t=g.current.getBoundingClientRect(),{top:n,left:r,direction:o}=function(e,t,n){let r=e.top-n.height-8,o=e.left-n.width/2,i=qa.bottom;return r<t.top&&(i=qa.top,r=e.top+8),Qa(r,t,n)&&(r=t.top+t.height-n.height),el(o,t,n)&&(o=t.left+t.width-n.width),{top:r+window.scrollY,left:Math.max(o,t.left)+window.scrollX,direction:i}}(a,e,t),i=a.left-r;y({left:r,top:n}),_(i),x(o)}}),[D,a]),Q((()=>{jt(r)&&jt(s)&&h({type:dl.init,event:{title:r.title,location:r.location,isAllday:r.isAllday,isPrivate:r.isPrivate,calendarId:s.calendarId,state:r.eventState}})}),[t,s,h,r]),Q((()=>{Bt(r)&&h({type:dl.reset})}),[h,r]),Bt(o)||Bt(i)||Bt(d))return null;return Bi(p("div",{role:"dialog",className:Al.popupContainer,ref:g,style:v},p("form",{onSubmit:e=>{var t,r;e.preventDefault();const o=new FormData(e.target),i={...f};if(o.forEach(((e,t)=>{i[t]=function(e){return-1!==$a.indexOf(e)}(t)?"true"===e:e})),i.start=new nn(null===(t=m.current)||void 0===t?void 0:t.getStartDate()),i.end=new nn(null===(r=m.current)||void 0===r?void 0:r.getEndDate()),c)u.fire("beforeCreateEvent",i);else if(s){const e=function(e,t){return Object.entries(t).reduce(((t,n)=>{let[r,o]=n;const i=r;return e[i]instanceof nn?0!==Mn(e[i],o)&&(t[i]=o):e[i]!==o&&(t[i]=o),t}),{})}(s,i);u.fire("beforeUpdateEvent",{event:s.toEventObject(),changes:e})}n()}},p("div",{className:Al.formContainer},null!=t&&t.length?p(ml,{selectedCalendarId:f.calendarId,calendars:t,formStateDispatch:h}):p(sl,null),p(Pl,{title:f.title,isPrivate:f.isPrivate,formStateDispatch:h}),p(Nl,{location:f.location,formStateDispatch:h}),p(kl,{start:o,end:i,isAllday:f.isAllday,formStateDispatch:h,ref:m}),p(Ml,{eventState:f.state,formStateDispatch:h}),p(vl,{type:"form",close:l}),p(sl,null,p(wl,null,p(oo,c?{template:"popupSave"}:{template:"popupUpdate"})))),p("div",{className:k},p("div",{className:Al.popupArrowBorder,style:{left:w}},p("div",{className:Al.popupArrowFill}))))),d)}function Ll(e){return Object.values(e.popup).find((e=>jt(e)))}function Hl(){const e=Yr(Ll),{hideAllPopup:t}=$r("popup"),n=jt(e);return p("div",{className:yt("popup-overlay"),style:{display:n?"block":"none"},onClick:n=>{var r;n.stopPropagation(),null==e||null===(r=e.close)||void 0===r||r.call(e),t()}})}const Fl={container:yt("see-more-container"),seeMore:yt("see-more"),header:yt("see-more-header"),list:yt("month-more-list")};function zl(){const e=Yr(rl),{date:t,events:n=[],popupPosition:r}=null!=e?e:{},{moreView:o,moreViewTitle:i}=Oo(),a=Ja("seeMorePopupSlot"),l=lo(),c=te(null),s=Bt(t)||Bt(r)||Bt(a);if(Q((()=>{!s&&c.current&&l.fire("clickMoreEventsBtn",{date:t.toDate(),target:c.current})}),[t,l,s]),s)return null;const u={height:44,marginBottom:12,padding:"12px 17px 0",backgroundColor:i.backgroundColor},d={ymd:kn(t,"YYYY-MM-DD"),day:t.getDay(),date:t.getDate().toString().padStart(2,"0")},f={height:"calc(100% - ".concat(68,"px)")};return Bi(p("div",{role:"dialog",className:Fl.container,style:r,ref:c},p("div",{className:Fl.seeMore,style:o},p("div",{className:Fl.header,style:u},p(oo,{template:"monthMoreTitleDate",param:d}),p(vl,{type:"moreEvents"})),p("div",{className:Fl.list,style:f},n.map((e=>p(Ca,{key:"see-more-event-item-".concat(e.cid()),uiModel:e,eventHeight:ft,headerHeight:44,flat:!0})))))),a)}function Wl(e,t){const n={height:wt(100)};return e&&(n.width=e),t&&(n.height=t),n}function Bl(e){let{children:t,width:n,height:r,className:o="",autoAdjustPanels:i=!1}=e;const{backgroundColor:a}=No(mo),[l,c]=Pa(),{setLastPanelType:s,updateLayoutHeight:u}=$r("weekViewLayout"),d=ne((()=>"".concat(yt("layout")," ").concat(o)),[o]);return ee((()=>{if(l){const e=()=>u(l.offsetHeight);return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}return Er}),[l,u]),ee((()=>{if(l&&i){const e=D(t),n=e[e.length-1];gt()(n)||Ft()(n)||Bt(n)||s(n.props.name)}}),[t,s,i,l]),p(aa,{value:l},p("div",{ref:c,className:d,style:{...Wl(n,r),backgroundColor:a}},l?t:null),p(Rl,null),p(il,null),p(zl,null),p(Hl,null))}function jl(e){let{name:t,height:n}=e;const r=function(e,t){return{height:e,width:"100%",cursor:"row-resize",borderTop:t,borderBottom:t}}(n,No(re((e=>e.week.panelResizer.border),[]))),o={...r,display:"none",border:"none",backgroundColor:"#999"},[i,a]=Z(o),l=te(null),{updateDayGridRowHeightByDiff:c}=$r("weekViewLayout"),s=_a(ca,{onDragStart:e=>{l.current={left:e.pageX,top:e.pageY}},onDrag:e=>{if(l.current){const t=e.pageY-l.current.top;a((e=>({...e,top:t,display:null})))}},onMouseUp:e=>{if(l.current){const n=e.pageY-l.current.top;l.current=null,a(o),c({rowName:t,diff:n})}}});return p("div",{style:{position:"relative"}},p("div",{className:yt("panel-resizer"),style:r,onMouseDown:s}),p("div",{className:yt("panel-resizer-guide"),style:i}))}function Gl(e,t){return t?Math.min(t,e):e}const Ul=Oi((function(e,t){let{name:n,initialWidth:r=pt,initialHeight:o=pt,overflowX:i,overflowY:a,maxExpandableWidth:l,maxExpandableHeight:c,minHeight:s,maxHeight:u,minWidth:d,maxWidth:f,resizerWidth:h=ur,resizerHeight:g=ur,resizable:v,children:y}=e;const{updateDayGridRowHeight:w}=$r("weekViewLayout"),{height:_}=Yr(re((e=>{var t;return null!==(t=e.weekViewLayout.dayGridRows[n])&&void 0!==t?t:{}}),[n])),b=null!=_?_:o;ee((()=>{w({rowName:n,height:o})}),[o,n,w]);const x=function(e){let{initialHeight:t,initialWidth:n,overflowX:r,overflowY:o,maxExpandableWidth:i,maxExpandableHeight:a,minHeight:l,maxHeight:c,minWidth:s,maxWidth:u}=e;const d={};return n&&(d.width=Gl(n,i),d.height="100%"),t&&(d.width="100%",d.height=Gl(t,a)),r&&(d.overflowX="auto"),o&&(d.overflowY="auto"),{...d,minHeight:l,maxHeight:c,minWidth:s,maxWidth:u}}({initialWidth:r,initialHeight:b,overflowX:i,overflowY:a,maxExpandableWidth:l,maxExpandableHeight:c,minHeight:s,maxHeight:u,minWidth:d,maxWidth:f}),D=ne((()=>Bt(v)||Lt()(v)?!!v:v.includes(n)),[v,n]);return p(m,null,p("div",{className:yt("panel",n),style:x,ref:t},y),D?p(jl,{name:n,width:h,height:g}):null)})),Yl="timegrid",Vl=e=>"".concat(Yl,"-").concat(e),$l={second:"HH:mm:ss",minute:"HH:mm",hour:"HH:mm",date:"HH:mm",month:"MM.DD",year:"YYYY.MM.DD"},Xl={time:yt("event-time"),content:yt("event-time-content"),travelTime:yt("travel-time"),resizeHandleX:yt("resize-handler-x"),moveEvent:yt("dragging--move-event"),resizeEvent:yt("dragging--resize-vertical-event")};function ql(e,t){return gt()(e)?e:e>=0?"calc(".concat(wt(e)," - ").concat(t,"px)"):""}function Kl(e){let{uiModel:t,isDraggingTarget:n,hasNextStartTime:r,calendarColor:o,minHeight:i}=e;const{top:a,left:l,height:c,width:s,duplicateLeft:u,duplicateWidth:d,goingDurationHeight:f,modelDurationHeight:p,comingDurationHeight:h,croppedStart:m,croppedEnd:g}=t,v="white",y=function(e){const{percent:t,px:n}=bt("".concat(e));return e>0||t>0||n>0?2:0}(l),{color:w,backgroundColor:_,borderColor:b,dragBackgroundColor:x}=xt(t,o),D={width:ql(d||s,y),height:"calc(".concat(wt(Math.max(c,i))," - ").concat(2,"px)"),top:wt(a),left:u||wt(l),borderRadius:2,borderLeft:"3px solid ".concat(b),marginLeft:y,color:w,backgroundColor:n?x:_,opacity:n?.5:1,zIndex:r?1:0},k={height:wt(f),borderBottom:"1px dashed ".concat(v)},S={height:wt(p)},C={height:wt(h),borderTop:"1px dashed ".concat(v)};return m&&(D.borderTopLeftRadius=0,D.borderTopRightRadius=0),g&&(D.borderBottomLeftRadius=0,D.borderBottomRightRadius=0),{containerStyle:D,goingDurationStyle:k,modelDurationStyle:S,comingDurationStyle:C}}function Zl(e){let{uiModel:t,nextStartTime:n,isResizingGuide:r=!1,minHeight:o=0}=e;const{useDetailPopup:i,isReadOnly:a,week:l}=Yr(Qr),c=pa(t.model),{collapseDuplicateEvents:s}=l,u=la(),{showDetailPopup:d}=$r("popup"),{setDraggingEventUIModel:f}=$r("dnd"),{setSelectedDuplicateEventCid:h}=$r("weekViewLayout"),m=lo(),g=te(null),[v,y]=Z(!1),{model:w,goingDurationHeight:_,modelDurationHeight:b,comingDurationHeight:x,croppedEnd:D}=t,{id:k,calendarId:S,customStyle:C}=w,E=jt(n),{containerStyle:I,goingDurationStyle:M,modelDurationStyle:T,comingDurationStyle:N}=Kl({uiModel:t,isDraggingTarget:v,hasNextStartTime:E,calendarColor:c,minHeight:o}),O=E||r;ga(eo,(e=>{let{draggingEventUIModel:n,draggingState:o}=e;o!==ar.DRAGGING||(null==n?void 0:n.cid())!==t.cid()||E||r?y(!1):y(!0)})),Q((()=>{r||m.fire("afterRenderEvent",t.model.toEventObject())}),[]);const P=e=>{f(t),null==u||u.classList.add(e)},A=e=>{y(!1),null==u||u.classList.remove(e)},R=_a(ua("timeGrid","".concat(t.cid())),{onDragStart:()=>{H&&P(Xl.moveEvent)},onMouseUp:(e,n)=>{let{draggingState:r}=n;A(Xl.moveEvent);const o=r<=ar.INIT;if(o&&s){const e=t.duplicateEvents.length>0?t.cid():-1;h(e)}o&&i&&g.current&&d({event:t.model,eventRect:g.current.getBoundingClientRect()},!1),o&&m.fire("clickEvent",{event:t.model.toEventObject(),nativeEvent:e})},onPressESCKey:()=>A(Xl.moveEvent)}),L=_a(sa("timeGrid","".concat(t.cid())),{onDragStart:()=>P(Xl.resizeEvent),onMouseUp:()=>A(Xl.resizeEvent),onPressESCKey:()=>A(Xl.resizeEvent)}),H=function(e){let{uiModel:t,isReadOnlyCalendar:n,isDraggingTarget:r,hasNextStartTime:o}=e;const{model:i}=t;return!(n||i.isReadOnly||r||o)}({uiModel:t,isReadOnlyCalendar:a,isDraggingTarget:v,hasNextStartTime:E}),F=H&&!D;return p("div",{"data-testid":"".concat(O?"guide-":"","time-event-").concat(w.title,"-").concat(t.cid()),"data-calendar-id":S,"data-event-id":k,className:Xl.time,style:{...I,...C},onMouseDown:e=>{e.stopPropagation(),R(e)},ref:g},_?p("div",{className:Xl.travelTime,style:M},p(oo,{template:"goingDuration",param:w})):null,b?p("div",{className:Xl.content,style:T},p(oo,{template:"time",param:{...w.toEventObject(),start:E?n:w.start}})):null,x?p("div",{className:Xl.travelTime,style:N},p(oo,{template:"comingDuration",param:w})):null,F?p("div",{className:Xl.resizeHandleX,onMouseDown:e=>{e.stopPropagation(),L(e)}}):null)}function Jl(e){let{top:t,height:n,text:r}=e;const{backgroundColor:o,border:i}=No(re((e=>e.common.gridSelection),[])),a=No(re((e=>e.week.gridSelection.color),[])),l={top:wt(t),height:wt(n),backgroundColor:o,border:i};return p("div",{className:yt("time","grid-selection"),style:l,"data-testid":"time-grid-selection-".concat(t,"-").concat(n)},r.length>0?p("span",{className:yt("grid-selection-label"),style:{color:a}},r):null)}function Ql(e){let{columnIndex:t,timeGridRows:n}=e;const r=Yr(re((e=>bi.calculateSelection(e.gridSelection.timeGrid,t,n.length-1)),[t,n])),o=ne((()=>{if(!r)return null;const{startRowIndex:e,endRowIndex:t,isStartingColumn:o,isSelectingMultipleColumns:i}=r,{top:a,startTime:l}=n[e],{top:c,height:s,endTime:u}=n[t],d=c+s-a;let f="".concat(l," - ").concat(u);return i&&(f=o?l:""),{top:a,height:d,text:f}}),[r,n]);return Bt(o)?null:p(Jl,o)}function ec(e){let{gridPositionFinder:t,totalUIModels:n,columnIndex:r,timeGridData:o}=e;const i=function(e){let{gridPositionFinder:t,totalUIModels:n,columnIndex:r,timeGridData:o}=e;const i=lo(),{isDraggingEnd:a,isDraggingCanceled:l,draggingEvent:c,clearDraggingEvent:s}=Ma("timeGrid","resize"),[u,d]=Ia(t),[f,p]=Z(null),h=re((()=>{p(null),s(),d()}),[d,s]),m=ne((()=>{if(Bt(c))return null;const{columns:e,rows:t}=o,r=n.map((e=>e.filter((e=>e.cid()===c.cid())))),i=(t,n)=>r=>{const i=jn(e[n].date,r.startTime),a=jn(o.columns[n].date,r.endTime);return i<=t&&t<a},a=r.findIndex((e=>e.length>0)),l=r[a][0],{goingDuration:s=0}=l.model,u=Bn(l.getStarts(),-s),d=Math.max(t.findIndex(i(u,a)),0),f=dn(r,(e=>e.length>0)),p=r[f][0],{comingDuration:h=0}=p.model,m=Bn(p.getStarts(),h);let g=t.findIndex(i(m,f));return g=g>=0?g:t.length-1,{eventStartDateColumnIndex:a,eventStartDateRowIndex:d,eventEndDateColumnIndex:f,eventEndDateRowIndex:g,resizeTargetUIModelColumns:r}}),[c,o,n]),g=jt(m)&&jt(c)&&jt(u),v=ne((()=>m?o.rows[0].height:0),[m,o.rows]);return Q((()=>{if(g){const{eventStartDateRowIndex:e,eventStartDateColumnIndex:t,eventEndDateColumnIndex:n}=m;if(r===n&&t===n){const t=c.clone(),{height:n,goingDurationHeight:r,comingDurationHeight:i}=t,a=Math.max(v+r*n/100+i*n/100,o.rows[u.rowIndex].top-o.rows[e].top+v),l=r*n/a,s=i*n/a;t.setUIProps({height:a,goingDurationHeight:l,comingDurationHeight:s,modelDurationHeight:100-(l+s)}),p(t)}}}),[m,g,r,u,c,o.rows,v]),Q((()=>{if(g){const{resizeTargetUIModelColumns:e,eventStartDateColumnIndex:t,eventEndDateColumnIndex:n}=m;if((r===t||r===n)&&t!==n){let n;r===t?n=e[r][0].clone():(n=c.clone(),n.setUIProps({height:o.rows[u.rowIndex].top+v})),p(n)}}}),[m,g,r,u,c,o.rows,v]),Ea((()=>{if(!l&&jt(m)&&jt(u)&&jt(c)&&m.eventEndDateColumnIndex===r){const{comingDuration:e=0}=c.model,t=Bn(jn(o.columns[r].date,o.rows[u.rowIndex].endTime),-e),{STEP_MINUTES:n}=Dn(o.rows),a=Bn(c.getStarts(),n);i.fire("beforeUpdateEvent",{event:c.model.toEventObject(),changes:{end:Nn(a,t)}})}h()}),a),f}({gridPositionFinder:t,totalUIModels:n,columnIndex:r,timeGridData:o});return Bt(i)?null:p(Zl,{uiModel:i,isResizingGuide:!0})}const tc={column:yt("column"),backgrounds:yt("background-events"),events:yt("events")};function nc(e){let{eventUIModels:t,minEventHeight:n}=e;return p("div",{className:tc.events,style:{marginRight:8}},t.map((e=>p(Zl,{key:"".concat(e.valueOf(),"-").concat(e.cid()),uiModel:e,minHeight:n}))))}function rc(e){return{defaultBackgroundColor:e.week.dayGrid.backgroundColor,todayBackgroundColor:e.week.today.backgroundColor,weekendBackgroundColor:e.week.weekend.backgroundColor}}const oc=Mi((function(e){let{columnDate:t,columnWidth:n,columnIndex:r,totalUIModels:o,gridPositionFinder:i,timeGridData:a,isLastColumn:l}=e;const{rows:c}=a,s=No(re((e=>e.week.timeGrid.borderRight),[])),u=No(rc),[,d]=po(),f=function(e){let{today:t,columnDate:n,defaultBackgroundColor:r,todayBackgroundColor:o,weekendBackgroundColor:i}=e;const a=Tn(t,n),l=Rn(n.getDay());return a?o:l?i:r}({today:d(),columnDate:t,...u}),h={width:n,backgroundColor:f,borderRight:l?"none":s},m=o[r],g=c[0].height;return p("div",{className:tc.column,style:h,"data-testid":"timegrid-column-".concat(t.getDay())},p(nc,{eventUIModels:m,minEventHeight:g}),p(ec,{gridPositionFinder:i,totalUIModels:o,columnIndex:r,timeGridData:a}),p(Ql,{columnIndex:r,timeGridRows:c}))}));function ic(e){return{halfHourLineBorder:e.week.timeGridHalfHourLine.borderBottom,hourLineBorder:e.week.timeGridHourLine.borderBottom}}const ac=Mi((function(e){let{timeGridRows:t}=e;const{STEPS:n}=Dn(t),{halfHourLineBorder:r,hourLineBorder:o}=No(ic);let i=1;return p("div",{className:yt("gridlines")},t.map((e=>{i=i===n+1?1:i;const t=i!==n;return i+=1,p("div",{key:"gridline-".concat(e.startTime,"-").concat(e.endTime),className:yt("gridline-half"),style:{top:wt(e.top),height:wt(e.height),borderBottom:t?r:o},"data-testid":"gridline-".concat(e.startTime,"-").concat(e.endTime)})})))}));function lc(e,t,n){const r=e.getHours()-t,o=e.getMinutes();return r*(60/n)+Math.floor(o/n)}const cc=e=>e.dnd.initX,sc=e=>e.dnd.initY;function uc(e){let{gridPositionFinder:t,timeGridData:n}=e;const{MS_PER_STEP_MINUTES:r}=Dn(n.rows),o=Yr(cc),i=Yr(sc),a=lo(),{isDraggingEnd:l,isDraggingCanceled:c,draggingEvent:s,clearDraggingEvent:u}=Ma("timeGrid","move"),[d,f]=Ia(t),p=te(null);Q((()=>{jt(o)&&jt(i)&&(p.current=t({clientX:o,clientY:i}))}),[t,o,i]);const h=ne((()=>Bt(p.current)||Bt(d)?null:{columnDiff:d.columnIndex-p.current.columnIndex,rowDiff:d.rowIndex-p.current.rowIndex}),[d]),m=ne((()=>Bt(s)?null:s.getStarts()),[s]),g=re((()=>{f(),u(),p.current=null}),[f,u]),v=ne((()=>Bt(h)||Bt(m)?null:Wn(m,h.rowDiff*r+h.columnDiff*_n)),[h,m,r]),y=ne((()=>{if(Bt(s)||Bt(d)||Bt(h))return null;const e=s.clone(),{top:t,height:r}=function(e){let{draggingEvent:t,columnDiff:n,rowDiff:r,timeGridDataRows:o,currentDate:i}=e;const{STEP_MINUTES:a,MS_PER_STEP_MINUTES:l}=Dn(o),c=o[0].height,s=c*o.length,u=r*l+n*_n,d=Number(o[0].startTime.split(":")[0]),{goingDuration:f=0,comingDuration:p=0}=t.model,h=Bn(t.getStarts(),-f),m=Bn(t.getEnds(),p),g=Wn(h,u),v=Wn(m,u),y=Math.max(lc(g,d,a),0),w=Math.min(lc(v,d,a),o.length-1),_=g.getFullYear()<i.getFullYear()||g.getMonth()<i.getMonth()||g.getDate()<i.getDate(),b=v.getFullYear()>i.getFullYear()||v.getMonth()>i.getMonth()||v.getDate()>i.getDate(),x=w-(_?0:y);return{top:_?0:o[y].top,height:b?s:Math.max(x,1)*c}}({draggingEvent:e,columnDiff:h.columnDiff,rowDiff:h.rowDiff,timeGridDataRows:n.rows,currentDate:n.columns[d.columnIndex].date});return e.setUIProps({left:n.columns[d.columnIndex].left,width:n.columns[d.columnIndex].width,top:t,height:r}),e}),[d,s,h,n.columns,n.rows]);return Ea((()=>{if(!c&&jt(s)&&jt(d)&&jt(h)&&jt(v)&&(0!==h.rowDiff||0!==h.columnDiff)){const e=s.duration(),t=Wn(v,e);a.fire("beforeUpdateEvent",{event:s.model.toEventObject(),changes:{start:v,end:t}})}g()}),l),{movingEvent:y,nextStartTime:v}}function dc(e){let{gridPositionFinder:t,timeGridData:n}=e;const{movingEvent:r,nextStartTime:o}=uc({gridPositionFinder:t,timeGridData:n});return Bt(r)?null:p(Zl,{uiModel:r,nextStartTime:o})}const fc="timegrid-now-indicator",pc="timegrid-now-indicator-label",hc={line:yt(Vl("now-indicator")),left:yt(Vl("now-indicator-left")),marker:yt(Vl("now-indicator-marker")),today:yt(Vl("now-indicator-today")),right:yt(Vl("now-indicator-right"))};function mc(e){return{pastBorder:e.week.nowIndicatorPast.border,todayBorder:e.week.nowIndicatorToday.border,futureBorder:e.week.nowIndicatorFuture.border,bulletBackgroundColor:e.week.nowIndicatorBullet.backgroundColor}}function gc(e){let{top:t,columnWidth:n,columnCount:r,columnIndex:o}=e;const{pastBorder:i,todayBorder:a,futureBorder:l,bulletBackgroundColor:c}=No(mc),s=la(),u=lo(),d=te(null),f={left:wt(n*o),width:wt(n*o)},h={left:wt(n*(o+1)),width:wt(n*(r-o+1))};return Q((()=>{const e=e=>{var t;const n=null!==(t=null==s?void 0:s.querySelector(".".concat(yt("panel"),".").concat(yt("time"))))&&void 0!==t?t:null;if(n&&d.current){const{offsetHeight:t}=n,{offsetTop:r}=d.current,o=r-t/2;n.scrollTo?n.scrollTo({top:o,behavior:e}):n.scrollTop=o}};return u.on("scrollToNow",e),()=>u.off("scrollToNow",e)}),[u,s]),Q((()=>{u.fire("scrollToNow","smooth")}),[u]),p("div",{ref:d,className:hc.line,style:{top:wt(t)},"data-testid":fc},p("div",{className:hc.left,style:{width:f.width,borderTop:i}}),p("div",{className:hc.marker,style:{left:f.left,backgroundColor:c}}),p("div",{className:hc.today,style:{left:f.left,width:wt(n),borderTop:a}}),p("div",{className:hc.right,style:{left:h.left,borderTop:l}}))}const vc={now:Vl("current-time"),dayDifference:Vl("day-difference")};function yc(e){let{unit:t,top:n,now:r,zonedNow:o}=e;const i=No(re((e=>e.week.nowIndicatorLabel.color),[])),a=ne((()=>Un(o,r)),[o,r]),l={unit:t,time:o,format:$l[t]};return p("div",{className:yt(vc.now),style:{top:wt(n),color:i},"data-testid":pc},0!==a&&p("span",{className:yt(vc.dayDifference)},"[".concat(a>0?"+":"-").concat(Math.abs(a),"]")),p(oo,{template:"timegridNowIndicatorLabel",param:l,as:"span"}))}const wc=e=>{var t;return null!==(t=e.options.month.visibleEventCount)&&void 0!==t?t:6},_c=e=>e.options.week.showNowIndicator,bc=e=>{var t;return null!==(t=e.options.week.showTimezoneCollapseButton)&&void 0!==t&&t},xc=e=>{var t;return null!==(t=e.options.week.timezonesCollapsed)&&void 0!==t&&t},Dc={timeColumn:Vl("time-column"),hourRows:Vl("hour-rows"),time:Vl("time"),timeLabel:Vl("time-label"),first:Vl("time-first"),last:Vl("time-last"),hidden:Vl("time-hidden")};function kc(e){return{primaryTimezoneBackgroundColor:e.week.timeGridLeft.backgroundColor,subTimezoneBackgroundColor:e.week.timeGridLeftAdditionalTimezone.backgroundColor}}function Sc(e){return{pastTimeColor:e.week.pastTime.color,futureTimeColor:e.week.futureTime.color}}function Cc(e){var t;let{rowsInfo:n,isPrimary:r,borderRight:o,width:i,nowIndicatorState:a}=e;const l=Yr(_c),{primaryTimezoneBackgroundColor:c,subTimezoneBackgroundColor:s}=No(kc),{pastTimeColor:u,futureTimeColor:d}=No(Sc),f=jt(a)?Bn(a.now,null!==(t=n[0].diffFromPrimaryTimezone)&&void 0!==t?t:0):null,h=r?c:s;return p("div",{role:"rowgroup",className:yt(Dc.hourRows),style:{width:wt(i),borderRight:o,backgroundColor:h}},n.map((e=>{let{date:t,top:n,className:o}=e;const i=jt(f)&&t<f?u:d;return p("div",{key:t.getTime(),className:o,style:{top:wt(n),color:i},role:"row"},p(oo,{template:"timegridDisplay".concat(r?"Primary":"","Time"),param:{time:t},as:"span"}))})),l&&jt(a)&&jt(f)&&p(yc,{unit:"hour",top:a.top,now:a.now,zonedNow:f}))}const Ec=Mi((function(e){let{timeGridRows:t,nowIndicatorState:n}=e;const{STEPS:r}=Dn(t),o=Yr(_c),i=Yr(uo),a=Yr(xc),l=fo(),{width:c,borderRight:s}=No(yo),u=ne((()=>t.filter(((e,n)=>n%r==0||n===t.length-1))),[t,r]),d=re(((e,t,r)=>{const i=0===t,a=t===u.length-1,l=yt(Dc.time,{[Dc.first]:i,[Dc.last]:a,[Dc.hidden]:(e=>{let{top:t,height:r}=e;if(!o||Bt(n))return!1;const i=n.top;return t-r<=i&&i<=t+r})(e)});let c=jn(new nn,a?e.endTime:e.startTime);return jt(r)&&(c=Bn(c,r)),{date:c,top:e.top,className:l,diffFromPrimaryTimezone:r}}),[u,n,o]),[f,...h]=i,m=h.length>0?100/(h.length+1):100,g=u.map(((e,t)=>d(e,t))),v=ne((()=>0===h.length?[]:h.reverse().map((e=>{const{timezoneName:t}=e,n=l(f.timezoneName).getTimezoneOffset(),r=l(t).getTimezoneOffset()-n;return u.map(((e,t)=>d(e,t,r)))}))),[d,h,f,u,l]);return p("div",{className:yt(Dc.timeColumn),style:{width:c},"data-testid":"timegrid-time-column"},!a&&v.map((e=>p(Cc,{key:e[0].diffFromPrimaryTimezone,rowsInfo:e,isPrimary:!1,borderRight:s,width:m,nowIndicatorState:n}))),p(Cc,{rowsInfo:g,isPrimary:!0,borderRight:s,width:a?100:m,nowIndicatorState:n}))}));function Ic(e,t,n){const r=t.getTime(),o=n.getTime(),i=Qo(e.getTime(),[r],[o])-r;return Qo(ei(o-r,100,i),[0],[100])}function Mc(e,t,n,r){const o=Ic(e,n,r);return{top:o,height:Ic(t,n,r)-o}}function Tc(e,t){return n=>{const{goingDuration:r=0,comingDuration:o=0}=n.model,i=Bn(n.getStarts(),-r);return!(Bn(n.getEnds(),o)<=e||i>=t)}}function Nc(e,t){const{startColumnTime:n,endColumnTime:r,baseWidth:o,columnIndex:i,renderStart:a,renderEnd:l}=t,{duplicateEvents:c}=e,{top:s,height:u}=Mc(a,l,n,r),d={top:s,left:o*i,width:o,height:Math.max(1,u),duplicateLeft:"",duplicateWidth:""};c.length>0&&(d.duplicateLeft=function(e,t){const{duplicateEvents:n,duplicateEventIndex:r}=e,o=n[r-1];let i=t;if(o){const{percent:e,px:t}=bt("".concat(o.duplicateLeft)),{percent:n,px:r}=bt("".concat(o.duplicateWidth)),a=e+n,l=t+r+2;i=0!==a?"calc(".concat(wt(a)," ").concat(l>0?"+":"-"," ").concat(_t(Math.abs(l)),")"):_t(l)}else i=wt(i);return i}(e,d.left),d.duplicateWidth=function(e,t){const{collapse:n}=e;return n?"".concat(9,"px"):"calc(".concat(wt(t)," - ").concat(_t(11*(e.duplicateEvents.length-1)+2),")")}(e,d.width)),e.setUIProps(d)}function Oc(e){let{uiModel:t,columnIndex:n,baseWidth:r,startColumnTime:o,endColumnTime:i,isDuplicateEvent:a=!1}=e;if(!a&&t.duplicateEvents.length>0)return void t.duplicateEvents.forEach((e=>{Oc({uiModel:e,columnIndex:n,baseWidth:r,startColumnTime:o,endColumnTime:i,isDuplicateEvent:!0})}));const l=function(e,t,n,r,o){const{goingDuration:i=0,comingDuration:a=0}=e.model,l=e.getStarts(),c=e.getEnds(),s=Bn(l,-i),u=Bn(c,a);return{baseWidth:n,columnIndex:t,modelStart:l,modelEnd:c,renderStart:Nn(s,r),renderEnd:On(u,o),goingStart:s,comingEnd:u,startColumnTime:r,endColumnTime:o,duplicateEvents:e.duplicateEvents}}(t,n,r,o,i);Nc(t,l),function(e,t){const{renderStart:n,renderEnd:r,modelStart:o,modelEnd:i}=t,{goingDuration:a=0,comingDuration:l=0}=e.model;let c=100;if(a>0){const{height:t}=Mc(n,o,n,r);e.goingDurationHeight=t,c-=t}if(l>0){const{height:t}=Mc(i,r,n,r);e.comingDurationHeight=t,c-=t}e.modelDurationHeight=c}(t,l),function(e,t){const{goingStart:n,comingEnd:r,startColumnTime:o,endColumnTime:i}=t;n<o&&(e.croppedStart=!0),r>i&&(e.croppedEnd=!0)}(t,l)}function Pc(e,t,n,r,o){const i=e.filter(Kn).filter(Tc(t,n)).sort(cn.event.asc);o&&function(e,t,n){const{getDuplicateEvents:r,getMainEvent:o}=t,i=e.map((e=>e.model.toEventObject()));e.forEach((t=>{if(t.collapse||t.duplicateEvents.length>0)return;const a=r(t.model.toEventObject(),i);if(a.length<=1)return;const l=o(a),c=a.map((t=>e.find((e=>e.cid()===t.__cid)))),s=!!(n>-1&&a.find((e=>e.__cid===n))),u=a.reduce(((e,t)=>{let{start:n,goingDuration:r}=t;return On(e,Bn(n,-r))}),a[0].start),d=a.reduce(((e,t)=>{let{end:n,comingDuration:r}=t;return Nn(e,Bn(n,r))}),a[0].end);c.forEach(((e,t)=>{const r=e.cid()===l.__cid,o=!(s&&e.cid()===n||!s&&r);e.setUIProps({duplicateEvents:c,duplicateEventIndex:t,collapse:o,isMain:r,duplicateStarts:u,duplicateEnds:d})}))}))}(i,o,r);const a=i.filter((e=>!e.collapse));return zo(Jn(...a),Ho(a,true),true).forEach((e=>{const r=Math.max(...e.map((e=>e.length))),o=Math.round(100/r);e.forEach((e=>{e.forEach(((e,r)=>{Oc({uiModel:e,columnIndex:r,baseWidth:o,startColumnTime:t,endColumnTime:n})}))}))})),i}const Ac={timegrid:yt(Yl),scrollArea:yt(Vl("scroll-area"))};function Rc(e){let{timeGridData:t,events:n}=e;const{isReadOnly:r,week:{narrowWeekend:o,startDayOfWeek:i,collapseDuplicateEvents:a}}=Yr(Qr),l=Yr(_c),c=Yr((e=>e.weekViewLayout.selectedDuplicateEventCid)),[,s]=po(),u=function(){const e=te(!0);return Q((()=>()=>{e.current=!1}),[]),re((()=>e.current),[])}(),{width:d}=No(yo),[f,h]=Z(null),{columns:m,rows:g}=t,v=m.length-1,y=ne((()=>m.map((e=>{let{date:t}=e;return n.filter(Tc(Cn(t),An(t))).map((e=>e.clone()))})).map(((e,t)=>Pc(e,jn(m[t].date,sn(g).startTime),jn(m[t].date,un(g).endTime),c,a)))),[m,g,n,c,a]),w=ne((()=>{const e=s(),n=m.findIndex((t=>Tn(t.date,e)));if(n<0)return null;return{startTime:jn(m[n].date,t.rows[0].startTime),endTime:jn(m[n].date,un(t.rows).endTime),currentDateIndex:n}}),[m,s,t.rows]),[_,b]=Pa(),x=ne((()=>vi({rowsCount:g.length,columnsCount:m.length,container:_,narrowWeekend:o,startDayOfWeek:i})),[m.length,_,o,g.length,i]),D=Ha({type:"timeGrid",gridPositionFinder:x,selectionSorter:bi.sortSelection,dateGetter:bi.getDateFromCollection,dateCollection:t}),k=re((()=>{if(jt(w)){const{startTime:e,endTime:t}=w,n=s();e<=n&&n<=t&&h({top:Ic(n,e,t),now:n})}}),[w,s]);return ee((()=>{var e;u()&&((null!==(e=null==w?void 0:w.currentDateIndex)&&void 0!==e?e:-1)>=0?k():h(null))}),[w,u,k]),function(e,t){const n=te(e);Q((()=>{n.current=e}),[e]),Q((()=>{const e=null!=t?t:-1;if(e>0){const t=setInterval((()=>n.current()),e);return()=>clearInterval(t)}}),[t])}(k,jt(w)?bn:null),p("div",{className:Ac.timegrid},p("div",{className:Ac.scrollArea},p(Ec,{timeGridRows:g,nowIndicatorState:f}),p("div",{className:yt("columns"),style:{left:d},ref:b,onMouseDown:ba(!r,D)},p(ac,{timeGridRows:g}),p(dc,{gridPositionFinder:x,timeGridData:t}),m.map(((e,n)=>p(oc,{key:e.date.toString(),timeGridData:t,columnDate:e.date,columnWidth:wt(e.width),columnIndex:n,totalUIModels:y,gridPositionFinder:x,isLastColumn:n===v}))),l&&jt(w)&&jt(f)?p(gc,{top:f.top,columnWidth:m[0].width,columnCount:m.length,columnIndex:w.currentDateIndex}):null)))}function Lc(e){let{isCollapsed:t}=e;const n=lo(),r=yt("icon",{"ic-arrow-right":t,"ic-arrow-left":!t});return p("button",{className:yt(Vl("timezone-collapse-button")),"aria-expanded":!t,onClick:()=>n.fire("clickTimezonesCollapseBtn",t)},p("span",{className:r,role:"img"}))}function Hc(){return Hc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hc.apply(this,arguments)}function Fc(e){let{label:t,offset:n,tooltip:r,width:o=100,left:i}=e;return p("div",{title:r,className:yt(Vl("timezone-label")),style:{width:wt(o),height:wt(100),left:wt(i)},role:"gridcell"},p(oo,{template:"timezoneDisplayLabel",param:{displayLabel:t,timezoneOffset:n},as:"span"}))}function zc(e){let{top:t}=e;const n=Yr(uo),{width:r}=No(yo),o=fo(),{showTimezoneCollapseButton:i,timezonesCollapsed:a}=function(){const e=Yr(bc),t=Yr(xc);return ne((()=>({showTimezoneCollapseButton:e,timezonesCollapsed:t})),[e,t])}();if(n.length<=1)return null;const l=n.map((e=>{let{displayLabel:t,timezoneName:n,tooltip:r}=e;return At()(t)?{label:null,offset:o(n).getTimezoneOffset(),tooltip:null!=r?r:n}:{label:t,offset:null,tooltip:null!=r?r:n}})),[c,...s]=l,u=s.reverse(),d=100/(a?1:n.length);return p("div",{style:{top:t,width:r},role:"columnheader",className:yt("timezone-labels-slot")},!a&&u.map(((e,t)=>{var n;return p(Fc,Hc({key:"subTimezone-".concat(null!==(n=e.label)&&void 0!==n?n:e.offset),width:d,left:d*t},e))})),i&&p(Lc,{isCollapsed:a}),p(Fc,Hc({width:d,left:d*u.length},c)))}const Wc={MONTH:"month",WEEK:"week",DAY:"day"},Bc=["milestone","task"],jc=["allday","time"];function Gc(e,t){const n=[];return!0===e?n.push(...Bc):Array.isArray(e)&&n.push(...e),!0===t?n.push(...jc):Array.isArray(t)&&n.push(...t),n}function Uc(e){const t=Yr(co),n=fo();return ne((()=>{if("Local"===t)return e;const r=$t(new nn),{timedEvents:o=Jn(),totalEvents:i=Jn()}=e.groupBy((e=>"time"===e.category?"timedEvents":"totalEvents"));return o.each((e=>{const o=(a=e,Object.assign(Object.create(Object.getPrototypeOf(a)),a));var a;let l=n(t,o.start),c=n(t,o.end);r?($t(l)||(l=l.addHours(1)),$t(c)||(c=c.addHours(1))):($t(l)&&(l=l.addHours(-1)),$t(c)&&(c=c.addHours(-1))),o.start=l,o.end=c,i.add(o)})),i}),[e,t,n])}function Yc(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];const o=ne((()=>e.events.filter(Zn.and(...n))),[e.events,n]),i=Uc(o);return ne((()=>({...e,events:i})),[e,i])}function Vc(e,t){ga(eo,(n=>{let{y:r,draggingItemType:o,draggingState:i}=n;if(jt(e)&&function(e){return/^(event|gridSelection)\/timeGrid/.test(null!=e?e:"")}(o)&&i===ar.DRAGGING&&jt(r)){const{offsetTop:n,offsetHeight:o,scrollHeight:i}=e,a=Math.floor(i/t),l=n+o;if(r<n+a){const t=r-(n+a);e.scrollTop=Math.max(0,e.scrollTop+t)}else if(r>l-a){const t=r-(l-a);e.scrollTop=Math.min(o,e.scrollTop+t)}}}))}function $c(e){var t,n,r;return null===(t=e.weekViewLayout)||void 0===t||null===(n=t.dayGridRows)||void 0===n||null===(r=n.time)||void 0===r?void 0:r.height}function Xc(e){const t=Yr($c),[n,r]=Z(null);return ee((()=>{jt(t)&&e&&r(e.offsetTop)}),[t,e]),n}function qc(e){let{rowIndex:t,weekDates:n,narrowWeekend:r}=e;const o=Yr(re((e=>e.gridSelection.accumulated.dayGridMonth.map((e=>xi.calculateSelection(e,t,n.length)))),[t,n]));return p("div",{className:yt("accumulated-grid-selection")},o.map((e=>e?p(wi,{type:"accumulated",gridSelectionData:e,weekDates:n,narrowWeekend:r}):null)))}function Kc(e){let{type:t,number:n,onClickButton:r,className:o}=e;const{reset:i}=$r("dnd");return p("button",{type:"button",onMouseDown:e=>{e.stopPropagation()},onClick:()=>{i(),r()},className:o},p(oo,{template:"monthGrid".concat(t===Lo.header?"Header":"Footer","Exceed"),param:n}))}function Zc(e){let{date:t,theme:n,renderDate:r,isToday:o}=e;const i=t.getDay(),a=r.getMonth()===t.getMonth(),{common:{holiday:l,saturday:c,today:s,dayName:u},month:{dayExceptThisMonth:d,holidayExceptThisMonth:f}}=n;return o?s.color:Ln(i)?a?l.color:f.color:Hn(i)?a?c.color:d.color:a?u.color:d.color}function Jc(){const e=No(mo),t=Oo();return ne((()=>({common:e,month:t})),[e,t])}function Qc(e){let{type:t=Lo.header,exceedCount:n=0,date:r,onClickExceedCount:o}=e;const{renderDate:i}=Yr(Jr),[,a]=po(),l=Jc(),c=l.month.gridCell["".concat(t,"Height")],s=kn(r,"YYYYMMDD"),u=kn(a(),"YYYYMMDD"),d=s===u,f={date:kn(r,"YYYY-MM-DD"),day:r.getDay(),hiddenEventCount:n,isOtherMonth:r.getMonth()!==i.getMonth(),isToday:s===u,month:r.getMonth(),ymd:s},h={color:Zc({date:r,theme:l,isToday:d,renderDate:i})},m="monthGrid".concat(pr(t));return Bt(c)?null:p("div",{className:yt("grid-cell-".concat(t)),style:{height:c}},p("span",{className:yt("grid-cell-date"),style:h},p(oo,{template:m,param:f})),n?p(Kc,{type:t,number:n,onClickButton:o,className:yt("grid-cell-more-events")}):null)}function es(e){let{layoutContainer:t,cell:n,popupSize:r}=e;const o=function(e,t,n){const{width:r,height:o,left:i,top:a}=t,{width:l,height:c}=e,s=i+r,u=a+o;let d=n.left+n.width/2-l/2,{top:f}=n;const p=d+l>s,h=f+c>u;return d<i&&(d=i),p&&(d=s-l),f<a&&(f=a),h&&(f=u-c),{top:f+window.scrollY,left:d+window.scrollX}}(r,t.getBoundingClientRect(),n.getBoundingClientRect());return{...r,...o}}function ts(e,t,n){const{width:r,height:o}=No(wo),[i,a]=Pa(),[l,c]=Z(null);return Q((()=>{if(n&&t&&i){const a=function(e){let{grid:t,offsetWidth:n,eventLength:r,layerSize:o}=e;const i=Nr(t).height+10;let a=n+10;const{width:l,height:c}=o;a=Math.max(a,280);let s=61;return s+=r<=10?26*r:260,l&&(a=l),c&&(s=c),(isNaN(s)||s<i)&&(s=i),{width:a,height:s}}({grid:t,offsetWidth:i.offsetWidth,eventLength:e,layerSize:{width:r,height:o}}),l=es({cell:i,layoutContainer:n,popupSize:a});c(l)}}),[n,i,e,t,r,o]),{popupPosition:l,containerRefCallback:a}}function ns(e){return e.month.weekend.backgroundColor}function rs(e){let{date:t,events:n=[],style:r,parentContainer:o,contentAreaHeight:i}=e;const a=la(),{showSeeMorePopup:l}=$r("popup"),c=No(ns),{popupPosition:s,containerRefCallback:u}=ts(n.length,o,a),d=re((()=>{s&&l({date:t,popupPosition:s,events:n})}),[t,n,s,l]),f=ii(n,i,26);return p("div",{className:yt("daygrid-cell"),style:{...r,backgroundColor:Rn(t.getDay())?c:"inherit"},ref:u},p(Qc,{type:Lo.header,exceedCount:f,date:t,onClickExceedCount:d}),p(Qc,{type:Lo.footer,exceedCount:f,date:t,onClickExceedCount:d}))}const os=Mi((function(e){let{week:t,rowInfo:n,gridDateEventModelMap:r={},contentAreaHeight:o}=e;const[i,a]=Pa(),l=No(re((e=>e.common.border),[]));return p("div",{className:yt("weekday-grid"),style:{borderTop:l},ref:a},t.map(((e,t)=>{const a=e.getDay(),{width:l,left:c}=n[t],s=kn(Cn(e),"YYYYMMDD");return p(rs,{key:"daygrid-cell-".concat(a),date:e,style:{width:wt(l),left:wt(c)},parentContainer:i,events:r[s],contentAreaHeight:o})})))}));function is(e){let{weekDates:t,narrowWeekend:n,rowIndex:r}=e;const o=Yr(re((e=>xi.calculateSelection(e.gridSelection.dayGridMonth,r,t.length)),[r,t.length]));return Bt(o)?null:p(wi,{type:"month",gridSelectionData:o,weekDates:t,narrowWeekend:n})}const as=Mi((function(e){let{contentAreaHeight:t,eventHeight:n=ni,events:r,name:o,className:i}=e;const{headerHeight:a}=No(_o),l=r.filter(oi(t,n+2)).map((e=>p(Ca,{key:"".concat(o,"-DayEvent-").concat(e.cid()),uiModel:e,eventHeight:n,headerHeight:null!=a?a:27})));return p("div",{className:i},l)}));function ls(e){let{dateMatrix:t,gridPositionFinder:n,rowInfo:r,rowIndex:o}=e;const i=function(e){let{dateMatrix:t,rowInfo:n,gridPositionFinder:r,rowIndex:o}=e;const i=lo(),{isDraggingEnd:a,isDraggingCanceled:l,draggingEvent:c,clearDraggingEvent:s}=Ma("dayGrid","move"),[u,d]=Ia(r),f=ne((()=>{let e=null;var t,r;return c&&(null==u?void 0:u.rowIndex)===o&&(e=c,e.left=n[null!==(t=null==u?void 0:u.columnIndex)&&void 0!==t?t:0].left,e.width=n[null!==(r=null==u?void 0:u.columnIndex)&&void 0!==r?r:0].width),e}),[c,null==u?void 0:u.rowIndex,null==u?void 0:u.columnIndex,o,n]);return Ea((()=>{if(!l&&jt(f)&&jt(u)){const e=f.model.getStarts(),n=f.duration(),r=Un(t[u.rowIndex][u.columnIndex],e)*_n,o=new nn(e.getTime()+r),a=new nn(o.getTime()+n);i.fire("beforeUpdateEvent",{event:f.model.toEventObject(),changes:{start:o,end:a}})}s(),d()}),a),f}({dateMatrix:t,rowInfo:r,gridPositionFinder:n,rowIndex:o});return Bt(i)?null:p(Ca,{uiModel:i,movingLeft:i.left,eventHeight:ni,headerHeight:30})}function cs(e,t){return{startColumnIndex:Math.max(ci(e.getStarts(),t),0),endColumnIndex:ci(e.getEnds(),t)}}function ss(e){let{dateMatrix:t,cellWidthMap:n,gridPositionFinder:r,renderedUIModels:o,rowIndex:i}=e;const a=function(e){let{dateMatrix:t,gridPositionFinder:n,renderedUIModels:r,cellWidthMap:o,rowIndex:i}=e;const a=lo(),{isDraggingEnd:l,isDraggingCanceled:c,draggingEvent:s,clearDraggingEvent:u}=Ma("dayGrid","resize"),[d,f]=Ia(n),[p,h]=Z(null),m=re((()=>{h(null),f(),u()}),[f,u]),g=ne((()=>{if(Bt(s))return null;const e=r.map((e=>{let{uiModels:t}=e;return t.filter((e=>e.cid()===s.cid()))})),n=e.findIndex((e=>e.length>0)),o=dn(e,(e=>e.length>0)),i=cs(e[n][0],t[n]),a=cs(e[o][0],t[o]);return{eventStartDateColumnIndex:i.startColumnIndex,eventStartDateRowIndex:n,eventEndDateColumnIndex:a.endColumnIndex,eventEndDateRowIndex:o,resizeTargetUIModelRows:e}}),[t,r,s]),v=jt(g)&&jt(s)&&jt(d);return Q((()=>{if(v&&i===g.eventStartDateRowIndex){const{eventStartDateRowIndex:e,eventStartDateColumnIndex:n}=g,r=g.resizeTargetUIModelRows[e][0].clone();let a;e===d.rowIndex?a=o[n][Math.max(n,d.columnIndex)]:e>d.rowIndex?a=o[n][n]:(a=o[n][t[i].length-1],r.setUIProps({exceedRight:!0})),h([r,a])}}),[g,v,o,d,t,i]),Q((()=>{if(v&&g.eventStartDateRowIndex<i&&i<d.rowIndex){const e=s.clone();e.setUIProps({left:0,exceedLeft:!0,exceedRight:!0}),h([e,"100%"])}}),[g,v,d,s,i]),Q((()=>{if(v&&g.eventStartDateRowIndex<d.rowIndex&&i===d.rowIndex){const e=s.clone();e.setUIProps({left:0,exceedLeft:!0}),h([e,o[0][d.columnIndex]])}}),[g,v,o,d,s,i]),Q((()=>{v&&i>g.eventStartDateRowIndex&&i>d.rowIndex&&h(null)}),[v,d,g,i]),Ea((()=>{if(v){const{eventStartDateColumnIndex:e,eventStartDateRowIndex:n}=g;if(!c&&(d.rowIndex===n&&d.columnIndex>=e||d.rowIndex>n)){const e=t[d.rowIndex][d.columnIndex];a.fire("beforeUpdateEvent",{event:s.model.toEventObject(),changes:{end:e}})}}m()}),l),p}({dateMatrix:t,gridPositionFinder:r,cellWidthMap:n,renderedUIModels:o,rowIndex:i});if(Bt(a))return null;const[l,c]=a;return p("div",{className:yt("weekday-events")},p(Ca,{key:"resizing-event-".concat(l.cid()),uiModel:l,eventHeight:ft,headerHeight:30,resizingWidth:c}))}function us(e){let{dateMatrix:t=[],rowInfo:n=[],cellWidthMap:r=[]}=e;const[o,i]=Pa(),a=Yr(qr),{ref:l,cellContentAreaHeight:c}=function(e){const t=Yr(wc),{headerHeight:n,footerHeight:r}=No(_o),o=te(null),[i,a]=Z(0);return Q((()=>{if(o.current){const i=Nr(o.current).height-(3+(null!=n?n:27))-(null!=r?r:0),l=t*(e+2);a(Math.min(i,l))}}),[r,n,e,t]),{ref:o,cellContentAreaHeight:i}}(ft),{eventFilter:s,month:u,isReadOnly:d}=Yr(Qr),{narrowWeekend:f,startDayOfWeek:h}=u,m=100/t.length,g=ne((()=>vi({container:o,rowsCount:t.length,columnsCount:t[0].length,narrowWeekend:f,startDayOfWeek:h})),[t,o,f,h]),v=Yc(a,s),y=ne((()=>t.map((e=>ui(e,v,f)))),[v,t,f]);return p("div",{ref:i,onMouseDown:ba(!d,Ha({type:"dayGridMonth",gridPositionFinder:g,dateCollection:t,dateGetter:xi.getDateFromCollection,selectionSorter:xi.sortSelection})),className:yt("month-daygrid")},t.map(((e,o)=>{const{uiModels:i,gridDateEventModelMap:a}=y[o];return p("div",{key:"dayGrid-events-".concat(o),className:yt("month-week-item"),style:{height:wt(m)},ref:l},p("div",{className:yt("weekday")},p(os,{gridDateEventModelMap:a,week:e,rowInfo:n,contentAreaHeight:c}),p(as,{name:"month",events:i,contentAreaHeight:c,eventHeight:ft,className:yt("weekday-events")}),p(is,{weekDates:e,narrowWeekend:f,rowIndex:o}),p(qc,{rowIndex:o,weekDates:e,narrowWeekend:f})),p(ss,{dateMatrix:t,gridPositionFinder:g,rowIndex:o,cellWidthMap:r,renderedUIModels:y}),p(ls,{dateMatrix:t,gridPositionFinder:g,rowIndex:o,rowInfo:n}))})))}const ds={month:function(){const e=Yr(Qr),{renderDate:t}=Yr(Jr),n=function(e){const{dayNames:t,startDayOfWeek:n,workweek:r}=e.month,o=[...Array(7)].map(((e,t)=>(n+t)%7)),i=o.map((e=>({day:e,label:pr(t[e])})));return i.filter((e=>!r||!Rn(e.day)))}(e),r=e.month,{narrowWeekend:o,startDayOfWeek:i,workweek:a}=r,l=ne((()=>hi(t,r)),[r,t]),{rowStyleInfo:c,cellWidthMap:s}=ne((()=>zn(n.length,o,i,a)),[n.length,o,i,a]),u=c.map(((e,t)=>({...e,date:l[0][t]})));return p(Bl,{className:yt("month")},p(Ro,{type:"month",dayNames:n,options:r,rowStyleInfo:c}),p(us,{dateMatrix:l,rowInfo:u,cellWidthMap:s}))},week:function(){var e,t;const{options:n,calendar:r,gridRowLayout:o,lastPanelType:i,renderDate:a}=function(){const e=Yr(Qr),t=Yr(qr),{dayGridRows:n,lastPanelType:r}=Yr(Kr),{renderDate:o}=Yr(Jr);return ne((()=>({options:e,calendar:t,gridRowLayout:n,lastPanelType:r,renderDate:o})),[t,n,r,e,o])}(),l=No(re((e=>e.week.dayGridLeft.width),[])),c=Yr(co),[s,u]=Pa(),d=n.week,{narrowWeekend:f,startDayOfWeek:h,workweek:m,hourStart:g,hourEnd:v,eventView:y,taskView:w,timeStep:_}=d,b=ne((()=>mi(a,d)),[a,d]),x=gr(b,null!==(e=null===(t=n.week)||void 0===t?void 0:t.dayNames)&&void 0!==e?e:[]),{rowStyleInfo:D,cellWidthMap:k}=zn(b.length,f,h,m),S=Yc(r,n.eventFilter),C=ne((()=>{const[e,t]="Local"===c?[Cn(sn(b)),An(un(b))]:[Cn(Gn(sn(b),-1)),An(Gn(un(b),1))];return pi(b,S,{narrowWeekend:f,hourStart:g,hourEnd:v,weekStartDate:e,weekEndDate:t})}),[S,v,g,f,c,b]),E=ne((()=>gi(b,{hourStart:g,hourEnd:v,narrowWeekend:f,timeStep:_})),[v,g,f,b,_]),I=Gc(w,y),M=I.map((e=>{var t,n;if("time"===e)return null;const r=e;return p(Ul,{name:r,key:r,resizable:r!==i},"allday"===r?p(Fa,{events:C[r],rowStyleInfo:D,gridColWidthMap:k,weekDates:b,height:null===(t=o[r])||void 0===t?void 0:t.height,options:d}):p(za,{category:r,events:C[r],weekDates:b,height:null===(n=o[r])||void 0===n?void 0:n.height,options:d,gridColWidthMap:k}))})),T=ne((()=>I.includes("time")),[I]);Vc(s,E.rows.length);const N=Xc(s);return p(Bl,{className:yt("week-view"),autoAdjustPanels:!0},p(Ul,{name:"week-view-day-names",initialHeight:44},p(Ro,{type:"week",dayNames:x,marginLeft:l,options:d,rowStyleInfo:D})),M,T?p(Ul,{name:"time",autoSize:1,ref:u},p(Rc,{events:C.time,timeGridData:E}),p(zc,{top:N})):null)},day:function(){var e,t;const{calendar:n,options:r,gridRowLayout:o,lastPanelType:i,renderDate:a}=function(){const e=Yr(qr),t=Yr(Qr),{dayGridRows:n,lastPanelType:r}=Yr(Kr),{renderDate:o}=Yr(Jr);return ne((()=>({calendar:e,options:t,gridRowLayout:n,lastPanelType:r,renderDate:o})),[e,t,n,r,o])}(),l=Yr(co),c=No(re((e=>e.week.dayGridLeft.width),[])),[s,u]=Pa(),d=r.week,{narrowWeekend:f,startDayOfWeek:h,workweek:m,hourStart:g,hourEnd:v,eventView:y,taskView:w,timeStep:_}=d,b=ne((()=>[a]),[a]),x=gr(b,null!==(e=null===(t=r.week)||void 0===t?void 0:t.dayNames)&&void 0!==e?e:[]),{rowStyleInfo:D,cellWidthMap:k}=zn(b.length,f,h,m),S=Yc(n,r.eventFilter),C=ne((()=>{const[e,t]="Local"===l?[Cn(b[0]),An(b[0])]:[Cn(Gn(b[0],-1)),An(Gn(b[0],1))];return pi(b,S,{narrowWeekend:f,hourStart:g,hourEnd:v,weekStartDate:e,weekEndDate:t})}),[S,b,v,g,f,l]),E=ne((()=>gi(b,{hourStart:g,hourEnd:v,narrowWeekend:f,timeStep:_})),[b,v,g,f,_]),I=Gc(w,y),M=I.map((e=>{var t,n;if("time"===e)return null;const r=e;return p(Ul,{key:r,name:r,resizable:r!==i},"allday"===r?p(Fa,{events:C[r],rowStyleInfo:D,gridColWidthMap:k,weekDates:b,height:null===(t=o[r])||void 0===t?void 0:t.height,options:d}):p(za,{category:r,events:C[r],weekDates:b,height:null===(n=o[r])||void 0===n?void 0:n.height,options:d,gridColWidthMap:k}))}));Vc(s,E.rows.length);const T=Xc(s);return p(Bl,{className:yt("day-view"),autoAdjustPanels:!0},p(Ul,{name:"day-view-day-names",initialHeight:43},p(Ro,{type:"week",dayNames:x,marginLeft:c,rowStyleInfo:D})),M,I.includes("time")?p(Ul,{name:"time",autoSize:1,ref:u},p(Rc,{events:C.time,timeGridData:E}),p(zc,{top:T})):null)}};function fs(){const{currentView:e}=Yr(Jr);return p(ne((()=>ds[e]||(()=>null)),[e]),null)}var ps=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|^--/i,hs=/[&<>"]/;function ms(e){var t=String(e);return hs.test(t)?t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"):t}var gs=function(e,t){return String(e).replace(/(\n+)/g,"$1"+(t||"\t"))},vs=function(e,t,n){return String(e).length>(t||40)||!n&&-1!==String(e).indexOf("\n")||-1!==String(e).indexOf("<")},ys={};function ws(e){var t="";for(var n in e){var r=e[n];null!=r&&""!==r&&(t&&(t+=" "),t+="-"==n[0]?n:ys[n]||(ys[n]=n.replace(/([A-Z])/g,"-$1").toLowerCase()),t+=": ",t+=r,"number"==typeof r&&!1===ps.test(n)&&(t+="px"),t+=";")}return t||void 0}function _s(e,t){for(var n in t)e[n]=t[n];return e}function bs(e,t){return Array.isArray(t)?t.reduce(bs,e):null!=t&&!1!==t&&e.push(t),e}var xs={shallow:!0},Ds=[],ks=/^(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/,Ss=/[\s\n\\/='"\0<>]/;function Cs(){this.__d=!0}Is.render=Is;var Es=[];function Is(e,n,r){n=n||{},r=r||{};var o=t.__s;t.__s=!0;var i=Ms(e,n,r);return t.__c&&t.__c(e,Es),Es.length=0,t.__s=o,i}function Ms(e,n,r,o,i,a){if(null==e||"boolean"==typeof e)return"";if("object"!=typeof e)return ms(e);var l=r.pretty,c=l&&"string"==typeof l?l:"\t";if(Array.isArray(e)){for(var s="",u=0;u<e.length;u++)l&&u>0&&(s+="\n"),s+=Ms(e[u],n,r,o,i,a);return s}var d,f=e.type,p=e.props,h=!1;if("function"==typeof f){if(h=!0,!r.shallow||!o&&!1!==r.renderRootComponent){if(f===m){var g=[];return bs(g,e.props.children),Ms(g,n,r,!1!==r.shallowHighOrder,i,a)}var v,y=e.__c={__v:e,context:n,props:e.props,setState:Cs,forceUpdate:Cs,__d:!0,__h:[]};t.__b&&t.__b(e);var w=t.__r;if(f.prototype&&"function"==typeof f.prototype.render){var _=f.contextType,b=_&&n[_.__c],x=null!=_?b?b.props.value:_.__:n;(y=e.__c=new f(p,x)).__v=e,y._dirty=y.__d=!0,y.props=p,null==y.state&&(y.state={}),null==y._nextState&&null==y.__s&&(y._nextState=y.__s=y.state),y.context=x,f.getDerivedStateFromProps?y.state=_s(_s({},y.state),f.getDerivedStateFromProps(y.props,y.state)):y.componentWillMount&&(y.componentWillMount(),y.state=y._nextState!==y.state?y._nextState:y.__s!==y.state?y.__s:y.state),w&&w(e),v=y.render(y.props,y.state,y.context)}else for(var D=f.contextType,k=D&&n[D.__c],S=null!=D?k?k.props.value:D.__:n,C=0;y.__d&&C++<25;)y.__d=!1,w&&w(e),v=f.call(e.__c,p,S);return y.getChildContext&&(n=_s(_s({},n),y.getChildContext())),t.diffed&&t.diffed(e),Ms(v,n,r,!1!==r.shallowHighOrder,i,a)}f=(d=f).displayName||d!==Function&&d.name||function(e){var t=(Function.prototype.toString.call(e).match(/^\s*function\s+([^( ]+)/)||"")[1];if(!t){for(var n=-1,r=Ds.length;r--;)if(Ds[r]===e){n=r;break}n<0&&(n=Ds.push(e)-1),t="UnnamedComponent"+n}return t}(d)}var E,I,M="<"+f;if(p){var T=Object.keys(p);r&&!0===r.sortAttributes&&T.sort();for(var N=0;N<T.length;N++){var O=T[N],P=p[O];if("children"!==O){if(!Ss.test(O)&&(r&&r.allAttributes||"key"!==O&&"ref"!==O&&"__self"!==O&&"__source"!==O)){if("defaultValue"===O)O="value";else if("defaultChecked"===O)O="checked";else if("defaultSelected"===O)O="selected";else if("className"===O){if(void 0!==p.class)continue;O="class"}else i&&/^xlink:?./.test(O)&&(O=O.toLowerCase().replace(/^xlink:?/,"xlink:"));if("htmlFor"===O){if(p.for)continue;O="for"}"style"===O&&P&&"object"==typeof P&&(P=ws(P)),"a"===O[0]&&"r"===O[1]&&"boolean"==typeof P&&(P=String(P));var A=r.attributeHook&&r.attributeHook(O,P,n,r,h);if(A||""===A)M+=A;else if("dangerouslySetInnerHTML"===O)I=P&&P.__html;else if("textarea"===f&&"value"===O)E=P;else if((P||0===P||""===P)&&"function"!=typeof P){if(!(!0!==P&&""!==P||(P=O,r&&r.xml))){M=M+" "+O;continue}if("value"===O){if("select"===f){a=P;continue}"option"===f&&a==P&&void 0===p.selected&&(M+=" selected")}M=M+" "+O+'="'+ms(P)+'"'}}}else E=P}}if(l){var R=M.replace(/\n\s*/," ");R===M||~R.indexOf("\n")?l&&~M.indexOf("\n")&&(M+="\n"):M=R}if(M+=">",Ss.test(f))throw new Error(f+" is not a valid HTML tag name in "+M);var L,H=ks.test(f)||r.voidElements&&r.voidElements.test(f),F=[];if(I)l&&vs(I)&&(I="\n"+c+gs(I,c)),M+=I;else if(null!=E&&bs(L=[],E).length){for(var z=l&&~M.indexOf("\n"),W=!1,B=0;B<L.length;B++){var j=L[B];if(null!=j&&!1!==j){var G=Ms(j,n,r,!0,"svg"===f||"foreignObject"!==f&&i,a);if(l&&!z&&vs(G)&&(z=!0),G)if(l){var U=G.length>0&&"<"!=G[0];W&&U?F[F.length-1]+=G:F.push(G),W=U}else F.push(G)}}if(l&&z)for(var Y=F.length;Y--;)F[Y]="\n"+c+gs(F[Y],c)}if(F.length||I)M+=F.join("");else if(r&&r.xml)return M.substring(0,M.length-1)+" />";return!H||L||I?(l&&~M.indexOf("\n")&&(M+="\n"),M=M+"</"+f+">"):M=M.replace(/>$/," />"),M}Is.shallowRender=function(e,t){return Is(e,t,xs)};var Ts=Is,Ns=r(1391),Os=r.n(Ns);function Ps(e){let{theme:t,store:n,eventBus:r,children:o}=e;return p(ao,{value:r},p(Mo,{store:t},p(Ur,{store:n},p(Za,null,o))))}var As=r(2278),Rs=r.n(As);class Ls extends(Rs()){on(e,t){return super.on(e,t),this}off(e,t){return super.off(e,t),this}fire(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return super.fire(e,...n),this}once(e,t){return super.once(e,t),this}}var Hs=class extends class{constructor(e){var t,n;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.container=gt()(e)?null!==(t=null===(n=document)||void 0===n?void 0:n.querySelector(e))&&void 0!==t?t:null:e,this.theme=function(){return jr(Io(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}))}(r.theme),this.eventBus=new Ls,this.store=function(){return jr(Gr(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}))}(r),this.renderRange=this.calculateRenderRange(Cn()),no().addHook("beforeSanitizeAttributes",(e=>{if("A"===e.tagName){const t=e.getAttribute("target");t?e.setAttribute(ro,t):e.setAttribute("target","_self")}})),no().addHook("afterSanitizeAttributes",(e=>{"A"===e.tagName&&e.hasAttribute(ro)&&(e.setAttribute("target",e.getAttribute(ro)),e.removeAttribute(ro),"_blank"===e.getAttribute("target")&&e.setAttribute("rel","noopener"))})),!0===this.getStoreState().options.usageStatistics&&Os()("calendar","UA-129951699-1")}getStoreState(e){const t=this.store.getState();return e?t[e]:t}getStoreDispatchers(e){const t=this.store.getState().dispatch;return e?t[e]:t}destroy(){this.container&&Qi(this.container),this.store.clearListeners(),this.theme.clearListeners(),this.eventBus.off(),no().removeAllHooks();for(const e in this)this.hasOwnProperty(e)&&delete this[e]}calculateMonthRenderDate(e){let{renderDate:t,offset:n,monthOptions:r}=e,o=new nn(t);const{visibleWeeksCount:i}=r;o=i>0?Gn(o,7*n*i):function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const n=In(e);if(0!==t){const e=n.getDate(),r=new nn(n.getTime());if(r.setMonth(n.getMonth()+t+1,0),e>=r.getDate())return r;n.setFullYear(r.getFullYear(),r.getMonth(),e)}return n}(o,n);const a=hi(o,r),[[l]]=a;return{renderDate:o,renderRange:{start:l,end:un(un(a))}}}calculateWeekRenderDate(e){let{renderDate:t,offset:n,weekOptions:r}=e;const o=new nn(t);o.addDate(7*n);const i=mi(o,r),[a]=i;return{renderDate:o,renderRange:{start:a,end:un(i)}}}calculateDayRenderDate(e){let{renderDate:t,offset:n}=e;const r=new nn(t);r.addDate(n);return{renderDate:r,renderRange:{start:Cn(r),end:An(r)}}}move(e){if(Bt(e))return;const{currentView:t,renderDate:n}=this.getStoreState().view,{options:r}=this.getStoreState(),{setRenderDate:o}=this.getStoreDispatchers().view,i=new nn(n);let a={renderDate:i,renderRange:{start:new nn(i),end:new nn(i)}};"month"===t?a=this.calculateMonthRenderDate({renderDate:n,offset:e,monthOptions:r.month}):"week"===t?a=this.calculateWeekRenderDate({renderDate:n,offset:e,weekOptions:r.week}):"day"===t&&(a=this.calculateDayRenderDate({renderDate:n,offset:e})),o(a.renderDate),this.renderRange=a.renderRange}createEvents(e){const{createEvents:t}=this.getStoreDispatchers("calendar");t(e)}getEventModel(e,t){const{events:n}=this.getStoreState("calendar");return n.find((n=>{let{id:r,calendarId:o}=n;return r===e&&o===t}))}getEvent(e,t){var n,r;return null!==(n=null===(r=this.getEventModel(e,t))||void 0===r?void 0:r.toEventObject())&&void 0!==n?n:null}updateEvent(e,t,n){const{updateEvent:r}=this.getStoreDispatchers("calendar"),o=this.getEventModel(e,t);o&&r({event:o,eventData:n})}deleteEvent(e,t){const{deleteEvent:n}=this.getStoreDispatchers("calendar"),r=this.getEventModel(e,t);r&&n(r)}setCalendarVisibility(e,t){const{setCalendarVisibility:n}=this.getStoreDispatchers("calendar");n(Array.isArray(e)?e:[e],t)}render(){return jt(this.container)&&R(p(Ps,{theme:this.theme,store:this.store,eventBus:this.eventBus},this.getComponent()),this.container),this}renderToString(){return Ts(p(Ps,{theme:this.theme,store:this.store,eventBus:this.eventBus},this.getComponent()))}clear(){const{clearEvents:e}=this.getStoreDispatchers("calendar");e()}scrollToNow(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"auto";this.eventBus.fire("scrollToNow",e)}calculateRenderRange(e){const{currentView:t}=this.getStoreState().view,{options:n}=this.getStoreState(),r=new nn(e);let o={start:new nn(r),end:new nn(r)};return"month"===t?o=this.calculateMonthRenderDate({renderDate:e,offset:0,monthOptions:n.month}).renderRange:"week"===t?o=this.calculateWeekRenderDate({renderDate:e,offset:0,weekOptions:n.week}).renderRange:"day"===t&&(o=this.calculateDayRenderDate({renderDate:e,offset:0}).renderRange),o}today(){const{setRenderDate:e}=this.getStoreDispatchers().view,t=new nn;e(t),this.renderRange=this.calculateRenderRange(t)}setDate(e){const{setRenderDate:t}=this.getStoreDispatchers("view"),n=new nn(e);t(n),this.renderRange=this.calculateRenderRange(n)}next(){this.move(1)}prev(){this.move(-1)}setCalendarColor(e,t){const{setCalendarColor:n}=this.getStoreDispatchers().calendar;n(e,t)}changeView(e){const{changeView:t}=this.getStoreDispatchers("view");t(e),this.renderRange=this.calculateRenderRange(this.getDate())}getElement(e,t){return this.getEvent(e,t)&&this.container?this.container.querySelector('[data-event-id="'.concat(e,'"][data-calendar-id="').concat(t,'"]')):null}setTheme(e){const{setTheme:t}=this.theme.getState().dispatch;t(e)}getOptions(){const{options:e,template:t}=this.getStoreState(),{dispatch:n,...r}=this.theme.getState();return{...e,template:t,theme:r}}setOptions(e){const{theme:t,template:n,...r}=e,{setTheme:o}=this.theme.getState().dispatch,{options:{setOptions:i},template:{setTemplate:a}}=this.getStoreDispatchers();jt(t)&&o(t),jt(n)&&a(n),i(r)}getDate(){const{renderDate:e}=this.getStoreState().view;return e}getDateRangeStart(){return this.renderRange.start}getDateRangeEnd(){return this.renderRange.end}getViewName(){const{currentView:e}=this.getStoreState("view");return e}setCalendars(e){const{setCalendars:t}=this.getStoreDispatchers().calendar;t(e)}openFormPopup(e){const{showFormPopup:t}=this.getStoreDispatchers().popup,n=new qn(e),{title:r,location:o,start:i,end:a,isAllday:l,isPrivate:c,state:s}=n;t({isCreationPopup:!0,event:n,title:r,location:o,start:i,end:a,isAllday:l,isPrivate:c,eventState:s})}clearGridSelections(){const{clearAll:e}=this.getStoreDispatchers().gridSelection;e()}fire(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return this.eventBus.fire(e,...n),this}off(e,t){return this.eventBus.off(e,t),this}on(e,t){return this.eventBus.on(e,t),this}once(e,t){return this.eventBus.once(e,t),this}}{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(e,t);const{defaultView:n="week"}=t;if(r=n,!Object.values(Wc).find((e=>e===r)))throw new Nt(n);var r;this.render()}getComponent(){return p(fs,null)}}}(),o=o.default}()}));;/*</editor-fold desc="js_tui_calendar.min.js">*/
/*<editor-fold desc="js_componente_editor_textos_articulados.js">*//*
 {ipm "async": false, "bundle": "componentes", "priority": 900}
*/
var ComponenteEditorTextosArticulados=function(b,d){this.nome=b;this.iniciaComponente=function(c){var a=montaProxyComponente(this,"js_editor_textos_articulados.min.js","css_editor_textos_articulados.css",{setEtapa:null,getValor:null},function(){c.obj=a.obj;a.componente=new ComponenteEditorTextosArticuladosImpl(c)});a.criaObjeto.apply(a,["div"]);a.setClass("estrutura_editor_textos_articulados");return a};this.isIniciado=function(){return null!==this.componente};if(b)return this.iniciaComponente(d)};
ComponenteEditorTextosArticulados.prototype=new ComponenteForm;;/*</editor-fold desc="js_componente_editor_textos_articulados.js">*/
/*<editor-fold desc="js_componentes_proxy.js">*//*
 {ipm "async": false, "bundle": "componentes", "priority": 900}
*/
function montaProxyComponente(d,c,a,b,g,l){var h=new Proxy(d,{get:function(f,e){if("componente"==e&&!window.__bDepuraProxy)return null;if(("destroy"==e||void 0!==b[e])&&f.componente&&"function"===typeof f.componente[e])return f.componente[e].bind(f.componente);var m=Reflect.get.apply(f,arguments);return f.componente||void 0===b[e]?m:function(){var k=this,n=arguments;h.promise.then(function(){k[e]&&k[e].apply(k,n)});return b[e]}}});Object.keys(b).forEach(function(f){h[f]=null});h.promise=new Promise(function(f){h.onAfterAppend(function(){if(!1===
l){var e=null;executaProximoLoopAnimacao(function(){!1!==e&&(e=h.obj.getJanela())&&e.hide()})}else h.obj.bloqueiaJanela();a&&includeStyleSheet(a);includeJavaScript(c,function(){!1===l?e?e.show():e=!1:h.obj.desbloqueiaJanela();g(h);f()})})});return h}
var ComponenteFormProxy=function(d,c){this.componente=null;this.nome=d;this.iniciado=!1;this.iniciaComponente=function(){var a=this,b=montaProxyComponente(this,this.nomeArquivosJS,this.nomeArquivosCSS,this.blueprint,function(){a.iniciado=!0;a.fnAfterLoad.apply(a,arguments)});c.proxyComponente=b;this.fnCriaObjeto(b);return b};this.isIniciado=function(){return this.iniciado};if(d)return this.iniciaComponente()};ComponenteFormProxy.prototype=new ComponenteForm;
var ComponenteRelogio=function(d,c){c=c||{};c.divAdicional=$("<div>").addClass("estrutura_relogio_adicional");this.nomeArquivosJS="js_relogio.js";ControleBaseSistema.isLayoutV3()||(this.nomeArquivosCSS="css_relogio.css");this.blueprint={setTempo:null,getTempo:{hora:0,minuto:0,segundo:0,milissegundo:0},setTempoFromUnix:null,setAlarme:null,getAlarme:null,setMostraSegundo:null,setMostraMilissegundo:null,getDivAdicional:c.divAdicional,setHora:null,setMinuto:null,setSegundo:null,setMilissegundo:null,setFormatoHora:null,
setExibeBotoes:null,onInicia:null,onProgresso:null,onTermina:null,onAlarme:null,inicia:null,termina:null};this.fnAfterLoad=function(a){c.obj=a.obj;a.componente=new ComponenteRelogioImpl(c)};this.fnCriaObjeto=function(a){a.criaObjeto.apply(a,["article"]);a.onAfterAppend(function(){var b=a.obj.getJanela();if(b&&b.onDestroyJanela)b.onDestroyJanela(function(){a.destroy()})});a.setClass("estrutura_componente_relogio")};if(d)return ComponenteFormProxy.apply(this,[d,c])};ComponenteRelogio.prototype=new ComponenteFormProxy;
ComponenteRelogio.FORMATO_HORA_NENHUM=0;ComponenteRelogio.FORMATO_HORA_DIA=1;ComponenteRelogio.FORMATO_HORA_AM_PM=2;
var ComponenteLegenda=function(d,c){this.nomeArquivosJS="js_legenda.js";this.nomeArquivosCSS="css_legenda.css";this.blueprint={setVisualizacao:null,getVisualizacao:!1,getValor:"",getValorArray:[]};this.fnAfterLoad=function(a){c.obj=a.obj;a.componente=new ComponenteLegendaImpl(c)};this.fnCriaObjeto=function(a){a.criaObjeto.apply(a,["div"]);a.setClass("estrutura_componente_legenda")};this.setDisabled=function(a){this.setVisualizacao(a)};this.getDisabled=function(){return this.getVisualizacao()};if(d)return ComponenteFormProxy.apply(this,
[d,c])};ComponenteLegenda.prototype=new ComponenteFormProxy;var ComponenteStepByStep=function(d,c){this.nomeArquivosJS="js_step_by_step.js";this.nomeArquivosCSS="css_step_by_step.css";this.blueprint={setLink:null,atualiza:null,parseEventos:null,setSituacoes:null};this.fnAfterLoad=function(a){c.obj=a.obj;a.componente=new ComponenteStepByStepImpl(c)};this.fnCriaObjeto=function(a){a.criaObjeto.apply(a,["div"]);a.setClass("estrutura_componente_step")};if(d)return ComponenteFormProxy.apply(this,[d,c])};
ComponenteStepByStep.prototype=new ComponenteFormProxy;ComponenteStepByStep.SITUACAO_CONCLUIDO=1;ComponenteStepByStep.SITUACAO_EM_ESPERA=2;ComponenteStepByStep.SITUACAO_AGUARDANDO=3;ComponenteStepByStep.SITUACAO_ALERTA=4;ComponenteStepByStep.SITUACAO_IGNORADO=5;ComponenteStepByStep.SITUACAO_EM_PROGRESSO=6;ComponenteStepByStep.SITUACAO_CONCLUIDO_TEXTO="Concluído";ComponenteStepByStep.SITUACAO_EM_PROGRESSO_TEXTO="Em Progresso";ComponenteStepByStep.SITUACAO_ALERTA_TEXTO="Alerta";
ComponenteStepByStep.SITUACAO_IGNORADO_TEXTO="Ignorado";ComponenteStepByStep.ORIENTACAO_CIMA_BAIXO=1;ComponenteStepByStep.ORIENTACAO_ESQUERDA_DIREITA=2;ComponenteStepByStep.ORIENTACAO_BAIXO_CIMA=3;ComponenteStepByStep.ORIENTACAO_DIREITA_ESQUERDA=4;ComponenteStepByStep.VERSAO_EXPANDIDO=1;ComponenteStepByStep.VERSAO_RESUMIDO=2;
var ComponenteTabelaDados=function(d,c){this.nomeArquivosJS="js_tabela_dados.js";this.nomeArquivosCSS="css_tabela_dados.css";this.blueprint={setLink:null,setVisualizacao:null,getVisualizacao:!1,addConteudo:null,getValor:""};this.fnAfterLoad=function(a){c.obj=a.obj;a.componente=new ComponenteTabelaDadosImpl(c)};this.fnCriaObjeto=function(a){a.criaObjeto.apply(a,["div"]);a.setClass("estrutura_componente_tabela_dados")};if(d)return ComponenteFormProxy.apply(this,[d,c])};
ComponenteTabelaDados.prototype=new ComponenteFormProxy;
var ComponenteCalculadora=function(d,c){this.nomeArquivosJS=["js_componente_calculadora.js","js_decimal.min.js","js_funcao_calculo.js"];this.nomeArquivosCSS="css_componente_calculadora.css";this.blueprint={setContext:null};this.fnAfterLoad=function(a){c.obj=a.obj;a.componente=new ComponenteCalculadoraImpl(c)};this.fnCriaObjeto=function(a){a.criaObjeto.apply(a,["div"]);a.setClass("estrutura_componente_calculadora");a.onAfterAppend(function(){var b=ContextoFlutuante.fromObjeto(a.obj);b&&(a.setContext(b[0].myInstance),
b[0].myInstance.reposiciona())})};if(d)return ComponenteFormProxy.apply(this,[d,c])};ComponenteCalculadora.prototype=new ComponenteFormProxy;
var ComponenteChatbot=function(d,c){this.nomeArquivosJS=["js_componente_chatbot.js"];this.nomeArquivosCSS="";this.blueprint={};this.fnAfterLoad=function(a){c.obj=a.obj;a.componente=new ComponenteChatbotImpl(c)};this.fnCriaObjeto=function(a){a.criaObjeto.apply(a,["div"]);a.setClass("estrutura_componente_chatbot");a.onAfterAppend(function(){var b=ContextoFlutuante.fromObjeto(a.obj);b&&(a.setContext(b[0].myInstance),b[0].myInstance.reposiciona())})};if(d)return ComponenteFormProxy.apply(this,[d,c])};
ComponenteChatbot.prototype=new ComponenteFormProxy;
var ComponenteLinhaTempoResumida=function(d,c){this.componente=null;this.nome=d;this.iniciaComponente=function(a){var b=montaProxyComponente(this,"js_linha_tempo_resumida.js","css_linha_tempo_resumida.css",{setEtapas:null},function(){a.obj=b.obj;b.componente=new ComponenteLinhaTempoResumidaImpl(a)});b.criaObjeto.apply(b,["div"]);b.setClass("estrutura_componente_linha_tempo_resumida");return b};this.isIniciado=function(){return null!==this.componente};if(d)return this.iniciaComponente(c)};
ComponenteLinhaTempoResumida.prototype=new ComponenteForm;
var IpmForms=function(d,c){this.componente=null;this.nome=d;this.getNome=function(){return this.nome};this.iniciaComponente=function(a){var b=montaProxyComponente(this,"js_ipm_forms.js","css_ipm_forms.css",{setVisualizacao:null,atualizaListaComponentes:null,getListaComponentes:[],adicionaComponente:null,removeComponente:null,setTamanho:null,getTamanho:{},onChangeTamanho:null,desfaz:null,refaz:null,limpa:null,limpaTudo:null,redesenha:null,valida:null,getComponenteRaiz:$(),setValor:null,getValor:"",
selecionaComponente:null,getCamposConfiguracao:[],setCamposConfiguracao:null,getFiltrosConsulta:[],setFiltrosConsulta:null,destroy:""},function(){a.alvo=b.obj;b.componente=new IpmFormsImpl(a);var g=b.obj.getJanela();if(g&&g.onDestroyJanela)g.onDestroyJanela(function(){b.destroy()})});b.criaObjeto.apply(b,["div"]);b.setClass("ipm_forms_base");return b};this.isIniciado=function(){return null!==this.componente};if(d)return this.iniciaComponente(c)};IpmForms.prototype=new Componente;
var EditorBlocos=function(d,c){this.componente=null;this.nome=d;this.getNome=function(){return this.nome};this.iniciaComponente=function(a){var b=montaProxyComponente(this,"js_editor_blocos.js","css_editor_blocos.css",{setVisualizacao:null,setValor:null,getValor:"",onChange:null,salvaJS:null,setTelaExtra:null,destroy:""},function(){a.alvo=b.obj;b.componente=new EditorBlocosImpl(a);var g=b.obj.getJanela();if(g&&g.onDestroyJanela)g.onDestroyJanela(function(){b.destroy()})});b.criaObjeto.apply(b,["div"]);
b.setClass("ipm_editor_blocos_base");return b};this.findComponente=function(a){return this.nome==a?this:!1};this.isIniciado=function(){return null!==this.componente};if(d)return this.iniciaComponente(c)};EditorBlocos.prototype=new Componente;
var ComponenteBarraNavegacao=function(d,c){this.nomeArquivosJS="js_barra_navegacao.js";this.nomeArquivosCSS="css_barra_navegacao.css";this.blueprint={adicionaEtapa:null,voltaEtapa:null,onChangeEtapaAtual:null};this.setLimpaOnAfterAppend(!0);this.fnAfterLoad=function(a){c.obj=a.obj;a.componente=new ComponenteBarraNavegacaoImpl(c)};this.fnCriaObjeto=function(a){a.criaObjeto.apply(a,["div"]);a.setClass("estrutura_componente_barra_navegacao")};if(d)return ComponenteFormProxy.apply(this,[d,c])};
ComponenteBarraNavegacao.prototype=new ComponenteFormProxy;;/*</editor-fold desc="js_componentes_proxy.js">*/
/*<editor-fold desc="js_context.js">*//*
 {ipm "async": false, "bundle": "componentes", "priority": 900}
*/
var Context=function(c,f){var q="context_menu";f&&(q+="_alvo");var l=ControleBaseSistema.layoutSistemaNovo;f=l?f||ControleElementosSistema.buscaElementoContainer():f||document.body;c&&!l&&c.stopPropagation();this.event=c;this.dinamicContent=this.isFixed=!1;this.obj=$("#"+q);if(0==this.obj.length)if(this.obj=$("<menu>").attr("aria-label","Menu de Contexto").attr("data-info-acessibilidade","Menu de Contexto").attr("id",q).addClass("context_menu contexto_acessibilidade"),this.obj[0].myInstance=this,
this.appendTo(f),l)var v=ControleBaseSistema.addAlvoPropagacao(this.obj,function(){this.is(":visible")?(this[0]&&this[0].myInstance&&this[0].myInstance.hide?this[0].myInstance.hide():this.hide(),this.closest(document.body).length?ControleBaseSistema.atualizaVisibilidadeAuxilioAlvoPropagacao():ControleBaseSistema.removeAlvoPropagacao(v)):ControleBaseSistema.atualizaVisibilidadeAuxilioAlvoPropagacao()});else this.onClick(function(a){a&&a.stopPropagation()});else this.obj.children().detach(),this.obj.empty(),
l&&ControleBaseSistema.stopTriggerAlvoPropagacao(this.obj);this.obj.removeClass("context_menu_gadget");this.obj.removeClass("context_menu_shadow_top");this.obj.removeClass("context_menu_janelas_abertas");this.obj.addClass("context_menu_shadow_bottom");ControleBaseSistema.isLayoutV3()&&this.obj.addClass("__estrutura_componente_base");this.event?this.obj.get(0).eventHandler=this.event:this.obj.get(0).eventHandler=null;this.obj.css("position","fixed");this.obj.css("overflow","auto");this.obj.css("max-height",
"none");var r=$("<table>").attr("role","presentation").css("width","100%").appendTo(this.obj),t=$("<tbody>").attr("role","presentation").appendTo(r);this.setClassContent=function(a){r.addClass(a)};this.setDinamicContent=function(a){this.dinamicContent=a};this.getDinamicContent=function(){return this.dinamicContent};this.newRow=function(a){a=a||1;for(var e=$("<tr>"),h=[],d=0;d<a;d++){var b=$("<td>");0==d&&(ControleBaseSistema.isLayoutV3()||b.css("padding-left","2px"),1==a&&b.css("min-width",this.obj.css("min-width")));
e.append(b);h.push(b)}t.append(e);return 1<a?$(h):h[0]};this.isVisible=function(){return this.obj.is(":visible")};this.isClosed=function(){return"none"===this.obj.css("display")||0==this.obj.css("opacity")||"hidden"===this.obj.css("visibility")};this.setPositionObject=function(a){this.setCss($.extend({top:"auto",bottom:"auto",left:"auto",right:"auto"},a))};this.setPositionFixed=function(a){this.isFixed=!0;this.setPositionObject(a)};this.setPosition=function(a,e){this.setPositionObject({top:a,left:e})};
this.setPositionBottomLeft=function(a,e){this.setPositionObject({bottom:a,left:e})};this.setPositionBottomRight=function(a,e){this.setPositionObject({bottom:a,right:e})};this.showConectorBottom=function(){this.obj.css("overflow","visible").removeClass("context_menu_shadow_bottom").addClass("context_menu_shadow_top");this.obj.prepend($(document.createElement("span")).addClass("conector_context conector_context_in conector_context_in_bottom"));this.obj.prepend($(document.createElement("span")).addClass("conector_context conector_context_out conector_context_out_bottom"))};
this.showConectorTop=function(){this.obj.css("overflow","visible").removeClass("context_menu_shadow_top").addClass("context_menu_shadow_bottom");this.obj.prepend($(document.createElement("span")).addClass("conector_context conector_context_in conector_context_in_top"));this.obj.prepend($(document.createElement("span")).addClass("conector_context conector_context_out conector_context_out_top"))};this.setWidth=function(a){this.obj.width(a)};this.setMinWidth=function(a){this.obj.css("min-width",a)};
this.setMaxWidth=function(a){this.obj.css("max-width",a)};this.bind=function(a){ControleBaseSistema.bindAlvoPropagacao(this.obj,a)};this.show=function(a){function e(g){g=parseFloat(g.css("z-index")||0);0!=g?h.obj.css("z-index",g+1):h.obj.css("z-index","99997")}var h=this,d=$("#context_gadget"),b=$(".area_bloqueio_janela"),m=$(".calendario_voador");b.is(":visible")?((d=IpmJanelas.getJanelaAtiva())&&d.getOptions&&d.getOptions().bloqueadora&&(b=d),e(b)):d.is(":visible")&&this.obj.hasClass("context_menu_gadget")?
e(d):m.is(":visible")&&e(m);this.obj.css("opacity",0);this.obj.css("transition","none");this.obj.show();b=this.obj.offset().top;var k=this.obj.offset().left,u=this.obj.width()+k;d=this.obj.height();m=$(document.body).height()-(d+b);var n=l?null:parseFloat(this.obj.css("min-width"))-2;this.isFixed||(0>m&&(b=b- -m-9),2>b&&(b=2),u>$(document.body).width()&&(k=$(document.body).width()-this.obj.width()-4),2>k&&(k=2));n&&$("tr",this.obj).each(function(){var g=$(this).width(),p=35;Modernizr.firefox&&(p+=
10);g>n&&(n=g+p,u+p>$(document.body).width()&&(k-=p));return!1});d>$(document.body).height()-6||this.getDinamicContent()?this.obj.css("overflow","auto"):this.obj.css("overflow","hidden");this.isFixed||(this.obj.css("top",b),this.obj.css("left",k),n&&this.obj.css("min-width",n));this.isFixed?this.obj.css("max-height",$(document.body).height()-b-6):this.obj.css("max-height",$(document.body).height()-6);this.getDinamicContent()?this.obj.css("max-width",$(document.body).width()-parseFloat(this.obj.css("left"))-
6):this.obj.css("max-width","");a&&ControleNavegacao.acessibilidade&&ControleNavegacao.primeiroElementoFoco(this.obj,!0);executaProximoLoopAguardando(function(){this.obj.css("opacity","")}.bind(this));if(a=this.obj.attr("timeoutHide"))clearTimeout(a),this.obj.removeAttr("timeoutHide")};this.hide=function(){this.obj.css("opacity","0");var a=this.obj.get(0).eventHandler;a&&(a=a.target,canReceiveFocus(a)&&focusCampo(a));this.obj.attr("timeoutHide")||this.obj.attr("timeoutHide",setTimeout(function(){this.obj.hide();
this.obj.removeAttr("timeoutHide")}.bind(this),250))};this.setConteudo=function(a){this.obj.append(a)};c&&(this.setPosition(c.clientY,c.clientX),!c.clientY&&c.target&&(c=$(c.target),f=c.offset(),this.setPosition(f.top+c.height(),f.left)));$('#context_gadget:not(".context_menu_gadget")').is(":visible")&&(c=parseFloat($('#context_gadget:not(".context_menu_gadget")').css("zIndex")),this.setCss("zIndex",c+1));this.setWidthAuto=function(){var a=this.obj.get(0);this.setWidth(a.scrollWidth+(a.scrollHeight>
a.offsetHeight?20:0))};this.getCorpo=function(){return t};ControleBaseSistema.layoutSistemaNovo?(this.setWidth(""),this.setMinWidth("")):(this.setWidth("auto"),this.setMinWidth(120))};Context.prototype=new Componente;Context.staticHide=function(){(new Context).hide()};;/*</editor-fold desc="js_context.js">*/
/*<editor-fold desc="js_accordion.js">*//*
 {ipm "async": false, "bundle": "componentes"}
*/
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(g){return g.raw=g};$jscomp.createTemplateTagFirstArgWithRaw=function(g,m){g.raw=m;return g};
var Accordion=function(g,m,n,q){var f=this;m=defaultVal(m,"auto");n=defaultVal(n,"auto");this.iniciado=!1;this.id=this.nome=g;this.aAbas=defaultVal(q,[]);this.usaMultAbas=!1;this.abaAtiva=0;this.onHoverShowAba=!1;this.permiteAbrirFechar=!0;this.modoVisualizacao=Accordion.MODO_VISUALIZACAO_FULL;this.tipoEstilo=Accordion.TIPO_ESTILO_PADRAO;this.objAccordion=$();this.contextAba=this.fnContext=this.painelContext=this.headerContext=null;this.ajustaTamanhoConteudoInterno=!0;this.usaBorda=!1;this.setUsaBorda=
function(a){f.usaBorda=a&&parseInt(f.tipoEstilo)!=Accordion.TIPO_ESTILO_LATERAL;a?f.obj.addClass("componente_accordion_com_borda"):f.obj.removeClass("componente_accordion_com_borda")};this.setEnumeraItens=function(a){f.enumeraItens=a};this.refresh=function(){this.iniciado&&this.objAccordion.accordion("refresh")};this.setAbas=function(a){var c=this;this.aAbas=a;$.each(a,function(b){return c.renderAba(b)})};this.findComponente=function(a){var c=!1;if(this.id==a)return this;for(var b=0;b<this.aAbas.length;b++){var e=
this.aAbas[b];if(e.findComponente&&(c=e.findComponente(a)))break}return c};this.limpa=function(){$.each(this.aAbas,function(){var a=this.getTela();a&&a.limpa()});this.objAccordion.accordion({active:0})};this.valida=function(){for(var a=!0,c=!1,b=0;b<this.aAbas.length;b++){var e=this.aAbas[b].getTela();e&&e.valida&&(a=e.valida(),a||c||(c=!0,this.objAccordion.accordion({active:b})));if(!a)break}return a};this.getValores=function(){for(var a={},c=0;c<this.aAbas.length;c++){var b=this.aAbas[c].getTela();
b&&(a[this.aAbas[c].id]=b.getValores(!0))}return a};this.getAbas=function(){return this.aAbas};this.getAba=function(a){var c=!1;$.each(this.aAbas,function(){if(this.id==a)return c=this,!1});return c};this.enumeracao=null;this.useEnumeracao=function(){if(f.enumeraItens){var a=f.enumeraItens,c=a.ordem;a=a.inicio;var b={};f.enumeracao=(b[Accordion.ENUMERA_ITENS_ORDEM_DECRESCENTE]=f.enumeracao?f.enumeracao-1:a?a:f.aAbas.length,b[Accordion.ENUMERA_ITENS_ORDEM_CRESCENTE]=f.enumeracao?f.enumeracao+1:a?a:
1,b)[c]}return f.enumeracao};this.addAba=function(a,c){a.setEnumerado(this.useEnumeracao());this.aAbas.push(a);a.setTipoEstilo(this.getTipoEstilo());this.renderAba(a,c);return a};this.renderAba=function(a,c){var b=this.objAccordion;if(this.usaMultAbas||this.usaBorda)b=$("<div>").appendTo(this.obj);!0!==c?a.appendTo(b):a.prependTo(b);(this.usaMultAbas||this.usaBorda)&&b.accordion(this.getOpcoesAccordion());this.refresh()};this.esvazia=function(){this.obj.empty();this.aAbas=[]};this.setAbaAtiva=function(a){this.abaAtiva=
a};this.getAbaAtiva=function(){return this.abaAtiva};this.setUsaMultiplasAbas=function(a){this.usaMultAbas=a};this.setModoVisualizacaoFull=function(){this.setModoVisualizacao(Accordion.MODO_VISUALIZACAO_FULL)};this.setModoVisualizacaoCollapsed=function(){this.setModoVisualizacao(Accordion.MODO_VISUALIZACAO_COLLAPSED)};this.getAjustaTamanhoConteudoInterno=function(){return this.ajustaTamanhoConteudoInterno};this.setAjustaTamanhoConteudoInterno=function(a){this.ajustaTamanhoConteudoInterno=a};this.setModoVisualizacao=
function(a){this.modoVisualizacao=a;this.objAccordion.accordion(this.getOpcoesAccordion());this.obj.attr("class","componente_accordion");this.obj.addClass("componente_accordion_"+a);this.permiteAbrirFechar||this.obj.addClass("componente_accordion_bloqueia_abrir_fechar");this.setTipoEstilo(this.getTipoEstilo());this.atualizaContext();this.atualizaEstiloAbas(a)};this.atualizaContext=function(){if(null!=this.painelContext){var a=this.painelContext;this.headerContext.after(this.painelContext);this.painelContext=
null;$(".componente_accordion_conteudo_flutuante").trigger("removeContext").detach();$(document.body).off("click",this.fnContext);return a}};this.atualizaEstiloAbas=function(a){var c=a===Accordion.MODO_VISUALIZACAO_FULL;this.aAbas.forEach(function(b){(b=$(".ui-accordion-header",b.obj))&&b.length&&(b.removeClass("accordion_header_visualizacao_"+(c?Accordion.MODO_VISUALIZACAO_COLLAPSED:Accordion.MODO_VISUALIZACAO_FULL)),b.addClass("accordion_header_visualizacao_"+a))})};this.verificaCloseContext=function(a){0==
$(a.target).parentsUntil("body",".componente_accordion_conteudo_flutuante,.ui-accordion").length&&this.atualizaContext()};this.beforeActivateAccordion=function(a,c){c=this.atualizaContext();if(this.modoVisualizacao==Accordion.MODO_VISUALIZACAO_COLLAPSED&&a.originalEvent){a=$(a.originalEvent.target).parentsUntil(".ui-accordion");a=a[a.length-1];this.headerContext=$(".ui-accordion-header",a);var b=this.painelContext=$(".ui-accordion-content",a);if(!this.onHoverShowAba&&c&&c[0]==b[0])return this.painelContext=
null,!1;this.fnContext=this.verificaCloseContext.bind(this);$(document.body).on("click",this.fnContext);this.contextAba=$("<div>").addClass("componente_accordion_conteudo_flutuante").appendTo(this.obj);this.getAjustaTamanhoConteudoInterno()&&this.contextAba.addClass("componente_accordion_collapsed_conteudo_flutuante");b.appendTo(this.contextAba);var e=b.css("display");b.show();a=this.headerContext[0].getBoundingClientRect();c=ControleElementosSistema.buscaElementoContainerJanelas()[0].getBoundingClientRect();
var d=a.top-c.top,k=a.right-c.left;$(this.obj).parentsUntil("#estrutura_container_sistema",".estrutura_area_janelas").length||(d=a.top,k=a.right);this.contextAba.css({top:d,left:k});d={right:"auto",bottom:"auto"};a.bottom+this.contextAba.outerHeight()>window.innerHeight-1&&(d.bottom=4,d.minHeight=window.innerHeight-a.top-c.top-8);a.right+this.contextAba.outerWidth()>window.innerWidth-1&&(d.right=4,d.minWidth=window.innerWidth-a.right-c.left-8);this.headerContext.addClass("componente_accordion_aba_ativa");
this.contextAba.on("removeContext",function(){this.headerContext.removeClass("componente_accordion_aba_ativa");"none"==e&&b.hide()}.bind(this));this.contextAba.css(d);return!1}};this.trataHover=function(){var a=this;$(">*",this.objAccordion).on("mouseover",function(c){a.onHoverShowAba&&a.modoVisualizacao==Accordion.MODO_VISUALIZACAO_COLLAPSED&&$("header",this)[0]&&$("header",this)[0].click(c)});this.obj.on("mouseleave",function(){a.onHoverShowAba&&a.modoVisualizacao==Accordion.MODO_VISUALIZACAO_COLLAPSED&&
a.atualizaContext()})};this.setOnHoverShowAba=function(a){this.onHoverShowAba=a};this.setTipoEstilo=function(a){this.tipoEstilo=a;this.obj.addClass("componente_accordion_estilo_"+a)};this.setTipoEstiloPadrao=function(){this.setTipoEstilo(Accordion.TIPO_ESTILO_PADRAO)};this.setTipoEstiloLateral=function(){this.setTipoEstilo(Accordion.TIPO_ESTILO_LATERAL)};this.getTipoEstilo=function(){return this.tipoEstilo};this.iniciaAcordion=function(a,c,b){var e=this;this.criaObjeto("div");this.objAccordion=this.obj;
this.widthStyle=c;this.heightStyle=!1;this.obj.attr("id",a);this.obj.css("width",c);this.setModoVisualizacao(this.modoVisualizacao);includeStyleSheet("css_accordion.css",function(){e.refresh()});this.onAfterAppend(function(d){function k(){d.objAccordion.accordion($.extend(d.getOpcoesAccordion(),{activate:function(h,p){(h=p.newPanel&&0<p.newPanel.parent().length?p.newPanel.parent().get(0).myInstance:void 0)&&h instanceof AccordionItem&&(l&&l.autoFocusJanela(),h.onActivate&&h.onActivate.call&&h.onActivate.call())}}));
d.iniciado=!0;d.trataHover();executaProximoLoopAguardando(function(){d.refresh()})}this.objAccordion=this.obj;this.usaMultAbas||this.usaBorda?this.objAccordion=$(">div",this.obj):("fill"==b&&this.objAccordion.css("height","calc(100% - 1px)"),this.objAccordion=$("<div>").append(this.obj.children()).appendTo(this.obj));var l=this.getJanela();if(l&&(l.onResizeJanela(function(){this.atualizaContext()}.bind(this)),l.onDestroyJanela))l.onDestroyJanela(function(){this.atualizaContext()}.bind(this));Accordion.NOME_SETA_BAIXO?
k():IpmIcone.buscaFA("chevron-down").getNome().then(function(h){Accordion.NOME_SETA_BAIXO=h;return IpmIcone.buscaFA("chevron-up").getNome()}).then(function(h){Accordion.NOME_SETA_ACIMA=h;k()});executaProximoLoopAnimacao(function(){e.ativaAba(e.getAbaAtiva(),!0)})}.bind(this))};this.ativaAba=function(a,c){c=defaultVal(c,!1);if(this.usaMultAbas||this.usaBorda)if("string"===typeof a){var b=this.findComponente(a);if(b&&b.obj.parent&&b.obj.parent().accordion){var e=$(".ui-accordion-header",b.obj.parent()).is(".ui-accordion-header-active")?
!1:0;c&&(e=0);b.obj.parent().accordion({active:e})}}else!1===a||c?Array.from($(">div",this.obj)).forEach(function(d,k){$(d).accordion({active:k===a?0:!1})}):(b=$(">div",this.obj).eq(a),$(".ui-accordion-header",b).is(".ui-accordion-header-active")&&!c?b.accordion({active:!1}):b.accordion({active:0}));else this.objAccordion.accordion({active:a})};this.setPermiteAbrirFechar=function(a){this.permiteAbrirFechar=a};this.getOpcoesAccordion=function(){return{collapsible:this.modoVisualizacao==Accordion.MODO_VISUALIZACAO_COLLAPSED?
!0:this.permiteAbrirFechar,heightStyle:this.heightStyle,beforeActivate:this.beforeActivateAccordion.bind(this),tipoEstilo:this.tipoEstilo,header:"> div > header",active:this.abaAtiva,icons:{header:Accordion.NOME_SETA_BAIXO+" ui-accordion-header-icon-down",activeHeader:Accordion.NOME_SETA_ACIMA+" ui-accordion-header-icon-up"}}};g&&this.iniciaAcordion(g,m,n)};Accordion.prototype=new Componente;Accordion.MODO_VISUALIZACAO_FULL="full";Accordion.MODO_VISUALIZACAO_COLLAPSED="collapsed";
Accordion.TIPO_ESTILO_PADRAO="default";Accordion.TIPO_ESTILO_LATERAL="lateral";Accordion.ENUMERA_ITENS_ORDEM_CRESCENTE=1;Accordion.ENUMERA_ITENS_ORDEM_DECRESCENTE=2;;/*</editor-fold desc="js_accordion.js">*/
/*<editor-fold desc="js_accordion_content.js">*//*
 {ipm "async": false, "bundle": "componentes"}
*/
var AccordionContent=function(){this.addCollapse=function(a){$(".fundo_titulo",a.getObj()).removeClass("fundo_titulo").addClass("fundo_titulo_degrade").css("border-top","0px");a.appendTo(this.getObj());a.setWidth("100%");a.setHeight("auto");a.showContent();this.aCollapse.push(a);var b=this;a.onShowContent(function(){b.setCollapseActive(a)});a.onHideContent(function(c){b.setCollapseActive(null)});return a};this.newCollapse=function(a,b){a=new CollapseContent(a,b);return this.addCollapse(a)};this.setInitCollapse=
function(a){this.initCollapse=a};this.setFirstCollapseActive=function(){var a;(a=this.initCollapse?this.initCollapse:this.aCollapse[0])&&this.setCollapseActive(a)};this.onAfterAppend(function(a){a.setFirstCollapseActive()});this.setCollapseActive=function(a){for(var b=0;b<this.aCollapse.length;b++){var c=this.aCollapse[b];c===a?(c.setClass("height_auto auto_adaptable"),c.showContent(!1)):(c.getObj().height("auto"),c.removeClass("height_auto"),c.removeClass("auto_adaptable"),c.hideContent(!1))}findContentAutoAdaptable(this.getObj().parent())};
this.initCollapse=null;this.aCollapse=[];this.criaObjeto("div");this.setClass("auto_adaptable")};AccordionContent.prototype=new Componente;;/*</editor-fold desc="js_accordion_content.js">*/
/*<editor-fold desc="js_accordion_item.js">*//*
 {ipm "async": false, "bundle": "componentes"}
*/
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(c){return c.raw=c};$jscomp.createTemplateTagFirstArgWithRaw=function(c,d){c.raw=d;return c};
var AccordionItem=function(c,d){this.id=this.nome=c;this.infoQtd=0;this.tela=this.legenda=this.conteudo=null;this.onActivate=void 0;this.tipoEstilo=Accordion.TIPO_ESTILO_PADRAO;this.modoVisualizacao=Accordion.MODO_VISUALIZACAO_FULL;this.corDestaqueTitulo=null;this.acoes=[];this.usaAcoesInline=!1;this.enumerado=null;$.isPlainObject(d)?(d.acoes=d.acoes&&d.acoes.map(function(a){return eval(a)}),$.extend(this,d)):this.titulo=d;this.setInfoQuantidade=function(a){this.infoQtd=a=parseInt(a);this.atualizaBalaoInfo()};
this.getInfoQuantidade=function(){return this.infoQtd};this.getInfoQuantidadeFormatada=function(){return 99<this.infoQtd?"99+":""+this.infoQtd};this.setTipoEstilo=function(a){this.tipoEstilo=a};this.getTipoEstilo=function(){return this.tipoEstilo};this.atualizaBalaoInfo=function(){if(0<this.getInfoQuantidade()){var a=$(".balao_info_pendentes",this.legenda);if(0===a.length)a=$("<div>").css("opacity","").addClass("balao_info_pendentes").appendTo(this.legenda);else{var l=$("span",a);l.css("margin-top",
"var(--accordion-margin-top-animacao)");setTimeout(function(){l.detach()},500)}a.css("opacity","");$("<span>").html(this.getInfoQuantidadeFormatada()).appendTo(a)}else $(".balao_info_pendentes",this.legenda).css("opacity",0)};this.findComponente=function(a){return this.id==a?this:this.getTela().findComponente(a)};this.setTitulo=function(a){this.titulo=a;this.legenda&&this.legenda.text(a)};this.getTitulo=function(){return this.titulo};this.getTela=function(){return this.tela};this.setTela=function(a){a.setParent(this);
this.tela=a};this.setFilhos=function(a){a[0].setParent(this);this.tela=a[0]};this.setIcone=function(a){this.icone=a};this.setAcoes=function(a){this.acoes=a};this.adicionaAcao=function(a){this.acoes.push(a)};this.setTelaDinamica=function(a){this.setTela(a);a.montaTela(this.conteudo)};this.setFunctionOnActivate=function(a){this.onActivate=a};this.setEnumerado=function(a){this.enumerado=a};this.iniciaAccordionItem=function(){var a=this;this.criaObjeto("div");var l=function(){return $("<header>").append($("<div>").addClass("accordion_header_container").append(function(){var f=
$("<div>").addClass("accordion_header_info"),b=f.append,e=a.enumerado&&$("<h1>").addClass("accordion_header_info_enumerador").text(a.enumerado),g=$("<div>").append(a.icone?"object"==typeof a.icone?IpmIcone.fromObjetoFA(a.icone).criaObjeto().addClass("accordion_icone"):$("<span>").addClass("accordion_icone "+a.icone):null,$("<div>").append($("<span>").addClass("accordion_titulo").text(a.titulo),$("<span>").addClass("accordion_descricao").text(a.descricao))).addClass("accordion_header_info_group_icone_titulo_descricao");
a.corDestaqueTitulo&&a.modoVisualizacao==Accordion.MODO_VISUALIZACAO_FULL&&(g.addClass("accordion_destaque_titulo"),g.css({"--cor-accordion-destaque-fundo-titulo":a.corDestaqueTitulo,"--cor-accordion-cabecalho-ativo":a.corDestaqueTitulo,"--cor-accordion-destaque-cor-titulo":ColorUtils.getCorFrenteLuminosidade(a.corDestaqueTitulo.startsWith("var")?getCssValue(document.body,a.corDestaqueTitulo):a.corDestaqueTitulo)}));b.call(f,e,g);return f}(),function(){var f=$("<div>").addClass("accordion_header_acoes");
f.append(function(){var b=$("<div>").addClass("accordion_header_acoes_group_acoes");if(0< !a.acoes.length)return b;var e=function(h){var k=IpmIcone.buscaFA("bars").criaObjeto().css({"float":"right","pointer-events":"all"});k.attr("title","Acões");k.on("click",function(m){ControleBaseSistema.layoutSistemaNovo&&ControleBaseSistema.triggerAlvoPropagacao(m);var n=new Context(m),p=$(m.target).offset();n.setPosition(p.top+m.target.offsetHeight+2,p.left);$(h).each(function(){var r=n.newRow();this.appendTo(r)});
n.show()});return k};if(a.usaAcoesInline){var g=a.acoes.slice(0,5),q=a.acoes.slice(5);g.forEach(function(h){h.setEstiloExibicao(BotaoAcao.ESTILO_EXIBICAO_SEM_LABEL);h.onClick(function(k){return k.stopPropagation()});h.prependTo(b)});q.length&&(e=e(q),e.attr("title","Outras Ações"),b.append(e))}else b.append(e(a.acoes));return b}(),function(){if(!emBranco(a.hint)){var b=new BotaoEstrutura("info_small",!1,!0);b.obj.addClass("botao_hint").attr("data-ipm-hint",a.hint);includeJavaScript("js_tooltip.js",
function(){return $(b.obj).IpmHint(a.hint,{showMessageCode:!0})});b.aplicaCssBotao();return b.obj}}(),$("<div>").addClass("balao_info_pendentes").text(a.getInfoQuantidadeFormatada()).css("display",0<a.getInfoQuantidade()?"block":"none"));return f}())).addClass("accordion_header_tipo_estilo_"+a.tipoEstilo+" accordion_header_visualizacao_"+a.modoVisualizacao)};this.onAfterAppend(function(){this.conteudo=$("<div>");this.obj.append(l());this.obj.append(this.conteudo);this.tela&&this.tela.montaTela(this.conteudo)}.bind(this))};
c&&this.iniciaAccordionItem()};AccordionItem.prototype=new Componente;;/*</editor-fold desc="js_accordion_item.js">*/
/*<editor-fold desc="js_audio_player.js">*//*
 {ipm "async": false, "bundle": "componentes"}
*/
var AudioPlayer=function(b){this.setNome=function(a){this.nome=a;return this};this.getNome=function(){return this.nome};this.setTitulo=function(a){this.titulo=a;return this};this.getTitulo=function(){return this.titulo};this.setUrl=function(a){this.url=a;this.stop();this.getElementoSource().setAttribute("src",a);this.getElementoAudio().load();return this};this.getUrl=function(){return this.url};this.setElementoAudio=function(a){this.oElementoAudio=a;return this};this.getElementoAudio=function(){return this.oElementoAudio};
this.setElementoSource=function(a){this.oElementoSource=a;return this};this.getElementoSource=function(){return this.oElementoSource};this.setBotaoPlayPause=function(a){this.oBotaoPlayPause=a;return this};this.getBotaoPlayPause=function(){return this.oBotaoPlayPause};this.setBotaoStop=function(a){this.oBotaoStop=a;return this};this.getBotaoStop=function(){return this.oBotaoStop};this.onClickPlayPause=function(){this.getElementoAudio().paused?this.play():this.pause()};this.onClickStop=function(){this.stop()};
this.onEncerramentoReproducao=function(){this.stop()};this.play=function(){this.getElementoAudio().play();this.getBotaoPlayPause().setFontAwesome("fa-pause-circle")};this.pause=function(){this.getElementoAudio().pause();this.getBotaoPlayPause().setFontAwesome("fa-play-circle")};this.stop=function(){this.pause();this.getElementoAudio().currentTime=0};this.iniciar=function(){this.criaObjeto("div");var a=this.obj;this.setElementoAudio(document.createElement("audio"));this.setElementoSource(document.createElement("source"));
this.setBotaoPlayPause(new BotaoAcao("bnt_play_pause",this.onClickPlayPause.bind(this),!0,!1,!1,"fa-play-circle"));this.setBotaoStop(new BotaoAcao("bnt_stop",this.onClickStop.bind(this),!0,!1,!1,"fa-stop-circle"));this.getBotaoPlayPause().appendTo(a);this.getBotaoStop().appendTo(a);this.getElementoAudio().addEventListener("ended",this.onEncerramentoReproducao.bind(this));this.getElementoAudio().append(this.getElementoSource());a.append(this.getElementoAudio());return a};this.iniciar();this.setNome(b)};
AudioPlayer.prototype=new ComponenteTela;;/*</editor-fold desc="js_audio_player.js">*/
/*<editor-fold desc="js_barra_ferramentas.js">*//*
 {ipm "async": false, "bundle": "componentes"}
*/
var BarraFerramentas=function(l,t){function p(){$(".componente_barra_ferramentas_container",this.obj).children().detach().appendTo(this.obj);$(".componente_barra_ferramentas_container_seta",this.obj).detach();$(".componente_barra_ferramentas_container",this.obj).detach();this.isModoExibicaoAbsoluto()&&this.ajustaOverflowBotoes(this.isModoExibicaoAbsolutoVertical())}this.nome=null;this.modoExibicao=t;this.botoesAcao=[];this.ativo=!0;this.fontAwesome=this.carregada=!1;this.parentRelativo=null;this.adicionaBotaoComponente=
function(b){b.nome&&(b.setEstiloExibicao(BotaoAcao.ESTILO_EXIBICAO_FERRAMENTA),b.showAsButton(),b.onValidaClick(function(){return this.ativo}.bind(this)),this.carregada&&b.appendTo(this.obj));this.botoesAcao.push(b)};this.adicionaBotaoAcao=function(b,c,a,e){b=new BotaoAcao(b,e,!0,!0);b.setLabel(a);b.setNome(c);this.adicionaBotaoComponente(b);return b};this.adicionaSeparador=function(){this.adicionaBotaoComponente(new BotaoAcao(0,null,"separador"))};this.findComponente=function(b){return b==this.nome?
this:!1};this.getBotao=function(b){for(var c in this.botoesAcao)if(this.botoesAcao[c].nome==b)return this.botoesAcao[c];return null};this.getNome=function(){return this.nome};this.getModoExibicao=function(){return this.modoExibicao};this.setModoExibicao=function(b,c){for(var a=this.obj.parent();(a.hasClass("tabela_campo")||!a.is("div,article"))&&a.parent();)a=a.parent();if(a.hasClass("componente_pai_barra_ferramentas")&&a.children().is(".container_componente_pai_barra_ferramentas"))var e=a.children().eq(".container_componente_pai_barra_ferramentas");
else a.hasClass("container_componente_pai_barra_ferramentas")&&!a.parent().hasClass("componente_pai_barra_ferramentas_"+BarraFerramentas.CLASSES_MODOS_EXIBICAO_ABSOLUTO[b])&&(e=a,a=a.parent());!e&&this.isModoExibicaoAbsoluto()&&(e=$("<div>").addClass("container_componente_pai_barra_ferramentas"),e.addClass(a[0].className),e.append(a.children()),e.appendTo(a));!c&&a&&this.isModoExibicaoAbsoluto()&&(a.removeClass("componente_pai_barra_ferramentas_"+BarraFerramentas.CLASSES_MODOS_EXIBICAO_ABSOLUTO[this.modoExibicao]),
a.is(".componente_pai_barra_ferramentas_"+Object.values(BarraFerramentas.CLASSES_MODOS_EXIBICAO_ABSOLUTO).join(",.componente_pai_barra_ferramentas_"))||(a.removeClass("componente_pai_barra_ferramentas"),a.hasClass("container_componente_pai_barra_ferramentas")&&(c=a,a=a.parent(),c.children().appendTo(a),c.detach())));this.modoExibicao=b;this.obj.attr("class",(this.classeInicial||"")+" componente_barra_ferramentas"+(this.fontAwesome?" barra_ferramentas_font_awesome":""));this.isModoExibicaoAbsoluto()?
(this.obj.addClass("componente_barra_ferramentas_absoluta componente_barra_ferramentas_absoluta_"+BarraFerramentas.CLASSES_MODOS_EXIBICAO_ABSOLUTO[this.modoExibicao]),a&&a.addClass("componente_pai_barra_ferramentas componente_pai_barra_ferramentas_"+BarraFerramentas.CLASSES_MODOS_EXIBICAO_ABSOLUTO[this.modoExibicao]),this.parentRelativo||(this.parentRelativo=this.obj.parent(),this.obj.appendTo(a))):(this.obj.addClass("componente_barra_ferramentas_relativa"),this.parentRelativo&&(this.obj.appendTo(this.parentRelativo),
this.parentRelativo=null));for(var h in this.botoesAcao)b=this.botoesAcao[h],b.obj.hasClass("separador")&&(b.obj.removeClass("separador_h separador_v"),b.obj.addClass("separador_"+(this.isModoExibicaoAbsolutoVertical()?"h":"v")),b.obj.css({height:"",width:""}));p.apply(this)};this.isModoExibicaoAbsoluto=function(){return this.modoExibicao!==BarraFerramentas.MODO_EXIBICAO.RELATIVO};this.isModoExibicaoAbsolutoVertical=function(){return-1<[BarraFerramentas.MODO_EXIBICAO.ABSOLUTO_ESQUERDA,BarraFerramentas.MODO_EXIBICAO.ABSOLUTO_DIREITA].indexOf(this.modoExibicao)};
this.trataResize=function(){if(!this.carregada)if(this.getJanela().onResizeJanela)this.getJanela().onResizeJanela(p.bind(this));else if(this.obj.getJanela().onResizeJanela)this.obj.getJanela().onResizeJanela(p.bind(this));p.apply(this)};this.ajustaOverflowBotoes=function(b,c){c&&p.apply(this);if(b)c=this.obj.height();else if($(this.obj.get(0)).is(":visible"))c=this.obj.width();else{for(c=this.obj;0<c.length&&!c.is(":visible");)c=c.parent();c=c.width()}var a=0,e=20,h=[],g=[];for(f in this.botoesAcao){var k=
this.botoesAcao[f];if(k.isVisible()){var q=k.nome?b?k.obj.height():k.obj.width():1;q=b?q+(parseInt(getComputedStyle(k.obj[0]).marginTop)+parseInt(getComputedStyle(k.obj[0]).marginBottom)):q+(parseInt(getComputedStyle(k.obj[0]).marginLeft)+parseInt(getComputedStyle(k.obj[0]).marginRight));a+=q;a>c-e&&(0==h.length&&(e+=20),h.push(g),g=[],a=q);g.push(k.obj)}}h.push(g);if(1<h.length){var r=b?"padding-top":"padding-left";for(m in h){var m=parseInt(m);g=h[m];var f=$("<div>").addClass("componente_barra_ferramentas_container").appendTo(this.obj);
0<m?(a=h[m-1],a=$("<span>").addClass("componente_barra_ferramentas_container_seta componente_barra_ferramentas_container_seta_anterior").on("click",function(n,d){b?n.height(0):n.width(0);n.css(r,0);d=d.parent();b?d.height(d.attr("tamanhoOriginal")):d.width(d.attr("tamanhoOriginal"));d.css(r,d.attr("paddingOriginal")+"px")}.bind(this,f,a[a.length-1])).attr("title","Mais ações").appendTo(f),b?IpmIcone.buscaFA("arrow-up").carregaObjeto(a):IpmIcone.buscaFA("arrow-left").carregaObjeto(a),b?f.height(0):
f.width(0),f.attr("tamanhoOriginal",c-20),f.attr("paddingOriginal",20)):(b?f.height(c):f.width(c),f.attr("tamanhoOriginal",c));for(var u in g)f.append(g[u]);m<h.length-1&&(g=h[m+1],g=$("<span>").addClass("componente_barra_ferramentas_container_seta componente_barra_ferramentas_container_seta_proximo").on("click",function(n,d){b?n.height(0):n.width(0);n.css(r,0);d=d.parent();b?d.height(d.attr("tamanhoOriginal")):d.width(d.attr("tamanhoOriginal"));d.css(r,d.attr("paddingOriginal")+"px")}.bind(this,
f,g[g.length-1])).attr("title","Mais ações").appendTo(f),b?IpmIcone.buscaFA("arrow-down").carregaObjeto(g):IpmIcone.buscaFA("arrow-right").carregaObjeto(g))}}};this.setAtivo=function(b){this.ativo=b;for(var c in this.botoesAcao)this.botoesAcao[c].atualizaEstiloBotao()};this.getAtivo=function(){return this.ativo};this.setFontAwesome=function(b){this.fontAwesome=b};this.iniciaComponente=function(b){this.criaObjeto("div");this.modoExibicao=b;this.onAfterAppend(function(){this.classeInicial=this.obj.attr("class");
this.setModoExibicao(this.modoExibicao,!0);for(var c in this.botoesAcao){var a=this.botoesAcao[c];if(a.nome)a.appendTo(this.obj),a.obj.attr("tabindex",-1);else{var e=this.isModoExibicaoAbsolutoVertical()?"H":"V";e=(new Separador(e,15)).appendTo(this.obj);a.obj=e}}this.trataResize();this.carregada=!0;ControleNavegacao.adicionaAtalhoAutomaticoContexto(this.obj,25,"Barra de ferramentas",!0);ControleNavegacao.adicionaNavegacaoSetas(this.obj,{pularComTab:!0,elementos:"input:visible"})}.bind(this))};l&&
(this.nome=l,this.iniciaComponente(t?t:BarraFerramentas.MODO_EXIBICAO.ABSOLUTO_TOPO))};BarraFerramentas.prototype=new Componente;BarraFerramentas.MODO_EXIBICAO={};BarraFerramentas.MODO_EXIBICAO.ABSOLUTO_TOPO=1;BarraFerramentas.MODO_EXIBICAO.ABSOLUTO_BASE=2;BarraFerramentas.MODO_EXIBICAO.ABSOLUTO_ESQUERDA=3;BarraFerramentas.MODO_EXIBICAO.ABSOLUTO_DIREITA=4;BarraFerramentas.MODO_EXIBICAO.RELATIVO=5;
BarraFerramentas.CLASSES_MODOS_EXIBICAO_ABSOLUTO=function(){var l={};l[BarraFerramentas.MODO_EXIBICAO.ABSOLUTO_TOPO]="topo";l[BarraFerramentas.MODO_EXIBICAO.ABSOLUTO_BASE]="base";l[BarraFerramentas.MODO_EXIBICAO.ABSOLUTO_ESQUERDA]="esquerda";l[BarraFerramentas.MODO_EXIBICAO.ABSOLUTO_DIREITA]="direita";return l}();;/*</editor-fold desc="js_barra_ferramentas.js">*/
/*<editor-fold desc="js_campo_form.js">*//*
 {ipm "async": false, "bundle": "componentes"}
*/
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(d){return d.raw=d};$jscomp.createTemplateTagFirstArgWithRaw=function(d,f){d.raw=f;return d};
var CampoForm=function(d,f,h,l,g,p,q){function r(){var a=this;this.oCampo=Campo.getInstance(this.tipo,f,h,l,g,p,q);ControleBaseSistema.layoutSistemaNovo&&this.oCampo.onInvalidar&&this.oCampo.onInvalidar(function(b){a.getVisualizacao()?a.oLabel&&a.oLabel.setTipo(2):a.oLabel&&(a.oCampo.getObrigatorio()?a.oLabel.setTipo(b?1:3):a.oLabel.setTipo(0))});this.oCampo.setLabelCampo&&this.oCampo.setLabelCampo(h);this.oCampo.onAfterAppend(function(){a.oCampo.onChange(function(){if(a.oCampo.externo&&a.oCampo.externo.onChangeRegistroAtualizaBotoes)a.oCampo.externo.onChangeRegistroAtualizaBotoes();
a.oCampo.obj&&a.oCampo.obj.grid&&a.oCampo.obj.grid instanceof GridDados&&(a.oCampo.obj.grid.isGridAtualizado||a.oCampo.obj.grid.executaOnChangeGrid())});a.Suggest&&a.oCampo.obj.IPMSuggest(a.Suggest);a.oCampo.montaBotaoCalendario&&a.oCampo.montaBotaoCalendario();a.getHint()&&!em_branco(a.getHint())&&(a.oCampo instanceof CampoFileDraggable?a.oCampo.setHint(a.getHint()):a.setHint(a.getHint()));a.trataCriarTitleCampo(q);a.componenteMicrofone&&(a.oCampo&&a.oCampo.obj.grid||a.getParent()instanceof GridDados)&&
a.componenteMicrofone.obj.hide();ControleBaseSistema.layoutSistemaNovo&&a.oCampo.atualizaEstadoCampoInvalido(!0);ControleBaseSistema.isLayoutV3()&&a.oLabel.obj.toggleClass("campo_label_dois_pontos",a.estiloLabel!==TelaPadrao.ESTILO_EXIBICAO_LABEL_LATERAL_INV)});this.oCampo.onBlur(function(){if(!(this.getAtributo&&this.getAtributo("grid")||this.getAttribute&&this.getAttribute("grid")))try{a.valida()}catch(b){}})}this.nome=f;this.oLabel=this.oCampo=null;this.titulo=h;this.obrigatorio=l;this.tipo=d;
this.numeroAjax=0;this.visualizacao=this.validaMax=!1;this.permiteColar=!0;this.group=this.iniHidden=this.retornoAjax=!1;this.podeLimpar=!0;this.chave=this.GrupoObrigatorioCampoForm=!1;this.componenteMicrofone=null;this.tituloAdicional="";this.escondeLabel=!1;this.camposVinculados=this.estiloLabel=this.Suggest=null;this.fnSetParametroExterno=!1;this.hint="";this.estiloExibicaoHint=CampoForm.MODO_EXIBICAO_HINT_BOTAO;this.clone=!1;var t="hidden serial numerico texto memo data booleano cep cpf cnpj senha lista file hora competencia texto_preservado editor conta data_uno cnae cpf_cnpj horimetro mascara email coordenada escala_linear interval seletor_fonte lista_tags boolean".split(" ");
this.sTipo="number"==typeof d?t[d]:d;this.getNome=function(a){return a&&this.oCampo&&this.oCampo.getNomeObj?this.oCampo.getNomeObj()||this.nome:this.nome};this.setEstiloLabel=function(a){this.estiloLabel=a};this.trataCloneGrid=function(){this.oCampo&&this.oCampo.trataCloneGrid&&this.oCampo.trataCloneGrid()};this.setEscondeLabel=function(a){this.escondeLabel=a};this.setIniHidden=function(a){this.iniHidden=a};this.setSuggest=function(a){this.Suggest=a};this.loadComportamentos=Componente.loadComportamentos;
this.setRetornoAjax=function(a){this.oCampo.externo&&this.oCampo.externo.setRetornoAjax(a)};this.getRetornoAjax=function(){if(this.oCampo.externo)return this.oCampo.externo.getRetornoAjax()};this.findComponente=function(a){return this.nome==a?this:this.oCampo&&this.oCampo.externo?this.oCampo.externo.findComponente(a):!1};this.setExterno=function(){this.oCampo.setExterno.apply(this.oCampo,this.setExterno.arguments)};this.onCallExterno=function(a){this.fnCallExterno=a};this.isVisible=function(){return this.oCampo.obj.is(":visible")};
this.groupWith=function(a,b){this.group=[a,b]};this.getNumerosAjax=function(){if(this.oCampo.getNumerosAjax)return this.oCampo.getNumerosAjax()};this.setVisualizacao=function(a){this.visualizacao=a;this.oCampo.setVisualizacao(a);this.oLabel.setTipo("leitura");this.componenteMicrofone&&(a?this.componenteMicrofone.hide():this.componenteMicrofone.show())};this.getVisualizacao=function(){return this.visualizacao};this.placeholder=function(a){this.getCampo().setPlaceHolder(a);return this};this.setPermiteColar=
function(a){if(a)this.onPaste(function(){return!0});else this.getCampo().getObj().off("paste"),this.onPaste(function(){return!1});this.permiteColar=a};this.getPermiteColar=function(){return this.permiteColar};this.setGrupoObrigatorioCampoForm=function(a){this.GrupoObrigatorioCampoForm=a};this.getGrupoObrigatorioCampoForm=function(){return this.GrupoObrigatorioCampoForm};this.changeType=function(a){this.sTipo=this.tipo=a;a=this.oCampo.getParent();var b=this.oCampo.obj,c=this.oCampo.obj.parent();b.remove();
this.oCampo=null;r.apply(this);this.visualizacao?(this.oCampo.setVisualizacao(this.visualizacao),this.oCampo.appendVisualizacao(c)):this.oCampo.appendTo(c);a&&this.oCampo.setParent(a)};this.trataCriarTitleCampo=function(a){try{if(a&&"null"!=a&&(this.oCampo.visualizacao||$(this.oCampo.obj.get(0)).is(".suggest.campo_externo"))&&!(this.oCampo instanceof CampoBooleano||this.oCampo instanceof CampoBoolean||this.oCampo instanceof CampoListaTree)){var b=a;if(this.oCampo instanceof CampoLista||this.oCampo instanceof
CampoListaMultipla){this.oCampo instanceof CampoLista&&(b=[a]);a=[];var c=this.oCampo.getLista(),e;for(e in c)for(var k in b)b[k]==c[e][0]&&a.push(c[e][1]);b=a.join(", ")}this.oCampo.setTitle(b)}}catch(m){}};this.criaHint=function(){if(this.tipo!=Campo.HIDDEN)if(this.getEstiloExibicaoHint()==CampoForm.MODO_EXIBICAO_HINT_BOTAO)this.montaBotaoHintPadrao();else if(this.getEstiloExibicaoHint()==CampoForm.MODO_EXIBICAO_HINT_TEXTUAL){var a=this.oLabel&&this.oLabel.obj.parent();if(a){a.addClass("estrutura_area_hint_textual");
var b=$("<span>").addClass("estrutura_hint_textual_visivel").html(this.getHint());a.append(b)}}};this.montaBotaoHintPadrao=function(){if(ControleBaseSistema.isLayoutV3())ComponenteHint.criaHintCampo(this.getHint()).appendTo(this.getObjAppendHint());else{var a=new BotaoEstrutura("sobre",!1,!0);a.setIgnoreTab(!0);ControleBaseSistema.isLayoutV3()?a.addClass("hint-campo"):(a.obj.addClass(ControleElementosSistema.getSeletorElemento("botao_hint")),ControleBaseSistema.layoutSistemaNovo||(a.obj.css("vertical-align",
"top"),$(".botao_acao.botao_acao_estrutura",a.obj).css("margin-top","1px")));var b=this;a.obj.attr("data-ipm-hint",b.getHint());includeJavaScript("js_tooltip.js",function(){a.obj.IpmHint(b.getHint(),{showMessageCode:!0})});if(this.oCampo instanceof CampoFile&&!ControleBaseSistema.layoutSistemaNovo){var c=this.oCampo.obj.parent().parent();0<c.length&&c.get(0).insertBefore(a.obj.get(0),c.children().last().get(0));$('input[type="button"]',a.obj).css($.extend(a.getCssBotao(),{margin:"2px"}))}else a.appendTo(this.getObjAppendHint());
this.oCampo.externo||a.obj.prev().addClass("estrutura_campo_botao_last_child estrutura_campo_com_hint")}};this.getObjAppendHint=function(){return this.oCampo.getObjAppendHint?this.oCampo.getObjAppendHint():this.oCampo.getObjAppend().parent()};this.focus=function(){this.oCampo.focus()};this.forceFocus=function(){if(!canReceiveFocus(this.oCampo.obj))for(var a=this.getParent();a;)a=a.getParent(),a instanceof ItemTelaTab&&a.ativaAba();ControleNavegacao.exibeAlertaAcessibilidade("O campo "+this.getLabel()+
" não foi preenchido devidamente, o foco foi movido para este para que seja preenchido.");this.oCampo.focus()};this.getLabel=function(){return this.oLabel.getLabel()};this.setLabel=function(a){return this.oLabel.setLabel(a)};this.addLista=function(a,b){this.oCampo.addLista(a,b)};this.setLista=function(a,b){this.oCampo.setLista(a,b)};this.setStyle=function(a,b){this.oCampo.setCss(a,b)};this.setWidth=function(){this.oCampo.setWidth.apply(this.oCampo,arguments)};this.setDecimais=function(a){this.oCampo.setDecimais(a)};
this.setTituloAdicional=function(a){this.tituloAdicional=a};this.getTituloAdicional=function(){return this.tituloAdicional};this.montaSpanTituloAdicional=function(){return $("<span>").addClass("campo_label campo_texto_adicional "+(this.oCampo.getObrigatorio()&&!this.oCampo.getVisualizacao()?"campo_label_obrigatorio":"")+(this.oCampo.getVisualizacao()?"campo_label_leitura":"")).html(this.getTituloAdicional())};this.getValor=function(a){return!1===a?this.oCampo.getValorBanco():this.oCampo.getValue()};
this.setValor=function(a){this.val(a)};this.val=function(a){if("undefined"==typeof a)return this.oCampo.getValor();this.oCampo.setValue(a)};this.setValorFormatado=function(a){this.oCampo.setValorFormatado(a)};this.limpa=function(){this.oCampo.limpa()};this.getHint=function(){return this.hint};this.setHint=function(a){this.hint=a;var b=this.oCampo.getObjAppend().parent();b=$("."+ControleElementosSistema.getSeletorElemento("botao_hint"),b);0<b.length?b.attr("ipmhint",a):this.criaHint();this.oCampo.setHintCampo(a)};
this.onSetParametroExterno=function(a){this.fnOnSetParametroExterno=a};this.validaObrigatorio=function(){if(this.oCampo.getObrigatorio()&&!this.isPreenchido())throw new Message.mensagemErro("EST-000113",this,{nomeDoCampo:this.titulo});return!0};this.valida=function(){var a=!0;try{this.validaObrigatorio()}catch(e){a=!1;var b=e}var c=this.oLabel.getLabel();try{this.oCampo.valida(c)}catch(e){a=!1,b=e}if(this.validaMax&&a&&(this.oCampo.getObrigatorio()||this.oCampo.isPreenchido()))try{this.oCampo.validaMax(c)}catch(e){b=
e}if(this.oCampo.functionValida&&"function"===typeof this.oCampo.functionValida)try{this.oCampo.functionValida()}catch(e){a=!1,b=e}if(a)this.oCampo.setClassCampoInvalido(!1);else if(this.oCampo.setClassCampoInvalido(!0),b)throw b instanceof Message.mensagemErro&&b.setCampo(this),b;return a};this.isPreenchido=function(){return"function"===typeof this.oCampo.isPreenchido?this.oCampo.isPreenchido():!0};this.isClone=function(){return this.clone};this.setValidaMax=function(a){this.validaMax=a};this.hide=
function(){if(ControleBaseSistema.isLayoutV3())this.hideElement();else{for(var a=this.oCampo.getObj();"TR"!=a.get(0).nodeName;)if(a=a.parent(),a.get(0)==document||0==a.length){a=this.oCampo.getObjAppend().parent().parent();(a.hasClass("campo_flex")||a.hasClass("linha_componente_tela"))&&this.hideElement();return}a.hide()}};this.hideElement=function(){if(ControleBaseSistema.isLayoutV3())this.oLabel.getObjAppend().parent().hide(),this.oCampo.getObjAppend().parent().hide(),this.oCampo.useSlot().parent().hide();
else{this.oLabel.getObjAppend().parent().hide();this.oCampo.getObjAppend().parent().hide();var a=this.oCampo.getObjAppend().parent().parent();a.hasClass("campo_flex")?(a.css("flex","0 0 0"),10>a.parent().height()&&a.parent().hide()):a.hasClass("linha_componente_tela")&&(a.hide(),a=a.prev(),a.hasClass("linha_componente_label")&&a.hide())}};this.show=function(){if(ControleBaseSistema.isLayoutV3())this.showElement();else{for(var a=this.oCampo.getObj();"TR"!=a.get(0).nodeName;)if(a=a.parent(),a.get(0)==
document||0==a.length){a=this.oCampo.getObjAppend().parent().parent();(a.hasClass("campo_flex")||a.hasClass("linha_componente_tela"))&&this.showElement();return}a.show()}};this.showElement=function(){if(ControleBaseSistema.isLayoutV3())this.escondeLabel||this.oLabel.getObjAppend().parent().show(),this.oCampo.getObjAppend().parent().show(),this.oCampo.useSlot().parent().show();else{this.escondeLabel||this.oLabel.getObjAppend().parent().show();this.oCampo.getObjAppend().parent().show();var a=this.oCampo.getObjAppend().parent().parent();
a.hasClass("campo_flex")?(a.css("flex",""),a.parent().show()):a.hasClass("linha_componente_tela")&&(a.show(),a=a.prev(),a.hasClass("linha_componente_label")&&a.show())}};this.setReadOnly=function(a){a?this.oCampo.setReadOnly(!0):this.oCampo.setReadOnly(!1);this.componenteMicrofone&&(a?this.componenteMicrofone.hide():this.componenteMicrofone.show(),this.oCampo.trataMicrofone&&this.oCampo.trataMicrofone(this.componenteMicrofone));ControleBaseSistema.layoutSistemaNovo&&this.oCampo.atualizaEstadoCampoInvalido()};
this.setDisabled=function(a){a?this.oCampo.setDisabled(!0):this.oCampo.setDisabled(!1);this.componenteMicrofone&&(a?this.componenteMicrofone.hide():this.componenteMicrofone.show(),this.oCampo.trataMicrofone&&this.oCampo.trataMicrofone(this.componenteMicrofone))};this.setObrigatorio=function(a){this.oCampo.setObrigatorio(a?!0:!1);this.getVisualizacao()||this.oLabel.setTipo(a?1:0);"undefined"!=typeof this.oLabel.oDelimitadorGrupo&&(a?this.oLabel.oDelimitadorGrupo.addClass("campo_label_obrigatorio"):
this.oLabel.oDelimitadorGrupo.removeClass("campo_label_obrigatorio"));if(this.getTituloAdicional()){var b=$(".campo_texto_adicional",this.oCampo.obj.parent());a?b.addClass("campo_label_obrigatorio"):b.removeClass("campo_label_obrigatorio")}ControleBaseSistema.layoutSistemaNovo&&this.oCampo.atualizaEstadoCampoInvalido(!0)};this.on=function(a,b){return this.oCampo.on(a,b)};this.onBlur=function(a){return this.oCampo.onBlur(a)};this.onFocus=function(a){return this.oCampo.onFocus(a)};this.onKeyPress=function(a){return this.oCampo.onKeyPress(a)};
this.onKeyDown=function(a){return this.oCampo.onKeyDown(a)};this.onKeyUp=function(a){return this.oCampo.onKeyUp(a)};this.onPressF=function(a,b){return this.oCampo.onPressF(a,b)};this.onEnter=function(a){return this.oCampo.onEnter(a)};this.onChange=function(a){return this.oCampo.onChange(a)};this.onClick=function(a){return this.oCampo.onClick(a)};this.onPaste=function(a){return this.oCampo.onPaste(a)};this.getObjCampo=function(){return this.oCampo.obj.get(0)};this.submitFiles=function(a){return"file"==
this.sTipo||"file_draggable"==this.sTipo?(this.oCampo.submitFile(a),1):0};this.getCampo=function(){return this.oCampo};this.setParent=function(a){this.oCampo.setParent(a)};this.getParent=function(){return this.oCampo.getParent()};this.setCustomEvent=function(a,b){this.customEvents.push({name:a,fn:b})};this.callCustomEvent=function(a){for(var b=!1,c=0;c<this.customEvents.length;c++)this.customEvents[c].name==a&&(this.customEvents[c].fn.apply(this,[]),b=!0);return b};this.getTipo=function(){return this.tipo};
this.isChave=function(){return this.chave};this.setChave=function(a){this.chave=a};this.montaMicrofone=function(){CONST.PORTAL||includeJavaScript("js_speech.js",function(){this.componenteMicrofone=new ComponenteMicrofoneFlutuante(this.nome+"_microfone",this.oCampo);(this.getVisualizacao()||this.oCampo.getReadOnly()||this.oCampo.getDisabled())&&this.componenteMicrofone.hide()}.bind(this))};this.getComponenteLabel=function(){return this.oLabel};this.appendTo=function(a){if(ControleBaseSistema.isLayoutV3()){var b=
$('\n                    <span class="slot-componente">\n                        <span class="slot-label"></span>\n                        <span class="slot-campo">\n                            <span class="slot-campo-input"></span>\n                            <span class="slot-campo-hint-textual"></span>\n                        </span>\n                    </span>\n            ').appendTo(a),c=b.find(".slot-label");b.find(".slot-campo");var e=b.find(".slot-campo-input"),k=b.find(".slot-campo-hint-textual"),
m="campo-"+this.tipo.replace(/_/g,"-");e.addClass("slot-"+m+(this.oCampo.externo?" slot-campo-externo":""));this.oCampo.addClass(m);emBranco(this.hintTextual)&&k.addClass("oculto").hide();this.tipo==Campo.HIDDEN&&$(a).addClass("oculto").hide();k=[Campo.MEMO,Campo.EDITOR,Campo.EDITOR_CODIGO_FONTE].includes(this.tipo)||this.tipo==Campo.LISTA&&this.oCampo.lista.some(function(n){return isInstanceOf(n,[ItemListaDinamica])});c.toggleClass("label-campo-inicio",!!k);this.group?(k=this.group[1],b=this.group[0].oCampo.getObjectData("slot-componente"),
e=b.find(".slot-campo-input"),this.setLabel(k),this.oCampo.setObjectData("slot-componente",b),c.appendTo(e),e.addClass("slot-agrupador"),c.addClass("slot-delimitador-agrupamento"),this.oLabel.appendTo(c),this.oCampo.appendTo(e),a.detach()):(this.escondeLabel||this.tipo===Campo.HIDDEN||this.oLabel.appendTo(c),b.toggleClass("estilo-label-oculta",this.escondeLabel),b.addClass(CampoForm.getClasseEstiloLabel(this.estiloLabel)),this.oCampo.setObjectData("slot-componente",b),this.oCampo.appendTo(e),emBranco(this.getTituloAdicional())||
e.append(this.montaSpanTituloAdicional()))}else this.escondeLabel||this.oLabel.appendTo(a),this.oCampo.appendTo(a)};this.setClass=function(a){this.oCampo.getObj().addClass(a)};this.getObjetoAlvoGrid=function(a){return this.oCampo.getObjetoAlvoGrid?a.parentElement:a};this.setEstiloExibicaoHint=function(a){this.estiloExibicaoHint=a};this.getEstiloExibicaoHint=function(){return this.estiloExibicaoHint};this.getJsonFormat=function(){var a={};a.id=this.nome;a.nome=this.titulo;a.tipo=this.tipo;a.tamanho=
g;a.chave=this.chave;a.obrigatorio=this.obrigatorio;a.maximo=p;a.readonly=this.chave?!0:this.oCampo.getReadOnly();a.visualizacao=this.visualizacao;a.hint=this.hint;a.iniHidden=this.iniHidden;a.estiloExibicaoHint=this.getEstiloExibicaoHint();this.oCampo.getJsonFormat?a.campo=this.oCampo.getJsonFormat():this.oCampo.lista&&this.oCampo.setLista&&(a.itens=this.oCampo.lista.map(function(c){return c}));var b=this.oCampo.externo;b&&b.getJsonFormat&&(a.campoExterno=b.getJsonFormat());return a};this.cloneCampo=
function(a){var b=CampoForm.fromJson(this.getJsonFormat());b.clone=!0;a&&this.vinculaCampoForm(b);return b};this.vinculaCampoForm=function(a){var b=this;a instanceof CampoForm&&(a.setValor(this.getValor()),a.adicionaCampoVinculado(this),this.adicionaCampoVinculado(a),this.oCampo instanceof CampoData&&(this.oCampo.campoDataRelacionado&&a.oCampo.setCampoDataRelacionado(this.oCampo.campoDataRelacionado,this.oCampo.menorOuIgual,!1),this.oCampo.campoDataRelacionadoPai&&a.oCampo.setCampoDataRelacionadoPai(this.oCampo.campoDataRelacionado,
this.oCampo.menorOuIgual,!1)),this.oCampo instanceof CampoDataHora&&(this.oCampo.setCampoClone(a.oCampo),this.oCampo.campoDataHoraRelacionado&&executaProximoLoopAguardando(function(){a.oCampo.setCampoDataHoraRelacionado(b.oCampo.campoDataHoraRelacionado.getCampoClone(),b.oCampo.menorOuIgual)})))};this.adicionaCampoVinculado=function(a){var b=this,c=this;null===this.camposVinculados&&(this.camposVinculados=[],this.onChange(function(){b.camposVinculados.forEach(function(e){e.setValor(c.getValor())})}),
this.oCampo.externo&&(this.onBlur(function(){c.camposVinculados.forEach(function(e){var k=c.oCampo.getValue();""!=k?(e.oCampo.externo.camposExterno[0][0].setValor(c.oCampo.externo.camposExterno[0][0].getValor()),e.oCampo.externo.camposExterno[1]&&e.oCampo.externo.camposExterno[1][0].setValor(c.oCampo.externo.camposExterno[1][0].getValor())):(e.oCampo.externo.camposExterno[0][0].setValor(k),e.oCampo.externo.camposExterno[1]&&e.oCampo.externo.camposExterno[1][0].setValor(k))})}),this.oCampo.externo.setCamposVinculados(a),
this.oCampo.externo.camposExterno.forEach(function(e,k){e[0].onChange(function(){var m=c.oCampo.externo.oCampo.getValor();c.camposVinculados.forEach(function(n){n.oCampo.externo.camposExterno[0][0]instanceof CampoNumerico&&n.oCampo.externo.camposExterno[0][0].setValor(m);n.oCampo.externo.camposExterno[k][0].setValor(e[0].getValor())})})})));this.camposVinculados.push(a)};this.removeCampoVinculado=function(a){a=this.camposVinculados.indexOf(a);-1<a&&this.camposVinculados.splice(a,1)};this.destroy=
function(){var a=this;this.camposVinculados.forEach(function(b){b.removeCampoVinculado(a)});this.camposVinculados=[]};this.getCaminhoAcessoCampoFromJanela=function(){var a=[this.getLabel()],b=this.getParent();if(b){if(b instanceof GridDados&&(b.mostraTitulo&&a[b.titulo],b=b.getParent(),!b))return a;b=b.getCaminhoAcessoTela();a=a.concat(b.map(function(c){return c.titulo||c.sLabel}))}return a};this.customEvents=[];(function(){var a=this,b="";"serial"==d&&(b=2);l&&(b=1);this.oLabel=new Label("lbl_"+
f,h,b);this.oLabel.onClick(function(){try{a.oCampo[0].focus(),selecionaCampo(a.oCampo[0])}catch(c){}})}).apply(this);r.apply(this);ControleBaseSistema.isLayoutV3()&&(Object.defineProperties(this,{estiloLabel:criaPropertyAccessorsPadroes("__estiloLabel",{set:function(a,b){($slot=this.oCampo.getObjectData("slot-componente"))&&$slot.removeClass(CampoForm.getClasseEstiloLabel(this.estiloLabel)).addClass(CampoForm.getClasseEstiloLabel(b));Reflect.set(this,a,b)}})}),this.setEstiloLabel(TelaPadrao.ESTILO_EXIBICAO_LABEL_LATERAL))};
CampoForm.getClasseEstiloLabel=function(d){var f={};return"estilo-label-"+(f[TelaPadrao.ESTILO_EXIBICAO_LABEL_LATERAL]="side",f[TelaPadrao.ESTILO_EXIBICAO_LABEL_LATERAL_INV]="side-inv",f[TelaPadrao.ESTILO_EXIBICAO_LABEL_TOPO]="top",f[TelaPadrao.ESTILO_EXIBICAO_LABEL_TOPO_INSIDE]="top-inside",f[TelaPadrao.ESTILO_EXIBICAO_LABEL_TOPO_HIDE]="top-inside-hide",f)[d]};CampoForm.MODO_EXIBICAO_HINT_BOTAO=1;CampoForm.MODO_EXIBICAO_HINT_TEXTUAL=2;
CampoForm.fromJson=function(d){var f=new CampoForm(d.tipo,d.id,d.nome,d.obrigatorio,d.tamanho,d.maximo);d.hint&&f.setHint(d.hint);if(d.iniHidden)f.oCampo.onAfterAppend(function(){executaProximoLoopAnimacao(function(){f.hide()})});d.readonly&&f.setReadOnly(!0);d.visualizacao&&f.setVisualizacao(!0);d.campo&&f.oCampo&&f.oCampo.carregaFromJson&&f.oCampo.carregaFromJson(d.campo);d.itens&&f.oCampo.setLista&&f.oCampo.setLista(d.itens.map(function(g){return g instanceof ItemLista||Array.isArray(g)?g:[g.valor,
g.nome,!0,{},g.hint]}));if(d.campoExterno){var h=d.campoExterno,l={};l[f.nome]=f.oCampo;h.camposExternos=h.camposExternos.map(function(g){g=g.slice();l[g[0].nome]||(l[g[0].nome]=Campo.fromJson(g[0]));g[0]=l[g[0].nome];return g});h.camposPesquisa=h.camposPesquisa.map(function(g){l[g.nome]||(l[g.nome]=Campo.fromJson(g));return l[g.nome]});f.oCampo.setExterno(h.rotina,h.acao,h.camposExternos,h.camposPesquisa,h.grid,h.parametro,h.camposVisiveis,h.fnSelect,h.usaBusca,h.opcoesSuggest,!1,h.fnStyle);f.oCampo.externo.carregaFromJson(d.campoExterno.dados)}d.estiloExibicaoHint&&
f.setEstiloExibicaoHint(d.estiloExibicaoHint);return f};;/*</editor-fold desc="js_campo_form.js">*/
/*<editor-fold desc="js_checkbox.js">*//*
 {ipm "async": false, "bundle": "componentes"}
*/
var Checkbox=function(c,d){this.setType=function(a){this.removeClass("checkbox_default");this.removeClass("checkbox_destaque");this.setClass("checkbox_"+a)};this.setSelecionado=function(a){this.removeClass("checkbox_selecionado_parcial");a?(this.setClass("checkbox_selecionado"),this.titulo?this.obj.attr("aria-description","selecionado"):this.obj.attr("aria-label","selecionado")):(this.removeClass("checkbox_selecionado"),this.titulo?this.obj.attr("aria-description","deselecionado"):this.obj.attr("aria-label",
"deselecionado"))};this.setSelecionadoParcial=function(){this.removeClass("checkbox_selecionado");this.setClass("checkbox_selecionado_parcial")};this.getSelecionado=function(){return this.obj.is(".checkbox_selecionado")};this.setTitulo=function(a){this.titulo=a;this.obj.attr("aria-label",a)};this.iniciaCheckbox=function(a,b){a=a||!1;this.criaObjeto("button");this.setClass("checkbox");this.setType("default");b&&this.setTitulo(b);this.setSelecionado(a)};this.iniciaCheckbox(c,d)};
Checkbox.prototype=new ComponenteForm;;/*</editor-fold desc="js_checkbox.js">*/
/*<editor-fold desc="js_collapse_content.js">*//*
 {ipm "async": false, "bundle": "componentes"}
*/
var CollapseContent=function(e,d,f,g,h,k){this.getDivContainer=function(){return this.divContainer};this.getConteudo=function(){return a.oContent};this.setConteudo=function(b){this.getDivContainer().empty();(a.oContent=b)&&a.oContent.appendTo(this.getDivContainer())};this.getTitulo=function(){return a.titulo};this.setTitulo=function(b){a.titulo=b;a.spanTitulo.html(a.titulo).attr("title",a.titulo)};this.onClick=function(b){this.onClick=b};this.setWidth=function(b){this.getObj().width(b)};this.setHeight=
function(b){"auto"==b?this.getObj().removeClass("auto_adaptable"):this.getObj().addClass("auto_adaptable");this.getObj().height(b)};this.hideContent=function(b){b=defaultVal(b,!0);this.divContainer.is(":visible")&&(this.botaoHide.setTitle("Mostrar "+this.descricaoConteudo).alteraClass("seta_abaixo"),this.divContainer.hide(),b&&this.obj.trigger("on_hide_content"))};this.showContent=function(b){b=defaultVal(b,!0);this.divContainer.is(":visible")||(this.divContainer.show(),this.botaoHide.setTitle("Esconder "+
this.descricaoConteudo).alteraClass("seta_acima"),b&&this.obj.trigger("on_show_content"))};this.onShowContent=function(b){this.obj.on("on_show_content",b)};this.onHideContent=function(b){this.obj.on("on_hide_content",b)};var a=this;this.titulo=d;this.nome=this.id=e;this.iniMin=defaultVal(h,!1);this.descricaoConteudo=defaultVal(d,"Conteúdo");this.botaoHide=null;this.criaObjeto("div");this.setWidth(defaultVal(f,"auto"));this.setHeight(defaultVal(g,"auto"));(function(){var b=a.iniMIn?"seta_abaixo":"seta_acima",
c=$("<div>").addClass("titulo_collapse_content fundo_titulo border_default titulo_grid disabled_user_select");ControleBaseSistema.layoutSistemaNovo||c.css({height:"21",textAlign:"left"});!1!==k&&(a.botaoHide=new BotaoEstrutura(b,function(){a.onClick&&a.onClick.call();a.getDivContainer().is(":visible")?a.hideContent():a.showContent()},!0),a.botaoHide.setLabel("Minimizar - "+a.titulo),a.botaoHide.setIgnoreTab(!0),a.botaoHide.appendTo(c),ControleBaseSistema.layoutSistemaNovo||a.botaoHide.setCss({marginTop:"3px",
marginLeft:"3px"}));a.spanTitulo=$("<span>");ControleBaseSistema.layoutSistemaNovo||a.spanTitulo.css({paddingLeft:"5px"});a.spanTitulo.html(a.titulo).attr("title",a.titulo);c.append(a.spanTitulo);c.appendTo(a.getObj());a.divContainer=$("<div>").addClass("estrutura_conteudo_collapse_content height_auto border_default_left border_default_bottom border_default_right");a.divContainer.css("overflow","auto");a.divContainer.appendTo(a.getObj());a.iniMin?a.divContainer.hide():a.divContainer.show()})()};
CollapseContent.prototype=new Componente;;/*</editor-fold desc="js_collapse_content.js">*/
/*<editor-fold desc="js_componente_hint.js">*//*
 {ipm "async": false, "bundle": "componentes"}
*/
var ComponenteHint=function(l,m,h,n){this.dinamico=this.iniHidden=!1;this.permiteOcultar=!0;this.setDinamico=function(a){this.dinamico=a};this.isDinamico=function(){return this.dinamico};this.show=function(a){a=defaultVal(a,300);this.obj.slideDown(a)};this.hide=function(a){a=defaultVal(a,300);this.obj.slideUp(a)};this.hideNow=function(){this.obj.hide()};this.setPermiteOcultar=function(a){this.permiteOcultar=a};this.display=function(a){a=defaultVal(a,30);a*=1E3;this.show();setTimeout(function(){me.hide()},
a)};this.setIniHidden=function(a){this.iniHidden=a};this.findComponente=function(a){return a==this.nome?this:!1};this.appendAsBalao=function(a,c,e,f,k){var g=this;if(ControleBaseSistema.layoutSistemaNovo)this.obj.removeClass("hint_campo"),this.obj.removeClass("hint-tela"),includeJavaScript("js_tooltip.js").then(function(){$(c).IpmHint({texto:g.obj,posicao:"top"==e?OpcoesIPMHint.POSICAO_BAIXO:OpcoesIPMHint.POSICAO_CIMA,invertido:g.obj.hasClass("hint_azul"),classes:"estrutura_hint_balao",apenasMostrar:{habilita:!0,
tempo:f||1E4,marcador:k}})});else{var b=this,d=c.offset();this.setClass("hint_campo_balao hint_floating disabled_user_select");this.appendTo(document.body);"top"==e?(this.obj.prepend($("<span>").addClass("conector_context conector_context_in conector_context_in_top").css("left",14)),this.obj.prepend($("<span>").addClass("conector_context conector_context_out conector_context_out_top").css("left",14)),d.top=d.top+c.height()+8):(this.obj.prepend($("<span>").addClass("conector_context conector_context_in conector_context_in_bottom").css("left",
14)),this.obj.prepend($("<span>").addClass("conector_context conector_context_out conector_context_out_bottom").css("left",14)),d.top=d.top-c.height()-b.obj.height(),d.left-=8);0>d.top&&(d.top=0);0>d.left&&(d.left=0);this.setCss({position:"absolute",top:d.top,left:d.left});-1!==a&&setTimeout(function(){b.getObj().slideDown(3E3,function(){b.getObj().remove()})},a)}};this.trataCriacaoBotaoFechar=function(){var a=this,c=this.getJanela().oJanela,e=this.getJanela();if(c){var f=c.getOptions(),k=f.rotina,
g=f.acao;e.bloqueiaJanela("Carregando preferências");loadAjax({rotina:1,acao:1,processo:"verificaPreferenciaHintTela",tipo:"script",parametro:{rotina_codigo:k,acao_codigo:g,ocultarHint:!0},completo:function(p){p?(a.obj.css("display","none"),a.hide(0)):(b.setAtivo(!1),b.obj.css("display","none"));e.ajustaConteudoJanela();e.desbloqueiaJanela()}});c=$(".janela_fundo_right",c);var b=(new BotaoEstrutura("sobre_2",function(){a.show(0);b.setAtivo(!1);b.obj.css("display","none");e.ajustaConteudoJanela();
loadAjax({rotina:1,acao:1,processo:"gravaPreferenciaHintTela",tipo:"script",parametro:{rotina_codigo:k,acao_codigo:g,ocultarHint:!1}})},!0)).addClass("estrutura_botao_informacoes_hint acao-destaque").setLabel("Mostrar Hint");b.appendTo(c);c=$("<span>").attr("title","Fechar Hint").attr("tabindex",0).addClass("span_fechar_hint estrutura_botao_fechar_hint");ControleBaseSistema.layoutSistemaNovo||c.css({"float":"right",width:"1.6rem","text-align":"center",cursor:"pointer"});c.append(IpmIcone.buscaFA("times").criaObjeto());
f=$("h3",this.obj);var d=$("div",this.obj);ControleBaseSistema.isLayoutV3()&&(f=$("div > h3",this.obj),d=$("div > p",this.obj));0<f.length&&""!=f.text()?f.css({display:"inline-block",width:"calc(100% - 1.7rem)"}):d.css({display:"inline-block",width:"calc(100% - 1.7rem)"});c.on("click",function(){a.hide(0);b.setAtivo(!0);b.obj.css("display","");e.ajustaConteudoJanela();loadAjax({rotina:1,acao:1,processo:"gravaPreferenciaHintTela",tipo:"script",parametro:{rotina_codigo:k,acao_codigo:g,ocultarHint:!0}})});
0<f.length&&""!=f.text()?(c.appendTo(this.obj),ControleBaseSistema.isLayoutV3()||d.appendTo(this.obj)):c.appendTo(this.obj)}};this.setTitulo=function(a){this.objTitulo.html(a)};this.setDescricao=function(a){this.objDescricao.html(a)};this.montaTituloDescricaoHint=function(a,c){if(ControleBaseSistema.isLayoutV3()){var e=$("<div>").appendTo(this.obj).addClass("column");a?(this.objTitulo=$("<h3>").appendTo(e),this.objDescricao=$("<p>").appendTo(e),this.setTitulo(c),this.setDescricao(a)):(this.objTitulo=
this.objDescricao=$("<span>").addClass("texto_negrito").appendTo(e),this.setDescricao(c))}else a?(this.objTitulo=$("<h3>").appendTo(this.obj),this.setTitulo(c),this.objDescricao=$("<div>").appendTo(this.obj),this.setDescricao(a)):(this.objTitulo=this.objDescricao=$("<div>").addClass("texto_negrito").appendTo(this.obj),this.setDescricao(c))};this.iniciaComponenteHint=function(a,c,e,f){var k=this;this.nome=a;this.criaObjeto("div");this.obj.attr("role","document").attr("aria-label","Hint");ControleNavegacao.acessibilidade&&
this.obj.attr("tabindex",0);Message.validaFormatoMensagem(c)?Message.getMensagemHintAsync(c).then(function(b){b&&(c="",e=b);k.montaTituloDescricaoHint(e,c)}):this.montaTituloDescricaoHint(e,c);this.setDinamico(defaultVal(f,!1));this.setClass("hint_campo hint-tela");var g=this;this.onAfterAppend(function(b){if(CONST.ATENDE&&b.getJanela()&&b.getJanela().getConteudo&&b.getJanela().isConteudoCarregado()&&b.getJanela().getConteudo()){var d=b.getJanela().getConteudo();if(b.obj.parent().hasClass("estrutura_consulta_area_filtros")){if(d=
$("> .estrutura_consulta_grid_base > .estrutura_consulta_area_filtros > .hint_campo",d),0==d.length||b.obj[0]!=d[0])b.permiteOcultar=!1}else if(b.obj.parent().hasClass("div_area_filtros_consulta")){if(d=$("> .consulta_padrao > .form_consulta > .div_area_filtros_consulta > .hint_campo",d),0==d.length||b.obj[0]!=d[0])b.permiteOcultar=!1}else d!=b.obj.parent()[0]&&(b.permiteOcultar=!1)}b.isDinamico()?($(this).parent().css("position","relative"),$(this).css({position:"absolute","box-sizing":"border-box",
"z-index":0}),g.objDescricao.css({float:"left"}),b=$(document.createElement("span")),b.addClass("agrupador_consulta_fechar"),b.attr("title","Fechar"),b.on("click",function(){g.hide()}),b.css({width:"9px",height:"15px",margin:"0px 2px 0px 6px","font-size":"12px","background-image":"none"}),b.text("X"),g.obj.append(b),g.iniHidden&&g.hideNow()):b.permiteOcultar&&CONST.ATENDE&&b.trataCriacaoBotaoFechar()})};l&&this.iniciaComponenteHint(l,m,h,n)};ComponenteHint.prototype=new ComponenteTela;
ComponenteHint.criaHintCampo=function(l){var m=this,h=new BotaoEstrutura("sobre");h.desativaHover();h.addClass("hint-campo");h.onAfterAppend(function(){includeJavaScript("js_tooltip.js",function(){h.getObj().IpmHint(l,{showMessageCode:!0})},m)});h.attr("data-ipm-hint",l);return h};;/*</editor-fold desc="js_componente_hint.js">*/
/*<editor-fold desc="js_componente_html.js">*//*
 {ipm "async": false, "bundle": "componentes"}
*/
var ComponenteHtml=function(f,g){function h(a){switch(a.data("tipo")){case "FA":var b=a.data("codigo");if(b)var c=IpmIcone.FA(b).criaObjeto();else b=a.data("estilo")||null,c=IpmIcone.buscaFA(a.data("identificador"),b).criaObjeto();break;case "SVG":c=IpmIcone.SVG(a.data("origem"),a.data("identificador")).criaObjeto(!0,a.data("colorido"));break;case "PNG":c=IpmIcone.PNG(a.data("arquivo"),a.data("tamanho"),a.data("linha"),a.data("codigo")).criaObjeto()}if(c){var k={"data-codigo":!0,"data-estilo":!0,
"data-identificador":!0,"data-origem":!0,"data-arquivo":!0,"data-colorido":!0,"data-tamanho":!0,"data-linha":!0};Array.from(a[0].attributes).forEach(function(d){if(!k[d.name]){var e=d.value;"class"==d.name&&(e=e+" "+c.attr("class"));c.attr(d.name,e)}});a.attr("aria-label")?c.attr("role","img").attr("aria-label",a.attr("aria-label")):c.attr("role","presentation");a.before(c);a.detach()}}this.montaComponente=function(a,b){["svg","ipm-icone"].includes(b)?(this.criaObjeto("span"),this.onAfterAppend(function(c){h(c.obj)})):
this.criaObjeto(b);this.nome=a;this.filhos=[]};this.setConteudoTexto=function(a,b){b?this.obj.html(a):this.obj.text(a)};this.setFocavel=function(a,b){this.setAtributo("tabindex",a?"0":"");void 0!==b&&null!==b&&this.setAtributo("aria-label",b)};this.setFilhos=function(a){this.filhos=a.map(function(b){return avaliaCaminho(b)})||[]};this.findComponente=function(a){if(this.nome==a)return this;var b=!1;this.filhos.some(function(c){if(b=c&&c.findComponente(a))return!0});return b};f&&this.montaComponente(f,
g)};ComponenteHtml.prototype=new ComponenteForm;;/*</editor-fold desc="js_componente_html.js">*/
/*<editor-fold desc="js_console_sql.js">*//*
 {ipm "async": false, "bundle": "componentes"}
*/
var ConsoleSql=function(f,h,k,g){function l(){var a=this;this.getObj().width("100%").height("100%");var c=$("<div>").addClass("auto_adaptable").appendTo(this.getObj());this.oDivEditor=$("<div>").addClass("console_sql_area_editor");this.oDivEditor.appendTo(c);this.oEditorSql=new CampoEditorCodigoFonte("editor_sql_console",!1,null,null,"");this.oEditorSql.setLinguagem(CampoEditorCodigoFonte.LINGUAGENS.PGSQL);this.oDivResposta=$("<div>").addClass("height_auto console_sql_area_resposta");this.oDivResposta.appendTo(c);
this.oDivEditor.resizable({handles:"s",resize:function(b,d){d.element.getJanela().ajustaConteudoJanela()}});this.onAfterAppend(function(b){b.permiteExecutar&&b.oEditorSql.adicionaBotao("executar","fa-play",function(){a.executeSql()},"Executar");b.permiteConstante&&b.oEditorSql.adicionaBotao("constantes_parametros","fa-code",function(){a.oEditorSql.abreJanelaConstantesParametros()},"Constantes/Parâmetros");b.permiteParametro&&b.oEditorSql.adicionaBotao("parametros_dinamicos","fa-exchange",function(){a.oEditorSql.adicionaParametroDinamico()},
"Adicionar Parâmetro Dinâmico");b.permiteFormatar&&b.oEditorSql.adicionaBotao("formatar","fa-paragraph",function(){a.oEditorSql.formataCodigo()},"Formatar");if(b.permiteVariaveisContexto)a.oEditorSql.onAfterAppend(function(){a.oEditorSql.adicionaVariaveisContexto(a.variaveisContexto)})})}this.oDivResposta=this.oDivEditor=this.oEditorSql=null;this.palavrasChave=[];this.permiteConstante=this.permiteExecutar=!0;this.permiteParametro=!1;this.permiteFormatar=!0;this.permiteVariaveisContexto=!1;this.variaveisContexto=
null;this.getValor=function(){return this.oEditorSql.getValor()};this.setValor=function(a){this.oEditorSql.setValor(a)};this.setVisualizacao=function(a){this.oEditorSql.setVisualizacao(a)};this.getVisualizacao=function(){return this.oEditorSql.getVisualizacao()};this.getValue=function(){return this.oEditorSql.getValor()};this.getMemo=function(){return this.oEditorSql};this.setNome=function(a){this.nome=a};this.getNome=function(){return this.nome};this.setTitulo=function(a){this.titulo=a};this.getTitulo=
function(){return this.titulo};this.setPalavrasChave=function(a){this.palavrasChave=a};this.setPermiteExecutar=function(a){this.permiteExecutar=a};this.setPermiteConstante=function(a){this.permiteConstante=a};this.setPermiteParametro=function(a){this.permiteParametro=a};this.setPermiteFormatar=function(a){this.permiteFormatar=a};this.setPermiteVariaveisContexto=function(a){this.permiteVariaveisContexto=a};this.setVariaveisContexto=function(a){this.variaveisContexto=a};this.setTimeoutSql=function(a){this.timeoutSql=
a};this.limpa=function(){this.getMemo().limpa();this.oDivResposta.empty()};this.setObrigatorio=function(a){this.obrigatorio=a};this.getObrigatorio=function(){return this.obrigatorio};this.isPreenchido=function(){return this.getMemo().isPreenchido()};this.valida=function(){if(this.getObrigatorio()&&!this.isPreenchido())throw this.getMemo().setClassCampoInvalido(!0),new Message.mensagemErro("EST-000113",!1,{nomeDoCampo:this.titulo});this.getMemo().setClassCampoInvalido(!1);return!0};this.forceFocus=
function(){this.getMemo().focus()};this.findComponente=function(a){return this.getNome()==a?this:!1};this.setLastPosCursor=function(a){this.posCursor=a};this.getLastPosCursor=function(){return this.posCursor};this.insereConstParam=function(a){a=this.getValor().substr(0,this.getLastPosCursor())+"{"+a.nome_as_variavel+"}"+this.getValor().substr(this.getLastPosCursor());this.getMemo().setValor(a)};this.executeSql=function(){var a=this.getValor().trim();if(!em_branco(a)){var c=this.getJanela(),b=this.timeoutSql;
this.oDivResposta.empty();var d=$("<div>").height("100%").width("100%");d.appendTo(this.oDivResposta);c.bloqueiaJanela("Executando o SQL.");new Janela({rotina:12009,acao:176,frame:d,parametro:{sqlConsole:a,timeoutSql:b,variavelContexto:this.permiteVariaveisContexto},onComplete:function(){c.desbloqueiaJanela()},onException:function(){c.desbloqueiaJanela()}})}};this.setResponseDataBaseObject=function(a){a.appendTo(this.oDivResposta)};this.montaComponente=function(a,c,b,d){var e=this;this.criaObjeto("div");
this.setNome(a);this.setTitulo(c);this.setAtributo("tipo","console_sql");l.apply(this);this.onAfterAppend(function(){!1!==d&&e.setValor(d);e.oEditorSql.setPalavrasChave(e.palavrasChave);e.oEditorSql.appendTo(e.oDivEditor)});this.setObrigatorio(b)};f&&this.montaComponente(f,h,k,g)};ConsoleSql.prototype=new Componente;
ConsoleSql.getValorConstanteParametroSql=function(f,h,k){ControleBaseSistema.bloqueiaSistema();return new Promise(function(g){loadAjax({rotina:12009,acao:861,processo:"getValorConstanteParametroSql",parametro:{tipo:f,codigo:h,parametros:k},completo:function(l){g(l.valor)},error:function(){g(null)},"finally":function(){ControleBaseSistema.desbloqueiaSistema()}})})};;/*</editor-fold desc="js_console_sql.js">*/
/*<editor-fold desc="js_context_flutuante.js">*//*
 {ipm "async": false, "bundle": "componentes"}
*/
var ContextoFlutuante=function(){function z(c){return $(".estrutura_janela_contexto",c||document.body)}function B(c,e,h){function b(d){if(d=C[d])h=$.extend({},h,d(c)),h.base.data("instance",h),h.base[0].myInstance=h}h||(h=c);Array.isArray(e)?e.forEach(b):b(e);return h}var C={},t=$("<div>").addClass("estrutura_container_contexto_flutuante contexto-flutuante-overlay");ready(function(){t.appendTo(ControleElementosSistema.buscaElementoContainer(!0));ControleBaseSistema.addAlvoPropagacao(t,function(c){!1===
c[0].isConnected||c.parents().addBack().filter(".estrutura_modal_container,.context_menu").length||z(t).each(function(){$(this).data("instance").close(!0,!1)})});$(document.body).on("wheel",function(c){ControleBaseSistema.triggerAlvoPropagacao(c)});$(window).on("resize",function(c){var e="text"===$(document.activeElement).attr("type")||"text"===$(document.activeElement).prop("type");c.target!==window||e||-1==$(c.target).parentsUntil(document.body).addBack().toArray().indexOf(t[0])&&z().toArray().forEach(function(h){setTimeout(function(){$(h).data("instance").close(!0,
!0)},__useAnimation?500:0)})});C=function(){var c={};c[ContextoFlutuante.ESTILO_CONTEXTO_ACOES]=function(e){e.base.addClass("estrutura_janela_contexto_lista");var h=$("<div>").addClass("estrutura_janela_contexto_acoes").appendTo(e.corpo),b=new TelaPadrao("tela_acoes");b.setLayoutExibicao({id:"flexbox",direcao:"column",nomeClasse:"tela_estrutura_janela_contexto_acoes"});return{show:function(){return e.show.apply(this,arguments).then(function(){b.appendTo(h);e._reposition()})},addAcao:function(d,r,
p,x,u){var v=new BotaoAcao(d.acao,function(){if(d.habilitado&&(!u||u(d))){var a="function"===typeof d.click?d.click:eval("("+d.click+")");var k=$.extend(r,d.chave),m=$.extend({},d.parametro);a.apply(null,[k,{},d,!1,m,null,p,null]);e.close()}},d.habilitado,!1,!0,d.fontAwesome||"fa-file-text-o");v.setLabel(d.titulo);v.showAsButton();v.setStyle("--botao-nivel-agrupamento",x||0);b.adicionaComponente(v);return this},addGroup:function(d,r,p,x,u,v,a){var k=this;v=v||0;r=new BotaoAcao(null,function(){},!1,
!1,!0,r||"fa-file-text-o");r.setLabel(d);r.showAsButton();b.adicionaComponente(r);p.forEach(function(m){k.addAcao(m,x,u,v+1,a)});return this},addAcaoGenerica:function(d,r,p,x,u){d=new BotaoAcao(d,p,!0,!1,!0,u);d.showAsButton();d.setLabel(r);d.setStyle("--botao-nivel-agrupamento",x||0);b.adicionaComponente(d);return this}}};c[ContextoFlutuante.ESTILO_CONTEXTO_DETALHES]=function(e){e.corpo.css("display","flex");var h=$("<div>").addClass("estrutura_janela_contexto_detalhamento").appendTo(e.corpo),b=
$("<p>").html("Nenhuma descrição informada...").appendTo(h);return{detalhes:h,setDetalhes:function(d){d instanceof jQuery?(b.detach(),d.appendTo(h)):b.html(d);return this}}};c[ContextoFlutuante.ESTILO_CONTEXTO_ACOES_DETALHES]=function(e){return B(e,[ContextoFlutuante.ESTILO_CONTEXTO_ACOES,ContextoFlutuante.ESTILO_CONTEXTO_DETALHES])};c[ContextoFlutuante.ESTILO_CONTEXTO_SETAS]=function(e){var h=[];return{criaSeta:function(b){includeJavaScript("js_funcao_vetores.js").then(function(){h.push([$("<span>").appendTo(this.base),
b,this.base,ControleBaseSistema.isLayoutV3()?"context-seta":"estrutura_context_seta"])}.bind(this));return this},_reposition:function(){e._reposition.apply(this,arguments);h.forEach(function(b){VetorUtils.apontaPara.apply(null,b)});return this}}};return c}()});return{monta:function(c,e,h){var b=$("<article>").addClass("estrutura_janela_contexto contexto_acessibilidade contexto-flutuante").attr("tabindex",0).attr("aria-label",strip_tags(c)).attr("data-info-acessibilidade",strip_tags(c));if(!ControleBaseSistema.layoutSistemaNovo)b.on("click wheel",
function(a){stopPropagationEvent(a,!1,!1,!1,!1)});var d=[],r=function(){b.detach();h&&h();d.forEach(function(a){a&&a.close&&a.close()})},p=$("<header>").addClass("estrutura_janela_contexto_cabecalho contexto-flutuante-cabecalho").appendTo(b),x=$("<span>").addClass("estrutura_janela_contexto_titulo contexto-flutuante-titulo").html(c).appendTo(p),u;c||(p.css("padding",0),p.css("height",0));c=$("<div>").addClass("estrutura_janela_contexto_corpo contexto-flutuante-corpo").appendTo(b);var v=$("<footer>").addClass("estrutura_janela_contexto_rodape contexto-flutuante-rodape").appendTo(b);
e={aberto:!1,restringePosicaoAlvo:!1,cabecalho:p,corpo:c,rodape:v,base:b,posicao:e,corBase:function(a){this.base.css("--cor-contexto-base",a);return this},corDestaque:function(a){this.base.css("--cor-contexto-destaque",a);return this},titulo:function(a){if(void 0===a)return x;b.attr("aria-label",a);b.attr("data-info-acessibilidade",a);x.html(a);return this},subtitulo:function(a){u||(u=$("<span>").addClass("estrutura_janela_contexto_subtitulo contexto-flutuante-subtitulo").appendTo(p),p.addClass("estrutura_janela_contexto_cabecalho_subtitulo contexto-flutuante-cabecalho-com-subtitulo"));
u.html(a);return this},setIconeCabecalho:function(a){a instanceof IpmIcone.IconeFontAwesome||(a=IpmIcone.FA(a));p.addClass("contexto-flutuante-cabecalho-com-icone").prepend(a.criaObjeto());return this},criaBotoes:function(a){var k=null;if(void 0===a||a)k=new BotaoEstrutura("more_option",null,!0,"mais-opcoes"),k.attr("id","estrutura-janela-contexto-botao-mais-opcoes"),k.addClass("contexto-flutuante-cabecalho-acao"),k.showAsGroup(!0,!1,!0),k.appendTo(p);a=new BotaoEstrutura("fechar",function(){b.data("instance").close()},
!0,"fechar");a.attr("id","estrutura-janela-contexto-botao-fechar");a.addClass("contexto-flutuante-cabecalho-acao");a.appendTo(p);return k},posiciona:function(a,k){function m(l,n){n&&(l=l==ContextoFlutuante.ESTILO_POSICAO_BASE||l==ContextoFlutuante.ESTILO_POSICAO_TOPO||n==ContextoFlutuante.ESTILO_POSICAO_ESQUERDA||n==ContextoFlutuante.ESTILO_POSICAO_DIREITA?n+" "+l:l+(" "+n));return l}this.direcao="function"==typeof a?function(){return a(m)}:m(a,k);this.reposiciona();return this},reposiciona:function(){this._reposition()},
onLoseFocusClose:function(a){this.mantemOnFocus=!a;return this},inject:function(a){return B(this,a)},rodapeOculto:function(){this.base.addClass("estrutura_janela_contexto_rodape_oculto contexto-flutuante-rodape-oculto");return this},focusOnShow:function(){this.focar=!0;return this},onBeforeShow:function(a){this.beforeShow||(this.beforeShow=[]);this.beforeShow.push(a)},onBeforeClose:function(a){this.beforeClose||(this.beforeClose=[]);this.beforeClose.some(function(k){return k===a})||this.beforeClose.push(a)},
onShowSetMaxIndex:function(a){this.bShowSetMaxIndex=void 0===a?!0:a;return this},closeOnEsc:function(){var a=this;b.on("keydown",function(k){"Escape"==k.key&&a.close()});return this},_reposition:function(){var a=this,k=$("div,article,section",b).toArray().filter(function(q){return q.scrollTop}).map(function(q){return[q.scrollTop,q]});b.css("left","");b.css("top","");b.css("right","");b.css("bottom","");var m=new Event("dummy"),l=this.posicao,n=this.direcao;"function"==typeof this.posicao&&(l=this.posicao());
"function"==typeof this.direcao&&(n=this.direcao());var A=this.base.parent(),f=null,w={top:0,left:0,bottom:window.innerHeight,right:window.innerWidth};if(A.length){var D=A[0].getBoundingClientRect();this.restringePosicaoAlvo&&(w=D);f=$.extend({},A[0].getBoundingClientRect());f.bottom=window.innerHeight-f.bottom;f.right=window.innerWidth-f.right}m.pageX=l.x;m.pageY=l.y;n=n||"left top";b.position({my:n,at:"center bottom",of:m,collision:"fit",within:document.body});var y=parseInt(b.css("min-width"))||
0;["top","bottom","left","right"].forEach(function(q){var g=b[0].style.getPropertyValue(q);g&&g.endsWith("px")&&b[0].style.setProperty(q,parseInt(g)+"px")});n.split(" ").reverse().forEach(function(q){var g=b[0].getBoundingClientRect();switch(q){case ContextoFlutuante.ESTILO_POSICAO_BASE:g.top<parseInt(l.y)&&b.css("top",l.y-(f?f.top:0));g=b[0].getBoundingClientRect();g.bottom>=w.bottom&&b.css("top",g.top-(g.bottom-w.bottom));break;case ContextoFlutuante.ESTILO_POSICAO_TOPO:g.bottom>=l.y&&(b.css("bottom",
window.innerHeight-l.y-(f?f.bottom:0)),b.css("top",""));g=b[0].getBoundingClientRect();g.top<w.top&&b.css("top",a.restringePosicaoAlvo?0:f?-f.top:0);break;case ContextoFlutuante.ESTILO_POSICAO_DIREITA:g.left<parseInt(l.x)?(q=l.x-(f?f.left:0),y&&window.innerWidth-q<y?b.css("left",window.innerWidth-y):b.css("left",q)):y&&window.innerWidth-g.left<y&&b.css("left",window.innerWidth-y);g=b[0].getBoundingClientRect();g.right>=w.right&&b.css("right",a.restringePosicaoAlvo?0:f?-f.right:0);break;case ContextoFlutuante.ESTILO_POSICAO_ESQUERDA:g.right>=
l.x&&(b.css("right",window.innerWidth-l.x-(f?f.right:0)),b.css("left",""));g=b[0].getBoundingClientRect();g.left<w.left&&b.css("left",a.restringePosicaoAlvo?0:f?-f.left:0);break;case ContextoFlutuante.ESTILO_POSICAO_CENTRO:g.bottom>=w.bottom&&(b.css("bottom",a.restringePosicaoAlvo?0:f?-f.bottom:0),b.css("top","")),g.right>=w.right&&(b.css("right",a.restringePosicaoAlvo?0:f?-f.right:0),b.css("left","")),g=b[0].getBoundingClientRect(),g.top<w.top&&b.css("top",a.restringePosicaoAlvo?0:f?-f.top:0),g.left<
w.left&&b.css("left",a.restringePosicaoAlvo?0:f?-f.left:0)}});k.forEach(function(q){return q[1].scrollTop=q[0]})},adicionaDependente:function(a){d.push(a)},show:function(a,k){var m=this;m.aberto=!0;m.restringePosicaoAlvo=k;this.beforeShow&&this.beforeShow.length&&this.beforeShow.forEach(function(l){l()});return new Promise(function(l){b.css("opacity","0");executaProximoLoopAnimacao(function(){if(m.aberto){b.appendTo(a||t);m.bShowSetMaxIndex&&$(m.base).parent().css("z-index","calc(var(--zindex-janela-bloqueadora) + 99)");
ControleBaseSistema.atualizaVisibilidadeAuxilioAlvoPropagacao();if(!a){t.appendTo(t.parent());for(var n=t.prev();n&&n.hasClass("estrutura_modal_container");)n.before(t),n=t.prev()}m._reposition();b.css("opacity","");m.focar&&ControleNavegacao.primeiroElementoFoco(b,!0);l()}})})},close:function(a,k){this.beforeClose&&this.beforeClose.length&&this.beforeClose.forEach(function(m){m(a,k)});a&&this.mantemOnFocus?k&&this._reposition():(this.aberto=!1,r(),this.bShowSetMaxIndex&&$(this.base).parent().css("z-index",
"var(--zindex-janela-bloqueadora)"));ControleBaseSistema.atualizaVisibilidadeAuxilioAlvoPropagacao();this.focar&&ControleNavegacao.reiniciaFoco();return this}};b.data("instance",e);return b[0].myInstance=e},montaContainerContexto:function(){var c=$("<div>").addClass("estrutura_container_contexto_flutuante").appendTo(ControleElementosSistema.buscaElementoContainer(!0));ControleBaseSistema.addAlvoPropagacao(c,function(e){e.parents().addBack().filter(".estrutura_modal_container,.context_menu").length||
z(c).each(function(){$(this).data("instance").close(!0,!1)})});return c},getAll:z,reposicionaTodos:function(c){ContextoFlutuante.getAll(c).toArray().forEach(function(e){e.myInstance&&e.myInstance.reposiciona()})},reposiciona:function(c){(c=ContextoFlutuante.fromObjeto(c))&&c.toArray().forEach(function(e){e.myInstance&&e.myInstance.reposiciona()})},fromObjeto:function(c){c.obj&&(c=c.obj);c=$(c);c=c.parents(".estrutura_janela_contexto");return c.length?c:null}}}();
ContextoFlutuante.ESTILO_CONTEXTO_ACOES="acao";ContextoFlutuante.ESTILO_CONTEXTO_DETALHES="detalhe";ContextoFlutuante.ESTILO_CONTEXTO_ACOES_DETALHES="acao+detalhe";ContextoFlutuante.ESTILO_CONTEXTO_SETAS="setas";ContextoFlutuante.ESTILO_POSICAO_DIREITA="left";ContextoFlutuante.ESTILO_POSICAO_ESQUERDA="right";ContextoFlutuante.ESTILO_POSICAO_CENTRO="center";ContextoFlutuante.ESTILO_POSICAO_TOPO="bottom";ContextoFlutuante.ESTILO_POSICAO_BASE="top";;/*</editor-fold desc="js_context_flutuante.js">*/
/*<editor-fold desc="js_context_gadget.js">*//*
 {ipm "async": false, "bundle": "componentes"}
*/
var ContextGadget=function(e,d){var f="context_gadget";d&&(f+="_alvo");d=d||$(document.body);e&&!ControleBaseSistema.layoutSistemaNovo&&e.stopPropagation();this.event=e;this.obj=$("#"+f);0==this.obj.length?(this.obj=$("<article>").addClass("context_menu contexto_acessibilidade").attr("data-info-acessibilidade","Gadget").attr("id",f),this.prependTo(d)):this.obj.empty();this.obj.removeClass("context_fixo");this.obj.removeClass("context_menu_gadget");this.obj.removeClass("context_menu_shadow_top");this.obj.addClass("context_menu_shadow_bottom");
this.event&&(this.obj.get(0).eventHandler=this.event);this.obj.css("overflow","auto");d=$("<table>");f=$("<tbody>");d.append(f);this.obj.append(d);var h=this;this.obj.off("mousedown");this.obj.on("mousedown",function(){$(ControleElementosSistema.getSeletorElemento(".area_bloqueio_janela")).is(":visible")||$(".context_menu_gadget").is(":visible")&&h.ajustaZIndex()});this.show=function(a,b){!0===a?($(document.body).bloqueiaJanela(),$(document.body).removeLoading(),ControleBaseSistema.layoutSistemaNovo&&
this.obj.appendTo(document.body)):ControleBaseSistema.layoutSistemaNovo&&this.obj.parent()[0]==document.body&&this.obj.appendTo(ControleElementosSistema.buscaElementoContainerJanelas());a=$(ControleElementosSistema.getSeletorElemento(".area_bloqueio_janela"));a.is(":visible")?(a=parseFloat(a.css("z-index")||0),0!=a?this.obj.css("z-index",a+1):this.obj.css("z-index","99997")):b&&this.ajustaZIndex();a=$(document.body).height()-this.obj.offset().top-5;10<a?this.obj.css("max-height",a):this.obj.css("max-height",
"auto");a=$("input",this.obj);0<a.length&&a.trigger("focus");!0===b&&(this.obj.addClass("context_fixo"),$(".janela_ipm_ativa").removeClass("janela_ipm_ativa").addClass("janela_ipm_desativa"));this.obj.show()};this.hide=function(){$(document.body).desbloqueiaJanela();this.obj.hide();var a=this.obj.get(0).eventHandler;a&&(a=a.target,$(a).parent().is("li")?ControleNavegacao.focaElemento($(a).parent()):canReceiveFocus(a)&&focusCampo(a));var b=0;$(".janela_ipm").each(function(){var c=$(this),g=c.getOptions();
c=c.css("zIndex");g&&g.bloqueadora||(b=parseFloat(b<c?c:b))});$(".janela_ipm").each(function(){var c=$(this);parseFloat(c.css("zIndex"))==b&&c.is(":visible")&&c.ativaJanela()})};this.ajustaZIndex=function(){var a=ControleBaseSistema.layoutSistemaNovo?1:0;$(".janela_ipm").each(function(){var b=$(this),c=b.getOptions();b=b.css("zIndex");c&&c.bloqueadora||(a=parseFloat(a<b?b:a))});this.obj.css("z-index",a+1)};e&&this.setPosition(e.clientY,e.clientX);this.setCss("zIndex",99997);this.setWidth("auto");
this.setMinWidth(120)};ContextGadget.prototype=new Context;;/*</editor-fold desc="js_context_gadget.js">*/
/*<editor-fold desc="js_cronometro.js">*//*
 {ipm "async": false, "bundle": "componentes"}
*/
var Cronometro=function(p,q){function n(){a.opcoes=$.extend(!0,{},a.defaults,a.opcoesOriginal)}function r(){if(0!=a.opcoesOriginal.hour||0!=a.opcoesOriginal.minute||0!=a.opcoesOriginal.second){var b=a.opcoes.alert;a.opcoes.hour<=b.hour&&a.opcoes.minute<=b.minute&&a.opcoes.second<=b.second?"#F00"!=a.getObj().css("color")&&(a.getObj().css("color","#F00"),$(".fade_out",a.getObj()).fadeOut(100,function(){$(this).fadeIn(100)})):a.getObj().css("color","")}}function e(){h.html(lpad(a.opcoes.hour,2,"0"));
k.html(lpad(a.opcoes.minute,2,"0"));l.html(lpad(a.opcoes.second,2,"0"));r()}var a=this;this.nome=this.opcoesOriginal=this.opcoes=null;var h,k,l,c=!1;this.disabled=!1;this.defaults={alert:{hour:0,minute:0,second:10},finish:void 0,onPlay:void 0,decrement:1,hour:0,minute:0,second:0,finalHour:0,finalMinute:0,finalSecond:0};this.setNome=function(b){this.nome=b};this.getNome=function(){return this.nome};this.init=function(b){this.criaObjeto("div");this.setNome(p);this.getObj().addClass("border_default");
this.getObj().css({"max-width":"250px","border-radius":"5px 5px 5px 5px",width:"200px"});this.opcoesOriginal=$.extend(!0,{},this.defaults,b);this.opcoes=$.extend(!0,{},this.defaults,this.opcoesOriginal);this.initDisplay()};this.reloadConfiguracoes=function(b){this.opcoesOriginal=$.extend(!0,{},this.opcoesOriginal,b);this.stop()};this.play=function(){if(this.disabled)return!1;this.opcoes.decrement=this.opcoesOriginal.decrement;a.oPlay.setAtivo(!1);c||(n(),e(),this.initCrony());a.opcoes.onPlay&&("function"!==
typeof a.opcoes.onPlay&&(a.opcoes.onPlay=eval("("+a.opcoes.onPlay+");")),a.opcoes.onPlay.call(a))};this.stop=function(){if(this.disabled)return!1;clearInterval(c);n();e();c=!1;a.oPlay.setAtivo(!0)};this.pause=function(){this.opcoes.decrement=0;a.oPlay.setAtivo(!0)};this.initDisplay=function(){var b=$(document.createElement("div"));b.css({height:60,"font-size":"50px","text-align":"left"});this.getObj().append(b);h=$(document.createElement("span"));k=$(document.createElement("span"));l=$(document.createElement("span"));
b.append(h);b.append('<span class="fade_out">:</span>');b.append(k);b.append('<span class="fade_out">:</span>');b.append(l);b=$(document.createElement("div"));b.css({height:"20px","text-align":"center","vertical-align":"middle"});b.addClass("border_default_top");this.oPlay=new BotaoEstrutura("play_pause",function(){this.ativo?a.play():a.pause()},!0);this.oPlay.setCss("padding-right","5px");this.oPlay.appendTo(b);this.oStop=new BotaoEstrutura("stop",function(){a.stop()},!0);this.oStop.appendTo(b);
this.getObj().append(b);e()};this.initCrony=function(){var b=new Date;return 0==a.opcoes.second&&0==a.opcoes.minute&&0==a.opcoes.hour?(this.oPlay.setAtivo(!1),!1):this.getObj().each(function(){c=setInterval(function(){0==a.opcoes.decrement&&(b=new Date);var f=new Date,m=b.getHours()-f.getHours(),d=b.getMinutes()-f.getMinutes(),g=b.getSeconds()-f.getSeconds();0!=d&&59==g&&(g=0);0!=m&&59==d&&(d=0);0==a.opcoes.second?0==a.opcoes.minute?0<a.opcoes.hour&&(a.opcoes.hour+=(0==m?-1:m)*a.opcoes.decrement,
a.opcoes.minute=59,a.opcoes.second=59):(a.opcoes.minute+=(0==d?-1:d)*a.opcoes.decrement,a.opcoes.second=59):a.opcoes.second+=(0==g?-1:g)*a.opcoes.decrement;if(0>a.opcoes.second||0>a.opcoes.minute||0>a.opcoes.hour)a.opcoes.second=a.opcoes.finalSecond,a.opcoes.minute=a.opcoes.finalMinute,a.opcoes.hour=a.opcoes.finalHour;b=f;e();a.opcoes.second==a.opcoes.finalSecond&&a.opcoes.minute==a.opcoes.finalMinute&&a.opcoes.hour==a.opcoes.finalHour&&(a.opcoes.finish&&("function"!==typeof a.opcoes.finish&&(a.opcoes.finish=
eval("("+a.opcoes.finish+");")),a.opcoes.finish.call(a)),clearInterval(c),c=!1,a.oPlay.setAtivo(!0))},1E3)})};this.findComponente=function(b){return this.getNome()==b?this:!1};this.init(q);this.setDisabled=function(b){this.oPlay.setDisabled(b);this.oStop.setDisabled(b);1==b?this.getObj().css({opacity:.4}):this.getObj().css({opacity:1});this.disabled=b}};Cronometro.prototype=new Componente;;/*</editor-fold desc="js_cronometro.js">*/
/*<editor-fold desc="js_drag_area.js">*//*
 {ipm "async": false, "bundle": "componentes"}
*/
var DragArea=function(n,p,q,r,t,u,v){function k(a,c){var d=$(b.cE("li")).addClass("border_default");d.get(0).opcoes=JSON.stringify(c);d.attr("title",a);b.subItem&&(a+='<ul class="sortable"></ul>');d.html(a);b.subItem&&(a={dropOnEmpty:!0},b.conectavel&&(a.connectWith="ul.sortable"),$("ul.sortable",d).sortable(a).disableSelection());return d}var b=this;this.titulo=p;this.id=this.nome=n;this.itens=q;this.altura=r;this.largura=t;this.gridDisponivel=null;this.conectavel=u;this.criaObjeto("div");this.setClass("grid_drag");
this.subItem=defaultVal(v,!1);this.findComponente=function(a){return a==b.nome?b:!1};this.getValores=function(){var a=[];$("li",b.gridDisponivel).each(function(){var c=eval("("+this.opcoes+");");a.push(c)});return a};this.adicionaItem=function(a,c){a=k(a,c);b.gridDisponivel.append(a)};this.valida=function(){return!0};this.rand=function(a){a=defaultVal(a);var c=this,d=c.gridDisponivel.children(),m=function(){for(var l=c.itens.length-1,w=rand(5,10),f=0;f<w;f++)for(var g=0;g<=l;g++){var h=c.gridDisponivel.get(0).childNodes[g],
e=rand(0,l);e=c.gridDisponivel.get(0).childNodes[e];h!==e&&(f%2?$(e).before(h):$(e).after(h))}};a?d.fadeTo(500,0,function(){m.call();d.fadeTo(500,1)}):m.call()};(function(){var a=$(b.cE("fieldset")).addClass("border_default"),c=$(b.cE("legend")).html(b.titulo);a.append(c);b.gridDisponivel=$(b.cE("ul")).addClass("sortable");$(b.itens).each(function(){var d=k(this[0],this[1]);b.gridDisponivel.append(d)});b.gridDisponivel.width(b.largura);b.gridDisponivel.height(b.altura);a.append(b.gridDisponivel);
b.obj.append(a);a={dropOnEmpty:!0};b.conectavel&&(a.connectWith="ul.sortable");$("ul.sortable",b.obj).sortable(a).disableSelection()})()};DragArea.prototype=new ComponenteForm;;/*</editor-fold desc="js_drag_area.js">*/
/*<editor-fold desc="js_fieldset.js">*//*
 {ipm "async": false, "bundle": "componentes"}
*/
var Fieldset=function(g,h){this.id=g;this.aCampos=[];this.titulo=h;this.nome=this.id;this.iniHidden=!1;this.textLegend=null;this.minimizavel=!0;this.visualizacao=!1;this.hint="";this.acaoInline=[];this.links=[];this.iniciaAberto=!0;this.criaObjeto("fieldset");this.obj.addClass("estrutura_componente_tela_fieldset");this.findComponente=function(a){return this.id==a?this:this.getTela()?this.getTela().findComponente(a):!1};this.setAcaoInline=function(a){this.acaoInline=a};this.setLinks=function(a){this.links=
a};this.setTitulo=function(a){this.titulo=a;this.textLegend.html(a)};this.getTitulo=function(){return this.titulo};this.setMinimizavel=function(a){this.minimizavel=a};this.getMinimizavel=function(){return this.minimizavel};this.setHint=function(a){this.hint=a};this.getHint=function(){return this.hint};this.setVisualizacao=function(a){this.visualizacao=a;$.each(this.aCampos,function(){this.setVisualizacao&&this.setVisualizacao(a)})};this.getVisualizacao=function(a){return this.visualizacao};this.setFilhos=
function(a){for(var b in a)try{a[b].setParent(this)}catch(c){}this.aCampos=a};this.getValores=function(){return this.getTela()?this.getTela().getValores(!0):!1};this.valida=function(){return this.getTela().valida()};this.limpa=function(){this.getTela().limpa()};this.getTela=function(){return this.aCampos[0]};this.hide=function(){function a(d){for(;"TR"!=d[0].nodeName;)if(d=d.parent(),!d[0]||d[0]==document)return null;return d}var b=$(this.obj).parent(),c=$(this.obj).parents(".linha_tela_exibicao");
b=0<c.length?$(this.obj).parentsUntil(".linha_tela_exibicao").length<$(this.obj).parentsUntil("tr").length?c[0]:a(b):a(b);0<$(b).length?$(b).hide():$(this.obj).parent().hide()};this.show=function(){function a(d){for(;"TR"!=d.get(0).nodeName;)if(d=d.parent(),d.get(0)==document)return null;return d}var b=$(this.obj).parent(),c=$(this.obj).parents(".linha_tela_exibicao");b=0<c.length?$(this.obj).parentsUntil(".linha_tela_exibicao").length<$(this.obj).parentsUntil("tr").length?c[0]:a(b):a(b);0<$(b).length?
$(b).show():$(this.obj).parent().show()};this.setStyle=function(a){this.setCss(a)};this.setIniHidden=function(a){this.iniHidden=a};this.getIniHidden=function(){return this.iniHidden};this.setTela=function(a){this.setFilhos([a])};this.setTelaDinamica=function(a){this.setTela(a);a.montaTela(this.ConteudoFieldset)};this.submitFiles=function(a){for(var b=0,c=0;c<this.aCampos.length;c++)b+=this.aCampos[c].submitFiles(a),this.aCampos[c].numeroFilesToUpload=0;return b};this.getNumerosAjax=function(){var a=
0;$(this.aCampos).each(function(){if("function"===typeof this.getNumerosAjax){var b=defaultVal(this.getNumerosAjax(),0);a+=b}});return a};this.toogleVisibilidade=function(a,b){this.ConteudoFieldset.is(":visible")?(this.ConteudoFieldset.hide(),a&&a()):(this.ConteudoFieldset.show(),b&&b())};this.iniciaComponente=function(){this.onAfterAppend(function(){var a=this,b=!this.iniciaAberto;this.legend=$("<legend>").addClass("estrutura_componente_tela_fieldset_legend");this.textLegend=$("<span>").html(this.titulo).addClass("estrutura_componente_tela_fieldset_legend_text");
this.ConteudoFieldset=$("<div>").addClass("estrutura_componente_tela_fieldset_conteudo");Modernizr.chrome&&navigator.userAgent&&86>parseInt(navigator.userAgent.match(/Chrome\/(\d+)\./)[1])&&this.ConteudoFieldset.addClass("fieldset_chrome_antigo");if(this.getMinimizavel()){var c=Fieldset.TITULOS_BOTAO[0],d=Fieldset.TITULOS_BOTAO[1];this.botaoVisibilidade=new BotaoEstrutura(b?"seta_abaixo":"seta_acima");this.botaoVisibilidade.setTitle(b?c:d);b&&this.ConteudoFieldset.hide();ControleBaseSistema.layoutSistemaNovo?
this.botaoVisibilidade.addClass("estrutura_botao_collapse_fieldset"):this.botaoVisibilidade.setCss({marginTop:"5px",marginLeft:"3px",marginRight:"3px"});this.botaoVisibilidade.setAtributo("aria-hidden",!0);this.botaoVisibilidade.prependTo(this.legend);this.botaoVisibilidade.setIgnoreTab(!0);var f=function(){a.toogleVisibilidade(function(){a.botaoVisibilidade.setTitle(c);a.botaoVisibilidade.alteraClass("seta_abaixo");a.textLegend.attr("title",c)},function(){a.botaoVisibilidade.setTitle(d);a.botaoVisibilidade.alteraClass("seta_acima");
a.textLegend.attr("title",d)})};this.textLegend.css("cursor","pointer");this.textLegend.attr("title",b?c:d);this.textLegend.hover(function(){$(this).css("text-decoration","underline")},function(){$(this).css("text-decoration","none")});this.textLegend.on("click",f);this.botaoVisibilidade.onClick(f)}else this.legend.attr("title",this.titulo);this.legend.append(this.textLegend);this.obj.append(this.legend);this.obj.append(this.ConteudoFieldset);if(this.hint&&!em_branco(this.hint)){var e=new BotaoEstrutura("info_small",
!1,!0);e.obj.css("margin-left","2px").addClass("botao_hint").attr("tabindex","-1").attr("title","");e.appendTo(this.legend);includeJavaScript("js_tooltip.js",function(){e.obj.IpmHint(this.hint,{showMessageCode:!0})},this);this.obj.attr("aria-description",this.hint)}b=Object.values(this.links);1<b.length?this.montaLinkMultiplo():b.length&&this.montaLinkUnico();0<this.acaoInline.length&&this.montaAcaoInline();this.aCampos[0]&&this.aCampos[0].montaTela(this.ConteudoFieldset);this.getIniHidden()&&this.hide()}.bind(this))};
this.montaAcaoInline=function(){var a=this.legend.children(".fieldset_titulo_link");0==a.length&&(a=$("<div>").addClass("fieldset_titulo_link"),this.legend.children().appendTo(a),a.appendTo(this.legend));a.addClass("fieldset_titulo_link_acao_inline");this.acaoInline.forEach(function(b){var c=null;b[1]?(c=IpmIcone.fromObjetoFA(b[1]).criaObjeto(),c.addClass("botao_acao_inline"),c.css("color",b[3]).attr("title",b[2])):c=$("<span>").html(this[2]);0<a.children(".fieldset_link_dropdown").length?a.children(".fieldset_link_dropdown").before(c):
a.append(c);c.on("click",function(d){new Janela({rotina:b[0].rotina,acao:b[0].acao,parametro:b[0].parametro,chave:b[0].chave,aba:b[0].aba});d.preventDefault()})}.bind(this))};this.montaLinkMultiplo=function(){var a=Object.values(this.links),b=$("<div>").addClass("fieldset_titulo_link");this.legend.children().appendTo(b);b.appendTo(this.legend);var c=$("<span>").attr("tabindex",0).attr("aria-hidden",!0).attr("aria-label","Opções").addClass("fieldset_link_dropdown fas fa-bars").on("keydown",function(d){if("Enter"==
d.key)return this.click(),!1}).on("click",function(d){var f=new Context(d);f.setPosition(c.offset().top+c.outerHeight(),c.offset().left);f.obj.css("overflow","hidden");a.forEach(function(e){var k=f.newRow(),l=e.titulo||e.link.titulo||"Acessar",n=$("<a>").attr("href","#").addClass("fieldset_link_acesso").html(l).on("click",function(){var m=eval("("+e.link.click+")");ocultaContextoGadget();m.apply(null,[e.link.chave,{},e.link,!1,e.link.parametros,null,!1,null])}).appendTo(k);e.hint&&includeJavaScript("js_tooltip.js",
function(){n.IpmHint(e.hint)})});f.show()}).appendTo(b)};this.montaLinkUnico=function(){var a=Object.values(this.links)[0],b=$("<div>").addClass("fieldset_titulo_link");this.legend.children().appendTo(b);b.appendTo(this.legend);var c=a.titulo||a.link.titulo||"Acessar",d=$("<a>").attr("href","#").attr("aria-hidden",!0).addClass("fieldset_link_acesso").html(c).on("click",function(){var f=eval("("+a.link.click+")");ocultaContextoGadget();f.apply(null,[a.link.chave,{},a.link,!1,a.link.parametros,null,
!1,null])}).appendTo(b);a.hint&&includeJavaScript("js_tooltip.js",function(){d.IpmHint(a.hint)})};this.carregaFromJson=function(a){Fieldset.prototype.carregaFromJson.apply(this,arguments);this.nome=a.nome;this.titulo=a.titulo;this.setMinimizavel(a.minimizavel);this.setIniHidden(a.iniHidden);this.setHint(a.hint);this.setLinks(a.links);this.setAcaoInline(a.acaoInline);this.iniciaAberto=a.iniciaAberto};this.getJsonFormat=function(){var a=Fieldset.prototype.getJsonFormat.apply(this,arguments);a.nome=
this.nome;a.titulo=this.titulo;a.minimizavel=this.minimizavel;a.iniHidden=this.iniHidden;a.hint=this.hint;a.links=this.links;a.acaoInline=this.acaoInline;a.iniciaAberto=this.iniciaAberto;return a};g&&this.iniciaComponente()};Fieldset.prototype=new Componente;Fieldset.TITULOS_BOTAO=["Mostrar Conteúdo","Esconder Conteúdo"];;/*</editor-fold desc="js_fieldset.js">*/
/*<editor-fold desc="js_grid.js">*//*
 {ipm "async": false, "bundle": "componentes"}
*/
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(r){return r.raw=r};$jscomp.createTemplateTagFirstArgWithRaw=function(r,w){r.raw=w;return r};
var GridDados=function(r,w,x,L,M,N,O,P){function D(a){var b=0==w.length?!1:d.mostraTitulo;b?(this.oCollapseGrid=new CollapseContent("collapse_"+r,this.titulo,this.size,this.height,O,P),this.oCollapseGrid.appendTo(a)):this.oCollapseGrid=!1}function E(a){var b=this;this.divConteudo=$("<div>").addClass("conteudo_grid conteudo_grid_tipo_"+this.modoImpressao)[0];var c=$("<table>").attr("aria-label","Grid de Dados - "+this.titulo).appendTo(this.divConteudo);this.corpoTabela=$("<tbody>").attr("name",this.id).appendTo(c)[0];
var f=$("<tr>")[0];u=$("<tr>").addClass("linha_padrao_grid")[0];this.oCollapseGrid?this.oCollapseGrid.setConteudo($(this.divConteudo)):a.appendChild(this.divConteudo);window.__bDesenvolvimento&&window.__bDepuraGrid&&c.after($("<table>").append($("<tr>").append(u)).css("background","#FF000011"));for(a=0;a<this.aCampos.length;a++){var e=this.aCampos[a];e instanceof CampoForm&&(e=e.oCampo,e.onKeyDown(function(m){if(m.altKey){var v=$(this).parents(".linha_padrao_grid");107==m.keyCode?$('input[value="+"]',
v).trigger("click"):109==m.keyCode&&$('input[value="-"]',v).trigger("click")}}));try{this.adicionaAtributoGrid(e)}catch(m){}}switch(parseInt(this.modoImpressao)){case GridDados.MODO_EXIBICAO_COL:for(a=0;a<this.aCampos.length;a++){e=this.aCampos[a];c=$("<th>").appendTo(f);var h=$("<td>").appendTo(u),g=e;if(e instanceof CampoForm){g=e.oCampo;if(e.group){var l=e.group[0].oCampo.getObjAppend().eq(0).parent(),n=$("<span>").html(" "+e.group[1]+" ");l.append(n);e.oCampo.appendTo(l)}else{e.oLabel.appendTo(c);
if("coluna"==this.estiloExibicaoHint&&e.getHint()){var t=new BotaoEstrutura("info_small",!1,!0);t.obj.addClass(ControleElementosSistema.getSeletorElemento("botao_hint"));t.obj.css("vertical-align","top");t.obj.children().css("margin-top","1px");includeJavaScript("js_tooltip.js",function(){t.obj.IpmHint(e.getHint())});t.appendTo(c);$("label",c).css({display:"inline","margin-right":2});e.setHint(!1)}e.oCampo.appendTo(h);e.getTituloAdicional()&&e.montaSpanTituloAdicional().appendTo(h)}"hidden"==e.sTipo&&
(c.hide(),h.hide())}else isInstanceOf(e,[ComponenteForm])||ComponenteTela.isTipo(e,[ComponenteTela.CAMPO_TEXTO,ComponenteTela.BOTAO,ComponenteTela.BOTAO_ACAO,ComponenteTela.BOTAO_AUTH_GOOGLE,ComponenteTela.BOTAO_PICKER_GOOGLE_DRIVE,ComponenteTela.COLOR_PICKER,ComponenteTela.CARD])?e.appendTo(h):(console.error(Error("Componente não suportado dentro do Grid.")),console.log(e));g.obj.get(0).campoOriginal=e}this.impTitCampos||$(f).hide();break;case GridDados.MODO_EXIBICAO_LINHA:$(f).hide();var q=document.createElement("td");
u.appendChild(q);if(this.getLayout())$(q).html(this.getLayout()),montaLayoutTela(q,this.aCampos,!1,!0);else for(a=document.createElement("table"),a.style.width="100%",q.appendChild(a),g=document.createElement("tbody"),a.appendChild(g),a=0;a<this.aCampos.length;a++){e=this.aCampos[a];var k=document.createElement("tr");c=document.createElement("td");c.style.width="20%";h=document.createElement("td");e instanceof CampoForm?(e.oCampo.obj.get(0).campoOriginal=e,e.group?(l=e.group[0].oCampo.getObj().parent(),
n=$(document.createElement("span")).html(" "+e.group[1]+" "),l.append(n),e.oCampo.appendTo(l)):(l=e.oLabel,e.oCampo.appendTo(h),l.appendTo(c),e.getTituloAdicional()&&e.montaSpanTituloAdicional().appendTo(h)),("hidden"==e.sTipo||e.iniHidden)&&$(k).hide()):(isInstanceOf(e,[ComponenteForm])||ComponenteTela.isTipo(e,[ComponenteTela.CAMPO_TEXTO,ComponenteTela.BOTAO,ComponenteTela.BOTAO_ACAO,ComponenteTela.BOTAO_AUTH_GOOGLE,ComponenteTela.BOTAO_PICKER_GOOGLE_DRIVE,ComponenteTela.COLOR_PICKER,ComponenteTela.CARD,
ComponenteTela.GRID_DADOS]))&&e.appendTo(h);e.group||(k.appendChild(c),k.appendChild(h),g.appendChild(k))}break;case GridDados.MODO_EXIBICAO_LAYOUT:if($(f).hide(),q=document.createElement("td"),u.appendChild(q),ControleBaseSistema.isLayoutV3())TelaPadrao.carregaExibicaoTela(b.estiloExibicao,b.layoutExibicao).then(function(){if(b.layoutExibicao.isCarregado()&&b.estiloExibicao.isCarregado()){var m=b.layoutExibicao.montaElementoLayout(b.configuracaoLayout,b);m.addClass("estilo-tela-"+b.estiloExibicao.getNome());
$(q).append(m);b.aCampos.forEach(function(v,A){TelaPadrao.beforeMontaComponenteTrataEstiloExibicao(v,b.estiloExibicao);b.layoutExibicao.montaComponente(b,m,v,A,b.configuracaoLayout);TelaPadrao.afterMontaComponenteTrataEstiloExibicao(v,b.estiloExibicao)})}});else if(TelaPadrao.carregaExibicaoTela(this.estiloExibicao,this.layoutExibicao),this.layoutExibicao.isCarregado()&&this.estiloExibicao.isCarregado()){var p=this.layoutExibicao.getElementoRaiz(this,this.configuracaoLayout);$(p).addClass("estilo_tela_"+
this.estiloExibicao.getNome());$(q).append(p);this.aCampos.forEach(function(m,v){TelaPadrao.beforeMontaComponenteTrataEstiloExibicao(m,b.estiloExibicao);b.layoutExibicao.montaLinha(b,p,m,v,b.configuracaoLayout);TelaPadrao.afterMontaComponenteTrataEstiloExibicao(m,b.estiloExibicao)});this.layoutExibicao.afterMontaLinhas(this,this.oTable,this.configuracaoLayout)}}if((this.adicionaLinha||this.getRemoveLinha()||this.permiteOrdenar)&&!this.getVisualizacao()){if(this.adicionaLinha||this.getRemoveLinha())c=
$("<td>").addClass("area_acoes_linha_grid").css("width",35).appendTo(u),a=$(ControleBaseSistema.layoutSistemaNovo?"<button>":"<input>").addClass("remove_linha campo botao botao_grid").attr("title","Remover Linha").attr("aria-label","Remover Linha").attr("aria-description","").attr("type",ControleBaseSistema.layoutSistemaNovo?"":"button").attr("value",ControleBaseSistema.layoutSistemaNovo?"":"-").attr("nome_grid",this.id).appendTo(c),c=$(ControleBaseSistema.layoutSistemaNovo?"<button>":"<input>").addClass("adiciona_linha campo botao botao_grid"+
(ControleBaseSistema.layoutSistemaNovo||!1!==this.getRemoveLinha()?"":" border_left")).attr("title","Adicionar Nova Linha").attr("aria-label","Adicionar Nova Linha").attr("aria-description","").attr("type",ControleBaseSistema.layoutSistemaNovo?"":"button").attr("value",ControleBaseSistema.layoutSistemaNovo?"":"+").attr("nome_grid",this.id).appendTo(c),$(u).addClass("estrutura_grid_linha_pode_add_rem"),ControleBaseSistema.layoutSistemaNovo&&(IpmIcone.buscaFA("plus").criaObjeto().appendTo(c),IpmIcone.buscaFA("minus").criaObjeto().appendTo(a));
this.permiteOrdenar&&(c=$("<td>").addClass("area_acoes_linha_grid area_acoes_linha_grid_vertical").css("width",20).appendTo(u),a=$("<div>").addClass("linha_acima campo botao botao_grid").attr("title","Mover Linha para Cima").attr("aria-label","Mover Linha para Cima").attr("aria-description","").attr("tabindex",0).attr("nome_grid",this.id).on("keydown",function(m){if("Enter"==m.key)return this.click(),!1}).append($("<div>").addClass(ControleBaseSistema.layoutSistemaNovo?"":"order desc")).appendTo(c),
c=$("<div>").addClass("linha_abaixo campo botao botao_grid").attr("title","Mover Linha para Baixo").attr("aria-label","Mover Linha para Baixo").attr("aria-description","").attr("tabindex",0).attr("nome_grid",this.id).on("keydown",function(m){if("Enter"==m.key)return this.click(),!1}).append($("<div>").addClass(ControleBaseSistema.layoutSistemaNovo?"":"order asc")).appendTo(c),$(u).addClass("estrutura_grid_linha_pode_add_rem"),ControleBaseSistema.layoutSistemaNovo&&(IpmIcone.buscaFA("chevron-up").criaObjeto().appendTo(a),
IpmIcone.buscaFA("chevron-down").criaObjeto().appendTo(c)))}else this.getVisualizacao()&&$(u).addClass("estrutura_grid_linha_pode_add_rem");this.getDuplicaLinha()&&!this.getVisualizacao()&&(a=$("<td>").addClass("area_acoes_linha_grid area_acoes_linha_grid_vertical").css("width",20).appendTo(u),a=$("<div>").addClass("duplicar_linha campo botao botao_grid").attr("title","Duplicar linha atual").attr("aria-label","Duplicar a linha atual").attr("aria-description","Ao clicar, irá duplicar os mesmo valores desta linha, inserindo uma nova logo abaixo").attr("tabindex",
0).attr("nome_grid",this.id).on("keydown",function(m){if("Enter"==m.key)return this.click(),!1}).on("click",function(m){b.duplicaValoresLinhaAtual(m)}).appendTo(a),IpmIcone.buscaFA("copy").criaObjeto().appendTo(a));this.corpoTabela.appendChild(f);F();this.oCollapseGrid&&ControleBaseSistema.layoutSistemaNovo&&this.autoAjustaSize&&(f=[],$(this.divConteudo).is(":visible")||(f=$(this.divConteudo).parentsUntil(document.body).toArray().filter(function(m){return"none"==$(m).css("display")}),$(f).show()),
this.oCollapseGrid.obj.css("width",this.divConteudo.scrollWidth+ControleTamanhoFonte.getTamanhoFonte()/2),$(f).hide())}function G(a){$.each(d.aCampos,function(){this instanceof CampoForm&&this.isChave()&&(this.setVisualizacao(a),this.setReadOnly(a))})}function F(){if(d.getVisualizacao())var a=0<d.aValores.length?d.aValores.length:1;else G(!0),a=d.aValores.length<d.ini?d.ini:d.aValores.length;for(var b=0<d.aValores.length?!1:!0,c=0;c<a;c++){var f=1==d.aExclusao[c]||0==d.getRemoveLinha()?!1:!0;y(!1,
f,!f,!1);!b&&d.aValores.length<=c+1&&(G(!1),b=!0)}if(d.triggerChangeOnSetValoresIniciais)d.setValores(d.aValores,!1,!0,!0);else{set_valores_grid(d.corpoTabela,d.aCampos,d.aValores,d.nome,!0);for(var e in d.estadosBotoes)for(var h in d.estadosBotoes[e])d.setBotoesLinhaAtivados.apply(d,[parseInt(e),!!parseInt(h)].concat(d.estadosBotoes[e][h]))}}function y(a,b,c,f){var e=$(u).clone(!0);$(".ipm-icone-fa",e).each(function(){var p=$(this).data("carregaIconeIpm");p&&p(this)});e[0].oGrid=d;var h=get_objetos_linha_grid(e[0]);
includeJavaScript("js_tooltip.js",function(){var p=d.obj.find(".estrutura_botao_hint");p.attr("data-ipm-hint")&&p.IpmHint("",{showMessageCode:!0})});for(var g=0;g<d.aCampos.length;g++){var l=d.aCampos[g],n=l.oCampo||l;n&&n.obj&&n.obj[0]&&n.obj[0].captureGrid&&Object.keys(n.obj[0].captureGrid).forEach(function(p){e[0].addEventListener(p,function(){n.trataAtributoListenerGrid(e)},!0)});var t=h[l.getNome(!0)];if(t)if(l.getCampo){var q=d.getCampoOriginal(l.getNome());q.getObjetoAlvoGrid&&(t=q.getObjetoAlvoGrid(t));
var k=clonaComponentePrototipo(q.oCampo,{obj:$.extend($(t),{grid:l.getCampo().getObj()[0].myInstance.obj.grid})});t.myInstance=k;k.externo&&(k.externo=clonaComponentePrototipo(k.externo,{oCampo:k}),k.externo.usaBusca=!0,k.externo.trataCloneGrid&&k.externo.trataCloneGrid(h),executaProximoLoopAguardando(function(p){this.indice=getIndexGrid(e);p.externo.onChangeRegistroAtualizaBotoes()}.bind(d,k)));k.trataCloneGrid&&k.trataCloneGrid(h);q.oLabel&&(k=k.getObjAppend().parent().parent().children(0).children(0),
k[0]&&k.eq(0).is(".campo_label")&&(q=clonaComponentePrototipo(q.oLabel,{obj:$.extend($(k[0]),{grid:l.getCampo().getObj()[0].myInstance.obj.grid})}),k[0].myInstance=q));l.getLabel()&&(l=$('label:contains("'+l.getLabel()+'")',e).first(),t.labelInstance=l.get(0))}else q=d.getCampoOriginal(l.getNome()),q.getObjetoAlvoGrid&&(t=q.getObjetoAlvoGrid(t)),k=clonaComponentePrototipo(q,{obj:$.extend($(t),{grid:l.getObj()[0].myInstance.obj.grid})}),t.myInstance=k,k.trataCloneGrid&&k.trataCloneGrid(h)}e[0].oGrid=
d;a||"number"==typeof a?"number"==typeof a?$(d.corpoTabela.rows[a]).after(e):$(a.target.parentNode.parentNode).after(e):$(d.corpoTabela).append(e);d.totalLinhas++;if(0!=f)for(a=$("input",e),g=0;g<a.length;g++)if(f=$(a[g]),!f.prop("disabled")&&!f.prop("readonly")&&"hidden"!=f.attr("type")){f.get(0).focus();break}if(c)for(g=0;g<d.aCampos.length;g++)l=d.aCampos[g],l.getVisualizacao()&&$("td",e).eq(g).contents().each(function(){this.className&&-1<this.className.indexOf("botao_acao")?$(this).css("visibility",
"hidden"):isNodeInput(this)&&($(this).addClass("campo_leitura"),$(this).attr("disabled","disabled"))});d.functionOnCreateLinha&&(c=getIndexGrid(e),e.get(0).oGrid.indice=c,d.functionOnCreateLinha.apply(e.get(0),[]));if(d.adicionaLinha||d.getRemoveLinha()){c=$('.remove_linha[nome_grid="'+d.id+'"]',e);g=$('.adiciona_linha[nome_grid="'+d.id+'"]',e);if(d.adicionaLinha)g.on("click",function(p){$(this).attr("disabled")||((0==d.max||d.max>d.getNumerosLinha())&&y(p,!0,!1),d.functionOnAdicionaClonado&&d.functionOnAdicionaClonado(getIndexGrid($(this))))});
else g.css("visibility","hidden"),c.addClass("remove_linha_isolada");if(b)c.on("click",function(p){if(!$(this).attr("disabled")){var m=getIndexGrid($(this));ControleBaseSistema.triggerAlvoPropagacao(p);H(m,!0,!0);d.functionOnRemoveClonado&&d.functionOnRemoveClonado(m)}});else c.css("visibility","hidden"),g.addClass("adiciona_linha_isolada")}d.permiteOrdenar&&($('.linha_acima[nome_grid="'+d.id+'"]',e).on("click",function(p){if(!$(this).attr("disabled")){p=this.parentNode.parentNode;var m=$(p.previousSibling);
m.is(".linha_padrao_grid")&&(m.before(p),d.functionOnOrdenaLinha&&d.functionOnOrdenaLinha.apply(p,[]))}}),$('.linha_abaixo[nome_grid="'+d.id+'"]',e).on("click",function(p){if(!$(this).attr("disabled")){p=this.parentNode.parentNode;var m=$(p.nextSibling);m.is(".linha_padrao_grid")&&(m.after(p),d.functionOnOrdenaLinha&&d.functionOnOrdenaLinha.apply(p,[]))}}))}function B(a){$.each(d.aCampos,function(){if(this instanceof CampoForm){var b=this.getCampo();if(b=b&&b.getExterno?b.getExterno():!1)b.usaBusca=
a}})}function Q(a){$(d.aCampos).each(function(){if(this.oCampo instanceof CampoMascaraPadrao){var b=defaultVal(this.oCampo.getNome(),""),c=$('[name="'+b+'"]',a).get(0),f=d.getJanela();c=getIndexGrid(c);em_branco(this.oCampo.parent.nome)||(b=this.oCampo.parent.nome+"_"+b);f.oLastKeyJanel&&f.oLastKeyJanel[b]&&f.oLastKeyJanel[b][c]&&f.oLastKeyJanel[b].splice(c,1)}})}function H(a,b,c,f){B(!1);a++;b=defaultVal(b,!0);var e=d.getNumerosLinha()-1,h=d.corpoTabela,g=h.rows[a],l=d.getValoresLinha(a-1),n=!1,
t=function(){Q(g);g.parentNode&&g.parentNode.removeChild(g);d.totalLinhas--;d.functionOnRemoveLinha&&d.functionOnRemoveLinha.apply(g,[]);0==e&&!d.permiteRemoverTodasLinhas&&b&&(d.exibeMensagemVazio&&Message.alertaSistema("EST-000036",{nomeDoGrid:d.titulo},!1),y(!1,!0,!1));if(!1!==f&&"undefined"!==typeof h.rows[1])for(var k=$("input",h.rows[1]),p=0;p<k.length;p++){var m=$(k[p]);if(!m.prop("disabled")&&!m.prop("readonly")&&"hidden"!=m.attr("type")){m[0]?m[0].focus():m.focus();break}}B(!0)},q=function(){B(!0);
d.setLinhaExclusao(null)};a=function(){if(d.functionOnBeforeRemoveLinha){d.indice=g.rowIndex-1;var k=d.functionOnBeforeRemoveLinha.apply(g,[]);if(k instanceof Promise){k.then(function(p){if(p)return t.call();q()});return}return k?t.call():q()}t.call()};d.aCampos.every(function(k){if(!(k instanceof CampoForm)||"hidden"==k.getTipo()||"lista"==k.getTipo())return!0;var p=k.getNome();return k.oCampo.verificaPreenchimentoValor(l[p])?(n=!0,!1):!0});d.setLinhaExclusao(l);d.perguntaLinhaPreenchida&&c&&n?Message.confirma("EST-000164",
!1,a,q):a()}function I(a){a.is("."+ControleElementosSistema.getSeletorElemento("botao_hint"))||(ControleBaseSistema.layoutSistemaNovo&&a[0]&&a[0].myInstance?(a[0].myInstance.setDisabled(!0),a[0].myInstance.setReadOnly(!0)):(a.get(0).setAttribute("readOnly","readOnly"),a.get(0).setAttribute("disabled","disabled"),a.parent("span.container_select_multiple").attr("disabled","disabled"),a.addClass("campo_leitura"),$("div.drop_down_select_multiple",a.parent()).addClass("drop_down_disable")))}function J(a){a[0]&&
!a.is("."+ControleElementosSistema.getSeletorElemento("botao_hint"))&&(ControleBaseSistema.layoutSistemaNovo&&a[0]&&a[0].myInstance?(a[0].myInstance.setReadOnly(!1),a[0].myInstance.setDisabled(!1)):(a[0].removeAttribute("readOnly"),a[0].removeAttribute("disabled"),a.parent("span.container_select_multiple").removeAttr("disabled","disabled"),a.removeClass("campo_leitura"),$("div.drop_down_select_multiple",a.parent()).removeClass("drop_down_disable")))}var d=this,u;this.tipoComponente=ComponenteTela.GRID_DADOS;
this.indice=-1;this.id=r;this.mostraTitulo=N;this.nome=r;this.titulo=w;this.aCampos=[];this.adicionaLinha=!0;this.ini=L;this.max=M||!1;this.iniHidden=!1;this.divConteudo=null;this.obrigatorio=!1;this.aDuplicados=[];this.aValores=[];this.totalLinhas=0;this.modoImpressao=GridDados.MODO_EXIBICAO_COL;this.alvo=null;this.exibeRemover=this.exibeAdicionar=this.impTitCampos=!0;this.permiteOrdenar=!1;this.aExclusao=[];this.bRemoveLinha=!0;this.functionOnOrdenaLinha=this.functionOnRemoveLinha=this.functionOnBeforeRemoveLinha=
this.functionOnCreateLinha=this.bDuplicaLinha=!1;this.perguntaLinhaPreenchida=!0;this.visualizacao=this.permiteRemoverTodasLinhas=this.forcaTodasLinhasObrigatorias=!1;this.corpoTabela;this.height;this.estiloExibicaoHint="linha";this.estadosBotoes=[];this.triggerChangeOnSetValoresIniciais=!1;this.exibeMensagemVazio=!0;this.layout=!1;this.estiloExibicao=EstiloExibicaoTela.getEstiloExibicao();this.layoutExibicao=LayoutExibicaoTela.getLayoutExibicao();this.aOnChangeGrid=[];this.functionOnAdicionaClonado=
this.functionOnRemoveClonado=!1;this.gridsVinculados=null;this.isGridAtualizado=!1;this.setEstadoBotoes=function(a){this.estadosBotoes=a};this.setHeight=function(a){this.height=a};this.setLinhasIniciais=function(a){this.ini=a};this.setIniHidden=function(a){this.iniHidden=a};this.setVisualizacao=function(a){this.visualizacao=a;$.each(this.aCampos,function(){!(this instanceof ComponenteForm||this instanceof CampoForm)||this instanceof BotaoAcao||this instanceof Botao||this instanceof BarraFerramentas||
!this.setVisualizacao||this.setVisualizacao(!0)})};this.getVisualizacao=function(){return this.visualizacao};this.setForcaLinhasObrigatorias=function(a){this.forcaTodasLinhasObrigatorias=a};this.findComponente=function(a){return this.id==a?this:!1};this.getRemoveLinha=function(){return this.bRemoveLinha};this.setRemoveLinha=function(a){this.bRemoveLinha=a};this.onCreateLinha=function(a){this.functionOnCreateLinha=a};this.onInsereLinhaClonado=function(a){this.functionOnAdicionaClonado=a};this.onBeforeRemoveLinha=
function(a){this.functionOnBeforeRemoveLinha=a};this.onRemoveLinha=function(a){this.functionOnRemoveLinha=a};this.onRemoveLinhaClonado=function(a){this.functionOnRemoveClonado=a};this.onOrdenaLinha=function(a){this.functionOnOrdenaLinha=a};this.desabilitaExclusao=function(a){this.aExclusao=a};this.setEstiloExibicaoHint=function(a){this.estiloExibicaoHint=a};this.setLayout=function(a){this.layout=a};this.getLayout=function(){return this.layout};this.setTriggerChangeOnSetValoresIniciais=function(a){this.triggerChangeOnSetValoresIniciais=
a};this.setEstiloExibicao=function(a){this.forceEstilo=!0;this.estiloExibicao=EstiloExibicaoTela.getEstiloExibicao(a)};this.setLayoutExibicao=function(a){this.layoutExibicao=LayoutExibicaoTela.getLayoutExibicao(a.id);this.configuracaoLayout=a};this.setPermiteRemoverTodasLinhas=function(a){this.permiteRemoverTodasLinhas=a};this.getPermiteRemoverTodasLinhas=function(){return this.permiteRemoverTodasLinhas};this.getIndice=function(){return this.indice};this.setImprimeTituloCampos=function(a){this.impTitCampos=
a};this.submitFiles=function(a){var b=0;$(d.aCampos).each(function(){if("file"==this.sTipo||"file_draggable"==this.sTipo)for(var c=d.getNumerosLinha(),f=this.getNome(),e=0;e<c;e++){b++;var h=d.getCampo(e,f),g=[];h.myInstance&&h.myInstance.getFileForSubmiting&&(g=h.myInstance.getFileForSubmiting());realizaSubmitFileAjax(a,h,g)}});return b};this.hide=function(){for(var a=this.getObj();"TR"!=a.get(0).nodeName;)if(a=a.parent(),a.get(0)==document||0==a.length){this.getObjAppend().parent().parent().hasClass("linha_componente_tela")&&
this.hideElement();return}a.hide()};this.hideElement=function(){var a=this.getObjAppend().parent().parent();a.hasClass("linha_componente_tela")?a.hide():this.getObjAppend().hide()};this.show=function(){for(var a=this.getObj();"TR"!=a.get(0).nodeName;)if(a=a.parent(),a.get(0)==document||0==a.length){this.getObjAppend().parent().parent().hasClass("linha_componente_tela")&&this.showElement();return}a.show()};this.showElement=function(){var a=this.getObjAppend().parent().parent();a.hasClass("linha_componente_tela")?
a.show():this.getObjAppend().show()};this.setModoImpressao=function(a){this.modoImpressao=a};this.appendLabel=function(a){d.getLabel().appendTo(a)};this.getNome=function(){return this.nome};this.getLabel=function(){return new Label("lbl_"+d.titulo,d.titulo)};this.setFilhos=function(a){var b=this;b.aCampos=[];$.each(a,function(){b.adicionaComponente(this)});ControleBaseSistema.isLayoutV3()&&E.apply(b,[this.getObj().get(0)])};this.adicionaCampo=this.adicionaComponente=function(a){a.setParent(this);
this.aCampos.push(a)};this.adicionaAtributoGrid=function(a){a.setAtributo("grid",!0);a.obj&&(a.obj.grid=d);a.oCampo&&(a.oCampo.obj.grid=d)};this.setLinhaExclusao=function(a){this.linhaExclusao=a};this.getLinhaExclusao=function(){return this.linhaExclusao};this.setExibeMensagemVazio=function(a){this.exibeMensagemVazio=a};this.removeLinha=function(a,b,c){H(a,b,null,c)};this.insereLinha=function(a,b){y("undefined"==typeof a?!1:a,d.getRemoveLinha(),!1,b)};this.duplicaValoresLinhaAtual=function(a){var b=
this,c=$(a.target).parents(".linha_padrao_grid").index(),f=this.getValoresLinha(c-1);this.insereLinha(c);this.getValoresLinha(c);Object.keys(f).forEach(function(e,h){b.setValor(c,e,f[e],!0);var g=b.getCampo(c,e);g.myInstance.externo&&$(g).blur();0===h&&b.focusCampo(c,e)})};this.getNumerosLinha=function(){return d.totalLinhas};this.setAdicionaLinha=function(a){this.bRemoveLinha=this.adicionaLinha=a};this.blurCampo=function(a,b){a=this.getCampo(a,b);$(a).trigger("blur")};this.focusCampo=function(a,
b,c){a=this.getCampo(a,b);focusCampo(a,c)};this.getValoresLinha=function(a){for(var b=d.getLinha(a),c={},f=0;f<d.aCampos.length;f++){var e=d.aCampos[f];if(e instanceof CampoForm){var h=e.getNome(),g=$('*[name="'+e.getNome(!0)+'"]',b).get(0);g?c[h]=get_valor_objeto(g,e.oCampo):(g=this.getInstanciaCampoLinha(a,h))&&(c[h]=g.getValor())}else e instanceof GridDados&&(h=e.id,c[h]=[])}return c};this.getValores=function(){return get_valores_grid(d.corpoTabela,d.aCampos)};this.getCampo=function(a,b,c){c=c||
d.getLinha(a);a=get_objetos_inside_objeto(c);var f=null;(c=this.getCampoOriginal(b))&&(b=c.getNome(!0));a.each(function(){if(this.name==b||this.getAttribute("name")==b)return f=this,!1});return f};this.getInstanciaCampoLinha=function(a,b){var c=this.getCampoOriginal(b);if(!c)return null;a=this.getCampo(a,c.oCampo&&c.oCampo.obj&&c.oCampo.obj.attr("name")||b);return a?a.myInstance instanceof Campo?(c=$.extend(Object.create(Object.getPrototypeOf(c)),c,{oCampo:a.myInstance}),a=c.oCampo.getObjAppend().parent().parent().children(0).children(0),
a[0]&&a.eq(0).is(".campo_label")&&a[0].myInstance&&(c.oLabel=a[0].myInstance),c):a.myInstance:null};this.getCampoOriginal=function(a){var b=!1;$(d.aCampos).each(function(){if(this.getNome()==a)return b=this,!1});return b};this.getObjCampo=function(a,b){};this.getExternosGrid=function(a){var b={};this.aCampos.forEach(function(c){c.oCampo&&c.oCampo.externo&&(!a||c.oCampo.externo.getAllBotoesExtras().length)&&(b[c.getNome()]=c.oCampo.externo)});return b};this.getExternoGridByBotaoExtra=function(a){var b=
this.getExternosGrid(!0),c=null;1<Object.keys(b).length&&Object.entries(b).some(function(f){if(f[1].isBotaoExtraExternoGrid(a))return c=f[1],!0});return c};this.hideCampo=function(a,b){a=this.getCampo(a,b);$(a).parent().hide()};this.hideRowCampo=function(a,b){for(a=$(this.getCampo(a,b));"TR"!=a.get(0).nodeName;)if(a=a.parent(),a.get(0)==document)return;a.hide()};this.showRowCampo=function(a,b){for(a=$(this.getCampo(a,b));"TR"!=a.get(0).nodeName;)if(a=a.parent(),a.get(0)==document)return;a.show()};
this.showCampo=function(a,b){a=this.getCampo(a,b);$(a).parent().show()};this.isReadOnly=function(a,b){a=$(this.getCampo(a,b));return a.attr("readOnly")||a.attr("disabled")||a.is(".campo_leitura")};this.setReadOnly=function(a,b,c,f){f=defaultVal(f,!1);a=$(this.getCampo(a,b));var e=(b=this.getCampoOriginal(b))&&b.getCampo&&b.getCampo().externo instanceof CampoExterno?!0:!1,h=d.modoImpressao==GridDados.MODO_EXIBICAO_LINHA||d.modoImpressao==GridDados.MODO_EXIBICAO_LAYOUT?$(".botao_grid",a.parents(".linha_padrao_grid")):
$(".botao_grid",a.parent().parent());f?$.each(h,function(){TransacaoEstiloCss.css(this,"display","none")}):$.each(h,function(){TransacaoEstiloCss.css(this,"display","")});c?e?$.each($(a).parent().children(),function(){var g=$(this);g.is("span")&&!g.is("."+ControleElementosSistema.getSeletorElemento("botao_hint"))?g.hasClass("div_botao_acao")&&(g.addClass("botao_acao_desativado"),g.css("cursor","default"),g=$("input",g),g.css("background-position","-16px "+g.css("background-position").split(" ")[1]),
g.attr("disabled","true")):I(g)}):I(a):e?$.each($(a).parent().children(),function(){var g=$(this);g.is("span")?g.hasClass("div_botao_acao")&&!g.is("."+ControleElementosSistema.getSeletorElemento("botao_hint"))&&(g.removeClass("botao_acao_desativado"),g.css("cursor","pointer"),g=$("input",g),g.css("background-position","0px "+g.css("background-position").split(" ")[1]),g.removeAttr("disabled")):J(g)}):J(a);b.getCampo&&b.getCampo()&&b.getCampo().setLeituraGrid&&b.getCampo().setLeituraGrid(a,c)};this.setBotoesLinhaAtivados=
function(a,b,c,f,e){if(a=this.getLinha(a)){var h=b?"show":"removeClass",g=b?"hide":"addClass";if(null!==c){var l=c?h:g,n=$(".adiciona_linha",a);n.attr("disabled",!c);n[l].apply(n,b?[]:[ControleElementosSistema.getSeletorElemento("botao_desativo")])}null!==f&&(l=f?h:g,n=$(".remove_linha",a),n.attr("disabled",!f),n[l].apply(n,b?[]:[ControleElementosSistema.getSeletorElemento("botao_desativo")]));null!==e&&(l=e?h:g,n=$(".linha_acima,.linha_abaixo",a),n.attr("disabled",!e),n[l].apply(n,b?[]:[ControleElementosSistema.getSeletorElemento("botao_desativo")]))}};
this.setReadOnlyGrid=function(a){for(var b=0;b<d.getNumerosLinha();b++)$.each(this.aCampos,function(){d.setReadOnly(b,this.getNome(),a,a)})};this.setLista=function(a,b,c,f){this.getInstanciaCampoLinha(a,b).setLista(c,f)};this.desativaLista=function(a,b,c,f){a=this.getCampo(a,b);b=this.getCampoOriginal(b);a&&b&&b.getCampo()instanceof CampoListaMultipla&&(a.lista||(a.lista=$.extend(!0,[],b.getCampo().getLista())),this.alteraStatusItemLista(a,c,!1,f));$(a).children().each(function(){if(this.value==c)return this.disabled=
"disabled",!1})};this.ativaLista=function(a,b,c,f){a=this.getCampo(a,b);b=this.getCampoOriginal(b);a&&b&&b.getCampo()instanceof CampoListaMultipla&&(a.lista||(a.lista=$.extend(!0,[],b.getCampo().getLista())),this.alteraStatusItemLista(a,c,!0,f));$(a).children().each(function(){this.value==c&&(this.disabled="")})};this.alteraStatusItemLista=function(a,b,c,f){f=defaultVal(f,!0);b=Array.isArray(b)?b:[b];for(var e in a.lista)b.some(FuncoesComparacao.igual(a.lista[e][0]))&&(a.lista[e][2]=c,f&&a.myInstance&&
a.myInstance.getValueChecked()&&a.myInstance.setValueChecked(a.lista[e][0],!1));if(a.myInstance&&a.myInstance.getValueChecked()){c=[];for(e in a.myInstance.getValueChecked())a.myInstance.getValueChecked(e)&&c.push(e);this.setValorCampo(a,c)}};this.getNumerosAjax=function(){var a=0,b=this.getNumerosLinha(),c=this;$(this.aCampos).each(function(){for(var f=0;f<b;f++){var e=c.getInstanciaCampoLinha(f,this.getNome());e&&"function"===typeof e.getNumerosAjax&&(a+=e.getNumerosAjax())}});return a};this.getValor=
function(a,b){var c=d.getCampo(a,b),f=this.getCampoOriginal(b);return f&&(f.getCampo()instanceof CampoListaMultipla||f.getCampo()instanceof CampoListaDinamica)?(c=this.getValores(),c[a]&&c[a][b]?c[a][b]:null):f?get_valor_objeto(c,f.getCampo()):get_valor_objeto(c)};this.setValorFormatado=function(a,b,c,f){var e=this.getCampoOriginal(b);e?this.setValor(a,b,e.getCampo().getValorFormatado(c),f):this.setValor(a,b,c,f)};this.setValor=function(a,b,c,f){"undefined"==typeof this.getLinha(a)&&this.insereLinha();
a=this.getCampo(a,b);this.setValorCampo(a,c);f&&$(a).trigger("change")};this.setValorCampo=function(a,b){a&&(a.myInstance instanceof CampoListaMultipla&&a.myInstance.setValueChecked(),set_valor_objeto(a,b),$(a).attr("valueOnFocus",b))};this.limpaCampo=function(a,b){this.setValor(a,b,"")};this.setValoresFormatado=function(a){return this.setValores(a,!0)};this.setValores=function(a,b,c,f){b=defaultVal(b,!1);c=defaultVal(c,!1);if(d.divConteudo){this.aValores=[];for(var e=0;e<a.length;e++){var h=a[e];
if(f)d.indice=e,this.aCampos.forEach(function(l){l=l.getNome();h[l]&&(b?this.setValorFormatado(e,l,h[l],c):this.setValor(e,l,h[l],c))}.bind(this));else for(var g in h)b?this.setValorFormatado(e,g,h[g],c):this.setValor(e,g,h[g],c)}}else this.aValores=a||[]};this.getLinha=function(a,b){b=b||d.corpoTabela;return b.childNodes[a+1]};this.verificaDuplicado=function(){var a=this.aDuplicados.length;if(0<a)for(var b=d.getValores(),c=0;c<b.length;c++)if("undefined"!=typeof b[c+1])for(var f=b[c],e=c+1;e<b.length;e++){for(var h=
b[e],g=0,l=0,n={},t=0;t<a;t++){var q=this.aDuplicados[t].nome,k=null!==f[q]?f[q].toString().trim():null,p=null!==h[q]?h[q].toString().trim():null;k==p&&(g++,n[q]=f[q],null!==f[q]&&0!=f[q].toString().trim().length||l++)}if(g==a&&l<a){b="";for(f=0;f<a;f++)g=this.aDuplicados[f].nome,h=this.aDuplicados[f].titulo,0<f&&(b+=", "),g=n[g],b=0==g.toString().trim().length?b+(""+h):b+(""+h+" ("+g+")");throw new Message.mensagemErro("EST-000224",null,{nomeDoCampo:b,linhaDoGrid:c+1,linhaDoGridDuplicada:e+1,nomeDoGrid:d.titulo});
}}return!0};this.validaLinha=function(a,b){var c=d.getValoresLinha(a),f=!0,e=0,h=0,g="Linha "+lpad(a+1,2,"0")+" do Grid "+d.titulo,l=[],n=null,t=null;$(d.aCampos).each(function(){if(!(this instanceof CampoForm)||"hidden"==this.getTipo())return!0;var k=this.getNome(),p=(this.getLabel()?this.getLabel():this.titulo)+" da "+g,m=$(d.getCampo(a,k)),v=strtofloat(defaultVal(m.attr("obrigatorio"),"0"));(v=strtofloat(defaultVal(m.attr("valida"),"0"))?v:this.obrigatorio)&&e++;if(this.oCampo.verificaPreenchimentoValor(c[k]))try{var A=
d.getLinha(a);d.indice=getIndexGrid(A);d.indiceValidacao=d.indice;var C=m[0].myInstance?m[0].myInstance:this.oCampo;if(bCampoInvalido=C.getRecebeValorInvalido&&C.getRecebeValorInvalido()?!1:!C.valida(p,c[k]))f=!1,null==n&&(n=k,t=this.getLabel());var z=d.getCampo(d.indice,this.getNome());f&&z&&z.myInstance&&z.myInstance.functionValida&&(f=z.myInstance.functionValida(),f||null!=n||(n=k,t=this.getLabel()))}catch(K){f=!1,n=k,focusCampo(d.getCampo(a,n),!0),K instanceof Message.mensagemErro&&K.throwAsMsg()}else v&&
(null==n&&(n=k,t=this.getLabel()),l.push(this.getLabel()),h++)});delete d.indiceValidacao;if(h!=e&&0<h){var q=1<l.length?"s":"";g+=" "+(1<l.length?"possuem":"possui")+" o"+q+" campo"+q+" obrigatório"+q+" ";g+=l.join(", ");g+=" não preenchido"+q;null!==n&&this.focusCampo(a,n,!1);if(!1===b)return!1;throw new Message.mensagemErro("EST-000101",null,{nomeDoCampo:g});}if(!f&&t)throw new Message.mensagemErro("EST-000861",null,{nomeDoCampo:t,linhaDoGrid:a+1,nomeDoGrid:this.getLabel()});return f};this.validaCampoObrigatoriosPreenchidos=
function(a){var b=d.getValoresLinha(a),c=!0,f=null;$(d.aCampos).each(function(){if(!(this instanceof CampoForm)||"hidden"==this.getTipo())return!0;var e=this.getNome(),h=$(d.getCampo(a,e)),g=strtofloat(defaultVal(h.attr("obrigatorio"),"0"));h=strtofloat(defaultVal(h.attr("valida"),"0"))?g:this.obrigatorio;if(!this.oCampo.verificaPreenchimentoValor(b[e])&&h)return f=e,null!==f&&d.focusCampo(a,f,!1),c=!1});return c};this.verificaPreenchido=function(){!0===this.obrigatorio&&(this.obrigatorio=1);for(var a=
0,b=d.getNumerosLinha(),c=[],f=0;f<b;f++)d.validaLinha(f)?d.obrigatorio&&d.validaCampoObrigatoriosPreenchidos(f)?a++:d.obrigatorio||a++:c.push(f+1);if(0<c.length)return!1;if(this.obrigatorio&&a<(this.forcaTodasLinhasObrigatorias?b:1))throw new Message.mensagemErro("EST-000121",null,{quantidadeLinhaGridObrigatorio:this.obrigatorio,nomeDoGrid:this.titulo});return!0};this.limpa=function(a,b){b=defaultVal(b,!0);b||(d.aValores=[]);$.each(d.aCampos,function(){this instanceof CampoForm&&this.getCampo().getExterno&&
this.getCampo().getExterno()&&this.getCampo().getExterno().resetLastKey()});a=defaultVal(a,!0);b=this.getNumerosLinha();for(var c=0;c<b;c++)d.corpoTabela.removeChild(d.corpoTabela.lastChild),d.totalLinhas--;a&&F()};this.limpaValores=function(){d.aValores=[];$.each(d.aCampos,function(){if(this instanceof CampoForm){for(var a=this.getCampo(),b=0;b<d.totalLinhas;b++)d.limpa();a.getExterno&&a.getExterno()&&a.getExterno().resetLastKey()}})};this.disableScroll=function(){};this.valida=function(){if(!this.verificaPreenchido())return!1;
if(!this.verificaDuplicado())throw new Message.mensagemErro("EST-000038",null,{nomeDoGrid:this.titulo});return!0};this.setDuplicados=function(a){this.aDuplicados=a};this.setObrigatorio=function(a){(this.obrigatorio=a)?this.obj.addClass("grid_obrigatorio"):this.obj.removeClass("grid_obrigatorio")};this.setCampoObrigatorio=function(a,b){"undefined"==typeof b&&(b=!0);$(d.aCampos).each(function(){this.getNome()==a&&(this.obrigatorio=b)})};this.setCampoObrigatorioLinha=function(a,b,c,f){a=$(this.getCampo(a,
b));b=a.get(0).labelInstance;a.attr("obrigatorio",c?1:0);a.attr("valida",!0===f?1:0);b&&(c?$(b).addClass("campo_label_obrigatorio"):$(b).removeClass("campo_label_obrigatorio"))};this.forceFocus=function(){for(var a=this.getParent();a;)a=a.getParent(),a instanceof ItemTelaTab&&a.ativaAba()};this.setPerguntaLinhaPreenchida=function(a){this.perguntaLinhaPreenchida=a};this.getJanela=function(){return Janela.getJanelFromObj(d.divConteudo)};this.iniciaComponenteGridDados=function(){var a=this;x&&"auto"!=
x?"string"==typeof x&&x.endsWith("%")?(this.size=x,this.autoAjustaSize=!1):(this.size=x+"px",this.autoAjustaSize=!0):(this.size="auto",this.autoAjustaSize=!1);this.criaObjeto("div");if(ControleBaseSistema.isLayoutV3())D.apply(a,[this.getObj().get(0)]),a.alvo=this.getObj().get(0);else this.onAfterAppend(function(b){D.apply(a,[this]);E.apply(a,[this]);a.alvo=this})};this.carregaFromJson=function(a){GridDados.prototype.carregaFromJson.apply(this,arguments);a.adicionaLinha&&this.setAdicionaLinha(a.adicionaLinha);
a.iniHidden&&this.setIniHidden(a.iniHidden);a.aDuplicados.length&&this.setDuplicados(a.aDuplicados);void 0!==a.modoImpressao&&this.setModoImpressao(a.modoImpressao);a.exibeMensagemVazio&&this.setExibeMensagemVazio(a.exibeMensagemVazio);a.triggerChangeOnSetValoresIniciais&&this.setTriggerChangeOnSetValoresIniciais(a.triggerChangeOnSetValoresIniciais);a.estadosBotoes.length&&this.setEstadoBotoes(a.estadosBotoes);a.forcaTodasLinhasObrigatorias&&this.setForcaLinhasObrigatorias(a.forcaTodasLinhasObrigatorias);
a.visualizacao&&this.setVisualizacao(a.visualizacao);a.estiloExibicaoHint&&this.setEstiloExibicaoHint(a.estiloExibicaoHint);a.permiteRemoverTodasLinhas&&this.setPermiteRemoverTodasLinhas(a.permiteRemoverTodasLinhas);a.perguntaLinhaPreenchida&&this.setPerguntaLinhaPreenchida(a.perguntaLinhaPreenchida);a.configuracaoLayout&&this.setLayoutExibicao(a.configuracaoLayout);a.estiloExibicao.getNome()&&this.setEstiloExibicao(a.estiloExibicao.getNome());a.oLayout&&this.setLayout(a.oLayout);a.aExcolusao.length&&
this.desabilitaExclusao(a.aExcolusao);a.aValores.length&&this.setValores(a.aValores,!1,!0,!0);a.permiteOrdenar&&(this.permiteOrdenar=a.permiteOrdenar);a.obrigatorio&&(this.obrigatorio=a.obrigatorio);a.bDuplicaLinha&&this.setDuplicaLinha(a.bDuplicaLinha);this.isGridClonado=!0;if(a.aCampos.length){var b=a.aCampos.map(function(c){return CampoForm.fromJson(c)});this.setFilhos(b)}};this.getJsonFormat=function(){var a=GridDados.prototype.getJsonFormat.apply(this,arguments);a.aCampos=this.aCampos.length?
this.aCampos.map(function(b){return b.getJsonFormat()}):[];a.id=this.id;a.titulo=this.titulo;a.size=this.size;a.ini=this.ini;a.max=this.max;a.mostraTitulo=this.mostraTitulo;a.adicionaLinha=this.adicionaLinha;a.exibeMensagemVazio=this.exibeMensagemVazio;a.triggerChangeOnSetValoresIniciais=this.triggerChangeOnSetValoresIniciais;a.estadosBotoes=this.estadosBotoes;a.forcaTodasLinhasObrigatorias=this.forcaTodasLinhasObrigatorias;a.visualizacao=this.getVisualizacao();a.permiteOrdenar=this.permiteOrdenar;
a.estiloExibicaoHint=this.estiloExibicaoHint;a.modoImpressao=this.modoImpressao;a.aValores=this.getValores();a.permiteRemoverTodasLinhas=this.permiteRemoverTodasLinhas;a.perguntaLinhaPreenchida=this.perguntaLinhaPreenchida;a.removeLinha=this.getRemoveLinha();a.configuracaoLayout=this.configuracaoLayout;a.estiloExibicao=this.estiloExibicao;a.oLayout=this.getLayout();a.aDuplicados=this.aDuplicados;a.obrigatorio=this.obrigatorio;a.aExcolusao=this.getLinhaExclusao()||this.aExclusao;a.bDuplicaLinha=this.getDuplicaLinha();
return a};this.clonaGrid=function(a,b){var c=this,f=this.getJsonFormat(),e=GridDados.fromJson(f);a&&(this.adicionaGridVinculado(e,!0),e.adicionaGridVinculado(this,!0));b&&(e.onRemoveLinhaClonado(function(h){c.removeLinha(h)}),c.onRemoveLinhaClonado(function(h){e.removeLinha(h)}),c.onInsereLinhaClonado(function(h){e.insereLinha(h+1)}),e.onInsereLinhaClonado(function(h){c.insereLinha(h+1)}));return e};this.setGridAtualizado=function(a){this.isGridAtualizado=a};this.getGridAtualizado=function(){return this.isGridAtualizado};
this.setDuplicaLinha=function(a){this.bDuplicaLinha=a};this.getDuplicaLinha=function(){return this.bDuplicaLinha};this.adicionaGridVinculado=function(a,b){var c=this;null===this.gridsVinculados&&(this.gridsVinculados=[],this.onChangeGrid(function(){c.getGridAtualizado()||(c.setGridAtualizado(!0),c.gridsVinculados.forEach(function(f){f.setGridAtualizado(!0);f.setValores(c.getValores(),!1,b);f.setGridAtualizado(!1)}),bAtualizado=c.getGridAtualizado()?!1:!0,c.setGridAtualizado(bAtualizado))}));this.gridsVinculados.push(a)};
this.onChangeGrid=function(a){this.aOnChangeGrid.push(a)};this.executaOnChangeGrid=function(){var a=this;this.aOnChangeGrid.forEach(function(b){b(a)})};r&&this.iniciaComponenteGridDados()};GridDados.prototype=new ComponenteTela;GridDados.MODO_EXIBICAO_COL=1;GridDados.MODO_EXIBICAO_LINHA=2;GridDados.MODO_EXIBICAO_LAYOUT=3;
GridDados.getCampoForEvento=function(r){r instanceof CampoForm&&(r=r.getCampo());if(!r.obj||!r.obj.grid)return r;r=r.obj.grid.getInstanciaCampoLinha(r.obj.grid.getIndice(),r.getNome());return r instanceof CampoForm?r.getCampo():r};GridDados.fromJson=function(r){var w=new GridDados(r.id,r.titulo,r.size,r.ini,r.max,r.mostraTitulo);w.carregaFromJson(r);return w};var DataGrid=function(){};DataGrid.prototype=new CompositeBase;var GridDrag=function(){};GridDrag.prototype=new ComponenteForm;;/*</editor-fold desc="js_grid.js">*/
/*<editor-fold desc="js_grupo_obrigatorio_campo_form.js">*//*
 {ipm "async": false, "bundle": "componentes"}
*/
var GrupoObrigatorioCampoForm=function(d,e,f){this.aCampos=f||[];this.qtdeValida=e;this.nome=d;this.setQuantidadeValida=function(a){this.qtdeValida=a};this.getQuantidadeValida=function(){return this.qtdeValida};this.getNome=function(){return this.nome};this.setCampos=function(a){this.aCampos=a};this.getCampo=function(a){var b=!1;jQuery.each(this.aCampos,function(){if(this.getNome()==a)return b=this,!1});return b};this.getCampos=function(){return this.aCampos};this.valida=function(){var a=!0,b=[],
c=0;jQuery.each(this.getCampos(),function(){this.isPreenchido()&&c++;b.push(this.getLabel())});if(c<this.qtdeValida)throw a=!1,new Message.mensagemErro("EST-000122",null,{nomeDoCampo:b.join(", "),quantidadeCampo:this.qtdeValida});return a}};;/*</editor-fold desc="js_grupo_obrigatorio_campo_form.js">*/
/*<editor-fold desc="js_label.js">*//*
 {ipm "async": false, "bundle": "componentes"}
*/
var Label=function(e,c,f,d){this.label=void 0===c?"":c;this.nome=e;this.usaDoisPontos="undefined"==typeof d?!0:d;this.hint="";this.setTipo=function(a){this.removeClass("campo_label");this.removeClass("campo_label_obrigatorio");this.removeClass("campo_label_leitura");this.removeClass("campo_label_preenchido");this.removeClass("campo_label_dois_pontos");this.setClass("campo_label");a&&this.setClass("number"==typeof a?"campo_label_"+["","obrigatorio","leitura","preenchido"][a]:"campo_label_"+a);!this.usaDoisPontos||
ControleBaseSistema.layoutSistemaNovo&&!this.label||this.setClass("campo_label_dois_pontos")};this.setLabel=function(a){this.label=a;""==a?(this.obj.attr("title",""),this.obj.html(""),this.obj.removeClass("campo_label_dois_pontos")):(em_branco(this.hint)&&this.obj.attr("title",a),this.obj.html(a))};this.getLabel=function(){return this.label};this.iniciaLabel=function(){var a=this;this.criaObjeto("label");this.onAppendTo(function(b){b.setLabel(b.getLabel()+"")});this.setTipo(f||"");this.onAfterAppend(function(){em_branco(a.getHint())||
a.criaHint()})};this.setHint=function(a){this.hint=a};this.getHint=function(){return this.hint};this.criaHint=function(){if(!em_branco(this.getHint())){var a=new BotaoEstrutura("info_small",!1,!0);a.setIgnoreTab(!0);a.obj.addClass(ControleElementosSistema.getSeletorElemento("botao_hint"));ControleBaseSistema.layoutSistemaNovo||(a.obj.css("vertical-align","top"),$(".botao_acao.botao_acao_estrutura",a.obj).css("margin-top","1px"));var b=this;a.obj.attr("data-ipm-hint",b.getHint());includeJavaScript("js_tooltip.js",
function(){a.obj.IpmHint(b.getHint(),{showMessageCode:!0})});a.appendTo(this.getObjAppend())}};this.iniciaLabel()};Label.prototype=new ComponenteForm;;/*</editor-fold desc="js_label.js">*/
/*<editor-fold desc="js_progress_bar.js">*//*
 {ipm "async": false, "bundle": "componentes"}
*/
var ProgressBar=function(c,b){this.nome=c;this.__numeroEtapas=b||1;this.__mostraPercentual=!0;this.__etapaAtual=0;this.iconeFontAwesome;this.__iniciaComponente=function(){this.criaObjeto("article");this.obj.attr("aria-label","Barra de Progresso");this.__atualizaEstiloBarra();this.percentual=$("<div>").addClass("percentual").attr("tabindex","0");this.fundo=$("<div>").addClass("fundo_percentual");var a=$("<div>").addClass("fundo_percentual_overlay");this.fundo.append(a);this.obj.append(this.percentual).append(this.fundo);
this.iconeFontAwesome&&this.showIconeFontAwesome();this.setPercentual("0")};this.__atualizaEstiloBarra=function(){this.obj.attr("class","progress_bar estrutura_barra_progresso");this.estiloBarra===ProgressBar.ESTILO_BARRA_RETANGULAR&&this.obj.addClass("estrutura_barra_progresso_retangular");this.corBase&&this.__insereEstiloCorBase();this.corFundo&&this.__insereEstiloCorFundo()};this.setCorBase=function(a){this.corBase=a};this.setCorFundo=function(a){this.corFundo=a};this.__insereEstiloCorFundo=function(){this.obj.css("--cor-barra-progresso-fundo",
this.corFundo)};this.__insereEstiloCorBase=function(){this.obj.css("--cor-barra-progresso",this.corBase);if(!this.corFundo){var a=ColorUtils.converteHexToHsl(this.corBase);if(a){var d=191.25<ColorUtils.getIndiceLuminosidadeCor(ColorUtils.converteHslToHex(a))?20:95;a=new ColorUtils.ObjetoCorHsl(a.getMatiz(),a.getSaturacao(),d);this.obj.css("--cor-barra-progresso-fundo",ColorUtils.converteHslToHex(a))}}};this.setSteps=function(a){this.numeroEtapas=a};this.getSteps=function(){return this.numeroEtapas};
this.setPercentual=function(a){$(".percentual",this.obj).html(a+"%").attr("aria-label",a+"%")};this.getPercentual=function(){return round(100*this.__etapaAtual/this.numeroEtapas,1)};this.increment=function(a){a||0===a?this.__etapaAtual=a:this.__etapaAtual++;this.__etapaAtual>this.numeroEtapas&&(this.__etapaAtual=this.numeroEtapas);a=this.getPercentual();var d=100-a;this.setPercentual(a);this.fundo.css("margin-right",d+"%")};this.limpa=function(){this.setPercentual(0);this.fundo.css("margin-right",
"100%")};this.getStepAtual=function(){return this.__etapaAtual};this.isCompleto=function(){return this.__etapaAtual==this.numeroEtapas};this.showIconeFontAwesome=function(){var a=this.iconeFontAwesome.criaObjeto();a=$("<div>").addClass("estrutura_barra_progresso_icone_carregamento").append(a);$(".fundo_percentual",this.obj).append(a)};this.setIconeFontAwesome=function(a){this.iconeFontAwesome=IpmIcone.fromObjetoFA(a.icone);a.cor&&this.iconeFontAwesome.setCor(a.cor);this.showIconeFontAwesome()};this.getIconeFontAwesome=
function(){this.iconeFontAwesome};this.carregaFromJson=function(a){ProgressBar.prototype.carregaFromJson.apply(this,arguments);this.numeroEtapas=a.numeroEtapas;this.mostraPercentual=a.mostraPercentual;this.estiloBarra=a.estiloBarra;a.corBase&&this.setCorBase(a.corBase);a.corFundo&&this.setCorFundo(a.corFundo);a.iconeFontAwesome&&this.setIconeFontAwesome(a.iconeFontAwesome)};this.getJsonFormat=function(){var a=ProgressBar.prototype.getJsonFormat.apply(this,arguments);a.numeroEtapas=this.numeroEtapas;
a.mostraPercentual=this.mostraPercentual;a.estiloBarra=this.estiloBarra;a.corBase=this.corBase;a.corFundo=this.corFundo;a.iconeFontAwesome=this.iconeFontAwesome;return a};this.nome&&this.__iniciaComponente()};ProgressBar.prototype=new ComponenteForm;ProgressBar.ESTILO_BARRA_PADRAO=1;ProgressBar.ESTILO_BARRA_RETANGULAR=2;
Object.defineProperties(ProgressBar.prototype,{numeroEtapas:criaPropertyAccessorsPadroes("__numeroEtapas",{set:function(c,b){Reflect.set(this,c,b);this.increment(this.__etapaAtual)}}),mostraPercentual:criaPropertyAccessorsPadroes("__mostraPercentual",{set:function(c,b){Reflect.set(this,c,b);b?this.percentual.removeClass("percentual_oculto"):this.percentual.addClass("percentual_oculto")}}),estiloBarra:criaPropertyAccessorsPadroes("__estiloBarra",{set:function(c,b){Reflect.set(this,c,b);this.__atualizaEstiloBarra()}}),
corBase:criaPropertyAccessorsPadroes("__corBase",{set:function(c,b){Reflect.set(this,c,b);this.__atualizaEstiloBarra()}}),corFundo:criaPropertyAccessorsPadroes("__corFundo",{set:function(c,b){Reflect.set(this,c,b);this.__atualizaEstiloBarra()}})});;/*</editor-fold desc="js_progress_bar.js">*/
/*<editor-fold desc="js_separador.js">*//*
 {ipm "async": false, "bundle": "componentes"}
*/
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(a){return a.raw=a};$jscomp.createTemplateTagFirstArgWithRaw=function(a,d){a.raw=d;return a};
var Separador=function(a,d,e){a=void 0===a?Separador.SEPARADOR_VERTICAL:a;d=void 0===d?15:d;this.tipoComponente=ComponenteTela.SEPARADOR;this.criaObjeto("span");ControleBaseSistema.isLayoutV3()?(this.setPeso=function(b){this.peso=b;return this},this.setCor=function(b){this.cor=b;return this},this.setEspaco=function(b){this.espaco=b;return this},Object.defineProperties(this,{peso:criaPropertyAccessorsPadroes("__peso",{set:function(b,c){this.css("--peso-separador",c+"px");Reflect.set(this,b,c)}}),cor:criaPropertyAccessorsPadroes("__cor",
{set:function(b,c){this.css("--cor-separador",c);Reflect.set(this,b,c)}}),espaco:criaPropertyAccessorsPadroes("__espaco",{set:function(b,c){this.css("--espaco-separador",c);Reflect.set(this,b,c)}}),tamanho:criaPropertyAccessorsPadroes("__tamanho",{set:function(b,c){Separador.SEPARADORES_FULL.includes(this.tipo)||this.css("--tamanho-separador",isNumeric(c)?c+"px":c);Reflect.set(this,b,c)}})}),this.tipo=a=a.toUpperCase(),this.tamanho=d,d={},d="separador-"+(d[Separador.SEPARADOR_VERTICAL]="vertical",
d[Separador.SEPARADOR_HORIZONTAL]="horizontal",d[Separador.SEPARADOR_VERTICAL_FULL]="vertical",d[Separador.SEPARADOR_HORIZONTAL_FULL]="horizontal",d)[a],this.addClass(d),Separador.SEPARADORES_FULL.includes(a)&&this.addClass("full"),e&&this.setNome(e)):(this.setClass("separador separador_"+a.toLowerCase()),a.toUpperCase().charAt(0)==Separador.SEPARADOR_IDENTIFICADOR_FULL&&(a=a.toUpperCase().charAt(1),this.spanFlutuante=$("<span>").addClass("separador_flutuante separador_"+a.toLowerCase()).appendTo(this.obj)),
a.toUpperCase()==Separador.SEPARADOR_VERTICAL?this.setCss({height:d,width:0}):this.setCss({height:0,width:d}),this.tipo=a,this.tamanho=d,e&&(this.setNome(e),this.onAfterAppend(function(b){if(b.spanFlutuante){var c=b.obj.closest('[class*="estilo_tela"]');c.length&&(b.tipo.toUpperCase()==Separador.SEPARADOR_VERTICAL?b.spanFlutuante.css({top:"-"+c[0].style.paddingTop,bottom:"-"+c[0].style.paddingBottom}):b.spanFlutuante.css({left:"-"+c[0].style.paddingLeft,right:"-"+c[0].style.paddingRight}))}})))};
Separador.prototype=new ComponenteTela;Separador.SEPARADOR_VERTICAL="V";Separador.SEPARADOR_HORIZONTAL="H";Separador.SEPARADOR_VERTICAL_FULL="FV";Separador.SEPARADOR_HORIZONTAL_FULL="FH";Separador.SEPARADOR_IDENTIFICADOR_FULL="F";Separador.SEPARADORES_FULL=[Separador.SEPARADOR_VERTICAL_FULL,Separador.SEPARADOR_HORIZONTAL_FULL];;/*</editor-fold desc="js_separador.js">*/
/*<editor-fold desc="js_slider.js">*//*
 {ipm "async": false, "bundle": "componentes"}
*/
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(d){return d.raw=d};$jscomp.createTemplateTagFirstArgWithRaw=function(d,e){d.raw=e;return d};
var Slider=function(d,e){var k=this,h=null,g=null;this.container=null;this.nome=d;this.titulo=e.titulo;this.largura=e.largura;this.visualizacao=e.visualizacao;this.minimo=e.minimo;this.maximo=e.maximo;this.step=e.step;this.exibeValores=e.exibeValores;this.exibeIntervalo=e.exibeIntervalo;this.valor=e.valor;this.fnOnSlide=e.fnOnSlide;this.fnOnChange=e.fnOnChange;this.getNome=function(){return this.nome};this.setNome=function(a){this.nome=a};this.getTitulo=function(){return this.titulo};this.setTitulo=
function(a){this.titulo=a};this.getLargura=function(){return this.largura};this.setLargura=function(a){this.largura=a};this.getVisualizacao=function(){return this.visualizacao};this.setVisualizacao=function(a){(this.visualizacao=a)?this.obj.addClass("estrutura_componente_slider_visualizacao"):this.obj.removeClass("estrutura_componente_slider_visualizacao")};this.getMinimo=function(){return this.minimo};this.setMinimo=function(a){this.minimo=a};this.getMaximo=function(){return this.maximo};this.setMaximo=
function(a){this.maximo=a};this.getValor=function(){return Array.isArray(this.valor)?1<this.valor.length?this.valor:this.valor[0]:this.valor};this.setValor=function(a,b){(b||0===b)&&Array.isArray(this.valor)?this.valor[b]=a:this.valor=a;this.__ultimoValor=this.valor;g&&(Array.isArray(this.valor)?g.slider("values",this.valor):g.slider("value",this.valor))};this.getExibeValores=function(){return this.exibeValores};this.setExibeValores=function(a){this.exibeValores=a};this.setStep=function(a){this.step=
a};this.setExibeIntervalo=function(a){this.exibeIntervalo=a};this.onSlide=function(a){this.fnOnSlide=a};this.onChange=function(a){this.fnOnChange=a};this.iniciaSlider=function(){var a=this.criaOpcoesSlider();g=h.slider(a);this.__aplicaEventosSlider(g);this.exibeValores&&this.criaExibicaoValores();Array.isArray(this.valor);this.atualizaAtributosAria(g)};this.criaOpcoesSlider=function(){var a={step:this.step,min:this.minimo,max:this.maximo};Array.isArray(this.valor)?a.values=this.valor:a.value=this.valor;
this.__verificaExibeIntervalo(a);return a};this.__verificaExibeIntervalo=function(a){!0===this.exibeIntervalo?Array.isArray(this.valor)&&2==this.valor.length?a.range=!0:a.range=!1:[Slider.INTERVALO_MAX,Slider.INTERVALO_MIN].includes(this.exibeIntervalo)&&(Array.isArray(this.valor)&&1==this.valor.length||!Array.isArray(this.valor))?a.range=this.exibeIntervalo:a.range=!1};this.__aplicaEventosSlider=function(a){var b=this;a.on("slide",function(f,c){if(b.visualizacao)return!1;$(c.handle).siblings(".estrutura_slider_container_valor").detach();
b.setValor(c.value,c.handleIndex);b.fnOnSlide&&executaEventoJson(b.fnOnSlide,[b,c]);b.atualizaAtributosAria(a);b.exibeValores&&![b.minimo,b.maximo].includes(c.value)&&$(c.handle).is(":focus")&&b.criaExibicaoValorAtual($(c.handle),c.value)});a.on("slidechange",function(f,c){if(b.visualizacao)return!1;$(c.handle).siblings(".estrutura_slider_container_valor").detach();b.__ultimoValor!==b.valor&&(b.setValor(c.values||c.value),b.fnOnChange&&executaEventoJson(b.fnOnChange,[b,c]));b.atualizaAtributosAria(a);
b.exibeValores&&![b.minimo,b.maximo].includes(c.value)&&$(c.handle).is(":focus")&&b.criaExibicaoValorAtual($(c.handle),c.value)})};this.criaExibicaoValores=function(){this.container.addClass("estrutura_slider_container_exibe_valores");var a=$("<span>").addClass("estrutura_slider_valor_min").html(this.minimo),b=$("<span>").addClass("estrutura_slider_valor_max").html(this.maximo);if(!Array.isArray(this.valor)&&this.minimo==this.maximo-2){this.container.addClass("estrutura_slider_container_exibe_valores_meio");
var f=$("<span>").addClass("estrutura_slider_valor_meio").html(this.maximo-1);this.container.append(f)}this.container.append(a,b)};this.atualizaAtributosAria=function(a){var b=this;a.children(".ui-slider-handle").each(function(f){Array.isArray(b.valor)?$(this).attr("aria-label","Manipulador "+(f+1)+" valor "+b.valor[f]):$(this).attr("aria-label","Valor "+b.valor)})};this.criaExibicaoValorAtual=function(a,b){if(Array.isArray(this.valor)||this.minimo!=this.maximo-2){b=b||this.valor;var f=$("<span>").addClass("estrutura_slider_container_valor").appendTo(a.parent(".ui-slider"));
$("<span>").addClass("estrutura_slider_container_valor_atual").html(b).appendTo(f);$("<span>").addClass("estrutura_slider_container_valor_seta").prependTo(f);b=parseFloat(a.css("right"))-(f[0].offsetWidth-a[0].offsetWidth)/2;f.css("right",b);a.on("blur",function(){f.detach();a.off("blur")})}};this.incluiArquivos=function(){return new Promise(function(a,b){includeJavaScript("js_uislider.js",function(){includeStyleSheet("css_slider.css",function(){a()})})})};d&&(this.criaObjeto("article"),this.obj.addClass("estrutura_componente_slider").attr("aria-label",
"Slider"),this.container=$("<div>").addClass("estrutura_slider_container").css("width",e.largura),h=$(document.createElement("div")),h.attr("id",d),this.titulo&&(d=$(document.createElement("label")),d.addClass("campo_label campo_label_dois_pontos"),d.css("text-align","left"),d.text(this.titulo),this.obj.append(d)),this.setVisualizacao(this.visualizacao),this.obj.append(this.container),this.container.append(h),this.onAfterAppend(function(){k.incluiArquivos().then(function(){return k.iniciaSlider()})}))};
Slider.prototype=new Componente;Slider.INTERVALO_MIN="min";Slider.INTERVALO_MAX="max";;/*</editor-fold desc="js_slider.js">*/
/*<editor-fold desc="js_splitter.js">*//*
 {ipm "async": false, "bundle": "componentes"}
*/
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(k){return k.raw=k};$jscomp.createTemplateTagFirstArgWithRaw=function(k,n){k.raw=n;return k};
var Splitter=function(k,n,q){this.isHorizontal=function(){return this.tipo==Splitter.TIPO_HORIZONTAL||this.tipo==Splitter.TIPO_HORIZONTAL_INV};this.isInvertido=function(){return 2==this.tipo.length};this.setColapsed=function(a,e){if(ControleBaseSistema.isLayoutV3())this.collapsed=a,this.trataHint(),this.toggleClass("ativo",!a),this.functionCollapse?this.functionCollapse.call(this,this.collapsed):this.telaCollapse&&(e=$(this.telaCollapse.content||this.telaCollapse),a?e.hide():e.show()),this.handlerOnChangeCollapse&&
this.handlerOnChangeCollapse.apply(this,[this.getCollapsed()]);else{var g=!1;switch(this.tipo){case Splitter.TIPO_HORIZONTAL:if(this.estiloSplitter||ControleBaseSistema.layoutSistemaNovo){var d="chevron-down";var b="chevron-up";g=!0}else d="splitter_bottom",b="splitter_top";break;case Splitter.TIPO_HORIZONTAL_INV:this.estiloSplitter||ControleBaseSistema.layoutSistemaNovo?(d="chevron-up",b="chevron-down",g=!0):(d="splitter_top",b="splitter_bottom");break;case Splitter.TIPO_VERTICAL:this.estiloSplitter||
ControleBaseSistema.layoutSistemaNovo?(d="chevron-right",b="chevron-left",g=!0):(d="splitter_right",b="splitter_left");break;case Splitter.TIPO_VERTICAL_INV:this.estiloSplitter||ControleBaseSistema.layoutSistemaNovo?(d="chevron-left",b="chevron-right",g=!0):(d="splitter_left",b="splitter_right")}a?g?IpmIcone.buscaFA(b).trocaIcone(this.oDiv,IpmIcone.buscaFA(d)):this.oDiv.removeClass(d).addClass(b):g?IpmIcone.buscaFA(d).trocaIcone(this.oDiv,IpmIcone.buscaFA(b)):this.oDiv.removeClass(b).addClass(d);
this.collapsed=a;this.trataHint();!1!==e&&(this.functionCollapse?this.functionCollapse.call(this,this.collapsed):this.telaCollapse&&(this.isHorizontal()?$(this.telaCollapse.content||this.telaCollapse).height(a?0:""):$(this.telaCollapse.content||this.telaCollapse).width(a?0:"")))}};this.onChangeCollapse=function(a){this.handlerOnChangeCollapse=a;return this};this.getCollapsed=function(){return this.collapsed};this.setFunctionCollapsed=function(a){this.functionCollapse=a};this.setTelas=function(a,e){this.telaPrincipal=
a;this.telaCollapse=e};this.setHint=function(a,e){this.hintShow=a;this.hintHide=e;this.trataHint()};this.setTamanhoMaximoResize=function(a){this.tamanhoMaximoResize=a;return this};this.setResize=function(a,e){this.fnResize=a;this.fnFinishResize=e;ControleBaseSistema.isLayoutV3()||(this.fnResize?this.obj.addClass("estrutura_splitter_drag"):this.obj.removeClass("estrutura_splitter_drag"))};this.trataHint=function(){this.oDiv.attr("title",n?this.hintHide:this.hintShow)};this.getTelaEsquerda=function(){return this.isInvertido()?
this.telaCollapse:this.telaPrincipal};this.getTelaDireita=function(){return this.isInvertido()?this.telaPrincipal:this.telaCollapse};this.montaComponente=function(a){if(ControleBaseSistema.isLayoutV3()){a=$(a);var e=r(this.tipo);a.addClass("slot-componente slot-componente-splitter "+e);var g=$(this.getTelaEsquerda()),d=$(this.getTelaDireita());g[0]instanceof TelaPadrao&&(g=g[0]);d[0]instanceof TelaPadrao&&(d=d[0]);g.appendTo(a);d.appendTo(a);this.prependTo(a);var b=a.closest(".layout-exibicao-tela");
0<b.length&&(a.parent().css({flex:"1","align-items":"stretch"}),b.is(".layout-tela-grid")&&b.css("grid-auto-rows","100%"));executaProximoLoopAguardando(function(){g.addClass("tela-splitter tela-splitter-principal tela-"+e);d.addClass("tela-splitter tela-splitter-collapse tela-"+e)})}else{a=$(a);b=$("<div>").attr("style",a.attr("style")).css({display:"flex",height:"100%",width:"100%",overflow:"hidden","flex-direction":this.isHorizontal()?"column":"row"}).appendTo(a.parent());b[0].className=a[0].className;
a.detach();a.hasClass("estilo_tela_grid")&&b.css("display","grid");$(">style",a).appendTo(b);a=this.isHorizontal()?"tela_spliter_h":"tela_spliter_v";$(this.getTelaEsquerda().content||this.getTelaEsquerda()).css({flex:this.isInvertido()?"0 1 auto":"1 0 auto",overflow:"auto"}).addClass(a).appendTo(b);var c=$("<div>").appendTo(b).addClass("separador_container");this.appendTo(c);$(this.getTelaDireita().content||this.getTelaDireita()).css({flex:this.isInvertido()?"1 0 auto":"0 1 auto",overflow:"hidden",
"overflow-y":"auto",margin:"0"}).addClass(a).appendTo(b)}};this.appendTo=function(a){return this.instanceComponente.appendTo.apply(this,[a])};this.setEstiloSplitter=function(a){this.estiloSplitter&&this.obj.removeClass("splitter_estilo_"+this.estiloSplitter);(this.estiloSplitter=a)&&this.setClass("splitter_estilo_"+a);this.setColapsed(this.getCollapsed())};this.preparaDrag=function(){if(this.tipo==Splitter.TIPO_HORIZONTAL){var a=this.obj.next();if(a[0]){var e=this.obj,g=0,d=a[0].offsetHeight;ControleNavegacao.preparaDragMultiEntrada(e,
function(){g=0;d=a[0].offsetHeight},function(f){if(0==f.pressure||a.prev()[0].myInstance.collapsed)return g=0,!1;g+=f.deltaY;f=d-g;f>IpmJanelas.getJanelaAtiva().height()/2.25&&(f=IpmJanelas.getJanelaAtiva().height()/2.25);a.css("height",f);a.css("transition","none")},function(){g=0;d=a[0].offsetHeight;a.css("transition","");ajustaConteudoContentDiv($(".componente_tela_tab_base",IpmJanelas.getJanelaAtiva())[0]);findContentAutoAdaptable(a)})}}else if(this.tipo==Splitter.TIPO_VERTICAL&&(a=this.obj.parent().parent(),
a[0]&&a.hasClass("detalhamento_consulta"))){e=this.obj;var b=0,c=a[0].offsetWidth;ControleNavegacao.preparaDragMultiEntrada(e,function(){b=0;c=a[0].offsetWidth},function(f){if(0==f.pressure||$(".splitter_v",a)[0].myInstance.collapsed)return b=0,!1;b+=f.deltaX;f=c-b;f>IpmJanelas.getJanelaAtiva().width()/2&&(f=IpmJanelas.getJanelaAtiva().width()/2);a.css("width",f);a.css("transition","none")},function(){b=0;c=a[0].offsetWidth;a.css("transition","");ajustaConteudoContentDiv($(".componente_tela_tab_base",
IpmJanelas.getJanelaAtiva())[0]);findContentAutoAdaptable(a)})}};var r=function(a){a=a.toString().toLocaleUpperCase();var e={};return"splitter-"+((e[Splitter.TIPO_HORIZONTAL]="horizontal",e[Splitter.TIPO_VERTICAL]="vertical",e[Splitter.TIPO_HORIZONTAL_INV]="horizontal",e[Splitter.TIPO_VERTICAL_INV]="vertical",e)[a]||"horizontal")};this.criaSplitter=function(){var a=this;if(ControleBaseSistema.isLayoutV3()){this.criaObjeto("div");this.setClass(r(k));this.toggleClass("invertido",this.isInvertido());
this.oDiv=$("<div>").addClass("splitter-acao");var e=IpmIcone.FA(1038),g=IpmIcone.FA(114);this.oDiv.append(g.criaObjeto());this.oDiv.on("click",function(){return a.setColapsed(!a.getCollapsed())});this.getObj().append(e.criaObjeto(),this.oDiv,e.criaObjeto());this.onAfterAppend(function(){var c=this;this.setColapsed(this.getCollapsed());if(this.telaCollapse){var f=$(this.telaCollapse.content||this.telaCollapse),p=this.isHorizontal()?f.outerHeight():f.outerWidth(),l=p,m=0;ControleNavegacao.preparaDragMultiEntrada(this.getObj(),
function(h){if(h.target.get(0)!=c.getObj().get(0))return!1;c.addClass("dragging");m=0;p=c.isHorizontal()?f.outerHeight():f.outerWidth();f.css("transition","none")},function(h){if(c.hasClass("dragging")){if(0==h.pressure)return c.removeClass("dragging"),m=0,!1;m+=c.isHorizontal()?h.deltaY:h.deltaX;l=p-m;c.tamanhoMaximoResize&&(h=isInstanceOf(c.tamanhoMaximoResize,[Function])?c.tamanhoMaximoResize():c.tamanhoMaximoResize)&&l>h&&(l=h);c.isHorizontal()?f.height(l):f.width(l);c.fnResize&&c.fnResize(iDeltaEv)}},
function(h){c.hasClass("dragging")&&(m=0,c.fnFinishResize&&c.fnFinishResize(),h=0>=l,(!c.getCollapsed()&&h||c.getCollapsed()&&!h)&&c.setColapsed(h),c.removeClass("dragging"),f.css("transition",""))})}}.bind(this))}else{this.criaObjeto("div");this.setClass("splitter splitter_"+k.toLowerCase().charAt(0));this.oDiv=$("<div>").addClass("splitter_area splitter_area_"+k.toLowerCase().charAt(0));var d=this,b=null;ControleNavegacao.preparaDragMultiEntrada(this.obj,function(c){if(!d.fnResize)return!1;d.obj.addClass("estrutura_splitter_drag_arrastando");
b=0},function(c){if(!d.fnResize)return!1;if(d.obj.hasClass("estrutura_splitter_drag_arrastando")){if(0==c.pressure)return d.obj.removeClass("estrutura_splitter_drag_arrastando"),!1;c=d.isHorizontal()?-c.deltaY:-c.deltaX;null!==b&&(b+=c,20<Math.abs(b)&&(c+=b,b=null));null===b&&d.fnResize(c)}},function(c){if(!d.fnResize)return!1;d.fnFinishResize&&d.fnFinishResize();b=null;d.obj.removeClass("estrutura_splitter_drag_arrastando")});this.oDiv.on("click",function(){this.setColapsed(!this.getCollapsed())}.bind(this));
this.obj.append(this.oDiv);this.onAfterAppend(function(){this.setColapsed(this.getCollapsed());this.preparaDrag()}.bind(this))}};this.tipoComponente=ComponenteTela.SPLITTER;this.tamanhoMaximoResize=this.fnFinishResize=this.fnResize=this.oDiv=this.telaPrincipal=this.telaCollapse=this.functionCollapse=this.hintHide=this.hintShow=null;this.tipo=k||Splitter.TIPO_VERTICAL;this.collapsed=n||!1;this.estiloSplitter=Splitter.ESTILO_PADRAO;this.criaSplitter();q&&this.setNome(q)};Splitter.prototype=new ComponenteTela;
Splitter.TIPO_HORIZONTAL="H";Splitter.TIPO_VERTICAL="V";Splitter.TIPO_HORIZONTAL_INV="HI";Splitter.TIPO_VERTICAL_INV="VI";Splitter.ESTILO_PADRAO="";Splitter.ESTILO_ACCORDION="accordion";;/*</editor-fold desc="js_splitter.js">*/
/*<editor-fold desc="js_tree.js">*//*
 {ipm "async": false, "bundle": "componentes"}
*/
var Tree=function(v,m,r,n,p,B,C){this.setLimitNivel=function(a){this.levelLimit=a};this.getFolhas=function(){return this.rootNode.getFolhas()};this.getRootNode=function(){return this.rootNode};this.setSelectable=function(a){this.selectable=!0;this.selectableTipo=a};this.getSelectableTipo=function(){return this.selectableTipo?$.isArray(this.selectableTipo)?this.selectableTipo:[this.selectableTipo]:!1};this.findComponente=function(a){return this.nome==a?this:this.rootNode.findComponente(a)};this.getLimitNivel=
function(){return this.levelLimit};this.addChildren=function(a){this.configuraCheckbox(a);this.rootNode.addChildren(a)};this.configuraCheckbox=function(a){var b=this;this.checkbox&&$.each(a.children,function(){this instanceof ItemTree&&this.Parent&&this.Parent.atualizaSelecionavel(b.getSelectableTipo())})};this.setTitulo=function(a){this.titulo=a};this.getTitulo=function(){return this.titulo};this.setMostraTitulo=function(a){this.mostraTitulo=a;this.oTitulo&&(ControleBaseSistema.layoutSistemaNovo?
a?this.oTitulo.removeClass("estrutura_tree_titulo_hidden"):this.oTitulo.addClass("estrutura_tree_titulo_hidden"):a?this.oTitulo.show():this.oTitulo.hide())};this.getFilhos=function(){return this.rootNode.getFilhos()};this.isDraggable=function(){return this.draggable};this.isCheckBox=function(){return this.checkbox};this.getNome=function(){return this.nome};this.setConect=function(a){this.oTree.attr("conect",a)};this.setWidth=function(a){this.obj.width(a)};this.setHeight=function(a){this.obj.height(a)};
this.setDuplicate=function(a){this.duplicate=a};this.getDuplicate=function(){return this.duplicate};this.setTipoMove=function(a){this.tipoMove=a};this.getTipoMove=function(){return this.tipoMove};this.setVisualizacao=function(a){return this.setDisabled(a)};this.setDisabled=function(a){this.visualizacao=a};this.getConfigTree=function(){var a=this,b=["themes","html_data","types","crrm"],c={core:{animation:300}};this.useSearch&&(b.push("search"),c.search={show_only_matches:!0,case_insensitive:!0,search_method:"jstree_contains_advanced_search"});
this.selectable&&(b.push("ui"),c.ui={select_limit:1==B?-1:1,selected_parent_close:!1,select_multiple_modifier:"ctrl"});this.isDraggable()&&(b.push("dnd"),c.dnd={drag_start:function(){$(".jstree-hovered",this.get_container_ul()).addClass("tree_selecionado");a.getUsaLixeira()?a.atualizaEstadoAreaExclusao(!0):a.atualizaEstadoAreaInclusao(!0);try{$.vakata.dnd.user_data.obj.childrenOf(a.oTree)&&a.fnDragStart.forEach(function(e){"object"==typeof e?executaEventoJson(e,[$.vakata.dnd.user_data.obj]):e($.vakata.dnd.user_data.obj)})}catch(e){__bDesenvolvimento&&
console.error(e)}},drag_stop:function(){$(".tree_selecionado",this.get_container_ul()).removeClass("tree_selecionado");a.getUsaLixeira()?a.atualizaEstadoAreaExclusao():a.atualizaEstadoAreaInclusao();try{$.vakata.dnd.user_data.obj.childrenOf(a.oTree)&&a.fnDragStop.forEach(function(e){"object"==typeof e?executaEventoJson(e,[$.vakata.dnd.user_data.obj]):e($.vakata.dnd.user_data.obj)})}catch(e){__bDesenvolvimento&&console.error(e)}},drop_finish:function(e){var g=Componente.getInstanceFromDom(e.o),h=!1;
if(g&&a.getUsaLixeira()&&e.r.attr("lixo")=="lixo_"+a.getNome())h=!0,a.getRootNode().removeChild(g);else if(g&&!a.getUsaLixeira()&&(e.r.attr("data-add")||"").split(",").includes(a.getNome())){var l=e.r.data("tree-destino");if($.vakata.dnd.helper&&!$.vakata.dnd.helper.children("ins").hasClass("jstree-ok"))return;$.vakata.dnd.is_drag&&$.vakata.dnd.user_data.jstree&&e.e.currentTarget===e.e.target&&$.vakata.dnd.user_data.obj&&$($.vakata.dnd.user_data.obj).length&&$($.vakata.dnd.user_data.obj).parents(".jstree:eq(0)")[0]!==
e.e.target&&l.oTree.jstree("instance").move_node(g.obj,l.oTree,"last",!1)}(e=a.getFnMoveComplete())&&e.call(this,g,h);return!1},drop_check:function(e){var g=!1;if("undefined"==typeof e.r.attr("conect"))return g;if(e.o.get(0).myInstance.disable)return!1;var h=this.get_container().attr("name");e=e.r.attr("conect").split(",");for(var l=0;l<e.length;l++)if(e[l]==h){g=!0;break}return g}},c.crrm={move:{always_copy:a.getDuplicate(),check_move:function(e){var g=this.get_container(),h=e.o.parents("div.jstree"),
l=g.attr("name"),t=h.attr("name");h=!1;if(e.o.get(0).myInstance.disable)return!1;if(2==a.getTipoMove())if(h=this._get_parent(e.o))if(h=-1==h?this.get_container():h,h===e.np||h[0]&&e.np[0]&&h[0]===e.np[0])h=!0;else return!1;else return!1;else if(t==l)h=!0;else{if("undefined"==typeof g.attr("conect"))return!1;g=g.attr("conect").split(",");for(l=0;l<g.length;l++)if(g[l]==t){h=!0;break}}h&&(t=a.getFuncionCheckMove())&&($.isFunction(t)||(t=eval("("+t+");")),g=Componente.getInstanceFromDom(e.cr),(e=Componente.getInstanceFromDom(e.o))&&
(h=t.apply(a,[e,g])));return h}}});this.isCheckBox()&&(b.push("checkbox"),c.checkbox={two_state:"up+down"!=this.getSelecaoCascata(),cascade:this.getSelecaoCascata()});c.plugins=b;c.html_data={data:function(e,g){var h=this;if(a.ajax&&a.executaAjax){var l=a.getJanela();l&&l.bloqueiaJanela("Buscando Itens");var t={};a.ajax.parametros&&!$.isArray(a.ajax.parametros)&&$.each(a.ajax.parametros,function(u,w){t[u]=w});if(-1!=e){var x=e.attr("atributo");x&&(x=JSON.parse(x));t.nome=e.attr("name");t.atributo=
x;a.useSearch&&(t.pesquisa=a.oCampoSearch instanceof Campo?a.oCampoSearch.getValue():a.oCampoSearch.val())}loadAjax({rotina:a.ajax.rotina,acao:a.ajax.acao,processo:a.ajax.processo,parametro:t,chave:a.chave,completo:function(u){var w=[];$.each(u,function(){var q=ItemTree.instanceFromJson(this);-1==e?a.rootNode.addChildren(q,!1,!0,a):Componente.getInstanceFromDom(e).addChildren(q,!1,!0,a);w.push(q)});u=0<w.length?ItemTree.groupLista(w):!1;g.call(h,u);var y=function(q){var z=q.Parent.getDisabledFilhos(),
D=q.Parent.getDisabled(),A=null;"up+down"===a.getSelecaoCascata()&&(A=z&&!q.Parent.getPodeSelecionar()?!1:q.getPodeSelecionar());q.setDisabled(z&&D||q.getDisabled(),A,z||q.getDisabledFilhos());q.setIconeFA(q.iconeFA,q.getTree().getIconeModoExibicao());q.setIconeSVG(q.iconeSVG);q.hasChildren()&&q.children.forEach(y)};w.forEach(y);l&&l.desbloqueiaJanela()},exception:function(){g.call(h,!1);l&&l.desbloqueiaJanela()}})}else a.fnCarregarFilhos?-1==e?(a.fnCarregarFilhos(e,g.bind(this,a.rootNode.getListaFilho())),
$.each(a.rootNode.getChildren(),function(){var u=this.Parent.getDisabledFilhos(),w=this.Parent.getDisabled(),y=this.Parent.getPodeSelecionar();this.setDisabled(u&&w||this.getDisabled(),u&&y||this.getPodeSelecionar(),u||this.getDisabledFilhos());this.setIconeFA(this.iconeFA,this.getTree().getIconeModoExibicao());this.setIconeSVG(this.iconeSVG);0<this.getChildren().length&&this.trataFilhos()})):a.fnCarregarFilhos(Componente.getInstanceFromDom(e),g.bind(this,!1)):-1==e?(g.call(this,a.rootNode.getListaFilho()),
$.each(a.rootNode.getChildren(),function(){var u=this.Parent.getDisabledFilhos(),w=this.Parent.getDisabled(),y=this.Parent.getPodeSelecionar();this.setDisabled(u&&w||this.getDisabled(),u&&y||this.getPodeSelecionar(),u||this.getDisabledFilhos());this.setIconeFA(this.iconeFA,this.getTree().getIconeModoExibicao());this.setIconeSVG(this.iconeSVG);0<this.getChildren().length&&this.trataFilhos()})):g.call(this,!1)}};c.types={types:{"default":{max_depth:a.getLimitNivel(),max_children:-1,hover_node:!1,move_node:!0,
select_node:!1}}};if(this.selectableTipo){b=$.isArray(this.selectableTipo)?this.selectableTipo:[this.selectableTipo];for(var k=0;k<b.length;k++){var d=b[k],f=c.types.types;f[d]||(f[d]={});d=f[d];d.hover_node=!0;d.select_node=!0}}if(this.draggableType)for(b=$.isArray(this.draggableType)?this.draggableType:[this.draggableType],k=0;k<b.length;k++)d=b[k],f=c.types.types,f[d]||(f[d]={}),d=f[d],d.move_node=!1;return c};this.setFnCarregarFilhos=function(a){this.fnCarregarFilhos=a};this.setChave=function(a){this.chave=
a};this.keepOnClose=function(){this.keepOnClose=!0};this.criaTree=function(){var a=this,b=this,c=this.getConfigTree();this.rootNode.appendTo(this.oTree);this.oTree.addClass(ControleElementosSistema.getSeletorElemento("height_auto")+" jstree jstree-default jstree-drop border_default_no_top");this.oTree.css({"min-width":"50px","min-height":"50px"});this.oTree.attr("name",this.getNome());this.adicionaClasseModoExibicao();var k=this.getJanela();if(k&&k.onDestroyJanela&&!this.keepOnClose)k.onDestroyJanela(function(){this.oTree.jstree("destroy")}.bind(this));
this.oTree.jstree(c).on("move_node.jstree",function(d,f){var e=f.rslt;d=e.o;var g=e.np;if(g.is("a")||g.is("div"))g=g.parent();e=Componente.getInstanceFromDom(d);b.getMoveUnicoItem()&&(e.children=[],$("ul",f.args[0].oc).empty());var h=!1;if(b.getDuplicate()&&"multitree"!=b.getDuplicate()||"multitree"==b.getDuplicate()&&f.rslt.ot.get_index()!=f.rslt.rt.get_index())h=ItemTree.instanceFromObj(d),h.obj=$(f.args[0].oc),$(f.args[0].oc).get(0).myInstance=h;f=Componente.getInstanceFromDom(g);f instanceof Tree&&
(f=f.rootNode,h&&h.setParent(f));h?(h.moveTo(f),h.isAjax()&&h.openNode()):(e.moveTo(f),e.isAjax()&&b.iniciaAberto?e.openNode():e.isLoaded()||e.loadNode())}).on("check_node.jstree",function(d,f){b.oTree.jstree("is_leaf",f.rslt.obj)||f.inst._is_loaded(f.rslt.obj)||b.oTree.jstree("load_node",f.rslt.obj,function(){});d=b.getFunctionSelectCheckBox();"function"==typeof d?d.call():d&&(d=eval("("+d+")"),d.params.push(f.rslt.obj.get(0).myInstance),d.fn.apply(b,d.params))}).on("uncheck_node.jstree",function(d,
f){d=b.getFunctionSelectCheckBox();"function"==typeof d?d.call():d&&(d=eval("("+d+")"),d.params.push(f.rslt.obj.get(0).myInstance),d.fn.apply(b,d.params))}).on("loaded.jstree refresh.jstree",function(d,f){function e(g){ControleBaseSistema.isLayoutV3()&&(g.montaIndicadorAbrirFechar(),g.infereIcone());g.aplicaHint();g.aplicaPalavrasChave();if(b.getClicarAbreRegistros())g.obj.children(".jstree-link").on("click",function(){g.obj.children(".jstree-icon").trigger("click.jstree")}.bind(this));g.getChildren()&&
g.getChildren().length&&g.getChildren().forEach(e)}b.rootNode.getChildren()&&b.rootNode.getChildren().length&&b.rootNode.getChildren().forEach(e);b.oTree.jstree&&(b.iniciaAberto?b.visualizacao&&b.isCheckBox()&&b.openAll():b.closeAll(),b.visualizacao?b.oTree.jstree("lock"):b.oTree.jstree("unlock"))}).on("toggle_node.jstree",function(d,f){ControleBaseSistema.isLayoutV3()&&a.getModoExibicao()==Tree.MODO_EXIBICAO_PADRAO&&(d=ItemTree.instanceFromObj(f.rslt.obj,!1))&&(f=d.iconeFA||d.iconeSVG,d.getTipo()!=
ItemTree.TIPO_DEFAULT||f||d.setIconeFA(IpmIcone.FA(d.isOpen?118:117)))}).on("search.jstree",function(d,f){if(ControleBaseSistema.isLayoutV3()){d=a.oTree;var e=d.find(".empty-state");0==f.rslt.nodes.length?0==e.length&&criaEmptyState({container:d,titulo:"Opss",descricao:"Nenhum resultado encontrado.",icone:3}):e.detach()}}).on("clear_search.jstree",function(){ControleBaseSistema.isLayoutV3()&&a.oTree.find(".empty-state").detach()});b.selectable&&(this.oTree.on("select_node.jstree",function(d,f){if((d=
defaultVal(b.getSelecionado(),!1))&&!d.getPodeSelecionar())return b.oTree.jstree("deselect_node",b.getSelecionado().obj),!1;(d=b.getFnSelect())&&d.call(this,f.rslt.e,f)}),this.oTree.on("deselect_node.jstree",function(d,f){var e=b.getFnDeselect();e&&e.call(this,d,f)}));if(b.isDraggable())this.oTree.on("load_node.jstree",function(d,f){b.fnLoadNodeTree&&b.fnLoadNodeTree.apply(b,[d,f])});else this.oTree.on("load_node.jstree",function(d,f){var e=f.inst,g=e._get_node(f.rslt.obj);-1===g&&(g=e.get_container_ul());
0!=g.length&&(g.find("li").each(function(){$(this).on("dragstart",function(h){var l=$(h.currentTarget),t="";l[0].myInstance&&l[0].myInstance.getTree()&&(t=l[0].myInstance.getTree().nome);var x={text:h.originalEvent.dataTransfer.getData("text"),idItemTree:l.attr("data-id"),tipoItemTree:l.attr("rel"),tituloItemTree:l.attr("titulo"),treeOrigem:t};b.currentTreeDragData=x;if(Modernizr.edge)return h.originalEvent.dataTransfer.setData("text",JSON.stringify(x)),h.stopPropagation(),!0;h.originalEvent.dataTransfer.setData("text",
l.attr("titulo"));h.originalEvent.dataTransfer.setData("idItemTree",l.attr("data-id"));h.originalEvent.dataTransfer.setData("tipoItemTree",l.attr("rel"));h.originalEvent.dataTransfer.setData("tituloItemTree",l.attr("titulo"));h.originalEvent.dataTransfer.setData("treeOrigem",t);h.stopPropagation()})}),b.fnLoadNodeTree&&b.fnLoadNodeTree.apply(b,[d,f]))});0===$(".tree_opcoes_check",this.obj).length&&(this.isCheckBox()&&this.criaOpcoesCheck(),this.montaOpcoesSelecaoPadrao&&!this.isCheckBox()&&this.criaOpcoesPadrao(),
this.getExibeAbrirFechar()&&(0<this.getLimitNivel()||-1===this.getLimitNivel())&&this.criaOpcoesCollapse());this.useSearch&&!this.oCampoSearch&&this.criaSearch();if(ControleBaseSistema.isLayoutV3())this.onLoadNodeTree(function(){a.oTree.find("ins").text("")})};this.setAlvoDragHtml=function(a,b,c,k){b=new Tree.EventoDroppable(b,c,k);this.setAlvoDragHtmlEvento(a,b)};this.setAlvoDragHtmlEvento=function(a,b){var c=this;a instanceof CampoForm&&(a=a.getCampo());a instanceof Componente&&(a=a.obj);b.nomeTree=
this.nome;$(a).on("dragover",function(k){k.stopPropagation();return b.fireOver(c,k)?(k.preventDefault(),!1):!0});$(a).on("drop",function(k){b.fireDrop(c,k);k.preventDefault()})};this.setAjax=function(a){this.ajax=a};this.getDataObjectChild=function(a){var b=this,c=$(a),k=[];a={nome:c.attr("name"),titulo:c.attr("titulo"),filhos:k,open:this.oTree.jstree("is_open",c)?!0:!1,selecionado:!1,atributos:{}};if(Modernizr.ie)this.checkbox?a.selecionado=c.is(".jstree-checked"):this.selectable&&0<$("a.jstree-clicked",
c).length&&(a.selecionado=!0);else{var d=Componente.getInstanceFromDom(c);a.selecionado=d?d.isSelecionado():!1}(d=c.attr("atributo"))&&(a.atributos=JSON.parse(d));c=this.getItemInsideLista($(">ul",c));$.each(c,function(){k.push(b.getDataObjectChild(this))});return a};this.setPodeLimpar=function(a){this.podeLimpar=a};this.getPodeLimpar=function(){return this.podeLimpar};this.limpa=function(){this.getPodeLimpar()&&(this.resetFilhos(),this.emptyUl())};this.isLoaded=function(){return this.oTree&&this.oTree.jstree("get_container")&&
0<this.oTree.jstree("get_container").children("ul").length};this.emptyUl=function(){this.oTree.jstree("get_container").children("ul").empty()};this.forceFocus=function(){};this.refresh=function(){this.oTree.jstree("refresh")};this.deselecionaTodos=function(){this.isCheckBox()?this.oTree.jstree("uncheck_all"):this.oTree.jstree("deselect_all")};this.selecionaTodos=function(){var a=this,b=a.oTree.jstree("get_unchecked");$.each(b,function(){a.oTree.jstree("check_node",this)})};this.getSelecionado=function(){var a=
this.oTree.jstree("get_selected",this.oTree),b=!1;0<a.length&&(b=Componente.getInstanceFromDom(a),null==b&&(b=ItemTree.instanceFromObj(a)));return b};this.getSelecionados=function(){var a=[],b=[];this.selectable?b=this.oTree.jstree("get_selected",this.oTree):this.checkbox&&(b=this.oTree.jstree("get_checked"));$.each(b,function(){var c=Componente.getInstanceFromDom(this);null==c&&(c=ItemTree.instanceFromObj(this));null===c||c.isSelecionado&&!c.isSelecionado()||a.push(c)});return a};this.valida=function(){if(this.obrigatorio&&
(this.selectable||this.checkbox)&&0==this.getSelecionados().length)throw new Message.mensagemErro("EST-000105",null,{nomeDoCampo:this.getTitulo()});return!0};this.getValores=function(){var a=[],b=this,c=this.visualizacao,k=this.oTree.jstree("is_locked");c&&this.setDisabled(!1);k&&this.oTree.jstree("unlock");$.each(this.getItemInsideLista(this.oTree.jstree("get_container_ul")),function(){a.push(b.getDataObjectChild(this))});c&&this.setDisabled(!0);k&&this.oTree.jstree("lock");return a};this.getItemInsideLista=
function(a){return $(">li",a)};this.resetFilhos=function(){this.rootNode.children=[]};this.atualizaConteudo=function(){0<this.rootNode.children.length?(this.emptyUl(),this.criaTree(),this.visualizacao&&setTimeout(function(){this.oTree.jstree("lock")},10)):this.emptyUl()};this.collapseContent=function(a){if(this.getMinimizavel()){var b=300;a||(b=0);a=this.oTree;a.is(":visible")?(a.hide(b),this.oBtnCollapse.alteraClass("seta_abaixo")):(a.show(b),this.oBtnCollapse.alteraClass("seta_acima"))}};this.openAll=
function(){var a=function(b,c){if(0<c)if(b.isLoaded()){if(b.isLeaf())return;b.openNode()}else b.loadNode(function(){b.openNode()});if(c<this.nivelAberto)for(var k in b.children)a(b.children[k],c+1)}.bind(this);this.nivelAberto++;a(this.getRootNode(),0)};this.closeAll=function(){this.nivelAberto=0;this.oTree.jstree("close_all")};this.iniciaDraw=function(){this.criaObjeto("div");this.obj.addClass("estrutura_tree");ControleBaseSistema.isLayoutV3()&&this.obj.addClass("componente-tree");this.obj.addClass(ControleElementosSistema.getSeletorElemento("auto_adaptable"));
this.obj.css({position:"relative"});this.oTitulo=$("<div>");var a=$("<span>").addClass("estrutura_titulo_tree");this.oTitulo.addClass("border_default fundo_titulo_degrade titulo_descricao_consulta titulo_tree disabled_user_select");this.oTitulo.append(a);a.html(this.getTitulo());ControleBaseSistema.layoutSistemaNovo||(a.css("display","block"),a.css("float","left"));a.appendTo(this.oTitulo);this.obj.append(this.oTitulo);this.oTree=$("<div>");this.obj.append(this.oTree);em_branco(this.getHint())||this.criaHint();
this.getMinimizavel()&&this.criaCollapse();this.oAreaExclusao=!1};this.getContainerTitulo=function(){return $(".titulo_descricao_consulta",this.obj)};this.getAreaExclusao=function(){if(!this.oAreaExclusao){this.oAreaExclusao=$(document.createElement("div"));this.oAreaExclusao.addClass("tree_area_exclusao");this.oAreaExclusao.text("Arraste o ítem nessa área para remover da lista");this.oAreaExclusao.attr("conect",this.getNome());this.oAreaExclusao.attr("lixo","lixo_"+this.getNome());this.oAreaExclusao.addClass("jstree-drop");
this.oAreaExclusao.hide();var a=$("<span>").appendTo(this.oAreaExclusao);IpmIcone.FA(20).carregaObjeto(a);this.obj.append(this.oAreaExclusao)}return this.oAreaExclusao};this.getAreaInclusao=function(){if(!this.oAreaInclusao){this.oAreaInclusao=$(document.createElement("div"));this.oAreaInclusao.addClass("tree_area_inclusao");this.oAreaInclusao.text("Arraste o ítem nessa área adicionar na lista");this.oAreaInclusao.attr("data-add",this.oTree.attr("conect"));this.oAreaInclusao.attr("conect",this.oTree.attr("conect"));
this.oAreaInclusao.data("tree-destino",this);this.oAreaInclusao.addClass("jstree-drop");this.oAreaInclusao.hide();var a=$("<span>").appendTo(this.oAreaInclusao);IpmIcone.FA(81).carregaObjeto(a);this.obj.append(this.oAreaInclusao)}return this.oAreaInclusao};this.atualizaEstadoAreaExclusao=function(a){a?(this.getAreaExclusao().show(),this.getAreaExclusao().parent().css("overflow","hidden"),this.getAreaExclusao().addClass("tree_area_interacao_visisvel")):(this.getAreaExclusao().removeClass("tree_area_interacao_visisvel"),
setTimeout(function(){this.getAreaExclusao().hide();this.getAreaExclusao().parent().css("overflow","")}.bind(this),250))};this.atualizaEstadoAreaInclusao=function(a){var b=this.getTreeConectada();a?b.forEach(function(c){c.getAreaInclusao().show();c.getAreaInclusao().parent().css("overflow","hidden");c.getAreaInclusao().addClass("tree_area_interacao_visisvel")}):(b=this.getTreeConectada(),b.forEach(function(c){c.getAreaInclusao().removeClass("tree_area_interacao_visisvel");setTimeout(function(){c.getAreaInclusao().hide();
c.getAreaInclusao().parent().css("overflow","")},250)}))};this.getTreeConectada=function(){return Array.from(new Set($("[conect="+this.getNome()+"]").toArray().map(function(a){return a.parentElement.myInstance})))};this.criaHint=function(){this.oBtnHint&&(this.oBtnHint.obj.remove(),this.oBtnHint=null);var a=$(".fundo_titulo_degrade",this.obj);this.oBtnHint=new BotaoEstrutura("info_small",!1,!0);this.oBtnHint.obj.addClass("botao_hint");ControleBaseSistema.layoutSistemaNovo||this.oBtnHint.setCss({display:"block",
margin:"4px",float:"left"});includeJavaScript("js_tooltip.js",function(){this.oBtnHint.obj.IpmHint(this.getHint())},this);this.oBtnHint.appendTo(a)};this.getObjTitulo=function(){return $(".fundo_titulo_degrade",this.obj)};this.criaCollapse=function(){this.oBtnCollapse&&(this.oBtnCollapse.obj.remove(),this.oBtnCollapse=null);var a=this.getObjTitulo();this.oTree.hide();this.oBtnCollapse=new BotaoEstrutura("seta_abaixo",this.collapseContent.bind(this));ControleBaseSistema.layoutSistemaNovo||this.oBtnCollapse.setCss({marginTop:"5px",
marginLeft:"3px",marginRight:"3px","float":"right"});this.oBtnCollapse.appendTo(a)};this.criaOpcoesCheck=function(){var a=this,b=$("<div>");b.addClass("border_default_no_top tree_opcoes_check");var c=new BotaoEstrutura(ControleBaseSistema.layoutSistemaNovo?"seleciona_todos":"favorito_rapido",function(){a.selecionaTodos()});c.setLabel("Todos");c.setEstiloExibicao(BotaoAcao.ESTILO_EXIBICAO_NORMAL);c.appendTo(b);this.criaBotaoNenhum(a,b);c=new BotaoEstrutura("refresh",function(){var k=a.oTree.jstree("get_checked"),
d=a.oTree.jstree("get_unchecked");$.each(k,function(){a.oTree.jstree("uncheck_node",this)});$.each(d,function(){a.oTree.jstree("check_node",this)})});c.setLabel("Inverte");c.setEstiloExibicao(BotaoAcao.ESTILO_EXIBICAO_NORMAL);c.appendTo(b);this.obj.children().eq(0).after(b)};this.criaOpcoesPadrao=function(){var a=$("<div>");a.addClass("border_default_no_top tree_opcoes_check");this.criaBotaoNenhum(this,a);this.obj.children().eq(0).after(a)};this.criaOpcoesCollapse=function(){var a=$(".tree_opcoes_check",
this.obj);0==a.length&&(a=$(document.createElement("div")),a.addClass("border_default_no_top tree_opcoes_check"),this.obj.children().eq(0).after(a));var b=new BotaoEstrutura("indica_esquerda",function(){this.closeAll()}.bind(this));b.setLabel("Fechar Todos");b.setEstiloExibicao(BotaoAcao.ESTILO_EXIBICAO_NORMAL);var c=new BotaoEstrutura("indica_abaixo",function(){this.openAll()}.bind(this));c.setLabel("Próx. Nível");c.setEstiloExibicao(BotaoAcao.ESTILO_EXIBICAO_NORMAL);b.appendTo(a);c.appendTo(a);
$(".div_botao_acao",a).each(function(){$(this).width($(this).width())});var k=function(){a.removeClass("tree_opcoes_check_overflow");a[0].offsetWidth<=a[0].scrollWidth?a.addClass("tree_opcoes_check_overflow"):a.removeClass("tree_opcoes_check_overflow")};if(this.getJanela()&&this.getJanela().getOptions()){var d=this.getJanela().getOptions().onResize;this.getJanela().getOptions().onResize=function(){d&&d.apply(this,arguments);k()}}k()};this.criaSearch=function(){var a=this,b=$("<div>").addClass("estrutura_tree_busca");
ControleBaseSistema.layoutSistemaNovo&&IpmIcone.buscaFA("search").criaObjeto().appendTo(b);a.oCampoSearch=new Campo("find_tree",!1,20,200);a.oCampoSearch.setPlaceHolder("Buscar...");a.oCampoSearch.setClass("campo_busca");var c=null,k="";a.visualizacao?a.oCampoSearch.setReadOnly(!0):(a.oCampoSearch.onKeyUp(function(){k=a.oCampoSearch.getValue().trim().replace(/\)/g,"");c&&clearTimeout(c);c=setTimeout(function(){a.oTree.jstree("search",k)},1E3)}),a.oCampoSearch.onKeyDown(function(d){13==d.keyCode&&
(c&&clearTimeout(c),a.oTree.jstree("search",k),a.oCampoSearch.focus(),d.preventDefault(),d.stopPropagation())}),a.oCampoSearch.onBlur(function(){c&&clearTimeout(c)}));a.oCampoSearch.appendTo(b);this.obj.children().eq(0).after(b)};this.criaBotaoNenhum=function(a,b){var c=new BotaoEstrutura(ControleBaseSistema.layoutSistemaNovo?"seleciona_nenhum":"favorito_rapido",function(){var k=["get_selected","deselect_node"];a.isCheckBox()&&(k=["get_checked","uncheck_node"]);var d=a.oTree.jstree(k[0]);$.each(d,
function(){a.oTree.jstree(k[1],this)});a.isCheckBox()||ControleBaseSistema.triggerAlvoPropagacao(null)},ControleBaseSistema.layoutSistemaNovo);c.setLabel("Nenhum");c.setEstiloExibicao(BotaoAcao.ESTILO_EXIBICAO_NORMAL);c.appendTo(b);ControleBaseSistema.layoutSistemaNovo||(c.divImagem=!1,c.setAtivo(!0))};this.onAfterAppend(function(a){a.isLoaded()||a.criaTree();a.setAppendComplete(!0)});this.setAppendComplete=function(a){this.appendComplete=a};this.getAppendComplete=function(){return this.appendComplete};
this.setObrigatorio=function(a){this.obrigatorio=a};this.setFuncionCheckMove=function(a){this.fnCheckMove=a};this.getFuncionCheckMove=function(){return this.fnCheckMove};this.getExibeAbrirFechar=function(){return this.exibeAbrirFechar};this.setExibeAbrirFechar=function(a){this.exibeAbrirFechar=a};this.getIniciaAberto=function(){return this.iniciaAberto};this.setIniciaAberto=function(a){this.iniciaAberto=a};this.getClicarAbreRegistros=function(){return this.clicarAbreRegistros};this.setClicarAbreRegistros=
function(a){this.clicarAbreRegistros=a};this.setFunctionSelectCheckBox=function(a){this.fnSelectCheckBox=a};this.getFunctionSelectCheckBox=function(){return this.fnSelectCheckBox};this.onSelect=function(a){this.fnSelect=a};this.onDeselect=function(a){this.fnDeselect=a};this.getFnSelect=function(){return this.fnSelect};this.getFnDeselect=function(){return this.fnDeselect};this.onMoveComplete=function(a){this.fnMoveComplete=a};this.getFnMoveComplete=function(){return this.fnMoveComplete};this.setDraggableType=
function(a){this.draggableType=a};this.getHint=function(){return this.hint};this.setMoveUnicoItem=function(a){this.moveUnicoItem=a};this.getMoveUnicoItem=function(){return this.moveUnicoItem};this.setHint=function(a){this.hint=a;em_branco(a)||this.criaHint()};this.getMinimizavel=function(){return this.minimizavel};this.setMinimizavel=function(a){(this.minimizavel=a)&&this.criaCollapse()};this.setUsaLixeira=function(a){this.usaLixeira=a};this.getUsaLixeira=function(){return this.usaLixeira};this.setExecutaAjax=
function(a){this.executaAjax=a};this.getExecutaAjax=function(){return this.executaAjax};this.setSelecaoCascataNenhum=function(){this.selecaoCascata=""};this.setSelecaoCascataAcima=function(){this.selecaoCascata="up"};this.setSelecaoCascataAbaixo=function(){this.selecaoCascata="down"};this.setSelecaoCascataNormal=function(){this.selecaoCascata="up+down"};this.setSelecaoCascata=function(a){this.selecaoCascata=a};this.getSelecaoCascata=function(){return this.selecaoCascata};this.onDragStart=function(a){this.fnDragStart.push(a)};
this.setFnDragStart=function(a){this.fnDragStart=a};this.onDragStop=function(a){this.fnDragStop.push(a)};this.setFnDragStop=function(a){this.fnDragStop=a};this.onLoadNodeTree=function(a){this.fnLoadNodeTree=a};this.setModoExibicao=function(a){this.modoExibicao=a};this.getModoExibicao=function(){return this.modoExibicao};this.adicionaClasseModoExibicao=function(){if(ControleBaseSistema.isLayoutV3())switch(this.getModoExibicao()){case Tree.MODO_EXIBICAO_PASTAS:this.obj.addClass("tree-modo-exibicao-pasta");
this.oTree.addClass("tree-modo-exibicao-pasta");break;case Tree.MODO_EXIBICAO_MENUS:this.obj.addClass("tree-modo-exibicao-menu");this.oTree.addClass("tree-modo-exibicao-menu");break;default:this.obj.addClass("tree-modo-exibicao-padrao"),this.oTree.addClass("tree-modo-exibicao-padrao")}else switch(this.getModoExibicao()){case Tree.MODO_EXIBICAO_PASTAS:this.obj.addClass("estrutura_tree_exibicao_pastas");break;case Tree.MODO_EXIBICAO_MENUS:this.obj.addClass("estrutura_tree_exibicao_menus")}};this.getIconeModoExibicao=
function(){if(ControleBaseSistema.isLayoutV3())switch(this.getModoExibicao()){case Tree.MODO_EXIBICAO_PASTAS:return IpmIcone.buscaFA("folder");case Tree.MODO_EXIBICAO_MENUS:return IpmIcone.buscaFA("navicon",IpmIcone.ESTILO_FONT_AWESOME_SOLID);default:return IpmIcone.buscaFA("navicon",IpmIcone.ESTILO_FONT_AWESOME_SOLID)}switch(this.getModoExibicao()){case Tree.MODO_EXIBICAO_PASTAS:return IpmIcone.buscaFA("folder");case Tree.MODO_EXIBICAO_MENUS:return IpmIcone.buscaFA("navicon",IpmIcone.ESTILO_FONT_AWESOME_SOLID)}};
this.fnMoveComplete=this.tipoMove=this.fnDeselect=this.fnSelect=null;this.chave=this.selectable=this.useSearch=!1;this.executaAjax=!0;this.minimizavel=this.clicarAbreRegistros=!1;this.draggableType=this.selectableTipo=null;this.selecaoCascata="up+down";this.exibeAbrirFechar=!1;this.fnCarregarFilhos=this.oBtnHint=null;this.mostraTitulo=!0;this.modoExibicao=Tree.MODO_EXIBICAO_PADRAO;this.fnLoadNodeTree=null;this.montaOpcoesSelecaoPadrao=C||!1;this.fnDragStart=[];this.fnDragStop=[];this.setLimitNivel(p||
-1);this.setTitulo(m);this.draggable=n||!1;this.checkbox=r||!1;this.fnCheckMove=this.appendComplete=this.obrigatorio=!1;this.nome=v;this.hint="";this.rootNode=new ItemTree("__root_node","Root");this.rootNode.setParent(this);this.nivelAberto=1;this.iniciaDraw()};Tree.prototype=new Componente;Tree.MODO_EXIBICAO_PADRAO="padrao";Tree.MODO_EXIBICAO_PASTAS="pastas";Tree.MODO_EXIBICAO_MENUS="menus";
(function(){Tree.EventoDroppable=function(m,r,n,p){m&&"string"==typeof m&&(m=eval("("+m+")"));this.fnOver=m;r&&"string"==typeof r&&(r=eval("("+r+")"));this.fnDrop=r;this.ignoraOutros=n;this.nomeTree=null;this.onDrop=p};var v=Tree.EventoDroppable;v.ON_DROP_IGNORA=1;v.ON_DROP_REMOVE=2;v.ON_DROP_DESATIVA=3;v.prototype.parseData=function(m,r){var n={};m=m.originalEvent||m;var p={};Modernizr.edge?(m=m.dataTransfer.getData("text"))&&(p=JSON.parse(m)):(p.treeOrigem=m.dataTransfer.getData("treeOrigem"),p.tituloItemTree=
m.dataTransfer.getData("tituloItemTree"),p.idItemTree=m.dataTransfer.getData("idItemTree"),p.tipoItemTree=m.dataTransfer.getData("tipoItemTree"));!p.id&&r&&r.currentTreeDragData&&(p=r.currentTreeDragData);n.origem=p.treeOrigem;n.conteudo=p.tituloItemTree;n.id=p.idItemTree;n.tipo=p.tipoItemTree;return n};v.prototype.fireDrop=function(m,r){var n=this.parseData(r,m),p=m.findComponente(n.id);m=function(){switch(this.onDrop){case v.ON_DROP_REMOVE:p.Parent.removeChild(p);break;case v.ON_DROP_DESATIVA:p.setDisabled(!0),
p.setPodeSelecionar(!1)}}.bind(this);if(!this.fnDrop)return m(),!0;this.ignoraOutros&&n.origem!=this.nomeTree||(this.fnDrop.apply(p,[r,n.tipo,n.id,n.conteudo,n.origem]),m())};v.prototype.fireOver=function(m,r){if(!this.fnOver)return!0;var n=this.parseData(r,m);m=m.findComponente(n.id);return this.ignoraOutros&&n.origem!=this.nomeTree?!1:this.fnOver.apply(m,[r,n.tipo,n.id,n.conteudo,n.origem])}})();;/*</editor-fold desc="js_tree.js">*/
/*<editor-fold desc="js_tree_item.js">*//*
 {ipm "async": false, "bundle": "componentes"}
*/
var ItemTree=function(c,e,k,l,n,m){this.addChildren=function(a,b,d,f,g){b=defaultVal(b,!1);d=defaultVal(d,!1);f=defaultVal(f,!1);g=defaultVal(g,!1);a.setParent(this);!0!==f&&this.children.push(a);b||"__root_node"==this.getNome()||(b=this.getNome());try{var h=this.getTree();if(h&&!d&&h.getAppendComplete()){d="last";!1!==b&&(g||(d="first"),b='[data-id="'+b.replace(/"/g,'\\"')+'"]');var p=h.oTree.jstree("create",b,d,a.asJson(),function(){$.each(a.getChildren(),function(){a.addChildren(this,!1,!1,!0)})},
!0);p.get(0).myInstance=a;a.isOpen||h.oTree.jstree("close_node",'[data-id="'+a.getNome().replace(/"/g,'\\"')+'"]',!0);a.obj=p}}catch(q){__bDesenvolvimento&&console.error(q)}};this.getTitle=function(){return this.titulo};this.isLeaf=function(){return 0==this.children.length&&"__root_node"!=this.nome};this.getFolhas=function(a){a=defaultVal(a,[]);this.isLeaf()?a.push(this):$.each(this.children,function(){a=this.getFolhas(a)});return a};this.getFilhos=function(){return this.children};this.hasChildren=
function(){return 0<this.children.length};this.getListaFilho=function(){this.ListaFilho||(this.ListaFilho=$("<ul>"),this.obj.append(this.ListaFilho));return this.ListaFilho};this.findComponente=function(a){var b=!1;if(this.nome==a)return this;for(var d=0;d<this.children.length;d++){var f=this.children[d];if(f.findComponente&&(b=f.findComponente(a)))break}return b};this.setSelecionado=function(a){this.selecionado=defaultVal(a,!0);a=this.obj;var b=this.getTree();b.checkbox?this.selecionado?b.oTree.jstree("check_node",
a):b.oTree.jstree("uncheck_node",a):b.selectable&&this.getPodeSelecionar()&&(this.selecionado?b.oTree.jstree("select_node",a):b.oTree.jstree("deselect_node",a))};this.setReadOnly=function(a){(this.readOnly=defaultVal(a,!0))?this.selecionado?this.obj.addClass("jstree-readonly-checked"):this.obj.addClass("jstree-readonly-unchecked"):(this.obj.removeClass("jstree-readonly-checked"),this.obj.removeClass("jstree-readonly-unchecked"))};this.getPodeSelecionar=function(){return this.bPodeSelecionar};this.setPodeSelecionar=
function(a){a||this.obj.hasClass("jstree-no-checkboxes")||this.obj.addClass("jstree-no-checkboxes");a&&this.obj.hasClass("jstree-no-checkboxes")&&this.obj.removeClass("jstree-no-checkboxes");this.bPodeSelecionar=a;(a=this.getTree())&&a.oTree&&a.oTree.jstree("clean_node",this.obj)};this.atualizaSelecionavel=function(a){!a||this.getTipo()&&-1!=$.inArray(this.getTipo(),a)||this.setPodeSelecionar(!1);$.each(this.getChildren(),function(){this instanceof ItemTree&&this.atualizaSelecionavel(a)})};this.onAppendTo(function(a){for(var b=
a.getListaFilho(),d=0;d<a.children.length;d++)a.children[d].appendTo(b)});this.onAfterAppend(function(a){if(a.getTree()){var b=a.getTree();b.checkbox?a.bPodeSelecionar?a.selecionado&&a.obj.addClass("jstree-checked"):a.obj.addClass("jstree-no-checkboxes"):b.selectable&&a.selecionado&&setTimeout(function(){b.oTree.jstree("select_node",a.obj)})}});this.setParent=function(a){this.Parent=a};this.moveTo=function(a){this.Parent&&this.Parent.remove(this);a.addChildren(this,!1,!0)};this.remove=function(a){for(var b=
0;b<this.children.length;b++)this.children[b]===a&&this.children.splice(b,1)};this.removeNode=function(){this.Parent?this.Parent.removeChild(this):this.getTree().oTree.jstree("delete_node",this.obj)};this.removeChild=function(a){var b=this.children.indexOf(a);-1<b&&(this.children.splice(b,1),a.Parent=null,(b=this.getTree())&&b.oTree.jstree("delete_node",a.obj))};this.getAtributos=function(){var a=null,b=this.getAtributo("atributo");b&&(a=JSON.parse(b));return a};this.getTree=function(){for(var a=
this,b=[];a.Parent;){var d=a.nome;if(b.includes(d))return Message.alerta("EST-000948"),!1;b.push(d);a=a.Parent}return a instanceof Tree?a:!1};this.isLoaded=function(){return this.getTree().oTree.jstree("is_loaded",this.obj)};this.loadNode=function(a){a=a?a:function(){};this.getTree().oTree.jstree("load_node",this.obj,a)};this.openNode=function(){var a=this.getTree();a.ajax&&(this.obj.removeClass("jstree-leaf"),this.obj.addClass("jstree-closed"),a.oTree.jstree("close_node",this.obj));a.oTree.jstree("open_node",
this.obj)};this.isSelecionado=function(){var a=this.getTree();return a.checkbox?!0===a.oTree.jstree("is_checked",this.obj)&&!$(this.obj).hasClass("jstree-no-checkboxes"):a.selectable?a.visualizacao?0<$(">a.jstree-clicked",this.obj).length:!0===a.oTree.jstree("is_selected",this.obj):!1};this.isAjax=function(){var a=this.getTree();if(a)return a.ajax};this.getHint=function(){return this.hint};this.setHint=function(a){this.hint=a};this.aplicaHint=function(){var a=this;if(!em_branco(this.getHint())){var b=
$("a",this.obj).first();includeJavaScript("js_tooltip.js",function(){b.IpmHint(a.getHint())})}this.hasChildren()&&$.each(this.getChildren(),function(){this.aplicaHint()})};this.setStyle=function(a,b){var d=$("a",this.obj);"object"==typeof a?d.css(a):d.css(a,b)};this.getTitulo=function(){return this.titulo};this.setTitulo=function(a){this.titulo=a;this.obj.attr("titulo",a);this.getTree().oTree.jstree("rename_node",this.obj,a)};this.setTitle=function(a){var b=$("a",this.obj).eq(0);includeJavaScript("js_tooltip.js",
function(){b.IpmHint(a)})};this.getPalavrasChave=function(){return this.palavrasChave};this.setPalavrasChave=function(a){Array.isArray(a)?this.palavrasChave=a.join(","):this.palavrasChave=a};this.aplicaPalavrasChave=function(){if(!emBranco(this.palavrasChave)){var a=$(">a",this.obj).first();a&&a.attr("data-palavra-chave",this.palavrasChave)}};this.setAtributo=function(a){this.obj.attr("atributo",JSON.stringify(a))};this.setValorAtributo=function(a,b){var d=this.getAtributos()||{};d[a]=b;this.setAtributo(d)};
this.getTipo=function(){return this.obj.attr("rel")};this.getNome=function(){return this.nome};this.getChildren=function(){return this.children};this.getClassOpen=function(){return!0===this.isOpen?"jstree-open":!1===this.isOpen?"jstree-closed":""};this.refresh=function(){this.getTree().oTree.jstree("refresh",this.getObj())};this.asJson=function(){var a={};a.name=this.getObj().attr("name");a.attr={"data-id":this.getObj().attr("data-id"),name:this.getObj().attr("name"),"class":this.getClassOpen(),atributo:this.getAtributo("atributo"),
titulo:this.titulo,rel:this.getObj().attr("rel")};a.title=this.getTitle();a.data=this.titulo;a.rel=this.getObj().attr("rel");a.state="";return a};this.focus=function(){$("a",this.getObj()).eq(0).trigger("focus")};this.setDisabled=function(a,b,d){var f=$("a",this.obj).eq(0),g=$(".jstree-icon",f).eq(0),h=this.getTree()&&this.getTree().getModoExibicao()==Tree.MODO_EXIBICAO_PASTAS;a?(f.css({color:"#c2c2c2",cursor:"default"}),h?f.css("opacity","0.6"):g.css("opacity","0.5")):(f.css({color:"",cursor:"auto"}),
g.css("opacity",""));this.disable=a;this.disableFilhos=d;null!==b&&this.setPodeSelecionar(this.isAjax()?defaultVal(b,!1)||!1===a:this.getPodeSelecionar());d&&$.each(this.getChildren(),function(){this.setDisabled(a,b,d)})};this.getDisabled=function(){return this.disable};this.getDisabledFilhos=function(){return this.disableFilhos};this.setIconeFA=function(a,b){a||this.iconeSVG||!b||(a=b);this.iconeFA=a;a=$("a",this.obj).eq(0);var d=$(".jstree-icon",a).eq(0);$(".ipm-icone",a).eq(0).detach();this.iconeFA?
(d.hide(),d.after((this.iconeFA instanceof IpmIcone.IconeFontAwesome?this.iconeFA:IpmIcone.fromObjetoFA(this.iconeFA)).criaObjeto())):d.show();ControleBaseSistema.isLayoutV3()&&b&&(b=this.obj.children(".jstree-icon").addClass("icone_chevron"),b.empty(),IpmIcone.buscaFA("caret-right").criaObjeto().appendTo(b))};this.setIconeSVG=function(a){if(a){this.iconeSVG=a;var b=$("a",this.obj).eq(0),d=$(".jstree-icon",b).eq(0);$(".ipm-icone-svg",b).eq(0).detach();this.iconeSVG&&(d.hide(),a=IpmIcone.fromObjetoSVG(a),
d.after(a.criaObjeto()))}};this.trataFilhos=function(){$.each(this.getChildren(),function(){this.setIconeFA(this.iconeFA);this.setIconeSVG(this.iconeSVG);0<this.getChildren().length&&this.trataFilhos()})};this.montaIndicadorAbrirFechar=function(){var a=this.obj.children(".jstree-icon").addClass("icone_chevron");a.empty();IpmIcone.buscaFA("caret-right").criaObjeto().appendTo(a)};this.infereIcone=function(){if(ControleBaseSistema.isLayoutV3()){var a=this.getTree().getModoExibicao();if(a!=Tree.MODO_EXIBICAO_PADRAO){var b=
{};this.setIconeFA((b[Tree.MODO_EXIBICAO_PASTAS]=IpmIcone.buscaFA("folder"),b[Tree.MODO_EXIBICAO_MENUS]=IpmIcone.buscaFA("navicon",IpmIcone.ESTILO_FONT_AWESOME_SOLID),b)[a])}else if(!this.iconeFA&&!this.iconeSVG)switch(this.getTipo()){case ItemTree.TIPO_ROOT:return this.setIconeFA(IpmIcone.FA(354));case ItemTree.TIPO_CHILD:return this.setIconeFA(IpmIcone.FA(314));case ItemTree.TIPO_DEFAULT:return this.setIconeFA(IpmIcone.FA(117));case ItemTree.TIPO_PARALISADO:return this.setIconeFA(IpmIcone.FA(73));
case ItemTree.TIPO_ENCERRADO:return this.setIconeFA(IpmIcone.FA(34));case ItemTree.TIPO_CANCELADO:return this.setIconeFA(IpmIcone.FA(83));case ItemTree.TIPO_CAMPO_ANO:return this.setIconeFA(IpmIcone.FA(738));case ItemTree.TIPO_CAMPO_BOOLEANO:return this.setIconeFA(IpmIcone.FA(770));case ItemTree.TIPO_CAMPO_DATA:return this.setIconeFA(IpmIcone.FA(737));case ItemTree.TIPO_CAMPO_LISTA:return this.setIconeFA(IpmIcone.FA(179));case ItemTree.TIPO_CAMPO_NUMERICO:return this.setIconeFA(IpmIcone.FA(1651));
case ItemTree.TIPO_CAMPO_TEXTO:return this.setIconeFA(IpmIcone.FA(47));case ItemTree.TIPO_IPM:return this.setIconeSVG(IpmIcone.SVG(IpmIcone.IconeSvg.ORIGEM_SVG_ICONES_SISTEMA,"documento-ipm"))}}};this.atributos=this.ListaFilho=this.Parent=null;this.hint="";this.readOnly=this.selecionado=!1;this.bPodeSelecionar=!0;this.children=[];this.nome=c;this.isOpen=k;this.titulo=e;this.disable=defaultVal(n,!1);this.disableFilhos=defaultVal(m,!1);this.palavrasChave=this.iconeSVG=this.iconeFA=null;this.criaObjeto("li");
this.obj.addClass(this.getClassOpen());this.obj.html('<a href="#" class="jstree-link">'+e+"</a>");this.obj.attr("name",c);this.obj.attr("data-id",c);this.obj.attr("titulo",this.titulo);this.obj.attr("rel",defaultVal(l,"default"))};ItemTree.prototype=new Componente;
ItemTree.instanceFromObj=function(c,e){if(void 0!==e&&!e)return e=c.get(0).myInstance,e.isOpen=c.hasClass("jstree-open"),e;e=c.attr("name");var k=c.attr("titulo"),l="",n=c.attr("rel"),m=c.attr("title"),a=c.attr("atributo");ControleBaseSistema.isLayoutV3()&&(l=c.hasClass("jstree-open"));if(!e||!k)return null;var b=new ItemTree(e,k,l,n);$(">li",c,function(){b.addChildren(ItemTree.instanceFromObj(this))});a&&b.setAtributo(a);m&&b.setTitle(m);return b};
ItemTree.instanceFromJson=function(c){var e=new ItemTree(c.name,c.data,c.state,c.tipo,c.disable,c.disableFilhos);jQuery.each(c.filhos,function(){e.addChildren(ItemTree.instanceFromJson(this))});c.selecionado&&e.setSelecionado(!0);c.atributo&&e.setAtributo(c.atributo);c.rel&&e.obj.attr("rel",c.rel);c.title&&e.setTitle(c.title);c.style&&e.setStyle(c.style);c.iconeFA&&e.setIconeFA(c.iconeFA);c.iconeSVG&&e.setIconeSVG(c.iconeSVG);"undefined"!=typeof c.podeSelecionar&&e.setPodeSelecionar(c.podeSelecionar);
c.palavrasChave&&e.setPalavrasChave(c.palavrasChave);return e};ItemTree.groupLista=function(c){var e=$(document.createElement("ul"));jQuery.each(c,function(){this.appendTo(e)});return e};ItemTree.TIPO_DEFAULT="default";ItemTree.TIPO_ROOT="root";ItemTree.TIPO_CHILD="leaf";ItemTree.TIPO_IPM="ipm";ItemTree.TIPO_ENCERRADO="encerrado";ItemTree.TIPO_CANCELADO="cancelado";ItemTree.TIPO_PARALISADO="paralisado";ItemTree.TIPO_CAMPO_BOOLEANO="campo_booleano";ItemTree.TIPO_CAMPO_TEXTO="campo_texto";
ItemTree.TIPO_CAMPO_NUMERICO="campo_numerico";ItemTree.TIPO_CAMPO_LISTA="campo_lista";ItemTree.TIPO_CAMPO_DATA="campo_data";ItemTree.TIPO_CAMPO_ANO="campo_ano";;/*</editor-fold desc="js_tree_item.js">*/
