text: (function(e){function t(t){for(var i,r,o=t[0],s=t[1],c=t[2],d=0,p=[];d<o.length;d++)r=o[d],Object.prototype.hasOwnProperty.call(a,r)&&a[r]&&p.push(a[r][0]),a[r]=0;for(i in s)Object.prototype.hasOwnProperty.call(s,i)&&(e[i]=s[i]);u&&u(t);while(p.length)p.shift()();return l.push.apply(l,c||[]),n()}function n(){for(var e,t=0;t<l.length;t++){for(var n=l[t],i=!0,o=1;o<n.length;o++){var s=n[o];0!==a[s]&&(i=!1)}i&&(l.splice(t--,1),e=r(r.s=n[0]))}return e}var i={},a={app:0},l=[];function r(t){if(i[t])return i[t].exports;var n=i[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=e,r.c=i,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/";var o=window["webpackJsonp"]=window["webpackJsonp"]||[],s=o.push.bind(o);o.push=t,o=o.slice();for(var c=0;c<o.length;c++)t(o[c]);var u=s;l.push([0,"chunk-vendors"]),n()})({0:function(e,t,n){e.exports=n("56d7")},"0373":function(e,t,n){},"1bed":function(e,t,n){"use strict";var i=n("5f16"),a=n.n(i);a.a},"2d42":function(e,t,n){"use strict";var i=n("0373"),a=n.n(i);a.a},"439a":function(e,t,n){e.exports=n.p+"img/paperclip.7725462f.svg"},"49f8":function(e,t,n){var i={"./en.json":"edd4","./nl.json":"a625"};function a(e){var t=l(e);return n(t)}function l(e){if(!n.o(i,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return i[e]}a.keys=function(){return Object.keys(i)},a.resolve=l,e.exports=a,a.id="49f8"},"56d7":function(e,t,n){"use strict";n.r(t);var i=n("2b0e"),a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("q-layout",{attrs:{view:"lHh Lpr lFf"}},[n("q-header",{attrs:{elevated:""}},[n("q-toolbar",[n("q-toolbar-title",[e._v(" QuestionaireBuilder ")]),n("div",[e._v("quasar v"+e._s(e.$q.version))])],1)],1),n("q-page-container",[n("q-page",[n("q-btn",{attrs:{icon:"star"},on:{click:function(t){e.PreviewDialog=!0}}},[e._v("Preview")]),n("q-form-builder",{model:{value:e.fields,callback:function(t){e.fields=t},expression:"fields"}}),n("q-separator"),n("q-dialog",{attrs:{maximized:""},model:{value:e.PreviewDialog,callback:function(t){e.PreviewDialog=t},expression:"PreviewDialog"}},[n("q-card",{staticClass:"bg-white"},[n("q-btn",{directives:[{name:"close-popup",rawName:"v-close-popup"}],attrs:{icon:"cancel"}}),n("div",{staticClass:"q-pa-md q-form-container"},[n("h4",[e._v(e._s(e.$t("surveys.preview")))]),e._l(e.fields,(function(t,i){return n("div",{key:i},[n(e.getElement(t),{ref:t.cid,refInFor:!0,tag:"component",attrs:{label:t.label,required:t.required,field_options:t.field_options,id:t.cid,cid:t.cid,debounce:"500"},on:{input:e.onInput},model:{value:e.fieldData[t.cid],callback:function(n){e.$set(e.fieldData,t.cid,n)},expression:"fieldData[field.cid]"}})],1)}))],2)],1)],1)],1)],1)],1)},l=[],r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("q-layout",{staticStyle:{width:"100%",height:"100%","min-height":"calc(100vh - 50px)"},attrs:{container:"",view:"hHh Lpr fff"}},[n("q-drawer",{attrs:{"show-if-above":"",bordered:"",side:e.navPosition},model:{value:e.drawer,callback:function(t){e.drawer=t},expression:"drawer"}},[n("q-tabs",{attrs:{align:"justify",dense:"","narrow-indicator":""},model:{value:e.tab,callback:function(t){e.tab=t},expression:"tab"}},[n("q-tab",{attrs:{name:"add",label:e.$t("surveys.add_field")}}),n("q-tab",{attrs:{name:"edit",label:e.$t("surveys.edit_field"),disable:!e.currentField}})],1),n("q-tab-panels",{attrs:{animated:""},model:{value:e.tab,callback:function(t){e.tab=t},expression:"tab"}},[n("q-tab-panel",{attrs:{name:"add"}},[n("draggable",{attrs:{list:e.sourceFields,clone:e.createField,options:e.sourceOptions,sort:!1}},e._l(e.sourceFields,(function(t,i){return n("div",{key:i,staticClass:"source-field"},[""!==t.type?n("q-btn",{staticClass:"btn-fixed-width",attrs:{type:"button",size:"12px",dense:"",align:"left",icon:t.icon,label:t.label},on:{click:function(n){return e.onAddFieldClick(t.type)}}}):e._e()],1)})),0)],1),n("q-tab-panel",{attrs:{name:"edit"}},[n("editable-element-options",{attrs:{"type-info":e.sourceFields},model:{value:e.currentField,callback:function(t){e.currentField=t},expression:"currentField"}})],1)],1)],1),n("q-page-container",[n("q-page",{staticClass:"q-form-builder-page"},[n("draggable",{class:{"q-form-builder-elements-container":!0,empty:0==e.fields.length},attrs:{options:e.destinationOptions},on:{change:e.onChange},model:{value:e.fields,callback:function(t){e.fields=t},expression:"fields"}},e._l(e.fields,(function(t,i){return n("div",{key:i,staticClass:"editable-element-container"},[n("editable-element",{ref:e.fields[i].cid,refInFor:!0,class:{selected:e.isSelectedForEdit(i)},on:{click:e.selectForEdit},model:{value:e.fields[i],callback:function(t){e.$set(e.fields,i,t)},expression:"fields[idx]"}}),n("div",{staticClass:"editable-element-action-buttons"},[e.isSelectedForEdit(i)?n("q-btn",{staticClass:"editable-element-button",attrs:{color:"red",icon:"delete",round:"",size:"xs"},on:{click:function(t){return e.deleteField(i)}}},[n("q-tooltip",[e._v(e._s(e.$t("surveys.delete_this_field")))])],1):e._e(),e.isSelectedForEdit(i)?n("q-btn",{staticClass:"editable-element-button",attrs:{color:"secondary",icon:"file_copy",round:"",size:"xs"},on:{click:function(t){return e.duplicateField(i)}}},[n("q-tooltip",[e._v(e._s(e.$t("surveys.duplicate_this_field")))])],1):e._e()],1)],1)})),0)],1)],1)],1)},o=[],s=n("fe09"),c=n("b76a"),u=n.n(c),d=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"q-editable-element"},[n("div",{staticClass:"overlay",on:{click:e.onClick}}),n(e.element,{tag:"component",attrs:{label:e.value.label,required:e.value.required,field_options:e.value.field_options,id:e.value.id,cid:e.value.cid}})],1)},p=[],m=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"row q-col-gutter-sm q-form-text q-form-builder-element"},[n("div",{staticClass:"col"},[n("q-input",{ref:e.id,attrs:{label:e.getLabel,debounce:e.debounce,rules:e.getRules()},model:{value:e.innerValue,callback:function(t){e.innerValue=t},expression:"innerValue"}}),e.hint?n("p",{staticClass:"text-caption",domProps:{innerHTML:e._s(e.hint)}}):e._e()],1)])},f=[],h=n("a925");function b(){var e=n("49f8"),t={};return e.keys().forEach((function(n){var i=n.match(/([A-Za-z0-9-_]+)\./i);if(i&&i.length>1){var a=i[1];t[a]=e(n)}})),t}i["a"].use(h["a"]);var v=new h["a"]({locale:"nl",fallbackLocale:"en",messages:b()}),_=new h["a"]({locale:"nl",fallbackLocale:"en",messages:b()});function y(e){switch(e){case"checkboxes":case"radio":return{options:[],include_other_option:!1,description:""};case"dropdown":return{options:[],description:""};default:return{description:""}}}function g(e){switch(e){case"section_break":return"";default:return v.t("surveys.untitled")}}function q(e){return e.replace(/(?:\r\n|\r|\n)/g,"<br>")}var x={props:{value:{},label:{type:String},required:{type:Boolean,default:!0},field_options:{type:Object,required:!1,default:function(){return{description:!1}}},cid:{},id:{},debounce:{default:500}},data:function(){return{innerValue:this.value,hasError:!1,errors:[]}},watch:{value:{handler:function(e){this.innerValue=e},deep:!0},innerValue:{handler:function(e){this.$emit("input",e,this.id)},deep:!0}},computed:{getLabel:function(){return this.required?"".concat(this.label," *"):this.label},hint:function(){return this.field_options&&this.field_options.description?q(this.field_options.description):""},rules:function(){return[]}},methods:{getRules:function(e,t){var n=function(e){return!!e||"This field is required."};return e?Object.prototype.hasOwnProperty.call(this.rules,e)?t?this.rules[e].concat(n):this.rules[e]:t?[n]:[]:this.required?this.rules.concat(n):this.rules},validate:function(){for(var e in this.errors=[],this.$refs)"function"===typeof this.$refs[e].validate&&(this.$refs[e].validate(),this.$refs[e].hasError&&this.errors.push({id:this.$refs[e].innerErrorMessage}));this.hasError=this.errors.length>0}}},k={name:"TextElement",extends:x,components:{QInput:s["h"]}},w=k,C=n("2877"),E=Object(C["a"])(w,m,f,!1,null,null,null),V=E.exports,I=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"row q-col-gutter-sm q-form-paragraph q-form-builder-element"},[n("q-input",{ref:e.id,staticStyle:{width:"100%"},attrs:{label:e.getLabel,filled:"",type:"textarea",debounce:e.debounce,rules:e.getRules()},model:{value:e.innerValue,callback:function(t){e.innerValue=t},expression:"innerValue"}}),e.hint?n("p",{staticClass:"text-caption",domProps:{innerHTML:e._s(e.hint)}}):e._e()],1)},S=[],O={name:"ParagraphElement",extends:x,components:{QInput:s["h"]}},$=O,P=Object(C["a"])($,I,S,!1,null,null,null),Q=P.exports,A=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"q-form-checkbox q-form-builder-element"},[n("div",{staticClass:"row"},[n("label",{class:e.hasError?"text-negative":""},[e._v(e._s(e.getLabel))])]),n("div",{staticClass:"row"},[n("q-list",{attrs:{dense:""}},[n("q-item",[n("q-option-group",{ref:e.id,attrs:{type:"checkbox",options:e.allOptions,"keep-color":"",color:e.hasError?"red":""},on:{input:e.onUpdate},model:{value:e.selectedValues,callback:function(t){e.selectedValues=t},expression:"selectedValues"}})],1),e.includeOther?n("q-item",{attrs:{dense:""}},[n("q-item-section",{attrs:{avatar:""}},[n("q-checkbox",{ref:"checkbox-other-"+e.id,attrs:{label:e.$t("surveys.other"),"keep-color":"",color:e.hasError?"red":""},on:{input:e.onUpdate},model:{value:e.selectedOther,callback:function(t){e.selectedOther=t},expression:"selectedOther"}})],1),n("q-item-section",{attrs:{left:""}},[n("q-input",{ref:"other-"+e.id,attrs:{dense:"",disable:!e.selectedOther},on:{input:e.onUpdate},model:{value:e.selectedOtherValue,callback:function(t){e.selectedOtherValue=t},expression:"selectedOtherValue"}})],1)],1):e._e()],1)],1),n("div",{staticClass:"row"},[e._l(e.errors,(function(t,i){return n("p",{key:i,staticClass:"text-negative text-caption"},[e._v(e._s(t))])})),e.hint?n("p",{staticClass:"text-caption",domProps:{innerHTML:e._s(e.hint)}}):e._e()],2)])},L=[];function j(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=T(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var i=0,a=function(){};return{s:a,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,r=!0,o=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return r=e.done,e},e:function(e){o=!0,l=e},f:function(){try{r||null==n.return||n.return()}finally{if(o)throw l}}}}function T(e,t){if(e){if("string"===typeof e)return F(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?F(e,t):void 0}}function F(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var M={name:"CheckboxesElement",extends:x,components:{QCheckbox:s["b"],QOptionGroup:s["n"],QInput:s["h"],QList:s["m"],QItem:s["i"],QItemSection:s["k"]},props:{field_options:{type:Object,required:!1,default:function(){return{description:!1,options:[]}}}},data:function(){return{hasError:!1,errors:[],selectedValues:this.defaultSelectedValues(),selectedOther:this.defaultSelectedOther().checked,selectedOtherValue:this.defaultSelectedOther().label}},computed:{allOptions:function(){return this.field_options.options.map((function(e){return{label:e.label,value:e.label}}))},includeOther:function(){return!!this.field_options.include_other_option}},methods:{defaultSelectedValues:function(){var e=[];if(this.value&&Array.isArray(this.value))e=this.value;else{var t,n=j(this.getOptions());try{for(n.s();!(t=n.n()).done;){var i=t.value;i.checked&&e.push(i.label)}}catch(a){n.e(a)}finally{n.f()}}return e},defaultSelectedOther:function(){if(this.value&&Array.isArray(this.value)){var e,t=this.value.slice(-1)[0],n=j(this.getOptions());try{for(n.s();!(e=n.n()).done;){var i=e.value;if(i.label===t)return{checked:!1,label:""}}}catch(a){n.e(a)}finally{n.f()}return{checked:!0,label:t}}return{checked:!1,label:""}},getOptions:function(){return this.field_options&&this.field_options.options?this.field_options.options:{}},setInnerValue:function(){var e=[];e=this.selectedValues.slice(0),this.selectedOther&&e.push(this.selectedOtherValue),this.innerValue=e},onUpdate:function(){this.setInnerValue(),this.validate()},validate:function(){this.hasError=!1,this.errors=[],this.required&&!this.innerValue.length&&this.allOptions.length&&(this.hasError=!0,this.allOptions.length>1?this.errors.push("Please select at least one option."):this.errors.push("Please select this required option."))}},watch:{field_options:{handler:function(){this.selectedValues=this.defaultSelectedValues()},deep:!0}},mounted:function(){this.setInnerValue()}},N=M,B=Object(C["a"])(N,A,L,!1,null,null,null),R=B.exports,U=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"q-form-radio q-form-builder-element"},[n("div",{staticClass:"row"},[n("label",{class:e.hasError?"text-negative":""},[e._v(e._s(e.getLabel))])]),n("div",{staticClass:"row"},[n("q-list",{attrs:{dense:""}},[n("q-item",[n("q-option-group",{ref:e.id,attrs:{type:"radio",options:e.allOptions,"keep-color":"",color:e.hasError?"red":""},on:{input:e.validate},model:{value:e.innerValue,callback:function(t){e.innerValue=t},expression:"innerValue"}})],1),e.includeOther?n("q-item",{attrs:{dense:""}},[n("q-item-section",{attrs:{avatar:""}},[n("q-radio",{ref:"radio-other-"+e.id,attrs:{label:"Other:",val:e.otherOptionVal,"keep-color":"",color:e.hasError?"red":""},on:{input:e.validate},model:{value:e.innerValue,callback:function(t){e.innerValue=t},expression:"innerValue"}})],1),n("q-item-section",{attrs:{left:""}},[n("q-input",{ref:"other-"+e.id,attrs:{dense:"",disable:!e.otherSelected},on:{input:e.otherValueUpdated},model:{value:e.otherOptionVal,callback:function(t){e.otherOptionVal=t},expression:"otherOptionVal"}})],1)],1):e._e()],1)],1),n("div",{staticClass:"row"},[e._l(e.errors,(function(t,i){return n("p",{key:i,staticClass:"text-negative text-caption"},[e._v(e._s(t))])})),e.hint?n("p",{staticClass:"text-caption",domProps:{innerHTML:e._s(e.hint)}}):e._e()],2)])},z=[],D={name:"RadioElement",extends:x,components:{QRadio:s["r"],QOptionGroup:s["n"],QInput:s["h"],QList:s["m"],QItem:s["i"],QItemSection:s["k"]},props:{value:{default:function(){}},field_options:{type:Object,required:!1,default:function(){return{description:!1,options:[]}}}},data:function(){return{otherOptionVal:null}},computed:{allOptions:function(){return this.field_options&&this.field_options.options?this.field_options.options.map((function(e){return{label:e.label,value:e.label}})):[]},includeOther:function(){return!!this.field_options.include_other_option},otherSelected:function(){var e=this.field_options.options.map((function(e){return e.label}));return e.indexOf(this.innerValue)<0}},methods:{otherValueUpdated:function(e){this.innerValue=e,this.validate()},validate:function(){this.hasError=!1,this.errors=[],this.required&&!this.innerValue&&(this.hasError=!0,this.errors.push("Please select an option."))}}},H=D,G=(n("6de7"),Object(C["a"])(H,U,z,!1,null,null,null)),J=G.exports,K=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"row q-col-gutter-sm q-form-date q-form-builder-element"},[n("div",{staticClass:"col-12 col-md-6"},[n("q-input",{ref:e.id,attrs:{mask:"date",label:e.getLabel,debounce:e.debounce,rules:e.getRules()},scopedSlots:e._u([{key:"append",fn:function(){return[n("q-icon",{staticClass:"cursor-pointer",attrs:{name:"event"}},[n("q-popup-proxy",[n("q-date",{model:{value:e.innerValue,callback:function(t){e.innerValue=t},expression:"innerValue"}})],1)],1)]},proxy:!0}]),model:{value:e.innerValue,callback:function(t){e.innerValue=t},expression:"innerValue"}}),e.hint?n("p",{staticClass:"text-caption",domProps:{innerHTML:e._s(e.hint)}}):e._e()],1)])},Y=[],Z={name:"DateElement",extends:x,components:{QInput:s["h"],QIcon:s["f"],QPopupProxy:s["q"],QDate:s["d"]},computed:{rules:function(){return["date"]}}},W=Z,X=Object(C["a"])(W,K,Y,!1,null,null,null),ee=X.exports,te=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"row q-col-gutter-sm q-form-time q-form-builder-element"},[n("div",{staticClass:"col-12 col-md-6"},[n("q-input",{ref:e.id,attrs:{mask:"time",label:e.getLabel,debounce:e.debounce,rules:e.getRules()},scopedSlots:e._u([{key:"append",fn:function(){return[n("q-icon",{staticClass:"cursor-pointer",attrs:{name:"access_time"}},[n("q-popup-proxy",[n("q-time",{model:{value:e.innerValue,callback:function(t){e.innerValue=t},expression:"innerValue"}})],1)],1)]},proxy:!0}]),model:{value:e.innerValue,callback:function(t){e.innerValue=t},expression:"innerValue"}}),e.hint?n("p",{staticClass:"text-caption",domProps:{innerHTML:e._s(e.hint)}}):e._e()],1)])},ne=[],ie={name:"TimeElement",extends:x,components:{QInput:s["h"],QIcon:s["f"],QPopupProxy:s["q"],QTime:s["z"]},computed:{rules:function(){return["time"]}}},ae=ie,le=Object(C["a"])(ae,te,ne,!1,null,null,null),re=le.exports,oe=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"row q-col-gutter-sm q-form-dropdown q-form-builder-element"},[n("div",{staticClass:"col-12 col-md-6 col-lg-3"},[n("q-select",{ref:e.id,attrs:{options:e.allOptions,label:e.getLabel,rules:e.getRules()},model:{value:e.innerValue,callback:function(t){e.innerValue=t},expression:"innerValue"}}),e.hint?n("p",{staticClass:"text-caption",domProps:{innerHTML:e._s(e.hint)}}):e._e()],1)])},se=[],ce={name:"DropdownElement",extends:x,components:{QSelect:s["t"]},computed:{allOptions:function(){return this.field_options.options.map((function(e){return{label:e.label,value:e.label}}))}}},ue=ce,de=Object(C["a"])(ue,oe,se,!1,null,null,null),pe=de.exports,me=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"row q-col-gutter-sm q-form-email q-form-builder-element"},[n("div",{staticClass:"col-12 col-md-6"},[n("q-input",{ref:e.id,attrs:{type:"email",label:e.getLabel,debounce:e.debounce,rules:e.getRules()},scopedSlots:e._u([{key:"append",fn:function(){return[n("q-icon",{attrs:{name:"email"}})]},proxy:!0}]),model:{value:e.innerValue,callback:function(t){e.innerValue=t},expression:"innerValue"}}),e.hint?n("p",{staticClass:"text-caption",domProps:{innerHTML:e._s(e.hint)}}):e._e()],1)])},fe=[],he={name:"EmailElement",extends:x,components:{QInput:s["h"],QIcon:s["f"]},computed:{rules:function(){return["email"]}}},be=he,ve=Object(C["a"])(be,me,fe,!1,null,null,null),_e=ve.exports,ye=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"q-form-name q-form-builder-element"},[e.getLabel?n("div",{staticClass:"row"},[n("div",{staticClass:"col-12"},[n("label",[e._v(e._s(e.getLabel))])])]):e._e(),n("div",{staticClass:"row q-col-gutter-sm"},[n("div",{staticClass:"col-12 col-md-2"},[n("q-select",{ref:e.id+"_title",attrs:{options:e.titleOptions,label:e.$t("surveys.title"),dense:"",rules:e.getRules("title")},model:{value:e.innerValue.title,callback:function(t){e.$set(e.innerValue,"title",t)},expression:"innerValue.title"}})],1),n("div",{staticClass:"col-12 col-md-4"},[n("q-input",{ref:e.id+"_first",attrs:{label:e.$t("surveys.first_name"),dense:"",debounce:e.debounce,rules:e.getRules("first",e.required)},model:{value:e.innerValue.first,callback:function(t){e.$set(e.innerValue,"first",t)},expression:"innerValue.first"}})],1),n("div",{staticClass:"col-12 col-md-2"},[n("q-input",{ref:e.id+"_middle",attrs:{label:e.$t("surveys.middle_name"),dense:"",debounce:e.debounce,rules:e.getRules("middle")},model:{value:e.innerValue.middle,callback:function(t){e.$set(e.innerValue,"middle",t)},expression:"innerValue.middle"}})],1),n("div",{staticClass:"col-12 col-md-4"},[n("q-input",{ref:e.id+"_last",attrs:{label:e.$t("surveys.last_name"),dense:"",debounce:e.debounce,rules:e.getRules("last",e.required)},model:{value:e.innerValue.last,callback:function(t){e.$set(e.innerValue,"last",t)},expression:"innerValue.last"}})],1)]),e.hint?n("div",{staticClass:"row"},[n("p",{staticClass:"col-12 text-caption",domProps:{innerHTML:e._s(e.hint)}})]):e._e()])},ge=[],qe={name:"NameElement",extends:x,components:{QInput:s["h"],QSelect:s["t"]},props:{value:{type:Object,default:function(){return{title:null,first:null,middle:null,last:null}}}},computed:{titleOptions:function(){return["Mr.","Mrs.","Ms.","Dr."]}}},xe=qe,ke=Object(C["a"])(xe,ye,ge,!1,null,null,null),we=ke.exports,Ce=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"q-form-simple-name q-form-builder-element"},[e.getLabel?n("div",{staticClass:"row"},[n("div",{staticClass:"col-12"},[n("label",[e._v(e._s(e.getLabel))])])]):e._e(),n("div",{staticClass:"row q-col-gutter-sm"},[n("div",{staticClass:"col-12 col-md-6"},[n("q-input",{ref:e.id+"_first",attrs:{dense:"",placeholder:e.$t("surveys.first_name"),debounce:e.debounce,rules:e.getRules("first",e.required)},model:{value:e.innerValue.first,callback:function(t){e.$set(e.innerValue,"first",t)},expression:"innerValue.first"}})],1),n("div",{staticClass:"col-12 col-md-6"},[n("q-input",{ref:e.id+"_last",attrs:{dense:"",placeholder:e.$t("surveys.last_name"),debounce:e.debounce,rules:e.getRules("last",e.required)},model:{value:e.innerValue.last,callback:function(t){e.$set(e.innerValue,"last",t)},expression:"innerValue.last"}})],1)]),e.hint?n("div",{staticClass:"row"},[n("div",{staticClass:"col-12 text-caption",domProps:{innerHTML:e._s(e.hint)}})]):e._e()])},Ee=[],Ve={name:"SimpleNameElement",extends:x,components:{QInput:s["h"]},props:{value:{type:Object,default:function(){return{first:null,last:null}}}}},Ie=Ve,Se=Object(C["a"])(Ie,Ce,Ee,!1,null,null,null),Oe=Se.exports,$e=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"q-form-address q-form-builder-element"},[e.getLabel?n("div",{staticClass:"row"},[n("div",{staticClass:"col-12"},[n("label",[e._v(e._s(e.getLabel))])])]):e._e(),n("div",{staticClass:"row q-col-gutter-sm"},[n("div",{staticClass:"col-12"},[n("q-input",{ref:e.id+"_street",attrs:{label:e.$t("surveys.street"),debounce:e.debounce,rules:e.getRules("street",e.required)},model:{value:e.innerValue.address,callback:function(t){e.$set(e.innerValue,"address",t)},expression:"innerValue.address"}})],1)]),n("div",{staticClass:"row q-col-gutter-sm"},[n("div",{staticClass:"col-12 col-md-6"},[n("q-input",{ref:e.id+"_city",attrs:{label:e.$t("surveys.city"),debounce:e.debounce,rules:e.getRules("city",e.required)},model:{value:e.innerValue.city,callback:function(t){e.$set(e.innerValue,"city",t)},expression:"innerValue.city"}})],1),n("div",{staticClass:"col-12 col-md-6"},[n("q-input",{ref:e.id+"_state",attrs:{label:e.$t("surveys.state_province_region"),debounce:e.debounce,rules:e.getRules("state",e.required)},model:{value:e.innerValue.state,callback:function(t){e.$set(e.innerValue,"state",t)},expression:"innerValue.state"}})],1)]),n("div",{staticClass:"row q-col-gutter-sm"},[n("div",{staticClass:"col-12 col-md-6"},[n("q-input",{ref:e.id+"_zip",attrs:{label:e.$t("surveys.zip_postalcode"),rules:e.getRules("zip",e.required)},model:{value:e.innerValue.zip,callback:function(t){e.$set(e.innerValue,"zip",t)},expression:"innerValue.zip"}})],1),n("div",{staticClass:"col-12 col-md-6"},[n("q-select",{ref:e.id+"_country",attrs:{options:e.countries,label:e.$t("surveys.country"),debounce:e.debounce,rules:e.getRules("country",e.required)},model:{value:e.innerValue.country,callback:function(t){e.$set(e.innerValue,"country",t)},expression:"innerValue.country"}})],1)]),e.hint?n("div",{staticClass:"row"},[n("div",{staticClass:"col-12 text-caption",domProps:{innerHTML:e._s(e.hint)}})]):e._e()])},Pe=[],Qe=n("80e6"),Ae={name:"AddressElement",extends:x,components:{QInput:s["h"],QSelect:s["t"]},props:{value:{type:Object,default:function(){return{address:null,city:null,state:null,zip:null,country:null}}}},computed:{countries:function(){return Qe}}},Le=Ae,je=Object(C["a"])(Le,$e,Pe,!1,null,null,null),Te=je.exports,Fe=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"row q-col-gutter-sm q-form-phone q-form-builder-element"},[n("div",{staticClass:"col-12 col-md-6 col-lg-3"},[n("q-input",{ref:e.id,attrs:{type:"tel",label:e.getLabel,mask:"(###) ### - ####",debounce:e.debounce,rules:e.getRules()},scopedSlots:e._u([{key:"append",fn:function(){return[n("q-icon",{attrs:{name:"phone"}})]},proxy:!0}]),model:{value:e.innerValue,callback:function(t){e.innerValue=t},expression:"innerValue"}}),e.hint?n("p",{staticClass:"text-caption",domProps:{innerHTML:e._s(e.hint)}}):e._e()],1)])},Me=[],Ne={name:"PhoneElement",extends:x,components:{QInput:s["h"],QIcon:s["f"]}},Be=Ne,Re=Object(C["a"])(Be,Fe,Me,!1,null,null,null),Ue=Re.exports,ze=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"q-form-file-upload q-form-builder-element"},[n("div",{staticClass:"row q-col-gutter-sm"},[n("div",{staticClass:"col-12 col-md-6"},[e.innerValue?e._e():n("q-uploader",{ref:e.id,staticClass:"uploader-hidden",attrs:{accept:".jpg, .pdf, image/*","auto-upload":"",url:e.uploadPath,label:e.getLabel,"field-name":e.id,color:"white",flat:"",square:""},on:{uploading:e.onStartUpload,uploaded:e.onUpload}}),e.innerValue?e._e():n("q-btn",{staticClass:"full-width",attrs:{"icon-right":"cloud_upload",label:e.buttonLabel,color:e.buttonColor,disable:e.imgUploading,align:"between"},on:{click:function(t){return e.pickFiles()}}}),e.innerValue?n("q-img",{staticClass:"upload-display",attrs:{contain:"",src:e.imgRef},on:{error:e.onImgLoadError}},[n("div",{staticClass:"absolute-top text-subtitle2"},[e._v(" "+e._s(e.getLabel)+" "),n("span",{staticClass:"float-right"},[n("q-btn",{attrs:{flat:"",round:"",size:"sm",icon:"open_in_new"},on:{click:e.viewOriginal}},[n("q-tooltip",[e._v(e._s(e.$t("surveys.view_original")))])],1),n("q-btn",{attrs:{flat:"",round:"",size:"sm",icon:"delete"},on:{click:e.unsetUpload}},[n("q-tooltip",[e._v("Remove")])],1)],1)]),e.imgLoadFailed?n("div",{staticClass:"absolute-bottom text-subtitle1 text-center"},[e._v(" No Preview Available ")]):e._e()]):e._e()],1)]),e._l(e.errors,(function(t,i){return n("p",{key:i,staticClass:"col-12 col-md-6 text-negative text-caption"},[e._v(e._s(t))])})),e.hint?n("div",{staticClass:"row q-col-gutter-sm"},[n("p",{staticClass:"col-12 col-md-6 text-caption",domProps:{innerHTML:e._s(e.hint)}})]):e._e()],2)},De=[],He={name:"FileElement",extends:x,components:{QUploader:s["C"],QImg:s["g"],QBtn:s["a"],QTooltip:s["B"]},data:function(){return{imgLoadFailed:!1,imgUploading:!1}},props:{uploadPath:{type:String,default:"/api/upload"}},methods:{pickFiles:function(){this.$refs[this.id].pickFiles()},onStartUpload:function(){this.imgUploading=!0},onUpload:function(e){this.imgUploading=!1,this.innerValue=JSON.parse(e.xhr.response),this.validate()},unsetUpload:function(){this.innerValue=!1},viewOriginal:function(){window.open("/assets/".concat(this.innerValue),"_blank")},onImgLoadError:function(){this.imgLoadFailed=!0},validate:function(){this.errors=[],this.required&&!this.innerValue&&this.errors.push("This field is required."),this.hasError=this.errors.length>0}},computed:{imgRef:function(){return this.imgLoadFailed?n("439a"):"/assets/".concat(this.innerValue)},buttonColor:function(){return this.hasError?"negative":"grey-7"},buttonLabel:function(){return this.imgUploading?"Uploading...":this.getLabel}}},Ge=He,Je=(n("1bed"),Object(C["a"])(Ge,ze,De,!1,null,null,null)),Ke=Je.exports,Ye=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"q-form-payment q-form-builder-element"},[e.getLabel?n("div",{staticClass:"row"},[n("div",{staticClass:"col-12"},[n("label",[e._v(e._s(e.getLabel))])])]):e._e(),n("div",{staticClass:"row q-col-gutter-sm"},[n("div",{staticClass:"col-12 col-md-6"},[n("q-input",{ref:e.id+"_ccname",attrs:{label:e.$t("surveys.name_on_card"),debounce:e.debounce,rules:e.getRules("ccname",e.required)},model:{value:e.innerValue.ccname,callback:function(t){e.$set(e.innerValue,"ccname",t)},expression:"innerValue.ccname"}})],1)]),n("div",{staticClass:"row q-col-gutter-sm"},[n("div",{staticClass:"col-12 col-md-6"},[n("q-input",{ref:e.id+"_ccnum",attrs:{label:e.$t("surveys.card_number"),"fill-mask":"#",debounce:e.debounce,rules:e.getRules("ccnum",e.required)},model:{value:e.innerValue.ccnum,callback:function(t){e.$set(e.innerValue,"ccnum",t)},expression:"innerValue.ccnum"}})],1)]),n("div",{staticClass:"row q-col-gutter-sm"},[n("div",{staticClass:"col-12 col-sm-6 col-md-3"},[n("q-select",{ref:e.id+"_expmonth",attrs:{options:e.expmonths,label:e.$t("surveys.exp_month"),debounce:e.debounce,rules:e.getRules("expmonth",e.required)},model:{value:e.innerValue.expmonth,callback:function(t){e.$set(e.innerValue,"expmonth",t)},expression:"innerValue.expmonth"}})],1),n("div",{staticClass:"col-12 col-sm-6 col-md-3"},[n("q-select",{ref:e.id+"_expyear",attrs:{options:e.expyears,label:e.$t("surveys.exp_year"),debounce:e.debounce,rules:e.getRules("expyear",e.required)},model:{value:e.innerValue.expyear,callback:function(t){e.$set(e.innerValue,"expyear",t)},expression:"innerValue.expyear"}})],1)]),n("div",{staticClass:"row q-col-gutter-sm"},[n("div",{staticClass:"col-12 col-sm-6 col-md-3"},[n("q-input",{ref:e.id+"_cvv",attrs:{label:e.$t("surveys.CVV"),"fill-mask":"#",hint:e.$t("surveys.3or4digit_code_on_back_of_card"),maxlength:"4",debounce:e.debounce,rules:e.getRules("cvv",e.required)},model:{value:e.innerValue.cvv,callback:function(t){e.$set(e.innerValue,"cvv",t)},expression:"innerValue.cvv"}})],1)]),e.hint?n("div",{staticClass:"row"},[n("div",{staticClass:"col-12 text-caption",domProps:{innerHTML:e._s(e.hint)}})]):e._e()])},Ze=[],We=n("e5a6");function Xe(e){return it(e)||nt(e)||tt(e)||et()}function et(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function tt(e,t){if(e){if("string"===typeof e)return at(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?at(e,t):void 0}}function nt(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}function it(e){if(Array.isArray(e))return at(e)}function at(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var lt={name:"PaymentElement",extends:x,components:{QInput:s["h"],QSelect:s["t"]},props:{value:{type:Object,default:function(){return{ccname:null,ccnum:null,expmonth:null,expyear:null,cvv:null}}}},methods:{range:function(e,t){return Xe(Array(t-e+1)).map((function(t,n){return e+n}))}},computed:{expmonths:function(){return this.range(1,12)},expyears:function(){var e=(new Date).getFullYear();return this.range(e,e+10)},rules:function(){var e=this;return{ccnum:[function(t){return!(!e.value.ccnum||t!==e.value.ccnum)||(We["validate"](t)||"Please enter a valid credit card.")}]}}}},rt=lt,ot=Object(C["a"])(rt,Ye,Ze,!1,null,null,null),st=ot.exports,ct=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"row q-col-gutter-sm q-form-terms q-form-builder-element"},[n("div",{staticClass:"col"},[n("label",[e._v(e._s(e.getLabel))]),n("q-scroll-area",{staticClass:"terms-scroll-area",attrs:{"content-style":e.termsContentStyle,"content-active-style":e.termsContentStyle}},[n("div",{staticClass:"text-body2",domProps:{innerHTML:e._s(e.hint)}})]),n("q-checkbox",{ref:e.id,attrs:{"true-value":e.$t("surveys.i_agree"),"false-value":!1,"keep-color":"",color:e.hasError?"red":""},model:{value:e.iAgree,callback:function(t){e.iAgree=t},expression:"iAgree"}},[n("span",{class:e.hasError?"text-negative":""},[e._v(e._s(e.$t("surveys.i_agree")))])]),e._l(e.errors,(function(t,i){return n("p",{key:i,staticClass:"text-negative text-caption"},[e._v(e._s(t))])}))],2)])},ut=[],dt={name:"TermsElement",extends:x,components:{QScrollArea:s["s"],QCheckbox:s["b"]},data:function(){return{iAgree:!1}},computed:{termsContentStyle:function(){return{background:"rgba(0,0,0,0.02)",color:"rgb(117, 117, 117)",padding:"10px"}}},methods:{validate:function(){this.hasError=!1,this.errors=[],this.required&&!this.iAgree&&(this.hasError=!0,this.errors.push('Please click "I Agree" to accept.'))}},watch:{iAgree:function(e){this.innerValue=e,this.validate()}}},pt=dt,mt=(n("2d42"),Object(C["a"])(pt,ct,ut,!1,null,null,null)),ft=mt.exports,ht=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"q-form-section-break q-form-builder-element"},[e.label?n("label",[e._v(e._s(e.label))]):e._e(),n("q-separator",{attrs:{spaced:"",color:"secondary"}}),e.hint?n("p",{staticClass:"text-caption",domProps:{innerHTML:e._s(e.hint)}}):e._e()],1)},bt=[],vt={name:"SectionBreakElement",components:{QSeparator:s["u"]},props:{label:{type:String,default:""},field_options:{type:Object,required:!1,default:function(){return{description:!1}}},cid:{},id:{}},computed:{hint:function(){return this.field_options&&this.field_options.description?q(this.field_options.description):""}},methods:{validate:function(){return!0}}},_t=vt,yt=Object(C["a"])(_t,ht,bt,!1,null,null,null),gt=yt.exports,qt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"q-form-page-break q-form-builder-element"},[e.label?n("label",[n("strong",[e._v("Page Break: ")]),e._v(e._s(e.label))]):e._e(),n("q-separator",{attrs:{spaced:"",color:"primary"}}),e.hint?n("p",{staticClass:"text-caption",domProps:{innerHTML:e._s(e.hint)}}):e._e()],1)},xt=[],kt={name:"PageBreakElement",components:{QSeparator:s["u"]},props:{label:{type:String,default:""},field_options:{type:Object,required:!1,default:function(){return{description:!1}}},cid:{},id:{}},computed:{hint:function(){return this.field_options.description}},methods:{validate:function(){return!0}}},wt=kt,Ct=Object(C["a"])(wt,qt,xt,!1,null,null,null),Et=Ct.exports,Vt={name:"EditableElement",components:{TextElement:V,ParagraphElement:Q,CheckboxesElement:R,RadioElement:J,DateElement:ee,TimeElement:re,DropdownElement:pe,EmailElement:_e,NameElement:we,SimpleNameElement:Oe,AddressElement:Te,PhoneElement:Ue,FileElement:Ke,PaymentElement:st,TermsElement:ft,SectionBreakElement:gt,PageBreakElement:Et},props:["value"],methods:{onClick:function(){this.$emit("click",this.value)}},computed:{element:function(){for(var e=this.value.field_type.split("_"),t=0;t<e.length;t++)e[t]=e[t].charAt(0).toUpperCase()+e[t].slice(1);return e.join("")+"Element"}}},It=Vt,St=(n("b043"),Object(C["a"])(It,d,p,!1,null,"c7db74f8",null)),Ot=St.exports,$t=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.value?n("form",{on:{submit:function(e){e.preventDefault()}}},[n("div",{staticClass:"text-right"},[n("q-chip",{staticClass:"text-uppercase",attrs:{square:"",dense:"",icon:e.typeIcon}},[e._v(e._s(e.typeName))])],1),n("q-input",{attrs:{dense:"",placeholder:"Label",label:e.$t("surveys.label_to_display")},model:{value:e.value.label,callback:function(t){e.$set(e.value,"label",t)},expression:"value.label"}}),n("q-input",{attrs:{dense:"",type:"textarea",label:e.$t("surveys.longer_description"),filled:""},model:{value:e.value.field_options.description,callback:function(t){e.$set(e.value.field_options,"description",t)},expression:"value.field_options.description"}}),e.ifNotTypes(["section_break","page_break"])?n("q-toggle",{attrs:{label:e.$t("surveys.required")},model:{value:e.value.required,callback:function(t){e.$set(e.value,"required",t)},expression:"value.required"}}):e._e(),e.ifType("checkboxes")?n("editable-checkboxes-options",{model:{value:e.value.field_options,callback:function(t){e.$set(e.value,"field_options",t)},expression:"value.field_options"}}):e._e(),e.ifType("radio")?n("editable-radio-options",{model:{value:e.value.field_options,callback:function(t){e.$set(e.value,"field_options",t)},expression:"value.field_options"}}):e._e(),e.ifType("dropdown")?n("editable-dropdown-options",{model:{value:e.value.field_options,callback:function(t){e.$set(e.value,"field_options",t)},expression:"value.field_options"}}):e._e()],1):e._e()},Pt=[],Qt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"q-pa-md"},[n("q-list",[n("q-item-label",{attrs:{header:""}},[e._v("Options")]),e._l(e.value.options,(function(t,i){return n("q-item",{key:i,attrs:{dense:""}},[n("q-item-section",{attrs:{side:""}},[n("q-checkbox",{model:{value:t.checked,callback:function(n){e.$set(t,"checked",n)},expression:"option.checked"}})],1),n("q-item-section",[n("q-input",{attrs:{dense:""},model:{value:t.label,callback:function(n){e.$set(t,"label",n)},expression:"option.label"}})],1),n("q-item-section",{attrs:{side:""}},[n("q-btn",{attrs:{round:"",flat:"",size:"xs",icon:"delete"},on:{click:function(t){return e.deleteItem(i)}}},[n("q-tooltip",[e._v(e._s(e.$t("surveys.delete_this_option")))])],1)],1)],1)})),n("q-item",{attrs:{dense:""}},[n("q-item-section",{attrs:{side:""}},[n("q-checkbox",{model:{value:e.newItem.checked,callback:function(t){e.$set(e.newItem,"checked",t)},expression:"newItem.checked"}})],1),n("q-item-section",[n("q-input",{attrs:{dense:"",filled:""},model:{value:e.newItem.label,callback:function(t){e.$set(e.newItem,"label",t)},expression:"newItem.label"}})],1),n("q-item-section",{attrs:{side:""}},[n("q-btn",{attrs:{round:"",size:"xs",icon:"add"},on:{click:e.addNewItem}},[n("q-tooltip",[e._v(e._s(e.$t("surveys.add_this_option")))])],1)],1)],1),n("q-item",{attrs:{dense:""}},[n("q-checkbox",{attrs:{label:e.$t("surveys.include_other_option")},model:{value:e.value.include_other_option,callback:function(t){e.$set(e.value,"include_other_option",t)},expression:"value.include_other_option"}})],1)],2)],1)},At=[],Lt=function(){return{checked:!1,label:""}},jt={name:"EditableCheckboxesOptions",components:{QList:s["m"],QItem:s["i"],QItemLabel:s["j"],QItemSection:s["k"],QCheckbox:s["b"],QInput:s["h"],QBtn:s["a"],QTooltip:s["B"]},props:["value"],data:function(){return{newItem:Lt()}},methods:{addNewItem:function(){this.value.options||(this.value.options=[]),this.value.options.push({label:this.newItem.label,checked:this.newItem.checked}),this.newItem=Lt()},deleteItem:function(e){this.value.options.splice(e,1)}}},Tt=jt,Ft=Object(C["a"])(Tt,Qt,At,!1,null,null,null),Mt=Ft.exports,Nt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"q-pa-md"},[n("q-list",[n("q-item-label",{attrs:{header:""}},[e._v("Options")]),e._l(e.value.options,(function(t,i){return n("q-item",{key:i,attrs:{dense:""}},[n("q-item-section",{attrs:{side:""}},[n("q-radio",{attrs:{val:!0},on:{input:function(n){return e.changeSelected(t.label)}},model:{value:t.checked,callback:function(n){e.$set(t,"checked",n)},expression:"option.checked"}})],1),n("q-item-section",[n("q-input",{attrs:{dense:""},model:{value:t.label,callback:function(n){e.$set(t,"label",n)},expression:"option.label"}})],1),n("q-item-section",{attrs:{side:""}},[n("q-btn",{attrs:{round:"",flat:"",size:"xs",icon:"delete"},on:{click:function(t){return e.deleteItem(i)}}},[n("q-tooltip",[e._v("Delete this option")])],1)],1)],1)})),n("q-item",{attrs:{dense:""}},[n("q-item-section",{attrs:{side:""}},[n("q-radio",{attrs:{val:!0},on:{input:function(t){return e.changeSelected(e.newItem.label)}},model:{value:e.newItem.checked,callback:function(t){e.$set(e.newItem,"checked",t)},expression:"newItem.checked"}})],1),n("q-item-section",[n("q-input",{attrs:{dense:"",filled:""},model:{value:e.newItem.label,callback:function(t){e.$set(e.newItem,"label",t)},expression:"newItem.label"}})],1),n("q-item-section",{attrs:{side:""}},[n("q-btn",{attrs:{round:"",size:"xs",icon:"add"},on:{click:e.addNewItem}},[n("q-tooltip",[e._v("Add this option")])],1)],1)],1),n("q-item",{attrs:{dense:""}},[n("q-checkbox",{attrs:{label:'Include "Other" option'},model:{value:e.value.include_other_option,callback:function(t){e.$set(e.value,"include_other_option",t)},expression:"value.include_other_option"}})],1)],2)],1)},Bt=[];function Rt(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=Ut(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var i=0,a=function(){};return{s:a,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,r=!0,o=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return r=e.done,e},e:function(e){o=!0,l=e},f:function(){try{r||null==n.return||n.return()}finally{if(o)throw l}}}}function Ut(e,t){if(e){if("string"===typeof e)return zt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zt(e,t):void 0}}function zt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var Dt=function(){return{checked:!1,label:""}},Ht={name:"EditableRadioOptions",components:{QList:s["m"],QItem:s["i"],QItemLabel:s["j"],QItemSection:s["k"],QRadio:s["r"],QCheckbox:s["b"],QInput:s["h"],QBtn:s["a"],QTooltip:s["B"]},props:["value"],data:function(){return{newItem:Dt()}},methods:{addNewItem:function(){this.value.options||(this.value.options=[]),this.value.options.push({label:this.newItem.label,checked:this.newItem.checked}),this.newItem=Dt()},deleteItem:function(e){this.value.options.splice(e,1)},changeSelected:function(e){this.newItem.checked=this.newItem.label===e;var t,n=Rt(this.value.options);try{for(n.s();!(t=n.n()).done;){var i=t.value;i.checked=i.label===e}}catch(a){n.e(a)}finally{n.f()}}}},Gt=Ht,Jt=Object(C["a"])(Gt,Nt,Bt,!1,null,null,null),Kt=Jt.exports,Yt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"q-pa-md"},[n("q-list",[n("q-item-label",{attrs:{header:""}},[e._v("Options")]),e._l(e.value.options,(function(t,i){return n("q-item",{key:i,attrs:{dense:""}},[n("q-item-section",{attrs:{side:""}},[n("q-checkbox",{attrs:{val:!0},on:{input:function(n){return e.changeSelected(t.label)}},model:{value:t.checked,callback:function(n){e.$set(t,"checked",n)},expression:"option.checked"}})],1),n("q-item-section",[n("q-input",{attrs:{dense:""},model:{value:t.label,callback:function(n){e.$set(t,"label",n)},expression:"option.label"}})],1),n("q-item-section",{attrs:{side:""}},[n("q-btn",{attrs:{round:"",flat:"",size:"xs",icon:"delete"},on:{click:function(t){return e.deleteItem(i)}}},[n("q-tooltip",[e._v(e._s(e.$t("surveys.delete_this_option")))])],1)],1)],1)})),n("q-item",{attrs:{dense:""}},[n("q-item-section",{attrs:{side:""}},[n("q-checkbox",{attrs:{val:!0},on:{input:function(t){return e.changeSelected(e.newItem.label)}},model:{value:e.newItem.checked,callback:function(t){e.$set(e.newItem,"checked",t)},expression:"newItem.checked"}})],1),n("q-item-section",[n("q-input",{attrs:{dense:"",filled:""},model:{value:e.newItem.label,callback:function(t){e.$set(e.newItem,"label",t)},expression:"newItem.label"}})],1),n("q-item-section",{attrs:{side:""}},[n("q-btn",{attrs:{round:"",size:"xs",icon:"add"},on:{click:e.addNewItem}},[n("q-tooltip",[e._v(e._s(e.$t("surveys.add_this_option")))])],1)],1)],1)],2)],1)},Zt=[];function Wt(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=Xt(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var i=0,a=function(){};return{s:a,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,r=!0,o=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return r=e.done,e},e:function(e){o=!0,l=e},f:function(){try{r||null==n.return||n.return()}finally{if(o)throw l}}}}function Xt(e,t){if(e){if("string"===typeof e)return en(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?en(e,t):void 0}}function en(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var tn=function(){return{checked:!1,label:""}},nn={name:"EditableRadiosOptions",components:{QList:s["m"],QItem:s["i"],QItemLabel:s["j"],QItemSection:s["k"],QCheckbox:s["b"],QInput:s["h"],QBtn:s["a"],QTooltip:s["B"]},props:["value"],data:function(){return{newItem:tn()}},methods:{addNewItem:function(){this.value.options.push({label:this.newItem.label,checked:this.newItem.checked}),this.newItem=tn()},deleteItem:function(e){this.value.options.splice(e,1)},changeSelected:function(e){this.newItem.checked=this.newItem.label===e;var t,n=Wt(this.value.options);try{for(n.s();!(t=n.n()).done;){var i=t.value;i.checked=i.label===e}}catch(a){n.e(a)}finally{n.f()}}}},an=nn,ln=Object(C["a"])(an,Yt,Zt,!1,null,null,null),rn=ln.exports,on={name:"EditableElementOptions",components:{QInput:s["h"],QToggle:s["A"],QChip:s["c"],EditableCheckboxesOptions:Mt,EditableRadioOptions:Kt,EditableDropdownOptions:rn},props:["value","typeInfo"],methods:{ifType:function(e){return this.value.field_type===e},ifNotTypes:function(e){return Array.isArray(e)||(e=[e]),e.indexOf(this.value.field_type)<0},getTypeInfo:function(){for(var e in this.typeInfo)if(this.typeInfo[e].type===this.value.field_type)return this.typeInfo[e];return!1}},computed:{typeName:function(){return this.getTypeInfo().label},typeIcon:function(){return this.getTypeInfo().icon}}},sn=on,cn=Object(C["a"])(sn,$t,Pt,!1,null,null,null),un=cn.exports;function dn(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=pn(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var i=0,a=function(){};return{s:a,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,r=!0,o=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return r=e.done,e},e:function(e){o=!0,l=e},f:function(){try{r||null==n.return||n.return()}finally{if(o)throw l}}}}function pn(e,t){if(e){if("string"===typeof e)return mn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?mn(e,t):void 0}}function mn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var fn={name:"QFormBuilder",components:{EditableElement:Ot,EditableElementOptions:un,draggable:u.a,QLayout:s["l"],QPageContainer:s["p"],QPage:s["o"],QDrawer:s["e"],QTab:s["v"],QTabs:s["y"],QTabPanel:s["w"],QTabPanels:s["x"],QTooltip:s["B"],QBtn:s["a"]},data:function(){return{fields:this.value,drawer:!0,tab:"add",currentField:!1,hovered:[]}},props:{navPosition:{type:String,default:"left"},fieldIdName:{default:"_id"},value:{required:!0,type:Array},sourceFields:{required:!1,default:function(){return[{type:"text",icon:"text_format",label:_.t("surveys.text")},{type:"paragraph",icon:"text_fields",label:_.t("surveys.paragraph")},{type:"checkboxes",icon:"check_box",label:_.t("surveys.checkboxes")},{type:"radio",icon:"radio_button_checked",label:_.t("surveys.multiple_choice")},{type:"date",icon:"event",label:_.t("surveys.date")},{type:"time",icon:"access_time",label:_.t("surveys.time")},{type:"dropdown",icon:"arrow_drop_down",label:_.t("surveys.dropdown")},{type:"email",icon:"email",label:_.t("surveys.email")},{type:"name",icon:"person",label:_.t("surveys.name")},{type:"simple_name",icon:"person_outline",label:_.t("surveys.simple_name")},{type:"address",icon:"home",label:_.t("surveys.address")},{type:"phone",icon:"phone",label:_.t("surveys.phone")},{type:"file",icon:"cloud_upload",label:_.t("surveys.file_upload")},{type:"payment",icon:"payment",label:_.t("surveys.payment")},{type:"terms",icon:"ballot",label:_.t("surveys.terms")},{type:""},{type:""},{type:""},{type:"section_break",icon:"view_agenda",label:_.t("surveys.section_break")},{type:"page_break",icon:"call_to_action",label:_.t("surveys.page_break")}]}}},methods:{createField:function(e){return{label:g(e.type),field_type:e.type,required:!0,cid:Object(s["F"])(),field_options:y(e.type)}},deleteField:function(e){this.currentField=!1,this.tab="add",this.$delete(this.fields,e)},duplicateField:function(e){var t=Object(s["E"])(!0,{},this.fields[e]);t.cid=Object(s["F"])(),delete t[this.fieldIdName],this.fields.push(t),this.selectForEdit(t)},onChange:function(e){e.added&&this.selectForEdit(e.added.element)},onAddFieldClick:function(e){var t=this.createField({type:e});this.fields.push(t),this.selectForEdit(t)},selectForEdit:function(e){this.currentField=e,this.tab="edit"},isSelectedForEdit:function(e){return this.currentField.cid===this.fields[e].cid},getFieldByCid:function(e){var t,n=dn(this.fields);try{for(n.s();!(t=n.n()).done;){var i=t.value;if(i.cid===e)return i}}catch(a){n.e(a)}finally{n.f()}return!1}},computed:{sourceOptions:function(){return{group:{name:"q-form-builder",pull:"clone",put:!1}}},destinationOptions:function(){return{group:{name:"q-form-builder",pull:!1,put:!0}}}},beforeMount:function(){this.fields&&this.fields instanceof Array||(this.fields=[])},watch:{fields:function(e){this.$emit("input",e)},value:function(e){this.fields=e,this.currentField&&this.selectForEdit(this.getFieldByCid(this.currentField.cid))}}},hn=fn,bn=(n("e8d1"),Object(C["a"])(hn,r,o,!1,null,"bd6af462",null)),vn=bn.exports,_n={name:"SampleApp",components:{QFormBuilder:vn,TextElement:V,ParagraphElement:Q,CheckboxesElement:R,RadioElement:J,DateElement:ee,TimeElement:re,DropdownElement:pe,EmailElement:_e,NameElement:we,SimpleNameElement:Oe,AddressElement:Te,PhoneElement:Ue,FileElement:Ke,PaymentElement:st,TermsElement:ft,PageBreakElement:Et,SectionBreakElement:gt},data:function(){return{PreviewDialog:!1,fields:[],fieldData:[],sourceFields:{required:!1,default:function(){return[{type:"text",icon:"text_format",label:this.$t("surveys.text")},{type:"paragraph",icon:"text_fields",label:this.$t("surveys.paragraph")},{type:"checkboxes",icon:"check_box",label:this.$t("surveys.checkboxes")},{type:"radio",icon:"radio_button_checked",label:this.$t("surveys.multiple_choice")},{type:"date",icon:"event",label:this.$t("surveys.date")},{type:"time",icon:"access_time",label:this.$t("surveys.time")},{type:"dropdown",icon:"arrow_drop_down",label:this.$t("surveys.dropdown")},{type:"email",icon:"email",label:this.$t("surveys.email")},{type:"name",icon:"person",label:this.$t("surveys.name")},{type:"simple_name",icon:"person_outline",label:this.$t("surveys.simple_name")},{type:"address",icon:"home",label:this.$t("surveys.address")},{type:"phone",icon:"phone",label:this.$t("surveys.phone")},{type:"file",icon:"cloud_upload",label:this.$t("surveys.file_upload")},{type:"payment",icon:"payment",label:this.$t("surveys.payment")},{type:"terms",icon:"ballot",label:this.$t("surveys.terms")},{type:""},{type:""},{type:""},{type:"section_break",icon:"view_agenda",label:this.$t("surveys.section_break")},{type:"page_break",icon:"call_to_action",label:this.$t("surveys.page_break")}]}}}},methods:{onInput:function(e,t){},getElement:function(e){for(var t=e.field_type.split("_"),n=0;n<t.length;n++)t[n]=t[n].charAt(0).toUpperCase()+t[n].slice(1);return t.join("")+"Element"}},watch:{fields:{handler:function(e){},deep:!0}}},yn=_n,gn=(n("7faf"),Object(C["a"])(yn,a,l,!1,null,null,null)),qn=gn.exports;n("a4ac"),n("5c7d"),n("7d6e"),n("e54f");i["a"].use(s["D"],{config:{}}),i["a"].config.productionTip=!1,new i["a"]({i18n:v,render:function(e){return e(qn)}}).$mount("#app")},"5f16":function(e,t,n){},"6de7":function(e,t,n){"use strict";var i=n("deaf"),a=n.n(i);a.a},"7faf":function(e,t,n){"use strict";var i=n("b8ff"),a=n.n(i);a.a},"80e6":function(e){e.exports=JSON.parse('["United States","Afghanistan","Albania","Algeria","Andorra","Angola","Anguilla","Antigua &amp; Barbuda","Argentina","Armenia","Aruba","Australia","Austria","Azerbaijan","Bahamas","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bermuda","Bhutan","Bolivia","Bosnia &amp; Herzegovina","Botswana","Brazil","British Virgin Islands","Brunei","Bulgaria","Burkina Faso","Burundi","Cambodia","Cameroon","Canada","Cape Verde","Cayman Islands","Chad","Chile","China","Colombia","Congo","Cook Islands","Costa Rica","Cote D Ivoire","Croatia","Cruise Ship","Cuba","Cyprus","Czech Republic","Denmark","Djibouti","Dominica","Dominican Republic","Ecuador","Egypt","El Salvador","Equatorial Guinea","Estonia","Ethiopia","Falkland Islands","Faroe Islands","Fiji","Finland","France","French Polynesia","French West Indies","Gabon","Gambia","Georgia","Germany","Ghana","Gibraltar","Greece","Greenland","Grenada","Guam","Guatemala","Guernsey","Guinea","Guinea Bissau","Guyana","Haiti","Honduras","Hong Kong","Hungary","Iceland","India","Indonesia","Iran","Iraq","Ireland","Isle of Man","Israel","Italy","Jamaica","Japan","Jersey","Jordan","Kazakhstan","Kenya","Kuwait","Kyrgyz Republic","Laos","Latvia","Lebanon","Lesotho","Liberia","Libya","Liechtenstein","Lithuania","Luxembourg","Macau","Macedonia","Madagascar","Malawi","Malaysia","Maldives","Mali","Malta","Mauritania","Mauritius","Mexico","Moldova","Monaco","Mongolia","Montenegro","Montserrat","Morocco","Mozambique","Namibia","Nepal","Netherlands","Netherlands Antilles","New Caledonia","New Zealand","Nicaragua","Niger","Nigeria","Norway","Oman","Pakistan","Palestine","Panama","Papua New Guinea","Paraguay","Peru","Philippines","Poland","Portugal","Puerto Rico","Qatar","Reunion","Romania","Russia","Rwanda","Saint Pierre &amp; Miquelon","Samoa","San Marino","Satellite","Saudi Arabia","Senegal","Serbia","Seychelles","Sierra Leone","Singapore","Slovakia","Slovenia","South Africa","South Korea","Spain","Sri Lanka","St Kitts &amp; Nevis","St Lucia","St Vincent","St. Lucia","Sudan","Suriname","Swaziland","Sweden","Switzerland","Syria","Taiwan","Tajikistan","Tanzania","Thailand","Timor L\'Este","Togo","Tonga","Trinidad &amp; Tobago","Tunisia","Turkey","Turkmenistan","Turks &amp; Caicos","Uganda","Ukraine","United Arab Emirates","United Kingdom","United States","United States Minor Outlying Islands","Uruguay","Uzbekistan","Venezuela","Vietnam","Virgin Islands (US)","Yemen","Zambia","Zimbabwe"]')},"8b56":function(e,t,n){},a4ac:function(e,t,n){},a625:function(e){e.exports=JSON.parse('{"hello":"Hello i18n in SFC!","welcome":"Welcome!","yes-button":"Yes","no-button":"No!","surveys":{"street":"Straat","city":"Plaats","state_province_region":"Provincie","zip_postalcode":"Postcode","country":"Land","text":"Tekst","paragraph":"Paragraaf","checkboxes":"Checkboxes","multiple_choice":"Meerkeuze","date":"Datum","time":"Tijd","dropdown":"Dropdown","email":"Email","name":"Naam","simple_name":"Simpele Naam","address":"Adres","phone":"Telefoon","file_upload":"Bestand Upload","payment":"Betaling","terms":"Voorwaarden","section_break":"Sectie Einde","page_break":"Pagina Einde","delete_this_field":"Verwijder dit veld","duplicate_this_field":"Dupliceer dit veld","add_field":"Veld Toevoegen","edit_field":"Veld Bewerken","include_other_option":"Voeg optie anders toe","drag_an_element_here_to_get_started":"Sleep een element hierheen om te beginnen","label_to_display":"Label om weer te geven","untitled":"Naamloos","longer_description":"Langere omschrijving om weer te geven","required":"Verplicht","add_this_option":"Voeg deze optie toe","delete_this_option":"Verwijder deze optie","title":"titel","first_name":"Voornaam","middle_name":"Tussenvoegsel","last_name":"Achternaam","name_on_card":"Naam Kaarthouder","card_number":"Kaartnummer","exp_month":"Maand Verlopen","exp_year":"Jaar Verlopen","CVV":"Controle Code","3or4digit_code_on_back_of_card":"3 of 4 getallen op de achterkant van de kaart","i_agree":"Ik ga akkoord","view_original":"Bekijk het origineel","preview":"Voorbeeld Weergave"}}')},b043:function(e,t,n){"use strict";var i=n("ca44"),a=n.n(i);a.a},b8ff:function(e,t,n){},ca44:function(e,t,n){},deaf:function(e,t,n){},e8d1:function(e,t,n){"use strict";var i=n("8b56"),a=n.n(i);a.a},edd4:function(e){e.exports=JSON.parse('{"hello":"Hello i18n in SFC!","welcome":"Welcome!","yes-button":"Yes","no-button":"No!","surveys":{"street":"Street","city":"City","state_province_region":"State/Province/Region","zip_postalcode":"Zip/Postalcode","country":"Country","text":"Text","paragraph":"Paragraph","checkboxes":"Checkboxes","multiple_choice":"Multiple Choice","date":"Date","time":"Time","dropdown":"Dropdown","email":"Email","name":"Name","simple_name":"Simple Naae","address":"Adsress","phone":"Phone","file_upload":"File Upload","payment":"Payment","terms":"Terms","section_break":"Section Break","page_break":"Page Break","delete_this_field":"Delete this field","duplicate_this_field":"Duplicate this field","add_field":"Add Field","edit_field":"Edit Field","include_other_option":"include other option","drag_an_element_here_to_get_started":"Drag an element here to get started","label_to_display":"Label to display","untitled":"Untitled","longer_description":"Longer description to display","required":"Required","add_this_option":"Add this option","delete_this_option":"Deelete this option","title":"title","first_name":"First Name","middle_name":"Middle Name","last_name":"Last Name","name_on_card":"Name on card","card_number":"Card Number","exp_month":"Exp. Month","exp_year":"Exp. Year","CVV":"CVV","3or4digit_code_on_back_of_card":"3 or 4 digit code on back of card","i_agree":"I Agree","view_original":"View Original","preview":"Preview"}}')}});
  //# sourceMappingURL=app.31aa0914.js.map