vue-intergrall-plugins 0.0.4 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1742,9 +1742,7 @@ var createPopper = /*#__PURE__*/popperGenerator({
1742
1742
  //
1743
1743
  //
1744
1744
  //
1745
- //
1746
- //
1747
- var script$5 = {
1745
+ var script$a = {
1748
1746
  data: function data() {
1749
1747
  return {
1750
1748
  varValues: {},
@@ -1764,10 +1762,6 @@ var script$5 = {
1764
1762
  required: false,
1765
1763
  default: true
1766
1764
  },
1767
- smartStyle: {
1768
- type: Boolean,
1769
- required: false
1770
- },
1771
1765
  allVariables: {
1772
1766
  type: Boolean,
1773
1767
  required: false,
@@ -1819,7 +1813,7 @@ var script$5 = {
1819
1813
  });
1820
1814
  },
1821
1815
  getListOpts: function getListOpts() {
1822
- this.varListValues = "<ul class=\"var-list-dropdown\">\n <li> nome </li>\n ".concat(this.allVariables ? '<li> telefone </li>' : '', "\n </ul>");
1816
+ this.varListValues = "<ul class=\"ts-dropdown\">\n <li> nome </li>\n ".concat(this.allVariables ? '<li> telefone </li>' : '', "\n </ul>");
1823
1817
  },
1824
1818
  setInputs: function setInputs() {
1825
1819
  var _this2 = this;
@@ -1836,9 +1830,7 @@ var script$5 = {
1836
1830
  qtdInputs += header.querySelectorAll(".input-var-".concat(this.identifier)).length;
1837
1831
  }
1838
1832
 
1839
- if (this.lastVar === 0) {
1840
- this.lastVar += 1;
1841
- }
1833
+ if (this.lastVar === 0) this.lastVar += 1;
1842
1834
 
1843
1835
  if (body !== null) {
1844
1836
  body.querySelectorAll(".input-var-".concat(this.identifier)).forEach(function (input) {
@@ -1855,12 +1847,9 @@ var script$5 = {
1855
1847
  }
1856
1848
 
1857
1849
  if (qtdInputs === 1) {
1858
- document.querySelector(".input-var-".concat(this.identifier)).parentElement.parentElement.parentElement.style.width = "100%";
1859
1850
  document.querySelector(".input-var-".concat(this.identifier)).parentElement.style.width = "100%";
1860
1851
  document.querySelector(".input-var-".concat(this.identifier)).style.width = "100%";
1861
- }
1862
-
1863
- if (qtdInputs === 0) {
1852
+ } else if (qtdInputs === 0) {
1864
1853
  this.$emit("set-vars", this.template);
1865
1854
  }
1866
1855
  },
@@ -1888,7 +1877,7 @@ var script$5 = {
1888
1877
  });
1889
1878
  }
1890
1879
 
1891
- var containerGeral = document.querySelector(".templates-container");
1880
+ var containerGeral = document.querySelector(".tg-container");
1892
1881
  varList.classList.add("visible");
1893
1882
  var maxBottom = containerGeral.getBoundingClientRect().bottom,
1894
1883
  currentBottom = varList.getBoundingClientRect().bottom;
@@ -1930,9 +1919,21 @@ var script$5 = {
1930
1919
  }
1931
1920
  },
1932
1921
  isValid: function isValid(textValue) {
1933
- var regex = /^[ ?????�����??��?���?��??????�������?���?��???��??\w?-�\r\n()[\]{}.,:;@??�????!&?�`�=%^*+\-$|/]+$/;
1922
+ var regex = {
1923
+ htmlTags: /<\/?[\d\w\s=\-:\.\/\'\";]+>/gi,
1924
+ enter: /\n/g,
1925
+ consecutiveSpaces: /\s{3,}/g
1926
+ };
1934
1927
  var value = textValue ? textValue.trim("") : "";
1935
- return regex.test(value);
1928
+ if (!value.length) return false;
1929
+ var isValueValid = true;
1930
+
1931
+ for (var key in regex) {
1932
+ if (!isValueValid) return isValueValid;
1933
+ if (regex[key].test(value)) isValueValid = false;
1934
+ }
1935
+
1936
+ return isValueValid;
1936
1937
  },
1937
1938
  setVar: function setVar(event, key, notificar) {
1938
1939
  if (event && event.target) {
@@ -2026,10 +2027,10 @@ var script$5 = {
2026
2027
  }
2027
2028
  return script;
2028
2029
  }/* script */
2029
- var __vue_script__$5 = script$5;
2030
+ var __vue_script__$a = script$a;
2030
2031
  /* template */
2031
2032
 
2032
- var __vue_render__$5 = function __vue_render__() {
2033
+ var __vue_render__$a = function __vue_render__() {
2033
2034
  var _vm = this;
2034
2035
 
2035
2036
  var _h = _vm.$createElement;
@@ -2037,23 +2038,18 @@ var __vue_render__$5 = function __vue_render__() {
2037
2038
  var _c = _vm._self._c || _h;
2038
2039
 
2039
2040
  return _c('div', {
2040
- staticClass: "template-single"
2041
- }, [_vm._ssrNode("<div class=\"template-content\">" + _vm._ssrList(_vm.template.components, function (component, cIndex) {
2042
- return "<div>" + (component.type === 'header' ? "<header id=\"template_header\"" + _vm._ssrClass(null, {
2043
- sm__template: _vm.smartStyle
2044
- }) + ">" + _vm._ssrList(component.parameters, function (param, pIndex) {
2045
- return "<span>" + (param.type === 'text' ? _vm.regexVars.test(param.text) ? "<p>" + _vm._s(param.text.replace(_vm.regexVars, "<div class='template-var'>" + _vm.htmlInputString + _vm.varListValues + "</div>")) + "</p>" : "<p>" + _vm._s(param.text) + "</p>" : "<!---->") + "</span>";
2041
+ staticClass: "ts-container"
2042
+ }, [_vm._ssrNode("<div class=\"ts-content\">" + _vm._ssrList(_vm.template.components, function (component, cIndex) {
2043
+ return "<div>" + (component.type === 'header' ? "<header id=\"template_header\">" + _vm._ssrList(component.parameters, function (param, pIndex) {
2044
+ return "<div>" + (param.type === 'text' ? _vm.regexVars.test(param.text) ? "<div>" + _vm._s(param.text.replace(_vm.regexVars, "<div class='ts-content__var'>" + _vm.htmlInputString + _vm.varListValues + "</div>")) + "</div>" : "<p>" + _vm._s(param.text) + "</p>" : "<!---->") + "</div>";
2046
2045
  }) + "</header>" : "<!---->") + " " + (component.type === 'body' ? "<section id=\"template_body\"" + _vm._ssrClass(null, {
2047
- sm__template: _vm.smartStyle,
2048
2046
  'margin-bottom': _vm.template.components.length === 2
2049
2047
  }) + ">" + _vm._ssrList(component.parameters, function (param, pIndex) {
2050
- return "<span>" + (param.type === 'text' ? _vm.regexVars.test(param.text) ? "<p>" + _vm._s(param.text.replace(_vm.regexVars, "<div class='template-var'>" + _vm.htmlInputString + _vm.varListValues + "</div>")) + "</p>" : "<p>" + _vm._s(param.text) + "</p>" : "<!---->") + "</span>";
2051
- }) + "</section>" : "<!---->") + " " + (component.type == 'footer' ? "<footer id=\"template_footer\"" + _vm._ssrClass(null, {
2052
- sm__template: _vm.smartStyle
2053
- }) + ">" + _vm._ssrList(component.parameters, function (param, pIndex) {
2054
- return "<span>" + (param.type == 'text' ? "<small>" + _vm._s(param.text) + "</small>" : "<!---->") + "</span>";
2048
+ return "<div>" + (param.type === 'text' ? _vm.regexVars.test(param.text) ? "<div>" + _vm._s(param.text.replace(_vm.regexVars, "<div class='ts-content__var'>" + _vm.htmlInputString + _vm.varListValues + "</div>")) + "</div>" : "<p>" + _vm._s(param.text) + "</p>" : "<!---->") + "</div>";
2049
+ }) + "</section>" : "<!---->") + " " + (component.type == 'footer' ? "<footer id=\"template_footer\">" + _vm._ssrList(component.parameters, function (param, pIndex) {
2050
+ return "<div>" + (param.type == 'text' ? "<small>" + _vm._s(param.text) + "</small>" : "<!---->") + "</div>";
2055
2051
  }) + "</footer>" : "<!---->") + "</div>";
2056
- }) + "</div> "), _vm.hasButton ? _vm._ssrNode("<div" + _vm._ssrClass("template-btn", {
2052
+ }) + "</div> "), _vm.hasButton ? _vm._ssrNode("<div" + _vm._ssrClass("tg-btn", {
2057
2053
  'small-btn': _vm.iconButton
2058
2054
  }) + ">", "</div>", [_vm._ssrNode("<button>", "</button>", [!_vm.iconButton ? [_vm._ssrNode(_vm._ssrEscape(" " + _vm._s(_vm.dictionary.btn_contatar_clientes) + " "))] : _c('fa-icon', {
2059
2055
  attrs: {
@@ -2062,31 +2058,31 @@ var __vue_render__$5 = function __vue_render__() {
2062
2058
  })], 2)]) : _vm._e()], 2);
2063
2059
  };
2064
2060
 
2065
- var __vue_staticRenderFns__$5 = [];
2061
+ var __vue_staticRenderFns__$a = [];
2066
2062
  /* style */
2067
2063
 
2068
- var __vue_inject_styles__$5 = undefined;
2064
+ var __vue_inject_styles__$a = undefined;
2069
2065
  /* scoped */
2070
2066
 
2071
- var __vue_scope_id__$5 = undefined;
2067
+ var __vue_scope_id__$a = undefined;
2072
2068
  /* module identifier */
2073
2069
 
2074
- var __vue_module_identifier__$5 = "data-v-c22ab328";
2070
+ var __vue_module_identifier__$a = "data-v-4f6e98c8";
2075
2071
  /* functional template */
2076
2072
 
2077
- var __vue_is_functional_template__$5 = false;
2073
+ var __vue_is_functional_template__$a = false;
2078
2074
  /* style inject */
2079
2075
 
2080
2076
  /* style inject SSR */
2081
2077
 
2082
2078
  /* style inject shadow dom */
2083
2079
 
2084
- var __vue_component__$6 = /*#__PURE__*/normalizeComponent({
2085
- render: __vue_render__$5,
2086
- staticRenderFns: __vue_staticRenderFns__$5
2087
- }, __vue_inject_styles__$5, __vue_script__$5, __vue_scope_id__$5, __vue_is_functional_template__$5, __vue_module_identifier__$5, false, undefined, undefined, undefined);
2080
+ var __vue_component__$b = /*#__PURE__*/normalizeComponent({
2081
+ render: __vue_render__$a,
2082
+ staticRenderFns: __vue_staticRenderFns__$a
2083
+ }, __vue_inject_styles__$a, __vue_script__$a, __vue_scope_id__$a, __vue_is_functional_template__$a, __vue_module_identifier__$a, false, undefined, undefined, undefined);
2088
2084
 
2089
- var TemplateSingle = __vue_component__$6;var setResizeListeners = function setResizeListeners($el, inputClass, parentClass) {
2085
+ var TemplateSingle = __vue_component__$b;var setResizeListeners = function setResizeListeners($el, inputClass, parentClass) {
2090
2086
  var inputTargets = $el.querySelectorAll(inputClass);
2091
2087
  inputTargets.forEach(function (target) {
2092
2088
  target.addEventListener("input", function () {
@@ -2194,18 +2190,6 @@ var mixin_1 = mixin;function returnMessageWithHexa(originalMessage) {
2194
2190
  }
2195
2191
 
2196
2192
  return output;
2197
- }
2198
- function formataHoraMensagem() {
2199
- var mostrarSegundos = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
2200
- var data = new Date();
2201
- var hora = data.getHours();
2202
- hora = hora < 10 ? "0" + hora : hora;
2203
- var minutos = data.getMinutes();
2204
- minutos = minutos < 10 ? "0" + minutos : minutos;
2205
- var segundos = data.getSeconds();
2206
- segundos = segundos < 10 ? "0" + segundos : segundos;
2207
- var horaFormatada = mostrarSegundos ? "".concat(hora, ":").concat(minutos, ":").concat(segundos) : "".concat(hora, ":").concat(minutos);
2208
- return horaFormatada;
2209
2193
  }var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
2210
2194
 
2211
2195
  function createCommonjsModule(fn, basedir, module) {
@@ -7840,7 +7824,7 @@ exports.default = { search: search, emojis: emojis, emoticons: emoticons };
7840
7824
  /******/ ]);
7841
7825
  });
7842
7826
  });//
7843
- var script$4 = {
7827
+ var script$9 = {
7844
7828
  components: {
7845
7829
  "picker": emojiMart.Picker
7846
7830
  },
@@ -7921,10 +7905,10 @@ var script$4 = {
7921
7905
  }
7922
7906
  }
7923
7907
  };/* script */
7924
- var __vue_script__$4 = script$4;
7908
+ var __vue_script__$9 = script$9;
7925
7909
  /* template */
7926
7910
 
7927
- var __vue_render__$4 = function __vue_render__() {
7911
+ var __vue_render__$9 = function __vue_render__() {
7928
7912
  var _vm = this;
7929
7913
 
7930
7914
  var _h = _vm.$createElement;
@@ -7964,37 +7948,37 @@ var __vue_render__$4 = function __vue_render__() {
7964
7948
  })], 2);
7965
7949
  };
7966
7950
 
7967
- var __vue_staticRenderFns__$4 = [];
7951
+ var __vue_staticRenderFns__$9 = [];
7968
7952
  /* style */
7969
7953
 
7970
- var __vue_inject_styles__$4 = undefined;
7954
+ var __vue_inject_styles__$9 = undefined;
7971
7955
  /* scoped */
7972
7956
 
7973
- var __vue_scope_id__$4 = undefined;
7957
+ var __vue_scope_id__$9 = undefined;
7974
7958
  /* module identifier */
7975
7959
 
7976
- var __vue_module_identifier__$4 = "data-v-7a052c7e";
7960
+ var __vue_module_identifier__$9 = "data-v-7a052c7e";
7977
7961
  /* functional template */
7978
7962
 
7979
- var __vue_is_functional_template__$4 = false;
7963
+ var __vue_is_functional_template__$9 = false;
7980
7964
  /* style inject */
7981
7965
 
7982
7966
  /* style inject SSR */
7983
7967
 
7984
7968
  /* style inject shadow dom */
7985
7969
 
7986
- var __vue_component__$5 = /*#__PURE__*/normalizeComponent({
7987
- render: __vue_render__$4,
7988
- staticRenderFns: __vue_staticRenderFns__$4
7989
- }, __vue_inject_styles__$4, __vue_script__$4, __vue_scope_id__$4, __vue_is_functional_template__$4, __vue_module_identifier__$4, false, undefined, undefined, undefined);
7970
+ var __vue_component__$a = /*#__PURE__*/normalizeComponent({
7971
+ render: __vue_render__$9,
7972
+ staticRenderFns: __vue_staticRenderFns__$9
7973
+ }, __vue_inject_styles__$9, __vue_script__$9, __vue_scope_id__$9, __vue_is_functional_template__$9, __vue_module_identifier__$9, false, undefined, undefined, undefined);
7990
7974
 
7991
- var EmojisTextFooter = __vue_component__$5;//
7975
+ var EmojisTextFooter = __vue_component__$a;//
7992
7976
  //
7993
7977
  //
7994
7978
  //
7995
7979
  //
7996
7980
  //
7997
- var script$3 = {
7981
+ var script$8 = {
7998
7982
  props: {
7999
7983
  hasBg: {
8000
7984
  type: Boolean,
@@ -8010,11 +7994,51 @@ var script$3 = {
8010
7994
  default: "small"
8011
7995
  }
8012
7996
  }
8013
- };/* script */
8014
- var __vue_script__$3 = script$3;
7997
+ };function createInjectorSSR(context) {
7998
+ if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
7999
+ context = __VUE_SSR_CONTEXT__;
8000
+ }
8001
+ if (!context)
8002
+ return () => { };
8003
+ if (!('styles' in context)) {
8004
+ context._styles = context._styles || {};
8005
+ Object.defineProperty(context, 'styles', {
8006
+ enumerable: true,
8007
+ get: () => context._renderStyles(context._styles)
8008
+ });
8009
+ context._renderStyles = context._renderStyles || renderStyles;
8010
+ }
8011
+ return (id, style) => addStyle(id, style, context);
8012
+ }
8013
+ function addStyle(id, css, context) {
8014
+ const group = css.media || 'default' ;
8015
+ const style = context._styles[group] || (context._styles[group] = { ids: [], css: '' });
8016
+ if (!style.ids.includes(id)) {
8017
+ style.media = css.media;
8018
+ style.ids.push(id);
8019
+ let code = css.source;
8020
+ style.css += code + '\n';
8021
+ }
8022
+ }
8023
+ function renderStyles(styles) {
8024
+ let css = '';
8025
+ for (const key in styles) {
8026
+ const style = styles[key];
8027
+ css +=
8028
+ '<style data-vue-ssr-id="' +
8029
+ Array.from(style.ids).join(' ') +
8030
+ '"' +
8031
+ (style.media ? ' media="' + style.media + '"' : '') +
8032
+ '>' +
8033
+ style.css +
8034
+ '</style>';
8035
+ }
8036
+ return css;
8037
+ }/* script */
8038
+ var __vue_script__$8 = script$8;
8015
8039
  /* template */
8016
8040
 
8017
- var __vue_render__$3 = function __vue_render__() {
8041
+ var __vue_render__$8 = function __vue_render__() {
8018
8042
  var _vm = this;
8019
8043
 
8020
8044
  var _h = _vm.$createElement;
@@ -8032,184 +8056,1001 @@ var __vue_render__$3 = function __vue_render__() {
8032
8056
  }) + "></div>")]);
8033
8057
  };
8034
8058
 
8035
- var __vue_staticRenderFns__$3 = [];
8059
+ var __vue_staticRenderFns__$8 = [];
8036
8060
  /* style */
8037
8061
 
8038
- var __vue_inject_styles__$3 = undefined;
8062
+ var __vue_inject_styles__$8 = function __vue_inject_styles__(inject) {
8063
+ if (!inject) return;
8064
+ inject("data-v-8ff43434_0", {
8065
+ source: ".req-loader-container{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center}.req-loader-container.light-bg{background-color:rgba(0,0,0,.3);border-radius:inherit}.req-loader-container.align-right{justify-content:flex-end}.req-loader-container.align-right .req-loader{margin-right:15px}.req-loader{border:2px solid #ccc;border-top:2px solid #333;border-radius:50%;width:20px;height:20px;min-width:20px;min-height:20px;animation:spin 2s linear infinite}.req-loader.big{width:40px;height:40px;animation:spin 3s linear infinite}.req-loader.slow{animation:spin 4s linear infinite}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}",
8066
+ map: undefined,
8067
+ media: undefined
8068
+ });
8069
+ };
8039
8070
  /* scoped */
8040
8071
 
8041
- var __vue_scope_id__$3 = undefined;
8072
+
8073
+ var __vue_scope_id__$8 = undefined;
8042
8074
  /* module identifier */
8043
8075
 
8044
- var __vue_module_identifier__$3 = "data-v-4df9ec54";
8076
+ var __vue_module_identifier__$8 = "data-v-8ff43434";
8045
8077
  /* functional template */
8046
8078
 
8047
- var __vue_is_functional_template__$3 = false;
8048
- /* style inject */
8049
-
8050
- /* style inject SSR */
8051
-
8079
+ var __vue_is_functional_template__$8 = false;
8052
8080
  /* style inject shadow dom */
8053
8081
 
8054
- var __vue_component__$4 = /*#__PURE__*/normalizeComponent({
8055
- render: __vue_render__$3,
8056
- staticRenderFns: __vue_staticRenderFns__$3
8057
- }, __vue_inject_styles__$3, __vue_script__$3, __vue_scope_id__$3, __vue_is_functional_template__$3, __vue_module_identifier__$3, false, undefined, undefined, undefined);
8082
+ var __vue_component__$9 = /*#__PURE__*/normalizeComponent({
8083
+ render: __vue_render__$8,
8084
+ staticRenderFns: __vue_staticRenderFns__$8
8085
+ }, __vue_inject_styles__$8, __vue_script__$8, __vue_scope_id__$8, __vue_is_functional_template__$8, __vue_module_identifier__$8, false, undefined, createInjectorSSR, undefined);
8058
8086
 
8059
- var ReqLoader = __vue_component__$4;//
8060
- var script$2 = {
8061
- components: {
8062
- EmojisTextFooter: EmojisTextFooter,
8063
- ReqLoader: ReqLoader
8064
- },
8065
- mixins: [mixin_1],
8087
+ var Loader = __vue_component__$9;//
8088
+ //
8089
+ //
8090
+ //
8091
+ //
8092
+ //
8093
+ //
8094
+ //
8095
+ var script$7 = {
8066
8096
  props: {
8067
- buttons: {
8068
- type: Object,
8069
- default: function _default() {
8070
- return {
8071
- hasEmojis: false,
8072
- hasSendButton: false,
8073
- hasFiles: false,
8074
- hasAudio: false
8075
- };
8076
- },
8077
- required: false
8078
- },
8079
- cssStyle: {
8080
- type: Object,
8081
- default: function _default() {
8082
- return {
8083
- width: "full",
8084
- backgroundColor: "#FFF",
8085
- outsideButtons: false
8086
- };
8087
- },
8088
- required: false
8089
- },
8090
- textareaSettings: {
8091
- type: Object,
8092
- default: function _default() {
8093
- return {
8094
- placeholderMessage: "",
8095
- maxCharacters: 0,
8096
- sendOnEnter: false,
8097
- disabled: false
8098
- };
8099
- },
8100
- required: false
8101
- },
8102
- emojiSettings: {
8103
- type: Object,
8104
- default: function _default() {
8105
- return {
8106
- openEmojisFrom: "top",
8107
- smallEmojis: false
8108
- };
8109
- },
8110
- required: false
8111
- },
8112
- formattedMessageSettings: {
8113
- type: Object,
8114
- default: function _default() {
8115
- return {
8116
- hasHsm: false,
8117
- msgType: 0
8118
- };
8119
- },
8120
- required: false
8121
- },
8122
- fileSettings: {
8123
- type: Object,
8124
- default: function _default() {
8125
- return {
8126
- docsExtensions: "",
8127
- imagesExtensions: ""
8128
- };
8129
- },
8130
- required: false
8131
- },
8132
- textId: {
8097
+ message: {
8133
8098
  type: String,
8134
8099
  required: true
8135
8100
  },
8136
- isMainChat: {
8137
- type: Boolean,
8138
- default: false,
8139
- required: false
8140
- },
8141
- isSending: {
8142
- type: Boolean,
8143
- default: false,
8101
+ maxCharacters: {
8102
+ type: Number,
8144
8103
  required: false
8145
- },
8146
- dictionary: {
8147
- type: Object,
8148
- required: true
8149
8104
  }
8150
8105
  },
8151
8106
  computed: {
8152
8107
  remainingCharacters: function remainingCharacters() {
8153
- if (this.message && this.message.length) {
8154
- return this.textareaSettings.maxCharacters - this.message.length;
8155
- }
8108
+ if (this.message.length) return this.maxCharacters - this.message.length;
8109
+ return this.maxCharacters;
8110
+ }
8111
+ }
8112
+ };/* script */
8113
+ var __vue_script__$7 = script$7;
8114
+ /* template */
8115
+
8116
+ var __vue_render__$7 = function __vue_render__() {
8117
+ var _vm = this;
8118
+
8119
+ var _h = _vm.$createElement;
8120
+
8121
+ var _c = _vm._self._c || _h;
8122
+
8123
+ return _vm.maxCharacters ? _c('span', {
8124
+ staticClass: "max-characters no-width",
8125
+ domProps: {
8126
+ "textContent": _vm._s("(" + this.remainingCharacters + ")")
8127
+ }
8128
+ }, []) : _vm._e();
8129
+ };
8130
+
8131
+ var __vue_staticRenderFns__$7 = [];
8132
+ /* style */
8133
+
8134
+ var __vue_inject_styles__$7 = undefined;
8135
+ /* scoped */
8136
+
8137
+ var __vue_scope_id__$7 = undefined;
8138
+ /* module identifier */
8139
+
8140
+ var __vue_module_identifier__$7 = "data-v-f8dac3e4";
8141
+ /* functional template */
8142
+
8143
+ var __vue_is_functional_template__$7 = false;
8144
+ /* style inject */
8145
+
8146
+ /* style inject SSR */
8147
+
8148
+ /* style inject shadow dom */
8149
+
8150
+ var __vue_component__$8 = /*#__PURE__*/normalizeComponent({
8151
+ render: __vue_render__$7,
8152
+ staticRenderFns: __vue_staticRenderFns__$7
8153
+ }, __vue_inject_styles__$7, __vue_script__$7, __vue_scope_id__$7, __vue_is_functional_template__$7, __vue_module_identifier__$7, false, undefined, undefined, undefined);
8156
8154
 
8157
- return this.textareaSettings.maxCharacters;
8155
+ var RemainingCharacters = __vue_component__$8;//
8156
+ //
8157
+ //
8158
+ //
8159
+ //
8160
+ //
8161
+ var script$6 = {
8162
+ props: {
8163
+ dictionary: {
8164
+ type: Object,
8165
+ required: true
8158
8166
  }
8159
8167
  },
8160
8168
  data: function data() {
8161
8169
  return {
8162
- message: "",
8163
- openFiles: false,
8164
- file: [],
8165
- showFilePreview: false,
8166
- imagePreview: "",
8167
- isDoc: false,
8168
- fileFormatError: false,
8169
- validFileFormats: "",
8170
- audioFile: "",
8171
- audioSource: "",
8172
- mediaRecorder: {},
8173
- isRecording: false
8170
+ isRecording: false,
8171
+ mediaRecorder: {}
8174
8172
  };
8175
8173
  },
8176
- created: function created() {
8177
- this.$root.$refs["tf-".concat(this.textId)] = this;
8178
- },
8179
- mounted: function mounted() {
8180
- var _this = this;
8181
-
8182
- setResizeListeners(this.$el, ".js-autoresize", ".js-parentresize");
8183
- this.$root.$on("drop-file", function (file, type) {
8184
- if (_this.buttons.hasFiles) _this.fileUpload(file, type, true);
8185
- });
8186
- this.$root.$on("toggle-msg-formatada", function () {
8187
- _this.toggleHSM();
8188
- });
8189
- this.$root.$on("textarea-focus", function () {
8190
- _this.focusTextarea();
8191
- });
8192
- this.$root.$on("resize-footer-template", function () {
8193
- _this.adjustChatHeight();
8194
- });
8195
- this.$root.$on("clear-footer-message", function () {
8196
- _this.message = "";
8197
- });
8198
- if (this.cssStyle.outsideButtons) if (this.$root.$refs.chatCorpo) this.$root.$refs.chatCorpo.setOutsideButtons(this.cssStyle.outsideButtons);
8199
- },
8200
8174
  methods: {
8201
- closeEmojis: function closeEmojis() {
8202
- try {
8203
- this.$root.$refs["etf-".concat(this.textId)].showEmojis ? this.$root.$refs["etf-".concat(this.textId)].away() : '';
8204
- } catch (e) {
8205
- console.error("Nao foi possivel fechar os emojis");
8206
- console.error(e);
8207
- }
8208
- },
8209
- away: function away() {
8210
- this.openFiles = false;
8211
- },
8212
- setDefaultMessage: function setDefaultMessage(msg) {
8175
+ toggleAudioRecorder: function toggleAudioRecorder() {
8176
+ if (!this.mediaRecorder.state) return this.initAudioRecorder();
8177
+ this.isRecording = !this.isRecording;
8178
+ if (this.isRecording) return this.mediaRecorder.start();
8179
+ return this.mediaRecorder.stop();
8180
+ },
8181
+ initAudioRecorder: function initAudioRecorder() {
8182
+ var _this = this;
8183
+
8184
+ navigator.mediaDevices.getUserMedia({
8185
+ audio: true
8186
+ }).then(function (stream) {
8187
+ _this.mediaRecorder = new MediaRecorder(stream);
8188
+ var audioChunks = [];
8189
+
8190
+ _this.mediaRecorder.ondataavailable = function (eventData) {
8191
+ audioChunks.push(eventData.data);
8192
+ };
8193
+
8194
+ _this.mediaRecorder.onstop = function () {
8195
+ var blob = new Blob(audioChunks, {
8196
+ type: "audio/mpeg"
8197
+ });
8198
+ blob.lastModifiedDate = new Date();
8199
+ blob.name = "im-audio-file-".concat(parseInt(Math.random() * 50000));
8200
+ var reader = new FileReader();
8201
+ reader.readAsDataURL(blob);
8202
+
8203
+ reader.onloadend = function () {
8204
+ _this.$emit("set-audio", {
8205
+ audioFile: new File([blob], "".concat(blob.name, ".mpeg"), {
8206
+ type: blob.type
8207
+ }),
8208
+ audioSource: reader.result
8209
+ });
8210
+ };
8211
+
8212
+ stream.getTracks().forEach(function (track) {
8213
+ return track.stop();
8214
+ });
8215
+ };
8216
+
8217
+ _this.toggleAudioRecorder();
8218
+ }, function (error) {
8219
+ _this.$toasted.global.defaultError({
8220
+ msg: _this.dictionary.msg_permitir_audio
8221
+ });
8222
+
8223
+ console.error("error audio recorder: ", error);
8224
+ });
8225
+ },
8226
+ deleteMediaRecorder: function deleteMediaRecorder() {
8227
+ this.mediaRecorder = {};
8228
+ }
8229
+ }
8230
+ };/* script */
8231
+ var __vue_script__$6 = script$6;
8232
+ /* template */
8233
+
8234
+ var __vue_render__$6 = function __vue_render__() {
8235
+ var _vm = this;
8236
+
8237
+ var _h = _vm.$createElement;
8238
+
8239
+ var _c = _vm._self._c || _h;
8240
+
8241
+ return _c('span', {
8242
+ staticClass: "text-footer-actions--btn",
8243
+ class: {
8244
+ 'audio-activated': _vm.isRecording
8245
+ },
8246
+ on: {
8247
+ "click": _vm.toggleAudioRecorder
8248
+ }
8249
+ }, [_c('fa-icon', {
8250
+ attrs: {
8251
+ "icon": ['fas', 'microphone']
8252
+ }
8253
+ })], 1);
8254
+ };
8255
+
8256
+ var __vue_staticRenderFns__$6 = [];
8257
+ /* style */
8258
+
8259
+ var __vue_inject_styles__$6 = undefined;
8260
+ /* scoped */
8261
+
8262
+ var __vue_scope_id__$6 = undefined;
8263
+ /* module identifier */
8264
+
8265
+ var __vue_module_identifier__$6 = "data-v-291765d5";
8266
+ /* functional template */
8267
+
8268
+ var __vue_is_functional_template__$6 = false;
8269
+ /* style inject */
8270
+
8271
+ /* style inject SSR */
8272
+
8273
+ /* style inject shadow dom */
8274
+
8275
+ var __vue_component__$7 = /*#__PURE__*/normalizeComponent({
8276
+ render: __vue_render__$6,
8277
+ staticRenderFns: __vue_staticRenderFns__$6
8278
+ }, __vue_inject_styles__$6, __vue_script__$6, __vue_scope_id__$6, __vue_is_functional_template__$6, __vue_module_identifier__$6, false, undefined, undefined, undefined);
8279
+
8280
+ var BtnMic = __vue_component__$7;//
8281
+ //
8282
+ //
8283
+ //
8284
+ //
8285
+ //
8286
+ //
8287
+ //
8288
+ //
8289
+ //
8290
+ //
8291
+ //
8292
+ //
8293
+ //
8294
+ //
8295
+ //
8296
+ //
8297
+ //
8298
+ //
8299
+ //
8300
+ //
8301
+ //
8302
+ var script$5 = {
8303
+ props: {
8304
+ dictionary: {
8305
+ type: Object,
8306
+ required: true
8307
+ },
8308
+ file: {
8309
+ type: File,
8310
+ required: true
8311
+ },
8312
+ isDoc: {
8313
+ type: Boolean,
8314
+ required: false
8315
+ },
8316
+ fileFormatError: {
8317
+ type: Boolean,
8318
+ required: false
8319
+ },
8320
+ validFileFormats: {
8321
+ type: String,
8322
+ required: false,
8323
+ default: ""
8324
+ },
8325
+ imagePreview: {
8326
+ type: String,
8327
+ required: false
8328
+ }
8329
+ },
8330
+ methods: {
8331
+ deleteFile: function deleteFile() {
8332
+ this.$emit("delete-file");
8333
+ },
8334
+ openImage: function openImage() {
8335
+ this.$emit("open-image");
8336
+ }
8337
+ }
8338
+ };/* script */
8339
+ var __vue_script__$5 = script$5;
8340
+ /* template */
8341
+
8342
+ var __vue_render__$5 = function __vue_render__() {
8343
+ var _vm = this;
8344
+
8345
+ var _h = _vm.$createElement;
8346
+
8347
+ var _c = _vm._self._c || _h;
8348
+
8349
+ return _c('div', {
8350
+ staticClass: "single-file-preview"
8351
+ }, [_vm._ssrNode("<span" + _vm._ssrAttr("title", _vm.dictionary.msg_cancelar_anexo) + " class=\"text-footer-exclude-file\">", "</span>", [_c('fa-icon', {
8352
+ attrs: {
8353
+ "icon": ['fas', 'times-circle']
8354
+ }
8355
+ })], 1), _vm._ssrNode(" "), _vm.fileFormatError ? _vm._ssrNode("<div class=\"text-footer-invalid-format\">", "</div>", [_vm._ssrNode("<h3>" + _vm._ssrEscape(_vm._s(_vm.dictionary.titulo_msg_formato_invalido)) + "</h3> <h4>" + _vm._ssrEscape(_vm._s(_vm.validFileFormats)) + "</h4>")], 2) : [_vm.file.name ? _vm._ssrNode("<h3 class=\"text-footer-preview-title\">", "</h3>", [_vm.isDoc ? _c('fa-icon', {
8356
+ attrs: {
8357
+ "icon": ['fas', 'file-alt']
8358
+ }
8359
+ }) : _c('fa-icon', {
8360
+ attrs: {
8361
+ "icon": ['fas', 'image']
8362
+ }
8363
+ }), _vm._ssrNode(_vm._ssrEscape("\n " + _vm._s(_vm.file.name) + "\n "))], 2) : _vm._e(), _vm._ssrNode(" " + (_vm.imagePreview ? "<div class=\"text-footer-image-preview\"><img" + _vm._ssrAttr("src", _vm.imagePreview) + _vm._ssrAttr("alt", _vm.dictionary.alt_previa_img) + "></div>" : "<!---->"))]], 2);
8364
+ };
8365
+
8366
+ var __vue_staticRenderFns__$5 = [];
8367
+ /* style */
8368
+
8369
+ var __vue_inject_styles__$5 = undefined;
8370
+ /* scoped */
8371
+
8372
+ var __vue_scope_id__$5 = undefined;
8373
+ /* module identifier */
8374
+
8375
+ var __vue_module_identifier__$5 = "data-v-24daf98e";
8376
+ /* functional template */
8377
+
8378
+ var __vue_is_functional_template__$5 = false;
8379
+ /* style inject */
8380
+
8381
+ /* style inject SSR */
8382
+
8383
+ /* style inject shadow dom */
8384
+
8385
+ var __vue_component__$6 = /*#__PURE__*/normalizeComponent({
8386
+ render: __vue_render__$5,
8387
+ staticRenderFns: __vue_staticRenderFns__$5
8388
+ }, __vue_inject_styles__$5, __vue_script__$5, __vue_scope_id__$5, __vue_is_functional_template__$5, __vue_module_identifier__$5, false, undefined, undefined, undefined);
8389
+
8390
+ var SingleFilePreview = __vue_component__$6;//
8391
+ var script$4 = {
8392
+ components: {
8393
+ Loader: Loader
8394
+ },
8395
+ data: function data() {
8396
+ return {
8397
+ loading: true,
8398
+ loadingTimeout: 0,
8399
+ ignoreNextUpdate: false
8400
+ };
8401
+ },
8402
+ mounted: function mounted() {
8403
+ var _this = this;
8404
+
8405
+ setTimeout(function () {
8406
+ _this.loading = false;
8407
+ }, 500);
8408
+ },
8409
+ watch: {
8410
+ file: function file() {
8411
+ var _this2 = this;
8412
+
8413
+ if (!this.ignoreNextUpdate) {
8414
+ if (this.loadingTimeout) clearTimeout(this.loadingTimeout);
8415
+ this.loading = true;
8416
+ this.loadingTimeout = setTimeout(function () {
8417
+ _this2.loading = false;
8418
+ }, 500);
8419
+ this.ignoreNextUpdate = true;
8420
+ }
8421
+
8422
+ this.ignoreNextUpdate = false;
8423
+ }
8424
+ },
8425
+ props: {
8426
+ dictionary: {
8427
+ type: Object,
8428
+ required: true
8429
+ },
8430
+ file: {
8431
+ type: Array,
8432
+ required: true
8433
+ },
8434
+ fileFormatError: {
8435
+ type: Boolean,
8436
+ required: false
8437
+ },
8438
+ validFileFormats: {
8439
+ type: String,
8440
+ required: false,
8441
+ default: ""
8442
+ }
8443
+ },
8444
+ methods: {
8445
+ deleteFile: function deleteFile() {
8446
+ this.$emit("delete-file");
8447
+ },
8448
+ deleteSpecificFile: function deleteSpecificFile(fileName, index) {
8449
+ this.ignoreNextUpdate = true;
8450
+ this.$emit("delete-specific-file", {
8451
+ fileName: fileName,
8452
+ index: index
8453
+ });
8454
+ },
8455
+ openImage: function openImage(image) {
8456
+ this.$emit("open-image", image);
8457
+ },
8458
+ icon: function icon(imgOrDoc) {
8459
+ if (!imgOrDoc) return ['fas', 'times-circle'];
8460
+ return imgOrDoc == 'doc' ? ['fas', 'file-alt'] : ['fas', 'image'];
8461
+ },
8462
+ isPdf: function isPdf(type) {
8463
+ return type === "application/pdf" ? true : false;
8464
+ }
8465
+ }
8466
+ };/* script */
8467
+ var __vue_script__$4 = script$4;
8468
+ /* template */
8469
+
8470
+ var __vue_render__$4 = function __vue_render__() {
8471
+ var _vm = this;
8472
+
8473
+ var _h = _vm.$createElement;
8474
+
8475
+ var _c = _vm._self._c || _h;
8476
+
8477
+ return _c('div', {
8478
+ staticClass: "multiple-file-preview"
8479
+ }, [_c('transition-group', {
8480
+ attrs: {
8481
+ "name": "fade"
8482
+ }
8483
+ }, [_vm.loading ? _c('Loader', {
8484
+ key: "mfp-loader"
8485
+ }) : _vm.fileFormatError ? [_c('span', {
8486
+ key: "mfp-exlude-file",
8487
+ staticClass: "text-footer-exclude-file",
8488
+ attrs: {
8489
+ "title": _vm.dictionary.msg_cancelar_anexo
8490
+ },
8491
+ on: {
8492
+ "click": _vm.deleteFile
8493
+ }
8494
+ }, [_c('fa-icon', {
8495
+ attrs: {
8496
+ "icon": ['fas', 'times-circle']
8497
+ }
8498
+ })], 1), _vm._v(" "), _vm.fileFormatError ? _c('div', {
8499
+ key: "mfp-invalid-format",
8500
+ staticClass: "text-footer-invalid-format"
8501
+ }, [_c('h3', {
8502
+ domProps: {
8503
+ "textContent": _vm._s(_vm.dictionary.titulo_msg_formato_invalido)
8504
+ }
8505
+ }), _vm._v(" "), _c('h4', {
8506
+ domProps: {
8507
+ "textContent": _vm._s(_vm.validFileFormats)
8508
+ }
8509
+ })]) : _vm._e()] : _vm._l(_vm.file, function (singleFile, index) {
8510
+ return _c('div', {
8511
+ key: index,
8512
+ staticClass: "file-preview"
8513
+ }, [_c('p', {
8514
+ staticClass: "file-title"
8515
+ }, [_c('fa-icon', {
8516
+ attrs: {
8517
+ "icon": _vm.icon(singleFile.imgOrDoc)
8518
+ }
8519
+ }), _vm._v("\n " + _vm._s(singleFile.name) + "\n ")], 1), _vm._v(" "), singleFile.invalid ? _c('p', {
8520
+ staticClass: "file-title red"
8521
+ }, [_vm._v("\n " + _vm._s(_vm.dictionary.titulo_msg_formato_invalido ? _vm.dictionary.titulo_msg_formato_invalido : "Arquivo invalido") + "\n ")]) : _vm._e(), _vm._v(" "), _c('div', {
8522
+ staticClass: "small-img"
8523
+ }, [singleFile.imgOrDoc === 'img' ? _c('span', {
8524
+ staticClass: "img-container"
8525
+ }, [_c('img', {
8526
+ attrs: {
8527
+ "src": singleFile.src,
8528
+ "alt": _vm.dictionary.alt_previa_img
8529
+ },
8530
+ on: {
8531
+ "click": function click($event) {
8532
+ return _vm.openImage(singleFile.src);
8533
+ }
8534
+ }
8535
+ })]) : _vm.isPdf(singleFile.type) ? _c('span', {
8536
+ staticClass: "pdf"
8537
+ }, [_c('fa-icon', {
8538
+ attrs: {
8539
+ "icon": ['fas', 'file-pdf']
8540
+ }
8541
+ })], 1) : _vm._e()]), _vm._v(" "), _c('span', {
8542
+ staticClass: "delete-file",
8543
+ on: {
8544
+ "click": function click($event) {
8545
+ return _vm.deleteSpecificFile(singleFile.name, index);
8546
+ }
8547
+ }
8548
+ }, [_c('fa-icon', {
8549
+ attrs: {
8550
+ "icon": ['fas', 'times-circle']
8551
+ }
8552
+ })], 1)]);
8553
+ })], 2)], 1);
8554
+ };
8555
+
8556
+ var __vue_staticRenderFns__$4 = [];
8557
+ /* style */
8558
+
8559
+ var __vue_inject_styles__$4 = function __vue_inject_styles__(inject) {
8560
+ if (!inject) return;
8561
+ inject("data-v-53d19bab_0", {
8562
+ source: ".multiple-file-preview{position:relative;display:flex;flex-direction:column;width:100%;height:100%;max-height:100%;overflow-y:auto;overflow-x:hidden;border-top-left-radius:5px;border-top-right-radius:5px;transition:background-color 150ms}.file-preview{display:flex;width:100%;align-items:center;padding:5px 10px;transition:background-color 150ms}.file-preview:hover{background-color:rgba(0,0,0,.1)}.file-title{color:#222;display:flex;align-items:center;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;padding:4px 10px;background-color:rgba(255,255,255,.8);border-radius:30px}.file-title.red{color:#e74c3c;margin-left:5px}.file-title>svg{margin-right:5px}.small-img{flex:1;margin:0 15px;display:flex;justify-content:center;align-items:center;position:relative}.small-img img{height:40px;cursor:pointer}.small-img .pdf{display:flex;justify-content:center;align-items:center;font-size:30px;color:#e74c3c}.small-img .pdf svg{z-index:1}.small-img .pdf::after{content:\"\";position:absolute;bottom:2px;transform:translateY(2px);width:20px;height:20px;background-color:#fff}.img-container{padding:5px;border-radius:2.5px;background-color:rgba(0,0,0,.15);display:flex;justify-content:center;align-items:center}.delete-file{display:flex;justify-content:center;align-items:center;border-radius:50%;background-color:#fff;min-width:1rem;min-height:1rem;cursor:pointer}.delete-file>svg{font-size:1rem;color:#e74c3c}",
8563
+ map: undefined,
8564
+ media: undefined
8565
+ });
8566
+ };
8567
+ /* scoped */
8568
+
8569
+
8570
+ var __vue_scope_id__$4 = undefined;
8571
+ /* module identifier */
8572
+
8573
+ var __vue_module_identifier__$4 = "data-v-53d19bab";
8574
+ /* functional template */
8575
+
8576
+ var __vue_is_functional_template__$4 = false;
8577
+ /* style inject shadow dom */
8578
+
8579
+ var __vue_component__$5 = /*#__PURE__*/normalizeComponent({
8580
+ render: __vue_render__$4,
8581
+ staticRenderFns: __vue_staticRenderFns__$4
8582
+ }, __vue_inject_styles__$4, __vue_script__$4, __vue_scope_id__$4, __vue_is_functional_template__$4, __vue_module_identifier__$4, false, undefined, createInjectorSSR, undefined);
8583
+
8584
+ var MultipleFilePreview = __vue_component__$5;//
8585
+ var script$3 = {
8586
+ components: {
8587
+ SingleFilePreview: SingleFilePreview,
8588
+ MultipleFilePreview: MultipleFilePreview
8589
+ },
8590
+ props: {
8591
+ textId: {
8592
+ type: String,
8593
+ required: true
8594
+ },
8595
+ dictionary: {
8596
+ type: Object,
8597
+ required: true
8598
+ },
8599
+ fileSettings: {
8600
+ type: Object,
8601
+ required: false
8602
+ },
8603
+ cssStyle: {
8604
+ type: Object,
8605
+ required: false
8606
+ }
8607
+ },
8608
+ data: function data() {
8609
+ return {
8610
+ file: [],
8611
+ openFiles: false,
8612
+ showFilePreview: false,
8613
+ imagePreview: "",
8614
+ isDoc: false,
8615
+ fileFormatError: false,
8616
+ validFileFormats: ""
8617
+ };
8618
+ },
8619
+ computed: {
8620
+ previewContainerClass: function previewContainerClass() {
8621
+ if (this.fileFormatError) return "isError";
8622
+ if (this.fileSettings.multiple) return "isMultiple";
8623
+ if (this.isDoc) return "isDoc";
8624
+ return "isMsg";
8625
+ }
8626
+ },
8627
+ methods: {
8628
+ toggleFiles: function toggleFiles() {
8629
+ this.openFiles = !this.openFiles;
8630
+ },
8631
+ openSelectFileHandler: function openSelectFileHandler(type) {
8632
+ var fileInput = document.querySelector("#".concat(type, "-").concat(this.textId));
8633
+ if (fileInput) fileInput.click();
8634
+ if (!fileInput) if (!document.querySelector(".toasted.toasted-primary.error")) this.$toasted.global.defaultError();
8635
+ },
8636
+ isFileValid: function isFileValid(type, fileName) {
8637
+ var extensions = type === "img" ? this.fileSettings.imagesExtensions : this.fileSettings.docsExtensions;
8638
+ var regex = new RegExp("(" + extensions + ")", "i");
8639
+ if (regex.test(fileName)) return true;
8640
+ this.showToastedValidFormats();
8641
+ return false;
8642
+ },
8643
+ showToastedValidFormats: function showToastedValidFormats() {
8644
+ if (!document.querySelector(".toasted.toasted-primary.error")) this.$toasted.global.defaultError({
8645
+ msg: this.dictionary.msg_formato_invalido
8646
+ });
8647
+ var str = {
8648
+ img: this.fileSettings.imagesExtensions.split("|").join(", "),
8649
+ doc: this.fileSettings.docsExtensions.split("|").join(", ")
8650
+ };
8651
+ if (!document.querySelector(".toasted.toasted-primary.info")) this.$toasted.global.showValidFormats({
8652
+ msg: "Imagens: ".concat(str.img, " - Documentos: ").concat(str.doc, " ").concat(this.dictionary.msg_extensoes_aceitas)
8653
+ });
8654
+ },
8655
+ fileUpload: function fileUpload(event, type, externalCall) {
8656
+ try {
8657
+ this.openFiles = false;
8658
+ if (this.showFilePreview) this.deleteFile();
8659
+ this.file = !externalCall ? event.target.files ? event.target.files : event.dataTransfer.files : event;
8660
+
8661
+ if (!this.file.length) {
8662
+ this.file = [];
8663
+ return;
8664
+ }
8665
+
8666
+ this.showFilePreview = true;
8667
+
8668
+ if (!this.fileSettings.multiple) {
8669
+ this.file = this.file[0];
8670
+ this.singleFileUpload(type, this.file.name);
8671
+ } else {
8672
+ this.multipleFileUpload();
8673
+ }
8674
+ } catch (e) {
8675
+ console.error("Error file upload");
8676
+ console.error(e);
8677
+ }
8678
+ },
8679
+ returnFileType: function returnFileType(file) {
8680
+ var imgRegex = new RegExp("\.(" + this.fileSettings.imagesExtensions + ")", "i");
8681
+ if (imgRegex.test(file.name)) return "img";
8682
+ var docRegex = new RegExp("\.(" + this.fileSettings.docsExtensions + ")", "i");
8683
+ if (docRegex.test(file.name)) return "doc";
8684
+ return "";
8685
+ },
8686
+ multipleFileUpload: function multipleFileUpload() {
8687
+ var _this = this;
8688
+
8689
+ var waitForImageLoad = false;
8690
+ this.file = Array.from(this.file);
8691
+ this.file.forEach(function (file) {
8692
+ var fileReader = new FileReader();
8693
+
8694
+ var singleFileType = _this.returnFileType(file);
8695
+
8696
+ if (!singleFileType) file.invalid = true;
8697
+ file.imgOrDoc = singleFileType ? singleFileType : "";
8698
+ if (file.imgOrDoc === "doc") _this.isDoc = true;
8699
+
8700
+ if (file.imgOrDoc === "img") {
8701
+ waitForImageLoad = true;
8702
+
8703
+ fileReader.onload = function () {
8704
+ return file.src = fileReader.result;
8705
+ };
8706
+
8707
+ fileReader.onloadend = function () {
8708
+ return _this.emitFileVars(true);
8709
+ };
8710
+ }
8711
+
8712
+ if (_this.isFileValid(file.imgOrDoc, file.name)) {
8713
+ if (file.imgOrDoc === "img") fileReader.readAsDataURL(file);
8714
+ } else {
8715
+ file.invalid = true;
8716
+ _this.fileFormatError = true;
8717
+ _this.validFileFormats = "".concat(file.imgOrDoc === "img" ? _this.fileSettings.imagesExtensions.split("|").join(", ") : _this.fileSettings.docsExtensions.split("|").join(", "), " ").concat(_this.dictionary.msg_extensoes_aceitas);
8718
+ }
8719
+ });
8720
+ if (this.isDoc && !waitForImageLoad) this.emitFileVars();
8721
+ },
8722
+ singleFileUpload: function singleFileUpload(type, fileName) {
8723
+ var _this2 = this;
8724
+
8725
+ var fileReader = new FileReader();
8726
+
8727
+ if (type === "img") {
8728
+ fileReader.onload = function () {
8729
+ return _this2.imagePreview = fileReader.result;
8730
+ };
8731
+
8732
+ fileReader.onloadend = function () {
8733
+ return _this2.emitFileVars();
8734
+ };
8735
+ }
8736
+
8737
+ if (this.isFileValid(type, fileName)) {
8738
+ if (type === "img") fileReader.readAsDataURL(this.file);
8739
+ if (type === "doc") this.isDoc = true;
8740
+ this.fileFormatError = false;
8741
+ } else {
8742
+ this.fileFormatError = true;
8743
+ this.validFileFormats = "".concat(type === "img" ? this.fileSettings.imagesExtensions.split("|").join(", ") : this.fileSettings.docsExtensions.split("|").join(", "), " ").concat(this.dictionary.msg_extensoes_aceitas);
8744
+ }
8745
+
8746
+ if (this.isDoc) this.emitFileVars();
8747
+ },
8748
+ emitFileVars: function emitFileVars() {
8749
+ var vars = {
8750
+ file: this.file,
8751
+ isDoc: this.isDoc,
8752
+ showFilePreview: this.showFilePreview,
8753
+ imagePreview: this.imagePreview,
8754
+ fileFormatError: this.fileFormatError
8755
+ };
8756
+ this.$emit("set-file-vars", vars);
8757
+ this.$parent.focusTextarea();
8758
+ },
8759
+ deleteSpecificFile: function deleteSpecificFile(obj) {
8760
+ var fileName = obj.fileName;
8761
+ this.file = this.file.filter(function (file) {
8762
+ return file.name != fileName;
8763
+ });
8764
+ this.file.length ? this.emitFileVars(true) : this.deleteFile();
8765
+ },
8766
+ deleteFile: function deleteFile() {
8767
+ this.$emit("set-file-vars", {
8768
+ file: [],
8769
+ isDoc: false,
8770
+ showFilePreview: false,
8771
+ imagePreview: "",
8772
+ fileFormatError: false
8773
+ });
8774
+ this.file = [];
8775
+ this.isDoc = false;
8776
+ this.showFilePreview = false;
8777
+ this.imagePreview = "";
8778
+ this.fileFormatError = false;
8779
+ this.validFileFormats = "";
8780
+ },
8781
+ openImage: function openImage(imagePreview) {
8782
+ this.$emit("open-image", !imagePreview ? this.imagePreview : imagePreview);
8783
+ }
8784
+ }
8785
+ };/* script */
8786
+ var __vue_script__$3 = script$3;
8787
+ /* template */
8788
+
8789
+ var __vue_render__$3 = function __vue_render__() {
8790
+ var _vm = this;
8791
+
8792
+ var _h = _vm.$createElement;
8793
+
8794
+ var _c = _vm._self._c || _h;
8795
+
8796
+ return _c('span', {
8797
+ staticClass: "text-footer-actions--btn",
8798
+ class: {
8799
+ 'files-activated': _vm.openFiles
8800
+ },
8801
+ attrs: {
8802
+ "title": _vm.dictionary.title_selecionar_anexo
8803
+ },
8804
+ on: {
8805
+ "click": function click($event) {
8806
+ _vm.fileSettings.multiple ? _vm.openSelectFileHandler('both') : _vm.toggleFiles;
8807
+ }
8808
+ }
8809
+ }, [_c('fa-icon', {
8810
+ attrs: {
8811
+ "icon": ['fas', 'paperclip']
8812
+ }
8813
+ }), _vm._ssrNode(" "), _c('transition', {
8814
+ attrs: {
8815
+ "name": "show"
8816
+ }
8817
+ }, [_vm.openFiles ? _c('div', {
8818
+ staticClass: "text-footer-files-container",
8819
+ class: {
8820
+ 'horizontal': _vm.cssStyle.outsideButtons
8821
+ }
8822
+ }, [_c('div', {
8823
+ staticClass: "files-btn images",
8824
+ class: {
8825
+ 'margin-bottom': _vm.cssStyle.outsideButtons
8826
+ },
8827
+ attrs: {
8828
+ "title": _vm.dictionary.title_anexo_img
8829
+ },
8830
+ on: {
8831
+ "click": function click($event) {
8832
+ return _vm.openSelectFileHandler('img');
8833
+ }
8834
+ }
8835
+ }, [_c('fa-icon', {
8836
+ attrs: {
8837
+ "icon": ['fas', 'image']
8838
+ }
8839
+ })], 1), _vm._v(" "), _c('div', {
8840
+ staticClass: "files-btn docs",
8841
+ attrs: {
8842
+ "title": _vm.dictionary.title_anexo_doc
8843
+ },
8844
+ on: {
8845
+ "click": function click($event) {
8846
+ return _vm.openSelectFileHandler('doc');
8847
+ }
8848
+ }
8849
+ }, [_c('fa-icon', {
8850
+ attrs: {
8851
+ "icon": ['fas', 'file-alt']
8852
+ }
8853
+ })], 1)]) : _vm._e()]), _vm._ssrNode(" <div class=\"files-pointers d-none\">" + (_vm.fileSettings.multiple ? "<input type=\"file\"" + _vm._ssrAttr("id", "both-" + _vm.textId) + " accept=\"image/*,application/*\" multiple=\"multiple\">" : "<!---->") + " " + (!_vm.fileSettings.multiple ? "<input type=\"file\"" + _vm._ssrAttr("id", "img-" + _vm.textId) + " accept=\"image/*\">" : "<!---->") + " " + (!_vm.fileSettings.multiple ? "<input type=\"file\"" + _vm._ssrAttr("id", "doc-" + _vm.textId) + " accept=\"application/*\">" : "<!---->") + "</div> "), _c('transition', {
8854
+ attrs: {
8855
+ "name": "fade"
8856
+ }
8857
+ }, [_vm.showFilePreview ? _c('div', {
8858
+ staticClass: "text-footer-preview-container",
8859
+ class: [_vm.previewContainerClass],
8860
+ on: {
8861
+ "click": function click($event) {
8862
+ $event.stopPropagation();
8863
+ }
8864
+ }
8865
+ }, [!_vm.fileSettings.multiple ? _c('SingleFilePreview', {
8866
+ attrs: {
8867
+ "dictionary": _vm.dictionary,
8868
+ "file": _vm.file,
8869
+ "isDoc": _vm.isDoc,
8870
+ "fileFormatError": _vm.fileFormatError,
8871
+ "validFileFormats": _vm.validFileFormats,
8872
+ "imagePreview": _vm.imagePreview
8873
+ },
8874
+ on: {
8875
+ "delete-file": _vm.deleteFile,
8876
+ "open-image": _vm.openImage
8877
+ }
8878
+ }) : _c('MultipleFilePreview', {
8879
+ attrs: {
8880
+ "dictionary": _vm.dictionary,
8881
+ "file": _vm.file,
8882
+ "fileFormatError": _vm.fileFormatError,
8883
+ "validFileFormats": _vm.validFileFormats
8884
+ },
8885
+ on: {
8886
+ "delete-file": _vm.deleteFile,
8887
+ "delete-specific-file": _vm.deleteSpecificFile,
8888
+ "open-image": _vm.openImage
8889
+ }
8890
+ })], 1) : _vm._e()])], 2);
8891
+ };
8892
+
8893
+ var __vue_staticRenderFns__$3 = [];
8894
+ /* style */
8895
+
8896
+ var __vue_inject_styles__$3 = function __vue_inject_styles__(inject) {
8897
+ if (!inject) return;
8898
+ inject("data-v-3d12f7cc_0", {
8899
+ source: ".fade-enter-active,.fade-leave-active{transition:opacity .3s}.fade-enter,.fade-leave-to{opacity:0}",
8900
+ map: undefined,
8901
+ media: undefined
8902
+ });
8903
+ };
8904
+ /* scoped */
8905
+
8906
+
8907
+ var __vue_scope_id__$3 = undefined;
8908
+ /* module identifier */
8909
+
8910
+ var __vue_module_identifier__$3 = "data-v-3d12f7cc";
8911
+ /* functional template */
8912
+
8913
+ var __vue_is_functional_template__$3 = false;
8914
+ /* style inject shadow dom */
8915
+
8916
+ var __vue_component__$4 = /*#__PURE__*/normalizeComponent({
8917
+ render: __vue_render__$3,
8918
+ staticRenderFns: __vue_staticRenderFns__$3
8919
+ }, __vue_inject_styles__$3, __vue_script__$3, __vue_scope_id__$3, __vue_is_functional_template__$3, __vue_module_identifier__$3, false, undefined, createInjectorSSR, undefined);
8920
+
8921
+ var BtnFiles = __vue_component__$4;//
8922
+ var script$2 = {
8923
+ components: {
8924
+ EmojisTextFooter: EmojisTextFooter,
8925
+ Loader: Loader,
8926
+ BtnMic: BtnMic,
8927
+ BtnFiles: BtnFiles,
8928
+ RemainingCharacters: RemainingCharacters
8929
+ },
8930
+ mixins: [mixin_1],
8931
+ props: {
8932
+ buttons: {
8933
+ type: Object,
8934
+ default: function _default() {
8935
+ return {
8936
+ hasEmojis: false,
8937
+ hasSendButton: false,
8938
+ hasFiles: false,
8939
+ hasAudio: false
8940
+ };
8941
+ },
8942
+ required: false
8943
+ },
8944
+ cssStyle: {
8945
+ type: Object,
8946
+ default: function _default() {
8947
+ return {
8948
+ width: "full",
8949
+ backgroundColor: "#FFF",
8950
+ outsideButtons: false
8951
+ };
8952
+ },
8953
+ required: false
8954
+ },
8955
+ textareaSettings: {
8956
+ type: Object,
8957
+ default: function _default() {
8958
+ return {
8959
+ placeholderMessage: "",
8960
+ maxCharacters: 0,
8961
+ sendOnEnter: false,
8962
+ disabled: false
8963
+ };
8964
+ },
8965
+ required: false
8966
+ },
8967
+ emojiSettings: {
8968
+ type: Object,
8969
+ default: function _default() {
8970
+ return {
8971
+ openEmojisFrom: "top",
8972
+ smallEmojis: false
8973
+ };
8974
+ },
8975
+ required: false
8976
+ },
8977
+ formattedMessageSettings: {
8978
+ type: Object,
8979
+ default: function _default() {
8980
+ return {
8981
+ hasHsm: false,
8982
+ msgType: 0
8983
+ };
8984
+ },
8985
+ required: false
8986
+ },
8987
+ fileSettings: {
8988
+ type: Object,
8989
+ default: function _default() {
8990
+ return {
8991
+ docsExtensions: "",
8992
+ imagesExtensions: "",
8993
+ multiple: false
8994
+ };
8995
+ },
8996
+ required: false
8997
+ },
8998
+ textId: {
8999
+ type: String,
9000
+ required: true
9001
+ },
9002
+ isMainChat: {
9003
+ type: Boolean,
9004
+ default: false,
9005
+ required: false
9006
+ },
9007
+ isSending: {
9008
+ type: Boolean,
9009
+ default: false,
9010
+ required: false
9011
+ },
9012
+ dictionary: {
9013
+ type: Object,
9014
+ required: true
9015
+ }
9016
+ },
9017
+ data: function data() {
9018
+ return {
9019
+ message: "",
9020
+ openFiles: false,
9021
+ file: [],
9022
+ showFilePreview: false,
9023
+ imagePreview: "",
9024
+ isDoc: false,
9025
+ fileFormatError: false,
9026
+ audioFile: "",
9027
+ audioSource: ""
9028
+ };
9029
+ },
9030
+ created: function created() {
9031
+ this.$root.$refs["tf-".concat(this.textId)] = this;
9032
+ },
9033
+ mounted: function mounted() {
9034
+ setResizeListeners(this.$el, ".js-autoresize", ".js-parentresize"); // this.$root.$on("drop-file", (file, type) => { if(this.buttons.hasFiles) this.fileUpload(file, type, true) })
9035
+ // this.$root.$on("toggle-msg-formatada", () => { this.toggleHSM() })
9036
+ // this.$root.$on("textarea-focus", () => { this.focusTextarea() })
9037
+ // this.$root.$on("resize-footer-template", () => { this.adjustChatHeight() })
9038
+ // this.$root.$on("clear-footer-message", () => { this.message = "" })
9039
+ // if(this.cssStyle.outsideButtons) if(this.$root.$refs.chatCorpo) this.$root.$refs.chatCorpo.setOutsideButtons(this.cssStyle.outsideButtons)
9040
+ },
9041
+ methods: {
9042
+ closeEmojis: function closeEmojis() {
9043
+ try {
9044
+ this.$root.$refs["etf-".concat(this.textId)].showEmojis ? this.$root.$refs["etf-".concat(this.textId)].away() : '';
9045
+ } catch (e) {
9046
+ console.error("Nao foi possivel fechar os emojis");
9047
+ console.error(e);
9048
+ }
9049
+ },
9050
+ away: function away() {
9051
+ if (this.$refs["".concat(this.textId, "-file")]) this.$refs["".concat(this.textId, "-file")].openFiles = false;
9052
+ },
9053
+ setDefaultMessage: function setDefaultMessage(msg) {
8213
9054
  this.message = msg;
8214
9055
  this.sendFinalMessage();
8215
9056
  },
@@ -8236,7 +9077,16 @@ var script$2 = {
8236
9077
  if (this.textareaSettings.disabled) return false;
8237
9078
 
8238
9079
  if (this.fileFormatError) {
8239
- this.$toasted.global.formatoInvalido();
9080
+ this.$toasted.global.defaultError({
9081
+ msg: this.dictionary.msg_formato_invalido
9082
+ });
9083
+ var str = {
9084
+ img: this.fileSettings.imagesExtensions.split("|").join(", "),
9085
+ doc: this.fileSettings.docsExtensions.split("|").join(", ")
9086
+ };
9087
+ this.$toasted.global.showValidFormats({
9088
+ msg: "Imagens: ".concat(str.img, " - Documentos: ").concat(str.doc, " ").concat(this.dictionary.msg_extensoes_aceitas)
9089
+ });
8240
9090
  return false;
8241
9091
  }
8242
9092
 
@@ -8277,243 +9127,148 @@ var script$2 = {
8277
9127
  }
8278
9128
 
8279
9129
  if (!this.buttons.hasSendButton) return;
8280
- var messageAux = this.formatMessage(this.message);
8281
-
8282
- if (this.verifyMessage()) {
8283
- if (messageAux.message || this.showFilePreview || this.audioFile) {
8284
- this.$emit("send-message", messageAux);
8285
- var objMessage = this.returnObjectMessage(messageAux);
8286
- this.$emit("obj-message", objMessage);
8287
- if (this.$refs["emoji-text-".concat(this.textId)] && this.$refs["emoji-text-".concat(this.textId)].showEmojis) this.$refs["emoji-text-".concat(this.textId)].toggleEmojiSelection();
8288
- this.resetFooterData();
8289
- }
8290
- }
8291
- },
8292
- focusTextarea: function focusTextarea() {
8293
- var textarea = document.querySelector("#text-footer-".concat(this.textId));
8294
- if (textarea) textarea.focus();
8295
- },
8296
- resetFooterData: function resetFooterData() {
8297
- if (this.audioFile) this.deleteAudio();
8298
- if (this.showFilePreview) this.deleteFile();
8299
- this.message = "";
8300
- this.sendFinalMessage();
8301
- resetTargets(this.$el, ".js-autoresize", ".js-parentresize", "38px");
8302
- this.focusTextarea();
8303
- },
8304
- activeFormatHourMessage: function activeFormatHourMessage() {
8305
- return formataHoraMensagem(false);
8306
- },
8307
- returnObjectMessage: function returnObjectMessage(message) {
8308
- return {
8309
- message: message,
8310
- data: this.$store.getters.getDataServer ? this.$store.getters.getDataServer.slice(0, 10) : '',
8311
- hora: this.activeFormatHourMessage(),
8312
- anexo: this.showFilePreview ? this.file : false,
8313
- imgAnexo: this.imagePreview,
8314
- isDoc: this.isDoc,
8315
- audio: this.audioFile ? this.audioFile : false,
8316
- audioAnexo: this.audioSource,
8317
- seq: null
8318
- };
8319
- },
8320
- toggleFiles: function toggleFiles() {
8321
- this.openFiles = !this.openFiles;
8322
- },
8323
- selectImage: function selectImage() {
8324
- if (this.$store.getters.getChatBlocker) return this.toggleFiles();
8325
- var fileInput = document.querySelector("#file-".concat(this.textId));
8326
- if (fileInput) fileInput.click();
8327
- if (!fileInput) if (!document.querySelector(".toasted.toasted-primary.error")) this.$toasted.global.defaultError();
8328
- },
8329
- selectDoc: function selectDoc() {
8330
- if (this.$store.getters.getChatBlocker) return this.toggleFiles();
8331
- var fileInput = document.querySelector("#doc-".concat(this.textId));
8332
- if (fileInput) fileInput.click();
8333
- if (!fileInput) if (!document.querySelector(".toasted.toasted-primary.error")) this.$toasted.global.defaultError();
8334
- },
8335
- isFileValid: function isFileValid(type) {
8336
- var extensions = type === "img" ? this.fileSettings.imagesExtensions : this.fileSettings.docsExtensions;
8337
- var regex = new RegExp("(" + extensions + ")", "i");
8338
- if (regex.test(this.file.name)) return true;
8339
- this.$toasted.global.formatoInvalido();
8340
- return false;
8341
- },
8342
- fileUpload: function fileUpload(event, type, externalCall) {
8343
- var _this2 = this;
8344
-
8345
- this.openFiles = false;
8346
- if (this.showFilePreview) this.deleteFile();
8347
- var fileReader = new FileReader();
8348
- this.file = !externalCall ? event.target.files || event.dataTransfer.files : event;
8349
-
8350
- if (!this.file.length) {
8351
- this.file = [];
8352
- return;
8353
- }
8354
-
8355
- this.file = this.file[0];
8356
-
8357
- if (!externalCall) {
8358
- var selector = type === "img" ? "#file-".concat(this.textId) : "#doc-".concat(this.textId);
8359
- document.querySelector(selector).value = "";
8360
- }
8361
-
8362
- this.showFilePreview = true;
8363
-
8364
- if (type === "img") {
8365
- fileReader.onload = function () {
8366
- _this2.imagePreview = fileReader.result;
8367
- };
8368
- }
9130
+ var messageAux = this.formatMessage(this.message);
8369
9131
 
8370
- if (this.isFileValid(type)) {
8371
- if (type === "img") fileReader.readAsDataURL(this.file);
8372
- if (type === "doc") this.isDoc = true;
8373
- this.focusTextarea();
8374
- this.fileFormatError = false;
8375
- } else {
8376
- this.fileFormatError = true;
8377
- this.validFileFormats = "".concat(type === "img" ? this.fileSettings.imagesExtensions : this.fileSettings.docsExtensions, " ").concat(this.dictionary.msg_extensoes_aceitas);
9132
+ if (this.verifyMessage()) {
9133
+ if (messageAux || this.showFilePreview || this.audioFile) {
9134
+ this.$emit("send-message", messageAux);
9135
+ var objMessage = this.returnObjectMessage(messageAux);
9136
+ this.$emit("obj-message", objMessage);
9137
+ if (this.$refs["emoji-text-".concat(this.textId)] && this.$refs["emoji-text-".concat(this.textId)].showEmojis) this.$refs["emoji-text-".concat(this.textId)].toggleEmojiSelection();
9138
+ this.resetFooterData();
9139
+ }
8378
9140
  }
8379
9141
  },
8380
- deleteFile: function deleteFile() {
8381
- this.file = [];
8382
- this.isDoc = false;
8383
- this.showFilePreview = false;
8384
- this.imagePreview = "";
8385
- this.fileFormatError = false;
8386
- this.validFileFormats = "";
9142
+ focusTextarea: function focusTextarea() {
9143
+ var textarea = document.querySelector("#text-footer-".concat(this.textId));
9144
+ if (textarea) textarea.focus();
8387
9145
  },
8388
- openImage: function openImage() {
8389
- this.$store.dispatch("toggleBlocker", {
8390
- state: true,
8391
- origin: "visualizar-imagem"
9146
+ resetFooterData: function resetFooterData() {
9147
+ if (this.audioFile) this.deleteAudio();
9148
+ if (this.showFilePreview) this.$refs["".concat(this.textId, "-file")].deleteFile();
9149
+ this.message = "";
9150
+ this.sendFinalMessage();
9151
+ resetTargets(this.$el, ".js-autoresize", ".js-parentresize", "38px");
9152
+ this.focusTextarea();
9153
+ },
9154
+ returnObjectMessage: function returnObjectMessage(message) {
9155
+ return {
9156
+ message: message,
9157
+ attachment: this.showFilePreview ? this.file : false,
9158
+ isDoc: this.isDoc,
9159
+ imagePreview: this.imagePreview,
9160
+ isAudio: this.audioFile ? true : false,
9161
+ audioAttachment: this.audioSource
9162
+ };
9163
+ },
9164
+ setFileVars: function setFileVars(fileObj) {
9165
+ var file = fileObj.file,
9166
+ showFilePreview = fileObj.showFilePreview,
9167
+ imagePreview = fileObj.imagePreview,
9168
+ isDoc = fileObj.isDoc,
9169
+ fileFormatError = fileObj.fileFormatError;
9170
+ this.file = file;
9171
+ this.showFilePreview = showFilePreview;
9172
+ this.imagePreview = imagePreview ? imagePreview : "";
9173
+ this.isDoc = isDoc;
9174
+ this.fileFormatError = fileFormatError;
9175
+ },
9176
+ openImage: function openImage(imagePreview) {
9177
+ this.$emit("open-image", imagePreview);
9178
+ },
9179
+ setAudio: function setAudio(audioObj) {
9180
+ var audioFile = audioObj.audioFile,
9181
+ audioSource = audioObj.audioSource;
9182
+ this.audioFile = audioFile;
9183
+ this.audioSource = audioSource;
9184
+ },
9185
+ deleteAudio: function deleteAudio() {
9186
+ this.$refs["".concat(this.textId, "-mic")].deleteMediaRecorder();
9187
+ this.audioFile = "";
9188
+ this.audioSource = "";
9189
+ },
9190
+ returnFileType: function returnFileType(file, stopAlert) {
9191
+ var imgRegex = new RegExp("\.(" + this.fileSettings.imagesExtensions + ")", "i");
9192
+ if (imgRegex.test(file.name)) return "img";
9193
+ var docRegex = new RegExp("\.(" + this.fileSettings.docsExtensions + ")", "i");
9194
+ if (docRegex.test(file.name)) return "doc";
9195
+ if (!stopAlert) return;
9196
+ if (!document.querySelector(".toasted.toasted-primary.error")) this.$toasted.global.defaultError({
9197
+ msg: this.dictionary.msg_formato_invalido
9198
+ });
9199
+ var str = {
9200
+ img: this.fileSettings.imagesExtensions.split("|").join(", "),
9201
+ doc: this.fileSettings.docsExtensions.split("|").join(", ")
9202
+ };
9203
+ this.$toasted.global.showValidFormats({
9204
+ msg: "Imagens: ".concat(str.img, " - Documentos: ").concat(str.doc, " ").concat(this.dictionary.msg_extensoes_aceitas)
8392
9205
  });
8393
- this.$store.dispatch("setLinkImagem", this.imagePreview);
9206
+ return false;
8394
9207
  },
8395
- initAudioRecorder: function initAudioRecorder() {
8396
- var _this3 = this;
8397
-
8398
- navigator.mediaDevices.getUserMedia({
8399
- audio: true
8400
- }).then(function (stream) {
8401
- _this3.mediaRecorder = new MediaRecorder(stream);
8402
- var audioChunks = [];
9208
+ filesHandler: function filesHandler(files) {
9209
+ var _this = this;
8403
9210
 
8404
- _this3.mediaRecorder.ondataavailable = function (eventData) {
8405
- audioChunks.push(eventData.data);
8406
- };
9211
+ var fileType = this.returnFileType(files[0], true);
9212
+ var invalidFile = false;
9213
+ files.forEach(function (file) {
9214
+ var singleFileType = _this.returnFileType(file, true);
8407
9215
 
8408
- _this3.mediaRecorder.onstop = function () {
8409
- var blob = new Blob(audioChunks, {
8410
- type: "audio/mpeg"
8411
- });
8412
- blob.lastModifiedDate = new Date();
8413
- blob.name = "im-audio-file-".concat(_this3.$store.getters.getNomeOpe, "-").concat(parseInt(Math.random() * 5000));
8414
- var reader = new FileReader();
8415
- reader.readAsDataURL(blob);
9216
+ if (!singleFileType) {
9217
+ invalidFile = true;
9218
+ file.invalid = true;
9219
+ }
8416
9220
 
8417
- reader.onloadend = function () {
8418
- _this3.audioFile = new File([blob], "".concat(blob.name, ".mpeg"), {
8419
- type: blob.type
8420
- });
8421
- _this3.audioSource = reader.result;
8422
- };
9221
+ file.imgOrDoc = singleFileType ? singleFileType : "";
9222
+ });
8423
9223
 
8424
- stream.getTracks().forEach(function (track) {
8425
- return track.stop();
8426
- });
9224
+ if (!invalidFile) {
9225
+ this.$refs["".concat(this.textId, "-file")].fileUpload(files, fileType, true);
9226
+ } else {
9227
+ this.$toasted.global.defaultError({
9228
+ msg: this.dictionary.msg_formato_invalido
9229
+ });
9230
+ var str = {
9231
+ img: this.fileSettings.imagesExtensions.split("|").join(", "),
9232
+ doc: this.fileSettings.docsExtensions.split("|").join(", ")
8427
9233
  };
8428
-
8429
- _this3.toggleAudioRecorder();
8430
- }, function (error) {
8431
- _this3.$toasted.global.defaultError({
8432
- msg: _this3.dictionary.msg_permitir_audio
9234
+ this.$toasted.global.showValidFormats({
9235
+ msg: "Imagens: ".concat(str.img, " - Documentos: ").concat(str.doc, " ").concat(this.dictionary.msg_extensoes_aceitas)
8433
9236
  });
8434
-
8435
- console.error("error audio recorder: ", error);
8436
- });
8437
- },
8438
- toggleAudioRecorder: function toggleAudioRecorder() {
8439
- if (!this.mediaRecorder.state) return this.initAudioRecorder();
8440
- this.isRecording = !this.isRecording;
8441
- if (this.isRecording) return this.mediaRecorder.start();
8442
- return this.mediaRecorder.stop();
9237
+ }
8443
9238
  },
8444
- deleteAudio: function deleteAudio() {
8445
- this.mediaRecorder = {};
8446
- this.audioFile = "";
9239
+ dropFile: function dropFile(e) {
9240
+ try {
9241
+ e.stopPropagation();
9242
+ e.preventDefault();
9243
+ var files = e.dataTransfer.files.length ? e.dataTransfer.files : "";
9244
+ this.filesHandler(files);
9245
+ } catch (e) {
9246
+ console.error("Erro drop file");
9247
+ console.error(e);
9248
+ }
8447
9249
  },
8448
9250
  pasteImage: function pasteImage(e) {
8449
- if (e.clipboardData.files.length && !this.buttons.hasFiles) {
8450
- e.preventDefault();
8451
- return;
8452
- } else if (e.clipboardData.files.length && this.buttons.hasFiles) {
8453
- var file = e.clipboardData.files;
8454
- var fileType = "";
8455
- var imgRegex = new RegExp("(" + this.fileSettings.imagesExtensions + ")", "i");
8456
- if (imgRegex.test(file[0].name)) fileType = "img";
8457
- var docRegex = new RegExp("(" + this.fileSettings.docsExtensions + ")", "i");
8458
- if (docRegex.test(file[0].name)) fileType = "doc";
8459
-
8460
- if (fileType) {
8461
- this.fileUpload(file, fileType, true);
8462
- } else {
8463
- this.$toasted.global.formatoInvalido();
8464
- this.$toasted.global.formatosValidos();
9251
+ try {
9252
+ if (e.clipboardData.files.length && !this.buttons.hasFiles) {
9253
+ e.preventDefault();
9254
+ return;
9255
+ } else if (e.clipboardData.files.length && this.buttons.hasFiles) {
9256
+ var files = e.clipboardData.files;
9257
+ this.filesHandler(files);
8465
9258
  }
9259
+ } catch (e) {
9260
+ console.error("Nao foi possivel colar a/o imagem/documento");
9261
+ console.error(e);
8466
9262
  }
8467
9263
  }
8468
9264
  },
8469
- destroyed: function destroyed() {
8470
- this.$root.$off("drop-file");
8471
- this.$root.$off("toggle-msg-formatada");
8472
- this.$root.$off("textarea-focus");
8473
- this.$root.$off("clear-footer-message");
8474
- this.$root.$off("resize-footer-template");
9265
+ destroyed: function destroyed() {// this.$root.$off("drop-file")
9266
+ // this.$root.$off("toggle-msg-formatada")
9267
+ // this.$root.$off("textarea-focus")
9268
+ // this.$root.$off("clear-footer-message")
9269
+ // this.$root.$off("resize-footer-template")
8475
9270
  }
8476
- };function createInjectorSSR(context) {
8477
- if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
8478
- context = __VUE_SSR_CONTEXT__;
8479
- }
8480
- if (!context)
8481
- return () => { };
8482
- if (!('styles' in context)) {
8483
- context._styles = context._styles || {};
8484
- Object.defineProperty(context, 'styles', {
8485
- enumerable: true,
8486
- get: () => context._renderStyles(context._styles)
8487
- });
8488
- context._renderStyles = context._renderStyles || renderStyles;
8489
- }
8490
- return (id, style) => addStyle(id, style, context);
8491
- }
8492
- function addStyle(id, css, context) {
8493
- const group = css.media || 'default' ;
8494
- const style = context._styles[group] || (context._styles[group] = { ids: [], css: '' });
8495
- if (!style.ids.includes(id)) {
8496
- style.media = css.media;
8497
- style.ids.push(id);
8498
- let code = css.source;
8499
- style.css += code + '\n';
8500
- }
8501
- }
8502
- function renderStyles(styles) {
8503
- let css = '';
8504
- for (const key in styles) {
8505
- const style = styles[key];
8506
- css +=
8507
- '<style data-vue-ssr-id="' +
8508
- Array.from(style.ids).join(' ') +
8509
- '"' +
8510
- (style.media ? ' media="' + style.media + '"' : '') +
8511
- '>' +
8512
- style.css +
8513
- '</style>';
8514
- }
8515
- return css;
8516
- }/* script */
9271
+ };/* script */
8517
9272
  var __vue_script__$2 = script$2;
8518
9273
  /* template */
8519
9274
 
@@ -8531,8 +9286,26 @@ var __vue_render__$2 = function __vue_render__() {
8531
9286
  value: _vm.away,
8532
9287
  expression: "away"
8533
9288
  }],
8534
- staticClass: "text-footer-container"
8535
- }, [_vm._ssrNode("<div" + _vm._ssrClass("text-footer", _vm.cssStyle.width ? _vm.cssStyle.width : '') + _vm._ssrStyle(null, "background-color: " + _vm.cssStyle.backgroundColor, null) + ">", "</div>", [_vm.buttons.hasEmojis && !_vm.audioFile ? _c('emojis-text-footer', {
9289
+ staticClass: "text-footer-container",
9290
+ on: {
9291
+ "drop": function drop($event) {
9292
+ $event.stopPropagation();
9293
+ return _vm.dropFile.apply(null, arguments);
9294
+ },
9295
+ "dragenter": function dragenter($event) {
9296
+ $event.preventDefault();
9297
+ },
9298
+ "dragover": function dragover($event) {
9299
+ $event.preventDefault();
9300
+ }
9301
+ }
9302
+ }, [_vm._ssrNode("<div" + _vm._ssrClass("text-footer", _vm.cssStyle.width ? _vm.cssStyle.width : '') + _vm._ssrStyle(null, "background-color: " + _vm.cssStyle.backgroundColor, null) + ">", "</div>", [_c('EmojisTextFooter', {
9303
+ directives: [{
9304
+ name: "show",
9305
+ rawName: "v-show",
9306
+ value: _vm.buttons.hasEmojis && !_vm.audioFile,
9307
+ expression: "buttons.hasEmojis && !audioFile"
9308
+ }],
8536
9309
  ref: "" + this.textId,
8537
9310
  attrs: {
8538
9311
  "emojiId": "" + this.textId,
@@ -8542,148 +9315,60 @@ var __vue_render__$2 = function __vue_render__() {
8542
9315
  on: {
8543
9316
  "insert-emoji": _vm.insertEmoji
8544
9317
  }
8545
- }) : _vm._e(), _vm._ssrNode(" "), _c('transition', {
9318
+ }), _vm._ssrNode(" "), _c('transition', {
8546
9319
  attrs: {
8547
9320
  "name": "fade"
8548
9321
  }
8549
- }, [_vm.isSending ? _c('req-loader') : _vm._e()], 1), _vm._ssrNode(" "), !_vm.audioFile ? _vm._ssrNode("<textarea" + _vm._ssrAttr("id", "text-footer-" + this.textId) + _vm._ssrAttr("disabled", _vm.textareaSettings.disabled) + _vm._ssrAttr("placeholder", _vm.textareaSettings.placeholderMessage) + " class=\"js-autoresize\">", "</textarea>") : _vm._ssrNode("<div class=\"text-footer-audio\">", "</div>", [_vm._ssrNode("<audio" + _vm._ssrAttr("src", _vm.audioSource) + " controls=\"controls\"></audio> "), _vm._ssrNode("<span title=\"Cancelar\" class=\"delete-audio\">", "</span>", [_c('fa-icon', {
9322
+ }, [_vm.isSending ? _c('Loader') : _vm._e()], 1), _vm._ssrNode(" "), !_vm.audioFile ? _vm._ssrNode("<textarea" + _vm._ssrAttr("id", "text-footer-" + this.textId) + _vm._ssrAttr("disabled", _vm.textareaSettings.disabled) + _vm._ssrAttr("placeholder", _vm.textareaSettings.placeholderMessage) + " class=\"js-autoresize\">", "</textarea>") : _vm._ssrNode("<div class=\"text-footer-audio\">", "</div>", [_vm._ssrNode("<audio" + _vm._ssrAttr("src", _vm.audioSource) + " controls=\"controls\"></audio> "), _vm._ssrNode("<span title=\"Cancelar\" class=\"delete-audio\">", "</span>", [_c('fa-icon', {
8550
9323
  attrs: {
8551
9324
  "icon": ['fas', 'times']
8552
9325
  }
8553
- })], 1)], 2), _vm._ssrNode(" " + (_vm.textareaSettings.maxCharacters ? "<span" + _vm._ssrClass("max-characters no-width", {
8554
- 'd-none': _vm.audioFile
8555
- }) + ">" + _vm._ssrEscape(_vm._s("(" + this.remainingCharacters + ")")) + "</span>" : "<!---->") + " "), _vm.buttons.hasSendButton ? _vm._ssrNode("<div class=\"text-footer-actions\">", "</div>", [_vm._ssrNode("<span" + _vm._ssrAttr("title", _vm.dictionary.title_enviar_msg) + " class=\"text-footer-actions--btn\">", "</span>", [_c('fa-icon', {
8556
- attrs: {
8557
- "icon": ['fas', 'paper-plane']
8558
- }
8559
- })], 1)]) : _vm._e(), _vm._ssrNode(" "), _vm.buttons.hasFiles || _vm.buttons.hasAudio ? _vm._ssrNode("<div" + _vm._ssrClass("text-footer-actions", {
8560
- 'outside-buttons': _vm.cssStyle.outsideButtons && !_vm.audioFile
8561
- }) + ">", "</div>", [_vm.buttons.hasAudio && !_vm.audioFile ? _vm._ssrNode("<span" + _vm._ssrClass("text-footer-actions--btn", {
8562
- 'audio-activated': _vm.isRecording
8563
- }) + ">", "</span>", [_c('fa-icon', {
8564
- attrs: {
8565
- "icon": ['fas', 'microphone']
8566
- }
8567
- })], 1) : _vm._e(), _vm._ssrNode(" "), _vm.buttons.hasFiles && !_vm.audioFile ? _vm._ssrNode("<span" + _vm._ssrAttr("title", _vm.dictionary.title_selecionar_anexo) + _vm._ssrClass("text-footer-actions--btn", {
8568
- 'files-activated': _vm.openFiles
8569
- }) + ">", "</span>", [_c('fa-icon', {
8570
- attrs: {
8571
- "icon": ['fas', 'paperclip']
8572
- }
8573
- })], 1) : _vm._e()], 2) : _vm._e()], 2), _vm._ssrNode(" "), _c('transition', {
8574
- attrs: {
8575
- "name": "show"
8576
- }
8577
- }, [_vm.buttons.hasFiles && _vm.openFiles ? _c('div', {
8578
- staticClass: "text-footer-files-container",
8579
- class: {
8580
- 'horizontal': _vm.cssStyle.outsideButtons
8581
- }
8582
- }, [_c('div', {
8583
- staticClass: "files-btn images",
9326
+ })], 1)], 2), _vm._ssrNode(" "), _c('RemainingCharacters', {
8584
9327
  class: {
8585
- 'margin-bottom': _vm.cssStyle.outsideButtons
8586
- },
8587
- attrs: {
8588
- "title": _vm.dictionary.title_anexo_img
8589
- },
8590
- on: {
8591
- "click": _vm.selectImage
8592
- }
8593
- }, [_c('fa-icon', {
8594
- attrs: {
8595
- "icon": ['fas', 'image']
8596
- }
8597
- })], 1), _vm._v(" "), _c('div', {
8598
- staticClass: "files-btn docs",
8599
- attrs: {
8600
- "title": _vm.dictionary.title_anexo_doc
8601
- },
8602
- on: {
8603
- "click": _vm.selectDoc
8604
- }
8605
- }, [_c('fa-icon', {
8606
- attrs: {
8607
- "icon": ['fas', 'file-alt']
8608
- }
8609
- })], 1), _vm._v(" "), _c('div', {
8610
- staticClass: "files-pointers d-none"
8611
- }, [_c('input', {
8612
- attrs: {
8613
- "type": "file",
8614
- "id": "file-" + _vm.textId,
8615
- "accept": "image/*"
9328
+ 'd-none': _vm.audioFile
8616
9329
  },
8617
- on: {
8618
- "change": function change($event) {
8619
- return _vm.fileUpload($event, 'img');
8620
- }
8621
- }
8622
- }), _vm._v(" "), _c('input', {
8623
9330
  attrs: {
8624
- "type": "file",
8625
- "id": "doc-" + _vm.textId,
8626
- "accept": "application/*"
8627
- },
8628
- on: {
8629
- "change": function change($event) {
8630
- return _vm.fileUpload($event, 'doc');
8631
- }
9331
+ "message": _vm.message,
9332
+ "maxCharacters": _vm.textareaSettings.maxCharacters
8632
9333
  }
8633
- })])]) : _vm._e()]), _vm._ssrNode(" "), _c('transition', {
9334
+ }), _vm._ssrNode(" "), _vm.buttons.hasSendButton ? _vm._ssrNode("<div class=\"text-footer-actions\">", "</div>", [_vm._ssrNode("<span" + _vm._ssrAttr("title", _vm.dictionary.title_enviar_msg) + " class=\"text-footer-actions--btn\">", "</span>", [_c('fa-icon', {
8634
9335
  attrs: {
8635
- "name": "fade"
8636
- }
8637
- }, [_vm.showFilePreview ? _c('div', {
8638
- staticClass: "text-footer-preview-container",
8639
- class: {
8640
- 'isDoc': _vm.isDoc && !_vm.fileFormatError,
8641
- 'isImg': !_vm.isDoc && !_vm.fileFormatError,
8642
- 'isError': _vm.fileFormatError
9336
+ "icon": ['fas', 'paper-plane']
8643
9337
  }
8644
- }, [_c('span', {
8645
- staticClass: "text-footer-exclude-file",
9338
+ })], 1)]) : _vm._e(), _vm._ssrNode(" "), _vm.buttons.hasFiles || _vm.buttons.hasAudio ? _vm._ssrNode("<div" + _vm._ssrClass("text-footer-actions", {
9339
+ 'outside-buttons': _vm.cssStyle.outsideButtons && !_vm.audioFile
9340
+ }) + ">", "</div>", [_c('BtnMic', {
9341
+ directives: [{
9342
+ name: "show",
9343
+ rawName: "v-show",
9344
+ value: _vm.buttons.hasAudio && !_vm.audioFile,
9345
+ expression: "buttons.hasAudio && !audioFile"
9346
+ }],
9347
+ ref: _vm.textId + "-mic",
8646
9348
  attrs: {
8647
- "title": _vm.dictionary.msg_cancelar_anexo
9349
+ "dictionary": _vm.dictionary
8648
9350
  },
8649
9351
  on: {
8650
- "click": _vm.deleteFile
8651
- }
8652
- }, [_c('fa-icon', {
8653
- attrs: {
8654
- "icon": ['fas', 'times-circle']
8655
- }
8656
- })], 1), _vm._v(" "), _vm.file.name ? _c('h3', {
8657
- staticClass: "text-footer-preview-title"
8658
- }, [_vm.isDoc ? _c('fa-icon', {
8659
- attrs: {
8660
- "icon": ['fas', 'file-alt']
8661
- }
8662
- }) : _c('fa-icon', {
8663
- attrs: {
8664
- "icon": ['fas', 'image']
8665
- }
8666
- }), _vm._v("\n " + _vm._s(_vm.file.name) + "\n ")], 1) : _vm._e(), _vm._v(" "), _vm.fileFormatError ? _c('div', {
8667
- staticClass: "text-footer-invalid-format"
8668
- }, [_c('h3', {
8669
- domProps: {
8670
- "textContent": _vm._s(_vm.dictionary.titulo_msg_formato_invalido)
8671
- }
8672
- }), _vm._v(" "), _c('h4', {
8673
- domProps: {
8674
- "textContent": _vm._s(_vm.validFileFormats)
9352
+ "set-audio": _vm.setAudio
8675
9353
  }
8676
- })]) : _vm._e(), _vm._v(" "), _vm.imagePreview ? _c('div', {
8677
- staticClass: "text-footer-image-preview"
8678
- }, [_c('img', {
9354
+ }), _vm._ssrNode(" "), _c('BtnFiles', {
9355
+ directives: [{
9356
+ name: "show",
9357
+ rawName: "v-show",
9358
+ value: _vm.buttons.hasFiles && !_vm.audioFile,
9359
+ expression: "buttons.hasFiles && !audioFile"
9360
+ }],
9361
+ ref: _vm.textId + "-file",
8679
9362
  attrs: {
8680
- "src": _vm.imagePreview,
8681
- "alt": _vm.dictionary.alt_previa_img
9363
+ "textId": _vm.textId,
9364
+ "dictionary": _vm.dictionary,
9365
+ "fileSettings": _vm.fileSettings,
9366
+ "cssStyle": _vm.cssStyle
8682
9367
  },
8683
9368
  on: {
8684
- "click": _vm.openImage
9369
+ "set-file-vars": _vm.setFileVars
8685
9370
  }
8686
- })]) : _vm._e()]) : _vm._e()])], 2) : _vm._e();
9371
+ })], 2) : _vm._e()], 2)]) : _vm._e();
8687
9372
  };
8688
9373
 
8689
9374
  var __vue_staticRenderFns__$2 = [];
@@ -8691,8 +9376,8 @@ var __vue_staticRenderFns__$2 = [];
8691
9376
 
8692
9377
  var __vue_inject_styles__$2 = function __vue_inject_styles__(inject) {
8693
9378
  if (!inject) return;
8694
- inject("data-v-62144278_0", {
8695
- source: ".toasted svg{margin-right:10px}.d-none{display:none}ul{list-style-type:none}.text-footer-container{display:flex;justify-content:center;align-items:center;flex-direction:column;width:100%;position:relative}.text-footer-container .text-footer{min-height:54px;position:relative;display:flex;justify-content:center;align-items:center;border:1px solid #ccc;padding:5px 2px 5px 5px;border-radius:15px}.text-footer-container .text-footer.full{width:100%}.text-footer-container .text-footer.almostFull{width:95%}.text-footer-container .text-footer.medium{width:75%}.text-footer-container textarea{margin:0 5px;border:unset;flex:1;resize:none;min-height:30px;max-height:60px;font-size:.875rem;font-family:inherit;background:inherit}.text-footer-container textarea:focus{outline:unset}.text-footer-container .text-footer-audio{flex:1;display:flex;justify-content:center;align-items:center}.text-footer-container audio{flex:1;outline:unset;width:auto;height:38px}.text-footer-container .delete-audio{display:flex;justify-content:center;align-items:center;color:#e74c3c;transition:background .3s;border-radius:50%;font-size:1rem;padding:10px;cursor:pointer;margin:0 5px;width:31px;height:31px}.text-footer-container .delete-audio:hover{background-color:rgba(208,0,0,.2)}.text-footer-container .max-characters{font-size:.575rem;z-index:1;color:#444;position:relative;top:28px;left:5px}.text-footer-container .max-characters.no-width{width:0}.text-footer-container .text-footer-actions{display:flex}.text-footer-container .text-footer-actions.outside-buttons{display:flex;align-items:center;justify-content:flex-end;position:absolute;top:-42px;right:2px;background-color:#ddd;box-shadow:inset 0 -10px 5px -11px rgba(0,0,0,.5)}.text-footer-container .text-footer-actions .text-footer-actions--btn{display:flex;justify-content:center;align-items:center;color:#777;border-radius:50%;transition:background .3s;padding:10px;font-size:1rem;width:36px;height:36px;cursor:pointer;margin-right:2.5px}.text-footer-container .text-footer-actions .text-footer-actions--btn:last-child{margin-right:unset}.text-footer-container .text-footer-actions .text-footer-actions--btn:hover{background-color:rgba(0,0,0,.1)}.text-footer-container .text-footer-actions .text-footer-actions--btn.files-activated{background-color:rgba(0,0,0,.1)}.text-footer-container .text-footer-actions .text-footer-actions--btn.audio-activated{background-color:rgba(208,0,0,.7);color:#fff}.text-footer-container .text-footer-actions .text-footer-actions--btn.left-button{position:absolute;left:0}.text-footer-container .text-footer-hsm-container{margin:12px 0 7px 0}.text-footer-container .text-footer-hsm-container.full{width:100%}.text-footer-container .text-footer-hsm-container.almostFull{width:95%}.text-footer-container .text-footer-hsm-container.medium{width:75%}.text-footer-container .text-footer-hsm-container .text-footer-v-select{border-radius:5px;margin-bottom:5px}.text-footer-container .text-footer-hsm-container .text-footer-select-03{display:flex;align-items:center;flex:1;width:100%}.text-footer-container .text-footer-hsm-container .text-footer-select-03 .text-footer-v-select{flex:1}.text-footer-container .text-footer-hsm-container .text-footer-select-03 .text-footer--btn-select-03{transition-duration:.3s;user-select:none;cursor:pointer;box-shadow:inset 0 -3px rgba(0,0,0,.2);opacity:.9;border-radius:2.5px;display:flex;justify-content:center;align-items:center;margin-left:5px;margin-bottom:5px;background-color:#f7fe72;width:32px;height:32px}.text-footer-container .text-footer-hsm-container .text-footer-select-03 .text-footer--btn-select-03:hover{opacity:1}.text-footer-container .text-footer-hsm-container .text-footer-select-03 .text-footer--btn-select-03:active{opacity:1;box-shadow:inset 0 -1px rgba(0,0,0,.2);-webkit-transform:translateY(1px);-moz-transform:translateY(1px);-o-transform:translateY(1px);-ms-transform:translateY(1px);transform:translateY(1px)}.text-footer-container .text-footer-hsm-container .text-footer-select-03 .text-footer--btn-select-03 svg{font-size:1rem}.text-footer-container .text-footer-files-container{position:absolute;right:-55px;top:-55px;padding:5px;background-color:rgba(0,0,0,.4);border-radius:5px;display:flex;align-items:center;justify-content:space-between;z-index:1}.text-footer-container .text-footer-files-container.horizontal{flex-direction:column}.text-footer-container .text-footer-files-container .files-btn{transition-duration:.3s;transition-property:opacity;opacity:.8;cursor:pointer;display:flex;justify-content:center;align-items:center;border-radius:10px;padding:3px;width:40px;height:40px;font-size:1rem;color:#fff}.text-footer-container .text-footer-files-container .files-btn:hover{opacity:1}.text-footer-container .text-footer-files-container .files-btn svg{color:#fff}.text-footer-container .text-footer-files-container .files-btn.images{background-color:#9575cd;margin-right:5px}.text-footer-container .text-footer-files-container .files-btn.images.margin-bottom{margin-right:unset;margin-bottom:5px}.text-footer-container .text-footer-files-container .files-btn.docs{background-color:#7986cb}.text-footer-container .text-footer-preview-container{position:absolute;background-color:#aaa;border-top-left-radius:5px;border-top-right-radius:5px}.text-footer-container .text-footer-preview-container.isDoc{top:-50px;width:100%;height:45px}.text-footer-container .text-footer-preview-container.isImg{top:-205px;width:100%;height:200px}.text-footer-container .text-footer-preview-container.isImg .text-footer-image-preview{height:170px}.text-footer-container .text-footer-preview-container.isError{top:-155px;width:100%;height:150px}.text-footer-container .text-footer-preview-container .text-footer-exclude-file{position:absolute;top:5px;right:5px;cursor:pointer}.text-footer-container .text-footer-preview-container .text-footer-exclude-file svg{transition:color .2s;color:#e9594a}.text-footer-container .text-footer-preview-container .text-footer-exclude-file svg:hover{color:#e74c3c}.text-footer-container .text-footer-preview-container .text-footer-preview-title{font-size:1rem;padding:10px 0 0 10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.text-footer-container .text-footer-preview-container .text-footer-image-preview{display:flex;justify-content:center;align-items:center;width:100%}.text-footer-container .text-footer-preview-container .text-footer-image-preview img{cursor:pointer;max-width:98%;max-height:98%;padding:2%}.text-footer-container .text-footer-preview-container .text-footer-invalid-format{padding:10px}.text-footer-container .text-footer-preview-container .text-footer-invalid-format h3{font-weight:500}.text-footer-container .text-footer-preview-container .text-footer-invalid-format h4{font-size:.9rem}.text-footer-container .text-footer-alt{margin-top:-12px;width:100%;padding:0 10px}.text-footer-container .text-footer-alt .text-footer-out-session{margin-top:12px}.text-footer-container .text-footer-alt .text-footer-sem-24h{font-size:.8rem;text-align:right;font-weight:600;letter-spacing:-.5px;color:#dd7f0c;margin-top:5px;position:absolute;right:0}.text-footer-container .text-footer-alt .sem-templates{margin-top:10px;font-size:.8rem;text-align:right;font-weight:600;letter-spacing:-.5px;color:#921e12}.text-footer-container .text-footer-alt .text-footer-templates{position:relative;width:100%}.text-footer-container .text-footer-alt .text-footer-templates .text-footer-group-selection{width:100%;display:flex;align-items:center}.text-footer-container .text-footer-alt .text-footer-templates .text-footer-group-selection h4{margin-right:5px}.text-footer-container .text-footer-alt .text-footer-templates .text-footer-group-selection .sm__select{flex:1}.vs__dropdown-menu{font-size:.85rem!important}.emoji-text-container{position:relative}.emoji-text-container .emoji-text-btn{font-size:1.2rem;cursor:pointer}.emoji-mart-anchor,.emoji-mart-emoji span{cursor:pointer!important}.emoji-mart{z-index:2!important}.emoji-mart-scroll{overflow-x:hidden}",
9379
+ inject("data-v-4d58300c_0", {
9380
+ source: ".toasted svg{margin-right:10px}.d-none{display:none}ul{list-style-type:none}.text-footer-container{display:flex;justify-content:center;align-items:center;flex-direction:column;width:100%;position:relative}.text-footer-container .text-footer{min-height:54px;position:relative;display:flex;justify-content:center;align-items:center;border:1px solid #ccc;padding:5px 2px 5px 5px;border-radius:15px}.text-footer-container .text-footer.full{width:100%}.text-footer-container .text-footer.almostFull{width:95%}.text-footer-container .text-footer.medium{width:75%}.text-footer-container textarea{margin:0 5px;border:unset;flex:1;resize:none;min-height:30px;max-height:60px;font-size:.875rem;font-family:inherit;background:inherit}.text-footer-container textarea:focus{outline:unset}.text-footer-container .text-footer-audio{flex:1;display:flex;justify-content:center;align-items:center}.text-footer-container audio{flex:1;outline:unset;width:auto;height:38px}.text-footer-container .delete-audio{display:flex;justify-content:center;align-items:center;color:#e74c3c;transition:background .3s;border-radius:50%;font-size:1rem;padding:10px;cursor:pointer;margin:0 5px;width:31px;height:31px}.text-footer-container .delete-audio:hover{background-color:rgba(208,0,0,.2)}.text-footer-container .max-characters{font-size:.575rem;z-index:1;color:#444;position:relative;top:30px;left:5px}.text-footer-container .max-characters.no-width{width:0}.text-footer-container .text-footer-actions{display:flex}.text-footer-container .text-footer-actions.outside-buttons{display:flex;align-items:center;justify-content:flex-end;position:absolute;top:-42px;right:2px;background-color:#ddd;box-shadow:inset 0 -10px 5px -11px rgba(0,0,0,.5)}.text-footer-container .text-footer-actions .text-footer-actions--btn{display:flex;justify-content:center;align-items:center;color:#777;border-radius:50%;transition:background .3s;padding:10px;font-size:1rem;width:36px;height:36px;cursor:pointer;margin-right:2.5px}.text-footer-container .text-footer-actions .text-footer-actions--btn:last-child{margin-right:unset}.text-footer-container .text-footer-actions .text-footer-actions--btn:hover{background-color:rgba(0,0,0,.1)}.text-footer-container .text-footer-actions .text-footer-actions--btn.files-activated{background-color:rgba(0,0,0,.1)}.text-footer-container .text-footer-actions .text-footer-actions--btn.audio-activated{background-color:rgba(208,0,0,.7);color:#fff}.text-footer-container .text-footer-actions .text-footer-actions--btn.left-button{position:absolute;left:0}.text-footer-container .text-footer-hsm-container{margin:12px 0 7px 0}.text-footer-container .text-footer-hsm-container.full{width:100%}.text-footer-container .text-footer-hsm-container.almostFull{width:95%}.text-footer-container .text-footer-hsm-container.medium{width:75%}.text-footer-container .text-footer-hsm-container .text-footer-v-select{border-radius:5px;margin-bottom:5px}.text-footer-container .text-footer-hsm-container .text-footer-select-03{display:flex;align-items:center;flex:1;width:100%}.text-footer-container .text-footer-hsm-container .text-footer-select-03 .text-footer-v-select{flex:1}.text-footer-container .text-footer-hsm-container .text-footer-select-03 .text-footer--btn-select-03{transition-duration:.3s;user-select:none;cursor:pointer;box-shadow:inset 0 -3px rgba(0,0,0,.2);opacity:.9;border-radius:2.5px;display:flex;justify-content:center;align-items:center;margin-left:5px;margin-bottom:5px;background-color:#f7fe72;width:32px;height:32px}.text-footer-container .text-footer-hsm-container .text-footer-select-03 .text-footer--btn-select-03:hover{opacity:1}.text-footer-container .text-footer-hsm-container .text-footer-select-03 .text-footer--btn-select-03:active{opacity:1;box-shadow:inset 0 -1px rgba(0,0,0,.2);-webkit-transform:translateY(1px);-moz-transform:translateY(1px);-o-transform:translateY(1px);-ms-transform:translateY(1px);transform:translateY(1px)}.text-footer-container .text-footer-hsm-container .text-footer-select-03 .text-footer--btn-select-03 svg{font-size:1rem}.text-footer-container .text-footer-files-container{position:absolute;right:0;top:-55px;padding:5px;background-color:rgba(0,0,0,.4);border-radius:5px;display:flex;align-items:center;justify-content:space-between;z-index:1}.text-footer-container .text-footer-files-container.horizontal{right:-55px;flex-direction:column}.text-footer-container .text-footer-files-container .files-btn{transition-duration:.3s;transition-property:opacity;opacity:.8;cursor:pointer;display:flex;justify-content:center;align-items:center;border-radius:10px;padding:3px;width:40px;height:40px;font-size:1rem;color:#fff}.text-footer-container .text-footer-files-container .files-btn:hover{opacity:1}.text-footer-container .text-footer-files-container .files-btn svg{color:#fff}.text-footer-container .text-footer-files-container .files-btn.images{background-color:#9575cd;margin-right:5px}.text-footer-container .text-footer-files-container .files-btn.images.margin-bottom{margin-right:unset;margin-bottom:5px}.text-footer-container .text-footer-files-container .files-btn.docs{background-color:#7986cb}.text-footer-container .text-footer-preview-container{cursor:default;position:absolute;left:0;background-color:#e1e1e1;border-top-left-radius:5px;border-top-right-radius:5px}.text-footer-container .text-footer-preview-container.isDoc{top:-50px;width:100%;height:45px}.text-footer-container .text-footer-preview-container.isImg,.text-footer-container .text-footer-preview-container.isMultiple{top:-205px;width:100%;height:200px}.text-footer-container .text-footer-preview-container.isImg .text-footer-image-preview{height:170px}.text-footer-container .text-footer-preview-container.isError{top:-80px;width:100%;height:75px}.text-footer-container .text-footer-preview-container .text-footer-exclude-file{position:absolute;top:5px;right:5px;cursor:pointer;display:flex;justify-content:center;align-items:center;min-width:1rem;min-height:1rem;background-color:#fff;border-radius:50%}.text-footer-container .text-footer-preview-container .text-footer-exclude-file svg{transition:color .2s;color:#e9594a}.text-footer-container .text-footer-preview-container .text-footer-exclude-file svg:hover{color:#e74c3c}.text-footer-container .text-footer-preview-container .text-footer-preview-title{font-size:1rem;padding:10px 0 0 10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.text-footer-container .text-footer-preview-container .text-footer-image-preview{display:flex;justify-content:center;align-items:center;width:100%}.text-footer-container .text-footer-preview-container .text-footer-image-preview img{cursor:pointer;max-width:98%;max-height:98%;padding:2%}.text-footer-container .text-footer-preview-container .text-footer-invalid-format{color:#222;padding:10px}.text-footer-container .text-footer-preview-container .text-footer-invalid-format h3{font-weight:500}.text-footer-container .text-footer-preview-container .text-footer-invalid-format h4{font-size:.9rem}.text-footer-container .text-footer-alt{margin-top:-12px;width:100%;padding:0 10px}.text-footer-container .text-footer-alt .text-footer-out-session{margin-top:12px}.text-footer-container .text-footer-alt .text-footer-sem-24h{font-size:.8rem;text-align:right;font-weight:600;letter-spacing:-.5px;color:#dd7f0c;margin-top:5px;position:absolute;right:0}.text-footer-container .text-footer-alt .sem-templates{margin-top:10px;font-size:.8rem;text-align:right;font-weight:600;letter-spacing:-.5px;color:#921e12}.text-footer-container .text-footer-alt .text-footer-templates{position:relative;width:100%}.text-footer-container .text-footer-alt .text-footer-templates .text-footer-group-selection{width:100%;display:flex;align-items:center}.text-footer-container .text-footer-alt .text-footer-templates .text-footer-group-selection h4{margin-right:5px}.text-footer-container .text-footer-alt .text-footer-templates .text-footer-group-selection .sm__select{flex:1}.vs__dropdown-menu{font-size:.85rem!important}.emoji-text-container{position:relative}.emoji-text-container .emoji-text-btn{font-size:1.2rem;cursor:pointer}.emoji-mart-anchor,.emoji-mart-emoji span{cursor:pointer!important}.emoji-mart{z-index:2!important}.emoji-mart-scroll{overflow-x:hidden}",
8696
9381
  map: undefined,
8697
9382
  media: undefined
8698
9383
  });
@@ -8703,7 +9388,7 @@ var __vue_inject_styles__$2 = function __vue_inject_styles__(inject) {
8703
9388
  var __vue_scope_id__$2 = undefined;
8704
9389
  /* module identifier */
8705
9390
 
8706
- var __vue_module_identifier__$2 = "data-v-62144278";
9391
+ var __vue_module_identifier__$2 = "data-v-4d58300c";
8707
9392
  /* functional template */
8708
9393
 
8709
9394
  var __vue_is_functional_template__$2 = false;
@@ -8725,10 +9410,6 @@ var script$1 = {
8725
9410
  };
8726
9411
  },
8727
9412
  props: {
8728
- smartStyle: {
8729
- type: Boolean,
8730
- required: false
8731
- },
8732
9413
  hasButton: {
8733
9414
  type: Boolean,
8734
9415
  required: false
@@ -8760,11 +9441,6 @@ var script$1 = {
8760
9441
  elem.classList.toggle("active");
8761
9442
  }
8762
9443
  }
8763
- },
8764
- isValid: function isValid(textValue) {
8765
- var regex = /^[ ?????�����??��?���?��??????�������?���?��???��??\w?-�\r\n()[\]{}.,:;@??�????!&?�`�=%^*+\-$|/]+$/;
8766
- var value = textValue ? textValue.trim("") : "";
8767
- return regex.test(value);
8768
9444
  }
8769
9445
  }
8770
9446
  };/* script */
@@ -8779,9 +9455,9 @@ var __vue_render__$1 = function __vue_render__() {
8779
9455
  var _c = _vm._self._c || _h;
8780
9456
 
8781
9457
  return _c('div', {
8782
- staticClass: "template-single"
8783
- }, [_vm._ssrNode("<div class=\"template-content\">", "</div>", [_vm._ssrNode("<section" + _vm._ssrClass(null, {
8784
- 'sm__template': _vm.smartStyle
9458
+ staticClass: "ts-container"
9459
+ }, [_vm._ssrNode("<div class=\"ts-content\">", "</div>", [_vm._ssrNode("<section" + _vm._ssrClass(null, {
9460
+ 'tm-container': _vm.hasButton
8785
9461
  }) + ">", "</section>", [_c('TextFooter', {
8786
9462
  attrs: {
8787
9463
  "textId": 'var_1',
@@ -8789,14 +9465,15 @@ var __vue_render__$1 = function __vue_render__() {
8789
9465
  "openEmojisFrom": 'top',
8790
9466
  "smallEmojis": true,
8791
9467
  "placeholderMessage": 'Escreva sua mensagem',
8792
- "ignoreHideTextarea": true
9468
+ "ignoreHideTextarea": true,
9469
+ "dictionary": _vm.dictionary
8793
9470
  },
8794
9471
  on: {
8795
9472
  "final-message": _vm.preencherMensagem
8796
9473
  }
8797
- }), _vm._ssrNode(" "), _vm.hasButton ? _vm._ssrNode("<div" + _vm._ssrClass("template-btn", {
9474
+ }), _vm._ssrNode(" "), _vm.hasButton ? _vm._ssrNode("<div" + _vm._ssrClass("tg-btn", {
8798
9475
  'small-btn': _vm.iconButton
8799
- }) + ">", "</div>", [_vm._ssrNode("<button>", "</button>", [!_vm.iconButton ? [_vm._ssrNode(_vm._ssrEscape(" " + _vm._s(_vm.dictionary.btn_contatar_clientes) + " "))] : _c('font-awesome-icon', {
9476
+ }) + ">", "</div>", [_vm._ssrNode("<button>", "</button>", [!_vm.iconButton ? [_vm._ssrNode(_vm._ssrEscape(" " + _vm._s(_vm.dictionary.btn_contatar_clientes) + " "))] : _c('fa-icon', {
8800
9477
  attrs: {
8801
9478
  "icon": ['fas', 'paper-plane']
8802
9479
  }
@@ -8812,7 +9489,7 @@ var __vue_inject_styles__$1 = undefined;
8812
9489
  var __vue_scope_id__$1 = undefined;
8813
9490
  /* module identifier */
8814
9491
 
8815
- var __vue_module_identifier__$1 = "data-v-a3100a2c";
9492
+ var __vue_module_identifier__$1 = "data-v-4d24e86b";
8816
9493
  /* functional template */
8817
9494
 
8818
9495
  var __vue_is_functional_template__$1 = false;
@@ -8843,19 +9520,11 @@ var script = {
8843
9520
  required: false,
8844
9521
  default: true
8845
9522
  },
8846
- smartStyle: {
8847
- type: Boolean,
8848
- required: false
8849
- },
8850
- adjustBoxOnSelect: {
8851
- type: Boolean,
8852
- required: false
8853
- },
8854
- adjustChatOnSelect: {
9523
+ columnSelect: {
8855
9524
  type: Boolean,
8856
9525
  required: false
8857
9526
  },
8858
- footerStyle: {
9527
+ resizeParentOnSelect: {
8859
9528
  type: Boolean,
8860
9529
  required: false
8861
9530
  },
@@ -8968,8 +9637,7 @@ var script = {
8968
9637
  }
8969
9638
  },
8970
9639
  adjustOnSelect: function adjustOnSelect() {
8971
- if (this.adjustBoxOnSelect) if (this.$root.$refs.boxFlutuante) this.$root.$refs.boxFlutuante.setBoxPosition();
8972
- if (this.adjustChatOnSelect) this.$emit("adjust-chat");
9640
+ if (this.resizeParentOnSelect) this.$emit("resize-parent");
8973
9641
  },
8974
9642
  setFinalMessage: function setFinalMessage(vars) {
8975
9643
  var _this = this;
@@ -9035,15 +9703,11 @@ var __vue_render__ = function __vue_render__() {
9035
9703
  var _c = _vm._self._c || _h;
9036
9704
 
9037
9705
  return _vm.templates && _vm.identifier ? _c('div', {
9038
- staticClass: "templates-container",
9039
- class: {
9040
- 'text-footer-template': _vm.footerStyle
9041
- }
9042
- }, [_vm._ssrNode("<div class=\"options-container\">", "</div>", [_vm._ssrNode("<h4> Template: </h4> "), _vm._ssrNode("<div class=\"select-container\">", "</div>", [_c('v-select', {
9043
- class: {
9044
- 'template-select': !_vm.smartStyle,
9045
- 'sm__select': _vm.smartStyle
9046
- },
9706
+ staticClass: "tg-container"
9707
+ }, [_vm._ssrNode("<div" + _vm._ssrClass("tg-options", {
9708
+ 'column': _vm.columnSelect
9709
+ }) + ">", "</div>", [_vm._ssrNode("<h4> Template: </h4> "), _c('v-select', {
9710
+ staticClass: "tg-select",
9047
9711
  attrs: {
9048
9712
  "appendToBody": "",
9049
9713
  "calculatePosition": _vm.calculateSelectPosition,
@@ -9068,12 +9732,11 @@ var __vue_render__ = function __vue_render__() {
9068
9732
  "textContent": _vm._s(_vm.dictionary.msg_sem_resultados)
9069
9733
  },
9070
9734
  slot: "no-options"
9071
- })])], 1)], 2), _vm._ssrNode(" "), _vm.selectedTemplate ? [_vm.selectedTemplate.components ? _vm._ssrNode("<div class=\"template-field\">", "</div>", [_c('TemplateSingle', {
9735
+ })])], 2), _vm._ssrNode(" "), _vm.selectedTemplate ? [_vm.selectedTemplate.components ? _vm._ssrNode("<div class=\"tg-component\">", "</div>", [_c('TemplateSingle', {
9072
9736
  attrs: {
9073
9737
  "template": _vm.selectedTemplate,
9074
9738
  "hasButton": _vm.hasButton,
9075
9739
  "iconButton": _vm.iconButton,
9076
- "smartStyle": _vm.smartStyle,
9077
9740
  "identifier": _vm.identifier,
9078
9741
  "allVariables": _vm.allVariables,
9079
9742
  "dictionary": _vm.dictionary
@@ -9084,9 +9747,8 @@ var __vue_render__ = function __vue_render__() {
9084
9747
  return _vm.$emit('click-trigger');
9085
9748
  }
9086
9749
  }
9087
- })], 1) : _vm._ssrNode("<div class=\"template-field\">", "</div>", [_c('TemplateMessage', {
9750
+ })], 1) : _vm._ssrNode("<div class=\"tg-component\">", "</div>", [_c('TemplateMessage', {
9088
9751
  attrs: {
9089
- "smartStyle": _vm.smartStyle,
9090
9752
  "hasButton": _vm.hasButton,
9091
9753
  "iconButton": _vm.iconButton,
9092
9754
  "dictionary": _vm.dictionary
@@ -9105,8 +9767,8 @@ var __vue_staticRenderFns__ = [];
9105
9767
 
9106
9768
  var __vue_inject_styles__ = function __vue_inject_styles__(inject) {
9107
9769
  if (!inject) return;
9108
- inject("data-v-111efbae_0", {
9109
- source: ".toasted svg{margin-right:10px}.d-none{display:none}ul{list-style-type:none}.templates-container{display:flex;flex-direction:column;overflow-x:hidden;overflow-y:auto;padding:0 5px;width:100%;height:auto;min-height:50%;max-height:calc(100% - 24px)}.templates-container.text-footer-template{padding:0;margin-top:10px}.templates-container.text-footer-template .options-container{display:flex;flex-wrap:wrap;font-size:.8rem}.templates-container.text-footer-template .options-container h4{width:100%;margin-left:0;padding:5px 0 0 0}.templates-container.text-footer-template .template-content{flex:2!important;padding-bottom:0!important}.templates-container .options-container{width:100%;display:flex;align-items:center;overflow:hidden;padding:3px 0;min-height:35px}.templates-container .options-container h4{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;margin:0 5px 0 0;z-index:1}.templates-container hr{border:unset;height:1px;background-color:#ccc;margin:2.5px 0}.templates-container .template-field{width:100%}.templates-container .template-field .template-single{width:100%;display:flex;justify-content:space-between}.templates-container .template-field .template-content{font-size:.7rem;padding:10px 0;flex:1}.templates-container .template-field .template-content header{padding:3px 5px;border-top-left-radius:5px;border-top-right-radius:5px;background-color:#dff0d8;border-top:1px solid #ccc;border-right:1px solid #ccc;border-left:1px solid #ccc}.templates-container .template-field .template-content header p{font-weight:600}.templates-container .template-field .template-content section{line-height:25px;padding:3px 5px;border-left:1px solid #ccc;border-right:1px solid #ccc;background-color:#dff0d8}.templates-container .template-field .template-content section.margin-bottom{border-bottom-left-radius:5px;border-bottom-right-radius:5px;border-bottom:1px solid #ccc}.templates-container .template-field .template-content footer{padding:3px 5px;background-color:#dff0d8;border:1px solid #ccc;border-top:unset;border-bottom-left-radius:5px;border-bottom-right-radius:5px}.templates-container .template-field .template-content input{border:1px solid transparent;outline:0;font-size:.8rem;padding:2.5px 5px;background-color:#fff}.templates-container .template-field .template-content input::placeholder{color:#bbb}.templates-container .template-field .template-content input.active{border:1px solid #007bff}.templates-container .template-field .template-content input.invalid{border:1px solid #e74c3c!important}.templates-container .template-field .template-content .text-footer{height:4rem;width:90%}.templates-container .template-field .template-content .text-footer textarea{height:3rem;min-height:auto;max-height:4rem;width:90%}.templates-container .template-field .template-content .emoji-mart{top:-30px!important;left:30px!important}.templates-container .template-field .template-content .sm__template{display:flex}.templates-container .template-field .template-btn{width:40%;display:flex;justify-content:center;align-items:center}.templates-container .template-field .template-btn button{outline:unset;border:unset;display:block;min-width:180px;height:35px;padding:0 10px;font-weight:500;background-color:#007bff;color:#fff;transition-duration:.3s;user-select:none;cursor:pointer;box-shadow:inset 0 -2px rgba(0,0,0,.2);opacity:.9;border-radius:25px}.templates-container .template-field .template-btn button:hover{opacity:1}.templates-container .template-field .template-btn button:active{opacity:1;box-shadow:inset 0 -1px rgba(0,0,0,.2);-webkit-transform:translateY(1px);-moz-transform:translateY(1px);-o-transform:translateY(1px);-ms-transform:translateY(1px);transform:translateY(1px)}.templates-container .template-field .template-btn button:active,.templates-container .template-field .template-btn button:focus{outline:unset}.templates-container .template-field .template-btn.small-btn{width:auto;margin-left:5px}.templates-container .template-field .template-btn.small-btn button{min-width:35px;width:35px;padding:0;display:flex;justify-content:center;align-items:center}.select-container{display:flex;flex:1}.select-container .template-select{flex:1}.vs__dropdown-menu{overflow-x:hidden;overflow-y:auto}.vs__dropdown-menu .vs__dropdown-option{white-space:normal}.template-var{display:inline;position:relative}.var-list-dropdown{margin:0;padding:0;position:absolute;top:19px;left:0;background:#eee;width:100%;z-index:1;transition:all 150ms;visibility:hidden;opacity:0;list-style-type:none;border:1px solid #444;border-top:unset}.var-list-dropdown li{width:100%;opacity:.9;cursor:pointer;font-weight:550;padding:2px 5px;transition:background-color 150ms}.var-list-dropdown li:focus,.var-list-dropdown li:focus-within,.var-list-dropdown li:hover{opacity:1;background-color:#555;color:#fff}.var-list-dropdown.visible{visibility:visible;opacity:1}",
9770
+ inject("data-v-35a85f88_0", {
9771
+ source: "*{box-sizing:border-box}.toasted svg{margin-right:10px}.d-none{display:none}ul{list-style-type:none}h1,h2,h3,h4,p{margin:0;padding:0}.tg-container{width:100%;display:flex;flex-direction:column;overflow-x:hidden;overflow-y:auto}.tg-options{width:100%;display:flex}.tg-options.column{flex-direction:column}.tg-options h4{margin-right:5px}.tg-select{flex:1;height:34px;overflow:hidden}.tg-select .vs__dropdown-toggle{background-color:#fff;height:34px;overflow:hidden;display:flex;align-items:center}.tg-select .vs__selected-options{height:34px;overflow:hidden}.tg-select .vs__selected-options>span{white-space:nowrap;text-overflow:ellipsis;flex:1}.vs__dropdown-option{transition:background-color 150ms;white-space:normal}.vs__dropdown-option:nth-child(odd){background-color:#f1f1f1}.vs__dropdown-option--highlight,.vs__dropdown-option--selected,.vs__dropdown-option:active,.vs__dropdown-option:focus,.vs__dropdown-option:hover{background-color:#5897fb!important;color:#fff}.tg-component{width:100%}.ts-container{width:100%;display:flex;justify-content:space-between}.ts-content{--border-color:#CCC;--background-color:#DFF0D8;--input-background-color:#FFF;--input-border-default:#007BFF;--input-border-error:#E74C3C;--placeholder-color:#BBB;flex:2;font-size:.7rem;padding:10px 0}.ts-content footer,.ts-content header,.ts-content section{padding:3px 5px;background-color:var(--background-color)}.ts-content header,.ts-content section{border-right:1px solid var(--border-color);border-left:1px solid var(--border-color)}.ts-content header{border-top-left-radius:5px;border-top-right-radius:5px;border-top:1px solid var(--border-color)}.ts-content header{font-weight:550}.ts-content section{line-height:25px}.ts-content section.margin-bottom{border-bottom-left-radius:5px;border-bottom-right-radius:5px;border-bottom:1px solid var(--border-color)}.ts-content footer{border:1px solid var(--border-color);border-top:unset;border-bottom-left-radius:5px;border-bottom-right-radius:5px}.ts-content input{border:1px solid transparent;outline:0;font-size:.8rem;padding:2.5px 5px;background-color:var(--input-background-color)}.ts-content input::placeholder{color:var(--placeholder-color)}.ts-content input.active,.ts-content input:focus{border:1px solid var(--input-border-default)}.ts-content input.invalid{border:1px solid var(--input-border-error)!important}.ts-content__var{display:inline-block;position:relative}.ts-dropdown{margin:0;padding:0;position:absolute;top:19px;left:0;background:#eee;width:100%;z-index:1;transition:all 150ms;visibility:hidden;opacity:0;list-style-type:none;border:1px solid #444;border-top:unset}.ts-dropdown li{width:100%;opacity:.9;cursor:pointer;font-weight:550;padding:2px 5px;transition:background-color 150ms}.ts-dropdown li:focus,.ts-dropdown li:focus-within,.ts-dropdown li:hover{opacity:1;background-color:#555;color:#fff}.ts-dropdown.visible{visibility:visible;opacity:1}.tg-btn{width:40%;display:flex;justify-content:center;align-items:center}.tg-btn button{outline:unset;border:unset;display:block;min-width:180px;height:35px;padding:0 10px;font-weight:500;background-color:#007bff;color:#fff;transition-duration:.3s;user-select:none;cursor:pointer;box-shadow:inset 0 -2px rgba(0,0,0,.2);opacity:.9;border-radius:25px}.tg-btn button:hover{opacity:1}.tg-btn button:active{opacity:1;box-shadow:inset 0 -1px rgba(0,0,0,.2);-webkit-transform:translateY(1px);-moz-transform:translateY(1px);-o-transform:translateY(1px);-ms-transform:translateY(1px);transform:translateY(1px)}.tg-btn button:active{opacity:1;box-shadow:inset 0 -1px rgba(0,0,0,.2);-webkit-transform:translateY(1px);-moz-transform:translateY(1px);-o-transform:translateY(1px);-ms-transform:translateY(1px);transform:translateY(1px)}.tg-btn button:active,.tg-btn button:focus{outline:unset}.tg-btn.small-btn{width:auto;margin-left:5px}.tg-btn.small-btn button{min-width:35px;width:35px;padding:0;display:flex;justify-content:center;align-items:center}.tm-container{border:1px solid var(--border-color);border-radius:5px;display:flex}",
9110
9772
  map: undefined,
9111
9773
  media: undefined
9112
9774
  });
@@ -9117,7 +9779,7 @@ var __vue_inject_styles__ = function __vue_inject_styles__(inject) {
9117
9779
  var __vue_scope_id__ = undefined;
9118
9780
  /* module identifier */
9119
9781
 
9120
- var __vue_module_identifier__ = "data-v-111efbae";
9782
+ var __vue_module_identifier__ = "data-v-35a85f88";
9121
9783
  /* functional template */
9122
9784
 
9123
9785
  var __vue_is_functional_template__ = false;
@@ -9128,8 +9790,7 @@ var __vue_component__ = /*#__PURE__*/normalizeComponent({
9128
9790
  staticRenderFns: __vue_staticRenderFns__
9129
9791
  }, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, createInjectorSSR, undefined);
9130
9792
 
9131
- var __vue_component__$1 = __vue_component__;// import "/css/style.css";
9132
- var components$1=/*#__PURE__*/Object.freeze({__proto__:null,TemplateGenerator: __vue_component__$1,TextFooter: TextFooter});var install = function installVueIntergrallPlugins(Vue) {
9793
+ var __vue_component__$1 = __vue_component__;var components$1=/*#__PURE__*/Object.freeze({__proto__:null,TemplateGenerator: __vue_component__$1,TextFooter: TextFooter});var install = function installVueIntergrallPlugins(Vue) {
9133
9794
  Object.entries(components$1).forEach(function (_ref) {
9134
9795
  var _ref2 = _slicedToArray(_ref, 2),
9135
9796
  componentName = _ref2[0],