vue-intergrall-plugins 0.0.5 → 0.0.9

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.
@@ -1790,7 +1790,7 @@ var createPopper = /*#__PURE__*/popperGenerator({
1790
1790
  //
1791
1791
  //
1792
1792
  //
1793
- var script$5 = {
1793
+ var script$a = {
1794
1794
  data() {
1795
1795
  return {
1796
1796
  varValues: {},
@@ -1972,9 +1972,21 @@ var script$5 = {
1972
1972
  },
1973
1973
 
1974
1974
  isValid(textValue) {
1975
- const regex = /^[ ?????�����??��?���?��??????�������?���?��???��??\w?-�\r\n()[\]{}.,:;@??�????!&?�`�=%^*+\-$|/]+$/;
1975
+ const regex = {
1976
+ htmlTags: /<\/?[\d\w\s=\-:\.\/\'\";]+>/gi,
1977
+ enter: /\n/g,
1978
+ consecutiveSpaces: /\s{3,}/g
1979
+ };
1976
1980
  const value = textValue ? textValue.trim("") : "";
1977
- return regex.test(value);
1981
+ if (!value.length) return false;
1982
+ let isValueValid = true;
1983
+
1984
+ for (let key in regex) {
1985
+ if (!isValueValid) return isValueValid;
1986
+ if (regex[key].test(value)) isValueValid = false;
1987
+ }
1988
+
1989
+ return isValueValid;
1978
1990
  },
1979
1991
 
1980
1992
  setVar(event, key, notificar) {
@@ -2074,10 +2086,10 @@ function normalizeComponent(template, style, script, scopeId, isFunctionalTempla
2074
2086
  }
2075
2087
 
2076
2088
  /* script */
2077
- const __vue_script__$5 = script$5;
2089
+ const __vue_script__$a = script$a;
2078
2090
  /* template */
2079
2091
 
2080
- var __vue_render__$5 = function () {
2092
+ var __vue_render__$a = function () {
2081
2093
  var _vm = this;
2082
2094
 
2083
2095
  var _h = _vm.$createElement;
@@ -2157,38 +2169,38 @@ var __vue_render__$5 = function () {
2157
2169
  })], 2)]) : _vm._e()]);
2158
2170
  };
2159
2171
 
2160
- var __vue_staticRenderFns__$5 = [];
2172
+ var __vue_staticRenderFns__$a = [];
2161
2173
  /* style */
2162
2174
 
2163
- const __vue_inject_styles__$5 = undefined;
2175
+ const __vue_inject_styles__$a = undefined;
2164
2176
  /* scoped */
2165
2177
 
2166
- const __vue_scope_id__$5 = undefined;
2178
+ const __vue_scope_id__$a = undefined;
2167
2179
  /* module identifier */
2168
2180
 
2169
- const __vue_module_identifier__$5 = undefined;
2181
+ const __vue_module_identifier__$a = undefined;
2170
2182
  /* functional template */
2171
2183
 
2172
- const __vue_is_functional_template__$5 = false;
2184
+ const __vue_is_functional_template__$a = false;
2173
2185
  /* style inject */
2174
2186
 
2175
2187
  /* style inject SSR */
2176
2188
 
2177
2189
  /* style inject shadow dom */
2178
2190
 
2179
- const __vue_component__$6 = /*#__PURE__*/normalizeComponent({
2180
- render: __vue_render__$5,
2181
- staticRenderFns: __vue_staticRenderFns__$5
2182
- }, __vue_inject_styles__$5, __vue_script__$5, __vue_scope_id__$5, __vue_is_functional_template__$5, __vue_module_identifier__$5, false, undefined, undefined, undefined);
2191
+ const __vue_component__$b = /*#__PURE__*/normalizeComponent({
2192
+ render: __vue_render__$a,
2193
+ staticRenderFns: __vue_staticRenderFns__$a
2194
+ }, __vue_inject_styles__$a, __vue_script__$a, __vue_scope_id__$a, __vue_is_functional_template__$a, __vue_module_identifier__$a, false, undefined, undefined, undefined);
2183
2195
 
2184
- var TemplateSingle = __vue_component__$6;
2196
+ var TemplateSingle = __vue_component__$b;
2185
2197
 
2186
2198
  const setResizeListeners = ($el, inputClass, parentClass) => {
2187
2199
  const inputTargets = $el.querySelectorAll(inputClass);
2188
2200
  inputTargets.forEach(target => {
2189
2201
  target.addEventListener("input", () => {
2190
2202
  let currentHeight = target.scrollHeight;
2191
- if (target.textLength == 0) currentHeight = 38;
2203
+ if (target.textLength == 0) currentHeight = 30;
2192
2204
  target.style.height = "auto";
2193
2205
  target.style.height = `${currentHeight}px`;
2194
2206
  const parentTargets = $el.querySelectorAll(parentClass);
@@ -7935,7 +7947,7 @@ exports.default = { search: search, emojis: emojis, emoticons: emoticons };
7935
7947
  });
7936
7948
 
7937
7949
  //
7938
- var script$4 = {
7950
+ var script$9 = {
7939
7951
  components: {
7940
7952
  "picker": emojiMart.Picker
7941
7953
  },
@@ -8028,10 +8040,10 @@ var script$4 = {
8028
8040
  };
8029
8041
 
8030
8042
  /* script */
8031
- const __vue_script__$4 = script$4;
8043
+ const __vue_script__$9 = script$9;
8032
8044
  /* template */
8033
8045
 
8034
- var __vue_render__$4 = function () {
8046
+ var __vue_render__$9 = function () {
8035
8047
  var _vm = this;
8036
8048
 
8037
8049
  var _h = _vm.$createElement;
@@ -8081,31 +8093,31 @@ var __vue_render__$4 = function () {
8081
8093
  })], 1);
8082
8094
  };
8083
8095
 
8084
- var __vue_staticRenderFns__$4 = [];
8096
+ var __vue_staticRenderFns__$9 = [];
8085
8097
  /* style */
8086
8098
 
8087
- const __vue_inject_styles__$4 = undefined;
8099
+ const __vue_inject_styles__$9 = undefined;
8088
8100
  /* scoped */
8089
8101
 
8090
- const __vue_scope_id__$4 = undefined;
8102
+ const __vue_scope_id__$9 = undefined;
8091
8103
  /* module identifier */
8092
8104
 
8093
- const __vue_module_identifier__$4 = undefined;
8105
+ const __vue_module_identifier__$9 = undefined;
8094
8106
  /* functional template */
8095
8107
 
8096
- const __vue_is_functional_template__$4 = false;
8108
+ const __vue_is_functional_template__$9 = false;
8097
8109
  /* style inject */
8098
8110
 
8099
8111
  /* style inject SSR */
8100
8112
 
8101
8113
  /* style inject shadow dom */
8102
8114
 
8103
- const __vue_component__$5 = /*#__PURE__*/normalizeComponent({
8104
- render: __vue_render__$4,
8105
- staticRenderFns: __vue_staticRenderFns__$4
8106
- }, __vue_inject_styles__$4, __vue_script__$4, __vue_scope_id__$4, __vue_is_functional_template__$4, __vue_module_identifier__$4, false, undefined, undefined, undefined);
8115
+ const __vue_component__$a = /*#__PURE__*/normalizeComponent({
8116
+ render: __vue_render__$9,
8117
+ staticRenderFns: __vue_staticRenderFns__$9
8118
+ }, __vue_inject_styles__$9, __vue_script__$9, __vue_scope_id__$9, __vue_is_functional_template__$9, __vue_module_identifier__$9, false, undefined, undefined, undefined);
8107
8119
 
8108
- var EmojisTextFooter = __vue_component__$5;
8120
+ var EmojisTextFooter = __vue_component__$a;
8109
8121
 
8110
8122
  //
8111
8123
  //
@@ -8113,7 +8125,7 @@ var EmojisTextFooter = __vue_component__$5;
8113
8125
  //
8114
8126
  //
8115
8127
  //
8116
- var script$3 = {
8128
+ var script$8 = {
8117
8129
  props: {
8118
8130
  hasBg: {
8119
8131
  type: Boolean,
@@ -8185,10 +8197,10 @@ function addStyle(id, css) {
8185
8197
  }
8186
8198
 
8187
8199
  /* script */
8188
- const __vue_script__$3 = script$3;
8200
+ const __vue_script__$8 = script$8;
8189
8201
  /* template */
8190
8202
 
8191
- var __vue_render__$3 = function () {
8203
+ var __vue_render__$8 = function () {
8192
8204
  var _vm = this;
8193
8205
 
8194
8206
  var _h = _vm.$createElement;
@@ -8209,12 +8221,12 @@ var __vue_render__$3 = function () {
8209
8221
  })]);
8210
8222
  };
8211
8223
 
8212
- var __vue_staticRenderFns__$3 = [];
8224
+ var __vue_staticRenderFns__$8 = [];
8213
8225
  /* style */
8214
8226
 
8215
- const __vue_inject_styles__$3 = function (inject) {
8227
+ const __vue_inject_styles__$8 = function (inject) {
8216
8228
  if (!inject) return;
8217
- inject("data-v-28e34438_0", {
8229
+ inject("data-v-8ff43434_0", {
8218
8230
  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)}}",
8219
8231
  map: undefined,
8220
8232
  media: undefined
@@ -8223,243 +8235,1190 @@ const __vue_inject_styles__$3 = function (inject) {
8223
8235
  /* scoped */
8224
8236
 
8225
8237
 
8226
- const __vue_scope_id__$3 = undefined;
8238
+ const __vue_scope_id__$8 = undefined;
8227
8239
  /* module identifier */
8228
8240
 
8229
- const __vue_module_identifier__$3 = undefined;
8241
+ const __vue_module_identifier__$8 = undefined;
8230
8242
  /* functional template */
8231
8243
 
8232
- const __vue_is_functional_template__$3 = false;
8244
+ const __vue_is_functional_template__$8 = false;
8233
8245
  /* style inject SSR */
8234
8246
 
8235
8247
  /* style inject shadow dom */
8236
8248
 
8237
- const __vue_component__$4 = /*#__PURE__*/normalizeComponent({
8238
- render: __vue_render__$3,
8239
- staticRenderFns: __vue_staticRenderFns__$3
8240
- }, __vue_inject_styles__$3, __vue_script__$3, __vue_scope_id__$3, __vue_is_functional_template__$3, __vue_module_identifier__$3, false, createInjector, undefined, undefined);
8249
+ const __vue_component__$9 = /*#__PURE__*/normalizeComponent({
8250
+ render: __vue_render__$8,
8251
+ staticRenderFns: __vue_staticRenderFns__$8
8252
+ }, __vue_inject_styles__$8, __vue_script__$8, __vue_scope_id__$8, __vue_is_functional_template__$8, __vue_module_identifier__$8, false, createInjector, undefined, undefined);
8241
8253
 
8242
- var ReqLoader = __vue_component__$4;
8254
+ var Loader = __vue_component__$9;
8243
8255
 
8244
8256
  //
8245
- var script$2 = {
8246
- components: {
8247
- EmojisTextFooter,
8248
- ReqLoader
8249
- },
8250
- mixins: [mixin_1],
8257
+ //
8258
+ //
8259
+ //
8260
+ //
8261
+ //
8262
+ //
8263
+ //
8264
+ var script$7 = {
8251
8265
  props: {
8252
- buttons: {
8253
- type: Object,
8254
- default: () => {
8255
- return {
8256
- hasEmojis: false,
8257
- hasSendButton: false,
8258
- hasFiles: false,
8259
- hasAudio: false
8260
- };
8261
- },
8262
- required: false
8263
- },
8264
- cssStyle: {
8265
- type: Object,
8266
- default: () => {
8267
- return {
8268
- width: "full",
8269
- backgroundColor: "#FFF",
8270
- outsideButtons: false
8271
- };
8272
- },
8273
- required: false
8274
- },
8275
- textareaSettings: {
8276
- type: Object,
8277
- default: () => {
8278
- return {
8279
- placeholderMessage: "",
8280
- maxCharacters: 0,
8281
- sendOnEnter: false,
8282
- disabled: false
8283
- };
8284
- },
8285
- required: false
8286
- },
8287
- emojiSettings: {
8288
- type: Object,
8289
- default: () => {
8290
- return {
8291
- openEmojisFrom: "top",
8292
- smallEmojis: false
8293
- };
8294
- },
8295
- required: false
8296
- },
8297
- formattedMessageSettings: {
8298
- type: Object,
8299
- default: () => {
8300
- return {
8301
- hasHsm: false,
8302
- msgType: 0
8303
- };
8304
- },
8305
- required: false
8306
- },
8307
- fileSettings: {
8308
- type: Object,
8309
- default: () => {
8310
- return {
8311
- docsExtensions: "",
8312
- imagesExtensions: ""
8313
- };
8314
- },
8315
- required: false
8316
- },
8317
- textId: {
8266
+ message: {
8318
8267
  type: String,
8319
8268
  required: true
8320
8269
  },
8321
- isMainChat: {
8322
- type: Boolean,
8323
- default: false,
8324
- required: false
8325
- },
8326
- isSending: {
8327
- type: Boolean,
8328
- default: false,
8270
+ maxCharacters: {
8271
+ type: Number,
8329
8272
  required: false
8330
- },
8331
- dictionary: {
8332
- type: Object,
8333
- required: true
8334
8273
  }
8335
8274
  },
8336
8275
  computed: {
8337
8276
  remainingCharacters() {
8338
- if (this.message && this.message.length) {
8339
- return this.textareaSettings.maxCharacters - this.message.length;
8340
- }
8341
-
8342
- return this.textareaSettings.maxCharacters;
8277
+ if (this.message.length) return this.maxCharacters - this.message.length;
8278
+ return this.maxCharacters;
8343
8279
  }
8344
8280
 
8345
- },
8281
+ }
8282
+ };
8346
8283
 
8347
- data() {
8348
- return {
8349
- message: "",
8350
- openFiles: false,
8351
- file: [],
8352
- showFilePreview: false,
8353
- imagePreview: "",
8354
- isDoc: false,
8355
- fileFormatError: false,
8356
- validFileFormats: "",
8357
- audioFile: "",
8358
- audioSource: "",
8359
- mediaRecorder: {},
8360
- isRecording: false
8361
- };
8362
- },
8284
+ /* script */
8285
+ const __vue_script__$7 = script$7;
8286
+ /* template */
8363
8287
 
8364
- created() {
8365
- this.$root.$refs[`tf-${this.textId}`] = this;
8366
- },
8288
+ var __vue_render__$7 = function () {
8289
+ var _vm = this;
8367
8290
 
8368
- mounted() {
8369
- setResizeListeners(this.$el, ".js-autoresize", ".js-parentresize");
8370
- this.$root.$on("drop-file", (file, type) => {
8371
- if (this.buttons.hasFiles) this.fileUpload(file, type, true);
8372
- });
8373
- this.$root.$on("toggle-msg-formatada", () => {
8374
- this.toggleHSM();
8375
- });
8376
- this.$root.$on("textarea-focus", () => {
8377
- this.focusTextarea();
8378
- });
8379
- this.$root.$on("resize-footer-template", () => {
8380
- this.adjustChatHeight();
8381
- });
8382
- this.$root.$on("clear-footer-message", () => {
8383
- this.message = "";
8384
- });
8385
- if (this.cssStyle.outsideButtons) if (this.$root.$refs.chatCorpo) this.$root.$refs.chatCorpo.setOutsideButtons(this.cssStyle.outsideButtons);
8386
- },
8291
+ var _h = _vm.$createElement;
8387
8292
 
8388
- methods: {
8389
- closeEmojis() {
8390
- try {
8391
- this.$root.$refs[`etf-${this.textId}`].showEmojis ? this.$root.$refs[`etf-${this.textId}`].away() : '';
8392
- } catch (e) {
8393
- console.error("Nao foi possivel fechar os emojis");
8394
- console.error(e);
8395
- }
8396
- },
8293
+ var _c = _vm._self._c || _h;
8397
8294
 
8398
- away() {
8399
- this.openFiles = false;
8400
- },
8295
+ return _vm.maxCharacters ? _c('span', {
8296
+ staticClass: "max-characters no-width",
8297
+ domProps: {
8298
+ "textContent": _vm._s("(" + this.remainingCharacters + ")")
8299
+ }
8300
+ }) : _vm._e();
8301
+ };
8401
8302
 
8402
- setDefaultMessage(msg) {
8403
- this.message = msg;
8404
- this.sendFinalMessage();
8405
- },
8303
+ var __vue_staticRenderFns__$7 = [];
8304
+ /* style */
8406
8305
 
8407
- insertEmoji(emoji) {
8408
- const textarea = document.querySelector(`#text-footer-${this.textId}`);
8306
+ const __vue_inject_styles__$7 = undefined;
8307
+ /* scoped */
8409
8308
 
8410
- if (textarea) {
8411
- this.focusTextarea();
8412
- const cursorStart = textarea.selectionStart;
8413
- const cursorEnd = textarea.selectionEnd;
8414
- this.message = this.message.slice(0, cursorStart) + emoji.native + this.message.slice(cursorEnd);
8415
- this.sendFinalMessage();
8416
- }
8417
- },
8309
+ const __vue_scope_id__$7 = undefined;
8310
+ /* module identifier */
8418
8311
 
8419
- verifyMessage() {
8420
- if (this.textareaSettings.maxCharacters && this.message) {
8421
- if (this.message.length > this.textareaSettings.maxCharacters) {
8422
- if (!document.querySelector(".toasted.toasted-primary.error")) this.$toasted.global.limiteCaracter();
8423
- return false;
8424
- }
8425
- }
8312
+ const __vue_module_identifier__$7 = undefined;
8313
+ /* functional template */
8426
8314
 
8427
- if ((!this.message || !this.message.trim()) && !this.showFilePreview && !this.audioFile) return false;
8428
- if (this.textareaSettings.disabled) return false;
8315
+ const __vue_is_functional_template__$7 = false;
8316
+ /* style inject */
8429
8317
 
8430
- if (this.fileFormatError) {
8431
- this.$toasted.global.formatoInvalido();
8432
- return false;
8433
- }
8318
+ /* style inject SSR */
8434
8319
 
8435
- return true;
8436
- },
8320
+ /* style inject shadow dom */
8437
8321
 
8438
- removeHTMLElementsFromMessage(message) {
8439
- const regexTags = /<\/?[\d\w\s=\-:./'";]+>/gi;
8440
- if (message.match(regexTags)) message = message.replace(regexTags, ' ');
8441
- return message;
8442
- },
8322
+ const __vue_component__$8 = /*#__PURE__*/normalizeComponent({
8323
+ render: __vue_render__$7,
8324
+ staticRenderFns: __vue_staticRenderFns__$7
8325
+ }, __vue_inject_styles__$7, __vue_script__$7, __vue_scope_id__$7, __vue_is_functional_template__$7, __vue_module_identifier__$7, false, undefined, undefined, undefined);
8443
8326
 
8444
- formatMessage(message) {
8445
- if (!message) return "";
8446
- message = message.replace(/\n$/, "", message);
8447
- message = returnMessageWithHexa(message);
8448
- message = this.removeHTMLElementsFromMessage(message);
8449
- return message;
8450
- },
8327
+ var RemainingCharacters = __vue_component__$8;
8451
8328
 
8452
- sendFinalMessage() {
8453
- const messageAux = this.formatMessage(this.message);
8454
- this.$emit("final-message", messageAux);
8455
- },
8329
+ //
8330
+ //
8331
+ //
8332
+ //
8333
+ //
8334
+ //
8335
+ var script$6 = {
8336
+ props: {
8337
+ dictionary: {
8338
+ type: Object,
8339
+ required: true
8340
+ }
8341
+ },
8456
8342
 
8457
- sendMessageHandler(event) {
8458
- this.sendMessage(event);
8343
+ data() {
8344
+ return {
8345
+ isRecording: false,
8346
+ mediaRecorder: {}
8347
+ };
8348
+ },
8349
+
8350
+ methods: {
8351
+ toggleAudioRecorder() {
8352
+ if (!this.mediaRecorder.state) return this.initAudioRecorder();
8353
+ this.isRecording = !this.isRecording;
8354
+ if (this.isRecording) return this.mediaRecorder.start();
8355
+ return this.mediaRecorder.stop();
8459
8356
  },
8460
8357
 
8461
- sendMessage(event) {
8462
- if (this.isSending) return;
8358
+ initAudioRecorder() {
8359
+ navigator.mediaDevices.getUserMedia({
8360
+ audio: true
8361
+ }).then(stream => {
8362
+ this.mediaRecorder = new MediaRecorder(stream);
8363
+ const audioChunks = [];
8364
+
8365
+ this.mediaRecorder.ondataavailable = eventData => {
8366
+ audioChunks.push(eventData.data);
8367
+ };
8368
+
8369
+ this.mediaRecorder.onstop = () => {
8370
+ const blob = new Blob(audioChunks, {
8371
+ type: "audio/mpeg"
8372
+ });
8373
+ blob.lastModifiedDate = new Date();
8374
+ blob.name = `im-audio-file-${parseInt(Math.random() * 50000)}`;
8375
+ const reader = new FileReader();
8376
+ reader.readAsDataURL(blob);
8377
+
8378
+ reader.onloadend = () => {
8379
+ this.$emit("set-audio", {
8380
+ audioFile: new File([blob], `${blob.name}.mpeg`, {
8381
+ type: blob.type
8382
+ }),
8383
+ audioSource: reader.result
8384
+ });
8385
+ };
8386
+
8387
+ stream.getTracks().forEach(track => track.stop());
8388
+ };
8389
+
8390
+ this.toggleAudioRecorder();
8391
+ }, error => {
8392
+ this.$toasted.global.defaultError({
8393
+ msg: this.dictionary.msg_permitir_audio
8394
+ });
8395
+ console.error("error audio recorder: ", error);
8396
+ });
8397
+ },
8398
+
8399
+ deleteMediaRecorder() {
8400
+ this.mediaRecorder = {};
8401
+ }
8402
+
8403
+ }
8404
+ };
8405
+
8406
+ /* script */
8407
+ const __vue_script__$6 = script$6;
8408
+ /* template */
8409
+
8410
+ var __vue_render__$6 = function () {
8411
+ var _vm = this;
8412
+
8413
+ var _h = _vm.$createElement;
8414
+
8415
+ var _c = _vm._self._c || _h;
8416
+
8417
+ return _c('span', {
8418
+ staticClass: "text-footer-actions--btn",
8419
+ class: {
8420
+ 'audio-activated': _vm.isRecording
8421
+ },
8422
+ on: {
8423
+ "click": _vm.toggleAudioRecorder
8424
+ }
8425
+ }, [_c('fa-icon', {
8426
+ attrs: {
8427
+ "icon": ['fas', 'microphone']
8428
+ }
8429
+ })], 1);
8430
+ };
8431
+
8432
+ var __vue_staticRenderFns__$6 = [];
8433
+ /* style */
8434
+
8435
+ const __vue_inject_styles__$6 = undefined;
8436
+ /* scoped */
8437
+
8438
+ const __vue_scope_id__$6 = undefined;
8439
+ /* module identifier */
8440
+
8441
+ const __vue_module_identifier__$6 = undefined;
8442
+ /* functional template */
8443
+
8444
+ const __vue_is_functional_template__$6 = false;
8445
+ /* style inject */
8446
+
8447
+ /* style inject SSR */
8448
+
8449
+ /* style inject shadow dom */
8450
+
8451
+ const __vue_component__$7 = /*#__PURE__*/normalizeComponent({
8452
+ render: __vue_render__$6,
8453
+ staticRenderFns: __vue_staticRenderFns__$6
8454
+ }, __vue_inject_styles__$6, __vue_script__$6, __vue_scope_id__$6, __vue_is_functional_template__$6, __vue_module_identifier__$6, false, undefined, undefined, undefined);
8455
+
8456
+ var BtnMic = __vue_component__$7;
8457
+
8458
+ //
8459
+ //
8460
+ //
8461
+ //
8462
+ //
8463
+ //
8464
+ //
8465
+ //
8466
+ //
8467
+ //
8468
+ //
8469
+ //
8470
+ //
8471
+ //
8472
+ //
8473
+ //
8474
+ //
8475
+ //
8476
+ //
8477
+ //
8478
+ //
8479
+ //
8480
+ var script$5 = {
8481
+ props: {
8482
+ dictionary: {
8483
+ type: Object,
8484
+ required: true
8485
+ },
8486
+ file: {
8487
+ type: File,
8488
+ required: true
8489
+ },
8490
+ isDoc: {
8491
+ type: Boolean,
8492
+ required: false
8493
+ },
8494
+ fileFormatError: {
8495
+ type: Boolean,
8496
+ required: false
8497
+ },
8498
+ validFileFormats: {
8499
+ type: String,
8500
+ required: false,
8501
+ default: ""
8502
+ },
8503
+ imagePreview: {
8504
+ type: String,
8505
+ required: false
8506
+ }
8507
+ },
8508
+ methods: {
8509
+ deleteFile() {
8510
+ this.$emit("delete-file");
8511
+ },
8512
+
8513
+ openImage() {
8514
+ this.$emit("open-image");
8515
+ }
8516
+
8517
+ }
8518
+ };
8519
+
8520
+ /* script */
8521
+ const __vue_script__$5 = script$5;
8522
+ /* template */
8523
+
8524
+ var __vue_render__$5 = function () {
8525
+ var _vm = this;
8526
+
8527
+ var _h = _vm.$createElement;
8528
+
8529
+ var _c = _vm._self._c || _h;
8530
+
8531
+ return _c('div', {
8532
+ staticClass: "single-file-preview"
8533
+ }, [_c('span', {
8534
+ staticClass: "text-footer-exclude-file",
8535
+ attrs: {
8536
+ "title": _vm.dictionary.msg_cancelar_anexo
8537
+ },
8538
+ on: {
8539
+ "click": _vm.deleteFile
8540
+ }
8541
+ }, [_c('fa-icon', {
8542
+ attrs: {
8543
+ "icon": ['fas', 'times-circle']
8544
+ }
8545
+ })], 1), _vm._v(" "), _vm.fileFormatError ? _c('div', {
8546
+ staticClass: "text-footer-invalid-format"
8547
+ }, [_c('h3', {
8548
+ domProps: {
8549
+ "textContent": _vm._s(_vm.dictionary.titulo_msg_formato_invalido)
8550
+ }
8551
+ }), _vm._v(" "), _c('h4', {
8552
+ domProps: {
8553
+ "textContent": _vm._s(_vm.validFileFormats)
8554
+ }
8555
+ })]) : [_vm.file.name ? _c('h3', {
8556
+ staticClass: "text-footer-preview-title"
8557
+ }, [_vm.isDoc ? _c('fa-icon', {
8558
+ attrs: {
8559
+ "icon": ['fas', 'file-alt']
8560
+ }
8561
+ }) : _c('fa-icon', {
8562
+ attrs: {
8563
+ "icon": ['fas', 'image']
8564
+ }
8565
+ }), _vm._v("\n " + _vm._s(_vm.file.name) + "\n ")], 1) : _vm._e(), _vm._v(" "), _vm.imagePreview ? _c('div', {
8566
+ staticClass: "text-footer-image-preview"
8567
+ }, [_c('img', {
8568
+ attrs: {
8569
+ "src": _vm.imagePreview,
8570
+ "alt": _vm.dictionary.alt_previa_img
8571
+ },
8572
+ on: {
8573
+ "click": _vm.openImage
8574
+ }
8575
+ })]) : _vm._e()]], 2);
8576
+ };
8577
+
8578
+ var __vue_staticRenderFns__$5 = [];
8579
+ /* style */
8580
+
8581
+ const __vue_inject_styles__$5 = undefined;
8582
+ /* scoped */
8583
+
8584
+ const __vue_scope_id__$5 = undefined;
8585
+ /* module identifier */
8586
+
8587
+ const __vue_module_identifier__$5 = undefined;
8588
+ /* functional template */
8589
+
8590
+ const __vue_is_functional_template__$5 = false;
8591
+ /* style inject */
8592
+
8593
+ /* style inject SSR */
8594
+
8595
+ /* style inject shadow dom */
8596
+
8597
+ const __vue_component__$6 = /*#__PURE__*/normalizeComponent({
8598
+ render: __vue_render__$5,
8599
+ staticRenderFns: __vue_staticRenderFns__$5
8600
+ }, __vue_inject_styles__$5, __vue_script__$5, __vue_scope_id__$5, __vue_is_functional_template__$5, __vue_module_identifier__$5, false, undefined, undefined, undefined);
8601
+
8602
+ var SingleFilePreview = __vue_component__$6;
8603
+
8604
+ //
8605
+ var script$4 = {
8606
+ components: {
8607
+ Loader
8608
+ },
8609
+
8610
+ data() {
8611
+ return {
8612
+ loading: true,
8613
+ loadingTimeout: 0,
8614
+ ignoreNextUpdate: false
8615
+ };
8616
+ },
8617
+
8618
+ mounted() {
8619
+ setTimeout(() => {
8620
+ this.loading = false;
8621
+ }, 500);
8622
+ },
8623
+
8624
+ watch: {
8625
+ file() {
8626
+ if (!this.ignoreNextUpdate) {
8627
+ if (this.loadingTimeout) clearTimeout(this.loadingTimeout);
8628
+ this.loading = true;
8629
+ this.loadingTimeout = setTimeout(() => {
8630
+ this.loading = false;
8631
+ }, 500);
8632
+ this.ignoreNextUpdate = true;
8633
+ }
8634
+
8635
+ this.ignoreNextUpdate = false;
8636
+ }
8637
+
8638
+ },
8639
+ props: {
8640
+ dictionary: {
8641
+ type: Object,
8642
+ required: true
8643
+ },
8644
+ file: {
8645
+ type: Array,
8646
+ required: true
8647
+ },
8648
+ fileFormatError: {
8649
+ type: Boolean,
8650
+ required: false
8651
+ },
8652
+ validFileFormats: {
8653
+ type: String,
8654
+ required: false,
8655
+ default: ""
8656
+ }
8657
+ },
8658
+ methods: {
8659
+ deleteFile() {
8660
+ this.$emit("delete-file");
8661
+ },
8662
+
8663
+ deleteSpecificFile(fileName, index) {
8664
+ this.ignoreNextUpdate = true;
8665
+ this.$emit("delete-specific-file", {
8666
+ fileName,
8667
+ index
8668
+ });
8669
+ },
8670
+
8671
+ openImage(image) {
8672
+ this.$emit("open-image", image);
8673
+ },
8674
+
8675
+ icon(imgOrDoc) {
8676
+ if (!imgOrDoc) return ['fas', 'times-circle'];
8677
+ return imgOrDoc == 'doc' ? ['fas', 'file-alt'] : ['fas', 'image'];
8678
+ },
8679
+
8680
+ isPdf(type) {
8681
+ return type === "application/pdf" ? true : false;
8682
+ }
8683
+
8684
+ }
8685
+ };
8686
+
8687
+ /* script */
8688
+ const __vue_script__$4 = script$4;
8689
+ /* template */
8690
+
8691
+ var __vue_render__$4 = function () {
8692
+ var _vm = this;
8693
+
8694
+ var _h = _vm.$createElement;
8695
+
8696
+ var _c = _vm._self._c || _h;
8697
+
8698
+ return _c('div', {
8699
+ staticClass: "multiple-file-preview"
8700
+ }, [_c('transition-group', {
8701
+ attrs: {
8702
+ "name": "fade"
8703
+ }
8704
+ }, [_vm.loading ? _c('Loader', {
8705
+ key: "mfp-loader"
8706
+ }) : _vm.fileFormatError ? [_c('span', {
8707
+ key: "mfp-exlude-file",
8708
+ staticClass: "text-footer-exclude-file",
8709
+ attrs: {
8710
+ "title": _vm.dictionary.msg_cancelar_anexo
8711
+ },
8712
+ on: {
8713
+ "click": _vm.deleteFile
8714
+ }
8715
+ }, [_c('fa-icon', {
8716
+ attrs: {
8717
+ "icon": ['fas', 'times-circle']
8718
+ }
8719
+ })], 1), _vm._v(" "), _vm.fileFormatError ? _c('div', {
8720
+ key: "mfp-invalid-format",
8721
+ staticClass: "text-footer-invalid-format"
8722
+ }, [_c('h3', {
8723
+ domProps: {
8724
+ "textContent": _vm._s(_vm.dictionary.titulo_msg_formato_invalido)
8725
+ }
8726
+ }), _vm._v(" "), _c('h4', {
8727
+ domProps: {
8728
+ "textContent": _vm._s(_vm.validFileFormats)
8729
+ }
8730
+ })]) : _vm._e()] : _vm._l(_vm.file, function (singleFile, index) {
8731
+ return _c('div', {
8732
+ key: index,
8733
+ staticClass: "file-preview"
8734
+ }, [_c('p', {
8735
+ staticClass: "file-title"
8736
+ }, [_c('fa-icon', {
8737
+ attrs: {
8738
+ "icon": _vm.icon(singleFile.imgOrDoc)
8739
+ }
8740
+ }), _vm._v("\n " + _vm._s(singleFile.name) + "\n ")], 1), _vm._v(" "), singleFile.invalid ? _c('p', {
8741
+ staticClass: "file-title red"
8742
+ }, [_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', {
8743
+ staticClass: "small-img"
8744
+ }, [singleFile.imgOrDoc === 'img' ? _c('span', {
8745
+ staticClass: "img-container"
8746
+ }, [_c('img', {
8747
+ attrs: {
8748
+ "src": singleFile.src,
8749
+ "alt": _vm.dictionary.alt_previa_img
8750
+ },
8751
+ on: {
8752
+ "click": function ($event) {
8753
+ return _vm.openImage(singleFile.src);
8754
+ }
8755
+ }
8756
+ })]) : _vm.isPdf(singleFile.type) ? _c('span', {
8757
+ staticClass: "pdf"
8758
+ }, [_c('fa-icon', {
8759
+ attrs: {
8760
+ "icon": ['fas', 'file-pdf']
8761
+ }
8762
+ })], 1) : _vm._e()]), _vm._v(" "), _c('span', {
8763
+ staticClass: "delete-file",
8764
+ attrs: {
8765
+ "title": _vm.dictionary.msg_excluir_anexo
8766
+ },
8767
+ on: {
8768
+ "click": function ($event) {
8769
+ return _vm.deleteSpecificFile(singleFile.name, index);
8770
+ }
8771
+ }
8772
+ }, [_c('fa-icon', {
8773
+ attrs: {
8774
+ "icon": ['fas', 'times-circle']
8775
+ }
8776
+ })], 1)]);
8777
+ })], 2)], 1);
8778
+ };
8779
+
8780
+ var __vue_staticRenderFns__$4 = [];
8781
+ /* style */
8782
+
8783
+ const __vue_inject_styles__$4 = function (inject) {
8784
+ if (!inject) return;
8785
+ inject("data-v-1ab24e70_0", {
8786
+ 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:2.5px;border-top-right-radius:2.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}",
8787
+ map: undefined,
8788
+ media: undefined
8789
+ });
8790
+ };
8791
+ /* scoped */
8792
+
8793
+
8794
+ const __vue_scope_id__$4 = undefined;
8795
+ /* module identifier */
8796
+
8797
+ const __vue_module_identifier__$4 = undefined;
8798
+ /* functional template */
8799
+
8800
+ const __vue_is_functional_template__$4 = false;
8801
+ /* style inject SSR */
8802
+
8803
+ /* style inject shadow dom */
8804
+
8805
+ const __vue_component__$5 = /*#__PURE__*/normalizeComponent({
8806
+ render: __vue_render__$4,
8807
+ staticRenderFns: __vue_staticRenderFns__$4
8808
+ }, __vue_inject_styles__$4, __vue_script__$4, __vue_scope_id__$4, __vue_is_functional_template__$4, __vue_module_identifier__$4, false, createInjector, undefined, undefined);
8809
+
8810
+ var MultipleFilePreview = __vue_component__$5;
8811
+
8812
+ //
8813
+ var script$3 = {
8814
+ components: {
8815
+ SingleFilePreview,
8816
+ MultipleFilePreview
8817
+ },
8818
+ props: {
8819
+ textId: {
8820
+ type: String,
8821
+ required: true
8822
+ },
8823
+ dictionary: {
8824
+ type: Object,
8825
+ required: true
8826
+ },
8827
+ fileSettings: {
8828
+ type: Object,
8829
+ required: false
8830
+ },
8831
+ cssStyle: {
8832
+ type: Object,
8833
+ required: false
8834
+ }
8835
+ },
8836
+
8837
+ data() {
8838
+ return {
8839
+ file: [],
8840
+ openFiles: false,
8841
+ showFilePreview: false,
8842
+ imagePreview: "",
8843
+ isDoc: false,
8844
+ fileFormatError: false,
8845
+ validFileFormats: ""
8846
+ };
8847
+ },
8848
+
8849
+ computed: {
8850
+ previewContainerClass() {
8851
+ if (this.fileFormatError) return "isError";
8852
+ if (this.fileSettings.multiple) return "isMultiple";
8853
+ if (this.isDoc) return "isDoc";
8854
+ return "isMsg";
8855
+ }
8856
+
8857
+ },
8858
+ methods: {
8859
+ toggleFiles() {
8860
+ this.openFiles = !this.openFiles;
8861
+ },
8862
+
8863
+ openSelectFileHandler(type) {
8864
+ const fileInput = document.querySelector(`#${type}-${this.textId}`);
8865
+ if (fileInput) fileInput.click();
8866
+ if (!fileInput) if (!document.querySelector(".toasted.toasted-primary.error")) this.$toasted.global.defaultError();
8867
+ },
8868
+
8869
+ isFileValid(type, fileName) {
8870
+ const extensions = type === "img" ? this.fileSettings.imagesExtensions : this.fileSettings.docsExtensions;
8871
+ const regex = new RegExp("(" + extensions + ")", "i");
8872
+ if (regex.test(fileName)) return true;
8873
+ this.showToastedValidFormats();
8874
+ return false;
8875
+ },
8876
+
8877
+ showToastedValidFormats() {
8878
+ if (!document.querySelector(".toasted.toasted-primary.error")) this.$toasted.global.defaultError({
8879
+ msg: this.dictionary.msg_formato_invalido
8880
+ });
8881
+ const str = {
8882
+ img: this.fileSettings.imagesExtensions.split("|").join(", "),
8883
+ doc: this.fileSettings.docsExtensions.split("|").join(", ")
8884
+ };
8885
+ if (!document.querySelector(".toasted.toasted-primary.info")) this.$toasted.global.showValidFormats({
8886
+ msg: `Imagens: ${str.img} - Documentos: ${str.doc} ${this.dictionary.msg_extensoes_aceitas}`
8887
+ });
8888
+ },
8889
+
8890
+ fileUpload(event, type, externalCall) {
8891
+ try {
8892
+ this.openFiles = false;
8893
+ let filesAux = !externalCall ? event.target.files ? event.target.files : event.dataTransfer.files : event;
8894
+ this.file = filesAux.length ? filesAux : this.file;
8895
+ if (!this.file.length) return;
8896
+
8897
+ if (!this.fileSettings.multiple) {
8898
+ this.file = this.file[0];
8899
+ this.singleFileUpload(type, this.file.name);
8900
+ } else {
8901
+ this.multipleFileUpload();
8902
+ }
8903
+ } catch (e) {
8904
+ console.error("Error file upload");
8905
+ console.error(e);
8906
+ }
8907
+ },
8908
+
8909
+ returnFileType(file) {
8910
+ const imgRegex = new RegExp("\.(" + this.fileSettings.imagesExtensions + ")", "i");
8911
+ if (imgRegex.test(file.name)) return "img";
8912
+ const docRegex = new RegExp("\.(" + this.fileSettings.docsExtensions + ")", "i");
8913
+ if (docRegex.test(file.name)) return "doc";
8914
+ return "";
8915
+ },
8916
+
8917
+ multipleFileUpload() {
8918
+ let waitForImageLoad = false;
8919
+ this.file = Array.from(this.file);
8920
+ this.file.forEach(file => {
8921
+ const fileReader = new FileReader();
8922
+ const singleFileType = this.returnFileType(file);
8923
+ if (!singleFileType) file.invalid = true;
8924
+ file.imgOrDoc = singleFileType ? singleFileType : "";
8925
+ if (file.imgOrDoc === "doc") this.isDoc = true;
8926
+
8927
+ if (file.imgOrDoc === "img") {
8928
+ waitForImageLoad = true;
8929
+
8930
+ fileReader.onload = () => file.src = fileReader.result;
8931
+
8932
+ fileReader.onloadend = () => this.emitFileVars(true);
8933
+ }
8934
+
8935
+ if (this.isFileValid(file.imgOrDoc, file.name)) {
8936
+ if (file.imgOrDoc === "img") fileReader.readAsDataURL(file);
8937
+ } else {
8938
+ file.invalid = true;
8939
+ this.fileFormatError = true;
8940
+ this.validFileFormats = `${file.imgOrDoc === "img" ? this.fileSettings.imagesExtensions.split("|").join(", ") : this.fileSettings.docsExtensions.split("|").join(", ")} ${this.dictionary.msg_extensoes_aceitas}`;
8941
+ }
8942
+ });
8943
+ if (this.isDoc && !waitForImageLoad) this.emitFileVars();
8944
+ },
8945
+
8946
+ singleFileUpload(type, fileName) {
8947
+ const fileReader = new FileReader();
8948
+
8949
+ if (type === "img") {
8950
+ fileReader.onload = () => this.imagePreview = fileReader.result;
8951
+
8952
+ fileReader.onloadend = () => this.emitFileVars();
8953
+ }
8954
+
8955
+ if (this.isFileValid(type, fileName)) {
8956
+ if (type === "img") fileReader.readAsDataURL(this.file);
8957
+ if (type === "doc") this.isDoc = true;
8958
+ this.fileFormatError = false;
8959
+ } else {
8960
+ this.fileFormatError = true;
8961
+ this.validFileFormats = `${type === "img" ? this.fileSettings.imagesExtensions.split("|").join(", ") : this.fileSettings.docsExtensions.split("|").join(", ")} ${this.dictionary.msg_extensoes_aceitas}`;
8962
+ }
8963
+
8964
+ if (this.isDoc) this.emitFileVars();
8965
+ },
8966
+
8967
+ toggleFilePreview() {
8968
+ this.showFilePreview = !this.showFilePreview;
8969
+ },
8970
+
8971
+ emitFileVars() {
8972
+ const vars = {
8973
+ file: this.file,
8974
+ isDoc: this.isDoc,
8975
+ showFilePreview: this.showFilePreview,
8976
+ imagePreview: this.imagePreview,
8977
+ fileFormatError: this.fileFormatError
8978
+ };
8979
+ this.$emit("set-file-vars", vars);
8980
+ this.$parent.focusTextarea();
8981
+ },
8982
+
8983
+ deleteSpecificFile(obj) {
8984
+ const {
8985
+ fileName
8986
+ } = obj;
8987
+ this.file = this.file.filter(file => {
8988
+ return file.name != fileName;
8989
+ });
8990
+ this.file.length ? this.emitFileVars(true) : this.deleteFile();
8991
+ },
8992
+
8993
+ deleteFile() {
8994
+ this.$emit("set-file-vars", {
8995
+ file: [],
8996
+ isDoc: false,
8997
+ showFilePreview: false,
8998
+ imagePreview: "",
8999
+ fileFormatError: false
9000
+ });
9001
+ this.file = [];
9002
+ this.isDoc = false;
9003
+ this.showFilePreview = false;
9004
+ this.imagePreview = "";
9005
+ this.fileFormatError = false;
9006
+ this.validFileFormats = "";
9007
+ },
9008
+
9009
+ openImage(imagePreview) {
9010
+ this.$emit("open-image", !imagePreview ? this.imagePreview : imagePreview);
9011
+ }
9012
+
9013
+ }
9014
+ };
9015
+
9016
+ /* script */
9017
+ const __vue_script__$3 = script$3;
9018
+ /* template */
9019
+
9020
+ var __vue_render__$3 = function () {
9021
+ var _vm = this;
9022
+
9023
+ var _h = _vm.$createElement;
9024
+
9025
+ var _c = _vm._self._c || _h;
9026
+
9027
+ return _c('span', {
9028
+ staticClass: "text-footer-actions--btn",
9029
+ class: {
9030
+ 'files-activated': _vm.openFiles || _vm.file.length
9031
+ },
9032
+ on: {
9033
+ "click": function ($event) {
9034
+ _vm.fileSettings.multiple ? _vm.openSelectFileHandler('both') : _vm.toggleFiles;
9035
+ }
9036
+ }
9037
+ }, [_c('transition', {
9038
+ attrs: {
9039
+ "name": "fade"
9040
+ }
9041
+ }, [_vm.file.length ? _c('span', {
9042
+ staticClass: "files-counter",
9043
+ attrs: {
9044
+ "title": _vm.dictionary.msg_abrir_anexos
9045
+ },
9046
+ domProps: {
9047
+ "textContent": _vm._s(_vm.file.length)
9048
+ },
9049
+ on: {
9050
+ "click": function ($event) {
9051
+ $event.stopPropagation();
9052
+ return _vm.toggleFilePreview.apply(null, arguments);
9053
+ }
9054
+ }
9055
+ }) : _vm._e()]), _vm._v(" "), _c('fa-icon', {
9056
+ attrs: {
9057
+ "icon": ['fas', 'paperclip'],
9058
+ "title": _vm.dictionary.title_selecionar_anexo
9059
+ }
9060
+ }), _vm._v(" "), _c('transition', {
9061
+ attrs: {
9062
+ "name": "show"
9063
+ }
9064
+ }, [_vm.openFiles ? _c('div', {
9065
+ staticClass: "text-footer-files-container",
9066
+ class: {
9067
+ 'horizontal': _vm.cssStyle.outsideButtons
9068
+ }
9069
+ }, [_c('div', {
9070
+ staticClass: "files-btn images",
9071
+ class: {
9072
+ 'margin-bottom': _vm.cssStyle.outsideButtons
9073
+ },
9074
+ attrs: {
9075
+ "title": _vm.dictionary.title_anexo_img
9076
+ },
9077
+ on: {
9078
+ "click": function ($event) {
9079
+ return _vm.openSelectFileHandler('img');
9080
+ }
9081
+ }
9082
+ }, [_c('fa-icon', {
9083
+ attrs: {
9084
+ "icon": ['fas', 'image']
9085
+ }
9086
+ })], 1), _vm._v(" "), _c('div', {
9087
+ staticClass: "files-btn docs",
9088
+ attrs: {
9089
+ "title": _vm.dictionary.title_anexo_doc
9090
+ },
9091
+ on: {
9092
+ "click": function ($event) {
9093
+ return _vm.openSelectFileHandler('doc');
9094
+ }
9095
+ }
9096
+ }, [_c('fa-icon', {
9097
+ attrs: {
9098
+ "icon": ['fas', 'file-alt']
9099
+ }
9100
+ })], 1)]) : _vm._e()]), _vm._v(" "), _c('div', {
9101
+ staticClass: "files-pointers d-none"
9102
+ }, [_vm.fileSettings.multiple ? _c('input', {
9103
+ attrs: {
9104
+ "type": "file",
9105
+ "id": "both-" + _vm.textId,
9106
+ "accept": "image/*,application/*",
9107
+ "multiple": ""
9108
+ },
9109
+ on: {
9110
+ "change": function ($event) {
9111
+ return _vm.fileUpload($event, 'both');
9112
+ }
9113
+ }
9114
+ }) : _vm._e(), _vm._v(" "), !_vm.fileSettings.multiple ? _c('input', {
9115
+ attrs: {
9116
+ "type": "file",
9117
+ "id": "img-" + _vm.textId,
9118
+ "accept": "image/*"
9119
+ },
9120
+ on: {
9121
+ "change": function ($event) {
9122
+ return _vm.fileUpload($event, 'img');
9123
+ }
9124
+ }
9125
+ }) : _vm._e(), _vm._v(" "), !_vm.fileSettings.multiple ? _c('input', {
9126
+ attrs: {
9127
+ "type": "file",
9128
+ "id": "doc-" + _vm.textId,
9129
+ "accept": "application/*"
9130
+ },
9131
+ on: {
9132
+ "change": function ($event) {
9133
+ return _vm.fileUpload($event, 'doc');
9134
+ }
9135
+ }
9136
+ }) : _vm._e()]), _vm._v(" "), _c('transition', {
9137
+ attrs: {
9138
+ "name": "fade"
9139
+ }
9140
+ }, [_c('div', {
9141
+ directives: [{
9142
+ name: "show",
9143
+ rawName: "v-show",
9144
+ value: _vm.showFilePreview,
9145
+ expression: "showFilePreview"
9146
+ }],
9147
+ staticClass: "text-footer-preview-container",
9148
+ class: [_vm.previewContainerClass],
9149
+ on: {
9150
+ "click": function ($event) {
9151
+ $event.stopPropagation();
9152
+ }
9153
+ }
9154
+ }, [!_vm.fileSettings.multiple ? _c('SingleFilePreview', {
9155
+ attrs: {
9156
+ "dictionary": _vm.dictionary,
9157
+ "file": _vm.file,
9158
+ "isDoc": _vm.isDoc,
9159
+ "fileFormatError": _vm.fileFormatError,
9160
+ "validFileFormats": _vm.validFileFormats,
9161
+ "imagePreview": _vm.imagePreview
9162
+ },
9163
+ on: {
9164
+ "delete-file": _vm.deleteFile,
9165
+ "open-image": _vm.openImage
9166
+ }
9167
+ }) : _c('MultipleFilePreview', {
9168
+ attrs: {
9169
+ "dictionary": _vm.dictionary,
9170
+ "file": _vm.file,
9171
+ "fileFormatError": _vm.fileFormatError,
9172
+ "validFileFormats": _vm.validFileFormats
9173
+ },
9174
+ on: {
9175
+ "delete-file": _vm.deleteFile,
9176
+ "delete-specific-file": _vm.deleteSpecificFile,
9177
+ "open-image": _vm.openImage
9178
+ }
9179
+ })], 1)])], 1);
9180
+ };
9181
+
9182
+ var __vue_staticRenderFns__$3 = [];
9183
+ /* style */
9184
+
9185
+ const __vue_inject_styles__$3 = function (inject) {
9186
+ if (!inject) return;
9187
+ inject("data-v-ba3fe4c6_0", {
9188
+ source: ".fade-enter-active,.fade-leave-active{transition:opacity .3s}.fade-enter,.fade-leave-to{opacity:0}.files-counter{position:absolute;top:0;z-index:1;right:0;font-size:.5rem;width:15px;height:15px;border-radius:50%;background:#a4ac86;display:flex;justify-content:center;align-items:center;cursor:pointer;opacity:.9;transition:all .3s;color:#fff;font-weight:900}.files-counter:hover{opacity:1}",
9189
+ map: undefined,
9190
+ media: undefined
9191
+ });
9192
+ };
9193
+ /* scoped */
9194
+
9195
+
9196
+ const __vue_scope_id__$3 = undefined;
9197
+ /* module identifier */
9198
+
9199
+ const __vue_module_identifier__$3 = undefined;
9200
+ /* functional template */
9201
+
9202
+ const __vue_is_functional_template__$3 = false;
9203
+ /* style inject SSR */
9204
+
9205
+ /* style inject shadow dom */
9206
+
9207
+ const __vue_component__$4 = /*#__PURE__*/normalizeComponent({
9208
+ render: __vue_render__$3,
9209
+ staticRenderFns: __vue_staticRenderFns__$3
9210
+ }, __vue_inject_styles__$3, __vue_script__$3, __vue_scope_id__$3, __vue_is_functional_template__$3, __vue_module_identifier__$3, false, createInjector, undefined, undefined);
9211
+
9212
+ var BtnFiles = __vue_component__$4;
9213
+
9214
+ //
9215
+ var script$2 = {
9216
+ components: {
9217
+ EmojisTextFooter,
9218
+ Loader,
9219
+ BtnMic,
9220
+ BtnFiles,
9221
+ RemainingCharacters
9222
+ },
9223
+ mixins: [mixin_1],
9224
+ props: {
9225
+ buttons: {
9226
+ type: Object,
9227
+ default: () => {
9228
+ return {
9229
+ hasEmojis: false,
9230
+ hasSendButton: false,
9231
+ hasFiles: false,
9232
+ hasAudio: false
9233
+ };
9234
+ },
9235
+ required: false
9236
+ },
9237
+ cssStyle: {
9238
+ type: Object,
9239
+ default: () => {
9240
+ return {
9241
+ width: "full",
9242
+ backgroundColor: "#FFF",
9243
+ outsideButtons: false
9244
+ };
9245
+ },
9246
+ required: false
9247
+ },
9248
+ textareaSettings: {
9249
+ type: Object,
9250
+ default: () => {
9251
+ return {
9252
+ placeholderMessage: "",
9253
+ maxCharacters: 0,
9254
+ sendOnEnter: false,
9255
+ disabled: false
9256
+ };
9257
+ },
9258
+ required: false
9259
+ },
9260
+ emojiSettings: {
9261
+ type: Object,
9262
+ default: () => {
9263
+ return {
9264
+ openEmojisFrom: "top",
9265
+ smallEmojis: false
9266
+ };
9267
+ },
9268
+ required: false
9269
+ },
9270
+ formattedMessageSettings: {
9271
+ type: Object,
9272
+ default: () => {
9273
+ return {
9274
+ hasHsm: false,
9275
+ msgType: 0
9276
+ };
9277
+ },
9278
+ required: false
9279
+ },
9280
+ fileSettings: {
9281
+ type: Object,
9282
+ default: () => {
9283
+ return {
9284
+ docsExtensions: "",
9285
+ imagesExtensions: "",
9286
+ multiple: false
9287
+ };
9288
+ },
9289
+ required: false
9290
+ },
9291
+ textId: {
9292
+ type: String,
9293
+ required: true
9294
+ },
9295
+ isMainChat: {
9296
+ type: Boolean,
9297
+ default: false,
9298
+ required: false
9299
+ },
9300
+ isSending: {
9301
+ type: Boolean,
9302
+ default: false,
9303
+ required: false
9304
+ },
9305
+ dictionary: {
9306
+ type: Object,
9307
+ required: true
9308
+ }
9309
+ },
9310
+
9311
+ data() {
9312
+ return {
9313
+ message: "",
9314
+ openFiles: false,
9315
+ file: [],
9316
+ showFilePreview: false,
9317
+ imagePreview: "",
9318
+ isDoc: false,
9319
+ fileFormatError: false,
9320
+ audioFile: "",
9321
+ audioSource: ""
9322
+ };
9323
+ },
9324
+
9325
+ created() {
9326
+ this.$root.$refs[`tf-${this.textId}`] = this;
9327
+ },
9328
+
9329
+ mounted() {
9330
+ setResizeListeners(this.$el, ".js-autoresize", ".js-parentresize"); // this.$root.$on("drop-file", (file, type) => { if(this.buttons.hasFiles) this.fileUpload(file, type, true) })
9331
+ // this.$root.$on("toggle-msg-formatada", () => { this.toggleHSM() })
9332
+ // this.$root.$on("textarea-focus", () => { this.focusTextarea() })
9333
+ // this.$root.$on("resize-footer-template", () => { this.adjustChatHeight() })
9334
+ // this.$root.$on("clear-footer-message", () => { this.message = "" })
9335
+ // if(this.cssStyle.outsideButtons) if(this.$root.$refs.chatCorpo) this.$root.$refs.chatCorpo.setOutsideButtons(this.cssStyle.outsideButtons)
9336
+ },
9337
+
9338
+ methods: {
9339
+ closeEmojis() {
9340
+ try {
9341
+ this.$root.$refs[`etf-${this.textId}`].showEmojis ? this.$root.$refs[`etf-${this.textId}`].away() : '';
9342
+ } catch (e) {
9343
+ console.error("Nao foi possivel fechar os emojis");
9344
+ console.error(e);
9345
+ }
9346
+ },
9347
+
9348
+ away() {
9349
+ if (this.$refs[`${this.textId}-file`]) this.$refs[`${this.textId}-file`].openFiles = false;
9350
+ },
9351
+
9352
+ setDefaultMessage(msg) {
9353
+ this.message = msg;
9354
+ this.sendFinalMessage();
9355
+ },
9356
+
9357
+ insertEmoji(emoji) {
9358
+ const textarea = document.querySelector(`#text-footer-${this.textId}`);
9359
+
9360
+ if (textarea) {
9361
+ this.focusTextarea();
9362
+ const cursorStart = textarea.selectionStart;
9363
+ const cursorEnd = textarea.selectionEnd;
9364
+ this.message = this.message.slice(0, cursorStart) + emoji.native + this.message.slice(cursorEnd);
9365
+ this.sendFinalMessage();
9366
+ }
9367
+ },
9368
+
9369
+ verifyMessage() {
9370
+ if (this.textareaSettings.maxCharacters && this.message) {
9371
+ if (this.message.length > this.textareaSettings.maxCharacters) {
9372
+ if (!document.querySelector(".toasted.toasted-primary.error")) this.$toasted.global.limiteCaracter();
9373
+ return false;
9374
+ }
9375
+ }
9376
+
9377
+ if ((!this.message || !this.message.trim()) && !this.showFilePreview && !this.audioFile) return false;
9378
+ if (this.textareaSettings.disabled) return false;
9379
+
9380
+ if (this.fileFormatError) {
9381
+ this.$toasted.global.defaultError({
9382
+ msg: this.dictionary.msg_formato_invalido
9383
+ });
9384
+ const str = {
9385
+ img: this.fileSettings.imagesExtensions.split("|").join(", "),
9386
+ doc: this.fileSettings.docsExtensions.split("|").join(", ")
9387
+ };
9388
+ this.$toasted.global.showValidFormats({
9389
+ msg: `Imagens: ${str.img} - Documentos: ${str.doc} ${this.dictionary.msg_extensoes_aceitas}`
9390
+ });
9391
+ return false;
9392
+ }
9393
+
9394
+ return true;
9395
+ },
9396
+
9397
+ removeHTMLElementsFromMessage(message) {
9398
+ const regexTags = /<\/?[\d\w\s=\-:./'";]+>/gi;
9399
+ if (message.match(regexTags)) message = message.replace(regexTags, ' ');
9400
+ return message;
9401
+ },
9402
+
9403
+ formatMessage(message) {
9404
+ if (!message) return "";
9405
+ message = message.replace(/\n$/, "", message);
9406
+ message = returnMessageWithHexa(message);
9407
+ message = this.removeHTMLElementsFromMessage(message);
9408
+ return message;
9409
+ },
9410
+
9411
+ sendFinalMessage() {
9412
+ const messageAux = this.formatMessage(this.message);
9413
+ this.$emit("final-message", messageAux);
9414
+ },
9415
+
9416
+ sendMessageHandler(event) {
9417
+ this.sendMessage(event);
9418
+ },
9419
+
9420
+ sendMessage(event) {
9421
+ if (this.isSending) return;
8463
9422
 
8464
9423
  if (this.isMainChat && event) {
8465
9424
  if (this.textareaSettings.sendOnEnter) {
@@ -8494,7 +9453,7 @@ var script$2 = {
8494
9453
 
8495
9454
  resetFooterData() {
8496
9455
  if (this.audioFile) this.deleteAudio();
8497
- if (this.showFilePreview) this.deleteFile();
9456
+ if (this.showFilePreview) this.$refs[`${this.textId}-file`].deleteFile();
8498
9457
  this.message = "";
8499
9458
  this.sendFinalMessage();
8500
9459
  resetTargets(this.$el, ".js-autoresize", ".js-parentresize", "38px");
@@ -8506,170 +9465,136 @@ var script$2 = {
8506
9465
  message,
8507
9466
  attachment: this.showFilePreview ? this.file : false,
8508
9467
  isDoc: this.isDoc,
8509
- image: this.imagePreview,
9468
+ imagePreview: this.imagePreview,
8510
9469
  isAudio: this.audioFile ? true : false,
8511
9470
  audioAttachment: this.audioSource
8512
9471
  };
8513
9472
  },
8514
9473
 
8515
- toggleFiles() {
8516
- this.openFiles = !this.openFiles;
8517
- },
8518
-
8519
- selectImage() {
8520
- const fileInput = document.querySelector(`#file-${this.textId}`);
8521
- if (fileInput) fileInput.click();
8522
- if (!fileInput) if (!document.querySelector(".toasted.toasted-primary.error")) this.$toasted.global.defaultError();
8523
- },
8524
-
8525
- selectDoc() {
8526
- const fileInput = document.querySelector(`#doc-${this.textId}`);
8527
- if (fileInput) fileInput.click();
8528
- if (!fileInput) if (!document.querySelector(".toasted.toasted-primary.error")) this.$toasted.global.defaultError();
9474
+ setFileVars(fileObj) {
9475
+ const {
9476
+ file,
9477
+ showFilePreview,
9478
+ imagePreview,
9479
+ isDoc,
9480
+ fileFormatError
9481
+ } = fileObj;
9482
+ this.file = file;
9483
+ this.showFilePreview = showFilePreview;
9484
+ this.imagePreview = imagePreview ? imagePreview : "";
9485
+ this.isDoc = isDoc;
9486
+ this.fileFormatError = fileFormatError;
8529
9487
  },
8530
9488
 
8531
- isFileValid(type) {
8532
- const extensions = type === "img" ? this.fileSettings.imagesExtensions : this.fileSettings.docsExtensions;
8533
- const regex = new RegExp("(" + extensions + ")", "i");
8534
- if (regex.test(this.file.name)) return true;
8535
- this.$toasted.global.formatoInvalido();
8536
- return false;
9489
+ openImage(imagePreview) {
9490
+ this.$emit("open-image", imagePreview);
8537
9491
  },
8538
9492
 
8539
- fileUpload(event, type, externalCall) {
8540
- this.openFiles = false;
8541
- if (this.showFilePreview) this.deleteFile();
8542
- const fileReader = new FileReader();
8543
- this.file = !externalCall ? event.target.files || event.dataTransfer.files : event;
8544
-
8545
- if (!this.file.length) {
8546
- this.file = [];
8547
- return;
8548
- }
8549
-
8550
- this.file = this.file[0];
8551
-
8552
- if (!externalCall) {
8553
- const selector = type === "img" ? `#file-${this.textId}` : `#doc-${this.textId}`;
8554
- document.querySelector(selector).value = "";
8555
- }
8556
-
8557
- this.showFilePreview = true;
8558
-
8559
- if (type === "img") {
8560
- fileReader.onload = () => {
8561
- this.imagePreview = fileReader.result;
8562
- };
8563
- }
8564
-
8565
- if (this.isFileValid(type)) {
8566
- if (type === "img") fileReader.readAsDataURL(this.file);
8567
- if (type === "doc") this.isDoc = true;
8568
- this.focusTextarea();
8569
- this.fileFormatError = false;
8570
- } else {
8571
- this.fileFormatError = true;
8572
- this.validFileFormats = `${type === "img" ? this.fileSettings.imagesExtensions : this.fileSettings.docsExtensions} ${this.dictionary.msg_extensoes_aceitas}`;
8573
- }
9493
+ setAudio(audioObj) {
9494
+ const {
9495
+ audioFile,
9496
+ audioSource
9497
+ } = audioObj;
9498
+ this.audioFile = audioFile;
9499
+ this.audioSource = audioSource;
8574
9500
  },
8575
9501
 
8576
- deleteFile() {
8577
- this.file = [];
8578
- this.isDoc = false;
8579
- this.showFilePreview = false;
8580
- this.imagePreview = "";
8581
- this.fileFormatError = false;
8582
- this.validFileFormats = "";
9502
+ deleteAudio() {
9503
+ this.$refs[`${this.textId}-mic`].deleteMediaRecorder();
9504
+ this.audioFile = "";
9505
+ this.audioSource = "";
8583
9506
  },
8584
9507
 
8585
- openImage() {
8586
- this.$store.dispatch("toggleBlocker", {
8587
- state: true,
8588
- origin: "visualizar-imagem"
9508
+ returnFileType(file, stopAlert) {
9509
+ const imgRegex = new RegExp("\.(" + this.fileSettings.imagesExtensions + ")", "i");
9510
+ if (imgRegex.test(file.name)) return "img";
9511
+ const docRegex = new RegExp("\.(" + this.fileSettings.docsExtensions + ")", "i");
9512
+ if (docRegex.test(file.name)) return "doc";
9513
+ if (!stopAlert) return;
9514
+ if (!document.querySelector(".toasted.toasted-primary.error")) this.$toasted.global.defaultError({
9515
+ msg: this.dictionary.msg_formato_invalido
9516
+ });
9517
+ const str = {
9518
+ img: this.fileSettings.imagesExtensions.split("|").join(", "),
9519
+ doc: this.fileSettings.docsExtensions.split("|").join(", ")
9520
+ };
9521
+ this.$toasted.global.showValidFormats({
9522
+ msg: `Imagens: ${str.img} - Documentos: ${str.doc} ${this.dictionary.msg_extensoes_aceitas}`
8589
9523
  });
8590
- this.$store.dispatch("setLinkImagem", this.imagePreview);
9524
+ return false;
8591
9525
  },
8592
9526
 
8593
- initAudioRecorder() {
8594
- navigator.mediaDevices.getUserMedia({
8595
- audio: true
8596
- }).then(stream => {
8597
- this.mediaRecorder = new MediaRecorder(stream);
8598
- const audioChunks = [];
8599
-
8600
- this.mediaRecorder.ondataavailable = eventData => {
8601
- audioChunks.push(eventData.data);
8602
- };
9527
+ filesHandler(files) {
9528
+ const fileType = this.returnFileType(files[0], true);
9529
+ let invalidFile = false;
8603
9530
 
8604
- this.mediaRecorder.onstop = () => {
8605
- const blob = new Blob(audioChunks, {
8606
- type: "audio/mpeg"
8607
- });
8608
- blob.lastModifiedDate = new Date();
8609
- blob.name = `im-audio-file-${parseInt(Math.random() * 5000)}`;
8610
- const reader = new FileReader();
8611
- reader.readAsDataURL(blob);
9531
+ try {
9532
+ files.forEach(file => {
9533
+ const singleFileType = this.returnFileType(file, true);
8612
9534
 
8613
- reader.onloadend = () => {
8614
- this.audioFile = new File([blob], `${blob.name}.mpeg`, {
8615
- type: blob.type
8616
- });
8617
- this.audioSource = reader.result;
8618
- };
9535
+ if (!singleFileType) {
9536
+ invalidFile = true;
9537
+ file.invalid = true;
9538
+ }
8619
9539
 
8620
- stream.getTracks().forEach(track => track.stop());
8621
- };
9540
+ file.imgOrDoc = singleFileType ? singleFileType : "";
9541
+ });
9542
+ } catch (e) {
9543
+ console.error("Erro ao tentar percorrer os arquivos");
9544
+ console.error(e);
9545
+ invalidFile = true;
9546
+ }
8622
9547
 
8623
- this.toggleAudioRecorder();
8624
- }, error => {
9548
+ if (!invalidFile) {
9549
+ this.$refs[`${this.textId}-file`].fileUpload(files, fileType, true);
9550
+ } else {
8625
9551
  this.$toasted.global.defaultError({
8626
- msg: this.dictionary.msg_permitir_audio
9552
+ msg: this.dictionary.msg_formato_invalido
8627
9553
  });
8628
- console.error("error audio recorder: ", error);
8629
- });
8630
- },
8631
-
8632
- toggleAudioRecorder() {
8633
- if (!this.mediaRecorder.state) return this.initAudioRecorder();
8634
- this.isRecording = !this.isRecording;
8635
- if (this.isRecording) return this.mediaRecorder.start();
8636
- return this.mediaRecorder.stop();
9554
+ const str = {
9555
+ img: this.fileSettings.imagesExtensions.split("|").join(", "),
9556
+ doc: this.fileSettings.docsExtensions.split("|").join(", ")
9557
+ };
9558
+ this.$toasted.global.showValidFormats({
9559
+ msg: `Imagens: ${str.img} - Documentos: ${str.doc} ${this.dictionary.msg_extensoes_aceitas}`
9560
+ });
9561
+ }
8637
9562
  },
8638
9563
 
8639
- deleteAudio() {
8640
- this.mediaRecorder = {};
8641
- this.audioFile = "";
9564
+ dropFile(e) {
9565
+ try {
9566
+ e.stopPropagation();
9567
+ e.preventDefault();
9568
+ const files = e.dataTransfer.files.length ? e.dataTransfer.files : "";
9569
+ this.filesHandler(files);
9570
+ } catch (e) {
9571
+ console.error("Erro drop file");
9572
+ console.error(e);
9573
+ }
8642
9574
  },
8643
9575
 
8644
9576
  pasteImage(e) {
8645
- if (e.clipboardData.files.length && !this.buttons.hasFiles) {
8646
- e.preventDefault();
8647
- return;
8648
- } else if (e.clipboardData.files.length && this.buttons.hasFiles) {
8649
- const file = e.clipboardData.files;
8650
- let fileType = "";
8651
- const imgRegex = new RegExp("(" + this.fileSettings.imagesExtensions + ")", "i");
8652
- if (imgRegex.test(file[0].name)) fileType = "img";
8653
- const docRegex = new RegExp("(" + this.fileSettings.docsExtensions + ")", "i");
8654
- if (docRegex.test(file[0].name)) fileType = "doc";
8655
-
8656
- if (fileType) {
8657
- this.fileUpload(file, fileType, true);
8658
- } else {
8659
- this.$toasted.global.formatoInvalido();
8660
- this.$toasted.global.formatosValidos();
9577
+ try {
9578
+ if (e.clipboardData.files.length && !this.buttons.hasFiles) {
9579
+ e.preventDefault();
9580
+ return;
9581
+ } else if (e.clipboardData.files.length && this.buttons.hasFiles) {
9582
+ const files = e.clipboardData.files;
9583
+ this.filesHandler(files);
8661
9584
  }
9585
+ } catch (e) {
9586
+ console.error("Nao foi possivel colar a/o imagem/documento");
9587
+ console.error(e);
8662
9588
  }
8663
9589
  }
8664
9590
 
8665
9591
  },
8666
9592
 
8667
- destroyed() {
8668
- this.$root.$off("drop-file");
8669
- this.$root.$off("toggle-msg-formatada");
8670
- this.$root.$off("textarea-focus");
8671
- this.$root.$off("clear-footer-message");
8672
- this.$root.$off("resize-footer-template");
9593
+ destroyed() {// this.$root.$off("drop-file")
9594
+ // this.$root.$off("toggle-msg-formatada")
9595
+ // this.$root.$off("textarea-focus")
9596
+ // this.$root.$off("clear-footer-message")
9597
+ // this.$root.$off("resize-footer-template")
8673
9598
  }
8674
9599
 
8675
9600
  };
@@ -8692,12 +9617,30 @@ var __vue_render__$2 = function () {
8692
9617
  value: _vm.away,
8693
9618
  expression: "away"
8694
9619
  }],
8695
- staticClass: "text-footer-container"
9620
+ staticClass: "text-footer-container",
9621
+ on: {
9622
+ "drop": function ($event) {
9623
+ $event.stopPropagation();
9624
+ return _vm.dropFile.apply(null, arguments);
9625
+ },
9626
+ "dragenter": function ($event) {
9627
+ $event.preventDefault();
9628
+ },
9629
+ "dragover": function ($event) {
9630
+ $event.preventDefault();
9631
+ }
9632
+ }
8696
9633
  }, [_c('div', {
8697
9634
  staticClass: "text-footer",
8698
9635
  class: _vm.cssStyle.width ? _vm.cssStyle.width : '',
8699
9636
  style: "background-color: " + _vm.cssStyle.backgroundColor
8700
- }, [_vm.buttons.hasEmojis && !_vm.audioFile ? _c('emojis-text-footer', {
9637
+ }, [_c('EmojisTextFooter', {
9638
+ directives: [{
9639
+ name: "show",
9640
+ rawName: "v-show",
9641
+ value: _vm.buttons.hasEmojis && !_vm.audioFile,
9642
+ expression: "buttons.hasEmojis && !audioFile"
9643
+ }],
8701
9644
  ref: "" + this.textId,
8702
9645
  attrs: {
8703
9646
  "emojiId": "" + this.textId,
@@ -8707,11 +9650,11 @@ var __vue_render__$2 = function () {
8707
9650
  on: {
8708
9651
  "insert-emoji": _vm.insertEmoji
8709
9652
  }
8710
- }) : _vm._e(), _vm._v(" "), _c('transition', {
9653
+ }), _vm._v(" "), _c('transition', {
8711
9654
  attrs: {
8712
9655
  "name": "fade"
8713
9656
  }
8714
- }, [_vm.isSending ? _c('req-loader') : _vm._e()], 1), _vm._v(" "), !_vm.audioFile ? _c('textarea', {
9657
+ }, [_vm.isSending ? _c('Loader') : _vm._e()], 1), _vm._v(" "), !_vm.audioFile ? _c('textarea', {
8715
9658
  directives: [{
8716
9659
  name: "model",
8717
9660
  rawName: "v-model",
@@ -8781,15 +9724,15 @@ var __vue_render__$2 = function () {
8781
9724
  attrs: {
8782
9725
  "icon": ['fas', 'times']
8783
9726
  }
8784
- })], 1)]), _vm._v(" "), _vm.textareaSettings.maxCharacters ? _c('span', {
8785
- staticClass: "max-characters no-width",
9727
+ })], 1)]), _vm._v(" "), _c('RemainingCharacters', {
8786
9728
  class: {
8787
9729
  'd-none': _vm.audioFile
8788
9730
  },
8789
- domProps: {
8790
- "textContent": _vm._s("(" + this.remainingCharacters + ")")
9731
+ attrs: {
9732
+ "message": _vm.message,
9733
+ "maxCharacters": _vm.textareaSettings.maxCharacters
8791
9734
  }
8792
- }) : _vm._e(), _vm._v(" "), _vm.buttons.hasSendButton ? _c('div', {
9735
+ }), _vm._v(" "), _vm.buttons.hasSendButton ? _c('div', {
8793
9736
  staticClass: "text-footer-actions"
8794
9737
  }, [_c('span', {
8795
9738
  staticClass: "text-footer-actions--btn",
@@ -8808,147 +9751,38 @@ var __vue_render__$2 = function () {
8808
9751
  class: {
8809
9752
  'outside-buttons': _vm.cssStyle.outsideButtons && !_vm.audioFile
8810
9753
  }
8811
- }, [_vm.buttons.hasAudio && !_vm.audioFile ? _c('span', {
8812
- staticClass: "text-footer-actions--btn",
8813
- class: {
8814
- 'audio-activated': _vm.isRecording
8815
- },
8816
- on: {
8817
- "click": _vm.toggleAudioRecorder
8818
- }
8819
- }, [_c('fa-icon', {
8820
- attrs: {
8821
- "icon": ['fas', 'microphone']
8822
- }
8823
- })], 1) : _vm._e(), _vm._v(" "), _vm.buttons.hasFiles && !_vm.audioFile ? _c('span', {
8824
- staticClass: "text-footer-actions--btn",
8825
- class: {
8826
- 'files-activated': _vm.openFiles
8827
- },
8828
- attrs: {
8829
- "title": _vm.dictionary.title_selecionar_anexo
8830
- },
8831
- on: {
8832
- "click": _vm.toggleFiles
8833
- }
8834
- }, [_c('fa-icon', {
8835
- attrs: {
8836
- "icon": ['fas', 'paperclip']
8837
- }
8838
- })], 1) : _vm._e()]) : _vm._e()], 1), _vm._v(" "), _c('transition', {
8839
- attrs: {
8840
- "name": "show"
8841
- }
8842
- }, [_vm.buttons.hasFiles && _vm.openFiles ? _c('div', {
8843
- staticClass: "text-footer-files-container",
8844
- class: {
8845
- 'horizontal': _vm.cssStyle.outsideButtons
8846
- }
8847
- }, [_c('div', {
8848
- staticClass: "files-btn images",
8849
- class: {
8850
- 'margin-bottom': _vm.cssStyle.outsideButtons
8851
- },
8852
- attrs: {
8853
- "title": _vm.dictionary.title_anexo_img
8854
- },
8855
- on: {
8856
- "click": _vm.selectImage
8857
- }
8858
- }, [_c('fa-icon', {
8859
- attrs: {
8860
- "icon": ['fas', 'image']
8861
- }
8862
- })], 1), _vm._v(" "), _c('div', {
8863
- staticClass: "files-btn docs",
8864
- attrs: {
8865
- "title": _vm.dictionary.title_anexo_doc
8866
- },
8867
- on: {
8868
- "click": _vm.selectDoc
8869
- }
8870
- }, [_c('fa-icon', {
8871
- attrs: {
8872
- "icon": ['fas', 'file-alt']
8873
- }
8874
- })], 1), _vm._v(" "), _c('div', {
8875
- staticClass: "files-pointers d-none"
8876
- }, [_c('input', {
8877
- attrs: {
8878
- "type": "file",
8879
- "id": "file-" + _vm.textId,
8880
- "accept": "image/*"
8881
- },
8882
- on: {
8883
- "change": function ($event) {
8884
- return _vm.fileUpload($event, 'img');
8885
- }
8886
- }
8887
- }), _vm._v(" "), _c('input', {
8888
- attrs: {
8889
- "type": "file",
8890
- "id": "doc-" + _vm.textId,
8891
- "accept": "application/*"
8892
- },
8893
- on: {
8894
- "change": function ($event) {
8895
- return _vm.fileUpload($event, 'doc');
8896
- }
8897
- }
8898
- })])]) : _vm._e()]), _vm._v(" "), _c('transition', {
8899
- attrs: {
8900
- "name": "fade"
8901
- }
8902
- }, [_vm.showFilePreview ? _c('div', {
8903
- staticClass: "text-footer-preview-container",
8904
- class: {
8905
- 'isDoc': _vm.isDoc && !_vm.fileFormatError,
8906
- 'isImg': !_vm.isDoc && !_vm.fileFormatError,
8907
- 'isError': _vm.fileFormatError
8908
- }
8909
- }, [_c('span', {
8910
- staticClass: "text-footer-exclude-file",
9754
+ }, [_c('BtnMic', {
9755
+ directives: [{
9756
+ name: "show",
9757
+ rawName: "v-show",
9758
+ value: _vm.buttons.hasAudio && !_vm.audioFile,
9759
+ expression: "buttons.hasAudio && !audioFile"
9760
+ }],
9761
+ ref: _vm.textId + "-mic",
8911
9762
  attrs: {
8912
- "title": _vm.dictionary.msg_cancelar_anexo
9763
+ "dictionary": _vm.dictionary
8913
9764
  },
8914
9765
  on: {
8915
- "click": _vm.deleteFile
8916
- }
8917
- }, [_c('fa-icon', {
8918
- attrs: {
8919
- "icon": ['fas', 'times-circle']
9766
+ "set-audio": _vm.setAudio
8920
9767
  }
8921
- })], 1), _vm._v(" "), _vm.file.name ? _c('h3', {
8922
- staticClass: "text-footer-preview-title"
8923
- }, [_vm.isDoc ? _c('fa-icon', {
8924
- attrs: {
8925
- "icon": ['fas', 'file-alt']
8926
- }
8927
- }) : _c('fa-icon', {
8928
- attrs: {
8929
- "icon": ['fas', 'image']
8930
- }
8931
- }), _vm._v("\n " + _vm._s(_vm.file.name) + "\n ")], 1) : _vm._e(), _vm._v(" "), _vm.fileFormatError ? _c('div', {
8932
- staticClass: "text-footer-invalid-format"
8933
- }, [_c('h3', {
8934
- domProps: {
8935
- "textContent": _vm._s(_vm.dictionary.titulo_msg_formato_invalido)
8936
- }
8937
- }), _vm._v(" "), _c('h4', {
8938
- domProps: {
8939
- "textContent": _vm._s(_vm.validFileFormats)
8940
- }
8941
- })]) : _vm._e(), _vm._v(" "), _vm.imagePreview ? _c('div', {
8942
- staticClass: "text-footer-image-preview"
8943
- }, [_c('img', {
9768
+ }), _vm._v(" "), _c('BtnFiles', {
9769
+ directives: [{
9770
+ name: "show",
9771
+ rawName: "v-show",
9772
+ value: _vm.buttons.hasFiles && !_vm.audioFile,
9773
+ expression: "buttons.hasFiles && !audioFile"
9774
+ }],
9775
+ ref: _vm.textId + "-file",
8944
9776
  attrs: {
8945
- "src": _vm.imagePreview,
8946
- "alt": _vm.dictionary.alt_previa_img
9777
+ "textId": _vm.textId,
9778
+ "dictionary": _vm.dictionary,
9779
+ "fileSettings": _vm.fileSettings,
9780
+ "cssStyle": _vm.cssStyle
8947
9781
  },
8948
9782
  on: {
8949
- "click": _vm.openImage
9783
+ "set-file-vars": _vm.setFileVars
8950
9784
  }
8951
- })]) : _vm._e()]) : _vm._e()])], 1) : _vm._e();
9785
+ })], 1) : _vm._e()], 1)]) : _vm._e();
8952
9786
  };
8953
9787
 
8954
9788
  var __vue_staticRenderFns__$2 = [];
@@ -8956,8 +9790,8 @@ var __vue_staticRenderFns__$2 = [];
8956
9790
 
8957
9791
  const __vue_inject_styles__$2 = function (inject) {
8958
9792
  if (!inject) return;
8959
- inject("data-v-048a4d41_0", {
8960
- 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: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{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}",
9793
+ inject("data-v-e42cf7de_0", {
9794
+ 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:48px;box-shadow:0 4px 5px -2px rgba(0,0,0,.25);position:relative;display:flex;justify-content:center;align-items:center;border:1px solid #ccc;padding:5px 2px 5px 5px;border-radius:5px}.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:2.5px;border-top-right-radius:2.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}",
8961
9795
  map: undefined,
8962
9796
  media: undefined
8963
9797
  });
@@ -9029,12 +9863,6 @@ var script$1 = {
9029
9863
  elem.classList.toggle("active");
9030
9864
  }
9031
9865
  }
9032
- },
9033
-
9034
- isValid(textValue) {
9035
- const regex = /^[ ?????�����??��?���?��??????�������?���?��???��??\w?-�\r\n()[\]{}.,:;@??�????!&?�`�=%^*+\-$|/]+$/;
9036
- const value = textValue ? textValue.trim("") : "";
9037
- return regex.test(value);
9038
9866
  }
9039
9867
 
9040
9868
  }
@@ -9424,8 +10252,6 @@ const __vue_component__ = /*#__PURE__*/normalizeComponent({
9424
10252
 
9425
10253
  var __vue_component__$1 = __vue_component__;
9426
10254
 
9427
- // import "/css/style.css";
9428
-
9429
10255
  var components = /*#__PURE__*/Object.freeze({
9430
10256
  __proto__: null,
9431
10257
  TemplateGenerator: __vue_component__$1,