(function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};return b.m=a,b.c=c,b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{enumerable:!0,get:d})},b.r=function(a){'undefined'!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:'Module'}),Object.defineProperty(a,'__esModule',{value:!0})},b.t=function(a,c){if(1&c&&(a=b(a)),8&c)return a;if(4&c&&'object'==typeof a&&a&&a.__esModule)return a;var d=Object.create(null);if(b.r(d),Object.defineProperty(d,'default',{enumerable:!0,value:a}),2&c&&'string'!=typeof a)for(var e in a)b.d(d,e,function(b){return a[b]}.bind(null,e));return d},b.n=function(a){var c=a&&a.__esModule?function(){return a['default']}:function(){return a};return b.d(c,'a',c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p='view/public/',b(b.s=513)})({513:function(){document.addEventListener('DOMContentLoaded',function(){function a(a){a=a||document;for(var b=a.querySelectorAll('.js-remove-module'),c=0;c<b.length;c++)b[c].addEventListener('click',function(){this.closest('.js-filtro-valor').remove(),checkDuplicateFields()})}function b(){function b(){var a=document.querySelectorAll('.layout-select'),b=[];a.forEach(function(c){var d=c.value;a.forEach(function(a){c===a||a.value!==d||b.includes(d)||b.push(d)})}),a.forEach(function(a){if(b.includes(a.value)){a.style.border='1px solid #8A0F1A';var c=a.nextElementSibling;if(!c||!c.classList.contains('error-message')){var d=document.createElement('span');d.classList.add('error-message'),d.style.color='#8A0F1A',d.style.fontSize='14px',d.innerHTML='Os campos n\xE3o podem <br>ser iguais',a.parentNode.insertBefore(d,a.nextElementSibling)}}else{a.style.border='';var e=a.nextElementSibling;e&&e.classList.contains('error-message')&&e.remove()}})}var e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},f=e.position,g=e.layout_id,h=e.status,i=e.sort_order,j=document.createElement('div'),k=info.layouts,l=Type_ModulePosition.getEnumList(),m=Type_Status.getEnumList(),n='<div class="row x-small-space-xs">\n    <div class="col-md">\n      <label class="field field-medium">\n        <span class="field-label">'.concat(window.language.get('entry_layout'),'</span>\n        <select class="field-entry layout-select" name="futurafiltrovalor_module[').concat(d,'][layout_id]">\n          ').concat(Object.keys(k).map(function(a){return'<option value="'.concat(k[a].layout_id,'" ').concat(g==k[a].layout_id?'selected':'','>').concat(k[a].name,'</option>')}).join(''),'\n        </select>\n      </label>\n    </div>\n    <div class="col-md">\n      <label class="field field-medium">\n        <span class="field-label">').concat(window.language.get('entry_position'),'</span>\n        <select class="field-entry" name="futurafiltrovalor_module[').concat(d,'][position]">\n          ').concat(Object.keys(l).map(function(a){return'<option value="'.concat(a,'" ').concat(a==f?'selected':'','>').concat(l[a],'</option>')}).join(''),'\n        </select>\n      </label>\n    </div>\n    <div class="col-md">\n      <label class="field field-medium">\n        <span class="field-label">').concat(window.language.get('entry_status'),'</span>\n        <select class="field-entry" name="futurafiltrovalor_module[').concat(d,'][status]">\n          ').concat(Object.keys(m).map(function(a){return'<option value="'.concat(a,'" ').concat(h==a?'selected':'','>').concat(m[a],'</option>')}).join(''),'\n        </select>\n      </label>\n    </div>\n    <div class="col-md-width-auto">\n      <label class="field field-medium">\n        <span class="field-label">').concat(window.language.get('entry_sort_order'),'</span>\n        <input class="field-entry mask-number2" type="text" name="futurafiltrovalor_module[').concat(d,'][sort_order]"\n        value="').concat('undefined'==typeof i?'':i,'" size="1">\n      </label>\n    </div>\n    <div class="col-xs-12 col-md-width-auto">\n        <div class="padding-medium cursor-pointer top-margin-medium js-remove-module" data-tooltip="').concat(window.language.get('button_remove'),'" data-manufactured-id="{{ key }}">\n          <i class="fas fa-trash text-gray"></i>\n        </div>\n      </div>\n  </div>');j.setAttribute('class','content-box background-white shadow-small adm-focus-within bottom-margin-medium padding-large js-filtro-valor'),j.innerHTML=n,c.prepend(j),a(j),d++;var o=document.querySelectorAll('.layout-select');o.forEach(function(a){a.setAttribute('data-original-value',a.value),a.addEventListener('change',function(){b()})}),b()}var c=document.getElementById('module_list');window.info=JSON.parse(document.querySelector('[data-info]').getAttribute('data-info')),language.add(info.languages),language.load('module/futurafiltrovalor');var d='';d++,document.getElementById('add_module').onclick=b,a();var e=info.modules;for(var f in e)b(e[f])})}});