(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
"use strict";

// Register the vue-editor globally if not already done
Vue.component('vue-editor', Vue2Editor["default"].VueEditor);

Vue.component('wpcfto_editor', {
    mixins: [window.validationMixin],
    props: ['fields', 'field_label', 'field_name', 'field_id', 'field_value', 'required'],
    data: function() {
      return {
        localValue: this.field_value || ''
      };
    },
    watch: {
      field_value(newVal) {
        this.localValue = newVal || '';
      },
      localValue(newVal) {
        this.$emit('wpcfto-get-value', newVal);
      }
    },
    template: `
      <div class="wpcfto_generic_field wpcfto_generic_field_editor">
        <wpcfto_fields_aside_before 
          :fields="fields" 
          :field_label="field_label"
          :required="fields.required === true">
        </wpcfto_fields_aside_before>
        <div class="wpcfto-field-content">
          <div class="wpcfto-editor">
            <vue-editor :id="'editor' + field_name" v-model="localValue"></vue-editor>
            <!-- Fallback textarea for form submission, not for validation -->
            <textarea
              :name="field_name"
              :placeholder="field_label"
              :id="field_id"
              v-model="localValue"
              style="display:none;"
              tabindex="-1"
              autocomplete="off"
            ></textarea>
          </div>
        </div>
        <wpcfto_fields_aside_after :fields="fields"></wpcfto_fields_aside_after>
      </div>
    `
  });  

//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZha2VfM2Q5NTE2ZGEuanMiXSwibmFtZXMiOlsiVnVlIiwiY29tcG9uZW50IiwiVnVlMkVkaXRvciIsIlZ1ZUVkaXRvciIsInByb3BzIiwiZGF0YSIsInZhbHVlIiwidGVtcGxhdGUiLCJtb3VudGVkIiwiZmllbGRfdmFsdWUiLCIkc2V0Iiwib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